ooxml-ui 1.12.2 → 1.13.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 +19 -4
- package/dist/chrome/status-layout.d.ts +23 -0
- package/dist/{chunk-GI3WX6LZ.js → chunk-3XST4F6J.js} +1 -1
- package/dist/{chunk-S6ZXU442.js → chunk-7E3HU7RL.js} +1 -1
- package/dist/{chunk-PXIYHFZ5.js → chunk-ANPFMQ6E.js} +1 -1
- package/dist/{chunk-FUQYUUIQ.js → chunk-BFPHRWEB.js} +356 -99
- package/dist/{chunk-OGNNNTKI.js → chunk-CWBSXK7P.js} +1 -1
- package/dist/{chunk-3H5NR32A.js → chunk-D7JPVAYS.js} +319 -202
- package/dist/{chunk-NLJVBHLG.js → chunk-EL2A3BDM.js} +5 -5
- package/dist/{chunk-L7JV5FVE.js → chunk-KNC2UEUR.js} +1 -1
- package/dist/{chunk-SPNWHKSR.js → chunk-LD3K2RDN.js} +7 -5
- package/dist/chunk-UBBC5FH7.js +31 -0
- package/dist/{chunk-HZSYGNNB.js → chunk-VRVFLYGI.js} +1 -0
- package/dist/controls.d.ts +2 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/dialog/options-categories.d.ts +39 -0
- package/dist/dialog/options-categories.d.ts.map +1 -0
- package/dist/dialog/options-controls.d.ts +49 -0
- package/dist/dialog/options-controls.d.ts.map +1 -0
- package/dist/dialog/options-dialog.d.ts +35 -41
- package/dist/dialog/options-dialog.d.ts.map +1 -1
- package/dist/docx/auto-fit.d.ts +10 -0
- package/dist/docx/backstage-customize.d.ts +7 -0
- package/dist/docx/backstage-options.d.ts +13 -3
- package/dist/docx/backstage-pages.d.ts +0 -6
- package/dist/docx/backstage.d.ts +3 -0
- package/dist/docx/canvas-click.d.ts +7 -0
- package/dist/docx/locales/en-app.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +5 -0
- package/dist/docx/locales/options.d.ts +11 -0
- package/dist/docx/localization-strings.d.ts +5 -0
- package/dist/docx/page-controller.d.ts +17 -3
- package/dist/docx/print-editing.d.ts +2 -0
- package/dist/docx/print-layout-view.d.ts +2 -0
- package/dist/docx/status-bar.d.ts +1 -1
- package/dist/docx.js +531 -218
- package/dist/form/color-swatches.d.ts +8 -5
- package/dist/form/color-swatches.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/pptx/{chunk-5AD3V3PA.mjs → chunk-CB2DZVKL.mjs} +127 -1
- package/dist/pptx/{chunk-4EHNTVSN.mjs → chunk-DZUSNYRA.mjs} +1310 -216
- package/dist/pptx/{chunk-Y7CDPPMZ.cjs → chunk-J3GEBMYK.cjs} +127 -1
- package/dist/pptx/{chunk-LMZK4UNY.cjs → chunk-J4HVGXPW.cjs} +1333 -213
- package/dist/pptx/dom/elements/table.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +209 -206
- package/dist/pptx/dom/index.mjs +8 -5
- package/dist/pptx/dom/load-presentation.d.ts +3 -1
- package/dist/pptx/dom/load-presentation.d.ts.map +1 -1
- package/dist/pptx/dom/slide-stage.d.ts +3 -1
- package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
- package/dist/pptx/dom/types.d.ts +6 -1
- package/dist/pptx/dom/types.d.ts.map +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en-galleries-data.d.ts.map +1 -1
- package/dist/pptx/i18n/translations-en-table-layout.d.ts +3 -0
- package/dist/pptx/i18n/translations-en-table-layout.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +2838 -2758
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/action-buttons.d.ts +2 -0
- package/dist/pptx/render/action-buttons.d.ts.map +1 -1
- package/dist/pptx/render/comment-navigation.d.ts +51 -0
- package/dist/pptx/render/comment-navigation.d.ts.map +1 -0
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts +61 -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 +61 -0
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +2 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/review-comment-commands.d.ts +42 -0
- package/dist/pptx/render/review-comment-commands.d.ts.map +1 -0
- 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 +17 -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/index.d.ts +2 -0
- package/dist/pptx/render/ribbon-galleries/index.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/shape-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-layout-commands.d.ts +7 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-commands.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-ops.d.ts +64 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-ops.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts +7 -3
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-text-direction-gallery.d.ts +3 -0
- package/dist/pptx/render/ribbon-galleries/table-text-direction-gallery.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/theme-colors-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/theme-fonts-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-families-objects.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-spec.d.ts +10 -6
- package/dist/pptx/render/ribbon-home-spec.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-review-commands.d.ts +7 -0
- package/dist/pptx/render/ribbon-review-commands.d.ts.map +1 -1
- package/dist/pptx/render/shape-quick-styles.d.ts +6 -0
- package/dist/pptx/render/shape-quick-styles.d.ts.map +1 -1
- package/dist/pptx/render/table-style-borders.d.ts.map +1 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts +7 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts.map +1 -1
- package/dist/pptx/render/table-style-scheme.d.ts +2 -0
- package/dist/pptx/render/table-style-scheme.d.ts.map +1 -1
- package/dist/pptx/render/table-style-theme-refs.d.ts +16 -0
- package/dist/pptx/render/table-style-theme-refs.d.ts.map +1 -0
- package/dist/pptx/render/table-style.d.ts +7 -1
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/render/theme-color-swatches.d.ts +1 -1
- package/dist/pptx/render/theme-color-swatches.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/web-components/ribbon-draw-view.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home-colour.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-view.d.ts.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/{presentation-preview-VIIU7E2S.js → presentation-preview-HVKJ3KJN.js} +1 -1
- package/dist/ribbon/auto-collapse.d.ts +8 -0
- package/dist/ribbon/auto-collapse.d.ts.map +1 -0
- package/dist/ribbon/group-overflow.d.ts +7 -0
- package/dist/ribbon/group-overflow.d.ts.map +1 -1
- package/dist/ribbon/overflow.d.ts +7 -0
- package/dist/ribbon/overflow.d.ts.map +1 -1
- package/dist/ribbon/ribbon-tabs.d.ts +5 -0
- package/dist/ribbon/ribbon-tabs.d.ts.map +1 -1
- package/dist/ribbon/scroll-more.d.ts +17 -0
- package/dist/ribbon/scroll-more.d.ts.map +1 -0
- package/dist/smartart.js +3 -3
- package/dist/teams/app/activity.d.ts +5 -0
- package/dist/teams/app/pinned-bar.d.ts +24 -0
- package/dist/teams/app/profile-menu.d.ts +18 -1
- package/dist/teams/app/teams-app.d.ts +8 -3
- package/dist/teams/app-rail.d.ts +3 -1
- package/dist/teams/avatar.d.ts +2 -2
- package/dist/teams/chat-list.d.ts +10 -2
- package/dist/teams.js +7 -7
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +7 -5
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/viewer-gesture-state.d.ts +54 -0
- package/dist/visio/viewer-options-categories.d.ts +8 -0
- package/dist/visio/viewer-options.d.ts +3 -7
- package/dist/visio/viewer-touch-gestures.d.ts +17 -0
- package/dist/visio/viewer-touch-hit.d.ts +3 -0
- package/dist/visio/viewer-touch-long-press.d.ts +13 -0
- package/dist/visio/viewer-touch-math.d.ts +44 -0
- package/dist/visio.js +319 -149
- package/dist/xlsx/backstage/index.d.ts +3 -0
- package/dist/xlsx/backstage/options-customize.d.ts +7 -0
- package/dist/xlsx/backstage/options-dialog.d.ts +13 -0
- package/dist/xlsx/ribbon/ribbon.d.ts +1 -1
- package/dist/xlsx/status-bar.d.ts +1 -1
- package/dist/xlsx.js +282 -172
- package/package.json +2 -2
- package/dist/teams/app/navigation-drawer.d.ts +0 -26
- package/dist/xlsx/backstage/pages-options.d.ts +0 -7
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { THEME_CSS, installOfficeUiTheme } from './chunk-
|
|
2
|
-
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-
|
|
1
|
+
import { THEME_CSS, installOfficeUiTheme } from './chunk-7E3HU7RL.js';
|
|
2
|
+
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-BFPHRWEB.js';
|
|
3
3
|
import { registerIcon, getIcon } from './chunk-M6GF5ED2.js';
|
|
4
|
-
import { initialsOf, definePresence } from './chunk-
|
|
5
|
-
import { definer, OfficeElement, controlStyles } from './chunk-
|
|
6
|
-
import {
|
|
4
|
+
import { initialsOf, definePresence } from './chunk-KNC2UEUR.js';
|
|
5
|
+
import { definer, OfficeElement, controlStyles } from './chunk-CWBSXK7P.js';
|
|
6
|
+
import { nothing, html, LitElement, unsafeCSS, svg } from 'lit';
|
|
7
7
|
import { repeat } from 'lit/directives/repeat.js';
|
|
8
8
|
import { live } from 'lit/directives/live.js';
|
|
9
|
-
import { MAX_ATTACHMENTS, detectContentKind, contentUrl, readContent, sortFiles, filterFiles, parseServerConfig, sanitizeChannelName, MAX_CHANNEL_NAME_CHARS, MAX_CHANNEL_TOPIC_CHARS, markdownBlocks, createTeamsClient, sanitizeAttachment, markdownInline } from 'ooxml-core/teams';
|
|
9
|
+
import { MAX_ATTACHMENTS, 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, markdownBlocks, createTeamsClient, sanitizeAttachment, markdownInline } from 'ooxml-core/teams';
|
|
10
10
|
import { keyed } from 'lit/directives/keyed.js';
|
|
11
11
|
|
|
12
12
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/reset.css?raw
|
|
@@ -43,7 +43,8 @@ function formatSize(bytes) {
|
|
|
43
43
|
return `${(bytes / 1048576).toFixed(1)} MB`;
|
|
44
44
|
}
|
|
45
45
|
var GLYPHS = {
|
|
46
|
-
|
|
46
|
+
back: "M12.5 4 6.5 10l6 6",
|
|
47
|
+
pin: "M7 3h6l-1 5 3 3H5l3-3ZM10 11v6",
|
|
47
48
|
send: "M3 10 17 3l-4 14-3-6Zm7 1 7-8",
|
|
48
49
|
paperclip: "M15 9.5l-5.5 5.5a3.5 3.5 0 0 1-5-5l6-6a2.3 2.3 0 0 1 3.3 3.3l-6 6a1.2 1.2 0 0 1-1.7-1.7L11 6",
|
|
49
50
|
smile: "M3 10a7 7 0 1 0 14 0 7 7 0 1 0-14 0M7.5 8v.5M12.5 8v.5M7 12c1.5 2 4.5 2 6 0",
|
|
@@ -73,7 +74,7 @@ function icon(name) {
|
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app-rail.css?raw
|
|
76
|
-
var app_rail_default = ":host {\n display: block;\n width: 5em;\n background: var(--office-teams-rail);\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nul {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--office-space-1);\n margin: 0;\n padding: var(--office-space-2) 0;\n list-style: none;\n}\nbutton {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--office-space-0);\n width: 4.4em;\n padding: var(--office-space-2) 0;\n border: 0;\n border-radius: var(--office-radius-md);\n background: transparent;\n color: var(--office-teams-text-subtle);\n}\nbutton:hover {\n background: var(--office-selected);\n}\nbutton[aria-current='page'] {\n color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\nbutton[aria-current='page']::before {\n content: '';\n position: absolute;\n inset-inline-start: calc(-1 * var(--office-space-1));\n inset-block: 20%;\n width: var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n}\n.glyph {\n position: relative;\n display: grid;\n place-items: center;\n font-size: 1.3em;\n}\n.label {\n font-size: var(--office-font-size-2xs);\n}\n:host([hide-labels]) .label {\n display: none;\n}\n.badge {\n position: absolute;\n inset-block-start: -0.4em;\n inset-inline-end: -0.9em;\n min-width: 1.5em;\n padding: 0 var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: var(--office-font-size-3xs);\n line-height: 1.6;\n text-align: center;\n}\n";
|
|
77
|
+
var app_rail_default = ":host {\n display: block;\n width: 5em;\n background: var(--office-teams-rail);\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nul {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--office-space-1);\n margin: 0;\n padding: var(--office-space-2) 0;\n list-style: none;\n}\nbutton {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--office-space-0);\n width: 4.4em;\n padding: var(--office-space-2) 0;\n border: 0;\n border-radius: var(--office-radius-md);\n background: transparent;\n color: var(--office-teams-text-subtle);\n}\nbutton:hover {\n background: var(--office-selected);\n}\nbutton[aria-current='page'] {\n color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\nbutton[aria-current='page']::before {\n content: '';\n position: absolute;\n inset-inline-start: calc(-1 * var(--office-space-1));\n inset-block: 20%;\n width: var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n}\n.glyph {\n position: relative;\n display: grid;\n place-items: center;\n font-size: 1.3em;\n}\n.label {\n font-size: var(--office-font-size-2xs);\n}\n:host([hide-labels]) .label {\n display: none;\n}\n.badge {\n position: absolute;\n inset-block-start: -0.4em;\n inset-inline-end: -0.9em;\n min-width: 1.5em;\n padding: 0 var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: var(--office-font-size-3xs);\n line-height: 1.6;\n text-align: center;\n}\n\n.short {\n display: none;\n}\n\n/* Compact shell: the rail becomes a bottom navigation bar with short labels. */\n@media (max-width: 56em) {\n :host {\n width: auto;\n padding-block-end: env(safe-area-inset-bottom, 0);\n padding-inline: env(safe-area-inset-left, 0) env(safe-area-inset-right, 0);\n border-inline-end: 0;\n border-block-start: var(--office-border-width) solid var(--office-teams-divider);\n }\n ul {\n flex-direction: row;\n justify-content: space-around;\n align-items: stretch;\n gap: 0;\n padding: var(--office-space-1) var(--office-space-1);\n }\n li {\n flex: 1 1 0;\n min-width: 0;\n }\n button {\n width: 100%;\n min-height: var(--office-touch-target, 44px);\n padding: var(--office-space-1) 0;\n justify-content: center;\n }\n button[aria-current='page']::before {\n inset-inline: 25%;\n inset-block: 0 auto;\n width: auto;\n height: var(--office-space-1);\n }\n .label.has-short {\n display: none;\n }\n .short {\n display: inline;\n font-size: var(--office-font-size-2xs);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n }\n}\n@media (max-width: 56em) and (max-height: 30em) {\n .label,\n .short {\n display: none;\n }\n button {\n min-height: 2.4em;\n }\n}\n";
|
|
77
78
|
|
|
78
79
|
// src/teams/app-rail.ts
|
|
79
80
|
var OfficeUiAppRail = class extends TeamsElement {
|
|
@@ -111,7 +112,8 @@ var OfficeUiAppRail = class extends TeamsElement {
|
|
|
111
112
|
${icon(item.icon)}
|
|
112
113
|
${item.badge ? html`<span class="badge">${item.badge > 99 ? "99+" : item.badge}</span>` : ""}
|
|
113
114
|
</span>
|
|
114
|
-
<span class
|
|
115
|
+
<span class=${item.shortLabel ? "label has-short" : "label"}>${item.label}</span>
|
|
116
|
+
${item.shortLabel ? html`<span class="short" aria-hidden="true">${item.shortLabel}</span>` : nothing}
|
|
115
117
|
</button>
|
|
116
118
|
</li>
|
|
117
119
|
`
|
|
@@ -123,12 +125,14 @@ var OfficeUiAppRail = class extends TeamsElement {
|
|
|
123
125
|
var defineAppRail = definer("office-ui-app-rail", () => OfficeUiAppRail);
|
|
124
126
|
|
|
125
127
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/avatar.css?raw
|
|
126
|
-
var avatar_default = ":host {\n --_size: 2.3em;\n position: relative;\n display: inline-block;\n width: var(--_size);\n height: var(--_size);\n flex: none;\n}\n:host([size='sm']) {\n --_size: 1.7em;\n}\n:host([size='lg']) {\n --_size: 3em;\n}\n:host([size='xl']) {\n --_size: 6em;\n}\n\n.face {\n display: grid;\n place-items: center;\n width: 100%;\n height: 100%;\n border-radius: var(--office-radius-full);\n color: var(--office-call-foreground);\n font-size: calc(var(--_size) * 0.38);\n font-weight: var(--office-font-weight-bold);\n user-select: none;\n}\n\n.presence {\n position: absolute;\n inset-inline-end: 0;\n inset-block-end: 0;\n width: 32%;\n height: 32%;\n min-width: 0.5em;\n min-height: 0.5em;\n border-radius: var(--office-radius-full);\n border: var(--office-border-width-thick) solid var(--office-background);\n background: var(--office-presence-offline);\n}\n.presence[data-presence='available'] {\n background: var(--office-presence-available);\n}\n.presence[data-presence='busy'] {\n background: var(--office-presence-busy);\n}\n.presence[data-presence='away'] {\n background: var(--office-presence-away);\n}\n";
|
|
128
|
+
var avatar_default = ":host {\n --_size: 2.3em;\n position: relative;\n display: inline-block;\n width: var(--_size);\n height: var(--_size);\n flex: none;\n}\n:host([size='sm']) {\n --_size: 1.7em;\n}\n:host([size='lg']) {\n --_size: 3em;\n}\n:host([size='xl']) {\n --_size: 6em;\n}\n\n.face {\n display: grid;\n place-items: center;\n width: 100%;\n height: 100%;\n border-radius: var(--office-radius-full);\n color: var(--office-call-foreground);\n font-size: calc(var(--_size) * 0.38);\n font-weight: var(--office-font-weight-bold);\n user-select: none;\n}\n\n.presence {\n position: absolute;\n inset-inline-end: 0;\n inset-block-end: 0;\n width: 32%;\n height: 32%;\n min-width: 0.5em;\n min-height: 0.5em;\n border-radius: var(--office-radius-full);\n border: var(--office-border-width-thick) solid var(--office-background);\n background: var(--office-presence-offline);\n}\n.presence[data-presence='available'] {\n background: var(--office-presence-available);\n}\n.presence[data-presence='busy'] {\n background: var(--office-presence-busy);\n}\n.presence[data-presence='away'] {\n background: var(--office-presence-away);\n}\n.presence[data-presence='dnd'] {\n background: var(--office-presence-busy);\n}\n.presence[data-presence='brb'] {\n background: var(--office-presence-away);\n}\n/* Do not disturb carries a white bar; Away and Be right back share the clock hands. */\n.presence[data-presence='dnd']::after,\n.presence[data-presence='away']::after,\n.presence[data-presence='brb']::after {\n content: '';\n position: absolute;\n inset: 0;\n margin: auto;\n background: var(--office-background);\n}\n.presence[data-presence='dnd']::after {\n width: 60%;\n height: 16%;\n border-radius: var(--office-radius-full);\n}\n.presence[data-presence='away']::after,\n.presence[data-presence='brb']::after {\n width: 14%;\n height: 50%;\n inset-block: 10% auto;\n border-radius: var(--office-radius-full);\n}\n/* Appear offline is a hollow grey ring. */\n.presence[data-presence='offline'] {\n background: var(--office-background);\n border-color: var(--office-presence-offline);\n box-shadow: inset 0 0 0 var(--office-border-width-thick) var(--office-presence-offline);\n}\n";
|
|
127
129
|
|
|
128
130
|
// src/teams/avatar.ts
|
|
129
131
|
var PRESENCE_LABEL = {
|
|
130
132
|
available: "Available",
|
|
131
133
|
busy: "Busy",
|
|
134
|
+
dnd: "Do not disturb",
|
|
135
|
+
brb: "Be right back",
|
|
132
136
|
away: "Away",
|
|
133
137
|
offline: "Offline"
|
|
134
138
|
};
|
|
@@ -329,7 +333,7 @@ var OfficeUiCallGrid = class extends TeamsElement {
|
|
|
329
333
|
var defineCallGrid = definer("office-ui-call-grid", () => OfficeUiCallGrid);
|
|
330
334
|
|
|
331
335
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/channel-list.css?raw
|
|
332
|
-
var channel_list_default = ":host {\n display: block;\n overflow: auto;\n}\n.team {\n display: flex;\n align-items: center;\n padding: var(--office-space-1) var(--office-space-2) var(--office-space-1) var(--office-space-1);\n}\n.toggle {\n display: flex;\n flex: 1;\n align-items: center;\n gap: var(--office-space-1);\n min-width: 0;\n padding: var(--office-space-2);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n font-weight: var(--office-font-weight-bold);\n text-align: start;\n}\n.toggle:hover,\n.add:hover {\n background: var(--office-selected);\n}\n.chevron {\n display: grid;\n transition: transform var(--office-duration-fast);\n}\n.chevron[data-open='true'] {\n transform: rotate(90deg);\n}\n.name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.add {\n display: grid;\n place-items: center;\n width: 2em;\n height: 2em;\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n color: var(--office-teams-text-subtle);\n}\nul {\n margin: 0;\n padding: 0 var(--office-space-2);\n list-style: none;\n}\nul[hidden] {\n display: none;\n}\n.row {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n width: 100%;\n padding: var(--office-space-2) var(--office-space-3) var(--office-space-2) var(--office-space-5);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n color: var(--office-teams-text-subtle);\n text-align: start;\n}\n.row:hover {\n background: var(--office-selected);\n}\n.row[aria-current='true'] {\n background: var(--office-teams-brand-subtle);\n color: var(--office-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.row[aria-current='true']::before {\n content: '';\n position: absolute;\n inset-inline-start: 0;\n inset-block: 20%;\n width: var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n}\n.row[data-unread='true'] {\n color: var(--office-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.live {\n display: grid;\n color: var(--office-call-live);\n}\n.count {\n min-width: 1.6em;\n padding: 0 var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: var(--office-font-size-xs);\n line-height: 1.6;\n text-align: center;\n}\n";
|
|
336
|
+
var channel_list_default = ":host {\n display: block;\n overflow: auto;\n}\n.team {\n display: flex;\n align-items: center;\n padding: var(--office-space-1) var(--office-space-2) var(--office-space-1) var(--office-space-1);\n}\n.toggle {\n display: flex;\n flex: 1;\n align-items: center;\n gap: var(--office-space-1);\n min-width: 0;\n padding: var(--office-space-2);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n font-weight: var(--office-font-weight-bold);\n text-align: start;\n}\n.toggle:hover,\n.add:hover {\n background: var(--office-selected);\n}\n.chevron {\n display: grid;\n transition: transform var(--office-duration-fast);\n}\n.chevron[data-open='true'] {\n transform: rotate(90deg);\n}\n.name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.add {\n display: grid;\n place-items: center;\n width: 2em;\n height: 2em;\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n color: var(--office-teams-text-subtle);\n}\nul {\n margin: 0;\n padding: 0 var(--office-space-2);\n list-style: none;\n}\nul[hidden] {\n display: none;\n}\n.row {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n width: 100%;\n padding: var(--office-space-2) var(--office-space-3) var(--office-space-2) var(--office-space-5);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n color: var(--office-teams-text-subtle);\n text-align: start;\n}\n.row:hover {\n background: var(--office-selected);\n}\n.row[aria-current='true'] {\n background: var(--office-teams-brand-subtle);\n color: var(--office-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.row[aria-current='true']::before {\n content: '';\n position: absolute;\n inset-inline-start: 0;\n inset-block: 20%;\n width: var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n}\n.row[data-unread='true'] {\n color: var(--office-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.live {\n display: grid;\n color: var(--office-call-live);\n}\n.count {\n min-width: 1.6em;\n padding: 0 var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: var(--office-font-size-xs);\n line-height: 1.6;\n text-align: center;\n}\n\n@media (pointer: coarse) {\n .toggle,\n .add,\n .row {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n";
|
|
333
337
|
|
|
334
338
|
// src/teams/channel-list.ts
|
|
335
339
|
var OfficeUiChannelList = class extends TeamsElement {
|
|
@@ -395,7 +399,7 @@ var OfficeUiChannelList = class extends TeamsElement {
|
|
|
395
399
|
var defineChannelList = definer("office-ui-channel-list", () => OfficeUiChannelList);
|
|
396
400
|
|
|
397
401
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/chat-composer.css?raw
|
|
398
|
-
var chat_composer_default = ":host {\n display: block;\n min-width: 0;\n flex: none;\n padding: 0 var(--office-space-5) var(--office-space-4);\n}\n.typing {\n min-height: 1.4em;\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-xs);\n}\n.box {\n position: relative;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-block-end: var(--office-border-width-thick) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-field-background);\n}\n.box:focus-within {\n border-block-end-color: var(--office-teams-brand);\n}\n.banner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--office-space-1) var(--office-space-3);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n background: var(--office-teams-panel);\n font-size: var(--office-font-size-sm);\n}\ntextarea {\n display: block;\n width: 100%;\n min-height: 3.2em;\n max-height: 12em;\n padding: var(--office-space-3);\n border: 0;\n outline: 0;\n resize: none;\n background: transparent;\n color: inherit;\n font: inherit;\n overflow-y: auto;\n line-height: 1.5;\n}\n.bar {\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n padding: 0 var(--office-space-2) var(--office-space-2);\n}\n.spacer {\n flex: 1;\n}\n.bar button,\n.banner button,\n.pending button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1);\n min-width: 2.2em;\n height: 2.2em;\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n color: var(--office-teams-text-subtle);\n}\n.bar button:hover:not(:disabled),\n.banner button:hover {\n background: var(--office-selected);\n color: var(--office-foreground);\n}\n.bar button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.bar .send:not(:disabled) {\n color: var(--office-teams-brand);\n}\n.pending {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-1);\n margin: 0;\n padding: 0 var(--office-space-3);\n list-style: none;\n}\n.pending button {\n padding: 0 var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n background: var(--office-teams-panel);\n font-size: var(--office-font-size-sm);\n color: var(--office-foreground);\n}\n.emoji {\n position: relative;\n}\n.picker {\n position: absolute;\n inset-block-end: calc(100% + var(--office-space-1));\n inset-inline-start: 0;\n z-index: 2;\n display: grid;\n grid-template-columns: repeat(5, 1fr);\n gap: var(--office-space-0);\n padding: 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-popover);\n box-shadow: var(--office-shadow-teams);\n}\n.picker button {\n font-size: 1.3em;\n}\n\ntextarea:focus-visible {\n outline: none;\n}\n.box:focus-within {\n border-color: var(--office-teams-brand);\n}\n.pending {\n max-height: 7em;\n overflow-y: auto;\n padding-block-end: var(--office-space-2);\n}\n.pending li {\n min-width: 0;\n max-width: 100%;\n}\n.pending button {\n max-width: 100%;\n height: auto;\n min-height: 2.4em;\n}\n.file-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n}\n@media (max-width: 600px) {\n :host {\n padding: 0 var(--office-space-2) var(--office-space-2);\n }\n textarea {\n font-size: var(--office-font-size-touch);\n min-height: 3em;\n }\n .bar button {\n min-width: var(--office-touch-target);\n height: var(--office-touch-target);\n }\n}\n";
|
|
402
|
+
var chat_composer_default = ":host {\n display: block;\n min-width: 0;\n flex: none;\n padding: 0 var(--office-space-5) var(--office-space-4);\n}\n.typing {\n min-height: 1.4em;\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-xs);\n}\n.box {\n position: relative;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-block-end: var(--office-border-width-thick) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-field-background);\n}\n.box:focus-within {\n border-block-end-color: var(--office-teams-brand);\n}\n.banner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--office-space-1) var(--office-space-3);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n background: var(--office-teams-panel);\n font-size: var(--office-font-size-sm);\n}\ntextarea {\n display: block;\n width: 100%;\n min-height: 3.2em;\n max-height: 12em;\n padding: var(--office-space-3);\n border: 0;\n outline: 0;\n resize: none;\n background: transparent;\n color: inherit;\n font: inherit;\n overflow-y: auto;\n line-height: 1.5;\n}\n.bar {\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n padding: 0 var(--office-space-2) var(--office-space-2);\n}\n.spacer {\n flex: 1;\n}\n.bar button,\n.banner button,\n.pending button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1);\n min-width: 2.2em;\n height: 2.2em;\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n color: var(--office-teams-text-subtle);\n}\n.bar button:hover:not(:disabled),\n.banner button:hover {\n background: var(--office-selected);\n color: var(--office-foreground);\n}\n.bar button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.bar .send:not(:disabled) {\n color: var(--office-teams-brand);\n}\n.pending {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-1);\n margin: 0;\n padding: 0 var(--office-space-3);\n list-style: none;\n}\n.pending button {\n padding: 0 var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n background: var(--office-teams-panel);\n font-size: var(--office-font-size-sm);\n color: var(--office-foreground);\n}\n.emoji {\n position: relative;\n}\n.picker {\n position: absolute;\n inset-block-end: calc(100% + var(--office-space-1));\n inset-inline-start: 0;\n z-index: 2;\n display: grid;\n grid-template-columns: repeat(5, 1fr);\n gap: var(--office-space-0);\n padding: 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-popover);\n box-shadow: var(--office-shadow-teams);\n}\n.picker button {\n font-size: 1.3em;\n}\n\ntextarea:focus-visible {\n outline: none;\n}\n.box:focus-within {\n border-color: var(--office-teams-brand);\n}\n.pending {\n max-height: 7em;\n overflow-y: auto;\n padding-block-end: var(--office-space-2);\n}\n.pending li {\n min-width: 0;\n max-width: 100%;\n}\n.pending button {\n max-width: 100%;\n height: auto;\n min-height: 2.4em;\n}\n.file-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n}\n@media (max-width: 600px) {\n :host {\n padding: 0 var(--office-space-2) var(--office-space-2);\n }\n textarea {\n font-size: var(--office-font-size-touch);\n min-height: 3em;\n }\n}\n@media (pointer: coarse) {\n .bar button,\n .banner button,\n .pending button,\n .picker button {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n";
|
|
399
403
|
var EMOJI = [
|
|
400
404
|
"\u{1F600}",
|
|
401
405
|
"\u{1F604}",
|
|
@@ -668,7 +672,7 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
668
672
|
var defineChatComposer = definer("office-ui-chat-composer", () => OfficeUiChatComposer);
|
|
669
673
|
|
|
670
674
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/chat-list.css?raw
|
|
671
|
-
var chat_list_default = ":host {\n display: block;\n min-height: 0;\n overflow: auto;\n padding: var(--office-space-2) var(--office-space-5);\n}\n.thread-link {\n align-self: flex-start;\n font: inherit;\n color: var(--office-foreground);\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2);\n cursor: pointer;\n}\n.empty {\n margin: var(--office-space-6) 0;\n color: var(--office-teams-text-subtle);\n text-align: center;\n}\n\n.day {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n margin: var(--office-space-4) 0 var(--office-space-2);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-xs);\n}\n.day::before,\n.day::after {\n content: '';\n flex: 1;\n height: var(--office-border-width);\n background: var(--office-teams-divider);\n}\n\n.msg {\n position: relative;\n display: grid;\n grid-template-columns: 2.3em minmax(0, 1fr);\n column-gap: var(--office-space-3);\n padding: var(--office-space-0) 0;\n}\n.msg[data-grouped='false'] {\n margin-top: var(--office-teams-message-gap, var(--office-space-3));\n}\n.gutter {\n padding-top: var(--office-space-1);\n}\nheader {\n display: flex;\n align-items: baseline;\n gap: var(--office-space-2);\n margin-bottom: var(--office-space-0);\n}\n.author {\n font-weight: var(--office-font-weight-bold);\n}\ntime,\n.edited,\n.file-size {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-xs);\n}\n\n.bubble {\n display: inline-block;\n max-width: min(100%, 44em);\n padding: var(--office-teams-message-padding, var(--office-space-2) var(--office-space-3));\n border-radius: var(--office-radius-md);\n background: var(--office-teams-bubble);\n line-height: var(--office-line-height);\n overflow-wrap: anywhere;\n}\n.text {\n white-space: pre-wrap;\n}\n.msg[data-own='true'] .bubble {\n background: var(--office-teams-bubble-own);\n}\n.deleted {\n color: var(--office-teams-text-subtle);\n font-style: italic;\n}\nblockquote {\n margin: 0 0 var(--office-space-1);\n padding-inline-start: var(--office-space-2);\n border-inline-start: var(--office-border-width-thick) solid var(--office-teams-brand);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n white-space: normal;\n}\nblockquote strong {\n display: block;\n color: var(--office-foreground);\n}\n\n.files {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-2);\n margin-top: var(--office-space-2);\n white-space: normal;\n}\n.file {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-width: 14em;\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 text-align: start;\n}\n.file:hover {\n border-color: var(--office-teams-brand);\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'] {\n background: var(--office-file-docx);\n}\n.badge[data-kind='xlsx'] {\n background: var(--office-file-xlsx);\n}\n.badge[data-kind='pptx'] {\n background: var(--office-file-pptx);\n}\n.badge[data-kind='vsdx'] {\n background: var(--office-file-vsdx);\n}\n.meta {\n display: grid;\n}\n\n.reactions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-1);\n margin-top: var(--office-space-1);\n}\n.pill {\n display: inline-flex;\n gap: var(--office-space-1);\n padding: 0 var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-full);\n background: var(--office-background);\n font-size: var(--office-font-size-sm);\n}\n.pill[aria-pressed='true'] {\n border-color: var(--office-teams-brand);\n background: var(--office-teams-brand-subtle);\n}\n\n.toolbar {\n position: absolute;\n inset-block-start: calc(-1 * var(--office-space-3));\n inset-inline-end: 0;\n display: none;\n gap: var(--office-space-0);\n padding: var(--office-space-0);\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.msg:hover .toolbar,\n.msg:focus-within .toolbar {\n display: flex;\n}\n.toolbar button {\n display: grid;\n place-items: center;\n min-width: 2em;\n height: 2em;\n border: 0;\n border-radius: var(--office-radius-sm);\n background: transparent;\n}\n.toolbar button:hover {\n background: var(--office-selected);\n}\n";
|
|
675
|
+
var chat_list_default = ":host {\n display: block;\n min-height: 0;\n overflow: auto;\n padding: var(--office-space-2) var(--office-space-5);\n}\n.thread-link {\n align-self: flex-start;\n font: inherit;\n color: var(--office-foreground);\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2);\n cursor: pointer;\n}\n.empty {\n margin: var(--office-space-6) 0;\n color: var(--office-teams-text-subtle);\n text-align: center;\n}\n\n.day {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n margin: var(--office-space-4) 0 var(--office-space-2);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-xs);\n}\n.day::before,\n.day::after {\n content: '';\n flex: 1;\n height: var(--office-border-width);\n background: var(--office-teams-divider);\n}\n\n.msg {\n position: relative;\n display: grid;\n grid-template-columns: 2.3em minmax(0, 1fr);\n column-gap: var(--office-space-3);\n padding: var(--office-space-0) 0;\n}\n.msg[data-grouped='false'] {\n margin-top: var(--office-teams-message-gap, var(--office-space-3));\n}\n.gutter {\n padding-top: var(--office-space-1);\n}\nheader {\n display: flex;\n align-items: baseline;\n gap: var(--office-space-2);\n margin-bottom: var(--office-space-0);\n}\n.author {\n font-weight: var(--office-font-weight-bold);\n}\ntime,\n.edited,\n.file-size {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-xs);\n}\n\n.bubble {\n display: inline-block;\n max-width: min(100%, 44em);\n padding: var(--office-teams-message-padding, var(--office-space-2) var(--office-space-3));\n border-radius: var(--office-radius-md);\n background: var(--office-teams-bubble);\n line-height: var(--office-line-height);\n overflow-wrap: anywhere;\n}\n.text {\n white-space: pre-wrap;\n}\n.msg[data-own='true'] .bubble {\n background: var(--office-teams-bubble-own);\n}\n.deleted {\n color: var(--office-teams-text-subtle);\n font-style: italic;\n}\nblockquote {\n margin: 0 0 var(--office-space-1);\n padding-inline-start: var(--office-space-2);\n border-inline-start: var(--office-border-width-thick) solid var(--office-teams-brand);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n white-space: normal;\n}\nblockquote strong {\n display: block;\n color: var(--office-foreground);\n}\n\n.files {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-2);\n margin-top: var(--office-space-2);\n white-space: normal;\n}\n.file {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-width: 14em;\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 text-align: start;\n}\n.file:hover {\n border-color: var(--office-teams-brand);\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'] {\n background: var(--office-file-docx);\n}\n.badge[data-kind='xlsx'] {\n background: var(--office-file-xlsx);\n}\n.badge[data-kind='pptx'] {\n background: var(--office-file-pptx);\n}\n.badge[data-kind='vsdx'] {\n background: var(--office-file-vsdx);\n}\n.meta {\n display: grid;\n}\n\n.reactions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-1);\n margin-top: var(--office-space-1);\n}\n.pill {\n display: inline-flex;\n gap: var(--office-space-1);\n padding: 0 var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-full);\n background: var(--office-background);\n font-size: var(--office-font-size-sm);\n}\n.pill[aria-pressed='true'] {\n border-color: var(--office-teams-brand);\n background: var(--office-teams-brand-subtle);\n}\n\n.toolbar {\n position: absolute;\n inset-block-start: calc(-1 * var(--office-space-3));\n inset-inline-end: 0;\n display: none;\n gap: var(--office-space-0);\n padding: var(--office-space-0);\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.msg:hover .toolbar,\n.msg:focus-within .toolbar {\n display: flex;\n}\n.toolbar button {\n display: grid;\n place-items: center;\n min-width: 2em;\n height: 2em;\n border: 0;\n border-radius: var(--office-radius-sm);\n background: transparent;\n}\n.toolbar button:hover {\n background: var(--office-selected);\n}\n\n.msg:focus {\n outline: none;\n}\n.pin-mark {\n display: inline-flex;\n align-items: center;\n gap: var(--office-space-1);\n color: var(--office-teams-brand);\n font-size: var(--office-font-size-xs);\n}\n.pin-mark svg {\n width: 1em;\n height: 1em;\n}\n@media (pointer: coarse) {\n .toolbar button {\n min-width: var(--office-touch-target, 44px);\n height: var(--office-touch-target, 44px);\n }\n}\n";
|
|
672
676
|
|
|
673
677
|
// src/teams/chat-list.ts
|
|
674
678
|
var QUICK_REACTIONS = ["\u{1F44D}", "\u2764\uFE0F", "\u{1F602}", "\u{1F62E}", "\u{1F622}", "\u{1F389}"];
|
|
@@ -685,7 +689,8 @@ var OfficeUiChatList = class extends TeamsElement {
|
|
|
685
689
|
static properties = {
|
|
686
690
|
messages: { attribute: false },
|
|
687
691
|
selfId: { type: String, attribute: "self-id" },
|
|
688
|
-
replyCounts: { attribute: false }
|
|
692
|
+
replyCounts: { attribute: false },
|
|
693
|
+
pinnedIds: { attribute: false }
|
|
689
694
|
};
|
|
690
695
|
stickToBottom = true;
|
|
691
696
|
constructor() {
|
|
@@ -693,6 +698,7 @@ var OfficeUiChatList = class extends TeamsElement {
|
|
|
693
698
|
this.messages = [];
|
|
694
699
|
this.selfId = "";
|
|
695
700
|
this.replyCounts = {};
|
|
701
|
+
this.pinnedIds = [];
|
|
696
702
|
}
|
|
697
703
|
connectedCallback() {
|
|
698
704
|
super.connectedCallback();
|
|
@@ -726,6 +732,7 @@ var OfficeUiChatList = class extends TeamsElement {
|
|
|
726
732
|
return html`
|
|
727
733
|
<article
|
|
728
734
|
class="msg"
|
|
735
|
+
tabindex="-1"
|
|
729
736
|
data-message-id=${m.id}
|
|
730
737
|
data-own=${String(own)}
|
|
731
738
|
data-grouped=${String(grouped)}
|
|
@@ -738,6 +745,7 @@ var OfficeUiChatList = class extends TeamsElement {
|
|
|
738
745
|
<span class="author">${m.authorName}</span>
|
|
739
746
|
<time>${formatTime(m.ts)}</time>
|
|
740
747
|
</header>`}
|
|
748
|
+
${this.pinMark(m)}
|
|
741
749
|
<div class="bubble">
|
|
742
750
|
${parent ? html`<blockquote>
|
|
743
751
|
<strong>${parent.authorName}</strong
|
|
@@ -788,6 +796,7 @@ var OfficeUiChatList = class extends TeamsElement {
|
|
|
788
796
|
>
|
|
789
797
|
${icon("reply")}
|
|
790
798
|
</button>
|
|
799
|
+
${this.pinButton(m)}
|
|
791
800
|
${own ? html`<button
|
|
792
801
|
type="button"
|
|
793
802
|
title="Edit"
|
|
@@ -807,6 +816,22 @@ var OfficeUiChatList = class extends TeamsElement {
|
|
|
807
816
|
</div>
|
|
808
817
|
`;
|
|
809
818
|
}
|
|
819
|
+
pinMark(m) {
|
|
820
|
+
return !m.deleted && this.pinnedIds.includes(m.id) ? html`<span class="pin-mark">${icon("pin")} Pinned</span>` : nothing;
|
|
821
|
+
}
|
|
822
|
+
pinButton(m) {
|
|
823
|
+
const pinned = this.pinnedIds.includes(m.id);
|
|
824
|
+
const label = pinned ? "Unpin" : "Pin";
|
|
825
|
+
return html`<button
|
|
826
|
+
type="button"
|
|
827
|
+
title=${label}
|
|
828
|
+
aria-label=${label}
|
|
829
|
+
aria-pressed=${String(pinned)}
|
|
830
|
+
@click=${() => this.fire(pinned ? "office-chat-unpin" : "office-chat-pin", { messageId: m.id })}
|
|
831
|
+
>
|
|
832
|
+
${icon("pin")}
|
|
833
|
+
</button>`;
|
|
834
|
+
}
|
|
810
835
|
files(files) {
|
|
811
836
|
return html`<div class="files">
|
|
812
837
|
${files.map(
|
|
@@ -1227,7 +1252,7 @@ var TeamsContentPreview = class extends LitElement {
|
|
|
1227
1252
|
if (kind === "xlsx") (await import('./xlsx.js')).defineXlsxEditor();
|
|
1228
1253
|
if (kind === "vsdx") (await import('./visio.js')).registerVisioViewer();
|
|
1229
1254
|
if (kind === "pptx")
|
|
1230
|
-
(await import('./presentation-preview-
|
|
1255
|
+
(await import('./presentation-preview-HVKJ3KJN.js')).defineTeamsPresentationPreview();
|
|
1231
1256
|
if (request.signal.aborted) return;
|
|
1232
1257
|
this.native = kind;
|
|
1233
1258
|
await this.updateComplete;
|
|
@@ -2439,7 +2464,7 @@ function loadConfig() {
|
|
|
2439
2464
|
var saveConfig = (config) => safeStorage.setItem("teams:config", JSON.stringify(config));
|
|
2440
2465
|
|
|
2441
2466
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/teams-app.css?raw
|
|
2442
|
-
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:host([data-office-theme='dark']) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n}\n:host([data-chat-density='compact']) {\n --office-teams-message-gap: var(--office-space-1);\n --office-teams-message-padding: var(--office-space-1) var(--office-space-2);\n}\n@media (prefers-color-scheme: dark) {\n :host(:not([data-office-theme='light'])) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n }\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.navigation-toggle {\n display: none;\n padding: var(--office-space-2);\n border: 0;\n border-radius: var(--office-radius-md);\n background: transparent;\n}\n.navigation-toggle:hover {\n background: var(--office-selected);\n}\n.navigation-toggle svg {\n width: 1.3em;\n height: 1.3em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\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 office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head svg {\n width: 1em;\n height: 1em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* ---- body ------------------------------------------------------------------------------- */\n.body {\n display: grid;\n grid-template-columns: auto 19em minmax(0, 1fr);\n min-height: 0;\n grid-template-rows: minmax(0, 1fr);\n}\n.body > office-ui-app-rail {\n grid-column: 1;\n grid-row: 1;\n}\n.body > .side {\n grid-column: 2;\n grid-row: 1;\n}\n.body > .main {\n grid-column: 3;\n grid-row: 1;\n}\n.body > teams-settings {\n grid-column: 2 / -1;\n grid-row: 1;\n min-width: 0;\n min-height: 0;\n z-index: 1;\n}\n.body > teams-settings:not([open]) {\n display: none;\n}\n.body > [inert] {\n visibility: hidden;\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.popout-view {\n display: flex;\n height: 100%;\n min-height: 0;\n}\n.popout-view teams-content-preview {\n flex: 1;\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 flex-wrap: wrap;\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 > button:not(.meet),\n.thread-head 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}\n.channel-head > button:hover:not(:disabled),\n.thread-head button:hover {\n background: var(--office-selected);\n}\n.channel-head > button:disabled {\n opacity: 0.5;\n cursor: default;\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/* ---- 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.conversation-grid {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n flex: 1;\n min-height: 0;\n}\n.conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr) minmax(18em, 0.8fr);\n}\n.conversation-main,\n.thread-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n}\n.tab-conversation teams-channel-tab {\n flex: 1;\n min-height: 0;\n}\n.thread-pane {\n border-inline-start: var(--office-border-width) solid var(--office-teams-divider);\n}\n.thread-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n}\n.thread-head h2 {\n margin: 0;\n font-size: 1em;\n}\n.followed-threads {\n overflow: auto;\n padding: var(--office-space-4);\n}\n.message-transfer {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n background: var(--office-teams-panel);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.message-transfer span {\n flex: 1;\n overflow-wrap: anywhere;\n}\n.message-transfer button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads ul {\n list-style: none;\n padding: 0;\n}\n.followed-threads fieldset {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-4);\n padding: var(--office-space-3);\n margin-block: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.followed-threads li {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding-block: var(--office-space-3);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.followed-threads button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads button:hover {\n background: var(--office-selected);\n}\n.followed-threads li button:first-child {\n display: grid;\n gap: var(--office-space-2);\n flex: 1;\n text-align: start;\n min-width: 0;\n overflow-wrap: anywhere;\n border-color: transparent;\n}\n.followed-threads li[data-unread='true'] button:first-child span {\n font-weight: var(--office-font-weight-bold);\n}\n@media (max-width: 56em) {\n .conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr);\n }\n .conversation-grid[data-thread='true'] .conversation-main {\n display: none;\n }\n}\n.tabs {\n overflow-x: auto;\n min-width: 0;\n flex: 1 1 16em;\n}\n\n@media (max-width: 56.25em) {\n .navigation-toggle {\n display: inline-flex;\n }\n .brand > .logo,\n .brand > span:last-child {\n display: none;\n }\n .channel-head .topic,\n .channel-head .people {\n display: none;\n }\n .channel-head .tabs {\n flex-basis: 100%;\n }\n .body {\n grid-template-columns: auto minmax(0, 1fr);\n }\n .body > .main {\n grid-column: 2;\n }\n .side {\n display: none;\n }\n .topbar {\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n}\n\n/* An application host can own the single suite-level account control. */\n:host([host-profile]) teams-profile-menu {\n display: none;\n}\n";
|
|
2467
|
+
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:host([data-office-theme='dark']) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n}\n:host([data-chat-density='compact']) {\n --office-teams-message-gap: var(--office-space-1);\n --office-teams-message-padding: var(--office-space-1) var(--office-space-2);\n}\n@media (prefers-color-scheme: dark) {\n :host(:not([data-office-theme='light'])) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n }\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 office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head svg {\n width: 1em;\n height: 1em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* ---- body ------------------------------------------------------------------------------- */\n.body {\n display: grid;\n grid-template-columns: auto 19em minmax(0, 1fr);\n min-height: 0;\n grid-template-rows: minmax(0, 1fr);\n}\n.body > office-ui-app-rail {\n grid-column: 1;\n grid-row: 1;\n}\n.body > .side {\n grid-column: 2;\n grid-row: 1;\n}\n.body > .main {\n grid-column: 3;\n grid-row: 1;\n}\n.body > teams-settings {\n grid-column: 2 / -1;\n grid-row: 1;\n min-width: 0;\n min-height: 0;\n z-index: 1;\n}\n.body > teams-settings:not([open]) {\n display: none;\n}\n.body > [inert] {\n visibility: hidden;\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.popout-view {\n display: flex;\n height: 100%;\n min-height: 0;\n}\n.popout-view teams-content-preview {\n flex: 1;\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 flex-wrap: wrap;\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 > button:not(.meet),\n.thread-head 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}\n.channel-head > button:hover:not(:disabled),\n.thread-head button:hover {\n background: var(--office-selected);\n}\n.channel-head > button:disabled {\n opacity: 0.5;\n cursor: default;\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/* ---- 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.conversation-grid {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n flex: 1;\n min-height: 0;\n}\n.conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr) minmax(18em, 0.8fr);\n}\n.conversation-main,\n.thread-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n}\n.tab-conversation teams-channel-tab {\n flex: 1;\n min-height: 0;\n}\n.thread-pane {\n border-inline-start: var(--office-border-width) solid var(--office-teams-divider);\n}\n.thread-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n}\n.thread-head h2 {\n margin: 0;\n font-size: 1em;\n}\n.followed-threads {\n overflow: auto;\n padding: var(--office-space-4);\n}\n.message-transfer {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n background: var(--office-teams-panel);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.message-transfer span {\n flex: 1;\n overflow-wrap: anywhere;\n}\n.message-transfer button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads ul {\n list-style: none;\n padding: 0;\n}\n.followed-threads fieldset {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-4);\n padding: var(--office-space-3);\n margin-block: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.followed-threads li {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding-block: var(--office-space-3);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.followed-threads button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads button:hover {\n background: var(--office-selected);\n}\n.followed-threads li button:first-child {\n display: grid;\n gap: var(--office-space-2);\n flex: 1;\n text-align: start;\n min-width: 0;\n overflow-wrap: anywhere;\n border-color: transparent;\n}\n.followed-threads li[data-unread='true'] button:first-child span {\n font-weight: var(--office-font-weight-bold);\n}\n@media (max-width: 56em) {\n .conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr);\n }\n .conversation-grid[data-thread='true'] .conversation-main {\n display: none;\n }\n}\n.tabs {\n overflow-x: auto;\n min-width: 0;\n flex: 1 1 16em;\n}\n\n.channel-head > .back {\n display: none;\n}\n\n/* ---- compact shell ---------------------------------------------------------------------- */\n/* Below 56em the app rail is a bottom bar, the channel list is its own full-screen view and the\n conversation (or any other content) fills the width with a back button to the list. */\n@media (max-width: 56em) {\n .brand {\n display: none;\n }\n .topbar {\n grid-template-columns: minmax(0, 1fr) auto;\n gap: var(--office-space-2);\n }\n .search {\n width: 100%;\n }\n .channel-head {\n gap: var(--office-space-2);\n padding-inline: var(--office-space-3);\n }\n .channel-head > .back {\n display: inline-flex;\n border-color: transparent;\n }\n .channel-head .topic,\n .channel-head .people {\n display: none;\n }\n .channel-head .tabs {\n flex-basis: 100%;\n order: 1;\n }\n .body {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(0, 1fr) auto;\n }\n .body > office-ui-app-rail {\n grid-column: 1;\n grid-row: 2;\n }\n .body > .side,\n .body > .main,\n .body > teams-settings {\n grid-column: 1;\n grid-row: 1;\n }\n .side {\n border-inline-end: 0;\n }\n .shell[data-mobile-view='list'] .main,\n .shell[data-mobile-view='content'] .side {\n display: none;\n }\n}\n/* Phone landscape has little height: keep the chrome to one thin row each. */\n@media (max-width: 56em) and (max-height: 30em) {\n .topbar {\n padding-block: var(--office-space-1);\n }\n .channel-head {\n flex-wrap: nowrap;\n padding-block: var(--office-space-1);\n }\n .channel-head .tabs {\n flex: 1 1 0;\n order: 0;\n }\n .channel-head h1 {\n font-size: var(--office-font-size);\n }\n}\n/* Touch: every control in the shell reaches the minimum hit target. */\n@media (pointer: coarse) {\n .channel-head > button,\n .meet,\n .tabs button,\n .join,\n .thread-head button,\n .callbar button {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n\n/* An application host can own the single suite-level account control. */\n:host([host-profile]) teams-profile-menu {\n display: none;\n}\n";
|
|
2443
2468
|
function threadPane(state, client, openFile, close) {
|
|
2444
2469
|
const thread = state.thread;
|
|
2445
2470
|
if (!thread) return nothing;
|
|
@@ -2456,7 +2481,10 @@ function threadPane(state, client, openFile, close) {
|
|
|
2456
2481
|
</header>
|
|
2457
2482
|
<office-ui-chat-list
|
|
2458
2483
|
.messages=${[thread.root, ...thread.replies]}
|
|
2484
|
+
.pinnedIds=${state.pinned.map((p) => p.message.id)}
|
|
2459
2485
|
self-id=${state.user.id}
|
|
2486
|
+
@office-chat-pin=${(e) => client.pinMessage(e.detail.messageId)}
|
|
2487
|
+
@office-chat-unpin=${(e) => client.unpinMessage(e.detail.messageId)}
|
|
2460
2488
|
@office-chat-react=${(e) => client.toggleReaction(e.detail.messageId, e.detail.emoji)}
|
|
2461
2489
|
@office-chat-reply=${(e) => client.startReply(e.detail.messageId)}
|
|
2462
2490
|
@office-chat-edit=${(e) => client.startEdit(e.detail.messageId)}
|
|
@@ -2622,17 +2650,37 @@ function messageTransfers(state, client) {
|
|
|
2622
2650
|
}
|
|
2623
2651
|
|
|
2624
2652
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/profile-menu.css?raw
|
|
2625
|
-
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 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}\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}\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";
|
|
2653
|
+
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";
|
|
2626
2654
|
|
|
2627
2655
|
// src/teams/app/profile-menu.ts
|
|
2628
|
-
var
|
|
2656
|
+
var idleLabel = (minutes) => minutes === 0 ? "Never" : `${minutes} minutes`;
|
|
2657
|
+
var untilLabel = (at) => {
|
|
2658
|
+
if (at === null) return "";
|
|
2659
|
+
const d = new Date(at);
|
|
2660
|
+
const today = (/* @__PURE__ */ new Date()).toDateString();
|
|
2661
|
+
if (d.getHours() === 0 && d.getMinutes() === 0) {
|
|
2662
|
+
const lastDay = new Date(at - 1);
|
|
2663
|
+
return lastDay.toDateString() === today ? "Until end of today" : `Until end of ${lastDay.toLocaleDateString([], { weekday: "long" })}`;
|
|
2664
|
+
}
|
|
2665
|
+
const time = d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
|
|
2666
|
+
return d.toDateString() === today ? `Until ${time}` : `Until ${d.toLocaleDateString([], { weekday: "long" })} ${time}`;
|
|
2667
|
+
};
|
|
2629
2668
|
var TeamsProfileMenu = class extends LitElement {
|
|
2630
2669
|
static styles = unsafeCSS(profile_menu_default);
|
|
2631
|
-
static properties = {
|
|
2670
|
+
static properties = {
|
|
2671
|
+
state: { attribute: false },
|
|
2672
|
+
open: { state: true },
|
|
2673
|
+
draft: { state: true },
|
|
2674
|
+
resetAfter: { state: true },
|
|
2675
|
+
clearAfter: { state: true }
|
|
2676
|
+
};
|
|
2632
2677
|
constructor() {
|
|
2633
2678
|
super();
|
|
2634
2679
|
this.state = null;
|
|
2635
2680
|
this.open = false;
|
|
2681
|
+
this.draft = null;
|
|
2682
|
+
this.resetAfter = "never";
|
|
2683
|
+
this.clearAfter = "never";
|
|
2636
2684
|
}
|
|
2637
2685
|
willUpdate(changed) {
|
|
2638
2686
|
const old = changed.get("state");
|
|
@@ -2644,9 +2692,27 @@ var TeamsProfileMenu = class extends LitElement {
|
|
|
2644
2692
|
if (toggleAnchoredPopover(panel, this.renderRoot.querySelector("button")))
|
|
2645
2693
|
panel.querySelector("select")?.focus();
|
|
2646
2694
|
}
|
|
2695
|
+
fire(name, detail) {
|
|
2696
|
+
this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));
|
|
2697
|
+
}
|
|
2698
|
+
saveMessage() {
|
|
2699
|
+
this.fire("teams-profile-message", {
|
|
2700
|
+
message: this.draft ?? this.state?.presence.message ?? "",
|
|
2701
|
+
duration: this.clearAfter
|
|
2702
|
+
});
|
|
2703
|
+
this.draft = null;
|
|
2704
|
+
}
|
|
2705
|
+
durationOptions(selected) {
|
|
2706
|
+
return STATUS_DURATIONS.map(
|
|
2707
|
+
(value) => html`<option value=${value} ?selected=${selected === value}>
|
|
2708
|
+
${STATUS_DURATION_LABELS[value]}
|
|
2709
|
+
</option>`
|
|
2710
|
+
);
|
|
2711
|
+
}
|
|
2647
2712
|
render() {
|
|
2648
2713
|
const state = this.state;
|
|
2649
2714
|
if (!state) return nothing;
|
|
2715
|
+
const { presence } = state;
|
|
2650
2716
|
return html`<button
|
|
2651
2717
|
type="button"
|
|
2652
2718
|
class="profile"
|
|
@@ -2686,25 +2752,91 @@ var TeamsProfileMenu = class extends LitElement {
|
|
|
2686
2752
|
name=${state.user.name}
|
|
2687
2753
|
seed=${state.user.id}
|
|
2688
2754
|
presence=${state.availability}
|
|
2689
|
-
></office-ui-avatar
|
|
2690
|
-
|
|
2755
|
+
></office-ui-avatar>
|
|
2756
|
+
<div class="who">
|
|
2757
|
+
<strong>${state.user.name}</strong>
|
|
2758
|
+
<span class="status-line"
|
|
2759
|
+
>${PRESENCE_LABELS[state.availability]}${state.presence.idle && state.presence.status === "available" ? " (idle)" : ""}</span
|
|
2760
|
+
>
|
|
2761
|
+
${presence.message ? html`<span class="message">${presence.message}</span>` : nothing}
|
|
2762
|
+
</div>
|
|
2691
2763
|
</div>
|
|
2692
2764
|
<label
|
|
2693
2765
|
>Availability<select
|
|
2694
|
-
.value=${
|
|
2766
|
+
.value=${presence.status}
|
|
2695
2767
|
@change=${(event) => {
|
|
2696
2768
|
const availability = event.target.value;
|
|
2697
|
-
if (
|
|
2698
|
-
|
|
2699
|
-
new CustomEvent("teams-profile-status", {
|
|
2700
|
-
detail: { availability },
|
|
2701
|
-
bubbles: true,
|
|
2702
|
-
composed: true
|
|
2703
|
-
})
|
|
2704
|
-
);
|
|
2769
|
+
if (!isPresenceStatus(availability)) return;
|
|
2770
|
+
this.fire("teams-profile-status", { availability, duration: this.resetAfter });
|
|
2705
2771
|
}}
|
|
2706
2772
|
>
|
|
2707
|
-
${
|
|
2773
|
+
${PRESENCE_STATUSES.map((value) => html`<option value=${value} ?selected=${presence.status === value}>${PRESENCE_LABELS[value]}</option>`)}
|
|
2774
|
+
</select></label
|
|
2775
|
+
>
|
|
2776
|
+
<label
|
|
2777
|
+
>Reset status after<select
|
|
2778
|
+
name="status-duration"
|
|
2779
|
+
@change=${(event) => {
|
|
2780
|
+
const duration = event.target.value;
|
|
2781
|
+
if (!isStatusDuration(duration)) return;
|
|
2782
|
+
this.resetAfter = duration;
|
|
2783
|
+
this.fire("teams-profile-status", { availability: presence.status, duration });
|
|
2784
|
+
}}
|
|
2785
|
+
>
|
|
2786
|
+
${this.durationOptions(this.resetAfter)}
|
|
2787
|
+
</select>
|
|
2788
|
+
<span class="hint">${untilLabel(presence.statusExpiresAt)}</span></label
|
|
2789
|
+
>
|
|
2790
|
+
<label
|
|
2791
|
+
>Status message<input
|
|
2792
|
+
type="text"
|
|
2793
|
+
name="message"
|
|
2794
|
+
maxlength=${MAX_STATUS_MESSAGE_CHARS}
|
|
2795
|
+
placeholder="What's your status message?"
|
|
2796
|
+
.value=${this.draft ?? presence.message}
|
|
2797
|
+
@input=${(event) => this.draft = event.target.value}
|
|
2798
|
+
@keydown=${(event) => {
|
|
2799
|
+
if (event.key !== "Enter") return;
|
|
2800
|
+
event.preventDefault();
|
|
2801
|
+
this.saveMessage();
|
|
2802
|
+
}}
|
|
2803
|
+
/>
|
|
2804
|
+
<span class="hint">${untilLabel(presence.messageExpiresAt)}</span></label
|
|
2805
|
+
>
|
|
2806
|
+
<label
|
|
2807
|
+
>Clear status message after<select
|
|
2808
|
+
name="message-duration"
|
|
2809
|
+
@change=${(event) => {
|
|
2810
|
+
const duration = event.target.value;
|
|
2811
|
+
if (isStatusDuration(duration)) this.clearAfter = duration;
|
|
2812
|
+
}}
|
|
2813
|
+
>
|
|
2814
|
+
${this.durationOptions(this.clearAfter)}
|
|
2815
|
+
</select></label
|
|
2816
|
+
>
|
|
2817
|
+
<div class="actions">
|
|
2818
|
+
<button type="button" @click=${this.saveMessage}>Save message</button>
|
|
2819
|
+
<button
|
|
2820
|
+
type="button"
|
|
2821
|
+
?disabled=${!presence.message && !this.draft}
|
|
2822
|
+
@click=${() => {
|
|
2823
|
+
this.draft = "";
|
|
2824
|
+
this.saveMessage();
|
|
2825
|
+
}}
|
|
2826
|
+
>
|
|
2827
|
+
Clear message
|
|
2828
|
+
</button>
|
|
2829
|
+
</div>
|
|
2830
|
+
<label
|
|
2831
|
+
>Show me as away after<select
|
|
2832
|
+
name="idle"
|
|
2833
|
+
@change=${(event) => {
|
|
2834
|
+
const minutes = Number(event.target.value);
|
|
2835
|
+
if (IDLE_MINUTE_CHOICES.includes(minutes))
|
|
2836
|
+
this.fire("teams-profile-idle", { minutes });
|
|
2837
|
+
}}
|
|
2838
|
+
>
|
|
2839
|
+
${IDLE_MINUTE_CHOICES.map((minutes) => html`<option value=${minutes} ?selected=${presence.idleMinutes === minutes}>${idleLabel(minutes)}</option>`)}
|
|
2708
2840
|
</select></label
|
|
2709
2841
|
>
|
|
2710
2842
|
<p class="connection">
|
|
@@ -2718,6 +2850,103 @@ function defineTeamsProfileMenu() {
|
|
|
2718
2850
|
customElements.define("teams-profile-menu", TeamsProfileMenu);
|
|
2719
2851
|
}
|
|
2720
2852
|
|
|
2853
|
+
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/pinned-bar.css?raw
|
|
2854
|
+
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";
|
|
2855
|
+
|
|
2856
|
+
// src/teams/app/pinned-bar.ts
|
|
2857
|
+
var SNIPPET = 140;
|
|
2858
|
+
var snippet = (m) => {
|
|
2859
|
+
const text = m.text.replace(/\s+/gu, " ").trim();
|
|
2860
|
+
if (text) return text.length > SNIPPET ? `${text.slice(0, SNIPPET)}...` : text;
|
|
2861
|
+
return m.attachments[0]?.name ?? "Attachment";
|
|
2862
|
+
};
|
|
2863
|
+
var TeamsPinnedBar = class extends LitElement {
|
|
2864
|
+
static styles = unsafeCSS(pinned_bar_default);
|
|
2865
|
+
static properties = { pinned: { attribute: false }, expanded: { state: true } };
|
|
2866
|
+
constructor() {
|
|
2867
|
+
super();
|
|
2868
|
+
this.pinned = [];
|
|
2869
|
+
this.expanded = false;
|
|
2870
|
+
}
|
|
2871
|
+
emit(name, messageId) {
|
|
2872
|
+
this.dispatchEvent(
|
|
2873
|
+
new CustomEvent(name, { detail: { messageId }, bubbles: true, composed: true })
|
|
2874
|
+
);
|
|
2875
|
+
}
|
|
2876
|
+
render() {
|
|
2877
|
+
const [latest] = this.pinned;
|
|
2878
|
+
if (!latest) return nothing;
|
|
2879
|
+
return html`
|
|
2880
|
+
<section aria-label="Pinned messages">
|
|
2881
|
+
<div class="summary">
|
|
2882
|
+
<button
|
|
2883
|
+
type="button"
|
|
2884
|
+
class="latest"
|
|
2885
|
+
@click=${() => this.emit("teams-pinned-open", latest.message.id)}
|
|
2886
|
+
>
|
|
2887
|
+
<span class="mark">${icon("pin")}</span>
|
|
2888
|
+
<strong>${latest.message.authorName}</strong>
|
|
2889
|
+
<span class="text">${snippet(latest.message)}</span>
|
|
2890
|
+
</button>
|
|
2891
|
+
<button
|
|
2892
|
+
type="button"
|
|
2893
|
+
class="count"
|
|
2894
|
+
aria-expanded=${String(this.expanded)}
|
|
2895
|
+
aria-controls="pins"
|
|
2896
|
+
@click=${() => this.expanded = !this.expanded}
|
|
2897
|
+
>
|
|
2898
|
+
${this.pinned.length} pinned
|
|
2899
|
+
</button>
|
|
2900
|
+
</div>
|
|
2901
|
+
${this.expanded ? html`<ul id="pins">
|
|
2902
|
+
${this.pinned.map(
|
|
2903
|
+
(pin) => html`<li>
|
|
2904
|
+
<button
|
|
2905
|
+
type="button"
|
|
2906
|
+
class="jump"
|
|
2907
|
+
@click=${() => this.emit("teams-pinned-open", pin.message.id)}
|
|
2908
|
+
>
|
|
2909
|
+
<strong>${pin.message.authorName}</strong>
|
|
2910
|
+
<span class="text">${snippet(pin.message)}</span>
|
|
2911
|
+
<span class="by">Pinned by ${pin.pinnedByName}</span>
|
|
2912
|
+
</button>
|
|
2913
|
+
<button
|
|
2914
|
+
type="button"
|
|
2915
|
+
class="unpin"
|
|
2916
|
+
aria-label=${`Unpin message from ${pin.message.authorName}`}
|
|
2917
|
+
title="Unpin"
|
|
2918
|
+
@click=${() => this.emit("teams-pinned-unpin", pin.message.id)}
|
|
2919
|
+
>
|
|
2920
|
+
Unpin
|
|
2921
|
+
</button>
|
|
2922
|
+
</li>`
|
|
2923
|
+
)}
|
|
2924
|
+
</ul>` : nothing}
|
|
2925
|
+
</section>
|
|
2926
|
+
`;
|
|
2927
|
+
}
|
|
2928
|
+
};
|
|
2929
|
+
function defineTeamsPinnedBar() {
|
|
2930
|
+
if (!customElements.get("teams-pinned-bar"))
|
|
2931
|
+
customElements.define("teams-pinned-bar", TeamsPinnedBar);
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
// src/teams/app/activity.ts
|
|
2935
|
+
var ACTIVITY_EVENTS = ["pointerdown", "pointermove", "keydown", "wheel", "touchstart"];
|
|
2936
|
+
function watchActivity(target, onActivity, throttleMs = 1e3, now = Date.now) {
|
|
2937
|
+
let last = Number.NEGATIVE_INFINITY;
|
|
2938
|
+
const handler = () => {
|
|
2939
|
+
const t = now();
|
|
2940
|
+
if (t - last < throttleMs) return;
|
|
2941
|
+
last = t;
|
|
2942
|
+
onActivity();
|
|
2943
|
+
};
|
|
2944
|
+
for (const name of ACTIVITY_EVENTS) target.addEventListener(name, handler, { passive: true });
|
|
2945
|
+
return () => {
|
|
2946
|
+
for (const name of ACTIVITY_EVENTS) target.removeEventListener(name, handler);
|
|
2947
|
+
};
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2721
2950
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/add-tab-dialog.css?raw
|
|
2722
2951
|
var add_tab_dialog_default = ":host {\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n}\ndialog {\n box-sizing: border-box;\n width: min(54em, 94vw);\n max-height: 90vh;\n padding: 0;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-lg);\n color: inherit;\n background: var(--office-popover);\n box-shadow: var(--office-shadow-teams);\n}\ndialog::backdrop {\n background: var(--office-overlay);\n}\nheader,\n.app-heading,\nfooter {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n}\nheader {\n justify-content: space-between;\n padding: var(--office-space-4) var(--office-space-5);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n}\nh1,\nh2 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n}\nsection,\nform {\n padding: var(--office-space-5);\n}\nform {\n display: grid;\n gap: var(--office-space-3);\n}\n.apps {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(10em, 1fr));\n gap: var(--office-space-3);\n}\nbutton,\ninput {\n font: inherit;\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 padding: var(--office-space-2) var(--office-space-3);\n}\nbutton {\n cursor: pointer;\n}\nbutton:hover:not(:disabled) {\n background: var(--office-selected);\n}\nbutton:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.app {\n display: grid;\n justify-items: start;\n text-align: start;\n gap: var(--office-space-2);\n padding: var(--office-space-4);\n}\n.app-heading h2 {\n flex: 1;\n}\n.badge {\n display: grid;\n place-items: center;\n width: 2.6em;\n height: 2.6em;\n border-radius: var(--office-radius-md);\n color: var(--office-call-foreground);\n background: var(--office-file-other);\n font-weight: var(--office-font-weight-bold);\n}\n.badge[data-kind='docx'] {\n background: var(--office-file-docx);\n}\n.badge[data-kind='xlsx'] {\n background: var(--office-file-xlsx);\n}\n.badge[data-kind='pptx'] {\n background: var(--office-file-pptx);\n}\n.badge[data-kind='vsdx'] {\n background: var(--office-file-vsdx);\n}\nlabel {\n display: grid;\n gap: var(--office-space-2);\n}\ninput {\n min-width: 0;\n}\nsmall,\n.hint,\nsection > p {\n color: var(--office-teams-text-subtle);\n line-height: 1.5;\n}\nsmall {\n display: block;\n}\n.files {\n margin: 0;\n padding: var(--office-space-2);\n max-height: 18em;\n overflow: auto;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius);\n}\n.file {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n border-radius: var(--office-radius);\n cursor: pointer;\n}\n.file:has(input:checked) {\n background: var(--office-teams-brand-subtle);\n}\n.file strong {\n overflow-wrap: anywhere;\n}\n[role='alert'] {\n color: var(--office-danger);\n}\nfooter {\n justify-content: flex-end;\n}\n.post-choice {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n}\nbutton.primary {\n color: var(--office-teams-brand-foreground);\n border-color: var(--office-teams-brand);\n background: var(--office-teams-brand);\n}\nbutton.primary:hover:not(:disabled) {\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";
|
|
2723
2952
|
|
|
@@ -2964,129 +3193,6 @@ function defineTeamsAddTabDialog() {
|
|
|
2964
3193
|
customElements.define("teams-add-tab-dialog", TeamsAddTabDialog);
|
|
2965
3194
|
}
|
|
2966
3195
|
|
|
2967
|
-
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/navigation-drawer.css?raw
|
|
2968
|
-
var navigation_drawer_default = ":host {\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n}\ndialog {\n box-sizing: border-box;\n inset: 0 auto 0 0;\n margin: 0;\n width: min(24em, 92vw);\n max-width: 92vw;\n height: 100dvh;\n max-height: 100dvh;\n padding: 0;\n border: 0;\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n background: var(--office-teams-panel);\n color: inherit;\n box-shadow: var(--office-shadow-teams);\n}\ndialog[open] {\n display: flex;\n flex-direction: column;\n}\ndialog::backdrop {\n background: var(--office-overlay);\n}\nheader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-3);\n padding: var(--office-space-3) var(--office-space-4);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nh2 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n}\nbutton {\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 font: inherit;\n background: var(--office-background);\n color: inherit;\n cursor: pointer;\n}\nbutton:hover {\n background: var(--office-selected);\n}\nbutton:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\nnav {\n flex: 1;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n}\n";
|
|
2969
|
-
|
|
2970
|
-
// src/dialog/focus.ts
|
|
2971
|
-
var MODAL_FOCUSABLE_SELECTOR = [
|
|
2972
|
-
"a[href]",
|
|
2973
|
-
"button:not([disabled])",
|
|
2974
|
-
'input:not([disabled]):not([type="hidden"])',
|
|
2975
|
-
"select:not([disabled])",
|
|
2976
|
-
"textarea:not([disabled])",
|
|
2977
|
-
'[contenteditable="true"]',
|
|
2978
|
-
'[tabindex]:not([tabindex="-1"])'
|
|
2979
|
-
].join(",");
|
|
2980
|
-
function isAvailable(element) {
|
|
2981
|
-
if (element.hidden || element.getAttribute("aria-hidden") === "true") {
|
|
2982
|
-
return false;
|
|
2983
|
-
}
|
|
2984
|
-
const style = element.ownerDocument.defaultView?.getComputedStyle(element);
|
|
2985
|
-
return style?.display !== "none" && style?.visibility !== "hidden";
|
|
2986
|
-
}
|
|
2987
|
-
function focusableElements(root, found = []) {
|
|
2988
|
-
for (const child of Array.from(root.children)) {
|
|
2989
|
-
if (child instanceof HTMLElement) {
|
|
2990
|
-
if (!isAvailable(child)) continue;
|
|
2991
|
-
if (child.matches(MODAL_FOCUSABLE_SELECTOR) && isAvailable(child)) {
|
|
2992
|
-
found.push(child);
|
|
2993
|
-
}
|
|
2994
|
-
if (child.shadowRoot && isAvailable(child)) {
|
|
2995
|
-
focusableElements(child.shadowRoot, found);
|
|
2996
|
-
}
|
|
2997
|
-
}
|
|
2998
|
-
focusableElements(child, found);
|
|
2999
|
-
}
|
|
3000
|
-
return found;
|
|
3001
|
-
}
|
|
3002
|
-
function deepActiveElement(doc) {
|
|
3003
|
-
let active = doc.activeElement;
|
|
3004
|
-
while (active?.shadowRoot?.activeElement) {
|
|
3005
|
-
active = active.shadowRoot.activeElement;
|
|
3006
|
-
}
|
|
3007
|
-
return active;
|
|
3008
|
-
}
|
|
3009
|
-
function modalFocusableElements(panel) {
|
|
3010
|
-
return focusableElements(panel);
|
|
3011
|
-
}
|
|
3012
|
-
function modalActiveElement(doc) {
|
|
3013
|
-
return deepActiveElement(doc);
|
|
3014
|
-
}
|
|
3015
|
-
|
|
3016
|
-
// src/teams/app/navigation-drawer.ts
|
|
3017
|
-
var TeamsNavigationDrawer = class extends LitElement {
|
|
3018
|
-
static styles = unsafeCSS(navigation_drawer_default);
|
|
3019
|
-
static properties = {
|
|
3020
|
-
open: { type: Boolean, reflect: true },
|
|
3021
|
-
heading: { type: String }
|
|
3022
|
-
};
|
|
3023
|
-
compact;
|
|
3024
|
-
resized = () => {
|
|
3025
|
-
if (this.open && !this.compact?.matches) this.close();
|
|
3026
|
-
};
|
|
3027
|
-
constructor() {
|
|
3028
|
-
super();
|
|
3029
|
-
this.open = false;
|
|
3030
|
-
this.heading = "Teams and channels";
|
|
3031
|
-
this.addEventListener("keydown", (event) => this.trapTab(event));
|
|
3032
|
-
}
|
|
3033
|
-
connectedCallback() {
|
|
3034
|
-
super.connectedCallback();
|
|
3035
|
-
this.compact = globalThis.matchMedia?.("(max-width: 56.25em)");
|
|
3036
|
-
this.compact?.addEventListener("change", this.resized);
|
|
3037
|
-
}
|
|
3038
|
-
disconnectedCallback() {
|
|
3039
|
-
this.compact?.removeEventListener("change", this.resized);
|
|
3040
|
-
super.disconnectedCallback();
|
|
3041
|
-
}
|
|
3042
|
-
updated() {
|
|
3043
|
-
const dialog = this.renderRoot.querySelector("dialog");
|
|
3044
|
-
if (this.open && !dialog.open) dialog.showModal();
|
|
3045
|
-
else if (!this.open && dialog.open) dialog.close();
|
|
3046
|
-
}
|
|
3047
|
-
trapTab(event) {
|
|
3048
|
-
if (!this.open || event.key !== "Tab") return;
|
|
3049
|
-
const close = this.renderRoot.querySelector("button");
|
|
3050
|
-
const stops = [close, ...modalFocusableElements(this)];
|
|
3051
|
-
const current = modalActiveElement(this.ownerDocument);
|
|
3052
|
-
const index = stops.findIndex((element) => element === current);
|
|
3053
|
-
if (index < 0 || (event.shiftKey ? index === 0 : index === stops.length - 1)) {
|
|
3054
|
-
event.preventDefault();
|
|
3055
|
-
stops[event.shiftKey ? stops.length - 1 : 0]?.focus();
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
close() {
|
|
3059
|
-
this.dispatchEvent(
|
|
3060
|
-
new CustomEvent("teams-navigation-close", { bubbles: true, composed: true })
|
|
3061
|
-
);
|
|
3062
|
-
}
|
|
3063
|
-
render() {
|
|
3064
|
-
return html`<dialog
|
|
3065
|
-
aria-label="Workspace navigation"
|
|
3066
|
-
@click=${(event) => {
|
|
3067
|
-
const dialog = event.currentTarget;
|
|
3068
|
-
const rect = dialog.getBoundingClientRect();
|
|
3069
|
-
if (event.target === dialog && (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom))
|
|
3070
|
-
this.close();
|
|
3071
|
-
}}
|
|
3072
|
-
@cancel=${(event) => {
|
|
3073
|
-
event.preventDefault();
|
|
3074
|
-
this.close();
|
|
3075
|
-
}}
|
|
3076
|
-
>
|
|
3077
|
-
<header>
|
|
3078
|
-
<h2>${this.heading}</h2>
|
|
3079
|
-
<button type="button" aria-label="Close navigation" @click=${this.close}>×</button>
|
|
3080
|
-
</header>
|
|
3081
|
-
<nav aria-label="Workspace channels and calls"><slot></slot></nav>
|
|
3082
|
-
</dialog>`;
|
|
3083
|
-
}
|
|
3084
|
-
};
|
|
3085
|
-
function defineTeamsNavigationDrawer(registry = globalThis.customElements) {
|
|
3086
|
-
if (registry && !registry.get("teams-navigation-drawer"))
|
|
3087
|
-
registry.define("teams-navigation-drawer", TeamsNavigationDrawer);
|
|
3088
|
-
}
|
|
3089
|
-
|
|
3090
3196
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/create-channel-dialog.css?raw
|
|
3091
3197
|
var create_channel_dialog_default = ":host {\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n}\ndialog {\n box-sizing: border-box;\n width: min(40em, 94vw);\n max-height: 90dvh;\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}\nheader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-3);\n padding: var(--office-space-4) var(--office-space-5);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nh2 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n}\nform {\n display: grid;\n gap: var(--office-space-3);\n padding: var(--office-space-5);\n}\nlabel {\n display: grid;\n gap: var(--office-space-2);\n font-weight: var(--office-font-weight-bold);\n}\ninput,\ntextarea {\n min-width: 0;\n width: 100%;\n box-sizing: border-box;\n padding: var(--office-space-3);\n font: inherit;\n font-weight: normal;\n color: inherit;\n background: var(--office-field-background);\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius-md);\n}\ntextarea {\n min-height: 6em;\n resize: vertical;\n}\np,\nsmall {\n margin: 0;\n color: var(--office-teams-text-subtle);\n line-height: 1.5;\n}\n.issue {\n color: var(--office-danger);\n}\nfooter {\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:hover {\n background: var(--office-selected);\n}\nbutton.primary {\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n border-color: transparent;\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";
|
|
3092
3198
|
|
|
@@ -3200,7 +3306,7 @@ var RAIL = [
|
|
|
3200
3306
|
{ id: "teams", label: "Teams", icon: "users" },
|
|
3201
3307
|
{ id: "calls", label: "Calls", icon: "phone" },
|
|
3202
3308
|
{ id: "files", label: "Files", icon: "folder" },
|
|
3203
|
-
{ id: "followed", label: "Followed threads", icon: "chat" },
|
|
3309
|
+
{ id: "followed", label: "Followed threads", shortLabel: "Threads", icon: "chat" },
|
|
3204
3310
|
{ id: "drafts", label: "Drafts", icon: "chat" }
|
|
3205
3311
|
];
|
|
3206
3312
|
var TeamsApp = class extends LitElement {
|
|
@@ -3222,7 +3328,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3222
3328
|
panel: { state: true },
|
|
3223
3329
|
meeting: { state: true },
|
|
3224
3330
|
settingsOpen: { state: true },
|
|
3225
|
-
|
|
3331
|
+
mobileView: { state: true },
|
|
3226
3332
|
toast: { state: true },
|
|
3227
3333
|
identity: { state: true },
|
|
3228
3334
|
followedUnreadOnly: { state: true },
|
|
@@ -3233,6 +3339,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3233
3339
|
};
|
|
3234
3340
|
teams = new TeamsController(this, (text) => this.notify(text));
|
|
3235
3341
|
toastTimer;
|
|
3342
|
+
stopActivity;
|
|
3236
3343
|
openRequest = 0;
|
|
3237
3344
|
retainedTab;
|
|
3238
3345
|
themeStorageKey = "";
|
|
@@ -3261,7 +3368,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3261
3368
|
this.panel = "";
|
|
3262
3369
|
this.meeting = false;
|
|
3263
3370
|
this.settingsOpen = false;
|
|
3264
|
-
this.
|
|
3371
|
+
this.mobileView = "conversation";
|
|
3265
3372
|
this.toast = "";
|
|
3266
3373
|
this.identity = null;
|
|
3267
3374
|
this.followedUnreadOnly = false;
|
|
@@ -3284,9 +3391,10 @@ var TeamsApp = class extends LitElement {
|
|
|
3284
3391
|
defineTeamsChannelTab();
|
|
3285
3392
|
defineTeamsFilesPanel();
|
|
3286
3393
|
defineTeamsProfileMenu();
|
|
3394
|
+
defineTeamsPinnedBar();
|
|
3287
3395
|
defineTeamsAddTabDialog();
|
|
3288
|
-
defineTeamsNavigationDrawer();
|
|
3289
3396
|
defineTeamsCreateChannelDialog();
|
|
3397
|
+
this.stopActivity = watchActivity(this.ownerDocument, () => this.teams.client?.noteActivity());
|
|
3290
3398
|
super.connectedCallback();
|
|
3291
3399
|
}
|
|
3292
3400
|
// ---- lifecycle --------------------------------------------------------------------------
|
|
@@ -3315,7 +3423,6 @@ var TeamsApp = class extends LitElement {
|
|
|
3315
3423
|
this.tab = "posts";
|
|
3316
3424
|
this.addingTab = false;
|
|
3317
3425
|
this.creatingChannel = false;
|
|
3318
|
-
this.navigationOpen = false;
|
|
3319
3426
|
this.settingsOpen = false;
|
|
3320
3427
|
this.openRequest++;
|
|
3321
3428
|
const named = this.userName ? { id: this.userId || loadIdentity()?.id || crypto.randomUUID(), name: this.userName } : this.identity ?? loadIdentity();
|
|
@@ -3423,6 +3530,8 @@ var TeamsApp = class extends LitElement {
|
|
|
3423
3530
|
this.openRequest++;
|
|
3424
3531
|
this.preview = null;
|
|
3425
3532
|
clearTimeout(this.toastTimer);
|
|
3533
|
+
this.stopActivity?.();
|
|
3534
|
+
this.stopActivity = void 0;
|
|
3426
3535
|
super.disconnectedCallback();
|
|
3427
3536
|
}
|
|
3428
3537
|
createChannel() {
|
|
@@ -3436,7 +3545,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3436
3545
|
this.tab = "posts";
|
|
3437
3546
|
this.rail = "teams";
|
|
3438
3547
|
this.meeting = false;
|
|
3439
|
-
|
|
3548
|
+
this.mobileView = "conversation";
|
|
3440
3549
|
void this.focusCreatedChannel();
|
|
3441
3550
|
return true;
|
|
3442
3551
|
}
|
|
@@ -3465,7 +3574,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3465
3574
|
startMeeting(channelId) {
|
|
3466
3575
|
if (!this.closePreview()) return;
|
|
3467
3576
|
void this.teams.client?.openCall(channelId);
|
|
3468
|
-
|
|
3577
|
+
this.mobileView = "conversation";
|
|
3469
3578
|
this.meeting = true;
|
|
3470
3579
|
this.rail = "teams";
|
|
3471
3580
|
}
|
|
@@ -3479,26 +3588,10 @@ var TeamsApp = class extends LitElement {
|
|
|
3479
3588
|
this.meeting = false;
|
|
3480
3589
|
this.tab = "posts";
|
|
3481
3590
|
this.rail = "teams";
|
|
3482
|
-
|
|
3591
|
+
this.mobileView = "conversation";
|
|
3483
3592
|
return true;
|
|
3484
3593
|
}
|
|
3485
|
-
async closeNavigation(navigated = false) {
|
|
3486
|
-
if (!this.navigationOpen) return;
|
|
3487
|
-
this.navigationOpen = false;
|
|
3488
|
-
await this.updateComplete;
|
|
3489
|
-
const drawer = this.renderRoot.querySelector("teams-navigation-drawer");
|
|
3490
|
-
await drawer?.updateComplete;
|
|
3491
|
-
if (this.navigationOpen || !this.isConnected) return;
|
|
3492
|
-
const trigger = this.renderRoot.querySelector("[data-open-navigation]");
|
|
3493
|
-
const heading = this.renderRoot.querySelector("main h1") ?? this.renderRoot.querySelector("main");
|
|
3494
|
-
if (!navigated && trigger?.getClientRects().length) trigger.focus();
|
|
3495
|
-
else if (heading) {
|
|
3496
|
-
heading.tabIndex = -1;
|
|
3497
|
-
heading.focus();
|
|
3498
|
-
}
|
|
3499
|
-
}
|
|
3500
3594
|
askSettings() {
|
|
3501
|
-
this.navigationOpen = false;
|
|
3502
3595
|
this.settingsOpen = true;
|
|
3503
3596
|
}
|
|
3504
3597
|
async closeSettings() {
|
|
@@ -3511,6 +3604,11 @@ var TeamsApp = class extends LitElement {
|
|
|
3511
3604
|
if (this.theme === "system") this.removeAttribute("data-office-theme");
|
|
3512
3605
|
else this.setAttribute("data-office-theme", this.theme);
|
|
3513
3606
|
}
|
|
3607
|
+
/** Which screen the compact shell shows: the channel or call list, or the content itself. */
|
|
3608
|
+
mobileScreen(s) {
|
|
3609
|
+
const listed = this.rail === "teams" || this.rail === "calls";
|
|
3610
|
+
return listed && this.mobileView === "list" && !(this.meeting && s.call) ? "list" : "content";
|
|
3611
|
+
}
|
|
3514
3612
|
// ---- template ---------------------------------------------------------------------------
|
|
3515
3613
|
render() {
|
|
3516
3614
|
if (this.popoutRequested)
|
|
@@ -3525,6 +3623,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3525
3623
|
return html`
|
|
3526
3624
|
<div
|
|
3527
3625
|
class="shell"
|
|
3626
|
+
data-mobile-view=${this.mobileScreen(s)}
|
|
3528
3627
|
@office-chat-open-tab=${(event) => {
|
|
3529
3628
|
if (this.teams.state?.tabs.some((entry) => entry.id === event.detail.tabId))
|
|
3530
3629
|
this.selectTab(event.detail.tabId);
|
|
@@ -3542,6 +3641,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3542
3641
|
this.settingsOpen = false;
|
|
3543
3642
|
this.rail = e.detail.id;
|
|
3544
3643
|
this.meeting = false;
|
|
3644
|
+
this.mobileView = "list";
|
|
3545
3645
|
}}
|
|
3546
3646
|
></office-ui-app-rail>
|
|
3547
3647
|
<aside class="side" ?inert=${this.settingsOpen}>${this.sidebar(s)}</aside>
|
|
@@ -3608,13 +3708,6 @@ var TeamsApp = class extends LitElement {
|
|
|
3608
3708
|
.create=${(name, description) => this.commitChannel(name, description, this.client)}
|
|
3609
3709
|
@teams-create-channel-close=${() => this.creatingChannel = false}
|
|
3610
3710
|
></teams-create-channel-dialog>
|
|
3611
|
-
<teams-navigation-drawer
|
|
3612
|
-
.heading=${this.rail === "calls" ? "Calls" : "Teams and channels"}
|
|
3613
|
-
?open=${this.navigationOpen}
|
|
3614
|
-
@teams-navigation-close=${() => void this.closeNavigation()}
|
|
3615
|
-
>
|
|
3616
|
-
${this.navigationOpen ? this.sidebar(s) : nothing}
|
|
3617
|
-
</teams-navigation-drawer>
|
|
3618
3711
|
${this.toast ? html`<div class="toast" role="status">${this.toast}</div>` : nothing}
|
|
3619
3712
|
|
|
3620
3713
|
<teams-add-tab-dialog
|
|
@@ -3673,21 +3766,7 @@ var TeamsApp = class extends LitElement {
|
|
|
3673
3766
|
topbar(s) {
|
|
3674
3767
|
return html`
|
|
3675
3768
|
<header class="topbar">
|
|
3676
|
-
<div class="brand">
|
|
3677
|
-
<button
|
|
3678
|
-
type="button"
|
|
3679
|
-
class="navigation-toggle"
|
|
3680
|
-
data-open-navigation
|
|
3681
|
-
aria-label="Open navigation"
|
|
3682
|
-
title="Open navigation"
|
|
3683
|
-
aria-haspopup="dialog"
|
|
3684
|
-
aria-expanded=${String(this.navigationOpen)}
|
|
3685
|
-
@click=${() => this.navigationOpen = true}
|
|
3686
|
-
>
|
|
3687
|
-
${icon("navigation")}
|
|
3688
|
-
</button>
|
|
3689
|
-
<span class="logo">T</span><span>Teams</span>
|
|
3690
|
-
</div>
|
|
3769
|
+
<div class="brand"><span class="logo">T</span><span>Teams</span></div>
|
|
3691
3770
|
<div class="search">
|
|
3692
3771
|
<input
|
|
3693
3772
|
type="search"
|
|
@@ -3730,9 +3809,18 @@ var TeamsApp = class extends LitElement {
|
|
|
3730
3809
|
<teams-profile-menu
|
|
3731
3810
|
.state=${s}
|
|
3732
3811
|
@teams-profile-status=${(event) => {
|
|
3733
|
-
|
|
3734
|
-
|
|
3812
|
+
const { availability, duration } = event.detail;
|
|
3813
|
+
if (isPresenceStatus(availability))
|
|
3814
|
+
this.teams.client?.setAvailability(
|
|
3815
|
+
availability,
|
|
3816
|
+
isStatusDuration(duration) ? duration : "never"
|
|
3817
|
+
);
|
|
3735
3818
|
}}
|
|
3819
|
+
@teams-profile-message=${(event) => this.teams.client?.setStatusMessage(
|
|
3820
|
+
String(event.detail.message ?? ""),
|
|
3821
|
+
isStatusDuration(event.detail.duration) ? event.detail.duration : "never"
|
|
3822
|
+
)}
|
|
3823
|
+
@teams-profile-idle=${(event) => this.teams.client?.setIdleMinutes(Number(event.detail.minutes))}
|
|
3736
3824
|
></teams-profile-menu>
|
|
3737
3825
|
</div>
|
|
3738
3826
|
</header>
|
|
@@ -3818,6 +3906,15 @@ var TeamsApp = class extends LitElement {
|
|
|
3818
3906
|
const activeTab = sharedTab ?? (this.retainedTab?.id === this.tab && this.retainedTab.channelId === s.selectedChannelId ? this.retainedTab : void 0);
|
|
3819
3907
|
return html`
|
|
3820
3908
|
${compact ? nothing : html`<header class="channel-head">
|
|
3909
|
+
<button
|
|
3910
|
+
type="button"
|
|
3911
|
+
class="back"
|
|
3912
|
+
aria-label="Back to channels"
|
|
3913
|
+
title="Back to channels"
|
|
3914
|
+
@click=${() => this.mobileView = "list"}
|
|
3915
|
+
>
|
|
3916
|
+
${icon("back")}
|
|
3917
|
+
</button>
|
|
3821
3918
|
<h1><span class="hash">#</span> ${channel?.name ?? "No channel yet"}</h1>
|
|
3822
3919
|
<nav class="tabs" role="tablist">
|
|
3823
3920
|
${["posts", "files"].map(
|
|
@@ -3926,10 +4023,18 @@ var TeamsApp = class extends LitElement {
|
|
|
3926
4023
|
) : nothing}
|
|
3927
4024
|
</div>` : this.tab === "files" && !compact ? this.fileList(s.files, s) : html`<div class="conversation-grid" data-thread=${String(!!s.thread && !compact)}>
|
|
3928
4025
|
<div class="conversation-main">
|
|
4026
|
+
${compact || s.pinned.length === 0 ? nothing : html`<teams-pinned-bar
|
|
4027
|
+
.pinned=${s.pinned}
|
|
4028
|
+
@teams-pinned-open=${(e) => void this.revealMessage(e.detail.messageId)}
|
|
4029
|
+
@teams-pinned-unpin=${(e) => c?.unpinMessage(e.detail.messageId)}
|
|
4030
|
+
></teams-pinned-bar>`}
|
|
3929
4031
|
<office-ui-chat-list
|
|
3930
4032
|
.messages=${compact ? s.messages : s.posts}
|
|
3931
4033
|
.replyCounts=${compact ? {} : s.replyCounts}
|
|
4034
|
+
.pinnedIds=${s.pinned.map((p) => p.message.id)}
|
|
3932
4035
|
self-id=${s.user.id}
|
|
4036
|
+
@office-chat-pin=${(e) => c?.pinMessage(e.detail.messageId)}
|
|
4037
|
+
@office-chat-unpin=${(e) => c?.unpinMessage(e.detail.messageId)}
|
|
3933
4038
|
@office-chat-react=${(e) => c?.toggleReaction(e.detail.messageId, e.detail.emoji)}
|
|
3934
4039
|
@office-chat-thread=${(e) => void this.openThread(e.detail.messageId)}
|
|
3935
4040
|
@office-chat-reply=${(e) => compact ? c?.startReply(e.detail.messageId) : void this.openThread(e.detail.messageId, "reply")}
|
|
@@ -3969,6 +4074,18 @@ var TeamsApp = class extends LitElement {
|
|
|
3969
4074
|
this.addingTab = false;
|
|
3970
4075
|
this.creatingChannel = false;
|
|
3971
4076
|
}
|
|
4077
|
+
/** Scroll a pinned message into view, opening its thread when it is a reply. */
|
|
4078
|
+
async revealMessage(id) {
|
|
4079
|
+
const message = this.teams.state?.messages.find((m) => m.id === id);
|
|
4080
|
+
if (!message) return;
|
|
4081
|
+
if (message.replyTo) return this.openThread(id);
|
|
4082
|
+
const list = this.shadowRoot?.querySelector(".conversation-main office-ui-chat-list");
|
|
4083
|
+
const row = Array.from(
|
|
4084
|
+
list?.shadowRoot?.querySelectorAll("[data-message-id]") ?? []
|
|
4085
|
+
).find((element) => element.dataset.messageId === id);
|
|
4086
|
+
row?.scrollIntoView({ block: "center" });
|
|
4087
|
+
row?.focus();
|
|
4088
|
+
}
|
|
3972
4089
|
async openThread(id, action) {
|
|
3973
4090
|
const client = this.teams.client;
|
|
3974
4091
|
client?.openThread(id);
|