Browse Source

Merge branch 'develop' into test/shardx2

test/shardx2
Raju Udava 1 year ago
parent
commit
5f9e59d58b
  1. 16
      packages/nc-gui/assets/nc-icons/bt-solid.svg
  2. 16
      packages/nc-gui/assets/nc-icons/hm-solid.svg
  3. 10
      packages/nc-gui/assets/nc-icons/mm-solid.svg
  4. 2
      packages/nc-gui/components/cell/MultiSelect.vue
  5. 2
      packages/nc-gui/components/cell/SingleSelect.vue
  6. 2
      packages/nc-gui/components/cell/attachment/utils.ts
  7. 15
      packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
  8. 2
      packages/nc-gui/components/dashboard/TreeView/BaseOptions.vue
  9. 41
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  10. 2
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue
  11. 9
      packages/nc-gui/components/dashboard/TreeView/ViewsList.vue
  12. 6
      packages/nc-gui/components/dashboard/TreeView/index.vue
  13. 2
      packages/nc-gui/components/dashboard/settings/AuditTab.vue
  14. 2
      packages/nc-gui/components/dashboard/settings/BaseAudit.vue
  15. 2
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  16. 2
      packages/nc-gui/components/dashboard/settings/Metadata.vue
  17. 2
      packages/nc-gui/components/dashboard/settings/Misc.vue
  18. 2
      packages/nc-gui/components/dashboard/settings/UIAcl.vue
  19. 13
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  20. 15
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue
  21. 2
      packages/nc-gui/components/dlg/AirtableImport.vue
  22. 2
      packages/nc-gui/components/dlg/QuickImport.vue
  23. 2
      packages/nc-gui/components/dlg/TableRename.vue
  24. 2
      packages/nc-gui/components/dlg/ViewCreate.vue
  25. 6
      packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
  26. 8
      packages/nc-gui/components/erd/View.vue
  27. 2
      packages/nc-gui/components/general/HelpAndSupport.vue
  28. 2
      packages/nc-gui/components/general/MiniSidebar.vue
  29. 2
      packages/nc-gui/components/shared-view/Grid.vue
  30. 2
      packages/nc-gui/components/smartsheet/ApiSnippet.vue
  31. 2
      packages/nc-gui/components/smartsheet/Cell.vue
  32. 2
      packages/nc-gui/components/smartsheet/Topbar.vue
  33. 2
      packages/nc-gui/components/smartsheet/column/AdvancedOptions.vue
  34. 2
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  35. 2
      packages/nc-gui/components/smartsheet/column/LookupOptions.vue
  36. 2
      packages/nc-gui/components/smartsheet/column/RollupOptions.vue
  37. 2
      packages/nc-gui/components/smartsheet/details/Api.vue
  38. 2
      packages/nc-gui/components/smartsheet/details/Fields.vue
  39. 3
      packages/nc-gui/components/smartsheet/grid/Table.vue
  40. 2
      packages/nc-gui/components/smartsheet/header/Cell.vue
  41. 2
      packages/nc-gui/components/smartsheet/header/VirtualCell.vue
  42. 18
      packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts
  43. 2
      packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue
  44. 2
      packages/nc-gui/components/smartsheet/toolbar/MoreActions.vue
  45. 4
      packages/nc-gui/components/smartsheet/toolbar/ShareView.vue
  46. 2
      packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue
  47. 2
      packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue
  48. 2
      packages/nc-gui/components/tabs/auth/UserManagement.vue
  49. 15
      packages/nc-gui/components/tabs/auth/user-management/ShareBase.vue
  50. 2
      packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue
  51. 6
      packages/nc-gui/components/template/Editor.vue
  52. 11
      packages/nc-gui/components/virtual-cell/components/Header.vue
  53. 2
      packages/nc-gui/components/workspace/CreateProjectDlg.vue
  54. 6
      packages/nc-gui/composables/useColumnCreateStore.ts
  55. 2
      packages/nc-gui/composables/useData.ts
  56. 2
      packages/nc-gui/composables/useExpandedFormStore.ts
  57. 2
      packages/nc-gui/composables/useKanbanViewStore.ts
  58. 2
      packages/nc-gui/composables/useLTARStore.ts
  59. 2
      packages/nc-gui/composables/useMapViewDataStore.ts
  60. 2
      packages/nc-gui/composables/useMetas.ts
  61. 2
      packages/nc-gui/composables/useMultiSelect/index.ts
  62. 2
      packages/nc-gui/composables/useSharedFormViewStore.ts
  63. 2
      packages/nc-gui/composables/useSmartsheetRowStore.ts
  64. 12
      packages/nc-gui/composables/useSmartsheetStore.ts
  65. 2
      packages/nc-gui/composables/useTable.ts
  66. 2
      packages/nc-gui/composables/useTableNew.ts
  67. 2
      packages/nc-gui/composables/useViewColumns.ts
  68. 4
      packages/nc-gui/composables/useViewData.ts
  69. 2
      packages/nc-gui/composables/useViewFilters.ts
  70. 2
      packages/nc-gui/composables/useViewSorts.ts
  71. 2
      packages/nc-gui/lib/types.ts
  72. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index.vue
  73. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue
  74. 2
      packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/index.vue
  75. 2
      packages/nc-gui/pages/index/[typeOrId]/shared/[erdUuid]/index.vue
  76. 6
      packages/nc-gui/pages/projects/index/list.vue
  77. 2
      packages/nc-gui/pages/signin.vue
  78. 4
      packages/nc-gui/store/base.ts
  79. 6
      packages/nc-gui/store/bases.ts
  80. 2
      packages/nc-gui/store/tab.ts
  81. 2
      packages/nc-gui/store/workspace.ts
  82. 16
      packages/nc-gui/utils/iconUtils.ts
  83. 4
      tests/playwright/pages/Dashboard/Grid/index.ts

