@vonage/vivid 4.31.0 → 5.1.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/{shared/definition2.cjs → accordion/definition.cjs} +20 -20
- package/{shared/definition2.js → accordion/definition.js} +5 -7
- package/accordion/index.cjs +5 -5
- package/accordion/index.js +129 -3
- package/accordion-item/definition.cjs +145 -0
- package/accordion-item/definition.js +139 -0
- package/accordion-item/index.cjs +1 -5
- package/accordion-item/index.js +2 -3
- package/{shared/definition3.cjs → action-group/definition.cjs} +12 -9
- package/{shared/definition3.js → action-group/definition.js} +5 -4
- package/action-group/index.cjs +6 -5
- package/action-group/index.js +49 -3
- package/{shared/definition4.cjs → alert/definition.cjs} +33 -31
- package/{shared/definition4.js → alert/definition.js} +11 -11
- package/alert/index.cjs +30 -5
- package/alert/index.js +158 -3
- package/{shared/definition5.cjs → audio-player/definition.cjs} +58 -57
- package/{shared/definition5.js → audio-player/definition.js} +11 -12
- package/audio-player/index.cjs +68 -4
- package/audio-player/index.js +309 -2
- package/{shared/definition6.cjs → avatar/definition.cjs} +28 -26
- package/{shared/definition6.js → avatar/definition.js} +7 -7
- package/avatar/index.cjs +18 -5
- package/avatar/index.js +93 -3
- package/{shared/definition7.cjs → badge/definition.cjs} +18 -16
- package/{shared/definition7.js → badge/definition.js} +6 -6
- package/badge/index.cjs +4 -5
- package/badge/index.js +66 -3
- package/{shared/definition8.cjs → banner/definition.cjs} +26 -25
- package/{shared/definition8.js → banner/definition.js} +10 -11
- package/banner/index.cjs +29 -4
- package/banner/index.js +128 -2
- package/{shared/definition10.cjs → breadcrumb/definition.cjs} +11 -9
- package/{shared/definition10.js → breadcrumb/definition.js} +5 -5
- package/breadcrumb/index.cjs +12 -5
- package/breadcrumb/index.js +69 -3
- package/{shared/definition9.cjs → breadcrumb-item/definition.cjs} +18 -15
- package/{shared/definition9.js → breadcrumb-item/definition.js} +7 -7
- package/breadcrumb-item/index.cjs +5 -5
- package/breadcrumb-item/index.js +33 -3
- package/bundled/_has.cjs +1 -0
- package/bundled/_has.js +34 -0
- package/bundled/affix.cjs +13 -0
- package/bundled/affix.js +63 -0
- package/bundled/anchored.cjs +4 -0
- package/bundled/anchored.js +67 -0
- package/bundled/aria.cjs +1 -0
- package/bundled/aria.js +7 -0
- package/bundled/attribute-binding-behaviour.cjs +1 -0
- package/bundled/attribute-binding-behaviour.js +27 -0
- package/bundled/base-progress.cjs +1 -0
- package/bundled/base-progress.js +57 -0
- package/bundled/breadcrumb-item.cjs +1 -0
- package/bundled/breadcrumb-item.js +21 -0
- package/bundled/button.cjs +1 -0
- package/bundled/button.js +106 -0
- package/bundled/calendar-event.cjs +1 -0
- package/bundled/calendar-event.js +34 -0
- package/bundled/calendar-picker.template.cjs +148 -0
- package/bundled/calendar-picker.template.js +3371 -0
- package/bundled/char-count.cjs +13 -0
- package/bundled/char-count.js +54 -0
- package/bundled/children.cjs +1 -0
- package/bundled/children.js +38 -0
- package/bundled/class-names.cjs +1 -0
- package/bundled/class-names.js +9 -0
- package/bundled/definition.cjs +39 -0
- package/bundled/definition.js +122 -0
- package/bundled/definition10.cjs +19 -0
- package/bundled/definition10.js +73 -0
- package/bundled/definition11.cjs +10 -0
- package/bundled/definition11.js +44 -0
- package/bundled/definition12.cjs +1 -0
- package/bundled/definition12.js +20 -0
- package/bundled/definition13.cjs +73 -0
- package/bundled/definition13.js +359 -0
- package/bundled/definition14.cjs +5 -0
- package/bundled/definition14.js +29 -0
- package/bundled/definition15.cjs +30 -0
- package/bundled/definition15.js +80 -0
- package/bundled/definition16.cjs +19 -0
- package/bundled/definition16.js +103 -0
- package/bundled/definition17.cjs +13 -0
- package/bundled/definition17.js +137 -0
- package/bundled/definition18.cjs +12 -0
- package/bundled/definition18.js +94 -0
- package/bundled/definition19.cjs +67 -0
- package/bundled/definition19.js +666 -0
- package/bundled/definition2.cjs +20 -0
- package/bundled/definition2.js +180 -0
- package/bundled/definition20.cjs +20 -0
- package/bundled/definition20.js +106 -0
- package/bundled/definition21.cjs +5 -0
- package/bundled/definition21.js +19 -0
- package/bundled/definition22.cjs +24 -0
- package/bundled/definition22.js +151 -0
- package/bundled/definition3.cjs +29 -0
- package/bundled/definition3.js +195 -0
- package/bundled/definition4.cjs +6 -0
- package/bundled/definition4.js +42 -0
- package/bundled/definition5.cjs +1 -0
- package/bundled/definition5.js +345 -0
- package/bundled/definition6.cjs +31 -0
- package/bundled/definition6.js +265 -0
- package/bundled/definition7.cjs +30 -0
- package/bundled/definition7.js +288 -0
- package/bundled/definition8.cjs +19 -0
- package/bundled/definition8.js +145 -0
- package/bundled/definition9.cjs +14 -0
- package/bundled/definition9.js +1406 -0
- package/bundled/delegates-aria.cjs +1 -0
- package/bundled/delegates-aria.js +77 -0
- package/bundled/divider.cjs +1 -0
- package/bundled/divider.js +34 -0
- package/bundled/dom.cjs +1 -0
- package/bundled/dom.js +6 -0
- package/bundled/enums.cjs +1 -0
- package/bundled/enums.js +9 -0
- package/bundled/form-associated.cjs +1 -0
- package/bundled/form-associated.js +320 -0
- package/bundled/form-element.cjs +1 -0
- package/bundled/form-element.js +56 -0
- package/bundled/host-semantics.cjs +1 -0
- package/bundled/host-semantics.js +57 -0
- package/bundled/index.cjs +1 -0
- package/bundled/index.js +6 -0
- package/bundled/key-codes.cjs +1 -0
- package/bundled/key-codes.js +16 -0
- package/bundled/linkable.cjs +15 -0
- package/bundled/linkable.js +49 -0
- package/bundled/listbox.cjs +1 -0
- package/bundled/listbox.js +345 -0
- package/bundled/localized.cjs +1 -0
- package/bundled/localized.js +459 -0
- package/bundled/mixins.cjs +33 -0
- package/bundled/mixins.js +226 -0
- package/bundled/numbers.cjs +1 -0
- package/bundled/numbers.js +14 -0
- package/bundled/option.cjs +1 -0
- package/bundled/option.js +158 -0
- package/bundled/picker-field.template.cjs +62 -0
- package/bundled/picker-field.template.js +234 -0
- package/bundled/playbackRates.cjs +1 -0
- package/bundled/playbackRates.js +11 -0
- package/bundled/ref.cjs +1 -0
- package/bundled/ref.js +32 -0
- package/bundled/repeat.cjs +1 -0
- package/bundled/repeat.js +341 -0
- package/bundled/scrollIntoView.cjs +1 -0
- package/bundled/scrollIntoView.js +33 -0
- package/bundled/single-date-picker.cjs +1 -0
- package/bundled/single-date-picker.js +39 -0
- package/bundled/single-value-picker.cjs +1 -0
- package/bundled/single-value-picker.js +87 -0
- package/bundled/slider.template.cjs +41 -0
- package/bundled/slider.template.js +100 -0
- package/bundled/slotted.cjs +1 -0
- package/bundled/slotted.js +81 -0
- package/bundled/strings.cjs +1 -0
- package/bundled/strings.js +7 -0
- package/bundled/text-field.cjs +1 -0
- package/bundled/text-field.js +4 -0
- package/bundled/time-selection-picker.template.cjs +46 -0
- package/bundled/time-selection-picker.template.js +575 -0
- package/bundled/vivid-element.cjs +1 -0
- package/bundled/vivid-element.js +1761 -0
- package/bundled/when.cjs +1 -0
- package/bundled/when.js +11 -0
- package/bundled/with-contextual-help.cjs +1 -0
- package/bundled/with-contextual-help.js +22 -0
- package/bundled/with-error-text.cjs +1 -0
- package/bundled/with-error-text.js +39 -0
- package/bundled/with-success-text.cjs +1 -0
- package/bundled/with-success-text.js +16 -0
- package/button/definition.cjs +14 -0
- package/button/definition.js +4 -0
- package/button/index.cjs +1 -5
- package/button/index.js +2 -3
- package/{shared/definition13.cjs → calendar/definition.cjs} +27 -449
- package/{shared/definition13.js → calendar/definition.js} +7 -431
- package/calendar/index.cjs +53 -5
- package/calendar/index.js +431 -3
- package/{shared/definition12.cjs → calendar-event/definition.cjs} +12 -9
- package/{shared/definition12.js → calendar-event/definition.js} +6 -6
- package/calendar-event/index.cjs +9 -5
- package/calendar-event/index.js +43 -3
- package/card/definition.cjs +186 -0
- package/{shared/definition14.js → card/definition.js} +10 -11
- package/card/index.cjs +47 -5
- package/card/index.js +163 -3
- package/{shared/definition15.cjs → checkbox/definition.cjs} +35 -30
- package/{shared/definition15.js → checkbox/definition.js} +17 -14
- package/checkbox/index.cjs +1 -5
- package/checkbox/index.js +2 -3
- package/{shared/definition16.cjs → combobox/definition.cjs} +50 -52
- package/{shared/definition16.js → combobox/definition.js} +19 -23
- package/combobox/index.cjs +65 -5
- package/combobox/index.js +512 -3
- package/contextual-help/definition.cjs +62 -0
- package/contextual-help/definition.js +57 -0
- package/contextual-help/index.cjs +1 -0
- package/contextual-help/index.js +2 -0
- package/custom-elements.json +2735 -711
- package/{shared/definition17.cjs → data-grid/definition.cjs} +169 -196
- package/{shared/definition17.js → data-grid/definition.js} +71 -100
- package/data-grid/index.cjs +81 -5
- package/data-grid/index.js +1011 -3
- package/{shared/definition18.cjs → date-picker/definition.cjs} +20 -17
- package/{shared/definition18.js → date-picker/definition.js} +12 -11
- package/date-picker/index.cjs +1 -5
- package/date-picker/index.js +115 -3
- package/{shared/definition19.cjs → date-range-picker/definition.cjs} +26 -23
- package/{shared/definition19.js → date-range-picker/definition.js} +10 -9
- package/date-range-picker/index.cjs +1 -5
- package/date-range-picker/index.js +335 -3
- package/{shared/definition20.cjs → date-time-picker/definition.cjs} +27 -24
- package/{shared/definition20.js → date-time-picker/definition.js} +13 -12
- package/date-time-picker/index.cjs +8 -5
- package/date-time-picker/index.js +216 -3
- package/{shared/definition21.cjs → dial-pad/definition.cjs} +39 -40
- package/{shared/definition21.js → dial-pad/definition.js} +9 -12
- package/dial-pad/index.cjs +54 -5
- package/dial-pad/index.js +214 -3
- package/{shared/definition22.cjs → dialog/definition.cjs} +48 -47
- package/{shared/definition22.js → dialog/definition.js} +10 -11
- package/dialog/index.cjs +44 -5
- package/dialog/index.js +257 -3
- package/{shared/definition23.cjs → divider/definition.cjs} +10 -6
- package/{shared/definition23.js → divider/definition.js} +6 -5
- package/divider/index.cjs +1 -5
- package/divider/index.js +2 -3
- package/elevation/definition.cjs +11 -0
- package/elevation/definition.js +2 -0
- package/elevation/index.cjs +1 -5
- package/elevation/index.js +2 -3
- package/empty-state/definition.cjs +81 -0
- package/empty-state/definition.js +75 -0
- package/empty-state/index.cjs +14 -5
- package/empty-state/index.js +64 -3
- package/fab/definition.cjs +105 -0
- package/fab/definition.js +99 -0
- package/fab/index.cjs +20 -5
- package/fab/index.js +86 -3
- package/file-picker/definition.cjs +510 -0
- package/file-picker/definition.js +504 -0
- package/file-picker/index.cjs +58 -5
- package/file-picker/index.js +381 -3
- package/{shared/definition27.cjs → header/definition.cjs} +14 -11
- package/{shared/definition27.js → header/definition.js} +6 -5
- package/header/index.cjs +19 -5
- package/header/index.js +57 -3
- package/{shared/definition28.cjs → icon/definition.cjs} +25 -149
- package/{shared/definition28.js → icon/definition.js} +6 -132
- package/icon/index.cjs +1 -5
- package/icon/index.js +2 -3
- package/index.cjs +268 -264
- package/index.js +72 -71
- package/{shared/definition29.cjs → layout/definition.cjs} +13 -10
- package/{shared/definition29.js → layout/definition.js} +4 -3
- package/layout/index.cjs +3 -5
- package/layout/index.js +52 -3
- package/lib/accordion-item/accordion-item.d.ts +42 -2
- package/lib/action-group/action-group.d.ts +42 -2
- package/lib/alert/alert.d.ts +84 -4
- package/lib/audio-player/audio-player.d.ts +42 -2
- package/lib/avatar/avatar.d.ts +42 -2
- package/lib/badge/badge.d.ts +42 -2
- package/lib/banner/banner.d.ts +126 -6
- package/lib/breadcrumb/breadcrumb.d.ts +42 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +42 -2
- package/lib/button/button.d.ts +127 -6
- package/lib/calendar-event/calendar-event.d.ts +42 -2
- package/lib/card/card.d.ts +42 -2
- package/lib/checkbox/checkbox.d.ts +252 -13
- package/lib/combobox/combobox.d.ts +252 -12
- package/lib/components.d.ts +1 -0
- package/lib/contextual-help/contextual-help.d.ts +5 -0
- package/lib/contextual-help/contextual-help.template.d.ts +3 -0
- package/lib/contextual-help/definition.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +418 -3
- package/lib/data-grid/data-grid-row.d.ts +379 -1
- package/lib/date-picker/date-picker.d.ts +374 -54
- package/lib/date-range-picker/date-range-picker.d.ts +188 -28
- package/lib/date-time-picker/date-time-picker.d.ts +376 -56
- package/lib/dial-pad/dial-pad.d.ts +42 -2
- package/lib/dialog/dialog.d.ts +84 -4
- package/lib/divider/divider.d.ts +42 -2
- package/lib/fab/fab.d.ts +43 -2
- package/lib/file-picker/accept.d.ts +1 -0
- package/lib/file-picker/data-transfer.d.ts +1 -0
- package/lib/file-picker/file-picker.d.ts +259 -31
- package/lib/file-picker/locale.d.ts +1 -0
- package/lib/header/header.d.ts +42 -2
- package/lib/menu/menu.d.ts +84 -4
- package/lib/menu-item/menu-item.d.ts +84 -4
- package/lib/nav/nav.d.ts +42 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +84 -4
- package/lib/nav-item/nav-item.d.ts +84 -4
- package/lib/note/note.d.ts +42 -2
- package/lib/number-field/number-field.d.ts +840 -104
- package/lib/option/option.d.ts +85 -4
- package/lib/pagination/pagination.d.ts +42 -2
- package/lib/progress/progress.d.ts +42 -2
- package/lib/progress-ring/progress-ring.d.ts +42 -2
- package/lib/radio/radio.d.ts +126 -7
- package/lib/radio-group/radio-group.d.ts +42 -2
- package/lib/range-slider/range-slider.d.ts +126 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +42 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +42 -2
- package/lib/searchable-select/option-tag.d.ts +42 -2
- package/lib/searchable-select/searchable-select.d.ts +336 -16
- package/lib/select/select.d.ts +294 -14
- package/lib/selectable-box/selectable-box.d.ts +42 -3
- package/lib/simple-color-picker/definition.d.ts +4 -0
- package/lib/simple-color-picker/locale.d.ts +4 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +1600 -0
- package/lib/simple-color-picker/simple-color-picker.template.d.ts +3 -0
- package/lib/slider/slider.d.ts +126 -6
- package/lib/split-button/split-button.d.ts +128 -6
- package/lib/switch/switch.d.ts +84 -4
- package/lib/tab/tab.d.ts +126 -6
- package/lib/tab-panel/tab-panel.d.ts +42 -2
- package/lib/tag/tag.d.ts +126 -6
- package/lib/tag-group/tag-group.d.ts +42 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +787 -91
- package/lib/text-field/text-field.d.ts +840 -104
- package/lib/time-picker/time-picker.d.ts +188 -28
- package/lib/toggletip/toggletip.d.ts +84 -4
- package/lib/tooltip/tooltip.d.ts +42 -2
- package/lib/tree-item/tree-item.d.ts +84 -4
- package/lib/tree-view/tree-view.d.ts +42 -2
- package/lib/video-player/video-player.d.ts +42 -2
- package/locales/de-DE.cjs +13 -1
- package/locales/de-DE.js +13 -1
- package/locales/en-GB.cjs +13 -1
- package/locales/en-GB.js +13 -1
- package/locales/en-US.cjs +13 -1
- package/locales/en-US.js +13 -1
- package/locales/ja-JP.cjs +13 -1
- package/locales/ja-JP.js +13 -1
- package/locales/zh-CN.cjs +13 -1
- package/locales/zh-CN.js +13 -1
- package/{shared/definition31.cjs → menu/definition.cjs} +46 -46
- package/{shared/definition31.js → menu/definition.js} +16 -18
- package/menu/index.cjs +1 -5
- package/menu/index.js +2 -3
- package/menu-item/definition.cjs +14 -0
- package/menu-item/definition.js +3 -0
- package/menu-item/index.cjs +1 -5
- package/menu-item/index.js +2 -3
- package/{shared/definition34.cjs → nav/definition.cjs} +7 -4
- package/{shared/definition34.js → nav/definition.js} +4 -3
- package/nav/index.cjs +5 -5
- package/nav/index.js +13 -3
- package/nav-disclosure/definition.cjs +122 -0
- package/nav-disclosure/definition.js +116 -0
- package/nav-disclosure/index.cjs +16 -5
- package/nav-disclosure/index.js +96 -3
- package/{shared/definition33.cjs → nav-item/definition.cjs} +19 -16
- package/{shared/definition33.js → nav-item/definition.js} +9 -8
- package/nav-item/index.cjs +2 -5
- package/nav-item/index.js +59 -3
- package/{shared/definition35.cjs → note/definition.cjs} +15 -13
- package/{shared/definition35.js → note/definition.js} +6 -6
- package/note/index.cjs +9 -5
- package/note/index.js +44 -3
- package/number-field/definition.cjs +438 -0
- package/{shared/definition36.js → number-field/definition.js} +31 -27
- package/number-field/index.cjs +60 -5
- package/number-field/index.js +369 -3
- package/option/definition.cjs +84 -0
- package/option/definition.js +78 -0
- package/option/index.cjs +1 -5
- package/option/index.js +2 -3
- package/package.json +15 -4
- package/{shared/definition38.cjs → pagination/definition.cjs} +31 -33
- package/{shared/definition38.js → pagination/definition.js} +7 -11
- package/pagination/index.cjs +43 -5
- package/pagination/index.js +194 -3
- package/popup/definition.cjs +13 -0
- package/popup/definition.js +4 -0
- package/popup/index.cjs +1 -5
- package/popup/index.js +2 -3
- package/{shared/definition40.cjs → progress/definition.cjs} +17 -15
- package/{shared/definition40.js → progress/definition.js} +6 -6
- package/progress/index.cjs +17 -5
- package/progress/index.js +69 -3
- package/{shared/definition39.cjs → progress-ring/definition.cjs} +17 -15
- package/{shared/definition39.js → progress-ring/definition.js} +7 -7
- package/progress-ring/index.cjs +1 -5
- package/progress-ring/index.js +2 -3
- package/{shared/definition42.cjs → radio/definition.cjs} +20 -23
- package/{shared/definition42.js → radio/definition.js} +8 -13
- package/radio/index.cjs +1 -5
- package/radio/index.js +2 -3
- package/{shared/definition41.cjs → radio-group/definition.cjs} +31 -30
- package/{shared/definition41.js → radio-group/definition.js} +8 -9
- package/radio-group/index.cjs +23 -5
- package/radio-group/index.js +255 -3
- package/{shared/definition43.cjs → range-slider/definition.cjs} +62 -61
- package/{shared/definition43.js → range-slider/definition.js} +13 -14
- package/range-slider/index.cjs +68 -5
- package/range-slider/index.js +456 -3
- package/rich-text-editor/definition.cjs +1206 -0
- package/rich-text-editor/definition.js +1200 -0
- package/rich-text-editor/index.cjs +133 -4
- package/rich-text-editor/index.js +10386 -2
- package/{shared/definition45.cjs → searchable-select/definition.cjs} +119 -116
- package/{shared/definition45.js → searchable-select/definition.js} +25 -24
- package/searchable-select/index.cjs +164 -5
- package/searchable-select/index.js +1025 -3
- package/{shared/definition46.cjs → select/definition.cjs} +80 -83
- package/{shared/definition46.js → select/definition.js} +19 -24
- package/select/index.cjs +1 -5
- package/select/index.js +2 -3
- package/{shared/definition47.cjs → selectable-box/definition.cjs} +26 -32
- package/{shared/definition47.js → selectable-box/definition.js} +9 -17
- package/selectable-box/index.cjs +28 -5
- package/selectable-box/index.js +136 -3
- package/shared/aria/aria-mixin.d.ts +43 -3
- package/shared/aria/attribute-removal.d.ts +3 -0
- package/shared/aria/delegate-aria-behavior.d.ts +0 -3
- package/shared/aria/delegates-aria.d.ts +42 -2
- package/shared/aria/host-semantics.d.ts +42 -2
- package/shared/color-picker/index.d.ts +2 -0
- package/shared/color-picker/types.d.ts +4 -0
- package/shared/color-picker/utils.d.ts +3 -0
- package/shared/feedback/feedback-message.d.ts +42 -2
- package/shared/feedback/mixins.d.ts +84 -4
- package/shared/foundation/button/button.d.ts +84 -4
- package/shared/foundation/form-associated/form-associated.d.ts +84 -4
- package/shared/foundation/vivid-element/vivid-element.d.ts +43 -3
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/patterns/affix.d.ts +84 -4
- package/shared/patterns/anchored.d.ts +84 -4
- package/shared/patterns/char-count/char-count.d.ts +42 -2
- package/shared/patterns/form-elements/form-element.d.ts +84 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1238 -0
- package/shared/patterns/form-elements/with-error-text.d.ts +126 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +42 -2
- package/shared/patterns/linkable.d.ts +42 -2
- package/shared/patterns/localized.d.ts +42 -2
- package/shared/patterns/trapped-focus.d.ts +42 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +94 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +94 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +42 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +188 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +280 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +92 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +188 -28
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +188 -28
- package/shared/picker-field/picker-field.d.ts +252 -12
- package/{shared/definition48.cjs → side-drawer/definition.cjs} +16 -14
- package/{shared/definition48.js → side-drawer/definition.js} +5 -5
- package/side-drawer/index.cjs +17 -3
- package/side-drawer/index.js +100 -2
- package/simple-color-picker/definition.cjs +398 -0
- package/simple-color-picker/definition.js +392 -0
- package/simple-color-picker/index.cjs +31 -0
- package/simple-color-picker/index.js +250 -0
- package/{shared/definition49.cjs → slider/definition.cjs} +46 -53
- package/{shared/definition49.js → slider/definition.js} +11 -20
- package/slider/index.cjs +1 -5
- package/slider/index.js +2 -3
- package/split-button/definition.cjs +176 -0
- package/split-button/definition.js +170 -0
- package/split-button/index.cjs +26 -5
- package/split-button/index.js +149 -3
- 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/{shared/definition51.cjs → switch/definition.cjs} +20 -19
- package/{shared/definition51.js → switch/definition.js} +8 -9
- package/switch/index.cjs +16 -5
- package/switch/index.js +102 -3
- package/tab/definition.cjs +127 -0
- package/tab/definition.js +121 -0
- package/tab/index.cjs +1 -5
- package/tab/index.js +2 -3
- package/{shared/definition52.cjs → tab-panel/definition.cjs} +7 -4
- package/{shared/definition52.js → tab-panel/definition.js} +4 -3
- package/tab-panel/index.cjs +1 -5
- package/tab-panel/index.js +2 -3
- package/{shared/definition54.cjs → tabs/definition.cjs} +47 -40
- package/{shared/definition54.js → tabs/definition.js} +19 -14
- package/tabs/index.cjs +31 -5
- package/tabs/index.js +321 -3
- package/tag/definition.cjs +156 -0
- package/tag/definition.js +150 -0
- package/tag/index.cjs +19 -5
- package/tag/index.js +118 -3
- package/{shared/definition55.cjs → tag-group/definition.cjs} +9 -6
- package/{shared/definition55.js → tag-group/definition.js} +5 -4
- package/tag-group/index.cjs +8 -5
- package/tag-group/index.js +26 -3
- package/text-area/definition.cjs +355 -0
- package/text-area/definition.js +349 -0
- package/text-area/index.cjs +41 -5
- package/text-area/index.js +293 -3
- package/{shared/definition58.cjs → text-field/definition.cjs} +70 -52
- package/{shared/definition58.js → text-field/definition.js} +40 -24
- package/text-field/index.cjs +1 -5
- package/text-field/index.js +2 -3
- package/time-picker/definition.cjs +43 -0
- package/{shared/definition59.js → time-picker/definition.js} +9 -8
- package/time-picker/index.cjs +1 -5
- package/time-picker/index.js +29 -3
- package/{shared/definition60.cjs → toggletip/definition.cjs} +20 -18
- package/{shared/definition60.js → toggletip/definition.js} +8 -8
- package/toggletip/index.cjs +1 -5
- package/toggletip/index.js +2 -3
- package/{shared/definition61.cjs → tooltip/definition.cjs} +16 -13
- package/{shared/definition61.js → tooltip/definition.js} +7 -6
- package/tooltip/index.cjs +1 -5
- package/tooltip/index.js +2 -3
- package/tree-item/definition.cjs +13 -0
- package/tree-item/definition.js +3 -0
- package/tree-item/index.cjs +1 -5
- package/tree-item/index.js +2 -3
- package/{shared/definition63.cjs → tree-view/definition.cjs} +42 -44
- package/{shared/definition63.js → tree-view/definition.js} +7 -11
- package/tree-view/index.cjs +13 -5
- package/tree-view/index.js +171 -3
- package/{shared → unbundled}/affix.cjs +10 -11
- package/{shared → unbundled}/affix.js +2 -3
- package/{shared → unbundled}/anchored.cjs +7 -8
- package/{shared → unbundled}/anchored.js +1 -2
- package/{shared → unbundled}/attribute-binding-behaviour.cjs +3 -3
- package/{shared → unbundled}/attribute-binding-behaviour.js +1 -1
- package/{shared → unbundled}/base-progress.cjs +6 -5
- package/{shared → unbundled}/base-progress.js +2 -1
- package/{shared → unbundled}/breadcrumb-item.cjs +3 -2
- package/{shared → unbundled}/breadcrumb-item.js +2 -1
- package/{shared → unbundled}/button.cjs +10 -9
- package/{shared → unbundled}/button.js +2 -1
- package/{shared → unbundled}/calendar-event.cjs +8 -7
- package/{shared → unbundled}/calendar-event.js +2 -1
- package/unbundled/calendar-picker.template.cjs +917 -0
- package/unbundled/calendar-picker.template.js +906 -0
- package/{shared → unbundled}/char-count.cjs +6 -7
- package/{shared → unbundled}/char-count.js +2 -3
- package/unbundled/definition.cjs +225 -0
- package/unbundled/definition.js +220 -0
- package/{shared/definition30.cjs → unbundled/definition2.cjs} +49 -46
- package/{shared/definition30.js → unbundled/definition2.js} +14 -11
- package/unbundled/definition3.cjs +207 -0
- package/{shared/definition62.js → unbundled/definition3.js} +6 -10
- package/unbundled/definition4.cjs +298 -0
- package/unbundled/definition4.js +293 -0
- package/{shared/definition65.cjs → unbundled/definition5.cjs} +7 -6
- package/{shared/definition65.js → unbundled/definition5.js} +3 -2
- package/{shared → unbundled}/delegates-aria.cjs +8 -28
- package/{shared → unbundled}/delegates-aria.js +6 -26
- package/{shared → unbundled}/divider.cjs +13 -7
- package/{shared → unbundled}/divider.js +11 -5
- package/{shared → unbundled}/form-associated.cjs +13 -13
- package/{shared → unbundled}/form-associated.js +2 -2
- package/{shared → unbundled}/form-element.cjs +3 -3
- package/{shared → unbundled}/form-element.js +1 -1
- package/{shared → unbundled}/host-semantics.cjs +2 -1
- package/{shared → unbundled}/host-semantics.js +2 -1
- package/unbundled/key-codes.cjs +10 -0
- package/unbundled/key-codes.js +7 -0
- package/{shared → unbundled}/linkable.cjs +11 -12
- package/{shared → unbundled}/linkable.js +1 -2
- package/{shared → unbundled}/listbox.cjs +22 -38
- package/{shared → unbundled}/listbox.js +4 -20
- package/{shared → unbundled}/localized.cjs +2 -2
- package/{shared → unbundled}/localized.js +1 -1
- package/{shared → unbundled}/mixins.cjs +27 -83
- package/{shared → unbundled}/mixins.js +6 -62
- package/{shared → unbundled}/option.cjs +42 -17
- package/{shared → unbundled}/option.js +29 -4
- package/{shared → unbundled}/picker-field.template.cjs +21 -21
- package/{shared → unbundled}/picker-field.template.js +7 -7
- package/{shared → unbundled}/slider.template.cjs +15 -19
- package/{shared → unbundled}/slider.template.js +3 -7
- package/unbundled/text-field.cjs +5 -0
- package/unbundled/text-field.js +3 -0
- package/{shared → unbundled}/time-selection-picker.template.cjs +28 -30
- package/{shared → unbundled}/time-selection-picker.template.js +4 -6
- package/unbundled/vivid-element.cjs +283 -0
- package/unbundled/vivid-element.js +274 -0
- package/unbundled/with-contextual-help.cjs +29 -0
- package/unbundled/with-contextual-help.js +27 -0
- package/{shared → unbundled}/with-error-text.cjs +2 -2
- package/{shared → unbundled}/with-error-text.js +1 -1
- package/{shared → unbundled}/with-success-text.cjs +2 -2
- package/{shared → unbundled}/with-success-text.js +1 -1
- package/video-player/definition.cjs +536 -0
- package/video-player/definition.js +530 -0
- package/video-player/index.cjs +536 -3
- package/video-player/index.js +35912 -2
- package/{shared/definition66.cjs → visually-hidden/definition.cjs} +6 -3
- package/{shared/definition66.js → visually-hidden/definition.js} +3 -2
- package/visually-hidden/index.cjs +1 -5
- package/visually-hidden/index.js +2 -3
- package/vivid.api.json +716 -914
- package/shared/_has.cjs +0 -58
- package/shared/_has.js +0 -54
- package/shared/aria.cjs +0 -11
- package/shared/aria.js +0 -9
- package/shared/calendar-picker.template.cjs +0 -6377
- package/shared/calendar-picker.template.js +0 -6366
- package/shared/children.cjs +0 -61
- package/shared/children.js +0 -59
- package/shared/class-names.cjs +0 -17
- package/shared/class-names.js +0 -15
- package/shared/definition.cjs +0 -145
- package/shared/definition.js +0 -141
- package/shared/definition11.cjs +0 -220
- package/shared/definition11.js +0 -215
- package/shared/definition14.cjs +0 -185
- package/shared/definition24.cjs +0 -80
- package/shared/definition24.js +0 -76
- package/shared/definition25.cjs +0 -90
- package/shared/definition25.js +0 -86
- package/shared/definition26.cjs +0 -2514
- package/shared/definition26.js +0 -2510
- package/shared/definition32.cjs +0 -120
- package/shared/definition32.js +0 -116
- package/shared/definition36.cjs +0 -432
- package/shared/definition37.cjs +0 -71
- package/shared/definition37.js +0 -68
- package/shared/definition44.cjs +0 -14666
- package/shared/definition44.js +0 -14662
- package/shared/definition50.cjs +0 -148
- package/shared/definition50.js +0 -144
- package/shared/definition53.cjs +0 -124
- package/shared/definition53.js +0 -120
- package/shared/definition56.cjs +0 -154
- package/shared/definition56.js +0 -150
- package/shared/definition57.cjs +0 -335
- package/shared/definition57.js +0 -331
- package/shared/definition59.cjs +0 -39
- package/shared/definition62.cjs +0 -211
- package/shared/definition64.cjs +0 -69579
- package/shared/definition64.js +0 -69575
- package/shared/definition67.cjs +0 -2227
- package/shared/definition67.js +0 -2222
- package/shared/dom.cjs +0 -10
- package/shared/dom.js +0 -8
- package/shared/key-codes.cjs +0 -32
- package/shared/key-codes.js +0 -18
- package/shared/numbers.cjs +0 -38
- package/shared/numbers.js +0 -34
- package/shared/ref.cjs +0 -43
- package/shared/ref.js +0 -41
- package/shared/repeat.cjs +0 -767
- package/shared/repeat.js +0 -764
- package/shared/slotted.cjs +0 -123
- package/shared/slotted.js +0 -119
- package/shared/strings.cjs +0 -11
- package/shared/strings.js +0 -9
- package/shared/text-field.cjs +0 -5
- package/shared/text-field.js +0 -3
- package/shared/vivid-element.cjs +0 -2771
- package/shared/vivid-element.js +0 -2748
- package/shared/when.cjs +0 -31
- package/shared/when.js +0 -29
- /package/{shared → unbundled}/enums.cjs +0 -0
- /package/{shared → unbundled}/enums.js +0 -0
- /package/{shared → unbundled}/index.cjs +0 -0
- /package/{shared → unbundled}/index.js +0 -0
- /package/{shared → unbundled}/playbackRates.cjs +0 -0
- /package/{shared → unbundled}/playbackRates.js +0 -0
- /package/{shared → unbundled}/scrollIntoView.cjs +0 -0
- /package/{shared → unbundled}/scrollIntoView.js +0 -0
- /package/{shared → unbundled}/single-date-picker.cjs +0 -0
- /package/{shared → unbundled}/single-date-picker.js +0 -0
- /package/{shared → unbundled}/single-value-picker.cjs +0 -0
- /package/{shared → unbundled}/single-value-picker.js +0 -0
|
@@ -0,0 +1,1761 @@
|
|
|
1
|
+
const v = function() {
|
|
2
|
+
if (typeof globalThis < "u")
|
|
3
|
+
return globalThis;
|
|
4
|
+
if (typeof global < "u")
|
|
5
|
+
return global;
|
|
6
|
+
if (typeof self < "u")
|
|
7
|
+
return self;
|
|
8
|
+
if (typeof window < "u")
|
|
9
|
+
return window;
|
|
10
|
+
try {
|
|
11
|
+
return new Function("return this")();
|
|
12
|
+
} catch {
|
|
13
|
+
return {};
|
|
14
|
+
}
|
|
15
|
+
}();
|
|
16
|
+
v.trustedTypes === void 0 && (v.trustedTypes = { createPolicy: (s, e) => e });
|
|
17
|
+
const ee = {
|
|
18
|
+
configurable: !1,
|
|
19
|
+
enumerable: !1,
|
|
20
|
+
writable: !1
|
|
21
|
+
};
|
|
22
|
+
v.FAST === void 0 && Reflect.defineProperty(v, "FAST", Object.assign({ value: /* @__PURE__ */ Object.create(null) }, ee));
|
|
23
|
+
const S = v.FAST;
|
|
24
|
+
if (S.getById === void 0) {
|
|
25
|
+
const s = /* @__PURE__ */ Object.create(null);
|
|
26
|
+
Reflect.defineProperty(S, "getById", Object.assign({ value(e, t) {
|
|
27
|
+
let i = s[e];
|
|
28
|
+
return i === void 0 && (i = t ? s[e] = t() : null), i;
|
|
29
|
+
} }, ee));
|
|
30
|
+
}
|
|
31
|
+
const Ke = Object.freeze([]);
|
|
32
|
+
function _() {
|
|
33
|
+
const s = /* @__PURE__ */ new WeakMap();
|
|
34
|
+
return function(e) {
|
|
35
|
+
let t = s.get(e);
|
|
36
|
+
if (t === void 0) {
|
|
37
|
+
let i = Reflect.getPrototypeOf(e);
|
|
38
|
+
for (; t === void 0 && i !== null; )
|
|
39
|
+
t = s.get(i), i = Reflect.getPrototypeOf(i);
|
|
40
|
+
t = t === void 0 ? [] : t.slice(0), s.set(e, t);
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const N = v.FAST.getById(1, () => {
|
|
46
|
+
const s = [], e = [];
|
|
47
|
+
function t() {
|
|
48
|
+
if (e.length)
|
|
49
|
+
throw e.shift();
|
|
50
|
+
}
|
|
51
|
+
function i(o) {
|
|
52
|
+
try {
|
|
53
|
+
o.call();
|
|
54
|
+
} catch (a) {
|
|
55
|
+
e.push(a), setTimeout(t, 0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function n() {
|
|
59
|
+
let a = 0;
|
|
60
|
+
for (; a < s.length; )
|
|
61
|
+
if (i(s[a]), a++, a > 1024) {
|
|
62
|
+
for (let c = 0, l = s.length - a; c < l; c++)
|
|
63
|
+
s[c] = s[c + a];
|
|
64
|
+
s.length -= a, a = 0;
|
|
65
|
+
}
|
|
66
|
+
s.length = 0;
|
|
67
|
+
}
|
|
68
|
+
function r(o) {
|
|
69
|
+
s.length < 1 && v.requestAnimationFrame(n), s.push(o);
|
|
70
|
+
}
|
|
71
|
+
return Object.freeze({
|
|
72
|
+
enqueue: r,
|
|
73
|
+
process: n
|
|
74
|
+
});
|
|
75
|
+
}), te = v.trustedTypes.createPolicy("fast-html", {
|
|
76
|
+
createHTML: (s) => s
|
|
77
|
+
});
|
|
78
|
+
let k = te;
|
|
79
|
+
const m = `fast-${Math.random().toString(36).substring(2, 8)}`, se = `${m}{`, R = `}${m}`, u = Object.freeze({
|
|
80
|
+
/**
|
|
81
|
+
* Indicates whether the DOM supports the adoptedStyleSheets feature.
|
|
82
|
+
*/
|
|
83
|
+
supportsAdoptedStyleSheets: Array.isArray(document.adoptedStyleSheets) && "replace" in CSSStyleSheet.prototype,
|
|
84
|
+
/**
|
|
85
|
+
* Sets the HTML trusted types policy used by the templating engine.
|
|
86
|
+
* @param policy - The policy to set for HTML.
|
|
87
|
+
* @remarks
|
|
88
|
+
* This API can only be called once, for security reasons. It should be
|
|
89
|
+
* called by the application developer at the start of their program.
|
|
90
|
+
*/
|
|
91
|
+
setHTMLPolicy(s) {
|
|
92
|
+
if (k !== te)
|
|
93
|
+
throw new Error("The HTML policy can only be set once.");
|
|
94
|
+
k = s;
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Turns a string into trusted HTML using the configured trusted types policy.
|
|
98
|
+
* @param html - The string to turn into trusted HTML.
|
|
99
|
+
* @remarks
|
|
100
|
+
* Used internally by the template engine when creating templates
|
|
101
|
+
* and setting innerHTML.
|
|
102
|
+
*/
|
|
103
|
+
createHTML(s) {
|
|
104
|
+
return k.createHTML(s);
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Determines if the provided node is a template marker used by the runtime.
|
|
108
|
+
* @param node - The node to test.
|
|
109
|
+
*/
|
|
110
|
+
isMarker(s) {
|
|
111
|
+
return s && s.nodeType === 8 && s.data.startsWith(m);
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* Given a marker node, extract the {@link HTMLDirective} index from the placeholder.
|
|
115
|
+
* @param node - The marker node to extract the index from.
|
|
116
|
+
*/
|
|
117
|
+
extractDirectiveIndexFromMarker(s) {
|
|
118
|
+
return parseInt(s.data.replace(`${m}:`, ""));
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* Creates a placeholder string suitable for marking out a location *within*
|
|
122
|
+
* an attribute value or HTML content.
|
|
123
|
+
* @param index - The directive index to create the placeholder for.
|
|
124
|
+
* @remarks
|
|
125
|
+
* Used internally by binding directives.
|
|
126
|
+
*/
|
|
127
|
+
createInterpolationPlaceholder(s) {
|
|
128
|
+
return `${se}${s}${R}`;
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* Creates a placeholder that manifests itself as an attribute on an
|
|
132
|
+
* element.
|
|
133
|
+
* @param attributeName - The name of the custom attribute.
|
|
134
|
+
* @param index - The directive index to create the placeholder for.
|
|
135
|
+
* @remarks
|
|
136
|
+
* Used internally by attribute directives such as `ref`, `slotted`, and `children`.
|
|
137
|
+
*/
|
|
138
|
+
createCustomAttributePlaceholder(s, e) {
|
|
139
|
+
return `${s}="${this.createInterpolationPlaceholder(e)}"`;
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* Creates a placeholder that manifests itself as a marker within the DOM structure.
|
|
143
|
+
* @param index - The directive index to create the placeholder for.
|
|
144
|
+
* @remarks
|
|
145
|
+
* Used internally by structural directives such as `repeat`.
|
|
146
|
+
*/
|
|
147
|
+
createBlockPlaceholder(s) {
|
|
148
|
+
return `<!--${m}:${s}-->`;
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Schedules DOM update work in the next async batch.
|
|
152
|
+
* @param callable - The callable function or object to queue.
|
|
153
|
+
*/
|
|
154
|
+
queueUpdate: N.enqueue,
|
|
155
|
+
/**
|
|
156
|
+
* Immediately processes all work previously scheduled
|
|
157
|
+
* through queueUpdate.
|
|
158
|
+
* @remarks
|
|
159
|
+
* This also forces nextUpdate promises
|
|
160
|
+
* to resolve.
|
|
161
|
+
*/
|
|
162
|
+
processUpdates: N.process,
|
|
163
|
+
/**
|
|
164
|
+
* Resolves with the next DOM update.
|
|
165
|
+
*/
|
|
166
|
+
nextUpdate() {
|
|
167
|
+
return new Promise(N.enqueue);
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Sets an attribute value on an element.
|
|
171
|
+
* @param element - The element to set the attribute value on.
|
|
172
|
+
* @param attributeName - The attribute name to set.
|
|
173
|
+
* @param value - The value of the attribute to set.
|
|
174
|
+
* @remarks
|
|
175
|
+
* If the value is `null` or `undefined`, the attribute is removed, otherwise
|
|
176
|
+
* it is set to the provided value using the standard `setAttribute` API.
|
|
177
|
+
*/
|
|
178
|
+
setAttribute(s, e, t) {
|
|
179
|
+
t == null ? s.removeAttribute(e) : s.setAttribute(e, t);
|
|
180
|
+
},
|
|
181
|
+
/**
|
|
182
|
+
* Sets a boolean attribute value.
|
|
183
|
+
* @param element - The element to set the boolean attribute value on.
|
|
184
|
+
* @param attributeName - The attribute name to set.
|
|
185
|
+
* @param value - The value of the attribute to set.
|
|
186
|
+
* @remarks
|
|
187
|
+
* If the value is true, the attribute is added; otherwise it is removed.
|
|
188
|
+
*/
|
|
189
|
+
setBooleanAttribute(s, e, t) {
|
|
190
|
+
t ? s.setAttribute(e, "") : s.removeAttribute(e);
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* Removes all the child nodes of the provided parent node.
|
|
194
|
+
* @param parent - The node to remove the children from.
|
|
195
|
+
*/
|
|
196
|
+
removeChildNodes(s) {
|
|
197
|
+
for (let e = s.firstChild; e !== null; e = s.firstChild)
|
|
198
|
+
s.removeChild(e);
|
|
199
|
+
},
|
|
200
|
+
/**
|
|
201
|
+
* Creates a TreeWalker configured to walk a template fragment.
|
|
202
|
+
* @param fragment - The fragment to walk.
|
|
203
|
+
*/
|
|
204
|
+
createTemplateWalker(s) {
|
|
205
|
+
return document.createTreeWalker(
|
|
206
|
+
s,
|
|
207
|
+
133,
|
|
208
|
+
// element, text, comment
|
|
209
|
+
null,
|
|
210
|
+
!1
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
class I {
|
|
215
|
+
/**
|
|
216
|
+
* Creates an instance of SubscriberSet for the specified source.
|
|
217
|
+
* @param source - The object source that subscribers will receive notifications from.
|
|
218
|
+
* @param initialSubscriber - An initial subscriber to changes.
|
|
219
|
+
*/
|
|
220
|
+
constructor(e, t) {
|
|
221
|
+
this.sub1 = void 0, this.sub2 = void 0, this.spillover = void 0, this.source = e, this.sub1 = t;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Checks whether the provided subscriber has been added to this set.
|
|
225
|
+
* @param subscriber - The subscriber to test for inclusion in this set.
|
|
226
|
+
*/
|
|
227
|
+
has(e) {
|
|
228
|
+
return this.spillover === void 0 ? this.sub1 === e || this.sub2 === e : this.spillover.indexOf(e) !== -1;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Subscribes to notification of changes in an object's state.
|
|
232
|
+
* @param subscriber - The object that is subscribing for change notification.
|
|
233
|
+
*/
|
|
234
|
+
subscribe(e) {
|
|
235
|
+
const t = this.spillover;
|
|
236
|
+
if (t === void 0) {
|
|
237
|
+
if (this.has(e))
|
|
238
|
+
return;
|
|
239
|
+
if (this.sub1 === void 0) {
|
|
240
|
+
this.sub1 = e;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (this.sub2 === void 0) {
|
|
244
|
+
this.sub2 = e;
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
this.spillover = [this.sub1, this.sub2, e], this.sub1 = void 0, this.sub2 = void 0;
|
|
248
|
+
} else
|
|
249
|
+
t.indexOf(e) === -1 && t.push(e);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Unsubscribes from notification of changes in an object's state.
|
|
253
|
+
* @param subscriber - The object that is unsubscribing from change notification.
|
|
254
|
+
*/
|
|
255
|
+
unsubscribe(e) {
|
|
256
|
+
const t = this.spillover;
|
|
257
|
+
if (t === void 0)
|
|
258
|
+
this.sub1 === e ? this.sub1 = void 0 : this.sub2 === e && (this.sub2 = void 0);
|
|
259
|
+
else {
|
|
260
|
+
const i = t.indexOf(e);
|
|
261
|
+
i !== -1 && t.splice(i, 1);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Notifies all subscribers.
|
|
266
|
+
* @param args - Data passed along to subscribers during notification.
|
|
267
|
+
*/
|
|
268
|
+
notify(e) {
|
|
269
|
+
const t = this.spillover, i = this.source;
|
|
270
|
+
if (t === void 0) {
|
|
271
|
+
const n = this.sub1, r = this.sub2;
|
|
272
|
+
n !== void 0 && n.handleChange(i, e), r !== void 0 && r.handleChange(i, e);
|
|
273
|
+
} else
|
|
274
|
+
for (let n = 0, r = t.length; n < r; ++n)
|
|
275
|
+
t[n].handleChange(i, e);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
class ie {
|
|
279
|
+
/**
|
|
280
|
+
* Creates an instance of PropertyChangeNotifier for the specified source.
|
|
281
|
+
* @param source - The object source that subscribers will receive notifications from.
|
|
282
|
+
*/
|
|
283
|
+
constructor(e) {
|
|
284
|
+
this.subscribers = {}, this.sourceSubscribers = null, this.source = e;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Notifies all subscribers, based on the specified property.
|
|
288
|
+
* @param propertyName - The property name, passed along to subscribers during notification.
|
|
289
|
+
*/
|
|
290
|
+
notify(e) {
|
|
291
|
+
var t;
|
|
292
|
+
const i = this.subscribers[e];
|
|
293
|
+
i !== void 0 && i.notify(e), (t = this.sourceSubscribers) === null || t === void 0 || t.notify(e);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Subscribes to notification of changes in an object's state.
|
|
297
|
+
* @param subscriber - The object that is subscribing for change notification.
|
|
298
|
+
* @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.
|
|
299
|
+
*/
|
|
300
|
+
subscribe(e, t) {
|
|
301
|
+
var i;
|
|
302
|
+
if (t) {
|
|
303
|
+
let n = this.subscribers[t];
|
|
304
|
+
n === void 0 && (this.subscribers[t] = n = new I(this.source)), n.subscribe(e);
|
|
305
|
+
} else
|
|
306
|
+
this.sourceSubscribers = (i = this.sourceSubscribers) !== null && i !== void 0 ? i : new I(this.source), this.sourceSubscribers.subscribe(e);
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Unsubscribes from notification of changes in an object's state.
|
|
310
|
+
* @param subscriber - The object that is unsubscribing from change notification.
|
|
311
|
+
* @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.
|
|
312
|
+
*/
|
|
313
|
+
unsubscribe(e, t) {
|
|
314
|
+
var i;
|
|
315
|
+
if (t) {
|
|
316
|
+
const n = this.subscribers[t];
|
|
317
|
+
n !== void 0 && n.unsubscribe(e);
|
|
318
|
+
} else
|
|
319
|
+
(i = this.sourceSubscribers) === null || i === void 0 || i.unsubscribe(e);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
const b = S.getById(2, () => {
|
|
323
|
+
const s = /(:|&&|\|\||if)/, e = /* @__PURE__ */ new WeakMap(), t = u.queueUpdate;
|
|
324
|
+
let i, n = (l) => {
|
|
325
|
+
throw new Error("Must call enableArrayObservation before observing arrays.");
|
|
326
|
+
};
|
|
327
|
+
function r(l) {
|
|
328
|
+
let h = l.$fastController || e.get(l);
|
|
329
|
+
return h === void 0 && (Array.isArray(l) ? h = n(l) : e.set(l, h = new ie(l))), h;
|
|
330
|
+
}
|
|
331
|
+
const o = _();
|
|
332
|
+
class a {
|
|
333
|
+
constructor(h) {
|
|
334
|
+
this.name = h, this.field = `_${h}`, this.callback = `${h}Changed`;
|
|
335
|
+
}
|
|
336
|
+
getValue(h) {
|
|
337
|
+
return i !== void 0 && i.watch(h, this.name), h[this.field];
|
|
338
|
+
}
|
|
339
|
+
setValue(h, d) {
|
|
340
|
+
const f = this.field, y = h[f];
|
|
341
|
+
if (y !== d) {
|
|
342
|
+
h[f] = d;
|
|
343
|
+
const p = h[this.callback];
|
|
344
|
+
typeof p == "function" && p.call(h, y, d), r(h).notify(this.name);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
class c extends I {
|
|
349
|
+
constructor(h, d, f = !1) {
|
|
350
|
+
super(h, d), this.binding = h, this.isVolatileBinding = f, this.needsRefresh = !0, this.needsQueue = !0, this.first = this, this.last = null, this.propertySource = void 0, this.propertyName = void 0, this.notifier = void 0, this.next = void 0;
|
|
351
|
+
}
|
|
352
|
+
observe(h, d) {
|
|
353
|
+
this.needsRefresh && this.last !== null && this.disconnect();
|
|
354
|
+
const f = i;
|
|
355
|
+
i = this.needsRefresh ? this : void 0, this.needsRefresh = this.isVolatileBinding;
|
|
356
|
+
const y = this.binding(h, d);
|
|
357
|
+
return i = f, y;
|
|
358
|
+
}
|
|
359
|
+
disconnect() {
|
|
360
|
+
if (this.last !== null) {
|
|
361
|
+
let h = this.first;
|
|
362
|
+
for (; h !== void 0; )
|
|
363
|
+
h.notifier.unsubscribe(this, h.propertyName), h = h.next;
|
|
364
|
+
this.last = null, this.needsRefresh = this.needsQueue = !0;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
watch(h, d) {
|
|
368
|
+
const f = this.last, y = r(h), p = f === null ? this.first : {};
|
|
369
|
+
if (p.propertySource = h, p.propertyName = d, p.notifier = y, y.subscribe(this, d), f !== null) {
|
|
370
|
+
if (!this.needsRefresh) {
|
|
371
|
+
let z;
|
|
372
|
+
i = void 0, z = f.propertySource[f.propertyName], i = this, h === z && (this.needsRefresh = !0);
|
|
373
|
+
}
|
|
374
|
+
f.next = p;
|
|
375
|
+
}
|
|
376
|
+
this.last = p;
|
|
377
|
+
}
|
|
378
|
+
handleChange() {
|
|
379
|
+
this.needsQueue && (this.needsQueue = !1, t(this));
|
|
380
|
+
}
|
|
381
|
+
call() {
|
|
382
|
+
this.last !== null && (this.needsQueue = !0, this.notify(this));
|
|
383
|
+
}
|
|
384
|
+
records() {
|
|
385
|
+
let h = this.first;
|
|
386
|
+
return {
|
|
387
|
+
next: () => {
|
|
388
|
+
const d = h;
|
|
389
|
+
return d === void 0 ? { value: void 0, done: !0 } : (h = h.next, {
|
|
390
|
+
value: d,
|
|
391
|
+
done: !1
|
|
392
|
+
});
|
|
393
|
+
},
|
|
394
|
+
[Symbol.iterator]: function() {
|
|
395
|
+
return this;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return Object.freeze({
|
|
401
|
+
/**
|
|
402
|
+
* @internal
|
|
403
|
+
* @param factory - The factory used to create array observers.
|
|
404
|
+
*/
|
|
405
|
+
setArrayObserverFactory(l) {
|
|
406
|
+
n = l;
|
|
407
|
+
},
|
|
408
|
+
/**
|
|
409
|
+
* Gets a notifier for an object or Array.
|
|
410
|
+
* @param source - The object or Array to get the notifier for.
|
|
411
|
+
*/
|
|
412
|
+
getNotifier: r,
|
|
413
|
+
/**
|
|
414
|
+
* Records a property change for a source object.
|
|
415
|
+
* @param source - The object to record the change against.
|
|
416
|
+
* @param propertyName - The property to track as changed.
|
|
417
|
+
*/
|
|
418
|
+
track(l, h) {
|
|
419
|
+
i !== void 0 && i.watch(l, h);
|
|
420
|
+
},
|
|
421
|
+
/**
|
|
422
|
+
* Notifies watchers that the currently executing property getter or function is volatile
|
|
423
|
+
* with respect to its observable dependencies.
|
|
424
|
+
*/
|
|
425
|
+
trackVolatile() {
|
|
426
|
+
i !== void 0 && (i.needsRefresh = !0);
|
|
427
|
+
},
|
|
428
|
+
/**
|
|
429
|
+
* Notifies subscribers of a source object of changes.
|
|
430
|
+
* @param source - the object to notify of changes.
|
|
431
|
+
* @param args - The change args to pass to subscribers.
|
|
432
|
+
*/
|
|
433
|
+
notify(l, h) {
|
|
434
|
+
r(l).notify(h);
|
|
435
|
+
},
|
|
436
|
+
/**
|
|
437
|
+
* Defines an observable property on an object or prototype.
|
|
438
|
+
* @param target - The target object to define the observable on.
|
|
439
|
+
* @param nameOrAccessor - The name of the property to define as observable;
|
|
440
|
+
* or a custom accessor that specifies the property name and accessor implementation.
|
|
441
|
+
*/
|
|
442
|
+
defineProperty(l, h) {
|
|
443
|
+
typeof h == "string" && (h = new a(h)), o(l).push(h), Reflect.defineProperty(l, h.name, {
|
|
444
|
+
enumerable: !0,
|
|
445
|
+
get: function() {
|
|
446
|
+
return h.getValue(this);
|
|
447
|
+
},
|
|
448
|
+
set: function(d) {
|
|
449
|
+
h.setValue(this, d);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
},
|
|
453
|
+
/**
|
|
454
|
+
* Finds all the observable accessors defined on the target,
|
|
455
|
+
* including its prototype chain.
|
|
456
|
+
* @param target - The target object to search for accessor on.
|
|
457
|
+
*/
|
|
458
|
+
getAccessors: o,
|
|
459
|
+
/**
|
|
460
|
+
* Creates a {@link BindingObserver} that can watch the
|
|
461
|
+
* provided {@link Binding} for changes.
|
|
462
|
+
* @param binding - The binding to observe.
|
|
463
|
+
* @param initialSubscriber - An initial subscriber to changes in the binding value.
|
|
464
|
+
* @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
|
|
465
|
+
*/
|
|
466
|
+
binding(l, h, d = this.isVolatileBinding(l)) {
|
|
467
|
+
return new c(l, h, d);
|
|
468
|
+
},
|
|
469
|
+
/**
|
|
470
|
+
* Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
|
|
471
|
+
* on every evaluation of the value.
|
|
472
|
+
* @param binding - The binding to inspect.
|
|
473
|
+
*/
|
|
474
|
+
isVolatileBinding(l) {
|
|
475
|
+
return s.test(l.toString());
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
});
|
|
479
|
+
function Ge(s, e) {
|
|
480
|
+
b.defineProperty(s, e);
|
|
481
|
+
}
|
|
482
|
+
function Je(s, e, t) {
|
|
483
|
+
return Object.assign({}, t, {
|
|
484
|
+
get: function() {
|
|
485
|
+
return b.trackVolatile(), t.get.apply(this);
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
const q = S.getById(3, () => {
|
|
490
|
+
let s = null;
|
|
491
|
+
return {
|
|
492
|
+
get() {
|
|
493
|
+
return s;
|
|
494
|
+
},
|
|
495
|
+
set(e) {
|
|
496
|
+
s = e;
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
});
|
|
500
|
+
class C {
|
|
501
|
+
constructor() {
|
|
502
|
+
this.index = 0, this.length = 0, this.parent = null, this.parentContext = null;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* The current event within an event handler.
|
|
506
|
+
*/
|
|
507
|
+
get event() {
|
|
508
|
+
return q.get();
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Indicates whether the current item within a repeat context
|
|
512
|
+
* has an even index.
|
|
513
|
+
*/
|
|
514
|
+
get isEven() {
|
|
515
|
+
return this.index % 2 === 0;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Indicates whether the current item within a repeat context
|
|
519
|
+
* has an odd index.
|
|
520
|
+
*/
|
|
521
|
+
get isOdd() {
|
|
522
|
+
return this.index % 2 !== 0;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Indicates whether the current item within a repeat context
|
|
526
|
+
* is the first item in the collection.
|
|
527
|
+
*/
|
|
528
|
+
get isFirst() {
|
|
529
|
+
return this.index === 0;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Indicates whether the current item within a repeat context
|
|
533
|
+
* is somewhere in the middle of the collection.
|
|
534
|
+
*/
|
|
535
|
+
get isInMiddle() {
|
|
536
|
+
return !this.isFirst && !this.isLast;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Indicates whether the current item within a repeat context
|
|
540
|
+
* is the last item in the collection.
|
|
541
|
+
*/
|
|
542
|
+
get isLast() {
|
|
543
|
+
return this.index === this.length - 1;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Sets the event for the current execution context.
|
|
547
|
+
* @param event - The event to set.
|
|
548
|
+
* @internal
|
|
549
|
+
*/
|
|
550
|
+
static setEvent(e) {
|
|
551
|
+
q.set(e);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
b.defineProperty(C.prototype, "index");
|
|
555
|
+
b.defineProperty(C.prototype, "length");
|
|
556
|
+
const w = Object.seal(new C());
|
|
557
|
+
class P {
|
|
558
|
+
constructor() {
|
|
559
|
+
this.targetIndex = 0;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
class ne extends P {
|
|
563
|
+
constructor() {
|
|
564
|
+
super(...arguments), this.createPlaceholder = u.createInterpolationPlaceholder;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
class Xe extends P {
|
|
568
|
+
/**
|
|
569
|
+
*
|
|
570
|
+
* @param name - The name of the behavior; used as a custom attribute on the element.
|
|
571
|
+
* @param behavior - The behavior to instantiate and attach to the element.
|
|
572
|
+
* @param options - Options to pass to the behavior during creation.
|
|
573
|
+
*/
|
|
574
|
+
constructor(e, t, i) {
|
|
575
|
+
super(), this.name = e, this.behavior = t, this.options = i;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Creates a placeholder string based on the directive's index within the template.
|
|
579
|
+
* @param index - The index of the directive within the template.
|
|
580
|
+
* @remarks
|
|
581
|
+
* Creates a custom attribute placeholder.
|
|
582
|
+
*/
|
|
583
|
+
createPlaceholder(e) {
|
|
584
|
+
return u.createCustomAttributePlaceholder(this.name, e);
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Creates a behavior for the provided target node.
|
|
588
|
+
* @param target - The node instance to create the behavior for.
|
|
589
|
+
* @remarks
|
|
590
|
+
* Creates an instance of the `behavior` type this directive was constructed with
|
|
591
|
+
* and passes the target and options to that `behavior`'s constructor.
|
|
592
|
+
*/
|
|
593
|
+
createBehavior(e) {
|
|
594
|
+
return new this.behavior(e, this.options);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
function be(s, e) {
|
|
598
|
+
this.source = s, this.context = e, this.bindingObserver === null && (this.bindingObserver = b.binding(this.binding, this, this.isBindingVolatile)), this.updateTarget(this.bindingObserver.observe(s, e));
|
|
599
|
+
}
|
|
600
|
+
function pe(s, e) {
|
|
601
|
+
this.source = s, this.context = e, this.target.addEventListener(this.targetName, this);
|
|
602
|
+
}
|
|
603
|
+
function ge() {
|
|
604
|
+
this.bindingObserver.disconnect(), this.source = null, this.context = null;
|
|
605
|
+
}
|
|
606
|
+
function ve() {
|
|
607
|
+
this.bindingObserver.disconnect(), this.source = null, this.context = null;
|
|
608
|
+
const s = this.target.$fastView;
|
|
609
|
+
s !== void 0 && s.isComposed && (s.unbind(), s.needsBindOnly = !0);
|
|
610
|
+
}
|
|
611
|
+
function ye() {
|
|
612
|
+
this.target.removeEventListener(this.targetName, this), this.source = null, this.context = null;
|
|
613
|
+
}
|
|
614
|
+
function me(s) {
|
|
615
|
+
u.setAttribute(this.target, this.targetName, s);
|
|
616
|
+
}
|
|
617
|
+
function Se(s) {
|
|
618
|
+
u.setBooleanAttribute(this.target, this.targetName, s);
|
|
619
|
+
}
|
|
620
|
+
function Ce(s) {
|
|
621
|
+
if (s == null && (s = ""), s.create) {
|
|
622
|
+
this.target.textContent = "";
|
|
623
|
+
let e = this.target.$fastView;
|
|
624
|
+
e === void 0 ? e = s.create() : this.target.$fastTemplate !== s && (e.isComposed && (e.remove(), e.unbind()), e = s.create()), e.isComposed ? e.needsBindOnly && (e.needsBindOnly = !1, e.bind(this.source, this.context)) : (e.isComposed = !0, e.bind(this.source, this.context), e.insertBefore(this.target), this.target.$fastView = e, this.target.$fastTemplate = s);
|
|
625
|
+
} else {
|
|
626
|
+
const e = this.target.$fastView;
|
|
627
|
+
e !== void 0 && e.isComposed && (e.isComposed = !1, e.remove(), e.needsBindOnly ? e.needsBindOnly = !1 : e.unbind()), this.target.textContent = s;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
function we(s) {
|
|
631
|
+
this.target[this.targetName] = s;
|
|
632
|
+
}
|
|
633
|
+
function xe(s) {
|
|
634
|
+
const e = this.classVersions || /* @__PURE__ */ Object.create(null), t = this.target;
|
|
635
|
+
let i = this.version || 0;
|
|
636
|
+
if (s != null && s.length) {
|
|
637
|
+
const n = s.split(/\s+/);
|
|
638
|
+
for (let r = 0, o = n.length; r < o; ++r) {
|
|
639
|
+
const a = n[r];
|
|
640
|
+
a !== "" && (e[a] = i, t.classList.add(a));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
if (this.classVersions = e, this.version = i + 1, i !== 0) {
|
|
644
|
+
i -= 1;
|
|
645
|
+
for (const n in e)
|
|
646
|
+
e[n] === i && t.classList.remove(n);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
class L extends ne {
|
|
650
|
+
/**
|
|
651
|
+
* Creates an instance of BindingDirective.
|
|
652
|
+
* @param binding - A binding that returns the data used to update the DOM.
|
|
653
|
+
*/
|
|
654
|
+
constructor(e) {
|
|
655
|
+
super(), this.binding = e, this.bind = be, this.unbind = ge, this.updateTarget = me, this.isBindingVolatile = b.isVolatileBinding(this.binding);
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Gets/sets the name of the attribute or property that this
|
|
659
|
+
* binding is targeting.
|
|
660
|
+
*/
|
|
661
|
+
get targetName() {
|
|
662
|
+
return this.originalTargetName;
|
|
663
|
+
}
|
|
664
|
+
set targetName(e) {
|
|
665
|
+
if (this.originalTargetName = e, e !== void 0)
|
|
666
|
+
switch (e[0]) {
|
|
667
|
+
case ":":
|
|
668
|
+
if (this.cleanedTargetName = e.substr(1), this.updateTarget = we, this.cleanedTargetName === "innerHTML") {
|
|
669
|
+
const t = this.binding;
|
|
670
|
+
this.binding = (i, n) => u.createHTML(t(i, n));
|
|
671
|
+
}
|
|
672
|
+
break;
|
|
673
|
+
case "?":
|
|
674
|
+
this.cleanedTargetName = e.substr(1), this.updateTarget = Se;
|
|
675
|
+
break;
|
|
676
|
+
case "@":
|
|
677
|
+
this.cleanedTargetName = e.substr(1), this.bind = pe, this.unbind = ye;
|
|
678
|
+
break;
|
|
679
|
+
default:
|
|
680
|
+
this.cleanedTargetName = e, e === "class" && (this.updateTarget = xe);
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Makes this binding target the content of an element rather than
|
|
686
|
+
* a particular attribute or property.
|
|
687
|
+
*/
|
|
688
|
+
targetAtContent() {
|
|
689
|
+
this.updateTarget = Ce, this.unbind = ve;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Creates the runtime BindingBehavior instance based on the configuration
|
|
693
|
+
* information stored in the BindingDirective.
|
|
694
|
+
* @param target - The target node that the binding behavior should attach to.
|
|
695
|
+
*/
|
|
696
|
+
createBehavior(e) {
|
|
697
|
+
return new Te(e, this.binding, this.isBindingVolatile, this.bind, this.unbind, this.updateTarget, this.cleanedTargetName);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
class Te {
|
|
701
|
+
/**
|
|
702
|
+
* Creates an instance of BindingBehavior.
|
|
703
|
+
* @param target - The target of the data updates.
|
|
704
|
+
* @param binding - The binding that returns the latest value for an update.
|
|
705
|
+
* @param isBindingVolatile - Indicates whether the binding has volatile dependencies.
|
|
706
|
+
* @param bind - The operation to perform during binding.
|
|
707
|
+
* @param unbind - The operation to perform during unbinding.
|
|
708
|
+
* @param updateTarget - The operation to perform when updating.
|
|
709
|
+
* @param targetName - The name of the target attribute or property to update.
|
|
710
|
+
*/
|
|
711
|
+
constructor(e, t, i, n, r, o, a) {
|
|
712
|
+
this.source = null, this.context = null, this.bindingObserver = null, this.target = e, this.binding = t, this.isBindingVolatile = i, this.bind = n, this.unbind = r, this.updateTarget = o, this.targetName = a;
|
|
713
|
+
}
|
|
714
|
+
/** @internal */
|
|
715
|
+
handleChange() {
|
|
716
|
+
this.updateTarget(this.bindingObserver.observe(this.source, this.context));
|
|
717
|
+
}
|
|
718
|
+
/** @internal */
|
|
719
|
+
handleEvent(e) {
|
|
720
|
+
C.setEvent(e);
|
|
721
|
+
const t = this.binding(this.source, this.context);
|
|
722
|
+
C.setEvent(null), t !== !0 && e.preventDefault();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
let F = null;
|
|
726
|
+
class j {
|
|
727
|
+
addFactory(e) {
|
|
728
|
+
e.targetIndex = this.targetIndex, this.behaviorFactories.push(e);
|
|
729
|
+
}
|
|
730
|
+
captureContentBinding(e) {
|
|
731
|
+
e.targetAtContent(), this.addFactory(e);
|
|
732
|
+
}
|
|
733
|
+
reset() {
|
|
734
|
+
this.behaviorFactories = [], this.targetIndex = -1;
|
|
735
|
+
}
|
|
736
|
+
release() {
|
|
737
|
+
F = this;
|
|
738
|
+
}
|
|
739
|
+
static borrow(e) {
|
|
740
|
+
const t = F || new j();
|
|
741
|
+
return t.directives = e, t.reset(), F = null, t;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
function Ae(s) {
|
|
745
|
+
if (s.length === 1)
|
|
746
|
+
return s[0];
|
|
747
|
+
let e;
|
|
748
|
+
const t = s.length, i = s.map((o) => typeof o == "string" ? () => o : (e = o.targetName || e, o.binding)), n = (o, a) => {
|
|
749
|
+
let c = "";
|
|
750
|
+
for (let l = 0; l < t; ++l)
|
|
751
|
+
c += i[l](o, a);
|
|
752
|
+
return c;
|
|
753
|
+
}, r = new L(n);
|
|
754
|
+
return r.targetName = e, r;
|
|
755
|
+
}
|
|
756
|
+
const Be = R.length;
|
|
757
|
+
function re(s, e) {
|
|
758
|
+
const t = e.split(se);
|
|
759
|
+
if (t.length === 1)
|
|
760
|
+
return null;
|
|
761
|
+
const i = [];
|
|
762
|
+
for (let n = 0, r = t.length; n < r; ++n) {
|
|
763
|
+
const o = t[n], a = o.indexOf(R);
|
|
764
|
+
let c;
|
|
765
|
+
if (a === -1)
|
|
766
|
+
c = o;
|
|
767
|
+
else {
|
|
768
|
+
const l = parseInt(o.substring(0, a));
|
|
769
|
+
i.push(s.directives[l]), c = o.substring(a + Be);
|
|
770
|
+
}
|
|
771
|
+
c !== "" && i.push(c);
|
|
772
|
+
}
|
|
773
|
+
return i;
|
|
774
|
+
}
|
|
775
|
+
function U(s, e, t = !1) {
|
|
776
|
+
const i = e.attributes;
|
|
777
|
+
for (let n = 0, r = i.length; n < r; ++n) {
|
|
778
|
+
const o = i[n], a = o.value, c = re(s, a);
|
|
779
|
+
let l = null;
|
|
780
|
+
c === null ? t && (l = new L(() => a), l.targetName = o.name) : l = Ae(c), l !== null && (e.removeAttributeNode(o), n--, r--, s.addFactory(l));
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
function Ne(s, e, t) {
|
|
784
|
+
const i = re(s, e.textContent);
|
|
785
|
+
if (i !== null) {
|
|
786
|
+
let n = e;
|
|
787
|
+
for (let r = 0, o = i.length; r < o; ++r) {
|
|
788
|
+
const a = i[r], c = r === 0 ? e : n.parentNode.insertBefore(document.createTextNode(""), n.nextSibling);
|
|
789
|
+
typeof a == "string" ? c.textContent = a : (c.textContent = " ", s.captureContentBinding(a)), n = c, s.targetIndex++, c !== e && t.nextNode();
|
|
790
|
+
}
|
|
791
|
+
s.targetIndex--;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
function ke(s, e) {
|
|
795
|
+
const t = s.content;
|
|
796
|
+
document.adoptNode(t);
|
|
797
|
+
const i = j.borrow(e);
|
|
798
|
+
U(i, s, !0);
|
|
799
|
+
const n = i.behaviorFactories;
|
|
800
|
+
i.reset();
|
|
801
|
+
const r = u.createTemplateWalker(t);
|
|
802
|
+
let o;
|
|
803
|
+
for (; o = r.nextNode(); )
|
|
804
|
+
switch (i.targetIndex++, o.nodeType) {
|
|
805
|
+
case 1:
|
|
806
|
+
U(i, o);
|
|
807
|
+
break;
|
|
808
|
+
case 3:
|
|
809
|
+
Ne(i, o, r);
|
|
810
|
+
break;
|
|
811
|
+
case 8:
|
|
812
|
+
u.isMarker(o) && i.addFactory(e[u.extractDirectiveIndexFromMarker(o)]);
|
|
813
|
+
}
|
|
814
|
+
let a = 0;
|
|
815
|
+
// If the first node in a fragment is a marker, that means it's an unstable first node,
|
|
816
|
+
// because something like a when, repeat, etc. could add nodes before the marker.
|
|
817
|
+
// To mitigate this, we insert a stable first node. However, if we insert a node,
|
|
818
|
+
// that will alter the result of the TreeWalker. So, we also need to offset the target index.
|
|
819
|
+
(u.isMarker(t.firstChild) || // Or if there is only one node and a directive, it means the template's content
|
|
820
|
+
// is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by
|
|
821
|
+
// the directive. Inserting a new node ensures proper disposal of nodes added by the directive.
|
|
822
|
+
t.childNodes.length === 1 && e.length) && (t.insertBefore(document.createComment(""), t.firstChild), a = -1);
|
|
823
|
+
const c = i.behaviorFactories;
|
|
824
|
+
return i.release(), {
|
|
825
|
+
fragment: t,
|
|
826
|
+
viewBehaviorFactories: c,
|
|
827
|
+
hostBehaviorFactories: n,
|
|
828
|
+
targetOffset: a
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
const O = document.createRange();
|
|
832
|
+
class Fe {
|
|
833
|
+
/**
|
|
834
|
+
* Constructs an instance of HTMLView.
|
|
835
|
+
* @param fragment - The html fragment that contains the nodes for this view.
|
|
836
|
+
* @param behaviors - The behaviors to be applied to this view.
|
|
837
|
+
*/
|
|
838
|
+
constructor(e, t) {
|
|
839
|
+
this.fragment = e, this.behaviors = t, this.source = null, this.context = null, this.firstChild = e.firstChild, this.lastChild = e.lastChild;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Appends the view's DOM nodes to the referenced node.
|
|
843
|
+
* @param node - The parent node to append the view's DOM nodes to.
|
|
844
|
+
*/
|
|
845
|
+
appendTo(e) {
|
|
846
|
+
e.appendChild(this.fragment);
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Inserts the view's DOM nodes before the referenced node.
|
|
850
|
+
* @param node - The node to insert the view's DOM before.
|
|
851
|
+
*/
|
|
852
|
+
insertBefore(e) {
|
|
853
|
+
if (this.fragment.hasChildNodes())
|
|
854
|
+
e.parentNode.insertBefore(this.fragment, e);
|
|
855
|
+
else {
|
|
856
|
+
const t = this.lastChild;
|
|
857
|
+
if (e.previousSibling === t)
|
|
858
|
+
return;
|
|
859
|
+
const i = e.parentNode;
|
|
860
|
+
let n = this.firstChild, r;
|
|
861
|
+
for (; n !== t; )
|
|
862
|
+
r = n.nextSibling, i.insertBefore(n, e), n = r;
|
|
863
|
+
i.insertBefore(t, e);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* Removes the view's DOM nodes.
|
|
868
|
+
* The nodes are not disposed and the view can later be re-inserted.
|
|
869
|
+
*/
|
|
870
|
+
remove() {
|
|
871
|
+
const e = this.fragment, t = this.lastChild;
|
|
872
|
+
let i = this.firstChild, n;
|
|
873
|
+
for (; i !== t; )
|
|
874
|
+
n = i.nextSibling, e.appendChild(i), i = n;
|
|
875
|
+
e.appendChild(t);
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.
|
|
879
|
+
* Once a view has been disposed, it cannot be inserted or bound again.
|
|
880
|
+
*/
|
|
881
|
+
dispose() {
|
|
882
|
+
const e = this.firstChild.parentNode, t = this.lastChild;
|
|
883
|
+
let i = this.firstChild, n;
|
|
884
|
+
for (; i !== t; )
|
|
885
|
+
n = i.nextSibling, e.removeChild(i), i = n;
|
|
886
|
+
e.removeChild(t);
|
|
887
|
+
const r = this.behaviors, o = this.source;
|
|
888
|
+
for (let a = 0, c = r.length; a < c; ++a)
|
|
889
|
+
r[a].unbind(o);
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* Binds a view's behaviors to its binding source.
|
|
893
|
+
* @param source - The binding source for the view's binding behaviors.
|
|
894
|
+
* @param context - The execution context to run the behaviors within.
|
|
895
|
+
*/
|
|
896
|
+
bind(e, t) {
|
|
897
|
+
const i = this.behaviors;
|
|
898
|
+
if (this.source !== e)
|
|
899
|
+
if (this.source !== null) {
|
|
900
|
+
const n = this.source;
|
|
901
|
+
this.source = e, this.context = t;
|
|
902
|
+
for (let r = 0, o = i.length; r < o; ++r) {
|
|
903
|
+
const a = i[r];
|
|
904
|
+
a.unbind(n), a.bind(e, t);
|
|
905
|
+
}
|
|
906
|
+
} else {
|
|
907
|
+
this.source = e, this.context = t;
|
|
908
|
+
for (let n = 0, r = i.length; n < r; ++n)
|
|
909
|
+
i[n].bind(e, t);
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Unbinds a view's behaviors from its binding source.
|
|
914
|
+
*/
|
|
915
|
+
unbind() {
|
|
916
|
+
if (this.source === null)
|
|
917
|
+
return;
|
|
918
|
+
const e = this.behaviors, t = this.source;
|
|
919
|
+
for (let i = 0, n = e.length; i < n; ++i)
|
|
920
|
+
e[i].unbind(t);
|
|
921
|
+
this.source = null;
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* Efficiently disposes of a contiguous range of synthetic view instances.
|
|
925
|
+
* @param views - A contiguous range of views to be disposed.
|
|
926
|
+
*/
|
|
927
|
+
static disposeContiguousBatch(e) {
|
|
928
|
+
if (e.length !== 0) {
|
|
929
|
+
O.setStartBefore(e[0].firstChild), O.setEndAfter(e[e.length - 1].lastChild), O.deleteContents();
|
|
930
|
+
for (let t = 0, i = e.length; t < i; ++t) {
|
|
931
|
+
const n = e[t], r = n.behaviors, o = n.source;
|
|
932
|
+
for (let a = 0, c = r.length; a < c; ++a)
|
|
933
|
+
r[a].unbind(o);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
class W {
|
|
939
|
+
/**
|
|
940
|
+
* Creates an instance of ViewTemplate.
|
|
941
|
+
* @param html - The html representing what this template will instantiate, including placeholders for directives.
|
|
942
|
+
* @param directives - The directives that will be connected to placeholders in the html.
|
|
943
|
+
*/
|
|
944
|
+
constructor(e, t) {
|
|
945
|
+
this.behaviorCount = 0, this.hasHostBehaviors = !1, this.fragment = null, this.targetOffset = 0, this.viewBehaviorFactories = null, this.hostBehaviorFactories = null, this.html = e, this.directives = t;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Creates an HTMLView instance based on this template definition.
|
|
949
|
+
* @param hostBindingTarget - The element that host behaviors will be bound to.
|
|
950
|
+
*/
|
|
951
|
+
create(e) {
|
|
952
|
+
if (this.fragment === null) {
|
|
953
|
+
let l;
|
|
954
|
+
const h = this.html;
|
|
955
|
+
if (typeof h == "string") {
|
|
956
|
+
l = document.createElement("template"), l.innerHTML = u.createHTML(h);
|
|
957
|
+
const f = l.content.firstElementChild;
|
|
958
|
+
f !== null && f.tagName === "TEMPLATE" && (l = f);
|
|
959
|
+
} else
|
|
960
|
+
l = h;
|
|
961
|
+
const d = ke(l, this.directives);
|
|
962
|
+
this.fragment = d.fragment, this.viewBehaviorFactories = d.viewBehaviorFactories, this.hostBehaviorFactories = d.hostBehaviorFactories, this.targetOffset = d.targetOffset, this.behaviorCount = this.viewBehaviorFactories.length + this.hostBehaviorFactories.length, this.hasHostBehaviors = this.hostBehaviorFactories.length > 0;
|
|
963
|
+
}
|
|
964
|
+
const t = this.fragment.cloneNode(!0), i = this.viewBehaviorFactories, n = new Array(this.behaviorCount), r = u.createTemplateWalker(t);
|
|
965
|
+
let o = 0, a = this.targetOffset, c = r.nextNode();
|
|
966
|
+
for (let l = i.length; o < l; ++o) {
|
|
967
|
+
const h = i[o], d = h.targetIndex;
|
|
968
|
+
for (; c !== null; )
|
|
969
|
+
if (a === d) {
|
|
970
|
+
n[o] = h.createBehavior(c);
|
|
971
|
+
break;
|
|
972
|
+
} else
|
|
973
|
+
c = r.nextNode(), a++;
|
|
974
|
+
}
|
|
975
|
+
if (this.hasHostBehaviors) {
|
|
976
|
+
const l = this.hostBehaviorFactories;
|
|
977
|
+
for (let h = 0, d = l.length; h < d; ++h, ++o)
|
|
978
|
+
n[o] = l[h].createBehavior(e);
|
|
979
|
+
}
|
|
980
|
+
return new Fe(t, n);
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Creates an HTMLView from this template, binds it to the source, and then appends it to the host.
|
|
984
|
+
* @param source - The data source to bind the template to.
|
|
985
|
+
* @param host - The Element where the template will be rendered.
|
|
986
|
+
* @param hostBindingTarget - An HTML element to target the host bindings at if different from the
|
|
987
|
+
* host that the template is being attached to.
|
|
988
|
+
*/
|
|
989
|
+
render(e, t, i) {
|
|
990
|
+
typeof t == "string" && (t = document.getElementById(t)), i === void 0 && (i = t);
|
|
991
|
+
const n = this.create(i);
|
|
992
|
+
return n.bind(e, w), n.appendTo(t), n;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
const Oe = (
|
|
996
|
+
/* eslint-disable-next-line no-control-regex */
|
|
997
|
+
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/
|
|
998
|
+
);
|
|
999
|
+
function Ye(s, ...e) {
|
|
1000
|
+
const t = [];
|
|
1001
|
+
let i = "";
|
|
1002
|
+
for (let n = 0, r = s.length - 1; n < r; ++n) {
|
|
1003
|
+
const o = s[n];
|
|
1004
|
+
let a = e[n];
|
|
1005
|
+
if (i += o, a instanceof W) {
|
|
1006
|
+
const c = a;
|
|
1007
|
+
a = () => c;
|
|
1008
|
+
}
|
|
1009
|
+
if (typeof a == "function" && (a = new L(a)), a instanceof ne) {
|
|
1010
|
+
const c = Oe.exec(o);
|
|
1011
|
+
c !== null && (a.targetName = c[2]);
|
|
1012
|
+
}
|
|
1013
|
+
a instanceof P ? (i += a.createPlaceholder(t.length), t.push(a)) : i += a;
|
|
1014
|
+
}
|
|
1015
|
+
return i += s[s.length - 1], new W(i, t);
|
|
1016
|
+
}
|
|
1017
|
+
class g {
|
|
1018
|
+
constructor() {
|
|
1019
|
+
this.targets = /* @__PURE__ */ new WeakSet();
|
|
1020
|
+
}
|
|
1021
|
+
/** @internal */
|
|
1022
|
+
addStylesTo(e) {
|
|
1023
|
+
this.targets.add(e);
|
|
1024
|
+
}
|
|
1025
|
+
/** @internal */
|
|
1026
|
+
removeStylesFrom(e) {
|
|
1027
|
+
this.targets.delete(e);
|
|
1028
|
+
}
|
|
1029
|
+
/** @internal */
|
|
1030
|
+
isAttachedTo(e) {
|
|
1031
|
+
return this.targets.has(e);
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Associates behaviors with this set of styles.
|
|
1035
|
+
* @param behaviors - The behaviors to associate.
|
|
1036
|
+
*/
|
|
1037
|
+
withBehaviors(...e) {
|
|
1038
|
+
return this.behaviors = this.behaviors === null ? e : this.behaviors.concat(e), this;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
g.create = (() => {
|
|
1042
|
+
if (u.supportsAdoptedStyleSheets) {
|
|
1043
|
+
const s = /* @__PURE__ */ new Map();
|
|
1044
|
+
return (e) => (
|
|
1045
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
1046
|
+
new Me(e, s)
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
return (s) => new Ve(s);
|
|
1050
|
+
})();
|
|
1051
|
+
function H(s) {
|
|
1052
|
+
return s.map((e) => e instanceof g ? H(e.styles) : [e]).reduce((e, t) => e.concat(t), []);
|
|
1053
|
+
}
|
|
1054
|
+
function oe(s) {
|
|
1055
|
+
return s.map((e) => e instanceof g ? e.behaviors : null).reduce((e, t) => t === null ? e : (e === null && (e = []), e.concat(t)), null);
|
|
1056
|
+
}
|
|
1057
|
+
const Ee = Symbol("prependToAdoptedStyleSheets");
|
|
1058
|
+
function ae(s) {
|
|
1059
|
+
const e = [], t = [];
|
|
1060
|
+
return s.forEach((i) => (i[Ee] ? e : t).push(i)), { prepend: e, append: t };
|
|
1061
|
+
}
|
|
1062
|
+
let le = (s, e) => {
|
|
1063
|
+
const { prepend: t, append: i } = ae(e);
|
|
1064
|
+
s.adoptedStyleSheets = [...t, ...s.adoptedStyleSheets, ...i];
|
|
1065
|
+
}, he = (s, e) => {
|
|
1066
|
+
s.adoptedStyleSheets = s.adoptedStyleSheets.filter((t) => e.indexOf(t) === -1);
|
|
1067
|
+
};
|
|
1068
|
+
if (u.supportsAdoptedStyleSheets)
|
|
1069
|
+
try {
|
|
1070
|
+
document.adoptedStyleSheets.push(), document.adoptedStyleSheets.splice(), le = (s, e) => {
|
|
1071
|
+
const { prepend: t, append: i } = ae(e);
|
|
1072
|
+
s.adoptedStyleSheets.splice(0, 0, ...t), s.adoptedStyleSheets.push(...i);
|
|
1073
|
+
}, he = (s, e) => {
|
|
1074
|
+
for (const t of e) {
|
|
1075
|
+
const i = s.adoptedStyleSheets.indexOf(t);
|
|
1076
|
+
i !== -1 && s.adoptedStyleSheets.splice(i, 1);
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
} catch {
|
|
1080
|
+
}
|
|
1081
|
+
class Me extends g {
|
|
1082
|
+
constructor(e, t) {
|
|
1083
|
+
super(), this.styles = e, this.styleSheetCache = t, this._styleSheets = void 0, this.behaviors = oe(e);
|
|
1084
|
+
}
|
|
1085
|
+
get styleSheets() {
|
|
1086
|
+
if (this._styleSheets === void 0) {
|
|
1087
|
+
const e = this.styles, t = this.styleSheetCache;
|
|
1088
|
+
this._styleSheets = H(e).map((i) => {
|
|
1089
|
+
if (i instanceof CSSStyleSheet)
|
|
1090
|
+
return i;
|
|
1091
|
+
let n = t.get(i);
|
|
1092
|
+
return n === void 0 && (n = new CSSStyleSheet(), n.replaceSync(i), t.set(i, n)), n;
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
return this._styleSheets;
|
|
1096
|
+
}
|
|
1097
|
+
addStylesTo(e) {
|
|
1098
|
+
le(e, this.styleSheets), super.addStylesTo(e);
|
|
1099
|
+
}
|
|
1100
|
+
removeStylesFrom(e) {
|
|
1101
|
+
he(e, this.styleSheets), super.removeStylesFrom(e);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
let Ie = 0;
|
|
1105
|
+
function $e() {
|
|
1106
|
+
return `fast-style-class-${++Ie}`;
|
|
1107
|
+
}
|
|
1108
|
+
class Ve extends g {
|
|
1109
|
+
constructor(e) {
|
|
1110
|
+
super(), this.styles = e, this.behaviors = null, this.behaviors = oe(e), this.styleSheets = H(e), this.styleClass = $e();
|
|
1111
|
+
}
|
|
1112
|
+
addStylesTo(e) {
|
|
1113
|
+
const t = this.styleSheets, i = this.styleClass;
|
|
1114
|
+
e = this.normalizeTarget(e);
|
|
1115
|
+
for (let n = 0; n < t.length; n++) {
|
|
1116
|
+
const r = document.createElement("style");
|
|
1117
|
+
r.innerHTML = t[n], r.className = i, e.append(r);
|
|
1118
|
+
}
|
|
1119
|
+
super.addStylesTo(e);
|
|
1120
|
+
}
|
|
1121
|
+
removeStylesFrom(e) {
|
|
1122
|
+
e = this.normalizeTarget(e);
|
|
1123
|
+
const t = e.querySelectorAll(`.${this.styleClass}`);
|
|
1124
|
+
for (let i = 0, n = t.length; i < n; ++i)
|
|
1125
|
+
e.removeChild(t[i]);
|
|
1126
|
+
super.removeStylesFrom(e);
|
|
1127
|
+
}
|
|
1128
|
+
isAttachedTo(e) {
|
|
1129
|
+
return super.isAttachedTo(this.normalizeTarget(e));
|
|
1130
|
+
}
|
|
1131
|
+
normalizeTarget(e) {
|
|
1132
|
+
return e === document ? document.body : e;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
const ce = Object.freeze({
|
|
1136
|
+
/**
|
|
1137
|
+
* Locates all attribute configurations associated with a type.
|
|
1138
|
+
*/
|
|
1139
|
+
locate: _()
|
|
1140
|
+
}), _e = {
|
|
1141
|
+
toView(s) {
|
|
1142
|
+
return s ? "true" : "false";
|
|
1143
|
+
},
|
|
1144
|
+
fromView(s) {
|
|
1145
|
+
return !(s == null || s === "false" || s === !1 || s === 0);
|
|
1146
|
+
}
|
|
1147
|
+
}, Ze = {
|
|
1148
|
+
toView(s) {
|
|
1149
|
+
if (s == null)
|
|
1150
|
+
return null;
|
|
1151
|
+
const e = s * 1;
|
|
1152
|
+
return isNaN(e) ? null : e.toString();
|
|
1153
|
+
},
|
|
1154
|
+
fromView(s) {
|
|
1155
|
+
if (s == null)
|
|
1156
|
+
return null;
|
|
1157
|
+
const e = s * 1;
|
|
1158
|
+
return isNaN(e) ? null : e;
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
class x {
|
|
1162
|
+
/**
|
|
1163
|
+
* Creates an instance of AttributeDefinition.
|
|
1164
|
+
* @param Owner - The class constructor that owns this attribute.
|
|
1165
|
+
* @param name - The name of the property associated with the attribute.
|
|
1166
|
+
* @param attribute - The name of the attribute in HTML.
|
|
1167
|
+
* @param mode - The {@link AttributeMode} that describes the behavior of this attribute.
|
|
1168
|
+
* @param converter - A {@link ValueConverter} that integrates with the property getter/setter
|
|
1169
|
+
* to convert values to and from a DOM string.
|
|
1170
|
+
*/
|
|
1171
|
+
constructor(e, t, i = t.toLowerCase(), n = "reflect", r) {
|
|
1172
|
+
this.guards = /* @__PURE__ */ new Set(), this.Owner = e, this.name = t, this.attribute = i, this.mode = n, this.converter = r, this.fieldName = `_${t}`, this.callbackName = `${t}Changed`, this.hasCallback = this.callbackName in e.prototype, n === "boolean" && r === void 0 && (this.converter = _e);
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* Sets the value of the attribute/property on the source element.
|
|
1176
|
+
* @param source - The source element to access.
|
|
1177
|
+
* @param value - The value to set the attribute/property to.
|
|
1178
|
+
*/
|
|
1179
|
+
setValue(e, t) {
|
|
1180
|
+
const i = e[this.fieldName], n = this.converter;
|
|
1181
|
+
n !== void 0 && (t = n.fromView(t)), i !== t && (e[this.fieldName] = t, this.tryReflectToAttribute(e), this.hasCallback && e[this.callbackName](i, t), e.$fastController.notify(this.name));
|
|
1182
|
+
}
|
|
1183
|
+
/**
|
|
1184
|
+
* Gets the value of the attribute/property on the source element.
|
|
1185
|
+
* @param source - The source element to access.
|
|
1186
|
+
*/
|
|
1187
|
+
getValue(e) {
|
|
1188
|
+
return b.track(e, this.name), e[this.fieldName];
|
|
1189
|
+
}
|
|
1190
|
+
/** @internal */
|
|
1191
|
+
onAttributeChangedCallback(e, t) {
|
|
1192
|
+
this.guards.has(e) || (this.guards.add(e), this.setValue(e, t), this.guards.delete(e));
|
|
1193
|
+
}
|
|
1194
|
+
tryReflectToAttribute(e) {
|
|
1195
|
+
const t = this.mode, i = this.guards;
|
|
1196
|
+
i.has(e) || t === "fromView" || u.queueUpdate(() => {
|
|
1197
|
+
i.add(e);
|
|
1198
|
+
const n = e[this.fieldName];
|
|
1199
|
+
switch (t) {
|
|
1200
|
+
case "reflect":
|
|
1201
|
+
const r = this.converter;
|
|
1202
|
+
u.setAttribute(e, this.attribute, r !== void 0 ? r.toView(n) : n);
|
|
1203
|
+
break;
|
|
1204
|
+
case "boolean":
|
|
1205
|
+
u.setBooleanAttribute(e, this.attribute, n);
|
|
1206
|
+
break;
|
|
1207
|
+
}
|
|
1208
|
+
i.delete(e);
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Collects all attribute definitions associated with the owner.
|
|
1213
|
+
* @param Owner - The class constructor to collect attribute for.
|
|
1214
|
+
* @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.
|
|
1215
|
+
* @internal
|
|
1216
|
+
*/
|
|
1217
|
+
static collect(e, ...t) {
|
|
1218
|
+
const i = [];
|
|
1219
|
+
t.push(ce.locate(e));
|
|
1220
|
+
for (let n = 0, r = t.length; n < r; ++n) {
|
|
1221
|
+
const o = t[n];
|
|
1222
|
+
if (o !== void 0)
|
|
1223
|
+
for (let a = 0, c = o.length; a < c; ++a) {
|
|
1224
|
+
const l = o[a];
|
|
1225
|
+
typeof l == "string" ? i.push(new x(e, l)) : i.push(new x(e, l.property, l.attribute, l.mode, l.converter));
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
return i;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
function Re(s, e) {
|
|
1232
|
+
let t;
|
|
1233
|
+
function i(n, r) {
|
|
1234
|
+
arguments.length > 1 && (t.property = r), ce.locate(n.constructor).push(t);
|
|
1235
|
+
}
|
|
1236
|
+
if (arguments.length > 1) {
|
|
1237
|
+
t = {}, i(s, e);
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
return t = s === void 0 ? {} : s, i;
|
|
1241
|
+
}
|
|
1242
|
+
const Q = { mode: "open" }, K = {}, $ = S.getById(4, () => {
|
|
1243
|
+
const s = /* @__PURE__ */ new Map();
|
|
1244
|
+
return Object.freeze({
|
|
1245
|
+
register(e) {
|
|
1246
|
+
return s.has(e.type) ? !1 : (s.set(e.type, e), !0);
|
|
1247
|
+
},
|
|
1248
|
+
getByType(e) {
|
|
1249
|
+
return s.get(e);
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
});
|
|
1253
|
+
class B {
|
|
1254
|
+
/**
|
|
1255
|
+
* Creates an instance of FASTElementDefinition.
|
|
1256
|
+
* @param type - The type this definition is being created for.
|
|
1257
|
+
* @param nameOrConfig - The name of the element to define or a config object
|
|
1258
|
+
* that describes the element to define.
|
|
1259
|
+
*/
|
|
1260
|
+
constructor(e, t = e.definition) {
|
|
1261
|
+
typeof t == "string" && (t = { name: t }), this.type = e, this.name = t.name, this.template = t.template;
|
|
1262
|
+
const i = x.collect(e, t.attributes), n = new Array(i.length), r = {}, o = {};
|
|
1263
|
+
for (let a = 0, c = i.length; a < c; ++a) {
|
|
1264
|
+
const l = i[a];
|
|
1265
|
+
n[a] = l.attribute, r[l.name] = l, o[l.attribute] = l;
|
|
1266
|
+
}
|
|
1267
|
+
this.attributes = i, this.observedAttributes = n, this.propertyLookup = r, this.attributeLookup = o, this.shadowOptions = t.shadowOptions === void 0 ? Q : t.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, Q), t.shadowOptions), this.elementOptions = t.elementOptions === void 0 ? K : Object.assign(Object.assign({}, K), t.elementOptions), this.styles = t.styles === void 0 ? void 0 : Array.isArray(t.styles) ? g.create(t.styles) : t.styles instanceof g ? t.styles : g.create([t.styles]);
|
|
1268
|
+
}
|
|
1269
|
+
/**
|
|
1270
|
+
* Indicates if this element has been defined in at least one registry.
|
|
1271
|
+
*/
|
|
1272
|
+
get isDefined() {
|
|
1273
|
+
return !!$.getByType(this.type);
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Defines a custom element based on this definition.
|
|
1277
|
+
* @param registry - The element registry to define the element in.
|
|
1278
|
+
*/
|
|
1279
|
+
define(e = customElements) {
|
|
1280
|
+
const t = this.type;
|
|
1281
|
+
if ($.register(this)) {
|
|
1282
|
+
const i = this.attributes, n = t.prototype;
|
|
1283
|
+
for (let r = 0, o = i.length; r < o; ++r)
|
|
1284
|
+
b.defineProperty(n, i[r]);
|
|
1285
|
+
Reflect.defineProperty(t, "observedAttributes", {
|
|
1286
|
+
value: this.observedAttributes,
|
|
1287
|
+
enumerable: !0
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
return e.get(this.name) || e.define(this.name, t, this.elementOptions), this;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
B.forType = $.getByType;
|
|
1294
|
+
const de = /* @__PURE__ */ new WeakMap(), Pe = {
|
|
1295
|
+
bubbles: !0,
|
|
1296
|
+
composed: !0,
|
|
1297
|
+
cancelable: !0
|
|
1298
|
+
};
|
|
1299
|
+
function E(s) {
|
|
1300
|
+
return s.shadowRoot || de.get(s) || null;
|
|
1301
|
+
}
|
|
1302
|
+
class D extends ie {
|
|
1303
|
+
/**
|
|
1304
|
+
* Creates a Controller to control the specified element.
|
|
1305
|
+
* @param element - The element to be controlled by this controller.
|
|
1306
|
+
* @param definition - The element definition metadata that instructs this
|
|
1307
|
+
* controller in how to handle rendering and other platform integrations.
|
|
1308
|
+
* @internal
|
|
1309
|
+
*/
|
|
1310
|
+
constructor(e, t) {
|
|
1311
|
+
super(e), this.boundObservables = null, this.behaviors = null, this.needsInitialization = !0, this._template = null, this._styles = null, this._isConnected = !1, this.$fastController = this, this.view = null, this.element = e, this.definition = t;
|
|
1312
|
+
const i = t.shadowOptions;
|
|
1313
|
+
if (i !== void 0) {
|
|
1314
|
+
const r = e.attachShadow(i);
|
|
1315
|
+
i.mode === "closed" && de.set(e, r);
|
|
1316
|
+
}
|
|
1317
|
+
const n = b.getAccessors(e);
|
|
1318
|
+
if (n.length > 0) {
|
|
1319
|
+
const r = this.boundObservables = /* @__PURE__ */ Object.create(null);
|
|
1320
|
+
for (let o = 0, a = n.length; o < a; ++o) {
|
|
1321
|
+
const c = n[o].name, l = e[c];
|
|
1322
|
+
l !== void 0 && (delete e[c], r[c] = l);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Indicates whether or not the custom element has been
|
|
1328
|
+
* connected to the document.
|
|
1329
|
+
*/
|
|
1330
|
+
get isConnected() {
|
|
1331
|
+
return b.track(this, "isConnected"), this._isConnected;
|
|
1332
|
+
}
|
|
1333
|
+
setIsConnected(e) {
|
|
1334
|
+
this._isConnected = e, b.notify(this, "isConnected");
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Gets/sets the template used to render the component.
|
|
1338
|
+
* @remarks
|
|
1339
|
+
* This value can only be accurately read after connect but can be set at any time.
|
|
1340
|
+
*/
|
|
1341
|
+
get template() {
|
|
1342
|
+
return this._template;
|
|
1343
|
+
}
|
|
1344
|
+
set template(e) {
|
|
1345
|
+
this._template !== e && (this._template = e, this.needsInitialization || this.renderTemplate(e));
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Gets/sets the primary styles used for the component.
|
|
1349
|
+
* @remarks
|
|
1350
|
+
* This value can only be accurately read after connect but can be set at any time.
|
|
1351
|
+
*/
|
|
1352
|
+
get styles() {
|
|
1353
|
+
return this._styles;
|
|
1354
|
+
}
|
|
1355
|
+
set styles(e) {
|
|
1356
|
+
this._styles !== e && (this._styles !== null && this.removeStyles(this._styles), this._styles = e, !this.needsInitialization && e !== null && this.addStyles(e));
|
|
1357
|
+
}
|
|
1358
|
+
/**
|
|
1359
|
+
* Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.
|
|
1360
|
+
* @param styles - The styles to add.
|
|
1361
|
+
*/
|
|
1362
|
+
addStyles(e) {
|
|
1363
|
+
const t = E(this.element) || this.element.getRootNode();
|
|
1364
|
+
if (e instanceof HTMLStyleElement)
|
|
1365
|
+
t.append(e);
|
|
1366
|
+
else if (!e.isAttachedTo(t)) {
|
|
1367
|
+
const i = e.behaviors;
|
|
1368
|
+
e.addStylesTo(t), i !== null && this.addBehaviors(i);
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.
|
|
1373
|
+
* @param styles - the styles to remove.
|
|
1374
|
+
*/
|
|
1375
|
+
removeStyles(e) {
|
|
1376
|
+
const t = E(this.element) || this.element.getRootNode();
|
|
1377
|
+
if (e instanceof HTMLStyleElement)
|
|
1378
|
+
t.removeChild(e);
|
|
1379
|
+
else if (e.isAttachedTo(t)) {
|
|
1380
|
+
const i = e.behaviors;
|
|
1381
|
+
e.removeStylesFrom(t), i !== null && this.removeBehaviors(i);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Adds behaviors to this element.
|
|
1386
|
+
* @param behaviors - The behaviors to add.
|
|
1387
|
+
*/
|
|
1388
|
+
addBehaviors(e) {
|
|
1389
|
+
const t = this.behaviors || (this.behaviors = /* @__PURE__ */ new Map()), i = e.length, n = [];
|
|
1390
|
+
for (let r = 0; r < i; ++r) {
|
|
1391
|
+
const o = e[r];
|
|
1392
|
+
t.has(o) ? t.set(o, t.get(o) + 1) : (t.set(o, 1), n.push(o));
|
|
1393
|
+
}
|
|
1394
|
+
if (this._isConnected) {
|
|
1395
|
+
const r = this.element;
|
|
1396
|
+
for (let o = 0; o < n.length; ++o)
|
|
1397
|
+
n[o].bind(r, w);
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Removes behaviors from this element.
|
|
1402
|
+
* @param behaviors - The behaviors to remove.
|
|
1403
|
+
* @param force - Forces unbinding of behaviors.
|
|
1404
|
+
*/
|
|
1405
|
+
removeBehaviors(e, t = !1) {
|
|
1406
|
+
const i = this.behaviors;
|
|
1407
|
+
if (i === null)
|
|
1408
|
+
return;
|
|
1409
|
+
const n = e.length, r = [];
|
|
1410
|
+
for (let o = 0; o < n; ++o) {
|
|
1411
|
+
const a = e[o];
|
|
1412
|
+
if (i.has(a)) {
|
|
1413
|
+
const c = i.get(a) - 1;
|
|
1414
|
+
c === 0 || t ? i.delete(a) && r.push(a) : i.set(a, c);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
if (this._isConnected) {
|
|
1418
|
+
const o = this.element;
|
|
1419
|
+
for (let a = 0; a < r.length; ++a)
|
|
1420
|
+
r[a].unbind(o);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Runs connected lifecycle behavior on the associated element.
|
|
1425
|
+
*/
|
|
1426
|
+
onConnectedCallback() {
|
|
1427
|
+
if (this._isConnected)
|
|
1428
|
+
return;
|
|
1429
|
+
const e = this.element;
|
|
1430
|
+
this.needsInitialization ? this.finishInitialization() : this.view !== null && this.view.bind(e, w);
|
|
1431
|
+
const t = this.behaviors;
|
|
1432
|
+
if (t !== null)
|
|
1433
|
+
for (const [i] of t)
|
|
1434
|
+
i.bind(e, w);
|
|
1435
|
+
this.setIsConnected(!0);
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Runs disconnected lifecycle behavior on the associated element.
|
|
1439
|
+
*/
|
|
1440
|
+
onDisconnectedCallback() {
|
|
1441
|
+
if (!this._isConnected)
|
|
1442
|
+
return;
|
|
1443
|
+
this.setIsConnected(!1);
|
|
1444
|
+
const e = this.view;
|
|
1445
|
+
e !== null && e.unbind();
|
|
1446
|
+
const t = this.behaviors;
|
|
1447
|
+
if (t !== null) {
|
|
1448
|
+
const i = this.element;
|
|
1449
|
+
for (const [n] of t)
|
|
1450
|
+
n.unbind(i);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Runs the attribute changed callback for the associated element.
|
|
1455
|
+
* @param name - The name of the attribute that changed.
|
|
1456
|
+
* @param oldValue - The previous value of the attribute.
|
|
1457
|
+
* @param newValue - The new value of the attribute.
|
|
1458
|
+
*/
|
|
1459
|
+
onAttributeChangedCallback(e, t, i) {
|
|
1460
|
+
const n = this.definition.attributeLookup[e];
|
|
1461
|
+
n !== void 0 && n.onAttributeChangedCallback(this.element, i);
|
|
1462
|
+
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Emits a custom HTML event.
|
|
1465
|
+
* @param type - The type name of the event.
|
|
1466
|
+
* @param detail - The event detail object to send with the event.
|
|
1467
|
+
* @param options - The event options. By default bubbles and composed.
|
|
1468
|
+
* @remarks
|
|
1469
|
+
* Only emits events if connected.
|
|
1470
|
+
*/
|
|
1471
|
+
emit(e, t, i) {
|
|
1472
|
+
return this._isConnected ? this.element.dispatchEvent(new CustomEvent(e, Object.assign(Object.assign({ detail: t }, Pe), i))) : !1;
|
|
1473
|
+
}
|
|
1474
|
+
finishInitialization() {
|
|
1475
|
+
const e = this.element, t = this.boundObservables;
|
|
1476
|
+
if (t !== null) {
|
|
1477
|
+
const n = Object.keys(t);
|
|
1478
|
+
for (let r = 0, o = n.length; r < o; ++r) {
|
|
1479
|
+
const a = n[r];
|
|
1480
|
+
e[a] = t[a];
|
|
1481
|
+
}
|
|
1482
|
+
this.boundObservables = null;
|
|
1483
|
+
}
|
|
1484
|
+
const i = this.definition;
|
|
1485
|
+
this._template === null && (this.element.resolveTemplate ? this._template = this.element.resolveTemplate() : i.template && (this._template = i.template || null)), this._template !== null && this.renderTemplate(this._template), this._styles === null && (this.element.resolveStyles ? this._styles = this.element.resolveStyles() : i.styles && (this._styles = i.styles || null)), this._styles !== null && this.addStyles(this._styles), this.needsInitialization = !1;
|
|
1486
|
+
}
|
|
1487
|
+
renderTemplate(e) {
|
|
1488
|
+
const t = this.element, i = E(t) || t;
|
|
1489
|
+
this.view !== null ? (this.view.dispose(), this.view = null) : this.needsInitialization || u.removeChildNodes(i), e && (this.view = e.render(t, i, t));
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Locates or creates a controller for the specified element.
|
|
1493
|
+
* @param element - The element to return the controller for.
|
|
1494
|
+
* @remarks
|
|
1495
|
+
* The specified element must have a {@link FASTElementDefinition}
|
|
1496
|
+
* registered either through the use of the {@link customElement}
|
|
1497
|
+
* decorator or a call to `FASTElement.define`.
|
|
1498
|
+
*/
|
|
1499
|
+
static forCustomElement(e) {
|
|
1500
|
+
const t = e.$fastController;
|
|
1501
|
+
if (t !== void 0)
|
|
1502
|
+
return t;
|
|
1503
|
+
const i = B.forType(e.constructor);
|
|
1504
|
+
if (i === void 0)
|
|
1505
|
+
throw new Error("Missing FASTElement definition.");
|
|
1506
|
+
return e.$fastController = new D(e, i);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
function G(s) {
|
|
1510
|
+
return class extends s {
|
|
1511
|
+
constructor() {
|
|
1512
|
+
super(), D.forCustomElement(this);
|
|
1513
|
+
}
|
|
1514
|
+
$emit(e, t, i) {
|
|
1515
|
+
return this.$fastController.emit(e, t, i);
|
|
1516
|
+
}
|
|
1517
|
+
connectedCallback() {
|
|
1518
|
+
this.$fastController.onConnectedCallback();
|
|
1519
|
+
}
|
|
1520
|
+
disconnectedCallback() {
|
|
1521
|
+
this.$fastController.onDisconnectedCallback();
|
|
1522
|
+
}
|
|
1523
|
+
attributeChangedCallback(e, t, i) {
|
|
1524
|
+
this.$fastController.onAttributeChangedCallback(e, t, i);
|
|
1525
|
+
}
|
|
1526
|
+
};
|
|
1527
|
+
}
|
|
1528
|
+
const Le = Object.assign(G(HTMLElement), {
|
|
1529
|
+
/**
|
|
1530
|
+
* Creates a new FASTElement base class inherited from the
|
|
1531
|
+
* provided base type.
|
|
1532
|
+
* @param BaseType - The base element type to inherit from.
|
|
1533
|
+
*/
|
|
1534
|
+
from(s) {
|
|
1535
|
+
return G(s);
|
|
1536
|
+
},
|
|
1537
|
+
/**
|
|
1538
|
+
* Defines a platform custom element based on the provided type and definition.
|
|
1539
|
+
* @param type - The custom element type to define.
|
|
1540
|
+
* @param nameOrDef - The name of the element to define or a definition object
|
|
1541
|
+
* that describes the element to define.
|
|
1542
|
+
*/
|
|
1543
|
+
define(s, e) {
|
|
1544
|
+
return new B(s, e).define().type;
|
|
1545
|
+
}
|
|
1546
|
+
});
|
|
1547
|
+
function je(s, e) {
|
|
1548
|
+
return s instanceof Function ? s(e) : s;
|
|
1549
|
+
}
|
|
1550
|
+
const J = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Map(), et = (s) => (e = "vwc") => {
|
|
1551
|
+
const t = (n) => `${e}-${n}`, i = (n) => {
|
|
1552
|
+
const r = t(n.name);
|
|
1553
|
+
let o = n.type;
|
|
1554
|
+
if (o.componentName = n.name, J.has(r))
|
|
1555
|
+
return;
|
|
1556
|
+
M.has(o) && M.get(o) !== r && (o = class extends o {
|
|
1557
|
+
}), J.add(r), M.set(o, r);
|
|
1558
|
+
for (const l of n.dependencies)
|
|
1559
|
+
i(l);
|
|
1560
|
+
const a = new Map([
|
|
1561
|
+
[n.type, r],
|
|
1562
|
+
...n.dependencies.map(
|
|
1563
|
+
(l) => [l.type, t(l.name)]
|
|
1564
|
+
)
|
|
1565
|
+
]), c = {
|
|
1566
|
+
tagFor(l) {
|
|
1567
|
+
if (!a.has(l))
|
|
1568
|
+
throw new Error(
|
|
1569
|
+
`Could not get tag for ${l.name} as it is not a dependency of ${n.name}.`
|
|
1570
|
+
);
|
|
1571
|
+
return a.get(l);
|
|
1572
|
+
},
|
|
1573
|
+
tagForNonDependency(l) {
|
|
1574
|
+
return t(l);
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
new B(o, {
|
|
1578
|
+
...n.options,
|
|
1579
|
+
template: je(
|
|
1580
|
+
n.template,
|
|
1581
|
+
c
|
|
1582
|
+
),
|
|
1583
|
+
name: `${e}-${n.name}`
|
|
1584
|
+
}).define();
|
|
1585
|
+
};
|
|
1586
|
+
i(s);
|
|
1587
|
+
}, tt = (s, e, t, i, n) => ({
|
|
1588
|
+
name: s,
|
|
1589
|
+
type: e,
|
|
1590
|
+
template: t,
|
|
1591
|
+
dependencies: i,
|
|
1592
|
+
options: n
|
|
1593
|
+
}), X = /* @__PURE__ */ new WeakMap(), T = (s) => {
|
|
1594
|
+
let e = X.get(s);
|
|
1595
|
+
return e || (e = [], X.set(s, e)), e;
|
|
1596
|
+
}, st = (s, e) => {
|
|
1597
|
+
T(s).push(e);
|
|
1598
|
+
}, it = (s, e) => {
|
|
1599
|
+
T(s).splice(T(s).indexOf(e), 1);
|
|
1600
|
+
}, He = (s, e) => {
|
|
1601
|
+
T(s).forEach((t) => t(s, e));
|
|
1602
|
+
}, De = (s) => s === "delegate", Y = (s) => `vvd${s.charAt(0).toUpperCase()}${s.slice(1)}`, ue = (s, e) => {
|
|
1603
|
+
if (De(s._vividAriaBehaviour)) {
|
|
1604
|
+
const t = s[e];
|
|
1605
|
+
s[`_${e}`] = null, s.removeAttribute(V(e)), s[`_${e}`] = t, s[e] !== null ? s.dataset[Y(e)] = s[e] : delete s.dataset[Y(e)];
|
|
1606
|
+
} else
|
|
1607
|
+
u.setAttribute(
|
|
1608
|
+
s,
|
|
1609
|
+
V(e),
|
|
1610
|
+
s[e]
|
|
1611
|
+
);
|
|
1612
|
+
}, A = /* @__PURE__ */ new WeakMap(), ze = (s, e) => {
|
|
1613
|
+
const t = A.get(s);
|
|
1614
|
+
t ? t.add(e) : A.set(s, /* @__PURE__ */ new Set([e]));
|
|
1615
|
+
}, qe = (s, e) => {
|
|
1616
|
+
s.isConnected ? ue(s, e) : ze(s, e);
|
|
1617
|
+
}, Ue = (s) => {
|
|
1618
|
+
const e = A.get(s);
|
|
1619
|
+
if (e) {
|
|
1620
|
+
for (const t of e)
|
|
1621
|
+
ue(s, t);
|
|
1622
|
+
A.delete(s);
|
|
1623
|
+
}
|
|
1624
|
+
}, Z = [
|
|
1625
|
+
"role",
|
|
1626
|
+
"ariaAtomic",
|
|
1627
|
+
"ariaAutoComplete",
|
|
1628
|
+
"ariaBusy",
|
|
1629
|
+
"ariaChecked",
|
|
1630
|
+
"ariaColCount",
|
|
1631
|
+
"ariaColIndex",
|
|
1632
|
+
"ariaColIndexText",
|
|
1633
|
+
"ariaColSpan",
|
|
1634
|
+
"ariaCurrent",
|
|
1635
|
+
"ariaDescription",
|
|
1636
|
+
"ariaDisabled",
|
|
1637
|
+
"ariaExpanded",
|
|
1638
|
+
"ariaHasPopup",
|
|
1639
|
+
"ariaHidden",
|
|
1640
|
+
"ariaInvalid",
|
|
1641
|
+
"ariaKeyShortcuts",
|
|
1642
|
+
"ariaLabel",
|
|
1643
|
+
"ariaLevel",
|
|
1644
|
+
"ariaLive",
|
|
1645
|
+
"ariaModal",
|
|
1646
|
+
"ariaMultiLine",
|
|
1647
|
+
"ariaMultiSelectable",
|
|
1648
|
+
"ariaOrientation",
|
|
1649
|
+
"ariaPlaceholder",
|
|
1650
|
+
"ariaPosInSet",
|
|
1651
|
+
"ariaPressed",
|
|
1652
|
+
"ariaReadOnly",
|
|
1653
|
+
"ariaRequired",
|
|
1654
|
+
"ariaRoleDescription",
|
|
1655
|
+
"ariaRowCount",
|
|
1656
|
+
"ariaRowIndex",
|
|
1657
|
+
"ariaRowIndexText",
|
|
1658
|
+
"ariaRowSpan",
|
|
1659
|
+
"ariaSelected",
|
|
1660
|
+
"ariaSetSize",
|
|
1661
|
+
"ariaSort",
|
|
1662
|
+
"ariaValueMax",
|
|
1663
|
+
"ariaValueMin",
|
|
1664
|
+
"ariaValueNow",
|
|
1665
|
+
"ariaValueText",
|
|
1666
|
+
"ariaRelevant"
|
|
1667
|
+
// Non-standard
|
|
1668
|
+
], V = (s) => s.replace("aria", "aria-").toLowerCase(), We = (s) => {
|
|
1669
|
+
class e extends s {
|
|
1670
|
+
constructor(...i) {
|
|
1671
|
+
super(...i), this._vividAriaBehaviour = "default";
|
|
1672
|
+
for (const n of Z)
|
|
1673
|
+
this[`_${n}`] = null;
|
|
1674
|
+
}
|
|
1675
|
+
connectedCallback() {
|
|
1676
|
+
super.connectedCallback(), Ue(this);
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
for (const t of Z)
|
|
1680
|
+
Re({
|
|
1681
|
+
attribute: V(t),
|
|
1682
|
+
mode: "fromView"
|
|
1683
|
+
})(e.prototype, t), e.prototype[`${t}Changed`] = function() {
|
|
1684
|
+
qe(this, t), this._vividAriaBehaviour !== "default" && He(this, t);
|
|
1685
|
+
};
|
|
1686
|
+
return e;
|
|
1687
|
+
}, fe = _(), nt = (s) => (e, t) => {
|
|
1688
|
+
fe(e.constructor).push({
|
|
1689
|
+
newPropertyName: t,
|
|
1690
|
+
...s
|
|
1691
|
+
});
|
|
1692
|
+
}, Qe = (s) => {
|
|
1693
|
+
class e extends s {
|
|
1694
|
+
#e(i) {
|
|
1695
|
+
let n = !1, r = !1;
|
|
1696
|
+
const o = (h) => r && i.fromDeprecated(
|
|
1697
|
+
h[i.deprecatedPropertyName]
|
|
1698
|
+
) === h[i.newPropertyName], a = (h) => n && i.toDeprecated && i.toDeprecated(h[i.newPropertyName]) === h[i.deprecatedPropertyName], c = {
|
|
1699
|
+
handleChange(h, d) {
|
|
1700
|
+
if (d === i.newPropertyName) {
|
|
1701
|
+
if (n = !0, !i.toDeprecated || o(h))
|
|
1702
|
+
return;
|
|
1703
|
+
h[i.deprecatedPropertyName] = i.toDeprecated(h[i.newPropertyName]);
|
|
1704
|
+
}
|
|
1705
|
+
if (d === i.deprecatedPropertyName) {
|
|
1706
|
+
if (r = !0, a(h))
|
|
1707
|
+
return;
|
|
1708
|
+
h[i.newPropertyName] = i.fromDeprecated(
|
|
1709
|
+
h[i.deprecatedPropertyName]
|
|
1710
|
+
);
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
}, l = b.getNotifier(this);
|
|
1714
|
+
l.subscribe(c, i.newPropertyName), l.subscribe(c, i.deprecatedPropertyName);
|
|
1715
|
+
}
|
|
1716
|
+
constructor(...i) {
|
|
1717
|
+
super(...i);
|
|
1718
|
+
for (const n of fe(this.constructor))
|
|
1719
|
+
this.#e(n);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
return e;
|
|
1723
|
+
};
|
|
1724
|
+
class rt extends We(Qe(Le)) {
|
|
1725
|
+
static {
|
|
1726
|
+
this.VIVID_VERSION = "5.1.0";
|
|
1727
|
+
}
|
|
1728
|
+
/**
|
|
1729
|
+
* Add data-vvd-component attribute with component name globally,
|
|
1730
|
+
* for referring to the elements in CSS, testing or debugging
|
|
1731
|
+
*/
|
|
1732
|
+
connectedCallback() {
|
|
1733
|
+
super.connectedCallback();
|
|
1734
|
+
const e = this.constructor.componentName;
|
|
1735
|
+
this.setAttribute("data-vvd-component", e);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
export {
|
|
1739
|
+
Xe as A,
|
|
1740
|
+
u as D,
|
|
1741
|
+
g as E,
|
|
1742
|
+
P as H,
|
|
1743
|
+
b as O,
|
|
1744
|
+
I as S,
|
|
1745
|
+
rt as V,
|
|
1746
|
+
Re as a,
|
|
1747
|
+
w as b,
|
|
1748
|
+
et as c,
|
|
1749
|
+
tt as d,
|
|
1750
|
+
Ke as e,
|
|
1751
|
+
V as f,
|
|
1752
|
+
Z as g,
|
|
1753
|
+
Ye as h,
|
|
1754
|
+
Fe as i,
|
|
1755
|
+
Ze as n,
|
|
1756
|
+
Ge as o,
|
|
1757
|
+
nt as r,
|
|
1758
|
+
st as s,
|
|
1759
|
+
it as u,
|
|
1760
|
+
Je as v
|
|
1761
|
+
};
|