@mgdis/mg-components 5.16.0 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-fede8ee2.js → index-c042e24b.js} +321 -68
- package/dist/cjs/index-c042e24b.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +5 -12
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/mg-action-more_34.cjs.entry.js +21 -6
- package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -0
- package/dist/cjs/mg-components.cjs.js +5 -3
- package/dist/cjs/mg-components.cjs.js.map +1 -0
- package/dist/cjs/mg-item-more.cjs.entry.js +4 -2
- package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -0
- package/dist/cjs/{mg-menu.conf-f9d0ddec.js → mg-menu.conf-43aacf30.js} +2 -0
- package/dist/cjs/mg-menu.conf-43aacf30.js.map +1 -0
- package/dist/collection/assets/icons/index.js +7 -2
- package/dist/collection/collection-manifest.json +37 -37
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js.map +1 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +6 -4
- package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -0
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js +33 -0
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js.map +1 -0
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js +70 -0
- package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -0
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js.map +1 -0
- package/dist/collection/components/atoms/mg-button/mg-button.js +10 -6
- package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -0
- package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js +91 -0
- package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js +142 -0
- package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-card/mg-card.conf.js +1 -0
- package/dist/collection/components/atoms/mg-card/mg-card.conf.js.map +1 -0
- package/dist/collection/components/atoms/mg-card/mg-card.js +8 -5
- package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -0
- package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js +36 -0
- package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js +43 -0
- package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +3 -2
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js.map +1 -0
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js +15 -0
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js +42 -0
- package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +2 -1
- package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -0
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js +11 -0
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js +14 -0
- package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +1 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js.map +1 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +11 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -0
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js +55 -0
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js +84 -0
- package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +2 -1
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -0
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.js +18 -0
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js +27 -0
- package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js +1 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js.map +1 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +6 -4
- package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -0
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js +37 -0
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js +71 -0
- package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js.map +1 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +1 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +7 -5
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -0
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js +132 -0
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js.map +1 -0
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js +264 -0
- package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/MgInput.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/MgInput.js +3 -2
- package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +12 -7
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +17 -11
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js +243 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +581 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +9 -7
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js +123 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js +324 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +11 -8
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js +212 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js +401 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +9 -6
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js +115 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js +234 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +9 -6
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js +154 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js +295 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +13 -8
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js +194 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js +344 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +11 -7
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js +171 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +280 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +9 -6
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js +129 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js +255 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +6 -4
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.js +125 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +203 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +1 -0
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +9 -5
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.js +268 -0
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js +175 -0
- package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +1 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +10 -7
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.js +119 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.js.map +1 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js +295 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js +1 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +19 -13
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -0
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js +128 -0
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js +187 -0
- package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +2 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -0
- package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js +30 -0
- package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js +42 -0
- package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +6 -4
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -0
- package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js +169 -0
- package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js.map +1 -0
- package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js +277 -0
- package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +3 -2
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -0
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js +39 -0
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js.map +1 -0
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js +36 -0
- package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.conf.js +1 -0
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +11 -7
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -0
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js +85 -0
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js +106 -0
- package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-message/mg-message.conf.js +1 -0
- package/dist/collection/components/molecules/mg-message/mg-message.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-message/mg-message.js +7 -5
- package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -0
- package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js +64 -0
- package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js.map +1 -0
- package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js +109 -0
- package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js +1 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +7 -5
- package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js +62 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js +40 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js.map +1 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js +26 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js +122 -0
- package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +1 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +5 -4
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -0
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js +57 -0
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js +121 -0
- package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js +1 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +9 -6
- package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -0
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js +106 -0
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js +223 -0
- package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +4 -3
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +6 -4
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -0
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.js +148 -0
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.js.map +1 -0
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js +130 -0
- package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js +1 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -3
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -0
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js +55 -0
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js.map +1 -0
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js +55 -0
- package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js.map +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +8 -5
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -0
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js +76 -0
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js.map +1 -0
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js +332 -0
- package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/locales/index.js +4 -3
- package/dist/collection/locales/index.js.map +1 -0
- package/dist/collection/locales/index.spec.js +27 -0
- package/dist/collection/locales/index.spec.js.map +1 -0
- package/dist/collection/stories/icon-gallery.js +4 -3
- package/dist/collection/stories/icon-gallery.js.map +1 -0
- package/dist/collection/test/typography.e2e.playwright.js +12 -0
- package/dist/collection/test/typography.e2e.playwright.js.map +1 -0
- package/dist/collection/utils/behaviors.utils.js +1 -0
- package/dist/collection/utils/behaviors.utils.js.map +1 -0
- package/dist/collection/utils/behaviors.utils.spec.js +57 -0
- package/dist/collection/utils/behaviors.utils.spec.js.map +1 -0
- package/dist/collection/utils/components.utils.js +1 -0
- package/dist/collection/utils/components.utils.js.map +1 -0
- package/dist/collection/utils/components.utils.spec.js +120 -0
- package/dist/collection/utils/components.utils.spec.js.map +1 -0
- package/dist/collection/utils/e2e.test.utils.js +46 -0
- package/dist/collection/utils/e2e.test.utils.js.map +1 -0
- package/dist/collection/utils/locale.utils.js +1 -0
- package/dist/collection/utils/locale.utils.js.map +1 -0
- package/dist/collection/utils/locale.utils.spec.js +52 -0
- package/dist/collection/utils/locale.utils.spec.js.map +1 -0
- package/dist/collection/utils/playwright.e2e.test.utils.js +100 -0
- package/dist/collection/utils/playwright.e2e.test.utils.js.map +1 -0
- package/dist/collection/utils/stencil.e2e.test.utils.js +33 -0
- package/dist/collection/utils/stencil.e2e.test.utils.js.map +1 -0
- package/dist/collection/utils/unit.test.utils.js +2 -1
- package/dist/collection/utils/unit.test.utils.js.map +1 -0
- package/dist/components/MgInput.js +2 -0
- package/dist/components/MgInput.js.map +1 -0
- package/dist/components/components.utils.js +2 -0
- package/dist/components/components.utils.js.map +1 -0
- package/dist/components/index.d.ts +5 -37
- package/dist/components/index.js +3 -36
- package/dist/components/index.js.map +1 -0
- package/dist/components/index2.js +2 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/mg-action-more.js +14 -4
- package/dist/components/mg-action-more.js.map +1 -0
- package/dist/components/mg-badge.js +2 -0
- package/dist/components/mg-badge.js.map +1 -0
- package/dist/components/mg-badge2.js +8 -1
- package/dist/components/mg-badge2.js.map +1 -0
- package/dist/components/mg-button.js +2 -0
- package/dist/components/mg-button.js.map +1 -0
- package/dist/components/mg-button2.js +8 -1
- package/dist/components/mg-button2.js.map +1 -0
- package/dist/components/mg-card.js +2 -0
- package/dist/components/mg-card.js.map +1 -0
- package/dist/components/mg-card2.js +6 -1
- package/dist/components/mg-card2.js.map +1 -0
- package/dist/components/mg-character-left.js +2 -0
- package/dist/components/mg-character-left.js.map +1 -0
- package/dist/components/mg-character-left2.js +5 -1
- package/dist/components/mg-character-left2.js.map +1 -0
- package/dist/components/mg-details.js +7 -1
- package/dist/components/mg-details.js.map +1 -0
- package/dist/components/mg-divider.js +3 -1
- package/dist/components/mg-divider.js.map +1 -0
- package/dist/components/mg-form.js +6 -1
- package/dist/components/mg-form.js.map +1 -0
- package/dist/components/mg-icon.js +2 -0
- package/dist/components/mg-icon.js.map +1 -0
- package/dist/components/mg-icon2.js +21 -3
- package/dist/components/mg-icon2.js.map +1 -0
- package/dist/components/mg-illustrated-message.js +3 -1
- package/dist/components/mg-illustrated-message.js.map +1 -0
- package/dist/components/mg-input-checkbox-paginated.js +2 -0
- package/dist/components/mg-input-checkbox-paginated.js.map +1 -0
- package/dist/components/mg-input-checkbox-paginated2.js +6 -1
- package/dist/components/mg-input-checkbox-paginated2.js.map +1 -0
- package/dist/components/mg-input-checkbox.js +12 -1
- package/dist/components/mg-input-checkbox.js.map +1 -0
- package/dist/components/mg-input-date.js +10 -1
- package/dist/components/mg-input-date.js.map +1 -0
- package/dist/components/mg-input-numeric.js +11 -1
- package/dist/components/mg-input-numeric.js.map +1 -0
- package/dist/components/mg-input-password.js +8 -1
- package/dist/components/mg-input-password.js.map +1 -0
- package/dist/components/mg-input-radio.js +9 -1
- package/dist/components/mg-input-radio.js.map +1 -0
- package/dist/components/mg-input-select.js +2 -0
- package/dist/components/mg-input-select.js.map +1 -0
- package/dist/components/mg-input-select2.js +9 -1
- package/dist/components/mg-input-select2.js.map +1 -0
- package/dist/components/mg-input-text.js +2 -0
- package/dist/components/mg-input-text.js.map +1 -0
- package/dist/components/mg-input-text2.js +9 -1
- package/dist/components/mg-input-text2.js.map +1 -0
- package/dist/components/mg-input-textarea.js +9 -1
- package/dist/components/mg-input-textarea.js.map +1 -0
- package/dist/components/mg-input-title.js +2 -0
- package/dist/components/mg-input-title.js.map +1 -0
- package/dist/components/mg-input-title2.js +6 -1
- package/dist/components/mg-input-title2.js.map +1 -0
- package/dist/components/mg-input-toggle.js +11 -1
- package/dist/components/mg-input-toggle.js.map +1 -0
- package/dist/components/mg-item-more.js +7 -1
- package/dist/components/mg-item-more.js.map +1 -0
- package/dist/components/mg-menu-item.js +2 -0
- package/dist/components/mg-menu-item.js.map +1 -0
- package/dist/components/mg-menu-item2.js +9 -1
- package/dist/components/mg-menu-item2.js.map +1 -0
- package/dist/components/mg-menu.conf.js +2 -0
- package/dist/components/mg-menu.conf.js.map +1 -0
- package/dist/components/mg-menu.js +2 -0
- package/dist/components/mg-menu.js.map +1 -0
- package/dist/components/mg-menu2.js +8 -1
- package/dist/components/mg-menu2.js.map +1 -0
- package/dist/components/mg-message.js +8 -1
- package/dist/components/mg-message.js.map +1 -0
- package/dist/components/mg-modal.js +8 -2
- package/dist/components/mg-modal.js.map +1 -0
- package/dist/components/mg-pagination.js +2 -0
- package/dist/components/mg-pagination.js.map +1 -0
- package/dist/components/mg-pagination2.js +6 -1
- package/dist/components/mg-pagination2.js.map +1 -0
- package/dist/components/mg-panel.js +9 -1
- package/dist/components/mg-panel.js.map +1 -0
- package/dist/components/mg-popover-content.js +2 -0
- package/dist/components/mg-popover-content.js.map +1 -0
- package/dist/components/mg-popover-content2.js +3 -1
- package/dist/components/mg-popover-content2.js.map +1 -0
- package/dist/components/mg-popover.js +2 -0
- package/dist/components/mg-popover.js.map +1 -0
- package/dist/components/mg-popover2.js +7 -1
- package/dist/components/mg-popover2.js.map +1 -0
- package/dist/components/mg-skip-links.js +5 -1
- package/dist/components/mg-skip-links.js.map +1 -0
- package/dist/components/mg-tabs.js +8 -1
- package/dist/components/mg-tabs.js.map +1 -0
- package/dist/components/mg-tag.js +7 -1
- package/dist/components/mg-tag.js.map +1 -0
- package/dist/components/mg-tooltip-content.js +2 -0
- package/dist/components/mg-tooltip-content.js.map +1 -0
- package/dist/components/mg-tooltip-content2.js +3 -1
- package/dist/components/mg-tooltip-content2.js.map +1 -0
- package/dist/components/mg-tooltip.js +2 -0
- package/dist/components/mg-tooltip.js.map +1 -0
- package/dist/components/mg-tooltip2.js +7 -1
- package/dist/components/mg-tooltip2.js.map +1 -0
- package/dist/components/popper.js +2 -0
- package/dist/components/popper.js.map +1 -0
- package/dist/esm/{index-1d40b052.js → index-ce01e63b.js} +321 -68
- package/dist/esm/index-ce01e63b.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -13
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/mg-action-more_34.entry.js +21 -6
- package/dist/esm/mg-action-more_34.entry.js.map +1 -0
- package/dist/esm/mg-components.js +6 -4
- package/dist/esm/mg-components.js.map +1 -0
- package/dist/esm/mg-item-more.entry.js +4 -2
- package/dist/esm/mg-item-more.entry.js.map +1 -0
- package/dist/esm/{mg-menu.conf-2cc079ae.js → mg-menu.conf-012fc9b4.js} +2 -0
- package/dist/esm/mg-menu.conf-012fc9b4.js.map +1 -0
- package/dist/mg-components/index.esm.js +2 -0
- package/dist/mg-components/index.esm.js.map +1 -0
- package/dist/mg-components/mg-components.esm.js +2 -1
- package/dist/mg-components/mg-components.esm.js.map +1 -0
- package/dist/mg-components/p-1aa89acf.js +3 -0
- package/dist/mg-components/p-1aa89acf.js.map +1 -0
- package/dist/mg-components/p-1d7d6fa0.js +2 -0
- package/dist/mg-components/p-1d7d6fa0.js.map +1 -0
- package/dist/mg-components/p-9257e8f1.entry.js +2 -0
- package/dist/mg-components/p-9257e8f1.entry.js.map +1 -0
- package/dist/mg-components/p-caafc9cf.entry.js +2 -0
- package/dist/mg-components/p-caafc9cf.entry.js.map +1 -0
- package/dist/types/components/atoms/mg-badge/test/mg-badge.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.d.ts +2 -0
- package/dist/types/components/molecules/mg-details/test/mg-details.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.template.d.ts +12 -0
- package/dist/types/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-panel/test/mg-panel.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.d.ts +1 -0
- package/dist/types/components.d.ts +20 -0
- package/dist/types/stencil-public-runtime.d.ts +43 -17
- package/dist/types/test/typography.e2e.playwright.d.ts +1 -0
- package/dist/types/utils/e2e.test.utils.d.ts +22 -0
- package/dist/types/utils/stencil.e2e.test.utils.d.ts +14 -0
- package/loader/index.d.ts +2 -2
- package/package.json +5 -5
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/mg-components/p-067080e4.js +0 -1
- package/dist/mg-components/p-3286bc46.entry.js +0 -1
- package/dist/mg-components/p-3bf1e2f0.js +0 -2
- package/dist/mg-components/p-91f4a30d.entry.js +0 -1
|
@@ -63,6 +63,13 @@ const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
|
63
63
|
*/
|
|
64
64
|
const EMPTY_OBJ = {};
|
|
65
65
|
const isDef = (v) => v != null;
|
|
66
|
+
/**
|
|
67
|
+
* Check whether a value is a 'complex type', defined here as an object or a
|
|
68
|
+
* function.
|
|
69
|
+
*
|
|
70
|
+
* @param o the value to check
|
|
71
|
+
* @returns whether it's a complex type or not
|
|
72
|
+
*/
|
|
66
73
|
const isComplexType = (o) => {
|
|
67
74
|
// https://jsperf.com/typeof-fn-object/5
|
|
68
75
|
o = typeof o;
|
|
@@ -121,13 +128,13 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
121
128
|
};
|
|
122
129
|
walk(children);
|
|
123
130
|
if (vnodeData) {
|
|
124
|
-
// normalize class / classname attributes
|
|
125
131
|
if (vnodeData.key) {
|
|
126
132
|
key = vnodeData.key;
|
|
127
133
|
}
|
|
128
134
|
if (vnodeData.name) {
|
|
129
135
|
slotName = vnodeData.name;
|
|
130
136
|
}
|
|
137
|
+
// normalize class / className attributes
|
|
131
138
|
{
|
|
132
139
|
const classData = vnodeData.className || vnodeData.class;
|
|
133
140
|
if (classData) {
|
|
@@ -157,6 +164,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
157
164
|
}
|
|
158
165
|
return vnode;
|
|
159
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
169
|
+
* possible text content.
|
|
170
|
+
*
|
|
171
|
+
* @param tag the tag for this element
|
|
172
|
+
* @param text possible text content for the node
|
|
173
|
+
* @returns a newly-minted virtual DOM node
|
|
174
|
+
*/
|
|
160
175
|
const newVNode = (tag, text) => {
|
|
161
176
|
const vnode = {
|
|
162
177
|
$flags$: 0,
|
|
@@ -177,6 +192,12 @@ const newVNode = (tag, text) => {
|
|
|
177
192
|
return vnode;
|
|
178
193
|
};
|
|
179
194
|
const Host = {};
|
|
195
|
+
/**
|
|
196
|
+
* Check whether a given node is a Host node or not
|
|
197
|
+
*
|
|
198
|
+
* @param node the virtual DOM node to check
|
|
199
|
+
* @returns whether it's a Host node or not
|
|
200
|
+
*/
|
|
180
201
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
181
202
|
/**
|
|
182
203
|
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
@@ -189,6 +210,13 @@ const vdomFnUtils = {
|
|
|
189
210
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
190
211
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
191
212
|
};
|
|
213
|
+
/**
|
|
214
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
215
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
216
|
+
*
|
|
217
|
+
* @param node the virtual DOM node to convert
|
|
218
|
+
* @returns a converted child node
|
|
219
|
+
*/
|
|
192
220
|
const convertToPublic = (node) => ({
|
|
193
221
|
vattrs: node.$attrs$,
|
|
194
222
|
vchildren: node.$children$,
|
|
@@ -197,6 +225,15 @@ const convertToPublic = (node) => ({
|
|
|
197
225
|
vtag: node.$tag$,
|
|
198
226
|
vtext: node.$text$,
|
|
199
227
|
});
|
|
228
|
+
/**
|
|
229
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
230
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
231
|
+
* likely created as part of presenting a public API, so converting it back
|
|
232
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
233
|
+
*
|
|
234
|
+
* @param node the child node to convert
|
|
235
|
+
* @returns a converted virtual DOM node
|
|
236
|
+
*/
|
|
200
237
|
const convertToPrivate = (node) => {
|
|
201
238
|
if (typeof node.vtag === 'function') {
|
|
202
239
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
@@ -305,9 +342,9 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
305
342
|
}
|
|
306
343
|
styles.set(scopeId, style);
|
|
307
344
|
};
|
|
308
|
-
const addStyle = (styleContainerNode, cmpMeta, mode
|
|
345
|
+
const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
309
346
|
var _a;
|
|
310
|
-
|
|
347
|
+
const scopeId = getScopeId(cmpMeta);
|
|
311
348
|
const style = styles.get(scopeId);
|
|
312
349
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
313
350
|
// so the fallback is to always use the document for the root node in those cases
|
|
@@ -322,10 +359,8 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
322
359
|
}
|
|
323
360
|
if (!appliedStyles.has(scopeId)) {
|
|
324
361
|
{
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
styleElm.innerHTML = style;
|
|
328
|
-
}
|
|
362
|
+
styleElm = doc.createElement('style');
|
|
363
|
+
styleElm.innerHTML = style;
|
|
329
364
|
// Apply CSP nonce to the style tag if it exists
|
|
330
365
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
331
366
|
if (nonce != null) {
|
|
@@ -375,6 +410,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
375
410
|
*
|
|
376
411
|
* Modified for Stencil's compiler and vdom
|
|
377
412
|
*/
|
|
413
|
+
/**
|
|
414
|
+
* When running a VDom render set properties present on a VDom node onto the
|
|
415
|
+
* corresponding HTML element.
|
|
416
|
+
*
|
|
417
|
+
* Note that this function has special functionality for the `class`,
|
|
418
|
+
* `style`, `key`, and `ref` attributes, as well as event handlers (like
|
|
419
|
+
* `onClick`, etc). All others are just passed through as-is.
|
|
420
|
+
*
|
|
421
|
+
* @param elm the HTMLElement onto which attributes should be set
|
|
422
|
+
* @param memberName the name of the attribute to set
|
|
423
|
+
* @param oldValue the old value for the attribute
|
|
424
|
+
* @param newValue the new value for the attribute
|
|
425
|
+
* @param isSvg whether we're in an svg context or not
|
|
426
|
+
* @param flags bitflags for Vdom variables
|
|
427
|
+
*/
|
|
378
428
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
379
429
|
if (oldValue !== newValue) {
|
|
380
430
|
let isProp = isMemberInElement(elm, memberName);
|
|
@@ -650,6 +700,21 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
650
700
|
}
|
|
651
701
|
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
652
702
|
};
|
|
703
|
+
/**
|
|
704
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
705
|
+
* add them to the DOM in the appropriate place.
|
|
706
|
+
*
|
|
707
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
708
|
+
* DOM nodes
|
|
709
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
710
|
+
* inserted before (optional)
|
|
711
|
+
* @param parentVNode the parent virtual DOM node
|
|
712
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
713
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
714
|
+
* creating DOM nodes (inclusive)
|
|
715
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
716
|
+
* creating DOM nodes (inclusive)
|
|
717
|
+
*/
|
|
653
718
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
654
719
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
655
720
|
let childNode;
|
|
@@ -666,27 +731,41 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
666
731
|
}
|
|
667
732
|
}
|
|
668
733
|
};
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
734
|
+
/**
|
|
735
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
736
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
737
|
+
* should no longer be shown.
|
|
738
|
+
*
|
|
739
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
740
|
+
*
|
|
741
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
742
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
743
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
744
|
+
*/
|
|
745
|
+
const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
746
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
747
|
+
const vnode = vnodes[index];
|
|
748
|
+
if (vnode) {
|
|
749
|
+
const elm = vnode.$elm$;
|
|
750
|
+
nullifyVNodeRefs(vnode);
|
|
751
|
+
if (elm) {
|
|
752
|
+
{
|
|
753
|
+
// we're removing this element
|
|
754
|
+
// so it's possible we need to show slot fallback content now
|
|
755
|
+
checkSlotFallbackVisibility = true;
|
|
756
|
+
if (elm['s-ol']) {
|
|
757
|
+
// remove the original location comment
|
|
758
|
+
elm['s-ol'].remove();
|
|
759
|
+
}
|
|
760
|
+
else {
|
|
761
|
+
// it's possible that child nodes of the node
|
|
762
|
+
// that's being removed are slot nodes
|
|
763
|
+
putBackInOriginalLocation(elm, true);
|
|
764
|
+
}
|
|
686
765
|
}
|
|
766
|
+
// remove the vnode's element from the dom
|
|
767
|
+
elm.remove();
|
|
687
768
|
}
|
|
688
|
-
// remove the vnode's element from the dom
|
|
689
|
-
elm.remove();
|
|
690
769
|
}
|
|
691
770
|
}
|
|
692
771
|
};
|
|
@@ -944,7 +1023,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
944
1023
|
*
|
|
945
1024
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
946
1025
|
* changing order within a `children` array or something along those lines then
|
|
947
|
-
* we could obtain a false
|
|
1026
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
1027
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
948
1028
|
*
|
|
949
1029
|
* @param leftVNode the first VNode to check
|
|
950
1030
|
* @param rightVNode the second VNode to check
|
|
@@ -1158,22 +1238,68 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
|
1158
1238
|
}
|
|
1159
1239
|
return slotNameAttr === '';
|
|
1160
1240
|
};
|
|
1161
|
-
|
|
1241
|
+
/**
|
|
1242
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
1243
|
+
* calling them with `null`. This signals that the DOM element corresponding to
|
|
1244
|
+
* the VDom node has been removed from the DOM.
|
|
1245
|
+
*
|
|
1246
|
+
* @param vNode a virtual DOM node
|
|
1247
|
+
*/
|
|
1248
|
+
const nullifyVNodeRefs = (vNode) => {
|
|
1162
1249
|
{
|
|
1163
1250
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1164
|
-
vNode.$children$ && vNode.$children$.map(
|
|
1251
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1165
1252
|
}
|
|
1166
1253
|
};
|
|
1167
|
-
|
|
1254
|
+
/**
|
|
1255
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1256
|
+
*
|
|
1257
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1258
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1259
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1260
|
+
* relocation, and reflecting attributes.
|
|
1261
|
+
*
|
|
1262
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1263
|
+
* the DOM node into which it should be rendered.
|
|
1264
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1265
|
+
* @param isInitialLoad whether or not this is the first call after page load
|
|
1266
|
+
*/
|
|
1267
|
+
const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1168
1268
|
const hostElm = hostRef.$hostElement$;
|
|
1169
1269
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1170
1270
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1271
|
+
// if `renderFnResults` is a Host node then we can use it directly. If not,
|
|
1272
|
+
// we need to call `h` again to wrap the children of our component in a
|
|
1273
|
+
// 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
|
|
1274
|
+
// implicitly that the top-level vdom node is 1) an only child and 2)
|
|
1275
|
+
// contains attrs that need to be set on the host element.
|
|
1171
1276
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1172
1277
|
hostTagName = hostElm.tagName;
|
|
1173
1278
|
if (cmpMeta.$attrsToReflect$) {
|
|
1174
1279
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1175
1280
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1176
1281
|
}
|
|
1282
|
+
// On the first render and *only* on the first render we want to check for
|
|
1283
|
+
// any attributes set on the host element which are also set on the vdom
|
|
1284
|
+
// node. If we find them, we override the value on the VDom node attrs with
|
|
1285
|
+
// the value from the host element, which allows developers building apps
|
|
1286
|
+
// with Stencil components to override e.g. the `role` attribute on a
|
|
1287
|
+
// component even if it's already set on the `Host`.
|
|
1288
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1289
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1290
|
+
// We have a special implementation in `setAccessor` for `style` and
|
|
1291
|
+
// `class` which reconciles values coming from the VDom with values
|
|
1292
|
+
// already present on the DOM element, so we don't want to override those
|
|
1293
|
+
// attributes on the VDom tree with values from the host element if they
|
|
1294
|
+
// are present.
|
|
1295
|
+
//
|
|
1296
|
+
// Likewise, `ref` and `key` are special internal values for the Stencil
|
|
1297
|
+
// runtime and we don't want to override those either.
|
|
1298
|
+
if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
|
|
1299
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1177
1303
|
rootVnode.$tag$ = null;
|
|
1178
1304
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
1179
1305
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -1240,7 +1366,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1240
1366
|
// has a different next sibling or parent relocated
|
|
1241
1367
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1242
1368
|
if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
|
|
1243
|
-
// probably a component in the index.html that doesn't have
|
|
1369
|
+
// probably a component in the index.html that doesn't have its hostname set
|
|
1244
1370
|
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
1245
1371
|
}
|
|
1246
1372
|
// add it back to the dom but in its new home
|
|
@@ -1286,32 +1412,103 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1286
1412
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1287
1413
|
return writeTask(dispatch) ;
|
|
1288
1414
|
};
|
|
1415
|
+
/**
|
|
1416
|
+
* Dispatch initial-render and update lifecycle hooks, enqueuing calls to
|
|
1417
|
+
* component lifecycle methods like `componentWillLoad` as well as
|
|
1418
|
+
* {@link updateComponent}, which will kick off the virtual DOM re-render.
|
|
1419
|
+
*
|
|
1420
|
+
* @param hostRef a reference to a host DOM node
|
|
1421
|
+
* @param isInitialLoad whether we're on the initial load or not
|
|
1422
|
+
* @returns an empty Promise which is used to enqueue a series of operations for
|
|
1423
|
+
* the component
|
|
1424
|
+
*/
|
|
1289
1425
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1290
1426
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
1291
1427
|
const instance = hostRef.$lazyInstance$ ;
|
|
1292
|
-
|
|
1428
|
+
// We're going to use this variable together with `enqueue` to implement a
|
|
1429
|
+
// little promise-based queue. We start out with it `undefined`. When we add
|
|
1430
|
+
// the first function to the queue we'll set this variable to be that
|
|
1431
|
+
// function's return value. When we attempt to add subsequent values to the
|
|
1432
|
+
// queue we'll check that value and, if it was a `Promise`, we'll then chain
|
|
1433
|
+
// the new function off of that `Promise` using `.then()`. This will give our
|
|
1434
|
+
// queue two nice properties:
|
|
1435
|
+
//
|
|
1436
|
+
// 1. If all functions added to the queue are synchronous they'll be called
|
|
1437
|
+
// synchronously right away.
|
|
1438
|
+
// 2. If all functions added to the queue are asynchronous they'll all be
|
|
1439
|
+
// called in order after `dispatchHooks` exits.
|
|
1440
|
+
let maybePromise;
|
|
1293
1441
|
if (isInitialLoad) {
|
|
1294
1442
|
{
|
|
1295
1443
|
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
1296
1444
|
if (hostRef.$queuedListeners$) {
|
|
1297
1445
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1298
|
-
hostRef.$queuedListeners$ =
|
|
1446
|
+
hostRef.$queuedListeners$ = undefined;
|
|
1299
1447
|
}
|
|
1300
1448
|
}
|
|
1301
1449
|
{
|
|
1302
|
-
|
|
1450
|
+
// If `componentWillLoad` returns a `Promise` then we want to wait on
|
|
1451
|
+
// whatever's going on in that `Promise` before we launch into
|
|
1452
|
+
// rendering the component, doing other lifecycle stuff, etc. So
|
|
1453
|
+
// in that case we assign the returned promise to the variable we
|
|
1454
|
+
// declared above to hold a possible 'queueing' Promise
|
|
1455
|
+
maybePromise = safeCall(instance, 'componentWillLoad');
|
|
1303
1456
|
}
|
|
1304
1457
|
}
|
|
1305
1458
|
else {
|
|
1306
1459
|
{
|
|
1307
|
-
|
|
1460
|
+
// Like `componentWillLoad` above, we allow Stencil component
|
|
1461
|
+
// authors to return a `Promise` from this lifecycle callback, and
|
|
1462
|
+
// we specify that our runtime will wait for that `Promise` to
|
|
1463
|
+
// resolve before the component re-renders. So if the method
|
|
1464
|
+
// returns a `Promise` we need to keep it around!
|
|
1465
|
+
maybePromise = safeCall(instance, 'componentWillUpdate');
|
|
1308
1466
|
}
|
|
1309
1467
|
}
|
|
1310
1468
|
endSchedule();
|
|
1311
|
-
return
|
|
1469
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1312
1470
|
};
|
|
1471
|
+
/**
|
|
1472
|
+
* This function uses a Promise to implement a simple first-in, first-out queue
|
|
1473
|
+
* of functions to be called.
|
|
1474
|
+
*
|
|
1475
|
+
* The queue is ordered on the basis of the first argument. If it's
|
|
1476
|
+
* `undefined`, then nothing is on the queue yet, so the provided function can
|
|
1477
|
+
* be called synchronously (although note that this function may return a
|
|
1478
|
+
* `Promise`). The idea is that then the return value of that enqueueing
|
|
1479
|
+
* operation is kept around, so that if it was a `Promise` then subsequent
|
|
1480
|
+
* functions can be enqueued by calling this function again with that `Promise`
|
|
1481
|
+
* as the first argument.
|
|
1482
|
+
*
|
|
1483
|
+
* @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
|
|
1484
|
+
* @param fn a function to enqueue
|
|
1485
|
+
* @returns either a `Promise` or the return value of the provided function
|
|
1486
|
+
*/
|
|
1487
|
+
const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
|
1488
|
+
/**
|
|
1489
|
+
* Check that a value is a `Promise`. To check, we first see if the value is an
|
|
1490
|
+
* instance of the `Promise` global. In a few circumstances, in particular if
|
|
1491
|
+
* the global has been overwritten, this is could be misleading, so we also do
|
|
1492
|
+
* a little 'duck typing' check to see if the `.then` property of the value is
|
|
1493
|
+
* defined and a function.
|
|
1494
|
+
*
|
|
1495
|
+
* @param maybePromise it might be a promise!
|
|
1496
|
+
* @returns whether it is or not
|
|
1497
|
+
*/
|
|
1498
|
+
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
|
1499
|
+
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
|
1500
|
+
/**
|
|
1501
|
+
* Update a component given reference to its host elements and so on.
|
|
1502
|
+
*
|
|
1503
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1504
|
+
* VDom nodes, and other metadata
|
|
1505
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1506
|
+
* rendered
|
|
1507
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1508
|
+
* the first render cycle
|
|
1509
|
+
*/
|
|
1313
1510
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1314
|
-
|
|
1511
|
+
var _a;
|
|
1315
1512
|
const elm = hostRef.$hostElement$;
|
|
1316
1513
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
1317
1514
|
const rc = elm['s-rc'];
|
|
@@ -1321,7 +1518,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1321
1518
|
}
|
|
1322
1519
|
const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
1323
1520
|
{
|
|
1324
|
-
callRender(hostRef, instance);
|
|
1521
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
1325
1522
|
}
|
|
1326
1523
|
if (rc) {
|
|
1327
1524
|
// ok, so turns out there are some child host elements
|
|
@@ -1333,7 +1530,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1333
1530
|
endRender();
|
|
1334
1531
|
endUpdate();
|
|
1335
1532
|
{
|
|
1336
|
-
const childrenPromises = elm['s-p'];
|
|
1533
|
+
const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
|
|
1337
1534
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
1338
1535
|
if (childrenPromises.length === 0) {
|
|
1339
1536
|
postUpdate();
|
|
@@ -1345,7 +1542,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1345
1542
|
}
|
|
1346
1543
|
}
|
|
1347
1544
|
};
|
|
1348
|
-
|
|
1545
|
+
/**
|
|
1546
|
+
* Handle making the call to the VDom renderer with the proper context given
|
|
1547
|
+
* various build variables
|
|
1548
|
+
*
|
|
1549
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1550
|
+
* VDom nodes, and other metadata
|
|
1551
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1552
|
+
* rendered
|
|
1553
|
+
* @param elm the Host element for the component
|
|
1554
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1555
|
+
* @returns an empty promise
|
|
1556
|
+
*/
|
|
1557
|
+
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1349
1558
|
try {
|
|
1350
1559
|
instance = instance.render && instance.render();
|
|
1351
1560
|
{
|
|
@@ -1360,7 +1569,7 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1360
1569
|
// or we need to update the css class/attrs on the host element
|
|
1361
1570
|
// DOM WRITE!
|
|
1362
1571
|
{
|
|
1363
|
-
renderVdom(hostRef, instance);
|
|
1572
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
1364
1573
|
}
|
|
1365
1574
|
}
|
|
1366
1575
|
}
|
|
@@ -1440,9 +1649,6 @@ const safeCall = (instance, method, arg) => {
|
|
|
1440
1649
|
}
|
|
1441
1650
|
return undefined;
|
|
1442
1651
|
};
|
|
1443
|
-
const then = (promise, thenFn) => {
|
|
1444
|
-
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1445
|
-
};
|
|
1446
1652
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1447
1653
|
;
|
|
1448
1654
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
@@ -1499,6 +1705,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1499
1705
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1500
1706
|
*/
|
|
1501
1707
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1708
|
+
var _a;
|
|
1502
1709
|
if (cmpMeta.$members$) {
|
|
1503
1710
|
if (Cstr.watchers) {
|
|
1504
1711
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
@@ -1536,7 +1743,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1536
1743
|
});
|
|
1537
1744
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1538
1745
|
const attrNameToPropName = new Map();
|
|
1539
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1746
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1540
1747
|
plt.jmp(() => {
|
|
1541
1748
|
const propName = attrNameToPropName.get(attrName);
|
|
1542
1749
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -1559,12 +1766,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1559
1766
|
// customElements.define('my-component', MyComponent);
|
|
1560
1767
|
// </script>
|
|
1561
1768
|
// ```
|
|
1562
|
-
// In this case if we do not
|
|
1769
|
+
// In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1563
1770
|
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1564
1771
|
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1565
|
-
// the connectedCallback attempts to
|
|
1772
|
+
// the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
|
|
1566
1773
|
//
|
|
1567
|
-
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/
|
|
1774
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
|
|
1568
1775
|
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1569
1776
|
//
|
|
1570
1777
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
@@ -1584,21 +1791,49 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1584
1791
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1585
1792
|
return;
|
|
1586
1793
|
}
|
|
1794
|
+
else if (propName == null) {
|
|
1795
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1796
|
+
// on a vanilla web component
|
|
1797
|
+
const hostRef = getHostRef(this);
|
|
1798
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1799
|
+
// We only want to trigger the callback(s) if:
|
|
1800
|
+
// 1. The instance is ready
|
|
1801
|
+
// 2. The watchers are ready
|
|
1802
|
+
// 3. The value has changed
|
|
1803
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1804
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1805
|
+
newValue !== oldValue) {
|
|
1806
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1807
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
1808
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1809
|
+
if (instance[callbackName] != null) {
|
|
1810
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1811
|
+
}
|
|
1812
|
+
});
|
|
1813
|
+
}
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1587
1816
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1588
1817
|
});
|
|
1589
1818
|
};
|
|
1590
|
-
//
|
|
1591
|
-
//
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1819
|
+
// Create an array of attributes to observe
|
|
1820
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1821
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1822
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1823
|
+
// an invalid attribute.
|
|
1824
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1825
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1826
|
+
...members
|
|
1827
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1828
|
+
.map(([propName, m]) => {
|
|
1829
|
+
const attrName = m[1] || propName;
|
|
1830
|
+
attrNameToPropName.set(attrName, propName);
|
|
1831
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1832
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1833
|
+
}
|
|
1834
|
+
return attrName;
|
|
1835
|
+
}),
|
|
1836
|
+
]));
|
|
1602
1837
|
}
|
|
1603
1838
|
}
|
|
1604
1839
|
return Cstr;
|
|
@@ -1606,9 +1841,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1606
1841
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1607
1842
|
// initializeComponent
|
|
1608
1843
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1844
|
+
// Let the runtime know that the component has been initialized
|
|
1845
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1609
1846
|
{
|
|
1610
|
-
// we haven't initialized this element yet
|
|
1611
|
-
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1612
1847
|
// lazy loaded components
|
|
1613
1848
|
// request the component's implementation to be
|
|
1614
1849
|
// wired up with the host element
|
|
@@ -1681,6 +1916,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1681
1916
|
schedule();
|
|
1682
1917
|
}
|
|
1683
1918
|
};
|
|
1919
|
+
const fireConnectedCallback = (instance) => {
|
|
1920
|
+
};
|
|
1684
1921
|
const connectedCallback = (elm) => {
|
|
1685
1922
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1686
1923
|
const hostRef = getHostRef(elm);
|
|
@@ -1694,7 +1931,8 @@ const connectedCallback = (elm) => {
|
|
|
1694
1931
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1695
1932
|
// in here to act as original content anchors as we move nodes around
|
|
1696
1933
|
// host element has been connected to the DOM
|
|
1697
|
-
if ((
|
|
1934
|
+
if ((// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
1935
|
+
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1698
1936
|
setContentReference(elm);
|
|
1699
1937
|
}
|
|
1700
1938
|
}
|
|
@@ -1733,6 +1971,11 @@ const connectedCallback = (elm) => {
|
|
|
1733
1971
|
// reattach any event listeners to the host
|
|
1734
1972
|
// since they would have been removed when disconnected
|
|
1735
1973
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1974
|
+
// fire off connectedCallback() on component instance
|
|
1975
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
|
|
1976
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
1977
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
|
1978
|
+
}
|
|
1736
1979
|
}
|
|
1737
1980
|
endConnected();
|
|
1738
1981
|
}
|
|
@@ -1748,18 +1991,25 @@ const setContentReference = (elm) => {
|
|
|
1748
1991
|
contentRefElm['s-cn'] = true;
|
|
1749
1992
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1750
1993
|
};
|
|
1751
|
-
const
|
|
1994
|
+
const disconnectInstance = (instance) => {
|
|
1995
|
+
{
|
|
1996
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1997
|
+
}
|
|
1998
|
+
};
|
|
1999
|
+
const disconnectedCallback = async (elm) => {
|
|
1752
2000
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1753
2001
|
const hostRef = getHostRef(elm);
|
|
1754
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
1755
2002
|
{
|
|
1756
2003
|
if (hostRef.$rmListeners$) {
|
|
1757
2004
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1758
2005
|
hostRef.$rmListeners$ = undefined;
|
|
1759
2006
|
}
|
|
1760
2007
|
}
|
|
1761
|
-
{
|
|
1762
|
-
|
|
2008
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
|
|
2009
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
2010
|
+
}
|
|
2011
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
2012
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1763
2013
|
}
|
|
1764
2014
|
}
|
|
1765
2015
|
};
|
|
@@ -1779,6 +2029,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1779
2029
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1780
2030
|
lazyBundles.map((lazyBundle) => {
|
|
1781
2031
|
lazyBundle[1].map((compactMeta) => {
|
|
2032
|
+
var _a;
|
|
1782
2033
|
const cmpMeta = {
|
|
1783
2034
|
$flags$: compactMeta[0],
|
|
1784
2035
|
$tagName$: compactMeta[1],
|
|
@@ -1795,7 +2046,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1795
2046
|
cmpMeta.$attrsToReflect$ = [];
|
|
1796
2047
|
}
|
|
1797
2048
|
{
|
|
1798
|
-
cmpMeta.$watchers$ = {};
|
|
2049
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
1799
2050
|
}
|
|
1800
2051
|
const tagName = cmpMeta.$tagName$;
|
|
1801
2052
|
const HostElement = class extends HTMLElement {
|
|
@@ -2026,3 +2277,5 @@ exports.h = h;
|
|
|
2026
2277
|
exports.promiseResolve = promiseResolve;
|
|
2027
2278
|
exports.registerInstance = registerInstance;
|
|
2028
2279
|
exports.setNonce = setNonce;
|
|
2280
|
+
|
|
2281
|
+
//# sourceMappingURL=index-c042e24b.js.map
|