@koumoul/vjsf 3.20.7 → 3.20.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/fragments/help-message.vue +5 -1
- package/src/components/fragments/text-field-menu.vue +2 -2
- package/src/components/nodes/combobox.vue +2 -2
- package/src/components/nodes/list.vue +2 -1
- package/src/components/nodes/number-combobox.vue +2 -2
- package/src/components/nodes/one-of-select.vue +2 -2
- package/src/composables/use-get-items.js +5 -2
- package/src/composables/use-select-node.js +2 -2
- package/src/composables/use-z-index-stack.js +9 -12
- package/src/styles/vjsf.css +2 -2
- package/types/composables/use-get-items.d.ts.map +1 -1
- package/types/composables/use-z-index-stack.d.ts +1 -1
- package/types/composables/use-z-index-stack.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
:class="`vjsf-help-message-tooltip vjsf-help-message-tooltip-${node.options.density}`"
|
|
6
6
|
location="top end"
|
|
7
7
|
offset="4"
|
|
8
|
+
:z-index="zIndex"
|
|
8
9
|
:close-on-content-click="false"
|
|
9
10
|
>
|
|
10
11
|
<template #activator="{ props }">
|
|
@@ -42,8 +43,9 @@ import { VAlert } from 'vuetify/components/VAlert'
|
|
|
42
43
|
import { VMenu } from 'vuetify/components/VMenu'
|
|
43
44
|
import { VBtn } from 'vuetify/components/VBtn'
|
|
44
45
|
import { ref } from 'vue'
|
|
46
|
+
import useZIndexStack from '../../composables/use-z-index-stack.js'
|
|
45
47
|
|
|
46
|
-
defineProps({
|
|
48
|
+
const props = defineProps({
|
|
47
49
|
node: {
|
|
48
50
|
/** @type import('vue').PropType<import('../../types.js').VjsfNode> */
|
|
49
51
|
type: Object,
|
|
@@ -51,6 +53,8 @@ defineProps({
|
|
|
51
53
|
}
|
|
52
54
|
})
|
|
53
55
|
|
|
56
|
+
const zIndex = useZIndexStack(props.node.fullKey)
|
|
57
|
+
|
|
54
58
|
const show = ref(false)
|
|
55
59
|
</script>
|
|
56
60
|
|
|
@@ -55,14 +55,14 @@ const fieldProps = computed(() => {
|
|
|
55
55
|
return fieldProps
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
const zIndex = useZIndexStack(
|
|
58
|
+
const zIndex = useZIndexStack(props.modelValue.fullKey)
|
|
59
59
|
|
|
60
60
|
const menuProps = computed(() => {
|
|
61
61
|
return {
|
|
62
62
|
...compProps.value,
|
|
63
63
|
minWidth: props.minWidth,
|
|
64
64
|
maxWidth: props.maxWidth,
|
|
65
|
-
zIndex
|
|
65
|
+
zIndex,
|
|
66
66
|
closeOnContentClick: false,
|
|
67
67
|
disabled: true
|
|
68
68
|
}
|
|
@@ -25,7 +25,7 @@ export default defineComponent({
|
|
|
25
25
|
const nodeRef = toRef(props, 'modelValue')
|
|
26
26
|
const getItems = useGetItems(nodeRef, props.statefulLayout)
|
|
27
27
|
const { inputProps, compSlots, localData, layout, options } = useNode(nodeRef, props.statefulLayout)
|
|
28
|
-
const zIndex = useZIndexStack(
|
|
28
|
+
const zIndex = useZIndexStack(props.modelValue.fullKey)
|
|
29
29
|
|
|
30
30
|
const fieldProps = computed(() => {
|
|
31
31
|
const fieldProps = { ...inputProps.value }
|
|
@@ -33,7 +33,7 @@ export default defineComponent({
|
|
|
33
33
|
if (options.value.readOnly) {
|
|
34
34
|
fieldProps.menuProps = { modelValue: false }
|
|
35
35
|
} else {
|
|
36
|
-
fieldProps.menuProps = { zIndex
|
|
36
|
+
fieldProps.menuProps = { zIndex }
|
|
37
37
|
}
|
|
38
38
|
if (getItems.hasItems.value) {
|
|
39
39
|
fieldProps.items = getItems.items.value
|
|
@@ -70,7 +70,7 @@ const prepareDrag = (/** @type {number} */index) => {
|
|
|
70
70
|
menuOpened.value = -1
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
const zIndex = useZIndexStack(
|
|
73
|
+
const zIndex = useZIndexStack(props.modelValue.fullKey)
|
|
74
74
|
|
|
75
75
|
/* manage hovered and edited items */
|
|
76
76
|
// const editedItem = computed(() => activatedItems.value[fullKey.value])
|
|
@@ -495,6 +495,7 @@ const itemBorderColor = computed(() => (/** @type {import('@json-layout/core').S
|
|
|
495
495
|
v-if="layout.listEditMode === 'dialog'"
|
|
496
496
|
:model-value="editedItem !== undefined"
|
|
497
497
|
v-bind="vEditDialogProps"
|
|
498
|
+
:z-index="zIndex"
|
|
498
499
|
>
|
|
499
500
|
<v-sheet v-bind="vEditDialogVSheetProps">
|
|
500
501
|
<v-toolbar
|
|
@@ -25,7 +25,7 @@ export default defineComponent({
|
|
|
25
25
|
const nodeRef = toRef(props, 'modelValue')
|
|
26
26
|
const getItems = useGetItems(nodeRef, props.statefulLayout)
|
|
27
27
|
const { inputProps, compSlots, localData, layout, options } = useNode(nodeRef, props.statefulLayout, { bindData: false, layoutPropsMap: ['step', 'min', 'max'] })
|
|
28
|
-
const zIndex = useZIndexStack(
|
|
28
|
+
const zIndex = useZIndexStack(props.modelValue.fullKey)
|
|
29
29
|
|
|
30
30
|
const fieldProps = computed(() => {
|
|
31
31
|
const fieldProps = { ...inputProps.value }
|
|
@@ -34,7 +34,7 @@ export default defineComponent({
|
|
|
34
34
|
if (options.value.readOnly) {
|
|
35
35
|
fieldProps.menuProps = { modelValue: false }
|
|
36
36
|
} else {
|
|
37
|
-
fieldProps.menuProps = { zIndex
|
|
37
|
+
fieldProps.menuProps = { zIndex }
|
|
38
38
|
}
|
|
39
39
|
if (getItems.hasItems.value) {
|
|
40
40
|
fieldProps.items = getItems.items.value
|
|
@@ -27,7 +27,7 @@ const props = defineProps({
|
|
|
27
27
|
const { inputProps, localData, skeleton, children } = useNode(
|
|
28
28
|
toRef(props, 'modelValue'), props.statefulLayout, { bindData: false }
|
|
29
29
|
)
|
|
30
|
-
const zIndex = useZIndexStack(
|
|
30
|
+
const zIndex = useZIndexStack(props.modelValue.fullKey)
|
|
31
31
|
|
|
32
32
|
/** @type import('vue').Ref<string | undefined> */
|
|
33
33
|
const activeChildTree = ref(undefined)
|
|
@@ -50,7 +50,7 @@ const fieldProps = computed(() => {
|
|
|
50
50
|
const fieldProps = { ...inputProps.value }
|
|
51
51
|
fieldProps['onUpdate:modelValue'] = onChange
|
|
52
52
|
if (!props.modelValue.options.readOnly) {
|
|
53
|
-
fieldProps.menuProps = { zIndex
|
|
53
|
+
fieldProps.menuProps = { zIndex }
|
|
54
54
|
}
|
|
55
55
|
const items = []
|
|
56
56
|
for (const childTreePointer of skeleton.value.childrenTrees || []) {
|
|
@@ -18,8 +18,11 @@ export default function (nodeRef, statefulLayout) {
|
|
|
18
18
|
|
|
19
19
|
const fetchItems = async () => {
|
|
20
20
|
loading.value = true
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
try {
|
|
22
|
+
items.value = await statefulLayout.getItems(nodeRef.value, search.value)
|
|
23
|
+
} finally {
|
|
24
|
+
loading.value = false
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
watch(() => nodeRef.value.itemsCacheKey, (newValue, oldValue) => {
|
|
@@ -17,7 +17,7 @@ export default function (nodeRef, statefulLayout, avatarProps, cssPrefix) {
|
|
|
17
17
|
|
|
18
18
|
const { inputProps, options, skeleton, localData, compSlots } = useField(nodeRef, statefulLayout, { layoutPropsMap: ['multiple', 'placeholder'], bindData: false })
|
|
19
19
|
const getItems = useGetItems(nodeRef, statefulLayout)
|
|
20
|
-
const zIndex = useZIndexStack(
|
|
20
|
+
const zIndex = useZIndexStack(nodeRef.value.fullKey)
|
|
21
21
|
|
|
22
22
|
const selectProps = computed(() => {
|
|
23
23
|
const props = { ...inputProps.value }
|
|
@@ -25,7 +25,7 @@ export default function (nodeRef, statefulLayout, avatarProps, cssPrefix) {
|
|
|
25
25
|
if (options.value.readOnly) {
|
|
26
26
|
props.menuProps = { modelValue: false }
|
|
27
27
|
} else {
|
|
28
|
-
props.menuProps = { zIndex
|
|
28
|
+
props.menuProps = { zIndex }
|
|
29
29
|
}
|
|
30
30
|
props.clearable = props.clearable ?? !skeleton.value.required
|
|
31
31
|
props.valueComparator = (/** @type {any} */a, /** @type {any} */b) => {
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
// vuetify zIndex stacking is buggy (for example https://github.com/vuetifyjs/vuetify/issues/16251)
|
|
2
2
|
// we try to work around this in this composable
|
|
3
3
|
|
|
4
|
-
import { provide, inject
|
|
4
|
+
import { provide, inject } from 'vue'
|
|
5
5
|
|
|
6
6
|
const symbol = Symbol.for('vjsf:z-index-stack')
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @param {
|
|
9
|
+
* @param {string} fullKey
|
|
10
10
|
*/
|
|
11
|
-
export default (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
return newZIndex
|
|
20
|
-
})
|
|
11
|
+
export default (fullKey) => {
|
|
12
|
+
const currentZIndex = inject(symbol, { zIndex: 3000, fullKey, initial: true })
|
|
13
|
+
const newZIndex = currentZIndex.zIndex + 10
|
|
14
|
+
if (currentZIndex.initial || fullKey.length > currentZIndex.fullKey.length) {
|
|
15
|
+
provide(symbol, { zIndex: newZIndex, fullKey })
|
|
16
|
+
}
|
|
17
|
+
return newZIndex
|
|
21
18
|
}
|
package/src/styles/vjsf.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-get-items.d.ts","sourceRoot":"","sources":["../../src/composables/use-get-items.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,0CAHW,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,aAAa,EAAE,QAAQ,CAAC,kBACjD,OAAO,aAAa,EAAE,kBAAkB;;;;;
|
|
1
|
+
{"version":3,"file":"use-get-items.d.ts","sourceRoot":"","sources":["../../src/composables/use-get-items.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,0CAHW,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,aAAa,EAAE,QAAQ,CAAC,kBACjD,OAAO,aAAa,EAAE,kBAAkB;;;;;wCAiCtC,GAAG,aACH,GAAG;EAiBf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-z-index-stack.d.ts","sourceRoot":"","sources":["../../src/composables/use-z-index-stack.js"],"names":[],"mappings":"AAUe,
|
|
1
|
+
{"version":3,"file":"use-z-index-stack.d.ts","sourceRoot":"","sources":["../../src/composables/use-z-index-stack.js"],"names":[],"mappings":"AAUe,mCAFJ,MAAM,UAShB"}
|