@sheetxl/react 0.7.27 → 0.7.28-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +156 -0
- package/browser/cjs/index.cjs +24 -24
- package/browser/esm/D_suN0U6XvrHxTak.mjs +6286 -0
- package/browser/esm/index.mjs +19258 -4911
- package/licenses/dependencies.txt +42 -214
- package/node/esm/CH084kteEgVy0a8H.mjs +9 -0
- package/node/esm/index.mjs +17035 -3691
- package/package.json +10 -11
- package/resources/contents.json +60 -0
- package/resources/locales/contents.json +114 -0
- package/resources/locales/de/clipboard.cmd.json +36 -0
- package/resources/locales/de/editor.cmd.json +128 -0
- package/resources/locales/de/movable.cmd.json +123 -0
- package/resources/locales/de/selection.cmd.json +373 -0
- package/resources/locales/de/sheet.cmd.json +1563 -0
- package/resources/locales/de/table.cmd.json +83 -0
- package/resources/locales/de/ui.msg.json +166 -0
- package/resources/locales/de/workbook.cmd.json +282 -0
- package/resources/locales/en/clipboard.cmd.json +36 -0
- package/resources/locales/en/editor.cmd.json +128 -0
- package/resources/locales/en/movable.cmd.json +123 -0
- package/resources/locales/en/selection.cmd.json +373 -0
- package/resources/locales/en/sheet.cmd.json +1563 -0
- package/resources/locales/en/table.cmd.json +83 -0
- package/resources/locales/en/ui.msg.json +166 -0
- package/resources/locales/en/workbook.cmd.json +282 -0
- package/types/index.d.ts +2 -1767
- package/types/src/border/StaticBorderRenderer.d.ts +32 -0
- package/types/src/border/StyledStrokePath.d.ts +14 -0
- package/types/src/border/index.d.ts +4 -0
- package/types/src/border/useBorders.d.ts +87 -0
- package/types/src/cell/ColumnButton.d.ts +45 -0
- package/types/src/cell/CornerTriangle.d.ts +27 -0
- package/types/src/cell/FormulaCellRenderer.d.ts +34 -0
- package/types/src/cell/SheetCellRenderer.d.ts +52 -0
- package/types/src/cell/SheetHeaderRenderer.d.ts +37 -0
- package/types/src/cell/index.d.ts +7 -0
- package/types/src/cell/useFormulaViewAnchor.d.ts +42 -0
- package/types/src/chart/ChartEditor.d.ts +17 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +35 -0
- package/types/src/chart/index.d.ts +3 -0
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/area-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/area-template.json.d.ts +9 -0
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/bar-template.json.d.ts +9 -0
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/column-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/column-template.json.d.ts +9 -0
- package/types/src/chart/templates/line-markers-template.json.d.ts +10 -0
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +11 -0
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +11 -0
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/line-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/line-template.json.d.ts +9 -0
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +10 -0
- package/types/src/chart/templates/pie-template.json.d.ts +9 -0
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +10 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +68 -0
- package/types/src/clipboard/SheetClipboardLayer.d.ts +22 -0
- package/types/src/clipboard/index.d.ts +3 -0
- package/types/src/commands/Catalog.d.ts +8 -0
- package/types/src/commands/CommandRootProvider.d.ts +36 -0
- package/types/src/commands/InputClipboardCommands.d.ts +41 -0
- package/types/src/commands/InputClipboardInjector.d.ts +16 -0
- package/types/src/commands/MainFocusContext.d.ts +13 -0
- package/types/src/commands/PaneScopeProvider.d.ts +40 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +49 -0
- package/types/src/commands/index.d.ts +7 -0
- package/types/src/context/SheetContext.d.ts +18 -0
- package/types/src/context/WorkbookContext.d.ts +20 -0
- package/types/src/context/index.d.ts +3 -0
- package/types/src/editableLabel/EditableLabel.d.ts +28 -0
- package/types/src/editableLabel/index.d.ts +2 -0
- package/types/src/editor/EditorCommands.d.ts +98 -0
- package/types/src/editor/FunctionPreviewPanel.d.ts +166 -0
- package/types/src/editor/NamedHintPanel.d.ts +38 -0
- package/types/src/editor/NamedItemsPanel.d.ts +59 -0
- package/types/src/editor/SheetCellEditorLayer.d.ts +40 -0
- package/types/src/editor/SheetCellInput.d.ts +99 -0
- package/types/src/editor/SheetEditable.d.ts +53 -0
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +46 -0
- package/types/src/editor/SheetReferenceLayer.d.ts +55 -0
- package/types/src/editor/formulaCaret.d.ts +84 -0
- package/types/src/editor/formulaEval.d.ts +202 -0
- package/types/src/editor/formulaPresentation.d.ts +136 -0
- package/types/src/editor/formulaText.d.ts +80 -0
- package/types/src/editor/functionArgs.d.ts +111 -0
- package/types/src/editor/functionHint.d.ts +37 -0
- package/types/src/editor/index.d.ts +18 -0
- package/types/src/editor/referencePointNav.d.ts +39 -0
- package/types/src/editor/useFormulaHints.d.ts +126 -0
- package/types/src/editor/useFormulaInput.d.ts +326 -0
- package/types/src/editor/useProtectedEditNotice.d.ts +14 -0
- package/types/src/editor/useReferenceMode.d.ts +177 -0
- package/types/src/form/FormulaInput.d.ts +86 -0
- package/types/src/form/FormulaInputParts.d.ts +94 -0
- package/types/src/form/index.d.ts +5 -0
- package/types/src/form/useEditCommit.d.ts +174 -0
- package/types/src/form/useInputField.d.ts +86 -0
- package/types/src/frame/CommandContext.d.ts +179 -0
- package/types/src/frame/IFrame.d.ts +17 -0
- package/types/src/frame/index.d.ts +3 -0
- package/types/src/icons/LogoNoPaddingIcon.d.ts +3 -0
- package/types/src/icons/LogoTextNoPaddingIcon.d.ts +4 -0
- package/types/src/icons/WaterMark.d.ts +12 -0
- package/types/src/icons/chart/ChartAreaIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartAreaStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartAreaStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBarIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBarStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBarStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBubble3DIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBubbleIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartColumnIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartColumnStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartColumnStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedPercentMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartPieDoughnutIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartPieIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesMarkersSmoothIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesSmoothIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartWaterfallIcon.d.ts +5 -0
- package/types/src/icons/chart/ThemedChartIcon.d.ts +20 -0
- package/types/src/icons/chart/index.d.ts +50 -0
- package/types/src/icons/index.d.ts +4 -0
- package/types/src/index.d.ts +27 -0
- package/types/src/io/WorkbookIO.d.ts +50 -0
- package/types/src/io/index.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +14 -0
- package/types/src/layer/CellErrorLayer.d.ts +49 -0
- package/types/src/layer/CellFillLayer.d.ts +15 -0
- package/types/src/layer/ConditionalBarLayer.d.ts +41 -0
- package/types/src/layer/ConditionalIcons.d.ts +34 -0
- package/types/src/layer/ConditionalIconsLayer.d.ts +31 -0
- package/types/src/layer/ContextMenuLayer.d.ts +27 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +28 -0
- package/types/src/layer/HeaderSelectionLayer.d.ts +89 -0
- package/types/src/layer/ResizeIndicator.d.ts +19 -0
- package/types/src/layer/SheetBackgroundLayer.d.ts +22 -0
- package/types/src/layer/SheetCellLayer.d.ts +49 -0
- package/types/src/layer/SheetColumnButtonLayer.d.ts +23 -0
- package/types/src/layer/SheetGridLineLayer.d.ts +22 -0
- package/types/src/layer/SheetHeaderCellLayer.d.ts +30 -0
- package/types/src/layer/SheetMovableLayer.d.ts +26 -0
- package/types/src/layer/SheetTableCommandLayer.d.ts +16 -0
- package/types/src/layer/SpillLayer.d.ts +22 -0
- package/types/src/layer/TableLayer.d.ts +22 -0
- package/types/src/layer/ValidationIndicatorLayer.d.ts +41 -0
- package/types/src/layer/index.d.ts +25 -0
- package/types/src/layer/resizeIndicatorState.d.ts +26 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +21 -0
- package/types/src/layer/useSheetVisibleCells.d.ts +60 -0
- package/types/src/layer/useSheetVisibleDecorations.d.ts +42 -0
- package/types/src/layer/useTableHeaderCells.d.ts +22 -0
- package/types/src/layer/useVisibleTables.d.ts +27 -0
- package/types/src/listener/index.d.ts +3 -0
- package/types/src/listener/useModelListener.d.ts +67 -0
- package/types/src/listener/useRangeListener.d.ts +15 -0
- package/types/src/movable/EmptyFrame.d.ts +16 -0
- package/types/src/movable/IMovableArea.d.ts +34 -0
- package/types/src/movable/MovableCommands.d.ts +22 -0
- package/types/src/movable/MovableFrame.d.ts +48 -0
- package/types/src/movable/MovableLayer.d.ts +77 -0
- package/types/src/movable/MoveableBundle.d.ts +4 -0
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/picture/IPictureEditor.d.ts +39 -0
- package/types/src/picture/PictureEditor.d.ts +4 -0
- package/types/src/picture/index.d.ts +3 -0
- package/types/src/selection/SelectionCommands.d.ts +23 -0
- package/types/src/selection/SheetSelection.d.ts +53 -0
- package/types/src/selection/SheetSelectionLayer.d.ts +30 -0
- package/types/src/selection/index.d.ts +4 -0
- package/types/src/shape/ShapeEditor.d.ts +16 -0
- package/types/src/shape/index.d.ts +2 -0
- package/types/src/sheet/ConditionalFormatPresets.d.ts +56 -0
- package/types/src/sheet/ISheetElement.d.ts +233 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +138 -0
- package/types/src/sheet/NotImplemented.d.ts +3 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +57 -0
- package/types/src/sheet/SheetCommands.d.ts +75 -0
- package/types/src/sheet/SheetElement.d.ts +15 -0
- package/types/src/sheet/SheetHeaderElement.d.ts +4 -0
- package/types/src/sheet/SheetScrollbar.d.ts +28 -0
- package/types/src/sheet/TopLeftCorner.d.ts +17 -0
- package/types/src/sheet/index.d.ts +7 -0
- package/types/src/slicer/SlicerEditor.d.ts +16 -0
- package/types/src/slicer/index.d.ts +2 -0
- package/types/src/tabStrip/SheetTab.d.ts +41 -0
- package/types/src/tabStrip/Sortable.d.ts +66 -0
- package/types/src/tabStrip/Tab.d.ts +19 -0
- package/types/src/tabStrip/TabStrip.d.ts +41 -0
- package/types/src/tabStrip/TabStripItem.d.ts +36 -0
- package/types/src/tabStrip/TabStripRow.d.ts +9 -0
- package/types/src/tabStrip/index.d.ts +7 -0
- package/types/src/table/TableCommands.d.ts +16 -0
- package/types/src/taskPane/ITaskPane.d.ts +72 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +144 -0
- package/types/src/taskPane/TaskPaneFrame.d.ts +48 -0
- package/types/src/taskPane/TaskPaneRegistry.d.ts +108 -0
- package/types/src/taskPane/TaskPaneStrip.d.ts +33 -0
- package/types/src/taskPane/TaskPaneTitle.d.ts +24 -0
- package/types/src/taskPane/index.d.ts +7 -0
- package/types/src/taskPane/useTaskPane.d.ts +29 -0
- package/types/src/theme/DocThemesContext.d.ts +3 -0
- package/types/src/theme/DocThemesProvider.d.ts +15 -0
- package/types/src/theme/ThemeState.d.ts +19 -0
- package/types/src/theme/buildDocThemeCSS.d.ts +16 -0
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +13 -0
- package/types/src/theme/createCSSSystemLookup.d.ts +51 -0
- package/types/src/theme/index.d.ts +11 -0
- package/types/src/theme/useAppColorScheme.d.ts +15 -0
- package/types/src/theme/useDocThemes.d.ts +3 -0
- package/types/src/theme/useGridColorScheme.d.ts +20 -0
- package/types/src/theme/useSystemColors.d.ts +44 -0
- package/types/src/undo/UndoCommands.d.ts +28 -0
- package/types/src/undo/UndoManagerContext.d.ts +14 -0
- package/types/src/undo/index.d.ts +3 -0
- package/types/src/workbook/DefaultRenderers.d.ts +14 -0
- package/types/src/workbook/GlobalWorkbookElement.d.ts +10 -0
- package/types/src/workbook/IWorkbookElement.d.ts +178 -0
- package/types/src/workbook/WindowChrome.d.ts +61 -0
- package/types/src/workbook/WorkbookCommandContributor.d.ts +24 -0
- package/types/src/workbook/WorkbookCommands.d.ts +97 -0
- package/types/src/workbook/WorkbookElement.d.ts +9 -0
- package/types/src/workbook/WorkbookStrip.d.ts +73 -0
- package/types/src/workbook/index.d.ts +17 -0
- package/types/src/workbook/resolveWorkbookInput.d.ts +27 -0
- package/types/src/workbook/useResolvedWorkbook.d.ts +31 -0
- package/types/src/workbook/useWindowChrome.d.ts +24 -0
- package/types/src/workbook/useWorkbookApp.d.ts +47 -0
- package/types/src/workbook/useWorkbookEncrypted.d.ts +15 -0
- package/types/src/workbook/useWorkbookFormat.d.ts +18 -0
- package/types/src/workbook/useWorkbookName.d.ts +13 -0
- package/types/src/workbook/useWorkbookSaveState.d.ts +29 -0
- package/browser/cjs/DNki9dGbSn_gUfd3.cjs +0 -7
- package/browser/cjs/Da611GSWMp5ncOGO.cjs +0 -16
- package/browser/cjs/F8ZECny0CwW2OV5X.cjs +0 -161
- package/browser/esm/BYGSBjns_83FWXAx.mjs +0 -3905
- package/browser/esm/CmObbQiLq9AAM7-q.mjs +0 -394
- package/browser/esm/Daa2g2QALCIHFgqP.mjs +0 -1377
- package/node/assets/style.css +0 -1
- package/node/esm/Bu9xI_rgkuupQ2AO.mjs +0 -11
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { IListener } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Options for `ModelListenerOptions` hook.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This is extends IListener.Options but removes 'once' since hooks are
|
|
7
|
+
* evaluated on render and adds a `ignoreModelChange` option.
|
|
8
|
+
*/
|
|
9
|
+
export interface ModelListenerOptions extends Omit<IListener.Options, 'once'> {
|
|
10
|
+
/**
|
|
11
|
+
* If `true`, fires all listeners once immediately when the component mounts
|
|
12
|
+
* or when the source changes, allowing initialization based on current model state.
|
|
13
|
+
*
|
|
14
|
+
* @defaultValue `false`
|
|
15
|
+
*/
|
|
16
|
+
ignoreModelChange?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Optional log string to identify the listener in console logs.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Will add to console for testing.
|
|
22
|
+
*/
|
|
23
|
+
debugText?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* React hook for subscribing to model-level events (workbooks, sheets, etc.).
|
|
27
|
+
*
|
|
28
|
+
* @template SOURCE - The model type (e.g., IWorkbook, ISheet)
|
|
29
|
+
* @template EVENTS - The listener interface type (e.g., ISheet.IListeners)
|
|
30
|
+
*
|
|
31
|
+
* @param source - The model instance to listen to
|
|
32
|
+
* @param listeners - Object containing listener callbacks for various events
|
|
33
|
+
* @param options - Optional configuration
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* This hook automatically manages the listener lifecycle:
|
|
37
|
+
* - Subscribes when the component mounts or `source` changes
|
|
38
|
+
* - Unsubscribes when the component unmounts or `source` changes
|
|
39
|
+
* - Prevents unnecessary re-subscriptions when the `listeners` object reference changes
|
|
40
|
+
* (as long as the shape/keys remain consistent)
|
|
41
|
+
*
|
|
42
|
+
* By default (`ignoreModelChange: false`), all listeners are called once immediately
|
|
43
|
+
* on mount with the current source state, allowing you to initialize component state
|
|
44
|
+
* based on the model's current values.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* function SheetComponent({ sheet }: { sheet: ISheet }) {
|
|
49
|
+
* useModelListener<ISheet, ISheet.IListeners>(sheet, {
|
|
50
|
+
* onSave(source, json) {
|
|
51
|
+
* console.log('Sheet saved:', json);
|
|
52
|
+
* },
|
|
53
|
+
* });
|
|
54
|
+
*
|
|
55
|
+
* return <div>Sheet: {sheet.getName()}</div>;
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare const useModelListener: <SOURCE, EVENTS>(source: IListener.ISource<SOURCE>, listeners: IListener.Callbacks<SOURCE, EVENTS>, options?: ModelListenerOptions) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Used for syncing with model state that causes a rerenders.
|
|
62
|
+
*
|
|
63
|
+
* @param source The source of the model
|
|
64
|
+
* @param eventNames The name of the event or events to listen for.
|
|
65
|
+
*/
|
|
66
|
+
export declare function useModelSync<EVENTS>(source: IListener.ISource<any>, eventNames: keyof EVENTS | Array<keyof EVENTS>): void;
|
|
67
|
+
//# sourceMappingURL=useModelListener.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICellRange } from '@sheetxl/sdk';
|
|
2
|
+
export interface useRangeListenerOptions extends ICellRange.ListenerOptions {
|
|
3
|
+
fireOnAddressChange: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface RangeContainer {
|
|
6
|
+
getRange(address: ICellRange.Address, options?: ICellRange.GetRangeOptions): ICellRange;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* This hook delegates to the an model that contains a getRange(address) method.
|
|
10
|
+
*
|
|
11
|
+
* @param model
|
|
12
|
+
* @param listener
|
|
13
|
+
*/
|
|
14
|
+
export declare const useRangeListener: (model: RangeContainer, address: ICellRange.Address, listener: ICellRange.Listener, options?: useRangeListenerOptions) => void;
|
|
15
|
+
//# sourceMappingURL=useRangeListener.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MovableElementProps } from './IMovableArea';
|
|
3
|
+
export interface EmptyFrameAttributes {
|
|
4
|
+
isEmptyFrame: () => true;
|
|
5
|
+
}
|
|
6
|
+
export interface IEmptyFrameElement extends HTMLDivElement, EmptyFrameAttributes {
|
|
7
|
+
}
|
|
8
|
+
export interface EmptyFrameProps extends MovableElementProps {
|
|
9
|
+
description: string;
|
|
10
|
+
ref?: React.Ref<IEmptyFrameElement>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Placeholder for movable frames.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EmptyFrame: React.NamedExoticComponent<Omit<EmptyFrameProps, "ref"> & React.RefAttributes<IEmptyFrameElement>>;
|
|
16
|
+
//# sourceMappingURL=EmptyFrame.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
2
|
+
export interface MovableElementProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The movable associated with this element.
|
|
5
|
+
*/
|
|
6
|
+
movable?: IMovable;
|
|
7
|
+
/**
|
|
8
|
+
* Called when the movable is hidden from view.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* * If this returns a false the movable will not be unmounted but will
|
|
12
|
+
* still have a style opacity property of 0 (and pointerEvents of none).
|
|
13
|
+
* * Keeping a movable mounted is useful for elements that take a long of time to render but
|
|
14
|
+
* increase the memory footprint of the application.
|
|
15
|
+
*/
|
|
16
|
+
onHide?: (hide: (movable: IMovable) => boolean | Promise<boolean> | void) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Call when the movable is returned to the view.
|
|
19
|
+
*/
|
|
20
|
+
onShow?: (show: (movable: IMovable) => void) => void;
|
|
21
|
+
/**
|
|
22
|
+
* If true then the component is disabled.
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
* @remarks
|
|
25
|
+
* To see if an element is readonly check the IMovable.isProtected() method.
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Indicator for dragging.
|
|
30
|
+
* @defaultValue false
|
|
31
|
+
*/
|
|
32
|
+
isDragging?: boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=IMovableArea.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RemoveListener, EditModeHandler } from '@sheetxl/utils';
|
|
2
|
+
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
+
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
4
|
+
/** Options for {@link contributeMovableCommands}. */
|
|
5
|
+
export interface ContributeMovableCommandsOptions {
|
|
6
|
+
/** Error reporting. */
|
|
7
|
+
notifier?: IReactNotifier;
|
|
8
|
+
/** Cleared after a drawing op. From `useEditMode()`. */
|
|
9
|
+
editModeHandler?: EditModeHandler;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Contribute the movable **behavior** over `sheet`'s drawings. Each op runs `update` across the selected
|
|
13
|
+
* movables inside one `doBatch`; the anchor/lock `state` re-contributes on selection change. Contribute on
|
|
14
|
+
* the **movable scope** (re-run per active sheet); tagged `noTransaction` since we own the `doBatch`, and
|
|
15
|
+
* `noRepeat`. Returns a disposer.
|
|
16
|
+
*/
|
|
17
|
+
/** The single `data` bundle {@link contributeMovableCommands} takes (the `DynamicCommandContributor` shape). */
|
|
18
|
+
export interface MovableCommandData extends ContributeMovableCommandsOptions {
|
|
19
|
+
sheet: ISheet | null;
|
|
20
|
+
}
|
|
21
|
+
export declare function contributeMovableCommands(contribution: Command.CommandContribution, data: MovableCommandData): RemoveListener;
|
|
22
|
+
//# sourceMappingURL=MovableCommands.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Bounds } from '@sheetxl/utils';
|
|
3
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
4
|
+
import { MovableElementProps } from './IMovableArea';
|
|
5
|
+
export interface MovableFrameProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
/**
|
|
7
|
+
* The underlying model for the chart.
|
|
8
|
+
*/
|
|
9
|
+
movable: IMovable;
|
|
10
|
+
/**
|
|
11
|
+
* Callback to render the movable.
|
|
12
|
+
*
|
|
13
|
+
* @param props - {@link MovableElementProps}
|
|
14
|
+
* @returns A React Element representing the IMovable.
|
|
15
|
+
*/
|
|
16
|
+
renderMovable: (props: MovableElementProps) => React.ReactElement;
|
|
17
|
+
onRefLoad: (ref: HTMLElement) => void;
|
|
18
|
+
onRefUnload: (ref: HTMLElement) => void;
|
|
19
|
+
onHide: (hide: (movable: IMovable) => boolean | Promise<boolean> | void) => void;
|
|
20
|
+
onShow: (show: (movable: IMovable) => void) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Live drag/resize preview bounds (absolute), or null/undefined when idle. When set, the frame
|
|
23
|
+
* renders HERE instead of at the model bounds (the model isn't touched until the gesture commits).
|
|
24
|
+
* Surface-scoped in the parent, so it's set in every pane — that's what makes a dragged shape appear,
|
|
25
|
+
* correctly clipped, on both sides of a freeze boundary.
|
|
26
|
+
*/
|
|
27
|
+
overrideBounds?: Bounds | null;
|
|
28
|
+
/**
|
|
29
|
+
* Called after the frame repositions (scroll, keyboard nudge, drag preview, resize). The parent uses
|
|
30
|
+
* it to re-sync the Moveable control box to the frame's new DOM rect — a nudge re-renders only this
|
|
31
|
+
* frame, not the parent, so the parent can't detect the move on its own.
|
|
32
|
+
*/
|
|
33
|
+
onReposition?: () => void;
|
|
34
|
+
/**
|
|
35
|
+
* Called when the final movable is unselected.
|
|
36
|
+
*/
|
|
37
|
+
onUnFocus: () => void;
|
|
38
|
+
dragStart(e: MouseEvent | TouchEvent, target?: EventTarget | null): void;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates if the frame is being dragged. Useful for styling.
|
|
42
|
+
*/
|
|
43
|
+
isDragging: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare const MovableFrame: React.FC<MovableFrameProps & {
|
|
46
|
+
ref?: React.Ref<HTMLElement | SVGElement>;
|
|
47
|
+
}>;
|
|
48
|
+
//# sourceMappingURL=MovableFrame.d.ts.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IMovableCollection, IMovableSelection, IMovable, ITransaction } from '@sheetxl/sdk';
|
|
3
|
+
import { MovableElementProps } from './IMovableArea';
|
|
4
|
+
export interface MovableLayerAttributes {
|
|
5
|
+
/**
|
|
6
|
+
* Will put focus on the the movable object.
|
|
7
|
+
* @remarks
|
|
8
|
+
* This does not handle scrolling. This must be done by the virtual container.
|
|
9
|
+
*/
|
|
10
|
+
focusMovable: (movable: IMovable) => Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* For runtime introspection.
|
|
13
|
+
*/
|
|
14
|
+
isMovableLayer: () => true;
|
|
15
|
+
}
|
|
16
|
+
export interface IMovableLayerElement extends HTMLDivElement, MovableLayerAttributes {
|
|
17
|
+
}
|
|
18
|
+
export interface MovableLayerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
/**
|
|
20
|
+
* The container to retrieve movable objects
|
|
21
|
+
*/
|
|
22
|
+
movables: IMovableCollection;
|
|
23
|
+
/**
|
|
24
|
+
* The container view to retrieve selection information about the movables.
|
|
25
|
+
*/
|
|
26
|
+
movablesView: IMovableSelection;
|
|
27
|
+
/**
|
|
28
|
+
* Callback to render the movable.
|
|
29
|
+
*
|
|
30
|
+
* @param props MovableElementProps
|
|
31
|
+
* @returns A React Element representing the IMovable.
|
|
32
|
+
*/
|
|
33
|
+
renderMovable: (props: MovableElementProps) => React.ReactElement;
|
|
34
|
+
/**
|
|
35
|
+
* If provided this will be used start and stop transactions on being/end move.
|
|
36
|
+
*/
|
|
37
|
+
transactional: ITransaction.ITransactional;
|
|
38
|
+
/**
|
|
39
|
+
* Called when the final movable is unselected.
|
|
40
|
+
*/
|
|
41
|
+
onUnFocus?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Called when the final movable is unselected.
|
|
44
|
+
*/
|
|
45
|
+
onFocus?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* If disabled then movable selection will not be allowed and frames will be passed disabled.
|
|
48
|
+
* @defaultValue false
|
|
49
|
+
*/
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* If disabled then unable to move.
|
|
53
|
+
*
|
|
54
|
+
* @defaultValue false
|
|
55
|
+
*/
|
|
56
|
+
disableDrag?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* If disabled then unable to resize.
|
|
59
|
+
*
|
|
60
|
+
* @defaultValue false
|
|
61
|
+
*/
|
|
62
|
+
disableResize?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Provider the anchor element to render.
|
|
65
|
+
*/
|
|
66
|
+
renderDirections?: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Called after the first render of a movable.
|
|
69
|
+
*/
|
|
70
|
+
onFirstRender?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Forwards the ref to the underlying element.
|
|
73
|
+
*/
|
|
74
|
+
ref?: React.Ref<IMovableLayerElement>;
|
|
75
|
+
}
|
|
76
|
+
export declare const MovableLayer: React.NamedExoticComponent<Omit<MovableLayerProps, "ref"> & React.RefAttributes<IMovableLayerElement>>;
|
|
77
|
+
//# sourceMappingURL=MovableLayer.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DraggableProps, ResizableProps } from 'react-moveable';
|
|
2
|
+
declare const Moveable: typeof import('react-moveable').InitialMoveable & (new (...args: any[]) => import('react-moveable').InitialMoveable<DraggableProps & ResizableProps>);
|
|
3
|
+
export default Moveable;
|
|
4
|
+
//# sourceMappingURL=MoveableBundle.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IPicture } from '@sheetxl/sdk';
|
|
3
|
+
import { MovableElementProps } from '../movable';
|
|
4
|
+
export interface IPictureEditorAttributes {
|
|
5
|
+
isPictureEditor: () => true;
|
|
6
|
+
}
|
|
7
|
+
export interface IPictureEditorElement extends HTMLDivElement, IPictureEditorAttributes {
|
|
8
|
+
}
|
|
9
|
+
export interface PictureEditorProps extends MovableElementProps {
|
|
10
|
+
/**
|
|
11
|
+
* The underlying model for the picture.
|
|
12
|
+
*/
|
|
13
|
+
picture: IPicture;
|
|
14
|
+
/**
|
|
15
|
+
* Usable for alt text or loading
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Provide an optional loading panel.
|
|
20
|
+
*/
|
|
21
|
+
loadingPanel?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* If true the picture will be tiled to fill the area.
|
|
24
|
+
*/
|
|
25
|
+
tile?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Optional style for the picture editor.
|
|
28
|
+
*/
|
|
29
|
+
offsetX?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Optional style for the picture editor.
|
|
32
|
+
*/
|
|
33
|
+
offsetY?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Ref for the Element.
|
|
36
|
+
*/
|
|
37
|
+
ref?: React.Ref<IPictureEditorElement>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=IPictureEditor.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IPictureEditorElement, PictureEditorProps } from './IPictureEditor';
|
|
3
|
+
export declare const PictureEditor: React.NamedExoticComponent<Omit<PictureEditorProps, "ref"> & React.RefAttributes<IPictureEditorElement>>;
|
|
4
|
+
//# sourceMappingURL=PictureEditor.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RemoveListener } from '@sheetxl/utils';
|
|
2
|
+
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
+
import { Command } from '@sheetxl/utils-react';
|
|
4
|
+
import { SelectionNavigation } from '@sheetxl/grid-react';
|
|
5
|
+
/** The single `data` bundle {@link contributeSelectionCommands} takes (the `DynamicCommandContributor` shape). */
|
|
6
|
+
export interface SelectionCommandData {
|
|
7
|
+
/** `null` on the first render — the layer's `SelectionNavigation` is produced by its child via a ref. */
|
|
8
|
+
navigation: SelectionNavigation | null;
|
|
9
|
+
sheet?: ISheet;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Contribute the selection **behavior** onto `contribution` (a per-pane layer scope's contribution), as thin
|
|
13
|
+
* delegates to the layer's {@link SelectionNavigation} handle. Mirrors {@link contributeClipboardCommands}
|
|
14
|
+
* — a plain fn the wiring component calls, so the contributor is separately injectable. Returns a remover for
|
|
15
|
+
* parity with the other dynamic contributors; selection has no model listeners (pure delegation), so the
|
|
16
|
+
* commands themselves are torn down by the caller's `contribution.remove()`.
|
|
17
|
+
*
|
|
18
|
+
* The key inventory is the navigation's own binding map — no parallel key list to drift from it. Command
|
|
19
|
+
* CHROME (label / description / shortcut / tags) comes from the catalog (`selection.cmd.json`, scope
|
|
20
|
+
* `selection`); catalog keys with no binding here (and no `sheet`) stay chrome-only ⇒ disabled.
|
|
21
|
+
*/
|
|
22
|
+
export declare function contributeSelectionCommands(contribution: Command.CommandContribution, data: SelectionCommandData): RemoveListener;
|
|
23
|
+
//# sourceMappingURL=SelectionCommands.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { RangeAxis, CellCoords, Direction, RangeCoords, SelectionCoords } from '@sheetxl/utils';
|
|
2
|
+
import { IRangeSelection } from '@sheetxl/sdk';
|
|
3
|
+
import { ISelection } from '@sheetxl/grid-react';
|
|
4
|
+
/**
|
|
5
|
+
* The sheet-backed {@link ISelection}: a thin adapter over the sdk {@link IRangeSelection} so the new
|
|
6
|
+
* selection layers (and the editor, via {@link ICellAnchor}) drive the real `sheet.getSelection()`
|
|
7
|
+
* instead of the dumb in-memory `DefaultSelection`.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* The architecture deliberately pushes the *smart* selection logic (merge / hidden / contentful
|
|
11
|
+
* awareness, bounds clamping) into the model, so this adapter is almost pure delegation —
|
|
12
|
+
* `navigate` / `traverse` / `modify` / `append` map straight onto the sdk's implementations. The two
|
|
13
|
+
* non-trivial seams:
|
|
14
|
+
*
|
|
15
|
+
* - **Reads are stable.** `IRangeSelection.getCoords()` returns its internal `_coords` reference,
|
|
16
|
+
* replaced only on a real change (its `updateCoords` short-circuits on `isEqualSelectionCoords`), so
|
|
17
|
+
* `getSelection()` satisfies the `useSyncExternalStore` stable-snapshot invariant with no caching.
|
|
18
|
+
* - **Subscription is ref-counted.** A single sdk `onChange` listener is attached while *any* React
|
|
19
|
+
* subscriber is present and detached when the last leaves — no dangling sdk listener, no `dispose()`.
|
|
20
|
+
*
|
|
21
|
+
* `deselect` is the one intent the sdk has no native method for; it is computed here as a pure range
|
|
22
|
+
* split (mirroring `DefaultSelection.deselect`) and written back through `updateCoords`.
|
|
23
|
+
*
|
|
24
|
+
* The `Direction` / `RangeAxis` unions are the same `as const` string literals the sdk's `IRange.*`
|
|
25
|
+
* use, so they pass through without mapping.
|
|
26
|
+
*/
|
|
27
|
+
export declare class SheetSelection implements ISelection {
|
|
28
|
+
private readonly _sel;
|
|
29
|
+
private readonly _listeners;
|
|
30
|
+
private _removeSdkListener;
|
|
31
|
+
constructor(selection: IRangeSelection);
|
|
32
|
+
/** The wrapped sdk selection (for callers that need sheet-specific APIs the model doesn't expose). */
|
|
33
|
+
get selection(): IRangeSelection;
|
|
34
|
+
/** @inheritdoc ISelection.getSelection */
|
|
35
|
+
getSelection(): SelectionCoords;
|
|
36
|
+
/** @inheritdoc ISelection.setSelection */
|
|
37
|
+
setSelection(next: SelectionCoords): void;
|
|
38
|
+
/** @inheritdoc ISelection.navigate */
|
|
39
|
+
navigate(direction: Direction, select?: boolean, contentful?: boolean, increment?: number): void;
|
|
40
|
+
/** @inheritdoc ISelection.traverse */
|
|
41
|
+
traverse(axis?: RangeAxis, reverse?: boolean, region?: RangeCoords): void;
|
|
42
|
+
/** @inheritdoc ISelection.modify */
|
|
43
|
+
modify(cell: Partial<CellCoords>, pivot?: Partial<CellCoords>): void;
|
|
44
|
+
/** @inheritdoc ISelection.append */
|
|
45
|
+
append(start: CellCoords, end?: CellCoords): void;
|
|
46
|
+
/** @inheritdoc ISelection.deselect */
|
|
47
|
+
deselect(rangeToRemove: RangeCoords): void;
|
|
48
|
+
/** @inheritdoc ICellAnchor.getCoords */
|
|
49
|
+
getCoords(): CellCoords;
|
|
50
|
+
/** @inheritdoc ICellAnchor.subscribe */
|
|
51
|
+
subscribe(listener: () => void): (() => void);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=SheetSelection.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
+
import { IShowToolTipProperties } from '@sheetxl/utils-react';
|
|
4
|
+
import { LayerProps } from '@sheetxl/grid-react';
|
|
5
|
+
export interface SheetSelectionLayerProps extends LayerProps {
|
|
6
|
+
/** The sheet whose `getSelection()` this layer drives. */
|
|
7
|
+
sheet: ISheet;
|
|
8
|
+
/** Whether this sheet/pane is the active one (gates move/fill interaction). */
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
/** Show a transient tooltip (the fill preview value). Threaded from `SheetElement`; no-op if omitted. */
|
|
11
|
+
onShowTooltip?: (properties: IShowToolTipProperties) => void;
|
|
12
|
+
/** Hide the tooltip. */
|
|
13
|
+
onCloseTooltip?: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders the generic grid-react {@link SelectionLayer} wired with the
|
|
17
|
+
* sheet interaction config — a {@link SheetSelection} model, the **move grip** (`onMove`: move/copy/insert
|
|
18
|
+
* with an overwrite-confirm), the **fill handle** (`onFill`: auto-fill, with a **preview tooltip**), the
|
|
19
|
+
* drag **edit modes** (cursor/description while dragging the grip or fill), and the enable gating — and,
|
|
20
|
+
* when a command scope is present, contributes the selection nav onto it (yielding the layer's keyboard).
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* The *smart* selection logic (merge / hidden / contentful nav, bounds) lives in the model
|
|
24
|
+
* ({@link SheetSelection} → `IRangeSelection`); this layer only wires the view-side interactions the model
|
|
25
|
+
* doesn't own.
|
|
26
|
+
* The fill preview tooltip is threaded via `onShowTooltip`/`onCloseTooltip` — a float
|
|
27
|
+
* provider would eventually replace that prop-drilling.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SheetSelectionLayer: React.FC<SheetSelectionLayerProps>;
|
|
30
|
+
//# sourceMappingURL=SheetSelectionLayer.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MovableElementProps } from '../movable';
|
|
3
|
+
export interface ShapeEditorAttributes {
|
|
4
|
+
isShapeEditor: () => true;
|
|
5
|
+
}
|
|
6
|
+
export interface IShapeEditorElement extends HTMLDivElement, ShapeEditorAttributes {
|
|
7
|
+
}
|
|
8
|
+
export interface ShapeEditorProps extends MovableElementProps {
|
|
9
|
+
shape: any;
|
|
10
|
+
ref?: React.Ref<IShapeEditorElement>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Placeholder for chart editors.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ShapeEditor: React.NamedExoticComponent<Omit<ShapeEditorProps, "ref"> & React.RefAttributes<IShapeEditorElement>>;
|
|
16
|
+
//# sourceMappingURL=ShapeEditor.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IConditionalFormat, IStyle } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Shared authoring presets for the conditional-format editor.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* The literal colors here are Excel's own — a rule authored from a preset in this editor and the
|
|
7
|
+
* same preset in Excel must be byte-equivalent on the wire, so these are lifted from files Excel
|
|
8
|
+
* writes, not approximated on screen.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Excel's six canned dxf presets, in its menu order.
|
|
12
|
+
*/
|
|
13
|
+
export interface StylePreset {
|
|
14
|
+
/** Stable identifier; UI layers key their localized tooltip off it. */
|
|
15
|
+
key: string;
|
|
16
|
+
style: IStyle.Properties;
|
|
17
|
+
}
|
|
18
|
+
export declare const STYLE_PRESETS: readonly StylePreset[];
|
|
19
|
+
/**
|
|
20
|
+
* Excel's 12 color-scale presets, in its gallery order (3-color scales first).
|
|
21
|
+
* The colors within each preset run min → max.
|
|
22
|
+
*/
|
|
23
|
+
export declare const COLOR_SCALE_PRESETS: readonly IConditionalFormat.ColorScale[];
|
|
24
|
+
/** Excel's default bar blue, and its data-bar gallery palette. */
|
|
25
|
+
export declare const DATA_BAR_COLORS: readonly string[];
|
|
26
|
+
/** Excel's default fill for bars of negative values. */
|
|
27
|
+
export declare const DATA_BAR_NEGATIVE_COLOR = "#FF0000";
|
|
28
|
+
/**
|
|
29
|
+
* Excel's 12 data-bar presets, in its gallery order: the palette in gradient fill, then the same
|
|
30
|
+
* six solid.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DATA_BAR_PRESETS: readonly IConditionalFormat.DataBar[];
|
|
33
|
+
export declare const defaultColorScale: () => IConditionalFormat.ColorScale;
|
|
34
|
+
export declare const defaultDataBar: () => IConditionalFormat.DataBar;
|
|
35
|
+
/** Evenly banded percent stops — Excel's default thresholds for an n-icon set. */
|
|
36
|
+
export declare const defaultIconStops: (count: number) => IConditionalFormat.Stop[];
|
|
37
|
+
export declare const defaultIconSet: () => IConditionalFormat.IconSet;
|
|
38
|
+
/**
|
|
39
|
+
* Excel's icon-set gallery groups. UI layers key their localized group headers off `key`.
|
|
40
|
+
*/
|
|
41
|
+
export interface IconSetGroup {
|
|
42
|
+
key: 'directional' | 'shapes' | 'indicators' | 'ratings';
|
|
43
|
+
sets: readonly IStyle.IconSet[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Every set the gallery offers, grouped and ordered the way Excel's own gallery is.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* Includes the three Excel 2010 sets (`3Triangles`, `3Stars`, `5Boxes`) the legacy OOXML schema has
|
|
50
|
+
* no name for — a workbook that uses one is written with the rule in the x14 extension, which is
|
|
51
|
+
* what Excel itself does, so offering them here costs no fidelity.
|
|
52
|
+
*/
|
|
53
|
+
export declare const ICON_SET_GROUPS: readonly IconSetGroup[];
|
|
54
|
+
/** The number of icons (and stops) in a named set — the leading digit of every OOXML set name. */
|
|
55
|
+
export declare const iconSetSize: (set: string) => number;
|
|
56
|
+
//# sourceMappingURL=ConditionalFormatPresets.d.ts.map
|