Browse Source

Merge pull request #6912 from danielroe/app-import

fix: import nuxt composables from #imports
pull/6922/head
աӄա 1 year ago committed by GitHub
parent
commit
4512fadc1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/account/License.vue
  2. 2
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  3. 3
      packages/nc-gui/components/dashboard/TreeView/TableList.vue
  4. 3
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue
  5. 3
      packages/nc-gui/components/dashboard/TreeView/index.vue
  6. 2
      packages/nc-gui/components/dlg/QuickImport.vue
  7. 2
      packages/nc-gui/components/workspace/ProjectList.vue
  8. 3
      packages/nc-gui/composables/useGlobal/actions.ts
  9. 2
      packages/nc-gui/composables/useGlobal/index.ts
  10. 2
      packages/nc-gui/helpers/parsers/JSONUrlTemplateAdapter.ts
  11. 2
      packages/nc-gui/package.json
  12. 2
      packages/nc-gui/plugins/state.ts
  13. 2457
      pnpm-lock.yaml

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

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

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

@ -26,6 +26,7 @@ import {
useDialog,
useGlobal,
useI18n,
useNuxtApp,
useRoles,
useRouter,
useTablesStore,
@ -33,7 +34,6 @@ import {
useToggle,
} from '#imports'
import type { NcProject } from '#imports'
import { useNuxtApp } from '#app'
const indicator = h(LoadingOutlined, {
class: '!text-gray-400',

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

@ -3,8 +3,7 @@ import type { BaseType, TableType } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import Sortable from 'sortablejs'
import TableNode from './TableNode.vue'
import { useNuxtApp } from '#app'
import { toRef } from '#imports'
import { toRef, useNuxtApp } from '#imports'
const props = withDefaults(
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 { storeToRefs } from 'pinia'
import { useNuxtApp } from '#app'
import { ProjectRoleInj, TreeViewInj, useRoles, useTabs } from '#imports'
import { ProjectRoleInj, TreeViewInj, useNuxtApp, useRoles, useTabs } from '#imports'
const props = withDefaults(
defineProps<{

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

@ -18,11 +18,10 @@ import {
useDialog,
useNuxtApp,
useRoles,
useRouter,
useTablesStore,
} from '#imports'
import { useRouter } from '#app'
const { isUIAllowed } = useRoles()
const { $e } = useNuxtApp()

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

@ -31,12 +31,12 @@ import {
useBase,
useGlobal,
useI18n,
useNuxtApp,
useVModel,
} from '#imports'
// import worker script according to the doc of Vite
import importWorkerUrl from '~/workers/importWorker?worker&url'
import { useNuxtApp } from '#app'
interface Props {
modelValue: boolean

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

@ -15,10 +15,10 @@ import {
timeAgo,
useBases,
useGlobal,
useNuxtApp,
useRoles,
useWorkspace,
} from '#imports'
import { useNuxtApp } from '#app'
const workspaceStore = useWorkspace()

3
packages/nc-gui/composables/useGlobal/actions.ts

@ -1,8 +1,7 @@
import { getActivePinia } from 'pinia'
import type { Actions, AppInfo, State } from './types'
import type { NcProjectType } from '#imports'
import { message, useNuxtApp } from '#imports'
import { navigateTo } from '#app'
import { message, navigateTo, useNuxtApp } from '#imports'
export function useGlobalActions(state: State): Actions {
const setIsMobileMode = (isMobileMode: boolean) => {

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

@ -16,7 +16,7 @@ export * from './types'
*
* @example
* ```js
* import { useNuxtApp } from '#app'
* import { useNuxtApp } from '#imports'
*
* const { $state } = useNuxtApp()
*

2
packages/nc-gui/helpers/parsers/JSONUrlTemplateAdapter.ts

@ -1,6 +1,6 @@
import type { Api } from 'nocodb-sdk'
import JSONTemplateAdapter from './JSONTemplateAdapter'
// import { useNuxtApp } from '#app'
// import { useNuxtApp } from '#imports'
export default class JSONUrlTemplateAdapter extends JSONTemplateAdapter {
url: string

2
packages/nc-gui/package.json

@ -143,7 +143,7 @@
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"happy-dom": "^6.0.3",
"nuxt": "^3.6.5",
"nuxt": "^3.8.1",
"nuxt-windicss": "^2.6.1",
"prettier": "^2.7.1",
"sass": "^1.63.4",

2
packages/nc-gui/plugins/state.ts

@ -6,7 +6,7 @@ import { loadLocaleMessages, setI18nLanguage } from '~/plugins/a.i18n'
*
* @example
* ```js
* import { useNuxtApp } from '#app'
* import { useNuxtApp } from '#imports'
*
* const { $state } = useNuxtApp()
*

2457
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save