x-prop-tree 0.7.21 → 0.7.22
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 +109 -110
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { provide as ae, inject as ce, defineComponent as E, ref as T, computed as L, resolveComponent as $, createBlock as B, openBlock as _, unref as P, isRef as re, withCtx as R, createVNode as b, createElementBlock as K, Fragment as fe, renderList as Te, createTextVNode as
|
|
1
|
+
import { provide as ae, inject as ce, defineComponent as E, ref as T, computed as L, resolveComponent as $, createBlock as B, openBlock as _, unref as P, isRef as re, withCtx as R, createVNode as b, createElementBlock as K, Fragment as fe, renderList as Te, createTextVNode as ke, toDisplayString as F, resolveDirective as ee, withDirectives as j, withModifiers as X, normalizeStyle as W, createElementVNode as q, createCommentVNode as G, mergeModels as Z, useModel as z, useId as $e, onUnmounted as we, mergeProps as Me, withKeys as Le, useTemplateRef as He, watch as oe, watchEffect as Ke, h as k, renderSlot as kt, onMounted as Xe, onBeforeUnmount as Fe, reactive as _t } from "vue";
|
|
2
2
|
import { useI18n as I } from "vue-i18n";
|
|
3
|
-
import { useViewStack as
|
|
3
|
+
import { useViewStack as _e, useColor as te, eventBus as de, useSystem as pe, injectDark as xt, injectLocale as St, openNumberDlg as ze, openPromptDlg as Vt, globalObjects as Ct } from "x-essential-lib";
|
|
4
4
|
import { getPropertyDefault as J, pkgs as Ne, parsePixelStr as Ut, parsePercentStr as $t, getPropertyTag as wt, elements as Mt, makeSlotId as Re } from "x-runtime-lib";
|
|
5
|
-
import { c as Ge, i as be, r as
|
|
5
|
+
import { c as Ge, i as be, r as ve, v as Ye, d as We } from "./vendor.f0ug048x.js";
|
|
6
6
|
import { useDisplay as Qe } from "vuetify";
|
|
7
7
|
import { XBlockly as bt } from "x-block-lib";
|
|
8
8
|
import { globalState as Ze } from "x-state-lib";
|
|
@@ -42,7 +42,7 @@ const Ee = (t) => !(t instanceof Array), Ae = (t) => t instanceof Array, Pt = (t
|
|
|
42
42
|
n = n.children.find((l) => l.key === e);
|
|
43
43
|
}
|
|
44
44
|
}), n;
|
|
45
|
-
},
|
|
45
|
+
}, he = (t, s) => {
|
|
46
46
|
let n = t;
|
|
47
47
|
return s.forEach((e) => {
|
|
48
48
|
if (!n) {
|
|
@@ -275,64 +275,63 @@ function it() {
|
|
|
275
275
|
const Yt = /* @__PURE__ */ E({
|
|
276
276
|
__name: "index",
|
|
277
277
|
setup(t) {
|
|
278
|
-
const { t: s } = I(), n = Kt(), e = Et(), l = Ht(), o = Ft(), i = T(0), u = T(0), r = T([]), a = L(() => [i.value, u.value]), d = (
|
|
278
|
+
const { t: s } = I(), n = Kt(), e = Et(), l = Ht(), o = Ft(), i = T(0), u = T(0), r = T([]), a = L(() => [i.value, u.value]), d = (S) => {
|
|
279
279
|
const D = () => !(r.value.length <= 0 || !me(l.value, r.value)), x = () => {
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
282
|
-
if (
|
|
283
|
-
const U =
|
|
280
|
+
const V = Ce(n.value, r.value);
|
|
281
|
+
if (V)
|
|
282
|
+
if (V.ui) {
|
|
283
|
+
const U = he(e.value, r.value.slice(0, -1));
|
|
284
284
|
if (!U)
|
|
285
285
|
return;
|
|
286
|
-
U[r.value[r.value.length - 1]] = J(
|
|
287
|
-
} else if (
|
|
286
|
+
U[r.value[r.value.length - 1]] = J(V), o(r.value, U[r.value[r.value.length - 1]]);
|
|
287
|
+
} else if (V.array) {
|
|
288
288
|
const U = r.value[r.value.length - 1];
|
|
289
289
|
if (U === void 0) {
|
|
290
290
|
console.assert(!1, "invalid last key");
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
if (typeof U == "string") {
|
|
294
|
-
const O =
|
|
294
|
+
const O = he(e.value, r.value.slice(0, -1));
|
|
295
295
|
if (!O)
|
|
296
296
|
return;
|
|
297
|
-
O[r.value[r.value.length - 1]] = J(
|
|
297
|
+
O[r.value[r.value.length - 1]] = J(V), o(r.value, O[r.value[r.value.length - 1]]);
|
|
298
298
|
} else {
|
|
299
|
-
const O =
|
|
299
|
+
const O = he(e.value, r.value);
|
|
300
300
|
if (!O)
|
|
301
301
|
return;
|
|
302
|
-
|
|
303
|
-
O[Q.key] = J(
|
|
302
|
+
V.children.forEach((Q) => {
|
|
303
|
+
O[Q.key] = J(V), o([...r.value, Q.key], O[Q.key]);
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
|
-
const U =
|
|
307
|
+
const U = he(e.value, r.value);
|
|
308
308
|
if (!U)
|
|
309
309
|
return;
|
|
310
|
-
|
|
311
|
-
U[O.key] = J(
|
|
310
|
+
V.children.forEach((O) => {
|
|
311
|
+
U[O.key] = J(V), o([...r.value, O.key], U[O.key]);
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
314
|
};
|
|
315
|
-
D() &&
|
|
315
|
+
D() && S.push({
|
|
316
316
|
title: s("x-prop-tree.reset"),
|
|
317
317
|
func: x
|
|
318
318
|
});
|
|
319
|
-
}, c = (
|
|
319
|
+
}, c = (S) => {
|
|
320
320
|
const D = () => {
|
|
321
|
-
const x = Ce(n.value, r.value),
|
|
322
|
-
localStorage.setItem("propTreeCopy", JSON.stringify({ property: x, object:
|
|
321
|
+
const x = Ce(n.value, r.value), V = he(e.value, r.value);
|
|
322
|
+
localStorage.setItem("propTreeCopy", JSON.stringify({ property: x, object: V }));
|
|
323
323
|
};
|
|
324
|
-
|
|
324
|
+
S.push({
|
|
325
325
|
title: s("x-prop-tree.copy"),
|
|
326
326
|
func: D
|
|
327
327
|
});
|
|
328
|
-
}, f = (
|
|
328
|
+
}, f = (S) => {
|
|
329
329
|
const D = () => {
|
|
330
|
-
const
|
|
331
|
-
if (!
|
|
330
|
+
const V = localStorage.getItem("propTreeCopy");
|
|
331
|
+
if (!V)
|
|
332
332
|
return !1;
|
|
333
|
-
console.log(S);
|
|
334
333
|
try {
|
|
335
|
-
const { property: U } = JSON.parse(
|
|
334
|
+
const { property: U } = JSON.parse(V);
|
|
336
335
|
if (!U)
|
|
337
336
|
return !1;
|
|
338
337
|
const O = Ce(n.value, r.value);
|
|
@@ -344,27 +343,27 @@ const Yt = /* @__PURE__ */ E({
|
|
|
344
343
|
}, x = () => {
|
|
345
344
|
if (!D())
|
|
346
345
|
return;
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
346
|
+
const V = localStorage.getItem("propTreeCopy");
|
|
347
|
+
if (V)
|
|
349
348
|
try {
|
|
350
|
-
const { object: U } = JSON.parse(
|
|
349
|
+
const { object: U } = JSON.parse(V), O = Ce(n.value, r.value);
|
|
351
350
|
console.log(U, O);
|
|
352
351
|
} catch (U) {
|
|
353
352
|
console.error(U);
|
|
354
353
|
}
|
|
355
354
|
};
|
|
356
|
-
D() &&
|
|
355
|
+
D() && S.push({
|
|
357
356
|
title: s("x-prop-tree.paste"),
|
|
358
357
|
func: x
|
|
359
358
|
});
|
|
360
359
|
}, v = L(() => {
|
|
361
|
-
const
|
|
362
|
-
return d(
|
|
363
|
-
}), C = (
|
|
364
|
-
i.value =
|
|
365
|
-
}, { open: h } =
|
|
366
|
-
return (
|
|
367
|
-
const x = $("v-list-item-title"),
|
|
360
|
+
const S = [];
|
|
361
|
+
return d(S), c(S), f(S), S;
|
|
362
|
+
}), C = (S) => {
|
|
363
|
+
i.value = S.x, u.value = S.y, r.value = S.keys;
|
|
364
|
+
}, { open: h } = _e("propTreeMenu", C);
|
|
365
|
+
return (S, D) => {
|
|
366
|
+
const x = $("v-list-item-title"), V = $("v-list-item"), U = $("v-list"), O = $("v-menu");
|
|
368
367
|
return _(), B(O, {
|
|
369
368
|
modelValue: P(h),
|
|
370
369
|
"onUpdate:modelValue": D[0] || (D[0] = (Q) => re(h) ? h.value = Q : null),
|
|
@@ -375,15 +374,15 @@ const Yt = /* @__PURE__ */ E({
|
|
|
375
374
|
default: R(() => [
|
|
376
375
|
b(U, null, {
|
|
377
376
|
default: R(() => [
|
|
378
|
-
(_(!0), K(fe, null, Te(v.value, (Q,
|
|
379
|
-
key:
|
|
377
|
+
(_(!0), K(fe, null, Te(v.value, (Q, ge) => (_(), B(V, {
|
|
378
|
+
key: ge,
|
|
380
379
|
link: "",
|
|
381
380
|
onClick: Q.func
|
|
382
381
|
}, {
|
|
383
382
|
default: R(() => [
|
|
384
383
|
b(x, null, {
|
|
385
384
|
default: R(() => [
|
|
386
|
-
|
|
385
|
+
ke(F(Q.title), 1)
|
|
387
386
|
]),
|
|
388
387
|
_: 2
|
|
389
388
|
}, 1024)
|
|
@@ -472,7 +471,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
472
471
|
return t.hasDelete && (r = "calc(100% - 37px)"), {
|
|
473
472
|
width: r
|
|
474
473
|
};
|
|
475
|
-
}), i = L(() => t.readonly), { open: u } =
|
|
474
|
+
}), i = L(() => t.readonly), { open: u } = _e(`propTreeColorPickerMenu${$e()}`);
|
|
476
475
|
return we(() => {
|
|
477
476
|
u.value = !1;
|
|
478
477
|
}), (r, a) => {
|
|
@@ -496,7 +495,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
496
495
|
disabled: i.value
|
|
497
496
|
}), {
|
|
498
497
|
default: R(() => [
|
|
499
|
-
|
|
498
|
+
ke(F(e.value ? e.value : P(n)("x-runtime-lib.notSet")), 1)
|
|
500
499
|
]),
|
|
501
500
|
_: 1
|
|
502
501
|
}, 16, ["color", "disabled"])
|
|
@@ -603,7 +602,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
603
602
|
emits: ["update:modelValue", "update:open"],
|
|
604
603
|
setup(t) {
|
|
605
604
|
const { t: s } = I(), n = z(t, "modelValue"), e = z(t, "open"), l = st(), o = (u) => {
|
|
606
|
-
const r =
|
|
605
|
+
const r = ve(l, u);
|
|
607
606
|
r && Ye(l, u, !r.collapse);
|
|
608
607
|
}, i = (u) => {
|
|
609
608
|
n.value = u, e.value = !1, de.emit("refreshDepends");
|
|
@@ -637,7 +636,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
637
636
|
},
|
|
638
637
|
emits: ["update:modelValue"],
|
|
639
638
|
setup(t) {
|
|
640
|
-
const { t: s } = I(), n = Qe(), { sysBarAvail: e } =
|
|
639
|
+
const { t: s } = I(), n = Qe(), { sysBarAvail: e } = pe(), { backgroundColor1: l } = te(), o = z(t, "modelValue"), i = st(), u = L(() => {
|
|
641
640
|
let f = "100%";
|
|
642
641
|
return n.mdAndUp.value && (f = "400px"), {
|
|
643
642
|
background: l.value,
|
|
@@ -655,13 +654,13 @@ const Yt = /* @__PURE__ */ E({
|
|
|
655
654
|
})), d = L(() => {
|
|
656
655
|
if (!o.value)
|
|
657
656
|
return s("x-runtime-lib.notSet");
|
|
658
|
-
const f =
|
|
657
|
+
const f = ve(i, o.value);
|
|
659
658
|
return f ? f.name : s("x-runtime-lib.compNotAvail");
|
|
660
|
-
}), { open: c } =
|
|
659
|
+
}), { open: c } = _e(`propTreeCompSelectDlg${$e()}`);
|
|
661
660
|
return we(() => {
|
|
662
661
|
c.value = !1;
|
|
663
662
|
}), (f, v) => {
|
|
664
|
-
const C = $("v-btn"), h = $("v-sheet"),
|
|
663
|
+
const C = $("v-btn"), h = $("v-sheet"), S = $("v-icon"), D = $("v-dialog");
|
|
665
664
|
return _(), B(D, {
|
|
666
665
|
modelValue: P(c),
|
|
667
666
|
"onUpdate:modelValue": v[5] || (v[5] = (x) => re(c) ? c.value = x : null),
|
|
@@ -677,7 +676,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
677
676
|
density: "comfortable"
|
|
678
677
|
}), {
|
|
679
678
|
default: R(() => [
|
|
680
|
-
|
|
679
|
+
ke(F(d.value), 1)
|
|
681
680
|
]),
|
|
682
681
|
_: 1
|
|
683
682
|
}, 16)
|
|
@@ -703,7 +702,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
703
702
|
height: 48
|
|
704
703
|
}, {
|
|
705
704
|
default: R(() => [
|
|
706
|
-
b(
|
|
705
|
+
b(S, {
|
|
707
706
|
icon: "mdi-close",
|
|
708
707
|
onClick: v[0] || (v[0] = (x) => c.value = !1)
|
|
709
708
|
}),
|
|
@@ -773,14 +772,14 @@ const Yt = /* @__PURE__ */ E({
|
|
|
773
772
|
},
|
|
774
773
|
emits: ["update:modelValue"],
|
|
775
774
|
setup(t) {
|
|
776
|
-
const { t: s } = I(), { sysBarAvail: n } =
|
|
775
|
+
const { t: s } = I(), { sysBarAvail: n } = pe(), { backgroundColor0: e, backgroundColor1: l, backgroundColor2: o } = te(), i = z(t, "modelValue"), u = T(!1), r = T(1), a = L(() => {
|
|
777
776
|
let v = 48;
|
|
778
777
|
return n.value && (v += 24), {
|
|
779
778
|
position: "relative",
|
|
780
779
|
background: l.value,
|
|
781
780
|
height: `calc(100% - ${v}px)`
|
|
782
781
|
};
|
|
783
|
-
}), d = L(() => s("x-prop-tree.dlg.jsonEditor.title")), { open: c } =
|
|
782
|
+
}), d = L(() => s("x-prop-tree.dlg.jsonEditor.title")), { open: c } = _e(`propTreejsonEditorDlg${$e()}`);
|
|
784
783
|
we(() => {
|
|
785
784
|
c.value = !1;
|
|
786
785
|
});
|
|
@@ -788,41 +787,41 @@ const Yt = /* @__PURE__ */ E({
|
|
|
788
787
|
return oe(c, (v) => {
|
|
789
788
|
v || f.value?.save();
|
|
790
789
|
}), (v, C) => {
|
|
791
|
-
const h = $("v-btn"),
|
|
790
|
+
const h = $("v-btn"), S = $("v-sheet"), D = $("v-spacer"), x = $("v-dialog");
|
|
792
791
|
return _(), B(x, {
|
|
793
792
|
modelValue: P(c),
|
|
794
|
-
"onUpdate:modelValue": C[4] || (C[4] = (
|
|
793
|
+
"onUpdate:modelValue": C[4] || (C[4] = (V) => re(c) ? c.value = V : null),
|
|
795
794
|
attach: "",
|
|
796
795
|
fullscreen: "",
|
|
797
796
|
"no-click-animation": "",
|
|
798
797
|
persistent: "",
|
|
799
798
|
transition: "dialog-bottom-transition",
|
|
800
|
-
onKeydown: C[5] || (C[5] = Le(X((
|
|
799
|
+
onKeydown: C[5] || (C[5] = Le(X((V) => c.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
801
800
|
}, {
|
|
802
|
-
activator: R(({ props:
|
|
803
|
-
b(h, Me(
|
|
801
|
+
activator: R(({ props: V }) => [
|
|
802
|
+
b(h, Me(V, {
|
|
804
803
|
block: "",
|
|
805
804
|
density: "comfortable"
|
|
806
805
|
}), {
|
|
807
806
|
default: R(() => [
|
|
808
|
-
|
|
807
|
+
ke(F(d.value), 1)
|
|
809
808
|
]),
|
|
810
809
|
_: 1
|
|
811
810
|
}, 16)
|
|
812
811
|
]),
|
|
813
812
|
default: R(() => [
|
|
814
|
-
b(
|
|
813
|
+
b(S, {
|
|
815
814
|
color: P(e),
|
|
816
815
|
height: "100%",
|
|
817
816
|
width: "100%"
|
|
818
817
|
}, {
|
|
819
818
|
default: R(() => [
|
|
820
|
-
P(n) ? (_(), B(
|
|
819
|
+
P(n) ? (_(), B(S, {
|
|
821
820
|
key: 0,
|
|
822
821
|
color: P(o),
|
|
823
822
|
height: 24
|
|
824
823
|
}, null, 8, ["color"])) : G("", !0),
|
|
825
|
-
b(
|
|
824
|
+
b(S, {
|
|
826
825
|
class: "d-flex align-center px-2",
|
|
827
826
|
color: P(o),
|
|
828
827
|
height: 48
|
|
@@ -832,7 +831,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
832
831
|
density: "comfortable",
|
|
833
832
|
icon: "mdi-close",
|
|
834
833
|
variant: "text",
|
|
835
|
-
onClick: C[0] || (C[0] = (
|
|
834
|
+
onClick: C[0] || (C[0] = (V) => c.value = !1)
|
|
836
835
|
}),
|
|
837
836
|
q("span", cn, F(P(s)("x-prop-tree.dlg.jsonEditor.title")), 1),
|
|
838
837
|
b(D)
|
|
@@ -846,11 +845,11 @@ const Yt = /* @__PURE__ */ E({
|
|
|
846
845
|
ref_key: "editor",
|
|
847
846
|
ref: f,
|
|
848
847
|
modelValue: i.value,
|
|
849
|
-
"onUpdate:modelValue": C[1] || (C[1] = (
|
|
848
|
+
"onUpdate:modelValue": C[1] || (C[1] = (V) => i.value = V),
|
|
850
849
|
lock: u.value,
|
|
851
|
-
"onUpdate:lock": C[2] || (C[2] = (
|
|
850
|
+
"onUpdate:lock": C[2] || (C[2] = (V) => u.value = V),
|
|
852
851
|
scale: r.value,
|
|
853
|
-
"onUpdate:scale": C[3] || (C[3] = (
|
|
852
|
+
"onUpdate:scale": C[3] || (C[3] = (V) => r.value = V)
|
|
854
853
|
}, null, 8, ["modelValue", "lock", "scale"])
|
|
855
854
|
], 4)
|
|
856
855
|
]),
|
|
@@ -872,12 +871,12 @@ const Yt = /* @__PURE__ */ E({
|
|
|
872
871
|
}),
|
|
873
872
|
emits: /* @__PURE__ */ Z(["delete"], ["update:modelValue"]),
|
|
874
873
|
setup(t, { emit: s }) {
|
|
875
|
-
const { t: n } = I(), { isMobile: e } =
|
|
874
|
+
const { t: n } = I(), { isMobile: e } = pe(), l = z(t, "modelValue"), o = s, i = Oe(), u = L(() => Ne[i.value]?.types[t.types]), r = T(0), a = L(() => {
|
|
876
875
|
const C = [];
|
|
877
|
-
return u.value?.forEach(({ title: h },
|
|
876
|
+
return u.value?.forEach(({ title: h }, S) => {
|
|
878
877
|
C.push({
|
|
879
878
|
title: n(h),
|
|
880
|
-
value:
|
|
879
|
+
value: S
|
|
881
880
|
});
|
|
882
881
|
}), C;
|
|
883
882
|
});
|
|
@@ -904,10 +903,10 @@ const Yt = /* @__PURE__ */ E({
|
|
|
904
903
|
}), oe(f, (C) => {
|
|
905
904
|
d.value?.ui === "pixelInput" ? l.value = C + "px" : d.value?.ui === "percentInput" && (l.value = C + "%");
|
|
906
905
|
}), (C, h) => {
|
|
907
|
-
const
|
|
906
|
+
const S = $("v-select"), D = $("v-number-input"), x = $("v-btn"), V = ee("ripple");
|
|
908
907
|
return _(), K("div", mn, [
|
|
909
908
|
q("div", fn, [
|
|
910
|
-
j(b(
|
|
909
|
+
j(b(S, {
|
|
911
910
|
modelValue: r.value,
|
|
912
911
|
"onUpdate:modelValue": [
|
|
913
912
|
h[0] || (h[0] = (U) => r.value = U),
|
|
@@ -919,7 +918,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
919
918
|
"single-line": ""
|
|
920
919
|
}, null, 8, ["modelValue", "items"]), [
|
|
921
920
|
[
|
|
922
|
-
|
|
921
|
+
V,
|
|
923
922
|
void 0,
|
|
924
923
|
void 0,
|
|
925
924
|
{ stop: !0 }
|
|
@@ -940,7 +939,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
940
939
|
"onUpdate:focused": v
|
|
941
940
|
}, null, 8, ["modelValue", "max", "min", "precision", "step"])), [
|
|
942
941
|
[
|
|
943
|
-
|
|
942
|
+
V,
|
|
944
943
|
void 0,
|
|
945
944
|
void 0,
|
|
946
945
|
{ stop: !0 }
|
|
@@ -974,7 +973,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
974
973
|
}),
|
|
975
974
|
emits: /* @__PURE__ */ Z(["delete"], ["update:modelValue"]),
|
|
976
975
|
setup(t, { emit: s }) {
|
|
977
|
-
const { isMobile: n } =
|
|
976
|
+
const { isMobile: n } = pe(), e = z(t, "modelValue"), l = s, o = async (i) => {
|
|
978
977
|
if (!i || t.readonly || !n())
|
|
979
978
|
return;
|
|
980
979
|
const u = await ze({
|
|
@@ -1149,7 +1148,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
1149
1148
|
emits: ["update:modelValue", "update:open"],
|
|
1150
1149
|
setup(t) {
|
|
1151
1150
|
const { t: s } = I(), n = z(t, "modelValue"), e = z(t, "open"), l = it(), o = (u) => {
|
|
1152
|
-
const r =
|
|
1151
|
+
const r = ve(l, u);
|
|
1153
1152
|
r && Ye(l, u, !r.collapse);
|
|
1154
1153
|
}, i = (u) => {
|
|
1155
1154
|
n.value = u, e.value = !1;
|
|
@@ -1183,7 +1182,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
1183
1182
|
},
|
|
1184
1183
|
emits: ["update:modelValue"],
|
|
1185
1184
|
setup(t) {
|
|
1186
|
-
const { t: s } = I(), n = Qe(), { sysBarAvail: e } =
|
|
1185
|
+
const { t: s } = I(), n = Qe(), { sysBarAvail: e } = pe(), { backgroundColor1: l } = te(), o = z(t, "modelValue"), i = it(), u = L(() => {
|
|
1187
1186
|
let f = "100%";
|
|
1188
1187
|
return n.mdAndUp.value && (f = "400px"), {
|
|
1189
1188
|
background: l.value,
|
|
@@ -1201,13 +1200,13 @@ const Yt = /* @__PURE__ */ E({
|
|
|
1201
1200
|
})), d = L(() => {
|
|
1202
1201
|
if (!o.value)
|
|
1203
1202
|
return s("x-runtime-lib.notSet");
|
|
1204
|
-
const f =
|
|
1203
|
+
const f = ve(i, o.value);
|
|
1205
1204
|
return f ? f.name : s("x-runtime-lib.slotNotAvail");
|
|
1206
|
-
}), { open: c } =
|
|
1205
|
+
}), { open: c } = _e(`propTreeSlotSelectDlg${$e()}`);
|
|
1207
1206
|
return we(() => {
|
|
1208
1207
|
c.value = !1;
|
|
1209
1208
|
}), (f, v) => {
|
|
1210
|
-
const C = $("v-btn"), h = $("v-sheet"),
|
|
1209
|
+
const C = $("v-btn"), h = $("v-sheet"), S = $("v-icon"), D = $("v-dialog");
|
|
1211
1210
|
return _(), B(D, {
|
|
1212
1211
|
modelValue: P(c),
|
|
1213
1212
|
"onUpdate:modelValue": v[5] || (v[5] = (x) => re(c) ? c.value = x : null),
|
|
@@ -1223,7 +1222,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
1223
1222
|
density: "comfortable"
|
|
1224
1223
|
}), {
|
|
1225
1224
|
default: R(() => [
|
|
1226
|
-
|
|
1225
|
+
ke(F(d.value), 1)
|
|
1227
1226
|
]),
|
|
1228
1227
|
_: 1
|
|
1229
1228
|
}, 16)
|
|
@@ -1249,7 +1248,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
1249
1248
|
height: 48
|
|
1250
1249
|
}, {
|
|
1251
1250
|
default: R(() => [
|
|
1252
|
-
b(
|
|
1251
|
+
b(S, {
|
|
1253
1252
|
icon: "mdi-close",
|
|
1254
1253
|
onClick: v[0] || (v[0] = (x) => c.value = !1)
|
|
1255
1254
|
}),
|
|
@@ -1289,7 +1288,7 @@ const Yt = /* @__PURE__ */ E({
|
|
|
1289
1288
|
}),
|
|
1290
1289
|
emits: /* @__PURE__ */ Z(["delete"], ["update:modelValue"]),
|
|
1291
1290
|
setup(t, { emit: s }) {
|
|
1292
|
-
const { isMobile: n } =
|
|
1291
|
+
const { isMobile: n } = pe(), e = z(t, "modelValue"), l = s, o = async (i) => {
|
|
1293
1292
|
if (!i || t.readonly || !n())
|
|
1294
1293
|
return;
|
|
1295
1294
|
const u = await Vt({
|
|
@@ -1716,52 +1715,52 @@ function zn(t, s, n) {
|
|
|
1716
1715
|
}
|
|
1717
1716
|
const d = wt(s.value, n.value), c = [];
|
|
1718
1717
|
for (let h = 0; h < a.groups[d].length; h++) {
|
|
1719
|
-
const
|
|
1718
|
+
const S = a.groups[d][h], D = ve(l, S.key);
|
|
1720
1719
|
c.push({
|
|
1721
|
-
id:
|
|
1720
|
+
id: S.key,
|
|
1722
1721
|
type: 0,
|
|
1723
|
-
name: e.global.t(
|
|
1722
|
+
name: e.global.t(S.name),
|
|
1724
1723
|
position: h,
|
|
1725
1724
|
collapse: D?.collapse ?? !0,
|
|
1726
1725
|
count: 0
|
|
1727
1726
|
});
|
|
1728
1727
|
let x = 0;
|
|
1729
|
-
for (const
|
|
1730
|
-
const U = Mt[
|
|
1728
|
+
for (const V of S.items) {
|
|
1729
|
+
const U = Mt[V];
|
|
1731
1730
|
if (U && !U.internal && U.slots)
|
|
1732
1731
|
for (const O of U.slots) {
|
|
1733
|
-
const Q = Re("elementSlot", U.key, O.key),
|
|
1732
|
+
const Q = Re("elementSlot", U.key, O.key), ge = `${e.global.t(U.name)} / ${e.global.t(O.name)}`;
|
|
1734
1733
|
c.push({
|
|
1735
1734
|
id: Q,
|
|
1736
1735
|
type: 1,
|
|
1737
|
-
name:
|
|
1736
|
+
name: ge,
|
|
1738
1737
|
position: x++,
|
|
1739
|
-
group:
|
|
1738
|
+
group: S.key
|
|
1740
1739
|
});
|
|
1741
1740
|
}
|
|
1742
1741
|
}
|
|
1743
1742
|
}
|
|
1744
1743
|
const { activeApp: f, depends: v } = Ze.app;
|
|
1745
|
-
for (const { id: h, name:
|
|
1746
|
-
const x = l
|
|
1744
|
+
for (const { id: h, name: S, position: D } of f.compGroups) {
|
|
1745
|
+
const x = ve(l, h);
|
|
1747
1746
|
c.push({
|
|
1748
1747
|
id: h,
|
|
1749
1748
|
type: 0,
|
|
1750
|
-
name:
|
|
1749
|
+
name: S,
|
|
1751
1750
|
position: D,
|
|
1752
1751
|
collapse: x?.collapse ?? !0
|
|
1753
1752
|
});
|
|
1754
1753
|
}
|
|
1755
1754
|
let C = 0;
|
|
1756
1755
|
for (const h of f.comps) {
|
|
1757
|
-
const
|
|
1758
|
-
if (
|
|
1759
|
-
for (const D of
|
|
1760
|
-
const x = Re("customSlot", h.id, D.id),
|
|
1756
|
+
const S = v[h.id];
|
|
1757
|
+
if (S && S.meta.slots)
|
|
1758
|
+
for (const D of S.meta.slots) {
|
|
1759
|
+
const x = Re("customSlot", h.id, D.id), V = `${h.name} / ${D.name}`;
|
|
1761
1760
|
c.push({
|
|
1762
1761
|
id: x,
|
|
1763
1762
|
type: 1,
|
|
1764
|
-
name:
|
|
1763
|
+
name: V,
|
|
1765
1764
|
position: C++,
|
|
1766
1765
|
group: h.groupId
|
|
1767
1766
|
});
|
|
@@ -1842,18 +1841,18 @@ const Gn = /* @__PURE__ */ E({
|
|
|
1842
1841
|
h.value = l.config;
|
|
1843
1842
|
}
|
|
1844
1843
|
);
|
|
1845
|
-
const
|
|
1846
|
-
Rt(
|
|
1844
|
+
const S = T(l.object);
|
|
1845
|
+
Rt(S), oe(
|
|
1847
1846
|
() => l.object,
|
|
1848
1847
|
() => {
|
|
1849
|
-
|
|
1848
|
+
S.value = l.object;
|
|
1850
1849
|
}
|
|
1851
1850
|
), Jt(d), Xt(c), Fn(), zn(f, v, C);
|
|
1852
1851
|
const { renderProperty: D } = Rn(
|
|
1853
1852
|
d,
|
|
1854
1853
|
u,
|
|
1855
1854
|
r
|
|
1856
|
-
), { renderUiDummy: x } = Nn(c), { renderUiStrInput:
|
|
1855
|
+
), { renderUiDummy: x } = Nn(c), { renderUiStrInput: V } = Hn(c), { renderUiNumInput: U } = qn(c), { renderUiSwitch: O } = Xn(c), { renderUiSelect: Q } = En(c), { renderUiColorPicker: ge } = Tn(c), { renderUiJsonEditor: ut } = Bn(c), { renderUiMultiTypes: rt } = On(c), { renderUiCompSelect: at } = Ln(c), { renderUiSlotSelect: ct } = Jn(c), xe = (p, m, y, g, w, A) => (p = Ge(p), w !== void 0 ? (p.push(w), A && p.push(m.key)) : p.push(m.key), m.ui ? m.array && g ? ft(
|
|
1857
1856
|
p,
|
|
1858
1857
|
m,
|
|
1859
1858
|
y,
|
|
@@ -1885,7 +1884,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
1885
1884
|
w !== void 0 && !A ? (y[w] instanceof Array || (y[w] = J(m), c(p, y[m.key])), H = y[w]) : (y[m.key] instanceof Array || (y[m.key] = J(m), c(p, y[m.key])), H = y[m.key]);
|
|
1886
1885
|
let ie = n(m.name);
|
|
1887
1886
|
g.collapse && me(d.value, p) && (ie += " *");
|
|
1888
|
-
const
|
|
1887
|
+
const ye = k(Ue, {
|
|
1889
1888
|
title: ie,
|
|
1890
1889
|
collapse: g.collapse,
|
|
1891
1890
|
hasCreate: !0,
|
|
@@ -1987,7 +1986,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
1987
1986
|
},
|
|
1988
1987
|
(() => {
|
|
1989
1988
|
const M = [];
|
|
1990
|
-
return M.push(
|
|
1989
|
+
return M.push(ye), g.collapse || M.push(Y), M;
|
|
1991
1990
|
})()
|
|
1992
1991
|
);
|
|
1993
1992
|
}, mt = (p, m, y, g, w, A) => {
|
|
@@ -2012,7 +2011,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2012
2011
|
onDelete: () => {
|
|
2013
2012
|
w === void 0 || A || (y.splice(w, 1), c(p.slice(0, -1), y));
|
|
2014
2013
|
}
|
|
2015
|
-
}),
|
|
2014
|
+
}), ye = k(
|
|
2016
2015
|
"div",
|
|
2017
2016
|
{
|
|
2018
2017
|
style: {
|
|
@@ -2049,7 +2048,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2049
2048
|
},
|
|
2050
2049
|
(() => {
|
|
2051
2050
|
const Y = [];
|
|
2052
|
-
return Y.push(ie), g.collapse || Y.push(
|
|
2051
|
+
return Y.push(ie), g.collapse || Y.push(ye), Y;
|
|
2053
2052
|
})()
|
|
2054
2053
|
);
|
|
2055
2054
|
}, ft = (p, m, y, g, w, A) => {
|
|
@@ -2063,7 +2062,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2063
2062
|
w !== void 0 && !A ? (y[w] instanceof Array || (y[w] = J(m), c(p, y[w])), H = y[w]) : (y[m.key] instanceof Array || (y[m.key] = J(m), c(p, y[m.key])), H = y[m.key]);
|
|
2064
2063
|
let ie = n(m.name);
|
|
2065
2064
|
g.collapse && me(d.value, p) && (ie += " *");
|
|
2066
|
-
const
|
|
2065
|
+
const ye = k(Ue, {
|
|
2067
2066
|
title: ie,
|
|
2068
2067
|
collapse: g.collapse,
|
|
2069
2068
|
hasCreate: !0,
|
|
@@ -2101,14 +2100,14 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2101
2100
|
},
|
|
2102
2101
|
(() => {
|
|
2103
2102
|
const M = [];
|
|
2104
|
-
return M.push(
|
|
2103
|
+
return M.push(ye), g.collapse || M.push(Y), M;
|
|
2105
2104
|
})()
|
|
2106
2105
|
);
|
|
2107
2106
|
}, vt = (p, m, y, g, w) => {
|
|
2108
2107
|
if (!m.ui)
|
|
2109
2108
|
return console.assert(!1), k("div", "renderLeafScalar property ui must be valid");
|
|
2110
2109
|
let A;
|
|
2111
|
-
return m.ui === "dummy" ? A = x(p, m, y, g, w) : m.ui === "strInput" ? A =
|
|
2110
|
+
return m.ui === "dummy" ? A = x(p, m, y, g, w) : m.ui === "strInput" ? A = V(p, m, y, g, w) : m.ui === "numInput" ? A = U(p, m, y, g, w) : m.ui === "switch" ? A = O(p, m, y, g, w) : m.ui === "select" ? A = Q(p, m, y, g, w) : m.ui === "colorPicker" ? A = ge(p, m, y, g, w) : m.ui === "jsonEditor" ? A = ut(p, m, y, g, w) : m.ui === "multiTypes" ? A = rt(p, m, y, g, w) : m.ui === "compSelect" ? A = at(p, m, y, g, w) : m.ui === "slotSelect" ? A = ct(p, m, y, g, w) : console.assert(!1, "renderLeafScalar not implemented"), A ? D(p, m, A) : k("div");
|
|
2112
2111
|
}, pt = () => k(
|
|
2113
2112
|
"div",
|
|
2114
2113
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-prop-tree",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.22",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"vue": "^3.5.23",
|
|
27
27
|
"vue-i18n": "^11.1.12",
|
|
28
28
|
"vuetify": "^3.10.9",
|
|
29
|
-
"x-block-lib": "^0.8.
|
|
30
|
-
"x-essential-lib": "^0.9.
|
|
29
|
+
"x-block-lib": "^0.8.51",
|
|
30
|
+
"x-essential-lib": "^0.9.13",
|
|
31
31
|
"x-group-list": "^0.4.7",
|
|
32
32
|
"x-runtime-lib": "^0.8.97",
|
|
33
|
-
"x-state-lib": "^0.3.
|
|
33
|
+
"x-state-lib": "^0.3.28"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@eslint/js": "^9.39.1",
|