ia-table 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +403 -412
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var zc = Object.defineProperty;
|
|
|
3
3
|
var Ic = (e, t, i) => t in e ? zc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
4
4
|
var Wi = (e, t, i) => Ic(e, typeof t != "symbol" ? t + "" : t, i);
|
|
5
5
|
import * as rt from "react";
|
|
6
|
-
import Li, { useRef as
|
|
6
|
+
import Li, { useRef as Ke, useEffect as je, useCallback as at, createContext as Jl, useState as Ve, useContext as Ql, forwardRef as Fn, useReducer as Nc, useMemo as ht, useImperativeHandle as es, memo as Za } from "react";
|
|
7
7
|
import { createPortal as Xo } from "react-dom";
|
|
8
8
|
import dt from "prop-types";
|
|
9
9
|
var ln, mr, gr, sn = { exports: {} }, mo = {};
|
|
@@ -285,8 +285,8 @@ function Gc() {
|
|
|
285
285
|
}(I, te);
|
|
286
286
|
}
|
|
287
287
|
return function(ae, de, se, ie, me, Ie, Be) {
|
|
288
|
-
var
|
|
289
|
-
return Object.defineProperty(
|
|
288
|
+
var He = { $$typeof: o, type: ae, key: de, ref: se, props: Be, _owner: Ie, _store: {} };
|
|
289
|
+
return Object.defineProperty(He._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(He, "_self", { configurable: !1, enumerable: !1, writable: !1, value: ie }), Object.defineProperty(He, "_source", { configurable: !1, enumerable: !1, writable: !1, value: me }), Object.freeze && (Object.freeze(He.props), Object.freeze(He)), He;
|
|
290
290
|
}(W, L, V, N, O, ne.current, I);
|
|
291
291
|
}
|
|
292
292
|
var ke, Se = v.ReactCurrentOwner, Ce = v.ReactDebugCurrentFrame;
|
|
@@ -377,7 +377,7 @@ Check the top-level render call using <` + I + ">.");
|
|
|
377
377
|
typeof D.getDefaultProps != "function" || D.getDefaultProps.isReactClassApproved || h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Ye(W, m, D, O, N, R) {
|
|
381
381
|
var I = function(de) {
|
|
382
382
|
return typeof de == "string" || typeof de == "function" || de === e.Fragment || de === l || de === A || de === n || de === _ || de === d || de === x || typeof de == "object" && de !== null && (de.$$typeof === p || de.$$typeof === u || de.$$typeof === r || de.$$typeof === s || de.$$typeof === c || de.$$typeof === S || de.$$typeof === f || de[0] === b);
|
|
383
383
|
}(W);
|
|
@@ -407,11 +407,11 @@ Check the top-level render call using <` + I + ">.");
|
|
|
407
407
|
}(Y) : Ae(Y), Y;
|
|
408
408
|
}
|
|
409
409
|
var Ze = function(W, m, D) {
|
|
410
|
-
return
|
|
411
|
-
},
|
|
412
|
-
return
|
|
410
|
+
return Ye(W, m, D, !1);
|
|
411
|
+
}, Fe = function(W, m, D) {
|
|
412
|
+
return Ye(W, m, D, !0);
|
|
413
413
|
};
|
|
414
|
-
e.jsx = Ze, e.jsxs =
|
|
414
|
+
e.jsx = Ze, e.jsxs = Fe;
|
|
415
415
|
}()), wr;
|
|
416
416
|
var e;
|
|
417
417
|
}
|
|
@@ -899,30 +899,30 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
899
899
|
if (ge && (ge ? Qe + mt : Qe) > ze && Ue) return { ...e, notification: { show: !0, message: `Cannot freeze column "${(ct == null ? void 0 : ct.headerName) || X}". It would exceed the maximum allowed width (60% of viewport).`, type: "warning", timeout: 5e3 } };
|
|
900
900
|
const { parentToChildrenMap: pt, childToParentMap: it } = us(e.columns), ut = it[X], gt = !!ut, It = gt ? (($t, _i) => {
|
|
901
901
|
const Mi = [];
|
|
902
|
-
let
|
|
903
|
-
for (;
|
|
902
|
+
let qe = _i[$t];
|
|
903
|
+
for (; qe; ) Mi.unshift(qe), qe = _i[qe];
|
|
904
904
|
return Mi;
|
|
905
|
-
})(X, it) : [],
|
|
905
|
+
})(X, it) : [], bt = gt && pt[ut] || [], vt = e.columns.map(($t) => {
|
|
906
906
|
const _i = $t.field;
|
|
907
|
-
return _i === X ? { ...$t, is_frozen: ge } : It.includes(_i) ? ds($t, ge) : It.some((Mi) => (pt[Mi] || []).includes(_i)) ||
|
|
908
|
-
}), { columns: wt, frozenData: Pt } = Bo(
|
|
907
|
+
return _i === X ? { ...$t, is_frozen: ge } : It.includes(_i) ? ds($t, ge) : It.some((Mi) => (pt[Mi] || []).includes(_i)) || bt.includes(_i) ? { ...$t, is_frozen: ge } : $t;
|
|
908
|
+
}), { columns: wt, frozenData: Pt } = Bo(vt, ((s = t.meta) == null ? void 0 : s.defaultColDef) || { minWidth: 150 });
|
|
909
909
|
return { ...e, columns: wt, frozenColumns: Pt };
|
|
910
910
|
}
|
|
911
911
|
case ye.REORDER_COLUMNS: {
|
|
912
912
|
const { sourceColumn: X, targetColumn: ge } = t.payload, Oe = X.path.slice(0, X.path.length - 1).join("/"), Ue = ge.path.slice(0, ge.path.length - 1).join("/"), ze = X.path[0], Qe = ge.path[0], ct = X.column_name, mt = ge.column_name, pt = Oe && Oe === Ue, it = ze === Qe, ut = [...e.columns];
|
|
913
913
|
if (pt) {
|
|
914
|
-
const
|
|
915
|
-
ut[
|
|
914
|
+
const bt = ut.findIndex((wt) => wt.column_name === ze), vt = ls(ut[bt], ct, mt);
|
|
915
|
+
ut[bt] = vt;
|
|
916
916
|
} else if (it) {
|
|
917
|
-
const
|
|
918
|
-
if (
|
|
919
|
-
const
|
|
917
|
+
const bt = ut.findIndex((vt) => vt.column_name === ze);
|
|
918
|
+
if (bt !== -1) {
|
|
919
|
+
const vt = ((wt, Pt, $t, _i, Mi) => {
|
|
920
920
|
var pr, hr, yr, vr, br;
|
|
921
|
-
const
|
|
921
|
+
const qe = JSON.parse(JSON.stringify(wt)), kt = (Ht, Xt, Wt = 0) => {
|
|
922
922
|
if (!Xt.length || Xt.length <= 1 || Wt >= Xt.length - 1) return Ht;
|
|
923
923
|
if (!Ht.children) return null;
|
|
924
924
|
const Oi = Ht.children.find((Zi) => Zi.column_name === Xt[Wt]);
|
|
925
|
-
return Oi ?
|
|
925
|
+
return Oi ? kt(Oi, Xt, Wt + 1) : null;
|
|
926
926
|
}, Rt = (Ht, Xt) => {
|
|
927
927
|
if (!Xt || Xt.length === 0) return { parent: null, index: -1 };
|
|
928
928
|
let Wt = Ht, Oi = null, Zi = -1, wi = [];
|
|
@@ -933,7 +933,7 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
933
933
|
wi.push(Xt[hi]), Ji.hidden || (Oi = Ji, Zi = ro, Oi._currentPath = [...wi]), Wt = Ji;
|
|
934
934
|
}
|
|
935
935
|
return { parent: Oi, index: Zi, parentColumn: Wt };
|
|
936
|
-
}, Ut = Rt(
|
|
936
|
+
}, Ut = Rt(qe, Pt), fi = Rt(qe, $t);
|
|
937
937
|
if (Ut.parent && fi.parent) {
|
|
938
938
|
const Ht = Ut.parent._currentPath.join("/"), Xt = fi.parent._currentPath.join("/");
|
|
939
939
|
if (Ht !== Xt) {
|
|
@@ -941,7 +941,7 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
941
941
|
for (let wi = 0; wi < Math.min(Oi.length, Zi.length) && Oi[wi] === Zi[wi]; wi++) Wt += (Wt ? "/" : "") + Oi[wi];
|
|
942
942
|
if (Wt) {
|
|
943
943
|
const wi = Wt.split("/");
|
|
944
|
-
let hi =
|
|
944
|
+
let hi = qe;
|
|
945
945
|
for (const ro of wi) {
|
|
946
946
|
const Ji = (pr = hi.children) == null ? void 0 : pr.findIndex((ko) => ko.column_name === ro);
|
|
947
947
|
if (Ji === -1 || !hi.children) break;
|
|
@@ -951,7 +951,7 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
951
951
|
const ro = Oi[wi.length], Ji = Zi[wi.length], ko = hi.children.findIndex((Wo) => Wo.column_name === ro), kr = hi.children.findIndex((Wo) => Wo.column_name === Ji);
|
|
952
952
|
if (ko !== -1 && kr !== -1) {
|
|
953
953
|
const [Wo] = hi.children.splice(ko, 1);
|
|
954
|
-
return hi.children.splice(kr, 0, Wo),
|
|
954
|
+
return hi.children.splice(kr, 0, Wo), qe;
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
}
|
|
@@ -959,36 +959,36 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
959
959
|
}
|
|
960
960
|
const pi = Pt.length > 0 ? Pt[0] : null, ri = $t.length > 0 ? $t[0] : null;
|
|
961
961
|
if (pi !== ri && pi !== null && ri !== null) {
|
|
962
|
-
const Ht = (hr =
|
|
962
|
+
const Ht = (hr = qe.children) == null ? void 0 : hr.findIndex((Wt) => Wt.column_name === pi), Xt = (yr = qe.children) == null ? void 0 : yr.findIndex((Wt) => Wt.column_name === ri);
|
|
963
963
|
if (Ht !== -1 && Xt !== -1) {
|
|
964
|
-
const [Wt] =
|
|
965
|
-
return
|
|
964
|
+
const [Wt] = qe.children.splice(Ht, 1);
|
|
965
|
+
return qe.children.splice(Xt, 0, Wt), qe;
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
const Ct =
|
|
968
|
+
const Ct = kt(qe, Pt), ki = kt(qe, $t);
|
|
969
969
|
if (!Ct || !ki) return console.warn("Could not find source or target parent columns", { sourcePath: Pt, targetPath: $t, sourceFieldName: _i, targetFieldName: Mi }), wt;
|
|
970
970
|
const qi = (vr = Ct.children) == null ? void 0 : vr.findIndex((Ht) => ci(Ht) === _i || ci(Ht) === _i), Xi = (br = ki.children) == null ? void 0 : br.findIndex((Ht) => ci(Ht) === Mi || ci(Ht) === Mi);
|
|
971
971
|
if (Ct === ki && qi !== -1 && Xi !== -1) {
|
|
972
972
|
const [Ht] = Ct.children.splice(qi, 1);
|
|
973
|
-
return Ct.children.splice(Xi, 0, Ht),
|
|
973
|
+
return Ct.children.splice(Xi, 0, Ht), qe;
|
|
974
974
|
}
|
|
975
|
-
return qi !== -1 && Xi !== -1 ? { needsParentMove: !0, sourceParentPath: Pt.length > 0 ? Pt[0] : null, targetParentPath: $t.length > 0 ? $t[0] : null, sourceColumn: Ct, targetColumn: ki } :
|
|
976
|
-
})(ut[
|
|
977
|
-
|
|
975
|
+
return qi !== -1 && Xi !== -1 ? { needsParentMove: !0, sourceParentPath: Pt.length > 0 ? Pt[0] : null, targetParentPath: $t.length > 0 ? $t[0] : null, sourceColumn: Ct, targetColumn: ki } : qe;
|
|
976
|
+
})(ut[bt], X.path.slice(1), ge.path.slice(1), ct, mt);
|
|
977
|
+
vt.needsParentMove, ut[bt] = vt;
|
|
978
978
|
}
|
|
979
979
|
} else {
|
|
980
|
-
const
|
|
981
|
-
if (
|
|
982
|
-
const [wt] = ut.splice(
|
|
983
|
-
ut.splice(
|
|
980
|
+
const bt = ut.findIndex((wt) => ci(wt) === ze), vt = ut.findIndex((wt) => ci(wt) === Qe);
|
|
981
|
+
if (bt !== -1 && vt !== -1) {
|
|
982
|
+
const [wt] = ut.splice(bt, 1);
|
|
983
|
+
ut.splice(vt, 0, wt);
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
ut.forEach((
|
|
987
|
-
|
|
988
|
-
}), ut.forEach((
|
|
989
|
-
const
|
|
990
|
-
|
|
991
|
-
}), ut.sort((
|
|
986
|
+
ut.forEach((bt, vt) => {
|
|
987
|
+
bt.order_of_display = vt + 1;
|
|
988
|
+
}), ut.forEach((bt) => {
|
|
989
|
+
const vt = ut.find((wt) => wt.field === bt.field);
|
|
990
|
+
vt && (bt.order_of_display = vt.order_of_display);
|
|
991
|
+
}), ut.sort((bt, vt) => bt.order_of_display - vt.order_of_display);
|
|
992
992
|
const { columns: gt, frozenData: It } = Bo(ut, ((c = t.meta) == null ? void 0 : c.defaultColDef) || { minWidth: 150 });
|
|
993
993
|
return { ...e, columns: gt, frozenColumns: It };
|
|
994
994
|
}
|
|
@@ -1009,8 +1009,8 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
1009
1009
|
return Le ? (delete Me[Le], { ...e, recentlyUpdatedRows: Me }) : { ...e, recentlyUpdatedRows: {} };
|
|
1010
1010
|
case ye.TOGGLE_MASTER_DETAIL:
|
|
1011
1011
|
const { rowId: ot, rowData: Z, clickPosition: Ae } = t.payload;
|
|
1012
|
-
let
|
|
1013
|
-
return (((_ = e.masterDetail) == null ? void 0 : _.expandedRows) || []).includes(ot) ?
|
|
1012
|
+
let Ye, Ze = null, Fe = null;
|
|
1013
|
+
return (((_ = e.masterDetail) == null ? void 0 : _.expandedRows) || []).includes(ot) ? Ye = [] : (Ye = [ot], Ze = Z, Fe = Ae), { ...e, masterDetail: { ...e.masterDetail, expandedRows: Ye, expandedRowData: Ze, clickPosition: Fe } };
|
|
1014
1014
|
case ye.SET_DETAIL_RENDERER:
|
|
1015
1015
|
return { ...e, masterDetail: { ...e.masterDetail, detailRenderer: t.payload } };
|
|
1016
1016
|
case ye.SET_MASTER_DETAIL_CONFIG:
|
|
@@ -1073,8 +1073,8 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
1073
1073
|
const { groupId: Ie } = t.payload, Be = !e.rowGroupState.expandedGroups[Ie];
|
|
1074
1074
|
return { ...e, rowGroupState: { ...e.rowGroupState, expandedGroups: { ...e.rowGroupState.expandedGroups, [Ie]: Be } } };
|
|
1075
1075
|
case ye.SET_ROW_GROUP_DATA:
|
|
1076
|
-
const { groupId:
|
|
1077
|
-
return { ...e, rowGroupState: { ...e.rowGroupState, loadedData: { ...e.rowGroupState.loadedData, [
|
|
1076
|
+
const { groupId: He, data: Ne, append: nt } = t.payload, st = Lc.slice(0, 5).map((X, ge) => ({ ...X, isChildGroup: !0, childIndex: ge })), Ge = e.rowGroupState.loadedData[He] || [], be = nt ? [...Ge, ...st] : st;
|
|
1077
|
+
return { ...e, rowGroupState: { ...e.rowGroupState, loadedData: { ...e.rowGroupState.loadedData, [He]: be }, cache: { ...e.rowGroupState.cache, metadata: { ...e.rowGroupState.cache.metadata, [He]: { timestamp: Date.now(), lastUpdated: Date.now() } } } } };
|
|
1078
1078
|
case ye.SET_ROW_GROUP_LOADING:
|
|
1079
1079
|
const { groupId: we, isLoading: Te } = t.payload;
|
|
1080
1080
|
return { ...e, rowGroupState: { ...e.rowGroupState, loading: { ...e.rowGroupState.loading, [we]: Te } } };
|
|
@@ -1082,8 +1082,8 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
1082
1082
|
const { groupId: Re, pagination: et } = t.payload;
|
|
1083
1083
|
return { ...e, rowGroupState: { ...e.rowGroupState, pagination: { ...e.rowGroupState.pagination, [Re]: { ...e.rowGroupState.pagination[Re], ...et } } } };
|
|
1084
1084
|
case ye.CLEAR_ROW_GROUP_CACHE:
|
|
1085
|
-
const { groupId: Xe } = t.payload, ft = { ...e.rowGroupState.loadedData }, lt = { ...e.rowGroupState.pagination },
|
|
1086
|
-
return Xe ? (delete ft[Xe], delete lt[Xe], delete
|
|
1085
|
+
const { groupId: Xe } = t.payload, ft = { ...e.rowGroupState.loadedData }, lt = { ...e.rowGroupState.pagination }, yt = { ...e.rowGroupState.cache.metadata };
|
|
1086
|
+
return Xe ? (delete ft[Xe], delete lt[Xe], delete yt[Xe]) : (Object.keys(ft).forEach((X) => delete ft[X]), Object.keys(lt).forEach((X) => delete lt[X]), Object.keys(yt).forEach((X) => delete yt[X])), { ...e, rowGroupState: { ...e.rowGroupState, loadedData: ft, pagination: lt, cache: { ...e.rowGroupState.cache, metadata: yt } } };
|
|
1087
1087
|
case ye.REFRESH_ROW_GROUP_DATA:
|
|
1088
1088
|
const { groupId: tt } = t.payload, Je = { ...e.rowGroupState.cache.metadata };
|
|
1089
1089
|
return tt && Je[tt] ? Je[tt] = { ...Je[tt], lastUpdated: Date.now() } : tt || Object.keys(Je).forEach((X) => {
|
|
@@ -1124,8 +1124,8 @@ const Lc = [{ l2_name: "20-10 - Women__ia_char_01s Pants", KPI: "Sls Retail:WP",
|
|
|
1124
1124
|
}
|
|
1125
1125
|
}), Ci.delete(e);
|
|
1126
1126
|
}, Bc = (e, t = [], i, o) => {
|
|
1127
|
-
const a =
|
|
1128
|
-
return
|
|
1127
|
+
const a = Ke({ isRegistered: !1, previousAlignedGrids: null });
|
|
1128
|
+
return je(() => {
|
|
1129
1129
|
if (e) return a.current.isRegistered ? a.current.previousAlignedGrids !== t && (Dr(e), Sr(e, i, o, ye, t), a.current.previousAlignedGrids = t) : (Sr(e, i, o, ye, t), a.current.isRegistered = !0, a.current.previousAlignedGrids = t), () => {
|
|
1130
1130
|
a.current.isRegistered && (Dr(e), a.current.isRegistered = !1);
|
|
1131
1131
|
};
|
|
@@ -1156,23 +1156,23 @@ const va = (e, t = {}) => {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
});
|
|
1158
1158
|
}, ba = ["rowClicked", "cellClicked", "selectionChanged", "cellValueChanged", "rowDataChanged", "sortChanged", "filterChanged", "columnResized", "columnMoved", "columnVisibilityChanged", "gridReady", "firstDataRendered", "rowGroupOpened", "rowGroupToggled", "rowGroupDataLoaded", "paginationChanged", "rowGroupToggled", "rowGroupDataLoaded"], _s = Jl(), Fc = ({ children: e }) => {
|
|
1159
|
-
const [t, i] =
|
|
1159
|
+
const [t, i] = Ve(!1), o = { isSettingsPanelOpen: t, openSettingsPanel: () => i(!0), closeSettingsPanel: () => i(!1), toggleSettingsPanel: () => i((a) => !a) };
|
|
1160
1160
|
return g.jsx(_s.Provider, { value: o, children: e });
|
|
1161
1161
|
}, fs = () => {
|
|
1162
1162
|
const e = Ql(_s);
|
|
1163
1163
|
if (e === void 0) throw new Error("usePanelContext must be used within a PanelProvider");
|
|
1164
1164
|
return e;
|
|
1165
1165
|
}, ps = Jl(), hs = Fn(({ children: e, initialData: t = [], initialColumns: i = [], uniqueIdField: o = "id", childKeyField: a = "children", tableApi: n = null, tableActions: l = {}, defaultColDef: r = { minWidth: 150 }, onSelectionChanged: s = null, onRowClicked: c = null, onCellValueChanged: _ = null, onSearch: d = null, serverSide: u = !1, pageSize: p = 10, tableId: f = null, alignedGrids: b = [], initialExpandedColumnGroups: S = {}, enableRowSpan: A = !1, rowSpanColumn: x = null, columnMap: y = {}, infiniteScroll: k = !1, totalItems: v, totalPages: h, currentPage: E, isCountUnknown: G, rowDragManaged: w, pinnedTopRows: z = [], pinnedBottomRows: M = [], getRowStyle: j, tableInstance: T }, C) => {
|
|
1166
|
-
const P =
|
|
1167
|
-
|
|
1166
|
+
const P = Ke(!0), F = Ke(null), [B, U] = Nc(Wc, { ...Ko, columnMap: y, data: t, filteredData: t, uniqueIdField: o, childKeyField: a, api: n, actions: l, callbacks: { onSelectionChanged: s, onRowClicked: c, onCellValueChanged: _, onSearch: d }, serverSide: u, infiniteScroll: k, rowDragManaged: w, pagination: { ...(Ko == null ? void 0 : Ko.pagination) || { currentPage: 1, pageSize: 10, totalPages: 1, isCountUnknown: !0, totalItems: 0, currentLoadedPage: 1, allTotalPages: 0 }, pageSize: p }, expandedColumnGroups: S || {}, pinnedTopRows: z, pinnedBottomRows: M, tableInstance: T });
|
|
1167
|
+
je(() => {
|
|
1168
1168
|
U({ type: ye.SET_COLUMN_MAP, payload: y });
|
|
1169
|
-
}, [y]),
|
|
1169
|
+
}, [y]), je(() => {
|
|
1170
1170
|
P.current ? P.current = !1 : U({ type: ye.SET_DATA, payload: t, meta: { isCountUnknown: G, totalItems: v, totalPages: h, currentPage: E } });
|
|
1171
|
-
}, [t, G, v, h, E]),
|
|
1171
|
+
}, [t, G, v, h, E]), je(() => {
|
|
1172
1172
|
U({ type: ye.SET_PINNED_TOP_ROWS, payload: z || [] });
|
|
1173
|
-
}, [z]),
|
|
1173
|
+
}, [z]), je(() => {
|
|
1174
1174
|
U({ type: ye.SET_PINNED_BOTTOM_ROWS, payload: M || [] });
|
|
1175
|
-
}, [M]),
|
|
1175
|
+
}, [M]), je(() => {
|
|
1176
1176
|
U({ type: ye.SET_COLUMNS, payload: i, meta: { defaultColDef: r } });
|
|
1177
1177
|
const oe = setTimeout(() => {
|
|
1178
1178
|
const Q = {};
|
|
@@ -1182,15 +1182,15 @@ const va = (e, t = {}) => {
|
|
|
1182
1182
|
}), le && U({ type: ye.AUTOSIZE_COLUMNS_REQUESTED, payload: { columnsToAutosize: Q } });
|
|
1183
1183
|
}, 100);
|
|
1184
1184
|
return () => clearTimeout(oe);
|
|
1185
|
-
}, [i]),
|
|
1185
|
+
}, [i]), je(() => {
|
|
1186
1186
|
U({ type: ye.SET_FIELD_KEYS, payload: { uniqueIdField: o, childKeyField: a } });
|
|
1187
|
-
}, [o, a]),
|
|
1187
|
+
}, [o, a]), je(() => {
|
|
1188
1188
|
A !== void 0 && U({ type: ye.ENABLE_ROW_SPAN, payload: A }), x !== void 0 && U({ type: ye.SET_ROW_SPAN_COLUMN, payload: x });
|
|
1189
1189
|
}, [A, x]);
|
|
1190
1190
|
const q = at((oe) => {
|
|
1191
1191
|
oe && U({ type: ye.TOGGLE_GROUP_EXPANSION, payload: oe });
|
|
1192
1192
|
}, [U]);
|
|
1193
|
-
|
|
1193
|
+
je(() => {
|
|
1194
1194
|
if (B.callbacks && B.callbacks.onSelectionChanged && B.selectedRows) {
|
|
1195
1195
|
const oe = { api: { ...B.api, getSelectedRows: () => {
|
|
1196
1196
|
const Q = [];
|
|
@@ -1262,7 +1262,7 @@ const va = (e, t = {}) => {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
f && (b != null && b.length) && !((Q = oe.meta) != null && Q.fromAlignedGrid) && Er.includes(oe.type) && F.current && F.current(oe.type, oe.payload, oe.meta);
|
|
1264
1264
|
}, [U, f, b, Er, B.api]), { propagateChange: J } = Bc(f, b, n, ee);
|
|
1265
|
-
|
|
1265
|
+
je(() => {
|
|
1266
1266
|
F.current = J;
|
|
1267
1267
|
}, [J]);
|
|
1268
1268
|
const H = at((oe, Q, le = !1) => {
|
|
@@ -1286,9 +1286,9 @@ const va = (e, t = {}) => {
|
|
|
1286
1286
|
K(oe, he);
|
|
1287
1287
|
});
|
|
1288
1288
|
}, [B, K]);
|
|
1289
|
-
|
|
1289
|
+
je(() => {
|
|
1290
1290
|
B.api && (B.api.addEventListener = H, B.api.removeEventListener = K, B.api.dispatchEvent = re);
|
|
1291
|
-
}, [B.api, H, K, re]),
|
|
1291
|
+
}, [B.api, H, K, re]), je(() => {
|
|
1292
1292
|
if (B.api) {
|
|
1293
1293
|
const oe = ((Q, le, he) => {
|
|
1294
1294
|
var ne;
|
|
@@ -1314,10 +1314,10 @@ const va = (e, t = {}) => {
|
|
|
1314
1314
|
})(B.api, U, C);
|
|
1315
1315
|
Object.assign(B.api, oe);
|
|
1316
1316
|
}
|
|
1317
|
-
}, [B.api, U, C]),
|
|
1317
|
+
}, [B.api, U, C]), je(() => () => {
|
|
1318
1318
|
U({ type: ye.CLEANUP_TABLE_RESOURCES });
|
|
1319
1319
|
}, []);
|
|
1320
|
-
const ve =
|
|
1320
|
+
const ve = ht(() => ({ state: B, tableApi: n, dispatch: ee, ACTION_TYPES: ye, toggleGroupExpansion: q, dispatchEvent: re, getRowStyle: j }), [B, ee, q, re, j]);
|
|
1321
1321
|
return es(C, () => ve, [ve]), g.jsx(ps.Provider, { value: ve, children: g.jsx(Fc, { children: e }) });
|
|
1322
1322
|
}), Lt = () => {
|
|
1323
1323
|
const e = Ql(ps);
|
|
@@ -2217,12 +2217,12 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2217
2217
|
for (et = 0; et < Re.length; ++et) if (Xe = Re[et], /^Content-Location:/i.test(Xe) && (Xe = Xe.slice(Xe.indexOf("file")), Te || (Te = Xe.slice(0, Xe.lastIndexOf("/") + 1)), Xe.slice(0, Te.length) != Te)) for (; Te.length > 0 && (Te = (Te = Te.slice(0, Te.length - 1)).slice(0, Te.lastIndexOf("/") + 1), Xe.slice(0, Te.length) != Te); ) ;
|
|
2218
2218
|
var ft = (Re[1] || "").match(/boundary="(.*?)"/);
|
|
2219
2219
|
if (!ft) throw new Error("MAD cannot find boundary");
|
|
2220
|
-
var lt = "--" + (ft[1] || ""),
|
|
2220
|
+
var lt = "--" + (ft[1] || ""), yt = [], tt = [], Je = { FileIndex: yt, FullPaths: tt };
|
|
2221
2221
|
u(Je);
|
|
2222
2222
|
var X, ge = 0;
|
|
2223
2223
|
for (et = 0; et < Re.length; ++et) {
|
|
2224
2224
|
var Oe = Re[et];
|
|
2225
|
-
Oe !== lt && Oe !== lt + "--" || (ge++ &&
|
|
2225
|
+
Oe !== lt && Oe !== lt + "--" || (ge++ && Fe(Je, Re.slice(X, et), Te), X = et);
|
|
2226
2226
|
}
|
|
2227
2227
|
return Je;
|
|
2228
2228
|
}(m, D);
|
|
@@ -2272,41 +2272,41 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2272
2272
|
return Re[Te - 1] = be.slice(Te * we), Re;
|
|
2273
2273
|
}(m, Y);
|
|
2274
2274
|
c(V, R, Be, Y, te);
|
|
2275
|
-
var
|
|
2276
|
-
var et = be.length, Xe = [], ft = [], lt = [],
|
|
2275
|
+
var He = function(be, we, Te, Re) {
|
|
2276
|
+
var et = be.length, Xe = [], ft = [], lt = [], yt = [], tt = Re - 1, Je = 0, X = 0, ge = 0, Oe = 0;
|
|
2277
2277
|
for (Je = 0; Je < et; ++Je) if (lt = [], (ge = Je + we) >= et && (ge -= et), !ft[ge]) {
|
|
2278
|
-
|
|
2278
|
+
yt = [];
|
|
2279
2279
|
var Ue = [];
|
|
2280
2280
|
for (X = ge; X >= 0; ) {
|
|
2281
|
-
Ue[X] = !0, ft[X] = !0, lt[lt.length] = X,
|
|
2281
|
+
Ue[X] = !0, ft[X] = !0, lt[lt.length] = X, yt.push(be[X]);
|
|
2282
2282
|
var ze = Te[Math.floor(4 * X / Re)];
|
|
2283
2283
|
if (Re < 4 + (Oe = 4 * X & tt)) throw new Error("FAT boundary crossed: " + X + " 4 " + Re);
|
|
2284
2284
|
if (!be[ze] || Ue[X = fo(be[ze], Oe)]) break;
|
|
2285
2285
|
}
|
|
2286
|
-
Xe[ge] = { nodes: lt, data: Kr([
|
|
2286
|
+
Xe[ge] = { nodes: lt, data: Kr([yt]) };
|
|
2287
2287
|
}
|
|
2288
2288
|
return Xe;
|
|
2289
2289
|
}(Be, I, te, Y);
|
|
2290
|
-
|
|
2290
|
+
He[I].name = "!Directory", N > 0 && L !== A && (He[L].name = "!MiniFAT"), He[te[0]].name = "!FAT", He.fat_addrs = te, He.ssz = Y;
|
|
2291
2291
|
var Ne = [], nt = [], st = [];
|
|
2292
2292
|
(function(be, we, Te, Re, et, Xe, ft, lt) {
|
|
2293
|
-
for (var
|
|
2293
|
+
for (var yt, tt = 0, Je = Re.length ? 2 : 0, X = we[be].data, ge = 0, Oe = 0; ge < X.length; ge += 128) {
|
|
2294
2294
|
var Ue = X.slice(ge, ge + 128);
|
|
2295
|
-
gi(Ue, 64), Oe = Ue.read_shift(2),
|
|
2296
|
-
var ze = { name:
|
|
2297
|
-
Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) !== 0 && (ze.ct = d(Ue, Ue.l - 8)), Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) !== 0 && (ze.mt = d(Ue, Ue.l - 8)), ze.start = Ue.read_shift(4, "i"), ze.size = Ue.read_shift(4, "i"), ze.size < 0 && ze.start < 0 && (ze.size = ze.type = 0, ze.start = A, ze.name = ""), ze.type === 5 ? (tt = ze.start, et > 0 && tt !== A && (we[tt].name = "!StreamData")) : ze.size >= 4096 ? (ze.storage = "fat", we[ze.start] === void 0 && (we[ze.start] = _(Te, ze.start, we.fat_addrs, we.ssz)), we[ze.start].name = ze.name, ze.content = we[ze.start].data.slice(0, ze.size)) : (ze.storage = "minifat", ze.size < 0 ? ze.size = 0 : tt !== A && ze.start !== A && we[tt] && (ze.content = s(ze, we[tt].data, (we[lt] || {}).data))), ze.content && gi(ze.content, 0), Xe[
|
|
2295
|
+
gi(Ue, 64), Oe = Ue.read_shift(2), yt = Zn(Ue, 0, Oe - Je), Re.push(yt);
|
|
2296
|
+
var ze = { name: yt, type: Ue.read_shift(1), color: Ue.read_shift(1), L: Ue.read_shift(4, "i"), R: Ue.read_shift(4, "i"), C: Ue.read_shift(4, "i"), clsid: Ue.read_shift(16), state: Ue.read_shift(4, "i"), start: 0, size: 0 };
|
|
2297
|
+
Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) !== 0 && (ze.ct = d(Ue, Ue.l - 8)), Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) + Ue.read_shift(2) !== 0 && (ze.mt = d(Ue, Ue.l - 8)), ze.start = Ue.read_shift(4, "i"), ze.size = Ue.read_shift(4, "i"), ze.size < 0 && ze.start < 0 && (ze.size = ze.type = 0, ze.start = A, ze.name = ""), ze.type === 5 ? (tt = ze.start, et > 0 && tt !== A && (we[tt].name = "!StreamData")) : ze.size >= 4096 ? (ze.storage = "fat", we[ze.start] === void 0 && (we[ze.start] = _(Te, ze.start, we.fat_addrs, we.ssz)), we[ze.start].name = ze.name, ze.content = we[ze.start].data.slice(0, ze.size)) : (ze.storage = "minifat", ze.size < 0 ? ze.size = 0 : tt !== A && ze.start !== A && we[tt] && (ze.content = s(ze, we[tt].data, (we[lt] || {}).data))), ze.content && gi(ze.content, 0), Xe[yt] = ze, ft.push(ze);
|
|
2298
2298
|
}
|
|
2299
|
-
})(I,
|
|
2300
|
-
for (var Re = 0, et = 0, Xe = 0, ft = 0, lt = 0,
|
|
2299
|
+
})(I, He, Be, Ne, N, {}, nt, L), function(be, we, Te) {
|
|
2300
|
+
for (var Re = 0, et = 0, Xe = 0, ft = 0, lt = 0, yt = Te.length, tt = [], Je = []; Re < yt; ++Re) tt[Re] = Je[Re] = Re, we[Re] = Te[Re];
|
|
2301
2301
|
for (; lt < Je.length; ++lt) et = be[Re = Je[lt]].L, Xe = be[Re].R, ft = be[Re].C, tt[Re] === Re && (et !== -1 && tt[et] !== et && (tt[Re] = tt[et]), Xe !== -1 && tt[Xe] !== Xe && (tt[Re] = tt[Xe])), ft !== -1 && (tt[ft] = Re), et !== -1 && Re != tt[Re] && (tt[et] = tt[Re], Je.lastIndexOf(et) < lt && Je.push(et)), Xe !== -1 && Re != tt[Re] && (tt[Xe] = tt[Re], Je.lastIndexOf(Xe) < lt && Je.push(Xe));
|
|
2302
|
-
for (Re = 1; Re <
|
|
2303
|
-
for (Re = 1; Re <
|
|
2302
|
+
for (Re = 1; Re < yt; ++Re) tt[Re] === Re && (Xe !== -1 && tt[Xe] !== Xe ? tt[Re] = tt[Xe] : et !== -1 && tt[et] !== et && (tt[Re] = tt[et]));
|
|
2303
|
+
for (Re = 1; Re < yt; ++Re) if (be[Re].type !== 0) {
|
|
2304
2304
|
if ((lt = Re) != tt[lt]) do
|
|
2305
2305
|
lt = tt[lt], we[Re] = we[lt] + "/" + we[Re];
|
|
2306
2306
|
while (lt !== 0 && tt[lt] !== -1 && lt != tt[lt]);
|
|
2307
2307
|
tt[Re] = -1;
|
|
2308
2308
|
}
|
|
2309
|
-
for (we[0] += "/", Re = 1; Re <
|
|
2309
|
+
for (we[0] += "/", Re = 1; Re < yt; ++Re) be[Re].type !== 2 && (we[Re] += "/");
|
|
2310
2310
|
}(nt, st, Ne), Ne.shift();
|
|
2311
2311
|
var Ge = { FileIndex: nt, FullPaths: st };
|
|
2312
2312
|
return D && D.raw && (Ge.raw = { header: se, sectors: Be }), Ge;
|
|
@@ -2379,11 +2379,11 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
for (te.sort(function(ie, me) {
|
|
2381
2381
|
return function(Ie, Be) {
|
|
2382
|
-
for (var
|
|
2383
|
-
if (st =
|
|
2384
|
-
if (
|
|
2382
|
+
for (var He = Ie.split("/"), Ne = Be.split("/"), nt = 0, st = 0, Ge = Math.min(He.length, Ne.length); nt < Ge; ++nt) {
|
|
2383
|
+
if (st = He[nt].length - Ne[nt].length) return st;
|
|
2384
|
+
if (He[nt] != Ne[nt]) return He[nt] < Ne[nt] ? -1 : 1;
|
|
2385
2385
|
}
|
|
2386
|
-
return
|
|
2386
|
+
return He.length - Ne.length;
|
|
2387
2387
|
}(ie[0], me[0]);
|
|
2388
2388
|
}), m.FullPaths = [], m.FileIndex = [], R = 0; R < te.length; ++R) m.FullPaths[R] = te[R][0], m.FileIndex[R] = te[R][1];
|
|
2389
2389
|
for (R = 0; R < te.length; ++R) {
|
|
@@ -2400,7 +2400,7 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2400
2400
|
function f(m, D) {
|
|
2401
2401
|
var O = D || {};
|
|
2402
2402
|
if (O.fileType == "mad") return function(ie, me) {
|
|
2403
|
-
for (var Ie = me || {}, Be = Ie.boundary || "SheetJS",
|
|
2403
|
+
for (var Ie = me || {}, Be = Ie.boundary || "SheetJS", He = ["MIME-Version: 1.0", 'Content-Type: multipart/related; boundary="' + (Be = "------=" + Be).slice(2) + '"', "", "", ""], Ne = ie.FullPaths[0], nt = Ne, st = ie.FileIndex[0], Ge = 1; Ge < ie.FullPaths.length; ++Ge) if (nt = ie.FullPaths[Ge].slice(Ne.length), (st = ie.FileIndex[Ge]).size && st.content && nt != "Sh33tJ5") {
|
|
2404
2404
|
nt = nt.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g, function(lt) {
|
|
2405
2405
|
return "_x" + lt.charCodeAt(0).toString(16) + "_";
|
|
2406
2406
|
}).replace(/[\u0080-\uFFFF]/g, function(lt) {
|
|
@@ -2408,28 +2408,28 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2408
2408
|
});
|
|
2409
2409
|
for (var be = st.content, we = Tt && Buffer.isBuffer(be) ? be.toString("binary") : h(be), Te = 0, Re = Math.min(1024, we.length), et = 0, Xe = 0; Xe <= Re; ++Xe) (et = we.charCodeAt(Xe)) >= 32 && et < 128 && ++Te;
|
|
2410
2410
|
var ft = Te >= 4 * Re / 5;
|
|
2411
|
-
|
|
2411
|
+
He.push(Be), He.push("Content-Location: " + (Ie.root || "file:///C:/SheetJS/") + nt), He.push("Content-Transfer-Encoding: " + (ft ? "quoted-printable" : "base64")), He.push("Content-Type: " + Ae(st, nt)), He.push(""), He.push(ft ? Ze(we) : Ye(we));
|
|
2412
2412
|
}
|
|
2413
|
-
return
|
|
2414
|
-
`),
|
|
2413
|
+
return He.push(Be + `--\r
|
|
2414
|
+
`), He.join(`\r
|
|
2415
2415
|
`);
|
|
2416
2416
|
}(m, O);
|
|
2417
2417
|
if (p(m), O.fileType === "zip") return function(ie, me) {
|
|
2418
|
-
var Ie = me || {}, Be = [],
|
|
2418
|
+
var Ie = me || {}, Be = [], He = [], Ne = pe(1), nt = Ie.compression ? 8 : 0, st = 0, Ge = 0, be = 0, we = 0, Te = 0, Re = ie.FullPaths[0], et = Re, Xe = ie.FileIndex[0], ft = [], lt = 0;
|
|
2419
2419
|
for (Ge = 1; Ge < ie.FullPaths.length; ++Ge) if (et = ie.FullPaths[Ge].slice(Re.length), (Xe = ie.FileIndex[Ge]).size && Xe.content && et != "Sh33tJ5") {
|
|
2420
|
-
var
|
|
2420
|
+
var yt = we, tt = pe(et.length);
|
|
2421
2421
|
for (be = 0; be < et.length; ++be) tt.write_shift(1, 127 & et.charCodeAt(be));
|
|
2422
2422
|
tt = tt.slice(0, tt.l), ft[Te] = Jc.buf(Xe.content, 0);
|
|
2423
2423
|
var Je = Xe.content;
|
|
2424
|
-
nt == 8 && (Je = E(Je)), (Ne = pe(30)).write_shift(4, 67324752), Ne.write_shift(2, 20), Ne.write_shift(2, st), Ne.write_shift(2, nt), Xe.mt ? a(Ne, Xe.mt) : Ne.write_shift(4, 0), Ne.write_shift(-4, ft[Te]), Ne.write_shift(4, Je.length), Ne.write_shift(4, Xe.content.length), Ne.write_shift(2, tt.length), Ne.write_shift(2, 0), we += Ne.length, Be.push(Ne), we += tt.length, Be.push(tt), we += Je.length, Be.push(Je), (Ne = pe(46)).write_shift(4, 33639248), Ne.write_shift(2, 0), Ne.write_shift(2, 20), Ne.write_shift(2, st), Ne.write_shift(2, nt), Ne.write_shift(4, 0), Ne.write_shift(-4, ft[Te]), Ne.write_shift(4, Je.length), Ne.write_shift(4, Xe.content.length), Ne.write_shift(2, tt.length), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(4, 0), Ne.write_shift(4,
|
|
2424
|
+
nt == 8 && (Je = E(Je)), (Ne = pe(30)).write_shift(4, 67324752), Ne.write_shift(2, 20), Ne.write_shift(2, st), Ne.write_shift(2, nt), Xe.mt ? a(Ne, Xe.mt) : Ne.write_shift(4, 0), Ne.write_shift(-4, ft[Te]), Ne.write_shift(4, Je.length), Ne.write_shift(4, Xe.content.length), Ne.write_shift(2, tt.length), Ne.write_shift(2, 0), we += Ne.length, Be.push(Ne), we += tt.length, Be.push(tt), we += Je.length, Be.push(Je), (Ne = pe(46)).write_shift(4, 33639248), Ne.write_shift(2, 0), Ne.write_shift(2, 20), Ne.write_shift(2, st), Ne.write_shift(2, nt), Ne.write_shift(4, 0), Ne.write_shift(-4, ft[Te]), Ne.write_shift(4, Je.length), Ne.write_shift(4, Xe.content.length), Ne.write_shift(2, tt.length), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(4, 0), Ne.write_shift(4, yt), lt += Ne.l, He.push(Ne), lt += tt.length, He.push(tt), ++Te;
|
|
2425
2425
|
}
|
|
2426
|
-
return Ne = pe(22), Ne.write_shift(4, 101010256), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(2, Te), Ne.write_shift(2, Te), Ne.write_shift(4, lt), Ne.write_shift(4, we), Ne.write_shift(2, 0), Qt([Qt(Be), Qt(
|
|
2426
|
+
return Ne = pe(22), Ne.write_shift(4, 101010256), Ne.write_shift(2, 0), Ne.write_shift(2, 0), Ne.write_shift(2, Te), Ne.write_shift(2, Te), Ne.write_shift(4, lt), Ne.write_shift(4, we), Ne.write_shift(2, 0), Qt([Qt(Be), Qt(He), Ne]);
|
|
2427
2427
|
}(m, O);
|
|
2428
2428
|
var N = function(ie) {
|
|
2429
2429
|
for (var me = 0, Ie = 0, Be = 0; Be < ie.FileIndex.length; ++Be) {
|
|
2430
|
-
var
|
|
2431
|
-
if (
|
|
2432
|
-
var Ne =
|
|
2430
|
+
var He = ie.FileIndex[Be];
|
|
2431
|
+
if (He.content) {
|
|
2432
|
+
var Ne = He.content.length;
|
|
2433
2433
|
Ne > 0 && (Ne < 4096 ? me += Ne + 63 >> 6 : Ie += Ne + 511 >> 9);
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
@@ -2609,8 +2609,8 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2609
2609
|
(ie = N[Ie]) <= 22 ? Y = re(V, Y, C[ie + 1] >> 1) - 1 : (re(V, Y, 3), re(V, Y += 5, C[ie - 23] >> 5), Y += 3);
|
|
2610
2610
|
var Be = ie < 8 ? 0 : ie - 4 >> 2;
|
|
2611
2611
|
Be > 0 && (ve(V, Y, Ie - w[ie]), Y += Be), ie = m[te - me], Y = re(V, Y, C[ie] >> 3), Y -= 3;
|
|
2612
|
-
var
|
|
2613
|
-
|
|
2612
|
+
var He = ie < 4 ? 0 : ie - 2 >> 1;
|
|
2613
|
+
He > 0 && (ve(V, Y, te - me - z[ie]), Y += He);
|
|
2614
2614
|
for (var Ne = 0; Ne < Ie; ++Ne) ae[se] = 32767 & te, se = 32767 & (se << 5 ^ L[te]), ++te;
|
|
2615
2615
|
de -= Ie - 1;
|
|
2616
2616
|
} else ie <= 143 ? ie += 48 : Y = K(V, Y, 1), Y = re(V, Y, C[ie]), ae[se] = 32767 & te, ++te;
|
|
@@ -2656,10 +2656,10 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2656
2656
|
default:
|
|
2657
2657
|
Be.push(ie), Y < ie && (Y = ie);
|
|
2658
2658
|
}
|
|
2659
|
-
var
|
|
2660
|
-
for (se = O; se < 286; ++se)
|
|
2659
|
+
var He = Be.slice(0, O), Ne = Be.slice(O);
|
|
2660
|
+
for (se = O; se < 286; ++se) He[se] = 0;
|
|
2661
2661
|
for (se = N; se < 30; ++se) Ne[se] = 0;
|
|
2662
|
-
return Se = le(
|
|
2662
|
+
return Se = le(He, De, 286), Ce = le(Ne, ue, 30), D;
|
|
2663
2663
|
}
|
|
2664
2664
|
function xe(m, D) {
|
|
2665
2665
|
var O = function(N, R) {
|
|
@@ -2673,8 +2673,8 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2673
2673
|
me > 5 && (me = 0);
|
|
2674
2674
|
var Ie = Y + w[ie];
|
|
2675
2675
|
me > 0 && (Ie += J(N, I, me), I += me), se = J(N, I, de), I += 15 & (ie = L >>> 1 == 1 ? ce[se] : ue[se]);
|
|
2676
|
-
var Be = (ie >>>= 4) < 4 ? 0 : ie - 2 >> 1,
|
|
2677
|
-
for (Be > 0 && (
|
|
2676
|
+
var Be = (ie >>>= 4) < 4 ? 0 : ie - 2 >> 1, He = z[ie];
|
|
2677
|
+
for (Be > 0 && (He += J(N, I, Be), I += Be), !R && te < Ie && (te = (V = oe(V, Ie + 100)).length); Y < Ie; ) V[Y] = V[Y - He], ++Y;
|
|
2678
2678
|
} else V[Y++] = ie;
|
|
2679
2679
|
}
|
|
2680
2680
|
else {
|
|
@@ -2713,8 +2713,8 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2713
2713
|
}
|
|
2714
2714
|
function ot(m, D, O, N, R) {
|
|
2715
2715
|
m.l += 2;
|
|
2716
|
-
var I = m.read_shift(2), L = m.read_shift(2), V = function(
|
|
2717
|
-
var Ne = 65535 &
|
|
2716
|
+
var I = m.read_shift(2), L = m.read_shift(2), V = function(He) {
|
|
2717
|
+
var Ne = 65535 & He.read_shift(2), nt = 65535 & He.read_shift(2), st = /* @__PURE__ */ new Date(), Ge = 31 & nt, be = 15 & (nt >>>= 5);
|
|
2718
2718
|
nt >>>= 4, st.setMilliseconds(0), st.setFullYear(nt + 1980), st.setMonth(be - 1), st.setDate(Ge);
|
|
2719
2719
|
var we = 31 & Ne, Te = 63 & (Ne >>>= 5);
|
|
2720
2720
|
return Ne >>>= 6, st.setHours(Ne), st.setMinutes(Te), st.setSeconds(we << 1), st;
|
|
@@ -2730,10 +2730,10 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2730
2730
|
var Ie = m.slice(m.l, m.l + Y);
|
|
2731
2731
|
switch (L) {
|
|
2732
2732
|
case 8:
|
|
2733
|
-
Ie = function(
|
|
2734
|
-
if (!b) return xe(
|
|
2735
|
-
var nt = new b.InflateRaw(), st = nt._processChunk(
|
|
2736
|
-
return
|
|
2733
|
+
Ie = function(He, Ne) {
|
|
2734
|
+
if (!b) return xe(He, Ne);
|
|
2735
|
+
var nt = new b.InflateRaw(), st = nt._processChunk(He.slice(He.l), nt._finishFlushFlag);
|
|
2736
|
+
return He.l += nt.bytesRead, st;
|
|
2737
2737
|
}(m, te);
|
|
2738
2738
|
break;
|
|
2739
2739
|
case 0:
|
|
@@ -2750,7 +2750,7 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2750
2750
|
var O = m.name || "", N = O.match(/\.([^\.]+)$/);
|
|
2751
2751
|
return N && Z[N[1]] || D && (N = (O = D).match(/[\.\\]([^\.\\])+$/)) && Z[N[1]] ? Z[N[1]] : "application/octet-stream";
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2753
|
+
function Ye(m) {
|
|
2754
2754
|
for (var D = sa(m), O = [], N = 0; N < D.length; N += 76) O.push(D.slice(N, N + 76));
|
|
2755
2755
|
return O.join(`\r
|
|
2756
2756
|
`) + `\r
|
|
@@ -2776,7 +2776,7 @@ var $r = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g, Jc = function() {
|
|
|
2776
2776
|
return O.join(`\r
|
|
2777
2777
|
`);
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2779
|
+
function Fe(m, D, O) {
|
|
2780
2780
|
for (var N, R = "", I = "", L = "", V = 0; V < 10; ++V) {
|
|
2781
2781
|
var Y = D[V];
|
|
2782
2782
|
if (!Y || Y.match(/^\s*$/)) break;
|
|
@@ -8188,8 +8188,8 @@ const Ln = (e) => {
|
|
|
8188
8188
|
t();
|
|
8189
8189
|
}, varient: "text", className: "ia-table-settings-button " + (e ? "active" : ""), children: g.jsx(D1, {}) });
|
|
8190
8190
|
}, C1 = ({ tableHeader: e = null, topRightOptions: t = null, downloadAsExcel: i = !1, downloadAsCSV: o = !1, copyToClipboard: a = !1, copyToClipboardHandler: n, downloadExcelHandler: l, downloadCSVHandler: r }) => g.jsxs("div", { className: "ia-table-table-toolbar", children: [g.jsx("div", { className: "ia-table-toolbar-left", children: e && g.jsx("div", { className: "ia-table-header-content", children: typeof e == "string" ? g.jsx("div", { className: "ia-table-header-text", children: e }) : e }) }), g.jsxs("div", { className: "ia-table-toolbar-right", children: [t && g.jsxs(g.Fragment, { children: [g.jsx("div", { className: "ia-table-top-right-options", children: t }), g.jsx("div", { className: "divider-line" })] }), (o || i || a) && g.jsx(S1, { downloadAsExcel: i, downloadAsCSV: o, copyToClipboard: a, copyToClipboardHandler: n, downloadExcelHandler: l, downloadCSVHandler: r }), g.jsx(R1, {})] })] }), M1 = ({ onFilterChange: e }) => {
|
|
8191
|
-
const { state: t, dispatch: i, ACTION_TYPES: o } = Lt(), { columns: a, columnFilters: n } = t, [l, r] =
|
|
8192
|
-
|
|
8191
|
+
const { state: t, dispatch: i, ACTION_TYPES: o } = Lt(), { columns: a, columnFilters: n } = t, [l, r] = Ve({});
|
|
8192
|
+
je(() => {
|
|
8193
8193
|
r(n || {});
|
|
8194
8194
|
}, [n]);
|
|
8195
8195
|
const s = a.filter((c) => c.filterable !== !1 && !c.hidden);
|
|
@@ -8204,11 +8204,11 @@ const Ln = (e) => {
|
|
|
8204
8204
|
}, Ho = "asc", mn = "desc", gn = null;
|
|
8205
8205
|
let xn = !1;
|
|
8206
8206
|
const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
8207
|
-
const { state: o, dispatch: a, ACTION_TYPES: n } = Lt(), { columns: l, frozenColumns: r } = o, [s, c] =
|
|
8208
|
-
|
|
8207
|
+
const { state: o, dispatch: a, ACTION_TYPES: n } = Lt(), { columns: l, frozenColumns: r } = o, [s, c] = Ve(!1), [_, d] = Ve(0), [u, p] = Ve(e.width || 100), f = Ke(null), b = Ke(!1), S = Ke(e.field || e.column_name), A = Ke(r), x = Ke(l);
|
|
8208
|
+
je(() => {
|
|
8209
8209
|
S.current = e.field || e.column_name, A.current = r, x.current = l;
|
|
8210
8210
|
}, [e, r, l]);
|
|
8211
|
-
const y = e.is_frozen, k =
|
|
8211
|
+
const y = e.is_frozen, k = Ke(null), v = at((M) => {
|
|
8212
8212
|
const j = M - _, T = (i == null ? void 0 : i.minWidth) || 50;
|
|
8213
8213
|
return Math.max(T, u + j);
|
|
8214
8214
|
}, [_, u, i]), h = at((M) => {
|
|
@@ -8252,7 +8252,7 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8252
8252
|
document.body.classList.remove("column-resize-complete");
|
|
8253
8253
|
}, 50);
|
|
8254
8254
|
}, []);
|
|
8255
|
-
|
|
8255
|
+
je(() => (s && (document.addEventListener("mousemove", G), document.addEventListener("mouseup", w)), () => {
|
|
8256
8256
|
document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", w), k.current && cancelAnimationFrame(k.current);
|
|
8257
8257
|
}), [s, G, w]);
|
|
8258
8258
|
const z = y ? 60 : 10;
|
|
@@ -8275,8 +8275,8 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8275
8275
|
}));
|
|
8276
8276
|
}, style: { zIndex: s ? 100 : z, backgroundColor: s ? "#0066cc" : "transparent" } });
|
|
8277
8277
|
}, qa = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M9.66659 1.27325L8.72659 0.333252L4.99992 4.05992L1.27325 0.333252L0.333252 1.27325L4.05992 4.99992L0.333252 8.72659L1.27325 9.66659L4.99992 5.93992L8.72659 9.66659L9.66659 8.72659L5.93992 4.99992L9.66659 1.27325Z", fill: "currentColor" })), Bl = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M12.6667 4.66667L12.0889 12.0947C12.0387 12.8384 11.4193 13.4133 10.6733 13.4133H5.32667C4.58067 13.4133 3.96133 12.8384 3.91113 12.0947L3.33333 4.66667M6.66667 6.66667V10.6667M9.33333 6.66667V10.6667M10.6667 4.66667V2.66667C10.6667 2.29848 10.3682 2 10 2H6C5.63181 2 5.33333 2.29848 5.33333 2.66667V4.66667M2.66667 4.66667H13.3333", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), A1 = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M12 6.85714H6.85714V12H5.14286V6.85714H0V5.14286H5.14286V0H6.85714V5.14286H12V6.85714Z", fill: "#1F2B4D" })), z1 = ({ column: e, onClose: t }) => {
|
|
8278
|
-
const { state: i, dispatch: o, ACTION_TYPES: a } = Lt(), { columns: n, columnFilters: l } = i, [r, s] =
|
|
8279
|
-
|
|
8278
|
+
const { state: i, dispatch: o, ACTION_TYPES: a } = Lt(), { columns: n, columnFilters: l } = i, [r, s] = Ve("search"), [c, _] = Ve([{ column: e.field, pattern: "" }]), [d, u] = Ve([{ column: e.field, search_type: "contains", pattern: "" }]);
|
|
8279
|
+
je(() => {
|
|
8280
8280
|
const k = l[e.field];
|
|
8281
8281
|
if (k && k.length)
|
|
8282
8282
|
if (k.some((v) => {
|
|
@@ -8321,7 +8321,7 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8321
8321
|
}, children: "Apply" }) })] }) });
|
|
8322
8322
|
return Xo(y, document.body);
|
|
8323
8323
|
}, I1 = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M9.08047 15.1663H6.58047C6.4138 15.1663 6.26935 15.1108 6.14713 14.9997C6.02491 14.8886 5.95269 14.7497 5.93047 14.583L5.73047 13.033C5.58602 12.9775 5.45002 12.9108 5.32247 12.833C5.19447 12.7552 5.06935 12.6719 4.94713 12.583L3.49713 13.183C3.34158 13.2386 3.18602 13.2441 3.03047 13.1997C2.87491 13.1552 2.75269 13.0608 2.6638 12.9163L1.43047 10.7663C1.34158 10.6219 1.3138 10.4663 1.34713 10.2997C1.38047 10.133 1.4638 9.99967 1.59713 9.89968L2.84713 8.94967C2.83602 8.8719 2.83047 8.79679 2.83047 8.72434V8.27434C2.83047 8.20234 2.83602 8.12745 2.84713 8.04967L1.59713 7.09967C1.4638 6.99967 1.38047 6.86634 1.34713 6.69967C1.3138 6.53301 1.34158 6.37745 1.43047 6.23301L2.6638 4.08301C2.74158 3.92745 2.86091 3.83012 3.0218 3.79101C3.18313 3.75234 3.34158 3.76079 3.49713 3.81634L4.94713 4.41634C5.06935 4.32745 5.19713 4.24412 5.33047 4.16634C5.4638 4.08856 5.59713 4.0219 5.73047 3.96634L5.93047 2.41634C5.95269 2.24967 6.02491 2.11079 6.14713 1.99967C6.26935 1.88856 6.4138 1.83301 6.58047 1.83301H9.08047C9.24713 1.83301 9.39158 1.88856 9.5138 1.99967C9.63602 2.11079 9.70824 2.24967 9.73047 2.41634L9.93047 3.96634C10.0749 4.0219 10.2111 4.08856 10.3391 4.16634C10.4667 4.24412 10.5916 4.32745 10.7138 4.41634L12.1638 3.81634C12.3194 3.76079 12.4749 3.75523 12.6305 3.79967C12.786 3.84412 12.9082 3.93856 12.9971 4.08301L14.2305 6.23301C14.3194 6.37745 14.3471 6.53301 14.3138 6.69967C14.2805 6.86634 14.1971 6.99967 14.0638 7.09967L12.8138 8.04967C12.8249 8.12745 12.8305 8.20234 12.8305 8.27434V8.72434C12.8305 8.79679 12.8194 8.8719 12.7971 8.94967L14.0471 9.89968C14.1805 9.99967 14.2638 10.133 14.2971 10.2997C14.3305 10.4663 14.3027 10.6219 14.2138 10.7663L12.9805 12.8997C12.8916 13.0441 12.7667 13.1415 12.6058 13.1917C12.4445 13.2415 12.286 13.2386 12.1305 13.183L10.7138 12.583C10.5916 12.6719 10.4638 12.7552 10.3305 12.833C10.1971 12.9108 10.0638 12.9775 9.93047 13.033L9.73047 14.583C9.70824 14.7497 9.63602 14.8886 9.5138 14.9997C9.39158 15.1108 9.24713 15.1663 9.08047 15.1663ZM7.8638 10.833C8.50824 10.833 9.05824 10.6052 9.5138 10.1497C9.96935 9.69412 10.1971 9.14412 10.1971 8.49967C10.1971 7.85523 9.96935 7.30523 9.5138 6.84967C9.05824 6.39412 8.50824 6.16634 7.8638 6.16634C7.20824 6.16634 6.65535 6.39412 6.20513 6.84967C5.75535 7.30523 5.53047 7.85523 5.53047 8.49967C5.53047 9.14412 5.75535 9.69412 6.20513 10.1497C6.65535 10.6052 7.20824 10.833 7.8638 10.833ZM7.8638 9.49967C7.58602 9.49967 7.35002 9.40234 7.1558 9.20767C6.96113 9.01345 6.8638 8.77745 6.8638 8.49967C6.8638 8.2219 6.96113 7.9859 7.1558 7.79167C7.35002 7.59701 7.58602 7.49967 7.8638 7.49967C8.14158 7.49967 8.3778 7.59701 8.57247 7.79167C8.76669 7.9859 8.8638 8.2219 8.8638 8.49967C8.8638 8.77745 8.76669 9.01345 8.57247 9.20767C8.3778 9.40234 8.14158 9.49967 7.8638 9.49967ZM7.1638 13.833H8.48047L8.7138 12.0663C9.05824 11.9775 9.3778 11.8468 9.67247 11.6743C9.96669 11.5023 10.236 11.2941 10.4805 11.0497L12.1305 11.733L12.7805 10.5997L11.3471 9.51634C11.4027 9.36079 11.4416 9.19679 11.4638 9.02434C11.486 8.85234 11.4971 8.67745 11.4971 8.49967C11.4971 8.3219 11.486 8.14679 11.4638 7.97434C11.4416 7.80234 11.4027 7.63856 11.3471 7.48301L12.7805 6.39967L12.1305 5.26634L10.4805 5.96634C10.236 5.71079 9.96669 5.49679 9.67247 5.32434C9.3778 5.15234 9.05824 5.0219 8.7138 4.93301L8.49713 3.16634H7.18047L6.94713 4.93301C6.60269 5.0219 6.28335 5.15234 5.98913 5.32434C5.69447 5.49679 5.42491 5.70523 5.18047 5.94967L3.53047 5.26634L2.88047 6.39967L4.3138 7.46634C4.25824 7.63301 4.21935 7.79967 4.19713 7.96634C4.17491 8.13301 4.1638 8.31079 4.1638 8.49967C4.1638 8.67745 4.17491 8.84967 4.19713 9.01634C4.21935 9.18301 4.25824 9.34967 4.3138 9.51634L2.88047 10.5997L3.53047 11.733L5.18047 11.033C5.42491 11.2886 5.69447 11.5023 5.98913 11.6743C6.28335 11.8468 6.60269 11.9775 6.94713 12.0663L7.1638 13.833Z", fill: "#60697D" })), Fl = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 6 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M0.725024 8.3419C0.612116 8.23649 0.555663 8.1117 0.555663 7.96751C0.555663 7.8236 0.612116 7.69894 0.725024 7.59354L4.03321 4.50527L0.713734 1.40646C0.608354 1.30808 0.555664 1.18511 0.555664 1.03755C0.555664 0.889987 0.612118 0.763505 0.725025 0.658103C0.837932 0.552701 0.971615 0.5 1.12607 0.5C1.28023 0.5 1.41376 0.552701 1.52667 0.658103L5.32035 4.21015C5.36552 4.25231 5.39758 4.29798 5.41655 4.34717C5.43522 4.39635 5.44455 4.44906 5.44455 4.50527C5.44455 4.56148 5.43522 4.61419 5.41655 4.66337C5.39758 4.71256 5.36552 4.75823 5.32035 4.80039L1.51537 8.35244C1.40999 8.45081 1.28023 8.5 1.12607 8.5C0.971613 8.5 0.837931 8.4473 0.725024 8.3419Z", fill: "#60697D" })), N1 = ({ column: e, isOpen: t, openSubmenu: i, onMenuClose: o, onSubmenuToggle: a, onSort: n, onUnfreeze: l, onFreeze: r, onAutosizeAll: s, onWidthChange: c, onWrapText: _, triggerRef: d }) => {
|
|
8324
|
-
const u =
|
|
8324
|
+
const u = Ke(null), p = Ke(null), f = Ke(null), [b, S] = Ve({ top: 0, left: 0 }), [A, x] = Ve(null), [y, k] = Ve({ top: 0, left: 0 }), [v, h] = Ve(!1), [E, G] = Ve(!1), w = () => {
|
|
8325
8325
|
try {
|
|
8326
8326
|
n(e.id, "asc"), setTimeout(() => o(), 100);
|
|
8327
8327
|
} catch {
|
|
@@ -8337,7 +8337,7 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8337
8337
|
} catch {
|
|
8338
8338
|
}
|
|
8339
8339
|
};
|
|
8340
|
-
|
|
8340
|
+
je(() => {
|
|
8341
8341
|
if (v && p.current) {
|
|
8342
8342
|
const T = p.current.querySelector(".sort-az-button"), C = p.current.querySelector(".sort-za-button"), P = p.current.querySelector(".sort-reset-button");
|
|
8343
8343
|
return T && T.addEventListener("click", (F) => {
|
|
@@ -8350,13 +8350,13 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8350
8350
|
T && T.removeEventListener("click", w), C && C.removeEventListener("click", z), P && P.removeEventListener("click", M);
|
|
8351
8351
|
};
|
|
8352
8352
|
}
|
|
8353
|
-
}, [v, e.id, n, o]),
|
|
8353
|
+
}, [v, e.id, n, o]), je(() => {
|
|
8354
8354
|
if (t && d && d.current) {
|
|
8355
8355
|
const T = d.current.getBoundingClientRect();
|
|
8356
8356
|
S({ top: T.bottom + window.scrollY, left: T.right - 180 });
|
|
8357
8357
|
}
|
|
8358
8358
|
t || (h(!1), G(!1));
|
|
8359
|
-
}, [t, d]),
|
|
8359
|
+
}, [t, d]), je(() => {
|
|
8360
8360
|
var T, C, P;
|
|
8361
8361
|
if (v && p.current) {
|
|
8362
8362
|
for (; p.current.firstChild; ) p.current.removeChild(p.current.firstChild);
|
|
@@ -8393,7 +8393,7 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8393
8393
|
const C = window.innerWidth, P = T.right + 6 + 180 > C ? T.left - 180 - 6 : T.right + 6;
|
|
8394
8394
|
return { top: T.top, left: P };
|
|
8395
8395
|
};
|
|
8396
|
-
return
|
|
8396
|
+
return je(() => {
|
|
8397
8397
|
if (!t) return;
|
|
8398
8398
|
const T = (C) => {
|
|
8399
8399
|
var B;
|
|
@@ -8404,7 +8404,7 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8404
8404
|
return document.addEventListener("mousedown", T), () => {
|
|
8405
8405
|
document.removeEventListener("mousedown", T);
|
|
8406
8406
|
};
|
|
8407
|
-
}, [t, o, d]),
|
|
8407
|
+
}, [t, o, d]), je(() => {
|
|
8408
8408
|
if (E && f.current) {
|
|
8409
8409
|
for (; f.current.firstChild; ) f.current.removeChild(f.current.firstChild);
|
|
8410
8410
|
try {
|
|
@@ -8466,7 +8466,7 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8466
8466
|
T.stopPropagation(), _(e.id), o();
|
|
8467
8467
|
}, onMouseEnter: () => x("wrap"), onMouseLeave: () => x(null), children: "Wrap Text" })] }), v ? Xo(g.jsx("div", { className: "submenu-tooltip sort-submenu", style: { top: `${y.top}px`, left: `${y.left}px` }, ref: p }), document.body) : null, E ? Xo(g.jsx("div", { ref: f, className: "submenu-tooltip width-submenu", style: { top: `${y.top}px`, left: `${y.left}px` } }), document.body) : null] }), document.body) : null;
|
|
8468
8468
|
}, cr = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M7.15604 14.8024C7.0149 14.6706 6.94434 14.5146 6.94434 14.3344C6.94434 14.1545 7.0149 13.9987 7.15604 13.8669L11.2913 10.0066L7.14192 6.13307C7.0102 6.0101 6.94434 5.85639 6.94434 5.67194C6.94434 5.48748 7.0149 5.32938 7.15604 5.19763C7.29717 5.06588 7.46427 5 7.65735 5C7.85004 5 8.01696 5.06588 8.15809 5.19763L12.9002 9.63768C12.9567 9.69038 12.9967 9.74747 13.0204 9.80896C13.0438 9.87044 13.0554 9.93632 13.0554 10.0066C13.0554 10.0769 13.0438 10.1427 13.0204 10.2042C12.9967 10.2657 12.9567 10.3228 12.9002 10.3755L8.14398 14.8155C8.01225 14.9385 7.85004 15 7.65735 15C7.46427 15 7.29717 14.9341 7.15604 14.8024Z", fill: "#60697D" })), G1 = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M12.6655 5.19584C12.4044 4.93472 11.9834 4.93472 11.7223 5.19584L7.29381 9.6243C7.08598 9.83213 7.08598 10.1679 7.29381 10.3757L11.7223 14.8042C11.9834 15.0653 12.4044 15.0653 12.6655 14.8042C12.9266 14.543 12.9266 14.122 12.6655 13.8609L8.80727 9.99733L12.6708 6.13376C12.9266 5.87796 12.9266 5.45164 12.6655 5.19584Z", fill: "#60697D" })), L1 = ({ isExpanded: e, onClick: t, disabled: i = !1 }) => g.jsx("div", { className: "ia-table-column-group-toggle " + (i ? "disabled" : ""), onClick: i ? void 0 : t, style: { cursor: i ? "default" : "pointer", display: "inline-flex", alignItems: "center", justifyContent: "center", marginRight: "4px", opacity: i ? 0.5 : 1 }, children: e ? g.jsx(G1, { width: "16px", height: "16px" }) : g.jsx(cr, { width: "16px", height: "16px" }) }), Rc = ({ placeholder: e = "", label: t = "", value: i = "", onChange: o, type: a = "text", disabled: n = !1, error: l = "", leftIcon: r = null, rightIcon: s = null, className: c = "", ..._ }) => {
|
|
8469
|
-
const d =
|
|
8469
|
+
const d = Ke(null), u = at(() => {
|
|
8470
8470
|
var f;
|
|
8471
8471
|
(f = d.current) == null || f.focus();
|
|
8472
8472
|
}, []), p = ["ia-table-input-container d-flex align-items-center", n ? "ia-table-input-disabled" : "", l ? "ia-table-input-error" : "", r ? "has-left-icon" : "", s ? "has-right-icon" : "", c].filter(Boolean).join(" ");
|
|
@@ -8474,7 +8474,7 @@ const O1 = ({ column: e, index: t, defaultColDef: i = { minWidth: 150 } }) => {
|
|
|
8474
8474
|
};
|
|
8475
8475
|
Rc.propTypes = { placeholder: dt.string, label: dt.string, value: dt.string, onChange: dt.func.isRequired, type: dt.string, disabled: dt.bool, error: dt.string, leftIcon: dt.node, rightIcon: dt.node, className: dt.string };
|
|
8476
8476
|
const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M5.35163 10.7033C3.85592 10.7033 2.59005 10.1852 1.55403 9.14923C0.51801 8.11321 0 6.84734 0 5.35163C0 3.85592 0.51801 2.59005 1.55403 1.55403C2.59005 0.51801 3.85592 0 5.35163 0C6.84734 0 8.11321 0.51801 9.14923 1.55403C10.1852 2.59005 10.7033 3.85592 10.7033 5.35163C10.7033 5.9554 10.6072 6.52487 10.4151 7.06003C10.223 7.5952 9.96226 8.06861 9.63293 8.48027L13.7736 12.6209C13.9245 12.7719 14 12.964 14 13.1973C14 13.4305 13.9245 13.6226 13.7736 13.7736C13.6226 13.9245 13.4305 14 13.1973 14C12.964 14 12.7719 13.9245 12.6209 13.7736L8.48027 9.63293C8.06861 9.96226 7.5952 10.223 7.06003 10.4151C6.52487 10.6072 5.9554 10.7033 5.35163 10.7033ZM5.35163 9.0566C6.38079 9.0566 7.25557 8.6964 7.97599 7.97599C8.6964 7.25557 9.0566 6.38079 9.0566 5.35163C9.0566 4.32247 8.6964 3.44768 7.97599 2.72727C7.25557 2.00686 6.38079 1.64666 5.35163 1.64666C4.32247 1.64666 3.44768 2.00686 2.72727 2.72727C2.00686 3.44768 1.64666 4.32247 1.64666 5.35163C1.64666 6.38079 2.00686 7.25557 2.72727 7.97599C3.44768 8.6964 4.32247 9.0566 5.35163 9.0566Z", fill: "#60697D" })), $1 = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 4 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M4 14C4 14.55 3.80417 15.0208 3.4125 15.4125C3.02083 15.8042 2.55 16 2 16C1.45 16 0.979167 15.8042 0.5875 15.4125C0.195833 15.0208 0 14.55 0 14C0 13.45 0.195833 12.9792 0.5875 12.5875C0.979167 12.1958 1.45 12 2 12C2.55 12 3.02083 12.1958 3.4125 12.5875C3.80417 12.9792 4 13.45 4 14ZM4 8C4 8.55 3.80417 9.02083 3.4125 9.4125C3.02083 9.80417 2.55 10 2 10C1.45 10 0.979167 9.80417 0.5875 9.4125C0.195833 9.02083 0 8.55 0 8C0 7.45 0.195833 6.97917 0.5875 6.5875C0.979167 6.19583 1.45 6 2 6C2.55 6 3.02083 6.19583 3.4125 6.5875C3.80417 6.97917 4 7.45 4 8ZM4 2C4 2.55 3.80417 3.02083 3.4125 3.4125C3.02083 3.80417 2.55 4 2 4C1.45 4 0.979167 3.80417 0.5875 3.4125C0.195833 3.02083 0 2.55 0 2C0 1.45 0.195833 0.979166 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0C2.55 0 3.02083 0.195833 3.4125 0.5875C3.80417 0.979166 4 1.45 4 2Z", fill: "#60697D" })), Yl = ({ column: e, index: t, onToggle: i, isExpandable: o, selectable: a, isSelected: n = !1 }) => {
|
|
8477
|
-
|
|
8477
|
+
je(() => {
|
|
8478
8478
|
const Z = document.createElement("style");
|
|
8479
8479
|
return Z.textContent = `
|
|
8480
8480
|
.ia-table-header-cell.dragging {
|
|
@@ -8490,30 +8490,30 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8490
8490
|
document.head.removeChild(Z);
|
|
8491
8491
|
};
|
|
8492
8492
|
}, []);
|
|
8493
|
-
const { state: l, dispatch: r, ACTION_TYPES: s } = Lt(), { sortState: c, columnFilters: _, frozenColumns: d, defaultColDef: u, columnMap: p } = l, { field: f, headerName: b, width: S = 100, is_sortable: A = !0, is_searchable: x = !0, filterable: y = !0, resizable: k = !0, align: v = "left", hidden: h = !1, frozen: E = !1, is_frozen: G = !1, hasChildren: w = !1, children: z = [], autoHeight: M = !1 } = e, j =
|
|
8494
|
-
|
|
8493
|
+
const { state: l, dispatch: r, ACTION_TYPES: s } = Lt(), { sortState: c, columnFilters: _, frozenColumns: d, defaultColDef: u, columnMap: p } = l, { field: f, headerName: b, width: S = 100, is_sortable: A = !0, is_searchable: x = !0, filterable: y = !0, resizable: k = !0, align: v = "left", hidden: h = !1, frozen: E = !1, is_frozen: G = !1, hasChildren: w = !1, children: z = [], autoHeight: M = !1 } = e, j = Ke(null), [T, C] = Ve(!1), [P, F] = Ve(!1), [B, U] = Ve(0), [q, ee] = Ve(!1), [J, H] = Ve(null), [K, re] = Ve(0), [ve, oe] = Ve(!1), [Q, le] = Ve(null), [he, ce] = Ve(""), [_e, ne] = Ve(!1), fe = Ke(), De = Ke(""), ue = _[f] && _[f].length > 0, ke = x === !0 && (e.advanceSearchEnabled === !1 || e.advanceSearchEnabled === void 0), Se = E || G, Ce = Se ? d.positions[f] : null, $e = Se ? d.indexes.findIndex((Z) => l.columns[Z].field === f) : null, xe = c.column === f;
|
|
8494
|
+
je(() => {
|
|
8495
8495
|
c.column;
|
|
8496
|
-
}, [c, f, xe]),
|
|
8496
|
+
}, [c, f, xe]), je(() => {
|
|
8497
8497
|
const Z = () => {
|
|
8498
|
-
const
|
|
8499
|
-
F(
|
|
8498
|
+
const Ye = document.body.classList.contains("column-resizing");
|
|
8499
|
+
F(Ye), Ye && re(Date.now());
|
|
8500
8500
|
}, Ae = new MutationObserver(Z);
|
|
8501
8501
|
return Ae.observe(document.body, { attributes: !0, attributeFilter: ["class"] }), Z(), () => Ae.disconnect();
|
|
8502
|
-
}, []),
|
|
8502
|
+
}, []), je(() => {
|
|
8503
8503
|
const Z = (Ae) => {
|
|
8504
|
-
const
|
|
8505
|
-
|
|
8504
|
+
const Ye = Ae.target.closest(".column-menu-dropdown"), Ze = Ae.target.closest(".column-menu-icon");
|
|
8505
|
+
Ye || Ze || (oe(!1), le(null));
|
|
8506
8506
|
};
|
|
8507
8507
|
return document.addEventListener("mousedown", Z), () => {
|
|
8508
8508
|
document.removeEventListener("mousedown", Z);
|
|
8509
8509
|
};
|
|
8510
8510
|
}, []);
|
|
8511
|
-
const Le =
|
|
8511
|
+
const Le = ht(() => {
|
|
8512
8512
|
const Z = e.width;
|
|
8513
8513
|
return { width: `${Z}px`, minWidth: `${Z}px`, maxWidth: `${Z}px`, flex: `0 0 ${Z}px`, cursor: A ? "pointer" : "default", padding: "9.5px 16px", borderRight: "1px solid var(--header-cell-border-color)", borderTop: "1px solid var(--header-cell-border-color)", display: "flex", alignItems: "center", justifyContent: w || v === "center" ? "center" : v === "right" ? "flex-end" : "flex-start", boxSizing: "border-box", position: Se ? "sticky" : "absolute", ...!Se && { left: e.leftTotalWidth - Z + "px" }, ...Se && { left: `${Ce + (a ? 0 : -40)}px`, zIndex: $e !== null ? 60 - $e : 30, backgroundColor: n ? "var(--header-cell-selected-bg-color)" : "var(--header-cell-bg-color)" }, ...w && { fontWeight: "bold" } };
|
|
8514
8514
|
}, [e.width, w, v, Se, a, Ce, e, t]);
|
|
8515
8515
|
if (h) return null;
|
|
8516
|
-
|
|
8516
|
+
je(() => {
|
|
8517
8517
|
if (_e) return fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => {
|
|
8518
8518
|
const Z = he.trim();
|
|
8519
8519
|
if (Z !== De.current) {
|
|
@@ -8530,7 +8530,7 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8530
8530
|
}, [he, _e, f, r, s]);
|
|
8531
8531
|
const Me = (Z) => {
|
|
8532
8532
|
var Y, te, ae, de;
|
|
8533
|
-
const { filteredData: Ae, columnFilters:
|
|
8533
|
+
const { filteredData: Ae, columnFilters: Ye, columns: Ze, defaultColDef: Fe } = l, W = (se, ie = "14px Arial") => {
|
|
8534
8534
|
const me = document.createElement("canvas").getContext("2d");
|
|
8535
8535
|
if (me.font = ie, se == null) return 32;
|
|
8536
8536
|
const Ie = String(se || "");
|
|
@@ -8538,7 +8538,7 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8538
8538
|
}, m = Ze.find((se) => se.field === Z);
|
|
8539
8539
|
if (!m) return;
|
|
8540
8540
|
let D = W(m.headerName || m.field);
|
|
8541
|
-
(m.filterable || m.sortable) && (D += 50),
|
|
8541
|
+
(m.filterable || m.sortable) && (D += 50), Ye[Z] && Ye[Z].length > 0 && (D += 20);
|
|
8542
8542
|
const O = Ae.slice(0, 100);
|
|
8543
8543
|
m.cellRenderer !== void 0 ? (Y = m.cellClassName) != null && Y.includes("action") || (te = m.field) != null && te.includes("action") ? D = Math.max(D, 120) : ((ae = m.cellClassName) != null && ae.includes("status") || (de = m.field) != null && de.includes("status")) && (D = Math.max(D, 100)) : O.forEach((se) => {
|
|
8544
8544
|
try {
|
|
@@ -8554,7 +8554,7 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8554
8554
|
} catch {
|
|
8555
8555
|
}
|
|
8556
8556
|
});
|
|
8557
|
-
const N = m.minWidth || (
|
|
8557
|
+
const N = m.minWidth || (Fe == null ? void 0 : Fe.minWidth) || 150, R = m.maxWidth || 500, I = Math.max(N, Math.min(D, R));
|
|
8558
8558
|
let L = I, V = 0;
|
|
8559
8559
|
if (l.tableRef && l.tableRef.current) {
|
|
8560
8560
|
const se = l.tableRef.current.querySelector(".ia-table-table-container") || l.tableRef.current.closest(".ia-table-table-container");
|
|
@@ -8599,13 +8599,13 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8599
8599
|
Z.preventDefault(), H(null);
|
|
8600
8600
|
try {
|
|
8601
8601
|
const Ae = JSON.parse(Z.dataTransfer.getData("text/plain"));
|
|
8602
|
-
let
|
|
8603
|
-
if (
|
|
8602
|
+
let Ye = e;
|
|
8603
|
+
if (Ye.emptyCell && (Ye = e.childColumn), Ae.field === Ye.field) return void ee(!1);
|
|
8604
8604
|
let Ze = Ae.field;
|
|
8605
8605
|
Ae.path.length > 1 && (Ze = _o(Ae.path, Ae.path.length - 1, Ae.field));
|
|
8606
|
-
const
|
|
8607
|
-
if (!
|
|
8608
|
-
r({ type: s.REORDER_COLUMNS, payload: { sourceColumn:
|
|
8606
|
+
const Fe = p[Ze.toLowerCase()];
|
|
8607
|
+
if (!Fe) return void ee(!1);
|
|
8608
|
+
r({ type: s.REORDER_COLUMNS, payload: { sourceColumn: Fe, targetColumn: Ye } });
|
|
8609
8609
|
} catch (Ae) {
|
|
8610
8610
|
console.error("Error during drop:", Ae);
|
|
8611
8611
|
}
|
|
@@ -8634,18 +8634,18 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8634
8634
|
} }, isOpen: ve, openSubmenu: Q, onMenuClose: () => oe(!1), onSubmenuToggle: (Z) => {
|
|
8635
8635
|
le(Q === Z ? null : Z);
|
|
8636
8636
|
}, onSort: (Z, Ae) => {
|
|
8637
|
-
((
|
|
8637
|
+
((Ye, Ze) => {
|
|
8638
8638
|
if (!A) return;
|
|
8639
|
-
const
|
|
8639
|
+
const Fe = Ze === "none" ? gn : Ze === "asc" ? Ho : Ze === "desc" ? mn : Ho, W = { column: Fe === gn ? null : f, direction: Fe };
|
|
8640
8640
|
if (r({ type: s.SET_SORT, payload: W }), setTimeout(() => {
|
|
8641
|
-
}, 0),
|
|
8641
|
+
}, 0), Fe !== gn) try {
|
|
8642
8642
|
const m = [...l.filteredData].sort((D, O) => {
|
|
8643
8643
|
const N = D[f] !== void 0 ? D[f] : null, R = O[f] !== void 0 ? O[f] : null;
|
|
8644
8644
|
if (l.filteredData.indexOf(D), N === null && R === null) return 0;
|
|
8645
|
-
if (N === null) return
|
|
8646
|
-
if (R === null) return
|
|
8645
|
+
if (N === null) return Fe === Ho ? -1 : 1;
|
|
8646
|
+
if (R === null) return Fe === Ho ? 1 : -1;
|
|
8647
8647
|
let I = 0;
|
|
8648
|
-
return typeof N == "string" && typeof R == "string" ? I = N.localeCompare(R) : typeof N == "number" && typeof R == "number" ? I = N - R : N > R ? I = 1 : N < R && (I = -1),
|
|
8648
|
+
return typeof N == "string" && typeof R == "string" ? I = N.localeCompare(R) : typeof N == "number" && typeof R == "number" ? I = N - R : N > R ? I = 1 : N < R && (I = -1), Fe === mn ? -I : I;
|
|
8649
8649
|
});
|
|
8650
8650
|
r({ type: s.SET_FILTERED_DATA, payload: m });
|
|
8651
8651
|
} catch {
|
|
@@ -8657,33 +8657,33 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8657
8657
|
}, onFreeze: () => {
|
|
8658
8658
|
r && r({ type: s.TOGGLE_FREEZE_COLUMN, payload: { field: f, frozen: !0, options: { preventIfExceedsMaxWidth: !0 } } });
|
|
8659
8659
|
}, onAutosizeAll: () => {
|
|
8660
|
-
const { columns: Z, filteredData: Ae, columnFilters:
|
|
8660
|
+
const { columns: Z, filteredData: Ae, columnFilters: Ye } = l, Ze = (O, N = "14px Arial") => {
|
|
8661
8661
|
const R = document.createElement("canvas").getContext("2d");
|
|
8662
8662
|
if (R.font = N, O == null) return 32;
|
|
8663
8663
|
const I = String(O || "");
|
|
8664
8664
|
return R.measureText(I).width + 32;
|
|
8665
8665
|
};
|
|
8666
|
-
let
|
|
8666
|
+
let Fe = 0;
|
|
8667
8667
|
if (l.tableRef && l.tableRef.current) {
|
|
8668
8668
|
const O = l.tableRef.current.querySelector(".ia-table-table-container") || l.tableRef.current.closest(".ia-table-table-container");
|
|
8669
8669
|
if (O) {
|
|
8670
|
-
|
|
8670
|
+
Fe = O.clientWidth;
|
|
8671
8671
|
const N = window.getComputedStyle(O);
|
|
8672
|
-
|
|
8672
|
+
Fe -= (parseInt(N.paddingLeft, 10) || 0) + (parseInt(N.paddingRight, 10) || 0) + (parseInt(N.borderLeftWidth, 10) || 0) + (parseInt(N.borderRightWidth, 10) || 0);
|
|
8673
8673
|
}
|
|
8674
8674
|
}
|
|
8675
|
-
if (
|
|
8675
|
+
if (Fe <= 0) {
|
|
8676
8676
|
const O = document.getElementById(l.tableId);
|
|
8677
8677
|
if (O) {
|
|
8678
8678
|
const N = O.querySelector(".ia-table-table-container");
|
|
8679
8679
|
if (N) {
|
|
8680
|
-
|
|
8680
|
+
Fe = N.clientWidth;
|
|
8681
8681
|
const R = window.getComputedStyle(N);
|
|
8682
|
-
|
|
8682
|
+
Fe -= (parseInt(R.paddingLeft, 10) || 0) + (parseInt(R.paddingRight, 10) || 0) + (parseInt(R.borderLeftWidth, 10) || 0) + (parseInt(R.borderRightWidth, 10) || 0);
|
|
8683
8683
|
}
|
|
8684
8684
|
}
|
|
8685
8685
|
}
|
|
8686
|
-
|
|
8686
|
+
Fe <= 0 && (Fe = Z.reduce((O, N) => O + (N.width || 100), 0));
|
|
8687
8687
|
const W = {}, m = Z.filter((O) => !O.hidden);
|
|
8688
8688
|
let D = 0;
|
|
8689
8689
|
if (m.forEach((O) => {
|
|
@@ -8702,8 +8702,8 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8702
8702
|
const R = O.cellRenderer !== void 0;
|
|
8703
8703
|
let I = ((ie) => {
|
|
8704
8704
|
let me = Ze(ie.headerName || ie.field);
|
|
8705
|
-
if (
|
|
8706
|
-
const Ie = ie.children.reduce((Be,
|
|
8705
|
+
if (Ye[ie.field] && Ye[ie.field].length > 0 && (me += 20), (ie.filterable || ie.sortable) && (me += 50), ie.hasChildren && ie.children && ie.children.length > 0) {
|
|
8706
|
+
const Ie = ie.children.reduce((Be, He) => Be + (He.width || 100), 0);
|
|
8707
8707
|
return Math.max(me, Ie);
|
|
8708
8708
|
}
|
|
8709
8709
|
return me;
|
|
@@ -8724,8 +8724,8 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8724
8724
|
});
|
|
8725
8725
|
const L = O.minWidth || (u == null ? void 0 : u.minWidth) || 150, V = O.maxWidth || 500, Y = Math.max(L, Math.min(I, V));
|
|
8726
8726
|
W[O.field] = Y, D += Y;
|
|
8727
|
-
}),
|
|
8728
|
-
const O =
|
|
8727
|
+
}), Fe > 0) {
|
|
8728
|
+
const O = Fe - D;
|
|
8729
8729
|
if (O > 0) {
|
|
8730
8730
|
const R = O / m.length;
|
|
8731
8731
|
m.forEach((I) => {
|
|
@@ -8742,19 +8742,19 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8742
8742
|
let N = 0;
|
|
8743
8743
|
if (m.forEach((R) => {
|
|
8744
8744
|
N += W[R.field];
|
|
8745
|
-
}), m.length > 0 && Math.abs(N -
|
|
8746
|
-
const R = m[m.length - 1], I = W[R.field], L =
|
|
8745
|
+
}), m.length > 0 && Math.abs(N - Fe) > 1) {
|
|
8746
|
+
const R = m[m.length - 1], I = W[R.field], L = Fe - N, V = R.minWidth || (u == null ? void 0 : u.minWidth) || 150;
|
|
8747
8747
|
W[R.field] = Math.max(V, I + L);
|
|
8748
8748
|
}
|
|
8749
8749
|
}
|
|
8750
8750
|
r({ type: s.SET_COLUMNS_WIDTH, payload: { widths: W, isAutoWidth: !0 } }), oe(!1);
|
|
8751
|
-
}, onWidthChange: (Z, Ae) => ((
|
|
8752
|
-
if (
|
|
8753
|
-
if (
|
|
8751
|
+
}, onWidthChange: (Z, Ae) => ((Ye) => {
|
|
8752
|
+
if (Ye !== "auto") {
|
|
8753
|
+
if (Ye === "original") {
|
|
8754
8754
|
let Ze = 100;
|
|
8755
|
-
const
|
|
8756
|
-
|
|
8757
|
-
} else r({ type: s.SET_COLUMN_WIDTH, payload: { field: f, width:
|
|
8755
|
+
const Fe = l.columns.find((W) => W.field === f);
|
|
8756
|
+
Fe && (Ze = Fe.originalWidth || Fe.defaultWidth || 100), r({ type: s.SET_COLUMN_WIDTH, payload: { field: f, width: Ze, isAutoWidth: !1 } });
|
|
8757
|
+
} else r({ type: s.SET_COLUMN_WIDTH, payload: { field: f, width: Ye === "auto" ? 100 : Ye } });
|
|
8758
8758
|
oe(!1);
|
|
8759
8759
|
} else Me(f);
|
|
8760
8760
|
})(Ae), onWrapText: () => {
|
|
@@ -8767,8 +8767,8 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8767
8767
|
const l = t === "currentPage", r = t === "all";
|
|
8768
8768
|
return g.jsx("div", { className: "ia-table-selection-dropdown " + (e ? "ia-table-open" : ""), children: g.jsxs("div", { className: "ia-table-dropdown-menu", children: [g.jsx("div", { className: `ia-table-dropdown-item ${r ? "ia-table-disabled" : ""} ${l ? "ia-table-current-active" : ""}`, onClick: r ? void 0 : i, children: g.jsx("div", { className: "ia-table-item-wrapper", children: g.jsx("span", { className: "ia-table-item-text ia-table-current-page-item", children: "Select current page records" }) }) }), g.jsx("div", { className: `ia-table-dropdown-item ${l ? "ia-table-disabled" : ""} ${r ? "ia-table-all-active" : ""}`, onClick: l ? void 0 : o, children: g.jsx("div", { className: "ia-table-item-wrapper", children: g.jsx("span", { className: "ia-table-item-text ia-table-all-records-item", children: "Select all records" }) }) })] }) });
|
|
8769
8769
|
}, W1 = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 9 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M0.755999 4.04879L2.99599 6.24399L7.81198 0.755999", stroke: "#4259EE", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), B1 = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 8 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M0.8 0.8H7.2", stroke: "#4259EE", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Cc = Fn(({ indeterminate: e, checked: t, onChange: i, disabled: o }, a) => {
|
|
8770
|
-
const n =
|
|
8771
|
-
return
|
|
8770
|
+
const n = Ke(null);
|
|
8771
|
+
return je(() => {
|
|
8772
8772
|
n.current && (n.current.indeterminate = e);
|
|
8773
8773
|
}, [e]), g.jsxs("div", { className: "ia-table-selection-checkbox-wrapper", style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: [g.jsx("input", { ref: (l) => {
|
|
8774
8774
|
n.current = l, a && (typeof a == "function" ? a(l) : a.current = l);
|
|
@@ -8776,8 +8776,8 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8776
8776
|
l.stopPropagation();
|
|
8777
8777
|
}, disabled: o, className: "ia-table-selection-checkbox " + (e ? "indeterminate" : ""), "aria-checked": e ? "mixed" : t }), g.jsxs("span", { className: "ia-table-selection-checkbox-custom", children: [t && !e && g.jsx(W1, { className: "ia-table-checkbox-check-icon" }), e && g.jsx(B1, { className: "ia-table-checkbox-partial-icon" })] })] });
|
|
8778
8778
|
}), Da = Li.memo(() => {
|
|
8779
|
-
const [e, t] =
|
|
8780
|
-
|
|
8779
|
+
const [e, t] = Ve(!1), [i, o] = Ve(null), [a, n] = Ve(/* @__PURE__ */ new Set()), [l, r] = Ve({ top: 0, left: 0 }), s = Ke(null), c = Ke(null), _ = Ke(null), d = Ke(0), { state: { selectedRows: u, filteredData: p, pagination: f, uniqueIdField: b, serverSide: S = !1, prevAction: A = "", checkConfiguration: x = [], isSelectAllRecords: y = !1 }, dispatch: k, ACTION_TYPES: v } = Lt();
|
|
8780
|
+
je(() => {
|
|
8781
8781
|
const T = (C) => {
|
|
8782
8782
|
c.current && !c.current.contains(C.target) && t(!1);
|
|
8783
8783
|
};
|
|
@@ -8791,8 +8791,8 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8791
8791
|
}, [p, f, b]), G = at(() => {
|
|
8792
8792
|
const T = E();
|
|
8793
8793
|
return T.length > 0 && T.every((C) => u.includes(C));
|
|
8794
|
-
}, [E, u]), w =
|
|
8795
|
-
|
|
8794
|
+
}, [E, u]), w = ht(() => G(), [G]);
|
|
8795
|
+
je(() => {
|
|
8796
8796
|
if (S && i === "all") {
|
|
8797
8797
|
const T = E();
|
|
8798
8798
|
if (T.length > 0) {
|
|
@@ -8800,7 +8800,7 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8800
8800
|
C.length > 0 && k({ type: v.SET_SELECTED_ROWS, payload: [...u, ...C] });
|
|
8801
8801
|
}
|
|
8802
8802
|
}
|
|
8803
|
-
}, [h, S, i, k, v, E]),
|
|
8803
|
+
}, [h, S, i, k, v, E]), je(() => {
|
|
8804
8804
|
if (_.current === null) return void (_.current = h);
|
|
8805
8805
|
if (d.current === u.length && _.current === h && !y) return;
|
|
8806
8806
|
d.current = u.length;
|
|
@@ -8854,7 +8854,7 @@ const P1 = Za(Rc), jl = (e) => rt.createElement("svg", { width: "1em", height: "
|
|
|
8854
8854
|
}
|
|
8855
8855
|
t(!1);
|
|
8856
8856
|
}, [i, k, v, p, b, x]);
|
|
8857
|
-
|
|
8857
|
+
je(() => {
|
|
8858
8858
|
if (e && c.current) {
|
|
8859
8859
|
const T = () => {
|
|
8860
8860
|
const C = c.current.getBoundingClientRect();
|
|
@@ -8924,13 +8924,13 @@ const j1 = (e, t = { fontSize: 14, fontWeight: "700", lineHeight: 21 }) => {
|
|
|
8924
8924
|
a[l.field] = { lineCount: c, totalHeight: _ }, c > i && (i = c, o = _);
|
|
8925
8925
|
}), { maxLineCount: i, maxHeight: o, columnLineMap: a });
|
|
8926
8926
|
}, Y1 = ({ selectable: e = !1, onSortChange: t, frozenOnly: i = null, virtualizedHeaderRows: o = [], columnHorizontalScrollContainerRef: a = {}, columnScrollHandlerRef: n = {}, headerRef: l, ...r }) => {
|
|
8927
|
-
const { state: { columns: s, filteredData: c, selectedRows: _, headerRowHeightwithIndex: d }, dispatch: u } = Lt(), { filteredColumns: p, headerRows: f, virtualizedColumns: b } = r, [S, A] =
|
|
8928
|
-
return
|
|
8927
|
+
const { state: { columns: s, filteredData: c, selectedRows: _, headerRowHeightwithIndex: d }, dispatch: u } = Lt(), { filteredColumns: p, headerRows: f, virtualizedColumns: b } = r, [S, A] = Ve(!1), x = Ke(!1);
|
|
8928
|
+
return je(() => {
|
|
8929
8929
|
if (c.length > 0) {
|
|
8930
8930
|
const y = _.length >= c.length;
|
|
8931
8931
|
A(y);
|
|
8932
8932
|
} else A(!1);
|
|
8933
|
-
}, [_.length, c.length]),
|
|
8933
|
+
}, [_.length, c.length]), je(() => {
|
|
8934
8934
|
const y = {};
|
|
8935
8935
|
f.forEach((k, v) => {
|
|
8936
8936
|
const h = k.filter((z) => z.autoHeight), { maxLineCount: E, maxHeight: G } = j1(h), w = i ? `frozen_${v}` : `normal_${v}`;
|
|
@@ -8945,8 +8945,8 @@ const j1 = (e, t = { fontSize: 14, fontWeight: "700", lineHeight: 21 }) => {
|
|
|
8945
8945
|
let En = -1, Sn = -1, Eo = null;
|
|
8946
8946
|
const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef: a, ...n }) => {
|
|
8947
8947
|
const { state: l } = Lt(), { rowDragManaged: r } = l, { handleDragStart: s, handleDragEnd: c, handleDragLeave: _, handleDragOver: d, handleDrop: u } = (({ rowIndex: b, rowData: S, bodyContainerRef: A }) => {
|
|
8948
|
-
const { state: x, dispatch: y, ACTION_TYPES: k } = Lt(), { draggedRow: v } = x, h =
|
|
8949
|
-
|
|
8948
|
+
const { state: x, dispatch: y, ACTION_TYPES: k } = Lt(), { draggedRow: v } = x, h = Ke(null), E = Ke(null), [G, w] = Ve(!1), z = Ke({ x: 0, y: 0 });
|
|
8949
|
+
je(() => {
|
|
8950
8950
|
h.current && !A.current && (A.current = h.current.closest(".ia-table"));
|
|
8951
8951
|
}, [G]);
|
|
8952
8952
|
const M = (C, P) => {
|
|
@@ -9051,7 +9051,7 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9051
9051
|
return a === 0 ? (s = !1, r = Math.max(1, e.page - 1), l = (e.page - 1) * n) : a < n ? (s = !1, l = (e.page - 1) * n + a, r = e.page) : a === n && (i && typeof i == "number" ? (s = i > e.page * n, l = i, r = Math.max(1, Math.ceil(i / n))) : (s = !0, l = void 0, r = e.page + 1)), { rows: o, lastRow: i, hasMore: s, totalItems: l, totalPages: r };
|
|
9052
9052
|
}, V1 = ({ groupId: e, isRowGroupEnabled: t, loadingRef: i }) => {
|
|
9053
9053
|
var C, P, F, B;
|
|
9054
|
-
const { state: o } = Lt(), { rowGroupState: a, api: n, pagination: { pageSize: l } } = o, { loadedData: r, loading: s, pagination: c } = a, _ =
|
|
9054
|
+
const { state: o } = Lt(), { rowGroupState: a, api: n, pagination: { pageSize: l } } = o, { loadedData: r, loading: s, pagination: c } = a, _ = Ke(!1), [d, u] = Ve(!1), [p, f] = Ve(null), b = Ke(null), S = Ke({ token: null, isActive: !1 }), A = Ke(null), x = (B = (F = (P = (C = o.api) == null ? void 0 : C.getInfiniteCache) == null ? void 0 : P.call(C)) == null ? void 0 : F.params) == null ? void 0 : B.datasource;
|
|
9055
9055
|
!A.current && n && x && (A.current = /* @__PURE__ */ ((U, q) => {
|
|
9056
9056
|
const ee = /* @__PURE__ */ new Map();
|
|
9057
9057
|
return async (J, H = {}) => {
|
|
@@ -9070,13 +9070,13 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9070
9070
|
try {
|
|
9071
9071
|
if (typeof q != "function") {
|
|
9072
9072
|
if (q && typeof q.getRows == "function") return new Promise((ot, Z) => {
|
|
9073
|
-
const Ae = { startRow: (H.page - 1) * H.pageSize, endRow: H.page * H.pageSize, successCallback: (
|
|
9074
|
-
const
|
|
9075
|
-
U.setRowGroupPagination(J, { ...fe, page: H.page || fe.page, pageSize: H.pageSize || fe.pageSize, totalPages:
|
|
9073
|
+
const Ae = { startRow: (H.page - 1) * H.pageSize, endRow: H.page * H.pageSize, successCallback: (Ye, Ze) => {
|
|
9074
|
+
const Fe = Hl(H, Ye, Ze);
|
|
9075
|
+
U.setRowGroupPagination(J, { ...fe, page: H.page || fe.page, pageSize: H.pageSize || fe.pageSize, totalPages: Fe.totalPages, totalItems: Fe.totalItems, hasMore: Fe.hasMore, lastUpdated: Date.now() });
|
|
9076
9076
|
const W = H.page > 1;
|
|
9077
|
-
U.setRowGroupData(J,
|
|
9078
|
-
}, failCallback: (
|
|
9079
|
-
console.error("AG Grid data source error:",
|
|
9077
|
+
U.setRowGroupData(J, Fe.rows, W), ot(Fe.rows);
|
|
9078
|
+
}, failCallback: (Ye) => {
|
|
9079
|
+
console.error("AG Grid data source error:", Ye), Z(Ye);
|
|
9080
9080
|
}, ...De, request: { groupKeys: [J], ...fe, ...H, startRow: (H.page - 1) * H.pageSize, endRow: H.page * H.pageSize } };
|
|
9081
9081
|
q.getRows(Ae);
|
|
9082
9082
|
});
|
|
@@ -9099,16 +9099,16 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9099
9099
|
}
|
|
9100
9100
|
};
|
|
9101
9101
|
})(n, x));
|
|
9102
|
-
const y = r[e] || [], k = s[e] || !1, v = c[e] || { page: 1, pageSize: l, hasMore: !0 }, h = v.hasMore, E =
|
|
9103
|
-
|
|
9102
|
+
const y = r[e] || [], k = s[e] || !1, v = c[e] || { page: 1, pageSize: l, hasMore: !0 }, h = v.hasMore, E = Ke({ currentLength: 0, previousLength: 0 });
|
|
9103
|
+
je(() => {
|
|
9104
9104
|
E.current.currentLength !== y.length && (E.current.previousLength = E.current.currentLength, E.current.currentLength = y.length);
|
|
9105
9105
|
}, [y.length]);
|
|
9106
|
-
const G =
|
|
9107
|
-
|
|
9106
|
+
const G = Ke(!0);
|
|
9107
|
+
je(() => () => {
|
|
9108
9108
|
G.current = !1;
|
|
9109
9109
|
}, []);
|
|
9110
|
-
const w =
|
|
9111
|
-
|
|
9110
|
+
const w = Ke(!1);
|
|
9111
|
+
je(() => {
|
|
9112
9112
|
w.current = !1, j.current = !1, S.current.token = null;
|
|
9113
9113
|
}, [e]);
|
|
9114
9114
|
const z = at(async (U) => {
|
|
@@ -9132,7 +9132,7 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9132
9132
|
}
|
|
9133
9133
|
}
|
|
9134
9134
|
}, [e, h, v.page, v.pageSize, u, f]);
|
|
9135
|
-
|
|
9135
|
+
je(() => {
|
|
9136
9136
|
if (y.length > 0 || k || p || w.current || !t || !A.current || j.current) return;
|
|
9137
9137
|
w.current = !0, j.current = !0;
|
|
9138
9138
|
const U = `load-effect-${Date.now()}`;
|
|
@@ -9144,8 +9144,8 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9144
9144
|
clearTimeout(q), S.current.token !== U || S.current.isActive || (S.current.token = null);
|
|
9145
9145
|
};
|
|
9146
9146
|
}, [e, t, k, p, z]);
|
|
9147
|
-
const j =
|
|
9148
|
-
return
|
|
9147
|
+
const j = Ke(!1), T = Ke(null);
|
|
9148
|
+
return je(() => {
|
|
9149
9149
|
if (!i.current || !h || k || !t || !A.current) return;
|
|
9150
9150
|
const U = new IntersectionObserver((J) => {
|
|
9151
9151
|
J[0].isIntersecting && h && !j.current && (T.current && clearTimeout(T.current), T.current = setTimeout(M, 50));
|
|
@@ -9158,7 +9158,7 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9158
9158
|
return h && !j.current && (i != null && i.current) && (q(), ee = setInterval(q, 500)), U.observe(i.current), b.current = U, () => {
|
|
9159
9159
|
b.current && b.current.disconnect(), T.current && clearTimeout(T.current), ee && clearInterval(ee);
|
|
9160
9160
|
};
|
|
9161
|
-
}, [e, h, k, t, v.page, v.pageSize, i.current]),
|
|
9161
|
+
}, [e, h, k, t, v.page, v.pageSize, i.current]), ht(() => ({ groupData: y, isLoading: d, hasMore: h, error: p, groupLoading: k, state: o, loadingRef: i }), [y, d, h, p, k, o, i]);
|
|
9162
9162
|
}, K1 = ({ groupId: e, loadingRef: t, adjustHeight: i = di, virtualized: o }) => {
|
|
9163
9163
|
const { groupData: a, isLoading: n } = V1({ groupId: e, loadingRef: t, isRowGroupEnabled: !0 }), l = a.length ? (a.length + 1) * i : i;
|
|
9164
9164
|
return n ? g.jsxs("div", { style: { position: o ? "absolute" : "relative", top: `${l}px` }, children: [g.jsx("span", { className: "loading-spinner", style: { marginRight: "8px" }, children: "⟳" }), "Loading data..."] }) : null;
|
|
@@ -9205,8 +9205,8 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9205
9205
|
const l = t.column_name || a;
|
|
9206
9206
|
return e[l] ?? "";
|
|
9207
9207
|
}, Oo = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 8 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M1.99902 8.66675C2.45611 8.66675 2.83283 9.04271 2.83301 9.49976C2.83301 9.95695 2.45621 10.3337 1.99902 10.3337C1.54198 10.3336 1.16602 9.95684 1.16602 9.49976C1.16619 9.04282 1.54209 8.66693 1.99902 8.66675ZM5.99902 8.66675C6.45611 8.66675 6.83283 9.04271 6.83301 9.49976C6.83301 9.95695 6.45621 10.3337 5.99902 10.3337C5.54198 10.3336 5.16602 9.95684 5.16602 9.49976C5.16619 9.04282 5.54209 8.66693 5.99902 8.66675ZM1.99902 4.66675C2.45611 4.66675 2.83283 5.04271 2.83301 5.49976C2.83301 5.95695 2.45621 6.33374 1.99902 6.33374C1.54198 6.33356 1.16602 5.95684 1.16602 5.49976C1.16619 5.04282 1.54209 4.66693 1.99902 4.66675ZM5.99902 4.66675C6.45611 4.66675 6.83283 5.04271 6.83301 5.49976C6.83301 5.95695 6.45621 6.33374 5.99902 6.33374C5.54198 6.33356 5.16602 5.95684 5.16602 5.49976C5.16619 5.04282 5.54209 4.66693 5.99902 4.66675ZM1.99902 0.666748C2.45611 0.666748 2.83283 1.04271 2.83301 1.49976C2.83301 1.95695 2.45621 2.33374 1.99902 2.33374C1.54198 2.33356 1.16602 1.95684 1.16602 1.49976C1.16619 1.04282 1.54209 0.666926 1.99902 0.666748ZM5.99902 0.666748C6.45611 0.666748 6.83283 1.04271 6.83301 1.49976C6.83301 1.95695 6.45621 2.33374 5.99902 2.33374C5.54198 2.33356 5.16602 1.95684 5.16602 1.49976C5.16619 1.04282 5.54209 0.666926 5.99902 0.666748Z", fill: "currentColor", stroke: "currentColor" })), q1 = Za((e) => {
|
|
9208
|
-
var
|
|
9209
|
-
const { state: t, dispatch: i, ACTION_TYPES: o, toggleGroupExpansion: a } = Lt(), { defaultColDef: n, rowDragManaged: l, api: r, tableInstance: s, expandedGroups: c = [], childKeyField: _, uniqueIdField: d, selectedRows: u = [], frozenColumns: p = [], format: { fontSize: f, numberFormat: b } = { fontSize: "medium", numberFormat: "full" } } = t, { isSelected: S, customRowStyle: A = {}, loadingRef: x, virtualized: y, frozenOnly: k, rowData: v, column: h, rowIndex: E, colIndex: G, onDoubleClick: w, children: z, hideContent: M, className: j = "", isChildRow: T } = e, { cellRenderer: C, cellClassName: P = "", autoHeight: F = !1, field: B = "", is_frozen: U = !1 } = h, q =
|
|
9208
|
+
var He, Ne, nt, st, Ge, be, we, Te, Re, et, Xe, ft, lt, yt, tt;
|
|
9209
|
+
const { state: t, dispatch: i, ACTION_TYPES: o, toggleGroupExpansion: a } = Lt(), { defaultColDef: n, rowDragManaged: l, api: r, tableInstance: s, expandedGroups: c = [], childKeyField: _, uniqueIdField: d, selectedRows: u = [], frozenColumns: p = [], format: { fontSize: f, numberFormat: b } = { fontSize: "medium", numberFormat: "full" } } = t, { isSelected: S, customRowStyle: A = {}, loadingRef: x, virtualized: y, frozenOnly: k, rowData: v, column: h, rowIndex: E, colIndex: G, onDoubleClick: w, children: z, hideContent: M, className: j = "", isChildRow: T } = e, { cellRenderer: C, cellClassName: P = "", autoHeight: F = !1, field: B = "", is_frozen: U = !1 } = h, q = ht(() => e.cellRendererProps || {}, [e.cellRendererProps]), ee = ht(() => h.cellRendererParams || {}, [h.cellRendererParams]), J = n.minWidth || 150, H = h.width && h.width < J ? J : h.width, K = ((He = h.cellStyle) == null ? void 0 : He.textAlign) || "left", re = h.is_disabled || ((Ne = h.extra) == null ? void 0 : Ne.is_disabled) || ((nt = h.extra) == null ? void 0 : nt.isDisabled);
|
|
9210
9210
|
let ve = e.rowSpanInfo || {};
|
|
9211
9211
|
(st = t.rowSpanColumn) != null && st.includes(B) && (ve = { span: ((be = (Ge = v.__rowSpanInfo) == null ? void 0 : Ge[B]) == null ? void 0 : be.span) || 0, isFirst: ((Te = (we = v.__rowSpanInfo) == null ? void 0 : we[B]) == null ? void 0 : Te.isFirst) || !1 });
|
|
9212
9212
|
const { span: oe = 1 } = ve || {}, Q = U && p.positions ? p.positions[B] : null, le = U && p.indexes ? p.indexes.indexOf(G) : null, he = h.extra && h.extra.is_grouping_key === !0, ce = v && v[_] && Array.isArray(v[_]) && v[_].length > 0, _e = (Re = t.masterDetail) == null ? void 0 : Re.enabled, ne = h.order_of_display === 1 || !h.order_of_display && G === 0, fe = t.columns.some((Je) => Je.is_frozen), De = U && (le === 0 || p.indexes && p.indexes.indexOf(G) === 0), ue = _e && !he && (U && De || !fe && ne), ke = ((Je) => Je && (Je.rowGroup === !0 || Je.enableRowGroup === !0))(h), Se = ke ? ((Je, X) => {
|
|
@@ -9215,19 +9215,19 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9215
9215
|
return { id: String(ge), field: X, value: ge, displayName: `${X}: ${ge}` };
|
|
9216
9216
|
})(v, h.field) : null, Ce = Se == null ? void 0 : Se.id, $e = !!Ce && ((et = t.rowGroupState) == null ? void 0 : et.expandedGroups[Ce]), xe = he && ce || ue || ke, Le = v ? v[d] || v.id : E, Me = c && c.includes(Le), ot = ((ft = (Xe = t.masterDetail) == null ? void 0 : Xe.expandedRows) == null ? void 0 : ft.includes(Le)) || !1, Z = Oa(v, h, _, r), Ae = at((Je) => {
|
|
9217
9217
|
w && w(Je, { rowData: v, column: h, rowIndex: E, colIndex: G });
|
|
9218
|
-
}, [w, v, h, E, G]),
|
|
9218
|
+
}, [w, v, h, E, G]), Ye = Ke(null), Ze = !T && ce, Fe = Ze && ((lt = v[_]) == null ? void 0 : lt[0]) && v[_][0][B] !== void 0, W = M || Ze && Fe && !Z, m = (D = Z) == null ? "" : typeof D == "boolean" ? D ? "Yes" : "No" : D instanceof Date ? D.toLocaleString() : typeof D == "object" && D !== null ? Array.isArray(D) ? D.join(", ") : JSON.stringify(D) : String(D);
|
|
9219
9219
|
var D;
|
|
9220
9220
|
const O = (Je) => {
|
|
9221
9221
|
if (Je.preventDefault(), Je.stopPropagation(), !Le) return;
|
|
9222
9222
|
const X = Je.currentTarget, ge = X.getBoundingClientRect(), Oe = X.closest(".ia-table-body-row"), Ue = Oe ? Oe.getBoundingClientRect() : null, ze = X.closest(".ia-table-content-wrapper-parent") || X.closest(".ia-table-enterprise-table"), Qe = ze ? ze.getBoundingClientRect() : null, ct = Qe ? { top: ge.top - Qe.top, left: ge.left - Qe.left, bottom: ge.bottom - Qe.top, right: ge.right - Qe.left } : null, mt = { rect: { top: ge.top, left: ge.left, bottom: ge.bottom, right: ge.right, width: ge.width, height: ge.height }, parentRect: Ue ? { top: Ue.top, left: Ue.left, bottom: Ue.bottom, height: Ue.height } : null, tableContainerRect: Qe ? { top: Qe.top, left: Qe.left, width: Qe.width, height: Qe.height } : null, relativePositions: ct };
|
|
9223
9223
|
ue ? i({ type: o.TOGGLE_MASTER_DETAIL, payload: { rowId: Le, rowData: v, clickPosition: mt } }) : ke && Ce ? r.toggleRowGroup(Ce) : a && a(Le);
|
|
9224
9224
|
};
|
|
9225
|
-
|
|
9225
|
+
je(() => {
|
|
9226
9226
|
if (!s.current) return;
|
|
9227
9227
|
const Je = s.current.iaTableInstanceId;
|
|
9228
9228
|
if (Je && window.iaTableState.selectedCells.has(Je)) {
|
|
9229
9229
|
const X = window.iaTableState.selectedCells.get(Je), ge = X == null ? void 0 : X.rowId, Oe = X == null ? void 0 : X.field;
|
|
9230
|
-
ge === Le && Oe === B ?
|
|
9230
|
+
ge === Le && Oe === B ? Ye.current.classList.add("ia-table-body-cell-selected") : Ye.current.classList.remove("ia-table-body-cell-selected");
|
|
9231
9231
|
}
|
|
9232
9232
|
}, [v, Le, B, s]);
|
|
9233
9233
|
const N = { data: v, rowIndex: E, id: v && (v[d] || v.id) || `row-${E}`, parent: (h.parent_id, { data: v, id: v ? v[d] || v.id : null, level: 0, setData: (Je) => {
|
|
@@ -9238,10 +9238,10 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9238
9238
|
}), childrenMapped: {}, allLeafChildren: [], group: ce, level: 0, childIndex: -1, isSelected: () => !(!u || !v) && u.includes(v[d] || v.id), isExpandable: () => ce, isExpanded: () => Me };
|
|
9239
9239
|
let R = m;
|
|
9240
9240
|
if (!T && C && (typeof C == "function" || ee && ee.innerRenderer && typeof ee.innerRenderer == "function")) {
|
|
9241
|
-
const Je = C && typeof C != "function" ? ee.innerRenderer : C, X = { value: Z, data: v, rowIndex: E, colIndex: G, column: { ...h, colId: h.field || h.colId, ...t.api }, colDef: h, node: N, api: t.api, eGridCell:
|
|
9241
|
+
const Je = C && typeof C != "function" ? ee.innerRenderer : C, X = { value: Z, data: v, rowIndex: E, colIndex: G, column: { ...h, colId: h.field || h.colId, ...t.api }, colDef: h, node: N, api: t.api, eGridCell: Ye.current }, ge = { ...q, wholeData: q.wholeData || t.data, actions: q.actions || h.actions || t.actions };
|
|
9242
9242
|
R = g.jsx(Oc, { renderer: Je, cellProps: X, extraProps: ge });
|
|
9243
9243
|
}
|
|
9244
|
-
const I = { flex: "0 1 auto" }, L = Mo(h, v), V =
|
|
9244
|
+
const I = { flex: "0 1 auto" }, L = Mo(h, v), V = ht(() => Pn(L) && Z != null ? Mc(Z, b) : Z, [L, Z, b]), Y = e.size || "default", te = t.enableRowSpan && t.rowSpanColumn && (oe > 1 || ((tt = (yt = v == null ? void 0 : v.__rowSpanInfo) == null ? void 0 : yt[B]) == null ? void 0 : tt.span) > 1) ? "ia-table-row-span" : "", ae = ["ia-table-body-cell", `ia-table-body-cell--type-${L}`, `ia-table-body-cell--size-${Y}`, `ia-table-body-cell--font-${f}`, S ? "ia-table-body-cell--selected" : "", re ? "ia-table-body-cell--disabled" : "", F ? "" : "text-overflow-ellipsis", oe > 1 ? "ia-table-row-span" : "", S ? "ia-table-selected" : "", te, K === "center" ? "ia-table-center" : K === "right" ? "ia-table-right" : "", P, j, U ? `ia-table-frozen ia-table-frozen-${le + 1}` : "", ke ? "ia-row-group-cell" : "", F ? "" : "text-overflow-ellipsis"].filter(Boolean).join(" "), de = oe > 1 ? oe * di + "px" : "100%", se = { width: `${H}px`, minWidth: `${H}px`, flex: `0 0 ${H}px`, height: de, minHeight: de, position: U ? "sticky" : "absolute", ...!U && { left: h.leftTotalWidth - H + "px" }, ...U && { left: e.selectable ? `${Q}px` : 0, zIndex: le !== null ? 50 - le : 20 }, ...A };
|
|
9245
9245
|
if (t.enableRowSpan && t.rowSpanColumn && (Array.isArray(t.rowSpanColumn) ? t.rowSpanColumn.includes(B) : t.rowSpanColumn === B)) {
|
|
9246
9246
|
if (ve.span === 0 || !ve.isFirst) return null;
|
|
9247
9247
|
ve.span > 1 && (se.verticalAlign = "top", se.borderBottom = "1px solid #e0e0e0", se.paddingTop = "12px", se.gridRow = `span ${ve.span}`);
|
|
@@ -9250,10 +9250,10 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9250
9250
|
var X;
|
|
9251
9251
|
$n(Je, s, E, G, Le, B, k, ((X = p.indexes) == null ? void 0 : X.length) || 0, h, v, Z);
|
|
9252
9252
|
}, Be = ke && $e;
|
|
9253
|
-
return xe ? g.jsxs(g.Fragment, { children: [g.jsx("div", { ref:
|
|
9253
|
+
return xe ? g.jsxs(g.Fragment, { children: [g.jsx("div", { ref: Ye, className: `${ae}`, style: ie, onClick: Ie, title: typeof m == "string" ? m : "", "data-row": E, "data-col": G, children: g.jsxs("div", { className: "ia-table-body-cell__content-with-toggle " + (F ? "" : "text-overflow-ellipsis"), style: I, children: [me, g.jsx("button", { className: "ia-table-body-cell__toggle-btn", onClick: O, type: "button", "aria-label": Me ? "Collapse group" : "Expand group", children: g.jsx(cr, { className: "ia-table-body-cell__toggle-icon icon-16 " + (ot || ke || Me ? "ia-table-body-cell__toggle-icon--expanded" : "ia-table-body-cell__toggle-icon--collapsed") }) }), g.jsx("span", { children: (Li.isValidElement(R), R) })] }) }), Be && Ce && g.jsx(K1, { groupId: Ce, loadingRef: x, virtualized: y })] }) : g.jsx("div", { ref: Ye, className: ae, style: ie, rowSpan: t.enableRowSpan && t.rowSpanColumn && oe > 1 ? oe : void 0, onClick: Ie, onDoubleClick: Ae, title: typeof Z == "string" || typeof Z == "number" ? String(Z) : "", "data-row": E, "data-col": G, "data-field": B, children: g.jsxs("div", { className: `ia-table-body-cell__content ${F ? "" : "text-overflow-ellipsis"} ia-table-body-cell__content--${L}`, children: [me, g.jsx("span", { style: I, className: F ? "" : "text-overflow-ellipsis", children: W ? null : z || (Li.isValidElement(R) ? R : Pn(L) && V !== void 0 ? V : R) })] }) });
|
|
9254
9254
|
}, (e, t) => e.rowData === t.rowData && e.column === t.column && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex && e.isSelected === t.isSelected && e.className === t.className && e.hideContent === t.hideContent && e.isChildRow === t.isChildRow), dr = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M8.58754 17.7628C8.41818 17.6047 8.3335 17.4175 8.3335 17.2013C8.3335 16.9854 8.41818 16.7984 8.58754 16.6403L13.5498 12.0079L8.5706 7.35968C8.41253 7.21212 8.3335 7.02767 8.3335 6.80632C8.3335 6.58498 8.41818 6.39526 8.58754 6.23715C8.7569 6.07905 8.95742 6 9.18911 6C9.42034 6 9.62064 6.07905 9.79 6.23715L15.4805 11.5652C15.5483 11.6285 15.5964 11.697 15.6248 11.7708C15.6528 11.8445 15.6668 11.9236 15.6668 12.0079C15.6668 12.0922 15.6528 12.1713 15.6248 12.2451C15.5964 12.3188 15.5483 12.3874 15.4805 12.4506L9.77306 17.7787C9.61499 17.9262 9.42034 18 9.18911 18C8.95742 18 8.7569 17.9209 8.58754 17.7628Z", fill: "#60697D" })), ur = ({ children: e, rowData: t, rowIndex: i, onClick: o, selectable: a = !1, expandable: n = !1, style: l = {}, virtualized: r = !1, columns: s, frozenOnly: c = null, virtualizedAllVisibleColumns: _ = [], masterDetailEnabled: d = !1, pinned: u = !1, loadingRef: p, size: f = "default" }) => {
|
|
9255
|
-
const { state: b, dispatch: S, toggleGroupExpansion: A, ACTION_TYPES: x, getRowStyle: y } = Lt(), { columns: k, expandedGroups: v, selectedRows: h, uniqueIdField: E, childKeyField: G, api: w, data: z, actions: M, recentlyUpdatedRows: j, masterDetail: T } = b, [C, P] =
|
|
9256
|
-
|
|
9255
|
+
const { state: b, dispatch: S, toggleGroupExpansion: A, ACTION_TYPES: x, getRowStyle: y } = Lt(), { columns: k, expandedGroups: v, selectedRows: h, uniqueIdField: E, childKeyField: G, api: w, data: z, actions: M, recentlyUpdatedRows: j, masterDetail: T } = b, [C, P] = Ve(!1), F = (t == null ? void 0 : t[E]) || (t == null ? void 0 : t.id) || i;
|
|
9256
|
+
je(() => {
|
|
9257
9257
|
const Q = h.some((le) => le === F || le === t[E]);
|
|
9258
9258
|
P(Q);
|
|
9259
9259
|
}, [h, F, t, E]);
|
|
@@ -9311,8 +9311,8 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9311
9311
|
const { state: d, dispatch: u, ACTION_TYPES: p } = Lt(), { api: f, data: b, actions: S, defaultColDef: A, childKeyField: x, expandedGroups: y = [], uniqueIdField: k = "id", tableInstance: v, frozenColumns: h, format: E = { fontSize: "medium", numberFormat: "full" } } = d, G = E.fontSize || "medium", w = E.numberFormat || "full", z = t[k];
|
|
9312
9312
|
let M = String(z), j = 0;
|
|
9313
9313
|
r && r[k] && (r.__parentPath ? (M = `${r.__parentPath}/${z}`, j = (r.__parentPath.match(/\//g) || []).length + 1) : (M = `${r[k]}/${z}`, j = 1));
|
|
9314
|
-
const T = 16 * j, C = { ...t, __parentPath: M, __level: j, __indentPx: T }, P = 32 + T, F = y.some((H) => H === M), B =
|
|
9315
|
-
|
|
9314
|
+
const T = 16 * j, C = { ...t, __parentPath: M, __level: j, __indentPx: T }, P = 32 + T, F = y.some((H) => H === M), B = ht(() => t && x && Array.isArray(t[x]) && t[x].length > 0, [t, x]);
|
|
9315
|
+
je(() => {
|
|
9316
9316
|
if (!c || !t || !(t.id || t[k]) || !d.columns.some((K) => K.autoHeight)) return;
|
|
9317
9317
|
let H = di;
|
|
9318
9318
|
d.columns.forEach((K) => {
|
|
@@ -9404,7 +9404,7 @@ const H1 = ({ children: e, rowData: t, rowIndex: i, rowId: o, bodyContainerRef:
|
|
|
9404
9404
|
const { state: a } = Lt(), n = a.masterDetail.detailRowHeight || 200, l = i;
|
|
9405
9405
|
return g.jsx("div", { className: "ia-table-detail-row-container", style: { top: `${l}px`, height: `${n}px` }, children: g.jsx("div", { className: "ia-table-detail-container", style: { width: "100%" }, children: Li.createElement(J1, { rowData: e, rowIndex: t, style: { height: "100%" }, frozenOnly: !1, fullWidth: !0 }) }) });
|
|
9406
9406
|
}, ed = ({ currentRenderData: e, currentPageData: t, onRowClick: i, selectable: o, expandable: a, frozenOnly: n, virtualizedAllVisibleColumns: l, virtualization: r, bodyContainerRef: s, allColumnsLastRow: c, rowHeight: _, masterDetailEnabled: d, state: u, showInfiniteLoader: p, totalHeight: f, visibleRange: b, expandedRowGroups: S, loadedData: A, uniqueIdField: x, expandedGroups: y, offsetForLoader: k, rowHeightMap: v, updateRowHeightMap: h }) => {
|
|
9407
|
-
const E =
|
|
9407
|
+
const E = Ke(), { rowGroupState: { pagination: G }, childKeyField: w } = u, z = ht(() => ((j, T, C, P, F, B, U, q, ee, J, H, K) => {
|
|
9408
9408
|
var Q, le, he;
|
|
9409
9409
|
const re = [];
|
|
9410
9410
|
let ve = 0;
|
|
@@ -9525,24 +9525,24 @@ class fr {
|
|
|
9525
9525
|
}
|
|
9526
9526
|
const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable: o = !1, frozenOnly: a = null, paginateOriginalRowsOnly: n = !0, adjustTableHeightServerSide: l = !1, masterDetailEnabled: r = !1, allColumnsLastRow: s = [], scrollContainerRef: c, virtualizedAllVisibleColumns: _ = [], isInfiniteLoadingMoreRef: d }) => {
|
|
9527
9527
|
var ce, _e;
|
|
9528
|
-
const { state: u, tableApi: p } = Lt(), { filteredData: f, pagination: b, infiniteScroll: S = !1, serverSide: A, enableRowSpan: x, rowGroupState: { expandedGroups: y, loadedData: k, pagination: v }, tableInstance: h, uniqueIdField: E } = u, { isCountUnknown: G, currentLoadedPage: w, allTotalPages: z } = b, M =
|
|
9529
|
-
|
|
9528
|
+
const { state: u, tableApi: p } = Lt(), { filteredData: f, pagination: b, infiniteScroll: S = !1, serverSide: A, enableRowSpan: x, rowGroupState: { expandedGroups: y, loadedData: k, pagination: v }, tableInstance: h, uniqueIdField: E } = u, { isCountUnknown: G, currentLoadedPage: w, allTotalPages: z } = b, M = Ke(null), j = Ke({}), T = Ke(null), [C, P] = Ve({});
|
|
9529
|
+
je(() => {
|
|
9530
9530
|
T.current || (T.current = new fr());
|
|
9531
9531
|
}, []);
|
|
9532
|
-
const F = Object.keys(y).filter((ne) => y[ne]), B = S && !(!G && w === z), U =
|
|
9532
|
+
const F = Object.keys(y).filter((ne) => y[ne]), B = S && !(!G && w === z), U = ht(() => {
|
|
9533
9533
|
if (S && b.currentLoadedPage * b.pageSize === f.length && (d.current = !1), !f.length) return [];
|
|
9534
9534
|
if (S) return f;
|
|
9535
9535
|
{
|
|
9536
9536
|
const { currentPage: ne, pageSize: fe, totalItems: De, currentLoadedPage: ue } = b, ke = (f.length === De ? A ? 0 : ue - 1 : ne - 1) * fe, Se = x && ke === 0 ? f.length : ke + fe;
|
|
9537
9537
|
return f.slice(ke, Se);
|
|
9538
9538
|
}
|
|
9539
|
-
}, [f, b.currentPage, b.pageSize, u.infiniteScroll]), q =
|
|
9539
|
+
}, [f, b.currentPage, b.pageSize, u.infiniteScroll]), q = Ke({}), ee = ht(() => ((ne, fe, De) => fe.expandedGroups.length && ne.length ? (De.current = {}, ne.reduce((ue, ke, Se) => ue + cs(ke, "", Se, fe.childKeyField, fe.uniqueIdField, fe.expandedGroups, De), 0)) : 0)(U, u, q), [U, q, u.expandedGroups, u.childKeyField, u.uniqueIdField]), J = ht(() => ((ne, fe, De) => {
|
|
9540
9540
|
var ue, ke;
|
|
9541
9541
|
return De && ((ke = (ue = fe.masterDetail) == null ? void 0 : ue.expandedRows) != null && ke.length) && ne.length ? ne.reduce((Se, Ce) => {
|
|
9542
9542
|
const $e = Ce.id || Ce[fe.uniqueIdField];
|
|
9543
9543
|
return fe.masterDetail.expandedRows.includes($e) ? Se + Math.ceil(fe.masterDetail.detailRowHeight / 40) : Se;
|
|
9544
9544
|
}, 0) : 0;
|
|
9545
|
-
})(U, u, r), [U, (ce = u.masterDetail) == null ? void 0 : ce.expandedRows, u.uniqueIdField, r, (_e = u.masterDetail) == null ? void 0 : _e.detailRowHeight]), H =
|
|
9545
|
+
})(U, u, r), [U, (ce = u.masterDetail) == null ? void 0 : ce.expandedRows, u.uniqueIdField, r, (_e = u.masterDetail) == null ? void 0 : _e.detailRowHeight]), H = ht(() => ((ne, fe, De, ue, ke, Se) => {
|
|
9546
9546
|
let Ce = 0;
|
|
9547
9547
|
return De.length > 0 && ne.forEach(($e, xe) => {
|
|
9548
9548
|
var Me;
|
|
@@ -9561,7 +9561,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9561
9561
|
const Le = +xe + $e, Me = ne.current[xe], ot = fe[xe], Z = De[ot[ue]] || [];
|
|
9562
9562
|
ke.splice(Le + 1, 0, ...Z), $e += Me, Se.current = { ...Se.current, [Le]: Me };
|
|
9563
9563
|
});
|
|
9564
|
-
})(q, U, k, u.uniqueIdField, re, j),
|
|
9564
|
+
})(q, U, k, u.uniqueIdField, re, j), ht(() => {
|
|
9565
9565
|
var fe, De;
|
|
9566
9566
|
if (!u.columns.some((ue) => ue.autoHeight)) return;
|
|
9567
9567
|
const ne = ((ue, ke, Se, Ce = {}) => {
|
|
@@ -9572,20 +9572,20 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9572
9572
|
if (!ot) return;
|
|
9573
9573
|
let Z = xe;
|
|
9574
9574
|
Le.forEach((Ae) => {
|
|
9575
|
-
const
|
|
9576
|
-
if (!
|
|
9577
|
-
const Ze = Me[
|
|
9575
|
+
const Ye = Ae.field || Ae.column_name;
|
|
9576
|
+
if (!Ye) return;
|
|
9577
|
+
const Ze = Me[Ye];
|
|
9578
9578
|
if (Ze == null) return;
|
|
9579
|
-
const
|
|
9580
|
-
|
|
9579
|
+
const Fe = Un(Ze, Ae, Ce);
|
|
9580
|
+
Fe > Z && (Z = Fe);
|
|
9581
9581
|
}), Z !== xe && ($e[ot] = Z);
|
|
9582
9582
|
}), $e;
|
|
9583
9583
|
})(U, u.columns, E, u.expandedGroups);
|
|
9584
9584
|
(De = (fe = T.current) == null ? void 0 : fe.setAllHeight) == null || De.call(fe, ne), Object.keys(ne).length > 0 && P(ne);
|
|
9585
9585
|
}, [U, u.columns, E]);
|
|
9586
|
-
const ve = (({ dataLength: ne, threshold: fe = 20, rowHeight: De = di, bufferSize: ue = 5, containerRef: ke, adjustTableHeightServerSide: Se, scrollContainerRef: Ce = null, currentPageData: $e, expandedChildRowsByParentIndex: xe, expandedRowGroups: Le, rowHeightMap: Me, setRowHeightMap: ot, rowHeightCache: Z = null, uniqueIdField: Ae = "id", onVisibleRangeChange:
|
|
9586
|
+
const ve = (({ dataLength: ne, threshold: fe = 20, rowHeight: De = di, bufferSize: ue = 5, containerRef: ke, adjustTableHeightServerSide: Se, scrollContainerRef: Ce = null, currentPageData: $e, expandedChildRowsByParentIndex: xe, expandedRowGroups: Le, rowHeightMap: Me, setRowHeightMap: ot, rowHeightCache: Z = null, uniqueIdField: Ae = "id", onVisibleRangeChange: Ye = () => {
|
|
9587
9587
|
} }) => {
|
|
9588
|
-
const { initialVisibleRows: Ze, maxVisibleRows:
|
|
9588
|
+
const { initialVisibleRows: Ze, maxVisibleRows: Fe, bufferAbove: W, bufferBelow: m } = ht(() => ({ initialVisibleRows: fe, maxVisibleRows: fe + Math.floor(1.5 * ue), bufferAbove: Math.floor(ue / 2), bufferBelow: ue }), [fe, ue]), D = ne > fe, [O, N] = Ve({ start: 0, end: Math.min(Ze - 1, ne - 1) }), [R, I] = Ve(0), [L, V] = Ve(De), Y = Ke(0), te = Ke(!1), ae = Ke(null), de = Ke(!1), se = Ke({ start: -1, end: -1 }), ie = Ke(0), me = at((Ge, be) => {
|
|
9589
9589
|
var Ue, ze;
|
|
9590
9590
|
if ((isNaN(Ge) || Ge < 0) && (Ge = 0), isNaN(be) || be <= 0 || be > 1e4) {
|
|
9591
9591
|
console.warn(`Invalid viewportHeight value: ${be}, using fallback value`);
|
|
@@ -9607,8 +9607,8 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9607
9607
|
if (Z) ut = Z.getHeight(it, L);
|
|
9608
9608
|
else if (Me[it]) ut = Me[it];
|
|
9609
9609
|
else {
|
|
9610
|
-
const
|
|
9611
|
-
if (
|
|
9610
|
+
const vt = Object.keys(Me).filter((wt) => wt.endsWith(`/${it}`) || wt === it || it.toString().includes("/") && wt.includes(it.toString().split("/")[0]));
|
|
9611
|
+
if (vt.length > 0 && (ut = Me[vt[0]]), pt.__isDetailRow && pt.__parentId) {
|
|
9612
9612
|
const wt = `${pt.__parentId}/detail`;
|
|
9613
9613
|
Me[wt] && (ut = Me[wt]);
|
|
9614
9614
|
}
|
|
@@ -9616,21 +9616,21 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9616
9616
|
let gt = 0;
|
|
9617
9617
|
const It = ((Ue = xe == null ? void 0 : xe.current) == null ? void 0 : Ue[mt]) || 0;
|
|
9618
9618
|
if (It > 0) if (Z) {
|
|
9619
|
-
const { childrenTotalHeight:
|
|
9620
|
-
gt =
|
|
9619
|
+
const { childrenTotalHeight: vt } = Z.getChildHeights(it, L);
|
|
9620
|
+
gt = vt;
|
|
9621
9621
|
} else {
|
|
9622
|
-
const
|
|
9622
|
+
const vt = `${it}/`, wt = Object.keys(Me).filter((Pt) => Pt.startsWith(vt));
|
|
9623
9623
|
if (wt.length > 0 ? Le && Le.includes(it) && (gt = wt.reduce((Pt, $t) => Pt + (Me[$t] || L), 0)) : Le && Le.includes(it) && (gt = It * L), Le && Le.includes(it)) {
|
|
9624
9624
|
const Pt = `${it}/detail`;
|
|
9625
9625
|
Me[Pt] && (gt += Me[Pt]);
|
|
9626
9626
|
}
|
|
9627
9627
|
}
|
|
9628
|
-
const
|
|
9629
|
-
if (!(Qe +
|
|
9630
|
-
(Ge - Qe) /
|
|
9628
|
+
const bt = ut + gt;
|
|
9629
|
+
if (!(Qe + bt <= Ge)) {
|
|
9630
|
+
(Ge - Qe) / bt * 100 > (Ge > 1e3 ? 95 : 80) && mt < ne - 1 && (ct++, Qe += bt);
|
|
9631
9631
|
break;
|
|
9632
9632
|
}
|
|
9633
|
-
ct++, Qe +=
|
|
9633
|
+
ct++, Qe += bt;
|
|
9634
9634
|
}
|
|
9635
9635
|
Te = ct;
|
|
9636
9636
|
} else Te = Math.floor(Ge / L);
|
|
@@ -9656,21 +9656,21 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9656
9656
|
const { childrenTotalHeight: gt, childCount: It } = Z.getChildHeights(pt, L);
|
|
9657
9657
|
Qe += gt, It > 10 && (lt += Math.min(5, Math.floor(It / 10)));
|
|
9658
9658
|
} else {
|
|
9659
|
-
const gt = `${pt}/`, It = Object.keys(Me).filter((
|
|
9660
|
-
if (It.length > 0 ? Le && Le.includes(pt) && (Qe += It.reduce((
|
|
9661
|
-
const
|
|
9662
|
-
Me[
|
|
9659
|
+
const gt = `${pt}/`, It = Object.keys(Me).filter((bt) => bt.startsWith(gt));
|
|
9660
|
+
if (It.length > 0 ? Le && Le.includes(pt) && (Qe += It.reduce((bt, vt) => bt + (Me[vt] || L), 0), It.length > 10 && (lt += Math.min(5, Math.floor(It.length / 10)))) : Le && Le.includes(pt) && (Qe += ut * L), Le && Le.includes(pt)) {
|
|
9661
|
+
const bt = `${pt}/detail`;
|
|
9662
|
+
Me[bt] && (Qe += Me[bt]);
|
|
9663
9663
|
}
|
|
9664
9664
|
}
|
|
9665
9665
|
}
|
|
9666
9666
|
}
|
|
9667
|
-
const
|
|
9667
|
+
const yt = ne > wn ? Math.max(m, Math.ceil(0.75 * we)) : m, tt = Math.min(lt, 15), Je = Math.max(we + yt + tt, Math.ceil(1.5 * we));
|
|
9668
9668
|
let X = Math.min(ne - 1, ft + Je);
|
|
9669
|
-
const ge = Math.max(
|
|
9669
|
+
const ge = Math.max(Fe, we + yt);
|
|
9670
9670
|
X = Math.min(X, ft + ge - 1);
|
|
9671
9671
|
const Oe = { start: ft, end: X };
|
|
9672
9672
|
return se.current.start !== ft || se.current.end !== X ? (se.current = Oe, Oe) : se.current;
|
|
9673
|
-
}, [W, m, ne,
|
|
9673
|
+
}, [W, m, ne, Fe, L, Le, xe, Me, $e, Ae]), Ie = at(() => {
|
|
9674
9674
|
var Xe;
|
|
9675
9675
|
const Ge = (Ce == null ? void 0 : Ce.current) || (ke == null ? void 0 : ke.current);
|
|
9676
9676
|
if (!Ge) return;
|
|
@@ -9686,12 +9686,12 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9686
9686
|
te.current = !1;
|
|
9687
9687
|
}, 50);
|
|
9688
9688
|
}, [me, ke, O]);
|
|
9689
|
-
|
|
9689
|
+
je(() => {
|
|
9690
9690
|
const Ge = (Ce == null ? void 0 : Ce.current) || ke.current;
|
|
9691
9691
|
Ge && (I(Ge.clientHeight || 400), de.current || (N({ start: 0, end: ne === 0 ? Ze - 1 : Math.min(ne - 1, Ze - 1) }), de.current = !0), setTimeout(() => {
|
|
9692
9692
|
Ie();
|
|
9693
9693
|
}, 50));
|
|
9694
|
-
}, [ne, ke, Ce, Ie]),
|
|
9694
|
+
}, [ne, ke, Ce, Ie]), je(() => {
|
|
9695
9695
|
if (!D) return;
|
|
9696
9696
|
const Ge = ke.current;
|
|
9697
9697
|
Ge && setTimeout(() => {
|
|
@@ -9701,7 +9701,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9701
9701
|
we > 0 && we !== L && V(we);
|
|
9702
9702
|
}
|
|
9703
9703
|
}, 100);
|
|
9704
|
-
}, [ke, L]),
|
|
9704
|
+
}, [ke, L]), je(() => {
|
|
9705
9705
|
if (!D) return;
|
|
9706
9706
|
const Ge = ke.current;
|
|
9707
9707
|
if (!Ge) return;
|
|
@@ -9709,7 +9709,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9709
9709
|
I(Ge.clientHeight), Ie();
|
|
9710
9710
|
};
|
|
9711
9711
|
return window.addEventListener("resize", be), () => window.removeEventListener("resize", be);
|
|
9712
|
-
}, [ke, Ie]),
|
|
9712
|
+
}, [ke, Ie]), je(() => {
|
|
9713
9713
|
const Ge = (Ce == null ? void 0 : Ce.current) || (ke == null ? void 0 : ke.current);
|
|
9714
9714
|
if (!Ge) return;
|
|
9715
9715
|
const be = Ge;
|
|
@@ -9725,7 +9725,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9725
9725
|
be && be.removeEventListener("scroll", Re), we && cancelAnimationFrame(we), Te && clearTimeout(Te);
|
|
9726
9726
|
};
|
|
9727
9727
|
}, [Ie, Ce, ke]);
|
|
9728
|
-
const { safeVisibleRange: Be, totalHeight:
|
|
9728
|
+
const { safeVisibleRange: Be, totalHeight: He, renderedRowCount: Ne } = ht(() => {
|
|
9729
9729
|
var we, Te;
|
|
9730
9730
|
let Ge = 0;
|
|
9731
9731
|
if (Me && Object.keys(Me).length > 0) for (let Re = 0; Re < ne; Re++) {
|
|
@@ -9734,18 +9734,18 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9734
9734
|
}
|
|
9735
9735
|
else Ge = ne * L;
|
|
9736
9736
|
let be = { start: Math.max(0, O.start), end: Math.min(O.end, ne - 1) };
|
|
9737
|
-
return be.end - be.start + 1 >
|
|
9738
|
-
}, [ne, L, O,
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
}, [Be.start, Be.end,
|
|
9742
|
-
const nt =
|
|
9737
|
+
return be.end - be.start + 1 > Fe && (be = { start: be.start, end: be.start + Fe - 1 }), { safeVisibleRange: be, totalHeight: Ge, renderedRowCount: be.end - be.start + 1 };
|
|
9738
|
+
}, [ne, L, O, Fe, Me, $e]);
|
|
9739
|
+
je(() => {
|
|
9740
|
+
Ye(Be.start, Be.end);
|
|
9741
|
+
}, [Be.start, Be.end, Ye]);
|
|
9742
|
+
const nt = ht(() => {
|
|
9743
9743
|
const Ge = Math.min(Be.start, $e.length), be = Math.min(Be.end + 1, $e.length);
|
|
9744
9744
|
return $e.slice(Ge, be);
|
|
9745
9745
|
}, [Be.start, Be.end, $e]);
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
}, [Be.start, Be.end,
|
|
9746
|
+
je(() => {
|
|
9747
|
+
Ye(Be.start, Be.end);
|
|
9748
|
+
}, [Be.start, Be.end, Ye]);
|
|
9749
9749
|
const st = at((Ge, be) => {
|
|
9750
9750
|
Ge && be && ot && (Me[Ge] && Me[Ge] === be || (ie.current += 1, ot((we) => {
|
|
9751
9751
|
if (Ge.includes("/")) {
|
|
@@ -9769,40 +9769,40 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9769
9769
|
Ie();
|
|
9770
9770
|
})));
|
|
9771
9771
|
}, [Me, ot, Z, Ie]);
|
|
9772
|
-
return { updatedData: nt, useVirtualization: D, visibleRange: Be, rowHeight: L, totalHeight:
|
|
9772
|
+
return { updatedData: nt, useVirtualization: D, visibleRange: Be, rowHeight: L, totalHeight: He, containerHeight: R, renderedRowCount: Ne, updateRowHeightMap: st, containerStyle: ht(() => ({ display: "block", width: "100%", minWidth: "fit-content", position: "relative", minHeight: Se ? "200px" : "fit-content", height: "100%", overflow: "visible", willChange: "transform", contain: "strict" }), [Se]), contentStyle: ht(() => ({ height: `${He}px`, position: "relative", minWidth: "fit-content", contain: "content" }), [He]) };
|
|
9773
9773
|
})({ dataLength: K, threshold: 20, rowHeight: di, bufferSize: 10, containerRef: M, adjustTableHeightServerSide: l, scrollContainerRef: c, currentPageData: re, expandedChildRowsByParentIndex: q, expandedRowGroups: F, rowHeightMap: C, setRowHeightMap: P, rowHeightCache: T.current, uniqueIdField: u.uniqueIdField, onVisibleRangeChange: (ne, fe) => {
|
|
9774
9774
|
var De;
|
|
9775
9775
|
(De = p == null ? void 0 : p.rowRenderer) != null && De.setRenderedRange && p.rowRenderer.setRenderedRange(ne, fe);
|
|
9776
9776
|
} }), { visibleRange: oe, rowHeight: Q, updatedData: le } = ve;
|
|
9777
|
-
let he =
|
|
9777
|
+
let he = ht(() => ((ne, fe, De, ue, ke, Se, Ce, $e, xe, Le) => {
|
|
9778
9778
|
var Z, Ae;
|
|
9779
9779
|
let Me = 0;
|
|
9780
9780
|
const ot = Object.keys(Le) || [];
|
|
9781
9781
|
if (Le && ot.length > 0) {
|
|
9782
|
-
let
|
|
9782
|
+
let Ye = 0;
|
|
9783
9783
|
ot.forEach((Ze) => {
|
|
9784
9784
|
if (Ze.includes("/") && ke.expandedGroups.includes(Ze)) Me += Le[Ze];
|
|
9785
9785
|
else if (Ze.includes("/")) {
|
|
9786
|
-
const
|
|
9787
|
-
ke.expandedGroups.includes(W) ? Me += Le[Ze] :
|
|
9786
|
+
const Fe = Ze.split("/"), W = Fe.slice(0, Fe.length - 1).join("/");
|
|
9787
|
+
ke.expandedGroups.includes(W) ? Me += Le[Ze] : Ye += 1;
|
|
9788
9788
|
} else Me += Le[Ze];
|
|
9789
|
-
}), Me += (ne.length - ot.length +
|
|
9789
|
+
}), Me += (ne.length - ot.length + Ye) * fe;
|
|
9790
9790
|
} else Me += ne.length * fe;
|
|
9791
|
-
return De > 0 && (Me += De * fe), ue && ((Ae = (Z = ke.masterDetail) == null ? void 0 : Z.expandedRows) == null ? void 0 : Ae.length) > 0 && ne.forEach((
|
|
9792
|
-
const Ze =
|
|
9791
|
+
return De > 0 && (Me += De * fe), ue && ((Ae = (Z = ke.masterDetail) == null ? void 0 : Z.expandedRows) == null ? void 0 : Ae.length) > 0 && ne.forEach((Ye) => {
|
|
9792
|
+
const Ze = Ye.id || Ye[ke.uniqueIdField];
|
|
9793
9793
|
ke.masterDetail.expandedRows.includes(Ze) && (Me += ke.masterDetail.detailRowHeight || 200);
|
|
9794
|
-
}), Se && (Me += 40), Ce.length && Ce.forEach((
|
|
9794
|
+
}), Se && (Me += 40), Ce.length && Ce.forEach((Ye) => {
|
|
9795
9795
|
var Ze;
|
|
9796
|
-
if ($e[
|
|
9797
|
-
const
|
|
9798
|
-
(
|
|
9796
|
+
if ($e[Ye]) {
|
|
9797
|
+
const Fe = (Ze = xe[Ye]) == null ? void 0 : Ze.hasMore;
|
|
9798
|
+
(Fe === void 0 || Fe) && (Me += fe);
|
|
9799
9799
|
}
|
|
9800
9800
|
}), Me;
|
|
9801
9801
|
})(re, Q, ee, r, u, B, F, y, v, C), [re, Q, ee, r, u, B, F, y, v, C]);
|
|
9802
9802
|
return ve.contentStyle.height !== `${he}px` && (ve.contentStyle = { ...ve.contentStyle, height: `${he}px` }), (({ tableInstance: ne }) => {
|
|
9803
|
-
|
|
9803
|
+
je(() => {
|
|
9804
9804
|
ne.current && !ne.current.iaTableInstanceId && (ne.current.iaTableInstanceId = `table-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`);
|
|
9805
|
-
}, [ne]),
|
|
9805
|
+
}, [ne]), je(() => {
|
|
9806
9806
|
if (!window.iaTableKeyHandlerInitialized) {
|
|
9807
9807
|
const fe = (ue) => {
|
|
9808
9808
|
if (window.iaTableSelectedCell) {
|
|
@@ -9819,7 +9819,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9819
9819
|
Z = m[0], Ae = parseInt(m[1], 10);
|
|
9820
9820
|
}
|
|
9821
9821
|
ue.key === "ArrowUp" && (xe = Math.max(0, Se - 1)), ue.key === "ArrowDown" && (xe = Se + 1), ue.key === "ArrowLeft" && (Le = Math.max(0, Ce - 1)), ue.key === "ArrowRight" && (Le = Ce + 1);
|
|
9822
|
-
const
|
|
9822
|
+
const Ye = !!$e && ne.current.querySelector(`[data-row="${Me}"][data-col="${Ce}"].ia-table-frozen`) !== null;
|
|
9823
9823
|
let Ze = null;
|
|
9824
9824
|
if (ue.key === "ArrowUp") if (ot) {
|
|
9825
9825
|
let m = !1, D = null, O = null;
|
|
@@ -9959,27 +9959,27 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
9959
9959
|
Z = O[0], Ae = parseInt(O[1], 10);
|
|
9960
9960
|
} else xe = Se + 1;
|
|
9961
9961
|
}
|
|
9962
|
-
else ue.key === "ArrowLeft" ?
|
|
9963
|
-
let
|
|
9962
|
+
else ue.key === "ArrowLeft" ? Ye ? (Ze = ne.current.querySelector(`[data-row="${Me}"][data-col="${Ce - 1}"].ia-table-frozen`), Le = Ze ? Ce - 1 : 0) : Le = Ce - 1 : ue.key === "ArrowRight" && (Ye ? (Ze = ne.current.querySelector(`[data-row="${Me}"][data-col="${Ce + 1}"].ia-table-frozen`), Le = Ze ? Ce + 1 : 0) : Le = Ce + 1);
|
|
9963
|
+
let Fe = null;
|
|
9964
9964
|
const W = ot || Z ? typeof xe == "string" ? xe : `${Z}-child-${Ae}` : xe;
|
|
9965
9965
|
if (ue.key === "ArrowLeft" || ue.key === "ArrowRight") {
|
|
9966
|
-
const m = Array.from(ne.current.querySelectorAll(`[data-row="${W}"]`)), D = !Ze &&
|
|
9967
|
-
|
|
9966
|
+
const m = Array.from(ne.current.querySelectorAll(`[data-row="${W}"]`)), D = !Ze && Ye && Ce - 1 < 0 && ue.key === "ArrowLeft";
|
|
9967
|
+
Fe = Ye && Ze || D ? m[Le] : m[Le + ke];
|
|
9968
9968
|
} else {
|
|
9969
|
-
const m =
|
|
9970
|
-
if (D.length > 0 && (
|
|
9969
|
+
const m = Ye ? `[data-row="${W}"][data-frozen="true"]` : `[data-row="${W}"]:not([data-frozen="true"])`, D = Array.from(ne.current.querySelectorAll(m));
|
|
9970
|
+
if (D.length > 0 && (Fe = D.find((O) => parseInt(O.getAttribute("data-col"), 10) === Le), !Fe && D.length > 0 && (Fe = D[0], Le = parseInt(Fe.getAttribute("data-col"), 10))), !Fe) {
|
|
9971
9971
|
const O = Array.from(ne.current.querySelectorAll(`[data-row="${W}"]`));
|
|
9972
|
-
|
|
9972
|
+
Fe = Ye ? O[Le] || O[0] : O[Le + ke] || O[0] || null;
|
|
9973
9973
|
}
|
|
9974
9974
|
}
|
|
9975
|
-
if (
|
|
9975
|
+
if (Fe) {
|
|
9976
9976
|
ne.current.querySelectorAll(".ia-table-body-cell-selected").forEach((D) => {
|
|
9977
9977
|
D.classList.remove("ia-table-body-cell-selected");
|
|
9978
9978
|
}), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
|
|
9979
|
-
const m =
|
|
9980
|
-
window.iaTableSelectedCell = { rowIndex: ot || Z ? W : xe, colIndex: Le, field:
|
|
9981
|
-
|
|
9982
|
-
}, 0),
|
|
9979
|
+
const m = Fe.getAttribute("data-frozen") === "true";
|
|
9980
|
+
window.iaTableSelectedCell = { rowIndex: ot || Z ? W : xe, colIndex: Le, field: Fe.getAttribute("data-field") || "", frozen: m, frozenOnly: !!Ze, frozenColumnsLength: ke, rowAttr: W }, Fe.classList.add("ia-table-body-cell-selected"), setTimeout(() => {
|
|
9981
|
+
Fe.scrollIntoView({ behavior: "auto", block: "nearest" });
|
|
9982
|
+
}, 0), Fe.hasAttribute("data-selected") || Fe.click();
|
|
9983
9983
|
}
|
|
9984
9984
|
}
|
|
9985
9985
|
}
|
|
@@ -10001,7 +10001,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10001
10001
|
};
|
|
10002
10002
|
}, [ne]);
|
|
10003
10003
|
})({ tableInstance: h }), (({ tableInstance: ne, tableApi: fe }) => {
|
|
10004
|
-
|
|
10004
|
+
je(() => {
|
|
10005
10005
|
const De = (ue) => {
|
|
10006
10006
|
if (ne.current && window.iaTableState.activeInstance === ne.current && (ue.ctrlKey || ue.metaKey) && ue.key === "c") {
|
|
10007
10007
|
const { cellValue: ke, rowData: Se, column: Ce } = window.iaTableSelectedCell;
|
|
@@ -10028,11 +10028,11 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10028
10028
|
} }) }) }) });
|
|
10029
10029
|
}, (e, t) => e.onRowClick === t.onRowClick && e.onCellClick === t.onCellClick && e.selectable === t.selectable && e.expandable === t.expandable && e.frozenOnly === t.frozenOnly && e.isInfiniteLoadingMoreRef.current === t.isInfiniteLoadingMoreRef.current && JSON.stringify(e.allColumnsLastRow) === JSON.stringify(t.allColumnsLastRow) && JSON.stringify(e.virtualizedAllVisibleColumns) === JSON.stringify(t.virtualizedAllVisibleColumns)), Vl = ({ originalFrozenColumns: e, frozenScrollContainerRef: t, normalScrollContainerRef: i, columnHorizontalScrollContainerRef: o, columns: a, expandedColumnGroups: n, headerHeight: l, showHeader: r, onSortChange: s, expandable: c = !1, selectable: _ = !1, frozenOnly: d = !1, alignedGrids: u = [], masterDetail: p = !1, onRowClick: f, onCellClick: b, adjustTableHeightServerSide: S, paginateOriginalRowsOnly: A, frozenColumns: x, columnScrollHandlerRef: y, tableId: k, isScrollingSynced: v, defaultColDef: h, infiniteScroll: E = !1, onPageChange: G, currentPage: w, pinnedTopRows: z = [], pinnedBottomRows: M = [] }) => {
|
|
10030
10030
|
var le, he;
|
|
10031
|
-
const j =
|
|
10031
|
+
const j = Ke(!1), T = di, C = d ? "ia-table-frozen-columns-section" : "ia-table-normal-columns-section", P = { ...d ? { maxWidth: e.length === 0 && _ ? "48px" : "60vw", minWidth: u.length > 0 && e.length > 0 ? `${x.totalWidth + (_ ? 0 : -40)}px` : "48px" } : {} }, F = d ? "ia-table-frozen-scroll-container" : "ia-table-normal-scroll-container", B = d ? t : i, U = ht(() => Aa(a, d), [a, d]), { secondRowColumns: q, headerRows: ee } = ht(() => ((ce, _e, ne, fe = {}, De) => {
|
|
10032
10032
|
const { allParentColumns: ue } = as(ce), { processedColumns: ke, initialGroupedColumns: Se } = jn(ce, fe, 0, null, De), { headerRows: Ce, leafColumns: $e } = Pc(ke, { frozenOnly: ne, minWidth: De }), xe = $e, Le = ue.filter((Me) => Me.children.some((ot) => ot.extra && ot.extra.columnGroupShow === "open"));
|
|
10033
10033
|
return { secondRowColumns: xe, parentColumns: ue, expandableParentColumns: Le, headerRows: Ce, leafColumns: $e, initialGroupedColumns: Se };
|
|
10034
10034
|
})(a, 0, d, n || {}, h.minWidth || 150), [a, U, d, n]), J = (({ columns: ce = [], containerWidth: _e = 600, minColumnWidth: ne = 150, columnBuffer: fe = 3, headerRows: De = [] }) => {
|
|
10035
|
-
const { columnPositions: ue, totalWidth: ke } =
|
|
10035
|
+
const { columnPositions: ue, totalWidth: ke } = ht(() => {
|
|
10036
10036
|
const W = [];
|
|
10037
10037
|
let m = 0;
|
|
10038
10038
|
const D = {};
|
|
@@ -10041,13 +10041,13 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10041
10041
|
W.push({ ...N, left: m, right: m + R, width: R }), D[N.id] = R, m += R;
|
|
10042
10042
|
}
|
|
10043
10043
|
return { columnPositions: W, totalWidth: m };
|
|
10044
|
-
}, [ce, ne]), Se =
|
|
10044
|
+
}, [ce, ne]), Se = Ke(0), [Ce, $e] = Ve(0), xe = Ke(null), Le = at((W) => {
|
|
10045
10045
|
xe.current && cancelAnimationFrame(xe.current), xe.current = requestAnimationFrame(() => {
|
|
10046
10046
|
const m = W.target.scrollLeft;
|
|
10047
10047
|
m !== Se.current && (Se.current = m, $e(m));
|
|
10048
10048
|
});
|
|
10049
10049
|
}, []);
|
|
10050
|
-
|
|
10050
|
+
je(() => () => {
|
|
10051
10051
|
xe.current && cancelAnimationFrame(xe.current);
|
|
10052
10052
|
}, []);
|
|
10053
10053
|
const Me = at((W) => {
|
|
@@ -10062,11 +10062,11 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10062
10062
|
}
|
|
10063
10063
|
for (N = Math.max(0, N - O), R = N; R < W.length && (((L = W[R]) == null ? void 0 : L.left) || 0) < D; ) R++;
|
|
10064
10064
|
return R = Math.min(W.length - 1, R + O), { startCol: N, endCol: R };
|
|
10065
|
-
}, []), { startCol: Z, endCol: Ae } =
|
|
10065
|
+
}, []), { startCol: Z, endCol: Ae } = ht(() => ue.length && _e !== 0 ? ot(ue, Ce, Ce + _e, fe) : { startCol: 0, endCol: Math.min(2 * fe, ue.length - 1) }, [Ce, _e, ue, fe, ot]), { visColumns: Ye, positions: Ze } = ht(() => {
|
|
10066
10066
|
var m, D;
|
|
10067
10067
|
const W = ce.slice(Z, Ae + 1);
|
|
10068
10068
|
return { visColumns: W, positions: { startWidth: ((m = W[0]) == null ? void 0 : m.leftTotalWidth) || 0, endWidth: ((D = W[W.length - 1]) == null ? void 0 : D.leftTotalWidth) || 0 } };
|
|
10069
|
-
}, [ce, Z, Ae]),
|
|
10069
|
+
}, [ce, Z, Ae]), Fe = ht(() => {
|
|
10070
10070
|
var W;
|
|
10071
10071
|
return De.length > 1 ? De.map((m) => {
|
|
10072
10072
|
const D = m.findIndex((N) => N.leftTotalWidth >= Ze.startWidth) || 0;
|
|
@@ -10074,7 +10074,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10074
10074
|
return O < 0 && (O = m.length - 1), m.slice(D, O + 1);
|
|
10075
10075
|
}) : (W = De[0]) == null ? void 0 : W.slice(Z, Ae + 1);
|
|
10076
10076
|
}, [ce, Z, Ae]);
|
|
10077
|
-
return
|
|
10077
|
+
return ht(() => ({ virtualizedHeaderRows: Fe, totalWidth: ke, handleScroll: Le, scrollLeft: Ce, containerWidth: _e, setScrollPosition: Me, scrollLeftRef: Se, positions: Ze, visibleColumns: Ye }), [Ye, ke, Le, Ce, _e, Me]);
|
|
10078
10078
|
})({ headerRows: ee, columns: q, containerWidth: d ? 0 : ((le = o == null ? void 0 : o.current) == null ? void 0 : le.clientWidth) || 0, minColumnWidth: 150, columnBuffer: 3 });
|
|
10079
10079
|
let H = "auto";
|
|
10080
10080
|
q.length && (H = ((he = q[q.length - 1]) == null ? void 0 : he.leftTotalWidth) || ((ce, _e) => {
|
|
@@ -10099,22 +10099,22 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10099
10099
|
}
|
|
10100
10100
|
}, children: g.jsx(td, { onRowClick: f, onCellClick: b, selectable: !!d && _, expandable: c, scrollContainerRef: B, frozenOnly: d, paginateOriginalRowsOnly: A, adjustTableHeightServerSide: S, masterDetailEnabled: p, allColumnsLastRow: q, virtualizedAllVisibleColumns: Q, isInfiniteLoadingMoreRef: j }) }), M != null && M.length ? g.jsx("div", { className: "ia-table-pinned-bottom-rows-container", style: { height: M.length * T + "px" }, children: g.jsx(od, { pinnedBottomRows: M, onRowClick: f, selectable: _, frozenOnly: d, expandable: c, virtualizedAllVisibleColumns: Q, masterDetail: p, visibleColumns: q }) }) : null] }) }) });
|
|
10101
10101
|
}, id = ({ pinnedTopRows: e, onRowClick: t, selectable: i, frozenOnly: o, expandable: a, virtualizedAllVisibleColumns: n, masterDetail: l, visibleColumns: r }) => e.map((s, c) => g.jsx(ur, { rowData: s, rowIndex: `top-${c}`, onClick: t ? () => t(s, c) : void 0, selectable: i && o !== !1, expandable: a, virtualizedAllVisibleColumns: n, pinned: !0, columns: r, virtualized: !0, frozenOnly: o, masterDetailEnabled: l }, `top-${c}`)), od = ({ pinnedBottomRows: e, onRowClick: t, selectable: i, frozenOnly: o, expandable: a, virtualizedAllVisibleColumns: n, masterDetail: l, visibleColumns: r }) => e.map((s, c) => g.jsx(ur, { rowData: s, rowIndex: `bottom-${c}`, onClick: t ? () => t(s, c) : void 0, selectable: i && o !== !1, expandable: a, virtualizedAllVisibleColumns: n, pinned: !0, columns: r, virtualized: !0, frozenOnly: o, masterDetailEnabled: l }, `bottom-${c}`)), ad = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M15.1985 6.23501C14.8852 5.92166 14.38 5.92166 14.0666 6.23501L8.75248 11.5492C8.50308 11.7986 8.50308 12.2014 8.75248 12.4508L14.0666 17.765C14.38 18.0783 14.8852 18.0783 15.1985 17.765C15.5119 17.4516 15.5119 16.9464 15.1985 16.6331L10.5686 11.9968L15.2049 7.36051C15.5119 7.05356 15.5119 6.54197 15.1985 6.23501Z", fill: "#60697D" })), Dn = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M6.75 13.75C6.26875 13.75 5.85677 13.5786 5.51406 13.2359C5.17135 12.8932 5 12.4813 5 12C5 11.5187 5.17135 11.1068 5.51406 10.7641C5.85677 10.4214 6.26875 10.25 6.75 10.25C7.23125 10.25 7.64323 10.4214 7.98594 10.7641C8.32865 11.1068 8.5 11.5187 8.5 12C8.5 12.4813 8.32865 12.8932 7.98594 13.2359C7.64323 13.5786 7.23125 13.75 6.75 13.75ZM12 13.75C11.5188 13.75 11.1068 13.5786 10.7641 13.2359C10.4214 12.8932 10.25 12.4813 10.25 12C10.25 11.5187 10.4214 11.1068 10.7641 10.7641C11.1068 10.4214 11.5188 10.25 12 10.25C12.4812 10.25 12.8932 10.4214 13.2359 10.7641C13.5786 11.1068 13.75 11.5187 13.75 12C13.75 12.4813 13.5786 12.8932 13.2359 13.2359C12.8932 13.5786 12.4812 13.75 12 13.75ZM17.25 13.75C16.7688 13.75 16.3568 13.5786 16.0141 13.2359C15.6714 12.8932 15.5 12.4813 15.5 12C15.5 11.5187 15.6714 11.1068 16.0141 10.7641C16.3568 10.4214 16.7688 10.25 17.25 10.25C17.7312 10.25 18.1432 10.4214 18.4859 10.7641C18.8286 11.1068 19 11.5187 19 12C19 12.4813 18.8286 12.8932 18.4859 13.2359C18.1432 13.5786 17.7312 13.75 17.25 13.75Z", fill: "#B4BAC7" })), nd = ({ label: e, options: t = [10, 20], selectedPageSize: i, setSelectedPageSize: o }) => {
|
|
10102
|
-
const [a, n] =
|
|
10102
|
+
const [a, n] = Ve(!1), [l, r] = Ve({ top: 0, left: 0, width: 0 }), s = Ke(null), c = at(() => {
|
|
10103
10103
|
n((p) => !p);
|
|
10104
10104
|
}, []), _ = at(() => {
|
|
10105
10105
|
n(!1);
|
|
10106
10106
|
}, []), d = at((p) => {
|
|
10107
10107
|
o(p), n(!1);
|
|
10108
10108
|
}, [o]);
|
|
10109
|
-
|
|
10109
|
+
je(() => {
|
|
10110
10110
|
if (a && s.current) {
|
|
10111
10111
|
const p = s.current.getBoundingClientRect();
|
|
10112
10112
|
r({ top: p.bottom + window.scrollY, left: p.left + window.scrollX, width: p.width });
|
|
10113
10113
|
}
|
|
10114
10114
|
}, [a]);
|
|
10115
10115
|
const u = ((p, f = []) => {
|
|
10116
|
-
const b =
|
|
10117
|
-
return
|
|
10116
|
+
const b = Ke();
|
|
10117
|
+
return je(() => {
|
|
10118
10118
|
const S = (A) => {
|
|
10119
10119
|
const x = b.current && !b.current.contains(A.target), y = f.some((k) => k.current && k.current.contains(A.target));
|
|
10120
10120
|
x && !y && p();
|
|
@@ -10126,8 +10126,8 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10126
10126
|
})(_, [s]);
|
|
10127
10127
|
return g.jsxs("div", { className: "ia-table-menu-container", children: [g.jsxs("div", { className: "ia-table-menu d-flex justify-content-center align-items-center gap-8", children: [g.jsx("div", { className: "ia-table-menu-label", children: e }), g.jsxs("div", { ref: s, className: "ia-table-menu-text rounded-8 d-flex justify-content-center align-items-center gap-4 cursor-pointer", onClick: c, children: [i, g.jsx(dr, { width: "16", height: "16", className: "ia-table-menu-icon " + (a ? "rotate-180" : "") })] })] }), a ? Xo(g.jsx("div", { className: "ia-table-menu-submenu visible d-flex flex-column gap-2", style: { position: "absolute", top: `${l.top}px`, left: `${l.left}px`, minWidth: `${l.width}px` }, ref: u, children: t.map((p) => g.jsx("div", { className: "ia-table-menu-option rounded-8 cursor-pointer " + (p === i ? "ia-table-menu-option-selected" : ""), onClick: () => d(p), children: p }, p)) }), document.body) : null] });
|
|
10128
10128
|
}, rd = ({ pagination: e = !1, pageSize: t = 10, onPageChange: i, totalItems: o, totalPages: a, currentPage: n, isCountUnknown: l = !1, hidePaginationPageSizeSelector: r, paginationPageSizeSelector: s }) => {
|
|
10129
|
-
const { state: c, dispatch: _, ACTION_TYPES: d } = Lt(), { pagination: u, filteredData: p, enableRowSpan: f, rowSpanColumn: b } = c, [S, A] =
|
|
10130
|
-
|
|
10129
|
+
const { state: c, dispatch: _, ACTION_TYPES: d } = Lt(), { pagination: u, filteredData: p, enableRowSpan: f, rowSpanColumn: b } = c, [S, A] = Ve(t);
|
|
10130
|
+
je(() => {
|
|
10131
10131
|
if (S !== t) {
|
|
10132
10132
|
const G = c.api.getInfiniteRowModel();
|
|
10133
10133
|
G && G.purgeCache && G.purgeCache(), _({ type: d.SET_PAGE_SIZE, payload: S }), i && i(1);
|
|
@@ -10175,18 +10175,18 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10175
10175
|
const { state: e, dispatch: t } = Lt(), i = "SET_FONT_SIZE", o = "SET_NUMBER_FORMAT";
|
|
10176
10176
|
return g.jsxs("div", { className: "table-setting-format-tab", children: [g.jsxs("div", { className: "format-section", children: [g.jsx("h3", { className: "format-section-title", children: "Font size" }), g.jsxs("div", { className: "format-options-container", children: [g.jsx("div", { className: "format-option", children: g.jsxs("label", { className: "radio-container", children: [g.jsx("input", { type: "radio", name: "fontSize", value: "small", checked: e.format.fontSize === "small", onChange: () => t({ type: i, payload: "small" }) }), g.jsx("span", { className: "radio-checkmark" }), g.jsx("span", { className: "radio-label", children: "Small" })] }) }), g.jsx("div", { className: "format-option", children: g.jsxs("label", { className: "radio-container", children: [g.jsx("input", { type: "radio", name: "fontSize", value: "medium", checked: e.format.fontSize === "medium", onChange: () => t({ type: i, payload: "medium" }) }), g.jsx("span", { className: "radio-checkmark" }), g.jsx("span", { className: "radio-label", children: "Medium (Default)" })] }) }), g.jsx("div", { className: "format-option", children: g.jsxs("label", { className: "radio-container", children: [g.jsx("input", { type: "radio", name: "fontSize", value: "large", checked: e.format.fontSize === "large", onChange: () => t({ type: i, payload: "large" }) }), g.jsx("span", { className: "radio-checkmark" }), g.jsx("span", { className: "radio-label", children: "Large" })] }) })] })] }), g.jsx("div", { className: "format-divider" }), g.jsxs("div", { className: "format-section", children: [g.jsx("h3", { className: "format-section-title", children: "Scrollable columns" }), g.jsxs("div", { className: "format-options-container", children: [g.jsx("div", { className: "format-option", children: g.jsxs("label", { className: "radio-container", children: [g.jsx("input", { type: "radio", name: "numberFormat", value: "full", checked: e.format.numberFormat === "full", onChange: () => t({ type: o, payload: "full" }) }), g.jsx("span", { className: "radio-checkmark" }), g.jsx("span", { className: "radio-label", children: "Full Number" })] }) }), g.jsx("div", { className: "format-option", children: g.jsxs("label", { className: "radio-container", children: [g.jsx("input", { type: "radio", name: "numberFormat", value: "thousands", checked: e.format.numberFormat === "thousands", onChange: () => t({ type: o, payload: "thousands" }) }), g.jsx("span", { className: "radio-checkmark" }), g.jsx("span", { className: "radio-label", children: "In K (Thousands)" })] }) }), g.jsx("div", { className: "format-option", children: g.jsxs("label", { className: "radio-container", children: [g.jsx("input", { type: "radio", name: "numberFormat", value: "millions", checked: e.format.numberFormat === "millions", onChange: () => t({ type: o, payload: "millions" }) }), g.jsx("span", { className: "radio-checkmark" }), g.jsx("span", { className: "radio-label", children: "In M (Millions)" })] }) }), g.jsx("div", { className: "format-option", children: g.jsxs("label", { className: "radio-container", children: [g.jsx("input", { type: "radio", name: "numberFormat", value: "billions", checked: e.format.numberFormat === "billions", onChange: () => t({ type: o, payload: "billions" }) }), g.jsx("span", { className: "radio-checkmark" }), g.jsx("span", { className: "radio-label", children: "In B (Billions)" })] }) })] })] })] });
|
|
10177
10177
|
}, sd = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M9.09808 7.54717H8.52308L8.31929 7.36192C9.03258 6.57976 9.46201 5.56432 9.46201 4.45969C9.46201 1.99657 7.34397 0 4.731 0C2.11803 0 0 1.99657 0 4.45969C0 6.92281 2.11803 8.91938 4.731 8.91938C5.90284 8.91938 6.98005 8.51458 7.80979 7.8422L8.00631 8.0343V8.57633L11.6455 12L12.73 10.9777L9.09808 7.54717ZM4.731 7.54717C2.91866 7.54717 1.45569 6.1681 1.45569 4.45969C1.45569 2.75129 2.91866 1.37221 4.731 1.37221C6.54334 1.37221 8.00631 2.75129 8.00631 4.45969C8.00631 6.1681 6.54334 7.54717 4.731 7.54717Z", fill: "#60697D" })), Ca = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 10 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M9 6L5 2L1 6", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })), So = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", fill: "#ECEEFD" }), rt.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", stroke: "#4259EE" }), rt.createElement("path", { d: "M11.4375 5.4375L6.75 10.125L4.5625 7.9375", stroke: "#4259EE", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Do = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", fill: "white" }), rt.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", stroke: "#C3C8D4" })), cd = () => {
|
|
10178
|
-
const { state: e, dispatch: t, ACTION_TYPES: i } = Lt(), { columns: o } = e, [a, n] =
|
|
10179
|
-
|
|
10178
|
+
const { state: e, dispatch: t, ACTION_TYPES: i } = Lt(), { columns: o } = e, [a, n] = Ve(""), [l, r] = Ve([]), [s, c] = Ve(!1), [_, d] = Ve({}), [u, p] = Ve(!1), [f, b] = Ve(!1);
|
|
10179
|
+
je(() => {
|
|
10180
10180
|
r(o), c(o.every((w) => !w.hidden));
|
|
10181
10181
|
}, [o]);
|
|
10182
|
-
const S =
|
|
10182
|
+
const S = ht(() => {
|
|
10183
10183
|
if (!a.trim()) return l;
|
|
10184
10184
|
const w = a.toLowerCase(), z = (M) => {
|
|
10185
10185
|
var j;
|
|
10186
10186
|
return !!(M.headerName || M.label || M.field || M.column_name || "").toLowerCase().includes(w) || !!((j = M.children) != null && j.length) && M.children.some(z);
|
|
10187
10187
|
};
|
|
10188
10188
|
return l.filter(z);
|
|
10189
|
-
}, [l, a]), A =
|
|
10189
|
+
}, [l, a]), A = ht(() => Aa(S, !0, !0), [S]), x = ht(() => Aa(S, !1, !0), [S]), y = (w) => (z) => ({ ...z, hidden: w, is_hidden: w, hide: w }), k = (w, z) => {
|
|
10190
10190
|
var M;
|
|
10191
10191
|
return { ...w, ...y(z)(w), children: ((M = w.children) == null ? void 0 : M.map((j) => k(j, z))) || [] };
|
|
10192
10192
|
}, v = (w, z, M) => w.map((j) => {
|
|
@@ -10234,7 +10234,7 @@ const td = Za(({ onRowClick: e, onCellClick: t, selectable: i = !1, expandable:
|
|
|
10234
10234
|
}(w.children) })] }, z);
|
|
10235
10235
|
})] })] })] })] });
|
|
10236
10236
|
}, dd = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M11.501 0.833008V8.5H1.16797V0.833008H11.501ZM1.50098 8.16602H4.50098V1.16602H1.50098V8.16602ZM4.83496 8.16602H7.83496V1.16602H4.83496V8.16602ZM8.16797 8.16602H11.168V1.16602H8.16797V8.16602Z", fill: "currentColor", stroke: "currentColor" })), ud = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M0.667969 10.733V12.333H11.3346V10.733H0.667969ZM4.09654 7.37301H7.90606L8.59178 9.13301H10.1918L6.57273 0.333008H5.42987L1.81083 9.13301H3.41083L4.09654 7.37301ZM6.0013 1.91701L7.42606 5.93301H4.57654L6.0013 1.91701Z", fill: "currentColor" })), _d = (e) => rt.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 13 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, rt.createElement("path", { d: "M3.72461 5.7168C3.72463 5.58667 3.75823 5.47092 3.82617 5.36914L3.90625 5.27148L5.30566 3.86523C5.42923 3.74167 5.57874 3.67969 5.75488 3.67969C5.9309 3.67975 6.07962 3.74174 6.20312 3.86523L12.7764 10.4375L12.7764 10.4385C12.9004 10.5603 12.9602 10.6961 12.958 10.8467C12.9557 10.9974 12.8937 11.1345 12.7695 11.2588L11.293 12.7314L11.2041 12.8096C11.1116 12.8766 11.0084 12.9128 10.8955 12.9189C10.7472 12.9269 10.6058 12.8656 10.4717 12.7314L3.90625 6.16211C3.785 6.03855 3.72461 5.89059 3.72461 5.7168ZM6.37891 7.30176L10.9053 11.8213L10.9229 11.8389L11.8623 10.8994L11.8447 10.8818L7.3252 6.35937L7.30762 6.3418L7.29004 6.35937L6.37891 7.2666L6.36133 7.28418L6.37891 7.30176ZM8.9043 1.6543L8.91211 1.65039L8.91602 1.6416L9.4209 0.517578L9.93262 1.6416L9.93652 1.65039L9.94434 1.6543L11.0693 2.16211L9.94434 2.66992L9.93652 2.67383L9.93262 2.68262L9.4209 3.80762L8.91602 2.68262L8.91211 2.67383L8.9043 2.66992L7.77637 2.16211L8.9043 1.6543ZM1.67285 1.6543L1.68066 1.65039L1.68457 1.6416L2.19238 0.518555L2.7041 1.6416L2.70801 1.65039L2.7168 1.6543L3.83789 2.16211L2.7168 2.66992L2.70801 2.67383L2.7041 2.68262L2.19238 3.80664L1.68457 2.68262L1.68066 2.67383L1.67285 2.66992L0.547851 2.16211L1.67285 1.6543ZM1.67285 8.87891L1.68066 8.875L1.68457 8.86621L2.19238 7.74316L2.7041 8.86621L2.70801 8.875L2.7168 8.87891L3.83691 9.39062L2.7168 9.89453L2.70801 9.89844L2.7041 9.90723L2.19238 11.0352L1.68457 9.90723L1.68066 9.89844L1.67285 9.89453L0.548828 9.39062L1.67285 8.87891Z", fill: "currentColor", stroke: "currentColor", strokeWidth: 0.05 })), fd = ({ isOpen: e, onClose: t }) => {
|
|
10237
|
-
const [i, o] =
|
|
10237
|
+
const [i, o] = Ve("columns"), a = (n) => {
|
|
10238
10238
|
o(n);
|
|
10239
10239
|
};
|
|
10240
10240
|
return e ? g.jsxs("div", { className: "ia-table-settings-panel", children: [g.jsxs("div", { className: "ia-table-settings-panel-header", children: [g.jsx("h3", { children: "Table Settings" }), g.jsx("button", { className: "ia-table-settings-panel-close", onClick: t, "aria-label": "Close", children: g.jsx(qa, {}) })] }), g.jsxs("div", { className: "ia-table-settings-panel-tabs", children: [g.jsxs("button", { className: "ia-table-settings-panel-tab " + (i === "columns" ? "active" : ""), onClick: () => a("columns"), children: [g.jsx(dd, { className: "ia-table-settings-panel-tab-icon" }), g.jsx("span", { children: "Columns" })] }), g.jsxs("button", { className: "ia-table-settings-panel-tab " + (i === "format" ? "active" : ""), onClick: () => a("format"), children: [g.jsx(ud, { className: "ia-table-settings-panel-tab-icon" }), g.jsx("span", { children: "Format" })] }), g.jsxs("button", { className: "ia-table-settings-panel-tab " + (i === "actions" ? "active" : ""), onClick: () => a("actions"), children: [g.jsx(_d, { className: "ia-table-settings-panel-tab-icon" }), g.jsx("span", { children: "Actions" })] })] }), g.jsxs("div", { className: "ia-table-settings-panel-content", children: [i === "columns" && g.jsx(cd, {}), i === "format" && g.jsx(ld, {}), i === "actions" && g.jsx("div", { className: "ia-table-settings-panel-auto-adjust", children: g.jsx("p", { className: "ia-table-settings-panel-section-message", children: "Auto adjust options will be implemented in the next phase" }) })] })] }) : null;
|
|
@@ -10304,10 +10304,10 @@ const Wn = (e, t) => {
|
|
|
10304
10304
|
return null;
|
|
10305
10305
|
}, Xl = ({ showHeader: e = !0, showFooter: t = !0, showToolbar: i = !0, showFilters: o = !1, showSaveTableConfig: a = !0, height: n = "60vh", headerHeight: l = 40, onRowClick: r, onCellClick: s, selectable: c = !1, expandable: _ = !1, pagination: d = !1, pageSize: u = 10, paginateOriginalRowsOnly: p = !0, tableHeader: f = null, topRightOptions: b = null, loading: S = !1, onPageChange: A, onSortChange: x, onFilterChange: y, onSearch: k, totalItems: v, totalPages: h, currentPage: E, isCountUnknown: G = !1, adjustTableHeightServerSide: w, tableId: z = null, alignedGrids: M = [], onScroll: j, masterDetail: T = !1, detailCellRenderer: C = null, detailRowHeight: P = 200, defaultColDef: F, infiniteScroll: B = !1, downloadAsExcel: U = !1, downloadAsCSV: q = !1, copyToClipboard: ee = !1, copyToClipboardHandler: J, downloadExcelHandler: H, downloadCSVHandler: K, hidePaginationPageSizeSelector: re, paginationPageSizeSelector: ve }) => {
|
|
10306
10306
|
var I, L, V, Y, te, ae, de, se, ie;
|
|
10307
|
-
const { state: oe, dispatch: Q, ACTION_TYPES: le } = Lt(), { columns: he, filteredData: ce, frozenColumns: _e, expandedColumnGroups: ne, pinnedTopRows: fe, pinnedBottomRows: De, pagination: { page: ue } } = oe, ke =
|
|
10308
|
-
|
|
10309
|
-
const [xe, Le] =
|
|
10310
|
-
|
|
10307
|
+
const { state: oe, dispatch: Q, ACTION_TYPES: le } = Lt(), { columns: he, filteredData: ce, frozenColumns: _e, expandedColumnGroups: ne, pinnedTopRows: fe, pinnedBottomRows: De, pagination: { page: ue } } = oe, ke = Ke(null), Se = Ke(null), Ce = Ke(null), $e = Ke(null);
|
|
10308
|
+
Ke(null), Ke(null), Ke(null);
|
|
10309
|
+
const [xe, Le] = Ve(0), Me = Ke(!1), ot = Ke(!1);
|
|
10310
|
+
je(() => {
|
|
10311
10311
|
Q({ type: le.SET_MASTER_DETAIL_CONFIG, payload: { enabled: !!T, detailRenderer: C, detailRowHeight: P } });
|
|
10312
10312
|
}, [T, C, P, Q, le]);
|
|
10313
10313
|
const Z = at((me) => {
|
|
@@ -10319,8 +10319,8 @@ const Wn = (e, t) => {
|
|
|
10319
10319
|
const Te = String(Ge || "");
|
|
10320
10320
|
return we.measureText(Te).width + 32;
|
|
10321
10321
|
};
|
|
10322
|
-
let
|
|
10323
|
-
(Ie.filterable || Ie.sortable) && (
|
|
10322
|
+
let He = Be(Ie.headerName || Ie.field);
|
|
10323
|
+
(Ie.filterable || Ie.sortable) && (He += 50), ce.slice(0, 100).forEach((Ge) => {
|
|
10324
10324
|
try {
|
|
10325
10325
|
let be = Ge[me];
|
|
10326
10326
|
if (be == null) be = "";
|
|
@@ -10330,14 +10330,14 @@ const Wn = (e, t) => {
|
|
|
10330
10330
|
be = Te.length > 50 ? Te.substring(0, 47) + "..." : Te;
|
|
10331
10331
|
}
|
|
10332
10332
|
const we = Be(be);
|
|
10333
|
-
|
|
10333
|
+
He = Math.max(He, we);
|
|
10334
10334
|
} catch {
|
|
10335
10335
|
}
|
|
10336
10336
|
});
|
|
10337
|
-
const Ne = Ie.minWidth || 80, nt = Ie.maxWidth || 500, st = Math.max(Ne, Math.min(
|
|
10337
|
+
const Ne = Ie.minWidth || 80, nt = Ie.maxWidth || 500, st = Math.max(Ne, Math.min(He, nt));
|
|
10338
10338
|
Q({ type: le.SET_COLUMN_WIDTH, payload: { field: me, width: st, isAutoWidth: !0 } });
|
|
10339
10339
|
}, [he, ce, Q, le]);
|
|
10340
|
-
|
|
10340
|
+
je(() => {
|
|
10341
10341
|
if (he.length === 0 || ce.length === 0 || ot.current) return;
|
|
10342
10342
|
const me = he.filter((Ie) => Ie.isAutoWidth === !0);
|
|
10343
10343
|
if (me.length > 0) {
|
|
@@ -10351,18 +10351,18 @@ const Wn = (e, t) => {
|
|
|
10351
10351
|
}, 200);
|
|
10352
10352
|
return () => clearTimeout(Ie);
|
|
10353
10353
|
}
|
|
10354
|
-
}, [he, ce, Z]),
|
|
10354
|
+
}, [he, ce, Z]), je(() => {
|
|
10355
10355
|
if (!z || !Se.current) return;
|
|
10356
10356
|
const me = Se.current;
|
|
10357
10357
|
return Kl(z, me, M), () => {
|
|
10358
10358
|
ql(z);
|
|
10359
10359
|
};
|
|
10360
10360
|
}, [z, M]);
|
|
10361
|
-
const [Ae] =
|
|
10362
|
-
|
|
10361
|
+
const [Ae] = Ve(0), Ye = Ke(null);
|
|
10362
|
+
je(() => {
|
|
10363
10363
|
const me = () => {
|
|
10364
|
-
if (
|
|
10365
|
-
const Be =
|
|
10364
|
+
if (Ye.current) {
|
|
10365
|
+
const Be = Ye.current.offsetHeight;
|
|
10366
10366
|
Ae(Be);
|
|
10367
10367
|
}
|
|
10368
10368
|
}, Ie = setTimeout(() => {
|
|
@@ -10371,14 +10371,14 @@ const Wn = (e, t) => {
|
|
|
10371
10371
|
return window.addEventListener("resize", me), () => {
|
|
10372
10372
|
clearTimeout(Ie), window.removeEventListener("resize", me);
|
|
10373
10373
|
};
|
|
10374
|
-
}, []),
|
|
10374
|
+
}, []), je(() => {
|
|
10375
10375
|
const me = () => {
|
|
10376
10376
|
Se.current && Le(Se.current.scrollTop);
|
|
10377
10377
|
}, Ie = Se.current;
|
|
10378
10378
|
if (Ie) return Ie.addEventListener("scroll", me), () => {
|
|
10379
10379
|
Ie.removeEventListener("scroll", me);
|
|
10380
10380
|
};
|
|
10381
|
-
}, []),
|
|
10381
|
+
}, []), je(() => {
|
|
10382
10382
|
const me = () => {
|
|
10383
10383
|
if (!Me.current) {
|
|
10384
10384
|
Me.current = !0;
|
|
@@ -10401,13 +10401,13 @@ const Wn = (e, t) => {
|
|
|
10401
10401
|
Me.current = !1;
|
|
10402
10402
|
}
|
|
10403
10403
|
}
|
|
10404
|
-
}, Be = Se.current,
|
|
10405
|
-
return Be && Be.addEventListener("scroll", me, { passive: !0 }),
|
|
10406
|
-
Be && Be.removeEventListener("scroll", me),
|
|
10404
|
+
}, Be = Se.current, He = ke.current;
|
|
10405
|
+
return Be && Be.addEventListener("scroll", me, { passive: !0 }), He && He.addEventListener("scroll", Ie, { passive: !0 }), () => {
|
|
10406
|
+
Be && Be.removeEventListener("scroll", me), He && He.removeEventListener("scroll", Ie);
|
|
10407
10407
|
};
|
|
10408
10408
|
}, [z, M, j]);
|
|
10409
10409
|
const Ze = { height: n, minHeight: n === "auto" ? "350px" : n };
|
|
10410
|
-
|
|
10410
|
+
je(() => {
|
|
10411
10411
|
if (z && M.length > 0) {
|
|
10412
10412
|
const me = document.querySelector(`.ia-table-normal-columns-section[data-table-id="${z}"]`);
|
|
10413
10413
|
if (me) return Kl(z, me, M), () => {
|
|
@@ -10415,12 +10415,12 @@ const Wn = (e, t) => {
|
|
|
10415
10415
|
};
|
|
10416
10416
|
}
|
|
10417
10417
|
}, [z, M]);
|
|
10418
|
-
const
|
|
10419
|
-
|
|
10418
|
+
const Fe = at(() => c || he.some((me) => me.is_frozen && !me.hidden), [c, he]);
|
|
10419
|
+
je(() => {
|
|
10420
10420
|
Se.current && (Se.current.scrollTop = 0);
|
|
10421
10421
|
}, [ue]);
|
|
10422
|
-
const W =
|
|
10423
|
-
return g.jsxs("div", { className: "ia-table-enterprise-table", style: Ze, children: [D && g.jsx("div", { style: { flexShrink: 0 }, children: g.jsx(C1, { tableHeader: f, topRightOptions: b, downloadAsCSV: q, downloadAsExcel: U, copyToClipboard: ee, copyToClipboardHandler: J, downloadExcelHandler: H, downloadCSVHandler: K }) }), o && g.jsx("div", { style: { flexShrink: 0 }, children: g.jsx(M1, { onFilterChange: y }) }), g.jsxs("div", { className: "ia-table-table-content-wrapper " + (N ? "with-settings-panel" : ""), children: [g.jsxs("div", { className: "ia-table-content-wrapper-parent", children: [g.jsxs("div", { className: "ia-table-content-wrapper", children: [m && g.jsx(Vl, { originalFrozenColumns: W, frozenScrollContainerRef: ke, normalScrollContainerRef: Se, columnHorizontalScrollContainerRef: Ce, headerRowRef:
|
|
10422
|
+
const W = ht(() => Aa(he, !0), [he]) || [], m = !!Fe(), D = i && (f || b || a || U || q || ee), O = t && d && (!!G || h !== 1), { isSettingsPanelOpen: N, closeSettingsPanel: R } = fs();
|
|
10423
|
+
return g.jsxs("div", { className: "ia-table-enterprise-table", style: Ze, children: [D && g.jsx("div", { style: { flexShrink: 0 }, children: g.jsx(C1, { tableHeader: f, topRightOptions: b, downloadAsCSV: q, downloadAsExcel: U, copyToClipboard: ee, copyToClipboardHandler: J, downloadExcelHandler: H, downloadCSVHandler: K }) }), o && g.jsx("div", { style: { flexShrink: 0 }, children: g.jsx(M1, { onFilterChange: y }) }), g.jsxs("div", { className: "ia-table-table-content-wrapper " + (N ? "with-settings-panel" : ""), children: [g.jsxs("div", { className: "ia-table-content-wrapper-parent", children: [g.jsxs("div", { className: "ia-table-content-wrapper", children: [m && g.jsx(Vl, { originalFrozenColumns: W, frozenScrollContainerRef: ke, normalScrollContainerRef: Se, columnHorizontalScrollContainerRef: Ce, headerRowRef: Ye, columns: he, expandedColumnGroups: ne, expandable: _, selectable: c, frozenOnly: !0, alignedGrids: M, headerHeight: l, showHeader: e, onSortChange: x, masterDetail: T, onRowClick: r, onCellClick: s, adjustTableHeightServerSide: w, paginateOriginalRowsOnly: p, frozenColumns: _e, columnScrollHandlerRef: $e, tableId: z, isScrollingSynced: Me, defaultColDef: F, infiniteScroll: B, onPageChange: A, currentPage: E, pinnedTopRows: fe, pinnedBottomRows: De }, "frozen"), g.jsx(Vl, { originalFrozenColumns: W, frozenScrollContainerRef: ke, normalScrollContainerRef: Se, columnHorizontalScrollContainerRef: Ce, headerRowRef: Ye, columns: he, expandedColumnGroups: ne, expandable: _, selectable: !1, frozenOnly: !1, alignedGrids: M, headerHeight: l, showHeader: e, onSortChange: x, masterDetail: T, onRowClick: r, onCellClick: s, adjustTableHeightServerSide: w, paginateOriginalRowsOnly: p, frozenColumns: _e, columnScrollHandlerRef: $e, tableId: z, isScrollingSynced: Me, defaultColDef: F, infiniteScroll: B, onPageChange: A, currentPage: E, pinnedTopRows: fe, pinnedBottomRows: De }, "normal")] }), t && d && O && g.jsx(rd, { pagination: d, currentPage: E, totalItems: v, totalPages: h, pageSize: u, onPageChange: A, isCountUnknown: G, hidePaginationPageSizeSelector: re, paginationPageSizeSelector: ve }), ((L = (I = oe.masterDetail) == null ? void 0 : I.expandedRows) == null ? void 0 : L.length) > 0 && ((V = oe.masterDetail) == null ? void 0 : V.expandedRowData) && g.jsx("div", { className: "ia-table-detail-sibling-wrapper", style: { top: (((ae = (te = (Y = oe.masterDetail) == null ? void 0 : Y.clickPosition) == null ? void 0 : te.relativePositions) == null ? void 0 : ae.bottom) + 12 || 0) - xe + (xe !== 0 ? ((ie = (se = (de = oe.masterDetail) == null ? void 0 : de.clickPosition) == null ? void 0 : se.parentRect) == null ? void 0 : ie.height) + 6 : 0) }, children: g.jsx(Q1, { rowData: oe.masterDetail.expandedRowData, rowIndex: oe.masterDetail.expandedRows[0], currentRowHeight: 0, frozenOnly: !1 }) })] }), g.jsx(fd, { isOpen: N, onClose: () => {
|
|
10424
10424
|
R();
|
|
10425
10425
|
} })] })] });
|
|
10426
10426
|
}, hd = (e, t) => {
|
|
@@ -10440,7 +10440,7 @@ const Wn = (e, t) => {
|
|
|
10440
10440
|
const o = e.api.getRowData(e, i), a = t.api.getRowData(t, i);
|
|
10441
10441
|
return t && o === a;
|
|
10442
10442
|
}, bd = (e) => {
|
|
10443
|
-
const { data: t = [], columns: i = [], uniqueIdField: o = "id", childKeyField: a = "children", defaultColDef: n = { minWidth: 150 }, hasOuterProvider: l = !1, onSelectionChanged: r = null, onRowClicked: s = null, onCellValueChanged: c = null, tableApi: _ = null, actions: d = {}, columnMap: u = {}, enableRowSpan: p, rowSpanColumn: f } = e, { processedData: b } =
|
|
10443
|
+
const { data: t = [], columns: i = [], uniqueIdField: o = "id", childKeyField: a = "children", defaultColDef: n = { minWidth: 150 }, hasOuterProvider: l = !1, onSelectionChanged: r = null, onRowClicked: s = null, onCellValueChanged: c = null, tableApi: _ = null, actions: d = {}, columnMap: u = {}, enableRowSpan: p, rowSpanColumn: f } = e, { processedData: b } = ht(() => p && f && (t != null && t.length) ? ((A, x, y = "id", k, v) => {
|
|
10444
10444
|
if (!x || !A || !A.length) return { processedData: A || [], rowSpanMap: {} };
|
|
10445
10445
|
const h = Array.isArray(x) ? x : [x];
|
|
10446
10446
|
if (h.length === 0) return { processedData: A || [], rowSpanMap: {} };
|
|
@@ -11732,7 +11732,7 @@ class Zl {
|
|
|
11732
11732
|
}
|
|
11733
11733
|
}
|
|
11734
11734
|
const Td = (e, t = {}) => {
|
|
11735
|
-
const { threshold: i = is, blockSize: o = Ja, maxBlocksInCache: a = Qa, cacheOverflowSize: n = en, rowHeight: l = di, purgeStrategy: r = oa, enablePersistence: s = aa, persistenceStorageKey: c = na, persistenceOptions: _ = ra, uniqueIdField: d = "id", fetchData: u = null, apiUrl: p = null, initialFilterModel: f = null, initialSortModel: b = null, force: S = !1, pageSize: A = 10, enableIndexedDBCache: x = !1, enableStreamingLoad: y = !1, enableEnhancedWorker: k = !1, binaryFormat: v = !1, extremelyLargeDatasetThreshold: h = os } = t, [E, G] =
|
|
11735
|
+
const { threshold: i = is, blockSize: o = Ja, maxBlocksInCache: a = Qa, cacheOverflowSize: n = en, rowHeight: l = di, purgeStrategy: r = oa, enablePersistence: s = aa, persistenceStorageKey: c = na, persistenceOptions: _ = ra, uniqueIdField: d = "id", fetchData: u = null, apiUrl: p = null, initialFilterModel: f = null, initialSortModel: b = null, force: S = !1, pageSize: A = 10, enableIndexedDBCache: x = !1, enableStreamingLoad: y = !1, enableEnhancedWorker: k = !1, binaryFormat: v = !1, extremelyLargeDatasetThreshold: h = os } = t, [E, G] = Ve(!1), [w, z] = Ve(0), [M, j] = Ve([]), [T, C] = Ve(!1), [P, F] = Ve({}), [B, U] = Ve(0), [q, ee] = Ve(null), [J, H] = Ve(null), K = Ke(null), re = Ke(null), ve = Ke({ startRow: 0, endRow: 0 }), oe = Ke(null), Q = Ke(b), le = Ke(f), he = !!u || !!p || !(e != null && e.length), ce = Array.isArray(e) ? e.length : 1 / 0, _e = S || he || ce > i, ne = at(() => {
|
|
11736
11736
|
var D;
|
|
11737
11737
|
if (!_e) return null;
|
|
11738
11738
|
if (re.current) return (D = K.current) != null && D.infiniteCache && (re.current.infiniteCache = K.current.infiniteCache, re.current.context || (re.current.context = {}), re.current.context.infiniteCache = K.current.infiniteCache), re.current;
|
|
@@ -11813,7 +11813,7 @@ const Td = (e, t = {}) => {
|
|
|
11813
11813
|
}
|
|
11814
11814
|
L && O ? V ? N && R && j(D) : N && j(D) : O && j(D);
|
|
11815
11815
|
}, [w, _e, M]);
|
|
11816
|
-
|
|
11816
|
+
je(() => {
|
|
11817
11817
|
if (!_e) return j(e || []), z((e == null ? void 0 : e.length) || 0), C(!0), void G(!0);
|
|
11818
11818
|
if (K.current) return;
|
|
11819
11819
|
const W = { ...t.context || {}, updateData: (O, N, R) => {
|
|
@@ -11826,7 +11826,7 @@ const Td = (e, t = {}) => {
|
|
|
11826
11826
|
}, 1e3), G(!0), () => {
|
|
11827
11827
|
m.removeEventListener("modelUpdated", ue), clearInterval(oe.current);
|
|
11828
11828
|
};
|
|
11829
|
-
}, [_e, e, u, p, o, a, l, fe, ue, De, ne, r, s, c, A]),
|
|
11829
|
+
}, [_e, e, u, p, o, a, l, fe, ue, De, ne, r, s, c, A]), je(() => () => {
|
|
11830
11830
|
re.current && re.current.destroy && re.current.destroy(), K.current = null, re.current = null;
|
|
11831
11831
|
}, []);
|
|
11832
11832
|
const Se = at((W) => {
|
|
@@ -11866,12 +11866,12 @@ const Td = (e, t = {}) => {
|
|
|
11866
11866
|
_e && K.current && K.current.setCachePersistence(W, m);
|
|
11867
11867
|
}, [_e]), Ae = at(() => {
|
|
11868
11868
|
_e && K.current && K.current.clearPersistedCache();
|
|
11869
|
-
}, [_e]),
|
|
11869
|
+
}, [_e]), Ye = at(() => {
|
|
11870
11870
|
var m, D;
|
|
11871
11871
|
if (!_e || !K.current) return null;
|
|
11872
11872
|
const W = K.current.getCacheState();
|
|
11873
11873
|
return W && W.cache ? W : { cache: K.current.infiniteCache, rowCount: w, lastRowKnown: T, blockCount: ((D = (m = K.current.infiniteCache) == null ? void 0 : m.getBlockCount) == null ? void 0 : D.call(m)) || 0, status: K.current.infiniteCache ? "active" : "inactive" };
|
|
11874
|
-
}, [_e, w, T]), Ze = at(() => _e && K.current ? K.current.logCacheSummary() : null, [_e]),
|
|
11874
|
+
}, [_e, w, T]), Ze = at(() => _e && K.current ? K.current.logCacheSummary() : null, [_e]), Fe = at((W, m = !1) => {
|
|
11875
11875
|
var O, N;
|
|
11876
11876
|
if (!W || typeof W.getRows != "function") return console.error("Invalid datasource: must provide an object with a getRows method"), null;
|
|
11877
11877
|
H({ customDatasource: W }), (O = K.current) != null && O.infiniteCache && !K.current.infiniteCache.setBlockData && (K.current.infiniteCache.setBlockData = function(R, I) {
|
|
@@ -11914,7 +11914,7 @@ const Td = (e, t = {}) => {
|
|
|
11914
11914
|
} };
|
|
11915
11915
|
return K.current && (K.current.setDatasource(D, !m), m && K.current.resetCache(), ke()), D;
|
|
11916
11916
|
}, [A, ke, t.onDataUpdate, le, Q]);
|
|
11917
|
-
return { cacheReady: E, shouldUseCache: _e, rowCount: w, isLastRowKnown: T, visibleData: M, loadingRows: P, memoryUsage: B, analytics: q, getRows: xe, setVisibleData: j, setVisibleRange: $e, setSortModel: Se, setFilterModel: Ce, refreshCache: Le, setServerSideDataSource:
|
|
11917
|
+
return { cacheReady: E, shouldUseCache: _e, rowCount: w, isLastRowKnown: T, visibleData: M, loadingRows: P, memoryUsage: B, analytics: q, getRows: xe, setVisibleData: j, setVisibleRange: $e, setSortModel: Se, setFilterModel: Ce, refreshCache: Le, setServerSideDataSource: Fe, dataSourceConfig: J, setPurgeStrategy: Me, setPersistence: Z, clearPersistedCache: Ae, resetAnalytics: ot, getCacheState: Ye, logCacheSummary: Ze, modelRef: K };
|
|
11918
11918
|
}, wd = ({ tableContextRef: e, columns: t, uniqueIdField: i, shouldUseCache: o, infiniteCache: a, tableContainerRef: n, data: l, isServerSide: r, infiniteScroll: s, serverData: c, pageSize: _, onCellValueChanged: d, selectedRowsRef: u, setRefreshCounter: p, refreshCache: f, setLoading: b, setCurrentPage: S, setVisibleRange: A, setCacheVisibleRange: x, cachedBlockData: y, logCacheSummary: k, cacheReady: v, currentPage: h, cacheVisibleData: E, gridOptions: G, getRowData: w, tableId: z }) => {
|
|
11919
11919
|
const M = (T, C) => (P, F) => {
|
|
11920
11920
|
var q, ee;
|
|
@@ -12242,11 +12242,11 @@ const Td = (e, t = {}) => {
|
|
|
12242
12242
|
var K;
|
|
12243
12243
|
return ((K = J == null ? void 0 : J.data) == null ? void 0 : K[H]) || "";
|
|
12244
12244
|
}, rowDragManaged: B = !1, hidePaginationPageSizeSelector: U = !0, ...q }, ee) => {
|
|
12245
|
-
const J = q != null && q.paginationPageSize ? [q == null ? void 0 : q.paginationPageSize] : [10, 20], H =
|
|
12246
|
-
|
|
12245
|
+
const J = q != null && q.paginationPageSize ? [q == null ? void 0 : q.paginationPageSize] : [10, 20], H = Ke(null), K = Ke([]), re = Ke(null), ve = Ke(!0), oe = Ke(null), [Q, le] = Ve(0), he = E ? i : "fit-content", ce = !!(S || A || !e.length), [_e, ne] = Ve([]), [fe, De] = Ve([]), ue = Ke([]), [ke, Se] = Ve(0), [Ce, $e] = Ve(1), [xe, Le] = Ve(1), [Me, ot] = Ve(1), [Z, Ae] = Ve(!P || S || A ? q.defaultPageSize || 10 : e.length);
|
|
12246
|
+
je(() => {
|
|
12247
12247
|
Ae(!P || S || A ? q.defaultPageSize || 10 : e.length);
|
|
12248
|
-
}, [e, q.defaultPageSize]),
|
|
12249
|
-
const
|
|
12248
|
+
}, [e, q.defaultPageSize]), je(() => {
|
|
12249
|
+
const qe = (Rt) => {
|
|
12250
12250
|
Rt.type === "paginationChanged" && Rt.paginationState && (Rt.paginationState.pageSize && Ae(Rt.paginationState.pageSize), Rt.paginationState.page !== void 0 && pt(Rt.paginationState.page));
|
|
12251
12251
|
};
|
|
12252
12252
|
(() => {
|
|
@@ -12256,28 +12256,20 @@ const Td = (e, t = {}) => {
|
|
|
12256
12256
|
Ut && Ut !== Z && Ae(Ut);
|
|
12257
12257
|
}
|
|
12258
12258
|
})();
|
|
12259
|
-
const
|
|
12260
|
-
if (
|
|
12261
|
-
|
|
12259
|
+
const kt = oe.current;
|
|
12260
|
+
if (kt) return kt.tableApi.addEventListener("paginationChanged", qe), () => {
|
|
12261
|
+
kt && kt.tableApi.removeEventListener("paginationChanged", qe);
|
|
12262
12262
|
};
|
|
12263
12263
|
}, [Z]);
|
|
12264
|
-
const [
|
|
12265
|
-
re.current[
|
|
12266
|
-
}), re.current = null), oe.current && (oe.current = null), Array.isArray(e) && e.forEach((Fe) => {
|
|
12267
|
-
Fe && typeof Fe == "object" && Object.keys(Fe).forEach((ht) => {
|
|
12268
|
-
Fe[ht] = null;
|
|
12269
|
-
});
|
|
12270
|
-
}), Array.isArray(t) && t.forEach((Fe) => {
|
|
12271
|
-
Fe && typeof Fe == "object" && Object.keys(Fe).forEach((ht) => {
|
|
12272
|
-
typeof Fe[ht] == "function" && (Fe[ht] = null);
|
|
12273
|
-
});
|
|
12264
|
+
const [Ye, Ze] = Ve(q.defaultSort || null), [Fe, W] = Ve({}), [m, D] = Ve(ce), [O, N] = Ve(null), [R, I] = Ve(!0), [L, V] = Ve(!1), [Y, te] = Ve(!1), [ae, de] = Ve(() => ({ startRow: 0, endRow: (Z || q.defaultPageSize || 10) - 1 })), se = at(() => (ue.current && (ue.current = []), re.current && ["addEventListener", "removeEventListener", "dispatchEvent"].forEach((qe) => {
|
|
12265
|
+
re.current[qe] && (re.current[qe] = null);
|
|
12274
12266
|
}), window.iaTableKeyHandlerCleanup && (window.iaTableKeyHandlerCleanup(), window.iaTableSelectedCell = null, window.iaTableState = { selectedCells: /* @__PURE__ */ new Map(), activeInstance: null, instanceKeyHandlers: /* @__PURE__ */ new Map() }), !0), []);
|
|
12275
|
-
|
|
12267
|
+
je(() => () => {
|
|
12276
12268
|
ve.current = !1, se();
|
|
12277
12269
|
}, [se]);
|
|
12278
|
-
const { enableIndexedDBCache: ie, enableStreamingLoad: me, enableEnhancedWorker: Ie, binaryFormat: Be, extremelyLargeDatasetThreshold:
|
|
12279
|
-
if (
|
|
12280
|
-
const Ut =
|
|
12270
|
+
const { enableIndexedDBCache: ie, enableStreamingLoad: me, enableEnhancedWorker: Ie, binaryFormat: Be, extremelyLargeDatasetThreshold: He } = G, Ne = Array.isArray(e) ? e.length : 0, nt = y.force || Ne > 5e3, [st] = Ve({}), Ge = at((qe, kt, Rt = {}) => {
|
|
12271
|
+
if (qe && Array.isArray(qe) && qe.length >= 0) {
|
|
12272
|
+
const Ut = qe || [], fi = kt + 1, pi = fi - 1;
|
|
12281
12273
|
if (ce) {
|
|
12282
12274
|
const ri = [...P ? ue.current.length > 0 ? ue.current : _e.length > 0 ? _e : [] : [], ...Ut];
|
|
12283
12275
|
if (ue.current = P ? ri : [], Rt && Rt.totalCount !== void 0) {
|
|
@@ -12300,69 +12292,69 @@ const Td = (e, t = {}) => {
|
|
|
12300
12292
|
}
|
|
12301
12293
|
D(!1);
|
|
12302
12294
|
}
|
|
12303
|
-
}, [ce, Z, Me, fe, _e, P, ue, De, ne, ot, I, Se, $e, Le, D]), be = { firstRenderedRow: 0, lastRenderedRow: e.length || _e.length, setRenderedRange: (
|
|
12304
|
-
be.firstRenderedRow =
|
|
12305
|
-
} }, we = Td(ce ? null : e, { threshold: y.threshold || is, blockSize: Z || y.blockSize || Ja, maxBlocksInCache: y.maxBlocksInCache || Qa, cacheOverflowSize: y.cacheOverflowSize || en, rowHeight: y.rowHeight || di, purgeStrategy: y.purgeStrategy || oa, enablePersistence: y.enablePersistence || aa, persistenceStorageKey: y.persistenceStorageKey || na, persistenceOptions: y.persistenceOptions || ra, uniqueIdField: o, fetchData: ce ? S : null, apiUrl: ce ? A : null, initialFilterModel:
|
|
12306
|
-
re.current = ze,
|
|
12295
|
+
}, [ce, Z, Me, fe, _e, P, ue, De, ne, ot, I, Se, $e, Le, D]), be = { firstRenderedRow: 0, lastRenderedRow: e.length || _e.length, setRenderedRange: (qe, kt) => {
|
|
12296
|
+
be.firstRenderedRow = qe, be.lastRenderedRow = kt;
|
|
12297
|
+
} }, we = Td(ce ? null : e, { threshold: y.threshold || is, blockSize: Z || y.blockSize || Ja, maxBlocksInCache: y.maxBlocksInCache || Qa, cacheOverflowSize: y.cacheOverflowSize || en, rowHeight: y.rowHeight || di, purgeStrategy: y.purgeStrategy || oa, enablePersistence: y.enablePersistence || aa, persistenceStorageKey: y.persistenceStorageKey || na, persistenceOptions: y.persistenceOptions || ra, uniqueIdField: o, fetchData: ce ? S : null, apiUrl: ce ? A : null, initialFilterModel: Fe, initialSortModel: Ye, force: nt, enableIndexedDBCache: ie, enableStreamingLoad: me, enableEnhancedWorker: Ie, binaryFormat: Be, extremelyLargeDatasetThreshold: He || os, pageSize: Z, onDataUpdate: Ge, context: null, isPaginationMode: !0 }), { shouldUseCache: Te, cacheReady: Re, rowCount: et, visibleData: Xe, loadingRows: ft, getRows: lt, setVisibleRange: yt, setSortModel: tt, setFilterModel: Je, refreshCache: X, logCacheSummary: ge, setServerSideDataSource: Oe } = we, Ue = wd({ tableContextRef: oe, columns: t, uniqueIdField: o, shouldUseCache: Te, infiniteCache: we, tableContainerRef: H, data: e, isServerSide: ce, infiniteScroll: P, serverData: _e, pageSize: Z, onCellValueChanged: f, selectedRowsRef: K, setRefreshCounter: le, refreshCache: X, setLoading: D, setCurrentPage: Le, setVisibleRange: de, setCacheVisibleRange: yt, cachedBlockData: st, logCacheSummary: ge, cacheReady: Re, currentPage: xe, cacheVisibleData: Xe, gridOptions: w, getRowData: F, tableId: z }), ze = { ...Ue, rowRenderer: be, setServerSideDataSource: Oe };
|
|
12298
|
+
re.current = ze, je(() => {
|
|
12307
12299
|
if (b && re.current) {
|
|
12308
|
-
const
|
|
12309
|
-
b(
|
|
12300
|
+
const qe = { type: "gridReady", api: re.current, columnApi: re.current };
|
|
12301
|
+
b(qe);
|
|
12310
12302
|
}
|
|
12311
12303
|
}, [b]);
|
|
12312
|
-
const Qe =
|
|
12313
|
-
|
|
12304
|
+
const Qe = ht(() => ({ updateData: Ge, api: ze }), [Ge, ze]);
|
|
12305
|
+
je(() => {
|
|
12314
12306
|
we && we.modelRef && we.modelRef.current && (we.modelRef.current.params.context = Qe);
|
|
12315
|
-
}, [we, Qe]),
|
|
12316
|
-
Te && Re && x &&
|
|
12317
|
-
}, [Te, Re,
|
|
12318
|
-
const ct = we == null ? void 0 : we.modelRef, mt =
|
|
12307
|
+
}, [we, Qe]), je(() => {
|
|
12308
|
+
Te && Re && x && yt(ae.startRow, ae.endRow);
|
|
12309
|
+
}, [Te, Re, yt, ae, x]);
|
|
12310
|
+
const ct = we == null ? void 0 : we.modelRef, mt = ht(() => {
|
|
12319
12311
|
try {
|
|
12320
12312
|
if (!ce && Te && Re) {
|
|
12321
12313
|
if (Xe && Xe.length > 0) return Xe;
|
|
12322
|
-
const
|
|
12323
|
-
return
|
|
12314
|
+
const qe = (xe - 1) * Z, kt = lt(qe, qe + Z - 1);
|
|
12315
|
+
return kt && kt.length > 0 ? kt : Ne > 0 ? e.slice(qe, Math.min(qe + Z, e.length)) : kt || [];
|
|
12324
12316
|
}
|
|
12325
12317
|
if (ce) return P && ce ? fe : _e;
|
|
12326
12318
|
{
|
|
12327
|
-
const
|
|
12328
|
-
return Array.isArray(e) && e.length <= (y.threshold || 1e3) ? e : Array.isArray(e) ? e.slice(
|
|
12319
|
+
const qe = Z || 10, kt = (xe - 1) * qe, Rt = Math.min(kt + qe, (e == null ? void 0 : e.length) || 0);
|
|
12320
|
+
return Array.isArray(e) && e.length <= (y.threshold || 1e3) ? e : Array.isArray(e) ? e.slice(kt, Rt) : [];
|
|
12329
12321
|
}
|
|
12330
|
-
} catch (
|
|
12331
|
-
if (console.error("Error generating tableData:",
|
|
12332
|
-
const
|
|
12333
|
-
return e.slice(
|
|
12322
|
+
} catch (qe) {
|
|
12323
|
+
if (console.error("Error generating tableData:", qe), !ce && Array.isArray(e)) {
|
|
12324
|
+
const kt = (xe - 1) * Z;
|
|
12325
|
+
return e.slice(kt, Math.min(kt + Z, e.length));
|
|
12334
12326
|
}
|
|
12335
12327
|
return [];
|
|
12336
12328
|
}
|
|
12337
12329
|
}, [ce, Te, Re, Xe, xe, Z, lt, Ne, e, _e, P, fe]);
|
|
12338
|
-
|
|
12330
|
+
je(() => {
|
|
12339
12331
|
!ce && Array.isArray(e) && e.length > 0 && Array.isArray(mt) && mt.length === 0 && console.warn("CustomTable: tableData is empty but client data exists!", { dataLength: e.length, shouldUseCache: Te, cacheReady: Re, visibleRange: ae, cacheVisibleData: Xe ? Xe.length : 0 });
|
|
12340
12332
|
}, [mt, e, ce, Te, Re, ae, Xe]);
|
|
12341
|
-
const pt = at((
|
|
12333
|
+
const pt = at((qe) => {
|
|
12342
12334
|
var pi, ri;
|
|
12343
12335
|
if (ce && Y || L) return;
|
|
12344
12336
|
P || D(!0);
|
|
12345
|
-
const
|
|
12337
|
+
const kt = Z || 10;
|
|
12346
12338
|
if (!ce) {
|
|
12347
|
-
const Ct = Math.ceil((Array.isArray(e) ? e.length : 0) /
|
|
12348
|
-
if (
|
|
12339
|
+
const Ct = Math.ceil((Array.isArray(e) ? e.length : 0) / kt);
|
|
12340
|
+
if (qe < 1 || qe > Ct) return console.warn(`Page ${qe} out of range (1-${Ct})`), void D(!1);
|
|
12349
12341
|
}
|
|
12350
12342
|
if (((Ct = "iaTable") => {
|
|
12351
12343
|
var ki;
|
|
12352
12344
|
window._pageTransitionTimers ? (window._pageTransitionTimers.forEach((qi) => clearTimeout(qi)), window._pageTransitionTimers = []) : window._pageTransitionTimers = [], (ki = window._pageTransitions) != null && ki[Ct] || (window._pageTransitions = { ...window._pageTransitions, [Ct]: {} });
|
|
12353
|
-
})(z), window._pageTransitions[z][
|
|
12354
|
-
window._pageTransitions[z][
|
|
12355
|
-
const Rt = (
|
|
12356
|
-
if (Le(
|
|
12345
|
+
})(z), window._pageTransitions[z][qe]) return void D(!1);
|
|
12346
|
+
window._pageTransitions[z][qe] = !0, window && (window._targetPage = qe, window._forceReload = !0);
|
|
12347
|
+
const Rt = (qe - 1) * kt, Ut = Rt + kt - 1;
|
|
12348
|
+
if (Le(qe), de({ startRow: Rt, endRow: Ut }), Te) {
|
|
12357
12349
|
we && typeof we.setVisibleData == "function" && we.setVisibleData([]);
|
|
12358
12350
|
const Ct = (pi = we == null ? void 0 : we.dataSourceRef) == null ? void 0 : pi.current, ki = (ri = ct == null ? void 0 : ct.current) == null ? void 0 : ri.infiniteCache;
|
|
12359
12351
|
Ct && ki && typeof Ct.updateCacheReference == "function" && Ct.updateCacheReference(ki);
|
|
12360
|
-
const qi = Math.floor(Rt /
|
|
12352
|
+
const qi = Math.floor(Rt / kt);
|
|
12361
12353
|
if (ki && ki.isBlockCached(qi) && ce) {
|
|
12362
12354
|
const Xi = ki.getBlockData(qi);
|
|
12363
12355
|
Xi && Array.isArray(Xi) && Xi.length > 0 && (ne(Xi), D(!1));
|
|
12364
12356
|
}
|
|
12365
|
-
|
|
12357
|
+
yt(Rt, Ut);
|
|
12366
12358
|
}
|
|
12367
12359
|
const fi = setTimeout(() => {
|
|
12368
12360
|
window._pageTransitions && (window._pageTransitions = {});
|
|
@@ -12372,52 +12364,51 @@ const Td = (e, t = {}) => {
|
|
|
12372
12364
|
window._pageTransitionTimers.push(Ct);
|
|
12373
12365
|
}, 100);
|
|
12374
12366
|
window._pageTransitionTimers.push(fi);
|
|
12375
|
-
}, [Y, Te, de,
|
|
12376
|
-
if (!Y) return Ze({ field:
|
|
12377
|
-
}, [Y, Te, tt]), ut = at((
|
|
12378
|
-
if (!Y) return W(
|
|
12379
|
-
}, [Y, Te, Je]), gt = at((
|
|
12380
|
-
!Y && Te && ce && (D(!0), V(!0), Je(
|
|
12367
|
+
}, [Y, Te, de, yt, xe, ce, D, we, Z, Me, ne, ct, L, e]), it = at(({ field: qe, direction: kt }) => {
|
|
12368
|
+
if (!Y) return Ze({ field: qe, direction: kt }), Te ? (tt({ field: qe, direction: kt }), void Le(1)) : void 0;
|
|
12369
|
+
}, [Y, Te, tt]), ut = at((qe) => {
|
|
12370
|
+
if (!Y) return W(qe), Te ? (Je(qe), void Le(1)) : void 0;
|
|
12371
|
+
}, [Y, Te, Je]), gt = at((qe) => {
|
|
12372
|
+
!Y && Te && ce && (D(!0), V(!0), Je(qe ? { _search: qe } : {}), Le(1), ot(1), I(!0), Se(0), $e(1), de({ startRow: 0, endRow: Z - 1 }), window._pageTransitions && (window._pageTransitions = { 1: !0 }), yt(0, Z - 1), setTimeout(() => {
|
|
12381
12373
|
V(!1);
|
|
12382
12374
|
}, 500));
|
|
12383
|
-
}, [Y, Te, ce, Je, Z, de,
|
|
12384
|
-
k && k(
|
|
12385
|
-
}, [k]),
|
|
12386
|
-
|
|
12387
|
-
h && typeof h == "function" && h(
|
|
12388
|
-
}, [h,
|
|
12389
|
-
let
|
|
12390
|
-
return t.length &&
|
|
12391
|
-
ve.current &&
|
|
12392
|
-
}, 100)), () => clearTimeout(
|
|
12375
|
+
}, [Y, Te, ce, Je, Z, de, yt, V, ot, I, Se, $e]), It = at((qe) => {
|
|
12376
|
+
k && k(qe);
|
|
12377
|
+
}, [k]), bt = at(() => ({ api: { ...Ue, setServerSideDataSource: Oe, cleanup: () => se() } }), [Te, Xe, X, ge, Q, ct, we, yt, ce, Re, D, de, Le, Z, ze, o, se, st]), vt = ht(() => bt(), [bt]);
|
|
12378
|
+
je(() => {
|
|
12379
|
+
h && typeof h == "function" && h(vt);
|
|
12380
|
+
}, [h, vt]), es(ee, () => ({ ...vt, tableId: z }), [vt, z]), je(() => {
|
|
12381
|
+
let qe = null;
|
|
12382
|
+
return t.length && vt.api && (qe = setTimeout(() => {
|
|
12383
|
+
ve.current && vt && vt.api.sizeColumnsToFit && vt.api.sizeColumnsToFit();
|
|
12384
|
+
}, 100)), () => clearTimeout(qe);
|
|
12393
12385
|
}, [t.length, e == null ? void 0 : e.length, xe]);
|
|
12394
|
-
const wt =
|
|
12395
|
-
const
|
|
12386
|
+
const wt = ht(() => {
|
|
12387
|
+
const qe = _e.length > 0 && _e.length < Z, kt = !R && xe === Ce && Ce > 0;
|
|
12396
12388
|
if (ce) {
|
|
12397
12389
|
const Rt = !R || ke > 0 && Ce > 0;
|
|
12398
|
-
return { onPageChange: pt, onSortChange: it, onFilterChange: ut, onSearch: gt, totalItems: Math.max(ke, _e.length), totalPages:
|
|
12390
|
+
return { onPageChange: pt, onSortChange: it, onFilterChange: ut, onSearch: gt, totalItems: Math.max(ke, _e.length), totalPages: kt ? Ce : qe ? xe : Math.max(xe, Ce), currentPage: xe, loading: m || L, isCountUnknown: !Rt, enablePaginationWhenCountUnknown: !0, displayNextPageButton: !0, hasError: !!O, errorMessage: O, loadingRows: Te ? ft : {}, hasFailed: Y, pageSize: Z };
|
|
12399
12391
|
}
|
|
12400
12392
|
{
|
|
12401
12393
|
const Rt = Array.isArray(e) ? e.length : 0, Ut = Z || 10, fi = Math.max(1, Math.ceil(Rt / Ut));
|
|
12402
12394
|
return { pageSize: Ut, totalItems: Rt, totalPages: fi, currentPage: Math.min(xe, fi), loading: m || L, hasFailed: Y, onPageChange: pt, onSortChange: it, onFilterChange: ut, onSearch: gt, isCountUnknown: !1 };
|
|
12403
12395
|
}
|
|
12404
12396
|
}, [ce, pt, it, ut, gt, Te, et, ke, Ce, xe, m, L, R, O, ft, Y, Z, _e.length, e, Z]);
|
|
12405
|
-
|
|
12397
|
+
je(() => {
|
|
12406
12398
|
if (ce && Te && Xe && Xe.length > 0 && (ne(Xe), Xe.length < Z)) {
|
|
12407
|
-
const
|
|
12408
|
-
I(!1), Se(
|
|
12399
|
+
const qe = (xe - 1) * Z + Xe.length;
|
|
12400
|
+
I(!1), Se(qe), $e(xe), ot(xe);
|
|
12409
12401
|
}
|
|
12410
12402
|
}, [ce, Te, Xe, xe, Z]);
|
|
12411
|
-
const { processedColumns: Pt, initialGroupedColumns: $t } =
|
|
12412
|
-
return $t.forEach((
|
|
12403
|
+
const { processedColumns: Pt, initialGroupedColumns: $t } = ht(() => jn(t, {}, 0, null, n.minWidth), [t]), _i = ht(() => ns(Pt), [Pt]), Mi = {};
|
|
12404
|
+
return $t.forEach((qe) => Mi[qe] = !0), g.jsxs("div", { ref: H, className: "ia-table-enterprise-table-container", style: { height: he, display: "flex", flexDirection: "column", overflow: "hidden", position: "relative" }, children: [ce && m && g.jsx("div", { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, backgroundColor: "rgba(255, 255, 255, 0.7)", display: "flex", justifyContent: "center", alignItems: "center", zIndex: 100 }, children: g.jsxs("div", { className: "ia-table-loading-spinner", children: [g.jsx("div", { className: "ia-table-spinner" }), g.jsx("span", { children: "Loading data..." })] }) }), Array.isArray(mt) && mt.length === 0 && Array.isArray(e) && e.length > 0 && g.jsxs("div", { style: { padding: "10px", margin: "10px", backgroundColor: "#fff3f3", border: "1px solid #ffcfcf", borderRadius: "4px", color: "#d32f2f" }, children: [g.jsxs("p", { children: ["Data Loading Issue: Table data is empty but source data has", " ", e.length, " rows."] }), g.jsxs("p", { children: ["Cache:", " ", Te ? Re ? "Ready" : "Not Ready" : "Not Used"] })] }), ce && O && !Te && g.jsxs("div", { style: { padding: "20px", margin: "20px", backgroundColor: "#fff3f3", border: "1px solid #ffcfcf", borderRadius: "4px", color: "#d32f2f" }, children: [g.jsx("h3", { children: "Error Loading Data" }), g.jsx("p", { children: O }), g.jsx("button", { onClick: () => {
|
|
12413
12405
|
N(null), te(!1), X({ purge: !0 });
|
|
12414
12406
|
}, style: { padding: "8px 16px", background: "#f5f5f5", border: "1px solid #ddd", borderRadius: "4px", cursor: "pointer" }, children: "Retry" })] }), g.jsx(hs, { ref: oe, initialData: mt, initialColumns: Pt, uniqueIdField: o, childKeyField: a, tableApi: ze, tableActions: q.actions || {}, onSelectionChanged: u, onRowClicked: p, onCellValueChanged: f, onSearch: gt, serverSide: ce, pageSize: wt.pageSize, totalItems: wt.totalItems, totalPages: wt.totalPages, currentPage: wt.currentPage, tableId: z, alignedGrids: M, defaultColDef: n, initialExpandedColumnGroups: Mi, enableRowSpan: q.enableRowSpan, rowSpanColumn: q.rowSpanColumn, columnMap: _i, infiniteScroll: P, isCountUnknown: R, rowDragManaged: B, pinnedTopRows: l, pinnedBottomRows: r, getRowStyle: s, tableInstance: H, children: g.jsx(bd, { height: he, ...q, columns: Pt, columnMap: _i, tableApi: ze, data: mt, defaultColDef: n, hasOuterProvider: !0, refreshCounter: Q, onScroll: It, tableHeader: c, topRightOptions: _, showSaveTableConfig: v, headerHeight: d, tableId: z, alignedGrids: M, masterDetail: j, detailCellRenderer: T, detailRowHeight: C, infiniteScroll: P, ...wt, pagination: !P && q.pagination !== !1, paginationPageSizeSelector: J, hidePaginationPageSizeSelector: U }) })] });
|
|
12415
12407
|
});
|
|
12416
12408
|
Bn.propTypes = { onGridReady: dt.func, defaultColDef: dt.shape({ minWidth: dt.number }), tableHeader: dt.oneOfType([dt.string, dt.element, dt.node]), topRightOptions: dt.oneOfType([dt.element, dt.node]), headerHeight: dt.oneOfType(dt.number, dt.string), largeDatasetOptions: dt.shape({ enableIndexedDBCache: dt.bool, enableStreamingLoad: dt.bool, enableEnhancedWorker: dt.bool, binaryFormat: dt.bool, extremelyLargeDatasetThreshold: dt.number }), tableId: dt.string, alignedGrids: dt.arrayOf(dt.oneOfType([dt.string, dt.object, dt.shape({ tableId: dt.string.isRequired })])), masterDetail: dt.bool, detailCellRenderer: dt.func, detailRowHeight: dt.number, pinnedTopRowData: dt.array, pinnedBottomRowData: dt.array }, Bn.defaultProps = { data: [], defaultColDef: { minWidth: 150 }, headerHeight: 40, largeDatasetOptions: { enableIndexedDBCache: !1, enableStreamingLoad: !1, enableEnhancedWorker: !1, binaryFormat: !1, extremelyLargeDatasetThreshold: 1e6 }, tableId: null, alignedGrids: [], masterDetail: !1, detailCellRenderer: null, detailRowHeight: 200, onGridReady: null, pinnedTopRowData: [], pinnedBottomRowData: [] };
|
|
12417
12409
|
const Cd = Za(Bn, (e, t) => {
|
|
12418
|
-
var o, a, n, l;
|
|
12419
12410
|
let i = !0;
|
|
12420
|
-
return (
|
|
12411
|
+
return JSON.stringify(e.data) === JSON.stringify(t.data) && JSON.stringify(e.columns) === JSON.stringify(t.columns) && (i = !1), e.topRightOptions !== t.topRightOptions && (i = !1), e.tableHeader !== t.tableHeader && (i = !1), i;
|
|
12421
12412
|
});
|
|
12422
12413
|
export {
|
|
12423
12414
|
Cd as default
|