@rowsncolumns/spreadsheet 10.15.0 → 10.17.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.
Files changed (88) hide show
  1. package/dist/cjs/api/editor-formula.d.ts +40 -0
  2. package/dist/cjs/api/editor-formula.d.ts.map +1 -0
  3. package/dist/cjs/api/editor-formula.js +87 -0
  4. package/dist/cjs/atoms/cell-input-context.atom.d.ts.map +1 -1
  5. package/dist/cjs/components/autocorrect-options-smart-tag/index.d.ts +22 -8
  6. package/dist/cjs/components/autocorrect-options-smart-tag/index.d.ts.map +1 -1
  7. package/dist/cjs/components/autocorrect-options-smart-tag/index.js +107 -22
  8. package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
  9. package/dist/cjs/components/canvas-grid/index.js +46 -10
  10. package/dist/cjs/components/canvas-grid/typings.d.ts +8 -0
  11. package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
  12. package/dist/cjs/components/cell-input/cell-input.d.ts.map +1 -1
  13. package/dist/cjs/components/cell-input/cell-input.js +3 -1
  14. package/dist/cjs/components/embeds/embed-draggable.d.ts.map +1 -1
  15. package/dist/cjs/components/embeds/embed-draggable.js +32 -11
  16. package/dist/cjs/components/embeds/object-focus.d.ts +16 -3
  17. package/dist/cjs/components/embeds/object-focus.d.ts.map +1 -1
  18. package/dist/cjs/components/embeds/object-focus.js +62 -6
  19. package/dist/cjs/components/outline-gutter/index.d.ts +11 -3
  20. package/dist/cjs/components/outline-gutter/index.d.ts.map +1 -1
  21. package/dist/cjs/components/outline-gutter/index.js +11 -6
  22. package/dist/cjs/components/selection/index.d.ts +1 -1
  23. package/dist/cjs/components/selection/index.d.ts.map +1 -1
  24. package/dist/cjs/components/selection/index.js +2 -2
  25. package/dist/cjs/components/selection/types.d.ts +2 -0
  26. package/dist/cjs/components/selection/types.d.ts.map +1 -1
  27. package/dist/cjs/hooks/object-spec-schema.generated.d.ts.map +1 -1
  28. package/dist/cjs/hooks/object-spec-schema.generated.js +16 -0
  29. package/dist/cjs/hooks/use-editable.d.ts.map +1 -1
  30. package/dist/cjs/hooks/use-editable.js +5 -1
  31. package/dist/cjs/hooks/use-editor-change.d.ts.map +1 -1
  32. package/dist/cjs/hooks/use-editor-change.js +3 -1
  33. package/dist/cjs/hooks/use-flash-fill-suggestion.d.ts.map +1 -1
  34. package/dist/cjs/hooks/use-flash-fill-suggestion.js +15 -4
  35. package/dist/cjs/hooks/use-grid-children.d.ts +7 -1
  36. package/dist/cjs/hooks/use-grid-children.d.ts.map +1 -1
  37. package/dist/cjs/hooks/use-grid-children.js +8 -2
  38. package/dist/cjs/hooks/use-selection-renderer.d.ts.map +1 -1
  39. package/dist/cjs/hooks/use-selection-renderer.js +18 -4
  40. package/dist/cjs/release-date.js +1 -1
  41. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  42. package/dist/cjs/types.d.ts +17 -0
  43. package/dist/cjs/types.d.ts.map +1 -1
  44. package/dist/esm/api/editor-formula.d.ts +40 -0
  45. package/dist/esm/api/editor-formula.d.ts.map +1 -0
  46. package/dist/esm/api/editor-formula.js +76 -0
  47. package/dist/esm/atoms/cell-input-context.atom.d.ts.map +1 -1
  48. package/dist/esm/components/autocorrect-options-smart-tag/index.d.ts +22 -8
  49. package/dist/esm/components/autocorrect-options-smart-tag/index.d.ts.map +1 -1
  50. package/dist/esm/components/autocorrect-options-smart-tag/index.js +103 -22
  51. package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
  52. package/dist/esm/components/canvas-grid/index.js +46 -11
  53. package/dist/esm/components/canvas-grid/typings.d.ts +8 -0
  54. package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
  55. package/dist/esm/components/cell-input/cell-input.d.ts.map +1 -1
  56. package/dist/esm/components/cell-input/cell-input.js +4 -2
  57. package/dist/esm/components/embeds/embed-draggable.d.ts.map +1 -1
  58. package/dist/esm/components/embeds/embed-draggable.js +31 -13
  59. package/dist/esm/components/embeds/object-focus.d.ts +16 -3
  60. package/dist/esm/components/embeds/object-focus.d.ts.map +1 -1
  61. package/dist/esm/components/embeds/object-focus.js +38 -2
  62. package/dist/esm/components/outline-gutter/index.d.ts +11 -3
  63. package/dist/esm/components/outline-gutter/index.d.ts.map +1 -1
  64. package/dist/esm/components/outline-gutter/index.js +11 -6
  65. package/dist/esm/components/selection/index.d.ts +1 -1
  66. package/dist/esm/components/selection/index.d.ts.map +1 -1
  67. package/dist/esm/components/selection/index.js +2 -2
  68. package/dist/esm/components/selection/types.d.ts +2 -0
  69. package/dist/esm/components/selection/types.d.ts.map +1 -1
  70. package/dist/esm/hooks/object-spec-schema.generated.d.ts.map +1 -1
  71. package/dist/esm/hooks/object-spec-schema.generated.js +16 -0
  72. package/dist/esm/hooks/use-editable.d.ts.map +1 -1
  73. package/dist/esm/hooks/use-editable.js +6 -2
  74. package/dist/esm/hooks/use-editor-change.d.ts.map +1 -1
  75. package/dist/esm/hooks/use-editor-change.js +4 -2
  76. package/dist/esm/hooks/use-flash-fill-suggestion.d.ts.map +1 -1
  77. package/dist/esm/hooks/use-flash-fill-suggestion.js +15 -4
  78. package/dist/esm/hooks/use-grid-children.d.ts +7 -1
  79. package/dist/esm/hooks/use-grid-children.d.ts.map +1 -1
  80. package/dist/esm/hooks/use-grid-children.js +7 -1
  81. package/dist/esm/hooks/use-selection-renderer.d.ts.map +1 -1
  82. package/dist/esm/hooks/use-selection-renderer.js +18 -4
  83. package/dist/esm/release-date.js +1 -1
  84. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  85. package/dist/esm/types.d.ts +17 -0
  86. package/dist/esm/types.d.ts.map +1 -1
  87. package/dist/spreadsheet.min.css +1 -1
  88. package/package.json +3 -3
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The cell editor's own reading of the text being typed (demo-app-monorepo#57258): the engine takes
3
+ * a sign typed in front of a number literal as that number (rowsncolumns/spreadsheet#1666,
4
+ * rnc-cellmodel `is_a_formula_in`), so the editor does not colour it, offer function hints or pick
5
+ * references with the arrow keys while it is typed.
6
+ */
7
+ /** The marks a locale writes numbers with: its decimal mark and its thousands separator. */
8
+ export type NumberSeparators = {
9
+ decimal: string;
10
+ group: string;
11
+ };
12
+ /**
13
+ * The number marks of a locale, from CLDR as the engine reads them (ICU there, `Intl` here): de-DE
14
+ * `1.234,5`, fr-FR `1 234,5` (a narrow no-break space), de-CH `1'234.5`. Without a locale, or one
15
+ * `Intl` does not know: en-US.
16
+ */
17
+ export declare const numberSeparatorsOf: (locale?: {
18
+ id?: string;
19
+ } | null) => NumberSeparators;
20
+ /**
21
+ * A `+` / `-` right in front of a number literal that the engine takes as that number
22
+ * (rnc-cellmodel `is_a_formula_in`, rowsncolumns/spreadsheet#1666): a percent, a number ending in
23
+ * `€`, or a mixed fraction (`-3%`, `+3%`, `-1,234.5%`, `-.5%`, `-0 1/2`, `-5€`, `-3,5%` in de-DE).
24
+ * A date or a time after the sign (`-1/2`, `-3 PM`, `-12:30`), a bracket or a second sign (`-(3)`,
25
+ * `--3%`), a `%` after an exponent (`-1e5%`) and anything that is not a number (`+A1`,
26
+ * `-SUM(A1)`) are not. Kept to what that rule accepts: the editor never calls something a number
27
+ * that the engine will store as a formula.
28
+ */
29
+ export declare const isSignedNumberLiteral: (text: string, separators?: NumberSeparators) => boolean;
30
+ /**
31
+ * Whether the cell editor treats the text being typed as a formula: its syntax colouring, its
32
+ * function hints and autocomplete, and arrow keys picking references. The same as
33
+ * {@link isAFormula}, except that a sign in front of a number literal (`-3%`) is that number, as
34
+ * the engine stores it. `isAFormula` itself is unchanged: it classifies entries on the commit
35
+ * paths, which follow the engine.
36
+ */
37
+ export declare const isAFormulaWhileEditing: (text: unknown, locale?: {
38
+ id?: string;
39
+ } | null) => boolean;
40
+ //# sourceMappingURL=editor-formula.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-formula.d.ts","sourceRoot":"","sources":["../../../api/editor-formula.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,4FAA4F;AAC5F,MAAM,MAAM,gBAAgB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAMlE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,KAC9B,gBAiBF,CAAC;AAkCF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,aAAY,gBAAmC,KAC9C,OAAsE,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,OAAO,EACb,SAAS;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,KAC9B,OAIF,CAAC"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAFormulaWhileEditing = exports.isSignedNumberLiteral = exports.numberSeparatorsOf = void 0;
4
+ var utils_1 = require("@rowsncolumns/utils");
5
+ var EN_US_SEPARATORS = { decimal: ".", group: "," };
6
+ var separatorsByLocale = new Map();
7
+ /**
8
+ * The number marks of a locale, from CLDR as the engine reads them (ICU there, `Intl` here): de-DE
9
+ * `1.234,5`, fr-FR `1 234,5` (a narrow no-break space), de-CH `1'234.5`. Without a locale, or one
10
+ * `Intl` does not know: en-US.
11
+ */
12
+ var numberSeparatorsOf = function (locale) {
13
+ var _a, _b, _c, _d;
14
+ var tag = locale === null || locale === void 0 ? void 0 : locale.id;
15
+ if (!tag)
16
+ return EN_US_SEPARATORS;
17
+ var separators = separatorsByLocale.get(tag);
18
+ if (!separators) {
19
+ try {
20
+ var parts = new Intl.NumberFormat(tag, { useGrouping: true }).formatToParts(1234567.5);
21
+ separators = {
22
+ decimal: (_b = (_a = parts.find(function (part) { return part.type === "decimal"; })) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ".",
23
+ group: (_d = (_c = parts.find(function (part) { return part.type === "group"; })) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : ",",
24
+ };
25
+ }
26
+ catch (_e) {
27
+ separators = EN_US_SEPARATORS;
28
+ }
29
+ separatorsByLocale.set(tag, separators);
30
+ }
31
+ return separators;
32
+ };
33
+ exports.numberSeparatorsOf = numberSeparatorsOf;
34
+ var escapeRegExp = function (text) { return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); };
35
+ var signedNumberLiteralPatterns = new Map();
36
+ /**
37
+ * The literals of rowsncolumns/spreadsheet#1666's entry table, and nothing wider: a whole number
38
+ * (thousands-grouped or not) with decimal digits after the mark, or decimals alone, ending in `%`
39
+ * or `€`; or a mixed fraction as the engine reads one (`\d{1,15} +\d{1,3}/\d{1,3}`, a non-zero
40
+ * denominator). A plain or scientific number after a sign is not a formula already.
41
+ */
42
+ var signedNumberLiteralPattern = function (_a) {
43
+ var decimal = _a.decimal, group = _a.group;
44
+ var key = "".concat(decimal).concat(group);
45
+ var pattern = signedNumberLiteralPatterns.get(key);
46
+ if (!pattern) {
47
+ var d = escapeRegExp(decimal);
48
+ // Groups only with `,` or `.`: a space or an apostrophe as the thousands mark (fr-FR, de-CH)
49
+ // is written differently across CLDR versions and keyboards, so a grouped number there keeps
50
+ // the formula reading rather than risk calling a number what the engine does not.
51
+ var whole = group === "," || group === "."
52
+ ? "(?:\\d{1,3}(?:".concat(escapeRegExp(group), "\\d{3})+|\\d+)")
53
+ : "\\d+";
54
+ var number = "(?:".concat(whole, "(?:").concat(d, "\\d+)?|").concat(d, "\\d+)");
55
+ pattern = new RegExp("^[+-](?:".concat(number, "(?:%|\u20AC)|\\d{1,15} +\\d{1,3}/(?!0+$)\\d{1,3})$"), "u");
56
+ signedNumberLiteralPatterns.set(key, pattern);
57
+ }
58
+ return pattern;
59
+ };
60
+ /**
61
+ * A `+` / `-` right in front of a number literal that the engine takes as that number
62
+ * (rnc-cellmodel `is_a_formula_in`, rowsncolumns/spreadsheet#1666): a percent, a number ending in
63
+ * `€`, or a mixed fraction (`-3%`, `+3%`, `-1,234.5%`, `-.5%`, `-0 1/2`, `-5€`, `-3,5%` in de-DE).
64
+ * A date or a time after the sign (`-1/2`, `-3 PM`, `-12:30`), a bracket or a second sign (`-(3)`,
65
+ * `--3%`), a `%` after an exponent (`-1e5%`) and anything that is not a number (`+A1`,
66
+ * `-SUM(A1)`) are not. Kept to what that rule accepts: the editor never calls something a number
67
+ * that the engine will store as a formula.
68
+ */
69
+ var isSignedNumberLiteral = function (text, separators) {
70
+ if (separators === void 0) { separators = EN_US_SEPARATORS; }
71
+ return signedNumberLiteralPattern(separators).test(text.trimEnd());
72
+ };
73
+ exports.isSignedNumberLiteral = isSignedNumberLiteral;
74
+ /**
75
+ * Whether the cell editor treats the text being typed as a formula: its syntax colouring, its
76
+ * function hints and autocomplete, and arrow keys picking references. The same as
77
+ * {@link isAFormula}, except that a sign in front of a number literal (`-3%`) is that number, as
78
+ * the engine stores it. `isAFormula` itself is unchanged: it classifies entries on the commit
79
+ * paths, which follow the engine.
80
+ */
81
+ var isAFormulaWhileEditing = function (text, locale) {
82
+ if (!(0, utils_1.isAFormula)(text))
83
+ return false;
84
+ var textStr = String(text);
85
+ return !(0, exports.isSignedNumberLiteral)(textStr, (0, exports.numberSeparatorsOf)(locale));
86
+ };
87
+ exports.isAFormulaWhileEditing = isAFormulaWhileEditing;
@@ -1 +1 @@
1
- {"version":3,"file":"cell-input-context.atom.d.ts","sourceRoot":"","sources":["../../../atoms/cell-input-context.atom.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,mBAAmB;;;;oBACu63F,CAAC;qBAAwB,CAAC;;;;;;;;;;;CADl53F,CAAC"}
1
+ {"version":3,"file":"cell-input-context.atom.d.ts","sourceRoot":"","sources":["../../../atoms/cell-input-context.atom.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,mBAAmB;;;;oBAC874F,CAAC;qBAAwB,CAAC;;;;;;;;;;;CADz64F,CAAC"}
@@ -1,8 +1,19 @@
1
1
  import React from "react";
2
2
  import type { CalculatedColumnFillKind, CalculatedColumnOption } from "../../api/calculated-column-fill";
3
3
  import type { TableAutoExpansionOption } from "../../api/table-auto-expansion";
4
+ /**
5
+ * Where the button hangs from its cell. `outside`: just outside the bottom-right corner, over the
6
+ * next row (Excel for Mac). When a split bar runs along the cell's bottom or right edge, that
7
+ * corner is in no pane, so the pane showing the cell keeps the button inside itself: `above-bar`
8
+ * (the bar under the cell: beside the cell, its bottom on the bar), `left-of-bar` (the bar right
9
+ * of the cell: under the cell, its right on the bar), `inside` (both: in the cell's corner).
10
+ */
11
+ export type AutoCorrectPlacement = "outside" | "above-bar" | "left-of-bar" | "inside";
4
12
  export type AutoCorrectOptionsSmartTagProps = {
5
- /** Position/size of the cell the tag belongs to; the tag sits beside its top-right corner. */
13
+ /**
14
+ * Position/size of the cell the tag belongs to; the tag hangs just outside its bottom-right
15
+ * corner, over the next row (where Excel for Mac puts it).
16
+ */
6
17
  x: number;
7
18
  y: number;
8
19
  width: number;
@@ -21,17 +32,20 @@ export type AutoCorrectOptionsSmartTagProps = {
21
32
  canStop: boolean;
22
33
  };
23
34
  onChooseCalculatedColumnOption?(option: CalculatedColumnOption): void;
35
+ /** Where the button hangs from the cell; `outside` by default. */
36
+ placement?: AutoCorrectPlacement;
24
37
  };
25
38
  /**
26
- * Excel's AutoCorrect Options smart tag beside the cell an edit grew a table from, or typed a
27
- * table column's formula into — ONE button, carrying the entries of both when one edit did both
28
- * (a formula typed in the column right of a table): "Undo Table AutoExpansion" / "Stop
29
- * Automatically Expanding Tables", and "Undo Calculated Column" (or "Overwrite all cells in this
30
- * column with this formula") / "Stop automatically creating calculated columns". An entry the
31
- * host cannot carry out is not offered; with none left, no button.
39
+ * Excel's AutoCorrect Options smart tag, hanging from the bottom-right corner of the cell an edit
40
+ * grew a table from, or typed a table column's formula into — ONE button, carrying the entries of
41
+ * both when one edit did both (a formula typed in the column right of a table): "Undo Table
42
+ * AutoExpansion" / "Stop Automatically Expanding Tables", and "Undo Calculated Column" (or
43
+ * "Overwrite all cells in this column with this formula") / "Stop automatically creating
44
+ * calculated columns". An entry the host cannot carry out is not offered; with none left, no
45
+ * button.
32
46
  */
33
47
  export declare const AutoCorrectOptionsSmartTag: {
34
- ({ x, y, width, tableAutoExpansion, onChooseTableAutoExpansionOption, calculatedColumn, onChooseCalculatedColumnOption, }: AutoCorrectOptionsSmartTagProps): React.JSX.Element | null;
48
+ ({ x, y, width, height, tableAutoExpansion, onChooseTableAutoExpansionOption, calculatedColumn, onChooseCalculatedColumnOption, placement, }: AutoCorrectOptionsSmartTagProps): React.JSX.Element | null;
35
49
  displayName: string;
36
50
  };
37
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/autocorrect-options-smart-tag/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,8FAA8F;IAC9F,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5D,gCAAgC,CAAC,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC1E,yGAAyG;IACzG,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,wBAAwB,CAAC;QAC/B,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,EAAE,OAAO,CAAC;QACtB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,8BAA8B,CAAC,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACvE,CAAC;AAWF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;+HAQpC,+BAA+B;;CAyGjC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/autocorrect-options-smart-tag/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,WAAW,GACX,aAAa,GACb,QAAQ,CAAC;AA+Eb,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5D,gCAAgC,CAAC,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC1E,yGAAyG;IACzG,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,wBAAwB,CAAC;QAC/B,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,EAAE,OAAO,CAAC;QACtB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,8BAA8B,CAAC,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACtE,kEAAkE;IAClE,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC,CAAC;AAgCF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B;kJAUpC,+BAA+B;;CA+HjC,CAAC"}
@@ -4,20 +4,100 @@ exports.AutoCorrectOptionsSmartTag = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var ui_1 = require("@rowsncolumns/ui");
6
6
  var react_1 = tslib_1.__importStar(require("react"));
7
- /** Excel's AutoCorrect Options lightning bolt. */
8
- var LightningIcon = function () { return (react_1.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true" },
9
- react_1.default.createElement("path", { d: "M13 2 4 14h6l-1 8 9-12h-6l1-8z" }))); };
7
+ var placementStyle = function (placement, _a) {
8
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
9
+ var beside = placement === "outside" || placement === "above-bar";
10
+ var below = placement === "outside" || placement === "left-of-bar";
11
+ return {
12
+ left: beside ? x + width + 2 : x + width,
13
+ top: y + height,
14
+ transform: beside && below
15
+ ? undefined
16
+ : "translate(".concat(beside ? "0" : "-100%", ", ").concat(below ? "0" : "-100%", ")"),
17
+ };
18
+ };
19
+ /** The nearest ancestor that clips its content: the pane the button is drawn in. */
20
+ var clipOf = function (node) {
21
+ var _a;
22
+ var view = node.ownerDocument.defaultView;
23
+ for (var el = node.parentElement; el; el = el.parentElement) {
24
+ var overflow = (_a = view === null || view === void 0 ? void 0 : view.getComputedStyle(el).overflow) !== null && _a !== void 0 ? _a : "";
25
+ if (overflow && overflow !== "visible")
26
+ return el;
27
+ }
28
+ return null;
29
+ };
30
+ var THRESHOLDS = Array.from({ length: 25 }, function (_, i) { return i / 24; });
31
+ /**
32
+ * Keeps the button whole inside the pane it is drawn in: an invisible box at the button's own
33
+ * place is watched against the pane (an `IntersectionObserver`, so a pane scrolling the cell toward
34
+ * its edge is seen too), and the button is moved back inside by as much as that box sticks out —
35
+ * a cell one row above a split bar or the window's edge, where hanging below the cell would cut
36
+ * the button. Without `IntersectionObserver` (jsdom) the button stays at its place.
37
+ */
38
+ var useKeepInsidePane = function (deps) {
39
+ var sentinelRef = (0, react_1.useRef)(null);
40
+ var _a = tslib_1.__read((0, react_1.useState)({ x: 0, y: 0 }), 2), shift = _a[0], setShift = _a[1];
41
+ (0, react_1.useEffect)(function () {
42
+ var _a;
43
+ var sentinel = sentinelRef.current;
44
+ var IO = (_a = sentinel === null || sentinel === void 0 ? void 0 : sentinel.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.IntersectionObserver;
45
+ if (!sentinel || !IO)
46
+ return;
47
+ var root = clipOf(sentinel);
48
+ if (!root)
49
+ return;
50
+ var observer = new IO(function (entries) {
51
+ var _a;
52
+ var entry = entries[entries.length - 1];
53
+ var box = entry.boundingClientRect;
54
+ var bounds = (_a = entry.rootBounds) !== null && _a !== void 0 ? _a : root.getBoundingClientRect();
55
+ var x = box.right > bounds.right
56
+ ? bounds.right - box.right
57
+ : box.left < bounds.left
58
+ ? bounds.left - box.left
59
+ : 0;
60
+ var y = box.bottom > bounds.bottom
61
+ ? bounds.bottom - box.bottom
62
+ : box.top < bounds.top
63
+ ? bounds.top - box.top
64
+ : 0;
65
+ setShift(function (prev) { return (prev.x === x && prev.y === y ? prev : { x: x, y: y }); });
66
+ }, { root: root, threshold: THRESHOLDS });
67
+ observer.observe(sentinel);
68
+ return function () { return observer.disconnect(); };
69
+ // eslint-disable-next-line react-hooks/exhaustive-deps
70
+ }, deps);
71
+ return { sentinelRef: sentinelRef, shift: shift };
72
+ };
73
+ /**
74
+ * The AutoCorrect Options glyph: a letter "A" with a lightning bolt at its shoulder, and a ▾ for
75
+ * the menu the button opens — the same reading as Excel's button, drawn here from scratch. Every
76
+ * mark is a path (no font), so it reads the same at 1× on every system.
77
+ */
78
+ var AutoCorrectGlyph = function () { return (react_1.default.createElement("svg", { width: "20", height: "14", viewBox: "0 0 20 14", "aria-hidden": "true", "data-testid": "autocorrect-options-glyph" },
79
+ react_1.default.createElement("path", { d: "M1.2 13 5 2.2 8.8 13M2.6 9.4h4.8", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinejoin: "round" }),
80
+ react_1.default.createElement("path", { d: "M12.6 0.6 9.2 6.2h2.3l-1 4.4 4.1-6.1h-2.3l1.5-3.9z", fill: "#E8A317" }),
81
+ react_1.default.createElement("path", { d: "M15.6 7h4l-2 2.6z", fill: "currentColor" }))); };
10
82
  /**
11
- * Excel's AutoCorrect Options smart tag beside the cell an edit grew a table from, or typed a
12
- * table column's formula into — ONE button, carrying the entries of both when one edit did both
13
- * (a formula typed in the column right of a table): "Undo Table AutoExpansion" / "Stop
14
- * Automatically Expanding Tables", and "Undo Calculated Column" (or "Overwrite all cells in this
15
- * column with this formula") / "Stop automatically creating calculated columns". An entry the
16
- * host cannot carry out is not offered; with none left, no button.
83
+ * Excel's AutoCorrect Options smart tag, hanging from the bottom-right corner of the cell an edit
84
+ * grew a table from, or typed a table column's formula into — ONE button, carrying the entries of
85
+ * both when one edit did both (a formula typed in the column right of a table): "Undo Table
86
+ * AutoExpansion" / "Stop Automatically Expanding Tables", and "Undo Calculated Column" (or
87
+ * "Overwrite all cells in this column with this formula") / "Stop automatically creating
88
+ * calculated columns". An entry the host cannot carry out is not offered; with none left, no
89
+ * button.
17
90
  */
18
91
  var AutoCorrectOptionsSmartTag = function (_a) {
19
- var x = _a.x, y = _a.y, width = _a.width, tableAutoExpansion = _a.tableAutoExpansion, onChooseTableAutoExpansionOption = _a.onChooseTableAutoExpansionOption, calculatedColumn = _a.calculatedColumn, onChooseCalculatedColumnOption = _a.onChooseCalculatedColumnOption;
20
- var _b = tslib_1.__read((0, react_1.useState)(false), 2), open = _b[0], setOpen = _b[1];
92
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height, tableAutoExpansion = _a.tableAutoExpansion, onChooseTableAutoExpansionOption = _a.onChooseTableAutoExpansionOption, calculatedColumn = _a.calculatedColumn, onChooseCalculatedColumnOption = _a.onChooseCalculatedColumnOption, _b = _a.placement, placement = _b === void 0 ? "outside" : _b;
93
+ var _c = tslib_1.__read((0, react_1.useState)(false), 2), open = _c[0], setOpen = _c[1];
94
+ var _d = useKeepInsidePane([
95
+ placement,
96
+ x,
97
+ y,
98
+ width,
99
+ height,
100
+ ]), sentinelRef = _d.sentinelRef, shift = _d.shift;
21
101
  var tableEntries = tableAutoExpansion && onChooseTableAutoExpansionOption
22
102
  ? tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read((tableAutoExpansion.canUndo
23
103
  ? [
@@ -45,7 +125,8 @@ var AutoCorrectOptionsSmartTag = function (_a) {
45
125
  onSelect: function () { return onChooseCalculatedColumnOption("undo"); },
46
126
  },
47
127
  ]
48
- : [])), false), tslib_1.__read((calculatedColumn.kind !== "filled" && calculatedColumn.canOverwrite
128
+ : [])), false), tslib_1.__read((calculatedColumn.kind !== "filled" &&
129
+ calculatedColumn.canOverwrite
49
130
  ? [
50
131
  {
51
132
  key: "column-overwrite",
@@ -69,16 +150,20 @@ var AutoCorrectOptionsSmartTag = function (_a) {
69
150
  tableEntries.length ? "table-auto-expansion" : undefined,
70
151
  columnEntries.length ? "calculated-column" : undefined,
71
152
  ].filter(Boolean);
72
- return (react_1.default.createElement("div", { className: "absolute pointer-events-auto flex items-start justify-start", style: { left: x + width + 2, top: y }, onMouseDown: function (e) { return e.stopPropagation(); }, "data-testid": "autocorrect-options", "data-autocorrect": kinds.join(" ") },
73
- react_1.default.createElement(ui_1.DropdownMenu, { modal: false, open: open, onOpenChange: setOpen },
74
- react_1.default.createElement(ui_1.DropdownMenuTrigger, { asChild: true },
75
- react_1.default.createElement(ui_1.IconButton, { tooltip: "AutoCorrect Options", "aria-label": "AutoCorrect Options", className: "shadow-sm bg-rnc-background border-rnc-border border border-solid rounded-md" },
76
- react_1.default.createElement(LightningIcon, null))),
77
- react_1.default.createElement(ui_1.DropdownMenuPortal, null,
78
- react_1.default.createElement(ui_1.DropdownMenuContent, { align: "start", onCloseAutoFocus: function (event) { return event.preventDefault(); } },
79
- tableEntries.map(function (entry) { return (react_1.default.createElement(ui_1.DropdownMenuItem, { key: entry.key, onSelect: entry.onSelect }, entry.label)); }),
80
- tableEntries.length && columnEntries.length ? (react_1.default.createElement(ui_1.DropdownMenuSeparator, null)) : null,
81
- columnEntries.map(function (entry) { return (react_1.default.createElement(ui_1.DropdownMenuItem, { key: entry.key, onSelect: entry.onSelect }, entry.label)); }))))));
153
+ return (react_1.default.createElement("div", { className: "absolute pointer-events-auto flex items-start justify-start", style: placementStyle(placement, { x: x, y: y, width: width, height: height }), onMouseDown: function (e) { return e.stopPropagation(); }, "data-testid": "autocorrect-options", "data-autocorrect": kinds.join(" "), "data-placement": placement },
154
+ react_1.default.createElement("div", { ref: sentinelRef, "aria-hidden": "true", className: "absolute inset-0 invisible pointer-events-none" }),
155
+ react_1.default.createElement("div", { style: shift.x || shift.y
156
+ ? { transform: "translate(".concat(shift.x, "px, ").concat(shift.y, "px)") }
157
+ : undefined },
158
+ react_1.default.createElement(ui_1.DropdownMenu, { modal: false, open: open, onOpenChange: setOpen },
159
+ react_1.default.createElement(ui_1.DropdownMenuTrigger, { asChild: true },
160
+ react_1.default.createElement(ui_1.IconButton, { tooltip: "AutoCorrect Options", "aria-label": "AutoCorrect Options", className: "shadow-sm bg-rnc-background border-rnc-border border border-solid rounded-md" },
161
+ react_1.default.createElement(AutoCorrectGlyph, null))),
162
+ react_1.default.createElement(ui_1.DropdownMenuPortal, null,
163
+ react_1.default.createElement(ui_1.DropdownMenuContent, { align: "start", onCloseAutoFocus: function (event) { return event.preventDefault(); } },
164
+ tableEntries.map(function (entry) { return (react_1.default.createElement(ui_1.DropdownMenuItem, { key: entry.key, onSelect: entry.onSelect }, entry.label)); }),
165
+ tableEntries.length && columnEntries.length ? (react_1.default.createElement(ui_1.DropdownMenuSeparator, null)) : null,
166
+ columnEntries.map(function (entry) { return (react_1.default.createElement(ui_1.DropdownMenuItem, { key: entry.key, onSelect: entry.onSelect }, entry.label)); })))))));
82
167
  };
83
168
  exports.AutoCorrectOptionsSmartTag = AutoCorrectOptionsSmartTag;
84
169
  exports.AutoCorrectOptionsSmartTag.displayName = "AutoCorrectOptionsSmartTag";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/canvas-grid/index.tsx"],"names":[],"mappings":"AAqEA,OAAO,KASN,MAAM,OAAO,CAAC;AA6Qf,OAAO,KAAK,EAGV,QAAQ,EAYT,MAAM,aAAa,CAAC;AA4CrB,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,WAAW,CAAC;AAmkPnB,eAAO,MAAM,UAAU,EAA4C,CACjE,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,EAEvB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GACvB,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/canvas-grid/index.tsx"],"names":[],"mappings":"AAqEA,OAAO,KASN,MAAM,OAAO,CAAC;AAiRf,OAAO,KAAK,EAGV,QAAQ,EAYT,MAAM,aAAa,CAAC;AA4CrB,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,WAAW,CAAC;AAknPnB,eAAO,MAAM,UAAU,EAA4C,CACjE,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,EAEvB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GACvB,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}
@@ -164,10 +164,14 @@ function isDetachedEditor(editor) {
164
164
  var element = (_a = editor.el) === null || _a === void 0 ? void 0 : _a.call(editor);
165
165
  return element != null && !element.isConnected;
166
166
  }
167
+ /** An empty object list, stable across renders ("For objects, show: none"). */
168
+ var EMPTY_OBJECTS = [];
169
+ /** "For objects, show: placeholders": an object's frame drawn with nothing in it. */
170
+ var getObjectPlaceholder = function () { return (react_1.default.createElement("div", { "data-testid": "object-placeholder", "aria-hidden": "true", className: "w-full h-full bg-rnc-muted/40 border border-dashed border-rnc-border" })); };
167
171
  function CanvasGridComponent(props, forwardedRef) {
168
172
  var _this = this;
169
173
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
170
- var licenseKey = props.licenseKey, sheetId = props.sheetId, sheetType = props.sheetType, _q = props.ChartSheetView, ChartSheetViewComponent = _q === void 0 ? chart_sheet_view_1.ChartSheetView : _q, instanceId = props.instanceId, _r = props.activeCell, activeCell = _r === void 0 ? config_1.DEFAULT_ACTIVE_CELL : _r, _s = props.selections, selections = _s === void 0 ? config_1.DEFAULT_ARRAY : _s, _t = props.frozenColumnCount, frozenColumnCount = _t === void 0 ? 0 : _t, _u = props.frozenRowCount, frozenRowCount = _u === void 0 ? 0 : _u, _v = props.rowCount, rowCount = _v === void 0 ? config_1.DEFAULT_ROW_COUNT : _v, _w = props.columnCount, columnCount = _w === void 0 ? config_1.DEFAULT_COLUMN_COUNT : _w, autoFocus = props.autoFocus, basicFilter = props.basicFilter, tables = props.tables, namedRanges = props.namedRanges, _x = props.bandedRanges, bandedRanges = _x === void 0 ? config_1.DEFAULT_ARRAY : _x, _y = props.tableBorderColor, tableBorderColor = _y === void 0 ? "#008000" : _y, _z = props.filterIconColor, filterIconColor = _z === void 0 ? config_1.FILTER_BUTTON_GLYPH_COLOR : _z, conditionalFormats = props.conditionalFormats, _0 = props.showFilterIcon, showFilterIcon = _0 === void 0 ? true : _0, _1 = props.showCalculatedColumnIcon, showCalculatedColumnIcon = _1 === void 0 ? true : _1, _2 = props.showHeaders, showHeaders = _2 === void 0 ? true : _2, backgroundImageUrl = props.backgroundImageUrl, _3 = props.defaultColumnWidth, defaultColumnWidth = _3 === void 0 ? config_1.DEFAULT_COLUMN_WIDTH : _3, _4 = props.defaultRowHeight, defaultRowHeight = _4 === void 0 ? config_1.DEFAULT_ROW_HEIGHT : _4, _5 = props.lineHeightMode, lineHeightMode = _5 === void 0 ? "fontMetrics" : _5, _6 = props.columnHeaderHeight, columnHeaderHeight = _6 === void 0 ? config_1.COLUMN_HEADER_HEIGHT : _6, _7 = props.rowHeaderWidth, rowHeaderWidth = _7 === void 0 ? config_1.ROW_HEADER_WIDTH : _7, _8 = props.gridLineColor, gridLineColor = _8 === void 0 ? config_1.GRIDLINE_COLOR : _8, _9 = props.cellBackgroundColor, cellBackgroundColor = _9 === void 0 ? config_1.DEFAULT_CELL_BACKGROUND_COLOR : _9, _10 = props.cellColor, cellColor = _10 === void 0 ? config_1.DEFAULT_CELL_COLOR : _10, _11 = props.headerBorderColor, headerBorderColor = _11 === void 0 ? config_1.DEFAULT_HEADER_BORDER_COLOR : _11, _12 = props.headerBackgroundColor, headerBackgroundColor = _12 === void 0 ? config_1.DEFAULT_HEADER_BG : _12, _13 = props.headerColor, headerColor = _13 === void 0 ? config_1.DEFAULT_HEADER_COLOR : _13, _14 = props.headerActiveBackgroundColor, headerActiveBackgroundColor = _14 === void 0 ? config_1.DEFAULT_HEADER_ACTIVE_BG : _14, _15 = props.headerSelectedBackgroundColor, headerSelectedBackgroundColor = _15 === void 0 ? config_1.DEFAULT_HEADER_SELECTED_BG : _15, _16 = props.headerSelectedColor, headerSelectedColor = _16 === void 0 ? "white" : _16, _17 = props.headerTableBackgroundColor, headerTableBackgroundColor = _17 === void 0 ? config_1.DEFAULT_HEADER_TABLE_BG : _17, _18 = props.headerTableActiveBackgroundColor, headerTableActiveBackgroundColor = _18 === void 0 ? config_1.DEFAULT_HEADER_ACTIVE_TABLE_BG : _18, _19 = props.headerTableSelectedBackgroundColor, headerTableSelectedBackgroundColor = _19 === void 0 ? config_1.DEFAULT_HEADER_SELECTED_TABLE_BG : _19, _20 = props.frozenShadowColor, frozenShadowColor = _20 === void 0 ? headerBorderColor : _20, _21 = props.frozenShadowThickness, frozenShadowThickness = _21 === void 0 ? 1 : _21, _22 = props.selectionBackgroundColor, selectionBackgroundColor = _22 === void 0 ? config_1.SELECTION_BG : _22, _23 = props.selectionBorderColor, selectionBorderColor = _23 === void 0 ? config_1.SELECTION_BORDER : _23, selectionStrokeWidth = props.selectionStrokeWidth, showActiveCellBorderInSelection = props.showActiveCellBorderInSelection, _24 = props.selectionDragBorderColor, selectionDragBorderColor = _24 === void 0 ? config_1.SELECTION_BORDER : _24, chartSelectedColor = props.chartSelectedColor, _25 = props.chipBackgroundColor, chipBackgroundColor = _25 === void 0 ? config_1.CHIP_COLOR : _25, _26 = props.merges, merges = _26 === void 0 ? config_1.DEFAULT_ARRAY : _26, borderStyles = props.borderStyles, protectedRanges = props.protectedRanges, allowEditRanges = props.allowEditRanges, _27 = props.isWorkbookProtected, isWorkbookProtectedProp = _27 === void 0 ? false : _27, getSheetProtection = props.getSheetProtection, pivotTables = props.pivotTables, charts = props.charts, onUpdateChart = props.onUpdateChart, onChangeZOrder = props.onChangeZOrder, embeds = props.embeds, slicers = props.slicers, _28 = props.rowMetadata, rowMetadata = _28 === void 0 ? config_1.DEFAULT_ARRAY : _28, _29 = props.columnMetadata, columnMetadata = _29 === void 0 ? config_1.DEFAULT_ARRAY : _29, _30 = props.scale, zoomScale = _30 === void 0 ? 1 : _30, _31 = props.zoomSpeed, zoomSpeed = _31 === void 0 ? 1 : _31, _32 = props.overscanCount, overscanCount = _32 === void 0 ? 3 : _32, enableEditOnEnterKeyProp = props.enableEditOnEnterKey, _33 = props.enterKeyDirection, enterKeyDirection = _33 === void 0 ? "down" : _33, enableAutoCorrect = props.enableAutoCorrect, shouldHandleKeyDown = props.shouldHandleKeyDown, _34 = props.enableTextOverflow, enableTextOverflow = _34 === void 0 ? true : _34, _showGridLines = props.showGridLines, showZeros = props.showZeros, splitPane = props.splitPane, _35 = props.enableCellDragAndDrop, enableCellDragAndDrop = _35 === void 0 ? true : _35, _36 = props.alertBeforeOverwritingCells, alertBeforeOverwritingCells = _36 === void 0 ? true : _36, _37 = props.autoPercentEntry, autoPercentEntry = _37 === void 0 ? false : _37, errorCheckingRules = props.errorCheckingRules, staleCells = props.staleCells, _rightToLeft = props.rightToLeft, pageBreaks = props.pageBreaks, pageBreakPreviewProp = props.pageBreakPreview, workbookView = props.workbookView, printSettings = props.printSettings, onChangeHeaderFooter = props.onChangeHeaderFooter, _38 = props.showRulers, showRulers = _38 === void 0 ? true : _38, workbookTitle = props.workbookTitle, _39 = props.showFormulas, showFormulas = _39 === void 0 ? false : _39, _40 = props.protectFormulas, protectFormulas = _40 === void 0 ? false : _40, _41 = props.showFrozenSeparator, showFrozenSeparator = _41 === void 0 ? true : _41, _42 = props.HeaderCell, HeaderCell = _42 === void 0 ? header_cell_1.HeaderCell : _42, _43 = props.Cell, Cell = _43 === void 0 ? cell_1.Cell : _43, _44 = props.SelectionTitleComponent, SelectionTitleComponent = _44 === void 0 ? title_1.SelectionTitle : _44, _45 = props.CellEditor, CellEditor = _45 === void 0 ? cell_editor_1.CellEditor : _45, CellTooltip = props.CellTooltip, _46 = props.ContextMenu, ContextMenu = _46 === void 0 ? context_menu_1.ContextMenu : _46, _47 = props.ContextMenuWrapper, ContextMenuWrapper = _47 === void 0 ? use_context_menu_1.DefaultContextMenuWrapper : _47, _48 = props.FilterBox, FilterBox = _48 === void 0 ? filter_box_1.FilterBox : _48, _49 = props.HeaderMoveDragComponent, HeaderMoveDragComponent = _49 === void 0 ? header_move_1.HeaderMoveDragComponent : _49, SuggestionsDropdown = props.SuggestionsDropdown, _50 = props.stickyEditor, stickyEditor = _50 === void 0 ? true : _50, _51 = props.scrollSnap, scrollSnap = _51 === void 0 ? false : _51, scrollThrottleTimeout = props.scrollThrottleTimeout, preventBrowserDefaultScroll = props.preventBrowserDefaultScroll, _52 = props.mouseMoveThrottleTimeout, mouseMoveThrottleTimeout = _52 === void 0 ? 60 : _52, _53 = props.tooltipIntentInterval, tooltipIntentInterval = _53 === void 0 ? 60 : _53, selectionPolicy = props.selectionPolicy, users = props.users, userId = props.userId, renderCollaboratorCursor = props.renderCollaboratorCursor, functionDescriptions = props.functionDescriptions, _54 = props.showHeaderMenuButton, showHeaderMenuButton = _54 === void 0 ? true : _54, _55 = props.scrollbarSize, scrollbarSize = _55 === void 0 ? config_1.SCROLLBAR_SIZE : _55, _56 = props.theme, theme = _56 === void 0 ? config_1.defaultSpreadsheetTheme : _56, _57 = props.showNotes, showNotes = _57 === void 0 ? true : _57, _58 = props.showAllNotes, showAllNotes = _58 === void 0 ? false : _58, isNoteVisibleProp = props.isNoteVisible, _59 = props.showComments, showComments = _59 === void 0 ? true : _59, _60 = props.circleInvalidData, circleInvalidData = _60 === void 0 ? false : _60, getIgnoredErrors = props.getIgnoredErrors, locale = props.locale, formulaLocaleProp = props.formulaLocale, _61 = props.referenceStyle, referenceStyle = _61 === void 0 ? "A1" : _61, agentSuggestions = props.agentSuggestions, onReviewSuggestion = props.onReviewSuggestion, onShowFormulas = props.onShowFormulas, getDataRowCount = props.getDataRowCount, getDataRegion = props.getDataRegion, getArrayFormula = props.getArrayFormula, getChartComponent = props.getChartComponent, getEmbedComponent = props.getEmbedComponent, getLinkedPictureSourceProp = props.getLinkedPictureSource, getSlicerComponent = props.getSlicerComponent, onChange = props.onChange, onChangeBatch = props.onChangeBatch, onChangeArrayFormula = props.onChangeArrayFormula, onExpandCollapse = props.onExpandCollapse, onPivotDrillDown = props.onPivotDrillDown, onDelete = props.onDelete, onChangeEditorValue = props.onChangeEditorValue, onFill = props.onFill, onRequestCalculate = props.onRequestCalculate, onRequestFunctionArguments = props.onRequestFunctionArguments, onChangeActiveCell = props.onChangeActiveCell, onChangeActiveSheet = props.onChangeActiveSheet, onChangeSelections = props.onChangeSelections, getSheetName = props.getSheetName, getSheetId = props.getSheetId, getCellData = props.getCellData, getNoteProp = props.getNote, getTextFormatRuns = props.getTextFormatRuns, getDataValidation = props.getDataValidation, getEffectiveFormat = props.getEffectiveFormat, getFormattedValueProp = props.getFormattedValue, getTooltipContent = props.getTooltipContent, errorResolutionComponent = props.errorResolutionComponent, getEffectiveValueProp = props.getEffectiveValue, getSparklineGroup = props.getSparklineGroup, getUserEnteredExtendedValue = props.getUserEnteredExtendedValue, getEffectiveExtendedValue = props.getEffectiveExtendedValue, getSheetRowCount = props.getSheetRowCount, getSheetColumnCount = props.getSheetColumnCount, getCellPopoverContent = props.getCellPopoverContent, onScroll = props.onScroll, onPaneScroll = props.onPaneScroll, onViewPortChange = props.onViewPortChange, _62 = props.windowConditionalFormats, windowConditionalFormats = _62 === void 0 ? false : _62, _63 = props.engineConditionalFormatResults, engineConditionalFormatResults = _63 === void 0 ? false : _63, getConditionalFormatRuleStats = props.getConditionalFormatRuleStats, onResize = props.onResize, onAutoResize = props.onAutoResize, onHideColumn = props.onHideColumn, onHideRow = props.onHideRow, onShowColumn = props.onShowColumn, onShowRow = props.onShowRow, onGroupRows = props.onGroupRows, onUngroupRows = props.onUngroupRows, onCollapseRowGroup = props.onCollapseRowGroup, onExpandRowGroup = props.onExpandRowGroup, onGroupColumns = props.onGroupColumns, onUngroupColumns = props.onUngroupColumns, onCollapseColumnGroup = props.onCollapseColumnGroup, onExpandColumnGroup = props.onExpandColumnGroup, onSetOutlineDepth = props.onSetOutlineDepth, onDeleteRow = props.onDeleteRow, onDeleteColumn = props.onDeleteColumn, onInsertRow = props.onInsertRow, onInsertColumn = props.onInsertColumn, onChangeAutoExpandTables = props.onChangeAutoExpandTables, onChangeAutoCalculatedColumns = props.onChangeAutoCalculatedColumns, onInsertCellsShiftDown = props.onInsertCellsShiftDown, onInsertCellsShiftRight = props.onInsertCellsShiftRight, onDeleteCellsShiftLeft = props.onDeleteCellsShiftLeft, onDeleteCellsShiftUp = props.onDeleteCellsShiftUp, onClearContents = props.onClearContents, onMoveColumns = props.onMoveColumns, onMoveRows = props.onMoveRows, onSelectNextSheet = props.onSelectNextSheet, onSelectPreviousSheet = props.onSelectPreviousSheet, onCreateNewSheet = props.onCreateNewSheet, onKeyDown = props.onKeyDown, onChangeFormatting = props.onChangeFormatting, onRepeatFormatting = props.onRepeatFormatting, onClearFormatting = props.onClearFormatting, onRequestEditProtectedRange = props.onRequestEditProtectedRange, onRequestUnlockAllowEditRange = props.onRequestUnlockAllowEditRange, onMoveChart = props.onMoveChart, onResizeChart = props.onResizeChart, onDeleteChart = props.onDeleteChart, onCutChart = props.onCutChart, onCopyChart = props.onCopyChart, _64 = props.objectClipboard, objectClipboard = _64 === void 0 ? true : _64, objectClipboardPolicy = props.objectClipboardPolicy, onMoveEmbed = props.onMoveEmbed, onResizeEmbed = props.onResizeEmbed, onDeleteEmbed = props.onDeleteEmbed, onRequestEditEmbed = props.onRequestEditEmbed, onMoveSlicer = props.onMoveSlicer, onResizeSlicer = props.onResizeSlicer, onDeleteSlicer = props.onDeleteSlicer, onDeleteObjects = props.onDeleteObjects, onRequestEditSlicer = props.onRequestEditSlicer, onFillRange = props.onFillRange, onFlashFill = props.onFlashFill, onFlashFillSuggest = props.onFlashFillSuggest, onAcceptFlashFill = props.onAcceptFlashFill, disableFillRightShortcut = props.disableFillRightShortcut, keymap = props.keymap, _65 = props.enableAutoComplete, enableAutoComplete = _65 === void 0 ? true : _65, onCalculateNow = props.onCalculateNow, onRequestGoTo = props.onRequestGoTo, onMoveSelection = props.onMoveSelection, onInsertCutCells = props.onInsertCutCells, onInsertCopiedCells = props.onInsertCopiedCells, onInsertTime = props.onInsertTime, onInsertDate = props.onInsertDate, onInsertDateTime = props.onInsertDateTime, onInsertAutoSum = props.onInsertAutoSum, onUndo = props.onUndo, onRedo = props.onRedo, batchHistory = props.batchHistory, onPaste = props.onPaste, onReapplyPaste = props.onReapplyPaste, onCopy = props.onCopy, onCut = props.onCut, onSortColumn = props.onSortColumn, onSortTable = props.onSortTable, onFilterTable = props.onFilterTable, onFilterPivot = props.onFilterPivot, onResizeTable = props.onResizeTable, onUndoTableAutoExpansion = props.onUndoTableAutoExpansion, onUndoCalculatedColumn = props.onUndoCalculatedColumn, onOverwriteCalculatedColumn = props.onOverwriteCalculatedColumn, onRequestEditTable = props.onRequestEditTable, onRequestEditPivotTable = props.onRequestEditPivotTable, onRequestDeletePivotTable = props.onRequestDeletePivotTable, onRequestCreatePivotChart = props.onRequestCreatePivotChart, onRemoveTable = props.onRemoveTable, onCreateTable = props.onCreateTable, onRequestCreateTable = props.onRequestCreateTable, onInsertTableColumn = props.onInsertTableColumn, onDeleteTableColumn = props.onDeleteTableColumn, onInsertTableRow = props.onInsertTableRow, onDeleteTableRow = props.onDeleteTableRow, onUpdateTable = props.onUpdateTable, onRequestResizeTable = props.onRequestResizeTable, onRequestInsertSlicer = props.onRequestInsertSlicer, onCreateBasicFilter = props.onCreateBasicFilter, onRequestDefineNamedRange = props.onRequestDefineNamedRange, onRequestFormatCells = props.onRequestFormatCells, onRequestConditionalFormat = props.onRequestConditionalFormat, onRequestDataValidation = props.onRequestDataValidation, onRequestInsertComment = props.onRequestInsertComment, onRequestInsertLink = props.onRequestInsertLink, onFreezeColumn = props.onFreezeColumn, onFreezeRow = props.onFreezeRow, onUpdateNote = props.onUpdateNote, onProtectRange = props.onProtectRange, onUnProtectRange = props.onUnProtectRange, onSortRange = props.onSortRange, onRequestSearch = props.onRequestSearch, onRequestReplace = props.onRequestReplace, onRequestResize = props.onRequestResize, _66 = props.getRowHeaderText, getRowHeaderText = _66 === void 0 ? helpers_1.getDefaultRowHeader : _66, getColumnHeaderTextProp = props.getColumnHeaderText, getAdditionalCellSpacing = props.getAdditionalCellSpacing, _67 = props.tokenizer, defaultTokenizer = _67 === void 0 ? calculator_1.tokenize : _67, onChangeScale = props.onChangeScale, onRemoveLink = props.onRemoveLink, onSelectLink = props.onSelectLink, onSplitTextToColumns = props.onSplitTextToColumns, onRemoveDuplicates = props.onRemoveDuplicates, onGoalSeek = props.onGoalSeek, onSubtotal = props.onSubtotal, onAdvancedFilter = props.onAdvancedFilter, onRequestExpand = props.onRequestExpand, cellExpandPredicate = props.cellExpandPredicate, _68 = props.StructuredResult, StructuredResult = _68 === void 0 ? cell_structured_1.StructuredResultRenderer : _68, getMentions = props.getMentions, getStructuredPropertiesProp = props.getStructuredProperties, getFunctionParameterSuggestions = props.getFunctionParameterSuggestions, shouldFetchFunctionParameters = props.shouldFetchFunctionParameters, MentionTagComponent = props.MentionTagComponent, MentionDropdownItemComponent = props.MentionDropdownItemComponent, _69 = props.showSelectionResizeHandles, showSelectionResizeHandles = _69 === void 0 ? true : _69, enableMagicFill = props.enableMagicFill, _70 = props.enableQuickEdit, enableQuickEdit = _70 === void 0 ? true : _70, MagicFillComponent = props.MagicFillComponent, MagicFillContent = props.MagicFillContent, QuickEdit = props.QuickEdit, PasteMenu = props.PasteMenu, SuggestionAction = props.SuggestionAction, HiddenRowMarkers = props.HiddenRowMarkers, HiddenColumnMarkers = props.HiddenColumnMarkers, enableResizerOverflow = props.enableResizerOverflow, className = props.className, _71 = props.defaultFontSizePoint, defaultFontSizePoint = _71 === void 0 ? config_1.DEFAULT_FONT_SIZE_PT : _71, defaultCellFormat = props.defaultCellFormat, readonly = props.readonly, _72 = props.isComparing, isComparing = _72 === void 0 ? false : _72, getCellDiff = props.getCellDiff, enableDataBoundaryNavigation = props.enableDataBoundaryNavigation, footerHeight = props.footerHeight, footerComponent = props.footerComponent, arrowComponents = props.arrowComponents,
174
+ var licenseKey = props.licenseKey, sheetId = props.sheetId, sheetType = props.sheetType, _q = props.ChartSheetView, ChartSheetViewComponent = _q === void 0 ? chart_sheet_view_1.ChartSheetView : _q, instanceId = props.instanceId, _r = props.activeCell, activeCell = _r === void 0 ? config_1.DEFAULT_ACTIVE_CELL : _r, _s = props.selections, selections = _s === void 0 ? config_1.DEFAULT_ARRAY : _s, _t = props.frozenColumnCount, frozenColumnCount = _t === void 0 ? 0 : _t, _u = props.frozenRowCount, frozenRowCount = _u === void 0 ? 0 : _u, _v = props.rowCount, rowCount = _v === void 0 ? config_1.DEFAULT_ROW_COUNT : _v, _w = props.columnCount, columnCount = _w === void 0 ? config_1.DEFAULT_COLUMN_COUNT : _w, autoFocus = props.autoFocus, basicFilter = props.basicFilter, tables = props.tables, namedRanges = props.namedRanges, _x = props.bandedRanges, bandedRanges = _x === void 0 ? config_1.DEFAULT_ARRAY : _x, _y = props.tableBorderColor, tableBorderColor = _y === void 0 ? "#008000" : _y, _z = props.filterIconColor, filterIconColor = _z === void 0 ? config_1.FILTER_BUTTON_GLYPH_COLOR : _z, conditionalFormats = props.conditionalFormats, _0 = props.showFilterIcon, showFilterIcon = _0 === void 0 ? true : _0, _1 = props.showCalculatedColumnIcon, showCalculatedColumnIcon = _1 === void 0 ? true : _1, _2 = props.showHeaders, showHeaders = _2 === void 0 ? true : _2, backgroundImageUrl = props.backgroundImageUrl, _3 = props.defaultColumnWidth, defaultColumnWidth = _3 === void 0 ? config_1.DEFAULT_COLUMN_WIDTH : _3, _4 = props.defaultRowHeight, defaultRowHeight = _4 === void 0 ? config_1.DEFAULT_ROW_HEIGHT : _4, _5 = props.lineHeightMode, lineHeightMode = _5 === void 0 ? "fontMetrics" : _5, _6 = props.columnHeaderHeight, columnHeaderHeight = _6 === void 0 ? config_1.COLUMN_HEADER_HEIGHT : _6, _7 = props.rowHeaderWidth, rowHeaderWidth = _7 === void 0 ? config_1.ROW_HEADER_WIDTH : _7, _8 = props.gridLineColor, gridLineColor = _8 === void 0 ? config_1.GRIDLINE_COLOR : _8, _9 = props.cellBackgroundColor, cellBackgroundColor = _9 === void 0 ? config_1.DEFAULT_CELL_BACKGROUND_COLOR : _9, _10 = props.cellColor, cellColor = _10 === void 0 ? config_1.DEFAULT_CELL_COLOR : _10, _11 = props.headerBorderColor, headerBorderColor = _11 === void 0 ? config_1.DEFAULT_HEADER_BORDER_COLOR : _11, _12 = props.headerBackgroundColor, headerBackgroundColor = _12 === void 0 ? config_1.DEFAULT_HEADER_BG : _12, _13 = props.headerColor, headerColor = _13 === void 0 ? config_1.DEFAULT_HEADER_COLOR : _13, _14 = props.headerActiveBackgroundColor, headerActiveBackgroundColor = _14 === void 0 ? config_1.DEFAULT_HEADER_ACTIVE_BG : _14, _15 = props.headerSelectedBackgroundColor, headerSelectedBackgroundColor = _15 === void 0 ? config_1.DEFAULT_HEADER_SELECTED_BG : _15, _16 = props.headerSelectedColor, headerSelectedColor = _16 === void 0 ? "white" : _16, _17 = props.headerTableBackgroundColor, headerTableBackgroundColor = _17 === void 0 ? config_1.DEFAULT_HEADER_TABLE_BG : _17, _18 = props.headerTableActiveBackgroundColor, headerTableActiveBackgroundColor = _18 === void 0 ? config_1.DEFAULT_HEADER_ACTIVE_TABLE_BG : _18, _19 = props.headerTableSelectedBackgroundColor, headerTableSelectedBackgroundColor = _19 === void 0 ? config_1.DEFAULT_HEADER_SELECTED_TABLE_BG : _19, _20 = props.frozenShadowColor, frozenShadowColor = _20 === void 0 ? headerBorderColor : _20, _21 = props.frozenShadowThickness, frozenShadowThickness = _21 === void 0 ? 1 : _21, _22 = props.selectionBackgroundColor, selectionBackgroundColor = _22 === void 0 ? config_1.SELECTION_BG : _22, _23 = props.selectionBorderColor, selectionBorderColor = _23 === void 0 ? config_1.SELECTION_BORDER : _23, selectionStrokeWidth = props.selectionStrokeWidth, showActiveCellBorderInSelection = props.showActiveCellBorderInSelection, _24 = props.selectionDragBorderColor, selectionDragBorderColor = _24 === void 0 ? config_1.SELECTION_BORDER : _24, chartSelectedColor = props.chartSelectedColor, _25 = props.chipBackgroundColor, chipBackgroundColor = _25 === void 0 ? config_1.CHIP_COLOR : _25, _26 = props.merges, merges = _26 === void 0 ? config_1.DEFAULT_ARRAY : _26, borderStyles = props.borderStyles, protectedRanges = props.protectedRanges, allowEditRanges = props.allowEditRanges, _27 = props.isWorkbookProtected, isWorkbookProtectedProp = _27 === void 0 ? false : _27, getSheetProtection = props.getSheetProtection, pivotTables = props.pivotTables, charts = props.charts, onUpdateChart = props.onUpdateChart, onChangeZOrder = props.onChangeZOrder, embeds = props.embeds, slicers = props.slicers, _28 = props.rowMetadata, rowMetadata = _28 === void 0 ? config_1.DEFAULT_ARRAY : _28, _29 = props.columnMetadata, columnMetadata = _29 === void 0 ? config_1.DEFAULT_ARRAY : _29, _30 = props.scale, zoomScale = _30 === void 0 ? 1 : _30, _31 = props.zoomSpeed, zoomSpeed = _31 === void 0 ? 1 : _31, _32 = props.overscanCount, overscanCount = _32 === void 0 ? 3 : _32, enableEditOnEnterKeyProp = props.enableEditOnEnterKey, _33 = props.enterKeyDirection, enterKeyDirection = _33 === void 0 ? "down" : _33, enableAutoCorrect = props.enableAutoCorrect, shouldHandleKeyDown = props.shouldHandleKeyDown, _34 = props.enableTextOverflow, enableTextOverflow = _34 === void 0 ? true : _34, _showGridLines = props.showGridLines, showZeros = props.showZeros, showObjects = props.showObjects, splitPane = props.splitPane, _35 = props.enableCellDragAndDrop, enableCellDragAndDrop = _35 === void 0 ? true : _35, _36 = props.alertBeforeOverwritingCells, alertBeforeOverwritingCells = _36 === void 0 ? true : _36, _37 = props.autoPercentEntry, autoPercentEntry = _37 === void 0 ? false : _37, errorCheckingRules = props.errorCheckingRules, staleCells = props.staleCells, _rightToLeft = props.rightToLeft, pageBreaks = props.pageBreaks, pageBreakPreviewProp = props.pageBreakPreview, workbookView = props.workbookView, printSettings = props.printSettings, onChangeHeaderFooter = props.onChangeHeaderFooter, _38 = props.showRulers, showRulers = _38 === void 0 ? true : _38, workbookTitle = props.workbookTitle, _39 = props.showFormulas, showFormulas = _39 === void 0 ? false : _39, _40 = props.protectFormulas, protectFormulas = _40 === void 0 ? false : _40, _41 = props.showFrozenSeparator, showFrozenSeparator = _41 === void 0 ? true : _41, _42 = props.HeaderCell, HeaderCell = _42 === void 0 ? header_cell_1.HeaderCell : _42, _43 = props.Cell, Cell = _43 === void 0 ? cell_1.Cell : _43, _44 = props.SelectionTitleComponent, SelectionTitleComponent = _44 === void 0 ? title_1.SelectionTitle : _44, _45 = props.CellEditor, CellEditor = _45 === void 0 ? cell_editor_1.CellEditor : _45, CellTooltip = props.CellTooltip, _46 = props.ContextMenu, ContextMenu = _46 === void 0 ? context_menu_1.ContextMenu : _46, _47 = props.ContextMenuWrapper, ContextMenuWrapper = _47 === void 0 ? use_context_menu_1.DefaultContextMenuWrapper : _47, _48 = props.FilterBox, FilterBox = _48 === void 0 ? filter_box_1.FilterBox : _48, _49 = props.HeaderMoveDragComponent, HeaderMoveDragComponent = _49 === void 0 ? header_move_1.HeaderMoveDragComponent : _49, SuggestionsDropdown = props.SuggestionsDropdown, _50 = props.stickyEditor, stickyEditor = _50 === void 0 ? true : _50, _51 = props.scrollSnap, scrollSnap = _51 === void 0 ? false : _51, scrollThrottleTimeout = props.scrollThrottleTimeout, preventBrowserDefaultScroll = props.preventBrowserDefaultScroll, _52 = props.mouseMoveThrottleTimeout, mouseMoveThrottleTimeout = _52 === void 0 ? 60 : _52, _53 = props.tooltipIntentInterval, tooltipIntentInterval = _53 === void 0 ? 60 : _53, selectionPolicy = props.selectionPolicy, users = props.users, userId = props.userId, renderCollaboratorCursor = props.renderCollaboratorCursor, functionDescriptions = props.functionDescriptions, _54 = props.showHeaderMenuButton, showHeaderMenuButton = _54 === void 0 ? true : _54, _55 = props.scrollbarSize, scrollbarSize = _55 === void 0 ? config_1.SCROLLBAR_SIZE : _55, _56 = props.theme, theme = _56 === void 0 ? config_1.defaultSpreadsheetTheme : _56, _57 = props.showNotes, showNotes = _57 === void 0 ? true : _57, _58 = props.showAllNotes, showAllNotes = _58 === void 0 ? false : _58, isNoteVisibleProp = props.isNoteVisible, _59 = props.showComments, showComments = _59 === void 0 ? true : _59, _60 = props.circleInvalidData, circleInvalidData = _60 === void 0 ? false : _60, getIgnoredErrors = props.getIgnoredErrors, locale = props.locale, formulaLocaleProp = props.formulaLocale, _61 = props.referenceStyle, referenceStyle = _61 === void 0 ? "A1" : _61, agentSuggestions = props.agentSuggestions, onReviewSuggestion = props.onReviewSuggestion, onShowFormulas = props.onShowFormulas, getDataRowCount = props.getDataRowCount, getDataRegion = props.getDataRegion, getArrayFormula = props.getArrayFormula, getChartComponent = props.getChartComponent, getEmbedComponent = props.getEmbedComponent, getLinkedPictureSourceProp = props.getLinkedPictureSource, getSlicerComponent = props.getSlicerComponent, onChange = props.onChange, onChangeBatch = props.onChangeBatch, onChangeArrayFormula = props.onChangeArrayFormula, onExpandCollapse = props.onExpandCollapse, onPivotDrillDown = props.onPivotDrillDown, onDelete = props.onDelete, onChangeEditorValue = props.onChangeEditorValue, onFill = props.onFill, onRequestCalculate = props.onRequestCalculate, onRequestFunctionArguments = props.onRequestFunctionArguments, onChangeActiveCell = props.onChangeActiveCell, onChangeActiveSheet = props.onChangeActiveSheet, onChangeSelections = props.onChangeSelections, getSheetName = props.getSheetName, getSheetId = props.getSheetId, getCellData = props.getCellData, getNoteProp = props.getNote, getTextFormatRuns = props.getTextFormatRuns, getDataValidation = props.getDataValidation, getEffectiveFormat = props.getEffectiveFormat, getFormattedValueProp = props.getFormattedValue, getTooltipContent = props.getTooltipContent, errorResolutionComponent = props.errorResolutionComponent, getEffectiveValueProp = props.getEffectiveValue, getSparklineGroup = props.getSparklineGroup, getUserEnteredExtendedValue = props.getUserEnteredExtendedValue, getEffectiveExtendedValue = props.getEffectiveExtendedValue, getSheetRowCount = props.getSheetRowCount, getSheetColumnCount = props.getSheetColumnCount, getCellPopoverContent = props.getCellPopoverContent, onScroll = props.onScroll, onPaneScroll = props.onPaneScroll, onViewPortChange = props.onViewPortChange, _62 = props.windowConditionalFormats, windowConditionalFormats = _62 === void 0 ? false : _62, _63 = props.engineConditionalFormatResults, engineConditionalFormatResults = _63 === void 0 ? false : _63, getConditionalFormatRuleStats = props.getConditionalFormatRuleStats, onResize = props.onResize, onAutoResize = props.onAutoResize, onHideColumn = props.onHideColumn, onHideRow = props.onHideRow, onShowColumn = props.onShowColumn, onShowRow = props.onShowRow, onGroupRows = props.onGroupRows, onUngroupRows = props.onUngroupRows, onCollapseRowGroup = props.onCollapseRowGroup, onExpandRowGroup = props.onExpandRowGroup, onGroupColumns = props.onGroupColumns, onUngroupColumns = props.onUngroupColumns, onCollapseColumnGroup = props.onCollapseColumnGroup, onExpandColumnGroup = props.onExpandColumnGroup, onSetOutlineDepth = props.onSetOutlineDepth, onDeleteRow = props.onDeleteRow, onDeleteColumn = props.onDeleteColumn, onInsertRow = props.onInsertRow, onInsertColumn = props.onInsertColumn, onChangeAutoExpandTables = props.onChangeAutoExpandTables, onChangeAutoCalculatedColumns = props.onChangeAutoCalculatedColumns, onInsertCellsShiftDown = props.onInsertCellsShiftDown, onInsertCellsShiftRight = props.onInsertCellsShiftRight, onDeleteCellsShiftLeft = props.onDeleteCellsShiftLeft, onDeleteCellsShiftUp = props.onDeleteCellsShiftUp, onClearContents = props.onClearContents, onMoveColumns = props.onMoveColumns, onMoveRows = props.onMoveRows, onSelectNextSheet = props.onSelectNextSheet, onSelectPreviousSheet = props.onSelectPreviousSheet, onCreateNewSheet = props.onCreateNewSheet, onKeyDown = props.onKeyDown, onChangeFormatting = props.onChangeFormatting, onRepeatFormatting = props.onRepeatFormatting, onClearFormatting = props.onClearFormatting, onRequestEditProtectedRange = props.onRequestEditProtectedRange, onRequestUnlockAllowEditRange = props.onRequestUnlockAllowEditRange, onMoveChart = props.onMoveChart, onResizeChart = props.onResizeChart, onDeleteChart = props.onDeleteChart, onCutChart = props.onCutChart, onCopyChart = props.onCopyChart, _64 = props.objectClipboard, objectClipboard = _64 === void 0 ? true : _64, objectClipboardPolicy = props.objectClipboardPolicy, onMoveEmbed = props.onMoveEmbed, onResizeEmbed = props.onResizeEmbed, onDeleteEmbed = props.onDeleteEmbed, onRequestEditEmbed = props.onRequestEditEmbed, onMoveSlicer = props.onMoveSlicer, onResizeSlicer = props.onResizeSlicer, onDeleteSlicer = props.onDeleteSlicer, onDeleteObjects = props.onDeleteObjects, onRequestEditSlicer = props.onRequestEditSlicer, onFillRange = props.onFillRange, onFlashFill = props.onFlashFill, onFlashFillSuggest = props.onFlashFillSuggest, onAcceptFlashFill = props.onAcceptFlashFill, disableFillRightShortcut = props.disableFillRightShortcut, keymap = props.keymap, _65 = props.enableAutoComplete, enableAutoComplete = _65 === void 0 ? true : _65, onCalculateNow = props.onCalculateNow, onRequestGoTo = props.onRequestGoTo, onMoveSelection = props.onMoveSelection, onInsertCutCells = props.onInsertCutCells, onInsertCopiedCells = props.onInsertCopiedCells, onInsertTime = props.onInsertTime, onInsertDate = props.onInsertDate, onInsertDateTime = props.onInsertDateTime, onInsertAutoSum = props.onInsertAutoSum, onUndo = props.onUndo, onRedo = props.onRedo, batchHistory = props.batchHistory, onPaste = props.onPaste, onReapplyPaste = props.onReapplyPaste, onCopy = props.onCopy, onCut = props.onCut, onSortColumn = props.onSortColumn, onSortTable = props.onSortTable, onFilterTable = props.onFilterTable, onFilterPivot = props.onFilterPivot, onResizeTable = props.onResizeTable, onUndoTableAutoExpansion = props.onUndoTableAutoExpansion, onUndoCalculatedColumn = props.onUndoCalculatedColumn, onOverwriteCalculatedColumn = props.onOverwriteCalculatedColumn, onRequestEditTable = props.onRequestEditTable, onRequestEditPivotTable = props.onRequestEditPivotTable, onRequestDeletePivotTable = props.onRequestDeletePivotTable, onRequestCreatePivotChart = props.onRequestCreatePivotChart, onRemoveTable = props.onRemoveTable, onCreateTable = props.onCreateTable, onRequestCreateTable = props.onRequestCreateTable, onInsertTableColumn = props.onInsertTableColumn, onDeleteTableColumn = props.onDeleteTableColumn, onInsertTableRow = props.onInsertTableRow, onDeleteTableRow = props.onDeleteTableRow, onUpdateTable = props.onUpdateTable, onRequestResizeTable = props.onRequestResizeTable, onRequestInsertSlicer = props.onRequestInsertSlicer, onCreateBasicFilter = props.onCreateBasicFilter, onRequestDefineNamedRange = props.onRequestDefineNamedRange, onRequestFormatCells = props.onRequestFormatCells, onRequestConditionalFormat = props.onRequestConditionalFormat, onRequestDataValidation = props.onRequestDataValidation, onRequestInsertComment = props.onRequestInsertComment, onRequestInsertLink = props.onRequestInsertLink, onFreezeColumn = props.onFreezeColumn, onFreezeRow = props.onFreezeRow, onUpdateNote = props.onUpdateNote, onProtectRange = props.onProtectRange, onUnProtectRange = props.onUnProtectRange, onSortRange = props.onSortRange, onRequestSearch = props.onRequestSearch, onRequestReplace = props.onRequestReplace, onRequestResize = props.onRequestResize, _66 = props.getRowHeaderText, getRowHeaderText = _66 === void 0 ? helpers_1.getDefaultRowHeader : _66, getColumnHeaderTextProp = props.getColumnHeaderText, getAdditionalCellSpacing = props.getAdditionalCellSpacing, _67 = props.tokenizer, defaultTokenizer = _67 === void 0 ? calculator_1.tokenize : _67, onChangeScale = props.onChangeScale, onRemoveLink = props.onRemoveLink, onSelectLink = props.onSelectLink, onSplitTextToColumns = props.onSplitTextToColumns, onRemoveDuplicates = props.onRemoveDuplicates, onGoalSeek = props.onGoalSeek, onSubtotal = props.onSubtotal, onAdvancedFilter = props.onAdvancedFilter, onRequestExpand = props.onRequestExpand, cellExpandPredicate = props.cellExpandPredicate, _68 = props.StructuredResult, StructuredResult = _68 === void 0 ? cell_structured_1.StructuredResultRenderer : _68, getMentions = props.getMentions, getStructuredPropertiesProp = props.getStructuredProperties, getFunctionParameterSuggestions = props.getFunctionParameterSuggestions, shouldFetchFunctionParameters = props.shouldFetchFunctionParameters, MentionTagComponent = props.MentionTagComponent, MentionDropdownItemComponent = props.MentionDropdownItemComponent, _69 = props.showSelectionResizeHandles, showSelectionResizeHandles = _69 === void 0 ? true : _69, enableMagicFill = props.enableMagicFill, _70 = props.enableQuickEdit, enableQuickEdit = _70 === void 0 ? true : _70, MagicFillComponent = props.MagicFillComponent, MagicFillContent = props.MagicFillContent, QuickEdit = props.QuickEdit, PasteMenu = props.PasteMenu, SuggestionAction = props.SuggestionAction, HiddenRowMarkers = props.HiddenRowMarkers, HiddenColumnMarkers = props.HiddenColumnMarkers, enableResizerOverflow = props.enableResizerOverflow, className = props.className, _71 = props.defaultFontSizePoint, defaultFontSizePoint = _71 === void 0 ? config_1.DEFAULT_FONT_SIZE_PT : _71, defaultCellFormat = props.defaultCellFormat, readonly = props.readonly, _72 = props.isComparing, isComparing = _72 === void 0 ? false : _72, getCellDiff = props.getCellDiff, enableDataBoundaryNavigation = props.enableDataBoundaryNavigation, footerHeight = props.footerHeight, footerComponent = props.footerComponent, arrowComponents = props.arrowComponents,
171
175
  // Host-driven filter props. `hostHiddenRowRanges`
172
176
  // supplies compact [start, end] hidden-row tuples; `getFilterValues` supplies a
173
177
  // column's distinct values. Both let a million-row filter render without scanning
@@ -182,7 +186,7 @@ function CanvasGridComponent(props, forwardedRef) {
182
186
  // (formula-valued names, structured references, OFFSET/INDIRECT/FILTER/UNIQUE).
183
187
  resolveValidationSourceValues = props.resolveValidationSourceValues,
184
188
  // Unused props only for api
185
- getDataColumnCount = props.getDataColumnCount, onDeleteNamedRange = props.onDeleteNamedRange, onChangeBorder = props.onChangeBorder, onDuplicateSheet = props.onDuplicateSheet, onCreateConditionalFormattingRule = props.onCreateConditionalFormattingRule, onDeleteConditionalFormattingRule = props.onDeleteConditionalFormattingRule, onUpdateConditionalFormattingRule = props.onUpdateConditionalFormattingRule, onCreateDataValidationRule = props.onCreateDataValidationRule, onUpdateDataValidationRule = props.onUpdateDataValidationRule, onDeleteDataValidationRule = props.onDeleteDataValidationRule, onCreateChart = props.onCreateChart, onDeleteSheet = props.onDeleteSheet, onCreateEmbed = props.onCreateEmbed, onDecreaseIndent = props.onDecreaseIndent, onIncreaseIndent = props.onIncreaseIndent, onChangeTheme = props.onChangeTheme, onChangeDecimals = props.onChangeDecimals, onUpdateSheet = props.onUpdateSheet, onChangeBatchStream = props.onChangeBatchStream, onBlur = props.onBlur, rest = tslib_1.__rest(props, ["licenseKey", "sheetId", "sheetType", "ChartSheetView", "instanceId", "activeCell", "selections", "frozenColumnCount", "frozenRowCount", "rowCount", "columnCount", "autoFocus", "basicFilter", "tables", "namedRanges", "bandedRanges", "tableBorderColor", "filterIconColor", "conditionalFormats", "showFilterIcon", "showCalculatedColumnIcon", "showHeaders", "backgroundImageUrl", "defaultColumnWidth", "defaultRowHeight", "lineHeightMode", "columnHeaderHeight", "rowHeaderWidth", "gridLineColor", "cellBackgroundColor", "cellColor", "headerBorderColor", "headerBackgroundColor", "headerColor", "headerActiveBackgroundColor", "headerSelectedBackgroundColor", "headerSelectedColor", "headerTableBackgroundColor", "headerTableActiveBackgroundColor", "headerTableSelectedBackgroundColor", "frozenShadowColor", "frozenShadowThickness", "selectionBackgroundColor", "selectionBorderColor", "selectionStrokeWidth", "showActiveCellBorderInSelection", "selectionDragBorderColor", "chartSelectedColor", "chipBackgroundColor", "merges", "borderStyles", "protectedRanges", "allowEditRanges", "isWorkbookProtected", "getSheetProtection", "pivotTables", "charts", "onUpdateChart", "onChangeZOrder", "embeds", "slicers", "rowMetadata", "columnMetadata", "scale", "zoomSpeed", "overscanCount", "enableEditOnEnterKey", "enterKeyDirection", "enableAutoCorrect", "shouldHandleKeyDown", "enableTextOverflow", "showGridLines", "showZeros", "splitPane", "enableCellDragAndDrop", "alertBeforeOverwritingCells", "autoPercentEntry", "errorCheckingRules", "staleCells", "rightToLeft", "pageBreaks", "pageBreakPreview", "workbookView", "printSettings", "onChangeHeaderFooter", "showRulers", "workbookTitle", "showFormulas", "protectFormulas", "showFrozenSeparator", "HeaderCell", "Cell", "SelectionTitleComponent", "CellEditor", "CellTooltip", "ContextMenu", "ContextMenuWrapper", "FilterBox", "HeaderMoveDragComponent", "SuggestionsDropdown", "stickyEditor", "scrollSnap", "scrollThrottleTimeout", "preventBrowserDefaultScroll", "mouseMoveThrottleTimeout", "tooltipIntentInterval", "selectionPolicy", "users", "userId", "renderCollaboratorCursor", "functionDescriptions", "showHeaderMenuButton", "scrollbarSize", "theme", "showNotes", "showAllNotes", "isNoteVisible", "showComments", "circleInvalidData", "getIgnoredErrors", "locale", "formulaLocale", "referenceStyle", "agentSuggestions", "onReviewSuggestion", "onShowFormulas", "getDataRowCount", "getDataRegion", "getArrayFormula", "getChartComponent", "getEmbedComponent", "getLinkedPictureSource", "getSlicerComponent", "onChange", "onChangeBatch", "onChangeArrayFormula", "onExpandCollapse", "onPivotDrillDown", "onDelete", "onChangeEditorValue", "onFill", "onRequestCalculate", "onRequestFunctionArguments", "onChangeActiveCell", "onChangeActiveSheet", "onChangeSelections", "getSheetName", "getSheetId", "getCellData", "getNote", "getTextFormatRuns", "getDataValidation", "getEffectiveFormat", "getFormattedValue", "getTooltipContent", "errorResolutionComponent", "getEffectiveValue", "getSparklineGroup", "getUserEnteredExtendedValue", "getEffectiveExtendedValue", "getSheetRowCount", "getSheetColumnCount", "getCellPopoverContent", "onScroll", "onPaneScroll", "onViewPortChange", "windowConditionalFormats", "engineConditionalFormatResults", "getConditionalFormatRuleStats", "onResize", "onAutoResize", "onHideColumn", "onHideRow", "onShowColumn", "onShowRow", "onGroupRows", "onUngroupRows", "onCollapseRowGroup", "onExpandRowGroup", "onGroupColumns", "onUngroupColumns", "onCollapseColumnGroup", "onExpandColumnGroup", "onSetOutlineDepth", "onDeleteRow", "onDeleteColumn", "onInsertRow", "onInsertColumn", "onChangeAutoExpandTables", "onChangeAutoCalculatedColumns", "onInsertCellsShiftDown", "onInsertCellsShiftRight", "onDeleteCellsShiftLeft", "onDeleteCellsShiftUp", "onClearContents", "onMoveColumns", "onMoveRows", "onSelectNextSheet", "onSelectPreviousSheet", "onCreateNewSheet", "onKeyDown", "onChangeFormatting", "onRepeatFormatting", "onClearFormatting", "onRequestEditProtectedRange", "onRequestUnlockAllowEditRange", "onMoveChart", "onResizeChart", "onDeleteChart", "onCutChart", "onCopyChart", "objectClipboard", "objectClipboardPolicy", "onMoveEmbed", "onResizeEmbed", "onDeleteEmbed", "onRequestEditEmbed", "onMoveSlicer", "onResizeSlicer", "onDeleteSlicer", "onDeleteObjects", "onRequestEditSlicer", "onFillRange", "onFlashFill", "onFlashFillSuggest", "onAcceptFlashFill", "disableFillRightShortcut", "keymap", "enableAutoComplete", "onCalculateNow", "onRequestGoTo", "onMoveSelection", "onInsertCutCells", "onInsertCopiedCells", "onInsertTime", "onInsertDate", "onInsertDateTime", "onInsertAutoSum", "onUndo", "onRedo", "batchHistory", "onPaste", "onReapplyPaste", "onCopy", "onCut", "onSortColumn", "onSortTable", "onFilterTable", "onFilterPivot", "onResizeTable", "onUndoTableAutoExpansion", "onUndoCalculatedColumn", "onOverwriteCalculatedColumn", "onRequestEditTable", "onRequestEditPivotTable", "onRequestDeletePivotTable", "onRequestCreatePivotChart", "onRemoveTable", "onCreateTable", "onRequestCreateTable", "onInsertTableColumn", "onDeleteTableColumn", "onInsertTableRow", "onDeleteTableRow", "onUpdateTable", "onRequestResizeTable", "onRequestInsertSlicer", "onCreateBasicFilter", "onRequestDefineNamedRange", "onRequestFormatCells", "onRequestConditionalFormat", "onRequestDataValidation", "onRequestInsertComment", "onRequestInsertLink", "onFreezeColumn", "onFreezeRow", "onUpdateNote", "onProtectRange", "onUnProtectRange", "onSortRange", "onRequestSearch", "onRequestReplace", "onRequestResize", "getRowHeaderText", "getColumnHeaderText", "getAdditionalCellSpacing", "tokenizer", "onChangeScale", "onRemoveLink", "onSelectLink", "onSplitTextToColumns", "onRemoveDuplicates", "onGoalSeek", "onSubtotal", "onAdvancedFilter", "onRequestExpand", "cellExpandPredicate", "StructuredResult", "getMentions", "getStructuredProperties", "getFunctionParameterSuggestions", "shouldFetchFunctionParameters", "MentionTagComponent", "MentionDropdownItemComponent", "showSelectionResizeHandles", "enableMagicFill", "enableQuickEdit", "MagicFillComponent", "MagicFillContent", "QuickEdit", "PasteMenu", "SuggestionAction", "HiddenRowMarkers", "HiddenColumnMarkers", "enableResizerOverflow", "className", "defaultFontSizePoint", "defaultCellFormat", "readonly", "isComparing", "getCellDiff", "enableDataBoundaryNavigation", "footerHeight", "footerComponent", "arrowComponents", "hostHiddenRowRanges", "getFilterValues", "getFilterColors", "getValidationSourceValue", "resolveValidationSourceValues", "getDataColumnCount", "onDeleteNamedRange", "onChangeBorder", "onDuplicateSheet", "onCreateConditionalFormattingRule", "onDeleteConditionalFormattingRule", "onUpdateConditionalFormattingRule", "onCreateDataValidationRule", "onUpdateDataValidationRule", "onDeleteDataValidationRule", "onCreateChart", "onDeleteSheet", "onCreateEmbed", "onDecreaseIndent", "onIncreaseIndent", "onChangeTheme", "onChangeDecimals", "onUpdateSheet", "onChangeBatchStream", "onBlur"]);
189
+ getDataColumnCount = props.getDataColumnCount, onDeleteNamedRange = props.onDeleteNamedRange, onChangeBorder = props.onChangeBorder, onDuplicateSheet = props.onDuplicateSheet, onCreateConditionalFormattingRule = props.onCreateConditionalFormattingRule, onDeleteConditionalFormattingRule = props.onDeleteConditionalFormattingRule, onUpdateConditionalFormattingRule = props.onUpdateConditionalFormattingRule, onCreateDataValidationRule = props.onCreateDataValidationRule, onUpdateDataValidationRule = props.onUpdateDataValidationRule, onDeleteDataValidationRule = props.onDeleteDataValidationRule, onCreateChart = props.onCreateChart, onDeleteSheet = props.onDeleteSheet, onCreateEmbed = props.onCreateEmbed, onDecreaseIndent = props.onDecreaseIndent, onIncreaseIndent = props.onIncreaseIndent, onChangeTheme = props.onChangeTheme, onChangeDecimals = props.onChangeDecimals, onUpdateSheet = props.onUpdateSheet, onChangeBatchStream = props.onChangeBatchStream, onBlur = props.onBlur, rest = tslib_1.__rest(props, ["licenseKey", "sheetId", "sheetType", "ChartSheetView", "instanceId", "activeCell", "selections", "frozenColumnCount", "frozenRowCount", "rowCount", "columnCount", "autoFocus", "basicFilter", "tables", "namedRanges", "bandedRanges", "tableBorderColor", "filterIconColor", "conditionalFormats", "showFilterIcon", "showCalculatedColumnIcon", "showHeaders", "backgroundImageUrl", "defaultColumnWidth", "defaultRowHeight", "lineHeightMode", "columnHeaderHeight", "rowHeaderWidth", "gridLineColor", "cellBackgroundColor", "cellColor", "headerBorderColor", "headerBackgroundColor", "headerColor", "headerActiveBackgroundColor", "headerSelectedBackgroundColor", "headerSelectedColor", "headerTableBackgroundColor", "headerTableActiveBackgroundColor", "headerTableSelectedBackgroundColor", "frozenShadowColor", "frozenShadowThickness", "selectionBackgroundColor", "selectionBorderColor", "selectionStrokeWidth", "showActiveCellBorderInSelection", "selectionDragBorderColor", "chartSelectedColor", "chipBackgroundColor", "merges", "borderStyles", "protectedRanges", "allowEditRanges", "isWorkbookProtected", "getSheetProtection", "pivotTables", "charts", "onUpdateChart", "onChangeZOrder", "embeds", "slicers", "rowMetadata", "columnMetadata", "scale", "zoomSpeed", "overscanCount", "enableEditOnEnterKey", "enterKeyDirection", "enableAutoCorrect", "shouldHandleKeyDown", "enableTextOverflow", "showGridLines", "showZeros", "showObjects", "splitPane", "enableCellDragAndDrop", "alertBeforeOverwritingCells", "autoPercentEntry", "errorCheckingRules", "staleCells", "rightToLeft", "pageBreaks", "pageBreakPreview", "workbookView", "printSettings", "onChangeHeaderFooter", "showRulers", "workbookTitle", "showFormulas", "protectFormulas", "showFrozenSeparator", "HeaderCell", "Cell", "SelectionTitleComponent", "CellEditor", "CellTooltip", "ContextMenu", "ContextMenuWrapper", "FilterBox", "HeaderMoveDragComponent", "SuggestionsDropdown", "stickyEditor", "scrollSnap", "scrollThrottleTimeout", "preventBrowserDefaultScroll", "mouseMoveThrottleTimeout", "tooltipIntentInterval", "selectionPolicy", "users", "userId", "renderCollaboratorCursor", "functionDescriptions", "showHeaderMenuButton", "scrollbarSize", "theme", "showNotes", "showAllNotes", "isNoteVisible", "showComments", "circleInvalidData", "getIgnoredErrors", "locale", "formulaLocale", "referenceStyle", "agentSuggestions", "onReviewSuggestion", "onShowFormulas", "getDataRowCount", "getDataRegion", "getArrayFormula", "getChartComponent", "getEmbedComponent", "getLinkedPictureSource", "getSlicerComponent", "onChange", "onChangeBatch", "onChangeArrayFormula", "onExpandCollapse", "onPivotDrillDown", "onDelete", "onChangeEditorValue", "onFill", "onRequestCalculate", "onRequestFunctionArguments", "onChangeActiveCell", "onChangeActiveSheet", "onChangeSelections", "getSheetName", "getSheetId", "getCellData", "getNote", "getTextFormatRuns", "getDataValidation", "getEffectiveFormat", "getFormattedValue", "getTooltipContent", "errorResolutionComponent", "getEffectiveValue", "getSparklineGroup", "getUserEnteredExtendedValue", "getEffectiveExtendedValue", "getSheetRowCount", "getSheetColumnCount", "getCellPopoverContent", "onScroll", "onPaneScroll", "onViewPortChange", "windowConditionalFormats", "engineConditionalFormatResults", "getConditionalFormatRuleStats", "onResize", "onAutoResize", "onHideColumn", "onHideRow", "onShowColumn", "onShowRow", "onGroupRows", "onUngroupRows", "onCollapseRowGroup", "onExpandRowGroup", "onGroupColumns", "onUngroupColumns", "onCollapseColumnGroup", "onExpandColumnGroup", "onSetOutlineDepth", "onDeleteRow", "onDeleteColumn", "onInsertRow", "onInsertColumn", "onChangeAutoExpandTables", "onChangeAutoCalculatedColumns", "onInsertCellsShiftDown", "onInsertCellsShiftRight", "onDeleteCellsShiftLeft", "onDeleteCellsShiftUp", "onClearContents", "onMoveColumns", "onMoveRows", "onSelectNextSheet", "onSelectPreviousSheet", "onCreateNewSheet", "onKeyDown", "onChangeFormatting", "onRepeatFormatting", "onClearFormatting", "onRequestEditProtectedRange", "onRequestUnlockAllowEditRange", "onMoveChart", "onResizeChart", "onDeleteChart", "onCutChart", "onCopyChart", "objectClipboard", "objectClipboardPolicy", "onMoveEmbed", "onResizeEmbed", "onDeleteEmbed", "onRequestEditEmbed", "onMoveSlicer", "onResizeSlicer", "onDeleteSlicer", "onDeleteObjects", "onRequestEditSlicer", "onFillRange", "onFlashFill", "onFlashFillSuggest", "onAcceptFlashFill", "disableFillRightShortcut", "keymap", "enableAutoComplete", "onCalculateNow", "onRequestGoTo", "onMoveSelection", "onInsertCutCells", "onInsertCopiedCells", "onInsertTime", "onInsertDate", "onInsertDateTime", "onInsertAutoSum", "onUndo", "onRedo", "batchHistory", "onPaste", "onReapplyPaste", "onCopy", "onCut", "onSortColumn", "onSortTable", "onFilterTable", "onFilterPivot", "onResizeTable", "onUndoTableAutoExpansion", "onUndoCalculatedColumn", "onOverwriteCalculatedColumn", "onRequestEditTable", "onRequestEditPivotTable", "onRequestDeletePivotTable", "onRequestCreatePivotChart", "onRemoveTable", "onCreateTable", "onRequestCreateTable", "onInsertTableColumn", "onDeleteTableColumn", "onInsertTableRow", "onDeleteTableRow", "onUpdateTable", "onRequestResizeTable", "onRequestInsertSlicer", "onCreateBasicFilter", "onRequestDefineNamedRange", "onRequestFormatCells", "onRequestConditionalFormat", "onRequestDataValidation", "onRequestInsertComment", "onRequestInsertLink", "onFreezeColumn", "onFreezeRow", "onUpdateNote", "onProtectRange", "onUnProtectRange", "onSortRange", "onRequestSearch", "onRequestReplace", "onRequestResize", "getRowHeaderText", "getColumnHeaderText", "getAdditionalCellSpacing", "tokenizer", "onChangeScale", "onRemoveLink", "onSelectLink", "onSplitTextToColumns", "onRemoveDuplicates", "onGoalSeek", "onSubtotal", "onAdvancedFilter", "onRequestExpand", "cellExpandPredicate", "StructuredResult", "getMentions", "getStructuredProperties", "getFunctionParameterSuggestions", "shouldFetchFunctionParameters", "MentionTagComponent", "MentionDropdownItemComponent", "showSelectionResizeHandles", "enableMagicFill", "enableQuickEdit", "MagicFillComponent", "MagicFillContent", "QuickEdit", "PasteMenu", "SuggestionAction", "HiddenRowMarkers", "HiddenColumnMarkers", "enableResizerOverflow", "className", "defaultFontSizePoint", "defaultCellFormat", "readonly", "isComparing", "getCellDiff", "enableDataBoundaryNavigation", "footerHeight", "footerComponent", "arrowComponents", "hostHiddenRowRanges", "getFilterValues", "getFilterColors", "getValidationSourceValue", "resolveValidationSourceValues", "getDataColumnCount", "onDeleteNamedRange", "onChangeBorder", "onDuplicateSheet", "onCreateConditionalFormattingRule", "onDeleteConditionalFormattingRule", "onUpdateConditionalFormattingRule", "onCreateDataValidationRule", "onUpdateDataValidationRule", "onDeleteDataValidationRule", "onCreateChart", "onDeleteSheet", "onCreateEmbed", "onDecreaseIndent", "onIncreaseIndent", "onChangeTheme", "onChangeDecimals", "onUpdateSheet", "onChangeBatchStream", "onBlur"]);
186
190
  // Enter on a cell opens the editor in Google Sheets and moves down in
187
191
  // Excel; a host's explicit value wins under either keymap.
188
192
  var enableEditOnEnterKey = enableEditOnEnterKeyProp !== null && enableEditOnEnterKeyProp !== void 0 ? enableEditOnEnterKeyProp : keymap !== "excel";
@@ -1005,8 +1009,10 @@ function CanvasGridComponent(props, forwardedRef) {
1005
1009
  // Delete removes the chart instead of clearing the active cell.
1006
1010
  var selectedObject = store.get(selected_chart_embed_atom_1.selectedChartEmbedAtom);
1007
1011
  if (selectedObject !== undefined && !store.get(editing_cell_atom_1.editingCellAtom)) {
1008
- var target = store.get(object_focus_1.objectFocusTargetsAtom).get(selectedObject);
1009
- if ((target === null || target === void 0 ? void 0 : target.isConnected) && (gridContainer === null || gridContainer === void 0 ? void 0 : gridContainer.contains(target))) {
1012
+ // On a split sheet the object may be drawn in several panes: the copy holding focus keeps
1013
+ // it, else the first copy still drawn takes it.
1014
+ var target = (0, object_focus_1.objectFocusTargetOf)(store.get(object_focus_1.objectFocusTargetsAtom), selectedObject, gridContainer);
1015
+ if (target && gridContainer) {
1010
1016
  if (activeElement !== target)
1011
1017
  target.focus({ preventScroll: true });
1012
1018
  return;
@@ -4325,13 +4331,43 @@ function CanvasGridComponent(props, forwardedRef) {
4325
4331
  getEffectiveFormat,
4326
4332
  getCellData,
4327
4333
  ]);
4334
+ // Excel's "For objects, show" (⌃6): "none" leaves the objects out of the object layer, so none is
4335
+ // drawn, clicked, tabbed to or selected; "placeholders" draws each one's frame with an empty box
4336
+ // in place of its content. Pictures in cells are cell content and are not affected.
4337
+ var objectsHidden = showObjects === "none";
4338
+ var objectPlaceholders = showObjects === "placeholders";
4339
+ // While objects are hidden no object stays selected: one selected when ⌃6 hides it, and one
4340
+ // selected later (a paste, insert or duplicate, an undo / redo restoring a selection) that
4341
+ // nobody can see and Delete could not reach. The keyboard goes back to the sheet when it was on
4342
+ // the object (its frame is gone, so focus fell to the page) or in the grid; focus somewhere else
4343
+ // (the formula bar, a dialog, a side pane) stays where it is.
4344
+ (0, react_1.useEffect)(function () {
4345
+ if (!objectsHidden)
4346
+ return;
4347
+ var deselect = function () {
4348
+ var _a, _b, _c;
4349
+ if (store.get(selected_chart_embed_atom_1.selectedChartEmbedAtom) === undefined)
4350
+ return;
4351
+ var ownerDocument = (0, grid_2.getOwnerDocument)(gridContainerRef.current);
4352
+ var active = (_a = ownerDocument === null || ownerDocument === void 0 ? void 0 : ownerDocument.activeElement) !== null && _a !== void 0 ? _a : null;
4353
+ var keyboardOnSheet = !active ||
4354
+ active === (ownerDocument === null || ownerDocument === void 0 ? void 0 : ownerDocument.body) ||
4355
+ ((_c = (_b = gridContainerRef.current) === null || _b === void 0 ? void 0 : _b.contains(active)) !== null && _c !== void 0 ? _c : false);
4356
+ store.set(selected_chart_embed_atom_1.selectedObjectGroupAtom, undefined);
4357
+ store.set(selected_chart_embed_atom_1.selectedChartEmbedAtom, undefined);
4358
+ if (keyboardOnSheet)
4359
+ focusSheet();
4360
+ };
4361
+ deselect();
4362
+ return store.sub(selected_chart_embed_atom_1.selectedChartEmbedAtom, deselect);
4363
+ }, [objectsHidden, store, focusSheet, gridContainerRef]);
4328
4364
  var _108 = (0, use_embeds_charts_1.useEmbedsCharts)({
4329
4365
  pageLayout: pageLayout,
4330
4366
  getLinkedPictureSource: getLinkedPictureSource,
4331
4367
  getSheetName: getSheetName,
4332
- charts: charts,
4333
- embeds: embeds,
4334
- slicers: slicers,
4368
+ charts: objectsHidden ? EMPTY_OBJECTS : charts,
4369
+ embeds: objectsHidden ? EMPTY_OBJECTS : embeds,
4370
+ slicers: objectsHidden ? EMPTY_OBJECTS : slicers,
4335
4371
  sheetId: sheetId,
4336
4372
  scale: scale,
4337
4373
  frozenRows: frozenRows,
@@ -4366,9 +4402,9 @@ function CanvasGridComponent(props, forwardedRef) {
4366
4402
  pivotTables: pivotTables,
4367
4403
  getFormattedValue: getFormattedValue,
4368
4404
  locale: locale,
4369
- getChartComponent: getChartComponent,
4370
- getEmbedComponent: getEmbedComponent,
4371
- getSlicerComponent: getSlicerComponent,
4405
+ getChartComponent: objectPlaceholders ? getObjectPlaceholder : getChartComponent,
4406
+ getEmbedComponent: objectPlaceholders ? getObjectPlaceholder : getEmbedComponent,
4407
+ getSlicerComponent: objectPlaceholders ? getObjectPlaceholder : getSlicerComponent,
4372
4408
  getBounds: getChartBounds,
4373
4409
  theme: theme,
4374
4410
  backgroundColor: cellBackgroundColor,
@@ -434,6 +434,14 @@ export type CanvasGridProps<T extends CellData = CellData<any, any>> = {
434
434
  * this sheet; the value itself is untouched.
435
435
  */
436
436
  showZeros?: Maybe<boolean>;
437
+ /**
438
+ * The workbook's "For objects, show" (Excel ⌃6, `<workbookPr showObjects>`; the engine's
439
+ * `documentFacets().showObjects`): `"none"` hides charts, pictures, shapes, text boxes, form
440
+ * controls and slicers (they cannot be clicked, tabbed to or selected); `"placeholders"` draws
441
+ * each as an empty frame of its size, which can still be selected and moved; absent or `"all"`
442
+ * draws everything. Pictures placed IN a cell are cell content and always draw.
443
+ */
444
+ showObjects?: Maybe<"all" | "placeholders" | "none">;
437
445
  /**
438
446
  * View ▸ Split: the sheet's stored split window (`<pane state="split">`). The body is drawn as
439
447
  * panes that scroll on their own, and moving or removing the bar is reported through