Browse Source

Merge pull request #6547 from nocodb/fix/lint

fix: lint issues
test/quick-run
աӄա 1 year ago committed by GitHub
parent
commit
efe484b5d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/cell/MultiSelect.vue
  2. 2
      packages/nc-gui/components/cell/SingleSelect.vue
  3. 2
      packages/nc-gui/components/cell/attachment/utils.ts
  4. 15
      packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
  5. 2
      packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue
  6. 41
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  7. 2
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue
  8. 9
      packages/nc-gui/components/dashboard/TreeView/ViewsList.vue
  9. 6
      packages/nc-gui/components/dashboard/TreeView/index.vue
  10. 2
      packages/nc-gui/components/dashboard/settings/AuditTab.vue
  11. 2
      packages/nc-gui/components/dashboard/settings/BaseAudit.vue
  12. 4
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  13. 2
      packages/nc-gui/components/dashboard/settings/Metadata.vue
  14. 2
      packages/nc-gui/components/dashboard/settings/Misc.vue
  15. 2
      packages/nc-gui/components/dashboard/settings/UIAcl.vue
  16. 11
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  17. 11
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue
  18. 2
      packages/nc-gui/components/dlg/AirtableImport.vue
  19. 2
      packages/nc-gui/components/dlg/QuickImport.vue
  20. 2
      packages/nc-gui/components/dlg/TableRename.vue
  21. 2
      packages/nc-gui/components/dlg/ViewCreate.vue
  22. 6
      packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
  23. 8
      packages/nc-gui/components/erd/View.vue
  24. 2
      packages/nc-gui/components/general/HelpAndSupport.vue
  25. 2
      packages/nc-gui/components/general/MiniSidebar.vue
  26. 2
      packages/nc-gui/components/shared-view/Grid.vue
  27. 2
      packages/nc-gui/components/smartsheet/ApiSnippet.vue
  28. 2
      packages/nc-gui/components/smartsheet/Cell.vue
  29. 2
      packages/nc-gui/components/smartsheet/Topbar.vue
  30. 2
      packages/nc-gui/components/smartsheet/column/AdvancedOptions.vue
  31. 2
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  32. 2
      packages/nc-gui/components/smartsheet/column/LookupOptions.vue
  33. 2
      packages/nc-gui/components/smartsheet/column/RollupOptions.vue
  34. 2
      packages/nc-gui/components/smartsheet/details/Api.vue
  35. 2
      packages/nc-gui/components/smartsheet/details/Fields.vue
  36. 2
      packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue
  37. 2
      packages/nc-gui/components/smartsheet/toolbar/MoreActions.vue
  38. 4
      packages/nc-gui/components/smartsheet/toolbar/ShareView.vue
  39. 2
      packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue
  40. 2
      packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue
  41. 2
      packages/nc-gui/components/tabs/auth/UserManagement.vue
  42. 11
      packages/nc-gui/components/tabs/auth/user-management/ShareBase.vue
  43. 2
      packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue
  44. 6
      packages/nc-gui/components/template/Editor.vue
  45. 2
      packages/nc-gui/components/workspace/CreateProjectDlg.vue
  46. 6
      packages/nc-gui/composables/useColumnCreateStore.ts
  47. 2
      packages/nc-gui/composables/useData.ts
  48. 2
      packages/nc-gui/composables/useExpandedFormStore.ts
  49. 2
      packages/nc-gui/composables/useKanbanViewStore.ts
  50. 2
      packages/nc-gui/composables/useLTARStore.ts
  51. 2
      packages/nc-gui/composables/useMapViewDataStore.ts
  52. 2
      packages/nc-gui/composables/useMetas.ts
  53. 2
      packages/nc-gui/composables/useMultiSelect/index.ts
  54. 2
      packages/nc-gui/composables/useSharedFormViewStore.ts
  55. 2
      packages/nc-gui/composables/useSmartsheetRowStore.ts
  56. 12
      packages/nc-gui/composables/useSmartsheetStore.ts
  57. 2
      packages/nc-gui/composables/useTable.ts
  58. 2
      packages/nc-gui/composables/useTableNew.ts
  59. 2
      packages/nc-gui/composables/useViewColumns.ts
  60. 4
      packages/nc-gui/composables/useViewData.ts
  61. 2
      packages/nc-gui/composables/useViewFilters.ts
  62. 2
      packages/nc-gui/composables/useViewSorts.ts
  63. 2
      packages/nc-gui/lib/types.ts
  64. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index.vue
  65. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue
  66. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/index.vue
  67. 2
      packages/nc-gui/pages/index/[typeOrId]/shared/[erdUuid]/index.vue
  68. 6
      packages/nc-gui/pages/projects/index/list.vue
  69. 2
      packages/nc-gui/pages/signin.vue
  70. 4
      packages/nc-gui/store/base.ts
  71. 6
      packages/nc-gui/store/bases.ts
  72. 2
      packages/nc-gui/store/tab.ts
  73. 2
      packages/nc-gui/store/workspace.ts

2
packages/nc-gui/components/cell/MultiSelect.vue

