@sheetxl/react 0.8.0-beta.6 → 0.8.0-beta.9

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 (58) hide show
  1. package/browser/cjs/index.cjs +18 -17
  2. package/browser/cjs/xuAfpHmA2W4MFa_0.cjs +1 -0
  3. package/browser/esm/Dk6274Lic6AOmEAq.mjs +2624 -0
  4. package/browser/esm/index.mjs +6474 -4211
  5. package/licenses/dependencies.txt +0 -555
  6. package/node/esm/B-5p0wwNM6Y5jlI2.mjs +2624 -0
  7. package/node/esm/index.mjs +8166 -5896
  8. package/package.json +6 -7
  9. package/resources/locales/de/sheet.cmd.json +126 -20
  10. package/resources/locales/de/ui.msg.json +8 -0
  11. package/resources/locales/en/sheet.cmd.json +137 -19
  12. package/resources/locales/en/ui.msg.json +169 -0
  13. package/types/src/cell/CornerTriangle.d.ts +6 -0
  14. package/types/src/cell/OutlineButton.d.ts +123 -0
  15. package/types/src/cell/index.d.ts +1 -0
  16. package/types/src/checklist/ValueChecklist.d.ts +15 -3
  17. package/types/src/comment/CommentCardRequest.d.ts +94 -0
  18. package/types/src/comment/CommentUtils.d.ts +43 -0
  19. package/types/src/comment/index.d.ts +4 -0
  20. package/types/src/comment/useCommentThread.d.ts +37 -0
  21. package/types/src/comment/useSheetComments.d.ts +28 -0
  22. package/types/src/control/FormControlRenderers.d.ts +14 -0
  23. package/types/src/control/index.d.ts +2 -0
  24. package/types/src/frame/CommandContext.d.ts +27 -0
  25. package/types/src/index.d.ts +1 -0
  26. package/types/src/layer/CommentCardLayer.d.ts +45 -0
  27. package/types/src/layer/SheetHeaderCellLayer.d.ts +9 -0
  28. package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
  29. package/types/src/layer/ValidationPromptLayer.d.ts +2 -2
  30. package/types/src/layer/index.d.ts +2 -0
  31. package/types/src/listener/useModelListener.d.ts +4 -4
  32. package/types/src/movable/IMovableArea.d.ts +25 -6
  33. package/types/src/movable/MovableAdornment.d.ts +20 -0
  34. package/types/src/movable/MovableControl.d.ts +32 -0
  35. package/types/src/movable/MovableFrame.d.ts +13 -15
  36. package/types/src/movable/MovableRenderers.d.ts +55 -0
  37. package/types/src/movable/RotateHandle.d.ts +29 -0
  38. package/types/src/movable/framePlacement.d.ts +29 -0
  39. package/types/src/movable/geometry.d.ts +51 -0
  40. package/types/src/movable/index.d.ts +1 -0
  41. package/types/src/shape/ShapeEditor.d.ts +16 -2
  42. package/types/src/shape/ShapeGallery.d.ts +16 -0
  43. package/types/src/shape/ShapeHandles.d.ts +28 -0
  44. package/types/src/shape/ShapeSVG.d.ts +24 -0
  45. package/types/src/shape/ShapeText.d.ts +17 -0
  46. package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
  47. package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
  48. package/types/src/shape/index.d.ts +3 -0
  49. package/types/src/shape/shapeFrame.d.ts +6 -0
  50. package/types/src/shape/shapeStyle.d.ts +31 -0
  51. package/types/src/sheet/ISheetElement.d.ts +16 -1
  52. package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
  53. package/types/src/workbook/DefaultMovableRenderers.d.ts +2 -0
  54. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  55. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
  56. package/browser/esm/CFCvoIa_w1ERjvMW.mjs +0 -6286
  57. package/node/esm/B9g0FgUjU-KLHkGu.mjs +0 -9
  58. package/types/src/movable/MoveableBundle.d.ts +0 -4
@@ -88,12 +88,14 @@
88
88
  "error.fillSeries.invalidSelection": "Can not fill a series from this selection. Select the values to continue along with the cells to fill.",
89
89
  "error.fillSeries.multipleRanges": "Can not fill a series across multiple cell ranges. Please select a single range and try again.",
90
90
  "error.fillSeries.unknownType": "Unknown fill type.",
91
+ "error.group.multipleRanges": "Can not group multiple cell ranges. Please select a single range and try again.",
91
92
  "error.insertImage.unresolved": "Unable to resolve image. {detail}",
92
93
  "error.removeDuplicates.multipleRanges": "Can not perform Remove Duplicates on multiple cell ranges. Please select a single range and try again.",
93
94
  "error.sheet.arrayFixedMultipleRanges": "An array formula can't be entered over a multiple selection.",
94
95
  "error.sort.invalidSelection": "Invalid sort selection. Sort requires a single range with data.",
95
96
  "error.sort.multipleRanges": "Can not sort on multiple cell ranges. Please select a single range and try again.",
