@lax-wp/design-system 0.13.63 → 0.13.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data-display/infinite-table/body/cell/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 +108 -107
- package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.es.js +23 -23
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.es.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.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 +191 -190
- package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/types.d.ts +1 -0
- package/dist/components/data-display/label/Label.cjs.js +1 -1
- package/dist/components/data-display/label/Label.cjs.js.map +1 -1
- package/dist/components/data-display/label/Label.es.js +2 -2
- package/dist/components/data-display/label/Label.es.js.map +1 -1
- package/dist/components/data-display/tag/Tag.cjs.js +1 -1
- package/dist/components/data-display/tag/Tag.cjs.js.map +1 -1
- package/dist/components/data-display/tag/Tag.es.js +5 -5
- package/dist/components/data-display/tag/Tag.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 Nr } from "react/jsx-runtime";
|
|
2
|
-
import { useCheckbox as
|
|
3
|
-
import { useTableConfig as
|
|
4
|
-
import { canEditTableView as
|
|
2
|
+
import { useCheckbox as Er } from "../../../hooks/useCheckbox.es.js";
|
|
3
|
+
import { useTableConfig as Or } from "../../../providers/design-system-provider/hooks.es.js";
|
|
4
|
+
import { canEditTableView as Ar, mergeViewColumnsWithTableColumns as Vt } from "../../../utils/table.es.js";
|
|
5
5
|
import gt from "../../button/Button.es.js";
|
|
6
6
|
import { FloatingBar as _r } from "../../floating-bar/FloatingBar.es.js";
|
|
7
7
|
import { Typography as ye } from "../typography/Typography.es.js";
|
|
8
|
-
import { useSensors as
|
|
9
|
-
import Ir, { useState as p, useRef as
|
|
8
|
+
import { useSensors as kr, useSensor as It, MouseSensor as Rr, TouchSensor as Mr, DndContext as Lr, closestCorners as Vr, DragOverlay as gr } from "@dnd-kit/core";
|
|
9
|
+
import Ir, { useState as p, useRef as E, useCallback as u, useEffect as y, useMemo as z, forwardRef as jt } from "react";
|
|
10
10
|
import { AutoSizer as jr } from "react-virtualized-auto-sizer";
|
|
11
11
|
import { createPortal as Pr } from "react-dom";
|
|
12
12
|
import { useTable as Br, useResizeColumns as Wr } from "react-table";
|
|
@@ -17,7 +17,7 @@ import { TableContext as zr } from "./context.es.js";
|
|
|
17
17
|
import { CurrencyDropdownPortal as Ur } from "./CurrencyDropdownPortal.es.js";
|
|
18
18
|
import { Head as qr } from "./head/index.es.js";
|
|
19
19
|
import { PendingEditsFloatingBar as Jr } from "./PendingEditsFloatingBar.es.js";
|
|
20
|
-
import { DATA_ROW_ID_ATTR as Gr, DATA_COLUMN_KEY_ATTR as
|
|
20
|
+
import { DATA_ROW_ID_ATTR as Gr, DATA_COLUMN_KEY_ATTR as Cr, OS_VIEWPORT_SELECTOR as Xr, SCROLL_TO_CELL_COLUMN_WIDTH_FALLBACK as Yr, SCROLL_TO_CELL_LEFT_OFFSET as Zr, DEFAULT_PAGE_SIZE as Qr, DEFAULT_COLUMN_MAX_WIDTH as Kr, DEFAULT_COLUMN_WIDTH as en, DEFAULT_COLUMN_MIN_WIDTH as tn, DND_ACTIVATION_DISTANCE as Bt, ROW_ADDITIONAL_ACTIONS_DEFAULT_WIDTH as ln, ROW_OPTIONS_COLUMN_WIDTH as rn, TOOLBAR_FIRST_BREAKPOINT as Z, TOOLBAR_SECOND_BREAKPOINT as Je, DROP_ANIMATION_DURATION as nn, DROP_ANIMATION_EASING as sn } from "./constants.es.js";
|
|
21
21
|
import { getRowSlotHeight as on, useRowHeight as an } from "./useRowHeight.es.js";
|
|
22
22
|
import { NoDataFoundWidgets as cn } from "../empty-state/NoDataFoundWidgets.es.js";
|
|
23
23
|
import { NoDataFound as un } from "../empty-state/NoDataFound.es.js";
|
|
@@ -43,7 +43,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
43
43
|
columnSort: { field: "", order: "" },
|
|
44
44
|
onRemoveSort: () => null
|
|
45
45
|
},
|
|
46
|
-
headerConfig:
|
|
46
|
+
headerConfig: i = {
|
|
47
47
|
showExportButton: null,
|
|
48
48
|
showFilters: !0,
|
|
49
49
|
showSorts: !0,
|
|
@@ -57,7 +57,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
57
57
|
showDivider: !1
|
|
58
58
|
},
|
|
59
59
|
hoverConfig: Ht = null,
|
|
60
|
-
columns:
|
|
60
|
+
columns: O,
|
|
61
61
|
modelName: Q,
|
|
62
62
|
enableMasterDataEnumSuggestions: K = !1,
|
|
63
63
|
agreementCategoryId: ee,
|
|
@@ -71,27 +71,27 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
71
71
|
showHeader: De,
|
|
72
72
|
tableActions: Ge,
|
|
73
73
|
rowOptions: U,
|
|
74
|
-
hideRowOptionWidth:
|
|
74
|
+
hideRowOptionWidth: Ce,
|
|
75
75
|
checkboxUtilities: I,
|
|
76
76
|
isLoading: oe = !1,
|
|
77
77
|
onScroll: zt,
|
|
78
78
|
onScrolling: Ut,
|
|
79
79
|
isColumnConfigurable: ae,
|
|
80
80
|
onAddColumnClick: ie,
|
|
81
|
-
emptyMessage:
|
|
82
|
-
noDataWidget:
|
|
83
|
-
buttons:
|
|
81
|
+
emptyMessage: Xe,
|
|
82
|
+
noDataWidget: Ye,
|
|
83
|
+
buttons: Ze,
|
|
84
84
|
onEditColumnClick: Qe,
|
|
85
85
|
onDeleteColumnClick: Ke,
|
|
86
86
|
onRowTooltipClick: qt,
|
|
87
87
|
tooltiptext: Jt,
|
|
88
88
|
cascadingTableConfig: Gt,
|
|
89
|
-
originalsOnly:
|
|
90
|
-
disableOptionsForRowIndex:
|
|
89
|
+
originalsOnly: Ct,
|
|
90
|
+
disableOptionsForRowIndex: Xt,
|
|
91
91
|
tableHeightClass: ce = "h-[calc(100vh-220px)]",
|
|
92
|
-
getFullRowDataOnClick:
|
|
93
|
-
selectedRowId:
|
|
94
|
-
onRowEdit:
|
|
92
|
+
getFullRowDataOnClick: Yt,
|
|
93
|
+
selectedRowId: Zt = null,
|
|
94
|
+
onRowEdit: R,
|
|
95
95
|
onBulkRowEdit: j,
|
|
96
96
|
inlineEditColumns: Qt,
|
|
97
97
|
isResizable: Kt = !0,
|
|
@@ -104,7 +104,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
104
104
|
pageSize: ll = Qr,
|
|
105
105
|
onCascadingRowExpand: rl,
|
|
106
106
|
totalItems: tt,
|
|
107
|
-
showRecordCount:
|
|
107
|
+
showRecordCount: Ee = !1,
|
|
108
108
|
getInnerRowData: nl,
|
|
109
109
|
maxLevel: sl,
|
|
110
110
|
expandedRows: ol = {},
|
|
@@ -114,11 +114,11 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
114
114
|
dragConfig: cl,
|
|
115
115
|
isOverlayLoading: ul,
|
|
116
116
|
style: dl = {},
|
|
117
|
-
floatingBarConfig:
|
|
117
|
+
floatingBarConfig: Oe,
|
|
118
118
|
rowWrapper: hl,
|
|
119
119
|
rowLinkConfig: ml,
|
|
120
120
|
isCellClickDisabled: pl,
|
|
121
|
-
setHeaderOnParent:
|
|
121
|
+
setHeaderOnParent: Ae,
|
|
122
122
|
optimizeTable: vl = !1,
|
|
123
123
|
multiSelectConfig: fl,
|
|
124
124
|
headerContextOptions: wl,
|
|
@@ -127,53 +127,53 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
127
127
|
showDataTypeIcon: bl = !1,
|
|
128
128
|
rowAdditionalActions: he,
|
|
129
129
|
rowAdditionalActionsWidth: _e,
|
|
130
|
-
setVisibleHeaders:
|
|
130
|
+
setVisibleHeaders: ke,
|
|
131
131
|
cellEditing: xl = null,
|
|
132
132
|
cellEditingValue: Tl = null,
|
|
133
133
|
allowInlineEdit: yl = !1,
|
|
134
134
|
onFieldOperationFlow: Dl,
|
|
135
135
|
fieldOperationLoading: P = null,
|
|
136
|
-
onTableActionsReady:
|
|
136
|
+
onTableActionsReady: Re,
|
|
137
137
|
onPendingEditsChange: rt,
|
|
138
138
|
onCancelPendingEdits: B
|
|
139
139
|
}) => {
|
|
140
|
-
const a =
|
|
140
|
+
const a = Or(), Nl = on(an()), El = !!D?.search, nt = n?.columnFilters?.length > 0, q = El || nt, Ol = !!I, N = a?.getTableView?.(g) ?? null, [x, J] = p(N || null), M = !Ar(
|
|
141
141
|
x,
|
|
142
142
|
a?.getUserId?.()
|
|
143
|
-
), [Me, Le] = p(!1), [Ve, st] = p(!1), [
|
|
143
|
+
), [Me, Le] = p(!1), [Ve, st] = p(!1), [Al, ot] = p(null), [w, ge] = p(O), at = (m.length === 0 || !w.length) && !oe, [it, me] = p(
|
|
144
144
|
null
|
|
145
|
-
), [_l,
|
|
145
|
+
), [_l, kl] = p(!1), [Rl, Ml] = p(null), [Ll, Vl] = p(!1), [gl, pe] = p(
|
|
146
146
|
null
|
|
147
147
|
), [Il, ve] = p(null), [jl, ct] = p({}), [G, Ie] = p(
|
|
148
148
|
null
|
|
149
|
-
), [Pl, ut] = p(!1), [
|
|
149
|
+
), [Pl, ut] = p(!1), [A, Bl] = p(0), je = E(null), Pe = E(null), [dt, Wl] = p({
|
|
150
150
|
width: 0,
|
|
151
151
|
height: 0
|
|
152
|
-
}), [Hl, W] = p(null), [_, ht] = p(null), [$l, mt] = p(null), [pt, vt] = p(null), [Be,
|
|
152
|
+
}), [Hl, W] = p(null), [_, ht] = p(null), [$l, mt] = p(null), [pt, vt] = p(null), [Be, C] = p({}), We = E(!1), fe = E(!1), He = E(x);
|
|
153
153
|
He.current = x;
|
|
154
|
-
const ft =
|
|
154
|
+
const ft = E(a);
|
|
155
155
|
ft.current = a;
|
|
156
|
-
const wt = O
|
|
157
|
-
wt.current =
|
|
158
|
-
const we =
|
|
156
|
+
const wt = E(O);
|
|
157
|
+
wt.current = O;
|
|
158
|
+
const we = E(n);
|
|
159
159
|
we.current = n;
|
|
160
|
-
const Ft =
|
|
160
|
+
const Ft = E(null), St = E(
|
|
161
161
|
() => ({})
|
|
162
|
-
), bt =
|
|
162
|
+
), bt = E(() => ({})), [d, k] = p({}), $e = u(
|
|
163
163
|
(e, t, l) => {
|
|
164
|
-
|
|
164
|
+
k((r) => {
|
|
165
165
|
const o = r[e]?.[t];
|
|
166
|
-
let
|
|
167
|
-
if (
|
|
166
|
+
let c = l.validationError;
|
|
167
|
+
if (c === void 0) {
|
|
168
168
|
const F = w.find((v) => v.key === t);
|
|
169
169
|
if (F) {
|
|
170
170
|
const v = Pt(
|
|
171
171
|
l.value,
|
|
172
172
|
F
|
|
173
173
|
);
|
|
174
|
-
|
|
174
|
+
c = v.isValid ? null : v.error || "Invalid";
|
|
175
175
|
} else
|
|
176
|
-
|
|
176
|
+
c = o?.validationError ?? null;
|
|
177
177
|
}
|
|
178
178
|
return {
|
|
179
179
|
...r,
|
|
@@ -181,43 +181,43 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
181
181
|
...r[e] || {},
|
|
182
182
|
[t]: {
|
|
183
183
|
...l,
|
|
184
|
-
validationError:
|
|
184
|
+
validationError: c ?? null
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
});
|
|
189
189
|
},
|
|
190
190
|
[w]
|
|
191
|
-
), xt =
|
|
191
|
+
), xt = u(() => Object.values(d).some(
|
|
192
192
|
(e) => Object.keys(e).length > 0
|
|
193
193
|
), [d]);
|
|
194
194
|
y(() => {
|
|
195
|
-
|
|
195
|
+
Re && Re({
|
|
196
196
|
addPendingEdit: $e,
|
|
197
197
|
hasPendingEdits: xt
|
|
198
198
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const zl =
|
|
199
|
+
}, [Re, $e, xt]);
|
|
200
|
+
const zl = u(
|
|
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, ...c } = r[e];
|
|
206
|
+
Object.keys(c).length === 0 ? delete r[e] : r[e] = c;
|
|
207
207
|
}
|
|
208
208
|
return r;
|
|
209
209
|
});
|
|
210
210
|
},
|
|
211
211
|
[]
|
|
212
|
-
), Ul =
|
|
212
|
+
), Ul = u(
|
|
213
213
|
(e, t) => d[e]?.[t],
|
|
214
214
|
[d]
|
|
215
|
-
), ql =
|
|
215
|
+
), ql = u(
|
|
216
216
|
(e, t) => !!d[e]?.[t],
|
|
217
217
|
[d]
|
|
218
|
-
), Tt =
|
|
219
|
-
P || (B && Object.keys(d).length > 0 && B(d),
|
|
220
|
-
}, [P, B, d]), H =
|
|
218
|
+
), Tt = u(() => {
|
|
219
|
+
P || (B && Object.keys(d).length > 0 && B(d), k({}), C({}), W(null));
|
|
220
|
+
}, [P, B, d]), H = u(
|
|
221
221
|
(e, t, l) => {
|
|
222
222
|
setTimeout(() => {
|
|
223
223
|
a?.dispatchEvent?.("SCROLL_TO_TABLE_ROW", { rowIndex: l });
|
|
@@ -226,7 +226,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
226
226
|
);
|
|
227
227
|
setTimeout(() => {
|
|
228
228
|
const o = document.querySelector(
|
|
229
|
-
`[${Gr}="${e}"] [${
|
|
229
|
+
`[${Gr}="${e}"] [${Cr}="${t}"]`
|
|
230
230
|
);
|
|
231
231
|
if (o)
|
|
232
232
|
o.scrollIntoView({
|
|
@@ -235,17 +235,17 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
235
235
|
inline: "center"
|
|
236
236
|
});
|
|
237
237
|
else if (r > 0) {
|
|
238
|
-
const
|
|
239
|
-
if (
|
|
238
|
+
const c = document.querySelector(Xr);
|
|
239
|
+
if (c) {
|
|
240
240
|
let F = 0;
|
|
241
241
|
for (let v = 0; v < r; v++) {
|
|
242
242
|
const T = w[v];
|
|
243
|
-
T?.sticky || (F += T?.width ||
|
|
243
|
+
T?.sticky || (F += T?.width || Yr);
|
|
244
244
|
}
|
|
245
245
|
F = Math.max(
|
|
246
246
|
0,
|
|
247
|
-
F -
|
|
248
|
-
),
|
|
247
|
+
F - Zr
|
|
248
|
+
), c.scrollTo({
|
|
249
249
|
left: F,
|
|
250
250
|
behavior: "smooth"
|
|
251
251
|
});
|
|
@@ -256,20 +256,20 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
256
256
|
}, 100);
|
|
257
257
|
},
|
|
258
258
|
[w, a]
|
|
259
|
-
),
|
|
259
|
+
), X = u(
|
|
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[
|
|
263
|
+
return Object.entries(e).forEach(([c, F]) => {
|
|
264
|
+
r[c] = {}, Object.entries(F).forEach(([v, T]) => {
|
|
265
265
|
const V = w.find((S) => S.key === v), f = Pt(
|
|
266
266
|
T.value,
|
|
267
267
|
V
|
|
268
268
|
);
|
|
269
|
-
f.isValid ? r[
|
|
269
|
+
f.isValid ? r[c][v] = {
|
|
270
270
|
...T,
|
|
271
271
|
validationError: null
|
|
272
|
-
} : (t = !0, f.error && o.add(f.error), l || (l = { rowId:
|
|
272
|
+
} : (t = !0, f.error && o.add(f.error), l || (l = { rowId: c, columnKey: v }), r[c][v] = {
|
|
273
273
|
...T,
|
|
274
274
|
validationError: f.error
|
|
275
275
|
});
|
|
@@ -277,27 +277,27 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
277
277
|
}), { hasErrors: t, updatedEdits: r, firstError: l, errorTypes: o };
|
|
278
278
|
},
|
|
279
279
|
[w]
|
|
280
|
-
), Fe =
|
|
280
|
+
), Fe = u((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
|
-
}, []), yt =
|
|
284
|
-
const { hasErrors: e, updatedEdits: t, firstError: l, errorTypes: r } =
|
|
283
|
+
}, []), yt = u(() => {
|
|
284
|
+
const { hasErrors: e, updatedEdits: t, firstError: l, errorTypes: r } = X(d);
|
|
285
285
|
if (e) {
|
|
286
|
-
if (
|
|
286
|
+
if (k(t), a?.showNotification?.(
|
|
287
287
|
"error",
|
|
288
288
|
Fe(r)
|
|
289
289
|
), l) {
|
|
290
|
-
const
|
|
290
|
+
const c = m.findIndex(
|
|
291
291
|
(F) => F.id === l.rowId
|
|
292
292
|
);
|
|
293
|
-
H(l.rowId, l.columnKey,
|
|
293
|
+
H(l.rowId, l.columnKey, c);
|
|
294
294
|
}
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
297
|
const o = [];
|
|
298
|
-
Object.entries(d).forEach(([
|
|
298
|
+
Object.entries(d).forEach(([c, F]) => {
|
|
299
299
|
const v = m.find(
|
|
300
|
-
(T) => T.id ===
|
|
300
|
+
(T) => T.id === c
|
|
301
301
|
);
|
|
302
302
|
if (v) {
|
|
303
303
|
const T = { ...v }, V = {};
|
|
@@ -305,27 +305,27 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
305
305
|
T[f] = S.value, V[f] = { value: S.value, meta: S.meta };
|
|
306
306
|
}), o.push({ ...T, __editedFields: V });
|
|
307
307
|
}
|
|
308
|
-
}), o.length > 0 && (j ? j(o) :
|
|
308
|
+
}), o.length > 0 && (j ? j(o) : R && R(null, null, null, null, null, {
|
|
309
309
|
isBulk: !0,
|
|
310
310
|
rows: o
|
|
311
|
-
})),
|
|
311
|
+
})), k({}), C({}), W(null);
|
|
312
312
|
}, [
|
|
313
313
|
d,
|
|
314
314
|
m,
|
|
315
|
-
|
|
315
|
+
R,
|
|
316
316
|
j,
|
|
317
|
-
|
|
317
|
+
X,
|
|
318
318
|
Fe,
|
|
319
319
|
H,
|
|
320
320
|
a
|
|
321
|
-
]), Jl =
|
|
321
|
+
]), Jl = u(
|
|
322
322
|
(e) => {
|
|
323
323
|
if (P) return;
|
|
324
324
|
const t = d[e];
|
|
325
|
-
t && B && B({ [e]: t }),
|
|
325
|
+
t && B && B({ [e]: t }), k((l) => {
|
|
326
326
|
const r = { ...l };
|
|
327
327
|
return delete r[e], r;
|
|
328
|
-
}),
|
|
328
|
+
}), C((l) => {
|
|
329
329
|
const r = { ...l };
|
|
330
330
|
return Object.keys(r).forEach((o) => {
|
|
331
331
|
o.startsWith(`${e}-`) && delete r[o];
|
|
@@ -333,18 +333,18 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
333
333
|
}), W(null);
|
|
334
334
|
},
|
|
335
335
|
[P, B, d]
|
|
336
|
-
), Gl =
|
|
336
|
+
), Gl = u(
|
|
337
337
|
(e) => {
|
|
338
338
|
const t = d[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: c } = X({ [e]: t });
|
|
341
341
|
if (l) {
|
|
342
|
-
if (
|
|
342
|
+
if (k((f) => ({
|
|
343
343
|
...f,
|
|
344
344
|
[e]: r[e]
|
|
345
345
|
})), a?.showNotification?.(
|
|
346
346
|
"error",
|
|
347
|
-
Fe(
|
|
347
|
+
Fe(c)
|
|
348
348
|
), o) {
|
|
349
349
|
const f = m.findIndex(
|
|
350
350
|
(S) => S.id === o.rowId
|
|
@@ -362,13 +362,13 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
362
362
|
v[f] = S.value, T[f] = { value: S.value, meta: S.meta };
|
|
363
363
|
});
|
|
364
364
|
const V = { ...v, __editedFields: T };
|
|
365
|
-
j ? j([V]) :
|
|
365
|
+
j ? j([V]) : R && R(null, null, null, null, null, {
|
|
366
366
|
isBulk: !0,
|
|
367
367
|
rows: [V]
|
|
368
|
-
}),
|
|
368
|
+
}), k((f) => {
|
|
369
369
|
const S = { ...f };
|
|
370
370
|
return delete S[e], S;
|
|
371
|
-
}),
|
|
371
|
+
}), C((f) => {
|
|
372
372
|
const S = { ...f };
|
|
373
373
|
return Object.keys(S).forEach((Lt) => {
|
|
374
374
|
Lt.startsWith(`${e}-`) && delete S[Lt];
|
|
@@ -378,9 +378,9 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
378
378
|
[
|
|
379
379
|
d,
|
|
380
380
|
m,
|
|
381
|
-
|
|
381
|
+
R,
|
|
382
382
|
j,
|
|
383
|
-
|
|
383
|
+
X,
|
|
384
384
|
Fe,
|
|
385
385
|
H,
|
|
386
386
|
a
|
|
@@ -392,27 +392,27 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
392
392
|
y(() => {
|
|
393
393
|
rt?.($ > 0, $);
|
|
394
394
|
}, [$, rt]);
|
|
395
|
-
const
|
|
395
|
+
const Cl = z(() => {
|
|
396
396
|
const e = [];
|
|
397
397
|
return Object.entries(d).forEach(([t, l]) => {
|
|
398
398
|
const r = m.findIndex(
|
|
399
399
|
(o) => o.id === t
|
|
400
400
|
);
|
|
401
|
-
Object.entries(l).forEach(([o,
|
|
401
|
+
Object.entries(l).forEach(([o, c]) => {
|
|
402
402
|
const F = w.find((v) => v.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: c.value,
|
|
408
|
+
originalValue: c.originalValue,
|
|
409
|
+
meta: c.meta,
|
|
410
|
+
originalMeta: c.originalMeta,
|
|
411
411
|
rowIndex: r
|
|
412
412
|
});
|
|
413
413
|
});
|
|
414
414
|
}), e;
|
|
415
|
-
}, [d, w, m]),
|
|
415
|
+
}, [d, w, m]), Xl = z(() => {
|
|
416
416
|
const e = /* @__PURE__ */ new Map();
|
|
417
417
|
return Object.entries(d).forEach(([t, l]) => {
|
|
418
418
|
const r = m.findIndex(
|
|
@@ -426,32 +426,32 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
426
426
|
}), Array.from(e.values()).sort(
|
|
427
427
|
(t, l) => t.rowIndex - l.rowIndex
|
|
428
428
|
);
|
|
429
|
-
}, [d, m]),
|
|
429
|
+
}, [d, m]), Yl = u(
|
|
430
430
|
(e) => ht(e),
|
|
431
431
|
[]
|
|
432
|
-
), Se =
|
|
432
|
+
), Se = u(
|
|
433
433
|
() => ht(null),
|
|
434
434
|
[]
|
|
435
|
-
),
|
|
435
|
+
), Zl = u(
|
|
436
436
|
(e, t) => {
|
|
437
437
|
mt({ value: e, reference: t }), _?.onSelected && _.onSelected(e, t), Se();
|
|
438
438
|
},
|
|
439
439
|
[_, Se]
|
|
440
|
-
), Ql =
|
|
440
|
+
), Ql = u(
|
|
441
441
|
() => mt(null),
|
|
442
442
|
[]
|
|
443
|
-
), Kl =
|
|
443
|
+
), Kl = u(
|
|
444
444
|
(e) => vt(e),
|
|
445
445
|
[]
|
|
446
|
-
), Dt =
|
|
446
|
+
), Dt = u(
|
|
447
447
|
() => vt(null),
|
|
448
448
|
[]
|
|
449
|
-
), er =
|
|
449
|
+
), er = u(
|
|
450
450
|
(e, t) => {
|
|
451
|
-
|
|
451
|
+
C((l) => ({ ...l, [e]: t }));
|
|
452
452
|
},
|
|
453
453
|
[]
|
|
454
|
-
), tr =
|
|
454
|
+
), tr = u(
|
|
455
455
|
(e) => Be[e],
|
|
456
456
|
[Be]
|
|
457
457
|
), lr = z(() => {
|
|
@@ -465,15 +465,15 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
465
465
|
isFilters: q,
|
|
466
466
|
isColumnConfigurable: ae,
|
|
467
467
|
handleOnClick: ie,
|
|
468
|
-
emptyMessage:
|
|
469
|
-
buttons:
|
|
470
|
-
noDataWidget:
|
|
471
|
-
}, nr = a?.t?.(Wt) ?? Wt, be = q ? "No Results Found" :
|
|
468
|
+
emptyMessage: Xe,
|
|
469
|
+
buttons: Ze,
|
|
470
|
+
noDataWidget: Ye
|
|
471
|
+
}, nr = a?.t?.(Wt) ?? Wt, be = q ? "No Results Found" : Xe || "No Data Found", sr = typeof be == "string" ? a?.t?.(be) ?? be : be, Nt = { __isLoading: !0 }, or = new Array(1).fill(Nt), ar = new Array(ll).fill(Nt), Y = z(
|
|
472
472
|
() => w.filter((e) => !!e?.visible),
|
|
473
473
|
[w]
|
|
474
474
|
), ir = Br(
|
|
475
475
|
{
|
|
476
|
-
columns: vl ?
|
|
476
|
+
columns: vl ? Y : w,
|
|
477
477
|
data: [
|
|
478
478
|
...m,
|
|
479
479
|
...oe ? m?.length ? or : ar : []
|
|
@@ -485,7 +485,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
Wr
|
|
488
|
-
), { getTableProps:
|
|
488
|
+
), { getTableProps: Et, getTableBodyProps: Ot, headerGroups: xe, prepareRow: At, rows: L } = ir;
|
|
489
489
|
Ft.current = xe;
|
|
490
490
|
const cr = JSON.stringify(
|
|
491
491
|
xe[0]?.headers?.map(
|
|
@@ -493,14 +493,14 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
493
493
|
)
|
|
494
494
|
);
|
|
495
495
|
y(() => {
|
|
496
|
-
if (
|
|
496
|
+
if (ke) {
|
|
497
497
|
const e = Ft.current;
|
|
498
|
-
|
|
498
|
+
ke?.(
|
|
499
499
|
e?.[0]?.headers?.map((t) => t?.Header) ?? []
|
|
500
500
|
);
|
|
501
501
|
}
|
|
502
|
-
}, [cr,
|
|
503
|
-
const { checkboxConfig: _t } =
|
|
502
|
+
}, [cr, ke]);
|
|
503
|
+
const { checkboxConfig: _t } = Er({
|
|
504
504
|
rows: L,
|
|
505
505
|
checkedIds: I?.checkedIds,
|
|
506
506
|
isCheckAllDisabled: I?.isCheckAllDisabled,
|
|
@@ -509,8 +509,8 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
509
509
|
onAllChecked: Vl,
|
|
510
510
|
setCheckedIds: I?.setCheckedIds,
|
|
511
511
|
checkboxMetadata: I?.checkboxMetadata
|
|
512
|
-
}), ur =
|
|
513
|
-
It(
|
|
512
|
+
}), ur = kr(
|
|
513
|
+
It(Rr, {
|
|
514
514
|
activationConstraint: { distance: Bt }
|
|
515
515
|
}),
|
|
516
516
|
It(Mr, {
|
|
@@ -556,12 +556,12 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
556
556
|
}, vr = () => Ie(null), fr = (e) => {
|
|
557
557
|
!h?.onSort && !n?.onFilter || me(it === e ? null : e);
|
|
558
558
|
}, wr = (e) => {
|
|
559
|
-
Ml(e),
|
|
560
|
-
}, ze =
|
|
559
|
+
Ml(e), kl(!_l), me(null);
|
|
560
|
+
}, ze = u(() => {
|
|
561
561
|
h?.onRemoveSort ? h.onRemoveSort() : h?.onSort && h.onSort("", "");
|
|
562
|
-
}, [h]), Te =
|
|
562
|
+
}, [h]), Te = u((e = null) => {
|
|
563
563
|
ot(e), Le((t) => e ? !0 : !t);
|
|
564
|
-
}, []), Ue =
|
|
564
|
+
}, []), Ue = u(
|
|
565
565
|
() => st((e) => !e),
|
|
566
566
|
[]
|
|
567
567
|
), Fr = () => {
|
|
@@ -569,21 +569,21 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
569
569
|
for (let t = 0; t < e.length; t++)
|
|
570
570
|
if (e[t].sticky) return t - 1;
|
|
571
571
|
return e.length - 1;
|
|
572
|
-
}, Sr =
|
|
572
|
+
}, Sr = u(
|
|
573
573
|
(e) => {
|
|
574
574
|
let t = 0;
|
|
575
|
-
for (let l = e + 1; l <
|
|
576
|
-
|
|
577
|
-
return he && (t += _e || ln), U && (t +=
|
|
575
|
+
for (let l = e + 1; l < Y.length; l++)
|
|
576
|
+
Y[l].visible !== !1 && (t += Y[l].width ?? 0);
|
|
577
|
+
return he && (t += _e || ln), U && (t += Ce ? 0 : rn), t;
|
|
578
578
|
},
|
|
579
579
|
[
|
|
580
|
-
|
|
580
|
+
Y,
|
|
581
581
|
_e,
|
|
582
|
-
|
|
582
|
+
Ce,
|
|
583
583
|
he,
|
|
584
584
|
U
|
|
585
585
|
]
|
|
586
|
-
),
|
|
586
|
+
), kt = () => {
|
|
587
587
|
const e = a?.getUserId?.();
|
|
588
588
|
return {
|
|
589
589
|
...x || {},
|
|
@@ -592,7 +592,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
592
592
|
filters: x?.filters || n?.columnFilters,
|
|
593
593
|
id: x?.id || "untitled-view",
|
|
594
594
|
table_key: x?.table_key || g,
|
|
595
|
-
columns: x?.columns ||
|
|
595
|
+
columns: x?.columns || O?.map((t, l) => ({
|
|
596
596
|
name: t.Header,
|
|
597
597
|
width: t.width,
|
|
598
598
|
visible: t.visible,
|
|
@@ -604,10 +604,10 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
604
604
|
}))
|
|
605
605
|
};
|
|
606
606
|
};
|
|
607
|
-
St.current =
|
|
607
|
+
St.current = kt;
|
|
608
608
|
const br = (e, t) => {
|
|
609
609
|
if (M) return;
|
|
610
|
-
const l =
|
|
610
|
+
const l = kt();
|
|
611
611
|
J({
|
|
612
612
|
...l,
|
|
613
613
|
columns: l?.columns?.map(
|
|
@@ -634,12 +634,12 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
634
634
|
fe.current = !1;
|
|
635
635
|
}
|
|
636
636
|
}, [n?.columnFilters, M]);
|
|
637
|
-
const xr =
|
|
637
|
+
const xr = u(
|
|
638
638
|
(e) => {
|
|
639
639
|
fe.current = !0, n?.onRemoveFilter?.(e);
|
|
640
640
|
},
|
|
641
641
|
[n?.onRemoveFilter]
|
|
642
|
-
), Tr =
|
|
642
|
+
), Tr = u(() => {
|
|
643
643
|
fe.current = !0, n?.onClearFilter?.();
|
|
644
644
|
}, [n?.onClearFilter]);
|
|
645
645
|
y(() => {
|
|
@@ -648,10 +648,10 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
648
648
|
ge(
|
|
649
649
|
Vt(
|
|
650
650
|
He.current?.columns || [],
|
|
651
|
-
|
|
651
|
+
O
|
|
652
652
|
)
|
|
653
653
|
);
|
|
654
|
-
}, [
|
|
654
|
+
}, [O]), y(() => {
|
|
655
655
|
x?.unsaved && ft.current?.persistTableView?.(x);
|
|
656
656
|
}, [x]), y(() => {
|
|
657
657
|
ct(
|
|
@@ -681,12 +681,12 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
681
681
|
});
|
|
682
682
|
return e.observe(Pe.current), () => e.disconnect();
|
|
683
683
|
}, []);
|
|
684
|
-
const
|
|
684
|
+
const Rt = /* @__PURE__ */ s(
|
|
685
685
|
qr,
|
|
686
686
|
{
|
|
687
687
|
isResizable: Kt,
|
|
688
688
|
headerGroups: xe,
|
|
689
|
-
isCheckbox:
|
|
689
|
+
isCheckbox: Ol,
|
|
690
690
|
checkboxConfig: _t,
|
|
691
691
|
isAllChecked: Ll,
|
|
692
692
|
showHeaderOptions: it ?? "",
|
|
@@ -714,12 +714,12 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
714
714
|
/* @__PURE__ */ s(
|
|
715
715
|
"div",
|
|
716
716
|
{
|
|
717
|
-
...
|
|
717
|
+
...Et(),
|
|
718
718
|
className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 h-full bg-white dark:bg-black-800",
|
|
719
719
|
children: at ? /* @__PURE__ */ b("div", { className: "z-10", children: [
|
|
720
|
-
|
|
720
|
+
Rt,
|
|
721
721
|
/* @__PURE__ */ s("div", { className: "absolute w-full", children: a?.renderEmpty ? a.renderEmpty(rr) : /* @__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: [
|
|
722
|
-
|
|
722
|
+
Ye && !q ? /* @__PURE__ */ s(cn, { widgetType: "TABLE" }) : /* @__PURE__ */ s(un, { text: sr }),
|
|
723
723
|
ae && !q ? /* @__PURE__ */ s("div", { className: "my-4", children: /* @__PURE__ */ b(
|
|
724
724
|
gt,
|
|
725
725
|
{
|
|
@@ -734,7 +734,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
734
734
|
]
|
|
735
735
|
}
|
|
736
736
|
) }) : null,
|
|
737
|
-
!q &&
|
|
737
|
+
!q && Ze?.map((e, t) => /* @__PURE__ */ s(
|
|
738
738
|
gt,
|
|
739
739
|
{
|
|
740
740
|
status: "secondary",
|
|
@@ -754,13 +754,13 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
754
754
|
return l > 0 && r > 0 ? /* @__PURE__ */ s(
|
|
755
755
|
Hr,
|
|
756
756
|
{
|
|
757
|
-
getTableBodyProps:
|
|
757
|
+
getTableBodyProps: Ot,
|
|
758
758
|
rows: L,
|
|
759
|
-
prepareRow:
|
|
759
|
+
prepareRow: At,
|
|
760
760
|
isLoading: oe,
|
|
761
761
|
onScroll: zt,
|
|
762
762
|
onScrolling: Ut,
|
|
763
|
-
columns:
|
|
763
|
+
columns: O,
|
|
764
764
|
width: l,
|
|
765
765
|
height: r,
|
|
766
766
|
withSortable: Ne,
|
|
@@ -773,7 +773,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
773
773
|
}
|
|
774
774
|
)
|
|
775
775
|
] }), yr = jt((e, t) => /* @__PURE__ */ b("div", { className: "h-full w-full", ...e, ref: t, children: [
|
|
776
|
-
|
|
776
|
+
Rt,
|
|
777
777
|
/* @__PURE__ */ s("div", { className: "relative w-full h-full", children: e?.children })
|
|
778
778
|
] })), Dr = 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 }) })), qe = z(() => a?.renderTableHeader ? a.renderTableHeader({
|
|
779
779
|
tableKey: g,
|
|
@@ -782,11 +782,11 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
782
782
|
toggleShowFilters: Te,
|
|
783
783
|
toggleShowSorts: Ue,
|
|
784
784
|
filterCounts: n?.columnFilters?.length,
|
|
785
|
-
columns:
|
|
785
|
+
columns: O,
|
|
786
786
|
columnFilters: n?.columnFilters,
|
|
787
787
|
setSelectedTableView: J,
|
|
788
788
|
selectedTableView: x,
|
|
789
|
-
enableTableView:
|
|
789
|
+
enableTableView: i?.showTableView,
|
|
790
790
|
modelName: Q,
|
|
791
791
|
enableMasterDataEnumSuggestions: K,
|
|
792
792
|
onRemoveFilter: n?.onRemoveFilter,
|
|
@@ -794,21 +794,22 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
794
794
|
onFilter: n?.onFilter,
|
|
795
795
|
data: se ?? m,
|
|
796
796
|
tableHeaders: w,
|
|
797
|
-
showTableViewAsModal:
|
|
798
|
-
additionalOptions:
|
|
799
|
-
inlineActions:
|
|
800
|
-
showFilters:
|
|
801
|
-
showSorts:
|
|
802
|
-
showSearch:
|
|
803
|
-
isLoading: !!
|
|
797
|
+
showTableViewAsModal: i?.showTableViewAsModal,
|
|
798
|
+
additionalOptions: i?.additionalOptions,
|
|
799
|
+
inlineActions: i?.inlineActions,
|
|
800
|
+
showFilters: i?.showFilters,
|
|
801
|
+
showSorts: i?.showSorts,
|
|
802
|
+
showSearch: i?.showSearch,
|
|
803
|
+
isLoading: !!i?.isLoading,
|
|
804
804
|
setTableHeaders: ge,
|
|
805
805
|
allowAStarSearch: !!D?.allowAStarSearch,
|
|
806
|
-
withContent: !!
|
|
806
|
+
withContent: !!i?.content,
|
|
807
807
|
setShowFilters: Le,
|
|
808
808
|
sort: h?.columnSort,
|
|
809
809
|
onSort: h?.onSort,
|
|
810
810
|
onRemoveSort: ze,
|
|
811
|
-
showExportButton:
|
|
811
|
+
showExportButton: i?.showExportButton,
|
|
812
|
+
onExportClick: i?.onExportClick,
|
|
812
813
|
agreementCategoryId: ee,
|
|
813
814
|
agreementDomainId: te,
|
|
814
815
|
agreementId: le,
|
|
@@ -821,10 +822,10 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
821
822
|
Te,
|
|
822
823
|
Ue,
|
|
823
824
|
n?.columnFilters,
|
|
824
|
-
|
|
825
|
+
O,
|
|
825
826
|
J,
|
|
826
827
|
x,
|
|
827
|
-
|
|
828
|
+
i,
|
|
828
829
|
Q,
|
|
829
830
|
n?.onRemoveFilter,
|
|
830
831
|
n?.onClearFilter,
|
|
@@ -845,8 +846,8 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
845
846
|
ne
|
|
846
847
|
]);
|
|
847
848
|
return y(() => {
|
|
848
|
-
|
|
849
|
-
}, [qe,
|
|
849
|
+
Ae && Ae(qe);
|
|
850
|
+
}, [qe, Ae]), /* @__PURE__ */ b(
|
|
850
851
|
zr.Provider,
|
|
851
852
|
{
|
|
852
853
|
value: {
|
|
@@ -874,12 +875,12 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
874
875
|
cascadingTableConfig: Gt,
|
|
875
876
|
activeInlineEdit: Hl,
|
|
876
877
|
setActiveInlineEdit: W,
|
|
877
|
-
originalsOnly:
|
|
878
|
-
disableOptionsForRowIndex:
|
|
879
|
-
getFullRowDataOnClick:
|
|
880
|
-
selectedRowId:
|
|
878
|
+
originalsOnly: Ct,
|
|
879
|
+
disableOptionsForRowIndex: Xt,
|
|
880
|
+
getFullRowDataOnClick: Yt,
|
|
881
|
+
selectedRowId: Zt,
|
|
881
882
|
getSumOfNextVisibleColumnWidth: Sr,
|
|
882
|
-
onRowEdit:
|
|
883
|
+
onRowEdit: R,
|
|
883
884
|
inlineEditColumns: Qt,
|
|
884
885
|
tableActions: Ge,
|
|
885
886
|
dndSortableUtils: de,
|
|
@@ -904,14 +905,14 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
904
905
|
headerContextOptions: wl,
|
|
905
906
|
showHeaderContextOptions: Fl,
|
|
906
907
|
setShowHeaderContextOptions: Sl,
|
|
907
|
-
headerDivWidth:
|
|
908
|
+
headerDivWidth: A,
|
|
908
909
|
showDataTypeIcon: bl,
|
|
909
910
|
rowAdditionalActions: he,
|
|
910
911
|
hoverConfig: Ht,
|
|
911
912
|
rowAdditionalActionsWidth: _e,
|
|
912
913
|
cellEditing: xl,
|
|
913
914
|
cellEditingValue: Tl,
|
|
914
|
-
openMasterDataModal:
|
|
915
|
+
openMasterDataModal: Yl,
|
|
915
916
|
closeMasterDataModal: Se,
|
|
916
917
|
selectedMasterData: $l,
|
|
917
918
|
clearSelectedMasterData: Ql,
|
|
@@ -935,28 +936,28 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
935
936
|
scrollToCell: H,
|
|
936
937
|
onFieldOperationFlow: Dl,
|
|
937
938
|
fieldOperationLoading: P,
|
|
938
|
-
validateAllPendingEdits:
|
|
939
|
+
validateAllPendingEdits: X
|
|
939
940
|
},
|
|
940
941
|
children: [
|
|
941
942
|
De ? /* @__PURE__ */ b(
|
|
942
943
|
"div",
|
|
943
944
|
{
|
|
944
945
|
ref: je,
|
|
945
|
-
className: `mb-2 flex w-full min-w-0 gap-2 dark:bg-black-800 ${
|
|
946
|
+
className: `mb-2 flex w-full min-w-0 gap-2 dark:bg-black-800 ${A < Z ? "flex-col items-stretch" : "flex-row items-center"}`,
|
|
946
947
|
children: [
|
|
947
948
|
/* @__PURE__ */ b(
|
|
948
949
|
"div",
|
|
949
950
|
{
|
|
950
|
-
className: `flex items-center gap-x-2 gap-y-1 ${
|
|
951
|
+
className: `flex items-center gap-x-2 gap-y-1 ${A < Z ? "w-full flex-wrap" : ""} ${i?.content ? "min-w-0 flex-1" : "shrink-0"}`,
|
|
951
952
|
children: [
|
|
952
|
-
|
|
953
|
+
i?.content ? /* @__PURE__ */ s(
|
|
953
954
|
"div",
|
|
954
955
|
{
|
|
955
|
-
className: `min-w-0 ${
|
|
956
|
-
children:
|
|
956
|
+
className: `min-w-0 ${A < Z ? "w-full" : "flex-1"}`,
|
|
957
|
+
children: i.content
|
|
957
958
|
}
|
|
958
959
|
) : null,
|
|
959
|
-
|
|
960
|
+
Ee ? /* @__PURE__ */ b("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
960
961
|
/* @__PURE__ */ b(
|
|
961
962
|
"svg",
|
|
962
963
|
{
|
|
@@ -997,28 +998,28 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
997
998
|
children: "total records"
|
|
998
999
|
}
|
|
999
1000
|
)
|
|
1000
|
-
] }) :
|
|
1001
|
+
] }) : i?.preContent ? /* @__PURE__ */ s("div", { className: "flex min-w-0 shrink-0 justify-start items-center", children: i.preContent }) : null
|
|
1001
1002
|
]
|
|
1002
1003
|
}
|
|
1003
1004
|
),
|
|
1004
1005
|
/* @__PURE__ */ b(
|
|
1005
1006
|
"div",
|
|
1006
1007
|
{
|
|
1007
|
-
className: `flex min-w-0 items-center justify-end ${
|
|
1008
|
+
className: `flex min-w-0 items-center justify-end ${A < Z ? "w-full" : i?.content ? "shrink-0" : "flex-1"} ${A < Je ? "flex-col" : "flex-row"} ${i?.postContent ? "gap-2" : ""}`,
|
|
1008
1009
|
children: [
|
|
1009
|
-
|
|
1010
|
+
Ee && i?.preContent ? /* @__PURE__ */ s("div", { className: "flex w-full justify-start items-center", children: i.preContent }) : null,
|
|
1010
1011
|
/* @__PURE__ */ s(
|
|
1011
1012
|
"div",
|
|
1012
1013
|
{
|
|
1013
|
-
className: `flex justify-end items-center min-w-0 ${
|
|
1014
|
+
className: `flex justify-end items-center min-w-0 ${A < Je || A < Z ? "w-full" : ""}`,
|
|
1014
1015
|
children: qe
|
|
1015
1016
|
}
|
|
1016
1017
|
),
|
|
1017
|
-
|
|
1018
|
+
i?.postContent ? /* @__PURE__ */ s(
|
|
1018
1019
|
"div",
|
|
1019
1020
|
{
|
|
1020
|
-
className: `flex justify-end items-center ${
|
|
1021
|
-
children:
|
|
1021
|
+
className: `flex justify-end items-center ${A < Je ? "w-full" : ""}`,
|
|
1022
|
+
children: i.postContent
|
|
1022
1023
|
}
|
|
1023
1024
|
) : null
|
|
1024
1025
|
]
|
|
@@ -1027,7 +1028,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1027
1028
|
]
|
|
1028
1029
|
}
|
|
1029
1030
|
) : null,
|
|
1030
|
-
|
|
1031
|
+
i?.showDivider ? /* @__PURE__ */ s("div", { className: "border-b pb-2 w-full dark:bg-black-800" }) : null,
|
|
1031
1032
|
Me || Ve ? /* @__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: [
|
|
1032
1033
|
Ve && a?.renderSortItem ? a.renderSortItem({
|
|
1033
1034
|
sort: h?.columnSort,
|
|
@@ -1065,9 +1066,9 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1065
1066
|
onClose: wr,
|
|
1066
1067
|
modelName: Q,
|
|
1067
1068
|
enableMasterDataEnumSuggestions: K,
|
|
1068
|
-
defaultFilterColumn:
|
|
1069
|
+
defaultFilterColumn: Al,
|
|
1069
1070
|
resetDefaultFilterColumn: () => ot(null),
|
|
1070
|
-
column:
|
|
1071
|
+
column: Rl,
|
|
1071
1072
|
onFilter: n?.onFilter,
|
|
1072
1073
|
tableHeaders: w,
|
|
1073
1074
|
columnFilters: n?.columnFilters,
|
|
@@ -1083,8 +1084,8 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1083
1084
|
})
|
|
1084
1085
|
] }) : null
|
|
1085
1086
|
] }) }) : null,
|
|
1086
|
-
|
|
1087
|
-
!De &&
|
|
1087
|
+
Oe && Object.keys(Oe).length ? /* @__PURE__ */ s(_r, { ...Oe }) : null,
|
|
1088
|
+
!De && Ee ? /* @__PURE__ */ b("div", { className: "flex items-center gap-1.5 mb-2", children: [
|
|
1088
1089
|
/* @__PURE__ */ b(
|
|
1089
1090
|
"svg",
|
|
1090
1091
|
{
|
|
@@ -1109,7 +1110,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1109
1110
|
),
|
|
1110
1111
|
/* @__PURE__ */ s(ye, { size: "small", variant: "semibold", appearance: "title", children: (tt ?? m.length).toLocaleString() }),
|
|
1111
1112
|
/* @__PURE__ */ s(ye, { size: "small", variant: "regular", appearance: "subtitle", children: "total records" })
|
|
1112
|
-
] }) : !De &&
|
|
1113
|
+
] }) : !De && i?.preContent ? /* @__PURE__ */ s("div", { className: "flex items-center mb-2", children: i.preContent }) : null,
|
|
1113
1114
|
/* @__PURE__ */ s(
|
|
1114
1115
|
"div",
|
|
1115
1116
|
{
|
|
@@ -1140,15 +1141,15 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1140
1141
|
children: /* @__PURE__ */ s(
|
|
1141
1142
|
"table",
|
|
1142
1143
|
{
|
|
1143
|
-
...
|
|
1144
|
+
...Et(),
|
|
1144
1145
|
className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 bg-white dark:bg-black-700 table-auto border-collapse",
|
|
1145
1146
|
children: /* @__PURE__ */ b(
|
|
1146
1147
|
"tbody",
|
|
1147
1148
|
{
|
|
1148
|
-
...
|
|
1149
|
+
...Ot(),
|
|
1149
1150
|
className: "bg-transparent divide-y divide-neutral-200",
|
|
1150
1151
|
children: [
|
|
1151
|
-
void
|
|
1152
|
+
void At(G),
|
|
1152
1153
|
/* @__PURE__ */ s(
|
|
1153
1154
|
$r,
|
|
1154
1155
|
{
|
|
@@ -1176,7 +1177,7 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1176
1177
|
ue && a?.renderPagination ? a.renderPagination(ue) : null,
|
|
1177
1178
|
a?.renderMasterDataModal && a.renderMasterDataModal({
|
|
1178
1179
|
isVisible: !!_,
|
|
1179
|
-
onSelected:
|
|
1180
|
+
onSelected: Zl,
|
|
1180
1181
|
onClose: Se,
|
|
1181
1182
|
masterDataColumnName: _?.masterDataColumnName,
|
|
1182
1183
|
masterDataFormula: _?.masterDataFormula,
|
|
@@ -1196,8 +1197,8 @@ const hn = jr, Wt = "Create Column", mn = (g, D) => `button-admin-${g.toLowerCas
|
|
|
1196
1197
|
Jr,
|
|
1197
1198
|
{
|
|
1198
1199
|
pendingEditsCount: $,
|
|
1199
|
-
pendingEditsList:
|
|
1200
|
-
rowsWithPendingEdits:
|
|
1200
|
+
pendingEditsList: Cl,
|
|
1201
|
+
rowsWithPendingEdits: Xl,
|
|
1201
1202
|
fieldOperationLoading: P,
|
|
1202
1203
|
onClearAll: Tt,
|
|
1203
1204
|
onSaveAll: yt,
|