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,10 +1,11 @@
|
|
|
1
1
|
import { createIconSvg, paintIcon, getIcon } from './chunk-M6GF5ED2.js';
|
|
2
|
-
import { initialsOf } from './chunk-
|
|
3
|
-
import { OfficeElement, controlStyles, definer, valueOn, flag, present, triState, withTokens, emit } from './chunk-
|
|
4
|
-
import { tok, OFFICE_TOKENS } from './chunk-
|
|
2
|
+
import { initialsOf } from './chunk-KNC2UEUR.js';
|
|
3
|
+
import { OfficeElement, controlStyles, definer, valueOn, flag, present, triState, withTokens, emit } from './chunk-CWBSXK7P.js';
|
|
4
|
+
import { tok, OFFICE_TOKENS } from './chunk-LD3K2RDN.js';
|
|
5
5
|
import { html, LitElement, nothing, render, svg } from 'lit';
|
|
6
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
7
7
|
import { repeat } from 'lit/directives/repeat.js';
|
|
8
|
+
import 'ooxml-core/i18n';
|
|
8
9
|
import { unsafeStatic, html as html$1 } from 'lit/static-html.js';
|
|
9
10
|
import { live } from 'lit/directives/live.js';
|
|
10
11
|
import { keyed } from 'lit/directives/keyed.js';
|
|
@@ -490,19 +491,17 @@ var OfficeUiRadio = class extends OfficeElement {
|
|
|
490
491
|
}
|
|
491
492
|
};
|
|
492
493
|
var defineRadio = definer("office-ui-radio", () => OfficeUiRadio);
|
|
493
|
-
|
|
494
|
-
// src/form/color-swatches.ts
|
|
495
494
|
var OFFICE_COLOR_SWATCHES = [
|
|
496
|
-
{ hex: "#000000", label: "Black" },
|
|
497
|
-
{ hex: "#ffffff", label: "White" },
|
|
498
|
-
{ hex: "#ff0000", label: "Red" },
|
|
499
|
-
{ hex: "#00aa00", label: "Green" },
|
|
500
|
-
{ hex: "#0000ff", label: "Blue" },
|
|
501
|
-
{ hex: "#ff8800", label: "Orange" },
|
|
502
|
-
{ hex: "#8800cc", label: "Purple" },
|
|
503
|
-
{ hex: "#00cccc", label: "Cyan" },
|
|
504
|
-
{ hex: "#ff69b4", label: "Pink" },
|
|
505
|
-
{ hex: "#808080", label: "Gray" }
|
|
495
|
+
{ hex: "#000000", label: "Black", labelKey: "pptx.colorPicker.standard.black" },
|
|
496
|
+
{ hex: "#ffffff", label: "White", labelKey: "pptx.colorPicker.standard.white" },
|
|
497
|
+
{ hex: "#ff0000", label: "Red", labelKey: "pptx.colorPicker.standard.red" },
|
|
498
|
+
{ hex: "#00aa00", label: "Green", labelKey: "pptx.colorPicker.standard.green" },
|
|
499
|
+
{ hex: "#0000ff", label: "Blue", labelKey: "pptx.colorPicker.standard.blue" },
|
|
500
|
+
{ hex: "#ff8800", label: "Orange", labelKey: "pptx.colorPicker.standard.orange" },
|
|
501
|
+
{ hex: "#8800cc", label: "Purple", labelKey: "pptx.colorPicker.standard.purple" },
|
|
502
|
+
{ hex: "#00cccc", label: "Cyan", labelKey: "pptx.colorPicker.standard.cyan" },
|
|
503
|
+
{ hex: "#ff69b4", label: "Pink", labelKey: "pptx.colorPicker.standard.pink" },
|
|
504
|
+
{ hex: "#808080", label: "Gray", labelKey: "pptx.colorPicker.standard.gray" }
|
|
506
505
|
];
|
|
507
506
|
var OFFICE_COLOR_SWATCH_HEXES = OFFICE_COLOR_SWATCHES.map(
|
|
508
507
|
(swatch) => swatch.hex
|
|
@@ -1497,8 +1496,14 @@ var OfficeUiPrintPreview = class extends OfficeElement {
|
|
|
1497
1496
|
};
|
|
1498
1497
|
var definePrintPreview = definer("office-ui-print-preview", () => OfficeUiPrintPreview);
|
|
1499
1498
|
|
|
1499
|
+
// src/ribbon/auto-collapse.ts
|
|
1500
|
+
var SHORT_VIEWPORT_MEDIA = "(max-height: 500px)";
|
|
1501
|
+
function resolveCollapsed(shortViewport, userChoice) {
|
|
1502
|
+
return userChoice ?? shortViewport;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1500
1505
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/ribbon/ribbon-tabs.css?raw
|
|
1501
|
-
var ribbon_tabs_default = ":host {\n display: block;\n min-width: 0;\n}\n.head {\n display: flex;\n align-items: stretch;\n min-width: 0;\n border-bottom: var(--office-border-width) solid var(--office-border);\n}\n.file {\n flex: none;\n min-height: var(--office-ribbon-tab-height);\n margin: 0 var(--office-space-1) 0 0;\n padding: var(--office-space-1-5) var(--office-space-4);\n border: 0;\n border-radius: 0;\n background: var(--office-accent);\n color: var(--office-accent-foreground);\n font: inherit;\n font-size: var(--office-font-size);\n cursor: pointer;\n}\n.file:hover {\n background: var(--office-accent-hover);\n}\n.file[hidden] {\n display: none;\n}\n[role='tablist'] {\n display: flex;\n flex: 0 1 auto;\n align-items: stretch;\n min-width: 0;\n overflow-x: auto;\n scrollbar-width: none;\n}\n[role='tab'] {\n position: relative;\n flex: none;\n min-height: var(--office-ribbon-tab-height);\n padding: var(--office-space-1-5) var(--office-space-3);\n border: 0;\n border-radius: 0;\n background: transparent;\n color: var(--office-muted-foreground);\n font: inherit;\n font-size: var(--office-font-size);\n cursor: pointer;\n}\n[role='tab']:hover {\n color: var(--office-foreground);\n background: var(--office-surface);\n}\n[role='tab'][aria-selected='true'] {\n color: var(--office-accent);\n}\n[role='tab'][aria-selected='true']::after {\n content: '';\n position: absolute;\n inset: auto 0 0;\n height: var(--office-tab-indicator-width);\n background: var(--office-accent);\n}\n[role='tab'][data-contextual],\n[role='tab'][data-contextual][aria-selected='true'] {\n color: var(--office-ribbon-contextual);\n}\n[role='tab'][data-contextual][aria-selected='true']::after {\n background: var(--office-ribbon-contextual);\n}\n.file:focus-visible,\n[role='tab']:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: calc(-1 * var(--office-focus-width));\n}\n::slotted([slot='search']) {\n align-self: center;\n}\n/* The auto start margin keeps the actions, and the collapse button after them, at the right end of\n the tab row even while the slot is empty. */\nslot[name='actions'] {\n display: flex;\n flex: none;\n align-items: center;\n gap: var(--office-space-1);\n margin-inline: auto var(--office-space-1);\n}\n\n.collapse {\n flex: none;\n align-self: center;\n width: var(--office-target-size);\n height: var(--office-target-size);\n margin-inline: 0 var(--office-space-1);\n padding: 0;\n border: 0;\n border-radius: var(--office-radius-sm);\n background: none;\n color: var(--office-muted-foreground);\n cursor: pointer;\n}\n.collapse[hidden] {\n display: none;\n}\n.collapse:hover {\n background: var(--office-surface);\n}\n.collapse:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n}\n.collapse .glyph {\n width: var(--office-icon-size);\n height: var(--office-icon-size);\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n transform: rotate(90deg);\n}\n.collapse[aria-pressed='true'] .glyph {\n transform: rotate(-90deg);\n}\n:host([collapsed][peek]) {\n position: relative;\n}\n:host([collapsed][peek]) ::slotted([data-ribbon-tab]:not([hidden])) {\n position: absolute;\n inset: 100% 0 auto;\n z-index: 60;\n border-bottom: var(--office-border-width) solid var(--office-border);\n background: var(--office-background);\n box-shadow: var(--office-shadow);\n}\n\n@media (max-width: 760px), (pointer: coarse) {\n .file,\n [role='tab'] {\n min-height: var(--office-target-size-touch);\n }\n .file {\n min-width: var(--office-ribbon-file-min-width);\n }\n}\n@media (forced-colors: active) {\n .file {\n border: var(--office-border-width) solid ButtonText;\n }\n [role='tab'][aria-selected='true']::after {\n background: Highlight;\n }\n}\n";
|
|
1506
|
+
var ribbon_tabs_default = ":host {\n display: block;\n min-width: 0;\n}\n.head {\n display: flex;\n align-items: stretch;\n min-width: 0;\n border-bottom: var(--office-border-width) solid var(--office-border);\n}\n.file {\n flex: none;\n min-height: var(--office-ribbon-tab-height);\n margin: 0 var(--office-space-1) 0 0;\n padding: var(--office-space-1-5) var(--office-space-4);\n border: 0;\n border-radius: 0;\n background: var(--office-accent);\n color: var(--office-accent-foreground);\n font: inherit;\n font-size: var(--office-font-size);\n cursor: pointer;\n}\n.file:hover {\n background: var(--office-accent-hover);\n}\n.file[hidden] {\n display: none;\n}\n[role='tablist'] {\n display: flex;\n flex: 0 1 auto;\n align-items: stretch;\n min-width: 0;\n overflow-x: auto;\n scrollbar-width: none;\n scroll-snap-type: x proximity;\n scroll-padding-inline: var(--office-space-4);\n overscroll-behavior-x: contain;\n -webkit-overflow-scrolling: touch;\n}\n[role='tablist']::-webkit-scrollbar {\n display: none;\n}\n[role='tab'] {\n scroll-snap-align: start;\n position: relative;\n flex: none;\n min-height: var(--office-ribbon-tab-height);\n padding: var(--office-space-1-5) var(--office-space-3);\n border: 0;\n border-radius: 0;\n background: transparent;\n color: var(--office-muted-foreground);\n font: inherit;\n font-size: var(--office-font-size);\n cursor: pointer;\n}\n[role='tab']:hover {\n color: var(--office-foreground);\n background: var(--office-surface);\n}\n[role='tab'][aria-selected='true'] {\n color: var(--office-accent);\n}\n[role='tab'][aria-selected='true']::after {\n content: '';\n position: absolute;\n inset: auto 0 0;\n height: var(--office-tab-indicator-width);\n background: var(--office-accent);\n}\n[role='tab'][data-contextual],\n[role='tab'][data-contextual][aria-selected='true'] {\n color: var(--office-ribbon-contextual);\n}\n[role='tab'][data-contextual][aria-selected='true']::after {\n background: var(--office-ribbon-contextual);\n}\n.file:focus-visible,\n[role='tab']:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: calc(-1 * var(--office-focus-width));\n}\n::slotted([slot='search']) {\n align-self: center;\n}\n/* The auto start margin keeps the actions, and the collapse button after them, at the right end of\n the tab row even while the slot is empty. */\nslot[name='actions'] {\n display: flex;\n flex: none;\n align-items: center;\n gap: var(--office-space-1);\n margin-inline: auto var(--office-space-1);\n}\n\n.collapse {\n flex: none;\n align-self: center;\n width: var(--office-target-size);\n height: var(--office-target-size);\n margin-inline: 0 var(--office-space-1);\n padding: 0;\n border: 0;\n border-radius: var(--office-radius-sm);\n background: none;\n color: var(--office-muted-foreground);\n cursor: pointer;\n}\n.collapse[hidden] {\n display: none;\n}\n.collapse:hover {\n background: var(--office-surface);\n}\n.collapse:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n}\n.collapse .glyph {\n width: var(--office-icon-size);\n height: var(--office-icon-size);\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n transform: rotate(90deg);\n}\n.collapse[aria-pressed='true'] .glyph {\n transform: rotate(-90deg);\n}\n:host([collapsed][peek]) {\n position: relative;\n}\n:host([collapsed][peek]) ::slotted([data-ribbon-tab]:not([hidden])) {\n position: absolute;\n inset: 100% 0 auto;\n z-index: 60;\n border-bottom: var(--office-border-width) solid var(--office-border);\n background: var(--office-background);\n box-shadow: var(--office-shadow);\n}\n\n@media (max-width: 760px), (pointer: coarse) {\n .file,\n [role='tab'] {\n min-height: var(--office-target-size-touch);\n }\n [role='tab'] {\n min-width: var(--office-target-size-touch);\n }\n}\n@media (pointer: coarse) {\n .collapse {\n width: var(--office-target-size-touch);\n height: var(--office-target-size-touch);\n }\n}\n@media (max-width: 760px), (pointer: coarse) {\n .file {\n min-width: var(--office-ribbon-file-min-width);\n }\n}\n/* A phone portrait row cannot hold the tabs and the actions: the tabs keep the first row (File and a\n scrolling tab strip) and the actions wrap under them. */\n@media (max-width: 520px) {\n .head {\n flex-wrap: wrap;\n }\n [role='tablist'] {\n flex: 1 1 12rem;\n }\n slot[name='actions'] {\n order: 2;\n }\n .collapse {\n order: 3;\n }\n}\n@media (forced-colors: active) {\n .file {\n border: var(--office-border-width) solid ButtonText;\n }\n [role='tab'][aria-selected='true']::after {\n background: Highlight;\n }\n}\n";
|
|
1502
1507
|
|
|
1503
1508
|
// src/ribbon/ribbon-tabs.ts
|
|
1504
1509
|
var OfficeUiRibbon = class extends OfficeElement {
|
|
@@ -1597,7 +1602,19 @@ var OfficeUiRibbon = class extends OfficeElement {
|
|
|
1597
1602
|
};
|
|
1598
1603
|
});
|
|
1599
1604
|
}
|
|
1605
|
+
/** The user's own collapse choice; it wins over the automatic one on short viewports. */
|
|
1606
|
+
userCollapsed;
|
|
1607
|
+
shortQuery;
|
|
1608
|
+
/** Collapses to the tab row on a short viewport (phone landscape) unless the user chose. */
|
|
1609
|
+
applyAuto = () => {
|
|
1610
|
+
if (!this.collapsible) return;
|
|
1611
|
+
const next = resolveCollapsed(this.shortQuery?.matches ?? false, this.userCollapsed);
|
|
1612
|
+
if (next === this.collapsed) return;
|
|
1613
|
+
this.collapsed = next;
|
|
1614
|
+
this.peek = false;
|
|
1615
|
+
};
|
|
1600
1616
|
setCollapsed(value) {
|
|
1617
|
+
this.userCollapsed = value;
|
|
1601
1618
|
if (value === this.collapsed) return;
|
|
1602
1619
|
this.collapsed = value;
|
|
1603
1620
|
this.peek = false;
|
|
@@ -1618,6 +1635,7 @@ var OfficeUiRibbon = class extends OfficeElement {
|
|
|
1618
1635
|
this.peek = false;
|
|
1619
1636
|
}
|
|
1620
1637
|
willUpdate(changed) {
|
|
1638
|
+
if (changed.has("collapsible")) this.applyAuto();
|
|
1621
1639
|
if (changed.has("peek")) {
|
|
1622
1640
|
const doc = this.ownerDocument;
|
|
1623
1641
|
if (this.peek) doc.addEventListener("pointerdown", this.onOutside, true);
|
|
@@ -1657,6 +1675,9 @@ var OfficeUiRibbon = class extends OfficeElement {
|
|
|
1657
1675
|
this.build();
|
|
1658
1676
|
super.connectedCallback();
|
|
1659
1677
|
this.addEventListener("keydown", this.onHostKey);
|
|
1678
|
+
this.shortQuery = this.ownerDocument.defaultView?.matchMedia?.(SHORT_VIEWPORT_MEDIA);
|
|
1679
|
+
this.shortQuery?.addEventListener("change", this.applyAuto);
|
|
1680
|
+
this.applyAuto();
|
|
1660
1681
|
const Observer = this.ownerDocument.defaultView?.MutationObserver;
|
|
1661
1682
|
this.watcher = Observer ? new Observer(() => this.build()) : void 0;
|
|
1662
1683
|
this.watcher?.observe(this, {
|
|
@@ -1669,6 +1690,7 @@ var OfficeUiRibbon = class extends OfficeElement {
|
|
|
1669
1690
|
super.disconnectedCallback();
|
|
1670
1691
|
this.removeEventListener("keydown", this.onHostKey);
|
|
1671
1692
|
this.watcher?.disconnect();
|
|
1693
|
+
this.shortQuery?.removeEventListener("change", this.applyAuto);
|
|
1672
1694
|
this.ownerDocument.removeEventListener("pointerdown", this.onOutside, true);
|
|
1673
1695
|
this.watcher = void 0;
|
|
1674
1696
|
}
|
|
@@ -1678,6 +1700,14 @@ var OfficeUiRibbon = class extends OfficeElement {
|
|
|
1678
1700
|
const hideAll = this.collapsed && !this.peek;
|
|
1679
1701
|
for (const panel of this.panels())
|
|
1680
1702
|
panel.hidden = hideAll || panel.dataset.ribbonTab !== selected;
|
|
1703
|
+
const active = this.tabButton(selected);
|
|
1704
|
+
const list = active?.parentElement;
|
|
1705
|
+
if (active && list && list.scrollWidth > list.clientWidth) {
|
|
1706
|
+
const tab = active.getBoundingClientRect();
|
|
1707
|
+
const view = list.getBoundingClientRect();
|
|
1708
|
+
if (tab.left < view.left) list.scrollLeft -= view.left - tab.left;
|
|
1709
|
+
else if (tab.right > view.right) list.scrollLeft += tab.right - view.right;
|
|
1710
|
+
}
|
|
1681
1711
|
}
|
|
1682
1712
|
render() {
|
|
1683
1713
|
const selected = this.selected;
|
|
@@ -3773,39 +3803,119 @@ var OfficeUiMenuButton = class _OfficeUiMenuButton extends OfficeElement {
|
|
|
3773
3803
|
}
|
|
3774
3804
|
};
|
|
3775
3805
|
var defineMenuButton = definer("office-ui-menu-button", () => OfficeUiMenuButton);
|
|
3776
|
-
|
|
3777
|
-
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/dialog/options-dialog.css?raw
|
|
3778
|
-
var options_dialog_default = ":host {\n display: contents;\n}\noffice-ui-dialog {\n --office-dialog-width: var(--office-options-width);\n --office-dialog-max-width: var(--office-options-width);\n}\n.layout {\n display: grid;\n grid-template-columns: var(--office-options-nav-width) minmax(0, 1fr);\n gap: 0;\n min-height: var(--office-options-min-height);\n margin: calc(-1 * var(--office-space-4));\n}\nnav {\n display: flex;\n flex-direction: column;\n padding: var(--office-space-2) 0;\n border-inline-end: var(--office-border-width) solid var(--office-border);\n background: var(--office-surface);\n overflow: auto;\n}\nnav button {\n min-height: var(--office-options-row-height);\n padding: var(--office-space-1) var(--office-space-3-5);\n border: 0;\n border-radius: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: pointer;\n}\nnav button[aria-selected='true'] {\n background: var(--office-selected);\n font-weight: 600;\n box-shadow: inset var(--office-selection-bar-width) 0 0 var(--office-accent);\n}\nnav button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: calc(-1 * var(--office-focus-width));\n}\n[role='tabpanel'] {\n padding: var(--office-space-4) var(--office-space-5);\n overflow: auto;\n}\n.lead {\n margin: 0 0 var(--office-space-3);\n font-size: var(--office-font-size-md);\n}\n.unavailable {\n margin: 0 0 var(--office-space-3);\n color: var(--office-muted-foreground);\n}\nsection + section {\n margin-top: var(--office-space-4);\n}\nh3 {\n margin: 0 0 var(--office-space-2);\n padding-bottom: var(--office-space-1);\n border-bottom: var(--office-border-width) solid var(--office-border);\n font-size: var(--office-font-size);\n font-weight: 600;\n}\n.desc {\n margin: 0 0 var(--office-space-2);\n color: var(--office-muted-foreground);\n}\n.row {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n min-height: var(--office-options-row-height);\n}\n.row.indent {\n padding-inline-start: var(--office-space-6);\n}\n.row.field > span:first-child {\n min-width: var(--office-options-label-width);\n}\n.row[data-disabled] {\n color: var(--office-muted-foreground);\n}\ninput[type='text'],\ninput[type='number'],\nselect {\n min-height: var(--office-input-height);\n box-sizing: border-box;\n font: inherit;\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-sm);\n background: var(--office-background);\n color: inherit;\n}\ninput[type='number'] {\n width: var(--office-options-number-width);\n}\n.info {\n display: inline-grid;\n place-items: center;\n width: var(--office-info-size);\n height: var(--office-info-size);\n border: var(--office-border-width) solid currentColor;\n border-radius: 50%;\n font-size: var(--office-font-size-2xs);\n color: var(--office-muted-foreground);\n cursor: help;\n}\n.actions {\n display: flex;\n gap: var(--office-space-2);\n}\n.actions button {\n min-width: var(--office-dialog-button-min-width);\n min-height: var(--office-control-height-md);\n font: inherit;\n cursor: pointer;\n}\n@media (max-width: 600px) {\n .layout {\n grid-template-columns: 1fr;\n }\n nav {\n flex-direction: row;\n border-inline-end: 0;\n border-bottom: var(--office-border-width) solid var(--office-border);\n }\n nav button {\n white-space: nowrap;\n }\n .row.field {\n flex-wrap: wrap;\n }\n}\n";
|
|
3779
|
-
|
|
3780
|
-
// src/dialog/options-dialog.ts
|
|
3781
3806
|
function clampOptionNumber(raw, min, max) {
|
|
3782
3807
|
const parsed = Number(raw);
|
|
3783
3808
|
return Number.isFinite(parsed) && raw.trim() !== "" ? Math.min(max, Math.max(min, parsed)) : void 0;
|
|
3784
3809
|
}
|
|
3810
|
+
function optionRow(host, control) {
|
|
3811
|
+
const { draft } = host;
|
|
3812
|
+
const value = draft[control.key];
|
|
3813
|
+
const locked = Boolean(control.disabled) || control.enabledBy && draft[control.enabledBy] !== true;
|
|
3814
|
+
const disabled = Boolean(locked);
|
|
3815
|
+
const info = control.info ? html`<span class="info" title=${control.info} role="img" aria-label=${control.info}>i</span>` : "";
|
|
3816
|
+
const label = html`<span class="label">${control.label}${info}</span>`;
|
|
3817
|
+
let body;
|
|
3818
|
+
if (control.kind === "toggle")
|
|
3819
|
+
body = html`${label}<input
|
|
3820
|
+
type="checkbox"
|
|
3821
|
+
.checked=${value === true}
|
|
3822
|
+
?disabled=${disabled}
|
|
3823
|
+
@change=${(event) => host.set(control.key, event.target.checked)}
|
|
3824
|
+
/>`;
|
|
3825
|
+
else if (control.kind === "select") {
|
|
3826
|
+
const current = String(value ?? control.choices[0]?.value ?? "");
|
|
3827
|
+
body = html`${label}<select
|
|
3828
|
+
aria-label=${control.label}
|
|
3829
|
+
?disabled=${disabled}
|
|
3830
|
+
@change=${(event) => host.set(control.key, event.target.value)}
|
|
3831
|
+
>
|
|
3832
|
+
${control.choices.map(
|
|
3833
|
+
(choice) => html`<option value=${choice.value} .selected=${choice.value === current}
|
|
3834
|
+
>${choice.label}</option
|
|
3835
|
+
>`
|
|
3836
|
+
)}
|
|
3837
|
+
</select>`;
|
|
3838
|
+
} else if (control.kind === "number")
|
|
3839
|
+
body = html`${label}<span class="number"
|
|
3840
|
+
><input
|
|
3841
|
+
type="number"
|
|
3842
|
+
min=${control.min}
|
|
3843
|
+
max=${control.max}
|
|
3844
|
+
step=${ifDefined(control.step ? String(control.step) : void 0)}
|
|
3845
|
+
aria-label=${control.label}
|
|
3846
|
+
.value=${value === void 0 ? "" : String(value)}
|
|
3847
|
+
?disabled=${disabled}
|
|
3848
|
+
@change=${(event) => {
|
|
3849
|
+
const field = event.target;
|
|
3850
|
+
const next = clampOptionNumber(field.value, control.min, control.max);
|
|
3851
|
+
if (next === void 0) field.value = String(draft[control.key] ?? "");
|
|
3852
|
+
else {
|
|
3853
|
+
field.value = String(next);
|
|
3854
|
+
host.set(control.key, next);
|
|
3855
|
+
}
|
|
3856
|
+
}}
|
|
3857
|
+
/>${control.unit ? html`<span class="unit">${control.unit}</span>` : ""}</span
|
|
3858
|
+
>`;
|
|
3859
|
+
else
|
|
3860
|
+
body = html`${label}<input
|
|
3861
|
+
type="text"
|
|
3862
|
+
maxlength=${ifDefined(control.maxLength ? String(control.maxLength) : void 0)}
|
|
3863
|
+
aria-label=${control.label}
|
|
3864
|
+
.value=${value === void 0 ? "" : String(value)}
|
|
3865
|
+
?disabled=${disabled}
|
|
3866
|
+
@input=${(event) => host.set(control.key, event.target.value)}
|
|
3867
|
+
/>`;
|
|
3868
|
+
return html`<label
|
|
3869
|
+
class="row${control.indent ? " indent" : ""}"
|
|
3870
|
+
data-key=${control.key}
|
|
3871
|
+
?data-disabled=${disabled}
|
|
3872
|
+
title=${ifDefined(control.disabled)}
|
|
3873
|
+
>${body}</label
|
|
3874
|
+
>`;
|
|
3875
|
+
}
|
|
3876
|
+
|
|
3877
|
+
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/dialog/options-dialog.css?raw
|
|
3878
|
+
var options_dialog_default = ":host {\n display: contents;\n}\noffice-ui-dialog {\n --office-dialog-width: var(--office-options-width);\n --office-dialog-max-width: var(--office-options-width);\n --office-dialog-max-height: 88vh;\n}\n.layout {\n display: grid;\n grid-template-columns: var(--office-options-nav-width) minmax(0, 1fr);\n height: var(--office-options-height);\n max-height: calc(88vh - var(--office-options-chrome-height));\n margin: calc(-1 * var(--office-space-4));\n font-size: var(--office-font-size-sm);\n}\nnav {\n display: flex;\n flex-direction: column;\n gap: var(--office-space-0);\n padding: var(--office-space-2);\n border-inline-end: var(--office-border-width) solid var(--office-border);\n overflow: auto;\n}\nnav button {\n padding: var(--office-space-2) var(--office-space-2-5);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: start;\n white-space: nowrap;\n cursor: pointer;\n}\nnav button:hover {\n background: var(--office-selected);\n}\nnav button[aria-selected='true'] {\n background: color-mix(in srgb, var(--office-accent) 14%, transparent);\n color: var(--office-accent);\n font-weight: 600;\n}\nnav button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: calc(-1 * var(--office-focus-width));\n}\n[role='tabpanel'] {\n min-width: 0;\n padding: var(--office-space-3-5) var(--office-space-5);\n overflow: auto;\n}\n.lead {\n margin: 0 0 var(--office-space-3);\n font-weight: 600;\n}\n.unavailable {\n margin: 0 0 var(--office-space-3);\n color: var(--office-muted-foreground);\n}\nsection {\n margin: 0 0 var(--office-space-4);\n}\nh3 {\n margin: 0 0 var(--office-space-1);\n padding-bottom: var(--office-space-0);\n border-bottom: var(--office-border-width) solid var(--office-border);\n color: var(--office-muted-foreground);\n font-size: var(--office-font-size-2xs);\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n}\n.desc {\n margin: 0 0 var(--office-space-2);\n color: var(--office-muted-foreground);\n font-size: var(--office-font-size-xs);\n}\n.row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-3);\n min-height: var(--office-options-row-height);\n padding: var(--office-space-0) 0;\n cursor: pointer;\n}\n.row.indent {\n padding-inline-start: var(--office-space-6);\n}\n.row[data-disabled] {\n color: var(--office-muted-foreground);\n cursor: default;\n}\n.label {\n display: inline-flex;\n align-items: center;\n gap: var(--office-space-1);\n min-width: 0;\n}\ninput[type='text'],\ninput[type='number'],\nselect {\n box-sizing: border-box;\n max-width: 55%;\n padding: var(--office-space-1) var(--office-space-1-5);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius);\n background: var(--office-surface);\n color: inherit;\n font: inherit;\n}\ninput[type='text'] {\n width: var(--office-options-text-width);\n}\ninput[type='number'] {\n width: var(--office-options-number-width);\n text-align: end;\n}\ninput:disabled,\nselect:disabled {\n opacity: 0.55;\n}\ninput[type='checkbox'] {\n flex: none;\n width: var(--office-options-check-size);\n height: var(--office-options-check-size);\n margin: 0;\n accent-color: var(--office-accent);\n}\n.number {\n display: inline-flex;\n align-items: center;\n gap: var(--office-space-1-5);\n}\n.unit {\n color: var(--office-muted-foreground);\n font-size: var(--office-font-size-xs);\n}\n.info {\n display: inline-grid;\n place-items: center;\n flex: none;\n width: var(--office-info-size);\n height: var(--office-info-size);\n border: var(--office-border-width) solid currentColor;\n border-radius: 50%;\n font-size: var(--office-font-size-3xs);\n font-style: normal;\n color: var(--office-accent);\n opacity: 0.75;\n cursor: help;\n}\n.actions {\n display: flex;\n flex: 1;\n justify-content: flex-end;\n gap: var(--office-space-2);\n}\n.actions button {\n min-width: var(--office-dialog-button-min-width);\n min-height: var(--office-control-height-md);\n padding: 0 var(--office-space-3);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius);\n background: var(--office-surface);\n color: inherit;\n font: inherit;\n font-size: var(--office-font-size-sm);\n cursor: pointer;\n}\n.actions button:hover {\n background: var(--office-selected);\n}\n.actions .primary {\n border-color: var(--office-accent);\n background: var(--office-accent);\n color: var(--office-accent-foreground);\n}\n.actions .primary:hover {\n background: var(--office-accent);\n filter: brightness(1.08);\n}\n@media (max-width: 767px) {\n .layout {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: auto minmax(0, 1fr);\n }\n nav {\n flex-direction: row;\n border-inline-end: 0;\n border-bottom: var(--office-border-width) solid var(--office-border);\n }\n nav button,\n .actions button {\n min-height: var(--office-target-size-touch);\n }\n .row {\n min-height: var(--office-target-size-touch);\n }\n input[type='text'],\n input[type='number'],\n select {\n min-height: var(--office-target-size-touch);\n }\n .actions {\n flex-wrap: wrap;\n }\n}\n@media (forced-colors: active) {\n nav button[aria-selected='true'] {\n outline: var(--office-border-width) solid Highlight;\n }\n}\n";
|
|
3879
|
+
|
|
3880
|
+
// src/dialog/options-dialog.ts
|
|
3881
|
+
var DEFAULT_LABELS = {
|
|
3882
|
+
ok: "OK",
|
|
3883
|
+
cancel: "Cancel",
|
|
3884
|
+
reset: "Reset all options",
|
|
3885
|
+
categories: "Categories",
|
|
3886
|
+
close: "Close"
|
|
3887
|
+
};
|
|
3785
3888
|
var OfficeUiOptionsDialog = class extends OfficeElement {
|
|
3786
3889
|
static styles = controlStyles(options_dialog_default);
|
|
3787
3890
|
static properties = {
|
|
3788
3891
|
open: flag,
|
|
3789
3892
|
heading: { type: String },
|
|
3790
3893
|
categories: { attribute: false },
|
|
3894
|
+
defaults: { attribute: false },
|
|
3895
|
+
labels: { attribute: false },
|
|
3791
3896
|
// `values` keeps a private copy and `category` validates its id, so both have accessors.
|
|
3792
3897
|
active: { state: true }
|
|
3793
3898
|
};
|
|
3794
3899
|
committed = {};
|
|
3795
|
-
|
|
3900
|
+
draftValues = {};
|
|
3796
3901
|
constructor() {
|
|
3797
3902
|
super();
|
|
3798
3903
|
this.open = false;
|
|
3799
3904
|
this.heading = null;
|
|
3800
3905
|
this.categories = [];
|
|
3906
|
+
this.defaults = null;
|
|
3907
|
+
this.labels = {};
|
|
3801
3908
|
this.active = "";
|
|
3802
3909
|
}
|
|
3910
|
+
get draft() {
|
|
3911
|
+
return this.draftValues;
|
|
3912
|
+
}
|
|
3803
3913
|
get values() {
|
|
3804
3914
|
return { ...this.committed };
|
|
3805
3915
|
}
|
|
3806
3916
|
set values(value) {
|
|
3807
3917
|
this.committed = { ...value };
|
|
3808
|
-
if (!present(this.open)) this.
|
|
3918
|
+
if (!present(this.open)) this.draftValues = { ...value };
|
|
3809
3919
|
this.requestUpdate("values");
|
|
3810
3920
|
}
|
|
3811
3921
|
/** The selected category id. */
|
|
@@ -3818,16 +3928,23 @@ var OfficeUiOptionsDialog = class extends OfficeElement {
|
|
|
3818
3928
|
show() {
|
|
3819
3929
|
this.open = true;
|
|
3820
3930
|
}
|
|
3931
|
+
/** Closes without applying: the draft is dropped and `office-options-cancel` is emitted. */
|
|
3821
3932
|
close() {
|
|
3933
|
+
const wasOpen = present(this.open);
|
|
3822
3934
|
this.open = false;
|
|
3935
|
+
if (wasOpen) this.fire("office-options-cancel", {});
|
|
3823
3936
|
}
|
|
3824
3937
|
commit() {
|
|
3825
|
-
const changed = Object.keys(this.
|
|
3826
|
-
(key) => this.
|
|
3938
|
+
const changed = Object.keys(this.draftValues).filter(
|
|
3939
|
+
(key) => this.draftValues[key] !== this.committed[key]
|
|
3827
3940
|
);
|
|
3828
|
-
this.committed = { ...this.
|
|
3941
|
+
this.committed = { ...this.draftValues };
|
|
3829
3942
|
this.fire("office-options-change", { values: { ...this.committed }, changed });
|
|
3830
|
-
this.
|
|
3943
|
+
this.open = false;
|
|
3944
|
+
}
|
|
3945
|
+
resetAll() {
|
|
3946
|
+
this.draftValues = { ...this.draftValues, ...this.defaults };
|
|
3947
|
+
this.requestUpdate();
|
|
3831
3948
|
}
|
|
3832
3949
|
onNavKey(event) {
|
|
3833
3950
|
const tabs = [...this.renderRoot.querySelectorAll('nav [role="tab"]')];
|
|
@@ -3842,73 +3959,11 @@ var OfficeUiOptionsDialog = class extends OfficeElement {
|
|
|
3842
3959
|
willUpdate(changed) {
|
|
3843
3960
|
if (!this.categories.some((category) => category.id === this.active))
|
|
3844
3961
|
this.active = this.categories[0]?.id ?? "";
|
|
3845
|
-
if (changed.has("open") && present(this.open)) this.
|
|
3962
|
+
if (changed.has("open") && present(this.open)) this.draftValues = { ...this.committed };
|
|
3846
3963
|
}
|
|
3847
3964
|
set(key, next) {
|
|
3848
|
-
this.
|
|
3849
|
-
|
|
3850
|
-
control(control) {
|
|
3851
|
-
const value = this.draft[control.key];
|
|
3852
|
-
const disabled = Boolean(control.disabled);
|
|
3853
|
-
const info = control.info ? html`<span class="info" title=${control.info} role="img" aria-label=${control.info}
|
|
3854
|
-
>i</span
|
|
3855
|
-
>` : "";
|
|
3856
|
-
let body;
|
|
3857
|
-
if (control.kind === "toggle")
|
|
3858
|
-
body = html`<input
|
|
3859
|
-
type="checkbox"
|
|
3860
|
-
.checked=${value === true}
|
|
3861
|
-
?disabled=${disabled}
|
|
3862
|
-
@change=${(event) => this.set(control.key, event.target.checked)}
|
|
3863
|
-
/><span>${control.label}</span>`;
|
|
3864
|
-
else if (control.kind === "select") {
|
|
3865
|
-
const current = String(value ?? control.choices[0]?.value ?? "");
|
|
3866
|
-
body = html`<span>${control.label}</span
|
|
3867
|
-
><select
|
|
3868
|
-
?disabled=${disabled}
|
|
3869
|
-
@change=${(event) => this.set(control.key, event.target.value)}
|
|
3870
|
-
>
|
|
3871
|
-
${control.choices.map(
|
|
3872
|
-
(choice) => html`<option value=${choice.value} ?selected=${choice.value === current}
|
|
3873
|
-
>${choice.label}</option
|
|
3874
|
-
>`
|
|
3875
|
-
)}
|
|
3876
|
-
</select>`;
|
|
3877
|
-
} else if (control.kind === "number")
|
|
3878
|
-
body = html`<span>${control.label}</span
|
|
3879
|
-
><input
|
|
3880
|
-
type="number"
|
|
3881
|
-
min=${control.min}
|
|
3882
|
-
max=${control.max}
|
|
3883
|
-
step=${ifDefined(control.step ? String(control.step) : void 0)}
|
|
3884
|
-
.value=${value === void 0 ? "" : String(value)}
|
|
3885
|
-
?disabled=${disabled}
|
|
3886
|
-
@change=${(event) => {
|
|
3887
|
-
const field = event.target;
|
|
3888
|
-
const next = clampOptionNumber(field.value, control.min, control.max);
|
|
3889
|
-
if (next === void 0) field.value = String(this.draft[control.key] ?? "");
|
|
3890
|
-
else {
|
|
3891
|
-
field.value = String(next);
|
|
3892
|
-
this.set(control.key, next);
|
|
3893
|
-
}
|
|
3894
|
-
}}
|
|
3895
|
-
/>${control.unit ? html`<span>${control.unit}</span>` : ""}`;
|
|
3896
|
-
else
|
|
3897
|
-
body = html`<span>${control.label}</span
|
|
3898
|
-
><input
|
|
3899
|
-
type="text"
|
|
3900
|
-
maxlength=${ifDefined(control.maxLength ? String(control.maxLength) : void 0)}
|
|
3901
|
-
.value=${value === void 0 ? "" : String(value)}
|
|
3902
|
-
?disabled=${disabled}
|
|
3903
|
-
@input=${(event) => this.set(control.key, event.target.value)}
|
|
3904
|
-
/>`;
|
|
3905
|
-
return html`<label
|
|
3906
|
-
class="row${control.indent ? " indent" : ""}${control.kind === "toggle" ? "" : " field"}"
|
|
3907
|
-
data-key=${control.key}
|
|
3908
|
-
?data-disabled=${disabled}
|
|
3909
|
-
title=${ifDefined(control.disabled)}
|
|
3910
|
-
>${body}${info}</label
|
|
3911
|
-
>`;
|
|
3965
|
+
this.draftValues[key] = next;
|
|
3966
|
+
this.requestUpdate();
|
|
3912
3967
|
}
|
|
3913
3968
|
pane(category) {
|
|
3914
3969
|
if (!category) return "";
|
|
@@ -3919,16 +3974,19 @@ var OfficeUiOptionsDialog = class extends OfficeElement {
|
|
|
3919
3974
|
(section) => html`<section>
|
|
3920
3975
|
<h3>${section.title}</h3>
|
|
3921
3976
|
${section.description ? html`<p class="desc">${section.description}</p>` : ""}
|
|
3922
|
-
${section.controls.map((control) => this
|
|
3977
|
+
${section.controls.map((control) => optionRow(this, control))}
|
|
3923
3978
|
</section>`
|
|
3924
3979
|
)}
|
|
3980
|
+
${category.custom ? html`<slot name="pane-${category.id}"></slot>` : ""}
|
|
3925
3981
|
`;
|
|
3926
3982
|
}
|
|
3927
3983
|
render() {
|
|
3928
3984
|
const category = this.categories.find((entry) => entry.id === this.active);
|
|
3985
|
+
const text = { ...DEFAULT_LABELS, ...this.labels };
|
|
3929
3986
|
return html`
|
|
3930
3987
|
<office-ui-dialog
|
|
3931
3988
|
heading=${this.heading ?? "Options"}
|
|
3989
|
+
close-label=${text.close}
|
|
3932
3990
|
?open=${present(this.open)}
|
|
3933
3991
|
@office-dialog-close=${(event) => {
|
|
3934
3992
|
if (!event.defaultPrevented) this.close();
|
|
@@ -3938,7 +3996,7 @@ var OfficeUiOptionsDialog = class extends OfficeElement {
|
|
|
3938
3996
|
<nav
|
|
3939
3997
|
role="tablist"
|
|
3940
3998
|
aria-orientation="vertical"
|
|
3941
|
-
aria-label
|
|
3999
|
+
aria-label=${text.categories}
|
|
3942
4000
|
@keydown=${this.onNavKey}
|
|
3943
4001
|
>
|
|
3944
4002
|
${this.categories.map(
|
|
@@ -3963,8 +4021,18 @@ var OfficeUiOptionsDialog = class extends OfficeElement {
|
|
|
3963
4021
|
>
|
|
3964
4022
|
</div>
|
|
3965
4023
|
<div slot="footer" class="actions">
|
|
3966
|
-
|
|
3967
|
-
|
|
4024
|
+
${this.defaults ? html`<button
|
|
4025
|
+
type="button"
|
|
4026
|
+
class="reset"
|
|
4027
|
+
data-action="reset"
|
|
4028
|
+
@click=${this.resetAll}
|
|
4029
|
+
>
|
|
4030
|
+
${text.reset}
|
|
4031
|
+
</button>` : ""}
|
|
4032
|
+
<button type="button" data-action="cancel" @click=${this.close}>${text.cancel}</button>
|
|
4033
|
+
<button type="button" class="primary" data-action="ok" @click=${this.commit}>
|
|
4034
|
+
${text.ok}
|
|
4035
|
+
</button>
|
|
3968
4036
|
</div>
|
|
3969
4037
|
</office-ui-dialog>
|
|
3970
4038
|
`;
|
|
@@ -4431,7 +4499,7 @@ var OfficeUiSelect = class extends OfficeElement {
|
|
|
4431
4499
|
var defineSelect = definer("office-ui-select", () => OfficeUiSelect);
|
|
4432
4500
|
|
|
4433
4501
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/chrome/status-bar.css?raw
|
|
4434
|
-
var status_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: var(--office-status-bar-height);\n padding: 0 var(--office-space-2);\n font-size: var(--office-font-size-xs);\n background: var(--office-surface);\n color: var(--office-foreground);\n border-top: var(--office-border-width) solid var(--office-border);\n font-family: var(--office-font);\n}\n::slotted([slot='end']) {\n margin-inline-start: auto;\n}\n.bar {\n display: contents;\n}\n[hidden] {\n display: none !important;\n}\n:host([data-controlled]) {\n display: block;\n flex: none;\n padding: 0;\n gap: 0;\n}\n:host([data-controlled]) .bar {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n width: 100%;\n min-height: var(--office-status-bar-height);\n padding: var(--office-space-0) var(--office-space-2);\n color: var(--office-muted-foreground);\n}\n:host([data-controlled]) ::slotted([slot='end']) {\n margin-inline-start: 0;\n}\n.items {\n display: flex;\n align-items: center;\n min-width: 0;\n}\n.item {\n flex:
|
|
4502
|
+
var status_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: var(--office-status-bar-height);\n padding: 0 var(--office-space-2);\n font-size: var(--office-font-size-xs);\n background: var(--office-surface);\n color: var(--office-foreground);\n border-top: var(--office-border-width) solid var(--office-border);\n font-family: var(--office-font);\n}\n::slotted([slot='end']) {\n margin-inline-start: auto;\n}\n.bar {\n display: contents;\n}\n[hidden] {\n display: none !important;\n}\n:host([data-controlled]) {\n display: block;\n flex: none;\n padding: 0;\n gap: 0;\n}\n:host([data-controlled]) .bar {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n width: 100%;\n min-height: var(--office-status-bar-height);\n padding: var(--office-space-0) var(--office-space-2);\n color: var(--office-muted-foreground);\n}\n:host([data-controlled]) ::slotted([slot='end']) {\n margin-inline-start: 0;\n}\n.items {\n display: flex;\n flex: 0 1 auto;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n}\n.item {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* The page counter is the one text that stays whole. */\n.item[aria-live] {\n flex: none;\n}\n.item + .item::before {\n content: '';\n display: inline-block;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-2);\n vertical-align: middle;\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.item.saving {\n color: var(--office-warning);\n}\n.item.error {\n color: var(--office-danger);\n}\n.spacer {\n flex: 1;\n}\n.toggles,\n.group {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.sep {\n flex: none;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-0);\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.bar button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1);\n min-width: var(--office-control-height-xs);\n min-height: var(--office-control-height-xs);\n padding: var(--office-space-1);\n border: 0;\n border-radius: var(--office-radius-sm);\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n touch-action: manipulation;\n}\n.bar button:hover {\n background: var(--office-selected);\n color: var(--office-foreground);\n}\n.bar button[aria-pressed='true'] {\n color: var(--office-accent);\n}\n.bar button:active {\n opacity: 0.8;\n}\n.bar button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.bar svg {\n flex: none;\n width: var(--office-icon-size);\n height: var(--office-icon-size);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.toggle svg,\n.zoom-step svg {\n width: var(--office-icon-size-sm);\n height: var(--office-icon-size-sm);\n}\n.zoom-fit {\n min-width: var(--office-zoom-value-width);\n font-variant-numeric: tabular-nums;\n}\n@media (max-width: 767px) {\n .narrow-hide,\n .toggle .label {\n display: none !important;\n }\n}\n@media (pointer: coarse) {\n .bar button {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n@media (forced-colors: active) {\n :host {\n background: Canvas;\n color: CanvasText;\n border-top-color: CanvasText;\n }\n .bar button {\n color: ButtonText;\n }\n .bar button:hover {\n background: Highlight;\n color: HighlightText;\n }\n .bar button[aria-pressed='true'] {\n border: var(--office-border-width) solid Highlight;\n }\n .bar button:focus-visible {\n outline-color: Highlight;\n }\n .sep,\n .item + .item::before {\n background: CanvasText;\n }\n}\n";
|
|
4435
4503
|
|
|
4436
4504
|
// src/chrome/status-bar.ts
|
|
4437
4505
|
var OfficeUiStatusBar = class extends OfficeElement {
|
|
@@ -5959,6 +6027,43 @@ function runKeyTips(root, targets, onDone, className) {
|
|
|
5959
6027
|
return stop;
|
|
5960
6028
|
}
|
|
5961
6029
|
|
|
6030
|
+
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/ribbon/scroll-more.css?raw
|
|
6031
|
+
var scroll_more_default = ".ribbon-scroll-more {\n position: sticky;\n right: 0;\n z-index: 2;\n flex: none;\n align-self: center;\n margin-left: auto;\n width: 28px;\n height: 40px;\n padding: 0;\n border: 1px solid var(--office-border, #c8c6c4);\n border-radius: 4px;\n background: var(--office-background, #fff);\n color: var(--office-foreground, #201f1e);\n font-size: 20px;\n line-height: 1;\n box-shadow: -6px 0 6px -2px rgb(0 0 0 / 12%);\n cursor: pointer;\n}\n\n@media (pointer: coarse) {\n .ribbon-scroll-more {\n width: var(--office-target-size-touch, 44px);\n height: var(--office-target-size-touch, 44px);\n }\n /* The ribbon grows to fit 44px targets instead of clipping them. */\n .ribbon-panel {\n height: auto !important;\n min-height: 104px;\n -webkit-overflow-scrolling: touch;\n }\n .ribbon-panel .ribbon-group button,\n .ribbon-panel .ribbon-group select,\n .ribbon-panel .ribbon-group input,\n .ribbon-panel .ribbon-group .ribbon-overflow-button {\n min-width: var(--office-target-size-touch, 44px);\n min-height: var(--office-target-size-touch, 44px);\n }\n}\n";
|
|
6032
|
+
|
|
6033
|
+
// src/ribbon/scroll-more.ts
|
|
6034
|
+
var STYLE_ID = "office-ui-ribbon-touch-style";
|
|
6035
|
+
var CLASS = "ribbon-scroll-more";
|
|
6036
|
+
function ensureRibbonTouchStyle(node) {
|
|
6037
|
+
const root = node.getRootNode();
|
|
6038
|
+
const doc = node.ownerDocument ?? node;
|
|
6039
|
+
const host = root instanceof ShadowRoot ? root : doc.head;
|
|
6040
|
+
if (!host || host.querySelector(`#${STYLE_ID}`)) return;
|
|
6041
|
+
const style = doc.createElement("style");
|
|
6042
|
+
style.id = STYLE_ID;
|
|
6043
|
+
style.textContent = scroll_more_default;
|
|
6044
|
+
host.append(style);
|
|
6045
|
+
}
|
|
6046
|
+
function syncScrollMore(panel, label = "More") {
|
|
6047
|
+
panel.querySelector(`:scope > .${CLASS}`)?.remove();
|
|
6048
|
+
if (panel.hidden || panel.scrollWidth <= panel.clientWidth + 1) return;
|
|
6049
|
+
ensureRibbonTouchStyle(panel);
|
|
6050
|
+
const doc = panel.ownerDocument;
|
|
6051
|
+
const text = typeof label === "function" ? label(panel) : label;
|
|
6052
|
+
const button = doc.createElement("button");
|
|
6053
|
+
button.type = "button";
|
|
6054
|
+
button.className = CLASS;
|
|
6055
|
+
button.setAttribute("aria-label", text);
|
|
6056
|
+
button.title = text;
|
|
6057
|
+
button.textContent = "\u203A";
|
|
6058
|
+
button.addEventListener("mousedown", (event) => event.preventDefault());
|
|
6059
|
+
button.addEventListener("click", () => {
|
|
6060
|
+
const end = panel.scrollWidth - panel.clientWidth - 2;
|
|
6061
|
+
const left = panel.scrollLeft >= end ? 0 : panel.scrollLeft + panel.clientWidth * 0.8;
|
|
6062
|
+
panel.scrollTo({ left, behavior: "smooth" });
|
|
6063
|
+
});
|
|
6064
|
+
panel.append(button);
|
|
6065
|
+
}
|
|
6066
|
+
|
|
5962
6067
|
// src/ribbon/overflow.ts
|
|
5963
6068
|
function createRibbonOverflow(options) {
|
|
5964
6069
|
let closeOpen;
|
|
@@ -6044,6 +6149,8 @@ function createRibbonOverflow(options) {
|
|
|
6044
6149
|
}
|
|
6045
6150
|
function fitPanel(panel) {
|
|
6046
6151
|
if (panel.hidden || !panel.clientWidth) return;
|
|
6152
|
+
ensureRibbonTouchStyle(panel);
|
|
6153
|
+
panel.querySelector(":scope > .ribbon-scroll-more")?.remove();
|
|
6047
6154
|
if (closeOpen && panel.dataset.fittedWidth === String(panel.clientWidth)) return;
|
|
6048
6155
|
panel.dataset.fittedWidth = String(panel.clientWidth);
|
|
6049
6156
|
closeOpen?.();
|
|
@@ -6070,6 +6177,7 @@ function createRibbonOverflow(options) {
|
|
|
6070
6177
|
button.title = label;
|
|
6071
6178
|
group.setAttribute("data-collapsed", "");
|
|
6072
6179
|
}
|
|
6180
|
+
syncScrollMore(panel, options.moreLabel);
|
|
6073
6181
|
}
|
|
6074
6182
|
const panelsOf2 = (root) => root.querySelectorAll(".ribbon-panel");
|
|
6075
6183
|
return {
|
|
@@ -6081,7 +6189,32 @@ function createRibbonOverflow(options) {
|
|
|
6081
6189
|
for (const entry of entries) fitPanel(entry.target);
|
|
6082
6190
|
});
|
|
6083
6191
|
for (const panel of panelsOf2(root)) observer.observe(panel);
|
|
6084
|
-
|
|
6192
|
+
let frame = 0;
|
|
6193
|
+
const mutations = new MutationObserver(() => {
|
|
6194
|
+
if (frame) return;
|
|
6195
|
+
frame = requestAnimationFrame(() => {
|
|
6196
|
+
frame = 0;
|
|
6197
|
+
refitVisible();
|
|
6198
|
+
mutations.takeRecords();
|
|
6199
|
+
});
|
|
6200
|
+
});
|
|
6201
|
+
const refitVisible = () => {
|
|
6202
|
+
for (const panel of panelsOf2(root)) {
|
|
6203
|
+
if (panel.hidden || panel.querySelector('[aria-expanded="true"].ribbon-overflow-button'))
|
|
6204
|
+
continue;
|
|
6205
|
+
const more = panel.querySelector(":scope > .ribbon-scroll-more");
|
|
6206
|
+
const clipped = panel.scrollWidth - (more?.offsetWidth ?? 0) > panel.clientWidth + 1;
|
|
6207
|
+
const unfolded = panel.querySelector(":scope > .ribbon-group:not([data-collapsed])");
|
|
6208
|
+
if (clipped && unfolded) fitPanel(panel);
|
|
6209
|
+
}
|
|
6210
|
+
};
|
|
6211
|
+
for (const panel of panelsOf2(root))
|
|
6212
|
+
mutations.observe(panel, { childList: true, subtree: true });
|
|
6213
|
+
return () => {
|
|
6214
|
+
observer.disconnect();
|
|
6215
|
+
mutations.disconnect();
|
|
6216
|
+
if (frame) cancelAnimationFrame(frame);
|
|
6217
|
+
};
|
|
6085
6218
|
},
|
|
6086
6219
|
refit(root) {
|
|
6087
6220
|
for (const panel of panelsOf2(root)) fitPanel(panel);
|
|
@@ -6105,6 +6238,7 @@ function fitRibbonGroups(panel, options = {}) {
|
|
|
6105
6238
|
group.removeAttribute("data-open");
|
|
6106
6239
|
group.removeAttribute("data-collapsed");
|
|
6107
6240
|
}
|
|
6241
|
+
panel.querySelector(":scope > .ribbon-scroll-more")?.remove();
|
|
6108
6242
|
const width = panel.ownerDocument.defaultView?.innerWidth ?? Number.POSITIVE_INFINITY;
|
|
6109
6243
|
if (panel.hidden || width < (options.minWidth ?? 0)) return [];
|
|
6110
6244
|
const overflows = () => panel.scrollWidth - panel.clientWidth > 1;
|
|
@@ -6117,6 +6251,7 @@ function fitRibbonGroups(panel, options = {}) {
|
|
|
6117
6251
|
collapsed.push(group.getAttribute("label") ?? "");
|
|
6118
6252
|
if (!overflows()) break;
|
|
6119
6253
|
}
|
|
6254
|
+
syncScrollMore(panel, options.moreLabel);
|
|
6120
6255
|
return collapsed;
|
|
6121
6256
|
}
|
|
6122
6257
|
function place(group) {
|
|
@@ -6226,6 +6361,128 @@ function attachRibbonGroupOverflow(ribbon, options = {}) {
|
|
|
6226
6361
|
};
|
|
6227
6362
|
}
|
|
6228
6363
|
|
|
6364
|
+
// src/dialog/options-categories.ts
|
|
6365
|
+
var UNAVAILABLE = {
|
|
6366
|
+
proofing: {
|
|
6367
|
+
id: "proofing",
|
|
6368
|
+
label: "Proofing",
|
|
6369
|
+
description: "Change how {product} corrects and formats your text.",
|
|
6370
|
+
reason: "Not available yet. Needs rich text formatting."
|
|
6371
|
+
},
|
|
6372
|
+
save: {
|
|
6373
|
+
id: "save",
|
|
6374
|
+
label: "Save",
|
|
6375
|
+
description: "Customize how documents are saved.",
|
|
6376
|
+
reason: "Not available yet. Documents are saved to this device; AutoRecover is not kept."
|
|
6377
|
+
},
|
|
6378
|
+
language: {
|
|
6379
|
+
id: "language",
|
|
6380
|
+
label: "Language",
|
|
6381
|
+
description: "Set the Office Language Preferences.",
|
|
6382
|
+
reason: "Not available yet. The display language is fixed."
|
|
6383
|
+
},
|
|
6384
|
+
accessibility: {
|
|
6385
|
+
id: "accessibility",
|
|
6386
|
+
label: "Accessibility",
|
|
6387
|
+
description: "Make {product} easier to work with.",
|
|
6388
|
+
reason: "Not available yet. There are no accessibility settings to change."
|
|
6389
|
+
},
|
|
6390
|
+
advanced: {
|
|
6391
|
+
id: "advanced",
|
|
6392
|
+
label: "Advanced",
|
|
6393
|
+
description: "Advanced options for working with {product}.",
|
|
6394
|
+
reason: "Not available yet. The editing behaviour is fixed."
|
|
6395
|
+
},
|
|
6396
|
+
ribbon: {
|
|
6397
|
+
id: "ribbon",
|
|
6398
|
+
label: "Customize Ribbon",
|
|
6399
|
+
description: "Customize the Ribbon and keyboard shortcuts.",
|
|
6400
|
+
reason: "Not available yet. The ribbon layout is fixed."
|
|
6401
|
+
},
|
|
6402
|
+
qat: {
|
|
6403
|
+
id: "qat",
|
|
6404
|
+
label: "Quick Access Toolbar",
|
|
6405
|
+
description: "Customize the Quick Access Toolbar.",
|
|
6406
|
+
reason: "Not available yet. The Quick Access Toolbar is fixed."
|
|
6407
|
+
},
|
|
6408
|
+
addins: {
|
|
6409
|
+
id: "add-ins",
|
|
6410
|
+
label: "Add-ins",
|
|
6411
|
+
description: "View and manage Microsoft Office Add-ins.",
|
|
6412
|
+
reason: "Not available. Add-ins and macros are never run."
|
|
6413
|
+
},
|
|
6414
|
+
trust: {
|
|
6415
|
+
id: "trust",
|
|
6416
|
+
label: "Trust Center",
|
|
6417
|
+
description: "Help keep your documents safe and your computer secure and healthy.",
|
|
6418
|
+
reason: "Not available. Documents stay local and active content is never run."
|
|
6419
|
+
}
|
|
6420
|
+
};
|
|
6421
|
+
function optionText(context, text) {
|
|
6422
|
+
return context.t(text).replace("{product}", context.product);
|
|
6423
|
+
}
|
|
6424
|
+
function unavailableCategory(context, kind, text = {}) {
|
|
6425
|
+
const entry = UNAVAILABLE[kind];
|
|
6426
|
+
return {
|
|
6427
|
+
id: entry.id,
|
|
6428
|
+
label: context.t(entry.label),
|
|
6429
|
+
description: optionText(context, text.description ?? entry.description),
|
|
6430
|
+
sections: [],
|
|
6431
|
+
disabled: optionText(context, text.reason ?? entry.reason)
|
|
6432
|
+
};
|
|
6433
|
+
}
|
|
6434
|
+
function unavailableControl(context, control, reason) {
|
|
6435
|
+
return { ...control, disabled: context.t(reason) };
|
|
6436
|
+
}
|
|
6437
|
+
function userInterfaceSection(context) {
|
|
6438
|
+
const { t } = context;
|
|
6439
|
+
return {
|
|
6440
|
+
id: "ui",
|
|
6441
|
+
title: t("User Interface options"),
|
|
6442
|
+
controls: [
|
|
6443
|
+
{
|
|
6444
|
+
kind: "toggle",
|
|
6445
|
+
key: "miniToolbar",
|
|
6446
|
+
label: t("Show Mini Toolbar on selection"),
|
|
6447
|
+
disabled: t("Not available yet. Needs rich text formatting.")
|
|
6448
|
+
},
|
|
6449
|
+
{
|
|
6450
|
+
kind: "toggle",
|
|
6451
|
+
key: "livePreview",
|
|
6452
|
+
label: t("Enable Live Preview"),
|
|
6453
|
+
disabled: t(
|
|
6454
|
+
"Not available yet. Styles are applied on click; hover previews are not drawn yet."
|
|
6455
|
+
)
|
|
6456
|
+
},
|
|
6457
|
+
{
|
|
6458
|
+
kind: "select",
|
|
6459
|
+
key: "screenTips",
|
|
6460
|
+
label: t("ScreenTip style"),
|
|
6461
|
+
choices: [{ value: "descriptions", label: t("Show feature descriptions in ScreenTips") }],
|
|
6462
|
+
disabled: t("Not available yet. ScreenTips always describe the command.")
|
|
6463
|
+
}
|
|
6464
|
+
]
|
|
6465
|
+
};
|
|
6466
|
+
}
|
|
6467
|
+
function personalizeSection(context, controls, description) {
|
|
6468
|
+
return {
|
|
6469
|
+
id: "personalize",
|
|
6470
|
+
title: context.t("Personalize your copy of Microsoft Office"),
|
|
6471
|
+
...description ? { description } : {},
|
|
6472
|
+
controls
|
|
6473
|
+
};
|
|
6474
|
+
}
|
|
6475
|
+
function optionsLabels(context) {
|
|
6476
|
+
const { t } = context;
|
|
6477
|
+
return {
|
|
6478
|
+
ok: t("OK"),
|
|
6479
|
+
cancel: t("Cancel"),
|
|
6480
|
+
reset: t("Reset all options"),
|
|
6481
|
+
categories: t("Categories"),
|
|
6482
|
+
close: t("Close")
|
|
6483
|
+
};
|
|
6484
|
+
}
|
|
6485
|
+
|
|
6229
6486
|
// src/controls.ts
|
|
6230
6487
|
var CONTROL_DEFINERS = [
|
|
6231
6488
|
defineIcon,
|
|
@@ -6274,4 +6531,4 @@ function registerControls(registry) {
|
|
|
6274
6531
|
for (const define of CONTROL_DEFINERS) define(registry);
|
|
6275
6532
|
}
|
|
6276
6533
|
|
|
6277
|
-
export { CONTROL_DEFINERS, DEFAULT_COMMENTS_LABELS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_SYMBOLS, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, attachRibbonGroupOverflow, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineColorCustom, defineColorGrid, defineCommandSearch, defineCommentsPane, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineSymbolPicker, defineTabStrip, defineTaskPane, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, fitRibbonGroups, formatCommentTime, glyph, nextEnabledIndex, parseOfficeSymbolCode, parseSvgPreview, profileInitials, rangeControl, range_control_default, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile };
|
|
6534
|
+
export { CONTROL_DEFINERS, DEFAULT_COMMENTS_LABELS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_SYMBOLS, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, attachRibbonGroupOverflow, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineColorCustom, defineColorGrid, defineCommandSearch, defineCommentsPane, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineSymbolPicker, defineTabStrip, defineTaskPane, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, fitRibbonGroups, formatCommentTime, glyph, nextEnabledIndex, optionText, optionsLabels, parseOfficeSymbolCode, parseSvgPreview, personalizeSection, profileInitials, rangeControl, range_control_default, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, unavailableCategory, unavailableControl, userInterfaceSection, writeOfficeProfile };
|