16
packages/nc-gui/assets/nc-icons/bt-solid.svg

@ -0,0 +1,16 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_27)">
<path d="M13 10C11.8954 10 11 9.10457 11 8C11 6.89543 11.8954 6 13 6C14.1046 6 15 6.89543 15 8C15 9.10457 14.1046 10 13 10Z" stroke="#36BFFF" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 10C1.89543 10 1 9.10457 1 8C1 6.89543 1.89543 6 3 6C4.10457 6 5 6.89543 5 8C5 9.10457 4.10457 10 3 10Z" stroke="#36BFFF" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7 15C5.89543 15 5 14.1046 5 13C5 11.8954 5.89543 11 7 11C8.10457 11 9 11.8954 9 13C9 14.1046 8.10457 15 7 15Z" stroke="#36BFFF" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7 5C5.89543 5 5 4.10457 5 3C5 1.89543 5.89543 1 7 1C8.10457 1 9 1.89543 9 3C9 4.10457 8.10457 5 7 5Z" stroke="#36BFFF" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5 8L11 8" stroke="#36BFFF" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 4L11 6" stroke="#36BFFF" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M9 12L11 10" stroke="#36BFFF" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_1_27">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

16
packages/nc-gui/assets/nc-icons/hm-solid.svg

@ -0,0 +1,16 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_19)">
<path d="M3 10C4.10457 10 5 9.10457 5 8C5 6.89543 4.10457 6 3 6C1.89543 6 1 6.89543 1 8C1 9.10457 1.89543 10 3 10Z" stroke="#FA8231" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M13 10C14.1046 10 15 9.10457 15 8C15 6.89543 14.1046 6 13 6C11.8954 6 11 6.89543 11 8C11 9.10457 11.8954 10 13 10Z" stroke="#FA8231" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 15C10.1046 15 11 14.1046 11 13C11 11.8954 10.1046 11 9 11C7.89543 11 7 11.8954 7 13C7 14.1046 7.89543 15 9 15Z" stroke="#FA8231" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 5C10.1046 5 11 4.10457 11 3C11 1.89543 10.1046 1 9 1C7.89543 1 7 1.89543 7 3C7 4.10457 7.89543 5 9 5Z" stroke="#FA8231" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11 8L5 8" stroke="#FA8231" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7 4L5 6" stroke="#FA8231" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M7 12L5 10" stroke="#FA8231" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_1_19">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

10
packages/nc-gui/assets/nc-icons/mm-solid.svg

