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