@venite/components 0.16.7 → 0.16.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_commonjsHelpers-bcc1208a.js +25 -0
- package/dist/cjs/animation-34a434a2.js +957 -0
- package/dist/cjs/app-globals-60a4f972.js +7 -0
- package/dist/cjs/book-1a92678a.js +287 -0
- package/dist/cjs/change-cdb1e8c0.js +16 -0
- package/dist/cjs/cubic-bezier-f3b34d27.js +91 -0
- package/dist/cjs/cursor-81bfd01e.js +12 -0
- package/dist/cjs/focus-visible-5621d6b1.js +45 -0
- package/dist/cjs/framework-delegate-84d33ff0.js +37 -0
- package/dist/cjs/gesture-controller-5bd9d825.js +193 -0
- package/dist/cjs/haptic-88c261ab.js +49 -0
- package/dist/cjs/hardware-back-button-8c2f48d2.js +59 -0
- package/dist/cjs/heading-5afc2b24.js +21 -0
- package/dist/cjs/helpers-41dfb43a.js +110 -0
- package/dist/cjs/image-3bee3e73.js +21 -0
- package/dist/cjs/index-1a73a70c.js +211 -0
- package/dist/cjs/index-4b7e4228.js +135 -0
- package/dist/cjs/index-7aa21373.js +92 -0
- package/dist/cjs/index-8197bb45.js +441 -0
- package/dist/{ldf/index-ea7a35b9.js → cjs/index-8fe0df8d.js} +213 -1242
- package/dist/cjs/index-c5bdf2bc.js +167 -0
- package/dist/cjs/index-de13bd01.js +463 -0
- package/dist/cjs/index-e4c51e4d.js +307 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/input-shims-9c2d56bd.js +357 -0
- package/dist/cjs/ion-action-sheet.cjs.entry.js +230 -0
- package/dist/cjs/ion-alert.cjs.entry.js +386 -0
- package/dist/cjs/ion-app.cjs.entry.js +60 -0
- package/dist/cjs/ion-avatar.cjs.entry.js +25 -0
- package/dist/cjs/ion-back-button.cjs.entry.js +79 -0
- package/dist/cjs/ion-backdrop.cjs.entry.js +67 -0
- package/dist/cjs/ion-badge.cjs.entry.js +27 -0
- package/dist/cjs/ion-button_13.cjs.entry.js +1786 -0
- package/dist/cjs/ion-card-content_6.cjs.entry.js +405 -0
- package/dist/cjs/ion-card-subtitle.cjs.entry.js +27 -0
- package/dist/cjs/ion-card_2.cjs.entry.js +91 -0
- package/dist/cjs/ion-checkbox_3.cjs.entry.js +234 -0
- package/dist/cjs/ion-chip.cjs.entry.js +31 -0
- package/dist/cjs/ion-datetime_2.cjs.entry.js +1125 -0
- package/dist/cjs/ion-fab-button.cjs.entry.js +74 -0
- package/dist/cjs/ion-fab-list.cjs.entry.js +45 -0
- package/dist/cjs/ion-fab.cjs.entry.js +74 -0
- package/dist/cjs/ion-footer.cjs.entry.js +43 -0
- package/dist/cjs/ion-img.cjs.entry.js +72 -0
- package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +37 -0
- package/dist/cjs/ion-infinite-scroll.cjs.entry.js +206 -0
- package/dist/cjs/ion-input_2.cjs.entry.js +2645 -0
- package/dist/cjs/ion-item-divider.cjs.entry.js +36 -0
- package/dist/cjs/ion-item-group.cjs.entry.js +31 -0
- package/dist/cjs/ion-item-option.cjs.entry.js +55 -0
- package/dist/cjs/ion-item-options.cjs.entry.js +47 -0
- package/dist/cjs/ion-item-sliding.cjs.entry.js +359 -0
- package/dist/cjs/ion-list-header.cjs.entry.js +28 -0
- package/dist/cjs/ion-loading.cjs.entry.js +213 -0
- package/dist/cjs/ion-menu-button.cjs.entry.js +61 -0
- package/dist/cjs/ion-menu-toggle.cjs.entry.js +47 -0
- package/dist/cjs/ion-menu.cjs.entry.js +456 -0
- package/dist/cjs/ion-modal.cjs.entry.js +488 -0
- package/dist/cjs/ion-nav-link.cjs.entry.js +44 -0
- package/dist/cjs/ion-nav.cjs.entry.js +812 -0
- package/dist/cjs/ion-note.cjs.entry.js +27 -0
- package/dist/cjs/ion-picker-column.cjs.entry.js +327 -0
- package/dist/cjs/ion-picker.cjs.entry.js +214 -0
- package/dist/cjs/ion-popover.cjs.entry.js +363 -0
- package/dist/cjs/ion-progress-bar.cjs.entry.js +67 -0
- package/dist/cjs/ion-radio_2.cjs.entry.js +149 -0
- package/dist/cjs/ion-range.cjs.entry.js +395 -0
- package/dist/cjs/ion-refresher-content.cjs.entry.js +40 -0
- package/dist/cjs/ion-refresher.cjs.entry.js +832 -0
- package/dist/cjs/ion-reorder-group.cjs.entry.js +281 -0
- package/dist/cjs/ion-reorder.cjs.entry.js +31 -0
- package/dist/cjs/ion-route-redirect.cjs.entry.js +24 -0
- package/dist/cjs/ion-route.cjs.entry.js +49 -0
- package/dist/cjs/ion-router-link.cjs.entry.js +35 -0
- package/dist/cjs/ion-router-outlet.cjs.entry.js +160 -0
- package/dist/cjs/ion-router.cjs.entry.js +631 -0
- package/dist/cjs/ion-segment_16.cjs.entry.js +2507 -0
- package/dist/cjs/ion-select-popover.cjs.entry.js +33 -0
- package/dist/cjs/ion-select_2.cjs.entry.js +444 -0
- package/dist/cjs/ion-slide.cjs.entry.js +25 -0
- package/dist/cjs/ion-slides.cjs.entry.js +404 -0
- package/dist/cjs/ion-spinner.cjs.entry.js +60 -0
- package/dist/cjs/ion-split-pane.cjs.entry.js +150 -0
- package/dist/cjs/ion-tab-bar.cjs.entry.js +58 -0
- package/dist/cjs/ion-tab-button.cjs.entry.js +99 -0
- package/dist/cjs/ion-tab.cjs.entry.js +58 -0
- package/dist/cjs/ion-tabs.cjs.entry.js +155 -0
- package/dist/cjs/ion-text.cjs.entry.js +22 -0
- package/dist/cjs/ion-textarea.cjs.entry.js +217 -0
- package/dist/cjs/ion-thumbnail.cjs.entry.js +20 -0
- package/dist/cjs/ion-toast.cjs.entry.js +280 -0
- package/dist/cjs/ion-virtual-scroll.cjs.entry.js +544 -0
- package/dist/cjs/ionic-global-581fb4f8.js +204 -0
- package/dist/cjs/ios.transition-7244ac4e.js +459 -0
- package/dist/cjs/ldf-day-name_5.cjs.entry.js +5682 -0
- package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +573 -0
- package/dist/cjs/ldf-editable-condition-piece.cjs.entry.js +220 -0
- package/dist/cjs/ldf-editable-condition.cjs.entry.js +106 -0
- package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +152 -0
- package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +496 -0
- package/dist/cjs/ldf-editable-metadata.cjs.entry.js +186 -0
- package/dist/cjs/ldf-editable-preference-option.cjs.entry.js +72 -0
- package/dist/cjs/ldf-editable-preference.cjs.entry.js +89 -0
- package/dist/cjs/ldf-editable-preferences.cjs.entry.js +200 -0
- package/dist/cjs/ldf-editable-string-list.cjs.entry.js +134 -0
- package/dist/cjs/ldf-editor-cursors.cjs.entry.js +276 -0
- package/dist/cjs/ldf-editor.cjs.entry.js +238 -0
- package/dist/cjs/ldf.cjs.js +22 -0
- package/dist/cjs/loader.cjs.js +24 -0
- package/dist/cjs/locale-d4e925b1.js +8 -0
- package/dist/cjs/md.transition-d86b1ef0.js +62 -0
- package/dist/cjs/menu-toggle-util-293e388b.js +11 -0
- package/dist/cjs/option-24f3d13a.js +167 -0
- package/dist/cjs/overlays-eb464d6d.js +228 -0
- package/dist/cjs/preference-a4bd51c4.js +23 -0
- package/dist/cjs/refrain-91fb446b.js +21 -0
- package/dist/cjs/rubric-5b467a6a.js +1220 -0
- package/dist/cjs/specific-class-a1112e78.js +38 -0
- package/dist/cjs/spinner-configs-b0bec093.js +112 -0
- package/dist/cjs/status-tap-7afb25f5.js +25 -0
- package/dist/cjs/swipe-back-f887168e.js +52 -0
- package/dist/cjs/swiper.bundle-cb0f61f7.js +6246 -0
- package/dist/cjs/tap-click-e0af5237.js +169 -0
- package/dist/cjs/text-5edb80f3.js +18 -0
- package/dist/cjs/theme-81caa5b0.js +47 -0
- package/dist/collection/collection-manifest.json +146 -0
- package/dist/collection/components/bible-reading/bible-reading.css +84 -0
- package/dist/collection/components/bible-reading/bible-reading.i18n.en.json +13 -0
- package/dist/collection/components/bible-reading/bible-reading.i18n.es.json +4 -0
- package/dist/collection/components/bible-reading/bible-reading.js +328 -0
- package/dist/collection/components/bible-reading/dist/bible-reading.js +354 -0
- package/dist/collection/components/bible-reading/fetch-reading.js +17 -0
- package/dist/collection/components/day-name/day-name.css +18 -0
- package/dist/collection/components/day-name/day-name.i18n.en.json +4 -0
- package/dist/{ldf/ldf-day-name.entry.js → collection/components/day-name/day-name.js} +54 -27
- package/dist/collection/components/editable-add-block/editable-add-block.css +93 -0
- package/dist/collection/components/editable-add-block/editable-add-block.i18n.en.json +5 -0
- package/dist/collection/components/editable-add-block/editable-add-block.js +135 -0
- package/dist/collection/components/editable-add-block-menu/dist/menu-options.js +230 -0
- package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.css +33 -0
- package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.i18n.en.json +48 -0
- package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.js +101 -0
- package/dist/collection/components/editable-add-block-menu/menu-options.js +423 -0
- package/dist/collection/components/editable-antiphon-field/editable-antiphon-field.i18n.en.json +11 -0
- package/dist/collection/components/editable-antiphon-field/editable-antiphon-field.js +332 -0
- package/dist/collection/components/editable-antiphon-field/ldf-editable-antiphon-field.css +7 -0
- package/dist/collection/components/editable-boolean/editable-boolean.js +117 -0
- package/dist/collection/components/editable-condition/editable-condition.i18n.en.json +7 -0
- package/dist/collection/components/editable-condition/editable-condition.js +192 -0
- package/dist/collection/components/editable-condition-piece/dist/editable-condition-piece.js +257 -0
- package/dist/collection/components/editable-condition-piece/editable-condition-piece.css +34 -0
- package/dist/collection/components/editable-condition-piece/editable-condition-piece.i18n.en.json +21 -0
- package/dist/collection/components/editable-condition-piece/editable-condition-piece.js +233 -0
- package/dist/collection/components/editable-condition-piece/except-only-strings.js +12 -0
- package/dist/collection/components/editable-condition-piece/except-only.js +20 -0
- package/dist/collection/components/editable-delete/editable-delete.i18n.en.json +6 -0
- package/dist/collection/components/editable-delete/editable-delete.js +175 -0
- package/dist/collection/components/editable-filter-documents/dist/editable-filter-documents.js +242 -0
- package/dist/collection/components/editable-filter-documents/editable-filter-documents.css +11 -0
- package/dist/collection/components/editable-filter-documents/editable-filter-documents.i18n.en.json +9 -0
- package/dist/collection/components/editable-filter-documents/editable-filter-documents.js +294 -0
- package/dist/collection/components/editable-lookup/editable-lookup.js +210 -0
- package/dist/collection/components/editable-metadata/editable-metadata.css +44 -0
- package/dist/collection/components/editable-metadata/editable-metadata.i18n.en.json +51 -0
- package/dist/collection/components/editable-metadata/editable-metadata.js +261 -0
- package/dist/collection/components/editable-metadata-buttons/dist/editable-metadata-buttons.js +444 -0
- package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.css +37 -0
- package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.i18n.en.json +31 -0
- package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.js +433 -0
- package/dist/collection/components/editable-metadata-metadata-fields/dist/editable-metadata-metadata-fields.js +399 -0
- package/dist/collection/components/editable-metadata-metadata-fields/editable-metadata-metadata-fields.i18n.en.json +48 -0
- package/dist/collection/components/editable-metadata-metadata-fields/editable-metadata-metadata-fields.js +438 -0
- package/dist/collection/components/editable-preference/editable-preference.i18n.en.json +8 -0
- package/dist/collection/components/editable-preference/editable-preference.js +166 -0
- package/dist/collection/components/editable-preference-option/editable-preference-option.i18n.en.json +9 -0
- package/dist/collection/components/editable-preference-option/editable-preference-option.js +128 -0
- package/dist/collection/components/editable-preferences/dist/editable-preferences.js +281 -0
- package/dist/collection/components/editable-preferences/editable-preferences.css +3 -0
- package/dist/collection/components/editable-preferences/editable-preferences.i18n.en.json +10 -0
- package/dist/collection/components/editable-preferences/editable-preferences.js +230 -0
- package/dist/collection/components/editable-preferences/preference-tree.js +24 -0
- package/dist/collection/components/editable-select/dist/editable-select.js +69 -0
- package/dist/collection/components/editable-select/editable-select.css +0 -0
- package/dist/collection/components/editable-select/editable-select.js +157 -0
- package/dist/collection/components/editable-string-list/dist/editable-string-list.js +207 -0
- package/dist/collection/components/editable-string-list/editable-string-list.css +21 -0
- package/dist/collection/components/editable-string-list/editable-string-list.i18n.en.json +18 -0
- package/dist/collection/components/editable-string-list/editable-string-list.js +194 -0
- package/dist/collection/components/editable-text/dist/editable-text.js +300 -0
- package/dist/collection/components/editable-text/dist/handle-input.js +52 -0
- package/dist/collection/components/editable-text/editable-text.css +53 -0
- package/dist/collection/components/editable-text/editable-text.i18n.en.json +3 -0
- package/dist/collection/components/editable-text/editable-text.js +473 -0
- package/dist/collection/components/editable-text/handle-input.js +47 -0
- package/dist/collection/components/editor/dist/editor.js +403 -0
- package/dist/collection/components/editor/editor.css +41 -0
- package/dist/collection/components/editor/editor.js +579 -0
- package/dist/collection/components/editor-cursors/editor-cursors.css +43 -0
- package/dist/collection/components/editor-cursors/editor-cursors.js +228 -0
- package/dist/collection/components/heading/dist/heading.js +210 -0
- package/dist/collection/components/heading/editable-node.js +2 -0
- package/dist/collection/components/heading/heading.css +96 -0
- package/dist/collection/components/heading/heading.i18n.en.json +4 -0
- package/dist/collection/components/heading/heading.js +198 -0
- package/dist/collection/components/image/image.css +75 -0
- package/dist/collection/components/image/image.i18n.en.json +4 -0
- package/dist/collection/components/image/image.js +303 -0
- package/dist/collection/components/label-bar/label-bar.css +40 -0
- package/dist/collection/components/label-bar/label-bar.js +49 -0
- package/dist/collection/components/liturgical-document/condition-node.js +86 -0
- package/dist/collection/components/liturgical-document/dist/liturgical-document.js +341 -0
- package/dist/collection/components/liturgical-document/liturgical-document.css +73 -0
- package/dist/collection/components/liturgical-document/liturgical-document.i18n.en.json +45 -0
- package/dist/collection/components/liturgical-document/liturgical-document.js +465 -0
- package/dist/collection/components/liturgical-document/lookup-node.js +80 -0
- package/dist/collection/components/liturgy/liturgy.js +138 -0
- package/dist/collection/components/meditation/dist/meditation.js +345 -0
- package/dist/collection/components/meditation/meditation.css +63 -0
- package/dist/collection/components/meditation/meditation.i18n.en.json +8 -0
- package/dist/collection/components/meditation/meditation.js +409 -0
- package/dist/collection/components/option/dist/option.js +318 -0
- package/dist/collection/components/option/option.css +8 -0
- package/dist/collection/components/option/option.i18n.en.json +3 -0
- package/dist/{ldf/ldf-option.entry.js → collection/components/option/option.js} +214 -31
- package/dist/collection/components/prayers-and-thanksgivings/dist/prayers-and-thanksgivings.js +258 -0
- package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.css +3 -0
- package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.i18n.en.json +3 -0
- package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.js +265 -0
- package/dist/collection/components/psalm/dist/psalm.js +383 -0
- package/dist/collection/components/psalm/psalm.css +152 -0
- package/dist/collection/components/psalm/psalm.i18n.en.json +10 -0
- package/dist/collection/components/psalm/psalm.js +361 -0
- package/dist/collection/components/refrain/refrain.css +42 -0
- package/dist/collection/components/refrain/refrain.js +105 -0
- package/dist/collection/components/responsive-prayer/responsive-prayer.css +83 -0
- package/dist/collection/components/responsive-prayer/responsive-prayer.i18n.en.json +7 -0
- package/dist/collection/components/responsive-prayer/responsive-prayer.js +215 -0
- package/dist/collection/components/rubric/rubric.css +9 -0
- package/dist/collection/components/rubric/rubric.js +104 -0
- package/dist/collection/components/string/dist/string.js +194 -0
- package/dist/collection/components/string/string.css +60 -0
- package/dist/{ldf/ldf-string.entry.js → collection/components/string/string.js} +179 -18
- package/dist/collection/components/text/dist/text.js +234 -0
- package/dist/collection/components/text/text.css +52 -0
- package/dist/collection/components/text/text.i18n.en.json +7 -0
- package/dist/collection/components/text/text.i18n.es.json +3 -0
- package/dist/collection/components/text/text.js +224 -0
- package/dist/collection/i18n/bible-reading.i18n.en.json +13 -0
- package/dist/collection/i18n/bible-reading.i18n.es.json +4 -0
- package/dist/collection/i18n/day-name.i18n.en.json +4 -0
- package/dist/collection/i18n/editable-add-block-menu.i18n.en.json +48 -0
- package/dist/collection/i18n/editable-add-block.i18n.en.json +5 -0
- package/dist/collection/i18n/editable-antiphon-field.i18n.en.json +11 -0
- package/dist/collection/i18n/editable-condition-piece.i18n.en.json +21 -0
- package/dist/collection/i18n/editable-condition.i18n.en.json +7 -0
- package/dist/collection/i18n/editable-delete.i18n.en.json +6 -0
- package/dist/collection/i18n/editable-filter-documents.i18n.en.json +9 -0
- package/dist/collection/i18n/editable-metadata-buttons.i18n.en.json +31 -0
- package/dist/collection/i18n/editable-metadata-metadata-fields.i18n.en.json +48 -0
- package/dist/collection/i18n/editable-metadata.i18n.en.json +51 -0
- package/dist/collection/i18n/editable-preference-option.i18n.en.json +9 -0
- package/dist/collection/i18n/editable-preference.i18n.en.json +8 -0
- package/dist/collection/i18n/editable-preferences.i18n.en.json +10 -0
- package/dist/collection/i18n/editable-string-list.i18n.en.json +18 -0
- package/dist/collection/i18n/editable-text.i18n.en.json +3 -0
- package/dist/collection/i18n/heading.i18n.en.json +4 -0
- package/dist/collection/i18n/image.i18n.en.json +4 -0
- package/dist/collection/i18n/liturgical-document.i18n.en.json +45 -0
- package/dist/collection/i18n/meditation.i18n.en.json +8 -0
- package/dist/collection/i18n/option.i18n.en.json +3 -0
- package/dist/collection/i18n/prayers-and-thanksgivings.i18n.en.json +3 -0
- package/dist/collection/i18n/psalm.i18n.en.json +10 -0
- package/dist/collection/i18n/responsive-prayer.i18n.en.json +7 -0
- package/dist/collection/i18n/text.i18n.en.json +7 -0
- package/dist/collection/i18n/text.i18n.es.json +3 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/interfaces/add-option-to-doc.js +1 -0
- package/dist/collection/interfaces/dist/menu-option.js +9 -0
- package/dist/collection/interfaces/index.js +2 -0
- package/dist/collection/interfaces/menu-option.js +2 -0
- package/dist/collection/utils/element-from-path.js +14 -0
- package/dist/{ldf/locale-d595f8f6.js → collection/utils/locale.js} +2 -4
- package/dist/esm/_commonjsHelpers-ba3f0406.js +21 -0
- package/dist/{ldf/animation-6b850b6a.js → esm/animation-7a1025d0.js} +1 -1
- package/dist/{ldf/app-globals-d4376e8c.js → esm/app-globals-729b03cf.js} +1 -1
- package/dist/esm/book-31b8cdde.js +282 -0
- package/dist/esm/change-ea574d32.js +14 -0
- package/dist/{ldf → esm}/cubic-bezier-89113939.js +0 -0
- package/dist/esm/cursor-0e47f111.js +10 -0
- package/dist/{ldf → esm}/focus-visible-571e113e.js +0 -0
- package/dist/{ldf → esm}/framework-delegate-7af2c551.js +0 -0
- package/dist/esm/gesture-controller-5bf8565e.js +191 -0
- package/dist/{ldf/haptic-0d102c16.js → esm/haptic-fc16a4d8.js} +0 -24
- package/dist/{ldf → esm}/hardware-back-button-b3b61715.js +0 -0
- package/dist/esm/heading-cc5ffa8a.js +19 -0
- package/dist/{ldf/helpers-e9bf4204.js → esm/helpers-8c93393b.js} +0 -3
- package/dist/esm/image-c6a3f0c5.js +19 -0
- package/dist/{ldf/index-dd274afe.js → esm/index-1bf6d100.js} +3 -31
- package/dist/{ldf/index-4505cc02.js → esm/index-734a6b69.js} +2 -2
- package/dist/{ldf/index-9b41fcc6.js → esm/index-82044e24.js} +3 -190
- package/dist/{ldf → esm}/index-86d5f3ab.js +0 -0
- package/dist/{ldf/index-fc8c2f30.js → esm/index-9579282b.js} +3 -3
- package/dist/{ldf → esm}/index-c7ecbd63.js +0 -0
- package/dist/{ldf/index-7845c707.js → esm/index-f08f6130.js} +1 -6
- package/dist/esm/index-f0f6a379.js +1765 -0
- package/dist/esm/index.js +4 -0
- package/dist/{ldf/input-shims-b58afc2a.js → esm/input-shims-a4ad2743.js} +5 -7
- package/dist/{ldf → esm}/ion-action-sheet.entry.js +5 -5
- package/dist/{ldf → esm}/ion-alert.entry.js +5 -5
- package/dist/{ldf → esm}/ion-app.entry.js +6 -6
- package/dist/{ldf → esm}/ion-avatar.entry.js +2 -2
- package/dist/{ldf → esm}/ion-back-button.entry.js +2 -2
- package/dist/{ldf → esm}/ion-backdrop.entry.js +3 -3
- package/dist/{ldf → esm}/ion-badge.entry.js +2 -2
- package/dist/esm/ion-button_13.entry.js +1770 -0
- package/dist/esm/ion-card-content_6.entry.js +396 -0
- package/dist/{ldf → esm}/ion-card-subtitle.entry.js +2 -2
- package/dist/{ldf/ion-card.entry.js → esm/ion-card_2.entry.js} +27 -3
- package/dist/{ldf/ion-checkbox.entry.js → esm/ion-checkbox_3.entry.js} +123 -4
- package/dist/{ldf → esm}/ion-chip.entry.js +2 -2
- package/dist/{ldf/ion-datetime.entry.js → esm/ion-datetime_2.entry.js} +152 -6
- package/dist/{ldf → esm}/ion-fab-button.entry.js +3 -3
- package/dist/{ldf → esm}/ion-fab-list.entry.js +2 -2
- package/dist/{ldf → esm}/ion-fab.entry.js +2 -2
- package/dist/{ldf → esm}/ion-footer.entry.js +2 -2
- package/dist/{ldf → esm}/ion-img.entry.js +2 -2
- package/dist/{ldf → esm}/ion-infinite-scroll-content.entry.js +2 -2
- package/dist/{ldf → esm}/ion-infinite-scroll.entry.js +2 -2
- package/dist/{ldf/ldf-editable-text.entry.js → esm/ion-input_2.entry.js} +222 -12
- package/dist/{ldf → esm}/ion-item-divider.entry.js +2 -2
- package/dist/{ldf → esm}/ion-item-group.entry.js +2 -2
- package/dist/{ldf → esm}/ion-item-option.entry.js +2 -2
- package/dist/{ldf → esm}/ion-item-options.entry.js +3 -3
- package/dist/{ldf → esm}/ion-item-sliding.entry.js +4 -4
- package/dist/{ldf → esm}/ion-list-header.entry.js +2 -2
- package/dist/{ldf → esm}/ion-loading.entry.js +5 -5
- package/dist/{ldf → esm}/ion-menu-button.entry.js +6 -6
- package/dist/{ldf → esm}/ion-menu-toggle.entry.js +6 -6
- package/dist/{ldf → esm}/ion-menu.entry.js +7 -11
- package/dist/{ldf → esm}/ion-modal.entry.js +8 -7
- package/dist/{ldf → esm}/ion-nav-link.entry.js +1 -1
- package/dist/{ldf → esm}/ion-nav.entry.js +5 -9
- package/dist/{ldf → esm}/ion-note.entry.js +2 -2
- package/dist/{ldf → esm}/ion-picker-column.entry.js +5 -5
- package/dist/{ldf → esm}/ion-picker.entry.js +5 -5
- package/dist/{ldf → esm}/ion-popover.entry.js +6 -6
- package/dist/{ldf → esm}/ion-progress-bar.entry.js +3 -3
- package/dist/{ldf/ion-radio.entry.js → esm/ion-radio_2.entry.js} +57 -4
- package/dist/{ldf → esm}/ion-range.entry.js +4 -4
- package/dist/{ldf → esm}/ion-refresher-content.entry.js +2 -2
- package/dist/{ldf → esm}/ion-refresher.entry.js +7 -57
- package/dist/{ldf → esm}/ion-reorder-group.entry.js +4 -4
- package/dist/{ldf → esm}/ion-reorder.entry.js +2 -2
- package/dist/{ldf → esm}/ion-route-redirect.entry.js +1 -1
- package/dist/{ldf → esm}/ion-route.entry.js +1 -1
- package/dist/{ldf → esm}/ion-router-link.entry.js +2 -2
- package/dist/{ldf → esm}/ion-router-outlet.entry.js +4 -4
- package/dist/{ldf → esm}/ion-router.entry.js +2 -2
- package/dist/esm/ion-segment_16.entry.js +2488 -0
- package/dist/{ldf → esm}/ion-select-popover.entry.js +3 -3
- package/dist/{ldf/ion-select.entry.js → esm/ion-select_2.entry.js} +24 -5
- package/dist/{ldf → esm}/ion-slide.entry.js +2 -2
- package/dist/{ldf → esm}/ion-slides.entry.js +3 -3
- package/dist/{ldf → esm}/ion-spinner.entry.js +2 -2
- package/dist/{ldf → esm}/ion-split-pane.entry.js +2 -8
- package/dist/{ldf → esm}/ion-tab-bar.entry.js +2 -2
- package/dist/{ldf → esm}/ion-tab-button.entry.js +2 -2
- package/dist/{ldf → esm}/ion-tab.entry.js +1 -9
- package/dist/{ldf → esm}/ion-tabs.entry.js +1 -1
- package/dist/{ldf → esm}/ion-text.entry.js +2 -2
- package/dist/{ldf → esm}/ion-textarea.entry.js +5 -5
- package/dist/{ldf → esm}/ion-thumbnail.entry.js +2 -2
- package/dist/{ldf → esm}/ion-toast.entry.js +5 -5
- package/dist/{ldf → esm}/ion-virtual-scroll.entry.js +1 -1
- package/dist/{ldf/ionic-global-98eeb119.js → esm/ionic-global-ef89a0a5.js} +1 -2
- package/dist/{ldf/ios.transition-1d534d59.js → esm/ios.transition-b1be0863.js} +4 -4
- package/dist/{ldf/ldf-text.entry.js → esm/ldf-day-name_5.entry.js} +508 -126
- package/dist/{ldf → esm}/ldf-editable-add-block-menu.entry.js +9 -4
- package/dist/{ldf → esm}/ldf-editable-condition-piece.entry.js +24 -4
- package/dist/{ldf → esm}/ldf-editable-condition.entry.js +4 -4
- package/dist/{ldf → esm}/ldf-editable-filter-documents.entry.js +32 -4
- package/dist/{ldf/ldf-editable-metadata-metadata-fields.entry.js → esm/ldf-editable-lookup_2.entry.js} +121 -5
- package/dist/{ldf → esm}/ldf-editable-metadata.entry.js +10 -4
- package/dist/{ldf → esm}/ldf-editable-preference-option.entry.js +5 -4
- package/dist/{ldf → esm}/ldf-editable-preference.entry.js +5 -4
- package/dist/{ldf → esm}/ldf-editable-preferences.entry.js +20 -17
- package/dist/{ldf → esm}/ldf-editable-string-list.entry.js +4 -4
- package/dist/{ldf → esm}/ldf-editor-cursors.entry.js +5 -9
- package/dist/{ldf → esm}/ldf-editor.entry.js +6 -4
- package/dist/esm/ldf.js +20 -0
- package/dist/esm/loader.js +20 -0
- package/dist/esm/locale-ec8e14e6.js +6 -0
- package/dist/{ldf/md.transition-a8cd439c.js → esm/md.transition-1763f475.js} +4 -4
- package/dist/{ldf/menu-toggle-util-9f807d31.js → esm/menu-toggle-util-29e61ff3.js} +1 -1
- package/dist/esm/option-da8390ad.js +164 -0
- package/dist/{ldf/overlays-10805282.js → esm/overlays-06b43b65.js} +2 -2
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/preference-d070d4cb.js +20 -0
- package/dist/esm/refrain-75a412cb.js +19 -0
- package/dist/esm/rubric-91bf7fed.js +1213 -0
- package/dist/esm/specific-class-ef83cfb6.js +36 -0
- package/dist/{ldf → esm}/spinner-configs-5dd6891e.js +0 -0
- package/dist/{ldf/status-tap-b8afd87d.js → esm/status-tap-7458bd71.js} +1 -1
- package/dist/{ldf/swipe-back-2b2f4e51.js → esm/swipe-back-762284df.js} +3 -2
- package/dist/{ldf/swiper.bundle-49d79db9.js → esm/swiper.bundle-13b9da83.js} +2 -2
- package/dist/{ldf/tap-click-fccc5499.js → esm/tap-click-9b3d603b.js} +1 -1
- package/dist/esm/text-ed75fbd4.js +16 -0
- package/dist/{ldf → esm}/theme-74c22054.js +0 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/ldf/index.esm.js +1 -4
- package/dist/ldf/ldf.css +3 -122
- package/dist/ldf/ldf.esm.js +1 -123
- package/dist/ldf/p-018e57db.entry.js +1 -0
- package/dist/ldf/p-03389897.js +1 -0
- package/dist/ldf/p-03afc8cb.entry.js +1 -0
- package/dist/ldf/p-04715bf0.entry.js +1 -0
- package/dist/ldf/p-0491d1d2.js +1 -0
- package/dist/ldf/p-07d6d3ad.entry.js +1 -0
- package/dist/ldf/p-08584ccc.entry.js +1 -0
- package/dist/ldf/p-0873a34a.entry.js +1 -0
- package/dist/ldf/p-0ab55cf6.js +1 -0
- package/dist/ldf/p-1482a707.js +1 -0
- package/dist/ldf/p-177ede88.js +1 -0
- package/dist/ldf/p-1902f41e.entry.js +1 -0
- package/dist/ldf/p-1a8e2899.entry.js +1 -0
- package/dist/ldf/p-1c8cc5bf.entry.js +1 -0
- package/dist/ldf/p-1ff665a7.entry.js +1 -0
- package/dist/ldf/p-21e2f0a3.entry.js +1 -0
- package/dist/ldf/p-23af1bc3.entry.js +1 -0
- package/dist/ldf/p-25a736f1.entry.js +1 -0
- package/dist/ldf/p-2ae548b3.entry.js +1 -0
- package/dist/ldf/p-2c36a583.entry.js +1 -0
- package/dist/ldf/p-302dc0d5.entry.js +1 -0
- package/dist/ldf/p-327b14ac.entry.js +1 -0
- package/dist/ldf/p-32f7ba8e.entry.js +1 -0
- package/dist/ldf/p-3545fcdc.entry.js +1 -0
- package/dist/ldf/p-374118d7.entry.js +1 -0
- package/dist/ldf/p-380f8655.entry.js +1 -0
- package/dist/ldf/p-3c9930ff.entry.js +1 -0
- package/dist/ldf/p-3ca74c80.js +8 -0
- package/dist/ldf/p-3e8ff66b.js +1 -0
- package/dist/ldf/p-3f39c2ad.entry.js +1 -0
- package/dist/ldf/p-3f8ef67b.entry.js +1 -0
- package/dist/ldf/p-402c811f.js +1 -0
- package/dist/ldf/p-430c418a.entry.js +1 -0
- package/dist/ldf/p-476327d6.js +1 -0
- package/dist/ldf/p-48e44122.js +1 -0
- package/dist/ldf/p-4a4380fa.entry.js +1 -0
- package/dist/ldf/p-4aa9a6f2.js +1 -0
- package/dist/ldf/p-4b80de48.js +1 -0
- package/dist/ldf/p-4e0b3c0f.entry.js +1 -0
- package/dist/ldf/p-5066eaa5.js +1 -0
- package/dist/ldf/p-52656429.entry.js +1 -0
- package/dist/ldf/p-55d797c1.js +1 -0
- package/dist/ldf/p-59340423.entry.js +1 -0
- package/dist/ldf/p-594fa9d4.entry.js +1 -0
- package/dist/ldf/p-5b43e6be.js +1 -0
- package/dist/ldf/p-5b51185b.js +1 -0
- package/dist/ldf/p-5be7ff17.entry.js +1 -0
- package/dist/ldf/p-5ea6de28.entry.js +1 -0
- package/dist/ldf/p-63b5daf6.entry.js +1 -0
- package/dist/ldf/p-65563763.entry.js +1 -0
- package/dist/ldf/p-65d26c45.js +1 -0
- package/dist/ldf/p-65ea7ab3.entry.js +1 -0
- package/dist/ldf/p-66a7385e.entry.js +1 -0
- package/dist/ldf/p-6857574d.js +1 -0
- package/dist/ldf/p-69f85ad3.entry.js +1 -0
- package/dist/ldf/p-6fe24d85.entry.js +1 -0
- package/dist/ldf/p-70e47f8b.entry.js +1 -0
- package/dist/ldf/p-714cf0b2.js +1 -0
- package/dist/ldf/p-718ae824.js +1 -0
- package/dist/ldf/p-78da8fe1.js +1 -0
- package/dist/ldf/p-79a526a1.entry.js +1 -0
- package/dist/ldf/p-7abeb82c.entry.js +1 -0
- package/dist/ldf/p-7efa633b.entry.js +1 -0
- package/dist/ldf/p-800a115c.entry.js +1 -0
- package/dist/ldf/p-84f38db6.entry.js +1 -0
- package/dist/ldf/p-8767a74e.entry.js +1 -0
- package/dist/ldf/p-88dbd8b6.js +1 -0
- package/dist/ldf/p-8932ec85.entry.js +1 -0
- package/dist/ldf/p-8c2727db.entry.js +1 -0
- package/dist/ldf/p-8ec26587.js +1 -0
- package/dist/ldf/p-8f67abb8.js +3 -0
- package/dist/ldf/p-9155f066.js +1 -0
- package/dist/ldf/p-978e2c6d.js +1 -0
- package/dist/ldf/p-991c0877.js +1 -0
- package/dist/ldf/p-9bd5d1d4.entry.js +1 -0
- package/dist/ldf/p-9c1973a6.entry.js +1 -0
- package/dist/ldf/p-9c397c49.entry.js +1 -0
- package/dist/ldf/p-9e2c172e.entry.js +1 -0
- package/dist/ldf/p-a1729dbd.js +1 -0
- package/dist/ldf/p-ac7a17ce.entry.js +1 -0
- package/dist/ldf/p-acbbd1ec.js +1 -0
- package/dist/ldf/p-afc1a02c.js +1 -0
- package/dist/ldf/p-b1242016.js +1 -0
- package/dist/ldf/p-b62e8f49.js +1 -0
- package/dist/ldf/p-b7388aec.entry.js +1 -0
- package/dist/ldf/p-b78336d7.entry.js +1 -0
- package/dist/ldf/p-ba021918.entry.js +1 -0
- package/dist/ldf/p-bdcf2b02.entry.js +1 -0
- package/dist/ldf/p-c1df632d.entry.js +1 -0
- package/dist/ldf/p-c3042920.entry.js +1 -0
- package/dist/ldf/p-c3807857.entry.js +1 -0
- package/dist/ldf/p-c3841978.entry.js +1 -0
- package/dist/ldf/p-c41e055c.entry.js +1 -0
- package/dist/ldf/p-c60a875b.js +1 -0
- package/dist/ldf/p-c6163f81.entry.js +1 -0
- package/dist/ldf/p-c6a8f4aa.js +1 -0
- package/dist/ldf/p-c6b42618.entry.js +1 -0
- package/dist/ldf/p-c74d3fd0.entry.js +1 -0
- package/dist/ldf/p-c82dd468.entry.js +1 -0
- package/dist/ldf/p-ca698b8f.entry.js +1 -0
- package/dist/ldf/p-cbfbb80c.entry.js +1 -0
- package/dist/ldf/p-d195c957.entry.js +1 -0
- package/dist/ldf/p-d282d4f9.js +1 -0
- package/dist/ldf/p-d7966e9b.entry.js +1 -0
- package/dist/ldf/p-d7f8c770.js +1 -0
- package/dist/ldf/p-d9c1c1f6.js +1 -0
- package/dist/ldf/p-dc445c36.entry.js +1 -0
- package/dist/ldf/p-dd99e42a.entry.js +1 -0
- package/dist/ldf/p-de5bb5ad.js +1 -0
- package/dist/ldf/p-e0e12ae3.entry.js +1 -0
- package/dist/ldf/p-e215fd02.entry.js +1 -0
- package/dist/ldf/p-e4be11ad.entry.js +1 -0
- package/dist/ldf/p-e4f0cd91.entry.js +1 -0
- package/dist/ldf/p-e911e60d.js +1 -0
- package/dist/ldf/p-ea66c343.entry.js +1 -0
- package/dist/ldf/p-ec5eecdc.entry.js +1 -0
- package/dist/ldf/p-ed3327fa.js +1 -0
- package/dist/ldf/p-f0de7628.entry.js +1 -0
- package/dist/ldf/p-f2ce126e.js +1 -0
- package/dist/ldf/p-f3a0c163.js +1 -0
- package/dist/ldf/p-fa191f47.entry.js +1 -0
- package/dist/ldf/p-fe59a676.entry.js +1 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +363 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +285 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +483 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +501 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +7 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +22 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +22 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +277 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +305 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +26 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +26 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +58 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +62 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +440 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +428 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +128 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +151 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +101 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +95 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +61 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +63 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +37 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +35 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +28 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +26 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +27 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +27 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +147 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +150 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +194 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +194 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +167 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +106 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +106 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +61 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +324 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +293 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +116 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +33 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +37 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +151 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +92 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +40 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +54 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +54 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +172 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +172 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +563 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +630 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +204 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +297 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +186 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +180 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +88 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +85 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +42 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +152 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +163 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +91 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +114 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +118 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +94 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +113 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +104 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +131 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +175 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +178 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +158 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +104 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +10 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +16 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +17 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +216 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +203 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +122 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +123 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +117 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +82 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +191 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +191 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +151 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +152 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +275 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +320 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +177 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +210 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +15 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +15 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +33 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +58 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +29 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/route-outlet.css +10 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +4 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +348 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +279 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +64 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +35 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +442 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +424 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +123 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +123 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.css +14 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +53 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/slide/slide.css +31 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.ios.css +764 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.md.css +764 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +154 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +96 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +81 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +308 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +331 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +19 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +142 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +146 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +21 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +110 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +55 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +249 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +282 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +214 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +211 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +174 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +167 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/virtual-scroll/virtual-scroll.css +21 -0
- package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +101 -0
- package/package.json +2 -2
- package/dist/ldf/_commonjsHelpers-8fe71198.js +0 -44
- package/dist/ldf/css-shim-5630fd5e.js +0 -4
- package/dist/ldf/dom-bd0bf1dc.js +0 -73
- package/dist/ldf/index-f441adec.js +0 -2901
- package/dist/ldf/index-f4e3260e.js +0 -36
- package/dist/ldf/ion-button.entry.js +0 -109
- package/dist/ldf/ion-buttons.entry.js +0 -38
- package/dist/ldf/ion-card-content.entry.js +0 -26
- package/dist/ldf/ion-card-header.entry.js +0 -29
- package/dist/ldf/ion-card-title.entry.js +0 -23
- package/dist/ldf/ion-col.entry.js +0 -114
- package/dist/ldf/ion-content.entry.js +0 -299
- package/dist/ldf/ion-grid.entry.js +0 -24
- package/dist/ldf/ion-header.entry.js +0 -255
- package/dist/ldf/ion-icon.entry.js +0 -172
- package/dist/ldf/ion-input.entry.js +0 -216
- package/dist/ldf/ion-item.entry.js +0 -119
- package/dist/ldf/ion-label.entry.js +0 -51
- package/dist/ldf/ion-list.entry.js +0 -48
- package/dist/ldf/ion-radio-group.entry.js +0 -57
- package/dist/ldf/ion-ripple-effect.entry.js +0 -89
- package/dist/ldf/ion-row.entry.js +0 -16
- package/dist/ldf/ion-searchbar.entry.js +0 -326
- package/dist/ldf/ion-segment-button.entry.js +0 -88
- package/dist/ldf/ion-segment.entry.js +0 -296
- package/dist/ldf/ion-select-option.entry.js +0 -23
- package/dist/ldf/ion-skeleton-text.entry.js +0 -29
- package/dist/ldf/ion-title.entry.js +0 -44
- package/dist/ldf/ion-toggle.entry.js +0 -152
- package/dist/ldf/ion-toolbar.entry.js +0 -67
- package/dist/ldf/ldf-bible-reading.entry.js +0 -252
- package/dist/ldf/ldf-editable-add-block.entry.js +0 -49
- package/dist/ldf/ldf-editable-antiphon-field.entry.js +0 -223
- package/dist/ldf/ldf-editable-boolean.entry.js +0 -42
- package/dist/ldf/ldf-editable-delete.entry.js +0 -97
- package/dist/ldf/ldf-editable-lookup.entry.js +0 -115
- package/dist/ldf/ldf-editable-metadata-buttons.entry.js +0 -293
- package/dist/ldf/ldf-editable-select.entry.js +0 -33
- package/dist/ldf/ldf-heading.entry.js +0 -124
- package/dist/ldf/ldf-image.entry.js +0 -195
- package/dist/ldf/ldf-label-bar.entry.js +0 -22
- package/dist/ldf/ldf-liturgical-document.entry.js +0 -462
- package/dist/ldf/ldf-liturgy.entry.js +0 -49
- package/dist/ldf/ldf-meditation.entry.js +0 -180
- package/dist/ldf/ldf-prayers-and-thanksgivings.entry.js +0 -136
- package/dist/ldf/ldf-psalm.entry.js +0 -267
- package/dist/ldf/ldf-refrain.entry.js +0 -42
- package/dist/ldf/ldf-responsive-prayer.entry.js +0 -137
- package/dist/ldf/ldf-rubric.entry.js +0 -41
- package/dist/ldf/shadow-css-10669ec3.js +0 -383
- package/dist/ldf/utils-8d15f916.js +0 -91
|
@@ -1,24 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopNamespace(e) {
|
|
4
|
+
if (e && e.__esModule) return e;
|
|
5
|
+
var n = Object.create(null);
|
|
6
|
+
if (e) {
|
|
7
|
+
Object.keys(e).forEach(function (k) {
|
|
8
|
+
if (k !== 'default') {
|
|
9
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return e[k];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
n['default'] = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
|
|
1
23
|
const NAMESPACE = 'ldf';
|
|
2
|
-
const BUILD = /* ldf */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: true, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: true, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: true, hostListenerTargetWindow: true, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, 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: true, watchCallback: true };
|
|
3
|
-
const Env = /* ldf */ {};
|
|
4
24
|
|
|
5
25
|
let scopeId;
|
|
6
26
|
let contentRef;
|
|
7
27
|
let hostTagName;
|
|
8
|
-
let customError;
|
|
9
|
-
let i = 0;
|
|
10
28
|
let useNativeShadowDom = false;
|
|
11
29
|
let checkSlotFallbackVisibility = false;
|
|
12
30
|
let checkSlotRelocate = false;
|
|
13
31
|
let isSvgMode = false;
|
|
14
|
-
let renderingRef = null;
|
|
15
|
-
let queueCongestion = 0;
|
|
16
32
|
let queuePending = false;
|
|
17
33
|
const win = typeof window !== 'undefined' ? window : {};
|
|
18
|
-
const CSS = BUILD.cssVarShim ? win.CSS : null;
|
|
19
34
|
const doc = win.document || { head: {} };
|
|
20
|
-
const H = (win.HTMLElement || class {
|
|
21
|
-
});
|
|
22
35
|
const plt = {
|
|
23
36
|
$flags$: 0,
|
|
24
37
|
$resourcesUrl$: '',
|
|
@@ -28,22 +41,8 @@ const plt = {
|
|
|
28
41
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
29
42
|
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
30
43
|
};
|
|
31
|
-
const supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)() : true;
|
|
32
|
-
const supportsListenerOptions = /*@__PURE__*/ (() => {
|
|
33
|
-
let supportsListenerOptions = false;
|
|
34
|
-
try {
|
|
35
|
-
doc.addEventListener('e', null, Object.defineProperty({}, 'passive', {
|
|
36
|
-
get() {
|
|
37
|
-
supportsListenerOptions = true;
|
|
38
|
-
},
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
catch (e) { }
|
|
42
|
-
return supportsListenerOptions;
|
|
43
|
-
})();
|
|
44
44
|
const promiseResolve = (v) => Promise.resolve(v);
|
|
45
|
-
const supportsConstructibleStylesheets =
|
|
46
|
-
? /*@__PURE__*/ (() => {
|
|
45
|
+
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
47
46
|
try {
|
|
48
47
|
new CSSStyleSheet();
|
|
49
48
|
return typeof (new CSSStyleSheet()).replace === 'function';
|
|
@@ -51,15 +50,14 @@ const supportsConstructibleStylesheets = BUILD.constructableCSS
|
|
|
51
50
|
catch (e) { }
|
|
52
51
|
return false;
|
|
53
52
|
})()
|
|
54
|
-
|
|
55
|
-
const Context = {};
|
|
53
|
+
;
|
|
56
54
|
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
57
|
-
if (
|
|
55
|
+
if (listeners) {
|
|
58
56
|
// this is called immediately within the element's constructor
|
|
59
57
|
// initialize our event listeners on the host element
|
|
60
58
|
// we do this now so that we can listen to events that may
|
|
61
59
|
// have fired even before the instance is ready
|
|
62
|
-
|
|
60
|
+
{
|
|
63
61
|
// this component may have event listeners that should be attached to the parent
|
|
64
62
|
if (attachParentListeners) {
|
|
65
63
|
// this is being ran from within the connectedCallback
|
|
@@ -75,7 +73,7 @@ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =
|
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
listeners.map(([flags, name, method]) => {
|
|
78
|
-
const target =
|
|
76
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
79
77
|
const handler = hostListenerProxy(hostRef, method);
|
|
80
78
|
const opts = hostListenerOpts(flags);
|
|
81
79
|
plt.ael(target, name, handler, opts);
|
|
@@ -85,7 +83,7 @@ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =
|
|
|
85
83
|
};
|
|
86
84
|
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
87
85
|
try {
|
|
88
|
-
|
|
86
|
+
{
|
|
89
87
|
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
90
88
|
// instance is ready, let's call it's member method for this event
|
|
91
89
|
hostRef.$lazyInstance$[methodName](ev);
|
|
@@ -94,127 +92,40 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
94
92
|
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
|
-
else {
|
|
98
|
-
hostRef.$hostElement$[methodName](ev);
|
|
99
|
-
}
|
|
100
95
|
}
|
|
101
96
|
catch (e) {
|
|
102
97
|
consoleError(e);
|
|
103
98
|
}
|
|
104
99
|
};
|
|
105
100
|
const getHostListenerTarget = (elm, flags) => {
|
|
106
|
-
if (
|
|
101
|
+
if (flags & 4 /* TargetDocument */)
|
|
107
102
|
return doc;
|
|
108
|
-
if (
|
|
103
|
+
if (flags & 8 /* TargetWindow */)
|
|
109
104
|
return win;
|
|
110
|
-
if (
|
|
105
|
+
if (flags & 16 /* TargetBody */)
|
|
111
106
|
return doc.body;
|
|
112
|
-
if (
|
|
107
|
+
if (flags & 32 /* TargetParent */)
|
|
113
108
|
return elm.parentElement;
|
|
114
109
|
return elm;
|
|
115
110
|
};
|
|
116
111
|
// prettier-ignore
|
|
117
|
-
const hostListenerOpts = (flags) =>
|
|
118
|
-
? ({
|
|
119
|
-
passive: (flags & 1 /* Passive */) !== 0,
|
|
120
|
-
capture: (flags & 2 /* Capture */) !== 0,
|
|
121
|
-
})
|
|
122
|
-
: (flags & 2 /* Capture */) !== 0;
|
|
123
|
-
const CONTENT_REF_ID = 'r';
|
|
124
|
-
const ORG_LOCATION_ID = 'o';
|
|
125
|
-
const SLOT_NODE_ID = 's';
|
|
126
|
-
const TEXT_NODE_ID = 't';
|
|
127
|
-
const HYDRATE_ID = 's-id';
|
|
128
|
-
const HYDRATED_STYLE_ID = 'sty-id';
|
|
129
|
-
const HYDRATE_CHILD_ID = 'c-id';
|
|
112
|
+
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
130
113
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
131
114
|
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
132
115
|
const createTime = (fnName, tagName = '') => {
|
|
133
|
-
|
|
134
|
-
const key = `st:${fnName}:${tagName}:${i++}`;
|
|
135
|
-
// Start
|
|
136
|
-
performance.mark(key);
|
|
137
|
-
// End
|
|
138
|
-
return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
116
|
+
{
|
|
141
117
|
return () => {
|
|
142
118
|
return;
|
|
143
119
|
};
|
|
144
120
|
}
|
|
145
121
|
};
|
|
146
122
|
const uniqueTime = (key, measureText) => {
|
|
147
|
-
|
|
148
|
-
if (performance.getEntriesByName(key).length === 0) {
|
|
149
|
-
performance.mark(key);
|
|
150
|
-
}
|
|
151
|
-
return () => {
|
|
152
|
-
if (performance.getEntriesByName(measureText).length === 0) {
|
|
153
|
-
performance.measure(measureText, key);
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
123
|
+
{
|
|
158
124
|
return () => {
|
|
159
125
|
return;
|
|
160
126
|
};
|
|
161
127
|
}
|
|
162
128
|
};
|
|
163
|
-
const inspect = (ref) => {
|
|
164
|
-
const hostRef = getHostRef(ref);
|
|
165
|
-
if (!hostRef) {
|
|
166
|
-
return undefined;
|
|
167
|
-
}
|
|
168
|
-
const flags = hostRef.$flags$;
|
|
169
|
-
const hostElement = hostRef.$hostElement$;
|
|
170
|
-
return {
|
|
171
|
-
renderCount: hostRef.$renderCount$,
|
|
172
|
-
flags: {
|
|
173
|
-
hasRendered: !!(flags & 2 /* hasRendered */),
|
|
174
|
-
hasConnected: !!(flags & 1 /* hasConnected */),
|
|
175
|
-
isWaitingForChildren: !!(flags & 4 /* isWaitingForChildren */),
|
|
176
|
-
isConstructingInstance: !!(flags & 8 /* isConstructingInstance */),
|
|
177
|
-
isQueuedForUpdate: !!(flags & 16 /* isQueuedForUpdate */),
|
|
178
|
-
hasInitializedComponent: !!(flags & 32 /* hasInitializedComponent */),
|
|
179
|
-
hasLoadedComponent: !!(flags & 64 /* hasLoadedComponent */),
|
|
180
|
-
isWatchReady: !!(flags & 128 /* isWatchReady */),
|
|
181
|
-
isListenReady: !!(flags & 256 /* isListenReady */),
|
|
182
|
-
needsRerender: !!(flags & 512 /* needsRerender */),
|
|
183
|
-
},
|
|
184
|
-
instanceValues: hostRef.$instanceValues$,
|
|
185
|
-
ancestorComponent: hostRef.$ancestorComponent$,
|
|
186
|
-
hostElement,
|
|
187
|
-
lazyInstance: hostRef.$lazyInstance$,
|
|
188
|
-
vnode: hostRef.$vnode$,
|
|
189
|
-
modeName: hostRef.$modeName$,
|
|
190
|
-
onReadyPromise: hostRef.$onReadyPromise$,
|
|
191
|
-
onReadyResolve: hostRef.$onReadyResolve$,
|
|
192
|
-
onInstancePromise: hostRef.$onInstancePromise$,
|
|
193
|
-
onInstanceResolve: hostRef.$onInstanceResolve$,
|
|
194
|
-
onRenderResolve: hostRef.$onRenderResolve$,
|
|
195
|
-
queuedListeners: hostRef.$queuedListeners$,
|
|
196
|
-
rmListeners: hostRef.$rmListeners$,
|
|
197
|
-
['s-id']: hostElement['s-id'],
|
|
198
|
-
['s-cr']: hostElement['s-cr'],
|
|
199
|
-
['s-lr']: hostElement['s-lr'],
|
|
200
|
-
['s-p']: hostElement['s-p'],
|
|
201
|
-
['s-rc']: hostElement['s-rc'],
|
|
202
|
-
['s-sc']: hostElement['s-sc'],
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
const installDevTools = () => {
|
|
206
|
-
if (BUILD.devTools) {
|
|
207
|
-
const stencil = (win.stencil = win.stencil || {});
|
|
208
|
-
const originalInspect = stencil.inspect;
|
|
209
|
-
stencil.inspect = (ref) => {
|
|
210
|
-
let result = inspect(ref);
|
|
211
|
-
if (!result && typeof originalInspect === 'function') {
|
|
212
|
-
result = originalInspect(ref);
|
|
213
|
-
}
|
|
214
|
-
return result;
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
129
|
const rootAppliedStyles = new WeakMap();
|
|
219
130
|
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
220
131
|
let style = styles.get(scopeId);
|
|
@@ -230,9 +141,6 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
230
141
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
231
142
|
let scopeId = getScopeId(cmpMeta, mode);
|
|
232
143
|
let style = styles.get(scopeId);
|
|
233
|
-
if (!BUILD.attachStyles) {
|
|
234
|
-
return scopeId;
|
|
235
|
-
}
|
|
236
144
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
237
145
|
// so the fallback is to always use the document for the root node in those cases
|
|
238
146
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -245,29 +153,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
245
153
|
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
246
154
|
}
|
|
247
155
|
if (!appliedStyles.has(scopeId)) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
styleElm.innerHTML = style;
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
254
|
-
styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */));
|
|
255
|
-
const newScopeId = styleElm['s-sc'];
|
|
256
|
-
if (newScopeId) {
|
|
257
|
-
scopeId = newScopeId;
|
|
258
|
-
// we don't want to add this styleID to the appliedStyles Set
|
|
259
|
-
// since the cssVarShim might need to apply several different
|
|
260
|
-
// stylesheets for the same component
|
|
261
|
-
appliedStyles = null;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
156
|
+
{
|
|
157
|
+
{
|
|
265
158
|
styleElm = doc.createElement('style');
|
|
266
159
|
styleElm.innerHTML = style;
|
|
267
160
|
}
|
|
268
|
-
if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) {
|
|
269
|
-
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId);
|
|
270
|
-
}
|
|
271
161
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
272
162
|
}
|
|
273
163
|
if (appliedStyles) {
|
|
@@ -275,7 +165,7 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
275
165
|
}
|
|
276
166
|
}
|
|
277
167
|
}
|
|
278
|
-
else if (
|
|
168
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
279
169
|
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
280
170
|
}
|
|
281
171
|
}
|
|
@@ -286,8 +176,8 @@ const attachStyles = (hostRef) => {
|
|
|
286
176
|
const elm = hostRef.$hostElement$;
|
|
287
177
|
const flags = cmpMeta.$flags$;
|
|
288
178
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
289
|
-
const scopeId = addStyle(
|
|
290
|
-
if (
|
|
179
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$);
|
|
180
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
291
181
|
// only required when we're NOT using native shadow dom (slot)
|
|
292
182
|
// or this browser doesn't support native shadow dom
|
|
293
183
|
// and this host element was NOT created with SSR
|
|
@@ -297,14 +187,13 @@ const attachStyles = (hostRef) => {
|
|
|
297
187
|
// DOM WRITE!!
|
|
298
188
|
elm['s-sc'] = scopeId;
|
|
299
189
|
elm.classList.add(scopeId + '-h');
|
|
300
|
-
if (
|
|
190
|
+
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
301
191
|
elm.classList.add(scopeId + '-s');
|
|
302
192
|
}
|
|
303
193
|
}
|
|
304
194
|
endAttachStyles();
|
|
305
195
|
};
|
|
306
|
-
const getScopeId = (cmp, mode) => 'sc-' + (
|
|
307
|
-
const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
|
|
196
|
+
const getScopeId = (cmp, mode) => 'sc-' + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
|
|
308
197
|
// Private
|
|
309
198
|
const computeMode = (elm) => modeResolutionChain.map(h => h(elm)).find(m => !!m);
|
|
310
199
|
// Public
|
|
@@ -357,11 +246,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
357
246
|
if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
|
|
358
247
|
child = String(child);
|
|
359
248
|
}
|
|
360
|
-
else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {
|
|
361
|
-
consoleDevError(`vNode passed as children has unexpected type.
|
|
362
|
-
Make sure it's using the correct h() function.
|
|
363
|
-
Empty objects can also be the cause, look for JSX comments that became objects.`);
|
|
364
|
-
}
|
|
365
249
|
if (simple && lastSimple) {
|
|
366
250
|
// If the previous child was simple (string), we merge both
|
|
367
251
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -376,17 +260,14 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
376
260
|
};
|
|
377
261
|
walk(children);
|
|
378
262
|
if (vnodeData) {
|
|
379
|
-
if (BUILD.isDev && nodeName === 'input') {
|
|
380
|
-
validateInputProperties(vnodeData);
|
|
381
|
-
}
|
|
382
263
|
// normalize class / classname attributes
|
|
383
|
-
if (
|
|
264
|
+
if (vnodeData.key) {
|
|
384
265
|
key = vnodeData.key;
|
|
385
266
|
}
|
|
386
|
-
if (
|
|
267
|
+
if (vnodeData.name) {
|
|
387
268
|
slotName = vnodeData.name;
|
|
388
269
|
}
|
|
389
|
-
|
|
270
|
+
{
|
|
390
271
|
const classData = vnodeData.className || vnodeData.class;
|
|
391
272
|
if (classData) {
|
|
392
273
|
vnodeData.class =
|
|
@@ -398,12 +279,7 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
398
279
|
}
|
|
399
280
|
}
|
|
400
281
|
}
|
|
401
|
-
if (
|
|
402
|
-
consoleDevError(`The <Host> must be the single root component. Make sure:
|
|
403
|
-
- You are NOT using hostData() and <Host> in the same component.
|
|
404
|
-
- <Host> is used once, and it's the single root component of the render() function.`);
|
|
405
|
-
}
|
|
406
|
-
if (BUILD.vdomFunctional && typeof nodeName === 'function') {
|
|
282
|
+
if (typeof nodeName === 'function') {
|
|
407
283
|
// nodeName is a functional component
|
|
408
284
|
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
409
285
|
}
|
|
@@ -412,10 +288,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
412
288
|
if (vNodeChildren.length > 0) {
|
|
413
289
|
vnode.$children$ = vNodeChildren;
|
|
414
290
|
}
|
|
415
|
-
|
|
291
|
+
{
|
|
416
292
|
vnode.$key$ = key;
|
|
417
293
|
}
|
|
418
|
-
|
|
294
|
+
{
|
|
419
295
|
vnode.$name$ = slotName;
|
|
420
296
|
}
|
|
421
297
|
return vnode;
|
|
@@ -428,13 +304,13 @@ const newVNode = (tag, text) => {
|
|
|
428
304
|
$elm$: null,
|
|
429
305
|
$children$: null,
|
|
430
306
|
};
|
|
431
|
-
|
|
307
|
+
{
|
|
432
308
|
vnode.$attrs$ = null;
|
|
433
309
|
}
|
|
434
|
-
|
|
310
|
+
{
|
|
435
311
|
vnode.$key$ = null;
|
|
436
312
|
}
|
|
437
|
-
|
|
313
|
+
{
|
|
438
314
|
vnode.$name$ = null;
|
|
439
315
|
}
|
|
440
316
|
return vnode;
|
|
@@ -471,20 +347,6 @@ const convertToPrivate = (node) => {
|
|
|
471
347
|
vnode.$name$ = node.vname;
|
|
472
348
|
return vnode;
|
|
473
349
|
};
|
|
474
|
-
const validateInputProperties = (vnodeData) => {
|
|
475
|
-
const props = Object.keys(vnodeData);
|
|
476
|
-
const typeIndex = props.indexOf('type');
|
|
477
|
-
const minIndex = props.indexOf('min');
|
|
478
|
-
const maxIndex = props.indexOf('max');
|
|
479
|
-
const stepIndex = props.indexOf('min');
|
|
480
|
-
const value = props.indexOf('value');
|
|
481
|
-
if (value === -1) {
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {
|
|
485
|
-
consoleDevWarn(`The "value" prop of <input> should be set after "min", "max", "type" and "step"`);
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
350
|
/**
|
|
489
351
|
* Production setAccessor() function based on Preact by
|
|
490
352
|
* Jason Miller (@developit)
|
|
@@ -497,19 +359,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
497
359
|
if (oldValue !== newValue) {
|
|
498
360
|
let isProp = isMemberInElement(elm, memberName);
|
|
499
361
|
let ln = memberName.toLowerCase();
|
|
500
|
-
if (
|
|
362
|
+
if (memberName === 'class') {
|
|
501
363
|
const classList = elm.classList;
|
|
502
364
|
const oldClasses = parseClassList(oldValue);
|
|
503
365
|
const newClasses = parseClassList(newValue);
|
|
504
366
|
classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
|
|
505
367
|
classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
|
|
506
368
|
}
|
|
507
|
-
else if (
|
|
369
|
+
else if (memberName === 'style') {
|
|
508
370
|
// update style attribute, css properties and values
|
|
509
|
-
|
|
371
|
+
{
|
|
510
372
|
for (const prop in oldValue) {
|
|
511
373
|
if (!newValue || newValue[prop] == null) {
|
|
512
|
-
if (
|
|
374
|
+
if (prop.includes('-')) {
|
|
513
375
|
elm.style.removeProperty(prop);
|
|
514
376
|
}
|
|
515
377
|
else {
|
|
@@ -520,7 +382,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
520
382
|
}
|
|
521
383
|
for (const prop in newValue) {
|
|
522
384
|
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
523
|
-
if (
|
|
385
|
+
if (prop.includes('-')) {
|
|
524
386
|
elm.style.setProperty(prop, newValue[prop]);
|
|
525
387
|
}
|
|
526
388
|
else {
|
|
@@ -529,15 +391,15 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
529
391
|
}
|
|
530
392
|
}
|
|
531
393
|
}
|
|
532
|
-
else if (
|
|
394
|
+
else if (memberName === 'key')
|
|
533
395
|
;
|
|
534
|
-
else if (
|
|
396
|
+
else if (memberName === 'ref') {
|
|
535
397
|
// minifier will clean this up
|
|
536
398
|
if (newValue) {
|
|
537
399
|
newValue(elm);
|
|
538
400
|
}
|
|
539
401
|
}
|
|
540
|
-
else if (
|
|
402
|
+
else if ((!isProp ) && memberName[0] === 'o' && memberName[1] === 'n') {
|
|
541
403
|
// Event Handlers
|
|
542
404
|
// so if the member name starts with "on" and the 3rd characters is
|
|
543
405
|
// a capital letter, and it's not already a member on the element,
|
|
@@ -574,7 +436,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
574
436
|
plt.ael(elm, memberName, newValue, false);
|
|
575
437
|
}
|
|
576
438
|
}
|
|
577
|
-
else
|
|
439
|
+
else {
|
|
578
440
|
// Set property if it exists and it's not a SVG
|
|
579
441
|
const isComplex = isComplexType(newValue);
|
|
580
442
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
@@ -604,7 +466,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
604
466
|
* - if the newValue is null/undefined or 'false'.
|
|
605
467
|
*/
|
|
606
468
|
let xlink = false;
|
|
607
|
-
|
|
469
|
+
{
|
|
608
470
|
if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
|
|
609
471
|
memberName = ln;
|
|
610
472
|
xlink = true;
|
|
@@ -612,7 +474,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
612
474
|
}
|
|
613
475
|
if (newValue == null || newValue === false) {
|
|
614
476
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
615
|
-
if (
|
|
477
|
+
if (xlink) {
|
|
616
478
|
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
617
479
|
}
|
|
618
480
|
else {
|
|
@@ -622,7 +484,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
622
484
|
}
|
|
623
485
|
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
624
486
|
newValue = newValue === true ? '' : newValue;
|
|
625
|
-
if (
|
|
487
|
+
if (xlink) {
|
|
626
488
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
627
489
|
}
|
|
628
490
|
else {
|
|
@@ -641,7 +503,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
641
503
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
642
504
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
643
505
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
644
|
-
|
|
506
|
+
{
|
|
645
507
|
// remove attributes no longer present on the vnode by setting them to undefined
|
|
646
508
|
for (memberName in oldVnodeAttrs) {
|
|
647
509
|
if (!(memberName in newVnodeAttrs)) {
|
|
@@ -661,7 +523,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
661
523
|
let elm;
|
|
662
524
|
let childNode;
|
|
663
525
|
let oldVNode;
|
|
664
|
-
if (
|
|
526
|
+
if (!useNativeShadowDom) {
|
|
665
527
|
// remember for later we need to check to relocate nodes
|
|
666
528
|
checkSlotRelocate = true;
|
|
667
529
|
if (newVNode.$tag$ === 'slot') {
|
|
@@ -676,33 +538,29 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
676
538
|
1 /* isSlotReference */;
|
|
677
539
|
}
|
|
678
540
|
}
|
|
679
|
-
if (
|
|
680
|
-
consoleDevError(`The JSX ${newVNode.$text$ !== null ? `"${newVNode.$text$}" text` : `"${newVNode.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`);
|
|
681
|
-
}
|
|
682
|
-
if (BUILD.vdomText && newVNode.$text$ !== null) {
|
|
541
|
+
if (newVNode.$text$ !== null) {
|
|
683
542
|
// create text node
|
|
684
543
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
685
544
|
}
|
|
686
|
-
else if (
|
|
545
|
+
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
687
546
|
// create a slot reference node
|
|
688
|
-
elm = newVNode.$elm$ =
|
|
547
|
+
elm = newVNode.$elm$ = doc.createTextNode('');
|
|
689
548
|
}
|
|
690
549
|
else {
|
|
691
|
-
if (
|
|
550
|
+
if (!isSvgMode) {
|
|
692
551
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
693
552
|
}
|
|
694
553
|
// create element
|
|
695
|
-
elm = newVNode.$elm$ = (
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
554
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$)
|
|
555
|
+
);
|
|
556
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
699
557
|
isSvgMode = false;
|
|
700
558
|
}
|
|
701
559
|
// add css classes, attrs, props, listeners, etc.
|
|
702
|
-
|
|
560
|
+
{
|
|
703
561
|
updateElement(null, newVNode, isSvgMode);
|
|
704
562
|
}
|
|
705
|
-
if (
|
|
563
|
+
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
706
564
|
// if there is a scopeId and this is the initial render
|
|
707
565
|
// then let's add the scopeId as a css class
|
|
708
566
|
elm.classList.add((elm['s-si'] = scopeId));
|
|
@@ -718,7 +576,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
718
576
|
}
|
|
719
577
|
}
|
|
720
578
|
}
|
|
721
|
-
|
|
579
|
+
{
|
|
722
580
|
if (newVNode.$tag$ === 'svg') {
|
|
723
581
|
// Only reset the SVG context when we're exiting <svg> element
|
|
724
582
|
isSvgMode = false;
|
|
@@ -729,7 +587,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
729
587
|
}
|
|
730
588
|
}
|
|
731
589
|
}
|
|
732
|
-
|
|
590
|
+
{
|
|
733
591
|
elm['s-hn'] = hostTagName;
|
|
734
592
|
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
735
593
|
// remember the content reference comment
|
|
@@ -774,9 +632,9 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
774
632
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
775
633
|
};
|
|
776
634
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
777
|
-
let containerElm = ((
|
|
635
|
+
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
778
636
|
let childNode;
|
|
779
|
-
if (
|
|
637
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
780
638
|
containerElm = containerElm.shadowRoot;
|
|
781
639
|
}
|
|
782
640
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
@@ -784,7 +642,7 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
784
642
|
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
785
643
|
if (childNode) {
|
|
786
644
|
vnodes[startIdx].$elm$ = childNode;
|
|
787
|
-
containerElm.insertBefore(childNode,
|
|
645
|
+
containerElm.insertBefore(childNode, referenceNode(before) );
|
|
788
646
|
}
|
|
789
647
|
}
|
|
790
648
|
}
|
|
@@ -794,7 +652,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
794
652
|
if ((vnode = vnodes[startIdx])) {
|
|
795
653
|
elm = vnode.$elm$;
|
|
796
654
|
callNodeRefs(vnode);
|
|
797
|
-
|
|
655
|
+
{
|
|
798
656
|
// we're removing this element
|
|
799
657
|
// so it's possible we need to show slot fallback content now
|
|
800
658
|
checkSlotFallbackVisibility = true;
|
|
@@ -852,7 +710,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
852
710
|
}
|
|
853
711
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
854
712
|
// Vnode moved right
|
|
855
|
-
if (
|
|
713
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
856
714
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
857
715
|
}
|
|
858
716
|
patch(oldStartVnode, newEndVnode);
|
|
@@ -862,7 +720,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
862
720
|
}
|
|
863
721
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
864
722
|
// Vnode moved left
|
|
865
|
-
if (
|
|
723
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
866
724
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
867
725
|
}
|
|
868
726
|
patch(oldEndVnode, newStartVnode);
|
|
@@ -873,7 +731,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
873
731
|
else {
|
|
874
732
|
// createKeyToOldIdx
|
|
875
733
|
idxInOld = -1;
|
|
876
|
-
|
|
734
|
+
{
|
|
877
735
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
878
736
|
if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
|
|
879
737
|
idxInOld = i;
|
|
@@ -881,7 +739,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
881
739
|
}
|
|
882
740
|
}
|
|
883
741
|
}
|
|
884
|
-
if (
|
|
742
|
+
if (idxInOld >= 0) {
|
|
885
743
|
elmToMove = oldCh[idxInOld];
|
|
886
744
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
887
745
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
@@ -899,19 +757,16 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
899
757
|
newStartVnode = newCh[++newStartIdx];
|
|
900
758
|
}
|
|
901
759
|
if (node) {
|
|
902
|
-
|
|
760
|
+
{
|
|
903
761
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
904
762
|
}
|
|
905
|
-
else {
|
|
906
|
-
oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
|
|
907
|
-
}
|
|
908
763
|
}
|
|
909
764
|
}
|
|
910
765
|
}
|
|
911
766
|
if (oldStartIdx > oldEndIdx) {
|
|
912
767
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
913
768
|
}
|
|
914
|
-
else if (
|
|
769
|
+
else if (newStartIdx > newEndIdx) {
|
|
915
770
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
916
771
|
}
|
|
917
772
|
};
|
|
@@ -919,13 +774,12 @@ const isSameVnode = (vnode1, vnode2) => {
|
|
|
919
774
|
// compare if two vnode to see if they're "technically" the same
|
|
920
775
|
// need to have the same element tag, and same key to be the same
|
|
921
776
|
if (vnode1.$tag$ === vnode2.$tag$) {
|
|
922
|
-
if (
|
|
777
|
+
if (vnode1.$tag$ === 'slot') {
|
|
923
778
|
return vnode1.$name$ === vnode2.$name$;
|
|
924
779
|
}
|
|
925
|
-
|
|
780
|
+
{
|
|
926
781
|
return vnode1.$key$ === vnode2.$key$;
|
|
927
782
|
}
|
|
928
|
-
return true;
|
|
929
783
|
}
|
|
930
784
|
return false;
|
|
931
785
|
};
|
|
@@ -944,15 +798,15 @@ const patch = (oldVNode, newVNode) => {
|
|
|
944
798
|
const tag = newVNode.$tag$;
|
|
945
799
|
const text = newVNode.$text$;
|
|
946
800
|
let defaultHolder;
|
|
947
|
-
if (
|
|
948
|
-
|
|
801
|
+
if (text === null) {
|
|
802
|
+
{
|
|
949
803
|
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
950
804
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
951
805
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
952
806
|
}
|
|
953
807
|
// element node
|
|
954
|
-
|
|
955
|
-
if (
|
|
808
|
+
{
|
|
809
|
+
if (tag === 'slot')
|
|
956
810
|
;
|
|
957
811
|
else {
|
|
958
812
|
// either this is the first render of an element OR it's an update
|
|
@@ -961,32 +815,32 @@ const patch = (oldVNode, newVNode) => {
|
|
|
961
815
|
updateElement(oldVNode, newVNode, isSvgMode);
|
|
962
816
|
}
|
|
963
817
|
}
|
|
964
|
-
if (
|
|
818
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
965
819
|
// looks like there's child vnodes for both the old and new vnodes
|
|
966
820
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
967
821
|
}
|
|
968
822
|
else if (newChildren !== null) {
|
|
969
823
|
// no old child vnodes, but there are new child vnodes to add
|
|
970
|
-
if (
|
|
824
|
+
if (oldVNode.$text$ !== null) {
|
|
971
825
|
// the old vnode was text, so be sure to clear it out
|
|
972
826
|
elm.textContent = '';
|
|
973
827
|
}
|
|
974
828
|
// add the new vnode children
|
|
975
829
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
976
830
|
}
|
|
977
|
-
else if (
|
|
831
|
+
else if (oldChildren !== null) {
|
|
978
832
|
// no new child vnodes, but there are old child vnodes to remove
|
|
979
833
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
980
834
|
}
|
|
981
|
-
if (
|
|
835
|
+
if (isSvgMode && tag === 'svg') {
|
|
982
836
|
isSvgMode = false;
|
|
983
837
|
}
|
|
984
838
|
}
|
|
985
|
-
else if (
|
|
839
|
+
else if ((defaultHolder = elm['s-cr'])) {
|
|
986
840
|
// this element has slotted content
|
|
987
841
|
defaultHolder.parentNode.textContent = text;
|
|
988
842
|
}
|
|
989
|
-
else if (
|
|
843
|
+
else if (oldVNode.$text$ !== text) {
|
|
990
844
|
// update the text content for the text only vnode
|
|
991
845
|
// and also only if the text is different than before
|
|
992
846
|
elm.data = text;
|
|
@@ -1124,7 +978,7 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
|
1124
978
|
return slotNameAttr === '';
|
|
1125
979
|
};
|
|
1126
980
|
const callNodeRefs = (vNode) => {
|
|
1127
|
-
|
|
981
|
+
{
|
|
1128
982
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1129
983
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
1130
984
|
}
|
|
@@ -1135,41 +989,26 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1135
989
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1136
990
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1137
991
|
hostTagName = hostElm.tagName;
|
|
1138
|
-
|
|
1139
|
-
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
|
|
1140
|
-
throw new Error(`The <Host> must be the single root component.
|
|
1141
|
-
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
1142
|
-
|
|
1143
|
-
The render() function should look like this instead:
|
|
1144
|
-
|
|
1145
|
-
render() {
|
|
1146
|
-
// Do not return an array
|
|
1147
|
-
return (
|
|
1148
|
-
<Host>{content}</Host>
|
|
1149
|
-
);
|
|
1150
|
-
}
|
|
1151
|
-
`);
|
|
1152
|
-
}
|
|
1153
|
-
if (BUILD.reflect && cmpMeta.$attrsToReflect$) {
|
|
992
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1154
993
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1155
994
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1156
995
|
}
|
|
1157
996
|
rootVnode.$tag$ = null;
|
|
1158
997
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1159
998
|
hostRef.$vnode$ = rootVnode;
|
|
1160
|
-
rootVnode.$elm$ = oldVNode.$elm$ = (
|
|
1161
|
-
|
|
999
|
+
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
1000
|
+
{
|
|
1162
1001
|
scopeId = hostElm['s-sc'];
|
|
1163
1002
|
}
|
|
1164
|
-
|
|
1003
|
+
{
|
|
1165
1004
|
contentRef = hostElm['s-cr'];
|
|
1166
|
-
useNativeShadowDom =
|
|
1005
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1167
1006
|
// always reset
|
|
1168
1007
|
checkSlotFallbackVisibility = false;
|
|
1169
1008
|
}
|
|
1170
1009
|
// synchronous patch
|
|
1171
1010
|
patch(oldVNode, rootVnode);
|
|
1172
|
-
|
|
1011
|
+
{
|
|
1173
1012
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1174
1013
|
// the disconnectCallback from working
|
|
1175
1014
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
@@ -1188,7 +1027,7 @@ render() {
|
|
|
1188
1027
|
if (!nodeToRelocate['s-ol']) {
|
|
1189
1028
|
// add a reference node marking this node's original location
|
|
1190
1029
|
// keep a reference to this node for later lookups
|
|
1191
|
-
orgLocationNode =
|
|
1030
|
+
orgLocationNode = doc.createTextNode('');
|
|
1192
1031
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
1193
1032
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
1194
1033
|
}
|
|
@@ -1244,18 +1083,11 @@ render() {
|
|
|
1244
1083
|
relocateNodes.length = 0;
|
|
1245
1084
|
}
|
|
1246
1085
|
};
|
|
1247
|
-
|
|
1248
|
-
// otherwise these nodes are text nodes w/out content
|
|
1249
|
-
const slotReferenceDebugNode = (slotVNode) => doc.createComment(`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ''}> (host=${hostTagName.toLowerCase()})`);
|
|
1250
|
-
const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})` : `[${nodeToRelocate.textContent}]`));
|
|
1251
|
-
const getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);
|
|
1086
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
1252
1087
|
const createEvent = (ref, name, flags) => {
|
|
1253
1088
|
const elm = getElement(ref);
|
|
1254
1089
|
return {
|
|
1255
1090
|
emit: (detail) => {
|
|
1256
|
-
if (BUILD.isDev && !elm.isConnected) {
|
|
1257
|
-
consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
|
|
1258
|
-
}
|
|
1259
1091
|
return emitEvent(elm, name, {
|
|
1260
1092
|
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1261
1093
|
composed: !!(flags & 2 /* Composed */),
|
|
@@ -1271,15 +1103,15 @@ const emitEvent = (elm, name, opts) => {
|
|
|
1271
1103
|
return ev;
|
|
1272
1104
|
};
|
|
1273
1105
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1274
|
-
if (
|
|
1106
|
+
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1275
1107
|
ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
|
|
1276
1108
|
}
|
|
1277
1109
|
};
|
|
1278
1110
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1279
|
-
|
|
1111
|
+
{
|
|
1280
1112
|
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1281
1113
|
}
|
|
1282
|
-
if (
|
|
1114
|
+
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1283
1115
|
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1284
1116
|
return;
|
|
1285
1117
|
}
|
|
@@ -1288,34 +1120,25 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1288
1120
|
// has already fired off its lifecycle update then
|
|
1289
1121
|
// fire off the initial update
|
|
1290
1122
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1291
|
-
return
|
|
1123
|
+
return writeTask(dispatch) ;
|
|
1292
1124
|
};
|
|
1293
1125
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1294
|
-
const elm = hostRef.$hostElement$;
|
|
1295
1126
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
1296
|
-
const instance =
|
|
1127
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1297
1128
|
let promise;
|
|
1298
1129
|
if (isInitialLoad) {
|
|
1299
|
-
|
|
1130
|
+
{
|
|
1300
1131
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1301
1132
|
if (hostRef.$queuedListeners$) {
|
|
1302
1133
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1303
1134
|
hostRef.$queuedListeners$ = null;
|
|
1304
1135
|
}
|
|
1305
1136
|
}
|
|
1306
|
-
|
|
1307
|
-
if (BUILD.cmpWillLoad) {
|
|
1137
|
+
{
|
|
1308
1138
|
promise = safeCall(instance, 'componentWillLoad');
|
|
1309
1139
|
}
|
|
1310
1140
|
}
|
|
1311
|
-
|
|
1312
|
-
emitLifecycleEvent(elm, 'componentWillUpdate');
|
|
1313
|
-
if (BUILD.cmpWillUpdate) {
|
|
1314
|
-
promise = safeCall(instance, 'componentWillUpdate');
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
emitLifecycleEvent(elm, 'componentWillRender');
|
|
1318
|
-
if (BUILD.cmpWillRender) {
|
|
1141
|
+
{
|
|
1319
1142
|
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
1320
1143
|
}
|
|
1321
1144
|
endSchedule();
|
|
@@ -1326,46 +1149,15 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1326
1149
|
const elm = hostRef.$hostElement$;
|
|
1327
1150
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
1328
1151
|
const rc = elm['s-rc'];
|
|
1329
|
-
if (
|
|
1152
|
+
if (isInitialLoad) {
|
|
1330
1153
|
// DOM WRITE!
|
|
1331
1154
|
attachStyles(hostRef);
|
|
1332
1155
|
}
|
|
1333
1156
|
const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
1334
|
-
|
|
1335
|
-
hostRef
|
|
1157
|
+
{
|
|
1158
|
+
callRender(hostRef, instance);
|
|
1336
1159
|
}
|
|
1337
|
-
if (
|
|
1338
|
-
await callRender(hostRef, instance, elm);
|
|
1339
|
-
}
|
|
1340
|
-
else {
|
|
1341
|
-
callRender(hostRef, instance, elm);
|
|
1342
|
-
}
|
|
1343
|
-
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
1344
|
-
plt.$cssShim$.updateHost(elm);
|
|
1345
|
-
}
|
|
1346
|
-
if (BUILD.isDev) {
|
|
1347
|
-
hostRef.$renderCount$++;
|
|
1348
|
-
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
1349
|
-
}
|
|
1350
|
-
if (BUILD.hydrateServerSide) {
|
|
1351
|
-
try {
|
|
1352
|
-
// manually connected child components during server-side hydrate
|
|
1353
|
-
serverSideConnected(elm);
|
|
1354
|
-
if (isInitialLoad) {
|
|
1355
|
-
// using only during server-side hydrate
|
|
1356
|
-
if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1357
|
-
elm['s-en'] = '';
|
|
1358
|
-
}
|
|
1359
|
-
else if (hostRef.$cmpMeta$.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1360
|
-
elm['s-en'] = 'c';
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
catch (e) {
|
|
1365
|
-
consoleError(e, elm);
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
if (BUILD.asyncLoading && rc) {
|
|
1160
|
+
if (rc) {
|
|
1369
1161
|
// ok, so turns out there are some child host elements
|
|
1370
1162
|
// waiting on this parent element to load
|
|
1371
1163
|
// let's fire off all update callbacks waiting
|
|
@@ -1374,7 +1166,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1374
1166
|
}
|
|
1375
1167
|
endRender();
|
|
1376
1168
|
endUpdate();
|
|
1377
|
-
|
|
1169
|
+
{
|
|
1378
1170
|
const childrenPromises = elm['s-p'];
|
|
1379
1171
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
1380
1172
|
if (childrenPromises.length === 0) {
|
|
@@ -1386,117 +1178,70 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1386
1178
|
childrenPromises.length = 0;
|
|
1387
1179
|
}
|
|
1388
1180
|
}
|
|
1389
|
-
else {
|
|
1390
|
-
postUpdateComponent(hostRef);
|
|
1391
|
-
}
|
|
1392
1181
|
};
|
|
1393
1182
|
const callRender = (hostRef, instance, elm) => {
|
|
1394
|
-
// in order for bundlers to correctly treeshake the BUILD object
|
|
1395
|
-
// we need to ensure BUILD is not deoptimized within a try/catch
|
|
1396
|
-
// https://rollupjs.org/guide/en/#treeshake tryCatchDeoptimization
|
|
1397
|
-
const allRenderFn = BUILD.allRenderFn ? true : false;
|
|
1398
|
-
const lazyLoad = BUILD.lazyLoad ? true : false;
|
|
1399
|
-
const taskQueue = BUILD.taskQueue ? true : false;
|
|
1400
|
-
const updatable = BUILD.updatable ? true : false;
|
|
1401
1183
|
try {
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
if (updatable && taskQueue) {
|
|
1184
|
+
instance = instance.render && instance.render();
|
|
1185
|
+
{
|
|
1405
1186
|
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1406
1187
|
}
|
|
1407
|
-
|
|
1188
|
+
{
|
|
1408
1189
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1409
1190
|
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1191
|
+
{
|
|
1192
|
+
{
|
|
1412
1193
|
// looks like we've got child nodes to render into this host element
|
|
1413
1194
|
// or we need to update the css class/attrs on the host element
|
|
1414
1195
|
// DOM WRITE!
|
|
1415
|
-
|
|
1416
|
-
return Promise.resolve(instance).then(value => renderVdom(hostRef, value));
|
|
1417
|
-
}
|
|
1418
|
-
else {
|
|
1196
|
+
{
|
|
1419
1197
|
renderVdom(hostRef, instance);
|
|
1420
1198
|
}
|
|
1421
1199
|
}
|
|
1422
|
-
else {
|
|
1423
|
-
elm.textContent = instance;
|
|
1424
|
-
}
|
|
1425
1200
|
}
|
|
1426
1201
|
}
|
|
1427
1202
|
catch (e) {
|
|
1428
1203
|
consoleError(e, hostRef.$hostElement$);
|
|
1429
1204
|
}
|
|
1430
|
-
renderingRef = null;
|
|
1431
1205
|
return null;
|
|
1432
1206
|
};
|
|
1433
|
-
const getRenderingRef = () => renderingRef;
|
|
1434
1207
|
const postUpdateComponent = (hostRef) => {
|
|
1435
1208
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1436
1209
|
const elm = hostRef.$hostElement$;
|
|
1437
1210
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1438
|
-
const instance =
|
|
1211
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1439
1212
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1440
|
-
|
|
1441
|
-
if (BUILD.isDev) {
|
|
1442
|
-
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
1443
|
-
}
|
|
1213
|
+
{
|
|
1444
1214
|
safeCall(instance, 'componentDidRender');
|
|
1445
|
-
if (BUILD.isDev) {
|
|
1446
|
-
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
1447
|
-
}
|
|
1448
1215
|
}
|
|
1449
|
-
emitLifecycleEvent(elm, 'componentDidRender');
|
|
1450
1216
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1451
1217
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1452
|
-
|
|
1218
|
+
{
|
|
1453
1219
|
// DOM WRITE!
|
|
1454
1220
|
addHydratedFlag(elm);
|
|
1455
1221
|
}
|
|
1456
|
-
|
|
1457
|
-
if (BUILD.isDev) {
|
|
1458
|
-
hostRef.$flags$ |= 2048 /* devOnDidLoad */;
|
|
1459
|
-
}
|
|
1222
|
+
{
|
|
1460
1223
|
safeCall(instance, 'componentDidLoad');
|
|
1461
|
-
if (BUILD.isDev) {
|
|
1462
|
-
hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
|
|
1463
|
-
}
|
|
1464
1224
|
}
|
|
1465
|
-
emitLifecycleEvent(elm, 'componentDidLoad');
|
|
1466
1225
|
endPostUpdate();
|
|
1467
|
-
|
|
1226
|
+
{
|
|
1468
1227
|
hostRef.$onReadyResolve$(elm);
|
|
1469
1228
|
if (!ancestorComponent) {
|
|
1470
|
-
appDidLoad(
|
|
1229
|
+
appDidLoad();
|
|
1471
1230
|
}
|
|
1472
1231
|
}
|
|
1473
1232
|
}
|
|
1474
1233
|
else {
|
|
1475
|
-
|
|
1476
|
-
// we've already loaded this component
|
|
1477
|
-
// fire off the user's componentDidUpdate method (if one was provided)
|
|
1478
|
-
// componentDidUpdate runs AFTER render() has been called
|
|
1479
|
-
// and all child components have finished updating
|
|
1480
|
-
if (BUILD.isDev) {
|
|
1481
|
-
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
1482
|
-
}
|
|
1234
|
+
{
|
|
1483
1235
|
safeCall(instance, 'componentDidUpdate');
|
|
1484
|
-
if (BUILD.isDev) {
|
|
1485
|
-
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
1486
|
-
}
|
|
1487
1236
|
}
|
|
1488
|
-
emitLifecycleEvent(elm, 'componentDidUpdate');
|
|
1489
1237
|
endPostUpdate();
|
|
1490
1238
|
}
|
|
1491
|
-
|
|
1492
|
-
elm['s-hmr-load'] && elm['s-hmr-load']();
|
|
1493
|
-
}
|
|
1494
|
-
if (BUILD.method && BUILD.lazyLoad) {
|
|
1239
|
+
{
|
|
1495
1240
|
hostRef.$onInstanceResolve$(elm);
|
|
1496
1241
|
}
|
|
1497
1242
|
// load events fire from bottom to top
|
|
1498
1243
|
// the deepest elements load first then bubbles up
|
|
1499
|
-
|
|
1244
|
+
{
|
|
1500
1245
|
if (hostRef.$onRenderResolve$) {
|
|
1501
1246
|
hostRef.$onRenderResolve$();
|
|
1502
1247
|
hostRef.$onRenderResolve$ = undefined;
|
|
@@ -1511,7 +1256,7 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1511
1256
|
// (⌐■_■)
|
|
1512
1257
|
};
|
|
1513
1258
|
const forceUpdate = (ref) => {
|
|
1514
|
-
|
|
1259
|
+
{
|
|
1515
1260
|
const hostRef = getHostRef(ref);
|
|
1516
1261
|
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1517
1262
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
@@ -1520,21 +1265,14 @@ const forceUpdate = (ref) => {
|
|
|
1520
1265
|
// Returns "true" when the forced update was successfully scheduled
|
|
1521
1266
|
return isConnected;
|
|
1522
1267
|
}
|
|
1523
|
-
return false;
|
|
1524
1268
|
};
|
|
1525
1269
|
const appDidLoad = (who) => {
|
|
1526
1270
|
// on appload
|
|
1527
1271
|
// we have finish the first big initial render
|
|
1528
|
-
|
|
1272
|
+
{
|
|
1529
1273
|
addHydratedFlag(doc.documentElement);
|
|
1530
1274
|
}
|
|
1531
|
-
if (BUILD.asyncQueue) {
|
|
1532
|
-
plt.$flags$ |= 2 /* appLoaded */;
|
|
1533
|
-
}
|
|
1534
1275
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1535
|
-
if (BUILD.profile && performance.measure) {
|
|
1536
|
-
performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, 'st:app:start');
|
|
1537
|
-
}
|
|
1538
1276
|
};
|
|
1539
1277
|
const safeCall = (instance, method, arg) => {
|
|
1540
1278
|
if (instance && instance[method]) {
|
|
@@ -1550,248 +1288,20 @@ const safeCall = (instance, method, arg) => {
|
|
|
1550
1288
|
const then = (promise, thenFn) => {
|
|
1551
1289
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1552
1290
|
};
|
|
1553
|
-
const
|
|
1554
|
-
if (BUILD.lifecycleDOMEvents) {
|
|
1555
|
-
emitEvent(elm, 'stencil_' + lifecycleName, {
|
|
1556
|
-
bubbles: true,
|
|
1557
|
-
composed: true,
|
|
1558
|
-
detail: {
|
|
1559
|
-
namespace: NAMESPACE,
|
|
1560
|
-
},
|
|
1561
|
-
});
|
|
1562
|
-
}
|
|
1563
|
-
};
|
|
1564
|
-
const addHydratedFlag = (elm) => (BUILD.hydratedClass ? elm.classList.add('hydrated') : BUILD.hydratedAttribute ? elm.setAttribute('hydrated', '') : undefined);
|
|
1565
|
-
const serverSideConnected = (elm) => {
|
|
1566
|
-
const children = elm.children;
|
|
1567
|
-
if (children != null) {
|
|
1568
|
-
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
1569
|
-
const childElm = children[i];
|
|
1570
|
-
if (typeof childElm.connectedCallback === 'function') {
|
|
1571
|
-
childElm.connectedCallback();
|
|
1572
|
-
}
|
|
1573
|
-
serverSideConnected(childElm);
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
};
|
|
1577
|
-
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1578
|
-
const endHydrate = createTime('hydrateClient', tagName);
|
|
1579
|
-
const shadowRoot = hostElm.shadowRoot;
|
|
1580
|
-
const childRenderNodes = [];
|
|
1581
|
-
const slotNodes = [];
|
|
1582
|
-
const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;
|
|
1583
|
-
const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
|
|
1584
|
-
if (!plt.$orgLocNodes$) {
|
|
1585
|
-
initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
|
|
1586
|
-
}
|
|
1587
|
-
hostElm[HYDRATE_ID] = hostId;
|
|
1588
|
-
hostElm.removeAttribute(HYDRATE_ID);
|
|
1589
|
-
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
1590
|
-
childRenderNodes.map(c => {
|
|
1591
|
-
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
1592
|
-
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
1593
|
-
const node = c.$elm$;
|
|
1594
|
-
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
1595
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1596
|
-
}
|
|
1597
|
-
if (!shadowRoot) {
|
|
1598
|
-
node['s-hn'] = tagName;
|
|
1599
|
-
if (orgLocationNode) {
|
|
1600
|
-
node['s-ol'] = orgLocationNode;
|
|
1601
|
-
node['s-ol']['s-nr'] = node;
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1605
|
-
});
|
|
1606
|
-
if (BUILD.shadowDom && shadowRoot) {
|
|
1607
|
-
shadowRootNodes.map(shadowRootNode => {
|
|
1608
|
-
if (shadowRootNode) {
|
|
1609
|
-
shadowRoot.appendChild(shadowRootNode);
|
|
1610
|
-
}
|
|
1611
|
-
});
|
|
1612
|
-
}
|
|
1613
|
-
endHydrate();
|
|
1614
|
-
};
|
|
1615
|
-
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
1616
|
-
let childNodeType;
|
|
1617
|
-
let childIdSplt;
|
|
1618
|
-
let childVNode;
|
|
1619
|
-
let i;
|
|
1620
|
-
if (node.nodeType === 1 /* ElementNode */) {
|
|
1621
|
-
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
1622
|
-
if (childNodeType) {
|
|
1623
|
-
// got the node data from the element's attribute
|
|
1624
|
-
// `${hostId}.${nodeId}.${depth}.${index}`
|
|
1625
|
-
childIdSplt = childNodeType.split('.');
|
|
1626
|
-
if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
|
|
1627
|
-
childVNode = {
|
|
1628
|
-
$flags$: 0,
|
|
1629
|
-
$hostId$: childIdSplt[0],
|
|
1630
|
-
$nodeId$: childIdSplt[1],
|
|
1631
|
-
$depth$: childIdSplt[2],
|
|
1632
|
-
$index$: childIdSplt[3],
|
|
1633
|
-
$tag$: node.tagName.toLowerCase(),
|
|
1634
|
-
$elm$: node,
|
|
1635
|
-
$attrs$: null,
|
|
1636
|
-
$children$: null,
|
|
1637
|
-
$key$: null,
|
|
1638
|
-
$name$: null,
|
|
1639
|
-
$text$: null,
|
|
1640
|
-
};
|
|
1641
|
-
childRenderNodes.push(childVNode);
|
|
1642
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1643
|
-
// this is a new child vnode
|
|
1644
|
-
// so ensure its parent vnode has the vchildren array
|
|
1645
|
-
if (!parentVNode.$children$) {
|
|
1646
|
-
parentVNode.$children$ = [];
|
|
1647
|
-
}
|
|
1648
|
-
// add our child vnode to a specific index of the vnode's children
|
|
1649
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1650
|
-
// this is now the new parent vnode for all the next child checks
|
|
1651
|
-
parentVNode = childVNode;
|
|
1652
|
-
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
1653
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
// recursively drill down, end to start so we can remove nodes
|
|
1658
|
-
for (i = node.childNodes.length - 1; i >= 0; i--) {
|
|
1659
|
-
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
|
|
1660
|
-
}
|
|
1661
|
-
if (node.shadowRoot) {
|
|
1662
|
-
// keep drilling down through the shadow root nodes
|
|
1663
|
-
for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
|
|
1664
|
-
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
else if (node.nodeType === 8 /* CommentNode */) {
|
|
1669
|
-
// `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
|
|
1670
|
-
childIdSplt = node.nodeValue.split('.');
|
|
1671
|
-
if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
|
|
1672
|
-
// comment node for either the host id or a 0 host id
|
|
1673
|
-
childNodeType = childIdSplt[0];
|
|
1674
|
-
childVNode = {
|
|
1675
|
-
$flags$: 0,
|
|
1676
|
-
$hostId$: childIdSplt[1],
|
|
1677
|
-
$nodeId$: childIdSplt[2],
|
|
1678
|
-
$depth$: childIdSplt[3],
|
|
1679
|
-
$index$: childIdSplt[4],
|
|
1680
|
-
$elm$: node,
|
|
1681
|
-
$attrs$: null,
|
|
1682
|
-
$children$: null,
|
|
1683
|
-
$key$: null,
|
|
1684
|
-
$name$: null,
|
|
1685
|
-
$tag$: null,
|
|
1686
|
-
$text$: null,
|
|
1687
|
-
};
|
|
1688
|
-
if (childNodeType === TEXT_NODE_ID) {
|
|
1689
|
-
childVNode.$elm$ = node.nextSibling;
|
|
1690
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
1691
|
-
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
1692
|
-
childRenderNodes.push(childVNode);
|
|
1693
|
-
// remove the text comment since it's no longer needed
|
|
1694
|
-
node.remove();
|
|
1695
|
-
if (!parentVNode.$children$) {
|
|
1696
|
-
parentVNode.$children$ = [];
|
|
1697
|
-
}
|
|
1698
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1699
|
-
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
1700
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
|
-
else if (childVNode.$hostId$ === hostId) {
|
|
1705
|
-
// this comment node is specifcally for this host id
|
|
1706
|
-
if (childNodeType === SLOT_NODE_ID) {
|
|
1707
|
-
// `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
|
|
1708
|
-
childVNode.$tag$ = 'slot';
|
|
1709
|
-
if (childIdSplt[5]) {
|
|
1710
|
-
node['s-sn'] = childVNode.$name$ = childIdSplt[5];
|
|
1711
|
-
}
|
|
1712
|
-
else {
|
|
1713
|
-
node['s-sn'] = '';
|
|
1714
|
-
}
|
|
1715
|
-
node['s-sr'] = true;
|
|
1716
|
-
if (BUILD.shadowDom && shadowRootNodes) {
|
|
1717
|
-
// browser support shadowRoot and this is a shadow dom component
|
|
1718
|
-
// create an actual slot element
|
|
1719
|
-
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
1720
|
-
if (childVNode.$name$) {
|
|
1721
|
-
// add the slot name attribute
|
|
1722
|
-
childVNode.$elm$.setAttribute('name', childVNode.$name$);
|
|
1723
|
-
}
|
|
1724
|
-
// insert the new slot element before the slot comment
|
|
1725
|
-
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1726
|
-
// remove the slot comment since it's not needed for shadow
|
|
1727
|
-
node.remove();
|
|
1728
|
-
if (childVNode.$depth$ === '0') {
|
|
1729
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
slotNodes.push(childVNode);
|
|
1733
|
-
if (!parentVNode.$children$) {
|
|
1734
|
-
parentVNode.$children$ = [];
|
|
1735
|
-
}
|
|
1736
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1737
|
-
}
|
|
1738
|
-
else if (childNodeType === CONTENT_REF_ID) {
|
|
1739
|
-
// `${CONTENT_REF_ID}.${hostId}`;
|
|
1740
|
-
if (BUILD.shadowDom && shadowRootNodes) {
|
|
1741
|
-
// remove the content ref comment since it's not needed for shadow
|
|
1742
|
-
node.remove();
|
|
1743
|
-
}
|
|
1744
|
-
else if (BUILD.slotRelocation) {
|
|
1745
|
-
hostElm['s-cr'] = node;
|
|
1746
|
-
node['s-cn'] = true;
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
else if (parentVNode && parentVNode.$tag$ === 'style') {
|
|
1753
|
-
const vnode = newVNode(null, node.textContent);
|
|
1754
|
-
vnode.$elm$ = node;
|
|
1755
|
-
vnode.$index$ = '0';
|
|
1756
|
-
parentVNode.$children$ = [vnode];
|
|
1757
|
-
}
|
|
1758
|
-
};
|
|
1759
|
-
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1760
|
-
if (node.nodeType === 1 /* ElementNode */) {
|
|
1761
|
-
let i = 0;
|
|
1762
|
-
for (; i < node.childNodes.length; i++) {
|
|
1763
|
-
initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
|
|
1764
|
-
}
|
|
1765
|
-
if (node.shadowRoot) {
|
|
1766
|
-
for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
|
|
1767
|
-
initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
else if (node.nodeType === 8 /* CommentNode */) {
|
|
1772
|
-
const childIdSplt = node.nodeValue.split('.');
|
|
1773
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1774
|
-
orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
|
|
1775
|
-
node.nodeValue = '';
|
|
1776
|
-
// useful to know if the original location is
|
|
1777
|
-
// the root light-dom of a shadow dom component
|
|
1778
|
-
node['s-en'] = childIdSplt[3];
|
|
1779
|
-
}
|
|
1780
|
-
}
|
|
1781
|
-
};
|
|
1291
|
+
const addHydratedFlag = (elm) => (elm.classList.add('hydrated') );
|
|
1782
1292
|
const parsePropertyValue = (propValue, propType) => {
|
|
1783
1293
|
// ensure this value is of the correct prop type
|
|
1784
1294
|
if (propValue != null && !isComplexType(propValue)) {
|
|
1785
|
-
if (
|
|
1295
|
+
if (propType & 4 /* Boolean */) {
|
|
1786
1296
|
// per the HTML spec, any string value means it is a boolean true value
|
|
1787
1297
|
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1788
1298
|
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1789
1299
|
}
|
|
1790
|
-
if (
|
|
1300
|
+
if (propType & 2 /* Number */) {
|
|
1791
1301
|
// force it to be a number
|
|
1792
1302
|
return parseFloat(propValue);
|
|
1793
1303
|
}
|
|
1794
|
-
if (
|
|
1304
|
+
if (propType & 1 /* String */) {
|
|
1795
1305
|
// could have been passed as a number or boolean
|
|
1796
1306
|
// but we still want it as a string
|
|
1797
1307
|
return String(propValue);
|
|
@@ -1807,26 +1317,18 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
|
|
|
1807
1317
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1808
1318
|
// check our new property value against our internal value
|
|
1809
1319
|
const hostRef = getHostRef(ref);
|
|
1810
|
-
const elm =
|
|
1320
|
+
const elm = hostRef.$hostElement$ ;
|
|
1811
1321
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1812
1322
|
const flags = hostRef.$flags$;
|
|
1813
|
-
const instance =
|
|
1323
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1814
1324
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1815
|
-
if ((!
|
|
1325
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
|
|
1816
1326
|
// gadzooks! the property's value has changed!!
|
|
1817
1327
|
// set our new value!
|
|
1818
1328
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1819
|
-
if (
|
|
1820
|
-
if (hostRef.$flags$ & 1024 /* devOnRender */) {
|
|
1821
|
-
consoleDevWarn(`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal);
|
|
1822
|
-
}
|
|
1823
|
-
else if (hostRef.$flags$ & 2048 /* devOnDidLoad */) {
|
|
1824
|
-
consoleDevWarn(`The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal);
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
if (!BUILD.lazyLoad || instance) {
|
|
1329
|
+
if (instance) {
|
|
1828
1330
|
// get an array of method names of watch functions to call
|
|
1829
|
-
if (
|
|
1331
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1830
1332
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1831
1333
|
if (watchMethods) {
|
|
1832
1334
|
// this instance is watching for when this property changed
|
|
@@ -1841,12 +1343,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1841
1343
|
});
|
|
1842
1344
|
}
|
|
1843
1345
|
}
|
|
1844
|
-
if (
|
|
1845
|
-
if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
|
|
1846
|
-
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1847
|
-
return;
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1346
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1850
1347
|
// looks like this value actually changed, so we've got work to do!
|
|
1851
1348
|
// but only if we've already rendered, otherwise just chill out
|
|
1852
1349
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1857,15 +1354,15 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1857
1354
|
}
|
|
1858
1355
|
};
|
|
1859
1356
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1860
|
-
if (
|
|
1861
|
-
if (
|
|
1357
|
+
if (cmpMeta.$members$) {
|
|
1358
|
+
if (Cstr.watchers) {
|
|
1862
1359
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1863
1360
|
}
|
|
1864
1361
|
// It's better to have a const than two Object.entries()
|
|
1865
1362
|
const members = Object.entries(cmpMeta.$members$);
|
|
1866
1363
|
const prototype = Cstr.prototype;
|
|
1867
1364
|
members.map(([memberName, [memberFlags]]) => {
|
|
1868
|
-
if ((
|
|
1365
|
+
if ((memberFlags & 31 /* Prop */ || ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1869
1366
|
// proxyComponent - prop
|
|
1870
1367
|
Object.defineProperty(prototype, memberName, {
|
|
1871
1368
|
get() {
|
|
@@ -1873,21 +1370,6 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1873
1370
|
return getValue(this, memberName);
|
|
1874
1371
|
},
|
|
1875
1372
|
set(newValue) {
|
|
1876
|
-
// only during dev time
|
|
1877
|
-
if (BUILD.isDev) {
|
|
1878
|
-
const ref = getHostRef(this);
|
|
1879
|
-
if (
|
|
1880
|
-
// we are proxying the instance (not element)
|
|
1881
|
-
(flags & 1 /* isElementConstructor */) === 0 &&
|
|
1882
|
-
// the element is not constructing
|
|
1883
|
-
(ref.$flags$ & 8 /* isConstructingInstance */) === 0 &&
|
|
1884
|
-
// the member is a prop
|
|
1885
|
-
(memberFlags & 31 /* Prop */) !== 0 &&
|
|
1886
|
-
// the member is not mutable
|
|
1887
|
-
(memberFlags & 1024 /* Mutable */) === 0) {
|
|
1888
|
-
consoleDevWarn(`@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`);
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1891
1373
|
// proxyComponent, set value
|
|
1892
1374
|
setValue(this, memberName, newValue, cmpMeta);
|
|
1893
1375
|
},
|
|
@@ -1895,7 +1377,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1895
1377
|
enumerable: true,
|
|
1896
1378
|
});
|
|
1897
1379
|
}
|
|
1898
|
-
else if (
|
|
1380
|
+
else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1899
1381
|
// proxyComponent - method
|
|
1900
1382
|
Object.defineProperty(prototype, memberName, {
|
|
1901
1383
|
value(...args) {
|
|
@@ -1905,7 +1387,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1905
1387
|
});
|
|
1906
1388
|
}
|
|
1907
1389
|
});
|
|
1908
|
-
if (
|
|
1390
|
+
if ((flags & 1 /* isElementConstructor */)) {
|
|
1909
1391
|
const attrNameToPropName = new Map();
|
|
1910
1392
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1911
1393
|
plt.jmp(() => {
|
|
@@ -1920,7 +1402,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1920
1402
|
.map(([propName, m]) => {
|
|
1921
1403
|
const attrName = m[1] || propName;
|
|
1922
1404
|
attrNameToPropName.set(attrName, propName);
|
|
1923
|
-
if (
|
|
1405
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
1924
1406
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1925
1407
|
}
|
|
1926
1408
|
return attrName;
|
|
@@ -1931,28 +1413,25 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1931
1413
|
};
|
|
1932
1414
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1933
1415
|
// initializeComponent
|
|
1934
|
-
if ((
|
|
1935
|
-
|
|
1416
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1417
|
+
{
|
|
1936
1418
|
// we haven't initialized this element yet
|
|
1937
1419
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1938
1420
|
// lazy loaded components
|
|
1939
1421
|
// request the component's implementation to be
|
|
1940
1422
|
// wired up with the host element
|
|
1941
|
-
Cstr = loadModule(cmpMeta
|
|
1423
|
+
Cstr = loadModule(cmpMeta);
|
|
1942
1424
|
if (Cstr.then) {
|
|
1943
1425
|
// Await creates a micro-task avoid if possible
|
|
1944
|
-
const endLoad = uniqueTime(
|
|
1426
|
+
const endLoad = uniqueTime();
|
|
1945
1427
|
Cstr = await Cstr;
|
|
1946
1428
|
endLoad();
|
|
1947
1429
|
}
|
|
1948
|
-
if (
|
|
1949
|
-
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1950
|
-
}
|
|
1951
|
-
if (BUILD.member && !Cstr.isProxied) {
|
|
1430
|
+
if (!Cstr.isProxied) {
|
|
1952
1431
|
// we'eve never proxied this Constructor before
|
|
1953
1432
|
// let's add the getters/setters to its prototype before
|
|
1954
1433
|
// the first time we create an instance of the implementation
|
|
1955
|
-
|
|
1434
|
+
{
|
|
1956
1435
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1957
1436
|
}
|
|
1958
1437
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
@@ -1962,7 +1441,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1962
1441
|
// ok, time to construct the instance
|
|
1963
1442
|
// but let's keep track of when we start and stop
|
|
1964
1443
|
// so that the getters/setters don't incorrectly step on data
|
|
1965
|
-
|
|
1444
|
+
{
|
|
1966
1445
|
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1967
1446
|
}
|
|
1968
1447
|
// construct the lazy-loaded component implementation
|
|
@@ -1975,35 +1454,24 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1975
1454
|
catch (e) {
|
|
1976
1455
|
consoleError(e);
|
|
1977
1456
|
}
|
|
1978
|
-
|
|
1457
|
+
{
|
|
1979
1458
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1980
1459
|
}
|
|
1981
|
-
|
|
1460
|
+
{
|
|
1982
1461
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1983
1462
|
}
|
|
1984
1463
|
endNewInstance();
|
|
1985
1464
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1986
1465
|
}
|
|
1987
|
-
|
|
1988
|
-
// sync constructor component
|
|
1989
|
-
Cstr = elm.constructor;
|
|
1990
|
-
hostRef.$flags$ |= 128 /* isWatchReady */ | 32 /* hasInitializedComponent */;
|
|
1991
|
-
}
|
|
1992
|
-
if (BUILD.style && Cstr.style) {
|
|
1466
|
+
if (Cstr.style) {
|
|
1993
1467
|
// this component has styles but we haven't registered them yet
|
|
1994
1468
|
let style = Cstr.style;
|
|
1995
|
-
if (
|
|
1469
|
+
if (typeof style !== 'string') {
|
|
1996
1470
|
style = style[(hostRef.$modeName$ = computeMode(elm))];
|
|
1997
|
-
if (BUILD.hydrateServerSide && hostRef.$modeName$) {
|
|
1998
|
-
elm.setAttribute('s-mode', hostRef.$modeName$);
|
|
1999
|
-
}
|
|
2000
1471
|
}
|
|
2001
1472
|
const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
|
|
2002
1473
|
if (!styles.has(scopeId)) {
|
|
2003
1474
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
2004
|
-
if (!BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
2005
|
-
style = await import('./shadow-css-10669ec3.js').then(m => m.scopeCss(style, scopeId, false));
|
|
2006
|
-
}
|
|
2007
1475
|
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
2008
1476
|
endRegisterStyles();
|
|
2009
1477
|
}
|
|
@@ -2012,7 +1480,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2012
1480
|
// we've successfully created a lazy instance
|
|
2013
1481
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
2014
1482
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
2015
|
-
if (
|
|
1483
|
+
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
2016
1484
|
// this is the intial load and this component it has an ancestor component
|
|
2017
1485
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
2018
1486
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
@@ -2026,7 +1494,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2026
1494
|
}
|
|
2027
1495
|
};
|
|
2028
1496
|
const fireConnectedCallback = (instance) => {
|
|
2029
|
-
|
|
1497
|
+
{
|
|
2030
1498
|
safeCall(instance, 'connectedCallback');
|
|
2031
1499
|
}
|
|
2032
1500
|
};
|
|
@@ -2035,42 +1503,30 @@ const connectedCallback = (elm) => {
|
|
|
2035
1503
|
const hostRef = getHostRef(elm);
|
|
2036
1504
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2037
1505
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
2038
|
-
|
|
1506
|
+
{
|
|
2039
1507
|
// only run if we have listeners being attached to a parent
|
|
2040
1508
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
|
|
2041
1509
|
}
|
|
2042
1510
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
2043
1511
|
// first time this component has connected
|
|
2044
1512
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
2045
|
-
|
|
2046
|
-
if (BUILD.hydrateClientSide) {
|
|
2047
|
-
hostId = elm.getAttribute(HYDRATE_ID);
|
|
2048
|
-
if (hostId) {
|
|
2049
|
-
if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2050
|
-
const scopeId = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode')) : addStyle(elm.shadowRoot, cmpMeta);
|
|
2051
|
-
elm.classList.remove(scopeId + '-h', scopeId + '-s');
|
|
2052
|
-
}
|
|
2053
|
-
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
2054
|
-
}
|
|
2055
|
-
}
|
|
2056
|
-
if (BUILD.slotRelocation && !hostId) {
|
|
1513
|
+
{
|
|
2057
1514
|
// initUpdate
|
|
2058
1515
|
// if the slot polyfill is required we'll need to put some nodes
|
|
2059
1516
|
// in here to act as original content anchors as we move nodes around
|
|
2060
1517
|
// host element has been connected to the DOM
|
|
2061
|
-
if (
|
|
1518
|
+
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
2062
1519
|
setContentReference(elm);
|
|
2063
1520
|
}
|
|
2064
1521
|
}
|
|
2065
|
-
|
|
1522
|
+
{
|
|
2066
1523
|
// find the first ancestor component (if there is one) and register
|
|
2067
1524
|
// this component as one of the actively loading child components for its ancestor
|
|
2068
1525
|
let ancestorComponent = elm;
|
|
2069
1526
|
while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
|
|
2070
1527
|
// climb up the ancestors looking for the first
|
|
2071
1528
|
// component that hasn't finished its lifecycle update yet
|
|
2072
|
-
if (
|
|
2073
|
-
ancestorComponent['s-p']) {
|
|
1529
|
+
if (ancestorComponent['s-p']) {
|
|
2074
1530
|
// we found this components first ancestor component
|
|
2075
1531
|
// keep a reference to this component's ancestor component
|
|
2076
1532
|
attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
|
|
@@ -2080,7 +1536,7 @@ const connectedCallback = (elm) => {
|
|
|
2080
1536
|
}
|
|
2081
1537
|
// Lazy properties
|
|
2082
1538
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
2083
|
-
if (
|
|
1539
|
+
if (cmpMeta.$members$) {
|
|
2084
1540
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
2085
1541
|
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
2086
1542
|
const value = elm[memberName];
|
|
@@ -2089,14 +1545,7 @@ const connectedCallback = (elm) => {
|
|
|
2089
1545
|
}
|
|
2090
1546
|
});
|
|
2091
1547
|
}
|
|
2092
|
-
|
|
2093
|
-
// connectedCallback, taskQueue, initialLoad
|
|
2094
|
-
// angular sets attribute AFTER connectCallback
|
|
2095
|
-
// https://github.com/angular/angular/issues/18909
|
|
2096
|
-
// https://github.com/angular/angular/issues/19940
|
|
2097
|
-
nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
|
|
2098
|
-
}
|
|
2099
|
-
else {
|
|
1548
|
+
{
|
|
2100
1549
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
2101
1550
|
}
|
|
2102
1551
|
}
|
|
@@ -2118,231 +1567,30 @@ const setContentReference = (elm) => {
|
|
|
2118
1567
|
// let's pick out the inner content for slot projection
|
|
2119
1568
|
// create a node to represent where the original
|
|
2120
1569
|
// content was first placed, which is useful later on
|
|
2121
|
-
const contentRefElm = (elm['s-cr'] = doc.createComment(
|
|
1570
|
+
const contentRefElm = (elm['s-cr'] = doc.createComment(''));
|
|
2122
1571
|
contentRefElm['s-cn'] = true;
|
|
2123
1572
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
2124
1573
|
};
|
|
2125
1574
|
const disconnectedCallback = (elm) => {
|
|
2126
1575
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2127
1576
|
const hostRef = getHostRef(elm);
|
|
2128
|
-
const instance =
|
|
2129
|
-
|
|
1577
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1578
|
+
{
|
|
2130
1579
|
if (hostRef.$rmListeners$) {
|
|
2131
1580
|
hostRef.$rmListeners$.map(rmListener => rmListener());
|
|
2132
1581
|
hostRef.$rmListeners$ = undefined;
|
|
2133
1582
|
}
|
|
2134
1583
|
}
|
|
2135
|
-
|
|
2136
|
-
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
2137
|
-
plt.$cssShim$.removeHost(elm);
|
|
2138
|
-
}
|
|
2139
|
-
if (BUILD.lazyLoad && BUILD.disconnectedCallback) {
|
|
1584
|
+
{
|
|
2140
1585
|
safeCall(instance, 'disconnectedCallback');
|
|
2141
1586
|
}
|
|
2142
|
-
|
|
1587
|
+
{
|
|
2143
1588
|
safeCall(instance, 'componentDidUnload');
|
|
2144
1589
|
}
|
|
2145
1590
|
}
|
|
2146
1591
|
};
|
|
2147
|
-
const defineCustomElement = (Cstr, compactMeta) => {
|
|
2148
|
-
customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));
|
|
2149
|
-
};
|
|
2150
|
-
const proxyCustomElement = (Cstr, compactMeta) => {
|
|
2151
|
-
const cmpMeta = {
|
|
2152
|
-
$flags$: compactMeta[0],
|
|
2153
|
-
$tagName$: compactMeta[1],
|
|
2154
|
-
};
|
|
2155
|
-
if (BUILD.member) {
|
|
2156
|
-
cmpMeta.$members$ = compactMeta[2];
|
|
2157
|
-
}
|
|
2158
|
-
if (BUILD.hostListener) {
|
|
2159
|
-
cmpMeta.$listeners$ = compactMeta[3];
|
|
2160
|
-
}
|
|
2161
|
-
if (BUILD.watchCallback) {
|
|
2162
|
-
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
2163
|
-
}
|
|
2164
|
-
if (BUILD.reflect) {
|
|
2165
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
2166
|
-
}
|
|
2167
|
-
if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2168
|
-
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
2169
|
-
}
|
|
2170
|
-
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
2171
|
-
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
2172
|
-
Object.assign(Cstr.prototype, {
|
|
2173
|
-
__registerHost() {
|
|
2174
|
-
registerHost(this, cmpMeta);
|
|
2175
|
-
},
|
|
2176
|
-
connectedCallback() {
|
|
2177
|
-
connectedCallback(this);
|
|
2178
|
-
if (BUILD.connectedCallback && originalConnectedCallback) {
|
|
2179
|
-
originalConnectedCallback.call(this);
|
|
2180
|
-
}
|
|
2181
|
-
},
|
|
2182
|
-
disconnectedCallback() {
|
|
2183
|
-
disconnectedCallback(this);
|
|
2184
|
-
if (BUILD.disconnectedCallback && originalDisconnectedCallback) {
|
|
2185
|
-
originalDisconnectedCallback.call(this);
|
|
2186
|
-
}
|
|
2187
|
-
},
|
|
2188
|
-
});
|
|
2189
|
-
Cstr.is = cmpMeta.$tagName$;
|
|
2190
|
-
return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
|
|
2191
|
-
};
|
|
2192
|
-
const forceModeUpdate = (elm) => {
|
|
2193
|
-
if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
|
|
2194
|
-
const mode = computeMode(elm);
|
|
2195
|
-
const hostRef = getHostRef(elm);
|
|
2196
|
-
if (hostRef.$modeName$ !== mode) {
|
|
2197
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
2198
|
-
const oldScopeId = elm['s-sc'];
|
|
2199
|
-
const scopeId = getScopeId(cmpMeta, mode);
|
|
2200
|
-
const style = elm.constructor.style[mode];
|
|
2201
|
-
const flags = cmpMeta.$flags$;
|
|
2202
|
-
if (style) {
|
|
2203
|
-
if (!styles.has(scopeId)) {
|
|
2204
|
-
registerStyle(scopeId, style, !!(flags & 1 /* shadowDomEncapsulation */));
|
|
2205
|
-
}
|
|
2206
|
-
hostRef.$modeName$ = mode;
|
|
2207
|
-
elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s');
|
|
2208
|
-
attachStyles(hostRef);
|
|
2209
|
-
forceUpdate(elm);
|
|
2210
|
-
}
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2213
|
-
};
|
|
2214
|
-
const attachShadow = (el) => {
|
|
2215
|
-
if (supportsShadow) {
|
|
2216
|
-
el.attachShadow({ mode: 'open' });
|
|
2217
|
-
}
|
|
2218
|
-
else {
|
|
2219
|
-
el.shadowRoot = el;
|
|
2220
|
-
}
|
|
2221
|
-
};
|
|
2222
|
-
const hmrStart = (elm, cmpMeta, hmrVersionId) => {
|
|
2223
|
-
// ¯\_(ツ)_/¯
|
|
2224
|
-
const hostRef = getHostRef(elm);
|
|
2225
|
-
// reset state flags to only have been connected
|
|
2226
|
-
hostRef.$flags$ = 1 /* hasConnected */;
|
|
2227
|
-
// TODO
|
|
2228
|
-
// detatch any event listeners that may have been added
|
|
2229
|
-
// because we're not passing an exact event name it'll
|
|
2230
|
-
// remove all of this element's event, which is good
|
|
2231
|
-
// create a callback for when this component finishes hmr
|
|
2232
|
-
elm['s-hmr-load'] = () => {
|
|
2233
|
-
// finished hmr for this element
|
|
2234
|
-
delete elm['s-hmr-load'];
|
|
2235
|
-
};
|
|
2236
|
-
// re-initialize the component
|
|
2237
|
-
initializeComponent(elm, hostRef, cmpMeta, hmrVersionId);
|
|
2238
|
-
};
|
|
2239
|
-
const patchCloneNode = (HostElementPrototype) => {
|
|
2240
|
-
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
2241
|
-
HostElementPrototype.cloneNode = function (deep) {
|
|
2242
|
-
const srcNode = this;
|
|
2243
|
-
const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
|
|
2244
|
-
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
2245
|
-
if (BUILD.slot && !isShadowDom && deep) {
|
|
2246
|
-
let i = 0;
|
|
2247
|
-
let slotted, nonStencilNode;
|
|
2248
|
-
let stencilPrivates = ['s-id', 's-cr', 's-lr', 's-rc', 's-sc', 's-p', 's-cn', 's-sr', 's-sn', 's-hn', 's-ol', 's-nr', 's-si'];
|
|
2249
|
-
for (; i < srcNode.childNodes.length; i++) {
|
|
2250
|
-
slotted = srcNode.childNodes[i]['s-nr'];
|
|
2251
|
-
nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
|
|
2252
|
-
if (slotted) {
|
|
2253
|
-
if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {
|
|
2254
|
-
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
2255
|
-
}
|
|
2256
|
-
else {
|
|
2257
|
-
clonedNode.appendChild(slotted.cloneNode(true));
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
if (nonStencilNode) {
|
|
2261
|
-
clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));
|
|
2262
|
-
}
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
return clonedNode;
|
|
2266
|
-
};
|
|
2267
|
-
};
|
|
2268
|
-
const patchSlotAppendChild = (HostElementPrototype) => {
|
|
2269
|
-
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
2270
|
-
HostElementPrototype.appendChild = function (newChild) {
|
|
2271
|
-
const slotName = (newChild['s-sn'] = getSlotName(newChild));
|
|
2272
|
-
const slotNode = getHostSlotNode(this.childNodes, slotName);
|
|
2273
|
-
if (slotNode) {
|
|
2274
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2275
|
-
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
2276
|
-
return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
|
|
2277
|
-
}
|
|
2278
|
-
return this.__appendChild(newChild);
|
|
2279
|
-
};
|
|
2280
|
-
};
|
|
2281
|
-
const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
2282
|
-
class FakeNodeList extends Array {
|
|
2283
|
-
item(n) {
|
|
2284
|
-
return this[n];
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
2288
|
-
const childNodesFn = elm.__lookupGetter__('childNodes');
|
|
2289
|
-
Object.defineProperty(elm, 'children', {
|
|
2290
|
-
get() {
|
|
2291
|
-
return this.childNodes.map((n) => n.nodeType === 1);
|
|
2292
|
-
},
|
|
2293
|
-
});
|
|
2294
|
-
Object.defineProperty(elm, 'childElementCount', {
|
|
2295
|
-
get() {
|
|
2296
|
-
return elm.children.length;
|
|
2297
|
-
},
|
|
2298
|
-
});
|
|
2299
|
-
Object.defineProperty(elm, 'childNodes', {
|
|
2300
|
-
get() {
|
|
2301
|
-
const childNodes = childNodesFn.call(this);
|
|
2302
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
|
|
2303
|
-
const result = new FakeNodeList();
|
|
2304
|
-
for (let i = 0; i < childNodes.length; i++) {
|
|
2305
|
-
const slot = childNodes[i]['s-nr'];
|
|
2306
|
-
if (slot) {
|
|
2307
|
-
result.push(slot);
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
return result;
|
|
2311
|
-
}
|
|
2312
|
-
return FakeNodeList.from(childNodes);
|
|
2313
|
-
},
|
|
2314
|
-
});
|
|
2315
|
-
}
|
|
2316
|
-
};
|
|
2317
|
-
const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
|
|
2318
|
-
const getHostSlotNode = (childNodes, slotName) => {
|
|
2319
|
-
let i = 0;
|
|
2320
|
-
let childNode;
|
|
2321
|
-
for (; i < childNodes.length; i++) {
|
|
2322
|
-
childNode = childNodes[i];
|
|
2323
|
-
if (childNode['s-sr'] && childNode['s-sn'] === slotName) {
|
|
2324
|
-
return childNode;
|
|
2325
|
-
}
|
|
2326
|
-
childNode = getHostSlotNode(childNode.childNodes, slotName);
|
|
2327
|
-
if (childNode) {
|
|
2328
|
-
return childNode;
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
return null;
|
|
2332
|
-
};
|
|
2333
|
-
const getHostSlotChildNodes = (n, slotName) => {
|
|
2334
|
-
const childNodes = [n];
|
|
2335
|
-
while ((n = n.nextSibling) && n['s-sn'] === slotName) {
|
|
2336
|
-
childNodes.push(n);
|
|
2337
|
-
}
|
|
2338
|
-
return childNodes;
|
|
2339
|
-
};
|
|
2340
1592
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2341
|
-
|
|
2342
|
-
performance.mark('st:app:start');
|
|
2343
|
-
}
|
|
2344
|
-
installDevTools();
|
|
2345
|
-
const endBootstrap = createTime('bootstrapLazy');
|
|
1593
|
+
const endBootstrap = createTime();
|
|
2346
1594
|
const cmpTags = [];
|
|
2347
1595
|
const exclude = options.exclude || [];
|
|
2348
1596
|
const customElements = win.customElements;
|
|
@@ -2350,27 +1598,10 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2350
1598
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
2351
1599
|
const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
|
|
2352
1600
|
const deferredConnectedCallbacks = [];
|
|
2353
|
-
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2354
1601
|
let appLoadFallback;
|
|
2355
1602
|
let isBootstrapping = true;
|
|
2356
|
-
let i = 0;
|
|
2357
1603
|
Object.assign(plt, options);
|
|
2358
1604
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
2359
|
-
if (BUILD.asyncQueue) {
|
|
2360
|
-
if (options.syncQueue) {
|
|
2361
|
-
plt.$flags$ |= 4 /* queueSync */;
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
if (BUILD.hydrateClientSide) {
|
|
2365
|
-
// If the app is already hydrated there is not point to disable the
|
|
2366
|
-
// async queue. This will improve the first input delay
|
|
2367
|
-
plt.$flags$ |= 2 /* appLoaded */;
|
|
2368
|
-
}
|
|
2369
|
-
if (BUILD.hydrateClientSide && BUILD.shadowDom) {
|
|
2370
|
-
for (; i < styles.length; i++) {
|
|
2371
|
-
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
1605
|
lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => {
|
|
2375
1606
|
const cmpMeta = {
|
|
2376
1607
|
$flags$: compactMeta[0],
|
|
@@ -2378,22 +1609,19 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2378
1609
|
$members$: compactMeta[2],
|
|
2379
1610
|
$listeners$: compactMeta[3],
|
|
2380
1611
|
};
|
|
2381
|
-
|
|
1612
|
+
{
|
|
2382
1613
|
cmpMeta.$members$ = compactMeta[2];
|
|
2383
1614
|
}
|
|
2384
|
-
|
|
1615
|
+
{
|
|
2385
1616
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
2386
1617
|
}
|
|
2387
|
-
|
|
1618
|
+
{
|
|
2388
1619
|
cmpMeta.$attrsToReflect$ = [];
|
|
2389
1620
|
}
|
|
2390
|
-
|
|
1621
|
+
{
|
|
2391
1622
|
cmpMeta.$watchers$ = {};
|
|
2392
1623
|
}
|
|
2393
|
-
|
|
2394
|
-
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
2395
|
-
}
|
|
2396
|
-
const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
|
|
1624
|
+
const tagName = cmpMeta.$tagName$;
|
|
2397
1625
|
const HostElement = class extends HTMLElement {
|
|
2398
1626
|
// StencilLazyHost
|
|
2399
1627
|
constructor(self) {
|
|
@@ -2401,28 +1629,16 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2401
1629
|
super(self);
|
|
2402
1630
|
self = this;
|
|
2403
1631
|
registerHost(self, cmpMeta);
|
|
2404
|
-
if (
|
|
1632
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2405
1633
|
// this component is using shadow dom
|
|
2406
1634
|
// and this browser supports shadow dom
|
|
2407
1635
|
// add the read-only property "shadowRoot" to the host element
|
|
2408
1636
|
// adding the shadow root build conditionals to minimize runtime
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
self.attachShadow({
|
|
2412
|
-
mode: 'open',
|
|
2413
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
|
|
2414
|
-
});
|
|
2415
|
-
}
|
|
2416
|
-
else {
|
|
1637
|
+
{
|
|
1638
|
+
{
|
|
2417
1639
|
self.attachShadow({ mode: 'open' });
|
|
2418
1640
|
}
|
|
2419
1641
|
}
|
|
2420
|
-
else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
|
|
2421
|
-
self.shadowRoot = self;
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
if (BUILD.slotChildNodesFix) {
|
|
2425
|
-
patchChildSlotNodes(self, cmpMeta);
|
|
2426
1642
|
}
|
|
2427
1643
|
}
|
|
2428
1644
|
connectedCallback() {
|
|
@@ -2445,24 +1661,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2445
1661
|
return getHostRef(this).$onReadyPromise$;
|
|
2446
1662
|
}
|
|
2447
1663
|
};
|
|
2448
|
-
if (BUILD.cloneNodeFix) {
|
|
2449
|
-
patchCloneNode(HostElement.prototype);
|
|
2450
|
-
}
|
|
2451
|
-
if (BUILD.appendChildSlotFix) {
|
|
2452
|
-
patchSlotAppendChild(HostElement.prototype);
|
|
2453
|
-
}
|
|
2454
|
-
if (BUILD.hotModuleReplacement) {
|
|
2455
|
-
HostElement.prototype['s-hmr'] = function (hmrVersionId) {
|
|
2456
|
-
hmrStart(this, cmpMeta, hmrVersionId);
|
|
2457
|
-
};
|
|
2458
|
-
}
|
|
2459
1664
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
2460
1665
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
2461
1666
|
cmpTags.push(tagName);
|
|
2462
1667
|
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
2463
1668
|
}
|
|
2464
1669
|
}));
|
|
2465
|
-
|
|
1670
|
+
{
|
|
2466
1671
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
2467
1672
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2468
1673
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
@@ -2473,10 +1678,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2473
1678
|
deferredConnectedCallbacks.map(host => host.connectedCallback());
|
|
2474
1679
|
}
|
|
2475
1680
|
else {
|
|
2476
|
-
|
|
2477
|
-
plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout')));
|
|
2478
|
-
}
|
|
2479
|
-
else {
|
|
1681
|
+
{
|
|
2480
1682
|
plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
|
|
2481
1683
|
}
|
|
2482
1684
|
}
|
|
@@ -2487,197 +1689,6 @@ const getAssetPath = (path) => {
|
|
|
2487
1689
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
2488
1690
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
2489
1691
|
};
|
|
2490
|
-
const setAssetPath = (path) => (plt.$resourcesUrl$ = path);
|
|
2491
|
-
const getConnect = (_ref, tagName) => {
|
|
2492
|
-
const componentOnReady = () => {
|
|
2493
|
-
let elm = doc.querySelector(tagName);
|
|
2494
|
-
if (!elm) {
|
|
2495
|
-
elm = doc.createElement(tagName);
|
|
2496
|
-
doc.body.appendChild(elm);
|
|
2497
|
-
}
|
|
2498
|
-
return typeof elm.componentOnReady === 'function' ? elm.componentOnReady() : Promise.resolve(elm);
|
|
2499
|
-
};
|
|
2500
|
-
const create = (...args) => {
|
|
2501
|
-
return componentOnReady().then(el => el.create(...args));
|
|
2502
|
-
};
|
|
2503
|
-
return {
|
|
2504
|
-
create,
|
|
2505
|
-
componentOnReady,
|
|
2506
|
-
};
|
|
2507
|
-
};
|
|
2508
|
-
const getContext = (_elm, context) => {
|
|
2509
|
-
if (context in Context) {
|
|
2510
|
-
return Context[context];
|
|
2511
|
-
}
|
|
2512
|
-
else if (context === 'window') {
|
|
2513
|
-
return win;
|
|
2514
|
-
}
|
|
2515
|
-
else if (context === 'document') {
|
|
2516
|
-
return doc;
|
|
2517
|
-
}
|
|
2518
|
-
else if (context === 'isServer' || context === 'isPrerender') {
|
|
2519
|
-
return BUILD.hydrateServerSide ? true : false;
|
|
2520
|
-
}
|
|
2521
|
-
else if (context === 'isClient') {
|
|
2522
|
-
return BUILD.hydrateServerSide ? false : true;
|
|
2523
|
-
}
|
|
2524
|
-
else if (context === 'resourcesUrl' || context === 'publicPath') {
|
|
2525
|
-
return getAssetPath('.');
|
|
2526
|
-
}
|
|
2527
|
-
else if (context === 'queue') {
|
|
2528
|
-
return {
|
|
2529
|
-
write: writeTask,
|
|
2530
|
-
read: readTask,
|
|
2531
|
-
tick: {
|
|
2532
|
-
then(cb) {
|
|
2533
|
-
return nextTick(cb);
|
|
2534
|
-
},
|
|
2535
|
-
},
|
|
2536
|
-
};
|
|
2537
|
-
}
|
|
2538
|
-
return undefined;
|
|
2539
|
-
};
|
|
2540
|
-
const insertVdomAnnotations = (doc, staticComponents) => {
|
|
2541
|
-
if (doc != null) {
|
|
2542
|
-
const docData = {
|
|
2543
|
-
hostIds: 0,
|
|
2544
|
-
rootLevelIds: 0,
|
|
2545
|
-
staticComponents: new Set(staticComponents),
|
|
2546
|
-
};
|
|
2547
|
-
const orgLocationNodes = [];
|
|
2548
|
-
parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
|
|
2549
|
-
orgLocationNodes.forEach(orgLocationNode => {
|
|
2550
|
-
if (orgLocationNode != null) {
|
|
2551
|
-
const nodeRef = orgLocationNode['s-nr'];
|
|
2552
|
-
let hostId = nodeRef['s-host-id'];
|
|
2553
|
-
let nodeId = nodeRef['s-node-id'];
|
|
2554
|
-
let childId = `${hostId}.${nodeId}`;
|
|
2555
|
-
if (hostId == null) {
|
|
2556
|
-
hostId = 0;
|
|
2557
|
-
docData.rootLevelIds++;
|
|
2558
|
-
nodeId = docData.rootLevelIds;
|
|
2559
|
-
childId = `${hostId}.${nodeId}`;
|
|
2560
|
-
if (nodeRef.nodeType === 1 /* ElementNode */) {
|
|
2561
|
-
nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
2562
|
-
}
|
|
2563
|
-
else if (nodeRef.nodeType === 3 /* TextNode */) {
|
|
2564
|
-
if (hostId === 0) {
|
|
2565
|
-
const textContent = nodeRef.nodeValue.trim();
|
|
2566
|
-
if (textContent === '') {
|
|
2567
|
-
// useless whitespace node at the document root
|
|
2568
|
-
orgLocationNode.remove();
|
|
2569
|
-
return;
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
|
-
const commentBeforeTextNode = doc.createComment(childId);
|
|
2573
|
-
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
2574
|
-
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
|
|
2578
|
-
const orgLocationParentNode = orgLocationNode.parentElement;
|
|
2579
|
-
if (orgLocationParentNode) {
|
|
2580
|
-
if (orgLocationParentNode['s-en'] === '') {
|
|
2581
|
-
// ending with a "." means that the parent element
|
|
2582
|
-
// of this node's original location is a SHADOW dom element
|
|
2583
|
-
// and this node is apart of the root level light dom
|
|
2584
|
-
orgLocationNodeId += `.`;
|
|
2585
|
-
}
|
|
2586
|
-
else if (orgLocationParentNode['s-en'] === 'c') {
|
|
2587
|
-
// ending with a ".c" means that the parent element
|
|
2588
|
-
// of this node's original location is a SCOPED element
|
|
2589
|
-
// and this node is apart of the root level light dom
|
|
2590
|
-
orgLocationNodeId += `.c`;
|
|
2591
|
-
}
|
|
2592
|
-
}
|
|
2593
|
-
orgLocationNode.nodeValue = orgLocationNodeId;
|
|
2594
|
-
}
|
|
2595
|
-
});
|
|
2596
|
-
}
|
|
2597
|
-
};
|
|
2598
|
-
const parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
|
|
2599
|
-
if (node == null) {
|
|
2600
|
-
return;
|
|
2601
|
-
}
|
|
2602
|
-
if (node['s-nr'] != null) {
|
|
2603
|
-
orgLocationNodes.push(node);
|
|
2604
|
-
}
|
|
2605
|
-
if (node.nodeType === 1 /* ElementNode */) {
|
|
2606
|
-
node.childNodes.forEach(childNode => {
|
|
2607
|
-
const hostRef = getHostRef(childNode);
|
|
2608
|
-
if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
|
|
2609
|
-
const cmpData = {
|
|
2610
|
-
nodeIds: 0,
|
|
2611
|
-
};
|
|
2612
|
-
insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
|
|
2613
|
-
}
|
|
2614
|
-
parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
|
|
2615
|
-
});
|
|
2616
|
-
}
|
|
2617
|
-
};
|
|
2618
|
-
const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
|
|
2619
|
-
if (vnode != null) {
|
|
2620
|
-
const hostId = ++docData.hostIds;
|
|
2621
|
-
hostElm.setAttribute(HYDRATE_ID, hostId);
|
|
2622
|
-
if (hostElm['s-cr'] != null) {
|
|
2623
|
-
hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`;
|
|
2624
|
-
}
|
|
2625
|
-
if (vnode.$children$ != null) {
|
|
2626
|
-
const depth = 0;
|
|
2627
|
-
vnode.$children$.forEach((vnodeChild, index) => {
|
|
2628
|
-
insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
|
|
2629
|
-
});
|
|
2630
|
-
}
|
|
2631
|
-
if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute('c-id')) {
|
|
2632
|
-
const parent = hostElm.parentElement;
|
|
2633
|
-
if (parent && parent.childNodes) {
|
|
2634
|
-
const parentChildNodes = Array.from(parent.childNodes);
|
|
2635
|
-
const comment = parentChildNodes.find(node => node.nodeType === 8 /* CommentNode */ && node['s-sr']);
|
|
2636
|
-
if (comment) {
|
|
2637
|
-
const index = parentChildNodes.indexOf(hostElm) - 1;
|
|
2638
|
-
vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
}
|
|
2642
|
-
}
|
|
2643
|
-
};
|
|
2644
|
-
const insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
|
|
2645
|
-
const childElm = vnodeChild.$elm$;
|
|
2646
|
-
if (childElm == null) {
|
|
2647
|
-
return;
|
|
2648
|
-
}
|
|
2649
|
-
const nodeId = cmpData.nodeIds++;
|
|
2650
|
-
const childId = `${hostId}.${nodeId}.${depth}.${index}`;
|
|
2651
|
-
childElm['s-host-id'] = hostId;
|
|
2652
|
-
childElm['s-node-id'] = nodeId;
|
|
2653
|
-
if (childElm.nodeType === 1 /* ElementNode */) {
|
|
2654
|
-
childElm.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
2655
|
-
}
|
|
2656
|
-
else if (childElm.nodeType === 3 /* TextNode */) {
|
|
2657
|
-
const parentNode = childElm.parentNode;
|
|
2658
|
-
const nodeName = parentNode.nodeName;
|
|
2659
|
-
if (nodeName !== 'STYLE' && nodeName !== 'SCRIPT') {
|
|
2660
|
-
const textNodeId = `${TEXT_NODE_ID}.${childId}`;
|
|
2661
|
-
const commentBeforeTextNode = doc.createComment(textNodeId);
|
|
2662
|
-
parentNode.insertBefore(commentBeforeTextNode, childElm);
|
|
2663
|
-
}
|
|
2664
|
-
}
|
|
2665
|
-
else if (childElm.nodeType === 8 /* CommentNode */) {
|
|
2666
|
-
if (childElm['s-sr']) {
|
|
2667
|
-
const slotName = childElm['s-sn'] || '';
|
|
2668
|
-
const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;
|
|
2669
|
-
childElm.nodeValue = slotNodeId;
|
|
2670
|
-
}
|
|
2671
|
-
}
|
|
2672
|
-
if (vnodeChild.$children$ != null) {
|
|
2673
|
-
const childDepth = depth + 1;
|
|
2674
|
-
vnodeChild.$children$.forEach((vnode, index) => {
|
|
2675
|
-
insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index);
|
|
2676
|
-
});
|
|
2677
|
-
}
|
|
2678
|
-
};
|
|
2679
|
-
const setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
2680
|
-
const Fragment = (_, children) => children;
|
|
2681
1692
|
const hostRefs = new WeakMap();
|
|
2682
1693
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
2683
1694
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -2688,13 +1699,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
2688
1699
|
$cmpMeta$: cmpMeta,
|
|
2689
1700
|
$instanceValues$: new Map(),
|
|
2690
1701
|
};
|
|
2691
|
-
|
|
2692
|
-
hostRef.$renderCount$ = 0;
|
|
2693
|
-
}
|
|
2694
|
-
if (BUILD.method && BUILD.lazyLoad) {
|
|
1702
|
+
{
|
|
2695
1703
|
hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
|
|
2696
1704
|
}
|
|
2697
|
-
|
|
1705
|
+
{
|
|
2698
1706
|
hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
|
|
2699
1707
|
elm['s-p'] = [];
|
|
2700
1708
|
elm['s-rc'] = [];
|
|
@@ -2703,33 +1711,22 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
2703
1711
|
return hostRefs.set(elm, hostRef);
|
|
2704
1712
|
};
|
|
2705
1713
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
2706
|
-
const consoleError = (e, el) => (
|
|
2707
|
-
const STENCIL_DEV_MODE = BUILD.isTesting
|
|
2708
|
-
? ['STENCIL:'] // E2E testing
|
|
2709
|
-
: ['%cstencil', 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px'];
|
|
2710
|
-
const consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
|
|
2711
|
-
const consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
|
|
2712
|
-
const consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
|
|
2713
|
-
const setErrorHandler = (handler) => customError = handler;
|
|
1714
|
+
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
2714
1715
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
2715
1716
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2716
1717
|
// loadModuleImport
|
|
2717
1718
|
const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
|
|
2718
1719
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
2719
|
-
|
|
2720
|
-
consoleDevError(`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`);
|
|
2721
|
-
return undefined;
|
|
2722
|
-
}
|
|
2723
|
-
const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;
|
|
1720
|
+
const module = cmpModules.get(bundleId) ;
|
|
2724
1721
|
if (module) {
|
|
2725
1722
|
return module[exportName];
|
|
2726
1723
|
}
|
|
2727
|
-
return
|
|
1724
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2728
1725
|
/* webpackInclude: /\.entry\.js$/ */
|
|
2729
1726
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
2730
1727
|
/* webpackMode: "lazy" */
|
|
2731
|
-
`./${bundleId}.entry.js${
|
|
2732
|
-
|
|
1728
|
+
`./${bundleId}.entry.js${''}`)); }).then(importedModule => {
|
|
1729
|
+
{
|
|
2733
1730
|
cmpModules.set(bundleId, importedModule);
|
|
2734
1731
|
}
|
|
2735
1732
|
return importedModule[exportName];
|
|
@@ -2739,7 +1736,6 @@ const styles = new Map();
|
|
|
2739
1736
|
const modeResolutionChain = [];
|
|
2740
1737
|
const queueDomReads = [];
|
|
2741
1738
|
const queueDomWrites = [];
|
|
2742
|
-
const queueDomWritesLow = [];
|
|
2743
1739
|
const queueTask = (queue, write) => (cb) => {
|
|
2744
1740
|
queue.push(cb);
|
|
2745
1741
|
if (!queuePending) {
|
|
@@ -2763,51 +1759,13 @@ const consume = (queue) => {
|
|
|
2763
1759
|
}
|
|
2764
1760
|
queue.length = 0;
|
|
2765
1761
|
};
|
|
2766
|
-
const consumeTimeout = (queue, timeout) => {
|
|
2767
|
-
let i = 0;
|
|
2768
|
-
let ts = 0;
|
|
2769
|
-
while (i < queue.length && (ts = performance.now()) < timeout) {
|
|
2770
|
-
try {
|
|
2771
|
-
queue[i++](ts);
|
|
2772
|
-
}
|
|
2773
|
-
catch (e) {
|
|
2774
|
-
consoleError(e);
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
if (i === queue.length) {
|
|
2778
|
-
queue.length = 0;
|
|
2779
|
-
}
|
|
2780
|
-
else if (i !== 0) {
|
|
2781
|
-
queue.splice(0, i);
|
|
2782
|
-
}
|
|
2783
|
-
};
|
|
2784
1762
|
const flush = () => {
|
|
2785
|
-
if (BUILD.asyncQueue) {
|
|
2786
|
-
queueCongestion++;
|
|
2787
|
-
}
|
|
2788
1763
|
// always force a bunch of medium callbacks to run, but still have
|
|
2789
1764
|
// a throttle on how many can run in a certain time
|
|
2790
1765
|
// DOM READS!!!
|
|
2791
1766
|
consume(queueDomReads);
|
|
2792
1767
|
// DOM WRITES!!!
|
|
2793
|
-
|
|
2794
|
-
const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0)) : Infinity;
|
|
2795
|
-
consumeTimeout(queueDomWrites, timeout);
|
|
2796
|
-
consumeTimeout(queueDomWritesLow, timeout);
|
|
2797
|
-
if (queueDomWrites.length > 0) {
|
|
2798
|
-
queueDomWritesLow.push(...queueDomWrites);
|
|
2799
|
-
queueDomWrites.length = 0;
|
|
2800
|
-
}
|
|
2801
|
-
if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0)) {
|
|
2802
|
-
// still more to do yet, but we've run out of time
|
|
2803
|
-
// let's let this thing cool off and try again in the next tick
|
|
2804
|
-
plt.raf(flush);
|
|
2805
|
-
}
|
|
2806
|
-
else {
|
|
2807
|
-
queueCongestion = 0;
|
|
2808
|
-
}
|
|
2809
|
-
}
|
|
2810
|
-
else {
|
|
1768
|
+
{
|
|
2811
1769
|
consume(queueDomWrites);
|
|
2812
1770
|
if ((queuePending = queueDomReads.length > 0)) {
|
|
2813
1771
|
// still more to do yet, but we've run out of time
|
|
@@ -2820,10 +1778,23 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
2820
1778
|
const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
|
|
2821
1779
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2822
1780
|
const Build = {
|
|
2823
|
-
isDev:
|
|
1781
|
+
isDev: false,
|
|
2824
1782
|
isBrowser: true,
|
|
2825
1783
|
isServer: false,
|
|
2826
|
-
isTesting:
|
|
1784
|
+
isTesting: false,
|
|
2827
1785
|
};
|
|
2828
1786
|
|
|
2829
|
-
|
|
1787
|
+
exports.Build = Build;
|
|
1788
|
+
exports.Host = Host;
|
|
1789
|
+
exports.bootstrapLazy = bootstrapLazy;
|
|
1790
|
+
exports.createEvent = createEvent;
|
|
1791
|
+
exports.forceUpdate = forceUpdate;
|
|
1792
|
+
exports.getAssetPath = getAssetPath;
|
|
1793
|
+
exports.getElement = getElement;
|
|
1794
|
+
exports.getMode = getMode;
|
|
1795
|
+
exports.h = h;
|
|
1796
|
+
exports.promiseResolve = promiseResolve;
|
|
1797
|
+
exports.readTask = readTask;
|
|
1798
|
+
exports.registerInstance = registerInstance;
|
|
1799
|
+
exports.setMode = setMode;
|
|
1800
|
+
exports.writeTask = writeTask;
|