abdul-react 0.0.12 → 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/index11.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 +7 -6
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js +7 -6
- 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 +26 -18
- package/lib/index.cjs.map +1 -1
- package/lib/node_modules/js-beautify/js/src/css/beautifier.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/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.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/tokenizer.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
|
|
@@ -40416,14 +40417,14 @@ const ColumnIndicator = ({
|
|
|
40416
40417
|
});
|
|
40417
40418
|
}, [column, selectedColumn, columnContextEnable, options]);
|
|
40418
40419
|
React__namespace.useEffect(() => {
|
|
40419
|
-
if (selectedColumn !== undefined) {
|
|
40420
|
+
if (selectedColumn !== undefined && contextMenu?.contextType === 'column' || !contextMenu?.contextType) {
|
|
40420
40421
|
setContextMenu(prev => ({
|
|
40421
40422
|
open: prev.open,
|
|
40422
40423
|
contextType: 'column',
|
|
40423
40424
|
options
|
|
40424
40425
|
}));
|
|
40425
40426
|
}
|
|
40426
|
-
}, [column, selectedColumn, columnContextEnable, options]);
|
|
40427
|
+
}, [column, selectedColumn, columnContextEnable, options, contextMenu?.contextType]);
|
|
40427
40428
|
return jsxRuntime.jsxs("th", {
|
|
40428
40429
|
className: classNames('ff-spreadsheet-header', {
|
|
40429
40430
|
'ff-spreadsheet-header--selected': selected
|
|
@@ -40496,7 +40497,8 @@ const RowIndicator = ({
|
|
|
40496
40497
|
selectedRow,
|
|
40497
40498
|
cell,
|
|
40498
40499
|
maxRowLimit,
|
|
40499
|
-
disableDeleteOption
|
|
40500
|
+
disableDeleteOption,
|
|
40501
|
+
contextMenu
|
|
40500
40502
|
}) => {
|
|
40501
40503
|
const dispatch = useDispatch();
|
|
40502
40504
|
const rowHeight = useSelector(state => state.rowDimensions[row]?.height || 32);
|
|
@@ -40509,7 +40511,7 @@ const RowIndicator = ({
|
|
|
40509
40511
|
label: 'Add Row Top',
|
|
40510
40512
|
value: 'Add Row Top',
|
|
40511
40513
|
iconName: 'plus_icon',
|
|
40512
|
-
action: () => addRowTop(
|
|
40514
|
+
action: () => addRowTop(),
|
|
40513
40515
|
disableTooltip: 'Row limit reached',
|
|
40514
40516
|
visible: cell?.contextDisable?.['Add Row Top'] ?? false,
|
|
40515
40517
|
disable: rowCount >= maxRowLimit
|
|
@@ -40517,7 +40519,7 @@ const RowIndicator = ({
|
|
|
40517
40519
|
label: 'Add Row Bottom',
|
|
40518
40520
|
value: 'Add Row Bottom',
|
|
40519
40521
|
iconName: 'plus_icon',
|
|
40520
|
-
action: () => addRowBottom(
|
|
40522
|
+
action: () => addRowBottom(),
|
|
40521
40523
|
disableTooltip: 'Row limit reached',
|
|
40522
40524
|
visible: cell?.contextDisable?.['Add Row Bottom'] ?? false,
|
|
40523
40525
|
disable: rowCount >= maxRowLimit
|
|
@@ -40525,7 +40527,7 @@ const RowIndicator = ({
|
|
|
40525
40527
|
label: 'Delete Row',
|
|
40526
40528
|
value: 'Delete Row',
|
|
40527
40529
|
iconName: 'delete',
|
|
40528
|
-
action: () => deleteRow(
|
|
40530
|
+
action: () => deleteRow(),
|
|
40529
40531
|
disableTooltip: '',
|
|
40530
40532
|
visible: cell?.contextDisable?.['Delete Row'] ?? false,
|
|
40531
40533
|
disable: false
|
|
@@ -40564,14 +40566,14 @@ const RowIndicator = ({
|
|
|
40564
40566
|
});
|
|
40565
40567
|
}, [row, rowContextEnable, options, selectedRow]);
|
|
40566
40568
|
React__namespace.useEffect(() => {
|
|
40567
|
-
if (selectedRow !== undefined) {
|
|
40569
|
+
if (selectedRow !== undefined && contextMenu?.contextType === 'row' || !contextMenu?.contextType) {
|
|
40568
40570
|
setContextMenu(prev => ({
|
|
40569
40571
|
open: prev.open,
|
|
40570
40572
|
contextType: 'row',
|
|
40571
40573
|
options
|
|
40572
40574
|
}));
|
|
40573
40575
|
}
|
|
40574
|
-
}, [row, rowContextEnable, options, selectedRow]);
|
|
40576
|
+
}, [row, rowContextEnable, options, selectedRow, contextMenu?.contextType]);
|
|
40575
40577
|
return jsxRuntime.jsxs("th", {
|
|
40576
40578
|
className: classNames('ff-spreadsheet-header', {
|
|
40577
40579
|
'ff-spreadsheet-header--selected': selected
|
|
@@ -41874,7 +41876,8 @@ const Spreadsheet = props => {
|
|
|
41874
41876
|
showHider,
|
|
41875
41877
|
maxRowLimit,
|
|
41876
41878
|
maxColLimit,
|
|
41877
|
-
disableDeleteOption
|
|
41879
|
+
disableDeleteOption,
|
|
41880
|
+
contextMenu
|
|
41878
41881
|
} = props;
|
|
41879
41882
|
const [sheetChange, setSheetChange] = React__namespace.useState(false);
|
|
41880
41883
|
const [maxWidth, setMaxWidth] = React__namespace.useState(0);
|
|
@@ -42205,7 +42208,8 @@ const Spreadsheet = props => {
|
|
|
42205
42208
|
addColumnRight: addColumnRight$1,
|
|
42206
42209
|
columnContextEnable: props.columnContextEnable,
|
|
42207
42210
|
maxColLimit: maxColLimit,
|
|
42208
|
-
disableDeleteOption: disableDeleteOption
|
|
42211
|
+
disableDeleteOption: disableDeleteOption,
|
|
42212
|
+
contextMenu: contextMenu
|
|
42209
42213
|
}, columnNumber) : jsxRuntime.jsx(ColumnIndicator, {
|
|
42210
42214
|
column: columnNumber,
|
|
42211
42215
|
minimumColumnWidth: minimumColumnWidth,
|
|
@@ -42215,7 +42219,8 @@ const Spreadsheet = props => {
|
|
|
42215
42219
|
addColumnRight: addColumnRight$1,
|
|
42216
42220
|
columnContextEnable: props.columnContextEnable,
|
|
42217
42221
|
maxColLimit: maxColLimit,
|
|
42218
|
-
disableDeleteOption: disableDeleteOption
|
|
42222
|
+
disableDeleteOption: disableDeleteOption,
|
|
42223
|
+
contextMenu: contextMenu
|
|
42219
42224
|
}, columnNumber))]
|
|
42220
42225
|
}), renderReady && scrollerFunction().map(rowNumber => jsxRuntime.jsxs(Row$1, {
|
|
42221
42226
|
row: rowNumber,
|
|
@@ -42228,7 +42233,8 @@ const Spreadsheet = props => {
|
|
|
42228
42233
|
setContextMenu: props.setContextMenu,
|
|
42229
42234
|
rowContextEnable: props.rowContextEnable,
|
|
42230
42235
|
maxRowLimit: maxRowLimit,
|
|
42231
|
-
disableDeleteOption: disableDeleteOption
|
|
42236
|
+
disableDeleteOption: disableDeleteOption,
|
|
42237
|
+
contextMenu: contextMenu
|
|
42232
42238
|
}, rowNumber) : jsxRuntime.jsx(RowIndicator$1, {
|
|
42233
42239
|
row: rowNumber,
|
|
42234
42240
|
addRowTop: addRowTop$1,
|
|
@@ -42237,7 +42243,8 @@ const Spreadsheet = props => {
|
|
|
42237
42243
|
setContextMenu: props.setContextMenu,
|
|
42238
42244
|
rowContextEnable: props.rowContextEnable,
|
|
42239
42245
|
maxRowLimit: maxRowLimit,
|
|
42240
|
-
disableDeleteOption: disableDeleteOption
|
|
42246
|
+
disableDeleteOption: disableDeleteOption,
|
|
42247
|
+
contextMenu: contextMenu
|
|
42241
42248
|
}, rowNumber), range(size.columns).map(columnNumber => jsxRuntime.jsx(Cell$1, {
|
|
42242
42249
|
row: rowNumber,
|
|
42243
42250
|
column: columnNumber,
|
|
@@ -42884,7 +42891,8 @@ const ExcelFile = ({
|
|
|
42884
42891
|
showHider: showHider,
|
|
42885
42892
|
maxRowLimit: maxRowLimit,
|
|
42886
42893
|
maxColLimit: maxColLimit,
|
|
42887
|
-
disableDeleteOption: disableDeleteOption
|
|
42894
|
+
disableDeleteOption: disableDeleteOption,
|
|
42895
|
+
contextMenu: contextMenu
|
|
42888
42896
|
})
|
|
42889
42897
|
}), sheetBar !== 'hide' && jsxRuntime.jsxs("div", {
|
|
42890
42898
|
className: "ff-excel-sheet-bar",
|