@rededor/cura 1.7.1 → 1.8.1
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/dist/cjs/cura-accordion_20.cjs.entry.js +484 -137
- package/dist/cjs/cura-accordion_20.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +9 -12
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-counter.cjs.entry.js +16 -8
- package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-counter.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-dot.cjs.entry.js +14 -5
- package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-dot.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-pill.cjs.entry.js +23 -7
- package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-pill.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +46 -8
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-outline.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-select.cjs.entry.js +7 -12
- package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-select.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-button.definitions-f036371c.js → cura-button.definitions-B3SK8MaV.js} +2 -1
- package/dist/cjs/cura-button.definitions-B3SK8MaV.js.map +1 -0
- package/dist/cjs/cura-calendar.cjs.entry.js +203 -94
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-calendar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-card.cjs.entry.js +34 -6
- package/dist/cjs/cura-card.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-card.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-checkbox.cjs.entry.js +72 -20
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +25 -7
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-display.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +5 -6
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-dropdown-search-not-found.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-forms.definitions-c164f1b8.js → cura-forms.definitions-DVLuO67c.js} +2 -1
- package/dist/cjs/cura-forms.definitions-DVLuO67c.js.map +1 -0
- package/dist/cjs/{cura-icon.definitions-5223028b.js → cura-icon.definitions-DT0wF67y.js} +2 -1
- package/dist/cjs/cura-icon.definitions-DT0wF67y.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +7 -8
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-icons-view.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-input-date.cjs.entry.js +32 -15
- package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-input-date.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-loader-bar.cjs.entry.js +4 -5
- package/dist/cjs/cura-loader-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-loader-bar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-modal.cjs.entry.js +46 -15
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar.cura-stepper-item.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js +25 -15
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.cjs.entry.js +73 -21
- package/dist/cjs/cura-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-stepper.cjs.entry.js +23 -6
- package/dist/cjs/cura-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-stepper.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +61 -18
- package/dist/cjs/cura-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-switch.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-button.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-button.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-button.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-transparent.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-tabs.definitions-b8955ad4.js → cura-tabs.definitions-CGqqGE2e.js} +2 -1
- package/dist/cjs/cura-tabs.definitions-CGqqGE2e.js.map +1 -0
- package/dist/cjs/{cura-theme-module-09bb63a4.js → cura-theme-module-CJkmAxBA.js} +94 -9
- package/dist/cjs/cura-theme-module-CJkmAxBA.js.map +1 -0
- package/dist/cjs/cura-toast.cjs.entry.js +8 -11
- package/dist/cjs/cura-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-toast.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tooltip.cjs.entry.js +9 -11
- package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/cura.cjs.js +9 -10
- package/dist/cjs/cura.cjs.js.map +1 -1
- package/dist/cjs/{index-60783089.js → index-BK9MSAiE.js} +947 -289
- package/dist/cjs/index-BK9MSAiE.js.map +1 -0
- package/dist/cjs/{index-6dc29195.js → index-EyP6Zlkd.js} +2 -1
- package/dist/cjs/index-EyP6Zlkd.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +5 -8
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +57 -18
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +45 -9
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +24 -7
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +8 -4
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js +19 -3
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +40 -9
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.js +86 -17
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +86 -17
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +25 -13
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +81 -16
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +19 -11
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
- package/dist/collection/components/cura-avatar/cura-avatar.js +48 -13
- package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.js +196 -24
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
- package/dist/collection/components/cura-card/cura-card.js +48 -7
- package/dist/collection/components/cura-card/cura-card.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +31 -9
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +91 -28
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +15 -6
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.css +0 -1
- package/dist/collection/components/cura-modal/cura-modal.js +65 -17
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js +3 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +21 -8
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +26 -9
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper.js +34 -6
- package/dist/collection/components/cura-stepper/cura-stepper.js.map +1 -1
- package/dist/collection/components/cura-toast/cura-toast.js +24 -12
- package/dist/collection/components/cura-toast/cura-toast.js.map +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +25 -12
- package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +114 -29
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.css +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +74 -16
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +13 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +132 -28
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +46 -9
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +109 -28
- package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +113 -33
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +13 -6
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js.map +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.js +85 -21
- package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +6 -2
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +14 -4
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +21 -9
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +9 -3
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +39 -8
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +53 -10
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +39 -8
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/components/cura-accordion-item.js +24 -6
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-accordion.js +34 -13
- package/dist/components/cura-accordion.js.map +1 -1
- package/dist/components/cura-alert.js +12 -14
- package/dist/components/cura-alert.js.map +1 -1
- package/dist/components/cura-avatar.js +25 -8
- package/dist/components/cura-avatar.js.map +1 -1
- package/dist/components/cura-badge-counter.js +2 -1
- package/dist/components/cura-badge-distance.js +7 -7
- package/dist/components/cura-badge-distance.js.map +1 -1
- package/dist/components/cura-badge-dot.js +14 -4
- package/dist/components/cura-badge-dot.js.map +1 -1
- package/dist/components/cura-badge-pill.js +2 -1
- package/dist/components/cura-button-outline.js +49 -10
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-select.js +10 -14
- package/dist/components/cura-button-select.js.map +1 -1
- package/dist/components/cura-button-transparent.js +2 -1
- package/dist/components/cura-button.js +49 -10
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-calendar.js +2 -1
- package/dist/components/cura-card.js +34 -5
- package/dist/components/cura-card.js.map +1 -1
- package/dist/components/cura-checkbox.js +75 -22
- package/dist/components/cura-checkbox.js.map +1 -1
- package/dist/components/cura-display.js +25 -6
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-dropdown-search-category.js +5 -5
- package/dist/components/cura-dropdown-search-category.js.map +1 -1
- package/dist/components/cura-dropdown-search-not-found.js +6 -6
- package/dist/components/cura-dropdown-search-not-found.js.map +1 -1
- package/dist/components/cura-dropdown-search-option.js +22 -10
- package/dist/components/cura-dropdown-search-option.js.map +1 -1
- package/dist/components/cura-dropdown-search.js +66 -27
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-heading.js +2 -1
- package/dist/components/cura-icon.js +2 -1
- package/dist/components/cura-icons-view.js +9 -9
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-input-date.js +40 -21
- package/dist/components/cura-input-date.js.map +1 -1
- package/dist/components/cura-input-text.js +2 -1
- package/dist/components/cura-label.js +2 -1
- package/dist/components/cura-loader-bar.js +2 -1
- package/dist/components/cura-loader-circle.js +2 -1
- package/dist/components/cura-modal.js +50 -18
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-page-template.js +4 -4
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +2 -1
- package/dist/components/cura-progress-bar.js +2 -1
- package/dist/components/cura-radio.js +75 -22
- package/dist/components/cura-radio.js.map +1 -1
- package/dist/components/cura-select-option.js +2 -1
- package/dist/components/cura-select.js +2 -1
- package/dist/components/cura-stepper-item.js +2 -1
- package/dist/components/cura-stepper.js +30 -12
- package/dist/components/cura-stepper.js.map +1 -1
- package/dist/components/cura-switch.js +62 -18
- package/dist/components/cura-switch.js.map +1 -1
- package/dist/components/cura-tabs-button.js +9 -11
- package/dist/components/cura-tabs-button.js.map +1 -1
- package/dist/components/cura-tabs-group.js +5 -5
- package/dist/components/cura-tabs-group.js.map +1 -1
- package/dist/components/cura-tabs-transparent.js +8 -10
- package/dist/components/cura-tabs-transparent.js.map +1 -1
- package/dist/components/cura-tabs.js +8 -10
- package/dist/components/cura-tabs.js.map +1 -1
- package/dist/components/cura-toast.js +12 -14
- package/dist/components/cura-toast.js.map +1 -1
- package/dist/components/cura-tooltip.js +15 -16
- package/dist/components/cura-tooltip.js.map +1 -1
- package/dist/components/index.js +3 -547
- package/dist/components/index.js.map +1 -1
- package/dist/components/{cura-icon2.js → p-B5aO1chh.js} +5 -6
- package/dist/components/p-B5aO1chh.js.map +1 -0
- package/dist/components/{cura-calendar2.js → p-BGnJiNyu.js} +210 -100
- package/dist/components/p-BGnJiNyu.js.map +1 -0
- package/dist/components/{cura-heading2.js → p-BHEafDKD.js} +34 -7
- package/dist/components/p-BHEafDKD.js.map +1 -0
- package/dist/components/{cura-button-transparent2.js → p-BRDqwZ4N.js} +48 -11
- package/dist/components/p-BRDqwZ4N.js.map +1 -0
- package/dist/{esm/cura-button.definitions-617d3bad.js → components/p-BSI2FkNn.js} +2 -1
- package/dist/components/p-BSI2FkNn.js.map +1 -0
- package/dist/components/{cura-select2.js → p-BTt-pVTn.js} +86 -30
- package/dist/components/p-BTt-pVTn.js.map +1 -0
- package/dist/components/{cura-badge-counter2.js → p-C72aF-gL.js} +18 -9
- package/dist/components/p-C72aF-gL.js.map +1 -0
- package/dist/components/{cura-tabs.definitions.js → p-CHcd-uKK.js} +2 -1
- package/dist/components/p-CHcd-uKK.js.map +1 -0
- package/dist/components/p-D1cPOZpG.js +2617 -0
- package/dist/components/p-D1cPOZpG.js.map +1 -0
- package/dist/components/{cura-paragraph2.js → p-DI4g-ZH4.js} +26 -7
- package/dist/components/p-DI4g-ZH4.js.map +1 -0
- package/dist/components/{cura-label2.js → p-DR1RHrEX.js} +30 -7
- package/dist/components/p-DR1RHrEX.js.map +1 -0
- package/dist/components/{cura-stepper-item2.js → p-DaPc6Dxl.js} +23 -14
- package/dist/components/p-DaPc6Dxl.js.map +1 -0
- package/dist/components/{cura-forms.definitions.js → p-Dot54hbB.js} +2 -1
- package/dist/components/p-Dot54hbB.js.map +1 -0
- package/dist/components/{cura-select-option2.js → p-DpIu_Oxz.js} +8 -9
- package/dist/components/p-DpIu_Oxz.js.map +1 -0
- package/dist/components/{cura-loader-circle2.js → p-Dqm2sAwv.js} +13 -7
- package/dist/components/p-Dqm2sAwv.js.map +1 -0
- package/dist/components/{cura-progress-bar2.js → p-FTSrgi0q.js} +11 -8
- package/dist/components/p-FTSrgi0q.js.map +1 -0
- package/dist/components/{cura-loader-bar2.js → p-KIQMkSRF.js} +5 -5
- package/dist/components/p-KIQMkSRF.js.map +1 -0
- package/dist/components/{cura-badge-pill2.js → p-cOEGtL9C.js} +26 -9
- package/dist/components/p-cOEGtL9C.js.map +1 -0
- package/dist/components/{cura-input-text2.js → p-zz_zOPBZ.js} +75 -102
- package/dist/components/p-zz_zOPBZ.js.map +1 -0
- package/dist/cura/cura-alert.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-counter.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-dot.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-pill.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-outline.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-select.entry.esm.js.map +1 -0
- package/dist/cura/{p-12a4ae7e.entry.js.map → cura-calendar.entry.esm.js.map} +1 -1
- package/dist/cura/{p-53d68d72.entry.js.map → cura-card.entry.esm.js.map} +1 -1
- package/dist/cura/cura-checkbox.entry.esm.js.map +1 -0
- package/dist/cura/cura-display.entry.esm.js.map +1 -0
- package/dist/cura/cura-dropdown-search-not-found.entry.esm.js.map +1 -0
- package/dist/cura/cura-icons-view.entry.esm.js.map +1 -0
- package/dist/cura/cura-input-date.entry.esm.js.map +1 -0
- package/dist/cura/cura-loader-bar.entry.esm.js.map +1 -0
- package/dist/cura/{p-1ef21ae9.entry.js.map → cura-modal.entry.esm.js.map} +1 -1
- package/dist/cura/cura-progress-bar.cura-stepper-item.entry.esm.js.map +1 -0
- package/dist/cura/cura-radio.entry.esm.js.map +1 -0
- package/dist/cura/cura-stepper.entry.esm.js.map +1 -0
- package/dist/cura/cura-switch.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-button.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-transparent.entry.esm.js.map +1 -0
- package/dist/cura/cura-toast.entry.esm.js.map +1 -0
- package/dist/cura/cura-tooltip.entry.esm.js.map +1 -0
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/loader.esm.js.map +1 -0
- package/dist/cura/p-077019da.entry.js +2 -0
- package/dist/cura/p-077019da.entry.js.map +1 -0
- package/dist/cura/p-07783235.entry.js +2 -0
- package/dist/cura/p-07783235.entry.js.map +1 -0
- package/dist/cura/p-090e297c.entry.js +2 -0
- package/dist/cura/p-090e297c.entry.js.map +1 -0
- package/dist/cura/p-16c0b52c.entry.js +2 -0
- package/dist/cura/p-16c0b52c.entry.js.map +1 -0
- package/dist/cura/p-2632183e.entry.js +2 -0
- package/dist/cura/p-2632183e.entry.js.map +1 -0
- package/dist/cura/p-32015dcc.entry.js +2 -0
- package/dist/cura/p-32015dcc.entry.js.map +1 -0
- package/dist/cura/p-32f94709.entry.js +2 -0
- package/dist/cura/p-32f94709.entry.js.map +1 -0
- package/dist/cura/p-3d6040e2.entry.js +2 -0
- package/dist/cura/p-3d6040e2.entry.js.map +1 -0
- package/dist/cura/p-4ac578a6.entry.js +2 -0
- package/dist/cura/p-4ac578a6.entry.js.map +1 -0
- package/dist/cura/p-4bde448e.entry.js +2 -0
- package/dist/cura/p-4bde448e.entry.js.map +1 -0
- package/dist/cura/p-6feba852.entry.js +2 -0
- package/dist/cura/p-6feba852.entry.js.map +1 -0
- package/dist/cura/p-7586fd07.entry.js +2 -0
- package/dist/cura/p-7586fd07.entry.js.map +1 -0
- package/dist/cura/p-76cbb798.entry.js +2 -0
- package/dist/cura/p-76cbb798.entry.js.map +1 -0
- package/dist/cura/p-7fd143aa.entry.js +2 -0
- package/dist/cura/p-7fd143aa.entry.js.map +1 -0
- package/dist/cura/p-8c83f259.entry.js +2 -0
- package/dist/cura/p-8c83f259.entry.js.map +1 -0
- package/dist/cura/p-95cd7918.entry.js +2 -0
- package/dist/cura/p-95cd7918.entry.js.map +1 -0
- package/dist/cura/{p-272c784a.js → p-964stZ3D.js} +1 -1
- package/dist/cura/p-964stZ3D.js.map +1 -0
- package/dist/cura/p-9759f26f.entry.js +2 -0
- package/dist/cura/p-9759f26f.entry.js.map +1 -0
- package/dist/cura/p-9ef5444e.entry.js +2 -0
- package/dist/cura/p-9ef5444e.entry.js.map +1 -0
- package/dist/cura/p-BPKQjAwN.js +2 -0
- package/dist/cura/p-BPKQjAwN.js.map +1 -0
- package/dist/cura/{p-53c18ed4.js → p-BSI2FkNn.js} +1 -1
- package/dist/cura/p-BSI2FkNn.js.map +1 -0
- package/dist/cura/{p-efcb32eb.js → p-CHcd-uKK.js} +1 -1
- package/dist/cura/p-CHcd-uKK.js.map +1 -0
- package/dist/cura/{p-f9b8f665.js → p-Dot54hbB.js} +1 -1
- package/dist/cura/p-Dot54hbB.js.map +1 -0
- package/dist/cura/p-PPMZr_VE.js +3 -0
- package/dist/cura/p-PPMZr_VE.js.map +1 -0
- package/dist/cura/p-c6f240f0.entry.js +2 -0
- package/dist/cura/p-c6f240f0.entry.js.map +1 -0
- package/dist/cura/p-ceb646df.entry.js +2 -0
- package/dist/cura/p-ceb646df.entry.js.map +1 -0
- package/dist/cura/p-d040f8b9.entry.js +2 -0
- package/dist/cura/p-d040f8b9.entry.js.map +1 -0
- package/dist/cura/p-deb0b764.entry.js +2 -0
- package/dist/cura/p-deb0b764.entry.js.map +1 -0
- package/dist/cura/p-df7cb250.entry.js +2 -0
- package/dist/cura/p-df7cb250.entry.js.map +1 -0
- package/dist/cura/p-f9af3a3b.entry.js +2 -0
- package/dist/cura/p-f9af3a3b.entry.js.map +1 -0
- package/dist/cura/{p-48f9289b.js → p-sjLA93YY.js} +1 -1
- package/dist/cura/p-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-accordion_20.entry.js +483 -134
- package/dist/esm/cura-accordion_20.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +9 -10
- package/dist/esm/cura-alert.entry.js.map +1 -1
- package/dist/esm/cura-badge-counter.entry.js +16 -6
- package/dist/esm/cura-badge-counter.entry.js.map +1 -1
- package/dist/esm/cura-badge-dot.entry.js +14 -3
- package/dist/esm/cura-badge-dot.entry.js.map +1 -1
- package/dist/esm/cura-badge-pill.entry.js +23 -5
- package/dist/esm/cura-badge-pill.entry.js.map +1 -1
- package/dist/esm/cura-button-outline.entry.js +46 -6
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-select.entry.js +7 -10
- package/dist/esm/cura-button-select.entry.js.map +1 -1
- package/dist/{components/cura-button.definitions.js → esm/cura-button.definitions-BSI2FkNn.js} +2 -1
- package/dist/esm/cura-button.definitions-BSI2FkNn.js.map +1 -0
- package/dist/esm/cura-calendar.entry.js +203 -92
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura-card.entry.js +34 -4
- package/dist/esm/cura-card.entry.js.map +1 -1
- package/dist/esm/cura-checkbox.entry.js +72 -18
- package/dist/esm/cura-checkbox.entry.js.map +1 -1
- package/dist/esm/cura-display.entry.js +25 -5
- package/dist/esm/cura-display.entry.js.map +1 -1
- package/dist/esm/cura-dropdown-search-not-found.entry.js +5 -4
- package/dist/esm/cura-dropdown-search-not-found.entry.js.map +1 -1
- package/dist/esm/{cura-forms.definitions-2f963167.js → cura-forms.definitions-Dot54hbB.js} +2 -1
- package/dist/esm/cura-forms.definitions-Dot54hbB.js.map +1 -0
- package/dist/esm/{cura-icon.definitions-a892c0e2.js → cura-icon.definitions-sjLA93YY.js} +2 -1
- package/dist/esm/cura-icon.definitions-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +7 -6
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-input-date.entry.js +32 -13
- package/dist/esm/cura-input-date.entry.js.map +1 -1
- package/dist/esm/cura-loader-bar.entry.js +4 -3
- package/dist/esm/cura-loader-bar.entry.js.map +1 -1
- package/dist/esm/cura-modal.entry.js +46 -13
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura-progress-bar.cura-stepper-item.entry.js.map +1 -0
- package/dist/esm/cura-progress-bar_2.entry.js +25 -13
- package/dist/esm/cura-progress-bar_2.entry.js.map +1 -1
- package/dist/esm/cura-radio.entry.js +73 -19
- package/dist/esm/cura-radio.entry.js.map +1 -1
- package/dist/esm/cura-stepper.entry.js +23 -4
- package/dist/esm/cura-stepper.entry.js.map +1 -1
- package/dist/esm/cura-switch.entry.js +61 -16
- package/dist/esm/cura-switch.entry.js.map +1 -1
- package/dist/esm/cura-tabs-button.entry.js +6 -7
- package/dist/esm/cura-tabs-button.entry.js.map +1 -1
- package/dist/esm/cura-tabs-transparent.entry.js +6 -7
- package/dist/esm/cura-tabs-transparent.entry.js.map +1 -1
- package/dist/esm/{cura-tabs.definitions-a017126e.js → cura-tabs.definitions-CHcd-uKK.js} +2 -1
- package/dist/esm/cura-tabs.definitions-CHcd-uKK.js.map +1 -0
- package/dist/esm/{cura-theme-module-bf286f68.js → cura-theme-module-BPKQjAwN.js} +88 -4
- package/dist/esm/cura-theme-module-BPKQjAwN.js.map +1 -0
- package/dist/esm/cura-toast.entry.js +8 -9
- package/dist/esm/cura-toast.entry.js.map +1 -1
- package/dist/esm/cura-tooltip.entry.js +9 -9
- package/dist/esm/cura-tooltip.entry.js.map +1 -1
- package/dist/esm/cura.js +7 -7
- package/dist/esm/cura.js.map +1 -1
- package/dist/esm/{index-fbee309a.js → index-964stZ3D.js} +2 -1
- package/dist/esm/index-964stZ3D.js.map +1 -0
- package/dist/esm/{index-21683715.js → index-OdKytJIH.js} +947 -270
- package/dist/esm/index-OdKytJIH.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +5 -6
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +4 -0
- package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +14 -0
- package/dist/types/components.d.ts +718 -0
- package/dist/types/stencil-public-runtime.d.ts +25 -1
- package/package.json +5 -5
- package/dist/cjs/app-globals-6d5b51b6.js +0 -70
- package/dist/cjs/app-globals-6d5b51b6.js.map +0 -1
- package/dist/cjs/cura-button.definitions-f036371c.js.map +0 -1
- package/dist/cjs/cura-forms.definitions-c164f1b8.js.map +0 -1
- package/dist/cjs/cura-icon.definitions-5223028b.js.map +0 -1
- package/dist/cjs/cura-tabs.definitions-b8955ad4.js.map +0 -1
- package/dist/cjs/cura-theme-module-09bb63a4.js.map +0 -1
- package/dist/cjs/index-60783089.js.map +0 -1
- package/dist/cjs/index-6dc29195.js.map +0 -1
- package/dist/cjs/static-44199808.js +0 -90
- package/dist/cjs/static-44199808.js.map +0 -1
- package/dist/components/cura-badge-counter2.js.map +0 -1
- package/dist/components/cura-badge-pill2.js.map +0 -1
- package/dist/components/cura-button-transparent2.js.map +0 -1
- package/dist/components/cura-button.definitions.js.map +0 -1
- package/dist/components/cura-calendar2.js.map +0 -1
- package/dist/components/cura-forms.definitions.js.map +0 -1
- package/dist/components/cura-heading2.js.map +0 -1
- package/dist/components/cura-icon2.js.map +0 -1
- package/dist/components/cura-input-text2.js.map +0 -1
- package/dist/components/cura-label2.js.map +0 -1
- package/dist/components/cura-loader-bar2.js.map +0 -1
- package/dist/components/cura-loader-circle2.js.map +0 -1
- package/dist/components/cura-paragraph2.js.map +0 -1
- package/dist/components/cura-progress-bar2.js.map +0 -1
- package/dist/components/cura-select-option2.js.map +0 -1
- package/dist/components/cura-select2.js.map +0 -1
- package/dist/components/cura-stepper-item2.js.map +0 -1
- package/dist/components/cura-tabs.definitions.js.map +0 -1
- package/dist/cura/p-0aeaf57a.entry.js +0 -2
- package/dist/cura/p-0aeaf57a.entry.js.map +0 -1
- package/dist/cura/p-0b872499.entry.js +0 -2
- package/dist/cura/p-0b872499.entry.js.map +0 -1
- package/dist/cura/p-0ccde0ff.entry.js +0 -2
- package/dist/cura/p-0ccde0ff.entry.js.map +0 -1
- package/dist/cura/p-12a4ae7e.entry.js +0 -2
- package/dist/cura/p-137f003b.entry.js +0 -2
- package/dist/cura/p-137f003b.entry.js.map +0 -1
- package/dist/cura/p-197213c0.entry.js +0 -2
- package/dist/cura/p-197213c0.entry.js.map +0 -1
- package/dist/cura/p-1ef21ae9.entry.js +0 -2
- package/dist/cura/p-202dc01a.entry.js +0 -2
- package/dist/cura/p-202dc01a.entry.js.map +0 -1
- package/dist/cura/p-20b05d8f.entry.js +0 -2
- package/dist/cura/p-20b05d8f.entry.js.map +0 -1
- package/dist/cura/p-272c784a.js.map +0 -1
- package/dist/cura/p-2db4deb3.js +0 -2
- package/dist/cura/p-2db4deb3.js.map +0 -1
- package/dist/cura/p-48f9289b.js.map +0 -1
- package/dist/cura/p-4ee8efca.js +0 -3
- package/dist/cura/p-4ee8efca.js.map +0 -1
- package/dist/cura/p-53c18ed4.js.map +0 -1
- package/dist/cura/p-53d68d72.entry.js +0 -2
- package/dist/cura/p-5a43e745.entry.js +0 -2
- package/dist/cura/p-5a43e745.entry.js.map +0 -1
- package/dist/cura/p-633c13cd.entry.js +0 -2
- package/dist/cura/p-633c13cd.entry.js.map +0 -1
- package/dist/cura/p-6cbd49dd.js +0 -2
- package/dist/cura/p-6cbd49dd.js.map +0 -1
- package/dist/cura/p-7a68835f.entry.js +0 -2
- package/dist/cura/p-7a68835f.entry.js.map +0 -1
- package/dist/cura/p-7e10b146.entry.js +0 -2
- package/dist/cura/p-7e10b146.entry.js.map +0 -1
- package/dist/cura/p-7e2d1229.entry.js +0 -2
- package/dist/cura/p-7e2d1229.entry.js.map +0 -1
- package/dist/cura/p-8aade007.entry.js +0 -2
- package/dist/cura/p-8aade007.entry.js.map +0 -1
- package/dist/cura/p-9f460031.js +0 -2
- package/dist/cura/p-9f460031.js.map +0 -1
- package/dist/cura/p-ac0c90af.entry.js +0 -2
- package/dist/cura/p-ac0c90af.entry.js.map +0 -1
- package/dist/cura/p-b254bbe4.entry.js +0 -2
- package/dist/cura/p-b254bbe4.entry.js.map +0 -1
- package/dist/cura/p-b4ee956b.entry.js +0 -2
- package/dist/cura/p-b4ee956b.entry.js.map +0 -1
- package/dist/cura/p-b60a6aaa.entry.js +0 -2
- package/dist/cura/p-b60a6aaa.entry.js.map +0 -1
- package/dist/cura/p-b6ff8ac1.entry.js +0 -2
- package/dist/cura/p-b6ff8ac1.entry.js.map +0 -1
- package/dist/cura/p-d8e1e182.entry.js +0 -2
- package/dist/cura/p-d8e1e182.entry.js.map +0 -1
- package/dist/cura/p-d97719bc.entry.js +0 -2
- package/dist/cura/p-d97719bc.entry.js.map +0 -1
- package/dist/cura/p-daf422ce.entry.js +0 -2
- package/dist/cura/p-daf422ce.entry.js.map +0 -1
- package/dist/cura/p-efcb32eb.js.map +0 -1
- package/dist/cura/p-f9b8f665.js.map +0 -1
- package/dist/esm/app-globals-c2abb41c.js +0 -68
- package/dist/esm/app-globals-c2abb41c.js.map +0 -1
- package/dist/esm/cura-button.definitions-617d3bad.js.map +0 -1
- package/dist/esm/cura-forms.definitions-2f963167.js.map +0 -1
- package/dist/esm/cura-icon.definitions-a892c0e2.js.map +0 -1
- package/dist/esm/cura-tabs.definitions-a017126e.js.map +0 -1
- package/dist/esm/cura-theme-module-bf286f68.js.map +0 -1
- package/dist/esm/index-21683715.js.map +0 -1
- package/dist/esm/index-fbee309a.js.map +0 -1
- package/dist/esm/static-090f0088.js +0 -88
- package/dist/esm/static-090f0088.js.map +0 -1
- package/dist/loader/package.json +0 -11
|
@@ -1,17 +1,120 @@
|
|
|
1
|
+
import { C as CuraThemeModule } from './cura-theme-module-BPKQjAwN.js';
|
|
2
|
+
|
|
1
3
|
const NAMESPACE = 'cura';
|
|
2
|
-
const BUILD = /* cura */ {
|
|
4
|
+
const BUILD = /* cura */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
|
|
5
|
+
|
|
6
|
+
class CuraAPI {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
|
|
9
|
+
const themeModule = new CuraThemeModule();
|
|
10
|
+
this.theme = {
|
|
11
|
+
load: function (themeTag) { themeModule.load(themeTag); },
|
|
12
|
+
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
|
|
13
|
+
colors: {
|
|
14
|
+
getColor: function (colorWithDepth, opacity) { return themeModule.colors.getColor(colorWithDepth, opacity); },
|
|
15
|
+
},
|
|
16
|
+
fonts: {
|
|
17
|
+
getFamily: function (type) { return themeModule.fonts.getFamily(type); },
|
|
18
|
+
getWeights: function () { return themeModule.fonts.getWeights(); },
|
|
19
|
+
getSize: function () { return themeModule.fonts.getSize(); },
|
|
20
|
+
getColor: function () { return themeModule.fonts.getColor(); }
|
|
21
|
+
},
|
|
22
|
+
spacing: {
|
|
23
|
+
getSpacing: function () { return themeModule.spacing.getSpacing(); },
|
|
24
|
+
},
|
|
25
|
+
breakpoints: {
|
|
26
|
+
get: function (size, position) { return themeModule.breakpoints.get(size, position); }
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
this._addGlobalClasses();
|
|
30
|
+
if (config && config.customTheme) {
|
|
31
|
+
this.theme.setCustom(config.customTheme);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const theme = config && config.theme ? config.theme : 'default';
|
|
35
|
+
this.theme.load(theme);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
_addGlobalClasses() {
|
|
39
|
+
const styleId = "cura_global_classes";
|
|
40
|
+
let styleElement = document.head.querySelector(`#${styleId}`);
|
|
41
|
+
if (!styleElement) {
|
|
42
|
+
styleElement = document.createElement("style");
|
|
43
|
+
styleElement.id = styleId;
|
|
44
|
+
styleElement.textContent = `
|
|
45
|
+
.cura-body-scroll-lock {
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
position: fixed;
|
|
48
|
+
left: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
top: 0;
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
document.head.appendChild(styleElement);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function appGlobalScript () {
|
|
59
|
+
const config = window.CuraInit;
|
|
60
|
+
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
61
|
+
const api = window.CuraAPI;
|
|
62
|
+
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
63
|
+
if (config && typeof config.onReady === 'function')
|
|
64
|
+
config.onReady(api);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const globalScripts = appGlobalScript;
|
|
68
|
+
const globalStyles = null;
|
|
3
69
|
|
|
4
70
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
71
|
+
Stencil Client Platform v4.35.1 | MIT Licensed | https://stenciljs.com
|
|
6
72
|
*/
|
|
7
73
|
var __defProp = Object.defineProperty;
|
|
8
74
|
var __export = (target, all) => {
|
|
9
75
|
for (var name in all)
|
|
10
76
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
77
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
78
|
+
|
|
79
|
+
// src/utils/constants.ts
|
|
80
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
81
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
82
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
83
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
84
|
+
PrimitiveType2["Null"] = "null";
|
|
85
|
+
PrimitiveType2["String"] = "string";
|
|
86
|
+
PrimitiveType2["Number"] = "number";
|
|
87
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
88
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
89
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
90
|
+
return PrimitiveType2;
|
|
91
|
+
})(PrimitiveType || {});
|
|
92
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
93
|
+
NonPrimitiveType2["Array"] = "array";
|
|
94
|
+
NonPrimitiveType2["Date"] = "date";
|
|
95
|
+
NonPrimitiveType2["Map"] = "map";
|
|
96
|
+
NonPrimitiveType2["Object"] = "object";
|
|
97
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
98
|
+
NonPrimitiveType2["Set"] = "set";
|
|
99
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
100
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
101
|
+
return NonPrimitiveType2;
|
|
102
|
+
})(NonPrimitiveType || {});
|
|
103
|
+
var TYPE_CONSTANT = "type";
|
|
104
|
+
var VALUE_CONSTANT = "value";
|
|
105
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
106
|
+
|
|
107
|
+
// src/client/client-host-ref.ts
|
|
108
|
+
var getHostRef = (ref) => {
|
|
109
|
+
if (ref.__stencil__getHostRef) {
|
|
110
|
+
return ref.__stencil__getHostRef();
|
|
111
|
+
}
|
|
112
|
+
return void 0;
|
|
113
|
+
};
|
|
114
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
115
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
116
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
117
|
+
};
|
|
15
118
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
119
|
const hostRef = {
|
|
17
120
|
$flags$: 0,
|
|
@@ -27,7 +130,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
27
130
|
hostElement["s-p"] = [];
|
|
28
131
|
hostElement["s-rc"] = [];
|
|
29
132
|
}
|
|
30
|
-
|
|
133
|
+
const ref = hostRef;
|
|
134
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
135
|
+
return ref;
|
|
31
136
|
};
|
|
32
137
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
33
138
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -51,12 +156,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
51
156
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
52
157
|
/* webpackMode: "lazy" */
|
|
53
158
|
`./${bundleId}.entry.js${""}`
|
|
54
|
-
).then(
|
|
55
|
-
{
|
|
56
|
-
|
|
159
|
+
).then(
|
|
160
|
+
(importedModule) => {
|
|
161
|
+
{
|
|
162
|
+
cmpModules.set(bundleId, importedModule);
|
|
163
|
+
}
|
|
164
|
+
return importedModule[exportName];
|
|
165
|
+
},
|
|
166
|
+
(e) => {
|
|
167
|
+
consoleError(e, hostRef.$hostElement$);
|
|
57
168
|
}
|
|
58
|
-
|
|
59
|
-
}, consoleError);
|
|
169
|
+
);
|
|
60
170
|
};
|
|
61
171
|
|
|
62
172
|
// src/client/client-style.ts
|
|
@@ -67,6 +177,7 @@ var CONTENT_REF_ID = "r";
|
|
|
67
177
|
var ORG_LOCATION_ID = "o";
|
|
68
178
|
var SLOT_NODE_ID = "s";
|
|
69
179
|
var TEXT_NODE_ID = "t";
|
|
180
|
+
var COMMENT_NODE_ID = "c";
|
|
70
181
|
var HYDRATE_ID = "s-id";
|
|
71
182
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
72
183
|
var HYDRATE_CHILD_ID = "c-id";
|
|
@@ -80,7 +191,6 @@ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
|
80
191
|
"formStateRestoreCallback"
|
|
81
192
|
];
|
|
82
193
|
var win = typeof window !== "undefined" ? window : {};
|
|
83
|
-
var doc = win.document || { head: {} };
|
|
84
194
|
var plt = {
|
|
85
195
|
$flags$: 0,
|
|
86
196
|
$resourcesUrl$: "",
|
|
@@ -90,11 +200,11 @@ var plt = {
|
|
|
90
200
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
91
201
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
92
202
|
};
|
|
93
|
-
var supportsShadow = BUILD.shadowDom;
|
|
94
203
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
204
|
+
var _a;
|
|
95
205
|
let supportsListenerOptions2 = false;
|
|
96
206
|
try {
|
|
97
|
-
|
|
207
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
98
208
|
"e",
|
|
99
209
|
null,
|
|
100
210
|
Object.defineProperty({}, "passive", {
|
|
@@ -151,25 +261,117 @@ var flush = () => {
|
|
|
151
261
|
};
|
|
152
262
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
153
263
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
154
|
-
|
|
155
|
-
// src/utils/constants.ts
|
|
156
|
-
var EMPTY_OBJ = {};
|
|
157
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
158
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
159
|
-
|
|
160
|
-
// src/utils/helpers.ts
|
|
161
|
-
var isDef = (v) => v != null;
|
|
162
264
|
var isComplexType = (o) => {
|
|
163
265
|
o = typeof o;
|
|
164
266
|
return o === "object" || o === "function";
|
|
165
267
|
};
|
|
166
268
|
|
|
167
269
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
168
|
-
function queryNonceMetaTagContent(
|
|
270
|
+
function queryNonceMetaTagContent(doc) {
|
|
169
271
|
var _a, _b, _c;
|
|
170
|
-
return (_c = (_b = (_a =
|
|
272
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
171
273
|
}
|
|
172
274
|
|
|
275
|
+
// src/utils/regular-expression.ts
|
|
276
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
277
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
// src/utils/remote-value.ts
|
|
281
|
+
var RemoteValue = class _RemoteValue {
|
|
282
|
+
/**
|
|
283
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
284
|
+
*
|
|
285
|
+
* @param serialized The serialized LocalValue object
|
|
286
|
+
* @returns The original JavaScript value/object
|
|
287
|
+
*/
|
|
288
|
+
static fromLocalValue(serialized) {
|
|
289
|
+
const type = serialized[TYPE_CONSTANT];
|
|
290
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
291
|
+
switch (type) {
|
|
292
|
+
case "string" /* String */:
|
|
293
|
+
return value;
|
|
294
|
+
case "boolean" /* Boolean */:
|
|
295
|
+
return value;
|
|
296
|
+
case "bigint" /* BigInt */:
|
|
297
|
+
return BigInt(value);
|
|
298
|
+
case "undefined" /* Undefined */:
|
|
299
|
+
return void 0;
|
|
300
|
+
case "null" /* Null */:
|
|
301
|
+
return null;
|
|
302
|
+
case "number" /* Number */:
|
|
303
|
+
if (value === "NaN") return NaN;
|
|
304
|
+
if (value === "-0") return -0;
|
|
305
|
+
if (value === "Infinity") return Infinity;
|
|
306
|
+
if (value === "-Infinity") return -Infinity;
|
|
307
|
+
return value;
|
|
308
|
+
case "array" /* Array */:
|
|
309
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
310
|
+
case "date" /* Date */:
|
|
311
|
+
return new Date(value);
|
|
312
|
+
case "map" /* Map */:
|
|
313
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
314
|
+
for (const [key, val] of value) {
|
|
315
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
316
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
317
|
+
map2.set(deserializedKey, deserializedValue);
|
|
318
|
+
}
|
|
319
|
+
return map2;
|
|
320
|
+
case "object" /* Object */:
|
|
321
|
+
const obj = {};
|
|
322
|
+
for (const [key, val] of value) {
|
|
323
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
324
|
+
}
|
|
325
|
+
return obj;
|
|
326
|
+
case "regexp" /* RegularExpression */:
|
|
327
|
+
const { pattern, flags } = value;
|
|
328
|
+
return new RegExp(pattern, flags);
|
|
329
|
+
case "set" /* Set */:
|
|
330
|
+
const set = /* @__PURE__ */ new Set();
|
|
331
|
+
for (const item of value) {
|
|
332
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
333
|
+
}
|
|
334
|
+
return set;
|
|
335
|
+
case "symbol" /* Symbol */:
|
|
336
|
+
return Symbol(value);
|
|
337
|
+
default:
|
|
338
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
343
|
+
*
|
|
344
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
345
|
+
* @returns Array of deserialized JavaScript values
|
|
346
|
+
*/
|
|
347
|
+
static fromLocalValueArray(serializedValues) {
|
|
348
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
352
|
+
*
|
|
353
|
+
* @param obj Object to verify
|
|
354
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
355
|
+
*/
|
|
356
|
+
static isLocalValueObject(obj) {
|
|
357
|
+
if (typeof obj !== "object" || obj === null) {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
const type = obj[TYPE_CONSTANT];
|
|
364
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
365
|
+
if (!hasTypeProperty) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
369
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
370
|
+
}
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
|
|
173
375
|
// src/utils/result.ts
|
|
174
376
|
var result_exports = {};
|
|
175
377
|
__export(result_exports, {
|
|
@@ -218,6 +420,98 @@ var unwrapErr = (result) => {
|
|
|
218
420
|
throw result.value;
|
|
219
421
|
}
|
|
220
422
|
};
|
|
423
|
+
|
|
424
|
+
// src/utils/serialize.ts
|
|
425
|
+
function deserializeProperty(value) {
|
|
426
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
427
|
+
return value;
|
|
428
|
+
}
|
|
429
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
430
|
+
}
|
|
431
|
+
function createShadowRoot(cmpMeta) {
|
|
432
|
+
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
433
|
+
if (supportsConstructableStylesheets) {
|
|
434
|
+
const sheet = new CSSStyleSheet();
|
|
435
|
+
sheet.replaceSync(globalStyles);
|
|
436
|
+
shadowRoot.adoptedStyleSheets.push(sheet);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
440
|
+
const result = [];
|
|
441
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
442
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
443
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
444
|
+
result.push(slottedNode);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
return result;
|
|
448
|
+
};
|
|
449
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
450
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
454
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
455
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
456
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
457
|
+
const appendMethod = internalCall(parent, "appendChild");
|
|
458
|
+
if (typeof position !== "undefined") {
|
|
459
|
+
slottedNodeLocation["s-oo"] = position;
|
|
460
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
461
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
462
|
+
childNodes.forEach((n) => {
|
|
463
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
464
|
+
});
|
|
465
|
+
slotRelocateNodes.sort((a, b) => {
|
|
466
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
467
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
468
|
+
return 0;
|
|
469
|
+
});
|
|
470
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
471
|
+
} else {
|
|
472
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
473
|
+
}
|
|
474
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
475
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
476
|
+
};
|
|
477
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
478
|
+
function patchSlotNode(node) {
|
|
479
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
480
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
481
|
+
const toReturn = [];
|
|
482
|
+
const slotName = this["s-sn"];
|
|
483
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
484
|
+
console.error(`
|
|
485
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
486
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
487
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
488
|
+
`);
|
|
489
|
+
}
|
|
490
|
+
const parent = this["s-cr"].parentElement;
|
|
491
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
492
|
+
slottedNodes.forEach((n) => {
|
|
493
|
+
if (slotName === getSlotName(n)) {
|
|
494
|
+
toReturn.push(n);
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
if (elementsOnly) {
|
|
498
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
499
|
+
}
|
|
500
|
+
return toReturn;
|
|
501
|
+
}).bind(node);
|
|
502
|
+
node.assignedElements = assignedFactory(true);
|
|
503
|
+
node.assignedNodes = assignedFactory(false);
|
|
504
|
+
}
|
|
505
|
+
function internalCall(node, method) {
|
|
506
|
+
if ("__" + method in node) {
|
|
507
|
+
const toReturn = node["__" + method];
|
|
508
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
509
|
+
return toReturn.bind(node);
|
|
510
|
+
} else {
|
|
511
|
+
if (typeof node[method] !== "function") return node[method];
|
|
512
|
+
return node[method].bind(node);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
221
515
|
var createTime = (fnName, tagName = "") => {
|
|
222
516
|
{
|
|
223
517
|
return () => {
|
|
@@ -299,44 +593,141 @@ var isHost = (node) => node && node.$tag$ === Host;
|
|
|
299
593
|
|
|
300
594
|
// src/runtime/client-hydrate.ts
|
|
301
595
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
596
|
+
var _a;
|
|
302
597
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
303
598
|
const shadowRoot = hostElm.shadowRoot;
|
|
304
599
|
const childRenderNodes = [];
|
|
305
600
|
const slotNodes = [];
|
|
601
|
+
const slottedNodes = [];
|
|
306
602
|
const shadowRootNodes = shadowRoot ? [] : null;
|
|
307
|
-
const vnode =
|
|
308
|
-
|
|
309
|
-
|
|
603
|
+
const vnode = newVNode(tagName, null);
|
|
604
|
+
vnode.$elm$ = hostElm;
|
|
605
|
+
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
606
|
+
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
607
|
+
var _a2, _b;
|
|
608
|
+
if (!(memberFlags & 31 /* Prop */)) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
const attributeName = metaAttributeName || memberName;
|
|
612
|
+
const attrVal = hostElm.getAttribute(attributeName);
|
|
613
|
+
if (attrVal !== null) {
|
|
614
|
+
const attrPropVal = parsePropertyValue(
|
|
615
|
+
attrVal,
|
|
616
|
+
memberFlags,
|
|
617
|
+
!!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
|
|
618
|
+
);
|
|
619
|
+
(_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
623
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
310
624
|
}
|
|
311
625
|
hostElm[HYDRATE_ID] = hostId;
|
|
312
626
|
hostElm.removeAttribute(HYDRATE_ID);
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
627
|
+
hostRef.$vnode$ = clientHydrate(
|
|
628
|
+
vnode,
|
|
629
|
+
childRenderNodes,
|
|
630
|
+
slotNodes,
|
|
631
|
+
shadowRootNodes,
|
|
632
|
+
hostElm,
|
|
633
|
+
hostElm,
|
|
634
|
+
hostId,
|
|
635
|
+
slottedNodes
|
|
636
|
+
);
|
|
637
|
+
let crIndex = 0;
|
|
638
|
+
const crLength = childRenderNodes.length;
|
|
639
|
+
let childRenderNode;
|
|
640
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
641
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
642
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
316
643
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
317
|
-
const node =
|
|
318
|
-
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
319
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
320
|
-
}
|
|
644
|
+
const node = childRenderNode.$elm$;
|
|
321
645
|
if (!shadowRoot) {
|
|
322
|
-
node["s-hn"] = tagName;
|
|
323
|
-
if (
|
|
324
|
-
node["s-
|
|
325
|
-
|
|
646
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
647
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
648
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
652
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
653
|
+
if (childRenderNode.$children$) {
|
|
654
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
655
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
656
|
+
childRenderNode.$children$.forEach((c) => {
|
|
657
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
} else {
|
|
661
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
665
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
666
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
667
|
+
}
|
|
668
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
669
|
+
if (!shadowRoot) {
|
|
670
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
326
671
|
}
|
|
327
672
|
}
|
|
328
673
|
plt.$orgLocNodes$.delete(orgLocationId);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
674
|
+
}
|
|
675
|
+
const hosts = [];
|
|
676
|
+
const snLen = slottedNodes.length;
|
|
677
|
+
let snIndex = 0;
|
|
678
|
+
let slotGroup;
|
|
679
|
+
let snGroupIdx;
|
|
680
|
+
let snGroupLen;
|
|
681
|
+
let slottedItem;
|
|
682
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
683
|
+
slotGroup = slottedNodes[snIndex];
|
|
684
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
685
|
+
snGroupLen = slotGroup.length;
|
|
686
|
+
snGroupIdx = 0;
|
|
687
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
688
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
689
|
+
if (!hosts[slottedItem.hostId]) {
|
|
690
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
334
691
|
}
|
|
335
|
-
|
|
692
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
693
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
694
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
695
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
696
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
697
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
698
|
+
} else {
|
|
699
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
700
|
+
}
|
|
701
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
702
|
+
}
|
|
703
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
704
|
+
hostEle.appendChild(slottedItem.node);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
709
|
+
let rnIdex = 0;
|
|
710
|
+
const rnLen = shadowRootNodes.length;
|
|
711
|
+
if (rnLen) {
|
|
712
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
713
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
714
|
+
}
|
|
715
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
716
|
+
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
717
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
718
|
+
node.removeAttribute("hidden");
|
|
719
|
+
} else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
720
|
+
node.parentNode.removeChild(node);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
}
|
|
336
725
|
}
|
|
726
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
727
|
+
hostRef.$hostElement$ = hostElm;
|
|
337
728
|
endHydrate();
|
|
338
729
|
};
|
|
339
|
-
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
730
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
340
731
|
let childNodeType;
|
|
341
732
|
let childIdSplt;
|
|
342
733
|
let childVNode;
|
|
@@ -346,7 +737,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
346
737
|
if (childNodeType) {
|
|
347
738
|
childIdSplt = childNodeType.split(".");
|
|
348
739
|
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
349
|
-
childVNode = {
|
|
740
|
+
childVNode = createSimpleVNode({
|
|
350
741
|
$flags$: 0,
|
|
351
742
|
$hostId$: childIdSplt[0],
|
|
352
743
|
$nodeId$: childIdSplt[1],
|
|
@@ -354,18 +745,36 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
354
745
|
$index$: childIdSplt[3],
|
|
355
746
|
$tag$: node.tagName.toLowerCase(),
|
|
356
747
|
$elm$: node,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
$
|
|
360
|
-
|
|
361
|
-
$text$: null
|
|
362
|
-
};
|
|
748
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
749
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
750
|
+
$attrs$: { class: node.className || "" }
|
|
751
|
+
});
|
|
363
752
|
childRenderNodes.push(childVNode);
|
|
364
753
|
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
365
754
|
if (!parentVNode.$children$) {
|
|
366
755
|
parentVNode.$children$ = [];
|
|
367
756
|
}
|
|
368
|
-
|
|
757
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
758
|
+
if (typeof slotName === "string") {
|
|
759
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
760
|
+
addSlot(
|
|
761
|
+
slotName,
|
|
762
|
+
childIdSplt[2],
|
|
763
|
+
childVNode,
|
|
764
|
+
node,
|
|
765
|
+
parentVNode,
|
|
766
|
+
childRenderNodes,
|
|
767
|
+
slotNodes,
|
|
768
|
+
shadowRootNodes,
|
|
769
|
+
slottedNodes
|
|
770
|
+
);
|
|
771
|
+
}
|
|
772
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
773
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
774
|
+
}
|
|
775
|
+
if (childVNode.$index$ !== void 0) {
|
|
776
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
777
|
+
}
|
|
369
778
|
parentVNode = childVNode;
|
|
370
779
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
371
780
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
@@ -381,31 +790,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
381
790
|
shadowRootNodes,
|
|
382
791
|
hostElm,
|
|
383
792
|
node.shadowRoot.childNodes[i2],
|
|
384
|
-
hostId
|
|
793
|
+
hostId,
|
|
794
|
+
slottedNodes
|
|
385
795
|
);
|
|
386
796
|
}
|
|
387
797
|
}
|
|
388
|
-
|
|
798
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
799
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
389
800
|
clientHydrate(
|
|
390
801
|
parentVNode,
|
|
391
802
|
childRenderNodes,
|
|
392
803
|
slotNodes,
|
|
393
804
|
shadowRootNodes,
|
|
394
805
|
hostElm,
|
|
395
|
-
|
|
396
|
-
hostId
|
|
806
|
+
nonShadowNodes[i2],
|
|
807
|
+
hostId,
|
|
808
|
+
slottedNodes
|
|
397
809
|
);
|
|
398
810
|
}
|
|
399
811
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
400
812
|
childIdSplt = node.nodeValue.split(".");
|
|
401
813
|
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
402
814
|
childNodeType = childIdSplt[0];
|
|
403
|
-
childVNode = {
|
|
404
|
-
$flags$: 0,
|
|
815
|
+
childVNode = createSimpleVNode({
|
|
405
816
|
$hostId$: childIdSplt[1],
|
|
406
817
|
$nodeId$: childIdSplt[2],
|
|
407
818
|
$depth$: childIdSplt[3],
|
|
408
|
-
$index$: childIdSplt[4],
|
|
819
|
+
$index$: childIdSplt[4] || "0",
|
|
409
820
|
$elm$: node,
|
|
410
821
|
$attrs$: null,
|
|
411
822
|
$children$: null,
|
|
@@ -413,46 +824,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
413
824
|
$name$: null,
|
|
414
825
|
$tag$: null,
|
|
415
826
|
$text$: null
|
|
416
|
-
};
|
|
827
|
+
});
|
|
417
828
|
if (childNodeType === TEXT_NODE_ID) {
|
|
418
|
-
childVNode.$elm$ = node
|
|
829
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
419
830
|
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
420
831
|
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
421
832
|
childRenderNodes.push(childVNode);
|
|
422
833
|
node.remove();
|
|
423
|
-
if (
|
|
424
|
-
parentVNode.$children$
|
|
834
|
+
if (hostId === childVNode.$hostId$) {
|
|
835
|
+
if (!parentVNode.$children$) {
|
|
836
|
+
parentVNode.$children$ = [];
|
|
837
|
+
}
|
|
838
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
425
839
|
}
|
|
426
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
427
840
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
428
841
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
429
842
|
}
|
|
430
843
|
}
|
|
844
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
845
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
846
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
847
|
+
childRenderNodes.push(childVNode);
|
|
848
|
+
node.remove();
|
|
849
|
+
}
|
|
431
850
|
} else if (childVNode.$hostId$ === hostId) {
|
|
432
851
|
if (childNodeType === SLOT_NODE_ID) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
446
|
-
node.remove();
|
|
447
|
-
if (childVNode.$depth$ === "0") {
|
|
448
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
slotNodes.push(childVNode);
|
|
452
|
-
if (!parentVNode.$children$) {
|
|
453
|
-
parentVNode.$children$ = [];
|
|
454
|
-
}
|
|
455
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
852
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
853
|
+
addSlot(
|
|
854
|
+
slotName,
|
|
855
|
+
childIdSplt[2],
|
|
856
|
+
childVNode,
|
|
857
|
+
node,
|
|
858
|
+
parentVNode,
|
|
859
|
+
childRenderNodes,
|
|
860
|
+
slotNodes,
|
|
861
|
+
shadowRootNodes,
|
|
862
|
+
slottedNodes
|
|
863
|
+
);
|
|
456
864
|
} else if (childNodeType === CONTENT_REF_ID) {
|
|
457
865
|
if (shadowRootNodes) {
|
|
458
866
|
node.remove();
|
|
@@ -465,18 +873,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
465
873
|
vnode.$elm$ = node;
|
|
466
874
|
vnode.$index$ = "0";
|
|
467
875
|
parentVNode.$children$ = [vnode];
|
|
876
|
+
} else {
|
|
877
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
878
|
+
node.remove();
|
|
879
|
+
}
|
|
468
880
|
}
|
|
881
|
+
return parentVNode;
|
|
469
882
|
};
|
|
470
883
|
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
471
884
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
885
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
886
|
+
if (componentId) {
|
|
887
|
+
orgLocNodes.set(componentId, node);
|
|
888
|
+
}
|
|
472
889
|
let i2 = 0;
|
|
473
890
|
if (node.shadowRoot) {
|
|
474
891
|
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
475
892
|
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
476
893
|
}
|
|
477
894
|
}
|
|
478
|
-
|
|
479
|
-
|
|
895
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
896
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
897
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
480
898
|
}
|
|
481
899
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
482
900
|
const childIdSplt = node.nodeValue.split(".");
|
|
@@ -487,13 +905,109 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
|
487
905
|
}
|
|
488
906
|
}
|
|
489
907
|
};
|
|
490
|
-
var
|
|
908
|
+
var createSimpleVNode = (vnode) => {
|
|
909
|
+
const defaultVNode = {
|
|
910
|
+
$flags$: 0,
|
|
911
|
+
$hostId$: null,
|
|
912
|
+
$nodeId$: null,
|
|
913
|
+
$depth$: null,
|
|
914
|
+
$index$: "0",
|
|
915
|
+
$elm$: null,
|
|
916
|
+
$attrs$: null,
|
|
917
|
+
$children$: null,
|
|
918
|
+
$key$: null,
|
|
919
|
+
$name$: null,
|
|
920
|
+
$tag$: null,
|
|
921
|
+
$text$: null
|
|
922
|
+
};
|
|
923
|
+
return { ...defaultVNode, ...vnode };
|
|
924
|
+
};
|
|
925
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
926
|
+
node["s-sr"] = true;
|
|
927
|
+
childVNode.$name$ = slotName || null;
|
|
928
|
+
childVNode.$tag$ = "slot";
|
|
929
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
930
|
+
if (shadowRootNodes && win.document) {
|
|
931
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
932
|
+
if (childVNode.$name$) {
|
|
933
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
934
|
+
}
|
|
935
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
936
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
937
|
+
} else {
|
|
938
|
+
node.parentNode.insertBefore(slot, node);
|
|
939
|
+
}
|
|
940
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
941
|
+
node.remove();
|
|
942
|
+
if (childVNode.$depth$ === "0") {
|
|
943
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
944
|
+
}
|
|
945
|
+
} else {
|
|
946
|
+
const slot = childVNode.$elm$;
|
|
947
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
948
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
949
|
+
patchSlotNode(node);
|
|
950
|
+
if (shouldMove) {
|
|
951
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
childRenderNodes.push(childVNode);
|
|
955
|
+
slotNodes.push(childVNode);
|
|
956
|
+
if (!parentVNode.$children$) {
|
|
957
|
+
parentVNode.$children$ = [];
|
|
958
|
+
}
|
|
959
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
960
|
+
}
|
|
961
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
962
|
+
let slottedNode = slotNode.nextSibling;
|
|
963
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
964
|
+
while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
965
|
+
slottedNode["s-sn"] = slotName;
|
|
966
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
967
|
+
slottedNode = slottedNode.nextSibling;
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
var findCorrespondingNode = (node, type) => {
|
|
971
|
+
let sibling = node;
|
|
972
|
+
do {
|
|
973
|
+
sibling = sibling.nextSibling;
|
|
974
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
975
|
+
return sibling;
|
|
976
|
+
};
|
|
977
|
+
var createSupportsRuleRe = (selector) => {
|
|
978
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
979
|
+
return new RegExp(
|
|
980
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
981
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
982
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
983
|
+
"g"
|
|
984
|
+
);
|
|
985
|
+
};
|
|
986
|
+
createSupportsRuleRe("::slotted");
|
|
987
|
+
createSupportsRuleRe(":host");
|
|
988
|
+
createSupportsRuleRe(":host-context");
|
|
989
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
990
|
+
if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
991
|
+
try {
|
|
992
|
+
propValue = JSON.parse(propValue);
|
|
993
|
+
return propValue;
|
|
994
|
+
} catch (e) {
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
998
|
+
propValue = deserializeProperty(propValue);
|
|
999
|
+
return propValue;
|
|
1000
|
+
}
|
|
491
1001
|
if (propValue != null && !isComplexType(propValue)) {
|
|
492
1002
|
if (propType & 4 /* Boolean */) {
|
|
493
|
-
|
|
1003
|
+
if (isFormAssociated && typeof propValue === "string") {
|
|
1004
|
+
return propValue === "" || !!propValue;
|
|
1005
|
+
} else {
|
|
1006
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1007
|
+
}
|
|
494
1008
|
}
|
|
495
1009
|
if (propType & 2 /* Number */) {
|
|
496
|
-
return parseFloat(propValue);
|
|
1010
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
497
1011
|
}
|
|
498
1012
|
if (propType & 1 /* String */) {
|
|
499
1013
|
return String(propValue);
|
|
@@ -510,9 +1024,9 @@ var createEvent = (ref, name, flags) => {
|
|
|
510
1024
|
return {
|
|
511
1025
|
emit: (detail) => {
|
|
512
1026
|
return emitEvent(elm, name, {
|
|
513
|
-
bubbles:
|
|
514
|
-
composed:
|
|
515
|
-
cancelable:
|
|
1027
|
+
bubbles: true,
|
|
1028
|
+
composed: true,
|
|
1029
|
+
cancelable: true,
|
|
516
1030
|
detail
|
|
517
1031
|
});
|
|
518
1032
|
}
|
|
@@ -542,7 +1056,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
542
1056
|
var _a;
|
|
543
1057
|
const scopeId2 = getScopeId(cmpMeta);
|
|
544
1058
|
const style = styles.get(scopeId2);
|
|
545
|
-
|
|
1059
|
+
if (!win.document) {
|
|
1060
|
+
return scopeId2;
|
|
1061
|
+
}
|
|
1062
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
546
1063
|
if (style) {
|
|
547
1064
|
if (typeof style === "string") {
|
|
548
1065
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -555,9 +1072,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
555
1072
|
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
556
1073
|
styleElm.innerHTML = style;
|
|
557
1074
|
} else {
|
|
558
|
-
styleElm =
|
|
1075
|
+
styleElm = win.document.createElement("style");
|
|
559
1076
|
styleElm.innerHTML = style;
|
|
560
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1077
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
561
1078
|
if (nonce != null) {
|
|
562
1079
|
styleElm.setAttribute("nonce", nonce);
|
|
563
1080
|
}
|
|
@@ -565,14 +1082,28 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
565
1082
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
566
1083
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
567
1084
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
568
|
-
styleContainerNode.insertBefore(
|
|
1085
|
+
styleContainerNode.insertBefore(
|
|
1086
|
+
styleElm,
|
|
1087
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1088
|
+
);
|
|
569
1089
|
} else if ("host" in styleContainerNode) {
|
|
570
|
-
|
|
1090
|
+
if (supportsConstructableStylesheets) {
|
|
1091
|
+
const stylesheet = new CSSStyleSheet();
|
|
1092
|
+
stylesheet.replaceSync(style);
|
|
1093
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1094
|
+
} else {
|
|
1095
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1096
|
+
if (existingStyleContainer) {
|
|
1097
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1098
|
+
} else {
|
|
1099
|
+
styleContainerNode.prepend(styleElm);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
571
1102
|
} else {
|
|
572
1103
|
styleContainerNode.append(styleElm);
|
|
573
1104
|
}
|
|
574
1105
|
}
|
|
575
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
1106
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
576
1107
|
styleContainerNode.insertBefore(styleElm, null);
|
|
577
1108
|
}
|
|
578
1109
|
}
|
|
@@ -597,132 +1128,177 @@ var attachStyles = (hostRef) => {
|
|
|
597
1128
|
const scopeId2 = addStyle(
|
|
598
1129
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
599
1130
|
cmpMeta);
|
|
600
|
-
if (flags & 10 /* needsScopedEncapsulation */
|
|
1131
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
601
1132
|
elm["s-sc"] = scopeId2;
|
|
602
1133
|
elm.classList.add(scopeId2 + "-h");
|
|
603
1134
|
}
|
|
604
1135
|
endAttachStyles();
|
|
605
1136
|
};
|
|
606
1137
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
607
|
-
var
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
1138
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1139
|
+
var hydrateScopedToShadow = () => {
|
|
1140
|
+
if (!win.document) {
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1144
|
+
let i2 = 0;
|
|
1145
|
+
for (; i2 < styles2.length; i2++) {
|
|
1146
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1150
|
+
if (oldValue === newValue) {
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1154
|
+
let ln = memberName.toLowerCase();
|
|
1155
|
+
if (memberName === "class") {
|
|
1156
|
+
const classList = elm.classList;
|
|
1157
|
+
const oldClasses = parseClassList(oldValue);
|
|
1158
|
+
let newClasses = parseClassList(newValue);
|
|
1159
|
+
if (elm["s-si"] && initialRender) {
|
|
1160
|
+
newClasses.push(elm["s-si"]);
|
|
1161
|
+
oldClasses.forEach((c) => {
|
|
1162
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1163
|
+
});
|
|
1164
|
+
newClasses = [...new Set(newClasses)];
|
|
1165
|
+
classList.add(...newClasses);
|
|
1166
|
+
} else {
|
|
615
1167
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
616
1168
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
elm.style.removeProperty(prop);
|
|
623
|
-
} else {
|
|
624
|
-
elm.style[prop] = "";
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
for (const prop in newValue) {
|
|
630
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1169
|
+
}
|
|
1170
|
+
} else if (memberName === "style") {
|
|
1171
|
+
{
|
|
1172
|
+
for (const prop in oldValue) {
|
|
1173
|
+
if (!newValue || newValue[prop] == null) {
|
|
631
1174
|
if (prop.includes("-")) {
|
|
632
|
-
elm.style.
|
|
1175
|
+
elm.style.removeProperty(prop);
|
|
633
1176
|
} else {
|
|
634
|
-
elm.style[prop] =
|
|
1177
|
+
elm.style[prop] = "";
|
|
635
1178
|
}
|
|
636
1179
|
}
|
|
637
1180
|
}
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
} else if (isMemberInElement(win, ln)) {
|
|
646
|
-
memberName = ln.slice(2);
|
|
647
|
-
} else {
|
|
648
|
-
memberName = ln[2] + memberName.slice(3);
|
|
649
|
-
}
|
|
650
|
-
if (oldValue || newValue) {
|
|
651
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
652
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
653
|
-
if (oldValue) {
|
|
654
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
655
|
-
}
|
|
656
|
-
if (newValue) {
|
|
657
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
1181
|
+
}
|
|
1182
|
+
for (const prop in newValue) {
|
|
1183
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1184
|
+
if (prop.includes("-")) {
|
|
1185
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1186
|
+
} else {
|
|
1187
|
+
elm.style[prop] = newValue[prop];
|
|
658
1188
|
}
|
|
659
1189
|
}
|
|
1190
|
+
}
|
|
1191
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1192
|
+
if (newValue) {
|
|
1193
|
+
newValue(elm);
|
|
1194
|
+
}
|
|
1195
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1196
|
+
if (memberName[2] === "-") {
|
|
1197
|
+
memberName = memberName.slice(3);
|
|
1198
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1199
|
+
memberName = ln.slice(2);
|
|
660
1200
|
} else {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
1201
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1202
|
+
}
|
|
1203
|
+
if (oldValue || newValue) {
|
|
1204
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1205
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1206
|
+
if (oldValue) {
|
|
1207
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1208
|
+
}
|
|
1209
|
+
if (newValue) {
|
|
1210
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
} else {
|
|
1214
|
+
const isComplex = isComplexType(newValue);
|
|
1215
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1216
|
+
try {
|
|
1217
|
+
if (!elm.tagName.includes("-")) {
|
|
1218
|
+
const n = newValue == null ? "" : newValue;
|
|
1219
|
+
if (memberName === "list") {
|
|
1220
|
+
isProp = false;
|
|
1221
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1222
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
1223
|
+
elm[memberName] = n;
|
|
1224
|
+
} else {
|
|
1225
|
+
elm.setAttribute(memberName, n);
|
|
674
1226
|
}
|
|
675
|
-
} else {
|
|
676
|
-
elm[memberName] = newValue;
|
|
677
1227
|
}
|
|
678
|
-
}
|
|
1228
|
+
} else if (elm[memberName] !== newValue) {
|
|
1229
|
+
elm[memberName] = newValue;
|
|
679
1230
|
}
|
|
1231
|
+
} catch (e) {
|
|
680
1232
|
}
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
1233
|
+
}
|
|
1234
|
+
let xlink = false;
|
|
1235
|
+
{
|
|
1236
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1237
|
+
memberName = ln;
|
|
1238
|
+
xlink = true;
|
|
687
1239
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
692
|
-
} else {
|
|
693
|
-
elm.removeAttribute(memberName);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
697
|
-
newValue = newValue === true ? "" : newValue;
|
|
1240
|
+
}
|
|
1241
|
+
if (newValue == null || newValue === false) {
|
|
1242
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
698
1243
|
if (xlink) {
|
|
699
|
-
elm.
|
|
1244
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
700
1245
|
} else {
|
|
701
|
-
elm.
|
|
1246
|
+
elm.removeAttribute(memberName);
|
|
702
1247
|
}
|
|
703
1248
|
}
|
|
1249
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1250
|
+
newValue = newValue === true ? "" : newValue;
|
|
1251
|
+
if (xlink) {
|
|
1252
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1253
|
+
} else {
|
|
1254
|
+
elm.setAttribute(memberName, newValue);
|
|
1255
|
+
}
|
|
704
1256
|
}
|
|
705
1257
|
}
|
|
706
1258
|
};
|
|
707
1259
|
var parseClassListRegex = /\s/;
|
|
708
|
-
var parseClassList = (value) =>
|
|
1260
|
+
var parseClassList = (value) => {
|
|
1261
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1262
|
+
value = value.baseVal;
|
|
1263
|
+
}
|
|
1264
|
+
if (!value || typeof value !== "string") {
|
|
1265
|
+
return [];
|
|
1266
|
+
}
|
|
1267
|
+
return value.split(parseClassListRegex);
|
|
1268
|
+
};
|
|
709
1269
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
710
1270
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
711
1271
|
|
|
712
1272
|
// src/runtime/vdom/update-element.ts
|
|
713
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
1273
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
714
1274
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
715
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
716
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
1275
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1276
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
717
1277
|
{
|
|
718
1278
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
719
1279
|
if (!(memberName in newVnodeAttrs)) {
|
|
720
|
-
setAccessor(
|
|
1280
|
+
setAccessor(
|
|
1281
|
+
elm,
|
|
1282
|
+
memberName,
|
|
1283
|
+
oldVnodeAttrs[memberName],
|
|
1284
|
+
void 0,
|
|
1285
|
+
isSvgMode2,
|
|
1286
|
+
newVnode.$flags$,
|
|
1287
|
+
isInitialRender
|
|
1288
|
+
);
|
|
721
1289
|
}
|
|
722
1290
|
}
|
|
723
1291
|
}
|
|
724
1292
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
725
|
-
setAccessor(
|
|
1293
|
+
setAccessor(
|
|
1294
|
+
elm,
|
|
1295
|
+
memberName,
|
|
1296
|
+
oldVnodeAttrs[memberName],
|
|
1297
|
+
newVnodeAttrs[memberName],
|
|
1298
|
+
isSvgMode2,
|
|
1299
|
+
newVnode.$flags$,
|
|
1300
|
+
isInitialRender
|
|
1301
|
+
);
|
|
726
1302
|
}
|
|
727
1303
|
};
|
|
728
1304
|
function sortedAttrNames(attrNames) {
|
|
@@ -734,26 +1310,27 @@ function sortedAttrNames(attrNames) {
|
|
|
734
1310
|
attrNames
|
|
735
1311
|
);
|
|
736
1312
|
}
|
|
737
|
-
|
|
738
|
-
// src/runtime/vdom/vdom-render.ts
|
|
739
|
-
var scopeId;
|
|
740
1313
|
var hostTagName;
|
|
741
|
-
var useNativeShadowDom = false;
|
|
742
1314
|
var isSvgMode = false;
|
|
743
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
1315
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
744
1316
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
745
1317
|
let i2 = 0;
|
|
746
1318
|
let elm;
|
|
747
1319
|
let childNode;
|
|
748
1320
|
if (newVNode2.$text$ !== null) {
|
|
749
|
-
elm = newVNode2.$elm$ =
|
|
1321
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
750
1322
|
} else {
|
|
751
1323
|
if (!isSvgMode) {
|
|
752
1324
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
753
1325
|
}
|
|
754
|
-
|
|
1326
|
+
if (!win.document) {
|
|
1327
|
+
throw new Error(
|
|
1328
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
1329
|
+
);
|
|
1330
|
+
}
|
|
1331
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
755
1332
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
756
|
-
|
|
1333
|
+
newVNode2.$tag$
|
|
757
1334
|
) ;
|
|
758
1335
|
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
759
1336
|
isSvgMode = false;
|
|
@@ -761,11 +1338,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
761
1338
|
{
|
|
762
1339
|
updateElement(null, newVNode2, isSvgMode);
|
|
763
1340
|
}
|
|
764
|
-
const rootNode = elm.getRootNode();
|
|
765
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
766
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
767
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
768
|
-
}
|
|
769
1341
|
if (newVNode2.$children$) {
|
|
770
1342
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
771
1343
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -902,6 +1474,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
902
1474
|
if (!isInitialRender) {
|
|
903
1475
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
904
1476
|
}
|
|
1477
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1478
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1479
|
+
}
|
|
905
1480
|
return true;
|
|
906
1481
|
}
|
|
907
1482
|
return false;
|
|
@@ -917,9 +1492,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
917
1492
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
918
1493
|
}
|
|
919
1494
|
{
|
|
920
|
-
|
|
921
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
922
|
-
}
|
|
1495
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
923
1496
|
}
|
|
924
1497
|
if (oldChildren !== null && newChildren !== null) {
|
|
925
1498
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -948,14 +1521,16 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
948
1521
|
}
|
|
949
1522
|
};
|
|
950
1523
|
var insertBefore = (parent, newNode, reference) => {
|
|
951
|
-
|
|
952
|
-
|
|
1524
|
+
{
|
|
1525
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1526
|
+
}
|
|
953
1527
|
};
|
|
954
1528
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
955
1529
|
const hostElm = hostRef.$hostElement$;
|
|
956
1530
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
957
1531
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
958
|
-
const
|
|
1532
|
+
const isHostElement = isHost(renderFnResults);
|
|
1533
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
959
1534
|
hostTagName = hostElm.tagName;
|
|
960
1535
|
if (cmpMeta.$attrsToReflect$) {
|
|
961
1536
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
@@ -974,17 +1549,20 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
974
1549
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
975
1550
|
hostRef.$vnode$ = rootVnode;
|
|
976
1551
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
977
|
-
{
|
|
978
|
-
scopeId = hostElm["s-sc"];
|
|
979
|
-
}
|
|
980
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
981
1552
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
982
1553
|
};
|
|
983
1554
|
|
|
984
1555
|
// src/runtime/update-component.ts
|
|
985
1556
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
986
1557
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
987
|
-
ancestorComponent["s-p"].push(
|
|
1558
|
+
const index = ancestorComponent["s-p"].push(
|
|
1559
|
+
new Promise(
|
|
1560
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1561
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1562
|
+
r();
|
|
1563
|
+
}
|
|
1564
|
+
)
|
|
1565
|
+
);
|
|
988
1566
|
}
|
|
989
1567
|
};
|
|
990
1568
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1013,14 +1591,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1013
1591
|
{
|
|
1014
1592
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1015
1593
|
if (hostRef.$queuedListeners$) {
|
|
1016
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1594
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1017
1595
|
hostRef.$queuedListeners$ = void 0;
|
|
1018
1596
|
}
|
|
1019
1597
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1598
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1599
|
+
} else {
|
|
1600
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1023
1601
|
}
|
|
1602
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1024
1603
|
endSchedule();
|
|
1025
1604
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1026
1605
|
};
|
|
@@ -1063,7 +1642,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1063
1642
|
try {
|
|
1064
1643
|
instance = instance.render() ;
|
|
1065
1644
|
{
|
|
1066
|
-
hostRef.$flags$ &=
|
|
1645
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
1067
1646
|
}
|
|
1068
1647
|
{
|
|
1069
1648
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -1086,14 +1665,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1086
1665
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1087
1666
|
const instance = hostRef.$lazyInstance$ ;
|
|
1088
1667
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1668
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1089
1669
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1090
1670
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1091
1671
|
{
|
|
1092
1672
|
addHydratedFlag(elm);
|
|
1093
1673
|
}
|
|
1094
|
-
|
|
1095
|
-
safeCall(instance, "componentDidLoad");
|
|
1096
|
-
}
|
|
1674
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1097
1675
|
endPostUpdate();
|
|
1098
1676
|
{
|
|
1099
1677
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1102,6 +1680,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1102
1680
|
}
|
|
1103
1681
|
}
|
|
1104
1682
|
} else {
|
|
1683
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1105
1684
|
endPostUpdate();
|
|
1106
1685
|
}
|
|
1107
1686
|
{
|
|
@@ -1115,21 +1694,18 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1115
1694
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1116
1695
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1117
1696
|
}
|
|
1118
|
-
hostRef.$flags$ &=
|
|
1697
|
+
hostRef.$flags$ &= -517;
|
|
1119
1698
|
}
|
|
1120
1699
|
};
|
|
1121
1700
|
var appDidLoad = (who) => {
|
|
1122
|
-
{
|
|
1123
|
-
addHydratedFlag(doc.documentElement);
|
|
1124
|
-
}
|
|
1125
1701
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1126
1702
|
};
|
|
1127
|
-
var safeCall = (instance, method, arg) => {
|
|
1703
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1128
1704
|
if (instance && instance[method]) {
|
|
1129
1705
|
try {
|
|
1130
1706
|
return instance[method](arg);
|
|
1131
1707
|
} catch (e) {
|
|
1132
|
-
consoleError(e);
|
|
1708
|
+
consoleError(e, elm);
|
|
1133
1709
|
}
|
|
1134
1710
|
}
|
|
1135
1711
|
return void 0;
|
|
@@ -1145,14 +1721,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1145
1721
|
const hostRef = getHostRef(ref);
|
|
1146
1722
|
if (!hostRef) {
|
|
1147
1723
|
throw new Error(
|
|
1148
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
1724
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
1149
1725
|
);
|
|
1150
1726
|
}
|
|
1151
1727
|
const elm = hostRef.$hostElement$ ;
|
|
1152
1728
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1153
1729
|
const flags = hostRef.$flags$;
|
|
1154
1730
|
const instance = hostRef.$lazyInstance$ ;
|
|
1155
|
-
newVal = parsePropertyValue(
|
|
1731
|
+
newVal = parsePropertyValue(
|
|
1732
|
+
newVal,
|
|
1733
|
+
cmpMeta.$members$[propName][0],
|
|
1734
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1735
|
+
);
|
|
1156
1736
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1157
1737
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1158
1738
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -1171,6 +1751,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1171
1751
|
}
|
|
1172
1752
|
}
|
|
1173
1753
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1754
|
+
if (instance.componentShouldUpdate) {
|
|
1755
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1174
1759
|
scheduleUpdate(hostRef, false);
|
|
1175
1760
|
}
|
|
1176
1761
|
}
|
|
@@ -1182,23 +1767,23 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1182
1767
|
var _a, _b;
|
|
1183
1768
|
const prototype = Cstr.prototype;
|
|
1184
1769
|
if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
1185
|
-
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
|
|
1186
|
-
|
|
1770
|
+
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
1771
|
+
Object.defineProperty(prototype, cbName, {
|
|
1187
1772
|
value(...args) {
|
|
1188
1773
|
const hostRef = getHostRef(this);
|
|
1189
1774
|
const instance = hostRef.$lazyInstance$ ;
|
|
1190
1775
|
if (!instance) {
|
|
1191
|
-
hostRef.$onReadyPromise$.then((
|
|
1192
|
-
const cb =
|
|
1193
|
-
typeof cb === "function" && cb.call(
|
|
1776
|
+
hostRef.$onReadyPromise$.then((asyncInstance) => {
|
|
1777
|
+
const cb = asyncInstance[cbName];
|
|
1778
|
+
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
1194
1779
|
});
|
|
1195
1780
|
} else {
|
|
1196
|
-
const cb = instance[cbName];
|
|
1781
|
+
const cb = instance[cbName] ;
|
|
1197
1782
|
typeof cb === "function" && cb.call(instance, ...args);
|
|
1198
1783
|
}
|
|
1199
1784
|
}
|
|
1200
|
-
})
|
|
1201
|
-
);
|
|
1785
|
+
});
|
|
1786
|
+
});
|
|
1202
1787
|
}
|
|
1203
1788
|
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
1204
1789
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
@@ -1207,15 +1792,78 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1207
1792
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1208
1793
|
members.map(([memberName, [memberFlags]]) => {
|
|
1209
1794
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1795
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1796
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1797
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1798
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1799
|
+
Object.defineProperty(prototype, memberName, {
|
|
1800
|
+
get() {
|
|
1801
|
+
{
|
|
1802
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1803
|
+
return getValue(this, memberName);
|
|
1804
|
+
}
|
|
1805
|
+
const ref = getHostRef(this);
|
|
1806
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1807
|
+
if (!instance) return;
|
|
1808
|
+
return instance[memberName];
|
|
1809
|
+
}
|
|
1810
|
+
},
|
|
1811
|
+
configurable: true,
|
|
1812
|
+
enumerable: true
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1210
1815
|
Object.defineProperty(prototype, memberName, {
|
|
1211
|
-
get() {
|
|
1212
|
-
return getValue(this, memberName);
|
|
1213
|
-
},
|
|
1214
1816
|
set(newValue) {
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1817
|
+
const ref = getHostRef(this);
|
|
1818
|
+
if (origSetter) {
|
|
1819
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1820
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1821
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1822
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1823
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1824
|
+
}
|
|
1825
|
+
origSetter.apply(this, [
|
|
1826
|
+
parsePropertyValue(
|
|
1827
|
+
newValue,
|
|
1828
|
+
memberFlags,
|
|
1829
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1830
|
+
)
|
|
1831
|
+
]);
|
|
1832
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1833
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1836
|
+
{
|
|
1837
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1838
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1839
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1840
|
+
ref.$onReadyPromise$.then(() => {
|
|
1841
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1842
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1843
|
+
}
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
return;
|
|
1847
|
+
}
|
|
1848
|
+
const setterSetVal = () => {
|
|
1849
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1850
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1851
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1852
|
+
}
|
|
1853
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1854
|
+
newValue,
|
|
1855
|
+
memberFlags,
|
|
1856
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1857
|
+
);
|
|
1858
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1859
|
+
};
|
|
1860
|
+
if (ref.$lazyInstance$) {
|
|
1861
|
+
setterSetVal();
|
|
1862
|
+
} else {
|
|
1863
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1219
1867
|
});
|
|
1220
1868
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1221
1869
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -1236,7 +1884,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1236
1884
|
plt.jmp(() => {
|
|
1237
1885
|
var _a2;
|
|
1238
1886
|
const propName = attrNameToPropName.get(attrName);
|
|
1239
|
-
if (this.hasOwnProperty(propName)) {
|
|
1887
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1240
1888
|
newValue = this[propName];
|
|
1241
1889
|
delete this[propName];
|
|
1242
1890
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1256,7 +1904,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1256
1904
|
}
|
|
1257
1905
|
return;
|
|
1258
1906
|
}
|
|
1259
|
-
|
|
1907
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1908
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1909
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1910
|
+
this[propName] = newValue;
|
|
1911
|
+
}
|
|
1260
1912
|
});
|
|
1261
1913
|
};
|
|
1262
1914
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1285,7 +1937,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1285
1937
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1286
1938
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1287
1939
|
if (bundleId) {
|
|
1288
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1940
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1289
1941
|
if (CstrImport && "then" in CstrImport) {
|
|
1290
1942
|
const endLoad = uniqueTime();
|
|
1291
1943
|
Cstr = await CstrImport;
|
|
@@ -1310,16 +1962,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1310
1962
|
try {
|
|
1311
1963
|
new Cstr(hostRef);
|
|
1312
1964
|
} catch (e) {
|
|
1313
|
-
consoleError(e);
|
|
1965
|
+
consoleError(e, elm);
|
|
1314
1966
|
}
|
|
1315
1967
|
{
|
|
1316
|
-
hostRef.$flags$ &=
|
|
1968
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1317
1969
|
}
|
|
1318
1970
|
{
|
|
1319
1971
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1320
1972
|
}
|
|
1321
1973
|
endNewInstance();
|
|
1322
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1974
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1323
1975
|
} else {
|
|
1324
1976
|
Cstr = elm.constructor;
|
|
1325
1977
|
const cmpTag = elm.localName;
|
|
@@ -1346,9 +1998,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1346
1998
|
schedule();
|
|
1347
1999
|
}
|
|
1348
2000
|
};
|
|
1349
|
-
var fireConnectedCallback = (instance) => {
|
|
2001
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1350
2002
|
{
|
|
1351
|
-
safeCall(instance, "connectedCallback");
|
|
2003
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1352
2004
|
}
|
|
1353
2005
|
};
|
|
1354
2006
|
|
|
@@ -1395,17 +2047,17 @@ var connectedCallback = (elm) => {
|
|
|
1395
2047
|
} else {
|
|
1396
2048
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1397
2049
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1398
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2050
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1399
2051
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1400
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
2052
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1401
2053
|
}
|
|
1402
2054
|
}
|
|
1403
2055
|
endConnected();
|
|
1404
2056
|
}
|
|
1405
2057
|
};
|
|
1406
|
-
var disconnectInstance = (instance) => {
|
|
2058
|
+
var disconnectInstance = (instance, elm) => {
|
|
1407
2059
|
{
|
|
1408
|
-
safeCall(instance, "disconnectedCallback");
|
|
2060
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1409
2061
|
}
|
|
1410
2062
|
};
|
|
1411
2063
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1418,31 +2070,44 @@ var disconnectedCallback = async (elm) => {
|
|
|
1418
2070
|
}
|
|
1419
2071
|
}
|
|
1420
2072
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1421
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
2073
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1422
2074
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1423
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
2075
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1424
2076
|
}
|
|
1425
2077
|
}
|
|
2078
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2079
|
+
rootAppliedStyles.delete(elm);
|
|
2080
|
+
}
|
|
2081
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2082
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2083
|
+
}
|
|
1426
2084
|
};
|
|
1427
2085
|
|
|
1428
2086
|
// src/runtime/bootstrap-lazy.ts
|
|
1429
2087
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1430
2088
|
var _a;
|
|
2089
|
+
if (!win.document) {
|
|
2090
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2091
|
+
return;
|
|
2092
|
+
}
|
|
1431
2093
|
const endBootstrap = createTime();
|
|
1432
2094
|
const cmpTags = [];
|
|
1433
2095
|
const exclude = options.exclude || [];
|
|
1434
2096
|
const customElements2 = win.customElements;
|
|
1435
|
-
const head =
|
|
2097
|
+
const head = win.document.head;
|
|
1436
2098
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1437
|
-
const dataStyles = /* @__PURE__ */
|
|
2099
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1438
2100
|
const deferredConnectedCallbacks = [];
|
|
1439
2101
|
let appLoadFallback;
|
|
1440
2102
|
let isBootstrapping = true;
|
|
1441
2103
|
Object.assign(plt, options);
|
|
1442
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2104
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1443
2105
|
{
|
|
1444
2106
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
1445
2107
|
}
|
|
2108
|
+
{
|
|
2109
|
+
hydrateScopedToShadow();
|
|
2110
|
+
}
|
|
1446
2111
|
let hasSlotRelocation = false;
|
|
1447
2112
|
lazyBundles.map((lazyBundle) => {
|
|
1448
2113
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1479,9 +2144,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1479
2144
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1480
2145
|
{
|
|
1481
2146
|
if (!self.shadowRoot) {
|
|
1482
|
-
|
|
1483
|
-
self.attachShadow({ mode: "open" });
|
|
1484
|
-
}
|
|
2147
|
+
createShadowRoot.call(self, cmpMeta);
|
|
1485
2148
|
} else {
|
|
1486
2149
|
if (self.shadowRoot.mode !== "open") {
|
|
1487
2150
|
throw new Error(
|
|
@@ -1510,6 +2173,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1510
2173
|
}
|
|
1511
2174
|
disconnectedCallback() {
|
|
1512
2175
|
plt.jmp(() => disconnectedCallback(this));
|
|
2176
|
+
plt.raf(() => {
|
|
2177
|
+
var _a3;
|
|
2178
|
+
const hostRef = getHostRef(this);
|
|
2179
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2180
|
+
if (i2 > -1) {
|
|
2181
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2182
|
+
}
|
|
2183
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2184
|
+
delete hostRef.$vnode$.$elm$;
|
|
2185
|
+
}
|
|
2186
|
+
});
|
|
1513
2187
|
}
|
|
1514
2188
|
componentOnReady() {
|
|
1515
2189
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1537,7 +2211,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1537
2211
|
}
|
|
1538
2212
|
if (dataStyles.innerHTML.length) {
|
|
1539
2213
|
dataStyles.setAttribute("data-styles", "");
|
|
1540
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2214
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1541
2215
|
if (nonce != null) {
|
|
1542
2216
|
dataStyles.setAttribute("nonce", nonce);
|
|
1543
2217
|
}
|
|
@@ -1555,9 +2229,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1555
2229
|
endBootstrap();
|
|
1556
2230
|
};
|
|
1557
2231
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1558
|
-
if (listeners) {
|
|
2232
|
+
if (listeners && win.document) {
|
|
1559
2233
|
listeners.map(([flags, name, method]) => {
|
|
1560
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2234
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
1561
2235
|
const handler = hostListenerProxy(hostRef, method);
|
|
1562
2236
|
const opts = hostListenerOpts(flags);
|
|
1563
2237
|
plt.ael(target, name, handler, opts);
|
|
@@ -1576,11 +2250,13 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1576
2250
|
}
|
|
1577
2251
|
}
|
|
1578
2252
|
} catch (e) {
|
|
1579
|
-
consoleError(e);
|
|
2253
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1580
2254
|
}
|
|
1581
2255
|
};
|
|
1582
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1583
|
-
if (flags & 8 /* TargetWindow */)
|
|
2256
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2257
|
+
if (flags & 8 /* TargetWindow */) {
|
|
2258
|
+
return win;
|
|
2259
|
+
}
|
|
1584
2260
|
return elm;
|
|
1585
2261
|
};
|
|
1586
2262
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1591,6 +2267,7 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
1591
2267
|
// src/runtime/nonce.ts
|
|
1592
2268
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1593
2269
|
|
|
1594
|
-
export { Host as H, bootstrapLazy as b, createEvent as c,
|
|
2270
|
+
export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2271
|
+
//# sourceMappingURL=index-OdKytJIH.js.map
|
|
1595
2272
|
|
|
1596
|
-
//# sourceMappingURL=index-
|
|
2273
|
+
//# sourceMappingURL=index-OdKytJIH.js.map
|