Browse Source

fix: wrap store with `storeToRefs` wherever missing

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5274/head
Pranav C 2 years ago
parent
commit
29a43aee10
  1. 4
      packages/nc-gui/components/cell/SingleSelect.vue
  2. 4
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  3. 4
      packages/nc-gui/components/dashboard/settings/Misc.vue
  4. 3
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  5. 3
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue
  6. 3
      packages/nc-gui/components/dlg/AirtableImport.vue
  7. 3
      packages/nc-gui/components/dlg/TableRename.vue
  8. 4
      packages/nc-gui/components/erd/View.vue
  9. 4
      packages/nc-gui/components/general/HelpAndSupport.vue
  10. 4
      packages/nc-gui/components/general/MiniSidebar.vue
  11. 3
      packages/nc-gui/components/smartsheet/ApiSnippet.vue
  12. 4
      packages/nc-gui/components/smartsheet/column/LinkedToAnotherRecordOptions.vue
  13. 4
      packages/nc-gui/components/smartsheet/column/LookupOptions.vue
  14. 4
      packages/nc-gui/components/smartsheet/column/RollupOptions.vue
  15. 3
      packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue
  16. 4
      packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue
  17. 3
      packages/nc-gui/components/smartsheet/toolbar/MoreActions.vue
  18. 4
      packages/nc-gui/components/smartsheet/toolbar/RowHeight.vue
  19. 3
      packages/nc-gui/components/smartsheet/toolbar/ShareView.vue
  20. 3
      packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue
  21. 4
      packages/nc-gui/components/tabs/auth/ApiTokenManagement.vue
  22. 3
      packages/nc-gui/components/tabs/auth/UserManagement.vue
  23. 14
      packages/nc-gui/components/tabs/auth/user-management/ShareBase.vue
  24. 3
      packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue
  25. 5
      packages/nc-gui/components/template/Editor.vue
  26. 5
      packages/nc-gui/composables/useColumnCreateStore.ts
  27. 3
      packages/nc-gui/composables/useExpandedFormStore.ts
  28. 3
      packages/nc-gui/composables/useLTARStore.ts
  29. 4
      packages/nc-gui/composables/useMapViewDataStore.ts

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

