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