ooxml-ui 1.29.0 → 1.30.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.
Files changed (107) hide show
  1. package/dist/chart/chartex-options-locales.d.ts +11 -0
  2. package/dist/chart/chartex-options.d.ts +37 -0
  3. package/dist/chart/data-sheet-locales.d.ts +3 -0
  4. package/dist/chart/format-pane-3d.d.ts.map +1 -1
  5. package/dist/chart/format-pane-advanced-intent.d.ts +6 -0
  6. package/dist/chart/format-pane-advanced-intent.d.ts.map +1 -0
  7. package/dist/chart/format-pane-advanced-space.d.ts +14 -0
  8. package/dist/chart/format-pane-advanced-space.d.ts.map +1 -0
  9. package/dist/chart/format-pane-analysis.d.ts +7 -0
  10. package/dist/chart/format-pane-analysis.d.ts.map +1 -0
  11. package/dist/chart/format-pane-axis.d.ts.map +1 -1
  12. package/dist/chart/format-pane-chartex.d.ts +4 -0
  13. package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
  14. package/dist/chart/format-pane-intent.d.ts +4 -3
  15. package/dist/chart/format-pane-intent.d.ts.map +1 -1
  16. package/dist/chart/format-pane-locales/de.d.ts.map +1 -1
  17. package/dist/chart/format-pane-locales/en.d.ts.map +1 -1
  18. package/dist/chart/format-pane-locales/es.d.ts.map +1 -1
  19. package/dist/chart/format-pane-locales/fr.d.ts.map +1 -1
  20. package/dist/chart/format-pane-locales/zh-CN.d.ts.map +1 -1
  21. package/dist/chart/format-pane-options.d.ts.map +1 -1
  22. package/dist/chart/format-pane-space.d.ts +6 -5
  23. package/dist/chart/format-pane-space.d.ts.map +1 -1
  24. package/dist/chart/format-pane-targets.d.ts +1 -0
  25. package/dist/chart/format-pane-types.d.ts +1 -0
  26. package/dist/chart/format-pane-view.d.ts +20 -0
  27. package/dist/chart/format-pane-view.d.ts.map +1 -1
  28. package/dist/chart-format-locales.js +1 -1
  29. package/dist/{chunk-VM6ZTKB3.js → chunk-4OBMFPGF.js} +420 -0
  30. package/dist/{chunk-W2JD75LX.js → chunk-BKHWBIXP.js} +317 -100
  31. package/dist/chunk-E4H3Y7M4.js +462 -0
  32. package/dist/{chunk-WDOWQKKC.js → chunk-HNREZW5U.js} +909 -341
  33. package/dist/{chunk-YMZFOG2U.js → chunk-IE6HKH4X.js} +1 -1
  34. package/dist/{chunk-LNHFMJ2P.js → chunk-SBBFNAKM.js} +3 -3
  35. package/dist/{chunk-KSOHDEUI.js → chunk-SXVOXSTE.js} +1 -1
  36. package/dist/controls.js +2 -2
  37. package/dist/docx/chart-sheet-labels.d.ts +3 -0
  38. package/dist/docx/locales/en.d.ts +15 -0
  39. package/dist/docx/locales/smartart.d.ts +15 -0
  40. package/dist/docx/localization-strings.d.ts +15 -0
  41. package/dist/docx/ribbon-action.d.ts +4 -0
  42. package/dist/docx/smartart-format-galleries.d.ts +2 -0
  43. package/dist/docx.js +197 -43
  44. package/dist/form/checkable.d.ts +1 -0
  45. package/dist/index.js +6 -6
  46. package/dist/pptx/ai/host.cjs +60 -28
  47. package/dist/pptx/ai/host.d.ts +5 -0
  48. package/dist/pptx/ai/host.d.ts.map +1 -1
  49. package/dist/pptx/ai/host.mjs +1 -1
  50. package/dist/pptx/ai/index.cjs +74 -627
  51. package/dist/pptx/ai/index.mjs +5 -589
  52. package/dist/pptx/{chunk-UTBHXIDK.cjs → chunk-2CBK46AW.cjs} +46 -46
  53. package/dist/pptx/{chunk-DVLU476S.mjs → chunk-45OYSCLD.mjs} +1010 -381
  54. package/dist/pptx/{chunk-PATUICO4.cjs → chunk-46HIE4IE.cjs} +420 -0
  55. package/dist/pptx/{chunk-EHIQ4ANA.mjs → chunk-6MEBLCNK.mjs} +420 -0
  56. package/dist/pptx/{chunk-IY7H76CZ.cjs → chunk-BMMTD6PB.cjs} +593 -0
  57. package/dist/pptx/{chunk-67UQWOEQ.cjs → chunk-CQYWHRZE.cjs} +31 -0
  58. package/dist/pptx/{chunk-YO3EMGXD.mjs → chunk-D7UYDESZ.mjs} +2 -2
  59. package/dist/pptx/{chunk-6MZFWTBS.mjs → chunk-LXEMMWVI.mjs} +30 -1
  60. package/dist/pptx/{chunk-YQANSI3A.mjs → chunk-SMMEIEEJ.mjs} +584 -1
  61. package/dist/pptx/{chunk-BXCXY4HB.cjs → chunk-YMWEU56T.cjs} +1027 -392
  62. package/dist/pptx/dom/index.cjs +389 -389
  63. package/dist/pptx/dom/index.mjs +7 -7
  64. package/dist/pptx/export/html2canvas-clone.cjs +12 -4
  65. package/dist/pptx/export/html2canvas-clone.d.ts +17 -2
  66. package/dist/pptx/export/html2canvas-clone.d.ts.map +1 -1
  67. package/dist/pptx/export/html2canvas-clone.mjs +1 -1
  68. package/dist/pptx/i18n/index.cjs +6 -6
  69. package/dist/pptx/i18n/index.mjs +1 -1
  70. package/dist/pptx/index.cjs +3066 -3046
  71. package/dist/pptx/index.mjs +3 -3
  72. package/dist/pptx/render/collaboration-external-readiness.d.ts.map +1 -1
  73. package/dist/pptx/render/collaboration-live-patch.d.ts +3 -1
  74. package/dist/pptx/render/collaboration-live-patch.d.ts.map +1 -1
  75. package/dist/pptx/render/collaboration-reconcile.d.ts +1 -1
  76. package/dist/pptx/render/collaboration-reconcile.d.ts.map +1 -1
  77. package/dist/pptx/render/collaboration-text-target.d.ts +2 -1
  78. package/dist/pptx/render/collaboration-text-target.d.ts.map +1 -1
  79. package/dist/pptx/render/controller/collaboration-history.d.ts +22 -0
  80. package/dist/pptx/render/controller/collaboration-history.d.ts.map +1 -0
  81. package/dist/pptx/render/editor-keymap-chords.d.ts +3 -4
  82. package/dist/pptx/render/editor-keymap-chords.d.ts.map +1 -1
  83. package/dist/pptx/render/morph-animation.d.ts.map +1 -1
  84. package/dist/pptx/render/morph-plan.d.ts +2 -0
  85. package/dist/pptx/render/morph-plan.d.ts.map +1 -1
  86. package/dist/pptx/render/morph-text-slot.d.ts +7 -0
  87. package/dist/pptx/render/morph-text-slot.d.ts.map +1 -1
  88. package/dist/pptx/render/text-block-style.d.ts.map +1 -1
  89. package/dist/pptx/render/text-run-style.d.ts +2 -0
  90. package/dist/pptx/render/text-run-style.d.ts.map +1 -1
  91. package/dist/pptx/{smartart-insert-preview-DHQ47GXP.cjs → smartart-insert-preview-7OL7VWEK.cjs} +5 -5
  92. package/dist/pptx/{smartart-insert-preview-IQVC5LMF.mjs → smartart-insert-preview-SKFD7NCQ.mjs} +4 -4
  93. package/dist/smartart/smartart-effects.d.ts +3 -0
  94. package/dist/smartart/smartart-geometry.d.ts +5 -0
  95. package/dist/smartart/smartart-paint.d.ts +4 -0
  96. package/dist/smartart/smartart-svg.d.ts +4 -1
  97. package/dist/smartart/smartart-text.d.ts +4 -0
  98. package/dist/smartart.js +1 -1
  99. package/dist/teams.js +3 -3
  100. package/dist/visio/viewer-chart-editor.d.ts +2 -1
  101. package/dist/visio.js +36 -19
  102. package/dist/xlsx/chart-ex-pane.d.ts +11 -0
  103. package/dist/xlsx/grid/smartart.d.ts +3 -4
  104. package/dist/xlsx/ribbon/shared-gallery.d.ts +14 -0
  105. package/dist/xlsx.js +386 -139
  106. package/package.json +2 -2
  107. package/dist/chunk-UBBC5FH7.js +0 -31
