@mgdis/mg-components 5.16.0 → 5.18.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 +485 -163
- 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 +38 -16
- 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 +138 -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 +272 -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 +109 -27
- 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 +638 -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 +88 -15
- 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 +379 -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 +120 -46
- 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 +456 -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 +92 -16
- 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 +289 -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 +91 -15
- 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 +355 -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 +95 -17
- 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 +399 -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 +104 -27
- 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 +343 -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 +108 -31
- 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 +318 -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 +8 -6
- 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 +17 -12
- 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 +213 -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 +40 -18
- 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 +159 -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 +142 -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 +7 -0
- package/dist/collection/utils/components.utils.js.map +1 -0
- package/dist/collection/utils/components.utils.spec.js +128 -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 +9 -1
- 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 +7 -2
- 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 +64 -14
- package/dist/components/mg-input-checkbox.js.map +1 -0
- package/dist/components/mg-input-date.js +51 -9
- package/dist/components/mg-input-date.js.map +1 -0
- package/dist/components/mg-input-numeric.js +82 -39
- package/dist/components/mg-input-numeric.js.map +1 -0
- package/dist/components/mg-input-password.js +53 -11
- package/dist/components/mg-input-password.js.map +1 -0
- package/dist/components/mg-input-radio.js +53 -10
- 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 +53 -10
- 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 +64 -23
- package/dist/components/mg-input-text2.js.map +1 -0
- package/dist/components/mg-input-textarea.js +69 -27
- 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 +16 -7
- 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 +40 -15
- 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 +37 -12
- 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 +485 -163
- 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-ff3ca349.entry.js +2 -0
- package/dist/mg-components/p-ff3ca349.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/atoms/mg-tooltip/mg-tooltip.d.ts +2 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +22 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +17 -2
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +35 -20
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +16 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +16 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +16 -1
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +17 -5
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +17 -5
- 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-form/mg-form.d.ts +1 -1
- 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/mg-panel.d.ts +1 -1
- package/dist/types/components/molecules/mg-panel/test/mg-panel.e2e.playwright.d.ts +1 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.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 +79 -11
- 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/components.utils.d.ts +6 -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
|
@@ -41,6 +41,13 @@ const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
|
41
41
|
*/
|
|
42
42
|
const EMPTY_OBJ = {};
|
|
43
43
|
const isDef = (v) => v != null;
|
|
44
|
+
/**
|
|
45
|
+
* Check whether a value is a 'complex type', defined here as an object or a
|
|
46
|
+
* function.
|
|
47
|
+
*
|
|
48
|
+
* @param o the value to check
|
|
49
|
+
* @returns whether it's a complex type or not
|
|
50
|
+
*/
|
|
44
51
|
const isComplexType = (o) => {
|
|
45
52
|
// https://jsperf.com/typeof-fn-object/5
|
|
46
53
|
o = typeof o;
|
|
@@ -99,13 +106,13 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
99
106
|
};
|
|
100
107
|
walk(children);
|
|
101
108
|
if (vnodeData) {
|
|
102
|
-
// normalize class / classname attributes
|
|
103
109
|
if (vnodeData.key) {
|
|
104
110
|
key = vnodeData.key;
|
|
105
111
|
}
|
|
106
112
|
if (vnodeData.name) {
|
|
107
113
|
slotName = vnodeData.name;
|
|
108
114
|
}
|
|
115
|
+
// normalize class / className attributes
|
|
109
116
|
{
|
|
110
117
|
const classData = vnodeData.className || vnodeData.class;
|
|
111
118
|
if (classData) {
|
|
@@ -135,6 +142,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
135
142
|
}
|
|
136
143
|
return vnode;
|
|
137
144
|
};
|
|
145
|
+
/**
|
|
146
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
147
|
+
* possible text content.
|
|
148
|
+
*
|
|
149
|
+
* @param tag the tag for this element
|
|
150
|
+
* @param text possible text content for the node
|
|
151
|
+
* @returns a newly-minted virtual DOM node
|
|
152
|
+
*/
|
|
138
153
|
const newVNode = (tag, text) => {
|
|
139
154
|
const vnode = {
|
|
140
155
|
$flags$: 0,
|
|
@@ -155,6 +170,12 @@ const newVNode = (tag, text) => {
|
|
|
155
170
|
return vnode;
|
|
156
171
|
};
|
|
157
172
|
const Host = {};
|
|
173
|
+
/**
|
|
174
|
+
* Check whether a given node is a Host node or not
|
|
175
|
+
*
|
|
176
|
+
* @param node the virtual DOM node to check
|
|
177
|
+
* @returns whether it's a Host node or not
|
|
178
|
+
*/
|
|
158
179
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
159
180
|
/**
|
|
160
181
|
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
@@ -167,6 +188,13 @@ const vdomFnUtils = {
|
|
|
167
188
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
168
189
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
169
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
193
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
194
|
+
*
|
|
195
|
+
* @param node the virtual DOM node to convert
|
|
196
|
+
* @returns a converted child node
|
|
197
|
+
*/
|
|
170
198
|
const convertToPublic = (node) => ({
|
|
171
199
|
vattrs: node.$attrs$,
|
|
172
200
|
vchildren: node.$children$,
|
|
@@ -175,6 +203,15 @@ const convertToPublic = (node) => ({
|
|
|
175
203
|
vtag: node.$tag$,
|
|
176
204
|
vtext: node.$text$,
|
|
177
205
|
});
|
|
206
|
+
/**
|
|
207
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
208
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
209
|
+
* likely created as part of presenting a public API, so converting it back
|
|
210
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
211
|
+
*
|
|
212
|
+
* @param node the child node to convert
|
|
213
|
+
* @returns a converted virtual DOM node
|
|
214
|
+
*/
|
|
178
215
|
const convertToPrivate = (node) => {
|
|
179
216
|
if (typeof node.vtag === 'function') {
|
|
180
217
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
@@ -283,9 +320,9 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
283
320
|
}
|
|
284
321
|
styles.set(scopeId, style);
|
|
285
322
|
};
|
|
286
|
-
const addStyle = (styleContainerNode, cmpMeta, mode
|
|
323
|
+
const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
287
324
|
var _a;
|
|
288
|
-
|
|
325
|
+
const scopeId = getScopeId(cmpMeta);
|
|
289
326
|
const style = styles.get(scopeId);
|
|
290
327
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
291
328
|
// so the fallback is to always use the document for the root node in those cases
|
|
@@ -300,10 +337,8 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
300
337
|
}
|
|
301
338
|
if (!appliedStyles.has(scopeId)) {
|
|
302
339
|
{
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
styleElm.innerHTML = style;
|
|
306
|
-
}
|
|
340
|
+
styleElm = doc.createElement('style');
|
|
341
|
+
styleElm.innerHTML = style;
|
|
307
342
|
// Apply CSP nonce to the style tag if it exists
|
|
308
343
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
309
344
|
if (nonce != null) {
|
|
@@ -353,6 +388,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
353
388
|
*
|
|
354
389
|
* Modified for Stencil's compiler and vdom
|
|
355
390
|
*/
|
|
391
|
+
/**
|
|
392
|
+
* When running a VDom render set properties present on a VDom node onto the
|
|
393
|
+
* corresponding HTML element.
|
|
394
|
+
*
|
|
395
|
+
* Note that this function has special functionality for the `class`,
|
|
396
|
+
* `style`, `key`, and `ref` attributes, as well as event handlers (like
|
|
397
|
+
* `onClick`, etc). All others are just passed through as-is.
|
|
398
|
+
*
|
|
399
|
+
* @param elm the HTMLElement onto which attributes should be set
|
|
400
|
+
* @param memberName the name of the attribute to set
|
|
401
|
+
* @param oldValue the old value for the attribute
|
|
402
|
+
* @param newValue the new value for the attribute
|
|
403
|
+
* @param isSvg whether we're in an svg context or not
|
|
404
|
+
* @param flags bitflags for Vdom variables
|
|
405
|
+
*/
|
|
356
406
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
357
407
|
if (oldValue !== newValue) {
|
|
358
408
|
let isProp = isMemberInElement(elm, memberName);
|
|
@@ -628,6 +678,21 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
628
678
|
}
|
|
629
679
|
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
630
680
|
};
|
|
681
|
+
/**
|
|
682
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
683
|
+
* add them to the DOM in the appropriate place.
|
|
684
|
+
*
|
|
685
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
686
|
+
* DOM nodes
|
|
687
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
688
|
+
* inserted before (optional)
|
|
689
|
+
* @param parentVNode the parent virtual DOM node
|
|
690
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
691
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
692
|
+
* creating DOM nodes (inclusive)
|
|
693
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
694
|
+
* creating DOM nodes (inclusive)
|
|
695
|
+
*/
|
|
631
696
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
632
697
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
633
698
|
let childNode;
|
|
@@ -644,27 +709,41 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
644
709
|
}
|
|
645
710
|
}
|
|
646
711
|
};
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
712
|
+
/**
|
|
713
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
714
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
715
|
+
* should no longer be shown.
|
|
716
|
+
*
|
|
717
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
718
|
+
*
|
|
719
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
720
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
721
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
722
|
+
*/
|
|
723
|
+
const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
724
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
725
|
+
const vnode = vnodes[index];
|
|
726
|
+
if (vnode) {
|
|
727
|
+
const elm = vnode.$elm$;
|
|
728
|
+
nullifyVNodeRefs(vnode);
|
|
729
|
+
if (elm) {
|
|
730
|
+
{
|
|
731
|
+
// we're removing this element
|
|
732
|
+
// so it's possible we need to show slot fallback content now
|
|
733
|
+
checkSlotFallbackVisibility = true;
|
|
734
|
+
if (elm['s-ol']) {
|
|
735
|
+
// remove the original location comment
|
|
736
|
+
elm['s-ol'].remove();
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
// it's possible that child nodes of the node
|
|
740
|
+
// that's being removed are slot nodes
|
|
741
|
+
putBackInOriginalLocation(elm, true);
|
|
742
|
+
}
|
|
664
743
|
}
|
|
744
|
+
// remove the vnode's element from the dom
|
|
745
|
+
elm.remove();
|
|
665
746
|
}
|
|
666
|
-
// remove the vnode's element from the dom
|
|
667
|
-
elm.remove();
|
|
668
747
|
}
|
|
669
748
|
}
|
|
670
749
|
};
|
|
@@ -922,7 +1001,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
922
1001
|
*
|
|
923
1002
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
924
1003
|
* changing order within a `children` array or something along those lines then
|
|
925
|
-
* we could obtain a false
|
|
1004
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
1005
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
926
1006
|
*
|
|
927
1007
|
* @param leftVNode the first VNode to check
|
|
928
1008
|
* @param rightVNode the second VNode to check
|
|
@@ -1136,22 +1216,68 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
|
1136
1216
|
}
|
|
1137
1217
|
return slotNameAttr === '';
|
|
1138
1218
|
};
|
|
1139
|
-
|
|
1219
|
+
/**
|
|
1220
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
1221
|
+
* calling them with `null`. This signals that the DOM element corresponding to
|
|
1222
|
+
* the VDom node has been removed from the DOM.
|
|
1223
|
+
*
|
|
1224
|
+
* @param vNode a virtual DOM node
|
|
1225
|
+
*/
|
|
1226
|
+
const nullifyVNodeRefs = (vNode) => {
|
|
1140
1227
|
{
|
|
1141
1228
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1142
|
-
vNode.$children$ && vNode.$children$.map(
|
|
1229
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1143
1230
|
}
|
|
1144
1231
|
};
|
|
1145
|
-
|
|
1232
|
+
/**
|
|
1233
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1234
|
+
*
|
|
1235
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1236
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1237
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1238
|
+
* relocation, and reflecting attributes.
|
|
1239
|
+
*
|
|
1240
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1241
|
+
* the DOM node into which it should be rendered.
|
|
1242
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1243
|
+
* @param isInitialLoad whether or not this is the first call after page load
|
|
1244
|
+
*/
|
|
1245
|
+
const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1146
1246
|
const hostElm = hostRef.$hostElement$;
|
|
1147
1247
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1148
1248
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1249
|
+
// if `renderFnResults` is a Host node then we can use it directly. If not,
|
|
1250
|
+
// we need to call `h` again to wrap the children of our component in a
|
|
1251
|
+
// 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
|
|
1252
|
+
// implicitly that the top-level vdom node is 1) an only child and 2)
|
|
1253
|
+
// contains attrs that need to be set on the host element.
|
|
1149
1254
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1150
1255
|
hostTagName = hostElm.tagName;
|
|
1151
1256
|
if (cmpMeta.$attrsToReflect$) {
|
|
1152
1257
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1153
1258
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1154
1259
|
}
|
|
1260
|
+
// On the first render and *only* on the first render we want to check for
|
|
1261
|
+
// any attributes set on the host element which are also set on the vdom
|
|
1262
|
+
// node. If we find them, we override the value on the VDom node attrs with
|
|
1263
|
+
// the value from the host element, which allows developers building apps
|
|
1264
|
+
// with Stencil components to override e.g. the `role` attribute on a
|
|
1265
|
+
// component even if it's already set on the `Host`.
|
|
1266
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1267
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1268
|
+
// We have a special implementation in `setAccessor` for `style` and
|
|
1269
|
+
// `class` which reconciles values coming from the VDom with values
|
|
1270
|
+
// already present on the DOM element, so we don't want to override those
|
|
1271
|
+
// attributes on the VDom tree with values from the host element if they
|
|
1272
|
+
// are present.
|
|
1273
|
+
//
|
|
1274
|
+
// Likewise, `ref` and `key` are special internal values for the Stencil
|
|
1275
|
+
// runtime and we don't want to override those either.
|
|
1276
|
+
if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
|
|
1277
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1155
1281
|
rootVnode.$tag$ = null;
|
|
1156
1282
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
1157
1283
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -1218,7 +1344,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1218
1344
|
// has a different next sibling or parent relocated
|
|
1219
1345
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1220
1346
|
if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
|
|
1221
|
-
// probably a component in the index.html that doesn't have
|
|
1347
|
+
// probably a component in the index.html that doesn't have its hostname set
|
|
1222
1348
|
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
1223
1349
|
}
|
|
1224
1350
|
// add it back to the dom but in its new home
|
|
@@ -1264,32 +1390,103 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1264
1390
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1265
1391
|
return writeTask(dispatch) ;
|
|
1266
1392
|
};
|
|
1393
|
+
/**
|
|
1394
|
+
* Dispatch initial-render and update lifecycle hooks, enqueuing calls to
|
|
1395
|
+
* component lifecycle methods like `componentWillLoad` as well as
|
|
1396
|
+
* {@link updateComponent}, which will kick off the virtual DOM re-render.
|
|
1397
|
+
*
|
|
1398
|
+
* @param hostRef a reference to a host DOM node
|
|
1399
|
+
* @param isInitialLoad whether we're on the initial load or not
|
|
1400
|
+
* @returns an empty Promise which is used to enqueue a series of operations for
|
|
1401
|
+
* the component
|
|
1402
|
+
*/
|
|
1267
1403
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1268
1404
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
1269
1405
|
const instance = hostRef.$lazyInstance$ ;
|
|
1270
|
-
|
|
1406
|
+
// We're going to use this variable together with `enqueue` to implement a
|
|
1407
|
+
// little promise-based queue. We start out with it `undefined`. When we add
|
|
1408
|
+
// the first function to the queue we'll set this variable to be that
|
|
1409
|
+
// function's return value. When we attempt to add subsequent values to the
|
|
1410
|
+
// queue we'll check that value and, if it was a `Promise`, we'll then chain
|
|
1411
|
+
// the new function off of that `Promise` using `.then()`. This will give our
|
|
1412
|
+
// queue two nice properties:
|
|
1413
|
+
//
|
|
1414
|
+
// 1. If all functions added to the queue are synchronous they'll be called
|
|
1415
|
+
// synchronously right away.
|
|
1416
|
+
// 2. If all functions added to the queue are asynchronous they'll all be
|
|
1417
|
+
// called in order after `dispatchHooks` exits.
|
|
1418
|
+
let maybePromise;
|
|
1271
1419
|
if (isInitialLoad) {
|
|
1272
1420
|
{
|
|
1273
1421
|
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
1274
1422
|
if (hostRef.$queuedListeners$) {
|
|
1275
1423
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1276
|
-
hostRef.$queuedListeners$ =
|
|
1424
|
+
hostRef.$queuedListeners$ = undefined;
|
|
1277
1425
|
}
|
|
1278
1426
|
}
|
|
1279
1427
|
{
|
|
1280
|
-
|
|
1428
|
+
// If `componentWillLoad` returns a `Promise` then we want to wait on
|
|
1429
|
+
// whatever's going on in that `Promise` before we launch into
|
|
1430
|
+
// rendering the component, doing other lifecycle stuff, etc. So
|
|
1431
|
+
// in that case we assign the returned promise to the variable we
|
|
1432
|
+
// declared above to hold a possible 'queueing' Promise
|
|
1433
|
+
maybePromise = safeCall(instance, 'componentWillLoad');
|
|
1281
1434
|
}
|
|
1282
1435
|
}
|
|
1283
1436
|
else {
|
|
1284
1437
|
{
|
|
1285
|
-
|
|
1438
|
+
// Like `componentWillLoad` above, we allow Stencil component
|
|
1439
|
+
// authors to return a `Promise` from this lifecycle callback, and
|
|
1440
|
+
// we specify that our runtime will wait for that `Promise` to
|
|
1441
|
+
// resolve before the component re-renders. So if the method
|
|
1442
|
+
// returns a `Promise` we need to keep it around!
|
|
1443
|
+
maybePromise = safeCall(instance, 'componentWillUpdate');
|
|
1286
1444
|
}
|
|
1287
1445
|
}
|
|
1288
1446
|
endSchedule();
|
|
1289
|
-
return
|
|
1447
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1290
1448
|
};
|
|
1449
|
+
/**
|
|
1450
|
+
* This function uses a Promise to implement a simple first-in, first-out queue
|
|
1451
|
+
* of functions to be called.
|
|
1452
|
+
*
|
|
1453
|
+
* The queue is ordered on the basis of the first argument. If it's
|
|
1454
|
+
* `undefined`, then nothing is on the queue yet, so the provided function can
|
|
1455
|
+
* be called synchronously (although note that this function may return a
|
|
1456
|
+
* `Promise`). The idea is that then the return value of that enqueueing
|
|
1457
|
+
* operation is kept around, so that if it was a `Promise` then subsequent
|
|
1458
|
+
* functions can be enqueued by calling this function again with that `Promise`
|
|
1459
|
+
* as the first argument.
|
|
1460
|
+
*
|
|
1461
|
+
* @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
|
|
1462
|
+
* @param fn a function to enqueue
|
|
1463
|
+
* @returns either a `Promise` or the return value of the provided function
|
|
1464
|
+
*/
|
|
1465
|
+
const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
|
1466
|
+
/**
|
|
1467
|
+
* Check that a value is a `Promise`. To check, we first see if the value is an
|
|
1468
|
+
* instance of the `Promise` global. In a few circumstances, in particular if
|
|
1469
|
+
* the global has been overwritten, this is could be misleading, so we also do
|
|
1470
|
+
* a little 'duck typing' check to see if the `.then` property of the value is
|
|
1471
|
+
* defined and a function.
|
|
1472
|
+
*
|
|
1473
|
+
* @param maybePromise it might be a promise!
|
|
1474
|
+
* @returns whether it is or not
|
|
1475
|
+
*/
|
|
1476
|
+
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
|
1477
|
+
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
|
1478
|
+
/**
|
|
1479
|
+
* Update a component given reference to its host elements and so on.
|
|
1480
|
+
*
|
|
1481
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1482
|
+
* VDom nodes, and other metadata
|
|
1483
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1484
|
+
* rendered
|
|
1485
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1486
|
+
* the first render cycle
|
|
1487
|
+
*/
|
|
1291
1488
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1292
|
-
|
|
1489
|
+
var _a;
|
|
1293
1490
|
const elm = hostRef.$hostElement$;
|
|
1294
1491
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
1295
1492
|
const rc = elm['s-rc'];
|
|
@@ -1299,7 +1496,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1299
1496
|
}
|
|
1300
1497
|
const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
1301
1498
|
{
|
|
1302
|
-
callRender(hostRef, instance);
|
|
1499
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
1303
1500
|
}
|
|
1304
1501
|
if (rc) {
|
|
1305
1502
|
// ok, so turns out there are some child host elements
|
|
@@ -1311,7 +1508,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1311
1508
|
endRender();
|
|
1312
1509
|
endUpdate();
|
|
1313
1510
|
{
|
|
1314
|
-
const childrenPromises = elm['s-p'];
|
|
1511
|
+
const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
|
|
1315
1512
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
1316
1513
|
if (childrenPromises.length === 0) {
|
|
1317
1514
|
postUpdate();
|
|
@@ -1323,7 +1520,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1323
1520
|
}
|
|
1324
1521
|
}
|
|
1325
1522
|
};
|
|
1326
|
-
|
|
1523
|
+
/**
|
|
1524
|
+
* Handle making the call to the VDom renderer with the proper context given
|
|
1525
|
+
* various build variables
|
|
1526
|
+
*
|
|
1527
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1528
|
+
* VDom nodes, and other metadata
|
|
1529
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1530
|
+
* rendered
|
|
1531
|
+
* @param elm the Host element for the component
|
|
1532
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1533
|
+
* @returns an empty promise
|
|
1534
|
+
*/
|
|
1535
|
+
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1327
1536
|
try {
|
|
1328
1537
|
instance = instance.render && instance.render();
|
|
1329
1538
|
{
|
|
@@ -1338,7 +1547,7 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1338
1547
|
// or we need to update the css class/attrs on the host element
|
|
1339
1548
|
// DOM WRITE!
|
|
1340
1549
|
{
|
|
1341
|
-
renderVdom(hostRef, instance);
|
|
1550
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
1342
1551
|
}
|
|
1343
1552
|
}
|
|
1344
1553
|
}
|
|
@@ -1418,9 +1627,6 @@ const safeCall = (instance, method, arg) => {
|
|
|
1418
1627
|
}
|
|
1419
1628
|
return undefined;
|
|
1420
1629
|
};
|
|
1421
|
-
const then = (promise, thenFn) => {
|
|
1422
|
-
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1423
|
-
};
|
|
1424
1630
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1425
1631
|
;
|
|
1426
1632
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
@@ -1477,6 +1683,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1477
1683
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1478
1684
|
*/
|
|
1479
1685
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1686
|
+
var _a;
|
|
1480
1687
|
if (cmpMeta.$members$) {
|
|
1481
1688
|
if (Cstr.watchers) {
|
|
1482
1689
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
@@ -1514,7 +1721,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1514
1721
|
});
|
|
1515
1722
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1516
1723
|
const attrNameToPropName = new Map();
|
|
1517
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1724
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1518
1725
|
plt.jmp(() => {
|
|
1519
1726
|
const propName = attrNameToPropName.get(attrName);
|
|
1520
1727
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -1537,12 +1744,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1537
1744
|
// customElements.define('my-component', MyComponent);
|
|
1538
1745
|
// </script>
|
|
1539
1746
|
// ```
|
|
1540
|
-
// In this case if we do not
|
|
1747
|
+
// In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1541
1748
|
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1542
1749
|
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1543
|
-
// the connectedCallback attempts to
|
|
1750
|
+
// the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
|
|
1544
1751
|
//
|
|
1545
|
-
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/
|
|
1752
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
|
|
1546
1753
|
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1547
1754
|
//
|
|
1548
1755
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
@@ -1562,21 +1769,49 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1562
1769
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1563
1770
|
return;
|
|
1564
1771
|
}
|
|
1772
|
+
else if (propName == null) {
|
|
1773
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1774
|
+
// on a vanilla web component
|
|
1775
|
+
const hostRef = getHostRef(this);
|
|
1776
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1777
|
+
// We only want to trigger the callback(s) if:
|
|
1778
|
+
// 1. The instance is ready
|
|
1779
|
+
// 2. The watchers are ready
|
|
1780
|
+
// 3. The value has changed
|
|
1781
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1782
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1783
|
+
newValue !== oldValue) {
|
|
1784
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1785
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
1786
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1787
|
+
if (instance[callbackName] != null) {
|
|
1788
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1789
|
+
}
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1565
1794
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1566
1795
|
});
|
|
1567
1796
|
};
|
|
1568
|
-
//
|
|
1569
|
-
//
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1797
|
+
// Create an array of attributes to observe
|
|
1798
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1799
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1800
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1801
|
+
// an invalid attribute.
|
|
1802
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1803
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1804
|
+
...members
|
|
1805
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1806
|
+
.map(([propName, m]) => {
|
|
1807
|
+
const attrName = m[1] || propName;
|
|
1808
|
+
attrNameToPropName.set(attrName, propName);
|
|
1809
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1810
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1811
|
+
}
|
|
1812
|
+
return attrName;
|
|
1813
|
+
}),
|
|
1814
|
+
]));
|
|
1580
1815
|
}
|
|
1581
1816
|
}
|
|
1582
1817
|
return Cstr;
|
|
@@ -1584,9 +1819,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1584
1819
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1585
1820
|
// initializeComponent
|
|
1586
1821
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1822
|
+
// Let the runtime know that the component has been initialized
|
|
1823
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1587
1824
|
{
|
|
1588
|
-
// we haven't initialized this element yet
|
|
1589
|
-
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1590
1825
|
// lazy loaded components
|
|
1591
1826
|
// request the component's implementation to be
|
|
1592
1827
|
// wired up with the host element
|
|
@@ -1659,6 +1894,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1659
1894
|
schedule();
|
|
1660
1895
|
}
|
|
1661
1896
|
};
|
|
1897
|
+
const fireConnectedCallback = (instance) => {
|
|
1898
|
+
};
|
|
1662
1899
|
const connectedCallback = (elm) => {
|
|
1663
1900
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1664
1901
|
const hostRef = getHostRef(elm);
|
|
@@ -1672,7 +1909,8 @@ const connectedCallback = (elm) => {
|
|
|
1672
1909
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1673
1910
|
// in here to act as original content anchors as we move nodes around
|
|
1674
1911
|
// host element has been connected to the DOM
|
|
1675
|
-
if ((
|
|
1912
|
+
if ((// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
1913
|
+
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1676
1914
|
setContentReference(elm);
|
|
1677
1915
|
}
|
|
1678
1916
|
}
|
|
@@ -1711,6 +1949,11 @@ const connectedCallback = (elm) => {
|
|
|
1711
1949
|
// reattach any event listeners to the host
|
|
1712
1950
|
// since they would have been removed when disconnected
|
|
1713
1951
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1952
|
+
// fire off connectedCallback() on component instance
|
|
1953
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
|
|
1954
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
1955
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
|
1956
|
+
}
|
|
1714
1957
|
}
|
|
1715
1958
|
endConnected();
|
|
1716
1959
|
}
|
|
@@ -1726,18 +1969,25 @@ const setContentReference = (elm) => {
|
|
|
1726
1969
|
contentRefElm['s-cn'] = true;
|
|
1727
1970
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1728
1971
|
};
|
|
1729
|
-
const
|
|
1972
|
+
const disconnectInstance = (instance) => {
|
|
1973
|
+
{
|
|
1974
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1975
|
+
}
|
|
1976
|
+
};
|
|
1977
|
+
const disconnectedCallback = async (elm) => {
|
|
1730
1978
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1731
1979
|
const hostRef = getHostRef(elm);
|
|
1732
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
1733
1980
|
{
|
|
1734
1981
|
if (hostRef.$rmListeners$) {
|
|
1735
1982
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1736
1983
|
hostRef.$rmListeners$ = undefined;
|
|
1737
1984
|
}
|
|
1738
1985
|
}
|
|
1739
|
-
{
|
|
1740
|
-
|
|
1986
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
|
|
1987
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1988
|
+
}
|
|
1989
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
1990
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1741
1991
|
}
|
|
1742
1992
|
}
|
|
1743
1993
|
};
|
|
@@ -1757,6 +2007,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1757
2007
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1758
2008
|
lazyBundles.map((lazyBundle) => {
|
|
1759
2009
|
lazyBundle[1].map((compactMeta) => {
|
|
2010
|
+
var _a;
|
|
1760
2011
|
const cmpMeta = {
|
|
1761
2012
|
$flags$: compactMeta[0],
|
|
1762
2013
|
$tagName$: compactMeta[1],
|
|
@@ -1773,7 +2024,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1773
2024
|
cmpMeta.$attrsToReflect$ = [];
|
|
1774
2025
|
}
|
|
1775
2026
|
{
|
|
1776
|
-
cmpMeta.$watchers$ = {};
|
|
2027
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
1777
2028
|
}
|
|
1778
2029
|
const tagName = cmpMeta.$tagName$;
|
|
1779
2030
|
const HostElement = class extends HTMLElement {
|
|
@@ -1997,3 +2248,5 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1997
2248
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1998
2249
|
|
|
1999
2250
|
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2251
|
+
|
|
2252
|
+
//# sourceMappingURL=index-ce01e63b.js.map
|