@rowsncolumns/spreadsheet 10.6.4 → 10.7.0
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/dist/cjs/api/autocomplete.d.ts +42 -0
- package/dist/cjs/api/autocomplete.d.ts.map +1 -0
- package/dist/cjs/api/autocomplete.js +114 -0
- package/dist/cjs/api/banded-ranges.d.ts.map +1 -1
- package/dist/cjs/api/banded-ranges.js +51 -1
- package/dist/cjs/api/error-checking.d.ts +82 -0
- package/dist/cjs/api/error-checking.d.ts.map +1 -0
- package/dist/cjs/api/error-checking.js +207 -0
- package/dist/cjs/api/move-overwrite.d.ts +8 -2
- package/dist/cjs/api/move-overwrite.d.ts.map +1 -1
- package/dist/cjs/api/move-overwrite.js +19 -3
- package/dist/cjs/api/selections.d.ts +2 -2
- package/dist/cjs/api/validation.d.ts +39 -1
- package/dist/cjs/api/validation.d.ts.map +1 -1
- package/dist/cjs/api/validation.js +87 -1
- package/dist/cjs/atoms/cell-input-context.atom.d.ts +4 -1
- package/dist/cjs/atoms/cell-input-context.atom.d.ts.map +1 -1
- package/dist/cjs/atoms/enter-key-direction.atom.d.ts +11 -0
- package/dist/cjs/atoms/enter-key-direction.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/enter-key-direction.atom.js +13 -0
- package/dist/cjs/atoms/index.d.ts +1 -0
- package/dist/cjs/atoms/index.d.ts.map +1 -1
- package/dist/cjs/atoms/index.js +1 -0
- package/dist/cjs/atoms/paste-menu.atom.d.ts +22 -0
- package/dist/cjs/atoms/paste-menu.atom.d.ts.map +1 -1
- package/dist/cjs/atoms/paste-menu.atom.js +13 -1
- package/dist/cjs/atoms/pick-list.atom.d.ts +15 -0
- package/dist/cjs/atoms/pick-list.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/pick-list.atom.js +7 -0
- package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/cjs/components/canvas-grid/index.js +305 -70
- package/dist/cjs/components/canvas-grid/typings.d.ts +96 -11
- package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.d.ts +25 -0
- package/dist/cjs/components/cell/alignment.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.js +39 -1
- package/dist/cjs/components/cell/cell-background.d.ts +16 -0
- package/dist/cjs/components/cell/cell-background.d.ts.map +1 -1
- package/dist/cjs/components/cell/cell-background.js +141 -54
- package/dist/cjs/components/cell/cell-text-runs.d.ts +12 -5
- package/dist/cjs/components/cell/cell-text-runs.d.ts.map +1 -1
- package/dist/cjs/components/cell/cell-text-runs.js +18 -20
- package/dist/cjs/components/cell/index.d.ts.map +1 -1
- package/dist/cjs/components/cell/index.js +26 -21
- package/dist/cjs/components/cell/typings.d.ts +9 -0
- package/dist/cjs/components/cell/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell-editor/helpers.d.ts +22 -2
- package/dist/cjs/components/cell-editor/helpers.d.ts.map +1 -1
- package/dist/cjs/components/cell-editor/helpers.js +32 -8
- package/dist/cjs/components/cell-editor/index.d.ts +7 -1
- package/dist/cjs/components/cell-editor/index.d.ts.map +1 -1
- package/dist/cjs/components/cell-editor/index.js +85 -13
- package/dist/cjs/components/cell-indicator/index.d.ts +41 -0
- package/dist/cjs/components/cell-indicator/index.d.ts.map +1 -0
- package/dist/cjs/components/cell-indicator/index.js +90 -0
- package/dist/cjs/components/cell-input/cell-input.d.ts +10 -2
- package/dist/cjs/components/cell-input/cell-input.d.ts.map +1 -1
- package/dist/cjs/components/cell-input/cell-input.js +5 -3
- package/dist/cjs/components/cell-input/formula-bar-cell-input.d.ts.map +1 -1
- package/dist/cjs/components/cell-input/formula-bar-cell-input.js +9 -2
- package/dist/cjs/components/cell-structured/sparkline-math.d.ts +27 -1
- package/dist/cjs/components/cell-structured/sparkline-math.d.ts.map +1 -1
- package/dist/cjs/components/cell-structured/sparkline-math.js +48 -1
- package/dist/cjs/components/cell-structured/sparkline.d.ts +1 -1
- package/dist/cjs/components/cell-structured/sparkline.d.ts.map +1 -1
- package/dist/cjs/components/cell-structured/sparkline.js +36 -92
- package/dist/cjs/components/cell-structured/types.d.ts +6 -0
- package/dist/cjs/components/cell-structured/types.d.ts.map +1 -1
- package/dist/cjs/components/data-table-dialog/index.d.ts +22 -0
- package/dist/cjs/components/data-table-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/data-table-dialog/index.js +93 -0
- package/dist/cjs/components/error-check-smart-tag/index.d.ts +27 -0
- package/dist/cjs/components/error-check-smart-tag/index.d.ts.map +1 -0
- package/dist/cjs/components/error-check-smart-tag/index.js +39 -0
- package/dist/cjs/components/forecast-sheet-dialog/index.d.ts +26 -0
- package/dist/cjs/components/forecast-sheet-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/forecast-sheet-dialog/index.js +92 -0
- package/dist/cjs/components/paste-special-dialog/index.d.ts +3 -3
- package/dist/cjs/components/paste-special-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/paste-special-dialog/index.js +61 -23
- package/dist/cjs/components/protect-sheet-dialog/allow-edit-ranges-dialog.d.ts +57 -0
- package/dist/cjs/components/protect-sheet-dialog/allow-edit-ranges-dialog.d.ts.map +1 -0
- package/dist/cjs/components/protect-sheet-dialog/allow-edit-ranges-dialog.js +196 -0
- package/dist/cjs/components/protect-sheet-dialog/constants.d.ts +3 -0
- package/dist/cjs/components/protect-sheet-dialog/constants.d.ts.map +1 -0
- package/dist/cjs/components/protect-sheet-dialog/constants.js +5 -0
- package/dist/cjs/components/protect-sheet-dialog/index.d.ts +2 -2
- package/dist/cjs/components/protect-sheet-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/protect-sheet-dialog/index.js +5 -3
- package/dist/cjs/components/scenario-manager-dialog/index.d.ts +51 -0
- package/dist/cjs/components/scenario-manager-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/scenario-manager-dialog/index.js +257 -0
- package/dist/cjs/components/selection/index.d.ts +1 -1
- package/dist/cjs/components/selection/index.d.ts.map +1 -1
- package/dist/cjs/components/selection/index.js +9 -4
- package/dist/cjs/components/selection/paste-menu.d.ts +14 -1
- package/dist/cjs/components/selection/paste-menu.d.ts.map +1 -1
- package/dist/cjs/components/selection/paste-menu.js +78 -6
- package/dist/cjs/components/selection/paste-options.d.ts +28 -0
- package/dist/cjs/components/selection/paste-options.d.ts.map +1 -0
- package/dist/cjs/components/selection/paste-options.js +70 -0
- package/dist/cjs/components/selection/types.d.ts +12 -1
- package/dist/cjs/components/selection/types.d.ts.map +1 -1
- package/dist/cjs/components/selection-drop-menu/index.d.ts +18 -0
- package/dist/cjs/components/selection-drop-menu/index.d.ts.map +1 -0
- package/dist/cjs/components/selection-drop-menu/index.js +62 -0
- package/dist/cjs/components/solver-dialog/index.d.ts +57 -0
- package/dist/cjs/components/solver-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/solver-dialog/index.js +204 -0
- package/dist/cjs/components/toolbar/sparkline-actions.d.ts +3 -2
- package/dist/cjs/components/toolbar/sparkline-actions.d.ts.map +1 -1
- package/dist/cjs/components/toolbar/sparkline-actions.js +6 -2
- package/dist/cjs/components/toolbar/table-style-selector.d.ts.map +1 -1
- package/dist/cjs/components/toolbar/table-style-selector.js +33 -2
- package/dist/cjs/config.d.ts +5 -4
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/config.js +13 -9
- package/dist/cjs/helpers.d.ts +5 -0
- package/dist/cjs/helpers.d.ts.map +1 -1
- package/dist/cjs/helpers.js +8 -4
- package/dist/cjs/hooks/use-cell-renderer.d.ts +12 -1
- package/dist/cjs/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/cjs/hooks/use-cell-renderer.js +6 -3
- package/dist/cjs/hooks/use-copy-paste-cut.d.ts +36 -2
- package/dist/cjs/hooks/use-copy-paste-cut.d.ts.map +1 -1
- package/dist/cjs/hooks/use-copy-paste-cut.js +131 -5
- package/dist/cjs/hooks/use-editable.d.ts +6 -0
- package/dist/cjs/hooks/use-editable.d.ts.map +1 -1
- package/dist/cjs/hooks/use-editor-submit.d.ts +45 -3
- package/dist/cjs/hooks/use-editor-submit.d.ts.map +1 -1
- package/dist/cjs/hooks/use-editor-submit.js +91 -7
- package/dist/cjs/hooks/use-keyboard-handler.d.ts +5 -1
- package/dist/cjs/hooks/use-keyboard-handler.d.ts.map +1 -1
- package/dist/cjs/hooks/use-keyboard-handler.js +10 -1
- package/dist/cjs/hooks/use-selection-drag-copy.d.ts +55 -0
- package/dist/cjs/hooks/use-selection-drag-copy.d.ts.map +1 -0
- package/dist/cjs/hooks/use-selection-drag-copy.js +274 -0
- package/dist/cjs/hooks/use-selection-renderer.d.ts +8 -1
- package/dist/cjs/hooks/use-selection-renderer.d.ts.map +1 -1
- package/dist/cjs/hooks/use-selection-renderer.js +7 -2
- package/dist/cjs/hooks/use-selection.d.ts +59 -1
- package/dist/cjs/hooks/use-selection.d.ts.map +1 -1
- package/dist/cjs/hooks/use-selection.js +270 -61
- package/dist/cjs/index.d.ts +6 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/release-date.js +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +50 -1
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/api/autocomplete.d.ts +42 -0
- package/dist/esm/api/autocomplete.d.ts.map +1 -0
- package/dist/esm/api/autocomplete.js +91 -0
- package/dist/esm/api/banded-ranges.d.ts.map +1 -1
- package/dist/esm/api/banded-ranges.js +52 -2
- package/dist/esm/api/error-checking.d.ts +82 -0
- package/dist/esm/api/error-checking.d.ts.map +1 -0
- package/dist/esm/api/error-checking.js +156 -0
- package/dist/esm/api/move-overwrite.d.ts +8 -2
- package/dist/esm/api/move-overwrite.d.ts.map +1 -1
- package/dist/esm/api/move-overwrite.js +17 -2
- package/dist/esm/api/selections.d.ts +2 -2
- package/dist/esm/api/validation.d.ts +39 -1
- package/dist/esm/api/validation.d.ts.map +1 -1
- package/dist/esm/api/validation.js +70 -0
- package/dist/esm/atoms/cell-input-context.atom.d.ts +4 -1
- package/dist/esm/atoms/cell-input-context.atom.d.ts.map +1 -1
- package/dist/esm/atoms/enter-key-direction.atom.d.ts +11 -0
- package/dist/esm/atoms/enter-key-direction.atom.d.ts.map +1 -0
- package/dist/esm/atoms/enter-key-direction.atom.js +8 -0
- package/dist/esm/atoms/index.d.ts +1 -0
- package/dist/esm/atoms/index.d.ts.map +1 -1
- package/dist/esm/atoms/index.js +1 -0
- package/dist/esm/atoms/paste-menu.atom.d.ts +22 -0
- package/dist/esm/atoms/paste-menu.atom.d.ts.map +1 -1
- package/dist/esm/atoms/paste-menu.atom.js +10 -1
- package/dist/esm/atoms/pick-list.atom.d.ts +15 -0
- package/dist/esm/atoms/pick-list.atom.d.ts.map +1 -0
- package/dist/esm/atoms/pick-list.atom.js +3 -0
- package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/esm/components/canvas-grid/index.js +239 -13
- package/dist/esm/components/canvas-grid/typings.d.ts +96 -11
- package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.d.ts +25 -0
- package/dist/esm/components/cell/alignment.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.js +33 -0
- package/dist/esm/components/cell/cell-background.d.ts +16 -0
- package/dist/esm/components/cell/cell-background.d.ts.map +1 -1
- package/dist/esm/components/cell/cell-background.js +106 -36
- package/dist/esm/components/cell/cell-text-runs.d.ts +12 -5
- package/dist/esm/components/cell/cell-text-runs.d.ts.map +1 -1
- package/dist/esm/components/cell/cell-text-runs.js +17 -22
- package/dist/esm/components/cell/index.d.ts.map +1 -1
- package/dist/esm/components/cell/index.js +25 -20
- package/dist/esm/components/cell/typings.d.ts +9 -0
- package/dist/esm/components/cell/typings.d.ts.map +1 -1
- package/dist/esm/components/cell-editor/helpers.d.ts +22 -2
- package/dist/esm/components/cell-editor/helpers.d.ts.map +1 -1
- package/dist/esm/components/cell-editor/helpers.js +25 -7
- package/dist/esm/components/cell-editor/index.d.ts +7 -1
- package/dist/esm/components/cell-editor/index.d.ts.map +1 -1
- package/dist/esm/components/cell-editor/index.js +80 -9
- package/dist/esm/components/cell-indicator/index.d.ts +41 -0
- package/dist/esm/components/cell-indicator/index.d.ts.map +1 -0
- package/dist/esm/components/cell-indicator/index.js +76 -0
- package/dist/esm/components/cell-input/cell-input.d.ts +10 -2
- package/dist/esm/components/cell-input/cell-input.d.ts.map +1 -1
- package/dist/esm/components/cell-input/cell-input.js +5 -3
- package/dist/esm/components/cell-input/formula-bar-cell-input.d.ts.map +1 -1
- package/dist/esm/components/cell-input/formula-bar-cell-input.js +9 -2
- package/dist/esm/components/cell-structured/sparkline-math.d.ts +27 -1
- package/dist/esm/components/cell-structured/sparkline-math.d.ts.map +1 -1
- package/dist/esm/components/cell-structured/sparkline-math.js +35 -0
- package/dist/esm/components/cell-structured/sparkline.d.ts +1 -1
- package/dist/esm/components/cell-structured/sparkline.d.ts.map +1 -1
- package/dist/esm/components/cell-structured/sparkline.js +34 -88
- package/dist/esm/components/cell-structured/types.d.ts +6 -0
- package/dist/esm/components/cell-structured/types.d.ts.map +1 -1
- package/dist/esm/components/data-table-dialog/index.d.ts +22 -0
- package/dist/esm/components/data-table-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/data-table-dialog/index.js +75 -0
- package/dist/esm/components/error-check-smart-tag/index.d.ts +27 -0
- package/dist/esm/components/error-check-smart-tag/index.d.ts.map +1 -0
- package/dist/esm/components/error-check-smart-tag/index.js +33 -0
- package/dist/esm/components/forecast-sheet-dialog/index.d.ts +26 -0
- package/dist/esm/components/forecast-sheet-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/forecast-sheet-dialog/index.js +83 -0
- package/dist/esm/components/paste-special-dialog/index.d.ts +3 -3
- package/dist/esm/components/paste-special-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/paste-special-dialog/index.js +58 -23
- package/dist/esm/components/protect-sheet-dialog/allow-edit-ranges-dialog.d.ts +57 -0
- package/dist/esm/components/protect-sheet-dialog/allow-edit-ranges-dialog.d.ts.map +1 -0
- package/dist/esm/components/protect-sheet-dialog/allow-edit-ranges-dialog.js +177 -0
- package/dist/esm/components/protect-sheet-dialog/constants.d.ts +3 -0
- package/dist/esm/components/protect-sheet-dialog/constants.d.ts.map +1 -0
- package/dist/esm/components/protect-sheet-dialog/constants.js +2 -0
- package/dist/esm/components/protect-sheet-dialog/index.d.ts +2 -2
- package/dist/esm/components/protect-sheet-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/protect-sheet-dialog/index.js +3 -2
- package/dist/esm/components/scenario-manager-dialog/index.d.ts +51 -0
- package/dist/esm/components/scenario-manager-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/scenario-manager-dialog/index.js +213 -0
- package/dist/esm/components/selection/index.d.ts +1 -1
- package/dist/esm/components/selection/index.d.ts.map +1 -1
- package/dist/esm/components/selection/index.js +9 -4
- package/dist/esm/components/selection/paste-menu.d.ts +14 -1
- package/dist/esm/components/selection/paste-menu.d.ts.map +1 -1
- package/dist/esm/components/selection/paste-menu.js +76 -8
- package/dist/esm/components/selection/paste-options.d.ts +28 -0
- package/dist/esm/components/selection/paste-options.d.ts.map +1 -0
- package/dist/esm/components/selection/paste-options.js +62 -0
- package/dist/esm/components/selection/types.d.ts +12 -1
- package/dist/esm/components/selection/types.d.ts.map +1 -1
- package/dist/esm/components/selection-drop-menu/index.d.ts +18 -0
- package/dist/esm/components/selection-drop-menu/index.d.ts.map +1 -0
- package/dist/esm/components/selection-drop-menu/index.js +56 -0
- package/dist/esm/components/solver-dialog/index.d.ts +57 -0
- package/dist/esm/components/solver-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/solver-dialog/index.js +176 -0
- package/dist/esm/components/toolbar/sparkline-actions.d.ts +3 -2
- package/dist/esm/components/toolbar/sparkline-actions.d.ts.map +1 -1
- package/dist/esm/components/toolbar/sparkline-actions.js +6 -2
- package/dist/esm/components/toolbar/table-style-selector.d.ts.map +1 -1
- package/dist/esm/components/toolbar/table-style-selector.js +29 -3
- package/dist/esm/config.d.ts +5 -4
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/config.js +12 -8
- package/dist/esm/helpers.d.ts +5 -0
- package/dist/esm/helpers.d.ts.map +1 -1
- package/dist/esm/helpers.js +8 -4
- package/dist/esm/hooks/use-cell-renderer.d.ts +12 -1
- package/dist/esm/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/esm/hooks/use-cell-renderer.js +5 -2
- package/dist/esm/hooks/use-copy-paste-cut.d.ts +36 -2
- package/dist/esm/hooks/use-copy-paste-cut.d.ts.map +1 -1
- package/dist/esm/hooks/use-copy-paste-cut.js +117 -6
- package/dist/esm/hooks/use-editable.d.ts +6 -0
- package/dist/esm/hooks/use-editable.d.ts.map +1 -1
- package/dist/esm/hooks/use-editor-submit.d.ts +45 -3
- package/dist/esm/hooks/use-editor-submit.d.ts.map +1 -1
- package/dist/esm/hooks/use-editor-submit.js +81 -6
- package/dist/esm/hooks/use-keyboard-handler.d.ts +5 -1
- package/dist/esm/hooks/use-keyboard-handler.d.ts.map +1 -1
- package/dist/esm/hooks/use-keyboard-handler.js +10 -1
- package/dist/esm/hooks/use-selection-drag-copy.d.ts +55 -0
- package/dist/esm/hooks/use-selection-drag-copy.d.ts.map +1 -0
- package/dist/esm/hooks/use-selection-drag-copy.js +245 -0
- package/dist/esm/hooks/use-selection-renderer.d.ts +8 -1
- package/dist/esm/hooks/use-selection-renderer.d.ts.map +1 -1
- package/dist/esm/hooks/use-selection-renderer.js +7 -2
- package/dist/esm/hooks/use-selection.d.ts +59 -1
- package/dist/esm/hooks/use-selection.d.ts.map +1 -1
- package/dist/esm/hooks/use-selection.js +245 -52
- package/dist/esm/index.d.ts +6 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/release-date.js +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +50 -1
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/spreadsheet.min.css +1 -1
- package/package.json +6 -5
- package/dist/cjs/components/cell-error/index.d.ts +0 -14
- package/dist/cjs/components/cell-error/index.d.ts.map +0 -1
- package/dist/cjs/components/cell-error/index.js +0 -24
- package/dist/esm/components/cell-error/index.d.ts +0 -14
- package/dist/esm/components/cell-error/index.d.ts.map +0 -1
- package/dist/esm/components/cell-error/index.js +0 -18
|
@@ -4,30 +4,100 @@ import { Shape } from "react-konva";
|
|
|
4
4
|
import { getPatternCanvas } from "../../api/fill-patterns";
|
|
5
5
|
/** Excel's Automatic pattern colour: a pattern with no colour of its own. */
|
|
6
6
|
export const AUTOMATIC_PATTERN_COLOR = "#000000";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Excel's path gradient over the rectangle `[x0, y0]–[x1, y1]`: the core
|
|
9
|
+
* rectangle (inner stop colour) and four trapezoids cut along the
|
|
10
|
+
* core-to-corner diagonals, each a linear gradient from the core edge out
|
|
11
|
+
* to its cell edge — together, concentric rectangles of colour.
|
|
12
|
+
*/
|
|
13
|
+
export const getPathGradientRegions = (gradient, x0, y0, x1, y1) => {
|
|
14
|
+
const width = x1 - x0;
|
|
15
|
+
const height = y1 - y0;
|
|
16
|
+
const cl = x0 + (gradient.left ?? 0) * width;
|
|
17
|
+
const cr = x1 - (gradient.right ?? 0) * width;
|
|
18
|
+
const ct = y0 + (gradient.top ?? 0) * height;
|
|
19
|
+
const cb = y1 - (gradient.bottom ?? 0) * height;
|
|
20
|
+
const coreLeft = Math.min(cl, cr);
|
|
21
|
+
const coreRight = Math.max(cl, cr);
|
|
22
|
+
const coreTop = Math.min(ct, cb);
|
|
23
|
+
const coreBottom = Math.max(ct, cb);
|
|
24
|
+
return {
|
|
25
|
+
core: [coreLeft, coreTop, coreRight, coreBottom],
|
|
26
|
+
regions: [
|
|
27
|
+
{
|
|
28
|
+
points: [
|
|
29
|
+
[x0, y0],
|
|
30
|
+
[x1, y0],
|
|
31
|
+
[coreRight, coreTop],
|
|
32
|
+
[coreLeft, coreTop],
|
|
33
|
+
],
|
|
34
|
+
axis: [coreLeft, coreTop, coreLeft, y0],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
points: [
|
|
38
|
+
[x1, y0],
|
|
39
|
+
[x1, y1],
|
|
40
|
+
[coreRight, coreBottom],
|
|
41
|
+
[coreRight, coreTop],
|
|
42
|
+
],
|
|
43
|
+
axis: [coreRight, coreTop, x1, coreTop],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
points: [
|
|
47
|
+
[x1, y1],
|
|
48
|
+
[x0, y1],
|
|
49
|
+
[coreLeft, coreBottom],
|
|
50
|
+
[coreRight, coreBottom],
|
|
51
|
+
],
|
|
52
|
+
axis: [coreLeft, coreBottom, coreLeft, y1],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
points: [
|
|
56
|
+
[x0, y1],
|
|
57
|
+
[x0, y0],
|
|
58
|
+
[coreLeft, coreTop],
|
|
59
|
+
[coreLeft, coreBottom],
|
|
60
|
+
],
|
|
61
|
+
axis: [coreLeft, coreTop, x0, coreTop],
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
const addStops = (canvasGrad, gradient) => {
|
|
67
|
+
for (const stop of gradient.stops) {
|
|
68
|
+
// Clamp position to [0,1] — Canvas API rejects out-of-range values.
|
|
69
|
+
const pos = Math.max(0, Math.min(1, stop.position));
|
|
70
|
+
try {
|
|
71
|
+
canvasGrad.addColorStop(pos, stop.color);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
// Invalid color string — skip rather than blow up the render.
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const paintPathGradient = (context, native, gradient, rect) => {
|
|
79
|
+
const { core, regions } = getPathGradientRegions(gradient, ...rect);
|
|
80
|
+
const sorted = [...gradient.stops].sort((a, b) => a.position - b.position);
|
|
81
|
+
context.setAttr("fillStyle", sorted[0].color);
|
|
82
|
+
context.fillRect(core[0], core[1], core[2] - core[0], core[3] - core[1]);
|
|
83
|
+
for (const region of regions) {
|
|
84
|
+
const [ax0, ay0, ax1, ay1] = region.axis;
|
|
85
|
+
if (ax0 === ax1 && ay0 === ay1)
|
|
86
|
+
continue;
|
|
87
|
+
const canvasGrad = native.createLinearGradient(ax0, ay0, ax1, ay1);
|
|
88
|
+
addStops(canvasGrad, gradient);
|
|
89
|
+
context.beginPath();
|
|
90
|
+
region.points.forEach(([px, py], index) => index ? context.lineTo(px, py) : context.moveTo(px, py));
|
|
91
|
+
context.closePath();
|
|
92
|
+
context.setAttr("fillStyle", canvasGrad);
|
|
93
|
+
context.fill();
|
|
94
|
+
}
|
|
95
|
+
};
|
|
16
96
|
const buildCanvasGradient = (native, gradient, width, height) => {
|
|
17
97
|
if (!gradient.stops?.length)
|
|
18
98
|
return null;
|
|
19
99
|
let canvasGrad;
|
|
20
|
-
|
|
21
|
-
const left = gradient.left ?? 0;
|
|
22
|
-
const right = gradient.right ?? 0;
|
|
23
|
-
const top = gradient.top ?? 0;
|
|
24
|
-
const bottom = gradient.bottom ?? 0;
|
|
25
|
-
const cx = ((left + (1 - right)) / 2) * width;
|
|
26
|
-
const cy = ((top + (1 - bottom)) / 2) * height;
|
|
27
|
-
const farthestCorner = Math.max(Math.hypot(cx, cy), Math.hypot(width - cx, cy), Math.hypot(cx, height - cy), Math.hypot(width - cx, height - cy));
|
|
28
|
-
canvasGrad = native.createRadialGradient(cx, cy, 0, cx, cy, farthestCorner || 1);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
100
|
+
{
|
|
31
101
|
// Linear. Map degrees → axis vector. Excel: degree=0 runs the
|
|
32
102
|
// gradient from LEFT to RIGHT. degree increases clockwise.
|
|
33
103
|
const deg = (((gradient.degree ?? 0) % 360) + 360) % 360;
|
|
@@ -60,16 +130,7 @@ const buildCanvasGradient = (native, gradient, width, height) => {
|
|
|
60
130
|
const y1 = cy + dy * maxProj;
|
|
61
131
|
canvasGrad = native.createLinearGradient(x0, y0, x1, y1);
|
|
62
132
|
}
|
|
63
|
-
|
|
64
|
-
// Clamp position to [0,1] — Canvas API rejects out-of-range values.
|
|
65
|
-
const pos = Math.max(0, Math.min(1, stop.position));
|
|
66
|
-
try {
|
|
67
|
-
canvasGrad.addColorStop(pos, stop.color);
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
// Invalid color string — skip rather than blow up the render.
|
|
71
|
-
}
|
|
72
|
-
}
|
|
133
|
+
addStops(canvasGrad, gradient);
|
|
73
134
|
return canvasGrad;
|
|
74
135
|
};
|
|
75
136
|
export const CellBackground = ({ x, y, width, height, backgroundColor, defaultBackgroundColor, scale, showGridLines, isMergedCell, fillPattern, foregroundColor, gradient, }) => {
|
|
@@ -96,7 +157,14 @@ export const CellBackground = ({ x, y, width, height, backgroundColor, defaultBa
|
|
|
96
157
|
const useTile = fillPattern && fillPattern !== "solid" && fillPattern !== "none";
|
|
97
158
|
const useGradient = !!gradient && (gradient.stops?.length ?? 0) > 0;
|
|
98
159
|
const native = context._context;
|
|
99
|
-
|
|
160
|
+
const fillRectArea = (isMergedCell || !showFaintBorder) && showGridLines
|
|
161
|
+
? [1, 1, shape.width(), shape.height()]
|
|
162
|
+
: [0, 0, shape.width() + 1, shape.height() + 1];
|
|
163
|
+
const usePathGradient = useGradient && native && gradient.type === "path";
|
|
164
|
+
if (usePathGradient) {
|
|
165
|
+
paintPathGradient(context, native, gradient, fillRectArea);
|
|
166
|
+
}
|
|
167
|
+
else if (useGradient && native) {
|
|
100
168
|
const canvasGrad = buildCanvasGradient(native, gradient, shape.width(), shape.height());
|
|
101
169
|
if (canvasGrad) {
|
|
102
170
|
context.setAttr("fillStyle", canvasGrad);
|
|
@@ -121,11 +189,13 @@ export const CellBackground = ({ x, y, width, height, backgroundColor, defaultBa
|
|
|
121
189
|
else {
|
|
122
190
|
context.setAttr("fillStyle", finalBackgroundColor);
|
|
123
191
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
192
|
+
if (!usePathGradient) {
|
|
193
|
+
if ((isMergedCell || !showFaintBorder) && showGridLines) {
|
|
194
|
+
context.fillRect(1, 1, shape.width() - 1, shape.height() - 1);
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
context.fillRect(0, 0, shape.width() + 1, shape.height() + 1);
|
|
198
|
+
}
|
|
129
199
|
}
|
|
130
200
|
if (showFaintBorder) {
|
|
131
201
|
const lightColor = lightenColor(-0.1, backgroundColor);
|
|
@@ -46,6 +46,13 @@ export type CellTextRunsProps = {
|
|
|
46
46
|
wrap: boolean;
|
|
47
47
|
/** Theme — used to resolve segment `color` objects to CSS strings. */
|
|
48
48
|
theme: SpreadsheetTheme;
|
|
49
|
+
/**
|
|
50
|
+
* Multiplier for run font sizes given in points (zoom × shrink-to-fit),
|
|
51
|
+
* so a run's own size follows the cell's.
|
|
52
|
+
*/
|
|
53
|
+
fontScale?: number;
|
|
54
|
+
/** Konva rotation (degrees, clockwise) of the whole block — rotated text. */
|
|
55
|
+
rotation?: number;
|
|
49
56
|
};
|
|
50
57
|
export type Resolved = {
|
|
51
58
|
bold: boolean;
|
|
@@ -64,7 +71,7 @@ export type Resolved = {
|
|
|
64
71
|
* merged style carries a `baselineOffset` (own or inherited from the
|
|
65
72
|
* base) the sup/sub font scale is applied here, exactly once.
|
|
66
73
|
*/
|
|
67
|
-
export declare const resolveSegmentStyle: (seg: RichTextSegment, base: Resolved, theme: SpreadsheetTheme) => Resolved;
|
|
74
|
+
export declare const resolveSegmentStyle: (seg: RichTextSegment, base: Resolved, theme: SpreadsheetTheme, fontScale?: number) => Resolved;
|
|
68
75
|
/** A segment paired with its fully-resolved paint style. */
|
|
69
76
|
export type ResolvedSegment = {
|
|
70
77
|
seg: RichTextSegment;
|
|
@@ -83,10 +90,10 @@ export declare const computeLineMetrics: (resolvedLines: ResolvedSegment[][], ba
|
|
|
83
90
|
};
|
|
84
91
|
/**
|
|
85
92
|
* Vertical draw position (textBaseline="top") for one segment within
|
|
86
|
-
* its line box.
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
93
|
+
* its line box. Every run shares the line's alphabetic baseline (smaller
|
|
94
|
+
* runs shift down); superscript / subscript runs then move that baseline
|
|
95
|
+
* up / down by Excel's shift ({@link getScriptBaselineShift}). Exported
|
|
96
|
+
* for unit tests.
|
|
90
97
|
*/
|
|
91
98
|
export declare const computeSegmentTop: (lineTop: number, lineFontSize: number, segFontSize: number, baselineOffset: "superscript" | "subscript" | undefined) => number;
|
|
92
99
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-text-runs.d.ts","sourceRoot":"","sources":["../../../../components/cell/cell-text-runs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAElE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"cell-text-runs.d.ts","sourceRoot":"","sources":["../../../../components/cell/cell-text-runs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAElE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAA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M,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC;CAC9C,CAAC;AAkCF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAC9B,KAAK,eAAe,EACpB,MAAM,QAAQ,EACd,OAAO,gBAAgB,EACvB,kBAAa,KACZ,QAwBF,CAAC;AAKF,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,eAAe,CAAC;IACrB,CAAC,EAAE,QAAQ,CAAC;CACb,CAAC;AAYF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,eAAe,eAAe,EAAE,EAAE,EAClC,MAAM,QAAQ,EACd,WAAW,CAAC,CAAC,EAAE,QAAQ,KAAK,MAAM,KACjC;IAAE,aAAa,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CASvE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,MAAM,EACf,cAAc,MAAM,EACpB,aAAa,MAAM,EACnB,gBAAgB,aAAa,GAAG,WAAW,GAAG,SAAS,KACtD,MAGmD,CAAC;AAoHvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,oCAAsB,iBAAiB,uBAgQ9D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import { Shape } from "react-konva";
|
|
3
3
|
import { getStringifiedColor, resolveThemeFontFamily } from "../../themes";
|
|
4
|
+
import { getScriptBaselineShift } from "./alignment";
|
|
4
5
|
import { getLineAdvance } from "./line-height";
|
|
5
6
|
import { buildRichTextSegments, segmentsToLines, segmentToAtoms, } from "./rich-text";
|
|
6
7
|
const BASELINE_OFFSET_FONT_SCALE = 0.58;
|
|
@@ -39,12 +40,10 @@ const buildFontString = (r) => {
|
|
|
39
40
|
* merged style carries a `baselineOffset` (own or inherited from the
|
|
40
41
|
* base) the sup/sub font scale is applied here, exactly once.
|
|
41
42
|
*/
|
|
42
|
-
export const resolveSegmentStyle = (seg, base, theme) => {
|
|
43
|
+
export const resolveSegmentStyle = (seg, base, theme, fontScale = 1) => {
|
|
43
44
|
const f = seg.format;
|
|
44
45
|
const baselineOffset = f.baselineOffset ?? base.baselineOffset;
|
|
45
|
-
const fontSize = typeof f.fontSize === "number"
|
|
46
|
-
? (f.fontSize / pointFromPx(base.fontSize)) * base.fontSize
|
|
47
|
-
: base.fontSize;
|
|
46
|
+
const fontSize = typeof f.fontSize === "number" ? f.fontSize * PT_TO_PX * fontScale : base.fontSize;
|
|
48
47
|
return {
|
|
49
48
|
bold: f.bold ?? base.bold,
|
|
50
49
|
italic: f.italic ?? base.italic,
|
|
@@ -64,8 +63,8 @@ export const resolveSegmentStyle = (seg, base, theme) => {
|
|
|
64
63
|
baselineOffset,
|
|
65
64
|
};
|
|
66
65
|
};
|
|
67
|
-
/**
|
|
68
|
-
const
|
|
66
|
+
/** CSS pixels per point (96 / 72), as `pointToPixel`. */
|
|
67
|
+
const PT_TO_PX = 96 / 72;
|
|
69
68
|
/**
|
|
70
69
|
* Fraction of the em box above the alphabetic baseline for typical
|
|
71
70
|
* Latin fonts. Used to baseline-align mixed-size runs on one line:
|
|
@@ -89,19 +88,14 @@ export const computeLineMetrics = (resolvedLines, base, advanceOf) => {
|
|
|
89
88
|
};
|
|
90
89
|
/**
|
|
91
90
|
* Vertical draw position (textBaseline="top") for one segment within
|
|
92
|
-
* its line box.
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
91
|
+
* its line box. Every run shares the line's alphabetic baseline (smaller
|
|
92
|
+
* runs shift down); superscript / subscript runs then move that baseline
|
|
93
|
+
* up / down by Excel's shift ({@link getScriptBaselineShift}). Exported
|
|
94
|
+
* for unit tests.
|
|
96
95
|
*/
|
|
97
|
-
export const computeSegmentTop = (lineTop, lineFontSize, segFontSize, baselineOffset) =>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (baselineOffset === "subscript") {
|
|
101
|
-
return lineTop + (lineFontSize - segFontSize);
|
|
102
|
-
}
|
|
103
|
-
return lineTop + (lineFontSize - segFontSize) * ALPHABETIC_BASELINE_RATIO;
|
|
104
|
-
};
|
|
96
|
+
export const computeSegmentTop = (lineTop, lineFontSize, segFontSize, baselineOffset) => lineTop +
|
|
97
|
+
(lineFontSize - segFontSize) * ALPHABETIC_BASELINE_RATIO +
|
|
98
|
+
getScriptBaselineShift(baselineOffset, lineFontSize);
|
|
105
99
|
/**
|
|
106
100
|
* Sum of advance widths of a single line of resolved segments, using
|
|
107
101
|
* the supplied context's `measureText`. Mutates ctx font as it walks
|
|
@@ -214,7 +208,7 @@ const atomsToSegments = (atoms) => {
|
|
|
214
208
|
* - Mention runs render as their inline label only (no chrome).
|
|
215
209
|
*/
|
|
216
210
|
export const CellTextRuns = React.memo((props) => {
|
|
217
|
-
const { x, y, width, height, padding, value, runs, baseColor, baseFontFamily, baseFontSize, baseBold, baseItalic, baseUnderline, baseStrikethrough, baseBaselineOffset, horizontalAlign, verticalAlign, lineHeight, lineHeightMode, scale, wrap, theme, } = props;
|
|
211
|
+
const { x, y, width, height, padding, value, runs, baseColor, baseFontFamily, baseFontSize, baseBold, baseItalic, baseUnderline, baseStrikethrough, baseBaselineOffset, horizontalAlign, verticalAlign, lineHeight, lineHeightMode, scale, wrap, theme, fontScale = 1, rotation, } = props;
|
|
218
212
|
const sceneFunc = useCallback((context, _shape) => {
|
|
219
213
|
const baseResolved = {
|
|
220
214
|
bold: baseBold,
|
|
@@ -238,7 +232,7 @@ export const CellTextRuns = React.memo((props) => {
|
|
|
238
232
|
// it walks; the per-segment paint loop below sets it again per
|
|
239
233
|
// segment so the mutation here is safe.
|
|
240
234
|
const measureAtom = (atom) => {
|
|
241
|
-
const r = resolveSegmentStyle({ text: atom.text, format: atom.format }, baseResolved, theme);
|
|
235
|
+
const r = resolveSegmentStyle({ text: atom.text, format: atom.format }, baseResolved, theme, fontScale);
|
|
242
236
|
context.setAttr("font", buildFontString(r));
|
|
243
237
|
return context.measureText(atom.text).width;
|
|
244
238
|
};
|
|
@@ -280,7 +274,7 @@ export const CellTextRuns = React.memo((props) => {
|
|
|
280
274
|
// layout: the run font's `getLineAdvance` per line.
|
|
281
275
|
const resolvedLines = lines.map((lineSegments) => lineSegments.map((seg) => ({
|
|
282
276
|
seg,
|
|
283
|
-
r: resolveSegmentStyle(seg, baseResolved, theme),
|
|
277
|
+
r: resolveSegmentStyle(seg, baseResolved, theme, fontScale),
|
|
284
278
|
})));
|
|
285
279
|
const { lineFontSizes, lineHeights, totalHeight: totalH } = computeLineMetrics(resolvedLines, baseResolved, (r) => getLineAdvance(r, lineHeightMode, lineHeight, scale));
|
|
286
280
|
let topY;
|
|
@@ -378,7 +372,8 @@ export const CellTextRuns = React.memo((props) => {
|
|
|
378
372
|
height,
|
|
379
373
|
padding,
|
|
380
374
|
theme,
|
|
375
|
+
fontScale,
|
|
381
376
|
]);
|
|
382
|
-
return (React.createElement(Shape, { x: x, y: y, width: width, height: height, sceneFunc: sceneFunc, listening: false, perfectDrawEnabled: false }));
|
|
377
|
+
return (React.createElement(Shape, { x: x, y: y, width: width, height: height, rotation: rotation, sceneFunc: sceneFunc, listening: false, perfectDrawEnabled: false }));
|
|
383
378
|
});
|
|
384
379
|
CellTextRuns.displayName = "CellTextRuns";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/cell/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/cell/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAoDjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAO3C,eAAO,MAAM,IAAI,oCAAgB,SAAS,uBA0hCxC,CAAC"}
|
|
@@ -4,17 +4,18 @@ import React, { memo, useCallback } from "react";
|
|
|
4
4
|
import { Group, Label, Shape, Tag, Text } from "react-konva";
|
|
5
5
|
import { paintDataBar } from "../../api/cf-data-bar";
|
|
6
6
|
import { getCfIcon, paintCfIcon } from "../../api/cf-icons";
|
|
7
|
-
import { ARROW_DOWN_WIDTH, CELL_HORIZONTAL_ALIGNMENT, CELL_VERTICAL_ALIGNMENT, CF_ICON_SPACING, CF_ICON_WIDTH, CHIP_HEIGHT, CHIP_RADIUS, CHIP_SPACING,
|
|
7
|
+
import { ARROW_DOWN_WIDTH, CELL_HORIZONTAL_ALIGNMENT, CELL_VERTICAL_ALIGNMENT, CF_ICON_SPACING, CF_ICON_WIDTH, CHIP_HEIGHT, CHIP_RADIUS, CHIP_SPACING, DEFAULT_CELL_SPACING, INDENT_SPACING, } from "../../config";
|
|
8
8
|
import { getChipVerticalPosition, normalizeDisplayText, pointToPixel, } from "../../helpers";
|
|
9
9
|
import { getStringifiedColor, resolveThemeFontFamily } from "../../themes";
|
|
10
|
+
import { resolveDefaultSparklineColors } from "../cell-structured/sparkline-math";
|
|
10
11
|
import { CellArrow } from "../cell-arrow";
|
|
11
12
|
import { CellCalculated } from "../cell-calculated";
|
|
12
13
|
import { CellCheckbox } from "../cell-checkbox";
|
|
13
|
-
import { CellError, ERROR_TAG_WIDTH } from "../cell-error";
|
|
14
14
|
import { CellExpand } from "../cell-expand";
|
|
15
15
|
import { CellFilter } from "../cell-filter";
|
|
16
16
|
import { CellGroup } from "../cell-group";
|
|
17
|
-
import {
|
|
17
|
+
import { CellIndicators } from "../cell-indicator";
|
|
18
|
+
import { alignmentImpliesWrap, computeShrinkToFitFontSize, fillCellText, getKonvaRotationDegrees, getRotatedTextLayout, getScriptTextOffsetY, getUnderlineStrokes, getVerticalSpreadLineHeight, layoutDistributedLines, resolveCanvasTextAlign, resolveCanvasVerticalAlign, resolveReadingOrderAlignment, stackTextVertically, verticalAlignmentImpliesWrap, } from "./alignment";
|
|
18
19
|
import { CellTextRuns } from "./cell-text-runs";
|
|
19
20
|
import { getLeftSpacing, getRightSpacing } from "./helpers";
|
|
20
21
|
import { getLineMetrics } from "./line-height";
|
|
@@ -24,7 +25,7 @@ const LOADING_VALUE = "Loading...";
|
|
|
24
25
|
// CSS-equivalent scale for sup/sub baseline offset (matches browser default).
|
|
25
26
|
const BASELINE_OFFSET_FONT_SCALE = 0.58;
|
|
26
27
|
export const Cell = memo((props) => {
|
|
27
|
-
const { x, y, width, height, value, padding = CELL_TEXT_PADDING, scale = 1, lineHeight = 1.2, lineHeightMode = "fontMetrics", imageUrl, cellFormat, chipBackgroundColor, defaultColor, defaultBackgroundColor, sheetId, rowIndex, columnIndex, onRequestEdit, onArrowClick, isChecked,
|
|
28
|
+
const { x, y, width, height, value, padding = CELL_TEXT_PADDING, scale = 1, lineHeight = 1.2, lineHeightMode = "fontMetrics", imageUrl, cellFormat, chipBackgroundColor, defaultColor, defaultBackgroundColor, sheetId, rowIndex, columnIndex, onRequestEdit, onArrowClick, isChecked, showErrorIndicator, circleInvalid, showCheckbox, showArrow, showFilter, showChip, showNote, showComment, isFilterActive, filterIconColor, onFilterClick, onCheckboxClick, enableOverflow, cellWidth, textWidth: _textWidth, theme, showCalculatedColumnIcon, isCalculatedColumn, expandable, expanded, columnSpans, overflowRight, overflowLeft, centerOnSpan = false, arrowOutside = false, showGridLines, structuredValue, sparklineGroupAxis, defaultFontSizePoint, sortOrder, textFormatRuns, numberFormatLayout, StructuredResult, readonly = false, onExpandCollapse, getDefaultHorizontalAlignment, } = props;
|
|
28
29
|
const { textFormat, wrapStrategy } = cellFormat ?? {};
|
|
29
30
|
// openpyxl's `relativeIndent` is an additive delta on top of `indent`.
|
|
30
31
|
const indent = (cellFormat?.indent ?? 0) + (cellFormat?.relativeIndent ?? 0);
|
|
@@ -72,11 +73,9 @@ export const Cell = memo((props) => {
|
|
|
72
73
|
const fontSize = baselineOffset
|
|
73
74
|
? baseFontSize * BASELINE_OFFSET_FONT_SCALE
|
|
74
75
|
: baseFontSize;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
? "bottom"
|
|
79
|
-
: verticalAlignment;
|
|
76
|
+
// Superscript / subscript keep the cell's alignment and move the
|
|
77
|
+
// baseline instead (`scriptOffsetY` below), as Excel does.
|
|
78
|
+
const effectiveVerticalAlignment = verticalAlignment;
|
|
80
79
|
const textStyle = `${bold ? "bold" : "normal"} ${italic ? "italic" : "normal"}`;
|
|
81
80
|
const showText = !isNil(structuredValue) ? false : !isNil(value);
|
|
82
81
|
// Overflow line
|
|
@@ -100,8 +99,6 @@ export const Cell = memo((props) => {
|
|
|
100
99
|
context.closePath();
|
|
101
100
|
}
|
|
102
101
|
}, [defaultBackgroundColor, columnSpans, theme, columnIndex, scale]);
|
|
103
|
-
// Show error tag
|
|
104
|
-
const showError = isError || isInvalid;
|
|
105
102
|
// Calculated
|
|
106
103
|
const isCalculatedCell = showCalculatedColumnIcon && isCalculatedColumn;
|
|
107
104
|
// Alignment
|
|
@@ -301,11 +298,19 @@ export const Cell = memo((props) => {
|
|
|
301
298
|
// own styling instead of being flattened; plain no-run cells with
|
|
302
299
|
// a cell-level baselineOffset keep the single-style approximation
|
|
303
300
|
// below (scaled font + top/bottom alignment).
|
|
301
|
+
// Shrink-to-fit and rotated cells keep their runs: the run painter takes
|
|
302
|
+
// the shrink factor and the rotated layout (stacked text stays plain).
|
|
304
303
|
const useRichTextRunPath = !showChip &&
|
|
305
|
-
!shrinkEnabled &&
|
|
306
304
|
!isStackedVertical &&
|
|
307
|
-
!hasNumericRotation &&
|
|
308
305
|
hasRenderableRuns(textFormatRuns ?? undefined);
|
|
306
|
+
const shrinkFactor = fontSize > 0 ? effectiveFontSize / fontSize : 1;
|
|
307
|
+
const scriptOffsetY = getScriptTextOffsetY({
|
|
308
|
+
baselineOffset,
|
|
309
|
+
verticalAlign: effectiveVerticalAlignment,
|
|
310
|
+
baseFontSize: baseFontSize * shrinkFactor,
|
|
311
|
+
scriptFontSize: effectiveFontSize,
|
|
312
|
+
lineHeight: textLineHeight,
|
|
313
|
+
});
|
|
309
314
|
// Double / accounting underlines on a single unrotated line (the default
|
|
310
315
|
// Text path); wrapped, rotated or rich-text cells keep Konva's single line.
|
|
311
316
|
const paintStyledUnderline = hasStyledUnderline &&
|
|
@@ -549,30 +554,30 @@ export const Cell = memo((props) => {
|
|
|
549
554
|
// lines, and `textFormatRuns` indices reference the raw
|
|
550
555
|
// string. `normalizeDisplayText` is bypassed because the
|
|
551
556
|
// renderer handles multi-line layout itself.
|
|
552
|
-
React.createElement(CellTextRuns, { x: textLeftPadding, y: textNode.y, width: finalTextWidth, height: textNode.height, padding: padding, value: displayValue ?? "", runs: textFormatRuns ?? [], baseColor: color ?? defaultColor, baseFontFamily: fontFamily,
|
|
557
|
+
React.createElement(CellTextRuns, { x: rotatedLayout?.x ?? textLeftPadding, y: rotatedLayout?.y ?? textNode.y, width: rotatedLayout?.width ?? finalTextWidth, height: rotatedLayout ? approxTextHeight : textNode.height, rotation: rotatedLayout ? rotationDegrees : undefined, fontScale: scale * shrinkFactor, padding: padding, value: displayValue ?? "", runs: textFormatRuns ?? [], baseColor: color ?? defaultColor, baseFontFamily: fontFamily,
|
|
553
558
|
// UN-scaled size on purpose: when the cell carries a
|
|
554
559
|
// baselineOffset the segment resolver applies the
|
|
555
560
|
// sup/sub font scale itself (exactly once). Shrink-to-
|
|
556
561
|
// fit never reaches this path, so `baseFontSize` equals
|
|
557
562
|
// `effectiveFontSize` for every other cell.
|
|
558
|
-
baseFontSize: baseFontSize, baseBold: !!bold, baseItalic: !!italic, baseUnderline: !!underline, baseStrikethrough: !!strikethrough, baseBaselineOffset: baselineOffset ?? undefined, horizontalAlign: canvasTextAlign, verticalAlign: effectiveVerticalAlignment, lineHeight: lineHeight, lineHeightMode: lineHeightMode, scale: scale, wrap: shouldWrap, theme: theme })) : paintDistributed ? (React.createElement(Shape, { x: textLeftPadding, y: textNode.y, width: finalTextWidth, height: textNode.height, sceneFunc: distributedSceneFunc, listening: false, perfectDrawEnabled: false })) : paintNumberFormatLayout ? (React.createElement(Shape, { x: textLeftPadding, y: textNode.y, width: finalTextWidth, height: textNode.height, sceneFunc: numberFormatSceneFunc, listening: false, perfectDrawEnabled: false })) : (React.createElement(React.Fragment, null,
|
|
559
|
-
React.createElement(Text, { x: rotatedLayout?.x ?? textLeftPadding, y: rotatedLayout?.y ?? textNode.y, offsetX: rotatedLayout?.offsetX, offsetY: rotatedLayout?.offsetY, height: rotatedLayout ? approxTextHeight : textNode.height, width: rotatedLayout?.width ?? finalTextWidth, text: displayValue, fill: color ?? defaultColor, verticalAlign: rotatedLayout ? "top" : effectiveVerticalAlignment, align: rotatedLayout ? "left" : canvasTextAlign, fontFamily: fontFamily, fontStyle: textStyle, fontSize: effectiveFontSize, textDecoration: paintStyledUnderline ? textDecorationFor(false) : textDecoration, padding: padding, wrap: textWrapStrategy, lineHeight: textLineHeight, rotation: rotationDegrees, direction: textDirection, hitStrokeWidth: 0, perfectDrawEnabled: false }),
|
|
563
|
+
baseFontSize: baseFontSize * shrinkFactor, baseBold: !!bold, baseItalic: !!italic, baseUnderline: !!underline, baseStrikethrough: !!strikethrough, baseBaselineOffset: baselineOffset ?? undefined, horizontalAlign: rotatedLayout ? "left" : canvasTextAlign, verticalAlign: rotatedLayout ? "top" : effectiveVerticalAlignment, lineHeight: lineHeight, lineHeightMode: lineHeightMode, scale: scale, wrap: shouldWrap && !rotatedLayout, theme: theme })) : paintDistributed ? (React.createElement(Shape, { x: textLeftPadding, y: textNode.y, width: finalTextWidth, height: textNode.height, sceneFunc: distributedSceneFunc, listening: false, perfectDrawEnabled: false })) : paintNumberFormatLayout ? (React.createElement(Shape, { x: textLeftPadding, y: textNode.y, width: finalTextWidth, height: textNode.height, sceneFunc: numberFormatSceneFunc, listening: false, perfectDrawEnabled: false })) : (React.createElement(React.Fragment, null,
|
|
564
|
+
React.createElement(Text, { x: rotatedLayout?.x ?? textLeftPadding, y: rotatedLayout?.y ?? textNode.y, offsetX: rotatedLayout?.offsetX, offsetY: (rotatedLayout?.offsetY ?? 0) + scriptOffsetY, height: rotatedLayout ? approxTextHeight : textNode.height, width: rotatedLayout?.width ?? finalTextWidth, text: displayValue, fill: color ?? defaultColor, verticalAlign: rotatedLayout ? "top" : effectiveVerticalAlignment, align: rotatedLayout ? "left" : canvasTextAlign, fontFamily: fontFamily, fontStyle: textStyle, fontSize: effectiveFontSize, textDecoration: paintStyledUnderline ? textDecorationFor(false) : textDecoration, padding: padding, wrap: textWrapStrategy, lineHeight: textLineHeight, rotation: rotationDegrees, direction: textDirection, hitStrokeWidth: 0, perfectDrawEnabled: false }),
|
|
560
565
|
paintStyledUnderline ? (React.createElement(Shape, { sceneFunc: underlineSceneFunc, listening: false, perfectDrawEnabled: false })) : null)))) : imageUrl ? (React.createElement(Image, { x: x, y: y, spacing: 1, width: width, height: height, url: imageUrl, perfectDrawEnabled: false, horizontalAlignment: canvasTextAlign === "justify" ? "left" : canvasTextAlign, verticalAlignment: verticalAlignment })) : null,
|
|
561
566
|
showFilter ? (React.createElement(CellFilter, { scale: scale, isActive: isFilterActive, onClick: readonly ? undefined : onFilterClick, rowIndex: props.rowIndex, columnIndex: props.columnIndex, x: x, y: y, height: height, width: width, filterIconColor: filterIconColor, verticalAlignment: verticalAlignment, backgroundColor: defaultBackgroundColor, sortOrder: sortOrder })) : showArrow && !readonly ? (React.createElement(CellArrow, { scale: scale, onClick: onArrowClick ?? onRequestEdit, rowIndex: rowIndex, columnIndex: columnIndex, x: arrowOutside ? x + (ARROW_DOWN_WIDTH + 4) * scale : x, y: y, height: height, width: width, verticalAlignment: verticalAlignment })) : null,
|
|
562
567
|
expandable ? (React.createElement(CellGroup, { scale: scale, onClick: (cell) => {
|
|
563
568
|
onExpandCollapse?.(cell, !expanded);
|
|
564
569
|
}, rowIndex: rowIndex, columnIndex: columnIndex, x: x + indentSpacing, y: y, height: height, width: width, verticalAlignment: verticalAlignment, expanded: expanded, theme: theme })) : null,
|
|
565
570
|
showCalculatedColumnIcon && isCalculatedColumn ? (React.createElement(CellCalculated, { x: x, y: y, scale: scale, width: width, height: height, verticalAlignment: verticalAlignment, color: color })) : null,
|
|
566
|
-
|
|
567
|
-
showNote ? (React.createElement(CellError, { color: NOTE_COLOR, x: x + width - ERROR_TAG_WIDTH * scale, y: y + 1, scale: scale })) : null,
|
|
568
|
-
showComment ? (React.createElement(CellError, { color: COMMENT_COLOR, x: x + width - ERROR_TAG_WIDTH * scale, y: y + 1, scale: scale })) : null,
|
|
571
|
+
React.createElement(CellIndicators, { x: x, y: y, width: width, height: height, scale: scale, showNote: showNote, showComment: showComment, showErrorIndicator: showErrorIndicator, circleInvalid: circleInvalid }),
|
|
569
572
|
structuredValue ? (React.createElement(StructuredResult, { x: x, y: y, width: width, height: height,
|
|
570
573
|
// Text props
|
|
571
574
|
textX: textLeftPadding, textY: y + cellSpacingY, textWidth: finalTextWidth, textFill: color ?? defaultColor, textVerticalAlign: verticalAlignment, textAlign: canvasTextAlign, textFontFamily: fontFamily, textFontStyle: textStyle, textFontSize: fontSize, textDecoration: textDecoration, textPadding: padding, textWrap: textWrapStrategy, textLineHeight: lineHeight,
|
|
572
575
|
// / Text props
|
|
573
576
|
color: defaultBackgroundColor
|
|
574
577
|
? getContrastColor(getStringifiedColor(defaultBackgroundColor, theme), getStringifiedColor({ theme: 1 }, theme), getStringifiedColor({ theme: 1, tint: 1 }, theme))
|
|
575
|
-
: undefined, structuredValue: structuredValue, sparklineGroupAxis: sparklineGroupAxis
|
|
578
|
+
: undefined, structuredValue: structuredValue, sparklineGroupAxis: sparklineGroupAxis, sparklineDefaultColors: structuredValue.kind === "sparkline"
|
|
579
|
+
? resolveDefaultSparklineColors((c) => getStringifiedColor(c, theme))
|
|
580
|
+
: undefined })) : null,
|
|
576
581
|
showExpand ? (React.createElement(CellExpand, { scale: scale, onClick: onRequestEdit, rowIndex: rowIndex, columnIndex: columnIndex, x: x, y: y, height: height, width: width, verticalAlignment: verticalAlignment, horizontalAlignment: horizontalAlignment })) : null));
|
|
577
582
|
});
|
|
578
583
|
Cell.displayName = "Cell";
|
|
@@ -88,6 +88,15 @@ export type CellProps<S extends StructuredResult = StructuredResult> = RendererP
|
|
|
88
88
|
* Formula errors
|
|
89
89
|
*/
|
|
90
90
|
isError?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Excel's green ◤ error-checking indicator (a formula error or a number stored as text that
|
|
93
|
+
* the user has not ignored).
|
|
94
|
+
*/
|
|
95
|
+
showErrorIndicator?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Data → Data Validation → Circle Invalid Data: circle this cell, which fails its validation.
|
|
98
|
+
*/
|
|
99
|
+
circleInvalid?: boolean;
|
|
91
100
|
/**
|
|
92
101
|
* Show dropdown arrow
|
|
93
102
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../../components/cell/typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EACL,iBAAiB,EAElB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB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aAAa,GAAG,IAAI,CAAC;IAC1C;;;;OAIG;IACH,eAAe,CAAC,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9D;;;OAGG;IACH,aAAa,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC1C;;;;;OAKG;IACH,YAAY,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE;;OAEG;IACH,6BAA6B,EAAE,iBAAiB,CAAC,+BAA+B,CAAC,CAAC;IAClF;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -9,12 +9,32 @@ export declare const shouldShowCalendarPopup: (numberFormat: NumberFormat | null
|
|
|
9
9
|
export declare const isFillSelectionCommit: (e: {
|
|
10
10
|
key: string;
|
|
11
11
|
ctrlKey?: boolean;
|
|
12
|
+
shiftKey?: boolean;
|
|
12
13
|
} | undefined) => boolean;
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Excel's legacy array entry: Ctrl+Shift+Enter (Windows), ⇧⌘Return or ⌃⇧Return (Mac) commits the
|
|
16
|
+
* entry as one array formula over the selection ("Keyboard shortcuts in Excel").
|
|
17
|
+
*/
|
|
18
|
+
export declare const isArrayFormulaCommit: (e: {
|
|
19
|
+
key: string;
|
|
20
|
+
ctrlKey?: boolean;
|
|
21
|
+
metaKey?: boolean;
|
|
22
|
+
shiftKey?: boolean;
|
|
23
|
+
} | undefined) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Excel's "After pressing Enter, move selection" (File › Options › Advanced): the direction Enter
|
|
26
|
+
* moves the active cell after an entry, and while navigating; `"none"` unticks the option, so
|
|
27
|
+
* Enter commits in place. Shift+Enter goes the other way.
|
|
28
|
+
*/
|
|
29
|
+
export type EnterKeyDirection = "down" | "right" | "up" | "left" | "none";
|
|
30
|
+
/** Where Enter (`isShift`: Shift+Enter) moves the active cell; `null` when it stays. */
|
|
31
|
+
export declare const getEnterKeyDirection: (isShift: boolean, enterKeyDirection?: EnterKeyDirection) => Direction | null;
|
|
32
|
+
/**
|
|
33
|
+
* Get next cell direction from key code. Enter follows `enterKeyDirection`, and is `null` when
|
|
34
|
+
* Enter does not move.
|
|
15
35
|
* @param code
|
|
16
36
|
* @param isShift
|
|
17
37
|
* @returns
|
|
18
38
|
*/
|
|
19
|
-
export declare const getDirectionFromKey: (code: string, isShift: boolean) => Direction;
|
|
39
|
+
export declare const getDirectionFromKey: (code: string, isShift: boolean, enterKeyDirection?: EnterKeyDirection) => Direction | null;
|
|
20
40
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../components/cell-editor/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,uBAAuB,GAClC,cAAc,YAAY,GAAG,IAAI,GAAG,SAAS,YAIP,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../components/cell-editor/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,uBAAuB,GAClC,cAAc,YAAY,GAAG,IAAI,GAAG,SAAS,YAIP,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,YACH,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,GACI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GACzE,SAAS,YAI6B,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAY1E,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,OAAO,EAChB,oBAAmB,iBAA0B,KAC5C,SAAS,GAAG,IAId,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,EACZ,SAAS,OAAO,EAChB,oBAAoB,iBAAiB,KACpC,SAAS,GAAG,IAed,CAAC"}
|
|
@@ -8,19 +8,37 @@ export const shouldShowCalendarPopup = (numberFormat) => numberFormat?.type ===
|
|
|
8
8
|
* selected cell and the active cell does not move. Only `ctrlKey` counts — on macOS Cmd+Enter is
|
|
9
9
|
* the in-cell line break (see `useEditorKeyDownPM`) and never reaches the submit path.
|
|
10
10
|
*/
|
|
11
|
-
export const isFillSelectionCommit = (e) => e?.key === "Enter" && e.ctrlKey === true;
|
|
11
|
+
export const isFillSelectionCommit = (e) => e?.key === "Enter" && e.ctrlKey === true && e.shiftKey !== true;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Excel's legacy array entry: Ctrl+Shift+Enter (Windows), ⇧⌘Return or ⌃⇧Return (Mac) commits the
|
|
14
|
+
* entry as one array formula over the selection ("Keyboard shortcuts in Excel").
|
|
15
|
+
*/
|
|
16
|
+
export const isArrayFormulaCommit = (e) => e?.key === "Enter" &&
|
|
17
|
+
e.shiftKey === true &&
|
|
18
|
+
(e.ctrlKey === true || e.metaKey === true);
|
|
19
|
+
const ENTER_DIRECTIONS = {
|
|
20
|
+
down: [Direction.Down, Direction.Up],
|
|
21
|
+
up: [Direction.Up, Direction.Down],
|
|
22
|
+
right: [Direction.Right, Direction.Left],
|
|
23
|
+
left: [Direction.Left, Direction.Right],
|
|
24
|
+
};
|
|
25
|
+
/** Where Enter (`isShift`: Shift+Enter) moves the active cell; `null` when it stays. */
|
|
26
|
+
export const getEnterKeyDirection = (isShift, enterKeyDirection = "down") => {
|
|
27
|
+
if (enterKeyDirection === "none")
|
|
28
|
+
return null;
|
|
29
|
+
const [forward, back] = ENTER_DIRECTIONS[enterKeyDirection];
|
|
30
|
+
return isShift ? back : forward;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Get next cell direction from key code. Enter follows `enterKeyDirection`, and is `null` when
|
|
34
|
+
* Enter does not move.
|
|
14
35
|
* @param code
|
|
15
36
|
* @param isShift
|
|
16
37
|
* @returns
|
|
17
38
|
*/
|
|
18
|
-
export const getDirectionFromKey = (code, isShift) => {
|
|
39
|
+
export const getDirectionFromKey = (code, isShift, enterKeyDirection) => {
|
|
19
40
|
if (code === "Enter") {
|
|
20
|
-
|
|
21
|
-
return Direction.Up;
|
|
22
|
-
}
|
|
23
|
-
return Direction.Down;
|
|
41
|
+
return getEnterKeyDirection(isShift, enterKeyDirection);
|
|
24
42
|
}
|
|
25
43
|
if (code === "Tab") {
|
|
26
44
|
if (isShift) {
|
|
@@ -147,6 +147,12 @@ export type CellEditorProps = SharedEditorProps & {
|
|
|
147
147
|
* Mention dropdown component
|
|
148
148
|
*/
|
|
149
149
|
MentionDropdownItemComponent?: CanvasGridProps["MentionDropdownItemComponent"];
|
|
150
|
+
/**
|
|
151
|
+
* Excel's AutoComplete for cell values: the text entries of the edited
|
|
152
|
+
* cell's column block (read once per edit, on the first keystroke). Omit to
|
|
153
|
+
* turn AutoComplete off.
|
|
154
|
+
*/
|
|
155
|
+
getAutoCompleteEntries?: () => string[];
|
|
150
156
|
};
|
|
151
|
-
export declare const CellEditor: React.MemoExoticComponent<({ value, effectiveValue, isNewValue, onChange, sheetId, editingSheetId, cell, position, format, locale, formulaLocale, scale, autoFocus, maxWidth, maxHeight, containerWidth, onSubmit, onCancel, getNextFocusableCell, dataValidation, getRangeValues, getRangeValuesAsync, horizontalAlignment, editingSheetName, address, isScrolling, showFormulaHelp, onHideFormulaHelp, onShowFormulaHelp, onKeyDown, tokenizer, defaultBackgroundColor, defaultTextColor, theme, functionDescriptions, getNamedRanges, getTableNames, getTableColumnNames, getStructuredProperties, onRequestCalculate, editorBorderColor, isPointerDevice, SuggestionsDropdown, stickyEditor, defaultFontSizePoint, textFormatRuns, getMentions, getFunctionParameterSuggestions, shouldFetchFunctionParameters, MentionTagComponent, MentionDropdownItemComponent, navigationMode, readOnly, onCopy, onPaste, onCut, onBlur, }: CellEditorProps) => React.JSX.Element>;
|
|
157
|
+
export declare const CellEditor: React.MemoExoticComponent<({ value, effectiveValue, isNewValue, onChange, sheetId, editingSheetId, cell, position, format, locale, formulaLocale, scale, autoFocus, maxWidth, maxHeight, containerWidth, onSubmit, onCancel, getNextFocusableCell, dataValidation, getRangeValues, getRangeValuesAsync, horizontalAlignment, editingSheetName, address, isScrolling, showFormulaHelp, onHideFormulaHelp, onShowFormulaHelp, onKeyDown, tokenizer, defaultBackgroundColor, defaultTextColor, theme, functionDescriptions, getNamedRanges, getTableNames, getTableColumnNames, getStructuredProperties, onRequestCalculate, editorBorderColor, isPointerDevice, SuggestionsDropdown, stickyEditor, defaultFontSizePoint, textFormatRuns, getMentions, getFunctionParameterSuggestions, shouldFetchFunctionParameters, MentionTagComponent, MentionDropdownItemComponent, navigationMode, readOnly, onCopy, onPaste, onCut, onBlur, getAutoCompleteEntries, }: CellEditorProps) => React.JSX.Element>;
|
|
152
158
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/cell-editor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EAEtB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,aAAa,EAQnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAyD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/cell-editor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EAEtB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,aAAa,EAQnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAyD,MAAM,OAAO,CAAC;AAkB9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAiBhF,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;OAEG;IACH,MA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