@ -18,8 +18,8 @@ import {
inject, inject,
isDrawerOrModalExist, isDrawerOrModalExist,
ref, ref,
storeToRefs,
useEventListener, useEventListener,
useProject,
useRoles, useRoles,
useSelectedCellKeyupListener, useSelectedCellKeyupListener,
watch, watch,
@ -61,7 +61,7 @@ const { getMeta } = useMetas()
const { hasRole } = useRoles() const { hasRole } = useRoles()
const { isPg, isMysql } = storeToRefs(useProject()) const { isPg, isMysql } = useProject()
// a variable to keep newly created option value // a variable to keep newly created option value
// temporary until it's add the option to column meta // temporary until it's add the option to column meta

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

@ -7,7 +7,7 @@ import Metadata from './Metadata.vue'
import UIAcl from './UIAcl.vue' import UIAcl from './UIAcl.vue'
import Erd from './Erd.vue' import Erd from './Erd.vue'
import { ClientType, DataSourcesSubTab } from '~/lib' import { ClientType, DataSourcesSubTab } from '~/lib'
import { useNuxtApp, useProject } from '#imports' import { storeToRefs, useNuxtApp, useProject } from '#imports'
interface Props { interface Props {
state: string state: string
@ -24,7 +24,7 @@ const vReload = useVModel(props, 'reload', emits)
const { $api, $e } = useNuxtApp() const { $api, $e } = useNuxtApp()
const projectStore = useProject() const projectStore = useProject()
const { loadProject } = projectStore const { loadProject } = projectStore
const { project } = projectStore const { project } = storeToRefs(projectStore)
let sources = $ref<BaseType[]>([]) let sources = $ref<BaseType[]>([])
let activeBaseId = $ref('') let activeBaseId = $ref('')

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

@ -1,12 +1,12 @@
<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 { useGlobal, useProject, watch } from '#imports' import { storeToRefs, useGlobal, useProject, watch } from '#imports'
const { includeM2M, showNull } = useGlobal() const { includeM2M, showNull } = useGlobal()
const projectStore = useProject() const projectStore = useProject()
const { updateProject, loadTables, hasEmptyOrNullFilters } = projectStore const { updateProject, loadTables, hasEmptyOrNullFilters } = projectStore
const { project, projectMeta } = projectStore const { project, projectMeta } = storeToRefs(projectStore)
watch(includeM2M, async () => await loadTables()) watch(includeM2M, async () => await loadTables())

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

@ -20,6 +20,7 @@ import {
projectTitleValidator, projectTitleValidator,
readFile, readFile,
ref, ref,
storeToRefs,
useApi, useApi,
useGlobal, useGlobal,
useI18n, useI18n,
@ -35,7 +36,7 @@ const { appInfo } = useGlobal()
const projectStore = useProject() const projectStore = useProject()
const { loadProject } = projectStore const { loadProject } = projectStore
const { project } = projectStore const { project } = storeToRefs(projectStore)
const useForm = Form.useForm const useForm = Form.useForm

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

@ -19,6 +19,7 @@ import {
projectTitleValidator, projectTitleValidator,
readFile, readFile,
ref, ref,
storeToRefs,
useApi, useApi,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
@ -33,7 +34,7 @@ const emit = defineEmits(['baseUpdated'])
const projectStore = useProject() const projectStore = useProject()
const { loadProject } = projectStore const { loadProject } = projectStore
const { project } = projectStore const { project } = storeToRefs(projectStore)
const useForm = Form.useForm const useForm = Form.useForm

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

@ -12,6 +12,7 @@ import {
onBeforeUnmount, onBeforeUnmount,
onMounted, onMounted,
ref, ref,
storeToRefs,
useGlobal, useGlobal,
useNuxtApp, useNuxtApp,
useProject, useProject,
@ -33,7 +34,7 @@ const { $state } = useNuxtApp()
const projectStore = useProject() const projectStore = useProject()
const { project } = projectStore const { project } = storeToRefs(projectStore)
const showGoToDashboardButton = ref(false) const showGoToDashboardButton = ref(false)

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

@ -8,6 +8,7 @@ import {
message, message,
nextTick, nextTick,
reactive, reactive,
storeToRefs,
useI18n, useI18n,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
@ -40,7 +41,7 @@ const { updateTab } = useTabs()
const projectStore = useProject() const projectStore = useProject()
const { loadTables, isMysql, isMssql, isPg } = projectStore const { loadTables, isMysql, isMssql, isPg } = projectStore
const { project } = projectStore const { project } = storeToRefs(projectStore)
const inputEl = $ref<ComponentPublicInstance>() const inputEl = $ref<ComponentPublicInstance>()

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

@ -2,11 +2,11 @@
import type { LinkToAnotherRecordType, TableType } from 'nocodb-sdk' import type { LinkToAnotherRecordType, TableType } from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk' import { UITypes } from 'nocodb-sdk'
import type { ERDConfig } from './utils' import type { ERDConfig } from './utils'
import { reactive, ref, useMetas, useProject, watch } from '#imports' import { reactive, ref, storeToRefs, useMetas, useProject, watch } from '#imports'
const props = defineProps<{ table?: TableType; baseId?: string }>() const props = defineProps<{ table?: TableType; baseId?: string }>()
const { tables: projectTables } = useProject() const { tables: projectTables } = storeToRefs(useProject())
const { metas, getMeta } = useMetas() const { metas, getMeta } = useMetas()

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

@ -1,11 +1,11 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, useGlobal, useProject, useRoute } from '#imports' import { ref, storeToRefs, useGlobal, useProject, useRoute } from '#imports'
const showDrawer = ref(false) const showDrawer = ref(false)
const { appInfo } = useGlobal() const { appInfo } = useGlobal()
const { project } = useProject() const { project } = storeToRefs(useProject())
const route = useRoute() const route = useRoute()

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

@ -1,11 +1,11 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, navigateTo, useGlobal, useProject, useRoute, useSidebar } from '#imports' import { computed, navigateTo, storeToRefs, useGlobal, useProject, useRoute, useSidebar } from '#imports'
const { signOut, signedIn, user, currentVersion } = useGlobal() const { signOut, signedIn, user, currentVersion } = useGlobal()
const { isOpen } = useSidebar('nc-mini-sidebar', { isOpen: true }) const { isOpen } = useSidebar('nc-mini-sidebar', { isOpen: true })
const { project } = useProject() const { project } = storeToRefs(useProject())
const route = useRoute() const route = useRoute()

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

@ -6,6 +6,7 @@ import {
inject, inject,
message, message,
ref, ref,
storeToRefs,
useCopy, useCopy,
useGlobal, useGlobal,
useI18n, useI18n,
@ -24,7 +25,7 @@ const emits = defineEmits(['update:modelValue'])
const { t } = useI18n() const { t } = useI18n()
const { project } = $(useProject()) const { project } = $(storeToRefs(useProject()))
const { appInfo, token } = $(useGlobal()) const { appInfo, token } = $(useGlobal())

4
packages/nc-gui/components/smartsheet/column/LinkedToAnotherRecordOptions.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ModelTypes, MssqlUi, SqliteUi } from 'nocodb-sdk' import { ModelTypes, MssqlUi, SqliteUi } from 'nocodb-sdk'
import { MetaInj, inject, ref, useProject, useVModel } from '#imports' import { MetaInj, inject, ref, storeToRefs, useProject, useVModel } from '#imports'
import MdiPlusIcon from '~icons/mdi/plus-circle-outline' import MdiPlusIcon from '~icons/mdi/plus-circle-outline'
import MdiMinusIcon from '~icons/mdi/minus-circle-outline' import MdiMinusIcon from '~icons/mdi/minus-circle-outline'
@ -16,7 +16,7 @@ const meta = $(inject(MetaInj, ref()))
const { setAdditionalValidations, validateInfos, onDataTypeChange, sqlUi } = useColumnCreateStoreOrThrow() const { setAdditionalValidations, validateInfos, onDataTypeChange, sqlUi } = useColumnCreateStoreOrThrow()
const { tables } = $(useProject()) const { tables } = $(storeToRefs(useProject()))
setAdditionalValidations({ setAdditionalValidations({
childId: [{ required: true, message: 'Required' }], childId: [{ required: true, message: 'Required' }],

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

@ -3,7 +3,7 @@ import { onMounted } from '@vue/runtime-core'
import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk' import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk'
import { UITypes, isSystemColumn } from 'nocodb-sdk' import { UITypes, isSystemColumn } from 'nocodb-sdk'
import { getRelationName } from './utils' import { getRelationName } from './utils'
import { MetaInj, inject, ref, useColumnCreateStoreOrThrow, useMetas, useProject, useVModel } from '#imports' import { MetaInj, inject, ref, storeToRefs, useColumnCreateStoreOrThrow, useMetas, useProject, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
value: any value: any
@ -17,7 +17,7 @@ const meta = $(inject(MetaInj, ref()))
const { setAdditionalValidations, validateInfos, onDataTypeChange, isEdit } = useColumnCreateStoreOrThrow() const { setAdditionalValidations, validateInfos, onDataTypeChange, isEdit } = useColumnCreateStoreOrThrow()
const { tables } = $(useProject()) const { tables } = $(storeToRefs(useProject()))
const { metas } = $(useMetas()) const { metas } = $(useMetas())

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

@ -3,7 +3,7 @@ import { onMounted } from '@vue/runtime-core'
import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk' import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk'
import { UITypes, isSystemColumn, isVirtualCol } from 'nocodb-sdk' import { UITypes, isSystemColumn, isVirtualCol } from 'nocodb-sdk'
import { getRelationName } from './utils' import { getRelationName } from './utils'
import { MetaInj, inject, ref, useColumnCreateStoreOrThrow, useMetas, useProject, useVModel } from '#imports' import { MetaInj, inject, ref, storeToRefs, useColumnCreateStoreOrThrow, useMetas, useProject, useVModel } from '#imports'
const props = defineProps<{ const props = defineProps<{
value: any value: any
@ -17,7 +17,7 @@ const meta = $(inject(MetaInj, ref()))
const { setAdditionalValidations, validateInfos, onDataTypeChange, isEdit } = useColumnCreateStoreOrThrow() const { setAdditionalValidations, validateInfos, onDataTypeChange, isEdit } = useColumnCreateStoreOrThrow()
const { tables } = $(useProject()) const { tables } = $(storeToRefs(useProject()))
const { metas } = $(useMetas()) const { metas } = $(useMetas())

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

@ -10,6 +10,7 @@ import {
inject, inject,
message, message,
ref, ref,
storeToRefs,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useProject, useProject,
@ -22,7 +23,7 @@ const isPublicView = inject(IsPublicInj, ref(false))
const fields = inject(FieldsInj, ref([])) const fields = inject(FieldsInj, ref([]))
const { project } = useProject() const { project } = storeToRefs(useProject())
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

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

@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ColumnType } from 'nocodb-sdk' import type { ColumnType } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import { import {
ColumnInj, ColumnInj,
EditModeInj, EditModeInj,
@ -83,7 +84,8 @@ const checkTypeFunctions = {
type FilterType = keyof typeof checkTypeFunctions type FilterType = keyof typeof checkTypeFunctions
const { sqlUi } = $(useProject()) // todo: replace with sqlUis
const { sqlUi } = $(storeToRefs(useProject()))
const abstractType = $computed(() => (column.value?.dt && sqlUi ? sqlUi.getAbstractType(column.value) : null)) const abstractType = $computed(() => (column.value?.dt && sqlUi ? sqlUi.getAbstractType(column.value) : null))

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

@ -1,6 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { RequestParams } from 'nocodb-sdk' import type { RequestParams } from 'nocodb-sdk'
import { ExportTypes } from 'nocodb-sdk' import { ExportTypes } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import { import {
ActiveViewInj, ActiveViewInj,
FieldsInj, FieldsInj,
@ -27,7 +28,7 @@ const isPublicView = inject(IsPublicInj, ref(false))
const isView = false const isView = false
const { project } = useProject() const { project } = storeToRefs(useProject())
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

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

@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import type { GridType } from 'nocodb-sdk' import type { GridType } from 'nocodb-sdk'
import { ActiveViewInj, IsLockedInj, inject, ref, useMenuCloseOnEsc } from '#imports' import { ActiveViewInj, IsLockedInj, inject, ref, storeToRefs, useMenuCloseOnEsc } from '#imports'
const { isSharedBase } = useProject() const { isSharedBase } = storeToRefs(useProject())
const view = inject(ActiveViewInj, ref()) const view = inject(ActiveViewInj, ref())

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

@ -9,6 +9,7 @@ import {
message, message,
projectThemeColors, projectThemeColors,
ref, ref,
storeToRefs,
useCopy, useCopy,
useDashboard, useDashboard,
useI18n, useI18n,
@ -32,7 +33,7 @@ const { dashboardUrl } = useDashboard()
const { isUIAllowed } = useUIPermission() const { isUIAllowed } = useUIPermission()
const { isSharedBase } = useProject() const { isSharedBase } = storeToRefs(useProject())
let showShareModel = $ref(false) let showShareModel = $ref(false)

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

@ -9,6 +9,7 @@ import {
inject, inject,
message, message,
ref, ref,
storeToRefs,
useI18n, useI18n,
useMenuCloseOnEsc, useMenuCloseOnEsc,
useNuxtApp, useNuxtApp,
@ -58,7 +59,7 @@ const quickImportDialogs: Record<typeof quickImportDialogTypes[number], Ref<bool
const { isUIAllowed } = useUIPermission() const { isUIAllowed } = useUIPermission()
const { isSharedBase } = useProject() const { isSharedBase } = storeToRefs(useProject())
const meta = inject(MetaInj, ref()) const meta = inject(MetaInj, ref())

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

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ApiTokenType } from 'nocodb-sdk' import type { ApiTokenType } from 'nocodb-sdk'
import { extractSdkResponseErrorMsg, message, onMounted, useCopy, useI18n, useNuxtApp, useProject } from '#imports' import { extractSdkResponseErrorMsg, message, onMounted, storeToRefs, useCopy, useI18n, useNuxtApp, useProject } from '#imports'
interface ApiToken extends ApiTokenType { interface ApiToken extends ApiTokenType {
show?: boolean show?: boolean
@ -10,7 +10,7 @@ const { t } = useI18n()
const { $api, $e } = useNuxtApp() const { $api, $e } = useNuxtApp()
const { project } = $(useProject()) const { project } = $(storeToRefs(useProject()))
const { copy } = useCopy() const { copy } = useCopy()

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

@ -7,6 +7,7 @@ import {
onBeforeMount, onBeforeMount,
projectRoleTagColors, projectRoleTagColors,
ref, ref,
storeToRefs,
useApi, useApi,
useCopy, useCopy,
useDashboard, useDashboard,
@ -24,7 +25,7 @@ const { $e } = useNuxtApp()
const { api } = useApi() const { api } = useApi()
const { project } = useProject() const { project } = storeToRefs(useProject())
const { copy } = useCopy() const { copy } = useCopy()

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

@ -1,5 +1,15 @@
<script setup lang="ts"> <script setup lang="ts">
import { extractSdkResponseErrorMsg, message, onMounted, useCopy, useDashboard, useI18n, useNuxtApp, useProject } from '#imports' import {
extractSdkResponseErrorMsg,
message,
onMounted,
storeToRefs,
useCopy,
useDashboard,
useI18n,
useNuxtApp,
useProject,
} from '#imports'
interface ShareBase { interface ShareBase {
uuid?: string uuid?: string
@ -22,7 +32,7 @@ let base = $ref<null | ShareBase>(null)
const showEditBaseDropdown = $ref(false) const showEditBaseDropdown = $ref(false)
const { project } = useProject() const { project } = storeToRefs(useProject())
const { copy } = useCopy() const { copy } = useCopy()

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

@ -9,6 +9,7 @@ import {
projectRoleTagColors, projectRoleTagColors,
projectRoles, projectRoles,
ref, ref,
storeToRefs,
useActiveKeyupListener, useActiveKeyupListener,
useCopy, useCopy,
useDashboard, useDashboard,
@ -37,7 +38,7 @@ const emit = defineEmits(['closed', 'reload'])
const { t } = useI18n() const { t } = useI18n()
const { project } = useProject() const { project } = storeToRefs(useProject())
const { $api, $e } = useNuxtApp() const { $api, $e } = useNuxtApp()

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

@ -24,6 +24,7 @@ import {
parseStringDate, parseStringDate,
reactive, reactive,
ref, ref,
storeToRefs,
useI18n, useI18n,
useNuxtApp, useNuxtApp,
useProject, useProject,
@ -67,7 +68,9 @@ const { $api } = useNuxtApp()
const { addTab } = useTabs() const { addTab } = useTabs()
const { sqlUis, project, loadTables } = useProject() const projectStrore = useProject()
const { loadTables } = projectStrore
const { sqlUis, project } = storeToRefs(projectStrore)
const sqlUi = ref(sqlUis.value[baseId] || Object.values(sqlUis.value)[0]) const sqlUi = ref(sqlUis.value[baseId] || Object.values(sqlUis.value)[0])

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

@ -10,6 +10,7 @@ import {
extractSdkResponseErrorMsg, extractSdkResponseErrorMsg,
message, message,
ref, ref,
storeToRefs,
useI18n, useI18n,
useMetas, useMetas,
useNuxtApp, useNuxtApp,
@ -27,7 +28,9 @@ interface ValidationsObj {
const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState( const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState(
(meta: Ref<TableType | undefined>, column: Ref<ColumnType | undefined>) => { (meta: Ref<TableType | undefined>, column: Ref<ColumnType | undefined>) => {
const { project, sqlUis, isMysql: isMysqlFunc, isPg: isPgFunc, isMssql: isMssqlFunc } = useProject() const projectStore = useProject()
const { isMysql: isMysqlFunc, isPg: isPgFunc, isMssql: isMssqlFunc } = projectStore
const { project, sqlUis } = storeToRefs(projectStore)
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

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

@ -11,6 +11,7 @@ import {
message, message,
populateInsertObject, populateInsertObject,
ref, ref,
storeToRefs,
useApi, useApi,
useI18n, useI18n,
useInjectionState, useInjectionState,
@ -42,7 +43,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
const changedColumns = ref(new Set<string>()) const changedColumns = ref(new Set<string>())
const { project } = useProject() const { project } = storeToRefs(useProject())
const rowStore = useProvideSmartsheetRowStore(meta, row) const rowStore = useProvideSmartsheetRowStore(meta, row)

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

@ -11,6 +11,7 @@ import {
message, message,
reactive, reactive,
ref, ref,
storeToRefs,
useI18n, useI18n,
useInjectionState, useInjectionState,
useMetas, useMetas,
@ -38,7 +39,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
// state // state
const { metas, getMeta } = useMetas() const { metas, getMeta } = useMetas()
const { project } = useProject() const { project } = storeToRefs(useProject())
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

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

@ -1,7 +1,7 @@
import { reactive } from 'vue' import { reactive } from 'vue'
import type { ComputedRef, Ref } from 'vue' import type { ComputedRef, Ref } from 'vue'
import type { ColumnType, MapType, PaginatedType, TableType, ViewType } from 'nocodb-sdk' import type { ColumnType, MapType, PaginatedType, TableType, ViewType } from 'nocodb-sdk'
import { IsPublicInj, ref, useInjectionState, useMetas, useProject } from '#imports' import { IsPublicInj, ref, storeToRefs, useInjectionState, useMetas, useProject } from '#imports'
import type { Row } from '~/lib' import type { Row } from '~/lib'
const storedValue = localStorage.getItem('geodataToggleState') const storedValue = localStorage.getItem('geodataToggleState')
@ -35,7 +35,7 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
const { api } = useApi() const { api } = useApi()
const { project } = useProject() const { project } = storeToRefs(useProject())
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

Loading…
Cancel
Save