@lax-wp/design-system 0.13.66 → 0.13.68

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