handsontable 0.0.0-next-bfaf0f9-20230613 → 0.0.0-next-ea1e0b3-20230620
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
- package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
- package/3rdparty/walkontable/src/cell/coords.js +12 -61
- package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
- package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
- package/3rdparty/walkontable/src/cell/range.js +7 -44
- package/3rdparty/walkontable/src/cell/range.mjs +7 -44
- package/3rdparty/walkontable/src/core/_base.js +3 -9
- package/3rdparty/walkontable/src/core/_base.mjs +3 -9
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +2 -3
- package/3rdparty/walkontable/src/core/core.mjs +2 -3
- package/3rdparty/walkontable/src/event.js +7 -7
- package/3rdparty/walkontable/src/event.mjs +7 -7
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +2 -10
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +1 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
- package/3rdparty/walkontable/src/overlay/top.js +4 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
- package/3rdparty/walkontable/src/selection.js +355 -0
- package/3rdparty/walkontable/src/selection.mjs +349 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
- package/3rdparty/walkontable/src/table.js +79 -7
- package/3rdparty/walkontable/src/table.mjs +80 -8
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/common.d.ts +1 -1
- package/core.d.ts +6 -9
- package/core.js +390 -235
- package/core.mjs +395 -240
- package/dataMap/metaManager/metaSchema.js +0 -19
- package/dataMap/metaManager/metaSchema.mjs +0 -19
- package/dist/handsontable.css +3 -8
- package/dist/handsontable.full.css +3 -8
- package/dist/handsontable.full.js +9243 -11930
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +107 -107
- package/dist/handsontable.js +12402 -15089
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +4 -4
- package/editorManager.js +94 -21
- package/editorManager.mjs +98 -26
- package/editors/textEditor/textEditor.js +11 -3
- package/editors/textEditor/textEditor.mjs +12 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +0 -1
- package/helpers/number.js +0 -18
- package/helpers/number.mjs +0 -17
- package/package.json +1 -1
- package/pluginHooks.d.ts +1 -6
- package/pluginHooks.js +1 -100
- package/pluginHooks.mjs +1 -100
- package/plugins/autofill/autofill.js +1 -2
- package/plugins/autofill/autofill.mjs +2 -3
- package/plugins/autofill/utils.js +1 -39
- package/plugins/autofill/utils.mjs +0 -37
- package/plugins/copyPaste/copyPaste.js +1 -5
- package/plugins/copyPaste/copyPaste.mjs +1 -5
- package/plugins/customBorders/customBorders.js +53 -18
- package/plugins/customBorders/customBorders.mjs +54 -19
- package/plugins/manualColumnResize/manualColumnResize.js +36 -5
- package/plugins/manualColumnResize/manualColumnResize.mjs +36 -5
- package/plugins/manualRowResize/manualRowResize.js +40 -9
- package/plugins/manualRowResize/manualRowResize.mjs +40 -9
- package/plugins/mergeCells/mergeCells.js +18 -5
- package/plugins/mergeCells/mergeCells.mjs +18 -5
- package/plugins/nestedHeaders/nestedHeaders.js +10 -132
- package/plugins/nestedHeaders/nestedHeaders.mjs +10 -132
- package/plugins/nestedHeaders/stateManager/index.js +0 -37
- package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
- package/plugins/nestedRows/nestedRows.js +7 -52
- package/plugins/nestedRows/nestedRows.mjs +7 -52
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/constants.js +16 -0
- package/selection/highlight/constants.mjs +6 -0
- package/selection/highlight/highlight.js +89 -312
- package/selection/highlight/highlight.mjs +85 -302
- package/selection/highlight/types/activeHeader.js +9 -10
- package/selection/highlight/types/activeHeader.mjs +8 -10
- package/selection/highlight/types/area.js +27 -12
- package/selection/highlight/types/area.mjs +30 -16
- package/selection/highlight/types/{focus.js → cell.js} +8 -5
- package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
- package/selection/highlight/types/customSelection.js +10 -7
- package/selection/highlight/types/customSelection.mjs +9 -7
- package/selection/highlight/types/fill.js +8 -5
- package/selection/highlight/types/fill.mjs +7 -5
- package/selection/highlight/types/header.js +20 -10
- package/selection/highlight/types/header.mjs +19 -10
- package/selection/highlight/types/{row.js → index.js} +31 -27
- package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
- package/selection/highlight/visualSelection.js +27 -31
- package/selection/highlight/visualSelection.mjs +27 -31
- package/selection/index.js +7 -4
- package/selection/index.mjs +3 -2
- package/selection/mouseEventHandler.js +1 -1
- package/selection/mouseEventHandler.mjs +1 -1
- package/selection/range.js +8 -8
- package/selection/range.mjs +8 -8
- package/selection/selection.js +181 -315
- package/selection/selection.mjs +180 -310
- package/selection/transformation.js +96 -233
- package/selection/transformation.mjs +93 -230
- package/selection/utils.js +36 -12
- package/selection/utils.mjs +36 -13
- package/settings.d.ts +0 -1
- package/shortcuts/manager.js +0 -2
- package/shortcuts/manager.mjs +0 -2
- package/tableView.js +9 -58
- package/tableView.mjs +9 -58
- package/translations/indexMapper.js +7 -56
- package/translations/indexMapper.mjs +8 -56
- package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
- package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
- package/3rdparty/walkontable/src/selection/constants.js +0 -63
- package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
- package/3rdparty/walkontable/src/selection/index.js +0 -30
- package/3rdparty/walkontable/src/selection/index.mjs +0 -5
- package/3rdparty/walkontable/src/selection/manager.js +0 -329
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -323
- package/3rdparty/walkontable/src/selection/scanner.js +0 -364
- package/3rdparty/walkontable/src/selection/scanner.mjs +0 -360
- package/3rdparty/walkontable/src/selection/selection.js +0 -133
- package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
- package/selection/highlight/types/areaLayered.js +0 -54
- package/selection/highlight/types/areaLayered.mjs +0 -49
- package/selection/highlight/types/column.js +0 -50
- package/selection/highlight/types/column.mjs +0 -45
- package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
- package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
- package/shortcutContexts/commands/editor/fastOpen.js +0 -16
- package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
- package/shortcutContexts/commands/editor/index.js +0 -16
- package/shortcutContexts/commands/editor/index.mjs +0 -12
- package/shortcutContexts/commands/editor/open.js +0 -29
- package/shortcutContexts/commands/editor/open.mjs +0 -24
- package/shortcutContexts/commands/emptySelectedCells.js +0 -12
- package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
- package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/extendCellsSelection/index.js +0 -26
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -22
- package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +0 -19
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +0 -14
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -40
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -35
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -40
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -35
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +0 -19
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +0 -14
- package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/index.js +0 -52
- package/shortcutContexts/commands/index.mjs +0 -48
- package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -29
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -24
- package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
- package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -36
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -31
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -36
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -31
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
- package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -29
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -24
- package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
- package/shortcutContexts/commands/selectAll.js +0 -11
- package/shortcutContexts/commands/selectAll.mjs +0 -6
- package/shortcutContexts/constants.js +0 -19
- package/shortcutContexts/constants.mjs +0 -12
- package/shortcutContexts/editor.js +0 -29
- package/shortcutContexts/editor.mjs +0 -25
- package/shortcutContexts/grid.js +0 -244
- package/shortcutContexts/grid.mjs +0 -240
- package/shortcutContexts/index.js +0 -29
- package/shortcutContexts/index.mjs +0 -15
package/pluginHooks.js
CHANGED
@@ -680,94 +680,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
680
680
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
681
681
|
*/
|
682
682
|
'afterSelectionEndByProp',
|
683
|
-
/**
|
684
|
-
* Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
685
|
-
*
|
686
|
-
* @since 13.0.0
|
687
|
-
* @event Hooks#beforeSelectColumns
|
688
|
-
* @param {CellCoords} from Selection start coords object.
|
689
|
-
* @param {CellCoords} to Selection end coords object.
|
690
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
691
|
-
* @example
|
692
|
-
* ::: only-for javascript
|
693
|
-
* ```js
|
694
|
-
* new Handsontable(element, {
|
695
|
-
* beforeSelectColumns: (from, to, highlight) => {
|
696
|
-
* // Extend the column selection by one column left and one column right.
|
697
|
-
* from.col = Math.max(from.col - 1, 0);
|
698
|
-
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
699
|
-
* }
|
700
|
-
* })
|
701
|
-
* ```
|
702
|
-
* :::
|
703
|
-
*
|
704
|
-
* ::: only-for react
|
705
|
-
* ```jsx
|
706
|
-
* <HotTable
|
707
|
-
* beforeSelectColumns={(from, to, highlight) => {
|
708
|
-
* // Extend the column selection by one column left and one column right.
|
709
|
-
* from.col = Math.max(from.col - 1, 0);
|
710
|
-
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
711
|
-
* }}
|
712
|
-
* />
|
713
|
-
* ```
|
714
|
-
* :::
|
715
|
-
*/
|
716
|
-
'beforeSelectColumns',
|
717
|
-
/**
|
718
|
-
* Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
719
|
-
*
|
720
|
-
* @since 13.0.0
|
721
|
-
* @event Hooks#afterSelectColumns
|
722
|
-
* @param {CellCoords} from Selection start coords object.
|
723
|
-
* @param {CellCoords} to Selection end coords object.
|
724
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
725
|
-
*/
|
726
|
-
'afterSelectColumns',
|
727
|
-
/**
|
728
|
-
* Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
729
|
-
*
|
730
|
-
* @since 13.0.0
|
731
|
-
* @event Hooks#beforeSelectRows
|
732
|
-
* @param {CellCoords} from Selection start coords object.
|
733
|
-
* @param {CellCoords} to Selection end coords object.
|
734
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
735
|
-
* @example
|
736
|
-
* ::: only-for javascript
|
737
|
-
* ```js
|
738
|
-
* new Handsontable(element, {
|
739
|
-
* beforeSelectRows: (from, to, highlight) => {
|
740
|
-
* // Extend the row selection by one row up and one row bottom more.
|
741
|
-
* from.row = Math.max(from.row - 1, 0);
|
742
|
-
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
743
|
-
* }
|
744
|
-
* })
|
745
|
-
* ```
|
746
|
-
* :::
|
747
|
-
*
|
748
|
-
* ::: only-for react
|
749
|
-
* ```jsx
|
750
|
-
* <HotTable
|
751
|
-
* beforeSelectRows={(from, to, highlight) => {
|
752
|
-
* // Extend the row selection by one row up and one row bottom more.
|
753
|
-
* from.row = Math.max(from.row - 1, 0);
|
754
|
-
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
755
|
-
* }}
|
756
|
-
* />
|
757
|
-
* ```
|
758
|
-
* :::
|
759
|
-
*/
|
760
|
-
'beforeSelectRows',
|
761
|
-
/**
|
762
|
-
* Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
763
|
-
*
|
764
|
-
* @since 13.0.0
|
765
|
-
* @event Hooks#afterSelectRows
|
766
|
-
* @param {CellCoords} from Selection start coords object.
|
767
|
-
* @param {CellCoords} to Selection end coords object.
|
768
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
769
|
-
*/
|
770
|
-
'afterSelectRows',
|
771
683
|
/**
|
772
684
|
* Fired after cell meta is changed.
|
773
685
|
*
|
@@ -2071,17 +1983,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
2071
1983
|
* @param {number} rowHeaderWidth Row header width.
|
2072
1984
|
*/
|
2073
1985
|
'modifyRowHeaderWidth',
|
2074
|
-
/**
|
2075
|
-
* Fired from the `populateFromArray` method during the `autofill` process. Fired for each "autofilled" cell individually.
|
2076
|
-
*
|
2077
|
-
* @deprecated
|
2078
|
-
* @event Hooks#beforeAutofillInsidePopulate
|
2079
|
-
* @param {object} index Object containing `row` and `col` properties, defining the number of rows/columns from the initial cell of the autofill.
|
2080
|
-
* @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.
|
2081
|
-
* @param {Array[]} input Contains an array of rows with data being used in the autofill.
|
2082
|
-
* @param {Array} deltas The deltas array passed to the `populateFromArray` method.
|
2083
|
-
*/
|
2084
|
-
'beforeAutofillInsidePopulate',
|
2085
1986
|
/**
|
2086
1987
|
* Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
|
2087
1988
|
*
|
@@ -2502,7 +2403,7 @@ var REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], ['u
|
|
2502
2403
|
* @type {Map<string, string>}
|
2503
2404
|
*/
|
2504
2405
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
2505
|
-
var DEPRECATED_HOOKS = new Map([
|
2406
|
+
var DEPRECATED_HOOKS = new Map([]);
|
2506
2407
|
var Hooks = /*#__PURE__*/function () {
|
2507
2408
|
/**
|
2508
2409
|
*
|
package/pluginHooks.mjs
CHANGED
@@ -677,94 +677,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
677
677
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
678
678
|
*/
|
679
679
|
'afterSelectionEndByProp',
|
680
|
-
/**
|
681
|
-
* Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
682
|
-
*
|
683
|
-
* @since 13.0.0
|
684
|
-
* @event Hooks#beforeSelectColumns
|
685
|
-
* @param {CellCoords} from Selection start coords object.
|
686
|
-
* @param {CellCoords} to Selection end coords object.
|
687
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
688
|
-
* @example
|
689
|
-
* ::: only-for javascript
|
690
|
-
* ```js
|
691
|
-
* new Handsontable(element, {
|
692
|
-
* beforeSelectColumns: (from, to, highlight) => {
|
693
|
-
* // Extend the column selection by one column left and one column right.
|
694
|
-
* from.col = Math.max(from.col - 1, 0);
|
695
|
-
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
696
|
-
* }
|
697
|
-
* })
|
698
|
-
* ```
|
699
|
-
* :::
|
700
|
-
*
|
701
|
-
* ::: only-for react
|
702
|
-
* ```jsx
|
703
|
-
* <HotTable
|
704
|
-
* beforeSelectColumns={(from, to, highlight) => {
|
705
|
-
* // Extend the column selection by one column left and one column right.
|
706
|
-
* from.col = Math.max(from.col - 1, 0);
|
707
|
-
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
708
|
-
* }}
|
709
|
-
* />
|
710
|
-
* ```
|
711
|
-
* :::
|
712
|
-
*/
|
713
|
-
'beforeSelectColumns',
|
714
|
-
/**
|
715
|
-
* Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
716
|
-
*
|
717
|
-
* @since 13.0.0
|
718
|
-
* @event Hooks#afterSelectColumns
|
719
|
-
* @param {CellCoords} from Selection start coords object.
|
720
|
-
* @param {CellCoords} to Selection end coords object.
|
721
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
722
|
-
*/
|
723
|
-
'afterSelectColumns',
|
724
|
-
/**
|
725
|
-
* Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
726
|
-
*
|
727
|
-
* @since 13.0.0
|
728
|
-
* @event Hooks#beforeSelectRows
|
729
|
-
* @param {CellCoords} from Selection start coords object.
|
730
|
-
* @param {CellCoords} to Selection end coords object.
|
731
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
732
|
-
* @example
|
733
|
-
* ::: only-for javascript
|
734
|
-
* ```js
|
735
|
-
* new Handsontable(element, {
|
736
|
-
* beforeSelectRows: (from, to, highlight) => {
|
737
|
-
* // Extend the row selection by one row up and one row bottom more.
|
738
|
-
* from.row = Math.max(from.row - 1, 0);
|
739
|
-
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
740
|
-
* }
|
741
|
-
* })
|
742
|
-
* ```
|
743
|
-
* :::
|
744
|
-
*
|
745
|
-
* ::: only-for react
|
746
|
-
* ```jsx
|
747
|
-
* <HotTable
|
748
|
-
* beforeSelectRows={(from, to, highlight) => {
|
749
|
-
* // Extend the row selection by one row up and one row bottom more.
|
750
|
-
* from.row = Math.max(from.row - 1, 0);
|
751
|
-
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
752
|
-
* }}
|
753
|
-
* />
|
754
|
-
* ```
|
755
|
-
* :::
|
756
|
-
*/
|
757
|
-
'beforeSelectRows',
|
758
|
-
/**
|
759
|
-
* Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
760
|
-
*
|
761
|
-
* @since 13.0.0
|
762
|
-
* @event Hooks#afterSelectRows
|
763
|
-
* @param {CellCoords} from Selection start coords object.
|
764
|
-
* @param {CellCoords} to Selection end coords object.
|
765
|
-
* @param {CellCoords} highlight Selection cell focus coords object.
|
766
|
-
*/
|
767
|
-
'afterSelectRows',
|
768
680
|
/**
|
769
681
|
* Fired after cell meta is changed.
|
770
682
|
*
|
@@ -2068,17 +1980,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
2068
1980
|
* @param {number} rowHeaderWidth Row header width.
|
2069
1981
|
*/
|
2070
1982
|
'modifyRowHeaderWidth',
|
2071
|
-
/**
|
2072
|
-
* Fired from the `populateFromArray` method during the `autofill` process. Fired for each "autofilled" cell individually.
|
2073
|
-
*
|
2074
|
-
* @deprecated
|
2075
|
-
* @event Hooks#beforeAutofillInsidePopulate
|
2076
|
-
* @param {object} index Object containing `row` and `col` properties, defining the number of rows/columns from the initial cell of the autofill.
|
2077
|
-
* @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.
|
2078
|
-
* @param {Array[]} input Contains an array of rows with data being used in the autofill.
|
2079
|
-
* @param {Array} deltas The deltas array passed to the `populateFromArray` method.
|
2080
|
-
*/
|
2081
|
-
'beforeAutofillInsidePopulate',
|
2082
1983
|
/**
|
2083
1984
|
* Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
|
2084
1985
|
*
|
@@ -2499,7 +2400,7 @@ var REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], ['u
|
|
2499
2400
|
* @type {Map<string, string>}
|
2500
2401
|
*/
|
2501
2402
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
2502
|
-
var DEPRECATED_HOOKS = new Map([
|
2403
|
+
var DEPRECATED_HOOKS = new Map([]);
|
2503
2404
|
var Hooks = /*#__PURE__*/function () {
|
2504
2405
|
/**
|
2505
2406
|
*
|
@@ -298,7 +298,6 @@ var Autofill = /*#__PURE__*/function (_BasePlugin) {
|
|
298
298
|
this.hot.render();
|
299
299
|
return false;
|
300
300
|
}
|
301
|
-
var deltas = (0, _utils.getDeltas)(startOfDragCoords, endOfDragCoords, selectionData, directionOfDrag);
|
302
301
|
var fillData = beforeAutofillHookResult;
|
303
302
|
var res = beforeAutofillHookResult;
|
304
303
|
if (['up', 'left'].indexOf(directionOfDrag) > -1 && !(res.length === 1 && res[0].length === 0)) {
|
@@ -320,7 +319,7 @@ var Autofill = /*#__PURE__*/function (_BasePlugin) {
|
|
320
319
|
}
|
321
320
|
}
|
322
321
|
}
|
323
|
-
this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null
|
322
|
+
this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null);
|
324
323
|
this.setSelection(cornersOfSelectionAndDragAreas);
|
325
324
|
this.hot.runHooks('afterAutofill', fillData, sourceRange, targetRange, directionOfDrag);
|
326
325
|
this.hot.render();
|
@@ -52,7 +52,7 @@ import Hooks from "../../pluginHooks.mjs";
|
|
52
52
|
import { offset, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
|
53
53
|
import { arrayEach, arrayMap } from "../../helpers/array.mjs";
|
54
54
|
import EventManager from "../../eventManager.mjs";
|
55
|
-
import {
|
55
|
+
import { getDragDirectionAndRange, DIRECTIONS, getMappedFillHandleSetting } from "./utils.mjs";
|
56
56
|
Hooks.getSingleton().register('modifyAutofillRange');
|
57
57
|
Hooks.getSingleton().register('beforeAutofill');
|
58
58
|
Hooks.getSingleton().register('afterAutofill');
|
@@ -292,7 +292,6 @@ export var Autofill = /*#__PURE__*/function (_BasePlugin) {
|
|
292
292
|
this.hot.render();
|
293
293
|
return false;
|
294
294
|
}
|
295
|
-
var deltas = getDeltas(startOfDragCoords, endOfDragCoords, selectionData, directionOfDrag);
|
296
295
|
var fillData = beforeAutofillHookResult;
|
297
296
|
var res = beforeAutofillHookResult;
|
298
297
|
if (['up', 'left'].indexOf(directionOfDrag) > -1 && !(res.length === 1 && res[0].length === 0)) {
|
@@ -314,7 +313,7 @@ export var Autofill = /*#__PURE__*/function (_BasePlugin) {
|
|
314
313
|
}
|
315
314
|
}
|
316
315
|
}
|
317
|
-
this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null
|
316
|
+
this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null);
|
318
317
|
this.setSelection(cornersOfSelectionAndDragAreas);
|
319
318
|
this.hot.runHooks('afterAutofill', fillData, sourceRange, targetRange, directionOfDrag);
|
320
319
|
this.hot.render();
|
@@ -2,10 +2,8 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.DIRECTIONS = void 0;
|
5
|
-
exports.getDeltas = getDeltas;
|
6
5
|
exports.getDragDirectionAndRange = getDragDirectionAndRange;
|
7
6
|
exports.getMappedFillHandleSetting = getMappedFillHandleSetting;
|
8
|
-
require("core-js/modules/es.array.index-of.js");
|
9
7
|
require("core-js/modules/es.object.keys.js");
|
10
8
|
var _object = require("../../helpers/object");
|
11
9
|
var _mixed = require("../../helpers/mixed");
|
@@ -14,43 +12,6 @@ var DIRECTIONS = {
|
|
14
12
|
vertical: 'vertical'
|
15
13
|
};
|
16
14
|
|
17
|
-
/**
|
18
|
-
* Get deltas array.
|
19
|
-
*
|
20
|
-
* @param {CellCoords} start The point in the grid where the selection starts.
|
21
|
-
* @param {CellCoords} end The point in the grid where the selection ends.
|
22
|
-
* @param {Array} data The chunk of the data which belongs to the selected box.
|
23
|
-
* @param {string} direction The selection direction.
|
24
|
-
* @returns {Array}
|
25
|
-
*/
|
26
|
-
exports.DIRECTIONS = DIRECTIONS;
|
27
|
-
function getDeltas(start, end, data, direction) {
|
28
|
-
var rowsLength = data.length;
|
29
|
-
var columnsLength = data ? data[0].length : 0;
|
30
|
-
var deltas = [];
|
31
|
-
var diffRow = end.row - start.row;
|
32
|
-
var diffCol = end.col - start.col;
|
33
|
-
if (['down', 'up'].indexOf(direction) !== -1) {
|
34
|
-
var arr = [];
|
35
|
-
for (var col = 0; col < diffCol; col++) {
|
36
|
-
var startValue = parseInt(data[0][col], 10);
|
37
|
-
var endValue = parseInt(data[rowsLength - 1][col], 10);
|
38
|
-
var delta = (direction === 'down' ? endValue - startValue : startValue - endValue) / (rowsLength - 1) || 0;
|
39
|
-
arr.push(delta);
|
40
|
-
}
|
41
|
-
deltas.push(arr);
|
42
|
-
}
|
43
|
-
if (['right', 'left'].indexOf(direction) !== -1) {
|
44
|
-
for (var row = 0; row < diffRow; row++) {
|
45
|
-
var _startValue = parseInt(data[row][0], 10);
|
46
|
-
var _endValue = parseInt(data[row][columnsLength - 1], 10);
|
47
|
-
var _delta = (direction === 'right' ? _endValue - _startValue : _startValue - _endValue) / (columnsLength - 1) || 0;
|
48
|
-
deltas.push([_delta]);
|
49
|
-
}
|
50
|
-
}
|
51
|
-
return deltas;
|
52
|
-
}
|
53
|
-
|
54
15
|
/**
|
55
16
|
* Get direction between positions and cords of selections difference (drag area).
|
56
17
|
*
|
@@ -59,6 +20,7 @@ function getDeltas(start, end, data, direction) {
|
|
59
20
|
* @param {Function} cellCoordsFactory The function factory for CellCoords objects.
|
60
21
|
* @returns {{direction: string, start: CellCoords, end: CellCoords}}
|
61
22
|
*/
|
23
|
+
exports.DIRECTIONS = DIRECTIONS;
|
62
24
|
function getDragDirectionAndRange(startSelection, endSelection, cellCoordsFactory) {
|
63
25
|
var startOfDragCoords;
|
64
26
|
var endOfDragCoords;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import "core-js/modules/es.array.index-of.js";
|
2
1
|
import "core-js/modules/es.object.keys.js";
|
3
2
|
import { isObject } from "../../helpers/object.mjs";
|
4
3
|
import { isDefined } from "../../helpers/mixed.mjs";
|
@@ -7,42 +6,6 @@ export var DIRECTIONS = {
|
|
7
6
|
vertical: 'vertical'
|
8
7
|
};
|
9
8
|
|
10
|
-
/**
|
11
|
-
* Get deltas array.
|
12
|
-
*
|
13
|
-
* @param {CellCoords} start The point in the grid where the selection starts.
|
14
|
-
* @param {CellCoords} end The point in the grid where the selection ends.
|
15
|
-
* @param {Array} data The chunk of the data which belongs to the selected box.
|
16
|
-
* @param {string} direction The selection direction.
|
17
|
-
* @returns {Array}
|
18
|
-
*/
|
19
|
-
export function getDeltas(start, end, data, direction) {
|
20
|
-
var rowsLength = data.length;
|
21
|
-
var columnsLength = data ? data[0].length : 0;
|
22
|
-
var deltas = [];
|
23
|
-
var diffRow = end.row - start.row;
|
24
|
-
var diffCol = end.col - start.col;
|
25
|
-
if (['down', 'up'].indexOf(direction) !== -1) {
|
26
|
-
var arr = [];
|
27
|
-
for (var col = 0; col < diffCol; col++) {
|
28
|
-
var startValue = parseInt(data[0][col], 10);
|
29
|
-
var endValue = parseInt(data[rowsLength - 1][col], 10);
|
30
|
-
var delta = (direction === 'down' ? endValue - startValue : startValue - endValue) / (rowsLength - 1) || 0;
|
31
|
-
arr.push(delta);
|
32
|
-
}
|
33
|
-
deltas.push(arr);
|
34
|
-
}
|
35
|
-
if (['right', 'left'].indexOf(direction) !== -1) {
|
36
|
-
for (var row = 0; row < diffRow; row++) {
|
37
|
-
var _startValue = parseInt(data[row][0], 10);
|
38
|
-
var _endValue = parseInt(data[row][columnsLength - 1], 10);
|
39
|
-
var _delta = (direction === 'right' ? _endValue - _startValue : _startValue - _endValue) / (columnsLength - 1) || 0;
|
40
|
-
deltas.push([_delta]);
|
41
|
-
}
|
42
|
-
}
|
43
|
-
return deltas;
|
44
|
-
}
|
45
|
-
|
46
9
|
/**
|
47
10
|
* Get direction between positions and cords of selections difference (drag area).
|
48
11
|
*
|
@@ -528,10 +528,6 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
|
|
528
528
|
if (!selectionRange) {
|
529
529
|
return;
|
530
530
|
}
|
531
|
-
if (selectionRange.isSingleHeader()) {
|
532
|
-
this.copyableRanges = [];
|
533
|
-
return;
|
534
|
-
}
|
535
531
|
_classPrivateFieldGet(this, _copyableRangesFactory).setSelectedRange(selectionRange);
|
536
532
|
var groupedRanges = new Map([['headers', null], ['cells', null]]);
|
537
533
|
if (_classPrivateFieldGet(this, _copyMode) === 'column-headers-only') {
|
@@ -760,7 +756,7 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
|
|
760
756
|
if (typeof pastedData === 'string') {
|
761
757
|
pastedData = (0, _SheetClip.parse)(pastedData);
|
762
758
|
}
|
763
|
-
if (pastedData
|
759
|
+
if (pastedData && pastedData.length === 0) {
|
764
760
|
return;
|
765
761
|
}
|
766
762
|
if (this.hot.runHooks('beforePaste', pastedData, this.copyableRanges) === false) {
|
@@ -521,10 +521,6 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
|
|
521
521
|
if (!selectionRange) {
|
522
522
|
return;
|
523
523
|
}
|
524
|
-
if (selectionRange.isSingleHeader()) {
|
525
|
-
this.copyableRanges = [];
|
526
|
-
return;
|
527
|
-
}
|
528
524
|
_classPrivateFieldGet(this, _copyableRangesFactory).setSelectedRange(selectionRange);
|
529
525
|
var groupedRanges = new Map([['headers', null], ['cells', null]]);
|
530
526
|
if (_classPrivateFieldGet(this, _copyMode) === 'column-headers-only') {
|
@@ -753,7 +749,7 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
|
|
753
749
|
if (typeof pastedData === 'string') {
|
754
750
|
pastedData = parse(pastedData);
|
755
751
|
}
|
756
|
-
if (pastedData
|
752
|
+
if (pastedData && pastedData.length === 0) {
|
757
753
|
return;
|
758
754
|
}
|
759
755
|
if (this.hot.runHooks('beforePaste', pastedData, this.copyableRanges) === false) {
|
@@ -9,6 +9,11 @@ require("core-js/modules/es.symbol.iterator.js");
|
|
9
9
|
require("core-js/modules/es.array.iterator.js");
|
10
10
|
require("core-js/modules/es.string.iterator.js");
|
11
11
|
require("core-js/modules/web.dom-collections.iterator.js");
|
12
|
+
require("core-js/modules/es.array.slice.js");
|
13
|
+
require("core-js/modules/es.regexp.to-string.js");
|
14
|
+
require("core-js/modules/es.function.name.js");
|
15
|
+
require("core-js/modules/es.array.from.js");
|
16
|
+
require("core-js/modules/es.regexp.exec.js");
|
12
17
|
require("core-js/modules/es.weak-map.js");
|
13
18
|
exports.__esModule = true;
|
14
19
|
exports.PLUGIN_PRIORITY = exports.PLUGIN_KEY = exports.CustomBorders = void 0;
|
@@ -34,6 +39,12 @@ var _selection = require("../../selection");
|
|
34
39
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
35
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
36
41
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
43
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
44
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
45
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
46
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
47
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
37
48
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
38
49
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
39
50
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
@@ -219,11 +230,25 @@ var CustomBorders = /*#__PURE__*/function (_BasePlugin) {
|
|
219
230
|
var selectionType = (0, _selection.detectSelectionType)(selectionRanges);
|
220
231
|
var selectionSchemaNormalizer = (0, _selection.normalizeSelectionFactory)(selectionType);
|
221
232
|
(0, _array.arrayEach)(selectionRanges, function (selection) {
|
222
|
-
selectionSchemaNormalizer(selection)
|
223
|
-
(
|
224
|
-
|
225
|
-
|
226
|
-
|
233
|
+
var _selectionSchemaNorma = selectionSchemaNormalizer(selection),
|
234
|
+
_selectionSchemaNorma2 = _slicedToArray(_selectionSchemaNorma, 4),
|
235
|
+
rowStart = _selectionSchemaNorma2[0],
|
236
|
+
columnStart = _selectionSchemaNorma2[1],
|
237
|
+
rowEnd = _selectionSchemaNorma2[2],
|
238
|
+
columnEnd = _selectionSchemaNorma2[3];
|
239
|
+
var _loop = function _loop(row) {
|
240
|
+
var _loop2 = function _loop2(col) {
|
241
|
+
(0, _array.arrayEach)(borderKeys, function (borderKey) {
|
242
|
+
_this3.prepareBorderFromCustomAdded(row, col, normBorder, (0, _utils.toInlinePropName)(borderKey));
|
243
|
+
});
|
244
|
+
};
|
245
|
+
for (var col = columnStart; col <= columnEnd; col += 1) {
|
246
|
+
_loop2(col);
|
247
|
+
}
|
248
|
+
};
|
249
|
+
for (var row = rowStart; row <= rowEnd; row += 1) {
|
250
|
+
_loop(row);
|
251
|
+
}
|
227
252
|
});
|
228
253
|
|
229
254
|
/*
|
@@ -266,13 +291,27 @@ var CustomBorders = /*#__PURE__*/function (_BasePlugin) {
|
|
266
291
|
var selectionSchemaNormalizer = (0, _selection.normalizeSelectionFactory)(selectionType);
|
267
292
|
var selectedBorders = [];
|
268
293
|
(0, _array.arrayEach)(selectionRanges, function (selection) {
|
269
|
-
selectionSchemaNormalizer(selection)
|
270
|
-
(
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
294
|
+
var _selectionSchemaNorma3 = selectionSchemaNormalizer(selection),
|
295
|
+
_selectionSchemaNorma4 = _slicedToArray(_selectionSchemaNorma3, 4),
|
296
|
+
rowStart = _selectionSchemaNorma4[0],
|
297
|
+
columnStart = _selectionSchemaNorma4[1],
|
298
|
+
rowEnd = _selectionSchemaNorma4[2],
|
299
|
+
columnEnd = _selectionSchemaNorma4[3];
|
300
|
+
var _loop3 = function _loop3(row) {
|
301
|
+
var _loop4 = function _loop4(col) {
|
302
|
+
(0, _array.arrayEach)(_this4.savedBorders, function (border) {
|
303
|
+
if (border.row === row && border.col === col) {
|
304
|
+
selectedBorders.push((0, _utils.denormalizeBorder)(border));
|
305
|
+
}
|
306
|
+
});
|
307
|
+
};
|
308
|
+
for (var col = columnStart; col <= columnEnd; col += 1) {
|
309
|
+
_loop4(col);
|
310
|
+
}
|
311
|
+
};
|
312
|
+
for (var row = rowStart; row <= rowEnd; row += 1) {
|
313
|
+
_loop3(row);
|
314
|
+
}
|
276
315
|
});
|
277
316
|
return selectedBorders;
|
278
317
|
}
|
@@ -697,12 +736,10 @@ var CustomBorders = /*#__PURE__*/function (_BasePlugin) {
|
|
697
736
|
}, {
|
698
737
|
key: "checkCustomSelectionsFromContextMenu",
|
699
738
|
value: function checkCustomSelectionsFromContextMenu(border, place, remove) {
|
700
|
-
var _this12 = this;
|
701
739
|
var check = false;
|
702
740
|
(0, _array.arrayEach)(this.hot.selection.highlight.customSelections, function (customSelection) {
|
703
741
|
if (border.id === customSelection.settings.id) {
|
704
|
-
|
705
|
-
(0, _array.arrayEach)(borders, function (borderObject) {
|
742
|
+
(0, _object.objectEach)(customSelection.instanceBorders, function (borderObject) {
|
706
743
|
borderObject.toggleHiddenClass(place, remove); // TODO this also bad?
|
707
744
|
});
|
708
745
|
|
@@ -727,7 +764,6 @@ var CustomBorders = /*#__PURE__*/function (_BasePlugin) {
|
|
727
764
|
}, {
|
728
765
|
key: "checkCustomSelections",
|
729
766
|
value: function checkCustomSelections(border, cellRange, place) {
|
730
|
-
var _this13 = this;
|
731
767
|
var hideCount = this.countHide(border);
|
732
768
|
var check = false;
|
733
769
|
if (hideCount === 4) {
|
@@ -739,8 +775,7 @@ var CustomBorders = /*#__PURE__*/function (_BasePlugin) {
|
|
739
775
|
customSelection.visualCellRange = cellRange;
|
740
776
|
customSelection.commit();
|
741
777
|
if (place) {
|
742
|
-
|
743
|
-
(0, _array.arrayEach)(borders, function (borderObject) {
|
778
|
+
(0, _object.objectEach)(customSelection.instanceBorders, function (borderObject) {
|
744
779
|
borderObject.changeBorderStyle(place, border);
|
745
780
|
});
|
746
781
|
}
|