ooxml-ui 0.27.2 → 0.28.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/dist/chunk-A56QI2OA.js +57 -0
- package/dist/{chunk-LE4FTRWB.js → chunk-AJ2J734X.js} +619 -3
- package/dist/{chunk-4PBFBPOH.js → chunk-G4ZGQYBH.js} +2 -1
- package/dist/controls.js +1 -1
- package/dist/docx/backstage-home.d.ts +3 -0
- package/dist/docx/backstage-options.d.ts +13 -0
- package/dist/docx/backstage-pages.d.ts +41 -0
- package/dist/docx/backstage.d.ts +18 -0
- package/dist/docx/binding-labels.d.ts +9 -0
- package/dist/docx/bookmark-commands.d.ts +20 -0
- package/dist/docx/bookmark-dialog.d.ts +4 -0
- package/dist/docx/borders-dialog.d.ts +4 -0
- package/dist/docx/canvas-measurer.d.ts +7 -0
- package/dist/docx/caption-commands.d.ts +31 -0
- package/dist/docx/caption-dialog.d.ts +5 -0
- package/dist/docx/change-case.d.ts +5 -0
- package/dist/docx/character-style-picker.d.ts +12 -0
- package/dist/docx/chrome-icons.d.ts +25 -0
- package/dist/docx/collaboration-model.d.ts +4 -0
- package/dist/docx/collaboration-session.d.ts +18 -0
- package/dist/docx/columns-dialog.d.ts +10 -0
- package/dist/docx/comment-commands.d.ts +21 -0
- package/dist/docx/comments-panel.d.ts +19 -0
- package/dist/docx/component.d.ts +70 -0
- package/dist/docx/context-menu-actions.d.ts +10 -0
- package/dist/docx/context-menu-items.d.ts +36 -0
- package/dist/docx/context-menu.d.ts +25 -0
- package/dist/docx/contextual-tabs.d.ts +8 -0
- package/dist/docx/cover-page.d.ts +14 -0
- package/dist/docx/cross-reference-commands.d.ts +30 -0
- package/dist/docx/cross-reference-dialog.d.ts +5 -0
- package/dist/docx/dialog-fields.d.ts +22 -0
- package/dist/docx/dialog-shell.d.ts +19 -0
- package/dist/docx/drop-cap-command.d.ts +20 -0
- package/dist/docx/drop-cap-dialog.d.ts +4 -0
- package/dist/docx/editor-attributes.d.ts +26 -0
- package/dist/docx/editor-chrome.d.ts +59 -0
- package/dist/docx/editor-commands.d.ts +7 -0
- package/dist/docx/editor-controls.d.ts +10 -0
- package/dist/docx/editor-core.d.ts +78 -0
- package/dist/docx/editor-host.d.ts +19 -0
- package/dist/docx/editor-interactions.d.ts +2 -0
- package/dist/docx/editor-plugins.d.ts +16 -0
- package/dist/docx/editor-presence.d.ts +20 -0
- package/dist/docx/editor-render.d.ts +3 -0
- package/dist/docx/editor-shell.d.ts +11 -0
- package/dist/docx/element-api.d.ts +35 -0
- package/dist/docx/equation-schema.d.ts +4 -0
- package/dist/docx/events.d.ts +45 -0
- package/dist/docx/field-update.d.ts +16 -0
- package/dist/docx/file-commands.d.ts +15 -0
- package/dist/docx/focus-view.d.ts +3 -0
- package/dist/docx/font-advanced.d.ts +18 -0
- package/dist/docx/font-dialog-tabs.d.ts +8 -0
- package/dist/docx/font-dialog.d.ts +11 -0
- package/dist/docx/font-format-batch.d.ts +3 -0
- package/dist/docx/font-format.d.ts +38 -0
- package/dist/docx/font-step.d.ts +5 -0
- package/dist/docx/font-sync.d.ts +9 -0
- package/dist/docx/format-dialogs.d.ts +37 -0
- package/dist/docx/format-painter.d.ts +12 -0
- package/dist/docx/go-to-panel.d.ts +4 -0
- package/dist/docx/go-to.d.ts +23 -0
- package/dist/docx/hard-break-command.d.ts +3 -0
- package/dist/docx/header-footer-commands.d.ts +19 -0
- package/dist/docx/header-footer-editor.d.ts +40 -0
- package/dist/docx/header-footer-link.d.ts +6 -0
- package/dist/docx/header-footer-navigation.d.ts +6 -0
- package/dist/docx/header-footer-position.d.ts +3 -0
- package/dist/docx/header-footer-ribbon.d.ts +9 -0
- package/dist/docx/header-footer-view.d.ts +5 -0
- package/dist/docx/heading-commands.d.ts +11 -0
- package/dist/docx/heading-navigator.d.ts +33 -0
- package/dist/docx/image-media.d.ts +29 -0
- package/dist/docx/indent-commands.d.ts +9 -0
- package/dist/docx/index.d.ts +23 -0
- package/dist/docx/inline-commands.d.ts +4 -0
- package/dist/docx/insert-controller.d.ts +46 -0
- package/dist/docx/insert-text-commands.d.ts +8 -0
- package/dist/docx/keyboard.d.ts +68 -0
- package/dist/docx/line-number-dialog.d.ts +11 -0
- package/dist/docx/link-commands.d.ts +31 -0
- package/dist/docx/link-dialog.d.ts +15 -0
- package/dist/docx/list-commands.d.ts +35 -0
- package/dist/docx/list-marker-display.d.ts +8 -0
- package/dist/docx/locales/columns.d.ts +15 -0
- package/dist/docx/locales/de-app.d.ts +8 -0
- package/dist/docx/locales/de-ribbon.d.ts +8 -0
- package/dist/docx/locales/de.d.ts +2 -0
- package/dist/docx/locales/drop-cap.d.ts +10 -0
- package/dist/docx/locales/en-app.d.ts +247 -0
- package/dist/docx/locales/en-ribbon.d.ts +394 -0
- package/dist/docx/locales/en.d.ts +746 -0
- package/dist/docx/locales/es-app.d.ts +8 -0
- package/dist/docx/locales/es-ribbon.d.ts +8 -0
- package/dist/docx/locales/es.d.ts +2 -0
- package/dist/docx/locales/font-advanced.d.ts +14 -0
- package/dist/docx/locales/fr-app.d.ts +2 -0
- package/dist/docx/locales/fr-ribbon.d.ts +2 -0
- package/dist/docx/locales/fr.d.ts +2 -0
- package/dist/docx/locales/ligatures.d.ts +5 -0
- package/dist/docx/locales/line-numbers.d.ts +16 -0
- package/dist/docx/locales/multilevel-list.d.ts +5 -0
- package/dist/docx/locales/navigation.d.ts +13 -0
- package/dist/docx/locales/table-properties.d.ts +29 -0
- package/dist/docx/locales/zh-CN-app.d.ts +8 -0
- package/dist/docx/locales/zh-CN-ribbon.d.ts +8 -0
- package/dist/docx/locales/zh-CN.d.ts +2 -0
- package/dist/docx/localization-strings.d.ts +745 -0
- package/dist/docx/localization.d.ts +24 -0
- package/dist/docx/model-adapter.d.ts +6 -0
- package/dist/docx/multilevel-list-dialog.d.ts +5 -0
- package/dist/docx/multilingual-commands.d.ts +14 -0
- package/dist/docx/multilingual-ribbon.d.ts +6 -0
- package/dist/docx/note-commands.d.ts +17 -0
- package/dist/docx/note-editor.d.ts +10 -0
- package/dist/docx/notes-view.d.ts +3 -0
- package/dist/docx/page-borders-dialog.d.ts +16 -0
- package/dist/docx/page-break-command.d.ts +5 -0
- package/dist/docx/page-controller.d.ts +66 -0
- package/dist/docx/page-navigator.d.ts +64 -0
- package/dist/docx/page-setup-change.d.ts +7 -0
- package/dist/docx/page-setup-dialog.d.ts +12 -0
- package/dist/docx/page-sync.d.ts +22 -0
- package/dist/docx/paragraph-decoration.d.ts +29 -0
- package/dist/docx/paragraph-dialog.d.ts +5 -0
- package/dist/docx/paragraph-format.d.ts +37 -0
- package/dist/docx/paragraph-styles.d.ts +5 -0
- package/dist/docx/paragraph-toggle-sync.d.ts +8 -0
- package/dist/docx/parts-controller.d.ts +52 -0
- package/dist/docx/picture-commands.d.ts +35 -0
- package/dist/docx/picture-dialog.d.ts +11 -0
- package/dist/docx/presence-decorations.d.ts +6 -0
- package/dist/docx/presence.d.ts +63 -0
- package/dist/docx/preview-run-styles.d.ts +4 -0
- package/dist/docx/preview-scale-fonts.d.ts +3 -0
- package/dist/docx/print-fragment-hit.d.ts +7 -0
- package/dist/docx/print-header-footer.d.ts +28 -0
- package/dist/docx/print-layout-cursor.d.ts +9 -0
- package/dist/docx/print-layout-view.d.ts +38 -0
- package/dist/docx/print-layout.d.ts +32 -0
- package/dist/docx/print-line-numbers.d.ts +13 -0
- package/dist/docx/print-page-borders.d.ts +18 -0
- package/dist/docx/print-table.d.ts +8 -0
- package/dist/docx/read-aloud.d.ts +11 -0
- package/dist/docx/review-commands.d.ts +24 -0
- package/dist/docx/review-controller.d.ts +30 -0
- package/dist/docx/review-display.d.ts +11 -0
- package/dist/docx/review-ribbon.d.ts +2 -0
- package/dist/docx/ribbon-action.d.ts +183 -0
- package/dist/docx/ribbon-behavior.d.ts +7 -0
- package/dist/docx/ribbon-color-grid.d.ts +11 -0
- package/dist/docx/ribbon-combo.d.ts +23 -0
- package/dist/docx/ribbon-commands.d.ts +13 -0
- package/dist/docx/ribbon-controls.d.ts +4 -0
- package/dist/docx/ribbon-gallery-menu.d.ts +26 -0
- package/dist/docx/ribbon-home.d.ts +4 -0
- package/dist/docx/ribbon-icons.d.ts +126 -0
- package/dist/docx/ribbon-keytips.d.ts +11 -0
- package/dist/docx/ribbon-overflow.d.ts +3 -0
- package/dist/docx/ribbon-parts.d.ts +53 -0
- package/dist/docx/ribbon-popover.d.ts +16 -0
- package/dist/docx/ribbon-router.d.ts +4 -0
- package/dist/docx/ribbon-tab-api.d.ts +29 -0
- package/dist/docx/ribbon-tabs.d.ts +2 -0
- package/dist/docx/ribbon-visibility.d.ts +8 -0
- package/dist/docx/ribbon.d.ts +5 -0
- package/dist/docx/ruler-sync.d.ts +7 -0
- package/dist/docx/ruler.d.ts +36 -0
- package/dist/docx/run-adapter.d.ts +9 -0
- package/dist/docx/run-marks.d.ts +4 -0
- package/dist/docx/run-scale.d.ts +11 -0
- package/dist/docx/run-styles.d.ts +19 -0
- package/dist/docx/scaled-paragraph-breaks.d.ts +7 -0
- package/dist/docx/schema.d.ts +6 -0
- package/dist/docx/script-state.d.ts +4 -0
- package/dist/docx/search-controller.d.ts +32 -0
- package/dist/docx/search-panel.d.ts +14 -0
- package/dist/docx/section-commands.d.ts +14 -0
- package/dist/docx/shell-labels.d.ts +3 -0
- package/dist/docx/shortcut-help.d.ts +16 -0
- package/dist/docx/smartart-node-view.d.ts +26 -0
- package/dist/docx/sort-commands.d.ts +9 -0
- package/dist/docx/spelling.d.ts +6 -0
- package/dist/docx/status-bar.d.ts +23 -0
- package/dist/docx/style-gallery.d.ts +22 -0
- package/dist/docx/styles/index.d.ts +6 -0
- package/dist/docx/styles-group.d.ts +7 -0
- package/dist/docx/styles-pane.d.ts +15 -0
- package/dist/docx/styles-popover.d.ts +24 -0
- package/dist/docx/tab-stops-view.d.ts +8 -0
- package/dist/docx/table-border-commands.d.ts +51 -0
- package/dist/docx/table-cell-alignment-dialog.d.ts +8 -0
- package/dist/docx/table-cell-margins-dialog.d.ts +9 -0
- package/dist/docx/table-commands.d.ts +6 -0
- package/dist/docx/table-model-adapter.d.ts +15 -0
- package/dist/docx/table-picker.d.ts +10 -0
- package/dist/docx/table-properties-dialog.d.ts +3 -0
- package/dist/docx/table-properties.d.ts +28 -0
- package/dist/docx/table-shading.d.ts +6 -0
- package/dist/docx/test-support.d.ts +24 -0
- package/dist/docx/text-box-commands.d.ts +17 -0
- package/dist/docx/text-box-dialog.d.ts +4 -0
- package/dist/docx/title-bar.d.ts +25 -0
- package/dist/docx/toc-commands.d.ts +17 -0
- package/dist/docx/toggle-commands.d.ts +8 -0
- package/dist/docx/track-changes-mode.d.ts +20 -0
- package/dist/docx/view-options.d.ts +10 -0
- package/dist/docx/watermark-commands.d.ts +9 -0
- package/dist/docx/watermark-dialog.d.ts +11 -0
- package/dist/docx/word-count-panel.d.ts +12 -0
- package/dist/docx/zoom-dialog.d.ts +16 -0
- package/dist/docx.js +21371 -0
- package/dist/edit-worker.js +18 -0
- package/dist/index.js +4 -60
- package/dist/parse-worker.js +16 -0
- package/dist/teams/app/bind.d.ts +28 -0
- package/dist/teams/app/controller.d.ts +13 -0
- package/dist/teams/app/index.d.ts +6 -0
- package/dist/teams/app/storage.d.ts +11 -0
- package/dist/teams/app/store.d.ts +4 -0
- package/dist/teams/app/teams-app.d.ts +110 -0
- package/dist/teams/app/teams-settings.d.ts +34 -0
- package/dist/teams/index.d.ts +1 -0
- package/dist/teams.js +3 -1
- package/dist/visio/arrowheads.d.ts +3 -0
- package/dist/visio/backstage.d.ts +15 -0
- package/dist/visio/binding.d.ts +27 -0
- package/dist/visio/controller.d.ts +71 -0
- package/dist/visio/edit-worker.d.ts +1 -0
- package/dist/visio/export-svg.d.ts +25 -0
- package/dist/visio/index.d.ts +14 -0
- package/dist/visio/office-ui.d.ts +2 -0
- package/dist/visio/paragraph-layout.d.ts +18 -0
- package/dist/visio/parse-worker.d.ts +1 -0
- package/dist/visio/print-snapshot.d.ts +87 -0
- package/dist/visio/render-fill.d.ts +2 -0
- package/dist/visio/render-foreign-vector-shape.d.ts +4 -0
- package/dist/visio/render-foreign-vector.d.ts +3 -0
- package/dist/visio/render-image.d.ts +4 -0
- package/dist/visio/render-resources.d.ts +10 -0
- package/dist/visio/render-svg.d.ts +17 -0
- package/dist/visio/render-text.d.ts +4 -0
- package/dist/visio/ribbon-action.d.ts +41 -0
- package/dist/visio/ribbon-home-format.d.ts +2 -0
- package/dist/visio/ribbon-home.d.ts +6 -0
- package/dist/visio/ribbon-keytips.d.ts +2 -0
- package/dist/visio/ribbon-other-tabs.d.ts +12 -0
- package/dist/visio/ribbon-parts.d.ts +60 -0
- package/dist/visio/ribbon-router.d.ts +19 -0
- package/dist/visio/ribbon-view.d.ts +5 -0
- package/dist/visio/ribbon.d.ts +13 -0
- package/dist/visio/shape-inspector.d.ts +5 -0
- package/dist/visio/shapes-window.d.ts +28 -0
- package/dist/visio/status-bar.d.ts +10 -0
- package/dist/visio/styles/index.d.ts +5 -0
- package/dist/visio/styles.d.ts +2 -0
- package/dist/visio/text-layout.d.ts +45 -0
- package/dist/visio/viewer-backstage.d.ts +33 -0
- package/dist/visio/viewer-canvas.d.ts +21 -0
- package/dist/visio/viewer-chrome.d.ts +22 -0
- package/dist/visio/viewer-commands.d.ts +34 -0
- package/dist/visio/viewer-context-menu.d.ts +8 -0
- package/dist/visio/viewer-draw-tool.d.ts +33 -0
- package/dist/visio/viewer-edit-controls.d.ts +12 -0
- package/dist/visio/viewer-element.d.ts +51 -0
- package/dist/visio/viewer-fit.d.ts +6 -0
- package/dist/visio/viewer-geometry-controls.d.ts +14 -0
- package/dist/visio/viewer-input.d.ts +10 -0
- package/dist/visio/viewer-layer-controls.d.ts +5 -0
- package/dist/visio/viewer-layers.d.ts +22 -0
- package/dist/visio/viewer-options.d.ts +22 -0
- package/dist/visio/viewer-pan-zoom.d.ts +19 -0
- package/dist/visio/viewer-ruler.d.ts +13 -0
- package/dist/visio/viewer-search.d.ts +18 -0
- package/dist/visio/viewer-share.d.ts +20 -0
- package/dist/visio/viewer-stencil.d.ts +6 -0
- package/dist/visio/viewer-tell-me.d.ts +4 -0
- package/dist/visio/worker-editor.d.ts +23 -0
- package/dist/visio/worker-parser.d.ts +13 -0
- package/dist/visio.js +6618 -0
- package/dist/xlsx/backstage/index.d.ts +14 -0
- package/dist/xlsx/backstage/pages-file.d.ts +6 -0
- package/dist/xlsx/backstage/pages-info.d.ts +10 -0
- package/dist/xlsx/backstage/pages-options.d.ts +7 -0
- package/dist/xlsx/backstage/parts.d.ts +53 -0
- package/dist/xlsx/backstage/properties-custom.d.ts +4 -0
- package/dist/xlsx/clipboard.d.ts +26 -0
- package/dist/xlsx/commands/index.d.ts +11 -0
- package/dist/xlsx/commands/insert-now.d.ts +4 -0
- package/dist/xlsx/commands/insert.d.ts +7 -0
- package/dist/xlsx/commands/register-icons.d.ts +2 -0
- package/dist/xlsx/commands/review.d.ts +6 -0
- package/dist/xlsx/commands/styles.d.ts +17 -0
- package/dist/xlsx/commands/test-support.d.ts +25 -0
- package/dist/xlsx/commands/view.d.ts +7 -0
- package/dist/xlsx/component.d.ts +66 -0
- package/dist/xlsx/context-menu/index.d.ts +2 -0
- package/dist/xlsx/context-menu/menu.d.ts +14 -0
- package/dist/xlsx/dialogs/cell-shift.d.ts +5 -0
- package/dist/xlsx/dialogs/cf-common.d.ts +29 -0
- package/dist/xlsx/dialogs/cf-manager.d.ts +8 -0
- package/dist/xlsx/dialogs/cf-quick.d.ts +10 -0
- package/dist/xlsx/dialogs/cf-rule-panels.d.ts +20 -0
- package/dist/xlsx/dialogs/cf-rule-scale.d.ts +3 -0
- package/dist/xlsx/dialogs/cf-rule.d.ts +13 -0
- package/dist/xlsx/dialogs/comments-list.d.ts +2 -0
- package/dist/xlsx/dialogs/create-names.d.ts +8 -0
- package/dist/xlsx/dialogs/create-table.d.ts +6 -0
- package/dist/xlsx/dialogs/data-validation.d.ts +3 -0
- package/dist/xlsx/dialogs/define-name.d.ts +9 -0
- package/dist/xlsx/dialogs/fields.d.ts +47 -0
- package/dist/xlsx/dialogs/fill-series.d.ts +10 -0
- package/dist/xlsx/dialogs/find-replace.d.ts +8 -0
- package/dist/xlsx/dialogs/format-cells/alignment-tab.d.ts +5 -0
- package/dist/xlsx/dialogs/format-cells/border-tab.d.ts +4 -0
- package/dist/xlsx/dialogs/format-cells/color-swatches.d.ts +10 -0
- package/dist/xlsx/dialogs/format-cells/fill-tab.d.ts +11 -0
- package/dist/xlsx/dialogs/format-cells/font-tab.d.ts +2 -0
- package/dist/xlsx/dialogs/format-cells/index.d.ts +6 -0
- package/dist/xlsx/dialogs/format-cells/number-tab.d.ts +7 -0
- package/dist/xlsx/dialogs/format-cells/protection-tab.d.ts +2 -0
- package/dist/xlsx/dialogs/format-cells/tab-color.d.ts +6 -0
- package/dist/xlsx/dialogs/frame.d.ts +27 -0
- package/dist/xlsx/dialogs/go-to.d.ts +12 -0
- package/dist/xlsx/dialogs/help-dialogs.d.ts +5 -0
- package/dist/xlsx/dialogs/host.d.ts +6 -0
- package/dist/xlsx/dialogs/hyperlink.d.ts +16 -0
- package/dist/xlsx/dialogs/index.d.ts +2 -0
- package/dist/xlsx/dialogs/insert-chart.d.ts +7 -0
- package/dist/xlsx/dialogs/insert-function.d.ts +10 -0
- package/dist/xlsx/dialogs/move-copy-sheet.d.ts +5 -0
- package/dist/xlsx/dialogs/name-manager.d.ts +9 -0
- package/dist/xlsx/dialogs/package-password.d.ts +3 -0
- package/dist/xlsx/dialogs/page-setup-tabs.d.ts +23 -0
- package/dist/xlsx/dialogs/page-setup.d.ts +6 -0
- package/dist/xlsx/dialogs/paste-special.d.ts +3 -0
- package/dist/xlsx/dialogs/prompts.d.ts +42 -0
- package/dist/xlsx/dialogs/protect-sheet.d.ts +8 -0
- package/dist/xlsx/dialogs/register-navigation.d.ts +2 -0
- package/dist/xlsx/dialogs/register-rules.d.ts +2 -0
- package/dist/xlsx/dialogs/register-tools.d.ts +2 -0
- package/dist/xlsx/dialogs/remove-duplicates.d.ts +2 -0
- package/dist/xlsx/dialogs/simple.d.ts +2 -0
- package/dist/xlsx/dialogs/sort-dialog.d.ts +6 -0
- package/dist/xlsx/dialogs/statistics.d.ts +12 -0
- package/dist/xlsx/dialogs/styles.d.ts +1 -0
- package/dist/xlsx/dialogs/symbol.d.ts +6 -0
- package/dist/xlsx/dialogs/text-to-columns.d.ts +9 -0
- package/dist/xlsx/dialogs/zoom.d.ts +2 -0
- package/dist/xlsx/editor-attributes.d.ts +26 -0
- package/dist/xlsx/editor-core.d.ts +91 -0
- package/dist/xlsx/editor-files.d.ts +28 -0
- package/dist/xlsx/editor-shell.d.ts +29 -0
- package/dist/xlsx/element-api.d.ts +34 -0
- package/dist/xlsx/events.d.ts +64 -0
- package/dist/xlsx/file-commands.d.ts +24 -0
- package/dist/xlsx/formula-bar/formula-input.d.ts +11 -0
- package/dist/xlsx/formula-bar/index.d.ts +3 -0
- package/dist/xlsx/formula-bar/name-box.d.ts +10 -0
- package/dist/xlsx/formula-bar/styles.d.ts +1 -0
- package/dist/xlsx/grid/alert.d.ts +4 -0
- package/dist/xlsx/grid/cell-editor.d.ts +29 -0
- package/dist/xlsx/grid/cell-layer.d.ts +14 -0
- package/dist/xlsx/grid/dom.d.ts +19 -0
- package/dist/xlsx/grid/drawing-keys.d.ts +7 -0
- package/dist/xlsx/grid/drawings.d.ts +12 -0
- package/dist/xlsx/grid/formula-field.d.ts +11 -0
- package/dist/xlsx/grid/function-assist.d.ts +16 -0
- package/dist/xlsx/grid/grid-a11y.d.ts +12 -0
- package/dist/xlsx/grid/grid-commands.d.ts +19 -0
- package/dist/xlsx/grid/grid-keys.d.ts +19 -0
- package/dist/xlsx/grid/grid-menus.d.ts +8 -0
- package/dist/xlsx/grid/grid-pointer.d.ts +16 -0
- package/dist/xlsx/grid/grid-selection.d.ts +22 -0
- package/dist/xlsx/grid/grid-view.d.ts +75 -0
- package/dist/xlsx/grid/gridlines.d.ts +7 -0
- package/dist/xlsx/grid/header-resize.d.ts +8 -0
- package/dist/xlsx/grid/headers.d.ts +9 -0
- package/dist/xlsx/grid/index.d.ts +8 -0
- package/dist/xlsx/grid/indicators.d.ts +5 -0
- package/dist/xlsx/grid/measure.d.ts +9 -0
- package/dist/xlsx/grid/pane-chrome.d.ts +22 -0
- package/dist/xlsx/grid/point-mode.d.ts +27 -0
- package/dist/xlsx/grid/selection-layer.d.ts +32 -0
- package/dist/xlsx/grid/smartart.d.ts +10 -0
- package/dist/xlsx/grid/styles.d.ts +1 -0
- package/dist/xlsx/grid/test-context.d.ts +14 -0
- package/dist/xlsx/grid/validation-list.d.ts +13 -0
- package/dist/xlsx/index.d.ts +10 -0
- package/dist/xlsx/keyboard.d.ts +41 -0
- package/dist/xlsx/modules.d.ts +4 -0
- package/dist/xlsx/print.d.ts +22 -0
- package/dist/xlsx/ribbon/caption.d.ts +4 -0
- package/dist/xlsx/ribbon/color-grid.d.ts +18 -0
- package/dist/xlsx/ribbon/controls-input.d.ts +22 -0
- package/dist/xlsx/ribbon/controls.d.ts +28 -0
- package/dist/xlsx/ribbon/icons.d.ts +8 -0
- package/dist/xlsx/ribbon/keytips.d.ts +12 -0
- package/dist/xlsx/ribbon/overflow.d.ts +3 -0
- package/dist/xlsx/ribbon/popover.d.ts +30 -0
- package/dist/xlsx/ribbon/ribbon.d.ts +24 -0
- package/dist/xlsx/ribbon/tabs/contextual.d.ts +3 -0
- package/dist/xlsx/ribbon/tabs/formulas-data.d.ts +3 -0
- package/dist/xlsx/ribbon/tabs/home-groups.d.ts +6 -0
- package/dist/xlsx/ribbon/tabs/home.d.ts +3 -0
- package/dist/xlsx/ribbon/tabs/index.d.ts +2 -0
- package/dist/xlsx/ribbon/tabs/insert-layout.d.ts +3 -0
- package/dist/xlsx/ribbon/visibility.d.ts +1 -0
- package/dist/xlsx/sheet-tabs/drag.d.ts +12 -0
- package/dist/xlsx/sheet-tabs/index.d.ts +4 -0
- package/dist/xlsx/sheet-tabs/rename.d.ts +8 -0
- package/dist/xlsx/sheet-tabs/render.d.ts +15 -0
- package/dist/xlsx/sheet-tabs/styles.d.ts +1 -0
- package/dist/xlsx/shell-commands.d.ts +13 -0
- package/dist/xlsx/shortcut-help.d.ts +15 -0
- package/dist/xlsx/status-bar.d.ts +26 -0
- package/dist/xlsx/test-support/shell.d.ts +19 -0
- package/dist/xlsx/theme/index.d.ts +5 -0
- package/dist/xlsx/theme/styles.d.ts +7 -0
- package/dist/xlsx/title-bar.d.ts +17 -0
- package/dist/xlsx/toast.d.ts +8 -0
- package/dist/xlsx.js +14188 -0
- package/package.json +27 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BackstageHost } from './parts';
|
|
2
|
+
export type { BackstageHost, EditorOptions, CalculationMode, IterationSettings } from './parts';
|
|
3
|
+
export { compatibilityNotes, formatNotes } from './pages-info';
|
|
4
|
+
export { createTemplateWorkbook, TEMPLATES, type TemplateId } from 'ooxml-core/xlsx/ui';
|
|
5
|
+
export type BackstagePage = 'info' | 'new' | 'open' | 'saveAs' | 'print' | 'export' | 'options' | 'customize';
|
|
6
|
+
export interface Backstage {
|
|
7
|
+
readonly element: HTMLElement;
|
|
8
|
+
open(page?: BackstagePage): void;
|
|
9
|
+
close(): void;
|
|
10
|
+
readonly isOpen: boolean;
|
|
11
|
+
/** Re-renders the open page (after a locale change). */
|
|
12
|
+
relocalize(): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function createBackstage(host: BackstageHost): Backstage;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type PageContext } from './parts';
|
|
2
|
+
export declare function renderNew(page: PageContext): void;
|
|
3
|
+
export declare function renderOpen(page: PageContext): void;
|
|
4
|
+
export declare function renderSaveAs(page: PageContext): void;
|
|
5
|
+
export declare function renderPrint(page: PageContext): void;
|
|
6
|
+
export declare function renderExport(page: PageContext): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** File > Info: name and save state, compatibility notes, properties and workbook facts. */
|
|
2
|
+
import type { Workbook } from 'ooxml-core/xlsx';
|
|
3
|
+
import { type PageContext } from './parts';
|
|
4
|
+
type T = PageContext['t'];
|
|
5
|
+
/** Notes about what this editor does with the opened format (shown on Info and on load). */
|
|
6
|
+
export declare function formatNotes(workbook: Workbook, t: T): string[];
|
|
7
|
+
/** Every note for Info: the format notes, then what the loader reported. */
|
|
8
|
+
export declare function compatibilityNotes(workbook: Workbook, t: T): string[];
|
|
9
|
+
export declare function renderInfo(page: PageContext): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PageContext } from './parts';
|
|
2
|
+
export declare function renderOptions(page: PageContext): void;
|
|
3
|
+
/**
|
|
4
|
+
* Customize Ribbon, reduced to showing and hiding: every tab, group and command with a checkbox.
|
|
5
|
+
* Unchecked commands go into `hiddenActions` (and the `ribbon-customize` event).
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderCustomize(page: PageContext): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Shared building blocks and the host interface of the File backstage pages. */
|
|
2
|
+
import type { WorkbookProperties } from 'ooxml-core/xlsx';
|
|
3
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
4
|
+
import type { FileCommand } from '../events';
|
|
5
|
+
import type { SaveState } from '../title-bar';
|
|
6
|
+
import type { TemplateId } from 'ooxml-core/xlsx/ui';
|
|
7
|
+
export type CalculationMode = 'automatic' | 'manual';
|
|
8
|
+
/** Iterative calculation: maximum iterations and maximum change; undefined when off. */
|
|
9
|
+
export type IterationSettings = {
|
|
10
|
+
count: number;
|
|
11
|
+
delta: number;
|
|
12
|
+
} | undefined;
|
|
13
|
+
export interface EditorOptions {
|
|
14
|
+
locale: string;
|
|
15
|
+
theme: string;
|
|
16
|
+
author: string;
|
|
17
|
+
calculation: CalculationMode;
|
|
18
|
+
iteration: IterationSettings;
|
|
19
|
+
}
|
|
20
|
+
/** What the File view needs from the editor; every value is read when a page opens. */
|
|
21
|
+
export interface BackstageHost {
|
|
22
|
+
readonly ctx: EditorContext;
|
|
23
|
+
fileName(): string;
|
|
24
|
+
saveState(): SaveState;
|
|
25
|
+
fileCommand(command: FileCommand, fileName?: string): void;
|
|
26
|
+
newFromTemplate(id: TemplateId): void;
|
|
27
|
+
close(): void;
|
|
28
|
+
options(): EditorOptions;
|
|
29
|
+
setOption<K extends keyof EditorOptions>(key: K, value: EditorOptions[K]): void;
|
|
30
|
+
/** Sets a workbook property (title, author, ...); an empty value clears it. */
|
|
31
|
+
setProperty<K extends keyof WorkbookProperties>(key: K, value: WorkbookProperties[K]): void;
|
|
32
|
+
passwordProtected?(): boolean;
|
|
33
|
+
setPassword?(): Promise<void>;
|
|
34
|
+
removePassword?(): void;
|
|
35
|
+
hiddenActions(): readonly string[];
|
|
36
|
+
setHiddenActions(ids: string[]): void;
|
|
37
|
+
}
|
|
38
|
+
export interface PageContext {
|
|
39
|
+
host: BackstageHost;
|
|
40
|
+
content: HTMLElement;
|
|
41
|
+
t: EditorContext['t'];
|
|
42
|
+
doc: Document;
|
|
43
|
+
}
|
|
44
|
+
export declare function heading(page: PageContext, text: string, level?: 'h2' | 'h3'): HTMLElement;
|
|
45
|
+
export declare function paragraph(page: PageContext, text: string, className?: string): HTMLElement;
|
|
46
|
+
export declare function primary(page: PageContext, label: string, run: () => void): HTMLButtonElement;
|
|
47
|
+
export declare function labelled(page: PageContext, label: string, control: HTMLElement): HTMLElement;
|
|
48
|
+
/** An action card: a title, a description and one button. */
|
|
49
|
+
export declare function card(page: PageContext, title: string, description: string, action: HTMLElement): HTMLElement;
|
|
50
|
+
export declare function facts(page: PageContext, rows: Array<[string, string]>): HTMLElement;
|
|
51
|
+
export declare function noteList(page: PageContext, notes: string[], empty: string): HTMLElement;
|
|
52
|
+
/** Runs a file command after closing the backstage, as Excel does. */
|
|
53
|
+
export declare const runFile: (page: PageContext, command: FileCommand, fileName?: string) => () => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Workbook } from 'ooxml-core/xlsx';
|
|
2
|
+
import { type PageContext } from './parts';
|
|
3
|
+
/** Edits known custom-property values while retaining unknown variants verbatim. */
|
|
4
|
+
export declare function customProperties(page: PageContext, workbook: Workbook): HTMLElement;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CellRange, type ClipboardPayload, type PasteMode } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export interface ClipboardHost {
|
|
4
|
+
ctx: EditorContext;
|
|
5
|
+
/** The focus sink textarea (native copy/cut/paste events fire on it). */
|
|
6
|
+
sink: HTMLTextAreaElement;
|
|
7
|
+
isEditing(): boolean;
|
|
8
|
+
/** Shows (or clears) the marching-ants marquee. */
|
|
9
|
+
setMarquee(range: CellRange | undefined, sheet: number): void;
|
|
10
|
+
/** Selects the pasted range. */
|
|
11
|
+
selectRange(range: CellRange): void;
|
|
12
|
+
}
|
|
13
|
+
export interface GridClipboard {
|
|
14
|
+
copy(cut: boolean): ClipboardPayload | undefined;
|
|
15
|
+
prepareNativeCopy(cut: boolean): void;
|
|
16
|
+
writeSystem(cut: boolean): Promise<boolean>;
|
|
17
|
+
pasteSystem(mode?: PasteMode): Promise<boolean>;
|
|
18
|
+
paste(data: {
|
|
19
|
+
html?: string;
|
|
20
|
+
text?: string;
|
|
21
|
+
}, mode?: PasteMode): boolean;
|
|
22
|
+
clearMarquee(): boolean;
|
|
23
|
+
internal(): ClipboardPayload | undefined;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
export declare function createGridClipboard(host: ClipboardHost): GridClipboard;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Command } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
import { commandTabs } from '../ribbon/tabs/index.js';
|
|
4
|
+
/** Every UI-COMMANDS command (fresh objects; safe to register on several editors). */
|
|
5
|
+
export declare function allCommands(): Command[];
|
|
6
|
+
/**
|
|
7
|
+
* Registers the commands, dialogs and ribbon tabs on `ctx`. Returns a disposer for the listeners
|
|
8
|
+
* it adds (the format painter).
|
|
9
|
+
*/
|
|
10
|
+
export declare function installCommands(ctx: EditorContext): () => void;
|
|
11
|
+
export { commandTabs };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Command } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
/** Today's date or the current time (to the minute) as a serial, in local wall time. */
|
|
3
|
+
export declare function nowSerial(kind: 'date' | 'time', now?: Date): number;
|
|
4
|
+
export declare function insertNowCommands(): Command[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ChartType } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { Command } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
4
|
+
export declare const CHART_TYPES: ReadonlyArray<readonly [type: ChartType, label: string, glyph: string]>;
|
|
5
|
+
/** Inserts a picture file at the active cell (scaled to at most 640 px wide, like Excel's fit). */
|
|
6
|
+
export declare function insertPicture(ctx: EditorContext, file: File): Promise<void>;
|
|
7
|
+
export declare function insertCommands(): Command[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Comment } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { Command } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
4
|
+
declare const commentAt: (ctx: EditorContext) => Comment | undefined;
|
|
5
|
+
export declare function reviewCommands(): Command[];
|
|
6
|
+
export { commentAt };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Command } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
import { COLOR_SCALES, DATA_BAR_COLORS, ICON_SETS } from 'ooxml-core/xlsx/ui';
|
|
4
|
+
/** Quick rule kinds opened by the Highlight Cells and Top / Bottom menus. */
|
|
5
|
+
export declare const QUICK_RULES: ReadonlyArray<readonly [kind: string, label: string]>;
|
|
6
|
+
export declare function styleCommands(): Command[];
|
|
7
|
+
export declare const tableStyleGalleryItems: (ctx: EditorContext) => {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
preview: string;
|
|
11
|
+
}[];
|
|
12
|
+
export declare const cellStyleGalleryItems: (ctx: EditorContext) => {
|
|
13
|
+
id: string;
|
|
14
|
+
preview?: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
export { COLOR_SCALES, DATA_BAR_COLORS, ICON_SETS };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Workbook } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext, GridController } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export interface TestContext extends EditorContext {
|
|
4
|
+
select(ref: string): void;
|
|
5
|
+
toasts: {
|
|
6
|
+
message: string;
|
|
7
|
+
kind?: string;
|
|
8
|
+
}[];
|
|
9
|
+
events: {
|
|
10
|
+
type: string;
|
|
11
|
+
detail: unknown;
|
|
12
|
+
}[];
|
|
13
|
+
setReadOnly(value: boolean): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function createTestContext(workbook?: Workbook, options?: {
|
|
16
|
+
grid?: Partial<GridController>;
|
|
17
|
+
dom?: boolean;
|
|
18
|
+
}): TestContext;
|
|
19
|
+
/** The open dialog element by `data-dialog` name. */
|
|
20
|
+
export declare function dialogEl(ctx: EditorContext, name: string): HTMLElement;
|
|
21
|
+
export declare function clickButton(root: HTMLElement, label: string): void;
|
|
22
|
+
export declare function inputByLabel<T extends HTMLElement = HTMLInputElement>(root: HTMLElement, label: string): T;
|
|
23
|
+
export declare function setValue(el: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement, value: string): void;
|
|
24
|
+
export declare function pressKey(el: HTMLElement, key: string): void;
|
|
25
|
+
export declare const tick: () => Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Command } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export declare const currentZoom: (ctx: EditorContext) => number;
|
|
4
|
+
export declare function setZoom(ctx: EditorContext, percent: number): void;
|
|
5
|
+
/** The zoom at which the selection fills the visible grid (10 to 400 percent). */
|
|
6
|
+
export declare function zoomToFit(ctx: EditorContext): number | undefined;
|
|
7
|
+
export declare function viewCommands(): Command[];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<xlsx-editor>`: the properties, attributes and lifecycle. Methods are in element-api.ts, state
|
|
3
|
+
* in editor-core.ts and the DOM in editor-shell.ts.
|
|
4
|
+
*/
|
|
5
|
+
import type { Workbook } from 'ooxml-core/xlsx';
|
|
6
|
+
import { XlsxEditorApi } from './element-api';
|
|
7
|
+
import type { XlsxEditorEventMap } from './events';
|
|
8
|
+
import type { EditorLocale, EditorLocaleInput } from 'ooxml-core/xlsx/ui';
|
|
9
|
+
import { type EditorThemeMode, type XlsxTheme } from './theme';
|
|
10
|
+
/** Theme tokens, applied to the host as `--xve-<kebab-key>` custom properties. */
|
|
11
|
+
export type XlsxThemeColors = Partial<XlsxTheme>;
|
|
12
|
+
type Listener<K extends keyof XlsxEditorEventMap> = (this: XlsxEditorElement, event: CustomEvent<XlsxEditorEventMap[K]>) => unknown;
|
|
13
|
+
/** Typed event overloads (redeclaring hides the inherited ones, so the DOM map is repeated). */
|
|
14
|
+
export interface XlsxEditorElement {
|
|
15
|
+
addEventListener<K extends keyof XlsxEditorEventMap>(type: K, listener: Listener<K>, options?: boolean | AddEventListenerOptions): void;
|
|
16
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: XlsxEditorElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
17
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
18
|
+
removeEventListener<K extends keyof XlsxEditorEventMap>(type: K, listener: Listener<K>, options?: boolean | EventListenerOptions): void;
|
|
19
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: XlsxEditorElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
20
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
21
|
+
}
|
|
22
|
+
export declare class XlsxEditorElement extends XlsxEditorApi {
|
|
23
|
+
static get observedAttributes(): readonly string[];
|
|
24
|
+
private shell;
|
|
25
|
+
connectedCallback(): void;
|
|
26
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
27
|
+
/** Interface language: `en`, `fr`, `de`, `es`, `zh-CN` (any tag mapping to one). */
|
|
28
|
+
get locale(): EditorLocale;
|
|
29
|
+
set locale(value: EditorLocaleInput);
|
|
30
|
+
get readOnly(): boolean;
|
|
31
|
+
set readOnly(value: boolean);
|
|
32
|
+
/** Shown in the title bar and used by Save and Download. Default `Book1.xlsx`. */
|
|
33
|
+
get fileName(): string;
|
|
34
|
+
set fileName(value: string);
|
|
35
|
+
/** Author recorded on new comments. Default `Author`. */
|
|
36
|
+
get authorName(): string;
|
|
37
|
+
set authorName(value: string);
|
|
38
|
+
/** `light`, `dark` or `auto` (default, follows the OS). */
|
|
39
|
+
get theme(): EditorThemeMode;
|
|
40
|
+
set theme(value: EditorThemeMode);
|
|
41
|
+
get showToolbar(): boolean;
|
|
42
|
+
set showToolbar(value: boolean);
|
|
43
|
+
get showFormulaBar(): boolean;
|
|
44
|
+
set showFormulaBar(value: boolean);
|
|
45
|
+
/** Token overrides applied inline as `--xve-*` custom properties. */
|
|
46
|
+
get themeColors(): XlsxThemeColors;
|
|
47
|
+
set themeColors(value: XlsxThemeColors | undefined);
|
|
48
|
+
/** Command ids the ribbon, menus, Tell me and shortcuts leave out. */
|
|
49
|
+
get hiddenActions(): string[];
|
|
50
|
+
set hiddenActions(value: readonly string[]);
|
|
51
|
+
/** The open workbook model, or null. Assigning one shows it with a fresh undo history. */
|
|
52
|
+
get workbook(): Workbook | null;
|
|
53
|
+
set workbook(value: Workbook | null);
|
|
54
|
+
/** Unsaved changes since the last load, save or `markClean()`. */
|
|
55
|
+
get dirty(): boolean;
|
|
56
|
+
get activeSheet(): number;
|
|
57
|
+
set activeSheet(index: number);
|
|
58
|
+
}
|
|
59
|
+
declare global {
|
|
60
|
+
interface HTMLElementTagNameMap {
|
|
61
|
+
'xlsx-editor': XlsxEditorElement;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Registers `<xlsx-editor>` once; a no-op without `customElements` (server rendering). */
|
|
65
|
+
export declare function defineXlsxEditor(): void;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { cellMenu, columnHeaderMenu, rowHeaderMenu, tabMenu, type CellMenuState, type HeaderMenuState, type MenuEntry, type TabMenuState, } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
export { currentContextMenu, openContextMenu, type ContextMenuHandle, type OpenMenuOptions, } from './menu.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
import type { MenuEntry } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export interface ContextMenuHandle {
|
|
4
|
+
close(): void;
|
|
5
|
+
readonly element: HTMLElement;
|
|
6
|
+
}
|
|
7
|
+
export interface OpenMenuOptions {
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
/** Called after an item ran or the menu was dismissed with Escape/Tab. */
|
|
10
|
+
restoreFocus?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/** The menu currently open for a context, if any. */
|
|
13
|
+
export declare const currentContextMenu: (ctx: EditorContext) => ContextMenuHandle | undefined;
|
|
14
|
+
export declare function openContextMenu(ctx: EditorContext, entries: MenuEntry[], x: number, y: number, options?: OpenMenuOptions): ContextMenuHandle;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
export type ShiftChoice = 'right' | 'down' | 'left' | 'up' | 'row' | 'column';
|
|
3
|
+
export declare function openCellShift(ctx: EditorContext, mode: 'insert' | 'delete'): Promise<ShiftChoice | undefined>;
|
|
4
|
+
/** Data > Group / Ungroup on a selection that is neither whole rows nor whole columns. */
|
|
5
|
+
export declare function openOutlineAxis(ctx: EditorContext, mode: 'group' | 'ungroup'): Promise<'rows' | 'cols' | undefined>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type CellRange, type ConditionalOperator, type ConditionalRule, type DifferentialStyle, type TimePeriod } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
/** A rule operand as typed: `=...` is a formula, a number stays, other text becomes a literal. */
|
|
4
|
+
export declare function operand(text: string): string;
|
|
5
|
+
/** The text a stored operand shows in a field (formulas get their `=` back). */
|
|
6
|
+
export declare function operandText(formula: string | undefined): string;
|
|
7
|
+
/** Parses "A1:B2 C3" or "=$A$1:$B$2,C3" into ranges; undefined when any part is invalid. */
|
|
8
|
+
export declare function parseRefs(text: string): CellRange[] | undefined;
|
|
9
|
+
export declare const formatRefs: (ranges: CellRange[]) => string;
|
|
10
|
+
export declare const OPERATORS: ReadonlyArray<readonly [ConditionalOperator, string]>;
|
|
11
|
+
/** "A Date Occurring" periods in the order Excel's drop-down lists them. */
|
|
12
|
+
export declare const TIME_PERIOD_LABELS: ReadonlyArray<readonly [TimePeriod, string]>;
|
|
13
|
+
/** A one-line description of a rule, as the Rules Manager lists it. */
|
|
14
|
+
export declare function describeRule(ctx: EditorContext, rule: ConditionalRule): string;
|
|
15
|
+
/** The "AaBbCcYyZz" sample of a differential style (or a gradient for scales and bars). */
|
|
16
|
+
export declare function previewBox(ctx: EditorContext): {
|
|
17
|
+
element: HTMLDivElement;
|
|
18
|
+
show(rule: ConditionalRule | DifferentialStyle | undefined): void;
|
|
19
|
+
};
|
|
20
|
+
/** Opens Format Cells in differential mode; resolves the new style or undefined. */
|
|
21
|
+
export declare function customFormat(ctx: EditorContext, dxf: DifferentialStyle): Promise<DifferentialStyle | undefined>;
|
|
22
|
+
/** Whether a rule carries a differential style. */
|
|
23
|
+
export declare const hasStyle: (rule: ConditionalRule) => rule is Extract<ConditionalRule, {
|
|
24
|
+
style: DifferentialStyle;
|
|
25
|
+
}>;
|
|
26
|
+
/** Whether a rule type supports Stop If True in the model. */
|
|
27
|
+
export declare const hasStopIfTrue: (rule: ConditionalRule) => rule is Extract<ConditionalRule, {
|
|
28
|
+
stopIfTrue?: boolean;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ConditionalFormat } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
import { type RuleEdit } from './cf-rule.js';
|
|
4
|
+
/** Flattens a sheet's formats into one entry per rule, sorted by priority. */
|
|
5
|
+
export declare function stageRules(formats: ConditionalFormat[]): RuleEdit[];
|
|
6
|
+
/** One conditional format per staged rule, priorities 1..n in list order. */
|
|
7
|
+
export declare function unstageRules(entries: RuleEdit[]): ConditionalFormat[];
|
|
8
|
+
export declare function cfManagerDialog(ctx: EditorContext): Promise<ConditionalFormat[] | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConditionalRule, DifferentialStyle, TimePeriod } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export declare const QUICK_KINDS: string[];
|
|
4
|
+
/** The rule a quick dialog builds from its fields (exported for tests). */
|
|
5
|
+
export declare function quickRule(kind: string, values: string[], style: DifferentialStyle, extra: {
|
|
6
|
+
rank?: number;
|
|
7
|
+
unique?: boolean;
|
|
8
|
+
period?: TimePeriod;
|
|
9
|
+
}): ConditionalRule;
|
|
10
|
+
export declare function cfQuickDialog(ctx: EditorContext, props: unknown): Promise<ConditionalRule | undefined>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ConditionalRule, DifferentialStyle } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export type PanelRead = ConditionalRule | {
|
|
4
|
+
error: string;
|
|
5
|
+
control: HTMLElement;
|
|
6
|
+
vars?: Record<string, string | number>;
|
|
7
|
+
};
|
|
8
|
+
export interface RulePanel {
|
|
9
|
+
element: HTMLElement;
|
|
10
|
+
/** Whether the panel's rules take a differential style (Format... button). */
|
|
11
|
+
styled: boolean;
|
|
12
|
+
load(rule: ConditionalRule): void;
|
|
13
|
+
read(style: DifferentialStyle): PanelRead;
|
|
14
|
+
focus(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function containsPanel(ctx: EditorContext): RulePanel;
|
|
17
|
+
export declare function topPanel(ctx: EditorContext): RulePanel;
|
|
18
|
+
export declare function averagePanel(ctx: EditorContext): RulePanel;
|
|
19
|
+
export declare function uniquePanel(ctx: EditorContext): RulePanel;
|
|
20
|
+
export declare function formulaPanel(ctx: EditorContext): RulePanel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CellRange, ConditionalRule } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export interface RuleEdit {
|
|
4
|
+
rule: ConditionalRule;
|
|
5
|
+
ranges: CellRange[];
|
|
6
|
+
}
|
|
7
|
+
type Kind = 'values' | 'contains' | 'top' | 'average' | 'unique' | 'formula';
|
|
8
|
+
export declare function kindOf(rule: ConditionalRule): Kind;
|
|
9
|
+
/** Shows the rule editor; resolves the edited rule (priority 1, the caller renumbers). */
|
|
10
|
+
export declare function editRuleDialog(ctx: EditorContext, initial?: RuleEdit): Promise<RuleEdit | undefined>;
|
|
11
|
+
/** The 'cf-rule' dialog: a new rule on the selection, or `{ format, rule }` edits that rule. */
|
|
12
|
+
export declare function cfRuleDialog(ctx: EditorContext, props: unknown): Promise<RuleEdit | undefined>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type DefinedName } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export type LabelEdge = 'top' | 'left' | 'bottom' | 'right';
|
|
4
|
+
/** Turns label text into a valid name: spaces to `_`, other invalid characters dropped. */
|
|
5
|
+
export declare function sanitizeName(label: string): string | undefined;
|
|
6
|
+
/** The names a selection yields for the chosen label edges. */
|
|
7
|
+
export declare function namesFromSelection(ctx: EditorContext, edges: readonly LabelEdge[]): DefinedName[];
|
|
8
|
+
export declare function openCreateNames(ctx: EditorContext): Promise<number | undefined>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Table } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export interface CreateTableProps {
|
|
4
|
+
styleName?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function openCreateTable(ctx: EditorContext, props?: CreateTableProps): Promise<Table | undefined>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DefinedName } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export interface DefineNameProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
localSheet?: number;
|
|
6
|
+
}
|
|
7
|
+
/** `=Sheet1!$A$1:$B$2` for the current selection. */
|
|
8
|
+
export declare function selectionReference(ctx: EditorContext): string;
|
|
9
|
+
export declare function openDefineName(ctx: EditorContext, props?: DefineNameProps): Promise<DefinedName | undefined>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
type El = HTMLElement;
|
|
3
|
+
declare const make: <K extends keyof HTMLElementTagNameMap>(ctx: EditorContext, tag: K, className?: string) => HTMLElementTagNameMap[K];
|
|
4
|
+
export declare const el: typeof make;
|
|
5
|
+
export declare const nextId: (prefix: string) => string;
|
|
6
|
+
/** A labelled control in one row: `<label>text</label><control>`. */
|
|
7
|
+
export declare function field<T extends El>(ctx: EditorContext, label: string, control: T): HTMLLabelElement;
|
|
8
|
+
export declare function textInput(ctx: EditorContext, value?: string, name?: string): HTMLInputElement;
|
|
9
|
+
export declare function numberInput(ctx: EditorContext, value: number, min: number, max: number, step?: number): HTMLInputElement;
|
|
10
|
+
export declare function textArea(ctx: EditorContext, value?: string, rows?: number): HTMLTextAreaElement;
|
|
11
|
+
/** A native select; option labels are English keys unless `raw` is set. */
|
|
12
|
+
export declare function select(ctx: EditorContext, options: ReadonlyArray<readonly [value: string, label: string]>, value?: string, raw?: boolean): HTMLSelectElement;
|
|
13
|
+
export declare function checkbox(ctx: EditorContext, label: string, checked?: boolean): {
|
|
14
|
+
wrapper: HTMLLabelElement;
|
|
15
|
+
input: HTMLInputElement;
|
|
16
|
+
};
|
|
17
|
+
/** A radio group; returns the wrapper and a getter / setter for the chosen value. */
|
|
18
|
+
export declare function radios(ctx: EditorContext, legend: string, options: ReadonlyArray<readonly [value: string, label: string]>, value: string): {
|
|
19
|
+
element: HTMLFieldSetElement;
|
|
20
|
+
get(): string;
|
|
21
|
+
set(v: string): void;
|
|
22
|
+
inputs: HTMLInputElement[];
|
|
23
|
+
};
|
|
24
|
+
export declare function fieldset(ctx: EditorContext, legend: string, ...children: El[]): HTMLFieldSetElement;
|
|
25
|
+
export declare function row(ctx: EditorContext, ...children: El[]): HTMLDivElement;
|
|
26
|
+
export declare function text(ctx: EditorContext, key: string, className?: string, vars?: Record<string, string | number>): HTMLParagraphElement;
|
|
27
|
+
/** A list box (`role="listbox"`) of options with keyboard selection; `raw` labels are shown as is. */
|
|
28
|
+
export declare function listBox(ctx: EditorContext, label: string, onChange?: (value: string) => void, onActivate?: (value: string) => void): {
|
|
29
|
+
element: HTMLDivElement;
|
|
30
|
+
setItems(items: ReadonlyArray<readonly [value: string, label: string]>, raw?: boolean): void;
|
|
31
|
+
value(): string | undefined;
|
|
32
|
+
select(value: string): void;
|
|
33
|
+
};
|
|
34
|
+
/** Accessible tabs (`role="tablist"`, arrow keys move between tabs). */
|
|
35
|
+
export declare function tabs(ctx: EditorContext, pages: ReadonlyArray<{
|
|
36
|
+
id: string;
|
|
37
|
+
label: string;
|
|
38
|
+
panel: HTMLElement;
|
|
39
|
+
}>, initial?: string): {
|
|
40
|
+
element: HTMLDivElement;
|
|
41
|
+
show(id: string): void;
|
|
42
|
+
current(): string;
|
|
43
|
+
};
|
|
44
|
+
export declare function panel(ctx: EditorContext, ...children: El[]): HTMLDivElement;
|
|
45
|
+
/** Marks a field invalid with a translated message, focusing it; returns undefined. */
|
|
46
|
+
export declare function invalid(ctx: EditorContext, control: HTMLElement, message: string, vars?: Record<string, string | number>): undefined;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
export type SeriesType = 'linear' | 'growth' | 'date';
|
|
3
|
+
export type DateUnit = 'day' | 'weekday' | 'month' | 'year';
|
|
4
|
+
/** `count` values starting at `start`; stops before passing `stop`. */
|
|
5
|
+
export declare function seriesValues(start: number, count: number, type: SeriesType, step: number, options?: {
|
|
6
|
+
stop?: number;
|
|
7
|
+
unit?: DateUnit;
|
|
8
|
+
date1904?: boolean;
|
|
9
|
+
}): number[];
|
|
10
|
+
export declare function openFillSeries(ctx: EditorContext): Promise<number | undefined>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FindMatch } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export interface FindReplaceProps {
|
|
4
|
+
tab?: 'find' | 'replace';
|
|
5
|
+
}
|
|
6
|
+
/** Matches after the active cell first (wrapping), as Find Next walks them. */
|
|
7
|
+
export declare function orderFrom(matches: FindMatch[], sheet: number, row: number, col: number, byColumns: boolean): FindMatch[];
|
|
8
|
+
export declare function openFindReplace(ctx: EditorContext, props?: FindReplaceProps): Promise<number | undefined>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FormatTab, TabInit } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
/** Excel's textRotation (0-90 up, 91-180 down) as dialog degrees (-90 to 90). */
|
|
3
|
+
export declare const rotationToDegrees: (r: number) => number;
|
|
4
|
+
export declare const degreesToRotation: (d: number) => number;
|
|
5
|
+
export declare function alignmentTab(init: TabInit): FormatTab;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BorderStyle } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { FormatTab, TabInit } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export declare const LINE_STYLES: ReadonlyArray<readonly [BorderStyle | 'none', string, string]>;
|
|
4
|
+
export declare function borderTab(init: TabInit): FormatTab;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Color } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export declare const colorKey: (color: Color | undefined) => string;
|
|
4
|
+
export interface SwatchGrid {
|
|
5
|
+
element: HTMLDivElement;
|
|
6
|
+
value(): Color | undefined;
|
|
7
|
+
set(color: Color | undefined): void;
|
|
8
|
+
}
|
|
9
|
+
/** `noneLabel` names the "no colour" button (`Automatic` or `No Color`). */
|
|
10
|
+
export declare function swatchGrid(ctx: EditorContext, label: string, noneLabel: string, initial: Color | undefined, onChange?: (color: Color | undefined) => void): SwatchGrid;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Color, Fill, PatternType } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { FormatTab, TabInit } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export declare const PATTERNS: ReadonlyArray<readonly [PatternType, string]>;
|
|
4
|
+
/** The dialog's three fields for a fill. */
|
|
5
|
+
export declare function readFill(fill: Fill, dxf: boolean): {
|
|
6
|
+
background?: Color;
|
|
7
|
+
patternColor?: Color;
|
|
8
|
+
pattern: PatternType;
|
|
9
|
+
};
|
|
10
|
+
export declare function buildFill(background: Color | undefined, patternColor: Color | undefined, pattern: PatternType, dxf: boolean): Fill;
|
|
11
|
+
export declare function fillTab(init: TabInit): FormatTab;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DifferentialStyle } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
import type { FormatCellsProps } from 'ooxml-core/xlsx/ui';
|
|
4
|
+
export type { FormatCellsProps, FormatTabId } from 'ooxml-core/xlsx/ui';
|
|
5
|
+
export declare function openFormatCells(ctx: EditorContext, props?: FormatCellsProps): Promise<true | DifferentialStyle | undefined>;
|
|
6
|
+
export declare function registerFormatCellsDialogs(ctx: EditorContext): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CellValue } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { FormatTab, TabInit } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export declare function format(value: CellValue, code: string, date1904: boolean): {
|
|
4
|
+
text: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function numberTab(init: TabInit): FormatTab;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Color } from 'ooxml-core/xlsx';
|
|
2
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
/** Resolves with `{ color }` (color undefined for No Color); undefined when cancelled. */
|
|
4
|
+
export declare function openTabColorDialog(ctx: EditorContext): Promise<{
|
|
5
|
+
color: Color | undefined;
|
|
6
|
+
} | undefined>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
2
|
+
export interface DialogSpec<T> {
|
|
3
|
+
/** English heading (translated here). */
|
|
4
|
+
heading: string;
|
|
5
|
+
body: HTMLElement | HTMLElement[];
|
|
6
|
+
/** English label of the confirm button; default `OK`. Null hides OK (a Close-only dialog). */
|
|
7
|
+
okLabel?: string | null;
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
/** Extra footer buttons, before Cancel / OK. */
|
|
10
|
+
buttons?: HTMLButtonElement[];
|
|
11
|
+
/** Validates and applies; return undefined to keep the dialog open. */
|
|
12
|
+
submit?(): T | undefined | Promise<T | undefined>;
|
|
13
|
+
/** Called once the dialog is in the document and open (set the initial focus here). */
|
|
14
|
+
opened?(): void;
|
|
15
|
+
/** Wider frame for tabbed dialogs. */
|
|
16
|
+
wide?: boolean;
|
|
17
|
+
/** `data-dialog` name, for tests and styling. */
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export interface OpenDialog {
|
|
21
|
+
element: HTMLElement;
|
|
22
|
+
close(): void;
|
|
23
|
+
}
|
|
24
|
+
/** A plain footer / body button (`primary` gets the accent look). */
|
|
25
|
+
export declare function button(ctx: EditorContext, label: string, primary?: boolean): HTMLButtonElement;
|
|
26
|
+
/** Opens a dialog and resolves with its result (undefined when cancelled or closed). */
|
|
27
|
+
export declare function showDialog<T>(ctx: EditorContext, spec: DialogSpec<T>, handle?: (open: OpenDialog) => void): Promise<T | undefined>;
|