@farris/ui-vue 1.2.4 → 1.2.5
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/components/accordion/index.esm.js +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/common/index.esm.js +2 -2
- package/components/common/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +137 -135
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +2316 -2299
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1929 -1920
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1 -1
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/style.css +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +836 -790
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +382 -378
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1167 -1150
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +131 -127
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +1 -1
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/style.css +1 -1
- package/components/list-view/index.esm.js +128 -124
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +2156 -2139
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +3137 -3120
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/order/index.esm.js +859 -815
- package/components/order/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +75 -73
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +63 -61
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2002 -1956
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +165 -192
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2 -2
- package/components/tabs/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +95 -93
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2316 -2299
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +296 -295
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +2517 -2483
- package/farris.all.umd.cjs +7 -7
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/condition/index.d.ts +60 -1
- package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
- package/types/list-view/src/composition/types.d.ts +1 -1
- package/types/message-box/index.d.ts +84 -1
- package/types/notify/index.d.ts +84 -1
- package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
|
@@ -26,8 +26,8 @@ import jn from "@farris/ui-vue/components/layout";
|
|
|
26
26
|
import Nn from "@farris/ui-vue/components/list-nav";
|
|
27
27
|
import Pn from "@farris/ui-vue/components/list-view";
|
|
28
28
|
import $n from "@farris/ui-vue/components/lookup";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
29
|
+
import Rn from "@farris/ui-vue/components/nav";
|
|
30
|
+
import An, { useNumber as Ln, useFormat as Hn, useSpinner as zn, useTextBox as Gn } from "@farris/ui-vue/components/number-spinner";
|
|
31
31
|
import qn from "@farris/ui-vue/components/number-range";
|
|
32
32
|
import Wn from "@farris/ui-vue/components/order";
|
|
33
33
|
import Un from "@farris/ui-vue/components/page-header";
|
|
@@ -83,7 +83,7 @@ function $o(e, t) {
|
|
|
83
83
|
const n = ot(t);
|
|
84
84
|
return Object.keys(e).reduce((o, a) => (o[a] = e[a], o), n), n;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Ro(e, t) {
|
|
87
87
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
|
|
88
88
|
if (t.has(a)) {
|
|
89
89
|
const s = t.get(a);
|
|
@@ -98,9 +98,9 @@ function Ao(e, t) {
|
|
|
98
98
|
return o;
|
|
99
99
|
}, {});
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Ao(e, t, n = /* @__PURE__ */ new Map()) {
|
|
102
102
|
const o = $o(e, t);
|
|
103
|
-
return
|
|
103
|
+
return Ro(o, n);
|
|
104
104
|
}
|
|
105
105
|
function Lo(e = {}) {
|
|
106
106
|
function t(v, d, m, i) {
|
|
@@ -160,7 +160,7 @@ const Ho = {}, zo = {};
|
|
|
160
160
|
Lo();
|
|
161
161
|
function _e(e, t, n = /* @__PURE__ */ new Map(), o = (l, u, y) => u, a = {}, s = (l) => l) {
|
|
162
162
|
return yt[t.title] = t, bt[t.title] = o, Ho[t.title] = a, zo[t.title] = s, (l = {}) => {
|
|
163
|
-
const u =
|
|
163
|
+
const u = Ao(l, t, n), y = Object.keys(e).reduce((v, d) => (v[d] = e[d].default, v), {});
|
|
164
164
|
return Object.assign(y, u);
|
|
165
165
|
};
|
|
166
166
|
}
|
|
@@ -383,8 +383,8 @@ const Qe = /* @__PURE__ */ te({
|
|
|
383
383
|
if (r && (r.preventDefault(), r.stopPropagation()), i.value.triggerBelongedComponentToDeleteWhenDeleted) {
|
|
384
384
|
const O = i.value.getBelongedComponentInstance(i);
|
|
385
385
|
if (O && O.parent) {
|
|
386
|
-
const B = p(O == null ? void 0 : O.parent),
|
|
387
|
-
(P = (V = B.value) == null ? void 0 : V.contents) == null || P.splice(
|
|
386
|
+
const B = p(O == null ? void 0 : O.parent), R = B.value.contents.findIndex((L) => L.id === O.schema.id);
|
|
387
|
+
(P = (V = B.value) == null ? void 0 : V.contents) == null || P.splice(R, 1), (T = B.value) == null || T.updateDragAndDropRules(), We.value++;
|
|
388
388
|
}
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
@@ -436,7 +436,7 @@ const Qe = /* @__PURE__ */ te({
|
|
|
436
436
|
function D(r, _, V, P) {
|
|
437
437
|
t.emit("selectionChange", r, _, V, P);
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function j(r) {
|
|
440
440
|
let _;
|
|
441
441
|
const V = r.type, P = la[V], T = ia[V], O = T ? T(r) : {};
|
|
442
442
|
O.customClass = e.ignore ? O.customClass : "", O.componentId = u.value;
|
|
@@ -475,13 +475,13 @@ const Qe = /* @__PURE__ */ te({
|
|
|
475
475
|
X(() => e.modelValue, (r) => {
|
|
476
476
|
l.value = r, n.value = `${r.id}-component`;
|
|
477
477
|
});
|
|
478
|
-
function
|
|
478
|
+
function N(r) {
|
|
479
479
|
const _ = r.target;
|
|
480
480
|
da(_);
|
|
481
481
|
}
|
|
482
482
|
function k() {
|
|
483
483
|
var r, _;
|
|
484
|
-
(_ = (r = l.value) == null ? void 0 : r.contents) != null && _.length && d.value && d.value.addEventListener("scroll",
|
|
484
|
+
(_ = (r = l.value) == null ? void 0 : r.contents) != null && _.length && d.value && d.value.addEventListener("scroll", N);
|
|
485
485
|
}
|
|
486
486
|
de(() => {
|
|
487
487
|
if (d.value && i.value && i.value.schema) {
|
|
@@ -490,7 +490,7 @@ const Qe = /* @__PURE__ */ te({
|
|
|
490
490
|
}
|
|
491
491
|
k(), We.value++;
|
|
492
492
|
}), vt(() => {
|
|
493
|
-
d.value && d.value.removeEventListener("scroll",
|
|
493
|
+
d.value && d.value.removeEventListener("scroll", N);
|
|
494
494
|
});
|
|
495
495
|
function I(r) {
|
|
496
496
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((V) => V.classList.remove("dgComponentFocused")), r && (r.preventDefault(), r.stopPropagation());
|
|
@@ -502,7 +502,7 @@ const Qe = /* @__PURE__ */ te({
|
|
|
502
502
|
T && T.value && T.value.classList.add("dgComponentSelected");
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
|
|
505
|
+
N(r);
|
|
506
506
|
}
|
|
507
507
|
return () => l.value.type === "component-ref" ? F(l.value) : c("div", {
|
|
508
508
|
id: `${l.value.id}-design-item`,
|
|
@@ -510,7 +510,7 @@ const Qe = /* @__PURE__ */ te({
|
|
|
510
510
|
class: x.value,
|
|
511
511
|
style: f.value,
|
|
512
512
|
onClick: I
|
|
513
|
-
}, [g(l.value),
|
|
513
|
+
}, [g(l.value), j(l.value)]);
|
|
514
514
|
}
|
|
515
515
|
});
|
|
516
516
|
function st(e, t, n) {
|
|
@@ -537,12 +537,12 @@ function st(e, t, n) {
|
|
|
537
537
|
return null;
|
|
538
538
|
if (g.value.schema && g.value.schema.type === "component")
|
|
539
539
|
return g.value;
|
|
540
|
-
const D = p(g == null ? void 0 : g.value.parent),
|
|
541
|
-
return
|
|
540
|
+
const D = p(g == null ? void 0 : g.value.parent), j = m(D);
|
|
541
|
+
return j || null;
|
|
542
542
|
}
|
|
543
543
|
function i(g = t) {
|
|
544
|
-
const { componentInstance: D, designerItemElementRef:
|
|
545
|
-
return !D || !D.value ? null : D.value.canMove ?
|
|
544
|
+
const { componentInstance: D, designerItemElementRef: j } = g;
|
|
545
|
+
return !D || !D.value ? null : D.value.canMove ? j : i(g.parent);
|
|
546
546
|
}
|
|
547
547
|
function M(g) {
|
|
548
548
|
return !!n && n.canAccepts(g);
|
|
@@ -557,18 +557,18 @@ function st(e, t, n) {
|
|
|
557
557
|
}
|
|
558
558
|
function f(g) {
|
|
559
559
|
const { componentType: D } = g;
|
|
560
|
-
let
|
|
561
|
-
n && n.onResolveNewComponentSchema && (
|
|
560
|
+
let j = Je(D, g);
|
|
561
|
+
n && n.onResolveNewComponentSchema && (j = n.onResolveNewComponentSchema(g, j));
|
|
562
562
|
const F = D.toLowerCase().replace("-", "_");
|
|
563
|
-
return
|
|
563
|
+
return j && !j.id && j.type === D && (j.id = `${F}_${Math.random().toString().slice(2, 6)}`), j;
|
|
564
564
|
}
|
|
565
565
|
function C(g, D) {
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
let k = Je(
|
|
566
|
+
const j = String(g.getAttribute("data-controltype")), F = g.getAttribute("data-feature"), N = F ? JSON.parse(F) : {};
|
|
567
|
+
N.parentComponentInstance = l.value;
|
|
568
|
+
let k = Je(j, N);
|
|
569
569
|
n && n.onAcceptNewChildElement && (k = n.onAcceptNewChildElement(g, D, k));
|
|
570
|
-
const I =
|
|
571
|
-
return k && !k.id && k.type ===
|
|
570
|
+
const I = j.toLowerCase().replace("-", "_");
|
|
571
|
+
return k && !k.id && k.type === j && (k.id = `${I}_${Math.random().toString().slice(2, 6)}`), k;
|
|
572
572
|
}
|
|
573
573
|
function S(g) {
|
|
574
574
|
}
|
|
@@ -1229,7 +1229,7 @@ function wa() {
|
|
|
1229
1229
|
}, []).reduce((S, E) => S && l(E, h), !0);
|
|
1230
1230
|
}
|
|
1231
1231
|
function y(w, h) {
|
|
1232
|
-
const x = Object.keys(w), f = x.includes("allOf"), C = x.includes("anyOf"), S = f || C, g = (S ? w[S ? f ? "allOf" : "anyOf" : "allOf"] : [w]).map((
|
|
1232
|
+
const x = Object.keys(w), f = x.includes("allOf"), C = x.includes("anyOf"), S = f || C, g = (S ? w[S ? f ? "allOf" : "anyOf" : "allOf"] : [w]).map((j) => u(j, h));
|
|
1233
1233
|
return f ? !g.includes(!1) : g.includes(!0);
|
|
1234
1234
|
}
|
|
1235
1235
|
function v(w, h) {
|
|
@@ -1280,9 +1280,9 @@ function _a(e, t) {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
function d() {
|
|
1282
1282
|
s = !1;
|
|
1283
|
-
const i = e, M = i.appearance && i.appearance.class || "", w = M.split(" "), h = i.contents || [], x = h.length ? h[0] : null, f = x && x.appearance ? x.appearance.class : "", C = f ? f.split(" ") : [], S = h.length ? h.reduce((
|
|
1283
|
+
const i = e, M = i.appearance && i.appearance.class || "", w = M.split(" "), h = i.contents || [], x = h.length ? h[0] : null, f = x && x.appearance ? x.appearance.class : "", C = f ? f.split(" ") : [], S = h.length ? h.reduce((N, k) => {
|
|
1284
1284
|
const I = k && k.appearance ? k.appearance.class : "", r = I ? I.split(" ") : [];
|
|
1285
|
-
return
|
|
1285
|
+
return N.push(...r), N;
|
|
1286
1286
|
}, []) : [], E = t, b = E && E.appearance && E.appearance.class || "", g = b ? b.split(" ") : [];
|
|
1287
1287
|
a = {
|
|
1288
1288
|
componentClass: M,
|
|
@@ -1297,8 +1297,8 @@ function _a(e, t) {
|
|
|
1297
1297
|
children: h,
|
|
1298
1298
|
childrenClassList: S
|
|
1299
1299
|
};
|
|
1300
|
-
const { canAccept: D, fixed:
|
|
1301
|
-
return o = F, s =
|
|
1300
|
+
const { canAccept: D, fixed: j, hidePadding: F } = n.getRuleValue(w[0], a);
|
|
1301
|
+
return o = F, s = j, !0;
|
|
1302
1302
|
}
|
|
1303
1303
|
function m() {
|
|
1304
1304
|
return o;
|
|
@@ -1532,10 +1532,10 @@ function Ea(e, t) {
|
|
|
1532
1532
|
const T = o.value || document.body, O = window.getComputedStyle(T);
|
|
1533
1533
|
if (!O || !n.value)
|
|
1534
1534
|
return;
|
|
1535
|
-
const B = ee.getTransformInfo(n.value),
|
|
1536
|
-
y.value && (
|
|
1535
|
+
const B = ee.getTransformInfo(n.value), R = {};
|
|
1536
|
+
y.value && (R.deltaL = n.value.offsetLeft - y.value.x, R.deltaT = n.value.offsetTop - y.value.y);
|
|
1537
1537
|
const L = O.getPropertyValue("position");
|
|
1538
|
-
|
|
1538
|
+
R.width = T.clientWidth, R.height = T.clientHeight, R.pr = parseInt(O.getPropertyValue("padding-right"), 10), R.pb = parseInt(O.getPropertyValue("padding-bottom"), 10), R.position = O.getPropertyValue("position"), L === "static" && (T.style.position = "relative"), R.translateX = B.x, R.translateY = B.y, m.value = R;
|
|
1539
1539
|
}
|
|
1540
1540
|
function f(T) {
|
|
1541
1541
|
if (n.value) {
|
|
@@ -1550,10 +1550,10 @@ function Ea(e, t) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
function C() {
|
|
1553
|
-
var T, O, B,
|
|
1553
|
+
var T, O, B, R;
|
|
1554
1554
|
if (n.value) {
|
|
1555
1555
|
const L = n.value;
|
|
1556
|
-
v.value && ((v.value.n || v.value.s) && ((T = u.value) != null && T.height) && (L.style.height = u.value.height + "px"), (v.value.w || v.value.e) && ((O = u.value) != null && O.width) && (L.style.width = u.value.width + "px"), y.value && ((B = y.value) != null && B.x && (L.style.left = y.value.x + "px"), (
|
|
1556
|
+
v.value && ((v.value.n || v.value.s) && ((T = u.value) != null && T.height) && (L.style.height = u.value.height + "px"), (v.value.w || v.value.e) && ((O = u.value) != null && O.width) && (L.style.width = u.value.width + "px"), y.value && ((B = y.value) != null && B.x && (L.style.left = y.value.x + "px"), (R = y.value) != null && R.y && (L.style.top = y.value.y + "px")));
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
function S() {
|
|
@@ -1588,7 +1588,7 @@ function Ea(e, t) {
|
|
|
1588
1588
|
width: T,
|
|
1589
1589
|
height: O,
|
|
1590
1590
|
x: B,
|
|
1591
|
-
y:
|
|
1591
|
+
y: R
|
|
1592
1592
|
} = n.value.getBoundingClientRect(), L = ee.getTransformInfo(n.value);
|
|
1593
1593
|
return {
|
|
1594
1594
|
size: {
|
|
@@ -1597,63 +1597,63 @@ function Ea(e, t) {
|
|
|
1597
1597
|
},
|
|
1598
1598
|
position: {
|
|
1599
1599
|
x: B - L.x,
|
|
1600
|
-
y:
|
|
1600
|
+
y: R - L.y
|
|
1601
1601
|
}
|
|
1602
1602
|
};
|
|
1603
1603
|
}
|
|
1604
1604
|
return null;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function j(T) {
|
|
1607
1607
|
if (n.value) {
|
|
1608
1608
|
const O = D();
|
|
1609
1609
|
i.value = O;
|
|
1610
1610
|
}
|
|
1611
|
-
a.value = void 0, s.value = null, l.value = null, u.value = null, y.value = null, v.value = null, d.value = null, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup",
|
|
1611
|
+
a.value = void 0, s.value = null, l.value = null, u.value = null, y.value = null, v.value = null, d.value = null, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", j);
|
|
1612
1612
|
}
|
|
1613
1613
|
function F() {
|
|
1614
|
-
document.addEventListener("mousemove", g), document.addEventListener("mouseup",
|
|
1614
|
+
document.addEventListener("mousemove", g), document.addEventListener("mouseup", j);
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function N(T) {
|
|
1617
1617
|
T instanceof MouseEvent && T.button === 2 || w.value && (T.stopPropagation(), T.preventDefault(), a.value = ee.fromEvent(T), d.value = T.target, f(T), F());
|
|
1618
1618
|
}
|
|
1619
1619
|
function k(T) {
|
|
1620
1620
|
return n.value = T, c(we, null, [c("div", {
|
|
1621
1621
|
class: "ng-resizable-handle ng-resizable-n",
|
|
1622
1622
|
type: "n",
|
|
1623
|
-
onMousedown: (O) =>
|
|
1623
|
+
onMousedown: (O) => N(O)
|
|
1624
1624
|
}, null), c("div", {
|
|
1625
1625
|
class: "ng-resizable-handle ng-resizable-e",
|
|
1626
1626
|
type: "e",
|
|
1627
|
-
onMousedown: (O) =>
|
|
1627
|
+
onMousedown: (O) => N(O)
|
|
1628
1628
|
}, null), c("div", {
|
|
1629
1629
|
class: "ng-resizable-handle ng-resizable-s",
|
|
1630
1630
|
type: "s",
|
|
1631
|
-
onMousedown: (O) =>
|
|
1631
|
+
onMousedown: (O) => N(O)
|
|
1632
1632
|
}, null), c("div", {
|
|
1633
1633
|
class: "ng-resizable-handle ng-resizable-w",
|
|
1634
1634
|
type: "w",
|
|
1635
|
-
onMousedown: (O) =>
|
|
1635
|
+
onMousedown: (O) => N(O)
|
|
1636
1636
|
}, null), c("div", {
|
|
1637
1637
|
class: "ng-resizable-handle ng-resizable-ne",
|
|
1638
1638
|
type: "ne",
|
|
1639
|
-
onMousedown: (O) =>
|
|
1639
|
+
onMousedown: (O) => N(O)
|
|
1640
1640
|
}, null), c("div", {
|
|
1641
1641
|
class: "ng-resizable-handle ng-resizable-se ng-resizable-diagonal",
|
|
1642
1642
|
type: "se",
|
|
1643
|
-
onMousedown: (O) =>
|
|
1643
|
+
onMousedown: (O) => N(O)
|
|
1644
1644
|
}, null), c("div", {
|
|
1645
1645
|
class: "ng-resizable-handle ng-resizable-sw",
|
|
1646
1646
|
type: "sw",
|
|
1647
|
-
onMousedown: (O) =>
|
|
1647
|
+
onMousedown: (O) => N(O)
|
|
1648
1648
|
}, null), c("div", {
|
|
1649
1649
|
class: "ng-resizable-handle ng-resizable-nw",
|
|
1650
1650
|
type: "nw",
|
|
1651
|
-
onMousedown: (O) =>
|
|
1651
|
+
onMousedown: (O) => N(O)
|
|
1652
1652
|
}, null)]);
|
|
1653
1653
|
}
|
|
1654
1654
|
function I(T = !0) {
|
|
1655
|
-
const O = o.value || document.body, B = ye.getCurrent(O),
|
|
1656
|
-
T && (M.value = D(), M.value.transform =
|
|
1655
|
+
const O = o.value || document.body, B = ye.getCurrent(O), R = n.value;
|
|
1656
|
+
T && (M.value = D(), M.value.transform = R.style.transform), B && R && (u.value = B, R.style.height = u.value.height - 14 + "px", R.style.width = u.value.width - 14 + "px", R.style.left = "7px", R.style.top = "7px", R.style.transform = "", i.value = {
|
|
1657
1657
|
size: u.value,
|
|
1658
1658
|
position: {
|
|
1659
1659
|
x: 0,
|
|
@@ -1667,15 +1667,15 @@ function Ea(e, t) {
|
|
|
1667
1667
|
const B = {
|
|
1668
1668
|
width: M.value.size.width || 0,
|
|
1669
1669
|
height: M.value.size.height || 0
|
|
1670
|
-
},
|
|
1670
|
+
}, R = {
|
|
1671
1671
|
x: (window.innerWidth - B.width) / 2,
|
|
1672
1672
|
y: (window.innerHeight - B.height) / 2
|
|
1673
1673
|
};
|
|
1674
|
-
(T = u.value) == null || T.set(B), (O = y.value) == null || O.set(
|
|
1674
|
+
(T = u.value) == null || T.set(B), (O = y.value) == null || O.set(R);
|
|
1675
1675
|
const L = n.value;
|
|
1676
|
-
L.style.height = B.height + "px", L.style.width = B.width + "px", L.style.left = `${
|
|
1676
|
+
L.style.height = B.height + "px", L.style.width = B.width + "px", L.style.left = `${R.x}px`, L.style.top = `${R.y}px`, L.style.transform = "", i.value = {
|
|
1677
1677
|
size: B,
|
|
1678
|
-
position:
|
|
1678
|
+
position: R
|
|
1679
1679
|
}, w.value = e.draggable, h.value = !1;
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
@@ -1718,28 +1718,28 @@ function Oa(e, t) {
|
|
|
1718
1718
|
return !1;
|
|
1719
1719
|
if (D === g)
|
|
1720
1720
|
return !0;
|
|
1721
|
-
for (const
|
|
1722
|
-
if (D.children.hasOwnProperty(
|
|
1721
|
+
for (const j in D.children)
|
|
1722
|
+
if (D.children.hasOwnProperty(j) && i(g, D.children[j]))
|
|
1723
1723
|
return !0;
|
|
1724
1724
|
return !1;
|
|
1725
1725
|
}
|
|
1726
1726
|
function M() {
|
|
1727
|
-
var F,
|
|
1727
|
+
var F, N;
|
|
1728
1728
|
let g = d.value.x + v.value.x, D = d.value.y + v.value.y;
|
|
1729
|
-
a.value === "x" ? (g = ((F = y.value) == null ? void 0 : F.x) || 0, d.value.x = 0) : a.value === "y" && (D = ((
|
|
1730
|
-
const
|
|
1731
|
-
n.value && (n.value.style.transform =
|
|
1729
|
+
a.value === "x" ? (g = ((F = y.value) == null ? void 0 : F.x) || 0, d.value.x = 0) : a.value === "y" && (D = ((N = y.value) == null ? void 0 : N.y) || 0, d.value.y = 0);
|
|
1730
|
+
const j = `translate3d(${Math.round(g)}px, ${Math.round(D)}px, 0px)`;
|
|
1731
|
+
n.value && (n.value.style.transform = j), m.value.x = g, m.value.y = D;
|
|
1732
1732
|
}
|
|
1733
1733
|
function w() {
|
|
1734
1734
|
if (!l.value || !n.value)
|
|
1735
1735
|
return null;
|
|
1736
|
-
const g = l.value.getBoundingClientRect(), D = n.value.getBoundingClientRect(),
|
|
1736
|
+
const g = l.value.getBoundingClientRect(), D = n.value.getBoundingClientRect(), j = {
|
|
1737
1737
|
top: g.top < D.top,
|
|
1738
1738
|
right: g.right > D.right,
|
|
1739
1739
|
bottom: g.bottom > D.bottom,
|
|
1740
1740
|
left: g.left < D.left
|
|
1741
1741
|
};
|
|
1742
|
-
return
|
|
1742
|
+
return j.top || (d.value.y -= D.top - g.top), j.bottom || (d.value.y -= D.bottom - g.bottom), j.right || (d.value.x -= D.right - g.right), j.left || (d.value.x -= D.left - g.left), M(), j;
|
|
1743
1743
|
}
|
|
1744
1744
|
function h(g) {
|
|
1745
1745
|
g && (y.value && g.subtract(y.value), d.value.set(g), M(), w());
|
|
@@ -1768,8 +1768,8 @@ function Oa(e, t) {
|
|
|
1768
1768
|
const D = g.target || g.srcElement;
|
|
1769
1769
|
s.value !== void 0 && D && !i(D, s.value) || o.value !== !1 && (g.stopPropagation(), g.preventDefault(), y.value = ee.fromEvent(g, n.value), S(), C());
|
|
1770
1770
|
}
|
|
1771
|
-
function b(g, D,
|
|
1772
|
-
g && o.value && D && (s.value = g, n.value = D, l.value =
|
|
1771
|
+
function b(g, D, j) {
|
|
1772
|
+
g && o.value && D && (s.value = g, n.value = D, l.value = j, g.classList.add("ng-draggable"), g.addEventListener("mousedown", E));
|
|
1773
1773
|
}
|
|
1774
1774
|
return {
|
|
1775
1775
|
registerDraggle: b,
|
|
@@ -1806,7 +1806,7 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1806
1806
|
handle: (H) => {
|
|
1807
1807
|
E(H, !0);
|
|
1808
1808
|
}
|
|
1809
|
-
}], g = p(e.buttons && e.buttons.length ? e.buttons : b), D = $(() => !!v.value),
|
|
1809
|
+
}], g = p(e.buttons && e.buttons.length ? e.buttons : b), D = $(() => !!v.value), j = $(() => !!x.value && !!g.value), F = p(), N = p(), k = p(!1), {
|
|
1810
1810
|
renderResizeBar: I,
|
|
1811
1811
|
maximize: r,
|
|
1812
1812
|
restore: _,
|
|
@@ -1832,11 +1832,11 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1832
1832
|
oldSize: J
|
|
1833
1833
|
});
|
|
1834
1834
|
});
|
|
1835
|
-
function
|
|
1835
|
+
function R() {
|
|
1836
1836
|
const H = document.querySelectorAll(".farris-modal").length;
|
|
1837
1837
|
(!H || H - 1 <= 0) && document.body.classList.remove("modal-open");
|
|
1838
1838
|
}
|
|
1839
|
-
const L = $(() => (a.value ? document.body.classList.add("modal-open") :
|
|
1839
|
+
const L = $(() => (a.value ? document.body.classList.add("modal-open") : R(), a.value)), Q = $(() => {
|
|
1840
1840
|
const H = {
|
|
1841
1841
|
modal: !0,
|
|
1842
1842
|
"farris-modal": !0,
|
|
@@ -1844,13 +1844,13 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1844
1844
|
show: L.value
|
|
1845
1845
|
};
|
|
1846
1846
|
return H["f-modal-fitContent"] = !!u.value, H;
|
|
1847
|
-
}),
|
|
1847
|
+
}), re = $(() => {
|
|
1848
1848
|
var he;
|
|
1849
1849
|
const H = {
|
|
1850
1850
|
"modal-dialog": !0
|
|
1851
1851
|
}, J = (he = l.value) == null ? void 0 : he.split(" ");
|
|
1852
1852
|
return J == null || J.reduce((xe, Le) => (xe[Le] = !0, xe), H), H;
|
|
1853
|
-
}),
|
|
1853
|
+
}), fe = $(() => ({
|
|
1854
1854
|
position: "absolute",
|
|
1855
1855
|
top: `${(window.innerHeight - o.value) / 2}px`,
|
|
1856
1856
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
@@ -1875,7 +1875,7 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1875
1875
|
function Se() {
|
|
1876
1876
|
return {};
|
|
1877
1877
|
}
|
|
1878
|
-
const
|
|
1878
|
+
const ue = $(() => {
|
|
1879
1879
|
const H = {
|
|
1880
1880
|
textAlgin: h.value
|
|
1881
1881
|
}, J = Se();
|
|
@@ -1895,15 +1895,15 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1895
1895
|
H.width && (n.value = H.width), H.height && (o.value = H.height), H.buttons && (g.value = H.buttons), H.title && (f.value = H.title);
|
|
1896
1896
|
}
|
|
1897
1897
|
de(() => {
|
|
1898
|
-
|
|
1898
|
+
N.value && !S.value && (S.value = N.value.parentElement, V.value = S.value, B(F.value, N.value, V.value)), L.value && document.body.classList.add("modal-open"), Ba(e, t);
|
|
1899
1899
|
}), tt(() => {
|
|
1900
|
-
|
|
1900
|
+
R(), O && O();
|
|
1901
1901
|
}), t.expose({
|
|
1902
|
-
modalElementRef:
|
|
1902
|
+
modalElementRef: N,
|
|
1903
1903
|
updateModalOptions: $e,
|
|
1904
1904
|
close: E
|
|
1905
1905
|
});
|
|
1906
|
-
function
|
|
1906
|
+
function Re() {
|
|
1907
1907
|
return c("ul", null, [i.value && c("li", {
|
|
1908
1908
|
class: "f-btn-icon f-bare"
|
|
1909
1909
|
}, [c("span", {
|
|
@@ -1922,10 +1922,10 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1922
1922
|
class: "f-icon modal_close"
|
|
1923
1923
|
}, null)])]);
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1925
|
+
function Ae() {
|
|
1926
1926
|
return c("div", {
|
|
1927
1927
|
class: "modal-footer",
|
|
1928
|
-
style:
|
|
1928
|
+
style: ue.value
|
|
1929
1929
|
}, [g.value && g.value.map((H) => c("button", {
|
|
1930
1930
|
name: H.name,
|
|
1931
1931
|
type: "button",
|
|
@@ -1947,9 +1947,9 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1947
1947
|
style: "display: block"
|
|
1948
1948
|
}, [c("div", {
|
|
1949
1949
|
id: s.value,
|
|
1950
|
-
class:
|
|
1951
|
-
style:
|
|
1952
|
-
ref:
|
|
1950
|
+
class: re.value,
|
|
1951
|
+
style: fe.value,
|
|
1952
|
+
ref: N
|
|
1953
1953
|
}, [c("div", {
|
|
1954
1954
|
class: Ne.value
|
|
1955
1955
|
}, [c("div", {
|
|
@@ -1965,7 +1965,7 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1965
1965
|
class: "modal-title-label"
|
|
1966
1966
|
}, [f.value])]), c("div", {
|
|
1967
1967
|
class: "actions"
|
|
1968
|
-
}, [
|
|
1968
|
+
}, [Re()])]), c("div", {
|
|
1969
1969
|
class: Ve.value
|
|
1970
1970
|
}, [(J = (H = t.slots).default) == null ? void 0 : J.call(H), M.value === "iframe" && c("iframe", {
|
|
1971
1971
|
title: s.value,
|
|
@@ -1973,7 +1973,7 @@ const Ct = /* @__PURE__ */ te({
|
|
|
1973
1973
|
width: "100%",
|
|
1974
1974
|
frameborder: "0",
|
|
1975
1975
|
src: w.value
|
|
1976
|
-
}, null)]),
|
|
1976
|
+
}, null)]), j.value && Ae()]), !u.value && C.value && N.value && I(N.value)])])];
|
|
1977
1977
|
}
|
|
1978
1978
|
});
|
|
1979
1979
|
}
|
|
@@ -2116,7 +2116,7 @@ const _t = /* @__PURE__ */ new Map([
|
|
|
2116
2116
|
function St(e, t, n) {
|
|
2117
2117
|
return t;
|
|
2118
2118
|
}
|
|
2119
|
-
const ja = "https://json-schema.org/draft/2020-12/schema", Na = "https://farris-design.gitee.io/list-view.schema.json", Pa = "list-view", $a = "A Farris Component",
|
|
2119
|
+
const ja = "https://json-schema.org/draft/2020-12/schema", Na = "https://farris-design.gitee.io/list-view.schema.json", Pa = "list-view", $a = "A Farris Component", Ra = "object", Aa = {
|
|
2120
2120
|
id: {
|
|
2121
2121
|
description: "The unique identifier for list-view",
|
|
2122
2122
|
type: "string"
|
|
@@ -2186,8 +2186,8 @@ const ja = "https://json-schema.org/draft/2020-12/schema", Na = "https://farris-
|
|
|
2186
2186
|
$id: Na,
|
|
2187
2187
|
title: Pa,
|
|
2188
2188
|
description: $a,
|
|
2189
|
-
type:
|
|
2190
|
-
properties:
|
|
2189
|
+
type: Ra,
|
|
2190
|
+
properties: Aa,
|
|
2191
2191
|
required: La
|
|
2192
2192
|
}, za = "list-view", Ga = "A Farris Component", qa = "object", Wa = {
|
|
2193
2193
|
basic: {
|
|
@@ -2302,31 +2302,33 @@ function ct(e, t, n, o, a, s, l, u, y, v) {
|
|
|
2302
2302
|
} = l, g = $(() => ({
|
|
2303
2303
|
margin: d.value === "small" ? "0.25rem 0" : "10px 0"
|
|
2304
2304
|
}));
|
|
2305
|
-
function D(
|
|
2306
|
-
return
|
|
2307
|
-
class: S(
|
|
2308
|
-
id: C(
|
|
2309
|
-
key: C(
|
|
2310
|
-
onClick: (k) => b(k,
|
|
2311
|
-
onMouseenter: (k) => h(k,
|
|
2312
|
-
onMouseover: (k) => x(k,
|
|
2313
|
-
onMouseout: (k) => f(k,
|
|
2305
|
+
function D(j, F, N) {
|
|
2306
|
+
return j.checked = u.findIndexInSelectedItems(j) > -1, c("li", {
|
|
2307
|
+
class: S(j, F),
|
|
2308
|
+
id: C(j, F),
|
|
2309
|
+
key: C(j, F),
|
|
2310
|
+
onClick: (k) => b(k, j, F),
|
|
2311
|
+
onMouseenter: (k) => h(k, j, F),
|
|
2312
|
+
onMouseover: (k) => x(k, j, F),
|
|
2313
|
+
onMouseout: (k) => f(k, j, F)
|
|
2314
2314
|
}, [M.value && c("div", {
|
|
2315
2315
|
class: "f-list-select",
|
|
2316
2316
|
onClick: (k) => k.stopPropagation()
|
|
2317
2317
|
}, [c(nt, {
|
|
2318
|
-
id: "list-" + C(
|
|
2318
|
+
id: "list-" + C(j, F),
|
|
2319
2319
|
customClass: "listview-checkbox",
|
|
2320
|
-
disabled:
|
|
2321
|
-
checked:
|
|
2322
|
-
"onUpdate:checked": (k) =>
|
|
2323
|
-
onChange: (k) =>
|
|
2320
|
+
disabled: j[w.value],
|
|
2321
|
+
checked: j.checked,
|
|
2322
|
+
"onUpdate:checked": (k) => j.checked = k,
|
|
2323
|
+
onChange: (k) => {
|
|
2324
|
+
E(j, F, !k.checked);
|
|
2325
|
+
}
|
|
2324
2326
|
}, null)]), c("div", {
|
|
2325
2327
|
class: "f-list-content"
|
|
2326
2328
|
}, [c("div", {
|
|
2327
2329
|
style: g.value,
|
|
2328
|
-
title:
|
|
2329
|
-
}, [
|
|
2330
|
+
title: j.raw[i.value] || j.raw[m.value]
|
|
2331
|
+
}, [j.raw[m.value]])])]);
|
|
2330
2332
|
}
|
|
2331
2333
|
return {
|
|
2332
2334
|
renderItem: D
|
|
@@ -2357,20 +2359,20 @@ function Ka(e, t, n, o, a, s, l, u, y, v) {
|
|
|
2357
2359
|
class: x(b, g),
|
|
2358
2360
|
id: h(b, g),
|
|
2359
2361
|
key: h(b, g),
|
|
2360
|
-
onClick: (
|
|
2361
|
-
onMouseenter: (
|
|
2362
|
-
onMouseover: (
|
|
2363
|
-
onMouseout: (
|
|
2362
|
+
onClick: (j) => C(j, b, g),
|
|
2363
|
+
onMouseenter: (j) => i(j, b, g),
|
|
2364
|
+
onMouseover: (j) => M(j, b, g),
|
|
2365
|
+
onMouseout: (j) => w(j, b, g)
|
|
2364
2366
|
}, [d.value && c("div", {
|
|
2365
2367
|
class: "f-list-select",
|
|
2366
|
-
onClick: (
|
|
2368
|
+
onClick: (j) => j.stopPropagation()
|
|
2367
2369
|
}, [c(nt, {
|
|
2368
2370
|
id: "list-" + h(b, g),
|
|
2369
2371
|
customClass: "listview-checkbox",
|
|
2370
2372
|
disabled: b[m.value] || !b.checked,
|
|
2371
2373
|
checked: b.checked,
|
|
2372
|
-
"onUpdate:checked": (
|
|
2373
|
-
onChange: (
|
|
2374
|
+
"onUpdate:checked": (j) => b.checked = j,
|
|
2375
|
+
onChange: (j) => f(b, g, !j.checked)
|
|
2374
2376
|
}, null)]), c("div", {
|
|
2375
2377
|
class: "f-list-content"
|
|
2376
2378
|
}, [S(b, g, D)])]);
|
|
@@ -2396,18 +2398,18 @@ function Ya(e, t, n, o, a, s, l, u, y, v) {
|
|
|
2396
2398
|
dragend: g
|
|
2397
2399
|
} = o, {
|
|
2398
2400
|
removeItem: D
|
|
2399
|
-
} = y,
|
|
2401
|
+
} = y, j = $(() => ({
|
|
2400
2402
|
margin: d.value ? "10px 0" : "10px 0px 10px 14px"
|
|
2401
2403
|
}));
|
|
2402
2404
|
function F(r) {
|
|
2403
2405
|
return c("div", {
|
|
2404
|
-
style:
|
|
2406
|
+
style: j.value
|
|
2405
2407
|
}, [r.raw.name]);
|
|
2406
2408
|
}
|
|
2407
|
-
function
|
|
2409
|
+
function N() {
|
|
2408
2410
|
return t.slots.itemContent ? t.slots.itemContent : F;
|
|
2409
2411
|
}
|
|
2410
|
-
const k =
|
|
2412
|
+
const k = N();
|
|
2411
2413
|
function I(r, _, V) {
|
|
2412
2414
|
return c("li", {
|
|
2413
2415
|
class: x(r, _),
|
|
@@ -2431,7 +2433,7 @@ function Ya(e, t, n, o, a, s, l, u, y, v) {
|
|
|
2431
2433
|
disabled: r[m.value] || !r.checked,
|
|
2432
2434
|
checked: r.checked,
|
|
2433
2435
|
"onUpdate:checked": (P) => r.checked = P,
|
|
2434
|
-
onChange: (P) => f(r, _)
|
|
2436
|
+
onChange: (P) => f(r, _, !P.checked)
|
|
2435
2437
|
}, null)]), c("div", {
|
|
2436
2438
|
class: "f-list-content"
|
|
2437
2439
|
}, [k(r)]), c("div", {
|
|
@@ -2564,22 +2566,22 @@ function es(e, t, n, o, a, s) {
|
|
|
2564
2566
|
return k.raw[l.value] || "";
|
|
2565
2567
|
}
|
|
2566
2568
|
const g = $(() => !d.value);
|
|
2567
|
-
function D(k, I) {
|
|
2568
|
-
|
|
2569
|
+
function D(k, I, r) {
|
|
2570
|
+
k.checked = r, !k.raw[u.value] && (g.value && (w.value = k.raw[l.value]), C(k));
|
|
2569
2571
|
}
|
|
2570
|
-
const
|
|
2571
|
-
function
|
|
2572
|
+
const j = $(() => d.value && m.value === "OnCheckClearByClick"), F = $(() => !d.value || d.value && (m.value === "OnCheckAndClick" || m.value === "OnClick"));
|
|
2573
|
+
function N(k, I, r) {
|
|
2572
2574
|
if (I.raw[u.value]) {
|
|
2573
2575
|
k.preventDefault(), k.stopPropagation();
|
|
2574
2576
|
return;
|
|
2575
2577
|
}
|
|
2576
|
-
w.value = I.raw[l.value], M.value = r,
|
|
2578
|
+
w.value = I.raw[l.value], M.value = r, j.value && x(n.value), F.value && (C(I), S.value = f()), t.emit("clickItem", { data: S.value, index: r }), t.emit("activeChange", S.value);
|
|
2577
2579
|
}
|
|
2578
2580
|
return {
|
|
2579
2581
|
getKey: b,
|
|
2580
2582
|
listViewItemClass: E,
|
|
2581
2583
|
onCheckItem: D,
|
|
2582
|
-
onClickItem:
|
|
2584
|
+
onClickItem: N
|
|
2583
2585
|
};
|
|
2584
2586
|
}
|
|
2585
2587
|
function Tt(e, t, n, o, a, s, l) {
|
|
@@ -2596,7 +2598,7 @@ function Tt(e, t, n, o, a, s, l) {
|
|
|
2596
2598
|
} = E(e, t, n, i, a, m, w, s, M, l), {
|
|
2597
2599
|
renderItem: g
|
|
2598
2600
|
} = Xa(e, t, n, i, a, m, w, s, M, l), D = [b, g];
|
|
2599
|
-
function
|
|
2601
|
+
function j() {
|
|
2600
2602
|
return n.value.filter((k) => k.visible !== !1).map((k, I) => D[k.type](k, I, v));
|
|
2601
2603
|
}
|
|
2602
2604
|
function F() {
|
|
@@ -2606,14 +2608,14 @@ function Tt(e, t, n, o, a, s, l) {
|
|
|
2606
2608
|
class: "f-empty-title"
|
|
2607
2609
|
}, [d.value])]);
|
|
2608
2610
|
}
|
|
2609
|
-
function
|
|
2611
|
+
function N() {
|
|
2610
2612
|
return c("ul", {
|
|
2611
2613
|
class: h.value,
|
|
2612
2614
|
style: "list-style: none;"
|
|
2613
|
-
}, [x.value &&
|
|
2615
|
+
}, [x.value && j(), C.value && F(), t.slots.empty && t.slots.empty()]);
|
|
2614
2616
|
}
|
|
2615
2617
|
return {
|
|
2616
|
-
renderListArea:
|
|
2618
|
+
renderListArea: N
|
|
2617
2619
|
};
|
|
2618
2620
|
}
|
|
2619
2621
|
function kt(e, t, n) {
|
|
@@ -2688,17 +2690,17 @@ const Ce = /* @__PURE__ */ te({
|
|
|
2688
2690
|
getVisualData: D
|
|
2689
2691
|
} = g;
|
|
2690
2692
|
s.value = D(0, h.value + l - 1);
|
|
2691
|
-
const
|
|
2693
|
+
const j = $(() => {
|
|
2692
2694
|
const T = {
|
|
2693
2695
|
"f-list-view": !0,
|
|
2694
2696
|
"f-list-view-multiple": e.multiSelect
|
|
2695
2697
|
};
|
|
2696
2698
|
return e.size !== "default" && (T[`${e.size}-item`] = !0), T;
|
|
2697
2699
|
}), F = $(() => !!t.slots.footer || o.value);
|
|
2698
|
-
function
|
|
2700
|
+
function N() {
|
|
2699
2701
|
return e.header === "SearchBar" ? Be : e.header === "ContentHeader" ? kt : Be;
|
|
2700
2702
|
}
|
|
2701
|
-
const k =
|
|
2703
|
+
const k = N(), {
|
|
2702
2704
|
renderHeader: I
|
|
2703
2705
|
} = k(e, t, w), {
|
|
2704
2706
|
renderListArea: r
|
|
@@ -2717,7 +2719,7 @@ const Ce = /* @__PURE__ */ te({
|
|
|
2717
2719
|
e.multiSelect && (T.preventDefault(), T.stopPropagation());
|
|
2718
2720
|
}
|
|
2719
2721
|
return () => c("div", {
|
|
2720
|
-
class:
|
|
2722
|
+
class: j.value,
|
|
2721
2723
|
onClick: P
|
|
2722
2724
|
}, [I(), c("div", {
|
|
2723
2725
|
ref: n,
|
|
@@ -2733,7 +2735,7 @@ const Ce = /* @__PURE__ */ te({
|
|
|
2733
2735
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
2734
2736
|
}
|
|
2735
2737
|
});
|
|
2736
|
-
var oe = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(oe || {}),
|
|
2738
|
+
var oe = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(oe || {}), ve = /* @__PURE__ */ ((e) => (e[e.initial = 0] = "initial", e[e.editing = 1] = "editing", e))(ve || {}), je = /* @__PURE__ */ ((e) => (e[e.data = 0] = "data", e[e.group = 1] = "group", e[e.summary = 2] = "summary", e))(je || {});
|
|
2737
2739
|
function ts() {
|
|
2738
2740
|
function e(n, o) {
|
|
2739
2741
|
const a = n.pre;
|
|
@@ -2756,10 +2758,10 @@ function ns() {
|
|
|
2756
2758
|
switch (o.command) {
|
|
2757
2759
|
case "edit":
|
|
2758
2760
|
case "remove":
|
|
2759
|
-
return a.status ===
|
|
2761
|
+
return a.status === ve.initial;
|
|
2760
2762
|
case "accept":
|
|
2761
2763
|
case "cancel":
|
|
2762
|
-
return a.status ===
|
|
2764
|
+
return a.status === ve.editing;
|
|
2763
2765
|
default:
|
|
2764
2766
|
return !o.hidden;
|
|
2765
2767
|
}
|
|
@@ -2767,11 +2769,11 @@ function ns() {
|
|
|
2767
2769
|
function t(o, a, s) {
|
|
2768
2770
|
switch (o.onClick(a, s.dataIndex, s), o.command) {
|
|
2769
2771
|
case "edit":
|
|
2770
|
-
s.status,
|
|
2772
|
+
s.status, ve.editing;
|
|
2771
2773
|
break;
|
|
2772
2774
|
case "accept":
|
|
2773
2775
|
case "cancel":
|
|
2774
|
-
s.status,
|
|
2776
|
+
s.status, ve.initial;
|
|
2775
2777
|
break;
|
|
2776
2778
|
}
|
|
2777
2779
|
}
|
|
@@ -3424,7 +3426,7 @@ const Ms = "https://json-schema.org/draft/2020-12/schema", Ds = "https://farris-
|
|
|
3424
3426
|
description: "",
|
|
3425
3427
|
type: "number"
|
|
3426
3428
|
}
|
|
3427
|
-
},
|
|
3429
|
+
}, Rs = [
|
|
3428
3430
|
"id",
|
|
3429
3431
|
"type"
|
|
3430
3432
|
], Bt = {
|
|
@@ -3434,7 +3436,7 @@ const Ms = "https://json-schema.org/draft/2020-12/schema", Ds = "https://farris-
|
|
|
3434
3436
|
description: Ns,
|
|
3435
3437
|
type: Ps,
|
|
3436
3438
|
properties: $s,
|
|
3437
|
-
required:
|
|
3439
|
+
required: Rs
|
|
3438
3440
|
}, Mt = {
|
|
3439
3441
|
id: { type: String, default: "" },
|
|
3440
3442
|
customClass: { type: String, default: "" },
|
|
@@ -3455,14 +3457,14 @@ _e(
|
|
|
3455
3457
|
lt,
|
|
3456
3458
|
void 0
|
|
3457
3459
|
);
|
|
3458
|
-
const
|
|
3460
|
+
const As = {
|
|
3459
3461
|
id: { type: String },
|
|
3460
3462
|
required: { type: Boolean, default: !1 },
|
|
3461
3463
|
text: { type: String, default: "" },
|
|
3462
3464
|
title: { type: String }
|
|
3463
3465
|
}, Ls = /* @__PURE__ */ te({
|
|
3464
3466
|
name: "FDynamicFormLabel",
|
|
3465
|
-
props:
|
|
3467
|
+
props: As,
|
|
3466
3468
|
emits: [],
|
|
3467
3469
|
setup(e, t) {
|
|
3468
3470
|
const n = p(e.title || e.text), o = p(e.required), a = p(e.text);
|
|
@@ -3804,7 +3806,7 @@ function Qs(e, t, n, o) {
|
|
|
3804
3806
|
function D(r) {
|
|
3805
3807
|
e.disabled || (u.value && (s.value = !0), d.value && t.emit("focus", r));
|
|
3806
3808
|
}
|
|
3807
|
-
function
|
|
3809
|
+
function j(r) {
|
|
3808
3810
|
t.emit("input", r.target.value);
|
|
3809
3811
|
const _ = r.target.value;
|
|
3810
3812
|
o.value = _, v.value === "input" && (t.emit("update:modelValue", _), t.emit("update:value", _));
|
|
@@ -3812,7 +3814,7 @@ function Qs(e, t, n, o) {
|
|
|
3812
3814
|
function F(r) {
|
|
3813
3815
|
t.emit("keydown", r);
|
|
3814
3816
|
}
|
|
3815
|
-
function
|
|
3817
|
+
function N(r) {
|
|
3816
3818
|
t.emit("keyup", r);
|
|
3817
3819
|
}
|
|
3818
3820
|
function k(r) {
|
|
@@ -3838,9 +3840,9 @@ function Qs(e, t, n, o) {
|
|
|
3838
3840
|
onBlur: b,
|
|
3839
3841
|
onClick: g,
|
|
3840
3842
|
onFocus: D,
|
|
3841
|
-
onInput:
|
|
3843
|
+
onInput: j,
|
|
3842
3844
|
onKeydown: F,
|
|
3843
|
-
onKeyup:
|
|
3845
|
+
onKeyup: N,
|
|
3844
3846
|
onMousedown: k,
|
|
3845
3847
|
onTextBoxValueChange: I,
|
|
3846
3848
|
placeholder: w,
|
|
@@ -4036,7 +4038,7 @@ function rl(e, t, n, o) {
|
|
|
4036
4038
|
onTextBoxValueChange: b,
|
|
4037
4039
|
readonly: g,
|
|
4038
4040
|
placeholder: D,
|
|
4039
|
-
textBoxClass:
|
|
4041
|
+
textBoxClass: j,
|
|
4040
4042
|
textBoxTitle: F
|
|
4041
4043
|
} = o;
|
|
4042
4044
|
return de(() => {
|
|
@@ -4045,7 +4047,7 @@ function rl(e, t, n, o) {
|
|
|
4045
4047
|
ref: a,
|
|
4046
4048
|
name: "input-group-value",
|
|
4047
4049
|
autocomplete: s.value,
|
|
4048
|
-
class:
|
|
4050
|
+
class: j.value,
|
|
4049
4051
|
disabled: m == null ? void 0 : m.value,
|
|
4050
4052
|
maxlength: v.value,
|
|
4051
4053
|
minlength: y.value,
|
|
@@ -4167,7 +4169,7 @@ const dl = /* @__PURE__ */ te({
|
|
|
4167
4169
|
}), G = {}, q = {}, W = {}, U = {};
|
|
4168
4170
|
let pt = !1;
|
|
4169
4171
|
function fl() {
|
|
4170
|
-
pt || (pt = !0, yn.register(G, q, W, U), gn.register(G, q, W, U), bn.register(G, q, W, U), Cn.register(G, q, W, U), wn.register(G, q, W, U), _n.register(G, q, W, U), Sn.register(G, q, W, U), Xe.register(G, q, W, U), bo.register(G, q, W, U), Fn.register(G, q, W, U), xn.register(G, q, W, U), kn.register(G, q, W, U), Tn.register(G, q, W, U), In.register(G, q, W, U), Vn.register(G, q, W, U), On.register(G, q, W, U), Bn.register(G, q, W, U), jo.register(G, q, W, U), Mn.register(G, q, W, U), Dn.register(G, q, W, U), jn.register(G, q, W, U), Pn.register(G, q, W, U), Nn.register(G, q, W, U), $n.register(G, q, W, U), No.register(G, q, W, U),
|
|
4172
|
+
pt || (pt = !0, yn.register(G, q, W, U), gn.register(G, q, W, U), bn.register(G, q, W, U), Cn.register(G, q, W, U), wn.register(G, q, W, U), _n.register(G, q, W, U), Sn.register(G, q, W, U), Xe.register(G, q, W, U), bo.register(G, q, W, U), Fn.register(G, q, W, U), xn.register(G, q, W, U), kn.register(G, q, W, U), Tn.register(G, q, W, U), In.register(G, q, W, U), Vn.register(G, q, W, U), On.register(G, q, W, U), Bn.register(G, q, W, U), jo.register(G, q, W, U), Mn.register(G, q, W, U), Dn.register(G, q, W, U), jn.register(G, q, W, U), Pn.register(G, q, W, U), Nn.register(G, q, W, U), $n.register(G, q, W, U), No.register(G, q, W, U), Rn.register(G, q, W, U), qn.register(G, q, W, U), An.register(G, q, W, U), Wn.register(G, q, W, U), Un.register(G, q, W, U), Kn.register(G, q, W, U), Yn.register(G, q, W, U), Xn.register(G, q, W, U), Jn.register(G, q, W, U), Qn.register(G, q, W, U), Zn.register(G, q, W, U), to.register(G, q, W, U), no.register(G, q, W, U), eo.register(G, q, W, U), Po.register(G, q, W), oo.register(G, q, W, U), ao.register(G, q, W, U), so.register(G, q, W, U), lo.register(G, q, W, U), io.register(G, q, W, U), ro.register(G, q, W, U), uo.register(G, q, W, U), co.register(G, q, W, U), fo.register(G, q, W, U), po.register(G, q, W, U), vo.register(G, q, W, U), mo.register(G, q, W, U), go.register(G, q, W, U), ho.register(G, q, W, U), yo.register(G, q, W, U), Co.register(G, q, W, U), wo.register(G, q, W, U));
|
|
4171
4173
|
}
|
|
4172
4174
|
function jt() {
|
|
4173
4175
|
fl();
|
|
@@ -4182,6 +4184,8 @@ function jt() {
|
|
|
4182
4184
|
switch (a) {
|
|
4183
4185
|
case "check-box":
|
|
4184
4186
|
return "onChangeValue";
|
|
4187
|
+
case "switch":
|
|
4188
|
+
return "onModelValueChanged";
|
|
4185
4189
|
case "check-group":
|
|
4186
4190
|
return "onChangeValue";
|
|
4187
4191
|
case "combo-list":
|
|
@@ -4264,16 +4268,16 @@ const pl = /* @__PURE__ */ te({
|
|
|
4264
4268
|
t.emit("update:modelValue", "");
|
|
4265
4269
|
}
|
|
4266
4270
|
const S = $(() => {
|
|
4267
|
-
const E = a.value.type || "input-group", b = M(E), g = i(E, a.value), D = w(E),
|
|
4268
|
-
return g[D] = f, g[
|
|
4271
|
+
const E = a.value.type || "input-group", b = M(E), g = i(E, a.value), D = w(E), j = h(a.value.type);
|
|
4272
|
+
return g[D] = f, g[j] = C, () => c(b, be({
|
|
4269
4273
|
ref: m
|
|
4270
4274
|
}, g, {
|
|
4271
4275
|
modelValue: l.value,
|
|
4272
4276
|
"onUpdate:modelValue": (F) => l.value = F
|
|
4273
4277
|
}), null);
|
|
4274
4278
|
});
|
|
4275
|
-
return X([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([E, b, g, D,
|
|
4276
|
-
n.value = E, o.value = b, a.value = g, s.value = D, l.value =
|
|
4279
|
+
return X([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([E, b, g, D, j, F, N, k, I]) => {
|
|
4280
|
+
n.value = E, o.value = b, a.value = g, s.value = D, l.value = j, u.value = F, y.value = N, v.value = k, d.value = I;
|
|
4277
4281
|
}), t.expose({
|
|
4278
4282
|
editorRef: m
|
|
4279
4283
|
}), () => d.value && c("div", {
|
|
@@ -4409,7 +4413,7 @@ function gl(e, t, n) {
|
|
|
4409
4413
|
}
|
|
4410
4414
|
return { getCompareOperators: a };
|
|
4411
4415
|
}
|
|
4412
|
-
function
|
|
4416
|
+
function Rt() {
|
|
4413
4417
|
const e = p({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
4414
4418
|
let o = 0;
|
|
4415
4419
|
function a() {
|
|
@@ -4424,52 +4428,52 @@ function At() {
|
|
|
4424
4428
|
conditionId: Date.now()
|
|
4425
4429
|
};
|
|
4426
4430
|
}
|
|
4427
|
-
function s(F,
|
|
4428
|
-
return { relation: F, items: [], children: [], path: [], groupId: ++o, level:
|
|
4431
|
+
function s(F, N) {
|
|
4432
|
+
return { relation: F, items: [], children: [], path: [], groupId: ++o, level: N };
|
|
4429
4433
|
}
|
|
4430
4434
|
function l() {
|
|
4431
4435
|
const F = Object.assign({}, e.value);
|
|
4432
|
-
n.forEach((
|
|
4433
|
-
|
|
4434
|
-
}), t.forEach((
|
|
4435
|
-
|
|
4436
|
+
n.forEach((N, k) => {
|
|
4437
|
+
N.groupId === F.groupId && n.set(k, F);
|
|
4438
|
+
}), t.forEach((N, k) => {
|
|
4439
|
+
N.groupId === F.groupId && t.set(k, F);
|
|
4436
4440
|
}), e.value = F;
|
|
4437
4441
|
}
|
|
4438
4442
|
function u(F) {
|
|
4439
|
-
const
|
|
4443
|
+
const N = /* @__PURE__ */ new Map();
|
|
4440
4444
|
let k = 0;
|
|
4441
4445
|
return F.forEach((I, r) => {
|
|
4442
4446
|
var _, V;
|
|
4443
|
-
if (k += ((_ = I.lBracket) == null ? void 0 : _.length) || 0,
|
|
4447
|
+
if (k += ((_ = I.lBracket) == null ? void 0 : _.length) || 0, N.set(r, k), k -= ((V = I.rBracket) == null ? void 0 : V.length) || 0, k < 0)
|
|
4444
4448
|
throw new Error("The right bracket is out of range.");
|
|
4445
|
-
}),
|
|
4449
|
+
}), N;
|
|
4446
4450
|
}
|
|
4447
|
-
function y(F,
|
|
4448
|
-
for (let _ = 0; _ <
|
|
4451
|
+
function y(F, N, k, I, r) {
|
|
4452
|
+
for (let _ = 0; _ < N; _++) {
|
|
4449
4453
|
const V = F + (_ + 1), P = s(r, V);
|
|
4450
4454
|
k.children.push(P), n.set(P.groupId, k), k = k.children[k.children.length - 1], I.push(k);
|
|
4451
4455
|
}
|
|
4452
4456
|
return k;
|
|
4453
4457
|
}
|
|
4454
|
-
function v(F,
|
|
4455
|
-
for (let T =
|
|
4458
|
+
function v(F, N, k, I, r) {
|
|
4459
|
+
for (let T = N; T <= 0; T++)
|
|
4456
4460
|
I.pop();
|
|
4457
4461
|
const _ = I[I.length - 1];
|
|
4458
4462
|
if (!_)
|
|
4459
4463
|
throw new Error("The group path is out of range");
|
|
4460
|
-
const V = F +
|
|
4464
|
+
const V = F + N, P = s(r, V);
|
|
4461
4465
|
return _.children.push(P), n.set(P.groupId, _), k = _.children[_.children.length - 1], I.push(k), k;
|
|
4462
4466
|
}
|
|
4463
|
-
function d(F,
|
|
4467
|
+
function d(F, N, k, I) {
|
|
4464
4468
|
k.pop();
|
|
4465
4469
|
const r = k[k.length - 1], _ = s(I, F);
|
|
4466
|
-
return r.children.push(_), n.set(_.groupId, r),
|
|
4470
|
+
return r.children.push(_), n.set(_.groupId, r), N = r.children[r.children.length - 1], k.push(N), N;
|
|
4467
4471
|
}
|
|
4468
|
-
function m(F,
|
|
4472
|
+
function m(F, N, k, I, r, _) {
|
|
4469
4473
|
let V = F[F.length - 1];
|
|
4470
4474
|
if (!V)
|
|
4471
4475
|
throw new Error("The group path is out of range");
|
|
4472
|
-
const P =
|
|
4476
|
+
const P = N.get(I) || 0, T = N.get(k) || 0;
|
|
4473
4477
|
if (k < 0 || k === I)
|
|
4474
4478
|
return F[F.length - 1];
|
|
4475
4479
|
const O = P - T, B = r && r.relation !== void 0 ? r.relation : 1;
|
|
@@ -4489,17 +4493,17 @@ function At() {
|
|
|
4489
4493
|
function w(F) {
|
|
4490
4494
|
if (!F)
|
|
4491
4495
|
return;
|
|
4492
|
-
const
|
|
4493
|
-
if (
|
|
4494
|
-
const k =
|
|
4495
|
-
t.set(I.conditionId,
|
|
4496
|
+
const N = t.get(F.conditionId);
|
|
4497
|
+
if (N) {
|
|
4498
|
+
const k = N.items.findIndex((r) => r.conditionId === F.conditionId) + 1, I = a();
|
|
4499
|
+
t.set(I.conditionId, N), N.items.splice(k, 0, I), l();
|
|
4496
4500
|
}
|
|
4497
4501
|
}
|
|
4498
4502
|
function h(F) {
|
|
4499
|
-
const
|
|
4500
|
-
|
|
4503
|
+
const N = t.get(F.conditionId);
|
|
4504
|
+
N && (N.items = N.items.filter((k) => k.conditionId !== F.conditionId), t.delete(F.conditionId), j(), l());
|
|
4501
4505
|
}
|
|
4502
|
-
function x(F,
|
|
4506
|
+
function x(F, N, k, I) {
|
|
4503
4507
|
F.reduce((r, _) => {
|
|
4504
4508
|
const V = _.conditionId !== void 0, P = _.groupId !== void 0;
|
|
4505
4509
|
if (V) {
|
|
@@ -4511,20 +4515,20 @@ function At() {
|
|
|
4511
4515
|
I.push(T), r.groups.set(T.groupId, T);
|
|
4512
4516
|
}
|
|
4513
4517
|
return r;
|
|
4514
|
-
},
|
|
4518
|
+
}, N);
|
|
4515
4519
|
}
|
|
4516
|
-
function f(F,
|
|
4517
|
-
F && (F.items =
|
|
4520
|
+
function f(F, N, k, I, r) {
|
|
4521
|
+
F && (F.items = N.length ? F.items.filter((_) => !k.has(_.conditionId)) : F.items, F.children = I.length ? F.children.filter((_) => !r.has(_.groupId)) : F.children);
|
|
4518
4522
|
}
|
|
4519
|
-
function C(F,
|
|
4520
|
-
|
|
4523
|
+
function C(F, N, k) {
|
|
4524
|
+
N.forEach((I) => {
|
|
4521
4525
|
F.items.push(I), t.set(I.conditionId, F);
|
|
4522
4526
|
}), k.forEach((I) => {
|
|
4523
4527
|
F.children.push(I), n.set(I.groupId, F);
|
|
4524
4528
|
});
|
|
4525
4529
|
}
|
|
4526
4530
|
function S(F) {
|
|
4527
|
-
const
|
|
4531
|
+
const N = F[0], k = N.conditionId !== void 0 ? t.get(N.conditionId) : n.get(N.groupId), I = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, r = [], _ = [];
|
|
4528
4532
|
if (k) {
|
|
4529
4533
|
x(F, I, r, _), f(k, r, I.items, _, I.groups);
|
|
4530
4534
|
const V = s(k.relation, k.level + 1);
|
|
@@ -4532,8 +4536,8 @@ function At() {
|
|
|
4532
4536
|
}
|
|
4533
4537
|
}
|
|
4534
4538
|
function E(F) {
|
|
4535
|
-
const
|
|
4536
|
-
I && (I.children = I.children.filter((r) => r.groupId !== F.groupId), n.delete(F.groupId),
|
|
4539
|
+
const N = [...F.items], k = [...F.children], I = n.get(F.groupId);
|
|
4540
|
+
I && (I.children = I.children.filter((r) => r.groupId !== F.groupId), n.delete(F.groupId), N.forEach((r) => {
|
|
4537
4541
|
I.items.push(r), t.set(r.conditionId, I);
|
|
4538
4542
|
}), k.forEach((r) => {
|
|
4539
4543
|
I.children.push(r), n.set(r.groupId, I);
|
|
@@ -4544,24 +4548,24 @@ function At() {
|
|
|
4544
4548
|
}
|
|
4545
4549
|
let g;
|
|
4546
4550
|
function D(F) {
|
|
4547
|
-
const { relation:
|
|
4551
|
+
const { relation: N } = F;
|
|
4548
4552
|
return (F.children && F.children.length ? F.children.map((I, r, _) => {
|
|
4549
4553
|
const V = g(I);
|
|
4550
|
-
return V[0].lBracket = (V[0].lBracket || "") + "(", V[V.length - 1].rBracket = (V[V.length - 1].rBracket || "") + ")", V[V.length - 1].relation = r < _.length - 1 ?
|
|
4554
|
+
return V[0].lBracket = (V[0].lBracket || "") + "(", V[V.length - 1].rBracket = (V[V.length - 1].rBracket || "") + ")", V[V.length - 1].relation = r < _.length - 1 ? N : 0, V;
|
|
4551
4555
|
}) : []).flat();
|
|
4552
4556
|
}
|
|
4553
4557
|
g = (F = e.value) => {
|
|
4554
|
-
const { relation:
|
|
4558
|
+
const { relation: N } = F, k = F.items.map((r, _, V) => (r.lBracket = _ === 0 ? "(" : "", r.rBracket = _ === V.length - 1 ? ")" : "", r.relation = _ < V.length - 1 ? N || 1 : 0, r)), I = D(F);
|
|
4555
4559
|
return [...k, ...I];
|
|
4556
4560
|
};
|
|
4557
|
-
function
|
|
4558
|
-
const
|
|
4559
|
-
if (
|
|
4560
|
-
|
|
4561
|
-
}),
|
|
4562
|
-
const k =
|
|
4561
|
+
function j(F) {
|
|
4562
|
+
const N = F || e.value;
|
|
4563
|
+
if (N.children.length && N.children.forEach((k) => {
|
|
4564
|
+
j(k);
|
|
4565
|
+
}), N.level === 0 && !N.items.length && N.children.length === 1) {
|
|
4566
|
+
const k = N.children[0];
|
|
4563
4567
|
e.value.relation = k.relation, E(k);
|
|
4564
|
-
} else
|
|
4568
|
+
} else N.items.length === 0 && N.children.length <= 1 && E(N);
|
|
4565
4569
|
}
|
|
4566
4570
|
return {
|
|
4567
4571
|
addCondition: M,
|
|
@@ -4632,7 +4636,7 @@ const Ke = /* @__PURE__ */ te({
|
|
|
4632
4636
|
fields: l,
|
|
4633
4637
|
fieldMap: u,
|
|
4634
4638
|
loadFieldConfigs: y
|
|
4635
|
-
} = a, v =
|
|
4639
|
+
} = a, v = Rt(), {
|
|
4636
4640
|
addCondition: d,
|
|
4637
4641
|
changeGroupRelation: m,
|
|
4638
4642
|
getConditions: i,
|
|
@@ -4649,17 +4653,17 @@ const Ke = /* @__PURE__ */ te({
|
|
|
4649
4653
|
selectedItems: g,
|
|
4650
4654
|
toggleSelect: D
|
|
4651
4655
|
} = b, {
|
|
4652
|
-
getCompareOperators:
|
|
4656
|
+
getCompareOperators: j
|
|
4653
4657
|
} = gl(e, t, a);
|
|
4654
4658
|
y(!1), l.value = s(l.value), h(o.value);
|
|
4655
4659
|
function F(O) {
|
|
4656
|
-
var
|
|
4657
|
-
const B = ((
|
|
4660
|
+
var R;
|
|
4661
|
+
const B = ((R = u.get(O.fieldCode)) == null ? void 0 : R.editor) || {
|
|
4658
4662
|
type: "text"
|
|
4659
4663
|
};
|
|
4660
4664
|
O.value = E(B.type, void 0), t.emit("labelCodeChange", O);
|
|
4661
4665
|
}
|
|
4662
|
-
function
|
|
4666
|
+
function N(O, B) {
|
|
4663
4667
|
t.emit("compareTypeChange", B);
|
|
4664
4668
|
}
|
|
4665
4669
|
function k() {
|
|
@@ -4672,7 +4676,7 @@ const Ke = /* @__PURE__ */ te({
|
|
|
4672
4676
|
}
|
|
4673
4677
|
function r(O) {
|
|
4674
4678
|
return O.items.map((B) => {
|
|
4675
|
-
var
|
|
4679
|
+
var R;
|
|
4676
4680
|
return c("div", {
|
|
4677
4681
|
class: "condition-list-item",
|
|
4678
4682
|
key: B.conditionId
|
|
@@ -4692,14 +4696,14 @@ const Ke = /* @__PURE__ */ te({
|
|
|
4692
4696
|
"value-field": "value",
|
|
4693
4697
|
"text-field": "name",
|
|
4694
4698
|
"id-field": "id",
|
|
4695
|
-
data:
|
|
4699
|
+
data: j(B),
|
|
4696
4700
|
modelValue: B.compareType,
|
|
4697
4701
|
"onUpdate:modelValue": (L) => B.compareType = L,
|
|
4698
|
-
onChange: (L) =>
|
|
4702
|
+
onChange: (L) => N(L, B)
|
|
4699
4703
|
}, null)]), c("div", {
|
|
4700
4704
|
class: "condition-list-item-control mr-3"
|
|
4701
4705
|
}, [c(pl, {
|
|
4702
|
-
editor: (
|
|
4706
|
+
editor: (R = u.get(B.fieldCode)) == null ? void 0 : R.editor,
|
|
4703
4707
|
showLabel: !1,
|
|
4704
4708
|
modelValue: B.value.value,
|
|
4705
4709
|
"onUpdate:modelValue": (L) => B.value.value = L,
|
|
@@ -4891,7 +4895,7 @@ const bl = [
|
|
|
4891
4895
|
}
|
|
4892
4896
|
};
|
|
4893
4897
|
function Fl() {
|
|
4894
|
-
const e = p([]), t = /* @__PURE__ */ new Map(), { loadConditionGroup: n } =
|
|
4898
|
+
const e = p([]), t = /* @__PURE__ */ new Map(), { loadConditionGroup: n } = Rt(), o = /* @__PURE__ */ new Map([
|
|
4895
4899
|
["boolean", wl],
|
|
4896
4900
|
["datetime", _l],
|
|
4897
4901
|
["enum", Sl],
|
|
@@ -4929,7 +4933,7 @@ function Fl() {
|
|
|
4929
4933
|
}
|
|
4930
4934
|
return { apply: d, clearCondition: s, conditions: e, removeCondition: a };
|
|
4931
4935
|
}
|
|
4932
|
-
function
|
|
4936
|
+
function At(e, t) {
|
|
4933
4937
|
var f, C;
|
|
4934
4938
|
const { idField: n } = t, o = p(e.summary), a = p(e.group), s = p(((f = e.group) == null ? void 0 : f.groupFields) || []), l = p(((C = e.group) == null ? void 0 : C.enable) || !1), u = $(() => {
|
|
4935
4939
|
const S = o.value;
|
|
@@ -4940,16 +4944,16 @@ function Rt(e, t) {
|
|
|
4940
4944
|
}), v = /* @__PURE__ */ new Map();
|
|
4941
4945
|
let d = [], m = "";
|
|
4942
4946
|
function i(S, E, b, g, D) {
|
|
4943
|
-
const
|
|
4944
|
-
|
|
4947
|
+
const j = g[b];
|
|
4948
|
+
j && (E.reduce((F, N, k) => {
|
|
4945
4949
|
var _;
|
|
4946
|
-
const I = j
|
|
4950
|
+
const I = N[j];
|
|
4947
4951
|
let r = F.get(I);
|
|
4948
4952
|
if (!r) {
|
|
4949
4953
|
const V = u.value.reduce((P, T) => (P.set(T, 0), P), /* @__PURE__ */ new Map());
|
|
4950
4954
|
r = {
|
|
4951
|
-
field:
|
|
4952
|
-
title: ((_ = D.get(
|
|
4955
|
+
field: j,
|
|
4956
|
+
title: ((_ = D.get(j)) == null ? void 0 : _.title) || j,
|
|
4953
4957
|
value: I,
|
|
4954
4958
|
layer: b,
|
|
4955
4959
|
details: [],
|
|
@@ -4959,10 +4963,10 @@ function Rt(e, t) {
|
|
|
4959
4963
|
return u.value && u.value.forEach((V) => {
|
|
4960
4964
|
if (r) {
|
|
4961
4965
|
const P = r.groupSummaries.get(V) || 0;
|
|
4962
|
-
r.groupSummaries.set(V, P +
|
|
4966
|
+
r.groupSummaries.set(V, P + N[V]);
|
|
4963
4967
|
}
|
|
4964
|
-
}), r.details.push(
|
|
4965
|
-
}, S), b < g.length - 1 && S.forEach((F,
|
|
4968
|
+
}), r.details.push(N), F;
|
|
4969
|
+
}, S), b < g.length - 1 && S.forEach((F, N) => {
|
|
4966
4970
|
F.nestGroup = /* @__PURE__ */ new Map(), i(F.nestGroup, F.details, b + 1, g, D), F.details = [];
|
|
4967
4971
|
}));
|
|
4968
4972
|
}
|
|
@@ -4981,22 +4985,22 @@ function Rt(e, t) {
|
|
|
4981
4985
|
};
|
|
4982
4986
|
let D = 0;
|
|
4983
4987
|
if (E.push(g), b.nestGroup) {
|
|
4984
|
-
const
|
|
4985
|
-
E.push(...
|
|
4988
|
+
const j = w(b.nestGroup);
|
|
4989
|
+
E.push(...j), D += j.length;
|
|
4986
4990
|
}
|
|
4987
4991
|
if (b.details && b.details.length && (E.push(...b.details), D += b.details.length), y.value) {
|
|
4988
|
-
const
|
|
4992
|
+
const j = {
|
|
4989
4993
|
__fv_data_grid_group_field__: b.field,
|
|
4990
4994
|
__fv_data_grid_group_layer__: b.layer,
|
|
4991
4995
|
__fv_data_grid_group_summary__: !0
|
|
4992
4996
|
};
|
|
4993
|
-
|
|
4994
|
-
(F, [
|
|
4997
|
+
j[n.value] = `summary_of_${b.field}_${b.value}`, j[b.field] = Array.from(b.groupSummaries.entries()).reduce(
|
|
4998
|
+
(F, [N, k]) => `${F} ${N} total:${k} `,
|
|
4995
4999
|
""
|
|
4996
|
-
), E.push(
|
|
5000
|
+
), E.push(j);
|
|
4997
5001
|
}
|
|
4998
|
-
b.groupSummaries && b.groupSummaries.size && b.groupSummaries.forEach((
|
|
4999
|
-
g[F] =
|
|
5002
|
+
b.groupSummaries && b.groupSummaries.size && b.groupSummaries.forEach((j, F) => {
|
|
5003
|
+
g[F] = j;
|
|
5000
5004
|
}), g[n.value] = `group_of_${b.field}_${b.value}`, g[b.field] = M(b, D);
|
|
5001
5005
|
}), E.forEach((b, g) => {
|
|
5002
5006
|
b.__fv_data_index__ = g;
|
|
@@ -5074,8 +5078,8 @@ function Tl(e, t, n, o) {
|
|
|
5074
5078
|
function f(I, r) {
|
|
5075
5079
|
Array.from(r.keys()).forEach((_) => {
|
|
5076
5080
|
r.get(_).reduce((P, T) => {
|
|
5077
|
-
const O = T[s.value], B = I.get(T[s.value]),
|
|
5078
|
-
return
|
|
5081
|
+
const O = T[s.value], B = I.get(T[s.value]), R = I.get(_);
|
|
5082
|
+
return R && (R.children.set(O, B), R.children.set(O, B), B.parentId = _, B.parentIndex = R.index, B.parents.set(_, R)), P;
|
|
5079
5083
|
}, I);
|
|
5080
5084
|
});
|
|
5081
5085
|
}
|
|
@@ -5115,12 +5119,12 @@ function Tl(e, t, n, o) {
|
|
|
5115
5119
|
function D(I) {
|
|
5116
5120
|
return I[u.value] && !g(I);
|
|
5117
5121
|
}
|
|
5118
|
-
function
|
|
5122
|
+
function j(I) {
|
|
5119
5123
|
b(t.value);
|
|
5120
5124
|
const r = m(I), _ = d(I, r);
|
|
5121
5125
|
return I.forEach((V, P) => {
|
|
5122
|
-
var
|
|
5123
|
-
const T = V[s.value], O = _.has(T) ? (
|
|
5126
|
+
var R;
|
|
5127
|
+
const T = V[s.value], O = _.has(T) ? (R = _.get(T)) == null ? void 0 : R.map((L) => L.__fv_index__) : [], B = x(T, P);
|
|
5124
5128
|
V.__fv_graph_node__ = B, V.__fv_children_index__ = O, V.__fv_descendant_index__ = [...O], V.__fv_parents__ = /* @__PURE__ */ new Map(), D(V) && (V[l.value] = !0);
|
|
5125
5129
|
}), i(I), w(I, r), e.showLines && h(I), I;
|
|
5126
5130
|
}
|
|
@@ -5130,22 +5134,22 @@ function Tl(e, t, n, o) {
|
|
|
5130
5134
|
const O = v.get(T.parentId);
|
|
5131
5135
|
let B = _.value.length - 1;
|
|
5132
5136
|
if (O) {
|
|
5133
|
-
const
|
|
5134
|
-
if (
|
|
5137
|
+
const R = Array.from(O.children.keys()).indexOf(T.id);
|
|
5138
|
+
if (R === O.children.size - 1) {
|
|
5135
5139
|
const Q = Array.from(O.descendant.values())[O.descendant.size - 1];
|
|
5136
|
-
B = _.value.findIndex((
|
|
5140
|
+
B = _.value.findIndex((fe) => fe[s.value] === Q.id) + 1;
|
|
5137
5141
|
} else {
|
|
5138
|
-
const Q = Array.from(O.children.values())[
|
|
5139
|
-
B = _.value.findIndex((
|
|
5142
|
+
const Q = Array.from(O.children.values())[R + 1];
|
|
5143
|
+
B = _.value.findIndex((fe) => fe[s.value] === Q.id);
|
|
5140
5144
|
}
|
|
5141
5145
|
r[u.value] = !1, r[y.value] = O.id, _.value.splice(B, 0, r);
|
|
5142
5146
|
}
|
|
5143
5147
|
}
|
|
5144
5148
|
}
|
|
5145
|
-
function
|
|
5149
|
+
function N(I, r, _) {
|
|
5146
5150
|
const V = _.value[I], P = V[s.value];
|
|
5147
5151
|
if (v.get(P)) {
|
|
5148
|
-
const B = _.value.findIndex((
|
|
5152
|
+
const B = _.value.findIndex((R) => R[s.value] === P) + 1;
|
|
5149
5153
|
V[u.value] = !0, V[l.value] = !1, r[u.value] = !1, r[y.value] = P, _.value.splice(B, 0, r);
|
|
5150
5154
|
}
|
|
5151
5155
|
}
|
|
@@ -5154,12 +5158,12 @@ function Tl(e, t, n, o) {
|
|
|
5154
5158
|
P.unshift(_);
|
|
5155
5159
|
const T = v.get(V.parentId);
|
|
5156
5160
|
if (T && (T.children.delete(_), T.children.size === 0)) {
|
|
5157
|
-
const B = r.find((
|
|
5161
|
+
const B = r.find((R) => R[s.value] === V.parentId);
|
|
5158
5162
|
B[u.value] = !1, B[l.value] = !1;
|
|
5159
5163
|
}
|
|
5160
5164
|
return r.filter((B) => P.indexOf(B.id) === -1);
|
|
5161
5165
|
}
|
|
5162
|
-
return { generateHierarchyData:
|
|
5166
|
+
return { generateHierarchyData: j, hasRealChildren: g, insertSibling: F, insertChild: N, shouldStratifyData: a, trimmedOriginalData: k };
|
|
5163
5167
|
}
|
|
5164
5168
|
const kl = {
|
|
5165
5169
|
showCloseButton: { type: Boolean, default: !0 },
|
|
@@ -5410,36 +5414,36 @@ Oe.install = (e) => {
|
|
|
5410
5414
|
};
|
|
5411
5415
|
function El(e, t, n, o, a) {
|
|
5412
5416
|
var rt;
|
|
5413
|
-
const { pageSize: s, total: l, shouldRenderPagination: u, currentPage: y, mode: v } = a, d = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), h = p([]), x = p([]), f = Fl(), C =
|
|
5414
|
-
generateHierarchyData:
|
|
5417
|
+
const { pageSize: s, total: l, shouldRenderPagination: u, currentPage: y, mode: v } = a, d = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), h = p([]), x = p([]), f = Fl(), C = At(e, o), { generateGroupData: S, groupFields: E, shouldGroupingData: b } = C, g = p(e.data), D = Tl(e, g, n, o), {
|
|
5418
|
+
generateHierarchyData: j,
|
|
5415
5419
|
hasRealChildren: F,
|
|
5416
|
-
insertSibling:
|
|
5420
|
+
insertSibling: N,
|
|
5417
5421
|
insertChild: k,
|
|
5418
5422
|
shouldStratifyData: I,
|
|
5419
5423
|
trimmedOriginalData: r
|
|
5420
5424
|
} = D, { idField: _, reviseIdentifyField: V } = o, P = p(e.newDataItem), T = p(e.data), O = p(e.data), { flatTreeData: B } = Ll(e);
|
|
5421
5425
|
if (e.data && ((rt = e.data[0]) != null && rt.children)) {
|
|
5422
|
-
const
|
|
5423
|
-
g.value =
|
|
5426
|
+
const A = Ve(e.data);
|
|
5427
|
+
g.value = A, T.value = A, O.value = A;
|
|
5424
5428
|
}
|
|
5425
|
-
const
|
|
5426
|
-
const
|
|
5427
|
-
return (
|
|
5429
|
+
const R = p(e.summary), L = $(() => {
|
|
5430
|
+
const A = R.value;
|
|
5431
|
+
return (A == null ? void 0 : A.groupFields) || [];
|
|
5428
5432
|
});
|
|
5429
5433
|
let Q = /* @__PURE__ */ new Map();
|
|
5430
|
-
const
|
|
5431
|
-
function Ve(
|
|
5432
|
-
return B(
|
|
5434
|
+
const re = $(() => T.value.length), fe = p(e.pagination), Ne = new Lt(), ke = $(() => u.value ? v.value === "server" ? 0 : (y.value - 1) * s.value : 0), Ie = $(() => u.value ? v.value === "server" ? Math.min(s.value, l.value, re.value) : Math.min(ke.value + s.value, l.value, re.value) : re.value);
|
|
5435
|
+
function Ve(A) {
|
|
5436
|
+
return B(A);
|
|
5433
5437
|
}
|
|
5434
5438
|
function Se() {
|
|
5435
5439
|
T.value = g.value, b.value && (T.value = S(E.value, g.value, t)), Q = L.value.reduce((ie, ce) => (ie.set(ce, 0), ie), Q);
|
|
5436
|
-
const
|
|
5440
|
+
const A = ke.value, K = Ie.value;
|
|
5437
5441
|
let Y = 0;
|
|
5438
5442
|
const ne = [];
|
|
5439
5443
|
if (T.value.length) {
|
|
5440
5444
|
V(T.value);
|
|
5441
5445
|
const ie = _.value !== e.idField;
|
|
5442
|
-
for (let ce =
|
|
5446
|
+
for (let ce = A; ce < K; ce++) {
|
|
5443
5447
|
const le = T.value[ce];
|
|
5444
5448
|
le.__fv_data_grid_group_row__ ? (Y = 0, le.__fv_data_index__ = "") : le.__fv_data_grid_group_summary__ ? le.__fv_data_index__ = "" : (Y++, u.value ? le.__fv_data_index__ = Y + (y.value - 1) * s.value : le.__fv_data_index__ = Y), le.__fv_index__ = ce, ie && (le[_.value] = ce), L.value.forEach((Z) => {
|
|
5445
5449
|
const me = Q.get(Z) || 0;
|
|
@@ -5447,11 +5451,11 @@ function El(e, t, n, o, a) {
|
|
|
5447
5451
|
}), ne.push(le);
|
|
5448
5452
|
}
|
|
5449
5453
|
}
|
|
5450
|
-
return I.value &&
|
|
5454
|
+
return I.value && j(ne), O.value = [...ne], ne;
|
|
5451
5455
|
}
|
|
5452
|
-
const
|
|
5453
|
-
function se(
|
|
5454
|
-
const ie = (Y ? Se() : [...O.value]).filter((Z) => f.apply(Z)), ce =
|
|
5456
|
+
const ue = p(Se());
|
|
5457
|
+
function se(A, K, Y = !1) {
|
|
5458
|
+
const ie = (Y ? Se() : [...O.value]).filter((Z) => f.apply(Z)), ce = A && A.length ? ie.filter((Z) => A.reduce((me, ge) => me && ge.filter(Z), !0)) : ie, le = K && K.length ? ce.sort((Z, me) => {
|
|
5455
5459
|
const ge = [...K], He = ge.shift();
|
|
5456
5460
|
let ze = He.compare(Z[He.field], me[He.field]);
|
|
5457
5461
|
for (; ze === 0 && ge.length !== 0; ) {
|
|
@@ -5460,142 +5464,142 @@ function El(e, t, n, o, a) {
|
|
|
5460
5464
|
}
|
|
5461
5465
|
return ze;
|
|
5462
5466
|
}) : ce;
|
|
5463
|
-
return
|
|
5467
|
+
return ue.value = le.map((Z, me) => {
|
|
5464
5468
|
if (Z.__fv_data_grid_group_row__) {
|
|
5465
5469
|
const ge = `group_of_${Z.__fv_data_grid_group_field__}_${Z.__fv_data_grid_group_value__}`;
|
|
5466
5470
|
Z.__fv_data_grid_group_collapse__ = !!d.get(ge);
|
|
5467
5471
|
}
|
|
5468
5472
|
return Z.__fv_index__ = me, Z;
|
|
5469
|
-
}),
|
|
5473
|
+
}), ue.value;
|
|
5470
5474
|
}
|
|
5471
|
-
function Pe(
|
|
5472
|
-
return w.clear(), x.value =
|
|
5475
|
+
function Pe(A) {
|
|
5476
|
+
return w.clear(), x.value = A, x.value.reduce((K, Y) => (K.set(Y.field, Y), K), w), se([], x.value);
|
|
5473
5477
|
}
|
|
5474
|
-
function $e(
|
|
5475
|
-
return w.set(
|
|
5478
|
+
function $e(A, K) {
|
|
5479
|
+
return w.set(A, K), x.value = Array.from(w.values()), se([], x.value);
|
|
5476
5480
|
}
|
|
5477
|
-
function
|
|
5478
|
-
return w.delete(
|
|
5481
|
+
function Re(A) {
|
|
5482
|
+
return w.delete(A), x.value = Array.from(w.values()), se([], x.value);
|
|
5479
5483
|
}
|
|
5480
|
-
function
|
|
5481
|
-
return m.set(
|
|
5484
|
+
function Ae(A, K) {
|
|
5485
|
+
return m.set(A, K), h.value = Array.from(m.values()), se([], Array.from(w.values()));
|
|
5482
5486
|
}
|
|
5483
|
-
function H(
|
|
5484
|
-
return m.delete(
|
|
5487
|
+
function H(A) {
|
|
5488
|
+
return m.delete(A), h.value = Array.from(m.values()), se([], Array.from(w.values()), !0);
|
|
5485
5489
|
}
|
|
5486
5490
|
function J() {
|
|
5487
5491
|
return m.clear(), h.value = [], se([], Array.from(w.values()), !0);
|
|
5488
5492
|
}
|
|
5489
|
-
function he(
|
|
5490
|
-
const Y = `group_of_${
|
|
5493
|
+
function he(A, K) {
|
|
5494
|
+
const Y = `group_of_${A}_${K}`;
|
|
5491
5495
|
d.set(Y, !0);
|
|
5492
|
-
const ne = (ie) => ie[
|
|
5493
|
-
return i.set(`collapse_${
|
|
5494
|
-
field:
|
|
5495
|
-
fieldName:
|
|
5496
|
+
const ne = (ie) => ie[A] !== K;
|
|
5497
|
+
return i.set(`collapse_${A}_${K}`, {
|
|
5498
|
+
field: A,
|
|
5499
|
+
fieldName: A,
|
|
5496
5500
|
fieldType: "string",
|
|
5497
5501
|
filterValue: K,
|
|
5498
5502
|
filter: ne
|
|
5499
5503
|
}), se(Array.from(i.values()), Array.from(w.values()));
|
|
5500
5504
|
}
|
|
5501
|
-
function xe(
|
|
5502
|
-
const Y = `group_of_${
|
|
5503
|
-
return d.set(Y, !1), i.delete(`collapse_${
|
|
5505
|
+
function xe(A, K) {
|
|
5506
|
+
const Y = `group_of_${A}_${K}`;
|
|
5507
|
+
return d.set(Y, !1), i.delete(`collapse_${A}_${K}`), se(Array.from(i.values()), Array.from(w.values()), !0);
|
|
5504
5508
|
}
|
|
5505
|
-
function Le(
|
|
5506
|
-
const K =
|
|
5509
|
+
function Le(A) {
|
|
5510
|
+
const K = A.raw[_.value], Y = (ne) => !ne.__fv_parents__.has(K);
|
|
5507
5511
|
M.set(`fold_${K}`, {
|
|
5508
5512
|
field: "id",
|
|
5509
5513
|
fieldName: "id",
|
|
5510
5514
|
fieldType: "string",
|
|
5511
5515
|
filterValue: String(K),
|
|
5512
5516
|
filter: Y
|
|
5513
|
-
}), se(Array.from(M.values()), Array.from(w.values())),
|
|
5517
|
+
}), se(Array.from(M.values()), Array.from(w.values())), j(ue.value);
|
|
5514
5518
|
}
|
|
5515
|
-
function it(
|
|
5516
|
-
const K =
|
|
5519
|
+
function it(A) {
|
|
5520
|
+
const K = A[_.value];
|
|
5517
5521
|
M.delete(`fold_${K}`);
|
|
5518
5522
|
}
|
|
5519
|
-
function Gt(
|
|
5520
|
-
it(
|
|
5523
|
+
function Gt(A) {
|
|
5524
|
+
it(A.raw), se(Array.from(M.values()), Array.from(w.values()), !0), j(ue.value);
|
|
5521
5525
|
}
|
|
5522
|
-
function
|
|
5523
|
-
const
|
|
5524
|
-
|
|
5526
|
+
function pe() {
|
|
5527
|
+
const A = Se();
|
|
5528
|
+
ue.value = A, e.hierarchy && (se(Array.from(M.values()), Array.from(w.values())), j(ue.value));
|
|
5525
5529
|
}
|
|
5526
|
-
function qt(
|
|
5530
|
+
function qt(A) {
|
|
5527
5531
|
var K;
|
|
5528
|
-
if (
|
|
5529
|
-
const Y = Ve(
|
|
5532
|
+
if (A && ((K = A[0]) != null && K.children)) {
|
|
5533
|
+
const Y = Ve(A);
|
|
5530
5534
|
g.value = Y, T.value = Y, O.value = Y;
|
|
5531
5535
|
} else
|
|
5532
|
-
g.value =
|
|
5533
|
-
|
|
5536
|
+
g.value = A, T.value = A, O.value = A;
|
|
5537
|
+
pe();
|
|
5534
5538
|
}
|
|
5535
|
-
function Wt(
|
|
5536
|
-
return (
|
|
5539
|
+
function Wt(A, K, Y) {
|
|
5540
|
+
return (A && A.length ? ue.value.filter((ie, ce) => A.reduce((le, Z) => le && Z.filter(ie), !0)) : ue.value).slice(K, Y);
|
|
5537
5541
|
}
|
|
5538
|
-
function Ut(
|
|
5539
|
-
(
|
|
5542
|
+
function Ut(A) {
|
|
5543
|
+
(A - 1) * s.value <= re.value && pe();
|
|
5540
5544
|
}
|
|
5541
|
-
function Kt(
|
|
5542
|
-
g.value.push(Te(
|
|
5545
|
+
function Kt(A) {
|
|
5546
|
+
g.value.push(Te(A)), ue.value = Se();
|
|
5543
5547
|
}
|
|
5544
|
-
function Yt(
|
|
5545
|
-
if (!(
|
|
5548
|
+
function Yt(A = 0) {
|
|
5549
|
+
if (!(A > -1))
|
|
5546
5550
|
return !1;
|
|
5547
5551
|
const Y = P.value();
|
|
5548
|
-
e.hierarchy ?
|
|
5552
|
+
e.hierarchy ? N(A, Y, g) : g.value.splice(A, 0, Y), pe();
|
|
5549
5553
|
}
|
|
5550
|
-
function Xt(
|
|
5551
|
-
if (!(
|
|
5554
|
+
function Xt(A = 0) {
|
|
5555
|
+
if (!(A > -1 && e.hierarchy))
|
|
5552
5556
|
return !1;
|
|
5553
|
-
const Y = P.value(), ne = g.value[
|
|
5554
|
-
it(ne), k(
|
|
5557
|
+
const Y = P.value(), ne = g.value[A];
|
|
5558
|
+
it(ne), k(A, Y, g), pe();
|
|
5555
5559
|
}
|
|
5556
|
-
function Jt(
|
|
5557
|
-
const K =
|
|
5558
|
-
g.value.splice(K, 1),
|
|
5560
|
+
function Jt(A) {
|
|
5561
|
+
const K = A ? A - 1 : 0;
|
|
5562
|
+
g.value.splice(K, 1), pe();
|
|
5559
5563
|
}
|
|
5560
|
-
function Qt(
|
|
5561
|
-
const K = g.value.findIndex((Y) => Y[_.value] ===
|
|
5562
|
-
K !== -1 && (g.value.splice(K, 1),
|
|
5564
|
+
function Qt(A) {
|
|
5565
|
+
const K = g.value.findIndex((Y) => Y[_.value] === A);
|
|
5566
|
+
K !== -1 && (g.value.splice(K, 1), pe());
|
|
5563
5567
|
}
|
|
5564
|
-
function Zt(
|
|
5565
|
-
const K =
|
|
5568
|
+
function Zt(A) {
|
|
5569
|
+
const K = A > -1 ? g.value[A] : null;
|
|
5566
5570
|
if (!(K && K.deletable !== !1))
|
|
5567
5571
|
return !1;
|
|
5568
|
-
g.value = r(K, g.value),
|
|
5572
|
+
g.value = r(K, g.value), pe();
|
|
5569
5573
|
}
|
|
5570
5574
|
function en() {
|
|
5571
|
-
const
|
|
5572
|
-
return se(
|
|
5575
|
+
const A = i.size > 0 ? Array.from(i.values()) : [];
|
|
5576
|
+
return se(A, Array.from(w.values()));
|
|
5573
5577
|
}
|
|
5574
|
-
function tn(
|
|
5575
|
-
|
|
5578
|
+
function tn(A) {
|
|
5579
|
+
fe.value && (fe.value.size = A, pe());
|
|
5576
5580
|
}
|
|
5577
|
-
function nn(
|
|
5578
|
-
const Y = g.value[Number(
|
|
5579
|
-
Y.editable !== !1 ? (Y.name = K,
|
|
5581
|
+
function nn(A, K) {
|
|
5582
|
+
const Y = g.value[Number(A) - 1];
|
|
5583
|
+
Y.editable !== !1 ? (Y.name = K, pe()) : Ne.show({
|
|
5580
5584
|
showCloseButton: !1,
|
|
5581
5585
|
timeout: 3e3,
|
|
5582
5586
|
animate: "fadeIn",
|
|
5583
5587
|
toasts: [{ type: "string", title: "提示", msg: "当前节点禁止编辑" }]
|
|
5584
5588
|
});
|
|
5585
5589
|
}
|
|
5586
|
-
function on(
|
|
5587
|
-
return
|
|
5590
|
+
function on(A) {
|
|
5591
|
+
return A.map((Y) => {
|
|
5588
5592
|
const ne = O.value.findIndex((ie) => ie[_.value] === Y);
|
|
5589
5593
|
return ne > -1 ? O.value[ne] : null;
|
|
5590
5594
|
}).filter((Y) => Y != null);
|
|
5591
5595
|
}
|
|
5592
5596
|
return {
|
|
5593
|
-
addFilter:
|
|
5597
|
+
addFilter: Ae,
|
|
5594
5598
|
addNewDataItem: Kt,
|
|
5595
5599
|
addSorter: $e,
|
|
5596
5600
|
changePageSizeTo: tn,
|
|
5597
5601
|
collapse: he,
|
|
5598
|
-
dataView:
|
|
5602
|
+
dataView: ue,
|
|
5599
5603
|
editDataItem: nn,
|
|
5600
5604
|
expand: xe,
|
|
5601
5605
|
filters: h,
|
|
@@ -5606,7 +5610,7 @@ function El(e, t, n, o, a) {
|
|
|
5606
5610
|
load: qt,
|
|
5607
5611
|
navigatePageTo: Ut,
|
|
5608
5612
|
summaries: Q,
|
|
5609
|
-
totalItems:
|
|
5613
|
+
totalItems: re,
|
|
5610
5614
|
insertNewDataItem: Yt,
|
|
5611
5615
|
insertNewChildDataItem: Xt,
|
|
5612
5616
|
removeAllFilter: J,
|
|
@@ -5614,12 +5618,12 @@ function El(e, t, n, o, a) {
|
|
|
5614
5618
|
removeDataItemById: Qt,
|
|
5615
5619
|
removeFilter: H,
|
|
5616
5620
|
removeHierarchyDataItem: Zt,
|
|
5617
|
-
removeSorter:
|
|
5621
|
+
removeSorter: Re,
|
|
5618
5622
|
rawView: O,
|
|
5619
5623
|
refresh: en,
|
|
5620
5624
|
setSorters: Pe,
|
|
5621
5625
|
sorters: x,
|
|
5622
|
-
updateDataView:
|
|
5626
|
+
updateDataView: pe,
|
|
5623
5627
|
unFold: Gt,
|
|
5624
5628
|
startIndex: ke,
|
|
5625
5629
|
endIndex: Ie,
|
|
@@ -5650,8 +5654,8 @@ function Bl(e, t, n, o, a, s, l, u) {
|
|
|
5650
5654
|
const { dataView: E } = n, b = [];
|
|
5651
5655
|
if (E.value.length > 0) {
|
|
5652
5656
|
const g = S ? Date.now().toString() : "";
|
|
5653
|
-
for (let D = x,
|
|
5654
|
-
const F = E.value[D],
|
|
5657
|
+
for (let D = x, j = 0; D <= f; D++, j++) {
|
|
5658
|
+
const F = E.value[D], N = E.value[D - 1] || C, k = b[j - 1], I = N ? (N.__fv_data_position__ || 0) + (N.__fv_data_height__ || 0) : 0, _ = M(F)(F, N, k, D, I, t.value);
|
|
5655
5659
|
_.refreshKey = g, b.push(_);
|
|
5656
5660
|
}
|
|
5657
5661
|
}
|
|
@@ -5724,47 +5728,47 @@ function Ml(e, t, n) {
|
|
|
5724
5728
|
function Dl(e, t, n, o, a, s) {
|
|
5725
5729
|
var f, C;
|
|
5726
5730
|
const l = p(e.rowOption), u = ((f = l.value) == null ? void 0 : f.height) || 28, y = ((C = l.value) == null ? void 0 : C.wrapContent) || !1, { idField: v } = o, { collapseField: d } = n, { updateRowPosition: m } = a, { createCellByColumn: i } = s;
|
|
5727
|
-
function M(S, E, b, g, D,
|
|
5728
|
-
var Q;
|
|
5731
|
+
function M(S, E, b, g, D, j) {
|
|
5732
|
+
var Q, re;
|
|
5729
5733
|
const {
|
|
5730
5734
|
__fv_data_grid_group_field__: F,
|
|
5731
|
-
__fv_data_grid_group_value__:
|
|
5735
|
+
__fv_data_grid_group_value__: N,
|
|
5732
5736
|
__fv_data_index__: k
|
|
5733
|
-
} = b, I = b.__fv_data_grid_group_layer__ || b.__fv_parents__ ? (Q = b.__fv_parents__) == null ? void 0 : Q.size : 0, r = typeof b.parent == "number" ? Number(b.parent) : -1, _ = b.__fv_data_grid_group_collapse__ || b[d.value], V = b.__fv_visible__ === void 0 ? !0 : b.__fv_visible__, P = b.__fv_checked__, T = b.__fv_indeterminate__, O = g && g[v.value] === b.parent, B = g && g.parent === b.parent,
|
|
5737
|
+
} = b, I = b.__fv_data_grid_group_layer__ || b.__fv_parents__ ? (Q = b.__fv_parents__) == null ? void 0 : Q.size : 0, r = typeof b.parent == "number" ? Number(b.parent) : -1, _ = b.__fv_data_grid_group_collapse__ || b[d.value], V = b.__fv_visible__ === void 0 ? !0 : b.__fv_visible__, P = b.__fv_checked__, T = b.__fv_indeterminate__, O = g && g[v.value] === b.parent, B = g && g.parent === b.parent, R = O && D && (D.collapse || !D.visible) || B && D && !D.visible, L = {
|
|
5734
5738
|
collapse: _,
|
|
5735
5739
|
data: {},
|
|
5736
5740
|
dataIndex: k,
|
|
5737
5741
|
groupField: F,
|
|
5738
|
-
groupValue:
|
|
5742
|
+
groupValue: N,
|
|
5739
5743
|
layer: I,
|
|
5740
5744
|
index: E,
|
|
5741
5745
|
parentIndex: r,
|
|
5742
5746
|
pre: g,
|
|
5743
|
-
top:
|
|
5747
|
+
top: j,
|
|
5744
5748
|
type: S,
|
|
5745
5749
|
raw: b,
|
|
5746
5750
|
checked: P,
|
|
5747
5751
|
indeterminate: T,
|
|
5748
|
-
setRef: (
|
|
5749
|
-
L.ref =
|
|
5752
|
+
setRef: (fe) => {
|
|
5753
|
+
L.ref = fe;
|
|
5750
5754
|
},
|
|
5751
|
-
visible: V && !
|
|
5752
|
-
status:
|
|
5755
|
+
visible: V && !R,
|
|
5756
|
+
status: ve.initial
|
|
5753
5757
|
};
|
|
5754
|
-
return g || (b.__fv_data_position__ = 0), y || (L.height = u, b.__fv_data_height__ = L.height, m(L, b)), L;
|
|
5758
|
+
return g || (b.__fv_data_position__ = 0), y || (L.height = u, b.__fv_data_height__ = L.height, m(L, b)), (re = l.value) != null && re.customRowStatus && (l.value.customRowStatus(L), b.__fv_collapse__ = L.collapse, b.__fv_visible__ = L.visible), L;
|
|
5755
5759
|
}
|
|
5756
|
-
function w(S, E, b, g, D,
|
|
5757
|
-
const F = M(je.data, D, E, b, g,
|
|
5758
|
-
return S.forEach((
|
|
5759
|
-
F.data[
|
|
5760
|
+
function w(S, E, b, g, D, j) {
|
|
5761
|
+
const F = M(je.data, D, E, b, g, j);
|
|
5762
|
+
return S.forEach((N, k) => {
|
|
5763
|
+
F.data[N.field] = i(N, D, E, F, g);
|
|
5760
5764
|
}), F;
|
|
5761
5765
|
}
|
|
5762
5766
|
function h(S, E, b, g, D) {
|
|
5763
5767
|
return Object.assign(S, { index: E, dataIndex: b, top: g, pre: D });
|
|
5764
5768
|
}
|
|
5765
|
-
function x(S, E, b, g, D,
|
|
5766
|
-
const F = S.__fv_data_index__,
|
|
5767
|
-
return k === null ? w(
|
|
5769
|
+
function x(S, E, b, g, D, j) {
|
|
5770
|
+
const F = S.__fv_data_index__, N = S[v.value], k = t.getEditingSnapshot(N);
|
|
5771
|
+
return k === null ? w(j, S, E, b, g, D) : h(k, g, F, D, b);
|
|
5768
5772
|
}
|
|
5769
5773
|
return { createEmptyRow: M, createNewRowFromDataItem: w, renderDataRow: x };
|
|
5770
5774
|
}
|
|
@@ -5837,32 +5841,32 @@ function Pl(e, t) {
|
|
|
5837
5841
|
function w(b) {
|
|
5838
5842
|
Object.values(b.data).filter((g) => g.mode === oe.editable && g.field !== "__commands__").forEach((g) => {
|
|
5839
5843
|
g.mode = oe.editing;
|
|
5840
|
-
}), b.status =
|
|
5844
|
+
}), b.status = ve.editing, y = b;
|
|
5841
5845
|
}
|
|
5842
5846
|
function h(b, g) {
|
|
5843
5847
|
Object.values(b.data).filter((D) => D.mode === oe.editing).forEach((D) => {
|
|
5844
5848
|
g ? D.accept() : D.cancel(), D.mode = oe.editable;
|
|
5845
|
-
}), b.status =
|
|
5849
|
+
}), b.status = ve.initial, y === b && (y = null);
|
|
5846
5850
|
}
|
|
5847
5851
|
function x(b) {
|
|
5848
5852
|
o.value && a.value.editMode === "row" && y !== b && (y && h(y, !1), w(b));
|
|
5849
5853
|
}
|
|
5850
5854
|
function f(b) {
|
|
5851
|
-
h(b, !0), b.status =
|
|
5855
|
+
h(b, !0), b.status = ve.initial;
|
|
5852
5856
|
}
|
|
5853
5857
|
function C(b) {
|
|
5854
|
-
h(b, !1), b.status =
|
|
5858
|
+
h(b, !1), b.status = ve.initial;
|
|
5855
5859
|
}
|
|
5856
5860
|
function S(b, g, D) {
|
|
5857
|
-
const
|
|
5858
|
-
type: l.get(
|
|
5861
|
+
const j = g.dataType, F = g.editor || {
|
|
5862
|
+
type: l.get(j) || "input-group"
|
|
5859
5863
|
};
|
|
5860
5864
|
return !s.value && F.type === "text" && (F.type = "input-group"), F ? c(vl, {
|
|
5861
5865
|
focusOnCreated: e.focusOnEditingCell,
|
|
5862
5866
|
selectOnCreated: e.selectOnEditingCell,
|
|
5863
5867
|
editor: F,
|
|
5864
5868
|
modelValue: b.editingData,
|
|
5865
|
-
"onUpdate:modelValue": (
|
|
5869
|
+
"onUpdate:modelValue": (N) => b.editingData = N
|
|
5866
5870
|
}, null) : b.data;
|
|
5867
5871
|
}
|
|
5868
5872
|
return {
|
|
@@ -5884,10 +5888,10 @@ function $l(e) {
|
|
|
5884
5888
|
}
|
|
5885
5889
|
return { idField: t, reviseIdentifyField: n };
|
|
5886
5890
|
}
|
|
5887
|
-
function
|
|
5891
|
+
function Rl(e, t, n, o, a) {
|
|
5888
5892
|
const { idField: s } = n, l = p(""), u = p(e.selection.enableSelectRow ?? !0), y = p(e.selection.multiSelect ?? !1), v = p(e.selection.multiSelectMode), d = p(e.selection.showCheckbox), m = p(e.selection.showSelectAll), i = p(e.selectionValues);
|
|
5889
|
-
X(() => e.selection.showSelectAll, (B,
|
|
5890
|
-
B !==
|
|
5893
|
+
X(() => e.selection.showSelectAll, (B, R) => {
|
|
5894
|
+
B !== R && (m.value = B);
|
|
5891
5895
|
});
|
|
5892
5896
|
function M() {
|
|
5893
5897
|
return t.getSelectionItems(i.value);
|
|
@@ -5907,10 +5911,10 @@ function Al(e, t, n, o, a) {
|
|
|
5907
5911
|
a.emit("selectionChange", B);
|
|
5908
5912
|
}
|
|
5909
5913
|
function b() {
|
|
5910
|
-
o.value.forEach((
|
|
5911
|
-
|
|
5912
|
-
}), w().forEach((
|
|
5913
|
-
|
|
5914
|
+
o.value.forEach((R) => {
|
|
5915
|
+
R.checked = !1, R.indeterminate = !1, R.raw.__fv_checked__ = !1, R.raw.__fv_indeterminate__ = !1;
|
|
5916
|
+
}), w().forEach((R) => {
|
|
5917
|
+
R.checked = !0, R.raw.__fv_checked__ = !0;
|
|
5914
5918
|
});
|
|
5915
5919
|
}
|
|
5916
5920
|
X(() => o.value, () => {
|
|
@@ -5924,7 +5928,7 @@ function Al(e, t, n, o, a) {
|
|
|
5924
5928
|
function D(B) {
|
|
5925
5929
|
return B.raw[s.value] || "";
|
|
5926
5930
|
}
|
|
5927
|
-
function
|
|
5931
|
+
function j(B) {
|
|
5928
5932
|
return i.value.findIndex((L) => L === D(B));
|
|
5929
5933
|
}
|
|
5930
5934
|
function F() {
|
|
@@ -5934,37 +5938,37 @@ function Al(e, t, n, o, a) {
|
|
|
5934
5938
|
L.__fv_checked__ = !1;
|
|
5935
5939
|
}), i.value = [];
|
|
5936
5940
|
}
|
|
5937
|
-
function
|
|
5938
|
-
const
|
|
5939
|
-
|
|
5941
|
+
function N(B) {
|
|
5942
|
+
const R = B.raw;
|
|
5943
|
+
R.__fv_checked__ = !0, R.__fv_indeterminate__ = !1;
|
|
5940
5944
|
const L = new Set(i.value);
|
|
5941
|
-
L.add(
|
|
5945
|
+
L.add(R[s.value]), i.value = Array.from(L.values()), B.checked = !0, B.indeterminate = !1, l.value = B.raw[s.value];
|
|
5942
5946
|
}
|
|
5943
5947
|
function k(B) {
|
|
5944
|
-
const
|
|
5945
|
-
|
|
5948
|
+
const R = B.raw;
|
|
5949
|
+
R.__fv_checked__ = !1, R.__fv_indeterminate__ = !1, i.value = i.value.filter((L) => L !== R[s.value]), B.checked = !1, B.indeterminate = !1, l.value = "";
|
|
5946
5950
|
}
|
|
5947
5951
|
function I(B) {
|
|
5948
|
-
const
|
|
5949
|
-
|
|
5952
|
+
const R = B.raw;
|
|
5953
|
+
R.__fv_checked__ = !1, R.__fv_indeterminate__ = !0, i.value = i.value.filter((L) => L !== R[s.value]), B.checked = !1, B.indeterminate = !0;
|
|
5950
5954
|
}
|
|
5951
5955
|
function r(B) {
|
|
5952
|
-
g.value && F(), B.checked ? k(B) :
|
|
5956
|
+
g.value && F(), B.checked ? k(B) : N(B), E();
|
|
5953
5957
|
}
|
|
5954
5958
|
function _(B) {
|
|
5955
|
-
B.raw[s.value] !== l.value && (F(),
|
|
5959
|
+
B.raw[s.value] !== l.value && (F(), N(B), E());
|
|
5956
5960
|
}
|
|
5957
5961
|
function V(B) {
|
|
5958
|
-
const
|
|
5959
|
-
|
|
5962
|
+
const R = o.value.find((L) => L.raw[s.value] === B);
|
|
5963
|
+
R && _(R);
|
|
5960
5964
|
}
|
|
5961
5965
|
function P() {
|
|
5962
|
-
o.value.forEach((B) =>
|
|
5966
|
+
o.value.forEach((B) => N(B)), E();
|
|
5963
5967
|
}
|
|
5964
5968
|
function T() {
|
|
5965
5969
|
i.value.splice(0, i.value.length), l.value = "", o.value.forEach((B) => {
|
|
5966
|
-
const
|
|
5967
|
-
|
|
5970
|
+
const R = B.raw;
|
|
5971
|
+
R.__fv_checked__ = !1, R.__fv_indeterminate__ = !1, B.checked = !1, B.indeterminate = !1;
|
|
5968
5972
|
}), E();
|
|
5969
5973
|
}
|
|
5970
5974
|
function O() {
|
|
@@ -5975,7 +5979,7 @@ function Al(e, t, n, o, a) {
|
|
|
5975
5979
|
currentSelectedDataId: l,
|
|
5976
5980
|
enableMultiSelect: y,
|
|
5977
5981
|
enableSelectRow: u,
|
|
5978
|
-
findIndexInSelectedItems:
|
|
5982
|
+
findIndexInSelectedItems: j,
|
|
5979
5983
|
getSelectedItems: M,
|
|
5980
5984
|
getSelectionRow: O,
|
|
5981
5985
|
indeterminate: I,
|
|
@@ -5984,7 +5988,7 @@ function Al(e, t, n, o, a) {
|
|
|
5984
5988
|
multiSelectOnClickRow: S,
|
|
5985
5989
|
multiSelectOnClickRowWithShift: C,
|
|
5986
5990
|
multiSelectOnlyOnCheck: f,
|
|
5987
|
-
select:
|
|
5991
|
+
select: N,
|
|
5988
5992
|
selectAll: P,
|
|
5989
5993
|
selectedValues: i,
|
|
5990
5994
|
selectItem: _,
|
|
@@ -5996,7 +6000,7 @@ function Al(e, t, n, o, a) {
|
|
|
5996
6000
|
unSelectAll: T
|
|
5997
6001
|
};
|
|
5998
6002
|
}
|
|
5999
|
-
function
|
|
6003
|
+
function Al(e) {
|
|
6000
6004
|
var u, y, v, d;
|
|
6001
6005
|
const t = $(() => {
|
|
6002
6006
|
var m;
|
|
@@ -6031,10 +6035,10 @@ const Hl = /* @__PURE__ */ te({
|
|
|
6031
6035
|
props: De,
|
|
6032
6036
|
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change"],
|
|
6033
6037
|
setup(e, t) {
|
|
6034
|
-
const n = p(), o = p(!0), a = p(!1), s = p([]), l = 0, u = p(e.columns), y = $l(e), v = Ol(e), d =
|
|
6035
|
-
getVisualData:
|
|
6038
|
+
const n = p(), o = p(!0), a = p(!1), s = p([]), l = 0, u = p(e.columns), y = $l(e), v = Ol(e), d = At(e, y), m = Al(e), i = El(e, /* @__PURE__ */ new Map(), v, y, m), M = Rl(e, i, y, s, t), w = Ft(e, n), h = p(), x = Fe("design-item-context"), f = st(h, x), C = $(() => i.dataView.value.length), S = Pl(e, y), E = ts(), b = Ml(e, {}, E), g = Dl(e, S, v, y, E, b), D = jl(e, y, b, g), j = Nl(e, y, b, g), F = Bl(e, u, i, C, l, g, D, j), {
|
|
6039
|
+
getVisualData: N
|
|
6036
6040
|
} = F;
|
|
6037
|
-
s.value =
|
|
6041
|
+
s.value = N(0, C.value + l - 1), de(() => {
|
|
6038
6042
|
h.value.componentInstance = f;
|
|
6039
6043
|
}), t.expose(f.value);
|
|
6040
6044
|
const k = $(() => {
|