96
97
  "error.textToColumns.multipleRanges": "Can not perform Text to Columns on multiple cell ranges. Please select a single range and try again.",
98
+ "error.ungroup.multipleRanges": "Can not ungroup multiple cell ranges. Please select a single range and try again.",
97
99
  "findReplace.replaced": "We replaced {count} cells.",
98
100
  "formulaInput.equalsRequired": "Formula must start with '='.",
99
101
  "formulaInput.invalid": "Invalid Formula",
@@ -147,10 +149,14 @@
147
149
  "op.typeInto": "Type ''{text}'' into {range}",
148
150
  "op.unmergeCells": "Unmerge Cells",
149
151
  "op.updateHyperlink": "Update Hyperlink",
152
+ "outline.collapse": "Collapse",
153
+ "outline.expand": "Expand",
154
+ "outline.showLevel": "Show level {level}",
150
155
  "picker.noMatches": "No matches",
151
156
  "picker.noValues": "No values",
152
157
  "picker.search": "Search",
153
158
  "reason.alreadyTable": "The selection is already in a table.",
159
+ "reason.cellHasNote": "The cell has a note.",
154
160
  "reason.cellHasThread": "The cell has a threaded comment.",
155
161
  "reason.continuousSpan": "Not available with continuous / fill alignment.",
156
162
  "reason.entireColumn": "Not available when entire columns are selected.",
@@ -158,9 +164,12 @@
158
164
  "reason.freezeOrigin": "Select a cell below and/or right of where the panes should freeze.",
159
165
  "reason.mergeUnavailable": "Merge is not available for this selection.",
160
166
  "reason.mixedSelection": "Not available for a mixed full / partial selection.",
167
+ "reason.noComments": "The sheet has no comments.",
161
168
  "reason.noFreeze": "No frozen panes.",
169
+ "reason.noGroup": "The selection is not in a group.",
162
170
  "reason.noMerge": "No merged cells in the selection.",
163
171
  "reason.noNote": "The cell has no note.",
172
+ "reason.noNotes": "The sheet has no notes.",
164
173
  "reason.noPreviousSearch": "Nothing has been searched for yet.",
165
174
  "reason.noSelection": "Nothing is selected.",
166
175
  "reason.noSheetBackground": "The sheet has no background.",
@@ -169,6 +178,7 @@
169
178
  "reason.nothingToSelect": "Nothing to select.",
170
179
  "reason.nothingToUndo": "Nothing to undo.",
171
180
  "reason.notImplemented": "Not yet implemented.",
181
+ "reason.outlineTooDeep": "Groups can be nested no more than 7 levels deep.",
172
182
  "reason.overlap": "Not available for an overlapping selection.",
173
183
  "reason.protectionNotPausable": "Pausing needs a protected sheet.",
174
184
  "reason.sheetLocked": "The sheet is locked.",
@@ -191,6 +201,165 @@
191
201
  "scrollbar.row": "Row: {title}",
192
202
  "selection.replace": "Replace",
193
203
  "selection.replaceData": "There is already data here. Do you want to replace it?",
