Browse Source

chore(nc-gui): lint

pull/6547/head
WK Wong 1 year ago
parent
commit
55259c89b9
  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. 2
      packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue
  5. 20
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  6. 2
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue
  7. 4
      packages/nc-gui/components/dashboard/TreeView/index.vue
  8. 2
      packages/nc-gui/components/dashboard/settings/AuditTab.vue
  9. 2
      packages/nc-gui/components/dashboard/settings/BaseAudit.vue
  10. 4
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  11. 2
      packages/nc-gui/components/dashboard/settings/Metadata.vue
  12. 2
      packages/nc-gui/components/dashboard/settings/Misc.vue
  13. 2
      packages/nc-gui/components/dashboard/settings/UIAcl.vue
  14. 11
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  15. 11
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue
  16. 2
      packages/nc-gui/components/dlg/AirtableImport.vue
  17. 2
      packages/nc-gui/components/dlg/QuickImport.vue
  18. 2
      packages/nc-gui/components/dlg/TableRename.vue
  19. 6
      packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
  20. 8
      packages/nc-gui/components/erd/View.vue
  21. 2
      packages/nc-gui/components/general/HelpAndSupport.vue
  22. 2
      packages/nc-gui/components/general/MiniSidebar.vue
  23. 2
      packages/nc-gui/components/shared-view/Grid.vue
  24. 2
      packages/nc-gui/components/smartsheet/ApiSnippet.vue
  25. 2
      packages/nc-gui/components/smartsheet/Cell.vue
  26. 2
      packages/nc-gui/components/smartsheet/column/AdvancedOptions.vue
  27. 2
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  28. 2
      packages/nc-gui/components/smartsheet/column/LookupOptions.vue
  29. 2
      packages/nc-gui/components/smartsheet/column/RollupOptions.vue
  30. 2
      packages/nc-gui/components/smartsheet/details/Api.vue
  31. 2
      packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue
  32. 2
      packages/nc-gui/components/smartsheet/toolbar/MoreActions.vue
  33. 4
      packages/nc-gui/components/smartsheet/toolbar/ShareView.vue
  34. 2
      packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue
  35. 2
      packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue
  36. 2
      packages/nc-gui/components/tabs/auth/UserManagement.vue
  37. 11
      packages/nc-gui/components/tabs/auth/user-management/ShareBase.vue
  38. 2
      packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue
  39. 6
      packages/nc-gui/components/template/Editor.vue
  40. 2
      packages/nc-gui/components/workspace/CreateProjectDlg.vue
  41. 6
      packages/nc-gui/composables/useColumnCreateStore.ts
  42. 2
      packages/nc-gui/composables/useData.ts
  43. 2
      packages/nc-gui/composables/useExpandedFormStore.ts
  44. 2
      packages/nc-gui/composables/useKanbanViewStore.ts
  45. 2
      packages/nc-gui/composables/useLTARStore.ts
  46. 2
      packages/nc-gui/composables/useMapViewDataStore.ts
  47. 2
      packages/nc-gui/composables/useMetas.ts
  48. 2
      packages/nc-gui/composables/useMultiSelect/index.ts
  49. 2
      packages/nc-gui/composables/useSharedFormViewStore.ts
  50. 2
      packages/nc-gui/composables/useSmartsheetRowStore.ts
  51. 12
      packages/nc-gui/composables/useSmartsheetStore.ts
  52. 2
      packages/nc-gui/composables/useTable.ts
  53. 2
      packages/nc-gui/composables/useTableNew.ts
  54. 2
      packages/nc-gui/composables/useViewColumns.ts
  55. 2
      packages/nc-gui/composables/useViewData.ts
  56. 2
      packages/nc-gui/composables/useViewFilters.ts
  57. 2
      packages/nc-gui/composables/useViewSorts.ts
  58. 2
      packages/nc-gui/lib/types.ts
  59. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index.vue
  60. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue
  61. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/index.vue
  62. 2
      packages/nc-gui/pages/index/[typeOrId]/shared/[erdUuid]/index.vue
  63. 6
      packages/nc-gui/pages/projects/index/list.vue
  64. 4
      packages/nc-gui/store/base.ts
  65. 6
      packages/nc-gui/store/bases.ts
  66. 2
      packages/nc-gui/store/tab.ts
  67. 2
      packages/nc-gui/store/workspace.ts

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

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

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

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

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

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

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

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

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

