From 332045363701049e374f8e5bca47041c292ff723 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Tue, 13 Sep 2022 16:34:15 +0200 Subject: [PATCH] chore(nc-gui): remove `as any` typecasts wherever possible --- .../nc-gui/components/dashboard/TreeView.vue | 4 +- .../nc-gui/components/shared-view/Grid.vue | 10 ++- .../smartsheet-toolbar/ExportSubActions.vue | 3 +- .../smartsheet-toolbar/FieldsMenu.vue | 2 +- .../smartsheet-toolbar/MoreActions.vue | 3 +- .../smartsheet-toolbar/ShareView.vue | 2 +- .../smartsheet-toolbar/SortListMenu.vue | 2 +- .../smartsheet-toolbar/ViewActions.vue | 6 +- .../components/smartsheet/ApiSnippet.vue | 18 +++-- .../nc-gui/components/smartsheet/Form.vue | 11 ++- .../nc-gui/components/smartsheet/Gallery.vue | 29 +++++--- .../nc-gui/components/smartsheet/Grid.vue | 13 ++-- .../components/tabs/auth/UserManagement.vue | 4 +- .../tabs/auth/user-management/ShareBase.vue | 8 +-- .../components/virtual-cell/HasMany.vue | 8 +-- .../components/virtual-cell/ManyToMany.vue | 8 +-- packages/nc-gui/components/webhook/Editor.vue | 35 +++++---- .../composables/useColumnCreateStore.ts | 2 +- .../composables/useExpandedFormStore.ts | 3 +- .../composables/useGridViewColumnWidth.ts | 9 +-- packages/nc-gui/composables/useLTARStore.ts | 18 ++--- .../composables/useLoadingIndicator/index.ts | 72 +++++++++++++++++++ .../composables/useSharedFormViewStore.ts | 12 ++-- packages/nc-gui/composables/useSharedView.ts | 10 +-- .../nc-gui/composables/useSmartsheetStore.ts | 20 +++--- packages/nc-gui/composables/useViewColumns.ts | 12 ++-- packages/nc-gui/composables/useViewData.ts | 31 ++++---- packages/nc-gui/composables/useViewFilters.ts | 16 ++--- packages/nc-gui/composables/useViewSorts.ts | 7 +- packages/nc-gui/layouts/base.vue | 2 +- packages/nc-gui/utils/viewUtils.ts | 6 +- 31 files changed, 242 insertions(+), 144 deletions(-) create mode 100644 packages/nc-gui/composables/useLoadingIndicator/index.ts diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue index a40f81fd54..1b1c9de92f 100644 --- a/packages/nc-gui/components/dashboard/TreeView.vue +++ b/packages/nc-gui/components/dashboard/TreeView.vue @@ -104,7 +104,7 @@ const initSortable = (el: Element) => { // update the item order await $api.dbTable.reorder(item.id as string, { - order: item.order as any, + order: item.order, }) }, animation: 150, @@ -142,7 +142,7 @@ const reloadTables = async () => { } const addTableTab = (table: TableType) => { - addTab({ title: table.title, id: table.id, type: table.type as any }) + addTab({ title: table.title, id: table.id, type: table.type as TabType }) } function openRenameTableDialog(table: TableType, rightClick = false) { diff --git a/packages/nc-gui/components/shared-view/Grid.vue b/packages/nc-gui/components/shared-view/Grid.vue index b35c1fbbbb..963ac3a4ee 100644 --- a/packages/nc-gui/components/shared-view/Grid.vue +++ b/packages/nc-gui/components/shared-view/Grid.vue @@ -1,12 +1,10 @@