x-prop-tree 0.7.5 → 0.7.7
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/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { provide as ce, inject as de, defineComponent as R, ref as O, computed as K, resolveComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useViewStack as
|
|
4
|
-
import { c as
|
|
5
|
-
import { getPropDefault as q, pkgs as
|
|
6
|
-
import { globalState as
|
|
7
|
-
import { useDisplay as
|
|
8
|
-
import { XBlockly as
|
|
9
|
-
const
|
|
1
|
+
import { provide as ce, inject as de, defineComponent as R, ref as O, computed as K, resolveComponent as x, createBlock as B, openBlock as C, unref as L, isRef as ve, withCtx as J, createVNode as D, createElementBlock as E, Fragment as Ve, renderList as Be, createTextVNode as Ce, toDisplayString as W, resolveDirective as le, withDirectives as ee, withModifiers as X, normalizeStyle as I, createElementVNode as F, createCommentVNode as G, renderSlot as ft, h, mergeModels as Y, useModel as z, useId as we, onUnmounted as De, withKeys as Ke, mergeProps as be, watchEffect as Ne, watch as re, useTemplateRef as Je, reactive as mt, onMounted as vt, onBeforeUnmount as pt } from "vue";
|
|
2
|
+
import { useI18n as te } from "vue-i18n";
|
|
3
|
+
import { useViewStack as Se, useColor as ie, eventBus as ue, useSystem as pe, openPromptDlg as yt, openNumberDlg as Re, injectDark as gt, injectLocale as ht } from "x-essential-lib";
|
|
4
|
+
import { c as Ee, i as Ue, r as He, v as _t, d as kt } from "./vendor.n68iqk3a.js";
|
|
5
|
+
import { getPropDefault as q, pkgs as Fe, parsePixelStr as Vt, parsePercentStr as Ct } from "x-runtime-lib";
|
|
6
|
+
import { globalState as St } from "x-state-lib";
|
|
7
|
+
import { useDisplay as Ut } from "vuetify";
|
|
8
|
+
import { XBlockly as xt } from "x-block-lib";
|
|
9
|
+
const _e = (l, s) => {
|
|
10
10
|
let t = { key: "", name: "", children: l };
|
|
11
11
|
return s.forEach((e) => {
|
|
12
12
|
if (typeof e != "number") {
|
|
@@ -30,7 +30,7 @@ const he = (l, s) => {
|
|
|
30
30
|
}
|
|
31
31
|
t = t[e];
|
|
32
32
|
}), t;
|
|
33
|
-
}, Oe = (l) => !(l instanceof Array),
|
|
33
|
+
}, Oe = (l) => !(l instanceof Array), Me = (l) => l instanceof Array, $t = (l, s) => {
|
|
34
34
|
const t = (e, n) => {
|
|
35
35
|
if (e.ui !== n.ui || e.array !== n.array)
|
|
36
36
|
return !1;
|
|
@@ -44,10 +44,10 @@ const he = (l, s) => {
|
|
|
44
44
|
return !0;
|
|
45
45
|
};
|
|
46
46
|
return t(l, s);
|
|
47
|
-
}, Ae = (l) => !(l instanceof Array),
|
|
47
|
+
}, Ae = (l) => !(l instanceof Array), xe = (l) => l instanceof Array, Pt = [
|
|
48
48
|
["basic", "id"],
|
|
49
49
|
["basic", "name"]
|
|
50
|
-
],
|
|
50
|
+
], Mt = (l) => Pt.find((s) => Ue(l, s)), $e = (l, s, t, e, n, o, i) => (l = Ee(l), o !== void 0 ? (l.push(o), i && l.push(s.key)) : l.push(s.key), Mt(l) ? (e.change = !1, e.change) : s.ui ? s.array && e.children && xe(e.children) ? bt(
|
|
51
51
|
l,
|
|
52
52
|
s,
|
|
53
53
|
t,
|
|
@@ -55,7 +55,7 @@ const he = (l, s) => {
|
|
|
55
55
|
n,
|
|
56
56
|
o,
|
|
57
57
|
i
|
|
58
|
-
) :
|
|
58
|
+
) : At(s, t, e, o, i) : s.array ? wt(
|
|
59
59
|
l,
|
|
60
60
|
s,
|
|
61
61
|
t,
|
|
@@ -63,7 +63,7 @@ const he = (l, s) => {
|
|
|
63
63
|
n,
|
|
64
64
|
o,
|
|
65
65
|
i
|
|
66
|
-
) :
|
|
66
|
+
) : Dt(
|
|
67
67
|
l,
|
|
68
68
|
s,
|
|
69
69
|
t,
|
|
@@ -71,78 +71,78 @@ const he = (l, s) => {
|
|
|
71
71
|
n,
|
|
72
72
|
o,
|
|
73
73
|
i
|
|
74
|
-
)),
|
|
74
|
+
)), wt = (l, s, t, e, n, o, i) => {
|
|
75
75
|
if (s.ui)
|
|
76
76
|
return console.assert(!1, "execPropBranchArray prop ui must be invalid"), !1;
|
|
77
77
|
if (!s.array)
|
|
78
78
|
return console.assert(!1, "execPropBranchArray prop array must be valid"), !1;
|
|
79
|
-
if (!e.children || !
|
|
79
|
+
if (!e.children || !xe(e.children))
|
|
80
80
|
return console.assert(!1, "execPropBranchArray state children must be array"), !1;
|
|
81
|
-
let
|
|
82
|
-
o !== void 0 && !i ? (t[o] instanceof Array || (t[o] = q(s), n?.(l, t[o])),
|
|
83
|
-
for (let
|
|
81
|
+
let r;
|
|
82
|
+
o !== void 0 && !i ? (t[o] instanceof Array || (t[o] = q(s), n?.(l, t[o])), r = t[o]) : (t[s.key] instanceof Array || (t[s.key] = q(s), n?.(l, t[s.key])), r = t[s.key]), e.change = !1;
|
|
83
|
+
for (let u = 0; u < r.length; u++) {
|
|
84
84
|
e.children.push({
|
|
85
85
|
change: !1,
|
|
86
86
|
children: {}
|
|
87
87
|
});
|
|
88
|
-
const a = e.children[
|
|
89
|
-
s.children.forEach((
|
|
88
|
+
const a = e.children[u];
|
|
89
|
+
s.children.forEach((f) => {
|
|
90
90
|
if (!a.children || !Ae(a.children)) {
|
|
91
91
|
console.assert(!1);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
a.children[
|
|
94
|
+
a.children[f.key] = {
|
|
95
95
|
change: !1,
|
|
96
|
-
children:
|
|
96
|
+
children: f.array ? [] : {}
|
|
97
97
|
}, $e(
|
|
98
98
|
l,
|
|
99
|
-
|
|
100
|
-
u
|
|
101
|
-
a.children[
|
|
99
|
+
f,
|
|
100
|
+
r[u],
|
|
101
|
+
a.children[f.key],
|
|
102
102
|
n,
|
|
103
|
-
|
|
103
|
+
u,
|
|
104
104
|
!0
|
|
105
105
|
) && (a.change = !0), a.change && (e.change = !0);
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
return e.change || (e.change = !
|
|
109
|
-
},
|
|
108
|
+
return e.change || (e.change = !Ue(r, q(s))), e.change;
|
|
109
|
+
}, Dt = (l, s, t, e, n, o, i) => {
|
|
110
110
|
if (s.ui)
|
|
111
111
|
return console.assert(!1, "execPropBranchScalar prop ui must be invalid"), !1;
|
|
112
112
|
if (s.array)
|
|
113
113
|
return console.assert(!1, "execPropBranchScalar prop array must be invalid"), !1;
|
|
114
114
|
if (!e.children || !Ae(e.children))
|
|
115
115
|
return console.assert(!1, "execPropBranchScalar state children must be map"), !1;
|
|
116
|
-
let
|
|
117
|
-
o !== void 0 && !i ? (t[o] || (t[o] = {}),
|
|
118
|
-
for (let
|
|
119
|
-
const a = s.children[
|
|
116
|
+
let r;
|
|
117
|
+
o !== void 0 && !i ? (t[o] || (t[o] = {}), r = t[o]) : (t[s.key] || (t[s.key] = {}), r = t[s.key]), e.change = !1;
|
|
118
|
+
for (let u = 0; u < s.children.length; u++) {
|
|
119
|
+
const a = s.children[u];
|
|
120
120
|
e.children[a.key] = {
|
|
121
121
|
change: !1,
|
|
122
122
|
children: a.array ? [] : {}
|
|
123
|
-
}, $e(l, a,
|
|
123
|
+
}, $e(l, a, r, e.children[a.key], n) && (e.change = !0);
|
|
124
124
|
}
|
|
125
125
|
return e.change;
|
|
126
|
-
},
|
|
126
|
+
}, bt = (l, s, t, e, n, o, i) => {
|
|
127
127
|
if (!s.ui)
|
|
128
128
|
return console.assert(!1, "execPropLeafArray prop ui must be valid"), !1;
|
|
129
129
|
if (!s.array)
|
|
130
130
|
return console.assert(!1, "execPropLeafArray prop aray must be valid"), !1;
|
|
131
|
-
if (!e.children || !
|
|
131
|
+
if (!e.children || !xe(e.children))
|
|
132
132
|
return console.assert(!1, "execPropLeafArray state children must be array"), !1;
|
|
133
|
-
let
|
|
134
|
-
o !== void 0 && !i ? (t[o] instanceof Array || (t[o] = q(s), n?.(l, t[o])),
|
|
135
|
-
for (let
|
|
136
|
-
e.children[
|
|
133
|
+
let r;
|
|
134
|
+
o !== void 0 && !i ? (t[o] instanceof Array || (t[o] = q(s), n?.(l, t[o])), r = t[o]) : (t[s.key] instanceof Array || (t[s.key] = q(s), n?.(l, t[s.key])), r = t[s.key]), e.change = !1;
|
|
135
|
+
for (let u = 0; u < r.length; u++)
|
|
136
|
+
e.children[u] = {
|
|
137
137
|
change: !1,
|
|
138
138
|
children: {}
|
|
139
|
-
}, $e(l, s,
|
|
140
|
-
return e.change || (e.change = !
|
|
141
|
-
},
|
|
139
|
+
}, $e(l, s, r, e.children[u], n, u, !1) && (e.change = !0);
|
|
140
|
+
return e.change || (e.change = !Ue(r, q(s))), e.change;
|
|
141
|
+
}, At = (l, s, t, e, n) => {
|
|
142
142
|
if (!l.ui)
|
|
143
143
|
return console.assert(!1, "execPropLeafScalar prop ui must be valid"), !1;
|
|
144
144
|
let o;
|
|
145
|
-
return e !== void 0 && !n ? o = s[e] : o = s[l.key], t.change = !
|
|
145
|
+
return e !== void 0 && !n ? o = s[e] : o = s[l.key], t.change = !Ue(o, q(l, !0)), t.change;
|
|
146
146
|
}, qe = (l, s, t, e) => {
|
|
147
147
|
if (s.length <= 0 || !t) {
|
|
148
148
|
l.value = {};
|
|
@@ -162,153 +162,153 @@ const he = (l, s) => {
|
|
|
162
162
|
return console.assert(!1, `isPropChanged state must be valid keys=${s}`), !1;
|
|
163
163
|
if (!t.children)
|
|
164
164
|
return console.assert(!1, `isPropChanged state must be valid keys=${s}`), !1;
|
|
165
|
-
typeof e == "string" ? Ae(t.children) && (t = t.children[e]) :
|
|
165
|
+
typeof e == "string" ? Ae(t.children) && (t = t.children[e]) : xe(t.children) && (t = t.children[e]);
|
|
166
166
|
}), t?.change ?? !1;
|
|
167
|
-
}, Xe = Symbol(),
|
|
168
|
-
function
|
|
167
|
+
}, Xe = Symbol(), ze = Symbol(), Ge = Symbol(), Ye = Symbol(), We = Symbol(), Qe = Symbol();
|
|
168
|
+
function Tt(l) {
|
|
169
169
|
ce(Xe, l);
|
|
170
170
|
}
|
|
171
171
|
function Te() {
|
|
172
172
|
return de(Xe);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
ce(Fe, l);
|
|
176
|
-
}
|
|
177
|
-
function Lt() {
|
|
178
|
-
return de(Fe);
|
|
179
|
-
}
|
|
180
|
-
function Nt(l) {
|
|
174
|
+
function Lt(l) {
|
|
181
175
|
ce(ze, l);
|
|
182
176
|
}
|
|
183
|
-
function
|
|
177
|
+
function Nt() {
|
|
184
178
|
return de(ze);
|
|
185
179
|
}
|
|
186
|
-
function
|
|
180
|
+
function Ot(l) {
|
|
187
181
|
ce(Ge, l);
|
|
188
182
|
}
|
|
189
|
-
function
|
|
183
|
+
function qt() {
|
|
190
184
|
return de(Ge);
|
|
191
185
|
}
|
|
192
|
-
function
|
|
186
|
+
function Bt(l) {
|
|
193
187
|
ce(Ye, l);
|
|
194
188
|
}
|
|
195
|
-
function
|
|
189
|
+
function Kt() {
|
|
196
190
|
return de(Ye);
|
|
197
191
|
}
|
|
198
|
-
function
|
|
192
|
+
function Jt(l) {
|
|
199
193
|
ce(We, l);
|
|
200
194
|
}
|
|
201
|
-
function
|
|
195
|
+
function Rt() {
|
|
202
196
|
return de(We);
|
|
203
197
|
}
|
|
204
|
-
|
|
198
|
+
function Et(l) {
|
|
199
|
+
ce(Qe, l);
|
|
200
|
+
}
|
|
201
|
+
function Ze() {
|
|
202
|
+
return de(Qe);
|
|
203
|
+
}
|
|
204
|
+
const Ht = /* @__PURE__ */ R({
|
|
205
205
|
__name: "menu",
|
|
206
206
|
setup(l) {
|
|
207
|
-
const { t: s } =
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
if (
|
|
212
|
-
const
|
|
213
|
-
if (!
|
|
207
|
+
const { t: s } = te(), t = Nt(), e = qt(), n = Kt(), o = Rt(), i = O(0), r = O(0), u = O([]), a = K(() => [i.value, r.value]), f = (P) => {
|
|
208
|
+
const T = () => !(u.value.length <= 0 || !ae(n.value, u.value)), w = () => {
|
|
209
|
+
const _ = _e(t.value, u.value);
|
|
210
|
+
if (_)
|
|
211
|
+
if (_.ui) {
|
|
212
|
+
const M = me(e.value, u.value.slice(0, -1));
|
|
213
|
+
if (!M)
|
|
214
214
|
return;
|
|
215
|
-
|
|
216
|
-
} else if (
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
215
|
+
M[u.value[u.value.length - 1]] = q(_), o(u.value, M[u.value[u.value.length - 1]]);
|
|
216
|
+
} else if (_.array) {
|
|
217
|
+
const M = u.value[u.value.length - 1];
|
|
218
|
+
if (M === void 0) {
|
|
219
219
|
console.assert(!1, "invalid last key");
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
|
-
if (typeof
|
|
223
|
-
const N = me(e.value,
|
|
222
|
+
if (typeof M == "string") {
|
|
223
|
+
const N = me(e.value, u.value.slice(0, -1));
|
|
224
224
|
if (!N)
|
|
225
225
|
return;
|
|
226
|
-
N[
|
|
226
|
+
N[u.value[u.value.length - 1]] = q(_), o(u.value, N[u.value[u.value.length - 1]]);
|
|
227
227
|
} else {
|
|
228
|
-
const N = me(e.value,
|
|
228
|
+
const N = me(e.value, u.value);
|
|
229
229
|
if (!N)
|
|
230
230
|
return;
|
|
231
|
-
|
|
232
|
-
N[Q.key] = q(
|
|
231
|
+
_.children.forEach((Q) => {
|
|
232
|
+
N[Q.key] = q(_), o([...u.value, Q.key], N[Q.key]);
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
} else {
|
|
236
|
-
const
|
|
237
|
-
if (!
|
|
236
|
+
const M = me(e.value, u.value);
|
|
237
|
+
if (!M)
|
|
238
238
|
return;
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
_.children.forEach((N) => {
|
|
240
|
+
M[N.key] = q(_), o([...u.value, N.key], M[N.key]);
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
T() && P.push({
|
|
245
245
|
title: s("x-prop-tree.reset"),
|
|
246
|
-
func:
|
|
246
|
+
func: w
|
|
247
247
|
});
|
|
248
248
|
}, d = (P) => {
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
localStorage.setItem("propTreeCopy", JSON.stringify({ prop:
|
|
249
|
+
const T = () => {
|
|
250
|
+
const w = _e(t.value, u.value), _ = me(e.value, u.value);
|
|
251
|
+
localStorage.setItem("propTreeCopy", JSON.stringify({ prop: w, object: _ }));
|
|
252
252
|
};
|
|
253
253
|
P.push({
|
|
254
254
|
title: s("x-prop-tree.copy"),
|
|
255
|
-
func:
|
|
255
|
+
func: T
|
|
256
256
|
});
|
|
257
|
-
},
|
|
258
|
-
const
|
|
259
|
-
const
|
|
260
|
-
if (!
|
|
257
|
+
}, y = (P) => {
|
|
258
|
+
const T = () => {
|
|
259
|
+
const _ = localStorage.getItem("propTreeCopy");
|
|
260
|
+
if (!_)
|
|
261
261
|
return !1;
|
|
262
262
|
try {
|
|
263
|
-
const { prop:
|
|
264
|
-
return $t(
|
|
265
|
-
} catch (
|
|
266
|
-
console.error(
|
|
263
|
+
const { prop: M } = JSON.parse(_), N = _e(t.value, u.value);
|
|
264
|
+
return $t(M, N);
|
|
265
|
+
} catch (M) {
|
|
266
|
+
console.error(M);
|
|
267
267
|
}
|
|
268
268
|
return !1;
|
|
269
|
-
},
|
|
270
|
-
if (!
|
|
269
|
+
}, w = () => {
|
|
270
|
+
if (!T())
|
|
271
271
|
return;
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
272
|
+
const _ = localStorage.getItem("propTreeCopy");
|
|
273
|
+
if (_)
|
|
274
274
|
try {
|
|
275
|
-
const { object:
|
|
276
|
-
console.log(
|
|
277
|
-
} catch (
|
|
278
|
-
console.error(
|
|
275
|
+
const { object: M } = JSON.parse(_), N = _e(t.value, u.value);
|
|
276
|
+
console.log(M, N);
|
|
277
|
+
} catch (M) {
|
|
278
|
+
console.error(M);
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
|
|
281
|
+
T() && P.push({
|
|
282
282
|
title: s("x-prop-tree.paste"),
|
|
283
|
-
func:
|
|
283
|
+
func: w
|
|
284
284
|
});
|
|
285
|
-
},
|
|
285
|
+
}, g = K(() => {
|
|
286
286
|
const P = [];
|
|
287
|
-
return
|
|
288
|
-
}),
|
|
289
|
-
i.value = P.x,
|
|
290
|
-
}, { open:
|
|
291
|
-
return (P,
|
|
292
|
-
const
|
|
293
|
-
return
|
|
294
|
-
modelValue:
|
|
295
|
-
"onUpdate:modelValue":
|
|
287
|
+
return f(P), d(P), y(P), P;
|
|
288
|
+
}), k = (P) => {
|
|
289
|
+
i.value = P.x, r.value = P.y, u.value = P.keys;
|
|
290
|
+
}, { open: S } = Se("propTreeMenu", k);
|
|
291
|
+
return (P, T) => {
|
|
292
|
+
const w = x("v-list-item-title"), _ = x("v-list-item"), M = x("v-list"), N = x("v-menu");
|
|
293
|
+
return C(), B(N, {
|
|
294
|
+
modelValue: L(S),
|
|
295
|
+
"onUpdate:modelValue": T[0] || (T[0] = (Q) => ve(S) ? S.value = Q : null),
|
|
296
296
|
"location-strategy": "connected",
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
scrim: "transparent",
|
|
298
|
+
target: a.value
|
|
299
299
|
}, {
|
|
300
300
|
default: J(() => [
|
|
301
|
-
M
|
|
301
|
+
D(M, null, {
|
|
302
302
|
default: J(() => [
|
|
303
|
-
(
|
|
304
|
-
key:
|
|
303
|
+
(C(!0), E(Ve, null, Be(g.value, (Q, Pe) => (C(), B(_, {
|
|
304
|
+
key: Pe,
|
|
305
305
|
link: "",
|
|
306
306
|
onClick: Q.func
|
|
307
307
|
}, {
|
|
308
308
|
default: J(() => [
|
|
309
|
-
|
|
309
|
+
D(w, null, {
|
|
310
310
|
default: J(() => [
|
|
311
|
-
|
|
311
|
+
Ce(W(Q.title), 1)
|
|
312
312
|
]),
|
|
313
313
|
_: 2
|
|
314
314
|
}, 1024)
|
|
@@ -323,7 +323,7 @@ const Et = /* @__PURE__ */ R({
|
|
|
323
323
|
}, 8, ["modelValue", "target"]);
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
326
|
+
}), Ft = { style: { pointerEvents: "none" } }, ke = /* @__PURE__ */ R({
|
|
327
327
|
__name: "title",
|
|
328
328
|
props: {
|
|
329
329
|
title: {},
|
|
@@ -339,45 +339,45 @@ const Et = /* @__PURE__ */ R({
|
|
|
339
339
|
height: "36px",
|
|
340
340
|
marginBottom: "1px",
|
|
341
341
|
userSelect: "none"
|
|
342
|
-
})),
|
|
342
|
+
})), r = () => {
|
|
343
343
|
n("collapse", !l.collapse);
|
|
344
|
-
},
|
|
344
|
+
}, u = (a) => {
|
|
345
345
|
n("menu", a.clientX, a.clientY);
|
|
346
346
|
};
|
|
347
|
-
return (a,
|
|
348
|
-
const d =
|
|
349
|
-
return
|
|
347
|
+
return (a, f) => {
|
|
348
|
+
const d = x("v-icon"), y = x("v-spacer"), g = x("v-btn"), k = le("ripple");
|
|
349
|
+
return ee((C(), E("div", {
|
|
350
350
|
class: "d-flex align-center cursor-pointer",
|
|
351
|
-
style:
|
|
352
|
-
onClick:
|
|
353
|
-
onContextmenu:
|
|
354
|
-
|
|
355
|
-
|
|
351
|
+
style: I(i.value),
|
|
352
|
+
onClick: r,
|
|
353
|
+
onContextmenu: X(u, ["self", "prevent"]),
|
|
354
|
+
onMouseout: f[2] || (f[2] = (S) => o.value = !1),
|
|
355
|
+
onMouseover: f[3] || (f[3] = (S) => o.value = !0)
|
|
356
356
|
}, [
|
|
357
|
-
|
|
357
|
+
D(d, {
|
|
358
358
|
class: "mr-1",
|
|
359
359
|
icon: a.collapse ? "mdi-chevron-right" : "mdi-chevron-down"
|
|
360
360
|
}, null, 8, ["icon"]),
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
a.hasCreate ? (
|
|
361
|
+
F("span", Ft, W(a.title), 1),
|
|
362
|
+
D(y),
|
|
363
|
+
a.hasCreate ? (C(), B(g, {
|
|
364
364
|
key: 0,
|
|
365
365
|
class: "mx-3",
|
|
366
|
-
variant: "text",
|
|
367
366
|
density: "compact",
|
|
368
367
|
icon: "mdi-plus",
|
|
369
|
-
|
|
368
|
+
variant: "text",
|
|
369
|
+
onClick: f[0] || (f[0] = X((S) => n("create"), ["stop"]))
|
|
370
370
|
})) : G("", !0),
|
|
371
|
-
a.hasDelete ? (
|
|
371
|
+
a.hasDelete ? (C(), B(g, {
|
|
372
372
|
key: 1,
|
|
373
373
|
class: "mx-3",
|
|
374
|
-
variant: "text",
|
|
375
374
|
density: "compact",
|
|
376
375
|
icon: "mdi-minus",
|
|
377
|
-
|
|
376
|
+
variant: "text",
|
|
377
|
+
onClick: f[1] || (f[1] = X((S) => n("delete", a.index), ["stop"]))
|
|
378
378
|
})) : G("", !0)
|
|
379
379
|
], 36)), [
|
|
380
|
-
[
|
|
380
|
+
[k]
|
|
381
381
|
]);
|
|
382
382
|
};
|
|
383
383
|
}
|
|
@@ -394,44 +394,44 @@ const Et = /* @__PURE__ */ R({
|
|
|
394
394
|
paddingRight: "4px",
|
|
395
395
|
marginBottom: "1px",
|
|
396
396
|
userSelect: "none"
|
|
397
|
-
})),
|
|
398
|
-
n("menu",
|
|
397
|
+
})), r = (u) => {
|
|
398
|
+
n("menu", u.clientX, u.clientY);
|
|
399
399
|
};
|
|
400
|
-
return (
|
|
401
|
-
const
|
|
402
|
-
return
|
|
400
|
+
return (u, a) => {
|
|
401
|
+
const f = le("ripple");
|
|
402
|
+
return ee((C(), E("div", {
|
|
403
403
|
class: "d-flex justify-space-between align-center cursor-pointer",
|
|
404
|
-
style:
|
|
405
|
-
onContextmenu:
|
|
406
|
-
|
|
407
|
-
|
|
404
|
+
style: I(i.value),
|
|
405
|
+
onContextmenu: X(r, ["self", "prevent"]),
|
|
406
|
+
onMouseout: a[0] || (a[0] = (d) => o.value = !1),
|
|
407
|
+
onMouseover: a[1] || (a[1] = (d) => o.value = !0)
|
|
408
408
|
}, [
|
|
409
|
-
|
|
409
|
+
ft(u.$slots, "default")
|
|
410
410
|
], 36)), [
|
|
411
|
-
[
|
|
411
|
+
[f]
|
|
412
412
|
]);
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
|
-
function
|
|
417
|
-
const { t: e } =
|
|
418
|
-
return { renderProp: (o, i,
|
|
419
|
-
const
|
|
420
|
-
let
|
|
421
|
-
return ae(l.value, o) && (
|
|
416
|
+
function zt(l, s, t) {
|
|
417
|
+
const { t: e } = te();
|
|
418
|
+
return { renderProp: (o, i, r) => {
|
|
419
|
+
const u = o[o.length - 1];
|
|
420
|
+
let f = typeof u == "number" ? `[${u + 1}]` : e(i.name);
|
|
421
|
+
return ae(l.value, o) && (f += " *"), h(
|
|
422
422
|
Xt,
|
|
423
423
|
{
|
|
424
424
|
minHeight: s.value,
|
|
425
|
-
onMenu: (d,
|
|
426
|
-
ue.emit("propTreeMenu", { x: d, y
|
|
425
|
+
onMenu: (d, y) => {
|
|
426
|
+
ue.emit("propTreeMenu", { x: d, y, keys: o });
|
|
427
427
|
}
|
|
428
428
|
},
|
|
429
429
|
() => [
|
|
430
430
|
h("span", {
|
|
431
431
|
style: { marginLeft: "4px", pointerEvents: "none" },
|
|
432
|
-
innerHTML:
|
|
432
|
+
innerHTML: f
|
|
433
433
|
}),
|
|
434
|
-
h("div", { style: { width: t.value } },
|
|
434
|
+
h("div", { style: { width: t.value } }, r)
|
|
435
435
|
]
|
|
436
436
|
);
|
|
437
437
|
} };
|
|
@@ -462,11 +462,11 @@ const ne = (l, s, t, e, n, o) => {
|
|
|
462
462
|
if (o !== void 0)
|
|
463
463
|
i ? e !== t[s.key] && (t[s.key] = e, n(l, t[s.key])) : e !== t[o] && (t[o] = e, n(l, t[o]));
|
|
464
464
|
else {
|
|
465
|
-
let
|
|
466
|
-
(s.ui === "switch" || s.ui === "select" || s.ui === "colorPicker" || s.ui === "multiTypes" || s.ui === "compSelect") && (e || (
|
|
465
|
+
let r = e;
|
|
466
|
+
(s.ui === "switch" || s.ui === "select" || s.ui === "colorPicker" || s.ui === "multiTypes" || s.ui === "compSelect") && (e || (r = void 0)), r !== t[s.key] && (t[s.key] = r, n(l, t[s.key]));
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
|
-
function
|
|
469
|
+
function Gt(l) {
|
|
470
470
|
return { renderUiDummy: (t, e, n, o, i) => {
|
|
471
471
|
if (e.ui !== "dummy") {
|
|
472
472
|
console.assert(!1, "renderUiDummy prop ui must be dummy");
|
|
@@ -475,10 +475,9 @@ function zt(l) {
|
|
|
475
475
|
ne(t, e, n, l, o, i);
|
|
476
476
|
} };
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const Yt = { class: "d-flex justify-space-between align-center" }, Wt = /* @__PURE__ */ R({
|
|
479
479
|
__name: "strInput",
|
|
480
480
|
props: /* @__PURE__ */ Y({
|
|
481
|
-
title: {},
|
|
482
481
|
hasDelete: { type: Boolean, default: !1 },
|
|
483
482
|
readonly: { type: Boolean, default: !1 }
|
|
484
483
|
}, {
|
|
@@ -487,77 +486,75 @@ const Gt = { class: "d-flex justify-space-between align-center" }, Yt = /* @__PU
|
|
|
487
486
|
}),
|
|
488
487
|
emits: /* @__PURE__ */ Y(["delete"], ["update:modelValue"]),
|
|
489
488
|
setup(l, { emit: s }) {
|
|
490
|
-
const { isMobile: t } =
|
|
489
|
+
const { isMobile: t } = pe(), e = z(l, "modelValue"), n = s, o = async (i) => {
|
|
491
490
|
if (!i || l.readonly || !t())
|
|
492
491
|
return;
|
|
493
|
-
const
|
|
494
|
-
title:
|
|
492
|
+
const r = await yt({
|
|
493
|
+
title: "",
|
|
495
494
|
value: e.value
|
|
496
495
|
});
|
|
497
|
-
|
|
496
|
+
r !== void 0 && (e.value = r);
|
|
498
497
|
};
|
|
499
|
-
return (i,
|
|
500
|
-
const
|
|
501
|
-
return
|
|
502
|
-
|
|
498
|
+
return (i, r) => {
|
|
499
|
+
const u = x("v-text-field"), a = x("v-btn"), f = le("ripple");
|
|
500
|
+
return C(), E("div", Yt, [
|
|
501
|
+
ee(D(u, {
|
|
503
502
|
modelValue: e.value,
|
|
504
|
-
"onUpdate:modelValue":
|
|
503
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => e.value = d),
|
|
505
504
|
density: "compact",
|
|
506
505
|
"hide-details": "",
|
|
507
|
-
"single-line": "",
|
|
508
506
|
readonly: i.readonly,
|
|
507
|
+
"single-line": "",
|
|
509
508
|
"onUpdate:focused": o
|
|
510
509
|
}, null, 8, ["modelValue", "readonly"]), [
|
|
511
510
|
[
|
|
512
|
-
|
|
511
|
+
f,
|
|
513
512
|
void 0,
|
|
514
513
|
void 0,
|
|
515
514
|
{ stop: !0 }
|
|
516
515
|
]
|
|
517
516
|
]),
|
|
518
|
-
i.hasDelete ? (
|
|
517
|
+
i.hasDelete ? (C(), B(a, {
|
|
519
518
|
key: 0,
|
|
520
519
|
class: "mx-2",
|
|
521
|
-
variant: "text",
|
|
522
520
|
density: "compact",
|
|
523
521
|
icon: "mdi-minus",
|
|
524
|
-
|
|
522
|
+
variant: "text",
|
|
523
|
+
onClick: r[1] || (r[1] = X((d) => n("delete"), ["stop"]))
|
|
525
524
|
})) : G("", !0)
|
|
526
525
|
]);
|
|
527
526
|
};
|
|
528
527
|
}
|
|
529
528
|
});
|
|
530
|
-
function
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
529
|
+
function Qt(l) {
|
|
530
|
+
return { renderUiStrInput: (t, e, n, o, i) => e.ui !== "strInput" ? (console.assert(!1), h("div", "renderUiStrInput prop ui must be strInput")) : h(Wt, {
|
|
531
|
+
modelValue: e.static ? e.value : ne(
|
|
532
|
+
t,
|
|
534
533
|
e,
|
|
535
534
|
n,
|
|
536
|
-
o,
|
|
537
535
|
l,
|
|
538
|
-
|
|
539
|
-
|
|
536
|
+
o,
|
|
537
|
+
i
|
|
540
538
|
),
|
|
541
539
|
"onUpdate:modelValue": (r) => {
|
|
542
|
-
|
|
540
|
+
e.static || oe(
|
|
541
|
+
t,
|
|
543
542
|
e,
|
|
544
543
|
n,
|
|
545
|
-
o,
|
|
546
544
|
r,
|
|
547
545
|
l,
|
|
548
|
-
|
|
549
|
-
|
|
546
|
+
o,
|
|
547
|
+
i
|
|
550
548
|
);
|
|
551
549
|
},
|
|
552
|
-
|
|
553
|
-
hasDelete: i !== void 0 && !u,
|
|
550
|
+
hasDelete: o !== void 0 && !i,
|
|
554
551
|
onDelete: () => {
|
|
555
|
-
|
|
552
|
+
o === void 0 || i || (n.splice(o, 1), l(t.slice(0, -1), n));
|
|
556
553
|
},
|
|
557
|
-
readonly:
|
|
554
|
+
readonly: e.static || e.readonly
|
|
558
555
|
}) };
|
|
559
556
|
}
|
|
560
|
-
const
|
|
557
|
+
const Zt = { class: "d-flex justify-space-between align-center" }, jt = /* @__PURE__ */ R({
|
|
561
558
|
__name: "numInput",
|
|
562
559
|
props: /* @__PURE__ */ Y({
|
|
563
560
|
hasDelete: { type: Boolean, default: !1 },
|
|
@@ -573,44 +570,57 @@ const Qt = { class: "d-flex justify-space-between align-center" }, Zt = /* @__PU
|
|
|
573
570
|
}),
|
|
574
571
|
emits: /* @__PURE__ */ Y(["delete"], ["update:modelValue"]),
|
|
575
572
|
setup(l, { emit: s }) {
|
|
576
|
-
const t = z(l, "modelValue"),
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
573
|
+
const { isMobile: t } = pe(), e = z(l, "modelValue"), n = s, o = async (i) => {
|
|
574
|
+
if (!i || l.readonly || !t())
|
|
575
|
+
return;
|
|
576
|
+
const r = await Re({
|
|
577
|
+
title: "",
|
|
578
|
+
value: e.value,
|
|
579
|
+
precision: l.precision,
|
|
580
|
+
min: l.min,
|
|
581
|
+
max: l.max,
|
|
582
|
+
step: l.step
|
|
583
|
+
});
|
|
584
|
+
r !== void 0 && (e.value = r);
|
|
585
|
+
};
|
|
586
|
+
return (i, r) => {
|
|
587
|
+
const u = x("v-number-input"), a = x("v-btn"), f = le("ripple");
|
|
588
|
+
return C(), E("div", Zt, [
|
|
589
|
+
ee(D(u, {
|
|
590
|
+
modelValue: e.value,
|
|
591
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => e.value = d),
|
|
584
592
|
"control-variant": "stacked",
|
|
585
|
-
|
|
586
|
-
min: n.min,
|
|
587
|
-
max: n.max,
|
|
588
|
-
step: n.step,
|
|
593
|
+
density: "compact",
|
|
589
594
|
"hide-details": "",
|
|
595
|
+
max: i.max,
|
|
596
|
+
min: i.min,
|
|
597
|
+
precision: i.precision,
|
|
598
|
+
readonly: i.readonly,
|
|
590
599
|
"single-line": "",
|
|
591
|
-
|
|
592
|
-
|
|
600
|
+
step: i.step,
|
|
601
|
+
"onUpdate:focused": o
|
|
602
|
+
}, null, 8, ["modelValue", "max", "min", "precision", "readonly", "step"]), [
|
|
593
603
|
[
|
|
594
|
-
|
|
604
|
+
f,
|
|
595
605
|
void 0,
|
|
596
606
|
void 0,
|
|
597
607
|
{ stop: !0 }
|
|
598
608
|
]
|
|
599
609
|
]),
|
|
600
|
-
|
|
610
|
+
i.hasDelete ? (C(), B(a, {
|
|
601
611
|
key: 0,
|
|
602
612
|
class: "mx-2",
|
|
603
|
-
variant: "text",
|
|
604
613
|
density: "compact",
|
|
605
614
|
icon: "mdi-minus",
|
|
606
|
-
|
|
615
|
+
variant: "text",
|
|
616
|
+
onClick: r[1] || (r[1] = X((d) => n("delete"), ["stop"]))
|
|
607
617
|
})) : G("", !0)
|
|
608
618
|
]);
|
|
609
619
|
};
|
|
610
620
|
}
|
|
611
621
|
});
|
|
612
|
-
function
|
|
613
|
-
return { renderUiNumInput: (t, e, n, o, i) => e.ui !== "numInput" ? (console.assert(!1), h("div", "renderUiNumInput prop ui must be numInput")) : h(
|
|
622
|
+
function It(l) {
|
|
623
|
+
return { renderUiNumInput: (t, e, n, o, i) => e.ui !== "numInput" ? (console.assert(!1), h("div", "renderUiNumInput prop ui must be numInput")) : h(jt, {
|
|
614
624
|
modelValue: ne(
|
|
615
625
|
t,
|
|
616
626
|
e,
|
|
@@ -619,12 +629,12 @@ function jt(l) {
|
|
|
619
629
|
o,
|
|
620
630
|
i
|
|
621
631
|
),
|
|
622
|
-
"onUpdate:modelValue": (
|
|
632
|
+
"onUpdate:modelValue": (r) => {
|
|
623
633
|
oe(
|
|
624
634
|
t,
|
|
625
635
|
e,
|
|
626
636
|
n,
|
|
627
|
-
|
|
637
|
+
r,
|
|
628
638
|
l,
|
|
629
639
|
o,
|
|
630
640
|
i
|
|
@@ -641,7 +651,7 @@ function jt(l) {
|
|
|
641
651
|
readonly: e.readonly
|
|
642
652
|
}) };
|
|
643
653
|
}
|
|
644
|
-
const
|
|
654
|
+
const en = { class: "d-flex justify-space-between align-center" }, tn = /* @__PURE__ */ R({
|
|
645
655
|
__name: "switch",
|
|
646
656
|
props: /* @__PURE__ */ Y({
|
|
647
657
|
hasDelete: { type: Boolean, default: !1 },
|
|
@@ -654,31 +664,31 @@ const It = { class: "d-flex justify-space-between align-center" }, en = /* @__PU
|
|
|
654
664
|
setup(l, { emit: s }) {
|
|
655
665
|
const t = z(l, "modelValue"), e = s;
|
|
656
666
|
return (n, o) => {
|
|
657
|
-
const i =
|
|
658
|
-
return
|
|
659
|
-
|
|
667
|
+
const i = x("v-switch"), r = x("v-btn");
|
|
668
|
+
return C(), E("div", en, [
|
|
669
|
+
D(i, {
|
|
660
670
|
modelValue: t.value,
|
|
661
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
671
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => t.value = u),
|
|
662
672
|
class: "ml-1",
|
|
663
|
-
density: "compact",
|
|
664
673
|
color: "primary",
|
|
674
|
+
density: "compact",
|
|
665
675
|
"hide-details": "",
|
|
666
676
|
readonly: n.readonly
|
|
667
677
|
}, null, 8, ["modelValue", "readonly"]),
|
|
668
|
-
n.hasDelete ? (
|
|
678
|
+
n.hasDelete ? (C(), B(r, {
|
|
669
679
|
key: 0,
|
|
670
680
|
class: "mx-2",
|
|
671
|
-
variant: "text",
|
|
672
681
|
density: "compact",
|
|
673
682
|
icon: "mdi-minus",
|
|
674
|
-
|
|
683
|
+
variant: "text",
|
|
684
|
+
onClick: o[1] || (o[1] = X((u) => e("delete"), ["stop"]))
|
|
675
685
|
})) : G("", !0)
|
|
676
686
|
]);
|
|
677
687
|
};
|
|
678
688
|
}
|
|
679
689
|
});
|
|
680
|
-
function
|
|
681
|
-
return { renderUiSwitch: (t, e, n, o, i) => e.ui !== "switch" ? (console.assert(!1), h("div", "renderUiSwitch prop ui must be switch")) : h(
|
|
690
|
+
function nn(l) {
|
|
691
|
+
return { renderUiSwitch: (t, e, n, o, i) => e.ui !== "switch" ? (console.assert(!1), h("div", "renderUiSwitch prop ui must be switch")) : h(tn, {
|
|
682
692
|
modelValue: ne(
|
|
683
693
|
t,
|
|
684
694
|
e,
|
|
@@ -687,12 +697,12 @@ function tn(l) {
|
|
|
687
697
|
o,
|
|
688
698
|
i
|
|
689
699
|
) ?? !1,
|
|
690
|
-
"onUpdate:modelValue": (
|
|
700
|
+
"onUpdate:modelValue": (r) => {
|
|
691
701
|
oe(
|
|
692
702
|
t,
|
|
693
703
|
e,
|
|
694
704
|
n,
|
|
695
|
-
|
|
705
|
+
r,
|
|
696
706
|
l,
|
|
697
707
|
o,
|
|
698
708
|
i
|
|
@@ -705,7 +715,7 @@ function tn(l) {
|
|
|
705
715
|
readonly: e.readonly
|
|
706
716
|
}) };
|
|
707
717
|
}
|
|
708
|
-
const
|
|
718
|
+
const ln = { class: "d-flex justify-space-between align-center" }, on = /* @__PURE__ */ R({
|
|
709
719
|
__name: "select",
|
|
710
720
|
props: /* @__PURE__ */ Y({
|
|
711
721
|
hasDelete: { type: Boolean, default: !1 },
|
|
@@ -717,23 +727,23 @@ const nn = { class: "d-flex justify-space-between align-center" }, ln = /* @__PU
|
|
|
717
727
|
}),
|
|
718
728
|
emits: /* @__PURE__ */ Y(["delete"], ["update:modelValue"]),
|
|
719
729
|
setup(l, { emit: s }) {
|
|
720
|
-
const { t } =
|
|
721
|
-
const
|
|
722
|
-
return
|
|
723
|
-
|
|
724
|
-
}),
|
|
730
|
+
const { t } = te(), e = z(l, "modelValue"), n = s, o = Te(), i = K(() => {
|
|
731
|
+
const r = [];
|
|
732
|
+
return Fe[o.value]?.items[l.items].forEach(({ title: u, value: a }) => {
|
|
733
|
+
r.push({ title: t(u), value: a });
|
|
734
|
+
}), r;
|
|
725
735
|
});
|
|
726
|
-
return (
|
|
727
|
-
const a =
|
|
728
|
-
return
|
|
729
|
-
|
|
736
|
+
return (r, u) => {
|
|
737
|
+
const a = x("v-select"), f = x("v-btn"), d = le("ripple");
|
|
738
|
+
return C(), E("div", ln, [
|
|
739
|
+
ee(D(a, {
|
|
730
740
|
modelValue: e.value,
|
|
731
|
-
"onUpdate:modelValue":
|
|
741
|
+
"onUpdate:modelValue": u[0] || (u[0] = (y) => e.value = y),
|
|
732
742
|
density: "compact",
|
|
733
|
-
items: i.value,
|
|
734
743
|
"hide-details": "",
|
|
735
|
-
|
|
736
|
-
readonly:
|
|
744
|
+
items: i.value,
|
|
745
|
+
readonly: r.readonly,
|
|
746
|
+
"single-line": ""
|
|
737
747
|
}, null, 8, ["modelValue", "items", "readonly"]), [
|
|
738
748
|
[
|
|
739
749
|
d,
|
|
@@ -742,20 +752,20 @@ const nn = { class: "d-flex justify-space-between align-center" }, ln = /* @__PU
|
|
|
742
752
|
{ stop: !0 }
|
|
743
753
|
]
|
|
744
754
|
]),
|
|
745
|
-
|
|
755
|
+
r.hasDelete ? (C(), B(f, {
|
|
746
756
|
key: 0,
|
|
747
757
|
class: "mx-2",
|
|
748
|
-
variant: "text",
|
|
749
758
|
density: "compact",
|
|
750
759
|
icon: "mdi-minus",
|
|
751
|
-
|
|
760
|
+
variant: "text",
|
|
761
|
+
onClick: u[1] || (u[1] = X((y) => n("delete"), ["stop"]))
|
|
752
762
|
})) : G("", !0)
|
|
753
763
|
]);
|
|
754
764
|
};
|
|
755
765
|
}
|
|
756
766
|
});
|
|
757
|
-
function
|
|
758
|
-
return { renderUiSelect: (t, e, n, o, i) => e.ui !== "select" ? (console.assert(!1), h("div", "renderUiSelect prop ui must be select")) : h(
|
|
767
|
+
function sn(l) {
|
|
768
|
+
return { renderUiSelect: (t, e, n, o, i) => e.ui !== "select" ? (console.assert(!1), h("div", "renderUiSelect prop ui must be select")) : h(on, {
|
|
759
769
|
modelValue: ne(
|
|
760
770
|
t,
|
|
761
771
|
e,
|
|
@@ -764,12 +774,12 @@ function on(l) {
|
|
|
764
774
|
o,
|
|
765
775
|
i
|
|
766
776
|
) ?? "",
|
|
767
|
-
"onUpdate:modelValue": (
|
|
777
|
+
"onUpdate:modelValue": (r) => {
|
|
768
778
|
oe(
|
|
769
779
|
t,
|
|
770
780
|
e,
|
|
771
781
|
n,
|
|
772
|
-
|
|
782
|
+
r,
|
|
773
783
|
l,
|
|
774
784
|
o,
|
|
775
785
|
i
|
|
@@ -783,7 +793,7 @@ function on(l) {
|
|
|
783
793
|
readonly: e.readonly
|
|
784
794
|
}) };
|
|
785
795
|
}
|
|
786
|
-
const
|
|
796
|
+
const rn = { class: "text-subtitle-2 ml-1" }, un = { class: "text-caption text-grey ml-1" }, an = /* @__PURE__ */ R({
|
|
787
797
|
__name: "group",
|
|
788
798
|
props: {
|
|
789
799
|
id: {},
|
|
@@ -793,33 +803,33 @@ const sn = { class: "text-subtitle-2 ml-1" }, rn = { class: "text-caption text-g
|
|
|
793
803
|
},
|
|
794
804
|
emits: ["x-click"],
|
|
795
805
|
setup(l, { emit: s }) {
|
|
796
|
-
const { backgroundColor2: t, highlightColor: e } = ie(), n = l, o = s, i = O(!1),
|
|
806
|
+
const { backgroundColor2: t, highlightColor: e } = ie(), n = l, o = s, i = O(!1), r = K(() => ({
|
|
797
807
|
background: i.value ? e.value : t.value,
|
|
798
808
|
height: "30px",
|
|
799
809
|
marginBottom: "1px",
|
|
800
810
|
userSelect: "none"
|
|
801
811
|
}));
|
|
802
|
-
return (
|
|
803
|
-
const
|
|
804
|
-
return
|
|
812
|
+
return (u, a) => {
|
|
813
|
+
const f = x("v-icon"), d = le("ripple");
|
|
814
|
+
return ee((C(), E("div", {
|
|
805
815
|
class: "d-flex align-center cursor-pointer",
|
|
806
|
-
style:
|
|
807
|
-
onClick: a[0] || (a[0] = (
|
|
808
|
-
|
|
809
|
-
|
|
816
|
+
style: I(r.value),
|
|
817
|
+
onClick: a[0] || (a[0] = (y) => o("x-click", n.id)),
|
|
818
|
+
onMouseout: a[1] || (a[1] = (y) => i.value = !1),
|
|
819
|
+
onMouseover: a[2] || (a[2] = (y) => i.value = !0)
|
|
810
820
|
}, [
|
|
811
|
-
|
|
821
|
+
D(f, {
|
|
812
822
|
icon: n.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
|
|
813
823
|
size: "small"
|
|
814
824
|
}, null, 8, ["icon"]),
|
|
815
|
-
|
|
816
|
-
|
|
825
|
+
F("span", rn, W(n.title), 1),
|
|
826
|
+
F("span", un, W(n.count), 1)
|
|
817
827
|
], 36)), [
|
|
818
828
|
[d]
|
|
819
829
|
]);
|
|
820
830
|
};
|
|
821
831
|
}
|
|
822
|
-
}),
|
|
832
|
+
}), cn = { class: "text-subtitle-1 ml-6" }, dn = /* @__PURE__ */ R({
|
|
823
833
|
__name: "item",
|
|
824
834
|
props: {
|
|
825
835
|
id: {},
|
|
@@ -827,31 +837,31 @@ const sn = { class: "text-subtitle-2 ml-1" }, rn = { class: "text-caption text-g
|
|
|
827
837
|
},
|
|
828
838
|
emits: ["x-click"],
|
|
829
839
|
setup(l, { emit: s }) {
|
|
830
|
-
const { backgroundColor2: t, highlightColor: e } = ie(), n = l, o = s, i = O(!1),
|
|
840
|
+
const { backgroundColor2: t, highlightColor: e } = ie(), n = l, o = s, i = O(!1), r = K(() => ({
|
|
831
841
|
background: i.value ? e.value : t.value,
|
|
832
842
|
height: "48px",
|
|
833
843
|
marginBottom: "1px",
|
|
834
844
|
userSelect: "none"
|
|
835
845
|
}));
|
|
836
|
-
return (
|
|
837
|
-
const
|
|
838
|
-
return
|
|
846
|
+
return (u, a) => {
|
|
847
|
+
const f = le("ripple");
|
|
848
|
+
return ee((C(), E("div", {
|
|
839
849
|
class: "d-flex align-center cursor-pointer",
|
|
840
|
-
style:
|
|
850
|
+
style: I(r.value),
|
|
841
851
|
onClick: a[0] || (a[0] = (d) => o("x-click", n.id)),
|
|
842
|
-
|
|
843
|
-
|
|
852
|
+
onMouseout: a[1] || (a[1] = (d) => i.value = !1),
|
|
853
|
+
onMouseover: a[2] || (a[2] = (d) => i.value = !0)
|
|
844
854
|
}, [
|
|
845
|
-
|
|
855
|
+
F("span", cn, W(n.title), 1)
|
|
846
856
|
], 36)), [
|
|
847
|
-
[
|
|
857
|
+
[f]
|
|
848
858
|
]);
|
|
849
859
|
};
|
|
850
860
|
}
|
|
851
|
-
}),
|
|
861
|
+
}), fn = { key: 0 }, mn = {
|
|
852
862
|
key: 1,
|
|
853
863
|
class: "text-body-2 text-grey ml-3"
|
|
854
|
-
},
|
|
864
|
+
}, vn = /* @__PURE__ */ R({
|
|
855
865
|
__name: "index",
|
|
856
866
|
props: {
|
|
857
867
|
modelValue: {},
|
|
@@ -861,34 +871,34 @@ const sn = { class: "text-subtitle-2 ml-1" }, rn = { class: "text-caption text-g
|
|
|
861
871
|
},
|
|
862
872
|
emits: ["update:modelValue", "update:open"],
|
|
863
873
|
setup(l) {
|
|
864
|
-
const { t: s } =
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
}, i = (
|
|
868
|
-
t.value =
|
|
874
|
+
const { t: s } = te(), t = z(l, "modelValue"), e = z(l, "open"), n = Ze(), o = (r) => {
|
|
875
|
+
const u = He(n, r);
|
|
876
|
+
u && _t(n, r, !u.collapse);
|
|
877
|
+
}, i = (r) => {
|
|
878
|
+
t.value = r, e.value = !1, ue.emit("refreshDepends");
|
|
869
879
|
};
|
|
870
|
-
return (
|
|
871
|
-
(
|
|
880
|
+
return (r, u) => L(n).length > 0 ? (C(), E("div", fn, [
|
|
881
|
+
(C(!0), E(Ve, null, Be(L(n), (a) => (C(), E(Ve, {
|
|
872
882
|
key: a.id
|
|
873
883
|
}, [
|
|
874
|
-
a.type === 0 ? (
|
|
884
|
+
a.type === 0 ? (C(), B(an, {
|
|
875
885
|
key: 0,
|
|
876
886
|
id: a.id,
|
|
877
|
-
title: a.name,
|
|
878
887
|
collapse: a.collapse,
|
|
879
888
|
count: a.count ?? 0,
|
|
889
|
+
title: a.name,
|
|
880
890
|
onXClick: o
|
|
881
|
-
}, null, 8, ["id", "
|
|
882
|
-
a.type === 1 && a.show ? (
|
|
891
|
+
}, null, 8, ["id", "collapse", "count", "title"])) : G("", !0),
|
|
892
|
+
a.type === 1 && a.show ? (C(), B(dn, {
|
|
883
893
|
key: 1,
|
|
884
894
|
id: a.id,
|
|
885
895
|
title: a.name,
|
|
886
896
|
onXClick: i
|
|
887
897
|
}, null, 8, ["id", "title"])) : G("", !0)
|
|
888
898
|
], 64))), 128))
|
|
889
|
-
])) : (
|
|
899
|
+
])) : (C(), E("div", mn, W(L(s)("x-prop-tree.noComp")), 1));
|
|
890
900
|
}
|
|
891
|
-
}),
|
|
901
|
+
}), pn = { class: "text-subtitle-1 ml-3" }, yn = /* @__PURE__ */ R({
|
|
892
902
|
__name: "index",
|
|
893
903
|
props: {
|
|
894
904
|
modelValue: {},
|
|
@@ -896,92 +906,92 @@ const sn = { class: "text-subtitle-2 ml-1" }, rn = { class: "text-caption text-g
|
|
|
896
906
|
},
|
|
897
907
|
emits: ["update:modelValue"],
|
|
898
908
|
setup(l) {
|
|
899
|
-
const { t: s } =
|
|
900
|
-
let
|
|
901
|
-
return t.mdAndUp.value && (
|
|
909
|
+
const { t: s } = te(), t = Ut(), { sysBarAvail: e } = pe(), { backgroundColor1: n } = ie(), o = z(l, "modelValue"), i = Ze(), r = K(() => {
|
|
910
|
+
let y = "100%";
|
|
911
|
+
return t.mdAndUp.value && (y = "400px"), {
|
|
902
912
|
background: n.value,
|
|
903
|
-
width:
|
|
913
|
+
width: y,
|
|
904
914
|
height: "100%"
|
|
905
915
|
};
|
|
906
|
-
}),
|
|
907
|
-
let
|
|
908
|
-
return e.value && (
|
|
916
|
+
}), u = K(() => {
|
|
917
|
+
let y = 48;
|
|
918
|
+
return e.value && (y += 24), {
|
|
909
919
|
position: "relative",
|
|
910
|
-
height: `calc(100% - ${
|
|
920
|
+
height: `calc(100% - ${y}px)`
|
|
911
921
|
};
|
|
912
922
|
}), a = K(() => ({
|
|
913
923
|
height: "60px"
|
|
914
|
-
})),
|
|
924
|
+
})), f = K(() => {
|
|
915
925
|
if (!o.value)
|
|
916
926
|
return s("x-runtime-lib.notSet");
|
|
917
|
-
const
|
|
918
|
-
return
|
|
919
|
-
}), { open: d } =
|
|
920
|
-
return
|
|
927
|
+
const y = He(i, o.value);
|
|
928
|
+
return y ? y.name : s("x-runtime-lib.compNotAvail");
|
|
929
|
+
}), { open: d } = Se(`propTreeCompSelectDlg${we()}`);
|
|
930
|
+
return De(() => {
|
|
921
931
|
d.value = !1;
|
|
922
|
-
}), (
|
|
923
|
-
const
|
|
924
|
-
return
|
|
925
|
-
modelValue:
|
|
926
|
-
"onUpdate:modelValue":
|
|
927
|
-
transition: "scroll-x-reverse-transition",
|
|
928
|
-
persistent: "",
|
|
929
|
-
"no-click-animation": "",
|
|
932
|
+
}), (y, g) => {
|
|
933
|
+
const k = x("v-btn"), S = x("v-sheet"), P = x("v-icon"), T = x("v-dialog");
|
|
934
|
+
return C(), B(T, {
|
|
935
|
+
modelValue: L(d),
|
|
936
|
+
"onUpdate:modelValue": g[5] || (g[5] = (w) => ve(d) ? d.value = w : null),
|
|
930
937
|
fullscreen: "",
|
|
931
|
-
|
|
938
|
+
"no-click-animation": "",
|
|
939
|
+
persistent: "",
|
|
940
|
+
transition: "scroll-x-reverse-transition",
|
|
941
|
+
onKeydown: g[6] || (g[6] = Ke(X((w) => d.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
932
942
|
}, {
|
|
933
|
-
activator: J(({ props:
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
943
|
+
activator: J(({ props: w }) => [
|
|
944
|
+
D(k, be(w, {
|
|
945
|
+
block: "",
|
|
946
|
+
density: "comfortable"
|
|
937
947
|
}), {
|
|
938
948
|
default: J(() => [
|
|
939
|
-
|
|
949
|
+
Ce(W(f.value), 1)
|
|
940
950
|
]),
|
|
941
951
|
_: 2
|
|
942
952
|
}, 1040)
|
|
943
953
|
]),
|
|
944
954
|
default: J(() => [
|
|
945
|
-
|
|
955
|
+
F("div", {
|
|
946
956
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
947
|
-
onClick:
|
|
948
|
-
onContextmenu:
|
|
957
|
+
onClick: g[3] || (g[3] = X((w) => d.value = !1, ["self"])),
|
|
958
|
+
onContextmenu: g[4] || (g[4] = X((w) => d.value = !1, ["self", "prevent"]))
|
|
949
959
|
}, [
|
|
950
|
-
|
|
960
|
+
F("div", {
|
|
951
961
|
class: "elevation-2",
|
|
952
|
-
style:
|
|
962
|
+
style: I(r.value)
|
|
953
963
|
}, [
|
|
954
|
-
|
|
964
|
+
L(e) ? (C(), B(S, {
|
|
955
965
|
key: 0,
|
|
956
966
|
color: "transparent",
|
|
957
967
|
height: 24
|
|
958
968
|
})) : G("", !0),
|
|
959
|
-
|
|
969
|
+
D(S, {
|
|
960
970
|
class: "d-flex align-center px-3",
|
|
961
971
|
color: "transparent",
|
|
962
972
|
height: 48
|
|
963
973
|
}, {
|
|
964
974
|
default: J(() => [
|
|
965
|
-
|
|
975
|
+
D(P, {
|
|
966
976
|
icon: "mdi-close",
|
|
967
|
-
onClick:
|
|
977
|
+
onClick: g[0] || (g[0] = (w) => d.value = !1)
|
|
968
978
|
}),
|
|
969
|
-
|
|
979
|
+
F("span", pn, W(L(s)("x-prop-tree.dlg.compSelect.title")), 1)
|
|
970
980
|
]),
|
|
971
981
|
_: 1
|
|
972
982
|
}),
|
|
973
|
-
|
|
983
|
+
F("div", {
|
|
974
984
|
class: "overflow-y-auto",
|
|
975
|
-
style:
|
|
985
|
+
style: I(u.value)
|
|
976
986
|
}, [
|
|
977
|
-
|
|
987
|
+
D(vn, {
|
|
978
988
|
modelValue: o.value,
|
|
979
|
-
"onUpdate:modelValue":
|
|
980
|
-
open:
|
|
981
|
-
"onUpdate:open":
|
|
989
|
+
"onUpdate:modelValue": g[1] || (g[1] = (w) => o.value = w),
|
|
990
|
+
open: L(d),
|
|
991
|
+
"onUpdate:open": g[2] || (g[2] = (w) => ve(d) ? d.value = w : null)
|
|
982
992
|
}, null, 8, ["modelValue", "open"]),
|
|
983
|
-
|
|
984
|
-
style:
|
|
993
|
+
F("div", {
|
|
994
|
+
style: I(a.value)
|
|
985
995
|
}, null, 4)
|
|
986
996
|
], 4)
|
|
987
997
|
], 4)
|
|
@@ -992,8 +1002,8 @@ const sn = { class: "text-subtitle-2 ml-1" }, rn = { class: "text-caption text-g
|
|
|
992
1002
|
};
|
|
993
1003
|
}
|
|
994
1004
|
});
|
|
995
|
-
function
|
|
996
|
-
return { renderUiCompSelect: (t, e, n, o, i) => e.ui !== "compSelect" ? (console.assert(!1), h("div", "renderUiCompSelect prop ui must be compSelect")) : h(
|
|
1005
|
+
function gn(l) {
|
|
1006
|
+
return { renderUiCompSelect: (t, e, n, o, i) => e.ui !== "compSelect" ? (console.assert(!1), h("div", "renderUiCompSelect prop ui must be compSelect")) : h(yn, {
|
|
997
1007
|
modelValue: ne(
|
|
998
1008
|
t,
|
|
999
1009
|
e,
|
|
@@ -1002,12 +1012,12 @@ function yn(l) {
|
|
|
1002
1012
|
o,
|
|
1003
1013
|
i
|
|
1004
1014
|
),
|
|
1005
|
-
"onUpdate:modelValue": (
|
|
1015
|
+
"onUpdate:modelValue": (r) => {
|
|
1006
1016
|
oe(
|
|
1007
1017
|
t,
|
|
1008
1018
|
e,
|
|
1009
1019
|
n,
|
|
1010
|
-
|
|
1020
|
+
r,
|
|
1011
1021
|
l,
|
|
1012
1022
|
o,
|
|
1013
1023
|
i
|
|
@@ -1015,7 +1025,7 @@ function yn(l) {
|
|
|
1015
1025
|
}
|
|
1016
1026
|
}) };
|
|
1017
1027
|
}
|
|
1018
|
-
const
|
|
1028
|
+
const hn = { class: "d-flex justify-space-between align-center" }, _n = /* @__PURE__ */ R({
|
|
1019
1029
|
__name: "colorPicker",
|
|
1020
1030
|
props: /* @__PURE__ */ Y({
|
|
1021
1031
|
hasDelete: { type: Boolean, default: !1 },
|
|
@@ -1026,54 +1036,54 @@ const gn = { class: "d-flex justify-space-between align-center" }, hn = /* @__PU
|
|
|
1026
1036
|
}),
|
|
1027
1037
|
emits: /* @__PURE__ */ Y(["delete"], ["update:modelValue"]),
|
|
1028
1038
|
setup(l, { emit: s }) {
|
|
1029
|
-
const { t } =
|
|
1030
|
-
let
|
|
1031
|
-
return l.hasDelete && (
|
|
1032
|
-
width:
|
|
1039
|
+
const { t } = te(), e = z(l, "modelValue"), n = s, o = K(() => {
|
|
1040
|
+
let u = "100%";
|
|
1041
|
+
return l.hasDelete && (u = "calc(100% - 37px)"), {
|
|
1042
|
+
width: u
|
|
1033
1043
|
};
|
|
1034
|
-
}), i = K(() => l.readonly), { open:
|
|
1035
|
-
return
|
|
1036
|
-
|
|
1037
|
-
}), (
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1040
|
-
modelValue:
|
|
1041
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
1044
|
+
}), i = K(() => l.readonly), { open: r } = Se(`propTreeColorPickerMenu${we()}`);
|
|
1045
|
+
return De(() => {
|
|
1046
|
+
r.value = !1;
|
|
1047
|
+
}), (u, a) => {
|
|
1048
|
+
const f = x("v-btn"), d = x("v-color-picker"), y = x("v-menu");
|
|
1049
|
+
return C(), B(y, {
|
|
1050
|
+
modelValue: L(r),
|
|
1051
|
+
"onUpdate:modelValue": a[2] || (a[2] = (g) => ve(r) ? r.value = g : null),
|
|
1042
1052
|
"close-on-content-click": !1,
|
|
1043
1053
|
scrim: "transparent"
|
|
1044
1054
|
}, {
|
|
1045
|
-
activator: J(({ props:
|
|
1046
|
-
|
|
1047
|
-
|
|
1055
|
+
activator: J(({ props: g }) => [
|
|
1056
|
+
F("div", hn, [
|
|
1057
|
+
F("div", {
|
|
1048
1058
|
class: "flex-grow-1",
|
|
1049
|
-
style:
|
|
1059
|
+
style: I(o.value)
|
|
1050
1060
|
}, [
|
|
1051
|
-
|
|
1052
|
-
density: "comfortable",
|
|
1053
|
-
color: e.value,
|
|
1061
|
+
D(f, be(g, {
|
|
1054
1062
|
block: "",
|
|
1063
|
+
color: e.value,
|
|
1064
|
+
density: "comfortable",
|
|
1055
1065
|
disabled: i.value
|
|
1056
1066
|
}), {
|
|
1057
1067
|
default: J(() => [
|
|
1058
|
-
|
|
1068
|
+
Ce(W(e.value ? e.value : L(t)("x-runtime-lib.notSet")), 1)
|
|
1059
1069
|
]),
|
|
1060
1070
|
_: 2
|
|
1061
1071
|
}, 1040, ["color", "disabled"])
|
|
1062
1072
|
], 4),
|
|
1063
|
-
|
|
1073
|
+
u.hasDelete ? (C(), B(f, {
|
|
1064
1074
|
key: 0,
|
|
1065
1075
|
class: "mx-2",
|
|
1066
|
-
variant: "text",
|
|
1067
1076
|
density: "compact",
|
|
1068
1077
|
icon: "mdi-minus",
|
|
1069
|
-
|
|
1078
|
+
variant: "text",
|
|
1079
|
+
onClick: a[0] || (a[0] = X((k) => n("delete"), ["stop"]))
|
|
1070
1080
|
})) : G("", !0)
|
|
1071
1081
|
])
|
|
1072
1082
|
]),
|
|
1073
1083
|
default: J(() => [
|
|
1074
|
-
|
|
1084
|
+
D(d, {
|
|
1075
1085
|
modelValue: e.value,
|
|
1076
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
1086
|
+
"onUpdate:modelValue": a[1] || (a[1] = (g) => e.value = g),
|
|
1077
1087
|
mode: "hexa",
|
|
1078
1088
|
"show-swatches": "",
|
|
1079
1089
|
"swatches-max-height": "150px"
|
|
@@ -1084,8 +1094,8 @@ const gn = { class: "d-flex justify-space-between align-center" }, hn = /* @__PU
|
|
|
1084
1094
|
};
|
|
1085
1095
|
}
|
|
1086
1096
|
});
|
|
1087
|
-
function
|
|
1088
|
-
return { renderUiColorPicker: (t, e, n, o, i) => e.ui !== "colorPicker" ? (console.assert(!1), h("div", "renderUiColorPicker prop ui must be colorPicker")) : h(
|
|
1097
|
+
function kn(l) {
|
|
1098
|
+
return { renderUiColorPicker: (t, e, n, o, i) => e.ui !== "colorPicker" ? (console.assert(!1), h("div", "renderUiColorPicker prop ui must be colorPicker")) : h(_n, {
|
|
1089
1099
|
modelValue: ne(
|
|
1090
1100
|
t,
|
|
1091
1101
|
e,
|
|
@@ -1094,12 +1104,12 @@ function _n(l) {
|
|
|
1094
1104
|
o,
|
|
1095
1105
|
i
|
|
1096
1106
|
),
|
|
1097
|
-
"onUpdate:modelValue": (
|
|
1107
|
+
"onUpdate:modelValue": (r) => {
|
|
1098
1108
|
oe(
|
|
1099
1109
|
t,
|
|
1100
1110
|
e,
|
|
1101
1111
|
n,
|
|
1102
|
-
|
|
1112
|
+
r,
|
|
1103
1113
|
l,
|
|
1104
1114
|
o,
|
|
1105
1115
|
i
|
|
@@ -1112,7 +1122,7 @@ function _n(l) {
|
|
|
1112
1122
|
readonly: e.readonly
|
|
1113
1123
|
}) };
|
|
1114
1124
|
}
|
|
1115
|
-
const
|
|
1125
|
+
const Vn = { class: "d-flex justify-space-between align-center my-2" }, Cn = { class: "flex-grow-1" }, Sn = /* @__PURE__ */ R({
|
|
1116
1126
|
__name: "multiTypes",
|
|
1117
1127
|
props: /* @__PURE__ */ Y({
|
|
1118
1128
|
hasDelete: { type: Boolean, default: !1 },
|
|
@@ -1123,82 +1133,95 @@ const kn = { class: "d-flex justify-space-between align-center my-2" }, Vn = { c
|
|
|
1123
1133
|
}),
|
|
1124
1134
|
emits: /* @__PURE__ */ Y(["delete"], ["update:modelValue"]),
|
|
1125
1135
|
setup(l, { emit: s }) {
|
|
1126
|
-
const { t } =
|
|
1127
|
-
const
|
|
1128
|
-
return
|
|
1129
|
-
|
|
1130
|
-
title: t(
|
|
1131
|
-
value:
|
|
1136
|
+
const { t } = te(), { isMobile: e } = pe(), n = z(l, "modelValue"), o = s, i = Te(), r = K(() => Fe[i.value]?.types[l.types]), u = O(0), a = K(() => {
|
|
1137
|
+
const k = [];
|
|
1138
|
+
return r.value?.forEach(({ title: S }, P) => {
|
|
1139
|
+
k.push({
|
|
1140
|
+
title: t(S),
|
|
1141
|
+
value: P
|
|
1132
1142
|
});
|
|
1133
|
-
}),
|
|
1143
|
+
}), k;
|
|
1134
1144
|
});
|
|
1135
1145
|
Ne(() => {
|
|
1136
|
-
|
|
1146
|
+
r.value?.some((k, S) => k.validator(n.value) ? (u.value = S, !0) : !1);
|
|
1137
1147
|
});
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1148
|
+
const f = K(() => r.value?.[u.value]), d = () => {
|
|
1149
|
+
n.value = f.value?.default;
|
|
1150
|
+
}, y = O(0), g = async (k) => {
|
|
1151
|
+
if (!k || !e() || f.value.ui !== "pixelInput" && f.value.ui !== "percentInput")
|
|
1152
|
+
return;
|
|
1153
|
+
const S = await Re({
|
|
1154
|
+
title: "",
|
|
1155
|
+
value: y.value,
|
|
1156
|
+
precision: f.value.precision,
|
|
1157
|
+
min: f.value.min,
|
|
1158
|
+
max: f.value.max,
|
|
1159
|
+
step: f.value.step
|
|
1160
|
+
});
|
|
1161
|
+
S !== void 0 && (y.value = S);
|
|
1162
|
+
};
|
|
1141
1163
|
return Ne(() => {
|
|
1142
|
-
|
|
1143
|
-
}), re(
|
|
1144
|
-
|
|
1145
|
-
}), (
|
|
1146
|
-
const
|
|
1147
|
-
return
|
|
1148
|
-
|
|
1149
|
-
|
|
1164
|
+
f.value?.ui === "pixelInput" ? y.value = Vt(n.value) : f.value?.ui === "percentInput" && (y.value = Ct(n.value));
|
|
1165
|
+
}), re(y, (k) => {
|
|
1166
|
+
f.value?.ui === "pixelInput" ? n.value = k + "px" : f.value?.ui === "percentInput" && (n.value = k + "%");
|
|
1167
|
+
}), (k, S) => {
|
|
1168
|
+
const P = x("v-select"), T = x("v-number-input"), w = x("v-btn"), _ = le("ripple");
|
|
1169
|
+
return C(), E("div", Vn, [
|
|
1170
|
+
F("div", Cn, [
|
|
1171
|
+
ee(D(P, {
|
|
1150
1172
|
modelValue: u.value,
|
|
1151
1173
|
"onUpdate:modelValue": [
|
|
1152
|
-
|
|
1153
|
-
|
|
1174
|
+
S[0] || (S[0] = (M) => u.value = M),
|
|
1175
|
+
d
|
|
1154
1176
|
],
|
|
1155
1177
|
density: "compact",
|
|
1156
|
-
items: r.value,
|
|
1157
1178
|
"hide-details": "",
|
|
1179
|
+
items: a.value,
|
|
1158
1180
|
"single-line": ""
|
|
1159
1181
|
}, null, 8, ["modelValue", "items"]), [
|
|
1160
1182
|
[
|
|
1161
|
-
|
|
1183
|
+
_,
|
|
1162
1184
|
void 0,
|
|
1163
1185
|
void 0,
|
|
1164
1186
|
{ stop: !0 }
|
|
1165
1187
|
]
|
|
1166
1188
|
]),
|
|
1167
|
-
|
|
1189
|
+
f.value?.ui === "pixelInput" || f.value?.ui === "percentInput" ? ee((C(), B(T, {
|
|
1168
1190
|
key: 0,
|
|
1169
|
-
modelValue:
|
|
1170
|
-
"onUpdate:modelValue":
|
|
1171
|
-
density: "compact",
|
|
1191
|
+
modelValue: y.value,
|
|
1192
|
+
"onUpdate:modelValue": S[1] || (S[1] = (M) => y.value = M),
|
|
1172
1193
|
"control-variant": "stacked",
|
|
1173
|
-
|
|
1174
|
-
min: a.value.min,
|
|
1175
|
-
max: a.value.max,
|
|
1176
|
-
step: a.value.step,
|
|
1194
|
+
density: "compact",
|
|
1177
1195
|
"hide-details": "",
|
|
1178
|
-
|
|
1179
|
-
|
|
1196
|
+
max: f.value.max,
|
|
1197
|
+
min: f.value.min,
|
|
1198
|
+
precision: f.value.precision,
|
|
1199
|
+
"single-line": "",
|
|
1200
|
+
step: f.value.step,
|
|
1201
|
+
"onUpdate:focused": g
|
|
1202
|
+
}, null, 8, ["modelValue", "max", "min", "precision", "step"])), [
|
|
1180
1203
|
[
|
|
1181
|
-
|
|
1204
|
+
_,
|
|
1182
1205
|
void 0,
|
|
1183
1206
|
void 0,
|
|
1184
1207
|
{ stop: !0 }
|
|
1185
1208
|
]
|
|
1186
1209
|
]) : G("", !0)
|
|
1187
1210
|
]),
|
|
1188
|
-
|
|
1211
|
+
k.hasDelete ? (C(), B(w, {
|
|
1189
1212
|
key: 0,
|
|
1190
1213
|
class: "mx-2",
|
|
1191
|
-
variant: "text",
|
|
1192
1214
|
density: "compact",
|
|
1193
1215
|
icon: "mdi-minus",
|
|
1194
|
-
|
|
1216
|
+
variant: "text",
|
|
1217
|
+
onClick: S[2] || (S[2] = X((M) => o("delete"), ["stop"]))
|
|
1195
1218
|
})) : G("", !0)
|
|
1196
1219
|
]);
|
|
1197
1220
|
};
|
|
1198
1221
|
}
|
|
1199
1222
|
});
|
|
1200
|
-
function
|
|
1201
|
-
return { renderUiMultiTypes: (t, e, n, o, i) => e.ui !== "multiTypes" ? (console.assert(!1), h("div", "renderUiMultiTypes prop ui must be multiTypes")) : h(
|
|
1223
|
+
function Un(l) {
|
|
1224
|
+
return { renderUiMultiTypes: (t, e, n, o, i) => e.ui !== "multiTypes" ? (console.assert(!1), h("div", "renderUiMultiTypes prop ui must be multiTypes")) : h(Sn, {
|
|
1202
1225
|
modelValue: ne(
|
|
1203
1226
|
t,
|
|
1204
1227
|
e,
|
|
@@ -1207,12 +1230,12 @@ function Sn(l) {
|
|
|
1207
1230
|
o,
|
|
1208
1231
|
i
|
|
1209
1232
|
) ?? "",
|
|
1210
|
-
"onUpdate:modelValue": (
|
|
1233
|
+
"onUpdate:modelValue": (r) => {
|
|
1211
1234
|
oe(
|
|
1212
1235
|
t,
|
|
1213
1236
|
e,
|
|
1214
1237
|
n,
|
|
1215
|
-
|
|
1238
|
+
r,
|
|
1216
1239
|
l,
|
|
1217
1240
|
o,
|
|
1218
1241
|
i
|
|
@@ -1225,7 +1248,7 @@ function Sn(l) {
|
|
|
1225
1248
|
types: e.types
|
|
1226
1249
|
}) };
|
|
1227
1250
|
}
|
|
1228
|
-
const
|
|
1251
|
+
const xn = /* @__PURE__ */ R({
|
|
1229
1252
|
__name: "editor",
|
|
1230
1253
|
props: {
|
|
1231
1254
|
modelValue: { required: !0 },
|
|
@@ -1237,28 +1260,28 @@ const Un = /* @__PURE__ */ R({
|
|
|
1237
1260
|
},
|
|
1238
1261
|
emits: ["update:modelValue", "update:lock", "update:scale"],
|
|
1239
1262
|
setup(l, { expose: s }) {
|
|
1240
|
-
const t = z(l, "modelValue"), e = z(l, "lock"), n = z(l, "scale"), o =
|
|
1263
|
+
const t = z(l, "modelValue"), e = z(l, "lock"), n = z(l, "scale"), o = gt(), i = ht(), r = Te(), u = Je("target"), a = () => {
|
|
1241
1264
|
const d = JSON.parse(t.value);
|
|
1242
|
-
|
|
1265
|
+
u.value?.load(d);
|
|
1243
1266
|
};
|
|
1244
1267
|
return s({ save: () => {
|
|
1245
|
-
const d =
|
|
1268
|
+
const d = u.value.save();
|
|
1246
1269
|
t.value = JSON.stringify(d, null, 2);
|
|
1247
|
-
} }), (d,
|
|
1270
|
+
} }), (d, y) => (C(), B(L(xt), {
|
|
1248
1271
|
ref_key: "target",
|
|
1249
|
-
ref:
|
|
1272
|
+
ref: u,
|
|
1250
1273
|
lock: e.value,
|
|
1251
|
-
"onUpdate:lock":
|
|
1274
|
+
"onUpdate:lock": y[0] || (y[0] = (g) => e.value = g),
|
|
1252
1275
|
scale: n.value,
|
|
1253
|
-
"onUpdate:scale":
|
|
1276
|
+
"onUpdate:scale": y[1] || (y[1] = (g) => n.value = g),
|
|
1277
|
+
dark: L(o),
|
|
1278
|
+
locale: L(i),
|
|
1254
1279
|
type: "json",
|
|
1255
|
-
version:
|
|
1256
|
-
locale: T(i),
|
|
1257
|
-
dark: T(o),
|
|
1280
|
+
version: L(r),
|
|
1258
1281
|
onReady: a
|
|
1259
|
-
}, null, 8, ["lock", "scale", "
|
|
1282
|
+
}, null, 8, ["lock", "scale", "dark", "locale", "version"]));
|
|
1260
1283
|
}
|
|
1261
|
-
}), $n = { class: "text-subtitle-1" },
|
|
1284
|
+
}), $n = { class: "text-subtitle-1" }, Pn = /* @__PURE__ */ R({
|
|
1262
1285
|
__name: "index",
|
|
1263
1286
|
props: {
|
|
1264
1287
|
modelValue: { required: !0 },
|
|
@@ -1266,84 +1289,84 @@ const Un = /* @__PURE__ */ R({
|
|
|
1266
1289
|
},
|
|
1267
1290
|
emits: ["update:modelValue"],
|
|
1268
1291
|
setup(l) {
|
|
1269
|
-
const { t: s } =
|
|
1270
|
-
let
|
|
1271
|
-
return t.value && (
|
|
1292
|
+
const { t: s } = te(), { sysBarAvail: t } = pe(), { backgroundColor0: e, backgroundColor1: n, backgroundColor2: o } = ie(), i = z(l, "modelValue"), r = O(!1), u = O(1), a = K(() => {
|
|
1293
|
+
let g = 48;
|
|
1294
|
+
return t.value && (g += 24), {
|
|
1272
1295
|
position: "relative",
|
|
1273
1296
|
background: n.value,
|
|
1274
|
-
height: `calc(100% - ${
|
|
1297
|
+
height: `calc(100% - ${g}px)`
|
|
1275
1298
|
};
|
|
1276
|
-
}),
|
|
1277
|
-
|
|
1299
|
+
}), f = K(() => s("x-prop-tree.dlg.jsonObject.title")), { open: d } = Se(`propTreeJsonObjectDlg${we()}`);
|
|
1300
|
+
De(() => {
|
|
1278
1301
|
d.value = !1;
|
|
1279
1302
|
});
|
|
1280
|
-
const
|
|
1281
|
-
return re(d, (
|
|
1282
|
-
|
|
1283
|
-
}), (
|
|
1284
|
-
const
|
|
1285
|
-
return
|
|
1286
|
-
modelValue:
|
|
1287
|
-
"onUpdate:modelValue":
|
|
1288
|
-
transition: "dialog-bottom-transition",
|
|
1289
|
-
persistent: "",
|
|
1290
|
-
"no-click-animation": "",
|
|
1291
|
-
fullscreen: "",
|
|
1303
|
+
const y = Je("editor");
|
|
1304
|
+
return re(d, (g) => {
|
|
1305
|
+
g || y.value?.save();
|
|
1306
|
+
}), (g, k) => {
|
|
1307
|
+
const S = x("v-btn"), P = x("v-sheet"), T = x("v-spacer"), w = x("v-dialog");
|
|
1308
|
+
return C(), B(w, {
|
|
1309
|
+
modelValue: L(d),
|
|
1310
|
+
"onUpdate:modelValue": k[4] || (k[4] = (_) => ve(d) ? d.value = _ : null),
|
|
1292
1311
|
attach: "",
|
|
1293
|
-
|
|
1312
|
+
fullscreen: "",
|
|
1313
|
+
"no-click-animation": "",
|
|
1314
|
+
persistent: "",
|
|
1315
|
+
transition: "dialog-bottom-transition",
|
|
1316
|
+
onKeydown: k[5] || (k[5] = Ke(X((_) => d.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
1294
1317
|
}, {
|
|
1295
|
-
activator: J(({ props:
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1318
|
+
activator: J(({ props: _ }) => [
|
|
1319
|
+
D(S, be(_, {
|
|
1320
|
+
block: "",
|
|
1321
|
+
density: "comfortable"
|
|
1299
1322
|
}), {
|
|
1300
1323
|
default: J(() => [
|
|
1301
|
-
|
|
1324
|
+
Ce(W(f.value), 1)
|
|
1302
1325
|
]),
|
|
1303
1326
|
_: 2
|
|
1304
1327
|
}, 1040)
|
|
1305
1328
|
]),
|
|
1306
1329
|
default: J(() => [
|
|
1307
|
-
|
|
1308
|
-
color:
|
|
1309
|
-
|
|
1310
|
-
|
|
1330
|
+
D(P, {
|
|
1331
|
+
color: L(e),
|
|
1332
|
+
height: "100%",
|
|
1333
|
+
width: "100%"
|
|
1311
1334
|
}, {
|
|
1312
1335
|
default: J(() => [
|
|
1313
|
-
|
|
1336
|
+
L(t) ? (C(), B(P, {
|
|
1314
1337
|
key: 0,
|
|
1315
|
-
color:
|
|
1338
|
+
color: L(o),
|
|
1316
1339
|
height: 24
|
|
1317
1340
|
}, null, 8, ["color"])) : G("", !0),
|
|
1318
|
-
|
|
1341
|
+
D(P, {
|
|
1319
1342
|
class: "d-flex align-center px-2",
|
|
1320
|
-
color:
|
|
1343
|
+
color: L(o),
|
|
1321
1344
|
height: 48
|
|
1322
1345
|
}, {
|
|
1323
1346
|
default: J(() => [
|
|
1324
|
-
|
|
1325
|
-
variant: "text",
|
|
1347
|
+
D(S, {
|
|
1326
1348
|
density: "comfortable",
|
|
1327
1349
|
icon: "mdi-close",
|
|
1328
|
-
|
|
1350
|
+
variant: "text",
|
|
1351
|
+
onClick: k[0] || (k[0] = (_) => d.value = !1)
|
|
1329
1352
|
}),
|
|
1330
|
-
|
|
1331
|
-
|
|
1353
|
+
F("span", $n, W(L(s)("x-prop-tree.dlg.jsonObject.title")), 1),
|
|
1354
|
+
D(T)
|
|
1332
1355
|
]),
|
|
1333
1356
|
_: 1
|
|
1334
1357
|
}, 8, ["color"]),
|
|
1335
|
-
|
|
1336
|
-
style:
|
|
1358
|
+
F("div", {
|
|
1359
|
+
style: I(a.value)
|
|
1337
1360
|
}, [
|
|
1338
|
-
|
|
1361
|
+
D(xn, {
|
|
1339
1362
|
ref_key: "editor",
|
|
1340
|
-
ref:
|
|
1363
|
+
ref: y,
|
|
1341
1364
|
modelValue: i.value,
|
|
1342
|
-
"onUpdate:modelValue":
|
|
1343
|
-
lock:
|
|
1344
|
-
"onUpdate:lock":
|
|
1345
|
-
scale:
|
|
1346
|
-
"onUpdate:scale":
|
|
1365
|
+
"onUpdate:modelValue": k[1] || (k[1] = (_) => i.value = _),
|
|
1366
|
+
lock: r.value,
|
|
1367
|
+
"onUpdate:lock": k[2] || (k[2] = (_) => r.value = _),
|
|
1368
|
+
scale: u.value,
|
|
1369
|
+
"onUpdate:scale": k[3] || (k[3] = (_) => u.value = _)
|
|
1347
1370
|
}, null, 8, ["modelValue", "lock", "scale"])
|
|
1348
1371
|
], 4)
|
|
1349
1372
|
]),
|
|
@@ -1355,8 +1378,8 @@ const Un = /* @__PURE__ */ R({
|
|
|
1355
1378
|
};
|
|
1356
1379
|
}
|
|
1357
1380
|
});
|
|
1358
|
-
function
|
|
1359
|
-
return { renderUiJsonEditor: (t, e, n, o, i) => e.ui !== "jsonEditor" ? h("div", "renderUiJsonObject prop ui must be jsonEditor") : h(
|
|
1381
|
+
function Mn(l) {
|
|
1382
|
+
return { renderUiJsonEditor: (t, e, n, o, i) => e.ui !== "jsonEditor" ? h("div", "renderUiJsonObject prop ui must be jsonEditor") : h(Pn, {
|
|
1360
1383
|
modelValue: ne(
|
|
1361
1384
|
t,
|
|
1362
1385
|
e,
|
|
@@ -1365,12 +1388,12 @@ function Pn(l) {
|
|
|
1365
1388
|
o,
|
|
1366
1389
|
i
|
|
1367
1390
|
) ?? "{}",
|
|
1368
|
-
"onUpdate:modelValue": (
|
|
1391
|
+
"onUpdate:modelValue": (r) => {
|
|
1369
1392
|
oe(
|
|
1370
1393
|
t,
|
|
1371
1394
|
e,
|
|
1372
1395
|
n,
|
|
1373
|
-
|
|
1396
|
+
r,
|
|
1374
1397
|
l,
|
|
1375
1398
|
o,
|
|
1376
1399
|
i
|
|
@@ -1378,7 +1401,7 @@ function Pn(l) {
|
|
|
1378
1401
|
}
|
|
1379
1402
|
}) };
|
|
1380
1403
|
}
|
|
1381
|
-
const
|
|
1404
|
+
const wn = /* @__PURE__ */ R({
|
|
1382
1405
|
__name: "index",
|
|
1383
1406
|
props: {
|
|
1384
1407
|
unique: {},
|
|
@@ -1388,99 +1411,99 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1388
1411
|
},
|
|
1389
1412
|
emits: ["change"],
|
|
1390
1413
|
setup(l, { emit: s }) {
|
|
1391
|
-
const { t } =
|
|
1392
|
-
qe(
|
|
1414
|
+
const { t } = te(), { backgroundColor1: e } = ie(), n = l, o = s, i = O("20px"), r = O("56px"), u = O("200px"), a = mt({}), f = O({}), d = (v, c) => {
|
|
1415
|
+
qe(f, n.config, n.object), o("change", v, c);
|
|
1393
1416
|
};
|
|
1394
1417
|
re(
|
|
1395
1418
|
[() => n.config, () => n.object],
|
|
1396
1419
|
() => {
|
|
1397
|
-
qe(
|
|
1398
|
-
o("change",
|
|
1420
|
+
qe(f, n.config, n.object, (v, c) => {
|
|
1421
|
+
o("change", v, c);
|
|
1399
1422
|
});
|
|
1400
1423
|
},
|
|
1401
1424
|
{ immediate: !0 }
|
|
1402
1425
|
);
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1426
|
+
const y = O(n.version);
|
|
1427
|
+
Tt(y), re(
|
|
1405
1428
|
() => n.version,
|
|
1406
1429
|
() => {
|
|
1407
|
-
|
|
1430
|
+
y.value = n.version;
|
|
1408
1431
|
}
|
|
1409
1432
|
);
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1433
|
+
const g = O(n.config);
|
|
1434
|
+
Lt(g), re(
|
|
1412
1435
|
() => n.config,
|
|
1413
1436
|
() => {
|
|
1414
|
-
|
|
1437
|
+
g.value = n.config;
|
|
1415
1438
|
}
|
|
1416
1439
|
);
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1440
|
+
const k = O(n.object);
|
|
1441
|
+
Ot(k), re(
|
|
1419
1442
|
() => n.object,
|
|
1420
1443
|
() => {
|
|
1421
|
-
|
|
1444
|
+
k.value = n.object;
|
|
1422
1445
|
}
|
|
1423
|
-
),
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1446
|
+
), Bt(f), Jt(d);
|
|
1447
|
+
const S = O([]);
|
|
1448
|
+
Et(S);
|
|
1426
1449
|
const P = () => {
|
|
1427
|
-
const { compGroups:
|
|
1428
|
-
|
|
1429
|
-
const A =
|
|
1450
|
+
const { compGroups: v, comps: c } = St.app.activeApp, p = [];
|
|
1451
|
+
v.forEach(({ id: m, name: V, position: $ }) => {
|
|
1452
|
+
const A = S.value.find((Z) => Z.id === m);
|
|
1430
1453
|
p.push({
|
|
1431
|
-
id:
|
|
1454
|
+
id: m,
|
|
1432
1455
|
type: 0,
|
|
1433
|
-
name:
|
|
1456
|
+
name: V,
|
|
1434
1457
|
position: $,
|
|
1435
1458
|
collapse: A?.collapse ?? !0
|
|
1436
1459
|
});
|
|
1437
|
-
}), c.forEach(({ id:
|
|
1438
|
-
p.push({ id:
|
|
1439
|
-
}),
|
|
1460
|
+
}), c.forEach(({ id: m, groupid: V, name: $, position: A }) => {
|
|
1461
|
+
p.push({ id: m, type: 1, name: $, position: A, group: V });
|
|
1462
|
+
}), kt(p, !0), S.value = p;
|
|
1440
1463
|
};
|
|
1441
|
-
let
|
|
1442
|
-
const
|
|
1443
|
-
clearTimeout(
|
|
1444
|
-
P(),
|
|
1464
|
+
let T;
|
|
1465
|
+
const w = () => {
|
|
1466
|
+
clearTimeout(T), T = window.setTimeout(() => {
|
|
1467
|
+
P(), T && w();
|
|
1445
1468
|
}, 1e3);
|
|
1446
|
-
},
|
|
1447
|
-
clearTimeout(
|
|
1469
|
+
}, _ = () => {
|
|
1470
|
+
clearTimeout(T), T = void 0;
|
|
1448
1471
|
};
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
}),
|
|
1452
|
-
|
|
1472
|
+
vt(() => {
|
|
1473
|
+
w();
|
|
1474
|
+
}), pt(() => {
|
|
1475
|
+
_();
|
|
1453
1476
|
});
|
|
1454
|
-
const { renderProp:
|
|
1455
|
-
|
|
1477
|
+
const { renderProp: M } = zt(f, r, u), { renderUiDummy: N } = Gt(d), { renderUiStrInput: Q } = Qt(d), { renderUiNumInput: Pe } = It(d), { renderUiSwitch: je } = nn(d), { renderUiSelect: Ie } = sn(d), { renderUiColorPicker: et } = kn(d), { renderUiJsonEditor: tt } = Mn(d), { renderUiMultiTypes: nt } = Un(d), { renderUiCompSelect: lt } = gn(d), ye = (v, c, p, m, V, $) => (v = Ee(v), V !== void 0 ? (v.push(V), $ && v.push(c.key)) : v.push(c.key), c.ui ? c.array && m ? it(v, c, p, m, V, $) : rt(v, c, p, V, $) : c.array ? ot(v, c, p, m, V, $) : st(
|
|
1478
|
+
v,
|
|
1456
1479
|
c,
|
|
1457
1480
|
p,
|
|
1458
|
-
|
|
1459
|
-
|
|
1481
|
+
m,
|
|
1482
|
+
V,
|
|
1460
1483
|
$
|
|
1461
|
-
)),
|
|
1484
|
+
)), ot = (v, c, p, m, V, $) => {
|
|
1462
1485
|
if (c.ui)
|
|
1463
1486
|
return console.assert(!1), h("div", "renderBranchArray prop ui must be invalid");
|
|
1464
1487
|
if (!c.array)
|
|
1465
1488
|
return console.assert(!1), h("div", "renderBranchArray prop array must be valid");
|
|
1466
|
-
if (!
|
|
1489
|
+
if (!m)
|
|
1467
1490
|
return console.assert(!1), h("div", "renderBranchArray branch must be valid");
|
|
1468
1491
|
let A;
|
|
1469
|
-
|
|
1470
|
-
let
|
|
1471
|
-
|
|
1472
|
-
const fe = h(
|
|
1473
|
-
title:
|
|
1474
|
-
collapse:
|
|
1492
|
+
V !== void 0 && !$ ? (p[V] instanceof Array || (p[V] = q(c), d(v, p[c.key])), A = p[V]) : (p[c.key] instanceof Array || (p[c.key] = q(c), d(v, p[c.key])), A = p[c.key]);
|
|
1493
|
+
let Z = t(c.name);
|
|
1494
|
+
m.collapse && ae(f.value, v) && (Z += " *");
|
|
1495
|
+
const fe = h(ke, {
|
|
1496
|
+
title: Z,
|
|
1497
|
+
collapse: m.collapse,
|
|
1475
1498
|
hasCreate: !0,
|
|
1476
|
-
onCollapse: (
|
|
1477
|
-
|
|
1499
|
+
onCollapse: (U) => {
|
|
1500
|
+
m.collapse = U;
|
|
1478
1501
|
},
|
|
1479
|
-
onMenu: (
|
|
1480
|
-
ue.emit("propTreeMenu", { x:
|
|
1502
|
+
onMenu: (U, b) => {
|
|
1503
|
+
ue.emit("propTreeMenu", { x: U, y: b, keys: v });
|
|
1481
1504
|
},
|
|
1482
1505
|
onCreate: () => {
|
|
1483
|
-
A.push({}), d(
|
|
1506
|
+
A.push({}), d(v, A);
|
|
1484
1507
|
}
|
|
1485
1508
|
}), H = h(
|
|
1486
1509
|
"div",
|
|
@@ -1490,44 +1513,44 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1490
1513
|
}
|
|
1491
1514
|
},
|
|
1492
1515
|
(() => {
|
|
1493
|
-
const
|
|
1494
|
-
for (let
|
|
1495
|
-
if (!
|
|
1516
|
+
const U = [];
|
|
1517
|
+
for (let b = 0; b < A.length; b++) {
|
|
1518
|
+
if (!Me(m.children)) {
|
|
1496
1519
|
console.assert(!1);
|
|
1497
1520
|
break;
|
|
1498
1521
|
}
|
|
1499
|
-
|
|
1522
|
+
m.children[b] || m.children.push({
|
|
1500
1523
|
collapse: !0,
|
|
1501
1524
|
children: {}
|
|
1502
1525
|
});
|
|
1503
|
-
const
|
|
1504
|
-
let Le = `[${
|
|
1505
|
-
|
|
1506
|
-
const
|
|
1526
|
+
const ge = [...v, b], he = m.children[b];
|
|
1527
|
+
let Le = `[${b + 1}]`;
|
|
1528
|
+
m.children[b].collapse && ae(f.value, ge) && (Le += " *");
|
|
1529
|
+
const at = h(ke, {
|
|
1507
1530
|
title: Le,
|
|
1508
|
-
collapse:
|
|
1531
|
+
collapse: m.children[b].collapse,
|
|
1509
1532
|
hasDelete: !0,
|
|
1510
|
-
index:
|
|
1511
|
-
onCollapse: (
|
|
1512
|
-
if (!
|
|
1533
|
+
index: b,
|
|
1534
|
+
onCollapse: (j) => {
|
|
1535
|
+
if (!Me(m.children)) {
|
|
1513
1536
|
console.assert(!1);
|
|
1514
1537
|
return;
|
|
1515
1538
|
}
|
|
1516
|
-
|
|
1539
|
+
m.children[b].collapse = j;
|
|
1517
1540
|
},
|
|
1518
|
-
onMenu: (
|
|
1519
|
-
ue.emit("propTreeMenu", { x:
|
|
1541
|
+
onMenu: (j, se) => {
|
|
1542
|
+
ue.emit("propTreeMenu", { x: j, y: se, keys: ge });
|
|
1520
1543
|
},
|
|
1521
|
-
onDelete: (
|
|
1522
|
-
if (!
|
|
1544
|
+
onDelete: (j) => {
|
|
1545
|
+
if (!Me(m.children)) {
|
|
1523
1546
|
console.assert(!1);
|
|
1524
1547
|
return;
|
|
1525
1548
|
}
|
|
1526
|
-
|
|
1549
|
+
m.children.splice(j, 1), A.splice(j, 1), d(v, A);
|
|
1527
1550
|
}
|
|
1528
1551
|
});
|
|
1529
|
-
|
|
1530
|
-
const
|
|
1552
|
+
U.push(at);
|
|
1553
|
+
const ct = h(
|
|
1531
1554
|
"div",
|
|
1532
1555
|
{
|
|
1533
1556
|
style: {
|
|
@@ -1535,31 +1558,31 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1535
1558
|
}
|
|
1536
1559
|
},
|
|
1537
1560
|
(() => {
|
|
1538
|
-
const
|
|
1561
|
+
const j = [];
|
|
1539
1562
|
return c.children.forEach((se) => {
|
|
1540
|
-
if (!Oe(
|
|
1563
|
+
if (!Oe(he.children)) {
|
|
1541
1564
|
console.assert(!1);
|
|
1542
1565
|
return;
|
|
1543
1566
|
}
|
|
1544
|
-
|
|
1567
|
+
he.children[se.key] || (he.children[se.key] = {
|
|
1545
1568
|
collapse: !0,
|
|
1546
1569
|
children: se.array ? [] : {}
|
|
1547
1570
|
});
|
|
1548
|
-
const
|
|
1549
|
-
|
|
1571
|
+
const dt = ye(
|
|
1572
|
+
v,
|
|
1550
1573
|
se,
|
|
1551
|
-
A[
|
|
1552
|
-
|
|
1553
|
-
|
|
1574
|
+
A[b],
|
|
1575
|
+
he.children[se.key],
|
|
1576
|
+
b,
|
|
1554
1577
|
!0
|
|
1555
1578
|
);
|
|
1556
|
-
|
|
1557
|
-
}),
|
|
1579
|
+
j.push(dt);
|
|
1580
|
+
}), j;
|
|
1558
1581
|
})()
|
|
1559
1582
|
);
|
|
1560
|
-
|
|
1583
|
+
m.children[b].collapse || U.push(ct);
|
|
1561
1584
|
}
|
|
1562
|
-
return
|
|
1585
|
+
return U;
|
|
1563
1586
|
})()
|
|
1564
1587
|
);
|
|
1565
1588
|
return h(
|
|
@@ -1570,31 +1593,31 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1570
1593
|
}
|
|
1571
1594
|
},
|
|
1572
1595
|
(() => {
|
|
1573
|
-
const
|
|
1574
|
-
return
|
|
1596
|
+
const U = [];
|
|
1597
|
+
return U.push(fe), m.collapse || U.push(H), U;
|
|
1575
1598
|
})()
|
|
1576
1599
|
);
|
|
1577
|
-
},
|
|
1600
|
+
}, st = (v, c, p, m, V, $) => {
|
|
1578
1601
|
if (c.ui)
|
|
1579
1602
|
return console.assert(!1), h("div", "renderBranchScalar prop ui must be invalid");
|
|
1580
1603
|
if (c.array)
|
|
1581
1604
|
return console.assert(!1), h("div", "renderBranchScalar prop array must be invalid");
|
|
1582
|
-
if (!
|
|
1605
|
+
if (!m)
|
|
1583
1606
|
return console.assert(!1), h("div", "renderBranchScalar branch must be valid");
|
|
1584
1607
|
let A = t(c.name);
|
|
1585
|
-
|
|
1586
|
-
const
|
|
1608
|
+
m.collapse && ae(f.value, v) && (A += " *");
|
|
1609
|
+
const Z = h(ke, {
|
|
1587
1610
|
title: A,
|
|
1588
|
-
collapse:
|
|
1589
|
-
hasDelete:
|
|
1611
|
+
collapse: m.collapse,
|
|
1612
|
+
hasDelete: V !== void 0 && !$,
|
|
1590
1613
|
onCollapse: (H) => {
|
|
1591
|
-
|
|
1614
|
+
m.collapse = H;
|
|
1592
1615
|
},
|
|
1593
|
-
onMenu: (H,
|
|
1594
|
-
ue.emit("propTreeMenu", { x: H, y:
|
|
1616
|
+
onMenu: (H, U) => {
|
|
1617
|
+
ue.emit("propTreeMenu", { x: H, y: U, keys: v });
|
|
1595
1618
|
},
|
|
1596
1619
|
onDelete: () => {
|
|
1597
|
-
|
|
1620
|
+
V === void 0 || $ || (p.splice(V, 1), d(v.slice(0, -1), p));
|
|
1598
1621
|
}
|
|
1599
1622
|
}), fe = h(
|
|
1600
1623
|
"div",
|
|
@@ -1605,22 +1628,22 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1605
1628
|
},
|
|
1606
1629
|
(() => {
|
|
1607
1630
|
const H = [];
|
|
1608
|
-
return c.children.forEach((
|
|
1609
|
-
if (!Oe(
|
|
1631
|
+
return c.children.forEach((U) => {
|
|
1632
|
+
if (!Oe(m.children)) {
|
|
1610
1633
|
console.assert(!1);
|
|
1611
1634
|
return;
|
|
1612
1635
|
}
|
|
1613
|
-
|
|
1636
|
+
m.children[U.key] || (m.children[U.key] = {
|
|
1614
1637
|
collapse: !0,
|
|
1615
|
-
children: !
|
|
1638
|
+
children: !U.ui && U.array ? [] : {}
|
|
1616
1639
|
});
|
|
1617
|
-
const
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
(typeof p[c.key] != "object" && (p[c.key] = {}, d(
|
|
1621
|
-
|
|
1640
|
+
const b = ye(
|
|
1641
|
+
v,
|
|
1642
|
+
U,
|
|
1643
|
+
(typeof p[c.key] != "object" && (p[c.key] = {}, d(v, p[c.key])), p[c.key]),
|
|
1644
|
+
m.children[U.key]
|
|
1622
1645
|
);
|
|
1623
|
-
H.push(
|
|
1646
|
+
H.push(b);
|
|
1624
1647
|
}), H;
|
|
1625
1648
|
})()
|
|
1626
1649
|
);
|
|
@@ -1633,32 +1656,32 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1633
1656
|
},
|
|
1634
1657
|
(() => {
|
|
1635
1658
|
const H = [];
|
|
1636
|
-
return H.push(
|
|
1659
|
+
return H.push(Z), m.collapse || H.push(fe), H;
|
|
1637
1660
|
})()
|
|
1638
1661
|
);
|
|
1639
|
-
},
|
|
1662
|
+
}, it = (v, c, p, m, V, $) => {
|
|
1640
1663
|
if (!c.ui)
|
|
1641
1664
|
return console.assert(!1), h("div", "renderLeafArray prop ui must be valid");
|
|
1642
1665
|
if (!c.array)
|
|
1643
1666
|
return console.assert(!1), h("div", "renderLeafArray prop array must be valid");
|
|
1644
|
-
if (!
|
|
1667
|
+
if (!m)
|
|
1645
1668
|
return console.assert(!1), h("div", "renderLeafArray branch must be valid");
|
|
1646
1669
|
let A;
|
|
1647
|
-
|
|
1648
|
-
let
|
|
1649
|
-
|
|
1650
|
-
const fe = h(
|
|
1651
|
-
title:
|
|
1652
|
-
collapse:
|
|
1670
|
+
V !== void 0 && !$ ? (p[V] instanceof Array || (p[V] = q(c), d(v, p[V])), A = p[V]) : (p[c.key] instanceof Array || (p[c.key] = q(c), d(v, p[c.key])), A = p[c.key]);
|
|
1671
|
+
let Z = t(c.name);
|
|
1672
|
+
m.collapse && ae(f.value, v) && (Z += " *");
|
|
1673
|
+
const fe = h(ke, {
|
|
1674
|
+
title: Z,
|
|
1675
|
+
collapse: m.collapse,
|
|
1653
1676
|
hasCreate: !0,
|
|
1654
|
-
onCollapse: (
|
|
1655
|
-
|
|
1677
|
+
onCollapse: (U) => {
|
|
1678
|
+
m.collapse = U;
|
|
1656
1679
|
},
|
|
1657
|
-
onMenu: (
|
|
1658
|
-
ue.emit("propTreeMenu", { x:
|
|
1680
|
+
onMenu: (U, b) => {
|
|
1681
|
+
ue.emit("propTreeMenu", { x: U, y: b, keys: v });
|
|
1659
1682
|
},
|
|
1660
1683
|
onCreate: () => {
|
|
1661
|
-
A.push(q(c, !0)), d(
|
|
1684
|
+
A.push(q(c, !0)), d(v, A);
|
|
1662
1685
|
}
|
|
1663
1686
|
}), H = h(
|
|
1664
1687
|
"div",
|
|
@@ -1668,12 +1691,12 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1668
1691
|
}
|
|
1669
1692
|
},
|
|
1670
1693
|
(() => {
|
|
1671
|
-
const
|
|
1672
|
-
for (let
|
|
1673
|
-
const
|
|
1674
|
-
|
|
1694
|
+
const U = [];
|
|
1695
|
+
for (let b = 0; b < A.length; b++) {
|
|
1696
|
+
const ge = ye(v, c, A, void 0, b, !1);
|
|
1697
|
+
U.push(ge);
|
|
1675
1698
|
}
|
|
1676
|
-
return
|
|
1699
|
+
return U;
|
|
1677
1700
|
})()
|
|
1678
1701
|
);
|
|
1679
1702
|
return h(
|
|
@@ -1684,16 +1707,16 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1684
1707
|
}
|
|
1685
1708
|
},
|
|
1686
1709
|
(() => {
|
|
1687
|
-
const
|
|
1688
|
-
return
|
|
1710
|
+
const U = [];
|
|
1711
|
+
return U.push(fe), m.collapse || U.push(H), U;
|
|
1689
1712
|
})()
|
|
1690
1713
|
);
|
|
1691
|
-
},
|
|
1714
|
+
}, rt = (v, c, p, m, V) => {
|
|
1692
1715
|
if (!c.ui)
|
|
1693
1716
|
return console.assert(!1), h("div", "renderLeafScalar prop ui must be valid");
|
|
1694
1717
|
let $;
|
|
1695
|
-
return c.ui === "dummy" ? $ = N(
|
|
1696
|
-
},
|
|
1718
|
+
return c.ui === "dummy" ? $ = N(v, c, p, m, V) : c.ui === "strInput" ? $ = Q(v, c, p, m, V) : c.ui === "numInput" ? $ = Pe(v, c, p, m, V) : c.ui === "switch" ? $ = je(v, c, p, m, V) : c.ui === "select" ? $ = Ie(v, c, p, m, V) : c.ui === "colorPicker" ? $ = et(v, c, p, m, V) : c.ui === "jsonEditor" ? $ = tt(v, c, p, m, V) : c.ui === "multiTypes" ? $ = nt(v, c, p, m, V) : c.ui === "compSelect" ? $ = lt(v, c, p, m, V) : console.assert(!1, "renderLeafScalar not implemented"), $ ? M(v, c, $) : h("div");
|
|
1719
|
+
}, ut = () => h(
|
|
1697
1720
|
"div",
|
|
1698
1721
|
{
|
|
1699
1722
|
class: "text-body-2",
|
|
@@ -1702,7 +1725,7 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1702
1725
|
}
|
|
1703
1726
|
},
|
|
1704
1727
|
(() => {
|
|
1705
|
-
const
|
|
1728
|
+
const v = [];
|
|
1706
1729
|
if (n.unique && n.config.length > 0 && n.object) {
|
|
1707
1730
|
a[n.unique] || (a[n.unique] = {});
|
|
1708
1731
|
const c = a[n.unique];
|
|
@@ -1711,35 +1734,35 @@ const Mn = /* @__PURE__ */ R({
|
|
|
1711
1734
|
collapse: !0,
|
|
1712
1735
|
children: !p.ui && p.array ? [] : {}
|
|
1713
1736
|
});
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1737
|
+
const m = ye([], p, n.object, c[p.key]);
|
|
1738
|
+
v.push(m);
|
|
1716
1739
|
});
|
|
1717
1740
|
}
|
|
1718
|
-
return
|
|
1741
|
+
return v;
|
|
1719
1742
|
})()
|
|
1720
1743
|
);
|
|
1721
|
-
return (
|
|
1722
|
-
|
|
1723
|
-
|
|
1744
|
+
return (v, c) => (C(), E(Ve, null, [
|
|
1745
|
+
D(ut),
|
|
1746
|
+
D(Ht, {
|
|
1724
1747
|
config: n.config,
|
|
1725
1748
|
object: n.object,
|
|
1726
|
-
"prop-states":
|
|
1749
|
+
"prop-states": f.value
|
|
1727
1750
|
}, null, 8, ["config", "object", "prop-states"])
|
|
1728
1751
|
], 64));
|
|
1729
1752
|
}
|
|
1730
|
-
}),
|
|
1731
|
-
l.component("XPropTree",
|
|
1732
|
-
},
|
|
1753
|
+
}), Dn = (l) => {
|
|
1754
|
+
l.component("XPropTree", wn);
|
|
1755
|
+
}, bn = (l, s, t) => {
|
|
1733
1756
|
const e = l[s];
|
|
1734
1757
|
return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((n, o) => {
|
|
1735
1758
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + s + (s.split("/").length !== t ? ". Note that variables only represent file names one level deep." : ""))));
|
|
1736
1759
|
});
|
|
1737
1760
|
};
|
|
1738
|
-
async function
|
|
1739
|
-
return (await
|
|
1761
|
+
async function Jn(l) {
|
|
1762
|
+
return (await bn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.n11iysmh.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.hr18mfah.js") }), `./locales/${l}/index.ts`, 4)).default;
|
|
1740
1763
|
}
|
|
1741
|
-
const
|
|
1764
|
+
const Rn = { install: Dn };
|
|
1742
1765
|
export {
|
|
1743
|
-
|
|
1744
|
-
|
|
1766
|
+
Rn as default,
|
|
1767
|
+
Jn as loadLocaleMessagePropTree
|
|
1745
1768
|
};
|