Browse Source

fix: experimental frontend optimizations (#8427)

* fix: get rid of barrel files

* chore: get rid of explicit imports

* fix: use explicit import for classes and enums

* fix: use explicit import for enum & class & aliases

* fix: build issues
pull/8433/head
Mert E 7 months ago committed by GitHub
parent
commit
89f0895de3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      packages/nc-gui/app.vue
  2. 2
      packages/nc-gui/components/account/License.vue
  3. 2
      packages/nc-gui/components/account/ResetPassword.vue
  4. 1
      packages/nc-gui/components/account/SignupSettings.vue
  5. 1
      packages/nc-gui/components/account/Token.vue
  6. 11
      packages/nc-gui/components/account/UserList.vue
  7. 14
      packages/nc-gui/components/account/UsersModal.vue
  8. 2
      packages/nc-gui/components/api-client/Headers.vue
  9. 2
      packages/nc-gui/components/api-client/Params.vue
  10. 15
      packages/nc-gui/components/cell/Checkbox.vue
  11. 12
      packages/nc-gui/components/cell/Currency.vue
  12. 18
      packages/nc-gui/components/cell/DatePicker.vue
  13. 13
      packages/nc-gui/components/cell/DateTimePicker.vue
  14. 1
      packages/nc-gui/components/cell/Decimal.vue
  15. 15
      packages/nc-gui/components/cell/Duration.vue
  16. 11
      packages/nc-gui/components/cell/Email.vue
  17. 1
      packages/nc-gui/components/cell/Float.vue
  18. 2
      packages/nc-gui/components/cell/GeoData.vue
  19. 1
      packages/nc-gui/components/cell/Integer.vue
  20. 14
      packages/nc-gui/components/cell/Json.vue
  21. 29
      packages/nc-gui/components/cell/MultiSelect.vue
  22. 1
      packages/nc-gui/components/cell/Percent.vue
  23. 1
      packages/nc-gui/components/cell/PhoneNumber.vue
  24. 11
      packages/nc-gui/components/cell/Rating.vue
  25. 2
      packages/nc-gui/components/cell/ReadOnlyDateTimePicker.vue
  26. 2
      packages/nc-gui/components/cell/ReadOnlyUser.vue
  27. 13
      packages/nc-gui/components/cell/RichText.vue
  28. 24
      packages/nc-gui/components/cell/SingleSelect.vue
  29. 11
      packages/nc-gui/components/cell/Text.vue
  30. 18
      packages/nc-gui/components/cell/TextArea.vue
  31. 1
      packages/nc-gui/components/cell/TimePicker.vue
  32. 18
      packages/nc-gui/components/cell/Url.vue
  33. 23
      packages/nc-gui/components/cell/User.vue
  34. 1
      packages/nc-gui/components/cell/YearPicker.vue
  35. 1
      packages/nc-gui/components/cell/attachment/Carousel.vue
  36. 2
      packages/nc-gui/components/cell/attachment/Image.vue
  37. 1
      packages/nc-gui/components/cell/attachment/Modal.vue
  38. 2
      packages/nc-gui/components/cell/attachment/RenameFile.vue
  39. 21
      packages/nc-gui/components/cell/attachment/index.vue
  40. 1
      packages/nc-gui/components/cell/attachment/sort.ts
  41. 24
      packages/nc-gui/components/cell/attachment/utils.ts
  42. 2
      packages/nc-gui/components/cmd-footer/index.vue
  43. 3
      packages/nc-gui/components/cmd-k/index.vue
  44. 3
      packages/nc-gui/components/cmd-l/index.vue
  45. 2
      packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
  46. 1
      packages/nc-gui/components/dashboard/TreeView/AddNewTableNode.vue
  47. 31
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  48. 1
      packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue
  49. 1
      packages/nc-gui/components/dashboard/TreeView/TableList.vue
  50. 3
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue
  51. 16
      packages/nc-gui/components/dashboard/TreeView/ViewsList.vue
  52. 13
      packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue
  53. 20
      packages/nc-gui/components/dashboard/TreeView/index.vue
  54. 2
      packages/nc-gui/components/dashboard/settings/AppStore.vue
  55. 1
      packages/nc-gui/components/dashboard/settings/AuditTab.vue
  56. 1
      packages/nc-gui/components/dashboard/settings/BaseAudit.vue
  57. 2
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  58. 2
      packages/nc-gui/components/dashboard/settings/Metadata.vue
  59. 1
      packages/nc-gui/components/dashboard/settings/Misc.vue
  60. 1
      packages/nc-gui/components/dashboard/settings/Modal.vue
  61. 15
      packages/nc-gui/components/dashboard/settings/UIAcl.vue
  62. 1
      packages/nc-gui/components/dashboard/settings/app-store/AppInstall.vue
  63. 24
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  64. 24
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue
  65. 15
      packages/nc-gui/components/dlg/AirtableImport.vue
  66. 1
      packages/nc-gui/components/dlg/ColumnDuplicate.vue
  67. 7
      packages/nc-gui/components/dlg/InviteDlg.vue
  68. 2
      packages/nc-gui/components/dlg/KeyboardShortcuts.vue
  69. 1
      packages/nc-gui/components/dlg/ProjectDuplicate.vue
  70. 32
      packages/nc-gui/components/dlg/QuickImport.vue
  71. 1
      packages/nc-gui/components/dlg/SharedBaseDuplicate.vue
  72. 15
      packages/nc-gui/components/dlg/TableCreate.vue
  73. 1
      packages/nc-gui/components/dlg/TableDuplicate.vue
  74. 19
      packages/nc-gui/components/dlg/TableRename.vue
  75. 1
      packages/nc-gui/components/dlg/ViewCreate.vue
  76. 2
      packages/nc-gui/components/dlg/ViewDelete.vue
  77. 1
      packages/nc-gui/components/dlg/share-and-collaborate/ManageUsers.vue
  78. 12
      packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
  79. 1
      packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
  80. 1
      packages/nc-gui/components/erd/ConfigPanel.vue
  81. 1
      packages/nc-gui/components/erd/Flow.vue
  82. 1
      packages/nc-gui/components/erd/HistogramPanel.vue
  83. 1
      packages/nc-gui/components/erd/RelationEdge.vue
  84. 1
      packages/nc-gui/components/erd/TableNode.vue
  85. 1
      packages/nc-gui/components/erd/View.vue
  86. 1
      packages/nc-gui/components/erd/utils.ts
  87. 2
      packages/nc-gui/components/extensions/Details.vue
  88. 2
      packages/nc-gui/components/extensions/Market.vue
  89. 2
      packages/nc-gui/components/general/AddBaseButton.vue
  90. 2
      packages/nc-gui/components/general/ApiLoader.vue
  91. 2
      packages/nc-gui/components/general/BaseIconColorPicker.vue
  92. 1
      packages/nc-gui/components/general/ChromeWrapper.vue
  93. 1
      packages/nc-gui/components/general/ColorPicker.vue
  94. 2
      packages/nc-gui/components/general/DeleteModal.vue
  95. 1
      packages/nc-gui/components/general/EmojiIcons.vue
  96. 2
      packages/nc-gui/components/general/FlippingCard.vue
  97. 4
      packages/nc-gui/components/general/FormBranding.vue
  98. 2
      packages/nc-gui/components/general/FullScreen.vue
  99. 2
      packages/nc-gui/components/general/HelpAndSupport.vue
  100. 2
      packages/nc-gui/components/general/Icon.vue
  101. Some files were not shown because too many files have changed in this diff Show More

3
packages/nc-gui/app.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import ErrorBoundary from './components/nc/ErrorBoundary.vue' import ErrorBoundary from './components/nc/ErrorBoundary.vue'
import { applyNonSelectable, computed, isEeUI, isMac, useCommandPalette, useRouter, useTheme } from '#imports' import type { CommandPaletteType } from '~/lib/types'
import type { CommandPaletteType } from '~/lib'
const router = useRouter() const router = useRouter()

2
packages/nc-gui/components/account/License.vue

@ -1,7 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useNuxtApp } from '#imports'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { extractSdkResponseErrorMsg, useApi, useGlobal } from '#imports'
const { api, isLoading } = useApi() const { api, isLoading } = useApi()