@ -0,0 +1,10 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 6C10.8954 6 10 5.10457 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 5.10457 13.1046 6 12 6Z" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14Z" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 14C2.89543 14 2 13.1046 2 12C2 10.8954 2.89543 10 4 10C5.10457 10 6 10.8954 6 12C6 13.1046 5.10457 14 4 14Z" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 6C2.89543 6 2 5.10457 2 4C2 2.89543 2.89543 2 4 2C5.10457 2 6 2.89543 6 4C6 5.10457 5.10457 6 4 6Z" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.5 10.5L10.5 5.5" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M5.5 5.5L10.5 10.5" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M6 4L10 4" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M6 12L10 12" stroke="#FC3AC6" stroke-width="1.33333" stroke-linecap="square" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

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'

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

@ -1,12 +1,23 @@
<script lang="ts" setup>
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()
// So watcher in users store is triggered
useUsers()
const { clearWorkspaces } = useWorkspace()
const { leftSidebarState } = storeToRefs(useSidebarStore())
const { copy } = useCopy(true)

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

41
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 {
@ -10,10 +10,27 @@ import {
ProjectInj,
ProjectRoleInj,
ToggleDialogInj,
TreeViewInj,
computed,
extractSdkResponseErrorMsg,
h,
inject,
navigateTo,
openLink,
ref,
resolveComponent,
storeToRefs,
useBase,
useBases,
useCopy,
useDialog,
useGlobal,
useI18n,
useRoles,
useRouter,
useTablesStore,
useTabs,
useToggle,
} from '#imports'
import type { NcProject } from '#imports'
import { useNuxtApp } from '#app'
@ -27,10 +44,10 @@ const indicator = h(LoadingOutlined, {
})
const router = useRouter()
const route = router.currentRoute
const { isSharedBase } = storeToRefs(useBase())
const { projectUrl } = useBase()
const { setMenuContext, openRenameTableDialog, duplicateTable, contextMenuTarget } = inject(TreeViewInj)!
@ -41,9 +58,11 @@ const basesStore = useBases()
const { isMobileMode } = useGlobal()
const { loadProject, loadProjects, createProject: _createProject, updateProject, getProjectMetaInfo } = basesStore
const { bases } = storeToRefs(basesStore)
const { loadProjectTables } = useTablesStore()
const { activeTable } = storeToRefs(useTablesStore())
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 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 +532,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 +637,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 +758,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)"
>

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

@ -5,7 +5,6 @@ import type { SortableEvent } from 'sortablejs'
import Sortable from 'sortablejs'
import type { Menu as AntMenu } from 'ant-design-vue'
import {
isDefaultBase as _isDefaultBase,
extractSdkResponseErrorMsg,
message,
onMounted,
@ -36,14 +35,8 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const { isMobileMode } = useGlobal()
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())

