ooxml-ui 1.15.0 → 1.16.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 +138 -1
- package/dist/{chunk-7QGML32D.js → chunk-CHFMXUPK.js} +187 -10
- package/dist/chunk-GSWCAZQ3.js +3533 -0
- package/dist/{chunk-YFXBKLHN.js → chunk-JVNIZBG7.js} +1108 -843
- package/dist/{chunk-JNZQZH3T.js → chunk-QUG6IRQQ.js} +2 -2
- package/dist/{chunk-EOGVSVJ7.js → chunk-UIVYZERK.js} +1 -1
- package/dist/controls.d.ts +1 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/docx.js +3 -3
- package/dist/index.js +5 -5
- package/dist/pptx/{chart-3d-view-scene-U2UZNG6X.cjs → chart-3d-view-scene-3HDRDXX6.cjs} +38 -38
- package/dist/pptx/{chart-3d-view-scene-WZ3BRYEM.mjs → chart-3d-view-scene-NMFMG76N.mjs} +2 -2
- package/dist/pptx/{chunk-U5MWRJW5.cjs → chunk-3DGTZWI5.cjs} +1 -1
- package/dist/pptx/{chunk-QVWWHDTH.cjs → chunk-A2X5BP7J.cjs} +279 -8
- package/dist/pptx/{chunk-PC5K6VYI.cjs → chunk-CEH63AZB.cjs} +811 -173
- package/dist/pptx/{chunk-M44MS6YO.mjs → chunk-GCHJRKXZ.mjs} +9 -5
- package/dist/pptx/{chunk-6LXTIMPW.mjs → chunk-HL53SH7C.mjs} +811 -173
- package/dist/pptx/{chunk-3QV7FFSY.cjs → chunk-KTHBMVMQ.cjs} +3352 -1868
- package/dist/pptx/{chunk-5O2TELJA.cjs → chunk-L2LK7TEC.cjs} +19 -15
- package/dist/pptx/{chunk-JQ7BPJDN.mjs → chunk-RACO4FQT.mjs} +2599 -1123
- package/dist/pptx/{chunk-REXLIUBK.mjs → chunk-XOMYHWQ3.mjs} +1 -1
- package/dist/pptx/{chunk-OH2YCWWG.mjs → chunk-ZNXKAINY.mjs} +279 -8
- package/dist/pptx/dom/element-styles.d.ts.map +1 -1
- package/dist/pptx/dom/elements/chart.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +261 -262
- package/dist/pptx/dom/index.mjs +19 -20
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en-chart-format.d.ts.map +1 -1
- package/dist/pptx/i18n/translations-en-compare.d.ts +3 -0
- package/dist/pptx/i18n/translations-en-compare.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en-design-galleries.d.ts.map +1 -1
- package/dist/pptx/i18n/translations-en-galleries-smartart-layouts.d.ts +6 -0
- package/dist/pptx/i18n/translations-en-galleries-smartart-layouts.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3199 -3167
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/render/chart-axis-primitives.d.ts.map +1 -1
- package/dist/pptx/render/chart-canvas-drag.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-category-axis.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-date-axis.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-area-outer-effects.d.ts +20 -0
- package/dist/pptx/render/chart-format/chart-area-outer-effects.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-3d-svg.d.ts +23 -0
- package/dist/pptx/render/chart-format/chart-format-3d-svg.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-effects-svg.d.ts +15 -0
- package/dist/pptx/render/chart-format/chart-format-effects-svg.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-paint-svg.d.ts +38 -0
- package/dist/pptx/render/chart-format/chart-format-paint-svg.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-3d.d.ts +13 -0
- package/dist/pptx/render/chart-format/chart-format-pane-3d.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-common.d.ts +14 -0
- package/dist/pptx/render/chart-format/chart-format-pane-common.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-edit-extra.d.ts +28 -0
- package/dist/pptx/render/chart-format/chart-format-pane-edit-extra.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-edit.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-pane-effects.d.ts +8 -2
- package/dist/pptx/render/chart-format/chart-format-pane-effects.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-pane-fill-kinds.d.ts +15 -0
- package/dist/pptx/render/chart-format/chart-format-pane-fill-kinds.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-fill-line.d.ts +2 -6
- package/dist/pptx/render/chart-format/chart-format-pane-fill-line.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-pane-model.d.ts +8 -6
- package/dist/pptx/render/chart-format/chart-format-pane-model.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-pane-options.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-pane-text.d.ts +14 -0
- package/dist/pptx/render/chart-format/chart-format-pane-text.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-pane-types.d.ts +20 -2
- package/dist/pptx/render/chart-format/chart-format-pane-types.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-render-labels.d.ts +26 -0
- package/dist/pptx/render/chart-format/chart-format-render-labels.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-render-lines.d.ts +36 -0
- package/dist/pptx/render/chart-format/chart-format-render-lines.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-render-series.d.ts +30 -0
- package/dist/pptx/render/chart-format/chart-format-render-series.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-render-text.d.ts +28 -0
- package/dist/pptx/render/chart-format/chart-format-render-text.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-render.d.ts +5 -7
- package/dist/pptx/render/chart-format/chart-format-render.d.ts.map +1 -1
- package/dist/pptx/render/chart-format/chart-format-targets.d.ts.map +1 -1
- package/dist/pptx/render/chart-legend-layout.d.ts +3 -1
- package/dist/pptx/render/chart-legend-layout.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-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-svg-primitives.d.ts +6 -0
- package/dist/pptx/render/chart-svg-primitives.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-dom.d.ts +17 -2
- package/dist/pptx/render/chart-view-model-dom.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model-types.d.ts +3 -0
- package/dist/pptx/render/chart-view-model-types.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/deck-style.d.ts +126 -0
- package/dist/pptx/render/deck-style.d.ts.map +1 -0
- package/dist/pptx/render/frame-effect-style.d.ts +22 -0
- package/dist/pptx/render/frame-effect-style.d.ts.map +1 -0
- package/dist/pptx/render/index.d.ts +3 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-module.d.ts +2 -1
- package/dist/pptx/render/ribbon-galleries/gallery-module.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-registry.d.ts +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 +43 -2
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/smartart-layouts-gallery.d.ts +5 -0
- package/dist/pptx/render/ribbon-galleries/smartart-layouts-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/theme-backgrounds-gallery.d.ts +7 -0
- package/dist/pptx/render/ribbon-galleries/theme-backgrounds-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-effects-gallery.d.ts +6 -0
- package/dist/pptx/render/ribbon-galleries/theme-effects-gallery.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/theme-fonts-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/theme-variants-gallery.d.ts +12 -15
- package/dist/pptx/render/ribbon-galleries/theme-variants-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/themes-gallery.d.ts.map +1 -1
- package/dist/pptx/render/slide-compare-text.d.ts +13 -0
- package/dist/pptx/render/slide-compare-text.d.ts.map +1 -0
- package/dist/pptx/render/slide-compare.d.ts +10 -0
- package/dist/pptx/render/slide-compare.d.ts.map +1 -1
- package/dist/pptx/render/visual-effects.d.ts.map +1 -1
- package/dist/pptx/web-components/chart-format-pane-fields.d.ts.map +1 -1
- package/dist/pptx/web-components/chart-format-pane-styles.d.ts +1 -1
- package/dist/pptx/web-components/chart-format-pane-styles.d.ts.map +1 -1
- package/dist/pptx/web-components/chart-format-pane.d.ts.map +1 -1
- package/dist/pptx/web-components/index.d.ts +1 -1
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/mobile-insert.d.ts +1 -1
- package/dist/pptx/web-components/mobile-insert.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-gallery.d.ts +11 -0
- package/dist/pptx/web-components/ribbon-gallery.d.ts.map +1 -1
- package/dist/{presentation-preview-HVKJ3KJN.js → presentation-preview-HMEBDYEL.js} +1 -1
- package/dist/ribbon/gallery.d.ts +50 -0
- package/dist/ribbon/gallery.d.ts.map +1 -1
- package/dist/teams/activity-feed.d.ts +1 -1
- package/dist/teams/app/add-tab-dialog.d.ts +11 -10
- package/dist/teams/app/bind.d.ts +2 -0
- package/dist/teams/app/channel-tab.d.ts +3 -2
- package/dist/teams/app/chat-app.d.ts +2 -1
- package/dist/teams/app/content-preview.d.ts +3 -2
- package/dist/teams/app/create-channel-dialog.d.ts +3 -2
- package/dist/teams/app/draft-list.d.ts +2 -1
- package/dist/teams/app/file-actions.d.ts +3 -2
- package/dist/teams/app/files-panel.d.ts +3 -2
- package/dist/teams/app/followed-threads.d.ts +2 -1
- package/dist/teams/app/markdown-preview.d.ts +2 -1
- package/dist/teams/app/message-transfers.d.ts +2 -1
- package/dist/teams/app/notify-delivery.d.ts +3 -2
- package/dist/teams/app/pinned-bar.d.ts +3 -2
- package/dist/teams/app/presentation-preview.d.ts +3 -2
- package/dist/teams/app/profile-menu.d.ts +7 -2
- package/dist/teams/app/repeat-text.d.ts +4 -3
- package/dist/teams/app/settings-density.d.ts +2 -1
- package/dist/teams/app/settings-notifications.d.ts +2 -1
- package/dist/teams/app/settings-search.d.ts +6 -4
- package/dist/teams/app/settings-theme.d.ts +2 -1
- package/dist/teams/app/sign-in-flow.d.ts +4 -0
- package/dist/teams/app/sign-in-strings.d.ts +2 -15
- package/dist/teams/app/teams-app.d.ts +3 -2
- package/dist/teams/app/teams-settings.d.ts +3 -2
- package/dist/teams/app/teams-sign-in.d.ts +3 -2
- package/dist/teams/app/thread-pane.d.ts +2 -1
- package/dist/teams/app/workbook-actions.d.ts +2 -1
- package/dist/teams/app-rail.d.ts +1 -0
- package/dist/teams/base.d.ts +25 -5
- package/dist/teams/calendar-view.d.ts +1 -0
- package/dist/teams/call-controls.d.ts +1 -0
- package/dist/teams/call-grid.d.ts +1 -0
- package/dist/teams/chat-list.d.ts +1 -0
- package/dist/teams/i18n/core-text.d.ts +3 -0
- package/dist/teams/i18n/describe.d.ts +4 -0
- package/dist/teams/i18n/lit-element.d.ts +16 -0
- package/dist/teams/i18n/locales/de/calendar.d.ts +2 -0
- package/dist/teams/i18n/locales/de/chat.d.ts +2 -0
- package/dist/teams/i18n/locales/de/core.d.ts +2 -0
- package/dist/teams/i18n/locales/de/files.d.ts +2 -0
- package/dist/teams/i18n/locales/de/settings.d.ts +2 -0
- package/dist/teams/i18n/locales/de/shell.d.ts +2 -0
- package/dist/teams/i18n/locales/de.d.ts +617 -0
- package/dist/teams/i18n/locales/en/calendar.d.ts +78 -0
- package/dist/teams/i18n/locales/en/chat.d.ts +109 -0
- package/dist/teams/i18n/locales/en/core.d.ts +34 -0
- package/dist/teams/i18n/locales/en/files.d.ts +128 -0
- package/dist/teams/i18n/locales/en/settings.d.ts +131 -0
- package/dist/teams/i18n/locales/en/shell.d.ts +146 -0
- package/dist/teams/i18n/locales/en.d.ts +617 -0
- package/dist/teams/i18n/locales/es/calendar.d.ts +2 -0
- package/dist/teams/i18n/locales/es/chat.d.ts +2 -0
- package/dist/teams/i18n/locales/es/core.d.ts +2 -0
- package/dist/teams/i18n/locales/es/files.d.ts +2 -0
- package/dist/teams/i18n/locales/es/settings.d.ts +2 -0
- package/dist/teams/i18n/locales/es/shell.d.ts +2 -0
- package/dist/teams/i18n/locales/es.d.ts +617 -0
- package/dist/teams/i18n/locales/fr/calendar.d.ts +2 -0
- package/dist/teams/i18n/locales/fr/chat.d.ts +2 -0
- package/dist/teams/i18n/locales/fr/core.d.ts +2 -0
- package/dist/teams/i18n/locales/fr/files.d.ts +2 -0
- package/dist/teams/i18n/locales/fr/settings.d.ts +2 -0
- package/dist/teams/i18n/locales/fr/shell.d.ts +2 -0
- package/dist/teams/i18n/locales/fr.d.ts +617 -0
- package/dist/teams/i18n/locales/zh-CN/calendar.d.ts +2 -0
- package/dist/teams/i18n/locales/zh-CN/chat.d.ts +2 -0
- package/dist/teams/i18n/locales/zh-CN/core.d.ts +2 -0
- package/dist/teams/i18n/locales/zh-CN/files.d.ts +2 -0
- package/dist/teams/i18n/locales/zh-CN/settings.d.ts +2 -0
- package/dist/teams/i18n/locales/zh-CN/shell.d.ts +2 -0
- package/dist/teams/i18n/locales/zh-CN.d.ts +617 -0
- package/dist/teams/i18n/runtime.d.ts +15 -0
- package/dist/teams/i18n/translator.d.ts +28 -0
- package/dist/teams.js +3 -3
- package/dist/visio.js +3 -3
- package/dist/xlsx/dialogs/help-dialogs.d.ts +1 -1
- package/dist/xlsx/dialogs/pivot-page-filter.d.ts +1 -1
- package/dist/xlsx.js +17 -15
- package/package.json +2 -2
- package/dist/chunk-VRVFLYGI.js +0 -236
package/custom-elements.json
CHANGED
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
{
|
|
51
51
|
"name": "filter"
|
|
52
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"name": "locale"
|
|
55
|
+
},
|
|
53
56
|
{
|
|
54
57
|
"name": "selected-id"
|
|
55
58
|
}
|
|
@@ -66,6 +69,13 @@
|
|
|
66
69
|
"kind": "field",
|
|
67
70
|
"name": "items"
|
|
68
71
|
},
|
|
72
|
+
{
|
|
73
|
+
"kind": "field",
|
|
74
|
+
"name": "locale",
|
|
75
|
+
"type": {
|
|
76
|
+
"text": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
69
79
|
{
|
|
70
80
|
"kind": "field",
|
|
71
81
|
"name": "selectedId",
|
|
@@ -115,6 +125,9 @@
|
|
|
115
125
|
{
|
|
116
126
|
"name": "hide-labels"
|
|
117
127
|
},
|
|
128
|
+
{
|
|
129
|
+
"name": "locale"
|
|
130
|
+
},
|
|
118
131
|
{
|
|
119
132
|
"name": "selected"
|
|
120
133
|
}
|
|
@@ -132,6 +145,13 @@
|
|
|
132
145
|
"kind": "field",
|
|
133
146
|
"name": "items"
|
|
134
147
|
},
|
|
148
|
+
{
|
|
149
|
+
"kind": "field",
|
|
150
|
+
"name": "locale",
|
|
151
|
+
"type": {
|
|
152
|
+
"text": "string"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
135
155
|
{
|
|
136
156
|
"kind": "field",
|
|
137
157
|
"name": "moreOpen"
|
|
@@ -175,6 +195,9 @@
|
|
|
175
195
|
{
|
|
176
196
|
"name": "color"
|
|
177
197
|
},
|
|
198
|
+
{
|
|
199
|
+
"name": "locale"
|
|
200
|
+
},
|
|
178
201
|
{
|
|
179
202
|
"name": "name"
|
|
180
203
|
},
|
|
@@ -196,6 +219,13 @@
|
|
|
196
219
|
"text": "string"
|
|
197
220
|
}
|
|
198
221
|
},
|
|
222
|
+
{
|
|
223
|
+
"kind": "field",
|
|
224
|
+
"name": "locale",
|
|
225
|
+
"type": {
|
|
226
|
+
"text": "string"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
199
229
|
{
|
|
200
230
|
"kind": "field",
|
|
201
231
|
"name": "name",
|
|
@@ -415,6 +445,9 @@
|
|
|
415
445
|
"customElement": true,
|
|
416
446
|
"description": "The Calendar app's side list: meetings in the next two weeks grouped by day, each with its time and a Join button once it is near or live. Properties: `meetings`, `zone`, `now` (the clock, for tests). Emits `office-agenda-open` `{ meetingId, start }`, `office-agenda-join` `{ meetingId }` and `office-agenda-new` `{}`.",
|
|
417
447
|
"attributes": [
|
|
448
|
+
{
|
|
449
|
+
"name": "locale"
|
|
450
|
+
},
|
|
418
451
|
{
|
|
419
452
|
"name": "now"
|
|
420
453
|
},
|
|
@@ -423,6 +456,13 @@
|
|
|
423
456
|
}
|
|
424
457
|
],
|
|
425
458
|
"members": [
|
|
459
|
+
{
|
|
460
|
+
"kind": "field",
|
|
461
|
+
"name": "locale",
|
|
462
|
+
"type": {
|
|
463
|
+
"text": "string"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
426
466
|
{
|
|
427
467
|
"kind": "field",
|
|
428
468
|
"name": "meetings"
|
|
@@ -476,6 +516,9 @@
|
|
|
476
516
|
"customElement": true,
|
|
477
517
|
"description": "A Teams-style calendar: a time grid for the work week, the full week or one day in the viewer's zone, with Today, previous and next, and the view switch. Overlapping meetings share a column. Properties: `meetings` (core `MeetingView[]`), `zone` (default: this device's), `now` (the clock, for tests), `mode`. Events: `office-calendar-open` `{ meetingId, start }`, `office-calendar-new` `{ start }` (a click on an empty slot, or the New meeting button), and `office-calendar-mode` `{ mode }`.",
|
|
478
518
|
"attributes": [
|
|
519
|
+
{
|
|
520
|
+
"name": "locale"
|
|
521
|
+
},
|
|
479
522
|
{
|
|
480
523
|
"name": "mode"
|
|
481
524
|
},
|
|
@@ -491,6 +534,13 @@
|
|
|
491
534
|
"kind": "field",
|
|
492
535
|
"name": "anchor"
|
|
493
536
|
},
|
|
537
|
+
{
|
|
538
|
+
"kind": "field",
|
|
539
|
+
"name": "locale",
|
|
540
|
+
"type": {
|
|
541
|
+
"text": "string"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
494
544
|
{
|
|
495
545
|
"kind": "field",
|
|
496
546
|
"name": "meetings"
|
|
@@ -564,6 +614,9 @@
|
|
|
564
614
|
{
|
|
565
615
|
"name": "heading"
|
|
566
616
|
},
|
|
617
|
+
{
|
|
618
|
+
"name": "locale"
|
|
619
|
+
},
|
|
567
620
|
{
|
|
568
621
|
"name": "mic"
|
|
569
622
|
},
|
|
@@ -602,6 +655,13 @@
|
|
|
602
655
|
"text": "string"
|
|
603
656
|
}
|
|
604
657
|
},
|
|
658
|
+
{
|
|
659
|
+
"kind": "field",
|
|
660
|
+
"name": "locale",
|
|
661
|
+
"type": {
|
|
662
|
+
"text": "string"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
605
665
|
{
|
|
606
666
|
"kind": "field",
|
|
607
667
|
"name": "mic",
|
|
@@ -671,8 +731,19 @@
|
|
|
671
731
|
"tagName": "office-ui-call-grid",
|
|
672
732
|
"customElement": true,
|
|
673
733
|
"description": "The meeting stage. Property `participants` (`CallTile[]`). Someone sharing their screen is spotlighted with everyone else in a side strip. Your own tile is muted (no echo) and mirrored unless it shows a screen; tiles without video show the avatar. The grid only attaches the streams it is handed; capture and connections belong to the host.",
|
|
674
|
-
"attributes": [
|
|
734
|
+
"attributes": [
|
|
735
|
+
{
|
|
736
|
+
"name": "locale"
|
|
737
|
+
}
|
|
738
|
+
],
|
|
675
739
|
"members": [
|
|
740
|
+
{
|
|
741
|
+
"kind": "field",
|
|
742
|
+
"name": "locale",
|
|
743
|
+
"type": {
|
|
744
|
+
"text": "string"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
676
747
|
{
|
|
677
748
|
"kind": "field",
|
|
678
749
|
"name": "participants"
|
|
@@ -705,6 +776,9 @@
|
|
|
705
776
|
{
|
|
706
777
|
"name": "heading"
|
|
707
778
|
},
|
|
779
|
+
{
|
|
780
|
+
"name": "locale"
|
|
781
|
+
},
|
|
708
782
|
{
|
|
709
783
|
"name": "selected-id"
|
|
710
784
|
}
|
|
@@ -725,6 +799,13 @@
|
|
|
725
799
|
"text": "string"
|
|
726
800
|
}
|
|
727
801
|
},
|
|
802
|
+
{
|
|
803
|
+
"kind": "field",
|
|
804
|
+
"name": "locale",
|
|
805
|
+
"type": {
|
|
806
|
+
"text": "string"
|
|
807
|
+
}
|
|
808
|
+
},
|
|
728
809
|
{
|
|
729
810
|
"kind": "field",
|
|
730
811
|
"name": "selectedId",
|
|
@@ -771,6 +852,9 @@
|
|
|
771
852
|
{
|
|
772
853
|
"name": "editing"
|
|
773
854
|
},
|
|
855
|
+
{
|
|
856
|
+
"name": "locale"
|
|
857
|
+
},
|
|
774
858
|
{
|
|
775
859
|
"name": "placeholder"
|
|
776
860
|
},
|
|
@@ -801,6 +885,13 @@
|
|
|
801
885
|
"kind": "field",
|
|
802
886
|
"name": "files"
|
|
803
887
|
},
|
|
888
|
+
{
|
|
889
|
+
"kind": "field",
|
|
890
|
+
"name": "locale",
|
|
891
|
+
"type": {
|
|
892
|
+
"text": "string"
|
|
893
|
+
}
|
|
894
|
+
},
|
|
804
895
|
{
|
|
805
896
|
"kind": "field",
|
|
806
897
|
"name": "mentionTargets"
|
|
@@ -880,6 +971,9 @@
|
|
|
880
971
|
{
|
|
881
972
|
"name": "highlight-id"
|
|
882
973
|
},
|
|
974
|
+
{
|
|
975
|
+
"name": "locale"
|
|
976
|
+
},
|
|
883
977
|
{
|
|
884
978
|
"name": "self-id"
|
|
885
979
|
}
|
|
@@ -893,6 +987,13 @@
|
|
|
893
987
|
},
|
|
894
988
|
"attribute": "highlight-id"
|
|
895
989
|
},
|
|
990
|
+
{
|
|
991
|
+
"kind": "field",
|
|
992
|
+
"name": "locale",
|
|
993
|
+
"type": {
|
|
994
|
+
"text": "string"
|
|
995
|
+
}
|
|
996
|
+
},
|
|
896
997
|
{
|
|
897
998
|
"kind": "field",
|
|
898
999
|
"name": "meetings"
|
|
@@ -967,6 +1068,9 @@
|
|
|
967
1068
|
"customElement": true,
|
|
968
1069
|
"description": "The Chat app's list: 1:1 and group chats, most recent first, with presence on the avatar, the last message and an unread badge. Properties: `chats` (core `ChatView[]`), `selectedId`. Emits `office-chat-select` `{ id }` and `office-chat-new` `{}` (the host asks who to chat with).",
|
|
969
1070
|
"attributes": [
|
|
1071
|
+
{
|
|
1072
|
+
"name": "locale"
|
|
1073
|
+
},
|
|
970
1074
|
{
|
|
971
1075
|
"name": "selected-id"
|
|
972
1076
|
}
|
|
@@ -976,6 +1080,13 @@
|
|
|
976
1080
|
"kind": "field",
|
|
977
1081
|
"name": "chats"
|
|
978
1082
|
},
|
|
1083
|
+
{
|
|
1084
|
+
"kind": "field",
|
|
1085
|
+
"name": "locale",
|
|
1086
|
+
"type": {
|
|
1087
|
+
"text": "string"
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
979
1090
|
{
|
|
980
1091
|
"kind": "field",
|
|
981
1092
|
"name": "selectedId",
|
|
@@ -1960,6 +2071,12 @@
|
|
|
1960
2071
|
"events": [
|
|
1961
2072
|
{
|
|
1962
2073
|
"name": "office-gallery-pick"
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
"name": "office-gallery-preview"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"name": "office-gallery-preview-end"
|
|
1963
2080
|
}
|
|
1964
2081
|
]
|
|
1965
2082
|
}
|
|
@@ -2408,6 +2525,9 @@
|
|
|
2408
2525
|
"attributes": [
|
|
2409
2526
|
{
|
|
2410
2527
|
"name": "label"
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
"name": "locale"
|
|
2411
2531
|
}
|
|
2412
2532
|
],
|
|
2413
2533
|
"members": [
|
|
@@ -2426,6 +2546,13 @@
|
|
|
2426
2546
|
"text": "string"
|
|
2427
2547
|
}
|
|
2428
2548
|
},
|
|
2549
|
+
{
|
|
2550
|
+
"kind": "field",
|
|
2551
|
+
"name": "locale",
|
|
2552
|
+
"type": {
|
|
2553
|
+
"text": "string"
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2429
2556
|
{
|
|
2430
2557
|
"kind": "field",
|
|
2431
2558
|
"name": "query"
|
|
@@ -2472,6 +2599,9 @@
|
|
|
2472
2599
|
{
|
|
2473
2600
|
"name": "heading"
|
|
2474
2601
|
},
|
|
2602
|
+
{
|
|
2603
|
+
"name": "locale"
|
|
2604
|
+
},
|
|
2475
2605
|
{
|
|
2476
2606
|
"name": "name"
|
|
2477
2607
|
},
|
|
@@ -2501,6 +2631,13 @@
|
|
|
2501
2631
|
"text": "string"
|
|
2502
2632
|
}
|
|
2503
2633
|
},
|
|
2634
|
+
{
|
|
2635
|
+
"kind": "field",
|
|
2636
|
+
"name": "locale",
|
|
2637
|
+
"type": {
|
|
2638
|
+
"text": "string"
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2504
2641
|
{
|
|
2505
2642
|
"kind": "field",
|
|
2506
2643
|
"name": "name",
|
|
@@ -2146,7 +2146,7 @@ var defineRibbonSection = definer(
|
|
|
2146
2146
|
);
|
|
2147
2147
|
|
|
2148
2148
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/ribbon/gallery.css?raw
|
|
2149
|
-
var gallery_default = "[data-office-gallery] {\n display: inline-flex;\n position: relative;\n flex: none;\n color: var(--office-foreground);\n}\n[data-office-gallery] .gallery-view {\n display: contents;\n}\n[data-office-gallery] button {\n box-sizing: border-box;\n font: inherit;\n color: inherit;\n cursor: pointer;\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius);\n background: var(--office-background);\n}\n[data-office-gallery] button:hover:not(:disabled) {\n background: var(--office-selected);\n}\n[data-office-gallery] button:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n[data-office-gallery] button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n[data-office-gallery] .trigger {\n display: inline-flex;\n align-items: center;\n gap: var(--office-space-1-5);\n min-height: var(--office-gallery-trigger-height);\n padding: 0 var(--office-space-1-5);\n font-size: var(--office-font-size-sm);\n white-space: nowrap;\n}\n[data-office-gallery]:not([mode='inline']) .trigger {\n border-color: transparent;\n background: transparent;\n}\n[data-office-gallery] .trigger svg {\n width: var(--office-icon-size-md);\n height: var(--office-icon-size-md);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n[data-office-gallery][mode='inline'] .trigger,\n[data-office-gallery][chevron-only] .trigger {\n align-self: stretch;\n padding: 0 var(--office-space-1);\n}\n[data-office-gallery] .strip {\n display: flex;\n gap: var(--office-space-0);\n padding: var(--office-space-0);\n align-items: center;\n}\n[data-office-gallery] .tile {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--office-space-0);\n}\n[data-office-gallery] .tile[aria-pressed='true'] {\n border: var(--office-border-width-thick) solid var(--office-accent);\n background: color-mix(in srgb, var(--office-accent) 15%, var(--office-background));\n}\n[data-office-gallery] .tile svg {\n max-width: 100%;\n max-height: 100%;\n}\n[data-office-gallery][mode='inline'] .strip {\n gap: 0;\n border: var(--office-border-width) solid var(--office-border);\n border-inline-end: 0;\n border-radius: var(--office-radius-sm) 0 0 var(--office-radius-sm);\n background: var(--office-gallery-strip-background);\n}\n[data-office-gallery][mode='inline'] .trigger {\n border-radius: 0 var(--office-radius-sm) var(--office-radius-sm) 0;\n background: var(--office-gallery-strip-background);\n}\n[data-office-gallery] .trigger.command {\n border-color: transparent;\n background: transparent;\n justify-content: flex-start;\n}\n[data-office-gallery] .trigger.command:hover:not(:disabled) {\n border-color: var(--office-border);\n background: var(--office-selected);\n}\n[data-office-gallery] .trigger.command svg {\n color: var(--office-command-icon-color);\n}\n[data-office-gallery] .trigger.command-large {\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n gap: var(--office-space-0);\n min-width: var(--office-gallery-command-min-width);\n max-width: var(--office-gallery-command-max-width);\n height: var(--office-gallery-command-height);\n padding: var(--office-space-1);\n font-size: var(--office-font-size-2xs);\n line-height: var(--office-line-height-tight);\n white-space: normal;\n text-align: center;\n}\n[data-office-gallery] .trigger.command-large svg {\n width: var(--office-gallery-command-icon);\n height: var(--office-gallery-command-icon);\n}\n[data-office-gallery] .popup {\n box-sizing: border-box;\n position: fixed;\n z-index: var(--office-z-popover);\n max-width: calc(100vw - var(--office-space-4));\n max-height: var(--office-gallery-popup-max-height);\n overflow: auto;\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-md);\n background: var(--office-popover);\n color: var(--office-popover-foreground);\n box-shadow: var(--office-shadow-lg);\n}\n[data-office-gallery] .popup[hidden] {\n display: none;\n}\n[data-office-gallery] .grid {\n display: grid;\n gap: var(--office-space-1);\n width: max-content;\n max-width: 100%;\n}\n[data-office-gallery] .heading {\n margin: var(--office-space-1) 0 var(--office-space-1-5);\n font-size: var(--office-font-size-xs);\n font-weight: var(--office-font-weight-bold);\n}\n[data-office-gallery] .section + .section {\n margin-top: var(--office-space-2-5);\n}\n[data-office-gallery][mode='panel'] {\n display: block;\n}\n[data-office-gallery][mode='panel'] .grid {\n width: 100%;\n}\n[data-office-gallery][mode='panel'] .tile {\n flex-direction: column;\n gap: var(--office-space-1);\n width: 100% !important;\n height: auto !important;\n min-height: var(--office-target-size-touch);\n padding: var(--office-space-1);\n}\n[data-office-gallery][mode='panel'] .tile-label {\n font-size: var(--office-font-size-xs);\n}\n[data-office-gallery][mode='panel'] .tile svg {\n width: var(--office-gallery-preview-width);\n height: var(--office-gallery-preview-height);\n}\n@media (pointer: coarse), (max-width: 1023px) {\n [data-office-gallery] .trigger,\n [data-office-gallery] .tile {\n min-height: var(--office-target-size-touch);\n min-width: var(--office-target-size-touch);\n }\n}\n@media (forced-colors: active) {\n [data-office-gallery] button,\n [data-office-gallery] .popup {\n color: ButtonText;\n background: Canvas;\n border-color: ButtonText;\n }\n [data-office-gallery] button:disabled {\n color: GrayText;\n opacity: 1;\n }\n [data-office-gallery] button:focus-visible,\n [data-office-gallery] .tile[aria-pressed='true'] {\n outline: var(--office-focus-width) solid Highlight;\n border-color: Highlight;\n }\n}\n";
|
|
2149
|
+
var gallery_default = "[data-office-gallery] {\n display: inline-flex;\n position: relative;\n flex: none;\n color: var(--office-foreground);\n}\n[data-office-gallery] .gallery-view {\n display: contents;\n}\n[data-office-gallery] button {\n box-sizing: border-box;\n font: inherit;\n color: inherit;\n cursor: pointer;\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius);\n background: var(--office-background);\n}\n[data-office-gallery] button:hover:not(:disabled) {\n background: var(--office-selected);\n}\n[data-office-gallery] button:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n[data-office-gallery] button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n[data-office-gallery] .trigger {\n display: inline-flex;\n align-items: center;\n gap: var(--office-space-1-5);\n min-height: var(--office-gallery-trigger-height);\n padding: 0 var(--office-space-1-5);\n font-size: var(--office-font-size-sm);\n white-space: nowrap;\n}\n[data-office-gallery]:not([mode='inline']) .trigger {\n border-color: transparent;\n background: transparent;\n}\n[data-office-gallery] .trigger svg {\n width: var(--office-icon-size-md);\n height: var(--office-icon-size-md);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n[data-office-gallery][mode='inline'] .trigger,\n[data-office-gallery][chevron-only] .trigger {\n align-self: stretch;\n padding: 0 var(--office-space-1);\n}\n[data-office-gallery] .strip {\n display: flex;\n gap: var(--office-space-0);\n padding: var(--office-space-0);\n align-items: center;\n}\n[data-office-gallery] .tile {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--office-space-0);\n}\n[data-office-gallery] .tile[aria-pressed='true'] {\n border: var(--office-border-width-thick) solid var(--office-accent);\n background: color-mix(in srgb, var(--office-accent) 15%, var(--office-background));\n}\n[data-office-gallery] .tile svg {\n max-width: 100%;\n max-height: 100%;\n}\n[data-office-gallery][mode='inline'] .strip {\n gap: 0;\n border: var(--office-border-width) solid var(--office-border);\n border-inline-end: 0;\n border-radius: var(--office-radius-sm) 0 0 var(--office-radius-sm);\n background: var(--office-gallery-strip-background);\n}\n[data-office-gallery][mode='inline'] .trigger {\n border-radius: 0 var(--office-radius-sm) var(--office-radius-sm) 0;\n background: var(--office-gallery-strip-background);\n}\n[data-office-gallery] .trigger.command {\n border-color: transparent;\n background: transparent;\n justify-content: flex-start;\n}\n[data-office-gallery] .trigger.command:hover:not(:disabled) {\n border-color: var(--office-border);\n background: var(--office-selected);\n}\n[data-office-gallery] .trigger.command svg {\n color: var(--office-command-icon-color);\n}\n[data-office-gallery] .trigger.command-large {\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n gap: var(--office-space-0);\n min-width: var(--office-gallery-command-min-width);\n max-width: var(--office-gallery-command-max-width);\n height: var(--office-gallery-command-height);\n padding: var(--office-space-1);\n font-size: var(--office-font-size-2xs);\n line-height: var(--office-line-height-tight);\n white-space: normal;\n text-align: center;\n}\n[data-office-gallery] .trigger.command-large svg {\n width: var(--office-gallery-command-icon);\n height: var(--office-gallery-command-icon);\n}\n[data-office-gallery] .popup {\n box-sizing: border-box;\n position: fixed;\n z-index: var(--office-z-popover);\n max-width: calc(100vw - var(--office-space-4));\n max-height: var(--office-gallery-popup-max-height);\n overflow: auto;\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-md);\n background: var(--office-popover);\n color: var(--office-popover-foreground);\n box-shadow: var(--office-shadow-lg);\n}\n[data-office-gallery] .popup[hidden] {\n display: none;\n}\n[data-office-gallery] .grid {\n display: grid;\n gap: var(--office-space-1);\n width: max-content;\n max-width: 100%;\n}\n[data-office-gallery] .heading {\n margin: var(--office-space-1) 0 var(--office-space-1-5);\n font-size: var(--office-font-size-xs);\n font-weight: var(--office-font-weight-bold);\n}\n[data-office-gallery] .section + .section {\n margin-top: var(--office-space-2-5);\n}\n[data-office-gallery][mode='panel'] {\n display: block;\n}\n[data-office-gallery][mode='panel'] .grid {\n width: 100%;\n}\n[data-office-gallery][mode='panel'] .tile {\n flex-direction: column;\n gap: var(--office-space-1);\n width: 100% !important;\n height: auto !important;\n min-height: var(--office-target-size-touch);\n padding: var(--office-space-1);\n}\n[data-office-gallery][mode='panel'] .tile-label {\n font-size: var(--office-font-size-xs);\n}\n[data-office-gallery][mode='panel'] .tile svg {\n width: var(--office-gallery-preview-width);\n height: var(--office-gallery-preview-height);\n}\n[data-office-gallery] .footer {\n display: flex;\n flex-direction: column;\n margin-top: var(--office-space-2);\n padding-top: var(--office-space-1);\n border-top: var(--office-border-width) solid var(--office-border);\n}\n[data-office-gallery] .footer-item,\n[data-office-gallery] .tile-menu-item {\n display: block;\n padding: var(--office-space-1) var(--office-space-2);\n border-color: transparent;\n background: transparent;\n font-size: var(--office-font-size-sm);\n text-align: start;\n white-space: nowrap;\n}\n[data-office-gallery] .tile-menu {\n box-sizing: border-box;\n position: fixed;\n z-index: calc(var(--office-z-popover) + 1);\n display: flex;\n flex-direction: column;\n min-width: 12rem;\n padding: var(--office-space-1);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-md);\n background: var(--office-popover);\n color: var(--office-popover-foreground);\n box-shadow: var(--office-shadow-lg);\n}\n@media (pointer: coarse), (max-width: 1023px) {\n [data-office-gallery] .trigger,\n [data-office-gallery] .tile {\n min-height: var(--office-target-size-touch);\n min-width: var(--office-target-size-touch);\n }\n}\n@media (forced-colors: active) {\n [data-office-gallery] button,\n [data-office-gallery] .popup {\n color: ButtonText;\n background: Canvas;\n border-color: ButtonText;\n }\n [data-office-gallery] button:disabled {\n color: GrayText;\n opacity: 1;\n }\n [data-office-gallery] button:focus-visible,\n [data-office-gallery] .tile[aria-pressed='true'] {\n outline: var(--office-focus-width) solid Highlight;\n border-color: Highlight;\n }\n}\n";
|
|
2150
2150
|
|
|
2151
2151
|
// src/ribbon/gallery-styles.ts
|
|
2152
2152
|
var GALLERY_LIGHT_CSS = withTokens(gallery_default);
|
|
@@ -2201,6 +2201,12 @@ function parseSvgPreview(doc, svg2) {
|
|
|
2201
2201
|
var HOST_CSS = ":host { display: inline-flex; position: relative; flex: none; }";
|
|
2202
2202
|
var OfficeUiGallery = class extends OfficeElement {
|
|
2203
2203
|
static pickEvent = "office-gallery-pick";
|
|
2204
|
+
static previewEvent = "office-gallery-preview";
|
|
2205
|
+
static previewEndEvent = "office-gallery-preview-end";
|
|
2206
|
+
/** Hover time before the first preview shows, so sweeping across the strip does not flash. */
|
|
2207
|
+
static previewDelayMs = 120;
|
|
2208
|
+
/** Grace before a preview ends, so moving between tiles does not flash the original. */
|
|
2209
|
+
static previewEndDelayMs = 60;
|
|
2204
2210
|
static triggerAttribute = "data-gallery";
|
|
2205
2211
|
static popupAttribute = "data-gallery-popup";
|
|
2206
2212
|
static itemAttribute = "data-gallery-item";
|
|
@@ -2213,6 +2219,10 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2213
2219
|
model;
|
|
2214
2220
|
locked = false;
|
|
2215
2221
|
opened = false;
|
|
2222
|
+
previewing;
|
|
2223
|
+
previewStartTimer;
|
|
2224
|
+
previewEndTimer;
|
|
2225
|
+
menu;
|
|
2216
2226
|
attributeChangedCallback(name, old, value) {
|
|
2217
2227
|
super.attributeChangedCallback(name, old, value);
|
|
2218
2228
|
if (name === "mode" && value === "panel") this.close();
|
|
@@ -2251,8 +2261,132 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2251
2261
|
}
|
|
2252
2262
|
}
|
|
2253
2263
|
close() {
|
|
2264
|
+
this.endPreview(true);
|
|
2265
|
+
this.closeMenu();
|
|
2254
2266
|
this.open = false;
|
|
2255
2267
|
}
|
|
2268
|
+
/** Close the popup and menu but leave a running preview for the pick that follows to settle. */
|
|
2269
|
+
dismiss() {
|
|
2270
|
+
clearTimeout(this.previewStartTimer);
|
|
2271
|
+
this.previewStartTimer = void 0;
|
|
2272
|
+
this.closeMenu();
|
|
2273
|
+
this.open = false;
|
|
2274
|
+
}
|
|
2275
|
+
// ---- Preview and context menu ---------------------------------------------------------
|
|
2276
|
+
canPreview() {
|
|
2277
|
+
return this.model?.preview === true && !this.model.command && !this.unavailable() && this.getAttribute("mode") !== "panel";
|
|
2278
|
+
}
|
|
2279
|
+
startPreview(itemId) {
|
|
2280
|
+
if (!this.canPreview() || this.menu) return;
|
|
2281
|
+
clearTimeout(this.previewEndTimer);
|
|
2282
|
+
if (this.previewing === itemId) return;
|
|
2283
|
+
clearTimeout(this.previewStartTimer);
|
|
2284
|
+
const show = () => {
|
|
2285
|
+
const state = this.model;
|
|
2286
|
+
if (!state || !this.canPreview()) return;
|
|
2287
|
+
this.previewing = itemId;
|
|
2288
|
+
this.fire(this.constructor.previewEvent, {
|
|
2289
|
+
gallery: state.id,
|
|
2290
|
+
itemId
|
|
2291
|
+
});
|
|
2292
|
+
};
|
|
2293
|
+
const statics = this.constructor;
|
|
2294
|
+
if (this.previewing !== void 0) show();
|
|
2295
|
+
else this.previewStartTimer = setTimeout(show, statics.previewDelayMs);
|
|
2296
|
+
}
|
|
2297
|
+
endPreview(immediate = false) {
|
|
2298
|
+
clearTimeout(this.previewStartTimer);
|
|
2299
|
+
this.previewStartTimer = void 0;
|
|
2300
|
+
clearTimeout(this.previewEndTimer);
|
|
2301
|
+
this.previewEndTimer = void 0;
|
|
2302
|
+
if (this.previewing === void 0) return;
|
|
2303
|
+
const end = () => {
|
|
2304
|
+
this.previewEndTimer = void 0;
|
|
2305
|
+
const state = this.model;
|
|
2306
|
+
if (this.previewing === void 0) return;
|
|
2307
|
+
this.previewing = void 0;
|
|
2308
|
+
this.fire(this.constructor.previewEndEvent, {
|
|
2309
|
+
gallery: state?.id ?? ""
|
|
2310
|
+
});
|
|
2311
|
+
};
|
|
2312
|
+
const statics = this.constructor;
|
|
2313
|
+
if (immediate) end();
|
|
2314
|
+
else this.previewEndTimer = setTimeout(end, statics.previewEndDelayMs);
|
|
2315
|
+
}
|
|
2316
|
+
findItem(itemId) {
|
|
2317
|
+
for (const section of this.model?.sections ?? []) {
|
|
2318
|
+
const found = section.items.find((item) => item.id === itemId);
|
|
2319
|
+
if (found) return found;
|
|
2320
|
+
}
|
|
2321
|
+
return this.model?.inline?.find((item) => item.id === itemId);
|
|
2322
|
+
}
|
|
2323
|
+
openMenu(itemId, x, y) {
|
|
2324
|
+
if (this.unavailable() || !this.findItem(itemId)?.actions?.length) return;
|
|
2325
|
+
this.endPreview(true);
|
|
2326
|
+
this.menu = { itemId, x, y };
|
|
2327
|
+
this.ownerDocument.addEventListener("pointerdown", this.onMenuOutside, true);
|
|
2328
|
+
this.requestUpdate();
|
|
2329
|
+
}
|
|
2330
|
+
closeMenu() {
|
|
2331
|
+
if (!this.menu) return;
|
|
2332
|
+
this.menu = void 0;
|
|
2333
|
+
this.ownerDocument.removeEventListener("pointerdown", this.onMenuOutside, true);
|
|
2334
|
+
this.requestUpdate();
|
|
2335
|
+
}
|
|
2336
|
+
onMenuOutside = (event) => {
|
|
2337
|
+
if (!event.composedPath().some((node) => node.classList?.contains("tile-menu")))
|
|
2338
|
+
this.closeMenu();
|
|
2339
|
+
};
|
|
2340
|
+
onTileContextMenu(event, itemId) {
|
|
2341
|
+
if (!this.findItem(itemId)?.actions?.length) return;
|
|
2342
|
+
event.preventDefault();
|
|
2343
|
+
event.stopPropagation();
|
|
2344
|
+
this.openMenu(itemId, event.clientX, event.clientY);
|
|
2345
|
+
}
|
|
2346
|
+
onMenuKey(event) {
|
|
2347
|
+
const items = Array.from(
|
|
2348
|
+
event.currentTarget.querySelectorAll("button")
|
|
2349
|
+
);
|
|
2350
|
+
const index = items.indexOf(event.target);
|
|
2351
|
+
if (event.key === "Escape") {
|
|
2352
|
+
event.preventDefault();
|
|
2353
|
+
event.stopPropagation();
|
|
2354
|
+
const itemId = this.menu?.itemId;
|
|
2355
|
+
this.closeMenu();
|
|
2356
|
+
const statics = this.constructor;
|
|
2357
|
+
this.querySelector(`[${statics.itemAttribute}="${itemId}"]`)?.focus();
|
|
2358
|
+
} else if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
2359
|
+
event.preventDefault();
|
|
2360
|
+
event.stopPropagation();
|
|
2361
|
+
const step = event.key === "ArrowDown" ? 1 : -1;
|
|
2362
|
+
items[(index + step + items.length) % items.length]?.focus();
|
|
2363
|
+
} else if (event.key === "Tab") {
|
|
2364
|
+
this.closeMenu();
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
menuTemplate() {
|
|
2368
|
+
const menu = this.menu;
|
|
2369
|
+
const item = menu ? this.findItem(menu.itemId) : void 0;
|
|
2370
|
+
if (!menu || !item?.actions?.length) return "";
|
|
2371
|
+
return html`<div
|
|
2372
|
+
class="tile-menu"
|
|
2373
|
+
role="menu"
|
|
2374
|
+
aria-label=${item.label}
|
|
2375
|
+
style="left:${menu.x}px;top:${menu.y}px"
|
|
2376
|
+
@keydown=${this.onMenuKey}
|
|
2377
|
+
>
|
|
2378
|
+
${item.actions.map(
|
|
2379
|
+
(action) => html`<button
|
|
2380
|
+
type="button"
|
|
2381
|
+
role="menuitem"
|
|
2382
|
+
class="tile-menu-item"
|
|
2383
|
+
data-gallery-action=${action.id}
|
|
2384
|
+
@click=${() => this.pick(menu.itemId, action.id)}
|
|
2385
|
+
>${action.label}</button
|
|
2386
|
+
>`
|
|
2387
|
+
)}
|
|
2388
|
+
</div>`;
|
|
2389
|
+
}
|
|
2256
2390
|
get trigger() {
|
|
2257
2391
|
this.ensureRendered();
|
|
2258
2392
|
return this.querySelector(".trigger");
|
|
@@ -2295,20 +2429,24 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2295
2429
|
super.disconnectedCallback();
|
|
2296
2430
|
this.close();
|
|
2297
2431
|
this.cleanup();
|
|
2432
|
+
clearTimeout(this.previewStartTimer);
|
|
2433
|
+
clearTimeout(this.previewEndTimer);
|
|
2298
2434
|
}
|
|
2299
2435
|
unavailable() {
|
|
2300
2436
|
const state = this.model;
|
|
2301
2437
|
return this.locked || !state || state.disabled === true || !state.sections.some((section) => section.items.length > 0);
|
|
2302
2438
|
}
|
|
2303
|
-
pick(itemId) {
|
|
2439
|
+
pick(itemId, action) {
|
|
2304
2440
|
const state = this.model;
|
|
2305
|
-
if (this.unavailable() || !state
|
|
2441
|
+
if (this.unavailable() || !state || !(state.sections.some((section) => section.items.some((item) => item.id === itemId)) || state.footer?.some((entry) => entry.id === itemId)))
|
|
2306
2442
|
return;
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2443
|
+
this.dismiss();
|
|
2444
|
+
if (this.getAttribute("mode") !== "panel") this.trigger.focus();
|
|
2445
|
+
this.fire(
|
|
2446
|
+
this.constructor.pickEvent,
|
|
2447
|
+
action === void 0 ? { gallery: state.id, itemId } : { gallery: state.id, itemId, action }
|
|
2448
|
+
);
|
|
2449
|
+
this.endPreview(true);
|
|
2312
2450
|
}
|
|
2313
2451
|
onTrigger() {
|
|
2314
2452
|
if (this.model?.command) {
|
|
@@ -2356,6 +2494,15 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2356
2494
|
}
|
|
2357
2495
|
if (event.key === "Enter" || event.key === " ") event.stopPropagation();
|
|
2358
2496
|
}
|
|
2497
|
+
/** The Menu key and Shift+F10 open a tile's context menu where the tile is. */
|
|
2498
|
+
onTileKey(event, itemId) {
|
|
2499
|
+
if (event.key !== "ContextMenu" && !(event.key === "F10" && event.shiftKey)) return;
|
|
2500
|
+
if (!this.findItem(itemId)?.actions?.length) return;
|
|
2501
|
+
event.preventDefault();
|
|
2502
|
+
event.stopPropagation();
|
|
2503
|
+
const box = event.currentTarget.getBoundingClientRect();
|
|
2504
|
+
this.openMenu(itemId, box.left, box.bottom);
|
|
2505
|
+
}
|
|
2359
2506
|
onOutside = (event) => {
|
|
2360
2507
|
if (!event.composedPath().includes(this)) this.close();
|
|
2361
2508
|
};
|
|
@@ -2407,6 +2554,17 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2407
2554
|
title=${item.label}
|
|
2408
2555
|
style="width:${width + 6}px;height:${height + 6}px;--office-gallery-preview-width:${width}px;--office-gallery-preview-height:${height}px"
|
|
2409
2556
|
@click=${() => this.pick(item.id)}
|
|
2557
|
+
@pointerenter=${(event) => {
|
|
2558
|
+
if (event.pointerType !== "touch") this.startPreview(item.id);
|
|
2559
|
+
}}
|
|
2560
|
+
@pointerleave=${() => this.endPreview()}
|
|
2561
|
+
@focus=${(event) => {
|
|
2562
|
+
if (event.currentTarget.matches(":focus-visible"))
|
|
2563
|
+
this.startPreview(item.id);
|
|
2564
|
+
}}
|
|
2565
|
+
@blur=${() => this.endPreview()}
|
|
2566
|
+
@contextmenu=${(event) => this.onTileContextMenu(event, item.id)}
|
|
2567
|
+
@keydown=${(event) => this.onTileKey(event, item.id)}
|
|
2410
2568
|
>${preview}${this.getAttribute("mode") === "panel" ? html`<span class="tile-label">${item.label}</span>` : ""}</button>`;
|
|
2411
2569
|
}
|
|
2412
2570
|
lightTemplate() {
|
|
@@ -2446,7 +2604,7 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2446
2604
|
role="dialog"
|
|
2447
2605
|
aria-label=${title}
|
|
2448
2606
|
${unsafeStatic(statics.popupAttribute)}=${ifDefined(state?.id)}
|
|
2449
|
-
>${(state?.sections ?? []).map((section) => this.section(section, disabled))}</div>`;
|
|
2607
|
+
>${(state?.sections ?? []).map((section) => this.section(section, disabled))}${this.footer(disabled)}</div>`;
|
|
2450
2608
|
return html`<span class="gallery-view" @keydown=${this.onKey}>
|
|
2451
2609
|
<div class="strip" ?hidden=${!inline} style=${inline ? "" : "display:none"}>
|
|
2452
2610
|
${inline ? repeat(
|
|
@@ -2455,9 +2613,25 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2455
2613
|
(item) => this.tile(item, first?.tileWidth ?? 40, first?.tileHeight ?? 30, disabled)
|
|
2456
2614
|
) : ""}
|
|
2457
2615
|
</div>
|
|
2458
|
-
${trigger}${this.opened ? popup : ""}
|
|
2616
|
+
${trigger}${this.opened ? popup : ""}${this.menuTemplate()}
|
|
2459
2617
|
</span>`;
|
|
2460
2618
|
}
|
|
2619
|
+
footer(disabled) {
|
|
2620
|
+
const entries = this.model?.footer ?? [];
|
|
2621
|
+
if (entries.length === 0) return "";
|
|
2622
|
+
return html`<div class="footer" role="group">
|
|
2623
|
+
${entries.map(
|
|
2624
|
+
(entry) => html`<button
|
|
2625
|
+
type="button"
|
|
2626
|
+
class="footer-item"
|
|
2627
|
+
data-gallery-footer=${entry.id}
|
|
2628
|
+
?disabled=${disabled}
|
|
2629
|
+
@click=${() => this.pick(entry.id)}
|
|
2630
|
+
>${entry.label}</button
|
|
2631
|
+
>`
|
|
2632
|
+
)}
|
|
2633
|
+
</div>`;
|
|
2634
|
+
}
|
|
2461
2635
|
section(section, disabled) {
|
|
2462
2636
|
return html`<section class="section">
|
|
2463
2637
|
${section.title ? html`<div class="heading">${section.title}</div>` : ""}
|
|
@@ -2481,6 +2655,9 @@ var OfficeUiGallery = class extends OfficeElement {
|
|
|
2481
2655
|
render(this.lightTemplate(), this, { host: this });
|
|
2482
2656
|
this.markHost();
|
|
2483
2657
|
if (this.opened) this.position();
|
|
2658
|
+
const menu = this.querySelector(".tile-menu");
|
|
2659
|
+
if (menu && !menu.contains(this.ownerDocument.activeElement))
|
|
2660
|
+
menu.querySelector("button")?.focus();
|
|
2484
2661
|
}
|
|
2485
2662
|
};
|
|
2486
2663
|
var defineGallery = definer("office-ui-gallery", () => OfficeUiGallery);
|