@ -2,7 +2,7 @@
import { nextTick } from '@vue/runtime-core'
import { message } from 'ant-design-vue'
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 { useTitle } from '@vueuse/core'
import {
@ -424,17 +424,13 @@ const projectDelete = () => {
<div class="flex items-center mr-1" @click="onProjectClick(base)">
<div class="flex items-center select-none w-6 h-full">
<a-spin
v-if="base.isLoading"
class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8"
:indicator="indicator"
/>
<a-spin v-if="base.isLoading" class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8" :indicator="indicator" />
<LazyGeneralEmojiPicker
v-else
:key="base.meta?.icon"
:emoji="base.meta?.icon"
v-e="['c:base:emojiSelect']"
:emoji="base.meta?.icon"
:readonly="true"
size="small"
@emoji-selected="setIcon($event, base)"
@ -517,8 +513,8 @@ const projectDelete = () => {
<NcMenuItem
v-if="!isEeUI"
key="copy"
data-testid="nc-sidebar-base-copy-base-info"
v-e="['c:base:copy-proj-info']"
data-testid="nc-sidebar-base-copy-base-info"
@click.stop="copyProjectInfo"
>
<GeneralIcon icon="copy" class="group-hover:text-black" />
@ -622,8 +618,8 @@ const projectDelete = () => {
<a-collapse
v-else-if="source && source.enabled"
v-model:activeKey="activeKey"
class="!mx-0 !px-0 nc-sidebar-source-node"
v-e="['c:source:toggle-expand']"
class="!mx-0 !px-0 nc-sidebar-source-node"
:class="[{ hidden: searchActive && !!filterQuery }]"
expand-icon-position="left"
:bordered="false"
@ -743,7 +739,11 @@ const projectDelete = () => {
<template v-else-if="contextMenuTarget.type === 'source'"></template>
<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">
<GeneralIcon icon="edit" class="text-gray-700" />
{{ $t('general.rename') }}

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

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

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

@ -16,10 +16,10 @@ import {
ref,
resolveComponent,
storeToRefs,
useDialog,
useNuxtApp,
useBase,
useBases,
useDialog,
useNuxtApp,
useRoles,
useTablesStore,
useTabs,

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

@ -1,7 +1,7 @@
<script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
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()

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

@ -1,7 +1,7 @@
<script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
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 {
sourceId: string

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

@ -1,7 +1,7 @@
<script setup lang="ts">
import Draggable from 'vuedraggable'
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 {
state: string
@ -416,7 +416,7 @@ const isEditBaseModalOpen = computed({
<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-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>

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

@ -1,5 +1,5 @@
<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<{
sourceId: string

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

@ -1,7 +1,7 @@
<script setup lang="ts">
import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface'
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()

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

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

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

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

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

@ -8,6 +8,7 @@ import {
ClientType,
ProjectIdInj,
SSLUsage,
baseTitleValidator,
clientTypes,
computed,
extractSdkResponseErrorMsg,
@ -16,7 +17,6 @@ import {
getTestDatabaseName,
iconMap,
onMounted,
baseTitleValidator,
readFile,
ref,
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">
<h1 class="prose-2xl font-bold self-start">{{ $t('activity.editSource') }}</h1>
<a-form
ref="form"
:model="formState"
name="external-base-create-form"
layout="horizontal"
no-style
:label-col="{ span: 8 }"
>
<a-form ref="form" :model="formState" name="external-base-create-form" layout="horizontal" no-style :label-col="{ span: 8 }">
<div
class="nc-scrollbar-md"
:style="{

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

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

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

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

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

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

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

@ -1,5 +1,5 @@
<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 {
uuid?: string
@ -20,7 +20,9 @@ const sharedBase = ref<null | ShareBase>(null)
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 () => {
try {

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

@ -1,8 +1,8 @@
<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 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({
sourceId: {
@ -93,7 +93,9 @@ watch(config, populateTables, {
const filteredTables = computed(() =>
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>
import { iconMap, ref, storeToRefs, useGlobal, useBase, useRoute } from '#imports'
import { iconMap, ref, storeToRefs, useBase, useGlobal, useRoute } from '#imports'
const showDrawer = ref(false)

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

@ -1,5 +1,5 @@
<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()

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

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

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

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

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

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

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

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

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

@ -14,12 +14,12 @@ import {
onMounted,
ref,
uiTypes,
useBase,
useColumnCreateStoreOrThrow,
useGlobal,
useI18n,
useMetas,
useNuxtApp,
useBase,
watchEffect,
} from '#imports'
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 type { ColumnType, LinkToAnotherRecordType, TableType } 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<{
value: any

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

@ -2,7 +2,7 @@
import { onMounted } from '@vue/runtime-core'
import type { ColumnType, LinkToAnotherRecordType, TableType, UITypes } 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<{
value: any

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

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

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

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

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

@ -12,9 +12,9 @@ import {
message,
ref,
storeToRefs,
useBase,
useI18n,
useNuxtApp,
useBase,
useRoles,
useSharedView,
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 tinycolor from 'tinycolor2'
import {
baseThemeColors,
computed,
extractSdkResponseErrorMsg,
iconMap,
isRtlLang,
message,
baseThemeColors,
ref,
storeToRefs,
useBase,
useCopy,
useDashboard,
useI18n,
useNuxtApp,
useBase,
useRoles,
useSmartsheetStoreOrThrow,
watch,

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

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

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

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

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

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

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

@ -5,11 +5,11 @@ import {
message,
onMounted,
storeToRefs,
useBase,
useCopy,
useDashboard,
useI18n,
useNuxtApp,
useBase,
} from '#imports'
interface ShareBase {
@ -37,7 +37,9 @@ const { base } = storeToRefs(useBase())
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 () => {
try {
@ -201,7 +203,10 @@ onMounted(() => {
</a-select-option>
</a-select>
</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>
<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,
storeToRefs,
useActiveKeyupListener,
useBase,
useCopy,
useDashboard,
useI18n,
useNuxtApp,
useBase,
} from '#imports'
import type { User, Users } from '#imports'

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

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

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

@ -11,10 +11,10 @@ import {
message,
ref,
storeToRefs,
useBase,
useI18n,
useMetas,
useNuxtApp,
useBase,
watch,
} 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 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]))

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

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

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

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

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

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

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

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

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

@ -1,6 +1,6 @@
import type { ComputedRef, Ref } from 'vue'
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'
const formatData = (list: Record<string, any>[]) =>

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

@ -1,7 +1,7 @@
import { message } from 'ant-design-vue'
import type { WatchStopHandle } from 'vue'
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() {
const { $api } = useNuxtApp()

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,7 +1,7 @@
import { ViewTypes, isSystemColumn } from 'nocodb-sdk'
import type { ColumnType, MapType, TableType, ViewType } from 'nocodb-sdk'
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'
export function useViewColumns(

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

@ -12,10 +12,10 @@ import {
ref,
storeToRefs,
useApi,
useBase,
useGlobal,
useI18n,
useNuxtApp,
useBase,
useRoles,
useRouter,
useSharedView,

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

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

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

@ -10,8 +10,8 @@ import {
message,
ref,
storeToRefs,
useNuxtApp,
useBase,
useNuxtApp,
useRoles,
useSharedView,
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 { Theme as AntTheme } from 'ant-design-vue/es/config-provider'
import type { UploadFile } from 'ant-design-vue'

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

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

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

@ -1,6 +1,6 @@
<script setup lang="ts">
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 baseStore = useBase()

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

@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { UploadChangeParam, UploadFile } from 'ant-design-vue'
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 { base } = storeToRefs(baseStore)

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

@ -1,6 +1,6 @@
<script setup lang="ts">
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({
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>{{ base.updated_at }}</div>
<div class="flex justify-center">
<component
:is="iconMap.delete"
class="text-gray-500 hover:text-red-500 mr-2"
@click.stop="emit('delete-base', base)"
/>
<component :is="iconMap.delete" class="text-gray-500 hover:text-red-500 mr-2" @click.stop="emit('delete-base', base)" />
<component
:is="iconMap.edit"
class="text-gray-500 hover:text-primary mr-2"

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 { isString } from '@vue/shared'
import { acceptHMRUpdate, defineStore } from 'pinia'
@ -8,9 +8,9 @@ import {
createEventHook,
ref,
useApi,
useBases,
useCommandPalette,
useNuxtApp,
useBases,
useRoles,
useRouter,
useTheme,

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

@ -1,5 +1,5 @@
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 { isString } from '@vue/shared'
import { useWorkspace } from '#imports'
@ -11,9 +11,7 @@ export const useBases = defineStore('basesStore', () => {
const bases = ref<Map<string, NcProject>>(new Map())
const basesList = computed<NcProject[]>(() =>
Array.from(bases.value.values()).sort((a, b) => a.updated_at - b.updated_at),
)
const basesList = computed<NcProject[]>(() => Array.from(bases.value.values()).sort((a, b) => a.updated_at - b.updated_at))
const router = useRouter()
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 { defineStore } from 'pinia'
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 { message } from 'ant-design-vue'
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'
export const useWorkspace = defineStore('workspaceStore', () => {

Loading…
Cancel
Save