@lax-wp/design-system 0.13.66 → 0.13.68
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/components/data-display/infinite-table/body/cell/RowActionCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.es.js +19 -19
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.d.ts +1 -1
- package/dist/components/data-display/infinite-table/index.es.js +589 -604
- package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/types.d.ts +1 -4
- package/package.json +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as s, jsxs as b, Fragment as
|
|
2
|
-
import { useCheckbox as
|
|
3
|
-
import { useTableConfig as
|
|
4
|
-
import { canEditTableView as
|
|
5
|
-
import
|
|
6
|
-
import { FloatingBar as
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { useSensors as
|
|
9
|
-
import Ir, { useState as p, useRef as
|
|
10
|
-
import { AutoSizer as
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { useTable as
|
|
13
|
-
import { Body as
|
|
14
|
-
import { validateCellValue as
|
|
15
|
-
import { Row as
|
|
16
|
-
import { TableContext as
|
|
17
|
-
import { CurrencyDropdownPortal as
|
|
18
|
-
import { Head as
|
|
19
|
-
import { PendingEditsFloatingBar as
|
|
20
|
-
import { DATA_ROW_ID_ATTR as
|
|
21
|
-
import { getRowSlotHeight as
|
|
22
|
-
import { NoDataFoundWidgets as
|
|
23
|
-
import { NoDataFound as
|
|
24
|
-
import { Add2Icon as
|
|
25
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as b, Fragment as yr } from "react/jsx-runtime";
|
|
2
|
+
import { useCheckbox as Tr } from "../../../hooks/useCheckbox.es.js";
|
|
3
|
+
import { useTableConfig as Dr } from "../../../providers/design-system-provider/hooks.es.js";
|
|
4
|
+
import { canEditTableView as Nr, mergeViewColumnsWithTableColumns as kt } from "../../../utils/table.es.js";
|
|
5
|
+
import Mt from "../../button/Button.es.js";
|
|
6
|
+
import { FloatingBar as Or } from "../../floating-bar/FloatingBar.es.js";
|
|
7
|
+
import { Typography as be } from "../typography/Typography.es.js";
|
|
8
|
+
import { useSensors as Ar, useSensor as It, MouseSensor as Er, TouchSensor as Rr, DndContext as _r, closestCorners as kr, DragOverlay as Mr } from "@dnd-kit/core";
|
|
9
|
+
import Ir, { useState as p, useRef as O, useCallback as d, useEffect as T, useMemo as z, forwardRef as Lt } from "react";
|
|
10
|
+
import { AutoSizer as Lr } from "react-virtualized-auto-sizer";
|
|
11
|
+
import { createPortal as gr } from "react-dom";
|
|
12
|
+
import { useTable as Vr, useResizeColumns as jr } from "react-table";
|
|
13
|
+
import { Body as Br } from "./body/index.es.js";
|
|
14
|
+
import { validateCellValue as gt } from "./validateCell.es.js";
|
|
15
|
+
import { Row as Pr } from "./body/rows/row.es.js";
|
|
16
|
+
import { TableContext as Wr } from "./context.es.js";
|
|
17
|
+
import { CurrencyDropdownPortal as Hr } from "./CurrencyDropdownPortal.es.js";
|
|
18
|
+
import { Head as $r } from "./head/index.es.js";
|
|
19
|
+
import { PendingEditsFloatingBar as zr } from "./PendingEditsFloatingBar.es.js";
|
|
20
|
+
import { DATA_ROW_ID_ATTR as Ur, DATA_COLUMN_KEY_ATTR as qr, OS_VIEWPORT_SELECTOR as Jr, SCROLL_TO_CELL_COLUMN_WIDTH_FALLBACK as Cr, SCROLL_TO_CELL_LEFT_OFFSET as Gr, DEFAULT_PAGE_SIZE as Xr, DEFAULT_COLUMN_MAX_WIDTH as Yr, DEFAULT_COLUMN_WIDTH as Zr, DEFAULT_COLUMN_MIN_WIDTH as Qr, DND_ACTIVATION_DISTANCE as Vt, ROW_ADDITIONAL_ACTIONS_DEFAULT_WIDTH as Kr, ROW_OPTIONS_COLUMN_WIDTH as en, TOOLBAR_FIRST_BREAKPOINT as Z, TOOLBAR_SECOND_BREAKPOINT as ze, DROP_ANIMATION_DURATION as tn, DROP_ANIMATION_EASING as ln } from "./constants.es.js";
|
|
21
|
+
import { getRowSlotHeight as rn, useRowHeight as nn } from "./useRowHeight.es.js";
|
|
22
|
+
import { NoDataFoundWidgets as sn } from "../empty-state/NoDataFoundWidgets.es.js";
|
|
23
|
+
import { NoDataFound as on } from "../empty-state/NoDataFound.es.js";
|
|
24
|
+
import { Add2Icon as an } from "../../icon/icons.generated.es.js";
|
|
25
|
+
const cn = Lr, jt = "Create Column", dn = (g, D) => `button-admin-${g.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, "") || D}`, gn = Ir.memo(
|
|
26
26
|
({
|
|
27
27
|
tableKey: g,
|
|
28
28
|
searchConfig: D = {
|
|
@@ -43,7 +43,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
43
43
|
columnSort: { field: "", order: "" },
|
|
44
44
|
onRemoveSort: () => null
|
|
45
45
|
},
|
|
46
|
-
headerConfig:
|
|
46
|
+
headerConfig: a = {
|
|
47
47
|
showExportButton: null,
|
|
48
48
|
showFilters: !0,
|
|
49
49
|
showSorts: !0,
|
|
@@ -56,122 +56,119 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
56
56
|
isLoading: !1,
|
|
57
57
|
showDivider: !1
|
|
58
58
|
},
|
|
59
|
-
hoverConfig:
|
|
60
|
-
columns:
|
|
59
|
+
hoverConfig: Bt = null,
|
|
60
|
+
columns: A,
|
|
61
61
|
modelName: Q,
|
|
62
62
|
enableMasterDataEnumSuggestions: K = !1,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
modificationId: re,
|
|
67
|
-
lineItemRowId: ne,
|
|
68
|
-
enumSuggestionsData: se,
|
|
63
|
+
agreementId: ee,
|
|
64
|
+
enumSuggestionsExtraParams: te,
|
|
65
|
+
enumSuggestionsData: le,
|
|
69
66
|
data: m = [],
|
|
70
|
-
onRowClick:
|
|
71
|
-
showHeader:
|
|
72
|
-
tableActions:
|
|
67
|
+
onRowClick: Pt,
|
|
68
|
+
showHeader: xe,
|
|
69
|
+
tableActions: Ue,
|
|
73
70
|
rowOptions: U,
|
|
74
|
-
hideRowOptionWidth:
|
|
75
|
-
checkboxUtilities:
|
|
76
|
-
isLoading:
|
|
77
|
-
onScroll:
|
|
78
|
-
onScrolling:
|
|
79
|
-
isColumnConfigurable:
|
|
80
|
-
onAddColumnClick:
|
|
81
|
-
emptyMessage:
|
|
82
|
-
noDataWidget:
|
|
83
|
-
buttons:
|
|
84
|
-
onEditColumnClick:
|
|
85
|
-
onDeleteColumnClick:
|
|
86
|
-
onRowTooltipClick:
|
|
87
|
-
tooltiptext:
|
|
88
|
-
cascadingTableConfig:
|
|
89
|
-
originalsOnly:
|
|
90
|
-
disableOptionsForRowIndex:
|
|
91
|
-
tableHeightClass:
|
|
92
|
-
getFullRowDataOnClick:
|
|
93
|
-
selectedRowId:
|
|
94
|
-
onRowEdit:
|
|
71
|
+
hideRowOptionWidth: qe,
|
|
72
|
+
checkboxUtilities: V,
|
|
73
|
+
isLoading: re = !1,
|
|
74
|
+
onScroll: Wt,
|
|
75
|
+
onScrolling: Ht,
|
|
76
|
+
isColumnConfigurable: ne,
|
|
77
|
+
onAddColumnClick: se,
|
|
78
|
+
emptyMessage: Je,
|
|
79
|
+
noDataWidget: Ce,
|
|
80
|
+
buttons: Ge,
|
|
81
|
+
onEditColumnClick: Xe,
|
|
82
|
+
onDeleteColumnClick: Ye,
|
|
83
|
+
onRowTooltipClick: $t,
|
|
84
|
+
tooltiptext: zt,
|
|
85
|
+
cascadingTableConfig: Ut,
|
|
86
|
+
originalsOnly: qt,
|
|
87
|
+
disableOptionsForRowIndex: Jt,
|
|
88
|
+
tableHeightClass: oe = "h-[calc(100vh-220px)]",
|
|
89
|
+
getFullRowDataOnClick: Ct,
|
|
90
|
+
selectedRowId: Gt = null,
|
|
91
|
+
onRowEdit: k,
|
|
95
92
|
onBulkRowEdit: j,
|
|
96
|
-
inlineEditColumns:
|
|
97
|
-
isResizable:
|
|
98
|
-
paginationConfig:
|
|
99
|
-
dndSortableUtils:
|
|
100
|
-
multipleContexts:
|
|
101
|
-
withSortable:
|
|
102
|
-
withDraggable:
|
|
103
|
-
enableRootDrag:
|
|
104
|
-
pageSize:
|
|
105
|
-
onCascadingRowExpand:
|
|
106
|
-
totalItems:
|
|
107
|
-
showRecordCount:
|
|
108
|
-
getInnerRowData:
|
|
109
|
-
maxLevel:
|
|
110
|
-
expandedRows:
|
|
111
|
-
setExpandedRows:
|
|
112
|
-
showNewItem:
|
|
113
|
-
rawData:
|
|
114
|
-
dragConfig:
|
|
115
|
-
isOverlayLoading:
|
|
116
|
-
style:
|
|
117
|
-
floatingBarConfig:
|
|
118
|
-
rowWrapper:
|
|
119
|
-
rowLinkConfig:
|
|
120
|
-
isCellClickDisabled:
|
|
121
|
-
setHeaderOnParent:
|
|
122
|
-
optimizeTable:
|
|
123
|
-
multiSelectConfig:
|
|
124
|
-
headerContextOptions:
|
|
125
|
-
showHeaderContextOptions:
|
|
126
|
-
setShowHeaderContextOptions:
|
|
127
|
-
showDataTypeIcon:
|
|
128
|
-
rowAdditionalActions:
|
|
129
|
-
rowAdditionalActionsWidth:
|
|
130
|
-
setVisibleHeaders:
|
|
131
|
-
cellEditing:
|
|
132
|
-
cellEditingValue:
|
|
133
|
-
allowInlineEdit:
|
|
134
|
-
onFieldOperationFlow:
|
|
135
|
-
fieldOperationLoading:
|
|
136
|
-
onTableActionsReady:
|
|
137
|
-
onPendingEditsChange:
|
|
138
|
-
onCancelPendingEdits:
|
|
93
|
+
inlineEditColumns: Xt,
|
|
94
|
+
isResizable: Yt = !0,
|
|
95
|
+
paginationConfig: ie,
|
|
96
|
+
dndSortableUtils: ae,
|
|
97
|
+
multipleContexts: Ze,
|
|
98
|
+
withSortable: ye,
|
|
99
|
+
withDraggable: Zt,
|
|
100
|
+
enableRootDrag: Qt,
|
|
101
|
+
pageSize: Kt = Xr,
|
|
102
|
+
onCascadingRowExpand: el,
|
|
103
|
+
totalItems: Qe,
|
|
104
|
+
showRecordCount: Te = !1,
|
|
105
|
+
getInnerRowData: tl,
|
|
106
|
+
maxLevel: ll,
|
|
107
|
+
expandedRows: rl = {},
|
|
108
|
+
setExpandedRows: nl,
|
|
109
|
+
showNewItem: sl,
|
|
110
|
+
rawData: Ke,
|
|
111
|
+
dragConfig: ol,
|
|
112
|
+
isOverlayLoading: il,
|
|
113
|
+
style: al = {},
|
|
114
|
+
floatingBarConfig: De,
|
|
115
|
+
rowWrapper: cl,
|
|
116
|
+
rowLinkConfig: dl,
|
|
117
|
+
isCellClickDisabled: ul,
|
|
118
|
+
setHeaderOnParent: Ne,
|
|
119
|
+
optimizeTable: hl = !1,
|
|
120
|
+
multiSelectConfig: ml,
|
|
121
|
+
headerContextOptions: pl,
|
|
122
|
+
showHeaderContextOptions: fl,
|
|
123
|
+
setShowHeaderContextOptions: vl,
|
|
124
|
+
showDataTypeIcon: wl = !1,
|
|
125
|
+
rowAdditionalActions: ce,
|
|
126
|
+
rowAdditionalActionsWidth: Oe,
|
|
127
|
+
setVisibleHeaders: Ae,
|
|
128
|
+
cellEditing: Fl = null,
|
|
129
|
+
cellEditingValue: Sl = null,
|
|
130
|
+
allowInlineEdit: bl = !1,
|
|
131
|
+
onFieldOperationFlow: xl,
|
|
132
|
+
fieldOperationLoading: B = null,
|
|
133
|
+
onTableActionsReady: Ee,
|
|
134
|
+
onPendingEditsChange: et,
|
|
135
|
+
onCancelPendingEdits: P
|
|
139
136
|
}) => {
|
|
140
|
-
const
|
|
137
|
+
const i = Dr(), yl = rn(nn()), Tl = !!D?.search, tt = n?.columnFilters?.length > 0, q = Tl || tt, Dl = !!V, N = i?.getTableView?.(g) ?? null, [x, J] = p(N || null), M = !Nr(
|
|
141
138
|
x,
|
|
142
|
-
|
|
143
|
-
), [
|
|
139
|
+
i?.getUserId?.()
|
|
140
|
+
), [Re, _e] = p(!1), [ke, lt] = p(!1), [Nl, rt] = p(null), [w, Me] = p(A), nt = (m.length === 0 || !w.length) && !re, [st, de] = p(
|
|
144
141
|
null
|
|
145
|
-
), [
|
|
142
|
+
), [Ol, Al] = p(!1), [El, Rl] = p(null), [_l, kl] = p(!1), [Ml, ue] = p(
|
|
146
143
|
null
|
|
147
|
-
), [Il,
|
|
144
|
+
), [Il, he] = p(null), [Ll, ot] = p({}), [C, Ie] = p(
|
|
148
145
|
null
|
|
149
|
-
), [
|
|
146
|
+
), [gl, it] = p(!1), [E, Vl] = p(0), Le = O(null), ge = O(null), [at, jl] = p({
|
|
150
147
|
width: 0,
|
|
151
148
|
height: 0
|
|
152
|
-
}), [
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
const
|
|
149
|
+
}), [Bl, W] = p(null), [R, ct] = p(null), [Pl, dt] = p(null), [ut, ht] = p(null), [Ve, G] = p({}), je = O(!1), me = O(!1), Be = O(x);
|
|
150
|
+
Be.current = x;
|
|
151
|
+
const mt = O(i);
|
|
152
|
+
mt.current = i;
|
|
153
|
+
const pt = O(A);
|
|
154
|
+
pt.current = A;
|
|
155
|
+
const pe = O(n);
|
|
156
|
+
pe.current = n;
|
|
157
|
+
const ft = O(null), vt = O(
|
|
161
158
|
() => ({})
|
|
162
|
-
),
|
|
159
|
+
), wt = O(() => ({})), [u, _] = p({}), Pe = d(
|
|
163
160
|
(e, t, l) => {
|
|
164
|
-
|
|
161
|
+
_((r) => {
|
|
165
162
|
const o = r[e]?.[t];
|
|
166
163
|
let c = l.validationError;
|
|
167
164
|
if (c === void 0) {
|
|
168
|
-
const F = w.find((
|
|
165
|
+
const F = w.find((f) => f.key === t);
|
|
169
166
|
if (F) {
|
|
170
|
-
const
|
|
167
|
+
const f = gt(
|
|
171
168
|
l.value,
|
|
172
169
|
F
|
|
173
170
|
);
|
|
174
|
-
c =
|
|
171
|
+
c = f.isValid ? null : f.error || "Invalid";
|
|
175
172
|
} else
|
|
176
173
|
c = o?.validationError ?? null;
|
|
177
174
|
}
|
|
@@ -188,18 +185,18 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
188
185
|
});
|
|
189
186
|
},
|
|
190
187
|
[w]
|
|
191
|
-
),
|
|
188
|
+
), Ft = d(() => Object.values(u).some(
|
|
192
189
|
(e) => Object.keys(e).length > 0
|
|
193
|
-
), [
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
addPendingEdit:
|
|
197
|
-
hasPendingEdits:
|
|
190
|
+
), [u]);
|
|
191
|
+
T(() => {
|
|
192
|
+
Ee && Ee({
|
|
193
|
+
addPendingEdit: Pe,
|
|
194
|
+
hasPendingEdits: Ft
|
|
198
195
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const
|
|
196
|
+
}, [Ee, Pe, Ft]);
|
|
197
|
+
const Wl = d(
|
|
201
198
|
(e, t) => {
|
|
202
|
-
|
|
199
|
+
_((l) => {
|
|
203
200
|
const r = { ...l };
|
|
204
201
|
if (r[e]) {
|
|
205
202
|
const { [t]: o, ...c } = r[e];
|
|
@@ -209,24 +206,24 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
209
206
|
});
|
|
210
207
|
},
|
|
211
208
|
[]
|
|
212
|
-
),
|
|
213
|
-
(e, t) =>
|
|
214
|
-
[
|
|
215
|
-
),
|
|
216
|
-
(e, t) => !!
|
|
217
|
-
[
|
|
218
|
-
),
|
|
219
|
-
|
|
220
|
-
}, [
|
|
209
|
+
), Hl = d(
|
|
210
|
+
(e, t) => u[e]?.[t],
|
|
211
|
+
[u]
|
|
212
|
+
), $l = d(
|
|
213
|
+
(e, t) => !!u[e]?.[t],
|
|
214
|
+
[u]
|
|
215
|
+
), St = d(() => {
|
|
216
|
+
B || (P && Object.keys(u).length > 0 && P(u), _({}), G({}), W(null));
|
|
217
|
+
}, [B, P, u]), H = d(
|
|
221
218
|
(e, t, l) => {
|
|
222
219
|
setTimeout(() => {
|
|
223
|
-
|
|
220
|
+
i?.dispatchEvent?.("SCROLL_TO_TABLE_ROW", { rowIndex: l });
|
|
224
221
|
const r = w.findIndex(
|
|
225
222
|
(o) => o.key === t
|
|
226
223
|
);
|
|
227
224
|
setTimeout(() => {
|
|
228
225
|
const o = document.querySelector(
|
|
229
|
-
`[${
|
|
226
|
+
`[${Ur}="${e}"] [${qr}="${t}"]`
|
|
230
227
|
);
|
|
231
228
|
if (o)
|
|
232
229
|
o.scrollIntoView({
|
|
@@ -235,16 +232,16 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
235
232
|
inline: "center"
|
|
236
233
|
});
|
|
237
234
|
else if (r > 0) {
|
|
238
|
-
const c = document.querySelector(
|
|
235
|
+
const c = document.querySelector(Jr);
|
|
239
236
|
if (c) {
|
|
240
237
|
let F = 0;
|
|
241
|
-
for (let
|
|
242
|
-
const
|
|
243
|
-
|
|
238
|
+
for (let f = 0; f < r; f++) {
|
|
239
|
+
const y = w[f];
|
|
240
|
+
y?.sticky || (F += y?.width || Cr);
|
|
244
241
|
}
|
|
245
242
|
F = Math.max(
|
|
246
243
|
0,
|
|
247
|
-
F -
|
|
244
|
+
F - Gr
|
|
248
245
|
), c.scrollTo({
|
|
249
246
|
left: F,
|
|
250
247
|
behavior: "smooth"
|
|
@@ -255,37 +252,37 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
255
252
|
}, 350);
|
|
256
253
|
}, 100);
|
|
257
254
|
},
|
|
258
|
-
[w,
|
|
259
|
-
), X =
|
|
255
|
+
[w, i]
|
|
256
|
+
), X = d(
|
|
260
257
|
(e) => {
|
|
261
258
|
let t = !1, l = null;
|
|
262
259
|
const r = {}, o = /* @__PURE__ */ new Set();
|
|
263
260
|
return Object.entries(e).forEach(([c, F]) => {
|
|
264
|
-
r[c] = {}, Object.entries(F).forEach(([
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
|
|
261
|
+
r[c] = {}, Object.entries(F).forEach(([f, y]) => {
|
|
262
|
+
const L = w.find((S) => S.key === f), v = gt(
|
|
263
|
+
y.value,
|
|
264
|
+
L
|
|
268
265
|
);
|
|
269
|
-
|
|
270
|
-
...
|
|
266
|
+
v.isValid ? r[c][f] = {
|
|
267
|
+
...y,
|
|
271
268
|
validationError: null
|
|
272
|
-
} : (t = !0,
|
|
273
|
-
...
|
|
274
|
-
validationError:
|
|
269
|
+
} : (t = !0, v.error && o.add(v.error), l || (l = { rowId: c, columnKey: f }), r[c][f] = {
|
|
270
|
+
...y,
|
|
271
|
+
validationError: v.error
|
|
275
272
|
});
|
|
276
273
|
});
|
|
277
274
|
}), { hasErrors: t, updatedEdits: r, firstError: l, errorTypes: o };
|
|
278
275
|
},
|
|
279
276
|
[w]
|
|
280
|
-
),
|
|
277
|
+
), fe = d((e) => {
|
|
281
278
|
const t = e.has("Field required"), l = e.size > (t ? 1 : 0);
|
|
282
279
|
return t && l ? "Missing required field(s) and invalid format detected. Please review highlighted field(s)." : t ? "Missing required field(s). Please review highlighted field(s)." : "Invalid field value(s). Please review highlighted field(s).";
|
|
283
|
-
}, []),
|
|
284
|
-
const { hasErrors: e, updatedEdits: t, firstError: l, errorTypes: r } = X(
|
|
280
|
+
}, []), bt = d(() => {
|
|
281
|
+
const { hasErrors: e, updatedEdits: t, firstError: l, errorTypes: r } = X(u);
|
|
285
282
|
if (e) {
|
|
286
|
-
if (
|
|
283
|
+
if (_(t), i?.showNotification?.(
|
|
287
284
|
"error",
|
|
288
|
-
|
|
285
|
+
fe(r)
|
|
289
286
|
), l) {
|
|
290
287
|
const c = m.findIndex(
|
|
291
288
|
(F) => F.id === l.rowId
|
|
@@ -295,111 +292,111 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
295
292
|
return;
|
|
296
293
|
}
|
|
297
294
|
const o = [];
|
|
298
|
-
Object.entries(
|
|
299
|
-
const
|
|
300
|
-
(
|
|
295
|
+
Object.entries(u).forEach(([c, F]) => {
|
|
296
|
+
const f = m.find(
|
|
297
|
+
(y) => y.id === c
|
|
301
298
|
);
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
304
|
-
Object.entries(F).forEach(([
|
|
305
|
-
|
|
306
|
-
}), o.push({ ...
|
|
299
|
+
if (f) {
|
|
300
|
+
const y = { ...f }, L = {};
|
|
301
|
+
Object.entries(F).forEach(([v, S]) => {
|
|
302
|
+
y[v] = S.value, L[v] = { value: S.value, meta: S.meta };
|
|
303
|
+
}), o.push({ ...y, __editedFields: L });
|
|
307
304
|
}
|
|
308
|
-
}), o.length > 0 && (j ? j(o) :
|
|
305
|
+
}), o.length > 0 && (j ? j(o) : k && k(null, null, null, null, null, {
|
|
309
306
|
isBulk: !0,
|
|
310
307
|
rows: o
|
|
311
|
-
})),
|
|
308
|
+
})), _({}), G({}), W(null);
|
|
312
309
|
}, [
|
|
313
|
-
|
|
310
|
+
u,
|
|
314
311
|
m,
|
|
315
|
-
|
|
312
|
+
k,
|
|
316
313
|
j,
|
|
317
314
|
X,
|
|
318
|
-
|
|
315
|
+
fe,
|
|
319
316
|
H,
|
|
320
|
-
|
|
321
|
-
]),
|
|
317
|
+
i
|
|
318
|
+
]), zl = d(
|
|
322
319
|
(e) => {
|
|
323
|
-
if (
|
|
324
|
-
const t =
|
|
325
|
-
t &&
|
|
320
|
+
if (B) return;
|
|
321
|
+
const t = u[e];
|
|
322
|
+
t && P && P({ [e]: t }), _((l) => {
|
|
326
323
|
const r = { ...l };
|
|
327
324
|
return delete r[e], r;
|
|
328
|
-
}),
|
|
325
|
+
}), G((l) => {
|
|
329
326
|
const r = { ...l };
|
|
330
327
|
return Object.keys(r).forEach((o) => {
|
|
331
328
|
o.startsWith(`${e}-`) && delete r[o];
|
|
332
329
|
}), r;
|
|
333
330
|
}), W(null);
|
|
334
331
|
},
|
|
335
|
-
[
|
|
336
|
-
),
|
|
332
|
+
[B, P, u]
|
|
333
|
+
), Ul = d(
|
|
337
334
|
(e) => {
|
|
338
|
-
const t =
|
|
335
|
+
const t = u[e];
|
|
339
336
|
if (!t || Object.keys(t).length === 0) return;
|
|
340
337
|
const { hasErrors: l, updatedEdits: r, firstError: o, errorTypes: c } = X({ [e]: t });
|
|
341
338
|
if (l) {
|
|
342
|
-
if (
|
|
343
|
-
...
|
|
339
|
+
if (_((v) => ({
|
|
340
|
+
...v,
|
|
344
341
|
[e]: r[e]
|
|
345
|
-
})),
|
|
342
|
+
})), i?.showNotification?.(
|
|
346
343
|
"error",
|
|
347
|
-
|
|
344
|
+
fe(c)
|
|
348
345
|
), o) {
|
|
349
|
-
const
|
|
346
|
+
const v = m.findIndex(
|
|
350
347
|
(S) => S.id === o.rowId
|
|
351
348
|
);
|
|
352
|
-
H(o.rowId, o.columnKey,
|
|
349
|
+
H(o.rowId, o.columnKey, v);
|
|
353
350
|
}
|
|
354
351
|
return;
|
|
355
352
|
}
|
|
356
353
|
const F = m.find(
|
|
357
|
-
(
|
|
354
|
+
(v) => v.id === e
|
|
358
355
|
);
|
|
359
356
|
if (!F) return;
|
|
360
|
-
const
|
|
361
|
-
Object.entries(t).forEach(([
|
|
362
|
-
v
|
|
357
|
+
const f = { ...F }, y = {};
|
|
358
|
+
Object.entries(t).forEach(([v, S]) => {
|
|
359
|
+
f[v] = S.value, y[v] = { value: S.value, meta: S.meta };
|
|
363
360
|
});
|
|
364
|
-
const
|
|
365
|
-
j ? j([
|
|
361
|
+
const L = { ...f, __editedFields: y };
|
|
362
|
+
j ? j([L]) : k && k(null, null, null, null, null, {
|
|
366
363
|
isBulk: !0,
|
|
367
|
-
rows: [
|
|
368
|
-
}),
|
|
369
|
-
const S = { ...
|
|
364
|
+
rows: [L]
|
|
365
|
+
}), _((v) => {
|
|
366
|
+
const S = { ...v };
|
|
370
367
|
return delete S[e], S;
|
|
371
|
-
}),
|
|
372
|
-
const S = { ...
|
|
373
|
-
return Object.keys(S).forEach((
|
|
374
|
-
|
|
368
|
+
}), G((v) => {
|
|
369
|
+
const S = { ...v };
|
|
370
|
+
return Object.keys(S).forEach((_t) => {
|
|
371
|
+
_t.startsWith(`${e}-`) && delete S[_t];
|
|
375
372
|
}), S;
|
|
376
373
|
}), W(null);
|
|
377
374
|
},
|
|
378
375
|
[
|
|
379
|
-
|
|
376
|
+
u,
|
|
380
377
|
m,
|
|
381
|
-
|
|
378
|
+
k,
|
|
382
379
|
j,
|
|
383
380
|
X,
|
|
384
|
-
|
|
381
|
+
fe,
|
|
385
382
|
H,
|
|
386
|
-
|
|
383
|
+
i
|
|
387
384
|
]
|
|
388
|
-
), $ = z(() => Object.values(
|
|
385
|
+
), $ = z(() => Object.values(u).reduce(
|
|
389
386
|
(e, t) => e + Object.keys(t).length,
|
|
390
387
|
0
|
|
391
|
-
), [
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}, [$,
|
|
395
|
-
const
|
|
388
|
+
), [u]);
|
|
389
|
+
T(() => {
|
|
390
|
+
et?.($ > 0, $);
|
|
391
|
+
}, [$, et]);
|
|
392
|
+
const ql = z(() => {
|
|
396
393
|
const e = [];
|
|
397
|
-
return Object.entries(
|
|
394
|
+
return Object.entries(u).forEach(([t, l]) => {
|
|
398
395
|
const r = m.findIndex(
|
|
399
396
|
(o) => o.id === t
|
|
400
397
|
);
|
|
401
398
|
Object.entries(l).forEach(([o, c]) => {
|
|
402
|
-
const F = w.find((
|
|
399
|
+
const F = w.find((f) => f.key === o);
|
|
403
400
|
e.push({
|
|
404
401
|
rowId: t,
|
|
405
402
|
columnKey: o,
|
|
@@ -412,9 +409,9 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
412
409
|
});
|
|
413
410
|
});
|
|
414
411
|
}), e;
|
|
415
|
-
}, [
|
|
412
|
+
}, [u, w, m]), Jl = z(() => {
|
|
416
413
|
const e = /* @__PURE__ */ new Map();
|
|
417
|
-
return Object.entries(
|
|
414
|
+
return Object.entries(u).forEach(([t, l]) => {
|
|
418
415
|
const r = m.findIndex(
|
|
419
416
|
(o) => o.id === t
|
|
420
417
|
);
|
|
@@ -426,165 +423,165 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
426
423
|
}), Array.from(e.values()).sort(
|
|
427
424
|
(t, l) => t.rowIndex - l.rowIndex
|
|
428
425
|
);
|
|
429
|
-
}, [
|
|
430
|
-
(e) =>
|
|
426
|
+
}, [u, m]), Cl = d(
|
|
427
|
+
(e) => ct(e),
|
|
431
428
|
[]
|
|
432
|
-
),
|
|
433
|
-
() =>
|
|
429
|
+
), ve = d(
|
|
430
|
+
() => ct(null),
|
|
434
431
|
[]
|
|
435
|
-
),
|
|
432
|
+
), Gl = d(
|
|
436
433
|
(e, t) => {
|
|
437
|
-
|
|
434
|
+
dt({ value: e, reference: t }), R?.onSelected && R.onSelected(e, t), ve();
|
|
438
435
|
},
|
|
439
|
-
[
|
|
440
|
-
),
|
|
441
|
-
() =>
|
|
436
|
+
[R, ve]
|
|
437
|
+
), Xl = d(
|
|
438
|
+
() => dt(null),
|
|
442
439
|
[]
|
|
443
|
-
),
|
|
444
|
-
(e) =>
|
|
440
|
+
), Yl = d(
|
|
441
|
+
(e) => ht(e),
|
|
445
442
|
[]
|
|
446
|
-
),
|
|
447
|
-
() =>
|
|
443
|
+
), xt = d(
|
|
444
|
+
() => ht(null),
|
|
448
445
|
[]
|
|
449
|
-
),
|
|
446
|
+
), Zl = d(
|
|
450
447
|
(e, t) => {
|
|
451
|
-
|
|
448
|
+
G((l) => ({ ...l, [e]: t }));
|
|
452
449
|
},
|
|
453
450
|
[]
|
|
454
|
-
),
|
|
455
|
-
(e) =>
|
|
456
|
-
[
|
|
457
|
-
),
|
|
458
|
-
const e =
|
|
451
|
+
), Ql = d(
|
|
452
|
+
(e) => Ve[e],
|
|
453
|
+
[Ve]
|
|
454
|
+
), Kl = z(() => {
|
|
455
|
+
const e = oe.match(/h-\[(\d+px)\]/);
|
|
459
456
|
if (e) return e[1];
|
|
460
|
-
const t =
|
|
457
|
+
const t = oe.match(/h-\[(calc\(.+\))\]/);
|
|
461
458
|
if (t)
|
|
462
459
|
return t[1].replace(/([+-])/g, " $1 ").replace(/\s+/g, " ");
|
|
463
|
-
}, [
|
|
464
|
-
isEmpty:
|
|
460
|
+
}, [oe]), er = {
|
|
461
|
+
isEmpty: nt,
|
|
465
462
|
isFilters: q,
|
|
466
|
-
isColumnConfigurable:
|
|
467
|
-
handleOnClick:
|
|
468
|
-
emptyMessage:
|
|
469
|
-
buttons:
|
|
470
|
-
noDataWidget:
|
|
471
|
-
},
|
|
463
|
+
isColumnConfigurable: ne,
|
|
464
|
+
handleOnClick: se,
|
|
465
|
+
emptyMessage: Je,
|
|
466
|
+
buttons: Ge,
|
|
467
|
+
noDataWidget: Ce
|
|
468
|
+
}, tr = i?.t?.(jt) ?? jt, we = q ? "No Results Found" : Je || "No Data Found", lr = typeof we == "string" ? i?.t?.(we) ?? we : we, yt = { __isLoading: !0 }, rr = new Array(1).fill(yt), nr = new Array(Kt).fill(yt), Y = z(
|
|
472
469
|
() => w.filter((e) => !!e?.visible),
|
|
473
470
|
[w]
|
|
474
|
-
),
|
|
471
|
+
), sr = Vr(
|
|
475
472
|
{
|
|
476
|
-
columns:
|
|
473
|
+
columns: hl ? Y : w,
|
|
477
474
|
data: [
|
|
478
475
|
...m,
|
|
479
|
-
...
|
|
476
|
+
...re ? m?.length ? rr : nr : []
|
|
480
477
|
],
|
|
481
478
|
defaultColumn: {
|
|
482
|
-
minWidth:
|
|
483
|
-
width:
|
|
484
|
-
maxWidth:
|
|
479
|
+
minWidth: Qr,
|
|
480
|
+
width: Zr,
|
|
481
|
+
maxWidth: Yr
|
|
485
482
|
}
|
|
486
483
|
},
|
|
487
|
-
|
|
488
|
-
), { getTableProps:
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
|
|
484
|
+
jr
|
|
485
|
+
), { getTableProps: Tt, getTableBodyProps: Dt, headerGroups: Fe, prepareRow: Nt, rows: I } = sr;
|
|
486
|
+
ft.current = Fe;
|
|
487
|
+
const or = JSON.stringify(
|
|
488
|
+
Fe[0]?.headers?.map(
|
|
492
489
|
(e) => e?.Header
|
|
493
490
|
)
|
|
494
491
|
);
|
|
495
|
-
|
|
496
|
-
if (
|
|
497
|
-
const e =
|
|
498
|
-
|
|
492
|
+
T(() => {
|
|
493
|
+
if (Ae) {
|
|
494
|
+
const e = ft.current;
|
|
495
|
+
Ae?.(
|
|
499
496
|
e?.[0]?.headers?.map((t) => t?.Header) ?? []
|
|
500
497
|
);
|
|
501
498
|
}
|
|
502
|
-
}, [
|
|
503
|
-
const { checkboxConfig:
|
|
504
|
-
rows:
|
|
505
|
-
checkedIds:
|
|
506
|
-
isCheckAllDisabled:
|
|
507
|
-
selectionDisabledRowIds:
|
|
508
|
-
rawData:
|
|
509
|
-
onAllChecked:
|
|
510
|
-
setCheckedIds:
|
|
511
|
-
checkboxMetadata:
|
|
512
|
-
}),
|
|
513
|
-
It(
|
|
514
|
-
activationConstraint: { distance:
|
|
499
|
+
}, [or, Ae]);
|
|
500
|
+
const { checkboxConfig: Ot } = Tr({
|
|
501
|
+
rows: I,
|
|
502
|
+
checkedIds: V?.checkedIds,
|
|
503
|
+
isCheckAllDisabled: V?.isCheckAllDisabled,
|
|
504
|
+
selectionDisabledRowIds: V?.selectionDisabledRowIds,
|
|
505
|
+
rawData: Ke,
|
|
506
|
+
onAllChecked: kl,
|
|
507
|
+
setCheckedIds: V?.setCheckedIds,
|
|
508
|
+
checkboxMetadata: V?.checkboxMetadata
|
|
509
|
+
}), ir = Ar(
|
|
510
|
+
It(Er, {
|
|
511
|
+
activationConstraint: { distance: Vt }
|
|
515
512
|
}),
|
|
516
|
-
It(
|
|
517
|
-
activationConstraint: { distance:
|
|
513
|
+
It(Rr, {
|
|
514
|
+
activationConstraint: { distance: Vt }
|
|
518
515
|
})
|
|
519
|
-
),
|
|
520
|
-
easing:
|
|
521
|
-
duration:
|
|
516
|
+
), ar = {
|
|
517
|
+
easing: ln,
|
|
518
|
+
duration: tn
|
|
522
519
|
};
|
|
523
|
-
function
|
|
524
|
-
return !
|
|
525
|
-
(e, t) => (e[t] =
|
|
520
|
+
function cr() {
|
|
521
|
+
return !Ze?.length || !ye ? I : Ze.reduce(
|
|
522
|
+
(e, t) => (e[t] = I.filter(
|
|
526
523
|
(l) => l.original?.type === t
|
|
527
524
|
), e),
|
|
528
525
|
{}
|
|
529
526
|
);
|
|
530
527
|
}
|
|
531
|
-
|
|
532
|
-
const
|
|
528
|
+
wt.current = cr;
|
|
529
|
+
const dr = (e) => {
|
|
533
530
|
const { active: t } = e;
|
|
534
531
|
Ie(
|
|
535
|
-
|
|
532
|
+
I.find(
|
|
536
533
|
(l) => l.original?.id === t?.id
|
|
537
534
|
) ?? null
|
|
538
535
|
);
|
|
539
|
-
},
|
|
536
|
+
}, ur = (e) => {
|
|
540
537
|
const { active: t, over: l } = e;
|
|
541
|
-
l && (
|
|
538
|
+
l && (ae?.checkDndDragEnd && ae.checkDndDragEnd(
|
|
542
539
|
t,
|
|
543
540
|
l,
|
|
544
|
-
|
|
541
|
+
Ll,
|
|
545
542
|
(r) => {
|
|
546
|
-
|
|
543
|
+
ot(r), it(!0), ae.onDragSuccess?.({
|
|
547
544
|
draggedId: t.id,
|
|
548
545
|
droppedId: l.id,
|
|
549
546
|
draggedType: t.data.current?.type,
|
|
550
547
|
droppedType: l.data.current?.type,
|
|
551
548
|
updatedList: r,
|
|
552
|
-
cb: () =>
|
|
549
|
+
cb: () => it(!1)
|
|
553
550
|
});
|
|
554
551
|
}
|
|
555
552
|
), Ie(null));
|
|
556
|
-
},
|
|
557
|
-
!h?.onSort && !n?.onFilter ||
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
},
|
|
553
|
+
}, hr = () => Ie(null), mr = (e) => {
|
|
554
|
+
!h?.onSort && !n?.onFilter || de(st === e ? null : e);
|
|
555
|
+
}, pr = (e) => {
|
|
556
|
+
Rl(e), Al(!Ol), de(null);
|
|
557
|
+
}, We = d(() => {
|
|
561
558
|
h?.onRemoveSort ? h.onRemoveSort() : h?.onSort && h.onSort("", "");
|
|
562
|
-
}, [h]),
|
|
563
|
-
|
|
564
|
-
}, []),
|
|
565
|
-
() =>
|
|
559
|
+
}, [h]), Se = d((e = null) => {
|
|
560
|
+
rt(e), _e((t) => e ? !0 : !t);
|
|
561
|
+
}, []), He = d(
|
|
562
|
+
() => lt((e) => !e),
|
|
566
563
|
[]
|
|
567
|
-
),
|
|
568
|
-
const e =
|
|
564
|
+
), fr = () => {
|
|
565
|
+
const e = Fe[0]?.headers?.filter((t) => t?.visible !== !1);
|
|
569
566
|
for (let t = 0; t < e.length; t++)
|
|
570
567
|
if (e[t].sticky) return t - 1;
|
|
571
568
|
return e.length - 1;
|
|
572
|
-
},
|
|
569
|
+
}, vr = d(
|
|
573
570
|
(e) => {
|
|
574
571
|
let t = 0;
|
|
575
572
|
for (let l = e + 1; l < Y.length; l++)
|
|
576
573
|
Y[l].visible !== !1 && (t += Y[l].width ?? 0);
|
|
577
|
-
return
|
|
574
|
+
return ce && (t += Oe || Kr), U && (t += qe ? 0 : en), t;
|
|
578
575
|
},
|
|
579
576
|
[
|
|
580
577
|
Y,
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
578
|
+
Oe,
|
|
579
|
+
qe,
|
|
580
|
+
ce,
|
|
584
581
|
U
|
|
585
582
|
]
|
|
586
|
-
),
|
|
587
|
-
const e =
|
|
583
|
+
), At = () => {
|
|
584
|
+
const e = i?.getUserId?.();
|
|
588
585
|
return {
|
|
589
586
|
...x || {},
|
|
590
587
|
name: x?.name || "Untitled View",
|
|
@@ -592,7 +589,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
592
589
|
filters: x?.filters || n?.columnFilters,
|
|
593
590
|
id: x?.id || "untitled-view",
|
|
594
591
|
table_key: x?.table_key || g,
|
|
595
|
-
columns: x?.columns ||
|
|
592
|
+
columns: x?.columns || A?.map((t, l) => ({
|
|
596
593
|
name: t.Header,
|
|
597
594
|
width: t.width,
|
|
598
595
|
visible: t.visible,
|
|
@@ -604,10 +601,10 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
604
601
|
}))
|
|
605
602
|
};
|
|
606
603
|
};
|
|
607
|
-
|
|
608
|
-
const
|
|
604
|
+
vt.current = At;
|
|
605
|
+
const wr = (e, t) => {
|
|
609
606
|
if (M) return;
|
|
610
|
-
const l =
|
|
607
|
+
const l = At();
|
|
611
608
|
J({
|
|
612
609
|
...l,
|
|
613
610
|
columns: l?.columns?.map(
|
|
@@ -616,13 +613,13 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
616
613
|
unsaved: !0
|
|
617
614
|
});
|
|
618
615
|
};
|
|
619
|
-
|
|
620
|
-
if (n?.columnFilters?.length > 0 &&
|
|
621
|
-
const e =
|
|
616
|
+
T(() => {
|
|
617
|
+
if (n?.columnFilters?.length > 0 && _e(!0), M) return;
|
|
618
|
+
const e = Be.current;
|
|
622
619
|
if (JSON.stringify(e?.filters || []) !== JSON.stringify(n?.columnFilters || [])) {
|
|
623
620
|
const t = (e?.filters?.length ?? 0) > 0, l = n?.columnFilters?.length > 0;
|
|
624
|
-
if (!(t && !l && !
|
|
625
|
-
const o =
|
|
621
|
+
if (!(t && !l && !me.current)) {
|
|
622
|
+
const o = vt.current();
|
|
626
623
|
J({
|
|
627
624
|
...o,
|
|
628
625
|
filters: JSON.parse(
|
|
@@ -631,139 +628,139 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
631
628
|
unsaved: !0
|
|
632
629
|
});
|
|
633
630
|
}
|
|
634
|
-
|
|
631
|
+
me.current = !1;
|
|
635
632
|
}
|
|
636
633
|
}, [n?.columnFilters, M]);
|
|
637
|
-
const
|
|
634
|
+
const Fr = d(
|
|
638
635
|
(e) => {
|
|
639
|
-
|
|
636
|
+
me.current = !0, n?.onRemoveFilter?.(e);
|
|
640
637
|
},
|
|
641
638
|
[n?.onRemoveFilter]
|
|
642
|
-
),
|
|
643
|
-
|
|
639
|
+
), Sr = d(() => {
|
|
640
|
+
me.current = !0, n?.onClearFilter?.();
|
|
644
641
|
}, [n?.onClearFilter]);
|
|
645
|
-
|
|
646
|
-
h?.columnSort?.field ? (
|
|
647
|
-
}, [h?.columnSort?.field, h?.columnSort?.order]),
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
642
|
+
T(() => {
|
|
643
|
+
h?.columnSort?.field ? (lt(!0), h.columnSort.order === "asc" ? (ue(h.columnSort.field), he(null)) : h.columnSort.order === "desc" && (he(h.columnSort.field), ue(null))) : (ue(null), he(null));
|
|
644
|
+
}, [h?.columnSort?.field, h?.columnSort?.order]), T(() => {
|
|
645
|
+
Me(
|
|
646
|
+
kt(
|
|
647
|
+
Be.current?.columns || [],
|
|
648
|
+
A
|
|
652
649
|
)
|
|
653
650
|
);
|
|
654
|
-
}, [
|
|
655
|
-
x?.unsaved &&
|
|
656
|
-
}, [x]),
|
|
657
|
-
|
|
658
|
-
|
|
651
|
+
}, [A]), T(() => {
|
|
652
|
+
x?.unsaved && mt.current?.persistTableView?.(x);
|
|
653
|
+
}, [x]), T(() => {
|
|
654
|
+
ot(
|
|
655
|
+
wt.current()
|
|
659
656
|
);
|
|
660
|
-
}, [
|
|
661
|
-
J(N || null), N?.columns &&
|
|
662
|
-
|
|
657
|
+
}, [I.length]), T(() => {
|
|
658
|
+
J(N || null), N?.columns && Me(
|
|
659
|
+
kt(
|
|
663
660
|
N?.columns || [],
|
|
664
|
-
|
|
661
|
+
pt.current
|
|
665
662
|
)
|
|
666
|
-
), N?.filters && N.filters.length > 0 && !
|
|
667
|
-
|
|
668
|
-
}),
|
|
669
|
-
}, [N]),
|
|
670
|
-
if (
|
|
663
|
+
), N?.filters && N.filters.length > 0 && !je.current ? (requestAnimationFrame(() => {
|
|
664
|
+
pe.current?.onFilter?.(N.filters);
|
|
665
|
+
}), je.current = !0) : N?.filters && je.current && JSON.stringify(N.filters) !== JSON.stringify(pe.current?.columnFilters) && pe.current?.onFilter?.(N.filters);
|
|
666
|
+
}, [N]), T(() => {
|
|
667
|
+
if (Le.current) {
|
|
671
668
|
const e = new ResizeObserver(
|
|
672
|
-
(t) =>
|
|
669
|
+
(t) => Vl(t[0].contentRect.width)
|
|
673
670
|
);
|
|
674
|
-
return e.observe(
|
|
671
|
+
return e.observe(Le.current), () => e.disconnect();
|
|
675
672
|
}
|
|
676
|
-
}, []),
|
|
677
|
-
if (!
|
|
673
|
+
}, []), T(() => {
|
|
674
|
+
if (!ge.current) return;
|
|
678
675
|
const e = new ResizeObserver((t) => {
|
|
679
676
|
const { width: l, height: r } = t[0].contentRect;
|
|
680
|
-
|
|
677
|
+
jl({ width: l, height: r });
|
|
681
678
|
});
|
|
682
|
-
return e.observe(
|
|
679
|
+
return e.observe(ge.current), () => e.disconnect();
|
|
683
680
|
}, []);
|
|
684
|
-
const
|
|
685
|
-
|
|
681
|
+
const Et = /* @__PURE__ */ s(
|
|
682
|
+
$r,
|
|
686
683
|
{
|
|
687
|
-
isResizable:
|
|
688
|
-
headerGroups:
|
|
689
|
-
isCheckbox:
|
|
690
|
-
checkboxConfig:
|
|
691
|
-
isAllChecked:
|
|
692
|
-
showHeaderOptions:
|
|
693
|
-
setShowHeaderOptions:
|
|
694
|
-
isShowSortArrowAsc:
|
|
684
|
+
isResizable: Yt,
|
|
685
|
+
headerGroups: Fe,
|
|
686
|
+
isCheckbox: Dl,
|
|
687
|
+
checkboxConfig: Ot,
|
|
688
|
+
isAllChecked: _l,
|
|
689
|
+
showHeaderOptions: st ?? "",
|
|
690
|
+
setShowHeaderOptions: de,
|
|
691
|
+
isShowSortArrowAsc: Ml,
|
|
695
692
|
isShowSortArrowDesc: Il,
|
|
696
693
|
onSort: h?.onSort,
|
|
697
694
|
onFilter: n?.onFilter,
|
|
698
|
-
toggleHeaderOption:
|
|
699
|
-
setIsShowSortArrowAsc:
|
|
700
|
-
setIsShowSortArrowDesc:
|
|
701
|
-
toggleDataFilterModal:
|
|
695
|
+
toggleHeaderOption: mr,
|
|
696
|
+
setIsShowSortArrowAsc: ue,
|
|
697
|
+
setIsShowSortArrowDesc: he,
|
|
698
|
+
toggleDataFilterModal: Se,
|
|
702
699
|
rowOptions: Array.isArray(U) ? U : [],
|
|
703
|
-
isColumnConfigurable:
|
|
704
|
-
onAddColumnClick:
|
|
705
|
-
onEditColumnClick:
|
|
706
|
-
onDeleteColumnClick:
|
|
707
|
-
tableActions:
|
|
708
|
-
isLoading:
|
|
709
|
-
rowAdditionalActions:
|
|
700
|
+
isColumnConfigurable: ne ?? !1,
|
|
701
|
+
onAddColumnClick: se,
|
|
702
|
+
onEditColumnClick: Xe,
|
|
703
|
+
onDeleteColumnClick: Ye,
|
|
704
|
+
tableActions: Ue || null,
|
|
705
|
+
isLoading: re,
|
|
706
|
+
rowAdditionalActions: ce ?? null,
|
|
710
707
|
showPendingEditsColumn: $ > 0
|
|
711
708
|
}
|
|
712
|
-
),
|
|
713
|
-
|
|
709
|
+
), Rt = /* @__PURE__ */ b(yr, { children: [
|
|
710
|
+
gl || il ? /* @__PURE__ */ s("div", { className: "absolute left-0 top-0 w-full h-full z-40 flex items-center justify-center bg-neutral-100 dark:bg-black-700" }) : null,
|
|
714
711
|
/* @__PURE__ */ s(
|
|
715
712
|
"div",
|
|
716
713
|
{
|
|
717
|
-
...
|
|
714
|
+
...Tt(),
|
|
718
715
|
className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 h-full bg-white dark:bg-black-800",
|
|
719
|
-
children:
|
|
720
|
-
|
|
721
|
-
/* @__PURE__ */ s("div", { className: "absolute w-full", children:
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
716
|
+
children: nt ? /* @__PURE__ */ b("div", { className: "z-10", children: [
|
|
717
|
+
Et,
|
|
718
|
+
/* @__PURE__ */ s("div", { className: "absolute w-full", children: i?.renderEmpty ? i.renderEmpty(er) : /* @__PURE__ */ b("div", { className: "flex flex-col items-center justify-center w-full h-[12rem] text-neutral-900 dark:text-neutral-200 mt-8", children: [
|
|
719
|
+
Ce && !q ? /* @__PURE__ */ s(sn, { widgetType: "TABLE" }) : /* @__PURE__ */ s(on, { text: lr }),
|
|
720
|
+
ne && !q ? /* @__PURE__ */ s("div", { className: "my-4", children: /* @__PURE__ */ b(
|
|
721
|
+
Mt,
|
|
725
722
|
{
|
|
726
723
|
id: "btn-table-shell-create-column",
|
|
727
724
|
status: "primary",
|
|
728
725
|
appearance: "ghost",
|
|
729
|
-
onClick:
|
|
726
|
+
onClick: se,
|
|
730
727
|
children: [
|
|
731
|
-
/* @__PURE__ */ s(
|
|
728
|
+
/* @__PURE__ */ s(an, { className: "text-white dark:text-white" }),
|
|
732
729
|
" ",
|
|
733
|
-
|
|
730
|
+
tr
|
|
734
731
|
]
|
|
735
732
|
}
|
|
736
733
|
) }) : null,
|
|
737
|
-
!q &&
|
|
738
|
-
|
|
734
|
+
!q && Ge?.map((e, t) => /* @__PURE__ */ s(
|
|
735
|
+
Mt,
|
|
739
736
|
{
|
|
740
737
|
status: "secondary",
|
|
741
|
-
id:
|
|
738
|
+
id: dn(e.label, t),
|
|
742
739
|
onClick: e.onClick,
|
|
743
|
-
children:
|
|
740
|
+
children: i?.t?.(e.label) ?? e.label
|
|
744
741
|
},
|
|
745
742
|
`${e.label}-${t}`
|
|
746
743
|
))
|
|
747
744
|
] }) })
|
|
748
745
|
] }) : /* @__PURE__ */ s(
|
|
749
|
-
|
|
746
|
+
cn,
|
|
750
747
|
{
|
|
751
748
|
style: { width: "100%", height: "100%" },
|
|
752
749
|
renderProp: ({ width: e, height: t }) => {
|
|
753
|
-
const l = e > 0 ? e :
|
|
750
|
+
const l = e > 0 ? e : at.width, r = t > 0 ? t : at.height;
|
|
754
751
|
return l > 0 && r > 0 ? /* @__PURE__ */ s(
|
|
755
|
-
|
|
752
|
+
Br,
|
|
756
753
|
{
|
|
757
|
-
getTableBodyProps:
|
|
758
|
-
rows:
|
|
759
|
-
prepareRow:
|
|
760
|
-
isLoading:
|
|
761
|
-
onScroll:
|
|
762
|
-
onScrolling:
|
|
763
|
-
columns:
|
|
754
|
+
getTableBodyProps: Dt,
|
|
755
|
+
rows: I,
|
|
756
|
+
prepareRow: Nt,
|
|
757
|
+
isLoading: re,
|
|
758
|
+
onScroll: Wt,
|
|
759
|
+
onScrolling: Ht,
|
|
760
|
+
columns: A,
|
|
764
761
|
width: l,
|
|
765
762
|
height: r,
|
|
766
|
-
withSortable:
|
|
763
|
+
withSortable: ye,
|
|
767
764
|
allowAstarSearch: D?.allowAStarSearch || !1
|
|
768
765
|
}
|
|
769
766
|
) : null;
|
|
@@ -772,192 +769,186 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
772
769
|
)
|
|
773
770
|
}
|
|
774
771
|
)
|
|
775
|
-
] }),
|
|
776
|
-
|
|
772
|
+
] }), br = Lt((e, t) => /* @__PURE__ */ b("div", { className: "h-full w-full", ...e, ref: t, children: [
|
|
773
|
+
Et,
|
|
777
774
|
/* @__PURE__ */ s("div", { className: "relative w-full h-full", children: e?.children })
|
|
778
|
-
] })),
|
|
775
|
+
] })), xr = Lt((e, t) => /* @__PURE__ */ s("div", { className: "h-full w-full", ...e, ref: t, children: /* @__PURE__ */ s("div", { className: "relative w-full h-full", children: e?.children }) })), $e = z(() => i?.renderTableHeader ? i.renderTableHeader({
|
|
779
776
|
tableKey: g,
|
|
780
777
|
search: D?.search,
|
|
781
778
|
handleSearch: D?.handleSearch,
|
|
782
|
-
toggleShowFilters:
|
|
783
|
-
toggleShowSorts:
|
|
779
|
+
toggleShowFilters: Se,
|
|
780
|
+
toggleShowSorts: He,
|
|
784
781
|
filterCounts: n?.columnFilters?.length,
|
|
785
|
-
columns:
|
|
782
|
+
columns: A,
|
|
786
783
|
columnFilters: n?.columnFilters,
|
|
787
784
|
setSelectedTableView: J,
|
|
788
785
|
selectedTableView: x,
|
|
789
|
-
enableTableView:
|
|
786
|
+
enableTableView: a?.showTableView,
|
|
790
787
|
modelName: Q,
|
|
791
788
|
enableMasterDataEnumSuggestions: K,
|
|
792
789
|
onRemoveFilter: n?.onRemoveFilter,
|
|
793
790
|
onClearFilter: n?.onClearFilter,
|
|
794
791
|
onFilter: n?.onFilter,
|
|
795
|
-
data:
|
|
792
|
+
data: le ?? m,
|
|
796
793
|
tableHeaders: w,
|
|
797
|
-
showTableViewAsModal:
|
|
798
|
-
additionalOptions:
|
|
799
|
-
inlineActions:
|
|
800
|
-
showFilters:
|
|
801
|
-
showSorts:
|
|
802
|
-
showSearch:
|
|
803
|
-
isLoading: !!
|
|
804
|
-
setTableHeaders:
|
|
794
|
+
showTableViewAsModal: a?.showTableViewAsModal,
|
|
795
|
+
additionalOptions: a?.additionalOptions,
|
|
796
|
+
inlineActions: a?.inlineActions,
|
|
797
|
+
showFilters: a?.showFilters,
|
|
798
|
+
showSorts: a?.showSorts,
|
|
799
|
+
showSearch: a?.showSearch,
|
|
800
|
+
isLoading: !!a?.isLoading,
|
|
801
|
+
setTableHeaders: Me,
|
|
805
802
|
allowAStarSearch: !!D?.allowAStarSearch,
|
|
806
|
-
withContent: !!
|
|
807
|
-
setShowFilters:
|
|
803
|
+
withContent: !!a?.content,
|
|
804
|
+
setShowFilters: _e,
|
|
808
805
|
sort: h?.columnSort,
|
|
809
806
|
onSort: h?.onSort,
|
|
810
|
-
onRemoveSort:
|
|
811
|
-
showExportButton:
|
|
812
|
-
onExportClick:
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
agreementId: le,
|
|
816
|
-
modificationId: re,
|
|
817
|
-
lineItemRowId: ne
|
|
807
|
+
onRemoveSort: We,
|
|
808
|
+
showExportButton: a?.showExportButton,
|
|
809
|
+
onExportClick: a?.onExportClick,
|
|
810
|
+
agreementId: ee,
|
|
811
|
+
enumSuggestionsExtraParams: te
|
|
818
812
|
}) : null, [
|
|
819
813
|
g,
|
|
820
814
|
D?.search,
|
|
821
815
|
D?.handleSearch,
|
|
822
|
-
|
|
823
|
-
|
|
816
|
+
Se,
|
|
817
|
+
He,
|
|
824
818
|
n?.columnFilters,
|
|
825
|
-
|
|
819
|
+
A,
|
|
826
820
|
J,
|
|
827
821
|
x,
|
|
828
|
-
|
|
822
|
+
a,
|
|
829
823
|
Q,
|
|
830
824
|
n?.onRemoveFilter,
|
|
831
825
|
n?.onClearFilter,
|
|
832
826
|
n?.onFilter,
|
|
833
827
|
m,
|
|
834
|
-
|
|
828
|
+
le,
|
|
835
829
|
w,
|
|
836
830
|
h?.columnSort,
|
|
837
831
|
h?.onSort,
|
|
838
|
-
|
|
839
|
-
|
|
832
|
+
We,
|
|
833
|
+
i,
|
|
840
834
|
D?.allowAStarSearch,
|
|
841
835
|
K,
|
|
842
836
|
ee,
|
|
843
|
-
te
|
|
844
|
-
le,
|
|
845
|
-
re,
|
|
846
|
-
ne
|
|
837
|
+
te
|
|
847
838
|
]);
|
|
848
|
-
return
|
|
849
|
-
|
|
850
|
-
}, [
|
|
851
|
-
|
|
839
|
+
return T(() => {
|
|
840
|
+
Ne && Ne($e);
|
|
841
|
+
}, [$e, Ne]), /* @__PURE__ */ b(
|
|
842
|
+
Wr.Provider,
|
|
852
843
|
{
|
|
853
844
|
value: {
|
|
854
|
-
tableWrapper:
|
|
855
|
-
tableBodyWrapper:
|
|
856
|
-
lastNonStickyColumnIndex:
|
|
845
|
+
tableWrapper: br,
|
|
846
|
+
tableBodyWrapper: xr,
|
|
847
|
+
lastNonStickyColumnIndex: fr,
|
|
857
848
|
search: D?.search,
|
|
858
849
|
columnFilters: n?.columnFilters,
|
|
859
|
-
onRowClick:
|
|
850
|
+
onRowClick: Pt,
|
|
860
851
|
onSort: h?.onSort,
|
|
861
852
|
onFilter: n?.onFilter,
|
|
862
|
-
toggleShowFilters:
|
|
863
|
-
toggleShowSorts:
|
|
853
|
+
toggleShowFilters: Se,
|
|
854
|
+
toggleShowSorts: He,
|
|
864
855
|
onRemoveFilter: n?.onRemoveFilter,
|
|
865
856
|
onClearFilter: n?.onClearFilter,
|
|
866
857
|
rowOptions: U,
|
|
867
|
-
checkboxConfig:
|
|
858
|
+
checkboxConfig: Ot,
|
|
868
859
|
onResetFilter: n?.onResetFilter,
|
|
869
|
-
isColumnConfigurable:
|
|
870
|
-
onAddColumnClick:
|
|
871
|
-
onEditColumnClick:
|
|
872
|
-
onDeleteColumnClick:
|
|
873
|
-
onRowTooltipClick:
|
|
874
|
-
tooltiptext:
|
|
875
|
-
cascadingTableConfig:
|
|
876
|
-
activeInlineEdit:
|
|
860
|
+
isColumnConfigurable: ne,
|
|
861
|
+
onAddColumnClick: se,
|
|
862
|
+
onEditColumnClick: Xe,
|
|
863
|
+
onDeleteColumnClick: Ye,
|
|
864
|
+
onRowTooltipClick: $t,
|
|
865
|
+
tooltiptext: zt,
|
|
866
|
+
cascadingTableConfig: Ut,
|
|
867
|
+
activeInlineEdit: Bl,
|
|
877
868
|
setActiveInlineEdit: W,
|
|
878
|
-
originalsOnly:
|
|
879
|
-
disableOptionsForRowIndex:
|
|
880
|
-
getFullRowDataOnClick:
|
|
881
|
-
selectedRowId:
|
|
882
|
-
getSumOfNextVisibleColumnWidth:
|
|
883
|
-
onRowEdit:
|
|
884
|
-
inlineEditColumns:
|
|
885
|
-
tableActions:
|
|
886
|
-
dndSortableUtils:
|
|
887
|
-
withSortable:
|
|
888
|
-
withDraggable:
|
|
889
|
-
onCascadingRowExpand:
|
|
890
|
-
getInnerRowData:
|
|
869
|
+
originalsOnly: qt,
|
|
870
|
+
disableOptionsForRowIndex: Jt,
|
|
871
|
+
getFullRowDataOnClick: Ct,
|
|
872
|
+
selectedRowId: Gt,
|
|
873
|
+
getSumOfNextVisibleColumnWidth: vr,
|
|
874
|
+
onRowEdit: k,
|
|
875
|
+
inlineEditColumns: Xt,
|
|
876
|
+
tableActions: Ue,
|
|
877
|
+
dndSortableUtils: ae,
|
|
878
|
+
withSortable: ye,
|
|
879
|
+
withDraggable: Zt,
|
|
880
|
+
onCascadingRowExpand: el,
|
|
881
|
+
getInnerRowData: tl,
|
|
891
882
|
tableHeaders: w,
|
|
892
|
-
maxLevel:
|
|
893
|
-
expandedRows:
|
|
894
|
-
setExpandedRows:
|
|
895
|
-
showNewItem:
|
|
896
|
-
rawData:
|
|
897
|
-
dragConfig:
|
|
898
|
-
rowWrapper:
|
|
899
|
-
rowLinkConfig:
|
|
900
|
-
isCellClickDisabled:
|
|
883
|
+
maxLevel: ll,
|
|
884
|
+
expandedRows: rl,
|
|
885
|
+
setExpandedRows: nl,
|
|
886
|
+
showNewItem: sl,
|
|
887
|
+
rawData: Ke,
|
|
888
|
+
dragConfig: ol,
|
|
889
|
+
rowWrapper: cl,
|
|
890
|
+
rowLinkConfig: dl,
|
|
891
|
+
isCellClickDisabled: ul,
|
|
901
892
|
asyncRowOptionsFilter: n?.asyncRowOptionsFilter,
|
|
902
|
-
handleUpdateColumnWidth:
|
|
893
|
+
handleUpdateColumnWidth: wr,
|
|
903
894
|
isTableViewReadOnly: M,
|
|
904
|
-
multiSelectConfig:
|
|
905
|
-
headerContextOptions:
|
|
906
|
-
showHeaderContextOptions:
|
|
907
|
-
setShowHeaderContextOptions:
|
|
908
|
-
headerDivWidth:
|
|
909
|
-
showDataTypeIcon:
|
|
910
|
-
rowAdditionalActions:
|
|
911
|
-
hoverConfig:
|
|
912
|
-
rowAdditionalActionsWidth:
|
|
913
|
-
cellEditing:
|
|
914
|
-
cellEditingValue:
|
|
915
|
-
openMasterDataModal:
|
|
916
|
-
closeMasterDataModal:
|
|
917
|
-
selectedMasterData:
|
|
918
|
-
clearSelectedMasterData:
|
|
919
|
-
allowInlineEdit:
|
|
920
|
-
openCurrencyDropdown:
|
|
921
|
-
closeCurrencyDropdown:
|
|
922
|
-
currencyDropdownConfig:
|
|
923
|
-
selectedCurrenciesMap:
|
|
924
|
-
setCurrencyForCell:
|
|
925
|
-
getCurrencyForCell:
|
|
926
|
-
pendingEdits:
|
|
927
|
-
addPendingEdit:
|
|
928
|
-
removePendingEdit:
|
|
929
|
-
getPendingEdit:
|
|
930
|
-
hasPendingEdit:
|
|
931
|
-
clearAllPendingEdits:
|
|
932
|
-
saveAllPendingEdits:
|
|
933
|
-
clearRowPendingEdits:
|
|
934
|
-
saveRowPendingEdits:
|
|
895
|
+
multiSelectConfig: ml,
|
|
896
|
+
headerContextOptions: pl,
|
|
897
|
+
showHeaderContextOptions: fl,
|
|
898
|
+
setShowHeaderContextOptions: vl,
|
|
899
|
+
headerDivWidth: E,
|
|
900
|
+
showDataTypeIcon: wl,
|
|
901
|
+
rowAdditionalActions: ce,
|
|
902
|
+
hoverConfig: Bt,
|
|
903
|
+
rowAdditionalActionsWidth: Oe,
|
|
904
|
+
cellEditing: Fl,
|
|
905
|
+
cellEditingValue: Sl,
|
|
906
|
+
openMasterDataModal: Cl,
|
|
907
|
+
closeMasterDataModal: ve,
|
|
908
|
+
selectedMasterData: Pl,
|
|
909
|
+
clearSelectedMasterData: Xl,
|
|
910
|
+
allowInlineEdit: bl,
|
|
911
|
+
openCurrencyDropdown: Yl,
|
|
912
|
+
closeCurrencyDropdown: xt,
|
|
913
|
+
currencyDropdownConfig: ut,
|
|
914
|
+
selectedCurrenciesMap: Ve,
|
|
915
|
+
setCurrencyForCell: Zl,
|
|
916
|
+
getCurrencyForCell: Ql,
|
|
917
|
+
pendingEdits: u,
|
|
918
|
+
addPendingEdit: Pe,
|
|
919
|
+
removePendingEdit: Wl,
|
|
920
|
+
getPendingEdit: Hl,
|
|
921
|
+
hasPendingEdit: $l,
|
|
922
|
+
clearAllPendingEdits: St,
|
|
923
|
+
saveAllPendingEdits: bt,
|
|
924
|
+
clearRowPendingEdits: zl,
|
|
925
|
+
saveRowPendingEdits: Ul,
|
|
935
926
|
pendingEditsCount: $,
|
|
936
927
|
scrollToCell: H,
|
|
937
|
-
onFieldOperationFlow:
|
|
938
|
-
fieldOperationLoading:
|
|
928
|
+
onFieldOperationFlow: xl,
|
|
929
|
+
fieldOperationLoading: B,
|
|
939
930
|
validateAllPendingEdits: X
|
|
940
931
|
},
|
|
941
932
|
children: [
|
|
942
|
-
|
|
933
|
+
xe ? /* @__PURE__ */ b(
|
|
943
934
|
"div",
|
|
944
935
|
{
|
|
945
|
-
ref:
|
|
946
|
-
className: `mb-2 flex w-full min-w-0 gap-2 dark:bg-black-800 ${
|
|
936
|
+
ref: Le,
|
|
937
|
+
className: `mb-2 flex w-full min-w-0 gap-2 dark:bg-black-800 ${E < Z ? "flex-col items-stretch" : "flex-row items-center"}`,
|
|
947
938
|
children: [
|
|
948
939
|
/* @__PURE__ */ b(
|
|
949
940
|
"div",
|
|
950
941
|
{
|
|
951
|
-
className: `flex items-center gap-x-2 gap-y-1 ${
|
|
942
|
+
className: `flex items-center gap-x-2 gap-y-1 ${E < Z ? "w-full flex-wrap" : ""} ${a?.content ? "min-w-0 flex-1" : "shrink-0"}`,
|
|
952
943
|
children: [
|
|
953
|
-
|
|
944
|
+
a?.content ? /* @__PURE__ */ s(
|
|
954
945
|
"div",
|
|
955
946
|
{
|
|
956
|
-
className: `min-w-0 ${
|
|
957
|
-
children:
|
|
947
|
+
className: `min-w-0 ${E < Z ? "w-full" : "flex-1"}`,
|
|
948
|
+
children: a.content
|
|
958
949
|
}
|
|
959
950
|
) : null,
|
|
960
|
-
|
|
951
|
+
Te ? /* @__PURE__ */ b("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
961
952
|
/* @__PURE__ */ b(
|
|
962
953
|
"svg",
|
|
963
954
|
{
|
|
@@ -981,16 +972,16 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
981
972
|
}
|
|
982
973
|
),
|
|
983
974
|
/* @__PURE__ */ s(
|
|
984
|
-
|
|
975
|
+
be,
|
|
985
976
|
{
|
|
986
977
|
size: "small",
|
|
987
978
|
variant: "semibold",
|
|
988
979
|
appearance: "title",
|
|
989
|
-
children: (
|
|
980
|
+
children: (Qe ?? m.length).toLocaleString()
|
|
990
981
|
}
|
|
991
982
|
),
|
|
992
983
|
/* @__PURE__ */ s(
|
|
993
|
-
|
|
984
|
+
be,
|
|
994
985
|
{
|
|
995
986
|
size: "small",
|
|
996
987
|
variant: "regular",
|
|
@@ -998,28 +989,28 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
998
989
|
children: "total records"
|
|
999
990
|
}
|
|
1000
991
|
)
|
|
1001
|
-
] }) :
|
|
992
|
+
] }) : a?.preContent ? /* @__PURE__ */ s("div", { className: "flex min-w-0 shrink-0 justify-start items-center", children: a.preContent }) : null
|
|
1002
993
|
]
|
|
1003
994
|
}
|
|
1004
995
|
),
|
|
1005
996
|
/* @__PURE__ */ b(
|
|
1006
997
|
"div",
|
|
1007
998
|
{
|
|
1008
|
-
className: `flex min-w-0 items-center justify-end ${
|
|
999
|
+
className: `flex min-w-0 items-center justify-end ${E < Z ? "w-full" : a?.content ? "shrink-0" : "flex-1"} ${E < ze ? "flex-col" : "flex-row"} ${a?.postContent ? "gap-2" : ""}`,
|
|
1009
1000
|
children: [
|
|
1010
|
-
|
|
1001
|
+
Te && a?.preContent ? /* @__PURE__ */ s("div", { className: "flex w-full justify-start items-center", children: a.preContent }) : null,
|
|
1011
1002
|
/* @__PURE__ */ s(
|
|
1012
1003
|
"div",
|
|
1013
1004
|
{
|
|
1014
|
-
className: `flex justify-end items-center min-w-0 ${
|
|
1015
|
-
children:
|
|
1005
|
+
className: `flex justify-end items-center min-w-0 ${E < ze || E < Z ? "w-full" : ""}`,
|
|
1006
|
+
children: $e
|
|
1016
1007
|
}
|
|
1017
1008
|
),
|
|
1018
|
-
|
|
1009
|
+
a?.postContent ? /* @__PURE__ */ s(
|
|
1019
1010
|
"div",
|
|
1020
1011
|
{
|
|
1021
|
-
className: `flex justify-end items-center ${
|
|
1022
|
-
children:
|
|
1012
|
+
className: `flex justify-end items-center ${E < ze ? "w-full" : ""}`,
|
|
1013
|
+
children: a.postContent
|
|
1023
1014
|
}
|
|
1024
1015
|
) : null
|
|
1025
1016
|
]
|
|
@@ -1028,22 +1019,22 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1028
1019
|
]
|
|
1029
1020
|
}
|
|
1030
1021
|
) : null,
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1022
|
+
a?.showDivider ? /* @__PURE__ */ s("div", { className: "border-b pb-2 w-full dark:bg-black-800" }) : null,
|
|
1023
|
+
Re || ke ? /* @__PURE__ */ s("div", { className: "flex justify-between items-center pb-4 dark:bg-black-800", children: /* @__PURE__ */ b("div", { className: "flex gap-2 items-center", children: [
|
|
1024
|
+
ke && i?.renderSortItem ? i.renderSortItem({
|
|
1034
1025
|
sort: h?.columnSort,
|
|
1035
|
-
onRemoveSort:
|
|
1026
|
+
onRemoveSort: We,
|
|
1036
1027
|
onSort: h?.onSort,
|
|
1037
1028
|
tableHeaders: w,
|
|
1038
1029
|
data: m,
|
|
1039
1030
|
disabled: M
|
|
1040
1031
|
}) : null,
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
(
|
|
1032
|
+
Re && ke && h?.columnSort?.field !== "" ? /* @__PURE__ */ s("div", { className: "h-8 w-[1px] flex-shrink-0 bg-neutral-200" }) : null,
|
|
1033
|
+
Re ? /* @__PURE__ */ b("div", { className: "flex gap-2 items-center", children: [
|
|
1034
|
+
(tt || n?.onResetFilter) && i?.renderActiveFilters && i.renderActiveFilters({
|
|
1044
1035
|
filters: n?.columnFilters,
|
|
1045
|
-
onRemoveFilter:
|
|
1046
|
-
onClearFilter:
|
|
1036
|
+
onRemoveFilter: Fr,
|
|
1037
|
+
onClearFilter: Sr,
|
|
1047
1038
|
onResetFilter: n?.onResetFilter,
|
|
1048
1039
|
onFilter: n?.onFilter,
|
|
1049
1040
|
tableHeaders: w,
|
|
@@ -1053,39 +1044,33 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1053
1044
|
noSpacing: !0,
|
|
1054
1045
|
notionStyle: n?.notionStyle,
|
|
1055
1046
|
context: n?.context,
|
|
1056
|
-
data:
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
agreementId: le,
|
|
1060
|
-
modificationId: re,
|
|
1061
|
-
lineItemRowId: ne,
|
|
1047
|
+
data: le ?? m,
|
|
1048
|
+
agreementId: ee,
|
|
1049
|
+
enumSuggestionsExtraParams: te,
|
|
1062
1050
|
disabled: M
|
|
1063
1051
|
}),
|
|
1064
|
-
|
|
1052
|
+
i?.renderFilterButtons && i.renderFilterButtons({
|
|
1065
1053
|
onClearFilter: n?.onClearFilter,
|
|
1066
|
-
onClose:
|
|
1054
|
+
onClose: pr,
|
|
1067
1055
|
modelName: Q,
|
|
1068
1056
|
enableMasterDataEnumSuggestions: K,
|
|
1069
|
-
defaultFilterColumn:
|
|
1070
|
-
resetDefaultFilterColumn: () =>
|
|
1071
|
-
column:
|
|
1057
|
+
defaultFilterColumn: Nl,
|
|
1058
|
+
resetDefaultFilterColumn: () => rt(null),
|
|
1059
|
+
column: El,
|
|
1072
1060
|
onFilter: n?.onFilter,
|
|
1073
1061
|
tableHeaders: w,
|
|
1074
1062
|
columnFilters: n?.columnFilters,
|
|
1075
|
-
data:
|
|
1063
|
+
data: le ?? m,
|
|
1076
1064
|
notionStyle: n?.notionStyle,
|
|
1077
1065
|
context: n?.context,
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
agreementId: le,
|
|
1081
|
-
modificationId: re,
|
|
1082
|
-
lineItemRowId: ne,
|
|
1066
|
+
agreementId: ee,
|
|
1067
|
+
enumSuggestionsExtraParams: te,
|
|
1083
1068
|
disabled: M
|
|
1084
1069
|
})
|
|
1085
1070
|
] }) : null
|
|
1086
1071
|
] }) }) : null,
|
|
1087
|
-
|
|
1088
|
-
!
|
|
1072
|
+
De && Object.keys(De).length ? /* @__PURE__ */ s(Or, { ...De }) : null,
|
|
1073
|
+
!xe && Te ? /* @__PURE__ */ b("div", { className: "flex items-center gap-1.5 mb-2", children: [
|
|
1089
1074
|
/* @__PURE__ */ b(
|
|
1090
1075
|
"svg",
|
|
1091
1076
|
{
|
|
@@ -1108,57 +1093,57 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1108
1093
|
]
|
|
1109
1094
|
}
|
|
1110
1095
|
),
|
|
1111
|
-
/* @__PURE__ */ s(
|
|
1112
|
-
/* @__PURE__ */ s(
|
|
1113
|
-
] }) : !
|
|
1096
|
+
/* @__PURE__ */ s(be, { size: "small", variant: "semibold", appearance: "title", children: (Qe ?? m.length).toLocaleString() }),
|
|
1097
|
+
/* @__PURE__ */ s(be, { size: "small", variant: "regular", appearance: "subtitle", children: "total records" })
|
|
1098
|
+
] }) : !xe && a?.preContent ? /* @__PURE__ */ s("div", { className: "flex items-center mb-2", children: a.preContent }) : null,
|
|
1114
1099
|
/* @__PURE__ */ s(
|
|
1115
1100
|
"div",
|
|
1116
1101
|
{
|
|
1117
|
-
ref:
|
|
1118
|
-
className: `w-full ${
|
|
1102
|
+
ref: ge,
|
|
1103
|
+
className: `w-full ${ie ? "h-auto" : oe} rounded-lg relative border overflow-x-hidden`,
|
|
1119
1104
|
style: {
|
|
1120
|
-
...
|
|
1121
|
-
height: m?.length > 0 ? `${(m?.length + 1) *
|
|
1122
|
-
} : { height:
|
|
1123
|
-
...
|
|
1105
|
+
...ie ? {
|
|
1106
|
+
height: m?.length > 0 ? `${(m?.length + 1) * yl + 4}px` : "350px"
|
|
1107
|
+
} : { height: Kl },
|
|
1108
|
+
...al
|
|
1124
1109
|
},
|
|
1125
|
-
children:
|
|
1126
|
-
|
|
1110
|
+
children: Qt ? Rt : /* @__PURE__ */ b(
|
|
1111
|
+
_r,
|
|
1127
1112
|
{
|
|
1128
|
-
sensors:
|
|
1129
|
-
onDragEnd:
|
|
1130
|
-
onDragStart:
|
|
1131
|
-
onDragCancel:
|
|
1132
|
-
collisionDetection:
|
|
1113
|
+
sensors: ir,
|
|
1114
|
+
onDragEnd: ur,
|
|
1115
|
+
onDragStart: dr,
|
|
1116
|
+
onDragCancel: hr,
|
|
1117
|
+
collisionDetection: kr,
|
|
1133
1118
|
children: [
|
|
1134
|
-
|
|
1135
|
-
|
|
1119
|
+
Rt,
|
|
1120
|
+
C ? gr(
|
|
1136
1121
|
/* @__PURE__ */ s(
|
|
1137
|
-
|
|
1122
|
+
Mr,
|
|
1138
1123
|
{
|
|
1139
1124
|
adjustScale: !0,
|
|
1140
|
-
dropAnimation:
|
|
1125
|
+
dropAnimation: ar,
|
|
1141
1126
|
children: /* @__PURE__ */ s(
|
|
1142
1127
|
"table",
|
|
1143
1128
|
{
|
|
1144
|
-
...
|
|
1129
|
+
...Tt(),
|
|
1145
1130
|
className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 bg-white dark:bg-black-700 table-auto border-collapse",
|
|
1146
1131
|
children: /* @__PURE__ */ b(
|
|
1147
1132
|
"tbody",
|
|
1148
1133
|
{
|
|
1149
|
-
...
|
|
1134
|
+
...Dt(),
|
|
1150
1135
|
className: "bg-transparent divide-y divide-neutral-200",
|
|
1151
1136
|
children: [
|
|
1152
|
-
void
|
|
1137
|
+
void Nt(C),
|
|
1153
1138
|
/* @__PURE__ */ s(
|
|
1154
|
-
|
|
1139
|
+
Pr,
|
|
1155
1140
|
{
|
|
1156
|
-
row:
|
|
1157
|
-
index:
|
|
1158
|
-
(e) => e.id ===
|
|
1141
|
+
row: C,
|
|
1142
|
+
index: I?.findIndex(
|
|
1143
|
+
(e) => e.id === C.original.id
|
|
1159
1144
|
)
|
|
1160
1145
|
},
|
|
1161
|
-
|
|
1146
|
+
C.original.id
|
|
1162
1147
|
)
|
|
1163
1148
|
]
|
|
1164
1149
|
}
|
|
@@ -1174,34 +1159,34 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1174
1159
|
)
|
|
1175
1160
|
}
|
|
1176
1161
|
),
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
isVisible: !!
|
|
1180
|
-
onSelected:
|
|
1181
|
-
onClose:
|
|
1182
|
-
masterDataColumnName:
|
|
1183
|
-
masterDataFormula:
|
|
1184
|
-
masterDataFilters:
|
|
1185
|
-
masterDataName:
|
|
1186
|
-
masterDataId:
|
|
1162
|
+
ie && i?.renderPagination ? i.renderPagination(ie) : null,
|
|
1163
|
+
i?.renderMasterDataModal && i.renderMasterDataModal({
|
|
1164
|
+
isVisible: !!R,
|
|
1165
|
+
onSelected: Gl,
|
|
1166
|
+
onClose: ve,
|
|
1167
|
+
masterDataColumnName: R?.masterDataColumnName,
|
|
1168
|
+
masterDataFormula: R?.masterDataFormula,
|
|
1169
|
+
masterDataFilters: R?.masterDataFilters,
|
|
1170
|
+
masterDataName: R?.masterDataName,
|
|
1171
|
+
masterDataId: R?.masterDataName,
|
|
1187
1172
|
showFilters: !0
|
|
1188
1173
|
}),
|
|
1189
1174
|
/* @__PURE__ */ s(
|
|
1190
|
-
|
|
1175
|
+
Hr,
|
|
1191
1176
|
{
|
|
1192
|
-
config:
|
|
1193
|
-
onClose:
|
|
1177
|
+
config: ut,
|
|
1178
|
+
onClose: xt
|
|
1194
1179
|
}
|
|
1195
1180
|
),
|
|
1196
1181
|
/* @__PURE__ */ s(
|
|
1197
|
-
|
|
1182
|
+
zr,
|
|
1198
1183
|
{
|
|
1199
1184
|
pendingEditsCount: $,
|
|
1200
|
-
pendingEditsList:
|
|
1201
|
-
rowsWithPendingEdits:
|
|
1202
|
-
fieldOperationLoading:
|
|
1203
|
-
onClearAll:
|
|
1204
|
-
onSaveAll:
|
|
1185
|
+
pendingEditsList: ql,
|
|
1186
|
+
rowsWithPendingEdits: Jl,
|
|
1187
|
+
fieldOperationLoading: B,
|
|
1188
|
+
onClearAll: St,
|
|
1189
|
+
onSaveAll: bt,
|
|
1205
1190
|
onScrollToCell: H
|
|
1206
1191
|
}
|
|
1207
1192
|
)
|
|
@@ -1211,6 +1196,6 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1211
1196
|
}
|
|
1212
1197
|
);
|
|
1213
1198
|
export {
|
|
1214
|
-
|
|
1199
|
+
gn as InfiniteTable
|
|
1215
1200
|
};
|
|
1216
1201
|
//# sourceMappingURL=index.es.js.map
|