@sheetxl/react 0.1.98

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.
@@ -0,0 +1,1437 @@
1
+ import { AnchorLocation } from '@sheetxl/utils';
2
+ import { Bounds } from '@sheetxl/utils';
3
+ import { CellEditorProps } from '@sheetxl/grid-react';
4
+ import { CellEditorRefAttribute } from '@sheetxl/grid-react';
5
+ import { CellLayout } from '@sheetxl/utils-react';
6
+ import { CellRendererProps } from '@sheetxl/grid-react';
7
+ import { Context } from 'react';
8
+ import { CopyPasteProps } from '@sheetxl/utils-react';
9
+ import { CopyPasteResults } from '@sheetxl/utils-react';
10
+ import { default as default_2 } from 'react';
11
+ import { DraggableSyntheticListeners } from '@dnd-kit/core';
12
+ import { EditState } from '@sheetxl/grid-react';
13
+ import { FrozenEdge } from '@sheetxl/grid-react';
14
+ import { GridProps } from '@sheetxl/grid-react';
15
+ import { GridStyle } from '@sheetxl/grid-react';
16
+ import { GridSurfaceStyle } from '@sheetxl/grid-react';
17
+ import { GridView } from '@sheetxl/grid-react';
18
+ import { IAutoFilter } from '@sheetxl/sdk';
19
+ import { IBorder } from '@sheetxl/sdk';
20
+ import { ICell } from '@sheetxl/sdk';
21
+ import { ICellRange } from '@sheetxl/sdk';
22
+ import { ICellRanges } from '@sheetxl/sdk';
23
+ import { IChart } from '@sheetxl/sdk';
24
+ import { IColor } from '@sheetxl/sdk';
25
+ import { ICommand } from '@sheetxl/utils-react';
26
+ import { ICommands } from '@sheetxl/utils-react';
27
+ import { IGridElement } from '@sheetxl/grid-react';
28
+ import { IListener } from '@sheetxl/sdk';
29
+ import { IModule } from '@sheetxl/sdk';
30
+ import { IMovable } from '@sheetxl/sdk';
31
+ import { IMovableCollection } from '@sheetxl/sdk';
32
+ import { IMovableSelection } from '@sheetxl/sdk';
33
+ import { INamedCollection } from '@sheetxl/sdk';
34
+ import { IPicture } from '@sheetxl/sdk';
35
+ import { IRange } from '@sheetxl/sdk';
36
+ import { IScript } from '@sheetxl/sdk';
37
+ import { ISheet } from '@sheetxl/sdk';
38
+ import { ISheetHeader } from '@sheetxl/sdk';
39
+ import { ISheetView } from '@sheetxl/sdk';
40
+ import { IShowToolTipProperties } from '@sheetxl/utils-react';
41
+ import { IStyle } from '@sheetxl/sdk';
42
+ import { IStyleCollection } from '@sheetxl/sdk';
43
+ import { ITable } from '@sheetxl/sdk';
44
+ import { ITheme } from '@sheetxl/sdk';
45
+ import { IThemeCollection } from '@sheetxl/sdk';
46
+ import { ITransaction } from '@sheetxl/sdk';
47
+ import { IWorkbook } from '@sheetxl/sdk';
48
+ import { JSX } from 'react/jsx-runtime';
49
+ import { LicenseDetails } from '@sheetxl/sdk';
50
+ import { LicenseManager } from '@sheetxl/sdk';
51
+ import { Notifier } from '@sheetxl/utils-react';
52
+ import { ReferenceableClipboard } from '@sheetxl/utils';
53
+ import { ScrollableViewport } from '@sheetxl/utils-react';
54
+ import { ScrollbarOrientation } from '@sheetxl/utils-react';
55
+ import { ScrollButtonProps } from '@sheetxl/utils-react';
56
+ import { ScrollPaneProps } from '@sheetxl/utils-react';
57
+ import { SelectionProps } from '@sheetxl/grid-react';
58
+ import { SelectionResults } from '@sheetxl/grid-react';
59
+ import { StartEditEvent } from '@sheetxl/grid-react';
60
+ import { TopLeft } from '@sheetxl/utils';
61
+ import { Transform } from '@dnd-kit/utilities';
62
+ import { VirtualScrollbarProps } from '@sheetxl/utils-react';
63
+
64
+ declare interface Border {
65
+ readonly darkMode: boolean;
66
+ readonly autoColor: IColor;
67
+ readonly autoStyle: IBorder.StrokeStyle;
68
+ readonly quickBorder: Partial<IBorder.Properties>;
69
+ readonly schemeLookup: IColor.SchemeLookup;
70
+ createTemporaryBorder: (update: IBorder.Properties) => IBorder;
71
+ onBorderSelect: (border: Partial<IBorder.Properties>) => void;
72
+ }
73
+
74
+ export declare interface BorderOverlayProps {
75
+ /**
76
+ * Returns a list of visible cells.
77
+ *
78
+ * @param view - {@link GridView}
79
+ * @returns An array of visible coords
80
+ */
81
+ getVisibleCells: (view: GridView) => ({
82
+ coords: ICell.Coords;
83
+ value?: any;
84
+ range?: IRange.Coords;
85
+ })[];
86
+ /**
87
+ * For finding the border. The value is the value returned from getVisibleCells and the index is the index found.
88
+ *
89
+ * @param value - ?
90
+ * @param index - ?
91
+ * @returns The IBorder at the location.
92
+ */
93
+ getBorderAt: (value: any, index: number) => IBorder;
94
+ /**
95
+ * Allow users to customize border rendering.
96
+ * Note - This is wrapped in a single SVG so must be an SVG Element type (like a path).
97
+ */
98
+ borderRenderer?: (props: BorderRenderProps) => default_2.ReactNode;
99
+ defaultColor?: string;
100
+ darkMode?: boolean;
101
+ /**
102
+ * Force all rendering to be a single border line.
103
+ * Use for previews.
104
+ */
105
+ forceThinBorder?: boolean;
106
+ /**
107
+ * A special flag to shift large borders
108
+ */
109
+ shiftIfWide?: boolean;
110
+ }
111
+
112
+ export declare interface BorderRenderProps {
113
+ stroke: IBorder.IStroke;
114
+ range: IRange.Coords;
115
+ points: number[];
116
+ darkMode: boolean;
117
+ /**
118
+ * @deprecated
119
+ */
120
+ key: string;
121
+ /**
122
+ * Int Hint to tell the border the direction that it is rendering
123
+ */
124
+ isVertical?: boolean;
125
+ /**
126
+ * Shift the borders if greater than 2 width
127
+ */
128
+ shiftIfWide?: boolean;
129
+ /**
130
+ * Hint to tell render that we are rendering a small small
131
+ */
132
+ forceThinBorder?: boolean;
133
+ /**
134
+ * Used for generating corners for wide borders. If not provided then borders will simply overlap.
135
+ */
136
+ layout?: CellLayout;
137
+ /**
138
+ * Used for generating corners for wide borders. If not provided then borders will simply overlap.
139
+ */
140
+ intersections?: {
141
+ stroke: IBorder.IStroke;
142
+ range: IRange.Coords;
143
+ }[];
144
+ }
145
+
146
+ export declare interface BordersOverlayResults {
147
+ /**
148
+ * Array of functions that return components to overlay
149
+ */
150
+ overlay?: (view: GridView) => default_2.ReactNode;
151
+ }
152
+
153
+ export declare const ChartAreaIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
154
+
155
+ export declare const ChartAreaStackedIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
156
+
157
+ export declare const ChartAreaStackedPercentIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
158
+
159
+ export declare const ChartBarIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
160
+
161
+ export declare const ChartBarStackedIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
162
+
163
+ export declare const ChartBarStackedPercentIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
164
+
165
+ export declare const ChartBubble3DIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
166
+
167
+ export declare const ChartBubbleIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
168
+
169
+ export declare const ChartColumnIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
170
+
171
+ export declare const ChartColumnStackedIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
172
+
173
+ export declare const ChartColumnStackedPercentIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
174
+
175
+ /**
176
+ * Placeholder for chart editors.
177
+ */
178
+ export declare const ChartEditor: default_2.FC<ChartEditorProps & {
179
+ ref?: default_2.Ref<IChartEditorElement>;
180
+ }>;
181
+
182
+ export declare interface ChartEditorAttributes {
183
+ isChartEditor: () => true;
184
+ }
185
+
186
+ export declare interface ChartEditorProps extends MovableElementProps {
187
+ chart: IChart;
188
+ }
189
+
190
+ export declare const ChartLineIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
191
+
192
+ export declare const ChartLineMarkersIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
193
+
194
+ export declare const ChartLineStackedIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
195
+
196
+ export declare const ChartLineStackedMarkersIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
197
+
198
+ export declare const ChartLineStackedPercentIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
199
+
200
+ export declare const ChartLineStackedPercentMarkersIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
201
+
202
+ export declare const ChartPieDoughnutIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
203
+
204
+ export declare const ChartPieIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
205
+
206
+ export declare const ChartScatterLinesIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
207
+
208
+ export declare const ChartScatterLinesMarkersIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
209
+
210
+ export declare const ChartScatterLinesMarkersSmoothIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
211
+
212
+ export declare const ChartScatterLinesSmoothIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
213
+
214
+ export declare const ChartScatterMarkersIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
215
+
216
+ /**
217
+ * For providing Adjustable Color Commands additional rendering capabilities.
218
+ */
219
+ declare interface Color {
220
+ readonly darkMode: boolean;
221
+ readonly schemeLookup: IColor.SchemeLookup;
222
+ readonly autoColor: IColor;
223
+ readonly quickColor?: IColor;
224
+ recentColors: readonly IColor[] | (() => readonly IColor[]);
225
+ addRecentColor: (color: IColor) => readonly IColor[];
226
+ clearRecentColors: () => void;
227
+ onColorSelect: (color: IColor) => void;
228
+ }
229
+
230
+ export declare namespace CommandContext {
231
+ export {
232
+ Color,
233
+ Border,
234
+ NamedStyle,
235
+ Table,
236
+ Theme,
237
+ NamedReference
238
+ }
239
+ }
240
+
241
+ export declare const CornerTriangle: default_2.MemoExoticComponent<(props: CornerTriangleProps) => JSX.Element>;
242
+
243
+ export declare interface CornerTriangleProps extends default_2.SVGProps<SVGSVGElement> {
244
+ /**
245
+ * @defaultValue AnchorLocation.TopLeft
246
+ */
247
+ anchorLocation?: AnchorLocation;
248
+ /**
249
+ * defaults based on corner
250
+ */
251
+ fill?: string;
252
+ /**
253
+ * The right sides of the triangle.
254
+ * @defaultValue 7
255
+ */
256
+ size?: number;
257
+ /**
258
+ * inset within the cell
259
+ * @defaultValue 1
260
+ */
261
+ inset?: number;
262
+ cellWidth?: number;
263
+ cellHeight?: number;
264
+ darkMode?: boolean;
265
+ pathProps?: default_2.SVGProps<SVGPathElement>;
266
+ }
267
+
268
+ export declare const createCellEditStateFromCell: (clean: () => ICell, dirty?: string) => EditState<() => ICell, string>;
269
+
270
+ export declare namespace DateUtils {
271
+ export {
272
+ nowWithPrecision
273
+ }
274
+ }
275
+
276
+ /**
277
+ * A list of font sizes for showing in drop downs.
278
+ */
279
+ declare const DefaultFontSizes: readonly number[];
280
+
281
+ export declare const DocThemesContext: Context<IThemeCollection>;
282
+
283
+ /**
284
+ * This component takes a `themes` prop.
285
+ * It makes the `themes` available down the React tree thanks to React context.
286
+ * This component should preferably be used at **the root of your component tree**.
287
+ */
288
+ export declare const DocThemesProvider: (props: DocThemesProviderProps) => JSX.Element;
289
+
290
+ export declare interface DocThemesProviderProps {
291
+ /**
292
+ * A custom list of DocThemes to use.
293
+ */
294
+ themes: IThemeCollection;
295
+ children: default_2.ReactElement<any, string | default_2.JSXElementConstructor<any>>;
296
+ }
297
+
298
+ export declare const EditableLabel: default_2.FC<EditableLabelProps & EditableLabelRefAttribute>;
299
+
300
+ export declare interface EditableLabelAttributes {
301
+ startEdit(): void;
302
+ cancel(): void;
303
+ }
304
+
305
+ export declare interface EditableLabelProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "onSubmit" | "onChange"> {
306
+ value?: string;
307
+ styleHover?: default_2.CSSProperties;
308
+ dragging?: boolean;
309
+ disabled?: boolean;
310
+ readOnly?: boolean;
311
+ maxLength?: number;
312
+ onChange?: (value: string) => void;
313
+ onSubmit?: (value: string) => boolean | void;
314
+ onCancel?: () => void;
315
+ notifier?: Notifier;
316
+ createInput?: (props: any) => default_2.ReactElement<HTMLInputElement>;
317
+ }
318
+
319
+ export declare type EditableLabelRefAttribute = {
320
+ ref?: default_2.Ref<IEditableLabelElement>;
321
+ };
322
+
323
+ export declare interface EditorStateAndCoords<CT, DT> {
324
+ sheet: ISheet;
325
+ coords: ICell.Coords;
326
+ editState: EditState<CT, DT>;
327
+ }
328
+
329
+ /**
330
+ * Placeholder for movable frames.
331
+ */
332
+ export declare const EmptyFrame: default_2.FC<EmptyFrameProps & {
333
+ ref?: default_2.Ref<IEmptyFrameElement>;
334
+ }>;
335
+
336
+ export declare interface EmptyFrameAttributes {
337
+ isEmptyFrame: () => true;
338
+ }
339
+
340
+ export declare interface EmptyFrameProps extends MovableElementProps {
341
+ description: string;
342
+ }
343
+
344
+ /**
345
+ * The default FilterButton
346
+ */
347
+ export declare const FilterButton: (props: FilterButtonProps) => default_2.ReactElement;
348
+
349
+ /**
350
+ * Property for the filter button
351
+ */
352
+ export declare interface FilterButtonProps extends default_2.HTMLAttributes<HTMLElement> {
353
+ renderBounds: Bounds;
354
+ zoom: number;
355
+ disabled: boolean;
356
+ darkMode: boolean;
357
+ filter: IAutoFilter.IColumn;
358
+ onFilterButtonMouseDown: (e: default_2.MouseEvent<HTMLDivElement, MouseEvent>, filter: IAutoFilter.IColumn) => void;
359
+ }
360
+
361
+ /**
362
+ * Searches an array of numbers for the next value.
363
+ */
364
+ declare const findNextFontSize: (size: number, increase?: boolean, steps?: readonly number[]) => number;
365
+
366
+ export declare namespace FontUtils {
367
+ export {
368
+ DefaultFontSizes,
369
+ findNextFontSize
370
+ }
371
+ }
372
+
373
+ export declare interface IChartEditorElement extends HTMLDivElement, ChartEditorAttributes {
374
+ }
375
+
376
+ /**
377
+ * Type returned via ref property
378
+ */
379
+ export declare interface IEditableLabelElement extends HTMLDivElement, EditableLabelAttributes {
380
+ }
381
+
382
+ export declare interface IEmptyFrameElement extends HTMLDivElement, EmptyFrameAttributes {
383
+ }
384
+
385
+ export declare interface IMovableAreaElement extends HTMLDivElement, MovableAreaAttributes {
386
+ }
387
+
388
+ export declare interface IPictureEditorElement extends HTMLDivElement, PictureEditorAttributes {
389
+ }
390
+
391
+ /**
392
+ * Used by the Script editor to interface with the repo for the Scripts
393
+ */
394
+ export declare namespace IScriptEditor {
395
+ /**
396
+ * This is used by the Monaco Script editor and the command manager to enabled scripts to be
397
+ * execute and saved.
398
+ */
399
+ export interface Context {
400
+ /**
401
+ * Add listeners to the container.
402
+ *
403
+ * @remarks
404
+ * If this throws a listener save will be aborted.
405
+ */
406
+ addContainerListener(listener: IScriptEditor.ContainerListener): IListener.Remove;
407
+ /**
408
+ * Set by the script editor when a function is selected. This may be null.
409
+ */
410
+ setSelectedFunction(selected: Promise<IScriptEditor.SelectedFunction | null>): void;
411
+ /**
412
+ * Set by the script editor when a function is selected. This may be null.
413
+ */
414
+ quickInsertFunction(functionName: string): void;
415
+ /**
416
+ * Return the selected.
417
+ *
418
+ * @remarks
419
+ * This is done because multiple clients share the same Context.
420
+ */
421
+ getSelectedFunction: () => Promise<IScriptEditor.SelectedFunction | null> | null;
422
+ /**
423
+ * The the script editor.
424
+ */
425
+ setEditor(editor: IScriptEditor.Editor): void;
426
+ /**
427
+ * Returns the script editor.
428
+ * @remarks
429
+ * If the editor is not loaded this will return null.
430
+ */
431
+ getEditor: () => IScriptEditor.Editor | null;
432
+ /**
433
+ * Decode a range from an address. Will return null if unable to decode.
434
+ * @remarks
435
+ * Used by the tooltips and range highlighting.
436
+ */
437
+ getRanges: (address: IWorkbook.RangesAddress) => ICellRanges | null;
438
+ /**
439
+ * Returns the IFunctionDescriptor Executable.
440
+ *
441
+ * @remarks
442
+ * This is used to enable the UI to display the available functions.
443
+ */
444
+ getScripts(): IScript;
445
+ /**
446
+ * Save the source.
447
+ *
448
+ * @param source The source to save.
449
+ */
450
+ saveSource(source: string): Promise<IModule>;
451
+ /**
452
+ * Returns if the script is readonly.
453
+ */
454
+ isReadonly(): boolean;
455
+ }
456
+ export interface ContainerListener {
457
+ /**
458
+ * Hook to listen for save events.
459
+ */
460
+ onBeforeSave?: () => Promise<void> | void;
461
+ /**
462
+ * If the status of the script has changed.
463
+ */
464
+ onReadonlyChange?: () => void;
465
+ /**
466
+ * If the script has changed.
467
+ */
468
+ onScriptChange?: () => void;
469
+ }
470
+ /**
471
+ * Implemented by the editor to allow for ui interactions.
472
+ */
473
+ export interface Editor {
474
+ /**
475
+ * Insert a snippet of text into the editor.
476
+ *
477
+ * @remarks
478
+ * Inserts the snippet before the current function.
479
+ */
480
+ insertSnippet: (snippet: string) => void;
481
+ }
482
+ /**
483
+ * The current function that is selected.
484
+ */
485
+ export interface SelectedFunction {
486
+ /**
487
+ * The selected function.
488
+ */
489
+ name: string;
490
+ /**
491
+ * Needed for JIT.
492
+ */
493
+ source: string;
494
+ }
495
+ /**
496
+ * Provides status of the editor.
497
+ */
498
+ export interface Status {
499
+ /**
500
+ * The message to display.
501
+ */
502
+ message: string;
503
+ /**
504
+ * The cursor position.
505
+ */
506
+ cursor: string;
507
+ /**
508
+ * If the script is unsaved.
509
+ */
510
+ dirty: boolean;
511
+ }
512
+ }
513
+
514
+ /**
515
+ * Type returned via ref property
516
+ */
517
+ export declare interface IScriptEditorElement extends ScriptEditorAttributes, HTMLDivElement {
518
+ }
519
+
520
+ /**
521
+ * Type returned via ref property
522
+ */
523
+ export declare interface ISheetElement extends HTMLDivElement, SheetAttributes {
524
+ }
525
+
526
+ /**
527
+ * Type returned via ref property
528
+ */
529
+ declare interface ISheetHeaderElement extends HTMLDivElement, SheetHeaderAttributes {
530
+ }
531
+
532
+ export declare const Item: default_2.NamedExoticComponent<Props & default_2.RefAttributes<HTMLDivElement>>;
533
+
534
+ export { LicenseDetails }
535
+
536
+ export { LicenseManager }
537
+
538
+ export declare const LogoNoPaddingIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
539
+
540
+ export declare const LogoTextNoPaddingIcon: (props: default_2.SVGProps<SVGSVGElement>) => JSX.Element;
541
+
542
+ export declare const MovableArea: default_2.FC<MovableAreaProps & {
543
+ ref?: default_2.Ref<IMovableAreaElement>;
544
+ }>;
545
+
546
+ export declare interface MovableAreaAttributes {
547
+ /**
548
+ * Will put focus on the the movable object.
549
+ * @remarks
550
+ * This does not handle scrolling. This must be done by the virtual container.
551
+ */
552
+ focusMovable: (movable: IMovable) => Promise<boolean>;
553
+ /**
554
+ * For runtime introspection.
555
+ */
556
+ isMovableArea: () => true;
557
+ }
558
+
559
+ export declare interface MovableAreaProps extends default_2.HTMLAttributes<HTMLDivElement> {
560
+ /**
561
+ * The container to retrieve movable objects
562
+ */
563
+ movables: IMovableCollection;
564
+ /**
565
+ * The container view to retrieve selection information about the movables.
566
+ */
567
+ movablesView: IMovableSelection;
568
+ /**
569
+ * Callback to render the movable.
570
+ *
571
+ * @param props MovableElementProps
572
+ * @returns A React Element representing the IMovable.
573
+ */
574
+ renderMovable: (props: MovableElementProps) => default_2.ReactElement;
575
+ /**
576
+ * The gridView
577
+ */
578
+ view: GridView;
579
+ /**
580
+ * If provided this will be used start and stop transactions on being/end move.
581
+ */
582
+ transactional: ITransaction.ITransactional;
583
+ /**
584
+ * Called when the final movable is unselected.
585
+ */
586
+ onUnFocus?: () => void;
587
+ /**
588
+ * Called when the final movable is unselected.
589
+ */
590
+ onFocus?: () => void;
591
+ /**
592
+ * If disabled then movable selection will not be allowed and frames will be passed disabled.
593
+ * @defaultValue false
594
+ */
595
+ disabled?: boolean;
596
+ /**
597
+ * If disabled then unable to move.
598
+ * @defaultValue false
599
+ */
600
+ disableDrag?: boolean;
601
+ /**
602
+ * If disabled then unable to resize.
603
+ * @defaultValue false
604
+ */
605
+ disableResize?: boolean;
606
+ /**
607
+ * Provider the anchor element to render.
608
+ */
609
+ renderDirections?: string[];
610
+ /**
611
+ * Called after the first render of a movable.
612
+ */
613
+ onFirstRender?: () => void;
614
+ }
615
+
616
+ export declare interface MovableElementProps extends React.HTMLAttributes<HTMLElement> {
617
+ movable?: IMovable;
618
+ /**
619
+ * The view to use for the movable.
620
+ * // TODO - this should not be the GridView, rather a simpler interface that doesn't have a grid dependency.
621
+ */
622
+ view: GridView;
623
+ /**
624
+ * Called when the movable is hidden from view.
625
+ *
626
+ * @remarks
627
+ * * If this returns a false the movable will not be unmounted but will
628
+ * still have a style opacity property of 0 (and pointerEvents of none).
629
+ * * Keeping a movable mounted is useful for elements that take a long of time to render but
630
+ * increase the memory footprint of the application.
631
+ */
632
+ onHide: (hide: (movable: IMovable) => boolean | Promise<boolean> | void) => void;
633
+ /**
634
+ * Call when the movable is returned to the view.
635
+ */
636
+ onShow: (show: (movable: IMovable) => void) => void;
637
+ /**
638
+ * If true then the component is disabled.
639
+ * @defaultValue false
640
+ * @remarks
641
+ * To see if an element is readonly check the IMovable.isProtected() method.
642
+ */
643
+ disabled?: boolean;
644
+ /**
645
+ * Indicator for dragging.
646
+ * @defaultValue false
647
+ */
648
+ isDragging?: boolean;
649
+ }
650
+
651
+ declare interface NamedReference {
652
+ /** used when creating new names */
653
+ selection: () => ICellRanges;
654
+ getNames: () => INamedCollection;
655
+ }
656
+
657
+ declare interface NamedStyle {
658
+ readonly named: () => IStyle.INamed;
659
+ readonly styles: () => IStyleCollection;
660
+ readonly bodyStyle: () => GridSurfaceStyle;
661
+ createTemporaryCell: (update: ICell.Update) => ICell;
662
+ }
663
+
664
+ /**
665
+ * Returns Date.now() rounded to a nearest time.
666
+ *
667
+ * @param precision The precision of time. Set to 1 if exact.
668
+ * @defaultValue The nearest minute.
669
+ */
670
+ declare const nowWithPrecision: (precision?: number) => Date;
671
+
672
+ export declare const PictureEditor: default_2.FC<PictureEditorProps & {
673
+ ref?: default_2.Ref<IPictureEditorElement>;
674
+ }>;
675
+
676
+ export declare interface PictureEditorAttributes {
677
+ isPictureEditor: () => true;
678
+ }
679
+
680
+ export declare interface PictureEditorProps extends MovableElementProps {
681
+ /**
682
+ * The underlying model for the picture.
683
+ */
684
+ picture: IPicture;
685
+ /**
686
+ * Usable for alt text or loading
687
+ */
688
+ description?: string;
689
+ /**
690
+ * Provide an optional loading panel.
691
+ */
692
+ loadingPanel?: default_2.ReactNode;
693
+ }
694
+
695
+ declare interface Props {
696
+ dragOverlay?: boolean;
697
+ color?: string;
698
+ disabled?: boolean;
699
+ dragging?: boolean;
700
+ handle?: boolean;
701
+ height?: number;
702
+ index?: number;
703
+ fadeIn?: boolean;
704
+ transform?: Transform | null;
705
+ listeners?: DraggableSyntheticListeners;
706
+ sorting?: boolean;
707
+ style?: default_2.CSSProperties;
708
+ transition?: string | null;
709
+ wrapperStyle?: default_2.CSSProperties;
710
+ value: default_2.ReactNode;
711
+ onRemove?(): void;
712
+ renderItem?(args: {
713
+ dragOverlay: boolean;
714
+ dragging: boolean;
715
+ sorting: boolean;
716
+ index: number | undefined;
717
+ fadeIn: boolean;
718
+ listeners: DraggableSyntheticListeners;
719
+ ref: default_2.Ref<HTMLElement>;
720
+ style: default_2.CSSProperties | undefined;
721
+ transform: Props['transform'];
722
+ transition: Props['transition'];
723
+ value: Props['value'];
724
+ }): default_2.ReactElement;
725
+ }
726
+
727
+ declare interface Props_2 {
728
+ children: default_2.ReactNode;
729
+ columns?: number;
730
+ style?: default_2.CSSProperties;
731
+ horizontal?: boolean;
732
+ }
733
+
734
+ export declare interface RangeContainer {
735
+ getRange(address: ICellRange.Address, options?: ICellRange.GetRangeOptions): ICellRange;
736
+ }
737
+
738
+ export declare const Row: default_2.NamedExoticComponent<Props_2 & default_2.RefAttributes<HTMLDivElement>>;
739
+
740
+ /**
741
+ * This tracks the selection of the sheet and
742
+ * updates the a named range editor and a sheet cell editor.
743
+ */
744
+ export declare const ScriptEditor: default_2.FC<ScriptEditorProps & ScriptEditorAttribute>;
745
+
746
+ export declare type ScriptEditorAttribute = {
747
+ ref?: default_2.Ref<IScriptEditorElement>;
748
+ };
749
+
750
+ export declare interface ScriptEditorAttributes {
751
+ getEditor(): IScriptEditor.Editor;
752
+ isScriptEditorElement(): true;
753
+ close(): void;
754
+ }
755
+
756
+ /**
757
+ * Move this to another project. Automation-Editor
758
+ */
759
+ export declare interface ScriptEditorProps extends default_2.HTMLAttributes<HTMLElement> {
760
+ /**
761
+ * Command Map
762
+ */
763
+ commands?: ICommands.IGroup;
764
+ /**
765
+ * If the values can be modified
766
+ */
767
+ readOnly?: boolean;
768
+ /**
769
+ * Called when the user request a close.
770
+ */
771
+ onClose?: () => void;
772
+ /**
773
+ * Allows for component to be autoFocused.
774
+ */
775
+ /**
776
+ * If provided then a custom loading panel will be used.
777
+ */
778
+ loadingPanel?: default_2.ReactElement;
779
+ /**
780
+ * Called for status change events.
781
+ */
782
+ onStatusChange?: (status: Partial<IScriptEditor.Status>) => void;
783
+ /**
784
+ * Monaco theme
785
+ */
786
+ darkMode?: boolean;
787
+ }
788
+
789
+ export declare type SheetAttributes = {
790
+ getGridElement: () => IGridElement;
791
+ getRowHeaderElement: () => ISheetHeaderElement;
792
+ getColumnHeaderElement: () => ISheetHeaderElement;
793
+ rowHeaderHeight: () => number;
794
+ colHeaderWidth: () => number;
795
+ startEdit(event?: StartEditEvent): void;
796
+ submitEdit(): void;
797
+ cancelEdit(): void;
798
+ isEditing: boolean;
799
+ contains(element: Node | null): boolean;
800
+ invalidate: (coords?: ICell.Coords | null) => void;
801
+ /**
802
+ * Focus the sheet
803
+ */
804
+ focusSheet(options?: FocusOptions): void;
805
+ /**
806
+ * Focus a specific float.
807
+ * If not provided will focus the first selected float.
808
+ *
809
+ * @remarks
810
+ * The focusMovable does not scroll.
811
+ * TODO - have this honor focus scroll options.
812
+ */
813
+ focusMovable(movable?: IMovable): Promise<boolean>;
814
+ getSheet: () => ISheet;
815
+ /**
816
+ * For runtime introspection
817
+ */
818
+ isSheetElement: () => true;
819
+ };
820
+
821
+ /**
822
+ * SheetCellEditor
823
+ * Controlled cell editor for updating state.
824
+ */
825
+ export declare const SheetCellEditor: default_2.FC<SheetCellEditorProps & CellEditorRefAttribute>;
826
+
827
+ export declare interface SheetCellEditorProps extends CellEditorProps<() => ICell, string> {
828
+ /**
829
+ * Used for commands will be removed.
830
+ */
831
+ sheet?: ISheet;
832
+ /**
833
+ * Used for commands will be removed.
834
+ */
835
+ activeCoords?: ICell.Coords | null;
836
+ /**
837
+ * The parent commandGroup
838
+ */
839
+ commands?: ICommands.IGroup;
840
+ /**
841
+ * Styling for the grid that this editor is one.
842
+ * This is used to determine darkMode only but should be used for other items..
843
+ */
844
+ bodyStyle?: GridSurfaceStyle;
845
+ /**
846
+ * Returns the number of lines to display. The minimum is 1.
847
+ * @defaultValue 'The number of lines required to display the text'
848
+ */
849
+ linesVisible?: number;
850
+ }
851
+
852
+ /**
853
+ * CellRender that has advanced rendering for an ICell.
854
+ * Some of the features are:
855
+
856
+ * 1. Fill (Solid, Gradient, Pattern)
857
+ * 2. Horizontal Alignment (Left, Right, Center, Justify)
858
+ * 3. Vertical Alignment (Top, Middle, Bottom)
859
+ * 4. Spacing formatting (*, ?)
860
+ * 5. Decimal rounding
861
+ * 6. Overflow Character
862
+ * 7. Text Wrapping
863
+ * 8. Text Rotation
864
+ * 8. Indentions
865
+ * 9. Text Color
866
+ * 10. Underline (Accounting, Standard, Double, Single)
867
+ * 11. Scaling
868
+ * 12. Super/Subscript
869
+ * 13. Indicators (Warning, Comments, Error, etc)
870
+ * 14. Filter buttons
871
+ * 15. Formulas
872
+ *
873
+ * @param props
874
+ */
875
+ export declare const SheetCellRenderer: default_2.FC<SheetCellRendererProps>;
876
+
877
+ export declare interface SheetCellRendererProps extends CellRendererProps<ICell> {
878
+ /**
879
+ * If true, prefer to show the formulas over values
880
+ */
881
+ showFormulas?: boolean;
882
+ /**
883
+ * If true, show zero values
884
+ */
885
+ showZeros?: boolean;
886
+ /**
887
+ * Ability to query the theme colors.
888
+ * Note - There are also css variables that can be used to style using doc theme colors
889
+ * @see https://www.sheetxl.com/docs
890
+ */
891
+ docTheme?: ITheme;
892
+ /**
893
+ * Generalize application theming. The docTheme is a specific theme for the sheet.
894
+ */
895
+ bodyStyle?: GridSurfaceStyle;
896
+ /**
897
+ * An optimization that tells the render all of the styling is normal. And doesn't need to
898
+ * be overwritten.
899
+ */
900
+ normalStyle?: IStyle;
901
+ /**
902
+ * Callback for when a link has been clicked.
903
+ *
904
+ * @param event - The mouse event
905
+ */
906
+ onLinkMouseDown?: (event: default_2.MouseEvent<HTMLDivElement, MouseEvent>) => void;
907
+ /**
908
+ * Callback for when a filter has been clicked.
909
+ *
910
+ * @param event - The mouse event
911
+ */
912
+ onFilterButtonMouseDown?: (event: default_2.MouseEvent<HTMLDivElement, MouseEvent>, filter: IAutoFilter.IColumn) => void;
913
+ /**
914
+ * Custom properties for the filter button
915
+ */
916
+ filterButtonProps?: FilterButtonProps;
917
+ /**
918
+ * Callback for creating a custom filter button.
919
+ *
920
+ * @returns A React Element representing the FilterButton.
921
+ */
922
+ createFilterButton?: (props: FilterButtonProps) => default_2.ReactElement;
923
+ }
924
+
925
+ export declare interface SheetCopyPasteProps extends Omit<CopyPasteProps, "source" | "target"> {
926
+ /**
927
+ * Sheet element
928
+ */
929
+ element: () => HTMLElement;
930
+ sheet: ISheet;
931
+ sheetView: ISheetView;
932
+ /**
933
+ * Allow users to customize selected cells design
934
+ */
935
+ selectionRenderer?: (props: SelectionProps) => default_2.ReactNode;
936
+ /**
937
+ * Color for the foreground
938
+ */
939
+ copyForegroundColor?: string;
940
+ cutForegroundColor?: string;
941
+ /**
942
+ * Color for the background
943
+ */
944
+ copyBackgroundColor?: string;
945
+ cutBackgroundColor?: string;
946
+ notifier?: Notifier;
947
+ }
948
+
949
+ export declare interface SheetCopyPasteResults extends CopyPasteResults {
950
+ /**
951
+ * Array of functions that return components to overlay
952
+ */
953
+ overlays?: (view: GridView) => default_2.ReactNode[];
954
+ }
955
+
956
+ /**
957
+ * @see ISheet
958
+ *
959
+ * UI representation for ISheet.
960
+ *
961
+ */
962
+ export declare const SheetElement: default_2.FC<SheetProps & SheetRefAttribute>;
963
+
964
+ declare type SheetHeaderAttributes = {
965
+ forceRender: () => void;
966
+ getGridElement: () => IGridElement;
967
+ };
968
+
969
+ /**
970
+ * TODO - We may not need the grid ref if we use the headers directly to measure.
971
+ */
972
+ declare interface SheetHeaderProps extends default_2.HTMLAttributes<HTMLDivElement> {
973
+ /**
974
+ * The underlying data model for the SheetHeader.
975
+ */
976
+ sheetHeader: ISheetHeader;
977
+ /**
978
+ * Access grid functions
979
+ */
980
+ gridRef: default_2.RefObject<IGridElement | null>;
981
+ /**
982
+ * Allow the sheet to be accessed.
983
+ */
984
+ sheetElement: ISheetElement;
985
+ /**
986
+ * The height or width in the opposite direction (for example a column headers height)
987
+ */
988
+ oppositeSize: number;
989
+ containerWidth: number;
990
+ containerHeight: number;
991
+ /**
992
+ * FrozenEdge
993
+ */
994
+ freezeStart?: number | FrozenEdge;
995
+ /**
996
+ * Parent commands for the sheet
997
+ */
998
+ commands?: ICommands.IGroup;
999
+ /**
1000
+ * The selectionResults from use hook
1001
+ */
1002
+ selectionMain?: SelectionResults;
1003
+ gridStyle?: GridStyle;
1004
+ /**
1005
+ * @see HeaderRenderer#verticalPadding
1006
+ */
1007
+ verticalPadding?: number;
1008
+ /**
1009
+ * @see HeaderRenderer#horizontalPadding
1010
+ */
1011
+ horizontalPadding?: number;
1012
+ /** Fired when a contentMenu is requested */
1013
+ onSheetContextMenu?: (location: SheetLocation) => void;
1014
+ onResizeHeadersStart?: (index: number, prevSize: number, description: string) => void;
1015
+ /**
1016
+ * Called during resize of a header.
1017
+ * If there is a negative newSize then these headers will have been hidden
1018
+ * This is for the specific header being resized.
1019
+ * Note - Other headers may also have been resized if hiding
1020
+ */
1021
+ onResizeHeaders?: (index: number, newSize: number, prevSize: number) => void;
1022
+ /**
1023
+ * Called after resize of a header.
1024
+ * If there is a positive newSize and a single selection then those
1025
+ * headers will also have been resized.
1026
+ *
1027
+ * Note - Other colHeaderRuns may also have been resized if expanding
1028
+ * Note - If this was autoFit then newSize and prevSize will be null.
1029
+ */
1030
+ onResizeHeadersEnd?: (index: number, newSize: number, description: string) => void;
1031
+ onResizeHeadersDown?: (index: number, size: number) => void;
1032
+ onResizeHeadersUp?: (index: number) => void;
1033
+ /**
1034
+ * Override the default headerText. If not provided then typical Sheet labeling is used.
1035
+ */
1036
+ headerText?: (index: number) => string;
1037
+ /**
1038
+ * Scroll location
1039
+ */
1040
+ scrollPoint?: Partial<TopLeft>;
1041
+ /**
1042
+ * Callback when selection is manually started
1043
+ */
1044
+ onSelectionStart?: () => void;
1045
+ /**
1046
+ * Callback when selection is manually changed
1047
+ */
1048
+ onSelectionEnd?: () => void;
1049
+ }
1050
+
1051
+ export declare interface SheetLocation {
1052
+ clientX: number;
1053
+ clientY: number;
1054
+ originalEvent?: any;
1055
+ clientWidth?: number;
1056
+ clientHeight?: number;
1057
+ rowIndex?: number;
1058
+ colIndex?: number;
1059
+ }
1060
+
1061
+ export declare interface SheetPasteOptions extends ReferenceableClipboard.PasteOptions, ICellRange.CopyOptions {
1062
+ }
1063
+
1064
+ export declare interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
1065
+ sheet: ISheet;
1066
+ gridStyle?: GridStyle;
1067
+ headersStyle?: GridStyle;
1068
+ /**
1069
+ * Fire when a contentMenu is requested
1070
+ */
1071
+ onSheetContextMenu?: (location: SheetLocation) => void;
1072
+ /**
1073
+ * Show the row headers
1074
+ */
1075
+ showRowHeaders?: boolean;
1076
+ /**
1077
+ * Properties for the row headers
1078
+ */
1079
+ rowHeaderProps?: Partial<SheetHeaderProps>;
1080
+ /**
1081
+ * Show the column headers
1082
+ */
1083
+ showColumnHeaders?: boolean;
1084
+ /**
1085
+ * Properties for the column headers
1086
+ */
1087
+ columnHeaderProps?: Partial<SheetHeaderProps>;
1088
+ /**
1089
+ * Show the scrollbars
1090
+ */
1091
+ showScrollbars?: boolean;
1092
+ /**
1093
+ * Allow for customizations of scrollbar
1094
+ */
1095
+ scrollPaneProps?: ScrollPaneProps;
1096
+ /**
1097
+ * Fired when the view port changes.
1098
+ * This is in pixel coordinates and slightly different then viewable cells because off screen location bounds could change
1099
+ */
1100
+ onViewportChange?: (view: ScrollableViewport) => void;
1101
+ /**
1102
+ * Callback when a paste is executed
1103
+ */
1104
+ onMoveCell?: (from: ICell.Coords, to: ICell.Coords, cell?: ICell.Update) => ICell.Update;
1105
+ /**
1106
+ * Called once when the sheet has been loaded but before it is rendered.
1107
+ */
1108
+ onElementLoad?: () => void;
1109
+ notifier?: Notifier;
1110
+ /**
1111
+ * Inject custom editors based on a cell.
1112
+ * This should not return null but rather can canEdit.
1113
+ * This is called during placement after scrolling and other bookkeeping has occurred
1114
+ */
1115
+ getCellEditor?: (props: CellEditorProps<() => ICell, string> & CellEditorRefAttribute, coords: ICell.Coords) => React.ReactElement<CellEditorProps<() => ICell, string> & CellEditorRefAttribute>;
1116
+ /**
1117
+ * Parent commands for the sheet
1118
+ */
1119
+ commands?: ICommands.IGroup;
1120
+ /**
1121
+ * Notify that there is a new repeatable command
1122
+ */
1123
+ onRepeatCommandChange?: (command: ICommand<any, any>) => void;
1124
+ /**
1125
+ * Fixed component that is layered within the viewport.
1126
+ *
1127
+ * @remarks Useful for dialogs and items that you want to place relative to the grid.
1128
+ */
1129
+ viewportComponent?: React.ReactNode;
1130
+ /**
1131
+ * Render components for movable elements.
1132
+ * If not provided movables will not be rendered.
1133
+ *
1134
+ * @param props - {@link MovableElementProps}
1135
+ * @returns A React Element representing the IMovable.
1136
+ */
1137
+ renderMovable?: (props: MovableElementProps) => React.ReactElement;
1138
+ /**
1139
+ * Render an element directly onto a gridView.
1140
+ */
1141
+ overlays?: ((view: GridView) => React.ReactNode)[];
1142
+ /**
1143
+ * To show the tooltip
1144
+ * @param properties
1145
+ */
1146
+ onShowTooltip?: (properties: IShowToolTipProperties) => void;
1147
+ onShowColumnTooltip?: (properties: IShowToolTipProperties) => void;
1148
+ onShowRowTooltip?: (properties: IShowToolTipProperties) => void;
1149
+ onCloseTooltip?: () => void;
1150
+ /**
1151
+ * Customize the grid.
1152
+ * @remarks
1153
+ * Not all props are passed through.
1154
+ */
1155
+ gridProps: GridProps;
1156
+ /**
1157
+ * Allow for custom rendering of cell props.
1158
+ * @remarks
1159
+ * This is used to customize filterButton popup action and any other customizations desired.
1160
+ * This does not invalidate the rendering
1161
+ */
1162
+ cellRenderProps: Partial<SheetCellRendererProps>;
1163
+ }
1164
+
1165
+ export declare type SheetRefAttribute = {
1166
+ ref?: React.Ref<ISheetElement>;
1167
+ };
1168
+
1169
+ /**
1170
+ * For elements that also need the ref. Less common but some factory renderers
1171
+ */
1172
+ export declare interface SheetRefProps extends SheetProps {
1173
+ ref?: React.Ref<HTMLDivElement>;
1174
+ }
1175
+
1176
+ export declare const SheetScrollbar: default_2.NamedExoticComponent<SheetScrollbarProps & default_2.RefAttributes<HTMLElement>>;
1177
+
1178
+ export declare interface SheetScrollbarProps extends VirtualScrollbarProps {
1179
+ /**
1180
+ * The `ISheet` for the given scrollbar.
1181
+ */
1182
+ sheet: ISheet;
1183
+ /**
1184
+ * The direction of the scrollbar.
1185
+ */
1186
+ orientation: ScrollbarOrientation;
1187
+ /**
1188
+ * @defaultValue false
1189
+ */
1190
+ showCustomScrollButtons?: boolean;
1191
+ /**
1192
+ * To show the tooltip
1193
+ * @param properties
1194
+ */
1195
+ onShowTooltip?: (properties: IShowToolTipProperties) => void;
1196
+ /**
1197
+ * Called to close the tooltip. Required is onShowTip is provided
1198
+ */
1199
+ onCloseTooltip?: () => void;
1200
+ }
1201
+
1202
+ /**
1203
+ * Render a grid border using a border property as an input. Useful
1204
+ * when wanting to render either a single cell or a border template.
1205
+ * All cells are the same height/width.
1206
+ */
1207
+ export declare const StaticBorderRenderer: default_2.MemoExoticComponent<(props: StaticBorderRendererProps) => JSX.Element>;
1208
+
1209
+ export declare interface StaticBorderRendererProps extends default_2.HTMLAttributes<HTMLDivElement> {
1210
+ /**
1211
+ * Returns a border for the given value and index.
1212
+ */
1213
+ getBorderAt?: (value: any, index: number) => IBorder;
1214
+ rowCount?: number;
1215
+ columnCount?: number;
1216
+ /**
1217
+ * Allow for the border width to be set.
1218
+ * If this is not set then the border width will be the same as the cell size.
1219
+ * Note - Measuring the child will need to wait until a render which can cause a flicker
1220
+ * @defaultValue childSize
1221
+ */
1222
+ width?: number;
1223
+ /**
1224
+ * Allow for the border height to be set.
1225
+ * If this is not set then the border width will be the same as the cell size.
1226
+ * Note - Measuring the child will need to wait until a render which can cause a flicker
1227
+ * @defaultValue childSize
1228
+ */
1229
+ height?: number;
1230
+ darkMode?: boolean;
1231
+ forceThinBorder?: boolean;
1232
+ }
1233
+
1234
+ export declare const StyledStrokePath: (props: StyledStrokePathProps) => default_2.ReactElement;
1235
+
1236
+ export declare interface StyledStrokePathProps extends default_2.SVGProps<SVGPathElement> {
1237
+ dashArray?: number[];
1238
+ isDouble?: boolean;
1239
+ isAngled?: boolean;
1240
+ dashArrayAdditional?: number[];
1241
+ length?: number;
1242
+ width?: number;
1243
+ offsetX?: number;
1244
+ offsetY?: number;
1245
+ isVertical?: boolean;
1246
+ }
1247
+
1248
+ export declare const Tab: default_2.NamedExoticComponent<TabProps & default_2.RefAttributes<HTMLDivElement>>;
1249
+
1250
+ declare interface Table {
1251
+ readonly table: () => ITable;
1252
+ readonly styles: () => IStyleCollection;
1253
+ readonly bodyStyle: () => GridSurfaceStyle;
1254
+ /**
1255
+ * Need so that we can add the table to the names.
1256
+ */
1257
+ getNames: () => INamedCollection;
1258
+ }
1259
+
1260
+ export declare interface TabProps extends Omit<default_2.HTMLAttributes<HTMLElement>, "onSubmit" | "onChange"> {
1261
+ value: any;
1262
+ index: number;
1263
+ editing: boolean;
1264
+ editable: boolean;
1265
+ disabled: boolean;
1266
+ selectedIndex: number;
1267
+ background: string;
1268
+ activeColor?: IColor;
1269
+ borderColor?: string | IColor;
1270
+ borderWidth?: number;
1271
+ dragging: boolean;
1272
+ }
1273
+
1274
+ export declare const TabStrip: default_2.NamedExoticComponent<TabStripProps & default_2.RefAttributes<TabStripRef>>;
1275
+
1276
+ export declare interface TabStripProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "onSubmit" | "onChange"> {
1277
+ selectedTabIndex: number;
1278
+ tabNames: string[];
1279
+ onSelectedTabIndexChange?: (index: number) => void;
1280
+ onTabNameChange?: (index: number, tabName: string) => void;
1281
+ onTabMove?: (indexFrom: number, indexTo: number) => void;
1282
+ createScrollStartButton?: (props: ScrollButtonProps) => default_2.ReactElement;
1283
+ createScrollEndButton?: (props: ScrollButtonProps) => default_2.ReactElement;
1284
+ createScrollEdgeButton?: (props: ScrollButtonProps) => default_2.ReactElement;
1285
+ createTabButton?: (props: TabProps) => default_2.ReactElement<any>;
1286
+ createTabDivider?: (props: default_2.HTMLAttributes<HTMLElement> & {
1287
+ key: string;
1288
+ }) => default_2.ReactElement;
1289
+ editLabelProps?: EditableLabelProps;
1290
+ disabled?: boolean;
1291
+ disableDrag?: boolean;
1292
+ /**
1293
+ * Default background color of tabs
1294
+ */
1295
+ background?: string;
1296
+ /**
1297
+ * Currently '2022' css does not allow for scrollPanes to be hidden in one axis and overflow in another.
1298
+ * To support tab scrolling and create a visual notch for the selected tab
1299
+ * We create a border/divider for all elements except the selected.
1300
+ */
1301
+ borderWidth?: number;
1302
+ borderColor?: string;
1303
+ activeColor?: IColor;
1304
+ }
1305
+
1306
+ export declare interface TabStripRef extends HTMLDivElement {
1307
+ startEdit(index: number): void;
1308
+ cancel(index: number): void;
1309
+ }
1310
+
1311
+ declare interface Theme {
1312
+ readonly theme: ITheme;
1313
+ readonly themes: IThemeCollection;
1314
+ readonly darkMode: boolean;
1315
+ }
1316
+
1317
+ /**
1318
+ * useBordersOverlay
1319
+ * Renders borders by combining individual cells border attributes.
1320
+ */
1321
+ export declare const useBordersOverlay: ({ getBorderAt, borderRenderer, getVisibleCells: propGetVisibleCells, darkMode, forceThinBorder, defaultColor, shiftIfWide }: BorderOverlayProps) => BordersOverlayResults;
1322
+
1323
+ export declare const useDocThemes: () => IThemeCollection;
1324
+
1325
+ /**
1326
+ * This hook delegates to the model addListener.
1327
+ * This also ensures that it a listener object is passed in that was dynamically recreated it will
1328
+ * not deregister on each render.
1329
+ *
1330
+ * @param source
1331
+ * @param listeners
1332
+ *
1333
+ * @remarks
1334
+ * **IMPORTANT** This assumes that the while the listeners object may change the shape does not.
1335
+ */
1336
+ export declare const useModelListener: <SOURCE, EVENTS>(source: IListener.ISource<SOURCE>, listeners: IListener.Callbacks<SOURCE, EVENTS>, options?: useModelListenerOptions) => void;
1337
+
1338
+ export declare interface useModelListenerOptions extends IListener.Options {
1339
+ /**
1340
+ * Will also fire the listener when the model changes. (with a null event)
1341
+ */
1342
+ fireOnModelChange?: boolean;
1343
+ }
1344
+
1345
+ /**
1346
+ * Hook for observing movable commands. This hook will observe a combination
1347
+ * of sheet events and an options selection.
1348
+ */
1349
+ export declare function useMovableCommands(props: useMovableCommandsOptions): ICommands.IGroup;
1350
+
1351
+ export declare interface useMovableCommandsOptions {
1352
+ commands: ICommands.IGroup;
1353
+ target: () => ICommands.ITarget;
1354
+ /**
1355
+ * Notify that there is a new repeatable command
1356
+ */
1357
+ onRepeatCommandChange?: (command: ICommand<any, any>) => void;
1358
+ /**
1359
+ * The collection to retrieve movable objects
1360
+ */
1361
+ movables: IMovableCollection;
1362
+ /**
1363
+ * The view to retrieve selection information about the movables.
1364
+ */
1365
+ movablesView: IMovableSelection;
1366
+ /**
1367
+ * If provided this will be used start and stop transactions on being/end move.
1368
+ */
1369
+ transactional: ITransaction.ITransactional;
1370
+ notifier?: Notifier;
1371
+ }
1372
+
1373
+ /**
1374
+ * This hook delegates to the model getRange(address).addListener.
1375
+ * @param model
1376
+ * @param listener
1377
+ */
1378
+ export declare const useRangeListener: (model: RangeContainer, address: ICellRange.Address, listener: ICellRange.Listener, options?: useSheetRangeListenerOptions) => void;
1379
+
1380
+ /**
1381
+ * Hook for observing sheet commands. This hook will observe a combination
1382
+ * of sheet events and an options selection.
1383
+ *
1384
+ * Note -
1385
+ * If a sheetSelection is provided then the commands will be confirmed using the provided selections.
1386
+ * This is done to allow for context specific (right-click, etc) commands.
1387
+ *
1388
+ * Continue to review until we have them all.
1389
+ * https://www.excelcampus.com/shortcuts/#:~:text=For%20example%2C%20to%20press%20the,Then%20release%20all%20keys. (great list)
1390
+ * https://support.microsoft.com/en-us/office/keyboard-shortcuts-in-excel-1798d9d5-842a-42b8-9c99-9b7213f0040f
1391
+ * https://corporatefinanceinstitute.com/resources/excel/shortcuts/excel-shortcuts-pc-mac/
1392
+ *
1393
+ * TODO -
1394
+ * Insert Bullet - Alt 7/9 while in edit mode
1395
+ * Ctrl+Shift+F / Ctrl+Shift+P - Open Font Dialog
1396
+ * CTRL+SHIFT+DELETE === cut ? (not seeing this happen)
1397
+ *
1398
+ * Formulas
1399
+ * =,+,- is start formula (make this a shortcut?)
1400
+ * Ctrl + / Select current array ?
1401
+ * (other formula shortcuts)
1402
+ */
1403
+ export declare function useSheetCommands(props: useSheetCommandsOptions): ICommands.IGroup;
1404
+
1405
+ export declare interface useSheetCommandsOptions {
1406
+ /**
1407
+ * The sheet.
1408
+ */
1409
+ sheet: ISheet;
1410
+ commands: ICommands.IGroup;
1411
+ target: () => ICommands.ITarget;
1412
+ /**
1413
+ * Notify that there is a new repeatable command
1414
+ */
1415
+ onRepeatCommandChange?: (command: ICommand<any, any>) => void;
1416
+ notifier?: Notifier;
1417
+ onStartEdit?: (event: Partial<StartEditEvent>) => void;
1418
+ bodyStyle?: GridSurfaceStyle;
1419
+ /**
1420
+ * Returns the current viewport.
1421
+ */
1422
+ getViewport?: () => ScrollableViewport;
1423
+ }
1424
+
1425
+ /**
1426
+ * Copy paste hook for `ISheet`.
1427
+ */
1428
+ export declare const useSheetCopyPaste: ({ element, sheet, sheetView, commands, onClipboardUpdate: propOnClipboardUpdate, onPaste: propOnPaste, selectionRenderer: propSelectionRenderer, copyForegroundColor, cutForegroundColor, copyBackgroundColor, cutBackgroundColor, notifier, ...rest }: SheetCopyPasteProps) => SheetCopyPasteResults;
1429
+
1430
+ export declare interface useSheetRangeListenerOptions extends ICellRange.ListenerOptions {
1431
+ fireOnAddressChange: boolean;
1432
+ }
1433
+
1434
+
1435
+ export * from "@sheetxl/utils-react";
1436
+
1437
+ export { }