6
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,
@ -68,7 +68,7 @@ const setMenuContext = (type: 'base' | 'source' | 'table' | 'main' | 'layout', v
contextMenuTarget.value = value
}
function openRenameTableDialog(table: TableType, rightClick = false) {
function openRenameTableDialog(table: TableType, _ = false) {
if (!table || !table.source_id) return
$e('c:table:rename')

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

2
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

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<{

13
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="{
@ -631,7 +624,7 @@ watch(
size="small"
type="primary"
:disabled="!testSuccess"
:loading="creatingBase"
:loading="creatingSource"
class="nc-extdb-btn-submit !rounded-md"
@click="createSource"
>

15
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,
@ -53,7 +53,7 @@ const { $e } = useNuxtApp()
const { t } = useI18n()
const editingBase = ref(false)
const editingSource = ref(false)
const formState = ref<ProjectCreateForm>({
title: '',
@ -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="{
@ -566,7 +559,7 @@ onMounted(async () => {
size="small"
type="primary"
:disabled="!testSuccess"
:loading="editingBase"
:loading="editingSource"
@click="editBase"
>
{{ $t('general.submit') }}

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,

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

@ -2,7 +2,7 @@
import type { ComponentPublicInstance } from '@vue/runtime-core'
import type { Form as AntForm, SelectProps } from 'ant-design-vue'
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 { 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">
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/Topbar.vue

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

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/details/Fields.vue

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

3
packages/nc-gui/components/smartsheet/grid/Table.vue

@ -171,8 +171,6 @@ const tableBodyEl = ref<HTMLElement>()
const fillHandle = ref<HTMLElement>()
const cellRefs = ref<{ el: HTMLElement }[]>([])
const gridRect = useElementBounding(gridWrapper)
// #Permissions
@ -1414,7 +1412,6 @@ const handleCellClick = (event: MouseEvent, row: number, col: number) => {
<SmartsheetTableDataCell
v-for="(columnObj, colIndex) of fields"
:key="columnObj.id"
ref="cellRefs"
class="cell relative nc-grid-cell"
:class="{
'cursor-pointer': hasEditPermission,

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

@ -75,7 +75,7 @@ const openDropDown = () => {
v-if="column"
class="name pl-1"
:class="{ 'cursor-pointer pt-0.25': !isForm && isUIAllowed('fieldEdit') && !hideMenu }"
:title="column.title"
:data-test-id="column.title"
>
{{ column.title }}
</div>

2
packages/nc-gui/components/smartsheet/header/VirtualCell.vue

@ -137,7 +137,7 @@ const closeAddColumnDropdown = () => {
<span
class="name pl-1"
:class="{ 'truncate': !isForm || !isExpandedForm, 'whitespace-pre-line': isForm || isExpandedForm }"
:title="column.title"
:data-test-id="column.title"
>
{{ column.title }}
</span>

18
packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

@ -25,11 +25,11 @@ const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => {
case UITypes.Links:
switch ((column.colOptions as LinkToAnotherRecordType)?.type) {
case RelationTypes.MANY_TO_MANY:
return { icon: iconMap.mm, color: 'text-accent' }
return { icon: iconMap.mm_solid }
case RelationTypes.HAS_MANY:
return { icon: iconMap.hm, color: 'text-yellow-500' }
return { icon: iconMap.hm_solid }
case RelationTypes.BELONGS_TO:
return { icon: iconMap.bt, color: 'text-sky-500' }
return { icon: iconMap.bt_solid }
}
break
case UITypes.SpecificDBType:
@ -43,21 +43,21 @@ const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => {
case UITypes.Lookup:
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) {
case RelationTypes.MANY_TO_MANY:
return { icon: iconMap.lookup, color: 'text-accent' }
return { icon: iconMap.lookup, color: 'text-pink-500' }
case RelationTypes.HAS_MANY:
return { icon: iconMap.lookup, color: 'text-yellow-500' }
return { icon: iconMap.lookup, color: 'text-orange-500' }
case RelationTypes.BELONGS_TO:
return { icon: iconMap.lookup, color: 'text-sky-500' }
return { icon: iconMap.lookup, color: 'text-blue-500' }
}
return { icon: iconMap.lookup, color: 'text-grey' }
case UITypes.Rollup:
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) {
case RelationTypes.MANY_TO_MANY:
return { icon: iconMap.rollup, color: 'text-accent' }
return { icon: iconMap.rollup, color: 'text-pink-500' }
case RelationTypes.HAS_MANY:
return { icon: iconMap.rollup, color: 'text-yellow-500' }
return { icon: iconMap.rollup, color: 'text-orange-500' }
case RelationTypes.BELONGS_TO:
return { icon: iconMap.rollup, color: 'text-sky-500' }
return { icon: iconMap.rollup, color: 'text-blue-500' }
}
return { icon: iconMap.rollup, color: 'text-grey' }
case UITypes.Count:

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'

15
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 {
@ -89,11 +91,11 @@ const recreate = async () => {
try {
if (!base.value.id) return
const sharedBase = await $api.base.sharedBaseCreate(base.value.id, {
const createdShareBase = await $api.base.sharedBaseCreate(base.value.id, {
roles: sharedBase.value?.role || ShareBaseRole.Viewer,
})
const newBase = sharedBase || {}
const newBase = createdShareBase || {}
sharedBase.value = { ...newBase, role: sharedBase.value?.role }
} catch (e: any) {
@ -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() {

11
packages/nc-gui/components/virtual-cell/components/Header.vue

@ -1,11 +1,10 @@
<script lang="ts" setup>
import HasManyIcon from '~icons/nc-icons/hasmany'
import ManytoManyIcon from '~icons/nc-icons/manytomany'
import OnetoOneIcon from '~icons/nc-icons/onetoone'
import BelongsToIcon from '~icons/nc-icons/belongsto'
import InfoIcon from '~icons/nc-icons/info'
import FileIcon from '~icons/nc-icons/file'
import { iconMap } from '#imports'
const { relation, relatedTableTitle, displayValue, showHeader, tableTitle } = defineProps<{
relation: string
showHeader?: boolean
@ -20,14 +19,14 @@ const relationMeta = computed(() => {
if (relation === 'hm') {
return {
title: t('msg.hm.title'),
icon: HasManyIcon,
icon: iconMap.hm,
tooltip_desc: t('msg.hm.tooltip_desc'),
tooltip_desc2: t('msg.hm.tooltip_desc2'),
}
} else if (relation === 'mm') {
return {
title: t('msg.mm.title'),
icon: ManytoManyIcon,
icon: iconMap.mm,
tooltip_desc: t('msg.mm.tooltip_desc'),
tooltip_desc2: t('msg.mm.tooltip_desc2'),
@ -35,7 +34,7 @@ const relationMeta = computed(() => {
} else if (relation === 'bt') {
return {
title: t('msg.bt.title'),
icon: BelongsToIcon,
icon: iconMap.bt,
tooltip_desc: t('msg.bt.tooltip_desc'),
tooltip_desc2: t('msg.bt.tooltip_desc2'),
}

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(

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

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

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"

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

@ -26,8 +26,6 @@ const { t } = useI18n()
useSidebar('nc-left-sidebar', { hasSidebar: false })
const { clearWorkspaces } = useWorkspace()
const formValidator = ref()
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 { 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', () => {

16
packages/nc-gui/utils/iconUtils.ts

@ -89,6 +89,13 @@ import MdiCommentAccountOutline from '~icons/mdi/comment-account-outline'
import MaterialSymbolsPersonSearchOutline from '~icons/material-symbols/person-search-outline'
import MaterialSymbolsBlock from '~icons/material-symbols/block'
import HasManyIcon from '~icons/nc-icons/hasmany'
import ManytoManyIcon from '~icons/nc-icons/manytomany'
import BelongsToIcon from '~icons/nc-icons/belongsto'
import HasManySolidIcon from '~icons/nc-icons/hm-solid'
import ManytoManySolidIcon from '~icons/nc-icons/mm-solid'
import BelongsToSolidIcon from '~icons/nc-icons/bt-solid'
// keep it for reference
// todo: remove it after all icons are migrated
/* export const iconMapOld = {
@ -237,6 +244,12 @@ import MaterialSymbolsBlock from '~icons/material-symbols/block'
} as const */
export const iconMap = {
mm: ManytoManyIcon,
hm: HasManyIcon,
bt: BelongsToIcon,
mm_solid: ManytoManySolidIcon,
hm_solid: HasManySolidIcon,
bt_solid: BelongsToSolidIcon,
workspaceDefault: MsGroup,
search: NcSearch,
error: h('span', { class: 'material-symbols' }, 'error'),
@ -393,9 +406,6 @@ export const iconMap = {
closeBox: h('span', { class: 'material-symbols' }, 'close'),
close: MSCloseRounded,
openInNew: h('span', { class: 'material-symbols' }, 'open_in_new'),
mm: h('span', { class: 'material-symbols' }, 'table_rows'),
hm: h('span', { class: 'material-symbols' }, 'table_rows'),
bt: h('span', { class: 'material-symbols' }, 'subdirectory_arrow_right'),
passwordChange: h('span', { class: 'material-symbols' }, 'vpn_key'),
mapMarker: h('span', { class: 'material-symbols' }, 'room'),
currentLocation: h('span', { class: 'material-symbols' }, 'my_location'),

4
tests/playwright/pages/Dashboard/Grid/index.ts

@ -129,7 +129,7 @@ export class GridPage extends BasePage {
await this._fillRow({ index, columnHeader, value: rowValue });
const clickOnColumnHeaderToSave = () =>
this.get().locator(`[data-title="${columnHeader}"]`).locator(`div[title="${columnHeader}"]`).click();
this.get().locator(`[data-title="${columnHeader}"]`).locator(`div[data-test-id="${columnHeader}"]`).click();
if (networkValidation) {
await this.waitForResponse({
@ -161,7 +161,7 @@ export class GridPage extends BasePage {
await this._fillRow({ index, columnHeader, value });
const clickOnColumnHeaderToSave = () =>
this.get().locator(`[data-title="${columnHeader}"]`).locator(`div[title="${columnHeader}"]`).click();
this.get().locator(`[data-title="${columnHeader}"]`).locator(`div[data-test-id="${columnHeader}"]`).click();
if (networkValidation) {
await this.waitForResponse({

Loading…
Cancel
Save