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