@sheetxl/studio-mui 0.8.0-beta.6 → 0.8.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{Bi26L7L89ZK_y5Pk.cjs → 2tG9HJLr-WjsOCP3.cjs} +1 -1
- package/browser/cjs/4_Zy3pR6YXkzISoK.cjs +1 -0
- package/browser/cjs/BpG4iwTKbAnpi0wM.cjs +1 -0
- package/browser/cjs/CMfoKJ3ehdXuld_7.cjs +14 -0
- package/browser/cjs/{BQMCM3iFn4MNWAkB.cjs → HuPFsmz7kyZVo3c7.cjs} +1 -1
- package/browser/cjs/{BlNKpwiG-Q7eIi5t.cjs → g1WhGOz5epV7Hqsg.cjs} +3 -3
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{D-JQOjmAh6Gk6wVM.mjs → 80XYmJwiiFLBmpH2.mjs} +2 -2
- package/browser/esm/{CsNOEAKuHLfckItX.mjs → BIZX_0jxF9Fmaxuy.mjs} +1 -1
- package/browser/esm/BNYKPFICOYt2VRsP.mjs +68 -0
- package/browser/esm/{2_WF-hy6x4dXfEzW.mjs → BXQPMQyxdiYwawjE.mjs} +1 -1
- package/browser/esm/{C5swGBbBLdDzg_bm.mjs → BdkeyaHAtiNa6jqW.mjs} +2 -2
- package/browser/esm/{FK7vqizwRujDsqL2.mjs → BoLRDhnoO3gvviYD.mjs} +2505 -1679
- package/browser/esm/{D8FEKUKVxH32duMx.mjs → BscaD3SzYM6ysjgy.mjs} +3 -3
- package/browser/esm/{27jPjqdDLWn5qbQ8.mjs → C--IZ8To0PhVLhoX.mjs} +3 -3
- package/browser/esm/{DRUKu2I27bidfyvH.mjs → CH-Y2-p8GRvCHvd4.mjs} +1 -1
- package/browser/esm/{CKemMJZNIPnJ0dUE.mjs → CHLqCxo3afOV1Otw.mjs} +2 -2
- package/browser/esm/{BGdZT1Ka4ohDCZpW.mjs → CUhtBLyaGSkcKB_1.mjs} +3 -3
- package/browser/esm/{61ip_C1X9ls4svw6.mjs → CawSvjLj4-2Qqyef.mjs} +1 -1
- package/browser/esm/{D3b3dWTjvFd1Kj5g.mjs → Cykd-NaZAtHJlQmQ.mjs} +1 -1
- package/browser/esm/{BPzT8gL3SgD0CG7V.mjs → D-Kit71xiitqCWVY.mjs} +1303 -1302
- package/browser/esm/{BofZe0q9bsHQr0Xd.mjs → DT71hr6qq9QMKf7Q.mjs} +1 -1
- package/browser/esm/{BlWsO6M15Ii13NrV.mjs → DiKCs9R7e4MgyayQ.mjs} +2 -2
- package/browser/esm/{CyQk62MFBCep2ZZs.mjs → DkUDZxFxx9n2Cked.mjs} +2 -2
- package/browser/esm/{aGoWX29-zbUaPh2U.mjs → DpdMtsE7oOAIJqFo.mjs} +2 -2
- package/browser/esm/{BybBaLxSKyGAsxqO.mjs → F6kkwcBr0l-496tC.mjs} +3 -3
- package/browser/esm/{DTLKzrZGPkkNlncN.mjs → Q8r5yuh8Yx2ROnhC.mjs} +2 -2
- package/browser/esm/{BFxtcKJBbfjtMft-.mjs → a5G-3nVFn86pvt8H.mjs} +3 -3
- package/browser/esm/{Dzym1WSjYb_mnVkJ.mjs → ffz9LGAgGiWQQav9.mjs} +2 -2
- package/browser/esm/{p62JxLmjmWD2MQq1.mjs → iRFlbG6hQyKLVagS.mjs} +98 -97
- package/browser/esm/index.mjs +56 -56
- package/browser/esm/{JYRkZ4iKzbWnNhEs.mjs → ipftNUxAU0HR-0YP.mjs} +2 -2
- package/browser/esm/{6EK3JgWrKYfqzAfV.mjs → lftI5b4ZCHVYc6OZ.mjs} +1 -1
- package/licenses/dependencies.txt +62 -62
- package/node/esm/{K6LEXUZkuqoEn5yJ.mjs → 9k03YHFiw-wlUS8d.mjs} +1 -1
- package/node/esm/{D3xcuMwJvLJhlPNV.mjs → BHuZQ-LJ2GgDLYSz.mjs} +1 -1
- package/node/esm/{3J2-TRYWEsvnTDnO.mjs → BTZGnNrgV1na62gd.mjs} +103 -102
- package/node/esm/{CksPMsHwUSCpFnpS.mjs → Be0G9parvc2CTpFQ.mjs} +1059 -1058
- package/node/esm/{uIRinWE0OCKJvsGN.mjs → BiHw3x2LPWT-kK8G.mjs} +3 -3
- package/node/esm/{CtoRlEz1GwA88zTu.mjs → BkoorcOtOEh_Y7ck.mjs} +1 -1
- package/node/esm/{ObY_iULY2ezBYD3q.mjs → C5g2gBoUk3-cn94h.mjs} +1 -1
- package/node/esm/{JUUre9pYia7feetw.mjs → CNkqJbFlITxBA0t4.mjs} +1 -1
- package/node/esm/{qu70N1tsIwi7LmT6.mjs → CTJqjeq3smY8jw5J.mjs} +1 -1
- package/node/esm/{B2QOYsl1YmcwknsP.mjs → CTtj1NR0IrcN8PTy.mjs} +1 -1
- package/node/esm/{CE6ZU2MVb3_-FzIk.mjs → D4KDk-w7Khu7LrSi.mjs} +1 -1
- package/node/esm/{Dc4t_AYLdTAnPOIT.mjs → DHHgNbakbpNnu0oW.mjs} +1 -1
- package/node/esm/{CzERDnu2VbNTjJgI.mjs → DbLFR_dnQQmZC_jm.mjs} +8 -8
- package/node/esm/{CKOhL08sVy1N_Uza.mjs → Defb5qpSal98J5ay.mjs} +1 -1
- package/node/esm/{DDVJs9oOFXR3RfSi.mjs → Dyd7va4aqC1jIzAk.mjs} +1 -1
- package/node/esm/b05_u9WnJaVGO0nq.mjs +68 -0
- package/node/esm/index.mjs +3491 -2665
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +2 -0
- package/resources/locales/de/ui.msg.json +24 -0
- package/resources/locales/en/groups.cmd.json +8 -0
- package/resources/locales/en/ui.msg.json +24 -0
- 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/dialog/OutlineSettingsDialog.d.ts +12 -0
- package/types/src/filter/FilterList.d.ts +3 -2
- package/types/src/index.d.ts +1 -0
- package/types/src/shape/InsertShapeCommandButton.d.ts +10 -0
- package/types/src/shape/index.d.ts +2 -0
- package/types/src/studio/useStudioApp.d.ts +2 -2
- package/types/src/template/useTemplateCatalog.d.ts +5 -5
- package/types/src/workbook/DefaultRenderers.d.ts +7 -1
- package/types/src/workbook/OutlineButtons.d.ts +11 -0
- package/types/src/workbook/WorkbookElement.d.ts +1 -1
- package/browser/cjs/iFPhqab5w95hHEsT.cjs +0 -1
- package/browser/cjs/xCAd86Y_REa3Xs1o.cjs +0 -13
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.9",
|
|
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.9",
|
|
56
|
+
"@sheetxl/io": "^0.8.0-beta.9",
|
|
57
|
+
"@sheetxl/react": "^0.8.0-beta.9",
|
|
58
|
+
"@sheetxl/scripting-react": "^0.8.0-beta.9",
|
|
59
|
+
"@sheetxl/sdk": "^0.8.0-beta.9",
|
|
60
|
+
"@sheetxl/utils": "^0.8.0-beta.9",
|
|
61
|
+
"@sheetxl/utils-mui": "^0.8.0-beta.9",
|
|
62
|
+
"@sheetxl/utils-react": "^0.8.0-beta.9",
|
|
63
63
|
"clsx": "^2.1.1",
|
|
64
64
|
"csstype": "^3.2.3",
|
|
65
65
|
"file-saver": "^2.0.5",
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
"hideUnhideOptions": {
|
|
133
133
|
"label": "Ausblenden und Einblenden"
|
|
134
134
|
},
|
|
135
|
+
"groupOptions": {},
|
|
135
136
|
"homeToolbar": {
|
|
136
137
|
"label": "Start"
|
|
137
138
|
},
|
|
@@ -227,6 +228,7 @@
|
|
|
227
228
|
"label": "Unterstreichen",
|
|
228
229
|
"description": "Alle Unterstreichungsarten."
|
|
229
230
|
},
|
|
231
|
+
"ungroupOptions": {},
|
|
230
232
|
"verticalAlignOptions": {
|
|
231
233
|
"label": "Vertikale Ausrichtung",
|
|
232
234
|
"description": "Festlegen, wie Text in vertikaler Richtung in der Zelle platziert wird."
|
|
@@ -73,6 +73,25 @@
|
|
|
73
73
|
"command.saveAsFormat.compact": "als {format}",
|
|
74
74
|
"command.saveAsFormat.label": "Als {format} speichern",
|
|
75
75
|
"command.saveAsFormat.workbook": "Als {format} speichern",
|
|
76
|
+
"comment.addPrompt": "Fügen Sie Kommentare hinzu, um Zellen mit anderen zu besprechen.",
|
|
77
|
+
"comment.cancel": "Abbrechen",
|
|
78
|
+
"comment.delete": "Löschen",
|
|
79
|
+
"comment.edit": "Bearbeiten",
|
|
80
|
+
"comment.filter.all": "Alle",
|
|
81
|
+
"comment.filter.open": "Offen",
|
|
82
|
+
"comment.filter.resolved": "Erledigt",
|
|
83
|
+
"comment.more": "Weitere Aktionen",
|
|
84
|
+
"comment.new": "Neuer Kommentar",
|
|
85
|
+
"comment.noMatches": "Keine passenden Kommentare.",
|
|
86
|
+
"comment.placeholder": "Unterhaltung beginnen",
|
|
87
|
+
"comment.post": "Posten",
|
|
88
|
+
"comment.reopen": "Erneut öffnen",
|
|
89
|
+
"comment.reply": "Antworten",
|
|
90
|
+
"comment.resolve": "Unterhaltung als erledigt markieren",
|
|
91
|
+
"comment.resolved": "Erledigt",
|
|
92
|
+
"comment.save": "Speichern",
|
|
93
|
+
"comment.title": "Kommentare",
|
|
94
|
+
"comment.unknownAuthor": "Unbekannt",
|
|
76
95
|
"condition.above": "Über",
|
|
77
96
|
"condition.and": "und",
|
|
78
97
|
"condition.below": "Unter",
|
|
@@ -554,6 +573,10 @@
|
|
|
554
573
|
"numberStats.sum": "Summe",
|
|
555
574
|
"op.editNamedItem": "Benanntes Element ''{name}'' bearbeiten",
|
|
556
575
|
"op.importData": "Daten importieren",
|
|
576
|
+
"outlineSettings.automaticStyles": "Automatische Formate",
|
|
577
|
+
"outlineSettings.summaryBelow": "Ergebniszeilen unterhalb der Detaildaten",
|
|
578
|
+
"outlineSettings.summaryRight": "Ergebnisspalten rechts von Detaildaten",
|
|
579
|
+
"outlineSettings.title": "Gliederungseinstellungen",
|
|
557
580
|
"password.change": "Ändern…",
|
|
558
581
|
"password.clear": "Entfernen",
|
|
559
582
|
"password.current": "Aktuelles Kennwort",
|
|
@@ -610,6 +633,7 @@
|
|
|
610
633
|
"resizeHeader.titleColumns": "Spaltenbreite ändern",
|
|
611
634
|
"resizeHeader.titleRows": "Zeilenhöhe ändern",
|
|
612
635
|
"resizeHeader.unit": "Einheit",
|
|
636
|
+
"shape.recentShapes": "Zuletzt verwendete Formen",
|
|
613
637
|
"sheetProtection.cells.alwaysUnlocked": "Immer entsperrt",
|
|
614
638
|
"sheetProtection.cells.description": "Gilt für die ausgewählten Zellen und wirkt, sobald das Blatt geschützt ist.",
|
|
615
639
|
"sheetProtection.cells.locked": "Heben Sie den Blattschutz auf, um den Zellschutz zu ändern.",
|
|
@@ -132,6 +132,10 @@
|
|
|
132
132
|
"hideUnhideOptions": {
|
|
133
133
|
"label": "Hide & Unhide"
|
|
134
134
|
},
|
|
135
|
+
"groupOptions": {
|
|
136
|
+
"label": "Group",
|
|
137
|
+
"description": "Group rows or columns so they can be collapsed and expanded together.\nSelect entire rows or columns and click Group, or choose which from the menu."
|
|
138
|
+
},
|
|
135
139
|
"homeToolbar": {
|
|
136
140
|
"label": "Home"
|
|
137
141
|
},
|
|
@@ -227,6 +231,10 @@
|
|
|
227
231
|
"description": "All underline stylings.",
|
|
228
232
|
"label": "Underline"
|
|
229
233
|
},
|
|
234
|
+
"ungroupOptions": {
|
|
235
|
+
"label": "Ungroup",
|
|
236
|
+
"description": "Remove rows or columns from their group."
|
|
237
|
+
},
|
|
230
238
|
"verticalAlignOptions": {
|
|
231
239
|
"description": "Configure how text is placed in the vertical direction of the cell.",
|
|
232
240
|
"label": "Vertical Alignment"
|
|
@@ -73,6 +73,25 @@
|
|
|
73
73
|
"command.saveAsFormat.compact": "as {format}",
|
|
74
74
|
"command.saveAsFormat.label": "Save as {format}",
|
|
75
75
|
"command.saveAsFormat.workbook": "Save as {format}",
|
|
76
|
+
"comment.addPrompt": "Add comments to discuss cells with others.",
|
|
77
|
+
"comment.cancel": "Cancel",
|
|
78
|
+
"comment.delete": "Delete",
|
|
79
|
+
"comment.edit": "Edit",
|
|
80
|
+
"comment.filter.all": "All",
|
|
81
|
+
"comment.filter.open": "Open",
|
|
82
|
+
"comment.filter.resolved": "Resolved",
|
|
83
|
+
"comment.more": "More actions",
|
|
84
|
+
"comment.new": "New Comment",
|
|
85
|
+
"comment.noMatches": "No comments match.",
|
|
86
|
+
"comment.placeholder": "Start a conversation",
|
|
87
|
+
"comment.post": "Post",
|
|
88
|
+
"comment.reopen": "Reopen",
|
|
89
|
+
"comment.reply": "Reply",
|
|
90
|
+
"comment.resolve": "Resolve thread",
|
|
91
|
+
"comment.resolved": "Resolved",
|
|
92
|
+
"comment.save": "Save",
|
|
93
|
+
"comment.title": "Comments",
|
|
94
|
+
"comment.unknownAuthor": "Unknown",
|
|
76
95
|
"condition.above": "Above",
|
|
77
96
|
"condition.and": "and",
|
|
78
97
|
"condition.below": "Below",
|
|
@@ -554,6 +573,10 @@
|
|
|
554
573
|
"numberStats.sum": "Sum",
|
|
555
574
|
"op.editNamedItem": "Edit Named ''{name}''",
|
|
556
575
|
"op.importData": "Import Data",
|
|
576
|
+
"outlineSettings.automaticStyles": "Automatic styles",
|
|
577
|
+
"outlineSettings.summaryBelow": "Summary rows below detail",
|
|
578
|
+
"outlineSettings.summaryRight": "Summary columns to right of detail",
|
|
579
|
+
"outlineSettings.title": "Outline Settings",
|
|
557
580
|
"password.change": "Change…",
|
|
558
581
|
"password.clear": "Clear",
|
|
559
582
|
"password.current": "Current password",
|
|
@@ -610,6 +633,7 @@
|
|
|
610
633
|
"resizeHeader.titleColumns": "Resize Columns",
|
|
611
634
|
"resizeHeader.titleRows": "Resize Rows",
|
|
612
635
|
"resizeHeader.unit": "Unit",
|
|
636
|
+
"shape.recentShapes": "Recently Used Shapes",
|
|
613
637
|
"sheetProtection.cells.alwaysUnlocked": "Always unlocked",
|
|
614
638
|
"sheetProtection.cells.description": "Applies to the selected cells, and takes effect when the sheet is protected.",
|
|
615
639
|
"sheetProtection.cells.locked": "Unprotect the sheet to change cell protection.",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CellCoords } from '@sheetxl/utils';
|
|
3
|
+
import { IComment, ISheet } from '@sheetxl/sdk';
|
|
4
|
+
export interface CommentCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
5
|
+
/** The sheet the card's cell is on. */
|
|
6
|
+
sheet: ISheet;
|
|
7
|
+
/** The cell the card belongs to. */
|
|
8
|
+
coords: CellCoords;
|
|
9
|
+
/** The thread, or `null` for a draft: nothing is written until it is posted. */
|
|
10
|
+
comment: IComment | null;
|
|
11
|
+
/**
|
|
12
|
+
* A new value each time the card's text should take the caret: the draft's field, or the reply
|
|
13
|
+
* box of a thread. `0` or omitted for never.
|
|
14
|
+
*/
|
|
15
|
+
focusRequest?: number;
|
|
16
|
+
/** Marks the card as the one for the selected cell. */
|
|
17
|
+
highlighted?: boolean;
|
|
18
|
+
/** Draws the card raised, for one that floats over the grid. */
|
|
19
|
+
elevated?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A click on the card's surface, anywhere that is not a control. Omit when there is nothing to
|
|
22
|
+
* select.
|
|
23
|
+
*/
|
|
24
|
+
onSelect?: () => void;
|
|
25
|
+
/** The draft was cancelled. */
|
|
26
|
+
onClose?: () => void;
|
|
27
|
+
/** The draft was posted, as this comment. */
|
|
28
|
+
onPosted?: (comment: IComment) => void;
|
|
29
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* One threaded comment as a card: each entry's initials, author, time and text, the replies, a
|
|
33
|
+
* reply box, and a menu to edit, resolve or delete. With no comment it is a draft, a field that
|
|
34
|
+
* writes nothing until it is posted.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* The same card is listed in the comments task pane and floats beside a cell. Editing an entry's
|
|
38
|
+
* text drops its mentions, as `IComment.setContent` says.
|
|
39
|
+
*/
|
|
40
|
+
export declare const CommentCard: React.MemoExoticComponent<(props: CommentCardProps) => React.JSX.Element>;
|
|
41
|
+
//# sourceMappingURL=CommentCard.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
import { CommentsPaneArgs, TaskPaneProps } from '@sheetxl/react';
|
|
4
|
+
/** Which threads the pane lists. */
|
|
5
|
+
export type CommentsFilter = 'all' | 'open' | 'resolved';
|
|
6
|
+
/** Persistence key for the filter the pane was last left on. */
|
|
7
|
+
export declare const COMMENTS_FILTER_KEY = "comments.filter";
|
|
8
|
+
export interface CommentsTaskPaneProps extends TaskPaneProps<IWorkbook, CommentsPaneArgs> {
|
|
9
|
+
/** The filter the pane opens with when none has been chosen before. @defaultValue `'all'` */
|
|
10
|
+
defaultFilter?: CommentsFilter;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* **Comments** — every threaded comment on the active sheet, in cell order, each as a
|
|
14
|
+
* {@link CommentCard}.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Clicking a card selects its cell, and selecting a cell scrolls to its card and marks it. A new
|
|
18
|
+
* comment is a draft card on the selected cell that writes nothing until it is posted. Notes are
|
|
19
|
+
* not listed: a note is edited in its box on the sheet.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CommentsTaskPane: React.MemoExoticComponent<(props: CommentsTaskPaneProps) => React.JSX.Element | null>;
|
|
22
|
+
export default CommentsTaskPane;
|
|
23
|
+
//# sourceMappingURL=CommentsTaskPane.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CommandContext } from '@sheetxl/react';
|
|
3
|
+
import { InputDialogProps } from '@sheetxl/utils-mui';
|
|
4
|
+
export interface OutlineSettingsDialogProps extends InputDialogProps<CommandContext.OutlineSettings> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Excel's Data → Outline settings: where summary rows and columns sit, and whether the automatic
|
|
8
|
+
* outline styles apply. The `outlineSettings` command opens it and commits its `onInput`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const OutlineSettingsDialog: React.NamedExoticComponent<OutlineSettingsDialogProps>;
|
|
11
|
+
export default OutlineSettingsDialog;
|
|
12
|
+
//# sourceMappingURL=OutlineSettingsDialog.d.ts.map
|
|
@@ -24,8 +24,9 @@ export interface FilterListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
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}),
|
|
28
|
-
* their texts
|
|
27
|
+
* the filter's own ({@link IFilter.getItems}), read by displayed text as a spreadsheet's list is,
|
|
28
|
+
* listed once they arrive; the condition holds their texts under `byDisplay`. (The "By value"
|
|
29
|
+
* toggle is Phase D's.)
|
|
29
30
|
*/
|
|
30
31
|
export declare const FilterList: React.ForwardRefExoticComponent<Omit<FilterListProps, "ref"> & React.RefAttributes<IFilterListElement>>;
|
|
31
32
|
//# sourceMappingURL=FilterList.d.ts.map
|
package/types/src/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommandPopupButtonProps } from '@sheetxl/utils-mui';
|
|
2
|
+
export interface InsertShapeCommandButtonProps extends CommandPopupButtonProps {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Insert > Shapes: a popup gallery of the preset shapes by section, as Excel lays it out. Picking
|
|
6
|
+
* one runs `insertShape` with the preset name. Built-in presets picked here are remembered, most
|
|
7
|
+
* recent first, in a Recently Used Shapes section shown above the gallery once there are any.
|
|
8
|
+
*/
|
|
9
|
+
export declare const InsertShapeCommandButton: import('react').NamedExoticComponent<Omit<InsertShapeCommandButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
10
|
+
//# sourceMappingURL=InsertShapeCommandButton.d.ts.map
|
|
@@ -20,8 +20,8 @@ export interface StudioAppOptions extends WindowChromeOptions {
|
|
|
20
20
|
startWith?: 'welcome';
|
|
21
21
|
/**
|
|
22
22
|
* The template catalog the welcome and "Choose a template" dialogs show: a URL serving
|
|
23
|
-
* `workbook
|
|
24
|
-
* @defaultValue the latest published `@sheetxl/workbook
|
|
23
|
+
* `templates-workbook/contents.json`. Use it to pin a version or to serve your own templates.
|
|
24
|
+
* @defaultValue the latest published `@sheetxl/templates-workbook`
|
|
25
25
|
*/
|
|
26
26
|
templatePath?: string;
|
|
27
27
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ResourceIndex } from '@sheetxl/utils';
|
|
2
2
|
/**
|
|
3
|
-
* Where the template catalog is read from when no `templatePath` is given: the
|
|
4
|
-
* `@sheetxl/workbook
|
|
3
|
+
* Where the template catalog is read from when no `templatePath` is given: the published
|
|
4
|
+
* `@sheetxl/templates-workbook` for this build's release channel.
|
|
5
5
|
*/
|
|
6
|
-
export declare const DEFAULT_TEMPLATE_PATH
|
|
6
|
+
export declare const DEFAULT_TEMPLATE_PATH: string;
|
|
7
7
|
/** A group of templates. Each category is a folder in the catalog. */
|
|
8
8
|
export interface TemplateCategory {
|
|
9
9
|
/** The folder name. Entries refer to their category by this id. */
|
|
@@ -42,8 +42,8 @@ export interface TemplateCatalog {
|
|
|
42
42
|
}
|
|
43
43
|
export interface TemplateCatalogOptions {
|
|
44
44
|
/**
|
|
45
|
-
* The catalog to read: a URL that serves `workbook
|
|
46
|
-
* version (`https://unpkg.com/@sheetxl/workbook
|
|
45
|
+
* The catalog to read: a URL that serves `templates-workbook/contents.json`. Use it to pin a
|
|
46
|
+
* version (`https://unpkg.com/@sheetxl/templates-workbook@1.4.0/dist`) or to serve your own.
|
|
47
47
|
* @defaultValue {@link DEFAULT_TEMPLATE_PATH}
|
|
48
48
|
*/
|
|
49
49
|
path?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { SheetElementProps, SheetTabProps } from '@sheetxl/react';
|
|
2
|
+
import { SheetElementProps, SheetTabProps, CommentCardRenderProps, OutlineButtonProps, OutlineLevelButtonProps } from '@sheetxl/react';
|
|
3
3
|
import { AnimatedLoadingPanelProps, StackTraceErrorPanelProps } from '@sheetxl/utils-mui';
|
|
4
4
|
import { FormulaBarProps } from '../formulaBar';
|
|
5
5
|
import { ColumnMenuProps } from '../filter';
|
|
@@ -9,6 +9,12 @@ import { SheetsAllMenuProps, SheetTabMenuProps } from '../sheet';
|
|
|
9
9
|
import { WorkbookStripProps } from './WorkbookStrip';
|
|
10
10
|
import { WorkbookContextMenuProps } from './WorkbookContextMenu';
|
|
11
11
|
import { FillMenuProps } from './FillMenu';
|
|
12
|
+
/** The card of a threaded comment as it floats beside its cell. */
|
|
13
|
+
export declare const renderCommentCard: (props: CommentCardRenderProps) => React.ReactElement;
|
|
14
|
+
/** The collapse / expand button of a row or column group, in the outline gutter. */
|
|
15
|
+
export declare const renderOutlineButton: (props: OutlineButtonProps) => React.ReactElement;
|
|
16
|
+
/** A level button `1`..`n` of the outline. */
|
|
17
|
+
export declare const renderOutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactElement;
|
|
12
18
|
export declare const renderMovableContextMenu: (props: MovableContextMenuProps) => React.ReactElement;
|
|
13
19
|
export declare const renderFillMenu: (props: FillMenuProps) => React.ReactElement;
|
|
14
20
|
export declare const renderWorkbookContextMenu: (props: WorkbookContextMenuProps) => React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OutlineButtonProps, OutlineLevelButtonProps } from '@sheetxl/react';
|
|
3
|
+
/**
|
|
4
|
+
* The studio's collapse / expand button for a row or column group.
|
|
5
|
+
*/
|
|
6
|
+
export declare const OutlineButton: (props: OutlineButtonProps) => React.ReactElement;
|
|
7
|
+
/**
|
|
8
|
+
* The studio's level button `1`..`n`: the collapse button's hover, in the corner knob's colors.
|
|
9
|
+
*/
|
|
10
|
+
export declare const OutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=OutlineButtons.d.ts.map
|
|
@@ -3,7 +3,7 @@ import { WorkbookElementProps, IWorkbookElement } from '@sheetxl/react';
|
|
|
3
3
|
* The MUI workbook element.
|
|
4
4
|
*
|
|
5
5
|
* A thin wrapper around the chromeless `WorkbookElement` from `@sheetxl/react`: it supplies the grid's
|
|
6
|
-
* own MUI popups (tabs, context/column/movable menus, loading) via the render seams. Theming flows
|
|
6
|
+
* own MUI popups (tabs, context/column/movable menus, comment cards, loading) via the render seams. Theming flows
|
|
7
7
|
* through the injected `--sxl-*` token matrix (from the studio root) — no theme bridge is needed here;
|
|
8
8
|
* the grid self-sources its light/dark scheme from the shared appearance preference. The surrounding
|
|
9
9
|
* chrome (toolbar, formula bar, status bar) is composed by the Studio layer, not here.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./Bo9Kx3L_XQkGPBJ5.cjs"),t=require("./CPcBvw4ZPwHVTUZF.cjs");let n=require("@sheetxl/react"),r=require("@sheetxl/utils-react"),i=require("react");i=e.n(i,1);let a=require("@sheetxl/utils-mui"),o=require("react/jsx-runtime"),s=require("@mui/material"),c=require("@sheetxl/utils");var l=`8 / 5`,u=e=>{let{entry:t}=e,r=((0,n.useGridColorScheme)()===`dark`?t.thumbnailDarkUrl:void 0)??t.thumbnailUrl;return(0,o.jsx)(d,{src:r},r)},d=e=>{let{src:t}=e,[n,a]=(0,i.useState)(t?`loading`:`failed`);return(0,o.jsx)(s.Box,{className:`template-thumbnail`,sx:{position:`relative`,width:`100%`,aspectRatio:l,overflow:`hidden`,borderRadius:1,border:e=>`1px solid ${e.palette.divider}`,background:e=>e.palette.background.paper,transition:`border-color 150ms, box-shadow 150ms`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:n===`failed`?(0,o.jsx)(r.DynamicIcon,{iconKey:`FileNew`,style:{fontSize:`2.5rem`,opacity:.4}}):(0,o.jsx)(`img`,{src:t,alt:``,loading:`lazy`,draggable:!1,onLoad:()=>a(`loaded`),onError:()=>a(`failed`),style:{width:`100%`,height:`100%`,objectFit:`cover`,objectPosition:`top left`,opacity:+(n===`loaded`),transition:`opacity 150ms ease-out`}})})},f=e=>{let{entry:t,category:n,onSelect:r}=e;return(0,o.jsxs)(s.ButtonBase,{className:`template-tile`,disableRipple:!0,onClick:r,"aria-label":n?`${t.title}, ${n.title}`:t.title,title:t.description,sx:{display:`flex`,flexDirection:`column`,alignItems:`stretch`,textAlign:`left`,gap:.75,padding:1,borderRadius:1,"&:hover .template-thumbnail, &.Mui-focusVisible .template-thumbnail":{borderColor:e=>e.palette.primary.main,boxShadow:3},"&.Mui-focusVisible":{outline:e=>`2px solid ${e.palette.primary.main}`,outlineOffset:`-2px`}},children:[(0,o.jsx)(u,{entry:t}),(0,o.jsxs)(s.Box,{sx:{minWidth:0},children:[(0,o.jsx)(s.Typography,{variant:`subtitle2`,component:`div`,noWrap:!0,children:t.title}),n?(0,o.jsx)(s.Typography,{variant:`caption`,component:`div`,noWrap:!0,sx:{color:`text.secondary`},children:n.title}):null]})]})},p=()=>(0,o.jsxs)(s.Box,{sx:{padding:1,display:`flex`,flexDirection:`column`,gap:.75},children:[(0,o.jsx)(s.Skeleton,{variant:`rectangular`,sx:{width:`100%`,height:`auto`,aspectRatio:l,borderRadius:1}}),(0,o.jsx)(s.Skeleton,{variant:`text`,width:`60%`}),(0,o.jsx)(s.Skeleton,{variant:`text`,width:`35%`})]}),m=(0,i.memo)((0,i.forwardRef)((e,n)=>{let{catalog:a,onSelect:c,filter:l,groupBy:u,renderTile:d,tileMinWidth:m=180,emptyLabel:h,visibleRows:g,sx:_=r.ReactUtils.EmptyCssProperties,style:v,className:y,onKeyDown:b,...x}=e,S=(0,r.useTranslator)(),C=(0,i.useRef)(null),[w,T]=(0,i.useState)(0),E=(0,i.useRef)(null);E.current=()=>{let e=C.current?.querySelector(`.template-grid`)?.firstElementChild,t=(e?.offsetHeight?e:e?.firstElementChild)?.getBoundingClientRect().height;t&&T(t)},(0,i.useLayoutEffect)(()=>{g&&E.current?.()}),(0,i.useEffect)(()=>{let e=C.current;if(!g||!e)return;let t=new ResizeObserver(()=>E.current?.());return t.observe(e),()=>t.disconnect()},[g]);let D=(0,i.useMemo)(()=>new Map(a.categories.map(e=>[e.id,e])),[a.categories]),O=(0,i.useMemo)(()=>{let e=l?a.entries.filter(l):a.entries;if(!u)return[{key:null,entries:e}];let t=new Map;for(let e of a.categories)t.set(e.id,[]);for(let n of e){let e=u(n),r=t.get(e);r||t.set(e,r=[]),r.push(n)}return[...t].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,title:D.get(e)?.title??e,entries:t}))},[a.entries,a.categories,D,l,u]),k={display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(${m}px, 1fr))`,gap:`8px`},A;return A=a.status===`loading`?(0,o.jsx)(s.Box,{className:`template-grid`,sx:k,"aria-busy":`true`,"aria-label":S(`template.loading`),children:Array.from({length:6},(e,t)=>(0,o.jsx)(p,{},t))}):a.status===`error`?(0,o.jsxs)(s.Box,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1,padding:4,textAlign:`center`},children:[(0,o.jsx)(s.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:S(`template.loadFailed`)}),(0,o.jsx)(s.Button,{variant:`outlined`,size:`small`,onClick:a.retry,children:S(`template.retry`)})]}):O.every(e=>e.entries.length===0)?(0,o.jsx)(s.Typography,{variant:`body2`,sx:{color:`text.secondary`,padding:4,textAlign:`center`},children:h??S(`template.empty`)}):O.map(e=>(0,o.jsxs)(s.Box,{role:`group`,"aria-label":e.title,children:[e.title?(0,o.jsx)(s.Typography,{variant:`overline`,component:`div`,sx:{color:`text.secondary`,paddingX:1},children:e.title}):null,(0,o.jsx)(s.Box,{className:`template-grid`,sx:k,children:e.entries.map(e=>{let t={category:D.get(e.category),onSelect:()=>c?.(e)};return d?(0,o.jsx)(s.Box,{sx:{display:`contents`},children:d(e,t)},e.id):(0,o.jsx)(f,{entry:e,...t},e.id)})})]},e.key??``)),(0,o.jsx)(s.Box,{ref:n,className:t.t(y,`template-panel`),sx:_,style:g&&w?{boxSizing:`content-box`,scrollbarGutter:`stable`,height:`${Math.ceil(g*w+8*(g-1))}px`,minHeight:`${Math.ceil(w)}px`,...v}:v,...x,children:(0,o.jsx)(s.Box,{ref:C,onKeyDown:e=>{if(b?.(e),e.defaultPrevented)return;let t=C.current;if(!t)return;let n=Array.from(t.querySelectorAll(`.template-tile`)),r=n.indexOf(document.activeElement);if(r<0)return;let i=n[r].offsetTop,a=n.findIndex(e=>e.offsetTop===i&&e.parentElement===n[r].parentElement),o=0;for(;n[a+o]?.offsetTop===i;)o++;let s=r;switch(e.key){case`ArrowRight`:s=r+1;break;case`ArrowLeft`:s=r-1;break;case`ArrowDown`:s=r+Math.max(1,o);break;case`ArrowUp`:s=r-Math.max(1,o);break;case`Home`:s=0;break;case`End`:s=n.length-1;break;default:return}s=Math.max(0,Math.min(n.length-1,s)),e.preventDefault(),n[s].focus()},children:A})})}));m.displayName=`TemplatePanel`;var h=(e,t,n)=>{let r=t.trim().toLowerCase();return!r||[e.title,e.description,n?.title,...e.tags??[]].some(e=>e?.toLowerCase().includes(r))},g=e=>{let{value:t,onChange:n,sx:i}=e,c=(0,r.useTranslator)();return(0,o.jsx)(s.TextField,{size:`small`,value:t,placeholder:c(`template.search`),onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Escape`&&t&&(e.stopPropagation(),n(``))},sx:i,slotProps:{input:{sx:{backgroundColor:`background.paper`},startAdornment:(0,o.jsx)(s.InputAdornment,{position:`start`,children:(0,o.jsx)(r.DynamicIcon,{iconKey:`Find`})}),endAdornment:t?(0,o.jsx)(s.InputAdornment,{position:`end`,children:(0,o.jsx)(a.ExhibitIconButton,{"aria-label":c(`template.clearSearch`),propsTooltip:{label:c(`template.clearSearch`)},onMouseDown:e=>{e.button===0&&e.preventDefault()},onClick:()=>n(``),icon:(0,o.jsx)(r.DynamicIcon,{iconKey:`Close`}),size:`small`})}):void 0},htmlInput:{spellCheck:!1,autoComplete:`off`,"aria-label":c(`template.search`)}}})},_=`https://unpkg.com/@sheetxl/workbook-templates/dist`,v=`workbook-templates`,y=e=>e.replace(/\.[^/.]+$/,``).replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).trim().replace(/\b\w/g,e=>e.toUpperCase()),b=(e,t)=>{let n=`${e}${e.endsWith(`/`)?``:`/`}${v}/${t}`;return typeof document>`u`?n:new URL(n,document.baseURI).href},x=e=>typeof e==`string`&&e?e:void 0,S=new Map,C=(e=_)=>{let t=S.get(e);return t||(t=(async()=>{let t=(await(0,c.listResources)(`templates`,v,e)).find(e=>e.meta?.schema!==void 0);if(!t)throw Error(`No template catalog found at '${e}'.`);return Math.floor(Number(t.meta?.schema))===1?((e,t)=>{let n=Array.isArray(e.meta?.categories)?e.meta.categories:[],r=[],i=new Set;for(let e of n){let t=x(e?.id);t&&!i.has(t)&&(i.add(t),r.push({id:t,title:x(e.title)??y(t),description:x(e.description),icon:x(e.icon)}))}let a=[];for(let n of e.entries){let e=n.path,o=e.split(`/`);if(o.length!==2||!/\.(?:xlsx|sxl|csv)$/i.test(e))continue;let s=x(n.category)??o[0];i.has(s)||(i.add(s),r.push({id:s,title:y(s)}));let c=x(n.thumbnail),l=x(n.thumbnailDark);a.push({id:e,title:x(n.title)??y(o[1]),category:s,description:x(n.description),tags:Array.isArray(n.tags)?n.tags.filter(e=>typeof e==`string`):void 0,thumbnailUrl:c?b(t,c):void 0,thumbnailDarkUrl:l?b(t,l):void 0,sourceUrl:b(t,e)})}return{categories:r,entries:a}})(t,e):(console.warn(`Template catalog at '${e}' has schema ${t.meta?.schema}; expected 1.`),{categories:[],entries:[]})})(),S.set(e,t),t.catch(()=>{S.delete(e)})),t},w=(e={})=>{let{path:t=_}=e,[n,r]=(0,i.useState)(0),[a,o]=(0,i.useState)({status:`loading`,categories:[],entries:[]});return(0,i.useEffect)(()=>{let e=!1;return o(e=>e.status===`loading`?e:{status:`loading`,categories:[],entries:[]}),C(t).then(t=>{e||o({status:`ready`,...t})},t=>{e||o({status:`error`,categories:[],entries:[],error:t})}),()=>{e=!0}},[t,n]),{...a,retry:(0,i.useCallback)(()=>{r(e=>e+1)},[])}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return C}});
|