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