x-prop-tree 0.7.44 → 0.7.45
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/dist/components/propTree/index.vue.d.ts +0 -1
- package/dist/components/propTree/main.vue.d.ts +3 -0
- package/dist/components/values/adaptSlotSelect/index.vue.d.ts +10 -3
- package/dist/components/values/compSelect/index.vue.d.ts +10 -3
- package/dist/components/values/iconSelect/index.vue.d.ts +9 -1
- package/dist/components/values/jsonEditor/index.vue.d.ts +10 -3
- package/dist/components/values/multiTypes/index.vue.d.ts +1 -0
- package/dist/components/values/slotSelect/index.vue.d.ts +10 -3
- package/dist/composables/adaptSlotList/index.d.ts +1 -2
- package/dist/composables/uis/uiAdaptSlotSelect.d.ts +3 -3
- package/dist/composables/uis/uiColorPicker.d.ts +3 -3
- package/dist/composables/uis/uiCompSelect.d.ts +3 -3
- package/dist/composables/uis/uiDummy.d.ts +3 -3
- package/dist/composables/uis/uiJsonEditor.d.ts +3 -3
- package/dist/composables/uis/uiMultiTypes.d.ts +3 -3
- package/dist/composables/uis/uiNumInput.d.ts +3 -3
- package/dist/composables/uis/uiProperty.d.ts +3 -4
- package/dist/composables/uis/uiSelect.d.ts +3 -3
- package/dist/composables/uis/uiSlotSelect.d.ts +3 -3
- package/dist/composables/uis/uiStrInput.d.ts +3 -3
- package/dist/composables/uis/uiSwitch.d.ts +3 -3
- package/dist/index.js +1102 -969
- package/dist/utils/collapseState.d.ts +3 -2
- package/dist/utils/common.d.ts +9 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/propertyState.d.ts +3 -4
- package/dist/utils/provideInject.d.ts +4 -1
- package/package.json +2 -2
- package/dist/utils/misc.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -1,191 +1,183 @@
|
|
|
1
1
|
import { a as cloneDeep_default, i as isEqual_default, n as setCollapse$1, r as tidyList, t as getListEntry } from "./vendor.gmzhs72f.js";
|
|
2
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, inject, isRef, mergeModels, mergeProps, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveComponent, resolveDirective, toDisplayString, unref, useId, useModel, useTemplateRef, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
|
+
import { getElement, getPropertyDefault, getPropertyDefaultArray, getTag, makeSlotId, parsePercentStr, parsePixelStr, pkgs } from "x-runtime-lib";
|
|
3
4
|
import { useI18n } from "vue-i18n";
|
|
4
5
|
import { eventBus, globalObjects, injectDark, injectLocale, openNumberDlg, openPromptDlg, useColor, useSystem, useViewStack } from "x-essential-lib";
|
|
5
|
-
import { getElement, getPropertyDefault, getTag, makeSlotId, parsePercentStr, parsePixelStr, pkgs } from "x-runtime-lib";
|
|
6
6
|
import { globalState } from "x-state-lib";
|
|
7
7
|
import { useDisplay } from "vuetify";
|
|
8
8
|
import { XBlockly } from "x-block-lib";
|
|
9
|
-
function isCollapse(e,
|
|
10
|
-
let
|
|
11
|
-
for (let e of
|
|
12
|
-
if (!
|
|
13
|
-
|
|
9
|
+
function isCollapse(e, w) {
|
|
10
|
+
let T = e.value;
|
|
11
|
+
for (let e of w) {
|
|
12
|
+
if (!T.children[e]) return !0;
|
|
13
|
+
T = T.children[e];
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return T.collapse;
|
|
16
16
|
}
|
|
17
|
-
function setCollapse(e,
|
|
18
|
-
let
|
|
19
|
-
for (let e of
|
|
17
|
+
function setCollapse(e, w, T) {
|
|
18
|
+
let E = e.value;
|
|
19
|
+
for (let e of w) E.children[e] || (E.children[e] = {
|
|
20
20
|
collapse: !0,
|
|
21
21
|
children: {}
|
|
22
|
-
}),
|
|
23
|
-
|
|
22
|
+
}), E = E.children[e];
|
|
23
|
+
E.collapse = T;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
let
|
|
27
|
-
if (e.ui !== m.ui || e.array !== m.array) return !1;
|
|
28
|
-
if (e.ui || m.ui) return !0;
|
|
29
|
-
if (e.children.length !== m.children.length) return !1;
|
|
30
|
-
for (let _ = 0; _ < e.children.length; _++) if (!g(e.children[_], m.children[_])) return !1;
|
|
31
|
-
return !0;
|
|
32
|
-
};
|
|
33
|
-
return g(e, m);
|
|
34
|
-
}, unpkgProperty = (e, m) => {
|
|
35
|
-
let g = {
|
|
25
|
+
function unpkgProperty(e, w) {
|
|
26
|
+
let T = {
|
|
36
27
|
key: "",
|
|
37
28
|
name: "",
|
|
38
29
|
children: e
|
|
39
30
|
};
|
|
40
|
-
for (let e of
|
|
41
|
-
if (!
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
if (g.ui) {
|
|
46
|
-
console.assert(!1, `property ui must be invalid keys=${m}`);
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
typeof e != "number" && (g = g.children.find((m) => m.key === e));
|
|
31
|
+
for (let e of w) {
|
|
32
|
+
if (!T) throw Error("target must be valid");
|
|
33
|
+
if (T.ui) throw Error("target ui must be invalid");
|
|
34
|
+
typeof e != "number" && (T = T.children.find((w) => w.key === e));
|
|
50
35
|
}
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
g = g[e];
|
|
36
|
+
return T;
|
|
37
|
+
}
|
|
38
|
+
function unpkgObject(e, w) {
|
|
39
|
+
let T = e;
|
|
40
|
+
for (let e of w) {
|
|
41
|
+
if (!T) throw Error("target must be valid");
|
|
42
|
+
T = T[e];
|
|
60
43
|
}
|
|
61
|
-
return
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
44
|
+
return T;
|
|
45
|
+
}
|
|
46
|
+
function ensureArrayValue(e, T, E, D, O, k) {
|
|
47
|
+
if (D !== void 0 && !O) {
|
|
48
|
+
if (!(E[D] instanceof Array)) {
|
|
49
|
+
let O = getPropertyDefaultArray(T);
|
|
50
|
+
isEqual_default(O, E[D]) || (E[D] = O, k(e, E[D]));
|
|
67
51
|
}
|
|
68
|
-
return
|
|
52
|
+
return E[D];
|
|
69
53
|
} else {
|
|
70
|
-
if (
|
|
71
|
-
let
|
|
72
|
-
|
|
54
|
+
if (!(E[T.key] instanceof Array)) {
|
|
55
|
+
let D = getPropertyDefaultArray(T);
|
|
56
|
+
isEqual_default(D, E[T.key]) || (E[T.key] = D, k(e, E[T.key]));
|
|
73
57
|
}
|
|
74
|
-
return
|
|
58
|
+
return E[T.key];
|
|
75
59
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
60
|
+
}
|
|
61
|
+
function getModelValue(e, T, E, D, O, k) {
|
|
62
|
+
if (D !== void 0 && !O) {
|
|
63
|
+
if (E[D] === void 0) {
|
|
64
|
+
let O = getPropertyDefault(T);
|
|
65
|
+
isEqual_default(O, E[D]) || (E[D] = O, k(e, E[D]));
|
|
80
66
|
}
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
67
|
+
return E[D];
|
|
68
|
+
} else {
|
|
69
|
+
if (E[T.key] === void 0) {
|
|
70
|
+
let D = getPropertyDefault(T);
|
|
71
|
+
isEqual_default(D, E[T.key]) || (E[T.key] = D, k(e, E[T.key]));
|
|
72
|
+
}
|
|
73
|
+
return E[T.key];
|
|
88
74
|
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
75
|
+
}
|
|
76
|
+
function setModelValue(e, w, T, E, D, O, k) {
|
|
77
|
+
D !== void 0 && !O ? E !== T[D] && (T[D] = E, k(e, T[D])) : E !== T[w.key] && (T[w.key] = E, k(e, T[w.key]));
|
|
78
|
+
}
|
|
79
|
+
const isPropertyCompatible = (e, w) => {
|
|
80
|
+
let T = (e, w) => {
|
|
81
|
+
if (e.ui !== w.ui || e.array !== w.array) return !1;
|
|
82
|
+
if (e.ui || w.ui) return !0;
|
|
83
|
+
if (e.children.length !== w.children.length) return !1;
|
|
84
|
+
for (let E = 0; E < e.children.length; E++) if (!T(e.children[E], w.children[E])) return !1;
|
|
85
|
+
return !0;
|
|
99
86
|
};
|
|
100
|
-
|
|
87
|
+
return T(e, w);
|
|
88
|
+
};
|
|
89
|
+
var propertyStateIgnores = [["basic", "id"], ["basic", "name"]];
|
|
90
|
+
function isPropertyStateIgnored(e) {
|
|
91
|
+
return propertyStateIgnores.find((T) => isEqual_default(e, T));
|
|
92
|
+
}
|
|
93
|
+
function execProperty(w, T, E, D, O, k) {
|
|
94
|
+
return w = cloneDeep_default(w), O === void 0 ? w.push(T.key) : (w.push(O), k && w.push(T.key)), isPropertyStateIgnored(w) ? (D.change = !1, D.warning = !1, {
|
|
95
|
+
change: D.change,
|
|
96
|
+
warning: D.warning
|
|
97
|
+
}) : T.ui ? T.array && D.children ? execPropertyLeafArray(w, T, E, D, O, k) : execPropertyLeafScalar(T, E, D, O, k) : T.array ? execPropertyBranchArray(w, T, E, D, O, k) : execPropertyBranchScalar(w, T, E, D, O, k);
|
|
98
|
+
}
|
|
99
|
+
function execPropertyBranchArray(e, T, E, D, O, k) {
|
|
100
|
+
if (T.ui) throw Error("execPropertyBranchArray property ui must be invalid");
|
|
101
|
+
if (!T.array) throw Error("execPropertyBranchArray property array must be valid");
|
|
102
|
+
let A;
|
|
103
|
+
if (A = O !== void 0 && !k ? E[O] : E[T.key], !(A instanceof Array)) return D.change = !1, D.warning = !1, {
|
|
101
104
|
change: !1,
|
|
102
105
|
warning: !1
|
|
103
106
|
};
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
for (let m = 0; m < S.length; m++) {
|
|
107
|
-
v.children[m] = {
|
|
107
|
+
for (let w = 0; w < A.length; w++) {
|
|
108
|
+
D.children[w] = {
|
|
108
109
|
change: !1,
|
|
109
110
|
warning: !1,
|
|
110
111
|
children: {}
|
|
111
112
|
};
|
|
112
|
-
let
|
|
113
|
-
for (let
|
|
114
|
-
|
|
113
|
+
let E = D.children[w];
|
|
114
|
+
for (let O of T.children) {
|
|
115
|
+
E.children[O.key] = {
|
|
115
116
|
change: !1,
|
|
116
117
|
warning: !1,
|
|
117
118
|
children: {}
|
|
118
119
|
};
|
|
119
|
-
let { change:
|
|
120
|
-
!
|
|
120
|
+
let { change: T, warning: k } = execProperty(e, O, A[w], E.children[O.key], w, !0);
|
|
121
|
+
!E.change && T && (E.change = T), !E.change && k && (E.warning = k), !D.change && E.change && (D.change = E.change), !D.warning && E.warning && (D.warning = E.warning);
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
return
|
|
124
|
-
change:
|
|
125
|
-
warning:
|
|
126
|
-
};
|
|
127
|
-
}, execPropertyBranchScalar = (e, m, g, _, v, y, b) => {
|
|
128
|
-
if (m.ui) return console.assert(!1, "execPropertyBranchScalar property ui must be invalid"), {
|
|
129
|
-
change: !1,
|
|
130
|
-
warning: !1
|
|
131
|
-
};
|
|
132
|
-
if (m.array) return console.assert(!1, "execPropertyBranchScalar property array must be invalid"), {
|
|
133
|
-
change: !1,
|
|
134
|
-
warning: !1
|
|
124
|
+
return D.change ||= !isEqual_default(A, getPropertyDefaultArray(T)), {
|
|
125
|
+
change: D.change,
|
|
126
|
+
warning: D.warning
|
|
135
127
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
128
|
+
}
|
|
129
|
+
function execPropertyBranchScalar(e, w, T, E, D, O) {
|
|
130
|
+
if (w.ui) throw Error("execPropertyBranchScalar property ui must be invalid");
|
|
131
|
+
if (w.array) throw Error("execPropertyBranchScalar property array must be invalid");
|
|
132
|
+
let k;
|
|
133
|
+
k = D !== void 0 && !O ? T[D] : T[w.key];
|
|
134
|
+
for (let T = 0; T < w.children.length; T++) {
|
|
135
|
+
let D = w.children[T];
|
|
136
|
+
E.children[D.key] = {
|
|
141
137
|
change: !1,
|
|
142
138
|
warning: !1,
|
|
143
139
|
children: {}
|
|
144
140
|
};
|
|
145
|
-
let { change:
|
|
146
|
-
!
|
|
141
|
+
let { change: O, warning: A } = execProperty(e, D, k, E.children[D.key], void 0, !1);
|
|
142
|
+
!E.change && O && (E.change = O), !E.warning && A && (E.warning = A);
|
|
147
143
|
}
|
|
148
144
|
return {
|
|
149
|
-
change:
|
|
150
|
-
warning:
|
|
151
|
-
};
|
|
152
|
-
}, execPropertyLeafArray = (e, g, _, v, y, b, x) => {
|
|
153
|
-
if (!g.ui) return console.assert(!1, "execPropertyLeafArray property ui must be valid"), {
|
|
154
|
-
change: !1,
|
|
155
|
-
warning: !1
|
|
145
|
+
change: E.change,
|
|
146
|
+
warning: E.change
|
|
156
147
|
};
|
|
157
|
-
|
|
148
|
+
}
|
|
149
|
+
function execPropertyLeafArray(e, T, E, D, O, k) {
|
|
150
|
+
if (!T.ui) throw Error("execPropertyLeafArray property ui must be valid");
|
|
151
|
+
if (!T.array) throw Error("execPropertyLeafArray property aray must be valid");
|
|
152
|
+
let A;
|
|
153
|
+
if (A = O !== void 0 && !k ? E[O] : E[T.key], !(A instanceof Array)) return D.change = !1, D.warning = !1, {
|
|
158
154
|
change: !1,
|
|
159
155
|
warning: !1
|
|
160
156
|
};
|
|
161
|
-
let
|
|
162
|
-
|
|
163
|
-
for (let m = 0; m < S.length; m++) {
|
|
164
|
-
v.children[m] = {
|
|
157
|
+
for (let w = 0; w < A.length; w++) {
|
|
158
|
+
D.children[w] = {
|
|
165
159
|
change: !1,
|
|
166
160
|
warning: !1,
|
|
167
161
|
children: {}
|
|
168
162
|
};
|
|
169
|
-
let { change:
|
|
170
|
-
!
|
|
163
|
+
let { change: E, warning: O } = execProperty(e, T, A, D.children[w], w, !1);
|
|
164
|
+
!D.change && E && (D.change = E), !D.warning && O && (D.warning = O);
|
|
171
165
|
}
|
|
172
|
-
return
|
|
173
|
-
change:
|
|
174
|
-
warning:
|
|
166
|
+
return D.change ||= !isEqual_default(A, getPropertyDefaultArray(T)), {
|
|
167
|
+
change: D.change,
|
|
168
|
+
warning: D.warning
|
|
175
169
|
};
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
change: _.change,
|
|
184
|
-
warning: _.warning
|
|
170
|
+
}
|
|
171
|
+
function execPropertyLeafScalar(e, T, E, D, O) {
|
|
172
|
+
if (!e.ui) throw Error("execPropertyLeafScalar property ui must be valid");
|
|
173
|
+
let k;
|
|
174
|
+
return k = D !== void 0 && !O ? T[D] : T[e.key], E.change = !isEqual_default(k, getPropertyDefault(e)), {
|
|
175
|
+
change: E.change,
|
|
176
|
+
warning: E.warning
|
|
185
177
|
};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
if (
|
|
178
|
+
}
|
|
179
|
+
function rebuildPropertyState(e, w, T) {
|
|
180
|
+
if (w.length <= 0 || !T) {
|
|
189
181
|
e.value = {
|
|
190
182
|
change: !1,
|
|
191
183
|
warning: !1,
|
|
@@ -193,35 +185,48 @@ const rebuildPropertyState = (e, m, g, _) => {
|
|
|
193
185
|
};
|
|
194
186
|
return;
|
|
195
187
|
}
|
|
196
|
-
let
|
|
188
|
+
let E = {
|
|
197
189
|
change: !1,
|
|
198
190
|
warning: !1,
|
|
199
191
|
children: {}
|
|
200
192
|
};
|
|
201
|
-
for (let e of
|
|
202
|
-
let
|
|
193
|
+
for (let e of w) {
|
|
194
|
+
let w = {
|
|
203
195
|
change: !1,
|
|
204
196
|
warning: !1,
|
|
205
197
|
children: {}
|
|
206
198
|
};
|
|
207
|
-
|
|
199
|
+
E.children[e.key] = w, execProperty([], e, T, w, void 0, !1);
|
|
208
200
|
}
|
|
209
|
-
e.value =
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
201
|
+
e.value = E;
|
|
202
|
+
}
|
|
203
|
+
function isPropertyChanged(e, w) {
|
|
204
|
+
let T = e;
|
|
205
|
+
for (let e of w) {
|
|
206
|
+
if (!T.children[e]) return !1;
|
|
207
|
+
T = T.children[e];
|
|
215
208
|
}
|
|
216
|
-
return
|
|
217
|
-
}
|
|
218
|
-
var versionKey = Symbol(), configKey = Symbol(), objectKey = Symbol(), propertyStateKey = Symbol(), changeEventKey = Symbol(), compListKey = Symbol(), slotListKey = Symbol(), adaptSlotListKey = Symbol();
|
|
209
|
+
return T.change;
|
|
210
|
+
}
|
|
211
|
+
var versionKey = Symbol(), typeKey = Symbol(), subtypeKey = Symbol(), configKey = Symbol(), objectKey = Symbol(), collapseStateKey = Symbol(), propertyStateKey = Symbol(), changeEventKey = Symbol(), compListKey = Symbol(), slotListKey = Symbol(), adaptSlotListKey = Symbol();
|
|
219
212
|
function provideVersion(e) {
|
|
220
213
|
provide(versionKey, e);
|
|
221
214
|
}
|
|
222
215
|
function injectVersion() {
|
|
223
216
|
return inject(versionKey);
|
|
224
217
|
}
|
|
218
|
+
function provideType(e) {
|
|
219
|
+
provide(typeKey, e);
|
|
220
|
+
}
|
|
221
|
+
function injectType() {
|
|
222
|
+
return inject(typeKey);
|
|
223
|
+
}
|
|
224
|
+
function provideSubtype(e) {
|
|
225
|
+
provide(subtypeKey, e);
|
|
226
|
+
}
|
|
227
|
+
function injectSubtype() {
|
|
228
|
+
return inject(subtypeKey);
|
|
229
|
+
}
|
|
225
230
|
function provideConfig(e) {
|
|
226
231
|
provide(configKey, e);
|
|
227
232
|
}
|
|
@@ -234,6 +239,12 @@ function provideObject(e) {
|
|
|
234
239
|
function injectObject() {
|
|
235
240
|
return inject(objectKey);
|
|
236
241
|
}
|
|
242
|
+
function provideCollapseState(e) {
|
|
243
|
+
provide(collapseStateKey, e);
|
|
244
|
+
}
|
|
245
|
+
function injectCollapseState() {
|
|
246
|
+
return inject(collapseStateKey);
|
|
247
|
+
}
|
|
237
248
|
function providePropertyState(e) {
|
|
238
249
|
provide(propertyStateKey, e);
|
|
239
250
|
}
|
|
@@ -267,101 +278,101 @@ function injectAdaptSlotList() {
|
|
|
267
278
|
var menu_default = /* @__PURE__ */ defineComponent({
|
|
268
279
|
__name: "index",
|
|
269
280
|
setup(e) {
|
|
270
|
-
let { t:
|
|
271
|
-
(() => !(
|
|
272
|
-
title:
|
|
281
|
+
let { t: w } = useI18n(), T = injectConfig(), E = injectObject(), D = injectPropertyState(), j = injectChangeEvent(), N = ref(0), I = ref(0), L = ref([]), R = computed(() => [N.value, I.value]), B = (e) => {
|
|
282
|
+
(() => !(L.value.length <= 0 || !isPropertyChanged(D.value, L.value)))() && e.push({
|
|
283
|
+
title: w("x-prop-tree.reset"),
|
|
273
284
|
func: () => {
|
|
274
|
-
let e = unpkgProperty(
|
|
285
|
+
let e = unpkgProperty(T.value, L.value);
|
|
275
286
|
if (e) if (e.ui) {
|
|
276
|
-
let
|
|
277
|
-
if (!
|
|
278
|
-
|
|
287
|
+
let w = unpkgObject(E.value, L.value.slice(0, -1));
|
|
288
|
+
if (!w) return;
|
|
289
|
+
w[L.value[L.value.length - 1]] = getPropertyDefault(e), j(L.value, w[L.value[L.value.length - 1]]);
|
|
279
290
|
} else if (e.array) {
|
|
280
|
-
let
|
|
281
|
-
if (
|
|
291
|
+
let w = L.value[L.value.length - 1];
|
|
292
|
+
if (w === void 0) {
|
|
282
293
|
console.assert(!1, "invalid last key");
|
|
283
294
|
return;
|
|
284
295
|
}
|
|
285
|
-
if (typeof
|
|
286
|
-
let
|
|
287
|
-
if (!
|
|
288
|
-
|
|
296
|
+
if (typeof w == "string") {
|
|
297
|
+
let w = unpkgObject(E.value, L.value.slice(0, -1));
|
|
298
|
+
if (!w) return;
|
|
299
|
+
w[L.value[L.value.length - 1]] = getPropertyDefault(e), j(L.value, w[L.value[L.value.length - 1]]);
|
|
289
300
|
} else {
|
|
290
|
-
let
|
|
291
|
-
if (!
|
|
292
|
-
e.children.forEach((
|
|
293
|
-
|
|
301
|
+
let w = unpkgObject(E.value, L.value);
|
|
302
|
+
if (!w) return;
|
|
303
|
+
e.children.forEach((T) => {
|
|
304
|
+
w[T.key] = getPropertyDefault(e), j([...L.value, T.key], w[T.key]);
|
|
294
305
|
});
|
|
295
306
|
}
|
|
296
307
|
} else {
|
|
297
|
-
let
|
|
298
|
-
if (!
|
|
299
|
-
e.children.forEach((
|
|
300
|
-
|
|
308
|
+
let w = unpkgObject(E.value, L.value);
|
|
309
|
+
if (!w) return;
|
|
310
|
+
e.children.forEach((T) => {
|
|
311
|
+
w[T.key] = getPropertyDefault(e), j([...L.value, T.key], w[T.key]);
|
|
301
312
|
});
|
|
302
313
|
}
|
|
303
314
|
}
|
|
304
315
|
});
|
|
305
|
-
},
|
|
316
|
+
}, V = (e) => {
|
|
306
317
|
(() => !0)() && e.push({
|
|
307
|
-
title:
|
|
318
|
+
title: w("x-prop-tree.copy"),
|
|
308
319
|
func: () => {
|
|
309
|
-
let e = unpkgProperty(
|
|
320
|
+
let e = unpkgProperty(T.value, L.value), w = unpkgObject(E.value, L.value);
|
|
310
321
|
localStorage.setItem("propTreeCopy", JSON.stringify({
|
|
311
322
|
property: e,
|
|
312
|
-
object:
|
|
323
|
+
object: w
|
|
313
324
|
}));
|
|
314
325
|
}
|
|
315
326
|
});
|
|
316
|
-
},
|
|
317
|
-
let
|
|
327
|
+
}, H = (e) => {
|
|
328
|
+
let E = () => {
|
|
318
329
|
let e = localStorage.getItem("propTreeCopy");
|
|
319
330
|
if (!e) return !1;
|
|
320
331
|
try {
|
|
321
|
-
let { property:
|
|
322
|
-
if (!
|
|
323
|
-
let
|
|
324
|
-
return
|
|
332
|
+
let { property: w } = JSON.parse(e);
|
|
333
|
+
if (!w) return !1;
|
|
334
|
+
let E = unpkgProperty(T.value, L.value);
|
|
335
|
+
return E ? isPropertyCompatible(w, E) : !1;
|
|
325
336
|
} catch (e) {
|
|
326
337
|
console.error(e);
|
|
327
338
|
}
|
|
328
339
|
return !1;
|
|
329
340
|
};
|
|
330
|
-
|
|
331
|
-
title:
|
|
341
|
+
E() && e.push({
|
|
342
|
+
title: w("x-prop-tree.paste"),
|
|
332
343
|
func: () => {
|
|
333
|
-
if (!
|
|
344
|
+
if (!E()) return;
|
|
334
345
|
let e = localStorage.getItem("propTreeCopy");
|
|
335
346
|
if (e) try {
|
|
336
|
-
let { object:
|
|
337
|
-
console.log(
|
|
347
|
+
let { object: w } = JSON.parse(e), E = unpkgProperty(T.value, L.value);
|
|
348
|
+
console.log(w, E);
|
|
338
349
|
} catch (e) {
|
|
339
350
|
console.error(e);
|
|
340
351
|
}
|
|
341
352
|
}
|
|
342
353
|
});
|
|
343
|
-
},
|
|
354
|
+
}, U = computed(() => {
|
|
344
355
|
let e = [];
|
|
345
|
-
return
|
|
346
|
-
}), { open:
|
|
347
|
-
|
|
356
|
+
return B(e), V(e), H(e), e;
|
|
357
|
+
}), { open: W } = useViewStack("propTreeMenu", (e) => {
|
|
358
|
+
N.value = e.x, I.value = e.y, L.value = e.keys;
|
|
348
359
|
});
|
|
349
|
-
return (e,
|
|
350
|
-
let
|
|
351
|
-
return openBlock(), createBlock(
|
|
352
|
-
modelValue: unref(
|
|
353
|
-
"onUpdate:modelValue":
|
|
360
|
+
return (e, w) => {
|
|
361
|
+
let T = resolveComponent("v-list-item-title"), E = resolveComponent("v-list-item"), D = resolveComponent("v-list"), k = resolveComponent("v-menu");
|
|
362
|
+
return openBlock(), createBlock(k, {
|
|
363
|
+
modelValue: unref(W),
|
|
364
|
+
"onUpdate:modelValue": w[0] ||= (e) => isRef(W) ? W.value = e : null,
|
|
354
365
|
"location-strategy": "connected",
|
|
355
366
|
scrim: "transparent",
|
|
356
|
-
target:
|
|
367
|
+
target: R.value
|
|
357
368
|
}, {
|
|
358
|
-
default: withCtx(() => [createVNode(
|
|
359
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
360
|
-
key:
|
|
369
|
+
default: withCtx(() => [createVNode(D, null, {
|
|
370
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(U.value, (e, w) => (openBlock(), createBlock(E, {
|
|
371
|
+
key: w,
|
|
361
372
|
link: "",
|
|
362
373
|
onClick: e.func
|
|
363
374
|
}, {
|
|
364
|
-
default: withCtx(() => [createVNode(
|
|
375
|
+
default: withCtx(() => [createVNode(T, null, {
|
|
365
376
|
default: withCtx(() => [createTextVNode(toDisplayString(e.title), 1)]),
|
|
366
377
|
_: 2
|
|
367
378
|
}, 1024)]),
|
|
@@ -394,194 +405,194 @@ var menu_default = /* @__PURE__ */ defineComponent({
|
|
|
394
405
|
"create",
|
|
395
406
|
"delete"
|
|
396
407
|
],
|
|
397
|
-
setup(e, { emit:
|
|
398
|
-
let { backgroundColor2:
|
|
399
|
-
background:
|
|
408
|
+
setup(e, { emit: w }) {
|
|
409
|
+
let { backgroundColor2: T, highlightColor: E } = useColor(), D = w, O = ref(!1), P = computed(() => ({
|
|
410
|
+
background: O.value ? E.value : T.value,
|
|
400
411
|
height: "36px",
|
|
401
412
|
marginBottom: "1px",
|
|
402
413
|
userSelect: "none"
|
|
403
|
-
})),
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
-
|
|
414
|
+
})), I = () => {
|
|
415
|
+
D("collapse", !e.collapse);
|
|
416
|
+
}, L = (e) => {
|
|
417
|
+
D("menu", e.clientX, e.clientY);
|
|
407
418
|
};
|
|
408
|
-
return (
|
|
409
|
-
let
|
|
419
|
+
return (w, T) => {
|
|
420
|
+
let E = resolveComponent("v-icon"), k = resolveComponent("v-spacer"), R = resolveComponent("v-btn"), z = resolveDirective("ripple");
|
|
410
421
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
411
422
|
class: "d-flex align-center cursor-pointer",
|
|
412
|
-
style: normalizeStyle(
|
|
413
|
-
onClick:
|
|
414
|
-
onContextmenu: withModifiers(
|
|
415
|
-
onMouseout:
|
|
416
|
-
onMouseover:
|
|
423
|
+
style: normalizeStyle(P.value),
|
|
424
|
+
onClick: I,
|
|
425
|
+
onContextmenu: withModifiers(L, ["self", "prevent"]),
|
|
426
|
+
onMouseout: T[2] ||= (e) => O.value = !1,
|
|
427
|
+
onMouseover: T[3] ||= (e) => O.value = !0
|
|
417
428
|
}, [
|
|
418
|
-
createVNode(
|
|
429
|
+
createVNode(E, {
|
|
419
430
|
class: "mr-1",
|
|
420
431
|
icon: e.collapse ? "mdi-chevron-right" : "mdi-chevron-down"
|
|
421
432
|
}, null, 8, ["icon"]),
|
|
422
433
|
createElementVNode("span", _hoisted_1$18, toDisplayString(e.title), 1),
|
|
423
|
-
createVNode(
|
|
424
|
-
e.hasCreate ? (openBlock(), createBlock(
|
|
434
|
+
createVNode(k),
|
|
435
|
+
e.hasCreate ? (openBlock(), createBlock(R, {
|
|
425
436
|
key: 0,
|
|
426
437
|
class: "mx-3",
|
|
427
438
|
density: "compact",
|
|
428
439
|
icon: "mdi-plus",
|
|
429
440
|
variant: "text",
|
|
430
|
-
onClick:
|
|
441
|
+
onClick: T[0] ||= withModifiers((e) => D("create"), ["stop"])
|
|
431
442
|
})) : createCommentVNode("", !0),
|
|
432
|
-
e.hasDelete ? (openBlock(), createBlock(
|
|
443
|
+
e.hasDelete ? (openBlock(), createBlock(R, {
|
|
433
444
|
key: 1,
|
|
434
445
|
class: "mx-3",
|
|
435
446
|
density: "compact",
|
|
436
447
|
icon: "mdi-minus",
|
|
437
448
|
variant: "text",
|
|
438
|
-
onClick:
|
|
449
|
+
onClick: T[1] ||= withModifiers((w) => D("delete", e.index), ["stop"])
|
|
439
450
|
})) : createCommentVNode("", !0)
|
|
440
|
-
], 36)), [[
|
|
451
|
+
], 36)), [[z]]);
|
|
441
452
|
};
|
|
442
453
|
}
|
|
443
454
|
});
|
|
444
|
-
function useAdaptSlotList(
|
|
445
|
-
let { i18n:
|
|
446
|
-
provideAdaptSlotList(
|
|
447
|
-
let
|
|
448
|
-
if (!e.value || !
|
|
449
|
-
let
|
|
450
|
-
if (!
|
|
451
|
-
let
|
|
452
|
-
for (let e = 0; e <
|
|
453
|
-
let
|
|
454
|
-
|
|
455
|
-
id:
|
|
455
|
+
function useAdaptSlotList() {
|
|
456
|
+
let e = injectVersion(), w = injectType(), T = injectSubtype(), { i18n: O } = globalObjects, k = ref([]);
|
|
457
|
+
provideAdaptSlotList(k);
|
|
458
|
+
let A = () => {
|
|
459
|
+
if (!e.value || !w.value || !T.value) return [];
|
|
460
|
+
let A = pkgs[e.value];
|
|
461
|
+
if (!A) return console.assert(!1, `invalid version=${e.value}`), [];
|
|
462
|
+
let j = getTag(w.value, T.value), M = [];
|
|
463
|
+
for (let e = 0; e < A.groups[j].length; e++) {
|
|
464
|
+
let w = A.groups[j][e], T = getListEntry(k, w.key);
|
|
465
|
+
M.push({
|
|
466
|
+
id: w.key,
|
|
456
467
|
type: 0,
|
|
457
|
-
name:
|
|
468
|
+
name: O.global.t(w.name),
|
|
458
469
|
position: e,
|
|
459
|
-
collapse:
|
|
470
|
+
collapse: T?.collapse ?? !0,
|
|
460
471
|
count: 0
|
|
461
472
|
});
|
|
462
|
-
let
|
|
463
|
-
for (let e of
|
|
464
|
-
let
|
|
465
|
-
if (
|
|
466
|
-
let
|
|
467
|
-
|
|
468
|
-
id:
|
|
473
|
+
let E = 0;
|
|
474
|
+
for (let e of w.items) {
|
|
475
|
+
let T = getElement(e);
|
|
476
|
+
if (T && !T.internal && T.slots) for (let e of T.slots) {
|
|
477
|
+
let D = makeSlotId("elementSlot", T.key, e.key), k = `${O.global.t(T.name)} / ${O.global.t(e.name)}`;
|
|
478
|
+
M.push({
|
|
479
|
+
id: D,
|
|
469
480
|
type: 1,
|
|
470
|
-
name:
|
|
471
|
-
position:
|
|
472
|
-
group:
|
|
481
|
+
name: k,
|
|
482
|
+
position: E++,
|
|
483
|
+
group: w.key
|
|
473
484
|
});
|
|
474
485
|
}
|
|
475
486
|
}
|
|
476
487
|
}
|
|
477
|
-
let { activeApp:
|
|
478
|
-
for (let { id: e, name:
|
|
479
|
-
let
|
|
480
|
-
|
|
488
|
+
let { activeApp: N, depends: P } = globalState.app;
|
|
489
|
+
for (let { id: e, name: w, position: T } of N.compGroups) {
|
|
490
|
+
let E = getListEntry(k, e);
|
|
491
|
+
M.push({
|
|
481
492
|
id: e,
|
|
482
493
|
type: 0,
|
|
483
|
-
name:
|
|
484
|
-
position:
|
|
485
|
-
collapse:
|
|
494
|
+
name: w,
|
|
495
|
+
position: T,
|
|
496
|
+
collapse: E?.collapse ?? !0
|
|
486
497
|
});
|
|
487
498
|
}
|
|
488
|
-
let
|
|
489
|
-
for (let e of
|
|
490
|
-
let
|
|
491
|
-
if (
|
|
492
|
-
let
|
|
493
|
-
|
|
494
|
-
id:
|
|
499
|
+
let F = 0;
|
|
500
|
+
for (let e of N.comps) {
|
|
501
|
+
let w = P[e.id];
|
|
502
|
+
if (w && w.meta.slots) for (let T of w.meta.slots) {
|
|
503
|
+
let w = makeSlotId("customSlot", e.id, T.id), E = `${e.name} / ${T.name}`;
|
|
504
|
+
M.push({
|
|
505
|
+
id: w,
|
|
495
506
|
type: 1,
|
|
496
|
-
name:
|
|
497
|
-
position:
|
|
507
|
+
name: E,
|
|
508
|
+
position: F++,
|
|
498
509
|
group: e.groupId
|
|
499
510
|
});
|
|
500
511
|
}
|
|
501
512
|
}
|
|
502
|
-
return tidyList(
|
|
503
|
-
},
|
|
504
|
-
|
|
505
|
-
},
|
|
506
|
-
clearTimeout(
|
|
507
|
-
|
|
513
|
+
return tidyList(M, !0);
|
|
514
|
+
}, j = () => {
|
|
515
|
+
k.value = A();
|
|
516
|
+
}, M, N = () => {
|
|
517
|
+
clearTimeout(M), M = window.setTimeout(() => {
|
|
518
|
+
j(), M && N();
|
|
508
519
|
}, 1e3);
|
|
509
|
-
},
|
|
510
|
-
clearTimeout(
|
|
520
|
+
}, P = () => {
|
|
521
|
+
clearTimeout(M), M = void 0;
|
|
511
522
|
};
|
|
512
523
|
onMounted(() => {
|
|
513
|
-
|
|
524
|
+
N();
|
|
514
525
|
}), onBeforeUnmount(() => {
|
|
515
|
-
|
|
526
|
+
P();
|
|
516
527
|
}), watch([
|
|
517
528
|
e,
|
|
518
|
-
|
|
519
|
-
|
|
529
|
+
w,
|
|
530
|
+
T
|
|
520
531
|
], () => {
|
|
521
|
-
|
|
532
|
+
j(), N();
|
|
522
533
|
});
|
|
523
534
|
}
|
|
524
535
|
function useCompList() {
|
|
525
536
|
let e = ref([]);
|
|
526
537
|
provideCompList(e);
|
|
527
|
-
let
|
|
528
|
-
let { activeApp:
|
|
529
|
-
for (let { id:
|
|
530
|
-
let
|
|
531
|
-
|
|
532
|
-
id:
|
|
538
|
+
let w = () => {
|
|
539
|
+
let { activeApp: w, depends: T } = globalState.app, D = [];
|
|
540
|
+
for (let { id: T, name: E, position: O } of w.compGroups) {
|
|
541
|
+
let w = e.value.find((e) => e.id === T);
|
|
542
|
+
D.push({
|
|
543
|
+
id: T,
|
|
533
544
|
type: 0,
|
|
534
|
-
name:
|
|
535
|
-
position:
|
|
536
|
-
collapse:
|
|
545
|
+
name: E,
|
|
546
|
+
position: O,
|
|
547
|
+
collapse: w?.collapse ?? !0
|
|
537
548
|
});
|
|
538
549
|
}
|
|
539
|
-
for (let { id: e, groupId:
|
|
550
|
+
for (let { id: e, groupId: E, name: O, position: k } of w.comps) T[e] && D.push({
|
|
540
551
|
id: e,
|
|
541
552
|
type: 1,
|
|
542
|
-
name:
|
|
543
|
-
position:
|
|
544
|
-
group:
|
|
553
|
+
name: O,
|
|
554
|
+
position: k,
|
|
555
|
+
group: E
|
|
545
556
|
});
|
|
546
|
-
e.value = tidyList(
|
|
547
|
-
},
|
|
548
|
-
clearTimeout(
|
|
549
|
-
|
|
557
|
+
e.value = tidyList(D, !0);
|
|
558
|
+
}, T, D = () => {
|
|
559
|
+
clearTimeout(T), T = window.setTimeout(() => {
|
|
560
|
+
w(), T && D();
|
|
550
561
|
}, 1e3);
|
|
551
|
-
},
|
|
552
|
-
clearTimeout(
|
|
562
|
+
}, O = () => {
|
|
563
|
+
clearTimeout(T), T = void 0;
|
|
553
564
|
};
|
|
554
565
|
onMounted(() => {
|
|
555
|
-
|
|
566
|
+
D();
|
|
556
567
|
}), onBeforeUnmount(() => {
|
|
557
|
-
|
|
568
|
+
O();
|
|
558
569
|
});
|
|
559
570
|
}
|
|
560
571
|
function useSlotList() {
|
|
561
572
|
let e = ref([]);
|
|
562
573
|
provideSlotList(e);
|
|
563
|
-
let
|
|
564
|
-
let { activeObject: e, activeComp:
|
|
565
|
-
if (e.type !== "comp" || !
|
|
566
|
-
let
|
|
567
|
-
for (let { id: e, name:
|
|
574
|
+
let w = () => {
|
|
575
|
+
let { activeObject: e, activeComp: w } = globalState.app;
|
|
576
|
+
if (e.type !== "comp" || !w.meta.slots) return [];
|
|
577
|
+
let T = [];
|
|
578
|
+
for (let { id: e, name: E } of w.meta.slots) T.push({
|
|
568
579
|
id: e,
|
|
569
|
-
name:
|
|
580
|
+
name: E
|
|
570
581
|
});
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
e.value =
|
|
574
|
-
},
|
|
575
|
-
clearTimeout(
|
|
576
|
-
|
|
582
|
+
return T;
|
|
583
|
+
}, T = () => {
|
|
584
|
+
e.value = w();
|
|
585
|
+
}, E, D = () => {
|
|
586
|
+
clearTimeout(E), E = window.setTimeout(() => {
|
|
587
|
+
T(), E && D();
|
|
577
588
|
}, 1e3);
|
|
578
|
-
},
|
|
579
|
-
clearTimeout(
|
|
589
|
+
}, O = () => {
|
|
590
|
+
clearTimeout(E), E = void 0;
|
|
580
591
|
};
|
|
581
592
|
onMounted(() => {
|
|
582
|
-
|
|
593
|
+
D();
|
|
583
594
|
}), onBeforeUnmount(() => {
|
|
584
|
-
|
|
595
|
+
O();
|
|
585
596
|
});
|
|
586
597
|
}
|
|
587
598
|
var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class: "text-body-small text-grey ml-1" }, group_default$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -593,29 +604,29 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
593
604
|
count: {}
|
|
594
605
|
},
|
|
595
606
|
emits: ["x-click"],
|
|
596
|
-
setup(e, { emit:
|
|
597
|
-
let { backgroundColor2:
|
|
598
|
-
background:
|
|
607
|
+
setup(e, { emit: w }) {
|
|
608
|
+
let { backgroundColor2: T, highlightColor: E } = useColor(), D = e, O = w, A = ref(!1), j = computed(() => ({
|
|
609
|
+
background: A.value ? E.value : T.value,
|
|
599
610
|
height: "30px",
|
|
600
611
|
marginBottom: "1px",
|
|
601
612
|
userSelect: "none"
|
|
602
613
|
}));
|
|
603
|
-
return (e,
|
|
604
|
-
let
|
|
614
|
+
return (e, w) => {
|
|
615
|
+
let T = resolveComponent("v-icon"), E = resolveDirective("ripple");
|
|
605
616
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
606
617
|
class: "d-flex align-center cursor-pointer",
|
|
607
|
-
style: normalizeStyle(
|
|
608
|
-
onClick:
|
|
609
|
-
onMouseout:
|
|
610
|
-
onMouseover:
|
|
618
|
+
style: normalizeStyle(j.value),
|
|
619
|
+
onClick: w[0] ||= (e) => O("x-click", D.id),
|
|
620
|
+
onMouseout: w[1] ||= (e) => A.value = !1,
|
|
621
|
+
onMouseover: w[2] ||= (e) => A.value = !0
|
|
611
622
|
}, [
|
|
612
|
-
createVNode(
|
|
613
|
-
icon:
|
|
623
|
+
createVNode(T, {
|
|
624
|
+
icon: D.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
|
|
614
625
|
size: "small"
|
|
615
626
|
}, null, 8, ["icon"]),
|
|
616
|
-
createElementVNode("span", _hoisted_1$17, toDisplayString(
|
|
617
|
-
createElementVNode("span", _hoisted_2$5, toDisplayString(
|
|
618
|
-
], 36)), [[
|
|
627
|
+
createElementVNode("span", _hoisted_1$17, toDisplayString(D.title), 1),
|
|
628
|
+
createElementVNode("span", _hoisted_2$5, toDisplayString(D.count), 1)
|
|
629
|
+
], 36)), [[E]]);
|
|
619
630
|
};
|
|
620
631
|
}
|
|
621
632
|
}), _hoisted_1$16 = { class: "text-body-large ml-6" }, item_default$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -625,22 +636,22 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
625
636
|
title: {}
|
|
626
637
|
},
|
|
627
638
|
emits: ["x-click"],
|
|
628
|
-
setup(e, { emit:
|
|
629
|
-
let { backgroundColor2:
|
|
630
|
-
background:
|
|
639
|
+
setup(e, { emit: w }) {
|
|
640
|
+
let { backgroundColor2: T, highlightColor: E } = useColor(), D = w, O = ref(!1), A = computed(() => ({
|
|
641
|
+
background: O.value ? E.value : T.value,
|
|
631
642
|
height: "48px",
|
|
632
643
|
marginBottom: "1px",
|
|
633
644
|
userSelect: "none"
|
|
634
645
|
}));
|
|
635
|
-
return (
|
|
636
|
-
let
|
|
646
|
+
return (w, T) => {
|
|
647
|
+
let E = resolveDirective("ripple");
|
|
637
648
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
638
649
|
class: "d-flex align-center cursor-pointer",
|
|
639
|
-
style: normalizeStyle(
|
|
640
|
-
onClick:
|
|
641
|
-
onMouseout:
|
|
642
|
-
onMouseover:
|
|
643
|
-
}, [createElementVNode("span", _hoisted_1$16, toDisplayString(e.title), 1)], 36)), [[
|
|
650
|
+
style: normalizeStyle(A.value),
|
|
651
|
+
onClick: T[0] ||= (w) => D("x-click", e.id),
|
|
652
|
+
onMouseout: T[1] ||= (e) => O.value = !1,
|
|
653
|
+
onMouseover: T[2] ||= (e) => O.value = !0
|
|
654
|
+
}, [createElementVNode("span", _hoisted_1$16, toDisplayString(e.title), 1)], 36)), [[E]]);
|
|
644
655
|
};
|
|
645
656
|
}
|
|
646
657
|
}), _hoisted_1$15 = { key: 0 }, _hoisted_2$4 = {
|
|
@@ -659,19 +670,19 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
659
670
|
},
|
|
660
671
|
emits: ["update:modelValue", "update:open"],
|
|
661
672
|
setup(e) {
|
|
662
|
-
let { nameList:
|
|
663
|
-
let
|
|
664
|
-
|
|
665
|
-
},
|
|
666
|
-
|
|
673
|
+
let { nameList: w } = useSystem(), E = useModel(e, "modelValue"), k = useModel(e, "open"), N = injectAdaptSlotList(), P = (e) => {
|
|
674
|
+
let w = getListEntry(N, e);
|
|
675
|
+
w && setCollapse$1(N, e, !w.collapse);
|
|
676
|
+
}, F = (e) => {
|
|
677
|
+
E.value = e, k.value = !1;
|
|
667
678
|
};
|
|
668
|
-
return (e,
|
|
679
|
+
return (e, T) => unref(N).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$15, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(N), (e) => (openBlock(), createElementBlock(Fragment, { key: e.id }, [e.type === 0 ? (openBlock(), createBlock(group_default$1, {
|
|
669
680
|
key: 0,
|
|
670
681
|
id: e.id,
|
|
671
682
|
collapse: e.collapse,
|
|
672
683
|
count: e.count ?? 0,
|
|
673
684
|
title: e.name,
|
|
674
|
-
onXClick:
|
|
685
|
+
onXClick: P
|
|
675
686
|
}, null, 8, [
|
|
676
687
|
"id",
|
|
677
688
|
"collapse",
|
|
@@ -681,8 +692,8 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
681
692
|
key: 1,
|
|
682
693
|
id: e.id,
|
|
683
694
|
title: e.name,
|
|
684
|
-
onXClick:
|
|
685
|
-
}, null, 8, ["id", "title"])) : createCommentVNode("", !0)], 64))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2$4, toDisplayString(unref(
|
|
695
|
+
onXClick: F
|
|
696
|
+
}, null, 8, ["id", "title"])) : createCommentVNode("", !0)], 64))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2$4, toDisplayString(unref(w)([
|
|
686
697
|
"x-prop-tree.no",
|
|
687
698
|
"x-prop-tree.adapt",
|
|
688
699
|
"x-prop-tree.slot"
|
|
@@ -690,74 +701,91 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
690
701
|
}
|
|
691
702
|
}), _hoisted_1$14 = { class: "text-body-large" }, adaptSlotSelect_default = /* @__PURE__ */ defineComponent({
|
|
692
703
|
__name: "index",
|
|
693
|
-
props: {
|
|
704
|
+
props: /* @__PURE__ */ mergeModels({
|
|
705
|
+
hasDelete: {
|
|
706
|
+
type: Boolean,
|
|
707
|
+
default: !1
|
|
708
|
+
},
|
|
709
|
+
readonly: {
|
|
710
|
+
type: Boolean,
|
|
711
|
+
default: !1
|
|
712
|
+
}
|
|
713
|
+
}, {
|
|
694
714
|
modelValue: {},
|
|
695
715
|
modelModifiers: {}
|
|
696
|
-
},
|
|
697
|
-
emits: ["update:modelValue"],
|
|
698
|
-
setup(e) {
|
|
699
|
-
let { t:
|
|
716
|
+
}),
|
|
717
|
+
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
718
|
+
setup(e, { emit: w }) {
|
|
719
|
+
let { t: T } = useI18n(), E = useDisplay(), { sysBarAvail: O, nameList: M } = useSystem(), { backgroundColor1: I } = useColor(), L = useModel(e, "modelValue"), R = w, B = injectAdaptSlotList(), U = computed(() => {
|
|
700
720
|
let e = "100%";
|
|
701
|
-
return
|
|
702
|
-
background:
|
|
721
|
+
return E.mdAndUp.value && (e = "400px"), {
|
|
722
|
+
background: I.value,
|
|
703
723
|
width: e,
|
|
704
724
|
height: "100%"
|
|
705
725
|
};
|
|
706
|
-
}),
|
|
726
|
+
}), W = computed(() => {
|
|
707
727
|
let e = 48;
|
|
708
|
-
return
|
|
728
|
+
return O.value && (e += 24), {
|
|
709
729
|
position: "relative",
|
|
710
730
|
height: `calc(100% - ${e}px)`
|
|
711
731
|
};
|
|
712
|
-
}),
|
|
713
|
-
if (!
|
|
714
|
-
let e = getListEntry(
|
|
715
|
-
return e ? e.name :
|
|
716
|
-
}), { open:
|
|
732
|
+
}), K = computed(() => ({ height: "60px" })), q = computed(() => {
|
|
733
|
+
if (!L.value) return T("x-runtime-lib.notSet");
|
|
734
|
+
let e = getListEntry(B, L.value);
|
|
735
|
+
return e ? e.name : T("x-runtime-lib.slotNotAvail");
|
|
736
|
+
}), { open: J } = useViewStack(`propTreeAdaptSlotSelectDlg${useId()}`);
|
|
717
737
|
return onUnmounted(() => {
|
|
718
|
-
|
|
719
|
-
}), (
|
|
720
|
-
let
|
|
721
|
-
return openBlock(), createBlock(
|
|
722
|
-
modelValue: unref(
|
|
723
|
-
"onUpdate:modelValue":
|
|
738
|
+
J.value = !1;
|
|
739
|
+
}), (w, T) => {
|
|
740
|
+
let E = resolveComponent("v-btn"), D = resolveComponent("v-sheet"), k = resolveComponent("v-dialog");
|
|
741
|
+
return openBlock(), createBlock(k, {
|
|
742
|
+
modelValue: unref(J),
|
|
743
|
+
"onUpdate:modelValue": T[6] ||= (e) => isRef(J) ? J.value = e : null,
|
|
724
744
|
fullscreen: "",
|
|
725
745
|
"no-click-animation": "",
|
|
726
746
|
persistent: "",
|
|
727
747
|
transition: "scroll-x-reverse-transition",
|
|
728
|
-
onKeydown:
|
|
748
|
+
onKeydown: T[7] ||= withKeys(withModifiers((e) => J.value = !1, ["stop", "prevent"]), ["esc"])
|
|
729
749
|
}, {
|
|
730
|
-
activator: withCtx(({ props:
|
|
750
|
+
activator: withCtx(({ props: w }) => [createVNode(E, mergeProps(w, {
|
|
731
751
|
block: "",
|
|
732
|
-
density: "comfortable"
|
|
752
|
+
density: "comfortable",
|
|
753
|
+
readonly: e.readonly
|
|
733
754
|
}), {
|
|
734
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
755
|
+
default: withCtx(() => [createTextVNode(toDisplayString(q.value), 1)]),
|
|
735
756
|
_: 1
|
|
736
|
-
}, 16
|
|
757
|
+
}, 16, ["readonly"]), e.hasDelete ? (openBlock(), createBlock(E, {
|
|
758
|
+
key: 0,
|
|
759
|
+
class: "mx-2",
|
|
760
|
+
density: "compact",
|
|
761
|
+
icon: "mdi-minus",
|
|
762
|
+
variant: "text",
|
|
763
|
+
onClick: T[0] ||= withModifiers((e) => R("delete"), ["stop"])
|
|
764
|
+
})) : createCommentVNode("", !0)]),
|
|
737
765
|
default: withCtx(() => [createElementVNode("div", {
|
|
738
766
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
739
|
-
onClick:
|
|
740
|
-
onContextmenu:
|
|
767
|
+
onClick: T[4] ||= withModifiers((e) => J.value = !1, ["self"]),
|
|
768
|
+
onContextmenu: T[5] ||= withModifiers((e) => J.value = !1, ["self", "prevent"])
|
|
741
769
|
}, [createElementVNode("div", {
|
|
742
770
|
class: "elevation-2",
|
|
743
|
-
style: normalizeStyle(
|
|
771
|
+
style: normalizeStyle(U.value)
|
|
744
772
|
}, [
|
|
745
|
-
unref(
|
|
773
|
+
unref(O) ? (openBlock(), createBlock(D, {
|
|
746
774
|
key: 0,
|
|
747
775
|
color: "transparent",
|
|
748
776
|
height: 24
|
|
749
777
|
})) : createCommentVNode("", !0),
|
|
750
|
-
createVNode(
|
|
778
|
+
createVNode(D, {
|
|
751
779
|
class: "d-flex align-center px-3",
|
|
752
780
|
color: "transparent",
|
|
753
781
|
height: 48
|
|
754
782
|
}, {
|
|
755
|
-
default: withCtx(() => [createVNode(
|
|
783
|
+
default: withCtx(() => [createVNode(E, {
|
|
756
784
|
density: "comfortable",
|
|
757
785
|
icon: "mdi-close",
|
|
758
786
|
variant: "text",
|
|
759
|
-
onClick:
|
|
760
|
-
}), createElementVNode("span", _hoisted_1$14, toDisplayString(unref(
|
|
787
|
+
onClick: T[1] ||= (e) => J.value = !1
|
|
788
|
+
}), createElementVNode("span", _hoisted_1$14, toDisplayString(unref(M)([
|
|
761
789
|
"x-prop-tree.select",
|
|
762
790
|
"x-prop-tree.adapt",
|
|
763
791
|
"x-prop-tree.slot"
|
|
@@ -766,13 +794,13 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
766
794
|
}),
|
|
767
795
|
createElementVNode("div", {
|
|
768
796
|
class: "overflow-y-auto",
|
|
769
|
-
style: normalizeStyle(
|
|
797
|
+
style: normalizeStyle(W.value)
|
|
770
798
|
}, [createVNode(adaptSlotList_default, {
|
|
771
|
-
modelValue:
|
|
772
|
-
"onUpdate:modelValue":
|
|
773
|
-
open: unref(
|
|
774
|
-
"onUpdate:open":
|
|
775
|
-
}, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(
|
|
799
|
+
modelValue: L.value,
|
|
800
|
+
"onUpdate:modelValue": T[2] ||= (e) => L.value = e,
|
|
801
|
+
open: unref(J),
|
|
802
|
+
"onUpdate:open": T[3] ||= (e) => isRef(J) ? J.value = e : null
|
|
803
|
+
}, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(K.value) }, null, 4)], 4)
|
|
776
804
|
], 4)], 32)]),
|
|
777
805
|
_: 1
|
|
778
806
|
}, 8, ["modelValue"]);
|
|
@@ -794,43 +822,43 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
794
822
|
modelModifiers: {}
|
|
795
823
|
}),
|
|
796
824
|
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
797
|
-
setup(e, { emit:
|
|
798
|
-
let { t:
|
|
799
|
-
let
|
|
800
|
-
return e.hasDelete && (
|
|
801
|
-
}),
|
|
825
|
+
setup(e, { emit: w }) {
|
|
826
|
+
let { t: T } = useI18n(), E = useModel(e, "modelValue"), D = w, O = computed(() => {
|
|
827
|
+
let w = "100%";
|
|
828
|
+
return e.hasDelete && (w = "calc(100% - 37px)"), { width: w };
|
|
829
|
+
}), M = computed(() => e.readonly), { open: I } = useViewStack(`propTreeColorPickerMenu${useId()}`);
|
|
802
830
|
return onUnmounted(() => {
|
|
803
|
-
|
|
804
|
-
}), (
|
|
805
|
-
let
|
|
806
|
-
return openBlock(), createBlock(
|
|
807
|
-
modelValue: unref(
|
|
808
|
-
"onUpdate:modelValue":
|
|
831
|
+
I.value = !1;
|
|
832
|
+
}), (w, k) => {
|
|
833
|
+
let L = resolveComponent("v-btn"), R = resolveComponent("v-color-picker"), B = resolveComponent("v-menu");
|
|
834
|
+
return openBlock(), createBlock(B, {
|
|
835
|
+
modelValue: unref(I),
|
|
836
|
+
"onUpdate:modelValue": k[2] ||= (e) => isRef(I) ? I.value = e : null,
|
|
809
837
|
"close-on-content-click": !1,
|
|
810
838
|
scrim: "transparent"
|
|
811
839
|
}, {
|
|
812
|
-
activator: withCtx(({ props:
|
|
840
|
+
activator: withCtx(({ props: w }) => [createElementVNode("div", _hoisted_1$13, [createElementVNode("div", {
|
|
813
841
|
class: "flex-grow-1",
|
|
814
|
-
style: normalizeStyle(
|
|
815
|
-
}, [createVNode(
|
|
842
|
+
style: normalizeStyle(O.value)
|
|
843
|
+
}, [createVNode(L, mergeProps(w, {
|
|
816
844
|
block: "",
|
|
817
|
-
color:
|
|
845
|
+
color: E.value,
|
|
818
846
|
density: "comfortable",
|
|
819
|
-
disabled:
|
|
847
|
+
disabled: M.value
|
|
820
848
|
}), {
|
|
821
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
849
|
+
default: withCtx(() => [createTextVNode(toDisplayString(E.value ? E.value : unref(T)("x-runtime-lib.notSet")), 1)]),
|
|
822
850
|
_: 1
|
|
823
|
-
}, 16, ["color", "disabled"])], 4), e.hasDelete ? (openBlock(), createBlock(
|
|
851
|
+
}, 16, ["color", "disabled"])], 4), e.hasDelete ? (openBlock(), createBlock(L, {
|
|
824
852
|
key: 0,
|
|
825
853
|
class: "mx-2",
|
|
826
854
|
density: "compact",
|
|
827
855
|
icon: "mdi-minus",
|
|
828
856
|
variant: "text",
|
|
829
|
-
onClick:
|
|
857
|
+
onClick: k[0] ||= withModifiers((e) => D("delete"), ["stop"])
|
|
830
858
|
})) : createCommentVNode("", !0)])]),
|
|
831
|
-
default: withCtx(() => [createVNode(
|
|
832
|
-
modelValue:
|
|
833
|
-
"onUpdate:modelValue":
|
|
859
|
+
default: withCtx(() => [createVNode(R, {
|
|
860
|
+
modelValue: E.value,
|
|
861
|
+
"onUpdate:modelValue": k[1] ||= (e) => E.value = e,
|
|
834
862
|
mode: "hexa",
|
|
835
863
|
"show-swatches": "",
|
|
836
864
|
"swatches-max-height": "150px"
|
|
@@ -848,29 +876,29 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
848
876
|
count: {}
|
|
849
877
|
},
|
|
850
878
|
emits: ["x-click"],
|
|
851
|
-
setup(e, { emit:
|
|
852
|
-
let { backgroundColor2:
|
|
853
|
-
background:
|
|
879
|
+
setup(e, { emit: w }) {
|
|
880
|
+
let { backgroundColor2: T, highlightColor: E } = useColor(), D = e, O = w, A = ref(!1), j = computed(() => ({
|
|
881
|
+
background: A.value ? E.value : T.value,
|
|
854
882
|
height: "30px",
|
|
855
883
|
marginBottom: "1px",
|
|
856
884
|
userSelect: "none"
|
|
857
885
|
}));
|
|
858
|
-
return (e,
|
|
859
|
-
let
|
|
886
|
+
return (e, w) => {
|
|
887
|
+
let T = resolveComponent("v-icon"), E = resolveDirective("ripple");
|
|
860
888
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
861
889
|
class: "d-flex align-center cursor-pointer",
|
|
862
|
-
style: normalizeStyle(
|
|
863
|
-
onClick:
|
|
864
|
-
onMouseout:
|
|
865
|
-
onMouseover:
|
|
890
|
+
style: normalizeStyle(j.value),
|
|
891
|
+
onClick: w[0] ||= (e) => O("x-click", D.id),
|
|
892
|
+
onMouseout: w[1] ||= (e) => A.value = !1,
|
|
893
|
+
onMouseover: w[2] ||= (e) => A.value = !0
|
|
866
894
|
}, [
|
|
867
|
-
createVNode(
|
|
868
|
-
icon:
|
|
895
|
+
createVNode(T, {
|
|
896
|
+
icon: D.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
|
|
869
897
|
size: "small"
|
|
870
898
|
}, null, 8, ["icon"]),
|
|
871
|
-
createElementVNode("span", _hoisted_1$12, toDisplayString(
|
|
872
|
-
createElementVNode("span", _hoisted_2$3, toDisplayString(
|
|
873
|
-
], 36)), [[
|
|
899
|
+
createElementVNode("span", _hoisted_1$12, toDisplayString(D.title), 1),
|
|
900
|
+
createElementVNode("span", _hoisted_2$3, toDisplayString(D.count), 1)
|
|
901
|
+
], 36)), [[E]]);
|
|
874
902
|
};
|
|
875
903
|
}
|
|
876
904
|
}), _hoisted_1$11 = { class: "text-body-large ml-6" }, item_default$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -880,22 +908,22 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
880
908
|
title: {}
|
|
881
909
|
},
|
|
882
910
|
emits: ["x-click"],
|
|
883
|
-
setup(e, { emit:
|
|
884
|
-
let { backgroundColor2:
|
|
885
|
-
background:
|
|
911
|
+
setup(e, { emit: w }) {
|
|
912
|
+
let { backgroundColor2: T, highlightColor: E } = useColor(), D = e, O = w, A = ref(!1), j = computed(() => ({
|
|
913
|
+
background: A.value ? E.value : T.value,
|
|
886
914
|
height: "48px",
|
|
887
915
|
marginBottom: "1px",
|
|
888
916
|
userSelect: "none"
|
|
889
917
|
}));
|
|
890
|
-
return (e,
|
|
891
|
-
let
|
|
918
|
+
return (e, w) => {
|
|
919
|
+
let T = resolveDirective("ripple");
|
|
892
920
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
893
921
|
class: "d-flex align-center cursor-pointer",
|
|
894
|
-
style: normalizeStyle(
|
|
895
|
-
onClick:
|
|
896
|
-
onMouseout:
|
|
897
|
-
onMouseover:
|
|
898
|
-
}, [createElementVNode("span", _hoisted_1$11, toDisplayString(
|
|
922
|
+
style: normalizeStyle(j.value),
|
|
923
|
+
onClick: w[0] ||= (e) => O("x-click", D.id),
|
|
924
|
+
onMouseout: w[1] ||= (e) => A.value = !1,
|
|
925
|
+
onMouseover: w[2] ||= (e) => A.value = !0
|
|
926
|
+
}, [createElementVNode("span", _hoisted_1$11, toDisplayString(D.title), 1)], 36)), [[T]]);
|
|
899
927
|
};
|
|
900
928
|
}
|
|
901
929
|
}), _hoisted_1$10 = { key: 0 }, _hoisted_2$2 = {
|
|
@@ -914,19 +942,19 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
914
942
|
},
|
|
915
943
|
emits: ["update:modelValue", "update:open"],
|
|
916
944
|
setup(e) {
|
|
917
|
-
let { nameList:
|
|
918
|
-
let
|
|
919
|
-
|
|
920
|
-
},
|
|
921
|
-
|
|
945
|
+
let { nameList: w } = useSystem(), E = useModel(e, "modelValue"), k = useModel(e, "open"), N = injectCompList(), P = (e) => {
|
|
946
|
+
let w = getListEntry(N, e);
|
|
947
|
+
w && setCollapse$1(N, e, !w.collapse);
|
|
948
|
+
}, F = (e) => {
|
|
949
|
+
E.value = e, k.value = !1, eventBus.emit("refreshDepends");
|
|
922
950
|
};
|
|
923
|
-
return (e,
|
|
951
|
+
return (e, T) => unref(N).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$10, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(N), (e) => (openBlock(), createElementBlock(Fragment, { key: e.id }, [e.type === 0 ? (openBlock(), createBlock(group_default, {
|
|
924
952
|
key: 0,
|
|
925
953
|
id: e.id,
|
|
926
954
|
collapse: e.collapse,
|
|
927
955
|
count: e.count ?? 0,
|
|
928
956
|
title: e.name,
|
|
929
|
-
onXClick:
|
|
957
|
+
onXClick: P
|
|
930
958
|
}, null, 8, [
|
|
931
959
|
"id",
|
|
932
960
|
"collapse",
|
|
@@ -936,90 +964,107 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
936
964
|
key: 1,
|
|
937
965
|
id: e.id,
|
|
938
966
|
title: e.name,
|
|
939
|
-
onXClick:
|
|
940
|
-
}, null, 8, ["id", "title"])) : createCommentVNode("", !0)], 64))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2$2, toDisplayString(unref(
|
|
967
|
+
onXClick: F
|
|
968
|
+
}, null, 8, ["id", "title"])) : createCommentVNode("", !0)], 64))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2$2, toDisplayString(unref(w)(["x-prop-tree.no", "x-prop-tree.comp"])), 1));
|
|
941
969
|
}
|
|
942
970
|
}), _hoisted_1$9 = { class: "text-body-large" }, compSelect_default = /* @__PURE__ */ defineComponent({
|
|
943
971
|
__name: "index",
|
|
944
|
-
props: {
|
|
972
|
+
props: /* @__PURE__ */ mergeModels({
|
|
973
|
+
hasDelete: {
|
|
974
|
+
type: Boolean,
|
|
975
|
+
default: !1
|
|
976
|
+
},
|
|
977
|
+
readonly: {
|
|
978
|
+
type: Boolean,
|
|
979
|
+
default: !1
|
|
980
|
+
}
|
|
981
|
+
}, {
|
|
945
982
|
modelValue: {},
|
|
946
983
|
modelModifiers: {}
|
|
947
|
-
},
|
|
948
|
-
emits: ["update:modelValue"],
|
|
949
|
-
setup(e) {
|
|
950
|
-
let { t:
|
|
984
|
+
}),
|
|
985
|
+
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
986
|
+
setup(e, { emit: w }) {
|
|
987
|
+
let { t: T } = useI18n(), E = useDisplay(), { sysBarAvail: O, nameList: M } = useSystem(), { backgroundColor1: I } = useColor(), L = useModel(e, "modelValue"), R = w, B = injectCompList(), U = computed(() => {
|
|
951
988
|
let e = "100%";
|
|
952
|
-
return
|
|
953
|
-
background:
|
|
989
|
+
return E.mdAndUp.value && (e = "400px"), {
|
|
990
|
+
background: I.value,
|
|
954
991
|
width: e,
|
|
955
992
|
height: "100%"
|
|
956
993
|
};
|
|
957
|
-
}),
|
|
994
|
+
}), W = computed(() => {
|
|
958
995
|
let e = 48;
|
|
959
|
-
return
|
|
996
|
+
return O.value && (e += 24), {
|
|
960
997
|
position: "relative",
|
|
961
998
|
height: `calc(100% - ${e}px)`
|
|
962
999
|
};
|
|
963
|
-
}),
|
|
964
|
-
if (!
|
|
965
|
-
let e = getListEntry(
|
|
966
|
-
return e ? e.name :
|
|
967
|
-
}), { open:
|
|
1000
|
+
}), K = computed(() => ({ height: "60px" })), q = computed(() => {
|
|
1001
|
+
if (!L.value) return T("x-runtime-lib.notSet");
|
|
1002
|
+
let e = getListEntry(B, L.value);
|
|
1003
|
+
return e ? e.name : T("x-runtime-lib.compNotAvail");
|
|
1004
|
+
}), { open: J } = useViewStack(`propTreeCompSelectDlg${useId()}`);
|
|
968
1005
|
return onUnmounted(() => {
|
|
969
|
-
|
|
970
|
-
}), (
|
|
971
|
-
let
|
|
972
|
-
return openBlock(), createBlock(
|
|
973
|
-
modelValue: unref(
|
|
974
|
-
"onUpdate:modelValue":
|
|
1006
|
+
J.value = !1;
|
|
1007
|
+
}), (w, T) => {
|
|
1008
|
+
let E = resolveComponent("v-btn"), D = resolveComponent("v-sheet"), k = resolveComponent("v-dialog");
|
|
1009
|
+
return openBlock(), createBlock(k, {
|
|
1010
|
+
modelValue: unref(J),
|
|
1011
|
+
"onUpdate:modelValue": T[6] ||= (e) => isRef(J) ? J.value = e : null,
|
|
975
1012
|
fullscreen: "",
|
|
976
1013
|
"no-click-animation": "",
|
|
977
1014
|
persistent: "",
|
|
978
1015
|
transition: "scroll-x-reverse-transition",
|
|
979
|
-
onKeydown:
|
|
1016
|
+
onKeydown: T[7] ||= withKeys(withModifiers((e) => J.value = !1, ["stop", "prevent"]), ["esc"])
|
|
980
1017
|
}, {
|
|
981
|
-
activator: withCtx(({ props:
|
|
1018
|
+
activator: withCtx(({ props: w }) => [createVNode(E, mergeProps(w, {
|
|
982
1019
|
block: "",
|
|
983
|
-
density: "comfortable"
|
|
1020
|
+
density: "comfortable",
|
|
1021
|
+
readonly: e.readonly
|
|
984
1022
|
}), {
|
|
985
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
1023
|
+
default: withCtx(() => [createTextVNode(toDisplayString(q.value), 1)]),
|
|
986
1024
|
_: 1
|
|
987
|
-
}, 16
|
|
1025
|
+
}, 16, ["readonly"]), e.hasDelete ? (openBlock(), createBlock(E, {
|
|
1026
|
+
key: 0,
|
|
1027
|
+
class: "mx-2",
|
|
1028
|
+
density: "compact",
|
|
1029
|
+
icon: "mdi-minus",
|
|
1030
|
+
variant: "text",
|
|
1031
|
+
onClick: T[0] ||= withModifiers((e) => R("delete"), ["stop"])
|
|
1032
|
+
})) : createCommentVNode("", !0)]),
|
|
988
1033
|
default: withCtx(() => [createElementVNode("div", {
|
|
989
1034
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
990
|
-
onClick:
|
|
991
|
-
onContextmenu:
|
|
1035
|
+
onClick: T[4] ||= withModifiers((e) => J.value = !1, ["self"]),
|
|
1036
|
+
onContextmenu: T[5] ||= withModifiers((e) => J.value = !1, ["self", "prevent"])
|
|
992
1037
|
}, [createElementVNode("div", {
|
|
993
1038
|
class: "elevation-2",
|
|
994
|
-
style: normalizeStyle(
|
|
1039
|
+
style: normalizeStyle(U.value)
|
|
995
1040
|
}, [
|
|
996
|
-
unref(
|
|
1041
|
+
unref(O) ? (openBlock(), createBlock(D, {
|
|
997
1042
|
key: 0,
|
|
998
1043
|
color: "transparent",
|
|
999
1044
|
height: 24
|
|
1000
1045
|
})) : createCommentVNode("", !0),
|
|
1001
|
-
createVNode(
|
|
1046
|
+
createVNode(D, {
|
|
1002
1047
|
class: "d-flex align-center px-3",
|
|
1003
1048
|
color: "transparent",
|
|
1004
1049
|
height: 48
|
|
1005
1050
|
}, {
|
|
1006
|
-
default: withCtx(() => [createVNode(
|
|
1051
|
+
default: withCtx(() => [createVNode(E, {
|
|
1007
1052
|
density: "comfortable",
|
|
1008
1053
|
icon: "mdi-close",
|
|
1009
1054
|
variant: "text",
|
|
1010
|
-
onClick:
|
|
1011
|
-
}), createElementVNode("span", _hoisted_1$9, toDisplayString(unref(
|
|
1055
|
+
onClick: T[1] ||= (e) => J.value = !1
|
|
1056
|
+
}), createElementVNode("span", _hoisted_1$9, toDisplayString(unref(M)(["x-prop-tree.select", "x-prop-tree.comp"])), 1)]),
|
|
1012
1057
|
_: 1
|
|
1013
1058
|
}),
|
|
1014
1059
|
createElementVNode("div", {
|
|
1015
1060
|
class: "overflow-y-auto",
|
|
1016
|
-
style: normalizeStyle(
|
|
1061
|
+
style: normalizeStyle(W.value)
|
|
1017
1062
|
}, [createVNode(compList_default, {
|
|
1018
|
-
modelValue:
|
|
1019
|
-
"onUpdate:modelValue":
|
|
1020
|
-
open: unref(
|
|
1021
|
-
"onUpdate:open":
|
|
1022
|
-
}, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(
|
|
1063
|
+
modelValue: L.value,
|
|
1064
|
+
"onUpdate:modelValue": T[2] ||= (e) => L.value = e,
|
|
1065
|
+
open: unref(J),
|
|
1066
|
+
"onUpdate:open": T[3] ||= (e) => isRef(J) ? J.value = e : null
|
|
1067
|
+
}, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(K.value) }, null, 4)], 4)
|
|
1023
1068
|
], 4)], 32)]),
|
|
1024
1069
|
_: 1
|
|
1025
1070
|
}, 8, ["modelValue"]);
|
|
@@ -1043,26 +1088,26 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1043
1088
|
"update:lock",
|
|
1044
1089
|
"update:scale"
|
|
1045
1090
|
],
|
|
1046
|
-
setup(e, { expose:
|
|
1047
|
-
let
|
|
1048
|
-
let e = JSON.parse(
|
|
1049
|
-
|
|
1091
|
+
setup(e, { expose: w }) {
|
|
1092
|
+
let T = useModel(e, "modelValue"), E = useModel(e, "lock"), D = useModel(e, "scale"), O = injectDark(), k = injectLocale(), j = injectVersion(), M = useTemplateRef("target"), N = () => {
|
|
1093
|
+
let e = JSON.parse(T.value);
|
|
1094
|
+
M.value?.load(e);
|
|
1050
1095
|
};
|
|
1051
|
-
return
|
|
1052
|
-
let e =
|
|
1053
|
-
|
|
1054
|
-
} }), (e,
|
|
1096
|
+
return w({ save: () => {
|
|
1097
|
+
let e = M.value.save();
|
|
1098
|
+
T.value = JSON.stringify(e, null, 2);
|
|
1099
|
+
} }), (e, w) => (openBlock(), createBlock(unref(XBlockly), {
|
|
1055
1100
|
ref_key: "target",
|
|
1056
|
-
ref:
|
|
1057
|
-
lock:
|
|
1058
|
-
"onUpdate:lock":
|
|
1059
|
-
scale:
|
|
1060
|
-
"onUpdate:scale":
|
|
1061
|
-
dark: unref(
|
|
1062
|
-
locale: unref(
|
|
1101
|
+
ref: M,
|
|
1102
|
+
lock: E.value,
|
|
1103
|
+
"onUpdate:lock": w[0] ||= (e) => E.value = e,
|
|
1104
|
+
scale: D.value,
|
|
1105
|
+
"onUpdate:scale": w[1] ||= (e) => D.value = e,
|
|
1106
|
+
dark: unref(O),
|
|
1107
|
+
locale: unref(k),
|
|
1063
1108
|
type: "json",
|
|
1064
|
-
version: unref(
|
|
1065
|
-
onReady:
|
|
1109
|
+
version: unref(j),
|
|
1110
|
+
onReady: N
|
|
1066
1111
|
}, null, 8, [
|
|
1067
1112
|
"lock",
|
|
1068
1113
|
"scale",
|
|
@@ -1073,82 +1118,99 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1073
1118
|
}
|
|
1074
1119
|
}), _hoisted_1$8 = { class: "text-body-large" }, jsonEditor_default = /* @__PURE__ */ defineComponent({
|
|
1075
1120
|
__name: "index",
|
|
1076
|
-
props: {
|
|
1121
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1122
|
+
hasDelete: {
|
|
1123
|
+
type: Boolean,
|
|
1124
|
+
default: !1
|
|
1125
|
+
},
|
|
1126
|
+
readonly: {
|
|
1127
|
+
type: Boolean,
|
|
1128
|
+
default: !1
|
|
1129
|
+
}
|
|
1130
|
+
}, {
|
|
1077
1131
|
modelValue: { required: !0 },
|
|
1078
1132
|
modelModifiers: {}
|
|
1079
|
-
},
|
|
1080
|
-
emits: ["update:modelValue"],
|
|
1081
|
-
setup(e) {
|
|
1082
|
-
let { t:
|
|
1133
|
+
}),
|
|
1134
|
+
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
1135
|
+
setup(e, { emit: w }) {
|
|
1136
|
+
let { t: T } = useI18n(), { sysBarAvail: E } = useSystem(), { backgroundColor0: D, backgroundColor1: O, backgroundColor2: M } = useColor(), I = useModel(e, "modelValue"), L = w, R = ref(!1), B = ref(1), U = computed(() => {
|
|
1083
1137
|
let e = 48;
|
|
1084
|
-
return
|
|
1138
|
+
return E.value && (e += 24), {
|
|
1085
1139
|
position: "relative",
|
|
1086
|
-
background:
|
|
1140
|
+
background: O.value,
|
|
1087
1141
|
height: `calc(100% - ${e}px)`
|
|
1088
1142
|
};
|
|
1089
|
-
}),
|
|
1143
|
+
}), W = computed(() => T("x-prop-tree.jsonEditor")), { open: K } = useViewStack(`propTreejsonEditorDlg${useId()}`);
|
|
1090
1144
|
onUnmounted(() => {
|
|
1091
|
-
|
|
1145
|
+
K.value = !1;
|
|
1092
1146
|
});
|
|
1093
|
-
let
|
|
1094
|
-
return watch(
|
|
1095
|
-
e ||
|
|
1096
|
-
}), (
|
|
1097
|
-
let
|
|
1098
|
-
return openBlock(), createBlock(
|
|
1099
|
-
modelValue: unref(
|
|
1100
|
-
"onUpdate:modelValue":
|
|
1147
|
+
let J = useTemplateRef("editor");
|
|
1148
|
+
return watch(K, (e) => {
|
|
1149
|
+
e || J.value?.save();
|
|
1150
|
+
}), (w, T) => {
|
|
1151
|
+
let O = resolveComponent("v-btn"), k = resolveComponent("v-sheet"), G = resolveComponent("v-spacer"), q = resolveComponent("v-dialog");
|
|
1152
|
+
return openBlock(), createBlock(q, {
|
|
1153
|
+
modelValue: unref(K),
|
|
1154
|
+
"onUpdate:modelValue": T[5] ||= (e) => isRef(K) ? K.value = e : null,
|
|
1101
1155
|
attach: "",
|
|
1102
1156
|
fullscreen: "",
|
|
1103
1157
|
"no-click-animation": "",
|
|
1104
1158
|
persistent: "",
|
|
1105
1159
|
transition: "dialog-bottom-transition",
|
|
1106
|
-
onKeydown:
|
|
1160
|
+
onKeydown: T[6] ||= withKeys(withModifiers((e) => K.value = !1, ["stop", "prevent"]), ["esc"])
|
|
1107
1161
|
}, {
|
|
1108
|
-
activator: withCtx(({ props:
|
|
1162
|
+
activator: withCtx(({ props: w }) => [createVNode(O, mergeProps(w, {
|
|
1109
1163
|
block: "",
|
|
1110
|
-
density: "comfortable"
|
|
1164
|
+
density: "comfortable",
|
|
1165
|
+
readonly: e.readonly
|
|
1111
1166
|
}), {
|
|
1112
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
1167
|
+
default: withCtx(() => [createTextVNode(toDisplayString(W.value), 1)]),
|
|
1113
1168
|
_: 1
|
|
1114
|
-
}, 16
|
|
1115
|
-
|
|
1116
|
-
|
|
1169
|
+
}, 16, ["readonly"]), e.hasDelete ? (openBlock(), createBlock(O, {
|
|
1170
|
+
key: 0,
|
|
1171
|
+
class: "mx-2",
|
|
1172
|
+
density: "compact",
|
|
1173
|
+
icon: "mdi-minus",
|
|
1174
|
+
variant: "text",
|
|
1175
|
+
onClick: T[0] ||= withModifiers((e) => L("delete"), ["stop"])
|
|
1176
|
+
})) : createCommentVNode("", !0)]),
|
|
1177
|
+
default: withCtx(() => [createVNode(k, {
|
|
1178
|
+
color: unref(D),
|
|
1117
1179
|
height: "100%",
|
|
1118
1180
|
width: "100%"
|
|
1119
1181
|
}, {
|
|
1120
1182
|
default: withCtx(() => [
|
|
1121
|
-
unref(
|
|
1183
|
+
unref(E) ? (openBlock(), createBlock(k, {
|
|
1122
1184
|
key: 0,
|
|
1123
|
-
color: unref(
|
|
1185
|
+
color: unref(M),
|
|
1124
1186
|
height: 24
|
|
1125
1187
|
}, null, 8, ["color"])) : createCommentVNode("", !0),
|
|
1126
|
-
createVNode(
|
|
1188
|
+
createVNode(k, {
|
|
1127
1189
|
class: "d-flex align-center px-2",
|
|
1128
|
-
color: unref(
|
|
1190
|
+
color: unref(M),
|
|
1129
1191
|
height: 48
|
|
1130
1192
|
}, {
|
|
1131
1193
|
default: withCtx(() => [
|
|
1132
|
-
createVNode(
|
|
1194
|
+
createVNode(O, {
|
|
1133
1195
|
density: "comfortable",
|
|
1134
1196
|
icon: "mdi-close",
|
|
1135
1197
|
variant: "text",
|
|
1136
|
-
onClick:
|
|
1198
|
+
onClick: T[1] ||= (e) => K.value = !1
|
|
1137
1199
|
}),
|
|
1138
|
-
createElementVNode("span", _hoisted_1$8, toDisplayString(
|
|
1139
|
-
createVNode(
|
|
1200
|
+
createElementVNode("span", _hoisted_1$8, toDisplayString(W.value), 1),
|
|
1201
|
+
createVNode(G)
|
|
1140
1202
|
]),
|
|
1141
1203
|
_: 1
|
|
1142
1204
|
}, 8, ["color"]),
|
|
1143
|
-
createElementVNode("div", { style: normalizeStyle(
|
|
1205
|
+
createElementVNode("div", { style: normalizeStyle(U.value) }, [createVNode(editor_default, {
|
|
1144
1206
|
ref_key: "editor",
|
|
1145
|
-
ref:
|
|
1146
|
-
modelValue:
|
|
1147
|
-
"onUpdate:modelValue":
|
|
1148
|
-
lock:
|
|
1149
|
-
"onUpdate:lock":
|
|
1150
|
-
scale:
|
|
1151
|
-
"onUpdate:scale":
|
|
1207
|
+
ref: J,
|
|
1208
|
+
modelValue: I.value,
|
|
1209
|
+
"onUpdate:modelValue": T[2] ||= (e) => I.value = e,
|
|
1210
|
+
lock: R.value,
|
|
1211
|
+
"onUpdate:lock": T[3] ||= (e) => R.value = e,
|
|
1212
|
+
scale: B.value,
|
|
1213
|
+
"onUpdate:scale": T[4] ||= (e) => B.value = e
|
|
1152
1214
|
}, null, 8, [
|
|
1153
1215
|
"modelValue",
|
|
1154
1216
|
"lock",
|
|
@@ -1168,88 +1230,99 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1168
1230
|
type: Boolean,
|
|
1169
1231
|
default: !1
|
|
1170
1232
|
},
|
|
1233
|
+
readonly: {
|
|
1234
|
+
type: Boolean,
|
|
1235
|
+
default: !1
|
|
1236
|
+
},
|
|
1171
1237
|
types: {}
|
|
1172
1238
|
}, {
|
|
1173
1239
|
modelValue: {},
|
|
1174
1240
|
modelModifiers: {}
|
|
1175
1241
|
}),
|
|
1176
1242
|
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
1177
|
-
setup(e, { emit:
|
|
1178
|
-
let { t:
|
|
1243
|
+
setup(e, { emit: w }) {
|
|
1244
|
+
let { t: T } = useI18n(), { isMobile: E } = useSystem(), D = useModel(e, "modelValue"), O = w, P = injectVersion(), I = computed(() => pkgs[P.value].types[e.types]), L = ref(0), R = computed(() => {
|
|
1179
1245
|
let e = [];
|
|
1180
|
-
return
|
|
1246
|
+
return I.value?.forEach(({ title: w }, E) => {
|
|
1181
1247
|
e.push({
|
|
1182
|
-
title:
|
|
1183
|
-
value:
|
|
1248
|
+
title: T(w),
|
|
1249
|
+
value: E
|
|
1184
1250
|
});
|
|
1185
1251
|
}), e;
|
|
1186
1252
|
});
|
|
1187
1253
|
watchEffect(() => {
|
|
1188
|
-
|
|
1254
|
+
I.value?.some((e, w) => e.validator(D.value) ? (L.value = w, !0) : !1);
|
|
1189
1255
|
});
|
|
1190
|
-
let
|
|
1191
|
-
|
|
1192
|
-
},
|
|
1193
|
-
if (!e || !
|
|
1194
|
-
let
|
|
1256
|
+
let z = computed(() => I.value?.[L.value]), B = () => {
|
|
1257
|
+
D.value = z.value?.default;
|
|
1258
|
+
}, V = ref(0), H = async (e) => {
|
|
1259
|
+
if (!e || !E() || z.value.ui !== "pixelInput" && z.value.ui !== "percentInput") return;
|
|
1260
|
+
let w = await openNumberDlg({
|
|
1195
1261
|
title: "",
|
|
1196
|
-
value:
|
|
1197
|
-
precision:
|
|
1198
|
-
min:
|
|
1199
|
-
max:
|
|
1200
|
-
step:
|
|
1262
|
+
value: V.value,
|
|
1263
|
+
precision: z.value.precision,
|
|
1264
|
+
min: z.value.min,
|
|
1265
|
+
max: z.value.max,
|
|
1266
|
+
step: z.value.step
|
|
1201
1267
|
});
|
|
1202
|
-
|
|
1268
|
+
w !== void 0 && (V.value = w);
|
|
1203
1269
|
};
|
|
1204
1270
|
return watchEffect(() => {
|
|
1205
|
-
|
|
1206
|
-
}), watch(
|
|
1207
|
-
|
|
1208
|
-
}), (
|
|
1209
|
-
let
|
|
1210
|
-
return openBlock(), createElementBlock("div", _hoisted_1$7, [createElementVNode("div", _hoisted_2$1, [withDirectives(createVNode(
|
|
1211
|
-
modelValue:
|
|
1212
|
-
"onUpdate:modelValue": [
|
|
1271
|
+
z.value?.ui === "pixelInput" ? V.value = parsePixelStr(D.value) : z.value?.ui === "percentInput" && (V.value = parsePercentStr(D.value));
|
|
1272
|
+
}), watch(V, (e) => {
|
|
1273
|
+
z.value?.ui === "pixelInput" ? D.value = e + "px" : z.value?.ui === "percentInput" && (D.value = e + "%");
|
|
1274
|
+
}), (w, T) => {
|
|
1275
|
+
let E = resolveComponent("v-select"), D = resolveComponent("v-number-input"), k = resolveComponent("v-btn"), P = resolveDirective("ripple");
|
|
1276
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [createElementVNode("div", _hoisted_2$1, [withDirectives(createVNode(E, {
|
|
1277
|
+
modelValue: L.value,
|
|
1278
|
+
"onUpdate:modelValue": [T[0] ||= (e) => L.value = e, B],
|
|
1213
1279
|
density: "compact",
|
|
1214
1280
|
"hide-details": "",
|
|
1215
|
-
items:
|
|
1281
|
+
items: R.value,
|
|
1282
|
+
readonly: e.readonly,
|
|
1216
1283
|
"single-line": ""
|
|
1217
|
-
}, null, 8, [
|
|
1218
|
-
|
|
1284
|
+
}, null, 8, [
|
|
1285
|
+
"modelValue",
|
|
1286
|
+
"items",
|
|
1287
|
+
"readonly"
|
|
1288
|
+
]), [[
|
|
1289
|
+
P,
|
|
1219
1290
|
void 0,
|
|
1220
1291
|
void 0,
|
|
1221
1292
|
{ stop: !0 }
|
|
1222
|
-
]]),
|
|
1293
|
+
]]), z.value?.ui === "pixelInput" || z.value?.ui === "percentInput" ? withDirectives((openBlock(), createBlock(D, {
|
|
1223
1294
|
key: 0,
|
|
1224
|
-
modelValue:
|
|
1225
|
-
"onUpdate:modelValue":
|
|
1295
|
+
modelValue: V.value,
|
|
1296
|
+
"onUpdate:modelValue": T[1] ||= (e) => V.value = e,
|
|
1226
1297
|
"control-variant": "stacked",
|
|
1227
1298
|
density: "compact",
|
|
1228
1299
|
"hide-details": "",
|
|
1229
|
-
max:
|
|
1230
|
-
min:
|
|
1231
|
-
precision:
|
|
1300
|
+
max: z.value.max,
|
|
1301
|
+
min: z.value.min,
|
|
1302
|
+
precision: z.value.precision,
|
|
1303
|
+
readonly: e.readonly,
|
|
1232
1304
|
"single-line": "",
|
|
1233
|
-
step:
|
|
1234
|
-
"onUpdate:focused":
|
|
1305
|
+
step: z.value.step,
|
|
1306
|
+
"onUpdate:focused": H
|
|
1235
1307
|
}, null, 8, [
|
|
1236
1308
|
"modelValue",
|
|
1237
1309
|
"max",
|
|
1238
1310
|
"min",
|
|
1239
1311
|
"precision",
|
|
1312
|
+
"readonly",
|
|
1240
1313
|
"step"
|
|
1241
1314
|
])), [[
|
|
1242
|
-
|
|
1315
|
+
P,
|
|
1243
1316
|
void 0,
|
|
1244
1317
|
void 0,
|
|
1245
1318
|
{ stop: !0 }
|
|
1246
|
-
]]) : createCommentVNode("", !0)]), e.hasDelete ? (openBlock(), createBlock(
|
|
1319
|
+
]]) : createCommentVNode("", !0)]), e.hasDelete ? (openBlock(), createBlock(k, {
|
|
1247
1320
|
key: 0,
|
|
1248
1321
|
class: "mx-2",
|
|
1249
1322
|
density: "compact",
|
|
1250
1323
|
icon: "mdi-minus",
|
|
1251
1324
|
variant: "text",
|
|
1252
|
-
onClick:
|
|
1325
|
+
onClick: T[2] ||= withModifiers((e) => O("delete"), ["stop"])
|
|
1253
1326
|
})) : createCommentVNode("", !0)]);
|
|
1254
1327
|
};
|
|
1255
1328
|
}
|
|
@@ -1273,24 +1346,24 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1273
1346
|
modelModifiers: {}
|
|
1274
1347
|
}),
|
|
1275
1348
|
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
1276
|
-
setup(e, { emit:
|
|
1277
|
-
let { isMobile:
|
|
1278
|
-
if (!
|
|
1279
|
-
let
|
|
1349
|
+
setup(e, { emit: w }) {
|
|
1350
|
+
let { isMobile: T } = useSystem(), E = useModel(e, "modelValue"), D = w, O = async (w) => {
|
|
1351
|
+
if (!w || e.readonly || !T()) return;
|
|
1352
|
+
let D = await openNumberDlg({
|
|
1280
1353
|
title: "",
|
|
1281
|
-
value:
|
|
1354
|
+
value: E.value,
|
|
1282
1355
|
precision: e.precision,
|
|
1283
1356
|
min: e.min,
|
|
1284
1357
|
max: e.max,
|
|
1285
1358
|
step: e.step
|
|
1286
1359
|
});
|
|
1287
|
-
|
|
1360
|
+
D !== void 0 && (E.value = D);
|
|
1288
1361
|
};
|
|
1289
|
-
return (
|
|
1290
|
-
let
|
|
1291
|
-
return openBlock(), createElementBlock("div", _hoisted_1$6, [withDirectives(createVNode(
|
|
1292
|
-
modelValue:
|
|
1293
|
-
"onUpdate:modelValue":
|
|
1362
|
+
return (w, T) => {
|
|
1363
|
+
let k = resolveComponent("v-number-input"), N = resolveComponent("v-btn"), P = resolveDirective("ripple");
|
|
1364
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [withDirectives(createVNode(k, {
|
|
1365
|
+
modelValue: E.value,
|
|
1366
|
+
"onUpdate:modelValue": T[0] ||= (e) => E.value = e,
|
|
1294
1367
|
"control-variant": "stacked",
|
|
1295
1368
|
density: "compact",
|
|
1296
1369
|
"hide-details": "",
|
|
@@ -1300,7 +1373,7 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1300
1373
|
readonly: e.readonly,
|
|
1301
1374
|
"single-line": "",
|
|
1302
1375
|
step: e.step,
|
|
1303
|
-
"onUpdate:focused":
|
|
1376
|
+
"onUpdate:focused": O
|
|
1304
1377
|
}, null, 8, [
|
|
1305
1378
|
"modelValue",
|
|
1306
1379
|
"max",
|
|
@@ -1309,17 +1382,17 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1309
1382
|
"readonly",
|
|
1310
1383
|
"step"
|
|
1311
1384
|
]), [[
|
|
1312
|
-
|
|
1385
|
+
P,
|
|
1313
1386
|
void 0,
|
|
1314
1387
|
void 0,
|
|
1315
1388
|
{ stop: !0 }
|
|
1316
|
-
]]), e.hasDelete ? (openBlock(), createBlock(
|
|
1389
|
+
]]), e.hasDelete ? (openBlock(), createBlock(N, {
|
|
1317
1390
|
key: 0,
|
|
1318
1391
|
class: "mx-2",
|
|
1319
1392
|
density: "compact",
|
|
1320
1393
|
icon: "mdi-minus",
|
|
1321
1394
|
variant: "text",
|
|
1322
|
-
onClick:
|
|
1395
|
+
onClick: T[1] ||= withModifiers((e) => D("delete"), ["stop"])
|
|
1323
1396
|
})) : createCommentVNode("", !0)]);
|
|
1324
1397
|
};
|
|
1325
1398
|
}
|
|
@@ -1340,24 +1413,24 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1340
1413
|
modelModifiers: {}
|
|
1341
1414
|
}),
|
|
1342
1415
|
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
1343
|
-
setup(e, { emit:
|
|
1344
|
-
let { t:
|
|
1345
|
-
let
|
|
1346
|
-
return pkgs[
|
|
1347
|
-
|
|
1348
|
-
title:
|
|
1349
|
-
value:
|
|
1416
|
+
setup(e, { emit: w }) {
|
|
1417
|
+
let { t: T } = useI18n(), E = useModel(e, "modelValue"), D = w, O = injectVersion(), N = computed(() => {
|
|
1418
|
+
let w = [];
|
|
1419
|
+
return pkgs[O.value].items[e.items].forEach(({ title: e, value: E }) => {
|
|
1420
|
+
w.push({
|
|
1421
|
+
title: T(e),
|
|
1422
|
+
value: E
|
|
1350
1423
|
});
|
|
1351
|
-
}),
|
|
1424
|
+
}), w;
|
|
1352
1425
|
});
|
|
1353
|
-
return (
|
|
1354
|
-
let
|
|
1355
|
-
return openBlock(), createElementBlock("div", _hoisted_1$5, [withDirectives(createVNode(
|
|
1356
|
-
modelValue:
|
|
1357
|
-
"onUpdate:modelValue":
|
|
1426
|
+
return (w, T) => {
|
|
1427
|
+
let O = resolveComponent("v-select"), k = resolveComponent("v-btn"), P = resolveDirective("ripple");
|
|
1428
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [withDirectives(createVNode(O, {
|
|
1429
|
+
modelValue: E.value,
|
|
1430
|
+
"onUpdate:modelValue": T[0] ||= (e) => E.value = e,
|
|
1358
1431
|
density: "compact",
|
|
1359
1432
|
"hide-details": "",
|
|
1360
|
-
items:
|
|
1433
|
+
items: N.value,
|
|
1361
1434
|
readonly: e.readonly,
|
|
1362
1435
|
"single-line": ""
|
|
1363
1436
|
}, null, 8, [
|
|
@@ -1365,17 +1438,17 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1365
1438
|
"items",
|
|
1366
1439
|
"readonly"
|
|
1367
1440
|
]), [[
|
|
1368
|
-
|
|
1441
|
+
P,
|
|
1369
1442
|
void 0,
|
|
1370
1443
|
void 0,
|
|
1371
1444
|
{ stop: !0 }
|
|
1372
|
-
]]), e.hasDelete ? (openBlock(), createBlock(
|
|
1445
|
+
]]), e.hasDelete ? (openBlock(), createBlock(k, {
|
|
1373
1446
|
key: 0,
|
|
1374
1447
|
class: "mx-2",
|
|
1375
1448
|
density: "compact",
|
|
1376
1449
|
icon: "mdi-minus",
|
|
1377
1450
|
variant: "text",
|
|
1378
|
-
onClick:
|
|
1451
|
+
onClick: T[1] ||= withModifiers((e) => D("delete"), ["stop"])
|
|
1379
1452
|
})) : createCommentVNode("", !0)]);
|
|
1380
1453
|
};
|
|
1381
1454
|
}
|
|
@@ -1386,22 +1459,22 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1386
1459
|
title: {}
|
|
1387
1460
|
},
|
|
1388
1461
|
emits: ["x-click"],
|
|
1389
|
-
setup(e, { emit:
|
|
1390
|
-
let { backgroundColor2:
|
|
1391
|
-
background:
|
|
1462
|
+
setup(e, { emit: w }) {
|
|
1463
|
+
let { backgroundColor2: T, highlightColor: E } = useColor(), D = w, O = ref(!1), A = computed(() => ({
|
|
1464
|
+
background: O.value ? E.value : T.value,
|
|
1392
1465
|
height: "48px",
|
|
1393
1466
|
marginBottom: "1px",
|
|
1394
1467
|
userSelect: "none"
|
|
1395
1468
|
}));
|
|
1396
|
-
return (
|
|
1397
|
-
let
|
|
1469
|
+
return (w, T) => {
|
|
1470
|
+
let E = resolveDirective("ripple");
|
|
1398
1471
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1399
1472
|
class: "d-flex align-center cursor-pointer",
|
|
1400
|
-
style: normalizeStyle(
|
|
1401
|
-
onClick:
|
|
1402
|
-
onMouseout:
|
|
1403
|
-
onMouseover:
|
|
1404
|
-
}, [createElementVNode("span", _hoisted_1$4, toDisplayString(e.title), 1)], 36)), [[
|
|
1473
|
+
style: normalizeStyle(A.value),
|
|
1474
|
+
onClick: T[0] ||= (w) => D("x-click", e.id),
|
|
1475
|
+
onMouseout: T[1] ||= (e) => O.value = !1,
|
|
1476
|
+
onMouseover: T[2] ||= (e) => O.value = !0
|
|
1477
|
+
}, [createElementVNode("span", _hoisted_1$4, toDisplayString(e.title), 1)], 36)), [[E]]);
|
|
1405
1478
|
};
|
|
1406
1479
|
}
|
|
1407
1480
|
}), _hoisted_1$3 = { key: 0 }, _hoisted_2 = {
|
|
@@ -1420,97 +1493,114 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1420
1493
|
},
|
|
1421
1494
|
emits: ["update:modelValue", "update:open"],
|
|
1422
1495
|
setup(e) {
|
|
1423
|
-
let { nameList:
|
|
1424
|
-
|
|
1496
|
+
let { nameList: w } = useSystem(), T = useModel(e, "modelValue"), E = useModel(e, "open"), D = injectSlotList(), k = (e) => {
|
|
1497
|
+
T.value = e, E.value = !1;
|
|
1425
1498
|
};
|
|
1426
|
-
return (e,
|
|
1499
|
+
return (e, T) => unref(D).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$3, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(D), (e) => (openBlock(), createBlock(item_default, {
|
|
1427
1500
|
key: e.id,
|
|
1428
1501
|
id: e.id,
|
|
1429
1502
|
title: e.name,
|
|
1430
|
-
onXClick:
|
|
1431
|
-
}, null, 8, ["id", "title"]))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(
|
|
1503
|
+
onXClick: k
|
|
1504
|
+
}, null, 8, ["id", "title"]))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(w)(["x-prop-tree.no", "x-prop-tree.slot"])), 1));
|
|
1432
1505
|
}
|
|
1433
1506
|
}), _hoisted_1$2 = { class: "text-body-large" }, slotSelect_default = /* @__PURE__ */ defineComponent({
|
|
1434
1507
|
__name: "index",
|
|
1435
|
-
props: {
|
|
1508
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1509
|
+
hasDelete: {
|
|
1510
|
+
type: Boolean,
|
|
1511
|
+
default: !1
|
|
1512
|
+
},
|
|
1513
|
+
readonly: {
|
|
1514
|
+
type: Boolean,
|
|
1515
|
+
default: !1
|
|
1516
|
+
}
|
|
1517
|
+
}, {
|
|
1436
1518
|
modelValue: {},
|
|
1437
1519
|
modelModifiers: {}
|
|
1438
|
-
},
|
|
1439
|
-
emits: ["update:modelValue"],
|
|
1440
|
-
setup(e) {
|
|
1441
|
-
let { t:
|
|
1520
|
+
}),
|
|
1521
|
+
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
1522
|
+
setup(e, { emit: w }) {
|
|
1523
|
+
let { t: T } = useI18n(), E = useDisplay(), { sysBarAvail: D, nameList: O } = useSystem(), { backgroundColor1: M } = useColor(), I = useModel(e, "modelValue"), L = w, R = injectSlotList(), B = computed(() => {
|
|
1442
1524
|
let e = "100%";
|
|
1443
|
-
return
|
|
1444
|
-
background:
|
|
1525
|
+
return E.mdAndUp.value && (e = "400px"), {
|
|
1526
|
+
background: M.value,
|
|
1445
1527
|
width: e,
|
|
1446
1528
|
height: "100%"
|
|
1447
1529
|
};
|
|
1448
|
-
}),
|
|
1530
|
+
}), U = computed(() => {
|
|
1449
1531
|
let e = 48;
|
|
1450
|
-
return
|
|
1532
|
+
return D.value && (e += 24), {
|
|
1451
1533
|
position: "relative",
|
|
1452
1534
|
height: `calc(100% - ${e}px)`
|
|
1453
1535
|
};
|
|
1454
|
-
}),
|
|
1455
|
-
if (!
|
|
1456
|
-
let e =
|
|
1457
|
-
return e ? e.name :
|
|
1458
|
-
}), { open:
|
|
1536
|
+
}), W = computed(() => ({ height: "60px" })), K = computed(() => {
|
|
1537
|
+
if (!I.value) return T("x-runtime-lib.notSet");
|
|
1538
|
+
let e = R.value.find((e) => e.id === I.value);
|
|
1539
|
+
return e ? e.name : T("x-runtime-lib.slotNotAvail");
|
|
1540
|
+
}), { open: q } = useViewStack(`propTreeSlotSelectDlg${useId()}`);
|
|
1459
1541
|
return onUnmounted(() => {
|
|
1460
|
-
|
|
1461
|
-
}), (
|
|
1462
|
-
let
|
|
1463
|
-
return openBlock(), createBlock(
|
|
1464
|
-
modelValue: unref(
|
|
1465
|
-
"onUpdate:modelValue":
|
|
1542
|
+
q.value = !1;
|
|
1543
|
+
}), (w, T) => {
|
|
1544
|
+
let E = resolveComponent("v-btn"), k = resolveComponent("v-sheet"), M = resolveComponent("v-dialog");
|
|
1545
|
+
return openBlock(), createBlock(M, {
|
|
1546
|
+
modelValue: unref(q),
|
|
1547
|
+
"onUpdate:modelValue": T[6] ||= (e) => isRef(q) ? q.value = e : null,
|
|
1466
1548
|
fullscreen: "",
|
|
1467
1549
|
"no-click-animation": "",
|
|
1468
1550
|
persistent: "",
|
|
1469
1551
|
transition: "scroll-x-reverse-transition",
|
|
1470
|
-
onKeydown:
|
|
1552
|
+
onKeydown: T[7] ||= withKeys(withModifiers((e) => q.value = !1, ["stop", "prevent"]), ["esc"])
|
|
1471
1553
|
}, {
|
|
1472
|
-
activator: withCtx(({ props:
|
|
1554
|
+
activator: withCtx(({ props: w }) => [createVNode(E, mergeProps(w, {
|
|
1473
1555
|
block: "",
|
|
1474
|
-
density: "comfortable"
|
|
1556
|
+
density: "comfortable",
|
|
1557
|
+
readonly: e.readonly
|
|
1475
1558
|
}), {
|
|
1476
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
1559
|
+
default: withCtx(() => [createTextVNode(toDisplayString(K.value), 1)]),
|
|
1477
1560
|
_: 1
|
|
1478
|
-
}, 16
|
|
1561
|
+
}, 16, ["readonly"]), e.hasDelete ? (openBlock(), createBlock(E, {
|
|
1562
|
+
key: 0,
|
|
1563
|
+
class: "mx-2",
|
|
1564
|
+
density: "compact",
|
|
1565
|
+
icon: "mdi-minus",
|
|
1566
|
+
variant: "text",
|
|
1567
|
+
onClick: T[0] ||= withModifiers((e) => L("delete"), ["stop"])
|
|
1568
|
+
})) : createCommentVNode("", !0)]),
|
|
1479
1569
|
default: withCtx(() => [createElementVNode("div", {
|
|
1480
1570
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
1481
|
-
onClick:
|
|
1482
|
-
onContextmenu:
|
|
1571
|
+
onClick: T[4] ||= withModifiers((e) => q.value = !1, ["self"]),
|
|
1572
|
+
onContextmenu: T[5] ||= withModifiers((e) => q.value = !1, ["self", "prevent"])
|
|
1483
1573
|
}, [createElementVNode("div", {
|
|
1484
1574
|
class: "elevation-2",
|
|
1485
|
-
style: normalizeStyle(
|
|
1575
|
+
style: normalizeStyle(B.value)
|
|
1486
1576
|
}, [
|
|
1487
|
-
unref(
|
|
1577
|
+
unref(D) ? (openBlock(), createBlock(k, {
|
|
1488
1578
|
key: 0,
|
|
1489
1579
|
color: "transparent",
|
|
1490
1580
|
height: 24
|
|
1491
1581
|
})) : createCommentVNode("", !0),
|
|
1492
|
-
createVNode(
|
|
1582
|
+
createVNode(k, {
|
|
1493
1583
|
class: "d-flex align-center px-3",
|
|
1494
1584
|
color: "transparent",
|
|
1495
1585
|
height: 48
|
|
1496
1586
|
}, {
|
|
1497
|
-
default: withCtx(() => [createVNode(
|
|
1587
|
+
default: withCtx(() => [createVNode(E, {
|
|
1498
1588
|
density: "comfortable",
|
|
1499
1589
|
icon: "mdi-close",
|
|
1500
1590
|
variant: "text",
|
|
1501
|
-
onClick:
|
|
1502
|
-
}), createElementVNode("span", _hoisted_1$2, toDisplayString(unref(
|
|
1591
|
+
onClick: T[1] ||= (e) => q.value = !1
|
|
1592
|
+
}), createElementVNode("span", _hoisted_1$2, toDisplayString(unref(O)(["x-prop-tree.select", "x-prop-tree.slot"])), 1)]),
|
|
1503
1593
|
_: 1
|
|
1504
1594
|
}),
|
|
1505
1595
|
createElementVNode("div", {
|
|
1506
1596
|
class: "overflow-y-auto",
|
|
1507
|
-
style: normalizeStyle(
|
|
1597
|
+
style: normalizeStyle(U.value)
|
|
1508
1598
|
}, [createVNode(slotList_default, {
|
|
1509
|
-
modelValue:
|
|
1510
|
-
"onUpdate:modelValue":
|
|
1511
|
-
open: unref(
|
|
1512
|
-
"onUpdate:open":
|
|
1513
|
-
}, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(
|
|
1599
|
+
modelValue: I.value,
|
|
1600
|
+
"onUpdate:modelValue": T[2] ||= (e) => I.value = e,
|
|
1601
|
+
open: unref(q),
|
|
1602
|
+
"onUpdate:open": T[3] ||= (e) => isRef(q) ? q.value = e : null
|
|
1603
|
+
}, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(W.value) }, null, 4)], 4)
|
|
1514
1604
|
], 4)], 32)]),
|
|
1515
1605
|
_: 1
|
|
1516
1606
|
}, 8, ["modelValue"]);
|
|
@@ -1532,37 +1622,37 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1532
1622
|
modelModifiers: {}
|
|
1533
1623
|
}),
|
|
1534
1624
|
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
1535
|
-
setup(e, { emit:
|
|
1536
|
-
let { isMobile:
|
|
1537
|
-
if (!
|
|
1538
|
-
let
|
|
1625
|
+
setup(e, { emit: w }) {
|
|
1626
|
+
let { isMobile: T } = useSystem(), E = useModel(e, "modelValue"), D = w, O = async (w) => {
|
|
1627
|
+
if (!w || e.readonly || !T()) return;
|
|
1628
|
+
let D = await openPromptDlg({
|
|
1539
1629
|
title: "",
|
|
1540
|
-
value:
|
|
1630
|
+
value: E.value
|
|
1541
1631
|
});
|
|
1542
|
-
|
|
1632
|
+
D !== void 0 && (E.value = D);
|
|
1543
1633
|
};
|
|
1544
|
-
return (
|
|
1545
|
-
let
|
|
1546
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [withDirectives(createVNode(
|
|
1547
|
-
modelValue:
|
|
1548
|
-
"onUpdate:modelValue":
|
|
1634
|
+
return (w, T) => {
|
|
1635
|
+
let k = resolveComponent("v-text-field"), N = resolveComponent("v-btn"), P = resolveDirective("ripple");
|
|
1636
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [withDirectives(createVNode(k, {
|
|
1637
|
+
modelValue: E.value,
|
|
1638
|
+
"onUpdate:modelValue": T[0] ||= (e) => E.value = e,
|
|
1549
1639
|
density: "compact",
|
|
1550
1640
|
"hide-details": "",
|
|
1551
1641
|
readonly: e.readonly,
|
|
1552
1642
|
"single-line": "",
|
|
1553
|
-
"onUpdate:focused":
|
|
1643
|
+
"onUpdate:focused": O
|
|
1554
1644
|
}, null, 8, ["modelValue", "readonly"]), [[
|
|
1555
|
-
|
|
1645
|
+
P,
|
|
1556
1646
|
void 0,
|
|
1557
1647
|
void 0,
|
|
1558
1648
|
{ stop: !0 }
|
|
1559
|
-
]]), e.hasDelete ? (openBlock(), createBlock(
|
|
1649
|
+
]]), e.hasDelete ? (openBlock(), createBlock(N, {
|
|
1560
1650
|
key: 0,
|
|
1561
1651
|
class: "mx-2",
|
|
1562
1652
|
density: "compact",
|
|
1563
1653
|
icon: "mdi-minus",
|
|
1564
1654
|
variant: "text",
|
|
1565
|
-
onClick:
|
|
1655
|
+
onClick: T[1] ||= withModifiers((e) => D("delete"), ["stop"])
|
|
1566
1656
|
})) : createCommentVNode("", !0)]);
|
|
1567
1657
|
};
|
|
1568
1658
|
}
|
|
@@ -1582,142 +1672,179 @@ var _hoisted_1$17 = { class: "text-label-large ml-1" }, _hoisted_2$5 = { class:
|
|
|
1582
1672
|
modelModifiers: {}
|
|
1583
1673
|
}),
|
|
1584
1674
|
emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
|
|
1585
|
-
setup(e, { emit:
|
|
1586
|
-
let
|
|
1587
|
-
return (
|
|
1588
|
-
let
|
|
1589
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(
|
|
1590
|
-
modelValue:
|
|
1591
|
-
"onUpdate:modelValue":
|
|
1675
|
+
setup(e, { emit: w }) {
|
|
1676
|
+
let T = useModel(e, "modelValue"), E = w;
|
|
1677
|
+
return (w, D) => {
|
|
1678
|
+
let O = resolveComponent("v-switch"), k = resolveComponent("v-btn");
|
|
1679
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(O, {
|
|
1680
|
+
modelValue: T.value,
|
|
1681
|
+
"onUpdate:modelValue": D[0] ||= (e) => T.value = e,
|
|
1592
1682
|
class: "ml-1",
|
|
1593
1683
|
color: "primary",
|
|
1594
1684
|
density: "compact",
|
|
1595
1685
|
"hide-details": "",
|
|
1596
1686
|
readonly: e.readonly
|
|
1597
|
-
}, null, 8, ["modelValue", "readonly"]), e.hasDelete ? (openBlock(), createBlock(
|
|
1687
|
+
}, null, 8, ["modelValue", "readonly"]), e.hasDelete ? (openBlock(), createBlock(k, {
|
|
1598
1688
|
key: 0,
|
|
1599
1689
|
class: "mx-2",
|
|
1600
1690
|
density: "compact",
|
|
1601
1691
|
icon: "mdi-minus",
|
|
1602
1692
|
variant: "text",
|
|
1603
|
-
onClick:
|
|
1693
|
+
onClick: D[1] ||= withModifiers((e) => E("delete"), ["stop"])
|
|
1604
1694
|
})) : createCommentVNode("", !0)]);
|
|
1605
1695
|
};
|
|
1606
1696
|
}
|
|
1607
1697
|
});
|
|
1608
|
-
function useUiAdaptSlotSelect(
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
"
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1698
|
+
function useUiAdaptSlotSelect() {
|
|
1699
|
+
let e = injectChangeEvent();
|
|
1700
|
+
return { renderUiAdaptSlotSelect: (w, T, E, D, O) => {
|
|
1701
|
+
if (T.ui !== "selectAdaptSlot") throw Error("renderUiSlotSelect property ui must be selectAdaptSlot");
|
|
1702
|
+
return h(adaptSlotSelect_default, {
|
|
1703
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e))(),
|
|
1704
|
+
"onUpdate:modelValue": (k) => {
|
|
1705
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1706
|
+
},
|
|
1707
|
+
hasDelete: D !== void 0 && !O,
|
|
1708
|
+
onDelete: () => {
|
|
1709
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1710
|
+
},
|
|
1711
|
+
readonly: T.readonly
|
|
1712
|
+
});
|
|
1713
|
+
} };
|
|
1615
1714
|
}
|
|
1616
|
-
function useUiColorPicker(
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
"
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1715
|
+
function useUiColorPicker() {
|
|
1716
|
+
let e = injectChangeEvent();
|
|
1717
|
+
return { renderUiColorPicker: (w, T, E, D, O) => {
|
|
1718
|
+
if (T.ui !== "colorPicker") throw Error("renderUiColorPicker property ui must be colorPicker");
|
|
1719
|
+
return h(colorPicker_default, {
|
|
1720
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e))(),
|
|
1721
|
+
"onUpdate:modelValue": (k) => {
|
|
1722
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1723
|
+
},
|
|
1724
|
+
hasDelete: D !== void 0 && !O,
|
|
1725
|
+
onDelete: () => {
|
|
1726
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1727
|
+
},
|
|
1728
|
+
readonly: T.readonly
|
|
1729
|
+
});
|
|
1730
|
+
} };
|
|
1628
1731
|
}
|
|
1629
|
-
function useUiCompSelect(
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
"
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1732
|
+
function useUiCompSelect() {
|
|
1733
|
+
let e = injectChangeEvent();
|
|
1734
|
+
return { renderUiCompSelect: (w, T, E, D, O) => {
|
|
1735
|
+
if (T.ui !== "selectComp") throw Error("renderUiCompSelect property ui must be selectComp");
|
|
1736
|
+
return h(compSelect_default, {
|
|
1737
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e))(),
|
|
1738
|
+
"onUpdate:modelValue": (k) => {
|
|
1739
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1740
|
+
},
|
|
1741
|
+
hasDelete: D !== void 0 && !O,
|
|
1742
|
+
onDelete: () => {
|
|
1743
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1744
|
+
},
|
|
1745
|
+
readonly: T.readonly
|
|
1746
|
+
});
|
|
1747
|
+
} };
|
|
1636
1748
|
}
|
|
1637
|
-
function useUiDummy(
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
}
|
|
1643
|
-
getModelValue(m, g, _, e, v, y);
|
|
1749
|
+
function useUiDummy() {
|
|
1750
|
+
let e = injectChangeEvent();
|
|
1751
|
+
return { renderUiDummy: (w, T, E, D, O) => {
|
|
1752
|
+
if (T.ui !== "dummy") throw Error("renderUiDummy property ui must be dummy");
|
|
1753
|
+
getModelValue(w, T, E, D, O, e);
|
|
1644
1754
|
} };
|
|
1645
1755
|
}
|
|
1646
|
-
function useUiJsonEditor(
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
"
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1756
|
+
function useUiJsonEditor() {
|
|
1757
|
+
let e = injectChangeEvent();
|
|
1758
|
+
return { renderUiJsonEditor: (w, T, E, D, O) => {
|
|
1759
|
+
if (T.ui !== "jsonEditor") throw Error("renderUijsonEditor property ui must be jsonEditor");
|
|
1760
|
+
return h(jsonEditor_default, {
|
|
1761
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e) ?? "{}")(),
|
|
1762
|
+
"onUpdate:modelValue": (k) => {
|
|
1763
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1764
|
+
},
|
|
1765
|
+
hasDelete: D !== void 0 && !O,
|
|
1766
|
+
onDelete: () => {
|
|
1767
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1768
|
+
},
|
|
1769
|
+
readonly: T.readonly
|
|
1770
|
+
});
|
|
1771
|
+
} };
|
|
1653
1772
|
}
|
|
1654
|
-
function useUiMultiTypes(
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
"
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1773
|
+
function useUiMultiTypes() {
|
|
1774
|
+
let e = injectChangeEvent();
|
|
1775
|
+
return { renderUiMultiTypes: (w, T, E, D, O) => {
|
|
1776
|
+
if (T.ui !== "multiTypes") throw Error("renderUiMultiTypes property ui must be multiTypes");
|
|
1777
|
+
return h(multiTypes_default, {
|
|
1778
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e) ?? "")(),
|
|
1779
|
+
"onUpdate:modelValue": (k) => {
|
|
1780
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1781
|
+
},
|
|
1782
|
+
hasDelete: D !== void 0 && !O,
|
|
1783
|
+
onDelete: () => {
|
|
1784
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1785
|
+
},
|
|
1786
|
+
types: T.types
|
|
1787
|
+
});
|
|
1788
|
+
} };
|
|
1666
1789
|
}
|
|
1667
|
-
function useUiNumInput(
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
"
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1790
|
+
function useUiNumInput() {
|
|
1791
|
+
let e = injectChangeEvent();
|
|
1792
|
+
return { renderUiNumInput: (w, T, E, D, O) => {
|
|
1793
|
+
if (T.ui !== "numInput") throw Error("renderUiNumInput property ui must be numInput");
|
|
1794
|
+
return h(numInput_default, {
|
|
1795
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e))(),
|
|
1796
|
+
"onUpdate:modelValue": (k) => {
|
|
1797
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1798
|
+
},
|
|
1799
|
+
hasDelete: D !== void 0 && !O,
|
|
1800
|
+
onDelete: () => {
|
|
1801
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1802
|
+
},
|
|
1803
|
+
precision: T.precision,
|
|
1804
|
+
min: T.min,
|
|
1805
|
+
max: T.max,
|
|
1806
|
+
step: T.step,
|
|
1807
|
+
readonly: T.readonly
|
|
1808
|
+
});
|
|
1809
|
+
} };
|
|
1683
1810
|
}
|
|
1684
1811
|
var entry_default = /* @__PURE__ */ defineComponent({
|
|
1685
1812
|
__name: "index",
|
|
1686
1813
|
props: { minHeight: {} },
|
|
1687
1814
|
emits: ["menu"],
|
|
1688
|
-
setup(e, { emit:
|
|
1689
|
-
let { backgroundColor2:
|
|
1690
|
-
background:
|
|
1815
|
+
setup(e, { emit: w }) {
|
|
1816
|
+
let { backgroundColor2: T, highlightColor: E } = useColor(), D = w, O = ref(!1), A = computed(() => ({
|
|
1817
|
+
background: O.value ? E.value : T.value,
|
|
1691
1818
|
minHeight: e.minHeight,
|
|
1692
1819
|
paddingRight: "4px",
|
|
1693
1820
|
marginBottom: "1px",
|
|
1694
1821
|
userSelect: "none"
|
|
1695
|
-
})),
|
|
1696
|
-
|
|
1822
|
+
})), j = (e) => {
|
|
1823
|
+
D("menu", e.clientX, e.clientY);
|
|
1697
1824
|
};
|
|
1698
|
-
return (e,
|
|
1699
|
-
let
|
|
1825
|
+
return (e, w) => {
|
|
1826
|
+
let T = resolveDirective("ripple");
|
|
1700
1827
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1701
1828
|
class: "d-flex justify-space-between align-center cursor-pointer",
|
|
1702
|
-
style: normalizeStyle(
|
|
1703
|
-
onContextmenu: withModifiers(
|
|
1704
|
-
onMouseout:
|
|
1705
|
-
onMouseover:
|
|
1706
|
-
}, [renderSlot(e.$slots, "default")], 36)), [[
|
|
1829
|
+
style: normalizeStyle(A.value),
|
|
1830
|
+
onContextmenu: withModifiers(j, ["self", "prevent"]),
|
|
1831
|
+
onMouseout: w[0] ||= (e) => O.value = !1,
|
|
1832
|
+
onMouseover: w[1] ||= (e) => O.value = !0
|
|
1833
|
+
}, [renderSlot(e.$slots, "default")], 36)), [[T]]);
|
|
1707
1834
|
};
|
|
1708
1835
|
}
|
|
1709
1836
|
});
|
|
1710
|
-
function useUiProperty(
|
|
1711
|
-
let { t:
|
|
1712
|
-
return { renderProperty: (
|
|
1713
|
-
let
|
|
1714
|
-
return isPropertyChanged(
|
|
1715
|
-
minHeight:
|
|
1716
|
-
onMenu: (e,
|
|
1837
|
+
function useUiProperty() {
|
|
1838
|
+
let { t: e } = useI18n(), w = injectPropertyState();
|
|
1839
|
+
return { renderProperty: (T, E, D) => {
|
|
1840
|
+
let O = T[T.length - 1], k = typeof O == "number" ? `[${O + 1}]` : e(E.name);
|
|
1841
|
+
return isPropertyChanged(w.value, T) && (k += " *"), h(entry_default, {
|
|
1842
|
+
minHeight: "56px",
|
|
1843
|
+
onMenu: (e, w) => {
|
|
1717
1844
|
eventBus.emit("propTreeMenu", {
|
|
1718
1845
|
x: e,
|
|
1719
|
-
y:
|
|
1720
|
-
keys:
|
|
1846
|
+
y: w,
|
|
1847
|
+
keys: T
|
|
1721
1848
|
});
|
|
1722
1849
|
}
|
|
1723
1850
|
}, () => [h("span", {
|
|
@@ -1725,265 +1852,271 @@ function useUiProperty(e, m, g) {
|
|
|
1725
1852
|
marginLeft: "4px",
|
|
1726
1853
|
pointerEvents: "none"
|
|
1727
1854
|
},
|
|
1728
|
-
innerHTML:
|
|
1729
|
-
}), h("div", { style: { width:
|
|
1855
|
+
innerHTML: k
|
|
1856
|
+
}), h("div", { style: { width: "200px" } }, D)]);
|
|
1730
1857
|
} };
|
|
1731
1858
|
}
|
|
1732
|
-
function useUiSelect(
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
"
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
return { renderUiSlotSelect: (m, g, _, v, y) => g.ui === "selectSlot" ? h(slotSelect_default, {
|
|
1748
|
-
modelValue: (() => getModelValue(m, g, _, e, v, y))(),
|
|
1749
|
-
"onUpdate:modelValue": (b) => {
|
|
1750
|
-
setModelValue(m, g, _, b, e, v, y);
|
|
1751
|
-
}
|
|
1752
|
-
}) : (console.assert(!1), h("div", "renderUiSlotSelect property ui must be selectSlot")) };
|
|
1753
|
-
}
|
|
1754
|
-
function useUiStrInput(e) {
|
|
1755
|
-
return { renderUiStrInput: (m, g, _, v, y) => g.ui === "strInput" ? h(strInput_default, {
|
|
1756
|
-
modelValue: (() => g.static ? g.value : getModelValue(m, g, _, e, v, y))(),
|
|
1757
|
-
"onUpdate:modelValue": (b) => {
|
|
1758
|
-
g.static || setModelValue(m, g, _, b, e, v, y);
|
|
1759
|
-
},
|
|
1760
|
-
hasDelete: v !== void 0 && !y,
|
|
1761
|
-
onDelete: () => {
|
|
1762
|
-
v === void 0 || y || (_.splice(v, 1), e(m.slice(0, -1), _));
|
|
1763
|
-
},
|
|
1764
|
-
readonly: g.static || g.readonly
|
|
1765
|
-
}) : (console.assert(!1), h("div", "renderUiStrInput property ui must be strInput")) };
|
|
1766
|
-
}
|
|
1767
|
-
function useUiSwitch(e) {
|
|
1768
|
-
return { renderUiSwitch: (m, g, _, v, y) => g.ui === "switch" ? h(switch_default, {
|
|
1769
|
-
modelValue: (() => getModelValue(m, g, _, e, v, y) ?? !1)(),
|
|
1770
|
-
"onUpdate:modelValue": (b) => {
|
|
1771
|
-
setModelValue(m, g, _, b, e, v, y);
|
|
1772
|
-
},
|
|
1773
|
-
hasDelete: v !== void 0 && !y,
|
|
1774
|
-
onDelete: () => {
|
|
1775
|
-
v === void 0 || y || (_.splice(v, 1), e(m.slice(0, 1), _));
|
|
1776
|
-
},
|
|
1777
|
-
readonly: g.readonly
|
|
1778
|
-
}) : (console.assert(!1), h("div", "renderUiSwitch property ui must be switch")) };
|
|
1779
|
-
}
|
|
1780
|
-
var propTree_default = /* @__PURE__ */ defineComponent({
|
|
1781
|
-
__name: "index",
|
|
1782
|
-
props: {
|
|
1783
|
-
unique: {},
|
|
1784
|
-
config: {},
|
|
1785
|
-
object: {},
|
|
1786
|
-
version: {},
|
|
1787
|
-
type: {},
|
|
1788
|
-
subtype: {}
|
|
1789
|
-
},
|
|
1790
|
-
emits: ["change"],
|
|
1791
|
-
setup(m, { emit: g }) {
|
|
1792
|
-
let { t: _ } = useI18n(), { backgroundColor1: v } = useColor(), b = m, x = g, S = ref("20px"), w = ref("56px"), T = ref("200px"), D = ref(b.version);
|
|
1793
|
-
provideVersion(D), watch(() => b.version, () => {
|
|
1794
|
-
D.value = b.version;
|
|
1795
|
-
});
|
|
1796
|
-
let k = ref(b.type);
|
|
1797
|
-
watch(() => b.type, () => {
|
|
1798
|
-
k.value = b.type;
|
|
1799
|
-
});
|
|
1800
|
-
let A = ref(b.subtype);
|
|
1801
|
-
watch(() => b.subtype, () => {
|
|
1802
|
-
A.value = b.subtype;
|
|
1859
|
+
function useUiSelect() {
|
|
1860
|
+
let e = injectChangeEvent();
|
|
1861
|
+
return { renderUiSelect: (w, T, E, D, O) => {
|
|
1862
|
+
if (T.ui !== "select") throw Error("renderUiSelect property ui must be select");
|
|
1863
|
+
return h(select_default, {
|
|
1864
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e) ?? "")(),
|
|
1865
|
+
"onUpdate:modelValue": (k) => {
|
|
1866
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1867
|
+
},
|
|
1868
|
+
hasDelete: D !== void 0 && !O,
|
|
1869
|
+
onDelete: () => {
|
|
1870
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1871
|
+
},
|
|
1872
|
+
items: T.items,
|
|
1873
|
+
readonly: T.readonly
|
|
1803
1874
|
});
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1875
|
+
} };
|
|
1876
|
+
}
|
|
1877
|
+
function useUiSlotSelect() {
|
|
1878
|
+
let e = injectChangeEvent();
|
|
1879
|
+
return { renderUiSlotSelect: (w, T, E, D, O) => {
|
|
1880
|
+
if (T.ui !== "selectSlot") throw Error("renderUiSlotSelect property ui must be selectSlot");
|
|
1881
|
+
return h(slotSelect_default, {
|
|
1882
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e))(),
|
|
1883
|
+
"onUpdate:modelValue": (k) => {
|
|
1884
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1885
|
+
},
|
|
1886
|
+
hasDelete: D !== void 0 && !O,
|
|
1887
|
+
onDelete: () => {
|
|
1888
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1889
|
+
},
|
|
1890
|
+
readonly: T.readonly
|
|
1807
1891
|
});
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1892
|
+
} };
|
|
1893
|
+
}
|
|
1894
|
+
function useUiStrInput() {
|
|
1895
|
+
let e = injectChangeEvent();
|
|
1896
|
+
return { renderUiStrInput: (w, T, E, D, O) => {
|
|
1897
|
+
if (T.ui !== "strInput") throw Error("renderUiStrInput property ui must be strInput");
|
|
1898
|
+
return h(strInput_default, {
|
|
1899
|
+
modelValue: (() => T.static ? T.value : getModelValue(w, T, E, D, O, e))(),
|
|
1900
|
+
"onUpdate:modelValue": (k) => {
|
|
1901
|
+
T.static || setModelValue(w, T, E, k, D, O, e);
|
|
1902
|
+
},
|
|
1903
|
+
hasDelete: D !== void 0 && !O,
|
|
1904
|
+
onDelete: () => {
|
|
1905
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, -1), E));
|
|
1906
|
+
},
|
|
1907
|
+
readonly: T.static || T.readonly
|
|
1811
1908
|
});
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1909
|
+
} };
|
|
1910
|
+
}
|
|
1911
|
+
function useUiSwitch() {
|
|
1912
|
+
let e = injectChangeEvent();
|
|
1913
|
+
return { renderUiSwitch: (w, T, E, D, O) => {
|
|
1914
|
+
if (T.ui !== "switch") throw Error("renderUiSwitch property ui must be switch");
|
|
1915
|
+
return h(switch_default, {
|
|
1916
|
+
modelValue: (() => getModelValue(w, T, E, D, O, e) ?? !1)(),
|
|
1917
|
+
"onUpdate:modelValue": (k) => {
|
|
1918
|
+
setModelValue(w, T, E, k, D, O, e);
|
|
1919
|
+
},
|
|
1920
|
+
hasDelete: D !== void 0 && !O,
|
|
1921
|
+
onDelete: () => {
|
|
1922
|
+
D === void 0 || O || (E.splice(D, 1), e(w.slice(0, 1), E));
|
|
1923
|
+
},
|
|
1924
|
+
readonly: T.readonly
|
|
1819
1925
|
});
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
let
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
isCollapse(N, e) && isPropertyChanged(P.value, e) && (x += " *");
|
|
1836
|
-
let C = h(title_default, {
|
|
1837
|
-
title: x,
|
|
1838
|
-
collapse: isCollapse(N, e),
|
|
1926
|
+
} };
|
|
1927
|
+
}
|
|
1928
|
+
var indent = "20px", main_default = /* @__PURE__ */ defineComponent({
|
|
1929
|
+
__name: "main",
|
|
1930
|
+
setup(w) {
|
|
1931
|
+
let { t: T } = useI18n(), { backgroundColor1: E } = useColor(), D = injectConfig(), k = injectObject(), A = injectCollapseState(), j = injectPropertyState(), N = injectChangeEvent();
|
|
1932
|
+
useCompList(), useSlotList(), useAdaptSlotList();
|
|
1933
|
+
let { renderProperty: P } = useUiProperty(), { renderUiDummy: I } = useUiDummy(), { renderUiStrInput: R } = useUiStrInput(), { renderUiNumInput: z } = useUiNumInput(), { renderUiSwitch: B } = useUiSwitch(), { renderUiSelect: V } = useUiSelect(), { renderUiColorPicker: H } = useUiColorPicker(), { renderUiJsonEditor: U } = useUiJsonEditor(), { renderUiMultiTypes: W } = useUiMultiTypes(), { renderUiCompSelect: G } = useUiCompSelect(), { renderUiSlotSelect: K } = useUiSlotSelect(), { renderUiAdaptSlotSelect: q } = useUiAdaptSlotSelect(), J = (w, T, E, D, O, k) => (w = cloneDeep_default(w), D === void 0 ? w.push(T.key) : (w.push(D), O && w.push(T.key)), T.ui ? T.array && !k ? Z(w, T, E, D, O) : Q(w, T, E, D, O) : T.array ? Y(w, T, E, D, O) : X(w, T, E, D, O)), Y = (e, w, E, D, O) => {
|
|
1934
|
+
if (w.ui) throw Error("renderBranchArray property ui must be invalid");
|
|
1935
|
+
if (!w.array) throw Error("renderBranchArray property array must be valid");
|
|
1936
|
+
let k = ensureArrayValue(e, w, E, D, O, N), M = T(w.name);
|
|
1937
|
+
isCollapse(A, e) && isPropertyChanged(j.value, e) && (M += " *");
|
|
1938
|
+
let P = h(title_default, {
|
|
1939
|
+
title: M,
|
|
1940
|
+
collapse: isCollapse(A, e),
|
|
1839
1941
|
hasCreate: !0,
|
|
1840
|
-
onCollapse: (
|
|
1841
|
-
setCollapse(
|
|
1942
|
+
onCollapse: (w) => {
|
|
1943
|
+
setCollapse(A, e, w);
|
|
1842
1944
|
},
|
|
1843
|
-
onMenu: (
|
|
1945
|
+
onMenu: (w, T) => {
|
|
1844
1946
|
eventBus.emit("propTreeMenu", {
|
|
1845
|
-
x:
|
|
1846
|
-
y:
|
|
1947
|
+
x: w,
|
|
1948
|
+
y: T,
|
|
1847
1949
|
keys: e
|
|
1848
1950
|
});
|
|
1849
1951
|
},
|
|
1850
1952
|
onCreate: () => {
|
|
1851
|
-
|
|
1953
|
+
k.push({}), N(e, k);
|
|
1852
1954
|
}
|
|
1853
|
-
}),
|
|
1854
|
-
let
|
|
1855
|
-
for (let
|
|
1856
|
-
let
|
|
1857
|
-
isCollapse(
|
|
1858
|
-
let
|
|
1859
|
-
title:
|
|
1860
|
-
collapse: isCollapse(
|
|
1955
|
+
}), F = h("div", { style: { paddingLeft: indent } }, (() => {
|
|
1956
|
+
let T = [];
|
|
1957
|
+
for (let E = 0; E < k.length; E++) {
|
|
1958
|
+
let D = [...e, E], O = `[${E + 1}]`;
|
|
1959
|
+
isCollapse(A, [...e, E]) && isPropertyChanged(j.value, D) && (O += " *");
|
|
1960
|
+
let M = h(title_default, {
|
|
1961
|
+
title: O,
|
|
1962
|
+
collapse: isCollapse(A, [...e, E]),
|
|
1861
1963
|
hasDelete: !0,
|
|
1862
|
-
index:
|
|
1863
|
-
onCollapse: (
|
|
1864
|
-
setCollapse(
|
|
1964
|
+
index: E,
|
|
1965
|
+
onCollapse: (w) => {
|
|
1966
|
+
setCollapse(A, [...e, E], w);
|
|
1865
1967
|
},
|
|
1866
|
-
onMenu: (e,
|
|
1968
|
+
onMenu: (e, w) => {
|
|
1867
1969
|
eventBus.emit("propTreeMenu", {
|
|
1868
1970
|
x: e,
|
|
1869
|
-
y:
|
|
1870
|
-
keys:
|
|
1971
|
+
y: w,
|
|
1972
|
+
keys: D
|
|
1871
1973
|
});
|
|
1872
1974
|
},
|
|
1873
|
-
onDelete: (
|
|
1874
|
-
|
|
1975
|
+
onDelete: (w) => {
|
|
1976
|
+
k.splice(w, 1), N(e, k);
|
|
1875
1977
|
}
|
|
1876
1978
|
});
|
|
1877
|
-
|
|
1878
|
-
let
|
|
1879
|
-
let
|
|
1880
|
-
for (let
|
|
1881
|
-
|
|
1882
|
-
g.push(m);
|
|
1883
|
-
}
|
|
1884
|
-
return g;
|
|
1979
|
+
T.push(M);
|
|
1980
|
+
let P = h("div", { style: { paddingLeft: indent } }, (() => {
|
|
1981
|
+
let T = [];
|
|
1982
|
+
for (let D of w.children) T.push(J(e, D, k[E], E, !0));
|
|
1983
|
+
return T;
|
|
1885
1984
|
})());
|
|
1886
|
-
isCollapse(
|
|
1985
|
+
isCollapse(A, [...e, E]) || T.push(P);
|
|
1887
1986
|
}
|
|
1888
|
-
return
|
|
1987
|
+
return T;
|
|
1889
1988
|
})());
|
|
1890
1989
|
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
1891
|
-
let
|
|
1892
|
-
return
|
|
1990
|
+
let w = [];
|
|
1991
|
+
return w.push(P), isCollapse(A, e) || w.push(F), w;
|
|
1893
1992
|
})());
|
|
1894
|
-
}, X = (e,
|
|
1895
|
-
if (
|
|
1896
|
-
if (
|
|
1897
|
-
let
|
|
1898
|
-
isCollapse(
|
|
1899
|
-
let
|
|
1900
|
-
title:
|
|
1901
|
-
collapse: isCollapse(
|
|
1902
|
-
hasDelete:
|
|
1903
|
-
onCollapse: (
|
|
1904
|
-
setCollapse(
|
|
1993
|
+
}, X = (e, w, E, D, O) => {
|
|
1994
|
+
if (w.ui) throw Error("renderBranchScalar property ui must be invalid");
|
|
1995
|
+
if (w.array) throw Error("renderBranchScalar property array must be invalid");
|
|
1996
|
+
let k = T(w.name);
|
|
1997
|
+
isCollapse(A, e) && isPropertyChanged(j.value, e) && (k += " *");
|
|
1998
|
+
let M = h(title_default, {
|
|
1999
|
+
title: k,
|
|
2000
|
+
collapse: isCollapse(A, e),
|
|
2001
|
+
hasDelete: D !== void 0 && !O,
|
|
2002
|
+
onCollapse: (w) => {
|
|
2003
|
+
setCollapse(A, e, w);
|
|
1905
2004
|
},
|
|
1906
|
-
onMenu: (
|
|
2005
|
+
onMenu: (w, T) => {
|
|
1907
2006
|
eventBus.emit("propTreeMenu", {
|
|
1908
|
-
x:
|
|
1909
|
-
y:
|
|
2007
|
+
x: w,
|
|
2008
|
+
y: T,
|
|
1910
2009
|
keys: e
|
|
1911
2010
|
});
|
|
1912
2011
|
},
|
|
1913
2012
|
onDelete: () => {
|
|
1914
|
-
|
|
1915
|
-
}
|
|
1916
|
-
}), C = h("div", { style: { paddingLeft: S.value } }, (() => {
|
|
1917
|
-
let _ = [];
|
|
1918
|
-
for (let v of m.children) {
|
|
1919
|
-
let y = J(e, v, (() => (typeof g[m.key] != "object" && (g[m.key] = {}, F(e, g[m.key])), g[m.key]))(), void 0, !1);
|
|
1920
|
-
_.push(y);
|
|
2013
|
+
D === void 0 || O || (E.splice(D, 1), N(e.slice(0, -1), E));
|
|
1921
2014
|
}
|
|
1922
|
-
|
|
2015
|
+
}), P = h("div", { style: { paddingLeft: indent } }, (() => {
|
|
2016
|
+
let T = [];
|
|
2017
|
+
for (let D of w.children) T.push(J(e, D, (() => (typeof E[w.key] != "object" && (E[w.key] = {}, N(e, E[w.key])), E[w.key]))(), void 0, !1));
|
|
2018
|
+
return T;
|
|
1923
2019
|
})());
|
|
1924
2020
|
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
1925
|
-
let
|
|
1926
|
-
return
|
|
2021
|
+
let w = [];
|
|
2022
|
+
return w.push(M), isCollapse(A, e) || w.push(P), w;
|
|
1927
2023
|
})());
|
|
1928
|
-
}, Z = (e,
|
|
1929
|
-
if (!
|
|
1930
|
-
if (!
|
|
1931
|
-
let
|
|
1932
|
-
|
|
1933
|
-
let
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
title: x,
|
|
1937
|
-
collapse: isCollapse(N, e),
|
|
2024
|
+
}, Z = (e, w, E, D, O) => {
|
|
2025
|
+
if (!w.ui) throw Error("renderLeafArray property ui must be valid");
|
|
2026
|
+
if (!w.array) throw Error("renderLeafArray property array must be valid");
|
|
2027
|
+
let k = ensureArrayValue(e, w, E, D, O, N), M = T(w.name);
|
|
2028
|
+
isCollapse(A, e) && isPropertyChanged(j.value, e) && (M += " *");
|
|
2029
|
+
let P = h(title_default, {
|
|
2030
|
+
title: M,
|
|
2031
|
+
collapse: isCollapse(A, e),
|
|
1938
2032
|
hasCreate: !0,
|
|
1939
|
-
onCollapse: (
|
|
1940
|
-
setCollapse(
|
|
2033
|
+
onCollapse: (w) => {
|
|
2034
|
+
setCollapse(A, e, w);
|
|
1941
2035
|
},
|
|
1942
|
-
onMenu: (
|
|
2036
|
+
onMenu: (w, T) => {
|
|
1943
2037
|
eventBus.emit("propTreeMenu", {
|
|
1944
|
-
x:
|
|
1945
|
-
y:
|
|
2038
|
+
x: w,
|
|
2039
|
+
y: T,
|
|
1946
2040
|
keys: e
|
|
1947
2041
|
});
|
|
1948
2042
|
},
|
|
1949
2043
|
onCreate: () => {
|
|
1950
|
-
|
|
2044
|
+
k.push(getPropertyDefault(w)), N(e, k);
|
|
1951
2045
|
}
|
|
1952
|
-
}),
|
|
1953
|
-
let
|
|
1954
|
-
for (let
|
|
1955
|
-
|
|
1956
|
-
g.push(v);
|
|
1957
|
-
}
|
|
1958
|
-
return g;
|
|
2046
|
+
}), F = h("div", { style: { paddingLeft: indent } }, (() => {
|
|
2047
|
+
let T = [];
|
|
2048
|
+
for (let E = 0; E < k.length; E++) T.push(J(e, w, k, E, !1, !0));
|
|
2049
|
+
return T;
|
|
1959
2050
|
})());
|
|
1960
2051
|
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
1961
|
-
let
|
|
1962
|
-
return
|
|
2052
|
+
let w = [];
|
|
2053
|
+
return w.push(P), isCollapse(A, e) || w.push(F), w;
|
|
1963
2054
|
})());
|
|
1964
|
-
}, Q = (e,
|
|
1965
|
-
if (!
|
|
1966
|
-
let
|
|
1967
|
-
return
|
|
2055
|
+
}, Q = (e, w, T, E, D) => {
|
|
2056
|
+
if (!w.ui) throw Error("renderLeafScalar property ui must be valid");
|
|
2057
|
+
let O;
|
|
2058
|
+
return w.ui === "dummy" ? O = I(e, w, T, E, D) : w.ui === "strInput" ? O = R(e, w, T, E, D) : w.ui === "numInput" ? O = z(e, w, T, E, D) : w.ui === "switch" ? O = B(e, w, T, E, D) : w.ui === "select" ? O = V(e, w, T, E, D) : w.ui === "colorPicker" ? O = H(e, w, T, E, D) : w.ui === "jsonEditor" ? O = U(e, w, T, E, D) : w.ui === "multiTypes" ? O = W(e, w, T, E, D) : w.ui === "selectComp" ? O = G(e, w, T, E, D) : w.ui === "selectSlot" ? O = K(e, w, T, E, D) : w.ui === "selectAdaptSlot" ? O = q(e, w, T, E, D) : console.assert(!1, "renderLeafScalar not implemented"), O ? P(e, w, O) : h("div");
|
|
1968
2059
|
}, $ = () => h("div", {
|
|
1969
2060
|
class: "text-body-medium",
|
|
1970
|
-
style: { background:
|
|
2061
|
+
style: { background: E.value }
|
|
1971
2062
|
}, (() => {
|
|
1972
2063
|
let e = [];
|
|
1973
|
-
if (
|
|
1974
|
-
let g = J([], m, b.object, void 0, !1);
|
|
1975
|
-
e.push(g);
|
|
1976
|
-
}
|
|
2064
|
+
if (D.value.length > 0 && k.value) for (let w of D.value) e.push(J([], w, k.value, void 0, !1));
|
|
1977
2065
|
return e;
|
|
1978
2066
|
})());
|
|
1979
|
-
return (e,
|
|
2067
|
+
return (e, w) => (openBlock(), createElementBlock(Fragment, null, [createVNode($), createVNode(menu_default)], 64));
|
|
2068
|
+
}
|
|
2069
|
+
}), propTree_default = /* @__PURE__ */ defineComponent({
|
|
2070
|
+
__name: "index",
|
|
2071
|
+
props: {
|
|
2072
|
+
config: {},
|
|
2073
|
+
object: {},
|
|
2074
|
+
version: {},
|
|
2075
|
+
type: {},
|
|
2076
|
+
subtype: {}
|
|
2077
|
+
},
|
|
2078
|
+
emits: ["change"],
|
|
2079
|
+
setup(e, { emit: w }) {
|
|
2080
|
+
let T = w, E = ref([]);
|
|
2081
|
+
provideConfig(E), watchEffect(() => {
|
|
2082
|
+
E.value = e.config;
|
|
2083
|
+
});
|
|
2084
|
+
let D = ref();
|
|
2085
|
+
provideObject(D), watchEffect(() => {
|
|
2086
|
+
D.value = e.object;
|
|
2087
|
+
});
|
|
2088
|
+
let O = ref("");
|
|
2089
|
+
provideVersion(O), watchEffect(() => {
|
|
2090
|
+
O.value = e.version;
|
|
2091
|
+
});
|
|
2092
|
+
let k = ref(e.type);
|
|
2093
|
+
provideType(k), watchEffect(() => {
|
|
2094
|
+
k.value = e.type;
|
|
2095
|
+
});
|
|
2096
|
+
let j = ref("");
|
|
2097
|
+
provideSubtype(j), watchEffect(() => {
|
|
2098
|
+
j.value = e.subtype;
|
|
2099
|
+
}), provideCollapseState(ref({
|
|
2100
|
+
collapse: !0,
|
|
2101
|
+
children: {}
|
|
2102
|
+
}));
|
|
2103
|
+
let M = ref({
|
|
2104
|
+
change: !1,
|
|
2105
|
+
warning: !1,
|
|
2106
|
+
children: {}
|
|
2107
|
+
});
|
|
2108
|
+
return providePropertyState(M), provideChangeEvent((w, E) => {
|
|
2109
|
+
rebuildPropertyState(M, e.config, e.object), T("change", w, E);
|
|
2110
|
+
}), watch([() => e.config, () => e.object], () => {
|
|
2111
|
+
rebuildPropertyState(M, e.config, e.object);
|
|
2112
|
+
}, { immediate: !0 }), (e, w) => (openBlock(), createBlock(main_default));
|
|
1980
2113
|
}
|
|
1981
2114
|
}), install = (e) => {
|
|
1982
2115
|
e.component("XPropTree", propTree_default);
|
|
1983
|
-
}, __rolldown_dynamic_import_helper_default = (e,
|
|
1984
|
-
let
|
|
1985
|
-
return
|
|
1986
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
2116
|
+
}, __rolldown_dynamic_import_helper_default = (e, w, T) => {
|
|
2117
|
+
let E = w.lastIndexOf("?"), D = e[E === -1 || E < w.lastIndexOf("/") ? w : w.slice(0, E)];
|
|
2118
|
+
return D ? typeof D == "function" ? D() : Promise.resolve(D) : new Promise((e, E) => {
|
|
2119
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(E.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + w + (w.split("/").length === T ? "" : ". Note that variables only represent file names one level deep."))));
|
|
1987
2120
|
});
|
|
1988
2121
|
};
|
|
1989
2122
|
async function loadLocaleMessagePropTree(e) {
|