x-prop-tree 0.5.2 → 0.5.4

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 +48 -43
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -276,9 +276,9 @@ function pr() {
276
276
  return (l = n.value) == null ? void 0 : l[e._as ?? t];
277
277
  }), a = new Proxy(e, {
278
278
  get(l, c) {
279
- var d, v, T, h, $, A, x;
279
+ var d, v, T, h, $, A, O;
280
280
  const y = Reflect.get(l, c);
281
- return c === "class" || c === "style" ? [(d = i.value) == null ? void 0 : d[c], y].filter((B) => B != null) : typeof c == "string" && !vr(r.vnode, c) ? ((v = i.value) == null ? void 0 : v[c]) !== void 0 ? (T = i.value) == null ? void 0 : T[c] : (($ = (h = n.value) == null ? void 0 : h.global) == null ? void 0 : $[c]) !== void 0 ? (x = (A = n.value) == null ? void 0 : A.global) == null ? void 0 : x[c] : y : y;
281
+ return c === "class" || c === "style" ? [(d = i.value) == null ? void 0 : d[c], y].filter((B) => B != null) : typeof c == "string" && !vr(r.vnode, c) ? ((v = i.value) == null ? void 0 : v[c]) !== void 0 ? (T = i.value) == null ? void 0 : T[c] : (($ = (h = n.value) == null ? void 0 : h.global) == null ? void 0 : $[c]) !== void 0 ? (O = (A = n.value) == null ? void 0 : A.global) == null ? void 0 : O[c] : y : y;
282
282
  }
283
283
  }), o = Un();
