ooxml-ui 1.1.0 → 1.2.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/README.md +38 -36
- package/custom-elements.json +211 -4
- package/dist/chrome/ruler.d.ts +60 -2
- package/dist/chrome/ruler.d.ts.map +1 -1
- package/dist/chrome/status-bar.d.ts +3 -1
- package/dist/chrome/status-bar.d.ts.map +1 -1
- package/dist/{chunk-M5DTJSOV.js → chunk-7FNDOWTX.js} +393 -15
- package/dist/{chunk-KVKKXRL7.js → chunk-AYXFLBSV.js} +92 -13
- package/dist/{chunk-X7RINDJQ.js → chunk-JAJFLFAV.js} +1 -1
- package/dist/{chunk-3FPW7M6U.js → chunk-VUB44CAJ.js} +1 -1
- package/dist/{chunk-JFJXBYRD.js → chunk-XNCWB2X6.js} +5 -0
- package/dist/{chunk-BEN3453I.js → chunk-Y2E22JVO.js} +1 -1
- package/dist/{chunk-USDLALB5.js → chunk-YK2DPYMU.js} +1 -1
- package/dist/{chunk-ZU7GX4SY.js → chunk-YP5S7DTT.js} +6 -5
- package/dist/comments/comments-pane.d.ts +116 -0
- package/dist/comments/comments-pane.d.ts.map +1 -0
- package/dist/comments/types.d.ts +80 -0
- package/dist/comments/types.d.ts.map +1 -0
- package/dist/controls.d.ts +4 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/docx/comments-panel.d.ts +8 -1
- package/dist/docx/image-media.d.ts +1 -1
- package/dist/docx/locales/en-ribbon.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +1 -0
- package/dist/docx/localization-strings.d.ts +1 -0
- package/dist/docx/localization.d.ts +7 -0
- package/dist/docx/print-layout.d.ts +2 -2
- package/dist/docx/print-picture.d.ts +12 -0
- package/dist/docx/review-controller.d.ts +2 -0
- package/dist/docx/ruler.d.ts +7 -10
- package/dist/docx.js +282 -322
- package/dist/form/gradient-preset-gallery.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/pptx/{chart-3d-view-scene-2KRQ5667.mjs → chart-3d-view-scene-6B5TOWB6.mjs} +3 -3
- package/dist/pptx/{chart-3d-view-scene-36DMZWZ3.cjs → chart-3d-view-scene-MJ6YNT56.cjs} +37 -37
- package/dist/pptx/{chunk-YOGDIDPB.mjs → chunk-AWKKC3VW.mjs} +8 -2
- package/dist/pptx/{chunk-CJU4P5FT.cjs → chunk-STKGUT5S.cjs} +18 -12
- package/dist/pptx/{chunk-YHA6XAB3.cjs → chunk-XIQMFSNG.cjs} +1 -1
- package/dist/pptx/{chunk-YARCML7O.mjs → chunk-XQVKQD5Z.mjs} +294 -265
- package/dist/pptx/{chunk-Y2W4SZER.mjs → chunk-YI5LH5NN.mjs} +479 -336
- package/dist/pptx/{chunk-ADOC5JLI.mjs → chunk-YMTQLZ2I.mjs} +1 -1
- package/dist/pptx/{chunk-AIL3BNZS.cjs → chunk-YRHK45AB.cjs} +301 -265
- package/dist/pptx/{chunk-KPZWYF44.cjs → chunk-ZK344LOB.cjs} +629 -479
- package/dist/pptx/dom/elements/chart.d.ts +2 -3
- package/dist/pptx/dom/elements/chart.d.ts.map +1 -1
- package/dist/pptx/dom/elements/table.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +254 -243
- package/dist/pptx/dom/index.mjs +26 -15
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3025 -2993
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/chart-axis-range.d.ts +7 -0
- package/dist/pptx/render/chart-axis-range.d.ts.map +1 -1
- package/dist/pptx/render/chart-axis-render.d.ts +3 -1
- package/dist/pptx/render/chart-axis-render.d.ts.map +1 -1
- package/dist/pptx/render/chart-axis-style.d.ts +5 -0
- package/dist/pptx/render/chart-axis-style.d.ts.map +1 -1
- package/dist/pptx/render/chart-axis.d.ts +1 -1
- package/dist/pptx/render/chart-axis.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-axes.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-bars.d.ts +3 -3
- package/dist/pptx/render/chart-cartesian-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-percent-stacked.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian.d.ts.map +1 -1
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-combo.d.ts.map +1 -1
- package/dist/pptx/render/chart-gridlines-toggle.d.ts +13 -1
- package/dist/pptx/render/chart-gridlines-toggle.d.ts.map +1 -1
- package/dist/pptx/render/chart-helpers.d.ts +13 -13
- package/dist/pptx/render/chart-helpers.d.ts.map +1 -1
- package/dist/pptx/render/chart-horizontal-bars-helpers.d.ts +7 -3
- package/dist/pptx/render/chart-horizontal-bars-helpers.d.ts.map +1 -1
- package/dist/pptx/render/chart-horizontal-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-interaction-stacked.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-palette.d.ts +5 -14
- package/dist/pptx/render/chart-palette.d.ts.map +1 -1
- package/dist/pptx/render/chart-quick-action-styles.d.ts +5 -3
- package/dist/pptx/render/chart-quick-action-styles.d.ts.map +1 -1
- package/dist/pptx/render/chart-scatter-x-axis.d.ts.map +1 -1
- package/dist/pptx/render/chart-style-palette.d.ts +52 -0
- package/dist/pptx/render/chart-style-palette.d.ts.map +1 -0
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model-bars.d.ts +31 -1
- package/dist/pptx/render/chart-view-model-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model-build.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +53 -41
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/foreign-object-svg-document.d.ts +12 -0
- package/dist/pptx/render/foreign-object-svg-document.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/table-cell-css.d.ts +3 -2
- package/dist/pptx/render/table-cell-css.d.ts.map +1 -1
- package/dist/pptx/render/table-cell-edit.d.ts +1 -1
- package/dist/pptx/render/table-cell-edit.d.ts.map +1 -1
- package/dist/pptx/render/table-cell-paragraphs.d.ts +29 -0
- package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -0
- package/dist/pptx/render/table-style.d.ts +2 -0
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/render/title-bar.d.ts +5 -0
- package/dist/pptx/render/title-bar.d.ts.map +1 -1
- package/dist/pptx/render/viewer-root-options.d.ts +11 -3
- package/dist/pptx/render/viewer-root-options.d.ts.map +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/ribbon/ribbon-tabs.d.ts +2 -1
- package/dist/ribbon/ribbon-tabs.d.ts.map +1 -1
- package/dist/smartart/smartart-svg.d.ts +3 -2
- package/dist/smartart.js +3 -3
- package/dist/suite/attachment-store.d.ts +13 -0
- package/dist/suite/document-store.d.ts +31 -0
- package/dist/suite/index.d.ts +2 -0
- package/dist/suite.js +132 -1
- package/dist/teams/app/channel-tab.d.ts +5 -0
- package/dist/teams/chat-composer.d.ts +3 -0
- package/dist/teams.js +6 -6
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +5 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/styles/index.d.ts +2 -0
- package/dist/visio/styles/theme.d.ts +11 -0
- package/dist/visio/styles.d.ts +2 -2
- package/dist/visio.js +65 -20
- package/dist/xlsx/backstage/index.d.ts +4 -1
- package/dist/xlsx/backstage/pages-share.d.ts +19 -0
- package/dist/xlsx/backstage/parts.d.ts +3 -0
- package/dist/xlsx/chart-fill-binding.d.ts +2 -2
- package/dist/xlsx/chart-series-gradient-type.d.ts +3 -2
- package/dist/xlsx/collaboration-session.d.ts +9 -0
- package/dist/xlsx/collaboration-types.d.ts +41 -0
- package/dist/xlsx/collaboration.d.ts +56 -0
- package/dist/xlsx/component.d.ts +8 -0
- package/dist/xlsx/dialogs/comments-list.d.ts +4 -0
- package/dist/xlsx/dialogs/help-dialogs.d.ts +1 -1
- package/dist/xlsx/editor-core.d.ts +3 -0
- package/dist/xlsx/element-api.d.ts +19 -1
- package/dist/xlsx/events.d.ts +4 -1
- package/dist/xlsx/grid/remote-layer.d.ts +3 -0
- package/dist/xlsx/grid/sparkline.d.ts +3 -0
- package/dist/xlsx/grid/styles.d.ts +1 -1
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/ribbon-actions.d.ts +21 -0
- package/dist/xlsx/shell-commands.d.ts +1 -1
- package/dist/xlsx/title-bar.d.ts +4 -2
- package/dist/xlsx.js +712 -90
- package/package.json +2 -2
- package/dist/pptx/web-components/status-bar-styles.d.ts +0 -3
- package/dist/pptx/web-components/status-bar-styles.d.ts.map +0 -1
- package/dist/pptx/web-components/title-bar-styles.d.ts +0 -7
- package/dist/pptx/web-components/title-bar-styles.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { THEME_CSS, installOfficeUiTheme } from './chunk-
|
|
2
|
-
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-
|
|
1
|
+
import { THEME_CSS, installOfficeUiTheme } from './chunk-JAJFLFAV.js';
|
|
2
|
+
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-7FNDOWTX.js';
|
|
3
3
|
import { registerIcon, getIcon } from './chunk-BOX43CZD.js';
|
|
4
|
-
import { initialsOf, definePresence } from './chunk-
|
|
5
|
-
import { definer, OfficeElement, controlStyles } from './chunk-
|
|
4
|
+
import { initialsOf, definePresence } from './chunk-VUB44CAJ.js';
|
|
5
|
+
import { definer, OfficeElement, controlStyles } from './chunk-YK2DPYMU.js';
|
|
6
6
|
import { html, nothing, LitElement, unsafeCSS, svg } from 'lit';
|
|
7
7
|
import { repeat } from 'lit/directives/repeat.js';
|
|
8
8
|
import { live } from 'lit/directives/live.js';
|
|
@@ -395,7 +395,7 @@ var OfficeUiChannelList = class extends TeamsElement {
|
|
|
395
395
|
var defineChannelList = definer("office-ui-channel-list", () => OfficeUiChannelList);
|
|
396
396
|
|
|
397
397
|
// 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 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
|
|
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: 16px;\n min-height: 3em;\n }\n .bar button {\n min-width: 36px;\n height: 36px;\n }\n}\n";
|
|
399
399
|
var EMOJI = [
|
|
400
400
|
"\u{1F600}",
|
|
401
401
|
"\u{1F604}",
|
|
@@ -445,7 +445,19 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
445
445
|
this.missingFiles = [];
|
|
446
446
|
this.emojiOpen = false;
|
|
447
447
|
}
|
|
448
|
+
focusMessage() {
|
|
449
|
+
void this.updateComplete.then(
|
|
450
|
+
() => this.renderRoot.querySelector("textarea")?.focus({ preventScroll: true })
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
resizeMessage() {
|
|
454
|
+
const area = this.renderRoot.querySelector("textarea");
|
|
455
|
+
if (!area) return;
|
|
456
|
+
area.style.height = "auto";
|
|
457
|
+
area.style.height = `${Math.min(area.scrollHeight, 160)}px`;
|
|
458
|
+
}
|
|
448
459
|
updated(changed) {
|
|
460
|
+
if (changed.has("value")) this.resizeMessage();
|
|
449
461
|
if (changed.has("replyingTo") || changed.has("editing")) {
|
|
450
462
|
if (this.replyingTo !== null || this.editing)
|
|
451
463
|
this.renderRoot.querySelector("textarea")?.focus();
|
|
@@ -461,6 +473,7 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
461
473
|
this.files = [];
|
|
462
474
|
this.emojiOpen = false;
|
|
463
475
|
this.fire("office-chat-send", { text, files });
|
|
476
|
+
this.focusMessage();
|
|
464
477
|
}
|
|
465
478
|
onInput(event) {
|
|
466
479
|
this.value = event.target.value;
|
|
@@ -472,6 +485,11 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
472
485
|
}
|
|
473
486
|
}
|
|
474
487
|
onKeydown(event) {
|
|
488
|
+
if (event.key === "Escape" && this.emojiOpen) {
|
|
489
|
+
this.emojiOpen = false;
|
|
490
|
+
this.focusMessage();
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
475
493
|
if (event.key === "Enter" && !event.shiftKey && !event.isComposing) {
|
|
476
494
|
event.preventDefault();
|
|
477
495
|
this.submit();
|
|
@@ -481,12 +499,17 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
481
499
|
}
|
|
482
500
|
pick(event) {
|
|
483
501
|
const input = event.target;
|
|
484
|
-
this.
|
|
502
|
+
this.addFiles(Array.from(input.files ?? []));
|
|
485
503
|
input.value = "";
|
|
504
|
+
}
|
|
505
|
+
addFiles(files) {
|
|
506
|
+
if (this.disabled) return;
|
|
507
|
+
this.files = [...this.files, ...files].slice(0, MAX_FILES);
|
|
486
508
|
this.missingFiles = this.missingFiles.filter(
|
|
487
509
|
(name) => !this.files.some((file) => file.name === name)
|
|
488
510
|
);
|
|
489
511
|
this.saveDraft();
|
|
512
|
+
this.focusMessage();
|
|
490
513
|
}
|
|
491
514
|
saveDraft() {
|
|
492
515
|
this.fire("office-chat-draft", {
|
|
@@ -504,7 +527,22 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
504
527
|
const banner = this.editing ? "Editing message" : this.replyingTo !== null ? `Replying to ${this.replyingTo}` : "";
|
|
505
528
|
return html`
|
|
506
529
|
<div class="typing" aria-live="polite">${this.typingLine()}</div>
|
|
507
|
-
<div
|
|
530
|
+
<div
|
|
531
|
+
class="box"
|
|
532
|
+
@dragover=${(event) => {
|
|
533
|
+
if (event.dataTransfer?.types.includes("Files")) {
|
|
534
|
+
event.preventDefault();
|
|
535
|
+
event.stopPropagation();
|
|
536
|
+
}
|
|
537
|
+
}}
|
|
538
|
+
@drop=${(event) => {
|
|
539
|
+
if (event.dataTransfer?.files.length) {
|
|
540
|
+
event.preventDefault();
|
|
541
|
+
event.stopPropagation();
|
|
542
|
+
this.addFiles([...event.dataTransfer.files]);
|
|
543
|
+
}
|
|
544
|
+
}}
|
|
545
|
+
>
|
|
508
546
|
${this.missingFiles.length ? html`<div role="status">
|
|
509
547
|
Reattach or discard these draft attachments before sending:
|
|
510
548
|
<ul>
|
|
@@ -541,6 +579,12 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
541
579
|
placeholder=${this.placeholder}
|
|
542
580
|
?disabled=${this.disabled}
|
|
543
581
|
@input=${this.onInput}
|
|
582
|
+
@paste=${(event) => {
|
|
583
|
+
if (event.clipboardData?.files.length) {
|
|
584
|
+
event.preventDefault();
|
|
585
|
+
this.addFiles([...event.clipboardData.files]);
|
|
586
|
+
}
|
|
587
|
+
}}
|
|
544
588
|
@keydown=${this.onKeydown}
|
|
545
589
|
></textarea>
|
|
546
590
|
${this.files.length ? html`<ul class="pending">
|
|
@@ -551,10 +595,11 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
551
595
|
aria-label=${`Remove ${f.name}`}
|
|
552
596
|
@click=${() => {
|
|
553
597
|
this.files = this.files.filter((_, j) => j !== i);
|
|
598
|
+
this.focusMessage();
|
|
554
599
|
this.saveDraft();
|
|
555
600
|
}}
|
|
556
601
|
>
|
|
557
|
-
|
|
602
|
+
<span class="file-label" title=${f.name}>${f.name}</span>${icon("close")}
|
|
558
603
|
</button>
|
|
559
604
|
</li>`
|
|
560
605
|
)}
|
|
@@ -586,7 +631,13 @@ var OfficeUiChatComposer = class extends TeamsElement {
|
|
|
586
631
|
type="button"
|
|
587
632
|
role="menuitem"
|
|
588
633
|
@click=${() => {
|
|
589
|
-
this.
|
|
634
|
+
const area = this.renderRoot.querySelector("textarea");
|
|
635
|
+
const start = area?.selectionStart ?? this.value.length, end = area?.selectionEnd ?? start;
|
|
636
|
+
this.value = this.value.slice(0, start) + e + this.value.slice(end);
|
|
637
|
+
void this.updateComplete.then(() => {
|
|
638
|
+
area?.focus({ preventScroll: true });
|
|
639
|
+
area?.setSelectionRange(start + e.length, start + e.length);
|
|
640
|
+
});
|
|
590
641
|
this.saveDraft();
|
|
591
642
|
this.emojiOpen = false;
|
|
592
643
|
this.renderRoot.querySelector("textarea")?.focus();
|
|
@@ -915,7 +966,8 @@ var XLSX_EDITOR_EVENTS = [
|
|
|
915
966
|
"file-command",
|
|
916
967
|
"selection-change",
|
|
917
968
|
"sheet-change",
|
|
918
|
-
"dirty-change"
|
|
969
|
+
"dirty-change",
|
|
970
|
+
"collaboration-change"
|
|
919
971
|
];
|
|
920
972
|
var CANCELABLE = /* @__PURE__ */ new Set(["file-command"]);
|
|
921
973
|
function emitEvent(target, type, detail) {
|
|
@@ -1342,7 +1394,8 @@ var TeamsChannelTab = class extends LitElement {
|
|
|
1342
1394
|
embeds: { attribute: false },
|
|
1343
1395
|
canSave: { type: Boolean },
|
|
1344
1396
|
detail: { state: true },
|
|
1345
|
-
error: { state: true }
|
|
1397
|
+
error: { state: true },
|
|
1398
|
+
hostOpened: { state: true }
|
|
1346
1399
|
};
|
|
1347
1400
|
key = "";
|
|
1348
1401
|
owner = null;
|
|
@@ -1355,6 +1408,7 @@ var TeamsChannelTab = class extends LitElement {
|
|
|
1355
1408
|
this.canSave = false;
|
|
1356
1409
|
this.detail = null;
|
|
1357
1410
|
this.error = "";
|
|
1411
|
+
this.hostOpened = false;
|
|
1358
1412
|
}
|
|
1359
1413
|
updated(changed) {
|
|
1360
1414
|
if (changed.has("tab") || changed.has("client")) void this.resolve();
|
|
@@ -1378,6 +1432,7 @@ var TeamsChannelTab = class extends LitElement {
|
|
|
1378
1432
|
const generation = ++this.generation;
|
|
1379
1433
|
this.detail = null;
|
|
1380
1434
|
this.error = "";
|
|
1435
|
+
this.hostOpened = false;
|
|
1381
1436
|
if (!tab || !client) return;
|
|
1382
1437
|
const attachment = tab.content.type === "file" ? tab.content.attachment : { name: tab.name, kind: "other", mime: "text/html", url: tab.content.url };
|
|
1383
1438
|
try {
|
|
@@ -1385,6 +1440,7 @@ var TeamsChannelTab = class extends LitElement {
|
|
|
1385
1440
|
if (generation !== this.generation || !this.isConnected) return;
|
|
1386
1441
|
if (!url) throw new Error("Could not resolve the tab content");
|
|
1387
1442
|
this.detail = { attachment, url, channelId: tab.channelId };
|
|
1443
|
+
if (tab.content.type === "file") this.openInHost();
|
|
1388
1444
|
} catch (error) {
|
|
1389
1445
|
if (generation === this.generation)
|
|
1390
1446
|
this.error = error instanceof Error ? error.message : "Could not open the tab";
|
|
@@ -1397,7 +1453,20 @@ var TeamsChannelTab = class extends LitElement {
|
|
|
1397
1453
|
await client.saveFileCopy(tab.channelId, file, options);
|
|
1398
1454
|
};
|
|
1399
1455
|
}
|
|
1456
|
+
openInHost() {
|
|
1457
|
+
this.hostOpened = !this.dispatchEvent(
|
|
1458
|
+
new CustomEvent("teams-open-file", {
|
|
1459
|
+
detail: this.detail,
|
|
1460
|
+
bubbles: true,
|
|
1461
|
+
composed: true,
|
|
1462
|
+
cancelable: true
|
|
1463
|
+
})
|
|
1464
|
+
);
|
|
1465
|
+
}
|
|
1400
1466
|
render() {
|
|
1467
|
+
if (this.hostOpened)
|
|
1468
|
+
return html`<p>${this.detail?.attachment.name}</p>
|
|
1469
|
+
<button type="button" @click=${() => this.openInHost()}>Open document</button>`;
|
|
1401
1470
|
return html`${this.error ? html`<p role="alert">${this.error}</p>
|
|
1402
1471
|
<button
|
|
1403
1472
|
type="button"
|
|
@@ -1496,6 +1565,15 @@ var TeamsFileActions = class extends LitElement {
|
|
|
1496
1565
|
async transfer(action) {
|
|
1497
1566
|
if (this.busy || !this.file || !this.client) return;
|
|
1498
1567
|
const { file, client } = this;
|
|
1568
|
+
if (!this.dispatchEvent(
|
|
1569
|
+
new CustomEvent("teams-file-transfer", {
|
|
1570
|
+
detail: { attachment: file, action },
|
|
1571
|
+
bubbles: true,
|
|
1572
|
+
composed: true,
|
|
1573
|
+
cancelable: true
|
|
1574
|
+
})
|
|
1575
|
+
))
|
|
1576
|
+
return;
|
|
1499
1577
|
const abort = new AbortController();
|
|
1500
1578
|
this.abort = abort;
|
|
1501
1579
|
this.busy = true;
|
|
@@ -2356,7 +2434,7 @@ function loadConfig() {
|
|
|
2356
2434
|
var saveConfig = (config) => safeStorage.setItem("teams:config", JSON.stringify(config));
|
|
2357
2435
|
|
|
2358
2436
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/teams-app.css?raw
|
|
2359
|
-
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";
|
|
2437
|
+
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";
|
|
2360
2438
|
function threadPane(state, client, openFile, close) {
|
|
2361
2439
|
const thread = state.thread;
|
|
2362
2440
|
if (!thread) return nothing;
|
|
@@ -3241,7 +3319,8 @@ var TeamsApp = class extends LitElement {
|
|
|
3241
3319
|
const workspaceId = /^[\w-]{1,100}$/u.test(this.workspaceId) ? this.workspaceId : "demo";
|
|
3242
3320
|
this.themeStorageKey = `teams:theme:${encodeURIComponent(workspaceId)}:${encodeURIComponent(named.id)}`;
|
|
3243
3321
|
const rememberedTheme = safeStorage.getItem(this.themeStorageKey);
|
|
3244
|
-
this.theme
|
|
3322
|
+
if (!this.hasAttribute("host-theme"))
|
|
3323
|
+
this.theme = rememberedTheme === "dark" || rememberedTheme === "light" ? rememberedTheme : "system";
|
|
3245
3324
|
this.applyTheme();
|
|
3246
3325
|
this.showAppNames = safeStorage.getItem(this.themeStorageKey.replace("teams:theme:", "teams:app-names:")) !== "false";
|
|
3247
3326
|
this.chatDensity = safeStorage.getItem(this.themeStorageKey.replace("teams:theme:", "teams:density:")) === "compact" ? "compact" : "comfy";
|
|
@@ -158,6 +158,7 @@ var OFFICE_TOKENS = {
|
|
|
158
158
|
"--office-launcher-height": "14px",
|
|
159
159
|
"--office-tab-indicator-width": "2.5px",
|
|
160
160
|
"--office-status-bar-height": "24px",
|
|
161
|
+
"--office-status-bar-separator-opacity": "1",
|
|
161
162
|
"--office-tab-height": "28px",
|
|
162
163
|
"--office-tab-max-width": "220px",
|
|
163
164
|
"--office-zoom-slider-width": "120px",
|
|
@@ -207,6 +208,8 @@ var OFFICE_TOKENS = {
|
|
|
207
208
|
"--office-avatar-size": "48px",
|
|
208
209
|
"--office-avatar-color": "var(--office-muted-foreground, #6b7280)",
|
|
209
210
|
"--office-toast-width": "360px",
|
|
211
|
+
"--office-comments-pane-width": "300px",
|
|
212
|
+
"--office-comment-avatar-size": "24px",
|
|
210
213
|
"--office-account-field-width": "320px",
|
|
211
214
|
// Component: galleries
|
|
212
215
|
"--office-gallery-trigger-height": "24px",
|
|
@@ -225,6 +228,8 @@ var OFFICE_TOKENS = {
|
|
|
225
228
|
"--office-title-bar-mark-size": "20px",
|
|
226
229
|
"--office-title-bar-mark-background": "var(--office-accent, #2563eb)",
|
|
227
230
|
"--office-title-bar-mark-foreground": "var(--office-accent-foreground, #ffffff)",
|
|
231
|
+
"--office-title-bar-name-foreground": "var(--office-title-bar-foreground, var(--office-foreground, #1f2937))",
|
|
232
|
+
"--office-title-bar-result-selected": "var(--office-selected, #e5e7eb)",
|
|
228
233
|
"--office-title-bar-name-max-width": "240px",
|
|
229
234
|
"--office-title-bar-name-max-width-narrow": "140px",
|
|
230
235
|
"--office-title-bar-search-max-width": "448px",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OfficeElement, controlStyles, definer } from './chunk-
|
|
1
|
+
import { OfficeElement, controlStyles, definer } from './chunk-YK2DPYMU.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { hexToRgbChannels } from 'ooxml-core/color';
|
|
4
4
|
import { resolveDrawingColor } from 'ooxml-core/diagram';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineSmartArt } from './chunk-
|
|
2
|
-
import { TEAMS_TAGS, registerTeams } from './chunk-
|
|
3
|
-
import { installOfficeUiTheme } from './chunk-
|
|
4
|
-
import { registerControls } from './chunk-
|
|
5
|
-
import { definePresence } from './chunk-
|
|
1
|
+
import { defineSmartArt } from './chunk-Y2E22JVO.js';
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-AYXFLBSV.js';
|
|
3
|
+
import { installOfficeUiTheme } from './chunk-JAJFLFAV.js';
|
|
4
|
+
import { registerControls } from './chunk-7FNDOWTX.js';
|
|
5
|
+
import { definePresence } from './chunk-VUB44CAJ.js';
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
8
|
var OFFICE_UI_TAGS = [
|
|
@@ -41,6 +41,7 @@ var OFFICE_UI_TAGS = [
|
|
|
41
41
|
"office-ui-title-bar",
|
|
42
42
|
"office-ui-ribbon-section",
|
|
43
43
|
"office-ui-gallery",
|
|
44
|
+
"office-ui-comments-pane",
|
|
44
45
|
"office-ui-presence",
|
|
45
46
|
"office-ui-smartart",
|
|
46
47
|
...TEAMS_TAGS
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { OfficeElement } from '../base.js';
|
|
3
|
+
import { type OfficeCommentThread, type OfficeCommentsClassNames, type OfficeCommentsLabels } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* `<office-ui-comments-pane>`: Office's comments pane, one UX for Word, Excel and PowerPoint.
|
|
6
|
+
* Threads show each comment's avatar initials, author, time and text, with Reply,
|
|
7
|
+
* Resolve/Reopen, Edit (own comments, by `currentAuthor`) and Delete, under a new-comment box.
|
|
8
|
+
* The pane never changes its threads: every action is an event and the product sets `threads`
|
|
9
|
+
* again. Arrow keys, Home and End move between threads; Enter or Space (or a click) selects one
|
|
10
|
+
* (`thread-select`) so the product can go to its anchor. Escape is left to the host.
|
|
11
|
+
*
|
|
12
|
+
* Properties: `threads`, `activeThreadId`, `readOnly` (controls shown but disabled),
|
|
13
|
+
* `listOnly` (no composer, replies or actions: a navigation list), `closable`, `addDisabled`,
|
|
14
|
+
* `currentAuthor`, `labels` (partial, English defaults), `classNames` (product hook classes),
|
|
15
|
+
* `locale` (time formatting). Events (bubbling, composed): `comment-add` `{ text }`,
|
|
16
|
+
* `comment-reply` `{ threadId, text }`, `comment-edit` `{ threadId, commentId, text }`,
|
|
17
|
+
* `comment-delete` `{ threadId, commentId }`, `thread-resolve`, `thread-reopen` and
|
|
18
|
+
* `thread-select` `{ threadId }`, `comments-close`.
|
|
19
|
+
*/
|
|
20
|
+
export declare class OfficeUiCommentsPane extends OfficeElement {
|
|
21
|
+
static styles: import("lit").CSSResult[];
|
|
22
|
+
static properties: {
|
|
23
|
+
threads: {
|
|
24
|
+
attribute: boolean;
|
|
25
|
+
};
|
|
26
|
+
activeThreadId: {
|
|
27
|
+
attribute: string;
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
readOnly: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
reflect: true;
|
|
33
|
+
converter: {
|
|
34
|
+
fromAttribute: (value: string | null) => boolean;
|
|
35
|
+
toAttribute: (value: unknown) => string | null;
|
|
36
|
+
};
|
|
37
|
+
attribute: string;
|
|
38
|
+
};
|
|
39
|
+
listOnly: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
reflect: true;
|
|
42
|
+
converter: {
|
|
43
|
+
fromAttribute: (value: string | null) => boolean;
|
|
44
|
+
toAttribute: (value: unknown) => string | null;
|
|
45
|
+
};
|
|
46
|
+
attribute: string;
|
|
47
|
+
};
|
|
48
|
+
closable: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
reflect: true;
|
|
51
|
+
converter: {
|
|
52
|
+
fromAttribute: (value: string | null) => boolean;
|
|
53
|
+
toAttribute: (value: unknown) => string | null;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
addDisabled: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
reflect: true;
|
|
59
|
+
converter: {
|
|
60
|
+
fromAttribute: (value: string | null) => boolean;
|
|
61
|
+
toAttribute: (value: unknown) => string | null;
|
|
62
|
+
};
|
|
63
|
+
attribute: string;
|
|
64
|
+
};
|
|
65
|
+
currentAuthor: {
|
|
66
|
+
attribute: string;
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
};
|
|
69
|
+
labels: {
|
|
70
|
+
attribute: boolean;
|
|
71
|
+
};
|
|
72
|
+
classNames: {
|
|
73
|
+
attribute: boolean;
|
|
74
|
+
};
|
|
75
|
+
locale: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
threads: readonly OfficeCommentThread[];
|
|
80
|
+
activeThreadId: string | null;
|
|
81
|
+
readOnly: boolean;
|
|
82
|
+
listOnly: boolean;
|
|
83
|
+
closable: boolean;
|
|
84
|
+
addDisabled: boolean;
|
|
85
|
+
currentAuthor: string | null;
|
|
86
|
+
labels: Partial<OfficeCommentsLabels>;
|
|
87
|
+
classNames: OfficeCommentsClassNames;
|
|
88
|
+
locale: string | null;
|
|
89
|
+
private focusedId;
|
|
90
|
+
private editingId;
|
|
91
|
+
constructor();
|
|
92
|
+
private get text();
|
|
93
|
+
private get locked();
|
|
94
|
+
/** The thread that takes Tab focus: the last one focused, else the active one, else the first. */
|
|
95
|
+
private get rovingId();
|
|
96
|
+
private card;
|
|
97
|
+
/** Focus the current thread, or the new-comment box when there is none. */
|
|
98
|
+
focus(options?: FocusOptions): void;
|
|
99
|
+
private submitNew;
|
|
100
|
+
private submitReply;
|
|
101
|
+
private startEdit;
|
|
102
|
+
private stopEdit;
|
|
103
|
+
private saveEdit;
|
|
104
|
+
/** Ctrl+Enter (Cmd+Enter) posts from any box, like Office. */
|
|
105
|
+
private onBoxKey;
|
|
106
|
+
private onEditKey;
|
|
107
|
+
private select;
|
|
108
|
+
private onThreadClick;
|
|
109
|
+
private onListKey;
|
|
110
|
+
private renderActions;
|
|
111
|
+
private renderComment;
|
|
112
|
+
private renderThread;
|
|
113
|
+
protected render(): TemplateResult<1>;
|
|
114
|
+
}
|
|
115
|
+
export declare const defineCommentsPane: import("../registry.js").Definer;
|
|
116
|
+
//# sourceMappingURL=comments-pane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments-pane.d.ts","sourceRoot":"","sources":["../../src/comments/comments-pane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAuB,MAAM,SAAS,CAAC;AAG7D,OAAO,EAKN,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IACtD,OAAgB,MAAM,4BAAsB;IAC5C,OAAgB,UAAU;;YACd,SAAS;;;YACF,SAAS;YAAsB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAKpC,SAAS;YAAoB,IAAI;;;YACxC,SAAS;;;YACL,SAAS;;;YACb,IAAI;;MACb;IACM,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACxC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtC,UAAU,EAAE,wBAAwB,CAAC;IACrC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,SAAS,CAAqB;IAEtC,cAYC;IAED,OAAO,KAAK,IAAI,GAEf;IAED,OAAO,KAAK,MAAM,GAEjB;IAED,kGAAkG;IAClG,OAAO,KAAK,QAAQ,GAKnB;IAED,OAAO,CAAC,IAAI;IASZ,2EAA2E;IAClE,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAK3C;IAED,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,QAAQ;IAQhB,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,SAAS;IAwBjB,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,aAAa;IA4CrB,OAAO,CAAC,YAAY;IAwCpB,UAAmB,MAAM,sBAsCxB;CACD;AAED,eAAO,MAAM,kBAAkB,+BAAiE,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** One comment of a thread: the opening comment or a reply. */
|
|
2
|
+
export interface OfficeComment {
|
|
3
|
+
id: string;
|
|
4
|
+
author: string;
|
|
5
|
+
/** Avatar initials; derived from `author` when absent. */
|
|
6
|
+
initials?: string;
|
|
7
|
+
/** Avatar colour (any CSS colour); the accent colour when absent. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** When it was written: an ISO 8601 date-time is formatted, any other text is shown as is. */
|
|
10
|
+
created?: string;
|
|
11
|
+
/** Plain text; `@mentions` stay text. */
|
|
12
|
+
text: string;
|
|
13
|
+
edited?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** A conversation anchored to one place in the document: its first comment and the replies. */
|
|
16
|
+
export interface OfficeCommentThread {
|
|
17
|
+
id: string;
|
|
18
|
+
/** Where the thread is anchored, shown above it (a cell address, a slide, a quote). */
|
|
19
|
+
anchorLabel?: string;
|
|
20
|
+
resolved: boolean;
|
|
21
|
+
/** Oldest first; the first entry opens the thread. */
|
|
22
|
+
comments: OfficeComment[];
|
|
23
|
+
}
|
|
24
|
+
/** Every string the pane shows or announces. The shared package has no dictionary. */
|
|
25
|
+
export interface OfficeCommentsLabels {
|
|
26
|
+
/** Pane heading; empty hides it (for a pane inside a titled dialog). */
|
|
27
|
+
heading: string;
|
|
28
|
+
/** Accessible name of the thread list. */
|
|
29
|
+
list: string;
|
|
30
|
+
/** The close button (shown with `closable`). */
|
|
31
|
+
close: string;
|
|
32
|
+
/** Label and placeholder of the new-comment box. */
|
|
33
|
+
newComment: string;
|
|
34
|
+
/** The button that posts a new comment. */
|
|
35
|
+
add: string;
|
|
36
|
+
/** Label and placeholder of a thread's reply box, and its button. */
|
|
37
|
+
reply: string;
|
|
38
|
+
resolve: string;
|
|
39
|
+
reopen: string;
|
|
40
|
+
/** Badge on a resolved thread; empty hides it. */
|
|
41
|
+
resolved: string;
|
|
42
|
+
edit: string;
|
|
43
|
+
save: string;
|
|
44
|
+
cancel: string;
|
|
45
|
+
delete: string;
|
|
46
|
+
/** Marker after an edited comment's time. */
|
|
47
|
+
edited: string;
|
|
48
|
+
/** Shown when there are no threads. */
|
|
49
|
+
empty: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const DEFAULT_COMMENTS_LABELS: OfficeCommentsLabels;
|
|
52
|
+
/** Product hook classes added to the pane's parts, so a product keeps its own selectors. */
|
|
53
|
+
export interface OfficeCommentsClassNames {
|
|
54
|
+
thread?: string;
|
|
55
|
+
comment?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface OfficeCommentAddDetail {
|
|
58
|
+
text: string;
|
|
59
|
+
}
|
|
60
|
+
export interface OfficeCommentReplyDetail {
|
|
61
|
+
threadId: string;
|
|
62
|
+
text: string;
|
|
63
|
+
}
|
|
64
|
+
export interface OfficeCommentEditDetail {
|
|
65
|
+
threadId: string;
|
|
66
|
+
commentId: string;
|
|
67
|
+
text: string;
|
|
68
|
+
}
|
|
69
|
+
export interface OfficeCommentDeleteDetail {
|
|
70
|
+
threadId: string;
|
|
71
|
+
commentId: string;
|
|
72
|
+
}
|
|
73
|
+
export interface OfficeThreadDetail {
|
|
74
|
+
threadId: string;
|
|
75
|
+
}
|
|
76
|
+
/** Up to two initials from an author's name ("Ada Lovelace" is "AL", "grace" is "G"). */
|
|
77
|
+
export declare function commentInitials(author: string): string;
|
|
78
|
+
/** A comment's time for display: ISO date-times are formatted for `locale`, other text is kept. */
|
|
79
|
+
export declare function formatCommentTime(created: string | undefined, locale?: string): string;
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/comments/types.ts"],"names":[],"mappings":"AAIA,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,+FAA+F;AAC/F,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,sFAAsF;AACtF,MAAM,WAAW,oBAAoB;IACpC,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,uBAAuB,EAAE,oBAgBrC,CAAC;AAEF,4FAA4F;AAC5F,MAAM,WAAW,wBAAwB;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,wBAAwB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,uBAAuB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,yBAAyB;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOtD;AAED,mGAAmG;AACnG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAYtF"}
|
package/dist/controls.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { defineRibbonToggle } from './ribbon/ribbon-toggle.js';
|
|
|
8
8
|
import { defineSearchField } from './form/search-field.js';
|
|
9
9
|
import { defineBackstage } from './chrome/backstage.js';
|
|
10
10
|
import { defineFindBar } from './chrome/find-bar.js';
|
|
11
|
+
import { defineCommentsPane } from './comments/comments-pane.js';
|
|
11
12
|
import { definePrintPreview } from './chrome/print-preview.js';
|
|
12
13
|
import { defineRibbon } from './ribbon/ribbon-tabs.js';
|
|
13
14
|
import { defineRibbonSection } from './ribbon/ribbon-section.js';
|
|
@@ -34,7 +35,7 @@ import { defineStatusItem } from './chrome/status-item.js';
|
|
|
34
35
|
import { defineTabStrip } from './chrome/tab-strip.js';
|
|
35
36
|
import { defineTitleBar } from './chrome/title-bar.js';
|
|
36
37
|
import { defineZoomSlider } from './form/zoom-slider.js';
|
|
37
|
-
export { defineAccount, defineDialogFooter, definePasteOptions, defineRadio, defineReadOnlyBanner, defineRibbonToggle, defineSearchField, defineToasts, defineBackstage, defineFindBar, defineGallery, definePrintPreview, defineRibbon, defineRuler, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToolbar, defineZoomSlider, };
|
|
38
|
+
export { defineAccount, defineDialogFooter, definePasteOptions, defineRadio, defineReadOnlyBanner, defineRibbonToggle, defineSearchField, defineToasts, defineBackstage, defineCommentsPane, defineFindBar, defineGallery, definePrintPreview, defineRibbon, defineRuler, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToolbar, defineZoomSlider, };
|
|
38
39
|
export type { OfficeCommandEvent } from './ribbon/button.js';
|
|
39
40
|
export type { OfficeDialogCloseEvent, OfficeDialogCloseReason } from './dialog/dialog.js';
|
|
40
41
|
export type { OfficeSelectOption } from './form/select.js';
|
|
@@ -46,6 +47,7 @@ export { attachKeyTips, type KeyTipsHandle } from './keytips.js';
|
|
|
46
47
|
export type { OfficeBackstageCloseEvent, OfficeBackstageItem, OfficeBackstageSelectEvent, } from './chrome/backstage.js';
|
|
47
48
|
export type { OfficeFindInputEvent, OfficeFindStepEvent } from './chrome/find-bar.js';
|
|
48
49
|
export type { OfficePrintPreviewPageEvent } from './chrome/print-preview.js';
|
|
50
|
+
export { commentInitials, DEFAULT_COMMENTS_LABELS, formatCommentTime, type OfficeComment, type OfficeCommentAddDetail, type OfficeCommentDeleteDetail, type OfficeCommentEditDetail, type OfficeCommentReplyDetail, type OfficeCommentsClassNames, type OfficeCommentsLabels, type OfficeCommentThread, type OfficeThreadDetail, } from './comments/types.js';
|
|
49
51
|
export { assignKeyTips, runKeyTips } from './ribbon/keytip-run.js';
|
|
50
52
|
export type { KeyTipTarget } from './ribbon/keytip-run.js';
|
|
51
53
|
export { createRibbonOverflow } from './ribbon/overflow.js';
|
|
@@ -62,7 +64,7 @@ export type { OfficeReadOnlyBannerIntent, OfficeReadOnlyBannerState, } from './n
|
|
|
62
64
|
export { clearOfficeProfile, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, profileInitials, readOfficeProfile, sanitizeOfficeProfile, writeOfficeProfile, type OfficeProfile, type OfficeProfileChangeEvent, } from './chrome/account-profile.js';
|
|
63
65
|
export { clampOptionNumber, type OfficeOptionCategory, type OfficeOptionChoice, type OfficeOptionControl, type OfficeOptionSection, type OfficeOptionsChangeEvent, type OfficeOptionValue, type OfficeOptionValues, } from './dialog/options-dialog.js';
|
|
64
66
|
/** Every control of this entry. */
|
|
65
|
-
export declare const CONTROL_DEFINERS: readonly [import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer];
|
|
67
|
+
export declare const CONTROL_DEFINERS: readonly [import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer];
|
|
66
68
|
/** Idempotent, SSR-safe (no-op without a DOM). */
|
|
67
69
|
export declare function registerControls(registry?: CustomElementRegistry): void;
|
|
68
70
|
//# sourceMappingURL=controls.d.ts.map
|