@nova-design-system/nova-webcomponents 3.0.0-beta.41 → 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 +5 -1
- 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
|
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'native';
|
|
24
|
-
const BUILD = /* native */ { allRenderFn: true, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true,
|
|
24
|
+
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 };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.27.1 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -33,15 +33,19 @@ var __export = (target, all) => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
// src/utils/constants.ts
|
|
36
|
-
var EMPTY_OBJ = {};
|
|
37
36
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
38
37
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
39
38
|
|
|
40
39
|
// src/client/client-host-ref.ts
|
|
41
|
-
var
|
|
42
|
-
|
|
40
|
+
var getHostRef = (ref) => {
|
|
41
|
+
if (ref.__stencil__getHostRef) {
|
|
42
|
+
return ref.__stencil__getHostRef();
|
|
43
|
+
}
|
|
44
|
+
return void 0;
|
|
45
|
+
};
|
|
43
46
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
44
|
-
|
|
47
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
48
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
45
49
|
};
|
|
46
50
|
var registerHost = (hostElement, cmpMeta) => {
|
|
47
51
|
const hostRef = {
|
|
@@ -58,7 +62,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
58
62
|
hostElement["s-p"] = [];
|
|
59
63
|
hostElement["s-rc"] = [];
|
|
60
64
|
}
|
|
61
|
-
const ref =
|
|
65
|
+
const ref = hostRef;
|
|
66
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
62
67
|
return ref;
|
|
63
68
|
};
|
|
64
69
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
@@ -104,10 +109,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
104
109
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
105
110
|
/* webpackMode: "lazy" */
|
|
106
111
|
'./nv-breadcrumbs.cjs.entry.js')); }).then(processMod, consoleError);
|
|
107
|
-
case 'nv-calendar.cjs':
|
|
108
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
109
|
-
/* webpackMode: "lazy" */
|
|
110
|
-
'./nv-calendar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
111
112
|
case 'nv-col.cjs':
|
|
112
113
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
113
114
|
/* webpackMode: "lazy" */
|
|
@@ -124,6 +125,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
124
125
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
125
126
|
/* webpackMode: "lazy" */
|
|
126
127
|
'./nv-dialog.cjs.entry.js')); }).then(processMod, consoleError);
|
|
128
|
+
case 'nv-fielddate.cjs':
|
|
129
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
130
|
+
/* webpackMode: "lazy" */
|
|
131
|
+
'./nv-fielddate.cjs.entry.js')); }).then(processMod, consoleError);
|
|
132
|
+
case 'nv-fielddaterange.cjs':
|
|
133
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
134
|
+
/* webpackMode: "lazy" */
|
|
135
|
+
'./nv-fielddaterange.cjs.entry.js')); }).then(processMod, consoleError);
|
|
127
136
|
case 'nv-fielddropdown.cjs':
|
|
128
137
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
129
138
|
/* webpackMode: "lazy" */
|
|
@@ -204,6 +213,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
204
213
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
205
214
|
/* webpackMode: "lazy" */
|
|
206
215
|
'./nv-tooltip.cjs.entry.js')); }).then(processMod, consoleError);
|
|
216
|
+
case 'nv-calendar.cjs':
|
|
217
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
218
|
+
/* webpackMode: "lazy" */
|
|
219
|
+
'./nv-calendar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
207
220
|
case 'nv-fieldcheckbox.cjs':
|
|
208
221
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
209
222
|
/* webpackMode: "lazy" */
|
|
@@ -212,18 +225,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
212
225
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
213
226
|
/* webpackMode: "lazy" */
|
|
214
227
|
'./nv-button.cjs.entry.js')); }).then(processMod, consoleError);
|
|
215
|
-
case 'nv-iconbutton.cjs':
|
|
216
|
-
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
217
|
-
/* webpackMode: "lazy" */
|
|
218
|
-
'./nv-iconbutton.cjs.entry.js')); }).then(processMod, consoleError);
|
|
219
228
|
case 'nv-popover.cjs':
|
|
220
229
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
221
230
|
/* webpackMode: "lazy" */
|
|
222
231
|
'./nv-popover.cjs.entry.js')); }).then(processMod, consoleError);
|
|
223
|
-
case 'nv-
|
|
232
|
+
case 'nv-iconbutton_2.cjs':
|
|
224
233
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
225
234
|
/* webpackMode: "lazy" */
|
|
226
|
-
'./nv-
|
|
235
|
+
'./nv-iconbutton_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
227
236
|
case 'nv-icon.cjs':
|
|
228
237
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
229
238
|
/* webpackMode: "lazy" */
|
|
@@ -236,12 +245,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
236
245
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
237
246
|
/* webpackMode: "lazy" */
|
|
238
247
|
`./${bundleId}.entry.js${""}`
|
|
239
|
-
)); }).then(
|
|
240
|
-
{
|
|
241
|
-
|
|
248
|
+
)); }).then(
|
|
249
|
+
(importedModule) => {
|
|
250
|
+
{
|
|
251
|
+
cmpModules.set(bundleId, importedModule);
|
|
252
|
+
}
|
|
253
|
+
return importedModule[exportName];
|
|
254
|
+
},
|
|
255
|
+
(e) => {
|
|
256
|
+
consoleError(e, hostRef.$hostElement$);
|
|
242
257
|
}
|
|
243
|
-
|
|
244
|
-
}, consoleError);
|
|
258
|
+
);
|
|
245
259
|
};
|
|
246
260
|
|
|
247
261
|
// src/client/client-style.ts
|
|
@@ -265,7 +279,6 @@ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
|
265
279
|
"formStateRestoreCallback"
|
|
266
280
|
];
|
|
267
281
|
var win = typeof window !== "undefined" ? window : {};
|
|
268
|
-
var doc = win.document || { head: {} };
|
|
269
282
|
var H = win.HTMLElement || class {
|
|
270
283
|
};
|
|
271
284
|
var plt = {
|
|
@@ -279,9 +292,10 @@ var plt = {
|
|
|
279
292
|
};
|
|
280
293
|
var supportsShadow = BUILD.shadowDom;
|
|
281
294
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
295
|
+
var _a;
|
|
282
296
|
let supportsListenerOptions2 = false;
|
|
283
297
|
try {
|
|
284
|
-
|
|
298
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
285
299
|
"e",
|
|
286
300
|
null,
|
|
287
301
|
Object.defineProperty({}, "passive", {
|
|
@@ -344,9 +358,9 @@ var isComplexType = (o) => {
|
|
|
344
358
|
};
|
|
345
359
|
|
|
346
360
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
347
|
-
function queryNonceMetaTagContent(
|
|
361
|
+
function queryNonceMetaTagContent(doc) {
|
|
348
362
|
var _a, _b, _c;
|
|
349
|
-
return (_c = (_b = (_a =
|
|
363
|
+
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;
|
|
350
364
|
}
|
|
351
365
|
|
|
352
366
|
// src/utils/result.ts
|
|
@@ -398,12 +412,11 @@ var unwrapErr = (result) => {
|
|
|
398
412
|
}
|
|
399
413
|
};
|
|
400
414
|
var updateFallbackSlotVisibility = (elm) => {
|
|
401
|
-
const childNodes = elm
|
|
415
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
402
416
|
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
403
417
|
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
404
|
-
var _a;
|
|
405
418
|
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
406
|
-
if ((
|
|
419
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
407
420
|
slotNode.hidden = true;
|
|
408
421
|
} else {
|
|
409
422
|
slotNode.hidden = false;
|
|
@@ -411,31 +424,44 @@ var updateFallbackSlotVisibility = (elm) => {
|
|
|
411
424
|
}
|
|
412
425
|
});
|
|
413
426
|
}
|
|
414
|
-
|
|
415
|
-
|
|
427
|
+
let i2 = 0;
|
|
428
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
429
|
+
const childNode = childNodes[i2];
|
|
430
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
416
431
|
updateFallbackSlotVisibility(childNode);
|
|
417
432
|
}
|
|
418
433
|
}
|
|
419
434
|
};
|
|
420
|
-
var
|
|
435
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
436
|
+
const result = [];
|
|
437
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
438
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
439
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
440
|
+
result.push(slottedNode);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return result;
|
|
444
|
+
};
|
|
445
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
421
446
|
let i2 = 0;
|
|
422
447
|
let slottedNodes = [];
|
|
423
448
|
let childNode;
|
|
424
449
|
for (; i2 < childNodes.length; i2++) {
|
|
425
450
|
childNode = childNodes[i2];
|
|
426
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (
|
|
451
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
427
452
|
slottedNodes.push(childNode);
|
|
428
453
|
if (typeof slotName !== "undefined") return slottedNodes;
|
|
429
454
|
}
|
|
430
455
|
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
431
456
|
}
|
|
432
457
|
return slottedNodes;
|
|
433
|
-
}
|
|
434
|
-
var
|
|
458
|
+
}
|
|
459
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
435
460
|
const childNodes = [];
|
|
436
|
-
if (includeSlot &&
|
|
437
|
-
|
|
438
|
-
|
|
461
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
462
|
+
let node = slot;
|
|
463
|
+
while (node = node.nextSibling) {
|
|
464
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
439
465
|
}
|
|
440
466
|
return childNodes;
|
|
441
467
|
};
|
|
@@ -455,37 +481,202 @@ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
|
455
481
|
return slotName === "";
|
|
456
482
|
};
|
|
457
483
|
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
458
|
-
let slottedNodeLocation;
|
|
459
484
|
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
460
|
-
|
|
461
|
-
} else {
|
|
462
|
-
slottedNodeLocation = document.createTextNode("");
|
|
463
|
-
slottedNodeLocation["s-nr"] = newChild;
|
|
485
|
+
return;
|
|
464
486
|
}
|
|
487
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
488
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
465
489
|
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
466
490
|
const parent = slotNode["s-cr"].parentNode;
|
|
467
|
-
const appendMethod = prepend ? parent
|
|
491
|
+
const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
|
|
468
492
|
if (typeof position !== "undefined") {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
482
|
-
}
|
|
493
|
+
slottedNodeLocation["s-oo"] = position;
|
|
494
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
495
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
496
|
+
childNodes.forEach((n) => {
|
|
497
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
498
|
+
});
|
|
499
|
+
slotRelocateNodes.sort((a, b) => {
|
|
500
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
501
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
502
|
+
return 0;
|
|
503
|
+
});
|
|
504
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
483
505
|
} else {
|
|
484
506
|
appendMethod.call(parent, slottedNodeLocation);
|
|
485
507
|
}
|
|
486
508
|
newChild["s-ol"] = slottedNodeLocation;
|
|
487
509
|
newChild["s-sh"] = slotNode["s-hn"];
|
|
488
510
|
};
|
|
511
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
512
|
+
function patchSlotNode(node) {
|
|
513
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
514
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
515
|
+
const toReturn = [];
|
|
516
|
+
const slotName = this["s-sn"];
|
|
517
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
518
|
+
console.error(`
|
|
519
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
520
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
521
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
522
|
+
`);
|
|
523
|
+
}
|
|
524
|
+
const parent = this["s-cr"].parentElement;
|
|
525
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
526
|
+
slottedNodes.forEach((n) => {
|
|
527
|
+
if (slotName === getSlotName(n)) {
|
|
528
|
+
toReturn.push(n);
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
if (elementsOnly) {
|
|
532
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
533
|
+
}
|
|
534
|
+
return toReturn;
|
|
535
|
+
}).bind(node);
|
|
536
|
+
node.assignedElements = assignedFactory(true);
|
|
537
|
+
node.assignedNodes = assignedFactory(false);
|
|
538
|
+
}
|
|
539
|
+
function dispatchSlotChangeEvent(elm) {
|
|
540
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
541
|
+
}
|
|
542
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
543
|
+
var _a;
|
|
544
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
545
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
546
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
547
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
548
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
549
|
+
return { slotNode, slotName };
|
|
550
|
+
}
|
|
551
|
+
var patchSlottedNode = (node) => {
|
|
552
|
+
if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
|
|
553
|
+
patchNextSibling(node);
|
|
554
|
+
patchPreviousSibling(node);
|
|
555
|
+
patchParentNode(node);
|
|
556
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
557
|
+
patchNextElementSibling(node);
|
|
558
|
+
patchPreviousElementSibling(node);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
var patchNextSibling = (node) => {
|
|
562
|
+
if (!node || node.__nextSibling) return;
|
|
563
|
+
patchHostOriginalAccessor("nextSibling", node);
|
|
564
|
+
Object.defineProperty(node, "nextSibling", {
|
|
565
|
+
get: function() {
|
|
566
|
+
var _a;
|
|
567
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
568
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
569
|
+
if (parentNodes && index > -1) {
|
|
570
|
+
return parentNodes[index + 1];
|
|
571
|
+
}
|
|
572
|
+
return this.__nextSibling;
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
};
|
|
576
|
+
var patchNextElementSibling = (element) => {
|
|
577
|
+
if (!element || element.__nextElementSibling) return;
|
|
578
|
+
patchHostOriginalAccessor("nextElementSibling", element);
|
|
579
|
+
Object.defineProperty(element, "nextElementSibling", {
|
|
580
|
+
get: function() {
|
|
581
|
+
var _a;
|
|
582
|
+
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
583
|
+
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
584
|
+
if (parentEles && index > -1) {
|
|
585
|
+
return parentEles[index + 1];
|
|
586
|
+
}
|
|
587
|
+
return this.__nextElementSibling;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
};
|
|
591
|
+
var patchPreviousSibling = (node) => {
|
|
592
|
+
if (!node || node.__previousSibling) return;
|
|
593
|
+
patchHostOriginalAccessor("previousSibling", node);
|
|
594
|
+
Object.defineProperty(node, "previousSibling", {
|
|
595
|
+
get: function() {
|
|
596
|
+
var _a;
|
|
597
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
598
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
599
|
+
if (parentNodes && index > -1) {
|
|
600
|
+
return parentNodes[index - 1];
|
|
601
|
+
}
|
|
602
|
+
return this.__previousSibling;
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
};
|
|
606
|
+
var patchPreviousElementSibling = (element) => {
|
|
607
|
+
if (!element || element.__previousElementSibling) return;
|
|
608
|
+
patchHostOriginalAccessor("previousElementSibling", element);
|
|
609
|
+
Object.defineProperty(element, "previousElementSibling", {
|
|
610
|
+
get: function() {
|
|
611
|
+
var _a;
|
|
612
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
613
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
614
|
+
if (parentNodes && index > -1) {
|
|
615
|
+
return parentNodes[index - 1];
|
|
616
|
+
}
|
|
617
|
+
return this.__previousElementSibling;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
};
|
|
621
|
+
var patchParentNode = (node) => {
|
|
622
|
+
if (!node || node.__parentNode) return;
|
|
623
|
+
patchHostOriginalAccessor("parentNode", node);
|
|
624
|
+
Object.defineProperty(node, "parentNode", {
|
|
625
|
+
get: function() {
|
|
626
|
+
var _a;
|
|
627
|
+
return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
|
|
628
|
+
},
|
|
629
|
+
set: function(value) {
|
|
630
|
+
this.__parentNode = value;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
};
|
|
634
|
+
var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
|
|
635
|
+
var validNodesPatches = [
|
|
636
|
+
"childNodes",
|
|
637
|
+
"firstChild",
|
|
638
|
+
"lastChild",
|
|
639
|
+
"nextSibling",
|
|
640
|
+
"previousSibling",
|
|
641
|
+
"textContent",
|
|
642
|
+
"parentNode"
|
|
643
|
+
];
|
|
644
|
+
function patchHostOriginalAccessor(accessorName, node) {
|
|
645
|
+
let accessor;
|
|
646
|
+
if (validElementPatches.includes(accessorName)) {
|
|
647
|
+
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
648
|
+
} else if (validNodesPatches.includes(accessorName)) {
|
|
649
|
+
accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
|
|
650
|
+
}
|
|
651
|
+
if (!accessor) {
|
|
652
|
+
accessor = Object.getOwnPropertyDescriptor(node, accessorName);
|
|
653
|
+
}
|
|
654
|
+
if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
|
|
655
|
+
}
|
|
656
|
+
function internalCall(node, method) {
|
|
657
|
+
if ("__" + method in node) {
|
|
658
|
+
const toReturn = node["__" + method];
|
|
659
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
660
|
+
return toReturn.bind(node);
|
|
661
|
+
} else {
|
|
662
|
+
if (typeof node[method] !== "function") return node[method];
|
|
663
|
+
return node[method].bind(node);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
var createTime = (fnName, tagName = "") => {
|
|
667
|
+
{
|
|
668
|
+
return () => {
|
|
669
|
+
return;
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
var uniqueTime = (key, measureText) => {
|
|
674
|
+
{
|
|
675
|
+
return () => {
|
|
676
|
+
return;
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
};
|
|
489
680
|
var h = (nodeName, vnodeData, ...children) => {
|
|
490
681
|
let child = null;
|
|
491
682
|
let key = null;
|
|
@@ -597,1172 +788,1133 @@ var convertToPrivate = (node) => {
|
|
|
597
788
|
vnode.$name$ = node.vname;
|
|
598
789
|
return vnode;
|
|
599
790
|
};
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
791
|
+
|
|
792
|
+
// src/runtime/client-hydrate.ts
|
|
793
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
794
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
795
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
796
|
+
const childRenderNodes = [];
|
|
797
|
+
const slotNodes = [];
|
|
798
|
+
const slottedNodes = [];
|
|
799
|
+
const shadowRootNodes = null;
|
|
800
|
+
const vnode = newVNode(tagName, null);
|
|
801
|
+
vnode.$elm$ = hostElm;
|
|
802
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
803
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
804
|
+
}
|
|
805
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
806
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
807
|
+
hostRef.$vnode$ = clientHydrate(
|
|
808
|
+
vnode,
|
|
809
|
+
childRenderNodes,
|
|
810
|
+
slotNodes,
|
|
811
|
+
shadowRootNodes,
|
|
812
|
+
hostElm,
|
|
813
|
+
hostElm,
|
|
814
|
+
hostId,
|
|
815
|
+
slottedNodes
|
|
816
|
+
);
|
|
817
|
+
let crIndex = 0;
|
|
818
|
+
const crLength = childRenderNodes.length;
|
|
819
|
+
let childRenderNode;
|
|
820
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
821
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
822
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
823
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
824
|
+
const node = childRenderNode.$elm$;
|
|
825
|
+
if (!shadowRoot) {
|
|
826
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
827
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
828
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
619
829
|
}
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}
|
|
830
|
+
}
|
|
831
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
832
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
833
|
+
if (childRenderNode.$children$) {
|
|
834
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
835
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
836
|
+
childRenderNode.$children$.forEach((c) => {
|
|
837
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
838
|
+
});
|
|
630
839
|
}
|
|
840
|
+
} else {
|
|
841
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
631
842
|
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
} else {
|
|
637
|
-
elm.style[prop] = newValue[prop];
|
|
638
|
-
}
|
|
639
|
-
}
|
|
843
|
+
}
|
|
844
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
845
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
846
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
640
847
|
}
|
|
641
|
-
|
|
642
|
-
if (
|
|
643
|
-
|
|
848
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
849
|
+
if (!shadowRoot) {
|
|
850
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
644
851
|
}
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
852
|
+
}
|
|
853
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
854
|
+
}
|
|
855
|
+
const hosts = [];
|
|
856
|
+
const snLen = slottedNodes.length;
|
|
857
|
+
let snIndex = 0;
|
|
858
|
+
let slotGroup;
|
|
859
|
+
let snGroupIdx;
|
|
860
|
+
let snGroupLen;
|
|
861
|
+
let slottedItem;
|
|
862
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
863
|
+
slotGroup = slottedNodes[snIndex];
|
|
864
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
865
|
+
snGroupLen = slotGroup.length;
|
|
866
|
+
snGroupIdx = 0;
|
|
867
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
868
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
869
|
+
if (!hosts[slottedItem.hostId]) {
|
|
870
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
652
871
|
}
|
|
653
|
-
if (
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
872
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
873
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
874
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
875
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
876
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
877
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
878
|
+
} else {
|
|
879
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
658
880
|
}
|
|
659
|
-
|
|
660
|
-
|
|
881
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
882
|
+
{
|
|
883
|
+
patchSlottedNode(slottedItem.node);
|
|
661
884
|
}
|
|
662
885
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
666
|
-
try {
|
|
667
|
-
if (!elm.tagName.includes("-")) {
|
|
668
|
-
const n = newValue == null ? "" : newValue;
|
|
669
|
-
if (memberName === "list") {
|
|
670
|
-
isProp = false;
|
|
671
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
|
672
|
-
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
673
|
-
elm[memberName] = n;
|
|
674
|
-
} else {
|
|
675
|
-
elm.setAttribute(memberName, n);
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
} else {
|
|
679
|
-
elm[memberName] = newValue;
|
|
680
|
-
}
|
|
681
|
-
} catch (e) {
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
if (newValue == null || newValue === false) {
|
|
685
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
686
|
-
{
|
|
687
|
-
elm.removeAttribute(memberName);
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
691
|
-
newValue = newValue === true ? "" : newValue;
|
|
692
|
-
{
|
|
693
|
-
elm.setAttribute(memberName, newValue);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
var parseClassListRegex = /\s/;
|
|
700
|
-
var parseClassList = (value) => {
|
|
701
|
-
if (typeof value === "object" && "baseVal" in value) {
|
|
702
|
-
value = value.baseVal;
|
|
703
|
-
}
|
|
704
|
-
if (!value) {
|
|
705
|
-
return [];
|
|
706
|
-
}
|
|
707
|
-
return value.split(parseClassListRegex);
|
|
708
|
-
};
|
|
709
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
710
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
711
|
-
|
|
712
|
-
// src/runtime/vdom/update-element.ts
|
|
713
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
714
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
715
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
716
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
717
|
-
{
|
|
718
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
719
|
-
if (!(memberName in newVnodeAttrs)) {
|
|
720
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
725
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
726
|
-
}
|
|
727
|
-
};
|
|
728
|
-
function sortedAttrNames(attrNames) {
|
|
729
|
-
return attrNames.includes("ref") ? (
|
|
730
|
-
// we need to sort these to ensure that `'ref'` is the last attr
|
|
731
|
-
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
732
|
-
) : (
|
|
733
|
-
// no need to sort, return the original array
|
|
734
|
-
attrNames
|
|
735
|
-
);
|
|
736
|
-
}
|
|
737
|
-
var contentRef;
|
|
738
|
-
var hostTagName;
|
|
739
|
-
var useNativeShadowDom = false;
|
|
740
|
-
var checkSlotFallbackVisibility = false;
|
|
741
|
-
var checkSlotRelocate = false;
|
|
742
|
-
var isSvgMode = false;
|
|
743
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
744
|
-
var _a;
|
|
745
|
-
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
746
|
-
let i2 = 0;
|
|
747
|
-
let elm;
|
|
748
|
-
let childNode;
|
|
749
|
-
let oldVNode;
|
|
750
|
-
if (!useNativeShadowDom) {
|
|
751
|
-
checkSlotRelocate = true;
|
|
752
|
-
if (newVNode2.$tag$ === "slot") {
|
|
753
|
-
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
754
|
-
// slot element has fallback content
|
|
755
|
-
// still create an element that "mocks" the slot element
|
|
756
|
-
2 /* isSlotFallback */
|
|
757
|
-
) : (
|
|
758
|
-
// slot element does not have fallback content
|
|
759
|
-
// create an html comment we'll use to always reference
|
|
760
|
-
// where actual slot content should sit next to
|
|
761
|
-
1 /* isSlotReference */
|
|
762
|
-
);
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
if (newVNode2.$text$ !== null) {
|
|
766
|
-
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
767
|
-
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
768
|
-
elm = newVNode2.$elm$ = doc.createTextNode("");
|
|
769
|
-
} else {
|
|
770
|
-
if (!isSvgMode) {
|
|
771
|
-
isSvgMode = newVNode2.$tag$ === "svg";
|
|
772
|
-
}
|
|
773
|
-
elm = newVNode2.$elm$ = doc.createElementNS(
|
|
774
|
-
isSvgMode ? SVG_NS : HTML_NS,
|
|
775
|
-
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
776
|
-
) ;
|
|
777
|
-
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
778
|
-
isSvgMode = false;
|
|
779
|
-
}
|
|
780
|
-
{
|
|
781
|
-
updateElement(null, newVNode2, isSvgMode);
|
|
782
|
-
}
|
|
783
|
-
if (newVNode2.$children$) {
|
|
784
|
-
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
785
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
786
|
-
if (childNode) {
|
|
787
|
-
elm.appendChild(childNode);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
{
|
|
792
|
-
if (newVNode2.$tag$ === "svg") {
|
|
793
|
-
isSvgMode = false;
|
|
794
|
-
} else if (elm.tagName === "foreignObject") {
|
|
795
|
-
isSvgMode = true;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
elm["s-hn"] = hostTagName;
|
|
800
|
-
{
|
|
801
|
-
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
802
|
-
elm["s-sr"] = true;
|
|
803
|
-
elm["s-cr"] = contentRef;
|
|
804
|
-
elm["s-sn"] = newVNode2.$name$ || "";
|
|
805
|
-
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
806
|
-
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
807
|
-
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
808
|
-
{
|
|
809
|
-
relocateToHostRoot(oldParentVNode.$elm$);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
return elm;
|
|
815
|
-
};
|
|
816
|
-
var relocateToHostRoot = (parentElm) => {
|
|
817
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
818
|
-
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
819
|
-
if (host != null) {
|
|
820
|
-
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
821
|
-
(ref) => ref["s-cr"]
|
|
822
|
-
);
|
|
823
|
-
const childNodeArray = Array.from(
|
|
824
|
-
parentElm.__childNodes || parentElm.childNodes
|
|
825
|
-
);
|
|
826
|
-
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
827
|
-
if (childNode["s-sh"] != null) {
|
|
828
|
-
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
829
|
-
childNode["s-sh"] = void 0;
|
|
830
|
-
checkSlotRelocate = true;
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
835
|
-
};
|
|
836
|
-
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
837
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
838
|
-
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
839
|
-
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
840
|
-
let node = parentElm;
|
|
841
|
-
while (node = node.nextSibling) {
|
|
842
|
-
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
843
|
-
oldSlotChildNodes.push(node);
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
848
|
-
const childNode = oldSlotChildNodes[i2];
|
|
849
|
-
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
850
|
-
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
851
|
-
childNode["s-ol"].remove();
|
|
852
|
-
childNode["s-ol"] = void 0;
|
|
853
|
-
childNode["s-sh"] = void 0;
|
|
854
|
-
checkSlotRelocate = true;
|
|
855
|
-
}
|
|
856
|
-
if (recursive) {
|
|
857
|
-
putBackInOriginalLocation(childNode, recursive);
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
861
|
-
};
|
|
862
|
-
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
863
|
-
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
864
|
-
let childNode;
|
|
865
|
-
for (; startIdx <= endIdx; ++startIdx) {
|
|
866
|
-
if (vnodes[startIdx]) {
|
|
867
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
868
|
-
if (childNode) {
|
|
869
|
-
vnodes[startIdx].$elm$ = childNode;
|
|
870
|
-
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
886
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
887
|
+
hostEle.appendChild(slottedItem.node);
|
|
871
888
|
}
|
|
872
889
|
}
|
|
873
890
|
}
|
|
891
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
892
|
+
hostRef.$hostElement$ = hostElm;
|
|
893
|
+
endHydrate();
|
|
874
894
|
};
|
|
875
|
-
var
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
895
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
896
|
+
let childNodeType;
|
|
897
|
+
let childIdSplt;
|
|
898
|
+
let childVNode;
|
|
899
|
+
let i2;
|
|
900
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
901
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
902
|
+
if (childNodeType) {
|
|
903
|
+
childIdSplt = childNodeType.split(".");
|
|
904
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
905
|
+
childVNode = createSimpleVNode({
|
|
906
|
+
$flags$: 0,
|
|
907
|
+
$hostId$: childIdSplt[0],
|
|
908
|
+
$nodeId$: childIdSplt[1],
|
|
909
|
+
$depth$: childIdSplt[2],
|
|
910
|
+
$index$: childIdSplt[3],
|
|
911
|
+
$tag$: node.tagName.toLowerCase(),
|
|
912
|
+
$elm$: node,
|
|
913
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
914
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
915
|
+
$attrs$: { class: node.className || "" }
|
|
916
|
+
});
|
|
917
|
+
childRenderNodes.push(childVNode);
|
|
918
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
919
|
+
if (!parentVNode.$children$) {
|
|
920
|
+
parentVNode.$children$ = [];
|
|
889
921
|
}
|
|
890
|
-
elm
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
let newStartVnode = newCh[0];
|
|
905
|
-
let newEndVnode = newCh[newEndIdx];
|
|
906
|
-
let node;
|
|
907
|
-
let elmToMove;
|
|
908
|
-
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
909
|
-
if (oldStartVnode == null) {
|
|
910
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
911
|
-
} else if (oldEndVnode == null) {
|
|
912
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
913
|
-
} else if (newStartVnode == null) {
|
|
914
|
-
newStartVnode = newCh[++newStartIdx];
|
|
915
|
-
} else if (newEndVnode == null) {
|
|
916
|
-
newEndVnode = newCh[--newEndIdx];
|
|
917
|
-
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
918
|
-
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
919
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
920
|
-
newStartVnode = newCh[++newStartIdx];
|
|
921
|
-
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
922
|
-
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
923
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
924
|
-
newEndVnode = newCh[--newEndIdx];
|
|
925
|
-
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
926
|
-
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
927
|
-
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
928
|
-
}
|
|
929
|
-
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
930
|
-
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
931
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
932
|
-
newEndVnode = newCh[--newEndIdx];
|
|
933
|
-
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
934
|
-
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
935
|
-
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
936
|
-
}
|
|
937
|
-
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
938
|
-
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
939
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
940
|
-
newStartVnode = newCh[++newStartIdx];
|
|
941
|
-
} else {
|
|
942
|
-
idxInOld = -1;
|
|
943
|
-
{
|
|
944
|
-
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
945
|
-
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
946
|
-
idxInOld = i2;
|
|
947
|
-
break;
|
|
922
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
923
|
+
if (typeof slotName === "string") {
|
|
924
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
925
|
+
addSlot(
|
|
926
|
+
slotName,
|
|
927
|
+
childIdSplt[2],
|
|
928
|
+
childVNode,
|
|
929
|
+
node,
|
|
930
|
+
parentVNode,
|
|
931
|
+
childRenderNodes,
|
|
932
|
+
slotNodes,
|
|
933
|
+
shadowRootNodes,
|
|
934
|
+
slottedNodes
|
|
935
|
+
);
|
|
948
936
|
}
|
|
937
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
938
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
949
939
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
elmToMove = oldCh[idxInOld];
|
|
953
|
-
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
954
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
955
|
-
} else {
|
|
956
|
-
patch(elmToMove, newStartVnode, isInitialRender);
|
|
957
|
-
oldCh[idxInOld] = void 0;
|
|
958
|
-
node = elmToMove.$elm$;
|
|
959
|
-
}
|
|
960
|
-
newStartVnode = newCh[++newStartIdx];
|
|
961
|
-
} else {
|
|
962
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
963
|
-
newStartVnode = newCh[++newStartIdx];
|
|
964
|
-
}
|
|
965
|
-
if (node) {
|
|
966
|
-
{
|
|
967
|
-
insertBefore(
|
|
968
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
969
|
-
node,
|
|
970
|
-
referenceNode(oldStartVnode.$elm$)
|
|
971
|
-
);
|
|
940
|
+
if (childVNode.$index$ !== void 0) {
|
|
941
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
972
942
|
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
if (oldStartIdx > oldEndIdx) {
|
|
977
|
-
addVnodes(
|
|
978
|
-
parentElm,
|
|
979
|
-
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
980
|
-
newVNode2,
|
|
981
|
-
newCh,
|
|
982
|
-
newStartIdx,
|
|
983
|
-
newEndIdx
|
|
984
|
-
);
|
|
985
|
-
} else if (newStartIdx > newEndIdx) {
|
|
986
|
-
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
|
-
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
990
|
-
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
991
|
-
if (leftVNode.$tag$ === "slot") {
|
|
992
|
-
return leftVNode.$name$ === rightVNode.$name$;
|
|
993
|
-
}
|
|
994
|
-
if (!isInitialRender) {
|
|
995
|
-
return leftVNode.$key$ === rightVNode.$key$;
|
|
996
|
-
}
|
|
997
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
998
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
999
|
-
}
|
|
1000
|
-
return true;
|
|
1001
|
-
}
|
|
1002
|
-
return false;
|
|
1003
|
-
};
|
|
1004
|
-
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
1005
|
-
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1006
|
-
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1007
|
-
const oldChildren = oldVNode.$children$;
|
|
1008
|
-
const newChildren = newVNode2.$children$;
|
|
1009
|
-
const tag = newVNode2.$tag$;
|
|
1010
|
-
const text = newVNode2.$text$;
|
|
1011
|
-
let defaultHolder;
|
|
1012
|
-
if (text === null) {
|
|
1013
|
-
{
|
|
1014
|
-
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1015
|
-
}
|
|
1016
|
-
{
|
|
1017
|
-
if (tag === "slot" && !useNativeShadowDom) {
|
|
1018
|
-
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1019
|
-
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1020
|
-
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
943
|
+
parentVNode = childVNode;
|
|
944
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
945
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1021
946
|
}
|
|
1022
|
-
} else {
|
|
1023
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1024
947
|
}
|
|
1025
948
|
}
|
|
1026
|
-
if (
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
949
|
+
if (node.shadowRoot) {
|
|
950
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
951
|
+
clientHydrate(
|
|
952
|
+
parentVNode,
|
|
953
|
+
childRenderNodes,
|
|
954
|
+
slotNodes,
|
|
955
|
+
shadowRootNodes,
|
|
956
|
+
hostElm,
|
|
957
|
+
node.shadowRoot.childNodes[i2],
|
|
958
|
+
hostId,
|
|
959
|
+
slottedNodes
|
|
960
|
+
);
|
|
1031
961
|
}
|
|
1032
|
-
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1033
|
-
} else if (
|
|
1034
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
1035
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1036
|
-
) {
|
|
1037
|
-
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1038
962
|
}
|
|
1039
|
-
|
|
1040
|
-
|
|
963
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
964
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
965
|
+
clientHydrate(
|
|
966
|
+
parentVNode,
|
|
967
|
+
childRenderNodes,
|
|
968
|
+
slotNodes,
|
|
969
|
+
shadowRootNodes,
|
|
970
|
+
hostElm,
|
|
971
|
+
nonShadowNodes[i2],
|
|
972
|
+
hostId,
|
|
973
|
+
slottedNodes
|
|
974
|
+
);
|
|
1041
975
|
}
|
|
1042
|
-
} else if (
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
} else {
|
|
1069
|
-
node["s-sh"] = childNode["s-hn"];
|
|
1070
|
-
relocateNodes.push({
|
|
1071
|
-
$slotRefNode$: childNode,
|
|
1072
|
-
$nodeToRelocate$: node
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
if (node["s-sr"]) {
|
|
1076
|
-
relocateNodes.map((relocateNode) => {
|
|
1077
|
-
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
1078
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1079
|
-
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1080
|
-
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
});
|
|
976
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
977
|
+
childIdSplt = node.nodeValue.split(".");
|
|
978
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
979
|
+
childNodeType = childIdSplt[0];
|
|
980
|
+
childVNode = createSimpleVNode({
|
|
981
|
+
$hostId$: childIdSplt[1],
|
|
982
|
+
$nodeId$: childIdSplt[2],
|
|
983
|
+
$depth$: childIdSplt[3],
|
|
984
|
+
$index$: childIdSplt[4] || "0",
|
|
985
|
+
$elm$: node,
|
|
986
|
+
$attrs$: null,
|
|
987
|
+
$children$: null,
|
|
988
|
+
$key$: null,
|
|
989
|
+
$name$: null,
|
|
990
|
+
$tag$: null,
|
|
991
|
+
$text$: null
|
|
992
|
+
});
|
|
993
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
994
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
995
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
996
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
997
|
+
childRenderNodes.push(childVNode);
|
|
998
|
+
node.remove();
|
|
999
|
+
if (hostId === childVNode.$hostId$) {
|
|
1000
|
+
if (!parentVNode.$children$) {
|
|
1001
|
+
parentVNode.$children$ = [];
|
|
1084
1002
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1003
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1004
|
+
}
|
|
1005
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1006
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1010
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
1011
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1012
|
+
childRenderNodes.push(childVNode);
|
|
1013
|
+
node.remove();
|
|
1014
|
+
}
|
|
1015
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
1016
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
1017
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
1018
|
+
addSlot(
|
|
1019
|
+
slotName,
|
|
1020
|
+
childIdSplt[2],
|
|
1021
|
+
childVNode,
|
|
1022
|
+
node,
|
|
1023
|
+
parentVNode,
|
|
1024
|
+
childRenderNodes,
|
|
1025
|
+
slotNodes,
|
|
1026
|
+
shadowRootNodes,
|
|
1027
|
+
slottedNodes
|
|
1028
|
+
);
|
|
1029
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1030
|
+
{
|
|
1031
|
+
hostElm["s-cr"] = node;
|
|
1032
|
+
node["s-cn"] = true;
|
|
1089
1033
|
}
|
|
1090
1034
|
}
|
|
1091
1035
|
}
|
|
1092
1036
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1037
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1038
|
+
const vnode = newVNode(null, node.textContent);
|
|
1039
|
+
vnode.$elm$ = node;
|
|
1040
|
+
vnode.$index$ = "0";
|
|
1041
|
+
parentVNode.$children$ = [vnode];
|
|
1042
|
+
} else {
|
|
1043
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1044
|
+
node.remove();
|
|
1095
1045
|
}
|
|
1096
1046
|
}
|
|
1047
|
+
return parentVNode;
|
|
1097
1048
|
};
|
|
1098
|
-
var
|
|
1049
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1050
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1051
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1052
|
+
if (componentId) {
|
|
1053
|
+
orgLocNodes.set(componentId, node);
|
|
1054
|
+
}
|
|
1055
|
+
let i2 = 0;
|
|
1056
|
+
if (node.shadowRoot) {
|
|
1057
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1058
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1062
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1063
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1064
|
+
}
|
|
1065
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1066
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
1067
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1068
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1069
|
+
node.nodeValue = "";
|
|
1070
|
+
node["s-en"] = childIdSplt[3];
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
var createSimpleVNode = (vnode) => {
|
|
1075
|
+
const defaultVNode = {
|
|
1076
|
+
$flags$: 0,
|
|
1077
|
+
$hostId$: null,
|
|
1078
|
+
$nodeId$: null,
|
|
1079
|
+
$depth$: null,
|
|
1080
|
+
$index$: "0",
|
|
1081
|
+
$elm$: null,
|
|
1082
|
+
$attrs$: null,
|
|
1083
|
+
$children$: null,
|
|
1084
|
+
$key$: null,
|
|
1085
|
+
$name$: null,
|
|
1086
|
+
$tag$: null,
|
|
1087
|
+
$text$: null
|
|
1088
|
+
};
|
|
1089
|
+
return { ...defaultVNode, ...vnode };
|
|
1090
|
+
};
|
|
1091
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1092
|
+
node["s-sr"] = true;
|
|
1093
|
+
childVNode.$name$ = slotName || null;
|
|
1094
|
+
childVNode.$tag$ = "slot";
|
|
1095
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1099
1096
|
{
|
|
1100
|
-
|
|
1101
|
-
|
|
1097
|
+
const slot = childVNode.$elm$;
|
|
1098
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1099
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1100
|
+
patchSlotNode(node);
|
|
1101
|
+
if (shouldMove) {
|
|
1102
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1103
|
+
}
|
|
1104
|
+
childRenderNodes.push(childVNode);
|
|
1105
|
+
}
|
|
1106
|
+
slotNodes.push(childVNode);
|
|
1107
|
+
if (!parentVNode.$children$) {
|
|
1108
|
+
parentVNode.$children$ = [];
|
|
1109
|
+
}
|
|
1110
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1111
|
+
}
|
|
1112
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1113
|
+
let slottedNode = slotNode.nextSibling;
|
|
1114
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1115
|
+
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 */))) {
|
|
1116
|
+
slottedNode["s-sn"] = slotName;
|
|
1117
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1118
|
+
slottedNode = slottedNode.nextSibling;
|
|
1102
1119
|
}
|
|
1103
1120
|
};
|
|
1104
|
-
var
|
|
1105
|
-
|
|
1106
|
-
|
|
1121
|
+
var findCorrespondingNode = (node, type) => {
|
|
1122
|
+
let sibling = node;
|
|
1123
|
+
do {
|
|
1124
|
+
sibling = sibling.nextSibling;
|
|
1125
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1126
|
+
return sibling;
|
|
1107
1127
|
};
|
|
1108
|
-
var
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1128
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
1129
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1130
|
+
if (propType & 4 /* Boolean */) {
|
|
1131
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1132
|
+
}
|
|
1133
|
+
if (propType & 2 /* Number */) {
|
|
1134
|
+
return parseFloat(propValue);
|
|
1135
|
+
}
|
|
1136
|
+
if (propType & 1 /* String */) {
|
|
1137
|
+
return String(propValue);
|
|
1138
|
+
}
|
|
1139
|
+
return propValue;
|
|
1120
1140
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1141
|
+
return propValue;
|
|
1142
|
+
};
|
|
1143
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
1144
|
+
|
|
1145
|
+
// src/runtime/event-emitter.ts
|
|
1146
|
+
var createEvent = (ref, name, flags) => {
|
|
1147
|
+
const elm = getElement(ref);
|
|
1148
|
+
return {
|
|
1149
|
+
emit: (detail) => {
|
|
1150
|
+
return emitEvent(elm, name, {
|
|
1151
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1152
|
+
composed: !!(flags & 2 /* Composed */),
|
|
1153
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1154
|
+
detail
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
};
|
|
1159
|
+
var emitEvent = (elm, name, opts) => {
|
|
1160
|
+
const ev = plt.ce(name, opts);
|
|
1161
|
+
elm.dispatchEvent(ev);
|
|
1162
|
+
return ev;
|
|
1163
|
+
};
|
|
1164
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1165
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1166
|
+
let style = styles.get(scopeId2);
|
|
1167
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
1168
|
+
style = style || new CSSStyleSheet();
|
|
1169
|
+
if (typeof style === "string") {
|
|
1170
|
+
style = cssText;
|
|
1171
|
+
} else {
|
|
1172
|
+
style.replaceSync(cssText);
|
|
1126
1173
|
}
|
|
1174
|
+
} else {
|
|
1175
|
+
style = cssText;
|
|
1127
1176
|
}
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1177
|
+
styles.set(scopeId2, style);
|
|
1178
|
+
};
|
|
1179
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1180
|
+
var _a;
|
|
1181
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1182
|
+
const style = styles.get(scopeId2);
|
|
1183
|
+
if (!win.document) {
|
|
1184
|
+
return scopeId2;
|
|
1136
1185
|
}
|
|
1137
|
-
|
|
1138
|
-
{
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
const orgLocationNode = doc.createTextNode("");
|
|
1146
|
-
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1147
|
-
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1148
|
-
}
|
|
1186
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1187
|
+
if (style) {
|
|
1188
|
+
if (typeof style === "string") {
|
|
1189
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1190
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1191
|
+
let styleElm;
|
|
1192
|
+
if (!appliedStyles) {
|
|
1193
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1149
1194
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1160
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1161
|
-
refNode = refNode.nextSibling;
|
|
1162
|
-
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1163
|
-
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1164
|
-
}
|
|
1165
|
-
if (!refNode || !refNode["s-nr"]) {
|
|
1166
|
-
insertBeforeNode = refNode;
|
|
1167
|
-
break;
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
orgLocationNode = orgLocationNode.previousSibling;
|
|
1171
|
-
}
|
|
1195
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1196
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1197
|
+
styleElm.innerHTML = style;
|
|
1198
|
+
} else {
|
|
1199
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
1200
|
+
styleElm.innerHTML = style;
|
|
1201
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1202
|
+
if (nonce != null) {
|
|
1203
|
+
styleElm.setAttribute("nonce", nonce);
|
|
1172
1204
|
}
|
|
1173
|
-
if (!
|
|
1174
|
-
if (
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1205
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1206
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1207
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1208
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1209
|
+
styleContainerNode.insertBefore(
|
|
1210
|
+
styleElm,
|
|
1211
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1212
|
+
);
|
|
1213
|
+
} else if ("host" in styleContainerNode) {
|
|
1214
|
+
if (supportsConstructableStylesheets) {
|
|
1215
|
+
const stylesheet = new CSSStyleSheet();
|
|
1216
|
+
stylesheet.replaceSync(style);
|
|
1217
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1218
|
+
} else {
|
|
1219
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1220
|
+
if (existingStyleContainer) {
|
|
1221
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1222
|
+
} else {
|
|
1223
|
+
styleContainerNode.prepend(styleElm);
|
|
1224
|
+
}
|
|
1178
1225
|
}
|
|
1226
|
+
} else {
|
|
1227
|
+
styleContainerNode.append(styleElm);
|
|
1179
1228
|
}
|
|
1180
1229
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1184
|
-
if (isInitialLoad) {
|
|
1185
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1186
|
-
}
|
|
1187
|
-
nodeToRelocate.hidden = true;
|
|
1230
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1231
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1188
1232
|
}
|
|
1189
1233
|
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1196
|
-
relocateNodes.length = 0;
|
|
1197
|
-
}
|
|
1198
|
-
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1199
|
-
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1200
|
-
for (const childNode of children) {
|
|
1201
|
-
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1202
|
-
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1203
|
-
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1234
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1235
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1236
|
+
}
|
|
1237
|
+
if (appliedStyles) {
|
|
1238
|
+
appliedStyles.add(scopeId2);
|
|
1204
1239
|
}
|
|
1205
|
-
childNode.hidden = true;
|
|
1206
1240
|
}
|
|
1241
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1242
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1207
1243
|
}
|
|
1208
1244
|
}
|
|
1209
|
-
|
|
1245
|
+
return scopeId2;
|
|
1210
1246
|
};
|
|
1211
|
-
var
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1247
|
+
var attachStyles = (hostRef) => {
|
|
1248
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1249
|
+
const elm = hostRef.$hostElement$;
|
|
1250
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1251
|
+
addStyle(
|
|
1252
|
+
elm.getRootNode(),
|
|
1253
|
+
cmpMeta);
|
|
1254
|
+
endAttachStyles();
|
|
1219
1255
|
};
|
|
1220
|
-
var
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1256
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1257
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1258
|
+
if (oldValue === newValue) {
|
|
1259
|
+
return;
|
|
1260
|
+
}
|
|
1261
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1262
|
+
let ln = memberName.toLowerCase();
|
|
1263
|
+
if (memberName === "class") {
|
|
1264
|
+
const classList = elm.classList;
|
|
1265
|
+
const oldClasses = parseClassList(oldValue);
|
|
1266
|
+
let newClasses = parseClassList(newValue);
|
|
1267
|
+
if (elm["s-si"] && initialRender) {
|
|
1268
|
+
newClasses.push(elm["s-si"]);
|
|
1269
|
+
oldClasses.forEach((c) => {
|
|
1270
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1271
|
+
});
|
|
1272
|
+
newClasses = [...new Set(newClasses)];
|
|
1273
|
+
classList.add(...newClasses);
|
|
1274
|
+
} else {
|
|
1275
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
1276
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
1277
|
+
}
|
|
1278
|
+
} else if (memberName === "style") {
|
|
1279
|
+
{
|
|
1280
|
+
for (const prop in oldValue) {
|
|
1281
|
+
if (!newValue || newValue[prop] == null) {
|
|
1282
|
+
if (prop.includes("-")) {
|
|
1283
|
+
elm.style.removeProperty(prop);
|
|
1284
|
+
} else {
|
|
1285
|
+
elm.style[prop] = "";
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1230
1288
|
}
|
|
1231
|
-
return this.__nextSibling;
|
|
1232
1289
|
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
var _a;
|
|
1241
|
-
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
1242
|
-
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
1243
|
-
if (parentEles && index > -1) {
|
|
1244
|
-
return parentEles[index + 1];
|
|
1290
|
+
for (const prop in newValue) {
|
|
1291
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1292
|
+
if (prop.includes("-")) {
|
|
1293
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1294
|
+
} else {
|
|
1295
|
+
elm.style[prop] = newValue[prop];
|
|
1296
|
+
}
|
|
1245
1297
|
}
|
|
1246
|
-
return this.__nextElementSibling;
|
|
1247
1298
|
}
|
|
1248
|
-
});
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1299
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1300
|
+
if (newValue) {
|
|
1301
|
+
newValue(elm);
|
|
1302
|
+
}
|
|
1303
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1304
|
+
if (memberName[2] === "-") {
|
|
1305
|
+
memberName = memberName.slice(3);
|
|
1306
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1307
|
+
memberName = ln.slice(2);
|
|
1308
|
+
} else {
|
|
1309
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1310
|
+
}
|
|
1311
|
+
if (oldValue || newValue) {
|
|
1312
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1313
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1314
|
+
if (oldValue) {
|
|
1315
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1316
|
+
}
|
|
1317
|
+
if (newValue) {
|
|
1318
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1260
1319
|
}
|
|
1261
|
-
return this.__previousSibling;
|
|
1262
1320
|
}
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1321
|
+
} else {
|
|
1322
|
+
const isComplex = isComplexType(newValue);
|
|
1323
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1324
|
+
try {
|
|
1325
|
+
if (!elm.tagName.includes("-")) {
|
|
1326
|
+
const n = newValue == null ? "" : newValue;
|
|
1327
|
+
if (memberName === "list") {
|
|
1328
|
+
isProp = false;
|
|
1329
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1330
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
1331
|
+
elm[memberName] = n;
|
|
1332
|
+
} else {
|
|
1333
|
+
elm.setAttribute(memberName, n);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
} else if (elm[memberName] !== newValue) {
|
|
1337
|
+
elm[memberName] = newValue;
|
|
1338
|
+
}
|
|
1339
|
+
} catch (e) {
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
if (newValue == null || newValue === false) {
|
|
1343
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
1344
|
+
{
|
|
1345
|
+
elm.removeAttribute(memberName);
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1349
|
+
newValue = newValue === true ? "" : newValue;
|
|
1350
|
+
{
|
|
1351
|
+
elm.setAttribute(memberName, newValue);
|
|
1275
1352
|
}
|
|
1276
|
-
return this.__previousElementSibling;
|
|
1277
1353
|
}
|
|
1278
|
-
});
|
|
1279
|
-
};
|
|
1280
|
-
var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
|
|
1281
|
-
var validNodesPatches = [
|
|
1282
|
-
"childNodes",
|
|
1283
|
-
"firstChild",
|
|
1284
|
-
"lastChild",
|
|
1285
|
-
"nextSibling",
|
|
1286
|
-
"previousSibling",
|
|
1287
|
-
"textContent"
|
|
1288
|
-
];
|
|
1289
|
-
function patchHostOriginalAccessor(accessorName, node) {
|
|
1290
|
-
let accessor;
|
|
1291
|
-
if (validElementPatches.includes(accessorName)) {
|
|
1292
|
-
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
1293
|
-
} else if (validNodesPatches.includes(accessorName)) {
|
|
1294
|
-
accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
|
|
1295
1354
|
}
|
|
1296
|
-
|
|
1297
|
-
|
|
1355
|
+
};
|
|
1356
|
+
var parseClassListRegex = /\s/;
|
|
1357
|
+
var parseClassList = (value) => {
|
|
1358
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1359
|
+
value = value.baseVal;
|
|
1298
1360
|
}
|
|
1299
|
-
if (
|
|
1300
|
-
|
|
1301
|
-
var createTime = (fnName, tagName = "") => {
|
|
1302
|
-
{
|
|
1303
|
-
return () => {
|
|
1304
|
-
return;
|
|
1305
|
-
};
|
|
1361
|
+
if (!value || typeof value !== "string") {
|
|
1362
|
+
return [];
|
|
1306
1363
|
}
|
|
1364
|
+
return value.split(parseClassListRegex);
|
|
1307
1365
|
};
|
|
1308
|
-
var
|
|
1366
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
1367
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
1368
|
+
|
|
1369
|
+
// src/runtime/vdom/update-element.ts
|
|
1370
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
1371
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
1372
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1373
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
1309
1374
|
{
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1375
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
1376
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
1377
|
+
setAccessor(
|
|
1378
|
+
elm,
|
|
1379
|
+
memberName,
|
|
1380
|
+
oldVnodeAttrs[memberName],
|
|
1381
|
+
void 0,
|
|
1382
|
+
isSvgMode2,
|
|
1383
|
+
newVnode.$flags$,
|
|
1384
|
+
isInitialRender
|
|
1385
|
+
);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1313
1388
|
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
const vnode = newVNode(tagName, null);
|
|
1325
|
-
vnode.$elm$ = hostElm;
|
|
1326
|
-
if (!plt.$orgLocNodes$) {
|
|
1327
|
-
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1389
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
1390
|
+
setAccessor(
|
|
1391
|
+
elm,
|
|
1392
|
+
memberName,
|
|
1393
|
+
oldVnodeAttrs[memberName],
|
|
1394
|
+
newVnodeAttrs[memberName],
|
|
1395
|
+
isSvgMode2,
|
|
1396
|
+
newVnode.$flags$,
|
|
1397
|
+
isInitialRender
|
|
1398
|
+
);
|
|
1328
1399
|
}
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
hostElm,
|
|
1338
|
-
hostId,
|
|
1339
|
-
slottedNodes
|
|
1400
|
+
};
|
|
1401
|
+
function sortedAttrNames(attrNames) {
|
|
1402
|
+
return attrNames.includes("ref") ? (
|
|
1403
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
1404
|
+
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
1405
|
+
) : (
|
|
1406
|
+
// no need to sort, return the original array
|
|
1407
|
+
attrNames
|
|
1340
1408
|
);
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1409
|
+
}
|
|
1410
|
+
var contentRef;
|
|
1411
|
+
var hostTagName;
|
|
1412
|
+
var useNativeShadowDom = false;
|
|
1413
|
+
var checkSlotFallbackVisibility = false;
|
|
1414
|
+
var checkSlotRelocate = false;
|
|
1415
|
+
var isSvgMode = false;
|
|
1416
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
1417
|
+
var _a;
|
|
1418
|
+
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
1419
|
+
let i2 = 0;
|
|
1420
|
+
let elm;
|
|
1421
|
+
let childNode;
|
|
1422
|
+
let oldVNode;
|
|
1423
|
+
if (!useNativeShadowDom) {
|
|
1424
|
+
checkSlotRelocate = true;
|
|
1425
|
+
if (newVNode2.$tag$ === "slot") {
|
|
1426
|
+
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
1427
|
+
// slot element has fallback content
|
|
1428
|
+
// still create an element that "mocks" the slot element
|
|
1429
|
+
2 /* isSlotFallback */
|
|
1430
|
+
) : (
|
|
1431
|
+
// slot element does not have fallback content
|
|
1432
|
+
// create an html comment we'll use to always reference
|
|
1433
|
+
// where actual slot content should sit next to
|
|
1434
|
+
1 /* isSlotReference */
|
|
1435
|
+
);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
if (newVNode2.$text$ !== null) {
|
|
1439
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
1440
|
+
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
1441
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1442
|
+
{
|
|
1443
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1444
|
+
}
|
|
1445
|
+
} else {
|
|
1446
|
+
if (!isSvgMode) {
|
|
1447
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
1448
|
+
}
|
|
1449
|
+
if (!win.document) {
|
|
1450
|
+
throw new Error(
|
|
1451
|
+
"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."
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
1455
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
1456
|
+
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
1457
|
+
) ;
|
|
1458
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
1459
|
+
isSvgMode = false;
|
|
1354
1460
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1461
|
+
{
|
|
1462
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1463
|
+
}
|
|
1464
|
+
if (newVNode2.$children$) {
|
|
1465
|
+
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
1466
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
1467
|
+
if (childNode) {
|
|
1468
|
+
elm.appendChild(childNode);
|
|
1362
1469
|
}
|
|
1363
|
-
} else {
|
|
1364
|
-
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
1365
1470
|
}
|
|
1366
1471
|
}
|
|
1367
|
-
|
|
1368
|
-
if (
|
|
1369
|
-
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
if (!shadowRoot) {
|
|
1373
|
-
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1472
|
+
{
|
|
1473
|
+
if (newVNode2.$tag$ === "svg") {
|
|
1474
|
+
isSvgMode = false;
|
|
1475
|
+
} else if (elm.tagName === "foreignObject") {
|
|
1476
|
+
isSvgMode = true;
|
|
1374
1477
|
}
|
|
1375
1478
|
}
|
|
1376
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1377
1479
|
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
snGroupLen = slotGroup.length;
|
|
1389
|
-
snGroupIdx = 0;
|
|
1390
|
-
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1391
|
-
slottedItem = slotGroup[snGroupIdx];
|
|
1392
|
-
if (!hosts[slottedItem.hostId]) {
|
|
1393
|
-
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1394
|
-
}
|
|
1395
|
-
if (!hosts[slottedItem.hostId]) continue;
|
|
1396
|
-
const hostEle = hosts[slottedItem.hostId];
|
|
1397
|
-
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1398
|
-
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1399
|
-
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1400
|
-
slottedItem.slot["s-cr"] = hostEle;
|
|
1401
|
-
} else {
|
|
1402
|
-
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1403
|
-
}
|
|
1404
|
-
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1480
|
+
elm["s-hn"] = hostTagName;
|
|
1481
|
+
{
|
|
1482
|
+
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
1483
|
+
elm["s-sr"] = true;
|
|
1484
|
+
elm["s-cr"] = contentRef;
|
|
1485
|
+
elm["s-sn"] = newVNode2.$name$ || "";
|
|
1486
|
+
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1487
|
+
patchSlotNode(elm);
|
|
1488
|
+
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
1489
|
+
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
1405
1490
|
{
|
|
1406
|
-
|
|
1491
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
1407
1492
|
}
|
|
1408
1493
|
}
|
|
1409
|
-
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1410
|
-
hostEle.appendChild(slottedItem.node);
|
|
1411
|
-
}
|
|
1412
1494
|
}
|
|
1413
1495
|
}
|
|
1414
|
-
|
|
1415
|
-
endHydrate();
|
|
1496
|
+
return elm;
|
|
1416
1497
|
};
|
|
1417
|
-
var
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
$index$: childIdSplt[3],
|
|
1433
|
-
$tag$: node.tagName.toLowerCase(),
|
|
1434
|
-
$elm$: node,
|
|
1435
|
-
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
1436
|
-
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
1437
|
-
$attrs$: { class: node.className || "" }
|
|
1438
|
-
});
|
|
1439
|
-
childRenderNodes.push(childVNode);
|
|
1440
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1441
|
-
if (!parentVNode.$children$) {
|
|
1442
|
-
parentVNode.$children$ = [];
|
|
1443
|
-
}
|
|
1444
|
-
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1445
|
-
if (typeof slotName === "string") {
|
|
1446
|
-
if (childVNode.$tag$ === "slot-fb") {
|
|
1447
|
-
addSlot(
|
|
1448
|
-
slotName,
|
|
1449
|
-
childIdSplt[2],
|
|
1450
|
-
childVNode,
|
|
1451
|
-
node,
|
|
1452
|
-
parentVNode,
|
|
1453
|
-
childRenderNodes,
|
|
1454
|
-
slotNodes,
|
|
1455
|
-
shadowRootNodes,
|
|
1456
|
-
slottedNodes
|
|
1457
|
-
);
|
|
1458
|
-
}
|
|
1459
|
-
childVNode.$elm$["s-sn"] = slotName;
|
|
1460
|
-
childVNode.$elm$.removeAttribute("s-sn");
|
|
1461
|
-
}
|
|
1462
|
-
if (childVNode.$index$ !== void 0) {
|
|
1463
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1464
|
-
}
|
|
1465
|
-
parentVNode = childVNode;
|
|
1466
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1467
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1468
|
-
}
|
|
1498
|
+
var relocateToHostRoot = (parentElm) => {
|
|
1499
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1500
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
1501
|
+
if (host != null) {
|
|
1502
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
1503
|
+
(ref) => ref["s-cr"]
|
|
1504
|
+
);
|
|
1505
|
+
const childNodeArray = Array.from(
|
|
1506
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
1507
|
+
);
|
|
1508
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
1509
|
+
if (childNode["s-sh"] != null) {
|
|
1510
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
1511
|
+
childNode["s-sh"] = void 0;
|
|
1512
|
+
checkSlotRelocate = true;
|
|
1469
1513
|
}
|
|
1470
1514
|
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
);
|
|
1515
|
+
}
|
|
1516
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1517
|
+
};
|
|
1518
|
+
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
1519
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1520
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1521
|
+
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
1522
|
+
let node = parentElm;
|
|
1523
|
+
while (node = node.nextSibling) {
|
|
1524
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1525
|
+
oldSlotChildNodes.push(node);
|
|
1483
1526
|
}
|
|
1484
1527
|
}
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
hostId,
|
|
1495
|
-
slottedNodes
|
|
1496
|
-
);
|
|
1528
|
+
}
|
|
1529
|
+
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
1530
|
+
const childNode = oldSlotChildNodes[i2];
|
|
1531
|
+
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
1532
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
1533
|
+
childNode["s-ol"].remove();
|
|
1534
|
+
childNode["s-ol"] = void 0;
|
|
1535
|
+
childNode["s-sh"] = void 0;
|
|
1536
|
+
checkSlotRelocate = true;
|
|
1497
1537
|
}
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
$
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1538
|
+
if (recursive) {
|
|
1539
|
+
putBackInOriginalLocation(childNode, recursive);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1543
|
+
};
|
|
1544
|
+
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
1545
|
+
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
1546
|
+
let childNode;
|
|
1547
|
+
for (; startIdx <= endIdx; ++startIdx) {
|
|
1548
|
+
if (vnodes[startIdx]) {
|
|
1549
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
1550
|
+
if (childNode) {
|
|
1551
|
+
vnodes[startIdx].$elm$ = childNode;
|
|
1552
|
+
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
};
|
|
1557
|
+
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
1558
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
1559
|
+
const vnode = vnodes[index];
|
|
1560
|
+
if (vnode) {
|
|
1561
|
+
const elm = vnode.$elm$;
|
|
1562
|
+
nullifyVNodeRefs(vnode);
|
|
1563
|
+
if (elm) {
|
|
1564
|
+
{
|
|
1565
|
+
checkSlotFallbackVisibility = true;
|
|
1566
|
+
if (elm["s-ol"]) {
|
|
1567
|
+
elm["s-ol"].remove();
|
|
1568
|
+
} else {
|
|
1569
|
+
putBackInOriginalLocation(elm, true);
|
|
1526
1570
|
}
|
|
1527
|
-
|
|
1528
|
-
|
|
1571
|
+
}
|
|
1572
|
+
elm.remove();
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
|
1578
|
+
let oldStartIdx = 0;
|
|
1579
|
+
let newStartIdx = 0;
|
|
1580
|
+
let idxInOld = 0;
|
|
1581
|
+
let i2 = 0;
|
|
1582
|
+
let oldEndIdx = oldCh.length - 1;
|
|
1583
|
+
let oldStartVnode = oldCh[0];
|
|
1584
|
+
let oldEndVnode = oldCh[oldEndIdx];
|
|
1585
|
+
let newEndIdx = newCh.length - 1;
|
|
1586
|
+
let newStartVnode = newCh[0];
|
|
1587
|
+
let newEndVnode = newCh[newEndIdx];
|
|
1588
|
+
let node;
|
|
1589
|
+
let elmToMove;
|
|
1590
|
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
1591
|
+
if (oldStartVnode == null) {
|
|
1592
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1593
|
+
} else if (oldEndVnode == null) {
|
|
1594
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1595
|
+
} else if (newStartVnode == null) {
|
|
1596
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1597
|
+
} else if (newEndVnode == null) {
|
|
1598
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1599
|
+
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
1600
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
1601
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1602
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1603
|
+
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
1604
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
1605
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1606
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1607
|
+
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1608
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1609
|
+
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1610
|
+
}
|
|
1611
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1612
|
+
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
1613
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1614
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1615
|
+
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1616
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1617
|
+
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1618
|
+
}
|
|
1619
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1620
|
+
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
1621
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1622
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1623
|
+
} else {
|
|
1624
|
+
idxInOld = -1;
|
|
1625
|
+
{
|
|
1626
|
+
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
1627
|
+
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
1628
|
+
idxInOld = i2;
|
|
1629
|
+
break;
|
|
1529
1630
|
}
|
|
1530
1631
|
}
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
node
|
|
1632
|
+
}
|
|
1633
|
+
if (idxInOld >= 0) {
|
|
1634
|
+
elmToMove = oldCh[idxInOld];
|
|
1635
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1636
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
1637
|
+
} else {
|
|
1638
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1639
|
+
oldCh[idxInOld] = void 0;
|
|
1640
|
+
node = elmToMove.$elm$;
|
|
1536
1641
|
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1642
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1643
|
+
} else {
|
|
1644
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1645
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1646
|
+
}
|
|
1647
|
+
if (node) {
|
|
1648
|
+
{
|
|
1649
|
+
insertBefore(
|
|
1650
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
1544
1651
|
node,
|
|
1545
|
-
|
|
1546
|
-
childRenderNodes,
|
|
1547
|
-
slotNodes,
|
|
1548
|
-
shadowRootNodes,
|
|
1549
|
-
slottedNodes
|
|
1652
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1550
1653
|
);
|
|
1551
|
-
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1552
|
-
{
|
|
1553
|
-
hostElm["s-cr"] = node;
|
|
1554
|
-
node["s-cn"] = true;
|
|
1555
|
-
}
|
|
1556
1654
|
}
|
|
1557
1655
|
}
|
|
1558
1656
|
}
|
|
1559
|
-
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1560
|
-
const vnode = newVNode(null, node.textContent);
|
|
1561
|
-
vnode.$elm$ = node;
|
|
1562
|
-
vnode.$index$ = "0";
|
|
1563
|
-
parentVNode.$children$ = [vnode];
|
|
1564
1657
|
}
|
|
1565
|
-
|
|
1658
|
+
if (oldStartIdx > oldEndIdx) {
|
|
1659
|
+
addVnodes(
|
|
1660
|
+
parentElm,
|
|
1661
|
+
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
1662
|
+
newVNode2,
|
|
1663
|
+
newCh,
|
|
1664
|
+
newStartIdx,
|
|
1665
|
+
newEndIdx
|
|
1666
|
+
);
|
|
1667
|
+
} else if (newStartIdx > newEndIdx) {
|
|
1668
|
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
1669
|
+
}
|
|
1566
1670
|
};
|
|
1567
|
-
var
|
|
1568
|
-
if (
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
orgLocNodes.set(componentId, node);
|
|
1572
|
-
}
|
|
1573
|
-
let i2 = 0;
|
|
1574
|
-
if (node.shadowRoot) {
|
|
1575
|
-
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1576
|
-
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1577
|
-
}
|
|
1671
|
+
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1672
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1673
|
+
if (leftVNode.$tag$ === "slot") {
|
|
1674
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
1578
1675
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1676
|
+
if (!isInitialRender) {
|
|
1677
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
1582
1678
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1586
|
-
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1587
|
-
node.nodeValue = "";
|
|
1588
|
-
node["s-en"] = childIdSplt[3];
|
|
1679
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1680
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1589
1681
|
}
|
|
1682
|
+
return true;
|
|
1590
1683
|
}
|
|
1684
|
+
return false;
|
|
1591
1685
|
};
|
|
1592
|
-
var
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
$name$: null,
|
|
1604
|
-
$tag$: null,
|
|
1605
|
-
$text$: null
|
|
1606
|
-
};
|
|
1607
|
-
return { ...defaultVNode, ...vnode };
|
|
1608
|
-
};
|
|
1609
|
-
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1610
|
-
node["s-sr"] = true;
|
|
1611
|
-
childVNode.$name$ = slotName || null;
|
|
1612
|
-
childVNode.$tag$ = "slot";
|
|
1613
|
-
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1614
|
-
{
|
|
1615
|
-
const slot = childVNode.$elm$;
|
|
1616
|
-
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1617
|
-
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1618
|
-
if (shouldMove) {
|
|
1619
|
-
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1686
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
1687
|
+
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1688
|
+
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1689
|
+
const oldChildren = oldVNode.$children$;
|
|
1690
|
+
const newChildren = newVNode2.$children$;
|
|
1691
|
+
const tag = newVNode2.$tag$;
|
|
1692
|
+
const text = newVNode2.$text$;
|
|
1693
|
+
let defaultHolder;
|
|
1694
|
+
if (text === null) {
|
|
1695
|
+
{
|
|
1696
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1620
1697
|
}
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1698
|
+
{
|
|
1699
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
1700
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1701
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1702
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
1706
|
+
}
|
|
1707
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
1708
|
+
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
1709
|
+
} else if (newChildren !== null) {
|
|
1710
|
+
if (oldVNode.$text$ !== null) {
|
|
1711
|
+
elm.textContent = "";
|
|
1712
|
+
}
|
|
1713
|
+
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1714
|
+
} else if (
|
|
1715
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
1716
|
+
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1717
|
+
) {
|
|
1718
|
+
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1719
|
+
}
|
|
1720
|
+
if (isSvgMode && tag === "svg") {
|
|
1721
|
+
isSvgMode = false;
|
|
1722
|
+
}
|
|
1723
|
+
} else if ((defaultHolder = elm["s-cr"])) {
|
|
1724
|
+
defaultHolder.parentNode.textContent = text;
|
|
1725
|
+
} else if (oldVNode.$text$ !== text) {
|
|
1726
|
+
elm.data = text;
|
|
1636
1727
|
}
|
|
1637
1728
|
};
|
|
1638
|
-
var
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1729
|
+
var relocateNodes = [];
|
|
1730
|
+
var markSlotContentForRelocation = (elm) => {
|
|
1731
|
+
let node;
|
|
1732
|
+
let hostContentNodes;
|
|
1733
|
+
let j;
|
|
1734
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1735
|
+
for (const childNode of children) {
|
|
1736
|
+
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1737
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1738
|
+
const slotName = childNode["s-sn"];
|
|
1739
|
+
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1740
|
+
node = hostContentNodes[j];
|
|
1741
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
1742
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1743
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1744
|
+
checkSlotFallbackVisibility = true;
|
|
1745
|
+
node["s-sn"] = node["s-sn"] || slotName;
|
|
1746
|
+
if (relocateNodeData) {
|
|
1747
|
+
relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
|
|
1748
|
+
relocateNodeData.$slotRefNode$ = childNode;
|
|
1749
|
+
} else {
|
|
1750
|
+
node["s-sh"] = childNode["s-hn"];
|
|
1751
|
+
relocateNodes.push({
|
|
1752
|
+
$slotRefNode$: childNode,
|
|
1753
|
+
$nodeToRelocate$: node
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
if (node["s-sr"]) {
|
|
1757
|
+
relocateNodes.map((relocateNode) => {
|
|
1758
|
+
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
1759
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1760
|
+
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1761
|
+
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1766
|
+
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1767
|
+
relocateNodes.push({
|
|
1768
|
+
$nodeToRelocate$: node
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1645
1773
|
}
|
|
1646
|
-
if (
|
|
1647
|
-
|
|
1774
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1775
|
+
markSlotContentForRelocation(childNode);
|
|
1648
1776
|
}
|
|
1649
|
-
return propValue;
|
|
1650
1777
|
}
|
|
1651
|
-
return propValue;
|
|
1652
|
-
};
|
|
1653
|
-
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
1654
|
-
|
|
1655
|
-
// src/runtime/event-emitter.ts
|
|
1656
|
-
var createEvent = (ref, name, flags) => {
|
|
1657
|
-
const elm = getElement(ref);
|
|
1658
|
-
return {
|
|
1659
|
-
emit: (detail) => {
|
|
1660
|
-
return emitEvent(elm, name, {
|
|
1661
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1662
|
-
composed: !!(flags & 2 /* Composed */),
|
|
1663
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1664
|
-
detail
|
|
1665
|
-
});
|
|
1666
|
-
}
|
|
1667
|
-
};
|
|
1668
1778
|
};
|
|
1669
|
-
var
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1779
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
1780
|
+
{
|
|
1781
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1782
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1783
|
+
}
|
|
1673
1784
|
};
|
|
1674
|
-
var
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
style = style || new CSSStyleSheet();
|
|
1679
|
-
if (typeof style === "string") {
|
|
1680
|
-
style = cssText;
|
|
1681
|
-
} else {
|
|
1682
|
-
style.replaceSync(cssText);
|
|
1785
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
1786
|
+
if (typeof newNode["s-sn"] === "string") {
|
|
1787
|
+
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
1788
|
+
patchParentNode(newNode);
|
|
1683
1789
|
}
|
|
1790
|
+
parent.insertBefore(newNode, reference);
|
|
1791
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1792
|
+
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
1793
|
+
return newNode;
|
|
1794
|
+
}
|
|
1795
|
+
if (parent.__insertBefore) {
|
|
1796
|
+
return parent.__insertBefore(newNode, reference);
|
|
1684
1797
|
} else {
|
|
1685
|
-
|
|
1798
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1686
1799
|
}
|
|
1687
|
-
styles.set(scopeId2, style);
|
|
1688
1800
|
};
|
|
1689
|
-
var
|
|
1690
|
-
var _a;
|
|
1691
|
-
const
|
|
1692
|
-
const
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1801
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1802
|
+
var _a, _b, _c, _d, _e;
|
|
1803
|
+
const hostElm = hostRef.$hostElement$;
|
|
1804
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1805
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1806
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1807
|
+
hostTagName = hostElm.tagName;
|
|
1808
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1809
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1810
|
+
cmpMeta.$attrsToReflect$.map(
|
|
1811
|
+
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
1812
|
+
);
|
|
1813
|
+
}
|
|
1814
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1815
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1816
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
1817
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
1701
1818
|
}
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
rootVnode.$tag$ = null;
|
|
1822
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1823
|
+
hostRef.$vnode$ = rootVnode;
|
|
1824
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
|
|
1825
|
+
useNativeShadowDom = supportsShadow ;
|
|
1826
|
+
{
|
|
1827
|
+
contentRef = hostElm["s-cr"];
|
|
1828
|
+
checkSlotFallbackVisibility = false;
|
|
1829
|
+
}
|
|
1830
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1831
|
+
{
|
|
1832
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1833
|
+
if (checkSlotRelocate) {
|
|
1834
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1835
|
+
for (const relocateData of relocateNodes) {
|
|
1836
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1837
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1838
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1839
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1840
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
for (const relocateData of relocateNodes) {
|
|
1844
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1845
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
1846
|
+
if (slotRefNode) {
|
|
1847
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
1848
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1849
|
+
if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
|
|
1850
|
+
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1851
|
+
while (orgLocationNode) {
|
|
1852
|
+
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1853
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1854
|
+
refNode = refNode.nextSibling;
|
|
1855
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1856
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1857
|
+
}
|
|
1858
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
1859
|
+
insertBeforeNode = refNode;
|
|
1860
|
+
break;
|
|
1728
1861
|
}
|
|
1729
1862
|
}
|
|
1730
|
-
|
|
1731
|
-
styleContainerNode.append(styleElm);
|
|
1863
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
1732
1864
|
}
|
|
1733
1865
|
}
|
|
1734
|
-
|
|
1735
|
-
|
|
1866
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1867
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1868
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1869
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
1870
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1871
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1872
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1877
|
+
} else {
|
|
1878
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1879
|
+
if (isInitialLoad) {
|
|
1880
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1881
|
+
}
|
|
1882
|
+
nodeToRelocate.hidden = true;
|
|
1736
1883
|
}
|
|
1737
1884
|
}
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
if (checkSlotFallbackVisibility) {
|
|
1888
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1889
|
+
}
|
|
1890
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1891
|
+
relocateNodes.length = 0;
|
|
1892
|
+
}
|
|
1893
|
+
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1894
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1895
|
+
for (const childNode of children) {
|
|
1896
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1897
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1898
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1743
1899
|
}
|
|
1900
|
+
childNode.hidden = true;
|
|
1744
1901
|
}
|
|
1745
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1746
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1747
1902
|
}
|
|
1748
1903
|
}
|
|
1749
|
-
|
|
1750
|
-
};
|
|
1751
|
-
var attachStyles = (hostRef) => {
|
|
1752
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1753
|
-
const elm = hostRef.$hostElement$;
|
|
1754
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1755
|
-
addStyle(
|
|
1756
|
-
elm.getRootNode(),
|
|
1757
|
-
cmpMeta);
|
|
1758
|
-
endAttachStyles();
|
|
1904
|
+
contentRef = void 0;
|
|
1759
1905
|
};
|
|
1760
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1761
1906
|
|
|
1762
1907
|
// src/runtime/update-component.ts
|
|
1763
1908
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1764
1909
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1765
|
-
ancestorComponent["s-p"].push(
|
|
1910
|
+
const index = ancestorComponent["s-p"].push(
|
|
1911
|
+
new Promise(
|
|
1912
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1913
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1914
|
+
r();
|
|
1915
|
+
}
|
|
1916
|
+
)
|
|
1917
|
+
);
|
|
1766
1918
|
}
|
|
1767
1919
|
};
|
|
1768
1920
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1791,21 +1943,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1791
1943
|
{
|
|
1792
1944
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1793
1945
|
if (hostRef.$queuedListeners$) {
|
|
1794
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1946
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1795
1947
|
hostRef.$queuedListeners$ = void 0;
|
|
1796
1948
|
}
|
|
1797
1949
|
}
|
|
1798
|
-
|
|
1799
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1800
|
-
}
|
|
1950
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1801
1951
|
} else {
|
|
1802
|
-
|
|
1803
|
-
maybePromise = safeCall(instance, "componentWillUpdate");
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
{
|
|
1807
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1952
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1808
1953
|
}
|
|
1954
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1809
1955
|
endSchedule();
|
|
1810
1956
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1811
1957
|
};
|
|
@@ -1875,14 +2021,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1875
2021
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1876
2022
|
const instance = hostRef.$lazyInstance$ ;
|
|
1877
2023
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
2024
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1878
2025
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1879
2026
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1880
2027
|
{
|
|
1881
2028
|
addHydratedFlag(elm);
|
|
1882
2029
|
}
|
|
1883
|
-
|
|
1884
|
-
safeCall(instance, "componentDidLoad");
|
|
1885
|
-
}
|
|
2030
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1886
2031
|
endPostUpdate();
|
|
1887
2032
|
{
|
|
1888
2033
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1891,6 +2036,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1891
2036
|
}
|
|
1892
2037
|
}
|
|
1893
2038
|
} else {
|
|
2039
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1894
2040
|
endPostUpdate();
|
|
1895
2041
|
}
|
|
1896
2042
|
{
|
|
@@ -1918,17 +2064,14 @@ var forceUpdate = (ref) => {
|
|
|
1918
2064
|
}
|
|
1919
2065
|
};
|
|
1920
2066
|
var appDidLoad = (who) => {
|
|
1921
|
-
{
|
|
1922
|
-
addHydratedFlag(doc.documentElement);
|
|
1923
|
-
}
|
|
1924
2067
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1925
2068
|
};
|
|
1926
|
-
var safeCall = (instance, method, arg) => {
|
|
2069
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1927
2070
|
if (instance && instance[method]) {
|
|
1928
2071
|
try {
|
|
1929
2072
|
return instance[method](arg);
|
|
1930
2073
|
} catch (e) {
|
|
1931
|
-
consoleError(e);
|
|
2074
|
+
consoleError(e, elm);
|
|
1932
2075
|
}
|
|
1933
2076
|
}
|
|
1934
2077
|
return void 0;
|
|
@@ -1970,6 +2113,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1970
2113
|
}
|
|
1971
2114
|
}
|
|
1972
2115
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2116
|
+
if (instance.componentShouldUpdate) {
|
|
2117
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2118
|
+
return;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
1973
2121
|
scheduleUpdate(hostRef, false);
|
|
1974
2122
|
}
|
|
1975
2123
|
}
|
|
@@ -2006,62 +2154,69 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2006
2154
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
2007
2155
|
members.map(([memberName, [memberFlags]]) => {
|
|
2008
2156
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
2009
|
-
|
|
2157
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
2158
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
2159
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
2160
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
2010
2161
|
Object.defineProperty(prototype, memberName, {
|
|
2011
2162
|
get() {
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
},
|
|
2017
|
-
configurable: true,
|
|
2018
|
-
enumerable: true
|
|
2019
|
-
});
|
|
2020
|
-
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
2021
|
-
{
|
|
2022
|
-
Object.defineProperty(prototype, memberName, {
|
|
2023
|
-
get() {
|
|
2163
|
+
{
|
|
2164
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
2165
|
+
return getValue(this, memberName);
|
|
2166
|
+
}
|
|
2024
2167
|
const ref = getHostRef(this);
|
|
2025
2168
|
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
2026
2169
|
if (!instance) return;
|
|
2027
2170
|
return instance[memberName];
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
configurable: true,
|
|
2174
|
+
enumerable: true
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
Object.defineProperty(prototype, memberName, {
|
|
2178
|
+
set(newValue) {
|
|
2179
|
+
const ref = getHostRef(this);
|
|
2180
|
+
if (origSetter) {
|
|
2181
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2182
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
2183
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
2184
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2185
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2186
|
+
}
|
|
2187
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
2188
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2189
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2190
|
+
return;
|
|
2191
|
+
}
|
|
2192
|
+
{
|
|
2193
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
2194
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2195
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
2196
|
+
ref.$onReadyPromise$.then(() => {
|
|
2197
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
2198
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2046
2201
|
}
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
2054
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2055
|
-
};
|
|
2056
|
-
if (ref.$lazyInstance$) {
|
|
2057
|
-
setterSetVal();
|
|
2058
|
-
} else {
|
|
2059
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
2202
|
+
return;
|
|
2203
|
+
}
|
|
2204
|
+
const setterSetVal = () => {
|
|
2205
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
2206
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2207
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2060
2208
|
}
|
|
2209
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
2210
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2211
|
+
};
|
|
2212
|
+
if (ref.$lazyInstance$) {
|
|
2213
|
+
setterSetVal();
|
|
2214
|
+
} else {
|
|
2215
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
2061
2216
|
}
|
|
2062
|
-
}
|
|
2217
|
+
}
|
|
2063
2218
|
}
|
|
2064
|
-
}
|
|
2219
|
+
});
|
|
2065
2220
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
2066
2221
|
Object.defineProperty(prototype, memberName, {
|
|
2067
2222
|
value(...args) {
|
|
@@ -2102,8 +2257,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2102
2257
|
return;
|
|
2103
2258
|
}
|
|
2104
2259
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2105
|
-
|
|
2106
|
-
|
|
2260
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
2261
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2262
|
+
this[propName] = newValue;
|
|
2107
2263
|
}
|
|
2108
2264
|
});
|
|
2109
2265
|
};
|
|
@@ -2133,7 +2289,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2133
2289
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
2134
2290
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
2135
2291
|
if (bundleId) {
|
|
2136
|
-
const CstrImport = loadModule(cmpMeta);
|
|
2292
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
2137
2293
|
if (CstrImport && "then" in CstrImport) {
|
|
2138
2294
|
const endLoad = uniqueTime();
|
|
2139
2295
|
Cstr = await CstrImport;
|
|
@@ -2158,7 +2314,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2158
2314
|
try {
|
|
2159
2315
|
new Cstr(hostRef);
|
|
2160
2316
|
} catch (e) {
|
|
2161
|
-
consoleError(e);
|
|
2317
|
+
consoleError(e, elm);
|
|
2162
2318
|
}
|
|
2163
2319
|
{
|
|
2164
2320
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -2167,7 +2323,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2167
2323
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
2168
2324
|
}
|
|
2169
2325
|
endNewInstance();
|
|
2170
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2326
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2171
2327
|
} else {
|
|
2172
2328
|
Cstr = elm.constructor;
|
|
2173
2329
|
const cmpTag = elm.localName;
|
|
@@ -2194,9 +2350,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2194
2350
|
schedule();
|
|
2195
2351
|
}
|
|
2196
2352
|
};
|
|
2197
|
-
var fireConnectedCallback = (instance) => {
|
|
2353
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
2198
2354
|
{
|
|
2199
|
-
safeCall(instance, "connectedCallback");
|
|
2355
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
2200
2356
|
}
|
|
2201
2357
|
};
|
|
2202
2358
|
|
|
@@ -2245,24 +2401,27 @@ var connectedCallback = (elm) => {
|
|
|
2245
2401
|
} else {
|
|
2246
2402
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
2247
2403
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2248
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2404
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2249
2405
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2250
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
2406
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
2251
2407
|
}
|
|
2252
2408
|
}
|
|
2253
2409
|
endConnected();
|
|
2254
2410
|
}
|
|
2255
2411
|
};
|
|
2256
2412
|
var setContentReference = (elm) => {
|
|
2257
|
-
|
|
2413
|
+
if (!win.document) {
|
|
2414
|
+
return;
|
|
2415
|
+
}
|
|
2416
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
2258
2417
|
""
|
|
2259
2418
|
);
|
|
2260
2419
|
contentRefElm["s-cn"] = true;
|
|
2261
2420
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
2262
2421
|
};
|
|
2263
|
-
var disconnectInstance = (instance) => {
|
|
2422
|
+
var disconnectInstance = (instance, elm) => {
|
|
2264
2423
|
{
|
|
2265
|
-
safeCall(instance, "disconnectedCallback");
|
|
2424
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
2266
2425
|
}
|
|
2267
2426
|
};
|
|
2268
2427
|
var disconnectedCallback = async (elm) => {
|
|
@@ -2275,28 +2434,38 @@ var disconnectedCallback = async (elm) => {
|
|
|
2275
2434
|
}
|
|
2276
2435
|
}
|
|
2277
2436
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2278
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
2437
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
2279
2438
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2280
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
2439
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
2281
2440
|
}
|
|
2282
2441
|
}
|
|
2442
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2443
|
+
rootAppliedStyles.delete(elm);
|
|
2444
|
+
}
|
|
2445
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2446
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2447
|
+
}
|
|
2283
2448
|
};
|
|
2284
2449
|
|
|
2285
2450
|
// src/runtime/bootstrap-lazy.ts
|
|
2286
2451
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2287
2452
|
var _a;
|
|
2453
|
+
if (!win.document) {
|
|
2454
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2455
|
+
return;
|
|
2456
|
+
}
|
|
2288
2457
|
const endBootstrap = createTime();
|
|
2289
2458
|
const cmpTags = [];
|
|
2290
2459
|
const exclude = options.exclude || [];
|
|
2291
2460
|
const customElements2 = win.customElements;
|
|
2292
|
-
const head =
|
|
2461
|
+
const head = win.document.head;
|
|
2293
2462
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2294
|
-
const dataStyles = /* @__PURE__ */
|
|
2463
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
2295
2464
|
const deferredConnectedCallbacks = [];
|
|
2296
2465
|
let appLoadFallback;
|
|
2297
2466
|
let isBootstrapping = true;
|
|
2298
2467
|
Object.assign(plt, options);
|
|
2299
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2468
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
2300
2469
|
{
|
|
2301
2470
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2302
2471
|
}
|
|
@@ -2352,6 +2521,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2352
2521
|
}
|
|
2353
2522
|
disconnectedCallback() {
|
|
2354
2523
|
plt.jmp(() => disconnectedCallback(this));
|
|
2524
|
+
plt.raf(() => {
|
|
2525
|
+
var _a3;
|
|
2526
|
+
const hostRef = getHostRef(this);
|
|
2527
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2528
|
+
if (i2 > -1) {
|
|
2529
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2530
|
+
}
|
|
2531
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2532
|
+
delete hostRef.$vnode$.$elm$;
|
|
2533
|
+
}
|
|
2534
|
+
});
|
|
2355
2535
|
}
|
|
2356
2536
|
componentOnReady() {
|
|
2357
2537
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -2379,7 +2559,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2379
2559
|
}
|
|
2380
2560
|
if (dataStyles.innerHTML.length) {
|
|
2381
2561
|
dataStyles.setAttribute("data-styles", "");
|
|
2382
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2562
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2383
2563
|
if (nonce != null) {
|
|
2384
2564
|
dataStyles.setAttribute("nonce", nonce);
|
|
2385
2565
|
}
|
|
@@ -2400,9 +2580,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2400
2580
|
// src/runtime/fragment.ts
|
|
2401
2581
|
var Fragment = (_, children) => children;
|
|
2402
2582
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2403
|
-
if (listeners) {
|
|
2583
|
+
if (listeners && win.document) {
|
|
2404
2584
|
listeners.map(([flags, name, method]) => {
|
|
2405
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2585
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
2406
2586
|
const handler = hostListenerProxy(hostRef, method);
|
|
2407
2587
|
const opts = hostListenerOpts(flags);
|
|
2408
2588
|
plt.ael(target, name, handler, opts);
|
|
@@ -2421,11 +2601,13 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2421
2601
|
}
|
|
2422
2602
|
}
|
|
2423
2603
|
} catch (e) {
|
|
2424
|
-
consoleError(e);
|
|
2604
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2425
2605
|
}
|
|
2426
2606
|
};
|
|
2427
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
2428
|
-
if (flags & 4 /* TargetDocument */)
|
|
2607
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2608
|
+
if (flags & 4 /* TargetDocument */) {
|
|
2609
|
+
return doc;
|
|
2610
|
+
}
|
|
2429
2611
|
return elm;
|
|
2430
2612
|
};
|
|
2431
2613
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -2449,4 +2631,4 @@ exports.promiseResolve = promiseResolve;
|
|
|
2449
2631
|
exports.registerInstance = registerInstance;
|
|
2450
2632
|
exports.setNonce = setNonce;
|
|
2451
2633
|
|
|
2452
|
-
//# sourceMappingURL=index-
|
|
2634
|
+
//# sourceMappingURL=index-9bda5507.js.map
|