x-prop-tree 0.5.14 → 0.5.15

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.
Files changed (2) hide show
  1. package/dist/index.js +41 -41
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { provide as Me, inject as Ve, defineComponent as K, ref as F, computed as G, resolveComponent as L, openBlock as S, createBlock as R, unref as E, isRef as nt, withCtx as Y, createVNode as B, createElementBlock as k, Fragment as He, renderList as qt, createTextVNode as at, toDisplayString as ne, resolveDirective as ae, withDirectives as re, normalizeStyle as ie, withModifiers as z, createElementVNode as q, createCommentVNode as I, renderSlot as Hn, h, mergeModels as X, useModel as oe, useId as Gn, withKeys as Kn, mergeProps as It, watch as Ce, watchEffect as zn, reactive as qn, onMounted as In, onBeforeUnmount as Xn } from "vue";
2
2
  import { useI18n as de } from "vue-i18n";
3
- import { useViewStack as Xt, useColor as $e, eventBus as Ae, useSystem as Zn } from "x-essential-lib";
3
+ import { useViewStack as Xt, useColor as Te, eventBus as _e, useSystem as Zn } from "x-essential-lib";
4
4
  import { getPropDefault as N, parsePixelStr as Yn, parsePercentStr as Jn } from "x-runtime-lib";
5
5
  import { useDisplay as Wn } from "vuetify";
6
6
  import { state as Qn } from "x-state-lib";
7
- var Zt = typeof global == "object" && global && global.Object === Object && global, er = typeof self == "object" && self && self.Object === Object && self, W = Zt || er || Function("return this")(), se = W.Symbol, Yt = Object.prototype, tr = Yt.hasOwnProperty, nr = Yt.toString, Se = se ? se.toStringTag : void 0;
7
+ var Zt = typeof global == "object" && global && global.Object === Object && global, er = typeof self == "object" && self && self.Object === Object && self, W = Zt || er || Function("return this")(), se = W.Symbol, Yt = Object.prototype, tr = Yt.hasOwnProperty, nr = Yt.toString, we = se ? se.toStringTag : void 0;
8
8
  function rr(e) {
9
- var t = tr.call(e, Se), n = e[Se];
9
+ var t = tr.call(e, we), n = e[we];
10
10
  try {
11
- e[Se] = void 0;
11
+ e[we] = void 0;
12
12
  var r = !0;
13
13
  } catch {
14
14
  }
15
15
  var l = nr.call(e);
16
- return r && (t ? e[Se] = n : delete e[Se]), l;
16
+ return r && (t ? e[we] = n : delete e[we]), l;
17
17
  }
18
18
  var or = Object.prototype, lr = or.toString;
19
19
  function ir(e) {
@@ -176,13 +176,13 @@ function ft(e) {
176
176
  return e(t);
177
177
  };
178
178
  }