@@ -0,0 +1,462 @@
1
+ import { chartSpaceFormatSource } from './chunk-HNREZW5U.js';
2
+ import { OfficeElement, controlStyles, flag, emit, definer } from './chunk-QLHCGV4C.js';
3
+ import { html, nothing } from 'lit';
4
+ import { live } from 'lit/directives/live.js';
5
+ import { chartExSpaceDataSheet, CHART_EX_LAYOUTS, chartExStyleSpace } from 'ooxml-core/chart';
6
+ import { normalizeLocale } from 'ooxml-core/i18n';
7
+
8
+ var en = [
9
+ "Chart title",
10
+ "Chart type",
11
+ "Series",
12
+ "Add series",
13
+ "Remove series",
14
+ "Connector lines",
15
+ "Subtotal points",
16
+ "Bin size",
17
+ "Bin count",
18
+ "Parent labels",
19
+ "None",
20
+ "Banner",
21
+ "Overlapping",
22
+ "Mean line",
23
+ "Mean marker",
24
+ "Outliers",
25
+ "Inner points",
26
+ "Quartile method",
27
+ "Inclusive",
28
+ "Exclusive",
29
+ "Axis",
30
+ "Minimum",
31
+ "Maximum",
32
+ "Major unit",
33
+ "Minor unit",
34
+ "Show tick labels",
35
+ "Point label",
36
+ "Show value",
37
+ "Waterfall",
38
+ "Histogram",
39
+ "Box and Whisker",
40
+ "Treemap",
41
+ "Sunburst",
42
+ "Funnel",
43
+ "Map"
44
+ ];
45
+ var dictionaries = {
46
+ en,
47
+ de: [
48
+ "Diagrammtitel",
49
+ "Diagrammtyp",
50
+ "Datenreihe",
51
+ "Datenreihe hinzuf\xFCgen",
52
+ "Datenreihe entfernen",
53
+ "Verbindungslinien",
54
+ "Zwischensummenpunkte",
55
+ "Klassenbreite",
56
+ "Klassenanzahl",
57
+ "\xDCbergeordnete Beschriftungen",
58
+ "Keine",
59
+ "Banner",
60
+ "\xDCberlappend",
61
+ "Mittelwertlinie",
62
+ "Mittelwertmarkierung",
63
+ "Ausrei\xDFer",
64
+ "Innere Punkte",
65
+ "Quartilmethode",
66
+ "Inklusiv",
67
+ "Exklusiv",
68
+ "Achse",
69
+ "Minimum",
70
+ "Maximum",
71
+ "Haupteinheit",
72
+ "Hilfseinheit",
73
+ "Teilstrichbeschriftungen anzeigen",
74
+ "Datenpunktbeschriftung",
75
+ "Wert anzeigen",
76
+ "Wasserfall",
77
+ "Histogramm",
78
+ "Kastengrafik",
79
+ "Treemap",
80
+ "Sunburst",
81
+ "Trichter",
82
+ "Karte"
83
+ ],
84
+ fr: [
85
+ "Titre du graphique",
86
+ "Type de graphique",
87
+ "S\xE9rie",
88
+ "Ajouter une s\xE9rie",
89
+ "Supprimer la s\xE9rie",
90
+ "Lignes de connexion",
91
+ "Points de sous-total",
92
+ "Largeur de classe",
93
+ "Nombre de classes",
94
+ "\xC9tiquettes parentes",
95
+ "Aucune",
96
+ "Banni\xE8re",
97
+ "Superpos\xE9es",
98
+ "Ligne de moyenne",
99
+ "Marqueur de moyenne",
100
+ "Valeurs aberrantes",
101
+ "Points internes",
102
+ "M\xE9thode des quartiles",
103
+ "Inclusive",
104
+ "Exclusive",
105
+ "Axe",
106
+ "Minimum",
107
+ "Maximum",
108
+ "Unit\xE9 principale",
109
+ "Unit\xE9 secondaire",
110
+ "Afficher les \xE9tiquettes de graduation",
111
+ "\xC9tiquette de point",
112
+ "Afficher la valeur",
113
+ "Cascade",
114
+ "Histogramme",
115
+ "Bo\xEEte \xE0 moustaches",
116
+ "Compartimentage",
117
+ "Rayons de soleil",
118
+ "Entonnoir",
119
+ "Carte"
120
+ ],
121
+ es: [
122
+ "T\xEDtulo del gr\xE1fico",
123
+ "Tipo de gr\xE1fico",
124
+ "Serie",
125
+ "Agregar serie",
126
+ "Quitar serie",
127
+ "L\xEDneas de conexi\xF3n",
128
+ "Puntos de subtotal",
129
+ "Ancho del intervalo",
130
+ "N\xFAmero de intervalos",
131
+ "Etiquetas principales",
132
+ "Ninguna",
133
+ "Banda",
134
+ "Superpuestas",
135
+ "L\xEDnea de media",
136
+ "Marcador de media",
137
+ "Valores at\xEDpicos",
138
+ "Puntos internos",
139
+ "M\xE9todo de cuartiles",
140
+ "Inclusivo",
141
+ "Exclusivo",
142
+ "Eje",
143
+ "M\xEDnimo",
144
+ "M\xE1ximo",
145
+ "Unidad principal",
146
+ "Unidad secundaria",
147
+ "Mostrar etiquetas de graduaci\xF3n",
148
+ "Etiqueta de punto",
149
+ "Mostrar valor",
150
+ "Cascada",
151
+ "Histograma",
152
+ "Cajas y bigotes",
153
+ "Rect\xE1ngulos",
154
+ "Proyecci\xF3n solar",
155
+ "Embudo",
156
+ "Mapa"
157
+ ],
158
+ "zh-CN": [
159
+ "\u56FE\u8868\u6807\u9898",
160
+ "\u56FE\u8868\u7C7B\u578B",
161
+ "\u7CFB\u5217",
162
+ "\u6DFB\u52A0\u7CFB\u5217",
163
+ "\u5220\u9664\u7CFB\u5217",
164
+ "\u8FDE\u63A5\u7EBF",
165
+ "\u5C0F\u8BA1\u6570\u636E\u70B9",
166
+ "\u7BB1\u5BBD\u5EA6",
167
+ "\u7BB1\u6570\u91CF",
168
+ "\u7236\u7EA7\u6807\u7B7E",
169
+ "\u65E0",
170
+ "\u6A2A\u5E45",
171
+ "\u91CD\u53E0",
172
+ "\u5E73\u5747\u503C\u7EBF",
173
+ "\u5E73\u5747\u503C\u6807\u8BB0",
174
+ "\u5F02\u5E38\u503C",
175
+ "\u5185\u90E8\u6570\u636E\u70B9",
176
+ "\u56DB\u5206\u4F4D\u6570\u65B9\u6CD5",
177
+ "\u5305\u542B",
178
+ "\u4E0D\u5305\u542B",
179
+ "\u5750\u6807\u8F74",
180
+ "\u6700\u5C0F\u503C",
181
+ "\u6700\u5927\u503C",
182
+ "\u4E3B\u8981\u5355\u4F4D",
183
+ "\u6B21\u8981\u5355\u4F4D",
184
+ "\u663E\u793A\u523B\u5EA6\u6807\u7B7E",
185
+ "\u6570\u636E\u70B9\u6807\u7B7E",
186
+ "\u663E\u793A\u6570\u503C",
187
+ "\u7011\u5E03\u56FE",
188
+ "\u76F4\u65B9\u56FE",
189
+ "\u7BB1\u5F62\u56FE",
190
+ "\u6811\u72B6\u56FE",
191
+ "\u65ED\u65E5\u56FE",
192
+ "\u6F0F\u6597\u56FE",
193
+ "\u5730\u56FE"
194
+ ]
195
+ };
196
+ function chartExOptionsText(locale, key) {
197
+ const normalized = normalizeLocale(locale, ["en", "de", "fr", "es", "zh-CN"], "en");
198
+ return dictionaries[normalized][en.indexOf(key)] ?? key;
199
+ }
200
+
201
+ // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/chart/chartex-options.css?raw
202
+ var chartex_options_default = ":host {\n display: block;\n color: var(--office-foreground);\n font: inherit;\n}\nfieldset {\n margin: 8px 0;\n border: 1px solid var(--office-border);\n padding: 8px;\n}\nlabel {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin: 6px 0;\n}\ninput,\nselect {\n color: var(--office-foreground);\n background: var(--office-surface);\n border: 1px solid var(--office-border);\n max-width: 180px;\n padding: 4px;\n}\nbutton {\n margin: 4px;\n color: var(--office-foreground);\n background: var(--office-surface);\n border: 1px solid var(--office-border);\n padding: 4px 8px;\n}\n";
203
+
204
+ // src/chart/chartex-options.ts
205
+ var OfficeUiChartExOptions = class extends OfficeElement {
206
+ static styles = controlStyles(chartex_options_default);
207
+ static properties = {
208
+ space: { attribute: false },
209
+ locale: { type: String },
210
+ disabled: flag
211
+ };
212
+ seriesIndex = 0;
213
+ axisIndex = 0;
214
+ pointIndex = 0;
215
+ send(action) {
216
+ if (!this.disabled) emit(this, "office-chart-ex-edit", { action });
217
+ }
218
+ t(key) {
219
+ return chartExOptionsText(this.locale ?? "en", key);
220
+ }
221
+ check(key, value, change) {
222
+ return html`<label
223
+ >${this.t(key)}<input
224
+ type="checkbox"
225
+ aria-label=${this.t(key)}
226
+ .checked=${live(value ?? false)}
227
+ ?disabled=${this.disabled}
228
+ @change=${(e) => change(e.target.checked)}
229
+ /></label>`;
230
+ }
231
+ number(key, value, change) {
232
+ return html`<label
233
+ >${this.t(key)}<input
234
+ type="number"
235
+ aria-label=${this.t(key)}
236
+ .value=${live(value === void 0 ? "" : String(value))}
237
+ ?disabled=${this.disabled}
238
+ @change=${(e) => {
239
+ const input = e.target;
240
+ const n = input.value === "" ? void 0 : Number(input.value);
241
+ if (n === void 0 || Number.isFinite(n)) change(n);
242
+ }}
243
+ /></label>`;
244
+ }
245
+ render() {
246
+ const space = this.space;
247
+ if (!space) return nothing;
248
+ const index = Math.min(this.seriesIndex, space.plotArea.series.length - 1);
249
+ const series = space.plotArea.series[index];
250
+ if (!series) return nothing;
251
+ const options = series.layoutProperties;
252
+ const axisIndex = Math.min(this.axisIndex, Math.max(0, space.plotArea.axes.length - 1));
253
+ const numeric = space.plotArea.axes[axisIndex];
254
+ const layoutNames = {
255
+ waterfall: "Waterfall",
256
+ clusteredColumn: "Histogram",
257
+ boxWhisker: "Box and Whisker",
258
+ treemap: "Treemap",
259
+ sunburst: "Sunburst",
260
+ funnel: "Funnel",
261
+ regionMap: "Map"
262
+ };
263
+ const value = (key) => numeric?.scaling?.kind === "val" && typeof numeric.scaling[key] === "number" ? numeric.scaling[key] : void 0;
264
+ const scale = (key, number) => this.send({
265
+ op: "axis",
266
+ axisIndex,
267
+ edit: {
268
+ scaling: {
269
+ ...numeric?.scaling?.kind === "val" ? numeric.scaling : { kind: "val" },
270
+ [key]: number ?? "auto"
271
+ }
272
+ }
273
+ });
274
+ const points = chartExSpaceDataSheet(space).categories.length;
275
+ const label = series.dataLabels?.labels.find((label2) => label2.index === this.pointIndex);
276
+ return html` <label
277
+ >${this.t("Chart title")}<input
278
+ type="text"
279
+ aria-label=${this.t("Chart title")}
280
+ .value=${live(space.title?.tx?.value ?? space.title?.tx?.rich?.text ?? "")}
281
+ ?disabled=${this.disabled}
282
+ @change=${(e) => this.send({ op: "title", text: e.target.value || void 0 })}
283
+ /></label>
284
+ <label
285
+ >${this.t("Chart type")}<select
286
+ aria-label=${this.t("Chart type")}
287
+ .value=${live(series.layoutId)}
288
+ ?disabled=${this.disabled}
289
+ @change=${(e) => this.send({ op: "layout", layout: e.target.value })}
290
+ >${CHART_EX_LAYOUTS.filter((layout) => layout !== "regionMap" || series.layoutId === "regionMap").map((layout) => html`<option value=${layout}>${this.t(layoutNames[layout])}</option>`)}</select
291
+ ></label
292
+ >
293
+ <label
294
+ >${this.t("Series")}<select
295
+ aria-label=${this.t("Series")}
296
+ .value=${live(String(index))}
297
+ @change=${(e) => {
298
+ this.seriesIndex = Number(e.target.value);
299
+ this.requestUpdate();
300
+ }}
301
+ >${space.plotArea.series.map((series2, i) => html`<option value=${i}>${series2.tx?.value ?? series2.tx?.rich?.text ?? i + 1}</option>`)}</select
302
+ ></label
303
+ >
304
+ <button
305
+ ?disabled=${this.disabled || !["boxWhisker", "clusteredColumn"].includes(series.layoutId)}
306
+ @click=${() => this.send({ op: "addSeries", name: `${this.t("Series")} ${space.plotArea.series.length + 1}`, templateIndex: index })}
307
+ >${this.t("Add series")}</button
308
+ >
309
+ <button
310
+ ?disabled=${this.disabled || space.plotArea.series.filter((s) => s.ownerIndex === void 0).length < 2}
311
+ @click=${() => this.send({ op: "removeSeries", seriesIndex: index })}
312
+ >${this.t("Remove series")}</button
313
+ >
314
+ ${series.layoutId === "waterfall" ? html`<fieldset
315
+ ><legend>${this.t("Waterfall")}</legend>
316
+ ${this.check("Connector lines", options?.visibility?.connectorLines ?? true, (value2) => this.send({ op: "waterfall", seriesIndex: index, options: { connectorLines: value2 } }))}
317
+ <label
318
+ >${this.t("Subtotal points")}<input
319
+ aria-label=${this.t("Subtotal points")}
320
+ .value=${live((options?.subtotals ?? []).join(", "))}
321
+ ?disabled=${this.disabled}
322
+ @change=${(e) => {
323
+ const text = e.target.value;
324
+ const subtotals = text.trim() ? text.split(",").map((v) => Number(v.trim())) : [];
325
+ if (subtotals.every((n) => Number.isSafeInteger(n) && n >= 0 && n < points))
326
+ this.send({ op: "waterfall", seriesIndex: index, options: { subtotals } });
327
+ }} /></label
328
+ ></fieldset>` : nothing}
329
+ ${series.layoutId === "clusteredColumn" ? html`<fieldset
330
+ ><legend>${this.t("Histogram")}</legend>${this.number(
331
+ "Bin size",
332
+ options?.binning?.binSize,
333
+ (value2) => {
334
+ if (value2 !== void 0 && value2 > 0)
335
+ this.send({
336
+ op: "binning",
337
+ seriesIndex: index,
338
+ binning: { ...options?.binning, binSize: value2 }
339
+ });
340
+ }
341
+ )}${this.number("Bin count", options?.binning?.binCount, (value2) => {
342
+ if (value2 !== void 0 && Number.isSafeInteger(value2) && value2 > 0) {
343
+ const { binSize: _size, ...rest } = options?.binning ?? {};
344
+ this.send({
345
+ op: "binning",
346
+ seriesIndex: index,
347
+ binning: { ...rest, binCount: value2 }
348
+ });
349
+ }
350
+ })}</fieldset
351
+ >` : nothing}
352
+ ${series.layoutId === "treemap" ? html`<label
353
+ >${this.t("Parent labels")}<select
354
+ aria-label=${this.t("Parent labels")}
355
+ .value=${live(options?.parentLabelLayout ?? "banner")}
356
+ ?disabled=${this.disabled}
357
+ @change=${(e) => this.send({ op: "parentLabels", seriesIndex: index, layout: e.target.value })}
358
+ >${["none", "banner", "overlapping"].map((v, i) => html`<option value=${v}>${this.t(["None", "Banner", "Overlapping"][i])}</option>`)}</select
359
+ ></label
360
+ >` : nothing}
361
+ ${series.layoutId === "boxWhisker" ? html`<fieldset
362
+ ><legend>${this.t("Box and Whisker")}</legend
363
+ >${["meanLine", "meanMarker", "outliers", "nonoutliers"].map((key, i) => this.check(["Mean line", "Mean marker", "Outliers", "Inner points"][i], options?.visibility?.[key], (value2) => this.send({ op: "boxWhisker", seriesIndex: index, options: { [key]: value2 } })))}<label
364
+ >${this.t("Quartile method")}<select
365
+ aria-label=${this.t("Quartile method")}
366
+ .value=${live(options?.statistics?.quartileMethod ?? "inclusive")}
367
+ ?disabled=${this.disabled}
368
+ @change=${(e) => this.send({ op: "boxWhisker", seriesIndex: index, options: { quartileMethod: e.target.value } })}
369
+ ><option value="inclusive">${this.t("Inclusive")}</option
370
+ ><option value="exclusive">${this.t("Exclusive")}</option></select
371
+ ></label
372
+ ></fieldset
373
+ >` : nothing}
374
+ ${space.plotArea.axes.length ? html`<fieldset
375
+ ><legend>${this.t("Axis")}</legend
376
+ ><select
377
+ aria-label=${this.t("Axis")}
378
+ .value=${live(String(axisIndex))}
379
+ @change=${(e) => {
380
+ this.axisIndex = Number(e.target.value);
381
+ this.requestUpdate();
382
+ }}
383
+ >${space.plotArea.axes.map((axis, i) => html`<option value=${i}>${axis.id ?? i + 1}</option>`)}</select
384
+ >${numeric?.scaling?.kind === "val" ? html`${this.number("Minimum", value("min"), (n) => scale("min", n))}${this.number("Maximum", value("max"), (n) => scale("max", n))}${this.number(
385
+ "Major unit",
386
+ value("majorUnit"),
387
+ (n) => {
388
+ if (n === void 0 || n > 0) scale("majorUnit", n);
389
+ }
390
+ )}${this.number("Minor unit", value("minorUnit"), (n) => {
391
+ if (n === void 0 || n > 0) scale("minorUnit", n);
392
+ })}` : nothing}${this.check("Show tick labels", !!numeric?.tickLabels, (show) => this.send({ op: "tickLabels", axisIndex, visible: show }))}</fieldset
393
+ >` : nothing}
394
+ <fieldset
395
+ ><legend>${this.t("Point label")}</legend
396
+ ><input
397
+ type="number"
398
+ min="0"
399
+ max=${Math.max(0, points - 1)}
400
+ aria-label=${this.t("Point label")}
401
+ .value=${live(String(this.pointIndex))}
402
+ @change=${(e) => {
403
+ const n = Number(e.target.value);
404
+ if (Number.isSafeInteger(n) && n >= 0 && n < points) {
405
+ this.pointIndex = n;
406
+ this.requestUpdate();
407
+ }
408
+ }}
409
+ />${this.check("Show value", label?.visibility?.value ?? series.dataLabels?.visibility?.value, (show) => this.send({ op: "pointLabel", seriesIndex: index, pointIndex: this.pointIndex, label: { ...label, visibility: { ...label?.visibility, value: show } } }))}</fieldset
410
+ >`;
411
+ }
412
+ };
413
+ var defineChartExOptions = definer(
414
+ "office-ui-chart-ex-options",
415
+ () => OfficeUiChartExOptions
416
+ );
417
+
418
+ // src/chrome/status-layout.ts
419
+ function statusLayout(width) {
420
+ if (!(width > 0))
421
+ return { words: true, language: true, views: true, compactPage: false, stats: Infinity };
422
+ return {
423
+ words: width >= 440,
424
+ language: width >= 640,
425
+ views: width >= 480,
426
+ compactPage: width < 520,
427
+ stats: width >= 760 ? Infinity : width >= 560 ? 2 : width >= 440 ? 1 : 0
428
+ };
429
+ }
430
+ function watchStatusWidth(element, onChange) {
431
+ if (typeof ResizeObserver === "undefined") return () => {
432
+ };
433
+ let last = -1;
434
+ const observer = new ResizeObserver(() => {
435
+ const width = element.clientWidth;
436
+ if (width === last) return;
437
+ last = width;
438
+ onChange(width);
439
+ });
440
+ observer.observe(element);
441
+ return () => observer.disconnect();
442
+ }
443
+ function compactPageText(text) {
444
+ const numbers = text.match(/\d+/g);
445
+ return numbers && numbers.length === 2 ? numbers.join("/") : text;
446
+ }
447
+ function chartExSpaceFormatSource(space, theme) {
448
+ const source = chartSpaceFormatSource(chartExStyleSpace(space), {
449
+ ...theme ? { theme } : {},
450
+ advanced: true
451
+ });
452
+ const { axisOptions: _axes, seriesOptions: _series, ...common } = source;
453
+ return {
454
+ ...common,
455
+ element(target) {
456
+ const view = source.element(target);
457
+ return { ...view, support: { ...view.support, secondaryAxis: false } };
458
+ }
459
+ };
460
+ }
461
+
462
+ export { chartExSpaceFormatSource, compactPageText, defineChartExOptions, statusLayout, watchStatusWidth };