x-prop-tree 0.3.2 → 0.3.3
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 +165 -163
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
2
|
+
import { Fragment as Ae, reactive as ve, computed as k, watchEffect as Ce, toRefs as De, warn as Le, getCurrentInstance as Me, inject as Q, shallowRef as Te, provide as ke, defineComponent as M, isRef as ze, createVNode as C, mergeProps as Re, unref as W, ref as I, toRef as Pe, Text as Ne, mergeModels as K, useModel as xe, resolveComponent as G, openBlock as _, createElementBlock as be, normalizeStyle as Se, createBlock as U, resolveDirective as Oe, withDirectives as Ee, createElementVNode as He, toDisplayString as We, withModifiers as j, createCommentVNode as ee, h as y } from "vue";
|
|
3
3
|
import { useI18n as Ge } from "vue-i18n";
|
|
4
4
|
import { useColor as Ue } from "x-essential-lib";
|
|
5
|
-
import { getPropDefault as
|
|
5
|
+
import { getPropDefault as O } from "x-runtime-lib";
|
|
6
6
|
function w(e, t) {
|
|
7
7
|
return (n) => Object.keys(e).reduce((s, a) => {
|
|
8
8
|
const u = typeof e[a] == "object" && e[a] != null && !Array.isArray(e[a]) ? e[a] : {
|
|
@@ -26,23 +26,23 @@ function A(e) {
|
|
|
26
26
|
if (!(e == null || e === ""))
|
|
27
27
|
return isNaN(+e) ? String(e) : isFinite(+e) ? `${Number(e)}${t}` : void 0;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function te(e) {
|
|
30
30
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
31
31
|
}
|
|
32
32
|
function Y(e, t) {
|
|
33
33
|
return t.every((n) => e.hasOwnProperty(n));
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Ze(e, t) {
|
|
36
36
|
const n = {}, s = new Set(Object.keys(e));
|
|
37
37
|
for (const a of t)
|
|
38
38
|
s.has(a) && (n[a] = e[a]);
|
|
39
39
|
return n;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ne(e, t) {
|
|
42
42
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0";
|
|
43
43
|
return e + n.repeat(Math.max(0, t - e.length));
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Ye(e) {
|
|
46
46
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
47
47
|
const n = [];
|
|
48
48
|
let s = 0;
|
|
@@ -50,15 +50,15 @@ function Ke(e) {
|
|
|
50
50
|
n.push(e.substr(s, t)), s += t;
|
|
51
51
|
return n;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Ve() {
|
|
54
54
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
|
|
55
55
|
const s = {};
|
|
56
56
|
for (const a in e)
|
|
57
57
|
s[a] = e[a];
|
|
58
58
|
for (const a in t) {
|
|
59
59
|
const r = e[a], u = t[a];
|
|
60
|
-
if (
|
|
61
|
-
s[a] =
|
|
60
|
+
if (te(r) && te(u)) {
|
|
61
|
+
s[a] = Ve(r, u, n);
|
|
62
62
|
continue;
|
|
63
63
|
}
|
|
64
64
|
if (Array.isArray(r) && Array.isArray(u) && n) {
|
|
@@ -69,8 +69,8 @@ function Se() {
|
|
|
69
69
|
}
|
|
70
70
|
return s;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return e.map((t) => t.type ===
|
|
72
|
+
function we(e) {
|
|
73
|
+
return e.map((t) => t.type === Ae ? we(t.children) : t).flat();
|
|
74
74
|
}
|
|
75
75
|
function F() {
|
|
76
76
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
@@ -80,36 +80,36 @@ function F() {
|
|
|
80
80
|
return F.cache.set(e, t), t;
|
|
81
81
|
}
|
|
82
82
|
F.cache = /* @__PURE__ */ new Map();
|
|
83
|
-
function
|
|
84
|
-
const t =
|
|
85
|
-
return
|
|
83
|
+
function pe(e) {
|
|
84
|
+
const t = ve({}), n = k(e);
|
|
85
|
+
return Ce(() => {
|
|
86
86
|
for (const s in n.value)
|
|
87
87
|
t[s] = n.value[s];
|
|
88
88
|
}, {
|
|
89
89
|
flush: "sync"
|
|
90
|
-
}),
|
|
90
|
+
}), De(t);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Ke(e, t) {
|
|
93
93
|
return e.includes(t);
|
|
94
94
|
}
|
|
95
|
-
const p = 2.4,
|
|
96
|
-
function
|
|
95
|
+
const p = 2.4, se = 0.2126729, ae = 0.7151522, le = 0.072175, Xe = 0.55, Je = 0.58, Qe = 0.57, je = 0.62, E = 0.03, re = 1.45, et = 5e-4, tt = 1.25, nt = 1.25, ie = 0.078, ue = 12.82051282051282, H = 0.06, oe = 1e-3;
|
|
96
|
+
function ce(e, t) {
|
|
97
97
|
const n = (e.r / 255) ** p, s = (e.g / 255) ** p, a = (e.b / 255) ** p, r = (t.r / 255) ** p, u = (t.g / 255) ** p, m = (t.b / 255) ** p;
|
|
98
|
-
let o = n *
|
|
99
|
-
if (o <=
|
|
98
|
+
let o = n * se + s * ae + a * le, f = r * se + u * ae + m * le;
|
|
99
|
+
if (o <= E && (o += (E - o) ** re), f <= E && (f += (E - f) ** re), Math.abs(f - o) < et)
|
|
100
100
|
return 0;
|
|
101
101
|
let h;
|
|
102
102
|
if (f > o) {
|
|
103
|
-
const g = (f **
|
|
104
|
-
h = g <
|
|
103
|
+
const g = (f ** Xe - o ** Je) * tt;
|
|
104
|
+
h = g < oe ? 0 : g < ie ? g - g * ue * H : g - H;
|
|
105
105
|
} else {
|
|
106
106
|
const g = (f ** je - o ** Qe) * nt;
|
|
107
|
-
h = g > -
|
|
107
|
+
h = g > -oe ? 0 : g > -ie ? g - g * ue * H : g + H;
|
|
108
108
|
}
|
|
109
109
|
return h * 100;
|
|
110
110
|
}
|
|
111
111
|
function D(e) {
|
|
112
|
-
|
|
112
|
+
Le(`Vuetify: ${e}`);
|
|
113
113
|
}
|
|
114
114
|
function X(e) {
|
|
115
115
|
return !!e && /^(#|var\(--|(rgb|hsl)a?\()/.test(e);
|
|
@@ -117,7 +117,7 @@ function X(e) {
|
|
|
117
117
|
function st(e) {
|
|
118
118
|
return X(e) && !/^((rgb|hsl)a?\()?var\(--/.test(e);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const fe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, at = {
|
|
121
121
|
rgb: (e, t, n, s) => ({
|
|
122
122
|
r: e,
|
|
123
123
|
g: t,
|
|
@@ -130,42 +130,42 @@ const ce = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, at = {
|
|
|
130
130
|
b: n,
|
|
131
131
|
a: s
|
|
132
132
|
}),
|
|
133
|
-
hsl: (e, t, n, s) =>
|
|
133
|
+
hsl: (e, t, n, s) => de({
|
|
134
134
|
h: e,
|
|
135
135
|
s: t,
|
|
136
136
|
l: n,
|
|
137
137
|
a: s
|
|
138
138
|
}),
|
|
139
|
-
hsla: (e, t, n, s) =>
|
|
139
|
+
hsla: (e, t, n, s) => de({
|
|
140
140
|
h: e,
|
|
141
141
|
s: t,
|
|
142
142
|
l: n,
|
|
143
143
|
a: s
|
|
144
144
|
}),
|
|
145
|
-
hsv: (e, t, n, s) =>
|
|
145
|
+
hsv: (e, t, n, s) => L({
|
|
146
146
|
h: e,
|
|
147
147
|
s: t,
|
|
148
148
|
v: n,
|
|
149
149
|
a: s
|
|
150
150
|
}),
|
|
151
|
-
hsva: (e, t, n, s) =>
|
|
151
|
+
hsva: (e, t, n, s) => L({
|
|
152
152
|
h: e,
|
|
153
153
|
s: t,
|
|
154
154
|
v: n,
|
|
155
155
|
a: s
|
|
156
156
|
})
|
|
157
157
|
};
|
|
158
|
-
function
|
|
158
|
+
function $(e) {
|
|
159
159
|
if (typeof e == "number")
|
|
160
160
|
return (isNaN(e) || e < 0 || e > 16777215) && D(`'${e}' is not a valid hex color`), {
|
|
161
161
|
r: (e & 16711680) >> 16,
|
|
162
162
|
g: (e & 65280) >> 8,
|
|
163
163
|
b: e & 255
|
|
164
164
|
};
|
|
165
|
-
if (typeof e == "string" &&
|
|
165
|
+
if (typeof e == "string" && fe.test(e)) {
|
|
166
166
|
const {
|
|
167
167
|
groups: t
|
|
168
|
-
} = e.match(
|
|
168
|
+
} = e.match(fe), {
|
|
169
169
|
fn: n,
|
|
170
170
|
values: s
|
|
171
171
|
} = t, a = s.split(/,\s*/).map((r) => r.endsWith("%") && ["hsl", "hsla", "hsv", "hsva"].includes(n) ? parseFloat(r) / 100 : parseFloat(r));
|
|
@@ -179,14 +179,14 @@ function I(e) {
|
|
|
179
179
|
if (Y(e, ["r", "g", "b"]))
|
|
180
180
|
return e;
|
|
181
181
|
if (Y(e, ["h", "s", "l"]))
|
|
182
|
-
return
|
|
182
|
+
return L(_e(e));
|
|
183
183
|
if (Y(e, ["h", "s", "v"]))
|
|
184
|
-
return
|
|
184
|
+
return L(e);
|
|
185
185
|
}
|
|
186
186
|
throw new TypeError(`Invalid color: ${e == null ? e : String(e) || e.constructor.name}
|
|
187
187
|
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function L(e) {
|
|
190
190
|
const {
|
|
191
191
|
h: t,
|
|
192
192
|
s: n,
|
|
@@ -203,10 +203,10 @@ function T(e) {
|
|
|
203
203
|
a
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
206
|
+
function de(e) {
|
|
207
|
+
return L(_e(e));
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function _e(e) {
|
|
210
210
|
const {
|
|
211
211
|
h: t,
|
|
212
212
|
s: n,
|
|
@@ -222,7 +222,7 @@ function pe(e) {
|
|
|
222
222
|
}
|
|
223
223
|
function lt(e) {
|
|
224
224
|
e = rt(e);
|
|
225
|
-
let [t, n, s, a] =
|
|
225
|
+
let [t, n, s, a] = Ye(e, 2).map((r) => parseInt(r, 16));
|
|
226
226
|
return a = a === void 0 ? a : a / 255, {
|
|
227
227
|
r: t,
|
|
228
228
|
g: n,
|
|
@@ -231,34 +231,34 @@ function lt(e) {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
function rt(e) {
|
|
234
|
-
return e.startsWith("#") && (e = e.slice(1)), e = e.replace(/([^0-9a-f])/gi, "F"), (e.length === 3 || e.length === 4) && (e = e.split("").map((t) => t + t).join("")), e.length !== 6 && (e =
|
|
234
|
+
return e.startsWith("#") && (e = e.slice(1)), e = e.replace(/([^0-9a-f])/gi, "F"), (e.length === 3 || e.length === 4) && (e = e.split("").map((t) => t + t).join("")), e.length !== 6 && (e = ne(ne(e, 6), 8, "F")), e;
|
|
235
235
|
}
|
|
236
236
|
function it(e) {
|
|
237
|
-
const t = Math.abs(
|
|
238
|
-
return Math.abs(
|
|
237
|
+
const t = Math.abs(ce($(0), $(e)));
|
|
238
|
+
return Math.abs(ce($(16777215), $(e))) > Math.min(t, 50) ? "#fff" : "#000";
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
const n =
|
|
240
|
+
function T(e, t) {
|
|
241
|
+
const n = Me();
|
|
242
242
|
if (!n)
|
|
243
243
|
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
244
244
|
return n;
|
|
245
245
|
}
|
|
246
246
|
function ut() {
|
|
247
247
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
|
|
248
|
-
const t =
|
|
248
|
+
const t = T(e).type;
|
|
249
249
|
return F((t == null ? void 0 : t.aliasName) || (t == null ? void 0 : t.name));
|
|
250
250
|
}
|
|
251
251
|
function ot(e) {
|
|
252
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
252
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : T("injectSelf");
|
|
253
253
|
const {
|
|
254
254
|
provides: n
|
|
255
255
|
} = t;
|
|
256
256
|
if (n && e in n)
|
|
257
257
|
return n[e];
|
|
258
258
|
}
|
|
259
|
-
const
|
|
260
|
-
function
|
|
261
|
-
const e = J
|
|
259
|
+
const J = Symbol.for("vuetify:defaults");
|
|
260
|
+
function Fe() {
|
|
261
|
+
const e = Q(J);
|
|
262
262
|
if (!e)
|
|
263
263
|
throw new Error("[Vuetify] Could not find defaults instance");
|
|
264
264
|
return e;
|
|
@@ -268,21 +268,21 @@ function ct(e, t) {
|
|
|
268
268
|
return typeof ((n = e.props) == null ? void 0 : n[t]) < "u" || typeof ((s = e.props) == null ? void 0 : s[F(t)]) < "u";
|
|
269
269
|
}
|
|
270
270
|
function ft() {
|
|
271
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
272
|
-
const s =
|
|
271
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Fe();
|
|
272
|
+
const s = T("useDefaults");
|
|
273
273
|
if (t = t ?? s.type.name ?? s.type.__name, !t)
|
|
274
274
|
throw new Error("[Vuetify] Could not determine component name");
|
|
275
|
-
const a =
|
|
275
|
+
const a = k(() => {
|
|
276
276
|
var o;
|
|
277
277
|
return (o = n.value) == null ? void 0 : o[e._as ?? t];
|
|
278
278
|
}), r = new Proxy(e, {
|
|
279
279
|
get(o, f) {
|
|
280
|
-
var g, S, V, b,
|
|
280
|
+
var g, S, V, b, z, R, d;
|
|
281
281
|
const h = Reflect.get(o, f);
|
|
282
|
-
return f === "class" || f === "style" ? [(g = a.value) == null ? void 0 : g[f], h].filter((l) => l != null) : typeof f == "string" && !ct(s.vnode, f) ? ((S = a.value) == null ? void 0 : S[f]) !== void 0 ? (V = a.value) == null ? void 0 : V[f] : ((
|
|
282
|
+
return f === "class" || f === "style" ? [(g = a.value) == null ? void 0 : g[f], h].filter((l) => l != null) : typeof f == "string" && !ct(s.vnode, f) ? ((S = a.value) == null ? void 0 : S[f]) !== void 0 ? (V = a.value) == null ? void 0 : V[f] : ((z = (b = n.value) == null ? void 0 : b.global) == null ? void 0 : z[f]) !== void 0 ? (d = (R = n.value) == null ? void 0 : R.global) == null ? void 0 : d[f] : h : h;
|
|
283
283
|
}
|
|
284
|
-
}), u =
|
|
285
|
-
|
|
284
|
+
}), u = Te();
|
|
285
|
+
Ce(() => {
|
|
286
286
|
if (a.value) {
|
|
287
287
|
const o = Object.entries(a.value).filter((f) => {
|
|
288
288
|
let [h] = f;
|
|
@@ -293,24 +293,24 @@ function ft() {
|
|
|
293
293
|
u.value = void 0;
|
|
294
294
|
});
|
|
295
295
|
function m() {
|
|
296
|
-
const o = ot(
|
|
297
|
-
ke(
|
|
296
|
+
const o = ot(J, s);
|
|
297
|
+
ke(J, k(() => u.value ? Ve((o == null ? void 0 : o.value) ?? {}, u.value) : o == null ? void 0 : o.value));
|
|
298
298
|
}
|
|
299
299
|
return {
|
|
300
300
|
props: r,
|
|
301
301
|
provideSubDefaults: m
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function q(e) {
|
|
305
305
|
if (e._setup = e._setup ?? e.setup, !e.name)
|
|
306
306
|
return D("The component is missing an explicit name, unable to generate default prop value"), e;
|
|
307
307
|
if (e._setup) {
|
|
308
308
|
e.props = w(e.props ?? {}, e.name)();
|
|
309
309
|
const t = Object.keys(e.props).filter((n) => n !== "class" && n !== "style");
|
|
310
310
|
e.filterProps = function(s) {
|
|
311
|
-
return
|
|
311
|
+
return Ze(s, t);
|
|
312
312
|
}, e.props._as = String, e.setup = function(s, a) {
|
|
313
|
-
const r =
|
|
313
|
+
const r = Fe();
|
|
314
314
|
if (!r.value)
|
|
315
315
|
return e._setup(s, a);
|
|
316
316
|
const {
|
|
@@ -322,29 +322,29 @@ function U(e) {
|
|
|
322
322
|
}
|
|
323
323
|
return e;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Be() {
|
|
326
326
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
327
|
-
return (t) => (e ?
|
|
327
|
+
return (t) => (e ? q : M)(t);
|
|
328
328
|
}
|
|
329
329
|
function dt(e) {
|
|
330
|
-
const t =
|
|
330
|
+
const t = T("useRender");
|
|
331
331
|
t.render = e;
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const me = Symbol.for("vuetify:theme"), mt = w({
|
|
334
334
|
theme: String
|
|
335
335
|
}, "theme");
|
|
336
336
|
function gt(e) {
|
|
337
|
-
|
|
338
|
-
const t =
|
|
337
|
+
T("provideTheme");
|
|
338
|
+
const t = Q(me, null);
|
|
339
339
|
if (!t)
|
|
340
340
|
throw new Error("Could not find Vuetify theme injection");
|
|
341
|
-
const n =
|
|
341
|
+
const n = k(() => e.theme ?? t.name.value), s = k(() => t.themes.value[n.value]), a = k(() => t.isDisabled ? void 0 : `v-theme--${n.value}`), r = {
|
|
342
342
|
...t,
|
|
343
343
|
name: n,
|
|
344
344
|
current: s,
|
|
345
345
|
themeClasses: a
|
|
346
346
|
};
|
|
347
|
-
return ke(
|
|
347
|
+
return ke(me, r), r;
|
|
348
348
|
}
|
|
349
349
|
const yt = w({
|
|
350
350
|
tag: {
|
|
@@ -353,12 +353,12 @@ const yt = w({
|
|
|
353
353
|
}
|
|
354
354
|
}, "tag");
|
|
355
355
|
function ht(e) {
|
|
356
|
-
return
|
|
356
|
+
return pe(() => {
|
|
357
357
|
const t = [], n = {};
|
|
358
358
|
if (e.value.background)
|
|
359
359
|
if (X(e.value.background)) {
|
|
360
360
|
if (n.backgroundColor = e.value.background, !e.value.text && st(e.value.background)) {
|
|
361
|
-
const s =
|
|
361
|
+
const s = $(e.value.background);
|
|
362
362
|
if (s.a == null || s.a === 1) {
|
|
363
363
|
const a = it(s);
|
|
364
364
|
n.color = a, n.caretColor = a;
|
|
@@ -373,8 +373,8 @@ function ht(e) {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
function vt(e, t) {
|
|
376
|
-
const n =
|
|
377
|
-
text:
|
|
376
|
+
const n = k(() => ({
|
|
377
|
+
text: ze(e) ? e.value : null
|
|
378
378
|
})), {
|
|
379
379
|
colorClasses: s,
|
|
380
380
|
colorStyles: a
|
|
@@ -384,99 +384,99 @@ function vt(e, t) {
|
|
|
384
384
|
textColorStyles: a
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
-
const
|
|
387
|
+
const Ie = [String, Function, Object, Array], Ct = Symbol.for("vuetify:icons"), Z = w({
|
|
388
388
|
icon: {
|
|
389
|
-
type:
|
|
389
|
+
type: Ie
|
|
390
390
|
},
|
|
391
391
|
// Could not remove this and use makeTagProps, types complained because it is not required
|
|
392
392
|
tag: {
|
|
393
393
|
type: String,
|
|
394
394
|
required: !0
|
|
395
395
|
}
|
|
396
|
-
}, "icon"),
|
|
396
|
+
}, "icon"), ge = Be()({
|
|
397
397
|
name: "VComponentIcon",
|
|
398
|
-
props:
|
|
398
|
+
props: Z(),
|
|
399
399
|
setup(e, t) {
|
|
400
400
|
let {
|
|
401
401
|
slots: n
|
|
402
402
|
} = t;
|
|
403
403
|
return () => {
|
|
404
404
|
const s = e.icon;
|
|
405
|
-
return
|
|
405
|
+
return C(e.tag, null, {
|
|
406
406
|
default: () => {
|
|
407
407
|
var a;
|
|
408
|
-
return [e.icon ?
|
|
408
|
+
return [e.icon ? C(s, null, null) : (a = n.default) == null ? void 0 : a.call(n)];
|
|
409
409
|
}
|
|
410
410
|
});
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
}),
|
|
413
|
+
}), kt = q({
|
|
414
414
|
name: "VSvgIcon",
|
|
415
415
|
inheritAttrs: !1,
|
|
416
|
-
props:
|
|
416
|
+
props: Z(),
|
|
417
417
|
setup(e, t) {
|
|
418
418
|
let {
|
|
419
419
|
attrs: n
|
|
420
420
|
} = t;
|
|
421
|
-
return () =>
|
|
421
|
+
return () => C(e.tag, Re(n, {
|
|
422
422
|
style: null
|
|
423
423
|
}), {
|
|
424
|
-
default: () => [
|
|
424
|
+
default: () => [C("svg", {
|
|
425
425
|
class: "v-icon__svg",
|
|
426
426
|
xmlns: "http://www.w3.org/2000/svg",
|
|
427
427
|
viewBox: "0 0 24 24",
|
|
428
428
|
role: "img",
|
|
429
429
|
"aria-hidden": "true"
|
|
430
|
-
}, [Array.isArray(e.icon) ? e.icon.map((s) => Array.isArray(s) ?
|
|
430
|
+
}, [Array.isArray(e.icon) ? e.icon.map((s) => Array.isArray(s) ? C("path", {
|
|
431
431
|
d: s[0],
|
|
432
432
|
"fill-opacity": s[1]
|
|
433
|
-
}, null) :
|
|
433
|
+
}, null) : C("path", {
|
|
434
434
|
d: s
|
|
435
|
-
}, null)) :
|
|
435
|
+
}, null)) : C("path", {
|
|
436
436
|
d: e.icon
|
|
437
437
|
}, null)])]
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
|
-
|
|
441
|
+
q({
|
|
442
442
|
name: "VLigatureIcon",
|
|
443
|
-
props:
|
|
443
|
+
props: Z(),
|
|
444
444
|
setup(e) {
|
|
445
|
-
return () =>
|
|
445
|
+
return () => C(e.tag, null, {
|
|
446
446
|
default: () => [e.icon]
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
|
-
|
|
450
|
+
q({
|
|
451
451
|
name: "VClassIcon",
|
|
452
|
-
props:
|
|
452
|
+
props: Z(),
|
|
453
453
|
setup(e) {
|
|
454
|
-
return () =>
|
|
454
|
+
return () => C(e.tag, {
|
|
455
455
|
class: e.icon
|
|
456
456
|
}, null);
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
459
|
const xt = (e) => {
|
|
460
|
-
const t =
|
|
460
|
+
const t = Q(Ct);
|
|
461
461
|
if (!t)
|
|
462
462
|
throw new Error("Missing Vuetify Icons provide!");
|
|
463
463
|
return {
|
|
464
|
-
iconData:
|
|
464
|
+
iconData: k(() => {
|
|
465
465
|
var o;
|
|
466
|
-
const s =
|
|
466
|
+
const s = W(e);
|
|
467
467
|
if (!s)
|
|
468
468
|
return {
|
|
469
|
-
component:
|
|
469
|
+
component: ge
|
|
470
470
|
};
|
|
471
471
|
let a = s;
|
|
472
472
|
if (typeof a == "string" && (a = a.trim(), a.startsWith("$") && (a = (o = t.aliases) == null ? void 0 : o[a.slice(1)])), a || D(`Could not find aliased icon "${s}"`), Array.isArray(a))
|
|
473
473
|
return {
|
|
474
|
-
component:
|
|
474
|
+
component: kt,
|
|
475
475
|
icon: a
|
|
476
476
|
};
|
|
477
477
|
if (typeof a != "string")
|
|
478
478
|
return {
|
|
479
|
-
component:
|
|
479
|
+
component: ge,
|
|
480
480
|
icon: a
|
|
481
481
|
};
|
|
482
482
|
const r = Object.keys(t.sets).find((f) => typeof a == "string" && a.startsWith(`${f}:`)), u = r ? a.slice(r.length + 1) : a;
|
|
@@ -494,9 +494,9 @@ const xt = (e) => {
|
|
|
494
494
|
}, "size");
|
|
495
495
|
function Vt(e) {
|
|
496
496
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ut();
|
|
497
|
-
return
|
|
497
|
+
return pe(() => {
|
|
498
498
|
let n, s;
|
|
499
|
-
return
|
|
499
|
+
return Ke(bt, e.size) ? n = `${t}--size-${e.size}` : e.size && (s = {
|
|
500
500
|
width: A(e.size),
|
|
501
501
|
height: A(e.size)
|
|
502
502
|
}), {
|
|
@@ -510,14 +510,14 @@ const wt = w({
|
|
|
510
510
|
disabled: Boolean,
|
|
511
511
|
start: Boolean,
|
|
512
512
|
end: Boolean,
|
|
513
|
-
icon:
|
|
513
|
+
icon: Ie,
|
|
514
514
|
...qe(),
|
|
515
515
|
...St(),
|
|
516
516
|
...yt({
|
|
517
517
|
tag: "i"
|
|
518
518
|
}),
|
|
519
519
|
...mt()
|
|
520
|
-
}, "VIcon"), pt =
|
|
520
|
+
}, "VIcon"), pt = Be()({
|
|
521
521
|
name: "VIcon",
|
|
522
522
|
props: wt(),
|
|
523
523
|
setup(e, t) {
|
|
@@ -525,22 +525,22 @@ const wt = w({
|
|
|
525
525
|
attrs: n,
|
|
526
526
|
slots: s
|
|
527
527
|
} = t;
|
|
528
|
-
const a =
|
|
528
|
+
const a = I(), {
|
|
529
529
|
themeClasses: r
|
|
530
530
|
} = gt(e), {
|
|
531
531
|
iconData: u
|
|
532
|
-
} = xt(
|
|
532
|
+
} = xt(k(() => a.value || e.icon)), {
|
|
533
533
|
sizeClasses: m
|
|
534
534
|
} = Vt(e), {
|
|
535
535
|
textColorClasses: o,
|
|
536
536
|
textColorStyles: f
|
|
537
|
-
} = vt(
|
|
537
|
+
} = vt(Pe(e, "color"));
|
|
538
538
|
return dt(() => {
|
|
539
539
|
var S, V;
|
|
540
540
|
const h = (S = s.default) == null ? void 0 : S.call(s);
|
|
541
|
-
h && (a.value = (V =
|
|
541
|
+
h && (a.value = (V = we(h).filter((b) => b.type === Ne && b.children && typeof b.children == "string")[0]) == null ? void 0 : V.children);
|
|
542
542
|
const g = !!(n.onClick || n.onClickOnce);
|
|
543
|
-
return
|
|
543
|
+
return C(u.value.component, {
|
|
544
544
|
tag: e.tag,
|
|
545
545
|
icon: u.value.icon,
|
|
546
546
|
class: ["v-icon", "notranslate", r.value, m.value, o.value, {
|
|
@@ -562,7 +562,7 @@ const wt = w({
|
|
|
562
562
|
});
|
|
563
563
|
}), {};
|
|
564
564
|
}
|
|
565
|
-
}), _t = /* @__PURE__ */
|
|
565
|
+
}), _t = /* @__PURE__ */ M({
|
|
566
566
|
__name: "index",
|
|
567
567
|
props: /* @__PURE__ */ K({
|
|
568
568
|
min: { default: -1 / 0 },
|
|
@@ -576,15 +576,15 @@ const wt = w({
|
|
|
576
576
|
}),
|
|
577
577
|
emits: ["update:modelValue"],
|
|
578
578
|
setup(e) {
|
|
579
|
-
const t =
|
|
579
|
+
const t = xe(e, "modelValue"), n = e, s = k(() => ({
|
|
580
580
|
width: "250px"
|
|
581
581
|
}));
|
|
582
582
|
return (a, r) => {
|
|
583
|
-
const u =
|
|
584
|
-
return _(),
|
|
585
|
-
style:
|
|
583
|
+
const u = G("v-text-field");
|
|
584
|
+
return _(), be("div", {
|
|
585
|
+
style: Se(s.value)
|
|
586
586
|
}, [
|
|
587
|
-
|
|
587
|
+
C(u, {
|
|
588
588
|
"model-value": t.value,
|
|
589
589
|
variant: "outlined",
|
|
590
590
|
density: "compact",
|
|
@@ -595,7 +595,9 @@ const wt = w({
|
|
|
595
595
|
], 4);
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
})
|
|
598
|
+
});
|
|
599
|
+
var Ft = "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z", Bt = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z", It = "M19,13H5V11H19V13Z";
|
|
600
|
+
const ye = /* @__PURE__ */ M({
|
|
599
601
|
__name: "index",
|
|
600
602
|
props: /* @__PURE__ */ K({
|
|
601
603
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -606,23 +608,23 @@ const wt = w({
|
|
|
606
608
|
}),
|
|
607
609
|
emits: /* @__PURE__ */ K(["delete"], ["update:modelValue"]),
|
|
608
610
|
setup(e, { emit: t }) {
|
|
609
|
-
const n =
|
|
611
|
+
const n = xe(e, "modelValue"), s = e, a = t;
|
|
610
612
|
return (r, u) => {
|
|
611
|
-
const m =
|
|
612
|
-
return _(),
|
|
613
|
+
const m = G("v-text-field");
|
|
614
|
+
return _(), U(m, {
|
|
613
615
|
modelValue: n.value,
|
|
614
616
|
"onUpdate:modelValue": u[0] || (u[0] = (o) => n.value = o),
|
|
615
617
|
"onClick:appendInner": u[1] || (u[1] = (o) => a("delete")),
|
|
616
618
|
variant: "outlined",
|
|
617
619
|
density: "compact",
|
|
618
|
-
"append-inner-icon": s.hasDelete ?
|
|
620
|
+
"append-inner-icon": s.hasDelete ? W(It) : "",
|
|
619
621
|
readonly: s.readonly,
|
|
620
622
|
"hide-details": "",
|
|
621
623
|
"single-line": ""
|
|
622
624
|
}, null, 8, ["modelValue", "append-inner-icon", "readonly"]);
|
|
623
625
|
};
|
|
624
626
|
}
|
|
625
|
-
}),
|
|
627
|
+
}), he = /* @__PURE__ */ M({
|
|
626
628
|
__name: "index",
|
|
627
629
|
props: {
|
|
628
630
|
title: {},
|
|
@@ -633,40 +635,40 @@ const wt = w({
|
|
|
633
635
|
},
|
|
634
636
|
emits: ["collapse", "create", "delete"],
|
|
635
637
|
setup(e, { emit: t }) {
|
|
636
|
-
const n = e, s = t, a =
|
|
638
|
+
const n = e, s = t, a = k(() => ({
|
|
637
639
|
height: "36px"
|
|
638
640
|
}));
|
|
639
641
|
return (r, u) => {
|
|
640
|
-
const m =
|
|
641
|
-
return
|
|
642
|
+
const m = G("v-icon"), o = G("v-spacer"), f = Oe("ripple");
|
|
643
|
+
return Ee((_(), be("div", {
|
|
642
644
|
onClick: u[2] || (u[2] = (h) => s("collapse", !n.collapse)),
|
|
643
645
|
class: "d-flex align-center",
|
|
644
|
-
style:
|
|
646
|
+
style: Se(a.value)
|
|
645
647
|
}, [
|
|
646
|
-
|
|
648
|
+
C(m, {
|
|
647
649
|
class: "mr-1",
|
|
648
|
-
icon: n.collapse ?
|
|
650
|
+
icon: n.collapse ? W(Bt) : W(Ft)
|
|
649
651
|
}, null, 8, ["icon"]),
|
|
650
652
|
He("span", null, We(n.title), 1),
|
|
651
|
-
|
|
652
|
-
n.hasCreate ? (_(),
|
|
653
|
+
C(o),
|
|
654
|
+
n.hasCreate ? (_(), U(m, {
|
|
653
655
|
key: 0,
|
|
654
|
-
onClick: u[0] || (u[0] =
|
|
656
|
+
onClick: u[0] || (u[0] = j((h) => s("create"), ["stop"])),
|
|
655
657
|
class: "ml-3",
|
|
656
658
|
icon: "$plus"
|
|
657
|
-
})) :
|
|
658
|
-
n.hasDelete ? (_(),
|
|
659
|
+
})) : ee("", !0),
|
|
660
|
+
n.hasDelete ? (_(), U(m, {
|
|
659
661
|
key: 1,
|
|
660
|
-
onClick: u[1] || (u[1] =
|
|
662
|
+
onClick: u[1] || (u[1] = j((h) => s("delete", n.index), ["stop"])),
|
|
661
663
|
class: "ml-3",
|
|
662
664
|
icon: "$sub"
|
|
663
|
-
})) :
|
|
665
|
+
})) : ee("", !0)
|
|
664
666
|
], 4)), [
|
|
665
667
|
[f]
|
|
666
668
|
]);
|
|
667
669
|
};
|
|
668
670
|
}
|
|
669
|
-
}),
|
|
671
|
+
}), $t = /* @__PURE__ */ M({
|
|
670
672
|
__name: "index",
|
|
671
673
|
props: {
|
|
672
674
|
unique: {},
|
|
@@ -675,13 +677,13 @@ const wt = w({
|
|
|
675
677
|
},
|
|
676
678
|
emits: ["change"],
|
|
677
679
|
setup(e, { emit: t }) {
|
|
678
|
-
const { t: n } = Ge(), { backgroundColor2: s } = Ue(), a = e, r = t, u =
|
|
680
|
+
const { t: n } = Ge(), { backgroundColor2: s } = Ue(), a = e, r = t, u = I("20px"), m = I("56px"), o = I("10px"), f = I("250px"), h = ve({});
|
|
679
681
|
function g(d, l, i, c) {
|
|
680
|
-
return l.keyFlag || (d += l.key), l.children ? l.array ? S(d, l, i, c) : V(d, l, i, c) : l.array ? b(d, l, i) :
|
|
682
|
+
return l.keyFlag || (d += l.key), l.children ? l.array ? S(d, l, i, c) : V(d, l, i, c) : l.array ? b(d, l, i) : z(d, l, i);
|
|
681
683
|
}
|
|
682
684
|
function S(d, l, i, c) {
|
|
683
685
|
i[l.key] instanceof Array || (i[l.key] = [], r("change", d, i[l.key]));
|
|
684
|
-
const
|
|
686
|
+
const B = y(he, {
|
|
685
687
|
title: n(l.name),
|
|
686
688
|
collapse: !!c.collapse,
|
|
687
689
|
onCollapse: (v) => {
|
|
@@ -716,12 +718,12 @@ const wt = w({
|
|
|
716
718
|
},
|
|
717
719
|
(() => {
|
|
718
720
|
const v = [];
|
|
719
|
-
return v.push(
|
|
721
|
+
return v.push(B), c.collapse || v.push(x), v;
|
|
720
722
|
})()
|
|
721
723
|
);
|
|
722
724
|
}
|
|
723
725
|
function V(d, l, i, c) {
|
|
724
|
-
const
|
|
726
|
+
const B = y(he, {
|
|
725
727
|
title: n(l.name),
|
|
726
728
|
collapse: !!c.collapse,
|
|
727
729
|
onCollapse: (v) => {
|
|
@@ -735,19 +737,19 @@ const wt = w({
|
|
|
735
737
|
}
|
|
736
738
|
},
|
|
737
739
|
(() => {
|
|
738
|
-
var
|
|
740
|
+
var P;
|
|
739
741
|
const v = [];
|
|
740
|
-
return (
|
|
741
|
-
typeof c[
|
|
742
|
+
return (P = l.children) == null || P.forEach((N) => {
|
|
743
|
+
typeof c[N.key] != "object" && (c[N.key] = {
|
|
742
744
|
collapse: !0
|
|
743
745
|
});
|
|
744
|
-
const
|
|
746
|
+
const $e = g(
|
|
745
747
|
d,
|
|
746
|
-
|
|
748
|
+
N,
|
|
747
749
|
l.keyFlag ? i : (typeof i[l.key] != "object" && (i[l.key] = {}, r("change", d, i[l.key])), i[l.key]),
|
|
748
|
-
c[
|
|
750
|
+
c[N.key]
|
|
749
751
|
);
|
|
750
|
-
v.push(
|
|
752
|
+
v.push($e);
|
|
751
753
|
}), v;
|
|
752
754
|
})()
|
|
753
755
|
);
|
|
@@ -761,12 +763,12 @@ const wt = w({
|
|
|
761
763
|
},
|
|
762
764
|
(() => {
|
|
763
765
|
const v = [];
|
|
764
|
-
return v.push(
|
|
766
|
+
return v.push(B), c.collapse || v.push(x), v;
|
|
765
767
|
})()
|
|
766
768
|
);
|
|
767
769
|
}
|
|
768
770
|
function b(d, l, i) {
|
|
769
|
-
if (i[l.key] instanceof Array || (i[l.key] =
|
|
771
|
+
if (i[l.key] instanceof Array || (i[l.key] = O(l), r("change", d, i[l.key])), l.ui === "strInput")
|
|
770
772
|
return y(
|
|
771
773
|
"div",
|
|
772
774
|
{
|
|
@@ -809,10 +811,10 @@ const wt = w({
|
|
|
809
811
|
}
|
|
810
812
|
},
|
|
811
813
|
[
|
|
812
|
-
y(
|
|
814
|
+
y(ye, {
|
|
813
815
|
modelValue: i[l.key][x],
|
|
814
|
-
"onUpdate:modelValue": (
|
|
815
|
-
i[l.key][x] =
|
|
816
|
+
"onUpdate:modelValue": (P) => {
|
|
817
|
+
i[l.key][x] = P, r("change", d, i[l.key]);
|
|
816
818
|
},
|
|
817
819
|
hasDelete: !0,
|
|
818
820
|
onDelete: () => {
|
|
@@ -823,7 +825,7 @@ const wt = w({
|
|
|
823
825
|
);
|
|
824
826
|
c.push(v);
|
|
825
827
|
}
|
|
826
|
-
const
|
|
828
|
+
const B = y(
|
|
827
829
|
"div",
|
|
828
830
|
{
|
|
829
831
|
class: {
|
|
@@ -846,16 +848,16 @@ const wt = w({
|
|
|
846
848
|
},
|
|
847
849
|
[y(pt, { icon: "$plus" })]
|
|
848
850
|
);
|
|
849
|
-
return c.push(
|
|
851
|
+
return c.push(B), c;
|
|
850
852
|
})()
|
|
851
853
|
)
|
|
852
854
|
]
|
|
853
855
|
);
|
|
854
856
|
console.assert(!1);
|
|
855
857
|
}
|
|
856
|
-
function
|
|
858
|
+
function z(d, l, i) {
|
|
857
859
|
if (l.ui === "void")
|
|
858
|
-
i[l.key] === void 0 && (console.assert(l.default !== void 0), i[l.key] =
|
|
860
|
+
i[l.key] === void 0 && (console.assert(l.default !== void 0), i[l.key] = O(l), r("change", d, i[l.key]));
|
|
859
861
|
else {
|
|
860
862
|
if (l.ui === "strInput")
|
|
861
863
|
return y(
|
|
@@ -886,8 +888,8 @@ const wt = w({
|
|
|
886
888
|
}
|
|
887
889
|
},
|
|
888
890
|
[
|
|
889
|
-
y(
|
|
890
|
-
modelValue: l.static ? l.value : (typeof i[l.key] != "string" && (i[l.key] =
|
|
891
|
+
y(ye, {
|
|
892
|
+
modelValue: l.static ? l.value : (typeof i[l.key] != "string" && (i[l.key] = O(l), r("change", d, i[l.key])), i[l.key]),
|
|
891
893
|
"onUpdate:modelValue": (c) => {
|
|
892
894
|
l.static || c !== i[l.key] && (i[l.key] = c, r("change", d, c));
|
|
893
895
|
},
|
|
@@ -927,7 +929,7 @@ const wt = w({
|
|
|
927
929
|
},
|
|
928
930
|
[
|
|
929
931
|
y(_t, {
|
|
930
|
-
modelValue: (typeof i[l.key] != "number" && (i[l.key] =
|
|
932
|
+
modelValue: (typeof i[l.key] != "number" && (i[l.key] = O(l), r("change", d, i[l.key])), i[l.key]),
|
|
931
933
|
"onUpdate:modelValue": (c) => {
|
|
932
934
|
c !== i[l.key] && (i[l.key] = c, r("change", d, c));
|
|
933
935
|
},
|
|
@@ -939,7 +941,7 @@ const wt = w({
|
|
|
939
941
|
);
|
|
940
942
|
}
|
|
941
943
|
}
|
|
942
|
-
const
|
|
944
|
+
const R = () => y(
|
|
943
945
|
"div",
|
|
944
946
|
{
|
|
945
947
|
class: {
|
|
@@ -959,11 +961,11 @@ const wt = w({
|
|
|
959
961
|
return d;
|
|
960
962
|
})()
|
|
961
963
|
);
|
|
962
|
-
return (d, l) => (_(),
|
|
964
|
+
return (d, l) => (_(), U(R));
|
|
963
965
|
}
|
|
964
|
-
}),
|
|
965
|
-
e.component("x-prop-tree",
|
|
966
|
-
},
|
|
966
|
+
}), At = (e) => {
|
|
967
|
+
e.component("x-prop-tree", $t);
|
|
968
|
+
}, zt = { install: At };
|
|
967
969
|
export {
|
|
968
|
-
|
|
970
|
+
zt as default
|
|
969
971
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-prop-tree",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"vue": "^3.4.30",
|
|
26
26
|
"vue-i18n": "^9.13.1",
|
|
27
27
|
"vuetify": "^3.6.10",
|
|
28
|
-
"x-essential-lib": "^0.5.
|
|
29
|
-
"x-runtime-lib": "^0.3.
|
|
28
|
+
"x-essential-lib": "^0.5.84",
|
|
29
|
+
"x-runtime-lib": "^0.3.7"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@mdi/js": "^7.4.47",
|