179
- var on = typeof exports == "object" && exports && !exports.nodeType && exports, Pe = on && typeof module == "object" && module && !module.nodeType && module, mo = Pe && Pe.exports === on, Qe = mo && Zt.process, be = function() {
179
+ var on = typeof exports == "object" && exports && !exports.nodeType && exports, Pe = on && typeof module == "object" && module && !module.nodeType && module, mo = Pe && Pe.exports === on, Qe = mo && Zt.process, $e = function() {
180
180
  try {
181
181
  var e = Pe && Pe.require && Pe.require("util").types;
182
182
  return e || Qe && Qe.binding && Qe.binding("util");
183
183
  } catch {
184
184
  }
185
- }(), Ct = be && be.isTypedArray, ln = Ct ? ft(Ct) : vo, go = Object.prototype, yo = go.hasOwnProperty;
185
+ }(), Ct = $e && $e.isTypedArray, ln = Ct ? ft(Ct) : vo, go = Object.prototype, yo = go.hasOwnProperty;
186
186
  function sn(e, t) {
187
187
  var n = Oe(e), r = !n && Fr(e), l = !n && !r && Ge(e), o = !n && !r && !l && ln(e), i = n || r || l || o, s = i ? jr(e.length, String) : [], a = s.length;
188
188
  for (var u in e)
@@ -524,11 +524,11 @@ var Xl = "[object Map]";
524
524
  function Zl(e) {
525
525
  return ce(e) && Z(e) == Xl;
526
526
  }
527
- var Bt = be && be.isMap, Yl = Bt ? ft(Bt) : Zl, Jl = "[object Set]";
527
+ var Bt = $e && $e.isMap, Yl = Bt ? ft(Bt) : Zl, Jl = "[object Set]";
528
528
  function Wl(e) {
529
529
  return ce(e) && Z(e) == Jl;
530
530
  }
531
- var Ft = be && be.isSet, Ql = Ft ? ft(Ft) : Wl, ei = 1, ti = 2, ni = 4, mn = "[object Arguments]", ri = "[object Array]", oi = "[object Boolean]", li = "[object Date]", ii = "[object Error]", gn = "[object Function]", si = "[object GeneratorFunction]", ai = "[object Map]", ui = "[object Number]", yn = "[object Object]", ci = "[object RegExp]", fi = "[object Set]", di = "[object String]", pi = "[object Symbol]", vi = "[object WeakMap]", mi = "[object ArrayBuffer]", gi = "[object DataView]", yi = "[object Float32Array]", hi = "[object Float64Array]", _i = "[object Int8Array]", bi = "[object Int16Array]", $i = "[object Int32Array]", Ti = "[object Uint8Array]", Si = "[object Uint8ClampedArray]", wi = "[object Uint16Array]", Ai = "[object Uint32Array]", x = {};
531
+ var Ft = $e && $e.isSet, Ql = Ft ? ft(Ft) : Wl, ei = 1, ti = 2, ni = 4, mn = "[object Arguments]", ri = "[object Array]", oi = "[object Boolean]", li = "[object Date]", ii = "[object Error]", gn = "[object Function]", si = "[object GeneratorFunction]", ai = "[object Map]", ui = "[object Number]", yn = "[object Object]", ci = "[object RegExp]", fi = "[object Set]", di = "[object String]", pi = "[object Symbol]", vi = "[object WeakMap]", mi = "[object ArrayBuffer]", gi = "[object DataView]", yi = "[object Float32Array]", hi = "[object Float64Array]", _i = "[object Int8Array]", bi = "[object Int16Array]", $i = "[object Int32Array]", Ti = "[object Uint8Array]", Si = "[object Uint8ClampedArray]", wi = "[object Uint16Array]", Ai = "[object Uint32Array]", x = {};
532
532
  x[mn] = x[ri] = x[mi] = x[gi] = x[oi] = x[li] = x[yi] = x[hi] = x[_i] = x[bi] = x[$i] = x[ai] = x[ui] = x[yn] = x[ci] = x[fi] = x[di] = x[pi] = x[Ti] = x[Si] = x[wi] = x[Ai] = !0;
533
533
  x[ii] = x[gn] = x[vi] = !1;
534
534
  function ke(e, t, n, r, l, o) {
@@ -786,7 +786,7 @@ const Fe = (e, t) => {
786
786
  n = n.children.find((l) => l.key === r);
787
787
  }
788
788
  }), n;