284
284
  Xe(() => {
@@ -1533,12 +1533,12 @@ function Ae(e, t, n, r, i, a) {
1533
1533
  return T;
1534
1534
  a.set(e, o), Ri(e) ? e.forEach(function(A) {
1535
1535
  o.add(Ae(A, t, n, A, e, a));
1536
- }) : Di(e) && e.forEach(function(A, x) {
1537
- o.set(x, Ae(A, t, n, x, e, a));
1536
+ }) : Di(e) && e.forEach(function(A, O) {
1537
+ o.set(O, Ae(A, t, n, O, e, a));
1538
1538
  });
1539
1539
  var h = c ? l ? Qs : Ge : l ? ot : it, $ = y ? void 0 : h(e);
1540
- return ya($ || e, function(A, x) {
1541
- $ && (x = A, A = e[x]), hn(o, x, Ae(A, t, n, x, e, a));
1540
+ return ya($ || e, function(A, O) {
1541
+ $ && (O = A, A = e[O]), hn(o, O, Ae(A, t, n, O, e, a));
1542
1542
  }), o;
1543
1543
  }
1544
1544
  var mo = 1, yo = 4;
@@ -1588,8 +1588,8 @@ function Fn(e, t, n, r, i, a) {
1588
1588
  break;
1589
1589
  }
1590
1590
  if (T) {
1591
- if (!_o(t, function(x, B) {
1592
- if (!bo(T, B) && (h === x || i(h, x, n, r, a)))
1591
+ if (!_o(t, function(O, B) {
1592
+ if (!bo(T, B) && (h === O || i(h, O, n, r, a)))
1593
1593
  return T.push(B);
1594
1594
  })) {
1595
1595
  v = !1;
@@ -1667,10 +1667,10 @@ function Uo(e, t, n, r, i, a) {
1667
1667
  a.set(e, t), a.set(t, e);
1668
1668
  for (var A = o; ++d < l; ) {
1669
1669
  v = f[d];
1670
- var x = e[v], B = t[v];
1670
+ var O = e[v], B = t[v];
1671
1671
  if (r)
1672
- var _e = o ? r(B, x, v, t, e, a) : r(x, B, v, e, t, a);
1673
- if (!(_e === void 0 ? x === B || i(x, B, n, r, a) : _e)) {
1672
+ var _e = o ? r(B, O, v, t, e, a) : r(O, B, v, e, t, a);
1673
+ if (!(_e === void 0 ? O === B || i(O, B, n, r, a) : _e)) {
1674
1674
  $ = !1;
1675
1675
  break;
1676
1676
  }
@@ -1725,45 +1725,50 @@ const Wo = /* @__PURE__ */ L({
1725
1725
  v.value = {};
1726
1726
  return;
1727
1727
  }
1728
- const g = (u, m, O, p) => {
1728
+ const g = (u, m, S, p) => {
1729
1729
  if (u = qt(u), u.push(m.key), p[m.key] || (p[m.key] = {}), m.ui) {
1730
1730
  if (Ce(u, ["basic", "id"]) || Ce(u, ["basic", "name"]))
1731
1731
  return !1;
1732
- const S = !Ce(m.default, O[m.key]);
1733
- return p[m.key].__change__ = S, S;
1732
+ const x = !Ce(m.default, S[m.key]);
1733
+ return p[m.key].__change__ = x, x;
1734
1734
  } else if (m.array) {
1735
- const S = !Ce(m.default, O[m.key]);
1736
- return p[m.key].__change__ = S, S;
1735
+ const x = !Ce(m.default, S[m.key]);
1736
+ return p[m.key].__change__ = x, x;
1737
1737
  } else {
1738
- let S = !1;
1738
+ S[m.key] || (S[m.key] = {});
1739
+ let x = !1;
1739
1740
  return m.children.forEach((C) => {
1740
- g(u, C, O[m.key], p[m.key]) && (S = !0);
1741
- }), p[m.key].__change__ = S, S;
1741
+ g(u, C, S[m.key], p[m.key]) && (x = !0);
1742
+ }), p[m.key].__change__ = x, x;
1742
1743
  }
1743
1744
  }, s = {};
1744
1745
  a.config.forEach((u) => {
1745
1746
  g([], u, a.object, s);
1746
1747
  }), v.value = s;
1747
1748
  };
1748
- Ne([() => a.unique, () => a.config, () => a.object], () => {
1749
- T();
1750
- });
1749
+ Ne(
1750
+ [() => a.config, () => a.object],
1751
+ () => {
1752
+ T();
1753
+ },
1754
+ { immediate: !0 }
1755
+ );
1751
1756
  const h = (g) => {
1752
1757
  let s = v.value;
1753
1758
  return g.forEach((u) => {
1754
1759
  if (s = s[u], !s)
1755
1760
  return console.assert(!1, "isPropChanged unpkg failed"), !1;
1756
1761
  }), s.__change__ ?? !1;
1757
- }, $ = (g, s, u, m) => (g = qt(g), g.push(s.key), s.ui ? s.array ? B(g, s, u) : _e(g, s, u) : s.array ? A(g, s, u, m) : x(g, s, u, m)), A = (g, s, u, m) => {
1762
+ }, $ = (g, s, u, m) => (g = qt(g), g.push(s.key), s.ui ? s.array ? B(g, s, u) : _e(g, s, u) : s.array ? A(g, s, u, m) : O(g, s, u, m)), A = (g, s, u, m) => {
1758
1763
  if (s.ui)
1759
1764
  return console.assert(!1), _("div", "renderBranchArray prop ui must be invalid");
1760
1765
  if (!s.array)
1761
1766
  return console.assert(!1), _("div", "renderBranchArray prop array must be valid");
1762
1767
  u[s.key] instanceof Array || (u[s.key] = k(s), d(g, u[s.key]));
1763
- let O = n(s.name);
1764
- h(g) && (O += " *");
1768
+ let S = n(s.name);
1769
+ h(g) && (S += " *");
1765
1770
  const p = _(wt, {
1766
- title: O,
1771
+ title: S,
1767
1772
  collapse: (typeof m.collapse != "boolean" && (m.collapse = !0), m.collapse),
1768
1773
  onCollapse: (C) => {
1769
1774
  m.collapse = C;
@@ -1771,7 +1776,7 @@ const Wo = /* @__PURE__ */ L({
1771
1776
  onCreate: () => {
1772
1777
  u[s.key].push({}), d(g, u[s.key]);
1773
1778
  }
1774
- }), S = _(
1779
+ }), x = _(
1775
1780
  "div",
1776
1781
  {
1777
1782
  style: {
@@ -1797,23 +1802,23 @@ const Wo = /* @__PURE__ */ L({
1797
1802
  },
1798
1803
  (() => {
1799
1804
  const C = [];
1800
- return C.push(p), m.collapse || C.push(S), C;
1805
+ return C.push(p), m.collapse || C.push(x), C;
1801
1806
  })()
1802
1807
  );
1803
- }, x = (g, s, u, m) => {
1808
+ }, O = (g, s, u, m) => {
1804
1809
  if (s.ui)
1805
1810
  return console.assert(!1), _("div", "renderBranchScalar prop ui must be invalid");
1806
1811
  if (s.array)
1807
1812
  return console.assert(!1), _("div", "renderBranchScalar prop array must be invalid");
1808
- let O = n(s.name);
1809
- h(g) && (O += " *");
1813
+ let S = n(s.name);
1814
+ h(g) && (S += " *");
1810
1815
  const p = _(wt, {
1811
- title: O,
1816
+ title: S,
1812
1817
  collapse: St(m, g),
1813
1818
  onCollapse: (C) => {
1814
1819
  Nr(m, g, C);
1815
1820
  }
1816
- }), S = _(
1821
+ }), x = _(
1817
1822
  "div",
1818
1823
  {
1819
1824
  style: {
@@ -1843,7 +1848,7 @@ const Wo = /* @__PURE__ */ L({
1843
1848
  },
1844
1849
  (() => {
1845
1850
  const C = [];
1846
- return C.push(p), St(m, g) || C.push(S), C;
1851
+ return C.push(p), St(m, g) || C.push(x), C;
1847
1852
  })()
1848
1853
  );
1849
1854
  }, B = (g, s, u) => {
@@ -1854,8 +1859,8 @@ const Wo = /* @__PURE__ */ L({
1854
1859
  u[s.key] instanceof Array || (u[s.key] = k(s), d(g, u[s.key]));
1855
1860
  let m = () => [];
1856
1861
  return s.ui === "strInput" ? m = () => {
1857
- const O = [];
1858
- for (let S = 0; S < u[s.key].length; S++) {
1862
+ const S = [];
1863
+ for (let x = 0; x < u[s.key].length; x++) {
1859
1864
  const C = _(
1860
1865
  "div",
1861
1866
  {
@@ -1866,18 +1871,18 @@ const Wo = /* @__PURE__ */ L({
1866
1871
  },
1867
1872
  [
1868
1873
  _(At, {
1869
- modelValue: u[s.key][S],
1874
+ modelValue: u[s.key][x],
1870
1875
  "onUpdate:modelValue": (Be) => {
1871
- u[s.key][S] = Be, d(g, u[s.key]);
1876
+ u[s.key][x] = Be, d(g, u[s.key]);
1872
1877
  },
1873
1878
  hasDelete: !0,
1874
1879
  onDelete: () => {
1875
- u[s.key].splice(S, 1), d(g, u[s.key]);
1880
+ u[s.key].splice(x, 1), d(g, u[s.key]);
1876
1881
  }
1877
1882
  })
1878
1883
  ]
1879
1884
  );
1880
- O.push(C);
1885
+ S.push(C);
1881
1886
  }
1882
1887
  const p = _(
1883
1888
  "div",
@@ -1898,7 +1903,7 @@ const Wo = /* @__PURE__ */ L({
1898
1903
  },
1899
1904
  [_(Ir, { icon: sn })]
1900
1905
  );
1901
- return O.push(p), O;
1906
+ return S.push(p), S;
1902
1907
  } : console.assert(!1, "renderLeafArray not implemented"), G(g, s, m());
1903
1908
  }, _e = (g, s, u) => {
1904
1909
  if (!s.ui)
@@ -1931,9 +1936,9 @@ const Wo = /* @__PURE__ */ L({
1931
1936
  },
1932
1937
  items: (() => {
1933
1938
  const p = [];
1934
- return s.items.forEach(({ title: S, value: C }) => {
1939
+ return s.items.forEach(({ title: x, value: C }) => {
1935
1940
  p.push({
1936
- title: n(S),
1941
+ title: n(x),
1937
1942
  value: C
1938
1943
  });
1939
1944
  }), p;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-prop-tree",
3
3
  "private": false,
4
- "version": "0.5.2",
4
+ "version": "0.5.4",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "vue-i18n": "^10.0.4",
30
30
  "vuetify": "^3.7.3",
31
31
  "x-essential-lib": "^0.7.3",
32
- "x-runtime-lib": "^0.5.5"
32
+ "x-runtime-lib": "^0.5.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@eslint/js": "^10.0.0",