@watermarkinsights/ripple 5.16.0-alpha.0 → 5.16.0-alpha.10
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/app-globals-C-IAhycr.js +7 -0
- package/dist/cjs/{chartFunctions-439c6fd4.js → chartFunctions-C8PCmGmn.js} +2 -3
- package/dist/cjs/{functions-dd27bda3.js → functions-DfuY5Jtp.js} +74 -79
- package/dist/cjs/{index-788526f5.js → index-DwhNqnaT.js} +777 -410
- package/dist/cjs/{intl-6d72b4a0.js → intl-Bl-0Yn5n.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -5
- package/dist/cjs/priv-calendar.cjs.entry.js +6 -12
- package/dist/cjs/priv-chart-popover.cjs.entry.js +4 -8
- package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -6
- package/dist/cjs/priv-navigator-item.cjs.entry.js +3 -6
- package/dist/cjs/priv-option-list.cjs.entry.js +10 -16
- package/dist/cjs/ripple.cjs.js +7 -7
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +11 -20
- package/dist/cjs/wm-button.cjs.entry.js +9 -17
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -8
- package/dist/cjs/wm-chart.cjs.entry.js +14 -18
- package/dist/cjs/wm-date-range.cjs.entry.js +10 -15
- package/dist/cjs/wm-datepicker.cjs.entry.js +18 -17
- package/dist/cjs/wm-file-list.cjs.entry.js +3 -6
- package/dist/cjs/wm-file.cjs.entry.js +6 -16
- package/dist/cjs/wm-flyout.cjs.entry.js +6 -17
- package/dist/cjs/wm-input.cjs.entry.js +13 -19
- package/dist/cjs/wm-line-chart.cjs.entry.js +18 -28
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +12 -18
- package/dist/cjs/wm-modal_3.cjs.entry.js +12 -19
- package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -22
- package/dist/cjs/wm-navigator.cjs.entry.js +17 -15
- package/dist/cjs/wm-nested-select.cjs.entry.js +21 -20
- package/dist/cjs/wm-optgroup.cjs.entry.js +3 -7
- package/dist/cjs/wm-option_2.cjs.entry.js +19 -20
- package/dist/cjs/wm-pagination.cjs.entry.js +11 -14
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +10 -27
- package/dist/cjs/wm-search.cjs.entry.js +27 -11
- package/dist/cjs/wm-snackbar.cjs.entry.js +10 -12
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +23 -19
- package/dist/cjs/wm-tag-input.cjs.entry.js +80 -31
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -8
- package/dist/cjs/wm-textarea.cjs.entry.js +13 -14
- package/dist/cjs/wm-timepicker.cjs.entry.js +18 -17
- package/dist/cjs/wm-toggletip.cjs.entry.js +9 -14
- package/dist/cjs/wm-uploader.cjs.entry.js +18 -22
- package/dist/cjs/wm-wrapper.cjs.entry.js +1 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +8 -4
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +15 -12
- package/dist/collection/components/charts/wm-chart/wm-chart.js +45 -22
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +52 -33
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +23 -16
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +9 -6
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +15 -12
- package/dist/collection/components/datepickers/datepicker.css +15 -40
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +21 -12
- package/dist/collection/components/datepickers/wm-date-range.js +39 -19
- package/dist/collection/components/datepickers/wm-datepicker.js +39 -19
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +27 -16
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +15 -9
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +56 -26
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +12 -5
- package/dist/collection/components/selects/wm-option/wm-option.js +15 -6
- package/dist/collection/components/selects/wm-select/wm-select.css +15 -9
- package/dist/collection/components/selects/wm-select/wm-select.js +50 -22
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +25 -16
- package/dist/collection/components/wm-button/wm-button.js +44 -23
- package/dist/collection/components/wm-file/wm-file.js +30 -19
- package/dist/collection/components/wm-file-list/wm-file-list.js +4 -2
- package/dist/collection/components/wm-flyout/wm-flyout.js +32 -20
- package/dist/collection/components/wm-input/wm-input.css +15 -9
- package/dist/collection/components/wm-input/wm-input.js +63 -30
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -31
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +11 -5
- package/dist/collection/components/wm-modal/wm-modal-footer.js +16 -6
- package/dist/collection/components/wm-modal/wm-modal-header.js +7 -3
- package/dist/collection/components/wm-modal/wm-modal.css +1 -1
- package/dist/collection/components/wm-modal/wm-modal.js +15 -9
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +16 -6
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +7 -3
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +16 -9
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +6 -5
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +10 -9
- package/dist/collection/components/wm-navigation/wm-navigation.js +6 -4
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -31
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +7 -3
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +10 -4
- package/dist/collection/components/wm-navigator/wm-navigator.js +34 -15
- package/dist/collection/components/wm-pagination/wm-pagination.css +0 -31
- package/dist/collection/components/wm-pagination/wm-pagination.js +22 -12
- package/dist/collection/components/wm-search/wm-search.css +0 -31
- package/dist/collection/components/wm-search/wm-search.js +47 -12
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +0 -31
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +9 -6
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +19 -7
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +10 -7
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +13 -3
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +26 -17
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +117 -37
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +18 -10
- package/dist/collection/components/wm-textarea/wm-textarea.css +15 -9
- package/dist/collection/components/wm-textarea/wm-textarea.js +42 -18
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +15 -40
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +36 -18
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +21 -13
- package/dist/collection/components/wm-uploader/wm-uploader.css +21 -41
- package/dist/collection/components/wm-uploader/wm-uploader.js +47 -26
- package/dist/collection/global/intl.js +2 -2
- package/dist/esm/app-globals-CrcR41XQ.js +5 -0
- package/dist/esm/{chartFunctions-6749593d.js → chartFunctions-BocRhQ0T.js} +3 -4
- package/dist/esm/{functions-dabfd76f.js → functions-B9BrPorY.js} +75 -80
- package/dist/esm/{index-130e07bb.js → index-C20glyTb.js} +774 -406
- package/dist/esm/{intl-43676e71.js → intl-D-bH9lQF.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-calendar.entry.js +6 -10
- package/dist/esm/priv-chart-popover.entry.js +4 -6
- package/dist/esm/priv-navigator-button.entry.js +3 -4
- package/dist/esm/priv-navigator-item.entry.js +3 -4
- package/dist/esm/priv-option-list.entry.js +10 -14
- package/dist/esm/ripple.js +6 -5
- package/dist/esm/wm-action-menu_2.entry.js +11 -18
- package/dist/esm/wm-button.entry.js +9 -15
- package/dist/esm/wm-chart-slice.entry.js +1 -6
- package/dist/esm/wm-chart.entry.js +14 -16
- package/dist/esm/wm-date-range.entry.js +10 -13
- package/dist/esm/wm-datepicker.entry.js +18 -15
- package/dist/esm/wm-file-list.entry.js +3 -4
- package/dist/esm/wm-file.entry.js +6 -14
- package/dist/esm/wm-flyout.entry.js +6 -15
- package/dist/esm/wm-input.entry.js +13 -17
- package/dist/esm/wm-line-chart.entry.js +18 -26
- package/dist/esm/wm-modal-pss_3.entry.js +12 -16
- package/dist/esm/wm-modal_3.entry.js +12 -17
- package/dist/esm/wm-navigation_3.entry.js +13 -20
- package/dist/esm/wm-navigator.entry.js +17 -13
- package/dist/esm/wm-nested-select.entry.js +21 -18
- package/dist/esm/wm-optgroup.entry.js +3 -5
- package/dist/esm/wm-option_2.entry.js +19 -18
- package/dist/esm/wm-pagination.entry.js +11 -12
- package/dist/esm/wm-progress-indicator_3.entry.js +10 -25
- package/dist/esm/wm-search.entry.js +27 -9
- package/dist/esm/wm-snackbar.entry.js +10 -10
- package/dist/esm/wm-tab-item_3.entry.js +23 -17
- package/dist/esm/wm-tag-input.entry.js +80 -29
- package/dist/esm/wm-tag-option.entry.js +2 -6
- package/dist/esm/wm-textarea.entry.js +13 -12
- package/dist/esm/wm-timepicker.entry.js +18 -15
- package/dist/esm/wm-toggletip.entry.js +9 -12
- package/dist/esm/wm-uploader.entry.js +18 -20
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/app-globals-CrcR41XQ.js +1 -0
- package/dist/esm-es5/chartFunctions-BocRhQ0T.js +1 -0
- package/dist/esm-es5/functions-B9BrPorY.js +1 -0
- package/dist/esm-es5/index-C20glyTb.js +1 -0
- package/dist/esm-es5/{intl-43676e71.js → intl-D-bH9lQF.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/priv-option-list.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-flyout.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
- package/dist/esm-es5/wm-modal_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-nested-select.entry.js +1 -1
- package/dist/esm-es5/wm-optgroup.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/ripple/p-03e28e65.system.entry.js +1 -0
- package/dist/ripple/{p-f3df715f.entry.js → p-0616bd1c.entry.js} +1 -1
- package/dist/ripple/p-088a84b6.entry.js +1 -0
- package/dist/ripple/p-09116c34.entry.js +1 -0
- package/dist/ripple/{p-59591401.entry.js → p-0a9f8d0d.entry.js} +1 -1
- package/dist/ripple/{p-97ffaa7d.entry.js → p-1a96dc5e.entry.js} +1 -1
- package/dist/ripple/{p-b01f9572.system.entry.js → p-1b8f9ff1.system.entry.js} +1 -1
- package/dist/ripple/p-21728198.entry.js +1 -0
- package/dist/ripple/p-25227bec.entry.js +1 -0
- package/dist/ripple/p-264fb4fc.entry.js +1 -0
- package/dist/ripple/{p-61f9987d.system.entry.js → p-27c1933e.system.entry.js} +1 -1
- package/dist/ripple/p-27de107e.entry.js +1 -0
- package/dist/ripple/p-338835e6.entry.js +1 -0
- package/dist/ripple/p-3678e285.entry.js +1 -0
- package/dist/ripple/p-384f6dc8.entry.js +1 -0
- package/dist/ripple/{p-a5fb4171.system.entry.js → p-3fa20b7a.entry.js} +1 -1
- package/dist/ripple/{p-74f103dd.entry.js → p-476e2913.entry.js} +1 -1
- package/dist/ripple/{p-c699aec8.system.entry.js → p-4a50f797.system.entry.js} +1 -1
- package/dist/ripple/p-5026b7e8.entry.js +1 -0
- package/dist/ripple/{p-9b2281e2.system.entry.js → p-5166de03.system.entry.js} +1 -1
- package/dist/ripple/{p-bc4976e6.entry.js → p-5827cae3.system.entry.js} +1 -1
- package/dist/ripple/{p-65c8ef31.system.entry.js → p-59f7cfd7.system.entry.js} +1 -1
- package/dist/ripple/{p-b23c6351.system.entry.js → p-5a728ced.system.entry.js} +1 -1
- package/dist/ripple/p-5c8e802a.system.entry.js +1 -0
- package/dist/ripple/{p-cd0cc88d.entry.js → p-5cc5b46b.entry.js} +1 -1
- package/dist/ripple/{p-2f7ca1a7.system.entry.js → p-6c66e270.entry.js} +1 -1
- package/dist/ripple/p-6ffa9bfc.entry.js +1 -0
- package/dist/ripple/{p-043901ab.system.entry.js → p-70cdc5ce.system.entry.js} +1 -1
- package/dist/ripple/p-719b7087.system.entry.js +1 -0
- package/dist/ripple/{p-fe93b6b9.system.entry.js → p-734d06dc.system.entry.js} +1 -1
- package/dist/ripple/{p-4fb4deb9.entry.js → p-757b04eb.entry.js} +1 -1
- package/dist/ripple/{p-0bb576c5.system.entry.js → p-7ea000d6.system.entry.js} +1 -1
- package/dist/ripple/{p-30236be3.system.entry.js → p-81783193.system.entry.js} +1 -1
- package/dist/ripple/{p-36fd8aed.system.entry.js → p-82a66121.system.entry.js} +1 -1
- package/dist/ripple/p-85afd9bf.system.entry.js +1 -0
- package/dist/ripple/p-8eWf5O5Z.system.js +1 -0
- package/dist/ripple/p-90d11417.system.entry.js +1 -0
- package/dist/ripple/p-979cd9f4.entry.js +1 -0
- package/dist/ripple/p-B0uE_ID-.system.js +2 -0
- package/dist/ripple/p-B9BrPorY.js +1 -0
- package/dist/ripple/p-BOTV28v8.system.js +1 -0
- package/dist/ripple/{p-ba399879.system.js → p-BVUnLeDz.system.js} +1 -1
- package/dist/ripple/p-Bboe1S7O.js +1 -0
- package/dist/ripple/p-C20glyTb.js +2 -0
- package/dist/ripple/p-CKTNcFzW.system.js +1 -0
- package/dist/ripple/{p-49a347e1.js → p-DAuKYO5n.js} +1 -1
- package/dist/ripple/p-D_issjBT.system.js +1 -0
- package/dist/ripple/p-a1cd3c29.entry.js +1 -0
- package/dist/ripple/p-a634e9f5.entry.js +1 -0
- package/dist/ripple/p-b0653ac3.entry.js +1 -0
- package/dist/ripple/{p-89479d02.system.entry.js → p-b140b04d.system.entry.js} +1 -1
- package/dist/ripple/p-b2433a3c.system.entry.js +1 -0
- package/dist/ripple/{p-091fbc50.system.entry.js → p-b2604e2b.system.entry.js} +1 -1
- package/dist/ripple/{p-72ed488e.system.entry.js → p-b593e93c.system.entry.js} +1 -1
- package/dist/ripple/{p-9328023c.entry.js → p-c164a1cb.entry.js} +1 -1
- package/dist/ripple/p-c344e3c0.entry.js +1 -0
- package/dist/ripple/{p-1955c66a.system.entry.js → p-caef27f1.system.entry.js} +1 -1
- package/dist/ripple/{p-f8995a5e.system.entry.js → p-cf3defe6.system.entry.js} +1 -1
- package/dist/ripple/{p-4c2a044d.system.entry.js → p-d11e4c6e.system.entry.js} +1 -1
- package/dist/ripple/{p-c7d71181.system.entry.js → p-d17bf683.system.entry.js} +1 -1
- package/dist/ripple/{p-fe71ec64.system.entry.js → p-d1ea5d4c.system.entry.js} +1 -1
- package/dist/ripple/{p-c53f5914.entry.js → p-d293be99.system.entry.js} +1 -1
- package/dist/ripple/p-d3bc9393.entry.js +1 -0
- package/dist/ripple/{p-4e6b0a6e.system.entry.js → p-d3d5306c.system.entry.js} +1 -1
- package/dist/ripple/p-d5232e7d.entry.js +1 -0
- package/dist/ripple/{p-6a082957.entry.js → p-d61938ca.entry.js} +1 -1
- package/dist/ripple/p-dECFx5ly.js +1 -0
- package/dist/ripple/p-dc3e43aa.entry.js +1 -0
- package/dist/ripple/{p-57c25b63.entry.js → p-dca6cfbd.entry.js} +1 -1
- package/dist/ripple/{p-f9fa1506.system.entry.js → p-de4c51e2.system.entry.js} +1 -1
- package/dist/ripple/{p-8ec2e944.system.entry.js → p-e2e2929f.system.entry.js} +1 -1
- package/dist/ripple/p-e63b30bd.system.entry.js +1 -0
- package/dist/ripple/{p-2823d02b.system.entry.js → p-e6e4e23a.system.entry.js} +1 -1
- package/dist/ripple/p-e9b67596.entry.js +1 -0
- package/dist/ripple/p-ebd318c6.entry.js +1 -0
- package/dist/ripple/p-ee0e88ed.entry.js +1 -0
- package/dist/ripple/{p-92a50b38.system.entry.js → p-ef56fc5a.system.entry.js} +1 -1
- package/dist/ripple/{p-12d6ab73.system.entry.js → p-f878d184.system.entry.js} +1 -1
- package/dist/ripple/{p-c4896784.system.entry.js → p-fb4367a8.system.entry.js} +1 -1
- package/dist/ripple/p-fc35bcf9.entry.js +1 -0
- package/dist/ripple/p-ffd7de48.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/datepickers/wm-datepicker.d.ts +1 -0
- package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +1 -0
- package/dist/types/components/selects/wm-select/wm-select.d.ts +1 -0
- package/dist/types/components/wm-input/wm-input.d.ts +1 -0
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +3 -0
- package/dist/types/components/wm-textarea/wm-textarea.d.ts +1 -0
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +1 -0
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +1 -0
- package/dist/types/components.d.ts +986 -0
- package/dist/types/stencil-public-runtime.d.ts +37 -2
- package/package.json +2 -2
- package/dist/cjs/app-globals-ff5fd9b0.js +0 -92
- package/dist/esm/app-globals-c63b9640.js +0 -90
- package/dist/esm-es5/app-globals-c63b9640.js +0 -1
- package/dist/esm-es5/chartFunctions-6749593d.js +0 -1
- package/dist/esm-es5/functions-dabfd76f.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/loader/package.json +0 -11
- package/dist/ripple/p-0189929d.entry.js +0 -1
- package/dist/ripple/p-0c89b82c.entry.js +0 -1
- package/dist/ripple/p-1396ff75.entry.js +0 -1
- package/dist/ripple/p-13b1d775.entry.js +0 -1
- package/dist/ripple/p-144ce232.entry.js +0 -1
- package/dist/ripple/p-1497ccfc.entry.js +0 -1
- package/dist/ripple/p-1a3037aa.entry.js +0 -1
- package/dist/ripple/p-22b55b6f.entry.js +0 -1
- package/dist/ripple/p-257d2d5c.entry.js +0 -1
- package/dist/ripple/p-30201dc9.entry.js +0 -1
- package/dist/ripple/p-36d2b888.entry.js +0 -1
- package/dist/ripple/p-3f98056c.js +0 -1
- package/dist/ripple/p-41120a33.system.js +0 -1
- package/dist/ripple/p-492aa9fe.system.entry.js +0 -1
- package/dist/ripple/p-4a29bb8c.entry.js +0 -1
- package/dist/ripple/p-4cebf2d7.entry.js +0 -1
- package/dist/ripple/p-56d54fe6.system.entry.js +0 -1
- package/dist/ripple/p-5cff41e0.entry.js +0 -1
- package/dist/ripple/p-5ef786db.system.entry.js +0 -1
- package/dist/ripple/p-6a03a172.entry.js +0 -1
- package/dist/ripple/p-6d12cfb7.system.entry.js +0 -1
- package/dist/ripple/p-81ce2697.entry.js +0 -1
- package/dist/ripple/p-823d7b4e.system.entry.js +0 -1
- package/dist/ripple/p-89316785.system.js +0 -1
- package/dist/ripple/p-8a569d3b.entry.js +0 -1
- package/dist/ripple/p-8f987f71.entry.js +0 -1
- package/dist/ripple/p-92cb12d3.entry.js +0 -1
- package/dist/ripple/p-94f776eb.entry.js +0 -1
- package/dist/ripple/p-a05f29f0.system.js +0 -1
- package/dist/ripple/p-a2c8937d.js +0 -1
- package/dist/ripple/p-b34552b0.system.entry.js +0 -1
- package/dist/ripple/p-b39ab477.entry.js +0 -1
- package/dist/ripple/p-bb9f6920.entry.js +0 -1
- package/dist/ripple/p-bd48c50a.entry.js +0 -1
- package/dist/ripple/p-c31e1379.entry.js +0 -1
- package/dist/ripple/p-c879e152.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d333d851.system.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-fd6a59f5.system.js +0 -1
- /package/dist/cjs/{interfaces-85d78ae9.js → interfaces-C7YbtGnk.js} +0 -0
- /package/dist/esm/{interfaces-cc5b177f.js → interfaces-COwzv5zO.js} +0 -0
- /package/dist/esm-es5/{interfaces-cc5b177f.js → interfaces-COwzv5zO.js} +0 -0
- /package/dist/ripple/{p-2732bddd.js → p-COwzv5zO.js} +0 -0
- /package/dist/ripple/{p-42fa7a77.system.js → p-ClUp3GkF.system.js} +0 -0
- /package/dist/ripple/{p-50ea2036.system.js → p-YWpyar7R.system.js} +0 -0
|
@@ -1,17 +1,115 @@
|
|
|
1
1
|
const NAMESPACE = 'ripple';
|
|
2
|
-
const BUILD = /* ripple */ {
|
|
2
|
+
const BUILD = /* ripple */ { hydratedSelectorName: "hydrated", lazyLoad: true, slotRelocation: true, updatable: true};
|
|
3
|
+
|
|
4
|
+
const version = "5.16.0-alpha.10";
|
|
5
|
+
|
|
6
|
+
// PRINT RIPPLE VERSION IN CONSOLE
|
|
7
|
+
// test envs return 0 for plugin.length
|
|
8
|
+
// do not print version number there as it causes issues
|
|
9
|
+
if (window.navigator.plugins.length > 0) {
|
|
10
|
+
console.log("%cRipple component library %c%s", "color: #575195; font-weight: bold", "font-weight: bold", version);
|
|
11
|
+
}
|
|
12
|
+
// Dispatching events to track whether user is navigating with keyboard or mouse
|
|
13
|
+
// no longer necessary for keyboard focus indicators (thanks to :focus-visible)
|
|
14
|
+
// but still used in several components for other things (search for isTabbing)
|
|
15
|
+
function wmComponentKeys(ev) {
|
|
16
|
+
if (ev.key == "Tab") {
|
|
17
|
+
var event = new Event("wmUserIsTabbing");
|
|
18
|
+
window.dispatchEvent(event);
|
|
19
|
+
document.querySelector("body").classList.add("wmcl-user-is-tabbing");
|
|
20
|
+
}
|
|
21
|
+
if (ev.key == "ArrowLeft" || ev.key == "ArrowUp" || ev.key == "ArrowRight" || ev.key == "ArrowDown") {
|
|
22
|
+
var event = new Event("wmUserIsKeying");
|
|
23
|
+
window.dispatchEvent(event);
|
|
24
|
+
document.querySelector("body").classList.add("wmcl-user-is-keying");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function wmComponentMouseDownOnce() {
|
|
28
|
+
var event = new Event("wmUserIsNotTabbing");
|
|
29
|
+
window.dispatchEvent(event);
|
|
30
|
+
document.querySelector("body").classList.remove("wmcl-user-is-tabbing");
|
|
31
|
+
document.querySelector("body").classList.remove("wmcl-user-is-keying");
|
|
32
|
+
}
|
|
33
|
+
window.addEventListener("keydown", wmComponentKeys);
|
|
34
|
+
window.addEventListener("mousedown", wmComponentMouseDownOnce);
|
|
35
|
+
// TOOLTIP
|
|
36
|
+
// Add a tooltip element
|
|
37
|
+
// This allows tooltips to be always at the highest stacking context (always on top)
|
|
38
|
+
// Element is added withing a container to avoid performance impact
|
|
39
|
+
const tooltipContainer = document.createElement("div");
|
|
40
|
+
tooltipContainer.id = "wm-tooltip-container";
|
|
41
|
+
const tooltipEl = document.createElement("div");
|
|
42
|
+
tooltipEl.id = "wm-tooltip";
|
|
43
|
+
tooltipEl.classList.add("wm-tooltip");
|
|
44
|
+
tooltipEl.setAttribute("popover", "manual");
|
|
45
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
46
|
+
const tooltipStyles = document.createElement("style");
|
|
47
|
+
tooltipStyles.textContent = `
|
|
48
|
+
.wm-tooltip {
|
|
49
|
+
position: fixed;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
line-height: normal;
|
|
53
|
+
font-family: inherit;
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
text-transform: none;
|
|
56
|
+
font-weight: normal;
|
|
57
|
+
background: var(--wmcolor-tooltip-background);
|
|
58
|
+
color: var(--wmcolor-tooltip-text);
|
|
59
|
+
z-index: 999999;
|
|
60
|
+
max-width: var(--wmTooltipMaxWidth, 13.75rem);
|
|
61
|
+
margin-right: 1.5rem;
|
|
62
|
+
padding: 0.375rem;
|
|
63
|
+
transition-property: opacity;
|
|
64
|
+
transition-delay: 0s;
|
|
65
|
+
opacity: 0;
|
|
66
|
+
inset: unset;
|
|
67
|
+
top: 0;
|
|
68
|
+
left: 0;
|
|
69
|
+
transform: translateZ(0);
|
|
70
|
+
will-change: transform;
|
|
71
|
+
transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));
|
|
72
|
+
border: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.wm-tooltip:popover-open {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.wm-tooltip.show {
|
|
80
|
+
transition-delay: 500ms;
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
document.head.appendChild(tooltipStyles);
|
|
85
|
+
tooltipContainer.appendChild(tooltipEl);
|
|
86
|
+
document.querySelector("body").appendChild(tooltipContainer);
|
|
87
|
+
const globalFn = () => { };
|
|
3
88
|
|
|
4
89
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
90
|
+
Stencil Client Platform v4.36.2 | MIT Licensed | https://stenciljs.com
|
|
6
91
|
*/
|
|
7
92
|
var __defProp = Object.defineProperty;
|
|
8
93
|
var __export = (target, all) => {
|
|
9
94
|
for (var name in all)
|
|
10
95
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
96
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
97
|
+
|
|
98
|
+
// src/utils/constants.ts
|
|
99
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
100
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
101
|
+
|
|
102
|
+
// src/client/client-host-ref.ts
|
|
103
|
+
var getHostRef = (ref) => {
|
|
104
|
+
if (ref.__stencil__getHostRef) {
|
|
105
|
+
return ref.__stencil__getHostRef();
|
|
106
|
+
}
|
|
107
|
+
return void 0;
|
|
108
|
+
};
|
|
109
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
110
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
111
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
112
|
+
};
|
|
15
113
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
114
|
const hostRef = {
|
|
17
115
|
$flags$: 0,
|
|
@@ -27,7 +125,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
27
125
|
hostElement["s-p"] = [];
|
|
28
126
|
hostElement["s-rc"] = [];
|
|
29
127
|
}
|
|
30
|
-
|
|
128
|
+
const ref = hostRef;
|
|
129
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
130
|
+
return ref;
|
|
31
131
|
};
|
|
32
132
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
33
133
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -52,6 +152,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
52
152
|
}
|
|
53
153
|
switch(bundleId) {
|
|
54
154
|
|
|
155
|
+
case 'wm-tag-option':
|
|
156
|
+
return import(
|
|
157
|
+
/* webpackMode: "lazy" */
|
|
158
|
+
'./wm-tag-option.entry.js').then(processMod, consoleError);
|
|
159
|
+
case 'wm-wrapper':
|
|
160
|
+
return import(
|
|
161
|
+
/* webpackMode: "lazy" */
|
|
162
|
+
'./wm-wrapper.entry.js').then(processMod, consoleError);
|
|
163
|
+
case 'wm-chart-slice':
|
|
164
|
+
return import(
|
|
165
|
+
/* webpackMode: "lazy" */
|
|
166
|
+
'./wm-chart-slice.entry.js').then(processMod, consoleError);
|
|
55
167
|
case 'wm-button':
|
|
56
168
|
return import(
|
|
57
169
|
/* webpackMode: "lazy" */
|
|
@@ -80,10 +192,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
80
192
|
return import(
|
|
81
193
|
/* webpackMode: "lazy" */
|
|
82
194
|
'./wm-input.entry.js').then(processMod, consoleError);
|
|
83
|
-
case 'wm-navigator':
|
|
84
|
-
return import(
|
|
85
|
-
/* webpackMode: "lazy" */
|
|
86
|
-
'./wm-navigator.entry.js').then(processMod, consoleError);
|
|
87
195
|
case 'wm-pagination':
|
|
88
196
|
return import(
|
|
89
197
|
/* webpackMode: "lazy" */
|
|
@@ -108,10 +216,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
108
216
|
return import(
|
|
109
217
|
/* webpackMode: "lazy" */
|
|
110
218
|
'./wm-tag-input.entry.js').then(processMod, consoleError);
|
|
111
|
-
case 'wm-tag-option':
|
|
112
|
-
return import(
|
|
113
|
-
/* webpackMode: "lazy" */
|
|
114
|
-
'./wm-tag-option.entry.js').then(processMod, consoleError);
|
|
115
219
|
case 'wm-textarea':
|
|
116
220
|
return import(
|
|
117
221
|
/* webpackMode: "lazy" */
|
|
@@ -120,42 +224,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
120
224
|
return import(
|
|
121
225
|
/* webpackMode: "lazy" */
|
|
122
226
|
'./wm-uploader.entry.js').then(processMod, consoleError);
|
|
123
|
-
case 'wm-wrapper':
|
|
124
|
-
return import(
|
|
125
|
-
/* webpackMode: "lazy" */
|
|
126
|
-
'./wm-wrapper.entry.js').then(processMod, consoleError);
|
|
127
|
-
case 'wm-action-menu_2':
|
|
128
|
-
return import(
|
|
129
|
-
/* webpackMode: "lazy" */
|
|
130
|
-
'./wm-action-menu_2.entry.js').then(processMod, consoleError);
|
|
131
|
-
case 'wm-option_2':
|
|
132
|
-
return import(
|
|
133
|
-
/* webpackMode: "lazy" */
|
|
134
|
-
'./wm-option_2.entry.js').then(processMod, consoleError);
|
|
135
|
-
case 'wm-modal_3':
|
|
136
|
-
return import(
|
|
137
|
-
/* webpackMode: "lazy" */
|
|
138
|
-
'./wm-modal_3.entry.js').then(processMod, consoleError);
|
|
139
|
-
case 'wm-modal-pss_3':
|
|
140
|
-
return import(
|
|
141
|
-
/* webpackMode: "lazy" */
|
|
142
|
-
'./wm-modal-pss_3.entry.js').then(processMod, consoleError);
|
|
143
|
-
case 'wm-navigation_3':
|
|
144
|
-
return import(
|
|
145
|
-
/* webpackMode: "lazy" */
|
|
146
|
-
'./wm-navigation_3.entry.js').then(processMod, consoleError);
|
|
147
|
-
case 'wm-progress-indicator_3':
|
|
148
|
-
return import(
|
|
149
|
-
/* webpackMode: "lazy" */
|
|
150
|
-
'./wm-progress-indicator_3.entry.js').then(processMod, consoleError);
|
|
151
|
-
case 'wm-tab-item_3':
|
|
152
|
-
return import(
|
|
153
|
-
/* webpackMode: "lazy" */
|
|
154
|
-
'./wm-tab-item_3.entry.js').then(processMod, consoleError);
|
|
155
|
-
case 'wm-chart-slice':
|
|
156
|
-
return import(
|
|
157
|
-
/* webpackMode: "lazy" */
|
|
158
|
-
'./wm-chart-slice.entry.js').then(processMod, consoleError);
|
|
159
227
|
case 'wm-date-range':
|
|
160
228
|
return import(
|
|
161
229
|
/* webpackMode: "lazy" */
|
|
@@ -192,6 +260,38 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
192
260
|
return import(
|
|
193
261
|
/* webpackMode: "lazy" */
|
|
194
262
|
'./priv-option-list.entry.js').then(processMod, consoleError);
|
|
263
|
+
case 'wm-navigator':
|
|
264
|
+
return import(
|
|
265
|
+
/* webpackMode: "lazy" */
|
|
266
|
+
'./wm-navigator.entry.js').then(processMod, consoleError);
|
|
267
|
+
case 'wm-action-menu_2':
|
|
268
|
+
return import(
|
|
269
|
+
/* webpackMode: "lazy" */
|
|
270
|
+
'./wm-action-menu_2.entry.js').then(processMod, consoleError);
|
|
271
|
+
case 'wm-option_2':
|
|
272
|
+
return import(
|
|
273
|
+
/* webpackMode: "lazy" */
|
|
274
|
+
'./wm-option_2.entry.js').then(processMod, consoleError);
|
|
275
|
+
case 'wm-progress-indicator_3':
|
|
276
|
+
return import(
|
|
277
|
+
/* webpackMode: "lazy" */
|
|
278
|
+
'./wm-progress-indicator_3.entry.js').then(processMod, consoleError);
|
|
279
|
+
case 'wm-modal_3':
|
|
280
|
+
return import(
|
|
281
|
+
/* webpackMode: "lazy" */
|
|
282
|
+
'./wm-modal_3.entry.js').then(processMod, consoleError);
|
|
283
|
+
case 'wm-modal-pss_3':
|
|
284
|
+
return import(
|
|
285
|
+
/* webpackMode: "lazy" */
|
|
286
|
+
'./wm-modal-pss_3.entry.js').then(processMod, consoleError);
|
|
287
|
+
case 'wm-navigation_3':
|
|
288
|
+
return import(
|
|
289
|
+
/* webpackMode: "lazy" */
|
|
290
|
+
'./wm-navigation_3.entry.js').then(processMod, consoleError);
|
|
291
|
+
case 'wm-tab-item_3':
|
|
292
|
+
return import(
|
|
293
|
+
/* webpackMode: "lazy" */
|
|
294
|
+
'./wm-tab-item_3.entry.js').then(processMod, consoleError);
|
|
195
295
|
}
|
|
196
296
|
}
|
|
197
297
|
return import(
|
|
@@ -200,12 +300,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
200
300
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
201
301
|
/* webpackMode: "lazy" */
|
|
202
302
|
`./${bundleId}.entry.js${""}`
|
|
203
|
-
).then(
|
|
204
|
-
{
|
|
205
|
-
|
|
303
|
+
).then(
|
|
304
|
+
(importedModule) => {
|
|
305
|
+
{
|
|
306
|
+
cmpModules.set(bundleId, importedModule);
|
|
307
|
+
}
|
|
308
|
+
return importedModule[exportName];
|
|
309
|
+
},
|
|
310
|
+
(e) => {
|
|
311
|
+
consoleError(e, hostRef.$hostElement$);
|
|
206
312
|
}
|
|
207
|
-
|
|
208
|
-
}, consoleError);
|
|
313
|
+
);
|
|
209
314
|
};
|
|
210
315
|
|
|
211
316
|
// src/client/client-style.ts
|
|
@@ -214,7 +319,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
|
214
319
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
215
320
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
216
321
|
var win = typeof window !== "undefined" ? window : {};
|
|
217
|
-
var doc = win.document || { head: {} };
|
|
218
322
|
var plt = {
|
|
219
323
|
$flags$: 0,
|
|
220
324
|
$resourcesUrl$: "",
|
|
@@ -225,9 +329,10 @@ var plt = {
|
|
|
225
329
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
226
330
|
};
|
|
227
331
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
332
|
+
var _a;
|
|
228
333
|
let supportsListenerOptions2 = false;
|
|
229
334
|
try {
|
|
230
|
-
|
|
335
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
231
336
|
"e",
|
|
232
337
|
null,
|
|
233
338
|
Object.defineProperty({}, "passive", {
|
|
@@ -249,6 +354,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
|
249
354
|
}
|
|
250
355
|
return false;
|
|
251
356
|
})() ;
|
|
357
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
252
358
|
var queuePending = false;
|
|
253
359
|
var queueDomReads = [];
|
|
254
360
|
var queueDomWrites = [];
|
|
@@ -284,25 +390,22 @@ var flush = () => {
|
|
|
284
390
|
};
|
|
285
391
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
286
392
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
287
|
-
|
|
288
|
-
// src/utils/constants.ts
|
|
289
|
-
var EMPTY_OBJ = {};
|
|
290
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
291
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
292
|
-
|
|
293
|
-
// src/utils/helpers.ts
|
|
294
|
-
var isDef = (v) => v != null;
|
|
295
393
|
var isComplexType = (o) => {
|
|
296
394
|
o = typeof o;
|
|
297
395
|
return o === "object" || o === "function";
|
|
298
396
|
};
|
|
299
397
|
|
|
300
398
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
301
|
-
function queryNonceMetaTagContent(
|
|
399
|
+
function queryNonceMetaTagContent(doc) {
|
|
302
400
|
var _a, _b, _c;
|
|
303
|
-
return (_c = (_b = (_a =
|
|
401
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
304
402
|
}
|
|
305
403
|
|
|
404
|
+
// src/utils/regular-expression.ts
|
|
405
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
406
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
407
|
+
};
|
|
408
|
+
|
|
306
409
|
// src/utils/result.ts
|
|
307
410
|
var result_exports = {};
|
|
308
411
|
__export(result_exports, {
|
|
@@ -351,6 +454,135 @@ var unwrapErr = (result) => {
|
|
|
351
454
|
throw result.value;
|
|
352
455
|
}
|
|
353
456
|
};
|
|
457
|
+
|
|
458
|
+
// src/utils/style.ts
|
|
459
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
460
|
+
return void 0;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
// src/utils/shadow-root.ts
|
|
464
|
+
var globalStyleSheet;
|
|
465
|
+
function createShadowRoot(cmpMeta) {
|
|
466
|
+
var _a;
|
|
467
|
+
const shadowRoot = this.attachShadow({
|
|
468
|
+
mode: "open",
|
|
469
|
+
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
470
|
+
}) ;
|
|
471
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
|
472
|
+
if (globalStyleSheet) {
|
|
473
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
474
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
475
|
+
} else {
|
|
476
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
481
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
482
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
483
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
484
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
485
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
486
|
+
slotNode.hidden = true;
|
|
487
|
+
} else {
|
|
488
|
+
slotNode.hidden = false;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
let i2 = 0;
|
|
494
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
495
|
+
const childNode = childNodes[i2];
|
|
496
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
497
|
+
updateFallbackSlotVisibility(childNode);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
502
|
+
const result = [];
|
|
503
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
504
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
505
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
506
|
+
result.push(slottedNode);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
return result;
|
|
510
|
+
};
|
|
511
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
512
|
+
let i2 = 0;
|
|
513
|
+
let slottedNodes = [];
|
|
514
|
+
let childNode;
|
|
515
|
+
for (; i2 < childNodes.length; i2++) {
|
|
516
|
+
childNode = childNodes[i2];
|
|
517
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
518
|
+
slottedNodes.push(childNode);
|
|
519
|
+
}
|
|
520
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
521
|
+
}
|
|
522
|
+
return slottedNodes;
|
|
523
|
+
}
|
|
524
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
525
|
+
const childNodes = [];
|
|
526
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
527
|
+
let node = slot;
|
|
528
|
+
while (node = node.nextSibling) {
|
|
529
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
530
|
+
}
|
|
531
|
+
return childNodes;
|
|
532
|
+
};
|
|
533
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
534
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
535
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
536
|
+
return true;
|
|
537
|
+
}
|
|
538
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
539
|
+
return true;
|
|
540
|
+
}
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
544
|
+
return true;
|
|
545
|
+
}
|
|
546
|
+
return slotName === "";
|
|
547
|
+
};
|
|
548
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
549
|
+
function patchSlotNode(node) {
|
|
550
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
551
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
552
|
+
const toReturn = [];
|
|
553
|
+
const slotName = this["s-sn"];
|
|
554
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
555
|
+
console.error(`
|
|
556
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
557
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
558
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
559
|
+
`);
|
|
560
|
+
}
|
|
561
|
+
const parent = this["s-cr"].parentElement;
|
|
562
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
563
|
+
slottedNodes.forEach((n) => {
|
|
564
|
+
if (slotName === getSlotName(n)) {
|
|
565
|
+
toReturn.push(n);
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
if (elementsOnly) {
|
|
569
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
570
|
+
}
|
|
571
|
+
return toReturn;
|
|
572
|
+
}).bind(node);
|
|
573
|
+
node.assignedElements = assignedFactory(true);
|
|
574
|
+
node.assignedNodes = assignedFactory(false);
|
|
575
|
+
}
|
|
576
|
+
function internalCall(node, method) {
|
|
577
|
+
if ("__" + method in node) {
|
|
578
|
+
const toReturn = node["__" + method];
|
|
579
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
580
|
+
return toReturn.bind(node);
|
|
581
|
+
} else {
|
|
582
|
+
if (typeof node[method] !== "function") return node[method];
|
|
583
|
+
return node[method].bind(node);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
354
586
|
var createTime = (fnName, tagName = "") => {
|
|
355
587
|
{
|
|
356
588
|
return () => {
|
|
@@ -365,6 +597,110 @@ var uniqueTime = (key, measureText) => {
|
|
|
365
597
|
};
|
|
366
598
|
}
|
|
367
599
|
};
|
|
600
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
601
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
602
|
+
let style = styles.get(scopeId2);
|
|
603
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
604
|
+
style = style || new CSSStyleSheet();
|
|
605
|
+
if (typeof style === "string") {
|
|
606
|
+
style = cssText;
|
|
607
|
+
} else {
|
|
608
|
+
style.replaceSync(cssText);
|
|
609
|
+
}
|
|
610
|
+
} else {
|
|
611
|
+
style = cssText;
|
|
612
|
+
}
|
|
613
|
+
styles.set(scopeId2, style);
|
|
614
|
+
};
|
|
615
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
616
|
+
var _a;
|
|
617
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
618
|
+
const style = styles.get(scopeId2);
|
|
619
|
+
if (!win.document) {
|
|
620
|
+
return scopeId2;
|
|
621
|
+
}
|
|
622
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
623
|
+
if (style) {
|
|
624
|
+
if (typeof style === "string") {
|
|
625
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
626
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
627
|
+
let styleElm;
|
|
628
|
+
if (!appliedStyles) {
|
|
629
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
630
|
+
}
|
|
631
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
632
|
+
{
|
|
633
|
+
styleElm = win.document.createElement("style");
|
|
634
|
+
styleElm.innerHTML = style;
|
|
635
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
636
|
+
if (nonce != null) {
|
|
637
|
+
styleElm.setAttribute("nonce", nonce);
|
|
638
|
+
}
|
|
639
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
640
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
641
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
642
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
643
|
+
styleContainerNode.insertBefore(
|
|
644
|
+
styleElm,
|
|
645
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
646
|
+
);
|
|
647
|
+
} else if ("host" in styleContainerNode) {
|
|
648
|
+
if (supportsConstructableStylesheets) {
|
|
649
|
+
const stylesheet = new CSSStyleSheet();
|
|
650
|
+
stylesheet.replaceSync(style);
|
|
651
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
652
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
653
|
+
} else {
|
|
654
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
655
|
+
}
|
|
656
|
+
} else {
|
|
657
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
658
|
+
if (existingStyleContainer) {
|
|
659
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
660
|
+
} else {
|
|
661
|
+
styleContainerNode.prepend(styleElm);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
} else {
|
|
665
|
+
styleContainerNode.append(styleElm);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
669
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
673
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
674
|
+
}
|
|
675
|
+
if (appliedStyles) {
|
|
676
|
+
appliedStyles.add(scopeId2);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
680
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
681
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
|
682
|
+
} else {
|
|
683
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
return scopeId2;
|
|
688
|
+
};
|
|
689
|
+
var attachStyles = (hostRef) => {
|
|
690
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
691
|
+
const elm = hostRef.$hostElement$;
|
|
692
|
+
const flags = cmpMeta.$flags$;
|
|
693
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
694
|
+
const scopeId2 = addStyle(
|
|
695
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
696
|
+
cmpMeta);
|
|
697
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
698
|
+
elm["s-sc"] = scopeId2;
|
|
699
|
+
elm.classList.add(scopeId2 + "-h");
|
|
700
|
+
}
|
|
701
|
+
endAttachStyles();
|
|
702
|
+
};
|
|
703
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
368
704
|
var h = (nodeName, vnodeData, ...children) => {
|
|
369
705
|
let child = null;
|
|
370
706
|
let key = null;
|
|
@@ -476,13 +812,33 @@ var convertToPrivate = (node) => {
|
|
|
476
812
|
vnode.$name$ = node.vname;
|
|
477
813
|
return vnode;
|
|
478
814
|
};
|
|
479
|
-
var
|
|
815
|
+
var createSupportsRuleRe = (selector) => {
|
|
816
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
817
|
+
return new RegExp(
|
|
818
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
819
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
820
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
821
|
+
"g"
|
|
822
|
+
);
|
|
823
|
+
};
|
|
824
|
+
createSupportsRuleRe("::slotted");
|
|
825
|
+
createSupportsRuleRe(":host");
|
|
826
|
+
createSupportsRuleRe(":host-context");
|
|
827
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
828
|
+
if (typeof propValue === "string" && (propType & 16 /* Unknown */ || propType & 8 /* Any */) && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
829
|
+
try {
|
|
830
|
+
return JSON.parse(propValue);
|
|
831
|
+
} catch (e) {
|
|
832
|
+
}
|
|
833
|
+
}
|
|
480
834
|
if (propValue != null && !isComplexType(propValue)) {
|
|
481
835
|
if (propType & 4 /* Boolean */) {
|
|
482
|
-
|
|
836
|
+
{
|
|
837
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
838
|
+
}
|
|
483
839
|
}
|
|
484
840
|
if (propType & 2 /* Number */) {
|
|
485
|
-
return parseFloat(propValue);
|
|
841
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
486
842
|
}
|
|
487
843
|
if (propType & 1 /* String */) {
|
|
488
844
|
return String(propValue);
|
|
@@ -491,7 +847,10 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
491
847
|
}
|
|
492
848
|
return propValue;
|
|
493
849
|
};
|
|
494
|
-
var getElement = (ref) =>
|
|
850
|
+
var getElement = (ref) => {
|
|
851
|
+
var _a;
|
|
852
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
|
|
853
|
+
};
|
|
495
854
|
|
|
496
855
|
// src/runtime/event-emitter.ts
|
|
497
856
|
var createEvent = (ref, name, flags) => {
|
|
@@ -512,204 +871,148 @@ var emitEvent = (elm, name, opts) => {
|
|
|
512
871
|
elm.dispatchEvent(ev);
|
|
513
872
|
return ev;
|
|
514
873
|
};
|
|
515
|
-
var
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
519
|
-
style = style || new CSSStyleSheet();
|
|
520
|
-
if (typeof style === "string") {
|
|
521
|
-
style = cssText;
|
|
522
|
-
} else {
|
|
523
|
-
style.replaceSync(cssText);
|
|
524
|
-
}
|
|
525
|
-
} else {
|
|
526
|
-
style = cssText;
|
|
527
|
-
}
|
|
528
|
-
styles.set(scopeId2, style);
|
|
529
|
-
};
|
|
530
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
531
|
-
var _a;
|
|
532
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
533
|
-
const style = styles.get(scopeId2);
|
|
534
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
535
|
-
if (style) {
|
|
536
|
-
if (typeof style === "string") {
|
|
537
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
538
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
539
|
-
let styleElm;
|
|
540
|
-
if (!appliedStyles) {
|
|
541
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
542
|
-
}
|
|
543
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
544
|
-
{
|
|
545
|
-
styleElm = doc.createElement("style");
|
|
546
|
-
styleElm.innerHTML = style;
|
|
547
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
548
|
-
if (nonce != null) {
|
|
549
|
-
styleElm.setAttribute("nonce", nonce);
|
|
550
|
-
}
|
|
551
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
552
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
553
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
554
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
|
|
555
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
556
|
-
} else if ("host" in styleContainerNode) {
|
|
557
|
-
styleContainerNode.prepend(styleElm);
|
|
558
|
-
} else {
|
|
559
|
-
styleContainerNode.append(styleElm);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
563
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
567
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
568
|
-
}
|
|
569
|
-
if (appliedStyles) {
|
|
570
|
-
appliedStyles.add(scopeId2);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
574
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
return scopeId2;
|
|
578
|
-
};
|
|
579
|
-
var attachStyles = (hostRef) => {
|
|
580
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
581
|
-
const elm = hostRef.$hostElement$;
|
|
582
|
-
const flags = cmpMeta.$flags$;
|
|
583
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
584
|
-
const scopeId2 = addStyle(
|
|
585
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
586
|
-
cmpMeta);
|
|
587
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
588
|
-
elm["s-sc"] = scopeId2;
|
|
589
|
-
elm.classList.add(scopeId2 + "-h");
|
|
874
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
875
|
+
if (oldValue === newValue) {
|
|
876
|
+
return;
|
|
590
877
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
let
|
|
597
|
-
|
|
598
|
-
if (memberName === "class") {
|
|
599
|
-
const classList = elm.classList;
|
|
600
|
-
const oldClasses = parseClassList(oldValue);
|
|
601
|
-
const newClasses = parseClassList(newValue);
|
|
878
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
879
|
+
let ln = memberName.toLowerCase();
|
|
880
|
+
if (memberName === "class") {
|
|
881
|
+
const classList = elm.classList;
|
|
882
|
+
const oldClasses = parseClassList(oldValue);
|
|
883
|
+
let newClasses = parseClassList(newValue);
|
|
884
|
+
{
|
|
602
885
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
603
886
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
elm.style.removeProperty(prop);
|
|
610
|
-
} else {
|
|
611
|
-
elm.style[prop] = "";
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
for (const prop in newValue) {
|
|
617
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
887
|
+
}
|
|
888
|
+
} else if (memberName === "style") {
|
|
889
|
+
{
|
|
890
|
+
for (const prop in oldValue) {
|
|
891
|
+
if (!newValue || newValue[prop] == null) {
|
|
618
892
|
if (prop.includes("-")) {
|
|
619
|
-
elm.style.
|
|
893
|
+
elm.style.removeProperty(prop);
|
|
620
894
|
} else {
|
|
621
|
-
elm.style[prop] =
|
|
895
|
+
elm.style[prop] = "";
|
|
622
896
|
}
|
|
623
897
|
}
|
|
624
898
|
}
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
} else if (isMemberInElement(win, ln)) {
|
|
633
|
-
memberName = ln.slice(2);
|
|
634
|
-
} else {
|
|
635
|
-
memberName = ln[2] + memberName.slice(3);
|
|
636
|
-
}
|
|
637
|
-
if (oldValue || newValue) {
|
|
638
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
639
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
640
|
-
if (oldValue) {
|
|
641
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
642
|
-
}
|
|
643
|
-
if (newValue) {
|
|
644
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
899
|
+
}
|
|
900
|
+
for (const prop in newValue) {
|
|
901
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
902
|
+
if (prop.includes("-")) {
|
|
903
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
904
|
+
} else {
|
|
905
|
+
elm.style[prop] = newValue[prop];
|
|
645
906
|
}
|
|
646
907
|
}
|
|
908
|
+
}
|
|
909
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
910
|
+
if (newValue) {
|
|
911
|
+
newValue(elm);
|
|
912
|
+
}
|
|
913
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
914
|
+
if (memberName[2] === "-") {
|
|
915
|
+
memberName = memberName.slice(3);
|
|
916
|
+
} else if (isMemberInElement(win, ln)) {
|
|
917
|
+
memberName = ln.slice(2);
|
|
647
918
|
} else {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
919
|
+
memberName = ln[2] + memberName.slice(3);
|
|
920
|
+
}
|
|
921
|
+
if (oldValue || newValue) {
|
|
922
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
923
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
924
|
+
if (oldValue) {
|
|
925
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
926
|
+
}
|
|
927
|
+
if (newValue) {
|
|
928
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
} else {
|
|
932
|
+
const isComplex = isComplexType(newValue);
|
|
933
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
934
|
+
try {
|
|
935
|
+
if (!elm.tagName.includes("-")) {
|
|
936
|
+
const n = newValue == null ? "" : newValue;
|
|
937
|
+
if (memberName === "list") {
|
|
938
|
+
isProp = false;
|
|
939
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
940
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
941
|
+
elm[memberName] = n;
|
|
942
|
+
} else {
|
|
943
|
+
elm.setAttribute(memberName, n);
|
|
661
944
|
}
|
|
662
|
-
} else {
|
|
663
|
-
elm[memberName] = newValue;
|
|
664
945
|
}
|
|
665
|
-
}
|
|
946
|
+
} else if (elm[memberName] !== newValue) {
|
|
947
|
+
elm[memberName] = newValue;
|
|
666
948
|
}
|
|
949
|
+
} catch (e) {
|
|
667
950
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
951
|
+
}
|
|
952
|
+
let xlink = false;
|
|
953
|
+
{
|
|
954
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
955
|
+
memberName = ln;
|
|
956
|
+
xlink = true;
|
|
674
957
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
679
|
-
} else {
|
|
680
|
-
elm.removeAttribute(memberName);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
684
|
-
newValue = newValue === true ? "" : newValue;
|
|
958
|
+
}
|
|
959
|
+
if (newValue == null || newValue === false) {
|
|
960
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
685
961
|
if (xlink) {
|
|
686
|
-
elm.
|
|
962
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
687
963
|
} else {
|
|
688
|
-
elm.
|
|
964
|
+
elm.removeAttribute(memberName);
|
|
689
965
|
}
|
|
690
966
|
}
|
|
967
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
968
|
+
newValue = newValue === true ? "" : newValue;
|
|
969
|
+
if (xlink) {
|
|
970
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
971
|
+
} else {
|
|
972
|
+
elm.setAttribute(memberName, newValue);
|
|
973
|
+
}
|
|
691
974
|
}
|
|
692
975
|
}
|
|
693
976
|
};
|
|
694
977
|
var parseClassListRegex = /\s/;
|
|
695
|
-
var parseClassList = (value) =>
|
|
978
|
+
var parseClassList = (value) => {
|
|
979
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
980
|
+
value = value.baseVal;
|
|
981
|
+
}
|
|
982
|
+
if (!value || typeof value !== "string") {
|
|
983
|
+
return [];
|
|
984
|
+
}
|
|
985
|
+
return value.split(parseClassListRegex);
|
|
986
|
+
};
|
|
696
987
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
697
988
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
698
989
|
|
|
699
990
|
// src/runtime/vdom/update-element.ts
|
|
700
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
991
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
701
992
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
702
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
703
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
993
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
994
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
704
995
|
{
|
|
705
996
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
706
997
|
if (!(memberName in newVnodeAttrs)) {
|
|
707
|
-
setAccessor(
|
|
998
|
+
setAccessor(
|
|
999
|
+
elm,
|
|
1000
|
+
memberName,
|
|
1001
|
+
oldVnodeAttrs[memberName],
|
|
1002
|
+
void 0,
|
|
1003
|
+
isSvgMode2,
|
|
1004
|
+
newVnode.$flags$);
|
|
708
1005
|
}
|
|
709
1006
|
}
|
|
710
1007
|
}
|
|
711
1008
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
712
|
-
setAccessor(
|
|
1009
|
+
setAccessor(
|
|
1010
|
+
elm,
|
|
1011
|
+
memberName,
|
|
1012
|
+
oldVnodeAttrs[memberName],
|
|
1013
|
+
newVnodeAttrs[memberName],
|
|
1014
|
+
isSvgMode2,
|
|
1015
|
+
newVnode.$flags$);
|
|
713
1016
|
}
|
|
714
1017
|
};
|
|
715
1018
|
function sortedAttrNames(attrNames) {
|
|
@@ -721,16 +1024,13 @@ function sortedAttrNames(attrNames) {
|
|
|
721
1024
|
attrNames
|
|
722
1025
|
);
|
|
723
1026
|
}
|
|
724
|
-
|
|
725
|
-
// src/runtime/vdom/vdom-render.ts
|
|
726
|
-
var scopeId;
|
|
727
1027
|
var contentRef;
|
|
728
1028
|
var hostTagName;
|
|
729
1029
|
var useNativeShadowDom = false;
|
|
730
1030
|
var checkSlotFallbackVisibility = false;
|
|
731
1031
|
var checkSlotRelocate = false;
|
|
732
1032
|
var isSvgMode = false;
|
|
733
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
1033
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
734
1034
|
var _a;
|
|
735
1035
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
736
1036
|
let i2 = 0;
|
|
@@ -740,9 +1040,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
740
1040
|
if (!useNativeShadowDom) {
|
|
741
1041
|
checkSlotRelocate = true;
|
|
742
1042
|
if (newVNode2.$tag$ === "slot") {
|
|
743
|
-
if (scopeId) {
|
|
744
|
-
parentElm.classList.add(scopeId + "-s");
|
|
745
|
-
}
|
|
746
1043
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
747
1044
|
// slot element has fallback content
|
|
748
1045
|
// still create an element that "mocks" the slot element
|
|
@@ -756,14 +1053,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
756
1053
|
}
|
|
757
1054
|
}
|
|
758
1055
|
if (newVNode2.$text$ !== null) {
|
|
759
|
-
elm = newVNode2.$elm$ =
|
|
1056
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
760
1057
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
761
|
-
elm = newVNode2.$elm$ =
|
|
1058
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1059
|
+
{
|
|
1060
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1061
|
+
}
|
|
762
1062
|
} else {
|
|
763
1063
|
if (!isSvgMode) {
|
|
764
1064
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
765
1065
|
}
|
|
766
|
-
|
|
1066
|
+
if (!win.document) {
|
|
1067
|
+
throw new Error(
|
|
1068
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
1069
|
+
);
|
|
1070
|
+
}
|
|
1071
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
767
1072
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
768
1073
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
769
1074
|
) ;
|
|
@@ -773,14 +1078,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
773
1078
|
{
|
|
774
1079
|
updateElement(null, newVNode2, isSvgMode);
|
|
775
1080
|
}
|
|
776
|
-
const rootNode = elm.getRootNode();
|
|
777
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
778
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
779
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
780
|
-
}
|
|
781
1081
|
if (newVNode2.$children$) {
|
|
782
1082
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
783
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
1083
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
784
1084
|
if (childNode) {
|
|
785
1085
|
elm.appendChild(childNode);
|
|
786
1086
|
}
|
|
@@ -801,6 +1101,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
801
1101
|
elm["s-cr"] = contentRef;
|
|
802
1102
|
elm["s-sn"] = newVNode2.$name$ || "";
|
|
803
1103
|
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1104
|
+
patchSlotNode(elm);
|
|
804
1105
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
805
1106
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
806
1107
|
{
|
|
@@ -813,19 +1114,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
813
1114
|
};
|
|
814
1115
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
815
1116
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
816
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
817
|
-
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
818
|
-
let node = parentElm;
|
|
819
|
-
while (node = node.nextSibling) {
|
|
820
|
-
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
821
|
-
oldSlotChildNodes.push(node);
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
1117
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
825
1118
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
826
1119
|
const childNode = oldSlotChildNodes[i2];
|
|
827
1120
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
828
|
-
insertBefore(
|
|
1121
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
829
1122
|
childNode["s-ol"].remove();
|
|
830
1123
|
childNode["s-ol"] = void 0;
|
|
831
1124
|
childNode["s-sh"] = void 0;
|
|
@@ -835,7 +1128,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
835
1128
|
putBackInOriginalLocation(childNode, recursive);
|
|
836
1129
|
}
|
|
837
1130
|
}
|
|
838
|
-
plt.$flags$ &=
|
|
1131
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
839
1132
|
};
|
|
840
1133
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
841
1134
|
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
@@ -845,7 +1138,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
845
1138
|
}
|
|
846
1139
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
847
1140
|
if (vnodes[startIdx]) {
|
|
848
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
1141
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
849
1142
|
if (childNode) {
|
|
850
1143
|
vnodes[startIdx].$elm$ = childNode;
|
|
851
1144
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -932,7 +1225,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
932
1225
|
if (idxInOld >= 0) {
|
|
933
1226
|
elmToMove = oldCh[idxInOld];
|
|
934
1227
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
935
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
1228
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
936
1229
|
} else {
|
|
937
1230
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
938
1231
|
oldCh[idxInOld] = void 0;
|
|
@@ -940,12 +1233,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
940
1233
|
}
|
|
941
1234
|
newStartVnode = newCh[++newStartIdx];
|
|
942
1235
|
} else {
|
|
943
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
1236
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
944
1237
|
newStartVnode = newCh[++newStartIdx];
|
|
945
1238
|
}
|
|
946
1239
|
if (node) {
|
|
947
1240
|
{
|
|
948
|
-
insertBefore(
|
|
1241
|
+
insertBefore(
|
|
1242
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
1243
|
+
node,
|
|
1244
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1245
|
+
);
|
|
949
1246
|
}
|
|
950
1247
|
}
|
|
951
1248
|
}
|
|
@@ -966,28 +1263,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
966
1263
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
967
1264
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
968
1265
|
if (leftVNode.$tag$ === "slot") {
|
|
969
|
-
if (
|
|
970
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
971
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
972
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
973
|
-
// hydration comments to be removed
|
|
974
|
-
leftVNode.$elm$.nodeType !== 8
|
|
975
|
-
) {
|
|
976
|
-
return false;
|
|
977
|
-
}
|
|
978
1266
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
979
1267
|
}
|
|
980
1268
|
if (!isInitialRender) {
|
|
981
1269
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
982
1270
|
}
|
|
1271
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1272
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1273
|
+
}
|
|
983
1274
|
return true;
|
|
984
1275
|
}
|
|
985
1276
|
return false;
|
|
986
1277
|
};
|
|
987
|
-
var referenceNode = (node) =>
|
|
988
|
-
return node && node["s-ol"] || node;
|
|
989
|
-
};
|
|
990
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
1278
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
991
1279
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
992
1280
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
993
1281
|
const oldChildren = oldVNode.$children$;
|
|
@@ -1000,9 +1288,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1000
1288
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1001
1289
|
}
|
|
1002
1290
|
{
|
|
1003
|
-
|
|
1004
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1005
|
-
}
|
|
1291
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1006
1292
|
}
|
|
1007
1293
|
if (oldChildren !== null && newChildren !== null) {
|
|
1008
1294
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -1016,7 +1302,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1016
1302
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1017
1303
|
) {
|
|
1018
1304
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1019
|
-
}
|
|
1305
|
+
} else ;
|
|
1020
1306
|
if (isSvgMode && tag === "svg") {
|
|
1021
1307
|
isSvgMode = false;
|
|
1022
1308
|
}
|
|
@@ -1026,45 +1312,19 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1026
1312
|
elm.data = text;
|
|
1027
1313
|
}
|
|
1028
1314
|
};
|
|
1029
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
1030
|
-
const childNodes = elm.childNodes;
|
|
1031
|
-
for (const childNode of childNodes) {
|
|
1032
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1033
|
-
if (childNode["s-sr"]) {
|
|
1034
|
-
const slotName = childNode["s-sn"];
|
|
1035
|
-
childNode.hidden = false;
|
|
1036
|
-
for (const siblingNode of childNodes) {
|
|
1037
|
-
if (siblingNode !== childNode) {
|
|
1038
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
1039
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
1040
|
-
childNode.hidden = true;
|
|
1041
|
-
break;
|
|
1042
|
-
}
|
|
1043
|
-
} else {
|
|
1044
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
1045
|
-
childNode.hidden = true;
|
|
1046
|
-
break;
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
updateFallbackSlotVisibility(childNode);
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
};
|
|
1056
1315
|
var relocateNodes = [];
|
|
1057
1316
|
var markSlotContentForRelocation = (elm) => {
|
|
1058
1317
|
let node;
|
|
1059
1318
|
let hostContentNodes;
|
|
1060
1319
|
let j;
|
|
1061
|
-
|
|
1320
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1321
|
+
for (const childNode of children) {
|
|
1062
1322
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1063
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
1323
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1064
1324
|
const slotName = childNode["s-sn"];
|
|
1065
1325
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1066
1326
|
node = hostContentNodes[j];
|
|
1067
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (
|
|
1327
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
|
|
1068
1328
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1069
1329
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1070
1330
|
checkSlotFallbackVisibility = true;
|
|
@@ -1102,21 +1362,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1102
1362
|
}
|
|
1103
1363
|
}
|
|
1104
1364
|
};
|
|
1105
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1106
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1107
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1108
|
-
return true;
|
|
1109
|
-
}
|
|
1110
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
1111
|
-
return true;
|
|
1112
|
-
}
|
|
1113
|
-
return false;
|
|
1114
|
-
}
|
|
1115
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
1116
|
-
return true;
|
|
1117
|
-
}
|
|
1118
|
-
return slotName === "";
|
|
1119
|
-
};
|
|
1120
1365
|
var nullifyVNodeRefs = (vNode) => {
|
|
1121
1366
|
{
|
|
1122
1367
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1124,15 +1369,17 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1124
1369
|
}
|
|
1125
1370
|
};
|
|
1126
1371
|
var insertBefore = (parent, newNode, reference) => {
|
|
1127
|
-
|
|
1128
|
-
|
|
1372
|
+
{
|
|
1373
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1374
|
+
}
|
|
1129
1375
|
};
|
|
1130
1376
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1131
1377
|
var _a, _b, _c, _d;
|
|
1132
1378
|
const hostElm = hostRef.$hostElement$;
|
|
1133
1379
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1134
1380
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1135
|
-
const
|
|
1381
|
+
const isHostElement = isHost(renderFnResults);
|
|
1382
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
1136
1383
|
hostTagName = hostElm.tagName;
|
|
1137
1384
|
if (cmpMeta.$attrsToReflect$) {
|
|
1138
1385
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
@@ -1151,10 +1398,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1151
1398
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1152
1399
|
hostRef.$vnode$ = rootVnode;
|
|
1153
1400
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1154
|
-
|
|
1155
|
-
scopeId = hostElm["s-sc"];
|
|
1156
|
-
}
|
|
1157
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1401
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1158
1402
|
{
|
|
1159
1403
|
contentRef = hostElm["s-cr"];
|
|
1160
1404
|
checkSlotFallbackVisibility = false;
|
|
@@ -1166,8 +1410,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1166
1410
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1167
1411
|
for (const relocateData of relocateNodes) {
|
|
1168
1412
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1169
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
1170
|
-
const orgLocationNode =
|
|
1413
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1414
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1171
1415
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1172
1416
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1173
1417
|
}
|
|
@@ -1182,7 +1426,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1182
1426
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1183
1427
|
while (orgLocationNode) {
|
|
1184
1428
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1185
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1429
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1186
1430
|
refNode = refNode.nextSibling;
|
|
1187
1431
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1188
1432
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1195,18 +1439,20 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1195
1439
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1196
1440
|
}
|
|
1197
1441
|
}
|
|
1198
|
-
|
|
1442
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1443
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1444
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1199
1445
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1200
1446
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1201
1447
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1202
1448
|
}
|
|
1203
1449
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1204
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1450
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1205
1451
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1206
1452
|
}
|
|
1207
1453
|
}
|
|
1208
1454
|
}
|
|
1209
|
-
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](
|
|
1455
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1210
1456
|
} else {
|
|
1211
1457
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1212
1458
|
if (isInitialLoad) {
|
|
@@ -1220,7 +1466,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1220
1466
|
if (checkSlotFallbackVisibility) {
|
|
1221
1467
|
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1222
1468
|
}
|
|
1223
|
-
plt.$flags$ &=
|
|
1469
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1224
1470
|
relocateNodes.length = 0;
|
|
1225
1471
|
}
|
|
1226
1472
|
contentRef = void 0;
|
|
@@ -1229,7 +1475,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1229
1475
|
// src/runtime/update-component.ts
|
|
1230
1476
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1231
1477
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1232
|
-
ancestorComponent["s-p"].push(
|
|
1478
|
+
const index = ancestorComponent["s-p"].push(
|
|
1479
|
+
new Promise(
|
|
1480
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1481
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1482
|
+
r();
|
|
1483
|
+
}
|
|
1484
|
+
)
|
|
1485
|
+
);
|
|
1233
1486
|
}
|
|
1234
1487
|
};
|
|
1235
1488
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1242,6 +1495,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1242
1495
|
}
|
|
1243
1496
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1244
1497
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1498
|
+
if (isInitialLoad) {
|
|
1499
|
+
queueMicrotask(() => {
|
|
1500
|
+
dispatch();
|
|
1501
|
+
});
|
|
1502
|
+
return;
|
|
1503
|
+
}
|
|
1245
1504
|
return writeTask(dispatch) ;
|
|
1246
1505
|
};
|
|
1247
1506
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -1258,18 +1517,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1258
1517
|
{
|
|
1259
1518
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1260
1519
|
if (hostRef.$queuedListeners$) {
|
|
1261
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1520
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1262
1521
|
hostRef.$queuedListeners$ = void 0;
|
|
1263
1522
|
}
|
|
1264
1523
|
}
|
|
1265
|
-
|
|
1266
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1267
|
-
}
|
|
1524
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1268
1525
|
} else {
|
|
1269
|
-
|
|
1270
|
-
maybePromise = safeCall(instance, "componentWillUpdate");
|
|
1271
|
-
}
|
|
1526
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1272
1527
|
}
|
|
1528
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1273
1529
|
endSchedule();
|
|
1274
1530
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1275
1531
|
};
|
|
@@ -1312,7 +1568,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1312
1568
|
try {
|
|
1313
1569
|
instance = instance.render && instance.render();
|
|
1314
1570
|
{
|
|
1315
|
-
hostRef.$flags$ &=
|
|
1571
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
1316
1572
|
}
|
|
1317
1573
|
{
|
|
1318
1574
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -1335,17 +1591,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1335
1591
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1336
1592
|
const instance = hostRef.$lazyInstance$ ;
|
|
1337
1593
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1338
|
-
|
|
1339
|
-
safeCall(instance, "componentDidRender");
|
|
1340
|
-
}
|
|
1594
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1341
1595
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1342
1596
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1343
1597
|
{
|
|
1344
1598
|
addHydratedFlag(elm);
|
|
1345
1599
|
}
|
|
1346
|
-
|
|
1347
|
-
safeCall(instance, "componentDidLoad");
|
|
1348
|
-
}
|
|
1600
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1349
1601
|
endPostUpdate();
|
|
1350
1602
|
{
|
|
1351
1603
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1354,9 +1606,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1354
1606
|
}
|
|
1355
1607
|
}
|
|
1356
1608
|
} else {
|
|
1357
|
-
|
|
1358
|
-
safeCall(instance, "componentDidUpdate");
|
|
1359
|
-
}
|
|
1609
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1360
1610
|
endPostUpdate();
|
|
1361
1611
|
}
|
|
1362
1612
|
{
|
|
@@ -1370,13 +1620,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1370
1620
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1371
1621
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1372
1622
|
}
|
|
1373
|
-
hostRef.$flags$ &=
|
|
1623
|
+
hostRef.$flags$ &= -517;
|
|
1374
1624
|
}
|
|
1375
1625
|
};
|
|
1376
1626
|
var forceUpdate = (ref) => {
|
|
1627
|
+
var _a;
|
|
1377
1628
|
{
|
|
1378
1629
|
const hostRef = getHostRef(ref);
|
|
1379
|
-
const isConnected = hostRef.$hostElement
|
|
1630
|
+
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
|
1380
1631
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1381
1632
|
scheduleUpdate(hostRef, false);
|
|
1382
1633
|
}
|
|
@@ -1384,17 +1635,14 @@ var forceUpdate = (ref) => {
|
|
|
1384
1635
|
}
|
|
1385
1636
|
};
|
|
1386
1637
|
var appDidLoad = (who) => {
|
|
1387
|
-
{
|
|
1388
|
-
addHydratedFlag(doc.documentElement);
|
|
1389
|
-
}
|
|
1390
1638
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1391
1639
|
};
|
|
1392
|
-
var safeCall = (instance, method, arg) => {
|
|
1640
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1393
1641
|
if (instance && instance[method]) {
|
|
1394
1642
|
try {
|
|
1395
1643
|
return instance[method](arg);
|
|
1396
1644
|
} catch (e) {
|
|
1397
|
-
consoleError(e);
|
|
1645
|
+
consoleError(e, elm);
|
|
1398
1646
|
}
|
|
1399
1647
|
}
|
|
1400
1648
|
return void 0;
|
|
@@ -1408,16 +1656,21 @@ var addHydratedFlag = (elm) => {
|
|
|
1408
1656
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1409
1657
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1410
1658
|
const hostRef = getHostRef(ref);
|
|
1659
|
+
if (!hostRef) {
|
|
1660
|
+
return;
|
|
1661
|
+
}
|
|
1411
1662
|
if (!hostRef) {
|
|
1412
1663
|
throw new Error(
|
|
1413
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
1664
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
1414
1665
|
);
|
|
1415
1666
|
}
|
|
1416
1667
|
const elm = hostRef.$hostElement$ ;
|
|
1417
1668
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1418
1669
|
const flags = hostRef.$flags$;
|
|
1419
1670
|
const instance = hostRef.$lazyInstance$ ;
|
|
1420
|
-
newVal = parsePropertyValue(
|
|
1671
|
+
newVal = parsePropertyValue(
|
|
1672
|
+
newVal,
|
|
1673
|
+
cmpMeta.$members$[propName][0]);
|
|
1421
1674
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1422
1675
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1423
1676
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -1436,6 +1689,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1436
1689
|
}
|
|
1437
1690
|
}
|
|
1438
1691
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1692
|
+
if (instance.componentShouldUpdate) {
|
|
1693
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1439
1697
|
scheduleUpdate(hostRef, false);
|
|
1440
1698
|
}
|
|
1441
1699
|
}
|
|
@@ -1453,15 +1711,77 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1453
1711
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1454
1712
|
members.map(([memberName, [memberFlags]]) => {
|
|
1455
1713
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1714
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1715
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1716
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1717
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1718
|
+
Object.defineProperty(prototype, memberName, {
|
|
1719
|
+
get() {
|
|
1720
|
+
{
|
|
1721
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1722
|
+
return getValue(this, memberName);
|
|
1723
|
+
}
|
|
1724
|
+
const ref = getHostRef(this);
|
|
1725
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1726
|
+
if (!instance) return;
|
|
1727
|
+
return instance[memberName];
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
configurable: true,
|
|
1731
|
+
enumerable: true
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1456
1734
|
Object.defineProperty(prototype, memberName, {
|
|
1457
|
-
get() {
|
|
1458
|
-
return getValue(this, memberName);
|
|
1459
|
-
},
|
|
1460
1735
|
set(newValue) {
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1736
|
+
const ref = getHostRef(this);
|
|
1737
|
+
if (!ref) {
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
if (origSetter) {
|
|
1741
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1742
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1743
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1744
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1745
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1746
|
+
}
|
|
1747
|
+
origSetter.apply(this, [
|
|
1748
|
+
parsePropertyValue(
|
|
1749
|
+
newValue,
|
|
1750
|
+
memberFlags)
|
|
1751
|
+
]);
|
|
1752
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1753
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1754
|
+
return;
|
|
1755
|
+
}
|
|
1756
|
+
{
|
|
1757
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1758
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1759
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1760
|
+
ref.$onReadyPromise$.then(() => {
|
|
1761
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1762
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1766
|
+
return;
|
|
1767
|
+
}
|
|
1768
|
+
const setterSetVal = () => {
|
|
1769
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1770
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1771
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1772
|
+
}
|
|
1773
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1774
|
+
newValue,
|
|
1775
|
+
memberFlags);
|
|
1776
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1777
|
+
};
|
|
1778
|
+
if (ref.$lazyInstance$) {
|
|
1779
|
+
setterSetVal();
|
|
1780
|
+
} else {
|
|
1781
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1465
1785
|
});
|
|
1466
1786
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1467
1787
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -1482,7 +1802,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1482
1802
|
plt.jmp(() => {
|
|
1483
1803
|
var _a2;
|
|
1484
1804
|
const propName = attrNameToPropName.get(attrName);
|
|
1485
|
-
if (this.hasOwnProperty(propName)) {
|
|
1805
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1486
1806
|
newValue = this[propName];
|
|
1487
1807
|
delete this[propName];
|
|
1488
1808
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1491,7 +1811,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1491
1811
|
} else if (propName == null) {
|
|
1492
1812
|
const hostRef = getHostRef(this);
|
|
1493
1813
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1494
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1814
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1495
1815
|
const instance = hostRef.$lazyInstance$ ;
|
|
1496
1816
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
1497
1817
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
@@ -1502,7 +1822,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1502
1822
|
}
|
|
1503
1823
|
return;
|
|
1504
1824
|
}
|
|
1505
|
-
|
|
1825
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1826
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1827
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1828
|
+
this[propName] = newValue;
|
|
1829
|
+
}
|
|
1506
1830
|
});
|
|
1507
1831
|
};
|
|
1508
1832
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1531,7 +1855,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1531
1855
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1532
1856
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1533
1857
|
if (bundleId) {
|
|
1534
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1858
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1535
1859
|
if (CstrImport && "then" in CstrImport) {
|
|
1536
1860
|
const endLoad = uniqueTime();
|
|
1537
1861
|
Cstr = await CstrImport;
|
|
@@ -1556,15 +1880,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1556
1880
|
try {
|
|
1557
1881
|
new Cstr(hostRef);
|
|
1558
1882
|
} catch (e) {
|
|
1559
|
-
consoleError(e);
|
|
1883
|
+
consoleError(e, elm);
|
|
1560
1884
|
}
|
|
1561
1885
|
{
|
|
1562
|
-
hostRef.$flags$ &=
|
|
1886
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1563
1887
|
}
|
|
1564
1888
|
{
|
|
1565
1889
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1566
1890
|
}
|
|
1567
1891
|
endNewInstance();
|
|
1892
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1568
1893
|
} else {
|
|
1569
1894
|
Cstr = elm.constructor;
|
|
1570
1895
|
const cmpTag = elm.localName;
|
|
@@ -1591,13 +1916,19 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1591
1916
|
schedule();
|
|
1592
1917
|
}
|
|
1593
1918
|
};
|
|
1594
|
-
var fireConnectedCallback = (instance) => {
|
|
1919
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1920
|
+
{
|
|
1921
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1922
|
+
}
|
|
1595
1923
|
};
|
|
1596
1924
|
|
|
1597
1925
|
// src/runtime/connected-callback.ts
|
|
1598
1926
|
var connectedCallback = (elm) => {
|
|
1599
1927
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1600
1928
|
const hostRef = getHostRef(elm);
|
|
1929
|
+
if (!hostRef) {
|
|
1930
|
+
return;
|
|
1931
|
+
}
|
|
1601
1932
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1602
1933
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1603
1934
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
@@ -1631,52 +1962,72 @@ var connectedCallback = (elm) => {
|
|
|
1631
1962
|
}
|
|
1632
1963
|
} else {
|
|
1633
1964
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1634
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1635
|
-
hostRef.$
|
|
1965
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1966
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1967
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1968
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1636
1969
|
}
|
|
1637
1970
|
}
|
|
1638
1971
|
endConnected();
|
|
1639
1972
|
}
|
|
1640
1973
|
};
|
|
1641
1974
|
var setContentReference = (elm) => {
|
|
1642
|
-
|
|
1975
|
+
if (!win.document) {
|
|
1976
|
+
return;
|
|
1977
|
+
}
|
|
1978
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
1643
1979
|
""
|
|
1644
1980
|
);
|
|
1645
1981
|
contentRefElm["s-cn"] = true;
|
|
1646
1982
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1647
1983
|
};
|
|
1648
|
-
var disconnectInstance = (instance) => {
|
|
1984
|
+
var disconnectInstance = (instance, elm) => {
|
|
1985
|
+
{
|
|
1986
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1987
|
+
}
|
|
1649
1988
|
};
|
|
1650
1989
|
var disconnectedCallback = async (elm) => {
|
|
1651
1990
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1652
1991
|
const hostRef = getHostRef(elm);
|
|
1653
1992
|
{
|
|
1654
|
-
if (hostRef.$rmListeners$) {
|
|
1993
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
1655
1994
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1656
1995
|
hostRef.$rmListeners$ = void 0;
|
|
1657
1996
|
}
|
|
1658
1997
|
}
|
|
1659
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1660
|
-
hostRef.$
|
|
1998
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1999
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
2000
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2001
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1661
2002
|
}
|
|
1662
2003
|
}
|
|
2004
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2005
|
+
rootAppliedStyles.delete(elm);
|
|
2006
|
+
}
|
|
2007
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2008
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2009
|
+
}
|
|
1663
2010
|
};
|
|
1664
2011
|
|
|
1665
2012
|
// src/runtime/bootstrap-lazy.ts
|
|
1666
2013
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1667
2014
|
var _a;
|
|
2015
|
+
if (!win.document) {
|
|
2016
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2017
|
+
return;
|
|
2018
|
+
}
|
|
1668
2019
|
const endBootstrap = createTime();
|
|
1669
2020
|
const cmpTags = [];
|
|
1670
2021
|
const exclude = options.exclude || [];
|
|
1671
2022
|
const customElements2 = win.customElements;
|
|
1672
|
-
const head =
|
|
2023
|
+
const head = win.document.head;
|
|
1673
2024
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1674
|
-
const dataStyles = /* @__PURE__ */
|
|
2025
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1675
2026
|
const deferredConnectedCallbacks = [];
|
|
1676
2027
|
let appLoadFallback;
|
|
1677
2028
|
let isBootstrapping = true;
|
|
1678
2029
|
Object.assign(plt, options);
|
|
1679
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2030
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1680
2031
|
let hasSlotRelocation = false;
|
|
1681
2032
|
lazyBundles.map((lazyBundle) => {
|
|
1682
2033
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1713,12 +2064,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1713
2064
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1714
2065
|
{
|
|
1715
2066
|
if (!self.shadowRoot) {
|
|
1716
|
-
|
|
1717
|
-
self.attachShadow({
|
|
1718
|
-
mode: "open",
|
|
1719
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
2067
|
+
createShadowRoot.call(self, cmpMeta);
|
|
1722
2068
|
} else {
|
|
1723
2069
|
if (self.shadowRoot.mode !== "open") {
|
|
1724
2070
|
throw new Error(
|
|
@@ -1731,6 +2077,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1731
2077
|
}
|
|
1732
2078
|
connectedCallback() {
|
|
1733
2079
|
const hostRef = getHostRef(this);
|
|
2080
|
+
if (!hostRef) {
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
1734
2083
|
if (!this.hasRegisteredEventListeners) {
|
|
1735
2084
|
this.hasRegisteredEventListeners = true;
|
|
1736
2085
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
@@ -1747,9 +2096,24 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1747
2096
|
}
|
|
1748
2097
|
disconnectedCallback() {
|
|
1749
2098
|
plt.jmp(() => disconnectedCallback(this));
|
|
2099
|
+
plt.raf(() => {
|
|
2100
|
+
var _a3;
|
|
2101
|
+
const hostRef = getHostRef(this);
|
|
2102
|
+
if (!hostRef) {
|
|
2103
|
+
return;
|
|
2104
|
+
}
|
|
2105
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2106
|
+
if (i2 > -1) {
|
|
2107
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2108
|
+
}
|
|
2109
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2110
|
+
delete hostRef.$vnode$.$elm$;
|
|
2111
|
+
}
|
|
2112
|
+
});
|
|
1750
2113
|
}
|
|
1751
2114
|
componentOnReady() {
|
|
1752
|
-
|
|
2115
|
+
var _a3;
|
|
2116
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
1753
2117
|
}
|
|
1754
2118
|
};
|
|
1755
2119
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
@@ -1771,7 +2135,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1771
2135
|
}
|
|
1772
2136
|
if (dataStyles.innerHTML.length) {
|
|
1773
2137
|
dataStyles.setAttribute("data-styles", "");
|
|
1774
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2138
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1775
2139
|
if (nonce != null) {
|
|
1776
2140
|
dataStyles.setAttribute("nonce", nonce);
|
|
1777
2141
|
}
|
|
@@ -1792,9 +2156,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1792
2156
|
// src/runtime/fragment.ts
|
|
1793
2157
|
var Fragment = (_, children) => children;
|
|
1794
2158
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1795
|
-
if (listeners) {
|
|
2159
|
+
if (listeners && win.document) {
|
|
1796
2160
|
listeners.map(([flags, name, method]) => {
|
|
1797
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2161
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
1798
2162
|
const handler = hostListenerProxy(hostRef, method);
|
|
1799
2163
|
const opts = hostListenerOpts(flags);
|
|
1800
2164
|
plt.ael(target, name, handler, opts);
|
|
@@ -1813,12 +2177,16 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1813
2177
|
}
|
|
1814
2178
|
}
|
|
1815
2179
|
} catch (e) {
|
|
1816
|
-
consoleError(e);
|
|
2180
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1817
2181
|
}
|
|
1818
2182
|
};
|
|
1819
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1820
|
-
if (flags & 4 /* TargetDocument */)
|
|
1821
|
-
|
|
2183
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2184
|
+
if (flags & 4 /* TargetDocument */) {
|
|
2185
|
+
return doc;
|
|
2186
|
+
}
|
|
2187
|
+
if (flags & 8 /* TargetWindow */) {
|
|
2188
|
+
return win;
|
|
2189
|
+
}
|
|
1822
2190
|
return elm;
|
|
1823
2191
|
};
|
|
1824
2192
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1829,4 +2197,4 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
1829
2197
|
// src/runtime/nonce.ts
|
|
1830
2198
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1831
2199
|
|
|
1832
|
-
export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, forceUpdate as f,
|
|
2200
|
+
export { Fragment as F, Host as H, getElement as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, globalFn as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|