x-prop-tree 0.4.7 → 0.4.8
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 +38 -38
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.id="x-prop-tree",e.appendChild(document.createTextNode('.v-icon{--v-icon-size-multiplier: 1;align-items:center;display:inline-flex;font-feature-settings:"liga";height:1em;justify-content:center;letter-spacing:normal;line-height:1;position:relative;text-indent:0;text-align:center;-webkit-user-select:none;user-select:none;vertical-align:middle;width:1em;min-width:1em}.v-icon--clickable{cursor:pointer}.v-icon--disabled{pointer-events:none;opacity:.38}.v-icon--size-x-small{font-size:calc(var(--v-icon-size-multiplier) * 1em)}.v-icon--size-small{font-size:calc(var(--v-icon-size-multiplier) * 1.25em)}.v-icon--size-default{font-size:calc(var(--v-icon-size-multiplier) * 1.5em)}.v-icon--size-large{font-size:calc(var(--v-icon-size-multiplier) * 1.75em)}.v-icon--size-x-large{font-size:calc(var(--v-icon-size-multiplier) * 2em)}.v-icon__svg{fill:currentColor;width:100%;height:100%}.v-icon--start{margin-inline-end:8px}.v-icon--end{margin-inline-start:8px}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
import { Fragment as ae, reactive as we, computed as _, watchEffect as Be, toRefs as Ge, warn as qe, getCurrentInstance as Xe, inject as re, shallowRef as Ye, provide as $e, defineComponent as B, isRef as
|
|
2
|
+
import { Fragment as ae, reactive as we, computed as _, watchEffect as Be, toRefs as Ge, warn as qe, getCurrentInstance as Xe, inject as re, shallowRef as Ye, provide as $e, defineComponent as B, isRef as Ie, createVNode as C, mergeProps as Me, unref as T, ref as I, toRef as Ze, Text as Ke, resolveDirective as G, withDirectives as q, openBlock as x, createElementBlock as j, normalizeStyle as Fe, withModifiers as Q, renderSlot as Je, resolveComponent as p, createBlock as M, withCtx as P, renderList as Qe, createTextVNode as De, toDisplayString as ie, createElementVNode as je, createCommentVNode as oe, mergeModels as N, useModel as X, h as k } from "vue";
|
|
3
3
|
import { useI18n as Ae } from "vue-i18n";
|
|
4
4
|
import { useColor as ue, eventBus as Te, useViewStack as en } from "x-essential-lib";
|
|
5
5
|
import { getPropDefault as A } from "x-runtime-lib";
|
|
@@ -369,9 +369,9 @@ function $n(e) {
|
|
|
369
369
|
};
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function In(e, n) {
|
|
373
373
|
const t = _(() => ({
|
|
374
|
-
text:
|
|
374
|
+
text: Ie(e) ? e.value : null
|
|
375
375
|
})), {
|
|
376
376
|
colorClasses: l,
|
|
377
377
|
colorStyles: a
|
|
@@ -381,7 +381,7 @@ function Fn(e, n) {
|
|
|
381
381
|
textColorStyles: a
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
-
const Ee = [String, Function, Object, Array],
|
|
384
|
+
const Ee = [String, Function, Object, Array], Mn = Symbol.for("vuetify:icons"), ne = L({
|
|
385
385
|
icon: {
|
|
386
386
|
type: Ee
|
|
387
387
|
},
|
|
@@ -407,7 +407,7 @@ const Ee = [String, Function, Object, Array], In = Symbol.for("vuetify:icons"),
|
|
|
407
407
|
});
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
|
-
}),
|
|
410
|
+
}), Fn = ee({
|
|
411
411
|
name: "VSvgIcon",
|
|
412
412
|
inheritAttrs: !1,
|
|
413
413
|
props: ne(),
|
|
@@ -415,7 +415,7 @@ const Ee = [String, Function, Object, Array], In = Symbol.for("vuetify:icons"),
|
|
|
415
415
|
let {
|
|
416
416
|
attrs: t
|
|
417
417
|
} = n;
|
|
418
|
-
return () => C(e.tag,
|
|
418
|
+
return () => C(e.tag, Me(t, {
|
|
419
419
|
style: null
|
|
420
420
|
}), {
|
|
421
421
|
default: () => [C("svg", {
|
|
@@ -454,7 +454,7 @@ ee({
|
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
const Dn = (e) => {
|
|
457
|
-
const n = re(
|
|
457
|
+
const n = re(Mn);
|
|
458
458
|
if (!n) throw new Error("Missing Vuetify Icons provide!");
|
|
459
459
|
return {
|
|
460
460
|
iconData: _(() => {
|
|
@@ -466,7 +466,7 @@ const Dn = (e) => {
|
|
|
466
466
|
let a = l;
|
|
467
467
|
if (typeof a == "string" && (a = a.trim(), a.startsWith("$") && (a = (c = n.aliases) == null ? void 0 : c[a.slice(1)])), a || E(`Could not find aliased icon "${l}"`), Array.isArray(a))
|
|
468
468
|
return {
|
|
469
|
-
component:
|
|
469
|
+
component: Fn,
|
|
470
470
|
icon: a
|
|
471
471
|
};
|
|
472
472
|
if (typeof a != "string")
|
|
@@ -520,7 +520,7 @@ const Ln = L({
|
|
|
520
520
|
attrs: t,
|
|
521
521
|
slots: l
|
|
522
522
|
} = n;
|
|
523
|
-
const a =
|
|
523
|
+
const a = I(), {
|
|
524
524
|
themeClasses: r
|
|
525
525
|
} = wn(e), {
|
|
526
526
|
iconData: i
|
|
@@ -529,7 +529,7 @@ const Ln = L({
|
|
|
529
529
|
} = Pn(e), {
|
|
530
530
|
textColorClasses: c,
|
|
531
531
|
textColorStyles: o
|
|
532
|
-
} =
|
|
532
|
+
} = In(Ze(e, "color"));
|
|
533
533
|
return bn(() => {
|
|
534
534
|
var S, w;
|
|
535
535
|
const f = (S = l.default) == null ? void 0 : S.call(l);
|
|
@@ -563,7 +563,7 @@ const Ln = L({
|
|
|
563
563
|
minHeight: {}
|
|
564
564
|
},
|
|
565
565
|
setup(e) {
|
|
566
|
-
const { backgroundColor2: n, highlightColor: t } = ue(), l =
|
|
566
|
+
const { backgroundColor2: n, highlightColor: t } = ue(), l = I(!1), a = _(() => ({
|
|
567
567
|
background: l.value ? t.value : n.value,
|
|
568
568
|
minHeight: e.minHeight,
|
|
569
569
|
paddingRight: "4px",
|
|
@@ -579,7 +579,7 @@ const Ln = L({
|
|
|
579
579
|
const c = G("ripple");
|
|
580
580
|
return q((x(), j("div", {
|
|
581
581
|
class: "d-flex justify-space-between align-center cursor-pointer",
|
|
582
|
-
style:
|
|
582
|
+
style: Fe(a.value),
|
|
583
583
|
onContextmenu: Q(r, ["prevent"]),
|
|
584
584
|
onMouseover: g[0] || (g[0] = (o) => l.value = !0),
|
|
585
585
|
onMouseout: g[1] || (g[1] = (o) => l.value = !1)
|
|
@@ -593,7 +593,7 @@ const Ln = L({
|
|
|
593
593
|
}), Hn = /* @__PURE__ */ B({
|
|
594
594
|
__name: "menu",
|
|
595
595
|
setup(e) {
|
|
596
|
-
const { t: n } = Ae(), t =
|
|
596
|
+
const { t: n } = Ae(), t = I(0), l = I(0), a = _(() => [t.value, l.value]), r = (o) => {
|
|
597
597
|
const f = () => {
|
|
598
598
|
console.log("reset");
|
|
599
599
|
};
|
|
@@ -609,9 +609,9 @@ const Ln = L({
|
|
|
609
609
|
}, { open: c } = en("propTreeMenu", g);
|
|
610
610
|
return (o, f) => {
|
|
611
611
|
const y = p("v-list-item-title"), S = p("v-list-item"), w = p("v-list"), V = p("v-menu");
|
|
612
|
-
return x(),
|
|
612
|
+
return x(), M(V, {
|
|
613
613
|
modelValue: T(c),
|
|
614
|
-
"onUpdate:modelValue": f[0] || (f[0] = ($) =>
|
|
614
|
+
"onUpdate:modelValue": f[0] || (f[0] = ($) => Ie(c) ? c.value = $ : null),
|
|
615
615
|
"location-strategy": "connected",
|
|
616
616
|
target: a.value,
|
|
617
617
|
scrim: "transparent"
|
|
@@ -619,7 +619,7 @@ const Ln = L({
|
|
|
619
619
|
default: P(() => [
|
|
620
620
|
C(w, null, {
|
|
621
621
|
default: P(() => [
|
|
622
|
-
(x(!0), j(ae, null, Qe(i.value, ($, D) => (x(),
|
|
622
|
+
(x(!0), j(ae, null, Qe(i.value, ($, D) => (x(), M(S, {
|
|
623
623
|
key: D,
|
|
624
624
|
link: "",
|
|
625
625
|
onClick: $.func
|
|
@@ -653,7 +653,7 @@ const Ln = L({
|
|
|
653
653
|
},
|
|
654
654
|
emits: ["collapse", "create", "delete"],
|
|
655
655
|
setup(e, { emit: n }) {
|
|
656
|
-
const { backgroundColor2: t, highlightColor: l } = ue(), a = n, r =
|
|
656
|
+
const { backgroundColor2: t, highlightColor: l } = ue(), a = n, r = I(!1), i = _(() => ({
|
|
657
657
|
background: r.value ? l.value : t.value,
|
|
658
658
|
height: "36px",
|
|
659
659
|
marginBottom: "1px",
|
|
@@ -670,7 +670,7 @@ const Ln = L({
|
|
|
670
670
|
const y = p("v-icon"), S = p("v-spacer"), w = G("ripple");
|
|
671
671
|
return q((x(), j("div", {
|
|
672
672
|
class: "d-flex align-center cursor-pointer",
|
|
673
|
-
style:
|
|
673
|
+
style: Fe(i.value),
|
|
674
674
|
onClick: g,
|
|
675
675
|
onContextmenu: Q(c, ["prevent"]),
|
|
676
676
|
onMouseover: f[2] || (f[2] = (V) => r.value = !0),
|
|
@@ -682,13 +682,13 @@ const Ln = L({
|
|
|
682
682
|
}, null, 8, ["icon"]),
|
|
683
683
|
je("span", null, ie(o.title), 1),
|
|
684
684
|
C(S),
|
|
685
|
-
o.hasCreate ? (x(),
|
|
685
|
+
o.hasCreate ? (x(), M(y, {
|
|
686
686
|
key: 0,
|
|
687
687
|
class: "ml-3",
|
|
688
688
|
icon: T(Le),
|
|
689
689
|
onClick: f[0] || (f[0] = Q((V) => a("create"), ["stop"]))
|
|
690
690
|
}, null, 8, ["icon"])) : oe("", !0),
|
|
691
|
-
o.hasDelete ? (x(),
|
|
691
|
+
o.hasDelete ? (x(), M(y, {
|
|
692
692
|
key: 1,
|
|
693
693
|
class: "ml-3",
|
|
694
694
|
icon: T(Pe),
|
|
@@ -709,12 +709,12 @@ const Ln = L({
|
|
|
709
709
|
}),
|
|
710
710
|
emits: ["update:modelValue"],
|
|
711
711
|
setup(e) {
|
|
712
|
-
const n = X(e, "modelValue"), t = _(() => e.readonly), l =
|
|
712
|
+
const n = X(e, "modelValue"), t = _(() => e.readonly), l = I("hexa");
|
|
713
713
|
return (a, r) => {
|
|
714
714
|
const i = p("v-btn"), g = p("v-color-picker"), c = p("v-menu");
|
|
715
|
-
return x(),
|
|
715
|
+
return x(), M(c, { "close-on-content-click": !1 }, {
|
|
716
716
|
activator: P(({ props: o }) => [
|
|
717
|
-
C(i,
|
|
717
|
+
C(i, Me(o, {
|
|
718
718
|
density: "comfortable",
|
|
719
719
|
color: n.value,
|
|
720
720
|
block: "",
|
|
@@ -757,7 +757,7 @@ const Ln = L({
|
|
|
757
757
|
const n = X(e, "modelValue");
|
|
758
758
|
return (t, l) => {
|
|
759
759
|
const a = p("v-number-input"), r = G("ripple");
|
|
760
|
-
return q((x(),
|
|
760
|
+
return q((x(), M(a, {
|
|
761
761
|
modelValue: n.value,
|
|
762
762
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => n.value = i),
|
|
763
763
|
density: "compact",
|
|
@@ -793,7 +793,7 @@ const Ln = L({
|
|
|
793
793
|
const n = X(e, "modelValue");
|
|
794
794
|
return (t, l) => {
|
|
795
795
|
const a = p("v-select"), r = G("ripple");
|
|
796
|
-
return q((x(),
|
|
796
|
+
return q((x(), M(a, {
|
|
797
797
|
modelValue: n.value,
|
|
798
798
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => n.value = i),
|
|
799
799
|
density: "compact",
|
|
@@ -825,7 +825,7 @@ const Ln = L({
|
|
|
825
825
|
const t = X(e, "modelValue"), l = n;
|
|
826
826
|
return (a, r) => {
|
|
827
827
|
const i = p("v-text-field"), g = G("ripple");
|
|
828
|
-
return q((x(),
|
|
828
|
+
return q((x(), M(i, {
|
|
829
829
|
modelValue: t.value,
|
|
830
830
|
"onUpdate:modelValue": r[0] || (r[0] = (c) => t.value = c),
|
|
831
831
|
density: "compact",
|
|
@@ -857,7 +857,7 @@ const Ln = L({
|
|
|
857
857
|
const n = X(e, "modelValue");
|
|
858
858
|
return (t, l) => {
|
|
859
859
|
const a = p("v-switch");
|
|
860
|
-
return x(),
|
|
860
|
+
return x(), M(a, {
|
|
861
861
|
modelValue: n.value,
|
|
862
862
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => n.value = r),
|
|
863
863
|
class: "ml-1",
|
|
@@ -877,9 +877,9 @@ const Ln = L({
|
|
|
877
877
|
},
|
|
878
878
|
emits: ["change"],
|
|
879
879
|
setup(e, { emit: n }) {
|
|
880
|
-
const { t } = Ae(), { backgroundColor1: l, backgroundColor2: a } = ue(), r = e, i = n, g =
|
|
880
|
+
const { t } = Ae(), { backgroundColor1: l, backgroundColor2: a } = ue(), r = e, i = n, g = I("20px"), c = I("56px"), o = I("200px"), f = we({});
|
|
881
881
|
function y(d, s, u, m) {
|
|
882
|
-
return
|
|
882
|
+
return d !== "" && (d += "."), d += s.key, s.children ? s.array ? S(d, s, u, m) : w(d, s, u, m) : s.array ? V(d, s, u) : $(d, s, u);
|
|
883
883
|
}
|
|
884
884
|
function S(d, s, u, m) {
|
|
885
885
|
u[s.key] instanceof Array || (u[s.key] = [], i("change", d, u[s.key]));
|
|
@@ -940,15 +940,15 @@ const Ln = L({
|
|
|
940
940
|
(() => {
|
|
941
941
|
var z;
|
|
942
942
|
const h = [];
|
|
943
|
-
return (z = s.children) == null || z.forEach((
|
|
944
|
-
typeof m[
|
|
943
|
+
return (z = s.children) == null || z.forEach((F) => {
|
|
944
|
+
typeof m[F.key] != "object" && (m[F.key] = {
|
|
945
945
|
collapse: !0
|
|
946
946
|
});
|
|
947
947
|
const We = y(
|
|
948
948
|
d,
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
m[
|
|
949
|
+
F,
|
|
950
|
+
(typeof u[s.key] != "object" && (u[s.key] = {}, i("change", d, u[s.key])), u[s.key]),
|
|
951
|
+
m[F.key]
|
|
952
952
|
);
|
|
953
953
|
h.push(We);
|
|
954
954
|
}), h;
|
|
@@ -984,8 +984,8 @@ const Ln = L({
|
|
|
984
984
|
[
|
|
985
985
|
k(Se, {
|
|
986
986
|
modelValue: u[s.key][h],
|
|
987
|
-
"onUpdate:modelValue": (
|
|
988
|
-
u[s.key][h] =
|
|
987
|
+
"onUpdate:modelValue": (F) => {
|
|
988
|
+
u[s.key][h] = F, i("change", d, u[s.key]);
|
|
989
989
|
},
|
|
990
990
|
hasDelete: !0,
|
|
991
991
|
onDelete: () => {
|
|
@@ -1046,10 +1046,10 @@ const Ln = L({
|
|
|
1046
1046
|
items: (() => {
|
|
1047
1047
|
var h;
|
|
1048
1048
|
const v = [];
|
|
1049
|
-
return (h = s.items) == null || h.forEach(({ title: z, value:
|
|
1049
|
+
return (h = s.items) == null || h.forEach(({ title: z, value: F }) => {
|
|
1050
1050
|
v.push({
|
|
1051
1051
|
title: t(z),
|
|
1052
|
-
value:
|
|
1052
|
+
value: F
|
|
1053
1053
|
});
|
|
1054
1054
|
}), v;
|
|
1055
1055
|
})(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-prop-tree",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"vue-i18n": "^10.0.4",
|
|
27
27
|
"vuetify": "^3.7.3",
|
|
28
28
|
"x-essential-lib": "^0.7.3",
|
|
29
|
-
"x-runtime-lib": "^0.4.
|
|
29
|
+
"x-runtime-lib": "^0.4.13"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@eslint/js": "^10.0.0",
|