204
+ "shape.category.basic": "Basic Shapes",
205
+ "shape.category.blockArrows": "Block Arrows",
206
+ "shape.category.callouts": "Callouts",
207
+ "shape.category.equation": "Equation Shapes",
208
+ "shape.category.flowchart": "Flowchart",
209
+ "shape.category.lines": "Lines",
210
+ "shape.category.rectangles": "Rectangles",
211
+ "shape.category.starsBanners": "Stars and Banners",
212
+ "shape.preset.accentBorderCallout1": "Callout: Line with Border and Accent Bar",
213
+ "shape.preset.accentBorderCallout2": "Callout: Bent Line with Border and Accent Bar",
214
+ "shape.preset.accentBorderCallout3": "Callout: Double Bent Line with Border and Accent Bar",
215
+ "shape.preset.accentCallout1": "Callout: Line with Accent Bar",
216
+ "shape.preset.accentCallout2": "Callout: Bent Line with Accent Bar",
217
+ "shape.preset.accentCallout3": "Callout: Double Bent Line with Accent Bar",
218
+ "shape.preset.arc": "Arc",
219
+ "shape.preset.bentArrow": "Arrow: Bent",
220
+ "shape.preset.bentConnector3": "Connector: Elbow",
221
+ "shape.preset.bentUpArrow": "Arrow: Bent-Up",
222
+ "shape.preset.bevel": "Bevel",
223
+ "shape.preset.blockArc": "Block Arc",
224
+ "shape.preset.borderCallout1": "Callout: Line",
225
+ "shape.preset.borderCallout2": "Callout: Bent Line",
226
+ "shape.preset.borderCallout3": "Callout: Double Bent Line",
227
+ "shape.preset.bracePair": "Double Brace",
228
+ "shape.preset.bracketPair": "Double Bracket",
229
+ "shape.preset.callout1": "Callout: Line with No Border",
230
+ "shape.preset.callout2": "Callout: Bent Line with No Border",
231
+ "shape.preset.callout3": "Callout: Double Bent Line with No Border",
232
+ "shape.preset.can": "Cylinder",
233
+ "shape.preset.chevron": "Arrow: Chevron",
234
+ "shape.preset.chord": "Chord",
235
+ "shape.preset.circularArrow": "Arrow: Circular",
236
+ "shape.preset.cloud": "Cloud",
237
+ "shape.preset.cloudCallout": "Thought Bubble: Cloud",
238
+ "shape.preset.corner": "L-Shape",
239
+ "shape.preset.cube": "Cube",
240
+ "shape.preset.curvedConnector3": "Connector: Curved",
241
+ "shape.preset.curvedDownArrow": "Arrow: Curved Down",
242
+ "shape.preset.curvedLeftArrow": "Arrow: Curved Left",
243
+ "shape.preset.curvedRightArrow": "Arrow: Curved Right",
244
+ "shape.preset.curvedUpArrow": "Arrow: Curved Up",
245
+ "shape.preset.decagon": "Decagon",
246
+ "shape.preset.diagStripe": "Diagonal Stripe",
247
+ "shape.preset.diamond": "Diamond",
248
+ "shape.preset.dodecagon": "Dodecagon",
249
+ "shape.preset.donut": "Circle: Hollow",
250
+ "shape.preset.doubleWave": "Double Wave",
251
+ "shape.preset.downArrow": "Arrow: Down",
252
+ "shape.preset.downArrowCallout": "Callout: Down Arrow",
253
+ "shape.preset.ellipse": "Oval",
254
+ "shape.preset.ellipseRibbon": "Ribbon: Curved and Tilted Down",
255
+ "shape.preset.ellipseRibbon2": "Ribbon: Curved and Tilted Up",
256
+ "shape.preset.flowChartAlternateProcess": "Flowchart: Alternate Process",
257
+ "shape.preset.flowChartCollate": "Flowchart: Collate",
258
+ "shape.preset.flowChartConnector": "Flowchart: Connector",
259
+ "shape.preset.flowChartDecision": "Flowchart: Decision",
260
+ "shape.preset.flowChartDelay": "Flowchart: Delay",
261
+ "shape.preset.flowChartDisplay": "Flowchart: Display",
262
+ "shape.preset.flowChartDocument": "Flowchart: Document",
263
+ "shape.preset.flowChartExtract": "Flowchart: Extract",
264
+ "shape.preset.flowChartInputOutput": "Flowchart: Data",
265
+ "shape.preset.flowChartInternalStorage": "Flowchart: Internal Storage",
266
+ "shape.preset.flowChartMagneticDisk": "Flowchart: Magnetic Disk",
267
+ "shape.preset.flowChartMagneticDrum": "Flowchart: Direct Access Storage",
268
+ "shape.preset.flowChartMagneticTape": "Flowchart: Sequential Access Storage",
269
+ "shape.preset.flowChartManualInput": "Flowchart: Manual Input",
270
+ "shape.preset.flowChartManualOperation": "Flowchart: Manual Operation",
271
+ "shape.preset.flowChartMerge": "Flowchart: Merge",
272
+ "shape.preset.flowChartMultidocument": "Flowchart: Multidocument",
273
+ "shape.preset.flowChartOffpageConnector": "Flowchart: Off-page Connector",
274
+ "shape.preset.flowChartOnlineStorage": "Flowchart: Stored Data",
275
+ "shape.preset.flowChartOr": "Flowchart: Or",
276
+ "shape.preset.flowChartPredefinedProcess": "Flowchart: Predefined Process",
277
+ "shape.preset.flowChartPreparation": "Flowchart: Preparation",
278
+ "shape.preset.flowChartProcess": "Flowchart: Process",
279
+ "shape.preset.flowChartPunchedCard": "Flowchart: Card",
280
+ "shape.preset.flowChartPunchedTape": "Flowchart: Punched Tape",
281
+ "shape.preset.flowChartSort": "Flowchart: Sort",
282
+ "shape.preset.flowChartSummingJunction": "Flowchart: Summing Junction",
283
+ "shape.preset.flowChartTerminator": "Flowchart: Terminator",
284
+ "shape.preset.foldedCorner": "Folded Corner",
285
+ "shape.preset.frame": "Frame",
286
+ "shape.preset.halfFrame": "Half Frame",
287
+ "shape.preset.heart": "Heart",
288
+ "shape.preset.heptagon": "Heptagon",
289
+ "shape.preset.hexagon": "Hexagon",
290
+ "shape.preset.homePlate": "Arrow: Pentagon",
291
+ "shape.preset.horizontalScroll": "Scroll: Horizontal",
292
+ "shape.preset.irregularSeal1": "Explosion: 8 Points",
293
+ "shape.preset.irregularSeal2": "Explosion: 14 Points",
294
+ "shape.preset.leftArrow": "Arrow: Left",
295
+ "shape.preset.leftArrowCallout": "Callout: Left Arrow",
296
+ "shape.preset.leftBrace": "Left Brace",
297
+ "shape.preset.leftBracket": "Left Bracket",
298
+ "shape.preset.leftRightArrow": "Arrow: Left-Right",
299
+ "shape.preset.leftRightArrowCallout": "Callout: Left-Right Arrow",
300
+ "shape.preset.leftRightUpArrow": "Arrow: Left-Right-Up",
301
+ "shape.preset.leftUpArrow": "Arrow: Left-Up",
302
+ "shape.preset.lightningBolt": "Lightning Bolt",
303
+ "shape.preset.line": "Line",
304
+ "shape.preset.mathDivide": "Division Sign",
305
+ "shape.preset.mathEqual": "Equals",
306
+ "shape.preset.mathMinus": "Minus Sign",
307
+ "shape.preset.mathMultiply": "Multiplication Sign",
308
+ "shape.preset.mathNotEqual": "Not Equal",
309
+ "shape.preset.mathPlus": "Plus Sign",
310
+ "shape.preset.moon": "Moon",
311
+ "shape.preset.noSmoking": "\"No\" Symbol",
312
+ "shape.preset.notchedRightArrow": "Arrow: Notched Right",
313
+ "shape.preset.octagon": "Octagon",
314
+ "shape.preset.parallelogram": "Parallelogram",
315
+ "shape.preset.pentagon": "Pentagon",
316
+ "shape.preset.pie": "Partial Circle",
317
+ "shape.preset.plaque": "Plaque",
318
+ "shape.preset.plus": "Cross",
319
+ "shape.preset.quadArrow": "Arrow: Quad",
320
+ "shape.preset.quadArrowCallout": "Callout: Quad Arrow",
321
+ "shape.preset.rect": "Rectangle",
322
+ "shape.preset.ribbon": "Ribbon: Tilted Down",
323
+ "shape.preset.ribbon2": "Ribbon: Tilted Up",
324
+ "shape.preset.rightArrow": "Arrow: Right",
325
+ "shape.preset.rightArrowCallout": "Callout: Right Arrow",
326
+ "shape.preset.rightBrace": "Right Brace",
327
+ "shape.preset.rightBracket": "Right Bracket",
328
+ "shape.preset.round1Rect": "Rectangle: Single Corner Rounded",
329
+ "shape.preset.round2DiagRect": "Rectangle: Diagonal Corners Rounded",
330
+ "shape.preset.round2SameRect": "Rectangle: Top Corners Rounded",
331
+ "shape.preset.roundRect": "Rectangle: Rounded Corners",
332
+ "shape.preset.rtTriangle": "Right Triangle",
333
+ "shape.preset.smileyFace": "Smiley Face",
334
+ "shape.preset.snip1Rect": "Rectangle: Single Corner Snipped",
335
+ "shape.preset.snip2DiagRect": "Rectangle: Diagonal Corners Snipped",
336
+ "shape.preset.snip2SameRect": "Rectangle: Top Corners Snipped",
337
+ "shape.preset.snipRoundRect": "Rectangle: Top Corners One Rounded and One Snipped",
338
+ "shape.preset.star10": "Star: 10 Points",
339
+ "shape.preset.star12": "Star: 12 Points",
340
+ "shape.preset.star16": "Star: 16 Points",
341
+ "shape.preset.star24": "Star: 24 Points",
342
+ "shape.preset.star32": "Star: 32 Points",
343
+ "shape.preset.star4": "Star: 4 Points",
344
+ "shape.preset.star5": "Star: 5 Points",
345
+ "shape.preset.star6": "Star: 6 Points",
346
+ "shape.preset.star7": "Star: 7 Points",
347
+ "shape.preset.star8": "Star: 8 Points",
348
+ "shape.preset.straightConnector1": "Straight Connector",
349
+ "shape.preset.stripedRightArrow": "Arrow: Striped Right",
350
+ "shape.preset.sun": "Sun",
351
+ "shape.preset.teardrop": "Teardrop",
352
+ "shape.preset.trapezoid": "Trapezoid",
353
+ "shape.preset.triangle": "Isosceles Triangle",
354
+ "shape.preset.upArrow": "Arrow: Up",
355
+ "shape.preset.upArrowCallout": "Callout: Up Arrow",
356
+ "shape.preset.upDownArrow": "Arrow: Up-Down",
357
+ "shape.preset.uturnArrow": "Arrow: U-Turn",
358
+ "shape.preset.verticalScroll": "Scroll: Vertical",
359
+ "shape.preset.wave": "Wave",
360
+ "shape.preset.wedgeEllipseCallout": "Speech Bubble: Oval",
361
+ "shape.preset.wedgeRectCallout": "Speech Bubble: Rectangle",
362
+ "shape.preset.wedgeRoundRectCallout": "Speech Bubble: Rectangle with Corners Rounded",
194
363
  "sheet.merge": "Merge",
