@sheetxl/studio-mui 0.8.0-beta.5 → 0.8.0-beta.6
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/{BGvoJjUs21bbuE1i.cjs → 3RXtLkq7wTAV6y_e.cjs} +1 -1
- package/browser/cjs/{BXkdjAb4jpTr412c.cjs → BD50lsTki7wvzb5g.cjs} +1 -1
- package/browser/cjs/BlNKpwiG-Q7eIi5t.cjs +8 -0
- package/browser/cjs/ByIUHPOa02D7XbdC.cjs +1 -0
- package/browser/cjs/{eCw4rAEIYE3BftpG.cjs → CkroJ2FmfFvk6Eyv.cjs} +1 -1
- package/browser/cjs/{B9GcCj7sj8XdjPZF.cjs → CzJvR12QCQb-0Rtn.cjs} +1 -1
- package/browser/cjs/{3uprnzi2l0iT17Dg.cjs → D-Yo5aV9STT5KH4G.cjs} +1 -1
- package/browser/cjs/{BHb7TnK1NmimV4OX.cjs → DwkiLFWUtLC8ZcIQ.cjs} +1 -1
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/xCAd86Y_REa3Xs1o.cjs +13 -0
- package/browser/esm/{DkWV5seJEk7n5n4f.mjs → 27jPjqdDLWn5qbQ8.mjs} +3 -3
- package/browser/esm/{0RwF0cH7JQ-VqL4E.mjs → 2_WF-hy6x4dXfEzW.mjs} +1 -1
- package/browser/esm/{CfwoCDjpHNheDLn1.mjs → 61ip_C1X9ls4svw6.mjs} +1 -1
- package/browser/esm/{D_kD4qmjhElkOeRw.mjs → 6EK3JgWrKYfqzAfV.mjs} +1 -1
- package/browser/esm/{DFQo3TQ5Lpt6_Vid.mjs → BFxtcKJBbfjtMft-.mjs} +2 -2
- package/browser/esm/{BhUPwPyeqs6QNdfZ.mjs → BGdZT1Ka4ohDCZpW.mjs} +3 -3
- package/browser/esm/{C828ANqeXNxG8adc.mjs → BPzT8gL3SgD0CG7V.mjs} +1016 -978
- package/browser/esm/{DDYeKYs_XIOjhieg.mjs → BlWsO6M15Ii13NrV.mjs} +2 -2
- package/browser/esm/{Ot_3uk9g5RQpAjcQ.mjs → BofZe0q9bsHQr0Xd.mjs} +1 -1
- package/browser/esm/{ZLszpvKCQ6ZVPKdC.mjs → BybBaLxSKyGAsxqO.mjs} +3 -3
- package/browser/esm/{C2Ja33FV0pE1u_b4.mjs → C5swGBbBLdDzg_bm.mjs} +2 -2
- package/browser/esm/{GZvjjMyv09_4zahu.mjs → CKemMJZNIPnJ0dUE.mjs} +2 -2
- package/browser/esm/{aNqEbtO2cALJwwos.mjs → CsNOEAKuHLfckItX.mjs} +1 -1
- package/browser/esm/CyQk62MFBCep2ZZs.mjs +223 -0
- package/browser/esm/{DkuGZXKiwLKsUN_D.mjs → D-JQOjmAh6Gk6wVM.mjs} +2 -2
- package/browser/esm/{ONmBo80X5eV6cBBI.mjs → D3b3dWTjvFd1Kj5g.mjs} +1 -1
- package/browser/esm/{P8cqCkmugGNd2vkm.mjs → D8FEKUKVxH32duMx.mjs} +3 -3
- package/browser/esm/{DzxWYVoWw4-RT-Ia.mjs → DRUKu2I27bidfyvH.mjs} +1 -1
- package/browser/esm/{DFAzrYRM9N1LhRsL.mjs → DTLKzrZGPkkNlncN.mjs} +2 -2
- package/browser/esm/{bC4EbB4OILhPseb3.mjs → Dzym1WSjYb_mnVkJ.mjs} +2 -2
- package/browser/esm/{FZXipbgDJzTXFMSX.mjs → FK7vqizwRujDsqL2.mjs} +1825 -1743
- package/browser/esm/{DG26kflIdO_PIeNZ.mjs → JYRkZ4iKzbWnNhEs.mjs} +2 -2
- package/browser/esm/{26__l2vZsdgD-nJx.mjs → aGoWX29-zbUaPh2U.mjs} +2 -2
- package/browser/esm/index.mjs +12 -12
- package/browser/esm/{BDHzwq_DKJi-l3vm.mjs → p62JxLmjmWD2MQq1.mjs} +2 -2
- package/licenses/dependencies.txt +79 -79
- package/node/esm/{BOsZituO28YENQvh.mjs → 3J2-TRYWEsvnTDnO.mjs} +1 -1
- package/node/esm/{COd_Ly7pt0y62C8c.mjs → B2QOYsl1YmcwknsP.mjs} +9 -9
- package/node/esm/{CAe57GIDt8E3Sj1R.mjs → CE6ZU2MVb3_-FzIk.mjs} +1 -1
- package/node/esm/{B9mtSfhFe3Hjcx9T.mjs → CKOhL08sVy1N_Uza.mjs} +1 -1
- package/node/esm/{CS307VndSoCLgQ-m.mjs → CksPMsHwUSCpFnpS.mjs} +1135 -1096
- package/node/esm/{6HLpHxyQNZYCN2_o.mjs → CtoRlEz1GwA88zTu.mjs} +1 -1
- package/node/esm/{B77SESbao6p6Y4Dy.mjs → CzERDnu2VbNTjJgI.mjs} +8 -8
- package/node/esm/{4HI6dheaskyg9kLm.mjs → D3xcuMwJvLJhlPNV.mjs} +1 -1
- package/node/esm/{BKpja0BXFbcWlnni.mjs → DDVJs9oOFXR3RfSi.mjs} +1 -1
- package/node/esm/{C4o3AryrtuiHuFLr.mjs → Dc4t_AYLdTAnPOIT.mjs} +1 -1
- package/node/esm/{BT8pKXqqPi8PAXbL.mjs → JUUre9pYia7feetw.mjs} +1 -1
- package/node/esm/{DHVHJBTqBhlJQXpX.mjs → K6LEXUZkuqoEn5yJ.mjs} +1 -1
- package/node/esm/{oAiHfSODZnkRxiTN.mjs → ObY_iULY2ezBYD3q.mjs} +1 -1
- package/node/esm/index.mjs +2873 -2792
- package/node/esm/{aAEiFrxe-aYXbogR.mjs → qu70N1tsIwi7LmT6.mjs} +1 -1
- package/node/esm/{DCJNQumUzquqdCpn.mjs → uIRinWE0OCKJvsGN.mjs} +2 -2
- package/package.json +9 -9
- package/resources/locales/de/ui.msg.json +3 -4
- package/resources/locales/en/ui.msg.json +3 -4
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +6 -0
- package/types/src/conditions/BetweenOption.d.ts +5 -0
- package/types/src/conditions/ScalarOption.d.ts +18 -0
- package/types/src/dialog/index.d.ts +0 -1
- package/types/src/filter/FilterList.d.ts +3 -3
- package/types/src/form/FormulaField.d.ts +6 -0
- package/types/src/format/AlignmentPanel.d.ts +1 -2
- package/types/src/format/BorderPreview.d.ts +23 -13
- package/types/src/format/useFormatSelection.d.ts +3 -2
- package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +1 -2
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +13 -0
- package/types/src/itemsPanel/index.d.ts +1 -0
- package/types/src/studio/StudioCommands.d.ts +2 -2
- package/types/src/studio/StudioProps.d.ts +1 -1
- package/types/src/studio/StudioSplitPane.d.ts +1 -1
- package/browser/cjs/CucKgy044KxMHXrx.cjs +0 -13
- package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +0 -3
- package/browser/cjs/L0TaaQ9lceHCeg8C.cjs +0 -8
- package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +0 -1
- package/browser/esm/BkCuNLKQc4KN4Ss4.mjs +0 -97
- package/browser/esm/CMBpd4LN1GYbtCdW.mjs +0 -222
- package/node/esm/r_EDiG9j1gFuHgF9.mjs +0 -98
- package/types/src/dialog/CommentsDialog.d.ts +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { a as e, i as o, n as t, r as i, t as l } from "./
|
|
7
|
+
import { a as e, i as o, n as t, r as i, t as l } from "./3J2-TRYWEsvnTDnO.mjs";
|
|
8
8
|
import { VERSION as n } from "@sheetxl/sdk";
|
|
9
9
|
import { LogoTextNoPaddingIcon as a } from "@sheetxl/react";
|
|
10
10
|
import { DynamicIcon as r, useTranslator as d } from "@sheetxl/utils-react";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/studio-mui",
|
|
3
3
|
"description": "Studio - Spreadsheet UI built with SheetXL SDK using React & MUI.",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.6",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
53
53
|
"@dnd-kit/sortable": "^10.0.0",
|
|
54
54
|
"@dnd-kit/utilities": "^3.2.2",
|
|
55
|
-
"@sheetxl/grid-react": "^0.8.0-beta.
|
|
56
|
-
"@sheetxl/io": "^0.8.0-beta.
|
|
57
|
-
"@sheetxl/react": "^0.8.0-beta.
|
|
58
|
-
"@sheetxl/scripting-react": "^0.8.0-beta.
|
|
59
|
-
"@sheetxl/sdk": "^0.8.0-beta.
|
|
60
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
61
|
-
"@sheetxl/utils-mui": "^0.8.0-beta.
|
|
62
|
-
"@sheetxl/utils-react": "^0.8.0-beta.
|
|
55
|
+
"@sheetxl/grid-react": "^0.8.0-beta.6",
|
|
56
|
+
"@sheetxl/io": "^0.8.0-beta.6",
|
|
57
|
+
"@sheetxl/react": "^0.8.0-beta.6",
|
|
58
|
+
"@sheetxl/scripting-react": "^0.8.0-beta.6",
|
|
59
|
+
"@sheetxl/sdk": "^0.8.0-beta.6",
|
|
60
|
+
"@sheetxl/utils": "^0.8.0-beta.6",
|
|
61
|
+
"@sheetxl/utils-mui": "^0.8.0-beta.6",
|
|
62
|
+
"@sheetxl/utils-react": "^0.8.0-beta.6",
|
|
63
63
|
"clsx": "^2.1.1",
|
|
64
64
|
"csstype": "^3.2.3",
|
|
65
65
|
"file-saver": "^2.0.5",
|
|
@@ -73,10 +73,6 @@
|
|
|
73
73
|
"command.saveAsFormat.compact": "als {format}",
|
|
74
74
|
"command.saveAsFormat.label": "Als {format} speichern",
|
|
75
75
|
"command.saveAsFormat.workbook": "Als {format} speichern",
|
|
76
|
-
"comments.label": "Kommentare",
|
|
77
|
-
"comments.placeholder": "Geben Sie einen Kommentar ein.",
|
|
78
|
-
"comments.titleEdit": "Kommentare bearbeiten",
|
|
79
|
-
"comments.titleInsert": "Kommentare einfügen",
|
|
80
76
|
"condition.above": "Über",
|
|
81
77
|
"condition.and": "und",
|
|
82
78
|
"condition.below": "Unter",
|
|
@@ -94,6 +90,7 @@
|
|
|
94
90
|
"condition.groupBasic": "Einfach",
|
|
95
91
|
"condition.groupCombine": "Kombinieren",
|
|
96
92
|
"condition.ignoreBlanks": "Leere Zellen ignorieren",
|
|
93
|
+
"condition.invalidDateTime": "Datum oder Uhrzeit eingeben",
|
|
97
94
|
"condition.items": "Elemente",
|
|
98
95
|
"condition.listItemHasComma": "Ein Listeneintrag darf kein Komma enthalten",
|
|
99
96
|
"condition.listPreview": "{count, plural, =0 {Keine Einträge} one {# Eintrag} other {# Einträge}}",
|
|
@@ -411,12 +408,14 @@
|
|
|
411
408
|
"findReplace.within": "Durchsuchen",
|
|
412
409
|
"format.accountingUnderline": "Buchhaltungsunterstreichung",
|
|
413
410
|
"format.borderDiagram": "Klicken Sie auf eine Kante, um sie zu zeichnen oder zu entfernen",
|
|
411
|
+
"format.color": "Farbe",
|
|
414
412
|
"format.degrees": "Grad",
|
|
415
413
|
"format.effects": "Effekte",
|
|
416
414
|
"format.fontFamily": "Schriftart",
|
|
417
415
|
"format.fontSize": "Schriftgrad",
|
|
418
416
|
"format.horizontalAlignment": "Horizontale Ausrichtung",
|
|
419
417
|
"format.indent": "Einzug",
|
|
418
|
+
"format.indentUnit": "Zeichen",
|
|
420
419
|
"format.merge": "Verbinden",
|
|
421
420
|
"format.orientation": "Textdrehung",
|
|
422
421
|
"format.overflow": "Textüberlauf",
|
|
@@ -73,10 +73,6 @@
|
|
|
73
73
|
"command.saveAsFormat.compact": "as {format}",
|
|
74
74
|
"command.saveAsFormat.label": "Save as {format}",
|
|
75
75
|
"command.saveAsFormat.workbook": "Save as {format}",
|
|
76
|
-
"comments.label": "Comments",
|
|
77
|
-
"comments.placeholder": "Enter a comment.",
|
|
78
|
-
"comments.titleEdit": "Edit Comments",
|
|
79
|
-
"comments.titleInsert": "Insert Comments",
|
|
80
76
|
"condition.above": "Above",
|
|
81
77
|
"condition.and": "and",
|
|
82
78
|
"condition.below": "Below",
|
|
@@ -94,6 +90,7 @@
|
|
|
94
90
|
"condition.groupBasic": "Basic",
|
|
95
91
|
"condition.groupCombine": "Combine",
|
|
96
92
|
"condition.ignoreBlanks": "Ignore Blanks",
|
|
93
|
+
"condition.invalidDateTime": "Enter a date or a time",
|
|
97
94
|
"condition.items": "Items",
|
|
98
95
|
"condition.listItemHasComma": "A list item cannot contain a comma",
|
|
99
96
|
"condition.listPreview": "{count, plural, =0 {No items} one {# item} other {# items}}",
|
|
@@ -411,12 +408,14 @@
|
|
|
411
408
|
"findReplace.within": "Within",
|
|
412
409
|
"format.accountingUnderline": "Accounting Underline",
|
|
413
410
|
"format.borderDiagram": "Click an edge to draw or clear it",
|
|
411
|
+
"format.color": "Color",
|
|
414
412
|
"format.degrees": "Degrees",
|
|
415
413
|
"format.effects": "Effects",
|
|
416
414
|
"format.fontFamily": "Font",
|
|
417
415
|
"format.fontSize": "Size",
|
|
418
416
|
"format.horizontalAlignment": "Horizontal Alignment",
|
|
419
417
|
"format.indent": "Indent",
|
|
418
|
+
"format.indentUnit": "Characters",
|
|
420
419
|
"format.merge": "Merge",
|
|
421
420
|
"format.orientation": "Orientation",
|
|
422
421
|
"format.overflow": "Overflow",
|
|
@@ -90,6 +90,12 @@ export interface AnchorItemsDescriptor<T extends AnchorItem> {
|
|
|
90
90
|
* need nothing here — protected ranges do, because hashing a password is asynchronous.
|
|
91
91
|
*/
|
|
92
92
|
beforeSave?(edited: T): Promise<void> | void;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the temporary item can be saved as it is — see `ItemsDescriptor.validate`.
|
|
95
|
+
*
|
|
96
|
+
* @returns A message key naming the problem, or `null`.
|
|
97
|
+
*/
|
|
98
|
+
validate?(edited: T): string | null;
|
|
93
99
|
/**
|
|
94
100
|
* Applies the edited (temporary) item back onto the existing collection item on save.
|
|
95
101
|
* The add path (`index === -1`) uses `collection.add` and does not call this.
|
|
@@ -9,6 +9,11 @@ export interface BetweenProps extends BoxProps {
|
|
|
9
9
|
* The callback function to handle changes in the between option.
|
|
10
10
|
*/
|
|
11
11
|
onOptionChange: (option: ICondition.BetweenOption) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The selector the bounds are compared under. A date or time selector has its bounds typed and
|
|
14
|
+
* shown as dates or times.
|
|
15
|
+
*/
|
|
16
|
+
selector?: ICondition.ISelector | null;
|
|
12
17
|
/**
|
|
13
18
|
* If true, makes the editor read-only.
|
|
14
19
|
*/
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Scalar, ICalculation } from '@sheetxl/sdk';
|
|
2
2
|
import { FormulaFieldProps } from '../form';
|
|
3
|
+
/**
|
|
4
|
+
* What a typed literal is, for an operand that is a date or a time.
|
|
5
|
+
*/
|
|
6
|
+
export type ScalarOptionLiteral = 'date' | 'time' | 'dateTime';
|
|
3
7
|
export interface ScalarOptionProps extends Omit<FormulaFieldProps, 'value' | 'onChange'> {
|
|
4
8
|
/**
|
|
5
9
|
* The option to edit — a literal (number, text, boolean), or a formula.
|
|
@@ -9,6 +13,15 @@ export interface ScalarOptionProps extends Omit<FormulaFieldProps, 'value' | 'on
|
|
|
9
13
|
* The callback function to handle changes in the option.
|
|
10
14
|
*/
|
|
11
15
|
onOptionChange: (option: Scalar | ICalculation.IFormula) => void;
|
|
16
|
+
/**
|
|
17
|
+
* How a typed literal is read. Omitted, numeric text is a number and anything else is text.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* A date or time literal is typed as it is into a cell (`9/23/95`, `14:30`), held as its serial,
|
|
21
|
+
* and shown back as a date or time. Text that is neither is held as typed and outlined as an
|
|
22
|
+
* error, which also holds back the editor's Save.
|
|
23
|
+
*/
|
|
24
|
+
literal?: ScalarOptionLiteral;
|
|
12
25
|
/**
|
|
13
26
|
* If true, makes the editor read-only.
|
|
14
27
|
*/
|
|
@@ -24,6 +37,11 @@ export interface ScalarOptionProps extends Omit<FormulaFieldProps, 'value' | 'on
|
|
|
24
37
|
* An imported operand like `=$A$1` arrives as a formula param; a number input rendered it blank
|
|
25
38
|
* and destroyed it on the first keystroke. Here it reads back as a formula, with the formula
|
|
26
39
|
* editor's reference picking and token coloring once the `=` is typed.
|
|
40
|
+
*
|
|
41
|
+
* The operand reaches the condition when the edit is DONE — Enter, Tab, a blur to another field,
|
|
42
|
+
* the ✓, or the editor's Save — not per keystroke. Every prefix of `=NOW()` is a formula that
|
|
43
|
+
* evaluates to an error, and a rule that is re-evaluated on each of them warns on each of them;
|
|
44
|
+
* `09/2` is a date, but not the one being typed.
|
|
27
45
|
*/
|
|
28
46
|
export declare const ScalarOption: import('react').NamedExoticComponent<ScalarOptionProps>;
|
|
29
47
|
//# sourceMappingURL=ScalarOption.d.ts.map
|
|
@@ -23,9 +23,9 @@ export interface FilterListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
23
23
|
* the other columns' — one Promise, one undo step.
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
* Interim (PLAN-DROPDOWN Phase D rewrites the whole menu on the condition editor)
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* Interim (PLAN-DROPDOWN Phase D rewrites the whole menu on the condition editor). The values are
|
|
27
|
+
* the filter's own ({@link IFilter.getItems}), listed once they arrive, and the condition holds
|
|
28
|
+
* their texts.
|
|
29
29
|
*/
|
|
30
30
|
export declare const FilterList: React.ForwardRefExoticComponent<Omit<FilterListProps, "ref"> & React.RefAttributes<IFilterListElement>>;
|
|
31
31
|
//# sourceMappingURL=FilterList.d.ts.map
|
|
@@ -131,6 +131,12 @@ export interface FormulaFieldProps extends FormControlProps {
|
|
|
131
131
|
* {@link allowMulti} — see `UseFormulaInputOptions.allowCrossSheet`.
|
|
132
132
|
*/
|
|
133
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;
|
|
134
140
|
/**
|
|
135
141
|
* Field label. Default `"Formula"` (`'reference'` grammar: `"Range"`).
|
|
136
142
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { FormatPanelProps } from './FormatPanelParts';
|
|
3
2
|
/**
|
|
4
3
|
* The **Alignment** tab of the format pane: where text sits in the cell, how it behaves when it
|
|
@@ -10,5 +9,5 @@ import { FormatPanelProps } from './FormatPanelParts';
|
|
|
10
9
|
* button, because both read the same command state. Only the two numeric fields (indent, custom
|
|
11
10
|
* angle) write the model directly: a spinner is a poor fit for a command's fire-once shape.
|
|
12
11
|
*/
|
|
13
|
-
export declare const AlignmentPanel:
|
|
12
|
+
export declare const AlignmentPanel: import('react').MemoExoticComponent<(props: FormatPanelProps) => import("react").JSX.Element>;
|
|
14
13
|
//# sourceMappingURL=AlignmentPanel.d.ts.map
|
|
@@ -10,8 +10,8 @@ import { TranslateFn } from '@sheetxl/utils-react';
|
|
|
10
10
|
*
|
|
11
11
|
* The order is the tie-break for a pointer sitting exactly where two lines cross, so the OUTER
|
|
12
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
|
|
14
|
-
*
|
|
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
15
|
*/
|
|
16
16
|
export declare const PREVIEW_EDGES: readonly IBorders.Edge[];
|
|
17
17
|
/** The strokes currently drawn on a block, by edge. An absent entry means "no line here". */
|
|
@@ -19,7 +19,7 @@ export type BorderEdges = Partial<Record<IBorders.Edge, IBorders.StrokePropertie
|
|
|
19
19
|
/** Localized name for a border edge; literal `t()` pairs keep the extractor able to see them. */
|
|
20
20
|
export declare function edgeLabel(t: TranslateFn, edge: IBorders.Edge): string;
|
|
21
21
|
/**
|
|
22
|
-
* The
|
|
22
|
+
* The edges a pointer is aimed at: one line, both inner rules at their crossing, or none.
|
|
23
23
|
*
|
|
24
24
|
* @param x Pointer position relative to the diagram's top-left corner, in CSS px.
|
|
25
25
|
* @param y Pointer position relative to the diagram's top-left corner, in CSS px.
|
|
@@ -29,15 +29,19 @@ export declare function edgeLabel(t: TranslateFn, edge: IBorders.Edge): string;
|
|
|
29
29
|
* with no inside, and an edge that cannot be drawn must not swallow a click aimed past it.
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Nearest line wins, which is the only rule that stays honest where
|
|
33
|
-
* rectangles cannot be:
|
|
34
|
-
*
|
|
35
|
-
*
|
|
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.
|
|
36
40
|
*
|
|
37
41
|
* Exported because this is the part worth testing directly — jsdom lays nothing out, so a mounted
|
|
38
42
|
* diagram cannot be asked where its lines are.
|
|
39
43
|
*/
|
|
40
|
-
export declare function
|
|
44
|
+
export declare function edgesAt(x: number, y: number, width: number, height: number, isAvailable: (edge: IBorders.Edge) => boolean): readonly IBorders.Edge[];
|
|
41
45
|
export interface BorderPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
46
|
/**
|
|
43
47
|
* What is drawn on each edge of the selected block right now.
|
|
@@ -51,8 +55,13 @@ export interface BorderPreviewProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
51
55
|
edges: BorderEdges;
|
|
52
56
|
/** Mints the per-cell border the renderer draws. */
|
|
53
57
|
createBorder: (properties: Partial<IBorders.Properties>) => IBorders | null;
|
|
54
|
-
/**
|
|
55
|
-
|
|
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;
|
|
56
65
|
/**
|
|
57
66
|
* Edges this selection cannot draw — the inner rules, on a selection with no inside.
|
|
58
67
|
*
|
|
@@ -73,9 +82,10 @@ export interface BorderPreviewProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
73
82
|
* half of what a border edit is about. The lines are a real {@link StaticBorderRenderer} fed the
|
|
74
83
|
* selection's own strokes, so what you click is what the grid will draw.
|
|
75
84
|
*
|
|
76
|
-
* Aiming is by DISTANCE rather than by zone (see {@link
|
|
77
|
-
* itself: hovering lights the line a click would toggle, along its whole length
|
|
78
|
-
* quadrant says "somewhere around here"; a lit line says
|
|
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.
|
|
79
89
|
*/
|
|
80
90
|
export declare const BorderPreview: {
|
|
81
91
|
(props: BorderPreviewProps): React.ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBorders, IWorkbook, ISheet, ICell, IStyle, IStyleCollection, IColor } from '@sheetxl/sdk';
|
|
1
|
+
import { IBorders, IWorkbook, ISheet, ICell, ICellRange, IStyle, IStyleCollection, IColor } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Everything the format panels need from the workbook, resolved from the live selection.
|
|
4
4
|
*
|
|
@@ -40,6 +40,7 @@ export interface FormatSelection {
|
|
|
40
40
|
*
|
|
41
41
|
* @param update The style delta, or a SEQUENCE of them applied in order.
|
|
42
42
|
* @param description A `messageKey('op.…')` naming the step in the undo history.
|
|
43
|
+
* @param autoFit How the selection is fit afterwards, when the default style fit is not it.
|
|
43
44
|
*
|
|
44
45
|
* @remarks
|
|
45
46
|
* A sequence is how a caller expresses REPLACE rather than merge. A style delta merges into
|
|
@@ -47,7 +48,7 @@ export interface FormatSelection {
|
|
|
47
48
|
* one standing — there is no value for "no color" to write. Erasing the edge first and drawing
|
|
48
49
|
* it second says the whole thing, and the batch keeps it one step in the undo history.
|
|
49
50
|
*/
|
|
50
|
-
applyStyle: (update: IStyle.Update | readonly IStyle.Update[], description?: string) => void;
|
|
51
|
+
applyStyle: (update: IStyle.Update | readonly IStyle.Update[], description?: string, autoFit?: ICellRange.AutoFitOptions) => void;
|
|
51
52
|
/** Mints a detached cell for the previews (theme + named styles resolve against the workbook). */
|
|
52
53
|
createCell: (update: ICell.Update) => ICell | null;
|
|
53
54
|
/** Mints a detached border for the border diagram, the way the border picker's context does. */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commits whatever a field still holds onto the editor's draft.
|
|
3
|
+
*
|
|
4
|
+
* @returns `false` to refuse the save — the field holds text it cannot commit — which leaves the
|
|
5
|
+
* editor open on it.
|
|
6
|
+
*/
|
|
7
|
+
export type EditorCommit = () => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Where a field inside an {@link EditorPanel} registers to be committed when Save is pressed.
|
|
10
|
+
*/
|
|
11
|
+
export interface EditorCommits {
|
|
12
|
+
/**
|
|
13
|
+
* @returns An unregister callback.
|
|
14
|
+
*/
|
|
15
|
+
register(commit: EditorCommit): () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Provided by {@link EditorPanel}; `null` outside of one.
|
|
19
|
+
*/
|
|
20
|
+
export declare const EditorCommitContext: import('react').Context<EditorCommits | null>;
|
|
21
|
+
/**
|
|
22
|
+
* Has the enclosing {@link EditorPanel} commit this field before it saves.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* For a field that commits on done rather than per change. Its commit points are its own keys, its
|
|
26
|
+
* ✓ and a blur to another field; Save is a button, which takes focus without any of them, so text
|
|
27
|
+
* typed but not yet committed would never reach the draft the save reads.
|
|
28
|
+
*
|
|
29
|
+
* Does nothing outside an editor — the same field on a card has no Save to answer to.
|
|
30
|
+
*/
|
|
31
|
+
export declare const useEditorCommit: (commit: EditorCommit) => void;
|
|
32
|
+
//# sourceMappingURL=EditorCommit.d.ts.map
|
|
@@ -3,8 +3,7 @@ import { ItemMessageKeys } from './ItemsDescriptor';
|
|
|
3
3
|
export interface EditorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
* The feature's catalog keys for the cancel/save labels.
|
|
6
|
-
|
|
7
|
-
/**
|
|
6
|
+
*
|
|
8
7
|
* `Required`, because these are the editor's own buttons: a list that reaches this panel at all
|
|
9
8
|
* is an authorable one, and an authorable list supplies them (see `ItemsDescriptor.createDraft`).
|
|
10
9
|
*/
|
|
@@ -178,6 +178,19 @@ export interface ItemsDescriptor<T = any, D = T> {
|
|
|
178
178
|
* {@link save} reads it (hashing a password, say).
|
|
179
179
|
*/
|
|
180
180
|
beforeSave?(draft: D): Promise<void> | void;
|
|
181
|
+
/**
|
|
182
|
+
* Whether the draft can be saved as it is.
|
|
183
|
+
*
|
|
184
|
+
* @returns A message key naming the problem, or `null`. The problem is shown and the editor stays
|
|
185
|
+
* open on the draft.
|
|
186
|
+
*
|
|
187
|
+
* @remarks
|
|
188
|
+
* Asked after the editor's fields have committed what they still held and after
|
|
189
|
+
* {@link beforeSave}, so it reads the draft as {@link save} would. For what a single field
|
|
190
|
+
* cannot take, the field refuses the save itself (`useEditorCommit`); this is for what only the
|
|
191
|
+
* whole draft can answer — bounds the wrong way around, a condition missing an operand.
|
|
192
|
+
*/
|
|
193
|
+
validate?(draft: D): string | null;
|
|
181
194
|
/**
|
|
182
195
|
* Persists the draft.
|
|
183
196
|
*
|
|
@@ -26,7 +26,7 @@ export interface ContributeStudioCommandsHandlers {
|
|
|
26
26
|
* the {@link Command.CommandContribution} handle, so `contribution.remove()` tears it down.
|
|
27
27
|
*/
|
|
28
28
|
export declare function contributeStudioCommands(contribution: Command.CommandContribution, handlers: ContributeStudioCommandsHandlers): void;
|
|
29
|
-
/** The resolved appearance state the bridge threads in (from `
|
|
29
|
+
/** The resolved appearance state the bridge threads in (from `usePersistentState` + theme hooks). */
|
|
30
30
|
export interface StudioAppearanceState {
|
|
31
31
|
/** The persisted mode override (`null` = follow system). */
|
|
32
32
|
mode: ThemeMode | null;
|
|
@@ -43,7 +43,7 @@ export interface StudioAppearanceState {
|
|
|
43
43
|
/**
|
|
44
44
|
* Contribute the studio **appearance** toggles — light/dark mode, system-default, dark-grid, dark-images.
|
|
45
45
|
* Their `state`/`label`/`icon` are dynamic, so this re-runs when the appearance state changes (the bridge
|
|
46
|
-
* owns the `
|
|
46
|
+
* owns the `usePersistentState` and re-invokes on change). Ported from `useStudioCommands` L569-600.
|
|
47
47
|
*/
|
|
48
48
|
export declare function contributeStudioAppearance(contribution: Command.CommandContribution, s: StudioAppearanceState): void;
|
|
49
49
|
/** The UI-language state the bridge threads in (from `DefaultLanguagePackService`). */
|
|
@@ -197,7 +197,7 @@ export interface StudioProps extends Omit<PaperProps, 'autoFocus' | 'ref'> {
|
|
|
197
197
|
* @remarks
|
|
198
198
|
* This is *config*, not state. Light/dark **mode** and the dark-grid/dark-image toggles are self-managed by
|
|
199
199
|
* Studio as persisted preferences (see {@link @sheetxl/react!ThemeStateKey}), driven by the surrounding
|
|
200
|
-
* `
|
|
200
|
+
* `PersistentStateProvider` — not by props. A wrapping `TokenThemeProvider` layers token overrides on top.
|
|
201
201
|
*/
|
|
202
202
|
muiTheme?: ThemeOptions;
|
|
203
203
|
/**
|
|
@@ -29,7 +29,7 @@ export interface StudioSplitPaneProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
29
29
|
*/
|
|
30
30
|
position?: number | string | Partial<Record<SplitPaneLayoutKey, number>>;
|
|
31
31
|
/**
|
|
32
|
-
* When set, the split position is self-managed and persisted under this key (via `
|
|
32
|
+
* When set, the split position is self-managed and persisted under this key (via `usePersistentState`
|
|
33
33
|
* against the surrounding persistence store) as a per-slot map. The resized position of each layout slot
|
|
34
34
|
* (horizontal vs vertical split, and eventually before/after side) is remembered independently. Any slot
|
|
35
35
|
* not yet resized is seeded from {@link position}; {@link onPositionChange} still fires if provided.
|