ooxml-ui 1.14.0 → 1.15.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/custom-elements.json +1 -1
- package/dist/{chunk-LAVVSCRJ.js → chunk-7QGML32D.js} +8 -2
- package/dist/{chunk-DSQBXLMO.js → chunk-EOGVSVJ7.js} +1 -1
- package/dist/{chunk-C5F7454A.js → chunk-JNZQZH3T.js} +2 -2
- package/dist/{chunk-C3MXKNNK.js → chunk-YFXBKLHN.js} +446 -30
- package/dist/controls.js +1 -1
- package/dist/docx.js +3 -3
- package/dist/index.js +4 -4
- package/dist/pptx/{chart-3d-view-scene-CFUVOILD.cjs → chart-3d-view-scene-U2UZNG6X.cjs} +38 -38
- package/dist/pptx/{chart-3d-view-scene-BEAJCQIS.mjs → chart-3d-view-scene-WZ3BRYEM.mjs} +2 -2
- package/dist/pptx/{chunk-5DUBDWOU.cjs → chunk-3QV7FFSY.cjs} +6539 -3881
- package/dist/pptx/{chunk-HULZNSHL.cjs → chunk-5O2TELJA.cjs} +12 -37
- package/dist/pptx/{chunk-VXKFXPCU.mjs → chunk-6LXTIMPW.mjs} +472 -27
- package/dist/pptx/{chunk-GUAP5VUN.mjs → chunk-JQ7BPJDN.mjs} +5767 -3146
- package/dist/pptx/{chunk-DWUC6LZK.mjs → chunk-M44MS6YO.mjs} +2 -26
- package/dist/pptx/{chunk-OJXPN2WX.mjs → chunk-OH2YCWWG.mjs} +310 -0
- package/dist/pptx/{chunk-2JTHIDMD.cjs → chunk-PC5K6VYI.cjs} +475 -26
- package/dist/pptx/{chunk-4NBVWV6I.cjs → chunk-QVWWHDTH.cjs} +310 -0
- package/dist/pptx/{chunk-P3YE5LT2.mjs → chunk-REXLIUBK.mjs} +1 -1
- package/dist/pptx/{chunk-5UGJC25J.cjs → chunk-U5MWRJW5.cjs} +1 -1
- package/dist/pptx/dom/elements/chart-editable.d.ts +11 -0
- package/dist/pptx/dom/elements/chart-editable.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +270 -256
- package/dist/pptx/dom/index.mjs +26 -13
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en-chart-format.d.ts +3 -0
- package/dist/pptx/i18n/translations-en-chart-format.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en-design-galleries.d.ts +3 -0
- package/dist/pptx/i18n/translations-en-design-galleries.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en-shape-gallery.d.ts +7 -0
- package/dist/pptx/i18n/translations-en-shape-gallery.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3306 -3146
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-format/chart-format-context-menu.d.ts +11 -0
- package/dist/pptx/render/chart-format/chart-format-context-menu.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-effects-svg.d.ts +72 -0
- package/dist/pptx/render/chart-format/chart-format-effects-svg.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-fixtures.test-util.d.ts +10 -0
- package/dist/pptx/render/chart-format/chart-format-fixtures.test-util.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-geometry.d.ts +25 -0
- package/dist/pptx/render/chart-format/chart-format-geometry.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-hit-test.d.ts +42 -0
- package/dist/pptx/render/chart-format/chart-format-hit-test.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-axis.d.ts +12 -0
- package/dist/pptx/render/chart-format/chart-format-pane-axis.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-edit.d.ts +18 -0
- package/dist/pptx/render/chart-format/chart-format-pane-edit.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-effects.d.ts +25 -0
- package/dist/pptx/render/chart-format/chart-format-pane-effects.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-fill-line.d.ts +16 -0
- package/dist/pptx/render/chart-format/chart-format-pane-fill-line.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-model.d.ts +15 -0
- package/dist/pptx/render/chart-format/chart-format-pane-model.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-options.d.ts +13 -0
- package/dist/pptx/render/chart-format/chart-format-pane-options.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-types.d.ts +78 -0
- package/dist/pptx/render/chart-format/chart-format-pane-types.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-render.d.ts +28 -0
- package/dist/pptx/render/chart-format/chart-format-render.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-targets.d.ts +36 -0
- package/dist/pptx/render/chart-format/chart-format-targets.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-selection-strip.d.ts +39 -0
- package/dist/pptx/render/chart-format/chart-selection-strip.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/index.d.ts +16 -0
- package/dist/pptx/render/chart-format/index.d.ts.map +1 -0
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model-build.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/context-menu-commands.d.ts +6 -1
- package/dist/pptx/render/context-menu-commands.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-catalog.d.ts +1 -1
- package/dist/pptx/render/customization/customization-catalog.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-descriptions.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog-core.d.ts +11 -1
- package/dist/pptx/render/customization/ribbon-control-catalog-core.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts +10 -0
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts +21 -1
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts.map +1 -1
- package/dist/pptx/render/editor-chrome/metrics.d.ts +7 -0
- package/dist/pptx/render/editor-chrome/metrics.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +3 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-design-commands.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-placements.d.ts +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-placements.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-registry.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts +9 -1
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-view.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/theme-variants-gallery.d.ts +35 -0
- package/dist/pptx/render/ribbon-galleries/theme-variants-gallery.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/themes-gallery.d.ts +17 -0
- package/dist/pptx/render/ribbon-galleries/themes-gallery.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-home-families-objects.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-families.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-menus.d.ts +1 -1
- package/dist/pptx/render/ribbon-home-menus.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-spec.d.ts +9 -1
- package/dist/pptx/render/ribbon-home-spec.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-state-objects.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-icons/chart-format-icons.d.ts +4 -0
- package/dist/pptx/render/ribbon-icons/chart-format-icons.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-icons.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-insert-layout.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-insert-state.d.ts +6 -0
- package/dist/pptx/render/ribbon-insert-state.d.ts.map +1 -1
- package/dist/pptx/render/shape-gallery-home.d.ts +6 -0
- package/dist/pptx/render/shape-gallery-home.d.ts.map +1 -0
- package/dist/pptx/render/shape-gallery.d.ts +51 -0
- package/dist/pptx/render/shape-gallery.d.ts.map +1 -0
- package/dist/pptx/render/table-style-presets.d.ts +2 -0
- package/dist/pptx/render/table-style-presets.d.ts.map +1 -1
- package/dist/pptx/render/text-3d-presets.d.ts +4 -0
- package/dist/pptx/render/text-3d-presets.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-presets.d.ts +2 -0
- package/dist/pptx/render/text-warp-presets.d.ts.map +1 -1
- package/dist/pptx/render/toolbar-actions.d.ts +1 -1
- package/dist/pptx/render/toolbar-actions.d.ts.map +1 -1
- package/dist/pptx/theme/index.cjs +16 -16
- package/dist/pptx/theme/index.mjs +1 -1
- package/dist/pptx/web-components/chart-format-pane-fields.d.ts +17 -0
- package/dist/pptx/web-components/chart-format-pane-fields.d.ts.map +1 -0
- package/dist/pptx/web-components/chart-format-pane-styles.d.ts +3 -0
- package/dist/pptx/web-components/chart-format-pane-styles.d.ts.map +1 -0
- package/dist/pptx/web-components/chart-format-pane.d.ts +34 -0
- package/dist/pptx/web-components/chart-format-pane.d.ts.map +1 -0
- package/dist/pptx/web-components/index.d.ts +2 -0
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/mobile-insert-styles.d.ts +2 -0
- package/dist/pptx/web-components/mobile-insert-styles.d.ts.map +1 -0
- package/dist/pptx/web-components/mobile-insert.d.ts +21 -0
- package/dist/pptx/web-components/mobile-insert.d.ts.map +1 -0
- package/dist/pptx/web-components/ribbon-home-controls.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home-layout.d.ts +6 -0
- package/dist/pptx/web-components/ribbon-home-layout.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home-menu.d.ts +1 -1
- package/dist/pptx/web-components/ribbon-home-menu.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home-styles.d.ts +1 -1
- package/dist/pptx/web-components/ribbon-home-styles.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home.d.ts +2 -0
- package/dist/pptx/web-components/ribbon-home.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-icons.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-styles.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-table-picker.d.ts +2 -0
- package/dist/pptx/web-components/ribbon-insert-table-picker.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-view.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-overflow.d.ts.map +1 -1
- package/dist/pptx/web-components/theme-editor-dock.d.ts +12 -1
- package/dist/pptx/web-components/theme-editor-dock.d.ts.map +1 -1
- package/dist/ribbon/ribbon-group.d.ts +1 -1
- package/dist/ribbon/ribbon-group.d.ts.map +1 -1
- package/dist/teams/app/meeting-dialog.d.ts +11 -3
- package/dist/teams/app/profile-menu.d.ts +5 -0
- package/dist/teams/app/repeat-text.d.ts +25 -0
- package/dist/teams/app/sign-in-flow.d.ts +45 -0
- package/dist/teams/app/sign-in-strings.d.ts +17 -0
- package/dist/teams/app/teams-app.d.ts +9 -0
- package/dist/teams/app/teams-sign-in.d.ts +56 -0
- package/dist/teams.js +2 -2
- package/dist/visio.js +31 -4
- package/dist/xlsx/dialogs/pivot-field-settings.d.ts +3 -3
- package/dist/xlsx.js +58 -29
- package/package.json +2 -2
- /package/dist/pptx/{chunk-47FYJVMH.cjs → chunk-BDXQX6RA.cjs} +0 -0
- /package/dist/pptx/{chunk-XRWEURSV.mjs → chunk-ZAOD6O2D.mjs} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { THEME_CSS, installOfficeUiTheme } from './chunk-7E3HU7RL.js';
|
|
2
|
-
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-
|
|
2
|
+
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-7QGML32D.js';
|
|
3
3
|
import { registerIcon, getIcon } from './chunk-M6GF5ED2.js';
|
|
4
4
|
import { initialsOf, definePresence } from './chunk-KNC2UEUR.js';
|
|
5
5
|
import { definer, OfficeElement, controlStyles } from './chunk-CWBSXK7P.js';
|
|
6
6
|
import { nothing, html, LitElement, unsafeCSS, svg } from 'lit';
|
|
7
|
-
import { filterActivity, ACTIVITY_FILTERS, describeActivity, localZone, startOfDay, occurrencesBetween, DAY_MS as DAY_MS$1, dayKey, zonedToUtc, viewDays, zonedParts, shiftAnchor, layoutDay, mentionQueryAt, filterMentionTargets, insertMention, MAX_ATTACHMENTS, mentionsUser, mentionSegments, detectContentKind, contentUrl, readContent, sortFiles, filterFiles, parseServerConfig, STATUS_DURATIONS, STATUS_DURATION_LABELS, PRESENCE_LABELS, MAX_STATUS_MESSAGE_CHARS, isPresenceStatus, PRESENCE_STATUSES, isStatusDuration, IDLE_MINUTE_CHOICES, sanitizeChannelName, MAX_CHANNEL_NAME_CHARS, MAX_CHANNEL_TOPIC_CHARS, MAX_CHAT_MEMBERS, occurrenceAt, MAX_RECURRENCE_COUNT, MINUTE_MS, MAX_MEETING_TITLE, MAX_MEETING_DESCRIPTION, markdownBlocks, createTeamsClient, sanitizeAttachment, markdownInline } from 'ooxml-core/teams';
|
|
7
|
+
import { filterActivity, ACTIVITY_FILTERS, describeActivity, localZone, startOfDay, occurrencesBetween, DAY_MS as DAY_MS$1, dayKey, zonedToUtc, viewDays, zonedParts, shiftAnchor, layoutDay, mentionQueryAt, filterMentionTargets, insertMention, MAX_ATTACHMENTS, mentionsUser, mentionSegments, detectContentKind, contentUrl, readContent, sortFiles, filterFiles, parseServerConfig, STATUS_DURATIONS, STATUS_DURATION_LABELS, PRESENCE_LABELS, MAX_STATUS_MESSAGE_CHARS, isPresenceStatus, PRESENCE_STATUSES, isStatusDuration, IDLE_MINUTE_CHOICES, sanitizeChannelName, MAX_CHANNEL_NAME_CHARS, MAX_CHANNEL_TOPIC_CHARS, MAX_CHAT_MEMBERS, occurrenceAt, MAX_RECURRENCE_COUNT, MINUTE_MS, MAX_MEETING_TITLE, MAX_MEETING_DESCRIPTION, markdownBlocks, repeatChoices, serverOrigin, probeTeamsAccounts, requestTeamsSession, signOutTeamsSession, checkTeamsSession, createTeamsClient, sanitizeAttachment, markdownInline, TeamsSignInError } from 'ooxml-core/teams';
|
|
8
8
|
import { repeat } from 'lit/directives/repeat.js';
|
|
9
9
|
import { live } from 'lit/directives/live.js';
|
|
10
10
|
import { keyed } from 'lit/directives/keyed.js';
|
|
@@ -3563,7 +3563,35 @@ function messageTransfers(state, client) {
|
|
|
3563
3563
|
}
|
|
3564
3564
|
|
|
3565
3565
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/profile-menu.css?raw
|
|
3566
|
-
var profile_menu_default = ":host {\n display: inline-flex;\n font: inherit;\n color: inherit;\n}\n.profile {\n display: inline-flex;\n align-items: center;\n padding: var(--office-space-1);\n border: 0;\n border-radius: var(--office-radius-full);\n background: transparent;\n cursor: pointer;\n}\n.profile:hover {\n background: var(--office-selected);\n}\n[popover] {\n min-width: 20em;\n max-width: 90vw;\n max-height: min(80vh, 40em);\n overflow: auto;\n padding: 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-popover);\n color: var(--office-foreground);\n box-shadow: var(--office-shadow-teams);\n}\n.identity {\n display: flex;\n gap: var(--office-space-3);\n align-items: center;\n margin-bottom: var(--office-space-4);\n}\n.identity strong {\n overflow-wrap: anywhere;\n}\nlabel {\n display: grid;\n gap: var(--office-space-2);\n margin-bottom: var(--office-space-3);\n}\n.who {\n display: grid;\n min-width: 0;\n}\n.status-line,\n.message,\n.hint {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n overflow-wrap: anywhere;\n}\n.hint:empty {\n display: none;\n}\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-2);\n margin-bottom: var(--office-space-3);\n}\n.actions button {\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 background: var(--office-background);\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n.actions button:hover:not(:disabled) {\n background: var(--office-selected);\n}\n.actions button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n@media (pointer: coarse) {\n .actions button,\n select,\n input {\n min-height: var(--office-touch-target, 44px);\n }\n}\ninput,\nselect {\n font: inherit;\n padding: var(--office-space-2);\n color: inherit;\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n}\nselect:disabled {\n opacity: 0.6;\n}\n.connection {\n color: var(--office-teams-text-subtle);\n margin-bottom: 0;\n font-size: var(--office-font-size-sm);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n";
|
|
3566
|
+
var profile_menu_default = ":host {\n display: inline-flex;\n font: inherit;\n color: inherit;\n}\n.profile {\n display: inline-flex;\n align-items: center;\n padding: var(--office-space-1);\n border: 0;\n border-radius: var(--office-radius-full);\n background: transparent;\n cursor: pointer;\n}\n.profile:hover {\n background: var(--office-selected);\n}\n[popover] {\n min-width: 20em;\n max-width: 90vw;\n max-height: min(80vh, 40em);\n overflow: auto;\n padding: 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-popover);\n color: var(--office-foreground);\n box-shadow: var(--office-shadow-teams);\n}\n.identity {\n display: flex;\n gap: var(--office-space-3);\n align-items: center;\n margin-bottom: var(--office-space-4);\n}\n.identity strong {\n overflow-wrap: anywhere;\n}\nlabel {\n display: grid;\n gap: var(--office-space-2);\n margin-bottom: var(--office-space-3);\n}\n.who {\n display: grid;\n min-width: 0;\n}\n.status-line,\n.message,\n.hint {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n overflow-wrap: anywhere;\n}\n.hint:empty {\n display: none;\n}\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-2);\n margin-bottom: var(--office-space-3);\n}\n.actions button,\n.account button {\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 background: var(--office-background);\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n.actions button:hover:not(:disabled),\n.account button:hover {\n background: var(--office-selected);\n}\n.actions button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n@media (pointer: coarse) {\n .actions button,\n .account button,\n select,\n input {\n min-height: var(--office-touch-target, 44px);\n }\n}\n.account {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-2);\n margin-bottom: var(--office-space-3);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n overflow-wrap: anywhere;\n}\ninput,\nselect {\n font: inherit;\n padding: var(--office-space-2);\n color: inherit;\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n}\nselect:disabled {\n opacity: 0.6;\n}\n.connection {\n color: var(--office-teams-text-subtle);\n margin-bottom: 0;\n font-size: var(--office-font-size-sm);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n";
|
|
3567
|
+
|
|
3568
|
+
// src/teams/app/sign-in-strings.ts
|
|
3569
|
+
var SIGN_IN_STRINGS = {
|
|
3570
|
+
title: "Sign in to Teams",
|
|
3571
|
+
intro: "This workspace server needs an account.",
|
|
3572
|
+
userLabel: "User ID",
|
|
3573
|
+
credentialLabel: "Password",
|
|
3574
|
+
submit: "Sign in",
|
|
3575
|
+
submitting: "Signing in",
|
|
3576
|
+
checking: "Connecting to the server",
|
|
3577
|
+
signOut: "Sign out",
|
|
3578
|
+
signedInAs: (id) => `Signed in as ${id}`,
|
|
3579
|
+
expired: "Your session expired. Sign in again to continue.",
|
|
3580
|
+
ended: "The server ended your session. Sign in again to continue.",
|
|
3581
|
+
signedOut: "You signed out."
|
|
3582
|
+
};
|
|
3583
|
+
function signInErrorText(reason, retryAfterSec) {
|
|
3584
|
+
switch (reason) {
|
|
3585
|
+
case "credentials":
|
|
3586
|
+
return "The user ID or password is not correct.";
|
|
3587
|
+
case "rate-limited":
|
|
3588
|
+
return retryAfterSec ? `Too many attempts. Try again in ${retryAfterSec} seconds.` : "Too many attempts. Try again in a minute.";
|
|
3589
|
+
case "network":
|
|
3590
|
+
return "Could not reach the server. Check your connection and try again.";
|
|
3591
|
+
default:
|
|
3592
|
+
return "The server could not sign you in. Try again later.";
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3567
3595
|
|
|
3568
3596
|
// src/teams/app/profile-menu.ts
|
|
3569
3597
|
var idleLabel = (minutes) => minutes === 0 ? "Never" : `${minutes} minutes`;
|
|
@@ -3582,6 +3610,7 @@ var TeamsProfileMenu = class extends LitElement {
|
|
|
3582
3610
|
static styles = unsafeCSS(profile_menu_default);
|
|
3583
3611
|
static properties = {
|
|
3584
3612
|
state: { attribute: false },
|
|
3613
|
+
account: { type: String },
|
|
3585
3614
|
open: { state: true },
|
|
3586
3615
|
draft: { state: true },
|
|
3587
3616
|
resetAfter: { state: true },
|
|
@@ -3590,6 +3619,7 @@ var TeamsProfileMenu = class extends LitElement {
|
|
|
3590
3619
|
constructor() {
|
|
3591
3620
|
super();
|
|
3592
3621
|
this.state = null;
|
|
3622
|
+
this.account = "";
|
|
3593
3623
|
this.open = false;
|
|
3594
3624
|
this.draft = null;
|
|
3595
3625
|
this.resetAfter = "never";
|
|
@@ -3752,6 +3782,16 @@ var TeamsProfileMenu = class extends LitElement {
|
|
|
3752
3782
|
${IDLE_MINUTE_CHOICES.map((minutes) => html`<option value=${minutes} ?selected=${presence.idleMinutes === minutes}>${idleLabel(minutes)}</option>`)}
|
|
3753
3783
|
</select></label
|
|
3754
3784
|
>
|
|
3785
|
+
${this.account ? html`<div class="account">
|
|
3786
|
+
<span>${SIGN_IN_STRINGS.signedInAs(this.account)}</span>
|
|
3787
|
+
<button
|
|
3788
|
+
type="button"
|
|
3789
|
+
name="sign-out"
|
|
3790
|
+
@click=${() => this.fire("teams-sign-out", {})}
|
|
3791
|
+
>
|
|
3792
|
+
${SIGN_IN_STRINGS.signOut}
|
|
3793
|
+
</button>
|
|
3794
|
+
</div>` : nothing}
|
|
3755
3795
|
<p class="connection">
|
|
3756
3796
|
${state.mode === "local" ? "Local workspace" : "Workspace server"}: ${state.status}
|
|
3757
3797
|
</p>
|
|
@@ -3762,6 +3802,266 @@ function defineTeamsProfileMenu() {
|
|
|
3762
3802
|
if (!customElements.get("teams-profile-menu"))
|
|
3763
3803
|
customElements.define("teams-profile-menu", TeamsProfileMenu);
|
|
3764
3804
|
}
|
|
3805
|
+
var PROBE_AFTER_MS = 4e3;
|
|
3806
|
+
var PROBE_AGAIN_MS = 15e3;
|
|
3807
|
+
var MAX_TIMER_MS = 2 ** 31 - 1;
|
|
3808
|
+
var SignInFlow = class {
|
|
3809
|
+
constructor(host) {
|
|
3810
|
+
this.host = host;
|
|
3811
|
+
}
|
|
3812
|
+
host;
|
|
3813
|
+
phase = "open";
|
|
3814
|
+
session = null;
|
|
3815
|
+
/** Kept across a re-prompt so the person only retypes the password. */
|
|
3816
|
+
userId = "";
|
|
3817
|
+
notice = "";
|
|
3818
|
+
error = "";
|
|
3819
|
+
busy = false;
|
|
3820
|
+
retryAfterSec = 0;
|
|
3821
|
+
accounts = /* @__PURE__ */ new Map();
|
|
3822
|
+
probing = "";
|
|
3823
|
+
expiryTimer;
|
|
3824
|
+
checkTimer;
|
|
3825
|
+
checking = false;
|
|
3826
|
+
generation = 0;
|
|
3827
|
+
key(config) {
|
|
3828
|
+
return `${serverOrigin(config) ?? ""}|${config.token ?? ""}`;
|
|
3829
|
+
}
|
|
3830
|
+
/**
|
|
3831
|
+
* Whether the client must wait: true while the server is being asked and while the sign-in
|
|
3832
|
+
* screen is showing. Call it from every (re)start with the settings-derived config.
|
|
3833
|
+
*/
|
|
3834
|
+
gate(config) {
|
|
3835
|
+
if (config.mode !== "server" || config.sessionToken || !serverOrigin(config)) {
|
|
3836
|
+
this.phase = "open";
|
|
3837
|
+
return false;
|
|
3838
|
+
}
|
|
3839
|
+
if (this.session) {
|
|
3840
|
+
this.phase = "open";
|
|
3841
|
+
return false;
|
|
3842
|
+
}
|
|
3843
|
+
const key = this.key(config);
|
|
3844
|
+
const known = this.accounts.get(key);
|
|
3845
|
+
if (known === false) {
|
|
3846
|
+
this.phase = "open";
|
|
3847
|
+
return false;
|
|
3848
|
+
}
|
|
3849
|
+
if (known === true) {
|
|
3850
|
+
this.phase = "required";
|
|
3851
|
+
return true;
|
|
3852
|
+
}
|
|
3853
|
+
this.phase = "checking";
|
|
3854
|
+
if (this.probing !== key) {
|
|
3855
|
+
this.probing = key;
|
|
3856
|
+
const generation = this.generation;
|
|
3857
|
+
void probeTeamsAccounts(config).then((accounts) => {
|
|
3858
|
+
if (generation !== this.generation || this.probing !== key) return;
|
|
3859
|
+
this.probing = "";
|
|
3860
|
+
if (accounts !== null) this.accounts.set(key, accounts);
|
|
3861
|
+
this.phase = accounts ? "required" : "open";
|
|
3862
|
+
this.host.changed();
|
|
3863
|
+
});
|
|
3864
|
+
}
|
|
3865
|
+
return true;
|
|
3866
|
+
}
|
|
3867
|
+
/** The config to start the client with: the session, when there is one, rides along. */
|
|
3868
|
+
apply(config) {
|
|
3869
|
+
return this.session && !config.sessionToken ? { ...config, sessionToken: this.session.token } : config;
|
|
3870
|
+
}
|
|
3871
|
+
async submit(config, userId, credential) {
|
|
3872
|
+
if (this.busy) return;
|
|
3873
|
+
const id = userId.trim();
|
|
3874
|
+
this.userId = id;
|
|
3875
|
+
this.error = "";
|
|
3876
|
+
this.retryAfterSec = 0;
|
|
3877
|
+
this.busy = true;
|
|
3878
|
+
this.host.changed();
|
|
3879
|
+
try {
|
|
3880
|
+
const session = await requestTeamsSession(config, { userId: id, credential });
|
|
3881
|
+
this.session = session;
|
|
3882
|
+
this.userId = session.userId;
|
|
3883
|
+
this.notice = "";
|
|
3884
|
+
this.phase = "open";
|
|
3885
|
+
this.armExpiry(session);
|
|
3886
|
+
this.host.emit("teams-signed-in", { userId: session.userId, expiresAt: session.expiresAt });
|
|
3887
|
+
} catch (error) {
|
|
3888
|
+
const failure = error instanceof TeamsSignInError ? error : null;
|
|
3889
|
+
this.error = signInErrorText(failure?.reason ?? "server", failure?.retryAfterSec);
|
|
3890
|
+
this.retryAfterSec = failure?.retryAfterSec ?? 0;
|
|
3891
|
+
} finally {
|
|
3892
|
+
this.busy = false;
|
|
3893
|
+
this.host.changed();
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
/** The session no longer works: back to the sign-in screen, keeping the user id. */
|
|
3897
|
+
expire(message) {
|
|
3898
|
+
if (!this.session) return;
|
|
3899
|
+
this.drop();
|
|
3900
|
+
this.notice = message;
|
|
3901
|
+
this.host.emit("teams-session-ended", { userId: this.userId });
|
|
3902
|
+
this.host.changed();
|
|
3903
|
+
}
|
|
3904
|
+
async signOut(config) {
|
|
3905
|
+
const session = this.session;
|
|
3906
|
+
if (!session) return;
|
|
3907
|
+
this.drop();
|
|
3908
|
+
this.userId = "";
|
|
3909
|
+
this.notice = SIGN_IN_STRINGS.signedOut;
|
|
3910
|
+
this.host.emit("teams-signed-out", { userId: session.userId });
|
|
3911
|
+
this.host.changed();
|
|
3912
|
+
await signOutTeamsSession(config, session.token);
|
|
3913
|
+
}
|
|
3914
|
+
/** Feed the connection status after every render; a session that stays unusable is checked. */
|
|
3915
|
+
watchConnection(connected, config) {
|
|
3916
|
+
if (!this.session) return;
|
|
3917
|
+
if (connected) {
|
|
3918
|
+
clearTimeout(this.checkTimer);
|
|
3919
|
+
this.checkTimer = void 0;
|
|
3920
|
+
return;
|
|
3921
|
+
}
|
|
3922
|
+
if (this.checkTimer !== void 0 || this.checking) return;
|
|
3923
|
+
this.scheduleCheck(config, PROBE_AFTER_MS);
|
|
3924
|
+
}
|
|
3925
|
+
scheduleCheck(config, delay) {
|
|
3926
|
+
const session = this.session;
|
|
3927
|
+
if (!session) return;
|
|
3928
|
+
this.checkTimer = setTimeout(() => {
|
|
3929
|
+
this.checkTimer = void 0;
|
|
3930
|
+
this.checking = true;
|
|
3931
|
+
void checkTeamsSession(config, session.token).then((result) => {
|
|
3932
|
+
this.checking = false;
|
|
3933
|
+
if (this.session !== session) return;
|
|
3934
|
+
if (result === "rejected") this.expire(SIGN_IN_STRINGS.ended);
|
|
3935
|
+
else this.scheduleCheck(config, PROBE_AGAIN_MS);
|
|
3936
|
+
});
|
|
3937
|
+
}, delay);
|
|
3938
|
+
}
|
|
3939
|
+
armExpiry(session) {
|
|
3940
|
+
clearTimeout(this.expiryTimer);
|
|
3941
|
+
const wait = Math.min(Math.max(session.expiresAt - Date.now(), 0), MAX_TIMER_MS);
|
|
3942
|
+
this.expiryTimer = setTimeout(() => {
|
|
3943
|
+
if (this.session === session) this.expire(SIGN_IN_STRINGS.expired);
|
|
3944
|
+
}, wait);
|
|
3945
|
+
}
|
|
3946
|
+
drop() {
|
|
3947
|
+
this.session = null;
|
|
3948
|
+
this.error = "";
|
|
3949
|
+
this.retryAfterSec = 0;
|
|
3950
|
+
clearTimeout(this.expiryTimer);
|
|
3951
|
+
clearTimeout(this.checkTimer);
|
|
3952
|
+
this.checkTimer = void 0;
|
|
3953
|
+
this.phase = "required";
|
|
3954
|
+
}
|
|
3955
|
+
/** Forget everything (the element is leaving the page). */
|
|
3956
|
+
dispose() {
|
|
3957
|
+
this.generation++;
|
|
3958
|
+
this.probing = "";
|
|
3959
|
+
clearTimeout(this.expiryTimer);
|
|
3960
|
+
clearTimeout(this.checkTimer);
|
|
3961
|
+
this.checkTimer = void 0;
|
|
3962
|
+
}
|
|
3963
|
+
};
|
|
3964
|
+
|
|
3965
|
+
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/teams-sign-in.css?raw
|
|
3966
|
+
var teams_sign_in_default = ":host {\n display: grid;\n place-items: center;\n height: 100%;\n background: var(--office-teams-panel);\n color: var(--office-foreground);\n font: inherit;\n}\n.card {\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.logo {\n display: inline-grid;\n place-items: center;\n width: 2.4em;\n height: 2.4em;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n}\nh1 {\n margin: 0;\n font-size: var(--office-font-size-xl);\n}\np {\n margin: 0;\n text-align: center;\n overflow-wrap: anywhere;\n}\n.muted {\n color: var(--office-teams-text-subtle);\n}\nlabel {\n display: grid;\n gap: var(--office-space-2);\n width: 100%;\n}\ninput {\n width: 100%;\n box-sizing: border-box;\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}\ninput:focus-visible,\nbutton:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.error {\n color: var(--office-danger);\n}\nbutton {\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: inherit;\n font-weight: var(--office-font-weight-bold);\n cursor: pointer;\n}\nbutton:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n";
|
|
3967
|
+
|
|
3968
|
+
// src/teams/app/teams-sign-in.ts
|
|
3969
|
+
var TeamsSignIn = class extends LitElement {
|
|
3970
|
+
static styles = unsafeCSS(teams_sign_in_default);
|
|
3971
|
+
static properties = {
|
|
3972
|
+
userId: { type: String },
|
|
3973
|
+
notice: { type: String },
|
|
3974
|
+
error: { type: String },
|
|
3975
|
+
retryAfter: { type: Number },
|
|
3976
|
+
busy: { type: Boolean },
|
|
3977
|
+
checking: { type: Boolean },
|
|
3978
|
+
wait: { state: true }
|
|
3979
|
+
};
|
|
3980
|
+
timer;
|
|
3981
|
+
constructor() {
|
|
3982
|
+
super();
|
|
3983
|
+
this.userId = "";
|
|
3984
|
+
this.notice = "";
|
|
3985
|
+
this.error = "";
|
|
3986
|
+
this.retryAfter = 0;
|
|
3987
|
+
this.busy = false;
|
|
3988
|
+
this.checking = false;
|
|
3989
|
+
this.wait = 0;
|
|
3990
|
+
}
|
|
3991
|
+
willUpdate(changed) {
|
|
3992
|
+
if (!changed.has("retryAfter") && !changed.has("error")) return;
|
|
3993
|
+
clearInterval(this.timer);
|
|
3994
|
+
this.wait = this.error ? this.retryAfter : 0;
|
|
3995
|
+
if (this.wait <= 0) return;
|
|
3996
|
+
this.timer = setInterval(() => {
|
|
3997
|
+
this.wait = Math.max(0, this.wait - 1);
|
|
3998
|
+
if (this.wait === 0) clearInterval(this.timer);
|
|
3999
|
+
}, 1e3);
|
|
4000
|
+
}
|
|
4001
|
+
updated(changed) {
|
|
4002
|
+
if (changed.has("busy") && !this.busy && this.error)
|
|
4003
|
+
this.renderRoot.querySelector('input[name="credential"]')?.focus();
|
|
4004
|
+
}
|
|
4005
|
+
disconnectedCallback() {
|
|
4006
|
+
clearInterval(this.timer);
|
|
4007
|
+
super.disconnectedCallback();
|
|
4008
|
+
}
|
|
4009
|
+
submit(event) {
|
|
4010
|
+
event.preventDefault();
|
|
4011
|
+
if (this.busy || this.wait > 0) return;
|
|
4012
|
+
const form = event.target;
|
|
4013
|
+
const data = new FormData(form);
|
|
4014
|
+
const userId = String(data.get("user") ?? "").trim();
|
|
4015
|
+
const credential = String(data.get("credential") ?? "");
|
|
4016
|
+
form.elements.namedItem("credential").value = "";
|
|
4017
|
+
if (!userId || !credential) return;
|
|
4018
|
+
this.dispatchEvent(
|
|
4019
|
+
new CustomEvent("teams-sign-in-submit", {
|
|
4020
|
+
detail: { userId, credential },
|
|
4021
|
+
bubbles: true,
|
|
4022
|
+
composed: true
|
|
4023
|
+
})
|
|
4024
|
+
);
|
|
4025
|
+
}
|
|
4026
|
+
render() {
|
|
4027
|
+
if (this.checking)
|
|
4028
|
+
return html`<div class="card" role="status" aria-live="polite">
|
|
4029
|
+
<span class="logo" aria-hidden="true">T</span>
|
|
4030
|
+
<p class="muted">${SIGN_IN_STRINGS.checking}</p>
|
|
4031
|
+
</div>`;
|
|
4032
|
+
const locked = this.busy || this.wait > 0;
|
|
4033
|
+
const error = this.error && this.wait > 0 && this.retryAfter > 0 ? this.error.replace(/\d+ seconds/u, `${this.wait} seconds`) : this.error;
|
|
4034
|
+
return html`<form class="card" @submit=${this.submit} aria-busy=${String(this.busy)}>
|
|
4035
|
+
<span class="logo" aria-hidden="true">T</span>
|
|
4036
|
+
<h1>${SIGN_IN_STRINGS.title}</h1>
|
|
4037
|
+
<p class="muted">${this.notice || SIGN_IN_STRINGS.intro}</p>
|
|
4038
|
+
<label
|
|
4039
|
+
>${SIGN_IN_STRINGS.userLabel}<input
|
|
4040
|
+
name="user"
|
|
4041
|
+
autocomplete="username"
|
|
4042
|
+
autocapitalize="none"
|
|
4043
|
+
spellcheck="false"
|
|
4044
|
+
maxlength="64"
|
|
4045
|
+
required
|
|
4046
|
+
.value=${this.userId}
|
|
4047
|
+
?disabled=${this.busy}
|
|
4048
|
+
/></label>
|
|
4049
|
+
<label
|
|
4050
|
+
>${SIGN_IN_STRINGS.credentialLabel}<input
|
|
4051
|
+
name="credential"
|
|
4052
|
+
type="password"
|
|
4053
|
+
autocomplete="current-password"
|
|
4054
|
+
required
|
|
4055
|
+
?disabled=${this.busy}
|
|
4056
|
+
/></label>
|
|
4057
|
+
${error ? html`<p class="error" role="alert">${error}</p>` : nothing}
|
|
4058
|
+
<button type="submit" ?disabled=${locked}>${this.busy ? SIGN_IN_STRINGS.submitting : SIGN_IN_STRINGS.submit}</button>
|
|
4059
|
+
</form>`;
|
|
4060
|
+
}
|
|
4061
|
+
};
|
|
4062
|
+
function defineTeamsSignIn() {
|
|
4063
|
+
if (!customElements.get("teams-sign-in")) customElements.define("teams-sign-in", TeamsSignIn);
|
|
4064
|
+
}
|
|
3765
4065
|
|
|
3766
4066
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/pinned-bar.css?raw
|
|
3767
4067
|
var pinned_bar_default = ":host {\n display: block;\n flex: none;\n font: inherit;\n color: inherit;\n}\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nsection {\n background: var(--office-teams-panel);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nbutton {\n font: inherit;\n color: inherit;\n cursor: pointer;\n border: 0;\n background: transparent;\n}\n.summary {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n padding: var(--office-space-1) var(--office-space-3);\n}\n.latest {\n display: flex;\n flex: 1;\n align-items: center;\n gap: var(--office-space-2);\n min-width: 0;\n min-height: 2.2em;\n padding: var(--office-space-1) var(--office-space-2);\n border-radius: var(--office-radius);\n text-align: start;\n}\n.latest:hover,\n.count:hover,\n.jump:hover,\n.unpin:hover {\n background: var(--office-selected);\n}\n.mark {\n display: inline-grid;\n flex: none;\n color: var(--office-teams-brand);\n}\nsvg {\n width: 1.1em;\n height: 1.1em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.text {\n min-width: 0;\n overflow: hidden;\n color: var(--office-teams-text-subtle);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.count {\n flex: none;\n min-height: 2.2em;\n padding: var(--office-space-1) var(--office-space-3);\n border-radius: var(--office-radius);\n color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\nul {\n display: grid;\n gap: var(--office-space-1);\n max-height: 14em;\n margin: 0;\n padding: 0 var(--office-space-3) var(--office-space-2);\n overflow: auto;\n list-style: none;\n}\nli {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\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.jump {\n display: grid;\n flex: 1;\n gap: var(--office-space-0);\n min-width: 0;\n padding: var(--office-space-2) var(--office-space-3);\n border-radius: var(--office-radius-md);\n text-align: start;\n}\n.by {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-xs);\n}\n.unpin {\n flex: none;\n margin-inline-end: var(--office-space-2);\n padding: var(--office-space-1) var(--office-space-3);\n border-radius: var(--office-radius);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n@media (pointer: coarse) {\n .latest,\n .count,\n .unpin {\n min-height: var(--office-touch-target, 44px);\n }\n .unpin {\n min-width: var(--office-touch-target, 44px);\n }\n}\n";
|
|
@@ -4500,10 +4800,79 @@ function defineTeamsChatPeopleDialog(registry = globalThis.customElements) {
|
|
|
4500
4800
|
|
|
4501
4801
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/meeting-dialog.css?raw
|
|
4502
4802
|
var meeting_dialog_default = ".times {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--office-space-3);\n}\noffice-ui-people-picker {\n font-weight: normal;\n}\n@media (max-width: 40em) {\n .times {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n";
|
|
4803
|
+
var WEEKDAYS = [
|
|
4804
|
+
"Sunday",
|
|
4805
|
+
"Monday",
|
|
4806
|
+
"Tuesday",
|
|
4807
|
+
"Wednesday",
|
|
4808
|
+
"Thursday",
|
|
4809
|
+
"Friday",
|
|
4810
|
+
"Saturday"
|
|
4811
|
+
];
|
|
4812
|
+
var MONTHS = [
|
|
4813
|
+
"January",
|
|
4814
|
+
"February",
|
|
4815
|
+
"March",
|
|
4816
|
+
"April",
|
|
4817
|
+
"May",
|
|
4818
|
+
"June",
|
|
4819
|
+
"July",
|
|
4820
|
+
"August",
|
|
4821
|
+
"September",
|
|
4822
|
+
"October",
|
|
4823
|
+
"November",
|
|
4824
|
+
"December"
|
|
4825
|
+
];
|
|
4826
|
+
var ORDINALS = {
|
|
4827
|
+
1: "first",
|
|
4828
|
+
2: "second",
|
|
4829
|
+
3: "third",
|
|
4830
|
+
4: "fourth",
|
|
4831
|
+
[-1]: "last"
|
|
4832
|
+
};
|
|
4833
|
+
var weekdayRule = (ordinal, weekday) => `the ${ORDINALS[ordinal] ?? "first"} ${WEEKDAYS[weekday] ?? ""}`;
|
|
4834
|
+
var NO_REPEAT = { repeat: "none", monthlyBy: "date", ordinal: 1 };
|
|
4835
|
+
var repeatValue = (r) => r.repeat === "monthly" ? r.monthlyBy === "weekday" ? `monthly-${r.ordinal}` : "monthly-date" : r.repeat;
|
|
4836
|
+
function parseRepeatValue(value) {
|
|
4837
|
+
if (value === "monthly-date") return { repeat: "monthly", monthlyBy: "date", ordinal: 1 };
|
|
4838
|
+
const m = /^monthly-(-?\d)$/u.exec(value);
|
|
4839
|
+
if (m) return { repeat: "monthly", monthlyBy: "weekday", ordinal: Number(m[1]) };
|
|
4840
|
+
if (value === "daily" || value === "weekly" || value === "yearly")
|
|
4841
|
+
return { repeat: value, monthlyBy: "date", ordinal: 1 };
|
|
4842
|
+
return NO_REPEAT;
|
|
4843
|
+
}
|
|
4844
|
+
function repeatOptions(start, zone) {
|
|
4845
|
+
const { month, day, weekday, ordinals } = repeatChoices(start, zone);
|
|
4846
|
+
const options = [
|
|
4847
|
+
{ value: "none", label: "Does not repeat" },
|
|
4848
|
+
{ value: "daily", label: "Every day" },
|
|
4849
|
+
{ value: "weekly", label: "Every week" },
|
|
4850
|
+
{ value: "monthly-date", label: `Every month on day ${day}` },
|
|
4851
|
+
...ordinals.map((o) => ({
|
|
4852
|
+
value: `monthly-${o}`,
|
|
4853
|
+
label: `Every month on ${weekdayRule(o, weekday)}`
|
|
4854
|
+
})),
|
|
4855
|
+
{ value: "yearly", label: `Every year on ${MONTHS[month - 1]} ${day}` }
|
|
4856
|
+
];
|
|
4857
|
+
return options;
|
|
4858
|
+
}
|
|
4859
|
+
function repeatText(m) {
|
|
4860
|
+
if (m.repeat === "none") return "";
|
|
4861
|
+
if (m.repeat === "daily") return "Repeats every day";
|
|
4862
|
+
if (m.repeat === "weekly") return "Repeats every week";
|
|
4863
|
+
const { month, day, weekday } = repeatChoices(m.start, m.zone);
|
|
4864
|
+
if (m.repeat === "yearly") return `Repeats every year on ${MONTHS[month - 1]} ${day}`;
|
|
4865
|
+
return m.monthlyBy === "weekday" && m.ordinal !== void 0 ? `Repeats every month on ${weekdayRule(m.ordinal, weekday)}` : `Repeats every month on day ${day}`;
|
|
4866
|
+
}
|
|
4503
4867
|
|
|
4504
4868
|
// src/teams/app/meeting-dialog.ts
|
|
4505
4869
|
var SLOT = 30 * MINUTE_MS;
|
|
4506
4870
|
var NOT_SAVED = "The meeting was not saved. Your details are kept here.";
|
|
4871
|
+
var repeatOption = (o, current) => html`<option value=${o.value} ?selected=${o.value === current}>${o.label}</option>`;
|
|
4872
|
+
function repeatFields(r) {
|
|
4873
|
+
if (r.repeat !== "monthly") return { repeat: r.repeat };
|
|
4874
|
+
return r.monthlyBy === "weekday" ? { repeat: "monthly", monthlyBy: "weekday", ordinal: r.ordinal } : { repeat: "monthly", monthlyBy: "date" };
|
|
4875
|
+
}
|
|
4507
4876
|
function toLocalInput(ms) {
|
|
4508
4877
|
const d = new Date(ms);
|
|
4509
4878
|
const p = (n) => String(n).padStart(2, "0");
|
|
@@ -4523,7 +4892,7 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4523
4892
|
description: { state: true },
|
|
4524
4893
|
startText: { state: true },
|
|
4525
4894
|
endText: { state: true },
|
|
4526
|
-
|
|
4895
|
+
repeatChoice: { state: true },
|
|
4527
4896
|
endMode: { state: true },
|
|
4528
4897
|
untilText: { state: true },
|
|
4529
4898
|
countText: { state: true },
|
|
@@ -4543,7 +4912,7 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4543
4912
|
this.description = "";
|
|
4544
4913
|
this.startText = "";
|
|
4545
4914
|
this.endText = "";
|
|
4546
|
-
this.
|
|
4915
|
+
this.repeatChoice = NO_REPEAT;
|
|
4547
4916
|
this.endMode = "never";
|
|
4548
4917
|
this.untilText = "";
|
|
4549
4918
|
this.countText = "10";
|
|
@@ -4560,7 +4929,7 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4560
4929
|
this.description = one?.description ?? m?.description ?? "";
|
|
4561
4930
|
this.startText = toLocalInput(begin);
|
|
4562
4931
|
this.endText = toLocalInput(one?.end ?? m?.end ?? begin + SLOT);
|
|
4563
|
-
this.
|
|
4932
|
+
this.repeatChoice = m ? { repeat: m.repeat, monthlyBy: m.monthlyBy ?? "date", ordinal: m.ordinal ?? 1 } : NO_REPEAT;
|
|
4564
4933
|
this.endMode = m?.count !== void 0 ? "count" : m?.until !== void 0 ? "date" : "never";
|
|
4565
4934
|
this.countText = String(m?.count ?? 10);
|
|
4566
4935
|
this.untilText = toLocalInput(m?.until ?? begin + 28 * 864e5).slice(0, 10);
|
|
@@ -4577,6 +4946,20 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4577
4946
|
this.endText = toLocalInput(end + (after - before));
|
|
4578
4947
|
this.issue = "";
|
|
4579
4948
|
}
|
|
4949
|
+
/** The zone the series is defined in: the organizer's for an existing meeting, else this device's. */
|
|
4950
|
+
zone() {
|
|
4951
|
+
return this.meeting?.zone ?? localZone();
|
|
4952
|
+
}
|
|
4953
|
+
/**
|
|
4954
|
+
* The repeat to store. A weekday ordinal that no longer fits the start date (the start moved)
|
|
4955
|
+
* becomes the first one that does.
|
|
4956
|
+
*/
|
|
4957
|
+
repeatToStore(start) {
|
|
4958
|
+
const choice = this.repeatChoice;
|
|
4959
|
+
if (choice.repeat !== "monthly" || choice.monthlyBy !== "weekday") return choice;
|
|
4960
|
+
const fits = repeatOptions(start, this.zone()).map((o) => o.value);
|
|
4961
|
+
return fits.includes(repeatValue(choice)) ? choice : parseRepeatValue(fits.find((v) => v.startsWith("monthly-") && v !== "monthly-date") ?? "");
|
|
4962
|
+
}
|
|
4580
4963
|
validCount() {
|
|
4581
4964
|
const n = Number(this.countText);
|
|
4582
4965
|
return Number.isInteger(n) && n >= 1 && n <= MAX_RECURRENCE_COUNT;
|
|
@@ -4590,7 +4973,8 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4590
4973
|
}
|
|
4591
4974
|
/** The end of the repeat to store: a count, the end of a day, or none (null clears an old end). */
|
|
4592
4975
|
recurrenceEnd() {
|
|
4593
|
-
if (this.repeat === "none" || this.endMode === "never")
|
|
4976
|
+
if (this.repeatChoice.repeat === "none" || this.endMode === "never")
|
|
4977
|
+
return { count: null, until: null };
|
|
4594
4978
|
return this.endMode === "count" ? { count: Number(this.countText), until: null } : { count: null, until: this.untilTime() };
|
|
4595
4979
|
}
|
|
4596
4980
|
submit(event) {
|
|
@@ -4604,9 +4988,9 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4604
4988
|
else if (this.occurrence) {
|
|
4605
4989
|
const one = { title: this.meetingTitle, description: this.description, start, end };
|
|
4606
4990
|
if (!this.save?.(one, this.meeting?.id, this.occurrence)) this.issue = NOT_SAVED;
|
|
4607
|
-
} else if (this.repeat !== "none" && this.endMode === "count" && !this.validCount())
|
|
4991
|
+
} else if (this.repeatChoice.repeat !== "none" && this.endMode === "count" && !this.validCount())
|
|
4608
4992
|
this.issue = `Enter a number of events from 1 to ${MAX_RECURRENCE_COUNT}.`;
|
|
4609
|
-
else if (this.repeat !== "none" && this.endMode === "date" && !this.validUntil(start))
|
|
4993
|
+
else if (this.repeatChoice.repeat !== "none" && this.endMode === "date" && !this.validUntil(start))
|
|
4610
4994
|
this.issue = "The series must end on or after its first event.";
|
|
4611
4995
|
else if (!this.save?.(
|
|
4612
4996
|
{
|
|
@@ -4614,7 +4998,7 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4614
4998
|
description: this.description,
|
|
4615
4999
|
start,
|
|
4616
5000
|
end,
|
|
4617
|
-
|
|
5001
|
+
...repeatFields(this.repeatToStore(start)),
|
|
4618
5002
|
...this.recurrenceEnd(),
|
|
4619
5003
|
attendeeIds: this.channelId ? [] : this.attendees,
|
|
4620
5004
|
...this.channelId ? { channelId: this.channelId } : {}
|
|
@@ -4626,6 +5010,7 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4626
5010
|
render() {
|
|
4627
5011
|
const editing = this.meeting !== null;
|
|
4628
5012
|
const single = this.occurrence !== 0;
|
|
5013
|
+
const current = repeatValue(this.repeatToStore(new Date(this.startText).getTime()));
|
|
4629
5014
|
return this.frame(
|
|
4630
5015
|
single ? "Edit this event" : editing ? "Edit meeting" : "New meeting",
|
|
4631
5016
|
html`<form @submit=${this.submit}>
|
|
@@ -4659,15 +5044,15 @@ var TeamsMeetingDialog = class extends TeamsDialog {
|
|
|
4659
5044
|
${single ? html`<small>Only this event changes. The rest of the series stays as it is.</small>` : html`
|
|
4660
5045
|
<label
|
|
4661
5046
|
>Repeat<select
|
|
4662
|
-
|
|
4663
|
-
@change=${(e) => this.repeat = e.target.value}
|
|
5047
|
+
@change=${(e) => this.repeatChoice = parseRepeatValue(e.target.value)}
|
|
4664
5048
|
>
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
5049
|
+
${repeatOptions(
|
|
5050
|
+
new Date(this.startText).getTime() || Date.now(),
|
|
5051
|
+
this.zone()
|
|
5052
|
+
).map((o) => repeatOption(o, current))}
|
|
4668
5053
|
</select></label
|
|
4669
5054
|
>
|
|
4670
|
-
${this.repeat === "none" ? nothing : html`<label
|
|
5055
|
+
${this.repeatChoice.repeat === "none" ? nothing : html`<label
|
|
4671
5056
|
>Ends<select
|
|
4672
5057
|
.value=${this.endMode}
|
|
4673
5058
|
@change=${(e) => this.endMode = e.target.value}
|
|
@@ -4749,7 +5134,6 @@ function defineTeamsMeetingDialog(registry = globalThis.customElements) {
|
|
|
4749
5134
|
var meeting_details_default = ".when {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n color: var(--office-foreground);\n font-weight: var(--office-font-weight-bold);\n}\nh3 {\n margin: 0 0 var(--office-space-1);\n font-size: var(--office-font-size);\n}\n.people ul {\n margin: 0;\n padding-inline-start: var(--office-space-5);\n}\n.description {\n color: var(--office-foreground);\n white-space: pre-wrap;\n}\n.scope {\n display: grid;\n gap: var(--office-space-3);\n}\n.scope fieldset {\n display: grid;\n gap: var(--office-space-2);\n margin: 0;\n padding: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.scope label {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n}\nfooter[hidden] {\n display: none;\n}\n";
|
|
4750
5135
|
|
|
4751
5136
|
// src/teams/app/meeting-details.ts
|
|
4752
|
-
var REPEAT_TEXT = { none: "", daily: "Repeats every day", weekly: "Repeats every week" };
|
|
4753
5137
|
var TeamsMeetingDetails = class extends TeamsDialog {
|
|
4754
5138
|
static styles = dialogStyles(meeting_details_default);
|
|
4755
5139
|
static properties = {
|
|
@@ -4855,7 +5239,7 @@ var TeamsMeetingDetails = class extends TeamsDialog {
|
|
|
4855
5239
|
occurrence?.title ?? m.title,
|
|
4856
5240
|
html`<div class="body">
|
|
4857
5241
|
<p class="when">${icon("calendar")} ${formatWhen(start, end)}</p>
|
|
4858
|
-
${m.repeat !== "none" ? html`<p>${
|
|
5242
|
+
${m.repeat !== "none" ? html`<p>${repeatText(m)}${this.endText(m)}</p>` : nothing}
|
|
4859
5243
|
${m.zone !== this.zone ? html`<p>Scheduled in the organizer's time zone, ${m.zone.replaceAll("_", " ")}.</p>` : nothing}
|
|
4860
5244
|
<p>Organized by ${m.mine ? "you" : m.organizerName}</p>
|
|
4861
5245
|
${m.channelId ? html`<p>
|
|
@@ -5016,8 +5400,15 @@ var TeamsApp = class extends LitElement {
|
|
|
5016
5400
|
theme: { state: true },
|
|
5017
5401
|
fileOpenPreference: { state: true },
|
|
5018
5402
|
chatDensity: { state: true },
|
|
5019
|
-
showAppNames: { state: true }
|
|
5403
|
+
showAppNames: { state: true },
|
|
5404
|
+
authRevision: { state: true }
|
|
5020
5405
|
};
|
|
5406
|
+
/** Sign-in for servers that require accounts; a server without them never gates the app. */
|
|
5407
|
+
signIn = new SignInFlow({
|
|
5408
|
+
changed: () => this.authRevision++,
|
|
5409
|
+
emit: (name, detail) => this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }))
|
|
5410
|
+
});
|
|
5411
|
+
authKey = "";
|
|
5021
5412
|
teams = new TeamsController(
|
|
5022
5413
|
this,
|
|
5023
5414
|
(text) => this.notify(text),
|
|
@@ -5072,6 +5463,7 @@ var TeamsApp = class extends LitElement {
|
|
|
5072
5463
|
this.fileOpenPreference = "teams";
|
|
5073
5464
|
this.chatDensity = "comfy";
|
|
5074
5465
|
this.showAppNames = true;
|
|
5466
|
+
this.authRevision = 0;
|
|
5075
5467
|
}
|
|
5076
5468
|
/** The core client behind this element, for hosts that want the raw actions. */
|
|
5077
5469
|
get client() {
|
|
@@ -5094,8 +5486,10 @@ var TeamsApp = class extends LitElement {
|
|
|
5094
5486
|
defineTeamsChatPeopleDialog();
|
|
5095
5487
|
defineTeamsMeetingDialog();
|
|
5096
5488
|
defineTeamsMeetingDetails();
|
|
5489
|
+
defineTeamsSignIn();
|
|
5097
5490
|
this.stopActivity = watchActivity(this.ownerDocument, () => this.teams.client?.noteActivity());
|
|
5098
5491
|
super.connectedCallback();
|
|
5492
|
+
if (this.signIn.phase === "checking") this.authRevision++;
|
|
5099
5493
|
}
|
|
5100
5494
|
// ---- lifecycle --------------------------------------------------------------------------
|
|
5101
5495
|
resolveConfig() {
|
|
@@ -5110,14 +5504,13 @@ var TeamsApp = class extends LitElement {
|
|
|
5110
5504
|
}
|
|
5111
5505
|
willUpdate(changed) {
|
|
5112
5506
|
if (this.popoutRequested) return;
|
|
5113
|
-
const
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
].some((k) => changed.has(k));
|
|
5507
|
+
const base = this.resolveConfig();
|
|
5508
|
+
const waiting = this.signIn.gate(base);
|
|
5509
|
+
const authKey = `${waiting}|${this.signIn.session?.token ?? ""}`;
|
|
5510
|
+
const restart = ["workspaceId", "userName", "userId", "serverConfig", "config", "identity"].some(
|
|
5511
|
+
(k) => changed.has(k)
|
|
5512
|
+
) || changed.has("authRevision") && authKey !== this.authKey;
|
|
5513
|
+
this.authKey = authKey;
|
|
5121
5514
|
if (!restart && this.teams.client) return;
|
|
5122
5515
|
this.preview = null;
|
|
5123
5516
|
this.tab = "posts";
|
|
@@ -5127,8 +5520,14 @@ var TeamsApp = class extends LitElement {
|
|
|
5127
5520
|
this.meetingForm = this.meetingDetails = null;
|
|
5128
5521
|
this.settingsOpen = false;
|
|
5129
5522
|
this.openRequest++;
|
|
5130
|
-
|
|
5131
|
-
|
|
5523
|
+
if (waiting) return this.teams.stop();
|
|
5524
|
+
const account = this.signIn.session;
|
|
5525
|
+
const remembered = this.identity ?? loadIdentity();
|
|
5526
|
+
const named = account ? {
|
|
5527
|
+
id: account.userId,
|
|
5528
|
+
name: this.userName || (remembered?.id === account.userId ? remembered.name : account.userId)
|
|
5529
|
+
} : this.userName ? { id: this.userId || loadIdentity()?.id || crypto.randomUUID(), name: this.userName } : remembered;
|
|
5530
|
+
if (this.userName && !this.userId && !account) saveIdentity(named);
|
|
5132
5531
|
if (!named) return this.teams.stop();
|
|
5133
5532
|
const workspaceId = /^[\w-]{1,100}$/u.test(this.workspaceId) ? this.workspaceId : "demo";
|
|
5134
5533
|
this.themeStorageKey = `teams:theme:${encodeURIComponent(workspaceId)}:${encodeURIComponent(named.id)}`;
|
|
@@ -5142,7 +5541,7 @@ var TeamsApp = class extends LitElement {
|
|
|
5142
5541
|
this.teams.start({
|
|
5143
5542
|
workspaceId,
|
|
5144
5543
|
user: named,
|
|
5145
|
-
config: this.
|
|
5544
|
+
config: this.signIn.apply(base),
|
|
5146
5545
|
storage: safeStorage,
|
|
5147
5546
|
...this.uploadFile ? { uploadFile: this.uploadFile } : {}
|
|
5148
5547
|
});
|
|
@@ -5153,6 +5552,7 @@ var TeamsApp = class extends LitElement {
|
|
|
5153
5552
|
updated() {
|
|
5154
5553
|
this.setAttribute("data-chat-density", this.chatDensity);
|
|
5155
5554
|
const state = this.teams.state;
|
|
5555
|
+
this.signIn.watchConnection(state?.status === "connected", this.resolveConfig());
|
|
5156
5556
|
if (state?.channels.some((c) => c.id === state.selectedChannelId))
|
|
5157
5557
|
this.lastChannelId = state.selectedChannelId;
|
|
5158
5558
|
if (state?.thread && document.visibilityState === "visible" && this.renderRoot.querySelector(".thread-pane"))
|
|
@@ -5258,6 +5658,7 @@ var TeamsApp = class extends LitElement {
|
|
|
5258
5658
|
clearTimeout(this.highlightTimer);
|
|
5259
5659
|
this.stopActivity?.();
|
|
5260
5660
|
this.stopActivity = void 0;
|
|
5661
|
+
this.signIn.dispose();
|
|
5261
5662
|
super.disconnectedCallback();
|
|
5262
5663
|
}
|
|
5263
5664
|
createChannel() {
|
|
@@ -5345,6 +5746,7 @@ var TeamsApp = class extends LitElement {
|
|
|
5345
5746
|
@teams-preview-close=${() => globalThis.close()}
|
|
5346
5747
|
></teams-content-preview>
|
|
5347
5748
|
</div>` : html`<p role="alert">The file preview link is invalid.</p>`;
|
|
5749
|
+
if (this.signIn.phase !== "open") return this.signInScreen();
|
|
5348
5750
|
const s = this.teams.state;
|
|
5349
5751
|
if (!s) return this.welcome();
|
|
5350
5752
|
return html`
|
|
@@ -5465,6 +5867,18 @@ var TeamsApp = class extends LitElement {
|
|
|
5465
5867
|
</div>
|
|
5466
5868
|
`;
|
|
5467
5869
|
}
|
|
5870
|
+
signInScreen() {
|
|
5871
|
+
const flow = this.signIn;
|
|
5872
|
+
return html`<teams-sign-in
|
|
5873
|
+
.userId=${flow.userId}
|
|
5874
|
+
.notice=${flow.notice}
|
|
5875
|
+
.error=${flow.error}
|
|
5876
|
+
.retryAfter=${flow.retryAfterSec}
|
|
5877
|
+
?busy=${flow.busy}
|
|
5878
|
+
?checking=${flow.phase === "checking"}
|
|
5879
|
+
@teams-sign-in-submit=${(event) => void flow.submit(this.resolveConfig(), event.detail.userId, event.detail.credential)}
|
|
5880
|
+
></teams-sign-in>`;
|
|
5881
|
+
}
|
|
5468
5882
|
welcome() {
|
|
5469
5883
|
return html`
|
|
5470
5884
|
<div class="welcome">
|
|
@@ -5542,6 +5956,8 @@ var TeamsApp = class extends LitElement {
|
|
|
5542
5956
|
</office-ui-menu-button>
|
|
5543
5957
|
<teams-profile-menu
|
|
5544
5958
|
.state=${s}
|
|
5959
|
+
.account=${this.signIn.session?.userId ?? ""}
|
|
5960
|
+
@teams-sign-out=${() => void this.signIn.signOut(this.resolveConfig())}
|
|
5545
5961
|
@teams-profile-status=${(event) => {
|
|
5546
5962
|
const { availability, duration } = event.detail;
|
|
5547
5963
|
if (isPresenceStatus(availability))
|