ooxml-ui 0.21.0 → 0.22.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.
|
@@ -2536,6 +2536,7 @@ var OfficeUiContextMenu = class extends OfficeElement {
|
|
|
2536
2536
|
type="button"
|
|
2537
2537
|
class=${item.danger ? "item danger" : "item"}
|
|
2538
2538
|
data-item-id=${item.id}
|
|
2539
|
+
title=${ifDefined(item.title)}
|
|
2539
2540
|
role=${checkable ? "menuitemcheckbox" : "menuitem"}
|
|
2540
2541
|
aria-checked=${ifDefined(checkable ? String(item.checked) : void 0)}
|
|
2541
2542
|
aria-disabled=${ifDefined(item.disabled ? "true" : void 0)}
|
|
@@ -4242,7 +4243,10 @@ var OfficeUiZoomSlider = class extends OfficeElement {
|
|
|
4242
4243
|
step: { type: Number },
|
|
4243
4244
|
disabled: flag,
|
|
4244
4245
|
fit: { type: String, reflect: true },
|
|
4245
|
-
label: { type: String }
|
|
4246
|
+
label: { type: String },
|
|
4247
|
+
outLabel: { type: String, attribute: "out-label" },
|
|
4248
|
+
inLabel: { type: String, attribute: "in-label" },
|
|
4249
|
+
sliderLabel: { type: String, attribute: "slider-label" }
|
|
4246
4250
|
};
|
|
4247
4251
|
requested = 100;
|
|
4248
4252
|
constructor() {
|
|
@@ -4253,6 +4257,9 @@ var OfficeUiZoomSlider = class extends OfficeElement {
|
|
|
4253
4257
|
this.disabled = false;
|
|
4254
4258
|
this.fit = null;
|
|
4255
4259
|
this.label = null;
|
|
4260
|
+
this.outLabel = null;
|
|
4261
|
+
this.inLabel = null;
|
|
4262
|
+
this.sliderLabel = null;
|
|
4256
4263
|
}
|
|
4257
4264
|
get value() {
|
|
4258
4265
|
return clampTo(this.requested, this.low, this.high);
|
|
@@ -4292,18 +4299,20 @@ var OfficeUiZoomSlider = class extends OfficeElement {
|
|
|
4292
4299
|
const { value } = this;
|
|
4293
4300
|
const disabled = present(this.disabled);
|
|
4294
4301
|
const fit = this.fit || "Fit";
|
|
4302
|
+
const out = this.outLabel || "Zoom out";
|
|
4303
|
+
const inn = this.inLabel || "Zoom in";
|
|
4295
4304
|
return html`
|
|
4296
4305
|
<button
|
|
4297
4306
|
type="button"
|
|
4298
|
-
aria-label
|
|
4299
|
-
title
|
|
4307
|
+
aria-label=${out}
|
|
4308
|
+
title=${out}
|
|
4300
4309
|
?disabled=${disabled || value <= this.low}
|
|
4301
4310
|
@click=${() => this.stepBy(-1)}
|
|
4302
4311
|
>−</button
|
|
4303
4312
|
>
|
|
4304
4313
|
<input
|
|
4305
4314
|
type="range"
|
|
4306
|
-
aria-label
|
|
4315
|
+
aria-label=${this.sliderLabel || "Zoom"}
|
|
4307
4316
|
aria-valuetext="${value}%"
|
|
4308
4317
|
min=${this.low}
|
|
4309
4318
|
max=${this.high}
|
|
@@ -4314,8 +4323,8 @@ var OfficeUiZoomSlider = class extends OfficeElement {
|
|
|
4314
4323
|
/>
|
|
4315
4324
|
<button
|
|
4316
4325
|
type="button"
|
|
4317
|
-
aria-label
|
|
4318
|
-
title
|
|
4326
|
+
aria-label=${inn}
|
|
4327
|
+
title=${inn}
|
|
4319
4328
|
?disabled=${disabled || value >= this.high}
|
|
4320
4329
|
@click=${() => this.stepBy(1)}
|
|
4321
4330
|
>+</button
|
package/dist/controls.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-
|
|
1
|
+
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-LKLZOPTO.js';
|
|
2
2
|
import './chunk-HZ422LTR.js';
|
|
3
3
|
import './chunk-E47762NY.js';
|
|
4
4
|
import './chunk-5A4REH6T.js';
|
|
@@ -3,7 +3,9 @@ import { OfficeElement } from '../base.js';
|
|
|
3
3
|
* Office status-bar zoom: zoom out, slider, zoom in, percentage and an optional fit button.
|
|
4
4
|
* Attributes: `value` (percent, default 100), `min` (10), `max` (400), `step` (10, for the
|
|
5
5
|
* buttons), `disabled`, `fit` (shows the fit button; its value is the button's name, e.g.
|
|
6
|
-
* "Fit page to current window"), `label` (group name, default "Zoom").
|
|
6
|
+
* "Fit page to current window"), `label` (group name, default "Zoom"). `out-label`, `in-label` and
|
|
7
|
+
* `slider-label` name the zoom-out button, zoom-in button and slider (English by default), so a
|
|
8
|
+
* product can translate them.
|
|
7
9
|
* User changes emit native `input` (slider drag) and `change` events with `value` updated;
|
|
8
10
|
* the fit button emits `office-command` `{ command: 'zoom-fit' }`. Setting `value` never emits.
|
|
9
11
|
*/
|
|
@@ -39,6 +41,18 @@ export declare class OfficeUiZoomSlider extends OfficeElement {
|
|
|
39
41
|
label: {
|
|
40
42
|
type: StringConstructor;
|
|
41
43
|
};
|
|
44
|
+
outLabel: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
attribute: string;
|
|
47
|
+
};
|
|
48
|
+
inLabel: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
attribute: string;
|
|
51
|
+
};
|
|
52
|
+
sliderLabel: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
attribute: string;
|
|
55
|
+
};
|
|
42
56
|
};
|
|
43
57
|
min: number;
|
|
44
58
|
max: number;
|
|
@@ -46,6 +60,9 @@ export declare class OfficeUiZoomSlider extends OfficeElement {
|
|
|
46
60
|
disabled: boolean;
|
|
47
61
|
fit: string | null;
|
|
48
62
|
label: string | null;
|
|
63
|
+
outLabel: string | null;
|
|
64
|
+
inLabel: string | null;
|
|
65
|
+
sliderLabel: string | null;
|
|
49
66
|
private requested;
|
|
50
67
|
constructor();
|
|
51
68
|
get value(): number;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { installOfficeUiTheme } from './chunk-2X6QYQ3Q.js';
|
|
2
2
|
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-2X6QYQ3Q.js';
|
|
3
|
-
import { registerControls } from './chunk-
|
|
4
|
-
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, glyph, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-
|
|
3
|
+
import { registerControls } from './chunk-LKLZOPTO.js';
|
|
4
|
+
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, glyph, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-LKLZOPTO.js';
|
|
5
5
|
import { defineSmartArt } from './chunk-3MDKXKKQ.js';
|
|
6
6
|
export { OfficeUiSmartArt, defineSmartArt, renderDiagramDrawing } from './chunk-3MDKXKKQ.js';
|
|
7
7
|
import { TEAMS_TAGS, registerTeams } from './chunk-HNGJI5EZ.js';
|
|
@@ -20,6 +20,8 @@ export interface OfficeMenuItem {
|
|
|
20
20
|
checked?: boolean;
|
|
21
21
|
/** A registered icon drawn before the label. */
|
|
22
22
|
icon?: string;
|
|
23
|
+
/** Tooltip, for example why a disabled row is unavailable. */
|
|
24
|
+
title?: string;
|
|
23
25
|
}
|
|
24
26
|
/** Everything a controlled menu needs to draw. */
|
|
25
27
|
export interface OfficeMenuState {
|