ff-step-table 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/EditLabel/EditLabel.d.ts +1 -1
- package/lib/components/EditLabel/EditLabel.js +2 -2
- package/lib/components/EditLabel/EditLabel.js.map +1 -1
- package/lib/components/EditLabel/types.d.ts +1 -0
- package/lib/components/Icon/Icon.js +2 -2
- package/lib/components/Icon/Icon.js.map +1 -1
- package/lib/components/Icon/iconList.js +2 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/components/StatusButton/StatusButton.js +2 -2
- package/lib/components/StatusButton/StatusButton.js.map +1 -1
- package/lib/components/StepsLandingTable/StepLandingTable.d.ts +0 -1
- package/lib/components/StepsLandingTable/StepLandingTable.js +160 -447
- package/lib/components/StepsLandingTable/StepLandingTable.js.map +1 -1
- package/lib/components/StepsLandingTable/types.d.ts +1 -0
- package/lib/components/StepsLandingTableV2/StepLandingTable.d.ts +6 -0
- package/lib/components/StepsLandingTableV2/StepLandingTable.js +682 -0
- package/lib/components/StepsLandingTableV2/StepLandingTable.js.map +1 -0
- package/lib/components/StepsLandingTableV2/compat/legacyAdapter.d.ts +10 -0
- package/lib/components/StepsLandingTableV2/compat/legacyAdapter.js +35 -0
- package/lib/components/StepsLandingTableV2/compat/legacyAdapter.js.map +1 -0
- package/lib/components/StepsLandingTableV2/index.d.ts +4 -0
- package/lib/components/StepsLandingTableV2/index.js +5 -0
- package/lib/components/StepsLandingTableV2/index.js.map +1 -0
- package/lib/components/StepsLandingTableV2/model/blockGraph.d.ts +12 -0
- package/lib/components/StepsLandingTableV2/model/blockGraph.js +167 -0
- package/lib/components/StepsLandingTableV2/model/blockGraph.js.map +1 -0
- package/lib/components/StepsLandingTableV2/model/normalize.d.ts +10 -0
- package/lib/components/StepsLandingTableV2/model/normalize.js +166 -0
- package/lib/components/StepsLandingTableV2/model/normalize.js.map +1 -0
- package/lib/components/StepsLandingTableV2/model/rowClassification.d.ts +14 -0
- package/lib/components/StepsLandingTableV2/model/rowClassification.js +132 -0
- package/lib/components/StepsLandingTableV2/model/rowClassification.js.map +1 -0
- package/lib/components/StepsLandingTableV2/model/types.d.ts +108 -0
- package/lib/components/StepsLandingTableV2/model/types.js.map +1 -0
- package/lib/components/StepsLandingTableV2/selection/IntervalSelection.d.ts +18 -0
- package/lib/components/StepsLandingTableV2/selection/IntervalSelection.js +133 -0
- package/lib/components/StepsLandingTableV2/selection/IntervalSelection.js.map +1 -0
- package/lib/components/StepsLandingTableV2/selection/selectionEngine.d.ts +23 -0
- package/lib/components/StepsLandingTableV2/selection/selectionEngine.js +221 -0
- package/lib/components/StepsLandingTableV2/selection/selectionEngine.js.map +1 -0
- package/lib/components/StepsLandingTableV2/store/store.d.ts +104 -0
- package/lib/components/StepsLandingTableV2/store/store.js +509 -0
- package/lib/components/StepsLandingTableV2/store/store.js.map +1 -0
- package/lib/components/StepsLandingTableV2/virtual/BlockPrefixIndex.d.ts +20 -0
- package/lib/components/StepsLandingTableV2/virtual/BlockPrefixIndex.js +112 -0
- package/lib/components/StepsLandingTableV2/virtual/BlockPrefixIndex.js.map +1 -0
- package/lib/components/StepsLandingTableV2/virtual/viewportController.d.ts +11 -0
- package/lib/components/StepsLandingTableV2/virtual/viewportController.js +55 -0
- package/lib/components/StepsLandingTableV2/virtual/viewportController.js.map +1 -0
- package/lib/components/StepsLandingTableV2/visible/ChunkedSequence.d.ts +24 -0
- package/lib/components/StepsLandingTableV2/visible/ChunkedSequence.js +189 -0
- package/lib/components/StepsLandingTableV2/visible/ChunkedSequence.js.map +1 -0
- package/lib/components/StepsLandingTableV2/visible/buildVisibleSequence.d.ts +4 -0
- package/lib/components/StepsLandingTableV2/visible/buildVisibleSequence.js +124 -0
- package/lib/components/StepsLandingTableV2/visible/buildVisibleSequence.js.map +1 -0
- package/lib/components/StepsLandingTableV2/visible/visibleTypes.d.ts +50 -0
- package/lib/components/StepsLandingTableV2/visible/visibleTypes.js +2 -0
- package/lib/components/StepsLandingTableV2/visible/visibleTypes.js.map +1 -0
- package/lib/components/StorageUsageBar/StorageUsageBar.d.ts +4 -0
- package/lib/components/StorageUsageBar/StorageUsageBar.js +9 -0
- package/lib/components/StorageUsageBar/StorageUsageBar.js.map +1 -0
- package/lib/components/StorageUsageBar/index.d.ts +1 -0
- package/lib/components/StorageUsageBar/index.js +2 -0
- package/lib/components/StorageUsageBar/index.js.map +1 -0
- package/lib/components/StorageUsageBar/types.d.ts +7 -0
- package/lib/components/StorageUsageBar/types.js +2 -0
- package/lib/components/StorageUsageBar/types.js.map +1 -0
- package/lib/components/TableTreeFn/Components/TableCell.js +1 -1
- package/lib/components/TableTreeFn/Components/TableCell.js.map +1 -1
- package/lib/components/TableTreeFn/TableTreeFn.js +25 -4
- package/lib/components/TableTreeFn/TableTreeFn.js.map +1 -1
- package/lib/components/Typography/Typography.js +2 -2
- package/lib/components/Typography/Typography.js.map +1 -1
- package/lib/components/ZoomControl/ZoomControl.d.ts +5 -0
- package/lib/components/ZoomControl/ZoomControl.js +22 -0
- package/lib/components/ZoomControl/ZoomControl.js.map +1 -0
- package/lib/components/ZoomControl/index.d.ts +1 -0
- package/lib/components/ZoomControl/index.js +2 -0
- package/lib/components/ZoomControl/index.js.map +1 -0
- package/lib/components/ZoomControl/types.d.ts +8 -0
- package/lib/components/ZoomControl/types.js +2 -0
- package/lib/components/ZoomControl/types.js.map +1 -0
- package/lib/index.d.ts +25 -2
- package/lib/index.js +9 -9
- package/lib/index.js.map +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/getTreeDetails/getTreeDetails.js +70 -11
- package/lib/utils/getTreeDetails/getTreeDetails.js.map +1 -1
- package/lib/utils/handleTreeExpandAllCollapseAll/handleTreeExpandAllCollapseAll.js +1 -0
- package/lib/utils/handleTreeExpandAllCollapseAll/handleTreeExpandAllCollapseAll.js.map +1 -1
- package/package.json +2 -2
- package/lib/components/StepsLandingTable/internal/FenwickTree.d.ts +0 -9
- package/lib/components/StepsLandingTable/internal/FenwickTree.js +0 -57
- package/lib/components/StepsLandingTable/internal/FenwickTree.js.map +0 -1
- package/lib/components/StepsLandingTable/internal/VirtualSurface.d.ts +0 -4
- package/lib/components/StepsLandingTable/internal/VirtualSurface.js +0 -303
- package/lib/components/StepsLandingTable/internal/VirtualSurface.js.map +0 -1
- package/lib/components/StepsLandingTable/internal/flattenVisibleNodes.d.ts +0 -4
- package/lib/components/StepsLandingTable/internal/flattenVisibleNodes.js +0 -156
- package/lib/components/StepsLandingTable/internal/flattenVisibleNodes.js.map +0 -1
- package/lib/components/StepsLandingTable/internal/renderers.d.ts +0 -62
- package/lib/components/StepsLandingTable/internal/renderers.js +0 -109
- package/lib/components/StepsLandingTable/internal/renderers.js.map +0 -1
- package/lib/components/StepsLandingTable/internal/types.d.ts +0 -80
- package/lib/components/StepsLandingTable/internal/types.js.map +0 -1
- /package/lib/components/{StepsLandingTable/internal → StepsLandingTableV2/model}/types.js +0 -0
|
@@ -1,513 +1,226 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import React, { useCallback, useEffect, useImperativeHandle, useMemo,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useState, } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import './StepLandingTable.scss';
|
|
5
|
-
import '
|
|
5
|
+
import StepInnerTable from './Components';
|
|
6
6
|
import { gettingBlockMap, getUpdatedExpandedRows, getUpdatedPartialSelect, getUpdatedSelectedRows, hasSelectedIds, updateCheckboxStatus, } from './Components/handleStepCheckBox';
|
|
7
|
-
import
|
|
8
|
-
import { buildGridTemplates, flattenVisibleNodes, } from './internal/flattenVisibleNodes';
|
|
9
|
-
import { DataRow, InlineDetailRow, InlineEditRow, InlineNlpRow, NoDataRow, SectionHeaderRow, } from './internal/renderers';
|
|
7
|
+
import StepsTitle from './Components/StepsTitle';
|
|
10
8
|
import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
|
|
11
9
|
import Typography from '../Typography';
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
? row.data
|
|
15
|
-
: Array.isArray(row?.stepResults)
|
|
16
|
-
? row.stepResults
|
|
17
|
-
: [];
|
|
18
|
-
const collectStepIds = (rows, target = new Set()) => {
|
|
19
|
-
rows.forEach((row) => {
|
|
20
|
-
if (row?.stepId) {
|
|
21
|
-
target.add(row.stepId);
|
|
22
|
-
}
|
|
23
|
-
const children = getChildRows(row);
|
|
24
|
-
if (children.length > 0) {
|
|
25
|
-
collectStepIds(children, target);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return target;
|
|
29
|
-
};
|
|
30
|
-
const StepLandingTable = React.memo(React.forwardRef(({ tableMeta = [], tableData = [], noDataContent, height = '100%', withFixedHeader = false, headerType, handleDragStart, onDragEnd, editMode, editComponent, NlpComponent, AddNlp, handleAccordion, handleViewComponent, onSelectClick, loading = false, isViewPrivilegeMode = false, defaultExpanded = 'Steps', isHeaderRequired = true, isClientSide = false, highlightKey, onHighlightComplete, isDraggable = true, isMaximize = false, handleParentRowHover, handleParentRowHoverOut, }, ref) => {
|
|
31
|
-
const surfaceRef = useRef(null);
|
|
32
|
-
const selectedRowsRef = useRef(createEmptySelection(tableData));
|
|
33
|
-
const partialSelectionRef = useRef(new Set());
|
|
34
|
-
const hoveredRootRowRef = useRef(null);
|
|
35
|
-
const dragSessionRef = useRef(null);
|
|
36
|
-
const [viewModeId, setViewModeId] = useState(null);
|
|
10
|
+
import StepLandingTableV2 from '../StepsLandingTableV2';
|
|
11
|
+
const LegacyStepLandingTable = React.memo(React.forwardRef(({ tableMeta = [], tableData = [], noDataContent, height = '100%', withFixedHeader = false, headerType, handleDragStart, onDragEnd, editMode, editComponent, NlpComponent, AddNlp, handleAccordion, handleViewComponent, onSelectClick, loading = false, isViewPrivilegeMode = false, defaultExpanded = 'Steps', isHeaderRequired = true, isClientSide = false, highlightKey, onHighlightComplete, isDraggable = true, isMaximize = false, handleParentRowHover, handleParentRowHoverOut, }, ref) => {
|
|
37
12
|
const [ViewComponent, setViewComponent] = useState(null);
|
|
13
|
+
const [viewModeId, setViewModeId] = useState(null);
|
|
38
14
|
const [expandedRows, setExpandedRows] = useState({});
|
|
39
|
-
const [
|
|
40
|
-
const [
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
selectedRowsRef.current = selectedRows;
|
|
45
|
-
}, [selectedRows]);
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
partialSelectionRef.current = stepPartialSelect;
|
|
48
|
-
}, [stepPartialSelect]);
|
|
49
|
-
const gridTemplates = useMemo(() => buildGridTemplates(tableMeta), [tableMeta]);
|
|
50
|
-
const onAccordionClick = useCallback((title, action = 'toggle') => {
|
|
51
|
-
const section = tableData.find((row) => row.title === title);
|
|
52
|
-
if (!section || !Array.isArray(section.data) || section.data.length === 0) {
|
|
15
|
+
const [expandStepGroup, setExpandStepGroup] = useState(new Map());
|
|
16
|
+
const [isBulkEnable, setBulkEnable] = useState(false);
|
|
17
|
+
const onAccordionClick = useCallback((title, action) => {
|
|
18
|
+
const row = tableData.find((row) => row.title === title);
|
|
19
|
+
if (!row || !row.data || row.data.length === 0) {
|
|
53
20
|
return;
|
|
54
21
|
}
|
|
55
|
-
setExpandedRows((
|
|
56
|
-
...
|
|
57
|
-
[title]: action === 'open' ? true : !
|
|
22
|
+
setExpandedRows((prev) => ({
|
|
23
|
+
...prev,
|
|
24
|
+
[title]: action === 'open' ? true : !prev[title],
|
|
58
25
|
}));
|
|
59
26
|
}, [tableData]);
|
|
27
|
+
const isExpanded = useMemo(() => (title) => expandedRows[title] ?? false, [expandedRows]);
|
|
60
28
|
const toggleViewRow = useCallback((row) => {
|
|
61
|
-
setViewModeId((
|
|
29
|
+
setViewModeId((prev) => (prev === row?.stepId ? null : row?.stepId));
|
|
62
30
|
}, []);
|
|
63
31
|
const handleClick = useCallback((item) => {
|
|
64
32
|
toggleViewRow(item);
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
setViewComponent(() =>
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
toggleViewRow(null);
|
|
71
|
-
setViewComponent(null);
|
|
72
|
-
}, [handleViewComponent, toggleViewRow]);
|
|
73
|
-
const handleUpdateCheckboxState = useCallback((updatedTableData, rowData, isChecked, sectionTitle = 'Steps') => {
|
|
74
|
-
const { updateSelectRow, updateStepPartialSelect } = updateCheckboxStatus(updatedTableData, rowData, isChecked, selectedRowsRef.current, partialSelectionRef.current, sectionTitle);
|
|
75
|
-
if (updateSelectRow) {
|
|
76
|
-
setSelectedRows(updateSelectRow);
|
|
77
|
-
}
|
|
78
|
-
if (updateStepPartialSelect) {
|
|
79
|
-
setStepPartialSelect(updateStepPartialSelect);
|
|
80
|
-
}
|
|
81
|
-
}, []);
|
|
82
|
-
useEffect(() => {
|
|
83
|
-
const nextSelected = getUpdatedSelectedRows(tableData, selectedRowsRef.current);
|
|
84
|
-
let nextPartial = getUpdatedPartialSelect(tableData, partialSelectionRef.current);
|
|
85
|
-
if (hasSelectedIds(nextSelected)) {
|
|
86
|
-
const { updateSelectRow, updateStepPartialSelect } = gettingBlockMap(tableData, nextSelected, nextPartial);
|
|
87
|
-
if (updateSelectRow) {
|
|
88
|
-
setSelectedRows(updateSelectRow);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
setSelectedRows(nextSelected);
|
|
92
|
-
}
|
|
93
|
-
if (updateStepPartialSelect) {
|
|
94
|
-
nextPartial = updateStepPartialSelect;
|
|
95
|
-
}
|
|
33
|
+
const Component = handleViewComponent?.(item, toggleViewRow);
|
|
34
|
+
if (Component) {
|
|
35
|
+
setViewComponent(() => Component);
|
|
96
36
|
}
|
|
97
37
|
else {
|
|
98
|
-
|
|
38
|
+
toggleViewRow(null);
|
|
99
39
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
40
|
+
}, [handleViewComponent, toggleViewRow]);
|
|
41
|
+
const [selectedRows, setSelectedRows] = useState(Object.fromEntries(tableData.map((section) => [section.title, new Set()])));
|
|
42
|
+
const [stepPartialSelect, setStepPartialSelect] = useState(new Set());
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
setSelectedRows((pre) => getUpdatedSelectedRows(tableData, pre));
|
|
45
|
+
setStepPartialSelect((prevPartialSelect) => getUpdatedPartialSelect(tableData, prevPartialSelect));
|
|
46
|
+
setExpandedRows((prev) => getUpdatedExpandedRows(tableData, prev, defaultExpanded));
|
|
47
|
+
if (selectedRows && !hasSelectedIds(selectedRows))
|
|
48
|
+
return;
|
|
49
|
+
const { updateSelectRow, updateStepPartialSelect } = gettingBlockMap(tableData, selectedRows, stepPartialSelect);
|
|
50
|
+
if (updateStepPartialSelect)
|
|
51
|
+
setStepPartialSelect(updateStepPartialSelect);
|
|
52
|
+
if (updateSelectRow)
|
|
53
|
+
setSelectedRows(updateSelectRow);
|
|
54
|
+
}, [tableData]);
|
|
107
55
|
useEffect(() => {
|
|
108
56
|
if (hasSelectedIds(selectedRows)) {
|
|
109
|
-
|
|
57
|
+
const updatedSelection = {
|
|
110
58
|
...selectedRows,
|
|
111
59
|
partialSelected: stepPartialSelect,
|
|
112
|
-
}
|
|
113
|
-
|
|
60
|
+
};
|
|
61
|
+
onSelectClick?.(updatedSelection);
|
|
114
62
|
}
|
|
115
|
-
|
|
116
|
-
|
|
63
|
+
else {
|
|
64
|
+
onSelectClick?.(selectedRows);
|
|
65
|
+
}
|
|
66
|
+
}, [selectedRows]);
|
|
117
67
|
const handleMainCheckbox = useCallback((sectionTitle, checked) => {
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
68
|
+
const allRowIds = tableData
|
|
69
|
+
.find((section) => section.title === sectionTitle)
|
|
70
|
+
?.data.map((row) => row.stepId);
|
|
71
|
+
if (allRowIds) {
|
|
72
|
+
setSelectedRows((prev) => ({
|
|
73
|
+
...prev,
|
|
74
|
+
[sectionTitle]: checked ? new Set(allRowIds) : new Set(),
|
|
75
|
+
}));
|
|
76
|
+
if (!checked)
|
|
77
|
+
setStepPartialSelect(new Set());
|
|
126
78
|
}
|
|
127
79
|
}, [tableData]);
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
80
|
+
const handleUpdateCheckboxState = useCallback((tableData, rowData, isChecked, sectionTitle) => {
|
|
81
|
+
const { updateSelectRow, updateStepPartialSelect } = updateCheckboxStatus(tableData, rowData, isChecked, selectedRows, stepPartialSelect, sectionTitle);
|
|
82
|
+
if (updateStepPartialSelect)
|
|
83
|
+
setStepPartialSelect(updateStepPartialSelect);
|
|
84
|
+
if (updateSelectRow)
|
|
85
|
+
setSelectedRows(updateSelectRow);
|
|
86
|
+
}, [selectedRows, stepPartialSelect]);
|
|
87
|
+
const handleRowCheckbox = useCallback((sectionTitle, row, isChecked) => {
|
|
88
|
+
handleUpdateCheckboxState(tableData, row, isChecked, sectionTitle);
|
|
89
|
+
}, [tableData, handleUpdateCheckboxState]);
|
|
90
|
+
const isAllSelected = useCallback((sectionTitle, totalRows) => {
|
|
91
|
+
const isSelected = totalRows > 0 && selectedRows[sectionTitle]?.size === totalRows;
|
|
92
|
+
if (sectionTitle.includes('Script')) {
|
|
93
|
+
setBulkEnable(isSelected);
|
|
94
|
+
}
|
|
95
|
+
return isSelected;
|
|
96
|
+
}, [selectedRows]);
|
|
97
|
+
const isPartialSelected = useCallback((sectionTitle, totalRows) => {
|
|
98
|
+
const selectedCount = selectedRows[sectionTitle]?.size || 0;
|
|
99
|
+
return selectedCount > 0 && selectedCount < totalRows;
|
|
100
|
+
}, [selectedRows]);
|
|
101
|
+
const isStepGroupExpanded = useCallback((stepId) => expandStepGroup.has(stepId), [expandStepGroup]);
|
|
131
102
|
const handleStepGroupExpand = useCallback((rowData) => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const isExpanded = expandedGroups.has(rowId);
|
|
137
|
-
if (!isExpanded) {
|
|
138
|
-
if (viewModeId) {
|
|
103
|
+
if (!isStepGroupExpanded(rowData?.stepId)) {
|
|
104
|
+
if (viewModeId)
|
|
139
105
|
toggleViewRow(null);
|
|
140
|
-
setViewComponent(null);
|
|
141
|
-
}
|
|
142
106
|
handleAccordion?.(rowData);
|
|
143
107
|
}
|
|
144
108
|
if (!loading) {
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
|
|
109
|
+
setExpandStepGroup((prev) => {
|
|
110
|
+
const newMap = new Map(prev);
|
|
111
|
+
if (newMap.has(rowData?.stepId)) {
|
|
112
|
+
newMap.delete(rowData?.stepId);
|
|
149
113
|
}
|
|
150
114
|
else {
|
|
151
|
-
|
|
115
|
+
newMap.set(rowData?.stepId, true);
|
|
152
116
|
}
|
|
153
|
-
return
|
|
117
|
+
return newMap;
|
|
154
118
|
});
|
|
155
119
|
}
|
|
156
|
-
}, [
|
|
157
|
-
|
|
158
|
-
tableData,
|
|
159
|
-
addNlp: AddNlp,
|
|
160
|
-
editMode,
|
|
120
|
+
}, [
|
|
121
|
+
isStepGroupExpanded,
|
|
161
122
|
viewModeId,
|
|
162
|
-
|
|
163
|
-
|
|
123
|
+
toggleViewRow,
|
|
124
|
+
handleAccordion,
|
|
125
|
+
loading,
|
|
126
|
+
]);
|
|
127
|
+
const getAccordionTableContent = useCallback((rows) => {
|
|
128
|
+
if (rows.title === 'Steps' && !isViewPrivilegeMode) {
|
|
129
|
+
return (_jsx(StepInnerTable, { onHighlightComplete: onHighlightComplete, highlightKey: highlightKey, draggable: isDraggable, columns: tableMeta, onDragEnd: onDragEnd, data: rows.data, headerType: headerType, withCheckbox: true, editMode: editMode, editComponent: editComponent, noDataContent: noDataContent, NlpComponent: NlpComponent, AddNlp: AddNlp, tableType: rows.title, handleDragStart: () => {
|
|
130
|
+
expandStepGroup.clear();
|
|
131
|
+
handleDragStart?.();
|
|
132
|
+
}, onSelect: handleRowCheckbox, selectedRows: selectedRows, viewModeId: viewModeId, ViewComponent: ViewComponent, handleClick: handleClick, handleStepGroupExpand: handleStepGroupExpand, isStepGroupExpanded: isStepGroupExpanded, stepPartialSelect: stepPartialSelect, height: rows?.data?.length === 0
|
|
133
|
+
? '300px'
|
|
134
|
+
: rows?.data?.length <= 12
|
|
135
|
+
? 'auto'
|
|
136
|
+
: height, isClientSide: isClientSide, handleRowHover: handleParentRowHover, handleRowHoverOut: handleParentRowHoverOut }));
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
return (_jsx(StepInnerTable, { onHighlightComplete: onHighlightComplete, highlightKey: highlightKey, draggable: false, editMode: editMode, withCheckbox: !isViewPrivilegeMode, editComponent: editComponent, columns: tableMeta, data: rows.data, headerType: headerType, noDataContent: noDataContent, tableType: rows.title, onSelect: handleRowCheckbox, selectedRows: selectedRows, viewModeId: viewModeId, ViewComponent: ViewComponent, handleClick: handleClick, handleStepGroupExpand: handleStepGroupExpand, isStepGroupExpanded: isStepGroupExpanded, isViewPrivilegeMode: isViewPrivilegeMode, height: rows?.data?.length <= 15 ? 'auto' : height, isClientSide: isClientSide }));
|
|
140
|
+
}
|
|
141
|
+
}, [
|
|
164
142
|
isViewPrivilegeMode,
|
|
143
|
+
onHighlightComplete,
|
|
144
|
+
highlightKey,
|
|
165
145
|
isDraggable,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
146
|
+
tableMeta,
|
|
147
|
+
onDragEnd,
|
|
148
|
+
headerType,
|
|
169
149
|
editMode,
|
|
170
|
-
|
|
171
|
-
expandedRows,
|
|
172
|
-
isDraggable,
|
|
173
|
-
isViewPrivilegeMode,
|
|
150
|
+
editComponent,
|
|
174
151
|
noDataContent,
|
|
175
|
-
|
|
152
|
+
NlpComponent,
|
|
153
|
+
AddNlp,
|
|
154
|
+
expandStepGroup,
|
|
155
|
+
handleDragStart,
|
|
156
|
+
handleRowCheckbox,
|
|
157
|
+
selectedRows,
|
|
176
158
|
viewModeId,
|
|
177
|
-
|
|
178
|
-
const nodeByRowId = useMemo(() => {
|
|
179
|
-
const lookup = new Map();
|
|
180
|
-
visibleNodes.forEach((node) => {
|
|
181
|
-
if (node.rowId && !lookup.has(node.rowId)) {
|
|
182
|
-
lookup.set(node.rowId, node);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
return lookup;
|
|
186
|
-
}, [visibleNodes]);
|
|
187
|
-
const scrollTargetKey = useMemo(() => {
|
|
188
|
-
if (!checkEmpty(highlightKey)) {
|
|
189
|
-
return visibleNodes.find((node) => node.rowId === highlightKey)?.key ?? null;
|
|
190
|
-
}
|
|
191
|
-
if (editMode) {
|
|
192
|
-
return (visibleNodes.find((node) => node.kind === 'edit-row' && node.row?.stepId === editMode)?.key ?? null);
|
|
193
|
-
}
|
|
194
|
-
if (AddNlp && !checkEmpty(AddNlp)) {
|
|
195
|
-
return visibleNodes.find((node) => node.kind === 'nlp-row')?.key ?? null;
|
|
196
|
-
}
|
|
197
|
-
if (viewModeId) {
|
|
198
|
-
return (visibleNodes.find((node) => node.kind === 'detail-row' && node.row?.stepId === viewModeId)?.key ?? null);
|
|
199
|
-
}
|
|
200
|
-
return null;
|
|
201
|
-
}, [AddNlp, editMode, highlightKey, viewModeId, visibleNodes]);
|
|
202
|
-
const stepsRootNodeLookup = useMemo(() => {
|
|
203
|
-
const lookup = new Map();
|
|
204
|
-
visibleNodes.forEach((node) => {
|
|
205
|
-
if (node.kind === 'data-row' &&
|
|
206
|
-
node.depth === 0 &&
|
|
207
|
-
node.sectionTitle === 'Steps' &&
|
|
208
|
-
node.rowId) {
|
|
209
|
-
lookup.set(node.rowId, node);
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
return lookup;
|
|
213
|
-
}, [visibleNodes]);
|
|
214
|
-
const handleSurfaceClick = useCallback((event) => {
|
|
215
|
-
const actionTarget = event.target.closest('[data-step-action]');
|
|
216
|
-
if (!actionTarget) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
const action = actionTarget.dataset.stepAction;
|
|
220
|
-
const rowId = actionTarget.dataset.stepRowId;
|
|
221
|
-
const sectionTitle = actionTarget.dataset.stepSectionTitle;
|
|
222
|
-
switch (action) {
|
|
223
|
-
case 'toggle-section': {
|
|
224
|
-
if (sectionTitle) {
|
|
225
|
-
onAccordionClick(sectionTitle, 'toggle');
|
|
226
|
-
}
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
case 'toggle-section-checkbox': {
|
|
230
|
-
if (!sectionTitle) {
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
const totalRows = tableData.find((section) => section.title === sectionTitle)?.data?.length ?? 0;
|
|
234
|
-
const selectedCount = selectedRows[sectionTitle]?.size ?? 0;
|
|
235
|
-
const nextChecked = (selectedCount > 0 && selectedCount < totalRows) ||
|
|
236
|
-
selectedCount !== totalRows;
|
|
237
|
-
handleMainCheckbox(sectionTitle, nextChecked);
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
case 'toggle-row-checkbox': {
|
|
241
|
-
if (!rowId || !sectionTitle) {
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
244
|
-
const rowNode = nodeByRowId.get(rowId);
|
|
245
|
-
if (!rowNode?.row) {
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
const isChecked = selectedRows[sectionTitle]?.has(rowId) ?? false;
|
|
249
|
-
const nextChecked = stepPartialSelect.has(rowId) || !isChecked;
|
|
250
|
-
handleRowCheckbox(sectionTitle, rowNode.row, nextChecked);
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
case 'toggle-group': {
|
|
254
|
-
if (!rowId) {
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
const rowNode = nodeByRowId.get(rowId);
|
|
258
|
-
if (!rowNode?.row) {
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
handleStepGroupExpand({
|
|
262
|
-
...rowNode.row,
|
|
263
|
-
tableType: rowNode.tableType,
|
|
264
|
-
serialNumber: rowNode.serialNumber,
|
|
265
|
-
});
|
|
266
|
-
break;
|
|
267
|
-
}
|
|
268
|
-
case 'toggle-view': {
|
|
269
|
-
if (!rowId) {
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
const rowNode = nodeByRowId.get(rowId);
|
|
273
|
-
if (rowNode?.row) {
|
|
274
|
-
handleClick({ ...rowNode.row, tableType: rowNode.tableType });
|
|
275
|
-
}
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
default:
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
}, [
|
|
159
|
+
ViewComponent,
|
|
282
160
|
handleClick,
|
|
283
|
-
handleMainCheckbox,
|
|
284
|
-
handleRowCheckbox,
|
|
285
161
|
handleStepGroupExpand,
|
|
286
|
-
|
|
287
|
-
onAccordionClick,
|
|
288
|
-
selectedRows,
|
|
162
|
+
isStepGroupExpanded,
|
|
289
163
|
stepPartialSelect,
|
|
290
|
-
tableData,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
const session = dragSessionRef.current;
|
|
294
|
-
window.removeEventListener('pointermove', handlePointerMove);
|
|
295
|
-
window.removeEventListener('pointerup', handlePointerUp);
|
|
296
|
-
document.body.style.userSelect = '';
|
|
297
|
-
dragSessionRef.current = null;
|
|
298
|
-
setDragState(null);
|
|
299
|
-
if (!commit || !session || session.sourceIndex === session.targetIndex) {
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
onDragEnd?.(session.sourceIndex, session.targetIndex);
|
|
303
|
-
}, [onDragEnd]);
|
|
304
|
-
const handlePointerMove = useCallback((event) => {
|
|
305
|
-
const session = dragSessionRef.current;
|
|
306
|
-
const surface = surfaceRef.current;
|
|
307
|
-
if (!session || !surface) {
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
const surfaceRect = surface.getBoundingClientRect();
|
|
311
|
-
const nextOverlayTop = event.clientY - session.pointerOffsetY;
|
|
312
|
-
const autoScrollEdge = 56;
|
|
313
|
-
if (event.clientY < surfaceRect.top + autoScrollEdge) {
|
|
314
|
-
surface.scrollTop -= 18;
|
|
315
|
-
}
|
|
316
|
-
else if (event.clientY > surfaceRect.bottom - autoScrollEdge) {
|
|
317
|
-
surface.scrollTop += 18;
|
|
318
|
-
}
|
|
319
|
-
const rootRows = Array.from(surface.querySelectorAll('.ff-step-row--data[data-step-root-row="true"][data-step-section-title="Steps"]'));
|
|
320
|
-
let nextTargetIndex = session.targetIndex;
|
|
321
|
-
let nextMarkerTop = session.markerTop;
|
|
322
|
-
if (rootRows.length > 0) {
|
|
323
|
-
const firstRootRow = rootRows[0];
|
|
324
|
-
if (!firstRootRow) {
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
let closestElement = firstRootRow;
|
|
328
|
-
let smallestDistance = Number.POSITIVE_INFINITY;
|
|
329
|
-
rootRows.forEach((element) => {
|
|
330
|
-
const bounds = element.getBoundingClientRect();
|
|
331
|
-
const center = bounds.top + bounds.height / 2;
|
|
332
|
-
const distance = Math.abs(center - event.clientY);
|
|
333
|
-
if (distance < smallestDistance) {
|
|
334
|
-
smallestDistance = distance;
|
|
335
|
-
closestElement = element;
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
const nextRowId = closestElement.dataset.stepRowId;
|
|
339
|
-
const targetNode = nextRowId ? stepsRootNodeLookup.get(nextRowId) : undefined;
|
|
340
|
-
if (targetNode) {
|
|
341
|
-
nextTargetIndex = targetNode.rootIndex;
|
|
342
|
-
nextMarkerTop = closestElement.getBoundingClientRect().top;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
const nextSession = {
|
|
346
|
-
...session,
|
|
347
|
-
targetIndex: nextTargetIndex,
|
|
348
|
-
overlayTop: nextOverlayTop,
|
|
349
|
-
overlayLeft: surfaceRect.left,
|
|
350
|
-
overlayWidth: surfaceRect.width,
|
|
351
|
-
markerTop: nextMarkerTop,
|
|
352
|
-
};
|
|
353
|
-
dragSessionRef.current = nextSession;
|
|
354
|
-
setDragState(nextSession);
|
|
355
|
-
}, [stepsRootNodeLookup]);
|
|
356
|
-
const handlePointerUp = useCallback(() => {
|
|
357
|
-
stopDragging(true);
|
|
358
|
-
}, [stopDragging]);
|
|
359
|
-
const handleSurfacePointerDown = useCallback((event) => {
|
|
360
|
-
const dragHandle = event.target.closest('[data-step-action="start-drag"]');
|
|
361
|
-
if (!dragHandle || !surfaceRef.current || !onDragEnd) {
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
const rowId = dragHandle.dataset.stepRowId;
|
|
365
|
-
if (!rowId) {
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
const node = stepsRootNodeLookup.get(rowId);
|
|
369
|
-
const rowElement = dragHandle.closest('.ff-step-row--data[data-step-row-id]');
|
|
370
|
-
if (!node || !node.row || !rowElement) {
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
event.preventDefault();
|
|
374
|
-
setExpandedGroups(new Set());
|
|
375
|
-
handleDragStart?.();
|
|
376
|
-
const rowRect = rowElement.getBoundingClientRect();
|
|
377
|
-
const session = {
|
|
378
|
-
rowId,
|
|
379
|
-
sourceIndex: node.rootIndex,
|
|
380
|
-
targetIndex: node.rootIndex,
|
|
381
|
-
pointerOffsetY: event.clientY - rowRect.top,
|
|
382
|
-
overlayTop: rowRect.top,
|
|
383
|
-
overlayLeft: rowRect.left,
|
|
384
|
-
overlayWidth: rowRect.width,
|
|
385
|
-
markerTop: rowRect.top,
|
|
386
|
-
node,
|
|
387
|
-
};
|
|
388
|
-
dragSessionRef.current = session;
|
|
389
|
-
setDragState(session);
|
|
390
|
-
document.body.style.userSelect = 'none';
|
|
391
|
-
window.addEventListener('pointermove', handlePointerMove);
|
|
392
|
-
window.addEventListener('pointerup', handlePointerUp, { once: true });
|
|
393
|
-
}, [
|
|
394
|
-
handleDragStart,
|
|
395
|
-
handlePointerMove,
|
|
396
|
-
handlePointerUp,
|
|
397
|
-
onDragEnd,
|
|
398
|
-
stepsRootNodeLookup,
|
|
164
|
+
tableData.length,
|
|
165
|
+
height,
|
|
166
|
+
isClientSide,
|
|
399
167
|
]);
|
|
400
|
-
const handleSurfaceMouseOver = useCallback((event) => {
|
|
401
|
-
if (!handleParentRowHover && !handleParentRowHoverOut) {
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
const rootRow = event.target.closest('.ff-step-row--data[data-step-root-row="true"][data-step-row-id]');
|
|
405
|
-
const rowId = rootRow?.dataset.stepRowId ?? null;
|
|
406
|
-
if (rowId === hoveredRootRowRef.current) {
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
if (hoveredRootRowRef.current) {
|
|
410
|
-
handleParentRowHoverOut?.(hoveredRootRowRef.current);
|
|
411
|
-
}
|
|
412
|
-
hoveredRootRowRef.current = rowId;
|
|
413
|
-
if (rowId) {
|
|
414
|
-
handleParentRowHover?.(rowId);
|
|
415
|
-
}
|
|
416
|
-
}, [handleParentRowHover, handleParentRowHoverOut]);
|
|
417
|
-
const handleSurfaceMouseLeave = useCallback(() => {
|
|
418
|
-
if (hoveredRootRowRef.current) {
|
|
419
|
-
handleParentRowHoverOut?.(hoveredRootRowRef.current);
|
|
420
|
-
hoveredRootRowRef.current = null;
|
|
421
|
-
}
|
|
422
|
-
}, [handleParentRowHoverOut]);
|
|
423
|
-
useEffect(() => {
|
|
424
|
-
if (!checkEmpty(AddNlp)) {
|
|
425
|
-
setViewComponent(null);
|
|
426
|
-
setViewModeId(null);
|
|
427
|
-
if (AddNlp?.action === 'addLast') {
|
|
428
|
-
onAccordionClick('Steps', 'open');
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}, [AddNlp, onAccordionClick]);
|
|
432
168
|
useImperativeHandle(ref, () => ({
|
|
433
169
|
resetSelection: () => {
|
|
434
|
-
setSelectedRows(
|
|
170
|
+
setSelectedRows(Object.fromEntries(tableData.map((section) => [section.title, new Set()])));
|
|
435
171
|
setStepPartialSelect(new Set());
|
|
436
172
|
},
|
|
437
173
|
handleUpdateCheckbox: (rowData, updatedTableData) => {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
174
|
+
const parentSpecialNlpId = rowData?.parentSpecialNlpId;
|
|
175
|
+
const conditionSearchKey = rowData?.conditionSearchKey;
|
|
176
|
+
if (parentSpecialNlpId || conditionSearchKey)
|
|
177
|
+
if (updatedTableData) {
|
|
178
|
+
handleUpdateCheckboxState(updatedTableData, rowData, false);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
handleUpdateCheckboxState(tableData, rowData, false);
|
|
182
|
+
}
|
|
441
183
|
},
|
|
442
184
|
deleteRow: (rowData) => {
|
|
443
|
-
setSelectedRows((
|
|
185
|
+
setSelectedRows((prev) => Object.fromEntries(Object.entries(prev)?.map(([key, ids]) => [
|
|
444
186
|
key,
|
|
445
187
|
new Set([...ids].filter((id) => id !== rowData?.stepId)),
|
|
446
188
|
])));
|
|
447
|
-
setStepPartialSelect((previous) => {
|
|
448
|
-
const next = new Set(previous);
|
|
449
|
-
next.delete(rowData?.stepId);
|
|
450
|
-
return next;
|
|
451
|
-
});
|
|
452
189
|
},
|
|
453
190
|
resetStepGroupAccordion: () => {
|
|
454
|
-
|
|
191
|
+
setExpandStepGroup(new Map());
|
|
455
192
|
},
|
|
456
|
-
}), [
|
|
457
|
-
useEffect(() =>
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
const totalRows = node.section?.data?.length ?? 0;
|
|
464
|
-
const selectedCount = selectedRows[node.sectionTitle]?.size ?? 0;
|
|
465
|
-
return (_jsx(SectionHeaderRow, { section: node.section, columns: tableMeta, grid: gridTemplates, expanded: expandedRows[node.sectionTitle] ?? false, totalRows: totalRows, selectedCount: selectedCount, isAllSelected: totalRows > 0 && selectedCount === totalRows, isPartialSelected: selectedCount > 0 && selectedCount < totalRows, showActionCell: selectedCount > 0 &&
|
|
466
|
-
totalRows > 0 &&
|
|
467
|
-
Boolean(node.section?.actionCell), isViewPrivilegeMode: isViewPrivilegeMode, isClientSide: isClientSide, isHeaderRequired: isHeaderRequired, isMaximize: isMaximize }));
|
|
468
|
-
}
|
|
469
|
-
case 'data-row': {
|
|
470
|
-
const rowId = node.rowId ?? '';
|
|
471
|
-
return (_jsx(DataRow, { node: node, columns: tableMeta, grid: gridTemplates, row: node.row, isSelected: selectedRows[node.sectionTitle]?.has(rowId) ?? false, isPartial: stepPartialSelect.has(rowId), isViewPrivilegeMode: isViewPrivilegeMode, isClientSide: isClientSide, showDragHandle: isDraggable && node.sectionTitle === 'Steps' }));
|
|
193
|
+
}), [tableData, handleUpdateCheckboxState]);
|
|
194
|
+
useEffect(() => {
|
|
195
|
+
if (!checkEmpty(AddNlp)) {
|
|
196
|
+
setViewComponent(() => null);
|
|
197
|
+
setViewModeId(null);
|
|
198
|
+
if (AddNlp?.action === 'addLast') {
|
|
199
|
+
onAccordionClick('Steps', 'open');
|
|
472
200
|
}
|
|
473
|
-
case 'edit-row':
|
|
474
|
-
return (_jsx(InlineEditRow, { columns: tableMeta, grid: gridTemplates, editComponent: editComponent, node: node }));
|
|
475
|
-
case 'nlp-row':
|
|
476
|
-
return (_jsx(InlineNlpRow, { columns: tableMeta, grid: gridTemplates, nlpComponent: NlpComponent, node: node }));
|
|
477
|
-
case 'detail-row':
|
|
478
|
-
return (_jsx(InlineDetailRow, { columns: tableMeta, grid: gridTemplates, viewComponent: ViewComponent, node: node }));
|
|
479
|
-
case 'no-data-row':
|
|
480
|
-
default:
|
|
481
|
-
return (_jsx(NoDataRow, { columns: tableMeta, grid: gridTemplates, content: noDataContent, sectionTitle: node.sectionTitle }));
|
|
482
201
|
}
|
|
483
|
-
}, [
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
expandedRows,
|
|
488
|
-
gridTemplates,
|
|
489
|
-
isClientSide,
|
|
490
|
-
isHeaderRequired,
|
|
491
|
-
isMaximize,
|
|
492
|
-
isViewPrivilegeMode,
|
|
493
|
-
noDataContent,
|
|
494
|
-
selectedRows,
|
|
495
|
-
stepPartialSelect,
|
|
496
|
-
tableMeta,
|
|
497
|
-
]);
|
|
498
|
-
return (_jsxs("div", { className: classNames('ff-accordion-table-container-steps', {
|
|
202
|
+
}, [AddNlp]);
|
|
203
|
+
return (_jsxs("div", {
|
|
204
|
+
// style={{ height, overflowY: 'auto' }}
|
|
205
|
+
className: classNames('ff-accordion-table-container-steps', {
|
|
499
206
|
'ff-accordion-fixed-header-table': withFixedHeader,
|
|
500
|
-
}), children: [isHeaderRequired && !isClientSide && (_jsx("
|
|
207
|
+
}), children: [isHeaderRequired && !isClientSide && (_jsx("table", { cellSpacing: 0, className: classNames('ff-accordion-table', {
|
|
501
208
|
'ff-accordion-fixed-header': withFixedHeader,
|
|
502
|
-
}),
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
209
|
+
}), children: _jsx("thead", { className: "table-thead", children: _jsx("tr", { className: "ff-table-row", children: tableMeta.map((column, index) => (_jsx("th", { style: { width: column?.width }, className: classNames('ff-table-header', headerType && `ff-accordion-table--${headerType}-bg`), children: _jsx(Typography, { as: "div", fontWeight: "semi-bold", lineHeight: "18px", color: "var(--drawer-title-color)", children: column.header }) }, `${column.header}-${index}`))) }) }) })), _jsx("div", { className: "ff-accordion-table-body", style: { height: height, overflowY: 'auto' }, children: tableData?.map((row) => {
|
|
210
|
+
const { title, data, actionCell, metaData } = row;
|
|
211
|
+
const totalRows = data.length;
|
|
212
|
+
const expanded = isExpanded(title);
|
|
213
|
+
const selectedCount = selectedRows[title]?.size ?? 0;
|
|
214
|
+
const showActionCell = selectedCount > 0 && totalRows > 0 && actionCell;
|
|
215
|
+
return (_jsxs("div", { className: "column-table-accordion", children: [_jsx(StepsTitle, { isViewPrivilegeMode: isViewPrivilegeMode, onAccordionClick: onAccordionClick, showActionCell: showActionCell, handleMainCheckbox: handleMainCheckbox, isAllSelected: isAllSelected, isPartialSelected: isPartialSelected, title: title, totalRows: totalRows, expanded: expanded, metaData: metaData, actionCell: actionCell, row: row, tableMeta: tableMeta, isHeaderRequired: isHeaderRequired, isBulkEnable: isBulkEnable, isClientSide: isClientSide, isMaximize: isMaximize }), expanded && getAccordionTableContent(row)] }, title));
|
|
216
|
+
}) })] }));
|
|
217
|
+
}));
|
|
218
|
+
LegacyStepLandingTable.displayName = 'LegacyStepLandingTable';
|
|
219
|
+
const StepLandingTable = React.memo(React.forwardRef((props, ref) => {
|
|
220
|
+
if (props.useV2Engine) {
|
|
221
|
+
return _jsx(StepLandingTableV2, { ...props, ref: ref });
|
|
222
|
+
}
|
|
223
|
+
return _jsx(LegacyStepLandingTable, { ...props, ref: ref });
|
|
511
224
|
}));
|
|
512
225
|
StepLandingTable.displayName = 'StepLandingTable';
|
|
513
226
|
export default StepLandingTable;
|