@nova-design-system/nova-webcomponents 3.0.0-beta.40 → 3.0.0-beta.42
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/blazor-docs.json +16850 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
- package/dist/cjs/{constants-79d2cdfc.js → constants-bcd6b2e2.js} +100 -2
- package/dist/cjs/constants-bcd6b2e2.js.map +1 -0
- package/dist/cjs/{index-5910ba06.js → index-9bda5507.js} +1364 -1182
- package/dist/cjs/index-9bda5507.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/inputmask-76b7b93f.js +3763 -0
- package/dist/cjs/inputmask-76b7b93f.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/native.cjs.js +3 -3
- package/dist/cjs/native.cjs.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +3 -3
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +3 -3
- package/dist/cjs/nv-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +16 -5
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-base.cjs.entry.js +2 -2
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +2 -2
- package/dist/cjs/nv-button.cjs.entry.js +3 -3
- package/dist/cjs/nv-calendar.cjs.entry.js +77 -22
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.cjs.entry.js +267 -5
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialog.cjs.entry.js +15 -10
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +281 -0
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +358 -0
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +13 -24
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +22 -30
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +9 -6
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +5 -13
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +7 -7
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +12 -12
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +4 -4
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/{nv-iconbutton.cjs.entry.js → nv-iconbutton_2.cjs.entry.js} +44 -3
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-menu.cjs.entry.js +5 -5
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +5 -5
- package/dist/cjs/nv-menuitem.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +31 -18
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js +3 -3
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/nv-alert/nv-alert.js +2 -2
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.js +8 -8
- package/dist/collection/components/nv-avatar/nv-avatar.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +4 -4
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-base/nv-base.js +1 -1
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
- package/dist/collection/components/nv-button/nv-button.js +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.css +13 -8
- package/dist/collection/components/nv-calendar/nv-calendar.js +82 -24
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +24 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +89 -6
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +13 -8
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +56 -40
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +7 -7
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +335 -0
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -0
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +845 -0
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -0
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +165 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +284 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +988 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -0
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +192 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +11 -22
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +14 -16
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +1 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +12 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +22 -24
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +1 -4
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +19 -48
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +17 -21
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +9 -6
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +9 -10
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -11
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +5 -5
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +30 -15
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +8 -8
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +15 -16
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +6 -6
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +5 -5
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +11 -11
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/{nv-fieldtime.css → styles/nv-fieldtime.css} +20 -32
- package/dist/collection/components/nv-icon/nv-icon.js +8 -8
- package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +31 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.css +3 -0
- package/dist/collection/components/nv-menu/nv-menu.docs.js +6 -6
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +11 -12
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.css +3 -0
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +27 -9
- package/dist/collection/components/nv-menuitem/nv-menuitem.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.css +5 -5
- package/dist/collection/components/nv-popover/nv-popover.docs.js +3 -3
- package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +38 -37
- package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +9 -9
- package/dist/collection/components/nv-toggle/nv-toggle.js.map +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.css +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +4 -4
- package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
- package/dist/collection/utils/constants.js +94 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/input.utils.js +20 -0
- package/dist/collection/utils/input.utils.js.map +1 -0
- package/dist/collection/utils/test/input.utils.test.js +42 -0
- package/dist/collection/utils/test/input.utils.test.js.map +1 -0
- package/dist/components/index.js +2 -2
- package/dist/components/nv-alert.js +5 -5
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +11 -11
- package/dist/components/nv-avatar.js.map +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-base.js +2 -2
- package/dist/components/nv-breadcrumb.js +4 -4
- package/dist/components/nv-breadcrumbs.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1039
- package/dist/components/nv-calendar.js.map +1 -1
- package/dist/components/nv-col.js +2 -2
- package/dist/components/nv-datagrid.js +272 -7
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +2 -2
- package/dist/components/nv-dialog.js +20 -15
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.d.ts +11 -0
- package/dist/components/nv-fielddate.js +359 -0
- package/dist/components/nv-fielddate.js.map +1 -0
- package/dist/components/nv-fielddaterange.d.ts +11 -0
- package/dist/components/nv-fielddaterange.js +440 -0
- package/dist/components/nv-fielddaterange.js.map +1 -0
- package/dist/components/nv-fielddropdown.js +18 -29
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +30 -40
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +25 -10
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +8 -16
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +6 -6
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +24 -12
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldtext.js +9 -9
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtextarea.js +6 -6
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +16 -16
- package/dist/components/nv-fieldtime.js.map +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +12 -12
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-table.js +3 -3
- package/dist/components/nv-tablecolumn.js +1 -1
- package/dist/components/nv-toggle.js +10 -10
- package/dist/components/nv-toggle.js.map +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-d17558a8.js → p-057ae4f2.js} +41 -1201
- package/dist/components/p-057ae4f2.js.map +1 -0
- package/dist/components/{p-ba145f46.js → p-1a4f9c97.js} +5 -5
- package/dist/components/{p-ba145f46.js.map → p-1a4f9c97.js.map} +1 -1
- package/dist/components/{p-77d0fedc.js → p-1c45c0f2.js} +1283 -1208
- package/dist/components/p-1c45c0f2.js.map +1 -0
- package/dist/components/{p-11cc38e0.js → p-1e095bba.js} +21 -6
- package/dist/components/p-1e095bba.js.map +1 -0
- package/dist/components/{p-4bb5eb79.js → p-1fad2529.js} +16 -5
- package/dist/components/p-1fad2529.js.map +1 -0
- package/dist/components/{p-f201db34.js → p-3a3ba5b1.js} +3 -3
- package/dist/components/{p-f201db34.js.map → p-3a3ba5b1.js.map} +1 -1
- package/dist/components/p-3aa6f6dc.js +1104 -0
- package/dist/components/p-3aa6f6dc.js.map +1 -0
- package/dist/components/{p-69543282.js → p-4c6ba63c.js} +8 -7
- package/dist/components/p-4c6ba63c.js.map +1 -0
- package/dist/components/{p-a633892a.js → p-4c6d8df7.js} +3 -3
- package/dist/components/{p-a633892a.js.map → p-4c6d8df7.js.map} +1 -1
- package/dist/components/p-55202370.js +172 -0
- package/dist/components/p-55202370.js.map +1 -0
- package/dist/components/{p-1657eba4.js → p-56716b97.js} +7 -7
- package/dist/components/{p-1657eba4.js.map → p-56716b97.js.map} +1 -1
- package/dist/components/{p-33f9bdb1.js → p-7f142767.js} +7 -7
- package/dist/components/{p-33f9bdb1.js.map → p-7f142767.js.map} +1 -1
- package/dist/components/{p-b316c35d.js → p-8348db09.js} +99 -3
- package/dist/components/p-8348db09.js.map +1 -0
- package/dist/components/p-89fb308b.js +3761 -0
- package/dist/components/p-89fb308b.js.map +1 -0
- package/dist/components/{p-4b184820.js → p-9476354d.js} +4 -4
- package/dist/components/{p-4b184820.js.map → p-9476354d.js.map} +1 -1
- package/dist/components/{p-fad78896.js → p-a8b5969f.js} +8 -8
- package/dist/components/p-a8b5969f.js.map +1 -0
- package/dist/components/{p-f77c3072.js → p-ebf24fd0.js} +11 -11
- package/dist/components/p-ebf24fd0.js.map +1 -0
- package/dist/docs.json +1822 -151
- package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
- package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
- package/dist/esm/{constants-75e6d7f0.js → constants-98e2dcc2.js} +99 -3
- package/dist/esm/constants-98e2dcc2.js.map +1 -0
- package/dist/esm/{index-fac2d5d2.js → index-1fb7a9a6.js} +1364 -1182
- package/dist/esm/index-1fb7a9a6.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/inputmask-edcad3c1.js +3761 -0
- package/dist/esm/inputmask-edcad3c1.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/native.js +4 -4
- package/dist/esm/native.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +3 -3
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +3 -3
- package/dist/esm/nv-avatar.entry.js.map +1 -1
- package/dist/esm/nv-badge_2.entry.js +16 -5
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-base.entry.js +2 -2
- package/dist/esm/nv-breadcrumb.entry.js +2 -2
- package/dist/esm/nv-breadcrumbs.entry.js +2 -2
- package/dist/esm/nv-button.entry.js +3 -3
- package/dist/esm/nv-calendar.entry.js +73 -18
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js +267 -5
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +2 -2
- package/dist/esm/nv-dialog.entry.js +15 -10
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +4 -4
- package/dist/esm/nv-fieldcheckbox.entry.js +6 -6
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +277 -0
- package/dist/esm/nv-fielddate.entry.js.map +1 -0
- package/dist/esm/nv-fielddaterange.entry.js +354 -0
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -0
- package/dist/esm/nv-fielddropdown.entry.js +13 -24
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
- package/dist/esm/nv-fieldmultiselect.entry.js +22 -30
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +9 -6
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +5 -13
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +7 -7
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +5 -5
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +4 -4
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +12 -12
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +4 -4
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/{nv-iconbutton.entry.js → nv-iconbutton_2.entry.js} +44 -4
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -0
- package/dist/esm/nv-menu.entry.js +5 -5
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +5 -5
- package/dist/esm/nv-menuitem.entry.js.map +1 -1
- package/dist/esm/nv-popover.entry.js +31 -18
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-table.entry.js +3 -3
- package/dist/esm/nv-tablecolumn.entry.js +1 -1
- package/dist/esm/nv-toggle.entry.js +3 -3
- package/dist/esm/nv-toggle.entry.js.map +1 -1
- package/dist/esm/nv-tooltip.entry.js +3 -3
- package/dist/esm/nv-tooltip.entry.js.map +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-0462f723.js +2 -0
- package/dist/native/p-0462f723.js.map +1 -0
- package/dist/native/{p-8664ab16.entry.js → p-048486e0.entry.js} +3 -3
- package/dist/native/p-048486e0.entry.js.map +1 -0
- package/dist/native/{p-fca807b4.entry.js → p-04c6048a.entry.js} +3 -3
- package/dist/native/{p-fca807b4.entry.js.map → p-04c6048a.entry.js.map} +1 -1
- package/dist/native/p-1a46cb52.entry.js +2 -0
- package/dist/native/p-2281d5ef.entry.js +2 -0
- package/dist/native/p-2281d5ef.entry.js.map +1 -0
- package/dist/native/p-22a45102.entry.js +2 -0
- package/dist/native/p-22a45102.entry.js.map +1 -0
- package/dist/native/p-2ed540e3.entry.js +2 -0
- package/dist/native/p-2ed540e3.entry.js.map +1 -0
- package/dist/native/p-31184fdd.entry.js +2 -0
- package/dist/native/p-31184fdd.entry.js.map +1 -0
- package/dist/native/p-314d2b34.entry.js +2 -0
- package/dist/native/p-314d2b34.entry.js.map +1 -0
- package/dist/native/p-332c5d6c.entry.js +2 -0
- package/dist/native/p-332c5d6c.entry.js.map +1 -0
- package/dist/native/p-3af5bcc1.entry.js +2 -0
- package/dist/native/p-3af5bcc1.entry.js.map +1 -0
- package/dist/native/{p-e36e956b.entry.js → p-442f04f9.entry.js} +2 -2
- package/dist/native/{p-af60740c.entry.js → p-45577c7f.entry.js} +2 -2
- package/dist/native/p-45577c7f.entry.js.map +1 -0
- package/dist/native/p-464ef88f.entry.js +2 -0
- package/dist/native/p-464ef88f.entry.js.map +1 -0
- package/dist/native/p-46aa1136.entry.js +2 -0
- package/dist/native/{p-27ad7af2.entry.js → p-4a440970.entry.js} +2 -2
- package/dist/native/p-4a440970.entry.js.map +1 -0
- package/dist/native/p-4dc1d036.entry.js +2 -0
- package/dist/native/{p-e9e77494.entry.js → p-514101d6.entry.js} +2 -2
- package/dist/native/p-514101d6.entry.js.map +1 -0
- package/dist/native/p-53aa81dd.js +10 -0
- package/dist/native/p-53aa81dd.js.map +1 -0
- package/dist/native/{p-1a3d2a74.entry.js → p-56e98443.entry.js} +2 -2
- package/dist/native/p-56e98443.entry.js.map +1 -0
- package/dist/native/{p-b316c35d.js → p-59768ee5.js} +2 -2
- package/dist/native/p-59768ee5.js.map +1 -0
- package/dist/native/{p-edee1c1f.entry.js → p-62df7dd4.entry.js} +2 -2
- package/dist/native/p-665db087.entry.js +2 -0
- package/dist/native/p-68b5a92c.entry.js +2 -0
- package/dist/native/{p-b58c661b.entry.js → p-6a629671.entry.js} +2 -2
- package/dist/native/p-7fade532.entry.js +2 -0
- package/dist/native/p-7fade532.entry.js.map +1 -0
- package/dist/native/p-913907fb.entry.js +2 -0
- package/dist/native/p-913907fb.entry.js.map +1 -0
- package/dist/native/p-942f8e92.entry.js +2 -0
- package/dist/native/p-942f8e92.entry.js.map +1 -0
- package/dist/native/p-9f5e4dfc.entry.js +2 -0
- package/dist/native/p-9f5e4dfc.entry.js.map +1 -0
- package/dist/native/p-ab002252.js +3 -0
- package/dist/native/p-ab002252.js.map +1 -0
- package/dist/native/{p-fde56f9c.entry.js → p-ab84ff42.entry.js} +2 -2
- package/dist/native/{p-fde56f9c.entry.js.map → p-ab84ff42.entry.js.map} +1 -1
- package/dist/native/{p-487b81bd.entry.js → p-b052f1cb.entry.js} +2 -2
- package/dist/native/{p-9795090f.entry.js → p-bdabd495.entry.js} +2 -2
- package/dist/native/p-bdabd495.entry.js.map +1 -0
- package/dist/native/p-be4fc827.entry.js +2 -0
- package/dist/native/p-be4fc827.entry.js.map +1 -0
- package/dist/native/{p-184cd119.entry.js → p-c10e5113.entry.js} +2 -2
- package/dist/native/{p-491f4605.entry.js → p-d5cbf5c8.entry.js} +2 -2
- package/dist/native/{p-491f4605.entry.js.map → p-d5cbf5c8.entry.js.map} +1 -1
- package/dist/native/{p-69fb1c9d.entry.js → p-db2902d6.entry.js} +2 -2
- package/dist/native/p-ecc28398.entry.js +2 -0
- package/dist/native/p-ecc28398.entry.js.map +1 -0
- package/dist/native/p-ed595c96.entry.js +2 -0
- package/dist/native/p-ed595c96.entry.js.map +1 -0
- package/dist/native/p-f5e0d5c5.entry.js +2 -0
- package/dist/native/p-f5e0d5c5.entry.js.map +1 -0
- package/dist/native/p-f89b7d06.entry.js +2 -0
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +7 -0
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +21 -0
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +1 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +192 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.docs.d.ts +4 -0
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +206 -0
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.docs.d.ts +4 -0
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +1 -3
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +2 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +1 -11
- package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +1 -0
- package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +0 -1
- package/dist/types/components/nv-iconbutton/nv-iconbutton.d.ts +3 -0
- package/dist/types/components/nv-menu/nv-menu.d.ts +2 -3
- package/dist/types/components/nv-menuitem/nv-menuitem.d.ts +20 -16
- package/dist/types/components/nv-popover/nv-popover.d.ts +7 -4
- package/dist/types/components.d.ts +2344 -974
- package/dist/types/utils/constants.d.ts +6 -0
- package/dist/types/utils/input.utils.d.ts +8 -0
- package/dist/types/utils/test/input.utils.test.d.ts +1 -0
- package/dist/vscode-data.json +4570 -0
- package/hydrate/index.d.ts +22 -5
- package/hydrate/index.js +6403 -1242
- package/hydrate/index.mjs +6403 -1242
- package/package.json +7 -3
- package/dist/cjs/constants-79d2cdfc.js.map +0 -1
- package/dist/cjs/index-5910ba06.js.map +0 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-loader.cjs.entry.js +0 -35
- package/dist/cjs/nv-loader.cjs.entry.js.map +0 -1
- package/dist/components/p-11cc38e0.js.map +0 -1
- package/dist/components/p-4bb5eb79.js.map +0 -1
- package/dist/components/p-69543282.js.map +0 -1
- package/dist/components/p-77d0fedc.js.map +0 -1
- package/dist/components/p-96605453.js +0 -172
- package/dist/components/p-96605453.js.map +0 -1
- package/dist/components/p-b316c35d.js.map +0 -1
- package/dist/components/p-d17558a8.js.map +0 -1
- package/dist/components/p-f77c3072.js.map +0 -1
- package/dist/components/p-fad78896.js.map +0 -1
- package/dist/esm/constants-75e6d7f0.js.map +0 -1
- package/dist/esm/index-fac2d5d2.js.map +0 -1
- package/dist/esm/nv-iconbutton.entry.js.map +0 -1
- package/dist/esm/nv-loader.entry.js +0 -31
- package/dist/esm/nv-loader.entry.js.map +0 -1
- package/dist/native/p-0a2a9f8b.entry.js +0 -2
- package/dist/native/p-0a2a9f8b.entry.js.map +0 -1
- package/dist/native/p-12d08abc.entry.js +0 -2
- package/dist/native/p-12d08abc.entry.js.map +0 -1
- package/dist/native/p-15be3d96.entry.js +0 -2
- package/dist/native/p-15be3d96.entry.js.map +0 -1
- package/dist/native/p-1a3d2a74.entry.js.map +0 -1
- package/dist/native/p-27ad7af2.entry.js.map +0 -1
- package/dist/native/p-2b2a10f9.entry.js +0 -2
- package/dist/native/p-2b2a10f9.entry.js.map +0 -1
- package/dist/native/p-359f0f53.entry.js +0 -2
- package/dist/native/p-359f0f53.entry.js.map +0 -1
- package/dist/native/p-3b65037c.entry.js +0 -2
- package/dist/native/p-3be2c9a1.entry.js +0 -2
- package/dist/native/p-4283f375.entry.js +0 -2
- package/dist/native/p-5439afb8.js +0 -3
- package/dist/native/p-5439afb8.js.map +0 -1
- package/dist/native/p-554f7b44.entry.js +0 -2
- package/dist/native/p-554f7b44.entry.js.map +0 -1
- package/dist/native/p-729c9d45.entry.js +0 -2
- package/dist/native/p-729c9d45.entry.js.map +0 -1
- package/dist/native/p-78f08578.entry.js +0 -2
- package/dist/native/p-78f08578.entry.js.map +0 -1
- package/dist/native/p-8664ab16.entry.js.map +0 -1
- package/dist/native/p-87bd53df.entry.js +0 -2
- package/dist/native/p-87bd53df.entry.js.map +0 -1
- package/dist/native/p-8d6516a3.entry.js +0 -2
- package/dist/native/p-8d6516a3.entry.js.map +0 -1
- package/dist/native/p-951baf95.entry.js +0 -2
- package/dist/native/p-9795090f.entry.js.map +0 -1
- package/dist/native/p-af60740c.entry.js.map +0 -1
- package/dist/native/p-b316c35d.js.map +0 -1
- package/dist/native/p-b7bc918b.entry.js +0 -2
- package/dist/native/p-cda56476.entry.js +0 -2
- package/dist/native/p-cda56476.entry.js.map +0 -1
- package/dist/native/p-d1bf4d77.entry.js +0 -2
- package/dist/native/p-d7665a07.entry.js +0 -2
- package/dist/native/p-d7665a07.entry.js.map +0 -1
- package/dist/native/p-daeb7e22.entry.js +0 -2
- package/dist/native/p-daeb7e22.entry.js.map +0 -1
- package/dist/native/p-e9e77494.entry.js.map +0 -1
- package/dist/native/p-f1585fc2.entry.js +0 -2
- package/dist/native/p-f1585fc2.entry.js.map +0 -1
- package/dist/native/p-f3579407.entry.js +0 -2
- package/dist/native/p-f3579407.entry.js.map +0 -1
- /package/dist/native/{p-3be2c9a1.entry.js.map → p-1a46cb52.entry.js.map} +0 -0
- /package/dist/native/{p-e36e956b.entry.js.map → p-442f04f9.entry.js.map} +0 -0
- /package/dist/native/{p-d1bf4d77.entry.js.map → p-46aa1136.entry.js.map} +0 -0
- /package/dist/native/{p-4283f375.entry.js.map → p-4dc1d036.entry.js.map} +0 -0
- /package/dist/native/{p-edee1c1f.entry.js.map → p-62df7dd4.entry.js.map} +0 -0
- /package/dist/native/{p-951baf95.entry.js.map → p-665db087.entry.js.map} +0 -0
- /package/dist/native/{p-b7bc918b.entry.js.map → p-68b5a92c.entry.js.map} +0 -0
- /package/dist/native/{p-b58c661b.entry.js.map → p-6a629671.entry.js.map} +0 -0
- /package/dist/native/{p-487b81bd.entry.js.map → p-b052f1cb.entry.js.map} +0 -0
- /package/dist/native/{p-184cd119.entry.js.map → p-c10e5113.entry.js.map} +0 -0
- /package/dist/native/{p-69fb1c9d.entry.js.map → p-db2902d6.entry.js.map} +0 -0
- /package/dist/native/{p-3b65037c.entry.js.map → p-f89b7d06.entry.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const NAMESPACE = 'native';
|
|
2
|
-
const BUILD = /* native */ { allRenderFn: true, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true,
|
|
2
|
+
const BUILD = /* native */ { allRenderFn: true, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: true, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.27.1 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
@@ -11,15 +11,19 @@ var __export = (target, all) => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// src/utils/constants.ts
|
|
14
|
-
var EMPTY_OBJ = {};
|
|
15
14
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
16
15
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
17
16
|
|
|
18
17
|
// src/client/client-host-ref.ts
|
|
19
|
-
var
|
|
20
|
-
|
|
18
|
+
var getHostRef = (ref) => {
|
|
19
|
+
if (ref.__stencil__getHostRef) {
|
|
20
|
+
return ref.__stencil__getHostRef();
|
|
21
|
+
}
|
|
22
|
+
return void 0;
|
|
23
|
+
};
|
|
21
24
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
22
|
-
|
|
25
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
26
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
23
27
|
};
|
|
24
28
|
var registerHost = (hostElement, cmpMeta) => {
|
|
25
29
|
const hostRef = {
|
|
@@ -36,7 +40,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
36
40
|
hostElement["s-p"] = [];
|
|
37
41
|
hostElement["s-rc"] = [];
|
|
38
42
|
}
|
|
39
|
-
const ref =
|
|
43
|
+
const ref = hostRef;
|
|
44
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
40
45
|
return ref;
|
|
41
46
|
};
|
|
42
47
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
@@ -82,10 +87,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
82
87
|
return import(
|
|
83
88
|
/* webpackMode: "lazy" */
|
|
84
89
|
'./nv-breadcrumbs.entry.js').then(processMod, consoleError);
|
|
85
|
-
case 'nv-calendar':
|
|
86
|
-
return import(
|
|
87
|
-
/* webpackMode: "lazy" */
|
|
88
|
-
'./nv-calendar.entry.js').then(processMod, consoleError);
|
|
89
90
|
case 'nv-col':
|
|
90
91
|
return import(
|
|
91
92
|
/* webpackMode: "lazy" */
|
|
@@ -102,6 +103,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
102
103
|
return import(
|
|
103
104
|
/* webpackMode: "lazy" */
|
|
104
105
|
'./nv-dialog.entry.js').then(processMod, consoleError);
|
|
106
|
+
case 'nv-fielddate':
|
|
107
|
+
return import(
|
|
108
|
+
/* webpackMode: "lazy" */
|
|
109
|
+
'./nv-fielddate.entry.js').then(processMod, consoleError);
|
|
110
|
+
case 'nv-fielddaterange':
|
|
111
|
+
return import(
|
|
112
|
+
/* webpackMode: "lazy" */
|
|
113
|
+
'./nv-fielddaterange.entry.js').then(processMod, consoleError);
|
|
105
114
|
case 'nv-fielddropdown':
|
|
106
115
|
return import(
|
|
107
116
|
/* webpackMode: "lazy" */
|
|
@@ -182,6 +191,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
182
191
|
return import(
|
|
183
192
|
/* webpackMode: "lazy" */
|
|
184
193
|
'./nv-tooltip.entry.js').then(processMod, consoleError);
|
|
194
|
+
case 'nv-calendar':
|
|
195
|
+
return import(
|
|
196
|
+
/* webpackMode: "lazy" */
|
|
197
|
+
'./nv-calendar.entry.js').then(processMod, consoleError);
|
|
185
198
|
case 'nv-fieldcheckbox':
|
|
186
199
|
return import(
|
|
187
200
|
/* webpackMode: "lazy" */
|
|
@@ -190,18 +203,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
190
203
|
return import(
|
|
191
204
|
/* webpackMode: "lazy" */
|
|
192
205
|
'./nv-button.entry.js').then(processMod, consoleError);
|
|
193
|
-
case 'nv-iconbutton':
|
|
194
|
-
return import(
|
|
195
|
-
/* webpackMode: "lazy" */
|
|
196
|
-
'./nv-iconbutton.entry.js').then(processMod, consoleError);
|
|
197
206
|
case 'nv-popover':
|
|
198
207
|
return import(
|
|
199
208
|
/* webpackMode: "lazy" */
|
|
200
209
|
'./nv-popover.entry.js').then(processMod, consoleError);
|
|
201
|
-
case 'nv-
|
|
210
|
+
case 'nv-iconbutton_2':
|
|
202
211
|
return import(
|
|
203
212
|
/* webpackMode: "lazy" */
|
|
204
|
-
'./nv-
|
|
213
|
+
'./nv-iconbutton_2.entry.js').then(processMod, consoleError);
|
|
205
214
|
case 'nv-icon':
|
|
206
215
|
return import(
|
|
207
216
|
/* webpackMode: "lazy" */
|
|
@@ -214,12 +223,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
214
223
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
215
224
|
/* webpackMode: "lazy" */
|
|
216
225
|
`./${bundleId}.entry.js${""}`
|
|
217
|
-
).then(
|
|
218
|
-
{
|
|
219
|
-
|
|
226
|
+
).then(
|
|
227
|
+
(importedModule) => {
|
|
228
|
+
{
|
|
229
|
+
cmpModules.set(bundleId, importedModule);
|
|
230
|
+
}
|
|
231
|
+
return importedModule[exportName];
|
|
232
|
+
},
|
|
233
|
+
(e) => {
|
|
234
|
+
consoleError(e, hostRef.$hostElement$);
|
|
220
235
|
}
|
|
221
|
-
|
|
222
|
-
}, consoleError);
|
|
236
|
+
);
|
|
223
237
|
};
|
|
224
238
|
|
|
225
239
|
// src/client/client-style.ts
|
|
@@ -243,7 +257,6 @@ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
|
243
257
|
"formStateRestoreCallback"
|
|
244
258
|
];
|
|
245
259
|
var win = typeof window !== "undefined" ? window : {};
|
|
246
|
-
var doc = win.document || { head: {} };
|
|
247
260
|
var H = win.HTMLElement || class {
|
|
248
261
|
};
|
|
249
262
|
var plt = {
|
|
@@ -257,9 +270,10 @@ var plt = {
|
|
|
257
270
|
};
|
|
258
271
|
var supportsShadow = BUILD.shadowDom;
|
|
259
272
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
273
|
+
var _a;
|
|
260
274
|
let supportsListenerOptions2 = false;
|
|
261
275
|
try {
|
|
262
|
-
|
|
276
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
263
277
|
"e",
|
|
264
278
|
null,
|
|
265
279
|
Object.defineProperty({}, "passive", {
|
|
@@ -322,9 +336,9 @@ var isComplexType = (o) => {
|
|
|
322
336
|
};
|
|
323
337
|
|
|
324
338
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
325
|
-
function queryNonceMetaTagContent(
|
|
339
|
+
function queryNonceMetaTagContent(doc) {
|
|
326
340
|
var _a, _b, _c;
|
|
327
|
-
return (_c = (_b = (_a =
|
|
341
|
+
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;
|
|
328
342
|
}
|
|
329
343
|
|
|
330
344
|
// src/utils/result.ts
|
|
@@ -376,12 +390,11 @@ var unwrapErr = (result) => {
|
|
|
376
390
|
}
|
|
377
391
|
};
|
|
378
392
|
var updateFallbackSlotVisibility = (elm) => {
|
|
379
|
-
const childNodes = elm
|
|
393
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
380
394
|
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
381
395
|
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
382
|
-
var _a;
|
|
383
396
|
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
384
|
-
if ((
|
|
397
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
385
398
|
slotNode.hidden = true;
|
|
386
399
|
} else {
|
|
387
400
|
slotNode.hidden = false;
|
|
@@ -389,31 +402,44 @@ var updateFallbackSlotVisibility = (elm) => {
|
|
|
389
402
|
}
|
|
390
403
|
});
|
|
391
404
|
}
|
|
392
|
-
|
|
393
|
-
|
|
405
|
+
let i2 = 0;
|
|
406
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
407
|
+
const childNode = childNodes[i2];
|
|
408
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
394
409
|
updateFallbackSlotVisibility(childNode);
|
|
395
410
|
}
|
|
396
411
|
}
|
|
397
412
|
};
|
|
398
|
-
var
|
|
413
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
414
|
+
const result = [];
|
|
415
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
416
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
417
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
418
|
+
result.push(slottedNode);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
return result;
|
|
422
|
+
};
|
|
423
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
399
424
|
let i2 = 0;
|
|
400
425
|
let slottedNodes = [];
|
|
401
426
|
let childNode;
|
|
402
427
|
for (; i2 < childNodes.length; i2++) {
|
|
403
428
|
childNode = childNodes[i2];
|
|
404
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (
|
|
429
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
405
430
|
slottedNodes.push(childNode);
|
|
406
431
|
if (typeof slotName !== "undefined") return slottedNodes;
|
|
407
432
|
}
|
|
408
433
|
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
409
434
|
}
|
|
410
435
|
return slottedNodes;
|
|
411
|
-
}
|
|
412
|
-
var
|
|
436
|
+
}
|
|
437
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
413
438
|
const childNodes = [];
|
|
414
|
-
if (includeSlot &&
|
|
415
|
-
|
|
416
|
-
|
|
439
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
440
|
+
let node = slot;
|
|
441
|
+
while (node = node.nextSibling) {
|
|
442
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
417
443
|
}
|
|
418
444
|
return childNodes;
|
|
419
445
|
};
|
|
@@ -433,37 +459,202 @@ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
|
433
459
|
return slotName === "";
|
|
434
460
|
};
|
|
435
461
|
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
436
|
-
let slottedNodeLocation;
|
|
437
462
|
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
438
|
-
|
|
439
|
-
} else {
|
|
440
|
-
slottedNodeLocation = document.createTextNode("");
|
|
441
|
-
slottedNodeLocation["s-nr"] = newChild;
|
|
463
|
+
return;
|
|
442
464
|
}
|
|
465
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
466
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
443
467
|
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
444
468
|
const parent = slotNode["s-cr"].parentNode;
|
|
445
|
-
const appendMethod = prepend ? parent
|
|
469
|
+
const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
|
|
446
470
|
if (typeof position !== "undefined") {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
460
|
-
}
|
|
471
|
+
slottedNodeLocation["s-oo"] = position;
|
|
472
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
473
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
474
|
+
childNodes.forEach((n) => {
|
|
475
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
476
|
+
});
|
|
477
|
+
slotRelocateNodes.sort((a, b) => {
|
|
478
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
479
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
480
|
+
return 0;
|
|
481
|
+
});
|
|
482
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
461
483
|
} else {
|
|
462
484
|
appendMethod.call(parent, slottedNodeLocation);
|
|
463
485
|
}
|
|
464
486
|
newChild["s-ol"] = slottedNodeLocation;
|
|
465
487
|
newChild["s-sh"] = slotNode["s-hn"];
|
|
466
488
|
};
|
|
489
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
490
|
+
function patchSlotNode(node) {
|
|
491
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
492
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
493
|
+
const toReturn = [];
|
|
494
|
+
const slotName = this["s-sn"];
|
|
495
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
496
|
+
console.error(`
|
|
497
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
498
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
499
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
500
|
+
`);
|
|
501
|
+
}
|
|
502
|
+
const parent = this["s-cr"].parentElement;
|
|
503
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
504
|
+
slottedNodes.forEach((n) => {
|
|
505
|
+
if (slotName === getSlotName(n)) {
|
|
506
|
+
toReturn.push(n);
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
if (elementsOnly) {
|
|
510
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
511
|
+
}
|
|
512
|
+
return toReturn;
|
|
513
|
+
}).bind(node);
|
|
514
|
+
node.assignedElements = assignedFactory(true);
|
|
515
|
+
node.assignedNodes = assignedFactory(false);
|
|
516
|
+
}
|
|
517
|
+
function dispatchSlotChangeEvent(elm) {
|
|
518
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
519
|
+
}
|
|
520
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
521
|
+
var _a;
|
|
522
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
523
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
524
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
525
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
526
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
527
|
+
return { slotNode, slotName };
|
|
528
|
+
}
|
|
529
|
+
var patchSlottedNode = (node) => {
|
|
530
|
+
if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
|
|
531
|
+
patchNextSibling(node);
|
|
532
|
+
patchPreviousSibling(node);
|
|
533
|
+
patchParentNode(node);
|
|
534
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
535
|
+
patchNextElementSibling(node);
|
|
536
|
+
patchPreviousElementSibling(node);
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
var patchNextSibling = (node) => {
|
|
540
|
+
if (!node || node.__nextSibling) return;
|
|
541
|
+
patchHostOriginalAccessor("nextSibling", node);
|
|
542
|
+
Object.defineProperty(node, "nextSibling", {
|
|
543
|
+
get: function() {
|
|
544
|
+
var _a;
|
|
545
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
546
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
547
|
+
if (parentNodes && index > -1) {
|
|
548
|
+
return parentNodes[index + 1];
|
|
549
|
+
}
|
|
550
|
+
return this.__nextSibling;
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
};
|
|
554
|
+
var patchNextElementSibling = (element) => {
|
|
555
|
+
if (!element || element.__nextElementSibling) return;
|
|
556
|
+
patchHostOriginalAccessor("nextElementSibling", element);
|
|
557
|
+
Object.defineProperty(element, "nextElementSibling", {
|
|
558
|
+
get: function() {
|
|
559
|
+
var _a;
|
|
560
|
+
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
561
|
+
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
562
|
+
if (parentEles && index > -1) {
|
|
563
|
+
return parentEles[index + 1];
|
|
564
|
+
}
|
|
565
|
+
return this.__nextElementSibling;
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
var patchPreviousSibling = (node) => {
|
|
570
|
+
if (!node || node.__previousSibling) return;
|
|
571
|
+
patchHostOriginalAccessor("previousSibling", node);
|
|
572
|
+
Object.defineProperty(node, "previousSibling", {
|
|
573
|
+
get: function() {
|
|
574
|
+
var _a;
|
|
575
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
576
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
577
|
+
if (parentNodes && index > -1) {
|
|
578
|
+
return parentNodes[index - 1];
|
|
579
|
+
}
|
|
580
|
+
return this.__previousSibling;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
};
|
|
584
|
+
var patchPreviousElementSibling = (element) => {
|
|
585
|
+
if (!element || element.__previousElementSibling) return;
|
|
586
|
+
patchHostOriginalAccessor("previousElementSibling", element);
|
|
587
|
+
Object.defineProperty(element, "previousElementSibling", {
|
|
588
|
+
get: function() {
|
|
589
|
+
var _a;
|
|
590
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
591
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
592
|
+
if (parentNodes && index > -1) {
|
|
593
|
+
return parentNodes[index - 1];
|
|
594
|
+
}
|
|
595
|
+
return this.__previousElementSibling;
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
};
|
|
599
|
+
var patchParentNode = (node) => {
|
|
600
|
+
if (!node || node.__parentNode) return;
|
|
601
|
+
patchHostOriginalAccessor("parentNode", node);
|
|
602
|
+
Object.defineProperty(node, "parentNode", {
|
|
603
|
+
get: function() {
|
|
604
|
+
var _a;
|
|
605
|
+
return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
|
|
606
|
+
},
|
|
607
|
+
set: function(value) {
|
|
608
|
+
this.__parentNode = value;
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
};
|
|
612
|
+
var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
|
|
613
|
+
var validNodesPatches = [
|
|
614
|
+
"childNodes",
|
|
615
|
+
"firstChild",
|
|
616
|
+
"lastChild",
|
|
617
|
+
"nextSibling",
|
|
618
|
+
"previousSibling",
|
|
619
|
+
"textContent",
|
|
620
|
+
"parentNode"
|
|
621
|
+
];
|
|
622
|
+
function patchHostOriginalAccessor(accessorName, node) {
|
|
623
|
+
let accessor;
|
|
624
|
+
if (validElementPatches.includes(accessorName)) {
|
|
625
|
+
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
626
|
+
} else if (validNodesPatches.includes(accessorName)) {
|
|
627
|
+
accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
|
|
628
|
+
}
|
|
629
|
+
if (!accessor) {
|
|
630
|
+
accessor = Object.getOwnPropertyDescriptor(node, accessorName);
|
|
631
|
+
}
|
|
632
|
+
if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
|
|
633
|
+
}
|
|
634
|
+
function internalCall(node, method) {
|
|
635
|
+
if ("__" + method in node) {
|
|
636
|
+
const toReturn = node["__" + method];
|
|
637
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
638
|
+
return toReturn.bind(node);
|
|
639
|
+
} else {
|
|
640
|
+
if (typeof node[method] !== "function") return node[method];
|
|
641
|
+
return node[method].bind(node);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
var createTime = (fnName, tagName = "") => {
|
|
645
|
+
{
|
|
646
|
+
return () => {
|
|
647
|
+
return;
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
var uniqueTime = (key, measureText) => {
|
|
652
|
+
{
|
|
653
|
+
return () => {
|
|
654
|
+
return;
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
};
|
|
467
658
|
var h = (nodeName, vnodeData, ...children) => {
|
|
468
659
|
let child = null;
|
|
469
660
|
let key = null;
|
|
@@ -575,1172 +766,1133 @@ var convertToPrivate = (node) => {
|
|
|
575
766
|
vnode.$name$ = node.vname;
|
|
576
767
|
return vnode;
|
|
577
768
|
};
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
769
|
+
|
|
770
|
+
// src/runtime/client-hydrate.ts
|
|
771
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
772
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
773
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
774
|
+
const childRenderNodes = [];
|
|
775
|
+
const slotNodes = [];
|
|
776
|
+
const slottedNodes = [];
|
|
777
|
+
const shadowRootNodes = null;
|
|
778
|
+
const vnode = newVNode(tagName, null);
|
|
779
|
+
vnode.$elm$ = hostElm;
|
|
780
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
781
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
782
|
+
}
|
|
783
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
784
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
785
|
+
hostRef.$vnode$ = clientHydrate(
|
|
786
|
+
vnode,
|
|
787
|
+
childRenderNodes,
|
|
788
|
+
slotNodes,
|
|
789
|
+
shadowRootNodes,
|
|
790
|
+
hostElm,
|
|
791
|
+
hostElm,
|
|
792
|
+
hostId,
|
|
793
|
+
slottedNodes
|
|
794
|
+
);
|
|
795
|
+
let crIndex = 0;
|
|
796
|
+
const crLength = childRenderNodes.length;
|
|
797
|
+
let childRenderNode;
|
|
798
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
799
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
800
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
801
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
802
|
+
const node = childRenderNode.$elm$;
|
|
803
|
+
if (!shadowRoot) {
|
|
804
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
805
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
806
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
597
807
|
}
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}
|
|
808
|
+
}
|
|
809
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
810
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
811
|
+
if (childRenderNode.$children$) {
|
|
812
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
813
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
814
|
+
childRenderNode.$children$.forEach((c) => {
|
|
815
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
816
|
+
});
|
|
608
817
|
}
|
|
818
|
+
} else {
|
|
819
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
609
820
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
} else {
|
|
615
|
-
elm.style[prop] = newValue[prop];
|
|
616
|
-
}
|
|
617
|
-
}
|
|
821
|
+
}
|
|
822
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
823
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
824
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
618
825
|
}
|
|
619
|
-
|
|
620
|
-
if (
|
|
621
|
-
|
|
826
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
827
|
+
if (!shadowRoot) {
|
|
828
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
622
829
|
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
830
|
+
}
|
|
831
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
832
|
+
}
|
|
833
|
+
const hosts = [];
|
|
834
|
+
const snLen = slottedNodes.length;
|
|
835
|
+
let snIndex = 0;
|
|
836
|
+
let slotGroup;
|
|
837
|
+
let snGroupIdx;
|
|
838
|
+
let snGroupLen;
|
|
839
|
+
let slottedItem;
|
|
840
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
841
|
+
slotGroup = slottedNodes[snIndex];
|
|
842
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
843
|
+
snGroupLen = slotGroup.length;
|
|
844
|
+
snGroupIdx = 0;
|
|
845
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
846
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
847
|
+
if (!hosts[slottedItem.hostId]) {
|
|
848
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
630
849
|
}
|
|
631
|
-
if (
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
850
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
851
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
852
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
853
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
854
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
855
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
856
|
+
} else {
|
|
857
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
636
858
|
}
|
|
637
|
-
|
|
638
|
-
|
|
859
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
860
|
+
{
|
|
861
|
+
patchSlottedNode(slottedItem.node);
|
|
639
862
|
}
|
|
640
863
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
644
|
-
try {
|
|
645
|
-
if (!elm.tagName.includes("-")) {
|
|
646
|
-
const n = newValue == null ? "" : newValue;
|
|
647
|
-
if (memberName === "list") {
|
|
648
|
-
isProp = false;
|
|
649
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
|
650
|
-
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
651
|
-
elm[memberName] = n;
|
|
652
|
-
} else {
|
|
653
|
-
elm.setAttribute(memberName, n);
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
} else {
|
|
657
|
-
elm[memberName] = newValue;
|
|
658
|
-
}
|
|
659
|
-
} catch (e) {
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
if (newValue == null || newValue === false) {
|
|
663
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
664
|
-
{
|
|
665
|
-
elm.removeAttribute(memberName);
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
669
|
-
newValue = newValue === true ? "" : newValue;
|
|
670
|
-
{
|
|
671
|
-
elm.setAttribute(memberName, newValue);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
};
|
|
677
|
-
var parseClassListRegex = /\s/;
|
|
678
|
-
var parseClassList = (value) => {
|
|
679
|
-
if (typeof value === "object" && "baseVal" in value) {
|
|
680
|
-
value = value.baseVal;
|
|
681
|
-
}
|
|
682
|
-
if (!value) {
|
|
683
|
-
return [];
|
|
684
|
-
}
|
|
685
|
-
return value.split(parseClassListRegex);
|
|
686
|
-
};
|
|
687
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
688
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
689
|
-
|
|
690
|
-
// src/runtime/vdom/update-element.ts
|
|
691
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
692
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
693
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
694
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
695
|
-
{
|
|
696
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
697
|
-
if (!(memberName in newVnodeAttrs)) {
|
|
698
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
703
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
704
|
-
}
|
|
705
|
-
};
|
|
706
|
-
function sortedAttrNames(attrNames) {
|
|
707
|
-
return attrNames.includes("ref") ? (
|
|
708
|
-
// we need to sort these to ensure that `'ref'` is the last attr
|
|
709
|
-
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
710
|
-
) : (
|
|
711
|
-
// no need to sort, return the original array
|
|
712
|
-
attrNames
|
|
713
|
-
);
|
|
714
|
-
}
|
|
715
|
-
var contentRef;
|
|
716
|
-
var hostTagName;
|
|
717
|
-
var useNativeShadowDom = false;
|
|
718
|
-
var checkSlotFallbackVisibility = false;
|
|
719
|
-
var checkSlotRelocate = false;
|
|
720
|
-
var isSvgMode = false;
|
|
721
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
722
|
-
var _a;
|
|
723
|
-
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
724
|
-
let i2 = 0;
|
|
725
|
-
let elm;
|
|
726
|
-
let childNode;
|
|
727
|
-
let oldVNode;
|
|
728
|
-
if (!useNativeShadowDom) {
|
|
729
|
-
checkSlotRelocate = true;
|
|
730
|
-
if (newVNode2.$tag$ === "slot") {
|
|
731
|
-
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
732
|
-
// slot element has fallback content
|
|
733
|
-
// still create an element that "mocks" the slot element
|
|
734
|
-
2 /* isSlotFallback */
|
|
735
|
-
) : (
|
|
736
|
-
// slot element does not have fallback content
|
|
737
|
-
// create an html comment we'll use to always reference
|
|
738
|
-
// where actual slot content should sit next to
|
|
739
|
-
1 /* isSlotReference */
|
|
740
|
-
);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
if (newVNode2.$text$ !== null) {
|
|
744
|
-
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
745
|
-
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
746
|
-
elm = newVNode2.$elm$ = doc.createTextNode("");
|
|
747
|
-
} else {
|
|
748
|
-
if (!isSvgMode) {
|
|
749
|
-
isSvgMode = newVNode2.$tag$ === "svg";
|
|
750
|
-
}
|
|
751
|
-
elm = newVNode2.$elm$ = doc.createElementNS(
|
|
752
|
-
isSvgMode ? SVG_NS : HTML_NS,
|
|
753
|
-
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
754
|
-
) ;
|
|
755
|
-
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
756
|
-
isSvgMode = false;
|
|
757
|
-
}
|
|
758
|
-
{
|
|
759
|
-
updateElement(null, newVNode2, isSvgMode);
|
|
760
|
-
}
|
|
761
|
-
if (newVNode2.$children$) {
|
|
762
|
-
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
763
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
764
|
-
if (childNode) {
|
|
765
|
-
elm.appendChild(childNode);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
{
|
|
770
|
-
if (newVNode2.$tag$ === "svg") {
|
|
771
|
-
isSvgMode = false;
|
|
772
|
-
} else if (elm.tagName === "foreignObject") {
|
|
773
|
-
isSvgMode = true;
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
elm["s-hn"] = hostTagName;
|
|
778
|
-
{
|
|
779
|
-
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
780
|
-
elm["s-sr"] = true;
|
|
781
|
-
elm["s-cr"] = contentRef;
|
|
782
|
-
elm["s-sn"] = newVNode2.$name$ || "";
|
|
783
|
-
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
784
|
-
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
785
|
-
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
786
|
-
{
|
|
787
|
-
relocateToHostRoot(oldParentVNode.$elm$);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
return elm;
|
|
793
|
-
};
|
|
794
|
-
var relocateToHostRoot = (parentElm) => {
|
|
795
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
796
|
-
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
797
|
-
if (host != null) {
|
|
798
|
-
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
799
|
-
(ref) => ref["s-cr"]
|
|
800
|
-
);
|
|
801
|
-
const childNodeArray = Array.from(
|
|
802
|
-
parentElm.__childNodes || parentElm.childNodes
|
|
803
|
-
);
|
|
804
|
-
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
805
|
-
if (childNode["s-sh"] != null) {
|
|
806
|
-
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
807
|
-
childNode["s-sh"] = void 0;
|
|
808
|
-
checkSlotRelocate = true;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
813
|
-
};
|
|
814
|
-
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
815
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
816
|
-
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
817
|
-
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
818
|
-
let node = parentElm;
|
|
819
|
-
while (node = node.nextSibling) {
|
|
820
|
-
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
821
|
-
oldSlotChildNodes.push(node);
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
826
|
-
const childNode = oldSlotChildNodes[i2];
|
|
827
|
-
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
828
|
-
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
829
|
-
childNode["s-ol"].remove();
|
|
830
|
-
childNode["s-ol"] = void 0;
|
|
831
|
-
childNode["s-sh"] = void 0;
|
|
832
|
-
checkSlotRelocate = true;
|
|
833
|
-
}
|
|
834
|
-
if (recursive) {
|
|
835
|
-
putBackInOriginalLocation(childNode, recursive);
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
839
|
-
};
|
|
840
|
-
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
841
|
-
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
842
|
-
let childNode;
|
|
843
|
-
for (; startIdx <= endIdx; ++startIdx) {
|
|
844
|
-
if (vnodes[startIdx]) {
|
|
845
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
846
|
-
if (childNode) {
|
|
847
|
-
vnodes[startIdx].$elm$ = childNode;
|
|
848
|
-
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
864
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
865
|
+
hostEle.appendChild(slottedItem.node);
|
|
849
866
|
}
|
|
850
867
|
}
|
|
851
868
|
}
|
|
869
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
870
|
+
hostRef.$hostElement$ = hostElm;
|
|
871
|
+
endHydrate();
|
|
852
872
|
};
|
|
853
|
-
var
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
873
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
874
|
+
let childNodeType;
|
|
875
|
+
let childIdSplt;
|
|
876
|
+
let childVNode;
|
|
877
|
+
let i2;
|
|
878
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
879
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
880
|
+
if (childNodeType) {
|
|
881
|
+
childIdSplt = childNodeType.split(".");
|
|
882
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
883
|
+
childVNode = createSimpleVNode({
|
|
884
|
+
$flags$: 0,
|
|
885
|
+
$hostId$: childIdSplt[0],
|
|
886
|
+
$nodeId$: childIdSplt[1],
|
|
887
|
+
$depth$: childIdSplt[2],
|
|
888
|
+
$index$: childIdSplt[3],
|
|
889
|
+
$tag$: node.tagName.toLowerCase(),
|
|
890
|
+
$elm$: node,
|
|
891
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
892
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
893
|
+
$attrs$: { class: node.className || "" }
|
|
894
|
+
});
|
|
895
|
+
childRenderNodes.push(childVNode);
|
|
896
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
897
|
+
if (!parentVNode.$children$) {
|
|
898
|
+
parentVNode.$children$ = [];
|
|
867
899
|
}
|
|
868
|
-
elm
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
let newStartVnode = newCh[0];
|
|
883
|
-
let newEndVnode = newCh[newEndIdx];
|
|
884
|
-
let node;
|
|
885
|
-
let elmToMove;
|
|
886
|
-
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
887
|
-
if (oldStartVnode == null) {
|
|
888
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
889
|
-
} else if (oldEndVnode == null) {
|
|
890
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
891
|
-
} else if (newStartVnode == null) {
|
|
892
|
-
newStartVnode = newCh[++newStartIdx];
|
|
893
|
-
} else if (newEndVnode == null) {
|
|
894
|
-
newEndVnode = newCh[--newEndIdx];
|
|
895
|
-
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
896
|
-
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
897
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
898
|
-
newStartVnode = newCh[++newStartIdx];
|
|
899
|
-
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
900
|
-
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
901
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
902
|
-
newEndVnode = newCh[--newEndIdx];
|
|
903
|
-
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
904
|
-
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
905
|
-
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
906
|
-
}
|
|
907
|
-
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
908
|
-
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
909
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
910
|
-
newEndVnode = newCh[--newEndIdx];
|
|
911
|
-
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
912
|
-
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
913
|
-
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
914
|
-
}
|
|
915
|
-
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
916
|
-
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
917
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
918
|
-
newStartVnode = newCh[++newStartIdx];
|
|
919
|
-
} else {
|
|
920
|
-
idxInOld = -1;
|
|
921
|
-
{
|
|
922
|
-
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
923
|
-
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
924
|
-
idxInOld = i2;
|
|
925
|
-
break;
|
|
900
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
901
|
+
if (typeof slotName === "string") {
|
|
902
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
903
|
+
addSlot(
|
|
904
|
+
slotName,
|
|
905
|
+
childIdSplt[2],
|
|
906
|
+
childVNode,
|
|
907
|
+
node,
|
|
908
|
+
parentVNode,
|
|
909
|
+
childRenderNodes,
|
|
910
|
+
slotNodes,
|
|
911
|
+
shadowRootNodes,
|
|
912
|
+
slottedNodes
|
|
913
|
+
);
|
|
926
914
|
}
|
|
915
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
916
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
927
917
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
elmToMove = oldCh[idxInOld];
|
|
931
|
-
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
932
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
933
|
-
} else {
|
|
934
|
-
patch(elmToMove, newStartVnode, isInitialRender);
|
|
935
|
-
oldCh[idxInOld] = void 0;
|
|
936
|
-
node = elmToMove.$elm$;
|
|
937
|
-
}
|
|
938
|
-
newStartVnode = newCh[++newStartIdx];
|
|
939
|
-
} else {
|
|
940
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
941
|
-
newStartVnode = newCh[++newStartIdx];
|
|
942
|
-
}
|
|
943
|
-
if (node) {
|
|
944
|
-
{
|
|
945
|
-
insertBefore(
|
|
946
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
947
|
-
node,
|
|
948
|
-
referenceNode(oldStartVnode.$elm$)
|
|
949
|
-
);
|
|
918
|
+
if (childVNode.$index$ !== void 0) {
|
|
919
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
950
920
|
}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
if (oldStartIdx > oldEndIdx) {
|
|
955
|
-
addVnodes(
|
|
956
|
-
parentElm,
|
|
957
|
-
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
958
|
-
newVNode2,
|
|
959
|
-
newCh,
|
|
960
|
-
newStartIdx,
|
|
961
|
-
newEndIdx
|
|
962
|
-
);
|
|
963
|
-
} else if (newStartIdx > newEndIdx) {
|
|
964
|
-
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
965
|
-
}
|
|
966
|
-
};
|
|
967
|
-
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
968
|
-
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
969
|
-
if (leftVNode.$tag$ === "slot") {
|
|
970
|
-
return leftVNode.$name$ === rightVNode.$name$;
|
|
971
|
-
}
|
|
972
|
-
if (!isInitialRender) {
|
|
973
|
-
return leftVNode.$key$ === rightVNode.$key$;
|
|
974
|
-
}
|
|
975
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
976
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
977
|
-
}
|
|
978
|
-
return true;
|
|
979
|
-
}
|
|
980
|
-
return false;
|
|
981
|
-
};
|
|
982
|
-
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
983
|
-
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
984
|
-
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
985
|
-
const oldChildren = oldVNode.$children$;
|
|
986
|
-
const newChildren = newVNode2.$children$;
|
|
987
|
-
const tag = newVNode2.$tag$;
|
|
988
|
-
const text = newVNode2.$text$;
|
|
989
|
-
let defaultHolder;
|
|
990
|
-
if (text === null) {
|
|
991
|
-
{
|
|
992
|
-
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
993
|
-
}
|
|
994
|
-
{
|
|
995
|
-
if (tag === "slot" && !useNativeShadowDom) {
|
|
996
|
-
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
997
|
-
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
998
|
-
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
921
|
+
parentVNode = childVNode;
|
|
922
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
923
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
999
924
|
}
|
|
1000
|
-
} else {
|
|
1001
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1002
925
|
}
|
|
1003
926
|
}
|
|
1004
|
-
if (
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
927
|
+
if (node.shadowRoot) {
|
|
928
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
929
|
+
clientHydrate(
|
|
930
|
+
parentVNode,
|
|
931
|
+
childRenderNodes,
|
|
932
|
+
slotNodes,
|
|
933
|
+
shadowRootNodes,
|
|
934
|
+
hostElm,
|
|
935
|
+
node.shadowRoot.childNodes[i2],
|
|
936
|
+
hostId,
|
|
937
|
+
slottedNodes
|
|
938
|
+
);
|
|
1009
939
|
}
|
|
1010
|
-
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1011
|
-
} else if (
|
|
1012
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
1013
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1014
|
-
) {
|
|
1015
|
-
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1016
940
|
}
|
|
1017
|
-
|
|
1018
|
-
|
|
941
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
942
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
943
|
+
clientHydrate(
|
|
944
|
+
parentVNode,
|
|
945
|
+
childRenderNodes,
|
|
946
|
+
slotNodes,
|
|
947
|
+
shadowRootNodes,
|
|
948
|
+
hostElm,
|
|
949
|
+
nonShadowNodes[i2],
|
|
950
|
+
hostId,
|
|
951
|
+
slottedNodes
|
|
952
|
+
);
|
|
1019
953
|
}
|
|
1020
|
-
} else if (
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
} else {
|
|
1047
|
-
node["s-sh"] = childNode["s-hn"];
|
|
1048
|
-
relocateNodes.push({
|
|
1049
|
-
$slotRefNode$: childNode,
|
|
1050
|
-
$nodeToRelocate$: node
|
|
1051
|
-
});
|
|
1052
|
-
}
|
|
1053
|
-
if (node["s-sr"]) {
|
|
1054
|
-
relocateNodes.map((relocateNode) => {
|
|
1055
|
-
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
1056
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1057
|
-
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1058
|
-
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
});
|
|
954
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
955
|
+
childIdSplt = node.nodeValue.split(".");
|
|
956
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
957
|
+
childNodeType = childIdSplt[0];
|
|
958
|
+
childVNode = createSimpleVNode({
|
|
959
|
+
$hostId$: childIdSplt[1],
|
|
960
|
+
$nodeId$: childIdSplt[2],
|
|
961
|
+
$depth$: childIdSplt[3],
|
|
962
|
+
$index$: childIdSplt[4] || "0",
|
|
963
|
+
$elm$: node,
|
|
964
|
+
$attrs$: null,
|
|
965
|
+
$children$: null,
|
|
966
|
+
$key$: null,
|
|
967
|
+
$name$: null,
|
|
968
|
+
$tag$: null,
|
|
969
|
+
$text$: null
|
|
970
|
+
});
|
|
971
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
972
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
973
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
974
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
975
|
+
childRenderNodes.push(childVNode);
|
|
976
|
+
node.remove();
|
|
977
|
+
if (hostId === childVNode.$hostId$) {
|
|
978
|
+
if (!parentVNode.$children$) {
|
|
979
|
+
parentVNode.$children$ = [];
|
|
1062
980
|
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
981
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
982
|
+
}
|
|
983
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
984
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
988
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
989
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
990
|
+
childRenderNodes.push(childVNode);
|
|
991
|
+
node.remove();
|
|
992
|
+
}
|
|
993
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
994
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
995
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
996
|
+
addSlot(
|
|
997
|
+
slotName,
|
|
998
|
+
childIdSplt[2],
|
|
999
|
+
childVNode,
|
|
1000
|
+
node,
|
|
1001
|
+
parentVNode,
|
|
1002
|
+
childRenderNodes,
|
|
1003
|
+
slotNodes,
|
|
1004
|
+
shadowRootNodes,
|
|
1005
|
+
slottedNodes
|
|
1006
|
+
);
|
|
1007
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1008
|
+
{
|
|
1009
|
+
hostElm["s-cr"] = node;
|
|
1010
|
+
node["s-cn"] = true;
|
|
1067
1011
|
}
|
|
1068
1012
|
}
|
|
1069
1013
|
}
|
|
1070
1014
|
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1015
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1016
|
+
const vnode = newVNode(null, node.textContent);
|
|
1017
|
+
vnode.$elm$ = node;
|
|
1018
|
+
vnode.$index$ = "0";
|
|
1019
|
+
parentVNode.$children$ = [vnode];
|
|
1020
|
+
} else {
|
|
1021
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1022
|
+
node.remove();
|
|
1073
1023
|
}
|
|
1074
1024
|
}
|
|
1025
|
+
return parentVNode;
|
|
1075
1026
|
};
|
|
1076
|
-
var
|
|
1027
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1028
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1029
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1030
|
+
if (componentId) {
|
|
1031
|
+
orgLocNodes.set(componentId, node);
|
|
1032
|
+
}
|
|
1033
|
+
let i2 = 0;
|
|
1034
|
+
if (node.shadowRoot) {
|
|
1035
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1036
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1040
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1041
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1042
|
+
}
|
|
1043
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1044
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
1045
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1046
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1047
|
+
node.nodeValue = "";
|
|
1048
|
+
node["s-en"] = childIdSplt[3];
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
var createSimpleVNode = (vnode) => {
|
|
1053
|
+
const defaultVNode = {
|
|
1054
|
+
$flags$: 0,
|
|
1055
|
+
$hostId$: null,
|
|
1056
|
+
$nodeId$: null,
|
|
1057
|
+
$depth$: null,
|
|
1058
|
+
$index$: "0",
|
|
1059
|
+
$elm$: null,
|
|
1060
|
+
$attrs$: null,
|
|
1061
|
+
$children$: null,
|
|
1062
|
+
$key$: null,
|
|
1063
|
+
$name$: null,
|
|
1064
|
+
$tag$: null,
|
|
1065
|
+
$text$: null
|
|
1066
|
+
};
|
|
1067
|
+
return { ...defaultVNode, ...vnode };
|
|
1068
|
+
};
|
|
1069
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1070
|
+
node["s-sr"] = true;
|
|
1071
|
+
childVNode.$name$ = slotName || null;
|
|
1072
|
+
childVNode.$tag$ = "slot";
|
|
1073
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1077
1074
|
{
|
|
1078
|
-
|
|
1079
|
-
|
|
1075
|
+
const slot = childVNode.$elm$;
|
|
1076
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1077
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1078
|
+
patchSlotNode(node);
|
|
1079
|
+
if (shouldMove) {
|
|
1080
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1081
|
+
}
|
|
1082
|
+
childRenderNodes.push(childVNode);
|
|
1083
|
+
}
|
|
1084
|
+
slotNodes.push(childVNode);
|
|
1085
|
+
if (!parentVNode.$children$) {
|
|
1086
|
+
parentVNode.$children$ = [];
|
|
1087
|
+
}
|
|
1088
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1089
|
+
}
|
|
1090
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1091
|
+
let slottedNode = slotNode.nextSibling;
|
|
1092
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1093
|
+
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 */))) {
|
|
1094
|
+
slottedNode["s-sn"] = slotName;
|
|
1095
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1096
|
+
slottedNode = slottedNode.nextSibling;
|
|
1080
1097
|
}
|
|
1081
1098
|
};
|
|
1082
|
-
var
|
|
1083
|
-
|
|
1084
|
-
|
|
1099
|
+
var findCorrespondingNode = (node, type) => {
|
|
1100
|
+
let sibling = node;
|
|
1101
|
+
do {
|
|
1102
|
+
sibling = sibling.nextSibling;
|
|
1103
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1104
|
+
return sibling;
|
|
1085
1105
|
};
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1106
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
1107
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1108
|
+
if (propType & 4 /* Boolean */) {
|
|
1109
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1110
|
+
}
|
|
1111
|
+
if (propType & 2 /* Number */) {
|
|
1112
|
+
return parseFloat(propValue);
|
|
1113
|
+
}
|
|
1114
|
+
if (propType & 1 /* String */) {
|
|
1115
|
+
return String(propValue);
|
|
1116
|
+
}
|
|
1117
|
+
return propValue;
|
|
1098
1118
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1119
|
+
return propValue;
|
|
1120
|
+
};
|
|
1121
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
1122
|
+
|
|
1123
|
+
// src/runtime/event-emitter.ts
|
|
1124
|
+
var createEvent = (ref, name, flags) => {
|
|
1125
|
+
const elm = getElement(ref);
|
|
1126
|
+
return {
|
|
1127
|
+
emit: (detail) => {
|
|
1128
|
+
return emitEvent(elm, name, {
|
|
1129
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1130
|
+
composed: !!(flags & 2 /* Composed */),
|
|
1131
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1132
|
+
detail
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
};
|
|
1137
|
+
var emitEvent = (elm, name, opts) => {
|
|
1138
|
+
const ev = plt.ce(name, opts);
|
|
1139
|
+
elm.dispatchEvent(ev);
|
|
1140
|
+
return ev;
|
|
1141
|
+
};
|
|
1142
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1143
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1144
|
+
let style = styles.get(scopeId2);
|
|
1145
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
1146
|
+
style = style || new CSSStyleSheet();
|
|
1147
|
+
if (typeof style === "string") {
|
|
1148
|
+
style = cssText;
|
|
1149
|
+
} else {
|
|
1150
|
+
style.replaceSync(cssText);
|
|
1104
1151
|
}
|
|
1152
|
+
} else {
|
|
1153
|
+
style = cssText;
|
|
1105
1154
|
}
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1155
|
+
styles.set(scopeId2, style);
|
|
1156
|
+
};
|
|
1157
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1158
|
+
var _a;
|
|
1159
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1160
|
+
const style = styles.get(scopeId2);
|
|
1161
|
+
if (!win.document) {
|
|
1162
|
+
return scopeId2;
|
|
1114
1163
|
}
|
|
1115
|
-
|
|
1116
|
-
{
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
const orgLocationNode = doc.createTextNode("");
|
|
1124
|
-
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1125
|
-
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1126
|
-
}
|
|
1164
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1165
|
+
if (style) {
|
|
1166
|
+
if (typeof style === "string") {
|
|
1167
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1168
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1169
|
+
let styleElm;
|
|
1170
|
+
if (!appliedStyles) {
|
|
1171
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1127
1172
|
}
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1138
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1139
|
-
refNode = refNode.nextSibling;
|
|
1140
|
-
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1141
|
-
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1142
|
-
}
|
|
1143
|
-
if (!refNode || !refNode["s-nr"]) {
|
|
1144
|
-
insertBeforeNode = refNode;
|
|
1145
|
-
break;
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
orgLocationNode = orgLocationNode.previousSibling;
|
|
1149
|
-
}
|
|
1173
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1174
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1175
|
+
styleElm.innerHTML = style;
|
|
1176
|
+
} else {
|
|
1177
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
1178
|
+
styleElm.innerHTML = style;
|
|
1179
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1180
|
+
if (nonce != null) {
|
|
1181
|
+
styleElm.setAttribute("nonce", nonce);
|
|
1150
1182
|
}
|
|
1151
|
-
if (!
|
|
1152
|
-
if (
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1183
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1184
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1185
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1186
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1187
|
+
styleContainerNode.insertBefore(
|
|
1188
|
+
styleElm,
|
|
1189
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1190
|
+
);
|
|
1191
|
+
} else if ("host" in styleContainerNode) {
|
|
1192
|
+
if (supportsConstructableStylesheets) {
|
|
1193
|
+
const stylesheet = new CSSStyleSheet();
|
|
1194
|
+
stylesheet.replaceSync(style);
|
|
1195
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1196
|
+
} else {
|
|
1197
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1198
|
+
if (existingStyleContainer) {
|
|
1199
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1200
|
+
} else {
|
|
1201
|
+
styleContainerNode.prepend(styleElm);
|
|
1202
|
+
}
|
|
1156
1203
|
}
|
|
1204
|
+
} else {
|
|
1205
|
+
styleContainerNode.append(styleElm);
|
|
1157
1206
|
}
|
|
1158
1207
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1162
|
-
if (isInitialLoad) {
|
|
1163
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1164
|
-
}
|
|
1165
|
-
nodeToRelocate.hidden = true;
|
|
1208
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1209
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1166
1210
|
}
|
|
1167
1211
|
}
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1174
|
-
relocateNodes.length = 0;
|
|
1175
|
-
}
|
|
1176
|
-
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1177
|
-
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1178
|
-
for (const childNode of children) {
|
|
1179
|
-
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1180
|
-
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1181
|
-
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1212
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1213
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1214
|
+
}
|
|
1215
|
+
if (appliedStyles) {
|
|
1216
|
+
appliedStyles.add(scopeId2);
|
|
1182
1217
|
}
|
|
1183
|
-
childNode.hidden = true;
|
|
1184
1218
|
}
|
|
1219
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1220
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1185
1221
|
}
|
|
1186
1222
|
}
|
|
1187
|
-
|
|
1223
|
+
return scopeId2;
|
|
1188
1224
|
};
|
|
1189
|
-
var
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1225
|
+
var attachStyles = (hostRef) => {
|
|
1226
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1227
|
+
const elm = hostRef.$hostElement$;
|
|
1228
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1229
|
+
addStyle(
|
|
1230
|
+
elm.getRootNode(),
|
|
1231
|
+
cmpMeta);
|
|
1232
|
+
endAttachStyles();
|
|
1197
1233
|
};
|
|
1198
|
-
var
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1234
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1235
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1236
|
+
if (oldValue === newValue) {
|
|
1237
|
+
return;
|
|
1238
|
+
}
|
|
1239
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1240
|
+
let ln = memberName.toLowerCase();
|
|
1241
|
+
if (memberName === "class") {
|
|
1242
|
+
const classList = elm.classList;
|
|
1243
|
+
const oldClasses = parseClassList(oldValue);
|
|
1244
|
+
let newClasses = parseClassList(newValue);
|
|
1245
|
+
if (elm["s-si"] && initialRender) {
|
|
1246
|
+
newClasses.push(elm["s-si"]);
|
|
1247
|
+
oldClasses.forEach((c) => {
|
|
1248
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1249
|
+
});
|
|
1250
|
+
newClasses = [...new Set(newClasses)];
|
|
1251
|
+
classList.add(...newClasses);
|
|
1252
|
+
} else {
|
|
1253
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
1254
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
1255
|
+
}
|
|
1256
|
+
} else if (memberName === "style") {
|
|
1257
|
+
{
|
|
1258
|
+
for (const prop in oldValue) {
|
|
1259
|
+
if (!newValue || newValue[prop] == null) {
|
|
1260
|
+
if (prop.includes("-")) {
|
|
1261
|
+
elm.style.removeProperty(prop);
|
|
1262
|
+
} else {
|
|
1263
|
+
elm.style[prop] = "";
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1208
1266
|
}
|
|
1209
|
-
return this.__nextSibling;
|
|
1210
1267
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
var _a;
|
|
1219
|
-
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
1220
|
-
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
1221
|
-
if (parentEles && index > -1) {
|
|
1222
|
-
return parentEles[index + 1];
|
|
1268
|
+
for (const prop in newValue) {
|
|
1269
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1270
|
+
if (prop.includes("-")) {
|
|
1271
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1272
|
+
} else {
|
|
1273
|
+
elm.style[prop] = newValue[prop];
|
|
1274
|
+
}
|
|
1223
1275
|
}
|
|
1224
|
-
return this.__nextElementSibling;
|
|
1225
1276
|
}
|
|
1226
|
-
});
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1277
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1278
|
+
if (newValue) {
|
|
1279
|
+
newValue(elm);
|
|
1280
|
+
}
|
|
1281
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1282
|
+
if (memberName[2] === "-") {
|
|
1283
|
+
memberName = memberName.slice(3);
|
|
1284
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1285
|
+
memberName = ln.slice(2);
|
|
1286
|
+
} else {
|
|
1287
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1288
|
+
}
|
|
1289
|
+
if (oldValue || newValue) {
|
|
1290
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1291
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1292
|
+
if (oldValue) {
|
|
1293
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1294
|
+
}
|
|
1295
|
+
if (newValue) {
|
|
1296
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1238
1297
|
}
|
|
1239
|
-
return this.__previousSibling;
|
|
1240
1298
|
}
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1299
|
+
} else {
|
|
1300
|
+
const isComplex = isComplexType(newValue);
|
|
1301
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1302
|
+
try {
|
|
1303
|
+
if (!elm.tagName.includes("-")) {
|
|
1304
|
+
const n = newValue == null ? "" : newValue;
|
|
1305
|
+
if (memberName === "list") {
|
|
1306
|
+
isProp = false;
|
|
1307
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1308
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
1309
|
+
elm[memberName] = n;
|
|
1310
|
+
} else {
|
|
1311
|
+
elm.setAttribute(memberName, n);
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
} else if (elm[memberName] !== newValue) {
|
|
1315
|
+
elm[memberName] = newValue;
|
|
1316
|
+
}
|
|
1317
|
+
} catch (e) {
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
if (newValue == null || newValue === false) {
|
|
1321
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
1322
|
+
{
|
|
1323
|
+
elm.removeAttribute(memberName);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1327
|
+
newValue = newValue === true ? "" : newValue;
|
|
1328
|
+
{
|
|
1329
|
+
elm.setAttribute(memberName, newValue);
|
|
1253
1330
|
}
|
|
1254
|
-
return this.__previousElementSibling;
|
|
1255
1331
|
}
|
|
1256
|
-
});
|
|
1257
|
-
};
|
|
1258
|
-
var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
|
|
1259
|
-
var validNodesPatches = [
|
|
1260
|
-
"childNodes",
|
|
1261
|
-
"firstChild",
|
|
1262
|
-
"lastChild",
|
|
1263
|
-
"nextSibling",
|
|
1264
|
-
"previousSibling",
|
|
1265
|
-
"textContent"
|
|
1266
|
-
];
|
|
1267
|
-
function patchHostOriginalAccessor(accessorName, node) {
|
|
1268
|
-
let accessor;
|
|
1269
|
-
if (validElementPatches.includes(accessorName)) {
|
|
1270
|
-
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
1271
|
-
} else if (validNodesPatches.includes(accessorName)) {
|
|
1272
|
-
accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
|
|
1273
1332
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1333
|
+
};
|
|
1334
|
+
var parseClassListRegex = /\s/;
|
|
1335
|
+
var parseClassList = (value) => {
|
|
1336
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1337
|
+
value = value.baseVal;
|
|
1276
1338
|
}
|
|
1277
|
-
if (
|
|
1278
|
-
|
|
1279
|
-
var createTime = (fnName, tagName = "") => {
|
|
1280
|
-
{
|
|
1281
|
-
return () => {
|
|
1282
|
-
return;
|
|
1283
|
-
};
|
|
1339
|
+
if (!value || typeof value !== "string") {
|
|
1340
|
+
return [];
|
|
1284
1341
|
}
|
|
1342
|
+
return value.split(parseClassListRegex);
|
|
1285
1343
|
};
|
|
1286
|
-
var
|
|
1344
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
1345
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
1346
|
+
|
|
1347
|
+
// src/runtime/vdom/update-element.ts
|
|
1348
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
1349
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
1350
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1351
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
1287
1352
|
{
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1353
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
1354
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
1355
|
+
setAccessor(
|
|
1356
|
+
elm,
|
|
1357
|
+
memberName,
|
|
1358
|
+
oldVnodeAttrs[memberName],
|
|
1359
|
+
void 0,
|
|
1360
|
+
isSvgMode2,
|
|
1361
|
+
newVnode.$flags$,
|
|
1362
|
+
isInitialRender
|
|
1363
|
+
);
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1291
1366
|
}
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
const vnode = newVNode(tagName, null);
|
|
1303
|
-
vnode.$elm$ = hostElm;
|
|
1304
|
-
if (!plt.$orgLocNodes$) {
|
|
1305
|
-
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1367
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
1368
|
+
setAccessor(
|
|
1369
|
+
elm,
|
|
1370
|
+
memberName,
|
|
1371
|
+
oldVnodeAttrs[memberName],
|
|
1372
|
+
newVnodeAttrs[memberName],
|
|
1373
|
+
isSvgMode2,
|
|
1374
|
+
newVnode.$flags$,
|
|
1375
|
+
isInitialRender
|
|
1376
|
+
);
|
|
1306
1377
|
}
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
hostElm,
|
|
1316
|
-
hostId,
|
|
1317
|
-
slottedNodes
|
|
1378
|
+
};
|
|
1379
|
+
function sortedAttrNames(attrNames) {
|
|
1380
|
+
return attrNames.includes("ref") ? (
|
|
1381
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
1382
|
+
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
1383
|
+
) : (
|
|
1384
|
+
// no need to sort, return the original array
|
|
1385
|
+
attrNames
|
|
1318
1386
|
);
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1387
|
+
}
|
|
1388
|
+
var contentRef;
|
|
1389
|
+
var hostTagName;
|
|
1390
|
+
var useNativeShadowDom = false;
|
|
1391
|
+
var checkSlotFallbackVisibility = false;
|
|
1392
|
+
var checkSlotRelocate = false;
|
|
1393
|
+
var isSvgMode = false;
|
|
1394
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
1395
|
+
var _a;
|
|
1396
|
+
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
1397
|
+
let i2 = 0;
|
|
1398
|
+
let elm;
|
|
1399
|
+
let childNode;
|
|
1400
|
+
let oldVNode;
|
|
1401
|
+
if (!useNativeShadowDom) {
|
|
1402
|
+
checkSlotRelocate = true;
|
|
1403
|
+
if (newVNode2.$tag$ === "slot") {
|
|
1404
|
+
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
1405
|
+
// slot element has fallback content
|
|
1406
|
+
// still create an element that "mocks" the slot element
|
|
1407
|
+
2 /* isSlotFallback */
|
|
1408
|
+
) : (
|
|
1409
|
+
// slot element does not have fallback content
|
|
1410
|
+
// create an html comment we'll use to always reference
|
|
1411
|
+
// where actual slot content should sit next to
|
|
1412
|
+
1 /* isSlotReference */
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
if (newVNode2.$text$ !== null) {
|
|
1417
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
1418
|
+
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
1419
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1420
|
+
{
|
|
1421
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1422
|
+
}
|
|
1423
|
+
} else {
|
|
1424
|
+
if (!isSvgMode) {
|
|
1425
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
1426
|
+
}
|
|
1427
|
+
if (!win.document) {
|
|
1428
|
+
throw new Error(
|
|
1429
|
+
"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."
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
1433
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
1434
|
+
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
1435
|
+
) ;
|
|
1436
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
1437
|
+
isSvgMode = false;
|
|
1332
1438
|
}
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1439
|
+
{
|
|
1440
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1441
|
+
}
|
|
1442
|
+
if (newVNode2.$children$) {
|
|
1443
|
+
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
1444
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
1445
|
+
if (childNode) {
|
|
1446
|
+
elm.appendChild(childNode);
|
|
1340
1447
|
}
|
|
1341
|
-
} else {
|
|
1342
|
-
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
1343
1448
|
}
|
|
1344
1449
|
}
|
|
1345
|
-
|
|
1346
|
-
if (
|
|
1347
|
-
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
if (!shadowRoot) {
|
|
1351
|
-
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1450
|
+
{
|
|
1451
|
+
if (newVNode2.$tag$ === "svg") {
|
|
1452
|
+
isSvgMode = false;
|
|
1453
|
+
} else if (elm.tagName === "foreignObject") {
|
|
1454
|
+
isSvgMode = true;
|
|
1352
1455
|
}
|
|
1353
1456
|
}
|
|
1354
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1355
1457
|
}
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
snGroupLen = slotGroup.length;
|
|
1367
|
-
snGroupIdx = 0;
|
|
1368
|
-
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1369
|
-
slottedItem = slotGroup[snGroupIdx];
|
|
1370
|
-
if (!hosts[slottedItem.hostId]) {
|
|
1371
|
-
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1372
|
-
}
|
|
1373
|
-
if (!hosts[slottedItem.hostId]) continue;
|
|
1374
|
-
const hostEle = hosts[slottedItem.hostId];
|
|
1375
|
-
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1376
|
-
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1377
|
-
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1378
|
-
slottedItem.slot["s-cr"] = hostEle;
|
|
1379
|
-
} else {
|
|
1380
|
-
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1381
|
-
}
|
|
1382
|
-
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1458
|
+
elm["s-hn"] = hostTagName;
|
|
1459
|
+
{
|
|
1460
|
+
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
1461
|
+
elm["s-sr"] = true;
|
|
1462
|
+
elm["s-cr"] = contentRef;
|
|
1463
|
+
elm["s-sn"] = newVNode2.$name$ || "";
|
|
1464
|
+
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1465
|
+
patchSlotNode(elm);
|
|
1466
|
+
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
1467
|
+
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
1383
1468
|
{
|
|
1384
|
-
|
|
1469
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
1385
1470
|
}
|
|
1386
1471
|
}
|
|
1387
|
-
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1388
|
-
hostEle.appendChild(slottedItem.node);
|
|
1389
|
-
}
|
|
1390
1472
|
}
|
|
1391
1473
|
}
|
|
1392
|
-
|
|
1393
|
-
endHydrate();
|
|
1474
|
+
return elm;
|
|
1394
1475
|
};
|
|
1395
|
-
var
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
$index$: childIdSplt[3],
|
|
1411
|
-
$tag$: node.tagName.toLowerCase(),
|
|
1412
|
-
$elm$: node,
|
|
1413
|
-
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
1414
|
-
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
1415
|
-
$attrs$: { class: node.className || "" }
|
|
1416
|
-
});
|
|
1417
|
-
childRenderNodes.push(childVNode);
|
|
1418
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1419
|
-
if (!parentVNode.$children$) {
|
|
1420
|
-
parentVNode.$children$ = [];
|
|
1421
|
-
}
|
|
1422
|
-
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1423
|
-
if (typeof slotName === "string") {
|
|
1424
|
-
if (childVNode.$tag$ === "slot-fb") {
|
|
1425
|
-
addSlot(
|
|
1426
|
-
slotName,
|
|
1427
|
-
childIdSplt[2],
|
|
1428
|
-
childVNode,
|
|
1429
|
-
node,
|
|
1430
|
-
parentVNode,
|
|
1431
|
-
childRenderNodes,
|
|
1432
|
-
slotNodes,
|
|
1433
|
-
shadowRootNodes,
|
|
1434
|
-
slottedNodes
|
|
1435
|
-
);
|
|
1436
|
-
}
|
|
1437
|
-
childVNode.$elm$["s-sn"] = slotName;
|
|
1438
|
-
childVNode.$elm$.removeAttribute("s-sn");
|
|
1439
|
-
}
|
|
1440
|
-
if (childVNode.$index$ !== void 0) {
|
|
1441
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1442
|
-
}
|
|
1443
|
-
parentVNode = childVNode;
|
|
1444
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1445
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1446
|
-
}
|
|
1476
|
+
var relocateToHostRoot = (parentElm) => {
|
|
1477
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1478
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
1479
|
+
if (host != null) {
|
|
1480
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
1481
|
+
(ref) => ref["s-cr"]
|
|
1482
|
+
);
|
|
1483
|
+
const childNodeArray = Array.from(
|
|
1484
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
1485
|
+
);
|
|
1486
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
1487
|
+
if (childNode["s-sh"] != null) {
|
|
1488
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
1489
|
+
childNode["s-sh"] = void 0;
|
|
1490
|
+
checkSlotRelocate = true;
|
|
1447
1491
|
}
|
|
1448
1492
|
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
);
|
|
1493
|
+
}
|
|
1494
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1495
|
+
};
|
|
1496
|
+
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
1497
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1498
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1499
|
+
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
1500
|
+
let node = parentElm;
|
|
1501
|
+
while (node = node.nextSibling) {
|
|
1502
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1503
|
+
oldSlotChildNodes.push(node);
|
|
1461
1504
|
}
|
|
1462
1505
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
hostId,
|
|
1473
|
-
slottedNodes
|
|
1474
|
-
);
|
|
1506
|
+
}
|
|
1507
|
+
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
1508
|
+
const childNode = oldSlotChildNodes[i2];
|
|
1509
|
+
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
1510
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
1511
|
+
childNode["s-ol"].remove();
|
|
1512
|
+
childNode["s-ol"] = void 0;
|
|
1513
|
+
childNode["s-sh"] = void 0;
|
|
1514
|
+
checkSlotRelocate = true;
|
|
1475
1515
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
$
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1516
|
+
if (recursive) {
|
|
1517
|
+
putBackInOriginalLocation(childNode, recursive);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1521
|
+
};
|
|
1522
|
+
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
1523
|
+
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
1524
|
+
let childNode;
|
|
1525
|
+
for (; startIdx <= endIdx; ++startIdx) {
|
|
1526
|
+
if (vnodes[startIdx]) {
|
|
1527
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
1528
|
+
if (childNode) {
|
|
1529
|
+
vnodes[startIdx].$elm$ = childNode;
|
|
1530
|
+
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
};
|
|
1535
|
+
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
1536
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
1537
|
+
const vnode = vnodes[index];
|
|
1538
|
+
if (vnode) {
|
|
1539
|
+
const elm = vnode.$elm$;
|
|
1540
|
+
nullifyVNodeRefs(vnode);
|
|
1541
|
+
if (elm) {
|
|
1542
|
+
{
|
|
1543
|
+
checkSlotFallbackVisibility = true;
|
|
1544
|
+
if (elm["s-ol"]) {
|
|
1545
|
+
elm["s-ol"].remove();
|
|
1546
|
+
} else {
|
|
1547
|
+
putBackInOriginalLocation(elm, true);
|
|
1504
1548
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1549
|
+
}
|
|
1550
|
+
elm.remove();
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
|
1556
|
+
let oldStartIdx = 0;
|
|
1557
|
+
let newStartIdx = 0;
|
|
1558
|
+
let idxInOld = 0;
|
|
1559
|
+
let i2 = 0;
|
|
1560
|
+
let oldEndIdx = oldCh.length - 1;
|
|
1561
|
+
let oldStartVnode = oldCh[0];
|
|
1562
|
+
let oldEndVnode = oldCh[oldEndIdx];
|
|
1563
|
+
let newEndIdx = newCh.length - 1;
|
|
1564
|
+
let newStartVnode = newCh[0];
|
|
1565
|
+
let newEndVnode = newCh[newEndIdx];
|
|
1566
|
+
let node;
|
|
1567
|
+
let elmToMove;
|
|
1568
|
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
1569
|
+
if (oldStartVnode == null) {
|
|
1570
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1571
|
+
} else if (oldEndVnode == null) {
|
|
1572
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1573
|
+
} else if (newStartVnode == null) {
|
|
1574
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1575
|
+
} else if (newEndVnode == null) {
|
|
1576
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1577
|
+
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
1578
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
1579
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1580
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1581
|
+
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
1582
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
1583
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1584
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1585
|
+
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1586
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1587
|
+
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1588
|
+
}
|
|
1589
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1590
|
+
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
1591
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1592
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1593
|
+
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1594
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1595
|
+
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1596
|
+
}
|
|
1597
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1598
|
+
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
1599
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1600
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1601
|
+
} else {
|
|
1602
|
+
idxInOld = -1;
|
|
1603
|
+
{
|
|
1604
|
+
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
1605
|
+
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
1606
|
+
idxInOld = i2;
|
|
1607
|
+
break;
|
|
1507
1608
|
}
|
|
1508
1609
|
}
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
node
|
|
1610
|
+
}
|
|
1611
|
+
if (idxInOld >= 0) {
|
|
1612
|
+
elmToMove = oldCh[idxInOld];
|
|
1613
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1614
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
1615
|
+
} else {
|
|
1616
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1617
|
+
oldCh[idxInOld] = void 0;
|
|
1618
|
+
node = elmToMove.$elm$;
|
|
1514
1619
|
}
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1620
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1621
|
+
} else {
|
|
1622
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1623
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1624
|
+
}
|
|
1625
|
+
if (node) {
|
|
1626
|
+
{
|
|
1627
|
+
insertBefore(
|
|
1628
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
1522
1629
|
node,
|
|
1523
|
-
|
|
1524
|
-
childRenderNodes,
|
|
1525
|
-
slotNodes,
|
|
1526
|
-
shadowRootNodes,
|
|
1527
|
-
slottedNodes
|
|
1630
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1528
1631
|
);
|
|
1529
|
-
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1530
|
-
{
|
|
1531
|
-
hostElm["s-cr"] = node;
|
|
1532
|
-
node["s-cn"] = true;
|
|
1533
|
-
}
|
|
1534
1632
|
}
|
|
1535
1633
|
}
|
|
1536
1634
|
}
|
|
1537
|
-
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1538
|
-
const vnode = newVNode(null, node.textContent);
|
|
1539
|
-
vnode.$elm$ = node;
|
|
1540
|
-
vnode.$index$ = "0";
|
|
1541
|
-
parentVNode.$children$ = [vnode];
|
|
1542
1635
|
}
|
|
1543
|
-
|
|
1636
|
+
if (oldStartIdx > oldEndIdx) {
|
|
1637
|
+
addVnodes(
|
|
1638
|
+
parentElm,
|
|
1639
|
+
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
1640
|
+
newVNode2,
|
|
1641
|
+
newCh,
|
|
1642
|
+
newStartIdx,
|
|
1643
|
+
newEndIdx
|
|
1644
|
+
);
|
|
1645
|
+
} else if (newStartIdx > newEndIdx) {
|
|
1646
|
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
1647
|
+
}
|
|
1544
1648
|
};
|
|
1545
|
-
var
|
|
1546
|
-
if (
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
orgLocNodes.set(componentId, node);
|
|
1550
|
-
}
|
|
1551
|
-
let i2 = 0;
|
|
1552
|
-
if (node.shadowRoot) {
|
|
1553
|
-
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1554
|
-
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1555
|
-
}
|
|
1649
|
+
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1650
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1651
|
+
if (leftVNode.$tag$ === "slot") {
|
|
1652
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
1556
1653
|
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1654
|
+
if (!isInitialRender) {
|
|
1655
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
1560
1656
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1564
|
-
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1565
|
-
node.nodeValue = "";
|
|
1566
|
-
node["s-en"] = childIdSplt[3];
|
|
1657
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1658
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1567
1659
|
}
|
|
1660
|
+
return true;
|
|
1568
1661
|
}
|
|
1662
|
+
return false;
|
|
1569
1663
|
};
|
|
1570
|
-
var
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
$name$: null,
|
|
1582
|
-
$tag$: null,
|
|
1583
|
-
$text$: null
|
|
1584
|
-
};
|
|
1585
|
-
return { ...defaultVNode, ...vnode };
|
|
1586
|
-
};
|
|
1587
|
-
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1588
|
-
node["s-sr"] = true;
|
|
1589
|
-
childVNode.$name$ = slotName || null;
|
|
1590
|
-
childVNode.$tag$ = "slot";
|
|
1591
|
-
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1592
|
-
{
|
|
1593
|
-
const slot = childVNode.$elm$;
|
|
1594
|
-
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1595
|
-
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1596
|
-
if (shouldMove) {
|
|
1597
|
-
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1664
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
1665
|
+
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1666
|
+
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1667
|
+
const oldChildren = oldVNode.$children$;
|
|
1668
|
+
const newChildren = newVNode2.$children$;
|
|
1669
|
+
const tag = newVNode2.$tag$;
|
|
1670
|
+
const text = newVNode2.$text$;
|
|
1671
|
+
let defaultHolder;
|
|
1672
|
+
if (text === null) {
|
|
1673
|
+
{
|
|
1674
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1598
1675
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1676
|
+
{
|
|
1677
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
1678
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1679
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1680
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
1684
|
+
}
|
|
1685
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
1686
|
+
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
1687
|
+
} else if (newChildren !== null) {
|
|
1688
|
+
if (oldVNode.$text$ !== null) {
|
|
1689
|
+
elm.textContent = "";
|
|
1690
|
+
}
|
|
1691
|
+
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1692
|
+
} else if (
|
|
1693
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
1694
|
+
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1695
|
+
) {
|
|
1696
|
+
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1697
|
+
}
|
|
1698
|
+
if (isSvgMode && tag === "svg") {
|
|
1699
|
+
isSvgMode = false;
|
|
1700
|
+
}
|
|
1701
|
+
} else if ((defaultHolder = elm["s-cr"])) {
|
|
1702
|
+
defaultHolder.parentNode.textContent = text;
|
|
1703
|
+
} else if (oldVNode.$text$ !== text) {
|
|
1704
|
+
elm.data = text;
|
|
1614
1705
|
}
|
|
1615
1706
|
};
|
|
1616
|
-
var
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1707
|
+
var relocateNodes = [];
|
|
1708
|
+
var markSlotContentForRelocation = (elm) => {
|
|
1709
|
+
let node;
|
|
1710
|
+
let hostContentNodes;
|
|
1711
|
+
let j;
|
|
1712
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1713
|
+
for (const childNode of children) {
|
|
1714
|
+
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1715
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1716
|
+
const slotName = childNode["s-sn"];
|
|
1717
|
+
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1718
|
+
node = hostContentNodes[j];
|
|
1719
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
1720
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1721
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1722
|
+
checkSlotFallbackVisibility = true;
|
|
1723
|
+
node["s-sn"] = node["s-sn"] || slotName;
|
|
1724
|
+
if (relocateNodeData) {
|
|
1725
|
+
relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
|
|
1726
|
+
relocateNodeData.$slotRefNode$ = childNode;
|
|
1727
|
+
} else {
|
|
1728
|
+
node["s-sh"] = childNode["s-hn"];
|
|
1729
|
+
relocateNodes.push({
|
|
1730
|
+
$slotRefNode$: childNode,
|
|
1731
|
+
$nodeToRelocate$: node
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1734
|
+
if (node["s-sr"]) {
|
|
1735
|
+
relocateNodes.map((relocateNode) => {
|
|
1736
|
+
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
1737
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1738
|
+
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1739
|
+
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1745
|
+
relocateNodes.push({
|
|
1746
|
+
$nodeToRelocate$: node
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1623
1751
|
}
|
|
1624
|
-
if (
|
|
1625
|
-
|
|
1752
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1753
|
+
markSlotContentForRelocation(childNode);
|
|
1626
1754
|
}
|
|
1627
|
-
return propValue;
|
|
1628
1755
|
}
|
|
1629
|
-
return propValue;
|
|
1630
|
-
};
|
|
1631
|
-
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
1632
|
-
|
|
1633
|
-
// src/runtime/event-emitter.ts
|
|
1634
|
-
var createEvent = (ref, name, flags) => {
|
|
1635
|
-
const elm = getElement(ref);
|
|
1636
|
-
return {
|
|
1637
|
-
emit: (detail) => {
|
|
1638
|
-
return emitEvent(elm, name, {
|
|
1639
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1640
|
-
composed: !!(flags & 2 /* Composed */),
|
|
1641
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1642
|
-
detail
|
|
1643
|
-
});
|
|
1644
|
-
}
|
|
1645
|
-
};
|
|
1646
1756
|
};
|
|
1647
|
-
var
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1757
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
1758
|
+
{
|
|
1759
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1760
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1761
|
+
}
|
|
1651
1762
|
};
|
|
1652
|
-
var
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
style = style || new CSSStyleSheet();
|
|
1657
|
-
if (typeof style === "string") {
|
|
1658
|
-
style = cssText;
|
|
1659
|
-
} else {
|
|
1660
|
-
style.replaceSync(cssText);
|
|
1763
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
1764
|
+
if (typeof newNode["s-sn"] === "string") {
|
|
1765
|
+
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
1766
|
+
patchParentNode(newNode);
|
|
1661
1767
|
}
|
|
1768
|
+
parent.insertBefore(newNode, reference);
|
|
1769
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1770
|
+
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
1771
|
+
return newNode;
|
|
1772
|
+
}
|
|
1773
|
+
if (parent.__insertBefore) {
|
|
1774
|
+
return parent.__insertBefore(newNode, reference);
|
|
1662
1775
|
} else {
|
|
1663
|
-
|
|
1776
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1664
1777
|
}
|
|
1665
|
-
styles.set(scopeId2, style);
|
|
1666
1778
|
};
|
|
1667
|
-
var
|
|
1668
|
-
var _a;
|
|
1669
|
-
const
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1779
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1780
|
+
var _a, _b, _c, _d, _e;
|
|
1781
|
+
const hostElm = hostRef.$hostElement$;
|
|
1782
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1783
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1784
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1785
|
+
hostTagName = hostElm.tagName;
|
|
1786
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1787
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1788
|
+
cmpMeta.$attrsToReflect$.map(
|
|
1789
|
+
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1792
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1793
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1794
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
1795
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
1679
1796
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
rootVnode.$tag$ = null;
|
|
1800
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1801
|
+
hostRef.$vnode$ = rootVnode;
|
|
1802
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
|
|
1803
|
+
useNativeShadowDom = supportsShadow ;
|
|
1804
|
+
{
|
|
1805
|
+
contentRef = hostElm["s-cr"];
|
|
1806
|
+
checkSlotFallbackVisibility = false;
|
|
1807
|
+
}
|
|
1808
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1809
|
+
{
|
|
1810
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1811
|
+
if (checkSlotRelocate) {
|
|
1812
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1813
|
+
for (const relocateData of relocateNodes) {
|
|
1814
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1815
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1816
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1817
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1818
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
for (const relocateData of relocateNodes) {
|
|
1822
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1823
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
1824
|
+
if (slotRefNode) {
|
|
1825
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
1826
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1827
|
+
if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
|
|
1828
|
+
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1829
|
+
while (orgLocationNode) {
|
|
1830
|
+
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1831
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1832
|
+
refNode = refNode.nextSibling;
|
|
1833
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1834
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1835
|
+
}
|
|
1836
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
1837
|
+
insertBeforeNode = refNode;
|
|
1838
|
+
break;
|
|
1706
1839
|
}
|
|
1707
1840
|
}
|
|
1708
|
-
|
|
1709
|
-
styleContainerNode.append(styleElm);
|
|
1841
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
1710
1842
|
}
|
|
1711
1843
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1844
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1845
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1846
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1847
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
1848
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1849
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1850
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1855
|
+
} else {
|
|
1856
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1857
|
+
if (isInitialLoad) {
|
|
1858
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1859
|
+
}
|
|
1860
|
+
nodeToRelocate.hidden = true;
|
|
1714
1861
|
}
|
|
1715
1862
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
if (checkSlotFallbackVisibility) {
|
|
1866
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1867
|
+
}
|
|
1868
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1869
|
+
relocateNodes.length = 0;
|
|
1870
|
+
}
|
|
1871
|
+
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1872
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1873
|
+
for (const childNode of children) {
|
|
1874
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1875
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1876
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1721
1877
|
}
|
|
1878
|
+
childNode.hidden = true;
|
|
1722
1879
|
}
|
|
1723
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1724
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1725
1880
|
}
|
|
1726
1881
|
}
|
|
1727
|
-
|
|
1728
|
-
};
|
|
1729
|
-
var attachStyles = (hostRef) => {
|
|
1730
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1731
|
-
const elm = hostRef.$hostElement$;
|
|
1732
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1733
|
-
addStyle(
|
|
1734
|
-
elm.getRootNode(),
|
|
1735
|
-
cmpMeta);
|
|
1736
|
-
endAttachStyles();
|
|
1882
|
+
contentRef = void 0;
|
|
1737
1883
|
};
|
|
1738
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1739
1884
|
|
|
1740
1885
|
// src/runtime/update-component.ts
|
|
1741
1886
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1742
1887
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1743
|
-
ancestorComponent["s-p"].push(
|
|
1888
|
+
const index = ancestorComponent["s-p"].push(
|
|
1889
|
+
new Promise(
|
|
1890
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1891
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1892
|
+
r();
|
|
1893
|
+
}
|
|
1894
|
+
)
|
|
1895
|
+
);
|
|
1744
1896
|
}
|
|
1745
1897
|
};
|
|
1746
1898
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1769,21 +1921,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1769
1921
|
{
|
|
1770
1922
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1771
1923
|
if (hostRef.$queuedListeners$) {
|
|
1772
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1924
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1773
1925
|
hostRef.$queuedListeners$ = void 0;
|
|
1774
1926
|
}
|
|
1775
1927
|
}
|
|
1776
|
-
|
|
1777
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1778
|
-
}
|
|
1928
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1779
1929
|
} else {
|
|
1780
|
-
|
|
1781
|
-
maybePromise = safeCall(instance, "componentWillUpdate");
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
{
|
|
1785
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1930
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1786
1931
|
}
|
|
1932
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1787
1933
|
endSchedule();
|
|
1788
1934
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1789
1935
|
};
|
|
@@ -1853,14 +1999,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1853
1999
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1854
2000
|
const instance = hostRef.$lazyInstance$ ;
|
|
1855
2001
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
2002
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1856
2003
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1857
2004
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1858
2005
|
{
|
|
1859
2006
|
addHydratedFlag(elm);
|
|
1860
2007
|
}
|
|
1861
|
-
|
|
1862
|
-
safeCall(instance, "componentDidLoad");
|
|
1863
|
-
}
|
|
2008
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1864
2009
|
endPostUpdate();
|
|
1865
2010
|
{
|
|
1866
2011
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1869,6 +2014,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1869
2014
|
}
|
|
1870
2015
|
}
|
|
1871
2016
|
} else {
|
|
2017
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1872
2018
|
endPostUpdate();
|
|
1873
2019
|
}
|
|
1874
2020
|
{
|
|
@@ -1896,17 +2042,14 @@ var forceUpdate = (ref) => {
|
|
|
1896
2042
|
}
|
|
1897
2043
|
};
|
|
1898
2044
|
var appDidLoad = (who) => {
|
|
1899
|
-
{
|
|
1900
|
-
addHydratedFlag(doc.documentElement);
|
|
1901
|
-
}
|
|
1902
2045
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1903
2046
|
};
|
|
1904
|
-
var safeCall = (instance, method, arg) => {
|
|
2047
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1905
2048
|
if (instance && instance[method]) {
|
|
1906
2049
|
try {
|
|
1907
2050
|
return instance[method](arg);
|
|
1908
2051
|
} catch (e) {
|
|
1909
|
-
consoleError(e);
|
|
2052
|
+
consoleError(e, elm);
|
|
1910
2053
|
}
|
|
1911
2054
|
}
|
|
1912
2055
|
return void 0;
|
|
@@ -1948,6 +2091,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1948
2091
|
}
|
|
1949
2092
|
}
|
|
1950
2093
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2094
|
+
if (instance.componentShouldUpdate) {
|
|
2095
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2096
|
+
return;
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
1951
2099
|
scheduleUpdate(hostRef, false);
|
|
1952
2100
|
}
|
|
1953
2101
|
}
|
|
@@ -1984,62 +2132,69 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1984
2132
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1985
2133
|
members.map(([memberName, [memberFlags]]) => {
|
|
1986
2134
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1987
|
-
|
|
2135
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
2136
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
2137
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
2138
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1988
2139
|
Object.defineProperty(prototype, memberName, {
|
|
1989
2140
|
get() {
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
},
|
|
1995
|
-
configurable: true,
|
|
1996
|
-
enumerable: true
|
|
1997
|
-
});
|
|
1998
|
-
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
1999
|
-
{
|
|
2000
|
-
Object.defineProperty(prototype, memberName, {
|
|
2001
|
-
get() {
|
|
2141
|
+
{
|
|
2142
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
2143
|
+
return getValue(this, memberName);
|
|
2144
|
+
}
|
|
2002
2145
|
const ref = getHostRef(this);
|
|
2003
2146
|
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
2004
2147
|
if (!instance) return;
|
|
2005
2148
|
return instance[memberName];
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2149
|
+
}
|
|
2150
|
+
},
|
|
2151
|
+
configurable: true,
|
|
2152
|
+
enumerable: true
|
|
2153
|
+
});
|
|
2154
|
+
}
|
|
2155
|
+
Object.defineProperty(prototype, memberName, {
|
|
2156
|
+
set(newValue) {
|
|
2157
|
+
const ref = getHostRef(this);
|
|
2158
|
+
if (origSetter) {
|
|
2159
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2160
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
2161
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
2162
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2163
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2164
|
+
}
|
|
2165
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
2166
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2167
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2168
|
+
return;
|
|
2169
|
+
}
|
|
2170
|
+
{
|
|
2171
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
2172
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2173
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
2174
|
+
ref.$onReadyPromise$.then(() => {
|
|
2175
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
2176
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
2177
|
+
}
|
|
2178
|
+
});
|
|
2024
2179
|
}
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
2032
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2033
|
-
};
|
|
2034
|
-
if (ref.$lazyInstance$) {
|
|
2035
|
-
setterSetVal();
|
|
2036
|
-
} else {
|
|
2037
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
2180
|
+
return;
|
|
2181
|
+
}
|
|
2182
|
+
const setterSetVal = () => {
|
|
2183
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
2184
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2185
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2038
2186
|
}
|
|
2187
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
2188
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2189
|
+
};
|
|
2190
|
+
if (ref.$lazyInstance$) {
|
|
2191
|
+
setterSetVal();
|
|
2192
|
+
} else {
|
|
2193
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
2039
2194
|
}
|
|
2040
|
-
}
|
|
2195
|
+
}
|
|
2041
2196
|
}
|
|
2042
|
-
}
|
|
2197
|
+
});
|
|
2043
2198
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
2044
2199
|
Object.defineProperty(prototype, memberName, {
|
|
2045
2200
|
value(...args) {
|
|
@@ -2080,8 +2235,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2080
2235
|
return;
|
|
2081
2236
|
}
|
|
2082
2237
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2083
|
-
|
|
2084
|
-
|
|
2238
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
2239
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2240
|
+
this[propName] = newValue;
|
|
2085
2241
|
}
|
|
2086
2242
|
});
|
|
2087
2243
|
};
|
|
@@ -2111,7 +2267,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2111
2267
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
2112
2268
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
2113
2269
|
if (bundleId) {
|
|
2114
|
-
const CstrImport = loadModule(cmpMeta);
|
|
2270
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
2115
2271
|
if (CstrImport && "then" in CstrImport) {
|
|
2116
2272
|
const endLoad = uniqueTime();
|
|
2117
2273
|
Cstr = await CstrImport;
|
|
@@ -2136,7 +2292,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2136
2292
|
try {
|
|
2137
2293
|
new Cstr(hostRef);
|
|
2138
2294
|
} catch (e) {
|
|
2139
|
-
consoleError(e);
|
|
2295
|
+
consoleError(e, elm);
|
|
2140
2296
|
}
|
|
2141
2297
|
{
|
|
2142
2298
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -2145,7 +2301,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2145
2301
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
2146
2302
|
}
|
|
2147
2303
|
endNewInstance();
|
|
2148
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2304
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2149
2305
|
} else {
|
|
2150
2306
|
Cstr = elm.constructor;
|
|
2151
2307
|
const cmpTag = elm.localName;
|
|
@@ -2172,9 +2328,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2172
2328
|
schedule();
|
|
2173
2329
|
}
|
|
2174
2330
|
};
|
|
2175
|
-
var fireConnectedCallback = (instance) => {
|
|
2331
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
2176
2332
|
{
|
|
2177
|
-
safeCall(instance, "connectedCallback");
|
|
2333
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
2178
2334
|
}
|
|
2179
2335
|
};
|
|
2180
2336
|
|
|
@@ -2223,24 +2379,27 @@ var connectedCallback = (elm) => {
|
|
|
2223
2379
|
} else {
|
|
2224
2380
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
2225
2381
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2226
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2382
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2227
2383
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2228
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
2384
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
2229
2385
|
}
|
|
2230
2386
|
}
|
|
2231
2387
|
endConnected();
|
|
2232
2388
|
}
|
|
2233
2389
|
};
|
|
2234
2390
|
var setContentReference = (elm) => {
|
|
2235
|
-
|
|
2391
|
+
if (!win.document) {
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2394
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
2236
2395
|
""
|
|
2237
2396
|
);
|
|
2238
2397
|
contentRefElm["s-cn"] = true;
|
|
2239
2398
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
2240
2399
|
};
|
|
2241
|
-
var disconnectInstance = (instance) => {
|
|
2400
|
+
var disconnectInstance = (instance, elm) => {
|
|
2242
2401
|
{
|
|
2243
|
-
safeCall(instance, "disconnectedCallback");
|
|
2402
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
2244
2403
|
}
|
|
2245
2404
|
};
|
|
2246
2405
|
var disconnectedCallback = async (elm) => {
|
|
@@ -2253,28 +2412,38 @@ var disconnectedCallback = async (elm) => {
|
|
|
2253
2412
|
}
|
|
2254
2413
|
}
|
|
2255
2414
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2256
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
2415
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
2257
2416
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2258
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
2417
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
2259
2418
|
}
|
|
2260
2419
|
}
|
|
2420
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2421
|
+
rootAppliedStyles.delete(elm);
|
|
2422
|
+
}
|
|
2423
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2424
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2425
|
+
}
|
|
2261
2426
|
};
|
|
2262
2427
|
|
|
2263
2428
|
// src/runtime/bootstrap-lazy.ts
|
|
2264
2429
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2265
2430
|
var _a;
|
|
2431
|
+
if (!win.document) {
|
|
2432
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2433
|
+
return;
|
|
2434
|
+
}
|
|
2266
2435
|
const endBootstrap = createTime();
|
|
2267
2436
|
const cmpTags = [];
|
|
2268
2437
|
const exclude = options.exclude || [];
|
|
2269
2438
|
const customElements2 = win.customElements;
|
|
2270
|
-
const head =
|
|
2439
|
+
const head = win.document.head;
|
|
2271
2440
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2272
|
-
const dataStyles = /* @__PURE__ */
|
|
2441
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
2273
2442
|
const deferredConnectedCallbacks = [];
|
|
2274
2443
|
let appLoadFallback;
|
|
2275
2444
|
let isBootstrapping = true;
|
|
2276
2445
|
Object.assign(plt, options);
|
|
2277
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2446
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
2278
2447
|
{
|
|
2279
2448
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2280
2449
|
}
|
|
@@ -2330,6 +2499,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2330
2499
|
}
|
|
2331
2500
|
disconnectedCallback() {
|
|
2332
2501
|
plt.jmp(() => disconnectedCallback(this));
|
|
2502
|
+
plt.raf(() => {
|
|
2503
|
+
var _a3;
|
|
2504
|
+
const hostRef = getHostRef(this);
|
|
2505
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2506
|
+
if (i2 > -1) {
|
|
2507
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2508
|
+
}
|
|
2509
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2510
|
+
delete hostRef.$vnode$.$elm$;
|
|
2511
|
+
}
|
|
2512
|
+
});
|
|
2333
2513
|
}
|
|
2334
2514
|
componentOnReady() {
|
|
2335
2515
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -2357,7 +2537,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2357
2537
|
}
|
|
2358
2538
|
if (dataStyles.innerHTML.length) {
|
|
2359
2539
|
dataStyles.setAttribute("data-styles", "");
|
|
2360
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2540
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2361
2541
|
if (nonce != null) {
|
|
2362
2542
|
dataStyles.setAttribute("nonce", nonce);
|
|
2363
2543
|
}
|
|
@@ -2378,9 +2558,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2378
2558
|
// src/runtime/fragment.ts
|
|
2379
2559
|
var Fragment = (_, children) => children;
|
|
2380
2560
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2381
|
-
if (listeners) {
|
|
2561
|
+
if (listeners && win.document) {
|
|
2382
2562
|
listeners.map(([flags, name, method]) => {
|
|
2383
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2563
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
2384
2564
|
const handler = hostListenerProxy(hostRef, method);
|
|
2385
2565
|
const opts = hostListenerOpts(flags);
|
|
2386
2566
|
plt.ael(target, name, handler, opts);
|
|
@@ -2399,11 +2579,13 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2399
2579
|
}
|
|
2400
2580
|
}
|
|
2401
2581
|
} catch (e) {
|
|
2402
|
-
consoleError(e);
|
|
2582
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2403
2583
|
}
|
|
2404
2584
|
};
|
|
2405
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
2406
|
-
if (flags & 4 /* TargetDocument */)
|
|
2585
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2586
|
+
if (flags & 4 /* TargetDocument */) {
|
|
2587
|
+
return doc;
|
|
2588
|
+
}
|
|
2407
2589
|
return elm;
|
|
2408
2590
|
};
|
|
2409
2591
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -2416,4 +2598,4 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
|
2416
2598
|
|
|
2417
2599
|
export { Fragment as F, H, Host as a, bootstrapLazy as b, createEvent as c, getRenderingRef as d, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2418
2600
|
|
|
2419
|
-
//# sourceMappingURL=index-
|
|
2601
|
+
//# sourceMappingURL=index-1fb7a9a6.js.map
|