@swisspost/design-system-components 10.0.0-next.40 → 10.0.0-next.41
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/breakpoints-DIH5Oaz7.js +186 -0
- package/dist/cjs/event-from-AKK8RQrn.js +107 -0
- package/dist/cjs/{get-root-8102fecd.js → get-root-DmyBVSJ_.js} +1 -1
- package/dist/cjs/{index-b60129c4.js → index-CRMt-jq2.js} +1172 -309
- package/dist/cjs/index.cjs.js +0 -70
- package/dist/cjs/loader.cjs.js +3 -6
- package/dist/cjs/{package-b731881e.js → package-C2pR6Vs2.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +177 -10
- package/dist/cjs/post-avatar.cjs.entry.js +151 -8
- package/dist/cjs/post-back-to-top.cjs.entry.js +86 -9
- package/dist/cjs/post-banner.cjs.entry.js +81 -9
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +62 -8
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +119 -7
- package/dist/cjs/post-card-control.cjs.entry.js +283 -8
- package/dist/cjs/post-closebutton_15.cjs.entry.js +4376 -30
- package/dist/cjs/post-collapsible_2.cjs.entry.js +196 -10
- package/dist/cjs/post-components.cjs.js +7 -8
- package/dist/cjs/post-footer.cjs.entry.js +59 -8
- package/dist/cjs/post-linkarea.cjs.entry.js +24 -6
- package/dist/cjs/post-popover.cjs.entry.js +151 -8
- package/dist/cjs/post-rating.cjs.entry.js +115 -8
- package/dist/cjs/post-tab-header.cjs.entry.js +26 -9
- package/dist/cjs/post-tab-panel.cjs.entry.js +28 -9
- package/dist/cjs/post-tabs.cjs.entry.js +165 -7
- package/dist/cjs/post-tag.cjs.entry.js +50 -8
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +5195 -7
- package/dist/cjs/post-tooltip.cjs.entry.js +78 -9
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/post-accordion/post-accordion.js +39 -23
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +26 -11
- package/dist/collection/components/post-avatar/post-avatar.js +12 -9
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +4 -3
- package/dist/collection/components/post-banner/post-banner.js +18 -9
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +4 -6
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +13 -9
- package/dist/collection/components/post-card-control/post-card-control.js +33 -16
- package/dist/collection/components/post-collapsible/post-collapsible.js +6 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +21 -9
- package/dist/collection/components/post-footer/post-footer.js +8 -7
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +28 -16
- package/dist/collection/components/post-icon/post-icon.js +66 -54
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +17 -13
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +43 -24
- package/dist/collection/components/post-list/post-list.js +12 -3
- package/dist/collection/components/post-logo/post-logo.js +3 -4
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +12 -6
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +34 -20
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +43 -21
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +11 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +9 -5
- package/dist/collection/components/post-popover/post-popover.js +19 -5
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +44 -16
- package/dist/collection/components/post-rating/post-rating.js +25 -5
- package/dist/collection/components/post-tab-header/post-tab-header.js +4 -6
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -6
- package/dist/collection/components/post-tabs/post-tabs.js +4 -3
- package/dist/collection/components/post-tag/post-tag.js +11 -9
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +7 -2
- package/dist/collection/components/post-tooltip/post-tooltip.js +24 -6
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +20 -12
- package/dist/collection/index.js +1 -37
- package/dist/collection/utils/breakpoints.js +38 -45
- package/dist/collection/utils/event-from.js +103 -0
- package/dist/collection/utils/index.js +1 -1
- package/dist/components/index.js +2315 -37
- package/dist/components/p-1KLiMO0w.js +3 -0
- package/dist/components/p-8U5GFtQP.js +105 -0
- package/dist/components/{post-menu2.js → p-BLhBouGz.js} +51 -30
- package/dist/{esm/index-ffccd040.js → components/p-CV7fm1rW.js} +1 -1
- package/dist/components/{post-menu-trigger2.js → p-CaPj3whI.js} +14 -12
- package/{loaders/post-breadcrumb-item2.js → dist/components/p-Cpaqct04.js} +9 -11
- package/dist/components/{post-accordion-item2.js → p-CtNCtg2z.js} +32 -21
- package/dist/components/p-Cx0AiN2A.js +182 -0
- package/dist/components/{post-collapsible-trigger2.js → p-D3LhzIrC.js} +25 -14
- package/dist/components/{get-root.js → p-DBHo9yGF.js} +1 -1
- package/dist/components/p-DQuPPEca.js +31 -0
- package/dist/components/{post-accordion2.js → p-DlEtlaNu.js} +41 -28
- package/{loaders/post-collapsible2.js → dist/components/p-DphlfQse.js} +11 -8
- package/dist/components/{post-popovercontainer2.js → p-elg4VvHg.js} +246 -278
- package/{loaders/post-icon2.js → dist/components/p-fmA57Ivd.js} +52 -54
- package/dist/components/post-accordion-item.js +1 -1
- package/dist/components/post-accordion.js +1 -1
- package/dist/components/post-avatar.js +183 -1
- package/dist/components/post-back-to-top.js +115 -1
- package/dist/components/post-banner.js +120 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumbs.js +182 -1
- package/dist/components/post-card-control.js +322 -1
- package/dist/components/post-closebutton.js +37 -1
- package/dist/components/post-collapsible-trigger.js +1 -1
- package/dist/components/post-collapsible.js +1 -1
- package/dist/components/post-footer.js +112 -1
- package/dist/components/post-header.js +273 -1
- package/dist/components/post-icon.js +1 -1
- package/dist/components/post-language-option.js +96 -1
- package/dist/components/post-language-switch.js +154 -1
- package/dist/components/post-linkarea.js +41 -1
- package/dist/components/post-list-item.js +34 -1
- package/dist/components/post-list.js +57 -1
- package/dist/components/post-logo.js +54 -1
- package/dist/components/post-mainnavigation.js +181 -1
- package/dist/components/post-megadropdown-trigger.js +132 -1
- package/dist/components/post-megadropdown.js +194 -1
- package/dist/components/post-menu-item.js +1 -1
- package/dist/components/post-menu-trigger.js +1 -1
- package/dist/components/post-menu.js +1 -1
- package/dist/components/post-popover.js +184 -1
- package/dist/components/post-popovercontainer.js +1 -1
- package/dist/components/post-rating.js +148 -1
- package/dist/components/post-tab-header.js +48 -1
- package/dist/components/post-tab-panel.js +50 -1
- package/dist/components/post-tabs.js +186 -1
- package/dist/components/post-tag.js +82 -1
- package/dist/components/post-togglebutton.js +52 -1
- package/dist/components/post-tooltip-trigger.js +5218 -1
- package/dist/components/post-tooltip.js +110 -1
- package/dist/docs.d.ts +8 -0
- package/dist/docs.json +416 -116
- package/dist/esm/breakpoints-DyVir0ex.js +182 -0
- package/dist/esm/event-from-8U5GFtQP.js +105 -0
- package/{loaders/get-root.js → dist/esm/get-root-D9QC9-TY.js} +1 -1
- package/{loaders/index2.js → dist/esm/index-BWC0gtGU.js} +1 -1
- package/dist/esm/{index-f4d19816.js → index-CVhzhVv0.js} +1169 -305
- package/dist/esm/index.js +1 -29
- package/dist/esm/loader.js +3 -4
- package/dist/esm/package-1KLiMO0w.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +180 -7
- package/dist/esm/post-avatar.entry.js +154 -5
- package/dist/esm/post-back-to-top.entry.js +89 -6
- package/dist/esm/post-banner.entry.js +85 -7
- package/dist/esm/post-breadcrumb-item_2.entry.js +65 -5
- package/dist/esm/post-breadcrumbs.entry.js +123 -5
- package/dist/esm/post-card-control.entry.js +286 -5
- package/dist/esm/post-closebutton_15.entry.js +4362 -10
- package/dist/esm/post-collapsible_2.entry.js +199 -7
- package/dist/esm/post-components.js +5 -5
- package/dist/esm/post-footer.entry.js +62 -5
- package/dist/esm/post-linkarea.entry.js +27 -3
- package/dist/esm/post-popover.entry.js +155 -6
- package/dist/esm/post-rating.entry.js +118 -5
- package/dist/esm/post-tab-header.entry.js +29 -6
- package/dist/esm/post-tab-panel.entry.js +31 -6
- package/dist/esm/post-tabs.entry.js +169 -5
- package/dist/esm/post-tag.entry.js +53 -5
- package/dist/esm/post-tooltip-trigger.entry.js +5199 -5
- package/dist/esm/post-tooltip.entry.js +81 -6
- package/dist/post-components/index.esm.js +0 -1
- package/dist/post-components/p-0d08ab13.entry.js +1 -0
- package/dist/post-components/p-1KLiMO0w.js +1 -0
- package/dist/post-components/p-1e006e29.entry.js +1 -0
- package/dist/post-components/p-3a5bdb7f.entry.js +1 -0
- package/dist/post-components/p-4214b85e.entry.js +1 -0
- package/dist/post-components/p-50916d48.entry.js +1 -0
- package/dist/post-components/p-5f4126d8.entry.js +1 -0
- package/dist/post-components/p-62982420.entry.js +1 -0
- package/dist/post-components/p-78f4dd12.entry.js +1 -0
- package/dist/post-components/p-7a7d237b.entry.js +1 -0
- package/dist/post-components/p-80174475.entry.js +1 -0
- package/dist/post-components/p-8U5GFtQP.js +1 -0
- package/dist/post-components/p-8d5a4218.entry.js +1 -0
- package/dist/post-components/p-8e89ccc1.entry.js +1 -0
- package/dist/post-components/p-9003674b.entry.js +1 -0
- package/dist/post-components/p-925aee3d.entry.js +1 -0
- package/dist/post-components/p-9b446561.entry.js +1 -0
- package/dist/post-components/p-9ec29527.entry.js +1 -0
- package/dist/post-components/{p-b176309b.js → p-BWC0gtGU.js} +1 -1
- package/dist/post-components/{p-6b31a76a.js → p-Bkp2QDth.js} +1 -1
- package/dist/post-components/p-CVhzhVv0.js +2 -0
- package/dist/post-components/p-DyVir0ex.js +1 -0
- package/dist/post-components/p-ec764922.entry.js +1 -0
- package/dist/post-components/p-fa550b4a.entry.js +1 -0
- package/dist/post-components/p-fb46e260.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-header/post-header.d.ts +1 -0
- package/dist/types/components/post-icon/post-icon.d.ts +0 -4
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +1 -0
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components.d.ts +61 -1
- package/dist/types/index.d.ts +10 -37
- package/dist/types/stencil-public-runtime.d.ts +29 -1
- package/dist/types/utils/breakpoints.d.ts +12 -7
- package/dist/types/utils/event-from.d.ts +9 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/hydrate/index.d.ts +273 -0
- package/hydrate/index.js +32002 -0
- package/hydrate/index.mjs +31994 -0
- package/hydrate/package.json +12 -0
- package/package.json +45 -17
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/breakpoints-cdf1b747.js +0 -59
- package/dist/cjs/event-guard-efabc84f.js +0 -47
- package/dist/cjs/post-accordion-item-5c879102.js +0 -161
- package/dist/cjs/post-avatar-4f1681df.js +0 -162
- package/dist/cjs/post-back-to-top-abbb4ac4.js +0 -93
- package/dist/cjs/post-banner-4d99c51c.js +0 -87
- package/dist/cjs/post-breadcrumbs-5ceabb10.js +0 -126
- package/dist/cjs/post-card-control-b657aeaa.js +0 -290
- package/dist/cjs/post-collapsible-trigger-33f09d6c.js +0 -190
- package/dist/cjs/post-footer-022cf408.js +0 -66
- package/dist/cjs/post-linkarea-5fbb2e25.js +0 -30
- package/dist/cjs/post-menu-item-d4cc4742.js +0 -68
- package/dist/cjs/post-popover-b7cd0091.js +0 -150
- package/dist/cjs/post-rating-c81d1ac3.js +0 -109
- package/dist/cjs/post-tab-header-1db15093.js +0 -34
- package/dist/cjs/post-tab-panel-698981b8.js +0 -36
- package/dist/cjs/post-tabs-79eab811.js +0 -173
- package/dist/cjs/post-tag-66a52727.js +0 -60
- package/dist/cjs/post-togglebutton-a6b8b75d.js +0 -4491
- package/dist/cjs/post-tooltip-560cf42c.js +0 -74
- package/dist/cjs/post-tooltip-trigger-2a54e3e4.js +0 -4685
- package/dist/collection/utils/event-guard.js +0 -43
- package/dist/components/breakpoints.js +0 -56
- package/dist/components/event-guard.js +0 -45
- package/dist/components/index2.js +0 -88
- package/dist/components/package.js +0 -3
- package/dist/components/post-avatar2.js +0 -190
- package/dist/components/post-back-to-top2.js +0 -118
- package/dist/components/post-banner2.js +0 -121
- package/dist/components/post-breadcrumb-item2.js +0 -82
- package/dist/components/post-breadcrumbs2.js +0 -184
- package/dist/components/post-card-control2.js +0 -325
- package/dist/components/post-closebutton2.js +0 -39
- package/dist/components/post-collapsible2.js +0 -108
- package/dist/components/post-footer2.js +0 -115
- package/dist/components/post-header2.js +0 -397
- package/dist/components/post-icon2.js +0 -156
- package/dist/components/post-language-option2.js +0 -102
- package/dist/components/post-language-switch2.js +0 -143
- package/dist/components/post-linkarea2.js +0 -43
- package/dist/components/post-list-item2.js +0 -36
- package/dist/components/post-list2.js +0 -54
- package/dist/components/post-logo2.js +0 -57
- package/dist/components/post-mainnavigation2.js +0 -183
- package/dist/components/post-megadropdown-trigger2.js +0 -121
- package/dist/components/post-megadropdown2.js +0 -190
- package/dist/components/post-menu-item2.js +0 -27
- package/dist/components/post-popover2.js +0 -178
- package/dist/components/post-rating2.js +0 -138
- package/dist/components/post-tab-header2.js +0 -52
- package/dist/components/post-tab-panel2.js +0 -54
- package/dist/components/post-tabs2.js +0 -189
- package/dist/components/post-tag2.js +0 -88
- package/dist/components/post-togglebutton2.js +0 -51
- package/dist/components/post-tooltip-trigger2.js +0 -4703
- package/dist/components/post-tooltip2.js +0 -102
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/breakpoints-7812702e.js +0 -56
- package/dist/esm/event-guard-538ee077.js +0 -45
- package/dist/esm/get-root-1b1af46f.js +0 -15
- package/dist/esm/package-9374eb90.js +0 -3
- package/dist/esm/post-accordion-item-f416bd95.js +0 -158
- package/dist/esm/post-avatar-2cb5190b.js +0 -160
- package/dist/esm/post-back-to-top-f877d4c6.js +0 -91
- package/dist/esm/post-banner-576a5adb.js +0 -85
- package/dist/esm/post-breadcrumbs-63223336.js +0 -124
- package/dist/esm/post-card-control-2eebe7b4.js +0 -288
- package/dist/esm/post-collapsible-trigger-561df34e.js +0 -187
- package/dist/esm/post-footer-a270f67b.js +0 -64
- package/dist/esm/post-linkarea-456ce63d.js +0 -28
- package/dist/esm/post-menu-item-e051284c.js +0 -65
- package/dist/esm/post-popover-7c3c9072.js +0 -148
- package/dist/esm/post-rating-2c9dd11f.js +0 -107
- package/dist/esm/post-tab-header-f90b2f93.js +0 -32
- package/dist/esm/post-tab-panel-c19b5e30.js +0 -34
- package/dist/esm/post-tabs-0dadedf2.js +0 -171
- package/dist/esm/post-tag-b8be3b0c.js +0 -58
- package/dist/esm/post-togglebutton-83339cc9.js +0 -4475
- package/dist/esm/post-tooltip-3cc82984.js +0 -72
- package/dist/esm/post-tooltip-trigger-898c3dbc.js +0 -4683
- package/dist/post-components/p-0889c759.js +0 -1
- package/dist/post-components/p-104ddc50.js +0 -1
- package/dist/post-components/p-13b41e32.entry.js +0 -1
- package/dist/post-components/p-1906d77c.js +0 -1
- package/dist/post-components/p-19d0e6ea.entry.js +0 -1
- package/dist/post-components/p-1b9afb34.entry.js +0 -1
- package/dist/post-components/p-1fbffc90.js +0 -1
- package/dist/post-components/p-234925fa.js +0 -1
- package/dist/post-components/p-23fb976f.entry.js +0 -1
- package/dist/post-components/p-24c42ebe.entry.js +0 -1
- package/dist/post-components/p-28c19671.js +0 -8
- package/dist/post-components/p-37aaa30f.js +0 -1
- package/dist/post-components/p-3baf0b40.entry.js +0 -1
- package/dist/post-components/p-4390192f.js +0 -1
- package/dist/post-components/p-4a071696.js +0 -1
- package/dist/post-components/p-4c2d5072.js +0 -1
- package/dist/post-components/p-51b6114c.entry.js +0 -1
- package/dist/post-components/p-5fb4fc65.js +0 -1
- package/dist/post-components/p-64c13aaf.entry.js +0 -1
- package/dist/post-components/p-66679f9d.entry.js +0 -1
- package/dist/post-components/p-68a98f0b.js +0 -1
- package/dist/post-components/p-6a4dc55e.js +0 -1
- package/dist/post-components/p-722ffaae.js +0 -1
- package/dist/post-components/p-789f9a23.entry.js +0 -1
- package/dist/post-components/p-7e6eae42.js +0 -1
- package/dist/post-components/p-8117dd0c.js +0 -1
- package/dist/post-components/p-814c0c4d.entry.js +0 -1
- package/dist/post-components/p-87e0d6fa.js +0 -1
- package/dist/post-components/p-988d20f4.js +0 -1
- package/dist/post-components/p-9b1e4e52.entry.js +0 -1
- package/dist/post-components/p-9e461613.js +0 -2
- package/dist/post-components/p-ab44a18c.entry.js +0 -1
- package/dist/post-components/p-b2952b0e.entry.js +0 -1
- package/dist/post-components/p-c10b2a2f.js +0 -1
- package/dist/post-components/p-c80cb846.js +0 -1
- package/dist/post-components/p-da4704c1.js +0 -1
- package/dist/post-components/p-dc4de84a.entry.js +0 -1
- package/dist/post-components/p-e1255160.js +0 -1
- package/dist/post-components/p-f1f0ace3.entry.js +0 -1
- package/dist/post-components/p-f34fb6c4.entry.js +0 -1
- package/dist/post-components/p-f6f914bb.js +0 -1
- package/dist/post-components/p-fe7e64cf.entry.js +0 -1
- package/dist/post-components/p-fee94252.entry.js +0 -1
- package/dist/types/popover-fn.d.ts +0 -11
- package/dist/types/utils/event-guard.d.ts +0 -4
- package/loader/package.json +0 -11
- package/loaders/breakpoints.js +0 -56
- package/loaders/event-guard.js +0 -45
- package/loaders/fade.js +0 -11
- package/loaders/get-focusable-children.js +0 -35
- package/loaders/heading-levels.js +0 -3
- package/loaders/index.browser.js +0 -14
- package/loaders/index.d.ts +0 -108
- package/loaders/index.js +0 -39
- package/loaders/long-press-event.js +0 -264
- package/loaders/package.js +0 -3
- package/loaders/post-accordion-item.d.ts +0 -11
- package/loaders/post-accordion-item.js +0 -6
- package/loaders/post-accordion-item2.js +0 -103
- package/loaders/post-accordion.d.ts +0 -11
- package/loaders/post-accordion.js +0 -6
- package/loaders/post-accordion2.js +0 -126
- package/loaders/post-avatar.d.ts +0 -11
- package/loaders/post-avatar.js +0 -193
- package/loaders/post-back-to-top.d.ts +0 -11
- package/loaders/post-back-to-top.js +0 -121
- package/loaders/post-banner.d.ts +0 -11
- package/loaders/post-banner.js +0 -124
- package/loaders/post-breadcrumb-item.d.ts +0 -11
- package/loaders/post-breadcrumb-item.js +0 -6
- package/loaders/post-breadcrumbs.d.ts +0 -11
- package/loaders/post-breadcrumbs.js +0 -187
- package/loaders/post-card-control.d.ts +0 -11
- package/loaders/post-card-control.js +0 -328
- package/loaders/post-closebutton.d.ts +0 -11
- package/loaders/post-closebutton.js +0 -42
- package/loaders/post-collapsible-trigger.d.ts +0 -11
- package/loaders/post-collapsible-trigger.js +0 -6
- package/loaders/post-collapsible-trigger2.js +0 -125
- package/loaders/post-collapsible.d.ts +0 -11
- package/loaders/post-collapsible.js +0 -6
- package/loaders/post-footer.d.ts +0 -11
- package/loaders/post-footer.js +0 -118
- package/loaders/post-header.d.ts +0 -11
- package/loaders/post-header.js +0 -400
- package/loaders/post-icon.d.ts +0 -11
- package/loaders/post-icon.js +0 -6
- package/loaders/post-language-option.d.ts +0 -11
- package/loaders/post-language-option.js +0 -105
- package/loaders/post-language-switch.d.ts +0 -11
- package/loaders/post-language-switch.js +0 -146
- package/loaders/post-linkarea.d.ts +0 -11
- package/loaders/post-linkarea.js +0 -46
- package/loaders/post-list-item.d.ts +0 -11
- package/loaders/post-list-item.js +0 -39
- package/loaders/post-list.d.ts +0 -11
- package/loaders/post-list.js +0 -57
- package/loaders/post-logo.d.ts +0 -11
- package/loaders/post-logo.js +0 -60
- package/loaders/post-mainnavigation.d.ts +0 -11
- package/loaders/post-mainnavigation.js +0 -186
- package/loaders/post-megadropdown-trigger.d.ts +0 -11
- package/loaders/post-megadropdown-trigger.js +0 -124
- package/loaders/post-megadropdown.d.ts +0 -11
- package/loaders/post-megadropdown.js +0 -193
- package/loaders/post-menu-item.d.ts +0 -11
- package/loaders/post-menu-item.js +0 -6
- package/loaders/post-menu-item2.js +0 -27
- package/loaders/post-menu-trigger.d.ts +0 -11
- package/loaders/post-menu-trigger.js +0 -6
- package/loaders/post-menu-trigger2.js +0 -109
- package/loaders/post-menu.d.ts +0 -11
- package/loaders/post-menu.js +0 -6
- package/loaders/post-menu2.js +0 -202
- package/loaders/post-popover.d.ts +0 -11
- package/loaders/post-popover.js +0 -181
- package/loaders/post-popovercontainer.d.ts +0 -11
- package/loaders/post-popovercontainer.js +0 -6
- package/loaders/post-popovercontainer2.js +0 -3051
- package/loaders/post-rating.d.ts +0 -11
- package/loaders/post-rating.js +0 -141
- package/loaders/post-tab-header.d.ts +0 -11
- package/loaders/post-tab-header.js +0 -55
- package/loaders/post-tab-panel.d.ts +0 -11
- package/loaders/post-tab-panel.js +0 -57
- package/loaders/post-tabs.d.ts +0 -11
- package/loaders/post-tabs.js +0 -192
- package/loaders/post-tag.d.ts +0 -11
- package/loaders/post-tag.js +0 -91
- package/loaders/post-togglebutton.d.ts +0 -11
- package/loaders/post-togglebutton.js +0 -54
- package/loaders/post-tooltip-trigger.d.ts +0 -11
- package/loaders/post-tooltip-trigger.js +0 -4706
- package/loaders/post-tooltip.d.ts +0 -11
- package/loaders/post-tooltip.js +0 -105
- package/loaders/slide.js +0 -25
- package/loaders/switch-variants.js +0 -3
- /package/dist/cjs/{fade-72d5ef55.js → fade-nS5zzDQS.js} +0 -0
- /package/dist/cjs/{index-2b2b85e5.js → index-DtvYdwe1.js} +0 -0
- /package/dist/cjs/{index.browser-4af21c17.js → index.browser-Doj636JV.js} +0 -0
- /package/dist/cjs/{long-press-event-6e62d113.js → long-press-event-Q8jMUNXD.js} +0 -0
- /package/dist/cjs/{placement-b2bb6ec4.js → placement-qEFR9hmI.js} +0 -0
- /package/dist/cjs/{slide-cd1f09b3.js → slide-CbBL7A8w.js} +0 -0
- /package/dist/components/{index.browser.js → p-BLchVpF6.js} +0 -0
- /package/dist/components/{slide.js → p-BuLMaH5t.js} +0 -0
- /package/dist/components/{get-focusable-children.js → p-C35MCWIp.js} +0 -0
- /package/dist/components/{long-press-event.js → p-C_2k3G1c.js} +0 -0
- /package/dist/components/{switch-variants.js → p-DjIHLduJ.js} +0 -0
- /package/dist/components/{fade.js → p-SbIC4aZX.js} +0 -0
- /package/dist/components/{heading-levels.js → p-r4txK0AC.js} +0 -0
- /package/dist/esm/{fade-1f3cacf4.js → fade-SbIC4aZX.js} +0 -0
- /package/dist/esm/{index.browser-ff103197.js → index.browser-BLchVpF6.js} +0 -0
- /package/dist/esm/{long-press-event-04d24397.js → long-press-event-C_2k3G1c.js} +0 -0
- /package/dist/esm/{placement-8d56605d.js → placement-DRiVosES.js} +0 -0
- /package/dist/esm/{slide-cd2850ee.js → slide-BuLMaH5t.js} +0 -0
- /package/dist/post-components/{p-c65f32b0.js → p-BLchVpF6.js} +0 -0
- /package/dist/post-components/{p-9b052461.js → p-BuLMaH5t.js} +0 -0
- /package/dist/post-components/{p-8db32dab.js → p-C_2k3G1c.js} +0 -0
- /package/dist/post-components/{p-59a38c23.js → p-DRiVosES.js} +0 -0
- /package/dist/post-components/{p-64e3de38.js → p-SbIC4aZX.js} +0 -0
|
@@ -9,31 +9,69 @@ 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 = 'post-components';
|
|
24
|
-
const BUILD = /* post-components */ {
|
|
22
|
+
const BUILD = /* post-components */ { hydratedSelectorName: "data-hydrated", lazyLoad: true, slotRelocation: true, updatable: true};
|
|
23
|
+
|
|
24
|
+
const globalScripts = () => {};
|
|
25
|
+
const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-option,post-language-switch,post-linkarea,post-list,post-list-item,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-popover,post-popovercontainer,post-rating,post-tab-header,post-tab-panel,post-tabs,post-tag,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
|
|
25
26
|
|
|
26
27
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
28
|
+
Stencil Client Platform v4.35.0 | MIT Licensed | https://stenciljs.com
|
|
28
29
|
*/
|
|
29
30
|
var __defProp = Object.defineProperty;
|
|
30
31
|
var __export = (target, all) => {
|
|
31
32
|
for (var name in all)
|
|
32
33
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
35
|
+
|
|
36
|
+
// src/utils/constants.ts
|
|
37
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
38
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
39
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
40
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
41
|
+
PrimitiveType2["Null"] = "null";
|
|
42
|
+
PrimitiveType2["String"] = "string";
|
|
43
|
+
PrimitiveType2["Number"] = "number";
|
|
44
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
45
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
46
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
47
|
+
return PrimitiveType2;
|
|
48
|
+
})(PrimitiveType || {});
|
|
49
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
50
|
+
NonPrimitiveType2["Array"] = "array";
|
|
51
|
+
NonPrimitiveType2["Date"] = "date";
|
|
52
|
+
NonPrimitiveType2["Map"] = "map";
|
|
53
|
+
NonPrimitiveType2["Object"] = "object";
|
|
54
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
55
|
+
NonPrimitiveType2["Set"] = "set";
|
|
56
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
57
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
58
|
+
return NonPrimitiveType2;
|
|
59
|
+
})(NonPrimitiveType || {});
|
|
60
|
+
var TYPE_CONSTANT = "type";
|
|
61
|
+
var VALUE_CONSTANT = "value";
|
|
62
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
63
|
+
|
|
64
|
+
// src/client/client-host-ref.ts
|
|
65
|
+
var getHostRef = (ref) => {
|
|
66
|
+
if (ref.__stencil__getHostRef) {
|
|
67
|
+
return ref.__stencil__getHostRef();
|
|
68
|
+
}
|
|
69
|
+
return void 0;
|
|
70
|
+
};
|
|
71
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
72
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
73
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
74
|
+
};
|
|
37
75
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
76
|
const hostRef = {
|
|
39
77
|
$flags$: 0,
|
|
@@ -49,7 +87,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
49
87
|
hostElement["s-p"] = [];
|
|
50
88
|
hostElement["s-rc"] = [];
|
|
51
89
|
}
|
|
52
|
-
|
|
90
|
+
const ref = hostRef;
|
|
91
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
92
|
+
return ref;
|
|
53
93
|
};
|
|
54
94
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
55
95
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -74,10 +114,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
74
114
|
}
|
|
75
115
|
switch(bundleId) {
|
|
76
116
|
|
|
77
|
-
case 'post-closebutton_15.cjs':
|
|
78
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
79
|
-
/* webpackMode: "lazy" */
|
|
80
|
-
'./post-closebutton_15.cjs.entry.js')); }).then(processMod, consoleError);
|
|
81
117
|
case 'post-avatar.cjs':
|
|
82
118
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
83
119
|
/* webpackMode: "lazy" */
|
|
@@ -86,14 +122,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
86
122
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
87
123
|
/* webpackMode: "lazy" */
|
|
88
124
|
'./post-back-to-top.cjs.entry.js')); }).then(processMod, consoleError);
|
|
89
|
-
case 'post-banner.cjs':
|
|
90
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
91
|
-
/* webpackMode: "lazy" */
|
|
92
|
-
'./post-banner.cjs.entry.js')); }).then(processMod, consoleError);
|
|
93
|
-
case 'post-breadcrumbs.cjs':
|
|
94
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
95
|
-
/* webpackMode: "lazy" */
|
|
96
|
-
'./post-breadcrumbs.cjs.entry.js')); }).then(processMod, consoleError);
|
|
97
125
|
case 'post-card-control.cjs':
|
|
98
126
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
99
127
|
/* webpackMode: "lazy" */
|
|
@@ -106,10 +134,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
106
134
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
107
135
|
/* webpackMode: "lazy" */
|
|
108
136
|
'./post-linkarea.cjs.entry.js')); }).then(processMod, consoleError);
|
|
109
|
-
case 'post-popover.cjs':
|
|
110
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
111
|
-
/* webpackMode: "lazy" */
|
|
112
|
-
'./post-popover.cjs.entry.js')); }).then(processMod, consoleError);
|
|
113
137
|
case 'post-rating.cjs':
|
|
114
138
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
115
139
|
/* webpackMode: "lazy" */
|
|
@@ -122,10 +146,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
122
146
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
123
147
|
/* webpackMode: "lazy" */
|
|
124
148
|
'./post-tab-panel.cjs.entry.js')); }).then(processMod, consoleError);
|
|
125
|
-
case 'post-tabs.cjs':
|
|
126
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
127
|
-
/* webpackMode: "lazy" */
|
|
128
|
-
'./post-tabs.cjs.entry.js')); }).then(processMod, consoleError);
|
|
129
149
|
case 'post-tag.cjs':
|
|
130
150
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
131
151
|
/* webpackMode: "lazy" */
|
|
@@ -134,41 +154,75 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
134
154
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
135
155
|
/* webpackMode: "lazy" */
|
|
136
156
|
'./post-tooltip.cjs.entry.js')); }).then(processMod, consoleError);
|
|
137
|
-
case 'post-
|
|
157
|
+
case 'post-banner.cjs':
|
|
138
158
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
139
159
|
/* webpackMode: "lazy" */
|
|
140
|
-
'./post-
|
|
141
|
-
case 'post-
|
|
160
|
+
'./post-banner.cjs.entry.js')); }).then(processMod, consoleError);
|
|
161
|
+
case 'post-breadcrumbs.cjs':
|
|
142
162
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
143
163
|
/* webpackMode: "lazy" */
|
|
144
|
-
'./post-
|
|
164
|
+
'./post-breadcrumbs.cjs.entry.js')); }).then(processMod, consoleError);
|
|
165
|
+
case 'post-popover.cjs':
|
|
166
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
167
|
+
/* webpackMode: "lazy" */
|
|
168
|
+
'./post-popover.cjs.entry.js')); }).then(processMod, consoleError);
|
|
169
|
+
case 'post-tabs.cjs':
|
|
170
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
171
|
+
/* webpackMode: "lazy" */
|
|
172
|
+
'./post-tabs.cjs.entry.js')); }).then(processMod, consoleError);
|
|
145
173
|
case 'post-breadcrumb-item_2.cjs':
|
|
146
174
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
147
175
|
/* webpackMode: "lazy" */
|
|
148
176
|
'./post-breadcrumb-item_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
177
|
+
case 'post-accordion_2.cjs':
|
|
178
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
179
|
+
/* webpackMode: "lazy" */
|
|
180
|
+
'./post-accordion_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
149
181
|
case 'post-collapsible_2.cjs':
|
|
150
182
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
151
183
|
/* webpackMode: "lazy" */
|
|
152
184
|
'./post-collapsible_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
185
|
+
case 'post-closebutton_15.cjs':
|
|
186
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
187
|
+
/* webpackMode: "lazy" */
|
|
188
|
+
'./post-closebutton_15.cjs.entry.js')); }).then(processMod, consoleError);
|
|
189
|
+
case 'post-tooltip-trigger.cjs':
|
|
190
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
191
|
+
/* webpackMode: "lazy" */
|
|
192
|
+
'./post-tooltip-trigger.cjs.entry.js')); }).then(processMod, consoleError);
|
|
153
193
|
}
|
|
154
194
|
}
|
|
155
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
195
|
+
return (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(
|
|
156
196
|
/* @vite-ignore */
|
|
157
197
|
/* webpackInclude: /\.entry\.js$/ */
|
|
158
198
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
159
199
|
/* webpackMode: "lazy" */
|
|
160
200
|
`./${bundleId}.entry.js${""}`
|
|
161
|
-
)
|
|
162
|
-
{
|
|
163
|
-
|
|
201
|
+
).then(
|
|
202
|
+
(importedModule) => {
|
|
203
|
+
{
|
|
204
|
+
cmpModules.set(bundleId, importedModule);
|
|
205
|
+
}
|
|
206
|
+
return importedModule[exportName];
|
|
207
|
+
},
|
|
208
|
+
(e) => {
|
|
209
|
+
consoleError(e, hostRef.$hostElement$);
|
|
164
210
|
}
|
|
165
|
-
|
|
166
|
-
}, consoleError);
|
|
211
|
+
);
|
|
167
212
|
};
|
|
168
213
|
|
|
169
214
|
// src/client/client-style.ts
|
|
170
215
|
var styles = /* @__PURE__ */ new Map();
|
|
171
|
-
|
|
216
|
+
|
|
217
|
+
// src/runtime/runtime-constants.ts
|
|
218
|
+
var CONTENT_REF_ID = "r";
|
|
219
|
+
var ORG_LOCATION_ID = "o";
|
|
220
|
+
var SLOT_NODE_ID = "s";
|
|
221
|
+
var TEXT_NODE_ID = "t";
|
|
222
|
+
var COMMENT_NODE_ID = "c";
|
|
223
|
+
var HYDRATE_ID = "s-id";
|
|
224
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
225
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
172
226
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
173
227
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
174
228
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
@@ -178,7 +232,6 @@ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
|
178
232
|
"formStateRestoreCallback"
|
|
179
233
|
];
|
|
180
234
|
var win = typeof window !== "undefined" ? window : {};
|
|
181
|
-
var doc = win.document || { head: {} };
|
|
182
235
|
var plt = {
|
|
183
236
|
$flags$: 0,
|
|
184
237
|
$resourcesUrl$: "",
|
|
@@ -189,9 +242,10 @@ var plt = {
|
|
|
189
242
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
190
243
|
};
|
|
191
244
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
245
|
+
var _a;
|
|
192
246
|
let supportsListenerOptions2 = false;
|
|
193
247
|
try {
|
|
194
|
-
|
|
248
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
195
249
|
"e",
|
|
196
250
|
null,
|
|
197
251
|
Object.defineProperty({}, "passive", {
|
|
@@ -248,25 +302,117 @@ var flush = () => {
|
|
|
248
302
|
};
|
|
249
303
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
250
304
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
251
|
-
|
|
252
|
-
// src/utils/constants.ts
|
|
253
|
-
var EMPTY_OBJ = {};
|
|
254
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
255
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
256
|
-
|
|
257
|
-
// src/utils/helpers.ts
|
|
258
|
-
var isDef = (v) => v != null;
|
|
259
305
|
var isComplexType = (o) => {
|
|
260
306
|
o = typeof o;
|
|
261
307
|
return o === "object" || o === "function";
|
|
262
308
|
};
|
|
263
309
|
|
|
264
310
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
265
|
-
function queryNonceMetaTagContent(
|
|
311
|
+
function queryNonceMetaTagContent(doc) {
|
|
266
312
|
var _a, _b, _c;
|
|
267
|
-
return (_c = (_b = (_a =
|
|
313
|
+
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;
|
|
268
314
|
}
|
|
269
315
|
|
|
316
|
+
// src/utils/regular-expression.ts
|
|
317
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
318
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
// src/utils/remote-value.ts
|
|
322
|
+
var RemoteValue = class _RemoteValue {
|
|
323
|
+
/**
|
|
324
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
325
|
+
*
|
|
326
|
+
* @param serialized The serialized LocalValue object
|
|
327
|
+
* @returns The original JavaScript value/object
|
|
328
|
+
*/
|
|
329
|
+
static fromLocalValue(serialized) {
|
|
330
|
+
const type = serialized[TYPE_CONSTANT];
|
|
331
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
332
|
+
switch (type) {
|
|
333
|
+
case "string" /* String */:
|
|
334
|
+
return value;
|
|
335
|
+
case "boolean" /* Boolean */:
|
|
336
|
+
return value;
|
|
337
|
+
case "bigint" /* BigInt */:
|
|
338
|
+
return BigInt(value);
|
|
339
|
+
case "undefined" /* Undefined */:
|
|
340
|
+
return void 0;
|
|
341
|
+
case "null" /* Null */:
|
|
342
|
+
return null;
|
|
343
|
+
case "number" /* Number */:
|
|
344
|
+
if (value === "NaN") return NaN;
|
|
345
|
+
if (value === "-0") return -0;
|
|
346
|
+
if (value === "Infinity") return Infinity;
|
|
347
|
+
if (value === "-Infinity") return -Infinity;
|
|
348
|
+
return value;
|
|
349
|
+
case "array" /* Array */:
|
|
350
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
351
|
+
case "date" /* Date */:
|
|
352
|
+
return new Date(value);
|
|
353
|
+
case "map" /* Map */:
|
|
354
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
355
|
+
for (const [key, val] of value) {
|
|
356
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
357
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
358
|
+
map2.set(deserializedKey, deserializedValue);
|
|
359
|
+
}
|
|
360
|
+
return map2;
|
|
361
|
+
case "object" /* Object */:
|
|
362
|
+
const obj = {};
|
|
363
|
+
for (const [key, val] of value) {
|
|
364
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
365
|
+
}
|
|
366
|
+
return obj;
|
|
367
|
+
case "regexp" /* RegularExpression */:
|
|
368
|
+
const { pattern, flags } = value;
|
|
369
|
+
return new RegExp(pattern, flags);
|
|
370
|
+
case "set" /* Set */:
|
|
371
|
+
const set = /* @__PURE__ */ new Set();
|
|
372
|
+
for (const item of value) {
|
|
373
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
374
|
+
}
|
|
375
|
+
return set;
|
|
376
|
+
case "symbol" /* Symbol */:
|
|
377
|
+
return Symbol(value);
|
|
378
|
+
default:
|
|
379
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
384
|
+
*
|
|
385
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
386
|
+
* @returns Array of deserialized JavaScript values
|
|
387
|
+
*/
|
|
388
|
+
static fromLocalValueArray(serializedValues) {
|
|
389
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
393
|
+
*
|
|
394
|
+
* @param obj Object to verify
|
|
395
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
396
|
+
*/
|
|
397
|
+
static isLocalValueObject(obj) {
|
|
398
|
+
if (typeof obj !== "object" || obj === null) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
402
|
+
return false;
|
|
403
|
+
}
|
|
404
|
+
const type = obj[TYPE_CONSTANT];
|
|
405
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
406
|
+
if (!hasTypeProperty) {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
410
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
411
|
+
}
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
|
|
270
416
|
// src/utils/result.ts
|
|
271
417
|
var result_exports = {};
|
|
272
418
|
__export(result_exports, {
|
|
@@ -315,6 +461,156 @@ var unwrapErr = (result) => {
|
|
|
315
461
|
throw result.value;
|
|
316
462
|
}
|
|
317
463
|
};
|
|
464
|
+
|
|
465
|
+
// src/utils/serialize.ts
|
|
466
|
+
function deserializeProperty(value) {
|
|
467
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
468
|
+
return value;
|
|
469
|
+
}
|
|
470
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
471
|
+
}
|
|
472
|
+
function createShadowRoot(cmpMeta) {
|
|
473
|
+
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
474
|
+
if (supportsConstructableStylesheets) {
|
|
475
|
+
const sheet = new CSSStyleSheet();
|
|
476
|
+
sheet.replaceSync(globalStyles);
|
|
477
|
+
shadowRoot.adoptedStyleSheets.push(sheet);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
481
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
482
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
483
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
484
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
485
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
486
|
+
slotNode.hidden = true;
|
|
487
|
+
} else {
|
|
488
|
+
slotNode.hidden = false;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
let i2 = 0;
|
|
494
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
495
|
+
const childNode = childNodes[i2];
|
|
496
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
497
|
+
updateFallbackSlotVisibility(childNode);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
502
|
+
const result = [];
|
|
503
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
504
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
505
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
506
|
+
result.push(slottedNode);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
return result;
|
|
510
|
+
};
|
|
511
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
512
|
+
let i2 = 0;
|
|
513
|
+
let slottedNodes = [];
|
|
514
|
+
let childNode;
|
|
515
|
+
for (; i2 < childNodes.length; i2++) {
|
|
516
|
+
childNode = childNodes[i2];
|
|
517
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
518
|
+
slottedNodes.push(childNode);
|
|
519
|
+
}
|
|
520
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
521
|
+
}
|
|
522
|
+
return slottedNodes;
|
|
523
|
+
}
|
|
524
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
525
|
+
const childNodes = [];
|
|
526
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
527
|
+
let node = slot;
|
|
528
|
+
while (node = node.nextSibling) {
|
|
529
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
530
|
+
}
|
|
531
|
+
return childNodes;
|
|
532
|
+
};
|
|
533
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
534
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
535
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
536
|
+
return true;
|
|
537
|
+
}
|
|
538
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
539
|
+
return true;
|
|
540
|
+
}
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
544
|
+
return true;
|
|
545
|
+
}
|
|
546
|
+
return slotName === "";
|
|
547
|
+
};
|
|
548
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
549
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
553
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
554
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
555
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
556
|
+
const appendMethod = internalCall(parent, "appendChild");
|
|
557
|
+
if (typeof position !== "undefined") {
|
|
558
|
+
slottedNodeLocation["s-oo"] = position;
|
|
559
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
560
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
561
|
+
childNodes.forEach((n) => {
|
|
562
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
563
|
+
});
|
|
564
|
+
slotRelocateNodes.sort((a, b) => {
|
|
565
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
566
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
567
|
+
return 0;
|
|
568
|
+
});
|
|
569
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
570
|
+
} else {
|
|
571
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
572
|
+
}
|
|
573
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
574
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
575
|
+
};
|
|
576
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
577
|
+
function patchSlotNode(node) {
|
|
578
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
579
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
580
|
+
const toReturn = [];
|
|
581
|
+
const slotName = this["s-sn"];
|
|
582
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
583
|
+
console.error(`
|
|
584
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
585
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
586
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
587
|
+
`);
|
|
588
|
+
}
|
|
589
|
+
const parent = this["s-cr"].parentElement;
|
|
590
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
591
|
+
slottedNodes.forEach((n) => {
|
|
592
|
+
if (slotName === getSlotName(n)) {
|
|
593
|
+
toReturn.push(n);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
if (elementsOnly) {
|
|
597
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
598
|
+
}
|
|
599
|
+
return toReturn;
|
|
600
|
+
}).bind(node);
|
|
601
|
+
node.assignedElements = assignedFactory(true);
|
|
602
|
+
node.assignedNodes = assignedFactory(false);
|
|
603
|
+
}
|
|
604
|
+
function internalCall(node, method) {
|
|
605
|
+
if ("__" + method in node) {
|
|
606
|
+
const toReturn = node["__" + method];
|
|
607
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
608
|
+
return toReturn.bind(node);
|
|
609
|
+
} else {
|
|
610
|
+
if (typeof node[method] !== "function") return node[method];
|
|
611
|
+
return node[method].bind(node);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
318
614
|
var createTime = (fnName, tagName = "") => {
|
|
319
615
|
{
|
|
320
616
|
return () => {
|
|
@@ -440,13 +736,427 @@ var convertToPrivate = (node) => {
|
|
|
440
736
|
vnode.$name$ = node.vname;
|
|
441
737
|
return vnode;
|
|
442
738
|
};
|
|
443
|
-
|
|
739
|
+
|
|
740
|
+
// src/runtime/client-hydrate.ts
|
|
741
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
742
|
+
var _a;
|
|
743
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
744
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
745
|
+
const childRenderNodes = [];
|
|
746
|
+
const slotNodes = [];
|
|
747
|
+
const slottedNodes = [];
|
|
748
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
749
|
+
const vnode = newVNode(tagName, null);
|
|
750
|
+
vnode.$elm$ = hostElm;
|
|
751
|
+
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
752
|
+
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
753
|
+
var _a2, _b;
|
|
754
|
+
if (!(memberFlags & 31 /* Prop */)) {
|
|
755
|
+
return;
|
|
756
|
+
}
|
|
757
|
+
const attributeName = metaAttributeName || memberName;
|
|
758
|
+
const attrVal = hostElm.getAttribute(attributeName);
|
|
759
|
+
if (attrVal !== null) {
|
|
760
|
+
const attrPropVal = parsePropertyValue(
|
|
761
|
+
attrVal,
|
|
762
|
+
memberFlags,
|
|
763
|
+
!!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
|
|
764
|
+
);
|
|
765
|
+
(_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
769
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
770
|
+
}
|
|
771
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
772
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
773
|
+
hostRef.$vnode$ = clientHydrate(
|
|
774
|
+
vnode,
|
|
775
|
+
childRenderNodes,
|
|
776
|
+
slotNodes,
|
|
777
|
+
shadowRootNodes,
|
|
778
|
+
hostElm,
|
|
779
|
+
hostElm,
|
|
780
|
+
hostId,
|
|
781
|
+
slottedNodes
|
|
782
|
+
);
|
|
783
|
+
let crIndex = 0;
|
|
784
|
+
const crLength = childRenderNodes.length;
|
|
785
|
+
let childRenderNode;
|
|
786
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
787
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
788
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
789
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
790
|
+
const node = childRenderNode.$elm$;
|
|
791
|
+
if (!shadowRoot) {
|
|
792
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
793
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
794
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
798
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
799
|
+
if (childRenderNode.$children$) {
|
|
800
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
801
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
802
|
+
childRenderNode.$children$.forEach((c) => {
|
|
803
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
} else {
|
|
807
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
811
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
812
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
813
|
+
}
|
|
814
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
815
|
+
if (!shadowRoot) {
|
|
816
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
820
|
+
}
|
|
821
|
+
const hosts = [];
|
|
822
|
+
const snLen = slottedNodes.length;
|
|
823
|
+
let snIndex = 0;
|
|
824
|
+
let slotGroup;
|
|
825
|
+
let snGroupIdx;
|
|
826
|
+
let snGroupLen;
|
|
827
|
+
let slottedItem;
|
|
828
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
829
|
+
slotGroup = slottedNodes[snIndex];
|
|
830
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
831
|
+
snGroupLen = slotGroup.length;
|
|
832
|
+
snGroupIdx = 0;
|
|
833
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
834
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
835
|
+
if (!hosts[slottedItem.hostId]) {
|
|
836
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
837
|
+
}
|
|
838
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
839
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
840
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
841
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
842
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
843
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
844
|
+
} else {
|
|
845
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
846
|
+
}
|
|
847
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
848
|
+
}
|
|
849
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
850
|
+
hostEle.appendChild(slottedItem.node);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
855
|
+
let rnIdex = 0;
|
|
856
|
+
const rnLen = shadowRootNodes.length;
|
|
857
|
+
if (rnLen) {
|
|
858
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
859
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
860
|
+
}
|
|
861
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
862
|
+
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
863
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
864
|
+
node.removeAttribute("hidden");
|
|
865
|
+
} else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
866
|
+
node.parentNode.removeChild(node);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
873
|
+
hostRef.$hostElement$ = hostElm;
|
|
874
|
+
endHydrate();
|
|
875
|
+
};
|
|
876
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
877
|
+
let childNodeType;
|
|
878
|
+
let childIdSplt;
|
|
879
|
+
let childVNode;
|
|
880
|
+
let i2;
|
|
881
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
882
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
883
|
+
if (childNodeType) {
|
|
884
|
+
childIdSplt = childNodeType.split(".");
|
|
885
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
886
|
+
childVNode = createSimpleVNode({
|
|
887
|
+
$flags$: 0,
|
|
888
|
+
$hostId$: childIdSplt[0],
|
|
889
|
+
$nodeId$: childIdSplt[1],
|
|
890
|
+
$depth$: childIdSplt[2],
|
|
891
|
+
$index$: childIdSplt[3],
|
|
892
|
+
$tag$: node.tagName.toLowerCase(),
|
|
893
|
+
$elm$: node,
|
|
894
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
895
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
896
|
+
$attrs$: { class: node.className || "" }
|
|
897
|
+
});
|
|
898
|
+
childRenderNodes.push(childVNode);
|
|
899
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
900
|
+
if (!parentVNode.$children$) {
|
|
901
|
+
parentVNode.$children$ = [];
|
|
902
|
+
}
|
|
903
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
904
|
+
if (typeof slotName === "string") {
|
|
905
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
906
|
+
addSlot(
|
|
907
|
+
slotName,
|
|
908
|
+
childIdSplt[2],
|
|
909
|
+
childVNode,
|
|
910
|
+
node,
|
|
911
|
+
parentVNode,
|
|
912
|
+
childRenderNodes,
|
|
913
|
+
slotNodes,
|
|
914
|
+
shadowRootNodes,
|
|
915
|
+
slottedNodes
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
919
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
920
|
+
}
|
|
921
|
+
if (childVNode.$index$ !== void 0) {
|
|
922
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
923
|
+
}
|
|
924
|
+
parentVNode = childVNode;
|
|
925
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
926
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
if (node.shadowRoot) {
|
|
931
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
932
|
+
clientHydrate(
|
|
933
|
+
parentVNode,
|
|
934
|
+
childRenderNodes,
|
|
935
|
+
slotNodes,
|
|
936
|
+
shadowRootNodes,
|
|
937
|
+
hostElm,
|
|
938
|
+
node.shadowRoot.childNodes[i2],
|
|
939
|
+
hostId,
|
|
940
|
+
slottedNodes
|
|
941
|
+
);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
945
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
946
|
+
clientHydrate(
|
|
947
|
+
parentVNode,
|
|
948
|
+
childRenderNodes,
|
|
949
|
+
slotNodes,
|
|
950
|
+
shadowRootNodes,
|
|
951
|
+
hostElm,
|
|
952
|
+
nonShadowNodes[i2],
|
|
953
|
+
hostId,
|
|
954
|
+
slottedNodes
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
958
|
+
childIdSplt = node.nodeValue.split(".");
|
|
959
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
960
|
+
childNodeType = childIdSplt[0];
|
|
961
|
+
childVNode = createSimpleVNode({
|
|
962
|
+
$hostId$: childIdSplt[1],
|
|
963
|
+
$nodeId$: childIdSplt[2],
|
|
964
|
+
$depth$: childIdSplt[3],
|
|
965
|
+
$index$: childIdSplt[4] || "0",
|
|
966
|
+
$elm$: node,
|
|
967
|
+
$attrs$: null,
|
|
968
|
+
$children$: null,
|
|
969
|
+
$key$: null,
|
|
970
|
+
$name$: null,
|
|
971
|
+
$tag$: null,
|
|
972
|
+
$text$: null
|
|
973
|
+
});
|
|
974
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
975
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
976
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
977
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
978
|
+
childRenderNodes.push(childVNode);
|
|
979
|
+
node.remove();
|
|
980
|
+
if (hostId === childVNode.$hostId$) {
|
|
981
|
+
if (!parentVNode.$children$) {
|
|
982
|
+
parentVNode.$children$ = [];
|
|
983
|
+
}
|
|
984
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
985
|
+
}
|
|
986
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
987
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
991
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
992
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
993
|
+
childRenderNodes.push(childVNode);
|
|
994
|
+
node.remove();
|
|
995
|
+
}
|
|
996
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
997
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
998
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
999
|
+
addSlot(
|
|
1000
|
+
slotName,
|
|
1001
|
+
childIdSplt[2],
|
|
1002
|
+
childVNode,
|
|
1003
|
+
node,
|
|
1004
|
+
parentVNode,
|
|
1005
|
+
childRenderNodes,
|
|
1006
|
+
slotNodes,
|
|
1007
|
+
shadowRootNodes,
|
|
1008
|
+
slottedNodes
|
|
1009
|
+
);
|
|
1010
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1011
|
+
if (shadowRootNodes) {
|
|
1012
|
+
node.remove();
|
|
1013
|
+
} else {
|
|
1014
|
+
hostElm["s-cr"] = node;
|
|
1015
|
+
node["s-cn"] = true;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1021
|
+
const vnode = newVNode(null, node.textContent);
|
|
1022
|
+
vnode.$elm$ = node;
|
|
1023
|
+
vnode.$index$ = "0";
|
|
1024
|
+
parentVNode.$children$ = [vnode];
|
|
1025
|
+
} else {
|
|
1026
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1027
|
+
node.remove();
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
return parentVNode;
|
|
1031
|
+
};
|
|
1032
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1033
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1034
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1035
|
+
if (componentId) {
|
|
1036
|
+
orgLocNodes.set(componentId, node);
|
|
1037
|
+
}
|
|
1038
|
+
let i2 = 0;
|
|
1039
|
+
if (node.shadowRoot) {
|
|
1040
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1041
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1045
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1046
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1047
|
+
}
|
|
1048
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1049
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
1050
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1051
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1052
|
+
node.nodeValue = "";
|
|
1053
|
+
node["s-en"] = childIdSplt[3];
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
var createSimpleVNode = (vnode) => {
|
|
1058
|
+
const defaultVNode = {
|
|
1059
|
+
$flags$: 0,
|
|
1060
|
+
$hostId$: null,
|
|
1061
|
+
$nodeId$: null,
|
|
1062
|
+
$depth$: null,
|
|
1063
|
+
$index$: "0",
|
|
1064
|
+
$elm$: null,
|
|
1065
|
+
$attrs$: null,
|
|
1066
|
+
$children$: null,
|
|
1067
|
+
$key$: null,
|
|
1068
|
+
$name$: null,
|
|
1069
|
+
$tag$: null,
|
|
1070
|
+
$text$: null
|
|
1071
|
+
};
|
|
1072
|
+
return { ...defaultVNode, ...vnode };
|
|
1073
|
+
};
|
|
1074
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1075
|
+
node["s-sr"] = true;
|
|
1076
|
+
childVNode.$name$ = slotName || null;
|
|
1077
|
+
childVNode.$tag$ = "slot";
|
|
1078
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1079
|
+
if (shadowRootNodes && win.document) {
|
|
1080
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1081
|
+
if (childVNode.$name$) {
|
|
1082
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
1083
|
+
}
|
|
1084
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1085
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1086
|
+
} else {
|
|
1087
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1088
|
+
}
|
|
1089
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1090
|
+
node.remove();
|
|
1091
|
+
if (childVNode.$depth$ === "0") {
|
|
1092
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1093
|
+
}
|
|
1094
|
+
} else {
|
|
1095
|
+
const slot = childVNode.$elm$;
|
|
1096
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1097
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1098
|
+
patchSlotNode(node);
|
|
1099
|
+
if (shouldMove) {
|
|
1100
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1101
|
+
}
|
|
1102
|
+
childRenderNodes.push(childVNode);
|
|
1103
|
+
}
|
|
1104
|
+
slotNodes.push(childVNode);
|
|
1105
|
+
if (!parentVNode.$children$) {
|
|
1106
|
+
parentVNode.$children$ = [];
|
|
1107
|
+
}
|
|
1108
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1109
|
+
}
|
|
1110
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1111
|
+
let slottedNode = slotNode.nextSibling;
|
|
1112
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1113
|
+
while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
1114
|
+
slottedNode["s-sn"] = slotName;
|
|
1115
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1116
|
+
slottedNode = slottedNode.nextSibling;
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
var findCorrespondingNode = (node, type) => {
|
|
1120
|
+
let sibling = node;
|
|
1121
|
+
do {
|
|
1122
|
+
sibling = sibling.nextSibling;
|
|
1123
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1124
|
+
return sibling;
|
|
1125
|
+
};
|
|
1126
|
+
var createSupportsRuleRe = (selector) => {
|
|
1127
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1128
|
+
return new RegExp(
|
|
1129
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
1130
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
1131
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
1132
|
+
"g"
|
|
1133
|
+
);
|
|
1134
|
+
};
|
|
1135
|
+
createSupportsRuleRe("::slotted");
|
|
1136
|
+
createSupportsRuleRe(":host");
|
|
1137
|
+
createSupportsRuleRe(":host-context");
|
|
1138
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
1139
|
+
if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
1140
|
+
try {
|
|
1141
|
+
propValue = JSON.parse(propValue);
|
|
1142
|
+
return propValue;
|
|
1143
|
+
} catch (e) {
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1147
|
+
propValue = deserializeProperty(propValue);
|
|
1148
|
+
return propValue;
|
|
1149
|
+
}
|
|
444
1150
|
if (propValue != null && !isComplexType(propValue)) {
|
|
445
1151
|
if (propType & 4 /* Boolean */) {
|
|
446
|
-
|
|
1152
|
+
if (isFormAssociated && typeof propValue === "string") {
|
|
1153
|
+
return propValue === "" || !!propValue;
|
|
1154
|
+
} else {
|
|
1155
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1156
|
+
}
|
|
447
1157
|
}
|
|
448
1158
|
if (propType & 2 /* Number */) {
|
|
449
|
-
return parseFloat(propValue);
|
|
1159
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
450
1160
|
}
|
|
451
1161
|
if (propType & 1 /* String */) {
|
|
452
1162
|
return String(propValue);
|
|
@@ -463,9 +1173,9 @@ var createEvent = (ref, name, flags) => {
|
|
|
463
1173
|
return {
|
|
464
1174
|
emit: (detail) => {
|
|
465
1175
|
return emitEvent(elm, name, {
|
|
466
|
-
bubbles:
|
|
467
|
-
composed:
|
|
468
|
-
cancelable:
|
|
1176
|
+
bubbles: true,
|
|
1177
|
+
composed: true,
|
|
1178
|
+
cancelable: true,
|
|
469
1179
|
detail
|
|
470
1180
|
});
|
|
471
1181
|
}
|
|
@@ -495,7 +1205,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
495
1205
|
var _a;
|
|
496
1206
|
const scopeId2 = getScopeId(cmpMeta);
|
|
497
1207
|
const style = styles.get(scopeId2);
|
|
498
|
-
|
|
1208
|
+
if (!win.document) {
|
|
1209
|
+
return scopeId2;
|
|
1210
|
+
}
|
|
1211
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
499
1212
|
if (style) {
|
|
500
1213
|
if (typeof style === "string") {
|
|
501
1214
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -505,14 +1218,43 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
505
1218
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
506
1219
|
}
|
|
507
1220
|
if (!appliedStyles.has(scopeId2)) {
|
|
508
|
-
{
|
|
509
|
-
styleElm =
|
|
1221
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1222
|
+
styleElm.innerHTML = style;
|
|
1223
|
+
} else {
|
|
1224
|
+
styleElm = win.document.createElement("style");
|
|
510
1225
|
styleElm.innerHTML = style;
|
|
511
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1226
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
512
1227
|
if (nonce != null) {
|
|
513
1228
|
styleElm.setAttribute("nonce", nonce);
|
|
514
1229
|
}
|
|
515
|
-
|
|
1230
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1231
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1232
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1233
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1234
|
+
styleContainerNode.insertBefore(
|
|
1235
|
+
styleElm,
|
|
1236
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1237
|
+
);
|
|
1238
|
+
} else if ("host" in styleContainerNode) {
|
|
1239
|
+
if (supportsConstructableStylesheets) {
|
|
1240
|
+
const stylesheet = new CSSStyleSheet();
|
|
1241
|
+
stylesheet.replaceSync(style);
|
|
1242
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1243
|
+
} else {
|
|
1244
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1245
|
+
if (existingStyleContainer) {
|
|
1246
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1247
|
+
} else {
|
|
1248
|
+
styleContainerNode.prepend(styleElm);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
} else {
|
|
1252
|
+
styleContainerNode.append(styleElm);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1256
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1257
|
+
}
|
|
516
1258
|
}
|
|
517
1259
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
518
1260
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -542,121 +1284,170 @@ var attachStyles = (hostRef) => {
|
|
|
542
1284
|
endAttachStyles();
|
|
543
1285
|
};
|
|
544
1286
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
545
|
-
var
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
1287
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1288
|
+
var hydrateScopedToShadow = () => {
|
|
1289
|
+
if (!win.document) {
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1293
|
+
let i2 = 0;
|
|
1294
|
+
for (; i2 < styles2.length; i2++) {
|
|
1295
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1299
|
+
if (oldValue === newValue) {
|
|
1300
|
+
return;
|
|
1301
|
+
}
|
|
1302
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1303
|
+
let ln = memberName.toLowerCase();
|
|
1304
|
+
if (memberName === "class") {
|
|
1305
|
+
const classList = elm.classList;
|
|
1306
|
+
const oldClasses = parseClassList(oldValue);
|
|
1307
|
+
let newClasses = parseClassList(newValue);
|
|
1308
|
+
if (elm["s-si"] && initialRender) {
|
|
1309
|
+
newClasses.push(elm["s-si"]);
|
|
1310
|
+
oldClasses.forEach((c) => {
|
|
1311
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1312
|
+
});
|
|
1313
|
+
newClasses = [...new Set(newClasses)];
|
|
1314
|
+
classList.add(...newClasses);
|
|
1315
|
+
} else {
|
|
553
1316
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
554
1317
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
elm.style.removeProperty(prop);
|
|
561
|
-
} else {
|
|
562
|
-
elm.style[prop] = "";
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
for (const prop in newValue) {
|
|
568
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1318
|
+
}
|
|
1319
|
+
} else if (memberName === "style") {
|
|
1320
|
+
{
|
|
1321
|
+
for (const prop in oldValue) {
|
|
1322
|
+
if (!newValue || newValue[prop] == null) {
|
|
569
1323
|
if (prop.includes("-")) {
|
|
570
|
-
elm.style.
|
|
1324
|
+
elm.style.removeProperty(prop);
|
|
571
1325
|
} else {
|
|
572
|
-
elm.style[prop] =
|
|
1326
|
+
elm.style[prop] = "";
|
|
573
1327
|
}
|
|
574
1328
|
}
|
|
575
1329
|
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
} else if (isMemberInElement(win, ln)) {
|
|
584
|
-
memberName = ln.slice(2);
|
|
585
|
-
} else {
|
|
586
|
-
memberName = ln[2] + memberName.slice(3);
|
|
587
|
-
}
|
|
588
|
-
if (oldValue || newValue) {
|
|
589
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
590
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
591
|
-
if (oldValue) {
|
|
592
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
593
|
-
}
|
|
594
|
-
if (newValue) {
|
|
595
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
1330
|
+
}
|
|
1331
|
+
for (const prop in newValue) {
|
|
1332
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1333
|
+
if (prop.includes("-")) {
|
|
1334
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1335
|
+
} else {
|
|
1336
|
+
elm.style[prop] = newValue[prop];
|
|
596
1337
|
}
|
|
597
1338
|
}
|
|
1339
|
+
}
|
|
1340
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1341
|
+
if (newValue) {
|
|
1342
|
+
newValue(elm);
|
|
1343
|
+
}
|
|
1344
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1345
|
+
if (memberName[2] === "-") {
|
|
1346
|
+
memberName = memberName.slice(3);
|
|
1347
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1348
|
+
memberName = ln.slice(2);
|
|
598
1349
|
} else {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
1350
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1351
|
+
}
|
|
1352
|
+
if (oldValue || newValue) {
|
|
1353
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1354
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1355
|
+
if (oldValue) {
|
|
1356
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1357
|
+
}
|
|
1358
|
+
if (newValue) {
|
|
1359
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
} else {
|
|
1363
|
+
const isComplex = isComplexType(newValue);
|
|
1364
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1365
|
+
try {
|
|
1366
|
+
if (!elm.tagName.includes("-")) {
|
|
1367
|
+
const n = newValue == null ? "" : newValue;
|
|
1368
|
+
if (memberName === "list") {
|
|
1369
|
+
isProp = false;
|
|
1370
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1371
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
607
1372
|
elm[memberName] = n;
|
|
1373
|
+
} else {
|
|
1374
|
+
elm.setAttribute(memberName, n);
|
|
608
1375
|
}
|
|
609
|
-
} else {
|
|
610
|
-
elm[memberName] = newValue;
|
|
611
1376
|
}
|
|
612
|
-
}
|
|
1377
|
+
} else if (elm[memberName] !== newValue) {
|
|
1378
|
+
elm[memberName] = newValue;
|
|
613
1379
|
}
|
|
1380
|
+
} catch (e) {
|
|
614
1381
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
1382
|
+
}
|
|
1383
|
+
let xlink = false;
|
|
1384
|
+
{
|
|
1385
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1386
|
+
memberName = ln;
|
|
1387
|
+
xlink = true;
|
|
621
1388
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
626
|
-
} else {
|
|
627
|
-
elm.removeAttribute(memberName);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
631
|
-
newValue = newValue === true ? "" : newValue;
|
|
1389
|
+
}
|
|
1390
|
+
if (newValue == null || newValue === false) {
|
|
1391
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
632
1392
|
if (xlink) {
|
|
633
|
-
elm.
|
|
1393
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
634
1394
|
} else {
|
|
635
|
-
elm.
|
|
1395
|
+
elm.removeAttribute(memberName);
|
|
636
1396
|
}
|
|
637
1397
|
}
|
|
1398
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1399
|
+
newValue = newValue === true ? "" : newValue;
|
|
1400
|
+
if (xlink) {
|
|
1401
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1402
|
+
} else {
|
|
1403
|
+
elm.setAttribute(memberName, newValue);
|
|
1404
|
+
}
|
|
638
1405
|
}
|
|
639
1406
|
}
|
|
640
1407
|
};
|
|
641
1408
|
var parseClassListRegex = /\s/;
|
|
642
|
-
var parseClassList = (value) =>
|
|
1409
|
+
var parseClassList = (value) => {
|
|
1410
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1411
|
+
value = value.baseVal;
|
|
1412
|
+
}
|
|
1413
|
+
if (!value || typeof value !== "string") {
|
|
1414
|
+
return [];
|
|
1415
|
+
}
|
|
1416
|
+
return value.split(parseClassListRegex);
|
|
1417
|
+
};
|
|
643
1418
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
644
1419
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
645
1420
|
|
|
646
1421
|
// src/runtime/vdom/update-element.ts
|
|
647
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
1422
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
648
1423
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
649
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
650
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
1424
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1425
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
651
1426
|
{
|
|
652
1427
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
653
1428
|
if (!(memberName in newVnodeAttrs)) {
|
|
654
|
-
setAccessor(
|
|
1429
|
+
setAccessor(
|
|
1430
|
+
elm,
|
|
1431
|
+
memberName,
|
|
1432
|
+
oldVnodeAttrs[memberName],
|
|
1433
|
+
void 0,
|
|
1434
|
+
isSvgMode2,
|
|
1435
|
+
newVnode.$flags$,
|
|
1436
|
+
isInitialRender
|
|
1437
|
+
);
|
|
655
1438
|
}
|
|
656
1439
|
}
|
|
657
1440
|
}
|
|
658
1441
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
659
|
-
setAccessor(
|
|
1442
|
+
setAccessor(
|
|
1443
|
+
elm,
|
|
1444
|
+
memberName,
|
|
1445
|
+
oldVnodeAttrs[memberName],
|
|
1446
|
+
newVnodeAttrs[memberName],
|
|
1447
|
+
isSvgMode2,
|
|
1448
|
+
newVnode.$flags$,
|
|
1449
|
+
isInitialRender
|
|
1450
|
+
);
|
|
660
1451
|
}
|
|
661
1452
|
};
|
|
662
1453
|
function sortedAttrNames(attrNames) {
|
|
@@ -668,16 +1459,13 @@ function sortedAttrNames(attrNames) {
|
|
|
668
1459
|
attrNames
|
|
669
1460
|
);
|
|
670
1461
|
}
|
|
671
|
-
|
|
672
|
-
// src/runtime/vdom/vdom-render.ts
|
|
673
|
-
var scopeId;
|
|
674
1462
|
var contentRef;
|
|
675
1463
|
var hostTagName;
|
|
676
1464
|
var useNativeShadowDom = false;
|
|
677
1465
|
var checkSlotFallbackVisibility = false;
|
|
678
1466
|
var checkSlotRelocate = false;
|
|
679
1467
|
var isSvgMode = false;
|
|
680
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
1468
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
681
1469
|
var _a;
|
|
682
1470
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
683
1471
|
let i2 = 0;
|
|
@@ -687,9 +1475,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
687
1475
|
if (!useNativeShadowDom) {
|
|
688
1476
|
checkSlotRelocate = true;
|
|
689
1477
|
if (newVNode2.$tag$ === "slot") {
|
|
690
|
-
if (scopeId) {
|
|
691
|
-
parentElm.classList.add(scopeId + "-s");
|
|
692
|
-
}
|
|
693
1478
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
694
1479
|
// slot element has fallback content
|
|
695
1480
|
// still create an element that "mocks" the slot element
|
|
@@ -703,14 +1488,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
703
1488
|
}
|
|
704
1489
|
}
|
|
705
1490
|
if (newVNode2.$text$ !== null) {
|
|
706
|
-
elm = newVNode2.$elm$ =
|
|
1491
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
707
1492
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
708
|
-
elm = newVNode2.$elm$ =
|
|
1493
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1494
|
+
{
|
|
1495
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1496
|
+
}
|
|
709
1497
|
} else {
|
|
710
1498
|
if (!isSvgMode) {
|
|
711
1499
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
712
1500
|
}
|
|
713
|
-
|
|
1501
|
+
if (!win.document) {
|
|
1502
|
+
throw new Error(
|
|
1503
|
+
"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."
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
714
1507
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
715
1508
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
716
1509
|
) ;
|
|
@@ -720,12 +1513,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
720
1513
|
{
|
|
721
1514
|
updateElement(null, newVNode2, isSvgMode);
|
|
722
1515
|
}
|
|
723
|
-
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
724
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
725
|
-
}
|
|
726
1516
|
if (newVNode2.$children$) {
|
|
727
1517
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
728
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
1518
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
729
1519
|
if (childNode) {
|
|
730
1520
|
elm.appendChild(childNode);
|
|
731
1521
|
}
|
|
@@ -746,6 +1536,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
746
1536
|
elm["s-cr"] = contentRef;
|
|
747
1537
|
elm["s-sn"] = newVNode2.$name$ || "";
|
|
748
1538
|
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1539
|
+
patchSlotNode(elm);
|
|
749
1540
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
750
1541
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
751
1542
|
{
|
|
@@ -758,19 +1549,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
758
1549
|
};
|
|
759
1550
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
760
1551
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
761
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
762
|
-
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
763
|
-
let node = parentElm;
|
|
764
|
-
while (node = node.nextSibling) {
|
|
765
|
-
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
766
|
-
oldSlotChildNodes.push(node);
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
1552
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
770
1553
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
771
1554
|
const childNode = oldSlotChildNodes[i2];
|
|
772
1555
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
773
|
-
insertBefore(
|
|
1556
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
774
1557
|
childNode["s-ol"].remove();
|
|
775
1558
|
childNode["s-ol"] = void 0;
|
|
776
1559
|
childNode["s-sh"] = void 0;
|
|
@@ -780,7 +1563,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
780
1563
|
putBackInOriginalLocation(childNode, recursive);
|
|
781
1564
|
}
|
|
782
1565
|
}
|
|
783
|
-
plt.$flags$ &=
|
|
1566
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
784
1567
|
};
|
|
785
1568
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
786
1569
|
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
@@ -790,7 +1573,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
790
1573
|
}
|
|
791
1574
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
792
1575
|
if (vnodes[startIdx]) {
|
|
793
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
1576
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
794
1577
|
if (childNode) {
|
|
795
1578
|
vnodes[startIdx].$elm$ = childNode;
|
|
796
1579
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -877,7 +1660,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
877
1660
|
if (idxInOld >= 0) {
|
|
878
1661
|
elmToMove = oldCh[idxInOld];
|
|
879
1662
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
880
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
1663
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
881
1664
|
} else {
|
|
882
1665
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
883
1666
|
oldCh[idxInOld] = void 0;
|
|
@@ -885,12 +1668,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
885
1668
|
}
|
|
886
1669
|
newStartVnode = newCh[++newStartIdx];
|
|
887
1670
|
} else {
|
|
888
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
1671
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
889
1672
|
newStartVnode = newCh[++newStartIdx];
|
|
890
1673
|
}
|
|
891
1674
|
if (node) {
|
|
892
1675
|
{
|
|
893
|
-
insertBefore(
|
|
1676
|
+
insertBefore(
|
|
1677
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
1678
|
+
node,
|
|
1679
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1680
|
+
);
|
|
894
1681
|
}
|
|
895
1682
|
}
|
|
896
1683
|
}
|
|
@@ -916,14 +1703,14 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
916
1703
|
if (!isInitialRender) {
|
|
917
1704
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
918
1705
|
}
|
|
1706
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1707
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1708
|
+
}
|
|
919
1709
|
return true;
|
|
920
1710
|
}
|
|
921
1711
|
return false;
|
|
922
1712
|
};
|
|
923
|
-
var referenceNode = (node) =>
|
|
924
|
-
return node && node["s-ol"] || node;
|
|
925
|
-
};
|
|
926
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
1713
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
927
1714
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
928
1715
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
929
1716
|
const oldChildren = oldVNode.$children$;
|
|
@@ -936,9 +1723,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
936
1723
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
937
1724
|
}
|
|
938
1725
|
{
|
|
939
|
-
|
|
940
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
941
|
-
}
|
|
1726
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
942
1727
|
}
|
|
943
1728
|
if (oldChildren !== null && newChildren !== null) {
|
|
944
1729
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -947,7 +1732,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
947
1732
|
elm.textContent = "";
|
|
948
1733
|
}
|
|
949
1734
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
950
|
-
} else if (
|
|
1735
|
+
} else if (
|
|
1736
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
1737
|
+
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1738
|
+
) {
|
|
951
1739
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
952
1740
|
}
|
|
953
1741
|
if (isSvgMode && tag === "svg") {
|
|
@@ -959,45 +1747,19 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
959
1747
|
elm.data = text;
|
|
960
1748
|
}
|
|
961
1749
|
};
|
|
962
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
963
|
-
const childNodes = elm.childNodes;
|
|
964
|
-
for (const childNode of childNodes) {
|
|
965
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
966
|
-
if (childNode["s-sr"]) {
|
|
967
|
-
const slotName = childNode["s-sn"];
|
|
968
|
-
childNode.hidden = false;
|
|
969
|
-
for (const siblingNode of childNodes) {
|
|
970
|
-
if (siblingNode !== childNode) {
|
|
971
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
972
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
973
|
-
childNode.hidden = true;
|
|
974
|
-
break;
|
|
975
|
-
}
|
|
976
|
-
} else {
|
|
977
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
978
|
-
childNode.hidden = true;
|
|
979
|
-
break;
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
updateFallbackSlotVisibility(childNode);
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
1750
|
var relocateNodes = [];
|
|
990
1751
|
var markSlotContentForRelocation = (elm) => {
|
|
991
1752
|
let node;
|
|
992
1753
|
let hostContentNodes;
|
|
993
1754
|
let j;
|
|
994
|
-
|
|
1755
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1756
|
+
for (const childNode of children) {
|
|
995
1757
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
996
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
1758
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
997
1759
|
const slotName = childNode["s-sn"];
|
|
998
1760
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
999
1761
|
node = hostContentNodes[j];
|
|
1000
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (
|
|
1762
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
|
|
1001
1763
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1002
1764
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1003
1765
|
checkSlotFallbackVisibility = true;
|
|
@@ -1035,21 +1797,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1035
1797
|
}
|
|
1036
1798
|
}
|
|
1037
1799
|
};
|
|
1038
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1039
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1040
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1041
|
-
return true;
|
|
1042
|
-
}
|
|
1043
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
1044
|
-
return true;
|
|
1045
|
-
}
|
|
1046
|
-
return false;
|
|
1047
|
-
}
|
|
1048
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
1049
|
-
return true;
|
|
1050
|
-
}
|
|
1051
|
-
return slotName === "";
|
|
1052
|
-
};
|
|
1053
1800
|
var nullifyVNodeRefs = (vNode) => {
|
|
1054
1801
|
{
|
|
1055
1802
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1057,15 +1804,17 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1057
1804
|
}
|
|
1058
1805
|
};
|
|
1059
1806
|
var insertBefore = (parent, newNode, reference) => {
|
|
1060
|
-
|
|
1061
|
-
|
|
1807
|
+
{
|
|
1808
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1809
|
+
}
|
|
1062
1810
|
};
|
|
1063
1811
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1064
1812
|
var _a, _b, _c, _d;
|
|
1065
1813
|
const hostElm = hostRef.$hostElement$;
|
|
1066
1814
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1067
1815
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1068
|
-
const
|
|
1816
|
+
const isHostElement = isHost(renderFnResults);
|
|
1817
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
1069
1818
|
hostTagName = hostElm.tagName;
|
|
1070
1819
|
if (cmpMeta.$attrsToReflect$) {
|
|
1071
1820
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
@@ -1084,10 +1833,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1084
1833
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1085
1834
|
hostRef.$vnode$ = rootVnode;
|
|
1086
1835
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1087
|
-
|
|
1088
|
-
scopeId = hostElm["s-sc"];
|
|
1089
|
-
}
|
|
1090
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1836
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1091
1837
|
{
|
|
1092
1838
|
contentRef = hostElm["s-cr"];
|
|
1093
1839
|
checkSlotFallbackVisibility = false;
|
|
@@ -1099,8 +1845,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1099
1845
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1100
1846
|
for (const relocateData of relocateNodes) {
|
|
1101
1847
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1102
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
1103
|
-
const orgLocationNode =
|
|
1848
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1849
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1104
1850
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1105
1851
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1106
1852
|
}
|
|
@@ -1115,7 +1861,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1115
1861
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1116
1862
|
while (orgLocationNode) {
|
|
1117
1863
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1118
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1864
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1119
1865
|
refNode = refNode.nextSibling;
|
|
1120
1866
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1121
1867
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1128,18 +1874,20 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1128
1874
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1129
1875
|
}
|
|
1130
1876
|
}
|
|
1131
|
-
|
|
1877
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1878
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1879
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1132
1880
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1133
1881
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1134
1882
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1135
1883
|
}
|
|
1136
1884
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1137
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1885
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1138
1886
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1139
1887
|
}
|
|
1140
1888
|
}
|
|
1141
1889
|
}
|
|
1142
|
-
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](
|
|
1890
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1143
1891
|
} else {
|
|
1144
1892
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1145
1893
|
if (isInitialLoad) {
|
|
@@ -1153,7 +1901,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1153
1901
|
if (checkSlotFallbackVisibility) {
|
|
1154
1902
|
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1155
1903
|
}
|
|
1156
|
-
plt.$flags$ &=
|
|
1904
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1157
1905
|
relocateNodes.length = 0;
|
|
1158
1906
|
}
|
|
1159
1907
|
contentRef = void 0;
|
|
@@ -1162,7 +1910,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1162
1910
|
// src/runtime/update-component.ts
|
|
1163
1911
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1164
1912
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1165
|
-
ancestorComponent["s-p"].push(
|
|
1913
|
+
const index = ancestorComponent["s-p"].push(
|
|
1914
|
+
new Promise(
|
|
1915
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1916
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1917
|
+
r();
|
|
1918
|
+
}
|
|
1919
|
+
)
|
|
1920
|
+
);
|
|
1166
1921
|
}
|
|
1167
1922
|
};
|
|
1168
1923
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1191,17 +1946,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1191
1946
|
{
|
|
1192
1947
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1193
1948
|
if (hostRef.$queuedListeners$) {
|
|
1194
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1949
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1195
1950
|
hostRef.$queuedListeners$ = void 0;
|
|
1196
1951
|
}
|
|
1197
1952
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
}
|
|
1202
|
-
{
|
|
1203
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1953
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1954
|
+
} else {
|
|
1955
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1204
1956
|
}
|
|
1957
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1205
1958
|
endSchedule();
|
|
1206
1959
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1207
1960
|
};
|
|
@@ -1244,7 +1997,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1244
1997
|
try {
|
|
1245
1998
|
instance = instance.render() ;
|
|
1246
1999
|
{
|
|
1247
|
-
hostRef.$flags$ &=
|
|
2000
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
1248
2001
|
}
|
|
1249
2002
|
{
|
|
1250
2003
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -1267,17 +2020,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1267
2020
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1268
2021
|
const instance = hostRef.$lazyInstance$ ;
|
|
1269
2022
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1270
|
-
|
|
1271
|
-
safeCall(instance, "componentDidRender");
|
|
1272
|
-
}
|
|
2023
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1273
2024
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1274
2025
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1275
2026
|
{
|
|
1276
2027
|
addHydratedFlag(elm);
|
|
1277
2028
|
}
|
|
1278
|
-
|
|
1279
|
-
safeCall(instance, "componentDidLoad");
|
|
1280
|
-
}
|
|
2029
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1281
2030
|
endPostUpdate();
|
|
1282
2031
|
{
|
|
1283
2032
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1286,6 +2035,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1286
2035
|
}
|
|
1287
2036
|
}
|
|
1288
2037
|
} else {
|
|
2038
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1289
2039
|
endPostUpdate();
|
|
1290
2040
|
}
|
|
1291
2041
|
{
|
|
@@ -1299,21 +2049,18 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1299
2049
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1300
2050
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1301
2051
|
}
|
|
1302
|
-
hostRef.$flags$ &=
|
|
2052
|
+
hostRef.$flags$ &= -517;
|
|
1303
2053
|
}
|
|
1304
2054
|
};
|
|
1305
2055
|
var appDidLoad = (who) => {
|
|
1306
|
-
{
|
|
1307
|
-
addHydratedFlag(doc.documentElement);
|
|
1308
|
-
}
|
|
1309
2056
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1310
2057
|
};
|
|
1311
|
-
var safeCall = (instance, method, arg) => {
|
|
2058
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1312
2059
|
if (instance && instance[method]) {
|
|
1313
2060
|
try {
|
|
1314
2061
|
return instance[method](arg);
|
|
1315
2062
|
} catch (e) {
|
|
1316
|
-
consoleError(e);
|
|
2063
|
+
consoleError(e, elm);
|
|
1317
2064
|
}
|
|
1318
2065
|
}
|
|
1319
2066
|
return void 0;
|
|
@@ -1329,14 +2076,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1329
2076
|
const hostRef = getHostRef(ref);
|
|
1330
2077
|
if (!hostRef) {
|
|
1331
2078
|
throw new Error(
|
|
1332
|
-
`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/
|
|
2079
|
+
`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).`
|
|
1333
2080
|
);
|
|
1334
2081
|
}
|
|
1335
2082
|
const elm = hostRef.$hostElement$ ;
|
|
1336
2083
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1337
2084
|
const flags = hostRef.$flags$;
|
|
1338
2085
|
const instance = hostRef.$lazyInstance$ ;
|
|
1339
|
-
newVal = parsePropertyValue(
|
|
2086
|
+
newVal = parsePropertyValue(
|
|
2087
|
+
newVal,
|
|
2088
|
+
cmpMeta.$members$[propName][0],
|
|
2089
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
2090
|
+
);
|
|
1340
2091
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1341
2092
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1342
2093
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -1355,6 +2106,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1355
2106
|
}
|
|
1356
2107
|
}
|
|
1357
2108
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2109
|
+
if (instance.componentShouldUpdate) {
|
|
2110
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2111
|
+
return;
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
1358
2114
|
scheduleUpdate(hostRef, false);
|
|
1359
2115
|
}
|
|
1360
2116
|
}
|
|
@@ -1366,23 +2122,23 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1366
2122
|
var _a, _b;
|
|
1367
2123
|
const prototype = Cstr.prototype;
|
|
1368
2124
|
if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
1369
|
-
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
|
|
1370
|
-
|
|
2125
|
+
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
2126
|
+
Object.defineProperty(prototype, cbName, {
|
|
1371
2127
|
value(...args) {
|
|
1372
2128
|
const hostRef = getHostRef(this);
|
|
1373
2129
|
const instance = hostRef.$lazyInstance$ ;
|
|
1374
2130
|
if (!instance) {
|
|
1375
|
-
hostRef.$onReadyPromise$.then((
|
|
1376
|
-
const cb =
|
|
1377
|
-
typeof cb === "function" && cb.call(
|
|
2131
|
+
hostRef.$onReadyPromise$.then((asyncInstance) => {
|
|
2132
|
+
const cb = asyncInstance[cbName];
|
|
2133
|
+
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
1378
2134
|
});
|
|
1379
2135
|
} else {
|
|
1380
|
-
const cb = instance[cbName];
|
|
2136
|
+
const cb = instance[cbName] ;
|
|
1381
2137
|
typeof cb === "function" && cb.call(instance, ...args);
|
|
1382
2138
|
}
|
|
1383
2139
|
}
|
|
1384
|
-
})
|
|
1385
|
-
);
|
|
2140
|
+
});
|
|
2141
|
+
});
|
|
1386
2142
|
}
|
|
1387
2143
|
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
1388
2144
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
@@ -1391,15 +2147,78 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1391
2147
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1392
2148
|
members.map(([memberName, [memberFlags]]) => {
|
|
1393
2149
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
2150
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
2151
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
2152
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
2153
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
2154
|
+
Object.defineProperty(prototype, memberName, {
|
|
2155
|
+
get() {
|
|
2156
|
+
{
|
|
2157
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
2158
|
+
return getValue(this, memberName);
|
|
2159
|
+
}
|
|
2160
|
+
const ref = getHostRef(this);
|
|
2161
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
2162
|
+
if (!instance) return;
|
|
2163
|
+
return instance[memberName];
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
configurable: true,
|
|
2167
|
+
enumerable: true
|
|
2168
|
+
});
|
|
2169
|
+
}
|
|
1394
2170
|
Object.defineProperty(prototype, memberName, {
|
|
1395
|
-
get() {
|
|
1396
|
-
return getValue(this, memberName);
|
|
1397
|
-
},
|
|
1398
2171
|
set(newValue) {
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
2172
|
+
const ref = getHostRef(this);
|
|
2173
|
+
if (origSetter) {
|
|
2174
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2175
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
2176
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
2177
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2178
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2179
|
+
}
|
|
2180
|
+
origSetter.apply(this, [
|
|
2181
|
+
parsePropertyValue(
|
|
2182
|
+
newValue,
|
|
2183
|
+
memberFlags,
|
|
2184
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
2185
|
+
)
|
|
2186
|
+
]);
|
|
2187
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2188
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2189
|
+
return;
|
|
2190
|
+
}
|
|
2191
|
+
{
|
|
2192
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
2193
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2194
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
2195
|
+
ref.$onReadyPromise$.then(() => {
|
|
2196
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
2197
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
2198
|
+
}
|
|
2199
|
+
});
|
|
2200
|
+
}
|
|
2201
|
+
return;
|
|
2202
|
+
}
|
|
2203
|
+
const setterSetVal = () => {
|
|
2204
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
2205
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2206
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2207
|
+
}
|
|
2208
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
2209
|
+
newValue,
|
|
2210
|
+
memberFlags,
|
|
2211
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
2212
|
+
);
|
|
2213
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2214
|
+
};
|
|
2215
|
+
if (ref.$lazyInstance$) {
|
|
2216
|
+
setterSetVal();
|
|
2217
|
+
} else {
|
|
2218
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
1403
2222
|
});
|
|
1404
2223
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1405
2224
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -1420,10 +2239,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1420
2239
|
plt.jmp(() => {
|
|
1421
2240
|
var _a2;
|
|
1422
2241
|
const propName = attrNameToPropName.get(attrName);
|
|
1423
|
-
if (this.hasOwnProperty(propName)) {
|
|
2242
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1424
2243
|
newValue = this[propName];
|
|
1425
2244
|
delete this[propName];
|
|
1426
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
2245
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
2246
|
+
this[propName] == newValue) {
|
|
1427
2247
|
return;
|
|
1428
2248
|
} else if (propName == null) {
|
|
1429
2249
|
const hostRef = getHostRef(this);
|
|
@@ -1439,7 +2259,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1439
2259
|
}
|
|
1440
2260
|
return;
|
|
1441
2261
|
}
|
|
1442
|
-
|
|
2262
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2263
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
2264
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2265
|
+
this[propName] = newValue;
|
|
2266
|
+
}
|
|
1443
2267
|
});
|
|
1444
2268
|
};
|
|
1445
2269
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1468,7 +2292,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1468
2292
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1469
2293
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1470
2294
|
if (bundleId) {
|
|
1471
|
-
const CstrImport = loadModule(cmpMeta);
|
|
2295
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1472
2296
|
if (CstrImport && "then" in CstrImport) {
|
|
1473
2297
|
const endLoad = uniqueTime();
|
|
1474
2298
|
Cstr = await CstrImport;
|
|
@@ -1493,16 +2317,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1493
2317
|
try {
|
|
1494
2318
|
new Cstr(hostRef);
|
|
1495
2319
|
} catch (e) {
|
|
1496
|
-
consoleError(e);
|
|
2320
|
+
consoleError(e, elm);
|
|
1497
2321
|
}
|
|
1498
2322
|
{
|
|
1499
|
-
hostRef.$flags$ &=
|
|
2323
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1500
2324
|
}
|
|
1501
2325
|
{
|
|
1502
2326
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1503
2327
|
}
|
|
1504
2328
|
endNewInstance();
|
|
1505
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2329
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1506
2330
|
} else {
|
|
1507
2331
|
Cstr = elm.constructor;
|
|
1508
2332
|
const cmpTag = elm.localName;
|
|
@@ -1529,9 +2353,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1529
2353
|
schedule();
|
|
1530
2354
|
}
|
|
1531
2355
|
};
|
|
1532
|
-
var fireConnectedCallback = (instance) => {
|
|
2356
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1533
2357
|
{
|
|
1534
|
-
safeCall(instance, "connectedCallback");
|
|
2358
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1535
2359
|
}
|
|
1536
2360
|
};
|
|
1537
2361
|
|
|
@@ -1543,7 +2367,18 @@ var connectedCallback = (elm) => {
|
|
|
1543
2367
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1544
2368
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1545
2369
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
2370
|
+
let hostId;
|
|
1546
2371
|
{
|
|
2372
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
2373
|
+
if (hostId) {
|
|
2374
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2375
|
+
const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
|
|
2376
|
+
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
2377
|
+
}
|
|
2378
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
if (!hostId) {
|
|
1547
2382
|
if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
1548
2383
|
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
1549
2384
|
setContentReference(elm);
|
|
@@ -1552,7 +2387,7 @@ var connectedCallback = (elm) => {
|
|
|
1552
2387
|
{
|
|
1553
2388
|
let ancestorComponent = elm;
|
|
1554
2389
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
1555
|
-
if (ancestorComponent["s-p"]) {
|
|
2390
|
+
if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
1556
2391
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
1557
2392
|
break;
|
|
1558
2393
|
}
|
|
@@ -1573,24 +2408,27 @@ var connectedCallback = (elm) => {
|
|
|
1573
2408
|
} else {
|
|
1574
2409
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1575
2410
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1576
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2411
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1577
2412
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1578
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
2413
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1579
2414
|
}
|
|
1580
2415
|
}
|
|
1581
2416
|
endConnected();
|
|
1582
2417
|
}
|
|
1583
2418
|
};
|
|
1584
2419
|
var setContentReference = (elm) => {
|
|
1585
|
-
|
|
2420
|
+
if (!win.document) {
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2423
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
1586
2424
|
""
|
|
1587
2425
|
);
|
|
1588
2426
|
contentRefElm["s-cn"] = true;
|
|
1589
2427
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1590
2428
|
};
|
|
1591
|
-
var disconnectInstance = (instance) => {
|
|
2429
|
+
var disconnectInstance = (instance, elm) => {
|
|
1592
2430
|
{
|
|
1593
|
-
safeCall(instance, "disconnectedCallback");
|
|
2431
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1594
2432
|
}
|
|
1595
2433
|
};
|
|
1596
2434
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1603,28 +2441,44 @@ var disconnectedCallback = async (elm) => {
|
|
|
1603
2441
|
}
|
|
1604
2442
|
}
|
|
1605
2443
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1606
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
2444
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1607
2445
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1608
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
2446
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1609
2447
|
}
|
|
1610
2448
|
}
|
|
2449
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2450
|
+
rootAppliedStyles.delete(elm);
|
|
2451
|
+
}
|
|
2452
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2453
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2454
|
+
}
|
|
1611
2455
|
};
|
|
1612
2456
|
|
|
1613
2457
|
// src/runtime/bootstrap-lazy.ts
|
|
1614
2458
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1615
2459
|
var _a;
|
|
2460
|
+
if (!win.document) {
|
|
2461
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2462
|
+
return;
|
|
2463
|
+
}
|
|
1616
2464
|
const endBootstrap = createTime();
|
|
1617
2465
|
const cmpTags = [];
|
|
1618
2466
|
const exclude = options.exclude || [];
|
|
1619
2467
|
const customElements2 = win.customElements;
|
|
1620
|
-
const head =
|
|
2468
|
+
const head = win.document.head;
|
|
1621
2469
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1622
|
-
const dataStyles = /* @__PURE__ */
|
|
2470
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1623
2471
|
const deferredConnectedCallbacks = [];
|
|
1624
2472
|
let appLoadFallback;
|
|
1625
2473
|
let isBootstrapping = true;
|
|
1626
2474
|
Object.assign(plt, options);
|
|
1627
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2475
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
2476
|
+
{
|
|
2477
|
+
plt.$flags$ |= 2 /* appLoaded */;
|
|
2478
|
+
}
|
|
2479
|
+
{
|
|
2480
|
+
hydrateScopedToShadow();
|
|
2481
|
+
}
|
|
1628
2482
|
let hasSlotRelocation = false;
|
|
1629
2483
|
lazyBundles.map((lazyBundle) => {
|
|
1630
2484
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1661,9 +2515,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1661
2515
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1662
2516
|
{
|
|
1663
2517
|
if (!self.shadowRoot) {
|
|
1664
|
-
|
|
1665
|
-
self.attachShadow({ mode: "open" });
|
|
1666
|
-
}
|
|
2518
|
+
createShadowRoot.call(self, cmpMeta);
|
|
1667
2519
|
} else {
|
|
1668
2520
|
if (self.shadowRoot.mode !== "open") {
|
|
1669
2521
|
throw new Error(
|
|
@@ -1692,6 +2544,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1692
2544
|
}
|
|
1693
2545
|
disconnectedCallback() {
|
|
1694
2546
|
plt.jmp(() => disconnectedCallback(this));
|
|
2547
|
+
plt.raf(() => {
|
|
2548
|
+
var _a3;
|
|
2549
|
+
const hostRef = getHostRef(this);
|
|
2550
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2551
|
+
if (i2 > -1) {
|
|
2552
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2553
|
+
}
|
|
2554
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2555
|
+
delete hostRef.$vnode$.$elm$;
|
|
2556
|
+
}
|
|
2557
|
+
});
|
|
1695
2558
|
}
|
|
1696
2559
|
componentOnReady() {
|
|
1697
2560
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1714,12 +2577,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1714
2577
|
if (hasSlotRelocation) {
|
|
1715
2578
|
dataStyles.textContent += SLOT_FB_CSS;
|
|
1716
2579
|
}
|
|
1717
|
-
{
|
|
1718
|
-
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
1719
|
-
}
|
|
1720
2580
|
if (dataStyles.innerHTML.length) {
|
|
1721
2581
|
dataStyles.setAttribute("data-styles", "");
|
|
1722
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2582
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1723
2583
|
if (nonce != null) {
|
|
1724
2584
|
dataStyles.setAttribute("nonce", nonce);
|
|
1725
2585
|
}
|
|
@@ -1737,9 +2597,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1737
2597
|
endBootstrap();
|
|
1738
2598
|
};
|
|
1739
2599
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1740
|
-
if (listeners) {
|
|
2600
|
+
if (listeners && win.document) {
|
|
1741
2601
|
listeners.map(([flags, name, method]) => {
|
|
1742
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2602
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
1743
2603
|
const handler = hostListenerProxy(hostRef, method);
|
|
1744
2604
|
const opts = hostListenerOpts(flags);
|
|
1745
2605
|
plt.ael(target, name, handler, opts);
|
|
@@ -1758,11 +2618,13 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1758
2618
|
}
|
|
1759
2619
|
}
|
|
1760
2620
|
} catch (e) {
|
|
1761
|
-
consoleError(e);
|
|
2621
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1762
2622
|
}
|
|
1763
2623
|
};
|
|
1764
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1765
|
-
if (flags & 8 /* TargetWindow */)
|
|
2624
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2625
|
+
if (flags & 8 /* TargetWindow */) {
|
|
2626
|
+
return win;
|
|
2627
|
+
}
|
|
1766
2628
|
return elm;
|
|
1767
2629
|
};
|
|
1768
2630
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1777,6 +2639,7 @@ exports.Host = Host;
|
|
|
1777
2639
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1778
2640
|
exports.createEvent = createEvent;
|
|
1779
2641
|
exports.getElement = getElement;
|
|
2642
|
+
exports.globalScripts = globalScripts;
|
|
1780
2643
|
exports.h = h;
|
|
1781
2644
|
exports.promiseResolve = promiseResolve;
|
|
1782
2645
|
exports.registerInstance = registerInstance;
|