@ -23,9 +23,9 @@ import {
onMounted, onMounted,
reactive, reactive,
ref, ref,
useBase,
useEventListener, useEventListener,
useMetas, useMetas,
useBase,
useRoles, useRoles,
useSelectedCellKeyupListener, useSelectedCellKeyupListener,
watch, watch,

2
packages/nc-gui/components/cell/SingleSelect.vue

@ -20,8 +20,8 @@ import {
inject, inject,
isDrawerOrModalExist, isDrawerOrModalExist,
ref, ref,
useEventListener,
useBase, useBase,
useEventListener,
useRoles, useRoles,
useSelectedCellKeyupListener, useSelectedCellKeyupListener,
watch, watch,

2
packages/nc-gui/components/cell/attachment/utils.ts

@ -17,10 +17,10 @@ import {
storeToRefs, storeToRefs,
useApi, useApi,
useAttachment, useAttachment,
useBase,
useFileDialog, useFileDialog,
useI18n, useI18n,
useInjectionState, useInjectionState,
useBase,
watch, watch,
} from '#imports' } from '#imports'
import MdiPdfBox from '~icons/mdi/pdf-box' import MdiPdfBox from '~icons/mdi/pdf-box'

15
packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue

@ -1,12 +1,23 @@
<script lang="ts" setup> <script lang="ts" setup>
import GithubButton from 'vue-github-button' import GithubButton from 'vue-github-button'
import {
computed,
message,
navigateTo,
onMounted,
ref,
storeToRefs,
useCopy,
useGlobal,
useSidebarStore,
useUsers,
watch,
} from '#imports'
const { user, signOut, token, appInfo } = useGlobal() const { user, signOut, token, appInfo } = useGlobal()
// So watcher in users store is triggered // So watcher in users store is triggered
useUsers() useUsers()
const { clearWorkspaces } = useWorkspace()
const { leftSidebarState } = storeToRefs(useSidebarStore()) const { leftSidebarState } = storeToRefs(useSidebarStore())
const { copy } = useCopy(true) const { copy } = useCopy(true)

2
packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { SourceType, BaseType } from 'nocodb-sdk' import type { BaseType, SourceType } from 'nocodb-sdk'
const props = defineProps<{ const props = defineProps<{
source: SourceType source: SourceType

41
packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue

@ -2,7 +2,7 @@
import { nextTick } from '@vue/runtime-core' import { nextTick } from '@vue/runtime-core'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { stringifyRolesObj } from 'nocodb-sdk' import { stringifyRolesObj } from 'nocodb-sdk'
import type { SourceType, BaseType, TableType } from 'nocodb-sdk' import type { BaseType, SourceType, TableType } from 'nocodb-sdk'
import { LoadingOutlined } from '@ant-design/icons-vue' import { LoadingOutlined } from '@ant-design/icons-vue'
import { useTitle } from '@vueuse/core' import { useTitle } from '@vueuse/core'
import { import {
@ -10,10 +10,27 @@ import {
ProjectInj, ProjectInj,
ProjectRoleInj, ProjectRoleInj,
ToggleDialogInj, ToggleDialogInj,
TreeViewInj,
computed,
extractSdkResponseErrorMsg, extractSdkResponseErrorMsg,
h,
inject,
navigateTo,
openLink, openLink,
ref,
resolveComponent,
storeToRefs, storeToRefs,
useBase,
useBases, useBases,
useCopy,
useDialog,
useGlobal,
useI18n,
useRoles,
useRouter,
useTablesStore,
useTabs,
useToggle,
} from '#imports' } from '#imports'
import type { NcProject } from '#imports' import type { NcProject } from '#imports'
import { useNuxtApp } from '#app' import { useNuxtApp } from '#app'
@ -27,10 +44,10 @@ const indicator = h(LoadingOutlined, {
}) })
const router = useRouter() const router = useRouter()
const route = router.currentRoute const route = router.currentRoute
const { isSharedBase } = storeToRefs(useBase()) const { isSharedBase } = storeToRefs(useBase())
const { projectUrl } = useBase()
const { setMenuContext, openRenameTableDialog, duplicateTable, contextMenuTarget } = inject(TreeViewInj)! const { setMenuContext, openRenameTableDialog, duplicateTable, contextMenuTarget } = inject(TreeViewInj)!
@ -41,9 +58,11 @@ const basesStore = useBases()
const { isMobileMode } = useGlobal() const { isMobileMode } = useGlobal()
const { loadProject, loadProjects, createProject: _createProject, updateProject, getProjectMetaInfo } = basesStore const { loadProject, loadProjects, createProject: _createProject, updateProject, getProjectMetaInfo } = basesStore
const { bases } = storeToRefs(basesStore) const { bases } = storeToRefs(basesStore)
const { loadProjectTables } = useTablesStore() const { loadProjectTables } = useTablesStore()
const { activeTable } = storeToRefs(useTablesStore()) const { activeTable } = storeToRefs(useTablesStore())
const { appInfo, navigateToProject } = useGlobal() const { appInfo, navigateToProject } = useGlobal()
@ -424,17 +443,13 @@ const projectDelete = () => {
<div class="flex items-center mr-1" @click="onProjectClick(base)"> <div class="flex items-center mr-1" @click="onProjectClick(base)">
<div class="flex items-center select-none w-6 h-full"> <div class="flex items-center select-none w-6 h-full">
<a-spin <a-spin v-if="base.isLoading" class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8" :indicator="indicator" />
v-if="base.isLoading"
class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8"
:indicator="indicator"
/>
<LazyGeneralEmojiPicker <LazyGeneralEmojiPicker
v-else v-else
:key="base.meta?.icon" :key="base.meta?.icon"
:emoji="base.meta?.icon"
v-e="['c:base:emojiSelect']" v-e="['c:base:emojiSelect']"
:emoji="base.meta?.icon"
:readonly="true" :readonly="true"
size="small" size="small"
@emoji-selected="setIcon($event, base)" @emoji-selected="setIcon($event, base)"
@ -517,8 +532,8 @@ const projectDelete = () => {
<NcMenuItem <NcMenuItem
v-if="!isEeUI" v-if="!isEeUI"
key="copy" key="copy"
data-testid="nc-sidebar-base-copy-base-info"
v-e="['c:base:copy-proj-info']" v-e="['c:base:copy-proj-info']"
data-testid="nc-sidebar-base-copy-base-info"
@click.stop="copyProjectInfo" @click.stop="copyProjectInfo"
> >
<GeneralIcon icon="copy" class="group-hover:text-black" /> <GeneralIcon icon="copy" class="group-hover:text-black" />
@ -622,8 +637,8 @@ const projectDelete = () => {
<a-collapse <a-collapse
v-else-if="source && source.enabled" v-else-if="source && source.enabled"
v-model:activeKey="activeKey" v-model:activeKey="activeKey"
class="!mx-0 !px-0 nc-sidebar-source-node"
v-e="['c:source:toggle-expand']" v-e="['c:source:toggle-expand']"
class="!mx-0 !px-0 nc-sidebar-source-node"
:class="[{ hidden: searchActive && !!filterQuery }]" :class="[{ hidden: searchActive && !!filterQuery }]"
expand-icon-position="left" expand-icon-position="left"
:bordered="false" :bordered="false"
@ -743,7 +758,11 @@ const projectDelete = () => {
<template v-else-if="contextMenuTarget.type === 'source'"></template> <template v-else-if="contextMenuTarget.type === 'source'"></template>
<template v-else-if="contextMenuTarget.type === 'table'"> <template v-else-if="contextMenuTarget.type === 'table'">
<NcMenuItem v-if="isUIAllowed('tableRename')" v-e="['c:table:rename']" @click="openRenameTableDialog(contextMenuTarget.value, true)"> <NcMenuItem
v-if="isUIAllowed('tableRename')"
v-e="['c:table:rename']"
@click="openRenameTableDialog(contextMenuTarget.value, true)"
>
<div class="nc-base-option-item"> <div class="nc-base-option-item">
<GeneralIcon icon="edit" class="text-gray-700" /> <GeneralIcon icon="edit" class="text-gray-700" />
{{ $t('general.rename') }} {{ $t('general.rename') }}

2
packages/nc-gui/components/dashboard/TreeView/TableNode.vue

@ -258,8 +258,8 @@ const isTableOpened = computed(() => {
<template #overlay> <template #overlay>
<NcMenu> <NcMenu>
<NcMenuItem <NcMenuItem
v-e="['c:table:rename']"
v-if="isUIAllowed('tableRename', { roles: baseRole })" v-if="isUIAllowed('tableRename', { roles: baseRole })"
v-e="['c:table:rename']"
:data-testid="`sidebar-table-rename-${table.title}`" :data-testid="`sidebar-table-rename-${table.title}`"
@click="openRenameTableDialog(table, base.sources[sourceIndex].id)" @click="openRenameTableDialog(table, base.sources[sourceIndex].id)"
> >

9
packages/nc-gui/components/dashboard/TreeView/ViewsList.vue

@ -5,7 +5,6 @@ import type { SortableEvent } from 'sortablejs'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import type { Menu as AntMenu } from 'ant-design-vue' import type { Menu as AntMenu } from 'ant-design-vue'
import { import {
isDefaultBase as _isDefaultBase,
extractSdkResponseErrorMsg, extractSdkResponseErrorMsg,
message, message,
onMounted, onMounted,
@ -36,14 +35,8 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const { isMobileMode } = useGlobal() const { isMobileMode } = useGlobal()
const { $e } = useNuxtApp() const { $e } = useNuxtApp()
const { t } = useI18n()
const isDefaultBase = computed(() => {
const source = base.value?.sources?.find((b) => b.id === table.value.source_id)
if (!source) return false
return _isDefaultBase(source) const { t } = useI18n()
})
const { viewsByTable, activeView, recentViews } = storeToRefs(useViewsStore()) const { viewsByTable, activeView, recentViews } = storeToRefs(useViewsStore())

6
packages/nc-gui/components/dashboard/TreeView/index.vue

@ -16,10 +16,10 @@ import {
ref, ref,
resolveComponent, resolveComponent,
storeToRefs, storeToRefs,
useDialog,
useNuxtApp,
useBase, useBase,
useBases, useBases,
useDialog,
useNuxtApp,
useRoles, useRoles,
useTablesStore, useTablesStore,
useTabs, useTabs,
@ -68,7 +68,7 @@ const setMenuContext = (type: 'base' | 'source' | 'table' | 'main' | 'layout', v
contextMenuTarget.value = value contextMenuTarget.value = value
} }
function openRenameTableDialog(table: TableType, rightClick = false) { function openRenameTableDialog(table: TableType, _ = false) {
if (!table || !table.source_id) return if (!table || !table.source_id) return
$e('c:table:rename') $e('c:table:rename')

2
packages/nc-gui/components/dashboard/settings/AuditTab.vue

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue' import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
import type { AuditType } from 'nocodb-sdk' import type { AuditType } from 'nocodb-sdk'
import { ProjectIdInj, h, iconMap, onMounted, storeToRefs, timeAgo, useGlobal, useI18n, useNuxtApp, useBase } from '#imports' import { ProjectIdInj, h, iconMap, onMounted, storeToRefs, timeAgo, useBase, useGlobal, useI18n, useNuxtApp } from '#imports'
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

2
packages/nc-gui/components/dashboard/settings/BaseAudit.vue

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue' import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
import type { AuditType } from 'nocodb-sdk' import type { AuditType } from 'nocodb-sdk'
import { h, iconMap, onMounted, storeToRefs, timeAgo, useGlobal, useI18n, useNuxtApp, useBase } from '#imports' import { h, iconMap, onMounted, storeToRefs, timeAgo, useBase, useGlobal, useI18n, useNuxtApp } from '#imports'
interface Props { interface Props {
sourceId: string sourceId: string

4
packages/nc-gui/components/dashboard/settings/DataSources.vue

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import Draggable from 'vuedraggable' import Draggable from 'vuedraggable'
import type { SourceType } from 'nocodb-sdk' import type { SourceType } from 'nocodb-sdk'
import { ClientType, DataSourcesSubTab, storeToRefs, useCommandPalette, useNuxtApp, useBase } from '#imports' import { ClientType, DataSourcesSubTab, storeToRefs, useBase, useCommandPalette, useNuxtApp } from '#imports'
interface Props { interface Props {
state: string state: string
@ -416,7 +416,7 @@ const isEditBaseModalOpen = computed({
<GeneralIcon v-if="sources.length > 2" icon="dragVertical" small class="ds-table-handle" /> <GeneralIcon v-if="sources.length > 2" icon="dragVertical" small class="ds-table-handle" />
<div v-if="source.is_meta || source.is_local">-</div> <div v-if="source.is_meta || source.is_local">-</div>
<div v-else class="flex items-center gap-1"> <div v-else class="flex items-center gap-1">
{{ source.is_meta || source.is_local ? $t('general.base') : source.alias }} {{ source.is_meta || source.is_local ? $t('general.base') : source.alias }}
</div> </div>
</div> </div>

2
packages/nc-gui/components/dashboard/settings/Metadata.vue

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { Empty, extractSdkResponseErrorMsg, h, iconMap, message, storeToRefs, useI18n, useNuxtApp, useBase } from '#imports' import { Empty, extractSdkResponseErrorMsg, h, iconMap, message, storeToRefs, useBase, useI18n, useNuxtApp } from '#imports'
const props = defineProps<{ const props = defineProps<{
sourceId: string sourceId: string

2
packages/nc-gui/components/dashboard/settings/Misc.vue

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface' import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface'
import { onMounted } from '@vue/runtime-core' import { onMounted } from '@vue/runtime-core'
import { ProjectIdInj, storeToRefs, useGlobal, useBase, watch } from '#imports' import { ProjectIdInj, storeToRefs, useBase, useGlobal, watch } from '#imports'
const { includeM2M, showNull } = useGlobal() const { includeM2M, showNull } = useGlobal()

2
packages/nc-gui/components/dashboard/settings/UIAcl.vue

@ -10,10 +10,10 @@ import {
message, message,
onMounted, onMounted,
storeToRefs, storeToRefs,
useBase,
useGlobal, useGlobal,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
} from '#imports' } from '#imports'
const props = defineProps<{ const props = defineProps<{

11
packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue

@ -8,6 +8,7 @@ import {
ProjectIdInj, ProjectIdInj,
SSLUsage, SSLUsage,
clientTypes as _clientTypes, clientTypes as _clientTypes,
baseTitleValidator,
computed, computed,
extractSdkResponseErrorMsg, extractSdkResponseErrorMsg,
fieldRequiredValidator, fieldRequiredValidator,
@ -17,7 +18,6 @@ import {
iconMap, iconMap,
nextTick, nextTick,
onMounted, onMounted,
baseTitleValidator,
readFile, readFile,
ref, ref,
storeToRefs, storeToRefs,
@ -410,14 +410,7 @@ watch(
<span class="flex-grow"></span> <span class="flex-grow"></span>
</h1> </h1>
<a-form <a-form ref="form" :model="formState" name="external-base-create-form" layout="horizontal" no-style :label-col="{ span: 8 }">
ref="form"
:model="formState"
name="external-base-create-form"
layout="horizontal"
no-style
:label-col="{ span: 8 }"
>
<div <div
class="nc-scrollbar-md" class="nc-scrollbar-md"
:style="{ :style="{

11
packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue

@ -8,6 +8,7 @@ import {
ClientType, ClientType,
ProjectIdInj, ProjectIdInj,
SSLUsage, SSLUsage,
baseTitleValidator,
clientTypes, clientTypes,
computed, computed,
extractSdkResponseErrorMsg, extractSdkResponseErrorMsg,
@ -16,7 +17,6 @@ import {
getTestDatabaseName, getTestDatabaseName,
iconMap, iconMap,
onMounted, onMounted,
baseTitleValidator,
readFile, readFile,
ref, ref,
storeToRefs, storeToRefs,
@ -345,14 +345,7 @@ onMounted(async () => {
<div class="edit-source bg-white relative flex flex-col justify-start gap-2 w-full p-2"> <div class="edit-source bg-white relative flex flex-col justify-start gap-2 w-full p-2">
<h1 class="prose-2xl font-bold self-start">{{ $t('activity.editSource') }}</h1> <h1 class="prose-2xl font-bold self-start">{{ $t('activity.editSource') }}</h1>
<a-form <a-form ref="form" :model="formState" name="external-base-create-form" layout="horizontal" no-style :label-col="{ span: 8 }">
ref="form"
:model="formState"
name="external-base-create-form"
layout="horizontal"
no-style
:label-col="{ span: 8 }"
>
<div <div
class="nc-scrollbar-md" class="nc-scrollbar-md"
:style="{ :style="{

2
packages/nc-gui/components/dlg/AirtableImport.vue

@ -12,8 +12,8 @@ import {
onMounted, onMounted,
ref, ref,
storeToRefs, storeToRefs,
useNuxtApp,
useBase, useBase,
useNuxtApp,
watch, watch,
} from '#imports' } from '#imports'

2
packages/nc-gui/components/dlg/QuickImport.vue

@ -28,9 +28,9 @@ import {
reactive, reactive,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useGlobal, useGlobal,
useI18n, useI18n,
useBase,
useVModel, useVModel,
} from '#imports' } from '#imports'

2
packages/nc-gui/components/dlg/TableRename.vue

@ -10,10 +10,10 @@ import {
nextTick, nextTick,
reactive, reactive,
storeToRefs, storeToRefs,
useBase,
useCommandPalette, useCommandPalette,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
useTablesStore, useTablesStore,
useTabs, useTabs,
useUndoRedo, useUndoRedo,

2
packages/nc-gui/components/dlg/ViewCreate.vue

@ -2,7 +2,7 @@
import type { ComponentPublicInstance } from '@vue/runtime-core' import type { ComponentPublicInstance } from '@vue/runtime-core'
import type { Form as AntForm, SelectProps } from 'ant-design-vue' import type { Form as AntForm, SelectProps } from 'ant-design-vue'
import { capitalize } from '@vue/runtime-core' import { capitalize } from '@vue/runtime-core'
import type { FormType, GalleryType, GridType, KanbanType, MapType, TableType, ViewType } from 'nocodb-sdk' import type { FormType, GalleryType, GridType, KanbanType, MapType, TableType } from 'nocodb-sdk'
import { UITypes, ViewTypes } from 'nocodb-sdk' import { UITypes, ViewTypes } from 'nocodb-sdk'
import { computed, message, nextTick, onBeforeMount, reactive, ref, useApi, useI18n, useVModel, watch } from '#imports' import { computed, message, nextTick, onBeforeMount, reactive, ref, useApi, useI18n, useVModel, watch } from '#imports'

6
packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { extractSdkResponseErrorMsg, message, onMounted, storeToRefs, useDashboard, useNuxtApp, useBase } from '#imports' import { extractSdkResponseErrorMsg, message, onMounted, storeToRefs, useBase, useDashboard, useNuxtApp } from '#imports'
interface ShareBase { interface ShareBase {
uuid?: string uuid?: string
@ -20,7 +20,9 @@ const sharedBase = ref<null | ShareBase>(null)
const { base } = storeToRefs(useBase()) const { base } = storeToRefs(useBase())
const url = computed(() => (sharedBase.value && sharedBase.value.uuid ? `${dashboardUrl.value}#/base/${sharedBase.value.uuid}` : '')) const url = computed(() =>
sharedBase.value && sharedBase.value.uuid ? `${dashboardUrl.value}#/base/${sharedBase.value.uuid}` : '',
)
const loadBase = async () => { const loadBase = async () => {
try { try {

8
packages/nc-gui/components/erd/View.vue

@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import type { SourceType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk' import type { LinkToAnotherRecordType, SourceType, TableType } from 'nocodb-sdk'
import { isLinksOrLTAR } from 'nocodb-sdk' import { isLinksOrLTAR } from 'nocodb-sdk'
import type { ERDConfig } from './utils' import type { ERDConfig } from './utils'
import { reactive, ref, storeToRefs, useMetas, useBase, watch } from '#imports' import { reactive, ref, storeToRefs, useBase, useMetas, watch } from '#imports'
const props = defineProps({ const props = defineProps({
sourceId: { sourceId: {
@ -93,7 +93,9 @@ watch(config, populateTables, {
const filteredTables = computed(() => const filteredTables = computed(() =>
tables.value.filter((t) => tables.value.filter((t) =>
props?.sourceId ? t.source_id === props.sourceId : t.source_id === sources.value?.filter((source: SourceType) => source.enabled)[0].id, props?.sourceId
? t.source_id === props.sourceId
: t.source_id === sources.value?.filter((source: SourceType) => source.enabled)[0].id,
), ),
) )

2
packages/nc-gui/components/general/HelpAndSupport.vue

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { iconMap, ref, storeToRefs, useGlobal, useBase, useRoute } from '#imports' import { iconMap, ref, storeToRefs, useBase, useGlobal, useRoute } from '#imports'
const showDrawer = ref(false) const showDrawer = ref(false)

2
packages/nc-gui/components/general/MiniSidebar.vue

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, iconMap, navigateTo, storeToRefs, useGlobal, useBase, useRoute, useSidebar } from '#imports' import { computed, iconMap, navigateTo, storeToRefs, useBase, useGlobal, useRoute, useSidebar } from '#imports'
const { signOut, signedIn, user, currentVersion } = useGlobal() const { signOut, signedIn, user, currentVersion } = useGlobal()

2
packages/nc-gui/components/shared-view/Grid.vue

@ -11,8 +11,8 @@ import {
message, message,
provide, provide,
ref, ref,
useGlobal,
useBase, useBase,
useGlobal,
useProvideSmartsheetStore, useProvideSmartsheetStore,
useSharedView, useSharedView,
} from '#imports' } from '#imports'

2
packages/nc-gui/components/smartsheet/ApiSnippet.vue

@ -7,10 +7,10 @@ import {
message, message,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useCopy, useCopy,
useGlobal, useGlobal,
useI18n, useI18n,
useBase,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,
useVModel, useVModel,
useViewData, useViewData,

2
packages/nc-gui/components/smartsheet/Cell.vue

@ -46,8 +46,8 @@ import {
ref, ref,
storeToRefs, storeToRefs,
toRef, toRef,
useDebounceFn,
useBase, useBase,
useDebounceFn,
useSmartsheetRowStoreOrThrow, useSmartsheetRowStoreOrThrow,
} from '#imports' } from '#imports'

2
packages/nc-gui/components/smartsheet/Topbar.vue

@ -10,8 +10,6 @@ const isPublic = inject(IsPublicInj, ref(false))
const { isViewsLoading } = storeToRefs(useViewsStore()) const { isViewsLoading } = storeToRefs(useViewsStore())
const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const { isMobileMode } = storeToRefs(useConfigStore()) const { isMobileMode } = storeToRefs(useConfigStore())
const { appInfo } = useGlobal() const { appInfo } = useGlobal()

2
packages/nc-gui/components/smartsheet/column/AdvancedOptions.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { UITypes } from 'nocodb-sdk' import { UITypes } from 'nocodb-sdk'
import { MetaInj, computed, useColumnCreateStoreOrThrow, useBase, useVModel } from '#imports' import { MetaInj, computed, useBase, useColumnCreateStoreOrThrow, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
value: any value: any

2
packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

@ -14,12 +14,12 @@ import {
onMounted, onMounted,
ref, ref,
uiTypes, uiTypes,
useBase,
useColumnCreateStoreOrThrow, useColumnCreateStoreOrThrow,
useGlobal, useGlobal,
useI18n, useI18n,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
watchEffect, watchEffect,
} from '#imports' } from '#imports'
import MdiMinusIcon from '~icons/mdi/minus-circle-outline' import MdiMinusIcon from '~icons/mdi/minus-circle-outline'

2
packages/nc-gui/components/smartsheet/column/LookupOptions.vue

@ -2,7 +2,7 @@
import { onMounted } from '@vue/runtime-core' import { onMounted } from '@vue/runtime-core'
import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk' import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk'
import { UITypes, isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk' import { UITypes, isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk'
import { MetaInj, inject, ref, storeToRefs, useColumnCreateStoreOrThrow, useMetas, useBase, useVModel } from '#imports' import { MetaInj, inject, ref, storeToRefs, useBase, useColumnCreateStoreOrThrow, useMetas, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
value: any value: any

2
packages/nc-gui/components/smartsheet/column/RollupOptions.vue

@ -2,7 +2,7 @@
import { onMounted } from '@vue/runtime-core' import { onMounted } from '@vue/runtime-core'
import type { ColumnType, LinkToAnotherRecordType, TableType, UITypes } from 'nocodb-sdk' import type { ColumnType, LinkToAnotherRecordType, TableType, UITypes } from 'nocodb-sdk'
import { isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk' import { isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk'
import { MetaInj, inject, ref, storeToRefs, useColumnCreateStoreOrThrow, useMetas, useBase, useVModel } from '#imports' import { MetaInj, inject, ref, storeToRefs, useBase, useColumnCreateStoreOrThrow, useMetas, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
value: any value: any

2
packages/nc-gui/components/smartsheet/details/Api.vue

@ -7,10 +7,10 @@ import {
message, message,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useCopy, useCopy,
useGlobal, useGlobal,
useI18n, useI18n,
useBase,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,
useViewData, useViewData,
watch, watch,

2
packages/nc-gui/components/smartsheet/details/Fields.vue

@ -43,8 +43,6 @@ const moveOps = ref<moveOp[]>([])
const visibilityOps = ref<fieldsVisibilityOps[]>([]) const visibilityOps = ref<fieldsVisibilityOps[]>([])
const selectedView = inject(ActiveViewInj)
const { fields: viewFields, toggleFieldVisibility, loadViewColumns } = useViewColumns(view, meta as Ref<TableType | undefined>) const { fields: viewFields, toggleFieldVisibility, loadViewColumns } = useViewColumns(view, meta as Ref<TableType | undefined>)
const loading = ref(false) const loading = ref(false)

2
packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue

@ -12,9 +12,9 @@ import {
message, message,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,
} from '#imports' } from '#imports'

2
packages/nc-gui/components/smartsheet/toolbar/MoreActions.vue

@ -12,9 +12,9 @@ import {
message, message,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
useRoles, useRoles,
useSharedView, useSharedView,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,

4
packages/nc-gui/components/smartsheet/toolbar/ShareView.vue

@ -3,19 +3,19 @@ import { ViewTypes } from 'nocodb-sdk'
import { isString } from '@vue/shared' import { isString } from '@vue/shared'
import tinycolor from 'tinycolor2' import tinycolor from 'tinycolor2'
import { import {
baseThemeColors,
computed, computed,
extractSdkResponseErrorMsg, extractSdkResponseErrorMsg,
iconMap, iconMap,
isRtlLang, isRtlLang,
message, message,
baseThemeColors,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useCopy, useCopy,
useDashboard, useDashboard,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
useRoles, useRoles,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,
watch, watch,

2
packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue

@ -13,10 +13,10 @@ import {
inject, inject,
message, message,
ref, ref,
useBase,
useI18n, useI18n,
useMenuCloseOnEsc, useMenuCloseOnEsc,
useNuxtApp, useNuxtApp,
useBase,
useRoles, useRoles,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,
} from '#imports' } from '#imports'

2
packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue

@ -6,10 +6,10 @@ import {
message, message,
onMounted, onMounted,
storeToRefs, storeToRefs,
useBase,
useCopy, useCopy,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
} from '#imports' } from '#imports'
interface ApiToken extends ApiTokenType { interface ApiToken extends ApiTokenType {

2
packages/nc-gui/components/tabs/auth/UserManagement.vue

@ -9,11 +9,11 @@ import {
ref, ref,
storeToRefs, storeToRefs,
useApi, useApi,
useBase,
useCopy, useCopy,
useDashboard, useDashboard,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
useRoles, useRoles,
watchDebounced, watchDebounced,
} from '#imports' } from '#imports'

11
packages/nc-gui/components/tabs/auth/user-management/ShareBase.vue

@ -5,11 +5,11 @@ import {
message, message,
onMounted, onMounted,
storeToRefs, storeToRefs,
useBase,
useCopy, useCopy,
useDashboard, useDashboard,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
} from '#imports' } from '#imports'
interface ShareBase { interface ShareBase {
@ -37,7 +37,9 @@ const { base } = storeToRefs(useBase())
const { copy } = useCopy() const { copy } = useCopy()
const url = computed(() => (sharedBase.value && sharedBase.value.uuid ? `${dashboardUrl.value}#/base/${sharedBase.value.uuid}` : null)) const url = computed(() =>
sharedBase.value && sharedBase.value.uuid ? `${dashboardUrl.value}#/base/${sharedBase.value.uuid}` : null,
)
const loadBase = async () => { const loadBase = async () => {
try { try {
@ -201,7 +203,10 @@ onMounted(() => {
</a-select-option> </a-select-option>
</a-select> </a-select>
</div> </div>
<div v-if="sharedBase?.uuid" class="flex flex-row mt-2 bg-red-50 py-4 mx-1 px-2 items-center rounded-sm w-full justify-between"> <div
v-if="sharedBase?.uuid"
class="flex flex-row mt-2 bg-red-50 py-4 mx-1 px-2 items-center rounded-sm w-full justify-between"
>
<span class="flex text-xs overflow-x-hidden overflow-ellipsis text-gray-700 pl-2 nc-url">{{ url }}</span> <span class="flex text-xs overflow-x-hidden overflow-ellipsis text-gray-700 pl-2 nc-url">{{ url }}</span>
<div class="flex border-l-1 pt-1 pl-1"> <div class="flex border-l-1 pt-1 pl-1">

2
packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue

@ -13,11 +13,11 @@ import {
ref, ref,
storeToRefs, storeToRefs,
useActiveKeyupListener, useActiveKeyupListener,
useBase,
useCopy, useCopy,
useDashboard, useDashboard,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
} from '#imports' } from '#imports'
import type { User, Users } from '#imports' import type { User, Users } from '#imports'

6
packages/nc-gui/components/template/Editor.vue

@ -30,9 +30,9 @@ import {
reactive, reactive,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
useTabs, useTabs,
} from '#imports' } from '#imports'
@ -397,9 +397,7 @@ function fieldsValidation(record: Record<string, any>, tn: string) {
} }
function updateImportTips(baseName: string, tableName: string, progress: number, total: number) { function updateImportTips(baseName: string, tableName: string, progress: number, total: number) {
importingTips.value[ importingTips.value[`${baseName}-${tableName}`] = `Importing data to ${baseName} - ${tableName}: ${progress}/${total} records`
`${baseName}-${tableName}`
] = `Importing data to ${baseName} - ${tableName}: ${progress}/${total} records`
} }
async function importTemplate() { async function importTemplate() {

2
packages/nc-gui/components/workspace/CreateProjectDlg.vue

@ -3,7 +3,7 @@ import type { RuleObject } from 'ant-design-vue/es/form'
import type { Form, Input } from 'ant-design-vue' import type { Form, Input } from 'ant-design-vue'
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { computed } from '@vue/reactivity' import { computed } from '@vue/reactivity'
import { NcProjectType, extractSdkResponseErrorMsg, baseTitleValidator, ref, useGlobal, useVModel } from '#imports' import { NcProjectType, baseTitleValidator, extractSdkResponseErrorMsg, ref, useGlobal, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: boolean modelValue: boolean

6
packages/nc-gui/composables/useColumnCreateStore.ts

@ -11,10 +11,10 @@ import {
message, message,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useI18n, useI18n,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
watch, watch,
} from '#imports' } from '#imports'
@ -56,7 +56,9 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
const isMssql = computed(() => isMssqlFunc(meta.value?.source_id ? meta.value?.source_id : Object.keys(sqlUis.value)[0])) const isMssql = computed(() => isMssqlFunc(meta.value?.source_id ? meta.value?.source_id : Object.keys(sqlUis.value)[0]))
const isXcdbBase = computed(() => isXcdbBaseFunc(meta.value?.source_id ? meta.value?.source_id : Object.keys(sqlUis.value)[0])) const isXcdbBase = computed(() =>
isXcdbBaseFunc(meta.value?.source_id ? meta.value?.source_id : Object.keys(sqlUis.value)[0]),
)
const baseType = computed(() => getBaseType(meta.value?.source_id ? meta.value?.source_id : Object.keys(sqlUis.value)[0])) const baseType = computed(() => getBaseType(meta.value?.source_id ? meta.value?.source_id : Object.keys(sqlUis.value)[0]))

2
packages/nc-gui/composables/useData.ts

@ -12,10 +12,10 @@ import {
rowPkData, rowPkData,
storeToRefs, storeToRefs,
until, until,
useBase,
useI18n, useI18n,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
} from '#imports' } from '#imports'
import type { CellRange, Row, UndoRedoAction } from '#imports' import type { CellRange, Row, UndoRedoAction } from '#imports'

2
packages/nc-gui/composables/useExpandedFormStore.ts

@ -12,12 +12,12 @@ import {
ref, ref,
storeToRefs, storeToRefs,
useApi, useApi,
useBase,
useI18n, useI18n,
useInjectionState, useInjectionState,
useKanbanViewStoreOrThrow, useKanbanViewStoreOrThrow,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
useProvideSmartsheetRowStore, useProvideSmartsheetRowStore,
useSharedView, useSharedView,
useUndoRedo, useUndoRedo,

2
packages/nc-gui/composables/useKanbanViewStore.ts

@ -16,11 +16,11 @@ import {
rowPkData, rowPkData,
storeToRefs, storeToRefs,
useApi, useApi,
useBase,
useFieldQuery, useFieldQuery,
useI18n, useI18n,
useInjectionState, useInjectionState,
useNuxtApp, useNuxtApp,
useBase,
useRoles, useRoles,
useSharedView, useSharedView,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,

2
packages/nc-gui/composables/useLTARStore.ts

@ -12,11 +12,11 @@ import {
reactive, reactive,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useI18n, useI18n,
useInjectionState, useInjectionState,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
useRouter, useRouter,
useSharedView, useSharedView,
watch, watch,

2
packages/nc-gui/composables/useMapViewDataStore.ts

@ -1,6 +1,6 @@
import type { ComputedRef, Ref } from 'vue' import type { ComputedRef, Ref } from 'vue'
import type { ColumnType, MapType, PaginatedType, TableType, ViewType } from 'nocodb-sdk' import type { ColumnType, MapType, PaginatedType, TableType, ViewType } from 'nocodb-sdk'
import { IsPublicInj, ref, storeToRefs, useInjectionState, useMetas, useBase } from '#imports' import { IsPublicInj, ref, storeToRefs, useBase, useInjectionState, useMetas } from '#imports'
import type { Row } from '#imports' import type { Row } from '#imports'
const formatData = (list: Record<string, any>[]) => const formatData = (list: Record<string, any>[]) =>

2
packages/nc-gui/composables/useMetas.ts

@ -1,7 +1,7 @@
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import type { WatchStopHandle } from 'vue' import type { WatchStopHandle } from 'vue'
import type { TableType } from 'nocodb-sdk' import type { TableType } from 'nocodb-sdk'
import { extractSdkResponseErrorMsg, storeToRefs, useNuxtApp, useBase, useState, watch } from '#imports' import { extractSdkResponseErrorMsg, storeToRefs, useBase, useNuxtApp, useState, watch } from '#imports'
export function useMetas() { export function useMetas() {
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

2
packages/nc-gui/composables/useMultiSelect/index.ts

@ -22,12 +22,12 @@ import {
ref, ref,
timeFormats, timeFormats,
unref, unref,
useBase,
useCopy, useCopy,
useEventListener, useEventListener,
useGlobal, useGlobal,
useI18n, useI18n,
useMetas, useMetas,
useBase,
} from '#imports' } from '#imports'
const MAIN_MOUSE_PRESSED = 0 const MAIN_MOUSE_PRESSED = 0

2
packages/nc-gui/composables/useSharedFormViewStore.ts

@ -22,10 +22,10 @@ import {
ref, ref,
storeToRefs, storeToRefs,
useApi, useApi,
useBase,
useI18n, useI18n,
useInjectionState, useInjectionState,
useMetas, useMetas,
useBase,
useProvideSmartsheetRowStore, useProvideSmartsheetRowStore,
useViewsStore, useViewsStore,
watch, watch,

2
packages/nc-gui/composables/useSmartsheetRowStore.ts

@ -15,11 +15,11 @@ import {
ref, ref,
storeToRefs, storeToRefs,
unref, unref,
useBase,
useI18n, useI18n,
useInjectionState, useInjectionState,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
} from '#imports' } from '#imports'
import type { Row } from '#imports' import type { Row } from '#imports'

12
packages/nc-gui/composables/useSmartsheetStore.ts

@ -1,17 +1,7 @@
import { ViewTypes } from 'nocodb-sdk' import { ViewTypes } from 'nocodb-sdk'
import type { FilterType, KanbanType, SortType, TableType, ViewType } from 'nocodb-sdk' import type { FilterType, KanbanType, SortType, TableType, ViewType } from 'nocodb-sdk'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import { import { computed, ref, storeToRefs, unref, useBase, useEventBus, useFieldQuery, useInjectionState, useNuxtApp } from '#imports'
computed,
ref,
storeToRefs,
unref,
useEventBus,
useFieldQuery,
useInjectionState,
useNuxtApp,
useBase,
} from '#imports'
import type { SmartsheetStoreEvents } from '#imports' import type { SmartsheetStoreEvents } from '#imports'
const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState( const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState(

2
packages/nc-gui/composables/useTable.ts

@ -9,11 +9,11 @@ import {
message, message,
reactive, reactive,
storeToRefs, storeToRefs,
useBase,
useCommandPalette, useCommandPalette,
useI18n, useI18n,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
useTabs, useTabs,
watch, watch,
} from '#imports' } from '#imports'

2
packages/nc-gui/composables/useTableNew.ts

@ -10,11 +10,11 @@ import {
message, message,
reactive, reactive,
storeToRefs, storeToRefs,
useBase,
useCommandPalette, useCommandPalette,
useI18n, useI18n,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
useTabs, useTabs,
watch, watch,
} from '#imports' } from '#imports'

2
packages/nc-gui/composables/useViewColumns.ts

@ -1,7 +1,7 @@
import { ViewTypes, isSystemColumn } from 'nocodb-sdk' import { ViewTypes, isSystemColumn } from 'nocodb-sdk'
import type { ColumnType, MapType, TableType, ViewType } from 'nocodb-sdk' import type { ColumnType, MapType, TableType, ViewType } from 'nocodb-sdk'
import type { ComputedRef, Ref } from 'vue' import type { ComputedRef, Ref } from 'vue'
import { IsPublicInj, computed, inject, ref, storeToRefs, useNuxtApp, useBase, useRoles, useUndoRedo, watch } from '#imports' import { IsPublicInj, computed, inject, ref, storeToRefs, useBase, useNuxtApp, useRoles, useUndoRedo, watch } from '#imports'
import type { Field } from '#imports' import type { Field } from '#imports'
export function useViewColumns( export function useViewColumns(

4
packages/nc-gui/composables/useViewData.ts

@ -12,10 +12,10 @@ import {
ref, ref,
storeToRefs, storeToRefs,
useApi, useApi,
useBase,
useGlobal, useGlobal,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useBase,
useRoles, useRoles,
useRouter, useRouter,
useSharedView, useSharedView,
@ -77,7 +77,7 @@ export function useViewData(
const { sharedView, fetchSharedViewData, paginationData: sharedPaginationData } = useSharedView() const { sharedView, fetchSharedViewData, paginationData: sharedPaginationData } = useSharedView()
const { $api, $e } = useNuxtApp() const { $api } = useNuxtApp()
const { sorts, nestedFilters } = useSmartsheetStoreOrThrow() const { sorts, nestedFilters } = useSmartsheetStoreOrThrow()

2
packages/nc-gui/composables/useViewFilters.ts

@ -12,10 +12,10 @@ import {
message, message,
ref, ref,
storeToRefs, storeToRefs,
useBase,
useDebounceFn, useDebounceFn,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
useBase,
useRoles, useRoles,
watch, watch,
} from '#imports' } from '#imports'

2
packages/nc-gui/composables/useViewSorts.ts

@ -10,8 +10,8 @@ import {
message, message,
ref, ref,
storeToRefs, storeToRefs,
useNuxtApp,
useBase, useBase,
useNuxtApp,
useRoles, useRoles,
useSharedView, useSharedView,
useSmartsheetStoreOrThrow, useSmartsheetStoreOrThrow,

2
packages/nc-gui/lib/types.ts

@ -1,4 +1,4 @@
import type { ColumnType, FilterType, MetaType, PaginatedType, BaseType, Roles, RolesObj, ViewTypes } from 'nocodb-sdk' import type { BaseType, ColumnType, FilterType, MetaType, PaginatedType, Roles, RolesObj, ViewTypes } from 'nocodb-sdk'
import type { I18n } from 'vue-i18n' import type { I18n } from 'vue-i18n'
import type { Theme as AntTheme } from 'ant-design-vue/es/config-provider' import type { Theme as AntTheme } from 'ant-design-vue/es/config-provider'
import type { UploadFile } from 'ant-design-vue' import type { UploadFile } from 'ant-design-vue'

2
packages/nc-gui/pages/index/[typeOrId]/[baseId]/index.vue

@ -11,9 +11,9 @@ import {
onMounted, onMounted,
ref, ref,
resolveComponent, resolveComponent,
useBase,
useDialog, useDialog,
useI18n, useI18n,
useBase,
useRoute, useRoute,
useRouter, useRouter,
useSidebar, useSidebar,

2
packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { TabItem } from '#imports' import type { TabItem } from '#imports'
import { TabMetaInj, computed, inject, storeToRefs, until, useMetas, useBase, useRoute } from '#imports' import { TabMetaInj, computed, inject, storeToRefs, until, useBase, useMetas, useRoute } from '#imports'
const { getMeta } = useMetas() const { getMeta } = useMetas()
const baseStore = useBase() const baseStore = useBase()

2
packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/index.vue

@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { UploadChangeParam, UploadFile } from 'ant-design-vue' import type { UploadChangeParam, UploadFile } from 'ant-design-vue'
import type { SourceType } from 'nocodb-sdk' import type { SourceType } from 'nocodb-sdk'
import { message, ref, resolveComponent, storeToRefs, useDialog, useFileDialog, useNuxtApp, useBase, watch } from '#imports' import { message, ref, resolveComponent, storeToRefs, useBase, useDialog, useFileDialog, useNuxtApp, watch } from '#imports'
const baseStore = useBase() const baseStore = useBase()
const { base } = storeToRefs(baseStore) const { base } = storeToRefs(baseStore)

2
packages/nc-gui/pages/index/[typeOrId]/shared/[erdUuid]/index.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { definePageMeta, navigateTo, onMounted, ref, useGlobal, useMetas, useNuxtApp, useBase, useRoute } from '#imports' import { definePageMeta, navigateTo, onMounted, ref, useBase, useGlobal, useMetas, useNuxtApp, useRoute } from '#imports'
definePageMeta({ definePageMeta({
public: true, public: true,

6
packages/nc-gui/pages/projects/index/list.vue

@ -36,11 +36,7 @@ const openProject = async (base: BaseType) => {
<div class="font-semibold capitalize">{{ base.title || 'Untitled' }}</div> <div class="font-semibold capitalize">{{ base.title || 'Untitled' }}</div>
<div>{{ base.updated_at }}</div> <div>{{ base.updated_at }}</div>
<div class="flex justify-center"> <div class="flex justify-center">
<component <component :is="iconMap.delete" class="text-gray-500 hover:text-red-500 mr-2" @click.stop="emit('delete-base', base)" />
:is="iconMap.delete"
class="text-gray-500 hover:text-red-500 mr-2"
@click.stop="emit('delete-base', base)"
/>
<component <component
:is="iconMap.edit" :is="iconMap.edit"
class="text-gray-500 hover:text-primary mr-2" class="text-gray-500 hover:text-primary mr-2"

2
packages/nc-gui/pages/signin.vue

@ -26,8 +26,6 @@ const { t } = useI18n()
useSidebar('nc-left-sidebar', { hasSidebar: false }) useSidebar('nc-left-sidebar', { hasSidebar: false })
const { clearWorkspaces } = useWorkspace()
const formValidator = ref() const formValidator = ref()
const form = reactive({ const form = reactive({

4
packages/nc-gui/store/base.ts

@ -1,4 +1,4 @@
import type { SourceType, OracleUi, BaseType, TableType } from 'nocodb-sdk' import type { BaseType, OracleUi, SourceType, TableType } from 'nocodb-sdk'
import { SqlUiFactory } from 'nocodb-sdk' import { SqlUiFactory } from 'nocodb-sdk'
import { isString } from '@vue/shared' import { isString } from '@vue/shared'
import { acceptHMRUpdate, defineStore } from 'pinia' import { acceptHMRUpdate, defineStore } from 'pinia'
@ -8,9 +8,9 @@ import {
createEventHook, createEventHook,
ref, ref,
useApi, useApi,
useBases,
useCommandPalette, useCommandPalette,
useNuxtApp, useNuxtApp,
useBases,
useRoles, useRoles,
useRouter, useRouter,
useTheme, useTheme,

6
packages/nc-gui/store/bases.ts

@ -1,5 +1,5 @@
import { acceptHMRUpdate, defineStore } from 'pinia' import { acceptHMRUpdate, defineStore } from 'pinia'
import type { SourceType, OracleUi, BaseType, ProjectUserReqType, RequestParams } from 'nocodb-sdk' import type { BaseType, OracleUi, ProjectUserReqType, RequestParams, SourceType } from 'nocodb-sdk'
import { SqlUiFactory } from 'nocodb-sdk' import { SqlUiFactory } from 'nocodb-sdk'
import { isString } from '@vue/shared' import { isString } from '@vue/shared'
import { useWorkspace } from '#imports' import { useWorkspace } from '#imports'
@ -11,9 +11,7 @@ export const useBases = defineStore('basesStore', () => {
const bases = ref<Map<string, NcProject>>(new Map()) const bases = ref<Map<string, NcProject>>(new Map())
const basesList = computed<NcProject[]>(() => const basesList = computed<NcProject[]>(() => Array.from(bases.value.values()).sort((a, b) => a.updated_at - b.updated_at))
Array.from(bases.value.values()).sort((a, b) => a.updated_at - b.updated_at),
)
const router = useRouter() const router = useRouter()
const route = router.currentRoute const route = router.currentRoute

2
packages/nc-gui/store/tab.ts

@ -1,4 +1,4 @@
import type { SourceType, BaseType } from 'nocodb-sdk' import type { BaseType, SourceType } from 'nocodb-sdk'
import type { WritableComputedRef } from '@vue/reactivity' import type { WritableComputedRef } from '@vue/reactivity'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { TabType, computed, ref } from '#imports' import { TabType, computed, ref } from '#imports'

2
packages/nc-gui/store/workspace.ts

@ -2,7 +2,7 @@ import type { BaseType } from 'nocodb-sdk'
import { acceptHMRUpdate, defineStore } from 'pinia' import { acceptHMRUpdate, defineStore } from 'pinia'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { isString } from '@vue/shared' import { isString } from '@vue/shared'
import { computed, navigateTo, ref, useCommandPalette, useNuxtApp, useBases, useRouter, useTheme } from '#imports' import { computed, navigateTo, ref, useBases, useCommandPalette, useNuxtApp, useRouter, useTheme } from '#imports'
import type { ThemeConfig } from '#imports' import type { ThemeConfig } from '#imports'
export const useWorkspace = defineStore('workspaceStore', () => { export const useWorkspace = defineStore('workspaceStore', () => {

Loading…
Cancel
Save