Skip to content

Commit

Permalink
chore(ui): rename some "global" utils to avoid common wrong config wh…
Browse files Browse the repository at this point in the history
…ere "global" string gets replaced by something #17169
  • Loading branch information
rstoenescu committed May 6, 2024
1 parent a64d384 commit 8bd5063
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ui/src/composables/private.use-portal/use-portal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { h, ref, onUnmounted, Teleport } from 'vue'
import { createComponent } from '../../utils/private.create/create.js'
import { noop } from '../../utils/event/event.js'
import { addFocusWaitFlag, removeFocusWaitFlag } from '../../utils/private.focus/focus-manager.js'
import { createGlobalNode, removeGlobalNode } from '../../utils/private.global/global-nodes.js'
import { createGlobalNode, removeGlobalNode } from '../../utils/private.config/nodes.js'
import { portalProxyList } from '../../utils/private.portal/portal.js'
import { injectProp } from '../../utils/private.inject-obj-prop/inject-obj-prop.js'

Expand Down
2 changes: 1 addition & 1 deletion ui/src/install-quasar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Lang from './plugins/lang/Lang.js'
import IconSet from './plugins/icon-set/IconSet.js'

import { quasarKey } from './utils/private.symbols/symbols.js'
import { globalConfig, globalConfigIsFrozen, freezeGlobalConfig } from './utils/private.global/global-config.js'
import { globalConfig, globalConfigIsFrozen, freezeGlobalConfig } from './utils/private.config/instance-config.js'
import { isObject } from './utils/is/is.js'

/**
Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/app-fullscreen/AppFullscreen.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createReactivePlugin } from '../../utils/private.create/create.js'
import { changeGlobalNodesTarget } from '../../utils/private.global/global-nodes.js'
import { changeGlobalNodesTarget } from '../../utils/private.config/nodes.js'

const prefixes = {}

Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/bottom-sheet/BottomSheet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BottomSheet from './component/BottomSheetComponent.js'
import globalDialog from '../../utils/private.global/global-dialog.js'
import globalDialog from '../../utils/private.dialog/create-dialog.js'

export default {
install ({ $q, parentApp }) {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/bottom-sheet/BottomSheet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mixins": [ "utils/private.global/global-dialog" ],
"mixins": [ "utils/private.dialog/create-dialog" ],

"meta": {
"docsUrl": "https://v2.quasar.dev/quasar-plugins/bottom-sheet"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/dialog/Dialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DialogPlugin from './component/DialogPluginComponent.js'
import globalDialog from '../../utils/private.global/global-dialog.js'
import globalDialog from '../../utils/private.dialog/create-dialog.js'

export default {
install ({ $q, parentApp }) {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/dialog/Dialog.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mixins": [ "utils/private.global/global-dialog" ],
"mixins": [ "utils/private.dialog/create-dialog" ],

"meta": {
"docsUrl": "https://v2.quasar.dev/quasar-plugins/dialog"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/loading-bar/LoadingBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createChildApp } from '../../install-quasar.js'

import { createReactivePlugin } from '../../utils/private.create/create.js'
import { noop } from '../../utils/event/event.js'
import { createGlobalNode } from '../../utils/private.global/global-nodes.js'
import { createGlobalNode } from '../../utils/private.config/nodes.js'
import { isObject } from '../../utils/is/is.js'

const barRef = ref(null)
Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/loading/Loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import QSpinner from '../../components/spinner/QSpinner.js'
import { createChildApp } from '../../install-quasar.js'

import { createReactivePlugin } from '../../utils/private.create/create.js'
import { createGlobalNode, removeGlobalNode } from '../../utils/private.global/global-nodes.js'
import { createGlobalNode, removeGlobalNode } from '../../utils/private.config/nodes.js'
import preventScroll from '../../utils/scroll/prevent-scroll.js'
import { isObject } from '../../utils/is/is.js'

Expand Down
2 changes: 1 addition & 1 deletion ui/src/plugins/notify/Notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { createChildApp } from '../../install-quasar.js'

import { createComponent } from '../../utils/private.create/create.js'
import { noop } from '../../utils/event/event.js'
import { createGlobalNode } from '../../utils/private.global/global-nodes.js'
import { createGlobalNode } from '../../utils/private.config/nodes.js'
import { isObject } from '../../utils/is/is.js'

let uid = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, test, expect } from 'vitest'
import { mount, config } from '@vue/test-utils'

import { globalConfig, globalConfigIsFrozen, freezeGlobalConfig } from './global-config.js'
import { globalConfig, globalConfigIsFrozen, freezeGlobalConfig } from './instance-config.js'

// We override Quasar install so we have a custom $q.config
const quasarVuePlugin = config.global.plugins.find(entry => entry.name === 'Quasar')
Expand All @@ -12,7 +12,7 @@ function mountWithConfig (config) {
mount({ template: '<div />' })
}

describe('[globalConfig API]', () => {
describe('[instanceConfig API]', () => {
describe('[Variables]', () => {
describe('[(variable)globalConfig]', () => {
test('is defined correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalConfig } from '../private.global/global-config.js'
import { globalConfig } from '../private.config/instance-config.js'

const nodesList = []
const portalTypeList = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, test, expect, afterEach } from 'vitest'

import { createGlobalNode, removeGlobalNode, changeGlobalNodesTarget } from './global-nodes.js'
import { globalConfig } from './global-config.js'
import { createGlobalNode, removeGlobalNode, changeGlobalNodesTarget } from './nodes.js'
import { globalConfig } from './instance-config.js'

let el = null

Expand All @@ -14,7 +14,7 @@ afterEach(() => {
}
})

describe('[globalNodes API]', () => {
describe('[nodes API]', () => {
describe('[Functions]', () => {
describe('[(function)createGlobalNode]', () => {
test('createGlobalNode(id)', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { h, ref, nextTick } from 'vue'

import { createChildApp } from '../../install-quasar.js'
import { createGlobalNode, removeGlobalNode } from '../private.global/global-nodes.js'
import { createGlobalNode, removeGlobalNode } from '../private.config/nodes.js'

const ssrAPI = {
onOk: () => ssrAPI,
Expand Down

0 comments on commit 8bd5063

Please sign in to comment.