@lax-wp/design-system 0.13.32 → 0.13.33-beta.0
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/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 +12 -12
- 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 +141 -143
- 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 +2 -2
- package/dist/components/data-display/infinite-table/body/cell/LoaderCell.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 +281 -286
- package/dist/components/data-display/infinite-table/body/rows/row.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/context.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/context.d.ts +0 -1
- package/dist/components/data-display/infinite-table/context.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 +2 -2
- 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.d.ts +1 -1
- package/dist/components/data-display/infinite-table/index.es.js +208 -211
- package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/types.d.ts +0 -22
- 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 +33 -35
- 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 +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 +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/dist/index.d.ts +1 -1
- package/package.json +2 -3
|
@@ -1,102 +1,101 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { getTableRowBgClassNamesByStatus as
|
|
4
|
-
import { useTableConfig as
|
|
5
|
-
import { useDraggable as
|
|
6
|
-
import { useSortable as
|
|
7
|
-
import { CSS as
|
|
8
|
-
import { SubdirectoryArrowLeftRounded as
|
|
9
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as $i } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as Ni, useState as T, useRef as pi, useEffect as ji, useCallback as Di, useMemo as bi, createElement as ee } from "react";
|
|
3
|
+
import { getTableRowBgClassNamesByStatus as Ci } from "../../../../../constants/table.es.js";
|
|
4
|
+
import { useTableConfig as ne } from "../../../../../providers/design-system-provider/hooks.es.js";
|
|
5
|
+
import { useDraggable as le, useDroppable as te } from "@dnd-kit/core";
|
|
6
|
+
import { useSortable as oe } from "@dnd-kit/sortable";
|
|
7
|
+
import { CSS as ae } from "@dnd-kit/utilities";
|
|
8
|
+
import { SubdirectoryArrowLeftRounded as Ui } from "@mui/icons-material";
|
|
9
|
+
import de from "@mui/icons-material/AddRounded";
|
|
10
10
|
import vi from "../../../../../_virtual/index.es.js";
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { TableContext as
|
|
13
|
-
import { ActionCell as
|
|
14
|
-
import { CheckboxCell as
|
|
15
|
-
import { DataCell as
|
|
16
|
-
import { validateCellValue as
|
|
17
|
-
import { LoaderCell as
|
|
18
|
-
import { PendingEditCell as
|
|
19
|
-
import { RowActionCell as
|
|
20
|
-
import { RowOptionsCell as
|
|
21
|
-
const
|
|
11
|
+
import { createPortal as re } from "react-dom";
|
|
12
|
+
import { TableContext as Ii } from "../../context.es.js";
|
|
13
|
+
import { ActionCell as se } from "../cell/ActionCell.es.js";
|
|
14
|
+
import { CheckboxCell as ge } from "../cell/CheckboxCell.es.js";
|
|
15
|
+
import { DataCell as ce } from "../cell/DataCell.es.js";
|
|
16
|
+
import { validateCellValue as Ki } from "../../validateCell.es.js";
|
|
17
|
+
import { LoaderCell as ue } from "../cell/LoaderCell.es.js";
|
|
18
|
+
import { PendingEditCell as _e } from "../cell/PendingEditCell.es.js";
|
|
19
|
+
import { RowActionCell as me } from "../cell/RowActionCell.es.js";
|
|
20
|
+
import { RowOptionsCell as fe } from "../cell/RowOptionsCell.es.js";
|
|
21
|
+
const ze = ({ row: i, isLastRow: G, lastRow: J, highlightSubstring: Q, index: F, style: hi, level: e = 0, expandedRows: g, rows: X }) => {
|
|
22
22
|
const {
|
|
23
|
-
lastNonStickyColumnIndex:
|
|
23
|
+
lastNonStickyColumnIndex: M,
|
|
24
24
|
checkboxConfig: a,
|
|
25
|
-
onRowClick:
|
|
25
|
+
onRowClick: S,
|
|
26
26
|
rowOptions: f,
|
|
27
|
-
disableOptionsForRowIndex:
|
|
28
|
-
getSumOfNextVisibleColumnWidth:
|
|
29
|
-
onRowEdit:
|
|
30
|
-
inlineEditColumns:
|
|
31
|
-
tableActions:
|
|
32
|
-
dndSortableUtils:
|
|
33
|
-
withSortable:
|
|
27
|
+
disableOptionsForRowIndex: H = null,
|
|
28
|
+
getSumOfNextVisibleColumnWidth: Z,
|
|
29
|
+
onRowEdit: W,
|
|
30
|
+
inlineEditColumns: Ei,
|
|
31
|
+
tableActions: w,
|
|
32
|
+
dndSortableUtils: ii,
|
|
33
|
+
withSortable: c,
|
|
34
34
|
withDraggable: x,
|
|
35
|
-
getInnerRowData:
|
|
36
|
-
showNewItem:
|
|
37
|
-
rawData:
|
|
35
|
+
getInnerRowData: ei,
|
|
36
|
+
showNewItem: $,
|
|
37
|
+
rawData: O,
|
|
38
38
|
dragConfig: p,
|
|
39
|
-
getFullRowDataOnClick:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
hoverConfig: di,
|
|
39
|
+
getFullRowDataOnClick: ni,
|
|
40
|
+
rowWrapper: u,
|
|
41
|
+
isCellClickDisabled: li,
|
|
42
|
+
rowAdditionalActions: ti,
|
|
43
|
+
hoverConfig: D,
|
|
45
44
|
addPendingEdit: N,
|
|
46
|
-
removePendingEdit:
|
|
47
|
-
fieldOperationLoading:
|
|
45
|
+
removePendingEdit: oi,
|
|
46
|
+
fieldOperationLoading: B,
|
|
48
47
|
clearRowPendingEdits: L,
|
|
49
|
-
saveRowPendingEdits:
|
|
50
|
-
pendingEdits:
|
|
51
|
-
} =
|
|
52
|
-
|
|
53
|
-
}, [b,
|
|
54
|
-
|
|
55
|
-
const n =
|
|
56
|
-
if (n && !
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
const d = i.cells?.find((
|
|
48
|
+
saveRowPendingEdits: A,
|
|
49
|
+
pendingEdits: V
|
|
50
|
+
} = Ni(Ii), P = ne(), ai = !!a, { activeInlineEdit: di, setActiveInlineEdit: z } = Ni(Ii), t = di?.rowId === i.original.id ? di?.columnKey : null, _ = !!t, ri = (n) => {
|
|
51
|
+
z?.(n === null ? null : { rowId: String(i.original.id), columnKey: n });
|
|
52
|
+
}, [b, j] = T(null), [si, s] = T(null), [E, U] = T(null), [C, R] = T(!1), [k, Ri] = T(!1), o = pi(null);
|
|
53
|
+
ji(() => {
|
|
54
|
+
const n = o.current, r = t;
|
|
55
|
+
if (n && !r) {
|
|
56
|
+
const h = V?.[i.original.id]?.[n];
|
|
57
|
+
if (h) {
|
|
58
|
+
const d = i.cells?.find((m) => m.column?.key === n);
|
|
60
59
|
if (d) {
|
|
61
|
-
const
|
|
62
|
-
!
|
|
63
|
-
...
|
|
64
|
-
validationError:
|
|
60
|
+
const m = Ki(h.value, d.column);
|
|
61
|
+
!m.isValid && N && N(String(i.original.id), n, {
|
|
62
|
+
...h,
|
|
63
|
+
validationError: m.error
|
|
65
64
|
});
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
|
-
|
|
70
|
-
}, [t, i.original.id, i.cells,
|
|
71
|
-
if (
|
|
68
|
+
o.current = r ?? null;
|
|
69
|
+
}, [t, i.original.id, i.cells, V, N]), ji(() => {
|
|
70
|
+
if (O) {
|
|
72
71
|
const n = String(i?.original?.id);
|
|
73
|
-
|
|
72
|
+
U(O[n]?.[i?.cells[0].column.Header] || O[n]?.[0]);
|
|
74
73
|
}
|
|
75
|
-
}, [
|
|
76
|
-
const
|
|
74
|
+
}, [O, i?.original?.id, i?.cells]);
|
|
75
|
+
const v = oe({ id: i.original.id, data: { ...i.original }, disabled: !c }), gi = le({ id: i.original.id, data: { ...i.original }, disabled: !!c }), { listeners: ci, transform: ui, setNodeRef: _i, isDragging: K, attributes: mi, active: ki, over: I, ...qi } = c ? v : gi, { setNodeRef: Pi } = te({
|
|
77
76
|
id: `table-file-dropzone-${i?.original?.id}`,
|
|
78
77
|
data: { type: "table-file-dropzone", folderId: i?.original?.id, isFolder: i?.original?.type === "folder" }
|
|
79
|
-
}),
|
|
80
|
-
transform:
|
|
81
|
-
transition:
|
|
82
|
-
cursor:
|
|
83
|
-
opacity:
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
},
|
|
78
|
+
}), Gi = {
|
|
79
|
+
transform: ae.Transform.toString(ui),
|
|
80
|
+
transition: c ? qi.transition : void 0,
|
|
81
|
+
cursor: K ? "grabbing" : "grab",
|
|
82
|
+
opacity: K ? "0.5" : "1"
|
|
83
|
+
}, Ji = () => !ki || !I || !c ? !1 : ii?.checkOverEachItem ? ii.checkOverEachItem(ki, I) && !!I : ki.data.current?.type !== I.data.current?.type && !!I, Oi = (n) => {
|
|
84
|
+
s(n.target.value);
|
|
85
|
+
}, Qi = () => {
|
|
86
|
+
B || ri(null);
|
|
87
|
+
}, yi = pi(null), Bi = Di(
|
|
89
88
|
(n) => {
|
|
90
|
-
|
|
89
|
+
yi.current = n;
|
|
91
90
|
},
|
|
92
91
|
[]
|
|
93
|
-
),
|
|
94
|
-
|
|
95
|
-
const
|
|
92
|
+
), Li = pi(P);
|
|
93
|
+
Li.current = P;
|
|
94
|
+
const Ai = Di(() => {
|
|
96
95
|
L && L(String(i.original.id));
|
|
97
|
-
}, [L, i.original.id]),
|
|
98
|
-
if (
|
|
99
|
-
const n =
|
|
96
|
+
}, [L, i.original.id]), Vi = Di(() => {
|
|
97
|
+
if (yi.current) {
|
|
98
|
+
const n = yi.current();
|
|
100
99
|
if (!n.isValid) return;
|
|
101
100
|
t && n.value !== void 0 && N && N(String(i.original.id), t, {
|
|
102
101
|
value: n.value,
|
|
@@ -104,76 +103,75 @@ const Fe = ({ row: i, isLastRow: Z, lastRow: w, highlightSubstring: ii, index: M
|
|
|
104
103
|
meta: n.meta || void 0
|
|
105
104
|
});
|
|
106
105
|
} else if (t) {
|
|
107
|
-
const n = i.cells?.find((
|
|
106
|
+
const n = i.cells?.find((r) => r.column?.key === t);
|
|
108
107
|
if (n) {
|
|
109
|
-
const
|
|
108
|
+
const r = V?.[i.original.id]?.[t]?.value, h = r !== void 0 ? r : n.value, d = Ki(h, n.column);
|
|
110
109
|
if (!d.isValid) {
|
|
111
|
-
|
|
110
|
+
Li.current?.showNotification?.("error", d.error || "Validation failed");
|
|
112
111
|
return;
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
|
-
|
|
117
|
-
}, [
|
|
118
|
-
const
|
|
119
|
-
t && d !== void 0 && (
|
|
120
|
-
},
|
|
121
|
-
if (!
|
|
122
|
-
if (
|
|
123
|
-
if (
|
|
124
|
-
|
|
115
|
+
A && A(String(i.original.id));
|
|
116
|
+
}, [A, i.original, i.cells, t, N, V]), zi = (n, r) => {
|
|
117
|
+
const h = { ...i.original }, d = n !== void 0 ? n : si;
|
|
118
|
+
t && d !== void 0 && (h[t] = d, W && W(h, F, t, d, r), oi && oi(String(i.original.id), t)), Qi();
|
|
119
|
+
}, Ti = pi(null), Fi = (n, r, h, d) => {
|
|
120
|
+
if (!li && (n?.stopPropagation(), t !== d)) {
|
|
121
|
+
if (W) {
|
|
122
|
+
if (Ei?.includes(d))
|
|
123
|
+
ri(d), s(String(i.original[d]));
|
|
125
124
|
else {
|
|
126
|
-
const
|
|
127
|
-
|
|
125
|
+
const m = P?.getSystemMessage?.("notAllowedInlineEdit") || "Inline Edit is not allowed for this column";
|
|
126
|
+
P?.showNotification?.("error", m);
|
|
128
127
|
}
|
|
129
128
|
return;
|
|
130
129
|
}
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
else if (!
|
|
134
|
-
const
|
|
135
|
-
a.onItemCheck(
|
|
130
|
+
if (S)
|
|
131
|
+
S(r, h, i.original, X?.map((m) => m.original) || []);
|
|
132
|
+
else if (!S && a) {
|
|
133
|
+
const m = i.original.id, ie = { target: { checked: !a.checkedIds.includes(m) } };
|
|
134
|
+
a.onItemCheck(ie, m);
|
|
136
135
|
}
|
|
137
136
|
}
|
|
138
|
-
},
|
|
139
|
-
R(!0),
|
|
140
|
-
},
|
|
141
|
-
"bg-neutral-100 dark:bg-black-600": b === i?.original?.id && !
|
|
142
|
-
"bg-primary-
|
|
143
|
-
"bg-primary-50 dark:bg-black-700": !i?.original?.is_read && j && !i?.original?.__isLoading && X && !c,
|
|
137
|
+
}, Mi = async () => {
|
|
138
|
+
R(!0), ei && await ei(i?.original?.id, i?.original, !(g?.[i?.original?.id]?.isOpen ?? !1), i?.original?.__level || 0), R(!1);
|
|
139
|
+
}, Xi = bi(() => i.cells.filter((n) => n.column?.visible).map((n) => n.column?.width ?? 0).reduce((n, r) => n + r, 0), [i.cells]), Y = bi(() => p?.draggingOver && p?.draggingOver === i?.original?.id, [p, i?.original?.id]), Si = bi(() => Y ? p?.dropPosition || "inside" : null, [Y, p?.dropPosition]), q = !!(Y && Si === "inside"), y = i?.original?.__rowMetadata || i?.original?._meta, fi = b !== i?.original?.id, xi = !i?.original?.__isLoading, Hi = !!(y?.__is_new || y?.__is_added || i?.original?.is_added || E?.is_added || y?.is_added || y?.is_new), Zi = !!(i?.original?.is_deleted || y?.__is_deleted || E?.is_deleted || y?.is_deleted), wi = !!(i?.original?.is_modified || i?.original?.is_row_modified || y?.__is_modified || y?.__is_edited || E?.is_row_modified || y?.is_modified) && !Hi, Wi = vi({
|
|
140
|
+
"bg-neutral-100 dark:bg-black-600": b === i?.original?.id && !_,
|
|
141
|
+
"bg-primary-50 dark:bg-black-700": !i?.original?.is_read && $ && !i?.original?.__isLoading && fi && !_,
|
|
144
142
|
// 'bg-white dark:bg-black-700': cell.column.sticky && rowHovering !== id,
|
|
145
|
-
"bg-warning-50 dark:bg-warning-975":
|
|
146
|
-
"bg-error-50 dark:bg-error-975":
|
|
147
|
-
"bg-success-50 dark:bg-success-975":
|
|
148
|
-
"bg-primary-50 dark:bg-primary-900":
|
|
149
|
-
[
|
|
143
|
+
"bg-warning-50 dark:bg-warning-975": wi && xi && fi && !_,
|
|
144
|
+
"bg-error-50 dark:bg-error-975": Zi && xi && fi && !_,
|
|
145
|
+
"bg-success-50 dark:bg-success-975": Hi && xi && fi && !_,
|
|
146
|
+
"bg-primary-50 dark:bg-primary-900": _,
|
|
147
|
+
[Ci[i?.original?.__rowBgStatus]]: i?.original?.__rowBgStatus && !_
|
|
150
148
|
});
|
|
151
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ ee(
|
|
152
150
|
"tr",
|
|
153
151
|
{
|
|
154
152
|
...i.getRowProps(),
|
|
155
|
-
ref: x ||
|
|
153
|
+
ref: x || c ? _i : null,
|
|
156
154
|
key: i.original.id,
|
|
157
155
|
"data-row-id": i.original.id,
|
|
158
156
|
className: vi(
|
|
159
157
|
`text-neutral-900 dark:text-white cursor-pointer min-w-full relative ${a?.selectionDisabledRowIds?.includes(i?.original?.id) ? "opacity-50" : ""} border-t`,
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
K ? "z-40" : "",
|
|
159
|
+
Ji() ? "shadow-dnd-drop" : "",
|
|
162
160
|
x && I && I?.data?.current?.type === "table-file-dropzone" && I?.data?.current?.folderId === i?.original?.id && i?.original?.type === "folder" ? "bg-primary-50" : "",
|
|
163
161
|
i?.original?.isDefinedActionRow ? "bg-primary-50" : "",
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
q ? "z-50" : "",
|
|
163
|
+
Wi || "bg-white dark:bg-black-800"
|
|
166
164
|
),
|
|
167
|
-
style: { ...
|
|
168
|
-
...x ||
|
|
169
|
-
...x ||
|
|
165
|
+
style: { ...hi, ...c ? Gi : {}, width: "max-content" },
|
|
166
|
+
...x || c ? mi : {},
|
|
167
|
+
...x || c ? ci : {}
|
|
170
168
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
q && p?.dragOperation ? /* @__PURE__ */ l("div", { className: "absolute right-2 h-10 flex items-center z-20 pointer-events-none", children: /* @__PURE__ */ l("div", { className: "bg-primary-200 px-2 py-1 rounded", children: p?.dragOperation === "COPY" ? /* @__PURE__ */ l(de, { sx: { fontSize: 12 }, className: "text-primary-700" }) : /* @__PURE__ */ l(Ui, { sx: { fontSize: 12 }, className: "text-primary-700" }) }) }) : null,
|
|
170
|
+
q && !p?.dragOperation ? /* @__PURE__ */ l("div", { className: "absolute right-2 h-10 flex items-center z-20 pointer-events-none", children: /* @__PURE__ */ l(Ui, { sx: { fontSize: 16 }, className: "text-primary-500" }) }) : null,
|
|
171
|
+
Y && Si === "before" && !i?.original?.isDefinedActionRow ? /* @__PURE__ */ l("div", { className: "absolute -top-[1px] left-0 right-0 h-[2px] bg-primary-500 z-20 pointer-events-none", children: /* @__PURE__ */ l("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-2 h-2 rounded-full bg-primary-500" }) }) : null,
|
|
172
|
+
Y && Si === "after" && !i?.original?.isDefinedActionRow ? /* @__PURE__ */ l("div", { className: "absolute -bottom-[1px] left-0 right-0 h-[2px] bg-primary-500 z-20 pointer-events-none", children: /* @__PURE__ */ l("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-2 h-2 rounded-full bg-primary-500" }) }) : null,
|
|
175
173
|
i?.original?.isDefinedActionRow ? /* @__PURE__ */ l(
|
|
176
|
-
|
|
174
|
+
se,
|
|
177
175
|
{
|
|
178
176
|
cells: i.cells,
|
|
179
177
|
id: i?.original?.id,
|
|
@@ -183,209 +181,206 @@ const Fe = ({ row: i, isLastRow: Z, lastRow: w, highlightSubstring: ii, index: M
|
|
|
183
181
|
onClick: i?.original?.onClick,
|
|
184
182
|
rowHovering: b || "",
|
|
185
183
|
isRoot: i?.original?.isRoot,
|
|
186
|
-
totalWidth:
|
|
184
|
+
totalWidth: Xi,
|
|
187
185
|
row: i.original,
|
|
188
186
|
uploadCell: i?.original?.uploadCell,
|
|
189
187
|
disabled: i?.original?.disabled,
|
|
190
188
|
disabledTooltip: i?.original?.disabledTooltip
|
|
191
189
|
}
|
|
192
|
-
) :
|
|
193
|
-
|
|
190
|
+
) : u ? /* @__PURE__ */ l(u, { data: i.original, setIsDraggingFile: Ri, children: /* @__PURE__ */ l(
|
|
191
|
+
Yi,
|
|
194
192
|
{
|
|
195
|
-
isDraggingOver:
|
|
193
|
+
isDraggingOver: q,
|
|
196
194
|
level: e,
|
|
197
195
|
withDraggable: x,
|
|
198
|
-
setDroppableNodeRef:
|
|
199
|
-
isLastRow:
|
|
200
|
-
lastRow:
|
|
201
|
-
isCheckbox:
|
|
196
|
+
setDroppableNodeRef: Pi,
|
|
197
|
+
isLastRow: G,
|
|
198
|
+
lastRow: J,
|
|
199
|
+
isCheckbox: ai,
|
|
202
200
|
checkboxConfig: a,
|
|
203
201
|
row: i,
|
|
204
202
|
rowHovering: b,
|
|
205
|
-
tableActions:
|
|
206
|
-
disableOptionsForRowIndex:
|
|
207
|
-
index:
|
|
208
|
-
showNewItem:
|
|
209
|
-
currentData:
|
|
210
|
-
lastNonStickyColumnIndex:
|
|
211
|
-
getSumOfNextVisibleColumnWidth:
|
|
212
|
-
toggleRowExpand:
|
|
203
|
+
tableActions: w,
|
|
204
|
+
disableOptionsForRowIndex: H,
|
|
205
|
+
index: F,
|
|
206
|
+
showNewItem: $,
|
|
207
|
+
currentData: E,
|
|
208
|
+
lastNonStickyColumnIndex: M,
|
|
209
|
+
getSumOfNextVisibleColumnWidth: Z,
|
|
210
|
+
toggleRowExpand: Mi,
|
|
213
211
|
loadingExpand: C,
|
|
214
|
-
cellRef:
|
|
215
|
-
handleCellClick:
|
|
216
|
-
getFullRowDataOnClick:
|
|
217
|
-
handleCellValueChange:
|
|
218
|
-
handleUpdateCellData:
|
|
219
|
-
handleRowCancelEdit:
|
|
220
|
-
handleRowConfirmEdit:
|
|
221
|
-
registerValidation:
|
|
212
|
+
cellRef: Ti,
|
|
213
|
+
handleCellClick: Fi,
|
|
214
|
+
getFullRowDataOnClick: ni,
|
|
215
|
+
handleCellValueChange: Oi,
|
|
216
|
+
handleUpdateCellData: zi,
|
|
217
|
+
handleRowCancelEdit: Ai,
|
|
218
|
+
handleRowConfirmEdit: Vi,
|
|
219
|
+
registerValidation: Bi,
|
|
222
220
|
inlineEditing: t,
|
|
223
|
-
isInlineEditing:
|
|
224
|
-
setRowHovering:
|
|
225
|
-
highlightSubstring:
|
|
221
|
+
isInlineEditing: _,
|
|
222
|
+
setRowHovering: j,
|
|
223
|
+
highlightSubstring: Q,
|
|
226
224
|
rowOptions: f,
|
|
227
225
|
isDraggingFile: k,
|
|
228
|
-
rowAdditionalActions:
|
|
229
|
-
hoverConfig:
|
|
230
|
-
isSelected: Ni
|
|
226
|
+
rowAdditionalActions: ti,
|
|
227
|
+
hoverConfig: D
|
|
231
228
|
}
|
|
232
229
|
) }) : /* @__PURE__ */ l(
|
|
233
|
-
|
|
230
|
+
Yi,
|
|
234
231
|
{
|
|
235
232
|
level: e,
|
|
236
233
|
withDraggable: x,
|
|
237
|
-
setDroppableNodeRef:
|
|
238
|
-
isLastRow:
|
|
239
|
-
lastRow:
|
|
240
|
-
isCheckbox:
|
|
234
|
+
setDroppableNodeRef: Pi,
|
|
235
|
+
isLastRow: G,
|
|
236
|
+
lastRow: J,
|
|
237
|
+
isCheckbox: ai,
|
|
241
238
|
checkboxConfig: a,
|
|
242
239
|
row: i,
|
|
243
240
|
rowHovering: b,
|
|
244
|
-
tableActions:
|
|
245
|
-
disableOptionsForRowIndex:
|
|
246
|
-
index:
|
|
247
|
-
showNewItem:
|
|
248
|
-
currentData:
|
|
249
|
-
lastNonStickyColumnIndex:
|
|
250
|
-
getSumOfNextVisibleColumnWidth:
|
|
251
|
-
toggleRowExpand:
|
|
241
|
+
tableActions: w,
|
|
242
|
+
disableOptionsForRowIndex: H,
|
|
243
|
+
index: F,
|
|
244
|
+
showNewItem: $,
|
|
245
|
+
currentData: E,
|
|
246
|
+
lastNonStickyColumnIndex: M,
|
|
247
|
+
getSumOfNextVisibleColumnWidth: Z,
|
|
248
|
+
toggleRowExpand: Mi,
|
|
252
249
|
loadingExpand: C,
|
|
253
|
-
cellRef:
|
|
254
|
-
handleCellClick:
|
|
255
|
-
getFullRowDataOnClick:
|
|
256
|
-
handleCellValueChange:
|
|
257
|
-
handleUpdateCellData:
|
|
258
|
-
handleRowCancelEdit:
|
|
259
|
-
handleRowConfirmEdit:
|
|
260
|
-
registerValidation:
|
|
250
|
+
cellRef: Ti,
|
|
251
|
+
handleCellClick: Fi,
|
|
252
|
+
getFullRowDataOnClick: ni,
|
|
253
|
+
handleCellValueChange: Oi,
|
|
254
|
+
handleUpdateCellData: zi,
|
|
255
|
+
handleRowCancelEdit: Ai,
|
|
256
|
+
handleRowConfirmEdit: Vi,
|
|
257
|
+
registerValidation: Bi,
|
|
261
258
|
inlineEditing: t,
|
|
262
|
-
isInlineEditing:
|
|
263
|
-
setRowHovering:
|
|
264
|
-
highlightSubstring:
|
|
259
|
+
isInlineEditing: _,
|
|
260
|
+
setRowHovering: j,
|
|
261
|
+
highlightSubstring: Q,
|
|
265
262
|
rowOptions: f,
|
|
266
263
|
isDraggingFile: k,
|
|
267
|
-
isDraggingOver:
|
|
268
|
-
rowAdditionalActions:
|
|
269
|
-
hoverConfig:
|
|
270
|
-
isSelected: Ni
|
|
264
|
+
isDraggingOver: q,
|
|
265
|
+
rowAdditionalActions: ti,
|
|
266
|
+
hoverConfig: D
|
|
271
267
|
}
|
|
272
268
|
)
|
|
273
269
|
);
|
|
274
|
-
},
|
|
270
|
+
}, Yi = ({
|
|
275
271
|
withDraggable: i,
|
|
276
|
-
setDroppableNodeRef:
|
|
277
|
-
isLastRow:
|
|
278
|
-
lastRow:
|
|
279
|
-
isCheckbox:
|
|
280
|
-
checkboxConfig:
|
|
272
|
+
setDroppableNodeRef: G,
|
|
273
|
+
isLastRow: J,
|
|
274
|
+
lastRow: Q,
|
|
275
|
+
isCheckbox: F,
|
|
276
|
+
checkboxConfig: hi,
|
|
281
277
|
row: e,
|
|
282
278
|
rowHovering: g,
|
|
283
|
-
tableActions:
|
|
284
|
-
disableOptionsForRowIndex:
|
|
279
|
+
tableActions: X,
|
|
280
|
+
disableOptionsForRowIndex: M,
|
|
285
281
|
index: a,
|
|
286
|
-
showNewItem:
|
|
282
|
+
showNewItem: S,
|
|
287
283
|
currentData: f,
|
|
288
|
-
lastNonStickyColumnIndex:
|
|
289
|
-
getSumOfNextVisibleColumnWidth:
|
|
290
|
-
toggleRowExpand:
|
|
291
|
-
loadingExpand:
|
|
292
|
-
cellRef:
|
|
293
|
-
handleCellClick:
|
|
294
|
-
getFullRowDataOnClick:
|
|
284
|
+
lastNonStickyColumnIndex: H,
|
|
285
|
+
getSumOfNextVisibleColumnWidth: Z,
|
|
286
|
+
toggleRowExpand: W,
|
|
287
|
+
loadingExpand: Ei,
|
|
288
|
+
cellRef: w,
|
|
289
|
+
handleCellClick: ii,
|
|
290
|
+
getFullRowDataOnClick: c,
|
|
295
291
|
handleCellValueChange: x,
|
|
296
|
-
handleUpdateCellData:
|
|
297
|
-
handleRowCancelEdit:
|
|
298
|
-
handleRowConfirmEdit:
|
|
292
|
+
handleUpdateCellData: ei,
|
|
293
|
+
handleRowCancelEdit: $,
|
|
294
|
+
handleRowConfirmEdit: O,
|
|
299
295
|
registerValidation: p,
|
|
300
|
-
inlineEditing:
|
|
301
|
-
isInlineEditing:
|
|
302
|
-
setRowHovering:
|
|
303
|
-
highlightSubstring:
|
|
296
|
+
inlineEditing: ni,
|
|
297
|
+
isInlineEditing: u,
|
|
298
|
+
setRowHovering: li,
|
|
299
|
+
highlightSubstring: ti,
|
|
304
300
|
rowOptions: D,
|
|
305
|
-
level:
|
|
306
|
-
isDraggingFile:
|
|
307
|
-
isDraggingOver:
|
|
308
|
-
rowAdditionalActions:
|
|
309
|
-
hoverConfig:
|
|
310
|
-
isSelected: K
|
|
301
|
+
level: N,
|
|
302
|
+
isDraggingFile: oi,
|
|
303
|
+
isDraggingOver: B,
|
|
304
|
+
rowAdditionalActions: L,
|
|
305
|
+
hoverConfig: A
|
|
311
306
|
}) => {
|
|
312
|
-
const [
|
|
313
|
-
getPendingEdit:
|
|
314
|
-
hasPendingEdit:
|
|
315
|
-
pendingEdits:
|
|
307
|
+
const [V, P] = T(!1), {
|
|
308
|
+
getPendingEdit: ai,
|
|
309
|
+
hasPendingEdit: di,
|
|
310
|
+
pendingEdits: z,
|
|
316
311
|
tableHeaders: t,
|
|
317
|
-
pendingEditsCount:
|
|
318
|
-
scrollToCell:
|
|
319
|
-
} =
|
|
312
|
+
pendingEditsCount: _,
|
|
313
|
+
scrollToCell: ri
|
|
314
|
+
} = Ni(Ii), b = z?.[e.original.id] && Object.keys(z[e.original.id]).length > 0, j = (_ ?? 0) > 0, si = bi(() => {
|
|
320
315
|
if (Array.isArray(D)) return D;
|
|
321
316
|
if (typeof D == "function") {
|
|
322
317
|
const o = D({ ...e.original, rowIndex: a });
|
|
323
318
|
return Array.isArray(o) ? o : [];
|
|
324
319
|
}
|
|
325
320
|
return [];
|
|
326
|
-
}, [D, e.original, a]),
|
|
327
|
-
"border-l-[3px] border-l-success-400 dark:border-l-success-500": C &&
|
|
328
|
-
"border-l-[3px] border-l-error-400 dark:border-l-error-500": R &&
|
|
329
|
-
"border-l-[3px] border-l-warning-400 dark:border-l-warning-500": k &&
|
|
321
|
+
}, [D, e.original, a]), s = e?.original?.__rowMetadata || e?.original?._meta, E = g !== e?.original?.id, U = !e?.original?.__isLoading, C = !!(s?.__is_new || s?.__is_added || e?.original?.is_added || f?.is_added || s?.is_added || s?.is_new), R = !!(e?.original?.is_deleted || s?.__is_deleted || f?.is_deleted || s?.is_deleted), k = !!(e?.original?.is_modified || e?.original?.is_row_modified || s?.__is_modified || s?.__is_edited || f?.is_row_modified || s?.is_deleted) && !C, Ri = vi({
|
|
322
|
+
"border-l-[3px] border-l-success-400 dark:border-l-success-500": C && U && E && !u,
|
|
323
|
+
"border-l-[3px] border-l-error-400 dark:border-l-error-500": R && U && E && !u,
|
|
324
|
+
"border-l-[3px] border-l-warning-400 dark:border-l-warning-500": k && U && E && !u
|
|
330
325
|
});
|
|
331
326
|
return /* @__PURE__ */ l(
|
|
332
327
|
"div",
|
|
333
328
|
{
|
|
334
|
-
ref: i ?
|
|
335
|
-
className:
|
|
336
|
-
children: /* @__PURE__ */
|
|
337
|
-
|
|
338
|
-
|
|
329
|
+
ref: i ? G : null,
|
|
330
|
+
className: B ? "border-2 border-primary-400 dark:border-primary-500 rounded-sm" : "",
|
|
331
|
+
children: /* @__PURE__ */ $i("div", { className: vi("flex", Ri), ref: J ? Q : null, children: [
|
|
332
|
+
j && /* @__PURE__ */ l(
|
|
333
|
+
_e,
|
|
339
334
|
{
|
|
340
335
|
rowId: String(e.original.id),
|
|
341
336
|
rowIndex: a,
|
|
342
|
-
pendingEdits:
|
|
337
|
+
pendingEdits: z,
|
|
343
338
|
tableHeaders: t,
|
|
344
339
|
rowHasPendingEdits: !!b,
|
|
345
340
|
rowHovering: g != null ? String(g) : void 0,
|
|
346
|
-
isInlineEditing:
|
|
341
|
+
isInlineEditing: u,
|
|
347
342
|
is_read: !!e.original.is_read,
|
|
348
343
|
is_modified: k,
|
|
349
344
|
is_row_modified: !!e.original.is_row_modified,
|
|
350
345
|
is_deleted: R,
|
|
351
346
|
is_added: C,
|
|
352
347
|
is_incomplete: e?.original?.status === "Incomplete",
|
|
353
|
-
showNewItem:
|
|
354
|
-
onScrollToCell:
|
|
348
|
+
showNewItem: S,
|
|
349
|
+
onScrollToCell: ri
|
|
355
350
|
}
|
|
356
351
|
),
|
|
357
|
-
|
|
358
|
-
|
|
352
|
+
F && /* @__PURE__ */ l(
|
|
353
|
+
ge,
|
|
359
354
|
{
|
|
360
|
-
checkboxConfig:
|
|
355
|
+
checkboxConfig: hi,
|
|
361
356
|
id: String(e.original.id),
|
|
362
357
|
rowHovering: g != null ? String(g) : void 0,
|
|
363
358
|
isDisabled: !!e?.original?.__isLoading,
|
|
364
|
-
isDraggingOver:
|
|
359
|
+
isDraggingOver: B,
|
|
365
360
|
is_added: C,
|
|
366
361
|
is_deleted: R,
|
|
367
362
|
is_incomplete: e?.original?.status === "Incomplete",
|
|
368
363
|
is_modified: k,
|
|
369
364
|
is_read: !!e.original.is_read,
|
|
370
365
|
is_row_modified: !!e.original.is_row_modified,
|
|
371
|
-
showNewItem:
|
|
366
|
+
showNewItem: S,
|
|
372
367
|
currentData: f ?? {},
|
|
373
|
-
bgColor: e?.original?.__rowBgStatus ?
|
|
374
|
-
isInlineEditing:
|
|
375
|
-
hasPendingEditsColumn:
|
|
368
|
+
bgColor: e?.original?.__rowBgStatus ? Ci[e?.original?.__rowBgStatus] : void 0,
|
|
369
|
+
isInlineEditing: u,
|
|
370
|
+
hasPendingEditsColumn: j,
|
|
376
371
|
rowHasPendingEdits: b
|
|
377
372
|
}
|
|
378
373
|
),
|
|
379
|
-
|
|
380
|
-
|
|
374
|
+
X ? /* @__PURE__ */ l(
|
|
375
|
+
me,
|
|
381
376
|
{
|
|
382
|
-
tableActions:
|
|
383
|
-
disableOptionsForRowIndex:
|
|
377
|
+
tableActions: X,
|
|
378
|
+
disableOptionsForRowIndex: M ?? null,
|
|
384
379
|
id: String(e.original.id),
|
|
385
380
|
index: a,
|
|
386
381
|
is_read: !!e?.original?.is_read,
|
|
387
382
|
is_incomplete: e?.original?.status === "Incomplete",
|
|
388
|
-
showNewItem: !!
|
|
383
|
+
showNewItem: !!S,
|
|
389
384
|
is_modified: k,
|
|
390
385
|
is_row_modified: !!e?.original?.is_row_modified,
|
|
391
386
|
is_deleted: R,
|
|
@@ -394,95 +389,95 @@ const Fe = ({ row: i, isLastRow: Z, lastRow: w, highlightSubstring: ii, index: M
|
|
|
394
389
|
rowData: e.original,
|
|
395
390
|
rowHovering: g,
|
|
396
391
|
isDisabled: !!e?.original?.__isLoading,
|
|
397
|
-
bgColor:
|
|
398
|
-
isInlineEditing:
|
|
392
|
+
bgColor: oi ? "bg-primary-50" : e?.original?.__rowBgStatus ? Ci[e?.original?.__rowBgStatus] : void 0,
|
|
393
|
+
isInlineEditing: u,
|
|
399
394
|
rowHasPendingEdits: b
|
|
400
395
|
}
|
|
401
396
|
) : null,
|
|
402
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ $i(
|
|
403
398
|
"div",
|
|
404
399
|
{
|
|
405
400
|
className: "relative flex-1",
|
|
406
401
|
id: `row-${e.original.id}`,
|
|
407
|
-
onMouseEnter: () =>
|
|
408
|
-
onMouseLeave: () =>
|
|
402
|
+
onMouseEnter: () => P(!0),
|
|
403
|
+
onMouseLeave: () => P(!1),
|
|
409
404
|
children: [
|
|
410
|
-
e.cells.filter((o) => o?.column?.visible !== !1).map((o,
|
|
411
|
-
const
|
|
405
|
+
e.cells.filter((o) => o?.column?.visible !== !1).map((o, v) => {
|
|
406
|
+
const gi = v === H?.(), ci = v === (H?.() ?? -1) + 1, ui = o?.column?.sticky ? Z?.(v) ?? 0 : 0;
|
|
412
407
|
if (e.original?.__isLoading)
|
|
413
|
-
return /* @__PURE__ */ l(
|
|
414
|
-
const
|
|
408
|
+
return /* @__PURE__ */ l(ue, { cell: o, id: v, nextWidthSum: ui, isLastCell: gi, rowHovering: g, index: v, isFirstStickyCell: ci }, v);
|
|
409
|
+
const _i = ai?.(String(e.original.id), o?.column?.key || ""), K = di?.(String(e.original.id), o?.column?.key || "");
|
|
415
410
|
return /* @__PURE__ */ l(
|
|
416
|
-
|
|
411
|
+
ce,
|
|
417
412
|
{
|
|
418
413
|
cell: o,
|
|
419
414
|
rowHovering: g,
|
|
420
|
-
isFirstStickyCell:
|
|
421
|
-
level:
|
|
422
|
-
toggleRowExpand:
|
|
423
|
-
loadingExpand:
|
|
424
|
-
index:
|
|
425
|
-
cellRef:
|
|
415
|
+
isFirstStickyCell: ci,
|
|
416
|
+
level: N ?? 0,
|
|
417
|
+
toggleRowExpand: W,
|
|
418
|
+
loadingExpand: Ei,
|
|
419
|
+
index: v,
|
|
420
|
+
cellRef: w,
|
|
426
421
|
currentData: f,
|
|
427
|
-
handleCellClick: (
|
|
428
|
-
|
|
422
|
+
handleCellClick: (mi) => {
|
|
423
|
+
mi && ii(mi, c ? e.original : String(e.original.id), v, o?.column?.key || "");
|
|
429
424
|
},
|
|
430
425
|
handleCellValueChange: x,
|
|
431
|
-
handleUpdateCellData:
|
|
426
|
+
handleUpdateCellData: ei,
|
|
432
427
|
registerValidation: p,
|
|
433
428
|
id: e.original.id,
|
|
434
|
-
inlineEditing:
|
|
435
|
-
isInlineEditing:
|
|
436
|
-
isLastCell:
|
|
429
|
+
inlineEditing: ni,
|
|
430
|
+
isInlineEditing: u,
|
|
431
|
+
isLastCell: gi,
|
|
437
432
|
is_incomplete: e?.original?.status === "Incomplete",
|
|
438
433
|
is_added: C,
|
|
439
434
|
is_deleted: R,
|
|
440
435
|
is_modified: k,
|
|
441
436
|
is_read: !!e.original.is_read,
|
|
442
437
|
is_row_modified: !!e.original.is_row_modified,
|
|
443
|
-
nextWidthSum:
|
|
444
|
-
setRowHovering:
|
|
445
|
-
highlightSubstring:
|
|
446
|
-
isDraggingOver:
|
|
438
|
+
nextWidthSum: ui,
|
|
439
|
+
setRowHovering: li,
|
|
440
|
+
highlightSubstring: ti,
|
|
441
|
+
isDraggingOver: B,
|
|
447
442
|
isLoading: !!e?.original?.__isLoading,
|
|
448
|
-
pendingEdit:
|
|
449
|
-
hasPendingEdit:
|
|
450
|
-
pendingValidationError:
|
|
443
|
+
pendingEdit: _i,
|
|
444
|
+
hasPendingEdit: K,
|
|
445
|
+
pendingValidationError: _i?.validationError
|
|
451
446
|
},
|
|
452
447
|
o?.column?.key
|
|
453
448
|
);
|
|
454
449
|
}),
|
|
455
|
-
|
|
456
|
-
/* @__PURE__ */ l("div", { className: "absolute top-full left-10 z-50 bg-white dark:bg-black-800 rounded-xl", children:
|
|
450
|
+
A?.onHover && V && re(
|
|
451
|
+
/* @__PURE__ */ l("div", { className: "absolute top-full left-10 z-50 bg-white dark:bg-black-800 rounded-xl", children: A.onHover(e.original) }),
|
|
457
452
|
document.getElementById(`row-${e.original.id}`)
|
|
458
453
|
)
|
|
459
454
|
]
|
|
460
455
|
}
|
|
461
456
|
),
|
|
462
|
-
(
|
|
463
|
-
|
|
457
|
+
(si.length > 0 || !!L) && /* @__PURE__ */ l(
|
|
458
|
+
fe,
|
|
464
459
|
{
|
|
465
460
|
rowId: e.original.id,
|
|
466
|
-
rowOptions:
|
|
467
|
-
disableOption:
|
|
461
|
+
rowOptions: si,
|
|
462
|
+
disableOption: M !== null || !!e?.original?.__isLoading,
|
|
468
463
|
rowHovering: g,
|
|
469
|
-
setRowHovering:
|
|
464
|
+
setRowHovering: li,
|
|
470
465
|
is_read: !!e.original.is_read,
|
|
471
|
-
showNewItem: !!
|
|
466
|
+
showNewItem: !!S,
|
|
472
467
|
is_modified: k,
|
|
473
468
|
is_row_modified: !!e.original.is_row_modified,
|
|
474
469
|
is_incomplete: e?.original?.status === "Incomplete",
|
|
475
470
|
currentData: f ?? {},
|
|
476
471
|
is_deleted: R,
|
|
477
472
|
is_added: C,
|
|
478
|
-
isDraggingOver: !!
|
|
479
|
-
rowAdditionalActions:
|
|
473
|
+
isDraggingOver: !!B,
|
|
474
|
+
rowAdditionalActions: L,
|
|
480
475
|
rowData: e.original,
|
|
481
476
|
index: a,
|
|
482
|
-
bgColor: e?.original?.__rowBgStatus ?
|
|
483
|
-
isInlineEditing:
|
|
484
|
-
onConfirmEdit:
|
|
485
|
-
onCancelEdit:
|
|
477
|
+
bgColor: e?.original?.__rowBgStatus ? Ci[e?.original?.__rowBgStatus] : void 0,
|
|
478
|
+
isInlineEditing: u,
|
|
479
|
+
onConfirmEdit: O,
|
|
480
|
+
onCancelEdit: $,
|
|
486
481
|
rowHasPendingEdits: b
|
|
487
482
|
}
|
|
488
483
|
)
|
|
@@ -491,6 +486,6 @@ const Fe = ({ row: i, isLastRow: Z, lastRow: w, highlightSubstring: ii, index: M
|
|
|
491
486
|
);
|
|
492
487
|
};
|
|
493
488
|
export {
|
|
494
|
-
|
|
489
|
+
ze as Row
|
|
495
490
|
};
|
|
496
491
|
//# sourceMappingURL=row.es.js.map
|