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> <script lang="ts" setup>
import { useNuxtApp } from '#app' import { useNuxtApp } from '#imports'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { extractSdkResponseErrorMsg, useApi, useGlobal } from '#imports' import { extractSdkResponseErrorMsg, useApi, useGlobal } from '#imports'

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

@ -26,6 +26,7 @@ import {
useDialog, useDialog,
useGlobal, useGlobal,
useI18n, useI18n,
useNuxtApp,
useRoles, useRoles,
useRouter, useRouter,
useTablesStore, useTablesStore,
@ -33,7 +34,6 @@ import {
useToggle, useToggle,
} from '#imports' } from '#imports'
import type { NcProject } from '#imports' import type { NcProject } from '#imports'
import { useNuxtApp } from '#app'
const indicator = h(LoadingOutlined, { const indicator = h(LoadingOutlined, {
class: '!text-gray-400', 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 { storeToRefs } from 'pinia'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import TableNode from './TableNode.vue' import TableNode from './TableNode.vue'
import { useNuxtApp } from '#app' import { toRef, useNuxtApp } from '#imports'
import { toRef } 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 { useNuxtApp } from '#app' import { ProjectRoleInj, TreeViewInj, useNuxtApp, useRoles, useTabs } from '#imports'
import { ProjectRoleInj, TreeViewInj, useRoles, useTabs } from '#imports'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

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

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

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

@ -31,12 +31,12 @@ import {
useBase, useBase,
useGlobal, useGlobal,
useI18n, useI18n,
useNuxtApp,
useVModel, useVModel,
} from '#imports' } 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'
import { useNuxtApp } from '#app'
interface Props { interface Props {
modelValue: boolean modelValue: boolean

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

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

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

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

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

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

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

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

2
packages/nc-gui/package.json

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

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

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

2457
pnpm-lock.yaml

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