abdul-react 0.0.11 → 0.0.13
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/index9.js +2 -2
- package/lib/components/Excel/ExcelFile/ExcelFile.js +2 -1
- package/lib/components/Excel/ExcelFile/ExcelFile.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js +14 -4
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js +14 -4
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +1 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js +10 -5
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +8 -8
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +8 -6
- package/lib/index.cjs +40 -14
- package/lib/index.cjs.map +1 -1
- package/lib/node_modules/js-beautify/js/src/css/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/package.json +1 -1
|
@@ -173,14 +173,15 @@ export type RowIndicatorProps = {
|
|
|
173
173
|
/** Callback to be called when the row is selected */
|
|
174
174
|
onSelect: (row: number, extend: boolean) => void;
|
|
175
175
|
setContextMenu: React.Dispatch<React.SetStateAction<ContextMenuState>>;
|
|
176
|
-
deleteRow: (_row
|
|
177
|
-
addRowTop: (_row
|
|
178
|
-
addRowBottom: (_row
|
|
176
|
+
deleteRow: (_row?: number) => void;
|
|
177
|
+
addRowTop: (_row?: number) => void;
|
|
178
|
+
addRowBottom: (_row?: number) => void;
|
|
179
179
|
rowContextEnable: boolean;
|
|
180
180
|
cell?: CellBase;
|
|
181
181
|
selectedRow?: number;
|
|
182
182
|
maxRowLimit: number;
|
|
183
183
|
disableDeleteOption: boolean;
|
|
184
|
+
contextMenu: ContextMenuState;
|
|
184
185
|
};
|
|
185
186
|
export type ContextMenuState = {
|
|
186
187
|
open: boolean;
|
|
@@ -212,14 +213,15 @@ export type ColumnIndicatorProps = {
|
|
|
212
213
|
/** Callback to be called when the column is selected */
|
|
213
214
|
onSelect: (column: number, extend: boolean) => void;
|
|
214
215
|
setContextMenu: React.Dispatch<React.SetStateAction<ContextMenuState>>;
|
|
215
|
-
deleteColumn: (_col
|
|
216
|
-
addColumnLeft: (_col
|
|
217
|
-
addColumnRight: (_col
|
|
216
|
+
deleteColumn: (_col?: number) => void;
|
|
217
|
+
addColumnLeft: (_col?: number) => void;
|
|
218
|
+
addColumnRight: (_col?: number) => void;
|
|
218
219
|
columnContextEnable: boolean;
|
|
219
220
|
cell?: CellBase;
|
|
220
221
|
selectedColumn?: number;
|
|
221
222
|
maxColLimit: number;
|
|
222
223
|
disableDeleteOption: boolean;
|
|
224
|
+
contextMenu: ContextMenuState;
|
|
223
225
|
};
|
|
224
226
|
/** Type of the ColumnIndicator component */
|
|
225
227
|
export type ColumnIndicatorComponent = React.ComponentType<ColumnIndicatorProps>;
|
package/lib/index.cjs
CHANGED
|
@@ -40347,7 +40347,8 @@ const ColumnIndicator = ({
|
|
|
40347
40347
|
selectedColumn,
|
|
40348
40348
|
minimumColumnWidth,
|
|
40349
40349
|
maxColLimit,
|
|
40350
|
-
disableDeleteOption
|
|
40350
|
+
disableDeleteOption,
|
|
40351
|
+
contextMenu
|
|
40351
40352
|
}) => {
|
|
40352
40353
|
const dispatch = useDispatch();
|
|
40353
40354
|
const minColumnWidth = minimumColumnWidth;
|
|
@@ -40361,7 +40362,7 @@ const ColumnIndicator = ({
|
|
|
40361
40362
|
label: 'Add Column Left',
|
|
40362
40363
|
value: 'Add Column Left',
|
|
40363
40364
|
iconName: 'plus_icon',
|
|
40364
|
-
action: () => addColumnLeft(
|
|
40365
|
+
action: () => addColumnLeft(),
|
|
40365
40366
|
disableTooltip: 'Column limit reached',
|
|
40366
40367
|
visible: cell?.contextDisable?.['Add Column Left'] ?? false,
|
|
40367
40368
|
disable: columnCount >= maxColLimit
|
|
@@ -40369,7 +40370,7 @@ const ColumnIndicator = ({
|
|
|
40369
40370
|
label: 'Add Column Right',
|
|
40370
40371
|
value: 'Add Column Right',
|
|
40371
40372
|
iconName: 'plus_icon',
|
|
40372
|
-
action: () => addColumnRight(
|
|
40373
|
+
action: () => addColumnRight(),
|
|
40373
40374
|
disableTooltip: 'Column limit reached',
|
|
40374
40375
|
visible: cell?.contextDisable?.['Add Column Right'] ?? false,
|
|
40375
40376
|
disable: columnCount >= maxColLimit
|
|
@@ -40377,7 +40378,7 @@ const ColumnIndicator = ({
|
|
|
40377
40378
|
label: 'Delete Column',
|
|
40378
40379
|
value: 'Delete Column',
|
|
40379
40380
|
iconName: 'delete',
|
|
40380
|
-
action: () => deleteColumn(
|
|
40381
|
+
action: () => deleteColumn(),
|
|
40381
40382
|
disableTooltip: '',
|
|
40382
40383
|
visible: cell?.contextDisable?.['Delete Column'] ?? false,
|
|
40383
40384
|
disable: false
|
|
@@ -40415,6 +40416,15 @@ const ColumnIndicator = ({
|
|
|
40415
40416
|
options
|
|
40416
40417
|
});
|
|
40417
40418
|
}, [column, selectedColumn, columnContextEnable, options]);
|
|
40419
|
+
React__namespace.useEffect(() => {
|
|
40420
|
+
if (selectedColumn !== undefined && contextMenu?.contextType === 'column' || !contextMenu?.contextType) {
|
|
40421
|
+
setContextMenu(prev => ({
|
|
40422
|
+
open: prev.open,
|
|
40423
|
+
contextType: 'column',
|
|
40424
|
+
options
|
|
40425
|
+
}));
|
|
40426
|
+
}
|
|
40427
|
+
}, [column, selectedColumn, columnContextEnable, options, contextMenu?.contextType]);
|
|
40418
40428
|
return jsxRuntime.jsxs("th", {
|
|
40419
40429
|
className: classNames('ff-spreadsheet-header', {
|
|
40420
40430
|
'ff-spreadsheet-header--selected': selected
|
|
@@ -40487,7 +40497,8 @@ const RowIndicator = ({
|
|
|
40487
40497
|
selectedRow,
|
|
40488
40498
|
cell,
|
|
40489
40499
|
maxRowLimit,
|
|
40490
|
-
disableDeleteOption
|
|
40500
|
+
disableDeleteOption,
|
|
40501
|
+
contextMenu
|
|
40491
40502
|
}) => {
|
|
40492
40503
|
const dispatch = useDispatch();
|
|
40493
40504
|
const rowHeight = useSelector(state => state.rowDimensions[row]?.height || 32);
|
|
@@ -40500,7 +40511,7 @@ const RowIndicator = ({
|
|
|
40500
40511
|
label: 'Add Row Top',
|
|
40501
40512
|
value: 'Add Row Top',
|
|
40502
40513
|
iconName: 'plus_icon',
|
|
40503
|
-
action: () => addRowTop(
|
|
40514
|
+
action: () => addRowTop(),
|
|
40504
40515
|
disableTooltip: 'Row limit reached',
|
|
40505
40516
|
visible: cell?.contextDisable?.['Add Row Top'] ?? false,
|
|
40506
40517
|
disable: rowCount >= maxRowLimit
|
|
@@ -40508,7 +40519,7 @@ const RowIndicator = ({
|
|
|
40508
40519
|
label: 'Add Row Bottom',
|
|
40509
40520
|
value: 'Add Row Bottom',
|
|
40510
40521
|
iconName: 'plus_icon',
|
|
40511
|
-
action: () => addRowBottom(
|
|
40522
|
+
action: () => addRowBottom(),
|
|
40512
40523
|
disableTooltip: 'Row limit reached',
|
|
40513
40524
|
visible: cell?.contextDisable?.['Add Row Bottom'] ?? false,
|
|
40514
40525
|
disable: rowCount >= maxRowLimit
|
|
@@ -40516,7 +40527,7 @@ const RowIndicator = ({
|
|
|
40516
40527
|
label: 'Delete Row',
|
|
40517
40528
|
value: 'Delete Row',
|
|
40518
40529
|
iconName: 'delete',
|
|
40519
|
-
action: () => deleteRow(
|
|
40530
|
+
action: () => deleteRow(),
|
|
40520
40531
|
disableTooltip: '',
|
|
40521
40532
|
visible: cell?.contextDisable?.['Delete Row'] ?? false,
|
|
40522
40533
|
disable: false
|
|
@@ -40554,6 +40565,15 @@ const RowIndicator = ({
|
|
|
40554
40565
|
options
|
|
40555
40566
|
});
|
|
40556
40567
|
}, [row, rowContextEnable, options, selectedRow]);
|
|
40568
|
+
React__namespace.useEffect(() => {
|
|
40569
|
+
if (selectedRow !== undefined && contextMenu?.contextType === 'row' || !contextMenu?.contextType) {
|
|
40570
|
+
setContextMenu(prev => ({
|
|
40571
|
+
open: prev.open,
|
|
40572
|
+
contextType: 'row',
|
|
40573
|
+
options
|
|
40574
|
+
}));
|
|
40575
|
+
}
|
|
40576
|
+
}, [row, rowContextEnable, options, selectedRow, contextMenu?.contextType]);
|
|
40557
40577
|
return jsxRuntime.jsxs("th", {
|
|
40558
40578
|
className: classNames('ff-spreadsheet-header', {
|
|
40559
40579
|
'ff-spreadsheet-header--selected': selected
|
|
@@ -41856,7 +41876,8 @@ const Spreadsheet = props => {
|
|
|
41856
41876
|
showHider,
|
|
41857
41877
|
maxRowLimit,
|
|
41858
41878
|
maxColLimit,
|
|
41859
|
-
disableDeleteOption
|
|
41879
|
+
disableDeleteOption,
|
|
41880
|
+
contextMenu
|
|
41860
41881
|
} = props;
|
|
41861
41882
|
const [sheetChange, setSheetChange] = React__namespace.useState(false);
|
|
41862
41883
|
const [maxWidth, setMaxWidth] = React__namespace.useState(0);
|
|
@@ -42187,7 +42208,8 @@ const Spreadsheet = props => {
|
|
|
42187
42208
|
addColumnRight: addColumnRight$1,
|
|
42188
42209
|
columnContextEnable: props.columnContextEnable,
|
|
42189
42210
|
maxColLimit: maxColLimit,
|
|
42190
|
-
disableDeleteOption: disableDeleteOption
|
|
42211
|
+
disableDeleteOption: disableDeleteOption,
|
|
42212
|
+
contextMenu: contextMenu
|
|
42191
42213
|
}, columnNumber) : jsxRuntime.jsx(ColumnIndicator, {
|
|
42192
42214
|
column: columnNumber,
|
|
42193
42215
|
minimumColumnWidth: minimumColumnWidth,
|
|
@@ -42197,7 +42219,8 @@ const Spreadsheet = props => {
|
|
|
42197
42219
|
addColumnRight: addColumnRight$1,
|
|
42198
42220
|
columnContextEnable: props.columnContextEnable,
|
|
42199
42221
|
maxColLimit: maxColLimit,
|
|
42200
|
-
disableDeleteOption: disableDeleteOption
|
|
42222
|
+
disableDeleteOption: disableDeleteOption,
|
|
42223
|
+
contextMenu: contextMenu
|
|
42201
42224
|
}, columnNumber))]
|
|
42202
42225
|
}), renderReady && scrollerFunction().map(rowNumber => jsxRuntime.jsxs(Row$1, {
|
|
42203
42226
|
row: rowNumber,
|
|
@@ -42210,7 +42233,8 @@ const Spreadsheet = props => {
|
|
|
42210
42233
|
setContextMenu: props.setContextMenu,
|
|
42211
42234
|
rowContextEnable: props.rowContextEnable,
|
|
42212
42235
|
maxRowLimit: maxRowLimit,
|
|
42213
|
-
disableDeleteOption: disableDeleteOption
|
|
42236
|
+
disableDeleteOption: disableDeleteOption,
|
|
42237
|
+
contextMenu: contextMenu
|
|
42214
42238
|
}, rowNumber) : jsxRuntime.jsx(RowIndicator$1, {
|
|
42215
42239
|
row: rowNumber,
|
|
42216
42240
|
addRowTop: addRowTop$1,
|
|
@@ -42219,7 +42243,8 @@ const Spreadsheet = props => {
|
|
|
42219
42243
|
setContextMenu: props.setContextMenu,
|
|
42220
42244
|
rowContextEnable: props.rowContextEnable,
|
|
42221
42245
|
maxRowLimit: maxRowLimit,
|
|
42222
|
-
disableDeleteOption: disableDeleteOption
|
|
42246
|
+
disableDeleteOption: disableDeleteOption,
|
|
42247
|
+
contextMenu: contextMenu
|
|
42223
42248
|
}, rowNumber), range(size.columns).map(columnNumber => jsxRuntime.jsx(Cell$1, {
|
|
42224
42249
|
row: rowNumber,
|
|
42225
42250
|
column: columnNumber,
|
|
@@ -42866,7 +42891,8 @@ const ExcelFile = ({
|
|
|
42866
42891
|
showHider: showHider,
|
|
42867
42892
|
maxRowLimit: maxRowLimit,
|
|
42868
42893
|
maxColLimit: maxColLimit,
|
|
42869
|
-
disableDeleteOption: disableDeleteOption
|
|
42894
|
+
disableDeleteOption: disableDeleteOption,
|
|
42895
|
+
contextMenu: contextMenu
|
|
42870
42896
|
})
|
|
42871
42897
|
}), sheetBar !== 'hide' && jsxRuntime.jsxs("div", {
|
|
42872
42898
|
className: "ff-excel-sheet-bar",
|