@rededor/cura 1.7.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cura-accordion_20.cjs.entry.js +485 -138
- 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 +114 -34
- 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-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-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-calendar2.js → p-e-P5qR3J.js} +210 -100
- package/dist/components/p-e-P5qR3J.js.map +1 -0
- package/dist/components/{cura-select2.js → p-y6Cly9DJ.js} +87 -31
- package/dist/components/p-y6Cly9DJ.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-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-fc3b57a8.entry.js +2 -0
- package/dist/cura/p-fc3b57a8.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 +484 -135
- 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,39 +1,122 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
if (e && e.__esModule) return e;
|
|
5
|
-
var n = Object.create(null);
|
|
6
|
-
if (e) {
|
|
7
|
-
Object.keys(e).forEach(function (k) {
|
|
8
|
-
if (k !== 'default') {
|
|
9
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return e[k];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n['default'] = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
3
|
+
var curaThemeModule = require('./cura-theme-module-CJkmAxBA.js');
|
|
22
4
|
|
|
23
5
|
const NAMESPACE = 'cura';
|
|
24
|
-
const BUILD = /* cura */ {
|
|
6
|
+
const BUILD = /* cura */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
|
|
7
|
+
|
|
8
|
+
class CuraAPI {
|
|
9
|
+
constructor(config) {
|
|
10
|
+
this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
|
|
11
|
+
const themeModule = new curaThemeModule.CuraThemeModule();
|
|
12
|
+
this.theme = {
|
|
13
|
+
load: function (themeTag) { themeModule.load(themeTag); },
|
|
14
|
+
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
|
|
15
|
+
colors: {
|
|
16
|
+
getColor: function (colorWithDepth, opacity) { return themeModule.colors.getColor(colorWithDepth, opacity); },
|
|
17
|
+
},
|
|
18
|
+
fonts: {
|
|
19
|
+
getFamily: function (type) { return themeModule.fonts.getFamily(type); },
|
|
20
|
+
getWeights: function () { return themeModule.fonts.getWeights(); },
|
|
21
|
+
getSize: function () { return themeModule.fonts.getSize(); },
|
|
22
|
+
getColor: function () { return themeModule.fonts.getColor(); }
|
|
23
|
+
},
|
|
24
|
+
spacing: {
|
|
25
|
+
getSpacing: function () { return themeModule.spacing.getSpacing(); },
|
|
26
|
+
},
|
|
27
|
+
breakpoints: {
|
|
28
|
+
get: function (size, position) { return themeModule.breakpoints.get(size, position); }
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
this._addGlobalClasses();
|
|
32
|
+
if (config && config.customTheme) {
|
|
33
|
+
this.theme.setCustom(config.customTheme);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const theme = config && config.theme ? config.theme : 'default';
|
|
37
|
+
this.theme.load(theme);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
_addGlobalClasses() {
|
|
41
|
+
const styleId = "cura_global_classes";
|
|
42
|
+
let styleElement = document.head.querySelector(`#${styleId}`);
|
|
43
|
+
if (!styleElement) {
|
|
44
|
+
styleElement = document.createElement("style");
|
|
45
|
+
styleElement.id = styleId;
|
|
46
|
+
styleElement.textContent = `
|
|
47
|
+
.cura-body-scroll-lock {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
position: fixed;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: 0;
|
|
52
|
+
top: 0;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
document.head.appendChild(styleElement);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function appGlobalScript () {
|
|
61
|
+
const config = window.CuraInit;
|
|
62
|
+
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
63
|
+
const api = window.CuraAPI;
|
|
64
|
+
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
65
|
+
if (config && typeof config.onReady === 'function')
|
|
66
|
+
config.onReady(api);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const globalScripts = appGlobalScript;
|
|
70
|
+
const globalStyles = null;
|
|
25
71
|
|
|
26
72
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
73
|
+
Stencil Client Platform v4.35.1 | MIT Licensed | https://stenciljs.com
|
|
28
74
|
*/
|
|
29
75
|
var __defProp = Object.defineProperty;
|
|
30
76
|
var __export = (target, all) => {
|
|
31
77
|
for (var name in all)
|
|
32
78
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
79
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
80
|
+
|
|
81
|
+
// src/utils/constants.ts
|
|
82
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
83
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
84
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
85
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
86
|
+
PrimitiveType2["Null"] = "null";
|
|
87
|
+
PrimitiveType2["String"] = "string";
|
|
88
|
+
PrimitiveType2["Number"] = "number";
|
|
89
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
90
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
91
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
92
|
+
return PrimitiveType2;
|
|
93
|
+
})(PrimitiveType || {});
|
|
94
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
95
|
+
NonPrimitiveType2["Array"] = "array";
|
|
96
|
+
NonPrimitiveType2["Date"] = "date";
|
|
97
|
+
NonPrimitiveType2["Map"] = "map";
|
|
98
|
+
NonPrimitiveType2["Object"] = "object";
|
|
99
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
100
|
+
NonPrimitiveType2["Set"] = "set";
|
|
101
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
102
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
103
|
+
return NonPrimitiveType2;
|
|
104
|
+
})(NonPrimitiveType || {});
|
|
105
|
+
var TYPE_CONSTANT = "type";
|
|
106
|
+
var VALUE_CONSTANT = "value";
|
|
107
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
108
|
+
|
|
109
|
+
// src/client/client-host-ref.ts
|
|
110
|
+
var getHostRef = (ref) => {
|
|
111
|
+
if (ref.__stencil__getHostRef) {
|
|
112
|
+
return ref.__stencil__getHostRef();
|
|
113
|
+
}
|
|
114
|
+
return void 0;
|
|
115
|
+
};
|
|
116
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
117
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
118
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
119
|
+
};
|
|
37
120
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
121
|
const hostRef = {
|
|
39
122
|
$flags$: 0,
|
|
@@ -49,7 +132,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
49
132
|
hostElement["s-p"] = [];
|
|
50
133
|
hostElement["s-rc"] = [];
|
|
51
134
|
}
|
|
52
|
-
|
|
135
|
+
const ref = hostRef;
|
|
136
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
137
|
+
return ref;
|
|
53
138
|
};
|
|
54
139
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
55
140
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -67,18 +152,23 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
67
152
|
return module[exportName];
|
|
68
153
|
}
|
|
69
154
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
70
|
-
return
|
|
155
|
+
return import(
|
|
71
156
|
/* @vite-ignore */
|
|
72
157
|
/* webpackInclude: /\.entry\.js$/ */
|
|
73
158
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
74
159
|
/* webpackMode: "lazy" */
|
|
75
160
|
`./${bundleId}.entry.js${""}`
|
|
76
|
-
)
|
|
77
|
-
{
|
|
78
|
-
|
|
161
|
+
).then(
|
|
162
|
+
(importedModule) => {
|
|
163
|
+
{
|
|
164
|
+
cmpModules.set(bundleId, importedModule);
|
|
165
|
+
}
|
|
166
|
+
return importedModule[exportName];
|
|
167
|
+
},
|
|
168
|
+
(e) => {
|
|
169
|
+
consoleError(e, hostRef.$hostElement$);
|
|
79
170
|
}
|
|
80
|
-
|
|
81
|
-
}, consoleError);
|
|
171
|
+
);
|
|
82
172
|
};
|
|
83
173
|
|
|
84
174
|
// src/client/client-style.ts
|
|
@@ -89,6 +179,7 @@ var CONTENT_REF_ID = "r";
|
|
|
89
179
|
var ORG_LOCATION_ID = "o";
|
|
90
180
|
var SLOT_NODE_ID = "s";
|
|
91
181
|
var TEXT_NODE_ID = "t";
|
|
182
|
+
var COMMENT_NODE_ID = "c";
|
|
92
183
|
var HYDRATE_ID = "s-id";
|
|
93
184
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
94
185
|
var HYDRATE_CHILD_ID = "c-id";
|
|
@@ -102,7 +193,6 @@ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
|
102
193
|
"formStateRestoreCallback"
|
|
103
194
|
];
|
|
104
195
|
var win = typeof window !== "undefined" ? window : {};
|
|
105
|
-
var doc = win.document || { head: {} };
|
|
106
196
|
var plt = {
|
|
107
197
|
$flags$: 0,
|
|
108
198
|
$resourcesUrl$: "",
|
|
@@ -112,11 +202,11 @@ var plt = {
|
|
|
112
202
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
113
203
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
114
204
|
};
|
|
115
|
-
var supportsShadow = BUILD.shadowDom;
|
|
116
205
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
206
|
+
var _a;
|
|
117
207
|
let supportsListenerOptions2 = false;
|
|
118
208
|
try {
|
|
119
|
-
|
|
209
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
120
210
|
"e",
|
|
121
211
|
null,
|
|
122
212
|
Object.defineProperty({}, "passive", {
|
|
@@ -173,25 +263,117 @@ var flush = () => {
|
|
|
173
263
|
};
|
|
174
264
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
175
265
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
176
|
-
|
|
177
|
-
// src/utils/constants.ts
|
|
178
|
-
var EMPTY_OBJ = {};
|
|
179
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
180
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
181
|
-
|
|
182
|
-
// src/utils/helpers.ts
|
|
183
|
-
var isDef = (v) => v != null;
|
|
184
266
|
var isComplexType = (o) => {
|
|
185
267
|
o = typeof o;
|
|
186
268
|
return o === "object" || o === "function";
|
|
187
269
|
};
|
|
188
270
|
|
|
189
271
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
190
|
-
function queryNonceMetaTagContent(
|
|
272
|
+
function queryNonceMetaTagContent(doc) {
|
|
191
273
|
var _a, _b, _c;
|
|
192
|
-
return (_c = (_b = (_a =
|
|
274
|
+
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;
|
|
193
275
|
}
|
|
194
276
|
|
|
277
|
+
// src/utils/regular-expression.ts
|
|
278
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
279
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
// src/utils/remote-value.ts
|
|
283
|
+
var RemoteValue = class _RemoteValue {
|
|
284
|
+
/**
|
|
285
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
286
|
+
*
|
|
287
|
+
* @param serialized The serialized LocalValue object
|
|
288
|
+
* @returns The original JavaScript value/object
|
|
289
|
+
*/
|
|
290
|
+
static fromLocalValue(serialized) {
|
|
291
|
+
const type = serialized[TYPE_CONSTANT];
|
|
292
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
293
|
+
switch (type) {
|
|
294
|
+
case "string" /* String */:
|
|
295
|
+
return value;
|
|
296
|
+
case "boolean" /* Boolean */:
|
|
297
|
+
return value;
|
|
298
|
+
case "bigint" /* BigInt */:
|
|
299
|
+
return BigInt(value);
|
|
300
|
+
case "undefined" /* Undefined */:
|
|
301
|
+
return void 0;
|
|
302
|
+
case "null" /* Null */:
|
|
303
|
+
return null;
|
|
304
|
+
case "number" /* Number */:
|
|
305
|
+
if (value === "NaN") return NaN;
|
|
306
|
+
if (value === "-0") return -0;
|
|
307
|
+
if (value === "Infinity") return Infinity;
|
|
308
|
+
if (value === "-Infinity") return -Infinity;
|
|
309
|
+
return value;
|
|
310
|
+
case "array" /* Array */:
|
|
311
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
312
|
+
case "date" /* Date */:
|
|
313
|
+
return new Date(value);
|
|
314
|
+
case "map" /* Map */:
|
|
315
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
316
|
+
for (const [key, val] of value) {
|
|
317
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
318
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
319
|
+
map2.set(deserializedKey, deserializedValue);
|
|
320
|
+
}
|
|
321
|
+
return map2;
|
|
322
|
+
case "object" /* Object */:
|
|
323
|
+
const obj = {};
|
|
324
|
+
for (const [key, val] of value) {
|
|
325
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
326
|
+
}
|
|
327
|
+
return obj;
|
|
328
|
+
case "regexp" /* RegularExpression */:
|
|
329
|
+
const { pattern, flags } = value;
|
|
330
|
+
return new RegExp(pattern, flags);
|
|
331
|
+
case "set" /* Set */:
|
|
332
|
+
const set = /* @__PURE__ */ new Set();
|
|
333
|
+
for (const item of value) {
|
|
334
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
335
|
+
}
|
|
336
|
+
return set;
|
|
337
|
+
case "symbol" /* Symbol */:
|
|
338
|
+
return Symbol(value);
|
|
339
|
+
default:
|
|
340
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
345
|
+
*
|
|
346
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
347
|
+
* @returns Array of deserialized JavaScript values
|
|
348
|
+
*/
|
|
349
|
+
static fromLocalValueArray(serializedValues) {
|
|
350
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
354
|
+
*
|
|
355
|
+
* @param obj Object to verify
|
|
356
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
357
|
+
*/
|
|
358
|
+
static isLocalValueObject(obj) {
|
|
359
|
+
if (typeof obj !== "object" || obj === null) {
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
const type = obj[TYPE_CONSTANT];
|
|
366
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
367
|
+
if (!hasTypeProperty) {
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
371
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
372
|
+
}
|
|
373
|
+
return true;
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
195
377
|
// src/utils/result.ts
|
|
196
378
|
var result_exports = {};
|
|
197
379
|
__export(result_exports, {
|
|
@@ -240,6 +422,98 @@ var unwrapErr = (result) => {
|
|
|
240
422
|
throw result.value;
|
|
241
423
|
}
|
|
242
424
|
};
|
|
425
|
+
|
|
426
|
+
// src/utils/serialize.ts
|
|
427
|
+
function deserializeProperty(value) {
|
|
428
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
429
|
+
return value;
|
|
430
|
+
}
|
|
431
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
432
|
+
}
|
|
433
|
+
function createShadowRoot(cmpMeta) {
|
|
434
|
+
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
435
|
+
if (supportsConstructableStylesheets) {
|
|
436
|
+
const sheet = new CSSStyleSheet();
|
|
437
|
+
sheet.replaceSync(globalStyles);
|
|
438
|
+
shadowRoot.adoptedStyleSheets.push(sheet);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
442
|
+
const result = [];
|
|
443
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
444
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
445
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
446
|
+
result.push(slottedNode);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return result;
|
|
450
|
+
};
|
|
451
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
452
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
456
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
457
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
458
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
459
|
+
const appendMethod = internalCall(parent, "appendChild");
|
|
460
|
+
if (typeof position !== "undefined") {
|
|
461
|
+
slottedNodeLocation["s-oo"] = position;
|
|
462
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
463
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
464
|
+
childNodes.forEach((n) => {
|
|
465
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
466
|
+
});
|
|
467
|
+
slotRelocateNodes.sort((a, b) => {
|
|
468
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
469
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
470
|
+
return 0;
|
|
471
|
+
});
|
|
472
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
473
|
+
} else {
|
|
474
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
475
|
+
}
|
|
476
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
477
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
478
|
+
};
|
|
479
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
480
|
+
function patchSlotNode(node) {
|
|
481
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
482
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
483
|
+
const toReturn = [];
|
|
484
|
+
const slotName = this["s-sn"];
|
|
485
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
486
|
+
console.error(`
|
|
487
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
488
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
489
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
490
|
+
`);
|
|
491
|
+
}
|
|
492
|
+
const parent = this["s-cr"].parentElement;
|
|
493
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
494
|
+
slottedNodes.forEach((n) => {
|
|
495
|
+
if (slotName === getSlotName(n)) {
|
|
496
|
+
toReturn.push(n);
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
if (elementsOnly) {
|
|
500
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
501
|
+
}
|
|
502
|
+
return toReturn;
|
|
503
|
+
}).bind(node);
|
|
504
|
+
node.assignedElements = assignedFactory(true);
|
|
505
|
+
node.assignedNodes = assignedFactory(false);
|
|
506
|
+
}
|
|
507
|
+
function internalCall(node, method) {
|
|
508
|
+
if ("__" + method in node) {
|
|
509
|
+
const toReturn = node["__" + method];
|
|
510
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
511
|
+
return toReturn.bind(node);
|
|
512
|
+
} else {
|
|
513
|
+
if (typeof node[method] !== "function") return node[method];
|
|
514
|
+
return node[method].bind(node);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
243
517
|
var createTime = (fnName, tagName = "") => {
|
|
244
518
|
{
|
|
245
519
|
return () => {
|
|
@@ -321,44 +595,141 @@ var isHost = (node) => node && node.$tag$ === Host;
|
|
|
321
595
|
|
|
322
596
|
// src/runtime/client-hydrate.ts
|
|
323
597
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
598
|
+
var _a;
|
|
324
599
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
325
600
|
const shadowRoot = hostElm.shadowRoot;
|
|
326
601
|
const childRenderNodes = [];
|
|
327
602
|
const slotNodes = [];
|
|
603
|
+
const slottedNodes = [];
|
|
328
604
|
const shadowRootNodes = shadowRoot ? [] : null;
|
|
329
|
-
const vnode =
|
|
330
|
-
|
|
331
|
-
|
|
605
|
+
const vnode = newVNode(tagName, null);
|
|
606
|
+
vnode.$elm$ = hostElm;
|
|
607
|
+
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
608
|
+
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
609
|
+
var _a2, _b;
|
|
610
|
+
if (!(memberFlags & 31 /* Prop */)) {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
const attributeName = metaAttributeName || memberName;
|
|
614
|
+
const attrVal = hostElm.getAttribute(attributeName);
|
|
615
|
+
if (attrVal !== null) {
|
|
616
|
+
const attrPropVal = parsePropertyValue(
|
|
617
|
+
attrVal,
|
|
618
|
+
memberFlags,
|
|
619
|
+
!!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
|
|
620
|
+
);
|
|
621
|
+
(_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
625
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
332
626
|
}
|
|
333
627
|
hostElm[HYDRATE_ID] = hostId;
|
|
334
628
|
hostElm.removeAttribute(HYDRATE_ID);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
629
|
+
hostRef.$vnode$ = clientHydrate(
|
|
630
|
+
vnode,
|
|
631
|
+
childRenderNodes,
|
|
632
|
+
slotNodes,
|
|
633
|
+
shadowRootNodes,
|
|
634
|
+
hostElm,
|
|
635
|
+
hostElm,
|
|
636
|
+
hostId,
|
|
637
|
+
slottedNodes
|
|
638
|
+
);
|
|
639
|
+
let crIndex = 0;
|
|
640
|
+
const crLength = childRenderNodes.length;
|
|
641
|
+
let childRenderNode;
|
|
642
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
643
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
644
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
338
645
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
339
|
-
const node =
|
|
340
|
-
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
341
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
342
|
-
}
|
|
646
|
+
const node = childRenderNode.$elm$;
|
|
343
647
|
if (!shadowRoot) {
|
|
344
|
-
node["s-hn"] = tagName;
|
|
345
|
-
if (
|
|
346
|
-
node["s-
|
|
347
|
-
|
|
648
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
649
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
650
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
654
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
655
|
+
if (childRenderNode.$children$) {
|
|
656
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
657
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
658
|
+
childRenderNode.$children$.forEach((c) => {
|
|
659
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
} else {
|
|
663
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
667
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
668
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
669
|
+
}
|
|
670
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
671
|
+
if (!shadowRoot) {
|
|
672
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
348
673
|
}
|
|
349
674
|
}
|
|
350
675
|
plt.$orgLocNodes$.delete(orgLocationId);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
676
|
+
}
|
|
677
|
+
const hosts = [];
|
|
678
|
+
const snLen = slottedNodes.length;
|
|
679
|
+
let snIndex = 0;
|
|
680
|
+
let slotGroup;
|
|
681
|
+
let snGroupIdx;
|
|
682
|
+
let snGroupLen;
|
|
683
|
+
let slottedItem;
|
|
684
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
685
|
+
slotGroup = slottedNodes[snIndex];
|
|
686
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
687
|
+
snGroupLen = slotGroup.length;
|
|
688
|
+
snGroupIdx = 0;
|
|
689
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
690
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
691
|
+
if (!hosts[slottedItem.hostId]) {
|
|
692
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
356
693
|
}
|
|
357
|
-
|
|
694
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
695
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
696
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
697
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
698
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
699
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
700
|
+
} else {
|
|
701
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
702
|
+
}
|
|
703
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
704
|
+
}
|
|
705
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
706
|
+
hostEle.appendChild(slottedItem.node);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
711
|
+
let rnIdex = 0;
|
|
712
|
+
const rnLen = shadowRootNodes.length;
|
|
713
|
+
if (rnLen) {
|
|
714
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
715
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
716
|
+
}
|
|
717
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
718
|
+
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
719
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
720
|
+
node.removeAttribute("hidden");
|
|
721
|
+
} else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
722
|
+
node.parentNode.removeChild(node);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
}
|
|
358
727
|
}
|
|
728
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
729
|
+
hostRef.$hostElement$ = hostElm;
|
|
359
730
|
endHydrate();
|
|
360
731
|
};
|
|
361
|
-
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
732
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
362
733
|
let childNodeType;
|
|
363
734
|
let childIdSplt;
|
|
364
735
|
let childVNode;
|
|
@@ -368,7 +739,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
368
739
|
if (childNodeType) {
|
|
369
740
|
childIdSplt = childNodeType.split(".");
|
|
370
741
|
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
371
|
-
childVNode = {
|
|
742
|
+
childVNode = createSimpleVNode({
|
|
372
743
|
$flags$: 0,
|
|
373
744
|
$hostId$: childIdSplt[0],
|
|
374
745
|
$nodeId$: childIdSplt[1],
|
|
@@ -376,18 +747,36 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
376
747
|
$index$: childIdSplt[3],
|
|
377
748
|
$tag$: node.tagName.toLowerCase(),
|
|
378
749
|
$elm$: node,
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
$
|
|
382
|
-
|
|
383
|
-
$text$: null
|
|
384
|
-
};
|
|
750
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
751
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
752
|
+
$attrs$: { class: node.className || "" }
|
|
753
|
+
});
|
|
385
754
|
childRenderNodes.push(childVNode);
|
|
386
755
|
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
387
756
|
if (!parentVNode.$children$) {
|
|
388
757
|
parentVNode.$children$ = [];
|
|
389
758
|
}
|
|
390
|
-
|
|
759
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
760
|
+
if (typeof slotName === "string") {
|
|
761
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
762
|
+
addSlot(
|
|
763
|
+
slotName,
|
|
764
|
+
childIdSplt[2],
|
|
765
|
+
childVNode,
|
|
766
|
+
node,
|
|
767
|
+
parentVNode,
|
|
768
|
+
childRenderNodes,
|
|
769
|
+
slotNodes,
|
|
770
|
+
shadowRootNodes,
|
|
771
|
+
slottedNodes
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
775
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
776
|
+
}
|
|
777
|
+
if (childVNode.$index$ !== void 0) {
|
|
778
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
779
|
+
}
|
|
391
780
|
parentVNode = childVNode;
|
|
392
781
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
393
782
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
@@ -403,31 +792,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
403
792
|
shadowRootNodes,
|
|
404
793
|
hostElm,
|
|
405
794
|
node.shadowRoot.childNodes[i2],
|
|
406
|
-
hostId
|
|
795
|
+
hostId,
|
|
796
|
+
slottedNodes
|
|
407
797
|
);
|
|
408
798
|
}
|
|
409
799
|
}
|
|
410
|
-
|
|
800
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
801
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
411
802
|
clientHydrate(
|
|
412
803
|
parentVNode,
|
|
413
804
|
childRenderNodes,
|
|
414
805
|
slotNodes,
|
|
415
806
|
shadowRootNodes,
|
|
416
807
|
hostElm,
|
|
417
|
-
|
|
418
|
-
hostId
|
|
808
|
+
nonShadowNodes[i2],
|
|
809
|
+
hostId,
|
|
810
|
+
slottedNodes
|
|
419
811
|
);
|
|
420
812
|
}
|
|
421
813
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
422
814
|
childIdSplt = node.nodeValue.split(".");
|
|
423
815
|
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
424
816
|
childNodeType = childIdSplt[0];
|
|
425
|
-
childVNode = {
|
|
426
|
-
$flags$: 0,
|
|
817
|
+
childVNode = createSimpleVNode({
|
|
427
818
|
$hostId$: childIdSplt[1],
|
|
428
819
|
$nodeId$: childIdSplt[2],
|
|
429
820
|
$depth$: childIdSplt[3],
|
|
430
|
-
$index$: childIdSplt[4],
|
|
821
|
+
$index$: childIdSplt[4] || "0",
|
|
431
822
|
$elm$: node,
|
|
432
823
|
$attrs$: null,
|
|
433
824
|
$children$: null,
|
|
@@ -435,46 +826,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
435
826
|
$name$: null,
|
|
436
827
|
$tag$: null,
|
|
437
828
|
$text$: null
|
|
438
|
-
};
|
|
829
|
+
});
|
|
439
830
|
if (childNodeType === TEXT_NODE_ID) {
|
|
440
|
-
childVNode.$elm$ = node
|
|
831
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
441
832
|
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
442
833
|
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
443
834
|
childRenderNodes.push(childVNode);
|
|
444
835
|
node.remove();
|
|
445
|
-
if (
|
|
446
|
-
parentVNode.$children$
|
|
836
|
+
if (hostId === childVNode.$hostId$) {
|
|
837
|
+
if (!parentVNode.$children$) {
|
|
838
|
+
parentVNode.$children$ = [];
|
|
839
|
+
}
|
|
840
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
447
841
|
}
|
|
448
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
449
842
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
450
843
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
451
844
|
}
|
|
452
845
|
}
|
|
846
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
847
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
848
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
849
|
+
childRenderNodes.push(childVNode);
|
|
850
|
+
node.remove();
|
|
851
|
+
}
|
|
453
852
|
} else if (childVNode.$hostId$ === hostId) {
|
|
454
853
|
if (childNodeType === SLOT_NODE_ID) {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
468
|
-
node.remove();
|
|
469
|
-
if (childVNode.$depth$ === "0") {
|
|
470
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
slotNodes.push(childVNode);
|
|
474
|
-
if (!parentVNode.$children$) {
|
|
475
|
-
parentVNode.$children$ = [];
|
|
476
|
-
}
|
|
477
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
854
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
855
|
+
addSlot(
|
|
856
|
+
slotName,
|
|
857
|
+
childIdSplt[2],
|
|
858
|
+
childVNode,
|
|
859
|
+
node,
|
|
860
|
+
parentVNode,
|
|
861
|
+
childRenderNodes,
|
|
862
|
+
slotNodes,
|
|
863
|
+
shadowRootNodes,
|
|
864
|
+
slottedNodes
|
|
865
|
+
);
|
|
478
866
|
} else if (childNodeType === CONTENT_REF_ID) {
|
|
479
867
|
if (shadowRootNodes) {
|
|
480
868
|
node.remove();
|
|
@@ -487,18 +875,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
487
875
|
vnode.$elm$ = node;
|
|
488
876
|
vnode.$index$ = "0";
|
|
489
877
|
parentVNode.$children$ = [vnode];
|
|
878
|
+
} else {
|
|
879
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
880
|
+
node.remove();
|
|
881
|
+
}
|
|
490
882
|
}
|
|
883
|
+
return parentVNode;
|
|
491
884
|
};
|
|
492
885
|
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
493
886
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
887
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
888
|
+
if (componentId) {
|
|
889
|
+
orgLocNodes.set(componentId, node);
|
|
890
|
+
}
|
|
494
891
|
let i2 = 0;
|
|
495
892
|
if (node.shadowRoot) {
|
|
496
893
|
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
497
894
|
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
498
895
|
}
|
|
499
896
|
}
|
|
500
|
-
|
|
501
|
-
|
|
897
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
898
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
899
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
502
900
|
}
|
|
503
901
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
504
902
|
const childIdSplt = node.nodeValue.split(".");
|
|
@@ -509,13 +907,109 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
|
509
907
|
}
|
|
510
908
|
}
|
|
511
909
|
};
|
|
512
|
-
var
|
|
910
|
+
var createSimpleVNode = (vnode) => {
|
|
911
|
+
const defaultVNode = {
|
|
912
|
+
$flags$: 0,
|
|
913
|
+
$hostId$: null,
|
|
914
|
+
$nodeId$: null,
|
|
915
|
+
$depth$: null,
|
|
916
|
+
$index$: "0",
|
|
917
|
+
$elm$: null,
|
|
918
|
+
$attrs$: null,
|
|
919
|
+
$children$: null,
|
|
920
|
+
$key$: null,
|
|
921
|
+
$name$: null,
|
|
922
|
+
$tag$: null,
|
|
923
|
+
$text$: null
|
|
924
|
+
};
|
|
925
|
+
return { ...defaultVNode, ...vnode };
|
|
926
|
+
};
|
|
927
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
928
|
+
node["s-sr"] = true;
|
|
929
|
+
childVNode.$name$ = slotName || null;
|
|
930
|
+
childVNode.$tag$ = "slot";
|
|
931
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
932
|
+
if (shadowRootNodes && win.document) {
|
|
933
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
934
|
+
if (childVNode.$name$) {
|
|
935
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
936
|
+
}
|
|
937
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
938
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
939
|
+
} else {
|
|
940
|
+
node.parentNode.insertBefore(slot, node);
|
|
941
|
+
}
|
|
942
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
943
|
+
node.remove();
|
|
944
|
+
if (childVNode.$depth$ === "0") {
|
|
945
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
946
|
+
}
|
|
947
|
+
} else {
|
|
948
|
+
const slot = childVNode.$elm$;
|
|
949
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
950
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
951
|
+
patchSlotNode(node);
|
|
952
|
+
if (shouldMove) {
|
|
953
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
childRenderNodes.push(childVNode);
|
|
957
|
+
slotNodes.push(childVNode);
|
|
958
|
+
if (!parentVNode.$children$) {
|
|
959
|
+
parentVNode.$children$ = [];
|
|
960
|
+
}
|
|
961
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
962
|
+
}
|
|
963
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
964
|
+
let slottedNode = slotNode.nextSibling;
|
|
965
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
966
|
+
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 */))) {
|
|
967
|
+
slottedNode["s-sn"] = slotName;
|
|
968
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
969
|
+
slottedNode = slottedNode.nextSibling;
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
var findCorrespondingNode = (node, type) => {
|
|
973
|
+
let sibling = node;
|
|
974
|
+
do {
|
|
975
|
+
sibling = sibling.nextSibling;
|
|
976
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
977
|
+
return sibling;
|
|
978
|
+
};
|
|
979
|
+
var createSupportsRuleRe = (selector) => {
|
|
980
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
981
|
+
return new RegExp(
|
|
982
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
983
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
984
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
985
|
+
"g"
|
|
986
|
+
);
|
|
987
|
+
};
|
|
988
|
+
createSupportsRuleRe("::slotted");
|
|
989
|
+
createSupportsRuleRe(":host");
|
|
990
|
+
createSupportsRuleRe(":host-context");
|
|
991
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
992
|
+
if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
993
|
+
try {
|
|
994
|
+
propValue = JSON.parse(propValue);
|
|
995
|
+
return propValue;
|
|
996
|
+
} catch (e) {
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1000
|
+
propValue = deserializeProperty(propValue);
|
|
1001
|
+
return propValue;
|
|
1002
|
+
}
|
|
513
1003
|
if (propValue != null && !isComplexType(propValue)) {
|
|
514
1004
|
if (propType & 4 /* Boolean */) {
|
|
515
|
-
|
|
1005
|
+
if (isFormAssociated && typeof propValue === "string") {
|
|
1006
|
+
return propValue === "" || !!propValue;
|
|
1007
|
+
} else {
|
|
1008
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1009
|
+
}
|
|
516
1010
|
}
|
|
517
1011
|
if (propType & 2 /* Number */) {
|
|
518
|
-
return parseFloat(propValue);
|
|
1012
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
519
1013
|
}
|
|
520
1014
|
if (propType & 1 /* String */) {
|
|
521
1015
|
return String(propValue);
|
|
@@ -532,9 +1026,9 @@ var createEvent = (ref, name, flags) => {
|
|
|
532
1026
|
return {
|
|
533
1027
|
emit: (detail) => {
|
|
534
1028
|
return emitEvent(elm, name, {
|
|
535
|
-
bubbles:
|
|
536
|
-
composed:
|
|
537
|
-
cancelable:
|
|
1029
|
+
bubbles: true,
|
|
1030
|
+
composed: true,
|
|
1031
|
+
cancelable: true,
|
|
538
1032
|
detail
|
|
539
1033
|
});
|
|
540
1034
|
}
|
|
@@ -564,7 +1058,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
564
1058
|
var _a;
|
|
565
1059
|
const scopeId2 = getScopeId(cmpMeta);
|
|
566
1060
|
const style = styles.get(scopeId2);
|
|
567
|
-
|
|
1061
|
+
if (!win.document) {
|
|
1062
|
+
return scopeId2;
|
|
1063
|
+
}
|
|
1064
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
568
1065
|
if (style) {
|
|
569
1066
|
if (typeof style === "string") {
|
|
570
1067
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -577,9 +1074,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
577
1074
|
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
578
1075
|
styleElm.innerHTML = style;
|
|
579
1076
|
} else {
|
|
580
|
-
styleElm =
|
|
1077
|
+
styleElm = win.document.createElement("style");
|
|
581
1078
|
styleElm.innerHTML = style;
|
|
582
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1079
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
583
1080
|
if (nonce != null) {
|
|
584
1081
|
styleElm.setAttribute("nonce", nonce);
|
|
585
1082
|
}
|
|
@@ -587,14 +1084,28 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
587
1084
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
588
1085
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
589
1086
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
590
|
-
styleContainerNode.insertBefore(
|
|
1087
|
+
styleContainerNode.insertBefore(
|
|
1088
|
+
styleElm,
|
|
1089
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1090
|
+
);
|
|
591
1091
|
} else if ("host" in styleContainerNode) {
|
|
592
|
-
|
|
1092
|
+
if (supportsConstructableStylesheets) {
|
|
1093
|
+
const stylesheet = new CSSStyleSheet();
|
|
1094
|
+
stylesheet.replaceSync(style);
|
|
1095
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1096
|
+
} else {
|
|
1097
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1098
|
+
if (existingStyleContainer) {
|
|
1099
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1100
|
+
} else {
|
|
1101
|
+
styleContainerNode.prepend(styleElm);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
593
1104
|
} else {
|
|
594
1105
|
styleContainerNode.append(styleElm);
|
|
595
1106
|
}
|
|
596
1107
|
}
|
|
597
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
1108
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
598
1109
|
styleContainerNode.insertBefore(styleElm, null);
|
|
599
1110
|
}
|
|
600
1111
|
}
|
|
@@ -619,132 +1130,177 @@ var attachStyles = (hostRef) => {
|
|
|
619
1130
|
const scopeId2 = addStyle(
|
|
620
1131
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
621
1132
|
cmpMeta);
|
|
622
|
-
if (flags & 10 /* needsScopedEncapsulation */
|
|
1133
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
623
1134
|
elm["s-sc"] = scopeId2;
|
|
624
1135
|
elm.classList.add(scopeId2 + "-h");
|
|
625
1136
|
}
|
|
626
1137
|
endAttachStyles();
|
|
627
1138
|
};
|
|
628
1139
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
629
|
-
var
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
1140
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1141
|
+
var hydrateScopedToShadow = () => {
|
|
1142
|
+
if (!win.document) {
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1146
|
+
let i2 = 0;
|
|
1147
|
+
for (; i2 < styles2.length; i2++) {
|
|
1148
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1152
|
+
if (oldValue === newValue) {
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1156
|
+
let ln = memberName.toLowerCase();
|
|
1157
|
+
if (memberName === "class") {
|
|
1158
|
+
const classList = elm.classList;
|
|
1159
|
+
const oldClasses = parseClassList(oldValue);
|
|
1160
|
+
let newClasses = parseClassList(newValue);
|
|
1161
|
+
if (elm["s-si"] && initialRender) {
|
|
1162
|
+
newClasses.push(elm["s-si"]);
|
|
1163
|
+
oldClasses.forEach((c) => {
|
|
1164
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1165
|
+
});
|
|
1166
|
+
newClasses = [...new Set(newClasses)];
|
|
1167
|
+
classList.add(...newClasses);
|
|
1168
|
+
} else {
|
|
637
1169
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
638
1170
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
elm.style.removeProperty(prop);
|
|
645
|
-
} else {
|
|
646
|
-
elm.style[prop] = "";
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
for (const prop in newValue) {
|
|
652
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1171
|
+
}
|
|
1172
|
+
} else if (memberName === "style") {
|
|
1173
|
+
{
|
|
1174
|
+
for (const prop in oldValue) {
|
|
1175
|
+
if (!newValue || newValue[prop] == null) {
|
|
653
1176
|
if (prop.includes("-")) {
|
|
654
|
-
elm.style.
|
|
1177
|
+
elm.style.removeProperty(prop);
|
|
655
1178
|
} else {
|
|
656
|
-
elm.style[prop] =
|
|
1179
|
+
elm.style[prop] = "";
|
|
657
1180
|
}
|
|
658
1181
|
}
|
|
659
1182
|
}
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
} else if (isMemberInElement(win, ln)) {
|
|
668
|
-
memberName = ln.slice(2);
|
|
669
|
-
} else {
|
|
670
|
-
memberName = ln[2] + memberName.slice(3);
|
|
671
|
-
}
|
|
672
|
-
if (oldValue || newValue) {
|
|
673
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
674
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
675
|
-
if (oldValue) {
|
|
676
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
677
|
-
}
|
|
678
|
-
if (newValue) {
|
|
679
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
1183
|
+
}
|
|
1184
|
+
for (const prop in newValue) {
|
|
1185
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1186
|
+
if (prop.includes("-")) {
|
|
1187
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1188
|
+
} else {
|
|
1189
|
+
elm.style[prop] = newValue[prop];
|
|
680
1190
|
}
|
|
681
1191
|
}
|
|
1192
|
+
}
|
|
1193
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1194
|
+
if (newValue) {
|
|
1195
|
+
newValue(elm);
|
|
1196
|
+
}
|
|
1197
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1198
|
+
if (memberName[2] === "-") {
|
|
1199
|
+
memberName = memberName.slice(3);
|
|
1200
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1201
|
+
memberName = ln.slice(2);
|
|
682
1202
|
} else {
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
1203
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1204
|
+
}
|
|
1205
|
+
if (oldValue || newValue) {
|
|
1206
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1207
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1208
|
+
if (oldValue) {
|
|
1209
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1210
|
+
}
|
|
1211
|
+
if (newValue) {
|
|
1212
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
} else {
|
|
1216
|
+
const isComplex = isComplexType(newValue);
|
|
1217
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1218
|
+
try {
|
|
1219
|
+
if (!elm.tagName.includes("-")) {
|
|
1220
|
+
const n = newValue == null ? "" : newValue;
|
|
1221
|
+
if (memberName === "list") {
|
|
1222
|
+
isProp = false;
|
|
1223
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1224
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
1225
|
+
elm[memberName] = n;
|
|
1226
|
+
} else {
|
|
1227
|
+
elm.setAttribute(memberName, n);
|
|
696
1228
|
}
|
|
697
|
-
} else {
|
|
698
|
-
elm[memberName] = newValue;
|
|
699
1229
|
}
|
|
700
|
-
}
|
|
1230
|
+
} else if (elm[memberName] !== newValue) {
|
|
1231
|
+
elm[memberName] = newValue;
|
|
701
1232
|
}
|
|
1233
|
+
} catch (e) {
|
|
702
1234
|
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
1235
|
+
}
|
|
1236
|
+
let xlink = false;
|
|
1237
|
+
{
|
|
1238
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1239
|
+
memberName = ln;
|
|
1240
|
+
xlink = true;
|
|
709
1241
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
714
|
-
} else {
|
|
715
|
-
elm.removeAttribute(memberName);
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
719
|
-
newValue = newValue === true ? "" : newValue;
|
|
1242
|
+
}
|
|
1243
|
+
if (newValue == null || newValue === false) {
|
|
1244
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
720
1245
|
if (xlink) {
|
|
721
|
-
elm.
|
|
1246
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
722
1247
|
} else {
|
|
723
|
-
elm.
|
|
1248
|
+
elm.removeAttribute(memberName);
|
|
724
1249
|
}
|
|
725
1250
|
}
|
|
1251
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1252
|
+
newValue = newValue === true ? "" : newValue;
|
|
1253
|
+
if (xlink) {
|
|
1254
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1255
|
+
} else {
|
|
1256
|
+
elm.setAttribute(memberName, newValue);
|
|
1257
|
+
}
|
|
726
1258
|
}
|
|
727
1259
|
}
|
|
728
1260
|
};
|
|
729
1261
|
var parseClassListRegex = /\s/;
|
|
730
|
-
var parseClassList = (value) =>
|
|
1262
|
+
var parseClassList = (value) => {
|
|
1263
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1264
|
+
value = value.baseVal;
|
|
1265
|
+
}
|
|
1266
|
+
if (!value || typeof value !== "string") {
|
|
1267
|
+
return [];
|
|
1268
|
+
}
|
|
1269
|
+
return value.split(parseClassListRegex);
|
|
1270
|
+
};
|
|
731
1271
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
732
1272
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
733
1273
|
|
|
734
1274
|
// src/runtime/vdom/update-element.ts
|
|
735
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
1275
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
736
1276
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
737
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
738
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
1277
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1278
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
739
1279
|
{
|
|
740
1280
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
741
1281
|
if (!(memberName in newVnodeAttrs)) {
|
|
742
|
-
setAccessor(
|
|
1282
|
+
setAccessor(
|
|
1283
|
+
elm,
|
|
1284
|
+
memberName,
|
|
1285
|
+
oldVnodeAttrs[memberName],
|
|
1286
|
+
void 0,
|
|
1287
|
+
isSvgMode2,
|
|
1288
|
+
newVnode.$flags$,
|
|
1289
|
+
isInitialRender
|
|
1290
|
+
);
|
|
743
1291
|
}
|
|
744
1292
|
}
|
|
745
1293
|
}
|
|
746
1294
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
747
|
-
setAccessor(
|
|
1295
|
+
setAccessor(
|
|
1296
|
+
elm,
|
|
1297
|
+
memberName,
|
|
1298
|
+
oldVnodeAttrs[memberName],
|
|
1299
|
+
newVnodeAttrs[memberName],
|
|
1300
|
+
isSvgMode2,
|
|
1301
|
+
newVnode.$flags$,
|
|
1302
|
+
isInitialRender
|
|
1303
|
+
);
|
|
748
1304
|
}
|
|
749
1305
|
};
|
|
750
1306
|
function sortedAttrNames(attrNames) {
|
|
@@ -756,26 +1312,27 @@ function sortedAttrNames(attrNames) {
|
|
|
756
1312
|
attrNames
|
|
757
1313
|
);
|
|
758
1314
|
}
|
|
759
|
-
|
|
760
|
-
// src/runtime/vdom/vdom-render.ts
|
|
761
|
-
var scopeId;
|
|
762
1315
|
var hostTagName;
|
|
763
|
-
var useNativeShadowDom = false;
|
|
764
1316
|
var isSvgMode = false;
|
|
765
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
1317
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
766
1318
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
767
1319
|
let i2 = 0;
|
|
768
1320
|
let elm;
|
|
769
1321
|
let childNode;
|
|
770
1322
|
if (newVNode2.$text$ !== null) {
|
|
771
|
-
elm = newVNode2.$elm$ =
|
|
1323
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
772
1324
|
} else {
|
|
773
1325
|
if (!isSvgMode) {
|
|
774
1326
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
775
1327
|
}
|
|
776
|
-
|
|
1328
|
+
if (!win.document) {
|
|
1329
|
+
throw new Error(
|
|
1330
|
+
"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."
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
777
1334
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
778
|
-
|
|
1335
|
+
newVNode2.$tag$
|
|
779
1336
|
) ;
|
|
780
1337
|
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
781
1338
|
isSvgMode = false;
|
|
@@ -783,11 +1340,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
783
1340
|
{
|
|
784
1341
|
updateElement(null, newVNode2, isSvgMode);
|
|
785
1342
|
}
|
|
786
|
-
const rootNode = elm.getRootNode();
|
|
787
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
788
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
789
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
790
|
-
}
|
|
791
1343
|
if (newVNode2.$children$) {
|
|
792
1344
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
793
1345
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -924,6 +1476,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
924
1476
|
if (!isInitialRender) {
|
|
925
1477
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
926
1478
|
}
|
|
1479
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1480
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1481
|
+
}
|
|
927
1482
|
return true;
|
|
928
1483
|
}
|
|
929
1484
|
return false;
|
|
@@ -939,9 +1494,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
939
1494
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
940
1495
|
}
|
|
941
1496
|
{
|
|
942
|
-
|
|
943
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
944
|
-
}
|
|
1497
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
945
1498
|
}
|
|
946
1499
|
if (oldChildren !== null && newChildren !== null) {
|
|
947
1500
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -970,14 +1523,16 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
970
1523
|
}
|
|
971
1524
|
};
|
|
972
1525
|
var insertBefore = (parent, newNode, reference) => {
|
|
973
|
-
|
|
974
|
-
|
|
1526
|
+
{
|
|
1527
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1528
|
+
}
|
|
975
1529
|
};
|
|
976
1530
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
977
1531
|
const hostElm = hostRef.$hostElement$;
|
|
978
1532
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
979
1533
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
980
|
-
const
|
|
1534
|
+
const isHostElement = isHost(renderFnResults);
|
|
1535
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
981
1536
|
hostTagName = hostElm.tagName;
|
|
982
1537
|
if (cmpMeta.$attrsToReflect$) {
|
|
983
1538
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
@@ -996,17 +1551,20 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
996
1551
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
997
1552
|
hostRef.$vnode$ = rootVnode;
|
|
998
1553
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
999
|
-
{
|
|
1000
|
-
scopeId = hostElm["s-sc"];
|
|
1001
|
-
}
|
|
1002
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1003
1554
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1004
1555
|
};
|
|
1005
1556
|
|
|
1006
1557
|
// src/runtime/update-component.ts
|
|
1007
1558
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1008
1559
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1009
|
-
ancestorComponent["s-p"].push(
|
|
1560
|
+
const index = ancestorComponent["s-p"].push(
|
|
1561
|
+
new Promise(
|
|
1562
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1563
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1564
|
+
r();
|
|
1565
|
+
}
|
|
1566
|
+
)
|
|
1567
|
+
);
|
|
1010
1568
|
}
|
|
1011
1569
|
};
|
|
1012
1570
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1035,14 +1593,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1035
1593
|
{
|
|
1036
1594
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1037
1595
|
if (hostRef.$queuedListeners$) {
|
|
1038
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1596
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1039
1597
|
hostRef.$queuedListeners$ = void 0;
|
|
1040
1598
|
}
|
|
1041
1599
|
}
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1600
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1601
|
+
} else {
|
|
1602
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1045
1603
|
}
|
|
1604
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1046
1605
|
endSchedule();
|
|
1047
1606
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1048
1607
|
};
|
|
@@ -1085,7 +1644,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1085
1644
|
try {
|
|
1086
1645
|
instance = instance.render() ;
|
|
1087
1646
|
{
|
|
1088
|
-
hostRef.$flags$ &=
|
|
1647
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
1089
1648
|
}
|
|
1090
1649
|
{
|
|
1091
1650
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -1108,14 +1667,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1108
1667
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1109
1668
|
const instance = hostRef.$lazyInstance$ ;
|
|
1110
1669
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1670
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1111
1671
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1112
1672
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1113
1673
|
{
|
|
1114
1674
|
addHydratedFlag(elm);
|
|
1115
1675
|
}
|
|
1116
|
-
|
|
1117
|
-
safeCall(instance, "componentDidLoad");
|
|
1118
|
-
}
|
|
1676
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1119
1677
|
endPostUpdate();
|
|
1120
1678
|
{
|
|
1121
1679
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1124,6 +1682,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1124
1682
|
}
|
|
1125
1683
|
}
|
|
1126
1684
|
} else {
|
|
1685
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1127
1686
|
endPostUpdate();
|
|
1128
1687
|
}
|
|
1129
1688
|
{
|
|
@@ -1137,21 +1696,18 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1137
1696
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1138
1697
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1139
1698
|
}
|
|
1140
|
-
hostRef.$flags$ &=
|
|
1699
|
+
hostRef.$flags$ &= -517;
|
|
1141
1700
|
}
|
|
1142
1701
|
};
|
|
1143
1702
|
var appDidLoad = (who) => {
|
|
1144
|
-
{
|
|
1145
|
-
addHydratedFlag(doc.documentElement);
|
|
1146
|
-
}
|
|
1147
1703
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1148
1704
|
};
|
|
1149
|
-
var safeCall = (instance, method, arg) => {
|
|
1705
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1150
1706
|
if (instance && instance[method]) {
|
|
1151
1707
|
try {
|
|
1152
1708
|
return instance[method](arg);
|
|
1153
1709
|
} catch (e) {
|
|
1154
|
-
consoleError(e);
|
|
1710
|
+
consoleError(e, elm);
|
|
1155
1711
|
}
|
|
1156
1712
|
}
|
|
1157
1713
|
return void 0;
|
|
@@ -1167,14 +1723,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1167
1723
|
const hostRef = getHostRef(ref);
|
|
1168
1724
|
if (!hostRef) {
|
|
1169
1725
|
throw new Error(
|
|
1170
|
-
`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/
|
|
1726
|
+
`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).`
|
|
1171
1727
|
);
|
|
1172
1728
|
}
|
|
1173
1729
|
const elm = hostRef.$hostElement$ ;
|
|
1174
1730
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1175
1731
|
const flags = hostRef.$flags$;
|
|
1176
1732
|
const instance = hostRef.$lazyInstance$ ;
|
|
1177
|
-
newVal = parsePropertyValue(
|
|
1733
|
+
newVal = parsePropertyValue(
|
|
1734
|
+
newVal,
|
|
1735
|
+
cmpMeta.$members$[propName][0],
|
|
1736
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1737
|
+
);
|
|
1178
1738
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1179
1739
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1180
1740
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -1193,6 +1753,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1193
1753
|
}
|
|
1194
1754
|
}
|
|
1195
1755
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1756
|
+
if (instance.componentShouldUpdate) {
|
|
1757
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1758
|
+
return;
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1196
1761
|
scheduleUpdate(hostRef, false);
|
|
1197
1762
|
}
|
|
1198
1763
|
}
|
|
@@ -1204,23 +1769,23 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1204
1769
|
var _a, _b;
|
|
1205
1770
|
const prototype = Cstr.prototype;
|
|
1206
1771
|
if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
1207
|
-
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
|
|
1208
|
-
|
|
1772
|
+
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
1773
|
+
Object.defineProperty(prototype, cbName, {
|
|
1209
1774
|
value(...args) {
|
|
1210
1775
|
const hostRef = getHostRef(this);
|
|
1211
1776
|
const instance = hostRef.$lazyInstance$ ;
|
|
1212
1777
|
if (!instance) {
|
|
1213
|
-
hostRef.$onReadyPromise$.then((
|
|
1214
|
-
const cb =
|
|
1215
|
-
typeof cb === "function" && cb.call(
|
|
1778
|
+
hostRef.$onReadyPromise$.then((asyncInstance) => {
|
|
1779
|
+
const cb = asyncInstance[cbName];
|
|
1780
|
+
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
1216
1781
|
});
|
|
1217
1782
|
} else {
|
|
1218
|
-
const cb = instance[cbName];
|
|
1783
|
+
const cb = instance[cbName] ;
|
|
1219
1784
|
typeof cb === "function" && cb.call(instance, ...args);
|
|
1220
1785
|
}
|
|
1221
1786
|
}
|
|
1222
|
-
})
|
|
1223
|
-
);
|
|
1787
|
+
});
|
|
1788
|
+
});
|
|
1224
1789
|
}
|
|
1225
1790
|
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
1226
1791
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
@@ -1229,15 +1794,78 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1229
1794
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1230
1795
|
members.map(([memberName, [memberFlags]]) => {
|
|
1231
1796
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1797
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1798
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1799
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1800
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1801
|
+
Object.defineProperty(prototype, memberName, {
|
|
1802
|
+
get() {
|
|
1803
|
+
{
|
|
1804
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1805
|
+
return getValue(this, memberName);
|
|
1806
|
+
}
|
|
1807
|
+
const ref = getHostRef(this);
|
|
1808
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1809
|
+
if (!instance) return;
|
|
1810
|
+
return instance[memberName];
|
|
1811
|
+
}
|
|
1812
|
+
},
|
|
1813
|
+
configurable: true,
|
|
1814
|
+
enumerable: true
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1232
1817
|
Object.defineProperty(prototype, memberName, {
|
|
1233
|
-
get() {
|
|
1234
|
-
return getValue(this, memberName);
|
|
1235
|
-
},
|
|
1236
1818
|
set(newValue) {
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1819
|
+
const ref = getHostRef(this);
|
|
1820
|
+
if (origSetter) {
|
|
1821
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1822
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1823
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1824
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1825
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1826
|
+
}
|
|
1827
|
+
origSetter.apply(this, [
|
|
1828
|
+
parsePropertyValue(
|
|
1829
|
+
newValue,
|
|
1830
|
+
memberFlags,
|
|
1831
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1832
|
+
)
|
|
1833
|
+
]);
|
|
1834
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1835
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1836
|
+
return;
|
|
1837
|
+
}
|
|
1838
|
+
{
|
|
1839
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1840
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1841
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1842
|
+
ref.$onReadyPromise$.then(() => {
|
|
1843
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1844
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
return;
|
|
1849
|
+
}
|
|
1850
|
+
const setterSetVal = () => {
|
|
1851
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1852
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1853
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1854
|
+
}
|
|
1855
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1856
|
+
newValue,
|
|
1857
|
+
memberFlags,
|
|
1858
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1859
|
+
);
|
|
1860
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1861
|
+
};
|
|
1862
|
+
if (ref.$lazyInstance$) {
|
|
1863
|
+
setterSetVal();
|
|
1864
|
+
} else {
|
|
1865
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1241
1869
|
});
|
|
1242
1870
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1243
1871
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -1258,7 +1886,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1258
1886
|
plt.jmp(() => {
|
|
1259
1887
|
var _a2;
|
|
1260
1888
|
const propName = attrNameToPropName.get(attrName);
|
|
1261
|
-
if (this.hasOwnProperty(propName)) {
|
|
1889
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1262
1890
|
newValue = this[propName];
|
|
1263
1891
|
delete this[propName];
|
|
1264
1892
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1278,7 +1906,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1278
1906
|
}
|
|
1279
1907
|
return;
|
|
1280
1908
|
}
|
|
1281
|
-
|
|
1909
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1910
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1911
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1912
|
+
this[propName] = newValue;
|
|
1913
|
+
}
|
|
1282
1914
|
});
|
|
1283
1915
|
};
|
|
1284
1916
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1307,7 +1939,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1307
1939
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1308
1940
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1309
1941
|
if (bundleId) {
|
|
1310
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1942
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1311
1943
|
if (CstrImport && "then" in CstrImport) {
|
|
1312
1944
|
const endLoad = uniqueTime();
|
|
1313
1945
|
Cstr = await CstrImport;
|
|
@@ -1332,16 +1964,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1332
1964
|
try {
|
|
1333
1965
|
new Cstr(hostRef);
|
|
1334
1966
|
} catch (e) {
|
|
1335
|
-
consoleError(e);
|
|
1967
|
+
consoleError(e, elm);
|
|
1336
1968
|
}
|
|
1337
1969
|
{
|
|
1338
|
-
hostRef.$flags$ &=
|
|
1970
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1339
1971
|
}
|
|
1340
1972
|
{
|
|
1341
1973
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1342
1974
|
}
|
|
1343
1975
|
endNewInstance();
|
|
1344
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1976
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1345
1977
|
} else {
|
|
1346
1978
|
Cstr = elm.constructor;
|
|
1347
1979
|
const cmpTag = elm.localName;
|
|
@@ -1368,9 +2000,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1368
2000
|
schedule();
|
|
1369
2001
|
}
|
|
1370
2002
|
};
|
|
1371
|
-
var fireConnectedCallback = (instance) => {
|
|
2003
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1372
2004
|
{
|
|
1373
|
-
safeCall(instance, "connectedCallback");
|
|
2005
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1374
2006
|
}
|
|
1375
2007
|
};
|
|
1376
2008
|
|
|
@@ -1417,17 +2049,17 @@ var connectedCallback = (elm) => {
|
|
|
1417
2049
|
} else {
|
|
1418
2050
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1419
2051
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1420
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2052
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1421
2053
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1422
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
2054
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1423
2055
|
}
|
|
1424
2056
|
}
|
|
1425
2057
|
endConnected();
|
|
1426
2058
|
}
|
|
1427
2059
|
};
|
|
1428
|
-
var disconnectInstance = (instance) => {
|
|
2060
|
+
var disconnectInstance = (instance, elm) => {
|
|
1429
2061
|
{
|
|
1430
|
-
safeCall(instance, "disconnectedCallback");
|
|
2062
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1431
2063
|
}
|
|
1432
2064
|
};
|
|
1433
2065
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1440,31 +2072,44 @@ var disconnectedCallback = async (elm) => {
|
|
|
1440
2072
|
}
|
|
1441
2073
|
}
|
|
1442
2074
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1443
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
2075
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1444
2076
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1445
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
2077
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1446
2078
|
}
|
|
1447
2079
|
}
|
|
2080
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2081
|
+
rootAppliedStyles.delete(elm);
|
|
2082
|
+
}
|
|
2083
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2084
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2085
|
+
}
|
|
1448
2086
|
};
|
|
1449
2087
|
|
|
1450
2088
|
// src/runtime/bootstrap-lazy.ts
|
|
1451
2089
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1452
2090
|
var _a;
|
|
2091
|
+
if (!win.document) {
|
|
2092
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2093
|
+
return;
|
|
2094
|
+
}
|
|
1453
2095
|
const endBootstrap = createTime();
|
|
1454
2096
|
const cmpTags = [];
|
|
1455
2097
|
const exclude = options.exclude || [];
|
|
1456
2098
|
const customElements2 = win.customElements;
|
|
1457
|
-
const head =
|
|
2099
|
+
const head = win.document.head;
|
|
1458
2100
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1459
|
-
const dataStyles = /* @__PURE__ */
|
|
2101
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1460
2102
|
const deferredConnectedCallbacks = [];
|
|
1461
2103
|
let appLoadFallback;
|
|
1462
2104
|
let isBootstrapping = true;
|
|
1463
2105
|
Object.assign(plt, options);
|
|
1464
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2106
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1465
2107
|
{
|
|
1466
2108
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
1467
2109
|
}
|
|
2110
|
+
{
|
|
2111
|
+
hydrateScopedToShadow();
|
|
2112
|
+
}
|
|
1468
2113
|
let hasSlotRelocation = false;
|
|
1469
2114
|
lazyBundles.map((lazyBundle) => {
|
|
1470
2115
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1501,9 +2146,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1501
2146
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1502
2147
|
{
|
|
1503
2148
|
if (!self.shadowRoot) {
|
|
1504
|
-
|
|
1505
|
-
self.attachShadow({ mode: "open" });
|
|
1506
|
-
}
|
|
2149
|
+
createShadowRoot.call(self, cmpMeta);
|
|
1507
2150
|
} else {
|
|
1508
2151
|
if (self.shadowRoot.mode !== "open") {
|
|
1509
2152
|
throw new Error(
|
|
@@ -1532,6 +2175,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1532
2175
|
}
|
|
1533
2176
|
disconnectedCallback() {
|
|
1534
2177
|
plt.jmp(() => disconnectedCallback(this));
|
|
2178
|
+
plt.raf(() => {
|
|
2179
|
+
var _a3;
|
|
2180
|
+
const hostRef = getHostRef(this);
|
|
2181
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2182
|
+
if (i2 > -1) {
|
|
2183
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2184
|
+
}
|
|
2185
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2186
|
+
delete hostRef.$vnode$.$elm$;
|
|
2187
|
+
}
|
|
2188
|
+
});
|
|
1535
2189
|
}
|
|
1536
2190
|
componentOnReady() {
|
|
1537
2191
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1559,7 +2213,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1559
2213
|
}
|
|
1560
2214
|
if (dataStyles.innerHTML.length) {
|
|
1561
2215
|
dataStyles.setAttribute("data-styles", "");
|
|
1562
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2216
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1563
2217
|
if (nonce != null) {
|
|
1564
2218
|
dataStyles.setAttribute("nonce", nonce);
|
|
1565
2219
|
}
|
|
@@ -1577,9 +2231,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1577
2231
|
endBootstrap();
|
|
1578
2232
|
};
|
|
1579
2233
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1580
|
-
if (listeners) {
|
|
2234
|
+
if (listeners && win.document) {
|
|
1581
2235
|
listeners.map(([flags, name, method]) => {
|
|
1582
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2236
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
1583
2237
|
const handler = hostListenerProxy(hostRef, method);
|
|
1584
2238
|
const opts = hostListenerOpts(flags);
|
|
1585
2239
|
plt.ael(target, name, handler, opts);
|
|
@@ -1598,11 +2252,13 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1598
2252
|
}
|
|
1599
2253
|
}
|
|
1600
2254
|
} catch (e) {
|
|
1601
|
-
consoleError(e);
|
|
2255
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1602
2256
|
}
|
|
1603
2257
|
};
|
|
1604
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1605
|
-
if (flags & 8 /* TargetWindow */)
|
|
2258
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2259
|
+
if (flags & 8 /* TargetWindow */) {
|
|
2260
|
+
return win;
|
|
2261
|
+
}
|
|
1606
2262
|
return elm;
|
|
1607
2263
|
};
|
|
1608
2264
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1617,9 +2273,11 @@ exports.Host = Host;
|
|
|
1617
2273
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1618
2274
|
exports.createEvent = createEvent;
|
|
1619
2275
|
exports.getElement = getElement;
|
|
2276
|
+
exports.globalScripts = globalScripts;
|
|
1620
2277
|
exports.h = h;
|
|
1621
2278
|
exports.promiseResolve = promiseResolve;
|
|
1622
2279
|
exports.registerInstance = registerInstance;
|
|
1623
2280
|
exports.setNonce = setNonce;
|
|
2281
|
+
//# sourceMappingURL=index-BK9MSAiE.js.map
|
|
1624
2282
|
|
|
1625
|
-
//# sourceMappingURL=index-
|
|
2283
|
+
//# sourceMappingURL=index-BK9MSAiE.js.map
|