@a2simcode/ui 0.0.110 → 0.0.112
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/simcode-ui.es.js +424 -426
- package/dist/simcode-ui.umd.js +2 -2
- package/dist/stats.html +1 -1
- package/docs/components/meta/table-panel.ts +12 -0
- package/docs/components/meta/table.ts +7 -1
- package/package.json +66 -66
package/dist/simcode-ui.es.js
CHANGED
|
@@ -37,7 +37,7 @@ import { createEditor as Ud, createToolbar as Yd } from "@wangeditor/editor";
|
|
|
37
37
|
import Zs from "diagram-js";
|
|
38
38
|
import { assignStyle as mo, attr as un, classes as Gt, clear as Qs, closest as El, delegate as zn, domify as Xt, event as Qe, matches as Kd, query as Nt, queryAll as nl, remove as al } from "min-dom";
|
|
39
39
|
import { assign as je, bind as Rl, debounce as Gd, every as Tl, filter as an, find as vn, flatten as Jd, forEach as ae, groupBy as Ml, has as ec, isArray as tt, isDefined as cn, isFunction as yn, isNil as wr, isNumber as Mt, isObject as on, isString as ol, isUndefined as Xd, map as bo, matchPattern as si, omit as qd, pick as ci, reduce as il, size as Zd, some as Qd, sortBy as go, uniqueBy as ef, values as tc, without as tf } from "min-dash";
|
|
40
|
-
import { append as Ve, attr as Ee, classes as st, clear as Al, clone as nc, create as
|
|
40
|
+
import { append as Ve, attr as Ee, classes as st, clear as Al, clone as nc, create as He, createTransform as ro, remove as qt, transform as jl } from "tiny-svg";
|
|
41
41
|
import fa from "inherits";
|
|
42
42
|
import nf from "diagram-js-direct-editing";
|
|
43
43
|
var he = (e) => (e.install = (t) => {
|
|
@@ -4724,10 +4724,10 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4724
4724
|
let R = o.records.length, m = 45;
|
|
4725
4725
|
const k = j(!1), C = j({}), T = j([]), A = j(null), E = j(0);
|
|
4726
4726
|
let B = null, z = !1, V = !1;
|
|
4727
|
-
const M = (I, $,
|
|
4728
|
-
T.value = I, A.value = $, E.value =
|
|
4729
|
-
left: `${
|
|
4730
|
-
top: `${
|
|
4727
|
+
const M = (I, $, U, te, W) => {
|
|
4728
|
+
T.value = I, A.value = $, E.value = U, C.value = {
|
|
4729
|
+
left: `${te}px`,
|
|
4730
|
+
top: `${W}px`
|
|
4731
4731
|
}, k.value = !0, z = !1, document.addEventListener("wheel", Te, { passive: !1 });
|
|
4732
4732
|
}, S = () => {
|
|
4733
4733
|
k.value = !1, z = !1, V = !1, X(), document.removeEventListener("wheel", Te);
|
|
@@ -4749,17 +4749,17 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4749
4749
|
openLayer: u
|
|
4750
4750
|
}), S());
|
|
4751
4751
|
}, dt = (I) => {
|
|
4752
|
-
let $ = I.action.config?.display !== !1,
|
|
4753
|
-
const
|
|
4754
|
-
if (
|
|
4755
|
-
const
|
|
4756
|
-
typeof
|
|
4752
|
+
let $ = I.action.config?.display !== !1, U = I.action.config?.disabled === !0;
|
|
4753
|
+
const te = o.actionFilter;
|
|
4754
|
+
if (te) try {
|
|
4755
|
+
const W = te(I);
|
|
4756
|
+
typeof W == "boolean" ? $ = W : W && typeof W == "object" && (typeof W.display == "boolean" && ($ = W.display), typeof W.disabled == "boolean" && (U = W.disabled));
|
|
4757
4757
|
} catch {
|
|
4758
|
-
$ = I.action.config?.display !== !1,
|
|
4758
|
+
$ = I.action.config?.display !== !1, U = I.action.config?.disabled === !0;
|
|
4759
4759
|
}
|
|
4760
4760
|
return {
|
|
4761
4761
|
display: $,
|
|
4762
|
-
disabled:
|
|
4762
|
+
disabled: U
|
|
4763
4763
|
};
|
|
4764
4764
|
}, oe = (I, $) => $.disabled ? {
|
|
4765
4765
|
...I,
|
|
@@ -4768,44 +4768,44 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4768
4768
|
disabled: !0
|
|
4769
4769
|
}
|
|
4770
4770
|
} : I, Ge = (I) => {
|
|
4771
|
-
const { Group: $, Text:
|
|
4771
|
+
const { Group: $, Text: U } = Le.CustomLayout, te = o.actionsMaxCount, W = I.filter((de) => de.config?.display !== !1), q = W.length > te, pe = q ? W.slice(0, te - 1) : W;
|
|
4772
4772
|
let ue = 0;
|
|
4773
4773
|
if (pe.forEach((de, we) => {
|
|
4774
|
-
const
|
|
4775
|
-
ue +=
|
|
4774
|
+
const Be = sn(de.config?.label || de.label || "") || 0;
|
|
4775
|
+
ue += Be + (we === 0 ? 24 : 12);
|
|
4776
4776
|
}), q) {
|
|
4777
4777
|
const de = (sn("更多") || 0) + 12;
|
|
4778
4778
|
ue += de;
|
|
4779
4779
|
}
|
|
4780
|
-
const
|
|
4780
|
+
const ne = Math.max(80, ue) + "px";
|
|
4781
4781
|
return {
|
|
4782
4782
|
field: "__actions__",
|
|
4783
4783
|
title: o.actionsLabel,
|
|
4784
|
-
width:
|
|
4785
|
-
maxWidth:
|
|
4786
|
-
minWidth:
|
|
4784
|
+
width: ne,
|
|
4785
|
+
maxWidth: ne,
|
|
4786
|
+
minWidth: ne,
|
|
4787
4787
|
disableColumnResize: !0,
|
|
4788
4788
|
disableSelect: !0,
|
|
4789
4789
|
customLayout: (de) => {
|
|
4790
|
-
const { table: we, row:
|
|
4790
|
+
const { table: we, row: Be, col: xe } = de, fe = we.getCellOriginRecord(xe, Be), We = we.getRecordIndexByCell(xe, Be), Ye = (() => {
|
|
4791
4791
|
if (!o.actionFilter) return !1;
|
|
4792
|
-
const
|
|
4793
|
-
return
|
|
4794
|
-
})(), $e =
|
|
4792
|
+
const Oe = re(fe);
|
|
4793
|
+
return Oe ? gt().some((Fe) => re(Fe) === Oe) : !1;
|
|
4794
|
+
})(), $e = W.map((Oe) => {
|
|
4795
4795
|
const Fe = dt({
|
|
4796
|
-
action:
|
|
4796
|
+
action: Oe,
|
|
4797
4797
|
record: fe,
|
|
4798
4798
|
recordIndex: We,
|
|
4799
4799
|
col: xe,
|
|
4800
|
-
row:
|
|
4800
|
+
row: Be,
|
|
4801
4801
|
table: we,
|
|
4802
4802
|
selected: Ye
|
|
4803
4803
|
});
|
|
4804
4804
|
return {
|
|
4805
|
-
action: oe(
|
|
4805
|
+
action: oe(Oe, { disabled: Fe.disabled }),
|
|
4806
4806
|
display: Fe.display
|
|
4807
4807
|
};
|
|
4808
|
-
}).filter((
|
|
4808
|
+
}).filter((Oe) => Oe.display).map((Oe) => Oe.action), ut = o.actionsMaxCount, Ue = $e.length > ut, mt = Ue ? $e.slice(0, ut - 1) : $e, Ct = Ue ? $e.slice(ut - 1) : [], _e = new $({
|
|
4809
4809
|
height: 40,
|
|
4810
4810
|
display: "flex",
|
|
4811
4811
|
flexDirection: "row",
|
|
@@ -4813,9 +4813,9 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4813
4813
|
justifyContent: "flex-start",
|
|
4814
4814
|
flexWrap: "nowrap"
|
|
4815
4815
|
});
|
|
4816
|
-
if (mt.forEach((
|
|
4817
|
-
const Xe =
|
|
4818
|
-
text:
|
|
4816
|
+
if (mt.forEach((Oe, Fe) => {
|
|
4817
|
+
const Xe = Oe.config?.disabled === !0, zt = Xe ? "#c9cdd4" : Oe.config?.danger ? "#f53f3f" : "#165dff", tn = new U({
|
|
4818
|
+
text: Oe.label,
|
|
4819
4819
|
fontSize: 14,
|
|
4820
4820
|
fill: zt,
|
|
4821
4821
|
boundsPadding: [
|
|
@@ -4827,7 +4827,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4827
4827
|
cursor: Xe ? "not-allowed" : "pointer"
|
|
4828
4828
|
});
|
|
4829
4829
|
tn.addEventListener("click", () => {
|
|
4830
|
-
!Xe &&
|
|
4830
|
+
!Xe && Oe.click && Oe.click({
|
|
4831
4831
|
data: fe,
|
|
4832
4832
|
openLayer: u
|
|
4833
4833
|
});
|
|
@@ -4837,10 +4837,10 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4837
4837
|
Xe || (na.target.setAttribute("fill", zt), we.scenegraph.stage.renderNextFrame());
|
|
4838
4838
|
}), _e.add(tn);
|
|
4839
4839
|
}), Ue && Ct.length > 0) {
|
|
4840
|
-
const
|
|
4840
|
+
const Oe = "#1677ff", Fe = new U({
|
|
4841
4841
|
text: "更多",
|
|
4842
4842
|
fontSize: 14,
|
|
4843
|
-
fill:
|
|
4843
|
+
fill: Oe,
|
|
4844
4844
|
boundsPadding: [
|
|
4845
4845
|
0,
|
|
4846
4846
|
0,
|
|
@@ -4850,11 +4850,11 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4850
4850
|
cursor: "pointer"
|
|
4851
4851
|
});
|
|
4852
4852
|
Fe.addEventListener("mouseenter", (Xe) => {
|
|
4853
|
-
Xe.target.setAttribute("fill", J(
|
|
4853
|
+
Xe.target.setAttribute("fill", J(Oe, -20)), we.scenegraph.stage.renderNextFrame();
|
|
4854
4854
|
const zt = p.value?.getBoundingClientRect();
|
|
4855
4855
|
zt && M(Ct, fe, We, Xe.canvasX + zt.left - 64, Xe.canvasY + zt.top + 8), V = !0, X();
|
|
4856
4856
|
}), Fe.addEventListener("mouseleave", (Xe) => {
|
|
4857
|
-
Xe.target.setAttribute("fill",
|
|
4857
|
+
Xe.target.setAttribute("fill", Oe), we.scenegraph.stage.renderNextFrame(), V = !1, D();
|
|
4858
4858
|
}), _e.add(Fe);
|
|
4859
4859
|
}
|
|
4860
4860
|
return {
|
|
@@ -4864,24 +4864,24 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4864
4864
|
}
|
|
4865
4865
|
};
|
|
4866
4866
|
}, Ze = (I) => {
|
|
4867
|
-
const { dataValue: $, rect:
|
|
4867
|
+
const { dataValue: $, rect: U, table: te, col: W, row: q } = I;
|
|
4868
4868
|
let pe = "mdi:toggle-switch", ue = "#165dff";
|
|
4869
4869
|
$ || (pe = "mdi:toggle-switch-off", ue = "#e5e6eb");
|
|
4870
|
-
const
|
|
4870
|
+
const ne = sa(pe), de = ne?.body?.replace(/currentColor/g, ue), we = [], Be = te?.getBodyField?.(W, q), xe = te?.options?.columns || [], fe = Be ? Wt(xe, Be) : null, We = 8, Ye = 40;
|
|
4871
4871
|
let $e = We;
|
|
4872
|
-
return fe?.style?.textAlign === "center" ? $e = Math.max(We, (
|
|
4872
|
+
return fe?.style?.textAlign === "center" ? $e = Math.max(We, (U.width - Ye) / 2) : fe?.style?.textAlign === "right" && ($e = Math.max(We, U.width - Ye - We)), we.push({
|
|
4873
4873
|
type: "icon",
|
|
4874
|
-
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${Ye}" height="${Ye}" viewBox="0 0 ${
|
|
4874
|
+
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${Ye}" height="${Ye}" viewBox="0 0 ${ne?.width} ${ne?.height}" >${de}</svg>`,
|
|
4875
4875
|
x: $e,
|
|
4876
|
-
y: (
|
|
4876
|
+
y: (U.height - Ye) / 2,
|
|
4877
4877
|
width: Ye,
|
|
4878
4878
|
height: Ye
|
|
4879
4879
|
}), { elements: we };
|
|
4880
4880
|
}, Ae = (I) => {
|
|
4881
|
-
const { dataValue: $, rect:
|
|
4882
|
-
for (let Ye = 0; Ye <
|
|
4883
|
-
const $e = ue + Ye * (q + pe), ut =
|
|
4884
|
-
if (
|
|
4881
|
+
const { dataValue: $, rect: U } = I, te = Number($) || 0, W = 5, q = 20, pe = 4, ue = 8, ne = (U.height - q) / 2, de = [], we = sa("mdi:star"), Be = sa("mdi:star-half-full"), xe = sa("mdi:star-outline"), fe = "#f7ba2a", We = "#e5e6eb";
|
|
4882
|
+
for (let Ye = 0; Ye < W; Ye++) {
|
|
4883
|
+
const $e = ue + Ye * (q + pe), ut = ne;
|
|
4884
|
+
if (te >= Ye + 1) {
|
|
4885
4885
|
const Ue = we?.body?.replace(/currentColor/g, fe);
|
|
4886
4886
|
de.push({
|
|
4887
4887
|
type: "icon",
|
|
@@ -4891,11 +4891,11 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4891
4891
|
width: q,
|
|
4892
4892
|
height: q
|
|
4893
4893
|
});
|
|
4894
|
-
} else if (
|
|
4895
|
-
const Ue =
|
|
4894
|
+
} else if (te > Ye && te < Ye + 1) {
|
|
4895
|
+
const Ue = Be?.body?.replace(/currentColor/g, fe);
|
|
4896
4896
|
de.push({
|
|
4897
4897
|
type: "icon",
|
|
4898
|
-
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${q}" height="${q}" viewBox="0 0 ${
|
|
4898
|
+
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${q}" height="${q}" viewBox="0 0 ${Be?.width} ${Be?.height}">${Ue}</svg>`,
|
|
4899
4899
|
x: $e,
|
|
4900
4900
|
y: ut,
|
|
4901
4901
|
width: q,
|
|
@@ -4915,12 +4915,12 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4915
4915
|
}
|
|
4916
4916
|
return { elements: de };
|
|
4917
4917
|
}, nt = (I) => {
|
|
4918
|
-
const { dataValue: $, rect:
|
|
4919
|
-
const
|
|
4920
|
-
return `M ${
|
|
4918
|
+
const { dataValue: $, rect: U, table: te, col: W, row: q } = I, pe = te.getBodyField(W, q), ue = Wt(te.options?.columns || [], pe)?._compConfig || {}, ne = Number(ue.min) || 0, de = Number(ue.max) || 100, we = Number($) || 0, Be = de - ne, xe = Be === 0 ? 0 : Math.max(0, Math.min(100, (we - ne) / Be * 100)), fe = 4, We = 8, Ye = 8, $e = (U.height - fe) / 2, ut = String(we), Ue = sn(ut) || 0, mt = We, Ct = $e, _e = U.width - We * 2 - Ue - Ye, Oe = _e * xe / 100, Fe = [], Xe = (It, Ft, aa) => {
|
|
4919
|
+
const Pe = Math.min(aa, Ft / 2, It / 2);
|
|
4920
|
+
return `M ${Pe} 0 L ${It - Pe} 0 Q ${It} 0 ${It} ${Pe} L ${It} ${Ft - Pe} Q ${It} ${Ft} ${It - Pe} ${Ft} L ${Pe} ${Ft} Q 0 ${Ft} 0 ${Ft - Pe} L 0 ${Pe} Q 0 0 ${Pe} 0 Z`;
|
|
4921
4921
|
}, zt = (It, Ft, aa) => {
|
|
4922
|
-
const
|
|
4923
|
-
return It <=
|
|
4922
|
+
const Pe = Math.min(aa, Ft / 2, It / 2);
|
|
4923
|
+
return It <= Pe * 2 ? Xe(It, Ft, aa) : `M ${Pe} 0 L ${It} 0 L ${It} ${Ft} L ${Pe} ${Ft} Q 0 ${Ft} 0 ${Ft - Pe} L 0 ${Pe} Q 0 0 ${Pe} 0 Z`;
|
|
4924
4924
|
}, tn = Xe(_e, fe, fe / 2);
|
|
4925
4925
|
if (Fe.push({
|
|
4926
4926
|
type: "icon",
|
|
@@ -4929,18 +4929,18 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4929
4929
|
y: Ct,
|
|
4930
4930
|
width: _e,
|
|
4931
4931
|
height: fe
|
|
4932
|
-
}),
|
|
4933
|
-
const It = zt(
|
|
4932
|
+
}), Oe > 0) {
|
|
4933
|
+
const It = zt(Oe, fe, fe / 2);
|
|
4934
4934
|
Fe.push({
|
|
4935
4935
|
type: "icon",
|
|
4936
|
-
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
4936
|
+
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${Oe}" height="${fe}" viewBox="0 0 ${Oe} ${fe}"><path d="${It}" fill="#165dff"/></svg>`,
|
|
4937
4937
|
x: mt,
|
|
4938
4938
|
y: Ct,
|
|
4939
|
-
width:
|
|
4939
|
+
width: Oe,
|
|
4940
4940
|
height: fe
|
|
4941
4941
|
});
|
|
4942
4942
|
}
|
|
4943
|
-
const na = mt + _e + Ye, Do =
|
|
4943
|
+
const na = mt + _e + Ye, Do = U.height / 2;
|
|
4944
4944
|
return Fe.push({
|
|
4945
4945
|
type: "text",
|
|
4946
4946
|
text: ut,
|
|
@@ -4951,21 +4951,21 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4951
4951
|
textAlign: "left",
|
|
4952
4952
|
textBaseline: "middle"
|
|
4953
4953
|
}), { elements: Fe };
|
|
4954
|
-
}, ct = (I) => String(I).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"),
|
|
4954
|
+
}, ct = (I) => String(I).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), ee = (I, $) => {
|
|
4955
4955
|
if (!I) return "";
|
|
4956
4956
|
if ((sn(I) || 0) <= $) return I;
|
|
4957
|
-
const
|
|
4958
|
-
if (
|
|
4959
|
-
let
|
|
4960
|
-
for (;
|
|
4961
|
-
const pe = Math.ceil((
|
|
4962
|
-
(sn(I.slice(0, pe)) || 0) +
|
|
4957
|
+
const U = "...", te = sn(U) || 0;
|
|
4958
|
+
if (te >= $) return "";
|
|
4959
|
+
let W = 0, q = I.length;
|
|
4960
|
+
for (; W < q; ) {
|
|
4961
|
+
const pe = Math.ceil((W + q) / 2);
|
|
4962
|
+
(sn(I.slice(0, pe)) || 0) + te <= $ ? W = pe : q = pe - 1;
|
|
4963
4963
|
}
|
|
4964
|
-
return I.slice(0,
|
|
4964
|
+
return I.slice(0, W) + U;
|
|
4965
4965
|
}, Ce = (I) => {
|
|
4966
|
-
const { value: $, rect:
|
|
4966
|
+
const { value: $, rect: U, table: te, col: W, row: q } = I;
|
|
4967
4967
|
if (!$) return { elements: [] };
|
|
4968
|
-
const pe =
|
|
4968
|
+
const pe = te.getBodyField(W, q), ue = Wt(te.options?.columns || [], pe)?._compConfig || {}, ne = Number(ue.size) || 16, de = ue.color, we = (U.width - ne) / 2, Be = (U.height - ne) / 2;
|
|
4969
4969
|
let xe = String($).trim();
|
|
4970
4970
|
if (!xe) return { elements: [] };
|
|
4971
4971
|
if (xe.startsWith("<svg")) {
|
|
@@ -4977,47 +4977,47 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
4977
4977
|
const ut = We.match(/\bwidth\s*=\s*["']?([0-9.]+)[^"']*["']?/i)?.[1], Ue = We.match(/\bheight\s*=\s*["']?([0-9.]+)[^"']*["']?/i)?.[1];
|
|
4978
4978
|
$e = ut && Ue ? `0 0 ${ut} ${Ue}` : "0 0 24 24";
|
|
4979
4979
|
}
|
|
4980
|
-
xe = `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
4981
|
-
} else xe = `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
4980
|
+
xe = `<svg xmlns="http://www.w3.org/2000/svg" width="${ne}" height="${ne}" viewBox="${$e}">${Ye}</svg>`;
|
|
4981
|
+
} else xe = `<svg xmlns="http://www.w3.org/2000/svg" width="${ne}" height="${ne}" viewBox="0 0 24 24"></svg>`;
|
|
4982
4982
|
} else {
|
|
4983
4983
|
const fe = sa(xe);
|
|
4984
4984
|
if (fe) {
|
|
4985
4985
|
const { body: We, width: Ye, height: $e } = fe;
|
|
4986
|
-
xe = `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
4986
|
+
xe = `<svg xmlns="http://www.w3.org/2000/svg" width="${ne}" height="${ne}" viewBox="0 0 ${Ye} ${$e}">${We}</svg>`;
|
|
4987
4987
|
}
|
|
4988
4988
|
}
|
|
4989
4989
|
return de && (xe = xe.replace(/currentColor/g, de)), { elements: [{
|
|
4990
4990
|
type: "icon",
|
|
4991
4991
|
svg: xe,
|
|
4992
4992
|
x: we,
|
|
4993
|
-
y:
|
|
4994
|
-
width:
|
|
4995
|
-
height:
|
|
4993
|
+
y: Be,
|
|
4994
|
+
width: ne,
|
|
4995
|
+
height: ne
|
|
4996
4996
|
}] };
|
|
4997
|
-
},
|
|
4998
|
-
const { dataValue: $, rect:
|
|
4997
|
+
}, Ie = (I) => {
|
|
4998
|
+
const { dataValue: $, rect: U, table: te, col: W, row: q, value: pe } = I, ue = te.getBodyField(W, q), ne = Wt(te.options?.columns || [], ue), de = ne?._compConfig || {}, we = ne?.style?.textAlign || "left", Be = c({
|
|
4999
4999
|
config: de,
|
|
5000
|
-
row:
|
|
5001
|
-
value:
|
|
5000
|
+
row: te.getRecordByCell?.(W, q) || te.getCellOriginRecord?.(W, q),
|
|
5001
|
+
value: ne._fieldFormat ? pe : $
|
|
5002
5002
|
});
|
|
5003
|
-
if (
|
|
5004
|
-
const xe = 14, fe = 28, We = 2, Ye = 12, $e = 8, ut = 6, Ue = 8, mt = Math.max(0,
|
|
5005
|
-
const Pt = sn(
|
|
5003
|
+
if (Be.length === 0) return { elements: [] };
|
|
5004
|
+
const xe = 14, fe = 28, We = 2, Ye = 12, $e = 8, ut = 6, Ue = 8, mt = Math.max(0, U.width - Ue * 2), Ct = Math.max(0, mt - Ye * 2), _e = [], Oe = (Pe) => {
|
|
5005
|
+
const Pt = sn(ee(Pe, Ct)) || 0;
|
|
5006
5006
|
return Math.min(mt, Pt + Ye * 2);
|
|
5007
|
-
}, Fe = (
|
|
5008
|
-
const Fo =
|
|
5007
|
+
}, Fe = (Pe, Pt, hn, Vt, On) => {
|
|
5008
|
+
const Fo = ee(hn, Ct), Ju = ct(Fo), Xu = sn(Fo) || 0, Ca = Math.min(mt, Xu + Ye * 2), qu = Vt || "#f2f3f5", Zu = On || "#1d2129", Qu = fe / 2 + xe * 0.35, ed = `<svg xmlns="http://www.w3.org/2000/svg" width="${Ca}" height="${fe}" viewBox="0 0 ${Ca} ${fe}"><rect x="0" y="0" width="${Ca}" height="${fe}" rx="${We}" ry="${We}" fill="${qu}"/><text x="${Ca / 2}" y="${Qu}" text-anchor="middle" font-size="${xe}" fill="${Zu}">${Ju}</text></svg>`;
|
|
5009
5009
|
return _e.push({
|
|
5010
5010
|
type: "icon",
|
|
5011
5011
|
svg: ed,
|
|
5012
|
-
x:
|
|
5012
|
+
x: Pe,
|
|
5013
5013
|
y: Pt,
|
|
5014
5014
|
width: Ca,
|
|
5015
5015
|
height: fe
|
|
5016
5016
|
}), { tagWidth: Ca };
|
|
5017
5017
|
}, Xe = [];
|
|
5018
5018
|
let zt = [], tn = 0;
|
|
5019
|
-
for (let
|
|
5020
|
-
const Pt = Pe
|
|
5019
|
+
for (let Pe = 0; Pe < Be.length; Pe++) {
|
|
5020
|
+
const Pt = Be[Pe], hn = Pt.label, Vt = Oe(hn), On = {
|
|
5021
5021
|
label: hn,
|
|
5022
5022
|
bg: Pt.color || "#f2f3f5",
|
|
5023
5023
|
text: Pt.textColor || Je(Pt.color || "#f2f3f5"),
|
|
@@ -5032,54 +5032,54 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5032
5032
|
items: zt,
|
|
5033
5033
|
lineWidth: tn
|
|
5034
5034
|
});
|
|
5035
|
-
const na =
|
|
5035
|
+
const na = U.height;
|
|
5036
5036
|
let Do = Math.max(1, Math.floor((na + ut) / (fe + ut))), It = !1;
|
|
5037
5037
|
if (Xe.length > Do && (It = !0, Xe.length = Do), It) {
|
|
5038
|
-
const
|
|
5039
|
-
let hn =
|
|
5040
|
-
for (; hn > mt &&
|
|
5041
|
-
const Vt =
|
|
5038
|
+
const Pe = Xe[Xe.length - 1], Pt = Oe("...");
|
|
5039
|
+
let hn = Pe.lineWidth + (Pe.items.length > 0 ? $e : 0) + Pt;
|
|
5040
|
+
for (; hn > mt && Pe.items.length > 0; ) {
|
|
5041
|
+
const Vt = Pe.items.pop();
|
|
5042
5042
|
if (!Vt) break;
|
|
5043
|
-
|
|
5043
|
+
Pe.items.length > 0 ? Pe.lineWidth -= $e + Vt.width : Pe.lineWidth -= Vt.width, hn = Pe.lineWidth + (Pe.items.length > 0 ? $e : 0) + Pt;
|
|
5044
5044
|
}
|
|
5045
|
-
|
|
5045
|
+
Pe.items.push({
|
|
5046
5046
|
label: "...",
|
|
5047
5047
|
bg: "#f2f3f5",
|
|
5048
5048
|
text: "#1d2129",
|
|
5049
5049
|
width: Pt
|
|
5050
|
-
}),
|
|
5050
|
+
}), Pe.lineWidth += Pe.items.length > 1 ? $e + Pt : Pt;
|
|
5051
5051
|
}
|
|
5052
5052
|
const Ft = Xe.length * fe + (Xe.length > 1 ? (Xe.length - 1) * ut : 0);
|
|
5053
|
-
let aa = Math.max(0, (
|
|
5054
|
-
for (let
|
|
5055
|
-
const Pt = Xe[
|
|
5053
|
+
let aa = Math.max(0, (U.height - Ft) / 2);
|
|
5054
|
+
for (let Pe = 0; Pe < Xe.length; Pe++) {
|
|
5055
|
+
const Pt = Xe[Pe];
|
|
5056
5056
|
let hn = we === "center" ? Ue + Math.max(0, (mt - Pt.lineWidth) / 2) : we === "right" ? Ue + Math.max(0, mt - Pt.lineWidth) : Ue;
|
|
5057
5057
|
for (let Vt = 0; Vt < Pt.items.length; Vt++) {
|
|
5058
5058
|
const On = Pt.items[Vt], { tagWidth: Fo } = Fe(hn, aa, On.label, On.bg, On.text);
|
|
5059
5059
|
hn += Fo + (Vt < Pt.items.length - 1 ? $e : 0);
|
|
5060
5060
|
}
|
|
5061
|
-
aa += fe + (
|
|
5061
|
+
aa += fe + (Pe < Xe.length - 1 ? ut : 0);
|
|
5062
5062
|
}
|
|
5063
5063
|
return { elements: _e };
|
|
5064
5064
|
}, Je = (I) => {
|
|
5065
5065
|
if (!I) return "#1d2129";
|
|
5066
|
-
I = I.replace("#", ""), I.length === 3 && (I = I.split("").map((
|
|
5067
|
-
const $ = parseInt(I.substring(0, 2), 16),
|
|
5068
|
-
if (($ * 299 +
|
|
5069
|
-
const
|
|
5066
|
+
I = I.replace("#", ""), I.length === 3 && (I = I.split("").map((W) => W + W).join(""));
|
|
5067
|
+
const $ = parseInt(I.substring(0, 2), 16), U = parseInt(I.substring(2, 4), 16), te = parseInt(I.substring(4, 6), 16);
|
|
5068
|
+
if (($ * 299 + U * 587 + te * 114) / 1e3 >= 128) {
|
|
5069
|
+
const W = $ / 255, q = U / 255, pe = te / 255, ue = Math.max(W, q, pe), ne = Math.min(W, q, pe);
|
|
5070
5070
|
let de = 0, we = 0;
|
|
5071
|
-
const
|
|
5072
|
-
if (ue !==
|
|
5073
|
-
const Ue = ue -
|
|
5074
|
-
switch (we =
|
|
5075
|
-
case
|
|
5071
|
+
const Be = (ue + ne) / 2;
|
|
5072
|
+
if (ue !== ne) {
|
|
5073
|
+
const Ue = ue - ne;
|
|
5074
|
+
switch (we = Be > 0.5 ? Ue / (2 - ue - ne) : Ue / (ue + ne), ue) {
|
|
5075
|
+
case W:
|
|
5076
5076
|
de = (q - pe) / Ue + (q < pe ? 6 : 0);
|
|
5077
5077
|
break;
|
|
5078
5078
|
case q:
|
|
5079
|
-
de = (pe -
|
|
5079
|
+
de = (pe - W) / Ue + 2;
|
|
5080
5080
|
break;
|
|
5081
5081
|
case pe:
|
|
5082
|
-
de = (
|
|
5082
|
+
de = (W - q) / Ue + 4;
|
|
5083
5083
|
break;
|
|
5084
5084
|
}
|
|
5085
5085
|
de /= 6;
|
|
@@ -5088,7 +5088,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5088
5088
|
let We, Ye, $e;
|
|
5089
5089
|
if (fe === 0) We = Ye = $e = xe;
|
|
5090
5090
|
else {
|
|
5091
|
-
const Ue = (_e,
|
|
5091
|
+
const Ue = (_e, Oe, Fe) => (Fe < 0 && (Fe += 1), Fe > 1 && (Fe -= 1), Fe < 0.16666666666666666 ? _e + (Oe - _e) * 6 * Fe : Fe < 0.5 ? Oe : Fe < 0.6666666666666666 ? _e + (Oe - _e) * (0.6666666666666666 - Fe) * 6 : _e), mt = xe < 0.5 ? xe * (1 + fe) : xe + fe - xe * fe, Ct = 2 * xe - mt;
|
|
5092
5092
|
We = Ue(Ct, mt, de + 1 / 3), Ye = Ue(Ct, mt, de), $e = Ue(Ct, mt, de - 1 / 3);
|
|
5093
5093
|
}
|
|
5094
5094
|
const ut = (Ue) => Math.round(Ue * 255).toString(16).padStart(2, "0");
|
|
@@ -5096,9 +5096,9 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5096
5096
|
}
|
|
5097
5097
|
return "#ffffff";
|
|
5098
5098
|
}, Lt = (I) => {
|
|
5099
|
-
const { table: $, row:
|
|
5100
|
-
height:
|
|
5101
|
-
width:
|
|
5099
|
+
const { table: $, row: U, col: te, rect: W, value: q } = I, { Group: pe, Text: ue } = Le.CustomLayout, ne = $.getBodyField(te, U), de = Wt($.options?.columns || [], ne), we = de?._compConfig || {}, Be = new pe({
|
|
5100
|
+
height: W.height,
|
|
5101
|
+
width: W.width,
|
|
5102
5102
|
display: "flex",
|
|
5103
5103
|
alignItems: "center",
|
|
5104
5104
|
justifyContent: de.style?.textAlign === "center" ? "center" : de.style?.textAlign === "right" ? "flex-end" : "flex-start"
|
|
@@ -5116,7 +5116,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5116
5116
|
});
|
|
5117
5117
|
return fe.addEventListener("click", () => {
|
|
5118
5118
|
if (we.click) {
|
|
5119
|
-
const We = $.getCellOriginRecord(
|
|
5119
|
+
const We = $.getCellOriginRecord(te, U);
|
|
5120
5120
|
we.click({
|
|
5121
5121
|
row: We,
|
|
5122
5122
|
column: de,
|
|
@@ -5127,14 +5127,14 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5127
5127
|
We.target.setAttribute("fill", J(xe, -20)), $.scenegraph.stage.renderNextFrame();
|
|
5128
5128
|
}), fe.addEventListener("mouseleave", (We) => {
|
|
5129
5129
|
We.target.setAttribute("fill", xe), $.scenegraph.stage.renderNextFrame();
|
|
5130
|
-
}),
|
|
5131
|
-
rootContainer:
|
|
5130
|
+
}), Be.add(fe), {
|
|
5131
|
+
rootContainer: Be,
|
|
5132
5132
|
renderDefault: !1
|
|
5133
5133
|
};
|
|
5134
5134
|
}, Dt = (I) => {
|
|
5135
|
-
const { table: $, row:
|
|
5136
|
-
const
|
|
5137
|
-
|
|
5135
|
+
const { table: $, row: U, col: te, rect: W } = I, { height: q, width: pe } = W ?? $.getCellRect(te, U), { Group: ue, CheckBox: ne } = Le.CustomLayout, de = $.getBodyField(te, U), we = Wt($.options?.columns || [], de), Be = $.getCellOriginRecord(te, U) || {}, xe = we?.style?.textAlign === "right" ? "flex-end" : we?.style?.textAlign === "center" ? "center" : "flex-start", fe = we?.style?.textAlign === "right" ? "flex-end" : we?.style?.textAlign === "center" ? "center" : "flex-start", We = (Ct, _e) => {
|
|
5136
|
+
const Oe = Be?.[de];
|
|
5137
|
+
Be[de] = (Array.isArray(Oe) ? Oe : []).map((Fe, Xe) => Xe !== Ct ? Fe : Fe && typeof Fe == "object" ? {
|
|
5138
5138
|
...Fe,
|
|
5139
5139
|
..._e
|
|
5140
5140
|
} : { ..._e });
|
|
@@ -5148,7 +5148,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5148
5148
|
alignItems: xe,
|
|
5149
5149
|
justifyContent: "center",
|
|
5150
5150
|
flexWrap: "nowrap"
|
|
5151
|
-
}), ut =
|
|
5151
|
+
}), ut = Be?.[de];
|
|
5152
5152
|
if (!Array.isArray(ut)) return {
|
|
5153
5153
|
rootContainer: $e,
|
|
5154
5154
|
renderDefault: !1
|
|
@@ -5169,9 +5169,9 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5169
5169
|
});
|
|
5170
5170
|
$e.add(mt);
|
|
5171
5171
|
for (let Ct = 0; Ct < Ue.length; Ct++) {
|
|
5172
|
-
const _e = Ue[Ct],
|
|
5172
|
+
const _e = Ue[Ct], Oe = _e && typeof _e == "object" ? _e.label ?? _e.value ?? "" : _e ?? "", Fe = new ne({
|
|
5173
5173
|
text: {
|
|
5174
|
-
text: String(
|
|
5174
|
+
text: String(Oe),
|
|
5175
5175
|
fontSize: 12
|
|
5176
5176
|
},
|
|
5177
5177
|
checked: !!(_e && typeof _e == "object" && _e.checked),
|
|
@@ -5194,29 +5194,29 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5194
5194
|
renderDefault: !1
|
|
5195
5195
|
};
|
|
5196
5196
|
}, at = (I) => {
|
|
5197
|
-
const { table: $, row:
|
|
5197
|
+
const { table: $, row: U, col: te } = I, W = $.getBodyField(te, U), q = Wt($.options?.columns || [], W), pe = q?._compConfig || {};
|
|
5198
5198
|
if (q?._customLayout) return q._customLayout({
|
|
5199
5199
|
...I,
|
|
5200
5200
|
config: pe,
|
|
5201
5201
|
customLayout: Le.CustomLayout
|
|
5202
5202
|
});
|
|
5203
5203
|
}, Wt = (I, $) => {
|
|
5204
|
-
for (const
|
|
5205
|
-
if (
|
|
5206
|
-
if (
|
|
5207
|
-
const
|
|
5208
|
-
if (
|
|
5204
|
+
for (const U of I) {
|
|
5205
|
+
if (U.field === $) return U;
|
|
5206
|
+
if (U.columns) {
|
|
5207
|
+
const te = Wt(U.columns, $);
|
|
5208
|
+
if (te) return te;
|
|
5209
5209
|
}
|
|
5210
5210
|
}
|
|
5211
5211
|
return null;
|
|
5212
|
-
}, jn = (I, $,
|
|
5213
|
-
const
|
|
5214
|
-
if (q._fieldFormat) return q._fieldFormat(I, $,
|
|
5212
|
+
}, jn = (I, $, U, te) => {
|
|
5213
|
+
const W = te.getBodyField($, U), q = Wt(te.options?.columns || [], W);
|
|
5214
|
+
if (q._fieldFormat) return q._fieldFormat(I, $, U, te);
|
|
5215
5215
|
if (q._compType === "dateTime") {
|
|
5216
5216
|
const pe = q._compConfig?.format || "YYYY-MM-DD HH:mm:ss";
|
|
5217
|
-
return sc(I[
|
|
5217
|
+
return sc(I[W], pe);
|
|
5218
5218
|
}
|
|
5219
|
-
return bf(I[
|
|
5219
|
+
return bf(I[W], s, {
|
|
5220
5220
|
type: q._compType,
|
|
5221
5221
|
getCompType: q._getCompType,
|
|
5222
5222
|
getCompConfig: q._getCompConfig,
|
|
@@ -5226,40 +5226,40 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5226
5226
|
row: I
|
|
5227
5227
|
});
|
|
5228
5228
|
}, Zt = (I) => {
|
|
5229
|
-
const $ = I.filter((
|
|
5230
|
-
const { id:
|
|
5231
|
-
field:
|
|
5229
|
+
const $ = I.filter((U) => U.config?.display !== !1).map((U) => {
|
|
5230
|
+
const { id: te, type: W, config: q, getCompConfig: pe, getCompType: ue, children: ne, customLayout: de } = U, { label: we, width: Be, minWidth: xe, maxWidth: fe, align: We, headerAlign: Ye, fieldFormat: $e, editor: ut, frozen: Ue, ...mt } = q || {}, Ct = Ye ?? We, _e = {
|
|
5231
|
+
field: te,
|
|
5232
5232
|
title: we,
|
|
5233
|
-
width:
|
|
5233
|
+
width: Be,
|
|
5234
5234
|
minWidth: xe,
|
|
5235
5235
|
maxWidth: fe,
|
|
5236
5236
|
...Ct ? { headerStyle: { textAlign: Ct } } : {},
|
|
5237
5237
|
style: { textAlign: We },
|
|
5238
5238
|
_customLayout: de,
|
|
5239
5239
|
_fieldFormat: $e,
|
|
5240
|
-
_compType:
|
|
5240
|
+
_compType: W,
|
|
5241
5241
|
_compConfig: { ...mt },
|
|
5242
5242
|
_getCompConfig: pe,
|
|
5243
5243
|
_getCompType: ue,
|
|
5244
5244
|
frozen: Ue
|
|
5245
|
-
},
|
|
5246
|
-
return
|
|
5245
|
+
}, Oe = Kh(W);
|
|
5246
|
+
return Oe && (_e.editor = Oe, y = !0), W === "j-switch" && (_e.customRender = Ze, _e.minWidth = _e.minWidth || Be, _e.maxWidth = _e.maxWidth || Be), W === "j-rate" && (_e.customRender = Ae), W === "j-slider" && (_e.customRender = nt), (W === "j-tag" || W === "j-input-tag") && (_e.customRender = Ie), W === "j-icon" && (_e.customRender = Ce), W === "link" && (_e.customLayout = Lt), W === "checkbox" && (_e.customLayout = Dt), de && (_e.customLayout = at), _e.fieldFormat = jn, ne && ne.length > 0 && (_e.columns = Zt(ne)), _e;
|
|
5247
5247
|
});
|
|
5248
5248
|
return o.isTree && $.length > 0 && ($[0].tree = !0), $;
|
|
5249
5249
|
}, J = (I, $) => {
|
|
5250
|
-
const
|
|
5251
|
-
return `#${(
|
|
5250
|
+
const U = I.replace("#", ""), te = parseInt(U, 16), W = Math.min(255, Math.max(0, (te >> 16) + $)), q = Math.min(255, Math.max(0, (te >> 8 & 255) + $)), pe = Math.min(255, Math.max(0, (te & 255) + $));
|
|
5251
|
+
return `#${(W << 16 | q << 8 | pe).toString(16).padStart(6, "0")}`;
|
|
5252
5252
|
}, ce = () => {
|
|
5253
5253
|
let I = R;
|
|
5254
5254
|
o.isPage && (I = be.value + R);
|
|
5255
5255
|
let $ = sn(String(I)) || 0;
|
|
5256
5256
|
return o.subColumns && o.subColumns.length > 0 && ($ = $ + 32), Math.max(45, $ + 18);
|
|
5257
5257
|
}, Z = (I) => {
|
|
5258
|
-
let $ = (
|
|
5259
|
-
const pe = q.getRecordIndexByCell(
|
|
5258
|
+
let $ = (U, te, W, q) => {
|
|
5259
|
+
const pe = q.getRecordIndexByCell(te, W);
|
|
5260
5260
|
return o.isPage && !I ? be.value + pe + 1 : pe + 1;
|
|
5261
5261
|
};
|
|
5262
|
-
return I && ($ = (
|
|
5262
|
+
return I && ($ = (U, te, W, q) => q.getRecordIndexByCell(te, W) + 1), {
|
|
5263
5263
|
field: "__sequence__",
|
|
5264
5264
|
title: "序号",
|
|
5265
5265
|
width: m,
|
|
@@ -5272,7 +5272,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5272
5272
|
_getCompConfig: void 0,
|
|
5273
5273
|
_getCompType: void 0
|
|
5274
5274
|
};
|
|
5275
|
-
},
|
|
5275
|
+
}, Q = () => ({
|
|
5276
5276
|
field: "__placeholder__",
|
|
5277
5277
|
title: "",
|
|
5278
5278
|
width: "auto",
|
|
@@ -5286,79 +5286,79 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5286
5286
|
}), ie = (I) => {
|
|
5287
5287
|
if (I.frozen) return I.frozen;
|
|
5288
5288
|
if (I.columns) for (const $ of I.columns) {
|
|
5289
|
-
const
|
|
5290
|
-
if (
|
|
5289
|
+
const U = ie($);
|
|
5290
|
+
if (U) return U;
|
|
5291
5291
|
}
|
|
5292
5292
|
}, Se = (I) => {
|
|
5293
5293
|
const $ = [];
|
|
5294
|
-
return I.forEach((
|
|
5295
|
-
if (
|
|
5296
|
-
$.push(
|
|
5294
|
+
return I.forEach((U) => {
|
|
5295
|
+
if (U.frozen) {
|
|
5296
|
+
$.push(U);
|
|
5297
5297
|
return;
|
|
5298
5298
|
}
|
|
5299
|
-
if (!
|
|
5300
|
-
$.push(
|
|
5299
|
+
if (!U.columns || U.columns.length === 0) {
|
|
5300
|
+
$.push(U);
|
|
5301
5301
|
return;
|
|
5302
5302
|
}
|
|
5303
|
-
const
|
|
5304
|
-
if (
|
|
5305
|
-
const
|
|
5306
|
-
|
|
5307
|
-
}), (
|
|
5308
|
-
|
|
5303
|
+
const te = Se(U.columns), W = [], q = [], pe = [];
|
|
5304
|
+
if (te.forEach((ue) => {
|
|
5305
|
+
const ne = ie(ue);
|
|
5306
|
+
ne === "left" ? W.push(ue) : ne === "right" ? q.push(ue) : pe.push(ue);
|
|
5307
|
+
}), (W.length > 0 ? 1 : 0) + (q.length > 0 ? 1 : 0) + (pe.length > 0 ? 1 : 0) <= 1) {
|
|
5308
|
+
U.columns = te, $.push(U);
|
|
5309
5309
|
return;
|
|
5310
5310
|
}
|
|
5311
|
-
|
|
5312
|
-
...
|
|
5313
|
-
columns:
|
|
5311
|
+
W.length && $.push({
|
|
5312
|
+
...U,
|
|
5313
|
+
columns: W
|
|
5314
5314
|
}), pe.length && $.push({
|
|
5315
|
-
...
|
|
5315
|
+
...U,
|
|
5316
5316
|
columns: pe
|
|
5317
5317
|
}), q.length && $.push({
|
|
5318
|
-
...
|
|
5318
|
+
...U,
|
|
5319
5319
|
columns: q
|
|
5320
5320
|
});
|
|
5321
5321
|
}), $;
|
|
5322
5322
|
}, Me = (I) => {
|
|
5323
|
-
let $ = 0,
|
|
5324
|
-
return I.forEach((
|
|
5325
|
-
if (
|
|
5326
|
-
const
|
|
5327
|
-
$ +=
|
|
5328
|
-
} else
|
|
5323
|
+
let $ = 0, U = 0;
|
|
5324
|
+
return I.forEach((te) => {
|
|
5325
|
+
if (te.columns && te.columns.length > 0) {
|
|
5326
|
+
const W = Me(te.columns);
|
|
5327
|
+
$ += W.left, U += W.right;
|
|
5328
|
+
} else te.frozen === "left" ? $++ : te.frozen === "right" && U++;
|
|
5329
5329
|
}), {
|
|
5330
5330
|
left: $,
|
|
5331
|
-
right:
|
|
5331
|
+
right: U
|
|
5332
5332
|
};
|
|
5333
|
-
}, ot = (I, $,
|
|
5333
|
+
}, ot = (I, $, U, te) => {
|
|
5334
5334
|
b = 0, x = 0, y = !1;
|
|
5335
|
-
const
|
|
5335
|
+
const W = {};
|
|
5336
5336
|
let q = Zt(I);
|
|
5337
|
-
q.length === 0 && (q = [
|
|
5338
|
-
const pe = [], ue = [],
|
|
5337
|
+
q.length === 0 && (q = [Q()]), q = Se(q);
|
|
5338
|
+
const pe = [], ue = [], ne = [];
|
|
5339
5339
|
q.forEach((xe) => {
|
|
5340
5340
|
const fe = ie(xe);
|
|
5341
|
-
fe === "left" ? pe.push(xe) : fe === "right" ? ue.push(xe) :
|
|
5341
|
+
fe === "left" ? pe.push(xe) : fe === "right" ? ue.push(xe) : ne.push(xe);
|
|
5342
5342
|
});
|
|
5343
5343
|
const de = Me(pe), we = Me(ue);
|
|
5344
5344
|
x += de.left, b += we.right, q = [
|
|
5345
5345
|
...pe,
|
|
5346
|
-
...
|
|
5346
|
+
...ne,
|
|
5347
5347
|
...ue
|
|
5348
|
-
], $ && (q.unshift(Z(
|
|
5348
|
+
], $ && (q.unshift(Z(te)), x++), U.length > 0 && (q.push(Ge(U)), b++), y && (W.editCellTrigger = "click", W.keyboardOptions = {
|
|
5349
5349
|
copySelected: !0,
|
|
5350
5350
|
cutSelected: !0,
|
|
5351
5351
|
pasteValueToCell: !0,
|
|
5352
5352
|
selectAllOnCtrlA: !0
|
|
5353
5353
|
});
|
|
5354
|
-
const
|
|
5354
|
+
const Be = (xe) => {
|
|
5355
5355
|
for (const fe of xe)
|
|
5356
|
-
if (fe?._compType === "checkbox" || Array.isArray(fe?.columns) &&
|
|
5356
|
+
if (fe?._compType === "checkbox" || Array.isArray(fe?.columns) && Be(fe.columns)) return !0;
|
|
5357
5357
|
return !1;
|
|
5358
5358
|
};
|
|
5359
|
-
return
|
|
5359
|
+
return Be(q) && (W.defaultRowHeight = "auto", W.defaultHeaderRowHeight = 40), {
|
|
5360
5360
|
columns: q,
|
|
5361
|
-
option:
|
|
5361
|
+
option: W
|
|
5362
5362
|
};
|
|
5363
5363
|
}, Tt = () => {
|
|
5364
5364
|
const I = ot(o.columns, o.isShowNumber && !o.isTree, o.actions);
|
|
@@ -5416,36 +5416,36 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5416
5416
|
}, lt = (I) => !o.isTree || !o.parentKey || I.some(($) => Array.isArray($?.children) && $.children.length > 0) ? I : gf(I, (o.rowKey || "").split(",")[0]?.trim() || "id", o.parentKey), Pn = (I) => {
|
|
5417
5417
|
if (!p.value) return;
|
|
5418
5418
|
m = ce(), Gh();
|
|
5419
|
-
const $ = Tt(),
|
|
5420
|
-
I && I.length >= 0 ? $.records = lt(I) :
|
|
5421
|
-
const
|
|
5422
|
-
g._getProvides = () =>
|
|
5423
|
-
if (
|
|
5424
|
-
g.setLoadingHierarchyState(
|
|
5419
|
+
const $ = Tt(), U = Yt();
|
|
5420
|
+
I && I.length >= 0 ? $.records = lt(I) : U.length > 0 ? $.records = lt(U) : ($.records = lt(o.records), i("update:modelValue", $.records)), g = new Le.ListTable(p.value, $), g._getAppContext = () => a?.appContext;
|
|
5421
|
+
const te = a?.provides;
|
|
5422
|
+
g._getProvides = () => te, o.loadChildren && g.on(Le.ListTable.EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, async (W) => {
|
|
5423
|
+
if (W.hierarchyState === Le.TYPES.HierarchyState.expand && W.originData?.children === !0) {
|
|
5424
|
+
g.setLoadingHierarchyState(W.col, W.row);
|
|
5425
5425
|
try {
|
|
5426
|
-
const q = await o.loadChildren(
|
|
5427
|
-
o.isTree && g && typeof g.setRecordChildren == "function" ? g.setRecordChildren(q,
|
|
5426
|
+
const q = await o.loadChildren(W.originData);
|
|
5427
|
+
o.isTree && g && typeof g.setRecordChildren == "function" ? g.setRecordChildren(q, W.col, W.row) : v && typeof v.setRecordChildren == "function" ? v.setRecordChildren(q, W.col, W.row) : g && typeof g.setRecordChildren == "function" && g.setRecordChildren(q, W.col, W.row);
|
|
5428
5428
|
} catch (q) {
|
|
5429
|
-
console.error("Failed to load detail data:", q), g.setLoadingHierarchyState(
|
|
5429
|
+
console.error("Failed to load detail data:", q), g.setLoadingHierarchyState(W.col, W.row);
|
|
5430
5430
|
}
|
|
5431
5431
|
}
|
|
5432
|
-
}), g.on("click_cell", (
|
|
5433
|
-
const { col: q, cellType: pe, originData: ue } =
|
|
5432
|
+
}), g.on("click_cell", (W) => {
|
|
5433
|
+
const { col: q, cellType: pe, originData: ue } = W;
|
|
5434
5434
|
if (yt.value) {
|
|
5435
5435
|
if (pe === "checkbox" && q == 0) {
|
|
5436
|
-
const
|
|
5437
|
-
|
|
5436
|
+
const ne = gt();
|
|
5437
|
+
ne.length == 0 && g.setCellCheckboxState(0, 0, !1), w.value = ne.length, i("selectionChanged", {
|
|
5438
5438
|
isMultiple: !0,
|
|
5439
|
-
selections:
|
|
5439
|
+
selections: ne,
|
|
5440
5440
|
record: ue,
|
|
5441
|
-
checked:
|
|
5441
|
+
checked: ne.find((de) => re(de) === re(ue)) !== void 0
|
|
5442
5442
|
}), g.renderWithRecreateCells();
|
|
5443
5443
|
}
|
|
5444
5444
|
} else setTimeout(() => {
|
|
5445
|
-
const
|
|
5446
|
-
w.value =
|
|
5445
|
+
const ne = gt();
|
|
5446
|
+
w.value = ne.length, i("selectionChanged", {
|
|
5447
5447
|
isMultiple: !1,
|
|
5448
|
-
selections:
|
|
5448
|
+
selections: ne,
|
|
5449
5449
|
record: ue,
|
|
5450
5450
|
checked: !0
|
|
5451
5451
|
});
|
|
@@ -5461,10 +5461,10 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5461
5461
|
ea(), Pn($);
|
|
5462
5462
|
});
|
|
5463
5463
|
else {
|
|
5464
|
-
const
|
|
5465
|
-
|
|
5464
|
+
const U = ce();
|
|
5465
|
+
U !== m ? (m = U, o.subColumns && o.subColumns.length > 0 ? (ea(), Pn($)) : _t($)) : g.setRecords($);
|
|
5466
5466
|
}
|
|
5467
|
-
o.selectStateKey && o.isMultiple && vt(I.filter((
|
|
5467
|
+
o.selectStateKey && o.isMultiple && vt(I.filter((U) => U[o.selectStateKey]));
|
|
5468
5468
|
}
|
|
5469
5469
|
}, Ua = () => g ? g.records : [];
|
|
5470
5470
|
kt(() => {
|
|
@@ -5502,29 +5502,29 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5502
5502
|
return [];
|
|
5503
5503
|
}
|
|
5504
5504
|
if (g.stateManager && g.stateManager.checkedState) {
|
|
5505
|
-
const I = [], $ = /* @__PURE__ */ new Set(),
|
|
5505
|
+
const I = [], $ = /* @__PURE__ */ new Set(), U = (ue) => {
|
|
5506
5506
|
if (!ue) return;
|
|
5507
|
-
const
|
|
5508
|
-
if (
|
|
5509
|
-
if ($.has(
|
|
5510
|
-
$.add(
|
|
5507
|
+
const ne = re(ue);
|
|
5508
|
+
if (ne) {
|
|
5509
|
+
if ($.has(ne)) return;
|
|
5510
|
+
$.add(ne);
|
|
5511
5511
|
const de = {};
|
|
5512
5512
|
ui(de, ue, ["children"]), I.push(de);
|
|
5513
5513
|
}
|
|
5514
|
-
},
|
|
5515
|
-
const
|
|
5516
|
-
!Array.isArray(
|
|
5517
|
-
|
|
5514
|
+
}, te = (ue) => {
|
|
5515
|
+
const ne = ue?.children;
|
|
5516
|
+
!Array.isArray(ne) || ne.length === 0 || ne.forEach((de) => {
|
|
5517
|
+
U(de), te(de);
|
|
5518
5518
|
});
|
|
5519
|
-
},
|
|
5520
|
-
const we = de[
|
|
5521
|
-
return ue <
|
|
5519
|
+
}, W = g.stateManager.checkedState, q = g.records, pe = (ue, ne, de) => {
|
|
5520
|
+
const we = de[ne[ue]];
|
|
5521
|
+
return ue < ne.length - 1 && we?.children && we.children.length > 0 ? pe(ue + 1, ne, we.children || []) : we;
|
|
5522
5522
|
};
|
|
5523
|
-
return
|
|
5523
|
+
return W.forEach((ue, ne) => {
|
|
5524
5524
|
const de = ue?._checkState;
|
|
5525
5525
|
if (de === "indeterminate" || de === !0) {
|
|
5526
|
-
const we = (
|
|
5527
|
-
|
|
5526
|
+
const we = pe(0, (ne + "").split(",").map(Number), q);
|
|
5527
|
+
U(we), de === !0 && te(we);
|
|
5528
5528
|
}
|
|
5529
5529
|
}), I;
|
|
5530
5530
|
}
|
|
@@ -5532,43 +5532,41 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5532
5532
|
}, re = (I) => o.rowKey ? o.rowKey.split(",").map(($) => I[$.trim()]).join("::") : "", vt = (I) => {
|
|
5533
5533
|
if (g)
|
|
5534
5534
|
if (yt.value || g.clearSelected(), o.rowKey) {
|
|
5535
|
-
const $ = new Set(I.map(re)),
|
|
5535
|
+
const $ = new Set(I.map(re)), U = "__checkState";
|
|
5536
5536
|
if (!yt.value) {
|
|
5537
5537
|
const ue = g.records;
|
|
5538
|
-
for (let
|
|
5539
|
-
const de = ue[
|
|
5538
|
+
for (let ne = 0; ne < ue.length; ne++) {
|
|
5539
|
+
const de = ue[ne];
|
|
5540
5540
|
if (!$.has(re(de))) continue;
|
|
5541
|
-
const we = g.getTableIndexByRecordIndex(
|
|
5541
|
+
const we = g.getTableIndexByRecordIndex(ne);
|
|
5542
5542
|
g.selectRow(we);
|
|
5543
5543
|
break;
|
|
5544
5544
|
}
|
|
5545
5545
|
return;
|
|
5546
5546
|
}
|
|
5547
|
-
const
|
|
5548
|
-
ue.forEach((
|
|
5549
|
-
if (Array.isArray(
|
|
5550
|
-
ne
|
|
5551
|
-
const de =
|
|
5552
|
-
we.length == de.length ?
|
|
5553
|
-
} else
|
|
5547
|
+
const te = (ue) => {
|
|
5548
|
+
ue.forEach((ne) => {
|
|
5549
|
+
if (Array.isArray(ne?.children) && ne.children.length > 0) {
|
|
5550
|
+
te(ne.children);
|
|
5551
|
+
const de = ne.children, we = de.filter((xe) => xe?.[U] === !0), Be = de.filter((xe) => xe?.[U] === !1);
|
|
5552
|
+
we.length == de.length ? ne[U] = !0 : Be.length == de.length ? ne[U] = !1 : ne[U] = "indeterminate", ne[U] === "indeterminate" && (ne.hierarchyState = "expand");
|
|
5553
|
+
} else ne[U] = !!$.has(re(ne));
|
|
5554
5554
|
});
|
|
5555
|
-
},
|
|
5556
|
-
o.isTree ?
|
|
5557
|
-
ue[
|
|
5555
|
+
}, W = g.records;
|
|
5556
|
+
o.isTree ? te(W) : W.forEach((ue) => {
|
|
5557
|
+
ue[U] = $.has(re(ue));
|
|
5558
5558
|
});
|
|
5559
5559
|
const q = Tt();
|
|
5560
|
-
q.records =
|
|
5560
|
+
q.records = W, g.updateOption(q, {
|
|
5561
5561
|
clearColWidthCache: !1,
|
|
5562
5562
|
clearRowHeightCache: !1
|
|
5563
5563
|
}), o.heightMode === "auto" && (d.value = g.getAllRowsHeight());
|
|
5564
5564
|
const pe = g.getAllBodyCells(1);
|
|
5565
|
-
for (let ue = 0; ue < pe.length; ue++)
|
|
5566
|
-
|
|
5567
|
-
Q.originData[W] == !0 && (console.log(ue, Q, Q.originData[W]), g.setCellCheckboxState(0, ue + 1, !0));
|
|
5568
|
-
}
|
|
5565
|
+
for (let ue = 0; ue < pe.length; ue++) pe[ue][0].originData[U] == !0 && g.setCellCheckboxState(0, ue + 1, !0);
|
|
5566
|
+
g.renderWithRecreateCells();
|
|
5569
5567
|
} else console.warn("Warning: rowKey is not defined. Please set rowKey to enable row selection.");
|
|
5570
5568
|
}, Qt = (I) => {
|
|
5571
|
-
|
|
5569
|
+
i("rowChange", I), g.renderWithRecreateCells();
|
|
5572
5570
|
}, _t = (I) => {
|
|
5573
5571
|
if (!g) return;
|
|
5574
5572
|
const $ = gt();
|
|
@@ -5576,8 +5574,8 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5576
5574
|
vt($);
|
|
5577
5575
|
return;
|
|
5578
5576
|
}
|
|
5579
|
-
const
|
|
5580
|
-
|
|
5577
|
+
const U = Tt();
|
|
5578
|
+
U.records = I || g.records, g.updateOption(U, {
|
|
5581
5579
|
clearColWidthCache: !1,
|
|
5582
5580
|
clearRowHeightCache: !1
|
|
5583
5581
|
}), o.heightMode === "auto" && (d.value = g.getAllRowsHeight()), w.value = 0;
|
|
@@ -5594,17 +5592,17 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5594
5592
|
});
|
|
5595
5593
|
const fn = P(() => {
|
|
5596
5594
|
const I = ($) => {
|
|
5597
|
-
const
|
|
5598
|
-
return $.forEach((
|
|
5599
|
-
|
|
5600
|
-
}),
|
|
5595
|
+
const U = [];
|
|
5596
|
+
return $.forEach((te) => {
|
|
5597
|
+
te.children && te.children.length > 0 ? U.push(...I(te.children)) : U.push(te);
|
|
5598
|
+
}), U;
|
|
5601
5599
|
};
|
|
5602
5600
|
return I(o.columns);
|
|
5603
5601
|
}), en = () => {
|
|
5604
5602
|
const I = {};
|
|
5605
5603
|
I._i = Fn(), fn.value.forEach(($) => {
|
|
5606
|
-
const
|
|
5607
|
-
|
|
5604
|
+
const U = $.config?.valueRowKey || $.id || "";
|
|
5605
|
+
U && (I[U] = dn($.config?.defaultValue));
|
|
5608
5606
|
}), g && (g.addRecord(I), o.heightMode === "auto" && _t(), g.scrollToCell({
|
|
5609
5607
|
col: 0,
|
|
5610
5608
|
row: g.records.length
|
|
@@ -5624,14 +5622,14 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5624
5622
|
cancelButtonText: "取消",
|
|
5625
5623
|
type: "warning"
|
|
5626
5624
|
}).then(() => {
|
|
5627
|
-
const $ = g.records,
|
|
5628
|
-
_t(
|
|
5625
|
+
const $ = g.records, U = new Set(I.map((W) => W._i)), te = $.filter((W) => !U.has(W._i));
|
|
5626
|
+
_t(te), i("update:modelValue", te), I.forEach((W) => {
|
|
5629
5627
|
i("change", {
|
|
5630
5628
|
id: o.id,
|
|
5631
|
-
value:
|
|
5632
|
-
data:
|
|
5629
|
+
value: W,
|
|
5630
|
+
data: W,
|
|
5633
5631
|
formData: l,
|
|
5634
|
-
tableData:
|
|
5632
|
+
tableData: te,
|
|
5635
5633
|
type: "delete"
|
|
5636
5634
|
});
|
|
5637
5635
|
}), w.value = 0;
|
|
@@ -5672,7 +5670,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5672
5670
|
setSelection: vt,
|
|
5673
5671
|
renderTable: Jt
|
|
5674
5672
|
}), (I, $) => {
|
|
5675
|
-
const
|
|
5673
|
+
const U = L("j-button"), te = L("el-space"), W = L("el-pagination");
|
|
5676
5674
|
return _(), O("div", {
|
|
5677
5675
|
class: De(["j-table", { "j-table-auto": e.heightMode === "auto" }]),
|
|
5678
5676
|
style: Re(f.value)
|
|
@@ -5686,14 +5684,14 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5686
5684
|
class: De("j-block")
|
|
5687
5685
|
}, null, 512)], 4),
|
|
5688
5686
|
F("div", Jh, [e.isPage || !zo.value && (rt.value || ta.value) ? (_(), O("div", Xh, [
|
|
5689
|
-
Y(
|
|
5690
|
-
default: N(() => [rt.value ? (_(), H(
|
|
5687
|
+
Y(te, null, {
|
|
5688
|
+
default: N(() => [rt.value ? (_(), H(U, {
|
|
5691
5689
|
key: 0,
|
|
5692
5690
|
type: "link",
|
|
5693
5691
|
label: Ka.value,
|
|
5694
5692
|
icon: "mdi:add",
|
|
5695
5693
|
onClick: en
|
|
5696
|
-
}, null, 8, ["label"])) : K("", !0), ta.value ? (_(), H(
|
|
5694
|
+
}, null, 8, ["label"])) : K("", !0), ta.value ? (_(), H(U, {
|
|
5697
5695
|
key: 1,
|
|
5698
5696
|
type: "link",
|
|
5699
5697
|
label: "删除",
|
|
@@ -5705,7 +5703,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5705
5703
|
_: 1
|
|
5706
5704
|
}),
|
|
5707
5705
|
$[2] || ($[2] = F("div", null, null, -1)),
|
|
5708
|
-
e.isPage ? (_(), H(
|
|
5706
|
+
e.isPage ? (_(), H(W, {
|
|
5709
5707
|
key: 0,
|
|
5710
5708
|
"current-page": Ya.value,
|
|
5711
5709
|
"onUpdate:currentPage": $[0] || ($[0] = (q) => Ya.value = q),
|
|
@@ -5934,19 +5932,19 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5934
5932
|
Ae + R.value < 0 && (Ae = -R.value), typeof document < "u" && document.body && (x.value ? Ae + x.value + R.value > document.body.clientWidth && (Ae = document.body.clientWidth - x.value - R.value) : Ae + k.value + R.value > document.body.clientWidth && (Ae = document.body.clientWidth - k.value - R.value)), nt + m.value < 0 && (nt = -m.value), typeof window < "u" && (y.value ? nt + y.value + m.value + 40 > window.innerHeight && (nt = window.innerHeight - y.value - m.value - 40) : nt + w.value + m.value + 40 > window.innerHeight && (nt = window.innerHeight - w.value - m.value - 40)), p.left = Ae, p.top = nt;
|
|
5935
5933
|
}
|
|
5936
5934
|
}, Ne = (oe) => {
|
|
5937
|
-
const Ge = v.value.offsetLeft, Ze = v.value.offsetTop, Ae = v.value.clientWidth, nt = v.value.clientHeight, ct = nt - b.value,
|
|
5938
|
-
if (oe.clientX > Ge + Ae - 10 &&
|
|
5939
|
-
else if (Ge + 10 > oe.clientX &&
|
|
5935
|
+
const Ge = v.value.offsetLeft, Ze = v.value.offsetTop, Ae = v.value.clientWidth, nt = v.value.clientHeight, ct = nt - b.value, ee = v.value.scrollTop;
|
|
5936
|
+
if (oe.clientX > Ge + Ae - 10 && ee + oe.clientY > Ze + nt - 10 || ee + oe.clientY < Ze + 5 && Ge + 10 > oe.clientX) v.value.style.cursor = "se-resize";
|
|
5937
|
+
else if (Ge + 10 > oe.clientX && ee + oe.clientY > Ze + nt - 10 || oe.clientX > Ge + Ae - 10 && ee + oe.clientY < Ze + 5) v.value.style.cursor = "sw-resize";
|
|
5940
5938
|
else if (oe.clientX > Ge + Ae - 10 || Ge + 10 > oe.clientX) v.value.style.cursor = "w-resize";
|
|
5941
|
-
else if (
|
|
5939
|
+
else if (ee + oe.clientY > Ze + nt - 10 || ee + oe.clientY < Ze + 5) v.value.style.cursor = "s-resize";
|
|
5942
5940
|
else {
|
|
5943
5941
|
v.value.style.cursor = "default", v.value.onmousedown = null;
|
|
5944
5942
|
return;
|
|
5945
5943
|
}
|
|
5946
5944
|
v.value.onmousedown = (Ce) => {
|
|
5947
|
-
const { clientX:
|
|
5948
|
-
p._left = p.left, p._top = p.top, y.value || (y.value = ct), x.value || (x.value = Ae),
|
|
5949
|
-
at.preventDefault(),
|
|
5945
|
+
const { clientX: Ie } = Ce, { clientY: Je } = Ce, Lt = p.left + R.value, Dt = p.top + m.value;
|
|
5946
|
+
p._left = p.left, p._top = p.top, y.value || (y.value = ct), x.value || (x.value = Ae), Ie > Lt + 10 && Ie < Lt + Ae - 10 && Je > Dt + 5 && Je < Dt + 47 || (typeof document < "u" && (document.onmousemove = function(at) {
|
|
5947
|
+
at.preventDefault(), Ie > Lt && Ie < Lt + 10 && (Ie > at.clientX && (x.value = Ae + (Ie - at.clientX), p.left = p._left - (Ie - at.clientX)), Ie < at.clientX && x.value > a.minWidth && (x.value = Ae - (at.clientX - Ie), p.left = p._left + at.clientX - Ie)), Ie > Lt + Ae - 10 && Ie < Lt + Ae && (Ie > at.clientX && x.value > a.minWidth && (x.value = Ae - (Ie - at.clientX)), Ie < at.clientX && typeof document < "u" && document.body && R.value + p.left + x.value < document.body.clientWidth && (x.value = Ae + (at.clientX - Ie))), Je > Dt && Je < Dt + 5 && (Je > at.clientY && (y.value = ct + Je - at.clientY, p.top = p._top - (Je - at.clientY)), Je < at.clientY && y.value > a.minHeight && (y.value = ct - (at.clientY - Je), p.top = p._top + at.clientY - Je)), ee + Je > Dt + ct + 38 && ee + Je < Dt + ct + 48 && (Je > at.clientY && y.value > a.minHeight && (y.value = ct - (Je - at.clientY)), Je < at.clientY && typeof window < "u" && m.value + p.top + y.value + 48 < window.innerHeight && (y.value = ct + at.clientY - Je));
|
|
5950
5948
|
}), typeof document < "u" && (document.onmouseup = function() {
|
|
5951
5949
|
typeof document < "u" && (document.onmousemove = null, document.onmouseup = null);
|
|
5952
5950
|
}));
|
|
@@ -5958,8 +5956,8 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
5958
5956
|
showLoading: C,
|
|
5959
5957
|
hideLoading: T
|
|
5960
5958
|
}), (oe, Ge) => {
|
|
5961
|
-
const Ze = L("j-button"), Ae = L("el-space"), nt = L("el-step"), ct = L("el-steps"),
|
|
5962
|
-
return _(), H(
|
|
5959
|
+
const Ze = L("j-button"), Ae = L("el-space"), nt = L("el-step"), ct = L("el-steps"), ee = L("el-dialog");
|
|
5960
|
+
return _(), H(ee, {
|
|
5963
5961
|
modelValue: l.value,
|
|
5964
5962
|
"onUpdate:modelValue": Ge[0] || (Ge[0] = (Ce) => l.value = Ce),
|
|
5965
5963
|
class: "j-dialog",
|
|
@@ -6013,8 +6011,8 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
6013
6011
|
space: 160,
|
|
6014
6012
|
"finish-status": "success"
|
|
6015
6013
|
}, {
|
|
6016
|
-
default: N(() => [(_(!0), O(ge, null, ke(X.value, (Ce,
|
|
6017
|
-
key:
|
|
6014
|
+
default: N(() => [(_(!0), O(ge, null, ke(X.value, (Ce, Ie) => (_(), H(nt, {
|
|
6015
|
+
key: Ie,
|
|
6018
6016
|
title: G(i)(Ce.title)
|
|
6019
6017
|
}, null, 8, ["title"]))), 128))]),
|
|
6020
6018
|
_: 1
|
|
@@ -6050,7 +6048,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
6050
6048
|
(_(!0), O(ge, null, ke(e.buttons, (Ce) => (_(), H(Ze, ze({ ref_for: !0 }, Ce.config, {
|
|
6051
6049
|
key: Ce.id,
|
|
6052
6050
|
label: Ce.label,
|
|
6053
|
-
onClick: (
|
|
6051
|
+
onClick: (Ie) => dt(Ce)
|
|
6054
6052
|
}), null, 16, ["label", "onClick"]))), 128)),
|
|
6055
6053
|
e.hasSaveBtn ? (_(), H(Ze, {
|
|
6056
6054
|
key: 3,
|
|
@@ -7367,9 +7365,9 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
7367
7365
|
sizeType: n.sizeType
|
|
7368
7366
|
})), x = j([]), y = () => {
|
|
7369
7367
|
x.value = [...x.value];
|
|
7370
|
-
}, w = (
|
|
7368
|
+
}, w = (ee) => {
|
|
7371
7369
|
if (n.maxSize && n.sizeType) {
|
|
7372
|
-
let Ce =
|
|
7370
|
+
let Ce = ee;
|
|
7373
7371
|
switch (n.sizeType) {
|
|
7374
7372
|
case "GB":
|
|
7375
7373
|
Ce = 1024 * 1024 * 1024 * n.maxSize;
|
|
@@ -7384,7 +7382,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
7384
7382
|
Ce = n.maxSize;
|
|
7385
7383
|
break;
|
|
7386
7384
|
}
|
|
7387
|
-
if (Ce <
|
|
7385
|
+
if (Ce < ee) return !1;
|
|
7388
7386
|
}
|
|
7389
7387
|
return !0;
|
|
7390
7388
|
}, R = {
|
|
@@ -7396,15 +7394,15 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
7396
7394
|
image: "file-image",
|
|
7397
7395
|
txt: "file-txt",
|
|
7398
7396
|
json: "file-json"
|
|
7399
|
-
}, m = (
|
|
7400
|
-
if (
|
|
7401
|
-
const Ce =
|
|
7397
|
+
}, m = (ee) => {
|
|
7398
|
+
if (ee) {
|
|
7399
|
+
const Ce = ee.split(".");
|
|
7402
7400
|
return Ce[Ce.length - 1];
|
|
7403
7401
|
}
|
|
7404
7402
|
return "";
|
|
7405
|
-
}, k = (
|
|
7403
|
+
}, k = (ee, Ce) => {
|
|
7406
7404
|
if (Ce && Ce.indexOf("image") > -1) return "file-image";
|
|
7407
|
-
const
|
|
7405
|
+
const Ie = m(ee);
|
|
7408
7406
|
return [
|
|
7409
7407
|
"webp",
|
|
7410
7408
|
"bmp",
|
|
@@ -7414,93 +7412,93 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
7414
7412
|
"tif",
|
|
7415
7413
|
"gif",
|
|
7416
7414
|
"svg"
|
|
7417
|
-
].includes(
|
|
7418
|
-
}, C = (
|
|
7419
|
-
|
|
7420
|
-
}, T = (
|
|
7415
|
+
].includes(Ie) ? "file-image" : R[Ie] || "file-ufo";
|
|
7416
|
+
}, C = (ee) => {
|
|
7417
|
+
ee.status = n.autoUpload ? "uploading" : "unUpload", ee.uploadSize = 0, ee.icon = k(ee.name, ee.type), f || (ee.icon = "file-text"), ee.id = ee.uid, ee.url = window.URL.createObjectURL(ee), ee.date = No(), ee.param = b.value;
|
|
7418
|
+
}, T = (ee) => {
|
|
7421
7419
|
a("start", {
|
|
7422
|
-
file:
|
|
7420
|
+
file: ee,
|
|
7423
7421
|
list: x.value
|
|
7424
7422
|
});
|
|
7425
|
-
}, A = (
|
|
7426
|
-
|
|
7427
|
-
}, E = (
|
|
7428
|
-
|
|
7429
|
-
file:
|
|
7423
|
+
}, A = (ee, Ce, Ie) => {
|
|
7424
|
+
ee.percent = Ie, ee.uploadSize = Ce, y();
|
|
7425
|
+
}, E = (ee) => {
|
|
7426
|
+
ee.status = "done", ee.id += "1", ee.uid += "1", y(), a("success", {
|
|
7427
|
+
file: ee,
|
|
7430
7428
|
list: x.value
|
|
7431
7429
|
}), n.modelValue || (a("update:modelValue", v.value), a("change", { value: v.value }));
|
|
7432
|
-
}, B = (
|
|
7433
|
-
console.error(Ce, "简搭提醒您:文件上传错误!"),
|
|
7434
|
-
file:
|
|
7430
|
+
}, B = (ee, Ce) => {
|
|
7431
|
+
console.error(Ce, "简搭提醒您:文件上传错误!"), ee.status = "error", y(), a("error", {
|
|
7432
|
+
file: ee,
|
|
7435
7433
|
list: x.value
|
|
7436
7434
|
});
|
|
7437
|
-
}, z = (
|
|
7438
|
-
if (x.value.push(
|
|
7439
|
-
a("notUploadChange", { value:
|
|
7435
|
+
}, z = (ee) => {
|
|
7436
|
+
if (x.value.push(ee), ee.status === "unUpload") {
|
|
7437
|
+
a("notUploadChange", { value: ee.url });
|
|
7440
7438
|
return;
|
|
7441
7439
|
}
|
|
7442
|
-
!n.isNotApi && n.upload ? n.upload(
|
|
7440
|
+
!n.isNotApi && n.upload ? n.upload(ee) : !n.isNotApi && f ? f(ee, {
|
|
7443
7441
|
onStart: T,
|
|
7444
7442
|
onProgress: A,
|
|
7445
7443
|
onSuccess: E,
|
|
7446
7444
|
onError: B,
|
|
7447
7445
|
uploadCallback: n.uploadCallback
|
|
7448
|
-
}) : E(
|
|
7449
|
-
}, V = (
|
|
7450
|
-
if (!w(
|
|
7446
|
+
}) : E(ee);
|
|
7447
|
+
}, V = (ee) => {
|
|
7448
|
+
if (!w(ee.size))
|
|
7451
7449
|
return i && i("上传文件超出大小了"), !1;
|
|
7452
|
-
}, M = (
|
|
7453
|
-
C(
|
|
7454
|
-
}, S = (
|
|
7450
|
+
}, M = (ee) => {
|
|
7451
|
+
C(ee.file), z(ee.file);
|
|
7452
|
+
}, S = (ee) => new Promise((Ce) => {
|
|
7455
7453
|
l ? l({
|
|
7456
7454
|
title: "提示",
|
|
7457
7455
|
iconType: "warning",
|
|
7458
|
-
content: `您确定删除【${
|
|
7456
|
+
content: `您确定删除【${ee.name}】?`,
|
|
7459
7457
|
onOk: () => {
|
|
7460
7458
|
Ce(!0);
|
|
7461
7459
|
},
|
|
7462
7460
|
onCancel: () => {
|
|
7463
7461
|
Ce(!1);
|
|
7464
7462
|
}
|
|
7465
|
-
}) : (D(
|
|
7466
|
-
}), D = (
|
|
7463
|
+
}) : (D(ee), Ce(!0));
|
|
7464
|
+
}), D = (ee) => {
|
|
7467
7465
|
if (!n.isNotApi) {
|
|
7468
|
-
const Ce =
|
|
7466
|
+
const Ce = ee.response?.fileId || ee.id;
|
|
7469
7467
|
d && d(Ce);
|
|
7470
7468
|
}
|
|
7471
|
-
x.value = x.value.filter((Ce) => Ce.id !==
|
|
7472
|
-
file:
|
|
7469
|
+
x.value = x.value.filter((Ce) => Ce.id !== ee.id), x.value.length === 0 && (a("update:modelValue", ""), a("change", { value: "" })), a("delete", {
|
|
7470
|
+
file: ee,
|
|
7473
7471
|
list: x.value
|
|
7474
7472
|
});
|
|
7475
|
-
}, X = async (
|
|
7476
|
-
await S(
|
|
7473
|
+
}, X = async (ee) => {
|
|
7474
|
+
await S(ee) && D(ee);
|
|
7477
7475
|
}, le = j(!1), me = j(""), Te = j(""), Ne = j(!1), dt = j(!1);
|
|
7478
7476
|
let oe = null;
|
|
7479
|
-
const Ge = j(No(/* @__PURE__ */ new Date(), "YYYY-MM-DD")), Ze = (
|
|
7480
|
-
if (
|
|
7477
|
+
const Ge = j(No(/* @__PURE__ */ new Date(), "YYYY-MM-DD")), Ze = (ee) => {
|
|
7478
|
+
if (ee.isPreview === !1 && !n.isUploadImg) {
|
|
7481
7479
|
o && o("无权限预览!");
|
|
7482
7480
|
return;
|
|
7483
7481
|
}
|
|
7484
|
-
const Ce =
|
|
7485
|
-
switch (oe =
|
|
7482
|
+
const Ce = ee.name.split(".")[ee.name.split(".").length - 1];
|
|
7483
|
+
switch (oe = ee, le.value = !1, me.value = ee.name, Ce.toLowerCase()) {
|
|
7486
7484
|
case "jpg":
|
|
7487
7485
|
case "gif":
|
|
7488
7486
|
case "png":
|
|
7489
7487
|
case "bmp":
|
|
7490
7488
|
case "jpeg":
|
|
7491
7489
|
case "svg":
|
|
7492
|
-
le.value = !0, Te.value =
|
|
7490
|
+
le.value = !0, Te.value = ee.url, dt.value = !1, Ne.value = !0;
|
|
7493
7491
|
break;
|
|
7494
7492
|
default:
|
|
7495
7493
|
if (n.isNotApi) {
|
|
7496
7494
|
o && o("预览表单中,不支持预览!");
|
|
7497
7495
|
return;
|
|
7498
7496
|
}
|
|
7499
|
-
if (
|
|
7497
|
+
if (ee.status !== "done") {
|
|
7500
7498
|
o && o("当前文件还没上传成功,不支持预览!");
|
|
7501
7499
|
return;
|
|
7502
7500
|
}
|
|
7503
|
-
if (Te.value = Ae(
|
|
7501
|
+
if (Te.value = Ae(ee), Te.value === "") {
|
|
7504
7502
|
o && o("当前文件不支持预览!");
|
|
7505
7503
|
return;
|
|
7506
7504
|
}
|
|
@@ -7508,19 +7506,19 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
7508
7506
|
break;
|
|
7509
7507
|
}
|
|
7510
7508
|
Ge.value = No(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss");
|
|
7511
|
-
}, Ae = (
|
|
7512
|
-
const Ce =
|
|
7509
|
+
}, Ae = (ee) => {
|
|
7510
|
+
const Ce = ee.response?.fileId || ee.id;
|
|
7513
7511
|
if (!s) return "";
|
|
7514
|
-
const
|
|
7515
|
-
return `${s}/system/annexesfile/preview/${Mf.createAesEncryption({ key: "jianda" }).encrypt(
|
|
7512
|
+
const Ie = No(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss") + "|" + Ce;
|
|
7513
|
+
return `${s}/system/annexesfile/preview/${Mf.createAesEncryption({ key: "jianda" }).encrypt(Ie).replace(/\//g, "|")}?token=${c?.value}`;
|
|
7516
7514
|
}, nt = () => {
|
|
7517
7515
|
oe.isDown === !1 && o && o("无权限下载!"), Vp(`${s}/system/annexesfile/${oe.response?.fileId || oe.id}?token=${c?.value}`);
|
|
7518
7516
|
}, ct = () => {
|
|
7519
7517
|
if (n.limit !== -1 && n.limit <= x.value.length)
|
|
7520
7518
|
return o && o(`当前限制选择${n.limit}个文件`), !1;
|
|
7521
7519
|
};
|
|
7522
|
-
return (
|
|
7523
|
-
const
|
|
7520
|
+
return (ee, Ce) => {
|
|
7521
|
+
const Ie = L("j-icon"), Je = L("j-button"), Lt = L("el-popover"), Dt = L("el-upload"), at = L("el-text"), Wt = L("j-dialog-full"), jn = _i("loading");
|
|
7524
7522
|
return _(), O("div", qp, [
|
|
7525
7523
|
Y(Dt, {
|
|
7526
7524
|
action: "",
|
|
@@ -7539,7 +7537,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
7539
7537
|
"on-preview": Ze,
|
|
7540
7538
|
"on-exceed": ct
|
|
7541
7539
|
}, {
|
|
7542
|
-
default: N(() => [e.isUploadImg && !e.isLayer && !e.readonly ? (_(), O("div", Zp, [Y(
|
|
7540
|
+
default: N(() => [e.isUploadImg && !e.isLayer && !e.readonly ? (_(), O("div", Zp, [Y(Ie, { icon: "mdi:add" }), F("div", Qp, ve(G(r)(e.placeholder)), 1)])) : e.isLayer && e.showFileList && x.value.length > 0 && !Ne.value ? (_(), H(Lt, {
|
|
7543
7541
|
key: 1,
|
|
7544
7542
|
placement: "bottom",
|
|
7545
7543
|
title: e.isUploadImg ? G(r)("图片列表") : G(r)("文件列表")
|
|
@@ -10777,9 +10775,9 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
10777
10775
|
dt.value = ye, Ne.value = !1, Me();
|
|
10778
10776
|
}, Ze = () => {
|
|
10779
10777
|
dt.value = [], Me();
|
|
10780
|
-
}, Ae = j(), nt = j(!1), ct = j(),
|
|
10778
|
+
}, Ae = j(), nt = j(!1), ct = j(), ee = P(() => ct.value != null), Ce = () => {
|
|
10781
10779
|
Ae.value?.init();
|
|
10782
|
-
},
|
|
10780
|
+
}, Ie = (ye) => {
|
|
10783
10781
|
ct.value = ye, nt.value = !1;
|
|
10784
10782
|
}, Je = j(!1), Lt = () => {
|
|
10785
10783
|
Je.value = !Je.value;
|
|
@@ -10834,7 +10832,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
10834
10832
|
}, { deep: !0 }), it(Je, () => {
|
|
10835
10833
|
At(ce);
|
|
10836
10834
|
});
|
|
10837
|
-
const
|
|
10835
|
+
const Q = P(() => {
|
|
10838
10836
|
const ye = jn.value;
|
|
10839
10837
|
if (ye.length === 0) return [];
|
|
10840
10838
|
const be = J.value;
|
|
@@ -10972,7 +10970,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
10972
10970
|
ref_key: "topLeftRef",
|
|
10973
10971
|
ref: Zt,
|
|
10974
10972
|
class: "j-table-panel-top-left"
|
|
10975
|
-
}, [Y(xt, { list:
|
|
10973
|
+
}, [Y(xt, { list: Q.value }, null, 8, ["list"])], 512), F("div", Cy, [
|
|
10976
10974
|
T.value && !x.value ? (_(), O("div", Sy, [Y(Qt, {
|
|
10977
10975
|
modelValue: C.value,
|
|
10978
10976
|
"onUpdate:modelValue": be[2] || (be[2] = (rt) => C.value = rt),
|
|
@@ -11101,7 +11099,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
11101
11099
|
onShow: Ce
|
|
11102
11100
|
}, {
|
|
11103
11101
|
reference: N(() => [Y(_t, {
|
|
11104
|
-
class: De({ active:
|
|
11102
|
+
class: De({ active: ee.value }),
|
|
11105
11103
|
type: "text",
|
|
11106
11104
|
icon: "mdi:table-headers-eye"
|
|
11107
11105
|
}, null, 8, ["class"])]),
|
|
@@ -11110,7 +11108,7 @@ var Jh = { class: "j-table-footer" }, Xh = {
|
|
|
11110
11108
|
ref: Ae,
|
|
11111
11109
|
columns: e.columns,
|
|
11112
11110
|
"column-config": ct.value,
|
|
11113
|
-
onSave:
|
|
11111
|
+
onSave: Ie
|
|
11114
11112
|
}, null, 8, ["columns", "column-config"])]),
|
|
11115
11113
|
_: 1
|
|
11116
11114
|
}, 8, ["visible"])])]),
|
|
@@ -11767,15 +11765,15 @@ var Qy = /* @__PURE__ */ se({
|
|
|
11767
11765
|
let X;
|
|
11768
11766
|
const le = (J, ce) => {
|
|
11769
11767
|
Object.keys(J).forEach((Z) => {
|
|
11770
|
-
const
|
|
11771
|
-
ce && (Z = ce + "." + Z),
|
|
11768
|
+
const Q = J[Z];
|
|
11769
|
+
ce && (Z = ce + "." + Z), Q != null && typeof Q == "object" && !ll(Q) && le(Q, Z), m[Z] = Q;
|
|
11772
11770
|
});
|
|
11773
11771
|
}, me = (J, ce) => {
|
|
11774
11772
|
let Z = J.id;
|
|
11775
11773
|
return Z || (J.config?.table && J.config?.field ? Z = `${J.config.table}.${J.config.field}` : J.config?.table ? Z = J.config?.table : J.config?.field && (Z = J.config?.field), ce && D(ce) && (Z = `${ce}.${Z}`)), Z || Pl("j");
|
|
11776
|
-
}, Te = (J, ce, Z,
|
|
11774
|
+
}, Te = (J, ce, Z, Q = "") => {
|
|
11777
11775
|
J.forEach((ie) => {
|
|
11778
|
-
ie.id = me(ie,
|
|
11776
|
+
ie.id = me(ie, Q);
|
|
11779
11777
|
const Se = {
|
|
11780
11778
|
id: ie.id,
|
|
11781
11779
|
slot: ie.slot,
|
|
@@ -11789,7 +11787,7 @@ var Qy = /* @__PURE__ */ se({
|
|
|
11789
11787
|
const { children: Me } = ie;
|
|
11790
11788
|
ui(Se, ie, ["children", "config"]), ui(Se.config, ie.config || {}, []), T[ie.id] && console.warn("有重复的组件id:" + ie.id), T[ie.id] = Se, a.readonly === !0 && (Se.config.readonly = !0);
|
|
11791
11789
|
let ot = !1, Tt;
|
|
11792
|
-
|
|
11790
|
+
Q !== "" && D(Q) && (ot = !0, Se.config = ie.config || {}, Se.config.parentTableId = Q, Tt = T[Q]?.config?.table);
|
|
11793
11791
|
const lt = Se.config || {};
|
|
11794
11792
|
if (S(ie.id))
|
|
11795
11793
|
!Z && ot === !1 && (lt?.defaultValue === 0 ? m[ie.id] = lt?.defaultValue : m[ie.id] = lt?.defaultValue || void 0), lt.table && lt.field ? E[`${lt.table}_${lt.field}`.toLowerCase()] = ie.id : lt.field && (ot ? E[`${Tt}_${lt.field}`.toLowerCase()] = ie.id : E[`${lt.field}`.toLowerCase()] = ie.id);
|
|
@@ -11814,59 +11812,59 @@ var Qy = /* @__PURE__ */ se({
|
|
|
11814
11812
|
});
|
|
11815
11813
|
});
|
|
11816
11814
|
}, dt = (J, ce, Z) => {
|
|
11817
|
-
const
|
|
11815
|
+
const Q = [];
|
|
11818
11816
|
return ce.forEach((ie) => {
|
|
11819
11817
|
const Se = {};
|
|
11820
11818
|
Object.keys(ie).forEach((Me) => {
|
|
11821
11819
|
if (!Z || Z(Me, ie[Me], J)) {
|
|
11822
|
-
const ot =
|
|
11820
|
+
const ot = Ie(Me);
|
|
11823
11821
|
if (ot?.type === "j-table") Se[ot?.id || ""] = dt(Me, ie[Me], Z);
|
|
11824
11822
|
else {
|
|
11825
11823
|
let Tt = E[`${J}_${Me}`.toLowerCase()] || Me;
|
|
11826
11824
|
Tt = Tt.indexOf(".") !== -1 ? Tt.split(".")[1] : Tt, Se[Tt] = ie[Me];
|
|
11827
11825
|
}
|
|
11828
11826
|
}
|
|
11829
|
-
}),
|
|
11830
|
-
}),
|
|
11827
|
+
}), Q.push(Se);
|
|
11828
|
+
}), Q;
|
|
11831
11829
|
}, oe = (J, ce) => {
|
|
11832
11830
|
Object.keys(J || {}).forEach((Z) => {
|
|
11833
|
-
let
|
|
11834
|
-
const ie =
|
|
11831
|
+
let Q = J[Z];
|
|
11832
|
+
const ie = Ie(Z);
|
|
11835
11833
|
if (ie === void 0)
|
|
11836
|
-
|
|
11837
|
-
if (!ce || ce(Z,
|
|
11834
|
+
Q && (ll(Q) && (Q = Q[0] || {}), typeof Q == "object" ? Object.keys(Q).forEach((Se) => {
|
|
11835
|
+
if (!ce || ce(Z, Q[Se], Z)) {
|
|
11838
11836
|
let Me = Se;
|
|
11839
|
-
Z !== "main" && (Me = `${Z}_${Se}`), B[Me] = Z, m[E[Me.toLowerCase()] || Se] =
|
|
11837
|
+
Z !== "main" && (Me = `${Z}_${Se}`), B[Me] = Z, m[E[Me.toLowerCase()] || Se] = Q[Se];
|
|
11840
11838
|
}
|
|
11841
|
-
}) : m[Z] =
|
|
11839
|
+
}) : m[Z] = Q);
|
|
11842
11840
|
else if (D(ie.id || "")) {
|
|
11843
|
-
if (!Array.isArray(
|
|
11841
|
+
if (!Array.isArray(Q)) {
|
|
11844
11842
|
console.warn("表格数据不是数组:" + Z);
|
|
11845
11843
|
return;
|
|
11846
11844
|
}
|
|
11847
|
-
|
|
11848
|
-
} else (!ce || ce(Z,
|
|
11845
|
+
Q?.length > 0 ? m[E[Z.toLowerCase()] || Z] = dt(Z, Q, ce) : m[E[Z.toLowerCase()] || Z] = [];
|
|
11846
|
+
} else (!ce || ce(Z, Q, Z)) && (m[E[Z.toLowerCase()] || Z] = Q);
|
|
11849
11847
|
}), X && Object.keys(m).forEach((Z) => {
|
|
11850
|
-
const
|
|
11851
|
-
(
|
|
11848
|
+
const Q = Ie(Z);
|
|
11849
|
+
(Q === void 0 || !["tabs", "collapse"].includes(Q.type || "")) && xr(X, Z, m[Z]);
|
|
11852
11850
|
});
|
|
11853
11851
|
}, Ge = (J, ce = !1) => {
|
|
11854
11852
|
const Z = {};
|
|
11855
|
-
return Object.keys(J).forEach((
|
|
11856
|
-
if (
|
|
11857
|
-
const ie = T[
|
|
11853
|
+
return Object.keys(J).forEach((Q) => {
|
|
11854
|
+
if (Q === "parentRow") return;
|
|
11855
|
+
const ie = T[Q];
|
|
11858
11856
|
if (ie) {
|
|
11859
11857
|
const Se = ie.config?.table, Me = ie.config?.field;
|
|
11860
|
-
if (ce) Me ? Z[Me] = J[
|
|
11861
|
-
else if (D(
|
|
11858
|
+
if (ce) Me ? Z[Me] = J[Q] : Z[Q] = J[Q];
|
|
11859
|
+
else if (D(Q)) {
|
|
11862
11860
|
const ot = [];
|
|
11863
|
-
J[
|
|
11861
|
+
J[Q].forEach((Tt) => {
|
|
11864
11862
|
ot.push(Ge(Tt, !0));
|
|
11865
|
-
}), Z[Se ||
|
|
11866
|
-
} else Se && Me ? (Z[Se] = Z[Se] || {}, Z[Se][Me] = J[
|
|
11867
|
-
} else ce ?
|
|
11863
|
+
}), Z[Se || Q] = ot;
|
|
11864
|
+
} else Se && Me ? (Z[Se] = Z[Se] || {}, Z[Se][Me] = J[Q]) : Me && (Z[Me] = J[Q]);
|
|
11865
|
+
} else ce ? Q !== "_X_ROW_KEY" && Q !== "_isHover" && (Z[Q] = J[Q]) : B[Q] ? (Z[B[Q]] = Z[B[Q]] || {}, Z[B[Q]][Q.replace(`${B[Q]}_`, "")] = J[Q]) : Z[Q] = J[Q];
|
|
11868
11866
|
}), Z;
|
|
11869
|
-
}, Ze = (J = !0) => J ? Ge(m) : m, Ae = (J, ce, Z,
|
|
11867
|
+
}, Ze = (J = !0) => J ? Ge(m) : m, Ae = (J, ce, Z, Q) => {
|
|
11870
11868
|
let ie = T[J];
|
|
11871
11869
|
if (ie == null) {
|
|
11872
11870
|
const Me = J.split(".");
|
|
@@ -11882,11 +11880,11 @@ var Qy = /* @__PURE__ */ se({
|
|
|
11882
11880
|
formData: m,
|
|
11883
11881
|
getTableData: Z,
|
|
11884
11882
|
row: ce,
|
|
11885
|
-
pRowData:
|
|
11883
|
+
pRowData: Q
|
|
11886
11884
|
});
|
|
11887
11885
|
return Se._componentId = ie?.id, Se;
|
|
11888
|
-
}, nt = (J, ce, Z,
|
|
11889
|
-
const ie = Ae(J, ce, Z,
|
|
11886
|
+
}, nt = (J, ce, Z, Q) => {
|
|
11887
|
+
const ie = Ae(J, ce, Z, Q);
|
|
11890
11888
|
if (ie.isNotRule !== !0 && ie.display !== !1) {
|
|
11891
11889
|
const Se = ie.rule || [], Me = Se.find((ot) => ot.type === "only");
|
|
11892
11890
|
return Me && (Me.validator = async (ot, Tt) => {
|
|
@@ -11913,7 +11911,7 @@ var Qy = /* @__PURE__ */ se({
|
|
|
11913
11911
|
rules: [],
|
|
11914
11912
|
myGridtableId: ""
|
|
11915
11913
|
};
|
|
11916
|
-
}, { validateForm: ct } = Zy(m, nt),
|
|
11914
|
+
}, { validateForm: ct } = Zy(m, nt), ee = async () => {
|
|
11917
11915
|
k.value = {};
|
|
11918
11916
|
const J = await ct();
|
|
11919
11917
|
return Object.keys(J).length > 0 ? (k.value = J, g(`${h(T[Object.keys(J)[0]]?.config?.label)}:${h(J[Object.keys(J)[0]].msg)}`), !1) : !0;
|
|
@@ -11921,32 +11919,32 @@ var Qy = /* @__PURE__ */ se({
|
|
|
11921
11919
|
k.value = {}, so(m), Object.keys(V || {}).forEach((J) => {
|
|
11922
11920
|
m[J] = V[J];
|
|
11923
11921
|
});
|
|
11924
|
-
},
|
|
11922
|
+
}, Ie = (J) => {
|
|
11925
11923
|
let ce = T[J];
|
|
11926
11924
|
return ce === void 0 && E[J.toLowerCase()] && (ce = T[E[J.toLowerCase()]]), ce;
|
|
11927
|
-
}, Je = ({ id: J, i: ce, value: Z, type:
|
|
11928
|
-
if (
|
|
11929
|
-
else if (
|
|
11925
|
+
}, Je = ({ id: J, i: ce, value: Z, type: Q }) => {
|
|
11926
|
+
if (Q === "add") m[J].push(Z);
|
|
11927
|
+
else if (Q === "delete") m[J].splice(ce, 1);
|
|
11930
11928
|
else {
|
|
11931
|
-
const ie =
|
|
11929
|
+
const ie = Ie(J);
|
|
11932
11930
|
ie && (ie.config.parentTableId ? m[ie.config.parentTableId][ce][J] = Z : m[J] = Z);
|
|
11933
11931
|
}
|
|
11934
11932
|
}, Lt = ({ id: J, i: ce }) => {
|
|
11935
|
-
const Z =
|
|
11933
|
+
const Z = Ie(J);
|
|
11936
11934
|
if (Z) {
|
|
11937
11935
|
if (Z.config.parentTableId) {
|
|
11938
|
-
const
|
|
11939
|
-
if (ce != null) return (
|
|
11936
|
+
const Q = m[Z.config.parentTableId], ie = Z.id ? Z.id.replace(`${Z.config.parentTableId}.`, "") : "";
|
|
11937
|
+
if (ce != null) return (Q[ce] || {})[ie || ""];
|
|
11940
11938
|
const Se = [];
|
|
11941
|
-
return
|
|
11939
|
+
return Q && Q.forEach((Me) => {
|
|
11942
11940
|
Se.push(Me[ie || ""]);
|
|
11943
11941
|
}), Se;
|
|
11944
11942
|
}
|
|
11945
11943
|
if (D(Z.id || "")) {
|
|
11946
|
-
const
|
|
11944
|
+
const Q = [];
|
|
11947
11945
|
return m[Z.id || ""].forEach((ie) => {
|
|
11948
|
-
|
|
11949
|
-
}),
|
|
11946
|
+
Q.push(Ge(ie, !0));
|
|
11947
|
+
}), Q;
|
|
11950
11948
|
}
|
|
11951
11949
|
return m[Z.id || ""];
|
|
11952
11950
|
}
|
|
@@ -11955,26 +11953,26 @@ var Qy = /* @__PURE__ */ se({
|
|
|
11955
11953
|
const Z = Lt({
|
|
11956
11954
|
id: J,
|
|
11957
11955
|
i: ce
|
|
11958
|
-
}),
|
|
11959
|
-
if (
|
|
11960
|
-
const ie = Z[ce], Se = m[
|
|
11961
|
-
config:
|
|
11962
|
-
getCompConfig:
|
|
11956
|
+
}), Q = Ie(J);
|
|
11957
|
+
if (Q && p?.getLabel) if (ce !== void 0) {
|
|
11958
|
+
const ie = Z[ce], Se = m[Q.config.parentTableId || ""][ce], Me = Ra({
|
|
11959
|
+
config: Q.config,
|
|
11960
|
+
getCompConfig: Q.getCompConfig,
|
|
11963
11961
|
formData: m,
|
|
11964
|
-
tableData: m[
|
|
11962
|
+
tableData: m[Q.config.parentTableId || ""],
|
|
11965
11963
|
row: Se
|
|
11966
11964
|
});
|
|
11967
11965
|
return await p?.getLabel({
|
|
11968
11966
|
value: ie,
|
|
11969
11967
|
config: Me,
|
|
11970
11968
|
formData: m,
|
|
11971
|
-
tableData: m[
|
|
11969
|
+
tableData: m[Q.config.parentTableId || ""],
|
|
11972
11970
|
row: Se
|
|
11973
11971
|
});
|
|
11974
11972
|
} else {
|
|
11975
11973
|
const ie = Ra({
|
|
11976
|
-
config:
|
|
11977
|
-
getCompConfig:
|
|
11974
|
+
config: Q.config,
|
|
11975
|
+
getCompConfig: Q.getCompConfig,
|
|
11978
11976
|
formData: m
|
|
11979
11977
|
});
|
|
11980
11978
|
return await p?.getLabel({
|
|
@@ -12012,8 +12010,8 @@ var Qy = /* @__PURE__ */ se({
|
|
|
12012
12010
|
}, J), jn = async (J, ce) => {
|
|
12013
12011
|
if (J && J.trim()) {
|
|
12014
12012
|
J = `async (jcode) => {${J}}`;
|
|
12015
|
-
const { res: Z, fn:
|
|
12016
|
-
Z && await
|
|
12013
|
+
const { res: Z, fn: Q } = ac(J);
|
|
12014
|
+
Z && await Q(Wt(ce));
|
|
12017
12015
|
}
|
|
12018
12016
|
}, Zt = (J, ce) => {
|
|
12019
12017
|
A.value[J] = {
|
|
@@ -12035,7 +12033,7 @@ var Qy = /* @__PURE__ */ se({
|
|
|
12035
12033
|
}), fc({ contextType: "form" }), t({
|
|
12036
12034
|
init: Ne,
|
|
12037
12035
|
reset: Ce,
|
|
12038
|
-
validate:
|
|
12036
|
+
validate: ee,
|
|
12039
12037
|
setValue: Je,
|
|
12040
12038
|
getValue: Lt,
|
|
12041
12039
|
getLabel: Dt,
|
|
@@ -12043,7 +12041,7 @@ var Qy = /* @__PURE__ */ se({
|
|
|
12043
12041
|
getFormData: Ze,
|
|
12044
12042
|
setCompConfig: Zt
|
|
12045
12043
|
}), (J, ce) => {
|
|
12046
|
-
const Z = L("j-form-item"),
|
|
12044
|
+
const Z = L("j-form-item"), Q = L("el-row"), ie = L("el-form");
|
|
12047
12045
|
return v.value ? (_(), H(ie, {
|
|
12048
12046
|
key: 0,
|
|
12049
12047
|
class: De([
|
|
@@ -12057,7 +12055,7 @@ var Qy = /* @__PURE__ */ se({
|
|
|
12057
12055
|
onSubmit: ce[0] || (ce[0] = Ot(() => {
|
|
12058
12056
|
}, ["prevent"]))
|
|
12059
12057
|
}, {
|
|
12060
|
-
default: N(() => [R.value ? (_(), H(Z, ze({ key: 0 }, C[0], { "is-not-col": "" }), null, 16)) : (_(), H(
|
|
12058
|
+
default: N(() => [R.value ? (_(), H(Z, ze({ key: 0 }, C[0], { "is-not-col": "" }), null, 16)) : (_(), H(Q, {
|
|
12061
12059
|
key: 1,
|
|
12062
12060
|
gutter: b.value
|
|
12063
12061
|
}, {
|
|
@@ -13314,7 +13312,7 @@ function ul(e, t) {
|
|
|
13314
13312
|
}
|
|
13315
13313
|
function Hl(e, t, n) {
|
|
13316
13314
|
Mt(t) && (n = t, t = null), t || (t = {});
|
|
13317
|
-
const a =
|
|
13315
|
+
const a = He("path", t);
|
|
13318
13316
|
return Mt(n) && (a.dataset.cornerRadius = String(n)), Cc(a, e);
|
|
13319
13317
|
}
|
|
13320
13318
|
function Cc(e, t) {
|
|
@@ -13447,7 +13445,7 @@ function Sc(e, t, n) {
|
|
|
13447
13445
|
x: 0,
|
|
13448
13446
|
y: 0
|
|
13449
13447
|
}, A);
|
|
13450
|
-
var E =
|
|
13448
|
+
var E = He("rect");
|
|
13451
13449
|
return m(E, T), Ee(E, A), k(C, E), E;
|
|
13452
13450
|
}, this.updateDefaultHit = function(C, T) {
|
|
13453
13451
|
var A = Nt(".djs-hit", T);
|
|
@@ -13778,7 +13776,7 @@ Wn.prototype.addDragger = function(e, t, n, a = "djs-dragger") {
|
|
|
13778
13776
|
})), Ve(t, o), Ee(o, "data-preview-support-element-id", e.id), o;
|
|
13779
13777
|
};
|
|
13780
13778
|
Wn.prototype.addFrame = function(e, t) {
|
|
13781
|
-
var n =
|
|
13779
|
+
var n = He("rect", {
|
|
13782
13780
|
class: "djs-resize-overlay",
|
|
13783
13781
|
width: e.width,
|
|
13784
13782
|
height: e.height,
|
|
@@ -13808,7 +13806,7 @@ Wn.prototype._cloneMarker = function(e, t, n, a, o = "djs-dragger") {
|
|
|
13808
13806
|
var r = l || nc(n);
|
|
13809
13807
|
r.id = i, st(r).add(o);
|
|
13810
13808
|
var s = Nt(":scope > defs", e);
|
|
13811
|
-
s || (s =
|
|
13809
|
+
s || (s = He("defs"), Ve(e, s)), Ve(s, r), Ee(t, a, db(r.id));
|
|
13812
13810
|
};
|
|
13813
13811
|
function cb(e, t, n) {
|
|
13814
13812
|
return Nt("marker#" + ub(Ee(e, t)), n || document);
|
|
@@ -14104,9 +14102,9 @@ function Cb(e, t) {
|
|
|
14104
14102
|
var Sb = 750;
|
|
14105
14103
|
function Hc(e, t, n, a, o) {
|
|
14106
14104
|
function i(l) {
|
|
14107
|
-
var r =
|
|
14105
|
+
var r = He("g");
|
|
14108
14106
|
Ee(r, o.cls("djs-drag-group", ["no-events"]));
|
|
14109
|
-
var s =
|
|
14107
|
+
var s = He("g");
|
|
14110
14108
|
return l.forEach(function(c) {
|
|
14111
14109
|
var u;
|
|
14112
14110
|
c.hidden || (c.waypoints ? (u = n._createContainer("connection", s), n.drawConnection(dl(u), c)) : (u = n._createContainer("shape", s), n.drawShape(dl(u), c), bn(u, c.x, c.y)), a.addDragger(c, r, u));
|
|
@@ -17028,7 +17026,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17028
17026
|
strokeWidth: 2,
|
|
17029
17027
|
fill: r
|
|
17030
17028
|
}), le.fill === "none" && delete le.fillOpacity;
|
|
17031
|
-
const me = S / 2, Te = D / 2, Ne =
|
|
17029
|
+
const me = S / 2, Te = D / 2, Ne = He("circle");
|
|
17032
17030
|
return Ee(Ne, {
|
|
17033
17031
|
cx: me,
|
|
17034
17032
|
cy: Te,
|
|
@@ -17041,7 +17039,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17041
17039
|
strokeWidth: 2,
|
|
17042
17040
|
fill: r
|
|
17043
17041
|
});
|
|
17044
|
-
const Te =
|
|
17042
|
+
const Te = He("rect");
|
|
17045
17043
|
return Ee(Te, {
|
|
17046
17044
|
x: le,
|
|
17047
17045
|
y: le,
|
|
@@ -17056,7 +17054,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17056
17054
|
strokeWidth: 2,
|
|
17057
17055
|
stroke: s
|
|
17058
17056
|
});
|
|
17059
|
-
const X =
|
|
17057
|
+
const X = He("path");
|
|
17060
17058
|
return Ee(X, { d: S }), Ee(X, D), Ve(M, X), X;
|
|
17061
17059
|
}
|
|
17062
17060
|
function y(M, S, D, X) {
|
|
@@ -17083,7 +17081,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17083
17081
|
strokeWidth: 2,
|
|
17084
17082
|
fill: r
|
|
17085
17083
|
});
|
|
17086
|
-
const Ne =
|
|
17084
|
+
const Ne = He("polygon");
|
|
17087
17085
|
return Ee(Ne, { points: Te }), Ee(Ne, X), Ve(M, Ne), Ne;
|
|
17088
17086
|
}
|
|
17089
17087
|
function w(M, S, D, X) {
|
|
@@ -17141,7 +17139,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17141
17139
|
const { ref: D = {
|
|
17142
17140
|
x: 0,
|
|
17143
17141
|
y: 0
|
|
17144
|
-
}, scale: X = 1, element: le, parentGfx: me = a._svg } = S, Te =
|
|
17142
|
+
}, scale: X = 1, element: le, parentGfx: me = a._svg } = S, Te = He("marker", {
|
|
17145
17143
|
id: M,
|
|
17146
17144
|
viewBox: "0 0 20 20",
|
|
17147
17145
|
refX: D.x,
|
|
@@ -17152,7 +17150,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17152
17150
|
});
|
|
17153
17151
|
Ve(Te, le);
|
|
17154
17152
|
let Ne = Nt(":scope > defs", me);
|
|
17155
|
-
Ne || (Ne =
|
|
17153
|
+
Ne || (Ne = He("defs"), Ve(me, Ne)), Ve(Ne, Te);
|
|
17156
17154
|
}
|
|
17157
17155
|
function E(M, S, D, X) {
|
|
17158
17156
|
const le = S + "-" + T(D) + "-" + T(X) + "-" + Yc();
|
|
@@ -17160,7 +17158,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17160
17158
|
}
|
|
17161
17159
|
function B(M, S, D, X, le) {
|
|
17162
17160
|
D === "sequenceflow-end" && A(S, {
|
|
17163
|
-
element:
|
|
17161
|
+
element: He("path", {
|
|
17164
17162
|
d: "M 1 5 L 11 10 L 1 15 Z",
|
|
17165
17163
|
...h({
|
|
17166
17164
|
fill: le,
|
|
@@ -17175,7 +17173,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17175
17173
|
scale: 0.5,
|
|
17176
17174
|
parentGfx: M
|
|
17177
17175
|
}), D === "messageflow-start" && A(S, {
|
|
17178
|
-
element:
|
|
17176
|
+
element: He("circle", {
|
|
17179
17177
|
cx: 6,
|
|
17180
17178
|
cy: 6,
|
|
17181
17179
|
r: 3.5,
|
|
@@ -17192,7 +17190,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17192
17190
|
},
|
|
17193
17191
|
parentGfx: M
|
|
17194
17192
|
}), D === "messageflow-end" && A(S, {
|
|
17195
|
-
element:
|
|
17193
|
+
element: He("path", {
|
|
17196
17194
|
d: "m 1 5 l 0 -3 l 7 3 l -7 3 z",
|
|
17197
17195
|
...h({
|
|
17198
17196
|
fill: X,
|
|
@@ -17207,7 +17205,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17207
17205
|
},
|
|
17208
17206
|
parentGfx: M
|
|
17209
17207
|
}), D === "association-start" && A(S, {
|
|
17210
|
-
element:
|
|
17208
|
+
element: He("path", {
|
|
17211
17209
|
d: "M 11 5 L 1 10 L 11 15",
|
|
17212
17210
|
...d({
|
|
17213
17211
|
fill: "none",
|
|
@@ -17223,7 +17221,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17223
17221
|
scale: 0.5,
|
|
17224
17222
|
parentGfx: M
|
|
17225
17223
|
}), D === "association-end" && A(S, {
|
|
17226
|
-
element:
|
|
17224
|
+
element: He("path", {
|
|
17227
17225
|
d: "M 1 5 L 11 10 L 1 15",
|
|
17228
17226
|
...d({
|
|
17229
17227
|
fill: "none",
|
|
@@ -17239,7 +17237,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17239
17237
|
scale: 0.5,
|
|
17240
17238
|
parentGfx: M
|
|
17241
17239
|
}), D === "conditional-flow-marker" && A(S, {
|
|
17242
|
-
element:
|
|
17240
|
+
element: He("path", {
|
|
17243
17241
|
d: "M 0 10 L 8 6 L 16 10 L 8 14 Z",
|
|
17244
17242
|
...h({
|
|
17245
17243
|
fill: X,
|
|
@@ -17253,7 +17251,7 @@ function ba(e, t, n, a, o, i, l) {
|
|
|
17253
17251
|
scale: 0.5,
|
|
17254
17252
|
parentGfx: M
|
|
17255
17253
|
}), D === "conditional-default-flow-marker" && A(S, {
|
|
17256
|
-
element:
|
|
17254
|
+
element: He("path", {
|
|
17257
17255
|
d: "M 6 4 L 10 16",
|
|
17258
17256
|
...h({
|
|
17259
17257
|
stroke: le,
|
|
@@ -17540,7 +17538,7 @@ function dx(e, t, n) {
|
|
|
17540
17538
|
}
|
|
17541
17539
|
function fx() {
|
|
17542
17540
|
var e = document.getElementById("helper-svg");
|
|
17543
|
-
return e || (e =
|
|
17541
|
+
return e || (e = He("svg"), Ee(e, { id: "helper-svg" }), mo(e, {
|
|
17544
17542
|
visibility: "hidden",
|
|
17545
17543
|
position: "fixed",
|
|
17546
17544
|
width: 0,
|
|
@@ -17562,7 +17560,7 @@ zi.prototype.getDimensions = function(e, t) {
|
|
|
17562
17560
|
return this.layoutText(e, t).dimensions;
|
|
17563
17561
|
};
|
|
17564
17562
|
zi.prototype.layoutText = function(e, t) {
|
|
17565
|
-
var n = je({}, this._config.size, t.box), a = je({}, this._config.style, t.style), o = ix(t.align || this._config.align), i = lx(t.padding !== void 0 ? t.padding : this._config.padding), l = t.fitBox || !1, r = hx(a), s = e.split(/\u00AD?\r?\n/), c = [], u = n.width - i.left - i.right, f =
|
|
17563
|
+
var n = je({}, this._config.size, t.box), a = je({}, this._config.style, t.style), o = ix(t.align || this._config.align), i = lx(t.padding !== void 0 ? t.padding : this._config.padding), l = t.fitBox || !1, r = hx(a), s = e.split(/\u00AD?\r?\n/), c = [], u = n.width - i.left - i.right, f = He("text");
|
|
17566
17564
|
for (Ee(f, {
|
|
17567
17565
|
x: 0,
|
|
17568
17566
|
y: 0
|
|
@@ -17574,7 +17572,7 @@ zi.prototype.layoutText = function(e, t) {
|
|
|
17574
17572
|
return b.width > v ? b.width : v;
|
|
17575
17573
|
}, 0), p = i.top;
|
|
17576
17574
|
o.vertical === "middle" && (p += (n.height - d) / 2), p -= (r || c[0].height) / 4;
|
|
17577
|
-
var g =
|
|
17575
|
+
var g = He("text");
|
|
17578
17576
|
return Ee(g, a), ae(c, function(v) {
|
|
17579
17577
|
var b;
|
|
17580
17578
|
switch (p += r || v.height, o.horizontal) {
|
|
@@ -17587,7 +17585,7 @@ zi.prototype.layoutText = function(e, t) {
|
|
|
17587
17585
|
default:
|
|
17588
17586
|
b = Math.max(((l ? h : u) - v.width) / 2 + i.left, 0);
|
|
17589
17587
|
}
|
|
17590
|
-
var x =
|
|
17588
|
+
var x = He("tspan");
|
|
17591
17589
|
Ee(x, {
|
|
17592
17590
|
x: b,
|
|
17593
17591
|
y: p
|
|
@@ -18197,15 +18195,15 @@ function ml(e, t, n) {
|
|
|
18197
18195
|
return Px(t, Bx(e, n));
|
|
18198
18196
|
}
|
|
18199
18197
|
function bl(e, t) {
|
|
18200
|
-
var n =
|
|
18198
|
+
var n = He("g");
|
|
18201
18199
|
st(n).add(Su), Ve(e, n);
|
|
18202
|
-
var a =
|
|
18200
|
+
var a = He("circle");
|
|
18203
18201
|
Ee(a, {
|
|
18204
18202
|
cx: 0,
|
|
18205
18203
|
cy: 0,
|
|
18206
18204
|
r: 4
|
|
18207
18205
|
}), st(a).add("djs-visual"), Ve(n, a);
|
|
18208
|
-
var o =
|
|
18206
|
+
var o = He("circle");
|
|
18209
18207
|
return Ee(o, {
|
|
18210
18208
|
cx: 0,
|
|
18211
18209
|
cy: 0,
|
|
@@ -18213,16 +18211,16 @@ function bl(e, t) {
|
|
|
18213
18211
|
}), st(o).add("djs-hit"), Ve(n, o), t && st(n).add(t), n;
|
|
18214
18212
|
}
|
|
18215
18213
|
function Lx(e, t, n, a) {
|
|
18216
|
-
var o =
|
|
18214
|
+
var o = He("g");
|
|
18217
18215
|
Ve(e, o);
|
|
18218
|
-
var i = 18, l = 6, r = 11, s = $x(t, n, a), c = l + r, u =
|
|
18216
|
+
var i = 18, l = 6, r = 11, s = $x(t, n, a), c = l + r, u = He("rect");
|
|
18219
18217
|
Ee(u, {
|
|
18220
18218
|
x: -i / 2,
|
|
18221
18219
|
y: -l / 2,
|
|
18222
18220
|
width: i,
|
|
18223
18221
|
height: l
|
|
18224
18222
|
}), st(u).add("djs-visual"), Ve(o, u);
|
|
18225
|
-
var f =
|
|
18223
|
+
var f = He("rect");
|
|
18226
18224
|
return Ee(f, {
|
|
18227
18225
|
x: -s / 2,
|
|
18228
18226
|
y: -c / 2,
|
|
@@ -18231,7 +18229,7 @@ function Lx(e, t, n, a) {
|
|
|
18231
18229
|
}), st(f).add("djs-hit"), Ve(o, f), Cb(o, a === "v" ? 90 : 0, 0, 0), o;
|
|
18232
18230
|
}
|
|
18233
18231
|
function Eu(e, t, n) {
|
|
18234
|
-
var a =
|
|
18232
|
+
var a = He("g"), o = fl(t, n), i = $n(t, n);
|
|
18235
18233
|
return Ve(e, a), Lx(a, t, n, i), st(a).add(ku), st(a).add(i === "h" ? "horizontal" : "vertical"), bn(a, o.x, o.y), a;
|
|
18236
18234
|
}
|
|
18237
18235
|
function wl(e) {
|
|
@@ -18278,7 +18276,7 @@ function Ru(e, t, n, a, o) {
|
|
|
18278
18276
|
}
|
|
18279
18277
|
function c(y, w) {
|
|
18280
18278
|
var R = t.getLayer("overlays"), m = Nt('.djs-bendpoints[data-element-id="' + sr(y.id) + '"]', R);
|
|
18281
|
-
return !m && w && (m =
|
|
18279
|
+
return !m && w && (m = He("g"), Ee(m, { "data-element-id": y.id }), st(m).add("djs-bendpoints"), Ve(R, m), s(m, "mousedown", y), s(m, "click", y), s(m, "dblclick", y)), m;
|
|
18282
18280
|
}
|
|
18283
18281
|
function u(y, w) {
|
|
18284
18282
|
return Nt('.djs-segment-dragger[data-segment-idx="' + y + '"]', w);
|
|
@@ -18772,7 +18770,7 @@ An.prototype.getConnection = function(e) {
|
|
|
18772
18770
|
return this._elementFactory.createConnection(t);
|
|
18773
18771
|
};
|
|
18774
18772
|
An.prototype.createConnectionPreviewGfx = function() {
|
|
18775
|
-
var e =
|
|
18773
|
+
var e = He("g");
|
|
18776
18774
|
return Ee(e, { pointerEvents: "none" }), st(e).add(qx), Ve(this._canvas.getActiveLayer(), e), e;
|
|
18777
18775
|
};
|
|
18778
18776
|
An.prototype.createNoopConnection = function(e, t) {
|
|
@@ -19399,7 +19397,7 @@ function xa(e, t, n, a, o, i, l) {
|
|
|
19399
19397
|
this._selection = o, this._dragging = n, this._mouse = l;
|
|
19400
19398
|
var r = this, s = {
|
|
19401
19399
|
create: function(c) {
|
|
19402
|
-
var u = t.getActiveLayer(), f = c.frame =
|
|
19400
|
+
var u = t.getActiveLayer(), f = c.frame = He("rect");
|
|
19403
19401
|
Ee(f, {
|
|
19404
19402
|
class: "djs-lasso-overlay",
|
|
19405
19403
|
width: 1,
|
|
@@ -19592,7 +19590,7 @@ function _a(e, t) {
|
|
|
19592
19590
|
this._eventBus = e, this.offset = 5;
|
|
19593
19591
|
var n = t.cls("djs-outline", ["no-fill"]), a = this;
|
|
19594
19592
|
function o(i) {
|
|
19595
|
-
var l =
|
|
19593
|
+
var l = He("rect");
|
|
19596
19594
|
return Ee(l, je({
|
|
19597
19595
|
x: 0,
|
|
19598
19596
|
y: 0,
|
|
@@ -19668,7 +19666,7 @@ pr.prototype._updateMultiSelectionOutline = function(e) {
|
|
|
19668
19666
|
Al(t);
|
|
19669
19667
|
var n = e.length > 1;
|
|
19670
19668
|
if (st(this._canvas.getContainer())[n ? "add" : "remove"]("djs-multi-select"), !!n) {
|
|
19671
|
-
var a = C0(wn(e)), o =
|
|
19669
|
+
var a = C0(wn(e)), o = He("rect");
|
|
19672
19670
|
Ee(o, je({ rx: 3 }, a)), st(o).add("djs-selection-outline"), Ve(t, o);
|
|
19673
19671
|
}
|
|
19674
19672
|
};
|
|
@@ -19797,7 +19795,7 @@ function $u(e, t, n, a) {
|
|
|
19797
19795
|
e.on("shape.move.start", $s, function(s) {
|
|
19798
19796
|
var c = s.context, u = c.shapes, f = c.allDraggedElements, d = o(u);
|
|
19799
19797
|
if (!c.dragGroup) {
|
|
19800
|
-
var h =
|
|
19798
|
+
var h = He("g");
|
|
19801
19799
|
Ee(h, n.cls("djs-drag-group", ["no-events"])), Ve(t.getActiveLayer(), h), c.dragGroup = h;
|
|
19802
19800
|
}
|
|
19803
19801
|
d.forEach(function(p) {
|
|
@@ -20196,16 +20194,16 @@ qn.prototype.makeDraggable = function(e, t, n) {
|
|
|
20196
20194
|
Qe.bind(t, "mousedown", o), Qe.bind(t, "touchstart", o);
|
|
20197
20195
|
};
|
|
20198
20196
|
qn.prototype._createResizer = function(e, t, n, a) {
|
|
20199
|
-
var o = this._getResizersParent(), i = X0(a), l =
|
|
20197
|
+
var o = this._getResizersParent(), i = X0(a), l = He("g");
|
|
20200
20198
|
st(l).add(eo), st(l).add(eo + "-" + e.id), st(l).add(eo + "-" + a), Ve(o, l);
|
|
20201
|
-
var r =
|
|
20199
|
+
var r = He("rect");
|
|
20202
20200
|
Ee(r, {
|
|
20203
20201
|
x: -ii / 2 + i.x,
|
|
20204
20202
|
y: -ii / 2 + i.y,
|
|
20205
20203
|
width: ii,
|
|
20206
20204
|
height: ii
|
|
20207
20205
|
}), st(r).add(eo + "-visual"), Ve(l, r);
|
|
20208
|
-
var s =
|
|
20206
|
+
var s = He("rect");
|
|
20209
20207
|
return Ee(s, {
|
|
20210
20208
|
x: -li / 2 + i.x,
|
|
20211
20209
|
y: -li / 2 + i.y,
|
|
@@ -20599,7 +20597,7 @@ Qn.prototype.snap = function(e, t) {
|
|
|
20599
20597
|
});
|
|
20600
20598
|
};
|
|
20601
20599
|
Qn.prototype._createLine = function(e) {
|
|
20602
|
-
var t = this._canvas.getLayer("snap"), n =
|
|
20600
|
+
var t = this._canvas.getLayer("snap"), n = He("path");
|
|
20603
20601
|
return Ee(n, { d: "M0,0 L0,0" }), st(n).add("djs-snap-line"), Ve(t, n), { update: function(a) {
|
|
20604
20602
|
Mt(a) ? e === "horizontal" ? Ee(n, {
|
|
20605
20603
|
d: "M-100000," + a + " L+100000," + a,
|