@lax-wp/design-system 0.14.37 → 0.14.39

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.
Files changed (25) hide show
  1. package/dist/components/data-display/infinite-table/CellContextMenuPortal.cjs.js +1 -1
  2. package/dist/components/data-display/infinite-table/CellContextMenuPortal.cjs.js.map +1 -1
  3. package/dist/components/data-display/infinite-table/CellContextMenuPortal.d.ts +3 -1
  4. package/dist/components/data-display/infinite-table/CellContextMenuPortal.es.js +129 -107
  5. package/dist/components/data-display/infinite-table/CellContextMenuPortal.es.js.map +1 -1
  6. package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js +1 -1
  7. package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js.map +1 -1
  8. package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js +32 -33
  9. package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js.map +1 -1
  10. package/dist/components/data-display/infinite-table/copy-text.cjs.js +1 -2
  11. package/dist/components/data-display/infinite-table/copy-text.cjs.js.map +1 -1
  12. package/dist/components/data-display/infinite-table/copy-text.d.ts +5 -5
  13. package/dist/components/data-display/infinite-table/copy-text.es.js +52 -15
  14. package/dist/components/data-display/infinite-table/copy-text.es.js.map +1 -1
  15. package/dist/components/data-display/infinite-table/index.cjs.js +1 -1
  16. package/dist/components/data-display/infinite-table/index.cjs.js.map +1 -1
  17. package/dist/components/data-display/infinite-table/index.es.js +171 -170
  18. package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
  19. package/dist/components/data-display/infinite-table/types.d.ts +10 -8
  20. package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js +1 -1
  21. package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js.map +1 -1
  22. package/dist/components/forms/master-data-input/MasterDataInputField.es.js +2 -2
  23. package/dist/components/forms/master-data-input/MasterDataInputField.es.js.map +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/package.json +1 -1
@@ -1,31 +1,31 @@
1
1
  import { jsx as s, jsxs as b, Fragment as Er } from "react/jsx-runtime";
2
2
  import { useCheckbox as Rr } from "../../../hooks/useCheckbox.es.js";
3
3
  import { useTableConfig as kr } from "../../../providers/design-system-provider/hooks.es.js";
4
- import { canEditTableView as _r, mergeViewColumnsWithTableColumns as Lt } from "../../../utils/table.es.js";
4
+ import { canEditTableView as _r, mergeViewColumnsWithTableColumns as Vt } from "../../../utils/table.es.js";
5
5
  import gt from "../../button/Button.es.js";
6
6
  import { FloatingBar as Mr } from "../../floating-bar/FloatingBar.es.js";
7
7
  import { Typography as be } from "../typography/Typography.es.js";
8
- import { useSensors as Ir, useSensor as Vt, MouseSensor as Lr, TouchSensor as gr, DndContext as Vr, closestCorners as jr, DragOverlay as Br } from "@dnd-kit/core";
9
- import Pr, { useState as m, useRef as O, useCallback as i, useEffect as T, useMemo as C, forwardRef as jt } from "react";
8
+ import { useSensors as Ir, useSensor as jt, MouseSensor as Lr, TouchSensor as Vr, DndContext as gr, closestCorners as jr, DragOverlay as Br } from "@dnd-kit/core";
9
+ import Pr, { useState as m, useRef as O, useCallback as i, useEffect as T, useMemo as C, forwardRef as Bt } from "react";
10
10
  import { AutoSizer as Wr } from "react-virtualized-auto-sizer";
11
11
  import { createPortal as Hr } from "react-dom";
12
12
  import { useTable as $r, useResizeColumns as zr } from "react-table";
13
13
  import { Body as Cr } from "./body/index.es.js";
14
- import { validateCellValue as Bt } from "./validateCell.es.js";
14
+ import { validateCellValue as Pt } from "./validateCell.es.js";
15
15
  import { Row as Ur } from "./body/rows/row.es.js";
16
16
  import { TableContext as qr } from "./context.es.js";
17
17
  import { CellContextMenuPortal as Jr } from "./CellContextMenuPortal.es.js";
18
18
  import { CurrencyDropdownPortal as Gr } from "./CurrencyDropdownPortal.es.js";
19
19
  import { Head as Xr } from "./head/index.es.js";
20
20
  import { PendingEditsFloatingBar as Yr } from "./PendingEditsFloatingBar.es.js";
21
- import { DATA_ROW_ID_ATTR as Zr, DATA_COLUMN_KEY_ATTR as Qr, OS_VIEWPORT_SELECTOR as Kr, SCROLL_TO_CELL_COLUMN_WIDTH_FALLBACK as en, SCROLL_TO_CELL_LEFT_OFFSET as tn, DEFAULT_PAGE_SIZE as ln, DEFAULT_COLUMN_MAX_WIDTH as rn, DEFAULT_COLUMN_WIDTH as nn, DEFAULT_COLUMN_MIN_WIDTH as sn, DND_ACTIVATION_DISTANCE as Pt, ROW_ADDITIONAL_ACTIONS_DEFAULT_WIDTH as on, ROW_OPTIONS_COLUMN_WIDTH as an, TOOLBAR_FIRST_BREAKPOINT as Z, TOOLBAR_SECOND_BREAKPOINT as Ce, DROP_ANIMATION_DURATION as cn, DROP_ANIMATION_EASING as dn } from "./constants.es.js";
21
+ import { DATA_ROW_ID_ATTR as Zr, DATA_COLUMN_KEY_ATTR as Qr, OS_VIEWPORT_SELECTOR as Kr, SCROLL_TO_CELL_COLUMN_WIDTH_FALLBACK as en, SCROLL_TO_CELL_LEFT_OFFSET as tn, DEFAULT_PAGE_SIZE as ln, DEFAULT_COLUMN_MAX_WIDTH as rn, DEFAULT_COLUMN_WIDTH as nn, DEFAULT_COLUMN_MIN_WIDTH as sn, DND_ACTIVATION_DISTANCE as Wt, ROW_ADDITIONAL_ACTIONS_DEFAULT_WIDTH as on, ROW_OPTIONS_COLUMN_WIDTH as an, TOOLBAR_FIRST_BREAKPOINT as Z, TOOLBAR_SECOND_BREAKPOINT as Ce, DROP_ANIMATION_DURATION as cn, DROP_ANIMATION_EASING as dn } from "./constants.es.js";
22
22
  import { getRowSlotHeight as un, useRowHeight as hn } from "./useRowHeight.es.js";
