@vonage/vivid 5.31.0 → 5.32.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/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +25 -26
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +5 -5
- package/bundled/char-count.cjs +2 -2
- package/bundled/char-count.js +2 -3
- package/bundled/definition4.cjs +17 -10
- package/bundled/definition4.js +17 -10
- package/bundled/form-element.cjs +1 -1
- package/bundled/form-element.js +3 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +11 -10
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +12 -17
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +7 -9
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +10 -8
- package/bundled/with-error-text.cjs +1 -1
- package/bundled/with-error-text.js +7 -9
- package/custom-elements.json +4955 -6650
- package/lib/accordion-item/accordion-item.d.ts +13 -7
- package/lib/action-group/action-group.d.ts +13 -7
- package/lib/alert/alert.d.ts +26 -14
- package/lib/audio-player/audio-player.d.ts +13 -7
- package/lib/avatar/avatar.d.ts +13 -7
- package/lib/badge/badge.d.ts +13 -7
- package/lib/banner/banner.d.ts +39 -21
- package/lib/breadcrumb/breadcrumb.d.ts +13 -7
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +13 -7
- package/lib/button/button.d.ts +39 -21
- package/lib/calendar-event/calendar-event.d.ts +13 -7
- package/lib/card/card.d.ts +13 -7
- package/lib/checkbox/checkbox.d.ts +84 -48
- package/lib/color-picker/color-picker.d.ts +98 -56
- package/lib/combobox/combobox.d.ts +98 -56
- package/lib/country-group/country-group.d.ts +26 -14
- package/lib/data-grid/data-grid-cell.d.ts +26 -14
- package/lib/data-grid/data-grid-row.d.ts +13 -7
- package/lib/date-picker/date-picker.d.ts +162 -114
- package/lib/date-range-picker/date-range-picker.d.ts +82 -58
- package/lib/date-time-picker/date-time-picker.d.ts +164 -116
- package/lib/dial-pad/dial-pad.d.ts +13 -7
- package/lib/dialog/dialog.d.ts +26 -14
- package/lib/divider/divider.d.ts +13 -7
- package/lib/fab/fab.d.ts +13 -7
- package/lib/file-picker/file-picker.d.ts +98 -56
- package/lib/header/header.d.ts +13 -7
- package/lib/listbox/listbox.d.ts +41 -23
- package/lib/menu/menu.d.ts +30 -18
- package/lib/menu-item/menu-item.d.ts +39 -21
- package/lib/nav/nav.d.ts +13 -7
- package/lib/nav-disclosure/nav-disclosure.d.ts +26 -14
- package/lib/nav-item/nav-item.d.ts +28 -16
- package/lib/note/note.d.ts +13 -7
- package/lib/number-field/number-field.d.ts +124 -70
- package/lib/optgroup/optgroup.d.ts +13 -7
- package/lib/option/option.d.ts +26 -14
- package/lib/pagination/pagination.d.ts +13 -7
- package/lib/popover/popover.d.ts +26 -14
- package/lib/progress/progress.d.ts +13 -7
- package/lib/progress-ring/progress-ring.d.ts +13 -7
- package/lib/radio/radio.d.ts +45 -27
- package/lib/radio-group/radio-group.d.ts +13 -7
- package/lib/range-slider/range-slider.d.ts +40 -22
- package/lib/rich-text-editor/rich-text-editor.d.ts +30 -18
- package/lib/searchable-select/option-tag.d.ts +13 -7
- package/lib/searchable-select/searchable-select.d.ts +124 -70
- package/lib/select/select.d.ts +124 -70
- package/lib/selectable-box/selectable-box.d.ts +13 -7
- package/lib/simple-color-picker/simple-color-picker.d.ts +31 -19
- package/lib/slider/slider.d.ts +39 -21
- package/lib/split-button/split-button.d.ts +39 -21
- package/lib/status/status.d.ts +13 -7
- package/lib/switch/switch.d.ts +26 -14
- package/lib/tab/tab.d.ts +39 -21
- package/lib/tab-panel/tab-panel.d.ts +13 -7
- package/lib/table/table-cell.d.ts +13 -7
- package/lib/table/table-header-cell.d.ts +13 -7
- package/lib/table/table-row.d.ts +13 -7
- package/lib/table/table-sorting-button.d.ts +26 -14
- package/lib/tag/tag.d.ts +39 -21
- package/lib/tag-group/tag-group.d.ts +13 -7
- package/lib/text-area/text-area.d.ts +112 -64
- package/lib/text-field/text-field.d.ts +125 -71
- package/lib/time-picker/time-picker.d.ts +82 -58
- package/lib/toggletip/toggletip.d.ts +30 -18
- package/lib/tooltip/tooltip.d.ts +30 -18
- package/lib/tree-item/tree-item.d.ts +26 -14
- package/lib/tree-view/tree-view.d.ts +13 -7
- package/lib/video-player/video-player.d.ts +13 -7
- package/listbox/index.cjs +1 -1
- package/listbox/index.js +3 -4
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +5 -1
- package/package.json +7 -7
- package/shared/aria/aria-mixin.d.ts +11 -5
- package/shared/aria/delegates-aria.d.ts +13 -7
- package/shared/aria/host-semantics.d.ts +13 -7
- package/shared/color-picker/base-color-picker.d.ts +14 -8
- package/shared/deprecation/replaced-props.d.ts +12 -6
- package/shared/feedback/feedback-message.d.ts +13 -7
- package/shared/feedback/mixins.d.ts +26 -14
- package/shared/foundation/button/button.d.ts +26 -14
- package/shared/foundation/form-associated/form-associated.d.ts +26 -14
- package/shared/foundation/vivid-element/vivid-element.d.ts +35 -17
- package/shared/framework/reactive-controller.d.ts +12 -6
- package/shared/listbox/with-options-filter.d.ts +14 -8
- package/shared/listbox/with-options.d.ts +28 -16
- package/shared/patterns/affix.d.ts +26 -14
- package/shared/patterns/anchored.d.ts +34 -22
- package/shared/patterns/char-count/char-count.d.ts +14 -8
- package/shared/patterns/form-elements/form-element.d.ts +14 -8
- package/shared/patterns/form-elements/with-contextual-help.d.ts +14 -8
- package/shared/patterns/form-elements/with-error-text.d.ts +18 -12
- package/shared/patterns/form-elements/with-success-text.d.ts +13 -7
- package/shared/patterns/kbd-shortcut.d.ts +13 -7
- package/shared/patterns/linkable.d.ts +13 -7
- package/shared/patterns/localized.d.ts +30 -18
- package/shared/patterns/trapped-focus.d.ts +13 -7
- package/shared/picker-field/mixins/calendar-picker.d.ts +41 -29
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +41 -29
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +13 -7
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +41 -29
- package/shared/picker-field/mixins/single-date-picker.d.ts +41 -29
- package/shared/picker-field/mixins/single-value-picker.d.ts +39 -27
- package/shared/picker-field/mixins/time-selection-picker.d.ts +43 -31
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +82 -58
- package/shared/picker-field/picker-field.d.ts +98 -57
- package/unbundled/anchored.cjs +39 -37
- package/unbundled/anchored.js +39 -37
- package/unbundled/calendar-picker.template.cjs +7 -5
- package/unbundled/calendar-picker.template.js +7 -5
- package/unbundled/char-count.cjs +3 -9
- package/unbundled/char-count.js +3 -9
- package/unbundled/definition5.cjs +17 -10
- package/unbundled/definition5.js +17 -10
- package/unbundled/definition50.cjs +3 -4
- package/unbundled/definition50.js +3 -4
- package/unbundled/definition52.cjs +6 -2
- package/unbundled/definition52.js +6 -2
- package/unbundled/form-element.cjs +3 -4
- package/unbundled/form-element.js +3 -4
- package/unbundled/localized.cjs +15 -11
- package/unbundled/localized.js +15 -11
- package/unbundled/picker-field.template.cjs +22 -24
- package/unbundled/picker-field.template.js +22 -24
- package/unbundled/time-selection-picker.template.cjs +10 -10
- package/unbundled/time-selection-picker.template.js +10 -10
- package/unbundled/vivid-element.cjs +12 -8
- package/unbundled/vivid-element.js +12 -8
- package/unbundled/with-error-text.cjs +11 -10
- package/unbundled/with-error-text.js +11 -10
- package/shared/foundation/vivid-element/vivid-element.browser-spec.d.ts +0 -1
package/unbundled/localized.cjs
CHANGED
|
@@ -27,6 +27,12 @@ var Localized = (Base) => {
|
|
|
27
27
|
/** Mixin for Localized elements that need to observe locale changes. */
|
|
28
28
|
var WithObservableLocale = (Base) => {
|
|
29
29
|
class WithObservableLocaleElement extends Localized(Base) {
|
|
30
|
+
constructor(..._args) {
|
|
31
|
+
super(..._args);
|
|
32
|
+
this._localeChangeHandler = { handleChange: () => {
|
|
33
|
+
this.localeChanged();
|
|
34
|
+
} };
|
|
35
|
+
}
|
|
30
36
|
/**
|
|
31
37
|
* Called whenever the locale changes.
|
|
32
38
|
* @internal
|
|
@@ -35,22 +41,20 @@ var WithObservableLocale = (Base) => {
|
|
|
35
41
|
localeChanged() {}
|
|
36
42
|
connectedCallback() {
|
|
37
43
|
super.connectedCallback();
|
|
38
|
-
this
|
|
44
|
+
this._startObservingLocaleChanges();
|
|
39
45
|
}
|
|
40
46
|
disconnectedCallback() {
|
|
41
47
|
super.disconnectedCallback();
|
|
42
|
-
this
|
|
48
|
+
this._stopObservingLocaleChanges();
|
|
43
49
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#startObservingLocaleChanges() {
|
|
49
|
-
this.#localeChangeObserver = _microsoft_fast_element.Observable.binding(() => this.locale, this.#localeChangeHandler);
|
|
50
|
-
this.#localeChangeObserver.observe(this, _microsoft_fast_element.ExecutionContext.default);
|
|
50
|
+
/** @internal */
|
|
51
|
+
_startObservingLocaleChanges() {
|
|
52
|
+
this._localeChangeObserver = _microsoft_fast_element.Observable.binding(() => this.locale, this._localeChangeHandler);
|
|
53
|
+
this._localeChangeObserver.observe(this, _microsoft_fast_element.ExecutionContext.default);
|
|
51
54
|
}
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
/** @internal */
|
|
56
|
+
_stopObservingLocaleChanges() {
|
|
57
|
+
this._localeChangeObserver.dispose();
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
return WithObservableLocaleElement;
|
package/unbundled/localized.js
CHANGED
|
@@ -27,6 +27,12 @@ var Localized = (Base) => {
|
|
|
27
27
|
/** Mixin for Localized elements that need to observe locale changes. */
|
|
28
28
|
var WithObservableLocale = (Base) => {
|
|
29
29
|
class WithObservableLocaleElement extends Localized(Base) {
|
|
30
|
+
constructor(..._args) {
|
|
31
|
+
super(..._args);
|
|
32
|
+
this._localeChangeHandler = { handleChange: () => {
|
|
33
|
+
this.localeChanged();
|
|
34
|
+
} };
|
|
35
|
+
}
|
|
30
36
|
/**
|
|
31
37
|
* Called whenever the locale changes.
|
|
32
38
|
* @internal
|
|
@@ -35,22 +41,20 @@ var WithObservableLocale = (Base) => {
|
|
|
35
41
|
localeChanged() {}
|
|
36
42
|
connectedCallback() {
|
|
37
43
|
super.connectedCallback();
|
|
38
|
-
this
|
|
44
|
+
this._startObservingLocaleChanges();
|
|
39
45
|
}
|
|
40
46
|
disconnectedCallback() {
|
|
41
47
|
super.disconnectedCallback();
|
|
42
|
-
this
|
|
48
|
+
this._stopObservingLocaleChanges();
|
|
43
49
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#startObservingLocaleChanges() {
|
|
49
|
-
this.#localeChangeObserver = Observable.binding(() => this.locale, this.#localeChangeHandler);
|
|
50
|
-
this.#localeChangeObserver.observe(this, ExecutionContext.default);
|
|
50
|
+
/** @internal */
|
|
51
|
+
_startObservingLocaleChanges() {
|
|
52
|
+
this._localeChangeObserver = Observable.binding(() => this.locale, this._localeChangeHandler);
|
|
53
|
+
this._localeChangeObserver.observe(this, ExecutionContext.default);
|
|
51
54
|
}
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
/** @internal */
|
|
56
|
+
_stopObservingLocaleChanges() {
|
|
57
|
+
this._localeChangeObserver.dispose();
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
return WithObservableLocaleElement;
|
|
@@ -38,18 +38,18 @@ var PickerField = class extends require_with_contextual_help.WithContextualHelp(
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super();
|
|
40
40
|
this.readOnly = false;
|
|
41
|
-
this
|
|
41
|
+
this._onFocusIn = () => {
|
|
42
42
|
this.$emit("focus", void 0, { bubbles: false });
|
|
43
43
|
};
|
|
44
|
-
this
|
|
44
|
+
this._onFocusOut = () => {
|
|
45
45
|
this.$emit("blur", void 0, { bubbles: false });
|
|
46
46
|
};
|
|
47
47
|
this.proxy = document.createElement("input");
|
|
48
|
-
this
|
|
48
|
+
this._localeChangeHandler = { handleChange: () => {
|
|
49
49
|
this._updatePresentationValue();
|
|
50
50
|
} };
|
|
51
51
|
this._popupOpen = false;
|
|
52
|
-
this
|
|
52
|
+
this._dismissOnClickOutside = (event) => {
|
|
53
53
|
if (!this._popupOpen) return;
|
|
54
54
|
const path = event.composedPath();
|
|
55
55
|
if (![this._dialogEl, this._pickerButtonEl].some((element) => path.includes(element))) this._closePopup(false);
|
|
@@ -60,37 +60,35 @@ var PickerField = class extends require_with_contextual_help.WithContextualHelp(
|
|
|
60
60
|
/** @internal */
|
|
61
61
|
connectedCallback() {
|
|
62
62
|
super.connectedCallback();
|
|
63
|
-
document.addEventListener("click", this
|
|
64
|
-
this.addEventListener("focusin", this
|
|
65
|
-
this.addEventListener("focusout", this
|
|
66
|
-
this
|
|
63
|
+
document.addEventListener("click", this._dismissOnClickOutside);
|
|
64
|
+
this.addEventListener("focusin", this._onFocusIn);
|
|
65
|
+
this.addEventListener("focusout", this._onFocusOut);
|
|
66
|
+
this._startObservingLocaleChanges();
|
|
67
67
|
}
|
|
68
68
|
/** @internal */
|
|
69
69
|
disconnectedCallback() {
|
|
70
70
|
super.disconnectedCallback();
|
|
71
|
-
document.removeEventListener("click", this
|
|
72
|
-
this.removeEventListener("focusin", this
|
|
73
|
-
this.removeEventListener("focusout", this
|
|
74
|
-
this
|
|
71
|
+
document.removeEventListener("click", this._dismissOnClickOutside);
|
|
72
|
+
this.removeEventListener("focusin", this._onFocusIn);
|
|
73
|
+
this.removeEventListener("focusout", this._onFocusOut);
|
|
74
|
+
this._stopObservingLocaleChanges();
|
|
75
75
|
}
|
|
76
|
-
#onFocusIn;
|
|
77
|
-
#onFocusOut;
|
|
78
76
|
/** @internal */
|
|
79
77
|
validate() {
|
|
80
78
|
if (this.proxy) this.proxy.setCustomValidity(this._getCustomValidationError() ?? "");
|
|
81
79
|
super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
|
|
82
80
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this
|
|
87
|
-
this.#localeChangeObserver.observe(this, _microsoft_fast_element.ExecutionContext.default);
|
|
81
|
+
/** @internal */
|
|
82
|
+
_startObservingLocaleChanges() {
|
|
83
|
+
this._localeChangeObserver = _microsoft_fast_element.Observable.binding(() => this.locale, this._localeChangeHandler);
|
|
84
|
+
this._localeChangeObserver.observe(this, _microsoft_fast_element.ExecutionContext.default);
|
|
88
85
|
}
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
/** @internal */
|
|
87
|
+
_stopObservingLocaleChanges() {
|
|
88
|
+
this._localeChangeObserver.dispose();
|
|
91
89
|
}
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
/** @internal */
|
|
91
|
+
_openPopupIfPossible() {
|
|
94
92
|
/* v8 ignore else -- @preserve */
|
|
95
93
|
if (!this.readOnly) this._popupOpen = true;
|
|
96
94
|
}
|
|
@@ -124,7 +122,7 @@ var PickerField = class extends require_with_contextual_help.WithContextualHelp(
|
|
|
124
122
|
/** @internal */
|
|
125
123
|
_onPickerButtonClick() {
|
|
126
124
|
if (this._popupOpen) this._closePopup();
|
|
127
|
-
else this
|
|
125
|
+
else this._openPopupIfPossible();
|
|
128
126
|
}
|
|
129
127
|
/** @internal */
|
|
130
128
|
_onOkClick() {
|
|
@@ -38,18 +38,18 @@ var PickerField = class extends WithContextualHelp(WithFeedback(WithErrorText(Fo
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super();
|
|
40
40
|
this.readOnly = false;
|
|
41
|
-
this
|
|
41
|
+
this._onFocusIn = () => {
|
|
42
42
|
this.$emit("focus", void 0, { bubbles: false });
|
|
43
43
|
};
|
|
44
|
-
this
|
|
44
|
+
this._onFocusOut = () => {
|
|
45
45
|
this.$emit("blur", void 0, { bubbles: false });
|
|
46
46
|
};
|
|
47
47
|
this.proxy = document.createElement("input");
|
|
48
|
-
this
|
|
48
|
+
this._localeChangeHandler = { handleChange: () => {
|
|
49
49
|
this._updatePresentationValue();
|
|
50
50
|
} };
|
|
51
51
|
this._popupOpen = false;
|
|
52
|
-
this
|
|
52
|
+
this._dismissOnClickOutside = (event) => {
|
|
53
53
|
if (!this._popupOpen) return;
|
|
54
54
|
const path = event.composedPath();
|
|
55
55
|
if (![this._dialogEl, this._pickerButtonEl].some((element) => path.includes(element))) this._closePopup(false);
|
|
@@ -60,37 +60,35 @@ var PickerField = class extends WithContextualHelp(WithFeedback(WithErrorText(Fo
|
|
|
60
60
|
/** @internal */
|
|
61
61
|
connectedCallback() {
|
|
62
62
|
super.connectedCallback();
|
|
63
|
-
document.addEventListener("click", this
|
|
64
|
-
this.addEventListener("focusin", this
|
|
65
|
-
this.addEventListener("focusout", this
|
|
66
|
-
this
|
|
63
|
+
document.addEventListener("click", this._dismissOnClickOutside);
|
|
64
|
+
this.addEventListener("focusin", this._onFocusIn);
|
|
65
|
+
this.addEventListener("focusout", this._onFocusOut);
|
|
66
|
+
this._startObservingLocaleChanges();
|
|
67
67
|
}
|
|
68
68
|
/** @internal */
|
|
69
69
|
disconnectedCallback() {
|
|
70
70
|
super.disconnectedCallback();
|
|
71
|
-
document.removeEventListener("click", this
|
|
72
|
-
this.removeEventListener("focusin", this
|
|
73
|
-
this.removeEventListener("focusout", this
|
|
74
|
-
this
|
|
71
|
+
document.removeEventListener("click", this._dismissOnClickOutside);
|
|
72
|
+
this.removeEventListener("focusin", this._onFocusIn);
|
|
73
|
+
this.removeEventListener("focusout", this._onFocusOut);
|
|
74
|
+
this._stopObservingLocaleChanges();
|
|
75
75
|
}
|
|
76
|
-
#onFocusIn;
|
|
77
|
-
#onFocusOut;
|
|
78
76
|
/** @internal */
|
|
79
77
|
validate() {
|
|
80
78
|
if (this.proxy) this.proxy.setCustomValidity(this._getCustomValidationError() ?? "");
|
|
81
79
|
super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
|
|
82
80
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this
|
|
87
|
-
this.#localeChangeObserver.observe(this, ExecutionContext.default);
|
|
81
|
+
/** @internal */
|
|
82
|
+
_startObservingLocaleChanges() {
|
|
83
|
+
this._localeChangeObserver = Observable.binding(() => this.locale, this._localeChangeHandler);
|
|
84
|
+
this._localeChangeObserver.observe(this, ExecutionContext.default);
|
|
88
85
|
}
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
/** @internal */
|
|
87
|
+
_stopObservingLocaleChanges() {
|
|
88
|
+
this._localeChangeObserver.dispose();
|
|
91
89
|
}
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
/** @internal */
|
|
91
|
+
_openPopupIfPossible() {
|
|
94
92
|
/* v8 ignore else -- @preserve */
|
|
95
93
|
if (!this.readOnly) this._popupOpen = true;
|
|
96
94
|
}
|
|
@@ -124,7 +122,7 @@ var PickerField = class extends WithContextualHelp(WithFeedback(WithErrorText(Fo
|
|
|
124
122
|
/** @internal */
|
|
125
123
|
_onPickerButtonClick() {
|
|
126
124
|
if (this._popupOpen) this._closePopup();
|
|
127
|
-
else this
|
|
125
|
+
else this._openPopupIfPossible();
|
|
128
126
|
}
|
|
129
127
|
/** @internal */
|
|
130
128
|
_onOkClick() {
|
|
@@ -370,7 +370,7 @@ var TimeSelectionPicker = (Base) => {
|
|
|
370
370
|
super(..._args);
|
|
371
371
|
this.minutesStep = null;
|
|
372
372
|
this.secondsStep = null;
|
|
373
|
-
this
|
|
373
|
+
this._clockChangeHandler = { handleChange: () => {
|
|
374
374
|
if (this.value) this._presentationValue = this._toPresentationValue(this.value);
|
|
375
375
|
} };
|
|
376
376
|
}
|
|
@@ -389,24 +389,24 @@ var TimeSelectionPicker = (Base) => {
|
|
|
389
389
|
if (this._use12hClock) format += " aa";
|
|
390
390
|
return format;
|
|
391
391
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
this
|
|
396
|
-
this.#clockChangeObserver.observe(this, _microsoft_fast_element.ExecutionContext.default);
|
|
392
|
+
/** @internal */
|
|
393
|
+
_startObservingClockChanges() {
|
|
394
|
+
this._clockChangeObserver = _microsoft_fast_element.Observable.binding(() => this._use12hClock, this._clockChangeHandler);
|
|
395
|
+
this._clockChangeObserver.observe(this, _microsoft_fast_element.ExecutionContext.default);
|
|
397
396
|
}
|
|
398
|
-
|
|
399
|
-
|
|
397
|
+
/** @internal */
|
|
398
|
+
_stopObservingClockChanges() {
|
|
399
|
+
this._clockChangeObserver.dispose();
|
|
400
400
|
}
|
|
401
401
|
/** @internal */
|
|
402
402
|
connectedCallback() {
|
|
403
403
|
super.connectedCallback();
|
|
404
|
-
this
|
|
404
|
+
this._startObservingClockChanges();
|
|
405
405
|
}
|
|
406
406
|
/** @internal */
|
|
407
407
|
disconnectedCallback() {
|
|
408
408
|
super.disconnectedCallback();
|
|
409
|
-
this
|
|
409
|
+
this._stopObservingClockChanges();
|
|
410
410
|
}
|
|
411
411
|
/** @internal */
|
|
412
412
|
_onPickerButtonClick() {
|
|
@@ -370,7 +370,7 @@ var TimeSelectionPicker = (Base) => {
|
|
|
370
370
|
super(..._args);
|
|
371
371
|
this.minutesStep = null;
|
|
372
372
|
this.secondsStep = null;
|
|
373
|
-
this
|
|
373
|
+
this._clockChangeHandler = { handleChange: () => {
|
|
374
374
|
if (this.value) this._presentationValue = this._toPresentationValue(this.value);
|
|
375
375
|
} };
|
|
376
376
|
}
|
|
@@ -389,24 +389,24 @@ var TimeSelectionPicker = (Base) => {
|
|
|
389
389
|
if (this._use12hClock) format += " aa";
|
|
390
390
|
return format;
|
|
391
391
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
this
|
|
396
|
-
this.#clockChangeObserver.observe(this, ExecutionContext.default);
|
|
392
|
+
/** @internal */
|
|
393
|
+
_startObservingClockChanges() {
|
|
394
|
+
this._clockChangeObserver = Observable.binding(() => this._use12hClock, this._clockChangeHandler);
|
|
395
|
+
this._clockChangeObserver.observe(this, ExecutionContext.default);
|
|
397
396
|
}
|
|
398
|
-
|
|
399
|
-
|
|
397
|
+
/** @internal */
|
|
398
|
+
_stopObservingClockChanges() {
|
|
399
|
+
this._clockChangeObserver.dispose();
|
|
400
400
|
}
|
|
401
401
|
/** @internal */
|
|
402
402
|
connectedCallback() {
|
|
403
403
|
super.connectedCallback();
|
|
404
|
-
this
|
|
404
|
+
this._startObservingClockChanges();
|
|
405
405
|
}
|
|
406
406
|
/** @internal */
|
|
407
407
|
disconnectedCallback() {
|
|
408
408
|
super.disconnectedCallback();
|
|
409
|
-
this
|
|
409
|
+
this._stopObservingClockChanges();
|
|
410
410
|
}
|
|
411
411
|
/** @internal */
|
|
412
412
|
_onPickerButtonClick() {
|
|
@@ -255,14 +255,17 @@ var AriaMixin = (Base) => {
|
|
|
255
255
|
/** Mixin implementing ReactiveControllerHost for custom elements. */
|
|
256
256
|
var ReactiveControllerHostSupport = (Base) => {
|
|
257
257
|
class ReactiveControllerHostSupportElement extends Base {
|
|
258
|
-
|
|
258
|
+
constructor(..._args) {
|
|
259
|
+
super(..._args);
|
|
260
|
+
this._controllers = /* @__PURE__ */ new Set();
|
|
261
|
+
}
|
|
259
262
|
/**
|
|
260
263
|
* Adds a controller to the host, which sets up the controller's lifecycle
|
|
261
264
|
* methods to be called with the host's lifecycle.
|
|
262
265
|
* @internal
|
|
263
266
|
*/
|
|
264
267
|
_addController(controller) {
|
|
265
|
-
this
|
|
268
|
+
this._controllers.add(controller);
|
|
266
269
|
if (this.$fastController.isConnected) controller.hostConnected?.();
|
|
267
270
|
}
|
|
268
271
|
/**
|
|
@@ -270,15 +273,15 @@ var ReactiveControllerHostSupport = (Base) => {
|
|
|
270
273
|
* @internal
|
|
271
274
|
*/
|
|
272
275
|
_removeController(controller) {
|
|
273
|
-
this
|
|
276
|
+
this._controllers.delete(controller);
|
|
274
277
|
}
|
|
275
278
|
connectedCallback() {
|
|
276
279
|
super.connectedCallback();
|
|
277
|
-
for (const controller of this
|
|
280
|
+
for (const controller of this._controllers) controller.hostConnected?.();
|
|
278
281
|
}
|
|
279
282
|
disconnectedCallback() {
|
|
280
283
|
super.disconnectedCallback();
|
|
281
|
-
for (const controller of this
|
|
284
|
+
for (const controller of this._controllers) controller.hostDisconnected?.();
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
287
|
return ReactiveControllerHostSupportElement;
|
|
@@ -307,7 +310,8 @@ var replaces = (config) => ($target, $prop) => {
|
|
|
307
310
|
*/
|
|
308
311
|
var ReplacedPropHandling = (Base) => {
|
|
309
312
|
class ReplacedPropHandlingElement extends Base {
|
|
310
|
-
|
|
313
|
+
/** @internal */
|
|
314
|
+
_handleReplacedProp(replacedProp) {
|
|
311
315
|
let newDirty = false;
|
|
312
316
|
let deprecatedDirty = false;
|
|
313
317
|
const changeCouldBeFromDeprecated = (source) => deprecatedDirty && replacedProp.fromDeprecated(source[replacedProp.deprecatedPropertyName]) === source[replacedProp.newPropertyName];
|
|
@@ -330,7 +334,7 @@ var ReplacedPropHandling = (Base) => {
|
|
|
330
334
|
}
|
|
331
335
|
constructor(...args) {
|
|
332
336
|
super(...args);
|
|
333
|
-
for (const replacedProp of locateReplacedPropMetadata(this.constructor)) this
|
|
337
|
+
for (const replacedProp of locateReplacedPropMetadata(this.constructor)) this._handleReplacedProp(replacedProp);
|
|
334
338
|
}
|
|
335
339
|
}
|
|
336
340
|
return ReplacedPropHandlingElement;
|
|
@@ -346,7 +350,7 @@ var ReplacedPropHandling = (Base) => {
|
|
|
346
350
|
*/
|
|
347
351
|
var VividElement = class extends AriaMixin(ReplacedPropHandling(ReactiveControllerHostSupport(_microsoft_fast_element.FASTElement))) {
|
|
348
352
|
static {
|
|
349
|
-
this.VIVID_VERSION = "5.
|
|
353
|
+
this.VIVID_VERSION = "5.32.0";
|
|
350
354
|
}
|
|
351
355
|
/**
|
|
352
356
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -255,14 +255,17 @@ var AriaMixin = (Base) => {
|
|
|
255
255
|
/** Mixin implementing ReactiveControllerHost for custom elements. */
|
|
256
256
|
var ReactiveControllerHostSupport = (Base) => {
|
|
257
257
|
class ReactiveControllerHostSupportElement extends Base {
|
|
258
|
-
|
|
258
|
+
constructor(..._args) {
|
|
259
|
+
super(..._args);
|
|
260
|
+
this._controllers = /* @__PURE__ */ new Set();
|
|
261
|
+
}
|
|
259
262
|
/**
|
|
260
263
|
* Adds a controller to the host, which sets up the controller's lifecycle
|
|
261
264
|
* methods to be called with the host's lifecycle.
|
|
262
265
|
* @internal
|
|
263
266
|
*/
|
|
264
267
|
_addController(controller) {
|
|
265
|
-
this
|
|
268
|
+
this._controllers.add(controller);
|
|
266
269
|
if (this.$fastController.isConnected) controller.hostConnected?.();
|
|
267
270
|
}
|
|
268
271
|
/**
|
|
@@ -270,15 +273,15 @@ var ReactiveControllerHostSupport = (Base) => {
|
|
|
270
273
|
* @internal
|
|
271
274
|
*/
|
|
272
275
|
_removeController(controller) {
|
|
273
|
-
this
|
|
276
|
+
this._controllers.delete(controller);
|
|
274
277
|
}
|
|
275
278
|
connectedCallback() {
|
|
276
279
|
super.connectedCallback();
|
|
277
|
-
for (const controller of this
|
|
280
|
+
for (const controller of this._controllers) controller.hostConnected?.();
|
|
278
281
|
}
|
|
279
282
|
disconnectedCallback() {
|
|
280
283
|
super.disconnectedCallback();
|
|
281
|
-
for (const controller of this
|
|
284
|
+
for (const controller of this._controllers) controller.hostDisconnected?.();
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
287
|
return ReactiveControllerHostSupportElement;
|
|
@@ -307,7 +310,8 @@ var replaces = (config) => ($target, $prop) => {
|
|
|
307
310
|
*/
|
|
308
311
|
var ReplacedPropHandling = (Base) => {
|
|
309
312
|
class ReplacedPropHandlingElement extends Base {
|
|
310
|
-
|
|
313
|
+
/** @internal */
|
|
314
|
+
_handleReplacedProp(replacedProp) {
|
|
311
315
|
let newDirty = false;
|
|
312
316
|
let deprecatedDirty = false;
|
|
313
317
|
const changeCouldBeFromDeprecated = (source) => deprecatedDirty && replacedProp.fromDeprecated(source[replacedProp.deprecatedPropertyName]) === source[replacedProp.newPropertyName];
|
|
@@ -330,7 +334,7 @@ var ReplacedPropHandling = (Base) => {
|
|
|
330
334
|
}
|
|
331
335
|
constructor(...args) {
|
|
332
336
|
super(...args);
|
|
333
|
-
for (const replacedProp of locateReplacedPropMetadata(this.constructor)) this
|
|
337
|
+
for (const replacedProp of locateReplacedPropMetadata(this.constructor)) this._handleReplacedProp(replacedProp);
|
|
334
338
|
}
|
|
335
339
|
}
|
|
336
340
|
return ReplacedPropHandlingElement;
|
|
@@ -346,7 +350,7 @@ var ReplacedPropHandling = (Base) => {
|
|
|
346
350
|
*/
|
|
347
351
|
var VividElement = class extends AriaMixin(ReplacedPropHandling(ReactiveControllerHostSupport(FASTElement))) {
|
|
348
352
|
static {
|
|
349
|
-
this.VIVID_VERSION = "5.
|
|
353
|
+
this.VIVID_VERSION = "5.32.0";
|
|
350
354
|
}
|
|
351
355
|
/**
|
|
352
356
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -6,26 +6,27 @@ var WithErrorText = (Base) => {
|
|
|
6
6
|
class ElementWithErrorText extends Base {
|
|
7
7
|
/** @internal */
|
|
8
8
|
errorTextChanged(_, newErrorText) {
|
|
9
|
-
if (newErrorText) this
|
|
10
|
-
else this
|
|
9
|
+
if (newErrorText) this._forceCustomError(newErrorText);
|
|
10
|
+
else this._clearCustomErrorAndRevalidate();
|
|
11
11
|
}
|
|
12
|
-
#blockValidateCalls = false;
|
|
13
|
-
#originalValidateFn;
|
|
14
12
|
constructor(...args) {
|
|
15
13
|
super(...args);
|
|
16
|
-
this
|
|
14
|
+
this._blockValidateCalls = false;
|
|
15
|
+
this._originalValidateFn = this.validate;
|
|
17
16
|
this.validate = () => {
|
|
18
|
-
if (!this
|
|
17
|
+
if (!this._blockValidateCalls) this._originalValidateFn();
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
/** @internal */
|
|
21
|
+
_forceCustomError(errorMessage) {
|
|
22
22
|
this.setValidity({ customError: true }, errorMessage, this.control);
|
|
23
23
|
this.errorValidationMessage = errorMessage;
|
|
24
|
-
this
|
|
24
|
+
this._blockValidateCalls = true;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
/** @internal */
|
|
27
|
+
_clearCustomErrorAndRevalidate() {
|
|
27
28
|
this.setValidity({}, "", this.control);
|
|
28
|
-
this
|
|
29
|
+
this._blockValidateCalls = false;
|
|
29
30
|
this.validate();
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -6,26 +6,27 @@ var WithErrorText = (Base) => {
|
|
|
6
6
|
class ElementWithErrorText extends Base {
|
|
7
7
|
/** @internal */
|
|
8
8
|
errorTextChanged(_, newErrorText) {
|
|
9
|
-
if (newErrorText) this
|
|
10
|
-
else this
|
|
9
|
+
if (newErrorText) this._forceCustomError(newErrorText);
|
|
10
|
+
else this._clearCustomErrorAndRevalidate();
|
|
11
11
|
}
|
|
12
|
-
#blockValidateCalls = false;
|
|
13
|
-
#originalValidateFn;
|
|
14
12
|
constructor(...args) {
|
|
15
13
|
super(...args);
|
|
16
|
-
this
|
|
14
|
+
this._blockValidateCalls = false;
|
|
15
|
+
this._originalValidateFn = this.validate;
|
|
17
16
|
this.validate = () => {
|
|
18
|
-
if (!this
|
|
17
|
+
if (!this._blockValidateCalls) this._originalValidateFn();
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
/** @internal */
|
|
21
|
+
_forceCustomError(errorMessage) {
|
|
22
22
|
this.setValidity({ customError: true }, errorMessage, this.control);
|
|
23
23
|
this.errorValidationMessage = errorMessage;
|
|
24
|
-
this
|
|
24
|
+
this._blockValidateCalls = true;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
/** @internal */
|
|
27
|
+
_clearCustomErrorAndRevalidate() {
|
|
27
28
|
this.setValidity({}, "", this.control);
|
|
28
|
-
this
|
|
29
|
+
this._blockValidateCalls = false;
|
|
29
30
|
this.validate();
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|