@farris/ui-vue 1.8.5-beta.19 → 1.8.5-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/batch-editor/index.css +1 -1
- package/components/batch-editor/index.esm.js +80 -77
- package/components/batch-editor/index.umd.cjs +7 -7
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +80 -77
- package/components/button/index.umd.cjs +7 -7
- package/components/data-grid/index.esm.js +89 -86
- package/components/data-grid/index.umd.cjs +2 -2
- package/components/data-view/index.css +1 -1
- package/components/data-view/index.esm.js +174 -171
- package/components/data-view/index.umd.cjs +4 -4
- package/components/mapping-editor/index.esm.js +95 -92
- package/components/mapping-editor/index.umd.cjs +2 -2
- package/designer/data-grid/index.css +1 -1
- package/designer/data-grid/index.esm.js +5 -2
- package/designer/data-grid/index.umd.cjs +1 -1
- package/designer/farris-designer.all.esm.js +75 -72
- package/designer/farris-designer.all.umd.cjs +4 -4
- package/farris.all.esm.js +175 -172
- package/farris.all.umd.cjs +7 -7
- package/index.css +1 -1
- package/package.json +1 -1
- package/themes/default/farris-variables.css +1 -1
- package/themes/mano/farris-variables.css +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useCommonUtils as Et, resolveField as _n, useLocatorProps as Gn, getCustomClass as Mn, locatorAttrs as Nn, locatorChild as
|
|
2
|
-
import { ref as de, computed as le, reactive as
|
|
1
|
+
import { useCommonUtils as Et, resolveField as _n, useLocatorProps as Gn, getCustomClass as Mn, locatorAttrs as Nn, locatorChild as ut, withInstall as jn } from "../common/index.esm.js";
|
|
2
|
+
import { ref as de, computed as le, reactive as dt, watch as Ie, createVNode as f, mergeProps as we, isVNode as yt, Comment as It, Fragment as ct, createTextVNode as it, defineComponent as Dt, onMounted as An, nextTick as Hn, onUnmounted as Rn, provide as zn, getCurrentInstance as Ln } from "vue";
|
|
3
3
|
import { useResizeObserver as Wn } from "@vueuse/core";
|
|
4
4
|
import { isPlainObject as kt, cloneDeep as Bt } from "lodash-es";
|
|
5
5
|
import { locatorGridGroup as Vt, locatorGridRowId as _t, locatorGridRow as Gt, locatorGridCell as Mt, locatorChild as Nt, SETTING_COLUMN_FIELD as $n, COMMAND_COLUMN_FIELD as Un, resolveEnumDisplayText as jt, CellMode as At, SETTING_COLUMN_DATA_TYPE as Ye, COMMAND_COLUMN_DATA_TYPE as qe, useScreen as Yn, useIdentify as qn, useGroupData as Xn, useFilter as Jn, useHierarchy as Qn, useLoading as Zn, useDataView as Kn, usePagination as eo, useSelection as to, useDataViewContainerStyle as no, useCommandColumn as oo, useSettingColumn as ro, useColumn as io, useSort as ao, useGroupColumn as lo, useRow as uo, useEdit as so, useVisualDataBound as co, useVisualDataCell as fo, useVisualDataRow as mo, useVisualGroupRow as po, useVisualSummaryRow as vo, useVisualData as go, useCellContentStyle as yo, useCellPosition as bo, useSidebar as Co, useVirtualScroll as ho, useFitColumn as So, useFilterHistory as wo, useColumnFilter as Fo, useDragColumn as To, resolvePreviewFixedColumns as xo, getColumnHeader as Oo, getPagination as ko, getSidebar as Bo, getDisableMask as Po, getSummary as Eo, getHorizontalScrollbar as Io, getVerticalScrollbar as Do, getFilterPanel as Vo, getGroupPanel as _o, useAdapt as Go, useNavigation as Mo, getEmpty as No, ColumnSettingSolution as jo, refreshScrollAfterDataSourceLoad as Ao, applyReassignRowData as Ho } from "../data-view/index.esm.js";
|
|
@@ -918,7 +918,7 @@ const Gr = {
|
|
|
918
918
|
/** 双击表头列是否自适应内容宽度。 */
|
|
919
919
|
resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
|
|
920
920
|
};
|
|
921
|
-
function
|
|
921
|
+
function st(e) {
|
|
922
922
|
const n = e == null ? void 0 : e.fitColumns;
|
|
923
923
|
return n === !0 || typeof n == "object" && n !== null && "enable" in n && n.enable === !0;
|
|
924
924
|
}
|
|
@@ -1289,7 +1289,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1289
1289
|
} = Q, {
|
|
1290
1290
|
navigateOnKeyUp: fe,
|
|
1291
1291
|
navigateOnKeyDown: je
|
|
1292
|
-
} = B, Xe = (r) => (r || []).some((t) =>
|
|
1292
|
+
} = B, Xe = (r) => (r || []).some((t) => yt(t) ? !(t.type === It || t.type === ct && !Xe(t.children)) : !0) ? r : null, ue = (r) => {
|
|
1293
1293
|
var t, a, l;
|
|
1294
1294
|
return ((a = (t = r.column) == null ? void 0 : t.editor) == null ? void 0 : a.type) === "switch" || ((l = r.column) == null ? void 0 : l.dataType) === "boolean" ? {
|
|
1295
1295
|
display: "flex",
|
|
@@ -1300,12 +1300,12 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1300
1300
|
flexGrow: "1",
|
|
1301
1301
|
minWidth: 0
|
|
1302
1302
|
};
|
|
1303
|
-
}, me =
|
|
1303
|
+
}, me = dt({
|
|
1304
1304
|
"fv-grid-content-left-fixed": !0
|
|
1305
|
-
}), Se =
|
|
1305
|
+
}), Se = dt({
|
|
1306
1306
|
"fv-grid-content-right-fixed": !0
|
|
1307
1307
|
});
|
|
1308
|
-
|
|
1308
|
+
Ie([L, O], (r) => {
|
|
1309
1309
|
!r[0] && !r[1].length ? (me["fv-grid-content-left-fixed"] = !1, Se["fv-grid-content-right-fixed"] = !1) : (me["fv-grid-content-left-fixed"] = !0, Se["fv-grid-content-right-fixed"] = !0);
|
|
1310
1310
|
});
|
|
1311
1311
|
const {
|
|
@@ -1319,7 +1319,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1319
1319
|
function ke(r, t) {
|
|
1320
1320
|
r.stopPropagation(), t.collapse = !t.collapse, v.value = xe(t.collapse ? "collapse" : "expand", t, v.value);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function De(r, t, a) {
|
|
1323
1323
|
var p, V;
|
|
1324
1324
|
const l = [];
|
|
1325
1325
|
if (r.groupField) {
|
|
@@ -1392,7 +1392,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1392
1392
|
style: $(r),
|
|
1393
1393
|
onClick: (p) => oe(p, r),
|
|
1394
1394
|
onMouseover: (p) => J(p, r)
|
|
1395
|
-
}), [
|
|
1395
|
+
}), [De(r, t, l)]);
|
|
1396
1396
|
}
|
|
1397
1397
|
function Ze(r, t) {
|
|
1398
1398
|
const a = [];
|
|
@@ -1429,7 +1429,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1429
1429
|
function Re() {
|
|
1430
1430
|
return f("div", null, [it("******")]);
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function Ve(r) {
|
|
1433
1433
|
var l, p;
|
|
1434
1434
|
const t = !h(r.data) && !G(r.data) ? r.data.toString() : r.data;
|
|
1435
1435
|
return ((p = (l = r.column) == null ? void 0 : l.editor) == null ? void 0 : p.showType) === "password" ? Re() : r.showTips ? f("div", {
|
|
@@ -1451,7 +1451,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1451
1451
|
function Ke(r, t) {
|
|
1452
1452
|
return r.mode === At.editing ? f("div", {
|
|
1453
1453
|
style: ue(r)
|
|
1454
|
-
}, [r.getEditor(r)]) : r.column.columnTemplate ? Pe(r, t) : r.formatter ? He(r, t) :
|
|
1454
|
+
}, [r.getEditor(r)]) : r.column.columnTemplate ? Pe(r, t) : r.formatter ? He(r, t) : Ve(r);
|
|
1455
1455
|
}
|
|
1456
1456
|
function et(r, t, a, l, p) {
|
|
1457
1457
|
const V = _t(r, e.idField);
|
|
@@ -1499,7 +1499,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
function ze(r, t) {
|
|
1501
1501
|
var l;
|
|
1502
|
-
const a = (l = r.column) != null && l.columnTemplate ? Pe(r, t) : r.formatter ? He(r, t) :
|
|
1502
|
+
const a = (l = r.column) != null && l.columnTemplate ? Pe(r, t) : r.formatter ? He(r, t) : Ve(r);
|
|
1503
1503
|
return f("div", {
|
|
1504
1504
|
class: k(r),
|
|
1505
1505
|
style: s(r)
|
|
@@ -1540,7 +1540,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1540
1540
|
style: Je.value
|
|
1541
1541
|
}, [Ce(ae.value.primaryColumns.filter((r) => r.visible))])]);
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function _e() {
|
|
1544
1544
|
return f("div", {
|
|
1545
1545
|
ref: b,
|
|
1546
1546
|
class: Se
|
|
@@ -1552,12 +1552,12 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1552
1552
|
style: Ae.value
|
|
1553
1553
|
}, [Ce(ae.value.rightColumns.filter((r) => r.visible))])]);
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function Ge() {
|
|
1556
1556
|
const r = [];
|
|
1557
|
-
return he.value && r.push(ve()), r.push(nt()), se.value && r.push(
|
|
1557
|
+
return he.value && r.push(ve()), r.push(nt()), se.value && r.push(_e()), r;
|
|
1558
1558
|
}
|
|
1559
1559
|
return {
|
|
1560
|
-
renderDataArea:
|
|
1560
|
+
renderDataArea: Ge
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
1563
|
const Wr = /* @__PURE__ */ Dt({
|
|
@@ -1688,14 +1688,14 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1688
1688
|
hasRightFixedColumn: se
|
|
1689
1689
|
} = Q, fe = le(() => {
|
|
1690
1690
|
var a;
|
|
1691
|
-
if (e.displayType !== "Card" || (((a = e.columns) == null ? void 0 : a.length) ?? 0) === 0 || e.fit &&
|
|
1691
|
+
if (e.displayType !== "Card" || (((a = e.columns) == null ? void 0 : a.length) ?? 0) === 0 || e.fit && st(e.columnOption))
|
|
1692
1692
|
return;
|
|
1693
1693
|
const t = ae.value.primaryColumnsWidth || 0;
|
|
1694
1694
|
return t > 0 ? `${t}px` : void 0;
|
|
1695
1695
|
}), {
|
|
1696
1696
|
navigateOnKeyUp: je,
|
|
1697
1697
|
navigateOnKeyDown: Xe
|
|
1698
|
-
} = B, ue = (t) => (t || []).some((a) =>
|
|
1698
|
+
} = B, ue = (t) => (t || []).some((a) => yt(a) ? !(a.type === It || a.type === ct && !ue(a.children)) : !0) ? t : null, me = (t) => {
|
|
1699
1699
|
var a, l, p;
|
|
1700
1700
|
return ((l = (a = t.column) == null ? void 0 : a.editor) == null ? void 0 : l.type) === "switch" || ((p = t.column) == null ? void 0 : p.dataType) === "boolean" ? {
|
|
1701
1701
|
display: "flex",
|
|
@@ -1706,12 +1706,12 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1706
1706
|
flexGrow: "1",
|
|
1707
1707
|
minWidth: 0
|
|
1708
1708
|
};
|
|
1709
|
-
}, Se =
|
|
1709
|
+
}, Se = dt({
|
|
1710
1710
|
"fv-grid-content-left-fixed": !0
|
|
1711
|
-
}), ye =
|
|
1711
|
+
}), ye = dt({
|
|
1712
1712
|
"fv-grid-content-right-fixed": !0
|
|
1713
1713
|
});
|
|
1714
|
-
|
|
1714
|
+
Ie([O, te], (t) => {
|
|
1715
1715
|
!t[0] && !t[1].length ? (Se["fv-grid-content-left-fixed"] = !1, ye["fv-grid-content-right-fixed"] = !1) : (Se["fv-grid-content-left-fixed"] = !0, ye["fv-grid-content-right-fixed"] = !0);
|
|
1716
1716
|
});
|
|
1717
1717
|
const {
|
|
@@ -1722,7 +1722,7 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1722
1722
|
rightFixedGridDataStyle: Ae,
|
|
1723
1723
|
rightFixedGridMergedDataStyle: ke
|
|
1724
1724
|
} = C;
|
|
1725
|
-
function
|
|
1725
|
+
function De(t, a) {
|
|
1726
1726
|
t.stopPropagation(), a.collapse = !a.collapse, v.value = xe(a.collapse ? "collapse" : "expand", a, v.value);
|
|
1727
1727
|
}
|
|
1728
1728
|
function Qe(t, a) {
|
|
@@ -1740,7 +1740,7 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1740
1740
|
zIndex: 10
|
|
1741
1741
|
}
|
|
1742
1742
|
}, P ? Nt(e.id, "group", t.groupField, t.groupValue, "expand") : {}, {
|
|
1743
|
-
onClick: (H) =>
|
|
1743
|
+
onClick: (H) => De(H, t)
|
|
1744
1744
|
}), [f("span", {
|
|
1745
1745
|
class: A(t)
|
|
1746
1746
|
}, null)]));
|
|
@@ -1854,13 +1854,13 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1854
1854
|
class: U(t)
|
|
1855
1855
|
}, [t.formatter(t, a)]);
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function Ve() {
|
|
1858
1858
|
return f("div", null, [it("******")]);
|
|
1859
1859
|
}
|
|
1860
1860
|
function Pe(t) {
|
|
1861
1861
|
var p, V;
|
|
1862
1862
|
const a = !G(t.data) && !L(t.data) ? t.data.toString() : t.data;
|
|
1863
|
-
return ((V = (p = t.column) == null ? void 0 : p.editor) == null ? void 0 : V.showType) === "password" ?
|
|
1863
|
+
return ((V = (p = t.column) == null ? void 0 : p.editor) == null ? void 0 : V.showType) === "password" ? Ve() : t.showTips ? f("div", {
|
|
1864
1864
|
class: U(t),
|
|
1865
1865
|
title: a
|
|
1866
1866
|
}, [a]) : f("div", {
|
|
@@ -1901,8 +1901,8 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1901
1901
|
onMouseover: (R) => ge(R, t),
|
|
1902
1902
|
onMouseout: (R) => Fe(R, t)
|
|
1903
1903
|
}), [Object.values(t.data).filter((R) => a[R.field] && R.rowSpan === 1).map((R) => {
|
|
1904
|
-
var at, ot,
|
|
1905
|
-
const
|
|
1904
|
+
var at, ot, Me;
|
|
1905
|
+
const ft = n.slots.cellTemplate && ue(n.slots.cellTemplate({
|
|
1906
1906
|
cell: R,
|
|
1907
1907
|
row: t
|
|
1908
1908
|
})), pe = ne(t, R, a);
|
|
@@ -1922,7 +1922,7 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1922
1922
|
}), [f("div", {
|
|
1923
1923
|
class: s(R),
|
|
1924
1924
|
style: X(R)
|
|
1925
|
-
}, [
|
|
1925
|
+
}, [ft ? (Me = (ot = n.slots).cellTemplate) == null ? void 0 : Me.call(ot, {
|
|
1926
1926
|
cell: R,
|
|
1927
1927
|
row: t
|
|
1928
1928
|
}) : et(R, t)])]);
|
|
@@ -1938,7 +1938,7 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1938
1938
|
}
|
|
1939
1939
|
function Ee(t, a, l) {
|
|
1940
1940
|
var H, ee;
|
|
1941
|
-
const p = t.height || ((H = e.rowOption) == null ? void 0 : H.height) || 28, w = e.displayType === "Card" && (((ee = e.columns) == null ? void 0 : ee.length) ?? 0) > 0 && !(e.fit &&
|
|
1941
|
+
const p = t.height || ((H = e.rowOption) == null ? void 0 : H.height) || 28, w = e.displayType === "Card" && (((ee = e.columns) == null ? void 0 : ee.length) ?? 0) > 0 && !(e.fit && st(e.columnOption)), P = f(Wr, {
|
|
1942
1942
|
columns: c.value,
|
|
1943
1943
|
fields: l,
|
|
1944
1944
|
mainTitle: e.cardMainTitle,
|
|
@@ -1990,7 +1990,7 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1990
1990
|
...fe.value ? {
|
|
1991
1991
|
minWidth: fe.value
|
|
1992
1992
|
} : {},
|
|
1993
|
-
...
|
|
1993
|
+
...st(e.columnOption) && e.fit ? {
|
|
1994
1994
|
maxWidth: "100%"
|
|
1995
1995
|
} : {}
|
|
1996
1996
|
} : {}
|
|
@@ -2025,7 +2025,7 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
2025
2025
|
return w || H.length > 0 && (P = H.map((E) => h(E))), (!l || Object.keys(l).length === 0) && (l = j(P)), ve[p.type](p, l, V, P, w, H);
|
|
2026
2026
|
});
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function _e() {
|
|
2029
2029
|
var a;
|
|
2030
2030
|
if (e.displayType !== "Card")
|
|
2031
2031
|
return;
|
|
@@ -2045,11 +2045,11 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
2045
2045
|
overflow: "visible"
|
|
2046
2046
|
};
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2048
|
+
function Ge() {
|
|
2049
2049
|
return f("div", {
|
|
2050
2050
|
ref: o,
|
|
2051
2051
|
class: "fv-grid-content-primary",
|
|
2052
|
-
style:
|
|
2052
|
+
style: _e()
|
|
2053
2053
|
}, [f("div", {
|
|
2054
2054
|
class: "fv-grid-data",
|
|
2055
2055
|
style: Je.value
|
|
@@ -2057,14 +2057,14 @@ function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
2057
2057
|
}
|
|
2058
2058
|
function r() {
|
|
2059
2059
|
const t = [];
|
|
2060
|
-
return t.push(
|
|
2060
|
+
return t.push(Ge()), t;
|
|
2061
2061
|
}
|
|
2062
2062
|
return {
|
|
2063
2063
|
renderDataArea: r
|
|
2064
2064
|
};
|
|
2065
2065
|
}
|
|
2066
2066
|
function Ur(e) {
|
|
2067
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2067
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !yt(e);
|
|
2068
2068
|
}
|
|
2069
2069
|
const Yr = /* @__PURE__ */ Dt({
|
|
2070
2070
|
name: "FDataGrid",
|
|
@@ -2093,7 +2093,7 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2093
2093
|
return o.displayType === "Card" && (((i = o.columns) == null ? void 0 : i.length) ?? 0) === 0;
|
|
2094
2094
|
}), he = le(() => {
|
|
2095
2095
|
var i;
|
|
2096
|
-
return o.displayType === "Card" && (((i = o.columns) == null ? void 0 : i.length) ?? 0) > 0 && !!o.fit &&
|
|
2096
|
+
return o.displayType === "Card" && (((i = o.columns) == null ? void 0 : i.length) ?? 0) > 0 && !!o.fit && st(o.columnOption);
|
|
2097
2097
|
});
|
|
2098
2098
|
le(() => {
|
|
2099
2099
|
const i = xe.value;
|
|
@@ -2141,9 +2141,9 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2141
2141
|
updateColumnRenderContext: Je
|
|
2142
2142
|
} = ue;
|
|
2143
2143
|
Se(s, me);
|
|
2144
|
-
const Oe = lo(y, ye), be = uo(y, b, A, v), re = so(y, b, v, be, O), Ae = co(y, s, B), ke = fo(y, re, Ae),
|
|
2144
|
+
const Oe = lo(y, ye), be = uo(y, b, A, v), re = so(y, b, v, be, O), Ae = co(y, s, B), ke = fo(y, re, Ae), De = mo(y, s, re, I, v, Ae, ke, B), Qe = po(y, v, ke, De), Ze = vo(y, v, ke, De), Be = go(y, C, s, Te, F, De, Qe, Ze), {
|
|
2145
2145
|
getVisualData: He
|
|
2146
|
-
} = Be, Re = yo(ye),
|
|
2146
|
+
} = Be, Re = yo(ye), Ve = bo(y, ye, B, d), Pe = Co(y, A), {
|
|
2147
2147
|
sidebarWidth: Ke,
|
|
2148
2148
|
showSidebarCheckBox: et
|
|
2149
2149
|
} = Pe, Y = ho(y, s, O, ye, Be, Te, F, Ke, B, d, re, j), {
|
|
@@ -2153,9 +2153,9 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2153
2153
|
viewPortWidth: Ce,
|
|
2154
2154
|
resetScroll: ve,
|
|
2155
2155
|
updateVisibleRowsOnLatestVisibleScope: nt
|
|
2156
|
-
} = Y,
|
|
2157
|
-
calculateColumnsSize:
|
|
2158
|
-
} =
|
|
2156
|
+
} = Y, _e = So(y, ye, c, Ce, Oe), {
|
|
2157
|
+
calculateColumnsSize: Ge
|
|
2158
|
+
} = _e, r = wo(), t = Fo(c, L, s, r, Y), a = To(y, b, ue, s, Oe, ne, Y), l = le(() => {
|
|
2159
2159
|
const i = {
|
|
2160
2160
|
"fv-grid": !0,
|
|
2161
2161
|
"fv-grid-bordered": o.showBorder,
|
|
@@ -2186,15 +2186,15 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2186
2186
|
renderGridHeader: ee,
|
|
2187
2187
|
renderGridColumnResizeOverlay: E,
|
|
2188
2188
|
shouldShowHeader: R
|
|
2189
|
-
} = Oo(y, b, c, G, L, ue, s, a, t, $, r,
|
|
2190
|
-
renderDataGridPagination:
|
|
2189
|
+
} = Oo(y, b, c, G, L, ue, s, a, t, $, r, _e, Oe, A, Pe, me, Y, Ce, O, N, H), {
|
|
2190
|
+
renderDataGridPagination: ft
|
|
2191
2191
|
} = ko(y, b, s, Y, X, A), {
|
|
2192
2192
|
renderDataGridSidebar: pe
|
|
2193
2193
|
} = Bo(y, be, A, Pe, Y), {
|
|
2194
2194
|
renderDisableMask: at
|
|
2195
2195
|
} = Po(), {
|
|
2196
2196
|
renderDataGridSummary: ot,
|
|
2197
|
-
summaryPosition:
|
|
2197
|
+
summaryPosition: Me
|
|
2198
2198
|
} = Eo(y, s, ue), {
|
|
2199
2199
|
renderHorizontalScrollbar: rt
|
|
2200
2200
|
} = Io(y, c, Y), {
|
|
@@ -2205,19 +2205,22 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2205
2205
|
renderGroupPanel: Wt
|
|
2206
2206
|
} = _o(y, s, a, ne, Y);
|
|
2207
2207
|
let Le = null, We = null;
|
|
2208
|
-
function
|
|
2208
|
+
function lt() {
|
|
2209
2209
|
D.value && (We !== null && cancelAnimationFrame(We), We = requestAnimationFrame(() => {
|
|
2210
2210
|
We = null;
|
|
2211
2211
|
const i = O.value;
|
|
2212
|
-
i.length &&
|
|
2212
|
+
i.length && Ae.recalculateRowHeights(i) && (O.value = [...i]);
|
|
2213
2213
|
}));
|
|
2214
2214
|
}
|
|
2215
|
+
Ie(() => O.value.length, () => {
|
|
2216
|
+
lt();
|
|
2217
|
+
});
|
|
2215
2218
|
function $t() {
|
|
2216
2219
|
var m;
|
|
2217
2220
|
if (!c.value)
|
|
2218
2221
|
return;
|
|
2219
2222
|
const i = Math.ceil(c.value.clientHeight / B.value);
|
|
2220
|
-
i > S.value && (S.value = i, nt()), ze.value = ((m = h.value) == null ? void 0 : m.clientHeight) || 0, Ee.value = c.value.clientWidth || 0, h.value && (Ce.value = h.value.clientWidth),
|
|
2223
|
+
i > S.value && (S.value = i, nt()), ze.value = ((m = h.value) == null ? void 0 : m.clientHeight) || 0, Ee.value = c.value.clientWidth || 0, h.value && (Ce.value = h.value.clientWidth), Ge(), lt();
|
|
2221
2224
|
}
|
|
2222
2225
|
function Ut() {
|
|
2223
2226
|
Le !== null && cancelAnimationFrame(Le), Le = requestAnimationFrame(() => {
|
|
@@ -2225,7 +2228,7 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2225
2228
|
});
|
|
2226
2229
|
}
|
|
2227
2230
|
An(() => {
|
|
2228
|
-
c.value && (S.value = Math.max(Math.ceil(c.value.clientHeight / B.value), S.value), O.value = He(0, Te.value + F - 1), Wn(c.value, Ut),
|
|
2231
|
+
c.value && (S.value = Math.max(Math.ceil(c.value.clientHeight / B.value), S.value), O.value = He(0, Te.value + F - 1), Wn(c.value, Ut), Ge(), lt(), Hn(() => {
|
|
2229
2232
|
c.value && (Ee.value = c.value.clientWidth), h.value && (Ce.value = h.value.clientWidth, ze.value = h.value.clientHeight);
|
|
2230
2233
|
})), Z.value && T();
|
|
2231
2234
|
}), Rn(() => {
|
|
@@ -2266,23 +2269,23 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2266
2269
|
});
|
|
2267
2270
|
});
|
|
2268
2271
|
}
|
|
2269
|
-
|
|
2272
|
+
Ie(() => o.editable, () => {
|
|
2270
2273
|
bt(C.value);
|
|
2271
|
-
}),
|
|
2274
|
+
}), Ie([() => o.mergeCell, () => o.mergeFields, () => o.mergeCellRule], () => {
|
|
2272
2275
|
ve();
|
|
2273
2276
|
}, {
|
|
2274
2277
|
deep: !0
|
|
2275
2278
|
});
|
|
2276
2279
|
function $e(i) {
|
|
2277
|
-
i && (C.value = i, fe(C), bt(C.value), o.showSetting && je(C), Je(C.value), Se(s, me),
|
|
2280
|
+
i && (C.value = i, fe(C), bt(C.value), o.showSetting && je(C), Je(C.value), Se(s, me), Ge());
|
|
2278
2281
|
}
|
|
2279
2282
|
function en() {
|
|
2280
2283
|
A.emptyCurrentRowId();
|
|
2281
2284
|
}
|
|
2282
|
-
|
|
2285
|
+
Ie(() => o.showSetting, (i, m) => {
|
|
2283
2286
|
i !== m && (i ? je(C) : Xe(C), $e(C.value));
|
|
2284
2287
|
});
|
|
2285
|
-
function
|
|
2288
|
+
function mt(i) {
|
|
2286
2289
|
X.updatePagination(i);
|
|
2287
2290
|
}
|
|
2288
2291
|
function Ct(i, m) {
|
|
@@ -2293,26 +2296,26 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2293
2296
|
savedOffsetY: _,
|
|
2294
2297
|
resetScroll: ve,
|
|
2295
2298
|
scrollTo: Y.scrollTo
|
|
2296
|
-
}), O.value.length || (J.value = []), et.value && ce.value && ge();
|
|
2299
|
+
}), lt(), O.value.length || (J.value = []), et.value && ce.value && ge();
|
|
2297
2300
|
}
|
|
2298
2301
|
}
|
|
2299
|
-
|
|
2302
|
+
Ie(s.shouldGroupingData, (i, m) => {
|
|
2300
2303
|
i !== m && (s.updateDataView(), ve());
|
|
2301
|
-
}),
|
|
2304
|
+
}), Ie(() => o.columns, (i) => {
|
|
2302
2305
|
if (o.showSetting && o.enableColumnSettingSolution) {
|
|
2303
2306
|
$e(C.value);
|
|
2304
2307
|
return;
|
|
2305
2308
|
}
|
|
2306
2309
|
$e(i);
|
|
2307
2310
|
});
|
|
2308
|
-
function
|
|
2311
|
+
function pt(i) {
|
|
2309
2312
|
be.activeRowById(i);
|
|
2310
2313
|
}
|
|
2311
|
-
const tn = Go(A, s, $, C, X, v, ue, me, $e, Ct,
|
|
2314
|
+
const tn = Go(A, s, $, C, X, v, ue, me, $e, Ct, mt);
|
|
2312
2315
|
function nn(i, m = {
|
|
2313
2316
|
isCurrent: !0
|
|
2314
2317
|
}) {
|
|
2315
|
-
m != null && m.isCurrent &&
|
|
2318
|
+
m != null && m.isCurrent && pt(i), A.selectItemById(i);
|
|
2316
2319
|
}
|
|
2317
2320
|
function on(i) {
|
|
2318
2321
|
const m = v.idField.value, x = O.value.find((_) => _.raw[m] === i);
|
|
@@ -2356,7 +2359,7 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2356
2359
|
function mn(i, m = {
|
|
2357
2360
|
clearCurrent: !0
|
|
2358
2361
|
}) {
|
|
2359
|
-
m != null && m.clearCurrent &&
|
|
2362
|
+
m != null && m.clearCurrent && pt(""), A.unSelectItemByIds(i);
|
|
2360
2363
|
}
|
|
2361
2364
|
function ht() {
|
|
2362
2365
|
A.clearSelection();
|
|
@@ -2374,7 +2377,7 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2374
2377
|
Y.scrollRowIntoView(i);
|
|
2375
2378
|
}
|
|
2376
2379
|
function bn() {
|
|
2377
|
-
A.keepSelectingOnPaging.value || ht(), s.updateVisibleDataSummary(O.value),
|
|
2380
|
+
A.keepSelectingOnPaging.value || ht(), s.updateVisibleDataSummary(O.value), mt({
|
|
2378
2381
|
total: s.dataView.value.length,
|
|
2379
2382
|
index: 1
|
|
2380
2383
|
});
|
|
@@ -2406,8 +2409,8 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2406
2409
|
}
|
|
2407
2410
|
return -1;
|
|
2408
2411
|
}
|
|
2409
|
-
const
|
|
2410
|
-
activeRowById:
|
|
2412
|
+
const vt = {
|
|
2413
|
+
activeRowById: pt,
|
|
2411
2414
|
selectRowById: rn,
|
|
2412
2415
|
addNewDataItem: Yt,
|
|
2413
2416
|
addNewDataItemAtLast: qt,
|
|
@@ -2420,7 +2423,7 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2420
2423
|
selectItemByIds: an,
|
|
2421
2424
|
updateColumns: $e,
|
|
2422
2425
|
updateDataSource: Ct,
|
|
2423
|
-
updatePagination:
|
|
2426
|
+
updatePagination: mt,
|
|
2424
2427
|
getVisibleData: ln,
|
|
2425
2428
|
getVisibleDataByIds: un,
|
|
2426
2429
|
getSelectedItems: dn,
|
|
@@ -2443,12 +2446,12 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2443
2446
|
forceUpdate: wn,
|
|
2444
2447
|
getDataIndexById: Fn
|
|
2445
2448
|
};
|
|
2446
|
-
n.expose(
|
|
2447
|
-
const St = Mo(y, b,
|
|
2449
|
+
n.expose(vt);
|
|
2450
|
+
const St = Mo(y, b, vt, ue, re, O), {
|
|
2448
2451
|
renderDataArea: Tn
|
|
2449
|
-
} = Lr(o, b, h, G, L, Re,
|
|
2452
|
+
} = Lr(o, b, h, G, L, Re, Ve, ue, re, ne, St, be, Be, Y, O, s), {
|
|
2450
2453
|
renderDataArea: xn
|
|
2451
|
-
} = $r(o, b, h, G, L, Re,
|
|
2454
|
+
} = $r(o, b, h, G, L, Re, Ve, ue, re, ne, St, be, Be, Y, O, s, C), gt = le(() => !O.value || !O.value.length), {
|
|
2452
2455
|
renderEmpty: wt
|
|
2453
2456
|
} = No(y, b), On = le(() => ({
|
|
2454
2457
|
"d-flex": !0,
|
|
@@ -2466,10 +2469,10 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2466
2469
|
useColumnComposition: ue,
|
|
2467
2470
|
dataView: s,
|
|
2468
2471
|
useFilterComposition: $,
|
|
2469
|
-
useFitColumnComposition:
|
|
2472
|
+
useFitColumnComposition: _e,
|
|
2470
2473
|
useSortComposition: me,
|
|
2471
2474
|
useVirtualScrollComposition: Y,
|
|
2472
|
-
dataGridComponentInstance:
|
|
2475
|
+
dataGridComponentInstance: vt
|
|
2473
2476
|
});
|
|
2474
2477
|
function Pn(i) {
|
|
2475
2478
|
let m;
|
|
@@ -2498,12 +2501,12 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2498
2501
|
function En(i, m) {
|
|
2499
2502
|
const x = {}, _ = {}, q = [], K = [], M = {};
|
|
2500
2503
|
Object.keys(m.data).filter((ie) => {
|
|
2501
|
-
var W,
|
|
2502
|
-
return ((W = m.data[ie].column) == null ? void 0 : W.dataType) !== qe && ((
|
|
2504
|
+
var W, Ne;
|
|
2505
|
+
return ((W = m.data[ie].column) == null ? void 0 : W.dataType) !== qe && ((Ne = m.data[ie].column) == null ? void 0 : Ne.dataType) !== Ye;
|
|
2503
2506
|
}).forEach((ie) => {
|
|
2504
|
-
var
|
|
2507
|
+
var Ne, Ue, Ot;
|
|
2505
2508
|
const W = m.data[ie];
|
|
2506
|
-
x[ie] = W.data, re.endEditByCell(W), _[ie] = W.data, q.push(W.column), K.push(W), M[ie] = (Ot = (Ue = (
|
|
2509
|
+
x[ie] = W.data, re.endEditByCell(W), _[ie] = W.data, q.push(W.column), K.push(W), M[ie] = (Ot = (Ue = (Ne = W.column) == null ? void 0 : Ne.editor) == null ? void 0 : Ue.context) == null ? void 0 : Ot.editor;
|
|
2507
2510
|
}), n.emit("endEditRow", {
|
|
2508
2511
|
row: m,
|
|
2509
2512
|
cells: K,
|
|
@@ -2516,15 +2519,15 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2516
2519
|
function In() {
|
|
2517
2520
|
const i = A.currentSelectedDataId.value, m = O.value.find((x) => x.raw[o.idField] === i);
|
|
2518
2521
|
return m ? f(Wo, {
|
|
2519
|
-
id:
|
|
2522
|
+
id: ut(o.id, "row-edit").id,
|
|
2520
2523
|
showHeader: !1,
|
|
2521
2524
|
modelValue: re.showRowEditPanel.value,
|
|
2522
2525
|
"onUpdate:modelValue": (x) => re.showRowEditPanel.value = x,
|
|
2523
2526
|
width: 600
|
|
2524
2527
|
}, {
|
|
2525
2528
|
default: () => Pn(m),
|
|
2526
|
-
footerTemplate: () => f(
|
|
2527
|
-
id:
|
|
2529
|
+
footerTemplate: () => f(ct, null, [f(Pt, {
|
|
2530
|
+
id: ut(o.id, "row-edit-cancel").id,
|
|
2528
2531
|
class: "mr-3",
|
|
2529
2532
|
type: "secondary",
|
|
2530
2533
|
onClick: (x) => {
|
|
@@ -2533,7 +2536,7 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2533
2536
|
}, {
|
|
2534
2537
|
default: () => [it("取消")]
|
|
2535
2538
|
}), f(Pt, {
|
|
2536
|
-
id:
|
|
2539
|
+
id: ut(o.id, "row-edit-ok").id,
|
|
2537
2540
|
onClick: (x) => {
|
|
2538
2541
|
En(x, m);
|
|
2539
2542
|
}
|
|
@@ -2556,7 +2559,7 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2556
2559
|
} : {
|
|
2557
2560
|
width: "max-content",
|
|
2558
2561
|
minWidth: "100%"
|
|
2559
|
-
}, m = R.value && C.value.length > 0 ? ee() : null, x = Ft(), _ =
|
|
2562
|
+
}, m = R.value && C.value.length > 0 ? ee() : null, x = Ft(), _ = gt.value ? wt() : null, q = ae.value || he.value, K = (((M = O.value) == null ? void 0 : M.length) ?? 0) > 0 ? "auto" : "visible";
|
|
2560
2563
|
return q ? f("div", {
|
|
2561
2564
|
style: {
|
|
2562
2565
|
...i,
|
|
@@ -2586,19 +2589,19 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2586
2589
|
}), Q = _.filter((M) => M.dataType === qe || M.dataType === Ye);
|
|
2587
2590
|
const q = _.filter((M) => M.dataType !== qe && M.dataType !== Ye), K = q.filter((M) => x.includes(M.id));
|
|
2588
2591
|
z = q.filter((M) => !x.includes(M.id)), K.sort((M, ie) => {
|
|
2589
|
-
const W = i.findIndex((Ue) => Ue.id === M.id),
|
|
2590
|
-
return W -
|
|
2592
|
+
const W = i.findIndex((Ue) => Ue.id === M.id), Ne = i.findIndex((Ue) => Ue.id === ie.id);
|
|
2593
|
+
return W - Ne;
|
|
2591
2594
|
}), m === void 0 ? Oe.applyHeaderGroups(void 0) : Oe.applyHeaderGroups(m), $e(K);
|
|
2592
2595
|
}
|
|
2593
2596
|
return () => {
|
|
2594
2597
|
var i, m;
|
|
2595
|
-
return o.visible && f(
|
|
2598
|
+
return o.visible && f(ct, null, [f("div", we({
|
|
2596
2599
|
ref: g
|
|
2597
2600
|
}, Nn(o.id), {
|
|
2598
2601
|
class: l.value,
|
|
2599
2602
|
style: xe.value,
|
|
2600
2603
|
onWheel: tt
|
|
2601
|
-
}), [c.value && Wt(), c.value && !d.value && R.value && C.value.length > 0 && ee(), c.value && (
|
|
2604
|
+
}), [c.value && Wt(), c.value && !d.value && R.value && C.value.length > 0 && ee(), c.value && (Me.value === "top" || Me.value === "both") && ot(), f("div", {
|
|
2602
2605
|
ref: c,
|
|
2603
2606
|
class: p.value,
|
|
2604
2607
|
style: V.value,
|
|
@@ -2608,12 +2611,12 @@ const Yr = /* @__PURE__ */ Dt({
|
|
|
2608
2611
|
onMouseleave: (x) => {
|
|
2609
2612
|
x.stopPropagation(), te.value !== "always" && j.value && !d.value && (j.value = !1);
|
|
2610
2613
|
}
|
|
2611
|
-
}, [c.value && d.value ? Dn() : [c.value && !d.value && pe(O), c.value && Ft(), c.value &&
|
|
2614
|
+
}, [c.value && d.value ? Dn() : [c.value && !d.value && pe(O), c.value && Ft(), c.value && gt.value && !d.value && wt()], c.value && rt(), c.value && !gt.value && Lt()]), c.value && (Me.value === "bottom" || Me.value === "both") && !d.value && ot(), (U.value || oe.value) && !d.value && f("div", {
|
|
2612
2615
|
class: On.value,
|
|
2613
2616
|
style: kn.value
|
|
2614
2617
|
}, [oe.value && f("div", {
|
|
2615
2618
|
class: Bn.value
|
|
2616
|
-
}, [f("div",
|
|
2619
|
+
}, [f("div", ut(o.id, "selection-info"), ["已选:" + J.value.length, it(" 条")])]), U.value && ft()]), E(), Fe.value && at()]), u() && In(), o.enableColumnSettingSolution && f(jo, {
|
|
2617
2620
|
ref: w,
|
|
2618
2621
|
columns: [...C.value, ...z],
|
|
2619
2622
|
componentId: o.id,
|
|
@@ -2643,7 +2646,7 @@ export {
|
|
|
2643
2646
|
ii as filterOptions,
|
|
2644
2647
|
ri as groupOptions,
|
|
2645
2648
|
ai as headerOptions,
|
|
2646
|
-
|
|
2649
|
+
st as isFitColumnsEnabled,
|
|
2647
2650
|
fi as loadingOptions,
|
|
2648
2651
|
Gr as paginationOptions,
|
|
2649
2652
|
li as rowNumberOptions,
|