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