@lax-wp/design-system 0.13.41 → 0.13.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data-display/code-editor/CodeEditor.cjs.js +1 -1
- package/dist/components/data-display/code-editor/CodeEditor.cjs.js.map +1 -1
- package/dist/components/data-display/code-editor/CodeEditor.es.js +38 -38
- package/dist/components/data-display/code-editor/CodeEditor.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/context.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/context.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/context.d.ts +1 -0
- package/dist/components/data-display/infinite-table/context.es.js +1 -0
- package/dist/components/data-display/infinite-table/context.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/Options.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/cell/Options.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/Options.d.ts +2 -1
- package/dist/components/data-display/infinite-table/head/cell/Options.es.js +79 -70
- package/dist/components/data-display/infinite-table/head/cell/Options.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/Resizer.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/cell/Resizer.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/Resizer.d.ts +2 -1
- package/dist/components/data-display/infinite-table/head/cell/Resizer.es.js +23 -19
- package/dist/components/data-display/infinite-table/head/cell/Resizer.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.es.js +46 -44
- package/dist/components/data-display/infinite-table/head/cell/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.es.js +474 -470
- package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
- package/dist/components/data-display/tag/Tag.cjs.js +1 -1
- package/dist/components/data-display/tag/Tag.cjs.js.map +1 -1
- package/dist/components/data-display/tag/Tag.es.js +9 -9
- package/dist/components/data-display/tag/Tag.es.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.es.js +1 -1
- package/dist/components/floating-bar/FloatingBar.es.js.map +1 -1
- package/dist/components/forms/search-bar/SearchBar.cjs.js +1 -1
- package/dist/components/forms/search-bar/SearchBar.cjs.js.map +1 -1
- package/dist/components/forms/search-bar/SearchBar.es.js +1 -1
- package/dist/components/forms/search-bar/SearchBar.es.js.map +1 -1
- package/dist/utils/table.cjs.js +1 -1
- package/dist/utils/table.cjs.js.map +1 -1
- package/dist/utils/table.d.ts +2 -1
- package/dist/utils/table.es.js +19 -18
- package/dist/utils/table.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as s, jsxs as b, Fragment as
|
|
2
|
-
import { useCheckbox as
|
|
1
|
+
import { jsx as s, jsxs as b, Fragment as Dr } from "react/jsx-runtime";
|
|
2
|
+
import { useCheckbox as Or } from "../../../hooks/useCheckbox.es.js";
|
|
3
3
|
import { useTableConfig as Ar } from "../../../providers/design-system-provider/hooks.es.js";
|
|
4
|
-
import { mergeViewColumnsWithTableColumns as
|
|
4
|
+
import { canEditTableView as Er, mergeViewColumnsWithTableColumns as Vt } from "../../../utils/table.es.js";
|
|
5
5
|
import gt from "../../button/Button.es.js";
|
|
6
|
-
import { FloatingBar as
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { useSensors as
|
|
9
|
-
import
|
|
10
|
-
import { AutoSizer as
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { useTable as
|
|
13
|
-
import { Body as
|
|
14
|
-
import { validateCellValue as
|
|
15
|
-
import { Row as
|
|
16
|
-
import { TableContext as
|
|
17
|
-
import { CurrencyDropdownPortal as
|
|
18
|
-
import { Head as
|
|
19
|
-
import { PendingEditsFloatingBar as
|
|
20
|
-
import { DATA_ROW_ID_ATTR as
|
|
21
|
-
import { getRowSlotHeight as
|
|
22
|
-
import { NoDataFoundWidgets as
|
|
23
|
-
import { NoDataFound as
|
|
24
|
-
import { Add2Icon as
|
|
25
|
-
const
|
|
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 Rr, useSensor as It, MouseSensor as kr, TouchSensor as Mr, DndContext as Lr, closestCorners as Vr, DragOverlay as gr } from "@dnd-kit/core";
|
|
9
|
+
import Ir, { useState as p, useRef as O, useCallback as c, 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 Xr, OS_VIEWPORT_SELECTOR as Yr, SCROLL_TO_CELL_COLUMN_WIDTH_FALLBACK as Zr, SCROLL_TO_CELL_LEFT_OFFSET as Cr, 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 C, 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, N) => `button-admin-${g.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, "") || N}`, Pn = Ir.memo(
|
|
26
26
|
({
|
|
27
27
|
tableKey: g,
|
|
28
28
|
searchConfig: N = { search: "", handleSearch: () => null, allowAStarSearch: !1 },
|
|
@@ -48,216 +48,216 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
48
48
|
isLoading: !1,
|
|
49
49
|
showDivider: !1
|
|
50
50
|
},
|
|
51
|
-
hoverConfig:
|
|
52
|
-
columns:
|
|
53
|
-
modelName:
|
|
54
|
-
enableMasterDataEnumSuggestions:
|
|
55
|
-
agreementCategoryId:
|
|
56
|
-
agreementDomainId:
|
|
57
|
-
agreementId:
|
|
58
|
-
modificationId:
|
|
59
|
-
lineItemRowId:
|
|
60
|
-
enumSuggestionsData:
|
|
51
|
+
hoverConfig: Ht = null,
|
|
52
|
+
columns: A,
|
|
53
|
+
modelName: Q,
|
|
54
|
+
enableMasterDataEnumSuggestions: K = !1,
|
|
55
|
+
agreementCategoryId: ee,
|
|
56
|
+
agreementDomainId: te,
|
|
57
|
+
agreementId: le,
|
|
58
|
+
modificationId: re,
|
|
59
|
+
lineItemRowId: ne,
|
|
60
|
+
enumSuggestionsData: se,
|
|
61
61
|
data: m = [],
|
|
62
|
-
onRowClick:
|
|
63
|
-
showHeader:
|
|
64
|
-
tableActions:
|
|
65
|
-
rowOptions:
|
|
66
|
-
hideRowOptionWidth:
|
|
67
|
-
checkboxUtilities:
|
|
68
|
-
isLoading:
|
|
69
|
-
onScroll:
|
|
70
|
-
onScrolling:
|
|
71
|
-
isColumnConfigurable:
|
|
62
|
+
onRowClick: $t,
|
|
63
|
+
showHeader: Ne,
|
|
64
|
+
tableActions: Ge,
|
|
65
|
+
rowOptions: U,
|
|
66
|
+
hideRowOptionWidth: Xe,
|
|
67
|
+
checkboxUtilities: I,
|
|
68
|
+
isLoading: oe = !1,
|
|
69
|
+
onScroll: zt,
|
|
70
|
+
onScrolling: Ut,
|
|
71
|
+
isColumnConfigurable: ie,
|
|
72
72
|
onAddColumnClick: ae,
|
|
73
|
-
emptyMessage:
|
|
74
|
-
noDataWidget:
|
|
75
|
-
buttons:
|
|
76
|
-
onEditColumnClick:
|
|
77
|
-
onDeleteColumnClick:
|
|
73
|
+
emptyMessage: Ye,
|
|
74
|
+
noDataWidget: Ze,
|
|
75
|
+
buttons: Ce,
|
|
76
|
+
onEditColumnClick: Qe,
|
|
77
|
+
onDeleteColumnClick: Ke,
|
|
78
78
|
onRowTooltipClick: qt,
|
|
79
|
-
tooltiptext:
|
|
80
|
-
cascadingTableConfig:
|
|
81
|
-
originalsOnly:
|
|
82
|
-
disableOptionsForRowIndex:
|
|
83
|
-
tableHeightClass:
|
|
84
|
-
getFullRowDataOnClick:
|
|
85
|
-
selectedRowId:
|
|
86
|
-
onRowEdit:
|
|
79
|
+
tooltiptext: Jt,
|
|
80
|
+
cascadingTableConfig: Gt,
|
|
81
|
+
originalsOnly: Xt,
|
|
82
|
+
disableOptionsForRowIndex: Yt,
|
|
83
|
+
tableHeightClass: ce = "h-[calc(100vh-220px)]",
|
|
84
|
+
getFullRowDataOnClick: Zt,
|
|
85
|
+
selectedRowId: Ct = null,
|
|
86
|
+
onRowEdit: k,
|
|
87
87
|
onBulkRowEdit: j,
|
|
88
|
-
inlineEditColumns:
|
|
89
|
-
isResizable:
|
|
90
|
-
paginationConfig:
|
|
91
|
-
dndSortableUtils:
|
|
92
|
-
multipleContexts:
|
|
93
|
-
withSortable:
|
|
94
|
-
withDraggable:
|
|
95
|
-
enableRootDrag:
|
|
96
|
-
pageSize:
|
|
97
|
-
onCascadingRowExpand:
|
|
98
|
-
totalItems:
|
|
99
|
-
showRecordCount:
|
|
100
|
-
getInnerRowData:
|
|
101
|
-
maxLevel:
|
|
102
|
-
expandedRows:
|
|
103
|
-
setExpandedRows:
|
|
88
|
+
inlineEditColumns: Qt,
|
|
89
|
+
isResizable: Kt = !0,
|
|
90
|
+
paginationConfig: ue,
|
|
91
|
+
dndSortableUtils: de,
|
|
92
|
+
multipleContexts: et,
|
|
93
|
+
withSortable: De,
|
|
94
|
+
withDraggable: el,
|
|
95
|
+
enableRootDrag: tl,
|
|
96
|
+
pageSize: ll = Qr,
|
|
97
|
+
onCascadingRowExpand: rl,
|
|
98
|
+
totalItems: tt,
|
|
99
|
+
showRecordCount: Oe = !1,
|
|
100
|
+
getInnerRowData: nl,
|
|
101
|
+
maxLevel: sl,
|
|
102
|
+
expandedRows: ol = {},
|
|
103
|
+
setExpandedRows: il,
|
|
104
104
|
showNewItem: al,
|
|
105
|
-
rawData:
|
|
106
|
-
dragConfig:
|
|
107
|
-
isOverlayLoading:
|
|
108
|
-
style:
|
|
105
|
+
rawData: lt,
|
|
106
|
+
dragConfig: cl,
|
|
107
|
+
isOverlayLoading: ul,
|
|
108
|
+
style: dl = {},
|
|
109
109
|
floatingBarConfig: Ae,
|
|
110
|
-
rowWrapper:
|
|
111
|
-
rowLinkConfig:
|
|
112
|
-
isCellClickDisabled:
|
|
110
|
+
rowWrapper: hl,
|
|
111
|
+
rowLinkConfig: ml,
|
|
112
|
+
isCellClickDisabled: pl,
|
|
113
113
|
setHeaderOnParent: Ee,
|
|
114
|
-
optimizeTable:
|
|
115
|
-
multiSelectConfig:
|
|
116
|
-
headerContextOptions:
|
|
117
|
-
showHeaderContextOptions:
|
|
118
|
-
setShowHeaderContextOptions:
|
|
119
|
-
showDataTypeIcon:
|
|
120
|
-
rowAdditionalActions:
|
|
121
|
-
rowAdditionalActionsWidth:
|
|
122
|
-
setVisibleHeaders:
|
|
123
|
-
cellEditing:
|
|
124
|
-
cellEditingValue:
|
|
125
|
-
allowInlineEdit:
|
|
126
|
-
onFieldOperationFlow:
|
|
127
|
-
fieldOperationLoading:
|
|
114
|
+
optimizeTable: vl = !1,
|
|
115
|
+
multiSelectConfig: fl,
|
|
116
|
+
headerContextOptions: wl,
|
|
117
|
+
showHeaderContextOptions: Fl,
|
|
118
|
+
setShowHeaderContextOptions: Sl,
|
|
119
|
+
showDataTypeIcon: bl = !1,
|
|
120
|
+
rowAdditionalActions: he,
|
|
121
|
+
rowAdditionalActionsWidth: _e,
|
|
122
|
+
setVisibleHeaders: Re,
|
|
123
|
+
cellEditing: xl = null,
|
|
124
|
+
cellEditingValue: Tl = null,
|
|
125
|
+
allowInlineEdit: yl = !1,
|
|
126
|
+
onFieldOperationFlow: Nl,
|
|
127
|
+
fieldOperationLoading: P = null,
|
|
128
128
|
onTableActionsReady: ke,
|
|
129
|
-
onPendingEditsChange:
|
|
130
|
-
onCancelPendingEdits:
|
|
129
|
+
onPendingEditsChange: rt,
|
|
130
|
+
onCancelPendingEdits: B
|
|
131
131
|
}) => {
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
const
|
|
132
|
+
const i = Ar(), Dl = on(an()), Ol = !!N?.search, nt = n?.columnFilters?.length > 0, q = Ol || nt, Al = !!I, D = i?.getTableView?.(g) ?? null, [x, J] = p(D || null), M = !Er(x, i?.getUserId?.()), [Me, Le] = p(!1), [Ve, st] = p(!1), [El, ot] = p(null), [w, ge] = p(A), it = (m.length === 0 || !w.length) && !oe, [at, me] = p(null), [_l, Rl] = p(!1), [kl, Ml] = p(null), [Ll, Vl] = p(!1), [gl, pe] = p(null), [Il, ve] = p(null), [jl, ct] = p({}), [G, Ie] = p(null), [Pl, ut] = p(!1), [E, Bl] = p(0), je = O(null), Pe = O(null), [dt, Wl] = p({ width: 0, height: 0 }), [Hl, W] = p(null), [_, ht] = p(null), [$l, mt] = p(null), [pt, vt] = p(null), [Be, X] = p({}), We = O(!1), fe = O(!1), He = O(x);
|
|
133
|
+
He.current = x;
|
|
134
|
+
const ft = O(i);
|
|
135
|
+
ft.current = i;
|
|
136
|
+
const wt = O(A);
|
|
137
|
+
wt.current = A;
|
|
138
|
+
const we = O(n);
|
|
139
|
+
we.current = n;
|
|
140
|
+
const Ft = O(null), St = O(() => ({})), bt = O(() => ({})), [d, R] = p({}), $e = c(
|
|
141
141
|
(e, t, l) => {
|
|
142
|
-
|
|
142
|
+
R((r) => {
|
|
143
143
|
const o = r[e]?.[t];
|
|
144
|
-
let
|
|
145
|
-
if (
|
|
144
|
+
let a = l.validationError;
|
|
145
|
+
if (a === void 0) {
|
|
146
146
|
const F = w.find((v) => v.key === t);
|
|
147
147
|
if (F) {
|
|
148
|
-
const v =
|
|
149
|
-
|
|
148
|
+
const v = Pt(l.value, F);
|
|
149
|
+
a = v.isValid ? null : v.error || "Invalid";
|
|
150
150
|
} else
|
|
151
|
-
|
|
151
|
+
a = o?.validationError ?? null;
|
|
152
152
|
}
|
|
153
|
-
return { ...r, [e]: { ...r[e] || {}, [t]: { ...l, validationError:
|
|
153
|
+
return { ...r, [e]: { ...r[e] || {}, [t]: { ...l, validationError: a ?? null } } };
|
|
154
154
|
});
|
|
155
155
|
},
|
|
156
156
|
[w]
|
|
157
|
-
),
|
|
157
|
+
), xt = c(() => Object.values(d).some((e) => Object.keys(e).length > 0), [d]);
|
|
158
158
|
y(() => {
|
|
159
|
-
ke && ke({ addPendingEdit:
|
|
160
|
-
}, [ke,
|
|
161
|
-
const
|
|
162
|
-
|
|
159
|
+
ke && ke({ addPendingEdit: $e, hasPendingEdits: xt });
|
|
160
|
+
}, [ke, $e, xt]);
|
|
161
|
+
const zl = c((e, t) => {
|
|
162
|
+
R((l) => {
|
|
163
163
|
const r = { ...l };
|
|
164
164
|
if (r[e]) {
|
|
165
|
-
const { [t]: o, ...
|
|
166
|
-
Object.keys(
|
|
165
|
+
const { [t]: o, ...a } = r[e];
|
|
166
|
+
Object.keys(a).length === 0 ? delete r[e] : r[e] = a;
|
|
167
167
|
}
|
|
168
168
|
return r;
|
|
169
169
|
});
|
|
170
|
-
}, []),
|
|
170
|
+
}, []), Ul = c(
|
|
171
171
|
(e, t) => d[e]?.[t],
|
|
172
172
|
[d]
|
|
173
173
|
), ql = c(
|
|
174
174
|
(e, t) => !!d[e]?.[t],
|
|
175
175
|
[d]
|
|
176
|
-
),
|
|
177
|
-
|
|
178
|
-
}, [
|
|
176
|
+
), Tt = c(() => {
|
|
177
|
+
P || (B && Object.keys(d).length > 0 && B(d), R({}), X({}), W(null));
|
|
178
|
+
}, [P, B, d]), H = c(
|
|
179
179
|
(e, t, l) => {
|
|
180
180
|
setTimeout(() => {
|
|
181
|
-
|
|
181
|
+
i?.dispatchEvent?.("SCROLL_TO_TABLE_ROW", { rowIndex: l });
|
|
182
182
|
const r = w.findIndex((o) => o.key === t);
|
|
183
183
|
setTimeout(() => {
|
|
184
|
-
const o = document.querySelector(`[${
|
|
184
|
+
const o = document.querySelector(`[${Gr}="${e}"] [${Xr}="${t}"]`);
|
|
185
185
|
if (o)
|
|
186
186
|
o.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
|
|
187
187
|
else if (r > 0) {
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
188
|
+
const a = document.querySelector(Yr);
|
|
189
|
+
if (a) {
|
|
190
190
|
let F = 0;
|
|
191
191
|
for (let v = 0; v < r; v++) {
|
|
192
192
|
const T = w[v];
|
|
193
|
-
T?.sticky || (F += T?.width ||
|
|
193
|
+
T?.sticky || (F += T?.width || Zr);
|
|
194
194
|
}
|
|
195
|
-
F = Math.max(0, F -
|
|
195
|
+
F = Math.max(0, F - Cr), a.scrollTo({ left: F, behavior: "smooth" });
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
W({ rowId: e, columnKey: t });
|
|
199
199
|
}, 350);
|
|
200
200
|
}, 100);
|
|
201
201
|
},
|
|
202
|
-
[w,
|
|
203
|
-
),
|
|
202
|
+
[w, i]
|
|
203
|
+
), Y = c(
|
|
204
204
|
(e) => {
|
|
205
205
|
let t = !1, l = null;
|
|
206
206
|
const r = {}, o = /* @__PURE__ */ new Set();
|
|
207
|
-
return Object.entries(e).forEach(([
|
|
208
|
-
r[
|
|
209
|
-
const
|
|
210
|
-
f.isValid ? r[
|
|
207
|
+
return Object.entries(e).forEach(([a, F]) => {
|
|
208
|
+
r[a] = {}, Object.entries(F).forEach(([v, T]) => {
|
|
209
|
+
const V = w.find((S) => S.key === v), f = Pt(T.value, V);
|
|
210
|
+
f.isValid ? r[a][v] = { ...T, validationError: null } : (t = !0, f.error && o.add(f.error), l || (l = { rowId: a, columnKey: v }), r[a][v] = { ...T, validationError: f.error });
|
|
211
211
|
});
|
|
212
212
|
}), { hasErrors: t, updatedEdits: r, firstError: l, errorTypes: o };
|
|
213
213
|
},
|
|
214
214
|
[w]
|
|
215
|
-
),
|
|
215
|
+
), Fe = c((e) => {
|
|
216
216
|
const t = e.has("Field required"), l = e.size > (t ? 1 : 0);
|
|
217
217
|
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).";
|
|
218
|
-
}, []),
|
|
219
|
-
const { hasErrors: e, updatedEdits: t, firstError: l, errorTypes: r } =
|
|
218
|
+
}, []), yt = c(() => {
|
|
219
|
+
const { hasErrors: e, updatedEdits: t, firstError: l, errorTypes: r } = Y(d);
|
|
220
220
|
if (e) {
|
|
221
|
-
if (
|
|
222
|
-
const
|
|
223
|
-
|
|
221
|
+
if (R(t), i?.showNotification?.("error", Fe(r)), l) {
|
|
222
|
+
const a = m.findIndex((F) => F.id === l.rowId);
|
|
223
|
+
H(l.rowId, l.columnKey, a);
|
|
224
224
|
}
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
const o = [];
|
|
228
|
-
Object.entries(d).forEach(([
|
|
229
|
-
const v = m.find((T) => T.id ===
|
|
228
|
+
Object.entries(d).forEach(([a, F]) => {
|
|
229
|
+
const v = m.find((T) => T.id === a);
|
|
230
230
|
if (v) {
|
|
231
|
-
const T = { ...v },
|
|
231
|
+
const T = { ...v }, V = {};
|
|
232
232
|
Object.entries(F).forEach(([f, S]) => {
|
|
233
|
-
T[f] = S.value,
|
|
234
|
-
}), o.push({ ...T, __editedFields:
|
|
233
|
+
T[f] = S.value, V[f] = { value: S.value, meta: S.meta };
|
|
234
|
+
}), o.push({ ...T, __editedFields: V });
|
|
235
235
|
}
|
|
236
|
-
}), o.length > 0 && (j ? j(o) :
|
|
237
|
-
}, [d, m,
|
|
236
|
+
}), o.length > 0 && (j ? j(o) : k && k(null, null, null, null, null, { isBulk: !0, rows: o })), R({}), X({}), W(null);
|
|
237
|
+
}, [d, m, k, j, Y, Fe, H, i]), Jl = c(
|
|
238
238
|
(e) => {
|
|
239
|
-
if (
|
|
239
|
+
if (P) return;
|
|
240
240
|
const t = d[e];
|
|
241
|
-
t &&
|
|
241
|
+
t && B && B({ [e]: t }), R((l) => {
|
|
242
242
|
const r = { ...l };
|
|
243
243
|
return delete r[e], r;
|
|
244
|
-
}),
|
|
244
|
+
}), X((l) => {
|
|
245
245
|
const r = { ...l };
|
|
246
246
|
return Object.keys(r).forEach((o) => {
|
|
247
247
|
o.startsWith(`${e}-`) && delete r[o];
|
|
248
248
|
}), r;
|
|
249
|
-
}),
|
|
249
|
+
}), W(null);
|
|
250
250
|
},
|
|
251
|
-
[
|
|
252
|
-
),
|
|
251
|
+
[P, B, d]
|
|
252
|
+
), Gl = c(
|
|
253
253
|
(e) => {
|
|
254
254
|
const t = d[e];
|
|
255
255
|
if (!t || Object.keys(t).length === 0) return;
|
|
256
|
-
const { hasErrors: l, updatedEdits: r, firstError: o, errorTypes:
|
|
256
|
+
const { hasErrors: l, updatedEdits: r, firstError: o, errorTypes: a } = Y({ [e]: t });
|
|
257
257
|
if (l) {
|
|
258
|
-
if (
|
|
258
|
+
if (R((f) => ({ ...f, [e]: r[e] })), i?.showNotification?.("error", Fe(a)), o) {
|
|
259
259
|
const f = m.findIndex((S) => S.id === o.rowId);
|
|
260
|
-
|
|
260
|
+
H(o.rowId, o.columnKey, f);
|
|
261
261
|
}
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
@@ -267,131 +267,131 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
267
267
|
Object.entries(t).forEach(([f, S]) => {
|
|
268
268
|
v[f] = S.value, T[f] = { value: S.value, meta: S.meta };
|
|
269
269
|
});
|
|
270
|
-
const
|
|
271
|
-
j ? j([
|
|
270
|
+
const V = { ...v, __editedFields: T };
|
|
271
|
+
j ? j([V]) : k && k(null, null, null, null, null, { isBulk: !0, rows: [V] }), R((f) => {
|
|
272
272
|
const S = { ...f };
|
|
273
273
|
return delete S[e], S;
|
|
274
|
-
}),
|
|
274
|
+
}), X((f) => {
|
|
275
275
|
const S = { ...f };
|
|
276
|
-
return Object.keys(S).forEach((
|
|
277
|
-
|
|
276
|
+
return Object.keys(S).forEach((Lt) => {
|
|
277
|
+
Lt.startsWith(`${e}-`) && delete S[Lt];
|
|
278
278
|
}), S;
|
|
279
|
-
}),
|
|
279
|
+
}), W(null);
|
|
280
280
|
},
|
|
281
|
-
[d, m,
|
|
282
|
-
),
|
|
281
|
+
[d, m, k, j, Y, Fe, H, i]
|
|
282
|
+
), $ = z(() => Object.values(d).reduce((e, t) => e + Object.keys(t).length, 0), [d]);
|
|
283
283
|
y(() => {
|
|
284
|
-
|
|
285
|
-
}, [
|
|
286
|
-
const
|
|
284
|
+
rt?.($ > 0, $);
|
|
285
|
+
}, [$, rt]);
|
|
286
|
+
const Xl = z(() => {
|
|
287
287
|
const e = [];
|
|
288
288
|
return Object.entries(d).forEach(([t, l]) => {
|
|
289
289
|
const r = m.findIndex((o) => o.id === t);
|
|
290
|
-
Object.entries(l).forEach(([o,
|
|
290
|
+
Object.entries(l).forEach(([o, a]) => {
|
|
291
291
|
const F = w.find((v) => v.key === o);
|
|
292
|
-
e.push({ rowId: t, columnKey: o, fieldName: F?.Header || F?.display_name || o, value:
|
|
292
|
+
e.push({ rowId: t, columnKey: o, fieldName: F?.Header || F?.display_name || o, value: a.value, originalValue: a.originalValue, meta: a.meta, originalMeta: a.originalMeta, rowIndex: r });
|
|
293
293
|
});
|
|
294
294
|
}), e;
|
|
295
|
-
}, [d, w, m]),
|
|
295
|
+
}, [d, w, m]), Yl = z(() => {
|
|
296
296
|
const e = /* @__PURE__ */ new Map();
|
|
297
297
|
return Object.entries(d).forEach(([t, l]) => {
|
|
298
298
|
const r = m.findIndex((o) => o.id === t);
|
|
299
299
|
e.set(t, { rowId: t, rowIndex: r, editCount: Object.keys(l).length });
|
|
300
300
|
}), Array.from(e.values()).sort((t, l) => t.rowIndex - l.rowIndex);
|
|
301
|
-
}, [d, m]),
|
|
301
|
+
}, [d, m]), Zl = c((e) => ht(e), []), Se = c(() => ht(null), []), Cl = c(
|
|
302
302
|
(e, t) => {
|
|
303
|
-
|
|
303
|
+
mt({ value: e, reference: t }), _?.onSelected && _.onSelected(e, t), Se();
|
|
304
304
|
},
|
|
305
|
-
[_,
|
|
306
|
-
),
|
|
307
|
-
|
|
308
|
-
}, []),
|
|
309
|
-
(e) =>
|
|
310
|
-
[
|
|
311
|
-
),
|
|
312
|
-
const e =
|
|
305
|
+
[_, Se]
|
|
306
|
+
), Ql = c(() => mt(null), []), Kl = c((e) => vt(e), []), Nt = c(() => vt(null), []), er = c((e, t) => {
|
|
307
|
+
X((l) => ({ ...l, [e]: t }));
|
|
308
|
+
}, []), tr = c(
|
|
309
|
+
(e) => Be[e],
|
|
310
|
+
[Be]
|
|
311
|
+
), lr = z(() => {
|
|
312
|
+
const e = ce.match(/h-\[(\d+px)\]/);
|
|
313
313
|
if (e) return e[1];
|
|
314
|
-
const t =
|
|
314
|
+
const t = ce.match(/h-\[(calc\(.+\))\]/);
|
|
315
315
|
if (t) return t[1].replace(/([+-])/g, " $1 ").replace(/\s+/g, " ");
|
|
316
|
-
}, [
|
|
317
|
-
isEmpty:
|
|
316
|
+
}, [ce]), rr = {
|
|
317
|
+
isEmpty: it,
|
|
318
318
|
isFilters: q,
|
|
319
|
-
isColumnConfigurable:
|
|
319
|
+
isColumnConfigurable: ie,
|
|
320
320
|
handleOnClick: ae,
|
|
321
|
-
emptyMessage:
|
|
322
|
-
buttons:
|
|
323
|
-
noDataWidget:
|
|
324
|
-
},
|
|
321
|
+
emptyMessage: Ye,
|
|
322
|
+
buttons: Ce,
|
|
323
|
+
noDataWidget: Ze
|
|
324
|
+
}, nr = i?.t?.(Wt) ?? Wt, be = q ? "No Results Found" : Ye || "No Data Found", sr = typeof be == "string" ? i?.t?.(be) ?? be : be, Dt = { __isLoading: !0 }, or = new Array(1).fill(Dt), ir = new Array(ll).fill(Dt), Z = z(() => w.filter((e) => !!e?.visible), [w]), ar = Br(
|
|
325
325
|
{
|
|
326
|
-
columns:
|
|
327
|
-
data: [...m, ...
|
|
328
|
-
defaultColumn: { minWidth:
|
|
326
|
+
columns: vl ? Z : w,
|
|
327
|
+
data: [...m, ...oe ? m?.length ? or : ir : []],
|
|
328
|
+
defaultColumn: { minWidth: tn, width: en, maxWidth: Kr }
|
|
329
329
|
},
|
|
330
|
-
|
|
331
|
-
), { getTableProps:
|
|
332
|
-
|
|
333
|
-
const
|
|
330
|
+
Wr
|
|
331
|
+
), { getTableProps: Ot, getTableBodyProps: At, headerGroups: xe, prepareRow: Et, rows: L } = ar;
|
|
332
|
+
Ft.current = xe;
|
|
333
|
+
const cr = JSON.stringify(xe[0]?.headers?.map((e) => e?.Header));
|
|
334
334
|
y(() => {
|
|
335
|
-
if (
|
|
336
|
-
const e =
|
|
337
|
-
|
|
335
|
+
if (Re) {
|
|
336
|
+
const e = Ft.current;
|
|
337
|
+
Re?.(e?.[0]?.headers?.map((t) => t?.Header) ?? []);
|
|
338
338
|
}
|
|
339
|
-
}, [
|
|
340
|
-
const { checkboxConfig:
|
|
341
|
-
rows:
|
|
342
|
-
checkedIds:
|
|
343
|
-
isCheckAllDisabled:
|
|
344
|
-
selectionDisabledRowIds:
|
|
345
|
-
rawData:
|
|
346
|
-
onAllChecked:
|
|
347
|
-
setCheckedIds:
|
|
348
|
-
checkboxMetadata:
|
|
349
|
-
}),
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
),
|
|
353
|
-
function
|
|
354
|
-
return !
|
|
339
|
+
}, [cr, Re]);
|
|
340
|
+
const { checkboxConfig: _t } = Or({
|
|
341
|
+
rows: L,
|
|
342
|
+
checkedIds: I?.checkedIds,
|
|
343
|
+
isCheckAllDisabled: I?.isCheckAllDisabled,
|
|
344
|
+
selectionDisabledRowIds: I?.selectionDisabledRowIds,
|
|
345
|
+
rawData: lt,
|
|
346
|
+
onAllChecked: Vl,
|
|
347
|
+
setCheckedIds: I?.setCheckedIds,
|
|
348
|
+
checkboxMetadata: I?.checkboxMetadata
|
|
349
|
+
}), ur = Rr(
|
|
350
|
+
It(kr, { activationConstraint: { distance: Bt } }),
|
|
351
|
+
It(Mr, { activationConstraint: { distance: Bt } })
|
|
352
|
+
), dr = { easing: sn, duration: nn };
|
|
353
|
+
function hr() {
|
|
354
|
+
return !et?.length || !De ? L : et.reduce((e, t) => (e[t] = L.filter((l) => l.original?.type === t), e), {});
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
const
|
|
356
|
+
bt.current = hr;
|
|
357
|
+
const mr = (e) => {
|
|
358
358
|
const { active: t } = e;
|
|
359
|
-
|
|
360
|
-
},
|
|
359
|
+
Ie(L.find((l) => l.original?.id === t?.id) ?? null);
|
|
360
|
+
}, pr = (e) => {
|
|
361
361
|
const { active: t, over: l } = e;
|
|
362
|
-
l && (
|
|
363
|
-
|
|
362
|
+
l && (de?.checkDndDragEnd && de.checkDndDragEnd(t, l, jl, (r) => {
|
|
363
|
+
ct(r), ut(!0), de.onDragSuccess?.({
|
|
364
364
|
draggedId: t.id,
|
|
365
365
|
droppedId: l.id,
|
|
366
366
|
draggedType: t.data.current?.type,
|
|
367
367
|
droppedType: l.data.current?.type,
|
|
368
368
|
updatedList: r,
|
|
369
|
-
cb: () =>
|
|
369
|
+
cb: () => ut(!1)
|
|
370
370
|
});
|
|
371
|
-
}),
|
|
372
|
-
},
|
|
373
|
-
!h?.onSort && !n?.onFilter ||
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
},
|
|
371
|
+
}), Ie(null));
|
|
372
|
+
}, vr = () => Ie(null), fr = (e) => {
|
|
373
|
+
!h?.onSort && !n?.onFilter || me(at === e ? null : e);
|
|
374
|
+
}, wr = (e) => {
|
|
375
|
+
Ml(e), Rl(!_l), me(null);
|
|
376
|
+
}, ze = c(() => {
|
|
377
377
|
h?.onRemoveSort ? h.onRemoveSort() : h?.onSort && h.onSort("", "");
|
|
378
|
-
}, [h]),
|
|
379
|
-
|
|
380
|
-
}, []),
|
|
381
|
-
const e =
|
|
378
|
+
}, [h]), Te = c((e = null) => {
|
|
379
|
+
ot(e), Le((t) => e ? !0 : !t);
|
|
380
|
+
}, []), Ue = c(() => st((e) => !e), []), Fr = () => {
|
|
381
|
+
const e = xe[0]?.headers?.filter((t) => t?.visible !== !1);
|
|
382
382
|
for (let t = 0; t < e.length; t++)
|
|
383
383
|
if (e[t].sticky) return t - 1;
|
|
384
384
|
return e.length - 1;
|
|
385
|
-
},
|
|
385
|
+
}, Sr = c(
|
|
386
386
|
(e) => {
|
|
387
387
|
let t = 0;
|
|
388
|
-
for (let l = e + 1; l <
|
|
389
|
-
|
|
390
|
-
return
|
|
388
|
+
for (let l = e + 1; l < Z.length; l++)
|
|
389
|
+
Z[l].visible !== !1 && (t += Z[l].width ?? 0);
|
|
390
|
+
return he && (t += _e || ln), U && (t += Xe ? 0 : rn), t;
|
|
391
391
|
},
|
|
392
|
-
[
|
|
393
|
-
),
|
|
394
|
-
const e =
|
|
392
|
+
[Z, _e, Xe, he, U]
|
|
393
|
+
), Rt = () => {
|
|
394
|
+
const e = i?.getUserId?.();
|
|
395
395
|
return {
|
|
396
396
|
...x || {},
|
|
397
397
|
name: x?.name || "Untitled View",
|
|
@@ -399,7 +399,7 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
399
399
|
filters: x?.filters || n?.columnFilters,
|
|
400
400
|
id: x?.id || "untitled-view",
|
|
401
401
|
table_key: x?.table_key || g,
|
|
402
|
-
columns: x?.columns ||
|
|
402
|
+
columns: x?.columns || A?.map((t, l) => ({
|
|
403
403
|
name: t.Header,
|
|
404
404
|
width: t.width,
|
|
405
405
|
visible: t.visible,
|
|
@@ -411,100 +411,101 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
411
411
|
}))
|
|
412
412
|
};
|
|
413
413
|
};
|
|
414
|
-
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
414
|
+
St.current = Rt;
|
|
415
|
+
const br = (e, t) => {
|
|
416
|
+
if (M) return;
|
|
417
|
+
const l = Rt();
|
|
418
|
+
J({
|
|
418
419
|
...l,
|
|
419
420
|
columns: l?.columns?.map((r) => r.name === e ? { ...r, width: t } : r),
|
|
420
421
|
unsaved: !0
|
|
421
422
|
});
|
|
422
423
|
};
|
|
423
424
|
y(() => {
|
|
424
|
-
n?.columnFilters?.length > 0 &&
|
|
425
|
-
const e =
|
|
425
|
+
if (n?.columnFilters?.length > 0 && Le(!0), M) return;
|
|
426
|
+
const e = He.current;
|
|
426
427
|
if (JSON.stringify(e?.filters || []) !== JSON.stringify(n?.columnFilters || [])) {
|
|
427
428
|
const t = (e?.filters?.length ?? 0) > 0, l = n?.columnFilters?.length > 0;
|
|
428
|
-
if (!(t && !l && !
|
|
429
|
-
const o =
|
|
430
|
-
|
|
429
|
+
if (!(t && !l && !fe.current)) {
|
|
430
|
+
const o = St.current();
|
|
431
|
+
J({ ...o, filters: JSON.parse(JSON.stringify(n?.columnFilters || [])), unsaved: !0 });
|
|
431
432
|
}
|
|
432
|
-
|
|
433
|
+
fe.current = !1;
|
|
433
434
|
}
|
|
434
|
-
}, [n?.columnFilters]);
|
|
435
|
-
const
|
|
435
|
+
}, [n?.columnFilters, M]);
|
|
436
|
+
const xr = c(
|
|
436
437
|
(e) => {
|
|
437
|
-
|
|
438
|
+
fe.current = !0, n?.onRemoveFilter?.(e);
|
|
438
439
|
},
|
|
439
440
|
[n?.onRemoveFilter]
|
|
440
|
-
),
|
|
441
|
-
|
|
441
|
+
), Tr = c(() => {
|
|
442
|
+
fe.current = !0, n?.onClearFilter?.();
|
|
442
443
|
}, [n?.onClearFilter]);
|
|
443
444
|
y(() => {
|
|
444
|
-
h?.columnSort?.field ? (
|
|
445
|
+
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));
|
|
445
446
|
}, [h?.columnSort?.field, h?.columnSort?.order]), y(() => {
|
|
446
|
-
ge(
|
|
447
|
-
}, [
|
|
448
|
-
x?.unsaved &&
|
|
447
|
+
ge(Vt(He.current?.columns || [], A));
|
|
448
|
+
}, [A]), y(() => {
|
|
449
|
+
x?.unsaved && ft.current?.persistTableView?.(x);
|
|
449
450
|
}, [x]), y(() => {
|
|
450
|
-
|
|
451
|
-
}, [
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}),
|
|
451
|
+
ct(bt.current());
|
|
452
|
+
}, [L.length]), y(() => {
|
|
453
|
+
J(D || null), D?.columns && ge(Vt(D?.columns || [], wt.current)), D?.filters && D.filters.length > 0 && !We.current ? (requestAnimationFrame(() => {
|
|
454
|
+
we.current?.onFilter?.(D.filters);
|
|
455
|
+
}), We.current = !0) : D?.filters && We.current && JSON.stringify(D.filters) !== JSON.stringify(we.current?.columnFilters) && we.current?.onFilter?.(D.filters);
|
|
455
456
|
}, [D]), y(() => {
|
|
456
457
|
if (je.current) {
|
|
457
|
-
const e = new ResizeObserver((t) =>
|
|
458
|
+
const e = new ResizeObserver((t) => Bl(t[0].contentRect.width));
|
|
458
459
|
return e.observe(je.current), () => e.disconnect();
|
|
459
460
|
}
|
|
460
461
|
}, []), y(() => {
|
|
461
|
-
if (!
|
|
462
|
+
if (!Pe.current) return;
|
|
462
463
|
const e = new ResizeObserver((t) => {
|
|
463
464
|
const { width: l, height: r } = t[0].contentRect;
|
|
464
|
-
|
|
465
|
+
Wl({ width: l, height: r });
|
|
465
466
|
});
|
|
466
|
-
return e.observe(
|
|
467
|
+
return e.observe(Pe.current), () => e.disconnect();
|
|
467
468
|
}, []);
|
|
468
469
|
const kt = /* @__PURE__ */ s(
|
|
469
|
-
|
|
470
|
+
qr,
|
|
470
471
|
{
|
|
471
|
-
isResizable:
|
|
472
|
-
headerGroups:
|
|
472
|
+
isResizable: Kt,
|
|
473
|
+
headerGroups: xe,
|
|
473
474
|
isCheckbox: Al,
|
|
474
|
-
checkboxConfig:
|
|
475
|
-
isAllChecked:
|
|
475
|
+
checkboxConfig: _t,
|
|
476
|
+
isAllChecked: Ll,
|
|
476
477
|
showHeaderOptions: at ?? "",
|
|
477
|
-
setShowHeaderOptions:
|
|
478
|
+
setShowHeaderOptions: me,
|
|
478
479
|
isShowSortArrowAsc: gl,
|
|
479
|
-
isShowSortArrowDesc:
|
|
480
|
+
isShowSortArrowDesc: Il,
|
|
480
481
|
onSort: h?.onSort,
|
|
481
482
|
onFilter: n?.onFilter,
|
|
482
|
-
toggleHeaderOption:
|
|
483
|
-
setIsShowSortArrowAsc:
|
|
484
|
-
setIsShowSortArrowDesc:
|
|
485
|
-
toggleDataFilterModal:
|
|
486
|
-
rowOptions: Array.isArray(
|
|
487
|
-
isColumnConfigurable:
|
|
483
|
+
toggleHeaderOption: fr,
|
|
484
|
+
setIsShowSortArrowAsc: pe,
|
|
485
|
+
setIsShowSortArrowDesc: ve,
|
|
486
|
+
toggleDataFilterModal: Te,
|
|
487
|
+
rowOptions: Array.isArray(U) ? U : [],
|
|
488
|
+
isColumnConfigurable: ie ?? !1,
|
|
488
489
|
onAddColumnClick: ae,
|
|
489
|
-
onEditColumnClick:
|
|
490
|
-
onDeleteColumnClick:
|
|
491
|
-
tableActions:
|
|
492
|
-
isLoading:
|
|
493
|
-
rowAdditionalActions:
|
|
494
|
-
showPendingEditsColumn:
|
|
490
|
+
onEditColumnClick: Qe,
|
|
491
|
+
onDeleteColumnClick: Ke,
|
|
492
|
+
tableActions: Ge || null,
|
|
493
|
+
isLoading: oe,
|
|
494
|
+
rowAdditionalActions: he ?? null,
|
|
495
|
+
showPendingEditsColumn: $ > 0
|
|
495
496
|
}
|
|
496
|
-
),
|
|
497
|
-
|
|
497
|
+
), Mt = /* @__PURE__ */ b(Dr, { children: [
|
|
498
|
+
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,
|
|
498
499
|
/* @__PURE__ */ s(
|
|
499
500
|
"div",
|
|
500
501
|
{
|
|
501
|
-
...
|
|
502
|
+
...Ot(),
|
|
502
503
|
className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 h-full bg-white dark:bg-black-800",
|
|
503
|
-
children:
|
|
504
|
+
children: it ? /* @__PURE__ */ b("div", { className: "z-10", children: [
|
|
504
505
|
kt,
|
|
505
|
-
/* @__PURE__ */ s("div", { className: "absolute w-full", children:
|
|
506
|
-
|
|
507
|
-
|
|
506
|
+
/* @__PURE__ */ s("div", { className: "absolute w-full", children: i?.renderEmpty ? i.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: [
|
|
507
|
+
Ze && !q ? /* @__PURE__ */ s(cn, { widgetType: "TABLE" }) : /* @__PURE__ */ s(un, { text: sr }),
|
|
508
|
+
ie && !q ? /* @__PURE__ */ s("div", { className: "my-4", children: /* @__PURE__ */ b(
|
|
508
509
|
gt,
|
|
509
510
|
{
|
|
510
511
|
id: "btn-table-shell-create-column",
|
|
@@ -512,33 +513,33 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
512
513
|
appearance: "ghost",
|
|
513
514
|
onClick: ae,
|
|
514
515
|
children: [
|
|
515
|
-
/* @__PURE__ */ s(
|
|
516
|
+
/* @__PURE__ */ s(dn, { className: "text-white dark:text-white" }),
|
|
516
517
|
" ",
|
|
517
|
-
|
|
518
|
+
nr
|
|
518
519
|
]
|
|
519
520
|
}
|
|
520
521
|
) }) : null,
|
|
521
|
-
!q &&
|
|
522
|
+
!q && Ce?.map((e, t) => /* @__PURE__ */ s(gt, { status: "secondary", id: mn(e.label, t), onClick: e.onClick, children: i?.t?.(e.label) ?? e.label }, `${e.label}-${t}`))
|
|
522
523
|
] }) })
|
|
523
524
|
] }) : /* @__PURE__ */ s(
|
|
524
|
-
|
|
525
|
+
hn,
|
|
525
526
|
{
|
|
526
527
|
style: { width: "100%", height: "100%" },
|
|
527
528
|
renderProp: ({ width: e, height: t }) => {
|
|
528
|
-
const l = e > 0 ? e :
|
|
529
|
+
const l = e > 0 ? e : dt.width, r = t > 0 ? t : dt.height;
|
|
529
530
|
return l > 0 && r > 0 ? /* @__PURE__ */ s(
|
|
530
|
-
|
|
531
|
+
Hr,
|
|
531
532
|
{
|
|
532
533
|
getTableBodyProps: At,
|
|
533
|
-
rows:
|
|
534
|
+
rows: L,
|
|
534
535
|
prepareRow: Et,
|
|
535
|
-
isLoading:
|
|
536
|
-
onScroll:
|
|
537
|
-
onScrolling:
|
|
538
|
-
columns:
|
|
536
|
+
isLoading: oe,
|
|
537
|
+
onScroll: zt,
|
|
538
|
+
onScrolling: Ut,
|
|
539
|
+
columns: A,
|
|
539
540
|
width: l,
|
|
540
541
|
height: r,
|
|
541
|
-
withSortable:
|
|
542
|
+
withSortable: De,
|
|
542
543
|
allowAstarSearch: N?.allowAStarSearch || !1
|
|
543
544
|
}
|
|
544
545
|
) : null;
|
|
@@ -547,27 +548,27 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
547
548
|
)
|
|
548
549
|
}
|
|
549
550
|
)
|
|
550
|
-
] }),
|
|
551
|
+
] }), yr = jt((e, t) => /* @__PURE__ */ b("div", { className: "h-full w-full", ...e, ref: t, children: [
|
|
551
552
|
kt,
|
|
552
553
|
/* @__PURE__ */ s("div", { className: "relative w-full h-full", children: e?.children })
|
|
553
|
-
] })),
|
|
554
|
+
] })), Nr = 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(() => i?.renderTableHeader ? i.renderTableHeader({
|
|
554
555
|
tableKey: g,
|
|
555
556
|
search: N?.search,
|
|
556
557
|
handleSearch: N?.handleSearch,
|
|
557
|
-
toggleShowFilters:
|
|
558
|
-
toggleShowSorts:
|
|
558
|
+
toggleShowFilters: Te,
|
|
559
|
+
toggleShowSorts: Ue,
|
|
559
560
|
filterCounts: n?.columnFilters?.length,
|
|
560
|
-
columns:
|
|
561
|
+
columns: A,
|
|
561
562
|
columnFilters: n?.columnFilters,
|
|
562
|
-
setSelectedTableView:
|
|
563
|
+
setSelectedTableView: J,
|
|
563
564
|
selectedTableView: x,
|
|
564
565
|
enableTableView: u?.showTableView,
|
|
565
|
-
modelName:
|
|
566
|
-
enableMasterDataEnumSuggestions:
|
|
566
|
+
modelName: Q,
|
|
567
|
+
enableMasterDataEnumSuggestions: K,
|
|
567
568
|
onRemoveFilter: n?.onRemoveFilter,
|
|
568
569
|
onClearFilter: n?.onClearFilter,
|
|
569
570
|
onFilter: n?.onFilter,
|
|
570
|
-
data:
|
|
571
|
+
data: se ?? m,
|
|
571
572
|
tableHeaders: w,
|
|
572
573
|
showTableViewAsModal: u?.showTableViewAsModal,
|
|
573
574
|
additionalOptions: u?.additionalOptions,
|
|
@@ -579,152 +580,153 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
579
580
|
setTableHeaders: ge,
|
|
580
581
|
allowAStarSearch: !!N?.allowAStarSearch,
|
|
581
582
|
withContent: !!u?.content,
|
|
582
|
-
setShowFilters:
|
|
583
|
+
setShowFilters: Le,
|
|
583
584
|
sort: h?.columnSort,
|
|
584
585
|
onSort: h?.onSort,
|
|
585
|
-
onRemoveSort:
|
|
586
|
+
onRemoveSort: ze,
|
|
586
587
|
showExportButton: u?.showExportButton,
|
|
587
|
-
agreementCategoryId:
|
|
588
|
-
agreementDomainId:
|
|
589
|
-
agreementId:
|
|
590
|
-
modificationId:
|
|
591
|
-
lineItemRowId:
|
|
588
|
+
agreementCategoryId: ee,
|
|
589
|
+
agreementDomainId: te,
|
|
590
|
+
agreementId: le,
|
|
591
|
+
modificationId: re,
|
|
592
|
+
lineItemRowId: ne
|
|
592
593
|
}) : null, [
|
|
593
594
|
g,
|
|
594
595
|
N?.search,
|
|
595
596
|
N?.handleSearch,
|
|
596
|
-
|
|
597
|
-
|
|
597
|
+
Te,
|
|
598
|
+
Ue,
|
|
598
599
|
n?.columnFilters,
|
|
599
|
-
|
|
600
|
-
|
|
600
|
+
A,
|
|
601
|
+
J,
|
|
601
602
|
x,
|
|
602
603
|
u,
|
|
603
|
-
|
|
604
|
+
Q,
|
|
604
605
|
n?.onRemoveFilter,
|
|
605
606
|
n?.onClearFilter,
|
|
606
607
|
n?.onFilter,
|
|
607
608
|
m,
|
|
608
|
-
|
|
609
|
+
se,
|
|
609
610
|
w,
|
|
610
611
|
h?.columnSort,
|
|
611
612
|
h?.onSort,
|
|
612
|
-
|
|
613
|
-
|
|
613
|
+
ze,
|
|
614
|
+
i,
|
|
614
615
|
N?.allowAStarSearch,
|
|
615
|
-
Q,
|
|
616
616
|
K,
|
|
617
617
|
ee,
|
|
618
618
|
te,
|
|
619
619
|
le,
|
|
620
|
-
re
|
|
620
|
+
re,
|
|
621
|
+
ne
|
|
621
622
|
]);
|
|
622
623
|
return y(() => {
|
|
623
624
|
Ee && Ee(qe);
|
|
624
625
|
}, [qe, Ee]), /* @__PURE__ */ b(
|
|
625
|
-
|
|
626
|
+
zr.Provider,
|
|
626
627
|
{
|
|
627
628
|
value: {
|
|
628
|
-
tableWrapper:
|
|
629
|
-
tableBodyWrapper:
|
|
630
|
-
lastNonStickyColumnIndex:
|
|
629
|
+
tableWrapper: yr,
|
|
630
|
+
tableBodyWrapper: Nr,
|
|
631
|
+
lastNonStickyColumnIndex: Fr,
|
|
631
632
|
search: N?.search,
|
|
632
633
|
columnFilters: n?.columnFilters,
|
|
633
|
-
onRowClick:
|
|
634
|
+
onRowClick: $t,
|
|
634
635
|
onSort: h?.onSort,
|
|
635
636
|
onFilter: n?.onFilter,
|
|
636
|
-
toggleShowFilters:
|
|
637
|
-
toggleShowSorts:
|
|
637
|
+
toggleShowFilters: Te,
|
|
638
|
+
toggleShowSorts: Ue,
|
|
638
639
|
onRemoveFilter: n?.onRemoveFilter,
|
|
639
640
|
onClearFilter: n?.onClearFilter,
|
|
640
|
-
rowOptions:
|
|
641
|
-
checkboxConfig:
|
|
641
|
+
rowOptions: U,
|
|
642
|
+
checkboxConfig: _t,
|
|
642
643
|
onResetFilter: n?.onResetFilter,
|
|
643
|
-
isColumnConfigurable:
|
|
644
|
+
isColumnConfigurable: ie,
|
|
644
645
|
onAddColumnClick: ae,
|
|
645
|
-
onEditColumnClick:
|
|
646
|
-
onDeleteColumnClick:
|
|
646
|
+
onEditColumnClick: Qe,
|
|
647
|
+
onDeleteColumnClick: Ke,
|
|
647
648
|
onRowTooltipClick: qt,
|
|
648
|
-
tooltiptext:
|
|
649
|
-
cascadingTableConfig:
|
|
650
|
-
activeInlineEdit:
|
|
651
|
-
setActiveInlineEdit:
|
|
652
|
-
originalsOnly:
|
|
653
|
-
disableOptionsForRowIndex:
|
|
654
|
-
getFullRowDataOnClick:
|
|
655
|
-
selectedRowId:
|
|
656
|
-
getSumOfNextVisibleColumnWidth:
|
|
657
|
-
onRowEdit:
|
|
658
|
-
inlineEditColumns:
|
|
659
|
-
tableActions:
|
|
660
|
-
dndSortableUtils:
|
|
661
|
-
withSortable:
|
|
662
|
-
withDraggable:
|
|
663
|
-
onCascadingRowExpand:
|
|
664
|
-
getInnerRowData:
|
|
649
|
+
tooltiptext: Jt,
|
|
650
|
+
cascadingTableConfig: Gt,
|
|
651
|
+
activeInlineEdit: Hl,
|
|
652
|
+
setActiveInlineEdit: W,
|
|
653
|
+
originalsOnly: Xt,
|
|
654
|
+
disableOptionsForRowIndex: Yt,
|
|
655
|
+
getFullRowDataOnClick: Zt,
|
|
656
|
+
selectedRowId: Ct,
|
|
657
|
+
getSumOfNextVisibleColumnWidth: Sr,
|
|
658
|
+
onRowEdit: k,
|
|
659
|
+
inlineEditColumns: Qt,
|
|
660
|
+
tableActions: Ge,
|
|
661
|
+
dndSortableUtils: de,
|
|
662
|
+
withSortable: De,
|
|
663
|
+
withDraggable: el,
|
|
664
|
+
onCascadingRowExpand: rl,
|
|
665
|
+
getInnerRowData: nl,
|
|
665
666
|
tableHeaders: w,
|
|
666
|
-
maxLevel:
|
|
667
|
-
expandedRows:
|
|
668
|
-
setExpandedRows:
|
|
667
|
+
maxLevel: sl,
|
|
668
|
+
expandedRows: ol,
|
|
669
|
+
setExpandedRows: il,
|
|
669
670
|
showNewItem: al,
|
|
670
|
-
rawData:
|
|
671
|
-
dragConfig:
|
|
672
|
-
rowWrapper:
|
|
673
|
-
rowLinkConfig:
|
|
674
|
-
isCellClickDisabled:
|
|
671
|
+
rawData: lt,
|
|
672
|
+
dragConfig: cl,
|
|
673
|
+
rowWrapper: hl,
|
|
674
|
+
rowLinkConfig: ml,
|
|
675
|
+
isCellClickDisabled: pl,
|
|
675
676
|
asyncRowOptionsFilter: n?.asyncRowOptionsFilter,
|
|
676
|
-
handleUpdateColumnWidth:
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
677
|
+
handleUpdateColumnWidth: br,
|
|
678
|
+
isTableViewReadOnly: M,
|
|
679
|
+
multiSelectConfig: fl,
|
|
680
|
+
headerContextOptions: wl,
|
|
681
|
+
showHeaderContextOptions: Fl,
|
|
682
|
+
setShowHeaderContextOptions: Sl,
|
|
683
|
+
headerDivWidth: E,
|
|
684
|
+
showDataTypeIcon: bl,
|
|
685
|
+
rowAdditionalActions: he,
|
|
686
|
+
hoverConfig: Ht,
|
|
687
|
+
rowAdditionalActionsWidth: _e,
|
|
688
|
+
cellEditing: xl,
|
|
689
|
+
cellEditingValue: Tl,
|
|
690
|
+
openMasterDataModal: Zl,
|
|
691
|
+
closeMasterDataModal: Se,
|
|
692
|
+
selectedMasterData: $l,
|
|
693
|
+
clearSelectedMasterData: Ql,
|
|
694
|
+
allowInlineEdit: yl,
|
|
695
|
+
openCurrencyDropdown: Kl,
|
|
696
|
+
closeCurrencyDropdown: Nt,
|
|
697
|
+
currencyDropdownConfig: pt,
|
|
698
|
+
selectedCurrenciesMap: Be,
|
|
699
|
+
setCurrencyForCell: er,
|
|
700
|
+
getCurrencyForCell: tr,
|
|
699
701
|
pendingEdits: d,
|
|
700
|
-
addPendingEdit:
|
|
701
|
-
removePendingEdit:
|
|
702
|
-
getPendingEdit:
|
|
702
|
+
addPendingEdit: $e,
|
|
703
|
+
removePendingEdit: zl,
|
|
704
|
+
getPendingEdit: Ul,
|
|
703
705
|
hasPendingEdit: ql,
|
|
704
|
-
clearAllPendingEdits:
|
|
705
|
-
saveAllPendingEdits:
|
|
706
|
-
clearRowPendingEdits:
|
|
707
|
-
saveRowPendingEdits:
|
|
708
|
-
pendingEditsCount:
|
|
709
|
-
scrollToCell:
|
|
710
|
-
onFieldOperationFlow:
|
|
711
|
-
fieldOperationLoading:
|
|
712
|
-
validateAllPendingEdits:
|
|
706
|
+
clearAllPendingEdits: Tt,
|
|
707
|
+
saveAllPendingEdits: yt,
|
|
708
|
+
clearRowPendingEdits: Jl,
|
|
709
|
+
saveRowPendingEdits: Gl,
|
|
710
|
+
pendingEditsCount: $,
|
|
711
|
+
scrollToCell: H,
|
|
712
|
+
onFieldOperationFlow: Nl,
|
|
713
|
+
fieldOperationLoading: P,
|
|
714
|
+
validateAllPendingEdits: Y
|
|
713
715
|
},
|
|
714
716
|
children: [
|
|
715
|
-
|
|
717
|
+
Ne ? /* @__PURE__ */ b(
|
|
716
718
|
"div",
|
|
717
719
|
{
|
|
718
720
|
ref: je,
|
|
719
|
-
className: `mb-2 flex w-full min-w-0 gap-2 dark:bg-black-800 ${
|
|
721
|
+
className: `mb-2 flex w-full min-w-0 gap-2 dark:bg-black-800 ${E < C ? "flex-col items-stretch" : "flex-row items-center"}`,
|
|
720
722
|
children: [
|
|
721
723
|
/* @__PURE__ */ b(
|
|
722
724
|
"div",
|
|
723
725
|
{
|
|
724
|
-
className: `flex items-center gap-x-2 gap-y-1 ${
|
|
726
|
+
className: `flex items-center gap-x-2 gap-y-1 ${E < C ? "w-full flex-wrap" : ""} ${u?.content ? "min-w-0 flex-1" : "shrink-0"}`,
|
|
725
727
|
children: [
|
|
726
|
-
u?.content ? /* @__PURE__ */ s("div", { className: `min-w-0 ${
|
|
727
|
-
|
|
728
|
+
u?.content ? /* @__PURE__ */ s("div", { className: `min-w-0 ${E < C ? "w-full" : "flex-1"}`, children: u.content }) : null,
|
|
729
|
+
Oe ? /* @__PURE__ */ b("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
728
730
|
/* @__PURE__ */ b(
|
|
729
731
|
"svg",
|
|
730
732
|
{
|
|
@@ -747,8 +749,8 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
747
749
|
]
|
|
748
750
|
}
|
|
749
751
|
),
|
|
750
|
-
/* @__PURE__ */ s(
|
|
751
|
-
/* @__PURE__ */ s(
|
|
752
|
+
/* @__PURE__ */ s(ye, { size: "small", variant: "semibold", appearance: "title", children: (tt ?? m.length).toLocaleString() }),
|
|
753
|
+
/* @__PURE__ */ s(ye, { size: "small", variant: "regular", appearance: "subtitle", children: "total records" })
|
|
752
754
|
] }) : u?.preContent ? /* @__PURE__ */ s("div", { className: "flex min-w-0 shrink-0 justify-start items-center", children: u.preContent }) : null
|
|
753
755
|
]
|
|
754
756
|
}
|
|
@@ -756,17 +758,17 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
756
758
|
/* @__PURE__ */ b(
|
|
757
759
|
"div",
|
|
758
760
|
{
|
|
759
|
-
className: `flex min-w-0 items-center justify-end ${
|
|
761
|
+
className: `flex min-w-0 items-center justify-end ${E < C ? "w-full" : u?.content ? "shrink-0" : "flex-1"} ${E < Je ? "flex-col" : "flex-row"} ${u?.postContent ? "gap-2" : ""}`,
|
|
760
762
|
children: [
|
|
761
|
-
|
|
763
|
+
Oe && u?.preContent ? /* @__PURE__ */ s("div", { className: "flex w-full justify-start items-center", children: u.preContent }) : null,
|
|
762
764
|
/* @__PURE__ */ s(
|
|
763
765
|
"div",
|
|
764
766
|
{
|
|
765
|
-
className: `flex justify-end items-center min-w-0 ${
|
|
767
|
+
className: `flex justify-end items-center min-w-0 ${E < Je || E < C ? "w-full" : ""}`,
|
|
766
768
|
children: qe
|
|
767
769
|
}
|
|
768
770
|
),
|
|
769
|
-
u?.postContent ? /* @__PURE__ */ s("div", { className: `flex justify-end items-center ${
|
|
771
|
+
u?.postContent ? /* @__PURE__ */ s("div", { className: `flex justify-end items-center ${E < Je ? "w-full" : ""}`, children: u.postContent }) : null
|
|
770
772
|
]
|
|
771
773
|
}
|
|
772
774
|
)
|
|
@@ -774,54 +776,56 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
774
776
|
}
|
|
775
777
|
) : null,
|
|
776
778
|
u?.showDivider ? /* @__PURE__ */ s("div", { className: "border-b pb-2 w-full dark:bg-black-800" }) : null,
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
(
|
|
779
|
+
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: [
|
|
780
|
+
Ve && i?.renderSortItem ? i.renderSortItem({ sort: h?.columnSort, onRemoveSort: ze, onSort: h?.onSort, tableHeaders: w, data: m, disabled: M }) : null,
|
|
781
|
+
Me && Ve && h?.columnSort?.field !== "" ? /* @__PURE__ */ s("div", { className: "h-8 w-[1px] flex-shrink-0 bg-neutral-200" }) : null,
|
|
782
|
+
Me ? /* @__PURE__ */ b("div", { className: "flex gap-2 items-center", children: [
|
|
783
|
+
(nt || n?.onResetFilter) && i?.renderActiveFilters && i.renderActiveFilters({
|
|
782
784
|
filters: n?.columnFilters,
|
|
783
|
-
onRemoveFilter:
|
|
784
|
-
onClearFilter:
|
|
785
|
+
onRemoveFilter: xr,
|
|
786
|
+
onClearFilter: Tr,
|
|
785
787
|
onResetFilter: n?.onResetFilter,
|
|
786
788
|
onFilter: n?.onFilter,
|
|
787
789
|
tableHeaders: w,
|
|
788
790
|
columnFilters: n?.columnFilters,
|
|
789
|
-
modelName:
|
|
790
|
-
enableMasterDataEnumSuggestions:
|
|
791
|
+
modelName: Q,
|
|
792
|
+
enableMasterDataEnumSuggestions: K,
|
|
791
793
|
noSpacing: !0,
|
|
792
794
|
notionStyle: n?.notionStyle,
|
|
793
795
|
context: n?.context,
|
|
794
|
-
data:
|
|
795
|
-
agreementCategoryId:
|
|
796
|
-
agreementDomainId:
|
|
797
|
-
agreementId:
|
|
798
|
-
modificationId:
|
|
799
|
-
lineItemRowId:
|
|
796
|
+
data: se ?? m,
|
|
797
|
+
agreementCategoryId: ee,
|
|
798
|
+
agreementDomainId: te,
|
|
799
|
+
agreementId: le,
|
|
800
|
+
modificationId: re,
|
|
801
|
+
lineItemRowId: ne,
|
|
802
|
+
disabled: M
|
|
800
803
|
}),
|
|
801
|
-
|
|
804
|
+
i?.renderFilterButtons && i.renderFilterButtons({
|
|
802
805
|
onClearFilter: n?.onClearFilter,
|
|
803
|
-
onClose:
|
|
804
|
-
modelName:
|
|
805
|
-
enableMasterDataEnumSuggestions:
|
|
806
|
+
onClose: wr,
|
|
807
|
+
modelName: Q,
|
|
808
|
+
enableMasterDataEnumSuggestions: K,
|
|
806
809
|
defaultFilterColumn: El,
|
|
807
|
-
resetDefaultFilterColumn: () =>
|
|
810
|
+
resetDefaultFilterColumn: () => ot(null),
|
|
808
811
|
column: kl,
|
|
809
812
|
onFilter: n?.onFilter,
|
|
810
813
|
tableHeaders: w,
|
|
811
814
|
columnFilters: n?.columnFilters,
|
|
812
|
-
data:
|
|
815
|
+
data: se ?? m,
|
|
813
816
|
notionStyle: n?.notionStyle,
|
|
814
817
|
context: n?.context,
|
|
815
|
-
agreementCategoryId:
|
|
816
|
-
agreementDomainId:
|
|
817
|
-
agreementId:
|
|
818
|
-
modificationId:
|
|
819
|
-
lineItemRowId:
|
|
818
|
+
agreementCategoryId: ee,
|
|
819
|
+
agreementDomainId: te,
|
|
820
|
+
agreementId: le,
|
|
821
|
+
modificationId: re,
|
|
822
|
+
lineItemRowId: ne,
|
|
823
|
+
disabled: M
|
|
820
824
|
})
|
|
821
825
|
] }) : null
|
|
822
826
|
] }) }) : null,
|
|
823
|
-
Ae && Object.keys(Ae).length ? /* @__PURE__ */ s(
|
|
824
|
-
!
|
|
827
|
+
Ae && Object.keys(Ae).length ? /* @__PURE__ */ s(_r, { ...Ae }) : null,
|
|
828
|
+
!Ne && Oe ? /* @__PURE__ */ b("div", { className: "flex items-center gap-1.5 mb-2", children: [
|
|
825
829
|
/* @__PURE__ */ b(
|
|
826
830
|
"svg",
|
|
827
831
|
{
|
|
@@ -844,52 +848,52 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
844
848
|
]
|
|
845
849
|
}
|
|
846
850
|
),
|
|
847
|
-
/* @__PURE__ */ s(
|
|
848
|
-
/* @__PURE__ */ s(
|
|
849
|
-
] }) : !
|
|
851
|
+
/* @__PURE__ */ s(ye, { size: "small", variant: "semibold", appearance: "title", children: (tt ?? m.length).toLocaleString() }),
|
|
852
|
+
/* @__PURE__ */ s(ye, { size: "small", variant: "regular", appearance: "subtitle", children: "total records" })
|
|
853
|
+
] }) : !Ne && u?.preContent ? /* @__PURE__ */ s("div", { className: "flex items-center mb-2", children: u.preContent }) : null,
|
|
850
854
|
/* @__PURE__ */ s(
|
|
851
855
|
"div",
|
|
852
856
|
{
|
|
853
|
-
ref:
|
|
854
|
-
className: `w-full ${
|
|
857
|
+
ref: Pe,
|
|
858
|
+
className: `w-full ${ue ? "h-auto" : ce} rounded-lg relative border overflow-x-hidden`,
|
|
855
859
|
style: {
|
|
856
|
-
...
|
|
857
|
-
...
|
|
860
|
+
...ue ? { height: m?.length > 0 ? `${(m?.length + 1) * Dl + 4}px` : "350px" } : { height: lr },
|
|
861
|
+
...dl
|
|
858
862
|
},
|
|
859
|
-
children:
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
/* @__PURE__ */ s(
|
|
863
|
-
void Et(
|
|
864
|
-
/* @__PURE__ */ s(
|
|
863
|
+
children: tl ? Mt : /* @__PURE__ */ b(Lr, { sensors: ur, onDragEnd: pr, onDragStart: mr, onDragCancel: vr, collisionDetection: Vr, children: [
|
|
864
|
+
Mt,
|
|
865
|
+
G ? Pr(
|
|
866
|
+
/* @__PURE__ */ s(gr, { adjustScale: !0, dropAnimation: dr, children: /* @__PURE__ */ s("table", { ...Ot(), className: "w-full text-sm text-left text-neutral-500 dark:text-neutral-200 bg-white dark:bg-black-700 table-auto border-collapse", children: /* @__PURE__ */ b("tbody", { ...At(), className: "bg-transparent divide-y divide-neutral-200", children: [
|
|
867
|
+
void Et(G),
|
|
868
|
+
/* @__PURE__ */ s($r, { row: G, index: L?.findIndex((e) => e.id === G.original.id) }, G.original.id)
|
|
865
869
|
] }) }) }),
|
|
866
870
|
document.getElementById("full-screen-container") || document.body
|
|
867
871
|
) : null
|
|
868
872
|
] })
|
|
869
873
|
}
|
|
870
874
|
),
|
|
871
|
-
|
|
872
|
-
|
|
875
|
+
ue && i?.renderPagination ? i.renderPagination(ue) : null,
|
|
876
|
+
i?.renderMasterDataModal && i.renderMasterDataModal({
|
|
873
877
|
isVisible: !!_,
|
|
874
|
-
onSelected:
|
|
875
|
-
onClose:
|
|
878
|
+
onSelected: Cl,
|
|
879
|
+
onClose: Se,
|
|
876
880
|
masterDataColumnName: _?.masterDataColumnName,
|
|
877
881
|
masterDataFilters: _?.masterDataFilters,
|
|
878
882
|
masterDataName: _?.masterDataName,
|
|
879
883
|
masterDataId: _?.masterDataName,
|
|
880
884
|
showFilters: !0
|
|
881
885
|
}),
|
|
882
|
-
/* @__PURE__ */ s(
|
|
886
|
+
/* @__PURE__ */ s(Ur, { config: pt, onClose: Nt }),
|
|
883
887
|
/* @__PURE__ */ s(
|
|
884
|
-
|
|
888
|
+
Jr,
|
|
885
889
|
{
|
|
886
|
-
pendingEditsCount:
|
|
887
|
-
pendingEditsList:
|
|
888
|
-
rowsWithPendingEdits:
|
|
889
|
-
fieldOperationLoading:
|
|
890
|
-
onClearAll:
|
|
891
|
-
onSaveAll:
|
|
892
|
-
onScrollToCell:
|
|
890
|
+
pendingEditsCount: $,
|
|
891
|
+
pendingEditsList: Xl,
|
|
892
|
+
rowsWithPendingEdits: Yl,
|
|
893
|
+
fieldOperationLoading: P,
|
|
894
|
+
onClearAll: Tt,
|
|
895
|
+
onSaveAll: yt,
|
|
896
|
+
onScrollToCell: H
|
|
893
897
|
}
|
|
894
898
|
)
|
|
895
899
|
]
|
|
@@ -898,6 +902,6 @@ const un = Vr, Bt = "Create Column", dn = (g, N) => `button-admin-${g.toLowerCas
|
|
|
898
902
|
}
|
|
899
903
|
);
|
|
900
904
|
export {
|
|
901
|
-
|
|
905
|
+
Pn as InfiniteTable
|
|
902
906
|
};
|
|
903
907
|
//# sourceMappingURL=index.es.js.map
|