@sheetxl/studio-mui 0.8.0-beta.1 → 0.8.0-beta.10
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/esm/{Cd6n1XUgF0VItpkH.mjs → 5cbK03T_Oh3tNdR7.mjs} +7 -5
- package/browser/esm/{Bz5LiUe3SZ8g42Ia.mjs → 9eKCkvqpMQwqcXiw.mjs} +1 -1
- package/browser/esm/B1Yp_uy1vFHcJB3U.mjs +13 -0
- package/browser/esm/Biy7bhzzzPb5sfRN.mjs +152 -0
- package/browser/esm/Blaj2R5hYxtLAW__.mjs +117 -0
- package/browser/esm/{ChwS_ougBsogOEsP.mjs → ByeL_BZuJ2kl8gtf.mjs} +46 -47
- package/browser/esm/{BUGepznywvV0tUjW.mjs → C1Rp2hZrApo5MUc8.mjs} +2 -2
- package/browser/esm/{DMLXV4EKl1NCp_jk.mjs → CEvZe2cZK-voZTif.mjs} +5 -5
- package/browser/esm/{BZBJG2tDdD3-VujP.mjs → CIu1bjPJe_x31Oww.mjs} +195 -174
- package/browser/esm/COv-m-c2byCgvU3M.mjs +14861 -0
- package/browser/esm/CjznclrKqJRi7u9O.mjs +77 -0
- package/browser/esm/{Cj2pgCNqBCGl4rTX.mjs → CoSiOS-og0zFw4Ws.mjs} +587 -556
- package/browser/esm/{rU8xNPVQtDSnujM-.mjs → CtEFHbzYNvYjDYvi.mjs} +7 -7
- package/browser/esm/D6S8kVTzOjCn0-SK.mjs +627 -0
- package/browser/esm/{DNDrQKMTzKzNMjl-.mjs → D8al_cJ4U-NgzwoK.mjs} +1 -1
- package/browser/esm/DBtc4lku0uHVcqWn.mjs +71 -0
- package/browser/esm/{BoLxSRdEWt-Yg2RI.mjs → DHY19rkSiiRZxShC.mjs} +130 -103
- package/browser/esm/{zWTZ8BvT4hjgC2ua.mjs → DU3J8Gcf-WpBxNYg.mjs} +11 -10
- package/browser/esm/Die9NXVFveHvcCT-.mjs +4205 -0
- package/browser/esm/{CVfuCNRpODUw04IH.mjs → DmCQbW4zwkT_Rq88.mjs} +1 -1
- package/browser/esm/IQLeaAbtGTipUsOD.mjs +516 -0
- package/browser/esm/{3ydDykDMtDYbfVVn.mjs → X1Db3b_7b_7OuCk6.mjs} +178 -129
- package/browser/esm/fb126BNj3F8URR19.mjs +225 -0
- package/browser/esm/index.mjs +418 -135
- package/browser/esm/sFOAxZpxXo-qvDSp.mjs +293 -0
- package/browser/esm/sam1KGQZ59B_fADz.mjs +1941 -0
- package/browser/esm/xKiLJKiLxto8SayF.mjs +256 -0
- package/browser/esm/yZxC4qUENOlMhVUH.mjs +68 -0
- package/licenses/dependencies.txt +58 -311
- package/node/esm/B8SQfjKjzYHLxzZR.mjs +632 -0
- package/node/esm/{DM7K7-284z-PczVz.mjs → BYVLi0md4AYuDsB_.mjs} +1 -1
- package/node/esm/BYsG3KYVmxSe_CIQ.mjs +294 -0
- package/node/esm/BYwXhrEwkRAt9nJS.mjs +71 -0
- package/node/esm/B_jRGdwGFkudwmL-.mjs +68 -0
- package/node/esm/Bb1sLMqXWKjdve23.mjs +77 -0
- package/node/esm/{BwZcoHDBmLPIVOT5.mjs → BcwMb6CyVfvEwbHn.mjs} +69 -70
- package/node/esm/{BhqI3pQFkV8K_612.mjs → CKu1AtRgyltyEdEN.mjs} +1 -1
- package/node/esm/Cmt8Wv806N7NmE4Y.mjs +3344 -0
- package/node/esm/{DXZrzWee8K5FPOW1.mjs → D6oQL8knsPpgdXuk.mjs} +2 -2
- package/node/esm/{BA7VzUQ2sKRLTZ5c.mjs → D9rzScOA9pEYFrtz.mjs} +1 -1
- package/node/esm/DNSjK5DAH3M14Qbc.mjs +521 -0
- package/node/esm/{CUMKTjYv6VTkcWYi.mjs → DZzvTQxIKr9LbEsA.mjs} +1 -1
- package/node/esm/{Qpuqm6xBr_da38Ht.mjs → ETK6T6G0SIcFXDe5.mjs} +163 -135
- package/node/esm/ah3CUg4-VmNstGk_.mjs +256 -0
- package/node/esm/{CHi3AuWEwEPOg9IZ.mjs → ci8d-mF1H9wnYzix.mjs} +1 -1
- package/node/esm/cqzp431iNSLWictb.mjs +116 -0
- package/node/esm/index.mjs +14783 -6793
- package/package.json +15 -18
- package/resources/locales/de/groups.cmd.json +29 -16
- package/resources/locales/de/studio.cmd.json +18 -1
- package/resources/locales/de/ui.msg.json +350 -40
- package/resources/locales/en/groups.cmd.json +39 -17
- package/resources/locales/en/studio.cmd.json +18 -1
- package/resources/locales/en/ui.msg.json +306 -40
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +17 -1
- package/types/src/anchorItems/AnchorItemsPanel.d.ts +14 -0
- package/types/src/anchorItems/AnchoredRangeField.d.ts +40 -0
- package/types/src/anchorItems/index.d.ts +1 -0
- package/types/src/border/BorderPopupButton.d.ts +6 -6
- package/types/src/border/BorderStylePopupButton.d.ts +3 -3
- package/types/src/border/BorderTemplateIcon.d.ts +24 -0
- package/types/src/border/index.d.ts +1 -0
- package/types/src/color/ColorPanel.d.ts +8 -2
- package/types/src/color/ColorPopupButton.d.ts +2 -1
- package/types/src/command/NumberFormatQuickButtons.d.ts +32 -0
- package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
- package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
- package/types/src/comments/CommentCard.d.ts +41 -0
- package/types/src/comments/CommentsPlugin.d.ts +6 -0
- package/types/src/comments/CommentsTaskPane.d.ts +23 -0
- package/types/src/comments/index.d.ts +4 -0
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +2 -2
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
- package/types/src/conditions/BetweenOption.d.ts +6 -1
- package/types/src/conditions/CombinatorOption.d.ts +7 -0
- package/types/src/conditions/ConditionEditor.d.ts +61 -4
- package/types/src/conditions/ConditionUtils.d.ts +65 -6
- package/types/src/conditions/ExpressionOption.d.ts +12 -6
- package/types/src/conditions/MembershipOption.d.ts +67 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
- package/types/src/conditions/ScalarOption.d.ts +25 -6
- package/types/src/conditions/SelectorSelect.d.ts +16 -7
- package/types/src/conditions/index.d.ts +1 -1
- package/types/src/conditions/useFormulaOption.d.ts +54 -0
- package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +7 -1
- package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -2
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +13 -2
- package/types/src/dataValidation/DataValidationIcon.d.ts +22 -0
- package/types/src/dataValidation/DataValidationTitle.d.ts +13 -0
- package/types/src/dialog/FillSeriesDialog.d.ts +16 -0
- package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
- package/types/src/dialog/TableNewDialog.d.ts +1 -4
- package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
- package/types/src/dialog/index.d.ts +0 -2
- package/types/src/externalLink/ExternalLinkCardBody.d.ts +9 -0
- package/types/src/externalLink/ExternalLinkChip.d.ts +18 -0
- package/types/src/externalLink/ExternalLinkLocation.d.ts +18 -0
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +18 -0
- package/types/src/externalLink/ExternalLinksPanel.d.ts +11 -0
- package/types/src/externalLink/ExternalLinksPlugin.d.ts +5 -0
- package/types/src/externalLink/ExternalLinksTaskPane.d.ts +19 -0
- package/types/src/externalLink/index.d.ts +8 -0
- package/types/src/fill/GradientEditor.d.ts +41 -0
- package/types/src/fill/GradientStopsBar.d.ts +43 -0
- package/types/src/fill/PatternPopupButton.d.ts +26 -0
- package/types/src/fill/PatternSwatch.d.ts +53 -0
- package/types/src/fill/index.d.ts +5 -0
- package/types/src/filter/ColumnMenu.d.ts +31 -1
- package/types/src/filter/index.d.ts +0 -1
- package/types/src/form/FormulaField.d.ts +35 -6
- package/types/src/form/InputField.d.ts +35 -5
- package/types/src/format/AlignmentPanel.d.ts +13 -0
- package/types/src/format/BorderPanel.d.ts +22 -0
- package/types/src/format/BorderPreview.d.ts +94 -0
- package/types/src/format/FillPanel.d.ts +65 -0
- package/types/src/format/FontPanel.d.ts +12 -0
- package/types/src/format/FormatCellPreview.d.ts +35 -0
- package/types/src/format/FormatPanelParts.d.ts +85 -0
- package/types/src/format/FormatPlugin.d.ts +11 -0
- package/types/src/format/FormatTaskPane.d.ts +39 -0
- package/types/src/format/LinePanel.d.ts +53 -0
- package/types/src/format/LinePreviews.d.ts +71 -0
- package/types/src/format/NumberFormatOption.d.ts +43 -0
- package/types/src/{numberFormat → format}/NumberFormatPanel.d.ts +20 -0
- package/types/src/format/index.d.ts +14 -0
- package/types/src/format/useFormatSelection.d.ts +93 -0
- package/types/src/formulaBar/IFormulaBar.d.ts +11 -0
- package/types/src/formulaBar/MobileFormulaBar.d.ts +21 -0
- package/types/src/formulaBar/MobileInputToolbar.d.ts +37 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/formulaBar/useFormulaBarSession.d.ts +65 -0
- package/types/src/index.d.ts +7 -1
- package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +4 -1
- package/types/src/itemsPanel/ItemCard.d.ts +60 -8
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +68 -19
- package/types/src/itemsPanel/ItemsPanel.d.ts +9 -0
- package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
- package/types/src/itemsPanel/index.d.ts +2 -0
- package/types/src/named/NamedDetailsPanel.d.ts +9 -2
- package/types/src/named/NamedDetailsTaskPane.d.ts +3 -2
- package/types/src/named/NamedEditorPanel.d.ts +1 -1
- package/types/src/named/NamedExpressionField.d.ts +32 -0
- package/types/src/named/NamedKindChip.d.ts +38 -0
- package/types/src/picture/PicturePlugin.d.ts +6 -0
- package/types/src/picture/index.d.ts +2 -0
- package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +6 -0
- package/types/src/protectedRange/ProtectedRangeDraft.d.ts +22 -0
- package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +0 -14
- package/types/src/protectedRange/index.d.ts +2 -1
- package/types/src/protection/ManageProtectionTaskPane.d.ts +29 -0
- package/types/src/protection/PasswordDialog.d.ts +32 -0
- package/types/src/protection/PasswordField.d.ts +35 -0
- package/types/src/protection/ProtectedCellsPanel.d.ts +20 -0
- package/types/src/protection/ProtectionPlugin.d.ts +11 -0
- package/types/src/protection/SheetProtectionPanel.d.ts +35 -0
- package/types/src/protection/WorkbookProtectionPanel.d.ts +34 -15
- package/types/src/protection/WorkbookProtectionTab.d.ts +22 -0
- package/types/src/protection/index.d.ts +7 -1
- package/types/src/shape/InsertShapeCommandButton.d.ts +20 -0
- package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
- package/types/src/shape/ShapePlugin.d.ts +6 -0
- package/types/src/shape/index.d.ts +3 -0
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +18 -0
- package/types/src/slicer/SlicerPlugin.d.ts +6 -0
- package/types/src/slicer/index.d.ts +3 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
- package/types/src/studio/CommandsWrapper.d.ts +5 -0
- package/types/src/studio/EagerStudio.d.ts +14 -1
- package/types/src/studio/StudioCommandProvider.d.ts +10 -0
- package/types/src/studio/StudioCommands.d.ts +40 -4
- package/types/src/studio/StudioProps.d.ts +64 -2
- package/types/src/studio/StudioSplitPane.d.ts +1 -1
- package/types/src/studio/formulaBarPlacement.d.ts +35 -0
- package/types/src/studio/splitStudioProps.d.ts +7 -0
- package/types/src/studio/useStudioApp.d.ts +31 -18
- package/types/src/template/TemplateCommands.d.ts +29 -0
- package/types/src/template/TemplateDialog.d.ts +19 -0
- package/types/src/template/TemplatePanel.d.ts +50 -0
- package/types/src/template/TemplateSearchField.d.ts +29 -0
- package/types/src/template/WelcomeDialog.d.ts +29 -0
- package/types/src/template/categoryColor.d.ts +8 -0
- package/types/src/template/index.d.ts +3 -0
- package/types/src/template/useTemplateCatalog.d.ts +71 -0
- package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
- package/types/src/workbook/DefaultRenderers.d.ts +15 -1
- package/types/src/workbook/FillMenu.d.ts +21 -0
- package/types/src/workbook/OutlineButtons.d.ts +11 -0
- package/types/src/workbook/WorkbookElement.d.ts +1 -1
- package/types/src/workbook/index.d.ts +1 -0
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
- package/browser/cjs/B_D3JKseVvpRyX-E.cjs +0 -1
- package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +0 -2
- package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +0 -2
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Bte6P3MhSjajJmmY.cjs +0 -7
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
- package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +0 -1
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
- package/browser/cjs/CYxc8vnRi8dNpDPk.cjs +0 -1
- package/browser/cjs/CZm1jVZaHQ246prW.cjs +0 -1
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
- package/browser/cjs/Cm1APq2MraYNNhyI.cjs +0 -1
- package/browser/cjs/DO8V31Z1ewgMA1di.cjs +0 -5
- package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +0 -1
- package/browser/cjs/IASAYG6qgv7lJY7y.cjs +0 -1
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
- package/browser/cjs/UnMhi28mbvLiOXQe.cjs +0 -1
- package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +0 -1
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
- package/browser/cjs/index.cjs +0 -2
- package/browser/cjs/w2GjebPlOFv3pCbm.cjs +0 -1
- package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +0 -11
- package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +0 -1
- package/browser/esm/BuY3uV47Bwbqpasq.mjs +0 -219
- package/browser/esm/CAs1MWvJTcRfJy26.mjs +0 -217
- package/browser/esm/CBU3LgLYmqtQjJbu.mjs +0 -1150
- package/browser/esm/CDU0rqpLNVtMLI-f.mjs +0 -52
- package/browser/esm/CVBub6pgTsJzCc5m.mjs +0 -5429
- package/browser/esm/C_XvSsQ9BVdHffCO.mjs +0 -47
- package/browser/esm/FT29q8yNwsEpVZjt.mjs +0 -9257
- package/browser/esm/Hb1rlHT4tE5hLcjM.mjs +0 -82
- package/browser/esm/UJOXCQv6KrG1gY3l.mjs +0 -105
- package/browser/esm/s46El7mT6oKLSnYB.mjs +0 -411
- package/node/esm/9FY82fj1R1c-AczW.mjs +0 -47
- package/node/esm/C-boHCnJditFzng3.mjs +0 -106
- package/node/esm/DxXM8qHi0Oz4Zovl.mjs +0 -4575
- package/node/esm/sQt2wWGTRLzqeJdG.mjs +0 -82
- package/node/esm/yCHAZKxJR7qY_ySy.mjs +0 -470
- package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +0 -32
- package/types/src/conditions/DateTimeOption.d.ts +0 -43
- package/types/src/conditions/InSetOption.d.ts +0 -37
- package/types/src/dialog/CommentsDialog.d.ts +0 -11
- package/types/src/dialog/NumberFormatDialog.d.ts +0 -12
- package/types/src/filter/FilterList.d.ts +0 -28
- package/types/src/numberFormat/NumberFormatTaskPane.d.ts +0 -12
- package/types/src/numberFormat/index.d.ts +0 -8
- package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +0 -3
- package/types/src/protectedRange/ProtectedRangePlugin.d.ts +0 -2
- package/types/src/protection/WorkbookProtectionDialog.d.ts +0 -23
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IColor } from '@sheetxl/sdk';
|
|
3
|
+
/** A gradient stop in the shape the editor manipulates — always with an explicit offset. */
|
|
4
|
+
export interface GradientStopValue {
|
|
5
|
+
/** `0…1` along the gradient. Explicit, because a defaulted offset does not survive to CSS. */
|
|
6
|
+
offset: number;
|
|
7
|
+
color: IColor.Serializable;
|
|
8
|
+
}
|
|
9
|
+
export interface GradientStopsBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
10
|
+
stops: GradientStopValue[];
|
|
11
|
+
/** The stops after any edit, in offset order. */
|
|
12
|
+
onChange: (stops: GradientStopValue[]) => void;
|
|
13
|
+
/**
|
|
14
|
+
* The fewest stops the bar will leave; a stop cannot be removed below it.
|
|
15
|
+
* @defaultValue 2 — a gradient is undefined with fewer colors, and the model says so too.
|
|
16
|
+
*/
|
|
17
|
+
minStops?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The most stops the bar will add.
|
|
20
|
+
* @defaultValue 8 — beyond this the handles stop being tellable apart in a pane.
|
|
21
|
+
*/
|
|
22
|
+
maxStops?: number;
|
|
23
|
+
/** Theme color resolution for the stop pickers and the ramp. */
|
|
24
|
+
schemeLookup?: IColor.SchemeLookup;
|
|
25
|
+
recentColors?: readonly IColor[] | (() => readonly IColor[]);
|
|
26
|
+
darkMode?: boolean;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The stops of a gradient as a ramp with a handle under each stop: drag a handle to move its
|
|
31
|
+
* stop, hover it for its color and remove buttons, press the ramp (or the add button) for a new
|
|
32
|
+
* stop. The ramp runs left to right whatever the gradient's own angle — it edits the stops, not
|
|
33
|
+
* the direction, as Excel's does.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* A stop has no identity of its own — the model holds offsets and colors — but a handle must keep
|
|
37
|
+
* one, or a drag past a neighbor swaps the two handles' elements as the stops re-sort, and the
|
|
38
|
+
* focus, the open popup and the armed outline land on the wrong stop. So the bar assigns each stop
|
|
39
|
+
* a key, carries the keys through every edit it makes, and matches the stops it is handed back
|
|
40
|
+
* against what it wrote; stops from elsewhere (an undo, another editor) get fresh keys.
|
|
41
|
+
*/
|
|
42
|
+
export declare const GradientStopsBar: React.MemoExoticComponent<(props: GradientStopsBarProps) => React.JSX.Element>;
|
|
43
|
+
//# sourceMappingURL=GradientStopsBar.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFill, ICell, IColor } from '@sheetxl/sdk';
|
|
3
|
+
import { TranslateFn } from '@sheetxl/utils-react';
|
|
4
|
+
import { ExhibitPopupButtonProps } from '@sheetxl/utils-mui';
|
|
5
|
+
/**
|
|
6
|
+
* Localized name for a built-in pattern. A literal `t()` pair per pattern keeps the extractor
|
|
7
|
+
* seeing `key → english`; a computed key would be invisible to it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function patternLabel(t: TranslateFn, pattern: IFill.BuiltInSheetPattern): string;
|
|
10
|
+
export interface PatternPopupButtonProps extends Omit<ExhibitPopupButtonProps, 'icon' | 'createPopupPanel'> {
|
|
11
|
+
/** The currently applied tile. */
|
|
12
|
+
selectedPattern: IFill.BuiltInSheetPattern;
|
|
13
|
+
/** The tile's mark color, so the gallery previews the pattern the user will actually get. */
|
|
14
|
+
foreground?: IColor.Serializable | null;
|
|
15
|
+
/** The color behind the marks. */
|
|
16
|
+
background?: IColor.Serializable | null;
|
|
17
|
+
onSelectPattern?: (pattern: IFill.BuiltInSheetPattern) => void;
|
|
18
|
+
createCell: (update: ICell.Update) => ICell | null;
|
|
19
|
+
darkMode?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The pattern gallery — Excel's Format Cells → Fill → Pattern Style grid, drawn from the model's
|
|
23
|
+
* own tiles and in the fill's own two colors.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PatternPopupButton: React.MemoExoticComponent<(props: PatternPopupButtonProps) => React.JSX.Element>;
|
|
26
|
+
//# sourceMappingURL=PatternPopupButton.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFill, ICell, IColor } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* A pattern fill's stored `foreground`/`background` from its colors as Excel's Format Cells dialog
|
|
5
|
+
* names them — Pattern Color (the marks) and Background Color (behind the marks).
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The two agree for every tile but `solid`. A solid tile is all background in the dialog, but the
|
|
9
|
+
* file format paints `solid` with `fgColor`, so Excel stores the dialog's Background in
|
|
10
|
+
* `foreground` and its Pattern Color in `background`. The swap is its own inverse: pass a stored
|
|
11
|
+
* fill's slots to get the dialog's colors back.
|
|
12
|
+
*/
|
|
13
|
+
export declare function toPatternSlots<C>(patternType: IFill.BuiltInSheetPattern, patternColor: C, background: C): {
|
|
14
|
+
foreground: C;
|
|
15
|
+
background: C;
|
|
16
|
+
};
|
|
17
|
+
export interface PatternSwatchProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/** The tile to draw. */
|
|
19
|
+
patternType: IFill.BuiltInSheetPattern;
|
|
20
|
+
/** The color of the tile's marks — Excel's Pattern Color. */
|
|
21
|
+
foreground?: IColor.Serializable | null;
|
|
22
|
+
/** The color behind the marks — Excel's Background Color, and all of a `solid` tile. */
|
|
23
|
+
background?: IColor.Serializable | null;
|
|
24
|
+
/**
|
|
25
|
+
* Mints the cell the pattern CSS is read from — the model owns the tile geometry, so a swatch
|
|
26
|
+
* without a workbook to ask has nothing to draw.
|
|
27
|
+
*/
|
|
28
|
+
createCell: (update: ICell.Update) => ICell | null;
|
|
29
|
+
/** Whether to bake the colors for a dark surface. */
|
|
30
|
+
darkMode?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One pattern tile, drawn exactly as the grid draws it.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* The tile geometry lives in the SDK (`IFill.toCSS` bakes it into a repeating SVG data-URI), so
|
|
37
|
+
* this asks the model for a pattern fill's CSS rather than keeping a second, drifting copy of the
|
|
38
|
+
* twenty-odd Excel tiles. That makes it generic: any `BuiltInSheetPattern` with any two colors,
|
|
39
|
+
* whether it is a menu swatch, a preview, or a legend.
|
|
40
|
+
*/
|
|
41
|
+
export declare const PatternSwatch: React.MemoExoticComponent<(props: PatternSwatchProps) => React.JSX.Element>;
|
|
42
|
+
/**
|
|
43
|
+
* The patterns Excel offers in Format Cells → Fill → Pattern Style, in Excel's own grid order (left
|
|
44
|
+
* to right, top to bottom, six to a row): solid and the grays darkest first, then the dark
|
|
45
|
+
* stripes, then the thin ones.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* `Solid` leads, as in Excel: a tile that is all background color (see {@link toPatternSlots}).
|
|
49
|
+
* `None` is omitted — it is a fill type in this model, not a tile. `Custom` is omitted because
|
|
50
|
+
* there is nothing to draw until custom tiles land.
|
|
51
|
+
*/
|
|
52
|
+
export declare const PATTERN_GALLERY: readonly IFill.BuiltInSheetPattern[];
|
|
53
|
+
//# sourceMappingURL=PatternSwatch.d.ts.map
|
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ITable } from '@sheetxl/sdk';
|
|
3
3
|
import { FloatReference } from '@sheetxl/utils-react';
|
|
4
|
+
import { MembershipOptionProps } from '../conditions/MembershipOption';
|
|
4
5
|
export interface ColumnMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/** The table column the menu is for. */
|
|
5
7
|
column?: ITable.IColumn;
|
|
6
8
|
disabled?: boolean;
|
|
9
|
+
/** The popup, closed on Apply and Cancel. */
|
|
7
10
|
floatReference: FloatReference;
|
|
11
|
+
/** Passed to the Values checklist: its rows' look, or (a test) its scroll state. */
|
|
12
|
+
propsChecklist?: MembershipOptionProps['propsChecklist'];
|
|
8
13
|
}
|
|
9
14
|
/**
|
|
10
|
-
*
|
|
15
|
+
* The column **filter menu**, Excel's dropdown as a template menu (PLAN-CONDITIONS item 8): a
|
|
16
|
+
* Sort section, Clear filter while the column holds one, and a Filter section in one of three
|
|
17
|
+
* modes under a toggle: **Values**, the column's kind (**Number**, **Text** or **Date**), and
|
|
18
|
+
* **Custom**.
|
|
19
|
+
*
|
|
20
|
+
* Values is the checklist alone, the `InSet` operator's editor, read under Display (the text the
|
|
21
|
+
* cells show) or by value from the menu under its search glyph; a blank is its (Blank) row. The
|
|
22
|
+
* kind is the shared {@link ConditionEditor} with When listing the registry's operators of that
|
|
23
|
+
* type under Excel's title (Number / Text / Date Filters), Excel's own first in Excel's order.
|
|
24
|
+
* Custom is the same editor with every operator, the family first, List (the column's checklist
|
|
25
|
+
* again), Formula, Unique and And / Or / Not among them. A rule mode
|
|
26
|
+
* opens on the family's first operator with an empty operand and the cursor in it; Custom's
|
|
27
|
+
* first visit starts from the kind's rule, and the kind's from Custom's when it is one of the
|
|
28
|
+
* family. Each mode keeps what it held while the menu is open; the condition's Ignore Blank sits
|
|
29
|
+
* under the rule editors.
|
|
30
|
+
*
|
|
31
|
+
* Apply writes the mode in view through the column's filter, ANDed with the other columns';
|
|
32
|
+
* Cancel closes.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* The checklist is a view of the column under its stored condition: a column filtered by
|
|
36
|
+
* "greater than 5" opens on its kind, and Values then lists the passing values checked; Apply
|
|
37
|
+
* writes the list. Left on its comparison, Apply leaves it as it is.
|
|
38
|
+
*
|
|
39
|
+
* A values list with nothing left out, the (Blank) row included, says nothing, so Apply clears
|
|
40
|
+
* the column's filter rather than writing it (Excel's Select All).
|
|
11
41
|
*/
|
|
12
42
|
export declare const ColumnMenu: React.NamedExoticComponent<ColumnMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
43
|
//# sourceMappingURL=ColumnMenu.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { RegisterOptions } from 'react-hook-form';
|
|
3
3
|
import { FormControlProps } from '@mui/material';
|
|
4
4
|
import { ICalculation, ICellRanges, IRange, IWorkbook } from '@sheetxl/sdk';
|
|
5
|
-
import { FormulaInputApi, FormulaInputGrammar, FormulaInputEquals, ReferenceDoneArgs } from '@sheetxl/react';
|
|
5
|
+
import { FormulaInputApi, FormulaInputGrammar, FormulaInputEquals, ReferenceDoneArgs, FormulaArgument } from '@sheetxl/react';
|
|
6
6
|
/**
|
|
7
7
|
* The height an `'above'` label adds over the input — its line plus the gap under it.
|
|
8
8
|
*
|
|
@@ -86,9 +86,9 @@ export interface FormulaFieldProps extends FormControlProps {
|
|
|
86
86
|
* A host that acts only on the commit channel should say so here rather than merely leaving
|
|
87
87
|
* {@link onChangeInput} unwired — the two look the same to the host but differ at the keyboard.
|
|
88
88
|
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
89
|
+
* The ✓/✗ adornments follow it too: shown in `'done'` while the text differs from the committed
|
|
90
|
+
* value, never in `'live'`, where there is no pending text for them to accept. {@link onDone} fires
|
|
91
|
+
* the same way in both.
|
|
92
92
|
*/
|
|
93
93
|
changeOn?: 'live' | 'done';
|
|
94
94
|
/**
|
|
@@ -113,7 +113,16 @@ export interface FormulaFieldProps extends FormControlProps {
|
|
|
113
113
|
* table-resize shape. See `UseFormulaInputOptions.pickAs`.
|
|
114
114
|
*/
|
|
115
115
|
pickAs?: 'absolute' | 'relative';
|
|
116
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Whether a pick that is exactly a dynamic array's spill writes `D2#` instead of its address.
|
|
118
|
+
* Default `false`, as Excel's range fields; the cell editor always does. See
|
|
119
|
+
* `UseFormulaInputOptions.pickSpills`.
|
|
120
|
+
*/
|
|
121
|
+
pickSpills?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Allow a comma-separated multi-range reference (typed, or Ctrl+click-picked). Default `false`;
|
|
124
|
+
* a `'formula'` field defaults to `true` and gates only the pick. See `UseFormulaInputOptions.allowMulti`.
|
|
125
|
+
*/
|
|
117
126
|
allowMulti?: boolean;
|
|
118
127
|
/**
|
|
119
128
|
* Whether references may reach other sheets. Default `true`. Set `false` for a single-sheet input (a
|
|
@@ -122,6 +131,12 @@ export interface FormulaFieldProps extends FormControlProps {
|
|
|
122
131
|
* {@link allowMulti} — see `UseFormulaInputOptions.allowCrossSheet`.
|
|
123
132
|
*/
|
|
124
133
|
allowCrossSheet?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Whether the field must hold a value. Default `false`: empty text is the cleared value (`null`).
|
|
136
|
+
* `true` makes empty text an error, so it is never committed — see
|
|
137
|
+
* `UseFormulaInputOptions.required`.
|
|
138
|
+
*/
|
|
139
|
+
required?: boolean;
|
|
125
140
|
/**
|
|
126
141
|
* Field label. Default `"Formula"` (`'reference'` grammar: `"Range"`).
|
|
127
142
|
*
|
|
@@ -161,11 +176,20 @@ export interface FormulaFieldProps extends FormControlProps {
|
|
|
161
176
|
* The parse error CHANGED — the message key, or `null` when the text became valid again.
|
|
162
177
|
*
|
|
163
178
|
* @remarks
|
|
179
|
+
* The error as the field would show it: held back while an operand is expected at the caret
|
|
180
|
+
* (`=A1+`, a lone `=`), and reported when the field is left that way.
|
|
181
|
+
*
|
|
164
182
|
* A message KEY, not a sentence (the same rule as `disabledReasons`): the error is state that
|
|
165
183
|
* outlives a language switch, so the chrome that renders it translates at display — `t(key)`, which
|
|
166
184
|
* passes a non-key through unchanged.
|
|
167
185
|
*/
|
|
168
186
|
onChangeError?: (error: string | null) => void;
|
|
187
|
+
/**
|
|
188
|
+
* An error the host found in text that PARSES — a list item holding the separator. Outlines the
|
|
189
|
+
* field and takes the helper line as a parse error does; a parse error wins when there are both.
|
|
190
|
+
* A message key or plain text, as {@link onChangeError}'s.
|
|
191
|
+
*/
|
|
192
|
+
validationError?: string | null;
|
|
169
193
|
/** Placeholder. Default `"Enter Formula"` (`'reference'` grammar: `"Enter Range"`). */
|
|
170
194
|
placeholder?: string;
|
|
171
195
|
/**
|
|
@@ -184,7 +208,7 @@ export interface FormulaFieldProps extends FormControlProps {
|
|
|
184
208
|
* {@link FORMULA_FIELD_ABOVE_LABEL_HEIGHT}).
|
|
185
209
|
*/
|
|
186
210
|
helperText?: React.ReactNode | null;
|
|
187
|
-
/** Hide the adornment cluster (✓/✗ while
|
|
211
|
+
/** Hide the adornment cluster (✓/✗ while editing in `'done'` mode; the select-current action). */
|
|
188
212
|
hideAdornment?: boolean;
|
|
189
213
|
/**
|
|
190
214
|
* Class(es) for the INNER `<input>` — `className` styles the FormControl root, which selectors
|
|
@@ -194,6 +218,11 @@ export interface FormulaFieldProps extends FormControlProps {
|
|
|
194
218
|
* decides which one takes first focus by tagging it, rather than by DOM order.
|
|
195
219
|
*/
|
|
196
220
|
classNameInput?: string;
|
|
221
|
+
/**
|
|
222
|
+
* The call argument this field's whole text is — the Function Arguments form's rows. An empty field
|
|
223
|
+
* then offers, in its hint popup, the values the parameter is limited to.
|
|
224
|
+
*/
|
|
225
|
+
argument?: FormulaArgument | null;
|
|
197
226
|
/**
|
|
198
227
|
* Reference to the element.
|
|
199
228
|
*/
|
|
@@ -26,14 +26,14 @@ export interface InputFieldProps extends FormControlProps {
|
|
|
26
26
|
* (Enter/Tab/Escape), the adornment ✓/✗, `apiRef.current.commit()`, or blur to another field.
|
|
27
27
|
* `args.reason` distinguishes accept from cancel (a cancel delivers the reverted session baseline).
|
|
28
28
|
* Not fired on an accept while the text is invalid — the error stays shown instead.
|
|
29
|
-
*
|
|
30
|
-
* Wiring this is also what shows the modal ✓/✗ adornment pair.
|
|
31
29
|
*/
|
|
32
30
|
onDone?: (value: string, args: EditDoneArgs) => void;
|
|
33
31
|
/**
|
|
34
32
|
* `'done'` suppresses the live {@link onChangeInput} notifications entirely (validation still runs —
|
|
35
|
-
* error state stays live — but the host hears only {@link onDone})
|
|
36
|
-
* commit point rather than a key the host form gets to see
|
|
33
|
+
* error state stays live — but the host hears only {@link onDone}), makes Enter the field's own
|
|
34
|
+
* commit point rather than a key the host form gets to see, and shows the ✓/✗ while the text differs
|
|
35
|
+
* from the committed value.
|
|
36
|
+
* Default `'live'`.
|
|
37
37
|
*/
|
|
38
38
|
changeOn?: 'live' | 'done';
|
|
39
39
|
/**
|
|
@@ -66,8 +66,38 @@ export interface InputFieldProps extends FormControlProps {
|
|
|
66
66
|
formOptions?: RegisterOptions;
|
|
67
67
|
/** Field label. Default `"Name"`. */
|
|
68
68
|
label?: string;
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Guidance shown under the field while it is VALID. The error takes that line when there is one —
|
|
71
|
+
* the field reserves it either way, so the layout never shifts.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* `null` (explicitly — not `undefined`, which takes the reserved default) COLLAPSES the line: the
|
|
75
|
+
* field's block ends at the input, so it centers against the buttons beside it in a toolbar-like
|
|
76
|
+
* row. An error then claims a line as it appears — for a field with no {@link onValidate}, or one
|
|
77
|
+
* whose host accepts the shift. The same contract as `FormulaField`'s `helperText`.
|
|
78
|
+
*/
|
|
79
|
+
helperText?: React.ReactNode | null;
|
|
80
|
+
/**
|
|
81
|
+
* Show the validation error on the field's helper line. Default `true`.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* `false` keeps the error outline but leaves the message to the host — for a host that collects it
|
|
85
|
+
* through {@link onChangeError} and shows it somewhere of its own. The same contract as
|
|
86
|
+
* `FormulaField`'s `showError`.
|
|
87
|
+
*/
|
|
88
|
+
showError?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The validation error CHANGED — the message key, or `null` when the text became valid again.
|
|
91
|
+
* Translate at display (`t(key)` passes a non-key through unchanged).
|
|
92
|
+
*/
|
|
93
|
+
onChangeError?: (error: string | null) => void;
|
|
94
|
+
/** Hide the adornment cluster (the ✓/✗ pair shown while editing in `'done'` mode). */
|
|
70
95
|
hideAdornment?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Attributes for the INNER `<input>` — `type`, `min`/`max`/`step`, `inputMode`, a class of the
|
|
98
|
+
* host's own. Merged over the field's defaults (spell-check and autocomplete off).
|
|
99
|
+
*/
|
|
100
|
+
propsInput?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
71
101
|
/**
|
|
72
102
|
* Underlying reference to the input element.
|
|
73
103
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormatPanelProps } from './FormatPanelParts';
|
|
2
|
+
/**
|
|
3
|
+
* The **Alignment** tab of the format pane: where text sits in the cell, how it behaves when it
|
|
4
|
+
* does not fit, and which way it runs.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The toggles are the ribbon's own commands, so they carry the ribbon's icons, tooltips, keyboard
|
|
8
|
+
* shortcuts and protection-disable for free — and pressing one here lights up the matching ribbon
|
|
9
|
+
* button, because both read the same command state. Only the two numeric fields (indent, custom
|
|
10
|
+
* angle) write the model directly: a spinner is a poor fit for a command's fire-once shape.
|
|
11
|
+
*/
|
|
12
|
+
export declare const AlignmentPanel: import('react').MemoExoticComponent<(props: FormatPanelProps) => import("react").JSX.Element>;
|
|
13
|
+
//# sourceMappingURL=AlignmentPanel.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormatPanelProps } from './FormatPanelParts';
|
|
3
|
+
/**
|
|
4
|
+
* The **Border** tab of the format pane.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Excel's model — and this one — treats a border as a PEN plus a set of edges, and the panel is laid
|
|
8
|
+
* out in that order: the pen first (color, then line style, since our line styles are drawn IN the
|
|
9
|
+
* color), then the presets, then the diagram with a button per edge around it, the way the Format
|
|
10
|
+
* Cells dialog arranges them.
|
|
11
|
+
*
|
|
12
|
+
* Every one of those buttons draws its own icon with the pen (see `BorderTemplateIcon`), so the
|
|
13
|
+
* whole panel restyles as the color or the line changes and each button previews its own edit.
|
|
14
|
+
*
|
|
15
|
+
* The pen is panel state, not cell state: it is what the next click will draw, so it survives
|
|
16
|
+
* moving the selection, exactly as the Format Cells dialog's does.
|
|
17
|
+
*
|
|
18
|
+
* Everything reads the SELECTION's border rather than the anchor cell's — inner rules only exist
|
|
19
|
+
* at range scope.
|
|
20
|
+
*/
|
|
21
|
+
export declare const BorderPanel: React.MemoExoticComponent<(props: FormatPanelProps) => React.JSX.Element>;
|
|
22
|
+
//# sourceMappingURL=BorderPanel.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IBorders } from '@sheetxl/sdk';
|
|
3
|
+
import { TranslateFn } from '@sheetxl/utils-react';
|
|
4
|
+
/**
|
|
5
|
+
* The edges the diagram lets you click — the six that a block of cells can draw.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The diagonals are not here: they would run corner to corner through both inner rules, and
|
|
9
|
+
* nearest-edge picking cannot separate three lines that all cross the same point.
|
|
10
|
+
*
|
|
11
|
+
* The order is the tie-break for a pointer sitting exactly where two lines cross, so the OUTER
|
|
12
|
+
* edges come first — a click on the left edge at its midpoint is aimed at the block's outline, not
|
|
13
|
+
* at the inner rule that happens to end there. The crossing of the two inner rules is not a tie at
|
|
14
|
+
* all: it is its own target (see {@link edgesAt}).
|
|
15
|
+
*/
|
|
16
|
+
export declare const PREVIEW_EDGES: readonly IBorders.Edge[];
|
|
17
|
+
/** The strokes currently drawn on a block, by edge. An absent entry means "no line here". */
|
|
18
|
+
export type BorderEdges = Partial<Record<IBorders.Edge, IBorders.StrokeProperties>>;
|
|
19
|
+
/** Localized name for a border edge; literal `t()` pairs keep the extractor able to see them. */
|
|
20
|
+
export declare function edgeLabel(t: TranslateFn, edge: IBorders.Edge): string;
|
|
21
|
+
/**
|
|
22
|
+
* The edges a pointer is aimed at: one line, both inner rules at their crossing, or none.
|
|
23
|
+
*
|
|
24
|
+
* @param x Pointer position relative to the diagram's top-left corner, in CSS px.
|
|
25
|
+
* @param y Pointer position relative to the diagram's top-left corner, in CSS px.
|
|
26
|
+
* @param width The diagram's width in CSS px.
|
|
27
|
+
* @param height The diagram's height in CSS px.
|
|
28
|
+
* @param isAvailable Whether an edge can be drawn at all — the inner rules cannot, on a selection
|
|
29
|
+
* with no inside, and an edge that cannot be drawn must not swallow a click aimed past it.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Nearest line wins, which is the only rule that stays honest where an inner rule meets the
|
|
33
|
+
* outline. Fixed rectangles cannot be: their zones overlap, and whichever paints later takes the
|
|
34
|
+
* whole square.
|
|
35
|
+
*
|
|
36
|
+
* The middle is the exception. Where the two inner rules cross, the pointer is within reach of
|
|
37
|
+
* both and a pixel either way would flip between them, so that square is neither: it aims at the
|
|
38
|
+
* pair, which is the 'Inside' border. Only when both can be drawn — with one inner rule there is
|
|
39
|
+
* no crossing, and the middle is just that rule.
|
|
40
|
+
*
|
|
41
|
+
* Exported because this is the part worth testing directly — jsdom lays nothing out, so a mounted
|
|
42
|
+
* diagram cannot be asked where its lines are.
|
|
43
|
+
*/
|
|
44
|
+
export declare function edgesAt(x: number, y: number, width: number, height: number, isAvailable: (edge: IBorders.Edge) => boolean): readonly IBorders.Edge[];
|
|
45
|
+
export interface BorderPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
46
|
+
/**
|
|
47
|
+
* What is drawn on each edge of the selected block right now.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Resolved DATA, not accessors: each edge of a block is read from a different cell (see
|
|
51
|
+
* `FormatSelection.getEdgeStroke`), and the panel is the one that knows which. Values also keep
|
|
52
|
+
* this component honestly re-rendering — a bag of stable callbacks looks unchanged to React even
|
|
53
|
+
* when the cells underneath have changed completely.
|
|
54
|
+
*/
|
|
55
|
+
edges: BorderEdges;
|
|
56
|
+
/** Mints the per-cell border the renderer draws. */
|
|
57
|
+
createBorder: (properties: Partial<IBorders.Properties>) => IBorders | null;
|
|
58
|
+
/**
|
|
59
|
+
* Toggle edges with the panel's active pen, as one edit.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* One edge for a line; both inner rules for the middle of the diagram, where they cross.
|
|
63
|
+
*/
|
|
64
|
+
onToggleEdges: (edges: readonly IBorders.Edge[]) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Edges this selection cannot draw — the inner rules, on a selection with no inside.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* They are left OUT, not greyed out, and the diagram reshapes around them: a selection with no
|
|
70
|
+
* inside draws one cell rather than four with two dead lines through them. A target that cannot
|
|
71
|
+
* do anything is not information, and offering it is what made the inner rules feel broken.
|
|
72
|
+
*/
|
|
73
|
+
omittedEdges?: readonly IBorders.Edge[];
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
height?: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Excel's Format Cells → Border diagram: a block of cells whose edges you click to draw or clear.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* Two cells by two, not one — the inner rules have nowhere to show on a single cell, and they are
|
|
82
|
+
* half of what a border edit is about. The lines are a real {@link StaticBorderRenderer} fed the
|
|
83
|
+
* selection's own strokes, so what you click is what the grid will draw.
|
|
84
|
+
*
|
|
85
|
+
* Aiming is by DISTANCE rather than by zone (see {@link edgesAt}), and the feedback is the edge
|
|
86
|
+
* itself: hovering lights the line a click would toggle, along its whole length — both inner
|
|
87
|
+
* rules, over their crossing. Shading a quadrant says "somewhere around here"; a lit line says
|
|
88
|
+
* which line.
|
|
89
|
+
*/
|
|
90
|
+
export declare const BorderPreview: {
|
|
91
|
+
(props: BorderPreviewProps): React.ReactElement;
|
|
92
|
+
displayName: string;
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=BorderPreview.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFill, IColor, ICell, IStyleCollection } from '@sheetxl/sdk';
|
|
3
|
+
import { FormatSelection } from './useFormatSelection';
|
|
4
|
+
/**
|
|
5
|
+
* What the Fill panel needs: one fill to show and one place to write a fill. A cell selection and a
|
|
6
|
+
* shape both answer it, which is how the same panel serves Format Cells and Format Shape.
|
|
7
|
+
*/
|
|
8
|
+
export interface FillSelection {
|
|
9
|
+
/** The fill the controls show, resolved: the anchor cell's, or the shape's. */
|
|
10
|
+
fill: IFill;
|
|
11
|
+
/** The workbook's style collection — theme swatches and recent colors for the pickers. */
|
|
12
|
+
styles: IStyleCollection;
|
|
13
|
+
/** Theme color resolution for the color pickers. */
|
|
14
|
+
schemeLookup: IColor.SchemeLookup;
|
|
15
|
+
/** Whether the GRID renders dark (not the app chrome) — swatches follow the grid. */
|
|
16
|
+
darkMode: boolean;
|
|
17
|
+
/** True when the fill cannot be changed (a protected sheet). */
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
/** Mints a detached cell for the pattern swatches (theme colors resolve against the workbook). */
|
|
20
|
+
createCell: (update: ICell.Update) => ICell | null;
|
|
21
|
+
/**
|
|
22
|
+
* Writes a fill as one undoable step.
|
|
23
|
+
*
|
|
24
|
+
* @param fill The fill, or fill properties that merge into what is there.
|
|
25
|
+
* @param description A `messageKey('op.…')` naming the step in the undo history.
|
|
26
|
+
*/
|
|
27
|
+
applyFill: (fill: IFill.Update, description?: string) => void;
|
|
28
|
+
}
|
|
29
|
+
/** The cell selection's fill: the anchor cell's, written to every selected range. */
|
|
30
|
+
export declare const fillSelectionOf: (selection: FormatSelection) => FillSelection;
|
|
31
|
+
export interface FillPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
32
|
+
/** The fill the panel reads and writes. */
|
|
33
|
+
selection: FillSelection;
|
|
34
|
+
/** Force every control off, on top of the selection's own {@link FillSelection.disabled}. */
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The most stops the gradient editor will author. The model and the xlsx file take any number
|
|
38
|
+
* (Excel draws them all; only its own dialog stops at two colors), so none is imposed here.
|
|
39
|
+
* @defaultValue the editor's own, see {@link GradientEditorProps.maxStops}
|
|
40
|
+
*/
|
|
41
|
+
maxGradientStops?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The **Fill** tab of the format pane — the one tab Excel Online does not have.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Excel buries pattern and gradient fills in a desktop-only "Fill Effects" sub-dialog, and Excel
|
|
48
|
+
* Online drops them entirely: on the web, a cell's fill is a single color. The model here has
|
|
49
|
+
* always carried all three (`IFill.Type.Solid | Pattern | Gradient`), so this tab surfaces them as
|
|
50
|
+
* one choice — pick the KIND of fill, then edit that kind — rather than hiding two of the three
|
|
51
|
+
* behind a button.
|
|
52
|
+
*
|
|
53
|
+
* `IFill.Type.None` is a fourth model type but not a fourth choice: it reads as Solid with the
|
|
54
|
+
* picker's *No Fill* swatch selected, the same swatch the ribbon offers. Setting a color was the
|
|
55
|
+
* common case and a No Fill entry in the type dropdown cost it an extra trip through that dropdown.
|
|
56
|
+
*
|
|
57
|
+
* Every control here reads {@link FormatSelection.style} and writes through
|
|
58
|
+
* {@link FormatSelection.applyStyle} — solid included. The solid swatch used to be the ribbon's
|
|
59
|
+
* `formatFillColor` command button, which reads and writes the SHEET's selection directly: correct
|
|
60
|
+
* in the task pane, wrong the moment a caller hands these panels a selection of their own. The
|
|
61
|
+
* command is still consulted for the picker's cross-surface memory (last-used color, recent
|
|
62
|
+
* colors), just not for the value.
|
|
63
|
+
*/
|
|
64
|
+
export declare const FillPanel: React.MemoExoticComponent<(props: FillPanelProps) => React.JSX.Element>;
|
|
65
|
+
//# sourceMappingURL=FillPanel.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormatPanelProps } from './FormatPanelParts';
|
|
3
|
+
/**
|
|
4
|
+
* The **Font** tab of the format pane: typeface, size, color and the character effects.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Every control here is the ribbon's own — the same family/size popups and the same toggles, just
|
|
8
|
+
* laid out for a narrow column instead of a strip. Nothing writes the model directly; the commands
|
|
9
|
+
* do, which is why the ribbon and this panel never disagree about what is bold.
|
|
10
|
+
*/
|
|
11
|
+
export declare const FontPanel: React.MemoExoticComponent<(props: FormatPanelProps) => React.JSX.Element>;
|
|
12
|
+
//# sourceMappingURL=FontPanel.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormatSelection } from './useFormatSelection';
|
|
3
|
+
export interface FormatCellPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
selection: FormatSelection;
|
|
5
|
+
/**
|
|
6
|
+
* Height of the preview box.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Roughly two grid rows — enough for vertical alignment and a tilt to read, without the pane's
|
|
10
|
+
* top third being an empty rectangle.
|
|
11
|
+
*/
|
|
12
|
+
height?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Widest the preview box is drawn, in px. It still shrinks with a narrower pane.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* A cap, not a width: the pane is several cell-widths wide, and a preview stretched across all of
|
|
18
|
+
* it stops reading as a cell — a filled format (accounting's `* `) spans the whole span, and the
|
|
19
|
+
* ends land a hand's width apart. This keeps the box near the width the value would actually be
|
|
20
|
+
* shown at.
|
|
21
|
+
*/
|
|
22
|
+
maxWidth?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The one preview shared by every tab of the format pane: the selection's ANCHOR cell, rendered the
|
|
26
|
+
* way the grid will render it.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* The pane applies live, so this is not a "what you would get" mock — it is the cell, re-read after
|
|
30
|
+
* each edit. Only the VALUE is ever substituted: a cell holding text (or nothing) previews
|
|
31
|
+
* {@link SAMPLE_VALUE} instead, so the Number tab has something to format. The style is always the
|
|
32
|
+
* real one.
|
|
33
|
+
*/
|
|
34
|
+
export declare const FormatCellPreview: React.MemoExoticComponent<(props: FormatCellPreviewProps) => React.JSX.Element>;
|
|
35
|
+
//# sourceMappingURL=FormatCellPreview.d.ts.map
|