@chamn/render 0.0.18 → 0.0.20
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +203 -199
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/util/assetsLoader.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var na = Object.defineProperty;
|
|
2
2
|
var oa = (t, e, r) => e in t ? na(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var
|
|
3
|
+
var y = (t, e, r) => (oa(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
4
|
import O, { Component as aa, createElement as sa, useEffect as ia, useRef as In, useMemo as ca } from "react";
|
|
5
5
|
import * as ua from "react-dom";
|
|
6
6
|
const la = (t) => () => {
|
|
@@ -837,9 +837,9 @@ function zt(t, e, r, n, o, a) {
|
|
|
837
837
|
}) : fu(t) && t.forEach(function(b, S) {
|
|
838
838
|
i.set(S, zt(b, e, r, S, t, a));
|
|
839
839
|
});
|
|
840
|
-
var
|
|
841
|
-
return is(
|
|
842
|
-
|
|
840
|
+
var m = u ? c ? vr : Fe : c ? ee : ge, g = l ? void 0 : m(t);
|
|
841
|
+
return is(g || t, function(b, S) {
|
|
842
|
+
g && (S = b, b = t[S]), ar(i, S, zt(b, e, r, S, t, a));
|
|
843
843
|
}), i;
|
|
844
844
|
}
|
|
845
845
|
var Vu = 1, zu = 4;
|
|
@@ -879,9 +879,9 @@ function co(t, e, r, n, o, a) {
|
|
|
879
879
|
return u == e && l == t;
|
|
880
880
|
var p = -1, f = !0, d = r & qu ? new Kt() : void 0;
|
|
881
881
|
for (a.set(t, e), a.set(e, t); ++p < s; ) {
|
|
882
|
-
var
|
|
882
|
+
var m = t[p], g = e[p];
|
|
883
883
|
if (n)
|
|
884
|
-
var b = i ? n(
|
|
884
|
+
var b = i ? n(g, m, p, e, t, a) : n(m, g, p, t, e, a);
|
|
885
885
|
if (b !== void 0) {
|
|
886
886
|
if (b)
|
|
887
887
|
continue;
|
|
@@ -890,13 +890,13 @@ function co(t, e, r, n, o, a) {
|
|
|
890
890
|
}
|
|
891
891
|
if (d) {
|
|
892
892
|
if (!Wu(e, function(S, j) {
|
|
893
|
-
if (!io(d, j) && (
|
|
893
|
+
if (!io(d, j) && (m === S || o(m, S, r, n, a)))
|
|
894
894
|
return d.push(j);
|
|
895
895
|
})) {
|
|
896
896
|
f = !1;
|
|
897
897
|
break;
|
|
898
898
|
}
|
|
899
|
-
} else if (!(
|
|
899
|
+
} else if (!(m === g || o(m, g, r, n, a))) {
|
|
900
900
|
f = !1;
|
|
901
901
|
break;
|
|
902
902
|
}
|
|
@@ -961,10 +961,10 @@ function hl(t, e, r, n, o, a) {
|
|
|
961
961
|
if (!(i ? f in e : dl.call(e, f)))
|
|
962
962
|
return !1;
|
|
963
963
|
}
|
|
964
|
-
var d = a.get(t),
|
|
965
|
-
if (d &&
|
|
966
|
-
return d == e &&
|
|
967
|
-
var
|
|
964
|
+
var d = a.get(t), m = a.get(e);
|
|
965
|
+
if (d && m)
|
|
966
|
+
return d == e && m == t;
|
|
967
|
+
var g = !0;
|
|
968
968
|
a.set(t, e), a.set(e, t);
|
|
969
969
|
for (var b = i; ++p < c; ) {
|
|
970
970
|
f = s[p];
|
|
@@ -972,16 +972,16 @@ function hl(t, e, r, n, o, a) {
|
|
|
972
972
|
if (n)
|
|
973
973
|
var A = i ? n(j, S, f, e, t, a) : n(S, j, f, t, e, a);
|
|
974
974
|
if (!(A === void 0 ? S === j || o(S, j, r, n, a) : A)) {
|
|
975
|
-
|
|
975
|
+
g = !1;
|
|
976
976
|
break;
|
|
977
977
|
}
|
|
978
978
|
b || (b = f == "constructor");
|
|
979
979
|
}
|
|
980
|
-
if (
|
|
980
|
+
if (g && !b) {
|
|
981
981
|
var T = t.constructor, D = e.constructor;
|
|
982
|
-
T != D && "constructor" in t && "constructor" in e && !(typeof T == "function" && T instanceof T && typeof D == "function" && D instanceof D) && (
|
|
982
|
+
T != D && "constructor" in t && "constructor" in e && !(typeof T == "function" && T instanceof T && typeof D == "function" && D instanceof D) && (g = !1);
|
|
983
983
|
}
|
|
984
|
-
return a.delete(t), a.delete(e),
|
|
984
|
+
return a.delete(t), a.delete(e), g;
|
|
985
985
|
}
|
|
986
986
|
var ml = 1, cn = "[object Arguments]", un = "[object Array]", ce = "[object Object]", vl = Object.prototype, ln = vl.hasOwnProperty;
|
|
987
987
|
function gl(t, e, r, n, o, a) {
|
|
@@ -996,10 +996,10 @@ function gl(t, e, r, n, o, a) {
|
|
|
996
996
|
if (f && !l)
|
|
997
997
|
return a || (a = new H()), i || ur(t) ? co(t, e, r, n, o, a) : ll(t, e, c, r, n, o, a);
|
|
998
998
|
if (!(r & ml)) {
|
|
999
|
-
var d = l && ln.call(t, "__wrapped__"),
|
|
1000
|
-
if (d ||
|
|
1001
|
-
var
|
|
1002
|
-
return a || (a = new H()), o(
|
|
999
|
+
var d = l && ln.call(t, "__wrapped__"), m = p && ln.call(e, "__wrapped__");
|
|
1000
|
+
if (d || m) {
|
|
1001
|
+
var g = d ? t.value() : t, b = m ? e.value() : e;
|
|
1002
|
+
return a || (a = new H()), o(g, b, r, n, a);
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
return f ? (a || (a = new H()), hl(t, e, r, n, o, a)) : !1;
|
|
@@ -1126,8 +1126,8 @@ function Dl(t, e, r, n, o, a, i) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
var l = a ? a(s, c, r + "", t, e, i) : void 0, p = l === void 0;
|
|
1128
1128
|
if (p) {
|
|
1129
|
-
var f = P(c), d = !f && Wt(c),
|
|
1130
|
-
l = c, f || d ||
|
|
1129
|
+
var f = P(c), d = !f && Wt(c), m = !f && !d && ur(c);
|
|
1130
|
+
l = c, f || d || m ? P(s) ? l = s : Ve(s) ? l = Bn(s) : d ? (p = !1, l = Kn(c, !0)) : m ? (p = !1, l = eo(c, !0)) : l = [] : B(c) || Jt(c) ? (l = s, Jt(s) ? l = Il(s) : (!W(s) || nr(s)) && (l = ro(c))) : p = !1;
|
|
1131
1131
|
}
|
|
1132
1132
|
p && (i.set(c, l), o(l, c, n, a, i), i.delete(c)), ke(t, r, l);
|
|
1133
1133
|
}
|
|
@@ -1576,7 +1576,7 @@ function w(t) {
|
|
|
1576
1576
|
}
|
|
1577
1577
|
});
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function v(t) {
|
|
1580
1580
|
return new X({
|
|
1581
1581
|
...t,
|
|
1582
1582
|
validator: (e, r) => e === void 0 || t.validator(e, r),
|
|
@@ -1651,11 +1651,11 @@ const Or = w({
|
|
|
1651
1651
|
package: h(),
|
|
1652
1652
|
version: h(),
|
|
1653
1653
|
name: h(),
|
|
1654
|
-
exportName:
|
|
1655
|
-
destructuring:
|
|
1656
|
-
subName:
|
|
1657
|
-
main:
|
|
1658
|
-
cssPaths:
|
|
1654
|
+
exportName: v(h()),
|
|
1655
|
+
destructuring: v(lt()),
|
|
1656
|
+
subName: v(h()),
|
|
1657
|
+
main: v(h()),
|
|
1658
|
+
cssPaths: v(M(h()))
|
|
1659
1659
|
}), hf = M(Or), mf = [
|
|
1660
1660
|
"CBlock",
|
|
1661
1661
|
"CContainer",
|
|
@@ -1675,7 +1675,7 @@ const vf = () => st("normalObj", (t) => !B(t) || [V.SLOT, V.EXPRESSION, V.FUNCTI
|
|
|
1675
1675
|
type: F(V.SLOT),
|
|
1676
1676
|
renderType: Ge([He.FUNC, He.COMP]),
|
|
1677
1677
|
// if renderType is Func, params will be useful
|
|
1678
|
-
params:
|
|
1678
|
+
params: v(M(h())),
|
|
1679
1679
|
// here can't use PropsDataStructDescribe, it will caused "Maximum call stack size exceeded" error
|
|
1680
1680
|
value: jt(() => L([Ot, M(Ot)]))
|
|
1681
1681
|
}),
|
|
@@ -1695,37 +1695,37 @@ const vf = () => st("normalObj", (t) => !B(t) || [V.SLOT, V.EXPRESSION, V.FUNCTI
|
|
|
1695
1695
|
type: F(V.EXPRESSION),
|
|
1696
1696
|
value: h()
|
|
1697
1697
|
}), Ot = w({
|
|
1698
|
-
id:
|
|
1699
|
-
title:
|
|
1698
|
+
id: v(h()),
|
|
1699
|
+
title: v(h()),
|
|
1700
1700
|
componentName: h(),
|
|
1701
|
-
props:
|
|
1702
|
-
nodeName:
|
|
1703
|
-
state:
|
|
1704
|
-
children: jt(() =>
|
|
1705
|
-
configure:
|
|
1706
|
-
css:
|
|
1707
|
-
style:
|
|
1708
|
-
classNames:
|
|
1709
|
-
refId:
|
|
1710
|
-
extra:
|
|
1711
|
-
condition:
|
|
1712
|
-
loop:
|
|
1701
|
+
props: v(Gt(h(), Cr)),
|
|
1702
|
+
nodeName: v(h()),
|
|
1703
|
+
state: v(Gt(h(), I())),
|
|
1704
|
+
children: jt(() => v(M(L([h(), Ot])))),
|
|
1705
|
+
configure: v(I()),
|
|
1706
|
+
css: v(I()),
|
|
1707
|
+
style: v(I()),
|
|
1708
|
+
classNames: v(M(I())),
|
|
1709
|
+
refId: v(h()),
|
|
1710
|
+
extra: v(Gt(I(), I())),
|
|
1711
|
+
condition: v(L([lt(), pn])),
|
|
1712
|
+
loop: v(
|
|
1713
1713
|
w({
|
|
1714
1714
|
open: lt(),
|
|
1715
1715
|
data: L([M(I()), pn]),
|
|
1716
|
-
args:
|
|
1717
|
-
forName:
|
|
1718
|
-
forIndex:
|
|
1719
|
-
key:
|
|
1720
|
-
name:
|
|
1716
|
+
args: v(M(h())),
|
|
1717
|
+
forName: v(h()),
|
|
1718
|
+
forIndex: v(h()),
|
|
1719
|
+
key: v(I()),
|
|
1720
|
+
name: v(h())
|
|
1721
1721
|
})
|
|
1722
1722
|
),
|
|
1723
|
-
methods:
|
|
1723
|
+
methods: v(M(I()))
|
|
1724
1724
|
}), pe = L([
|
|
1725
1725
|
h(),
|
|
1726
1726
|
w({
|
|
1727
1727
|
label: h(),
|
|
1728
|
-
tip:
|
|
1728
|
+
tip: v(h())
|
|
1729
1729
|
})
|
|
1730
1730
|
]), gf = w({
|
|
1731
1731
|
type: F(
|
|
@@ -1781,21 +1781,21 @@ const bf = w({
|
|
|
1781
1781
|
h(),
|
|
1782
1782
|
w({
|
|
1783
1783
|
componentName: h(),
|
|
1784
|
-
props:
|
|
1784
|
+
props: v(I()),
|
|
1785
1785
|
/** 用于标记当前数据的初始值,如添加一个数组元素可以使用该值填充 */
|
|
1786
|
-
initialValue:
|
|
1787
|
-
component:
|
|
1786
|
+
initialValue: v(I()),
|
|
1787
|
+
component: v(I())
|
|
1788
1788
|
})
|
|
1789
1789
|
]), Ae = w({
|
|
1790
1790
|
name: h(),
|
|
1791
1791
|
title: pe,
|
|
1792
1792
|
// 描述 name 对应值的类型
|
|
1793
1793
|
valueType: Se,
|
|
1794
|
-
description:
|
|
1794
|
+
description: v(h()),
|
|
1795
1795
|
defaultValue: I(),
|
|
1796
1796
|
//用于产生 valueType 类型的值
|
|
1797
|
-
setters:
|
|
1798
|
-
condition:
|
|
1797
|
+
setters: v(M(_f)),
|
|
1798
|
+
condition: v(bo())
|
|
1799
1799
|
});
|
|
1800
1800
|
L([h(), bo()]);
|
|
1801
1801
|
var Je = /* @__PURE__ */ ((t) => (t.SINGLE = "single", t.GROUP = "group", t))(Je || {});
|
|
@@ -1803,8 +1803,8 @@ L([
|
|
|
1803
1803
|
h(),
|
|
1804
1804
|
w({
|
|
1805
1805
|
name: h(),
|
|
1806
|
-
describe:
|
|
1807
|
-
params:
|
|
1806
|
+
describe: v(h()),
|
|
1807
|
+
params: v(
|
|
1808
1808
|
w({
|
|
1809
1809
|
name: h(),
|
|
1810
1810
|
description: h()
|
|
@@ -1814,38 +1814,38 @@ L([
|
|
|
1814
1814
|
})
|
|
1815
1815
|
]);
|
|
1816
1816
|
const Sf = w({
|
|
1817
|
-
id:
|
|
1817
|
+
id: v(h()),
|
|
1818
1818
|
title: h(),
|
|
1819
1819
|
snapshot: L([h(), I()]),
|
|
1820
|
-
snapshotText:
|
|
1821
|
-
description:
|
|
1820
|
+
snapshotText: v(h()),
|
|
1821
|
+
description: v(h()),
|
|
1822
1822
|
// 组件分类,用于搜索
|
|
1823
|
-
tags:
|
|
1823
|
+
tags: v(M(h())),
|
|
1824
1824
|
// 分 tab 面板
|
|
1825
|
-
groupName:
|
|
1825
|
+
groupName: v(h()),
|
|
1826
1826
|
// 分类
|
|
1827
|
-
category:
|
|
1828
|
-
schema: jr(yo(Ot, ["id"]), w({ componentName:
|
|
1827
|
+
category: v(h()),
|
|
1828
|
+
schema: jr(yo(Ot, ["id"]), w({ componentName: v(h()) }))
|
|
1829
1829
|
}), jf = w({
|
|
1830
1830
|
componentName: h(),
|
|
1831
1831
|
title: h(),
|
|
1832
|
-
screenshot:
|
|
1833
|
-
icon:
|
|
1832
|
+
screenshot: v(h()),
|
|
1833
|
+
icon: v(h()),
|
|
1834
1834
|
// 组件分类,用于搜索
|
|
1835
|
-
tags:
|
|
1835
|
+
tags: v(M(h())),
|
|
1836
1836
|
// 分 tab 面板
|
|
1837
|
-
groupName:
|
|
1837
|
+
groupName: v(h()),
|
|
1838
1838
|
// 分类
|
|
1839
|
-
category:
|
|
1839
|
+
category: v(h()),
|
|
1840
1840
|
// 排序
|
|
1841
|
-
priority:
|
|
1842
|
-
npm:
|
|
1841
|
+
priority: v(_o()),
|
|
1842
|
+
npm: v(Or),
|
|
1843
1843
|
snippets: M(Sf),
|
|
1844
1844
|
props: M(
|
|
1845
1845
|
L([
|
|
1846
1846
|
Ae,
|
|
1847
1847
|
w({
|
|
1848
|
-
title:
|
|
1848
|
+
title: v(pe),
|
|
1849
1849
|
type: F(
|
|
1850
1850
|
"single"
|
|
1851
1851
|
/* SINGLE */
|
|
@@ -1853,7 +1853,7 @@ const Sf = w({
|
|
|
1853
1853
|
content: Ae
|
|
1854
1854
|
}),
|
|
1855
1855
|
w({
|
|
1856
|
-
title:
|
|
1856
|
+
title: v(pe),
|
|
1857
1857
|
type: F(
|
|
1858
1858
|
"group"
|
|
1859
1859
|
/* GROUP */
|
|
@@ -1862,9 +1862,9 @@ const Sf = w({
|
|
|
1862
1862
|
})
|
|
1863
1863
|
])
|
|
1864
1864
|
),
|
|
1865
|
-
fixedProps:
|
|
1865
|
+
fixedProps: v(I()),
|
|
1866
1866
|
// 可以拖入组件
|
|
1867
|
-
isContainer:
|
|
1867
|
+
isContainer: v(
|
|
1868
1868
|
L([
|
|
1869
1869
|
lt(),
|
|
1870
1870
|
w({
|
|
@@ -1874,14 +1874,14 @@ const Sf = w({
|
|
|
1874
1874
|
})
|
|
1875
1875
|
])
|
|
1876
1876
|
),
|
|
1877
|
-
supportDispatchNativeEvent:
|
|
1877
|
+
supportDispatchNativeEvent: v(L([lt(), M(h())])),
|
|
1878
1878
|
// 如果是布局组件,可以考虑将拖拽控制权转移 or 实现 resize
|
|
1879
|
-
isLayout:
|
|
1880
|
-
rootSelector:
|
|
1879
|
+
isLayout: v(lt()),
|
|
1880
|
+
rootSelector: v(h()),
|
|
1881
1881
|
// selectionToolBarView: optional(func()),
|
|
1882
|
-
advanceCustom:
|
|
1882
|
+
advanceCustom: v(I()),
|
|
1883
1883
|
// 扩展配置
|
|
1884
|
-
extra:
|
|
1884
|
+
extra: v(Gt(I(), I()))
|
|
1885
1885
|
}), Of = (t) => ({ data: e, message: r, throwError: n }) => {
|
|
1886
1886
|
const o = t({ data: e, message: r, throwError: n });
|
|
1887
1887
|
if (o.isValidate)
|
|
@@ -2468,15 +2468,15 @@ class pt {
|
|
|
2468
2468
|
const Lf = w({
|
|
2469
2469
|
version: h(),
|
|
2470
2470
|
name: h(),
|
|
2471
|
-
css:
|
|
2472
|
-
renderType:
|
|
2471
|
+
css: v(h()),
|
|
2472
|
+
renderType: v(L([F(
|
|
2473
2473
|
"COMPONENT"
|
|
2474
2474
|
/* COMPONENT */
|
|
2475
2475
|
), F(
|
|
2476
2476
|
"PAGE"
|
|
2477
2477
|
/* PAGE */
|
|
2478
2478
|
)])),
|
|
2479
|
-
methods:
|
|
2479
|
+
methods: v(M(wf)),
|
|
2480
2480
|
componentsMeta: M(
|
|
2481
2481
|
jr(
|
|
2482
2482
|
w({
|
|
@@ -2485,9 +2485,9 @@ const Lf = w({
|
|
|
2485
2485
|
Or
|
|
2486
2486
|
)
|
|
2487
2487
|
),
|
|
2488
|
-
thirdLibs:
|
|
2488
|
+
thirdLibs: v(hf),
|
|
2489
2489
|
componentsTree: Cf,
|
|
2490
|
-
assets:
|
|
2490
|
+
assets: v(M(I()))
|
|
2491
2491
|
}), Oo = (t) => (Er({
|
|
2492
2492
|
data: t,
|
|
2493
2493
|
dataStruct: Lf,
|
|
@@ -3225,8 +3225,8 @@ function im(t, e, r, n, o, a, i) {
|
|
|
3225
3225
|
}
|
|
3226
3226
|
var l = a ? a(s, c, r + "", t, e, i) : void 0, p = l === void 0;
|
|
3227
3227
|
if (p) {
|
|
3228
|
-
var f = Et(c), d = !f && Po(c),
|
|
3229
|
-
l = c, f || d ||
|
|
3228
|
+
var f = Et(c), d = !f && Po(c), m = !f && !d && Io(c);
|
|
3229
|
+
l = c, f || d || m ? Et(s) ? l = s : am(s) ? l = jp(s) : d ? (p = !1, l = Kh(c, !0)) : m ? (p = !1, l = tm(c, !0)) : l = [] : Nt(c) || qe(c) ? (l = s, qe(s) ? l = sm(s) : (!gt(s) || $r(s)) && (l = em(c))) : p = !1;
|
|
3230
3230
|
}
|
|
3231
3231
|
p && (i.set(c, l), o(l, c, n, a, i), i.delete(c)), Xe(t, r, l);
|
|
3232
3232
|
}
|
|
@@ -3360,7 +3360,7 @@ const bt = (t, e) => {
|
|
|
3360
3360
|
}, vm = (t) => t ? Pn(t) : Pn;
|
|
3361
3361
|
class gm {
|
|
3362
3362
|
constructor() {
|
|
3363
|
-
|
|
3363
|
+
y(this, "storeMap", /* @__PURE__ */ new Map());
|
|
3364
3364
|
}
|
|
3365
3365
|
addStore(e, r) {
|
|
3366
3366
|
const n = vm(r);
|
|
@@ -3409,7 +3409,7 @@ class gm {
|
|
|
3409
3409
|
}
|
|
3410
3410
|
class ym {
|
|
3411
3411
|
constructor() {
|
|
3412
|
-
|
|
3412
|
+
y(this, "varSpace", /* @__PURE__ */ new Map());
|
|
3413
3413
|
}
|
|
3414
3414
|
get(e) {
|
|
3415
3415
|
return this.varSpace.get(e);
|
|
@@ -3432,18 +3432,18 @@ class ym {
|
|
|
3432
3432
|
}
|
|
3433
3433
|
class bm {
|
|
3434
3434
|
constructor() {
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3435
|
+
y(this, "renderMode", "normal");
|
|
3436
|
+
y(this, "components", {});
|
|
3437
|
+
y(this, "storeManager", new gm());
|
|
3438
3438
|
// 存储节点的变量或者方法
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3439
|
+
y(this, "variableManager", new ym());
|
|
3440
|
+
y(this, "runtimeComponentCache", /* @__PURE__ */ new Map());
|
|
3441
|
+
y(this, "onGetRef");
|
|
3442
|
+
y(this, "onGetComponent");
|
|
3443
|
+
y(this, "onComponentMount");
|
|
3444
|
+
y(this, "onComponentDestroy");
|
|
3445
3445
|
// 处理 props 钩子
|
|
3446
|
-
|
|
3446
|
+
y(this, "processNodeConfigHook");
|
|
3447
3447
|
}
|
|
3448
3448
|
getComponent(e) {
|
|
3449
3449
|
var o;
|
|
@@ -3468,9 +3468,9 @@ class bm {
|
|
|
3468
3468
|
processNodeConfigHook: u
|
|
3469
3469
|
}) {
|
|
3470
3470
|
this.renderMode = c, this.components = r, this.onGetRef = n, this.onGetComponent = a, this.onComponentMount = i, this.onComponentDestroy = s, this.processNodeConfigHook = u;
|
|
3471
|
-
const l = e.value.componentsTree, p = this.getComponent(l), f = this.convertModelToComponent(p, e.value.componentsTree), d = {},
|
|
3472
|
-
return Object.keys(
|
|
3473
|
-
d[
|
|
3471
|
+
const l = e.value.componentsTree, p = this.getComponent(l), f = this.convertModelToComponent(p, e.value.componentsTree), d = {}, m = l.props;
|
|
3472
|
+
return Object.keys(m).forEach((g) => {
|
|
3473
|
+
d[g] = m[g].value;
|
|
3474
3474
|
}), d.$$context = o, this.render(f, d);
|
|
3475
3475
|
}
|
|
3476
3476
|
transformProps(e = {}, {
|
|
@@ -3493,10 +3493,10 @@ class bm {
|
|
|
3493
3493
|
key: p,
|
|
3494
3494
|
component: this.runtimeComponentCache.get(l.id)
|
|
3495
3495
|
};
|
|
3496
|
-
const f = this.getComponent(l), d = this.convertModelToComponent(f, l),
|
|
3496
|
+
const f = this.getComponent(l), d = this.convertModelToComponent(f, l), m = s.params || [];
|
|
3497
3497
|
return {
|
|
3498
3498
|
component: (...S) => {
|
|
3499
|
-
const j = Tn(S,
|
|
3499
|
+
const j = Tn(S, m), A = this.getContext(
|
|
3500
3500
|
{
|
|
3501
3501
|
params: j
|
|
3502
3502
|
},
|
|
@@ -3558,30 +3558,30 @@ class bm {
|
|
|
3558
3558
|
class o extends O.Component {
|
|
3559
3559
|
constructor(s) {
|
|
3560
3560
|
super(s);
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3561
|
+
y(this, "_CONDITION", !0);
|
|
3562
|
+
y(this, "_DESIGN_BOX", !1);
|
|
3563
|
+
y(this, "_NODE_MODEL", r);
|
|
3564
|
+
y(this, "_NODE_ID", r.id);
|
|
3565
|
+
y(this, "UNIQUE_ID", `${r.id}_${Z()}`);
|
|
3566
|
+
y(this, "targetComponentRef");
|
|
3567
|
+
y(this, "listenerHandle", []);
|
|
3568
|
+
y(this, "storeState");
|
|
3569
|
+
y(this, "storeListenDisposeList", []);
|
|
3570
3570
|
// save dom and media css
|
|
3571
|
-
|
|
3572
|
-
|
|
3571
|
+
y(this, "domHeader");
|
|
3572
|
+
y(this, "mediaStyleDomMap", {});
|
|
3573
3573
|
/** 存储当前节点的一些变量和方法,不具有响应性 */
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3574
|
+
y(this, "variableSpace");
|
|
3575
|
+
y(this, "nodeName");
|
|
3576
|
+
y(this, "updateState", (s) => {
|
|
3577
3577
|
this.storeState.setState(s), this.forceUpdate();
|
|
3578
3578
|
});
|
|
3579
|
-
|
|
3579
|
+
y(this, "getStyleDomById", (s) => {
|
|
3580
3580
|
const c = this.mediaStyleDomMap;
|
|
3581
3581
|
let u = c[s];
|
|
3582
3582
|
return u || (u = document.createElement("style"), c[s] = u), u.id = s, u;
|
|
3583
3583
|
});
|
|
3584
|
-
|
|
3584
|
+
y(this, "addMediaCSS", () => {
|
|
3585
3585
|
var u;
|
|
3586
3586
|
let s = this.domHeader;
|
|
3587
3587
|
if (s || (s = (u = document.getElementsByTagName("head")) == null ? void 0 : u[0], this.domHeader = s), !this.domHeader)
|
|
@@ -3592,23 +3592,23 @@ class bm {
|
|
|
3592
3592
|
const p = `${this.UNIQUE_ID}_${l.state}`;
|
|
3593
3593
|
let f = `.${c.class}`;
|
|
3594
3594
|
if (l.state !== "normal" && (f = `${f}:${l.state}`), Object.keys(l.style).length !== 0) {
|
|
3595
|
-
const
|
|
3596
|
-
|
|
3595
|
+
const m = this.getStyleDomById(p);
|
|
3596
|
+
m.innerText = `${f} { ${An(l.style)} }`, s == null || s.appendChild(m);
|
|
3597
3597
|
}
|
|
3598
|
-
(d = l.media) != null && d.length && l.media.forEach((
|
|
3599
|
-
const
|
|
3600
|
-
b.media = `screen and (${
|
|
3598
|
+
(d = l.media) != null && d.length && l.media.forEach((m) => {
|
|
3599
|
+
const g = `${p}_${m.type}_${m.value}`, b = this.getStyleDomById(g);
|
|
3600
|
+
b.media = `screen and (${m.type}:${m.value}px)`, b.innerHTML = `${f} { ${An(m.style)} }`, s == null || s.appendChild(b);
|
|
3601
3601
|
});
|
|
3602
3602
|
});
|
|
3603
3603
|
});
|
|
3604
|
-
|
|
3604
|
+
y(this, "removeMediaCSS", () => {
|
|
3605
3605
|
const s = this.mediaStyleDomMap;
|
|
3606
3606
|
Object.keys(s).forEach((c) => {
|
|
3607
3607
|
var u;
|
|
3608
3608
|
(u = this.domHeader) == null || u.removeChild(s[c]);
|
|
3609
3609
|
}), this.mediaStyleDomMap = {};
|
|
3610
3610
|
});
|
|
3611
|
-
|
|
3611
|
+
y(this, "rebuildNode", () => {
|
|
3612
3612
|
this.storeListenDisposeList.forEach((s) => s()), this.removeMediaCSS(), this.connectStore(), this.addMediaCSS(), this.forceUpdate();
|
|
3613
3613
|
});
|
|
3614
3614
|
this.targetComponentRef = O.createRef(), this.state = r.value.state || {};
|
|
@@ -3640,7 +3640,7 @@ class bm {
|
|
|
3640
3640
|
);
|
|
3641
3641
|
let u = [];
|
|
3642
3642
|
[...s, ...c].map((f) => {
|
|
3643
|
-
const d = f.val,
|
|
3643
|
+
const d = f.val, m = [
|
|
3644
3644
|
/\$\$context.stateManager\.(.+?)\./gim,
|
|
3645
3645
|
/\$\$context.stateManager\["(.+?)"\]/gim,
|
|
3646
3646
|
/\$\$context.stateManager\['(.+?)'\]/gim,
|
|
@@ -3648,16 +3648,16 @@ class bm {
|
|
|
3648
3648
|
/getStateObj\("(.+?)"\)/gim,
|
|
3649
3649
|
/getStateById\('(.+?)'\)/gim,
|
|
3650
3650
|
/getStateById\("(.+?)"\)/gim
|
|
3651
|
-
],
|
|
3652
|
-
u = [...u, ...
|
|
3651
|
+
], g = hm(d.value, m);
|
|
3652
|
+
u = [...u, ...g];
|
|
3653
3653
|
}).filter(Boolean);
|
|
3654
3654
|
const l = Array.from(new Set(u)), p = [];
|
|
3655
3655
|
l.length && l.forEach((f) => {
|
|
3656
3656
|
n.storeManager.getStore(f) || (n.storeManager.addStore(f, () => ({})), console.warn(n.storeManager, f, "not exits"));
|
|
3657
|
-
const
|
|
3657
|
+
const m = n.storeManager.connect(f, () => {
|
|
3658
3658
|
this.forceUpdate();
|
|
3659
3659
|
});
|
|
3660
|
-
p.push(
|
|
3660
|
+
p.push(m);
|
|
3661
3661
|
}), this.storeListenDisposeList = p;
|
|
3662
3662
|
}
|
|
3663
3663
|
componentDidMount() {
|
|
@@ -3696,7 +3696,7 @@ class bm {
|
|
|
3696
3696
|
getStaticVarById: (R) => n.variableManager.get(R).staticVar
|
|
3697
3697
|
};
|
|
3698
3698
|
r.value.componentName === At.ROOT_CONTAINER && (p.globalState = this.state, p.updateGlobalState = this.updateState);
|
|
3699
|
-
const f = n.getContext(p, s),
|
|
3699
|
+
const f = n.getContext(p, s), g = n.transformProps(
|
|
3700
3700
|
{
|
|
3701
3701
|
methods: r.value.methods
|
|
3702
3702
|
},
|
|
@@ -3704,7 +3704,7 @@ class bm {
|
|
|
3704
3704
|
$$context: f
|
|
3705
3705
|
}
|
|
3706
3706
|
).methods.reduce((R, Q) => (R[Q.name] = Q.define, R), {});
|
|
3707
|
-
f.methods =
|
|
3707
|
+
f.methods = g, this.variableSpace.methods = Object.assign(this.variableSpace.methods, g);
|
|
3708
3708
|
const b = r.value.loop;
|
|
3709
3709
|
let S = [];
|
|
3710
3710
|
if (b && b.open) {
|
|
@@ -3807,7 +3807,7 @@ class bm {
|
|
|
3807
3807
|
);
|
|
3808
3808
|
}
|
|
3809
3809
|
}
|
|
3810
|
-
return
|
|
3810
|
+
return y(o, "__CP_TYPE__", ue), o.displayName = `${r.value.componentName}Dynamic`, o;
|
|
3811
3811
|
}
|
|
3812
3812
|
// 递归建页面组件结构
|
|
3813
3813
|
buildComponent(e, {
|
|
@@ -4128,7 +4128,7 @@ const Wm = pa(new bm()), _m = [
|
|
|
4128
4128
|
};
|
|
4129
4129
|
class Am {
|
|
4130
4130
|
constructor() {
|
|
4131
|
-
|
|
4131
|
+
y(this, "refMap", /* @__PURE__ */ new Map());
|
|
4132
4132
|
}
|
|
4133
4133
|
get(e) {
|
|
4134
4134
|
return this.refMap.get(e);
|
|
@@ -4146,14 +4146,14 @@ class Am {
|
|
|
4146
4146
|
class Pm extends O.Component {
|
|
4147
4147
|
constructor(r) {
|
|
4148
4148
|
super(r);
|
|
4149
|
-
|
|
4149
|
+
y(this, "refManager");
|
|
4150
4150
|
// save component instance
|
|
4151
|
-
|
|
4152
|
-
|
|
4151
|
+
y(this, "dynamicComponentInstanceMap", /* @__PURE__ */ new Map());
|
|
4152
|
+
y(this, "onGetRef", (r, n, o) => {
|
|
4153
4153
|
var a, i;
|
|
4154
4154
|
(i = (a = this.props).onGetRef) == null || i.call(a, r, n, o), this.dynamicComponentInstanceMap.set(n.id, o), this.refManager.add(n.value.refId || n.id, r);
|
|
4155
4155
|
});
|
|
4156
|
-
|
|
4156
|
+
y(this, "rerender", (r) => {
|
|
4157
4157
|
if (this.props.adapter.clear(), (r == null ? void 0 : r.nodeType) === "PAGE" && r)
|
|
4158
4158
|
this.setState({
|
|
4159
4159
|
pageModel: r
|
|
@@ -4214,7 +4214,7 @@ const Qm = () => {
|
|
|
4214
4214
|
class Rm extends O.Component {
|
|
4215
4215
|
constructor(r) {
|
|
4216
4216
|
super(r);
|
|
4217
|
-
|
|
4217
|
+
y(this, "onDoubleClick", () => {
|
|
4218
4218
|
this.setState({
|
|
4219
4219
|
hasError: !1,
|
|
4220
4220
|
error: null
|
|
@@ -4280,7 +4280,7 @@ class Rm extends O.Component {
|
|
|
4280
4280
|
}
|
|
4281
4281
|
class Im {
|
|
4282
4282
|
constructor() {
|
|
4283
|
-
|
|
4283
|
+
y(this, "instanceMap", /* @__PURE__ */ new Map());
|
|
4284
4284
|
}
|
|
4285
4285
|
get(e) {
|
|
4286
4286
|
return this.instanceMap.get(e);
|
|
@@ -4337,19 +4337,23 @@ const Dm = (t) => {
|
|
|
4337
4337
|
class qm extends O.Component {
|
|
4338
4338
|
constructor(r) {
|
|
4339
4339
|
super(r);
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4340
|
+
y(this, "instanceManager", new Im());
|
|
4341
|
+
y(this, "renderRef");
|
|
4342
|
+
y(this, "dropPlaceholder", Dm);
|
|
4343
|
+
y(this, "onGetComponent", (r, n) => {
|
|
4344
|
+
var c, u;
|
|
4344
4345
|
const o = this;
|
|
4345
|
-
|
|
4346
|
+
let a = r;
|
|
4347
|
+
const i = (u = (c = n.material) == null ? void 0 : c.value.advanceCustom) == null ? void 0 : u.wrapComponent;
|
|
4348
|
+
i && (a = i(r));
|
|
4349
|
+
class s extends O.Component {
|
|
4346
4350
|
constructor() {
|
|
4347
4351
|
super(...arguments);
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4352
|
+
y(this, "_DESIGN_BOX", !0);
|
|
4353
|
+
y(this, "_NODE_MODEL", n);
|
|
4354
|
+
y(this, "_NODE_ID", n.id);
|
|
4355
|
+
y(this, "_UNIQUE_ID", `${n.id}_${Z()}`);
|
|
4356
|
+
y(this, "_STATUS");
|
|
4353
4357
|
}
|
|
4354
4358
|
componentDidMount() {
|
|
4355
4359
|
o.instanceManager.add(n.id, this);
|
|
@@ -4358,25 +4362,25 @@ class qm extends O.Component {
|
|
|
4358
4362
|
this._STATUS = "DESTROY", o.instanceManager.remove(n.id, this);
|
|
4359
4363
|
}
|
|
4360
4364
|
render() {
|
|
4361
|
-
const { children:
|
|
4362
|
-
let
|
|
4363
|
-
return Et(
|
|
4365
|
+
const { children: f = [], onlyRenderChild: d, ...m } = this.props;
|
|
4366
|
+
let g = f;
|
|
4367
|
+
return Et(f) || (g = [f]), !!!g.filter(Boolean).length && (n.isContainer() || n.value.componentName === At.ROOT_CONTAINER) && g.push(
|
|
4364
4368
|
O.createElement(o.dropPlaceholder, {
|
|
4365
4369
|
node: n
|
|
4366
4370
|
})
|
|
4367
|
-
),
|
|
4371
|
+
), d ? g : O.createElement(a, m, ...g);
|
|
4368
4372
|
}
|
|
4369
4373
|
}
|
|
4370
|
-
return O.forwardRef(function(
|
|
4374
|
+
return O.forwardRef(function(p, f) {
|
|
4371
4375
|
return O.createElement(
|
|
4372
4376
|
Rm,
|
|
4373
4377
|
{
|
|
4374
4378
|
node: n,
|
|
4375
|
-
targetComponent:
|
|
4379
|
+
targetComponent: s
|
|
4376
4380
|
},
|
|
4377
|
-
O.createElement(
|
|
4378
|
-
ref:
|
|
4379
|
-
...
|
|
4381
|
+
O.createElement(s, {
|
|
4382
|
+
ref: f,
|
|
4383
|
+
...p
|
|
4380
4384
|
})
|
|
4381
4385
|
);
|
|
4382
4386
|
});
|
|
@@ -4431,12 +4435,12 @@ class qm extends O.Component {
|
|
|
4431
4435
|
...a,
|
|
4432
4436
|
// 拦截特殊属性配置, 配合开发模式使用
|
|
4433
4437
|
processNodeConfigHook: (i, s) => {
|
|
4434
|
-
var
|
|
4438
|
+
var m, g;
|
|
4435
4439
|
if (s.nodeType !== "NODE")
|
|
4436
4440
|
return i;
|
|
4437
4441
|
const { props: c, condition: u } = i;
|
|
4438
4442
|
let l = { ...c };
|
|
4439
|
-
const p = ((
|
|
4443
|
+
const p = ((m = s.value.configure) == null ? void 0 : m.devState) || {}, f = (g = s.material) == null ? void 0 : g.value.fixedProps;
|
|
4440
4444
|
if (f !== void 0) {
|
|
4441
4445
|
if (Nt(f))
|
|
4442
4446
|
l = {
|
|
@@ -4508,11 +4512,11 @@ var Zo = { exports: {} };
|
|
|
4508
4512
|
}, n = {}, o = {}, a = {};
|
|
4509
4513
|
function i(f, d) {
|
|
4510
4514
|
f = f.push ? f : [f];
|
|
4511
|
-
var
|
|
4515
|
+
var m = [], g = f.length, b = g, S, j, A, T;
|
|
4512
4516
|
for (S = function(D, k) {
|
|
4513
|
-
k.length &&
|
|
4514
|
-
};
|
|
4515
|
-
if (j = f[
|
|
4517
|
+
k.length && m.push(D), b--, b || d(m);
|
|
4518
|
+
}; g--; ) {
|
|
4519
|
+
if (j = f[g], A = o[j], A) {
|
|
4516
4520
|
S(j, A);
|
|
4517
4521
|
continue;
|
|
4518
4522
|
}
|
|
@@ -4521,18 +4525,18 @@ var Zo = { exports: {} };
|
|
|
4521
4525
|
}
|
|
4522
4526
|
function s(f, d) {
|
|
4523
4527
|
if (f) {
|
|
4524
|
-
var
|
|
4525
|
-
if (o[f] = d, !!
|
|
4526
|
-
for (;
|
|
4527
|
-
|
|
4528
|
+
var m = a[f];
|
|
4529
|
+
if (o[f] = d, !!m)
|
|
4530
|
+
for (; m.length; )
|
|
4531
|
+
m[0](f, d), m.splice(0, 1);
|
|
4528
4532
|
}
|
|
4529
4533
|
}
|
|
4530
4534
|
function c(f, d) {
|
|
4531
4535
|
f.call && (f = { success: f }), d.length ? (f.error || r)(d) : (f.success || r)(f);
|
|
4532
4536
|
}
|
|
4533
|
-
function u(f, d,
|
|
4534
|
-
var b = document, S =
|
|
4535
|
-
if (
|
|
4537
|
+
function u(f, d, m, g) {
|
|
4538
|
+
var b = document, S = m.async, j = (m.numRetries || 0) + 1, A = m.before || r, T = f.replace(/[\?|#].*$/, ""), D = f.replace(/^(css|img|module|nomodule)!/, ""), k, Lt, C;
|
|
4539
|
+
if (g = g || 0, /(^css!|\.css$)/.test(T))
|
|
4536
4540
|
C = b.createElement("link"), C.rel = "stylesheet", C.href = D, k = "hideFocus" in C, k && C.relList && (k = 0, C.rel = "preload", C.as = "style");
|
|
4537
4541
|
else if (/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(T))
|
|
4538
4542
|
C = b.createElement("img"), C.src = D;
|
|
@@ -4551,45 +4555,45 @@ var Zo = { exports: {} };
|
|
|
4551
4555
|
oe.code != 18 && (it = "e");
|
|
4552
4556
|
}
|
|
4553
4557
|
if (it == "e") {
|
|
4554
|
-
if (
|
|
4555
|
-
return u(f, d,
|
|
4558
|
+
if (g += 1, g < j)
|
|
4559
|
+
return u(f, d, m, g);
|
|
4556
4560
|
} else if (C.rel == "preload" && C.as == "style")
|
|
4557
4561
|
return C.rel = "stylesheet";
|
|
4558
4562
|
d(f, it, ot.defaultPrevented);
|
|
4559
4563
|
}, A(f, C) !== !1 && b.head.appendChild(C);
|
|
4560
4564
|
}
|
|
4561
|
-
function l(f, d,
|
|
4565
|
+
function l(f, d, m) {
|
|
4562
4566
|
f = f.push ? f : [f];
|
|
4563
|
-
var
|
|
4567
|
+
var g = f.length, b = g, S = [], j, A;
|
|
4564
4568
|
for (j = function(T, D, k) {
|
|
4565
4569
|
if (D == "e" && S.push(T), D == "b")
|
|
4566
4570
|
if (k)
|
|
4567
4571
|
S.push(T);
|
|
4568
4572
|
else
|
|
4569
4573
|
return;
|
|
4570
|
-
|
|
4574
|
+
g--, g || d(S);
|
|
4571
4575
|
}, A = 0; A < b; A++)
|
|
4572
|
-
u(f[A], j,
|
|
4576
|
+
u(f[A], j, m);
|
|
4573
4577
|
}
|
|
4574
|
-
function p(f, d,
|
|
4575
|
-
var
|
|
4576
|
-
if (d && d.trim && (
|
|
4577
|
-
if (
|
|
4578
|
+
function p(f, d, m) {
|
|
4579
|
+
var g, b;
|
|
4580
|
+
if (d && d.trim && (g = d), b = (g ? m : d) || {}, g) {
|
|
4581
|
+
if (g in n)
|
|
4578
4582
|
throw "LoadJS";
|
|
4579
|
-
n[
|
|
4583
|
+
n[g] = !0;
|
|
4580
4584
|
}
|
|
4581
4585
|
function S(j, A) {
|
|
4582
4586
|
l(f, function(T) {
|
|
4583
|
-
c(b, T), j && c({ success: j, error: A }, T), s(
|
|
4587
|
+
c(b, T), j && c({ success: j, error: A }, T), s(g, T);
|
|
4584
4588
|
}, b);
|
|
4585
4589
|
}
|
|
4586
4590
|
if (b.returnPromise)
|
|
4587
4591
|
return new Promise(S);
|
|
4588
4592
|
S();
|
|
4589
4593
|
}
|
|
4590
|
-
return p.ready = function(d,
|
|
4591
|
-
return i(d, function(
|
|
4592
|
-
c(
|
|
4594
|
+
return p.ready = function(d, m) {
|
|
4595
|
+
return i(d, function(g) {
|
|
4596
|
+
c(m, g);
|
|
4593
4597
|
}), p;
|
|
4594
4598
|
}, p.done = function(d) {
|
|
4595
4599
|
s(d, []);
|
|
@@ -4604,11 +4608,11 @@ var Bm = Zo.exports;
|
|
|
4604
4608
|
const Rn = /* @__PURE__ */ Fm(Bm);
|
|
4605
4609
|
class Km {
|
|
4606
4610
|
constructor(e, r) {
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4611
|
+
y(this, "assets");
|
|
4612
|
+
y(this, "loadStatus");
|
|
4613
|
+
y(this, "win", window);
|
|
4614
|
+
y(this, "_onSuccessList", []);
|
|
4615
|
+
y(this, "_onErrorList", []);
|
|
4612
4616
|
this.assets = JSON.parse(JSON.stringify(e || [])), this.loadStatus = "INIT", r != null && r.window && (this.win = r.window);
|
|
4613
4617
|
}
|
|
4614
4618
|
load() {
|
|
@@ -4622,11 +4626,11 @@ class Km {
|
|
|
4622
4626
|
before: (i, s) => (this.win.document.body.appendChild(s), !1)
|
|
4623
4627
|
});
|
|
4624
4628
|
}
|
|
4625
|
-
if (e.length === 0) {
|
|
4626
|
-
this._onSuccessList.forEach((n) => n());
|
|
4627
|
-
return;
|
|
4628
|
-
}
|
|
4629
4629
|
return new Promise((n, o) => {
|
|
4630
|
+
if (e.length === 0) {
|
|
4631
|
+
this._onSuccessList.forEach((a) => a()), n("");
|
|
4632
|
+
return;
|
|
4633
|
+
}
|
|
4630
4634
|
Rn.ready(r, {
|
|
4631
4635
|
success: () => {
|
|
4632
4636
|
this._onSuccessList.forEach((a) => a()), n("");
|