23
23
  import { NoDataFoundWidgets as mn } from "../empty-state/NoDataFoundWidgets.es.js";
24
24
  import { NoDataFound as pn } from "../empty-state/NoDataFound.es.js";
25
25
  import { Add2Icon as fn } from "../../icon/icons.generated.es.js";
26
- const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, "") || D}`, zn = Pr.memo(
26
+ const vn = Wr, Ht = "Create Column", wn = (V, D) => `button-admin-${V.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, "") || D}`, zn = Pr.memo(
27
27
  ({
28
- tableKey: g,
28
+ tableKey: V,
29
29
  searchConfig: D = {
30
30
  search: "",
31
31
  handleSearch: () => null,
@@ -57,7 +57,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
57
57
  isLoading: !1,
58
58
  showDivider: !1
59
59
  },
60
- hoverConfig: Ht = null,
60
+ hoverConfig: $t = null,
61
61
  columns: A,
62
62
  modelName: Q,
63
63
  enableMasterDataEnumSuggestions: K = !1,
@@ -65,16 +65,16 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
65
65
  enumSuggestionsExtraParams: te,
66
66
  enumSuggestionsData: le,
67
67
  data: u = [],
68
- onRowClick: $t,
68
+ onRowClick: zt,
69
69
  showHeader: xe,
70
- showSubHeader: zt = !0,
70
+ showSubHeader: Ct = !0,
71
71
  tableActions: Ue,
72
- rowOptions: V,
72
+ rowOptions: g,
73
73
  hideRowOptionWidth: qe,
74
74
  checkboxUtilities: j,
75
75
  isLoading: re = !1,
76
- onScroll: Ct,
77
- onScrolling: Ut,
76
+ onScroll: Ut,
77
+ onScrolling: qt,
78
78
  isColumnConfigurable: ne,
79
79
  onAddColumnClick: se,
80
80
  emptyMessage: Je,
@@ -82,45 +82,45 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
82
82
  buttons: Xe,
83
83
  onEditColumnClick: Ye,
84
84
  onDeleteColumnClick: Ze,
85
- onRowTooltipClick: qt,
86
- tooltiptext: Jt,
87
- cascadingTableConfig: Gt,
88
- originalsOnly: Xt,
89
- disableOptionsForRowIndex: Yt,
85
+ onRowTooltipClick: Jt,
86
+ tooltiptext: Gt,
87
+ cascadingTableConfig: Xt,
88
+ originalsOnly: Yt,
89
+ disableOptionsForRowIndex: Zt,
90
90
  tableHeightClass: oe = "h-[calc(100vh-220px)]",
91
- getFullRowDataOnClick: Zt,
92
- selectedRowId: Qt = null,
91
+ getFullRowDataOnClick: Qt,
92
+ selectedRowId: Kt = null,
93
93
  onRowEdit: _,
94
94
  onBulkRowEdit: B,
95
- inlineEditColumns: Kt,
96
- isResizable: el = !0,
95
+ inlineEditColumns: el,
96
+ isResizable: tl = !0,
97
97
  paginationConfig: ae,
98
98
  dndSortableUtils: ie,
99
99
  multipleContexts: Qe,
100
100
  withSortable: ye,
101
- withDraggable: tl,
102
- enableRootDrag: ll,
103
- pageSize: rl = ln,
104
- onCascadingRowExpand: nl,
101
+ withDraggable: ll,
102
+ enableRootDrag: rl,
103
+ pageSize: nl = ln,
104
+ onCascadingRowExpand: sl,
105
105
  totalItems: Ke,
106
106
  showRecordCount: Te = !1,
107
- getInnerRowData: sl,
108
- maxLevel: ol,
109
- expandedRows: al = {},
110
- setExpandedRows: il,
111
- showNewItem: cl,
107
+ getInnerRowData: ol,
108
+ maxLevel: al,
109
+ expandedRows: il = {},
110
+ setExpandedRows: cl,
111
+ showNewItem: dl,
112
112
  rawData: et,
113
- dragConfig: dl,
114
- isOverlayLoading: ul,
115
- style: hl = {},
113
+ dragConfig: ul,
114
+ isOverlayLoading: hl,
115
+ style: ml = {},
116
116
  floatingBarConfig: De,
117
- rowWrapper: ml,
118
- rowLinkConfig: pl,
117
+ rowWrapper: pl,
118
+ rowLinkConfig: tt,
119
119
  isCellClickDisabled: fl,
120
120
  setHeaderOnParent: Ne,
121
121
  optimizeTable: vl = !1,
122
122
  multiSelectConfig: wl,
123
- cellContextMenuConfig: tt,
123
+ cellContextMenuConfig: lt,
124
124
  headerContextOptions: Fl,
125
125
  showHeaderContextOptions: Sl,
126
126
  setShowHeaderContextOptions: bl,
@@ -134,32 +134,32 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
134
134
  onFieldOperationFlow: Nl,
135
135
  fieldOperationLoading: P = null,
136
136
  onTableActionsReady: Ee,
137
- onPendingEditsChange: lt,
137
+ onPendingEditsChange: rt,
138
138
  onCancelPendingEdits: W
139
139
  }) => {
140
- const a = kr(), Ol = un(hn()), Al = !!D?.search, rt = n?.columnFilters?.length > 0, U = Al || rt, El = !!j, N = a?.getTableView?.(g) ?? null, [x, q] = m(N || null), M = !_r(
140
+ const a = kr(), Ol = un(hn()), Al = !!D?.search, nt = n?.columnFilters?.length > 0, U = Al || nt, El = !!j, N = a?.getTableView?.(V) ?? null, [x, q] = m(N || null), M = !_r(
141
141
  x,
142
142
  a?.getUserId?.()
143
- ), [Re, ke] = m(!1), [_e, nt] = m(!1), [Rl, st] = m(null), [v, Me] = m(A), ot = (u.length === 0 || !v.length) && !re, [at, de] = m(
143
+ ), [Re, ke] = m(!1), [_e, st] = m(!1), [Rl, ot] = m(null), [v, Me] = m(A), at = (u.length === 0 || !v.length) && !re, [it, de] = m(
144
144
  null
145
- ), [kl, _l] = m(!1), [Ml, Il] = m(null), [Ll, gl] = m(!1), [Vl, ue] = m(
145
+ ), [kl, _l] = m(!1), [Ml, Il] = m(null), [Ll, Vl] = m(!1), [gl, ue] = m(
146
146
  null
147
- ), [jl, he] = m(null), [Bl, it] = m({}), [J, Ie] = m(
147
+ ), [jl, he] = m(null), [Bl, ct] = m({}), [J, Ie] = m(
148
148
  null
149
- ), [Pl, ct] = m(!1), [E, Wl] = m(0), Le = O(null), ge = O(null), [dt, Hl] = m({
149
+ ), [Pl, dt] = m(!1), [E, Wl] = m(0), Le = O(null), Ve = O(null), [ut, Hl] = m({
150
150
  width: 0,
151
151
  height: 0
152
- }), [$l, H] = m(null), [R, ut] = m(null), [zl, ht] = m(null), [mt, pt] = m(null), [Cl, ft] = m(null), [Ve, G] = m({}), je = O(!1), me = O(!1), Be = O(x);
152
+ }), [$l, H] = m(null), [R, ht] = m(null), [zl, mt] = m(null), [pt, ft] = m(null), [Cl, vt] = m(null), [ge, G] = m({}), je = O(!1), me = O(!1), Be = O(x);
153
153
  Be.current = x;
154
- const vt = O(a);
155
- vt.current = a;
156
- const wt = O(A);
157
- wt.current = A;
154
+ const wt = O(a);
155
+ wt.current = a;
156
+ const Ft = O(A);
157
+ Ft.current = A;
158
158
  const pe = O(n);
159
159
  pe.current = n;
160
- const Ft = O(null), St = O(
160
+ const St = O(null), bt = O(
161
161
  () => ({})
162
- ), bt = O(() => ({})), [h, k] = m({}), Pe = i(
162
+ ), xt = O(() => ({})), [h, k] = m({}), Pe = i(
163
163
  (e, t, l) => {
164
164
  k((r) => {
165
165
  const o = r[e]?.[t];
@@ -167,7 +167,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
167
167
  if (d === void 0) {
168
168
  const F = v.find((f) => f.key === t);
169
169
  if (F) {
170
- const f = Bt(
170
+ const f = Pt(
171
171
  l.value,
172
172
  F
173
173
  );
@@ -188,15 +188,15 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
188
188
  });
189
189
  },
190
190
  [v]
191
- ), xt = i(() => Object.values(h).some(
191
+ ), yt = i(() => Object.values(h).some(
192
192
  (e) => Object.keys(e).length > 0
193
193
  ), [h]);
194
194
  T(() => {
195
195
  Ee && Ee({
196
196
  addPendingEdit: Pe,
197
- hasPendingEdits: xt
197
+ hasPendingEdits: yt
198
198
  });
199
- }, [Ee, Pe, xt]);
199
+ }, [Ee, Pe, yt]);
200
200
  const Ul = i(
201
201
  (e, t) => {
202
202
  k((l) => {
@@ -215,7 +215,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
215
215
  ), Jl = i(
216
216
  (e, t) => !!h[e]?.[t],
217
217
  [h]
218
- ), yt = i(() => {
218
+ ), Tt = i(() => {
219
219
  P || (W && Object.keys(h).length > 0 && W(h), k({}), G({}), H(null));
220
220
  }, [P, W, h]), $ = i(
221
221
  (e, t, l) => {
@@ -262,7 +262,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
262
262
  const r = {}, o = /* @__PURE__ */ new Set();
263
263
  return Object.entries(e).forEach(([d, F]) => {
264
264
  r[d] = {}, Object.entries(F).forEach(([f, y]) => {
265
- const L = v.find((S) => S.key === f), w = Bt(
265
+ const L = v.find((S) => S.key === f), w = Pt(
266
266
  y.value,
267
267
  L
268
268
  );
@@ -280,7 +280,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
280
280
  ), fe = i((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
- }, []), Tt = i(() => {
283
+ }, []), Dt = i(() => {
284
284
  const { hasErrors: e, updatedEdits: t, firstError: l, errorTypes: r } = X(h);
285
285
  if (e) {
286
286
  if (k(t), a?.showNotification?.(
@@ -370,8 +370,8 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
370
370
  return delete S[e], S;
371
371
  }), G((w) => {
372
372
  const S = { ...w };
373
- return Object.keys(S).forEach((It) => {
374
- It.startsWith(`${e}-`) && delete S[It];
373
+ return Object.keys(S).forEach((Lt) => {
374
+ Lt.startsWith(`${e}-`) && delete S[Lt];
375
375
  }), S;
376
376
  }), H(null);
377
377
  },
@@ -390,8 +390,8 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
390
390
  0
391
391
  ), [h]);
392
392
  T(() => {
393
- lt?.(z > 0, z);
394
- }, [z, lt]);
393
+ rt?.(z > 0, z);
394
+ }, [z, rt]);
395
395
  const Yl = C(() => {
396
396
  const e = [];
397
397
  return Object.entries(h).forEach(([t, l]) => {
@@ -427,36 +427,36 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
427
427
  (t, l) => t.rowIndex - l.rowIndex
428
428
  );
429
429
  }, [h, u]), Ql = i(
430
- (e) => ut(e),
430
+ (e) => ht(e),
431
431
  []
432
432
  ), ve = i(
433
- () => ut(null),
433
+ () => ht(null),
434
434
  []
435
435
  ), Kl = i(
436
436
  (e, t) => {
437
- ht({ value: e, reference: t }), R?.onSelected && R.onSelected(e, t), ve();
437
+ mt({ value: e, reference: t }), R?.onSelected && R.onSelected(e, t), ve();
438
438
  },
439
439
  [R, ve]
440
440
  ), er = i(
441
- () => ht(null),
441
+ () => mt(null),
442
442
  []
443
443
  ), tr = i(
444
- (e) => pt(e),
444
+ (e) => ft(e),
445
445
  []
446
- ), Dt = i(
447
- () => pt(null),
446
+ ), Nt = i(
447
+ () => ft(null),
448
448
  []
449
449
  ), lr = i(
450
- (e) => ft(e),
450
+ (e) => vt(e),
451
451
  []
452
- ), Nt = i(() => ft(null), []), rr = i(
452
+ ), Ot = i(() => vt(null), []), rr = i(
453
453
  (e, t) => {
454
454
  G((l) => ({ ...l, [e]: t }));
455
455
  },
456
456
  []
457
457
  ), nr = i(
458
- (e) => Ve[e],
459
- [Ve]
458
+ (e) => ge[e],
459
+ [ge]
460
460
  ), sr = C(() => {
461
461
  const e = oe.match(/h-\[(\d+px)\]/);
462
462
  if (e) return e[1];
@@ -464,14 +464,14 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
464
464
  if (t)
465
465
  return t[1].replace(/([+-])/g, " $1 ").replace(/\s+/g, " ");
466
466
  }, [oe]), or = {
467
- isEmpty: ot,
467
+ isEmpty: at,
468
468
  isFilters: U,
469
469
  isColumnConfigurable: ne,
470
470
  handleOnClick: se,
471
471
  emptyMessage: Je,
472
472
  buttons: Xe,
473
473
  noDataWidget: Ge
474
- }, ar = a?.t?.(Wt) ?? Wt, we = U ? "No Results Found" : Je || "No Data Found", ir = typeof we == "string" ? a?.t?.(we) ?? we : we, Ot = { __isLoading: !0 }, cr = new Array(1).fill(Ot), dr = new Array(rl).fill(Ot), Y = C(
474
+ }, ar = a?.t?.(Ht) ?? Ht, we = U ? "No Results Found" : Je || "No Data Found", ir = typeof we == "string" ? a?.t?.(we) ?? we : we, At = { __isLoading: !0 }, cr = new Array(1).fill(At), dr = new Array(nl).fill(At), Y = C(
475
475
  () => v.filter((e) => !!e?.visible),
476
476
  [v]
477
477
  ), ur = $r(
@@ -488,8 +488,8 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
488
488
  }
489
489
  },
490
490
  zr
491
- ), { getTableProps: At, getTableBodyProps: Et, headerGroups: Fe, prepareRow: Rt, rows: I } = ur;
492
- Ft.current = Fe;
491
+ ), { getTableProps: Et, getTableBodyProps: Rt, headerGroups: Fe, prepareRow: kt, rows: I } = ur;
492
+ St.current = Fe;
493
493
  const hr = JSON.stringify(
494
494
  Fe[0]?.headers?.map(
495
495
  (e) => e?.Header
@@ -497,7 +497,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
497
497
  );
498
498
  T(() => {
499
499
  if (Ae) {
500
- const e = Ft.current;
500
+ const e = St.current;
501
501
  Ae?.(
502
502
  e?.[0]?.headers?.map((t) => t?.Header) ?? []
503
503
  );
@@ -509,15 +509,15 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
509
509
  isCheckAllDisabled: j?.isCheckAllDisabled,
510
510
  selectionDisabledRowIds: j?.selectionDisabledRowIds,
511
511
  rawData: et,
512
- onAllChecked: gl,
512
+ onAllChecked: Vl,
513
513
  setCheckedIds: j?.setCheckedIds,
514
514
  checkboxMetadata: j?.checkboxMetadata
515
515
  }), mr = Ir(
516
- Vt(Lr, {
517
- activationConstraint: { distance: Pt }
516
+ jt(Lr, {
517
+ activationConstraint: { distance: Wt }
518
518
  }),
519
- Vt(gr, {
520
- activationConstraint: { distance: Pt }
519
+ jt(Vr, {
520
+ activationConstraint: { distance: Wt }
521
521
  })
522
522
  ), pr = {
523
523
  easing: dn,
@@ -531,7 +531,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
531
531
  {}
532
532
  );
533
533
  }
534
- bt.current = fr;
534
+ xt.current = fr;
535
535
  const vr = (e) => {
536
536
  const { active: t } = e;
537
537
  Ie(
@@ -546,26 +546,26 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
546
546
  l,
547
547
  Bl,
548
548
  (r) => {
549
- it(r), ct(!0), ie.onDragSuccess?.({
549
+ ct(r), dt(!0), ie.onDragSuccess?.({
550
550
  draggedId: t.id,
551
551
  droppedId: l.id,
552
552
  draggedType: t.data.current?.type,
553
553
  droppedType: l.data.current?.type,
554
554
  updatedList: r,
555
- cb: () => ct(!1)
555
+ cb: () => dt(!1)
556
556
  });
557
557
  }
558
558
  ), Ie(null));
559
559
  }, Fr = () => Ie(null), Sr = (e) => {
560
- !p?.onSort && !n?.onFilter || de(at === e ? null : e);
560
+ !p?.onSort && !n?.onFilter || de(it === e ? null : e);
561
561
  }, br = (e) => {
562
562
  Il(e), _l(!kl), de(null);
563
563
  }, He = i(() => {
564
564
  p?.onRemoveSort ? p.onRemoveSort() : p?.onSort && p.onSort("", "");
565
565
  }, [p]), Se = i((e = null) => {
566
- st(e), ke((t) => e ? !0 : !t);
566
+ ot(e), ke((t) => e ? !0 : !t);
567
567
  }, []), $e = i(
568
- () => nt((e) => !e),
568
+ () => st((e) => !e),
569
569
  []
570
570
  ), xr = () => {
571
571
  const e = Fe[0]?.headers?.filter((t) => t?.visible !== !1);
@@ -577,16 +577,16 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
577
577
  let t = 0;
578
578
  for (let l = e + 1; l < Y.length; l++)
579
579
  Y[l].visible !== !1 && (t += Y[l].width ?? 0);
580
- return ce && (t += Oe || on), V && (t += qe ? 0 : an), t;
580
+ return ce && (t += Oe || on), g && (t += qe ? 0 : an), t;
581
581
  },
582
582
  [
583
583
  Y,
584
584
  Oe,
585
585
  qe,
586
586
  ce,
587
- V
587
+ g
588
588
  ]
589
- ), kt = () => {
589
+ ), _t = () => {
590
590
  const e = a?.getUserId?.();
591
591
  return {
592
592
  ...x || {},
@@ -594,7 +594,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
594
594
  created_by: x?.created_by || e,
595
595
  filters: x?.filters || n?.columnFilters,
596
596
  id: x?.id || "untitled-view",
597
- table_key: x?.table_key || g,
597
+ table_key: x?.table_key || V,
598
598
  columns: x?.columns || A?.map((t, l) => ({
599
599
  name: t.Header,
600
600
  width: t.width,
@@ -607,9 +607,9 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
607
607
  }))
608
608
  };
609
609
  };
610
- St.current = kt;
610
+ bt.current = _t;
611
611
  const Tr = (e, t) => {
612
- const l = kt();
612
+ const l = _t();
613
613
  q({
614
614
  ...l,
615
615
  columns: l?.columns?.map(
@@ -624,7 +624,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
624
624
  if (JSON.stringify(e?.filters || []) !== JSON.stringify(n?.columnFilters || [])) {
625
625
  const t = (e?.filters?.length ?? 0) > 0, l = n?.columnFilters?.length > 0;
626
626
  if (!(t && !l && !me.current)) {
627
- const o = St.current();
627
+ const o = bt.current();
628
628
  q({
629
629
  ...o,
630
630
  filters: JSON.parse(
@@ -645,25 +645,25 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
645
645
  me.current = !0, n?.onClearFilter?.();
646
646
  }, [n?.onClearFilter]);
647
647
  T(() => {
648
- p?.columnSort?.field ? (nt(!0), p.columnSort.order === "asc" ? (ue(p.columnSort.field), he(null)) : p.columnSort.order === "desc" && (he(p.columnSort.field), ue(null))) : (ue(null), he(null));
648
+ p?.columnSort?.field ? (st(!0), p.columnSort.order === "asc" ? (ue(p.columnSort.field), he(null)) : p.columnSort.order === "desc" && (he(p.columnSort.field), ue(null))) : (ue(null), he(null));
649
649
  }, [p?.columnSort?.field, p?.columnSort?.order]), T(() => {
650
650
  Me(
651
- Lt(
651
+ Vt(
652
652
  Be.current?.columns || [],
653
653
  A
654
654
  )
655
655
  );
656
656
  }, [A]), T(() => {
657
- x?.unsaved && vt.current?.persistTableView?.(x);
657
+ x?.unsaved && wt.current?.persistTableView?.(x);
658
658
  }, [x]), T(() => {
659
- it(
660
- bt.current()
659
+ ct(
660
+ xt.current()
661
661
  );
662
662
  }, [I.length]), T(() => {
663
663
  q(N || null), N?.columns && Me(
664
- Lt(
664
+ Vt(
665
665
  N?.columns || [],
666
- wt.current
666
+ Ft.current
667
667
  )
668
668
  ), N?.filters && N.filters.length > 0 && !je.current ? (requestAnimationFrame(() => {
669
669
  pe.current?.onFilter?.(N.filters);
@@ -676,24 +676,24 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
676
676
  return e.observe(Le.current), () => e.disconnect();
677
677
  }
678
678
  }, []), T(() => {
679
- if (!ge.current) return;
679
+ if (!Ve.current) return;
680
680
  const e = new ResizeObserver((t) => {
681
681
  const { width: l, height: r } = t[0].contentRect;
682
682
  Hl({ width: l, height: r });
683
683
  });
684
- return e.observe(ge.current), () => e.disconnect();
684
+ return e.observe(Ve.current), () => e.disconnect();
685
685
  }, []);
686
- const _t = /* @__PURE__ */ s(
686
+ const Mt = /* @__PURE__ */ s(
687
687
  Xr,
688
688
  {
689
- isResizable: el,
689
+ isResizable: tl,
690
690
  headerGroups: Fe,
691
691
  isCheckbox: El,
692
692
  checkboxConfig: We,
693
693
  isAllChecked: Ll,
694
- showHeaderOptions: at ?? "",
694
+ showHeaderOptions: it ?? "",
695
695
  setShowHeaderOptions: de,
696
- isShowSortArrowAsc: Vl,
696
+ isShowSortArrowAsc: gl,
697
697
  isShowSortArrowDesc: jl,
698
698
  onSort: p?.onSort,
699
699
  onFilter: n?.onFilter,
@@ -701,7 +701,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
701
701
  setIsShowSortArrowAsc: ue,
702
702
  setIsShowSortArrowDesc: he,
703
703
  toggleDataFilterModal: Se,
704
- rowOptions: Array.isArray(V) ? V : [],
704
+ rowOptions: Array.isArray(g) ? g : [],
705
705
  isColumnConfigurable: ne ?? !1,
706
706
  onAddColumnClick: se,
707
707
  onEditColumnClick: Ye,
@@ -711,15 +711,15 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
711
711
  rowAdditionalActions: ce ?? null,
712
712
  showPendingEditsColumn: z > 0
713
713
  }
714
- ), Mt = /* @__PURE__ */ b(Er, { children: [
715
- Pl || ul ? /* @__PURE__ */ s("div", { className: "absolute left-0 top-0 w-full h-full z-40 flex items-center justify-center bg-neutral-100 dark:bg-black-700" }) : null,
714
+ ), It = /* @__PURE__ */ b(Er, { children: [
715
+ Pl || hl ? /* @__PURE__ */ s("div", { className: "absolute left-0 top-0 w-full h-full z-40 flex items-center justify-center bg-neutral-100 dark:bg-black-700" }) : null,
716
716
  /* @__PURE__ */ s(
717
717
  "div",
718
718
  {
719
- ...At(),
719
+ ...Et(),
720
720
  className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 h-full bg-white dark:bg-black-800",
721
- children: ot ? /* @__PURE__ */ b("div", { className: "z-10", children: [
722
- _t,
721
+ children: at ? /* @__PURE__ */ b("div", { className: "z-10", children: [
722
+ Mt,
723
723
  /* @__PURE__ */ s("div", { className: "absolute w-full", children: a?.renderEmpty ? a.renderEmpty(or) : /* @__PURE__ */ b("div", { className: "flex flex-col items-center justify-center w-full h-[12rem] text-neutral-900 dark:text-neutral-200 mt-8", children: [
724
724
  Ge && !U ? /* @__PURE__ */ s(mn, { widgetType: "TABLE" }) : /* @__PURE__ */ s(pn, { text: ir }),
725
725
  ne && !U ? /* @__PURE__ */ s("div", { className: "my-4", children: /* @__PURE__ */ b(
@@ -752,16 +752,16 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
752
752
  {
753
753
  style: { width: "100%", height: "100%" },
754
754
  renderProp: ({ width: e, height: t }) => {
755
- const l = e > 0 ? e : dt.width, r = t > 0 ? t : dt.height;
755
+ const l = e > 0 ? e : ut.width, r = t > 0 ? t : ut.height;
756
756
  return l > 0 && r > 0 ? /* @__PURE__ */ s(
757
757
  Cr,
758
758
  {
759
- getTableBodyProps: Et,
759
+ getTableBodyProps: Rt,
760
760
  rows: I,
761
- prepareRow: Rt,
761
+ prepareRow: kt,
762
762
  isLoading: re,
763
- onScroll: Ct,
764
- onScrolling: Ut,
763
+ onScroll: Ut,
764
+ onScrolling: qt,
765
765
  columns: A,
766
766
  width: l,
767
767
  height: r,
@@ -774,11 +774,11 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
774
774
  )
775
775
  }
776
776
  )
777
- ] }), Or = jt((e, t) => /* @__PURE__ */ b("div", { className: "h-full w-full", ...e, ref: t, children: [
778
- _t,
777
+ ] }), Or = Bt((e, t) => /* @__PURE__ */ b("div", { className: "h-full w-full", ...e, ref: t, children: [
778
+ Mt,
779
779
  /* @__PURE__ */ s("div", { className: "relative w-full h-full", children: e?.children })
780
- ] })), Ar = jt((e, t) => /* @__PURE__ */ s("div", { className: "h-full w-full", ...e, ref: t, children: /* @__PURE__ */ s("div", { className: "relative w-full h-full", children: e?.children }) })), ze = C(() => a?.renderTableHeader ? a.renderTableHeader({
781
- tableKey: g,
780
+ ] })), Ar = Bt((e, t) => /* @__PURE__ */ s("div", { className: "h-full w-full", ...e, ref: t, children: /* @__PURE__ */ s("div", { className: "relative w-full h-full", children: e?.children }) })), ze = C(() => a?.renderTableHeader ? a.renderTableHeader({
781
+ tableKey: V,
782
782
  search: D?.search,
783
783
  handleSearch: D?.handleSearch,
784
784
  toggleShowFilters: Se,
@@ -815,7 +815,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
815
815
  agreementId: ee,
816
816
  enumSuggestionsExtraParams: te
817
817
  }) : null, [
818
- g,
818
+ V,
819
819
  D?.search,
820
820
  D?.handleSearch,
821
821
  Se,
@@ -852,62 +852,62 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
852
852
  lastNonStickyColumnIndex: xr,
853
853
  search: D?.search,
854
854
  columnFilters: n?.columnFilters,
855
- onRowClick: $t,
855
+ onRowClick: zt,
856
856
  onSort: p?.onSort,
857
857
  onFilter: n?.onFilter,
858
858
  toggleShowFilters: Se,
859
859
  toggleShowSorts: $e,
860
860
  onRemoveFilter: n?.onRemoveFilter,
861
861
  onClearFilter: n?.onClearFilter,
862
- rowOptions: V,
862
+ rowOptions: g,
863
863
  checkboxConfig: We,
864
864
  onResetFilter: n?.onResetFilter,
865
865
  isColumnConfigurable: ne,
866
866
  onAddColumnClick: se,
867
867
  onEditColumnClick: Ye,
868
868
  onDeleteColumnClick: Ze,
869
- onRowTooltipClick: qt,
870
- tooltiptext: Jt,
871
- cascadingTableConfig: Gt,
869
+ onRowTooltipClick: Jt,
870
+ tooltiptext: Gt,
871
+ cascadingTableConfig: Xt,
872
872
  activeInlineEdit: $l,
873
873
  setActiveInlineEdit: H,
874
- originalsOnly: Xt,
875
- disableOptionsForRowIndex: Yt,
876
- getFullRowDataOnClick: Zt,
877
- selectedRowId: Qt,
874
+ originalsOnly: Yt,
875
+ disableOptionsForRowIndex: Zt,
876
+ getFullRowDataOnClick: Qt,
877
+ selectedRowId: Kt,
878
878
  getSumOfNextVisibleColumnWidth: yr,
879
879
  onRowEdit: _,
880
- inlineEditColumns: Kt,
880
+ inlineEditColumns: el,
881
881
  tableActions: Ue,
882
882
  dndSortableUtils: ie,
883
883
  withSortable: ye,
884
- withDraggable: tl,
885
- onCascadingRowExpand: nl,
886
- getInnerRowData: sl,
884
+ withDraggable: ll,
885
+ onCascadingRowExpand: sl,
886
+ getInnerRowData: ol,
887
887
  tableHeaders: v,
888
- maxLevel: ol,
889
- expandedRows: al,
890
- setExpandedRows: il,
891
- showNewItem: cl,
888
+ maxLevel: al,
889
+ expandedRows: il,
890
+ setExpandedRows: cl,
891
+ showNewItem: dl,
892
892
  rawData: et,
893
- dragConfig: dl,
894
- rowWrapper: ml,
895
- rowLinkConfig: pl,
893
+ dragConfig: ul,
894
+ rowWrapper: pl,
895
+ rowLinkConfig: tt,
896
896
  isCellClickDisabled: fl,
897
897
  asyncRowOptionsFilter: n?.asyncRowOptionsFilter,
898
898
  handleUpdateColumnWidth: Tr,
899
899
  isTableViewReadOnly: M,
900
900
  multiSelectConfig: wl,
901
- cellContextMenuConfig: tt,
901
+ cellContextMenuConfig: lt,
902
902
  openCellContextMenu: lr,
903
- closeCellContextMenu: Nt,
903
+ closeCellContextMenu: Ot,
904
904
  headerContextOptions: Fl,
905
905
  showHeaderContextOptions: Sl,
906
906
  setShowHeaderContextOptions: bl,
907
907
  headerDivWidth: E,
908
908
  showDataTypeIcon: xl,
909
909
  rowAdditionalActions: ce,
910
- hoverConfig: Ht,
910
+ hoverConfig: $t,
911
911
  rowAdditionalActionsWidth: Oe,
912
912
  cellEditing: yl,
913
913
  cellEditingValue: Tl,
@@ -917,9 +917,9 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
917
917
  clearSelectedMasterData: er,
918
918
  allowInlineEdit: Dl,
919
919
  openCurrencyDropdown: tr,
920
- closeCurrencyDropdown: Dt,
921
- currencyDropdownConfig: mt,
922
- selectedCurrenciesMap: Ve,
920
+ closeCurrencyDropdown: Nt,
921
+ currencyDropdownConfig: pt,
922
+ selectedCurrenciesMap: ge,
923
923
  setCurrencyForCell: rr,
924
924
  getCurrencyForCell: nr,
925
925
  pendingEdits: h,
@@ -927,8 +927,8 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
927
927
  removePendingEdit: Ul,
928
928
  getPendingEdit: ql,
929
929
  hasPendingEdit: Jl,
930
- clearAllPendingEdits: yt,
931
- saveAllPendingEdits: Tt,
930
+ clearAllPendingEdits: Tt,
931
+ saveAllPendingEdits: Dt,
932
932
  clearRowPendingEdits: Gl,
933
933
  saveRowPendingEdits: Xl,
934
934
  pendingEditsCount: z,
@@ -1028,7 +1028,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1028
1028
  }
1029
1029
  ) : null,
1030
1030
  c?.showDivider ? /* @__PURE__ */ s("div", { className: "border-b pb-2 w-full dark:bg-black-800" }) : null,
1031
- zt && (Re || _e) ? /* @__PURE__ */ s("div", { className: "flex justify-between items-center pb-4 dark:bg-black-800", children: /* @__PURE__ */ b("div", { className: "flex gap-2 items-center", children: [
1031
+ Ct && (Re || _e) ? /* @__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
1032
  _e && a?.renderSortItem ? a.renderSortItem({
1033
1033
  sort: p?.columnSort,
1034
1034
  onRemoveSort: He,
@@ -1039,7 +1039,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1039
1039
  }) : null,
1040
1040
  Re && _e && p?.columnSort?.field !== "" ? /* @__PURE__ */ s("div", { className: "h-8 w-[1px] flex-shrink-0 bg-neutral-200" }) : null,
1041
1041
  Re ? /* @__PURE__ */ b("div", { className: "flex gap-2 items-center", children: [
1042
- (rt || n?.onResetFilter) && a?.renderActiveFilters && a.renderActiveFilters({
1042
+ (nt || n?.onResetFilter) && a?.renderActiveFilters && a.renderActiveFilters({
1043
1043
  filters: n?.columnFilters,
1044
1044
  onRemoveFilter: Dr,
1045
1045
  onClearFilter: Nr,
@@ -1063,7 +1063,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1063
1063
  modelName: Q,
1064
1064
  enableMasterDataEnumSuggestions: K,
1065
1065
  defaultFilterColumn: Rl,
1066
- resetDefaultFilterColumn: () => st(null),
1066
+ resetDefaultFilterColumn: () => ot(null),
1067
1067
  column: Ml,
1068
1068
  onFilter: n?.onFilter,
1069
1069
  tableHeaders: v,
@@ -1107,16 +1107,16 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1107
1107
  /* @__PURE__ */ s(
1108
1108
  "div",
1109
1109
  {
1110
- ref: ge,
1110
+ ref: Ve,
1111
1111
  className: `w-full ${ae ? "h-auto" : oe} rounded-lg relative border overflow-x-hidden`,
1112
1112
  style: {
1113
1113
  ...ae ? {
1114
1114
  height: u?.length > 0 ? `${(u?.length + 1) * Ol + 4}px` : "350px"
1115
1115
  } : { height: sr },
1116
- ...hl
1116
+ ...ml
1117
1117
  },
1118
- children: ll ? Mt : /* @__PURE__ */ b(
1119
- Vr,
1118
+ children: rl ? It : /* @__PURE__ */ b(
1119
+ gr,
1120
1120
  {
1121
1121
  sensors: mr,
1122
1122
  onDragEnd: wr,
@@ -1124,7 +1124,7 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1124
1124
  onDragCancel: Fr,
1125
1125
  collisionDetection: jr,
1126
1126
  children: [
1127
- Mt,
1127
+ It,
1128
1128
  J ? Hr(
1129
1129
  /* @__PURE__ */ s(
1130
1130
  Br,
@@ -1134,15 +1134,15 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1134
1134
  children: /* @__PURE__ */ s(
1135
1135
  "table",
1136
1136
  {
1137
- ...At(),
1137
+ ...Et(),
1138
1138
  className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 bg-white dark:bg-black-700 table-auto border-collapse",
1139
1139
  children: /* @__PURE__ */ b(
1140
1140
  "tbody",
1141
1141
  {
1142
- ...Et(),
1142
+ ...Rt(),
1143
1143
  className: "bg-transparent divide-y divide-neutral-200",
1144
1144
  children: [
1145
- void Rt(J),
1145
+ void kt(J),
1146
1146
  /* @__PURE__ */ s(
1147
1147
  Ur,
1148
1148
  {
@@ -1182,21 +1182,22 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1182
1182
  /* @__PURE__ */ s(
1183
1183
  Gr,
1184
1184
  {
1185
- config: mt,
1186
- onClose: Dt
1185
+ config: pt,
1186
+ onClose: Nt
1187
1187
  }
1188
1188
  ),
1189
1189
  /* @__PURE__ */ s(
1190
1190
  Jr,
1191
1191
  {
1192
1192
  state: Cl,
1193
- config: tt,
1194
- rowOptions: V,
1193
+ config: lt,
1194
+ rowOptions: g,
1195
1195
  asyncRowOptionsFilter: n?.asyncRowOptionsFilter,
1196
1196
  checkedIds: We?.checkedIds,
1197
1197
  rows: u,
1198
1198
  columns: v,
1199
- onClose: Nt
1199
+ rowLinkConfig: tt,
1200
+ onClose: Ot
1200
1201
  }
1201
1202
  ),
1202
1203
  /* @__PURE__ */ s(
@@ -1206,8 +1207,8 @@ const vn = Wr, Wt = "Create Column", wn = (g, D) => `button-admin-${g.toLowerCas
1206
1207
  pendingEditsList: Yl,
1207
1208
  rowsWithPendingEdits: Zl,
1208
1209
  fieldOperationLoading: P,
1209
- onClearAll: yt,
1210
- onSaveAll: Tt,
1210
+ onClearAll: Tt,
1211
+ onSaveAll: Dt,
1211
1212
  onScrollToCell: $
1212
1213
  }
1213
1214
  )