195
364
  "sheet.mergeCellsWarning": "Merging cells will only keep the upper-left value. Some data will be discarded. Continue?",
196
365
  "table.columns.compact": "{count, plural, one{Table Column} other{# Table Columns}}",
@@ -21,6 +21,12 @@ export interface CornerTriangleProps extends React.SVGProps<SVGSVGElement> {
21
21
  inset?: number;
22
22
  cellWidth?: number;
23
23
  cellHeight?: number;
24
+ /**
25
+ * `'bubble'` draws a speech-bubble corner, Excel's mark for a threaded comment, in place of the
26
+ * triangle. Top right only.
27
+ * @defaultValue 'triangle'
28
+ */
29
+ shape?: 'triangle' | 'bubble';
24
30
  propsPath?: React.SVGProps<SVGPathElement>;
25
31
  }
26
32
  export declare const CornerTriangle: React.MemoExoticComponent<(props: CornerTriangleProps) => React.JSX.Element>;
@@ -0,0 +1,123 @@
1
+ import { default as React } from 'react';
2
+ import { IRange } from '@sheetxl/sdk';
3
+ /**
4
+ * Props for the button that collapses or expands one row or column group.
5
+ */
6
+ export interface OutlineButtonProps {
7
+ /** Rows or columns. */
8
+ axis: IRange.Axis;
9
+ /** The group's level, from `1`. */
10
+ level: number;
11
+ /** Whether the group's details are collapsed: the button expands it. */
12
+ collapsed: boolean;
13
+ /** The edge of the square the button fills, in pixels. */
14
+ size: number;
15
+ /** A localized description of what a press does. */
16
+ title: string;
17
+ /** Collapses or expands the group. */
18
+ onToggle: () => void;
19
+ /** Whether a press would be refused (the sheet is protected); the button shows it. */
20
+ disabled?: boolean;
21
+ }
22
+ /**
23
+ * Props for one of the level buttons `1`..`n`.
24
+ */
25
+ export interface OutlineLevelButtonProps {
26
+ /** Rows or columns. */
27
+ axis: IRange.Axis;
28
+ /** The level the button shows, from `1`. */
29
+ level: number;
30
+ /**
31
+ * Whether the headers this level reveals are showing somewhere: its button, and every one below
32
+ * it, would show nothing new. The default renderer does not mark these; it sets `data-shown`.
33
+ */
34
+ shown: boolean;
35
+ /** The edge of the square the button fills, in pixels. */
36
+ size: number;
37
+ /** A localized description of what a press does. */
38
+ title: string;
39
+ /** Shows the groups above this level and collapses the rest. */
40
+ onShowLevel: () => void;
41
+ /** Whether a press would be refused (the sheet is protected); the button shows it. */
42
+ disabled?: boolean;
43
+ }
44
+ /**
45
+ * Props for the outline: the row and column gutters and their level buttons.
46
+ *
47
+ * @remarks
48
+ * The HTML attributes (`className`, `style`, …) apply to each of the outline's boxes: both gutters
49
+ * and both level strips. Where they sit in the sheet is not theirs to change.
50
+ */
51
+ export interface OutlineProps extends React.HTMLAttributes<HTMLDivElement> {
52
+ /**
53
+ * Renders a group's collapse / expand button, filling the square it is placed in. Defaults to
54
+ * {@link OutlineButton}.
55
+ */
56
+ renderButton?: (props: OutlineButtonProps) => React.ReactNode;
57
+ /**
58
+ * Renders a level button, filling the square it is placed in. Defaults to
59
+ * {@link OutlineLevelButton}.
60
+ */
61
+ renderLevelButton?: (props: OutlineLevelButtonProps) => React.ReactNode;
62
+ /**
63
+ * The size of one level's lane across the gutter, in pixels at 100% zoom. A button fills its lane,
64
+ * less {@link laneGap}.
65
+ *
66
+ * @defaultValue 18
67
+ *
68
+ * @remarks
69
+ * The default button is Excel desktop's 17 pixels. Keep the button odd (`laneSize - laneGap`) and
70
+ * the `+` or `−` sits on its center pixel.
71
+ */
72
+ laneSize?: number;
73
+ /**
74
+ * The space around the buttons, in pixels: between neighbors, and before the first and after the
75
+ * last. Not scaled by zoom.
76
+ *
77
+ * @defaultValue 1
78
+ */
79
+ laneGap?: number;
80
+ /**
81
+ * Space between a bracket's end and its button, in pixels.
82
+ *
83
+ * @defaultValue 0
84
+ */
85
+ bracketGap?: number;
86
+ }
87
+ /**
88
+ * The edge of an outline button: it fills its lane, less the gap to its neighbor.
89
+ */
90
+ export declare const outlineButtonSize: (laneSize: number, laneGap: number) => number;
91
+ /**
92
+ * Props for {@link OutlineGlyph}.
93
+ */
94
+ export interface OutlineGlyphProps {
95
+ /** `+` when collapsed, `−` when not. */
96
+ collapsed: boolean;
97
+ /** The glyph's box, in pixels; odd keeps it symmetric. */
98
+ size: number;
99
+ }
100
+ /**
101
+ * The `+` or `−` of an outline button, drawn on whole pixels with a one-pixel stroke.
102
+ */
103
+ export declare const OutlineGlyph: React.MemoExoticComponent<(props: OutlineGlyphProps) => React.JSX.Element>;
104
+ /**
105
+ * The edge and fill of a level button: those of the sheet's corner select-all knob when the sheet is
106
+ * not selected, resolved on the header surface the strip sits on.
107
+ */
108
+ export declare const outlineLevelColors: React.CSSProperties;
109
+ /**
110
+ * The text of a level button: the digit centered in a box of `size` (border included).
111
+ */
112
+ export declare const outlineLevelTextStyle: (size: number) => React.CSSProperties;
113
+ /**
114
+ * The chromeless collapse / expand button: a square with a `+` or a `−`.
115
+ */
116
+ export declare const OutlineButton: React.MemoExoticComponent<(props: OutlineButtonProps) => React.JSX.Element>;
117
+ /**
118
+ * The chromeless level button: a square with its level number, in the corner knob's colors.
119
+ */
120
+ export declare const OutlineLevelButton: React.MemoExoticComponent<(props: OutlineLevelButtonProps) => React.JSX.Element>;
121
+ export declare const renderOutlineButton: (props: OutlineButtonProps) => React.ReactNode;
122
+ export declare const renderOutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactNode;
123
+ //# sourceMappingURL=OutlineButton.d.ts.map
@@ -4,5 +4,6 @@ export * from './FormulaCellRenderer';
4
4
  export * from './useFormulaViewAnchor';