789
- }, we = (e, t) => {
789
+ }, Ae = (e, t) => {
790
790
  let n = e;
791
791
  return t.forEach((r) => {
792
792
  if (!n) {
@@ -920,7 +920,7 @@ const Fe = (e, t) => {
920
920
  children: o.array ? [] : {}
921
921
  }, Ye([], o, n, l[o.key], r);
922
922
  }), e.value = l;
923
- }, _e = (e, t) => {
923
+ }, be = (e, t) => {
924
924
  let n = { change: !1, children: e };
925
925
  return t.forEach((r) => {
926
926
  if (!n)
@@ -962,13 +962,13 @@ const Ts = /* @__PURE__ */ K({
962
962
  __name: "menu",
963
963
  setup(e) {
964
964
  const { t } = de(), n = vs(), r = gs(), l = hs(), o = bs(), i = F(0), s = F(0), a = F([]), u = G(() => [i.value, s.value]), d = (y) => {
965
- const $ = () => !(a.value.length <= 0 || !_e(l.value, a.value)), A = () => {
965
+ const $ = () => !(a.value.length <= 0 || !be(l.value, a.value)), A = () => {
966
966
  if (!$())
967
967
  return;
968
968
  const V = Fe(n.value, a.value);
969
969
  if (V)
970
970
  if (V.ui) {
971
- const P = we(r.value, a.value.slice(0, -1));
971
+ const P = Ae(r.value, a.value.slice(0, -1));
972
972
  if (!P)
973
973
  return;
974
974
  P[a.value.at(-1)] = N(V), o(a.value, P[a.value.at(-1)]);
@@ -979,12 +979,12 @@ const Ts = /* @__PURE__ */ K({
979
979
  return;
980
980
  }
981
981
  if (typeof P == "string") {
982
- const U = we(r.value, a.value.slice(0, -1));
982
+ const U = Ae(r.value, a.value.slice(0, -1));
983
983
  if (!U)
984
984
  return;
985
985
  U[a.value.at(-1)] = N(V), o(a.value, U[a.value.at(-1)]);
986
986
  } else {
987
- const U = we(r.value, a.value);
987
+ const U = Ae(r.value, a.value);
988
988
  if (!U)
989
989
  return;
990
990
  V.children.forEach((J) => {
@@ -992,7 +992,7 @@ const Ts = /* @__PURE__ */ K({
992
992
  });
993
993
  }
994
994
  } else {
995
- const P = we(r.value, a.value);
995
+ const P = Ae(r.value, a.value);
996
996
  if (!P)
997
997
  return;
998
998
  V.children.forEach((U) => {
@@ -1006,7 +1006,7 @@ const Ts = /* @__PURE__ */ K({
1006
1006
  });
1007
1007
  }, f = (y) => {
1008
1008
  const $ = () => {
1009
- const A = Fe(n.value, a.value), V = we(r.value, a.value);
1009
+ const A = Fe(n.value, a.value), V = Ae(r.value, a.value);
1010
1010
  localStorage.setItem("propTreeCopy", JSON.stringify({ prop: A, object: V }));
1011
1011
  };
1012
1012
  y.push({
@@ -1095,7 +1095,7 @@ const Re = /* @__PURE__ */ K({
1095
1095
  },
1096
1096
  emits: ["collapse", "menu", "create", "delete"],
1097
1097
  setup(e, { emit: t }) {
1098
- const { backgroundColor2: n, highlightColor: r } = $e(), l = t, o = F(!1), i = G(() => ({
1098
+ const { backgroundColor2: n, highlightColor: r } = Te(), l = t, o = F(!1), i = G(() => ({
1099
1099
  background: o.value ? r.value : n.value,
1100
1100
  height: "36px",
1101
1101
  marginBottom: "1px",
@@ -1145,7 +1145,7 @@ const Re = /* @__PURE__ */ K({
1145
1145
  },
1146
1146
  emits: ["menu"],
1147
1147
  setup(e, { emit: t }) {
1148
- const { backgroundColor2: n, highlightColor: r } = $e(), l = t, o = F(!1), i = G(() => ({
1148
+ const { backgroundColor2: n, highlightColor: r } = Te(), l = t, o = F(!1), i = G(() => ({
1149
1149
  background: o.value ? r.value : n.value,
1150
1150
  minHeight: e.minHeight,
1151
1151
  paddingRight: "4px",
@@ -1174,12 +1174,12 @@ function Cs(e, t, n) {
1174
1174
  const { t: r } = de();
1175
1175
  return { renderProp: (o, i, s) => {
1176
1176
  let a = r(i.name);
1177
- return _e(e.value, o) && (a += " *"), h(
1177
+ return be(e.value, o) && (a += " *"), h(
1178
1178
  As,
1179
1179
  {
1180
1180
  minHeight: t.value,
1181
1181
  onMenu: (u, d) => {
1182
- Ae.emit("propTreeMenu", { x: u, y: d, keys: o });
1182
+ _e.emit("propTreeMenu", { x: u, y: d, keys: o });
1183
1183
  }
1184
1184
  },
1185
1185
  () => [
@@ -1511,7 +1511,7 @@ const Rs = { class: "text-subtitle-2 ml-1" }, ks = { class: "text-caption text-g
1511
1511
  },
1512
1512
  emits: ["x-click"],
1513
1513
  setup(e, { emit: t }) {
1514
- const { backgroundColor2: n, highlightColor: r } = $e(), l = e, o = t, i = F(!1), s = G(() => ({
1514
+ const { backgroundColor2: n, highlightColor: r } = Te(), l = e, o = t, i = F(!1), s = G(() => ({
1515
1515
  background: i.value ? r.value : n.value,
1516
1516
  height: "30px",
1517
1517
  marginBottom: "1px",
@@ -1545,7 +1545,7 @@ const Rs = { class: "text-subtitle-2 ml-1" }, ks = { class: "text-caption text-g
1545
1545
  },
1546
1546
  emits: ["x-click"],
1547
1547
  setup(e, { emit: t }) {
1548
- const { backgroundColor2: n, highlightColor: r } = $e(), l = e, o = t, i = F(!1), s = G(() => ({
1548
+ const { backgroundColor2: n, highlightColor: r } = Te(), l = e, o = t, i = F(!1), s = G(() => ({
1549
1549
  background: i.value ? r.value : n.value,
1550
1550
  height: "48px",
1551
1551
  marginBottom: "1px",
@@ -1583,7 +1583,7 @@ const Rs = { class: "text-subtitle-2 ml-1" }, ks = { class: "text-caption text-g
1583
1583
  const a = $n(l, s);
1584
1584
  a && ls(l, s, !a.collapse);
1585
1585
  }, i = (s) => {
1586
- n.value = s, r.value = !1;
1586
+ n.value = s, r.value = !1, _e.emit("refreshDepends");
1587
1587
  };
1588
1588
  return (s, a) => E(l).length > 0 ? (S(), k("div", zs, [
1589
1589
  (S(!0), k(He, null, qt(E(l), (u) => (S(), k(He, {
@@ -1614,7 +1614,7 @@ const Rs = { class: "text-subtitle-2 ml-1" }, ks = { class: "text-caption text-g
1614
1614
  },
1615
1615
  emits: ["update:modelValue"],
1616
1616
  setup(e) {
1617
- const { t } = de(), n = Wn(), { sysBarAvail: r } = Zn(), { backgroundColor1: l } = $e(), o = oe(e, "modelValue"), i = Pn(), s = G(() => {
1617
+ const { t } = de(), n = Wn(), { sysBarAvail: r } = Zn(), { backgroundColor1: l } = Te(), o = oe(e, "modelValue"), i = Pn(), s = G(() => {
1618
1618
  let g = "100%";
1619
1619
  return n.mdAndUp.value && (g = "400px"), {
1620
1620
  background: l.value,
@@ -1937,7 +1937,7 @@ const oa = /* @__PURE__ */ K({
1937
1937
  },
1938
1938
  emits: ["change"],
1939
1939
  setup(e, { emit: t }) {
1940
- const { t: n } = de(), { backgroundColor1: r } = $e(), l = e, o = t, i = F("20px"), s = F("56px"), a = F("200px"), u = qn({}), d = F({}), f = (v, c) => {
1940
+ const { t: n } = de(), { backgroundColor1: r } = Te(), l = e, o = t, i = F("20px"), s = F("56px"), a = F("200px"), u = qn({}), d = F({}), f = (v, c) => {
1941
1941
  zt(d, l.config, l.object), o("change", v, c);
1942
1942
  };
1943
1943
  Ce(
@@ -1984,7 +1984,7 @@ const oa = /* @__PURE__ */ K({
1984
1984
  const $ = () => {
1985
1985
  clearTimeout(y), y = window.setTimeout(() => {
1986
1986
  C(), y && $();
1987
- }, 3e3);
1987
+ }, 1e3);
1988
1988
  }, A = () => {
1989
1989
  clearTimeout(y), y = void 0;
1990
1990
  };
@@ -2010,8 +2010,8 @@ const oa = /* @__PURE__ */ K({
2010
2010
  let D;
2011
2011
  b !== void 0 && !O ? (m[b] instanceof Array || (m[b] = N(c), f(v, m[c.key])), D = m[b]) : (m[c.key] instanceof Array || (m[c.key] = N(c), f(v, m[c.key])), D = m[c.key]);
2012
2012
  let Q = n(c.name);
2013
- p.collapse && _e(d.value, v) && (Q += " *");
2014
- const Te = h(Re, {
2013
+ p.collapse && be(d.value, v) && (Q += " *");
2014
+ const Se = h(Re, {
2015
2015
  title: Q,
2016
2016
  collapse: p.collapse,
2017
2017
  hasCreate: !0,
@@ -2019,7 +2019,7 @@ const oa = /* @__PURE__ */ K({
2019
2019
  p.collapse = T;
2020
2020
  },
2021
2021
  onMenu: (T, j) => {
2022
- Ae.emit("propTreeMenu", { x: T, y: j, keys: v });
2022
+ _e.emit("propTreeMenu", { x: T, y: j, keys: v });
2023
2023
  },
2024
2024
  onCreate: () => {
2025
2025
  D.push({}), f(v, D);
@@ -2044,7 +2044,7 @@ const oa = /* @__PURE__ */ K({
2044
2044
  });
2045
2045
  const Ee = [...v, j], Ne = p.children[j];
2046
2046
  let ht = n("x-prop-tree.entry", { index: j });
2047
- p.children[j].collapse && _e(d.value, Ee) && (ht += " *");
2047
+ p.children[j].collapse && be(d.value, Ee) && (ht += " *");
2048
2048
  const Fn = h(Re, {
2049
2049
  title: ht,
2050
2050
  collapse: p.children[j].collapse,
@@ -2058,7 +2058,7 @@ const oa = /* @__PURE__ */ K({
2058
2058
  p.children[j].collapse = ee;
2059
2059
  },
2060
2060
  onMenu: (ee, ue) => {
2061
- Ae.emit("propTreeMenu", { x: ee, y: ue, keys: Ee });
2061
+ _e.emit("propTreeMenu", { x: ee, y: ue, keys: Ee });
2062
2062
  },
2063
2063
  onDelete: (ee) => {
2064
2064
  if (!tt(p.children)) {
@@ -2113,7 +2113,7 @@ const oa = /* @__PURE__ */ K({
2113
2113
  },
2114
2114
  (() => {
2115
2115
  const T = [];
2116
- return T.push(Te), p.collapse || T.push(H), T;
2116
+ return T.push(Se), p.collapse || T.push(H), T;
2117
2117
  })()
2118
2118
  );
2119
2119
  }, jn = (v, c, m, p, b, O) => {
@@ -2124,7 +2124,7 @@ const oa = /* @__PURE__ */ K({
2124
2124
  if (!p)
2125
2125
  return console.assert(!1), h("div", "renderBranchScalar branch must be valid");
2126
2126
  let D = n(c.name);
2127
- p.collapse && _e(d.value, v) && (D += " *");
2127
+ p.collapse && be(d.value, v) && (D += " *");
2128
2128
  const Q = h(Re, {
2129
2129
  title: D,
2130
2130
  collapse: p.collapse,
@@ -2133,12 +2133,12 @@ const oa = /* @__PURE__ */ K({
2133
2133
  p.collapse = H;
2134
2134
  },
2135
2135
  onMenu: (H, T) => {
2136
- Ae.emit("propTreeMenu", { x: H, y: T, keys: v });
2136
+ _e.emit("propTreeMenu", { x: H, y: T, keys: v });
2137
2137
  },
2138
2138
  onDelete: () => {
2139
2139
  b === void 0 || O || (m.splice(b, 1), f(v.slice(0, -1), m));
2140
2140
  }
2141
- }), Te = h(
2141
+ }), Se = h(
2142
2142
  "div",
2143
2143
  {
2144
2144
  style: {
@@ -2175,7 +2175,7 @@ const oa = /* @__PURE__ */ K({
2175
2175
  },
2176
2176
  (() => {
2177
2177
  const H = [];
2178
- return H.push(Q), p.collapse || H.push(Te), H;
2178
+ return H.push(Q), p.collapse || H.push(Se), H;
2179
2179
  })()
2180
2180
  );
2181
2181
  }, En = (v, c, m, p, b, O) => {
@@ -2188,8 +2188,8 @@ const oa = /* @__PURE__ */ K({
2188
2188
  let D;
2189
2189
  b !== void 0 && !O ? (m[b] instanceof Array || (m[b] = N(c), f(v, m[b])), D = m[b]) : (m[c.key] instanceof Array || (m[c.key] = N(c), f(v, m[c.key])), D = m[c.key]);
2190
2190
  let Q = n(c.name);
2191
- p.collapse && _e(d.value, v) && (Q += " *");
2192
- const Te = h(Re, {
2191
+ p.collapse && be(d.value, v) && (Q += " *");
2192
+ const Se = h(Re, {
2193
2193
  title: Q,
2194
2194
  collapse: p.collapse,
2195
2195
  hasCreate: !0,
@@ -2197,7 +2197,7 @@ const oa = /* @__PURE__ */ K({
2197
2197
  p.collapse = T;
2198
2198
  },
2199
2199
  onMenu: (T, j) => {
2200
- Ae.emit("propTreeMenu", { x: T, y: j, keys: v });
2200
+ _e.emit("propTreeMenu", { x: T, y: j, keys: v });
2201
2201
  },
2202
2202
  onCreate: () => {
2203
2203
  D.push(N(c, !0)), f(v, D);
@@ -2227,7 +2227,7 @@ const oa = /* @__PURE__ */ K({
2227
2227
  },
2228
2228
  (() => {
2229
2229
  const T = [];
2230
- return T.push(Te), p.collapse || T.push(H), T;
2230
+ return T.push(Se), p.collapse || T.push(H), T;
2231
2231
  })()
2232
2232
  );
2233
2233
  }, Nn = (v, c, m, p, b) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-prop-tree",
3
3
  "private": false,
4
- "version": "0.5.14",
4
+ "version": "0.5.15",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",