@watermarkinsights/ripple 5.16.0-alpha.12 → 5.16.0-alpha.13
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-9NXIHgu3.js +7 -0
- package/dist/cjs/{chartFunctions-ce91b2c9.js → chartFunctions-DFMB7Bjs.js} +2 -3
- package/dist/cjs/{functions-ea3eae05.js → functions-Cv4tH2z-.js} +74 -79
- package/dist/cjs/{index-788526f5.js → index-H4E3eeKZ.js} +777 -410
- package/dist/cjs/{intl-ea56dd40.js → intl-CDsbzEBp.js} +1 -1
- 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 +2 -5
- package/dist/cjs/priv-navigator-item.cjs.entry.js +2 -5
- 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 +9 -18
- package/dist/cjs/wm-button.cjs.entry.js +8 -16
- 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 +9 -14
- package/dist/cjs/wm-datepicker.cjs.entry.js +6 -11
- package/dist/cjs/wm-file-list.cjs.entry.js +2 -5
- package/dist/cjs/wm-file.cjs.entry.js +5 -15
- package/dist/cjs/wm-flyout.cjs.entry.js +5 -16
- package/dist/cjs/wm-input.cjs.entry.js +5 -17
- package/dist/cjs/wm-line-chart.cjs.entry.js +18 -28
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +8 -14
- package/dist/cjs/wm-modal_3.cjs.entry.js +7 -14
- package/dist/cjs/wm-navigation_3.cjs.entry.js +9 -18
- package/dist/cjs/wm-navigator.cjs.entry.js +17 -15
- package/dist/cjs/wm-nested-select.cjs.entry.js +11 -16
- package/dist/cjs/wm-optgroup.cjs.entry.js +3 -7
- package/dist/cjs/wm-option_2.cjs.entry.js +10 -17
- package/dist/cjs/wm-pagination.cjs.entry.js +10 -13
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +10 -27
- package/dist/cjs/wm-search.cjs.entry.js +25 -9
- package/dist/cjs/wm-snackbar.cjs.entry.js +8 -10
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +20 -16
- package/dist/cjs/wm-tag-input.cjs.entry.js +12 -25
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -8
- package/dist/cjs/wm-textarea.cjs.entry.js +5 -12
- package/dist/cjs/wm-timepicker.cjs.entry.js +9 -14
- package/dist/cjs/wm-toggletip.cjs.entry.js +7 -12
- package/dist/cjs/wm-uploader.cjs.entry.js +9 -19
- 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/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 +27 -13
- 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.js +46 -22
- 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.js +41 -19
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +24 -15
- package/dist/collection/components/wm-button/wm-button.js +43 -22
- package/dist/collection/components/wm-file/wm-file.js +29 -18
- package/dist/collection/components/wm-file-list/wm-file-list.js +3 -1
- package/dist/collection/components/wm-flyout/wm-flyout.js +31 -19
- package/dist/collection/components/wm-input/wm-input.js +55 -28
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +10 -4
- package/dist/collection/components/wm-modal/wm-modal-footer.js +15 -5
- package/dist/collection/components/wm-modal/wm-modal-header.js +6 -2
- package/dist/collection/components/wm-modal/wm-modal.js +13 -7
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +15 -5
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +6 -2
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +14 -7
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +5 -4
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +9 -8
- package/dist/collection/components/wm-navigation/wm-navigation.js +4 -2
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +6 -2
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +9 -3
- package/dist/collection/components/wm-navigator/wm-navigator.js +34 -15
- package/dist/collection/components/wm-pagination/wm-pagination.js +21 -11
- package/dist/collection/components/wm-search/wm-search.js +45 -10
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +7 -4
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +18 -6
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +9 -6
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +12 -2
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +50 -32
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +18 -10
- package/dist/collection/components/wm-textarea/wm-textarea.js +34 -16
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +27 -15
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +19 -11
- package/dist/collection/components/wm-uploader/wm-uploader.css +1 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +37 -22
- package/dist/esm/app-globals-BNPUkoUt.js +5 -0
- package/dist/esm/{chartFunctions-ebe4f673.js → chartFunctions-BLjGh_yo.js} +3 -4
- package/dist/esm/{functions-fbf8519f.js → functions-DT2ztGYg.js} +75 -80
- package/dist/esm/{index-130e07bb.js → index-C-E-By4e.js} +774 -406
- package/dist/esm/{intl-30a9319d.js → intl-BnrBfoLu.js} +1 -1
- package/dist/esm/loader.js +4 -4
- 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 +2 -3
- package/dist/esm/priv-navigator-item.entry.js +2 -3
- 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 +9 -16
- package/dist/esm/wm-button.entry.js +8 -14
- 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 +9 -12
- package/dist/esm/wm-datepicker.entry.js +6 -9
- package/dist/esm/wm-file-list.entry.js +2 -3
- package/dist/esm/wm-file.entry.js +5 -13
- package/dist/esm/wm-flyout.entry.js +5 -14
- package/dist/esm/wm-input.entry.js +5 -15
- package/dist/esm/wm-line-chart.entry.js +18 -26
- package/dist/esm/wm-modal-pss_3.entry.js +8 -12
- package/dist/esm/wm-modal_3.entry.js +7 -12
- package/dist/esm/wm-navigation_3.entry.js +9 -16
- package/dist/esm/wm-navigator.entry.js +17 -13
- package/dist/esm/wm-nested-select.entry.js +11 -14
- package/dist/esm/wm-optgroup.entry.js +3 -5
- package/dist/esm/wm-option_2.entry.js +10 -15
- package/dist/esm/wm-pagination.entry.js +10 -11
- package/dist/esm/wm-progress-indicator_3.entry.js +10 -25
- package/dist/esm/wm-search.entry.js +25 -7
- package/dist/esm/wm-snackbar.entry.js +8 -8
- package/dist/esm/wm-tab-item_3.entry.js +20 -14
- package/dist/esm/wm-tag-input.entry.js +12 -23
- package/dist/esm/wm-tag-option.entry.js +2 -6
- package/dist/esm/wm-textarea.entry.js +5 -10
- package/dist/esm/wm-timepicker.entry.js +9 -12
- package/dist/esm/wm-toggletip.entry.js +7 -10
- package/dist/esm/wm-uploader.entry.js +9 -17
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/app-globals-BNPUkoUt.js +1 -0
- package/dist/esm-es5/chartFunctions-BLjGh_yo.js +1 -0
- package/dist/esm-es5/functions-DT2ztGYg.js +1 -0
- package/dist/esm-es5/index-C-E-By4e.js +1 -0
- package/dist/esm-es5/{intl-30a9319d.js → intl-BnrBfoLu.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-5a5d5833.system.entry.js → p-0327a2c8.system.entry.js} +1 -1
- package/dist/ripple/{p-8a64e2bd.system.entry.js → p-089abdfc.system.entry.js} +1 -1
- package/dist/ripple/{p-31d35d2d.system.entry.js → p-17c731d6.system.entry.js} +1 -1
- package/dist/ripple/{p-4df89f8f.entry.js → p-19865407.entry.js} +1 -1
- package/dist/ripple/{p-09f61d38.system.entry.js → p-1ca43593.system.entry.js} +1 -1
- package/dist/ripple/p-1ccf6d7c.entry.js +1 -0
- package/dist/ripple/p-2021c4f7.entry.js +1 -0
- package/dist/ripple/p-2be4ae61.entry.js +1 -0
- package/dist/ripple/{p-c8d2c849.system.entry.js → p-36b4df18.system.entry.js} +1 -1
- package/dist/ripple/p-37f4622f.entry.js +1 -0
- package/dist/ripple/p-385147aa.entry.js +1 -0
- package/dist/ripple/{p-840ad3a3.system.entry.js → p-3b7bf277.system.entry.js} +1 -1
- package/dist/ripple/{p-324aed64.system.entry.js → p-3d0c35c9.system.entry.js} +1 -1
- package/dist/ripple/{p-904f4c90.entry.js → p-3f4274a3.entry.js} +1 -1
- package/dist/ripple/{p-86c752be.system.entry.js → p-40f123ee.system.entry.js} +1 -1
- package/dist/ripple/{p-cd0cc88d.entry.js → p-41d8be2e.entry.js} +1 -1
- package/dist/ripple/{p-f3b31fae.entry.js → p-45ab6c4a.entry.js} +1 -1
- package/dist/ripple/{p-5f9d81df.system.entry.js → p-478e5069.system.entry.js} +1 -1
- package/dist/ripple/{p-5405f9d3.system.entry.js → p-484c87d1.system.entry.js} +1 -1
- package/dist/ripple/{p-c242e70f.entry.js → p-4af98b35.entry.js} +1 -1
- package/dist/ripple/{p-2a85d4ce.system.entry.js → p-4afb057b.system.entry.js} +1 -1
- package/dist/ripple/p-4d32daeb.entry.js +1 -0
- package/dist/ripple/{p-924ab54c.entry.js → p-4eb6930b.entry.js} +1 -1
- package/dist/ripple/{p-c4b48cd4.system.entry.js → p-540de835.system.entry.js} +1 -1
- package/dist/ripple/{p-fde1212a.system.entry.js → p-57885083.system.entry.js} +1 -1
- package/dist/ripple/{p-03381d63.system.entry.js → p-5884f2af.system.entry.js} +1 -1
- package/dist/ripple/{p-b9d609fb.system.entry.js → p-5cc69165.system.entry.js} +1 -1
- package/dist/ripple/p-5d2348b6.entry.js +1 -0
- package/dist/ripple/{p-8ee90e17.system.entry.js → p-62f475c1.system.entry.js} +1 -1
- package/dist/ripple/{p-34808b52.system.entry.js → p-63dd7bb4.system.entry.js} +1 -1
- package/dist/ripple/{p-043901ab.system.entry.js → p-6589b394.system.entry.js} +1 -1
- package/dist/ripple/{p-8c33cb29.entry.js → p-68d8df0f.entry.js} +1 -1
- package/dist/ripple/p-6aa3d014.entry.js +1 -0
- package/dist/ripple/{p-2e10a2dc.system.entry.js → p-6c066023.system.entry.js} +1 -1
- package/dist/ripple/{p-6723e469.system.entry.js → p-6ed6019f.system.entry.js} +1 -1
- package/dist/ripple/{p-c9e9ce61.system.entry.js → p-70c8d4f4.system.entry.js} +1 -1
- package/dist/ripple/{p-4af5ad94.system.entry.js → p-72c61438.system.entry.js} +1 -1
- package/dist/ripple/p-7309ba5e.entry.js +1 -0
- package/dist/ripple/p-76b54b8a.entry.js +1 -0
- package/dist/ripple/p-795ecc2f.entry.js +1 -0
- package/dist/ripple/p-885a1fdb.system.entry.js +1 -0
- package/dist/ripple/{p-6b4e1fe9.entry.js → p-8ab6b775.entry.js} +1 -1
- package/dist/ripple/p-8af9a491.entry.js +1 -0
- package/dist/ripple/{p-22d9b079.system.entry.js → p-8d315da3.system.entry.js} +1 -1
- package/dist/ripple/{p-f9f9fbae.system.entry.js → p-90052a7f.system.entry.js} +1 -1
- package/dist/ripple/p-911907c5.entry.js +1 -0
- package/dist/ripple/p-936bee47.entry.js +1 -0
- package/dist/ripple/{p-7b06e308.system.entry.js → p-983ab2ad.system.entry.js} +1 -1
- package/dist/ripple/p-9d0ca16a.entry.js +1 -0
- package/dist/ripple/p-B5BgystP.system.js +2 -0
- package/dist/ripple/p-BDF61j7P.system.js +1 -0
- package/dist/ripple/p-BUP1pADI.system.js +1 -0
- package/dist/ripple/p-Bc1r16wF.js +1 -0
- package/dist/ripple/p-C-E-By4e.js +2 -0
- package/dist/ripple/p-C4CRgsL9.js +1 -0
- package/dist/ripple/{p-9c6bacb9.js → p-ChCup6OE.js} +1 -1
- package/dist/ripple/p-D0eZSvEu.system.js +1 -0
- package/dist/ripple/p-DT2ztGYg.js +1 -0
- package/dist/ripple/p-Dg5uzcYb.system.js +1 -0
- package/dist/ripple/{p-e71b1146.system.js → p-LmBQIm9U.system.js} +1 -1
- package/dist/ripple/{p-a424e0a7.system.entry.js → p-a60e886d.system.entry.js} +1 -1
- package/dist/ripple/p-a82d08f1.entry.js +1 -0
- package/dist/ripple/{p-75ad7567.system.entry.js → p-a91703be.system.entry.js} +1 -1
- package/dist/ripple/p-ab05d1f0.entry.js +1 -0
- package/dist/ripple/p-ab2a734d.entry.js +1 -0
- package/dist/ripple/{p-c7a57fc7.entry.js → p-acca480e.entry.js} +1 -1
- package/dist/ripple/p-ae00335a.entry.js +1 -0
- package/dist/ripple/{p-80664bf3.system.entry.js → p-b125c946.system.entry.js} +1 -1
- package/dist/ripple/p-b18d9709.entry.js +1 -0
- package/dist/ripple/{p-42174be5.system.entry.js → p-c5688577.system.entry.js} +1 -1
- package/dist/ripple/{p-be3213fc.entry.js → p-cb32b5f5.entry.js} +1 -1
- package/dist/ripple/{p-086c2905.system.entry.js → p-cb40a99a.system.entry.js} +1 -1
- package/dist/ripple/{p-d2b60968.system.entry.js → p-cd9f7986.system.entry.js} +1 -1
- package/dist/ripple/{p-12174831.entry.js → p-cfe55c87.entry.js} +1 -1
- package/dist/ripple/{p-7c6e0168.entry.js → p-d276f67c.entry.js} +1 -1
- package/dist/ripple/p-d5f04a3c.entry.js +1 -0
- package/dist/ripple/{p-76aef56f.entry.js → p-d998d931.entry.js} +1 -1
- package/dist/ripple/p-e527d2c6.system.entry.js +1 -0
- package/dist/ripple/{p-4e97bf26.system.entry.js → p-e9b4a77a.system.entry.js} +1 -1
- package/dist/ripple/p-f2ad44e2.system.entry.js +1 -0
- package/dist/ripple/p-f7065bc8.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- 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-1079ca72.js +0 -92
- package/dist/esm/app-globals-1087214a.js +0 -90
- package/dist/esm-es5/app-globals-1087214a.js +0 -1
- package/dist/esm-es5/chartFunctions-ebe4f673.js +0 -1
- package/dist/esm-es5/functions-fbf8519f.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/loader/package.json +0 -11
- package/dist/ripple/p-02951ad1.system.js +0 -1
- package/dist/ripple/p-0d3a26ff.entry.js +0 -1
- package/dist/ripple/p-13b1d775.entry.js +0 -1
- package/dist/ripple/p-13ddc53d.entry.js +0 -1
- package/dist/ripple/p-17e93d1b.entry.js +0 -1
- package/dist/ripple/p-2be53f45.entry.js +0 -1
- package/dist/ripple/p-4436c014.entry.js +0 -1
- package/dist/ripple/p-4f13d03e.entry.js +0 -1
- package/dist/ripple/p-535165fc.system.js +0 -1
- package/dist/ripple/p-55f979d4.system.js +0 -1
- package/dist/ripple/p-57bce206.system.js +0 -1
- package/dist/ripple/p-5b7d56aa.entry.js +0 -1
- package/dist/ripple/p-5c0db525.entry.js +0 -1
- package/dist/ripple/p-67109fb1.entry.js +0 -1
- package/dist/ripple/p-823d7b4e.system.entry.js +0 -1
- package/dist/ripple/p-8905ad76.entry.js +0 -1
- package/dist/ripple/p-8c2f8f78.entry.js +0 -1
- package/dist/ripple/p-94c6bde9.js +0 -1
- package/dist/ripple/p-9627b8a6.entry.js +0 -1
- package/dist/ripple/p-9f2b6c58.entry.js +0 -1
- package/dist/ripple/p-b8dd9e8c.entry.js +0 -1
- package/dist/ripple/p-c6ba7e07.entry.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d210db32.entry.js +0 -1
- package/dist/ripple/p-d45bcccf.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-dc7acef5.entry.js +0 -1
- package/dist/ripple/p-dd62178f.system.entry.js +0 -1
- package/dist/ripple/p-e0d21c51.entry.js +0 -1
- package/dist/ripple/p-e7d03cf5.js +0 -1
- package/dist/ripple/p-efe8c61e.entry.js +0 -1
- package/dist/ripple/p-f0eae6dc.entry.js +0 -1
- package/dist/ripple/p-f0f57f41.system.entry.js +0 -1
- package/dist/ripple/p-f46983da.entry.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
|
@@ -9,31 +9,127 @@ function _interopNamespace(e) {
|
|
|
9
9
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
10
|
Object.defineProperty(n, k, d.get ? d : {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return e[k];
|
|
14
|
-
}
|
|
12
|
+
get: function () { return e[k]; }
|
|
15
13
|
});
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
}
|
|
19
|
-
n
|
|
17
|
+
n.default = e;
|
|
20
18
|
return Object.freeze(n);
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
const NAMESPACE = 'ripple';
|
|
24
|
-
const BUILD = /* ripple */ {
|
|
22
|
+
const BUILD = /* ripple */ { hydratedSelectorName: "hydrated", lazyLoad: true, slotRelocation: true, updatable: true};
|
|
23
|
+
|
|
24
|
+
const version = "5.16.0-alpha.13";
|
|
25
|
+
|
|
26
|
+
// PRINT RIPPLE VERSION IN CONSOLE
|
|
27
|
+
// test envs return 0 for plugin.length
|
|
28
|
+
// do not print version number there as it causes issues
|
|
29
|
+
if (window.navigator.plugins.length > 0) {
|
|
30
|
+
console.log("%cRipple component library %c%s", "color: #575195; font-weight: bold", "font-weight: bold", version);
|
|
31
|
+
}
|
|
32
|
+
// Dispatching events to track whether user is navigating with keyboard or mouse
|
|
33
|
+
// no longer necessary for keyboard focus indicators (thanks to :focus-visible)
|
|
34
|
+
// but still used in several components for other things (search for isTabbing)
|
|
35
|
+
function wmComponentKeys(ev) {
|
|
36
|
+
if (ev.key == "Tab") {
|
|
37
|
+
var event = new Event("wmUserIsTabbing");
|
|
38
|
+
window.dispatchEvent(event);
|
|
39
|
+
document.querySelector("body").classList.add("wmcl-user-is-tabbing");
|
|
40
|
+
}
|
|
41
|
+
if (ev.key == "ArrowLeft" || ev.key == "ArrowUp" || ev.key == "ArrowRight" || ev.key == "ArrowDown") {
|
|
42
|
+
var event = new Event("wmUserIsKeying");
|
|
43
|
+
window.dispatchEvent(event);
|
|
44
|
+
document.querySelector("body").classList.add("wmcl-user-is-keying");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function wmComponentMouseDownOnce() {
|
|
48
|
+
var event = new Event("wmUserIsNotTabbing");
|
|
49
|
+
window.dispatchEvent(event);
|
|
50
|
+
document.querySelector("body").classList.remove("wmcl-user-is-tabbing");
|
|
51
|
+
document.querySelector("body").classList.remove("wmcl-user-is-keying");
|
|
52
|
+
}
|
|
53
|
+
window.addEventListener("keydown", wmComponentKeys);
|
|
54
|
+
window.addEventListener("mousedown", wmComponentMouseDownOnce);
|
|
55
|
+
// TOOLTIP
|
|
56
|
+
// Add a tooltip element
|
|
57
|
+
// This allows tooltips to be always at the highest stacking context (always on top)
|
|
58
|
+
// Element is added withing a container to avoid performance impact
|
|
59
|
+
const tooltipContainer = document.createElement("div");
|
|
60
|
+
tooltipContainer.id = "wm-tooltip-container";
|
|
61
|
+
const tooltipEl = document.createElement("div");
|
|
62
|
+
tooltipEl.id = "wm-tooltip";
|
|
63
|
+
tooltipEl.classList.add("wm-tooltip");
|
|
64
|
+
tooltipEl.setAttribute("popover", "manual");
|
|
65
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
66
|
+
const tooltipStyles = document.createElement("style");
|
|
67
|
+
tooltipStyles.textContent = `
|
|
68
|
+
.wm-tooltip {
|
|
69
|
+
position: fixed;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
line-height: normal;
|
|
73
|
+
font-family: inherit;
|
|
74
|
+
font-size: 0.875rem;
|
|
75
|
+
text-transform: none;
|
|
76
|
+
font-weight: normal;
|
|
77
|
+
background: var(--wmcolor-tooltip-background);
|
|
78
|
+
color: var(--wmcolor-tooltip-text);
|
|
79
|
+
z-index: 999999;
|
|
80
|
+
max-width: var(--wmTooltipMaxWidth, 13.75rem);
|
|
81
|
+
margin-right: 1.5rem;
|
|
82
|
+
padding: 0.375rem;
|
|
83
|
+
transition-property: opacity;
|
|
84
|
+
transition-delay: 0s;
|
|
85
|
+
opacity: 0;
|
|
86
|
+
inset: unset;
|
|
87
|
+
top: 0;
|
|
88
|
+
left: 0;
|
|
89
|
+
transform: translateZ(0);
|
|
90
|
+
will-change: transform;
|
|
91
|
+
transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));
|
|
92
|
+
border: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.wm-tooltip:popover-open {
|
|
96
|
+
opacity: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.wm-tooltip.show {
|
|
100
|
+
transition-delay: 500ms;
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
document.head.appendChild(tooltipStyles);
|
|
105
|
+
tooltipContainer.appendChild(tooltipEl);
|
|
106
|
+
document.querySelector("body").appendChild(tooltipContainer);
|
|
107
|
+
const globalFn = () => { };
|
|
25
108
|
|
|
26
109
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
110
|
+
Stencil Client Platform v4.36.2 | MIT Licensed | https://stenciljs.com
|
|
28
111
|
*/
|
|
29
112
|
var __defProp = Object.defineProperty;
|
|
30
113
|
var __export = (target, all) => {
|
|
31
114
|
for (var name in all)
|
|
32
115
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
116
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
117
|
+
|
|
118
|
+
// src/utils/constants.ts
|
|
119
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
120
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
121
|
+
|
|
122
|
+
// src/client/client-host-ref.ts
|
|
123
|
+
var getHostRef = (ref) => {
|
|
124
|
+
if (ref.__stencil__getHostRef) {
|
|
125
|
+
return ref.__stencil__getHostRef();
|
|
126
|
+
}
|
|
127
|
+
return void 0;
|
|
128
|
+
};
|
|
129
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
130
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
131
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
132
|
+
};
|
|
37
133
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
134
|
const hostRef = {
|
|
39
135
|
$flags$: 0,
|
|
@@ -49,7 +145,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
49
145
|
hostElement["s-p"] = [];
|
|
50
146
|
hostElement["s-rc"] = [];
|
|
51
147
|
}
|
|
52
|
-
|
|
148
|
+
const ref = hostRef;
|
|
149
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
150
|
+
return ref;
|
|
53
151
|
};
|
|
54
152
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
55
153
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -74,6 +172,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
74
172
|
}
|
|
75
173
|
switch(bundleId) {
|
|
76
174
|
|
|
175
|
+
case 'wm-tag-option.cjs':
|
|
176
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
177
|
+
/* webpackMode: "lazy" */
|
|
178
|
+
'./wm-tag-option.cjs.entry.js')); }).then(processMod, consoleError);
|
|
179
|
+
case 'wm-wrapper.cjs':
|
|
180
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
181
|
+
/* webpackMode: "lazy" */
|
|
182
|
+
'./wm-wrapper.cjs.entry.js')); }).then(processMod, consoleError);
|
|
183
|
+
case 'wm-chart-slice.cjs':
|
|
184
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
185
|
+
/* webpackMode: "lazy" */
|
|
186
|
+
'./wm-chart-slice.cjs.entry.js')); }).then(processMod, consoleError);
|
|
77
187
|
case 'wm-button.cjs':
|
|
78
188
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
79
189
|
/* webpackMode: "lazy" */
|
|
@@ -102,10 +212,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
102
212
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
103
213
|
/* webpackMode: "lazy" */
|
|
104
214
|
'./wm-input.cjs.entry.js')); }).then(processMod, consoleError);
|
|
105
|
-
case 'wm-navigator.cjs':
|
|
106
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
107
|
-
/* webpackMode: "lazy" */
|
|
108
|
-
'./wm-navigator.cjs.entry.js')); }).then(processMod, consoleError);
|
|
109
215
|
case 'wm-pagination.cjs':
|
|
110
216
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
111
217
|
/* webpackMode: "lazy" */
|
|
@@ -130,10 +236,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
130
236
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
131
237
|
/* webpackMode: "lazy" */
|
|
132
238
|
'./wm-tag-input.cjs.entry.js')); }).then(processMod, consoleError);
|
|
133
|
-
case 'wm-tag-option.cjs':
|
|
134
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
135
|
-
/* webpackMode: "lazy" */
|
|
136
|
-
'./wm-tag-option.cjs.entry.js')); }).then(processMod, consoleError);
|
|
137
239
|
case 'wm-textarea.cjs':
|
|
138
240
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
139
241
|
/* webpackMode: "lazy" */
|
|
@@ -142,42 +244,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
142
244
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
143
245
|
/* webpackMode: "lazy" */
|
|
144
246
|
'./wm-uploader.cjs.entry.js')); }).then(processMod, consoleError);
|
|
145
|
-
case 'wm-wrapper.cjs':
|
|
146
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
147
|
-
/* webpackMode: "lazy" */
|
|
148
|
-
'./wm-wrapper.cjs.entry.js')); }).then(processMod, consoleError);
|
|
149
|
-
case 'wm-action-menu_2.cjs':
|
|
150
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
151
|
-
/* webpackMode: "lazy" */
|
|
152
|
-
'./wm-action-menu_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
153
|
-
case 'wm-option_2.cjs':
|
|
154
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
155
|
-
/* webpackMode: "lazy" */
|
|
156
|
-
'./wm-option_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
157
|
-
case 'wm-modal_3.cjs':
|
|
158
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
159
|
-
/* webpackMode: "lazy" */
|
|
160
|
-
'./wm-modal_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
161
|
-
case 'wm-modal-pss_3.cjs':
|
|
162
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
163
|
-
/* webpackMode: "lazy" */
|
|
164
|
-
'./wm-modal-pss_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
165
|
-
case 'wm-navigation_3.cjs':
|
|
166
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
167
|
-
/* webpackMode: "lazy" */
|
|
168
|
-
'./wm-navigation_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
169
|
-
case 'wm-progress-indicator_3.cjs':
|
|
170
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
171
|
-
/* webpackMode: "lazy" */
|
|
172
|
-
'./wm-progress-indicator_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
173
|
-
case 'wm-tab-item_3.cjs':
|
|
174
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
175
|
-
/* webpackMode: "lazy" */
|
|
176
|
-
'./wm-tab-item_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
177
|
-
case 'wm-chart-slice.cjs':
|
|
178
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
179
|
-
/* webpackMode: "lazy" */
|
|
180
|
-
'./wm-chart-slice.cjs.entry.js')); }).then(processMod, consoleError);
|
|
181
247
|
case 'wm-date-range.cjs':
|
|
182
248
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
183
249
|
/* webpackMode: "lazy" */
|
|
@@ -214,20 +280,57 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
214
280
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
215
281
|
/* webpackMode: "lazy" */
|
|
216
282
|
'./priv-option-list.cjs.entry.js')); }).then(processMod, consoleError);
|
|
283
|
+
case 'wm-navigator.cjs':
|
|
284
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
285
|
+
/* webpackMode: "lazy" */
|
|
286
|
+
'./wm-navigator.cjs.entry.js')); }).then(processMod, consoleError);
|
|
287
|
+
case 'wm-action-menu_2.cjs':
|
|
288
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
289
|
+
/* webpackMode: "lazy" */
|
|
290
|
+
'./wm-action-menu_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
291
|
+
case 'wm-option_2.cjs':
|
|
292
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
293
|
+
/* webpackMode: "lazy" */
|
|
294
|
+
'./wm-option_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
295
|
+
case 'wm-progress-indicator_3.cjs':
|
|
296
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
297
|
+
/* webpackMode: "lazy" */
|
|
298
|
+
'./wm-progress-indicator_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
299
|
+
case 'wm-modal_3.cjs':
|
|
300
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
301
|
+
/* webpackMode: "lazy" */
|
|
302
|
+
'./wm-modal_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
303
|
+
case 'wm-modal-pss_3.cjs':
|
|
304
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
305
|
+
/* webpackMode: "lazy" */
|
|
306
|
+
'./wm-modal-pss_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
307
|
+
case 'wm-navigation_3.cjs':
|
|
308
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
309
|
+
/* webpackMode: "lazy" */
|
|
310
|
+
'./wm-navigation_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
311
|
+
case 'wm-tab-item_3.cjs':
|
|
312
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
313
|
+
/* webpackMode: "lazy" */
|
|
314
|
+
'./wm-tab-item_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
217
315
|
}
|
|
218
316
|
}
|
|
219
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
317
|
+
return (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(
|
|
220
318
|
/* @vite-ignore */
|
|
221
319
|
/* webpackInclude: /\.entry\.js$/ */
|
|
222
320
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
223
321
|
/* webpackMode: "lazy" */
|
|
224
322
|
`./${bundleId}.entry.js${""}`
|
|
225
|
-
)
|
|
226
|
-
{
|
|
227
|
-
|
|
323
|
+
).then(
|
|
324
|
+
(importedModule) => {
|
|
325
|
+
{
|
|
326
|
+
cmpModules.set(bundleId, importedModule);
|
|
327
|
+
}
|
|
328
|
+
return importedModule[exportName];
|
|
329
|
+
},
|
|
330
|
+
(e) => {
|
|
331
|
+
consoleError(e, hostRef.$hostElement$);
|
|
228
332
|
}
|
|
229
|
-
|
|
230
|
-
}, consoleError);
|
|
333
|
+
);
|
|
231
334
|
};
|
|
232
335
|
|
|
233
336
|
// src/client/client-style.ts
|
|
@@ -236,7 +339,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
|
236
339
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
237
340
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
238
341
|
var win = typeof window !== "undefined" ? window : {};
|
|
239
|
-
var doc = win.document || { head: {} };
|
|
240
342
|
var plt = {
|
|
241
343
|
$flags$: 0,
|
|
242
344
|
$resourcesUrl$: "",
|
|
@@ -247,9 +349,10 @@ var plt = {
|
|
|
247
349
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
248
350
|
};
|
|
249
351
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
352
|
+
var _a;
|
|
250
353
|
let supportsListenerOptions2 = false;
|
|
251
354
|
try {
|
|
252
|
-
|
|
355
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
253
356
|
"e",
|
|
254
357
|
null,
|
|
255
358
|
Object.defineProperty({}, "passive", {
|
|
@@ -271,6 +374,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
|
271
374
|
}
|
|
272
375
|
return false;
|
|
273
376
|
})() ;
|
|
377
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
274
378
|
var queuePending = false;
|
|
275
379
|
var queueDomReads = [];
|
|
276
380
|
var queueDomWrites = [];
|
|
@@ -306,25 +410,22 @@ var flush = () => {
|
|
|
306
410
|
};
|
|
307
411
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
308
412
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
309
|
-
|
|
310
|
-
// src/utils/constants.ts
|
|
311
|
-
var EMPTY_OBJ = {};
|
|
312
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
313
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
314
|
-
|
|
315
|
-
// src/utils/helpers.ts
|
|
316
|
-
var isDef = (v) => v != null;
|
|
317
413
|
var isComplexType = (o) => {
|
|
318
414
|
o = typeof o;
|
|
319
415
|
return o === "object" || o === "function";
|
|
320
416
|
};
|
|
321
417
|
|
|
322
418
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
323
|
-
function queryNonceMetaTagContent(
|
|
419
|
+
function queryNonceMetaTagContent(doc) {
|
|
324
420
|
var _a, _b, _c;
|
|
325
|
-
return (_c = (_b = (_a =
|
|
421
|
+
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;
|
|
326
422
|
}
|
|
327
423
|
|
|
424
|
+
// src/utils/regular-expression.ts
|
|
425
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
426
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
427
|
+
};
|
|
428
|
+
|
|
328
429
|
// src/utils/result.ts
|
|
329
430
|
var result_exports = {};
|
|
330
431
|
__export(result_exports, {
|
|
@@ -373,6 +474,135 @@ var unwrapErr = (result) => {
|
|
|
373
474
|
throw result.value;
|
|
374
475
|
}
|
|
375
476
|
};
|
|
477
|
+
|
|
478
|
+
// src/utils/style.ts
|
|
479
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
480
|
+
return void 0;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// src/utils/shadow-root.ts
|
|
484
|
+
var globalStyleSheet;
|
|
485
|
+
function createShadowRoot(cmpMeta) {
|
|
486
|
+
var _a;
|
|
487
|
+
const shadowRoot = this.attachShadow({
|
|
488
|
+
mode: "open",
|
|
489
|
+
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
490
|
+
}) ;
|
|
491
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
|
492
|
+
if (globalStyleSheet) {
|
|
493
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
494
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
495
|
+
} else {
|
|
496
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
501
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
502
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
503
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
504
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
505
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
506
|
+
slotNode.hidden = true;
|
|
507
|
+
} else {
|
|
508
|
+
slotNode.hidden = false;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
let i2 = 0;
|
|
514
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
515
|
+
const childNode = childNodes[i2];
|
|
516
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
517
|
+
updateFallbackSlotVisibility(childNode);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
522
|
+
const result = [];
|
|
523
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
524
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
525
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
526
|
+
result.push(slottedNode);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return result;
|
|
530
|
+
};
|
|
531
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
532
|
+
let i2 = 0;
|
|
533
|
+
let slottedNodes = [];
|
|
534
|
+
let childNode;
|
|
535
|
+
for (; i2 < childNodes.length; i2++) {
|
|
536
|
+
childNode = childNodes[i2];
|
|
537
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
538
|
+
slottedNodes.push(childNode);
|
|
539
|
+
}
|
|
540
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
541
|
+
}
|
|
542
|
+
return slottedNodes;
|
|
543
|
+
}
|
|
544
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
545
|
+
const childNodes = [];
|
|
546
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
547
|
+
let node = slot;
|
|
548
|
+
while (node = node.nextSibling) {
|
|
549
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
550
|
+
}
|
|
551
|
+
return childNodes;
|
|
552
|
+
};
|
|
553
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
554
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
555
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
556
|
+
return true;
|
|
557
|
+
}
|
|
558
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
559
|
+
return true;
|
|
560
|
+
}
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
564
|
+
return true;
|
|
565
|
+
}
|
|
566
|
+
return slotName === "";
|
|
567
|
+
};
|
|
568
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
569
|
+
function patchSlotNode(node) {
|
|
570
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
571
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
572
|
+
const toReturn = [];
|
|
573
|
+
const slotName = this["s-sn"];
|
|
574
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
575
|
+
console.error(`
|
|
576
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
577
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
578
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
579
|
+
`);
|
|
580
|
+
}
|
|
581
|
+
const parent = this["s-cr"].parentElement;
|
|
582
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
583
|
+
slottedNodes.forEach((n) => {
|
|
584
|
+
if (slotName === getSlotName(n)) {
|
|
585
|
+
toReturn.push(n);
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
if (elementsOnly) {
|
|
589
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
590
|
+
}
|
|
591
|
+
return toReturn;
|
|
592
|
+
}).bind(node);
|
|
593
|
+
node.assignedElements = assignedFactory(true);
|
|
594
|
+
node.assignedNodes = assignedFactory(false);
|
|
595
|
+
}
|
|
596
|
+
function internalCall(node, method) {
|
|
597
|
+
if ("__" + method in node) {
|
|
598
|
+
const toReturn = node["__" + method];
|
|
599
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
600
|
+
return toReturn.bind(node);
|
|
601
|
+
} else {
|
|
602
|
+
if (typeof node[method] !== "function") return node[method];
|
|
603
|
+
return node[method].bind(node);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
376
606
|
var createTime = (fnName, tagName = "") => {
|
|
377
607
|
{
|
|
378
608
|
return () => {
|
|
@@ -387,6 +617,110 @@ var uniqueTime = (key, measureText) => {
|
|
|
387
617
|
};
|
|
388
618
|
}
|
|
389
619
|
};
|
|
620
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
621
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
622
|
+
let style = styles.get(scopeId2);
|
|
623
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
624
|
+
style = style || new CSSStyleSheet();
|
|
625
|
+
if (typeof style === "string") {
|
|
626
|
+
style = cssText;
|
|
627
|
+
} else {
|
|
628
|
+
style.replaceSync(cssText);
|
|
629
|
+
}
|
|
630
|
+
} else {
|
|
631
|
+
style = cssText;
|
|
632
|
+
}
|
|
633
|
+
styles.set(scopeId2, style);
|
|
634
|
+
};
|
|
635
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
636
|
+
var _a;
|
|
637
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
638
|
+
const style = styles.get(scopeId2);
|
|
639
|
+
if (!win.document) {
|
|
640
|
+
return scopeId2;
|
|
641
|
+
}
|
|
642
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
643
|
+
if (style) {
|
|
644
|
+
if (typeof style === "string") {
|
|
645
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
646
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
647
|
+
let styleElm;
|
|
648
|
+
if (!appliedStyles) {
|
|
649
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
650
|
+
}
|
|
651
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
652
|
+
{
|
|
653
|
+
styleElm = win.document.createElement("style");
|
|
654
|
+
styleElm.innerHTML = style;
|
|
655
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
656
|
+
if (nonce != null) {
|
|
657
|
+
styleElm.setAttribute("nonce", nonce);
|
|
658
|
+
}
|
|
659
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
660
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
661
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
662
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
663
|
+
styleContainerNode.insertBefore(
|
|
664
|
+
styleElm,
|
|
665
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
666
|
+
);
|
|
667
|
+
} else if ("host" in styleContainerNode) {
|
|
668
|
+
if (supportsConstructableStylesheets) {
|
|
669
|
+
const stylesheet = new CSSStyleSheet();
|
|
670
|
+
stylesheet.replaceSync(style);
|
|
671
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
672
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
673
|
+
} else {
|
|
674
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
675
|
+
}
|
|
676
|
+
} else {
|
|
677
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
678
|
+
if (existingStyleContainer) {
|
|
679
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
680
|
+
} else {
|
|
681
|
+
styleContainerNode.prepend(styleElm);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
} else {
|
|
685
|
+
styleContainerNode.append(styleElm);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
689
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
693
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
694
|
+
}
|
|
695
|
+
if (appliedStyles) {
|
|
696
|
+
appliedStyles.add(scopeId2);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
700
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
701
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
|
702
|
+
} else {
|
|
703
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
return scopeId2;
|
|
708
|
+
};
|
|
709
|
+
var attachStyles = (hostRef) => {
|
|
710
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
711
|
+
const elm = hostRef.$hostElement$;
|
|
712
|
+
const flags = cmpMeta.$flags$;
|
|
713
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
714
|
+
const scopeId2 = addStyle(
|
|
715
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
716
|
+
cmpMeta);
|
|
717
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
718
|
+
elm["s-sc"] = scopeId2;
|
|
719
|
+
elm.classList.add(scopeId2 + "-h");
|
|
720
|
+
}
|
|
721
|
+
endAttachStyles();
|
|
722
|
+
};
|
|
723
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
390
724
|
var h = (nodeName, vnodeData, ...children) => {
|
|
391
725
|
let child = null;
|
|
392
726
|
let key = null;
|
|
@@ -498,13 +832,33 @@ var convertToPrivate = (node) => {
|
|
|
498
832
|
vnode.$name$ = node.vname;
|
|
499
833
|
return vnode;
|
|
500
834
|
};
|
|
501
|
-
var
|
|
835
|
+
var createSupportsRuleRe = (selector) => {
|
|
836
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
837
|
+
return new RegExp(
|
|
838
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
839
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
840
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
841
|
+
"g"
|
|
842
|
+
);
|
|
843
|
+
};
|
|
844
|
+
createSupportsRuleRe("::slotted");
|
|
845
|
+
createSupportsRuleRe(":host");
|
|
846
|
+
createSupportsRuleRe(":host-context");
|
|
847
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
848
|
+
if (typeof propValue === "string" && (propType & 16 /* Unknown */ || propType & 8 /* Any */) && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
849
|
+
try {
|
|
850
|
+
return JSON.parse(propValue);
|
|
851
|
+
} catch (e) {
|
|
852
|
+
}
|
|
853
|
+
}
|
|
502
854
|
if (propValue != null && !isComplexType(propValue)) {
|
|
503
855
|
if (propType & 4 /* Boolean */) {
|
|
504
|
-
|
|
856
|
+
{
|
|
857
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
858
|
+
}
|
|
505
859
|
}
|
|
506
860
|
if (propType & 2 /* Number */) {
|
|
507
|
-
return parseFloat(propValue);
|
|
861
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
508
862
|
}
|
|
509
863
|
if (propType & 1 /* String */) {
|
|
510
864
|
return String(propValue);
|
|
@@ -513,7 +867,10 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
513
867
|
}
|
|
514
868
|
return propValue;
|
|
515
869
|
};
|
|
516
|
-
var getElement = (ref) =>
|
|
870
|
+
var getElement = (ref) => {
|
|
871
|
+
var _a;
|
|
872
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
|
|
873
|
+
};
|
|
517
874
|
|
|
518
875
|
// src/runtime/event-emitter.ts
|
|
519
876
|
var createEvent = (ref, name, flags) => {
|
|
@@ -534,204 +891,148 @@ var emitEvent = (elm, name, opts) => {
|
|
|
534
891
|
elm.dispatchEvent(ev);
|
|
535
892
|
return ev;
|
|
536
893
|
};
|
|
537
|
-
var
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
541
|
-
style = style || new CSSStyleSheet();
|
|
542
|
-
if (typeof style === "string") {
|
|
543
|
-
style = cssText;
|
|
544
|
-
} else {
|
|
545
|
-
style.replaceSync(cssText);
|
|
546
|
-
}
|
|
547
|
-
} else {
|
|
548
|
-
style = cssText;
|
|
549
|
-
}
|
|
550
|
-
styles.set(scopeId2, style);
|
|
551
|
-
};
|
|
552
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
553
|
-
var _a;
|
|
554
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
555
|
-
const style = styles.get(scopeId2);
|
|
556
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
557
|
-
if (style) {
|
|
558
|
-
if (typeof style === "string") {
|
|
559
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
560
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
561
|
-
let styleElm;
|
|
562
|
-
if (!appliedStyles) {
|
|
563
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
564
|
-
}
|
|
565
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
566
|
-
{
|
|
567
|
-
styleElm = doc.createElement("style");
|
|
568
|
-
styleElm.innerHTML = style;
|
|
569
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
570
|
-
if (nonce != null) {
|
|
571
|
-
styleElm.setAttribute("nonce", nonce);
|
|
572
|
-
}
|
|
573
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
574
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
575
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
576
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
|
|
577
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
578
|
-
} else if ("host" in styleContainerNode) {
|
|
579
|
-
styleContainerNode.prepend(styleElm);
|
|
580
|
-
} else {
|
|
581
|
-
styleContainerNode.append(styleElm);
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
585
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
589
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
590
|
-
}
|
|
591
|
-
if (appliedStyles) {
|
|
592
|
-
appliedStyles.add(scopeId2);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
596
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
return scopeId2;
|
|
600
|
-
};
|
|
601
|
-
var attachStyles = (hostRef) => {
|
|
602
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
603
|
-
const elm = hostRef.$hostElement$;
|
|
604
|
-
const flags = cmpMeta.$flags$;
|
|
605
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
606
|
-
const scopeId2 = addStyle(
|
|
607
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
608
|
-
cmpMeta);
|
|
609
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
610
|
-
elm["s-sc"] = scopeId2;
|
|
611
|
-
elm.classList.add(scopeId2 + "-h");
|
|
894
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
895
|
+
if (oldValue === newValue) {
|
|
896
|
+
return;
|
|
612
897
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
let
|
|
619
|
-
|
|
620
|
-
if (memberName === "class") {
|
|
621
|
-
const classList = elm.classList;
|
|
622
|
-
const oldClasses = parseClassList(oldValue);
|
|
623
|
-
const newClasses = parseClassList(newValue);
|
|
898
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
899
|
+
let ln = memberName.toLowerCase();
|
|
900
|
+
if (memberName === "class") {
|
|
901
|
+
const classList = elm.classList;
|
|
902
|
+
const oldClasses = parseClassList(oldValue);
|
|
903
|
+
let newClasses = parseClassList(newValue);
|
|
904
|
+
{
|
|
624
905
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
625
906
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
elm.style.removeProperty(prop);
|
|
632
|
-
} else {
|
|
633
|
-
elm.style[prop] = "";
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
for (const prop in newValue) {
|
|
639
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
907
|
+
}
|
|
908
|
+
} else if (memberName === "style") {
|
|
909
|
+
{
|
|
910
|
+
for (const prop in oldValue) {
|
|
911
|
+
if (!newValue || newValue[prop] == null) {
|
|
640
912
|
if (prop.includes("-")) {
|
|
641
|
-
elm.style.
|
|
913
|
+
elm.style.removeProperty(prop);
|
|
642
914
|
} else {
|
|
643
|
-
elm.style[prop] =
|
|
915
|
+
elm.style[prop] = "";
|
|
644
916
|
}
|
|
645
917
|
}
|
|
646
918
|
}
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
} else if (isMemberInElement(win, ln)) {
|
|
655
|
-
memberName = ln.slice(2);
|
|
656
|
-
} else {
|
|
657
|
-
memberName = ln[2] + memberName.slice(3);
|
|
658
|
-
}
|
|
659
|
-
if (oldValue || newValue) {
|
|
660
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
661
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
662
|
-
if (oldValue) {
|
|
663
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
664
|
-
}
|
|
665
|
-
if (newValue) {
|
|
666
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
919
|
+
}
|
|
920
|
+
for (const prop in newValue) {
|
|
921
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
922
|
+
if (prop.includes("-")) {
|
|
923
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
924
|
+
} else {
|
|
925
|
+
elm.style[prop] = newValue[prop];
|
|
667
926
|
}
|
|
668
927
|
}
|
|
928
|
+
}
|
|
929
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
930
|
+
if (newValue) {
|
|
931
|
+
newValue(elm);
|
|
932
|
+
}
|
|
933
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
934
|
+
if (memberName[2] === "-") {
|
|
935
|
+
memberName = memberName.slice(3);
|
|
936
|
+
} else if (isMemberInElement(win, ln)) {
|
|
937
|
+
memberName = ln.slice(2);
|
|
669
938
|
} else {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
939
|
+
memberName = ln[2] + memberName.slice(3);
|
|
940
|
+
}
|
|
941
|
+
if (oldValue || newValue) {
|
|
942
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
943
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
944
|
+
if (oldValue) {
|
|
945
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
946
|
+
}
|
|
947
|
+
if (newValue) {
|
|
948
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
} else {
|
|
952
|
+
const isComplex = isComplexType(newValue);
|
|
953
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
954
|
+
try {
|
|
955
|
+
if (!elm.tagName.includes("-")) {
|
|
956
|
+
const n = newValue == null ? "" : newValue;
|
|
957
|
+
if (memberName === "list") {
|
|
958
|
+
isProp = false;
|
|
959
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
960
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
961
|
+
elm[memberName] = n;
|
|
962
|
+
} else {
|
|
963
|
+
elm.setAttribute(memberName, n);
|
|
683
964
|
}
|
|
684
|
-
} else {
|
|
685
|
-
elm[memberName] = newValue;
|
|
686
965
|
}
|
|
687
|
-
}
|
|
966
|
+
} else if (elm[memberName] !== newValue) {
|
|
967
|
+
elm[memberName] = newValue;
|
|
688
968
|
}
|
|
969
|
+
} catch (e) {
|
|
689
970
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
971
|
+
}
|
|
972
|
+
let xlink = false;
|
|
973
|
+
{
|
|
974
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
975
|
+
memberName = ln;
|
|
976
|
+
xlink = true;
|
|
696
977
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
701
|
-
} else {
|
|
702
|
-
elm.removeAttribute(memberName);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
706
|
-
newValue = newValue === true ? "" : newValue;
|
|
978
|
+
}
|
|
979
|
+
if (newValue == null || newValue === false) {
|
|
980
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
707
981
|
if (xlink) {
|
|
708
|
-
elm.
|
|
982
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
709
983
|
} else {
|
|
710
|
-
elm.
|
|
984
|
+
elm.removeAttribute(memberName);
|
|
711
985
|
}
|
|
712
986
|
}
|
|
987
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
988
|
+
newValue = newValue === true ? "" : newValue;
|
|
989
|
+
if (xlink) {
|
|
990
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
991
|
+
} else {
|
|
992
|
+
elm.setAttribute(memberName, newValue);
|
|
993
|
+
}
|
|
713
994
|
}
|
|
714
995
|
}
|
|
715
996
|
};
|
|
716
997
|
var parseClassListRegex = /\s/;
|
|
717
|
-
var parseClassList = (value) =>
|
|
998
|
+
var parseClassList = (value) => {
|
|
999
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1000
|
+
value = value.baseVal;
|
|
1001
|
+
}
|
|
1002
|
+
if (!value || typeof value !== "string") {
|
|
1003
|
+
return [];
|
|
1004
|
+
}
|
|
1005
|
+
return value.split(parseClassListRegex);
|
|
1006
|
+
};
|
|
718
1007
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
719
1008
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
720
1009
|
|
|
721
1010
|
// src/runtime/vdom/update-element.ts
|
|
722
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
1011
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
723
1012
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
724
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
725
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
1013
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1014
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
726
1015
|
{
|
|
727
1016
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
728
1017
|
if (!(memberName in newVnodeAttrs)) {
|
|
729
|
-
setAccessor(
|
|
1018
|
+
setAccessor(
|
|
1019
|
+
elm,
|
|
1020
|
+
memberName,
|
|
1021
|
+
oldVnodeAttrs[memberName],
|
|
1022
|
+
void 0,
|
|
1023
|
+
isSvgMode2,
|
|
1024
|
+
newVnode.$flags$);
|
|
730
1025
|
}
|
|
731
1026
|
}
|
|
732
1027
|
}
|
|
733
1028
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
734
|
-
setAccessor(
|
|
1029
|
+
setAccessor(
|
|
1030
|
+
elm,
|
|
1031
|
+
memberName,
|
|
1032
|
+
oldVnodeAttrs[memberName],
|
|
1033
|
+
newVnodeAttrs[memberName],
|
|
1034
|
+
isSvgMode2,
|
|
1035
|
+
newVnode.$flags$);
|
|
735
1036
|
}
|
|
736
1037
|
};
|
|
737
1038
|
function sortedAttrNames(attrNames) {
|
|
@@ -743,16 +1044,13 @@ function sortedAttrNames(attrNames) {
|
|
|
743
1044
|
attrNames
|
|
744
1045
|
);
|
|
745
1046
|
}
|
|
746
|
-
|
|
747
|
-
// src/runtime/vdom/vdom-render.ts
|
|
748
|
-
var scopeId;
|
|
749
1047
|
var contentRef;
|
|
750
1048
|
var hostTagName;
|
|
751
1049
|
var useNativeShadowDom = false;
|
|
752
1050
|
var checkSlotFallbackVisibility = false;
|
|
753
1051
|
var checkSlotRelocate = false;
|
|
754
1052
|
var isSvgMode = false;
|
|
755
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
1053
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
756
1054
|
var _a;
|
|
757
1055
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
758
1056
|
let i2 = 0;
|
|
@@ -762,9 +1060,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
762
1060
|
if (!useNativeShadowDom) {
|
|
763
1061
|
checkSlotRelocate = true;
|
|
764
1062
|
if (newVNode2.$tag$ === "slot") {
|
|
765
|
-
if (scopeId) {
|
|
766
|
-
parentElm.classList.add(scopeId + "-s");
|
|
767
|
-
}
|
|
768
1063
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
769
1064
|
// slot element has fallback content
|
|
770
1065
|
// still create an element that "mocks" the slot element
|
|
@@ -778,14 +1073,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
778
1073
|
}
|
|
779
1074
|
}
|
|
780
1075
|
if (newVNode2.$text$ !== null) {
|
|
781
|
-
elm = newVNode2.$elm$ =
|
|
1076
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
782
1077
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
783
|
-
elm = newVNode2.$elm$ =
|
|
1078
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1079
|
+
{
|
|
1080
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1081
|
+
}
|
|
784
1082
|
} else {
|
|
785
1083
|
if (!isSvgMode) {
|
|
786
1084
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
787
1085
|
}
|
|
788
|
-
|
|
1086
|
+
if (!win.document) {
|
|
1087
|
+
throw new Error(
|
|
1088
|
+
"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."
|
|
1089
|
+
);
|
|
1090
|
+
}
|
|
1091
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
789
1092
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
790
1093
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
791
1094
|
) ;
|
|
@@ -795,14 +1098,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
795
1098
|
{
|
|
796
1099
|
updateElement(null, newVNode2, isSvgMode);
|
|
797
1100
|
}
|
|
798
|
-
const rootNode = elm.getRootNode();
|
|
799
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
800
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
801
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
802
|
-
}
|
|
803
1101
|
if (newVNode2.$children$) {
|
|
804
1102
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
805
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
1103
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
806
1104
|
if (childNode) {
|
|
807
1105
|
elm.appendChild(childNode);
|
|
808
1106
|
}
|
|
@@ -823,6 +1121,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
823
1121
|
elm["s-cr"] = contentRef;
|
|
824
1122
|
elm["s-sn"] = newVNode2.$name$ || "";
|
|
825
1123
|
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1124
|
+
patchSlotNode(elm);
|
|
826
1125
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
827
1126
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
828
1127
|
{
|
|
@@ -835,19 +1134,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
835
1134
|
};
|
|
836
1135
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
837
1136
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
838
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
839
|
-
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
840
|
-
let node = parentElm;
|
|
841
|
-
while (node = node.nextSibling) {
|
|
842
|
-
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
843
|
-
oldSlotChildNodes.push(node);
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
}
|
|
1137
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
847
1138
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
848
1139
|
const childNode = oldSlotChildNodes[i2];
|
|
849
1140
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
850
|
-
insertBefore(
|
|
1141
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
851
1142
|
childNode["s-ol"].remove();
|
|
852
1143
|
childNode["s-ol"] = void 0;
|
|
853
1144
|
childNode["s-sh"] = void 0;
|
|
@@ -857,7 +1148,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
857
1148
|
putBackInOriginalLocation(childNode, recursive);
|
|
858
1149
|
}
|
|
859
1150
|
}
|
|
860
|
-
plt.$flags$ &=
|
|
1151
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
861
1152
|
};
|
|
862
1153
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
863
1154
|
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
@@ -867,7 +1158,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
867
1158
|
}
|
|
868
1159
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
869
1160
|
if (vnodes[startIdx]) {
|
|
870
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
1161
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
871
1162
|
if (childNode) {
|
|
872
1163
|
vnodes[startIdx].$elm$ = childNode;
|
|
873
1164
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -954,7 +1245,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
954
1245
|
if (idxInOld >= 0) {
|
|
955
1246
|
elmToMove = oldCh[idxInOld];
|
|
956
1247
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
957
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
1248
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
958
1249
|
} else {
|
|
959
1250
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
960
1251
|
oldCh[idxInOld] = void 0;
|
|
@@ -962,12 +1253,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
962
1253
|
}
|
|
963
1254
|
newStartVnode = newCh[++newStartIdx];
|
|
964
1255
|
} else {
|
|
965
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
1256
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
966
1257
|
newStartVnode = newCh[++newStartIdx];
|
|
967
1258
|
}
|
|
968
1259
|
if (node) {
|
|
969
1260
|
{
|
|
970
|
-
insertBefore(
|
|
1261
|
+
insertBefore(
|
|
1262
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
1263
|
+
node,
|
|
1264
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1265
|
+
);
|
|
971
1266
|
}
|
|
972
1267
|
}
|
|
973
1268
|
}
|
|
@@ -988,28 +1283,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
988
1283
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
989
1284
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
990
1285
|
if (leftVNode.$tag$ === "slot") {
|
|
991
|
-
if (
|
|
992
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
993
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
994
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
995
|
-
// hydration comments to be removed
|
|
996
|
-
leftVNode.$elm$.nodeType !== 8
|
|
997
|
-
) {
|
|
998
|
-
return false;
|
|
999
|
-
}
|
|
1000
1286
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1001
1287
|
}
|
|
1002
1288
|
if (!isInitialRender) {
|
|
1003
1289
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1004
1290
|
}
|
|
1291
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1292
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1293
|
+
}
|
|
1005
1294
|
return true;
|
|
1006
1295
|
}
|
|
1007
1296
|
return false;
|
|
1008
1297
|
};
|
|
1009
|
-
var referenceNode = (node) =>
|
|
1010
|
-
return node && node["s-ol"] || node;
|
|
1011
|
-
};
|
|
1012
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
1298
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
1013
1299
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1014
1300
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1015
1301
|
const oldChildren = oldVNode.$children$;
|
|
@@ -1022,9 +1308,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1022
1308
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1023
1309
|
}
|
|
1024
1310
|
{
|
|
1025
|
-
|
|
1026
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1027
|
-
}
|
|
1311
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1028
1312
|
}
|
|
1029
1313
|
if (oldChildren !== null && newChildren !== null) {
|
|
1030
1314
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -1038,7 +1322,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1038
1322
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1039
1323
|
) {
|
|
1040
1324
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1041
|
-
}
|
|
1325
|
+
} else ;
|
|
1042
1326
|
if (isSvgMode && tag === "svg") {
|
|
1043
1327
|
isSvgMode = false;
|
|
1044
1328
|
}
|
|
@@ -1048,45 +1332,19 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1048
1332
|
elm.data = text;
|
|
1049
1333
|
}
|
|
1050
1334
|
};
|
|
1051
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
1052
|
-
const childNodes = elm.childNodes;
|
|
1053
|
-
for (const childNode of childNodes) {
|
|
1054
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1055
|
-
if (childNode["s-sr"]) {
|
|
1056
|
-
const slotName = childNode["s-sn"];
|
|
1057
|
-
childNode.hidden = false;
|
|
1058
|
-
for (const siblingNode of childNodes) {
|
|
1059
|
-
if (siblingNode !== childNode) {
|
|
1060
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
1061
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
1062
|
-
childNode.hidden = true;
|
|
1063
|
-
break;
|
|
1064
|
-
}
|
|
1065
|
-
} else {
|
|
1066
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
1067
|
-
childNode.hidden = true;
|
|
1068
|
-
break;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
updateFallbackSlotVisibility(childNode);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
};
|
|
1078
1335
|
var relocateNodes = [];
|
|
1079
1336
|
var markSlotContentForRelocation = (elm) => {
|
|
1080
1337
|
let node;
|
|
1081
1338
|
let hostContentNodes;
|
|
1082
1339
|
let j;
|
|
1083
|
-
|
|
1340
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1341
|
+
for (const childNode of children) {
|
|
1084
1342
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1085
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
1343
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1086
1344
|
const slotName = childNode["s-sn"];
|
|
1087
1345
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1088
1346
|
node = hostContentNodes[j];
|
|
1089
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (
|
|
1347
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
|
|
1090
1348
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1091
1349
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1092
1350
|
checkSlotFallbackVisibility = true;
|
|
@@ -1124,21 +1382,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1124
1382
|
}
|
|
1125
1383
|
}
|
|
1126
1384
|
};
|
|
1127
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1128
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1129
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1130
|
-
return true;
|
|
1131
|
-
}
|
|
1132
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
1133
|
-
return true;
|
|
1134
|
-
}
|
|
1135
|
-
return false;
|
|
1136
|
-
}
|
|
1137
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
1138
|
-
return true;
|
|
1139
|
-
}
|
|
1140
|
-
return slotName === "";
|
|
1141
|
-
};
|
|
1142
1385
|
var nullifyVNodeRefs = (vNode) => {
|
|
1143
1386
|
{
|
|
1144
1387
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1146,15 +1389,17 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1146
1389
|
}
|
|
1147
1390
|
};
|
|
1148
1391
|
var insertBefore = (parent, newNode, reference) => {
|
|
1149
|
-
|
|
1150
|
-
|
|
1392
|
+
{
|
|
1393
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1394
|
+
}
|
|
1151
1395
|
};
|
|
1152
1396
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1153
1397
|
var _a, _b, _c, _d;
|
|
1154
1398
|
const hostElm = hostRef.$hostElement$;
|
|
1155
1399
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1156
1400
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1157
|
-
const
|
|
1401
|
+
const isHostElement = isHost(renderFnResults);
|
|
1402
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
1158
1403
|
hostTagName = hostElm.tagName;
|
|
1159
1404
|
if (cmpMeta.$attrsToReflect$) {
|
|
1160
1405
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
@@ -1173,10 +1418,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1173
1418
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1174
1419
|
hostRef.$vnode$ = rootVnode;
|
|
1175
1420
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1176
|
-
|
|
1177
|
-
scopeId = hostElm["s-sc"];
|
|
1178
|
-
}
|
|
1179
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1421
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1180
1422
|
{
|
|
1181
1423
|
contentRef = hostElm["s-cr"];
|
|
1182
1424
|
checkSlotFallbackVisibility = false;
|
|
@@ -1188,8 +1430,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1188
1430
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1189
1431
|
for (const relocateData of relocateNodes) {
|
|
1190
1432
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1191
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
1192
|
-
const orgLocationNode =
|
|
1433
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1434
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1193
1435
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1194
1436
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1195
1437
|
}
|
|
@@ -1204,7 +1446,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1204
1446
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1205
1447
|
while (orgLocationNode) {
|
|
1206
1448
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1207
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1449
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1208
1450
|
refNode = refNode.nextSibling;
|
|
1209
1451
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1210
1452
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1217,18 +1459,20 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1217
1459
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1218
1460
|
}
|
|
1219
1461
|
}
|
|
1220
|
-
|
|
1462
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1463
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1464
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1221
1465
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1222
1466
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1223
1467
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1224
1468
|
}
|
|
1225
1469
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1226
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1470
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1227
1471
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1228
1472
|
}
|
|
1229
1473
|
}
|
|
1230
1474
|
}
|
|
1231
|
-
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](
|
|
1475
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1232
1476
|
} else {
|
|
1233
1477
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1234
1478
|
if (isInitialLoad) {
|
|
@@ -1242,7 +1486,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1242
1486
|
if (checkSlotFallbackVisibility) {
|
|
1243
1487
|
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1244
1488
|
}
|
|
1245
|
-
plt.$flags$ &=
|
|
1489
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1246
1490
|
relocateNodes.length = 0;
|
|
1247
1491
|
}
|
|
1248
1492
|
contentRef = void 0;
|
|
@@ -1251,7 +1495,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1251
1495
|
// src/runtime/update-component.ts
|
|
1252
1496
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1253
1497
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1254
|
-
ancestorComponent["s-p"].push(
|
|
1498
|
+
const index = ancestorComponent["s-p"].push(
|
|
1499
|
+
new Promise(
|
|
1500
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1501
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1502
|
+
r();
|
|
1503
|
+
}
|
|
1504
|
+
)
|
|
1505
|
+
);
|
|
1255
1506
|
}
|
|
1256
1507
|
};
|
|
1257
1508
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1264,6 +1515,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1264
1515
|
}
|
|
1265
1516
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1266
1517
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1518
|
+
if (isInitialLoad) {
|
|
1519
|
+
queueMicrotask(() => {
|
|
1520
|
+
dispatch();
|
|
1521
|
+
});
|
|
1522
|
+
return;
|
|
1523
|
+
}
|
|
1267
1524
|
return writeTask(dispatch) ;
|
|
1268
1525
|
};
|
|
1269
1526
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -1280,18 +1537,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1280
1537
|
{
|
|
1281
1538
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1282
1539
|
if (hostRef.$queuedListeners$) {
|
|
1283
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1540
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1284
1541
|
hostRef.$queuedListeners$ = void 0;
|
|
1285
1542
|
}
|
|
1286
1543
|
}
|
|
1287
|
-
|
|
1288
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1289
|
-
}
|
|
1544
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1290
1545
|
} else {
|
|
1291
|
-
|
|
1292
|
-
maybePromise = safeCall(instance, "componentWillUpdate");
|
|
1293
|
-
}
|
|
1546
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1294
1547
|
}
|
|
1548
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1295
1549
|
endSchedule();
|
|
1296
1550
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1297
1551
|
};
|
|
@@ -1334,7 +1588,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1334
1588
|
try {
|
|
1335
1589
|
instance = instance.render && instance.render();
|
|
1336
1590
|
{
|
|
1337
|
-
hostRef.$flags$ &=
|
|
1591
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
1338
1592
|
}
|
|
1339
1593
|
{
|
|
1340
1594
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -1357,17 +1611,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1357
1611
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1358
1612
|
const instance = hostRef.$lazyInstance$ ;
|
|
1359
1613
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1360
|
-
|
|
1361
|
-
safeCall(instance, "componentDidRender");
|
|
1362
|
-
}
|
|
1614
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1363
1615
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1364
1616
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1365
1617
|
{
|
|
1366
1618
|
addHydratedFlag(elm);
|
|
1367
1619
|
}
|
|
1368
|
-
|
|
1369
|
-
safeCall(instance, "componentDidLoad");
|
|
1370
|
-
}
|
|
1620
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1371
1621
|
endPostUpdate();
|
|
1372
1622
|
{
|
|
1373
1623
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1376,9 +1626,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1376
1626
|
}
|
|
1377
1627
|
}
|
|
1378
1628
|
} else {
|
|
1379
|
-
|
|
1380
|
-
safeCall(instance, "componentDidUpdate");
|
|
1381
|
-
}
|
|
1629
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1382
1630
|
endPostUpdate();
|
|
1383
1631
|
}
|
|
1384
1632
|
{
|
|
@@ -1392,13 +1640,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1392
1640
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1393
1641
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1394
1642
|
}
|
|
1395
|
-
hostRef.$flags$ &=
|
|
1643
|
+
hostRef.$flags$ &= -517;
|
|
1396
1644
|
}
|
|
1397
1645
|
};
|
|
1398
1646
|
var forceUpdate = (ref) => {
|
|
1647
|
+
var _a;
|
|
1399
1648
|
{
|
|
1400
1649
|
const hostRef = getHostRef(ref);
|
|
1401
|
-
const isConnected = hostRef.$hostElement
|
|
1650
|
+
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
|
1402
1651
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1403
1652
|
scheduleUpdate(hostRef, false);
|
|
1404
1653
|
}
|
|
@@ -1406,17 +1655,14 @@ var forceUpdate = (ref) => {
|
|
|
1406
1655
|
}
|
|
1407
1656
|
};
|
|
1408
1657
|
var appDidLoad = (who) => {
|
|
1409
|
-
{
|
|
1410
|
-
addHydratedFlag(doc.documentElement);
|
|
1411
|
-
}
|
|
1412
1658
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1413
1659
|
};
|
|
1414
|
-
var safeCall = (instance, method, arg) => {
|
|
1660
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1415
1661
|
if (instance && instance[method]) {
|
|
1416
1662
|
try {
|
|
1417
1663
|
return instance[method](arg);
|
|
1418
1664
|
} catch (e) {
|
|
1419
|
-
consoleError(e);
|
|
1665
|
+
consoleError(e, elm);
|
|
1420
1666
|
}
|
|
1421
1667
|
}
|
|
1422
1668
|
return void 0;
|
|
@@ -1430,16 +1676,21 @@ var addHydratedFlag = (elm) => {
|
|
|
1430
1676
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1431
1677
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1432
1678
|
const hostRef = getHostRef(ref);
|
|
1679
|
+
if (!hostRef) {
|
|
1680
|
+
return;
|
|
1681
|
+
}
|
|
1433
1682
|
if (!hostRef) {
|
|
1434
1683
|
throw new Error(
|
|
1435
|
-
`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/
|
|
1684
|
+
`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).`
|
|
1436
1685
|
);
|
|
1437
1686
|
}
|
|
1438
1687
|
const elm = hostRef.$hostElement$ ;
|
|
1439
1688
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1440
1689
|
const flags = hostRef.$flags$;
|
|
1441
1690
|
const instance = hostRef.$lazyInstance$ ;
|
|
1442
|
-
newVal = parsePropertyValue(
|
|
1691
|
+
newVal = parsePropertyValue(
|
|
1692
|
+
newVal,
|
|
1693
|
+
cmpMeta.$members$[propName][0]);
|
|
1443
1694
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1444
1695
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1445
1696
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -1458,6 +1709,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1458
1709
|
}
|
|
1459
1710
|
}
|
|
1460
1711
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1712
|
+
if (instance.componentShouldUpdate) {
|
|
1713
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1714
|
+
return;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1461
1717
|
scheduleUpdate(hostRef, false);
|
|
1462
1718
|
}
|
|
1463
1719
|
}
|
|
@@ -1475,15 +1731,77 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1475
1731
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1476
1732
|
members.map(([memberName, [memberFlags]]) => {
|
|
1477
1733
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1734
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1735
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1736
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1737
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1738
|
+
Object.defineProperty(prototype, memberName, {
|
|
1739
|
+
get() {
|
|
1740
|
+
{
|
|
1741
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1742
|
+
return getValue(this, memberName);
|
|
1743
|
+
}
|
|
1744
|
+
const ref = getHostRef(this);
|
|
1745
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1746
|
+
if (!instance) return;
|
|
1747
|
+
return instance[memberName];
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
configurable: true,
|
|
1751
|
+
enumerable: true
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1478
1754
|
Object.defineProperty(prototype, memberName, {
|
|
1479
|
-
get() {
|
|
1480
|
-
return getValue(this, memberName);
|
|
1481
|
-
},
|
|
1482
1755
|
set(newValue) {
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1756
|
+
const ref = getHostRef(this);
|
|
1757
|
+
if (!ref) {
|
|
1758
|
+
return;
|
|
1759
|
+
}
|
|
1760
|
+
if (origSetter) {
|
|
1761
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1762
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1763
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1764
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1765
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1766
|
+
}
|
|
1767
|
+
origSetter.apply(this, [
|
|
1768
|
+
parsePropertyValue(
|
|
1769
|
+
newValue,
|
|
1770
|
+
memberFlags)
|
|
1771
|
+
]);
|
|
1772
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1773
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1774
|
+
return;
|
|
1775
|
+
}
|
|
1776
|
+
{
|
|
1777
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1778
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1779
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1780
|
+
ref.$onReadyPromise$.then(() => {
|
|
1781
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1782
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1783
|
+
}
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
const setterSetVal = () => {
|
|
1789
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1790
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1791
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1792
|
+
}
|
|
1793
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1794
|
+
newValue,
|
|
1795
|
+
memberFlags);
|
|
1796
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1797
|
+
};
|
|
1798
|
+
if (ref.$lazyInstance$) {
|
|
1799
|
+
setterSetVal();
|
|
1800
|
+
} else {
|
|
1801
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1487
1805
|
});
|
|
1488
1806
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1489
1807
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -1504,7 +1822,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1504
1822
|
plt.jmp(() => {
|
|
1505
1823
|
var _a2;
|
|
1506
1824
|
const propName = attrNameToPropName.get(attrName);
|
|
1507
|
-
if (this.hasOwnProperty(propName)) {
|
|
1825
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1508
1826
|
newValue = this[propName];
|
|
1509
1827
|
delete this[propName];
|
|
1510
1828
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1513,7 +1831,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1513
1831
|
} else if (propName == null) {
|
|
1514
1832
|
const hostRef = getHostRef(this);
|
|
1515
1833
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1516
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1834
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1517
1835
|
const instance = hostRef.$lazyInstance$ ;
|
|
1518
1836
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
1519
1837
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
@@ -1524,7 +1842,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1524
1842
|
}
|
|
1525
1843
|
return;
|
|
1526
1844
|
}
|
|
1527
|
-
|
|
1845
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1846
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1847
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1848
|
+
this[propName] = newValue;
|
|
1849
|
+
}
|
|
1528
1850
|
});
|
|
1529
1851
|
};
|
|
1530
1852
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1553,7 +1875,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1553
1875
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1554
1876
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1555
1877
|
if (bundleId) {
|
|
1556
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1878
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1557
1879
|
if (CstrImport && "then" in CstrImport) {
|
|
1558
1880
|
const endLoad = uniqueTime();
|
|
1559
1881
|
Cstr = await CstrImport;
|
|
@@ -1578,15 +1900,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1578
1900
|
try {
|
|
1579
1901
|
new Cstr(hostRef);
|
|
1580
1902
|
} catch (e) {
|
|
1581
|
-
consoleError(e);
|
|
1903
|
+
consoleError(e, elm);
|
|
1582
1904
|
}
|
|
1583
1905
|
{
|
|
1584
|
-
hostRef.$flags$ &=
|
|
1906
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1585
1907
|
}
|
|
1586
1908
|
{
|
|
1587
1909
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1588
1910
|
}
|
|
1589
1911
|
endNewInstance();
|
|
1912
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1590
1913
|
} else {
|
|
1591
1914
|
Cstr = elm.constructor;
|
|
1592
1915
|
const cmpTag = elm.localName;
|
|
@@ -1613,13 +1936,19 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1613
1936
|
schedule();
|
|
1614
1937
|
}
|
|
1615
1938
|
};
|
|
1616
|
-
var fireConnectedCallback = (instance) => {
|
|
1939
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1940
|
+
{
|
|
1941
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1942
|
+
}
|
|
1617
1943
|
};
|
|
1618
1944
|
|
|
1619
1945
|
// src/runtime/connected-callback.ts
|
|
1620
1946
|
var connectedCallback = (elm) => {
|
|
1621
1947
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1622
1948
|
const hostRef = getHostRef(elm);
|
|
1949
|
+
if (!hostRef) {
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1623
1952
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1624
1953
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1625
1954
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
@@ -1653,52 +1982,72 @@ var connectedCallback = (elm) => {
|
|
|
1653
1982
|
}
|
|
1654
1983
|
} else {
|
|
1655
1984
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1656
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1657
|
-
hostRef.$
|
|
1985
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1986
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1987
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1988
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1658
1989
|
}
|
|
1659
1990
|
}
|
|
1660
1991
|
endConnected();
|
|
1661
1992
|
}
|
|
1662
1993
|
};
|
|
1663
1994
|
var setContentReference = (elm) => {
|
|
1664
|
-
|
|
1995
|
+
if (!win.document) {
|
|
1996
|
+
return;
|
|
1997
|
+
}
|
|
1998
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
1665
1999
|
""
|
|
1666
2000
|
);
|
|
1667
2001
|
contentRefElm["s-cn"] = true;
|
|
1668
2002
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1669
2003
|
};
|
|
1670
|
-
var disconnectInstance = (instance) => {
|
|
2004
|
+
var disconnectInstance = (instance, elm) => {
|
|
2005
|
+
{
|
|
2006
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
2007
|
+
}
|
|
1671
2008
|
};
|
|
1672
2009
|
var disconnectedCallback = async (elm) => {
|
|
1673
2010
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1674
2011
|
const hostRef = getHostRef(elm);
|
|
1675
2012
|
{
|
|
1676
|
-
if (hostRef.$rmListeners$) {
|
|
2013
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
1677
2014
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1678
2015
|
hostRef.$rmListeners$ = void 0;
|
|
1679
2016
|
}
|
|
1680
2017
|
}
|
|
1681
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1682
|
-
hostRef.$
|
|
2018
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2019
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
2020
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2021
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1683
2022
|
}
|
|
1684
2023
|
}
|
|
2024
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2025
|
+
rootAppliedStyles.delete(elm);
|
|
2026
|
+
}
|
|
2027
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2028
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2029
|
+
}
|
|
1685
2030
|
};
|
|
1686
2031
|
|
|
1687
2032
|
// src/runtime/bootstrap-lazy.ts
|
|
1688
2033
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1689
2034
|
var _a;
|
|
2035
|
+
if (!win.document) {
|
|
2036
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2037
|
+
return;
|
|
2038
|
+
}
|
|
1690
2039
|
const endBootstrap = createTime();
|
|
1691
2040
|
const cmpTags = [];
|
|
1692
2041
|
const exclude = options.exclude || [];
|
|
1693
2042
|
const customElements2 = win.customElements;
|
|
1694
|
-
const head =
|
|
2043
|
+
const head = win.document.head;
|
|
1695
2044
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1696
|
-
const dataStyles = /* @__PURE__ */
|
|
2045
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1697
2046
|
const deferredConnectedCallbacks = [];
|
|
1698
2047
|
let appLoadFallback;
|
|
1699
2048
|
let isBootstrapping = true;
|
|
1700
2049
|
Object.assign(plt, options);
|
|
1701
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2050
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1702
2051
|
let hasSlotRelocation = false;
|
|
1703
2052
|
lazyBundles.map((lazyBundle) => {
|
|
1704
2053
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1735,12 +2084,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1735
2084
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1736
2085
|
{
|
|
1737
2086
|
if (!self.shadowRoot) {
|
|
1738
|
-
|
|
1739
|
-
self.attachShadow({
|
|
1740
|
-
mode: "open",
|
|
1741
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
1742
|
-
});
|
|
1743
|
-
}
|
|
2087
|
+
createShadowRoot.call(self, cmpMeta);
|
|
1744
2088
|
} else {
|
|
1745
2089
|
if (self.shadowRoot.mode !== "open") {
|
|
1746
2090
|
throw new Error(
|
|
@@ -1753,6 +2097,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1753
2097
|
}
|
|
1754
2098
|
connectedCallback() {
|
|
1755
2099
|
const hostRef = getHostRef(this);
|
|
2100
|
+
if (!hostRef) {
|
|
2101
|
+
return;
|
|
2102
|
+
}
|
|
1756
2103
|
if (!this.hasRegisteredEventListeners) {
|
|
1757
2104
|
this.hasRegisteredEventListeners = true;
|
|
1758
2105
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
@@ -1769,9 +2116,24 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1769
2116
|
}
|
|
1770
2117
|
disconnectedCallback() {
|
|
1771
2118
|
plt.jmp(() => disconnectedCallback(this));
|
|
2119
|
+
plt.raf(() => {
|
|
2120
|
+
var _a3;
|
|
2121
|
+
const hostRef = getHostRef(this);
|
|
2122
|
+
if (!hostRef) {
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2126
|
+
if (i2 > -1) {
|
|
2127
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2128
|
+
}
|
|
2129
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2130
|
+
delete hostRef.$vnode$.$elm$;
|
|
2131
|
+
}
|
|
2132
|
+
});
|
|
1772
2133
|
}
|
|
1773
2134
|
componentOnReady() {
|
|
1774
|
-
|
|
2135
|
+
var _a3;
|
|
2136
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
1775
2137
|
}
|
|
1776
2138
|
};
|
|
1777
2139
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
@@ -1793,7 +2155,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1793
2155
|
}
|
|
1794
2156
|
if (dataStyles.innerHTML.length) {
|
|
1795
2157
|
dataStyles.setAttribute("data-styles", "");
|
|
1796
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2158
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1797
2159
|
if (nonce != null) {
|
|
1798
2160
|
dataStyles.setAttribute("nonce", nonce);
|
|
1799
2161
|
}
|
|
@@ -1814,9 +2176,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1814
2176
|
// src/runtime/fragment.ts
|
|
1815
2177
|
var Fragment = (_, children) => children;
|
|
1816
2178
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1817
|
-
if (listeners) {
|
|
2179
|
+
if (listeners && win.document) {
|
|
1818
2180
|
listeners.map(([flags, name, method]) => {
|
|
1819
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2181
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
1820
2182
|
const handler = hostListenerProxy(hostRef, method);
|
|
1821
2183
|
const opts = hostListenerOpts(flags);
|
|
1822
2184
|
plt.ael(target, name, handler, opts);
|
|
@@ -1835,12 +2197,16 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1835
2197
|
}
|
|
1836
2198
|
}
|
|
1837
2199
|
} catch (e) {
|
|
1838
|
-
consoleError(e);
|
|
2200
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1839
2201
|
}
|
|
1840
2202
|
};
|
|
1841
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1842
|
-
if (flags & 4 /* TargetDocument */)
|
|
1843
|
-
|
|
2203
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2204
|
+
if (flags & 4 /* TargetDocument */) {
|
|
2205
|
+
return doc;
|
|
2206
|
+
}
|
|
2207
|
+
if (flags & 8 /* TargetWindow */) {
|
|
2208
|
+
return win;
|
|
2209
|
+
}
|
|
1844
2210
|
return elm;
|
|
1845
2211
|
};
|
|
1846
2212
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1857,6 +2223,7 @@ exports.bootstrapLazy = bootstrapLazy;
|
|
|
1857
2223
|
exports.createEvent = createEvent;
|
|
1858
2224
|
exports.forceUpdate = forceUpdate;
|
|
1859
2225
|
exports.getElement = getElement;
|
|
2226
|
+
exports.globalFn = globalFn;
|
|
1860
2227
|
exports.h = h;
|
|
1861
2228
|
exports.promiseResolve = promiseResolve;
|
|
1862
2229
|
exports.registerInstance = registerInstance;
|