@rededor/cura 1.7.0 → 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/assets/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/assets/icons/iconset-default-tmp.svg +26 -0
- package/dist/assets/assets/icons/iconset-default.svg +1 -1
- 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/assets/icons/iconset-default-list.js +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-tmp.svg +26 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/bike.svg +3 -0
- package/dist/collection/assets-raw/icons/default/cart.svg +3 -0
- package/dist/collection/assets-raw/icons/default/coffee.svg +3 -0
- package/dist/collection/assets-raw/icons/default/id.svg +3 -0
- package/dist/collection/assets-raw/icons/default/image.svg +5 -0
- package/dist/collection/assets-raw/icons/default/store.svg +3 -0
- 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 +13 -16
- 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-5c6f9593.entry.js +0 -2
- package/dist/cura/p-5c6f9593.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-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
|
@@ -0,0 +1,2617 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cura Default Theme
|
|
3
|
+
*/
|
|
4
|
+
const ThemeDefault = {
|
|
5
|
+
/* Colors */
|
|
6
|
+
color: {
|
|
7
|
+
primary: {
|
|
8
|
+
'100': '113,197,232',
|
|
9
|
+
'300': '68,142,205',
|
|
10
|
+
'500': '0,61,165',
|
|
11
|
+
'700': '0,48,117',
|
|
12
|
+
'900': '0,40,85'
|
|
13
|
+
},
|
|
14
|
+
secondary: {
|
|
15
|
+
'100': '245,236,227',
|
|
16
|
+
'300': '221,192,162',
|
|
17
|
+
'500': '204,160,116',
|
|
18
|
+
'700': '136,107,77',
|
|
19
|
+
'900': '41,32,23'
|
|
20
|
+
},
|
|
21
|
+
accent: {
|
|
22
|
+
'100': '255,194,123',
|
|
23
|
+
'300': '255,168,74',
|
|
24
|
+
'500': '255,130,0',
|
|
25
|
+
'700': '215,114,10',
|
|
26
|
+
'900': '155,90,26'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
/* Spacing */
|
|
30
|
+
spacing: {
|
|
31
|
+
base: 4,
|
|
32
|
+
},
|
|
33
|
+
/* Fonts */
|
|
34
|
+
font: {
|
|
35
|
+
size: '14px',
|
|
36
|
+
color: '#4A4A4A',
|
|
37
|
+
body: "'Gotham', Arial, Helvetica, sans-serif",
|
|
38
|
+
heading: "'Gotham', Arial, Helvetica, sans-serif",
|
|
39
|
+
display: "'Gotham', Arial, Helvetica, sans-serif",
|
|
40
|
+
weights: {
|
|
41
|
+
thin: 100,
|
|
42
|
+
light: 300,
|
|
43
|
+
regular: 400,
|
|
44
|
+
medium: 500,
|
|
45
|
+
bold: 700,
|
|
46
|
+
black: 900
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Maternity Theme
|
|
53
|
+
*/
|
|
54
|
+
const ThemeMaternity = Object.assign(Object.assign({}, ThemeDefault), {
|
|
55
|
+
/* Custom */
|
|
56
|
+
/* Colors */
|
|
57
|
+
color: {
|
|
58
|
+
primary: {
|
|
59
|
+
'100': '248,227,226',
|
|
60
|
+
'300': '255,179,171',
|
|
61
|
+
'500': '218,113,111',
|
|
62
|
+
'700': '145,75,74',
|
|
63
|
+
'900': '73,38,37'
|
|
64
|
+
},
|
|
65
|
+
secondary: {
|
|
66
|
+
'100': '253,251,249',
|
|
67
|
+
'300': '247,244,238',
|
|
68
|
+
'500': '245,236,227',
|
|
69
|
+
'700': '204,197,189',
|
|
70
|
+
'900': '163,157,151'
|
|
71
|
+
},
|
|
72
|
+
accent: {
|
|
73
|
+
'100': '236,239,249',
|
|
74
|
+
'300': '133,153,203',
|
|
75
|
+
'500': '11,20,151',
|
|
76
|
+
'700': '7,13,101',
|
|
77
|
+
'900': '4,7,50'
|
|
78
|
+
}
|
|
79
|
+
}, font: {
|
|
80
|
+
size: '14px',
|
|
81
|
+
color: '#4A4A4A',
|
|
82
|
+
body: "'Gotham', Arial, Helvetica, sans-serif",
|
|
83
|
+
heading: "'Gotham', Arial, Helvetica, sans-serif",
|
|
84
|
+
display: "'Gotham', Arial, Helvetica, sans-serif",
|
|
85
|
+
weights: {
|
|
86
|
+
thin: 100,
|
|
87
|
+
light: 300,
|
|
88
|
+
regular: 400,
|
|
89
|
+
medium: 500,
|
|
90
|
+
bold: 700,
|
|
91
|
+
black: 900
|
|
92
|
+
},
|
|
93
|
+
} });
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Oncology Theme
|
|
97
|
+
*/
|
|
98
|
+
const ThemeOncology = Object.assign(Object.assign({}, ThemeDefault), {
|
|
99
|
+
/* Custom */
|
|
100
|
+
/* Colors */
|
|
101
|
+
color: {
|
|
102
|
+
primary: {
|
|
103
|
+
'100': '170,190,225',
|
|
104
|
+
'300': '85,126,196',
|
|
105
|
+
'500': '0,61,166',
|
|
106
|
+
'700': '0,41,111',
|
|
107
|
+
'900': '0,12,33'
|
|
108
|
+
},
|
|
109
|
+
secondary: {
|
|
110
|
+
'100': '205,215,227',
|
|
111
|
+
'300': '155,175,199',
|
|
112
|
+
'500': '104,134,171',
|
|
113
|
+
'700': '54,95,143',
|
|
114
|
+
'900': '4,54,115',
|
|
115
|
+
},
|
|
116
|
+
accent: {
|
|
117
|
+
'100': '153,207,255',
|
|
118
|
+
'300': '71,169,255',
|
|
119
|
+
'500': '0,131,245',
|
|
120
|
+
'700': '0,109,204',
|
|
121
|
+
'900': '0,88,164',
|
|
122
|
+
},
|
|
123
|
+
aux: {
|
|
124
|
+
'100': '218,242,239',
|
|
125
|
+
'300': '132,212,202',
|
|
126
|
+
'500': '71,191,176',
|
|
127
|
+
'700': '33,100,92',
|
|
128
|
+
'900': '14,38,35',
|
|
129
|
+
},
|
|
130
|
+
}, font: {
|
|
131
|
+
size: '14px',
|
|
132
|
+
color: '#4A4A4A',
|
|
133
|
+
body: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
|
|
134
|
+
heading: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
|
|
135
|
+
display: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
|
|
136
|
+
weights: {
|
|
137
|
+
thin: 100,
|
|
138
|
+
light: 300,
|
|
139
|
+
regular: 400,
|
|
140
|
+
medium: 500,
|
|
141
|
+
bold: 700,
|
|
142
|
+
black: 900
|
|
143
|
+
},
|
|
144
|
+
} });
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Richet Theme
|
|
148
|
+
*/
|
|
149
|
+
const ThemeRichet = Object.assign(Object.assign({}, ThemeDefault), {
|
|
150
|
+
/* Custom */
|
|
151
|
+
/* Colors */
|
|
152
|
+
color: {
|
|
153
|
+
primary: {
|
|
154
|
+
'100': '153,197,255',
|
|
155
|
+
'300': '67,142,241',
|
|
156
|
+
'500': '0,47,108',
|
|
157
|
+
'700': '1,39,91',
|
|
158
|
+
'900': '0,33,77'
|
|
159
|
+
},
|
|
160
|
+
secondary: {
|
|
161
|
+
'100': '243,237,227',
|
|
162
|
+
'300': '216,194,163',
|
|
163
|
+
'500': '208,173,103',
|
|
164
|
+
'700': '201,155,64',
|
|
165
|
+
'900': '149,104,15'
|
|
166
|
+
},
|
|
167
|
+
accent: {
|
|
168
|
+
'100': '167,230,215',
|
|
169
|
+
'300': '130,225,209',
|
|
170
|
+
'500': '44,213,196',
|
|
171
|
+
'700': '26,188,169',
|
|
172
|
+
'900': '0,150,129'
|
|
173
|
+
}
|
|
174
|
+
} });
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Perinatal temporary Theme
|
|
178
|
+
*/
|
|
179
|
+
const ThemePerinatalTemporary = Object.assign(Object.assign({}, ThemeDefault), {
|
|
180
|
+
/* Custom */
|
|
181
|
+
/* Colors */
|
|
182
|
+
color: {
|
|
183
|
+
primary: {
|
|
184
|
+
'100': '239,226,228',
|
|
185
|
+
'300': '226,196,200',
|
|
186
|
+
'500': '199,134,141',
|
|
187
|
+
'700': '175,91,109',
|
|
188
|
+
'900': '147,58,77'
|
|
189
|
+
},
|
|
190
|
+
secondary: {
|
|
191
|
+
'100': '233,226,220',
|
|
192
|
+
'300': '211,196,186',
|
|
193
|
+
'500': '189,167,151',
|
|
194
|
+
'700': '95,84,76',
|
|
195
|
+
'900': '38,33,30'
|
|
196
|
+
},
|
|
197
|
+
accent: {
|
|
198
|
+
'100': '219,189,196',
|
|
199
|
+
'300': '183,124,136',
|
|
200
|
+
'500': '147,58,77',
|
|
201
|
+
'700': '74,29,39',
|
|
202
|
+
'900': '29,12,15'
|
|
203
|
+
}
|
|
204
|
+
} });
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Legacy Default Theme
|
|
208
|
+
*/
|
|
209
|
+
const ThemeLegacyDefault = Object.assign(Object.assign({}, ThemeDefault), {
|
|
210
|
+
/* Custom */
|
|
211
|
+
/* Colors */
|
|
212
|
+
color: {
|
|
213
|
+
primary: {
|
|
214
|
+
'100': '204,217,231',
|
|
215
|
+
'300': '85,128,174',
|
|
216
|
+
'500': '0,65,134',
|
|
217
|
+
'700': '0,43,89',
|
|
218
|
+
'900': '0,13,27'
|
|
219
|
+
},
|
|
220
|
+
secondary: {
|
|
221
|
+
'100': '238,232,206',
|
|
222
|
+
'300': '198,180,92',
|
|
223
|
+
'500': '170,142,11',
|
|
224
|
+
'700': '113,95,7',
|
|
225
|
+
'900': '34,28,2'
|
|
226
|
+
},
|
|
227
|
+
accent: {
|
|
228
|
+
'100': '249,232,213',
|
|
229
|
+
'300': '228,160,79',
|
|
230
|
+
'500': '223,141,44',
|
|
231
|
+
'700': '149,94,29',
|
|
232
|
+
'900': '45,28,9'
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
/* Fonts */
|
|
236
|
+
font: {
|
|
237
|
+
size: '14px',
|
|
238
|
+
color: '#4A4A4A',
|
|
239
|
+
body: "'Roboto', Arial, Helvetica, sans-serif",
|
|
240
|
+
heading: "'Roboto', Arial, Helvetica, sans-serif",
|
|
241
|
+
display: "'Roboto', Arial, Helvetica, sans-serif",
|
|
242
|
+
weights: {
|
|
243
|
+
thin: 100,
|
|
244
|
+
light: 300,
|
|
245
|
+
regular: 400,
|
|
246
|
+
medium: 500,
|
|
247
|
+
bold: 700,
|
|
248
|
+
black: 900
|
|
249
|
+
},
|
|
250
|
+
} });
|
|
251
|
+
|
|
252
|
+
const ThemePresets = {
|
|
253
|
+
'default': ThemeDefault,
|
|
254
|
+
'maternidade': ThemeMaternity,
|
|
255
|
+
'oncologia': ThemeOncology,
|
|
256
|
+
'richet': ThemeRichet,
|
|
257
|
+
'perinatalTemp': ThemePerinatalTemporary,
|
|
258
|
+
'legacyDefault': ThemeLegacyDefault
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Static
|
|
263
|
+
*/
|
|
264
|
+
const Static = {
|
|
265
|
+
/* Colors */
|
|
266
|
+
color: {
|
|
267
|
+
success: {
|
|
268
|
+
'100': '223,246,233',
|
|
269
|
+
'300': '148,225,181',
|
|
270
|
+
'500': '95,210,144',
|
|
271
|
+
'700': '49,115,77',
|
|
272
|
+
'900': '19,42,29',
|
|
273
|
+
},
|
|
274
|
+
info: {
|
|
275
|
+
'100': '207,226,255',
|
|
276
|
+
'300': '149,191,255',
|
|
277
|
+
'500': '110,168,255',
|
|
278
|
+
'700': '66,100,153',
|
|
279
|
+
'900': '37,56,85',
|
|
280
|
+
},
|
|
281
|
+
/* error: {
|
|
282
|
+
'100': '251,221,221',
|
|
283
|
+
'300': '242,143,143',
|
|
284
|
+
'500': '235,87,87',
|
|
285
|
+
'700': '157,58,58',
|
|
286
|
+
'900': '47,17,17',
|
|
287
|
+
}, */
|
|
288
|
+
error: {
|
|
289
|
+
'100': '251,221,221',
|
|
290
|
+
'300': '242,143,143',
|
|
291
|
+
'500': '206,42,42',
|
|
292
|
+
'700': '157,58,58',
|
|
293
|
+
'900': '47,17,17',
|
|
294
|
+
},
|
|
295
|
+
warning: {
|
|
296
|
+
'100': '252,250,196',
|
|
297
|
+
'300': '248,244,137',
|
|
298
|
+
'500': '245,239,78',
|
|
299
|
+
'700': '108,106,32',
|
|
300
|
+
'900': '49,48,16',
|
|
301
|
+
},
|
|
302
|
+
whatsapp: {
|
|
303
|
+
'100': '182,240,204',
|
|
304
|
+
'300': '110,226,153',
|
|
305
|
+
'500': '37,211,102',
|
|
306
|
+
'700': '25,141,68',
|
|
307
|
+
'900': '7,42,20',
|
|
308
|
+
},
|
|
309
|
+
neutral: {
|
|
310
|
+
'0': '255,255,255',
|
|
311
|
+
'100': '246,246,246',
|
|
312
|
+
'200': '233,233,233',
|
|
313
|
+
'300': '226,226,226',
|
|
314
|
+
'400': '212,212,212',
|
|
315
|
+
'500': '183,183,183',
|
|
316
|
+
'600': '146,146,146',
|
|
317
|
+
'700': '110,110,110',
|
|
318
|
+
'800': '74,74,74',
|
|
319
|
+
'900': '38,38,38',
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
breakpoints: {
|
|
323
|
+
xsmall: {
|
|
324
|
+
min: 0,
|
|
325
|
+
max: 480
|
|
326
|
+
},
|
|
327
|
+
small: {
|
|
328
|
+
min: 481,
|
|
329
|
+
max: 768
|
|
330
|
+
},
|
|
331
|
+
medium: {
|
|
332
|
+
min: 769,
|
|
333
|
+
max: 992
|
|
334
|
+
},
|
|
335
|
+
large: {
|
|
336
|
+
min: 993,
|
|
337
|
+
max: 1920
|
|
338
|
+
},
|
|
339
|
+
xlarge: {
|
|
340
|
+
min: 1921,
|
|
341
|
+
max: 4096
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
class CuraThemeColorsModule {
|
|
347
|
+
constructor() {
|
|
348
|
+
this.NeutralDepthAlias = {
|
|
349
|
+
'purewhite': '0',
|
|
350
|
+
'white': '100',
|
|
351
|
+
'pale': '200',
|
|
352
|
+
'lighter': '300',
|
|
353
|
+
'light': '400',
|
|
354
|
+
'base': '500',
|
|
355
|
+
'medium': '600',
|
|
356
|
+
'dark': '700',
|
|
357
|
+
'darker': '800',
|
|
358
|
+
'black': '900',
|
|
359
|
+
};
|
|
360
|
+
this.ColorDepthAlias = {
|
|
361
|
+
'lighter': '100',
|
|
362
|
+
'light': '300',
|
|
363
|
+
'base': '500',
|
|
364
|
+
'dark': '700',
|
|
365
|
+
'darker': '900'
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Get theme color.
|
|
370
|
+
* @param colorWithDepth string Ex.: primary-light
|
|
371
|
+
* @returns RGBA value.
|
|
372
|
+
*/
|
|
373
|
+
getColor(colorWithDepth = "primary-base", opacity = 1) {
|
|
374
|
+
const { color, depth } = this.splitColorDepth(colorWithDepth);
|
|
375
|
+
const staticColor = this.getStatic(color, depth, opacity);
|
|
376
|
+
if (staticColor)
|
|
377
|
+
return staticColor;
|
|
378
|
+
return this.getDynamic(color, depth, opacity);
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Internal: Look for static color by name and depth.
|
|
382
|
+
* @param color Color name.
|
|
383
|
+
* @param depth Depth number or alias.
|
|
384
|
+
* @returns RGBA value.
|
|
385
|
+
*/
|
|
386
|
+
getStatic(color, depth, opacity = 1) {
|
|
387
|
+
var _a, _b, _c;
|
|
388
|
+
const colorObj = Static.color[color];
|
|
389
|
+
if (!colorObj)
|
|
390
|
+
return null;
|
|
391
|
+
const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];
|
|
392
|
+
return ((_a = Static.color[color]) === null || _a === void 0 ? void 0 : _a[alias])
|
|
393
|
+
? `rgba(${(_b = Static.color[color]) === null || _b === void 0 ? void 0 : _b[alias]}, ${opacity})`
|
|
394
|
+
: `rgba(${(_c = Static.color[color]) === null || _c === void 0 ? void 0 : _c[depth]}, ${opacity})`;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Internal: Look for theme dynamic colors.
|
|
398
|
+
* @param color Color name.
|
|
399
|
+
* @param depth Color depth.
|
|
400
|
+
* @returns RGBA value.
|
|
401
|
+
*/
|
|
402
|
+
getDynamic(color, depth, opacity) {
|
|
403
|
+
const themeVar = this.ColorDepthAlias[depth]
|
|
404
|
+
? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`
|
|
405
|
+
: `--cura-color-${color}-${depth}`;
|
|
406
|
+
return getComputedStyle(document.documentElement).getPropertyValue(themeVar)
|
|
407
|
+
? `rgba(var(${themeVar}), ${opacity})`
|
|
408
|
+
: `rgba(var(--cura-color-primary-500), ${opacity})`;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Internal: Split color strings
|
|
412
|
+
* @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.
|
|
413
|
+
* @returns Object { color: string, depth: string }.
|
|
414
|
+
*/
|
|
415
|
+
splitColorDepth(colorWithDepth) {
|
|
416
|
+
const [color, depth] = colorWithDepth.toLowerCase().split(/-(.*)/);
|
|
417
|
+
return { color: color !== null && color !== void 0 ? color : "primary", depth: depth !== null && depth !== void 0 ? depth : "base" };
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
class CuraThemeSpacingModule {
|
|
422
|
+
constructor() {
|
|
423
|
+
this.curaSpacing = '--cura-spacing-base';
|
|
424
|
+
}
|
|
425
|
+
/** Returns the base spacing var defined in the theme */
|
|
426
|
+
getSpacing() {
|
|
427
|
+
if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {
|
|
428
|
+
return `var(${this.curaSpacing})`;
|
|
429
|
+
}
|
|
430
|
+
return '4';
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
class CuraThemeFontsModule {
|
|
435
|
+
constructor() {
|
|
436
|
+
/**
|
|
437
|
+
* Get the CSS variable related to the font size base defined by the theme.
|
|
438
|
+
* @returns Related CSS variable as a string.
|
|
439
|
+
*/
|
|
440
|
+
this.getSize = () => `var(--cura-font-size)`;
|
|
441
|
+
/**
|
|
442
|
+
* Get CSS variable related to the font color defined by the theme.
|
|
443
|
+
* @returns Related CSS variable as a string.
|
|
444
|
+
*/
|
|
445
|
+
this.getColor = () => `var(--cura-font-color)`;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Get the CSS variable related to the font family defined by the theme.
|
|
449
|
+
* @param type 'body' | 'heading' | 'display'
|
|
450
|
+
* @returns Related css variable as a string.
|
|
451
|
+
*/
|
|
452
|
+
getFamily(type = "body") {
|
|
453
|
+
const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;
|
|
454
|
+
return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)
|
|
455
|
+
? `var(${curaFontFamilyCSSVar})`
|
|
456
|
+
: 'var(--cura-font-body)';
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Get the CSS variables related to font weights defined by the theme.
|
|
460
|
+
* @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.
|
|
461
|
+
*/
|
|
462
|
+
getWeights() {
|
|
463
|
+
const weights = {};
|
|
464
|
+
Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);
|
|
465
|
+
return weights;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
class CuraThemeBreakpointsModule {
|
|
470
|
+
constructor() { }
|
|
471
|
+
/** Returns the base spacing var defined in the theme */
|
|
472
|
+
get(size = null, position = null) {
|
|
473
|
+
if (size) {
|
|
474
|
+
const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];
|
|
475
|
+
if (breakpoint || breakpoint === 0)
|
|
476
|
+
return breakpoint;
|
|
477
|
+
}
|
|
478
|
+
return Static.breakpoints;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
class CuraThemeModule {
|
|
483
|
+
constructor() {
|
|
484
|
+
var _a;
|
|
485
|
+
this.prefix = '--cura';
|
|
486
|
+
this.colors = new CuraThemeColorsModule();
|
|
487
|
+
this.spacing = new CuraThemeSpacingModule();
|
|
488
|
+
this.fonts = new CuraThemeFontsModule();
|
|
489
|
+
this.breakpoints = new CuraThemeBreakpointsModule();
|
|
490
|
+
this.groupObject = {};
|
|
491
|
+
/* Private */
|
|
492
|
+
/** Set css var based on object structure */
|
|
493
|
+
this.setCssVar = (prop, path) => {
|
|
494
|
+
const varName = this.groupPath(path, prop[0]);
|
|
495
|
+
this.rootElement.style.setProperty(varName, prop[1]);
|
|
496
|
+
};
|
|
497
|
+
this.groupPath = (a, b) => `${a}-${b}`;
|
|
498
|
+
this.isObject = val => {
|
|
499
|
+
return val && typeof val === 'object' && !Array.isArray(val);
|
|
500
|
+
};
|
|
501
|
+
/** Deep merge objects */
|
|
502
|
+
this.mergeObject = (from, to) => {
|
|
503
|
+
const entries = Object.entries(from);
|
|
504
|
+
for (let e of entries) {
|
|
505
|
+
if (this.isObject(e[1])) {
|
|
506
|
+
this.mergeObject(e[1], to[e[0]]);
|
|
507
|
+
}
|
|
508
|
+
else {
|
|
509
|
+
to[e[0]] = e[1];
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
/** Set css vars from preset object */
|
|
514
|
+
this.buildCssVars = (path, obj, isGroup = false) => {
|
|
515
|
+
const entries = Object.entries(obj);
|
|
516
|
+
for (let e of entries) {
|
|
517
|
+
if (this.isObject(e[1])) {
|
|
518
|
+
this.buildCssVars(this.groupPath(path, e[0]), e[1], isGroup);
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
if (isGroup) {
|
|
522
|
+
const varName = this.groupPath(path, e[0]);
|
|
523
|
+
this.groupObject[varName] = e[1];
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
this.setCssVar(e, path);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
if (typeof window === 'undefined')
|
|
532
|
+
return;
|
|
533
|
+
this.rootElement = (_a = window === null || window === void 0 ? void 0 : window.document) === null || _a === void 0 ? void 0 : _a.documentElement;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Load a theme.
|
|
537
|
+
* @param theme Theme tag.
|
|
538
|
+
*/
|
|
539
|
+
load(theme = 'default') {
|
|
540
|
+
const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
|
|
541
|
+
this.buildCssVars(this.prefix, preset);
|
|
542
|
+
}
|
|
543
|
+
loadVarsSSR(theme = 'default') {
|
|
544
|
+
const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
|
|
545
|
+
this.buildCssVars(this.prefix, preset, true);
|
|
546
|
+
return this.groupObject;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Define a custom theme
|
|
550
|
+
* @param customTheme Custom theme object definition
|
|
551
|
+
*/
|
|
552
|
+
setCustom(customTheme) {
|
|
553
|
+
const customTag = customTheme.name;
|
|
554
|
+
if (customTag in ThemePresets) {
|
|
555
|
+
console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
|
|
556
|
+
this.load('default');
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets ? ThemePresets[customTheme.fromPreset] : ThemePresets.default;
|
|
560
|
+
const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
|
|
561
|
+
this.mergeObject(customTheme.definitions, newTheme);
|
|
562
|
+
ThemePresets[customTag] = newTheme;
|
|
563
|
+
this.load(customTag);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
class CuraAPI {
|
|
569
|
+
constructor(config) {
|
|
570
|
+
this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
|
|
571
|
+
const themeModule = new CuraThemeModule();
|
|
572
|
+
this.theme = {
|
|
573
|
+
load: function (themeTag) { themeModule.load(themeTag); },
|
|
574
|
+
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
|
|
575
|
+
colors: {
|
|
576
|
+
getColor: function (colorWithDepth, opacity) { return themeModule.colors.getColor(colorWithDepth, opacity); },
|
|
577
|
+
},
|
|
578
|
+
fonts: {
|
|
579
|
+
getFamily: function (type) { return themeModule.fonts.getFamily(type); },
|
|
580
|
+
getWeights: function () { return themeModule.fonts.getWeights(); },
|
|
581
|
+
getSize: function () { return themeModule.fonts.getSize(); },
|
|
582
|
+
getColor: function () { return themeModule.fonts.getColor(); }
|
|
583
|
+
},
|
|
584
|
+
spacing: {
|
|
585
|
+
getSpacing: function () { return themeModule.spacing.getSpacing(); },
|
|
586
|
+
},
|
|
587
|
+
breakpoints: {
|
|
588
|
+
get: function (size, position) { return themeModule.breakpoints.get(size, position); }
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
this._addGlobalClasses();
|
|
592
|
+
if (config && config.customTheme) {
|
|
593
|
+
this.theme.setCustom(config.customTheme);
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
const theme = config && config.theme ? config.theme : 'default';
|
|
597
|
+
this.theme.load(theme);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
_addGlobalClasses() {
|
|
601
|
+
const styleId = "cura_global_classes";
|
|
602
|
+
let styleElement = document.head.querySelector(`#${styleId}`);
|
|
603
|
+
if (!styleElement) {
|
|
604
|
+
styleElement = document.createElement("style");
|
|
605
|
+
styleElement.id = styleId;
|
|
606
|
+
styleElement.textContent = `
|
|
607
|
+
.cura-body-scroll-lock {
|
|
608
|
+
overflow: hidden;
|
|
609
|
+
position: fixed;
|
|
610
|
+
left: 0;
|
|
611
|
+
right: 0;
|
|
612
|
+
top: 0;
|
|
613
|
+
}
|
|
614
|
+
`;
|
|
615
|
+
document.head.appendChild(styleElement);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
function appGlobalScript () {
|
|
621
|
+
const config = window.CuraInit;
|
|
622
|
+
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
623
|
+
const api = window.CuraAPI;
|
|
624
|
+
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
625
|
+
if (config && typeof config.onReady === 'function')
|
|
626
|
+
config.onReady(api);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
const globalScripts = appGlobalScript;
|
|
630
|
+
const globalStyles = null;
|
|
631
|
+
|
|
632
|
+
const NAMESPACE = 'cura';
|
|
633
|
+
const BUILD = /* cura */ { hydratedSelectorName: "hydrated", lazyLoad: false, updatable: true};
|
|
634
|
+
|
|
635
|
+
/*
|
|
636
|
+
Stencil Client Platform v4.35.1 | MIT Licensed | https://stenciljs.com
|
|
637
|
+
*/
|
|
638
|
+
var __defProp = Object.defineProperty;
|
|
639
|
+
var __export = (target, all) => {
|
|
640
|
+
for (var name in all)
|
|
641
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
// src/utils/constants.ts
|
|
645
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
646
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
647
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
648
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
649
|
+
PrimitiveType2["Null"] = "null";
|
|
650
|
+
PrimitiveType2["String"] = "string";
|
|
651
|
+
PrimitiveType2["Number"] = "number";
|
|
652
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
653
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
654
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
655
|
+
return PrimitiveType2;
|
|
656
|
+
})(PrimitiveType || {});
|
|
657
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
658
|
+
NonPrimitiveType2["Array"] = "array";
|
|
659
|
+
NonPrimitiveType2["Date"] = "date";
|
|
660
|
+
NonPrimitiveType2["Map"] = "map";
|
|
661
|
+
NonPrimitiveType2["Object"] = "object";
|
|
662
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
663
|
+
NonPrimitiveType2["Set"] = "set";
|
|
664
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
665
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
666
|
+
return NonPrimitiveType2;
|
|
667
|
+
})(NonPrimitiveType || {});
|
|
668
|
+
var TYPE_CONSTANT = "type";
|
|
669
|
+
var VALUE_CONSTANT = "value";
|
|
670
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
671
|
+
|
|
672
|
+
// src/client/client-host-ref.ts
|
|
673
|
+
var getHostRef = (ref) => {
|
|
674
|
+
if (ref.__stencil__getHostRef) {
|
|
675
|
+
return ref.__stencil__getHostRef();
|
|
676
|
+
}
|
|
677
|
+
return void 0;
|
|
678
|
+
};
|
|
679
|
+
var registerHost = (hostElement, cmpMeta) => {
|
|
680
|
+
const hostRef = {
|
|
681
|
+
$flags$: 0,
|
|
682
|
+
$hostElement$: hostElement,
|
|
683
|
+
$cmpMeta$: cmpMeta,
|
|
684
|
+
$instanceValues$: /* @__PURE__ */ new Map()
|
|
685
|
+
};
|
|
686
|
+
{
|
|
687
|
+
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
688
|
+
hostElement["s-p"] = [];
|
|
689
|
+
hostElement["s-rc"] = [];
|
|
690
|
+
}
|
|
691
|
+
const ref = hostRef;
|
|
692
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
693
|
+
return ref;
|
|
694
|
+
};
|
|
695
|
+
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
696
|
+
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
697
|
+
|
|
698
|
+
// src/client/client-style.ts
|
|
699
|
+
var styles = /* @__PURE__ */ new Map();
|
|
700
|
+
|
|
701
|
+
// src/runtime/runtime-constants.ts
|
|
702
|
+
var CONTENT_REF_ID = "r";
|
|
703
|
+
var ORG_LOCATION_ID = "o";
|
|
704
|
+
var SLOT_NODE_ID = "s";
|
|
705
|
+
var TEXT_NODE_ID = "t";
|
|
706
|
+
var COMMENT_NODE_ID = "c";
|
|
707
|
+
var HYDRATE_ID = "s-id";
|
|
708
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
709
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
710
|
+
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
711
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
712
|
+
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
713
|
+
"formAssociatedCallback",
|
|
714
|
+
"formResetCallback",
|
|
715
|
+
"formDisabledCallback",
|
|
716
|
+
"formStateRestoreCallback"
|
|
717
|
+
];
|
|
718
|
+
var win = typeof window !== "undefined" ? window : {};
|
|
719
|
+
var H = win.HTMLElement || class {
|
|
720
|
+
};
|
|
721
|
+
var plt = {
|
|
722
|
+
$flags$: 0,
|
|
723
|
+
$resourcesUrl$: "",
|
|
724
|
+
jmp: (h2) => h2(),
|
|
725
|
+
raf: (h2) => requestAnimationFrame(h2),
|
|
726
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
727
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
728
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
729
|
+
};
|
|
730
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
731
|
+
var _a;
|
|
732
|
+
let supportsListenerOptions2 = false;
|
|
733
|
+
try {
|
|
734
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
735
|
+
"e",
|
|
736
|
+
null,
|
|
737
|
+
Object.defineProperty({}, "passive", {
|
|
738
|
+
get() {
|
|
739
|
+
supportsListenerOptions2 = true;
|
|
740
|
+
}
|
|
741
|
+
})
|
|
742
|
+
);
|
|
743
|
+
} catch (e) {
|
|
744
|
+
}
|
|
745
|
+
return supportsListenerOptions2;
|
|
746
|
+
})();
|
|
747
|
+
var promiseResolve = (v) => Promise.resolve(v);
|
|
748
|
+
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
749
|
+
try {
|
|
750
|
+
new CSSStyleSheet();
|
|
751
|
+
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
752
|
+
} catch (e) {
|
|
753
|
+
}
|
|
754
|
+
return false;
|
|
755
|
+
})() ;
|
|
756
|
+
var queuePending = false;
|
|
757
|
+
var queueDomReads = [];
|
|
758
|
+
var queueDomWrites = [];
|
|
759
|
+
var queueTask = (queue, write) => (cb) => {
|
|
760
|
+
queue.push(cb);
|
|
761
|
+
if (!queuePending) {
|
|
762
|
+
queuePending = true;
|
|
763
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
764
|
+
nextTick(flush);
|
|
765
|
+
} else {
|
|
766
|
+
plt.raf(flush);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
var consume = (queue) => {
|
|
771
|
+
for (let i2 = 0; i2 < queue.length; i2++) {
|
|
772
|
+
try {
|
|
773
|
+
queue[i2](performance.now());
|
|
774
|
+
} catch (e) {
|
|
775
|
+
consoleError(e);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
queue.length = 0;
|
|
779
|
+
};
|
|
780
|
+
var flush = () => {
|
|
781
|
+
consume(queueDomReads);
|
|
782
|
+
{
|
|
783
|
+
consume(queueDomWrites);
|
|
784
|
+
if (queuePending = queueDomReads.length > 0) {
|
|
785
|
+
plt.raf(flush);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
var nextTick = (cb) => promiseResolve().then(cb);
|
|
790
|
+
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
791
|
+
|
|
792
|
+
// src/runtime/asset-path.ts
|
|
793
|
+
var getAssetPath = (path) => {
|
|
794
|
+
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
795
|
+
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
796
|
+
};
|
|
797
|
+
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
798
|
+
var isComplexType = (o) => {
|
|
799
|
+
o = typeof o;
|
|
800
|
+
return o === "object" || o === "function";
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
804
|
+
function queryNonceMetaTagContent(doc) {
|
|
805
|
+
var _a, _b, _c;
|
|
806
|
+
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;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// src/utils/regular-expression.ts
|
|
810
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
811
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
// src/utils/remote-value.ts
|
|
815
|
+
var RemoteValue = class _RemoteValue {
|
|
816
|
+
/**
|
|
817
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
818
|
+
*
|
|
819
|
+
* @param serialized The serialized LocalValue object
|
|
820
|
+
* @returns The original JavaScript value/object
|
|
821
|
+
*/
|
|
822
|
+
static fromLocalValue(serialized) {
|
|
823
|
+
const type = serialized[TYPE_CONSTANT];
|
|
824
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
825
|
+
switch (type) {
|
|
826
|
+
case "string" /* String */:
|
|
827
|
+
return value;
|
|
828
|
+
case "boolean" /* Boolean */:
|
|
829
|
+
return value;
|
|
830
|
+
case "bigint" /* BigInt */:
|
|
831
|
+
return BigInt(value);
|
|
832
|
+
case "undefined" /* Undefined */:
|
|
833
|
+
return void 0;
|
|
834
|
+
case "null" /* Null */:
|
|
835
|
+
return null;
|
|
836
|
+
case "number" /* Number */:
|
|
837
|
+
if (value === "NaN") return NaN;
|
|
838
|
+
if (value === "-0") return -0;
|
|
839
|
+
if (value === "Infinity") return Infinity;
|
|
840
|
+
if (value === "-Infinity") return -Infinity;
|
|
841
|
+
return value;
|
|
842
|
+
case "array" /* Array */:
|
|
843
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
844
|
+
case "date" /* Date */:
|
|
845
|
+
return new Date(value);
|
|
846
|
+
case "map" /* Map */:
|
|
847
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
848
|
+
for (const [key, val] of value) {
|
|
849
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
850
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
851
|
+
map2.set(deserializedKey, deserializedValue);
|
|
852
|
+
}
|
|
853
|
+
return map2;
|
|
854
|
+
case "object" /* Object */:
|
|
855
|
+
const obj = {};
|
|
856
|
+
for (const [key, val] of value) {
|
|
857
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
858
|
+
}
|
|
859
|
+
return obj;
|
|
860
|
+
case "regexp" /* RegularExpression */:
|
|
861
|
+
const { pattern, flags } = value;
|
|
862
|
+
return new RegExp(pattern, flags);
|
|
863
|
+
case "set" /* Set */:
|
|
864
|
+
const set = /* @__PURE__ */ new Set();
|
|
865
|
+
for (const item of value) {
|
|
866
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
867
|
+
}
|
|
868
|
+
return set;
|
|
869
|
+
case "symbol" /* Symbol */:
|
|
870
|
+
return Symbol(value);
|
|
871
|
+
default:
|
|
872
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
877
|
+
*
|
|
878
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
879
|
+
* @returns Array of deserialized JavaScript values
|
|
880
|
+
*/
|
|
881
|
+
static fromLocalValueArray(serializedValues) {
|
|
882
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
886
|
+
*
|
|
887
|
+
* @param obj Object to verify
|
|
888
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
889
|
+
*/
|
|
890
|
+
static isLocalValueObject(obj) {
|
|
891
|
+
if (typeof obj !== "object" || obj === null) {
|
|
892
|
+
return false;
|
|
893
|
+
}
|
|
894
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
895
|
+
return false;
|
|
896
|
+
}
|
|
897
|
+
const type = obj[TYPE_CONSTANT];
|
|
898
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
899
|
+
if (!hasTypeProperty) {
|
|
900
|
+
return false;
|
|
901
|
+
}
|
|
902
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
903
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
904
|
+
}
|
|
905
|
+
return true;
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
|
|
909
|
+
// src/utils/result.ts
|
|
910
|
+
var result_exports = {};
|
|
911
|
+
__export(result_exports, {
|
|
912
|
+
err: () => err,
|
|
913
|
+
map: () => map,
|
|
914
|
+
ok: () => ok,
|
|
915
|
+
unwrap: () => unwrap,
|
|
916
|
+
unwrapErr: () => unwrapErr
|
|
917
|
+
});
|
|
918
|
+
var ok = (value) => ({
|
|
919
|
+
isOk: true,
|
|
920
|
+
isErr: false,
|
|
921
|
+
value
|
|
922
|
+
});
|
|
923
|
+
var err = (value) => ({
|
|
924
|
+
isOk: false,
|
|
925
|
+
isErr: true,
|
|
926
|
+
value
|
|
927
|
+
});
|
|
928
|
+
function map(result, fn) {
|
|
929
|
+
if (result.isOk) {
|
|
930
|
+
const val = fn(result.value);
|
|
931
|
+
if (val instanceof Promise) {
|
|
932
|
+
return val.then((newVal) => ok(newVal));
|
|
933
|
+
} else {
|
|
934
|
+
return ok(val);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
if (result.isErr) {
|
|
938
|
+
const value = result.value;
|
|
939
|
+
return err(value);
|
|
940
|
+
}
|
|
941
|
+
throw "should never get here";
|
|
942
|
+
}
|
|
943
|
+
var unwrap = (result) => {
|
|
944
|
+
if (result.isOk) {
|
|
945
|
+
return result.value;
|
|
946
|
+
} else {
|
|
947
|
+
throw result.value;
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
var unwrapErr = (result) => {
|
|
951
|
+
if (result.isErr) {
|
|
952
|
+
return result.value;
|
|
953
|
+
} else {
|
|
954
|
+
throw result.value;
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
// src/utils/serialize.ts
|
|
959
|
+
function deserializeProperty(value) {
|
|
960
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
961
|
+
return value;
|
|
962
|
+
}
|
|
963
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
964
|
+
}
|
|
965
|
+
function createShadowRoot(cmpMeta) {
|
|
966
|
+
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
967
|
+
if (supportsConstructableStylesheets) {
|
|
968
|
+
const sheet = new CSSStyleSheet();
|
|
969
|
+
sheet.replaceSync(globalStyles);
|
|
970
|
+
shadowRoot.adoptedStyleSheets.push(sheet);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
974
|
+
const result = [];
|
|
975
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
976
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
977
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
978
|
+
result.push(slottedNode);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
return result;
|
|
982
|
+
};
|
|
983
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
984
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
988
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
989
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
990
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
991
|
+
const appendMethod = internalCall(parent, "appendChild");
|
|
992
|
+
if (typeof position !== "undefined") {
|
|
993
|
+
slottedNodeLocation["s-oo"] = position;
|
|
994
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
995
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
996
|
+
childNodes.forEach((n) => {
|
|
997
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
998
|
+
});
|
|
999
|
+
slotRelocateNodes.sort((a, b) => {
|
|
1000
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
1001
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
1002
|
+
return 0;
|
|
1003
|
+
});
|
|
1004
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
1005
|
+
} else {
|
|
1006
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
1007
|
+
}
|
|
1008
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
1009
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
1010
|
+
};
|
|
1011
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
1012
|
+
function patchSlotNode(node) {
|
|
1013
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
1014
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
1015
|
+
const toReturn = [];
|
|
1016
|
+
const slotName = this["s-sn"];
|
|
1017
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
1018
|
+
console.error(`
|
|
1019
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
1020
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
1021
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
1022
|
+
`);
|
|
1023
|
+
}
|
|
1024
|
+
const parent = this["s-cr"].parentElement;
|
|
1025
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
1026
|
+
slottedNodes.forEach((n) => {
|
|
1027
|
+
if (slotName === getSlotName(n)) {
|
|
1028
|
+
toReturn.push(n);
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
if (elementsOnly) {
|
|
1032
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
1033
|
+
}
|
|
1034
|
+
return toReturn;
|
|
1035
|
+
}).bind(node);
|
|
1036
|
+
node.assignedElements = assignedFactory(true);
|
|
1037
|
+
node.assignedNodes = assignedFactory(false);
|
|
1038
|
+
}
|
|
1039
|
+
function internalCall(node, method) {
|
|
1040
|
+
if ("__" + method in node) {
|
|
1041
|
+
const toReturn = node["__" + method];
|
|
1042
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
1043
|
+
return toReturn.bind(node);
|
|
1044
|
+
} else {
|
|
1045
|
+
if (typeof node[method] !== "function") return node[method];
|
|
1046
|
+
return node[method].bind(node);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
var createTime = (fnName, tagName = "") => {
|
|
1050
|
+
{
|
|
1051
|
+
return () => {
|
|
1052
|
+
return;
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
};
|
|
1056
|
+
var h = (nodeName, vnodeData, ...children) => {
|
|
1057
|
+
let child = null;
|
|
1058
|
+
let key = null;
|
|
1059
|
+
let simple = false;
|
|
1060
|
+
let lastSimple = false;
|
|
1061
|
+
const vNodeChildren = [];
|
|
1062
|
+
const walk = (c) => {
|
|
1063
|
+
for (let i2 = 0; i2 < c.length; i2++) {
|
|
1064
|
+
child = c[i2];
|
|
1065
|
+
if (Array.isArray(child)) {
|
|
1066
|
+
walk(child);
|
|
1067
|
+
} else if (child != null && typeof child !== "boolean") {
|
|
1068
|
+
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
1069
|
+
child = String(child);
|
|
1070
|
+
}
|
|
1071
|
+
if (simple && lastSimple) {
|
|
1072
|
+
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
1073
|
+
} else {
|
|
1074
|
+
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
1075
|
+
}
|
|
1076
|
+
lastSimple = simple;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
walk(children);
|
|
1081
|
+
if (vnodeData) {
|
|
1082
|
+
if (vnodeData.key) {
|
|
1083
|
+
key = vnodeData.key;
|
|
1084
|
+
}
|
|
1085
|
+
{
|
|
1086
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
1087
|
+
if (classData) {
|
|
1088
|
+
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
const vnode = newVNode(nodeName, null);
|
|
1093
|
+
vnode.$attrs$ = vnodeData;
|
|
1094
|
+
if (vNodeChildren.length > 0) {
|
|
1095
|
+
vnode.$children$ = vNodeChildren;
|
|
1096
|
+
}
|
|
1097
|
+
{
|
|
1098
|
+
vnode.$key$ = key;
|
|
1099
|
+
}
|
|
1100
|
+
return vnode;
|
|
1101
|
+
};
|
|
1102
|
+
var newVNode = (tag, text) => {
|
|
1103
|
+
const vnode = {
|
|
1104
|
+
$flags$: 0,
|
|
1105
|
+
$tag$: tag,
|
|
1106
|
+
$text$: text,
|
|
1107
|
+
$elm$: null,
|
|
1108
|
+
$children$: null
|
|
1109
|
+
};
|
|
1110
|
+
{
|
|
1111
|
+
vnode.$attrs$ = null;
|
|
1112
|
+
}
|
|
1113
|
+
{
|
|
1114
|
+
vnode.$key$ = null;
|
|
1115
|
+
}
|
|
1116
|
+
return vnode;
|
|
1117
|
+
};
|
|
1118
|
+
var Host = {};
|
|
1119
|
+
var isHost = (node) => node && node.$tag$ === Host;
|
|
1120
|
+
|
|
1121
|
+
// src/runtime/client-hydrate.ts
|
|
1122
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1123
|
+
var _a;
|
|
1124
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
1125
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
1126
|
+
const childRenderNodes = [];
|
|
1127
|
+
const slotNodes = [];
|
|
1128
|
+
const slottedNodes = [];
|
|
1129
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
1130
|
+
const vnode = newVNode(tagName, null);
|
|
1131
|
+
vnode.$elm$ = hostElm;
|
|
1132
|
+
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
1133
|
+
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
1134
|
+
var _a2, _b;
|
|
1135
|
+
if (!(memberFlags & 31 /* Prop */)) {
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
const attributeName = metaAttributeName || memberName;
|
|
1139
|
+
const attrVal = hostElm.getAttribute(attributeName);
|
|
1140
|
+
if (attrVal !== null) {
|
|
1141
|
+
const attrPropVal = parsePropertyValue(
|
|
1142
|
+
attrVal,
|
|
1143
|
+
memberFlags,
|
|
1144
|
+
!!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
|
|
1145
|
+
);
|
|
1146
|
+
(_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
|
|
1147
|
+
}
|
|
1148
|
+
});
|
|
1149
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
1150
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1151
|
+
}
|
|
1152
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
1153
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
1154
|
+
hostRef.$vnode$ = clientHydrate(
|
|
1155
|
+
vnode,
|
|
1156
|
+
childRenderNodes,
|
|
1157
|
+
slotNodes,
|
|
1158
|
+
shadowRootNodes,
|
|
1159
|
+
hostElm,
|
|
1160
|
+
hostElm,
|
|
1161
|
+
hostId,
|
|
1162
|
+
slottedNodes
|
|
1163
|
+
);
|
|
1164
|
+
let crIndex = 0;
|
|
1165
|
+
const crLength = childRenderNodes.length;
|
|
1166
|
+
let childRenderNode;
|
|
1167
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
1168
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
1169
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
1170
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
1171
|
+
const node = childRenderNode.$elm$;
|
|
1172
|
+
if (!shadowRoot) {
|
|
1173
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
1174
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1175
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1179
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
1180
|
+
if (childRenderNode.$children$) {
|
|
1181
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
1182
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
1183
|
+
childRenderNode.$children$.forEach((c) => {
|
|
1184
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
} else {
|
|
1188
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1192
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1193
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1194
|
+
}
|
|
1195
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
1196
|
+
if (!shadowRoot) {
|
|
1197
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1201
|
+
}
|
|
1202
|
+
const hosts = [];
|
|
1203
|
+
const snLen = slottedNodes.length;
|
|
1204
|
+
let snIndex = 0;
|
|
1205
|
+
let slotGroup;
|
|
1206
|
+
let snGroupIdx;
|
|
1207
|
+
let snGroupLen;
|
|
1208
|
+
let slottedItem;
|
|
1209
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1210
|
+
slotGroup = slottedNodes[snIndex];
|
|
1211
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
1212
|
+
snGroupLen = slotGroup.length;
|
|
1213
|
+
snGroupIdx = 0;
|
|
1214
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1215
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
1216
|
+
if (!hosts[slottedItem.hostId]) {
|
|
1217
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1218
|
+
}
|
|
1219
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
1220
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
1221
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1222
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1223
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1224
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
1225
|
+
} else {
|
|
1226
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1227
|
+
}
|
|
1228
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1229
|
+
}
|
|
1230
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1231
|
+
hostEle.appendChild(slottedItem.node);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
1236
|
+
let rnIdex = 0;
|
|
1237
|
+
const rnLen = shadowRootNodes.length;
|
|
1238
|
+
if (rnLen) {
|
|
1239
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1240
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
1241
|
+
}
|
|
1242
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1243
|
+
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
1244
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
1245
|
+
node.removeAttribute("hidden");
|
|
1246
|
+
} else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1247
|
+
node.parentNode.removeChild(node);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
1254
|
+
hostRef.$hostElement$ = hostElm;
|
|
1255
|
+
endHydrate();
|
|
1256
|
+
};
|
|
1257
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
1258
|
+
let childNodeType;
|
|
1259
|
+
let childIdSplt;
|
|
1260
|
+
let childVNode;
|
|
1261
|
+
let i2;
|
|
1262
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1263
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
1264
|
+
if (childNodeType) {
|
|
1265
|
+
childIdSplt = childNodeType.split(".");
|
|
1266
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
1267
|
+
childVNode = createSimpleVNode({
|
|
1268
|
+
$flags$: 0,
|
|
1269
|
+
$hostId$: childIdSplt[0],
|
|
1270
|
+
$nodeId$: childIdSplt[1],
|
|
1271
|
+
$depth$: childIdSplt[2],
|
|
1272
|
+
$index$: childIdSplt[3],
|
|
1273
|
+
$tag$: node.tagName.toLowerCase(),
|
|
1274
|
+
$elm$: node,
|
|
1275
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
1276
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
1277
|
+
$attrs$: { class: node.className || "" }
|
|
1278
|
+
});
|
|
1279
|
+
childRenderNodes.push(childVNode);
|
|
1280
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1281
|
+
if (!parentVNode.$children$) {
|
|
1282
|
+
parentVNode.$children$ = [];
|
|
1283
|
+
}
|
|
1284
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1285
|
+
if (typeof slotName === "string") {
|
|
1286
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
1287
|
+
addSlot(
|
|
1288
|
+
slotName,
|
|
1289
|
+
childIdSplt[2],
|
|
1290
|
+
childVNode,
|
|
1291
|
+
node,
|
|
1292
|
+
parentVNode,
|
|
1293
|
+
childRenderNodes,
|
|
1294
|
+
slotNodes,
|
|
1295
|
+
shadowRootNodes,
|
|
1296
|
+
slottedNodes
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
1300
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
1301
|
+
}
|
|
1302
|
+
if (childVNode.$index$ !== void 0) {
|
|
1303
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1304
|
+
}
|
|
1305
|
+
parentVNode = childVNode;
|
|
1306
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1307
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
if (node.shadowRoot) {
|
|
1312
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
1313
|
+
clientHydrate(
|
|
1314
|
+
parentVNode,
|
|
1315
|
+
childRenderNodes,
|
|
1316
|
+
slotNodes,
|
|
1317
|
+
shadowRootNodes,
|
|
1318
|
+
hostElm,
|
|
1319
|
+
node.shadowRoot.childNodes[i2],
|
|
1320
|
+
hostId,
|
|
1321
|
+
slottedNodes
|
|
1322
|
+
);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1326
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
1327
|
+
clientHydrate(
|
|
1328
|
+
parentVNode,
|
|
1329
|
+
childRenderNodes,
|
|
1330
|
+
slotNodes,
|
|
1331
|
+
shadowRootNodes,
|
|
1332
|
+
hostElm,
|
|
1333
|
+
nonShadowNodes[i2],
|
|
1334
|
+
hostId,
|
|
1335
|
+
slottedNodes
|
|
1336
|
+
);
|
|
1337
|
+
}
|
|
1338
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1339
|
+
childIdSplt = node.nodeValue.split(".");
|
|
1340
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
1341
|
+
childNodeType = childIdSplt[0];
|
|
1342
|
+
childVNode = createSimpleVNode({
|
|
1343
|
+
$hostId$: childIdSplt[1],
|
|
1344
|
+
$nodeId$: childIdSplt[2],
|
|
1345
|
+
$depth$: childIdSplt[3],
|
|
1346
|
+
$index$: childIdSplt[4] || "0",
|
|
1347
|
+
$elm$: node,
|
|
1348
|
+
$attrs$: null,
|
|
1349
|
+
$children$: null,
|
|
1350
|
+
$key$: null,
|
|
1351
|
+
$name$: null,
|
|
1352
|
+
$tag$: null,
|
|
1353
|
+
$text$: null
|
|
1354
|
+
});
|
|
1355
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
1356
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
1357
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
1358
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
1359
|
+
childRenderNodes.push(childVNode);
|
|
1360
|
+
node.remove();
|
|
1361
|
+
if (hostId === childVNode.$hostId$) {
|
|
1362
|
+
if (!parentVNode.$children$) {
|
|
1363
|
+
parentVNode.$children$ = [];
|
|
1364
|
+
}
|
|
1365
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1366
|
+
}
|
|
1367
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1368
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1372
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
1373
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1374
|
+
childRenderNodes.push(childVNode);
|
|
1375
|
+
node.remove();
|
|
1376
|
+
}
|
|
1377
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
1378
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
1379
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
1380
|
+
addSlot(
|
|
1381
|
+
slotName,
|
|
1382
|
+
childIdSplt[2],
|
|
1383
|
+
childVNode,
|
|
1384
|
+
node,
|
|
1385
|
+
parentVNode,
|
|
1386
|
+
childRenderNodes,
|
|
1387
|
+
slotNodes,
|
|
1388
|
+
shadowRootNodes,
|
|
1389
|
+
slottedNodes
|
|
1390
|
+
);
|
|
1391
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1392
|
+
if (shadowRootNodes) {
|
|
1393
|
+
node.remove();
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1399
|
+
const vnode = newVNode(null, node.textContent);
|
|
1400
|
+
vnode.$elm$ = node;
|
|
1401
|
+
vnode.$index$ = "0";
|
|
1402
|
+
parentVNode.$children$ = [vnode];
|
|
1403
|
+
} else {
|
|
1404
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1405
|
+
node.remove();
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
return parentVNode;
|
|
1409
|
+
};
|
|
1410
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1411
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1412
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1413
|
+
if (componentId) {
|
|
1414
|
+
orgLocNodes.set(componentId, node);
|
|
1415
|
+
}
|
|
1416
|
+
let i2 = 0;
|
|
1417
|
+
if (node.shadowRoot) {
|
|
1418
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1419
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1423
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1424
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1425
|
+
}
|
|
1426
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1427
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
1428
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1429
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1430
|
+
node.nodeValue = "";
|
|
1431
|
+
node["s-en"] = childIdSplt[3];
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1435
|
+
var createSimpleVNode = (vnode) => {
|
|
1436
|
+
const defaultVNode = {
|
|
1437
|
+
$flags$: 0,
|
|
1438
|
+
$hostId$: null,
|
|
1439
|
+
$nodeId$: null,
|
|
1440
|
+
$depth$: null,
|
|
1441
|
+
$index$: "0",
|
|
1442
|
+
$elm$: null,
|
|
1443
|
+
$attrs$: null,
|
|
1444
|
+
$children$: null,
|
|
1445
|
+
$key$: null,
|
|
1446
|
+
$name$: null,
|
|
1447
|
+
$tag$: null,
|
|
1448
|
+
$text$: null
|
|
1449
|
+
};
|
|
1450
|
+
return { ...defaultVNode, ...vnode };
|
|
1451
|
+
};
|
|
1452
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1453
|
+
node["s-sr"] = true;
|
|
1454
|
+
childVNode.$name$ = slotName || null;
|
|
1455
|
+
childVNode.$tag$ = "slot";
|
|
1456
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1457
|
+
if (shadowRootNodes && win.document) {
|
|
1458
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1459
|
+
if (childVNode.$name$) {
|
|
1460
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
1461
|
+
}
|
|
1462
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1463
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1464
|
+
} else {
|
|
1465
|
+
node.parentNode.insertBefore(slot, node);
|
|
1466
|
+
}
|
|
1467
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1468
|
+
node.remove();
|
|
1469
|
+
if (childVNode.$depth$ === "0") {
|
|
1470
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1471
|
+
}
|
|
1472
|
+
} else {
|
|
1473
|
+
const slot = childVNode.$elm$;
|
|
1474
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1475
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1476
|
+
patchSlotNode(node);
|
|
1477
|
+
if (shouldMove) {
|
|
1478
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
childRenderNodes.push(childVNode);
|
|
1482
|
+
slotNodes.push(childVNode);
|
|
1483
|
+
if (!parentVNode.$children$) {
|
|
1484
|
+
parentVNode.$children$ = [];
|
|
1485
|
+
}
|
|
1486
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1487
|
+
}
|
|
1488
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1489
|
+
let slottedNode = slotNode.nextSibling;
|
|
1490
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1491
|
+
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 */))) {
|
|
1492
|
+
slottedNode["s-sn"] = slotName;
|
|
1493
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1494
|
+
slottedNode = slottedNode.nextSibling;
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
var findCorrespondingNode = (node, type) => {
|
|
1498
|
+
let sibling = node;
|
|
1499
|
+
do {
|
|
1500
|
+
sibling = sibling.nextSibling;
|
|
1501
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1502
|
+
return sibling;
|
|
1503
|
+
};
|
|
1504
|
+
var createSupportsRuleRe = (selector) => {
|
|
1505
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1506
|
+
return new RegExp(
|
|
1507
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
1508
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
1509
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
1510
|
+
"g"
|
|
1511
|
+
);
|
|
1512
|
+
};
|
|
1513
|
+
createSupportsRuleRe("::slotted");
|
|
1514
|
+
createSupportsRuleRe(":host");
|
|
1515
|
+
createSupportsRuleRe(":host-context");
|
|
1516
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
1517
|
+
if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
1518
|
+
try {
|
|
1519
|
+
propValue = JSON.parse(propValue);
|
|
1520
|
+
return propValue;
|
|
1521
|
+
} catch (e) {
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1525
|
+
propValue = deserializeProperty(propValue);
|
|
1526
|
+
return propValue;
|
|
1527
|
+
}
|
|
1528
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1529
|
+
if (propType & 4 /* Boolean */) {
|
|
1530
|
+
if (isFormAssociated && typeof propValue === "string") {
|
|
1531
|
+
return propValue === "" || !!propValue;
|
|
1532
|
+
} else {
|
|
1533
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
if (propType & 2 /* Number */) {
|
|
1537
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
1538
|
+
}
|
|
1539
|
+
if (propType & 1 /* String */) {
|
|
1540
|
+
return String(propValue);
|
|
1541
|
+
}
|
|
1542
|
+
return propValue;
|
|
1543
|
+
}
|
|
1544
|
+
return propValue;
|
|
1545
|
+
};
|
|
1546
|
+
var getElement = (ref) => ref;
|
|
1547
|
+
|
|
1548
|
+
// src/runtime/event-emitter.ts
|
|
1549
|
+
var createEvent = (ref, name, flags) => {
|
|
1550
|
+
const elm = getElement(ref);
|
|
1551
|
+
return {
|
|
1552
|
+
emit: (detail) => {
|
|
1553
|
+
return emitEvent(elm, name, {
|
|
1554
|
+
bubbles: true,
|
|
1555
|
+
composed: true,
|
|
1556
|
+
cancelable: true,
|
|
1557
|
+
detail
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1560
|
+
};
|
|
1561
|
+
};
|
|
1562
|
+
var emitEvent = (elm, name, opts) => {
|
|
1563
|
+
const ev = plt.ce(name, opts);
|
|
1564
|
+
elm.dispatchEvent(ev);
|
|
1565
|
+
return ev;
|
|
1566
|
+
};
|
|
1567
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1568
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1569
|
+
let style = styles.get(scopeId2);
|
|
1570
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
1571
|
+
style = style || new CSSStyleSheet();
|
|
1572
|
+
if (typeof style === "string") {
|
|
1573
|
+
style = cssText;
|
|
1574
|
+
} else {
|
|
1575
|
+
style.replaceSync(cssText);
|
|
1576
|
+
}
|
|
1577
|
+
} else {
|
|
1578
|
+
style = cssText;
|
|
1579
|
+
}
|
|
1580
|
+
styles.set(scopeId2, style);
|
|
1581
|
+
};
|
|
1582
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1583
|
+
var _a;
|
|
1584
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1585
|
+
const style = styles.get(scopeId2);
|
|
1586
|
+
if (!win.document) {
|
|
1587
|
+
return scopeId2;
|
|
1588
|
+
}
|
|
1589
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1590
|
+
if (style) {
|
|
1591
|
+
if (typeof style === "string") {
|
|
1592
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1593
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1594
|
+
let styleElm;
|
|
1595
|
+
if (!appliedStyles) {
|
|
1596
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1597
|
+
}
|
|
1598
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1599
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1600
|
+
styleElm.innerHTML = style;
|
|
1601
|
+
} else {
|
|
1602
|
+
styleElm = win.document.createElement("style");
|
|
1603
|
+
styleElm.innerHTML = style;
|
|
1604
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1605
|
+
if (nonce != null) {
|
|
1606
|
+
styleElm.setAttribute("nonce", nonce);
|
|
1607
|
+
}
|
|
1608
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1609
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1610
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1611
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1612
|
+
styleContainerNode.insertBefore(
|
|
1613
|
+
styleElm,
|
|
1614
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1615
|
+
);
|
|
1616
|
+
} else if ("host" in styleContainerNode) {
|
|
1617
|
+
if (supportsConstructableStylesheets) {
|
|
1618
|
+
const stylesheet = new CSSStyleSheet();
|
|
1619
|
+
stylesheet.replaceSync(style);
|
|
1620
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1621
|
+
} else {
|
|
1622
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1623
|
+
if (existingStyleContainer) {
|
|
1624
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1625
|
+
} else {
|
|
1626
|
+
styleContainerNode.prepend(styleElm);
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
} else {
|
|
1630
|
+
styleContainerNode.append(styleElm);
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1634
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1638
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1639
|
+
}
|
|
1640
|
+
if (appliedStyles) {
|
|
1641
|
+
appliedStyles.add(scopeId2);
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1645
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
return scopeId2;
|
|
1649
|
+
};
|
|
1650
|
+
var attachStyles = (hostRef) => {
|
|
1651
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1652
|
+
const elm = hostRef.$hostElement$;
|
|
1653
|
+
const flags = cmpMeta.$flags$;
|
|
1654
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1655
|
+
const scopeId2 = addStyle(
|
|
1656
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1657
|
+
cmpMeta);
|
|
1658
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
1659
|
+
elm["s-sc"] = scopeId2;
|
|
1660
|
+
elm.classList.add(scopeId2 + "-h");
|
|
1661
|
+
}
|
|
1662
|
+
endAttachStyles();
|
|
1663
|
+
};
|
|
1664
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1665
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1666
|
+
var hydrateScopedToShadow = () => {
|
|
1667
|
+
if (!win.document) {
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1671
|
+
let i2 = 0;
|
|
1672
|
+
for (; i2 < styles2.length; i2++) {
|
|
1673
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1677
|
+
if (oldValue === newValue) {
|
|
1678
|
+
return;
|
|
1679
|
+
}
|
|
1680
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1681
|
+
let ln = memberName.toLowerCase();
|
|
1682
|
+
if (memberName === "class") {
|
|
1683
|
+
const classList = elm.classList;
|
|
1684
|
+
const oldClasses = parseClassList(oldValue);
|
|
1685
|
+
let newClasses = parseClassList(newValue);
|
|
1686
|
+
if (elm["s-si"] && initialRender) {
|
|
1687
|
+
newClasses.push(elm["s-si"]);
|
|
1688
|
+
oldClasses.forEach((c) => {
|
|
1689
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1690
|
+
});
|
|
1691
|
+
newClasses = [...new Set(newClasses)];
|
|
1692
|
+
classList.add(...newClasses);
|
|
1693
|
+
} else {
|
|
1694
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
1695
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
1696
|
+
}
|
|
1697
|
+
} else if (memberName === "style") {
|
|
1698
|
+
{
|
|
1699
|
+
for (const prop in oldValue) {
|
|
1700
|
+
if (!newValue || newValue[prop] == null) {
|
|
1701
|
+
if (prop.includes("-")) {
|
|
1702
|
+
elm.style.removeProperty(prop);
|
|
1703
|
+
} else {
|
|
1704
|
+
elm.style[prop] = "";
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
for (const prop in newValue) {
|
|
1710
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1711
|
+
if (prop.includes("-")) {
|
|
1712
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1713
|
+
} else {
|
|
1714
|
+
elm.style[prop] = newValue[prop];
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1719
|
+
if (newValue) {
|
|
1720
|
+
newValue(elm);
|
|
1721
|
+
}
|
|
1722
|
+
} else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1723
|
+
if (memberName[2] === "-") {
|
|
1724
|
+
memberName = memberName.slice(3);
|
|
1725
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1726
|
+
memberName = ln.slice(2);
|
|
1727
|
+
} else {
|
|
1728
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1729
|
+
}
|
|
1730
|
+
if (oldValue || newValue) {
|
|
1731
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1732
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1733
|
+
if (oldValue) {
|
|
1734
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1735
|
+
}
|
|
1736
|
+
if (newValue) {
|
|
1737
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
} else {
|
|
1741
|
+
const isComplex = isComplexType(newValue);
|
|
1742
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1743
|
+
try {
|
|
1744
|
+
if (!elm.tagName.includes("-")) {
|
|
1745
|
+
const n = newValue == null ? "" : newValue;
|
|
1746
|
+
if (memberName === "list") {
|
|
1747
|
+
isProp = false;
|
|
1748
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1749
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
1750
|
+
elm[memberName] = n;
|
|
1751
|
+
} else {
|
|
1752
|
+
elm.setAttribute(memberName, n);
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
} else if (elm[memberName] !== newValue) {
|
|
1756
|
+
elm[memberName] = newValue;
|
|
1757
|
+
}
|
|
1758
|
+
} catch (e) {
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
let xlink = false;
|
|
1762
|
+
{
|
|
1763
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1764
|
+
memberName = ln;
|
|
1765
|
+
xlink = true;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
if (newValue == null || newValue === false) {
|
|
1769
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
1770
|
+
if (xlink) {
|
|
1771
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
1772
|
+
} else {
|
|
1773
|
+
elm.removeAttribute(memberName);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1777
|
+
newValue = newValue === true ? "" : newValue;
|
|
1778
|
+
if (xlink) {
|
|
1779
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1780
|
+
} else {
|
|
1781
|
+
elm.setAttribute(memberName, newValue);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
};
|
|
1786
|
+
var parseClassListRegex = /\s/;
|
|
1787
|
+
var parseClassList = (value) => {
|
|
1788
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1789
|
+
value = value.baseVal;
|
|
1790
|
+
}
|
|
1791
|
+
if (!value || typeof value !== "string") {
|
|
1792
|
+
return [];
|
|
1793
|
+
}
|
|
1794
|
+
return value.split(parseClassListRegex);
|
|
1795
|
+
};
|
|
1796
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
1797
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
1798
|
+
|
|
1799
|
+
// src/runtime/vdom/update-element.ts
|
|
1800
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
1801
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
1802
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1803
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
1804
|
+
{
|
|
1805
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
1806
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
1807
|
+
setAccessor(
|
|
1808
|
+
elm,
|
|
1809
|
+
memberName,
|
|
1810
|
+
oldVnodeAttrs[memberName],
|
|
1811
|
+
void 0,
|
|
1812
|
+
isSvgMode2,
|
|
1813
|
+
newVnode.$flags$,
|
|
1814
|
+
isInitialRender
|
|
1815
|
+
);
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
1820
|
+
setAccessor(
|
|
1821
|
+
elm,
|
|
1822
|
+
memberName,
|
|
1823
|
+
oldVnodeAttrs[memberName],
|
|
1824
|
+
newVnodeAttrs[memberName],
|
|
1825
|
+
isSvgMode2,
|
|
1826
|
+
newVnode.$flags$,
|
|
1827
|
+
isInitialRender
|
|
1828
|
+
);
|
|
1829
|
+
}
|
|
1830
|
+
};
|
|
1831
|
+
function sortedAttrNames(attrNames) {
|
|
1832
|
+
return attrNames.includes("ref") ? (
|
|
1833
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
1834
|
+
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
1835
|
+
) : (
|
|
1836
|
+
// no need to sort, return the original array
|
|
1837
|
+
attrNames
|
|
1838
|
+
);
|
|
1839
|
+
}
|
|
1840
|
+
var hostTagName;
|
|
1841
|
+
var isSvgMode = false;
|
|
1842
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
1843
|
+
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
1844
|
+
let i2 = 0;
|
|
1845
|
+
let elm;
|
|
1846
|
+
let childNode;
|
|
1847
|
+
if (newVNode2.$text$ !== null) {
|
|
1848
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
1849
|
+
} else {
|
|
1850
|
+
if (!isSvgMode) {
|
|
1851
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
1852
|
+
}
|
|
1853
|
+
if (!win.document) {
|
|
1854
|
+
throw new Error(
|
|
1855
|
+
"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."
|
|
1856
|
+
);
|
|
1857
|
+
}
|
|
1858
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
1859
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
1860
|
+
newVNode2.$tag$
|
|
1861
|
+
) ;
|
|
1862
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
1863
|
+
isSvgMode = false;
|
|
1864
|
+
}
|
|
1865
|
+
{
|
|
1866
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1867
|
+
}
|
|
1868
|
+
if (newVNode2.$children$) {
|
|
1869
|
+
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
1870
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
1871
|
+
if (childNode) {
|
|
1872
|
+
elm.appendChild(childNode);
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
{
|
|
1877
|
+
if (newVNode2.$tag$ === "svg") {
|
|
1878
|
+
isSvgMode = false;
|
|
1879
|
+
} else if (elm.tagName === "foreignObject") {
|
|
1880
|
+
isSvgMode = true;
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
elm["s-hn"] = hostTagName;
|
|
1885
|
+
return elm;
|
|
1886
|
+
};
|
|
1887
|
+
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
1888
|
+
let containerElm = parentElm;
|
|
1889
|
+
let childNode;
|
|
1890
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
1891
|
+
containerElm = containerElm.shadowRoot;
|
|
1892
|
+
}
|
|
1893
|
+
for (; startIdx <= endIdx; ++startIdx) {
|
|
1894
|
+
if (vnodes[startIdx]) {
|
|
1895
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
1896
|
+
if (childNode) {
|
|
1897
|
+
vnodes[startIdx].$elm$ = childNode;
|
|
1898
|
+
insertBefore(containerElm, childNode, before);
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
};
|
|
1903
|
+
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
1904
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
1905
|
+
const vnode = vnodes[index];
|
|
1906
|
+
if (vnode) {
|
|
1907
|
+
const elm = vnode.$elm$;
|
|
1908
|
+
nullifyVNodeRefs(vnode);
|
|
1909
|
+
if (elm) {
|
|
1910
|
+
elm.remove();
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
};
|
|
1915
|
+
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
|
1916
|
+
let oldStartIdx = 0;
|
|
1917
|
+
let newStartIdx = 0;
|
|
1918
|
+
let idxInOld = 0;
|
|
1919
|
+
let i2 = 0;
|
|
1920
|
+
let oldEndIdx = oldCh.length - 1;
|
|
1921
|
+
let oldStartVnode = oldCh[0];
|
|
1922
|
+
let oldEndVnode = oldCh[oldEndIdx];
|
|
1923
|
+
let newEndIdx = newCh.length - 1;
|
|
1924
|
+
let newStartVnode = newCh[0];
|
|
1925
|
+
let newEndVnode = newCh[newEndIdx];
|
|
1926
|
+
let node;
|
|
1927
|
+
let elmToMove;
|
|
1928
|
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
1929
|
+
if (oldStartVnode == null) {
|
|
1930
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1931
|
+
} else if (oldEndVnode == null) {
|
|
1932
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1933
|
+
} else if (newStartVnode == null) {
|
|
1934
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1935
|
+
} else if (newEndVnode == null) {
|
|
1936
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1937
|
+
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
1938
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
1939
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1940
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1941
|
+
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
1942
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
1943
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1944
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1945
|
+
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1946
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1947
|
+
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
1948
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1949
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1950
|
+
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1951
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1952
|
+
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
1953
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1954
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1955
|
+
} else {
|
|
1956
|
+
idxInOld = -1;
|
|
1957
|
+
{
|
|
1958
|
+
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
1959
|
+
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
1960
|
+
idxInOld = i2;
|
|
1961
|
+
break;
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
if (idxInOld >= 0) {
|
|
1966
|
+
elmToMove = oldCh[idxInOld];
|
|
1967
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1968
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
1969
|
+
} else {
|
|
1970
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1971
|
+
oldCh[idxInOld] = void 0;
|
|
1972
|
+
node = elmToMove.$elm$;
|
|
1973
|
+
}
|
|
1974
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1975
|
+
} else {
|
|
1976
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1977
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1978
|
+
}
|
|
1979
|
+
if (node) {
|
|
1980
|
+
{
|
|
1981
|
+
insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
if (oldStartIdx > oldEndIdx) {
|
|
1987
|
+
addVnodes(
|
|
1988
|
+
parentElm,
|
|
1989
|
+
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
1990
|
+
newVNode2,
|
|
1991
|
+
newCh,
|
|
1992
|
+
newStartIdx,
|
|
1993
|
+
newEndIdx
|
|
1994
|
+
);
|
|
1995
|
+
} else if (newStartIdx > newEndIdx) {
|
|
1996
|
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
1997
|
+
}
|
|
1998
|
+
};
|
|
1999
|
+
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
2000
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
2001
|
+
if (!isInitialRender) {
|
|
2002
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
2003
|
+
}
|
|
2004
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
2005
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
2006
|
+
}
|
|
2007
|
+
return true;
|
|
2008
|
+
}
|
|
2009
|
+
return false;
|
|
2010
|
+
};
|
|
2011
|
+
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
2012
|
+
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
2013
|
+
const oldChildren = oldVNode.$children$;
|
|
2014
|
+
const newChildren = newVNode2.$children$;
|
|
2015
|
+
const tag = newVNode2.$tag$;
|
|
2016
|
+
const text = newVNode2.$text$;
|
|
2017
|
+
if (text === null) {
|
|
2018
|
+
{
|
|
2019
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
2020
|
+
}
|
|
2021
|
+
{
|
|
2022
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
2023
|
+
}
|
|
2024
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
2025
|
+
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
2026
|
+
} else if (newChildren !== null) {
|
|
2027
|
+
if (oldVNode.$text$ !== null) {
|
|
2028
|
+
elm.textContent = "";
|
|
2029
|
+
}
|
|
2030
|
+
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
2031
|
+
} else if (
|
|
2032
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
2033
|
+
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
2034
|
+
) {
|
|
2035
|
+
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
2036
|
+
}
|
|
2037
|
+
if (isSvgMode && tag === "svg") {
|
|
2038
|
+
isSvgMode = false;
|
|
2039
|
+
}
|
|
2040
|
+
} else if (oldVNode.$text$ !== text) {
|
|
2041
|
+
elm.data = text;
|
|
2042
|
+
}
|
|
2043
|
+
};
|
|
2044
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
2045
|
+
{
|
|
2046
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
2047
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2048
|
+
}
|
|
2049
|
+
};
|
|
2050
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
2051
|
+
{
|
|
2052
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
2053
|
+
}
|
|
2054
|
+
};
|
|
2055
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
2056
|
+
const hostElm = hostRef.$hostElement$;
|
|
2057
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
2058
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2059
|
+
const isHostElement = isHost(renderFnResults);
|
|
2060
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
2061
|
+
hostTagName = hostElm.tagName;
|
|
2062
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
2063
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
2064
|
+
cmpMeta.$attrsToReflect$.map(
|
|
2065
|
+
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
2069
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
2070
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
2071
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
rootVnode.$tag$ = null;
|
|
2076
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
2077
|
+
hostRef.$vnode$ = rootVnode;
|
|
2078
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
2079
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
2080
|
+
};
|
|
2081
|
+
|
|
2082
|
+
// src/runtime/update-component.ts
|
|
2083
|
+
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
2084
|
+
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
2085
|
+
const index = ancestorComponent["s-p"].push(
|
|
2086
|
+
new Promise(
|
|
2087
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
2088
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
2089
|
+
r();
|
|
2090
|
+
}
|
|
2091
|
+
)
|
|
2092
|
+
);
|
|
2093
|
+
}
|
|
2094
|
+
};
|
|
2095
|
+
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
2096
|
+
{
|
|
2097
|
+
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
2098
|
+
}
|
|
2099
|
+
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
2100
|
+
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
2101
|
+
return;
|
|
2102
|
+
}
|
|
2103
|
+
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
2104
|
+
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
2105
|
+
return writeTask(dispatch) ;
|
|
2106
|
+
};
|
|
2107
|
+
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
2108
|
+
const elm = hostRef.$hostElement$;
|
|
2109
|
+
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
2110
|
+
const instance = elm;
|
|
2111
|
+
if (!instance) {
|
|
2112
|
+
throw new Error(
|
|
2113
|
+
`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
|
|
2114
|
+
);
|
|
2115
|
+
}
|
|
2116
|
+
let maybePromise;
|
|
2117
|
+
if (isInitialLoad) {
|
|
2118
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
2119
|
+
} else {
|
|
2120
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
2121
|
+
}
|
|
2122
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
2123
|
+
endSchedule();
|
|
2124
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
2125
|
+
};
|
|
2126
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
|
|
2127
|
+
console.error(err2);
|
|
2128
|
+
fn();
|
|
2129
|
+
}) : fn();
|
|
2130
|
+
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
2131
|
+
var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
2132
|
+
var _a;
|
|
2133
|
+
const elm = hostRef.$hostElement$;
|
|
2134
|
+
const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
|
|
2135
|
+
const rc = elm["s-rc"];
|
|
2136
|
+
if (isInitialLoad) {
|
|
2137
|
+
attachStyles(hostRef);
|
|
2138
|
+
}
|
|
2139
|
+
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
|
2140
|
+
{
|
|
2141
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
2142
|
+
}
|
|
2143
|
+
if (rc) {
|
|
2144
|
+
rc.map((cb) => cb());
|
|
2145
|
+
elm["s-rc"] = void 0;
|
|
2146
|
+
}
|
|
2147
|
+
endRender();
|
|
2148
|
+
endUpdate();
|
|
2149
|
+
{
|
|
2150
|
+
const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
|
|
2151
|
+
const postUpdate = () => postUpdateComponent(hostRef);
|
|
2152
|
+
if (childrenPromises.length === 0) {
|
|
2153
|
+
postUpdate();
|
|
2154
|
+
} else {
|
|
2155
|
+
Promise.all(childrenPromises).then(postUpdate);
|
|
2156
|
+
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
2157
|
+
childrenPromises.length = 0;
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
};
|
|
2161
|
+
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
2162
|
+
try {
|
|
2163
|
+
instance = instance.render() ;
|
|
2164
|
+
{
|
|
2165
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
2166
|
+
}
|
|
2167
|
+
{
|
|
2168
|
+
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
2169
|
+
}
|
|
2170
|
+
{
|
|
2171
|
+
{
|
|
2172
|
+
{
|
|
2173
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
} catch (e) {
|
|
2178
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2179
|
+
}
|
|
2180
|
+
return null;
|
|
2181
|
+
};
|
|
2182
|
+
var postUpdateComponent = (hostRef) => {
|
|
2183
|
+
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
2184
|
+
const elm = hostRef.$hostElement$;
|
|
2185
|
+
const endPostUpdate = createTime("postUpdate", tagName);
|
|
2186
|
+
const instance = elm;
|
|
2187
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
2188
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
2189
|
+
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
2190
|
+
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
2191
|
+
{
|
|
2192
|
+
addHydratedFlag(elm);
|
|
2193
|
+
}
|
|
2194
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
2195
|
+
endPostUpdate();
|
|
2196
|
+
{
|
|
2197
|
+
hostRef.$onReadyResolve$(elm);
|
|
2198
|
+
if (!ancestorComponent) {
|
|
2199
|
+
appDidLoad();
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
} else {
|
|
2203
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
2204
|
+
endPostUpdate();
|
|
2205
|
+
}
|
|
2206
|
+
{
|
|
2207
|
+
if (hostRef.$onRenderResolve$) {
|
|
2208
|
+
hostRef.$onRenderResolve$();
|
|
2209
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
2210
|
+
}
|
|
2211
|
+
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
2212
|
+
nextTick(() => scheduleUpdate(hostRef, false));
|
|
2213
|
+
}
|
|
2214
|
+
hostRef.$flags$ &= -517;
|
|
2215
|
+
}
|
|
2216
|
+
};
|
|
2217
|
+
var appDidLoad = (who) => {
|
|
2218
|
+
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
2219
|
+
};
|
|
2220
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
2221
|
+
if (instance && instance[method]) {
|
|
2222
|
+
try {
|
|
2223
|
+
return instance[method](arg);
|
|
2224
|
+
} catch (e) {
|
|
2225
|
+
consoleError(e, elm);
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
return void 0;
|
|
2229
|
+
};
|
|
2230
|
+
var addHydratedFlag = (elm) => {
|
|
2231
|
+
var _a;
|
|
2232
|
+
return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
|
|
2233
|
+
};
|
|
2234
|
+
|
|
2235
|
+
// src/runtime/set-value.ts
|
|
2236
|
+
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
2237
|
+
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
2238
|
+
const hostRef = getHostRef(ref);
|
|
2239
|
+
const elm = ref;
|
|
2240
|
+
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
2241
|
+
const flags = hostRef.$flags$;
|
|
2242
|
+
const instance = elm;
|
|
2243
|
+
newVal = parsePropertyValue(
|
|
2244
|
+
newVal,
|
|
2245
|
+
cmpMeta.$members$[propName][0],
|
|
2246
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
2247
|
+
);
|
|
2248
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
2249
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
2250
|
+
if (didValueChange) {
|
|
2251
|
+
hostRef.$instanceValues$.set(propName, newVal);
|
|
2252
|
+
{
|
|
2253
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
2254
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
2255
|
+
if (watchMethods) {
|
|
2256
|
+
watchMethods.map((watchMethodName) => {
|
|
2257
|
+
try {
|
|
2258
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
2259
|
+
} catch (e) {
|
|
2260
|
+
consoleError(e, elm);
|
|
2261
|
+
}
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2266
|
+
if (instance.componentShouldUpdate) {
|
|
2267
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2268
|
+
return;
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
scheduleUpdate(hostRef, false);
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
};
|
|
2276
|
+
|
|
2277
|
+
// src/runtime/proxy-component.ts
|
|
2278
|
+
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
2279
|
+
var _a, _b;
|
|
2280
|
+
const prototype = Cstr.prototype;
|
|
2281
|
+
if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
2282
|
+
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
2283
|
+
const originalFormAssociatedCallback = prototype[cbName];
|
|
2284
|
+
Object.defineProperty(prototype, cbName, {
|
|
2285
|
+
value(...args) {
|
|
2286
|
+
const hostRef = getHostRef(this);
|
|
2287
|
+
const instance = this;
|
|
2288
|
+
if (!instance) {
|
|
2289
|
+
hostRef.$onReadyPromise$.then((asyncInstance) => {
|
|
2290
|
+
const cb = asyncInstance[cbName];
|
|
2291
|
+
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
2292
|
+
});
|
|
2293
|
+
} else {
|
|
2294
|
+
const cb = originalFormAssociatedCallback;
|
|
2295
|
+
typeof cb === "function" && cb.call(instance, ...args);
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
});
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
2302
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
2303
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
2304
|
+
}
|
|
2305
|
+
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
2306
|
+
members.map(([memberName, [memberFlags]]) => {
|
|
2307
|
+
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
2308
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
2309
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
2310
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
2311
|
+
{
|
|
2312
|
+
Object.defineProperty(prototype, memberName, {
|
|
2313
|
+
get() {
|
|
2314
|
+
{
|
|
2315
|
+
return origGetter ? origGetter.apply(this) : getValue(this, memberName);
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
2318
|
+
configurable: true,
|
|
2319
|
+
enumerable: true
|
|
2320
|
+
});
|
|
2321
|
+
}
|
|
2322
|
+
Object.defineProperty(prototype, memberName, {
|
|
2323
|
+
set(newValue) {
|
|
2324
|
+
const ref = getHostRef(this);
|
|
2325
|
+
if (origSetter) {
|
|
2326
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2327
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
2328
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
2329
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2330
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2331
|
+
}
|
|
2332
|
+
origSetter.apply(this, [
|
|
2333
|
+
parsePropertyValue(
|
|
2334
|
+
newValue,
|
|
2335
|
+
memberFlags,
|
|
2336
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
2337
|
+
)
|
|
2338
|
+
]);
|
|
2339
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2340
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2341
|
+
return;
|
|
2342
|
+
}
|
|
2343
|
+
{
|
|
2344
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2345
|
+
return;
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
});
|
|
2349
|
+
}
|
|
2350
|
+
});
|
|
2351
|
+
{
|
|
2352
|
+
const attrNameToPropName = /* @__PURE__ */ new Map();
|
|
2353
|
+
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
|
2354
|
+
plt.jmp(() => {
|
|
2355
|
+
var _a2;
|
|
2356
|
+
const propName = attrNameToPropName.get(attrName);
|
|
2357
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) ; else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
2358
|
+
this[propName] == newValue) {
|
|
2359
|
+
return;
|
|
2360
|
+
} else if (propName == null) {
|
|
2361
|
+
const hostRef = getHostRef(this);
|
|
2362
|
+
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
2363
|
+
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
2364
|
+
const elm = this;
|
|
2365
|
+
const instance = elm;
|
|
2366
|
+
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
2367
|
+
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
2368
|
+
if (instance[callbackName] != null) {
|
|
2369
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
}
|
|
2373
|
+
return;
|
|
2374
|
+
}
|
|
2375
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2376
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
2377
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2378
|
+
this[propName] = newValue;
|
|
2379
|
+
}
|
|
2380
|
+
});
|
|
2381
|
+
};
|
|
2382
|
+
Cstr.observedAttributes = Array.from(
|
|
2383
|
+
/* @__PURE__ */ new Set([
|
|
2384
|
+
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
2385
|
+
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
|
2386
|
+
var _a2;
|
|
2387
|
+
const attrName = m[1] || propName;
|
|
2388
|
+
attrNameToPropName.set(attrName, propName);
|
|
2389
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
2390
|
+
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
2391
|
+
}
|
|
2392
|
+
return attrName;
|
|
2393
|
+
})
|
|
2394
|
+
])
|
|
2395
|
+
);
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
return Cstr;
|
|
2399
|
+
};
|
|
2400
|
+
|
|
2401
|
+
// src/runtime/initialize-component.ts
|
|
2402
|
+
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
2403
|
+
let Cstr;
|
|
2404
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
2405
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
2406
|
+
{
|
|
2407
|
+
Cstr = elm.constructor;
|
|
2408
|
+
const cmpTag = elm.localName;
|
|
2409
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
2410
|
+
}
|
|
2411
|
+
if (Cstr && Cstr.style) {
|
|
2412
|
+
let style;
|
|
2413
|
+
if (typeof Cstr.style === "string") {
|
|
2414
|
+
style = Cstr.style;
|
|
2415
|
+
}
|
|
2416
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
2417
|
+
if (!styles.has(scopeId2)) {
|
|
2418
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
2419
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
2420
|
+
endRegisterStyles();
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
2425
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
2426
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
2427
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
2428
|
+
} else {
|
|
2429
|
+
schedule();
|
|
2430
|
+
}
|
|
2431
|
+
};
|
|
2432
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
2433
|
+
};
|
|
2434
|
+
|
|
2435
|
+
// src/runtime/connected-callback.ts
|
|
2436
|
+
var connectedCallback = (elm) => {
|
|
2437
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2438
|
+
const hostRef = getHostRef(elm);
|
|
2439
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
2440
|
+
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
2441
|
+
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
2442
|
+
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
2443
|
+
let hostId;
|
|
2444
|
+
{
|
|
2445
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
2446
|
+
if (hostId) {
|
|
2447
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2448
|
+
const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
|
|
2449
|
+
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
2450
|
+
}
|
|
2451
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
{
|
|
2455
|
+
let ancestorComponent = elm;
|
|
2456
|
+
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
2457
|
+
if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
2458
|
+
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
2459
|
+
break;
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
if (cmpMeta.$members$) {
|
|
2464
|
+
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
2465
|
+
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
2466
|
+
const value = elm[memberName];
|
|
2467
|
+
delete elm[memberName];
|
|
2468
|
+
elm[memberName] = value;
|
|
2469
|
+
}
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
if (BUILD.initializeNextTick) {
|
|
2473
|
+
nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
|
|
2474
|
+
} else {
|
|
2475
|
+
initializeComponent(elm, hostRef, cmpMeta);
|
|
2476
|
+
}
|
|
2477
|
+
} else {
|
|
2478
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
2479
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2480
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
endConnected();
|
|
2484
|
+
}
|
|
2485
|
+
};
|
|
2486
|
+
var disconnectedCallback = async (elm) => {
|
|
2487
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2488
|
+
const hostRef = getHostRef(elm);
|
|
2489
|
+
{
|
|
2490
|
+
if (hostRef.$rmListeners$) {
|
|
2491
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
2492
|
+
hostRef.$rmListeners$ = void 0;
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2497
|
+
rootAppliedStyles.delete(elm);
|
|
2498
|
+
}
|
|
2499
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2500
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2501
|
+
}
|
|
2502
|
+
};
|
|
2503
|
+
var proxyCustomElement = (Cstr, compactMeta) => {
|
|
2504
|
+
const cmpMeta = {
|
|
2505
|
+
$flags$: compactMeta[0],
|
|
2506
|
+
$tagName$: compactMeta[1]
|
|
2507
|
+
};
|
|
2508
|
+
{
|
|
2509
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
2510
|
+
}
|
|
2511
|
+
{
|
|
2512
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
2513
|
+
}
|
|
2514
|
+
{
|
|
2515
|
+
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
2516
|
+
}
|
|
2517
|
+
{
|
|
2518
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
2519
|
+
}
|
|
2520
|
+
{
|
|
2521
|
+
hydrateScopedToShadow();
|
|
2522
|
+
}
|
|
2523
|
+
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
2524
|
+
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
2525
|
+
Object.assign(Cstr.prototype, {
|
|
2526
|
+
__hasHostListenerAttached: false,
|
|
2527
|
+
__registerHost() {
|
|
2528
|
+
registerHost(this, cmpMeta);
|
|
2529
|
+
},
|
|
2530
|
+
connectedCallback() {
|
|
2531
|
+
if (!this.__hasHostListenerAttached) {
|
|
2532
|
+
const hostRef = getHostRef(this);
|
|
2533
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
2534
|
+
this.__hasHostListenerAttached = true;
|
|
2535
|
+
}
|
|
2536
|
+
connectedCallback(this);
|
|
2537
|
+
if (originalConnectedCallback) {
|
|
2538
|
+
originalConnectedCallback.call(this);
|
|
2539
|
+
}
|
|
2540
|
+
},
|
|
2541
|
+
disconnectedCallback() {
|
|
2542
|
+
disconnectedCallback(this);
|
|
2543
|
+
if (originalDisconnectedCallback) {
|
|
2544
|
+
originalDisconnectedCallback.call(this);
|
|
2545
|
+
}
|
|
2546
|
+
},
|
|
2547
|
+
__attachShadow() {
|
|
2548
|
+
{
|
|
2549
|
+
if (!this.shadowRoot) {
|
|
2550
|
+
createShadowRoot.call(this, cmpMeta);
|
|
2551
|
+
} else {
|
|
2552
|
+
if (this.shadowRoot.mode !== "open") {
|
|
2553
|
+
throw new Error(
|
|
2554
|
+
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
|
|
2555
|
+
);
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
});
|
|
2561
|
+
Cstr.is = cmpMeta.$tagName$;
|
|
2562
|
+
return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
|
|
2563
|
+
};
|
|
2564
|
+
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2565
|
+
if (listeners && win.document) {
|
|
2566
|
+
listeners.map(([flags, name, method]) => {
|
|
2567
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
2568
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
2569
|
+
const opts = hostListenerOpts(flags);
|
|
2570
|
+
plt.ael(target, name, handler, opts);
|
|
2571
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
};
|
|
2575
|
+
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2576
|
+
try {
|
|
2577
|
+
{
|
|
2578
|
+
hostRef.$hostElement$[methodName](ev);
|
|
2579
|
+
}
|
|
2580
|
+
} catch (e) {
|
|
2581
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2582
|
+
}
|
|
2583
|
+
};
|
|
2584
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2585
|
+
if (flags & 8 /* TargetWindow */) {
|
|
2586
|
+
return win;
|
|
2587
|
+
}
|
|
2588
|
+
return elm;
|
|
2589
|
+
};
|
|
2590
|
+
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
2591
|
+
passive: (flags & 1 /* Passive */) !== 0,
|
|
2592
|
+
capture: (flags & 2 /* Capture */) !== 0
|
|
2593
|
+
} : (flags & 2 /* Capture */) !== 0;
|
|
2594
|
+
|
|
2595
|
+
// src/runtime/nonce.ts
|
|
2596
|
+
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
2597
|
+
|
|
2598
|
+
// src/runtime/platform-options.ts
|
|
2599
|
+
var setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
2600
|
+
|
|
2601
|
+
// src/runtime/render.ts
|
|
2602
|
+
function render(vnode, container) {
|
|
2603
|
+
const cmpMeta = {
|
|
2604
|
+
$flags$: 0,
|
|
2605
|
+
$tagName$: container.tagName
|
|
2606
|
+
};
|
|
2607
|
+
const ref = {
|
|
2608
|
+
$cmpMeta$: cmpMeta,
|
|
2609
|
+
$hostElement$: container
|
|
2610
|
+
};
|
|
2611
|
+
renderVdom(ref, vnode);
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
export { CuraThemeModule as C, H, Static as S, getAssetPath as a, setNonce as b, setPlatformOptions as c, Host as d, createEvent as e, globalScripts as g, h, proxyCustomElement as p, render as r, setAssetPath as s };
|
|
2615
|
+
//# sourceMappingURL=p-D1cPOZpG.js.map
|
|
2616
|
+
|
|
2617
|
+
//# sourceMappingURL=p-D1cPOZpG.js.map
|