2
packages/nc-gui/components/account/ResetPassword.vue

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { iconMap, message, navigateTo, reactive, ref, useApi, useGlobal, useI18n } from '#imports'
const { api, error } = useApi({ useGlobalInstance: true }) const { api, error } = useApi({ useGlobalInstance: true })
const { t } = useI18n() const { t } = useI18n()

1
packages/nc-gui/components/account/SignupSettings.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { extractSdkResponseErrorMsg, useApi } from '#imports'
const { api } = useApi() const { api } = useApi()

1
packages/nc-gui/components/account/Token.vue

@ -2,7 +2,6 @@
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import type { ApiTokenType, RequestParams } from 'nocodb-sdk' import type { ApiTokenType, RequestParams } from 'nocodb-sdk'
import { extractSdkResponseErrorMsg, isEeUI, ref, useApi, useCopy, useNuxtApp } from '#imports'
import { extractNextDefaultName } from '~/helpers/parsers/parserHelpers' import { extractNextDefaultName } from '~/helpers/parsers/parserHelpers'
const { api, isLoading } = useApi() const { api, isLoading } = useApi()

11
packages/nc-gui/components/account/UserList.vue

@ -1,17 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { OrgUserRoles } from 'nocodb-sdk' import { OrgUserRoles } from 'nocodb-sdk'
import type { OrgUserReqType, RequestParams, UserType } from 'nocodb-sdk' import type { OrgUserReqType, RequestParams, UserType } from 'nocodb-sdk'
import type { User } from '#imports'
import {
extractSdkResponseErrorMsg,
iconMap,
useApi,
useCopy,
useDashboard,
useDebounceFn,
useNuxtApp,
useUserSorts,
} from '#imports'
const { api, isLoading } = useApi() const { api, isLoading } = useApi()

14
packages/nc-gui/components/account/UsersModal.vue

@ -2,20 +2,6 @@
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import type { OrgUserReqType } from 'nocodb-sdk' import type { OrgUserReqType } from 'nocodb-sdk'
import { OrgUserRoles } from 'nocodb-sdk' import { OrgUserRoles } from 'nocodb-sdk'
import type { User, Users } from '#imports'
import {
Form,
computed,
emailValidator,
extractSdkResponseErrorMsg,
iconMap,
message,
ref,
useCopy,
useDashboard,
useI18n,
useNuxtApp,
} from '#imports'
import { extractEmail } from '~/helpers/parsers/parserHelpers' import { extractEmail } from '~/helpers/parsers/parserHelpers'
interface Props { interface Props {

2
packages/nc-gui/components/api-client/Headers.vue

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { iconMap, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: any[] modelValue: any[]
}>() }>()

2
packages/nc-gui/components/api-client/Params.vue

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { iconMap, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: any[] modelValue: any[]
}>() }>()

15
packages/nc-gui/components/cell/Checkbox.vue

