@a3s-lab/office 0.2.2 → 0.4.0
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/COLLABORATION_ROADMAP.md +426 -0
- package/README.md +649 -10
- package/dist/0~1403.js +1 -1
- package/dist/0~2805.js +1279 -0
- package/dist/{0~use-office-draft.js → 0~345.js} +30 -1
- package/dist/0~3539.js +1 -1
- package/dist/0~3557.js +1 -1
- package/dist/0~3635.js +1 -1
- package/dist/0~4595.js +123 -12
- package/dist/0~4980.js +154 -0
- package/dist/0~5050.js +124 -113
- package/dist/{0~9512.js → 0~6090.js} +540 -3
- package/dist/0~7048.js +92 -66
- package/dist/0~7614.js +2 -1
- package/dist/0~7754.js +5653 -0
- package/dist/0~9445.js +1 -1
- package/dist/0~document-editor.js +4992 -3323
- package/dist/0~markdown-editor.js +250 -44
- package/dist/0~pdf-viewer.js +1016 -24
- package/dist/0~presentation-editor.js +179 -8
- package/dist/0~spreadsheet-editor.js +3371 -578
- package/dist/0~work-docx-export.js +6801 -658
- package/dist/0~work-docx-import.js +1388 -795
- package/dist/0~work-office-diagnostics.js +524 -30
- package/dist/0~work-pptx-export.js +2 -1
- package/dist/0~work-pptx-import.js +1 -2
- package/dist/0~work-presentation-charts.js +1 -1
- package/dist/2591.js +197 -0
- package/dist/3818.js +1090 -0
- package/dist/4104.js +970 -60
- package/dist/432.js +171 -14
- package/dist/4476.js +2008 -0
- package/dist/4560.js +674 -0
- package/dist/4650.js +70 -0
- package/dist/{1134.js → 5184.js} +183 -1
- package/dist/6489.js +18 -18
- package/dist/7060.js +132 -0
- package/dist/8715.js +2 -136
- package/dist/8928.js +16778 -0
- package/dist/9787.js +209 -0
- package/dist/core.d.ts +29 -9
- package/dist/core.js +10 -2
- package/dist/index.js +13 -3
- package/dist/internal/collaboration/office-collaboration-flat-json.d.ts +13 -0
- package/dist/internal/collaboration/office-collaboration-json.d.ts +4 -0
- package/dist/internal/collaboration/office-collaboration-presence.d.ts +86 -0
- package/dist/internal/collaboration/office-collaboration-transport.d.ts +42 -0
- package/dist/internal/collaboration/office-collaboration.d.ts +85 -0
- package/dist/internal/collaboration/office-document-collaboration-bibliography.d.ts +7 -0
- package/dist/internal/collaboration/office-document-collaboration-claims.d.ts +9 -0
- package/dist/internal/collaboration/office-document-collaboration-comments.d.ts +7 -0
- package/dist/internal/collaboration/office-document-collaboration-sidecar-utils.d.ts +27 -0
- package/dist/internal/collaboration/office-document-collaboration-sidecars.d.ts +16 -0
- package/dist/internal/collaboration/office-document-collaboration.d.ts +45 -0
- package/dist/internal/collaboration/office-markdown-collaboration.d.ts +31 -0
- package/dist/internal/collaboration/office-pdf-collaboration-claims.d.ts +4 -0
- package/dist/internal/collaboration/office-pdf-collaboration-conflicts.d.ts +2 -0
- package/dist/internal/collaboration/office-pdf-collaboration-model.d.ts +26 -0
- package/dist/internal/collaboration/office-pdf-collaboration-records.d.ts +21 -0
- package/dist/internal/collaboration/office-pdf-collaboration-types.d.ts +91 -0
- package/dist/internal/collaboration/office-pdf-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-pdf-collaboration.d.ts +35 -0
- package/dist/internal/collaboration/office-presentation-collaboration-model.d.ts +25 -0
- package/dist/internal/collaboration/office-presentation-collaboration-records.d.ts +22 -0
- package/dist/internal/collaboration/office-presentation-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-presentation-collaboration.d.ts +32 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-cells.d.ts +13 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-claims.d.ts +4 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-conflicts.d.ts +2 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-flat-json.d.ts +10 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-model.d.ts +31 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-records.d.ts +17 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration.d.ts +32 -0
- package/dist/internal/design-system/primitives/navigation/tabs.d.ts +3 -1
- package/dist/internal/features/work/components/work-document-page-border.d.ts +6 -0
- package/dist/internal/features/work/editors/document-command-catalog.d.ts +536 -0
- package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -1
- package/dist/internal/features/work/editors/document-editor-support.d.ts +7 -3
- package/dist/internal/features/work/editors/document-editor.d.ts +8 -2
- package/dist/internal/features/work/editors/document-external-content.d.ts +14 -0
- package/dist/internal/features/work/editors/document-format-clipboard.d.ts +6 -0
- package/dist/internal/features/work/editors/document-format-tools.d.ts +4 -0
- package/dist/internal/features/work/editors/document-layout-panel.d.ts +4 -1
- package/dist/internal/features/work/editors/document-page-chrome-wps-shortcuts.d.ts +2 -0
- package/dist/internal/features/work/editors/document-page-layout-ribbon.d.ts +14 -0
- package/dist/internal/features/work/editors/document-page-stack.d.ts +10 -1
- package/dist/internal/features/work/editors/document-page-thumbnail.d.ts +2 -0
- package/dist/internal/features/work/editors/document-pagination-run-coordinator.d.ts +26 -0
- package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +20 -1
- package/dist/internal/features/work/editors/document-review-navigation.d.ts +9 -0
- package/dist/internal/features/work/editors/document-statistics-dialog.d.ts +7 -0
- package/dist/internal/features/work/editors/document-status-bar.d.ts +2 -1
- package/dist/internal/features/work/editors/document-table-properties-dialog-model.d.ts +4 -1
- package/dist/internal/features/work/editors/document-toolbar.d.ts +19 -42
- package/dist/internal/features/work/editors/document-wps-shortcuts.d.ts +12 -0
- package/dist/internal/features/work/editors/document-zoom.d.ts +17 -0
- package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +1 -1
- package/dist/internal/features/work/editors/markdown-editor.d.ts +5 -1
- package/dist/internal/features/work/editors/markdown-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/office-collaboration-participants.d.ts +3 -0
- package/dist/internal/features/work/editors/office-collaboration-presence-context.d.ts +17 -0
- package/dist/internal/features/work/editors/office-collaboration-presence-ui.d.ts +25 -0
- package/dist/internal/features/work/editors/office-editor-focus-handoff.d.ts +27 -0
- package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +5 -0
- package/dist/internal/features/work/editors/pdf-collaboration-presence.d.ts +3 -0
- package/dist/internal/features/work/editors/pdf-collaboration-projection.d.ts +10 -0
- package/dist/internal/features/work/editors/pdf-evidence-contract.d.ts +36 -0
- package/dist/internal/features/work/editors/pdf-evidence-overlay.d.ts +37 -0
- package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +7 -1
- package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -1
- package/dist/internal/features/work/editors/presentation-collaboration-presence.d.ts +5 -0
- package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +3 -2
- package/dist/internal/features/work/editors/presentation-editor-types.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-editor.d.ts +1 -1
- package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-clear.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-merge.d.ts +12 -0
- package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +3 -7
- package/dist/internal/features/work/editors/spreadsheet-collaboration-presence.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +464 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +45 -9
- package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +2 -0
- package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +9 -28
- package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +8 -2
- package/dist/internal/features/work/editors/spreadsheet-format-painter.d.ts +27 -0
- package/dist/internal/features/work/editors/spreadsheet-freeze-panes.d.ts +14 -0
- package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +3 -2
- package/dist/internal/features/work/editors/use-document-pagination.d.ts +6 -1
- package/dist/internal/features/work/editors/use-document-review-conflicts.d.ts +28 -0
- package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +21 -0
- package/dist/internal/features/work/editors/use-spreadsheet-collaboration.d.ts +27 -0
- package/dist/internal/features/work/editors/use-spreadsheet-format-painter.d.ts +18 -0
- package/dist/internal/features/work/editors/work-office-chrome.d.ts +22 -3
- package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +2 -0
- package/dist/internal/features/work/work-document-bookmark-references.d.ts +37 -0
- package/dist/internal/features/work/work-document-bookmarks.d.ts +29 -0
- package/dist/internal/features/work/work-document-caption-nodes.d.ts +4 -1
- package/dist/internal/features/work/work-document-comments.d.ts +1 -1
- package/dist/internal/features/work/work-document-equations.d.ts +513 -0
- package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
- package/dist/internal/features/work/work-document-field-identity.d.ts +2 -0
- package/dist/internal/features/work/work-document-field-node.d.ts +2 -2
- package/dist/internal/features/work/work-document-fields.d.ts +7 -0
- package/dist/internal/features/work/work-document-image-identity.d.ts +30 -0
- package/dist/internal/features/work/work-document-image-layout.d.ts +46 -1
- package/dist/internal/features/work/work-document-image-wrap-contour.d.ts +16 -0
- package/dist/internal/features/work/work-document-incremental-layout.d.ts +2 -2
- package/dist/internal/features/work/work-document-model-codec.d.ts +4 -1
- package/dist/internal/features/work/work-document-note-integrity.d.ts +2 -0
- package/dist/internal/features/work/work-document-page-borders.d.ts +25 -0
- package/dist/internal/features/work/work-document-page-capture.d.ts +8 -0
- package/dist/internal/features/work/work-document-page-frames.d.ts +15 -0
- package/dist/internal/features/work/work-document-page-margins.d.ts +56 -0
- package/dist/internal/features/work/work-document-page-size.d.ts +47 -0
- package/dist/internal/features/work/work-document-pagination-measurement.d.ts +1 -2
- package/dist/internal/features/work/work-document-pagination-types.d.ts +7 -2
- package/dist/internal/features/work/work-document-pagination.d.ts +2 -2
- package/dist/internal/features/work/work-document-paragraph-borders.d.ts +32 -0
- package/dist/internal/features/work/work-document-paragraph-identity.d.ts +26 -0
- package/dist/internal/features/work/work-document-paragraph-shading.d.ts +18 -0
- package/dist/internal/features/work/work-document-review-conflicts.d.ts +35 -0
- package/dist/internal/features/work/work-document-section.d.ts +4 -0
- package/dist/internal/features/work/work-document-snapshot.d.ts +19 -0
- package/dist/internal/features/work/work-document-source.d.ts +23 -0
- package/dist/internal/features/work/work-document-table-column-widths.d.ts +7 -0
- package/dist/internal/features/work/work-document-table-property-changes.d.ts +3 -0
- package/dist/internal/features/work/work-document-table-row-identity.d.ts +15 -0
- package/dist/internal/features/work/work-document-table-sizing.d.ts +3 -0
- package/dist/internal/features/work/work-document-text-layout.d.ts +3 -1
- package/dist/internal/features/work/work-document-word-line-metrics.d.ts +2 -0
- package/dist/internal/features/work/work-docx-bookmark-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-bookmark-import.d.ts +24 -0
- package/dist/internal/features/work/work-docx-bookmarks.d.ts +17 -0
- package/dist/internal/features/work/work-docx-comment-durable-id-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-comment-export.d.ts +3 -0
- package/dist/internal/features/work/work-docx-comment-metadata.d.ts +2 -0
- package/dist/internal/features/work/work-docx-drawing-extension-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-equation-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-equation-export.d.ts +14 -0
- package/dist/internal/features/work/work-docx-equation-import.d.ts +30 -0
- package/dist/internal/features/work/work-docx-equation-story.d.ts +9 -0
- package/dist/internal/features/work/work-docx-export-formatting.d.ts +3 -1
- package/dist/internal/features/work/work-docx-export-image.d.ts +5 -1
- package/dist/internal/features/work/work-docx-export.d.ts +1 -1
- package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
- package/dist/internal/features/work/work-docx-font-table-preservation.d.ts +3 -0
- package/dist/internal/features/work/work-docx-ignorable-extension-preservation.d.ts +15 -0
- package/dist/internal/features/work/work-docx-image-crop.d.ts +12 -0
- package/dist/internal/features/work/work-docx-image-identity.d.ts +17 -0
- package/dist/internal/features/work/work-docx-image-layer.d.ts +12 -0
- package/dist/internal/features/work/work-docx-image-layout-import.d.ts +14 -2
- package/dist/internal/features/work/work-docx-image-wrap.d.ts +15 -0
- package/dist/internal/features/work/work-docx-import.d.ts +13 -3
- package/dist/internal/features/work/work-docx-list-export.d.ts +18 -0
- package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-block-preservation.d.ts +18 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-model.d.ts +47 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-properties.d.ts +17 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-table-model.d.ts +17 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-xml.d.ts +14 -0
- package/dist/internal/features/work/work-docx-note-comment-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-content.d.ts +40 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-preservation.d.ts +5 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-relationships.d.ts +35 -0
- package/dist/internal/features/work/work-docx-note-comment-identity.d.ts +15 -0
- package/dist/internal/features/work/work-docx-note-comment-run-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-note-comment-run-properties.d.ts +2 -0
- package/dist/internal/features/work/work-docx-note-image-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-note-image-relationships.d.ts +1 -0
- package/dist/internal/features/work/work-docx-numbering-extension-preservation.d.ts +6 -0
- package/dist/internal/features/work/work-docx-numbering.d.ts +1 -0
- package/dist/internal/features/work/work-docx-page-borders-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-borders-import.d.ts +10 -0
- package/dist/internal/features/work/work-docx-page-margins-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-margins-import.d.ts +18 -0
- package/dist/internal/features/work/work-docx-page-size-diagnostics.d.ts +2 -0
- package/dist/internal/features/work/work-docx-page-size-import.d.ts +17 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-export.d.ts +18 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-import.d.ts +24 -0
- package/dist/internal/features/work/work-docx-paragraph-default-collapsed.d.ts +19 -0
- package/dist/internal/features/work/work-docx-paragraph-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-paragraph-identity-import.d.ts +10 -0
- package/dist/internal/features/work/work-docx-paragraph-identity.d.ts +18 -0
- package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +6 -1
- package/dist/internal/features/work/work-docx-paragraph-shading-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-paragraph-shading-export.d.ts +5 -0
- package/dist/internal/features/work/work-docx-paragraph-shading-import.d.ts +18 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +3 -0
- package/dist/internal/features/work/work-docx-settings-preservation.d.ts +10 -0
- package/dist/internal/features/work/work-docx-settings-xml.d.ts +16 -0
- package/dist/internal/features/work/work-docx-style-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-cell-export.d.ts +2 -1
- package/dist/internal/features/work/work-docx-table-cell-import.d.ts +3 -0
- package/dist/internal/features/work/work-docx-table-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-row-import.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +1 -0
- package/dist/internal/features/work/work-docx-theme-reference.d.ts +23 -0
- package/dist/internal/features/work/work-docx-theme.d.ts +4 -1
- package/dist/internal/features/work/work-docx-twips.d.ts +12 -0
- package/dist/internal/features/work/work-file-contract.d.ts +1 -0
- package/dist/internal/features/work/work-file-io.d.ts +1 -1
- package/dist/internal/features/work/work-markdown-extensions.d.ts +4 -1
- package/dist/internal/features/work/work-ooxml-package-preservation.d.ts +12 -0
- package/dist/internal/features/work/work-ooxml-package-security.d.ts +6 -0
- package/dist/internal/features/work/work-ooxml-relationship-preservation.d.ts +10 -0
- package/dist/internal/features/work/work-ooxml-xml.d.ts +2 -0
- package/dist/internal/features/work/work-pdf-export.d.ts +10 -0
- package/dist/internal/features/work/work-repository.d.ts +2 -0
- package/dist/internal/features/work/work-types.d.ts +15 -2
- package/dist/internal/kernel/office-kernel-client-types.d.ts +1 -0
- package/dist/internal/kernel/office-kernel-protocol.d.ts +7 -0
- package/dist/internal/kernel/office-kernel-version.d.ts +1 -1
- package/dist/office-kernel.wasm +0 -0
- package/dist/office-kernel.worker.js +93 -41
- package/dist/react.d.ts +18 -12
- package/dist/react.js +1 -1
- package/dist/styles.css +1367 -16
- package/dist/vue.d.ts +48 -5
- package/dist/vue.js +42 -3
- package/dist/web-component.d.ts +24 -2
- package/dist/web-component.js +101 -2
- package/docs/latest/en/browser-editor-architecture.md +262 -47
- package/package.json +29 -4
- package/dist/0~152.js +0 -94
- package/dist/0~2582.js +0 -485
- package/dist/0~4750.js +0 -939
- package/dist/0~5861.js +0 -596
- package/dist/0~work-document-extensions.js +0 -3045
- package/dist/0~work-document-model-codec.js +0 -42
- package/dist/0~work-docx-bibliography.js +0 -347
- package/dist/0~work-docx-page-color.js +0 -42
- package/dist/2881.js +0 -1455
- package/dist/8728.js +0 -723
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
export declare const spreadsheetRibbonTabs: readonly [{
|
|
2
|
+
readonly id: "home";
|
|
3
|
+
readonly label: "开始";
|
|
4
|
+
}, {
|
|
5
|
+
readonly id: "insert";
|
|
6
|
+
readonly label: "插入";
|
|
7
|
+
}, {
|
|
8
|
+
readonly id: "pageLayout";
|
|
9
|
+
readonly label: "页面布局";
|
|
10
|
+
readonly compactLabel: "布局";
|
|
11
|
+
}, {
|
|
12
|
+
readonly id: "formulas";
|
|
13
|
+
readonly label: "公式";
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "data";
|
|
16
|
+
readonly label: "数据";
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "review";
|
|
19
|
+
readonly label: "审阅";
|
|
20
|
+
}, {
|
|
21
|
+
readonly id: "view";
|
|
22
|
+
readonly label: "视图";
|
|
23
|
+
}];
|
|
24
|
+
export type SpreadsheetRibbonTabId = (typeof spreadsheetRibbonTabs)[number]['id'];
|
|
25
|
+
export interface SpreadsheetCommandShortcut {
|
|
26
|
+
label: string;
|
|
27
|
+
aria: string;
|
|
28
|
+
editor?: readonly string[];
|
|
29
|
+
}
|
|
30
|
+
export type SpreadsheetCommandLocation = {
|
|
31
|
+
area: 'quickAccess';
|
|
32
|
+
} | {
|
|
33
|
+
area: 'ribbon';
|
|
34
|
+
tab: SpreadsheetRibbonTabId;
|
|
35
|
+
group: string;
|
|
36
|
+
};
|
|
37
|
+
export interface SpreadsheetCommandDefinition {
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
location: SpreadsheetCommandLocation;
|
|
41
|
+
menuShortcut?: SpreadsheetCommandShortcut;
|
|
42
|
+
shortcut?: SpreadsheetCommandShortcut;
|
|
43
|
+
}
|
|
44
|
+
export declare const spreadsheetCommandCatalog: {
|
|
45
|
+
readonly undo: {
|
|
46
|
+
readonly id: "history.undo";
|
|
47
|
+
readonly label: "撤销";
|
|
48
|
+
readonly location: {
|
|
49
|
+
readonly area: "quickAccess";
|
|
50
|
+
};
|
|
51
|
+
readonly shortcut: {
|
|
52
|
+
readonly label: "Cmd/Ctrl+Z";
|
|
53
|
+
readonly aria: "Control+Z Meta+Z";
|
|
54
|
+
readonly editor: readonly ["Mod-z"];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
readonly redo: {
|
|
58
|
+
readonly id: "history.redo";
|
|
59
|
+
readonly label: "重做";
|
|
60
|
+
readonly location: {
|
|
61
|
+
readonly area: "quickAccess";
|
|
62
|
+
};
|
|
63
|
+
readonly shortcut: {
|
|
64
|
+
readonly label: "Cmd/Ctrl+Shift+Z 或 Cmd/Ctrl+Y";
|
|
65
|
+
readonly aria: "Control+Shift+Z Meta+Shift+Z Control+Y Meta+Y";
|
|
66
|
+
readonly editor: readonly ["Mod-Shift-z", "Mod-y"];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly paste: {
|
|
70
|
+
readonly id: "clipboard.paste";
|
|
71
|
+
readonly label: "粘贴";
|
|
72
|
+
readonly location: {
|
|
73
|
+
readonly area: "ribbon";
|
|
74
|
+
readonly tab: "home";
|
|
75
|
+
readonly group: "clipboard";
|
|
76
|
+
};
|
|
77
|
+
readonly shortcut: {
|
|
78
|
+
readonly label: "Cmd/Ctrl+V";
|
|
79
|
+
readonly aria: "Control+V Meta+V";
|
|
80
|
+
readonly editor: readonly ["Mod-v"];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
readonly cut: {
|
|
84
|
+
readonly id: "clipboard.cut";
|
|
85
|
+
readonly label: "剪切";
|
|
86
|
+
readonly location: {
|
|
87
|
+
readonly area: "ribbon";
|
|
88
|
+
readonly tab: "home";
|
|
89
|
+
readonly group: "clipboard";
|
|
90
|
+
};
|
|
91
|
+
readonly shortcut: {
|
|
92
|
+
readonly label: "Cmd/Ctrl+X";
|
|
93
|
+
readonly aria: "Control+X Meta+X";
|
|
94
|
+
readonly editor: readonly ["Mod-x"];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly copy: {
|
|
98
|
+
readonly id: "clipboard.copy";
|
|
99
|
+
readonly label: "复制";
|
|
100
|
+
readonly location: {
|
|
101
|
+
readonly area: "ribbon";
|
|
102
|
+
readonly tab: "home";
|
|
103
|
+
readonly group: "clipboard";
|
|
104
|
+
};
|
|
105
|
+
readonly shortcut: {
|
|
106
|
+
readonly label: "Cmd/Ctrl+C";
|
|
107
|
+
readonly aria: "Control+C Meta+C";
|
|
108
|
+
readonly editor: readonly ["Mod-c"];
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly formatPainter: {
|
|
112
|
+
readonly id: "clipboard.formatPainter";
|
|
113
|
+
readonly label: "格式刷";
|
|
114
|
+
readonly location: {
|
|
115
|
+
readonly area: "ribbon";
|
|
116
|
+
readonly tab: "home";
|
|
117
|
+
readonly group: "clipboard";
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly bold: {
|
|
121
|
+
readonly id: "font.bold";
|
|
122
|
+
readonly label: "加粗";
|
|
123
|
+
readonly location: {
|
|
124
|
+
readonly area: "ribbon";
|
|
125
|
+
readonly tab: "home";
|
|
126
|
+
readonly group: "font";
|
|
127
|
+
};
|
|
128
|
+
readonly shortcut: {
|
|
129
|
+
readonly label: "Cmd/Ctrl+B";
|
|
130
|
+
readonly aria: "Control+B Meta+B";
|
|
131
|
+
readonly editor: readonly ["Mod-b"];
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly italic: {
|
|
135
|
+
readonly id: "font.italic";
|
|
136
|
+
readonly label: "斜体";
|
|
137
|
+
readonly location: {
|
|
138
|
+
readonly area: "ribbon";
|
|
139
|
+
readonly tab: "home";
|
|
140
|
+
readonly group: "font";
|
|
141
|
+
};
|
|
142
|
+
readonly shortcut: {
|
|
143
|
+
readonly label: "Cmd/Ctrl+I";
|
|
144
|
+
readonly aria: "Control+I Meta+I";
|
|
145
|
+
readonly editor: readonly ["Mod-i"];
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
readonly underline: {
|
|
149
|
+
readonly id: "font.underline";
|
|
150
|
+
readonly label: "下划线";
|
|
151
|
+
readonly location: {
|
|
152
|
+
readonly area: "ribbon";
|
|
153
|
+
readonly tab: "home";
|
|
154
|
+
readonly group: "font";
|
|
155
|
+
};
|
|
156
|
+
readonly shortcut: {
|
|
157
|
+
readonly label: "Cmd/Ctrl+U";
|
|
158
|
+
readonly aria: "Control+U Meta+U";
|
|
159
|
+
readonly editor: readonly ["Mod-u"];
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly mergeAndCenter: {
|
|
163
|
+
readonly id: "alignment.mergeAndCenter";
|
|
164
|
+
readonly label: "合并居中";
|
|
165
|
+
readonly location: {
|
|
166
|
+
readonly area: "ribbon";
|
|
167
|
+
readonly tab: "home";
|
|
168
|
+
readonly group: "alignment";
|
|
169
|
+
};
|
|
170
|
+
readonly shortcut: {
|
|
171
|
+
readonly label: "Ctrl+M";
|
|
172
|
+
readonly aria: "Control+M";
|
|
173
|
+
readonly editor: readonly ["Control-m"];
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
readonly mergeCells: {
|
|
177
|
+
readonly id: "alignment.mergeCells";
|
|
178
|
+
readonly label: "合并单元格";
|
|
179
|
+
readonly location: {
|
|
180
|
+
readonly area: "ribbon";
|
|
181
|
+
readonly tab: "home";
|
|
182
|
+
readonly group: "alignment";
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly mergeAcross: {
|
|
186
|
+
readonly id: "alignment.mergeAcross";
|
|
187
|
+
readonly label: "跨行合并";
|
|
188
|
+
readonly location: {
|
|
189
|
+
readonly area: "ribbon";
|
|
190
|
+
readonly tab: "home";
|
|
191
|
+
readonly group: "alignment";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
readonly unmergeCells: {
|
|
195
|
+
readonly id: "alignment.unmergeCells";
|
|
196
|
+
readonly label: "取消合并单元格";
|
|
197
|
+
readonly location: {
|
|
198
|
+
readonly area: "ribbon";
|
|
199
|
+
readonly tab: "home";
|
|
200
|
+
readonly group: "alignment";
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
readonly unmergeAndFill: {
|
|
204
|
+
readonly id: "alignment.unmergeAndFill";
|
|
205
|
+
readonly label: "取消合并并填充";
|
|
206
|
+
readonly location: {
|
|
207
|
+
readonly area: "ribbon";
|
|
208
|
+
readonly tab: "home";
|
|
209
|
+
readonly group: "alignment";
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
readonly conditionalFormatting: {
|
|
213
|
+
readonly id: "styles.conditionalFormatting";
|
|
214
|
+
readonly label: "条件格式";
|
|
215
|
+
readonly location: {
|
|
216
|
+
readonly area: "ribbon";
|
|
217
|
+
readonly tab: "home";
|
|
218
|
+
readonly group: "styles";
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
readonly insertRowsAbove: {
|
|
222
|
+
readonly id: "cells.insertRowsAbove";
|
|
223
|
+
readonly label: "在上方插入行";
|
|
224
|
+
readonly location: {
|
|
225
|
+
readonly area: "ribbon";
|
|
226
|
+
readonly tab: "home";
|
|
227
|
+
readonly group: "cells";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
readonly insertRowsBelow: {
|
|
231
|
+
readonly id: "cells.insertRowsBelow";
|
|
232
|
+
readonly label: "在下方插入行";
|
|
233
|
+
readonly location: {
|
|
234
|
+
readonly area: "ribbon";
|
|
235
|
+
readonly tab: "home";
|
|
236
|
+
readonly group: "cells";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
readonly insertColumnsLeft: {
|
|
240
|
+
readonly id: "cells.insertColumnsLeft";
|
|
241
|
+
readonly label: "在左侧插入列";
|
|
242
|
+
readonly location: {
|
|
243
|
+
readonly area: "ribbon";
|
|
244
|
+
readonly tab: "home";
|
|
245
|
+
readonly group: "cells";
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
readonly insertColumnsRight: {
|
|
249
|
+
readonly id: "cells.insertColumnsRight";
|
|
250
|
+
readonly label: "在右侧插入列";
|
|
251
|
+
readonly location: {
|
|
252
|
+
readonly area: "ribbon";
|
|
253
|
+
readonly tab: "home";
|
|
254
|
+
readonly group: "cells";
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
readonly deleteRows: {
|
|
258
|
+
readonly id: "cells.deleteRows";
|
|
259
|
+
readonly label: "删除所选行";
|
|
260
|
+
readonly location: {
|
|
261
|
+
readonly area: "ribbon";
|
|
262
|
+
readonly tab: "home";
|
|
263
|
+
readonly group: "cells";
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
readonly deleteColumns: {
|
|
267
|
+
readonly id: "cells.deleteColumns";
|
|
268
|
+
readonly label: "删除所选列";
|
|
269
|
+
readonly location: {
|
|
270
|
+
readonly area: "ribbon";
|
|
271
|
+
readonly tab: "home";
|
|
272
|
+
readonly group: "cells";
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
readonly clearAll: {
|
|
276
|
+
readonly id: "editing.clearAll";
|
|
277
|
+
readonly label: "清除全部";
|
|
278
|
+
readonly location: {
|
|
279
|
+
readonly area: "ribbon";
|
|
280
|
+
readonly tab: "home";
|
|
281
|
+
readonly group: "editing";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
readonly clearFormats: {
|
|
285
|
+
readonly id: "editing.clearFormats";
|
|
286
|
+
readonly label: "清除格式";
|
|
287
|
+
readonly location: {
|
|
288
|
+
readonly area: "ribbon";
|
|
289
|
+
readonly tab: "home";
|
|
290
|
+
readonly group: "editing";
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
readonly clearContents: {
|
|
294
|
+
readonly id: "editing.clearContents";
|
|
295
|
+
readonly label: "清除内容";
|
|
296
|
+
readonly location: {
|
|
297
|
+
readonly area: "ribbon";
|
|
298
|
+
readonly tab: "home";
|
|
299
|
+
readonly group: "editing";
|
|
300
|
+
};
|
|
301
|
+
readonly shortcut: {
|
|
302
|
+
readonly label: "Delete/Backspace";
|
|
303
|
+
readonly aria: "Delete Backspace";
|
|
304
|
+
readonly editor: readonly ["Delete", "Backspace"];
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
readonly clearComments: {
|
|
308
|
+
readonly id: "editing.clearComments";
|
|
309
|
+
readonly label: "清除批注";
|
|
310
|
+
readonly location: {
|
|
311
|
+
readonly area: "ribbon";
|
|
312
|
+
readonly tab: "home";
|
|
313
|
+
readonly group: "editing";
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
readonly clearHyperlinks: {
|
|
317
|
+
readonly id: "editing.clearHyperlinks";
|
|
318
|
+
readonly label: "清除超链接";
|
|
319
|
+
readonly location: {
|
|
320
|
+
readonly area: "ribbon";
|
|
321
|
+
readonly tab: "home";
|
|
322
|
+
readonly group: "editing";
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
readonly find: {
|
|
326
|
+
readonly id: "editing.find";
|
|
327
|
+
readonly label: "查找";
|
|
328
|
+
readonly location: {
|
|
329
|
+
readonly area: "ribbon";
|
|
330
|
+
readonly tab: "home";
|
|
331
|
+
readonly group: "editing";
|
|
332
|
+
};
|
|
333
|
+
readonly shortcut: {
|
|
334
|
+
readonly label: "Cmd/Ctrl+F";
|
|
335
|
+
readonly aria: "Control+F Meta+F";
|
|
336
|
+
readonly editor: readonly ["Mod-f"];
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
readonly insertChart: {
|
|
340
|
+
readonly id: "insert.chart";
|
|
341
|
+
readonly label: "插入图表";
|
|
342
|
+
readonly location: {
|
|
343
|
+
readonly area: "ribbon";
|
|
344
|
+
readonly tab: "insert";
|
|
345
|
+
readonly group: "charts";
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
readonly printSettings: {
|
|
349
|
+
readonly id: "pageLayout.printSettings";
|
|
350
|
+
readonly label: "打印设置";
|
|
351
|
+
readonly location: {
|
|
352
|
+
readonly area: "ribbon";
|
|
353
|
+
readonly tab: "pageLayout";
|
|
354
|
+
readonly group: "pageSetup";
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
readonly nameManager: {
|
|
358
|
+
readonly id: "formulas.nameManager";
|
|
359
|
+
readonly label: "名称管理器";
|
|
360
|
+
readonly location: {
|
|
361
|
+
readonly area: "ribbon";
|
|
362
|
+
readonly tab: "formulas";
|
|
363
|
+
readonly group: "definedNames";
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
readonly formulaManager: {
|
|
367
|
+
readonly id: "formulas.manager";
|
|
368
|
+
readonly label: "公式与计算";
|
|
369
|
+
readonly location: {
|
|
370
|
+
readonly area: "ribbon";
|
|
371
|
+
readonly tab: "formulas";
|
|
372
|
+
readonly group: "calculation";
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
readonly recalculateWorkbook: {
|
|
376
|
+
readonly id: "formulas.recalculateWorkbook";
|
|
377
|
+
readonly label: "重新计算工作簿";
|
|
378
|
+
readonly location: {
|
|
379
|
+
readonly area: "ribbon";
|
|
380
|
+
readonly tab: "formulas";
|
|
381
|
+
readonly group: "calculation";
|
|
382
|
+
};
|
|
383
|
+
readonly shortcut: {
|
|
384
|
+
readonly label: "F9";
|
|
385
|
+
readonly aria: "F9";
|
|
386
|
+
readonly editor: readonly ["F9"];
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
readonly sortAscending: {
|
|
390
|
+
readonly id: "data.sortAscending";
|
|
391
|
+
readonly label: "升序";
|
|
392
|
+
readonly location: {
|
|
393
|
+
readonly area: "ribbon";
|
|
394
|
+
readonly tab: "data";
|
|
395
|
+
readonly group: "sortAndFilter";
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
readonly sortDescending: {
|
|
399
|
+
readonly id: "data.sortDescending";
|
|
400
|
+
readonly label: "降序";
|
|
401
|
+
readonly location: {
|
|
402
|
+
readonly area: "ribbon";
|
|
403
|
+
readonly tab: "data";
|
|
404
|
+
readonly group: "sortAndFilter";
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
readonly autoFilter: {
|
|
408
|
+
readonly id: "data.autoFilter";
|
|
409
|
+
readonly label: "自动筛选";
|
|
410
|
+
readonly location: {
|
|
411
|
+
readonly area: "ribbon";
|
|
412
|
+
readonly tab: "data";
|
|
413
|
+
readonly group: "sortAndFilter";
|
|
414
|
+
};
|
|
415
|
+
readonly shortcut: {
|
|
416
|
+
readonly label: "Cmd/Ctrl+Shift+L";
|
|
417
|
+
readonly aria: "Control+Shift+L Meta+Shift+L";
|
|
418
|
+
readonly editor: readonly ["Mod-Shift-l"];
|
|
419
|
+
};
|
|
420
|
+
readonly menuShortcut: {
|
|
421
|
+
readonly label: "Alt+↓";
|
|
422
|
+
readonly aria: "Alt+ArrowDown";
|
|
423
|
+
readonly editor: readonly ["Alt-ArrowDown"];
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
readonly pivotTable: {
|
|
427
|
+
readonly id: "data.pivotTable";
|
|
428
|
+
readonly label: "数据透视表";
|
|
429
|
+
readonly location: {
|
|
430
|
+
readonly area: "ribbon";
|
|
431
|
+
readonly tab: "data";
|
|
432
|
+
readonly group: "analysis";
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
readonly protectSheet: {
|
|
436
|
+
readonly id: "review.protectSheet";
|
|
437
|
+
readonly label: "工作表保护";
|
|
438
|
+
readonly location: {
|
|
439
|
+
readonly area: "ribbon";
|
|
440
|
+
readonly tab: "review";
|
|
441
|
+
readonly group: "protection";
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
readonly gridLines: {
|
|
445
|
+
readonly id: "view.gridLines";
|
|
446
|
+
readonly label: "网格线";
|
|
447
|
+
readonly location: {
|
|
448
|
+
readonly area: "ribbon";
|
|
449
|
+
readonly tab: "view";
|
|
450
|
+
readonly group: "workbookViews";
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
readonly freezePanes: {
|
|
454
|
+
readonly id: "view.freezePanes";
|
|
455
|
+
readonly label: "冻结窗格";
|
|
456
|
+
readonly location: {
|
|
457
|
+
readonly area: "ribbon";
|
|
458
|
+
readonly tab: "view";
|
|
459
|
+
readonly group: "window";
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
export type SpreadsheetCommandId = keyof typeof spreadsheetCommandCatalog;
|
|
464
|
+
export declare function getSpreadsheetCommandDefinition<T extends SpreadsheetCommandId>(id: T): SpreadsheetCommandDefinition;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { Cell, Selection } from '@fortune-sheet/core';
|
|
1
|
+
import type { Cell, Selection, Sheet } from '@fortune-sheet/core';
|
|
2
2
|
import type { WorkSpreadsheetContent } from '../work-types';
|
|
3
3
|
import { type OfficeEditorCanCommands, type OfficeEditorExtension } from './office-editor-extension';
|
|
4
|
+
import { type SpreadsheetCellClearMode } from './spreadsheet-cell-clear';
|
|
5
|
+
import { type SpreadsheetCellMergeCommand } from './spreadsheet-cell-merge';
|
|
6
|
+
import { type SpreadsheetFreezePanePreset } from './spreadsheet-freeze-panes';
|
|
7
|
+
import type { SpreadsheetFormatPainterMode } from './spreadsheet-format-painter';
|
|
4
8
|
import { type SpreadsheetKeyboardSelection, type SpreadsheetSelectionMove, type SpreadsheetSelectionScope } from './spreadsheet-keyboard-navigation';
|
|
5
9
|
import { type SpreadsheetSheetMoveDirection } from './spreadsheet-sheet-model';
|
|
6
10
|
export interface SpreadsheetWorkbookCommandPort {
|
|
@@ -8,13 +12,13 @@ export interface SpreadsheetWorkbookCommandPort {
|
|
|
8
12
|
name: string;
|
|
9
13
|
args: unknown[];
|
|
10
14
|
}>) => void;
|
|
11
|
-
cancelMerge: (ranges: SpreadsheetCommandRange[], options?: {
|
|
12
|
-
id?: string;
|
|
13
|
-
}) => void;
|
|
14
15
|
getSelection: () => SpreadsheetCommandRange[] | undefined;
|
|
15
16
|
getCellsByRange: (range: SpreadsheetCommandRange, options?: {
|
|
16
17
|
id?: string;
|
|
17
18
|
}) => (Cell | null)[][];
|
|
19
|
+
getSheet: (options?: {
|
|
20
|
+
id?: string;
|
|
21
|
+
}) => Sheet;
|
|
18
22
|
insertRowOrColumn: (type: SpreadsheetStructureAxis, index: number, count: number, direction: 'lefttop' | 'rightbottom', options?: {
|
|
19
23
|
id?: string;
|
|
20
24
|
}) => void;
|
|
@@ -23,9 +27,6 @@ export interface SpreadsheetWorkbookCommandPort {
|
|
|
23
27
|
}) => void;
|
|
24
28
|
hideRowOrColumn: (rowOrColumnInfo: string[], type: SpreadsheetStructureAxis) => void;
|
|
25
29
|
showRowOrColumn: (rowOrColumnInfo: string[], type: SpreadsheetStructureAxis) => void;
|
|
26
|
-
mergeCells: (ranges: SpreadsheetCommandRange[], type: string, options?: {
|
|
27
|
-
id?: string;
|
|
28
|
-
}) => void;
|
|
29
30
|
setCellValuesByRange: (values: unknown[][], range: SpreadsheetCommandRange, options?: {
|
|
30
31
|
id?: string;
|
|
31
32
|
}) => void;
|
|
@@ -69,6 +70,29 @@ export interface SpreadsheetHistoryCommandPort {
|
|
|
69
70
|
redo: () => boolean;
|
|
70
71
|
undo: () => boolean;
|
|
71
72
|
}
|
|
73
|
+
export interface SpreadsheetClipboardCommandPort {
|
|
74
|
+
canCopySelection: boolean;
|
|
75
|
+
canCutSelection: boolean;
|
|
76
|
+
canPasteSelection: boolean;
|
|
77
|
+
copySelection: () => boolean;
|
|
78
|
+
cutSelection: () => boolean;
|
|
79
|
+
pasteSelection: () => boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface SpreadsheetAutoFilterCommandPort {
|
|
82
|
+
active: boolean;
|
|
83
|
+
canOpenMenu: boolean;
|
|
84
|
+
canToggle: boolean;
|
|
85
|
+
openMenu: () => boolean;
|
|
86
|
+
toggle: () => boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface SpreadsheetFormatPainterCommandPort {
|
|
89
|
+
active: boolean;
|
|
90
|
+
canActivate: boolean;
|
|
91
|
+
mode: SpreadsheetFormatPainterMode | null;
|
|
92
|
+
activate: (mode: SpreadsheetFormatPainterMode) => boolean;
|
|
93
|
+
applySelection: (target: SpreadsheetCommandSelection) => boolean;
|
|
94
|
+
cancel: () => boolean;
|
|
95
|
+
}
|
|
72
96
|
export interface SpreadsheetFormulaBarCommandPort {
|
|
73
97
|
setValue: (value: unknown) => void;
|
|
74
98
|
}
|
|
@@ -77,20 +101,29 @@ export interface SpreadsheetViewCommandPort {
|
|
|
77
101
|
}
|
|
78
102
|
export interface SpreadsheetEditorCommands {
|
|
79
103
|
activateSheet: (sheetId: string) => boolean;
|
|
104
|
+
activateFormatPainter: (mode: SpreadsheetFormatPainterMode) => boolean;
|
|
80
105
|
addSheet: () => boolean;
|
|
81
|
-
|
|
106
|
+
applyFormatPainter: (target: SpreadsheetCommandSelection) => boolean;
|
|
107
|
+
cancelFormatPainter: () => boolean;
|
|
108
|
+
clearSelectedCells: (mode?: SpreadsheetCellClearMode) => boolean;
|
|
109
|
+
copySelection: () => boolean;
|
|
110
|
+
cutSelection: () => boolean;
|
|
82
111
|
deleteSelectedStructure: (axis: SpreadsheetStructureAxis) => boolean;
|
|
83
112
|
deleteSheet: (sheetId: string) => boolean;
|
|
84
113
|
duplicateSheet: (sheetId: string) => boolean;
|
|
85
114
|
hideSheet: (sheetId: string) => boolean;
|
|
86
115
|
insertSelectedStructure: (axis: SpreadsheetStructureAxis, position: SpreadsheetStructureInsertPosition) => boolean;
|
|
116
|
+
mergeSelectedCells: (command: SpreadsheetCellMergeCommand) => boolean;
|
|
87
117
|
moveSheet: (sheetId: string, direction: SpreadsheetSheetMoveDirection) => boolean;
|
|
88
118
|
moveSelection: (move: SpreadsheetSelectionMove, extend: boolean) => boolean;
|
|
119
|
+
openAutoFilterMenu: () => boolean;
|
|
89
120
|
pasteCells: (values: readonly (readonly unknown[])[]) => boolean;
|
|
121
|
+
pasteSelection: () => boolean;
|
|
90
122
|
recalculateFormula: (scope: 'selection' | 'workbook') => boolean;
|
|
91
123
|
renameSheet: (sheetId: string, name: string) => boolean;
|
|
92
124
|
redo: () => boolean;
|
|
93
125
|
setCellFormat: (attribute: keyof Cell, value: unknown) => boolean;
|
|
126
|
+
setFreezePanes: (preset: SpreadsheetFreezePanePreset) => boolean;
|
|
94
127
|
setGridLines: (visible: boolean) => boolean;
|
|
95
128
|
selectCellRange: (scope: SpreadsheetSelectionScope) => boolean;
|
|
96
129
|
setSheetColor: (sheetId: string, color: string | null) => boolean;
|
|
@@ -99,17 +132,20 @@ export interface SpreadsheetEditorCommands {
|
|
|
99
132
|
setSpreadsheetContent: (content: WorkSpreadsheetContent) => boolean;
|
|
100
133
|
setZoom: (percent: number) => boolean;
|
|
101
134
|
sortSelectedCells: (direction: SpreadsheetSortDirection) => boolean;
|
|
102
|
-
|
|
135
|
+
toggleAutoFilter: () => boolean;
|
|
103
136
|
undo: () => boolean;
|
|
104
137
|
}
|
|
105
138
|
export type SpreadsheetEditorCanCommands = OfficeEditorCanCommands<SpreadsheetEditorCommands>;
|
|
106
139
|
export interface SpreadsheetCommandContext {
|
|
107
140
|
activeSheetId: string;
|
|
141
|
+
autoFilter: SpreadsheetAutoFilterCommandPort;
|
|
108
142
|
calculation: SpreadsheetCalculationCommandPort | null;
|
|
143
|
+
clipboard: SpreadsheetClipboardCommandPort;
|
|
109
144
|
content: WorkSpreadsheetContent;
|
|
110
145
|
editable: boolean;
|
|
111
146
|
fallbackRange: SpreadsheetCommandRange;
|
|
112
147
|
formulaBar: SpreadsheetFormulaBarCommandPort | null;
|
|
148
|
+
formatPainter: SpreadsheetFormatPainterCommandPort;
|
|
113
149
|
history: SpreadsheetHistoryCommandPort | null;
|
|
114
150
|
onChange: (content: WorkSpreadsheetContent) => void;
|
|
115
151
|
selection: SpreadsheetCommandSelection | null;
|
|
@@ -33,4 +33,6 @@ export declare function parseSpreadsheetClipboardText(value: string): string[][]
|
|
|
33
33
|
export declare const browserSpreadsheetClipboard: SpreadsheetClipboardPort;
|
|
34
34
|
export declare function readSpreadsheetClipboardText(readSystem: (() => Promise<string>) | undefined, readLocal: () => string, timeoutMs?: number, canReadSystem?: () => boolean | Promise<boolean>): Promise<string>;
|
|
35
35
|
export declare function writeSpreadsheetClipboardText(value: string, writeSystem: ((value: string) => Promise<void>) | undefined, writeLocal: (value: string) => void, timeoutMs?: number): Promise<void>;
|
|
36
|
+
export declare function copySpreadsheetSelection(clipboard: SpreadsheetClipboardPort, value: string, cut: boolean): Promise<boolean>;
|
|
37
|
+
export declare function pasteSpreadsheetSelection(clipboard: SpreadsheetClipboardPort, paste: SpreadsheetContextCommands['pasteCells']): Promise<void>;
|
|
36
38
|
export {};
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import type { Cell } from '@fortune-sheet/core';
|
|
1
|
+
import type { Cell, Selection } from '@fortune-sheet/core';
|
|
2
2
|
import type { WorkSpreadsheetContent } from '../work-types';
|
|
3
|
+
import { type SpreadsheetRibbonTabId } from './spreadsheet-command-catalog';
|
|
3
4
|
import type { SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
5
|
+
import type { SpreadsheetFormatPainterMode } from './spreadsheet-format-painter';
|
|
4
6
|
import type { SpreadsheetWorkbookPanelView } from './spreadsheet-workbook-panel';
|
|
5
7
|
import { type WorkOfficeFileAction } from './work-office-chrome';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly label: "开始";
|
|
9
|
-
}, {
|
|
10
|
-
readonly id: "insert";
|
|
11
|
-
readonly label: "插入";
|
|
12
|
-
}, {
|
|
13
|
-
readonly id: "pageLayout";
|
|
14
|
-
readonly label: "页面布局";
|
|
15
|
-
readonly compactLabel: "布局";
|
|
16
|
-
}, {
|
|
17
|
-
readonly id: "formulas";
|
|
18
|
-
readonly label: "公式";
|
|
19
|
-
}, {
|
|
20
|
-
readonly id: "data";
|
|
21
|
-
readonly label: "数据";
|
|
22
|
-
}, {
|
|
23
|
-
readonly id: "review";
|
|
24
|
-
readonly label: "审阅";
|
|
25
|
-
}, {
|
|
26
|
-
readonly id: "view";
|
|
27
|
-
readonly label: "视图";
|
|
28
|
-
}];
|
|
29
|
-
export type SpreadsheetRibbonTabId = (typeof spreadsheetRibbonTabs)[number]['id'];
|
|
30
|
-
export declare function SpreadsheetEditorRibbon({ activeTab, can, commands, content, fileActions, findOpen, gridLinesVisible, multipleCellsSelected, panelId, onOpenFind, onTabChange, onTogglePanel, panel, toolbarCell, }: {
|
|
8
|
+
export type { SpreadsheetRibbonTabId } from './spreadsheet-command-catalog';
|
|
9
|
+
export declare function SpreadsheetEditorRibbon({ activeTab, autoFilterActive, can, commands, content, fileActions, findOpen, formatPainterMode, freezePanesActive, freezePanesSelection, gridLinesVisible, panelId, onOpenFind, onTabChange, onTogglePanel, panel, toolbarCell, }: {
|
|
31
10
|
activeTab: SpreadsheetRibbonTabId;
|
|
11
|
+
autoFilterActive?: boolean;
|
|
32
12
|
can: SpreadsheetEditorCanCommands;
|
|
33
13
|
commands: SpreadsheetEditorCommands;
|
|
34
14
|
content: WorkSpreadsheetContent;
|
|
35
15
|
fileActions?: readonly WorkOfficeFileAction[];
|
|
36
16
|
findOpen: boolean;
|
|
17
|
+
formatPainterMode?: SpreadsheetFormatPainterMode | null;
|
|
18
|
+
freezePanesActive?: boolean;
|
|
19
|
+
freezePanesSelection?: Selection;
|
|
37
20
|
gridLinesVisible: boolean;
|
|
38
|
-
multipleCellsSelected: boolean;
|
|
39
21
|
panelId: string;
|
|
40
22
|
onOpenFind: () => void;
|
|
41
23
|
onTabChange: (tab: SpreadsheetRibbonTabId) => void;
|
|
@@ -43,4 +25,3 @@ export declare function SpreadsheetEditorRibbon({ activeTab, can, commands, cont
|
|
|
43
25
|
panel: SpreadsheetWorkbookPanelView | null;
|
|
44
26
|
toolbarCell: Cell | null | undefined;
|
|
45
27
|
}): import("react").JSX.Element;
|
|
46
|
-
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
1
2
|
import type { WorkEditorAgentRequest } from '../work-agent-request';
|
|
2
3
|
import type { WorkSpreadsheetContent } from '../work-types';
|
|
3
4
|
import { type SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
4
5
|
import { type WorkOfficeFileAction } from './work-office-chrome';
|
|
5
6
|
export interface SpreadsheetEditorProps {
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
collaboration?: WorkOfficeCollaborationSession;
|
|
6
9
|
content: WorkSpreadsheetContent;
|
|
7
10
|
kernelWasmUrl?: string;
|
|
8
11
|
preview: boolean;
|
|
@@ -11,6 +14,9 @@ export interface SpreadsheetEditorProps {
|
|
|
11
14
|
onChange: (content: WorkSpreadsheetContent) => void;
|
|
12
15
|
onAgentRequest?: (request: WorkEditorAgentRequest) => void | Promise<void>;
|
|
13
16
|
}
|
|
14
|
-
export declare function SpreadsheetEditor(
|
|
15
|
-
export declare function focusSpreadsheetGrid(container: HTMLElement | null
|
|
17
|
+
export declare function SpreadsheetEditor(props: SpreadsheetEditorProps): import("react").JSX.Element;
|
|
18
|
+
export declare function focusSpreadsheetGrid(container: HTMLElement | null, { focusOrigin, forceInitial, }?: {
|
|
19
|
+
focusOrigin?: Element | null;
|
|
20
|
+
forceInitial?: boolean;
|
|
21
|
+
}): void;
|
|
16
22
|
export declare function spreadsheetCommandsWithGridFocus(commands: SpreadsheetEditorCommands, restoreFocus: () => void): SpreadsheetEditorCommands;
|