x-prop-tree 0.6.24 → 0.6.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/propTree/components/values/{jsonObject → jsonEditor}/editor.vue.d.ts +4 -4
- package/dist/components/propTree/components/values/{jsonObject → jsonEditor}/index.vue.d.ts +3 -3
- package/dist/components/propTree/composables/{uiJsonObject.d.ts → uiJsonEditor.d.ts} +2 -2
- package/dist/index.js +74 -73
- package/package.json +3 -3
package/dist/components/propTree/components/values/{jsonObject → jsonEditor}/editor.vue.d.ts
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
type __VLS_PublicProps = {
|
|
2
|
-
modelValue:
|
|
2
|
+
modelValue: string;
|
|
3
3
|
'lock': boolean;
|
|
4
4
|
'scale': number;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
7
|
-
|
|
7
|
+
save: () => void;
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
-
"update:modelValue": (value:
|
|
9
|
+
"update:modelValue": (value: string) => any;
|
|
10
10
|
"update:lock": (value: boolean) => any;
|
|
11
11
|
"update:scale": (value: number) => any;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
-
"onUpdate:modelValue"?: ((value:
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
14
|
"onUpdate:lock"?: ((value: boolean) => any) | undefined;
|
|
15
15
|
"onUpdate:scale"?: ((value: number) => any) | undefined;
|
|
16
16
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
type __VLS_PublicProps = {
|
|
2
|
-
modelValue:
|
|
2
|
+
modelValue: string;
|
|
3
3
|
};
|
|
4
4
|
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
-
"update:modelValue": (value:
|
|
5
|
+
"update:modelValue": (value: string) => any;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
7
|
-
"onUpdate:modelValue"?: ((value:
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8
8
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZProp } from 'x-runtime-lib';
|
|
2
2
|
import { ChangeEvent } from '../common';
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
3
|
+
export declare function useUiJsonEditor(changeEvent: ChangeEvent): {
|
|
4
|
+
renderUiJsonEditor: (keys: (string | number)[], prop: ZProp, object: any, arrayIndex?: number, isBranch?: boolean) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}>;
|
|
7
7
|
};
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ function rr(e) {
|
|
|
21
21
|
return nr.call(e);
|
|
22
22
|
}
|
|
23
23
|
var or = "[object Null]", lr = "[object Undefined]", bt = ue ? ue.toStringTag : void 0;
|
|
24
|
-
function
|
|
24
|
+
function De(e) {
|
|
25
25
|
return e == null ? e === void 0 ? lr : or : bt && bt in Object(e) ? er(e) : rr(e);
|
|
26
26
|
}
|
|
27
27
|
function pe(e) {
|
|
@@ -36,7 +36,7 @@ var ir = "[object AsyncFunction]", sr = "[object Function]", ar = "[object Gener
|
|
|
36
36
|
function Qt(e) {
|
|
37
37
|
if (!Ie(e))
|
|
38
38
|
return !1;
|
|
39
|
-
var t =
|
|
39
|
+
var t = De(e);
|
|
40
40
|
return t == sr || t == ar || t == ir || t == ur;
|
|
41
41
|
}
|
|
42
42
|
var tt = ee["__core-js_shared__"], $t = function() {
|
|
@@ -133,14 +133,14 @@ function tn(e) {
|
|
|
133
133
|
var t = e && e.constructor, n = typeof t == "function" && t.prototype || Lr;
|
|
134
134
|
return e === n;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Dr(e, t) {
|
|
137
137
|
for (var n = -1, r = Array(e); ++n < e; )
|
|
138
138
|
r[n] = t(n);
|
|
139
139
|
return r;
|
|
140
140
|
}
|
|
141
|
-
var
|
|
141
|
+
var jr = "[object Arguments]";
|
|
142
142
|
function wt(e) {
|
|
143
|
-
return pe(e) &&
|
|
143
|
+
return pe(e) && De(e) == jr;
|
|
144
144
|
}
|
|
145
145
|
var nn = Object.prototype, kr = nn.hasOwnProperty, Er = nn.propertyIsEnumerable, Nr = wt(/* @__PURE__ */ function() {
|
|
146
146
|
return arguments;
|
|
@@ -154,7 +154,7 @@ var rn = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
|
154
154
|
L[ro] = L[oo] = L[lo] = L[io] = L[so] = L[ao] = L[uo] = L[co] = L[fo] = !0;
|
|
155
155
|
L[Hr] = L[Gr] = L[to] = L[Kr] = L[no] = L[qr] = L[zr] = L[Jr] = L[Ir] = L[Xr] = L[Zr] = L[Wr] = L[Yr] = L[Qr] = L[eo] = !1;
|
|
156
156
|
function po(e) {
|
|
157
|
-
return pe(e) && en(e.length) && !!L[
|
|
157
|
+
return pe(e) && en(e.length) && !!L[De(e)];
|
|
158
158
|
}
|
|
159
159
|
function vt(e) {
|
|
160
160
|
return function(t) {
|
|
@@ -169,7 +169,7 @@ var on = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
|
169
169
|
}
|
|
170
170
|
}(), Pt = Se && Se.isTypedArray, ln = Pt ? vt(Pt) : po, mo = Object.prototype, go = mo.hasOwnProperty;
|
|
171
171
|
function yo(e, t) {
|
|
172
|
-
var n = Ue(e), r = !n && Nr(e), l = !n && !r && Ge(e), o = !n && !r && !l && ln(e), i = n || r || l || o, a = i ?
|
|
172
|
+
var n = Ue(e), r = !n && Nr(e), l = !n && !r && Ge(e), o = !n && !r && !l && ln(e), i = n || r || l || o, a = i ? Dr(e.length, String) : [], u = a.length;
|
|
173
173
|
for (var s in e)
|
|
174
174
|
go.call(e, s) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
175
175
|
(s == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -234,7 +234,7 @@ ve.prototype.delete = wo;
|
|
|
234
234
|
ve.prototype.get = xo;
|
|
235
235
|
ve.prototype.has = Uo;
|
|
236
236
|
ve.prototype.set = Lo;
|
|
237
|
-
function
|
|
237
|
+
function Do() {
|
|
238
238
|
this.__data__ = [], this.size = 0;
|
|
239
239
|
}
|
|
240
240
|
function Xe(e, t) {
|
|
@@ -243,7 +243,7 @@ function Xe(e, t) {
|
|
|
243
243
|
return n;
|
|
244
244
|
return -1;
|
|
245
245
|
}
|
|
246
|
-
var
|
|
246
|
+
var jo = Array.prototype, ko = jo.splice;
|
|
247
247
|
function Eo(e) {
|
|
248
248
|
var t = this.__data__, n = Xe(t, e);
|
|
249
249
|
if (n < 0)
|
|
@@ -269,7 +269,7 @@ function se(e) {
|
|
|
269
269
|
this.set(r[0], r[1]);
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
se.prototype.clear =
|
|
272
|
+
se.prototype.clear = Do;
|
|
273
273
|
se.prototype.delete = Eo;
|
|
274
274
|
se.prototype.get = No;
|
|
275
275
|
se.prototype.has = Ro;
|
|
@@ -382,13 +382,13 @@ function al(e, t, n) {
|
|
|
382
382
|
function it(e) {
|
|
383
383
|
return al(e, To, sl);
|
|
384
384
|
}
|
|
385
|
-
var st = ye(ee, "DataView"), at = ye(ee, "Promise"), ut = ye(ee, "Set"), Ut = "[object Map]", ul = "[object Object]", Mt = "[object Promise]", Lt = "[object Set]",
|
|
386
|
-
(st && W(new st(new ArrayBuffer(1))) !=
|
|
387
|
-
var t =
|
|
385
|
+
var st = ye(ee, "DataView"), at = ye(ee, "Promise"), ut = ye(ee, "Set"), Ut = "[object Map]", ul = "[object Object]", Mt = "[object Promise]", Lt = "[object Set]", Dt = "[object WeakMap]", jt = "[object DataView]", cl = ge(st), fl = ge(Le), dl = ge(at), pl = ge(ut), vl = ge(lt), W = De;
|
|
386
|
+
(st && W(new st(new ArrayBuffer(1))) != jt || Le && W(new Le()) != Ut || at && W(at.resolve()) != Mt || ut && W(new ut()) != Lt || lt && W(new lt()) != Dt) && (W = function(e) {
|
|
387
|
+
var t = De(e), n = t == ul ? e.constructor : void 0, r = n ? ge(n) : "";
|
|
388
388
|
if (r)
|
|
389
389
|
switch (r) {
|
|
390
390
|
case cl:
|
|
391
|
-
return
|
|
391
|
+
return jt;
|
|
392
392
|
case fl:
|
|
393
393
|
return Ut;
|
|
394
394
|
case dl:
|
|
@@ -396,7 +396,7 @@ var st = ye(ee, "DataView"), at = ye(ee, "Promise"), ut = ye(ee, "Set"), Ut = "[
|
|
|
396
396
|
case pl:
|
|
397
397
|
return Lt;
|
|
398
398
|
case vl:
|
|
399
|
-
return
|
|
399
|
+
return Dt;
|
|
400
400
|
}
|
|
401
401
|
return t;
|
|
402
402
|
});
|
|
@@ -427,7 +427,7 @@ function Tl(e, t) {
|
|
|
427
427
|
var n = mt(e.buffer);
|
|
428
428
|
return new e.constructor(n, e.byteOffset, e.length);
|
|
429
429
|
}
|
|
430
|
-
var Sl = "[object Boolean]", wl = "[object Date]", Al = "[object Map]", Cl = "[object Number]", Pl = "[object RegExp]", xl = "[object Set]", Ol = "[object String]", Vl = "[object Symbol]", Ul = "[object ArrayBuffer]", Ml = "[object DataView]", Ll = "[object Float32Array]",
|
|
430
|
+
var Sl = "[object Boolean]", wl = "[object Date]", Al = "[object Map]", Cl = "[object Number]", Pl = "[object RegExp]", xl = "[object Set]", Ol = "[object String]", Vl = "[object Symbol]", Ul = "[object ArrayBuffer]", Ml = "[object DataView]", Ll = "[object Float32Array]", Dl = "[object Float64Array]", jl = "[object Int8Array]", kl = "[object Int16Array]", El = "[object Int32Array]", Nl = "[object Uint8Array]", Rl = "[object Uint8ClampedArray]", Bl = "[object Uint16Array]", Fl = "[object Uint32Array]";
|
|
431
431
|
function Hl(e, t, n) {
|
|
432
432
|
var r = e.constructor;
|
|
433
433
|
switch (t) {
|
|
@@ -439,8 +439,8 @@ function Hl(e, t, n) {
|
|
|
439
439
|
case Ml:
|
|
440
440
|
return hl(e);
|
|
441
441
|
case Ll:
|
|
442
|
-
case jl:
|
|
443
442
|
case Dl:
|
|
443
|
+
case jl:
|
|
444
444
|
case kl:
|
|
445
445
|
case El:
|
|
446
446
|
case Nl:
|
|
@@ -583,7 +583,7 @@ function Oi(e) {
|
|
|
583
583
|
n[++t] = r;
|
|
584
584
|
}), n;
|
|
585
585
|
}
|
|
586
|
-
var Vi = 1, Ui = 2, Mi = "[object Boolean]", Li = "[object Date]",
|
|
586
|
+
var Vi = 1, Ui = 2, Mi = "[object Boolean]", Li = "[object Date]", Di = "[object Error]", ji = "[object Map]", ki = "[object Number]", Ei = "[object RegExp]", Ni = "[object Set]", Ri = "[object String]", Bi = "[object Symbol]", Fi = "[object ArrayBuffer]", Hi = "[object DataView]", Bt = ue ? ue.prototype : void 0, rt = Bt ? Bt.valueOf : void 0;
|
|
587
587
|
function Gi(e, t, n, r, l, o, i) {
|
|
588
588
|
switch (n) {
|
|
589
589
|
case Hi:
|
|
@@ -596,12 +596,12 @@ function Gi(e, t, n, r, l, o, i) {
|
|
|
596
596
|
case Li:
|
|
597
597
|
case ki:
|
|
598
598
|
return pt(+e, +t);
|
|
599
|
-
case
|
|
599
|
+
case Di:
|
|
600
600
|
return e.name == t.name && e.message == t.message;
|
|
601
601
|
case Ei:
|
|
602
602
|
case Ri:
|
|
603
603
|
return e == t + "";
|
|
604
|
-
case
|
|
604
|
+
case ji:
|
|
605
605
|
var a = xi;
|
|
606
606
|
case Ni:
|
|
607
607
|
var u = r & Vi;
|
|
@@ -646,8 +646,8 @@ function Ji(e, t, n, r, l, o) {
|
|
|
646
646
|
S || (S = f == "constructor");
|
|
647
647
|
}
|
|
648
648
|
if (C && !S) {
|
|
649
|
-
var P = e.constructor,
|
|
650
|
-
P !=
|
|
649
|
+
var P = e.constructor, D = t.constructor;
|
|
650
|
+
P != D && "constructor" in e && "constructor" in t && !(typeof P == "function" && P instanceof P && typeof D == "function" && D instanceof D) && (C = !1);
|
|
651
651
|
}
|
|
652
652
|
return o.delete(e), o.delete(t), C;
|
|
653
653
|
}
|
|
@@ -929,24 +929,24 @@ const gs = /* @__PURE__ */ G({
|
|
|
929
929
|
return;
|
|
930
930
|
}
|
|
931
931
|
if (typeof P == "string") {
|
|
932
|
-
const
|
|
933
|
-
if (!
|
|
932
|
+
const D = xe(r.value, u.value.slice(0, -1));
|
|
933
|
+
if (!D)
|
|
934
934
|
return;
|
|
935
|
-
|
|
935
|
+
D[u.value.at(-1)] = R(b), o(u.value, D[u.value.at(-1)]);
|
|
936
936
|
} else {
|
|
937
|
-
const
|
|
938
|
-
if (!
|
|
937
|
+
const D = xe(r.value, u.value);
|
|
938
|
+
if (!D)
|
|
939
939
|
return;
|
|
940
940
|
b.children.forEach((Q) => {
|
|
941
|
-
|
|
941
|
+
D[Q.key] = R(b), o([...u.value, Q.key], D[Q.key]);
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
944
|
} else {
|
|
945
945
|
const P = xe(r.value, u.value);
|
|
946
946
|
if (!P)
|
|
947
947
|
return;
|
|
948
|
-
b.children.forEach((
|
|
949
|
-
P[
|
|
948
|
+
b.children.forEach((D) => {
|
|
949
|
+
P[D.key] = R(b), o([...u.value, D.key], P[D.key]);
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
952
|
};
|
|
@@ -969,8 +969,8 @@ const gs = /* @__PURE__ */ G({
|
|
|
969
969
|
if (!b)
|
|
970
970
|
return !1;
|
|
971
971
|
try {
|
|
972
|
-
const { prop: P } = JSON.parse(b),
|
|
973
|
-
return Qi(P,
|
|
972
|
+
const { prop: P } = JSON.parse(b), D = Re(n.value, u.value);
|
|
973
|
+
return Qi(P, D);
|
|
974
974
|
} catch (P) {
|
|
975
975
|
console.error(P);
|
|
976
976
|
}
|
|
@@ -981,8 +981,8 @@ const gs = /* @__PURE__ */ G({
|
|
|
981
981
|
const b = localStorage.getItem("propTreeCopy");
|
|
982
982
|
if (b)
|
|
983
983
|
try {
|
|
984
|
-
const { object: P } = JSON.parse(b),
|
|
985
|
-
console.log(P,
|
|
984
|
+
const { object: P } = JSON.parse(b), D = Re(n.value, u.value);
|
|
985
|
+
console.log(P, D);
|
|
986
986
|
} catch (P) {
|
|
987
987
|
console.error(P);
|
|
988
988
|
}
|
|
@@ -998,8 +998,8 @@ const gs = /* @__PURE__ */ G({
|
|
|
998
998
|
i.value = S.x, a.value = S.y, u.value = S.keys;
|
|
999
999
|
}, { open: C } = Je("propTreeMenu", m);
|
|
1000
1000
|
return (S, x) => {
|
|
1001
|
-
const $ = V("v-list-item-title"), b = V("v-list-item"), P = V("v-list"),
|
|
1002
|
-
return A(), B(
|
|
1001
|
+
const $ = V("v-list-item-title"), b = V("v-list-item"), P = V("v-list"), D = V("v-menu");
|
|
1002
|
+
return A(), B(D, {
|
|
1003
1003
|
modelValue: w(C),
|
|
1004
1004
|
"onUpdate:modelValue": x[0] || (x[0] = (Q) => Ve(C) ? C.value = Q : null),
|
|
1005
1005
|
"location-strategy": "connected",
|
|
@@ -1480,7 +1480,7 @@ function Ms(e) {
|
|
|
1480
1480
|
readonly: r.readonly
|
|
1481
1481
|
}) };
|
|
1482
1482
|
}
|
|
1483
|
-
const Ls = { class: "text-subtitle-2 ml-1" },
|
|
1483
|
+
const Ls = { class: "text-subtitle-2 ml-1" }, Ds = { class: "text-caption text-grey ml-1" }, js = /* @__PURE__ */ G({
|
|
1484
1484
|
__name: "group",
|
|
1485
1485
|
props: {
|
|
1486
1486
|
id: {},
|
|
@@ -1510,7 +1510,7 @@ const Ls = { class: "text-subtitle-2 ml-1" }, js = { class: "text-caption text-g
|
|
|
1510
1510
|
size: "small"
|
|
1511
1511
|
}, null, 8, ["icon"]),
|
|
1512
1512
|
z("span", Ls, Y(l.title), 1),
|
|
1513
|
-
z("span",
|
|
1513
|
+
z("span", Ds, Y(l.count), 1)
|
|
1514
1514
|
], 36)), [
|
|
1515
1515
|
[c]
|
|
1516
1516
|
]);
|
|
@@ -1568,7 +1568,7 @@ const Ls = { class: "text-subtitle-2 ml-1" }, js = { class: "text-caption text-g
|
|
|
1568
1568
|
(A(!0), K(He, null, zt(w(l), (s) => (A(), K(He, {
|
|
1569
1569
|
key: s.id
|
|
1570
1570
|
}, [
|
|
1571
|
-
s.type === 0 ? (A(), B(
|
|
1571
|
+
s.type === 0 ? (A(), B(js, {
|
|
1572
1572
|
key: 0,
|
|
1573
1573
|
id: s.id,
|
|
1574
1574
|
title: s.name,
|
|
@@ -1946,13 +1946,14 @@ const Ws = /* @__PURE__ */ G({
|
|
|
1946
1946
|
},
|
|
1947
1947
|
emits: ["update:modelValue", "update:lock", "update:scale"],
|
|
1948
1948
|
setup(e, { expose: t }) {
|
|
1949
|
-
const n = I(e, "modelValue"), r = I(e, "lock"), l = I(e, "scale")
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
(c = u.value) == null || c.load({});
|
|
1949
|
+
const n = I(e, "modelValue"), r = I(e, "lock"), l = I(e, "scale"), o = Kn(), i = qn(), a = yt(), u = It("target"), s = () => {
|
|
1950
|
+
var f;
|
|
1951
|
+
const c = JSON.parse(n.value);
|
|
1952
|
+
(f = u.value) == null || f.load(c);
|
|
1954
1953
|
};
|
|
1955
|
-
return t({
|
|
1954
|
+
return t({ save: () => {
|
|
1955
|
+
const c = u.value.save();
|
|
1956
|
+
n.value = JSON.stringify(c);
|
|
1956
1957
|
} }), (c, f) => (A(), B(w(Zn), {
|
|
1957
1958
|
ref_key: "target",
|
|
1958
1959
|
ref: u,
|
|
@@ -1989,7 +1990,7 @@ const Ws = /* @__PURE__ */ G({
|
|
|
1989
1990
|
const f = It("editor");
|
|
1990
1991
|
return be(c, (d) => {
|
|
1991
1992
|
var m;
|
|
1992
|
-
d || (m = f.value) == null || m.
|
|
1993
|
+
d || (m = f.value) == null || m.save();
|
|
1993
1994
|
}), (d, m) => {
|
|
1994
1995
|
const C = V("v-btn"), S = V("v-sheet"), x = V("v-spacer"), $ = V("v-dialog");
|
|
1995
1996
|
return A(), B($, {
|
|
@@ -2066,7 +2067,7 @@ const Ws = /* @__PURE__ */ G({
|
|
|
2066
2067
|
}
|
|
2067
2068
|
});
|
|
2068
2069
|
function ea(e) {
|
|
2069
|
-
return {
|
|
2070
|
+
return { renderUiJsonEditor: (n, r, l, o, i) => r.ui !== "jsonEditor" ? _("div", "renderUiJsonObject prop ui must be jsonEditor") : _(Qs, {
|
|
2070
2071
|
modelValue: ae(
|
|
2071
2072
|
n,
|
|
2072
2073
|
r,
|
|
@@ -2074,7 +2075,7 @@ function ea(e) {
|
|
|
2074
2075
|
e,
|
|
2075
2076
|
o,
|
|
2076
2077
|
i
|
|
2077
|
-
) ?? {},
|
|
2078
|
+
) ?? "{}",
|
|
2078
2079
|
"onUpdate:modelValue": (a) => {
|
|
2079
2080
|
fe(
|
|
2080
2081
|
n,
|
|
@@ -2136,16 +2137,16 @@ const ta = /* @__PURE__ */ G({
|
|
|
2136
2137
|
const S = () => {
|
|
2137
2138
|
const { compGroups: y, comps: p } = In.app.activeApp, h = [];
|
|
2138
2139
|
y.forEach(({ id: g, name: T, position: U }) => {
|
|
2139
|
-
const
|
|
2140
|
+
const j = C.value.find((te) => te.id === g);
|
|
2140
2141
|
h.push({
|
|
2141
2142
|
id: g,
|
|
2142
2143
|
type: 0,
|
|
2143
2144
|
name: T,
|
|
2144
2145
|
position: U,
|
|
2145
|
-
collapse: (
|
|
2146
|
+
collapse: (j == null ? void 0 : j.collapse) ?? !0
|
|
2146
2147
|
});
|
|
2147
|
-
}), p.forEach(({ id: g, groupid: T, name: U, position:
|
|
2148
|
-
h.push({ id: g, type: 1, name: U, position:
|
|
2148
|
+
}), p.forEach(({ id: g, groupid: T, name: U, position: j }) => {
|
|
2149
|
+
h.push({ id: g, type: 1, name: U, position: j, group: T });
|
|
2149
2150
|
}), Wi(h, !0), C.value = h;
|
|
2150
2151
|
};
|
|
2151
2152
|
let x;
|
|
@@ -2161,7 +2162,7 @@ const ta = /* @__PURE__ */ G({
|
|
|
2161
2162
|
}), Gn(() => {
|
|
2162
2163
|
b();
|
|
2163
2164
|
});
|
|
2164
|
-
const { renderProp: P } = _s(v, a, u), { renderUiDummy:
|
|
2165
|
+
const { renderProp: P } = _s(v, a, u), { renderUiDummy: D } = bs(c), { renderUiStrInput: Q } = Ss(c), { renderUiNumInput: et } = Cs(c), { renderUiSwitch: Cn } = Os(c), { renderUiSelect: Pn } = Ms(c), { renderUiColorPicker: xn } = zs(c), { renderUiJsonEditor: On } = ea(c), { renderUiMultiTypes: Vn } = Zs(c), { renderUiCompSelect: Un } = Gs(c), je = (y, p, h, g, T, U) => (y = dn(y), T !== void 0 ? (y.push(T), U && y.push(p.key)) : y.push(p.key), p.ui ? p.array && g ? Dn(y, p, h, g, T, U) : jn(y, p, h, T, U) : p.array ? Mn(y, p, h, g, T, U) : Ln(
|
|
2165
2166
|
y,
|
|
2166
2167
|
p,
|
|
2167
2168
|
h,
|
|
@@ -2175,8 +2176,8 @@ const ta = /* @__PURE__ */ G({
|
|
|
2175
2176
|
return console.assert(!1), _("div", "renderBranchArray prop array must be valid");
|
|
2176
2177
|
if (!g)
|
|
2177
2178
|
return console.assert(!1), _("div", "renderBranchArray branch must be valid");
|
|
2178
|
-
let
|
|
2179
|
-
T !== void 0 && !U ? (h[T] instanceof Array || (h[T] = R(p), c(y, h[p.key])),
|
|
2179
|
+
let j;
|
|
2180
|
+
T !== void 0 && !U ? (h[T] instanceof Array || (h[T] = R(p), c(y, h[p.key])), j = h[T]) : (h[p.key] instanceof Array || (h[p.key] = R(p), c(y, h[p.key])), j = h[p.key]);
|
|
2180
2181
|
let te = n(p.name);
|
|
2181
2182
|
g.collapse && Te(v.value, y) && (te += " *");
|
|
2182
2183
|
const Ce = _(Be, {
|
|
@@ -2190,7 +2191,7 @@ const ta = /* @__PURE__ */ G({
|
|
|
2190
2191
|
$e.emit("propTreeMenu", { x: O, y: E, keys: y });
|
|
2191
2192
|
},
|
|
2192
2193
|
onCreate: () => {
|
|
2193
|
-
|
|
2194
|
+
j.push({}), c(y, j);
|
|
2194
2195
|
}
|
|
2195
2196
|
}), q = _(
|
|
2196
2197
|
"div",
|
|
@@ -2201,7 +2202,7 @@ const ta = /* @__PURE__ */ G({
|
|
|
2201
2202
|
},
|
|
2202
2203
|
(() => {
|
|
2203
2204
|
const O = [];
|
|
2204
|
-
for (let E = 0; E <
|
|
2205
|
+
for (let E = 0; E < j.length; E++) {
|
|
2205
2206
|
if (!ot(g.children)) {
|
|
2206
2207
|
console.assert(!1);
|
|
2207
2208
|
break;
|
|
@@ -2233,7 +2234,7 @@ const ta = /* @__PURE__ */ G({
|
|
|
2233
2234
|
console.assert(!1);
|
|
2234
2235
|
return;
|
|
2235
2236
|
}
|
|
2236
|
-
g.children.splice(ne, 1),
|
|
2237
|
+
g.children.splice(ne, 1), j.splice(ne, 1), c(y, j);
|
|
2237
2238
|
}
|
|
2238
2239
|
});
|
|
2239
2240
|
O.push(En);
|
|
@@ -2255,10 +2256,10 @@ const ta = /* @__PURE__ */ G({
|
|
|
2255
2256
|
collapse: !0,
|
|
2256
2257
|
children: de.array ? [] : {}
|
|
2257
2258
|
});
|
|
2258
|
-
const Rn =
|
|
2259
|
+
const Rn = je(
|
|
2259
2260
|
y,
|
|
2260
2261
|
de,
|
|
2261
|
-
|
|
2262
|
+
j[E],
|
|
2262
2263
|
Ee.children[de.key],
|
|
2263
2264
|
E,
|
|
2264
2265
|
!0
|
|
@@ -2291,10 +2292,10 @@ const ta = /* @__PURE__ */ G({
|
|
|
2291
2292
|
return console.assert(!1), _("div", "renderBranchScalar prop array must be invalid");
|
|
2292
2293
|
if (!g)
|
|
2293
2294
|
return console.assert(!1), _("div", "renderBranchScalar branch must be valid");
|
|
2294
|
-
let
|
|
2295
|
-
g.collapse && Te(v.value, y) && (
|
|
2295
|
+
let j = n(p.name);
|
|
2296
|
+
g.collapse && Te(v.value, y) && (j += " *");
|
|
2296
2297
|
const te = _(Be, {
|
|
2297
|
-
title:
|
|
2298
|
+
title: j,
|
|
2298
2299
|
collapse: g.collapse,
|
|
2299
2300
|
hasDelete: T !== void 0 && !U,
|
|
2300
2301
|
onCollapse: (q) => {
|
|
@@ -2324,7 +2325,7 @@ const ta = /* @__PURE__ */ G({
|
|
|
2324
2325
|
collapse: !0,
|
|
2325
2326
|
children: !O.ui && O.array ? [] : {}
|
|
2326
2327
|
});
|
|
2327
|
-
const E =
|
|
2328
|
+
const E = je(
|
|
2328
2329
|
y,
|
|
2329
2330
|
O,
|
|
2330
2331
|
(typeof h[p.key] != "object" && (h[p.key] = {}, c(y, h[p.key])), h[p.key]),
|
|
@@ -2346,15 +2347,15 @@ const ta = /* @__PURE__ */ G({
|
|
|
2346
2347
|
return q.push(te), g.collapse || q.push(Ce), q;
|
|
2347
2348
|
})()
|
|
2348
2349
|
);
|
|
2349
|
-
},
|
|
2350
|
+
}, Dn = (y, p, h, g, T, U) => {
|
|
2350
2351
|
if (!p.ui)
|
|
2351
2352
|
return console.assert(!1), _("div", "renderLeafArray prop ui must be valid");
|
|
2352
2353
|
if (!p.array)
|
|
2353
2354
|
return console.assert(!1), _("div", "renderLeafArray prop array must be valid");
|
|
2354
2355
|
if (!g)
|
|
2355
2356
|
return console.assert(!1), _("div", "renderLeafArray branch must be valid");
|
|
2356
|
-
let
|
|
2357
|
-
T !== void 0 && !U ? (h[T] instanceof Array || (h[T] = R(p), c(y, h[T])),
|
|
2357
|
+
let j;
|
|
2358
|
+
T !== void 0 && !U ? (h[T] instanceof Array || (h[T] = R(p), c(y, h[T])), j = h[T]) : (h[p.key] instanceof Array || (h[p.key] = R(p), c(y, h[p.key])), j = h[p.key]);
|
|
2358
2359
|
let te = n(p.name);
|
|
2359
2360
|
g.collapse && Te(v.value, y) && (te += " *");
|
|
2360
2361
|
const Ce = _(Be, {
|
|
@@ -2368,7 +2369,7 @@ const ta = /* @__PURE__ */ G({
|
|
|
2368
2369
|
$e.emit("propTreeMenu", { x: O, y: E, keys: y });
|
|
2369
2370
|
},
|
|
2370
2371
|
onCreate: () => {
|
|
2371
|
-
|
|
2372
|
+
j.push(R(p, !0)), c(y, j);
|
|
2372
2373
|
}
|
|
2373
2374
|
}), q = _(
|
|
2374
2375
|
"div",
|
|
@@ -2379,8 +2380,8 @@ const ta = /* @__PURE__ */ G({
|
|
|
2379
2380
|
},
|
|
2380
2381
|
(() => {
|
|
2381
2382
|
const O = [];
|
|
2382
|
-
for (let E = 0; E <
|
|
2383
|
-
const ke =
|
|
2383
|
+
for (let E = 0; E < j.length; E++) {
|
|
2384
|
+
const ke = je(y, p, j, void 0, E, !1);
|
|
2384
2385
|
O.push(ke);
|
|
2385
2386
|
}
|
|
2386
2387
|
return O;
|
|
@@ -2398,11 +2399,11 @@ const ta = /* @__PURE__ */ G({
|
|
|
2398
2399
|
return O.push(Ce), g.collapse || O.push(q), O;
|
|
2399
2400
|
})()
|
|
2400
2401
|
);
|
|
2401
|
-
},
|
|
2402
|
+
}, jn = (y, p, h, g, T) => {
|
|
2402
2403
|
if (!p.ui)
|
|
2403
2404
|
return console.assert(!1), _("div", "renderLeafScalar prop ui must be valid");
|
|
2404
2405
|
let U;
|
|
2405
|
-
return p.ui === "dummy" ? U =
|
|
2406
|
+
return p.ui === "dummy" ? U = D(y, p, h, g, T) : p.ui === "strInput" ? U = Q(y, p, h, g, T) : p.ui === "numInput" ? U = et(y, p, h, g, T) : p.ui === "switch" ? U = Cn(y, p, h, g, T) : p.ui === "select" ? U = Pn(y, p, h, g, T) : p.ui === "colorPicker" ? U = xn(y, p, h, g, T) : p.ui === "jsonEditor" ? U = On(y, p, h, g, T) : p.ui === "multiTypes" ? U = Vn(y, p, h, g, T) : p.ui === "compSelect" ? U = Un(y, p, h, g, T) : console.assert(!1, "renderLeafScalar not implemented"), U ? P(y, p, U) : _("div");
|
|
2406
2407
|
}, kn = () => _(
|
|
2407
2408
|
"div",
|
|
2408
2409
|
{
|
|
@@ -2421,7 +2422,7 @@ const ta = /* @__PURE__ */ G({
|
|
|
2421
2422
|
collapse: !0,
|
|
2422
2423
|
children: !h.ui && h.array ? [] : {}
|
|
2423
2424
|
});
|
|
2424
|
-
const g =
|
|
2425
|
+
const g = je([], h, l.object, p[h.key]);
|
|
2425
2426
|
y.push(g);
|
|
2426
2427
|
});
|
|
2427
2428
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-prop-tree",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.26",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"vue": "^3.5.13",
|
|
27
27
|
"vue-i18n": "^11.1.3",
|
|
28
28
|
"vuetify": "^3.8.1",
|
|
29
|
-
"x-block-lib": "^0.6.
|
|
29
|
+
"x-block-lib": "^0.6.31",
|
|
30
30
|
"x-essential-lib": "^0.8.7",
|
|
31
31
|
"x-group-list": "^0.4.1",
|
|
32
|
-
"x-runtime-lib": "^0.6.
|
|
32
|
+
"x-runtime-lib": "^0.6.44",
|
|
33
33
|
"x-state-lib": "^0.2.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|