@vonage/vivid 5.2.0 → 5.3.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/accordion-item/definition.cjs +2 -1
- package/accordion-item/definition.js +2 -1
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +4 -2
- package/audio-player/definition.js +4 -2
- package/audio-player/index.cjs +5 -3
- package/audio-player/index.js +5 -3
- package/badge/index.cjs +2 -2
- package/badge/index.js +4 -4
- package/banner/index.cjs +3 -3
- package/banner/index.js +6 -6
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/affix.cjs +7 -7
- package/bundled/affix.js +5 -5
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +15 -13
- package/bundled/base-color-picker.cjs +13 -0
- package/bundled/base-color-picker.js +194 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +21 -21
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/children.cjs +1 -1
- package/bundled/children.js +28 -20
- package/bundled/definition.cjs +3 -3
- package/bundled/definition.js +38 -38
- package/bundled/definition10.cjs +72 -18
- package/bundled/definition10.js +351 -65
- package/bundled/definition11.cjs +19 -10
- package/bundled/definition11.js +66 -37
- package/bundled/definition12.cjs +10 -1
- package/bundled/definition12.js +38 -14
- package/bundled/definition13.cjs +1 -73
- package/bundled/definition13.js +15 -354
- package/bundled/definition15.cjs +1 -1
- package/bundled/definition15.js +1 -1
- package/bundled/definition16.cjs +2 -2
- package/bundled/definition16.js +8 -8
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +17 -17
- package/bundled/definition19.cjs +5 -5
- package/bundled/definition19.js +8 -8
- package/bundled/definition2.cjs +9 -5
- package/bundled/definition2.js +21 -17
- package/bundled/definition22.cjs +9 -9
- package/bundled/definition22.js +31 -31
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +10 -10
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +6 -6
- package/bundled/definition8.cjs +2 -2
- package/bundled/definition8.js +4 -4
- package/bundled/definition9.cjs +1 -1
- package/bundled/definition9.js +1 -1
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +59 -46
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +3 -3
- package/bundled/host-semantics.cjs +1 -1
- package/bundled/host-semantics.js +48 -34
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +41 -30
- package/bundled/mixins.cjs +18 -18
- package/bundled/mixins.js +99 -93
- package/bundled/normalize.cjs +1 -0
- package/bundled/normalize.js +7 -0
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +4 -4
- package/bundled/ref.cjs +1 -1
- package/bundled/ref.js +8 -25
- package/bundled/repeat.cjs +1 -1
- package/bundled/repeat.js +459 -233
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +2 -2
- package/bundled/slotted.cjs +1 -1
- package/bundled/slotted.js +62 -45
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +5 -5
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +2126 -1172
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +8 -7
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +6 -6
- package/calendar-event/index.cjs +1 -1
- package/calendar-event/index.js +1 -1
- package/card/definition.cjs +10 -2
- package/card/definition.js +10 -2
- package/card/index.cjs +19 -11
- package/card/index.js +35 -27
- package/color-picker/definition.cjs +1079 -0
- package/color-picker/definition.js +1073 -0
- package/color-picker/index.cjs +127 -0
- package/color-picker/index.js +726 -0
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +2 -2
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +15 -15
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1365 -161
- package/data-grid/definition.cjs +862 -27
- package/data-grid/definition.js +863 -28
- package/data-grid/index.cjs +25 -25
- package/data-grid/index.js +175 -168
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +4 -0
- package/dial-pad/definition.js +4 -0
- package/dial-pad/index.cjs +3 -3
- package/dial-pad/index.js +42 -39
- package/dialog/definition.cjs +4 -1
- package/dialog/definition.js +4 -1
- package/dialog/index.cjs +21 -18
- package/dialog/index.js +43 -40
- package/empty-state/definition.cjs +7 -2
- package/empty-state/definition.js +7 -2
- package/empty-state/index.cjs +10 -5
- package/empty-state/index.js +18 -13
- package/fab/index.cjs +2 -2
- package/fab/index.js +4 -4
- package/file-picker/definition.cjs +2 -2
- package/file-picker/definition.js +3 -3
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +4 -4
- package/icon/definition.cjs +10 -6
- package/icon/definition.js +10 -6
- package/index.cjs +4 -0
- package/index.js +1 -0
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/action-group/action-group.d.ts +2 -2
- package/lib/alert/alert.d.ts +4 -4
- package/lib/audio-player/audio-player.d.ts +2 -2
- package/lib/avatar/avatar.d.ts +2 -2
- package/lib/badge/badge.d.ts +2 -2
- package/lib/banner/banner.d.ts +6 -6
- package/lib/breadcrumb/breadcrumb.d.ts +2 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +2 -2
- package/lib/button/button.d.ts +6 -6
- package/lib/button/button.template.d.ts +2 -1
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +2 -2
- package/lib/card/card.d.ts +2 -2
- package/lib/checkbox/checkbox.d.ts +12 -12
- package/lib/color-picker/color-picker.d.ts +2420 -0
- package/lib/color-picker/color-picker.template.d.ts +3 -0
- package/lib/color-picker/definition.d.ts +4 -0
- package/lib/color-picker/locale.d.ts +9 -0
- package/lib/combobox/combobox.d.ts +14 -14
- package/lib/components.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +4 -4
- package/lib/data-grid/data-grid-row.d.ts +3 -4
- package/lib/data-grid/data-grid.d.ts +1 -2
- package/lib/date-picker/date-picker.d.ts +54 -54
- package/lib/date-range-picker/date-range-picker.d.ts +28 -28
- package/lib/date-time-picker/date-time-picker.d.ts +56 -56
- package/lib/dial-pad/dial-pad.d.ts +3 -2
- package/lib/dialog/dialog.d.ts +4 -4
- package/lib/divider/divider.d.ts +2 -2
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +14 -14
- package/lib/header/header.d.ts +2 -2
- package/lib/menu/menu.d.ts +4 -4
- package/lib/menu-item/menu-item.d.ts +4 -4
- package/lib/nav/nav.d.ts +2 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +4 -4
- package/lib/nav-item/nav-item.d.ts +4 -4
- package/lib/note/note.d.ts +2 -2
- package/lib/number-field/number-field.d.ts +18 -18
- package/lib/option/option.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/progress/progress.d.ts +2 -2
- package/lib/progress-ring/progress-ring.d.ts +2 -2
- package/lib/radio/radio.d.ts +6 -6
- package/lib/radio-group/radio-group.d.ts +2 -2
- package/lib/range-slider/range-slider.d.ts +6 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +2 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +2 -2
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +18 -18
- package/lib/select/select.d.ts +16 -16
- package/lib/selectable-box/selectable-box.d.ts +2 -2
- package/lib/simple-color-picker/locale.d.ts +0 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +47 -821
- package/lib/slider/slider.d.ts +6 -6
- package/lib/split-button/split-button.d.ts +6 -6
- package/lib/switch/switch.d.ts +4 -4
- package/lib/tab/tab.d.ts +6 -6
- package/lib/tab-panel/tab-panel.d.ts +2 -2
- package/lib/tag/tag.d.ts +6 -6
- package/lib/tag-group/tag-group.d.ts +2 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +16 -16
- package/lib/text-field/text-field.d.ts +18 -18
- package/lib/time-picker/time-picker.d.ts +28 -28
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +4 -4
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/lib/video-player/video-player.d.ts +2 -2
- package/locales/de-DE.cjs +13 -2
- package/locales/de-DE.js +13 -2
- package/locales/en-GB.cjs +13 -2
- package/locales/en-GB.js +13 -2
- package/locales/en-US.cjs +13 -2
- package/locales/en-US.js +13 -2
- package/locales/ja-JP.cjs +13 -2
- package/locales/ja-JP.js +13 -2
- package/locales/zh-CN.cjs +13 -2
- package/locales/zh-CN.js +13 -2
- package/menu/definition.cjs +2 -2
- package/menu/definition.js +3 -3
- package/note/index.cjs +2 -2
- package/note/index.js +4 -4
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +2 -2
- package/number-field/index.cjs +5 -5
- package/number-field/index.js +21 -21
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +5 -5
- package/pagination/definition.cjs +2 -1
- package/pagination/definition.js +2 -1
- package/pagination/index.cjs +12 -12
- package/pagination/index.js +59 -59
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/radio/definition.cjs +9 -9
- package/radio/definition.js +10 -10
- package/radio-group/definition.cjs +2 -1
- package/radio-group/definition.js +2 -1
- package/radio-group/index.cjs +5 -5
- package/radio-group/index.js +80 -77
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +2 -2
- package/rich-text-editor/index.cjs +2 -2
- package/rich-text-editor/index.js +3 -3
- package/searchable-select/definition.cjs +3 -3
- package/searchable-select/definition.js +4 -4
- package/searchable-select/index.cjs +4 -4
- package/searchable-select/index.js +8 -8
- package/select/definition.cjs +1 -1
- package/select/definition.js +2 -2
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +3 -3
- package/selectable-box/index.js +20 -20
- package/shared/aria/aria-change-subscription.d.ts +0 -1
- package/shared/aria/aria-mixin.d.ts +2 -2
- package/shared/aria/delegate-aria-behavior.d.ts +5 -10
- package/shared/aria/delegates-aria.d.ts +3 -3
- package/shared/aria/host-semantics-behavior.d.ts +5 -8
- package/shared/aria/host-semantics.d.ts +3 -3
- package/shared/color-picker/base-color-picker.d.ts +436 -0
- package/shared/color-picker/index.d.ts +1 -0
- package/shared/color-picker/locale.d.ts +3 -0
- package/shared/color-picker/utils.d.ts +1 -0
- package/shared/deprecation/replaced-props.d.ts +317 -2
- package/shared/design-system/defineVividComponent.d.ts +2 -2
- package/shared/feedback/feedback-message.d.ts +2 -2
- package/shared/feedback/mixins.d.ts +4 -4
- package/shared/foundation/button/button.d.ts +4 -4
- package/shared/foundation/form-associated/form-associated.d.ts +4 -4
- package/shared/foundation/vivid-element/vivid-element.d.ts +335 -8
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/patterns/affix.d.ts +4 -4
- package/shared/patterns/anchored.d.ts +4 -4
- package/shared/patterns/char-count/char-count.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +4 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +6 -6
- package/shared/patterns/form-elements/with-error-text.d.ts +6 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +2 -2
- package/shared/patterns/linkable.d.ts +2 -2
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +14 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +14 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +2 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +40 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +12 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +29 -29
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +28 -28
- package/shared/picker-field/picker-field.d.ts +14 -14
- package/shared/templating/attribute-binding-behaviour.d.ts +3 -4
- package/shared/templating/render-in-light-dom.d.ts +13 -12
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/simple-color-picker/definition.cjs +28 -215
- package/simple-color-picker/definition.js +29 -216
- package/simple-color-picker/index.cjs +9 -21
- package/simple-color-picker/index.js +71 -185
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +4 -4
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +2 -2
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +16 -16
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/index.cjs +3 -3
- package/text-area/index.js +8 -8
- package/text-field/definition.cjs +2 -2
- package/text-field/definition.js +3 -3
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +2 -2
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +2 -2
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +2 -2
- package/tree-view/index.cjs +2 -2
- package/tree-view/index.js +6 -6
- package/unbundled/_commonjsHelpers.cjs +36 -0
- package/unbundled/_commonjsHelpers.js +32 -0
- package/unbundled/affix.cjs +1 -1
- package/unbundled/affix.js +1 -1
- package/unbundled/attribute-binding-behaviour.cjs +11 -10
- package/unbundled/attribute-binding-behaviour.js +11 -10
- package/unbundled/base-color-picker.cjs +278 -0
- package/unbundled/base-color-picker.js +275 -0
- package/unbundled/button.cjs +1 -1
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +3 -3
- package/unbundled/calendar-picker.template.js +4 -4
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +2 -2
- package/unbundled/definition3.cjs +2 -1
- package/unbundled/definition3.js +2 -1
- package/unbundled/delegates-aria.cjs +67 -33
- package/unbundled/delegates-aria.js +69 -35
- package/unbundled/form-associated.cjs +2 -2
- package/unbundled/form-associated.js +3 -3
- package/unbundled/host-semantics.cjs +47 -22
- package/unbundled/host-semantics.js +48 -23
- package/unbundled/mixins.cjs +34 -27
- package/unbundled/mixins.js +35 -28
- package/unbundled/picker-field.template.cjs +2 -2
- package/unbundled/picker-field.template.js +3 -3
- package/unbundled/time-selection-picker.template.cjs +4 -4
- package/unbundled/time-selection-picker.template.js +5 -5
- package/unbundled/vivid-element.cjs +22 -15
- package/unbundled/vivid-element.js +23 -15
- package/video-player/definition.cjs +69007 -1
- package/video-player/definition.js +69007 -1
- package/video-player/index.cjs +35 -35
- package/video-player/index.js +1358 -1384
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +317 -69
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { V as VividElement, d as defineVividComponent } from './vivid-element.js';
|
|
2
|
-
import { when, html, repeat, observable, attr, nullableNumberConverter, Observable,
|
|
2
|
+
import { when, html, repeat, observable, attr, nullableNumberConverter, Observable, ExecutionContext, Updates, volatile, ref } from '@microsoft/fast-element';
|
|
3
3
|
import { i as ignoreEventInFocusTraps, a as PickerField } from './picker-field.template.js';
|
|
4
4
|
import { S as SingleValuePicker } from './single-value-picker.js';
|
|
5
5
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
@@ -560,10 +560,10 @@ const TimeSelectionPicker = (Base) => {
|
|
|
560
560
|
() => this._use12hClock,
|
|
561
561
|
this.#clockChangeHandler
|
|
562
562
|
);
|
|
563
|
-
this.#clockChangeObserver.observe(this,
|
|
563
|
+
this.#clockChangeObserver.observe(this, ExecutionContext.default);
|
|
564
564
|
}
|
|
565
565
|
#stopObservingClockChanges() {
|
|
566
|
-
this.#clockChangeObserver.
|
|
566
|
+
this.#clockChangeObserver.dispose();
|
|
567
567
|
}
|
|
568
568
|
/**
|
|
569
569
|
* @internal
|
|
@@ -586,7 +586,7 @@ const TimeSelectionPicker = (Base) => {
|
|
|
586
586
|
_onPickerButtonClick() {
|
|
587
587
|
super._onPickerButtonClick();
|
|
588
588
|
if (this._popupOpen) {
|
|
589
|
-
|
|
589
|
+
Updates.process();
|
|
590
590
|
this._inlineTimePickerEl.scrollSelectedOptionsToTop();
|
|
591
591
|
}
|
|
592
592
|
}
|
|
@@ -746,7 +746,7 @@ class TimePicker extends TimeSelectionPicker(
|
|
|
746
746
|
_onPickerButtonClick() {
|
|
747
747
|
super._onPickerButtonClick();
|
|
748
748
|
if (this._popupOpen) {
|
|
749
|
-
|
|
749
|
+
Updates.process();
|
|
750
750
|
this._focusableElsWithinDialog()[0]?.focus();
|
|
751
751
|
}
|
|
752
752
|
}
|
|
@@ -34,20 +34,22 @@ const createRegisterFunction = (definition) => (prefix = "vwc") => {
|
|
|
34
34
|
(dependency) => [dependency.type, prefixed(dependency.name)]
|
|
35
35
|
)
|
|
36
36
|
]);
|
|
37
|
+
const tagFor = (type2, convertToString) => {
|
|
38
|
+
if (!tagByDependencyType.has(type2)) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`Could not get tag for ${type2.name} as it is not a dependency of ${componentDefinition.name}.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
const tagNameStr = tagByDependencyType.get(type2);
|
|
44
|
+
return convertToString ? tagNameStr : fastElement.html.partial(tagNameStr);
|
|
45
|
+
};
|
|
37
46
|
const elementDefinitionContext = {
|
|
38
|
-
tagFor
|
|
39
|
-
if (!tagByDependencyType.has(type2)) {
|
|
40
|
-
throw new Error(
|
|
41
|
-
`Could not get tag for ${type2.name} as it is not a dependency of ${componentDefinition.name}.`
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
return tagByDependencyType.get(type2);
|
|
45
|
-
},
|
|
47
|
+
tagFor,
|
|
46
48
|
tagForNonDependency(name) {
|
|
47
49
|
return prefixed(name);
|
|
48
50
|
}
|
|
49
51
|
};
|
|
50
|
-
|
|
52
|
+
fastElement.FASTElementDefinition.compose(type, {
|
|
51
53
|
...componentDefinition.options,
|
|
52
54
|
template: resolve(
|
|
53
55
|
componentDefinition.template,
|
|
@@ -79,9 +81,6 @@ const getSubscribers = (source) => {
|
|
|
79
81
|
const subscribeToAriaPropertyChanges = (source, listener) => {
|
|
80
82
|
getSubscribers(source).push(listener);
|
|
81
83
|
};
|
|
82
|
-
const unsubscribeFromAriaPropertyChanges = (source, listener) => {
|
|
83
|
-
getSubscribers(source).splice(getSubscribers(source).indexOf(listener), 1);
|
|
84
|
-
};
|
|
85
84
|
const publishAriaPropertyChange = (source, changedAriaProperty) => {
|
|
86
85
|
getSubscribers(source).forEach((s) => s(source, changedAriaProperty));
|
|
87
86
|
};
|
|
@@ -208,7 +207,16 @@ const AriaMixin = (Base) => {
|
|
|
208
207
|
return AriaMixinElement;
|
|
209
208
|
};
|
|
210
209
|
|
|
211
|
-
|
|
210
|
+
function createMetadataLocator() {
|
|
211
|
+
const metadataMap = /* @__PURE__ */ new WeakMap();
|
|
212
|
+
return (target) => {
|
|
213
|
+
if (!metadataMap.has(target)) {
|
|
214
|
+
metadataMap.set(target, []);
|
|
215
|
+
}
|
|
216
|
+
return metadataMap.get(target);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
const locateReplacedPropMetadata = createMetadataLocator();
|
|
212
220
|
const replaces = (config) => ($target, $prop) => {
|
|
213
221
|
locateReplacedPropMetadata($target.constructor).push({
|
|
214
222
|
newPropertyName: $prop,
|
|
@@ -260,7 +268,7 @@ const ReplacedPropHandling = (Base) => {
|
|
|
260
268
|
|
|
261
269
|
class VividElement extends AriaMixin(ReplacedPropHandling(fastElement.FASTElement)) {
|
|
262
270
|
static {
|
|
263
|
-
this.VIVID_VERSION = "5.
|
|
271
|
+
this.VIVID_VERSION = "5.3.0";
|
|
264
272
|
}
|
|
265
273
|
/**
|
|
266
274
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -280,4 +288,3 @@ exports.createRegisterFunction = createRegisterFunction;
|
|
|
280
288
|
exports.defineVividComponent = defineVividComponent;
|
|
281
289
|
exports.replaces = replaces;
|
|
282
290
|
exports.subscribeToAriaPropertyChanges = subscribeToAriaPropertyChanges;
|
|
283
|
-
exports.unsubscribeFromAriaPropertyChanges = unsubscribeFromAriaPropertyChanges;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FASTElementDefinition, DOM, attr,
|
|
1
|
+
import { FASTElementDefinition, html, DOM, attr, Observable, FASTElement } from '@microsoft/fast-element';
|
|
2
2
|
|
|
3
3
|
function resolve(templateOrResolveFunction, ctx) {
|
|
4
4
|
if (templateOrResolveFunction instanceof Function) {
|
|
@@ -32,20 +32,22 @@ const createRegisterFunction = (definition) => (prefix = "vwc") => {
|
|
|
32
32
|
(dependency) => [dependency.type, prefixed(dependency.name)]
|
|
33
33
|
)
|
|
34
34
|
]);
|
|
35
|
+
const tagFor = (type2, convertToString) => {
|
|
36
|
+
if (!tagByDependencyType.has(type2)) {
|
|
37
|
+
throw new Error(
|
|
38
|
+
`Could not get tag for ${type2.name} as it is not a dependency of ${componentDefinition.name}.`
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
const tagNameStr = tagByDependencyType.get(type2);
|
|
42
|
+
return convertToString ? tagNameStr : html.partial(tagNameStr);
|
|
43
|
+
};
|
|
35
44
|
const elementDefinitionContext = {
|
|
36
|
-
tagFor
|
|
37
|
-
if (!tagByDependencyType.has(type2)) {
|
|
38
|
-
throw new Error(
|
|
39
|
-
`Could not get tag for ${type2.name} as it is not a dependency of ${componentDefinition.name}.`
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
return tagByDependencyType.get(type2);
|
|
43
|
-
},
|
|
45
|
+
tagFor,
|
|
44
46
|
tagForNonDependency(name) {
|
|
45
47
|
return prefixed(name);
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
|
-
|
|
50
|
+
FASTElementDefinition.compose(type, {
|
|
49
51
|
...componentDefinition.options,
|
|
50
52
|
template: resolve(
|
|
51
53
|
componentDefinition.template,
|
|
@@ -77,9 +79,6 @@ const getSubscribers = (source) => {
|
|
|
77
79
|
const subscribeToAriaPropertyChanges = (source, listener) => {
|
|
78
80
|
getSubscribers(source).push(listener);
|
|
79
81
|
};
|
|
80
|
-
const unsubscribeFromAriaPropertyChanges = (source, listener) => {
|
|
81
|
-
getSubscribers(source).splice(getSubscribers(source).indexOf(listener), 1);
|
|
82
|
-
};
|
|
83
82
|
const publishAriaPropertyChange = (source, changedAriaProperty) => {
|
|
84
83
|
getSubscribers(source).forEach((s) => s(source, changedAriaProperty));
|
|
85
84
|
};
|
|
@@ -206,6 +205,15 @@ const AriaMixin = (Base) => {
|
|
|
206
205
|
return AriaMixinElement;
|
|
207
206
|
};
|
|
208
207
|
|
|
208
|
+
function createMetadataLocator() {
|
|
209
|
+
const metadataMap = /* @__PURE__ */ new WeakMap();
|
|
210
|
+
return (target) => {
|
|
211
|
+
if (!metadataMap.has(target)) {
|
|
212
|
+
metadataMap.set(target, []);
|
|
213
|
+
}
|
|
214
|
+
return metadataMap.get(target);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
209
217
|
const locateReplacedPropMetadata = createMetadataLocator();
|
|
210
218
|
const replaces = (config) => ($target, $prop) => {
|
|
211
219
|
locateReplacedPropMetadata($target.constructor).push({
|
|
@@ -258,7 +266,7 @@ const ReplacedPropHandling = (Base) => {
|
|
|
258
266
|
|
|
259
267
|
class VividElement extends AriaMixin(ReplacedPropHandling(FASTElement)) {
|
|
260
268
|
static {
|
|
261
|
-
this.VIVID_VERSION = "5.
|
|
269
|
+
this.VIVID_VERSION = "5.3.0";
|
|
262
270
|
}
|
|
263
271
|
/**
|
|
264
272
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -271,4 +279,4 @@ class VividElement extends AriaMixin(ReplacedPropHandling(FASTElement)) {
|
|
|
271
279
|
}
|
|
272
280
|
}
|
|
273
281
|
|
|
274
|
-
export { VividElement as V, ariaAttributeName as a, ariaMixinProperties as b, createRegisterFunction as c, defineVividComponent as d, replaces as r, subscribeToAriaPropertyChanges as s
|
|
282
|
+
export { VividElement as V, ariaAttributeName as a, ariaMixinProperties as b, createRegisterFunction as c, defineVividComponent as d, replaces as r, subscribeToAriaPropertyChanges as s };
|