ooxml-ui 0.27.2 → 0.29.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 +16 -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
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { installOfficeUiTheme } from './chunk-7QLJS57B.js';
|
|
2
|
+
import { registerControls } from './chunk-G4ZGQYBH.js';
|
|
1
3
|
import { registerIcon, getIcon } from './chunk-HZ422LTR.js';
|
|
2
|
-
import { initialsOf } from './chunk-V6W5DKJ6.js';
|
|
4
|
+
import { initialsOf, definePresence } from './chunk-V6W5DKJ6.js';
|
|
3
5
|
import { definer, OfficeElement, controlStyles } from './chunk-ZWBP2WTC.js';
|
|
4
|
-
import { html, nothing, unsafeCSS, svg } from 'lit';
|
|
6
|
+
import { html, nothing, LitElement, unsafeCSS, svg } from 'lit';
|
|
5
7
|
import { repeat } from 'lit/directives/repeat.js';
|
|
6
8
|
import { live } from 'lit/directives/live.js';
|
|
9
|
+
import { parseServerConfig, createTeamsClient } from 'ooxml-core/teams';
|
|
7
10
|
|
|
8
11
|
// raw-css:/home/runner/work/ooxml/ooxml/packages/ui/src/teams/reset.css?raw
|
|
9
12
|
var reset_default = ":host {\n box-sizing: border-box;\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n}\n*,\n*::before,\n*::after {\n box-sizing: inherit;\n}\nbutton {\n font: inherit;\n color: inherit;\n cursor: pointer;\n}\nbutton:focus-visible,\ntextarea:focus-visible,\ninput:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\nsvg.icon {\n width: 1.25em;\n height: 1.25em;\n flex: none;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n";
|
|
@@ -808,6 +811,619 @@ var OfficeUiPrejoin = class extends TeamsElement {
|
|
|
808
811
|
}
|
|
809
812
|
};
|
|
810
813
|
var definePrejoin = definer("office-ui-prejoin", () => OfficeUiPrejoin);
|
|
814
|
+
var TeamsController = class {
|
|
815
|
+
constructor(host, onNotice) {
|
|
816
|
+
this.host = host;
|
|
817
|
+
this.onNotice = onNotice;
|
|
818
|
+
host.addController(this);
|
|
819
|
+
}
|
|
820
|
+
host;
|
|
821
|
+
onNotice;
|
|
822
|
+
client = null;
|
|
823
|
+
state = null;
|
|
824
|
+
off = [];
|
|
825
|
+
start(options) {
|
|
826
|
+
this.stop();
|
|
827
|
+
const client = createTeamsClient(options);
|
|
828
|
+
this.client = client;
|
|
829
|
+
this.state = client.getState();
|
|
830
|
+
this.off = [
|
|
831
|
+
client.subscribe(() => {
|
|
832
|
+
this.state = client.getState();
|
|
833
|
+
this.host.requestUpdate();
|
|
834
|
+
}),
|
|
835
|
+
client.on("notice", this.onNotice)
|
|
836
|
+
];
|
|
837
|
+
this.host.requestUpdate();
|
|
838
|
+
}
|
|
839
|
+
stop() {
|
|
840
|
+
for (const fn of this.off.splice(0)) fn();
|
|
841
|
+
this.client?.destroy();
|
|
842
|
+
this.client = null;
|
|
843
|
+
this.state = null;
|
|
844
|
+
}
|
|
845
|
+
hostDisconnected() {
|
|
846
|
+
this.stop();
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
// raw-css:/home/runner/work/ooxml/ooxml/packages/ui/src/teams/app/teams-settings.css?raw
|
|
851
|
+
var teams_settings_default = ":host {\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n}\ndialog {\n width: min(36em, 94vw);\n padding: 0;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-lg);\n background: var(--office-popover);\n color: inherit;\n box-shadow: var(--office-shadow-teams);\n}\ndialog::backdrop {\n background: var(--office-overlay);\n}\nform {\n display: grid;\n gap: var(--office-space-3);\n padding: var(--office-space-5);\n}\nh2 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n}\nlabel {\n display: grid;\n gap: var(--office-space-1);\n font-weight: var(--office-font-weight-bold);\n}\nsmall {\n color: var(--office-teams-text-subtle);\n font-weight: normal;\n}\ninput,\ntextarea,\nselect {\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n color: inherit;\n font: inherit;\n}\ntextarea {\n min-height: 5.5em;\n font-family: ui-monospace, monospace;\n font-size: 0.9em;\n}\n.issues {\n margin: 0;\n padding-inline-start: 1.2em;\n color: var(--office-danger);\n font-size: var(--office-font-size-sm);\n}\n.actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--office-space-2);\n}\nbutton {\n padding: var(--office-space-2) var(--office-space-4);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\nbutton.primary {\n border-color: transparent;\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n}\nbutton.primary:hover {\n background: var(--office-teams-brand-hover);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n";
|
|
852
|
+
|
|
853
|
+
// src/teams/app/teams-settings.ts
|
|
854
|
+
function parseIceLines(text) {
|
|
855
|
+
return text.split("\n").map((line) => line.trim()).filter(Boolean).map((line) => {
|
|
856
|
+
const [urls = "", username, credential] = line.split(/\s+/u);
|
|
857
|
+
return {
|
|
858
|
+
urls: urls.split(",").filter(Boolean),
|
|
859
|
+
...username ? { username } : {},
|
|
860
|
+
...credential ? { credential } : {}
|
|
861
|
+
};
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
var iceToText = (config) => config.iceServers.map((s) => [[s.urls].flat().join(","), s.username, s.credential].filter(Boolean).join(" ")).join("\n");
|
|
865
|
+
var TeamsSettings = class extends LitElement {
|
|
866
|
+
static styles = unsafeCSS(teams_settings_default);
|
|
867
|
+
static properties = {
|
|
868
|
+
config: { attribute: false },
|
|
869
|
+
open: { type: Boolean, reflect: true },
|
|
870
|
+
issues: { state: true }
|
|
871
|
+
};
|
|
872
|
+
constructor() {
|
|
873
|
+
super();
|
|
874
|
+
this.config = { mode: "local", iceServers: [] };
|
|
875
|
+
this.open = false;
|
|
876
|
+
this.issues = [];
|
|
877
|
+
}
|
|
878
|
+
updated() {
|
|
879
|
+
const dialog = this.renderRoot.querySelector("dialog");
|
|
880
|
+
if (!dialog) return;
|
|
881
|
+
if (this.open && !dialog.open) dialog.showModal();
|
|
882
|
+
if (!this.open && dialog.open) dialog.close();
|
|
883
|
+
}
|
|
884
|
+
field(id) {
|
|
885
|
+
return this.renderRoot.querySelector(`#${id}`);
|
|
886
|
+
}
|
|
887
|
+
apply(event) {
|
|
888
|
+
event.preventDefault();
|
|
889
|
+
const { config, issues } = parseServerConfig({
|
|
890
|
+
mode: this.field("mode").value,
|
|
891
|
+
syncUrl: this.field("sync").value,
|
|
892
|
+
signalingUrl: this.field("signal").value,
|
|
893
|
+
token: this.field("token").value,
|
|
894
|
+
iceServers: parseIceLines(this.field("ice").value),
|
|
895
|
+
iceTransportPolicy: this.field("policy").value
|
|
896
|
+
});
|
|
897
|
+
this.issues = issues;
|
|
898
|
+
if (this.field("mode").value === "server" && config.mode === "local") return;
|
|
899
|
+
this.dispatchEvent(new CustomEvent("teams-settings-apply", { detail: { config }, bubbles: true, composed: true }));
|
|
900
|
+
}
|
|
901
|
+
close() {
|
|
902
|
+
this.dispatchEvent(new CustomEvent("teams-settings-close", { bubbles: true, composed: true }));
|
|
903
|
+
}
|
|
904
|
+
render() {
|
|
905
|
+
const c = this.config;
|
|
906
|
+
return html`
|
|
907
|
+
<dialog @close=${this.close} @cancel=${this.close}>
|
|
908
|
+
<form @submit=${this.apply}>
|
|
909
|
+
<h2>Server settings</h2>
|
|
910
|
+
<label>
|
|
911
|
+
<span>Mode</span>
|
|
912
|
+
<select id="mode" .value=${c.mode}>
|
|
913
|
+
<option value="local" ?selected=${c.mode === "local"}>Local: tabs of this browser only (no server)</option>
|
|
914
|
+
<option value="server" ?selected=${c.mode === "server"}>Your server</option>
|
|
915
|
+
</select>
|
|
916
|
+
</label>
|
|
917
|
+
<label>
|
|
918
|
+
<span>Sync URL</span>
|
|
919
|
+
<input id="sync" .value=${c.syncUrl ?? ""} placeholder="ws://localhost:8787/sync" spellcheck="false" autocomplete="off" />
|
|
920
|
+
<small>y-websocket compatible endpoint; the workspace id is appended.</small>
|
|
921
|
+
</label>
|
|
922
|
+
<label>
|
|
923
|
+
<span>Signaling URL</span>
|
|
924
|
+
<input id="signal" .value=${c.signalingUrl ?? ""} placeholder="ws://localhost:8787/signal" spellcheck="false" autocomplete="off" />
|
|
925
|
+
<small>WebRTC signaling relay; the call room is appended.</small>
|
|
926
|
+
</label>
|
|
927
|
+
<label>
|
|
928
|
+
<span>Access token</span>
|
|
929
|
+
<input id="token" type="password" .value=${c.token ?? ""} placeholder="shared secret" autocomplete="off" />
|
|
930
|
+
<small>Sent as ?token= to both sockets. Stored in this browser.</small>
|
|
931
|
+
</label>
|
|
932
|
+
<label>
|
|
933
|
+
<span>ICE servers</span>
|
|
934
|
+
<textarea id="ice" spellcheck="false" .value=${iceToText(c)} placeholder="stun:stun.example.org:3478 turn:turn.example.org:3478 user password"></textarea>
|
|
935
|
+
<small>One per line: urls [username credential]. TURN needs credentials.</small>
|
|
936
|
+
</label>
|
|
937
|
+
<label>
|
|
938
|
+
<span>ICE transport</span>
|
|
939
|
+
<select id="policy" .value=${c.iceTransportPolicy ?? "all"}>
|
|
940
|
+
<option value="all">All routes (direct when possible)</option>
|
|
941
|
+
<option value="relay" ?selected=${c.iceTransportPolicy === "relay"}>Relay only (TURN required, hides IP addresses)</option>
|
|
942
|
+
</select>
|
|
943
|
+
</label>
|
|
944
|
+
${this.issues.length ? html`<ul class="issues">${this.issues.map((i) => html`<li>${i}</li>`)}</ul>` : nothing}
|
|
945
|
+
<div class="actions">
|
|
946
|
+
<button type="button" @click=${this.close}>Cancel</button>
|
|
947
|
+
<button type="submit" class="primary">Apply and reconnect</button>
|
|
948
|
+
</div>
|
|
949
|
+
</form>
|
|
950
|
+
</dialog>
|
|
951
|
+
`;
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
function defineTeamsSettings(registry = globalThis.customElements) {
|
|
955
|
+
if (registry && !registry.get("teams-settings")) registry.define("teams-settings", TeamsSettings);
|
|
956
|
+
}
|
|
957
|
+
var safeStorage = {
|
|
958
|
+
getItem(key) {
|
|
959
|
+
try {
|
|
960
|
+
return globalThis.localStorage?.getItem(key) ?? null;
|
|
961
|
+
} catch {
|
|
962
|
+
return null;
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
setItem(key, value) {
|
|
966
|
+
try {
|
|
967
|
+
globalThis.localStorage?.setItem(key, value);
|
|
968
|
+
} catch {
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
function loadIdentity() {
|
|
973
|
+
try {
|
|
974
|
+
const raw = JSON.parse(safeStorage.getItem("teams:identity") ?? "null");
|
|
975
|
+
if (raw && typeof raw.id === "string" && typeof raw.name === "string" && raw.name.trim())
|
|
976
|
+
return { id: raw.id, name: raw.name };
|
|
977
|
+
} catch {
|
|
978
|
+
}
|
|
979
|
+
return null;
|
|
980
|
+
}
|
|
981
|
+
var saveIdentity = (identity) => safeStorage.setItem("teams:identity", JSON.stringify(identity));
|
|
982
|
+
function loadConfig() {
|
|
983
|
+
const raw = safeStorage.getItem("teams:config");
|
|
984
|
+
if (!raw) return null;
|
|
985
|
+
try {
|
|
986
|
+
return parseServerConfig(JSON.parse(raw)).config;
|
|
987
|
+
} catch {
|
|
988
|
+
return null;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
var saveConfig = (config) => safeStorage.setItem("teams:config", JSON.stringify(config));
|
|
992
|
+
|
|
993
|
+
// raw-css:/home/runner/work/ooxml/ooxml/packages/ui/src/teams/app/teams-app.css?raw
|
|
994
|
+
var teams_app_default = '/* <teams-app>: the shell. Colours, spacing and radii come from the ooxml-ui tokens, so a host\n retheme or dark mode reaches the whole app. The elements inside bring their own styles. */\n:host {\n display: block;\n height: 100%;\n min-height: 28em;\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n background: var(--office-background);\n}\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nbutton {\n font: inherit;\n color: inherit;\n cursor: pointer;\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n\n.shell {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr);\n height: 100%;\n}\n\n/* ---- top bar ---------------------------------------------------------------------------- */\n.topbar {\n display: grid;\n grid-template-columns: 16em minmax(0, 1fr) auto;\n align-items: center;\n gap: var(--office-space-4);\n padding: var(--office-space-2) var(--office-space-4);\n background: var(--office-teams-rail);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n}\n.brand {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n font-size: var(--office-font-size-lg);\n font-weight: var(--office-font-weight-bold);\n}\n.logo {\n display: inline-grid;\n place-items: center;\n width: 1.8em;\n height: 1.8em;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: 0.85em;\n}\n.search {\n position: relative;\n justify-self: center;\n width: min(34em, 100%);\n}\n.search input {\n width: 100%;\n padding: var(--office-space-2) var(--office-space-4);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-full);\n background: var(--office-background);\n color: inherit;\n font: inherit;\n}\n.results {\n position: absolute;\n inset-inline: 0;\n inset-block-start: calc(100% + var(--office-space-1));\n z-index: 5;\n max-height: 22em;\n margin: 0;\n padding: var(--office-space-1);\n overflow: auto;\n list-style: none;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-popover);\n box-shadow: var(--office-shadow-teams);\n}\n.results button {\n display: grid;\n width: 100%;\n padding: var(--office-space-2) var(--office-space-3);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n text-align: start;\n}\n.results button:hover {\n background: var(--office-selected);\n}\n.results .in,\n.results .none {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\n.results .none {\n padding: var(--office-space-3);\n}\n.snippet {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.me {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n}\n.me select {\n padding: var(--office-space-1) var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius);\n background: var(--office-background);\n color: inherit;\n font: inherit;\n}\n.link {\n border: 0;\n background: transparent;\n text-decoration: underline;\n color: var(--office-teams-brand);\n}\n.conn {\n width: 0.7em;\n height: 0.7em;\n border-radius: 50%;\n background: var(--office-presence-offline);\n}\n.conn[data-status="connected"] { background: var(--office-presence-available); }\n.conn[data-status="connecting"] { background: var(--office-presence-away); }\n.conn[data-status="error"] { background: var(--office-presence-busy); }\n\n/* ---- body ------------------------------------------------------------------------------- */\n.body {\n display: grid;\n grid-template-columns: auto 19em minmax(0, 1fr);\n min-height: 0;\n}\n.side {\n min-height: 0;\n overflow: auto;\n background: var(--office-teams-panel);\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.side h2 {\n margin: 0;\n padding: var(--office-space-3) var(--office-space-4);\n font-size: var(--office-font-size-lg);\n}\n.main {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n.main office-ui-chat-list,\n.main office-ui-prejoin {\n flex: 1;\n}\n\nul.plain {\n margin: 0;\n padding: 0 var(--office-space-3);\n list-style: none;\n}\nul.plain li {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n padding: var(--office-space-2) var(--office-space-2);\n}\nul.plain li > :first-child:not(office-ui-avatar) {\n flex: 1;\n}\n.hint {\n padding: 0 var(--office-space-4);\n color: var(--office-teams-text-subtle);\n}\n.join {\n padding: var(--office-space-1) var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n}\n.join.live {\n border-color: transparent;\n background: var(--office-call-live);\n color: var(--office-call-foreground);\n}\n\n/* ---- conversation ----------------------------------------------------------------------- */\n.channel-head {\n display: flex;\n align-items: center;\n gap: var(--office-space-4);\n padding: var(--office-space-2) var(--office-space-5);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n}\n.channel-head h1 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n white-space: nowrap;\n}\n.hash {\n color: var(--office-teams-text-subtle);\n}\n.tabs {\n display: flex;\n gap: var(--office-space-1);\n}\n.tabs button {\n padding: var(--office-space-2) var(--office-space-3);\n border: 0;\n border-bottom: var(--office-border-width-thick) solid transparent;\n background: transparent;\n}\n.tabs button[aria-selected="true"] {\n border-bottom-color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\n.topic {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n color: var(--office-teams-text-subtle);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.people {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.more {\n margin-inline-start: var(--office-space-1);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\n.meet {\n padding: var(--office-space-2) var(--office-space-4);\n border: 0;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.meet:hover:not(:disabled) {\n background: var(--office-teams-brand-hover);\n}\n.meet:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.callbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--office-space-2) var(--office-space-5);\n background: var(--office-call-live);\n color: var(--office-call-foreground);\n}\n.callbar button {\n padding: 0 var(--office-space-3);\n border: var(--office-border-width) solid currentColor;\n border-radius: var(--office-radius);\n background: transparent;\n}\n\n/* ---- files ------------------------------------------------------------------------------ */\n.files {\n display: grid;\n flex: 1;\n align-content: start;\n gap: var(--office-space-2);\n margin: 0;\n padding: var(--office-space-4) var(--office-space-5);\n overflow: auto;\n list-style: none;\n}\n.files li {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-2) var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.files .none {\n justify-content: center;\n border: 0;\n color: var(--office-teams-text-subtle);\n}\n.files .meta {\n display: grid;\n flex: 1;\n min-width: 0;\n}\n.files small {\n color: var(--office-teams-text-subtle);\n}\n.files button {\n padding: var(--office-space-1) var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius);\n background: var(--office-teams-panel);\n}\n.badge {\n display: grid;\n place-items: center;\n width: 2.2em;\n height: 2.2em;\n border-radius: var(--office-radius);\n background: var(--office-file-other);\n color: var(--office-call-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.badge[data-kind="docx"] { background: var(--office-file-docx); }\n.badge[data-kind="xlsx"] { background: var(--office-file-xlsx); }\n.badge[data-kind="pptx"] { background: var(--office-file-pptx); }\n.badge[data-kind="vsdx"] { background: var(--office-file-vsdx); }\n\n/* ---- meeting ---------------------------------------------------------------------------- */\n.meeting {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr);\n height: 100%;\n background: var(--office-call-background);\n}\n.stage {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n min-height: 0;\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 22em;\n min-height: 0;\n background: var(--office-background);\n border-inline-start: var(--office-border-width) solid var(--office-teams-divider);\n}\n.panel office-ui-chat-list {\n flex: 1;\n padding-inline: var(--office-space-3);\n}\n.panel office-ui-chat-composer {\n padding-inline: var(--office-space-3);\n}\n.people-panel h2 {\n margin: 0;\n padding: var(--office-space-3) var(--office-space-4);\n font-size: var(--office-font-size-lg);\n}\n\n/* ---- welcome and toast ------------------------------------------------------------------ */\n.welcome {\n display: grid;\n place-items: center;\n height: 100%;\n background: var(--office-teams-panel);\n}\n.welcome form {\n display: grid;\n justify-items: center;\n gap: var(--office-space-3);\n width: min(24em, 90%);\n padding: var(--office-space-6);\n border-radius: var(--office-radius-lg);\n background: var(--office-background);\n box-shadow: var(--office-shadow-teams);\n}\n.welcome h1 {\n margin: 0;\n font-size: var(--office-font-size-xl);\n}\n.welcome p {\n margin: 0;\n color: var(--office-teams-text-subtle);\n}\n.welcome input {\n width: 100%;\n padding: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n color: inherit;\n font: inherit;\n}\n.welcome button {\n width: 100%;\n padding: var(--office-space-3);\n border: 0;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.toast {\n position: fixed;\n inset-block-end: var(--office-space-4);\n inset-inline-start: 50%;\n z-index: 10;\n transform: translateX(-50%);\n padding: var(--office-space-2) var(--office-space-4);\n border-radius: var(--office-radius-md);\n background: var(--office-call-background);\n color: var(--office-call-foreground);\n}\n\n@media (max-width: 900px) {\n .body {\n grid-template-columns: auto minmax(0, 1fr);\n }\n .side {\n display: none;\n }\n .topbar {\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n}\n';
|
|
995
|
+
|
|
996
|
+
// src/teams/app/teams-app.ts
|
|
997
|
+
var RAIL = [
|
|
998
|
+
{ id: "teams", label: "Teams", icon: "users" },
|
|
999
|
+
{ id: "calls", label: "Calls", icon: "phone" },
|
|
1000
|
+
{ id: "files", label: "Files", icon: "folder" }
|
|
1001
|
+
];
|
|
1002
|
+
var AVAILABILITY = ["available", "busy", "away"];
|
|
1003
|
+
var TeamsApp = class extends LitElement {
|
|
1004
|
+
static styles = unsafeCSS(teams_app_default);
|
|
1005
|
+
static properties = {
|
|
1006
|
+
workspaceId: { type: String, attribute: "workspace-id" },
|
|
1007
|
+
userName: { type: String, attribute: "user-name" },
|
|
1008
|
+
userId: { type: String, attribute: "user-id" },
|
|
1009
|
+
serverConfig: { type: String, attribute: "server-config" },
|
|
1010
|
+
config: { attribute: false },
|
|
1011
|
+
uploadFile: { attribute: false },
|
|
1012
|
+
openers: { attribute: false },
|
|
1013
|
+
rail: { state: true },
|
|
1014
|
+
tab: { state: true },
|
|
1015
|
+
panel: { state: true },
|
|
1016
|
+
meeting: { state: true },
|
|
1017
|
+
settingsOpen: { state: true },
|
|
1018
|
+
toast: { state: true },
|
|
1019
|
+
identity: { state: true }
|
|
1020
|
+
};
|
|
1021
|
+
teams = new TeamsController(this, (text) => this.notify(text));
|
|
1022
|
+
toastTimer;
|
|
1023
|
+
constructor() {
|
|
1024
|
+
super();
|
|
1025
|
+
this.workspaceId = "demo";
|
|
1026
|
+
this.userName = "";
|
|
1027
|
+
this.userId = "";
|
|
1028
|
+
this.serverConfig = "";
|
|
1029
|
+
this.config = null;
|
|
1030
|
+
this.uploadFile = void 0;
|
|
1031
|
+
this.openers = {};
|
|
1032
|
+
this.rail = "teams";
|
|
1033
|
+
this.tab = "posts";
|
|
1034
|
+
this.panel = "";
|
|
1035
|
+
this.meeting = false;
|
|
1036
|
+
this.settingsOpen = false;
|
|
1037
|
+
this.toast = "";
|
|
1038
|
+
this.identity = null;
|
|
1039
|
+
}
|
|
1040
|
+
/** The core client behind this element, for hosts that want the raw actions. */
|
|
1041
|
+
get client() {
|
|
1042
|
+
return this.teams.client;
|
|
1043
|
+
}
|
|
1044
|
+
connectedCallback() {
|
|
1045
|
+
installOfficeUiTheme();
|
|
1046
|
+
registerControls();
|
|
1047
|
+
definePresence();
|
|
1048
|
+
registerTeams();
|
|
1049
|
+
defineTeamsSettings();
|
|
1050
|
+
super.connectedCallback();
|
|
1051
|
+
}
|
|
1052
|
+
// ---- lifecycle --------------------------------------------------------------------------
|
|
1053
|
+
resolveConfig() {
|
|
1054
|
+
if (this.config) return this.config;
|
|
1055
|
+
if (this.serverConfig) {
|
|
1056
|
+
try {
|
|
1057
|
+
return parseServerConfig(JSON.parse(this.serverConfig)).config;
|
|
1058
|
+
} catch {
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
return loadConfig() ?? parseServerConfig({}).config;
|
|
1062
|
+
}
|
|
1063
|
+
willUpdate(changed) {
|
|
1064
|
+
const restart = ["workspaceId", "userName", "userId", "serverConfig", "config", "identity"].some((k) => changed.has(k));
|
|
1065
|
+
if (!restart && this.teams.client) return;
|
|
1066
|
+
const named = this.userName ? { id: this.userId || loadIdentity()?.id || crypto.randomUUID(), name: this.userName } : this.identity ?? loadIdentity();
|
|
1067
|
+
if (this.userName && !this.userId) saveIdentity(named);
|
|
1068
|
+
if (!named) return this.teams.stop();
|
|
1069
|
+
const workspaceId = /^[\w-]{1,100}$/u.test(this.workspaceId) ? this.workspaceId : "demo";
|
|
1070
|
+
this.teams.start({
|
|
1071
|
+
workspaceId,
|
|
1072
|
+
user: named,
|
|
1073
|
+
config: this.resolveConfig(),
|
|
1074
|
+
storage: safeStorage,
|
|
1075
|
+
...this.uploadFile ? { uploadFile: this.uploadFile } : {}
|
|
1076
|
+
});
|
|
1077
|
+
this.dispatchEvent(new CustomEvent("teams-ready", { detail: { user: named }, bubbles: true, composed: true }));
|
|
1078
|
+
}
|
|
1079
|
+
notify(text) {
|
|
1080
|
+
this.toast = text;
|
|
1081
|
+
clearTimeout(this.toastTimer);
|
|
1082
|
+
this.toastTimer = setTimeout(() => this.toast = "", 4e3);
|
|
1083
|
+
}
|
|
1084
|
+
// ---- intent -> client actions -----------------------------------------------------------
|
|
1085
|
+
async openFile(a) {
|
|
1086
|
+
const url = await this.teams.client?.fileUrl(a);
|
|
1087
|
+
const detail = { attachment: a, url };
|
|
1088
|
+
if (!this.dispatchEvent(new CustomEvent("teams-open-file", { detail, bubbles: true, composed: true, cancelable: true }))) return;
|
|
1089
|
+
const opener = this.openers[a.kind];
|
|
1090
|
+
if (opener) return opener(detail);
|
|
1091
|
+
if (url) globalThis.open(url, "_blank", "noopener");
|
|
1092
|
+
else this.notify("This file was shared by name only");
|
|
1093
|
+
}
|
|
1094
|
+
createChannel() {
|
|
1095
|
+
const name = globalThis.prompt?.("Channel name")?.trim();
|
|
1096
|
+
if (name) {
|
|
1097
|
+
this.teams.client?.createChannel(name);
|
|
1098
|
+
this.rail = "teams";
|
|
1099
|
+
this.meeting = false;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
onCallAction(action) {
|
|
1103
|
+
const c = this.teams.client;
|
|
1104
|
+
if (!c) return;
|
|
1105
|
+
if (action === "chat" || action === "people") this.panel = this.panel === action ? "" : action;
|
|
1106
|
+
else if (action === "leave") {
|
|
1107
|
+
this.meeting = false;
|
|
1108
|
+
this.panel = "";
|
|
1109
|
+
c.leaveCall();
|
|
1110
|
+
} else if (action === "mic") c.toggleMic();
|
|
1111
|
+
else if (action === "camera") void c.toggleCamera();
|
|
1112
|
+
else if (action === "screen") void c.toggleScreenShare();
|
|
1113
|
+
else if (action === "hand") c.toggleHand();
|
|
1114
|
+
}
|
|
1115
|
+
startMeeting(channelId) {
|
|
1116
|
+
void this.teams.client?.openCall(channelId);
|
|
1117
|
+
this.meeting = true;
|
|
1118
|
+
this.rail = "teams";
|
|
1119
|
+
}
|
|
1120
|
+
selectChannel(id) {
|
|
1121
|
+
this.teams.client?.select(id);
|
|
1122
|
+
this.teams.client?.search("");
|
|
1123
|
+
this.meeting = false;
|
|
1124
|
+
this.tab = "posts";
|
|
1125
|
+
this.rail = "teams";
|
|
1126
|
+
}
|
|
1127
|
+
askSettings() {
|
|
1128
|
+
this.settingsOpen = true;
|
|
1129
|
+
}
|
|
1130
|
+
// ---- template ---------------------------------------------------------------------------
|
|
1131
|
+
render() {
|
|
1132
|
+
const s = this.teams.state;
|
|
1133
|
+
if (!s) return this.welcome();
|
|
1134
|
+
return html`
|
|
1135
|
+
<div class="shell">
|
|
1136
|
+
${this.topbar(s)}
|
|
1137
|
+
<div class="body">
|
|
1138
|
+
<office-ui-app-rail
|
|
1139
|
+
.items=${RAIL.map((i) => ({ ...i, ...i.id === "calls" && s.channels.some((c) => c.live) ? { badge: s.channels.filter((c) => c.live).length } : {} }))}
|
|
1140
|
+
selected=${this.rail}
|
|
1141
|
+
@office-rail-select=${(e) => (this.rail = e.detail.id, this.meeting = false)}
|
|
1142
|
+
></office-ui-app-rail>
|
|
1143
|
+
<aside class="side">${this.sidebar(s)}</aside>
|
|
1144
|
+
<main class="main">${this.main(s)}</main>
|
|
1145
|
+
</div>
|
|
1146
|
+
${this.toast ? html`<div class="toast" role="status">${this.toast}</div>` : nothing}
|
|
1147
|
+
<teams-settings
|
|
1148
|
+
?open=${this.settingsOpen}
|
|
1149
|
+
.config=${this.resolveConfig()}
|
|
1150
|
+
@teams-settings-close=${() => this.settingsOpen = false}
|
|
1151
|
+
@teams-settings-apply=${(e) => {
|
|
1152
|
+
saveConfig(e.detail.config);
|
|
1153
|
+
this.config = e.detail.config;
|
|
1154
|
+
this.settingsOpen = false;
|
|
1155
|
+
this.dispatchEvent(new CustomEvent("teams-config-change", { detail: e.detail, bubbles: true, composed: true }));
|
|
1156
|
+
}}
|
|
1157
|
+
></teams-settings>
|
|
1158
|
+
</div>
|
|
1159
|
+
`;
|
|
1160
|
+
}
|
|
1161
|
+
welcome() {
|
|
1162
|
+
return html`
|
|
1163
|
+
<div class="welcome">
|
|
1164
|
+
<form
|
|
1165
|
+
@submit=${(e) => {
|
|
1166
|
+
e.preventDefault();
|
|
1167
|
+
const name = new FormData(e.target).get("name")?.toString().trim();
|
|
1168
|
+
if (!name) return;
|
|
1169
|
+
const identity = { id: crypto.randomUUID(), name };
|
|
1170
|
+
saveIdentity(identity);
|
|
1171
|
+
this.identity = identity;
|
|
1172
|
+
}}
|
|
1173
|
+
>
|
|
1174
|
+
<span class="logo">T</span>
|
|
1175
|
+
<h1>Welcome to Teams</h1>
|
|
1176
|
+
<p>Pick the name your colleagues will see.</p>
|
|
1177
|
+
<input name="name" placeholder="Your name" aria-label="Your name" maxlength="40" autocomplete="name" required />
|
|
1178
|
+
<button type="submit">Continue</button>
|
|
1179
|
+
</form>
|
|
1180
|
+
</div>
|
|
1181
|
+
`;
|
|
1182
|
+
}
|
|
1183
|
+
topbar(s) {
|
|
1184
|
+
return html`
|
|
1185
|
+
<header class="topbar">
|
|
1186
|
+
<div class="brand"><span class="logo">T</span><span>Teams</span></div>
|
|
1187
|
+
<div class="search">
|
|
1188
|
+
<input
|
|
1189
|
+
type="search"
|
|
1190
|
+
placeholder="Search messages"
|
|
1191
|
+
aria-label="Search messages"
|
|
1192
|
+
.value=${s.searchQuery}
|
|
1193
|
+
@input=${(e) => this.teams.client?.search(e.target.value)}
|
|
1194
|
+
/>
|
|
1195
|
+
${s.searchQuery ? html`<ul class="results" role="listbox" aria-label="Search results">
|
|
1196
|
+
${s.searchResults.length === 0 ? html`<li class="none">No results</li>` : s.searchResults.map(
|
|
1197
|
+
(h) => html`<li>
|
|
1198
|
+
<button type="button" @click=${() => this.selectChannel(h.channelId)}>
|
|
1199
|
+
<strong>${h.message.authorName}</strong>
|
|
1200
|
+
<span class="in">in # ${h.channelName}</span>
|
|
1201
|
+
<span class="snippet">${h.message.text.slice(0, 100)}</span>
|
|
1202
|
+
</button>
|
|
1203
|
+
</li>`
|
|
1204
|
+
)}
|
|
1205
|
+
</ul>` : nothing}
|
|
1206
|
+
</div>
|
|
1207
|
+
<div class="me">
|
|
1208
|
+
<span class="conn" data-status=${s.status} title=${s.mode === "server" ? `Server: ${s.status}` : "Local: tabs of this browser"}></span>
|
|
1209
|
+
<button type="button" class="link" @click=${this.askSettings}>Server</button>
|
|
1210
|
+
<select
|
|
1211
|
+
aria-label="Availability"
|
|
1212
|
+
.value=${s.availability}
|
|
1213
|
+
@change=${(e) => this.teams.client?.setAvailability(e.target.value)}
|
|
1214
|
+
>
|
|
1215
|
+
${AVAILABILITY.map((a) => html`<option value=${a} ?selected=${a === s.availability}>${a[0].toUpperCase() + a.slice(1)}</option>`)}
|
|
1216
|
+
</select>
|
|
1217
|
+
<office-ui-avatar name=${s.user.name} seed=${s.user.id} presence=${s.availability}></office-ui-avatar>
|
|
1218
|
+
</div>
|
|
1219
|
+
</header>
|
|
1220
|
+
`;
|
|
1221
|
+
}
|
|
1222
|
+
sidebar(s) {
|
|
1223
|
+
if (this.rail === "calls") {
|
|
1224
|
+
const live2 = s.channels.filter((c) => c.live);
|
|
1225
|
+
return html`
|
|
1226
|
+
<h2>Calls</h2>
|
|
1227
|
+
<ul class="plain">
|
|
1228
|
+
${s.channels.map(
|
|
1229
|
+
(c) => html`<li>
|
|
1230
|
+
<span># ${c.name}</span>
|
|
1231
|
+
<button type="button" class=${c.live ? "join live" : "join"} @click=${() => this.startMeeting(c.id)}>
|
|
1232
|
+
${c.live ? "Join" : "Meet now"}
|
|
1233
|
+
</button>
|
|
1234
|
+
</li>`
|
|
1235
|
+
)}
|
|
1236
|
+
</ul>
|
|
1237
|
+
${live2.length === 0 ? html`<p class="hint">Nobody is in a call right now.</p>` : nothing}
|
|
1238
|
+
`;
|
|
1239
|
+
}
|
|
1240
|
+
return html`
|
|
1241
|
+
<office-ui-channel-list
|
|
1242
|
+
heading="Channels"
|
|
1243
|
+
selected-id=${s.selectedChannelId}
|
|
1244
|
+
.channels=${s.channels}
|
|
1245
|
+
@office-channel-select=${(e) => this.selectChannel(e.detail.id)}
|
|
1246
|
+
@office-channel-create=${this.createChannel}
|
|
1247
|
+
></office-ui-channel-list>
|
|
1248
|
+
`;
|
|
1249
|
+
}
|
|
1250
|
+
main(s) {
|
|
1251
|
+
if (this.rail === "files") return this.allFiles(s);
|
|
1252
|
+
if (s.call && this.meeting) return this.meetingView(s);
|
|
1253
|
+
return html`
|
|
1254
|
+
${s.call && !this.meeting ? html`<div class="callbar">
|
|
1255
|
+
You are in a call in # ${s.call.channelName}
|
|
1256
|
+
<button type="button" @click=${() => (this.meeting = true, this.teams.client?.select(s.call.channelId))}>Return to call</button>
|
|
1257
|
+
</div>` : nothing}
|
|
1258
|
+
${this.conversation(s)}
|
|
1259
|
+
`;
|
|
1260
|
+
}
|
|
1261
|
+
conversation(s, compact = false) {
|
|
1262
|
+
const channel = s.channel;
|
|
1263
|
+
const c = this.teams.client;
|
|
1264
|
+
const compose = s.editing ?? s.replyingTo;
|
|
1265
|
+
return html`
|
|
1266
|
+
${compact ? nothing : html`<header class="channel-head">
|
|
1267
|
+
<h1><span class="hash">#</span> ${channel?.name ?? "No channel yet"}</h1>
|
|
1268
|
+
<nav class="tabs" role="tablist">
|
|
1269
|
+
${["posts", "files"].map(
|
|
1270
|
+
(t) => html`<button
|
|
1271
|
+
type="button"
|
|
1272
|
+
role="tab"
|
|
1273
|
+
aria-selected=${String(this.tab === t)}
|
|
1274
|
+
@click=${() => this.tab = t}
|
|
1275
|
+
>
|
|
1276
|
+
${t === "posts" ? "Posts" : "Files"}
|
|
1277
|
+
</button>`
|
|
1278
|
+
)}
|
|
1279
|
+
</nav>
|
|
1280
|
+
<span class="topic">${channel?.topic ?? ""}</span>
|
|
1281
|
+
<div class="people" aria-label="People online">
|
|
1282
|
+
${s.people.slice(0, 5).map((p) => html`<office-ui-avatar size="sm" name=${p.name} seed=${p.id} color=${p.color} presence=${p.availability}></office-ui-avatar>`)}
|
|
1283
|
+
${s.people.length > 5 ? html`<span class="more">+${s.people.length - 5}</span>` : nothing}
|
|
1284
|
+
</div>
|
|
1285
|
+
<button type="button" class="meet" ?disabled=${!channel} @click=${() => this.startMeeting()}>
|
|
1286
|
+
${s.channels.find((x) => x.id === s.selectedChannelId)?.live ? "Join call" : "Meet now"}
|
|
1287
|
+
</button>
|
|
1288
|
+
</header>`}
|
|
1289
|
+
${this.tab === "files" && !compact ? this.fileList(s.files) : html`
|
|
1290
|
+
<office-ui-chat-list
|
|
1291
|
+
.messages=${s.messages}
|
|
1292
|
+
self-id=${s.user.id}
|
|
1293
|
+
@office-chat-react=${(e) => c?.toggleReaction(e.detail.messageId, e.detail.emoji)}
|
|
1294
|
+
@office-chat-reply=${(e) => c?.startReply(e.detail.messageId)}
|
|
1295
|
+
@office-chat-edit=${(e) => c?.startEdit(e.detail.messageId)}
|
|
1296
|
+
@office-chat-delete=${(e) => globalThis.confirm?.("Delete this message?") !== false && c?.deleteMessage(e.detail.messageId)}
|
|
1297
|
+
@office-chat-open-file=${(e) => this.openFile(e.detail.attachment)}
|
|
1298
|
+
></office-ui-chat-list>
|
|
1299
|
+
<office-ui-chat-composer
|
|
1300
|
+
.typing=${s.typing}
|
|
1301
|
+
.replyingTo=${s.replyingTo?.authorName ?? null}
|
|
1302
|
+
.editing=${s.editing !== null}
|
|
1303
|
+
.value=${s.editing?.text ?? ""}
|
|
1304
|
+
?disabled=${!channel}
|
|
1305
|
+
placeholder=${channel ? `Message # ${channel.name}` : "Create a channel first"}
|
|
1306
|
+
@office-chat-typing=${() => c?.notifyTyping()}
|
|
1307
|
+
@office-chat-cancel=${() => c?.cancelCompose()}
|
|
1308
|
+
@office-chat-send=${(e) => void c?.send(e.detail)}
|
|
1309
|
+
data-compose=${compose ? "on" : "off"}
|
|
1310
|
+
></office-ui-chat-composer>
|
|
1311
|
+
`}
|
|
1312
|
+
`;
|
|
1313
|
+
}
|
|
1314
|
+
fileList(files) {
|
|
1315
|
+
return html`
|
|
1316
|
+
<ul class="files">
|
|
1317
|
+
${files.length === 0 ? html`<li class="none">No files shared yet.</li>` : files.map(
|
|
1318
|
+
(f) => html`<li>
|
|
1319
|
+
<span class="badge" data-kind=${f.kind}>${f.kind === "other" ? "F" : f.kind[0].toUpperCase()}</span>
|
|
1320
|
+
<span class="meta">
|
|
1321
|
+
<strong>${f.name}</strong>
|
|
1322
|
+
<small>${f.author} · ${new Date(f.ts).toLocaleString()}${f.channelName ? ` \xB7 # ${f.channelName}` : ""}</small>
|
|
1323
|
+
</span>
|
|
1324
|
+
<button type="button" @click=${() => this.openFile(f)}>Open</button>
|
|
1325
|
+
</li>`
|
|
1326
|
+
)}
|
|
1327
|
+
</ul>
|
|
1328
|
+
`;
|
|
1329
|
+
}
|
|
1330
|
+
allFiles(s) {
|
|
1331
|
+
return html`<header class="channel-head"><h1>Files</h1></header>${this.fileList(s.allFiles)}`;
|
|
1332
|
+
}
|
|
1333
|
+
meetingView(s) {
|
|
1334
|
+
const call = s.call;
|
|
1335
|
+
if (call.phase === "prejoin")
|
|
1336
|
+
return html`
|
|
1337
|
+
<office-ui-prejoin
|
|
1338
|
+
heading=${`# ${call.channelName}`}
|
|
1339
|
+
name=${s.user.name}
|
|
1340
|
+
.preview=${call.preview}
|
|
1341
|
+
?audio=${call.prejoin.audio}
|
|
1342
|
+
?video=${call.prejoin.video}
|
|
1343
|
+
@office-prejoin-change=${(e) => void this.teams.client?.setPrejoin(e.detail)}
|
|
1344
|
+
@office-prejoin-join=${() => void this.teams.client?.joinCall()}
|
|
1345
|
+
@office-prejoin-cancel=${() => (this.meeting = false, this.teams.client?.leaveCall())}
|
|
1346
|
+
></office-ui-prejoin>
|
|
1347
|
+
`;
|
|
1348
|
+
const self = call.self;
|
|
1349
|
+
return html`
|
|
1350
|
+
<section class="meeting">
|
|
1351
|
+
<office-ui-call-controls
|
|
1352
|
+
heading=${`# ${call.channelName}`}
|
|
1353
|
+
started-at=${call.startedAt ?? 0}
|
|
1354
|
+
?mic=${self?.state.audio}
|
|
1355
|
+
?camera=${self?.state.video}
|
|
1356
|
+
?screen=${self?.state.screen}
|
|
1357
|
+
?hand=${self?.state.hand}
|
|
1358
|
+
?share-unavailable=${typeof navigator.mediaDevices?.getDisplayMedia !== "function"}
|
|
1359
|
+
panel=${this.panel}
|
|
1360
|
+
@office-call-action=${(e) => this.onCallAction(e.detail.action)}
|
|
1361
|
+
></office-ui-call-controls>
|
|
1362
|
+
<div class="stage">
|
|
1363
|
+
<office-ui-call-grid
|
|
1364
|
+
.participants=${call.participants.map((p) => ({
|
|
1365
|
+
id: p.id,
|
|
1366
|
+
name: p.name,
|
|
1367
|
+
self: p.self,
|
|
1368
|
+
stream: p.stream,
|
|
1369
|
+
audio: p.state.audio,
|
|
1370
|
+
video: p.state.video,
|
|
1371
|
+
screen: p.state.screen,
|
|
1372
|
+
hand: p.state.hand,
|
|
1373
|
+
connection: p.connection
|
|
1374
|
+
}))}
|
|
1375
|
+
></office-ui-call-grid>
|
|
1376
|
+
${this.panel === "chat" ? html`<aside class="panel chat">${this.conversation(s, true)}</aside>` : this.panel === "people" ? html`<aside class="panel people-panel">
|
|
1377
|
+
<h2>People (${call.participants.length})</h2>
|
|
1378
|
+
<ul class="plain">
|
|
1379
|
+
${call.participants.map(
|
|
1380
|
+
(p) => html`<li>
|
|
1381
|
+
<office-ui-avatar size="sm" name=${p.name} seed=${p.id}></office-ui-avatar>
|
|
1382
|
+
<span>${p.name}${p.self ? " (you)" : ""}</span>
|
|
1383
|
+
${p.state.hand ? html`<span title="Hand raised">✋</span>` : nothing}
|
|
1384
|
+
</li>`
|
|
1385
|
+
)}
|
|
1386
|
+
</ul>
|
|
1387
|
+
</aside>` : nothing}
|
|
1388
|
+
</div>
|
|
1389
|
+
</section>
|
|
1390
|
+
`;
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
function defineTeamsApp(registry = globalThis.customElements) {
|
|
1394
|
+
if (registry && !registry.get("teams-app")) registry.define("teams-app", TeamsApp);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
// src/teams/app/bind.ts
|
|
1398
|
+
var SCALARS = ["workspaceId", "userName", "userId"];
|
|
1399
|
+
function applyTeamsProps(el, props, prev = {}) {
|
|
1400
|
+
for (const key of SCALARS) {
|
|
1401
|
+
if (props[key] === prev[key]) continue;
|
|
1402
|
+
el[key] = props[key] ?? (key === "workspaceId" ? "demo" : "");
|
|
1403
|
+
}
|
|
1404
|
+
if (props.config !== prev.config && props.config !== void 0) el.config = props.config;
|
|
1405
|
+
if (props.uploadFile !== prev.uploadFile) el.uploadFile = props.uploadFile;
|
|
1406
|
+
if (props.openers !== prev.openers) el.openers = props.openers ?? {};
|
|
1407
|
+
}
|
|
1408
|
+
function listenTeamsEvents(el, get) {
|
|
1409
|
+
const ready = (e) => get().onReady?.(e.detail);
|
|
1410
|
+
const open = (e) => {
|
|
1411
|
+
const ce = e;
|
|
1412
|
+
get().onOpenFile?.(ce.detail, ce);
|
|
1413
|
+
};
|
|
1414
|
+
const config = (e) => get().onConfigChange?.(e.detail);
|
|
1415
|
+
el.addEventListener("teams-ready", ready);
|
|
1416
|
+
el.addEventListener("teams-open-file", open);
|
|
1417
|
+
el.addEventListener("teams-config-change", config);
|
|
1418
|
+
return () => {
|
|
1419
|
+
el.removeEventListener("teams-ready", ready);
|
|
1420
|
+
el.removeEventListener("teams-open-file", open);
|
|
1421
|
+
el.removeEventListener("teams-config-change", config);
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
function createTeams(options) {
|
|
1425
|
+
return createTeamsClient({ storage: safeStorage, ...options });
|
|
1426
|
+
}
|
|
811
1427
|
|
|
812
1428
|
// src/teams/index.ts
|
|
813
1429
|
var TEAMS_TAGS = [
|
|
@@ -831,4 +1447,4 @@ function registerTeams() {
|
|
|
831
1447
|
defineCallControls();
|
|
832
1448
|
}
|
|
833
1449
|
|
|
834
|
-
export { EMOJI, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_TAGS, TeamsElement, colorFor, dayLabel, defineAppRail, defineAvatar, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, definePrejoin, formatElapsed, formatSize, formatTime, icon, registerTeams, withStyles };
|
|
1450
|
+
export { EMOJI, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_TAGS, TeamsApp, TeamsController, TeamsElement, TeamsSettings, applyTeamsProps, colorFor, createTeams, dayLabel, defineAppRail, defineAvatar, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, definePrejoin, defineTeamsApp, defineTeamsSettings, formatElapsed, formatSize, formatTime, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles };
|
|
@@ -4553,7 +4553,8 @@ function attachKeyTips(scope) {
|
|
|
4553
4553
|
const next = panel ? [...scope.querySelectorAll("[data-keytip-level]")].find((el2) => el2.id === panel) ?? null : null;
|
|
4554
4554
|
if (next) {
|
|
4555
4555
|
levels.push(next);
|
|
4556
|
-
view?.requestAnimationFrame
|
|
4556
|
+
if (view?.requestAnimationFrame) view.requestAnimationFrame(render2);
|
|
4557
|
+
else render2();
|
|
4557
4558
|
} else stop();
|
|
4558
4559
|
};
|
|
4559
4560
|
const onKeyDown = (event) => {
|