5
5
  export * from './SheetHeaderRenderer';
6
6
  export * from './ColumnButton';
7
+ export * from './OutlineButton';
7
8
  export * from './CornerTriangle';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { Scalar } from '@sheetxl/sdk';
2
+ import { Scalar, IFilter } from '@sheetxl/sdk';
3
3
  import { CheckboxListProps } from '@sheetxl/grid-react';
4
4
  /** One value the checklist offers. */
5
5
  export interface ValueChecklistItem {
@@ -16,12 +16,19 @@ export interface ValueChecklistItem {
16
16
  export interface ValueChecklistProps {
17
17
  /** The values, in the order shown. */
18
18
  items: readonly ValueChecklistItem[];
19
+ /**
20
+ * The date tree over the leading items, as `IFilter.getItems` answers it: one level per entry,
21
+ * each the runs of items its nodes span. Listed as Excel's tree: a row per node with a
22
+ * disclosure, the deepest level's nodes as the leaves, and the items past the tree flat under
23
+ * it. While a search is typed the dates list flat by their text.
24
+ */
25
+ dates?: readonly IFilter.DateLevel[];
19
26
  /** The checked values, by `text`. */
20
27
  checked: ReadonlySet<string>;
21
28
  /**
22
29
  * `texts` were set to `checked` — one on a click, the highlighted rows on Space, every row in
23
- * view on Select All. Rows out of the view (narrowed away by the search) are never named, so
24
- * they keep their state.
30
+ * view on Select All, every item of a node on its row. Rows out of the view (narrowed away by
31
+ * the search) are never named, so they keep their state.
25
32
  */
26
33
  onCheckedChange: (texts: readonly string[], checked: boolean) => void;
27
34
  /** Whether a `(Blanks)` row is offered, first in the list. */
@@ -64,6 +71,11 @@ export interface ValueChecklistProps {
64
71
  * The search field keeps the focus; Up/Down move the list's highlight, Space toggles the
65
72
  * highlighted rows, Enter applies, Escape clears the search and then closes.
66
73
  *
74
+ * With `dates`, the leading items are listed as a tree (Excel's year › month › day): a node's
75
+ * checkbox is the state of its items, its row toggles them all, and its disclosure (or Left and
76
+ * Right on the highlighted row, with nothing typed) folds it. Collapsing hides the member rows
77
+ * from the view; they keep their state.
78
+ *
67
79
  * The root wears the grid's surface and mode, so the list looks like the cells it stands for even
68
80
  * inside chrome of another color.
69
81
  */
@@ -0,0 +1,94 @@
1
+ import { CellCoords } from '@sheetxl/utils';
2
+ import { IComment, ISheet } from '@sheetxl/sdk';
3
+ /**
4
+ * What a comments task pane is asked to open on — `activateTaskPane('comments', { args })`.
5
+ */
6
+ export interface CommentsPaneArgs {
7
+ /**
8
+ * Scroll to this thread and put the caret in its reply box.
9
+ */
10
+ focus?: IComment;
11
+ /**
12
+ * Open a draft on the active cell. Nothing is written until it is posted.
13
+ */
14
+ insert?: boolean;
15
+ }
16
+ /**
17
+ * What a comment card is rendered from.
18
+ */
19
+ export interface CommentCardRenderProps {
20
+ /** The sheet the card's cell is on. */
21
+ sheet: ISheet;
22
+ /** The cell the card belongs to. */
23
+ coords: CellCoords;
24
+ /** The thread on the cell, or `null` for a draft: a comment that has not been posted. */
25
+ comment: IComment | null;
26
+ /**
27
+ * A new value each time a command asks for the card, whose text then takes the caret; `0` when
28
+ * none has.
29
+ */
30
+ focusRequest: number;
31
+ /** Dismisses the card; a draft that was not posted is dropped. */
32
+ onClose: () => void;
33
+ }
34
+ /**
35
+ * A cell whose comment card is asked to stay beside it with the caret in its text: a draft when the
36
+ * cell has no thread, the thread's reply box when it has one.
37
+ */
38
+ export interface CommentCardRequest extends CellCoords {
39
+ /**
40
+ * A new value each time the card's text is asked to take the caret; `0` when the card is only
41
+ * asked to stay.
42
+ */
43
+ focusRequest: number;
44
+ }
45
+ /**
46
+ * Options for {@link requestCommentCard}.
47
+ */
48
+ export interface RequestCommentCardOptions {
49
+ /**
50
+ * Whether the card's text takes the caret.
51
+ * @defaultValue true
52
+ */
53
+ autoFocus?: boolean;
54
+ }
55
+ /**
56
+ * Asks for the comment card of a cell: a draft when the cell has no thread, its thread otherwise.
57
+ *
58
+ * @remarks
59
+ * This is how a command reaches a card it cannot see. The card floats beside the cell until the
60
+ * request is {@link clearCommentCard | cleared}, which the layer drawing it does when the selection
61
+ * leaves the cell. A draft writes nothing until it is posted.
62
+ */
63
+ export declare const requestCommentCard: (sheet: ISheet, coords: CellCoords, options?: RequestCommentCardOptions) => void;
64
+ /**
65
+ * Takes back a {@link requestCommentCard | request}; a draft that was not posted is dropped.
66
+ */
67
+ export declare const clearCommentCard: (sheet: ISheet) => void;
68
+ /**
69
+ * The cell whose card is asked for on the sheet, or `null` for none.
70
+ */
71
+ export declare const getCommentCardRequest: (sheet: ISheet) => CommentCardRequest | null;
72
+ /**
73
+ * Whether anything draws the sheet's comment cards. A command falls back to the comments task pane
74
+ * when nothing does.
75
+ */
76
+ export declare const hasCommentCard: (sheet: ISheet) => boolean;
77
+ /**
78
+ * Listens for the sheet's card request changing. Whatever draws the cards listens; the returned
79
+ * function stops listening.
80
+ */
81
+ export declare const addCommentCardListener: (sheet: ISheet, listener: () => void) => (() => void);
82
+ /**
83
+ * The cell a draft is open on: a requested card whose cell has no comment yet. `null` for none.
84
+ *
85
+ * @remarks
86
+ * For what marks the cell while its comment is being written. Following this does not count as
87
+ * drawing the cards, so {@link hasCommentCard} is unchanged by it.
88
+ */
89
+ export declare const useCommentDraftCell: (sheet: ISheet) => CommentCardRequest | null;
90
+ /**
91
+ * {@link getCommentCardRequest}, kept current.
92
+ */
93
+ export declare const useCommentCardRequest: (sheet: ISheet) => CommentCardRequest | null;
94
+ //# sourceMappingURL=CommentCardRequest.d.ts.map
@@ -0,0 +1,43 @@
1
+ import { CellCoords } from '@sheetxl/utils';
2
+ import { IComment } from '@sheetxl/sdk';
3
+ /**
4
+ * The cell a comment is on, as plain coordinates.
5
+ *
6
+ * @remarks
7
+ * A comment's own range is anchored (`$B$2`); selecting or comparing cells wants the plain cell.
8
+ */
9
+ export declare const getCommentCoords: (comment: IComment) => CellCoords;
10
+ /**
11
+ * Orders comments as they are read on the sheet: by row, then by column.
12
+ */
13
+ export declare const compareComments: (a: IComment, b: IComment) => number;
14
+ /**
15
+ * The initials shown in a person's avatar: the first letter of the first and of the last word of
16
+ * their name, or of the one word it has.
17
+ */
18
+ export declare const getPersonInitials: (displayName: string | null | undefined) => string;
19
+ /**
20
+ * Options for {@link formatCommentTime}.
21
+ */
22
+ export interface FormatCommentTimeOptions {
23
+ /** The moment the time is relative to. Defaults to now. */
24
+ now?: Date;
25
+ /** A BCP 47 language tag. Defaults to the runtime's. */
26
+ locale?: string;
27
+ }
28
+ /**
29
+ * When a comment was written, as a card shows it.
30
+ */
31
+ export interface CommentTime {
32
+ /** How long ago, in words: `2 hours ago`, `yesterday`. */
33
+ relative: string;
34
+ /** The full date and time, for a tooltip. */
35
+ absolute: string;
36
+ }
37
+ /**
38
+ * Formats when a comment was written: relative for the card, absolute for its tooltip.
39
+ *
40
+ * @returns `null` for no date, which is what a note converted to a comment has.
41
+ */
42
+ export declare const formatCommentTime: (date: Date | null | undefined, options?: FormatCommentTimeOptions) => CommentTime | null;
43
+ //# sourceMappingURL=CommentUtils.d.ts.map
@@ -1,2 +1,6 @@
1
1
  export * from './NoteEditor';
2
+ export * from './CommentUtils';
3
+ export * from './CommentCardRequest';
4
+ export * from './useSheetComments';
5
+ export * from './useCommentThread';
2
6
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { IComment, IPerson } from '@sheetxl/sdk';
2
+ /**
3
+ * One thread as a card shows it: the comment's current values, read once per change.
4
+ */
5
+ export interface CommentThread {
6
+ /** The comment's text. */
7
+ content: string;
8
+ /** Who wrote it, or `null` if the workbook does not know them. */
9
+ author: IPerson | null;
10
+ /** When it was written, or `null` if it carries no date. */
11
+ date: Date | null;
12
+ /** Whether the thread is resolved. */
13
+ resolved: boolean;
14
+ /** The replies, oldest first. */
15
+ replies: IComment.IReply[];
16
+ /** `true` once the comment has been deleted; the other values are then empty. */
17
+ deleted: boolean;
18
+ }
19
+ /**
20
+ * A comment's thread, kept current: its text, author, replies and resolved state.
21
+ *
22
+ * @param comment The comment, or `null` for none (a draft that has not been posted).
23
+ * @returns The thread, or `null` when there is no comment.
24
+ *
25
+ * @remarks
26
+ * The object keeps its identity until the comment's content, replies or resolved state changes,
27
+ * or the comment is deleted.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * const thread = useCommentThread(comment);
32
+ * if (!thread || thread.deleted) return null;
33
+ * return <p>{thread.author?.getDisplayName()}: {thread.content} ({thread.replies.length} replies)</p>;
34
+ * ```
35
+ */
36
+ export declare const useCommentThread: (comment: IComment | null) => CommentThread | null;
37
+ //# sourceMappingURL=useCommentThread.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { IComment, ISheet } from '@sheetxl/sdk';
2
+ /**
3
+ * Options for {@link useSheetComments}.
4
+ */
5
+ export interface UseSheetCommentsOptions {
6
+ /**
7
+ * Only threads with this resolved state. Omit for every thread.
8
+ */
9
+ resolved?: boolean;
10
+ }
11
+ /**
12
+ * The threaded comments on a sheet, in reading order, kept current.
13
+ *
14
+ * @param sheet The sheet, or `null` for none.
15
+ * @param options {@link UseSheetCommentsOptions}
16
+ *
17
+ * @remarks
18
+ * Notes are not threads and are left out. The array keeps its identity until a comment on the
19
+ * sheet is added, removed, moved, edited, replied to or resolved.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * const open = useSheetComments(sheet, { resolved: false });
24
+ * return <ul>{open.map((comment) => <li key={comment.getId()}>{comment.getContent()}</li>)}</ul>;
25
+ * ```
26
+ */
27
+ export declare const useSheetComments: (sheet: ISheet | null, options?: UseSheetCommentsOptions) => IComment[];
28
+ //# sourceMappingURL=useSheetComments.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { MovableRendererProps } from '../movable';
3
+ export declare const ButtonRenderer: React.ComponentType<MovableRendererProps>;
4
+ export declare const CheckBoxRenderer: React.ComponentType<MovableRendererProps>;
5
+ export declare const OptionButtonRenderer: React.ComponentType<MovableRendererProps>;
6
+ export declare const ScrollBarRenderer: React.ComponentType<MovableRendererProps>;
7
+ export declare const SpinnerRenderer: React.ComponentType<MovableRendererProps>;
8
+ export declare const DropDownRenderer: React.ComponentType<MovableRendererProps>;
9
+ export declare const ListBoxRenderer: React.ComponentType<MovableRendererProps>;
10
+ export declare const GroupBoxRenderer: React.ComponentType<MovableRendererProps>;
11
+ export declare const LabelRenderer: React.ComponentType<MovableRendererProps>;
12
+ /** A kind with no look of its own: a neutral frame with its name. */
13
+ export declare const UnmodeledControlRenderer: React.ComponentType<MovableRendererProps>;
14
+ //# sourceMappingURL=FormControlRenderers.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './FormControlRenderers';
2
+ //# sourceMappingURL=index.d.ts.map