abdul-react 0.0.9 → 0.0.12
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/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/_virtual/index9.js +2 -2
- package/lib/components/Charts/LineChart/LineChart.js +25 -25
- package/lib/components/Charts/LineChart/LineChart.js.map +1 -1
- package/lib/components/Editor/VariableDropdown.js +1 -1
- package/lib/components/Editor/VariableDropdown.js.map +1 -1
- package/lib/components/Excel/Data.d.ts +127 -0
- package/lib/components/Excel/Data.js +646 -0
- package/lib/components/Excel/Data.js.map +1 -0
- package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.d.ts +0 -1
- package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.js +3 -6
- package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +8 -20
- package/lib/components/Excel/ExcelFile/ExcelFile.js +36 -31
- package/lib/components/Excel/ExcelFile/ExcelFile.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.d.ts +1 -12
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.js +1 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js +10 -7
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js +11 -8
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +2 -12
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js +13 -17
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +19 -12
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.js +18 -12
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.js +39 -21
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +9 -6
- package/lib/components/Excel/Types.d.ts +1 -0
- package/lib/components/StepsLandingTable/Components/StepGroupAccordions.js +92 -69
- package/lib/components/StepsLandingTable/Components/StepGroupAccordions.js.map +1 -1
- package/lib/components/StepsLandingTable/Components/StepInnerTable.d.ts +1 -1
- package/lib/components/StepsLandingTable/Components/StepInnerTable.js +162 -14
- package/lib/components/StepsLandingTable/Components/StepInnerTable.js.map +1 -1
- package/lib/components/StepsLandingTable/Components/StepTableMainRow.js +18 -4
- package/lib/components/StepsLandingTable/Components/StepTableMainRow.js.map +1 -1
- package/lib/components/StepsLandingTable/Components/Types.d.ts +3 -0
- package/lib/components/StepsLandingTable/StepLandingTable.js +0 -2
- package/lib/components/StepsLandingTable/StepLandingTable.js.map +1 -1
- package/lib/index.cjs +440 -222
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +30 -27
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/ScrollToview/ScrollToView.d.ts +3 -1
- package/lib/utils/ScrollToview/ScrollToView.js +14 -9
- package/lib/utils/ScrollToview/ScrollToView.js.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -36109,34 +36109,40 @@ function formatePainter(data) {
|
|
|
36109
36109
|
}
|
|
36110
36110
|
};
|
|
36111
36111
|
}
|
|
36112
|
-
function addRowTop() {
|
|
36112
|
+
function addRowTop(row) {
|
|
36113
36113
|
return {
|
|
36114
|
-
type: ADD_ROW_TOP
|
|
36114
|
+
type: ADD_ROW_TOP,
|
|
36115
|
+
row
|
|
36115
36116
|
};
|
|
36116
36117
|
}
|
|
36117
|
-
function addRowBottom() {
|
|
36118
|
+
function addRowBottom(row) {
|
|
36118
36119
|
return {
|
|
36119
|
-
type: ADD_ROW_BOTTOM
|
|
36120
|
+
type: ADD_ROW_BOTTOM,
|
|
36121
|
+
row
|
|
36120
36122
|
};
|
|
36121
36123
|
}
|
|
36122
|
-
function addColumnLeft() {
|
|
36124
|
+
function addColumnLeft(column) {
|
|
36123
36125
|
return {
|
|
36124
|
-
type: ADD_COLUMN_LEFT
|
|
36126
|
+
type: ADD_COLUMN_LEFT,
|
|
36127
|
+
column
|
|
36125
36128
|
};
|
|
36126
36129
|
}
|
|
36127
|
-
function addColumnRight() {
|
|
36130
|
+
function addColumnRight(column) {
|
|
36128
36131
|
return {
|
|
36129
|
-
type: ADD_COLUMN_RIGHT
|
|
36132
|
+
type: ADD_COLUMN_RIGHT,
|
|
36133
|
+
column
|
|
36130
36134
|
};
|
|
36131
36135
|
}
|
|
36132
|
-
function deleteRow() {
|
|
36136
|
+
function deleteRow(row) {
|
|
36133
36137
|
return {
|
|
36134
|
-
type: DELETE_ROW
|
|
36138
|
+
type: DELETE_ROW,
|
|
36139
|
+
row
|
|
36135
36140
|
};
|
|
36136
36141
|
}
|
|
36137
|
-
function deleteColumn() {
|
|
36142
|
+
function deleteColumn(column) {
|
|
36138
36143
|
return {
|
|
36139
|
-
type: DELETE_COLUMN
|
|
36144
|
+
type: DELETE_COLUMN,
|
|
36145
|
+
column
|
|
36140
36146
|
};
|
|
36141
36147
|
}
|
|
36142
36148
|
function keyPress(event) {
|
|
@@ -38226,18 +38232,21 @@ function reducer(state, action) {
|
|
|
38226
38232
|
selectedColumn,
|
|
38227
38233
|
model
|
|
38228
38234
|
} = state;
|
|
38229
|
-
|
|
38235
|
+
const {
|
|
38236
|
+
row
|
|
38237
|
+
} = action;
|
|
38238
|
+
if (checkEmpty(row ?? selectedRow)) {
|
|
38230
38239
|
return state;
|
|
38231
38240
|
}
|
|
38232
|
-
selectedRow = selectedRow;
|
|
38241
|
+
selectedRow = row ?? selectedRow;
|
|
38233
38242
|
let updatedData = [...model.data];
|
|
38234
38243
|
const newRow = Array(updatedData[0]?.length || 0).fill(EmptyCell);
|
|
38235
|
-
updatedData.splice(selectedRow, 0, newRow);
|
|
38244
|
+
updatedData.splice(row ?? selectedRow, 0, newRow);
|
|
38236
38245
|
const updatedModel = new Model(model.createFormulaParser, updatedData);
|
|
38237
38246
|
return {
|
|
38238
38247
|
...state,
|
|
38239
38248
|
model: updatedModel,
|
|
38240
|
-
selectedRow: selectedRow,
|
|
38249
|
+
selectedRow: row ?? selectedRow,
|
|
38241
38250
|
selectedColumn: selectedColumn
|
|
38242
38251
|
};
|
|
38243
38252
|
}
|
|
@@ -38248,18 +38257,21 @@ function reducer(state, action) {
|
|
|
38248
38257
|
selectedColumn,
|
|
38249
38258
|
model
|
|
38250
38259
|
} = state;
|
|
38260
|
+
const {
|
|
38261
|
+
row
|
|
38262
|
+
} = action;
|
|
38251
38263
|
if (checkEmpty(selectedRow)) {
|
|
38252
38264
|
return state;
|
|
38253
38265
|
}
|
|
38254
|
-
selectedRow = selectedRow;
|
|
38266
|
+
selectedRow = row ?? selectedRow;
|
|
38255
38267
|
let updatedData = [...model.data];
|
|
38256
38268
|
const newRow = Array(updatedData[0]?.length || 0).fill(EmptyCell);
|
|
38257
|
-
updatedData.splice(selectedRow + 1, 0, newRow);
|
|
38269
|
+
updatedData.splice((row ?? selectedRow) + 1, 0, newRow);
|
|
38258
38270
|
const updatedModel = new Model(model.createFormulaParser, updatedData);
|
|
38259
38271
|
return {
|
|
38260
38272
|
...state,
|
|
38261
38273
|
model: updatedModel,
|
|
38262
|
-
selectedRow: selectedRow + 1,
|
|
38274
|
+
selectedRow: (row ?? selectedRow) + 1,
|
|
38263
38275
|
selectedColumn: selectedColumn
|
|
38264
38276
|
};
|
|
38265
38277
|
}
|
|
@@ -38270,20 +38282,23 @@ function reducer(state, action) {
|
|
|
38270
38282
|
selectedColumn,
|
|
38271
38283
|
model
|
|
38272
38284
|
} = state;
|
|
38273
|
-
|
|
38285
|
+
const {
|
|
38286
|
+
column
|
|
38287
|
+
} = action;
|
|
38288
|
+
if (checkEmpty(column ?? selectedColumn)) {
|
|
38274
38289
|
return state;
|
|
38275
38290
|
}
|
|
38276
|
-
selectedColumn = selectedColumn;
|
|
38291
|
+
selectedColumn = column ?? selectedColumn;
|
|
38277
38292
|
let updatedData = [...model.data];
|
|
38278
38293
|
updatedData = updatedData.map(row => {
|
|
38279
|
-
return [...row.slice(0, selectedColumn), EmptyCell, ...row.slice(selectedColumn)];
|
|
38294
|
+
return [...row.slice(0, column ?? selectedColumn), EmptyCell, ...row.slice(column ?? selectedColumn)];
|
|
38280
38295
|
});
|
|
38281
38296
|
const updatedModel = new Model(model.createFormulaParser, updatedData);
|
|
38282
38297
|
return {
|
|
38283
38298
|
...state,
|
|
38284
38299
|
model: updatedModel,
|
|
38285
38300
|
selectedRow: selectedRow,
|
|
38286
|
-
selectedColumn: selectedColumn - 1
|
|
38301
|
+
selectedColumn: (column ?? selectedColumn) - 1
|
|
38287
38302
|
};
|
|
38288
38303
|
}
|
|
38289
38304
|
case ADD_COLUMN_RIGHT:
|
|
@@ -38293,20 +38308,23 @@ function reducer(state, action) {
|
|
|
38293
38308
|
selectedColumn,
|
|
38294
38309
|
model
|
|
38295
38310
|
} = state;
|
|
38296
|
-
|
|
38311
|
+
const {
|
|
38312
|
+
column
|
|
38313
|
+
} = action;
|
|
38314
|
+
if (checkEmpty(column ?? selectedColumn)) {
|
|
38297
38315
|
return state;
|
|
38298
38316
|
}
|
|
38299
|
-
selectedColumn = selectedColumn;
|
|
38317
|
+
selectedColumn = column ?? selectedColumn;
|
|
38300
38318
|
let updatedData = [...model.data];
|
|
38301
38319
|
updatedData = updatedData.map(row => {
|
|
38302
|
-
return [...row.slice(0, selectedColumn + 1), EmptyCell, ...row.slice(selectedColumn + 1)];
|
|
38320
|
+
return [...row.slice(0, (column ?? selectedColumn) + 1), EmptyCell, ...row.slice((column ?? selectedColumn) + 1)];
|
|
38303
38321
|
});
|
|
38304
38322
|
const updatedModel = new Model(model.createFormulaParser, updatedData);
|
|
38305
38323
|
return {
|
|
38306
38324
|
...state,
|
|
38307
38325
|
model: updatedModel,
|
|
38308
38326
|
selectedRow: selectedRow,
|
|
38309
|
-
selectedColumn: selectedColumn + 1
|
|
38327
|
+
selectedColumn: (column ?? selectedColumn) + 1
|
|
38310
38328
|
};
|
|
38311
38329
|
}
|
|
38312
38330
|
case DELETE_ROW:
|
|
@@ -38316,14 +38334,17 @@ function reducer(state, action) {
|
|
|
38316
38334
|
selectedColumn,
|
|
38317
38335
|
model
|
|
38318
38336
|
} = state;
|
|
38337
|
+
const {
|
|
38338
|
+
row
|
|
38339
|
+
} = action;
|
|
38319
38340
|
if (checkEmpty(selectedRow)) {
|
|
38320
38341
|
return state;
|
|
38321
38342
|
}
|
|
38322
|
-
selectedRow = selectedRow;
|
|
38343
|
+
selectedRow = row ?? selectedRow;
|
|
38323
38344
|
let updatedData = [...model.data];
|
|
38324
|
-
updatedData.splice(selectedRow, 1);
|
|
38345
|
+
updatedData.splice(row ?? selectedRow, 1);
|
|
38325
38346
|
const updatedModel = new Model(model.createFormulaParser, updatedData);
|
|
38326
|
-
let newSelectedRow = selectedRow > 0 ? selectedRow - 1 : 0;
|
|
38347
|
+
let newSelectedRow = row ?? selectedRow > 0 ? row ?? selectedRow - 1 : 0;
|
|
38327
38348
|
const newSelectedColumn = selectedColumn !== null ? selectedColumn : 0;
|
|
38328
38349
|
const newActive = updatedData.length > 0 ? {
|
|
38329
38350
|
row: newSelectedRow,
|
|
@@ -38331,7 +38352,7 @@ function reducer(state, action) {
|
|
|
38331
38352
|
} : null;
|
|
38332
38353
|
const newSelected = updatedData.length > 0 ? new EntireRowsSelection(newSelectedRow, newSelectedRow) : new EmptySelection();
|
|
38333
38354
|
const {
|
|
38334
|
-
[selectedRow]: _,
|
|
38355
|
+
[row ?? selectedRow]: _,
|
|
38335
38356
|
...cleanedRowDimensions
|
|
38336
38357
|
} = state.rowDimensions;
|
|
38337
38358
|
return {
|
|
@@ -38351,8 +38372,11 @@ function reducer(state, action) {
|
|
|
38351
38372
|
selectedColumn,
|
|
38352
38373
|
model
|
|
38353
38374
|
} = state;
|
|
38354
|
-
|
|
38355
|
-
|
|
38375
|
+
const {
|
|
38376
|
+
column
|
|
38377
|
+
} = action;
|
|
38378
|
+
if (checkEmpty(column ?? selectedColumn)) return state;
|
|
38379
|
+
const colIndex = column ?? selectedColumn;
|
|
38356
38380
|
const updatedData = model.data.map(row => row.filter((_, cellIndex) => cellIndex !== colIndex));
|
|
38357
38381
|
const updatedModel = new Model(model.createFormulaParser, updatedData);
|
|
38358
38382
|
const newSelectedRow = selectedRow || 0;
|
|
@@ -40322,7 +40346,8 @@ const ColumnIndicator = ({
|
|
|
40322
40346
|
cell,
|
|
40323
40347
|
selectedColumn,
|
|
40324
40348
|
minimumColumnWidth,
|
|
40325
|
-
maxColLimit
|
|
40349
|
+
maxColLimit,
|
|
40350
|
+
disableDeleteOption
|
|
40326
40351
|
}) => {
|
|
40327
40352
|
const dispatch = useDispatch();
|
|
40328
40353
|
const minColumnWidth = minimumColumnWidth;
|
|
@@ -40336,7 +40361,7 @@ const ColumnIndicator = ({
|
|
|
40336
40361
|
label: 'Add Column Left',
|
|
40337
40362
|
value: 'Add Column Left',
|
|
40338
40363
|
iconName: 'plus_icon',
|
|
40339
|
-
action: addColumnLeft,
|
|
40364
|
+
action: () => addColumnLeft(column),
|
|
40340
40365
|
disableTooltip: 'Column limit reached',
|
|
40341
40366
|
visible: cell?.contextDisable?.['Add Column Left'] ?? false,
|
|
40342
40367
|
disable: columnCount >= maxColLimit
|
|
@@ -40344,19 +40369,19 @@ const ColumnIndicator = ({
|
|
|
40344
40369
|
label: 'Add Column Right',
|
|
40345
40370
|
value: 'Add Column Right',
|
|
40346
40371
|
iconName: 'plus_icon',
|
|
40347
|
-
action: addColumnRight,
|
|
40372
|
+
action: () => addColumnRight(column),
|
|
40348
40373
|
disableTooltip: 'Column limit reached',
|
|
40349
40374
|
visible: cell?.contextDisable?.['Add Column Right'] ?? false,
|
|
40350
40375
|
disable: columnCount >= maxColLimit
|
|
40351
|
-
}, {
|
|
40376
|
+
}, ...(!disableDeleteOption ? [{
|
|
40352
40377
|
label: 'Delete Column',
|
|
40353
40378
|
value: 'Delete Column',
|
|
40354
40379
|
iconName: 'delete',
|
|
40355
|
-
action: deleteColumn,
|
|
40356
|
-
disableTooltip: '
|
|
40380
|
+
action: () => deleteColumn(column),
|
|
40381
|
+
disableTooltip: '',
|
|
40357
40382
|
visible: cell?.contextDisable?.['Delete Column'] ?? false,
|
|
40358
40383
|
disable: false
|
|
40359
|
-
}];
|
|
40384
|
+
}] : [])];
|
|
40360
40385
|
}, [selectedColumn, cell, addColumnLeft, addColumnRight, deleteColumn]);
|
|
40361
40386
|
const onMouseDrag = React__namespace.useCallback((event, isRight) => {
|
|
40362
40387
|
const getTargetColumn = isRight ? column - 1 : column;
|
|
@@ -40386,6 +40411,7 @@ const ColumnIndicator = ({
|
|
|
40386
40411
|
onSelect(column, event.shiftKey);
|
|
40387
40412
|
setContextMenu({
|
|
40388
40413
|
open: columnContextEnable,
|
|
40414
|
+
contextType: 'column',
|
|
40389
40415
|
options
|
|
40390
40416
|
});
|
|
40391
40417
|
}, [column, selectedColumn, columnContextEnable, options]);
|
|
@@ -40393,6 +40419,7 @@ const ColumnIndicator = ({
|
|
|
40393
40419
|
if (selectedColumn !== undefined) {
|
|
40394
40420
|
setContextMenu(prev => ({
|
|
40395
40421
|
open: prev.open,
|
|
40422
|
+
contextType: 'column',
|
|
40396
40423
|
options
|
|
40397
40424
|
}));
|
|
40398
40425
|
}
|
|
@@ -40468,7 +40495,8 @@ const RowIndicator = ({
|
|
|
40468
40495
|
rowContextEnable,
|
|
40469
40496
|
selectedRow,
|
|
40470
40497
|
cell,
|
|
40471
|
-
maxRowLimit
|
|
40498
|
+
maxRowLimit,
|
|
40499
|
+
disableDeleteOption
|
|
40472
40500
|
}) => {
|
|
40473
40501
|
const dispatch = useDispatch();
|
|
40474
40502
|
const rowHeight = useSelector(state => state.rowDimensions[row]?.height || 32);
|
|
@@ -40481,7 +40509,7 @@ const RowIndicator = ({
|
|
|
40481
40509
|
label: 'Add Row Top',
|
|
40482
40510
|
value: 'Add Row Top',
|
|
40483
40511
|
iconName: 'plus_icon',
|
|
40484
|
-
action: addRowTop,
|
|
40512
|
+
action: () => addRowTop(row),
|
|
40485
40513
|
disableTooltip: 'Row limit reached',
|
|
40486
40514
|
visible: cell?.contextDisable?.['Add Row Top'] ?? false,
|
|
40487
40515
|
disable: rowCount >= maxRowLimit
|
|
@@ -40489,20 +40517,20 @@ const RowIndicator = ({
|
|
|
40489
40517
|
label: 'Add Row Bottom',
|
|
40490
40518
|
value: 'Add Row Bottom',
|
|
40491
40519
|
iconName: 'plus_icon',
|
|
40492
|
-
action: addRowBottom,
|
|
40520
|
+
action: () => addRowBottom(row),
|
|
40493
40521
|
disableTooltip: 'Row limit reached',
|
|
40494
40522
|
visible: cell?.contextDisable?.['Add Row Bottom'] ?? false,
|
|
40495
40523
|
disable: rowCount >= maxRowLimit
|
|
40496
|
-
}, {
|
|
40524
|
+
}, ...(!disableDeleteOption ? [{
|
|
40497
40525
|
label: 'Delete Row',
|
|
40498
40526
|
value: 'Delete Row',
|
|
40499
40527
|
iconName: 'delete',
|
|
40500
|
-
action: deleteRow,
|
|
40501
|
-
disableTooltip: '
|
|
40528
|
+
action: () => deleteRow(row),
|
|
40529
|
+
disableTooltip: '',
|
|
40502
40530
|
visible: cell?.contextDisable?.['Delete Row'] ?? false,
|
|
40503
40531
|
disable: false
|
|
40504
|
-
}];
|
|
40505
|
-
}, [selectedRow]);
|
|
40532
|
+
}] : [])];
|
|
40533
|
+
}, [selectedRow, row]);
|
|
40506
40534
|
const handleMouseDrag = React__namespace.useCallback((event, isUp) => {
|
|
40507
40535
|
const getTargetRow = isUp ? row : row - 1;
|
|
40508
40536
|
const targetRow = Math.max(getTargetRow, 0);
|
|
@@ -40531,6 +40559,7 @@ const RowIndicator = ({
|
|
|
40531
40559
|
onSelect(row, event.shiftKey);
|
|
40532
40560
|
setContextMenu({
|
|
40533
40561
|
open: rowContextEnable,
|
|
40562
|
+
contextType: 'row',
|
|
40534
40563
|
options
|
|
40535
40564
|
});
|
|
40536
40565
|
}, [row, rowContextEnable, options, selectedRow]);
|
|
@@ -40538,6 +40567,7 @@ const RowIndicator = ({
|
|
|
40538
40567
|
if (selectedRow !== undefined) {
|
|
40539
40568
|
setContextMenu(prev => ({
|
|
40540
40569
|
open: prev.open,
|
|
40570
|
+
contextType: 'row',
|
|
40541
40571
|
options
|
|
40542
40572
|
}));
|
|
40543
40573
|
}
|
|
@@ -41172,6 +41202,7 @@ const ActiveCell = props => {
|
|
|
41172
41202
|
event.preventDefault();
|
|
41173
41203
|
props.setContextMenu({
|
|
41174
41204
|
open: props.contextOption?.open ?? false,
|
|
41205
|
+
contextType: props.contextOption?.contextType ?? null,
|
|
41175
41206
|
options: props.contextOption?.options || []
|
|
41176
41207
|
});
|
|
41177
41208
|
}, [props]);
|
|
@@ -41842,7 +41873,8 @@ const Spreadsheet = props => {
|
|
|
41842
41873
|
setContextMenu,
|
|
41843
41874
|
showHider,
|
|
41844
41875
|
maxRowLimit,
|
|
41845
|
-
maxColLimit
|
|
41876
|
+
maxColLimit,
|
|
41877
|
+
disableDeleteOption
|
|
41846
41878
|
} = props;
|
|
41847
41879
|
const [sheetChange, setSheetChange] = React__namespace.useState(false);
|
|
41848
41880
|
const [maxWidth, setMaxWidth] = React__namespace.useState(0);
|
|
@@ -41936,18 +41968,6 @@ const Spreadsheet = props => {
|
|
|
41936
41968
|
}
|
|
41937
41969
|
prevActiveRef.current = state.active;
|
|
41938
41970
|
}, [onActivate, state.active]);
|
|
41939
|
-
React__namespace.useEffect(() => {
|
|
41940
|
-
// When rows are added/removed, reset visible range if needed
|
|
41941
|
-
if (prevDataPropRef.current && props.data.length !== prevDataPropRef.current.length) {
|
|
41942
|
-
if (visibleRange.end >= props.data.length) {
|
|
41943
|
-
setVisibleRange({
|
|
41944
|
-
start: Math.max(0, props.data.length - 100),
|
|
41945
|
-
end: props.data.length
|
|
41946
|
-
});
|
|
41947
|
-
}
|
|
41948
|
-
}
|
|
41949
|
-
prevDataPropRef.current = props.data;
|
|
41950
|
-
}, [props.data, visibleRange]);
|
|
41951
41971
|
const prevEvaluatedDataRef = React__namespace.useRef(state.model.evaluatedData);
|
|
41952
41972
|
React__namespace.useEffect(() => {
|
|
41953
41973
|
if (state?.model?.evaluatedData !== prevEvaluatedDataRef?.current) {
|
|
@@ -42134,6 +42154,7 @@ const Spreadsheet = props => {
|
|
|
42134
42154
|
const dynamicScroll = scrollHeight - offsetHeight;
|
|
42135
42155
|
if (size.rows < 100) {
|
|
42136
42156
|
updateVisibleRange(0, size.rows, 0);
|
|
42157
|
+
setScrollCount(0);
|
|
42137
42158
|
} else if (scrollTop === 0 && scrollCount !== 0) {
|
|
42138
42159
|
const newScroll = scrollCount - 1;
|
|
42139
42160
|
updateVisibleRange(newScroll * rowHeight, newScroll * rowHeight + visibleRows, newScroll);
|
|
@@ -42150,6 +42171,7 @@ const Spreadsheet = props => {
|
|
|
42150
42171
|
});
|
|
42151
42172
|
setContextMenu({
|
|
42152
42173
|
open: false,
|
|
42174
|
+
contextType: null,
|
|
42153
42175
|
options: [{
|
|
42154
42176
|
label: '',
|
|
42155
42177
|
value: '',
|
|
@@ -42182,7 +42204,8 @@ const Spreadsheet = props => {
|
|
|
42182
42204
|
addColumnLeft: addColumnLeft$1,
|
|
42183
42205
|
addColumnRight: addColumnRight$1,
|
|
42184
42206
|
columnContextEnable: props.columnContextEnable,
|
|
42185
|
-
maxColLimit: maxColLimit
|
|
42207
|
+
maxColLimit: maxColLimit,
|
|
42208
|
+
disableDeleteOption: disableDeleteOption
|
|
42186
42209
|
}, columnNumber) : jsxRuntime.jsx(ColumnIndicator, {
|
|
42187
42210
|
column: columnNumber,
|
|
42188
42211
|
minimumColumnWidth: minimumColumnWidth,
|
|
@@ -42191,7 +42214,8 @@ const Spreadsheet = props => {
|
|
|
42191
42214
|
addColumnLeft: addColumnLeft$1,
|
|
42192
42215
|
addColumnRight: addColumnRight$1,
|
|
42193
42216
|
columnContextEnable: props.columnContextEnable,
|
|
42194
|
-
maxColLimit: maxColLimit
|
|
42217
|
+
maxColLimit: maxColLimit,
|
|
42218
|
+
disableDeleteOption: disableDeleteOption
|
|
42195
42219
|
}, columnNumber))]
|
|
42196
42220
|
}), renderReady && scrollerFunction().map(rowNumber => jsxRuntime.jsxs(Row$1, {
|
|
42197
42221
|
row: rowNumber,
|
|
@@ -42203,7 +42227,8 @@ const Spreadsheet = props => {
|
|
|
42203
42227
|
deleteRow: deleteRow$1,
|
|
42204
42228
|
setContextMenu: props.setContextMenu,
|
|
42205
42229
|
rowContextEnable: props.rowContextEnable,
|
|
42206
|
-
maxRowLimit: maxRowLimit
|
|
42230
|
+
maxRowLimit: maxRowLimit,
|
|
42231
|
+
disableDeleteOption: disableDeleteOption
|
|
42207
42232
|
}, rowNumber) : jsxRuntime.jsx(RowIndicator$1, {
|
|
42208
42233
|
row: rowNumber,
|
|
42209
42234
|
addRowTop: addRowTop$1,
|
|
@@ -42211,7 +42236,8 @@ const Spreadsheet = props => {
|
|
|
42211
42236
|
deleteRow: deleteRow$1,
|
|
42212
42237
|
setContextMenu: props.setContextMenu,
|
|
42213
42238
|
rowContextEnable: props.rowContextEnable,
|
|
42214
|
-
maxRowLimit: maxRowLimit
|
|
42239
|
+
maxRowLimit: maxRowLimit,
|
|
42240
|
+
disableDeleteOption: disableDeleteOption
|
|
42215
42241
|
}, rowNumber), range(size.columns).map(columnNumber => jsxRuntime.jsx(Cell$1, {
|
|
42216
42242
|
row: rowNumber,
|
|
42217
42243
|
column: columnNumber,
|
|
@@ -42275,6 +42301,7 @@ const Spreadsheet = props => {
|
|
|
42275
42301
|
scrollOption && throttledHandleScroll(e);
|
|
42276
42302
|
setContextMenu({
|
|
42277
42303
|
open: false,
|
|
42304
|
+
contextType: null,
|
|
42278
42305
|
options: [{
|
|
42279
42306
|
label: '',
|
|
42280
42307
|
value: '',
|
|
@@ -42298,15 +42325,12 @@ const Spreadsheet = props => {
|
|
|
42298
42325
|
const ExcelContextMenu = ({
|
|
42299
42326
|
contextMenu,
|
|
42300
42327
|
position,
|
|
42301
|
-
editable
|
|
42302
|
-
disableDeleteOption
|
|
42328
|
+
editable
|
|
42303
42329
|
}) => {
|
|
42330
|
+
if (!contextMenu.open) return null;
|
|
42304
42331
|
const checkDelete = label => {
|
|
42305
42332
|
return label.includes('Delete');
|
|
42306
42333
|
};
|
|
42307
|
-
const isOptionDisabled = option => {
|
|
42308
|
-
return option.disable || checkDelete(option.label) && disableDeleteOption;
|
|
42309
|
-
};
|
|
42310
42334
|
return editable && jsxRuntime.jsx("div", {
|
|
42311
42335
|
onContextMenu: event => {
|
|
42312
42336
|
event.preventDefault();
|
|
@@ -42321,7 +42345,7 @@ const ExcelContextMenu = ({
|
|
|
42321
42345
|
},
|
|
42322
42346
|
children: contextMenu.options.map(option => {
|
|
42323
42347
|
if (!option.visible) {
|
|
42324
|
-
const disabled =
|
|
42348
|
+
const disabled = option.disable;
|
|
42325
42349
|
return jsxRuntime.jsx(Tooltip, {
|
|
42326
42350
|
title: disabled ? option.disableTooltip : '',
|
|
42327
42351
|
children: jsxRuntime.jsxs("div", {
|
|
@@ -42401,6 +42425,7 @@ const ExcelFile = ({
|
|
|
42401
42425
|
const [saveInfo, setSaveInfo] = React.useState('');
|
|
42402
42426
|
const [contextMenu, setContextMenu] = React.useState({
|
|
42403
42427
|
open: false,
|
|
42428
|
+
contextType: null,
|
|
42404
42429
|
options: [{
|
|
42405
42430
|
label: '',
|
|
42406
42431
|
value: '',
|
|
@@ -42713,28 +42738,34 @@ const ExcelFile = ({
|
|
|
42713
42738
|
selection?.removeAllRanges();
|
|
42714
42739
|
selection?.addRange(range);
|
|
42715
42740
|
};
|
|
42716
|
-
const handleClickOutside = React.useCallback(event => {
|
|
42717
|
-
|
|
42718
|
-
|
|
42719
|
-
|
|
42720
|
-
|
|
42721
|
-
|
|
42722
|
-
|
|
42723
|
-
|
|
42724
|
-
|
|
42725
|
-
|
|
42726
|
-
|
|
42727
|
-
|
|
42728
|
-
|
|
42729
|
-
|
|
42730
|
-
|
|
42731
|
-
|
|
42741
|
+
const handleClickOutside = React.useCallback((event, isLeftClick = false) => {
|
|
42742
|
+
const target = event.target;
|
|
42743
|
+
if (!(target.closest('.ff-excel-tab-list') || target.closest('.ff-excel-sheet')) || isLeftClick) {
|
|
42744
|
+
if (contextMenu.open) {
|
|
42745
|
+
event.preventDefault();
|
|
42746
|
+
event.stopPropagation();
|
|
42747
|
+
setContextMenu({
|
|
42748
|
+
open: false,
|
|
42749
|
+
contextType: null,
|
|
42750
|
+
options: [{
|
|
42751
|
+
label: '',
|
|
42752
|
+
value: '',
|
|
42753
|
+
iconName: '',
|
|
42754
|
+
action: () => {},
|
|
42755
|
+
disableTooltip: '',
|
|
42756
|
+
visible: false,
|
|
42757
|
+
disable: false
|
|
42758
|
+
}]
|
|
42759
|
+
});
|
|
42760
|
+
}
|
|
42732
42761
|
}
|
|
42733
42762
|
}, [contextMenu.open]);
|
|
42734
42763
|
React.useEffect(() => {
|
|
42735
|
-
document.addEventListener('
|
|
42764
|
+
document.addEventListener('contextmenu', handleClickOutside);
|
|
42765
|
+
document.addEventListener('click', e => handleClickOutside(e, true));
|
|
42736
42766
|
return () => {
|
|
42737
|
-
document.removeEventListener('
|
|
42767
|
+
document.removeEventListener('contextmenu', handleClickOutside);
|
|
42768
|
+
document.addEventListener('click', e => handleClickOutside(e, true));
|
|
42738
42769
|
};
|
|
42739
42770
|
}, [handleClickOutside]);
|
|
42740
42771
|
const contextClick = (event, name, index) => {
|
|
@@ -42743,27 +42774,24 @@ const ExcelFile = ({
|
|
|
42743
42774
|
label: 'Add Sheet',
|
|
42744
42775
|
value: 'Add Sheet',
|
|
42745
42776
|
iconName: 'plus_icon',
|
|
42746
|
-
action: () =>
|
|
42747
|
-
handleAddSheet();
|
|
42748
|
-
},
|
|
42777
|
+
action: () => handleAddSheet(),
|
|
42749
42778
|
disableTooltip: 'Sheet limit reached',
|
|
42750
42779
|
visible: false,
|
|
42751
42780
|
disable: addSheetIconDisable()
|
|
42752
|
-
}, {
|
|
42781
|
+
}, ...(!disableDeleteOption ? [{
|
|
42753
42782
|
label: 'Delete Sheet',
|
|
42754
42783
|
value: 'Delete Sheet',
|
|
42755
42784
|
iconName: 'delete',
|
|
42756
|
-
action: () =>
|
|
42757
|
-
handleDeleteSheet(name, index);
|
|
42758
|
-
},
|
|
42785
|
+
action: () => handleDeleteSheet(name, index),
|
|
42759
42786
|
disableTooltip: '',
|
|
42760
42787
|
visible: false,
|
|
42761
42788
|
disable: false
|
|
42762
|
-
}];
|
|
42789
|
+
}] : [])];
|
|
42763
42790
|
setContextMenu(prev => ({
|
|
42764
42791
|
...prev,
|
|
42765
42792
|
open: true,
|
|
42766
|
-
|
|
42793
|
+
contextType: 'sheet',
|
|
42794
|
+
options
|
|
42767
42795
|
}));
|
|
42768
42796
|
};
|
|
42769
42797
|
const setContextPosition = event => {
|
|
@@ -42796,7 +42824,7 @@ const ExcelFile = ({
|
|
|
42796
42824
|
if (event.target.classList.contains('ff-excel-tab-list')) {
|
|
42797
42825
|
setPosition({
|
|
42798
42826
|
x: sheetRefX,
|
|
42799
|
-
y: sheetRefY - 65
|
|
42827
|
+
y: sheetRefY - (disableDeleteOption ? 32 : 65)
|
|
42800
42828
|
});
|
|
42801
42829
|
return;
|
|
42802
42830
|
}
|
|
@@ -42817,6 +42845,7 @@ const ExcelFile = ({
|
|
|
42817
42845
|
if (contextMenu.open) {
|
|
42818
42846
|
setContextMenu({
|
|
42819
42847
|
open: false,
|
|
42848
|
+
contextType: null,
|
|
42820
42849
|
options: [{
|
|
42821
42850
|
label: '',
|
|
42822
42851
|
value: '',
|
|
@@ -42854,7 +42883,8 @@ const ExcelFile = ({
|
|
|
42854
42883
|
scroller: scroller,
|
|
42855
42884
|
showHider: showHider,
|
|
42856
42885
|
maxRowLimit: maxRowLimit,
|
|
42857
|
-
maxColLimit: maxColLimit
|
|
42886
|
+
maxColLimit: maxColLimit,
|
|
42887
|
+
disableDeleteOption: disableDeleteOption
|
|
42858
42888
|
})
|
|
42859
42889
|
}), sheetBar !== 'hide' && jsxRuntime.jsxs("div", {
|
|
42860
42890
|
className: "ff-excel-sheet-bar",
|
|
@@ -42916,8 +42946,7 @@ const ExcelFile = ({
|
|
|
42916
42946
|
}), contextMenu.open && jsxRuntime.jsx(ExcelContextMenu, {
|
|
42917
42947
|
contextMenu: contextMenu,
|
|
42918
42948
|
position: position,
|
|
42919
|
-
editable: editable
|
|
42920
|
-
disableDeleteOption: disableDeleteOption
|
|
42949
|
+
editable: editable
|
|
42921
42950
|
}), jsxRuntime.jsx(Toastify, {})]
|
|
42922
42951
|
})
|
|
42923
42952
|
});
|
|
@@ -46458,7 +46487,7 @@ const VariableDropdown = ({
|
|
|
46458
46487
|
if (!option) return '';
|
|
46459
46488
|
const variableId = option._id || option.id;
|
|
46460
46489
|
if (variableId?.startsWith('PARAMETER')) return 'step_group_parameter';
|
|
46461
|
-
if (option.type === 'LOCAL'
|
|
46490
|
+
if (option?.parentVariableType === 'STEPGROUP' && (option.type === 'LOCAL' || option?.type === 'STEPGROUP')) return 'step_group_variable';
|
|
46462
46491
|
if (option.type === '_startforloop') return 'for_loop_variable';
|
|
46463
46492
|
if (option.type === 'DATAPROVIDER') return 'data_provider_variable';
|
|
46464
46493
|
return VARIABLE_ICON_MAP[option.type || ''] || '';
|
|
@@ -46561,6 +46590,31 @@ const LineChart = ({
|
|
|
46561
46590
|
const xMax = width - margin * 2;
|
|
46562
46591
|
const yMax = height - margin * 2;
|
|
46563
46592
|
const [tooltipVisible, setTooltipVisible] = React.useState(false);
|
|
46593
|
+
const [hoverState, setHoverState] = React.useState({
|
|
46594
|
+
cursorX: null,
|
|
46595
|
+
hoverValues: {},
|
|
46596
|
+
dotPositions: {},
|
|
46597
|
+
tooltip: {
|
|
46598
|
+
visible: false,
|
|
46599
|
+
left: 0,
|
|
46600
|
+
top: 0
|
|
46601
|
+
},
|
|
46602
|
+
currentXValue: null
|
|
46603
|
+
});
|
|
46604
|
+
React.useEffect(() => {
|
|
46605
|
+
const handleScroll = () => {
|
|
46606
|
+
setTooltipVisible(false);
|
|
46607
|
+
setHoverState(prev => ({
|
|
46608
|
+
...prev,
|
|
46609
|
+
tooltip: {
|
|
46610
|
+
...prev.tooltip,
|
|
46611
|
+
visible: false
|
|
46612
|
+
}
|
|
46613
|
+
}));
|
|
46614
|
+
};
|
|
46615
|
+
window.addEventListener('scroll', handleScroll, true);
|
|
46616
|
+
return () => window.removeEventListener('scroll', handleScroll, true);
|
|
46617
|
+
}, []);
|
|
46564
46618
|
const hasData = data && data.length > 0 && data?.some(line => Array.isArray(line?.data) && line?.data?.length > 0);
|
|
46565
46619
|
if (!hasData) {
|
|
46566
46620
|
const defaultDates = [];
|
|
@@ -46826,31 +46880,6 @@ const LineChart = ({
|
|
|
46826
46880
|
});
|
|
46827
46881
|
}
|
|
46828
46882
|
};
|
|
46829
|
-
const [hoverState, setHoverState] = React.useState({
|
|
46830
|
-
cursorX: null,
|
|
46831
|
-
hoverValues: {},
|
|
46832
|
-
dotPositions: {},
|
|
46833
|
-
tooltip: {
|
|
46834
|
-
visible: false,
|
|
46835
|
-
left: 0,
|
|
46836
|
-
top: 0
|
|
46837
|
-
},
|
|
46838
|
-
currentXValue: null
|
|
46839
|
-
});
|
|
46840
|
-
React.useEffect(() => {
|
|
46841
|
-
const handleScroll = () => {
|
|
46842
|
-
setTooltipVisible(false);
|
|
46843
|
-
setHoverState(prev => ({
|
|
46844
|
-
...prev,
|
|
46845
|
-
tooltip: {
|
|
46846
|
-
...prev.tooltip,
|
|
46847
|
-
visible: false
|
|
46848
|
-
}
|
|
46849
|
-
}));
|
|
46850
|
-
};
|
|
46851
|
-
window.addEventListener('scroll', handleScroll, true);
|
|
46852
|
-
return () => window.removeEventListener('scroll', handleScroll, true);
|
|
46853
|
-
}, []);
|
|
46854
46883
|
const handleMouseMove = e => {
|
|
46855
46884
|
const svgRect = e.currentTarget.getBoundingClientRect();
|
|
46856
46885
|
const mouseX = e.clientX - svgRect.left - margin;
|
|
@@ -78436,15 +78465,20 @@ const appendNewRow = (tableData, AddNlp) => {
|
|
|
78436
78465
|
return updatedTreeData;
|
|
78437
78466
|
};
|
|
78438
78467
|
|
|
78439
|
-
const scrollToView = id => {
|
|
78440
|
-
if (id)
|
|
78441
|
-
|
|
78442
|
-
|
|
78443
|
-
|
|
78444
|
-
|
|
78445
|
-
|
|
78446
|
-
|
|
78447
|
-
|
|
78468
|
+
const scrollToView = (id, block = 'nearest', retries = 5) => {
|
|
78469
|
+
if (!id) return;
|
|
78470
|
+
const element = document.getElementById(id);
|
|
78471
|
+
if (element) {
|
|
78472
|
+
element.scrollIntoView({
|
|
78473
|
+
behavior: 'smooth',
|
|
78474
|
+
block
|
|
78475
|
+
});
|
|
78476
|
+
} else if (retries > 0) {
|
|
78477
|
+
setTimeout(() => {
|
|
78478
|
+
scrollToView(id, block, retries - 1);
|
|
78479
|
+
}, 300);
|
|
78480
|
+
} else {
|
|
78481
|
+
console.warn(`Element with id - "${id}" not found after multiple retries.`);
|
|
78448
78482
|
}
|
|
78449
78483
|
};
|
|
78450
78484
|
|
|
@@ -78702,84 +78736,107 @@ const StepGroupAccordions = /*#__PURE__*/React.memo(({
|
|
|
78702
78736
|
handleStepGroupExpand,
|
|
78703
78737
|
isStepGroupExpanded,
|
|
78704
78738
|
isViewPrivilegeMode,
|
|
78705
|
-
columns = []
|
|
78739
|
+
columns = [],
|
|
78740
|
+
parentIndex,
|
|
78741
|
+
updateRowHeight
|
|
78706
78742
|
}) => {
|
|
78743
|
+
const rowRefs = React.useRef([]);
|
|
78707
78744
|
const typeSet = new Set(['Group', 'PRE', 'POST', 'Script']);
|
|
78708
78745
|
const getPadding = type => typeSet.has(type) ? '6px 8px' : '7px 8px';
|
|
78709
78746
|
const indent = level + 8;
|
|
78747
|
+
// Measure and report height when expanded
|
|
78748
|
+
React.useEffect(() => {
|
|
78749
|
+
if (!updateRowHeight) return;
|
|
78750
|
+
let totalHeight = 0;
|
|
78751
|
+
rowRefs.current.forEach(ref => {
|
|
78752
|
+
if (ref) {
|
|
78753
|
+
totalHeight += ref.getBoundingClientRect().height;
|
|
78754
|
+
}
|
|
78755
|
+
});
|
|
78756
|
+
if (totalHeight > 0) {
|
|
78757
|
+
updateRowHeight(parentIndex ?? 0, totalHeight);
|
|
78758
|
+
}
|
|
78759
|
+
}, [data, updateRowHeight, parentIndex, isStepGroupExpanded]);
|
|
78710
78760
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
78711
|
-
children: data?.map(item =>
|
|
78712
|
-
|
|
78713
|
-
|
|
78714
|
-
|
|
78715
|
-
|
|
78716
|
-
|
|
78717
|
-
|
|
78718
|
-
|
|
78719
|
-
|
|
78720
|
-
|
|
78721
|
-
children: ViewComponent && jsxRuntime.jsx(ViewComponent, {})
|
|
78722
|
-
})
|
|
78723
|
-
})
|
|
78724
|
-
}) : jsxRuntime.jsx("tr", {
|
|
78725
|
-
children: columns.map((col, idx) => jsxRuntime.jsx("td", {
|
|
78726
|
-
style: {
|
|
78727
|
-
maxWidth: col.width,
|
|
78728
|
-
padding: getPadding(item.type)
|
|
78729
|
-
},
|
|
78730
|
-
children: jsxRuntime.jsxs(Typography, {
|
|
78731
|
-
as: "div",
|
|
78732
|
-
className: "ff-data-checkbox-container",
|
|
78733
|
-
children: [jsxRuntime.jsxs("div", {
|
|
78734
|
-
className: "ff-data-checkbox-container-content",
|
|
78761
|
+
children: data?.map((item, itemIndex) => {
|
|
78762
|
+
const absoluteIndex = parentIndex ?? 0 + itemIndex + 1;
|
|
78763
|
+
return jsxRuntime.jsxs(React.Fragment, {
|
|
78764
|
+
children: [viewModeId === item?.stepId ? jsxRuntime.jsx("tr", {
|
|
78765
|
+
ref: el => rowRefs.current[itemIndex] = el,
|
|
78766
|
+
className: "steps-edit-row",
|
|
78767
|
+
id: "getInFocus",
|
|
78768
|
+
children: jsxRuntime.jsx("td", {
|
|
78769
|
+
colSpan: columnCount,
|
|
78770
|
+
children: jsxRuntime.jsx("div", {
|
|
78735
78771
|
style: {
|
|
78736
|
-
marginLeft:
|
|
78772
|
+
marginLeft: `${indent}px`
|
|
78737
78773
|
},
|
|
78738
|
-
|
|
78739
|
-
|
|
78740
|
-
|
|
78741
|
-
|
|
78742
|
-
|
|
78743
|
-
|
|
78744
|
-
|
|
78745
|
-
|
|
78774
|
+
children: ViewComponent && jsxRuntime.jsx(ViewComponent, {})
|
|
78775
|
+
})
|
|
78776
|
+
})
|
|
78777
|
+
}) : jsxRuntime.jsx("tr", {
|
|
78778
|
+
ref: el => rowRefs.current[itemIndex] = el,
|
|
78779
|
+
children: columns.map((col, idx) => jsxRuntime.jsx("td", {
|
|
78780
|
+
style: {
|
|
78781
|
+
maxWidth: col.width,
|
|
78782
|
+
padding: getPadding(item.type)
|
|
78783
|
+
},
|
|
78784
|
+
children: jsxRuntime.jsxs(Typography, {
|
|
78785
|
+
as: "div",
|
|
78786
|
+
className: "ff-data-checkbox-container",
|
|
78787
|
+
children: [jsxRuntime.jsxs("div", {
|
|
78788
|
+
className: "ff-data-checkbox-container-content",
|
|
78746
78789
|
style: {
|
|
78747
|
-
|
|
78748
|
-
}
|
|
78749
|
-
|
|
78750
|
-
|
|
78751
|
-
|
|
78752
|
-
|
|
78753
|
-
|
|
78754
|
-
|
|
78755
|
-
|
|
78756
|
-
|
|
78757
|
-
|
|
78758
|
-
|
|
78759
|
-
|
|
78760
|
-
|
|
78761
|
-
onClick: () => handleStepGroupExpand?.({
|
|
78790
|
+
marginLeft: idx === 0 ? `${indent}px` : 0
|
|
78791
|
+
},
|
|
78792
|
+
onClick: () => {
|
|
78793
|
+
const isClickable = idx === 0 && !item?.displayName?.includes('End') && !item?.isDisabled;
|
|
78794
|
+
if (isClickable) handleClick?.({
|
|
78795
|
+
...item,
|
|
78796
|
+
tableType
|
|
78797
|
+
});
|
|
78798
|
+
},
|
|
78799
|
+
children: [!isViewPrivilegeMode && idx === 0 && jsxRuntime.jsx("div", {
|
|
78800
|
+
style: {
|
|
78801
|
+
padding: '4px 18px'
|
|
78802
|
+
}
|
|
78803
|
+
}), prepareData({
|
|
78762
78804
|
...item,
|
|
78763
|
-
|
|
78805
|
+
marginLeft: indent
|
|
78806
|
+
}, col)]
|
|
78807
|
+
}), idx === 0 && ['Group', 'PRE', 'POST', 'Script'].includes(item.type) && jsxRuntime.jsx("div", {
|
|
78808
|
+
className: `ff-accordion-arrow ${isStepGroupExpanded?.(item.stepId) ? 'expanded' : ''}`,
|
|
78809
|
+
children: jsxRuntime.jsx(Icon, {
|
|
78810
|
+
name: "arrow_right",
|
|
78811
|
+
color: isStepGroupExpanded?.(item.stepId) ? 'var(--brand-color)' : 'var(--default-color)',
|
|
78812
|
+
className: "steps-arrow-svg",
|
|
78813
|
+
width: 12,
|
|
78814
|
+
height: 12,
|
|
78815
|
+
onClick: () => handleStepGroupExpand?.({
|
|
78816
|
+
...item,
|
|
78817
|
+
tableType
|
|
78818
|
+
})
|
|
78764
78819
|
})
|
|
78765
|
-
})
|
|
78766
|
-
})
|
|
78767
|
-
})
|
|
78768
|
-
},
|
|
78769
|
-
|
|
78770
|
-
|
|
78771
|
-
|
|
78772
|
-
|
|
78773
|
-
|
|
78774
|
-
|
|
78775
|
-
|
|
78776
|
-
|
|
78777
|
-
|
|
78778
|
-
|
|
78779
|
-
|
|
78780
|
-
|
|
78781
|
-
|
|
78782
|
-
|
|
78820
|
+
})]
|
|
78821
|
+
})
|
|
78822
|
+
}, `${item.stepId}-${idx}`))
|
|
78823
|
+
}), isStepGroupExpanded?.(item.stepId) && jsxRuntime.jsx(StepGroupAccordions, {
|
|
78824
|
+
data: item.data,
|
|
78825
|
+
level: indent,
|
|
78826
|
+
columnCount: columnCount,
|
|
78827
|
+
viewModeId: viewModeId,
|
|
78828
|
+
ViewComponent: ViewComponent,
|
|
78829
|
+
handleClick: handleClick,
|
|
78830
|
+
tableType: tableType,
|
|
78831
|
+
handleStepGroupExpand: handleStepGroupExpand,
|
|
78832
|
+
isStepGroupExpanded: isStepGroupExpanded,
|
|
78833
|
+
isViewPrivilegeMode: isViewPrivilegeMode,
|
|
78834
|
+
columns: columns,
|
|
78835
|
+
parentIndex: absoluteIndex,
|
|
78836
|
+
updateRowHeight: updateRowHeight
|
|
78837
|
+
})]
|
|
78838
|
+
}, item.stepId);
|
|
78839
|
+
})
|
|
78783
78840
|
});
|
|
78784
78841
|
});
|
|
78785
78842
|
StepGroupAccordions.displayName = 'StepGroupAccordions';
|
|
@@ -78804,8 +78861,10 @@ const StepTableMainRow = ({
|
|
|
78804
78861
|
dataLength,
|
|
78805
78862
|
stepPartialSelect,
|
|
78806
78863
|
isViewPrivilegeMode,
|
|
78807
|
-
isClientSide
|
|
78864
|
+
isClientSide,
|
|
78865
|
+
updateRowHeight
|
|
78808
78866
|
}) => {
|
|
78867
|
+
const rowRef = React.useRef(null);
|
|
78809
78868
|
const isDisabled = React.useMemo(() => row?.isDisabled || (dataLength ?? 0) <= 1 || row.isSpecialNlp, [row, dataLength]);
|
|
78810
78869
|
let serialNumber = (indexNumber + 1).toString();
|
|
78811
78870
|
const {
|
|
@@ -78823,6 +78882,13 @@ const StepTableMainRow = ({
|
|
|
78823
78882
|
transition
|
|
78824
78883
|
}), [transform, transition]);
|
|
78825
78884
|
const key = row?._id || row?.stepId;
|
|
78885
|
+
// Measure row height and report to parent
|
|
78886
|
+
React.useEffect(() => {
|
|
78887
|
+
if (rowRef.current && updateRowHeight) {
|
|
78888
|
+
const height = rowRef.current.getBoundingClientRect().height;
|
|
78889
|
+
updateRowHeight(indexNumber, height);
|
|
78890
|
+
}
|
|
78891
|
+
}, [row, updateRowHeight, indexNumber, isStepGroupExpanded?.(row?.stepId)]);
|
|
78826
78892
|
const getPadding = index => {
|
|
78827
78893
|
if (isViewPrivilegeMode || isClientSide) {
|
|
78828
78894
|
if (['Group', 'PRE', 'POST', 'Script'].includes(row.type) && index === 0) {
|
|
@@ -78873,7 +78939,10 @@ const StepTableMainRow = ({
|
|
|
78873
78939
|
});
|
|
78874
78940
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
78875
78941
|
children: [jsxRuntime.jsx("tr", {
|
|
78876
|
-
ref:
|
|
78942
|
+
ref: el => {
|
|
78943
|
+
rowRef.current = el;
|
|
78944
|
+
setNodeRef(el);
|
|
78945
|
+
},
|
|
78877
78946
|
style: style,
|
|
78878
78947
|
className: classNames(tableBodyRowClass, {
|
|
78879
78948
|
'disabled-inner-row': isDisabled
|
|
@@ -78917,7 +78986,9 @@ const StepTableMainRow = ({
|
|
|
78917
78986
|
isStepGroupExpanded: isStepGroupExpanded,
|
|
78918
78987
|
level: row?.marginLeft,
|
|
78919
78988
|
isViewPrivilegeMode: isViewPrivilegeMode,
|
|
78920
|
-
columns: columns
|
|
78989
|
+
columns: columns,
|
|
78990
|
+
parentIndex: indexNumber,
|
|
78991
|
+
updateRowHeight: updateRowHeight
|
|
78921
78992
|
})]
|
|
78922
78993
|
});
|
|
78923
78994
|
};
|
|
@@ -78957,11 +79028,132 @@ const StepInnerTable = ({
|
|
|
78957
79028
|
isClientSide
|
|
78958
79029
|
}) => {
|
|
78959
79030
|
const observerRef = React.useRef(null);
|
|
79031
|
+
const containerRef = React.useRef(null);
|
|
79032
|
+
const [scrollTop, setScrollTop] = React.useState(0);
|
|
79033
|
+
const [containerHeight, setContainerHeight] = React.useState(0);
|
|
79034
|
+
const [rowHeights, setRowHeights] = React.useState([]);
|
|
79035
|
+
const [focusRowId, setFocusRowId] = React.useState(null);
|
|
79036
|
+
const buffer = 5;
|
|
79037
|
+
const estimatedRowHeight = 50;
|
|
79038
|
+
// Reset row heights when data changes
|
|
78960
79039
|
React.useEffect(() => {
|
|
78961
|
-
|
|
79040
|
+
if (containerRef.current) {
|
|
79041
|
+
setContainerHeight(containerRef.current.clientHeight);
|
|
79042
|
+
}
|
|
79043
|
+
const fullData = appendNewRow(data, AddNlp ?? {});
|
|
79044
|
+
setRowHeights(new Array(fullData.length).fill(estimatedRowHeight));
|
|
79045
|
+
}, [data, AddNlp]);
|
|
79046
|
+
// Track focus row for edit/new rows
|
|
79047
|
+
React.useEffect(() => {
|
|
79048
|
+
if (editMode) {
|
|
79049
|
+
setFocusRowId(editMode);
|
|
79050
|
+
} else if (AddNlp && Object.keys(AddNlp).length > 0) {
|
|
79051
|
+
const newRow = appendNewRow(data, AddNlp).find(row => row.isNew);
|
|
79052
|
+
if (newRow) {
|
|
79053
|
+
setFocusRowId(newRow.stepId || 'new-row');
|
|
79054
|
+
}
|
|
79055
|
+
} else {
|
|
79056
|
+
setFocusRowId(null);
|
|
79057
|
+
}
|
|
79058
|
+
}, [editMode, AddNlp, data]);
|
|
79059
|
+
// Improved scroll-to-focus with rendering delay
|
|
79060
|
+
React.useEffect(() => {
|
|
79061
|
+
if (focusRowId && containerRef.current) {
|
|
79062
|
+
const timer = setTimeout(() => {
|
|
79063
|
+
const focusElement = containerRef.current?.querySelector('#getInFocus');
|
|
79064
|
+
if (focusElement) {
|
|
79065
|
+
focusElement.scrollIntoView({
|
|
79066
|
+
behavior: 'smooth',
|
|
79067
|
+
block: 'nearest'
|
|
79068
|
+
});
|
|
79069
|
+
}
|
|
79070
|
+
}, 100);
|
|
79071
|
+
return () => clearTimeout(timer);
|
|
79072
|
+
}
|
|
79073
|
+
// Explicitly return undefined when condition isn't met
|
|
79074
|
+
return () => {};
|
|
79075
|
+
}, [focusRowId, rowHeights]);
|
|
79076
|
+
// Handle scroll
|
|
79077
|
+
const handleScroll = e => {
|
|
79078
|
+
setScrollTop(e.currentTarget.scrollTop);
|
|
79079
|
+
};
|
|
79080
|
+
// Update row height callback
|
|
79081
|
+
const updateRowHeight = React.useCallback((index, height) => {
|
|
79082
|
+
setRowHeights(prev => {
|
|
79083
|
+
const newHeights = [...prev];
|
|
79084
|
+
if (index < newHeights.length && newHeights[index] !== height) {
|
|
79085
|
+
newHeights[index] = height;
|
|
79086
|
+
return newHeights;
|
|
79087
|
+
}
|
|
79088
|
+
return prev;
|
|
79089
|
+
});
|
|
79090
|
+
}, []);
|
|
79091
|
+
// Calculate visible rows
|
|
79092
|
+
const fullData = appendNewRow(data, AddNlp ?? {});
|
|
79093
|
+
const totalRows = fullData.length;
|
|
79094
|
+
let startIndex = 0;
|
|
79095
|
+
let endIndex = totalRows - 1;
|
|
79096
|
+
let paddingTop = 0;
|
|
79097
|
+
let paddingBottom = 0;
|
|
79098
|
+
if (rowHeights.length === totalRows && containerHeight > 0) {
|
|
79099
|
+
let cumulativeHeight = 0;
|
|
79100
|
+
// Find start index
|
|
79101
|
+
for (let i = 0; i < totalRows; i++) {
|
|
79102
|
+
if (cumulativeHeight <= scrollTop) {
|
|
79103
|
+
startIndex = i;
|
|
79104
|
+
}
|
|
79105
|
+
cumulativeHeight += rowHeights[i] ?? 0;
|
|
79106
|
+
}
|
|
79107
|
+
// Find end index
|
|
79108
|
+
cumulativeHeight = 0;
|
|
79109
|
+
for (let i = 0; i < totalRows; i++) {
|
|
79110
|
+
cumulativeHeight += rowHeights[i] ?? 0;
|
|
79111
|
+
if (cumulativeHeight >= scrollTop + containerHeight && endIndex === totalRows - 1) {
|
|
79112
|
+
endIndex = i;
|
|
79113
|
+
break;
|
|
79114
|
+
}
|
|
79115
|
+
}
|
|
79116
|
+
// Apply buffer
|
|
79117
|
+
startIndex = Math.max(0, startIndex - buffer);
|
|
79118
|
+
endIndex = Math.min(totalRows - 1, endIndex + buffer);
|
|
79119
|
+
// Expand range to include focus row if needed
|
|
79120
|
+
if (focusRowId) {
|
|
79121
|
+
const focusIndex = fullData.findIndex(row => row.stepId === focusRowId || row.isNew && focusRowId === 'new-row');
|
|
79122
|
+
if (focusIndex >= 0) {
|
|
79123
|
+
if (focusIndex < startIndex) {
|
|
79124
|
+
startIndex = focusIndex;
|
|
79125
|
+
} else if (focusIndex > endIndex) {
|
|
79126
|
+
endIndex = focusIndex;
|
|
79127
|
+
}
|
|
79128
|
+
}
|
|
79129
|
+
}
|
|
79130
|
+
// Calculate padding
|
|
79131
|
+
paddingTop = rowHeights.slice(0, startIndex).reduce((sum, height) => sum + height, 0);
|
|
79132
|
+
paddingBottom = rowHeights.slice(endIndex + 1).reduce((sum, height) => sum + height, 0);
|
|
79133
|
+
} else {
|
|
79134
|
+
// Fallback to estimated virtualization
|
|
79135
|
+
startIndex = Math.max(0, Math.floor(scrollTop / estimatedRowHeight) - buffer);
|
|
79136
|
+
endIndex = Math.min(totalRows - 1, startIndex + Math.ceil(containerHeight / estimatedRowHeight) + buffer);
|
|
79137
|
+
// Expand range to include focus row if needed
|
|
79138
|
+
if (focusRowId) {
|
|
79139
|
+
const focusIndex = fullData.findIndex(row => row.stepId === focusRowId || row.isNew && focusRowId === 'new-row');
|
|
79140
|
+
if (focusIndex >= 0) {
|
|
79141
|
+
if (focusIndex < startIndex) {
|
|
79142
|
+
startIndex = focusIndex;
|
|
79143
|
+
} else if (focusIndex > endIndex) {
|
|
79144
|
+
endIndex = focusIndex;
|
|
79145
|
+
}
|
|
79146
|
+
}
|
|
79147
|
+
}
|
|
79148
|
+
paddingTop = startIndex * estimatedRowHeight;
|
|
79149
|
+
paddingBottom = (totalRows - endIndex - 1) * estimatedRowHeight;
|
|
79150
|
+
}
|
|
79151
|
+
const visibleRows = fullData.slice(startIndex, endIndex + 1);
|
|
79152
|
+
// Infinite scroll observer
|
|
79153
|
+
React.useEffect(() => {
|
|
79154
|
+
const scrollContainer = containerRef.current;
|
|
78962
79155
|
const firstNode = document.getElementById('ff-table-first-node');
|
|
78963
79156
|
const lastNode = document.getElementById('ff-table-last-node');
|
|
78964
|
-
// Exit early if data is empty or elements are missing
|
|
78965
79157
|
if (!scrollContainer || !firstNode || !lastNode || !data?.length) {
|
|
78966
79158
|
return;
|
|
78967
79159
|
}
|
|
@@ -78980,7 +79172,6 @@ const StepInnerTable = ({
|
|
|
78980
79172
|
observerRef.current.observe(firstNode);
|
|
78981
79173
|
observerRef.current.observe(lastNode);
|
|
78982
79174
|
return () => {
|
|
78983
|
-
// Cleanup observer
|
|
78984
79175
|
observerRef.current?.disconnect();
|
|
78985
79176
|
};
|
|
78986
79177
|
}, [data, loadMore]);
|
|
@@ -79018,15 +79209,18 @@ const StepInnerTable = ({
|
|
|
79018
79209
|
items: data?.map(row => row._id || row.stepId),
|
|
79019
79210
|
strategy: verticalListSortingStrategy,
|
|
79020
79211
|
children: jsxRuntime.jsxs("div", {
|
|
79212
|
+
ref: containerRef,
|
|
79021
79213
|
style: {
|
|
79022
79214
|
height: height,
|
|
79023
|
-
position: 'relative'
|
|
79215
|
+
position: 'relative',
|
|
79216
|
+
overflow: 'auto'
|
|
79024
79217
|
},
|
|
79025
79218
|
id: "ff-table-scroll-container",
|
|
79026
79219
|
className: classNames(className, {
|
|
79027
79220
|
'ff-fixed-header-steps-table': withFixedHeader,
|
|
79028
79221
|
'steps-border-borderRadius': borderWithRadius
|
|
79029
79222
|
}),
|
|
79223
|
+
onScroll: handleScroll,
|
|
79030
79224
|
children: [jsxRuntime.jsxs("table", {
|
|
79031
79225
|
className: classNames(`ff-table-steps`),
|
|
79032
79226
|
cellSpacing: 0,
|
|
@@ -79043,30 +79237,43 @@ const StepInnerTable = ({
|
|
|
79043
79237
|
}), jsxRuntime.jsxs("tbody", {
|
|
79044
79238
|
className: "ff-steps-tbody",
|
|
79045
79239
|
children: [jsxRuntime.jsx("tr", {
|
|
79046
|
-
id: "ff-table-first-node"
|
|
79047
|
-
|
|
79240
|
+
id: "ff-table-first-node",
|
|
79241
|
+
style: {
|
|
79242
|
+
display: 'none'
|
|
79243
|
+
}
|
|
79244
|
+
}), paddingTop > 0 && jsxRuntime.jsx("tr", {
|
|
79245
|
+
children: jsxRuntime.jsx("td", {
|
|
79246
|
+
style: {
|
|
79247
|
+
height: paddingTop,
|
|
79248
|
+
padding: 0
|
|
79249
|
+
},
|
|
79250
|
+
colSpan: columns.length
|
|
79251
|
+
})
|
|
79252
|
+
}), visibleRows.map((row, index) => {
|
|
79253
|
+
const absoluteIndex = startIndex + index;
|
|
79048
79254
|
const isEdit = editMode === row.stepId;
|
|
79049
79255
|
const isEditOrNew = isEdit || row.isNew;
|
|
79256
|
+
const isFocusRow = isEdit && row.stepId === focusRowId || row.isNew && focusRowId === 'new-row';
|
|
79050
79257
|
const renderEditableRow = () => jsxRuntime.jsxs("tr", {
|
|
79051
79258
|
className: "steps-edit-row",
|
|
79052
|
-
id:
|
|
79259
|
+
id: isFocusRow ? 'getInFocus' : undefined,
|
|
79053
79260
|
children: [isEdit && /*#__PURE__*/React.isValidElement(editComponent) && jsxRuntime.jsx("td", {
|
|
79054
79261
|
colSpan: columns.length,
|
|
79055
79262
|
children: /*#__PURE__*/React.cloneElement(editComponent, {
|
|
79056
79263
|
rowData: row,
|
|
79057
|
-
rowIndex:
|
|
79264
|
+
rowIndex: absoluteIndex + 1
|
|
79058
79265
|
})
|
|
79059
79266
|
}), row.isNew && !isEdit && /*#__PURE__*/React.isValidElement(NlpComponent) && jsxRuntime.jsx("td", {
|
|
79060
79267
|
colSpan: columns.length,
|
|
79061
79268
|
children: /*#__PURE__*/React.cloneElement(NlpComponent, {
|
|
79062
|
-
rowIndex:
|
|
79269
|
+
rowIndex: absoluteIndex,
|
|
79063
79270
|
rowData: row
|
|
79064
79271
|
})
|
|
79065
79272
|
})]
|
|
79066
|
-
}, row.stepId ||
|
|
79273
|
+
}, row.stepId || absoluteIndex);
|
|
79067
79274
|
const renderSortableRow = () => jsxRuntime.jsx(StepTableMainRow$1, {
|
|
79068
79275
|
row: row,
|
|
79069
|
-
indexNumber:
|
|
79276
|
+
indexNumber: absoluteIndex,
|
|
79070
79277
|
columns: columns,
|
|
79071
79278
|
tableBodyRowClass: tableBodyRowClass,
|
|
79072
79279
|
handleOnclick: handleOnclick,
|
|
@@ -79084,11 +79291,23 @@ const StepInnerTable = ({
|
|
|
79084
79291
|
dataLength: data?.length,
|
|
79085
79292
|
stepPartialSelect: stepPartialSelect,
|
|
79086
79293
|
isViewPrivilegeMode: isViewPrivilegeMode,
|
|
79087
|
-
isClientSide: isClientSide
|
|
79294
|
+
isClientSide: isClientSide,
|
|
79295
|
+
updateRowHeight: updateRowHeight
|
|
79088
79296
|
});
|
|
79089
79297
|
return isEditOrNew ? renderEditableRow() : renderSortableRow();
|
|
79298
|
+
}), paddingBottom > 0 && jsxRuntime.jsx("tr", {
|
|
79299
|
+
children: jsxRuntime.jsx("td", {
|
|
79300
|
+
style: {
|
|
79301
|
+
height: paddingBottom,
|
|
79302
|
+
padding: 0
|
|
79303
|
+
},
|
|
79304
|
+
colSpan: columns.length
|
|
79305
|
+
})
|
|
79090
79306
|
}), jsxRuntime.jsx("tr", {
|
|
79091
|
-
id: "ff-table-last-node"
|
|
79307
|
+
id: "ff-table-last-node",
|
|
79308
|
+
style: {
|
|
79309
|
+
display: 'none'
|
|
79310
|
+
}
|
|
79092
79311
|
})]
|
|
79093
79312
|
})]
|
|
79094
79313
|
}), data?.length <= 0 && jsxRuntime.jsx("div", {
|
|
@@ -79814,7 +80033,6 @@ const StepLandingTable = /*#__PURE__*/React.forwardRef(({
|
|
|
79814
80033
|
}
|
|
79815
80034
|
}));
|
|
79816
80035
|
React.useEffect(() => {
|
|
79817
|
-
scrollToView('getInFocus');
|
|
79818
80036
|
if (!checkEmpty(AddNlp)) {
|
|
79819
80037
|
setViewComponent(() => null);
|
|
79820
80038
|
setViewModeId(null);
|