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