@ -1,19 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import {
ActiveCellInj,
ColumnInj,
EditColumnInj,
IsFormInj,
IsSurveyFormInj,
ReadonlyInj,
getMdiIcon,
inject,
parseProp,
rowHeightInPx,
useBase,
useSelectedCellKeyupListener,
} from '#imports'
interface Props { interface Props {
// If the previous cell value was a text, the initial checkbox value is a string type // If the previous cell value was a text, the initial checkbox value is a string type
// otherwise it can be either a boolean, or a string representing a boolean, i.e '0' or '1' // otherwise it can be either a boolean, or a string representing a boolean, i.e '0' or '1'

12
packages/nc-gui/components/cell/Currency.vue

@ -1,17 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import {
ColumnInj,
EditColumnInj,
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj,
computed,
inject,
parseProp,
useVModel,
} from '#imports'
interface Props { interface Props {
modelValue: number | null | undefined modelValue: number | null | undefined

18
packages/nc-gui/components/cell/DatePicker.vue

@ -1,24 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { isDateMonthFormat, isSystemColumn } from 'nocodb-sdk' import { isDateMonthFormat, isSystemColumn } from 'nocodb-sdk'
import {
ActiveCellInj,
CellClickHookInj,
ColumnInj,
EditColumnInj,
EditModeInj,
ReadonlyInj,
computed,
inject,
onClickOutside,
onMounted,
onUnmounted,
parseProp,
ref,
useGlobal,
useI18n,
watch,
} from '#imports'
interface Props { interface Props {
modelValue?: string | null modelValue?: string | null

13
packages/nc-gui/components/cell/DateTimePicker.vue

@ -1,19 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { dateFormats, isSystemColumn, timeFormats } from 'nocodb-sdk' import { dateFormats, isSystemColumn, timeFormats } from 'nocodb-sdk'
import {
ActiveCellInj,
CellClickHookInj,
ColumnInj,
EditColumnInj,
IsFormInj,
ReadonlyInj,
inject,
parseProp,
ref,
useBase,
watch,
} from '#imports'
interface Props { interface Props {
modelValue?: string | null modelValue?: string | null

1
packages/nc-gui/components/cell/Decimal.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, ReadonlyInj, inject, useVModel } from '#imports'
interface Props { interface Props {
// when we set a number, then it is number type // when we set a number, then it is number type

15
packages/nc-gui/components/cell/Duration.vue

@ -1,20 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import {
ColumnInj,
EditColumnInj,
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj,
computed,
convertDurationToSeconds,
convertMS2Duration,
durationOptions,
inject,
parseProp,
ref,
} from '#imports'
interface Props { interface Props {
modelValue: number | string | null | undefined modelValue: number | string | null | undefined

11
packages/nc-gui/components/cell/Email.vue

@ -1,16 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import {
EditColumnInj,
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj,
computed,
inject,
useI18n,
validateEmail,
} from '#imports'
import { extractEmail } from '~/helpers/parsers/parserHelpers' import { extractEmail } from '~/helpers/parsers/parserHelpers'
interface Props { interface Props {

1
packages/nc-gui/components/cell/Float.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, inject, useVModel } from '#imports'
interface Props { interface Props {
// when we set a number, then it is number type // when we set a number, then it is number type

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

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { GeoLocationType } from 'nocodb-sdk' import type { GeoLocationType } from 'nocodb-sdk'
import { Modal as AModal, iconMap, latLongToJoinedString, useVModel } from '#imports' import { Modal as AModal } from '#imports'
interface Props { interface Props {
modelValue?: string | null modelValue?: string | null

1
packages/nc-gui/components/cell/Integer.vue

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, ReadonlyInj, inject, useVModel } from '#imports'
interface Props { interface Props {
// when we set a number, then it is number type // when we set a number, then it is number type

14
packages/nc-gui/components/cell/Json.vue

@ -1,19 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import NcModal from '../nc/Modal.vue' import NcModal from '../nc/Modal.vue'
import {
ActiveCellInj,
EditModeInj,
IsFormInj,
JsonExpandInj,
ReadonlyInj,
RowHeightInj,
computed,
inject,
ref,
useSelectedCellKeyupListener,
useVModel,
watch,
} from '#imports'
interface Props { interface Props {
modelValue: string | Record<string, any> | undefined modelValue: string | Record<string, any> | undefined

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

@ -3,34 +3,7 @@ import { message } from 'ant-design-vue'
import tinycolor from 'tinycolor2' import tinycolor from 'tinycolor2'
import type { Select as AntSelect } from 'ant-design-vue' import type { Select as AntSelect } from 'ant-design-vue'
import type { SelectOptionType, SelectOptionsType } from 'nocodb-sdk' import type { SelectOptionType, SelectOptionsType } from 'nocodb-sdk'
import type { FormFieldsLimitOptionsType } from '~/lib' import type { FormFieldsLimitOptionsType } from '~/lib/types'
import {
ActiveCellInj,
ColumnInj,
EditColumnInj,
EditModeInj,
IsKanbanInj,
IsSurveyFormInj,
ReadonlyInj,
RowHeightInj,
computed,
enumColor,
extractSdkResponseErrorMsg,
h,
iconMap,
inject,
isDrawerOrModalExist,
onMounted,
reactive,
ref,
rowHeightTruncateLines,
useBase,
useEventListener,
useMetas,
useRoles,
useSelectedCellKeyupListener,
watch,
} from '#imports'
import MdiCloseCircle from '~icons/mdi/close-circle' import MdiCloseCircle from '~icons/mdi/close-circle'
interface Props { interface Props {

1
packages/nc-gui/components/cell/Percent.vue

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, ReadonlyInj, inject, useVModel } from '#imports'
interface Props { interface Props {
modelValue?: number | string | null modelValue?: number | string | null

1
packages/nc-gui/components/cell/PhoneNumber.vue

@ -1,7 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import isMobilePhone from 'validator/lib/isMobilePhone' import isMobilePhone from 'validator/lib/isMobilePhone'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, IsSurveyFormInj, computed, inject } from '#imports'
interface Props { interface Props {
modelValue: string | null | number | undefined modelValue: string | null | number | undefined

11
packages/nc-gui/components/cell/Rating.vue

@ -1,15 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import {
ActiveCellInj,
ColumnInj,
IsExpandedFormOpenInj,
ReadonlyInj,
computed,
inject,
parseProp,
useSelectedCellKeyupListener,
} from '#imports'
interface Props { interface Props {
modelValue?: number | null | undefined modelValue?: number | null | undefined
} }

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

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { ActiveCellInj, EditModeInj, ReadonlyInj, provide, ref } from '#imports'
interface Props { interface Props {
modelValue?: string | null modelValue?: string | null
} }

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

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { ActiveCellInj, EditModeInj, ReadonlyInj, provide, ref } from '#imports'
interface Props { interface Props {
modelValue?: string | null modelValue?: string | null
} }

13
packages/nc-gui/components/cell/RichText.vue

@ -7,18 +7,9 @@ import { marked } from 'marked'
import { generateJSON } from '@tiptap/html' import { generateJSON } from '@tiptap/html'
import Underline from '@tiptap/extension-underline' import Underline from '@tiptap/extension-underline'
import Placeholder from '@tiptap/extension-placeholder' import Placeholder from '@tiptap/extension-placeholder'
import { TaskItem } from '@/helpers/dbTiptapExtensions/task-item' import { TaskItem } from '~/helpers/dbTiptapExtensions/task-item'
import { Link } from '@/helpers/dbTiptapExtensions/links' import { Link } from '~/helpers/dbTiptapExtensions/links'
import type { RichTextBubbleMenuOptions } from '#imports' import type { RichTextBubbleMenuOptions } from '#imports'
import {
IsExpandedFormOpenInj,
IsFormInj,
IsGridInj,
IsSurveyFormInj,
ReadonlyInj,
RowHeightInj,
rowHeightTruncateLines,
} from '#imports'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

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

@ -3,29 +3,7 @@ import type { Select as AntSelect } from 'ant-design-vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import tinycolor from 'tinycolor2' import tinycolor from 'tinycolor2'
import type { SelectOptionType } from 'nocodb-sdk' import type { SelectOptionType } from 'nocodb-sdk'
import type { FormFieldsLimitOptionsType } from '~/lib' import type { FormFieldsLimitOptionsType } from '~/lib/types'
import {
ActiveCellInj,
ColumnInj,
EditColumnInj,
EditModeInj,
IsFormInj,
IsKanbanInj,
IsSurveyFormInj,
ReadonlyInj,
computed,
enumColor,
extractSdkResponseErrorMsg,
iconMap,
inject,
isDrawerOrModalExist,
ref,
useBase,
useEventListener,
useRoles,
useSelectedCellKeyupListener,
watch,
} from '#imports'
interface Props { interface Props {
modelValue?: string | undefined modelValue?: string | undefined

11
packages/nc-gui/components/cell/Text.vue

@ -1,16 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import {
EditColumnInj,
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj,
RowHeightInj,
inject,
ref,
useVModel,
} from '#imports'
interface Props { interface Props {
modelValue?: string | null modelValue?: string | null

18
packages/nc-gui/components/cell/TextArea.vue

@ -1,23 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import {
ColumnInj,
EditColumnInj,
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
IsGridInj,
ReadonlyInj,
RowHeightInj,
computed,
iconMap,
inject,
onClickOutside,
ref,
useGlobal,
useVModel,
watch,
} from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue?: string | number modelValue?: string | number

1
packages/nc-gui/components/cell/TimePicker.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { isSystemColumn } from 'nocodb-sdk' import { isSystemColumn } from 'nocodb-sdk'
import { ActiveCellInj, EditColumnInj, IsFormInj, ReadonlyInj, inject, onClickOutside, useBase, watch } from '#imports'
interface Props { interface Props {
modelValue?: string | null | undefined modelValue?: string | null | undefined

18
packages/nc-gui/components/cell/Url.vue

@ -1,23 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import {
CellUrlDisableOverlayInj,
ColumnInj,
EditColumnInj,
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj,
computed,
inject,
isValidURL,
message,
parseProp,
ref,
useCellUrlConfig,
useI18n,
watch,
} from '#imports'
interface Props { interface Props {
modelValue?: string | null modelValue?: string | null

23
packages/nc-gui/components/cell/User.vue

@ -4,28 +4,7 @@ import tinycolor from 'tinycolor2'
import { Checkbox, CheckboxGroup, Radio, RadioGroup } from 'ant-design-vue' import { Checkbox, CheckboxGroup, Radio, RadioGroup } from 'ant-design-vue'
import type { Select as AntSelect } from 'ant-design-vue' import type { Select as AntSelect } from 'ant-design-vue'
import type { UserFieldRecordType } from 'nocodb-sdk' import type { UserFieldRecordType } from 'nocodb-sdk'
import type { FormFieldsLimitOptionsType } from '~/lib' import type { FormFieldsLimitOptionsType } from '~/lib/types'
import {
ActiveCellInj,
CellClickHookInj,
ColumnInj,
EditColumnInj,
EditModeInj,
IsKanbanInj,
ReadonlyInj,
RowHeightInj,
computed,
h,
inject,
isDrawerOrModalExist,
onMounted,
ref,
rowHeightTruncateLines,
useEventListener,
useRoles,
useSelectedCellKeyupListener,
watch,
} from '#imports'
import MdiCloseCircle from '~icons/mdi/close-circle' import MdiCloseCircle from '~icons/mdi/close-circle'
interface Props { interface Props {

1
packages/nc-gui/components/cell/YearPicker.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { isSystemColumn } from 'nocodb-sdk' import { isSystemColumn } from 'nocodb-sdk'
import { ActiveCellInj, EditColumnInj, IsFormInj, ReadonlyInj, computed, inject, onClickOutside, ref, watch } from '#imports'
interface Props { interface Props {
modelValue?: number | string | null modelValue?: number | string | null

1
packages/nc-gui/components/cell/attachment/Carousel.vue

@ -1,7 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onKeyDown } from '@vueuse/core' import { onKeyDown } from '@vueuse/core'
import { useAttachmentCell } from './utils' import { useAttachmentCell } from './utils'
import { computed, iconMap, isImage, ref, useAttachment, useEventListener } from '#imports'
const { selectedImage, visibleItems, downloadFile } = useAttachmentCell()! const { selectedImage, visibleItems, downloadFile } = useAttachmentCell()!

2
packages/nc-gui/components/cell/attachment/Image.vue

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { iconMap } from '#imports'
interface Props { interface Props {
srcs: string[] srcs: string[]
alt?: string alt?: string

1
packages/nc-gui/components/cell/attachment/Modal.vue

@ -2,7 +2,6 @@
import { onKeyDown, useEventListener } from '@vueuse/core' import { onKeyDown, useEventListener } from '@vueuse/core'
import { useAttachmentCell } from './utils' import { useAttachmentCell } from './utils'
import { useSortable } from './sort' import { useSortable } from './sort'
import { iconMap, isImage, ref, useAttachment, useDropZone, useRoles, watch } from '#imports'
const { isUIAllowed } = useRoles() const { isUIAllowed } = useRoles()

2
packages/nc-gui/components/cell/attachment/RenameFile.vue

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onKeyStroke, onMounted, reactive, ref, useI18n } from '#imports'
const props = defineProps<{ const props = defineProps<{
title: string title: string
}>() }>()

21
packages/nc-gui/components/cell/attachment/index.vue

@ -2,27 +2,6 @@
import { onKeyDown } from '@vueuse/core' import { onKeyDown } from '@vueuse/core'
import { useProvideAttachmentCell } from './utils' import { useProvideAttachmentCell } from './utils'
import { useSortable } from './sort' import { useSortable } from './sort'
import {
ActiveCellInj,
CurrentCellInj,
DropZoneRef,
IsExpandedFormOpenInj,
IsGalleryInj,
IsGridInj,
IsKanbanInj,
IsSurveyFormInj,
RowHeightInj,
iconMap,
inject,
isImage,
ref,
useAttachment,
useDropZone,
useSelectedCellKeyupListener,
useSmartsheetRowStoreOrThrow,
useSmartsheetStoreOrThrow,
watch,
} from '#imports'
interface Props { interface Props {
modelValue?: string | Record<string, any>[] | null modelValue?: string | Record<string, any>[] | null

1
packages/nc-gui/components/cell/attachment/sort.ts

@ -2,7 +2,6 @@ import type { SortableEvent } from 'sortablejs'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import type { MaybeRef } from '@vueuse/core' import type { MaybeRef } from '@vueuse/core'
import { watchPostEffect } from '@vue/runtime-core' import { watchPostEffect } from '@vue/runtime-core'
import { unref } from '#imports'
export function useSortable( export function useSortable(
element: MaybeRef<HTMLElement | undefined>, element: MaybeRef<HTMLElement | undefined>,

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

@ -3,30 +3,6 @@ import { populateUniqueFileName } from 'nocodb-sdk'
import DOMPurify from 'isomorphic-dompurify' import DOMPurify from 'isomorphic-dompurify'
import { saveAs } from 'file-saver' import { saveAs } from 'file-saver'
import RenameFile from './RenameFile.vue' import RenameFile from './RenameFile.vue'
import {
ColumnInj,
EditModeInj,
IsFormInj,
IsPublicInj,
MetaInj,
NOCO,
ReadonlyInj,
computed,
extractImageSrcFromRawHtml,
inject,
isImage,
message,
parseProp,
ref,
storeToRefs,
useApi,
useAttachment,
useBase,
useFileDialog,
useI18n,
useInjectionState,
watch,
} from '#imports'
import MdiPdfBox from '~icons/mdi/pdf-box' import MdiPdfBox from '~icons/mdi/pdf-box'
import MdiFileWordOutline from '~icons/mdi/file-word-outline' import MdiFileWordOutline from '~icons/mdi/file-word-outline'
import MdiFilePowerpointBox from '~icons/mdi/file-powerpoint-box' import MdiFilePowerpointBox from '~icons/mdi/file-powerpoint-box'

2
packages/nc-gui/components/cmd-footer/index.vue

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { CommandPaletteType } from '~/lib' import type { CommandPaletteType } from '~/lib/types'
defineProps<{ defineProps<{
activeCmd: CommandPaletteType activeCmd: CommandPaletteType

3
packages/nc-gui/components/cmd-k/index.vue

@ -1,8 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useMagicKeys, whenever } from '@vueuse/core' import { useMagicKeys, whenever } from '@vueuse/core'
import { commandScore } from './command-score' import { commandScore } from './command-score'
import { type ComputedRef, type VNode, iconMap, onClickOutside, useCommandPalette } from '#imports' import type { CommandPaletteType } from '~/lib/types'
import type { CommandPaletteType } from '~/lib'
interface CmdAction { interface CmdAction {
id: string id: string

3
packages/nc-gui/components/cmd-l/index.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { onKeyUp, useDebounceFn, useVModel } from '@vueuse/core' import { onKeyUp, useDebounceFn, useVModel } from '@vueuse/core'
import { iconMap, onClickOutside } from '#imports' import type { CommandPaletteType } from '~/lib/types'
import type { CommandPaletteType } from '~/lib'
const props = defineProps<{ const props = defineProps<{
open: boolean open: boolean

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

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, navigateTo, onMounted, ref, storeToRefs, useGlobal, useSidebarStore, useUsers, watch } from '#imports'
const { user, signOut, appInfo } = useGlobal() const { user, signOut, appInfo } = useGlobal()
// So watcher in users store is triggered // So watcher in users store is triggered
useUsers() useUsers()

1
packages/nc-gui/components/dashboard/TreeView/AddNewTableNode.vue

@ -4,7 +4,6 @@ import { storeToRefs } from 'pinia'
import { toRef } from '@vue/reactivity' import { toRef } from '@vue/reactivity'
import { resolveComponent } from '@vue/runtime-core' import { resolveComponent } from '@vue/runtime-core'
import { ref } from 'vue' import { ref } from 'vue'
import { ProjectRoleInj, useDialog, useRoles } from '#imports'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

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

@ -4,37 +4,6 @@ import { message } from 'ant-design-vue'
import { stringifyRolesObj } from 'nocodb-sdk' import { stringifyRolesObj } from 'nocodb-sdk'
import type { BaseType, SourceType, 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 {
NcProjectType,
ProjectInj,
ProjectRoleInj,
ToggleDialogInj,
TreeViewInj,
computed,
extractSdkResponseErrorMsg,
h,
inject,
navigateTo,
navigateToBlankTargetOpenOption,
openLink,
ref,
resolveComponent,
storeToRefs,
useBase,
useBases,
useCopy,
useDialog,
useGlobal,
useI18n,
useMagicKeys,
useNuxtApp,
useRoles,
useRouter,
useTablesStore,
useTabs,
useToggle,
} from '#imports'
import type { NcProject } from '#imports'
const indicator = h(LoadingOutlined, { const indicator = h(LoadingOutlined, {
class: '!text-gray-400', class: '!text-gray-400',

1
packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { BaseType } from 'nocodb-sdk' import type { BaseType } from 'nocodb-sdk'
import { ProjectInj, ProjectRoleInj } from '#imports'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

1
packages/nc-gui/components/dashboard/TreeView/TableList.vue

@ -3,7 +3,6 @@ import type { BaseType, TableType } from 'nocodb-sdk'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import TableNode from './TableNode.vue' import TableNode from './TableNode.vue'
import { toRef, useNuxtApp } from '#imports'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

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

@ -4,8 +4,7 @@ import { toRef } from '@vue/reactivity'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { ProjectRoleInj, TreeViewInj, useCopy, useMagicKeys, useNuxtApp, useRoles, useTabs } from '#imports' import type { SidebarTableNode } from '~/lib/types'
import type { SidebarTableNode } from '~/lib'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

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

@ -4,22 +4,6 @@ import { ViewTypes } from 'nocodb-sdk'
import type { SortableEvent } from 'sortablejs' 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 {
extractSdkResponseErrorMsg,
isDefaultBase,
message,
onMounted,
parseProp,
ref,
resolveComponent,
useApi,
useCommandPalette,
useDialog,
useNuxtApp,
useUndoRedo,
viewTypeAlias,
watch,
} from '#imports'
interface Emits { interface Emits {
( (

13
packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue

@ -2,18 +2,7 @@
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import type { TableType, ViewType, ViewTypes } from 'nocodb-sdk' import type { TableType, ViewType, ViewTypes } from 'nocodb-sdk'
import type { WritableComputedRef } from '@vue/reactivity' import type { WritableComputedRef } from '@vue/reactivity'
import { import { isDefaultBase as _isDefaultBase } from '#imports'
IsLockedInj,
isDefaultBase as _isDefaultBase,
inject,
message,
onKeyStroke,
useDebounceFn,
useMagicKeys,
useNuxtApp,
useRoles,
useVModel,
} from '#imports'
interface Props { interface Props {
view: ViewType view: ViewType

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

@ -3,26 +3,6 @@ import Draggable from 'vuedraggable'
import type { TableType } from 'nocodb-sdk' import type { TableType } from 'nocodb-sdk'
import ProjectWrapper from './ProjectWrapper.vue' import ProjectWrapper from './ProjectWrapper.vue'
import {
TreeViewInj,
computed,
isDrawerOrModalExist,
isElementInvisible,
isMac,
reactive,
ref,
resolveComponent,
storeToRefs,
useBase,
useBases,
useDialog,
useGlobal,
useNuxtApp,
useRoles,
useRouter,
useTablesStore,
} from '#imports'
const { isUIAllowed } = useRoles() const { isUIAllowed } = useRoles()
const { $e } = useNuxtApp() const { $e } = useNuxtApp()

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

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { extractSdkResponseErrorMsg, iconMap, message, onMounted, useI18n, useNuxtApp } from '#imports'
const { t } = useI18n() const { t } = useI18n()
const { $api, $e } = useNuxtApp() const { $api, $e } = useNuxtApp()

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

@ -2,7 +2,6 @@
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 { timeAgo } from 'nocodb-sdk' import { timeAgo } from 'nocodb-sdk'
import { ProjectIdInj, h, iconMap, onMounted, storeToRefs, useBase, useGlobal, useI18n, useNuxtApp } from '#imports'
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

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

@ -2,7 +2,6 @@
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 { timeAgo } from 'nocodb-sdk' import { timeAgo } from 'nocodb-sdk'
import { h, iconMap, onMounted, storeToRefs, useBase, useGlobal, useI18n, useNuxtApp } from '#imports'
interface Props { interface Props {
sourceId: string sourceId: string

2
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, isEeUI, storeToRefs, useBase, useCommandPalette, useNuxtApp } from '#imports' import { ClientType } from '#imports'
interface Props { interface Props {
state: string state: string

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

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

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

@ -1,7 +1,6 @@
<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, useBase, useGlobal, watch } from '#imports'
const { includeM2M, showNull } = useGlobal() const { includeM2M, showNull } = useGlobal()

1
packages/nc-gui/components/dashboard/settings/Modal.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { FunctionalComponent, SVGAttributes } from 'vue' import type { FunctionalComponent, SVGAttributes } from 'vue'
import Misc from './Misc.vue' import Misc from './Misc.vue'
import { DataSourcesSubTab, iconMap, useNuxtApp, useVModel, watch } from '#imports'
interface Props { interface Props {
modelValue?: boolean modelValue?: boolean

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

@ -1,20 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { inject } from '@vue/runtime-core' import { inject } from '@vue/runtime-core'
import {
Empty,
ProjectIdInj,
computed,
extractSdkResponseErrorMsg,
h,
iconMap,
message,
onMounted,
storeToRefs,
useBase,
useGlobal,
useI18n,
useNuxtApp,
} from '#imports'
type Role = 'editor' | 'commenter' | 'viewer' type Role = 'editor' | 'commenter' | 'viewer'

1
packages/nc-gui/components/dashboard/settings/app-store/AppInstall.vue

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PluginTestReqType, PluginType } from 'nocodb-sdk' import type { PluginTestReqType, PluginType } from 'nocodb-sdk'
import { extractSdkResponseErrorMsg, iconMap, message, onMounted, ref, useI18n, useNuxtApp } from '#imports'
const { id } = defineProps<{ const { id } = defineProps<{
id: string id: string

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

@ -1,30 +1,14 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Form, message } from 'ant-design-vue' import { Form, message } from 'ant-design-vue'
import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select' import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select'
import type { DefaultConnection, ProjectCreateForm, SQLiteConnection } from '#imports'
import { import {
CertTypes, type CertTypes,
ClientType, ClientType,
ProjectIdInj, type DefaultConnection,
type ProjectCreateForm,
type SQLiteConnection,
SSLUsage, SSLUsage,
clientTypes as _clientTypes, clientTypes as _clientTypes,
baseTitleValidator,
computed,
extractSdkResponseErrorMsg,
fieldRequiredValidator,
generateUniqueName,
getDefaultConnectionConfig,
getTestDatabaseName,
iconMap,
nextTick,
onMounted,
readFile,
ref,
storeToRefs,
useApi,
useI18n,
useNuxtApp,
watch,
} from '#imports' } from '#imports'
const props = defineProps<{ open: boolean; connectionType?: ClientType }>() const props = defineProps<{ open: boolean; connectionType?: ClientType }>()

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

@ -2,28 +2,16 @@
import type { SourceType } from 'nocodb-sdk' import type { SourceType } from 'nocodb-sdk'
import { Form, message } from 'ant-design-vue' import { Form, message } from 'ant-design-vue'
import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select' import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select'
import type { DefaultConnection, ProjectCreateForm, SQLiteConnection, SnowflakeConnection } from '#imports'
import { import {
CertTypes, type CertTypes,
ClientType, ClientType,
ProjectIdInj, type DatabricksConnection,
type DefaultConnection,
type ProjectCreateForm,
type SQLiteConnection,
SSLUsage, SSLUsage,
type SnowflakeConnection,
clientTypes as _clientTypes, clientTypes as _clientTypes,
baseTitleValidator,
computed,
extractSdkResponseErrorMsg,
fieldRequiredValidator,
getDefaultConnectionConfig,
getTestDatabaseName,
iconMap,
onMounted,
readFile,
ref,
storeToRefs,
useApi,
useI18n,
useNuxtApp,
watch,
} from '#imports' } from '#imports'
const props = defineProps<{ const props = defineProps<{

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

@ -1,19 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Card as AntCard } from 'ant-design-vue' import type { Card as AntCard } from 'ant-design-vue'
import { import { JobStatus } from '#imports'
Form,
JobStatus,
computed,
extractSdkResponseErrorMsg,
fieldRequiredValidator,
iconMap,
message,
nextTick,
onMounted,
ref,
useNuxtApp,
watch,
} from '#imports'
const { modelValue, baseId, sourceId } = defineProps<{ const { modelValue, baseId, sourceId } = defineProps<{
modelValue: boolean modelValue: boolean

1
packages/nc-gui/components/dlg/ColumnDuplicate.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ColumnType } from 'nocodb-sdk' import type { ColumnType } from 'nocodb-sdk'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: boolean modelValue: boolean

7
packages/nc-gui/components/dlg/InviteDlg.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ProjectRoles, type RoleLabels, WorkspaceUserRoles } from 'nocodb-sdk' import { ProjectRoles, type RoleLabels, WorkspaceUserRoles } from 'nocodb-sdk'
import type { User } from '#imports'
import { extractEmail } from '~/helpers/parsers/parserHelpers' import { extractEmail } from '~/helpers/parsers/parserHelpers'
@ -13,8 +12,6 @@ const props = defineProps<{
}>() }>()
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
const { baseRoles, workspaceRoles } = useRoles()
const basesStore = useBases() const basesStore = useBases()
const workspaceStore = useWorkspace() const workspaceStore = useWorkspace()
@ -29,10 +26,6 @@ const orderedRoles = computed(() => {
return props.type === 'base' ? ProjectRoles : WorkspaceUserRoles return props.type === 'base' ? ProjectRoles : WorkspaceUserRoles
}) })
const userRoles = computed(() => {
return props.type === 'base' ? baseRoles.value : workspaceRoles.value
})
const inviteData = reactive({ const inviteData = reactive({
email: '', email: '',
roles: orderedRoles.value.NO_ACCESS, roles: orderedRoles.value.NO_ACCESS,

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

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { isMac } from '#imports'
const { modelValue } = defineProps<{ const { modelValue } = defineProps<{
modelValue: boolean modelValue: boolean
}>() }>()

1
packages/nc-gui/components/dlg/ProjectDuplicate.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import tinycolor from 'tinycolor2' import tinycolor from 'tinycolor2'
import type { BaseType } from 'nocodb-sdk' import type { BaseType } from 'nocodb-sdk'
import { isEeUI, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: boolean modelValue: boolean

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

@ -3,38 +3,6 @@ import type { TableType } from 'nocodb-sdk'
import type { UploadChangeParam, UploadFile } from 'ant-design-vue' import type { UploadChangeParam, UploadFile } from 'ant-design-vue'
import { Upload } from 'ant-design-vue' import { Upload } from 'ant-design-vue'
import { toRaw, unref } from '@vue/runtime-core' import { toRaw, unref } from '@vue/runtime-core'
import type { ImportWorkerPayload, importFileList, streamImportFileList } from '#imports'
import {
BASE_FALLBACK_URL,
CSVTemplateAdapter,
ExcelTemplateAdapter,
ExcelUrlTemplateAdapter,
Form,
ImportSource,
ImportType,
ImportWorkerOperations,
ImportWorkerResponse,
JSONTemplateAdapter,
JSONUrlTemplateAdapter,
computed,
extractSdkResponseErrorMsg,
fieldRequiredValidator,
iconMap,
importCsvUrlValidator,
importExcelUrlValidator,
importUrlValidator,
initWorker,
message,
reactive,
ref,
storeToRefs,
useBase,
useGlobal,
useI18n,
useNuxtApp,
useVModel,
} from '#imports'
// import worker script according to the doc of Vite // import worker script according to the doc of Vite
import importWorkerUrl from '~/workers/importWorker?worker&url' import importWorkerUrl from '~/workers/importWorker?worker&url'

1
packages/nc-gui/components/dlg/SharedBaseDuplicate.vue

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ProjectTypes } from 'nocodb-sdk' import { ProjectTypes } from 'nocodb-sdk'
import { isEeUI, useApi, useVModel, useWorkspace } from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: boolean modelValue: boolean

15
packages/nc-gui/components/dlg/TableCreate.vue

@ -1,19 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import {
Form,
TabType,
computed,
nextTick,
onMounted,
ref,
useBase,
useTableNew,
useTablesStore,
useTabs,
useVModel,
validateTableName,
} from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: boolean modelValue: boolean
sourceId: string sourceId: string

1
packages/nc-gui/components/dlg/TableDuplicate.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { type LinkToAnotherRecordType, type TableType, UITypes } from 'nocodb-sdk' import { type LinkToAnotherRecordType, type TableType, UITypes } from 'nocodb-sdk'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { useVModel } from '#imports'
import type { TabType } from '#imports' import type { TabType } from '#imports'
const props = defineProps<{ const props = defineProps<{

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

@ -1,25 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { TableType } from 'nocodb-sdk' import type { TableType } from 'nocodb-sdk'
import type { ComponentPublicInstance } from '@vue/runtime-core' import type { ComponentPublicInstance } from '@vue/runtime-core'
import {
Form,
computed,
extractSdkResponseErrorMsg,
message,
nextTick,
reactive,
storeToRefs,
useBase,
useCommandPalette,
useMetas,
useNuxtApp,
useTablesStore,
useTabs,
useUndoRedo,
useVModel,
validateTableName,
watchEffect,
} from '#imports'
interface Props { interface Props {
modelValue?: boolean modelValue?: boolean

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

@ -4,7 +4,6 @@ import { capitalize } 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 type { CalendarType, FormType, GalleryType, GridType, KanbanType, MapType, TableType } from 'nocodb-sdk' import type { CalendarType, FormType, GalleryType, GridType, KanbanType, MapType, TableType } from 'nocodb-sdk'
import { UITypes, ViewTypes, isSystemColumn } from 'nocodb-sdk' import { UITypes, ViewTypes, isSystemColumn } from 'nocodb-sdk'
import { computed, message, nextTick, onBeforeMount, reactive, ref, useApi, useI18n, useVModel, watch } from '#imports'
interface Props { interface Props {
modelValue: boolean modelValue: boolean

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

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { extractSdkResponseErrorMsg, message, useApi, useNuxtApp, useVModel } from '#imports'
interface Props { interface Props {
modelValue: boolean modelValue: boolean
view?: Record<string, any> view?: Record<string, any>

1
packages/nc-gui/components/dlg/share-and-collaborate/ManageUsers.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import InfiniteLoading from 'v3-infinite-loading' import InfiniteLoading from 'v3-infinite-loading'
import type { User } from '#imports'
interface Emits { interface Emits {
(event: 'close', value: boolean): void (event: 'close', value: boolean): void

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

@ -1,16 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import {
extractSdkResponseErrorMsg,
message,
onMounted,
storeToRefs,
useBase,
useDashboard,
useGlobal,
useNuxtApp,
useWorkspace,
} from '#imports'
interface ShareBase { interface ShareBase {
uuid?: string uuid?: string
url?: string url?: string

1
packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue

@ -1,7 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { ColumnType, KanbanType, ViewType } from 'nocodb-sdk' import type { ColumnType, KanbanType, ViewType } from 'nocodb-sdk'
import { ViewTypes } from 'nocodb-sdk' import { ViewTypes } from 'nocodb-sdk'
import { PreFilledMode, useMetas } from '#imports'
const { view: _view, $api } = useSmartsheetStoreOrThrow() const { view: _view, $api } = useSmartsheetStoreOrThrow()
const { $e } = useNuxtApp() const { $e } = useNuxtApp()

1
packages/nc-gui/components/erd/ConfigPanel.vue

@ -1,7 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Panel, PanelPosition } from '@vue-flow/additional-components' import { Panel, PanelPosition } from '@vue-flow/additional-components'
import type { ERDConfig } from './utils' import type { ERDConfig } from './utils'
import { ref, useGlobal, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
config: ERDConfig config: ERDConfig

1
packages/nc-gui/components/erd/Flow.vue

@ -4,7 +4,6 @@ import { VueFlow, useVueFlow } from '@vue-flow/core'
import type { TableType } from 'nocodb-sdk' import type { TableType } from 'nocodb-sdk'
import type { ERDConfig } from './utils' import type { ERDConfig } from './utils'
import { useErdElements } from './utils' import { useErdElements } from './utils'
import { computed, onScopeDispose, toRefs, watch } from '#imports'
interface Props { interface Props {
tables: TableType[] tables: TableType[]

1
packages/nc-gui/components/erd/HistogramPanel.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Panel, PanelPosition } from '@vue-flow/additional-components' import { Panel, PanelPosition } from '@vue-flow/additional-components'
import { iconMap } from '#imports'
</script> </script>
<template> <template>

1
packages/nc-gui/components/erd/RelationEdge.vue

@ -3,7 +3,6 @@ import type { EdgeProps, Position } from '@vue-flow/core'
import { EdgeLabelRenderer, getBezierPath } from '@vue-flow/core' import { EdgeLabelRenderer, getBezierPath } from '@vue-flow/core'
import type { CSSProperties } from '@vue/runtime-dom' import type { CSSProperties } from '@vue/runtime-dom'
import type { EdgeData } from './utils' import type { EdgeData } from './utils'
import { computed, toRef } from '#imports'
interface RelationEdgeProps extends EdgeProps<EdgeData> { interface RelationEdgeProps extends EdgeProps<EdgeData> {
id: string id: string

1
packages/nc-gui/components/erd/TableNode.vue

@ -4,7 +4,6 @@ import { Handle, Position, useVueFlow } from '@vue-flow/core'
import type { LinkToAnotherRecordType } from 'nocodb-sdk' import type { LinkToAnotherRecordType } from 'nocodb-sdk'
import { isLinksOrLTAR, isVirtualCol } from 'nocodb-sdk' import { isLinksOrLTAR, isVirtualCol } from 'nocodb-sdk'
import type { NodeData } from './utils' import type { NodeData } from './utils'
import { MetaInj, computed, provide, refAutoReset, useNuxtApp, watch } from '#imports'
interface Props extends Pick<NodeProps<NodeData>, 'data' | 'dragging'> { interface Props extends Pick<NodeProps<NodeData>, 'data' | 'dragging'> {
data: NodeData data: NodeData

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

@ -2,7 +2,6 @@
import type { LinkToAnotherRecordType, SourceType, 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, useBase, useMetas, watch } from '#imports'
const props = defineProps({ const props = defineProps({
sourceId: { sourceId: {

1
packages/nc-gui/components/erd/utils.ts

@ -6,7 +6,6 @@ import type { MaybeRef } from '@vueuse/core'
import { MarkerType, Position, isEdge, isNode } from '@vue-flow/core' import { MarkerType, Position, isEdge, isNode } from '@vue-flow/core'
import { scaleLinear as d3ScaleLinear } from 'd3-scale' import { scaleLinear as d3ScaleLinear } from 'd3-scale'
import tinycolor from 'tinycolor2' import tinycolor from 'tinycolor2'
import { computed, ref, unref, useMetas, useTheme } from '#imports'
export interface ERDConfig { export interface ERDConfig {
showPkAndFk: boolean showPkAndFk: boolean

2
packages/nc-gui/components/extensions/Details.vue

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useVModel } from '#imports'
interface Prop { interface Prop {
modelValue: boolean modelValue: boolean
extensionId: string extensionId: string

2
packages/nc-gui/components/extensions/Market.vue

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useVModel } from '#imports'
interface Prop { interface Prop {
modelValue?: boolean modelValue?: boolean
} }

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

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { iconMap } from '#imports'
const { isUIAllowed } = useRoles() const { isUIAllowed } = useRoles()
const { t } = useI18n() const { t } = useI18n()

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

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { iconMap, useGlobal } from '#imports'
const { isLoading } = useGlobal() const { isLoading } = useGlobal()
</script> </script>

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

@ -1,8 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import tinycolor from 'tinycolor2' import tinycolor from 'tinycolor2'
import { NcProjectType, baseIconColors } from '#imports'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
type?: NcProjectType | string type?: NcProjectType | string

1
packages/nc-gui/components/general/ChromeWrapper.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Chrome } from '@ckpack/vue-color' import { Chrome } from '@ckpack/vue-color'
import { computed } from '#imports'
interface Props { interface Props {
modelValue?: any modelValue?: any

1
packages/nc-gui/components/general/ColorPicker.vue

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import tinycolor from 'tinycolor2' import tinycolor from 'tinycolor2'
import { computed, enumColor, ref, watch } from '#imports'
interface Props { interface Props {
modelValue?: string | any modelValue?: string | any

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

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onKeyStroke } from '#imports'
const props = defineProps<{ const props = defineProps<{
visible: boolean visible: boolean
entityName: string entityName: string

1
packages/nc-gui/components/general/EmojiIcons.vue

@ -1,7 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Icon as IconifyIcon } from '@iconify/vue' import { Icon as IconifyIcon } from '@iconify/vue'
import InfiniteLoading from 'v3-infinite-loading' import InfiniteLoading from 'v3-infinite-loading'
import { emojiIcons } from '#imports'
const props = defineProps<{ const props = defineProps<{
showReset?: boolean showReset?: boolean

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

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeUnmount, onMounted, watch } from '#imports'
type FlipTrigger = 'hover' | 'click' | { duration: number } type FlipTrigger = 'hover' | 'click' | { duration: number }
interface Props { interface Props {

4
packages/nc-gui/components/general/FormBranding.vue

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup></script>
import { openLink } from '#imports'
</script>
<template> <template>
<div <div

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

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, isDrawerOrModalExist, isMac, useNuxtApp, useSidebar } from '#imports'
const rightSidebar = useSidebar('nc-right-sidebar') const rightSidebar = useSidebar('nc-right-sidebar')
const leftSidebar = useSidebar('nc-left-sidebar') const leftSidebar = useSidebar('nc-left-sidebar')

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

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

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

@ -1,6 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { iconMap } from '#imports'
const props = defineProps<{ const props = defineProps<{
icon: keyof typeof iconMap icon: keyof typeof iconMap
}>() }>()

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save