@saasquatch/mint-components 2.5.5-1 → 2.5.5
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/AsYouType-5f15a922.js +4764 -0
- package/dist/cjs/{ErrorView-17578c10.js → ErrorView-8f6cf1cb.js} +1 -1
- package/dist/cjs/{GenericTableView-4c48c630.js → GenericTableView-12d35117.js} +17 -15
- package/dist/cjs/{JSS-8503a151.js → JSS-bf8078e9.js} +342 -338
- package/dist/cjs/{ShadowViewAddon-f57cb460.js → ShadowViewAddon-ee16ec1d.js} +312 -292
- package/dist/cjs/{copy-text-view-bb2c0ea7.js → copy-text-view-49517b2a.js} +2 -2
- package/dist/cjs/{data-ae38fa86.js → data-77273531.js} +5 -5
- package/dist/cjs/demoMerge-6f125494.js +203 -0
- package/dist/cjs/{dom-context-hooks.module-e7b6727c.js → dom-context-hooks.module-735c3942.js} +133 -76
- package/dist/cjs/{email-registration-view-306c8878.js → email-registration-view-36a74293.js} +10 -9
- package/dist/cjs/{global-3ba30270.js → global-973bc63c.js} +587 -583
- package/dist/cjs/{index.module-3221a469.js → index-8530c62f.js} +2911 -511
- package/dist/cjs/{index-8277cbb3.js → index-d41c2c94.js} +766 -340
- package/dist/cjs/{index-8c6255f5.js → index-f1dd6136.js} +47 -29
- package/dist/cjs/{jsonpointer-11327262.js → jsonpointer-0db21316.js} +8 -4
- package/dist/cjs/loader.cjs.js +6 -5
- package/dist/cjs/{luxon-c1ad356a.js → luxon-d3612a3d.js} +486 -299
- package/dist/cjs/mint-components.cjs.js +11 -7
- package/dist/cjs/{mockRewardData-ed603fca.js → mockRewardData-e6a0a048.js} +5 -3
- package/dist/cjs/{parseStates-d1effc19.js → parseStates-35013ba4.js} +3 -0
- package/dist/cjs/raisins-plop-target.cjs.entry.js +1 -1
- package/dist/cjs/{re-render-34b36aca.js → re-render-51c48d7c.js} +5 -5
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +399 -1395
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +818 -2891
- package/dist/cjs/{sqm-close-button-view-e9f2a454.js → sqm-close-button-view-74e5e1e9.js} +2 -2
- package/dist/cjs/sqm-close-button.cjs.entry.js +6 -11
- package/dist/cjs/sqm-code-verification.cjs.entry.js +20 -47
- package/dist/cjs/sqm-context-router.cjs.entry.js +9 -8
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +71 -182
- package/dist/cjs/sqm-empty_4.cjs.entry.js +21 -58
- package/dist/cjs/sqm-form-message_2.cjs.entry.js +7 -19
- package/dist/cjs/sqm-google-sign-in.cjs.entry.js +10 -9
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +11 -10
- package/dist/cjs/sqm-header-logo.cjs.entry.js +4 -19
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +14 -89
- package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +6 -8
- package/dist/cjs/{sqm-lead-checkbox-field-view-d6df81c7.js → sqm-lead-checkbox-field-view-24ac7358.js} +12 -11
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +14 -30
- package/dist/cjs/sqm-lead-input-field-view-7dfbc714.js +52 -0
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +15 -31
- package/dist/cjs/{sqm-leaderboard-rank-view-67fd7934.js → sqm-leaderboard-rank-view-e992762c.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +25 -22
- package/dist/cjs/{sqm-logout-current-user-view-f330d641.js → sqm-logout-current-user-view-ebee238e.js} +2 -2
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +17 -28
- package/dist/cjs/{sqm-navigation-sidebar-item-view-9134e64e.js → sqm-navigation-sidebar-item-view-a2cab80e.js} +4 -4
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +23 -18
- package/dist/cjs/{sqm-navigation-sidebar-view-6616e3e0.js → sqm-navigation-sidebar-view-873e0c44.js} +2 -2
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +12 -17
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +40 -102
- package/dist/cjs/{sqm-partner-info-modal-view-6173c618.js → sqm-partner-info-modal-view-c8972001.js} +4 -4
- package/dist/cjs/sqm-password-field.cjs.entry.js +186 -86
- package/dist/cjs/sqm-popup-container.cjs.entry.js +12 -12
- package/dist/cjs/{sqm-portal-container-view-757f921b.js → sqm-portal-container-view-c0cf9af9.js} +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-38d8344c.js → sqm-portal-email-verification-view-92866725.js} +4 -4
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +22 -52
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +101 -429
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +7 -13
- package/dist/cjs/{sqm-portal-profile-view-062eda68.js → sqm-portal-profile-view-60e78cdb.js} +20 -17
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +20 -56
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +11 -24
- package/dist/cjs/{sqm-portal-registration-form-view-a45f7a52.js → sqm-portal-registration-form-view-5473e24d.js} +26 -21
- package/dist/cjs/{sqm-portal-reset-password-view-b2c546bd.js → sqm-portal-reset-password-view-7a6f55c5.js} +3 -3
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +21 -89
- package/dist/cjs/{sqm-portal-verify-email-view-2a120d0a.js → sqm-portal-verify-email-view-7efa70c9.js} +48 -45
- package/dist/cjs/{sqm-qr-code-view-0d43424e.js → sqm-qr-code-view-70da70f9.js} +3 -3
- package/dist/cjs/sqm-qr-code.cjs.entry.js +22 -48
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +37 -140
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +5 -4
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -7
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +98 -217
- package/dist/cjs/sqm-route.cjs.entry.js +2 -1
- package/dist/cjs/sqm-scroll.cjs.entry.js +12 -8
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2892 -2264
- package/dist/cjs/sqm-tab.cjs.entry.js +5 -4
- package/dist/cjs/sqm-tabs.cjs.entry.js +9 -8
- package/dist/cjs/{sqm-text-span-view-b9e10f5d.js → sqm-text-span-view-c6938acd.js} +2 -2
- package/dist/cjs/sqm-text-span.cjs.entry.js +8 -4
- package/dist/cjs/{sqm-user-info-form-view-aedca5fe.js → sqm-user-info-form-view-e878a9a3.js} +173 -163
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +6 -11
- package/dist/cjs/subregions-3dbacb18.js +1467 -0
- package/dist/cjs/{useChildElements-36f7e4bb.js → useChildElements-e5e26816.js} +3 -3
- package/dist/cjs/{useIndirectTaxForm-7656fc63.js → useIndirectTaxForm-691691c2.js} +42 -38
- package/dist/cjs/{useInstantAccessRegistration-43514e50.js → useInstantAccessRegistration-9201777d.js} +6 -6
- package/dist/cjs/{useLeadFormState-34f9834b.js → useLeadFormState-f5b768b9.js} +20 -20
- package/dist/cjs/{usePortalRegistrationForm-b18a1f6b.js → usePortalRegistrationForm-b3c0451b.js} +16 -13
- package/dist/cjs/{useReferralCodes-25d5320a.js → useReferralCodes-5794a177.js} +11 -11
- package/dist/cjs/{useReferralTable-ad86986b.js → useReferralTable-32b3541b.js} +19 -19
- package/dist/cjs/{useRegistrationFormState-ea81d55a.js → useRegistrationFormState-feccd2c8.js} +3 -3
- package/dist/cjs/{useVerificationEmail-70aad5f1.js → useVerificationEmail-f0807562.js} +17 -15
- package/dist/cjs/{utilities-dfc34bea.js → utilities-04345466.js} +3 -3
- package/dist/collection/ShadowViewAddon.js +1 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/raisins-plop-target/raisins-plop-target.js +36 -34
- package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +3 -7
- package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +11 -23
- package/dist/collection/components/sqm-big-stat/BigStat.stories.js +11 -27
- package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +2 -16
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +1 -4
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +294 -298
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +3 -3
- package/dist/collection/components/sqm-brand/SqmBrand.stories.js +4 -72
- package/dist/collection/components/sqm-brand/sqm-brand.js +61 -58
- package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +43 -120
- package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +1 -5
- package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +55 -59
- package/dist/collection/components/sqm-checkbox-field/CheckboxField.stories.js +17 -22
- package/dist/collection/components/sqm-checkbox-field/UseCheckboxField.stories.js +5 -19
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +18 -21
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +167 -179
- package/dist/collection/components/sqm-close-button/CloseButton.stories.js +3 -5
- package/dist/collection/components/sqm-close-button/sqm-close-button-view.js +1 -5
- package/dist/collection/components/sqm-close-button/sqm-close-button.js +32 -35
- package/dist/collection/components/sqm-context-router/ContextRouter.js +4 -33
- package/dist/collection/components/sqm-context-router/sqm-context-router.js +39 -33
- package/dist/collection/components/sqm-coupon-code/CouponCode.stories.js +13 -13
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +1 -7
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +601 -695
- package/dist/collection/components/sqm-coupon-code/useCouponCode.js +10 -5
- package/dist/collection/components/sqm-divided-layout/DividedLayout.stories.js +19 -36
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +1 -5
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +129 -135
- package/dist/collection/components/sqm-dropdown-field/DropdownField.stories.js +7 -7
- package/dist/collection/components/sqm-dropdown-field/UseDropdownField.stories.js +3 -15
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +13 -15
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +128 -133
- package/dist/collection/components/sqm-edit-profile/EditProfileForm.stories.js +2 -2
- package/dist/collection/components/sqm-edit-profile/UseEditProfile.stories.js +9 -9
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +27 -45
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile.js +272 -264
- package/dist/collection/components/sqm-edit-profile/useEditProfile.js +4 -3
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +4 -7
- package/dist/collection/components/sqm-empty/sqm-empty-view.js +6 -12
- package/dist/collection/components/sqm-empty/sqm-empty.js +102 -95
- package/dist/collection/components/sqm-form-message/FormMessage.stories.js +9 -27
- package/dist/collection/components/sqm-form-message/sqm-form-message.js +102 -108
- package/dist/collection/components/sqm-google-sign-in/sqm-google-sign-in.js +61 -56
- package/dist/collection/components/sqm-graphql-client-provider/sqm-graphql-client-provider.js +32 -28
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +147 -161
- package/dist/collection/components/sqm-hero/Hero.stories.js +20 -54
- package/dist/collection/components/sqm-hero/sqm-hero-view.js +5 -11
- package/dist/collection/components/sqm-hero/sqm-hero.js +177 -202
- package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +9 -26
- package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +533 -590
- package/dist/collection/components/sqm-hook-story-container/sqm-hook-story-container.js +28 -23
- package/dist/collection/components/sqm-image/sqm-image-view.js +1 -6
- package/dist/collection/components/sqm-image/sqm-image.js +131 -131
- package/dist/collection/components/sqm-input-field/InputField.stories.js +17 -17
- package/dist/collection/components/sqm-input-field/UseInputField.stories.js +7 -22
- package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +14 -15
- package/dist/collection/components/sqm-input-field/sqm-input-field.js +156 -162
- package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +410 -481
- package/dist/collection/components/sqm-invoice-table/InvoiceTable.stories.js +2 -18
- package/dist/collection/components/sqm-invoice-table/UseInvoiceTable.stories.js +2 -14
- package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-data-cell.js +27 -23
- package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-date-cell.js +44 -40
- package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-download-cell.js +29 -29
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.js +85 -80
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.js +68 -64
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.js +40 -39
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table-view.js +1 -8
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +287 -310
- package/dist/collection/components/sqm-invoice-table/useInvoiceTable.js +1 -3
- package/dist/collection/components/sqm-lead-form/LeadCheckboxField.stories.js +7 -7
- package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +6 -10
- package/dist/collection/components/sqm-lead-form/LeadFormDropdownField.stories.js +10 -10
- package/dist/collection/components/sqm-lead-form/LeadInputField.stories.js +7 -7
- package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field-view.js +20 -24
- package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field.js +167 -179
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field-view.js +13 -17
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +174 -189
- package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +22 -48
- package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +365 -420
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field-view.js +13 -16
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +179 -191
- package/dist/collection/components/sqm-lead-form/useLeadForm.js +3 -1
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +23 -29
- package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +3 -15
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +11 -35
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +553 -563
- package/dist/collection/components/sqm-leaderboard-rank/LeaderboardRank.stories.js +3 -12
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +200 -192
- package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +4 -3
- package/dist/collection/components/sqm-link-button/LinkButton.stories.js +2 -2
- package/dist/collection/components/sqm-link-button/sqm-link-button-view.js +1 -6
- package/dist/collection/components/sqm-link-button/sqm-link-button.js +73 -77
- package/dist/collection/components/sqm-logout-current-user/LogoutCurrentUser.stories.js +1 -1
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user-view.js +1 -9
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +106 -115
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +104 -109
- package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +21 -20
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +104 -109
- package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu-view.js +6 -9
- package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu.js +92 -82
- package/dist/collection/components/sqm-navigation-sidebar/NavigationSidebar.stories.js +1 -3
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +1 -8
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar.js +71 -73
- package/dist/collection/components/sqm-navigation-sidebar-item/SidebarItem.stories.js +2 -2
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +1 -4
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +315 -308
- package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +1 -9
- package/dist/collection/components/sqm-pagination/sqm-pagination.js +94 -100
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +13 -13
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +22 -54
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +515 -603
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +3 -3
- package/dist/collection/components/sqm-password-field/passwordValidation.js +8 -20
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +16 -18
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +197 -219
- package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -7
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -4
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +82 -84
- package/dist/collection/components/sqm-popup-container/PopupContainer.stories.js +1 -2
- package/dist/collection/components/sqm-popup-container/sqm-popup-container-view.js +1 -5
- package/dist/collection/components/sqm-popup-container/sqm-popup-container.js +161 -155
- package/dist/collection/components/sqm-portal-change-marketing/ChangeMarketing.stories.js +5 -5
- package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing-view.js +8 -17
- package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing.js +142 -154
- package/dist/collection/components/sqm-portal-change-password/ChangePassword.stories.js +6 -6
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +8 -24
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +380 -436
- package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +5 -2
- package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +16 -119
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +1 -5
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +280 -299
- package/dist/collection/components/sqm-portal-email-verification/PortalEmailVerification.stories.js +5 -5
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +13 -25
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +216 -243
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
- package/dist/collection/components/sqm-portal-footer/PortalFooter.stories.js +6 -6
- package/dist/collection/components/sqm-portal-footer/PoweredByImg.js +1 -12
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +6 -16
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +317 -351
- package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -4
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +1 -14
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +279 -316
- package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +2 -1
- package/dist/collection/components/sqm-portal-frame/PortalFrame.stories.js +14 -55
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +1 -7
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +141 -158
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +295 -342
- package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +19 -26
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +645 -749
- package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +2 -5
- package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +1 -17
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +255 -292
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
- package/dist/collection/components/sqm-portal-logout/sqm-portal-logout.js +33 -36
- package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +6 -6
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +15 -26
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +282 -314
- package/dist/collection/components/sqm-portal-protected-route/sqm-portal-protected-route.js +72 -82
- package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +8 -13
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +15 -28
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +525 -610
- package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -1
- package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +10 -15
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +20 -33
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +573 -663
- package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +5 -2
- package/dist/collection/components/sqm-portal-reset-password/PortalResetPassword.stories.js +6 -6
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +7 -29
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +449 -514
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +2 -1
- package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +2 -2
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -14
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +196 -222
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +4 -2
- package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +20 -32
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +1 -7
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +84 -78
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +4 -10
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +231 -220
- package/dist/collection/components/sqm-program-menu/ProgramMenu.stories.js +8 -25
- package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +8 -9
- package/dist/collection/components/sqm-qr-code/QRCode.stories.js +8 -8
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +2 -11
- package/dist/collection/components/sqm-qr-code/sqm-qr-code.js +206 -230
- package/dist/collection/components/sqm-radio-card/RadioCard.stories.js +2 -2
- package/dist/collection/components/sqm-radio-card/sqm-radio-card-view.js +1 -9
- package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +29 -86
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +3 -11
- package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +304 -335
- package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +14 -14
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +369 -410
- package/dist/collection/components/sqm-referral-code/useReferralCode.js +3 -3
- package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +9 -36
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +3 -14
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +167 -175
- package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +2 -4
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -3
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +125 -132
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +9 -24
- package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +1 -1
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +5 -8
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +1 -1
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +30 -30
- package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +8 -30
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-cell.js +28 -23
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +44 -40
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +219 -278
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +81 -76
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +24 -20
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +65 -61
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +120 -139
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +260 -300
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +208 -225
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +124 -133
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +229 -253
- package/dist/collection/components/sqm-referral-table/useReferralTable.js +1 -3
- package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +479 -557
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +1 -1
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +1 -0
- package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +5 -26
- package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +8 -18
- package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +26 -28
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +96 -174
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +618 -726
- package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +16 -31
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +12 -15
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +11 -11
- package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +8 -30
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.js +45 -40
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +44 -40
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +97 -103
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +160 -156
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +336 -332
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +96 -105
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.js +67 -66
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +127 -135
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +173 -197
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +390 -463
- package/dist/collection/components/sqm-rewards-table/mockRewardData.js +4 -2
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +206 -219
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -3
- package/dist/collection/components/sqm-route/sqm-route.js +31 -26
- package/dist/collection/components/sqm-router/Router.stories.js +4 -33
- package/dist/collection/components/sqm-router/sqm-router.js +17 -14
- package/dist/collection/components/sqm-scroll/Scroll.stories.js +6 -89
- package/dist/collection/components/sqm-scroll/sqm-scroll.js +259 -255
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +12 -46
- package/dist/collection/components/sqm-share-button/UseShareButton.stories.js +2 -7
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -6
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +509 -521
- package/dist/collection/components/sqm-share-code/ShareCode.stories.js +13 -13
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +329 -360
- package/dist/collection/components/sqm-share-code/useShareCode.js +3 -3
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +85 -86
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +17 -20
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +21 -49
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +987 -1192
- package/dist/collection/components/sqm-share-link/useShareLink.js +3 -3
- package/dist/collection/components/sqm-skeleton/sqm-skeleton.js +55 -59
- package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +1 -5
- package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +162 -185
- package/dist/collection/components/sqm-stencilbook/AutoColor.js +1 -1
- package/dist/collection/components/sqm-stencilbook/BrandSelector.js +12 -15
- package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +1 -5
- package/dist/collection/components/sqm-stencilbook/HookStoryAddon.js +1 -2
- package/dist/collection/components/sqm-stencilbook/Matrix.js +4 -13
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +8 -13
- package/dist/collection/components/sqm-tab/sqm-tab.js +27 -25
- package/dist/collection/components/sqm-table-cell/sqm-table-cell.js +47 -49
- package/dist/collection/components/sqm-table-row/sqm-table-row.js +27 -30
- package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +10 -17
- package/dist/collection/components/sqm-tabs/sqm-tabs.js +62 -59
- package/dist/collection/components/sqm-tabs/useTabs.js +1 -2
- package/dist/collection/components/sqm-task-card/DetailsView.js +1 -7
- package/dist/collection/components/sqm-task-card/SVGs.js +3 -7
- package/dist/collection/components/sqm-task-card/TaskCard.stories.js +31 -277
- package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +1 -17
- package/dist/collection/components/sqm-task-card/progress-bar/ProgressBar.stories.js +1 -1
- package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +2 -10
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +10 -13
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +56 -83
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +780 -860
- package/dist/collection/components/sqm-text/Text.stories.js +2 -4
- package/dist/collection/components/sqm-text/sqm-text.js +61 -57
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -5
- package/dist/collection/components/sqm-text-span/sqm-text-span.js +109 -101
- package/dist/collection/components/sqm-timeline/SVGs.js +3 -9
- package/dist/collection/components/sqm-timeline/Timeline.stories.js +5 -57
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +1 -16
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +178 -166
- package/dist/collection/components/sqm-timeline/sqm-timeline.js +41 -45
- package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +5 -206
- package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +1 -4
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +129 -148
- package/dist/collection/components/sqm-user-attribute/UserAttribute.stories.js +4 -7
- package/dist/collection/components/sqm-user-attribute/sqm-user-attribute-view.js +1 -3
- package/dist/collection/components/sqm-user-attribute/sqm-user-attribute.js +146 -137
- package/dist/collection/components/sqm-user-name/sqm-user-name.js +82 -84
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +6 -26
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +215 -240
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +12 -22
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +12 -30
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +177 -195
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +33 -41
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +776 -921
- package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +4 -2
- package/dist/collection/components/tax-and-cash/SVGs.js +1 -4
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -3
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +188 -198
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +34 -83
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +1864 -2210
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +8 -7
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +13 -31
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +26 -53
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +565 -660
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +6 -3
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +24 -63
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +699 -816
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +11 -7
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +1 -4
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +5 -20
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +130 -147
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +12 -33
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +910 -1035
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/ErrorView.js +1 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/LoadingView.js +2 -19
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4760 -5686
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +89 -176
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +1857 -2159
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +27 -27
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/DocusignExpiredView.js +5 -9
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.js +24 -44
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/SlotViews.stories.js +6 -6
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +120 -157
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +713 -823
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -7
- package/dist/collection/components/views/EmailRegistration.stories.js +60 -60
- package/dist/collection/components/views/copy-text-view.js +6 -17
- package/dist/collection/components/views/email-registration-view.js +14 -28
- package/dist/collection/global/styles.js +8 -4
- package/dist/collection/stories/NewPortal.stories.js +106 -178
- package/dist/collection/tables/GenericTableView.js +19 -27
- package/dist/collection/tables/TableSlots.js +5 -19
- package/dist/collection/utils/DefaultTemplateView.js +6 -24
- package/dist/collection/utils/RequiredPropsError.js +10 -24
- package/dist/collection/utils/TemplateView.js +1 -3
- package/dist/collection/utils/demoMerge.js +10 -0
- package/dist/esm/AsYouType-cc09fa68.js +4746 -0
- package/dist/esm/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
- package/dist/esm/{GenericTableView-471a9386.js → GenericTableView-4f7ac63d.js} +17 -15
- package/dist/esm/{JSS-67b5cff8.js → JSS-e97b34f4.js} +341 -337
- package/dist/esm/{ShadowViewAddon-e1375e0d.js → ShadowViewAddon-0c8005bd.js} +284 -264
- package/dist/esm/{copy-text-view-87259b11.js → copy-text-view-e1c3f2cd.js} +2 -2
- package/dist/esm/{data-04d2da44.js → data-510cc9b7.js} +1 -1
- package/dist/esm/demoMerge-a0320a8e.js +201 -0
- package/dist/esm/{dom-context-hooks.module-50442785.js → dom-context-hooks.module-f88a3e54.js} +129 -72
- package/dist/esm/{email-registration-view-4cdb4129.js → email-registration-view-7a63a912.js} +10 -9
- package/dist/esm/{global-f019575d.js → global-cf0cc6b1.js} +586 -582
- package/dist/esm/{index-38ad4957.js → index-7a8b0c0b.js} +766 -341
- package/dist/esm/{index.module-cc08450c.js → index-b04013cc.js} +2873 -473
- package/dist/esm/{index-ffa26b43.js → index-e6f5153e.js} +47 -29
- package/dist/esm/{jsonpointer-388a7082.js → jsonpointer-c5423376.js} +8 -4
- package/dist/esm/loader.js +6 -5
- package/dist/esm/{luxon-1be92a8e.js → luxon-40b943cb.js} +486 -299
- package/dist/esm/mint-components.js +8 -7
- package/dist/esm/{mockRewardData-9b27d6f1.js → mockRewardData-2cceba7a.js} +5 -3
- package/dist/esm/{parseStates-ed75e224.js → parseStates-0c27f2de.js} +3 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/raisins-plop-target.entry.js +1 -1
- package/dist/esm/{re-render-380499f8.js → re-render-e911a0f7.js} +5 -5
- package/dist/esm/sqm-banking-info-form_10.entry.js +381 -1377
- package/dist/esm/sqm-big-stat_47.entry.js +767 -2840
- package/dist/esm/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +2 -2
- package/dist/esm/sqm-close-button.entry.js +5 -10
- package/dist/esm/sqm-code-verification.entry.js +19 -46
- package/dist/esm/sqm-context-router.entry.js +6 -5
- package/dist/esm/sqm-email-verification_2.entry.js +43 -154
- package/dist/esm/sqm-empty_4.entry.js +21 -58
- package/dist/esm/sqm-form-message_2.entry.js +7 -19
- package/dist/esm/sqm-google-sign-in.entry.js +4 -3
- package/dist/esm/sqm-graphql-client-provider.entry.js +9 -8
- package/dist/esm/sqm-header-logo.entry.js +4 -19
- package/dist/esm/sqm-instant-access-registration.entry.js +12 -87
- package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +6 -8
- package/dist/esm/{sqm-lead-checkbox-field-view-04aa32a7.js → sqm-lead-checkbox-field-view-d055e7bd.js} +12 -11
- package/dist/esm/sqm-lead-checkbox-field.entry.js +12 -28
- package/dist/esm/sqm-lead-input-field-view-b0d62f1c.js +50 -0
- package/dist/esm/sqm-lead-input-field.entry.js +13 -29
- package/dist/esm/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +22 -19
- package/dist/esm/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +2 -2
- package/dist/esm/sqm-logout-current-user.entry.js +12 -23
- package/dist/esm/{sqm-navigation-sidebar-item-view-40837457.js → sqm-navigation-sidebar-item-view-754b2484.js} +4 -4
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +21 -16
- package/dist/esm/{sqm-navigation-sidebar-view-2b66457a.js → sqm-navigation-sidebar-view-e2094399.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar.entry.js +11 -16
- package/dist/esm/sqm-pagination_3.entry.js +35 -97
- package/dist/esm/{sqm-partner-info-modal-view-e02fb63a.js → sqm-partner-info-modal-view-3b59be37.js} +4 -4
- package/dist/esm/sqm-password-field.entry.js +185 -85
- package/dist/esm/sqm-popup-container.entry.js +12 -12
- package/dist/esm/{sqm-portal-container-view-200c9df8.js → sqm-portal-container-view-fcd53673.js} +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +4 -4
- package/dist/esm/sqm-portal-email-verification.entry.js +18 -48
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +73 -401
- package/dist/esm/sqm-portal-logout.entry.js +5 -11
- package/dist/esm/{sqm-portal-profile-view-41894261.js → sqm-portal-profile-view-f27adfba.js} +20 -17
- package/dist/esm/sqm-portal-profile.entry.js +16 -52
- package/dist/esm/sqm-portal-protected-route.entry.js +8 -21
- package/dist/esm/{sqm-portal-registration-form-view-79265df5.js → sqm-portal-registration-form-view-113e1969.js} +26 -21
- package/dist/esm/{sqm-portal-reset-password-view-c7dd1c01.js → sqm-portal-reset-password-view-f9fb6355.js} +3 -3
- package/dist/esm/sqm-portal-reset-password.entry.js +18 -86
- package/dist/esm/{sqm-portal-verify-email-view-c102aa7c.js → sqm-portal-verify-email-view-ee40e3f2.js} +48 -45
- package/dist/esm/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +3 -3
- package/dist/esm/sqm-qr-code.entry.js +18 -44
- package/dist/esm/sqm-referral-table_11.entry.js +36 -139
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +5 -4
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +4 -7
- package/dist/esm/sqm-rewards-table_9.entry.js +55 -174
- package/dist/esm/sqm-route.entry.js +2 -1
- package/dist/esm/sqm-scroll.entry.js +12 -8
- package/dist/esm/sqm-stencilbook.entry.js +4808 -4180
- package/dist/esm/sqm-tab.entry.js +5 -4
- package/dist/esm/sqm-tabs.entry.js +9 -8
- package/dist/esm/{sqm-text-span-view-72f43dff.js → sqm-text-span-view-ed92b3c6.js} +2 -2
- package/dist/esm/sqm-text-span.entry.js +8 -4
- package/dist/esm/{sqm-user-info-form-view-8a95c5eb.js → sqm-user-info-form-view-c044a385.js} +173 -163
- package/dist/esm/sqm-widget-verification-controller.entry.js +4 -9
- package/dist/esm/subregions-d9f177f6.js +1452 -0
- package/dist/esm/{useChildElements-aa9eb7c9.js → useChildElements-a69f208f.js} +3 -3
- package/dist/esm/{useIndirectTaxForm-8d2e873d.js → useIndirectTaxForm-64a3ca69.js} +32 -28
- package/dist/esm/{useInstantAccessRegistration-7b11eb02.js → useInstantAccessRegistration-8c678a5a.js} +6 -6
- package/dist/esm/{useLeadFormState-b67018f2.js → useLeadFormState-34e05463.js} +7 -7
- package/dist/esm/{usePortalRegistrationForm-91e5786d.js → usePortalRegistrationForm-c6519939.js} +14 -11
- package/dist/esm/{useReferralCodes-a0a271ca.js → useReferralCodes-d0a384e4.js} +9 -9
- package/dist/esm/{useReferralTable-670580ff.js → useReferralTable-214dff06.js} +11 -11
- package/dist/esm/{useRegistrationFormState-95a75c57.js → useRegistrationFormState-72b4786d.js} +3 -3
- package/dist/esm/{useVerificationEmail-99d9f705.js → useVerificationEmail-b2c349a3.js} +12 -10
- package/dist/esm/{utilities-23a276e0.js → utilities-ceab25cd.js} +2 -2
- package/dist/esm-es5/AsYouType-cc09fa68.js +1 -0
- package/dist/esm-es5/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
- package/dist/esm-es5/GenericTableView-4f7ac63d.js +1 -0
- package/dist/esm-es5/JSS-e97b34f4.js +8 -0
- package/dist/esm-es5/ShadowViewAddon-0c8005bd.js +1 -0
- package/dist/esm-es5/copy-text-view-e1c3f2cd.js +1 -0
- package/dist/esm-es5/data-510cc9b7.js +1 -0
- package/dist/esm-es5/demoMerge-a0320a8e.js +1 -0
- package/dist/esm-es5/dom-context-hooks.module-f88a3e54.js +53 -0
- package/dist/esm-es5/email-registration-view-7a63a912.js +1 -0
- package/dist/esm-es5/global-cf0cc6b1.js +271 -0
- package/dist/esm-es5/imageUrl-4775f17b.js +1 -1
- package/dist/esm-es5/index-7a8b0c0b.js +2 -0
- package/dist/esm-es5/index-b04013cc.js +1 -0
- package/dist/esm-es5/index-e6f5153e.js +1 -0
- package/dist/esm-es5/jsonpointer-c5423376.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/luxon-40b943cb.js +1 -0
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/mockRewardData-2cceba7a.js +1 -0
- package/dist/esm-es5/parseStates-0c27f2de.js +1 -0
- package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
- package/dist/esm-es5/re-render-e911a0f7.js +1 -0
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message_2.entry.js +1 -1
- package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field-view-d055e7bd.js +1 -0
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/sqm-lead-input-field-view-b0d62f1c.js +1 -0
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-754b2484.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-e2094399.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-3b59be37.js +1 -0
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-fcd53673.js +1 -0
- package/dist/esm-es5/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-profile-view-f27adfba.js +1 -0
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form-view-113e1969.js +1 -0
- package/dist/esm-es5/sqm-portal-reset-password-view-f9fb6355.js +1 -0
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-ee40e3f2.js +1 -0
- package/dist/esm-es5/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-route.entry.js +1 -1
- package/dist/esm-es5/sqm-scroll.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-text-span-view-ed92b3c6.js +1 -0
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-c044a385.js +1 -0
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/subregions-d9f177f6.js +1 -0
- package/dist/esm-es5/useChildElements-a69f208f.js +1 -0
- package/dist/esm-es5/useIndirectTaxForm-64a3ca69.js +6 -0
- package/dist/esm-es5/useInstantAccessRegistration-8c678a5a.js +1 -0
- package/dist/esm-es5/useLeadFormState-34e05463.js +1 -0
- package/dist/esm-es5/usePortalRegistrationForm-c6519939.js +1 -0
- package/dist/esm-es5/useReferralCodes-d0a384e4.js +1 -0
- package/dist/esm-es5/useReferralTable-214dff06.js +1 -0
- package/dist/esm-es5/useRegistrationFormState-72b4786d.js +1 -0
- package/dist/esm-es5/useVerificationEmail-b2c349a3.js +1 -0
- package/dist/esm-es5/utilities-ceab25cd.js +1 -0
- package/dist/esm-es5/utils-334c1e34.js +1 -1
- package/dist/loader/index.d.ts +9 -1
- package/dist/loader/package.json +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +2 -1
- package/dist/mint-components/p-029ee766.system.js +1 -0
- package/dist/mint-components/p-04eaa3bb.system.js +1 -0
- package/dist/mint-components/p-056845fb.js +56 -0
- package/dist/mint-components/p-05715d8c.system.entry.js +1 -0
- package/dist/mint-components/p-0650e0f1.system.js +1 -0
- package/dist/mint-components/p-09a6ab1f.entry.js +1 -0
- package/dist/mint-components/p-0a8c9f35.system.entry.js +1 -0
- package/dist/mint-components/{p-11c127f5.js → p-0b77b3fe.js} +1 -1
- package/dist/mint-components/p-0bc61e27.system.entry.js +1 -0
- package/dist/mint-components/p-0bdacc2d.system.js +1 -0
- package/dist/mint-components/p-0c81f11f.system.entry.js +1 -0
- package/dist/mint-components/p-0c97293e.entry.js +1 -0
- package/dist/mint-components/p-0d69fc17.system.entry.js +1 -0
- package/dist/mint-components/p-0daa339e.entry.js +1 -0
- package/dist/mint-components/p-0f65e4ad.system.js +1 -0
- package/dist/mint-components/p-11028f98.system.js +1 -0
- package/dist/mint-components/p-119b9680.system.js +1 -0
- package/dist/mint-components/{p-ed741b3b.js → p-125c5bec.js} +6 -6
- package/dist/mint-components/p-12ae9c97.entry.js +1 -0
- package/dist/mint-components/p-139825b2.entry.js +1 -0
- package/dist/mint-components/p-14f0af4c.system.entry.js +1 -0
- package/dist/mint-components/{p-1a3a57c0.js → p-159a9368.js} +1 -1
- package/dist/mint-components/{p-78e98761.js → p-15f170d4.js} +4 -4
- package/dist/mint-components/p-162e5426.system.js +1 -0
- package/dist/mint-components/p-1933e4cc.system.entry.js +1 -0
- package/dist/mint-components/p-1aa5cdff.entry.js +1 -0
- package/dist/mint-components/p-1b673705.system.js +1 -0
- package/dist/mint-components/p-1e1543c7.entry.js +1 -0
- package/dist/mint-components/p-201ae45a.js +1 -0
- package/dist/mint-components/p-20b90db3.system.entry.js +1 -0
- package/dist/mint-components/p-2380b28e.system.entry.js +1 -0
- package/dist/mint-components/p-258152c8.system.entry.js +1 -0
- package/dist/mint-components/p-29be0454.system.entry.js +1 -0
- package/dist/mint-components/p-2af001d4.system.js +1 -0
- package/dist/mint-components/{p-88e16945.js → p-2b052eed.js} +1 -1
- package/dist/mint-components/p-2b5c577a.system.js +1 -0
- package/dist/mint-components/p-2ff39583.entry.js +33 -0
- package/dist/mint-components/p-3104b4ba.entry.js +1 -0
- package/dist/mint-components/p-324dd9c9.system.entry.js +1 -0
- package/dist/mint-components/p-32b3c92e.system.entry.js +1 -0
- package/dist/mint-components/{p-c813ec64.js → p-3595dbe3.js} +1 -1
- package/dist/mint-components/p-384d4366.system.entry.js +1 -0
- package/dist/mint-components/{p-a417a4c7.js → p-388fdcdc.js} +1 -1
- package/dist/mint-components/{p-acaf505d.entry.js → p-39e59497.entry.js} +1 -1
- package/dist/mint-components/p-3a8fa8df.system.entry.js +1 -0
- package/dist/mint-components/{p-456ccda6.system.js → p-3aab5e80.system.js} +1 -1
- package/dist/mint-components/p-3b7eac48.js +1 -0
- package/dist/mint-components/p-3f9d4025.js +254 -0
- package/dist/mint-components/p-4639a9ed.entry.js +1 -0
- package/dist/mint-components/p-483c2ce0.system.entry.js +1 -0
- package/dist/mint-components/p-487dac4b.system.js +271 -0
- package/dist/mint-components/p-49ca1533.system.entry.js +1 -0
- package/dist/mint-components/p-49d4188a.system.js +1 -0
- package/dist/mint-components/p-4be3689e.system.entry.js +1 -0
- package/dist/mint-components/p-4d690bf1.system.js +1 -0
- package/dist/mint-components/p-4ea630ba.system.js +1 -0
- package/dist/mint-components/p-5a1be3aa.entry.js +83 -0
- package/dist/mint-components/p-5a2c495f.js +1 -0
- package/dist/mint-components/p-5b043988.system.entry.js +1 -0
- package/dist/mint-components/p-5bacacba.entry.js +13 -0
- package/dist/mint-components/p-5e7e4e54.system.entry.js +1 -0
- package/dist/mint-components/p-6333265f.system.js +1 -1
- package/dist/mint-components/p-643a756b.system.js +53 -0
- package/dist/mint-components/p-647ca265.entry.js +1 -0
- package/dist/mint-components/p-647ffff2.entry.js +1 -0
- package/dist/mint-components/p-64c93b03.system.js +1 -0
- package/dist/mint-components/p-6708043c.entry.js +1 -0
- package/dist/mint-components/p-6a7c9ae4.system.entry.js +1 -0
- package/dist/mint-components/p-6a7cd966.system.js +1 -0
- package/dist/mint-components/p-6b9ff091.system.js +1 -0
- package/dist/mint-components/p-6be0e0a7.system.entry.js +1 -0
- package/dist/mint-components/p-6ccdf33a.js +1 -0
- package/dist/mint-components/p-6cdde5e8.system.js +1 -0
- package/dist/mint-components/p-6cfca206.js +1 -0
- package/dist/mint-components/{p-d276468c.js → p-6e00edce.js} +1 -1
- package/dist/mint-components/p-6eb14db9.system.entry.js +1 -0
- package/dist/mint-components/p-6f3ba1ad.system.js +1 -0
- package/dist/mint-components/p-6f66bb97.system.js +1 -0
- package/dist/mint-components/p-7127e360.system.entry.js +1 -0
- package/dist/mint-components/{p-d0559e66.js → p-71759064.js} +1 -1
- package/dist/mint-components/p-72f11f03.js +1 -0
- package/dist/mint-components/p-732ac03d.js +1 -0
- package/dist/mint-components/p-74f50554.js +1 -0
- package/dist/mint-components/p-7558fe46.js +499 -0
- package/dist/mint-components/{p-c43e1d3b.js → p-75b7496e.js} +1 -1
- package/dist/mint-components/p-76d36b05.js +1 -0
- package/dist/mint-components/p-7a8ed2f3.system.entry.js +1 -0
- package/dist/mint-components/{p-3390f1f2.system.js → p-7d992af1.system.js} +2 -2
- package/dist/mint-components/p-7f71b56b.system.entry.js +1 -0
- package/dist/mint-components/p-81b63e83.system.entry.js +1 -0
- package/dist/mint-components/p-83330731.system.js +1 -0
- package/dist/mint-components/p-834cd992.js +2 -0
- package/dist/mint-components/p-843c9997.system.js +1 -0
- package/dist/mint-components/{p-956f9479.system.js → p-8680e52b.system.js} +1 -1
- package/dist/mint-components/p-8740794e.system.js +2 -0
- package/dist/mint-components/p-885630e6.entry.js +1 -0
- package/dist/mint-components/p-8886a874.system.js +1 -0
- package/dist/mint-components/p-88b65807.system.js +1 -0
- package/dist/mint-components/p-89b410d5.system.entry.js +1 -0
- package/dist/mint-components/p-89eef397.entry.js +1 -0
- package/dist/mint-components/p-8aae5dba.system.entry.js +1 -0
- package/dist/mint-components/p-8ba39302.entry.js +1 -0
- package/dist/mint-components/{p-c2254b88.js → p-8d85f34c.js} +1 -1
- package/dist/mint-components/p-8f67c580.js +1 -0
- package/dist/mint-components/p-8fa1f8e3.entry.js +1 -0
- package/dist/mint-components/p-930cc94f.system.js +1 -0
- package/dist/mint-components/p-94f3e0a2.js +1 -0
- package/dist/mint-components/p-96e332db.entry.js +17 -0
- package/dist/mint-components/p-9755e82a.system.entry.js +1 -0
- package/dist/mint-components/p-9a7f186b.entry.js +1 -0
- package/dist/mint-components/p-9c2e286c.entry.js +11 -0
- package/dist/mint-components/{p-e30abc44.js → p-9cabd2d1.js} +1 -1
- package/dist/mint-components/p-9d06abb3.entry.js +13 -0
- package/dist/mint-components/p-9d1659c4.entry.js +308 -0
- package/dist/mint-components/p-9d6ef5ca.entry.js +11 -0
- package/dist/mint-components/p-a0e6ccbc.system.js +1 -0
- package/dist/mint-components/p-a35191ca.system.js +1 -0
- package/dist/mint-components/p-a3d1c665.system.entry.js +1 -0
- package/dist/mint-components/p-a43a9fa9.system.js +1 -1
- package/dist/mint-components/{p-04da3964.system.js → p-a6c96b8a.system.js} +1 -1
- package/dist/mint-components/p-a75748c4.js +13 -0
- package/dist/mint-components/{p-f9fcc772.js → p-a7a74002.js} +1 -1
- package/dist/mint-components/{p-3484f1c1.js → p-a8e2f45b.js} +1 -1
- package/dist/mint-components/p-a976d930.system.entry.js +1 -0
- package/dist/mint-components/p-aadbe44d.js +1 -0
- package/dist/mint-components/p-aaf15612.entry.js +1 -0
- package/dist/mint-components/p-ab1e96ea.system.js +1 -0
- package/dist/mint-components/p-abd9e52b.system.entry.js +1 -0
- package/dist/mint-components/{p-19aebd7d.js → p-ac32d96a.js} +1 -1
- package/dist/mint-components/{p-381af581.js → p-acd3e9e3.js} +1 -1
- package/dist/mint-components/{p-9a69f781.system.js → p-ae5f7df6.system.js} +1 -1
- package/dist/mint-components/p-af9d3491.js +1 -0
- package/dist/mint-components/p-b1f880ee.entry.js +1 -0
- package/dist/mint-components/p-b492fd4b.system.entry.js +1 -0
- package/dist/mint-components/p-b652d3b3.js +1 -0
- package/dist/mint-components/p-b6f5ab75.system.entry.js +1 -0
- package/dist/mint-components/p-b907384d.entry.js +1 -0
- package/dist/mint-components/p-bbb494a8.system.js +1 -0
- package/dist/mint-components/p-bd1a14ba.js +1 -0
- package/dist/mint-components/p-bd66c171.js +1 -0
- package/dist/mint-components/p-be38ae67.js +1 -0
- package/dist/mint-components/p-c30dfd5d.entry.js +92 -0
- package/dist/mint-components/p-c380988f.system.js +1 -0
- package/dist/mint-components/{p-104f6ced.entry.js → p-c3a07f51.entry.js} +1 -1
- package/dist/mint-components/p-c50c206e.system.js +1 -0
- package/dist/mint-components/p-c6d2a452.js +1 -0
- package/dist/mint-components/p-c7dd2eaa.system.entry.js +1 -0
- package/dist/mint-components/p-c8f697e4.system.js +1 -0
- package/dist/mint-components/p-c980e369.entry.js +1 -0
- package/dist/mint-components/p-cb714df1.system.js +1 -0
- package/dist/mint-components/p-cdf099fe.js +108 -0
- package/dist/mint-components/p-ce06d498.js +52 -0
- package/dist/mint-components/p-d08ebaa9.js +1 -0
- package/dist/mint-components/p-d8fac546.entry.js +1 -0
- package/dist/mint-components/p-d91a97d2.js +1 -0
- package/dist/mint-components/p-da6cb2c3.system.entry.js +1 -0
- package/dist/mint-components/p-dd7e8c95.system.js +8 -0
- package/dist/mint-components/p-dd82a675.system.entry.js +1 -0
- package/dist/mint-components/p-df1206f0.entry.js +1 -0
- package/dist/mint-components/p-df45273e.js +1 -0
- package/dist/mint-components/p-df531a5d.entry.js +1 -0
- package/dist/mint-components/p-e1c55f04.system.entry.js +1 -0
- package/dist/mint-components/p-e33839b3.system.js +1 -0
- package/dist/mint-components/p-e389aded.entry.js +1 -0
- package/dist/mint-components/p-e73e0fc4.system.js +1 -0
- package/dist/mint-components/p-e7f7b9c6.entry.js +1 -0
- package/dist/mint-components/{p-b47e3740.system.js → p-e9942aae.system.js} +1 -1
- package/dist/mint-components/p-eac100d1.system.js +1 -0
- package/dist/mint-components/p-eb47b174.entry.js +1 -0
- package/dist/mint-components/p-eba82926.js +1 -0
- package/dist/mint-components/p-ec00bb5f.js +1 -0
- package/dist/mint-components/p-edc8d9bc.system.js +1 -0
- package/dist/mint-components/p-f0e1d538.entry.js +147 -0
- package/dist/mint-components/{p-ff75998a.system.entry.js → p-f53c7a87.system.entry.js} +1 -1
- package/dist/mint-components/p-f686c142.system.js +1 -0
- package/dist/mint-components/{p-5b0de730.js → p-fa2edc58.js} +152 -152
- package/dist/mint-components/p-fab41ea8.system.entry.js +1 -0
- package/dist/mint-components/p-fd14377b.entry.js +1 -0
- package/dist/mint-components/p-ff1336b3.entry.js +148 -0
- package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -1
- package/dist/types/components/sqm-context-router/useContextRouter.d.ts +1 -1
- package/dist/types/components/sqm-coupon-code/useCouponCode.d.ts +1 -1
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +1 -1
- package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +2 -2
- package/dist/types/components/sqm-lead-form/useLeadFormState.d.ts +3 -3
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -2
- package/dist/types/components/sqm-pagination/usePagination.d.ts +1 -1
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +3 -3
- package/dist/types/components/sqm-popup-container/sqm-popup-container-view.d.ts +1 -1
- package/dist/types/components/sqm-popup-container/usePopupContainer.d.ts +2 -2
- package/dist/types/components/sqm-portal-footer/PoweredByImg.d.ts +1 -1
- package/dist/types/components/sqm-portal-footer/sqm-portal-footer-view.d.ts +1 -1
- package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +1 -1
- package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -1
- package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +1 -1
- package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +3 -3
- package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +2 -2
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +1 -1
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +2 -2
- package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +5 -5
- package/dist/types/components/sqm-router/useRouter.d.ts +1 -1
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +1 -1
- package/dist/types/components/sqm-stencilbook/Matrix.d.ts +1 -1
- package/dist/types/components/sqm-tab/sqm-tab-view.d.ts +1 -1
- package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -1
- package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +1 -1
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +1 -1
- package/dist/types/components/sqm-widget-verification/getVerificationStep.d.ts +2 -2
- package/dist/types/components/tax-and-cash/data.d.ts +13 -13
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/mockData.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -2
- package/dist/types/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +5 -5
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +6 -6
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -3
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/extractProps.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +5 -5
- package/dist/types/components/tax-and-cash/subregions.d.ts +1 -1
- package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
- package/dist/types/components.d.ts +3771 -3
- package/dist/types/global/mixins.d.ts +5 -5
- package/dist/types/stencil-public-runtime.d.ts +275 -193
- package/dist/types/utils/RequiredPropsError.d.ts +1 -1
- package/dist/types/utils/demoMerge.d.ts +8 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/docs/docs.docx +0 -0
- package/docs/stats.json +120116 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +34 -45
- package/dist/cjs/AsYouType-d15caac8.js +0 -4128
- package/dist/cjs/cjs-1066ec21.js +0 -135
- package/dist/cjs/eventKeys-7af4df4d.js +0 -5
- package/dist/cjs/sqm-lead-input-field-view-cd3f8076.js +0 -51
- package/dist/cjs/subregions-36662566.js +0 -1101
- package/dist/esm/AsYouType-2d56519e.js +0 -4108
- package/dist/esm/cjs-bdfb4486.js +0 -133
- package/dist/esm/eventKeys-f76b6a03.js +0 -3
- package/dist/esm/sqm-lead-input-field-view-919dc0a9.js +0 -49
- package/dist/esm/subregions-16dc47a9.js +0 -1086
- package/dist/esm-es5/AsYouType-2d56519e.js +0 -1
- package/dist/esm-es5/GenericTableView-471a9386.js +0 -1
- package/dist/esm-es5/JSS-67b5cff8.js +0 -8
- package/dist/esm-es5/ShadowViewAddon-e1375e0d.js +0 -1
- package/dist/esm-es5/cjs-bdfb4486.js +0 -1
- package/dist/esm-es5/copy-text-view-87259b11.js +0 -1
- package/dist/esm-es5/data-04d2da44.js +0 -1
- package/dist/esm-es5/dom-context-hooks.module-50442785.js +0 -53
- package/dist/esm-es5/email-registration-view-4cdb4129.js +0 -1
- package/dist/esm-es5/eventKeys-f76b6a03.js +0 -1
- package/dist/esm-es5/global-f019575d.js +0 -271
- package/dist/esm-es5/index-38ad4957.js +0 -1
- package/dist/esm-es5/index-ffa26b43.js +0 -1
- package/dist/esm-es5/index.module-cc08450c.js +0 -1
- package/dist/esm-es5/jsonpointer-388a7082.js +0 -1
- package/dist/esm-es5/luxon-1be92a8e.js +0 -1
- package/dist/esm-es5/mockRewardData-9b27d6f1.js +0 -1
- package/dist/esm-es5/parseStates-ed75e224.js +0 -1
- package/dist/esm-es5/re-render-380499f8.js +0 -1
- package/dist/esm-es5/sqm-lead-checkbox-field-view-04aa32a7.js +0 -1
- package/dist/esm-es5/sqm-lead-input-field-view-919dc0a9.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-40837457.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-2b66457a.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-e02fb63a.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-200c9df8.js +0 -1
- package/dist/esm-es5/sqm-portal-profile-view-41894261.js +0 -1
- package/dist/esm-es5/sqm-portal-registration-form-view-79265df5.js +0 -1
- package/dist/esm-es5/sqm-portal-reset-password-view-c7dd1c01.js +0 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-c102aa7c.js +0 -1
- package/dist/esm-es5/sqm-text-span-view-72f43dff.js +0 -1
- package/dist/esm-es5/sqm-user-info-form-view-8a95c5eb.js +0 -1
- package/dist/esm-es5/subregions-16dc47a9.js +0 -1
- package/dist/esm-es5/useChildElements-aa9eb7c9.js +0 -1
- package/dist/esm-es5/useIndirectTaxForm-8d2e873d.js +0 -6
- package/dist/esm-es5/useInstantAccessRegistration-7b11eb02.js +0 -1
- package/dist/esm-es5/useLeadFormState-b67018f2.js +0 -1
- package/dist/esm-es5/usePortalRegistrationForm-91e5786d.js +0 -1
- package/dist/esm-es5/useReferralCodes-a0a271ca.js +0 -1
- package/dist/esm-es5/useReferralTable-670580ff.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-95a75c57.js +0 -1
- package/dist/esm-es5/useVerificationEmail-99d9f705.js +0 -1
- package/dist/esm-es5/utilities-23a276e0.js +0 -1
- package/dist/mint-components/p-0306ce68.js +0 -1
- package/dist/mint-components/p-03361685.system.entry.js +0 -1
- package/dist/mint-components/p-036b876f.system.js +0 -1
- package/dist/mint-components/p-083180bf.js +0 -1
- package/dist/mint-components/p-08f36275.entry.js +0 -92
- package/dist/mint-components/p-08f82f9e.system.entry.js +0 -1
- package/dist/mint-components/p-092305db.entry.js +0 -1
- package/dist/mint-components/p-0ac8d8f4.system.js +0 -1
- package/dist/mint-components/p-0b1e90fe.system.js +0 -1
- package/dist/mint-components/p-0dca7884.entry.js +0 -148
- package/dist/mint-components/p-0ec9eb9b.entry.js +0 -1
- package/dist/mint-components/p-115dfc03.system.js +0 -1
- package/dist/mint-components/p-128610fb.system.js +0 -1
- package/dist/mint-components/p-13d1b10d.entry.js +0 -1
- package/dist/mint-components/p-13f3a647.js +0 -1
- package/dist/mint-components/p-16bd4751.system.entry.js +0 -1
- package/dist/mint-components/p-1a673057.system.js +0 -8
- package/dist/mint-components/p-1cf59d96.system.js +0 -1
- package/dist/mint-components/p-1ee1dd9c.system.entry.js +0 -1
- package/dist/mint-components/p-1f292473.entry.js +0 -1
- package/dist/mint-components/p-220cd813.system.entry.js +0 -1
- package/dist/mint-components/p-2392aabe.entry.js +0 -1
- package/dist/mint-components/p-263ca1be.system.js +0 -1
- package/dist/mint-components/p-274816ae.entry.js +0 -1
- package/dist/mint-components/p-2786819c.js +0 -1
- package/dist/mint-components/p-28ed2ae9.js +0 -1
- package/dist/mint-components/p-28fa5159.entry.js +0 -1
- package/dist/mint-components/p-290314a6.js +0 -52
- package/dist/mint-components/p-2cc01e0a.system.js +0 -1
- package/dist/mint-components/p-319bf866.system.entry.js +0 -1
- package/dist/mint-components/p-31b7d861.entry.js +0 -1
- package/dist/mint-components/p-31c5f477.entry.js +0 -1
- package/dist/mint-components/p-31cfa118.system.entry.js +0 -1
- package/dist/mint-components/p-3268c98c.system.entry.js +0 -1
- package/dist/mint-components/p-34917ee4.system.js +0 -1
- package/dist/mint-components/p-34bea1be.system.js +0 -1
- package/dist/mint-components/p-3db7a3c0.system.entry.js +0 -1
- package/dist/mint-components/p-429fa431.js +0 -1
- package/dist/mint-components/p-44ce74b6.js +0 -1
- package/dist/mint-components/p-45be99ae.system.js +0 -1
- package/dist/mint-components/p-47dc2362.system.entry.js +0 -1
- package/dist/mint-components/p-48b25874.system.js +0 -1
- package/dist/mint-components/p-4bd679a7.system.js +0 -1
- package/dist/mint-components/p-4ca6cc3c.system.entry.js +0 -1
- package/dist/mint-components/p-51d06654.system.js +0 -1
- package/dist/mint-components/p-5218d9dd.system.entry.js +0 -1
- package/dist/mint-components/p-5264ea68.js +0 -1
- package/dist/mint-components/p-5300edb5.js +0 -1
- package/dist/mint-components/p-556338c3.system.js +0 -1
- package/dist/mint-components/p-573ea3fd.system.entry.js +0 -1
- package/dist/mint-components/p-57c693ef.system.entry.js +0 -1
- package/dist/mint-components/p-59d5f239.system.entry.js +0 -1
- package/dist/mint-components/p-5c3cdefe.entry.js +0 -1
- package/dist/mint-components/p-5cda271c.system.entry.js +0 -1
- package/dist/mint-components/p-5d99dbc9.js +0 -1
- package/dist/mint-components/p-641f968d.system.js +0 -1
- package/dist/mint-components/p-686dd5eb.system.js +0 -1
- package/dist/mint-components/p-6b5528b1.entry.js +0 -33
- package/dist/mint-components/p-6c3a1d86.js +0 -1
- package/dist/mint-components/p-6c8758ac.entry.js +0 -1
- package/dist/mint-components/p-6dffb326.entry.js +0 -13
- package/dist/mint-components/p-6e9738a4.js +0 -1
- package/dist/mint-components/p-6f8dde97.system.js +0 -1
- package/dist/mint-components/p-7010498f.js +0 -1
- package/dist/mint-components/p-7062154c.system.js +0 -1
- package/dist/mint-components/p-717fa601.js +0 -1
- package/dist/mint-components/p-732907b1.system.entry.js +0 -1
- package/dist/mint-components/p-7562cd98.system.js +0 -1
- package/dist/mint-components/p-7ae8fb53.system.js +0 -1
- package/dist/mint-components/p-808f7f22.entry.js +0 -1
- package/dist/mint-components/p-80cee817.system.js +0 -1
- package/dist/mint-components/p-8452837a.system.js +0 -1
- package/dist/mint-components/p-85996c52.system.entry.js +0 -1
- package/dist/mint-components/p-8629d0be.system.entry.js +0 -1
- package/dist/mint-components/p-86c430f8.system.entry.js +0 -1
- package/dist/mint-components/p-8707c7fb.entry.js +0 -1
- package/dist/mint-components/p-8899ff38.system.entry.js +0 -1
- package/dist/mint-components/p-88a5350b.entry.js +0 -11
- package/dist/mint-components/p-8d363802.js +0 -1
- package/dist/mint-components/p-93e4954e.entry.js +0 -308
- package/dist/mint-components/p-952eefec.system.js +0 -1
- package/dist/mint-components/p-95f82a6f.entry.js +0 -9
- package/dist/mint-components/p-9715be5b.entry.js +0 -1
- package/dist/mint-components/p-97b8073f.system.js +0 -1
- package/dist/mint-components/p-99f7e6f1.js +0 -1
- package/dist/mint-components/p-9f517f81.entry.js +0 -1
- package/dist/mint-components/p-9f7d1197.system.entry.js +0 -1
- package/dist/mint-components/p-a04be06d.system.entry.js +0 -1
- package/dist/mint-components/p-a08157c4.js +0 -1
- package/dist/mint-components/p-a495e3a5.entry.js +0 -1
- package/dist/mint-components/p-a52a961e.entry.js +0 -1
- package/dist/mint-components/p-a6920cc9.system.entry.js +0 -1
- package/dist/mint-components/p-a7fc1e02.js +0 -42
- package/dist/mint-components/p-ab8a551f.system.entry.js +0 -1
- package/dist/mint-components/p-ac65d2c1.entry.js +0 -1
- package/dist/mint-components/p-ad9ea625.system.entry.js +0 -1
- package/dist/mint-components/p-b0aa9348.entry.js +0 -1
- package/dist/mint-components/p-b2295bc5.system.js +0 -1
- package/dist/mint-components/p-b56f3e55.js +0 -1
- package/dist/mint-components/p-b61be711.entry.js +0 -1
- package/dist/mint-components/p-b6504987.system.js +0 -53
- package/dist/mint-components/p-b69dbed8.system.js +0 -1
- package/dist/mint-components/p-b6b5fa4f.system.entry.js +0 -1
- package/dist/mint-components/p-bc625793.system.js +0 -1
- package/dist/mint-components/p-bee4af5d.js +0 -1
- package/dist/mint-components/p-c03131dd.js +0 -1
- package/dist/mint-components/p-c09ae087.system.js +0 -1
- package/dist/mint-components/p-c1086930.js +0 -1
- package/dist/mint-components/p-c50e77ad.entry.js +0 -1
- package/dist/mint-components/p-c5698ef9.system.js +0 -1
- package/dist/mint-components/p-ca872769.system.entry.js +0 -1
- package/dist/mint-components/p-ca90ea64.js +0 -499
- package/dist/mint-components/p-cdf5354f.entry.js +0 -1
- package/dist/mint-components/p-cef45012.js +0 -1
- package/dist/mint-components/p-d028db52.system.entry.js +0 -1
- package/dist/mint-components/p-d0318b41.entry.js +0 -13
- package/dist/mint-components/p-d0ce74bd.system.js +0 -1
- package/dist/mint-components/p-d267f4bb.system.js +0 -1
- package/dist/mint-components/p-d26df2da.entry.js +0 -1
- package/dist/mint-components/p-d3b1ab20.system.entry.js +0 -1
- package/dist/mint-components/p-d463fa82.system.js +0 -1
- package/dist/mint-components/p-d46a048d.system.entry.js +0 -1
- package/dist/mint-components/p-d533ff7b.system.js +0 -271
- package/dist/mint-components/p-d6a7f402.entry.js +0 -1
- package/dist/mint-components/p-d9dbbf22.system.entry.js +0 -1
- package/dist/mint-components/p-db30fbd1.js +0 -13
- package/dist/mint-components/p-de8d7e90.entry.js +0 -17
- package/dist/mint-components/p-df28013f.system.entry.js +0 -1
- package/dist/mint-components/p-dffad4a8.entry.js +0 -1
- package/dist/mint-components/p-e006b6ad.entry.js +0 -1
- package/dist/mint-components/p-e0578030.system.js +0 -1
- package/dist/mint-components/p-e31c7242.system.entry.js +0 -1
- package/dist/mint-components/p-e4eac70d.js +0 -108
- package/dist/mint-components/p-e506bf7f.entry.js +0 -1
- package/dist/mint-components/p-e66187b6.system.entry.js +0 -1
- package/dist/mint-components/p-e7cf6632.js +0 -1
- package/dist/mint-components/p-e7d6e1e0.entry.js +0 -11
- package/dist/mint-components/p-e7e129ac.js +0 -1
- package/dist/mint-components/p-eb992f94.js +0 -1
- package/dist/mint-components/p-ec3e44c8.system.js +0 -1
- package/dist/mint-components/p-ec58040a.system.js +0 -1
- package/dist/mint-components/p-eedda43c.system.js +0 -1
- package/dist/mint-components/p-f0b63c48.entry.js +0 -83
- package/dist/mint-components/p-f1584abb.system.entry.js +0 -1
- package/dist/mint-components/p-f381533a.js +0 -1
- package/dist/mint-components/p-f45e076d.system.js +0 -1
- package/dist/mint-components/p-f507b364.system.entry.js +0 -1
- package/dist/mint-components/p-f69a4eb1.system.entry.js +0 -1
- package/dist/mint-components/p-f89c6a57.system.js +0 -1
- package/dist/mint-components/p-f982278b.entry.js +0 -1
- package/dist/mint-components/p-fbdd8c2a.system.entry.js +0 -1
- package/dist/mint-components/p-fdc4f293.system.entry.js +0 -1
- package/dist/mint-components/p-ff1a5481.system.js +0 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
const NAMESPACE = 'mint-components';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
5
|
+
* Simon Friis Vindum (@paldepind)
|
|
6
|
+
* Licensed under the MIT License
|
|
7
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
8
|
+
*
|
|
9
|
+
* Modified for Stencil's renderer and slot projection
|
|
10
|
+
*/
|
|
3
11
|
let scopeId;
|
|
4
12
|
let contentRef;
|
|
5
13
|
let hostTagName;
|
|
@@ -9,32 +17,10 @@ let checkSlotRelocate = false;
|
|
|
9
17
|
let isSvgMode = false;
|
|
10
18
|
let renderingRef = null;
|
|
11
19
|
let queuePending = false;
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
const plt = {
|
|
17
|
-
$flags$: 0,
|
|
18
|
-
$resourcesUrl$: '',
|
|
19
|
-
jmp: h => h(),
|
|
20
|
-
raf: h => requestAnimationFrame(h),
|
|
21
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
22
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
23
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
20
|
+
const getAssetPath = (path) => {
|
|
21
|
+
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
22
|
+
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
24
23
|
};
|
|
25
|
-
const supportsShadow = true;
|
|
26
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
27
|
-
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
28
|
-
try {
|
|
29
|
-
new CSSStyleSheet();
|
|
30
|
-
return typeof (new CSSStyleSheet()).replace === 'function';
|
|
31
|
-
}
|
|
32
|
-
catch (e) { }
|
|
33
|
-
return false;
|
|
34
|
-
})()
|
|
35
|
-
;
|
|
36
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit!important}';
|
|
37
|
-
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
38
24
|
const createTime = (fnName, tagName = '') => {
|
|
39
25
|
{
|
|
40
26
|
return () => {
|
|
@@ -49,71 +35,8 @@ const uniqueTime = (key, measureText) => {
|
|
|
49
35
|
};
|
|
50
36
|
}
|
|
51
37
|
};
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
let style = styles.get(scopeId);
|
|
55
|
-
if (supportsConstructibleStylesheets && allowCS) {
|
|
56
|
-
style = (style || new CSSStyleSheet());
|
|
57
|
-
style.replace(cssText);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
style = cssText;
|
|
61
|
-
}
|
|
62
|
-
styles.set(scopeId, style);
|
|
63
|
-
};
|
|
64
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
65
|
-
let scopeId = getScopeId(cmpMeta);
|
|
66
|
-
let style = styles.get(scopeId);
|
|
67
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
68
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
69
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
70
|
-
if (style) {
|
|
71
|
-
if (typeof style === 'string') {
|
|
72
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
73
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
74
|
-
let styleElm;
|
|
75
|
-
if (!appliedStyles) {
|
|
76
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
77
|
-
}
|
|
78
|
-
if (!appliedStyles.has(scopeId)) {
|
|
79
|
-
{
|
|
80
|
-
{
|
|
81
|
-
styleElm = doc.createElement('style');
|
|
82
|
-
styleElm.innerHTML = style;
|
|
83
|
-
}
|
|
84
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
85
|
-
}
|
|
86
|
-
if (appliedStyles) {
|
|
87
|
-
appliedStyles.add(scopeId);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
else if ( !styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
92
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return scopeId;
|
|
96
|
-
};
|
|
97
|
-
const attachStyles = (hostRef) => {
|
|
98
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
99
|
-
const elm = hostRef.$hostElement$;
|
|
100
|
-
const flags = cmpMeta.$flags$;
|
|
101
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
102
|
-
const scopeId = addStyle( elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
103
|
-
if ( flags & 10 /* needsScopedEncapsulation */) {
|
|
104
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
105
|
-
// or this browser doesn't support native shadow dom
|
|
106
|
-
// and this host element was NOT created with SSR
|
|
107
|
-
// let's pick out the inner content for slot projection
|
|
108
|
-
// create a node to represent where the original
|
|
109
|
-
// content was first placed, which is useful later on
|
|
110
|
-
// DOM WRITE!!
|
|
111
|
-
elm['s-sc'] = scopeId;
|
|
112
|
-
elm.classList.add(scopeId + '-h');
|
|
113
|
-
}
|
|
114
|
-
endAttachStyles();
|
|
115
|
-
};
|
|
116
|
-
const getScopeId = (cmp, mode) => 'sc-' + ( cmp.$tagName$);
|
|
38
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit!important}';
|
|
39
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
117
40
|
/**
|
|
118
41
|
* Default style mode id
|
|
119
42
|
*/
|
|
@@ -133,6 +56,18 @@ const isComplexType = (o) => {
|
|
|
133
56
|
o = typeof o;
|
|
134
57
|
return o === 'object' || o === 'function';
|
|
135
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
61
|
+
* out of a DOM's head.
|
|
62
|
+
*
|
|
63
|
+
* @param doc The DOM containing the `head` to query against
|
|
64
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
65
|
+
* exists or the tag has no content.
|
|
66
|
+
*/
|
|
67
|
+
function queryNonceMetaTagContent(doc) {
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
70
|
+
}
|
|
136
71
|
/**
|
|
137
72
|
* Production h() function based on Preact by
|
|
138
73
|
* Jason Miller (@developit)
|
|
@@ -141,7 +76,6 @@ const isComplexType = (o) => {
|
|
|
141
76
|
*
|
|
142
77
|
* Modified for Stencil's compiler and vdom
|
|
143
78
|
*/
|
|
144
|
-
// const stack: any[] = [];
|
|
145
79
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
146
80
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
147
81
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -150,7 +84,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
150
84
|
let slotName = null;
|
|
151
85
|
let simple = false;
|
|
152
86
|
let lastSimple = false;
|
|
153
|
-
|
|
87
|
+
const vNodeChildren = [];
|
|
154
88
|
const walk = (c) => {
|
|
155
89
|
for (let i = 0; i < c.length; i++) {
|
|
156
90
|
child = c[i];
|
|
@@ -176,10 +110,10 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
176
110
|
walk(children);
|
|
177
111
|
if (vnodeData) {
|
|
178
112
|
// normalize class / classname attributes
|
|
179
|
-
if (
|
|
113
|
+
if (vnodeData.key) {
|
|
180
114
|
key = vnodeData.key;
|
|
181
115
|
}
|
|
182
|
-
if (
|
|
116
|
+
if (vnodeData.name) {
|
|
183
117
|
slotName = vnodeData.name;
|
|
184
118
|
}
|
|
185
119
|
{
|
|
@@ -189,12 +123,12 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
189
123
|
typeof classData !== 'object'
|
|
190
124
|
? classData
|
|
191
125
|
: Object.keys(classData)
|
|
192
|
-
.filter(k => classData[k])
|
|
126
|
+
.filter((k) => classData[k])
|
|
193
127
|
.join(' ');
|
|
194
128
|
}
|
|
195
129
|
}
|
|
196
130
|
}
|
|
197
|
-
if (
|
|
131
|
+
if (typeof nodeName === 'function') {
|
|
198
132
|
// nodeName is a functional component
|
|
199
133
|
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
200
134
|
}
|
|
@@ -211,6 +145,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
211
145
|
}
|
|
212
146
|
return vnode;
|
|
213
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
150
|
+
* possible text content.
|
|
151
|
+
*
|
|
152
|
+
* @param tag the tag for this element
|
|
153
|
+
* @param text possible text content for the node
|
|
154
|
+
* @returns a newly-minted virtual DOM node
|
|
155
|
+
*/
|
|
214
156
|
const newVNode = (tag, text) => {
|
|
215
157
|
const vnode = {
|
|
216
158
|
$flags$: 0,
|
|
@@ -231,11 +173,31 @@ const newVNode = (tag, text) => {
|
|
|
231
173
|
return vnode;
|
|
232
174
|
};
|
|
233
175
|
const Host = {};
|
|
176
|
+
/**
|
|
177
|
+
* Check whether a given node is a Host node or not
|
|
178
|
+
*
|
|
179
|
+
* @param node the virtual DOM node to check
|
|
180
|
+
* @returns whether it's a Host node or not
|
|
181
|
+
*/
|
|
234
182
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
183
|
+
/**
|
|
184
|
+
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
185
|
+
*
|
|
186
|
+
* Note that these functions convert from {@link d.VNode} to
|
|
187
|
+
* {@link d.ChildNode} to give functional component developers a friendly
|
|
188
|
+
* interface.
|
|
189
|
+
*/
|
|
235
190
|
const vdomFnUtils = {
|
|
236
191
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
237
192
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
238
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
196
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
197
|
+
*
|
|
198
|
+
* @param node the virtual DOM node to convert
|
|
199
|
+
* @returns a converted child node
|
|
200
|
+
*/
|
|
239
201
|
const convertToPublic = (node) => ({
|
|
240
202
|
vattrs: node.$attrs$,
|
|
241
203
|
vchildren: node.$children$,
|
|
@@ -244,6 +206,15 @@ const convertToPublic = (node) => ({
|
|
|
244
206
|
vtag: node.$tag$,
|
|
245
207
|
vtext: node.$text$,
|
|
246
208
|
});
|
|
209
|
+
/**
|
|
210
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
211
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
212
|
+
* likely created as part of presenting a public API, so converting it back
|
|
213
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
214
|
+
*
|
|
215
|
+
* @param node the child node to convert
|
|
216
|
+
* @returns a converted virtual DOM node
|
|
217
|
+
*/
|
|
247
218
|
const convertToPrivate = (node) => {
|
|
248
219
|
if (typeof node.vtag === 'function') {
|
|
249
220
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
@@ -262,6 +233,155 @@ const convertToPrivate = (node) => {
|
|
|
262
233
|
vnode.$name$ = node.vname;
|
|
263
234
|
return vnode;
|
|
264
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* Parse a new property value for a given property type.
|
|
238
|
+
*
|
|
239
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
240
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
241
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
242
|
+
* 2. the type stored from `propType`.
|
|
243
|
+
*
|
|
244
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
245
|
+
*
|
|
246
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
247
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
248
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
249
|
+
* ```tsx
|
|
250
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
251
|
+
* ```
|
|
252
|
+
*
|
|
253
|
+
* HTML prop values on the other hand, will always a string
|
|
254
|
+
*
|
|
255
|
+
* @param propValue the new value to coerce to some type
|
|
256
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
257
|
+
* @returns the parsed/coerced value
|
|
258
|
+
*/
|
|
259
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
260
|
+
// ensure this value is of the correct prop type
|
|
261
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
262
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
263
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
264
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
265
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
266
|
+
}
|
|
267
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
268
|
+
// force it to be a number
|
|
269
|
+
return parseFloat(propValue);
|
|
270
|
+
}
|
|
271
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
272
|
+
// could have been passed as a number or boolean
|
|
273
|
+
// but we still want it as a string
|
|
274
|
+
return String(propValue);
|
|
275
|
+
}
|
|
276
|
+
// redundant return here for better minification
|
|
277
|
+
return propValue;
|
|
278
|
+
}
|
|
279
|
+
// not sure exactly what type we want
|
|
280
|
+
// so no need to change to a different type
|
|
281
|
+
return propValue;
|
|
282
|
+
};
|
|
283
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
284
|
+
const createEvent = (ref, name, flags) => {
|
|
285
|
+
const elm = getElement(ref);
|
|
286
|
+
return {
|
|
287
|
+
emit: (detail) => {
|
|
288
|
+
return emitEvent(elm, name, {
|
|
289
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
290
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
291
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
292
|
+
detail,
|
|
293
|
+
});
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
299
|
+
* @param elm the target of the Event
|
|
300
|
+
* @param name the name to give the custom Event
|
|
301
|
+
* @param opts options for configuring a custom Event
|
|
302
|
+
* @returns the custom Event
|
|
303
|
+
*/
|
|
304
|
+
const emitEvent = (elm, name, opts) => {
|
|
305
|
+
const ev = plt.ce(name, opts);
|
|
306
|
+
elm.dispatchEvent(ev);
|
|
307
|
+
return ev;
|
|
308
|
+
};
|
|
309
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
310
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
311
|
+
let style = styles.get(scopeId);
|
|
312
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
313
|
+
style = (style || new CSSStyleSheet());
|
|
314
|
+
if (typeof style === 'string') {
|
|
315
|
+
style = cssText;
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
style.replaceSync(cssText);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
style = cssText;
|
|
323
|
+
}
|
|
324
|
+
styles.set(scopeId, style);
|
|
325
|
+
};
|
|
326
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
327
|
+
var _a;
|
|
328
|
+
let scopeId = getScopeId(cmpMeta);
|
|
329
|
+
const style = styles.get(scopeId);
|
|
330
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
331
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
332
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
333
|
+
if (style) {
|
|
334
|
+
if (typeof style === 'string') {
|
|
335
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
336
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
337
|
+
let styleElm;
|
|
338
|
+
if (!appliedStyles) {
|
|
339
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
340
|
+
}
|
|
341
|
+
if (!appliedStyles.has(scopeId)) {
|
|
342
|
+
{
|
|
343
|
+
{
|
|
344
|
+
styleElm = doc.createElement('style');
|
|
345
|
+
styleElm.innerHTML = style;
|
|
346
|
+
}
|
|
347
|
+
// Apply CSP nonce to the style tag if it exists
|
|
348
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
349
|
+
if (nonce != null) {
|
|
350
|
+
styleElm.setAttribute('nonce', nonce);
|
|
351
|
+
}
|
|
352
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
353
|
+
}
|
|
354
|
+
if (appliedStyles) {
|
|
355
|
+
appliedStyles.add(scopeId);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
360
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return scopeId;
|
|
364
|
+
};
|
|
365
|
+
const attachStyles = (hostRef) => {
|
|
366
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
367
|
+
const elm = hostRef.$hostElement$;
|
|
368
|
+
const flags = cmpMeta.$flags$;
|
|
369
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
370
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
371
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
372
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
373
|
+
// or this browser doesn't support native shadow dom
|
|
374
|
+
// and this host element was NOT created with SSR
|
|
375
|
+
// let's pick out the inner content for slot projection
|
|
376
|
+
// create a node to represent where the original
|
|
377
|
+
// content was first placed, which is useful later on
|
|
378
|
+
// DOM WRITE!!
|
|
379
|
+
elm['s-sc'] = scopeId;
|
|
380
|
+
elm.classList.add(scopeId + '-h');
|
|
381
|
+
}
|
|
382
|
+
endAttachStyles();
|
|
383
|
+
};
|
|
384
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
265
385
|
/**
|
|
266
386
|
* Production setAccessor() function based on Preact by
|
|
267
387
|
* Jason Miller (@developit)
|
|
@@ -274,19 +394,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
274
394
|
if (oldValue !== newValue) {
|
|
275
395
|
let isProp = isMemberInElement(elm, memberName);
|
|
276
396
|
let ln = memberName.toLowerCase();
|
|
277
|
-
if (
|
|
397
|
+
if (memberName === 'class') {
|
|
278
398
|
const classList = elm.classList;
|
|
279
399
|
const oldClasses = parseClassList(oldValue);
|
|
280
400
|
const newClasses = parseClassList(newValue);
|
|
281
|
-
classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
|
|
282
|
-
classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
|
|
401
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
402
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
283
403
|
}
|
|
284
|
-
else if (
|
|
404
|
+
else if (memberName === 'style') {
|
|
285
405
|
// update style attribute, css properties and values
|
|
286
406
|
{
|
|
287
407
|
for (const prop in oldValue) {
|
|
288
408
|
if (!newValue || newValue[prop] == null) {
|
|
289
|
-
if (
|
|
409
|
+
if (prop.includes('-')) {
|
|
290
410
|
elm.style.removeProperty(prop);
|
|
291
411
|
}
|
|
292
412
|
else {
|
|
@@ -297,7 +417,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
297
417
|
}
|
|
298
418
|
for (const prop in newValue) {
|
|
299
419
|
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
300
|
-
if (
|
|
420
|
+
if (prop.includes('-')) {
|
|
301
421
|
elm.style.setProperty(prop, newValue[prop]);
|
|
302
422
|
}
|
|
303
423
|
else {
|
|
@@ -306,15 +426,17 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
306
426
|
}
|
|
307
427
|
}
|
|
308
428
|
}
|
|
309
|
-
else if (
|
|
429
|
+
else if (memberName === 'key')
|
|
310
430
|
;
|
|
311
|
-
else if (
|
|
431
|
+
else if (memberName === 'ref') {
|
|
312
432
|
// minifier will clean this up
|
|
313
433
|
if (newValue) {
|
|
314
434
|
newValue(elm);
|
|
315
435
|
}
|
|
316
436
|
}
|
|
317
|
-
else if (
|
|
437
|
+
else if ((!isProp ) &&
|
|
438
|
+
memberName[0] === 'o' &&
|
|
439
|
+
memberName[1] === 'n') {
|
|
318
440
|
// Event Handlers
|
|
319
441
|
// so if the member name starts with "on" and the 3rd characters is
|
|
320
442
|
// a capital letter, and it's not already a member on the element,
|
|
@@ -357,11 +479,10 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
357
479
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
358
480
|
try {
|
|
359
481
|
if (!elm.tagName.includes('-')) {
|
|
360
|
-
|
|
482
|
+
const n = newValue == null ? '' : newValue;
|
|
361
483
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
362
484
|
if (memberName === 'list') {
|
|
363
485
|
isProp = false;
|
|
364
|
-
// tslint:disable-next-line: triple-equals
|
|
365
486
|
}
|
|
366
487
|
else if (oldValue == null || elm[memberName] != n) {
|
|
367
488
|
elm[memberName] = n;
|
|
@@ -389,7 +510,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
389
510
|
}
|
|
390
511
|
if (newValue == null || newValue === false) {
|
|
391
512
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
392
|
-
if (
|
|
513
|
+
if (xlink) {
|
|
393
514
|
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
394
515
|
}
|
|
395
516
|
else {
|
|
@@ -397,9 +518,9 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
397
518
|
}
|
|
398
519
|
}
|
|
399
520
|
}
|
|
400
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
521
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
401
522
|
newValue = newValue === true ? '' : newValue;
|
|
402
|
-
if (
|
|
523
|
+
if (xlink) {
|
|
403
524
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
404
525
|
}
|
|
405
526
|
else {
|
|
@@ -415,7 +536,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
415
536
|
// if the element passed in is a shadow root, which is a document fragment
|
|
416
537
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
417
538
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
418
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
539
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
540
|
+
? newVnode.$elm$.host
|
|
541
|
+
: newVnode.$elm$;
|
|
419
542
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
420
543
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
421
544
|
{
|
|
@@ -431,14 +554,24 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
431
554
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
432
555
|
}
|
|
433
556
|
};
|
|
557
|
+
/**
|
|
558
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
559
|
+
*
|
|
560
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
561
|
+
* @param newParentVNode the parent VNode from the current render
|
|
562
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
563
|
+
* children, for which we will create a new DOM node
|
|
564
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
565
|
+
* @returns the newly created node
|
|
566
|
+
*/
|
|
434
567
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
435
568
|
// tslint:disable-next-line: prefer-const
|
|
436
|
-
|
|
569
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
437
570
|
let i = 0;
|
|
438
571
|
let elm;
|
|
439
572
|
let childNode;
|
|
440
573
|
let oldVNode;
|
|
441
|
-
if (
|
|
574
|
+
if (!useNativeShadowDom) {
|
|
442
575
|
// remember for later we need to check to relocate nodes
|
|
443
576
|
checkSlotRelocate = true;
|
|
444
577
|
if (newVNode.$tag$ === 'slot') {
|
|
@@ -448,34 +581,37 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
448
581
|
}
|
|
449
582
|
newVNode.$flags$ |= newVNode.$children$
|
|
450
583
|
? // slot element has fallback content
|
|
451
|
-
2 /* isSlotFallback */
|
|
584
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
452
585
|
: // slot element does not have fallback content
|
|
453
|
-
1 /* isSlotReference */;
|
|
586
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
454
587
|
}
|
|
455
588
|
}
|
|
456
|
-
if (
|
|
589
|
+
if (newVNode.$text$ !== null) {
|
|
457
590
|
// create text node
|
|
458
591
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
459
592
|
}
|
|
460
|
-
else if (
|
|
593
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
461
594
|
// create a slot reference node
|
|
462
|
-
elm = newVNode.$elm$ =
|
|
595
|
+
elm = newVNode.$elm$ =
|
|
596
|
+
doc.createTextNode('');
|
|
463
597
|
}
|
|
464
598
|
else {
|
|
465
|
-
if (
|
|
599
|
+
if (!isSvgMode) {
|
|
466
600
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
467
601
|
}
|
|
468
602
|
// create element
|
|
469
|
-
elm = newVNode.$elm$ = (
|
|
603
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
604
|
+
? 'slot-fb'
|
|
605
|
+
: newVNode.$tag$)
|
|
470
606
|
);
|
|
471
|
-
if (
|
|
607
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
472
608
|
isSvgMode = false;
|
|
473
609
|
}
|
|
474
610
|
// add css classes, attrs, props, listeners, etc.
|
|
475
611
|
{
|
|
476
612
|
updateElement(null, newVNode, isSvgMode);
|
|
477
613
|
}
|
|
478
|
-
if (
|
|
614
|
+
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
479
615
|
// if there is a scopeId and this is the initial render
|
|
480
616
|
// then let's add the scopeId as a css class
|
|
481
617
|
elm.classList.add((elm['s-si'] = scopeId));
|
|
@@ -504,7 +640,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
504
640
|
}
|
|
505
641
|
{
|
|
506
642
|
elm['s-hn'] = hostTagName;
|
|
507
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
643
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
508
644
|
// remember the content reference comment
|
|
509
645
|
elm['s-sr'] = true;
|
|
510
646
|
// remember the content reference comment
|
|
@@ -523,7 +659,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
523
659
|
return elm;
|
|
524
660
|
};
|
|
525
661
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
526
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
662
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
527
663
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
528
664
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
529
665
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -544,12 +680,27 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
544
680
|
putBackInOriginalLocation(childNode, recursive);
|
|
545
681
|
}
|
|
546
682
|
}
|
|
547
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
683
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
548
684
|
};
|
|
685
|
+
/**
|
|
686
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
687
|
+
* add them to the DOM in the appropriate place.
|
|
688
|
+
*
|
|
689
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
690
|
+
* DOM nodes
|
|
691
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
692
|
+
* inserted before (optional)
|
|
693
|
+
* @param parentVNode the parent virtual DOM node
|
|
694
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
695
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
696
|
+
* creating DOM nodes (inclusive)
|
|
697
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
698
|
+
* creating DOM nodes (inclusive)
|
|
699
|
+
*/
|
|
549
700
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
550
|
-
let containerElm = ((
|
|
701
|
+
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
551
702
|
let childNode;
|
|
552
|
-
if (
|
|
703
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
553
704
|
containerElm = containerElm.shadowRoot;
|
|
554
705
|
}
|
|
555
706
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
@@ -557,11 +708,24 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
557
708
|
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
558
709
|
if (childNode) {
|
|
559
710
|
vnodes[startIdx].$elm$ = childNode;
|
|
560
|
-
containerElm.insertBefore(childNode,
|
|
711
|
+
containerElm.insertBefore(childNode, referenceNode(before) );
|
|
561
712
|
}
|
|
562
713
|
}
|
|
563
714
|
}
|
|
564
715
|
};
|
|
716
|
+
/**
|
|
717
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
718
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
719
|
+
* should no longer be shown.
|
|
720
|
+
*
|
|
721
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
722
|
+
*
|
|
723
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
724
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
725
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
726
|
+
* @param vnode a VNode
|
|
727
|
+
* @param elm an element
|
|
728
|
+
*/
|
|
565
729
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
566
730
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
567
731
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -586,6 +750,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
586
750
|
}
|
|
587
751
|
}
|
|
588
752
|
};
|
|
753
|
+
/**
|
|
754
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
755
|
+
* traversing the two collections of children, identifying nodes that are
|
|
756
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
757
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
758
|
+
*
|
|
759
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
760
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
761
|
+
* 'windows' by storing start and end indices and references to the
|
|
762
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
763
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
764
|
+
* no children left to update by doing the following:
|
|
765
|
+
*
|
|
766
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
767
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
768
|
+
* only with a window bounded by the highlighted elements:
|
|
769
|
+
*
|
|
770
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
771
|
+
* ^^^^^^ ^^^^^^
|
|
772
|
+
*
|
|
773
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
774
|
+
* across the windows. This will basically detect elements which haven't
|
|
775
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
776
|
+
* VNode elements (represented as HTML):
|
|
777
|
+
*
|
|
778
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
779
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
780
|
+
*
|
|
781
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
782
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
783
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
784
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
785
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
786
|
+
*
|
|
787
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
788
|
+
* window corresponds to the element at the end of the other window. This is
|
|
789
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
790
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
791
|
+
* children nodes themselves have not changed but merely moved in the
|
|
792
|
+
* following example:
|
|
793
|
+
*
|
|
794
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
795
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
796
|
+
*
|
|
797
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
798
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
799
|
+
* DOM.
|
|
800
|
+
*
|
|
801
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
802
|
+
* nodes in the old children which have the same key as the first element in
|
|
803
|
+
* our window on the new children. If we find such a node we handle calling
|
|
804
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
805
|
+
* what we find.
|
|
806
|
+
*
|
|
807
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
808
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
809
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
810
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
811
|
+
* children has collapsed we still have more nodes on the new children that
|
|
812
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
813
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
814
|
+
* sure the corresponding DOM nodes are removed.
|
|
815
|
+
*
|
|
816
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
817
|
+
* @param oldCh the old children of the parent node
|
|
818
|
+
* @param newVNode the new VNode which will replace the parent
|
|
819
|
+
* @param newCh the new children of the parent node
|
|
820
|
+
*/
|
|
589
821
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
590
822
|
let oldStartIdx = 0;
|
|
591
823
|
let newStartIdx = 0;
|
|
@@ -601,7 +833,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
601
833
|
let elmToMove;
|
|
602
834
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
603
835
|
if (oldStartVnode == null) {
|
|
604
|
-
//
|
|
836
|
+
// VNode might have been moved left
|
|
605
837
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
606
838
|
}
|
|
607
839
|
else if (oldEndVnode == null) {
|
|
@@ -614,37 +846,100 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
614
846
|
newEndVnode = newCh[--newEndIdx];
|
|
615
847
|
}
|
|
616
848
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
849
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
850
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
851
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
852
|
+
// since things are matched up in order.
|
|
617
853
|
patch(oldStartVnode, newStartVnode);
|
|
618
854
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
619
855
|
newStartVnode = newCh[++newStartIdx];
|
|
620
856
|
}
|
|
621
857
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
858
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
859
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
860
|
+
// need to move any DOM Nodes.
|
|
622
861
|
patch(oldEndVnode, newEndVnode);
|
|
623
862
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
624
863
|
newEndVnode = newCh[--newEndIdx];
|
|
625
864
|
}
|
|
626
865
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
627
|
-
// Vnode moved right
|
|
628
|
-
|
|
866
|
+
// case: "Vnode moved right"
|
|
867
|
+
//
|
|
868
|
+
// We've found that the last node in our window on the new children is
|
|
869
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
870
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
871
|
+
// nodes:
|
|
872
|
+
//
|
|
873
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
874
|
+
// ^^^^^^^^^^^
|
|
875
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
876
|
+
// ^^^^^^^^^^^^^
|
|
877
|
+
//
|
|
878
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
879
|
+
// and move the DOM element for `oldStartVnode`.
|
|
880
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
629
881
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
630
882
|
}
|
|
631
883
|
patch(oldStartVnode, newEndVnode);
|
|
884
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
885
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
886
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
887
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
888
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
889
|
+
//
|
|
890
|
+
// <old-start-node />
|
|
891
|
+
// <some-intervening-node />
|
|
892
|
+
// <old-end-node />
|
|
893
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
894
|
+
// <next-sibling />
|
|
895
|
+
//
|
|
896
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
897
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
898
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
899
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
900
|
+
// append it to the children of the parent element.
|
|
632
901
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
633
902
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
634
903
|
newEndVnode = newCh[--newEndIdx];
|
|
635
904
|
}
|
|
636
905
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
637
|
-
// Vnode moved left
|
|
638
|
-
|
|
906
|
+
// case: "Vnode moved left"
|
|
907
|
+
//
|
|
908
|
+
// We've found that the first node in our window on the new children is
|
|
909
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
910
|
+
// Visually, this is the layout of these two nodes:
|
|
911
|
+
//
|
|
912
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
913
|
+
// ^^^^^^^^^^^^^
|
|
914
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
915
|
+
// ^^^^^^^^^^^
|
|
916
|
+
//
|
|
917
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
918
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
919
|
+
// children etc) but we also need to move the DOM node to which
|
|
920
|
+
// `oldEndVnode` corresponds.
|
|
921
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
639
922
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
640
923
|
}
|
|
641
924
|
patch(oldEndVnode, newStartVnode);
|
|
925
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
926
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
927
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
928
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
929
|
+
// future.
|
|
642
930
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
643
931
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
644
932
|
newStartVnode = newCh[++newStartIdx];
|
|
645
933
|
}
|
|
646
934
|
else {
|
|
647
|
-
//
|
|
935
|
+
// Here we do some checks to match up old and new nodes based on the
|
|
936
|
+
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
937
|
+
// in the JSX for a DOM element in the implementation of a Stencil
|
|
938
|
+
// component.
|
|
939
|
+
//
|
|
940
|
+
// First we check to see if there are any nodes in the array of old
|
|
941
|
+
// children which have the same key as the first node in the new
|
|
942
|
+
// children.
|
|
648
943
|
idxInOld = -1;
|
|
649
944
|
{
|
|
650
945
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
@@ -654,24 +949,33 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
654
949
|
}
|
|
655
950
|
}
|
|
656
951
|
}
|
|
657
|
-
if (
|
|
952
|
+
if (idxInOld >= 0) {
|
|
953
|
+
// We found a node in the old children which matches up with the first
|
|
954
|
+
// node in the new children! So let's deal with that
|
|
658
955
|
elmToMove = oldCh[idxInOld];
|
|
659
956
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
957
|
+
// the tag doesn't match so we'll need a new DOM element
|
|
660
958
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
661
959
|
}
|
|
662
960
|
else {
|
|
663
961
|
patch(elmToMove, newStartVnode);
|
|
962
|
+
// invalidate the matching old node so that we won't try to update it
|
|
963
|
+
// again later on
|
|
664
964
|
oldCh[idxInOld] = undefined;
|
|
665
965
|
node = elmToMove.$elm$;
|
|
666
966
|
}
|
|
667
967
|
newStartVnode = newCh[++newStartIdx];
|
|
668
968
|
}
|
|
669
969
|
else {
|
|
670
|
-
//
|
|
970
|
+
// We either didn't find an element in the old children that matches
|
|
971
|
+
// the key of the first new child OR the build is not using `key`
|
|
972
|
+
// attributes at all. In either case we need to create a new element
|
|
973
|
+
// for the new node.
|
|
671
974
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
672
975
|
newStartVnode = newCh[++newStartIdx];
|
|
673
976
|
}
|
|
674
977
|
if (node) {
|
|
978
|
+
// if we created a new node then handle inserting it to the DOM
|
|
675
979
|
{
|
|
676
980
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
677
981
|
}
|
|
@@ -679,21 +983,44 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
679
983
|
}
|
|
680
984
|
}
|
|
681
985
|
if (oldStartIdx > oldEndIdx) {
|
|
986
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
682
987
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
683
988
|
}
|
|
684
|
-
else if (
|
|
989
|
+
else if (newStartIdx > newEndIdx) {
|
|
990
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
991
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
992
|
+
// relevant DOM nodes)
|
|
685
993
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
686
994
|
}
|
|
687
995
|
};
|
|
688
|
-
|
|
996
|
+
/**
|
|
997
|
+
* Compare two VNodes to determine if they are the same
|
|
998
|
+
*
|
|
999
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
1000
|
+
* information set on the two VNodes and can be misleading under certain
|
|
1001
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
1002
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
1003
|
+
* checking that they have the same tag.
|
|
1004
|
+
*
|
|
1005
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
1006
|
+
* changing order within a `children` array or something along those lines then
|
|
1007
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
1008
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
1009
|
+
*
|
|
1010
|
+
* @param leftVNode the first VNode to check
|
|
1011
|
+
* @param rightVNode the second VNode to check
|
|
1012
|
+
* @returns whether they're equal or not
|
|
1013
|
+
*/
|
|
1014
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
689
1015
|
// compare if two vnode to see if they're "technically" the same
|
|
690
1016
|
// need to have the same element tag, and same key to be the same
|
|
691
|
-
if (
|
|
692
|
-
if (
|
|
693
|
-
return
|
|
1017
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1018
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
1019
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
694
1020
|
}
|
|
1021
|
+
// this will be set if components in the build have `key` attrs set on them
|
|
695
1022
|
{
|
|
696
|
-
return
|
|
1023
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
697
1024
|
}
|
|
698
1025
|
}
|
|
699
1026
|
return false;
|
|
@@ -706,6 +1033,14 @@ const referenceNode = (node) => {
|
|
|
706
1033
|
return (node && node['s-ol']) || node;
|
|
707
1034
|
};
|
|
708
1035
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
1036
|
+
/**
|
|
1037
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
1038
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
1039
|
+
* children of the two nodes (if any).
|
|
1040
|
+
*
|
|
1041
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1042
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
1043
|
+
*/
|
|
709
1044
|
const patch = (oldVNode, newVNode) => {
|
|
710
1045
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
711
1046
|
const oldChildren = oldVNode.$children$;
|
|
@@ -713,15 +1048,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
713
1048
|
const tag = newVNode.$tag$;
|
|
714
1049
|
const text = newVNode.$text$;
|
|
715
1050
|
let defaultHolder;
|
|
716
|
-
if (
|
|
1051
|
+
if (text === null) {
|
|
717
1052
|
{
|
|
718
1053
|
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
719
1054
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
720
1055
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
721
1056
|
}
|
|
722
|
-
// element node
|
|
723
1057
|
{
|
|
724
|
-
if (
|
|
1058
|
+
if (tag === 'slot')
|
|
725
1059
|
;
|
|
726
1060
|
else {
|
|
727
1061
|
// either this is the first render of an element OR it's an update
|
|
@@ -730,32 +1064,33 @@ const patch = (oldVNode, newVNode) => {
|
|
|
730
1064
|
updateElement(oldVNode, newVNode, isSvgMode);
|
|
731
1065
|
}
|
|
732
1066
|
}
|
|
733
|
-
if (
|
|
1067
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
734
1068
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1069
|
+
// so we need to call `updateChildren` to reconcile them
|
|
735
1070
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
736
1071
|
}
|
|
737
1072
|
else if (newChildren !== null) {
|
|
738
1073
|
// no old child vnodes, but there are new child vnodes to add
|
|
739
|
-
if (
|
|
1074
|
+
if (oldVNode.$text$ !== null) {
|
|
740
1075
|
// the old vnode was text, so be sure to clear it out
|
|
741
1076
|
elm.textContent = '';
|
|
742
1077
|
}
|
|
743
1078
|
// add the new vnode children
|
|
744
1079
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
745
1080
|
}
|
|
746
|
-
else if (
|
|
1081
|
+
else if (oldChildren !== null) {
|
|
747
1082
|
// no new child vnodes, but there are old child vnodes to remove
|
|
748
1083
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
749
1084
|
}
|
|
750
|
-
if (
|
|
1085
|
+
if (isSvgMode && tag === 'svg') {
|
|
751
1086
|
isSvgMode = false;
|
|
752
1087
|
}
|
|
753
1088
|
}
|
|
754
|
-
else if (
|
|
1089
|
+
else if ((defaultHolder = elm['s-cr'])) {
|
|
755
1090
|
// this element has slotted content
|
|
756
1091
|
defaultHolder.parentNode.textContent = text;
|
|
757
1092
|
}
|
|
758
|
-
else if (
|
|
1093
|
+
else if (oldVNode.$text$ !== text) {
|
|
759
1094
|
// update the text content for the text only vnode
|
|
760
1095
|
// and also only if the text is different than before
|
|
761
1096
|
elm.data = text;
|
|
@@ -763,7 +1098,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
763
1098
|
};
|
|
764
1099
|
const updateFallbackSlotVisibility = (elm) => {
|
|
765
1100
|
// tslint:disable-next-line: prefer-const
|
|
766
|
-
|
|
1101
|
+
const childNodes = elm.childNodes;
|
|
767
1102
|
let childNode;
|
|
768
1103
|
let i;
|
|
769
1104
|
let ilen;
|
|
@@ -772,7 +1107,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
772
1107
|
let nodeType;
|
|
773
1108
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
774
1109
|
childNode = childNodes[i];
|
|
775
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1110
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
776
1111
|
if (childNode['s-sr']) {
|
|
777
1112
|
// this is a slot fallback node
|
|
778
1113
|
// get the slot name for this slot reference node
|
|
@@ -784,7 +1119,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
784
1119
|
nodeType = childNodes[j].nodeType;
|
|
785
1120
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
786
1121
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
787
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1122
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
788
1123
|
childNode.hidden = true;
|
|
789
1124
|
break;
|
|
790
1125
|
}
|
|
@@ -793,8 +1128,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
793
1128
|
// this is a default fallback slot node
|
|
794
1129
|
// any element or text node (with content)
|
|
795
1130
|
// should hide the default fallback slot node
|
|
796
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
797
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1131
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1132
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
798
1133
|
childNode.hidden = true;
|
|
799
1134
|
break;
|
|
800
1135
|
}
|
|
@@ -816,8 +1151,8 @@ const relocateSlotContent = (elm) => {
|
|
|
816
1151
|
let relocateNodeData;
|
|
817
1152
|
let j;
|
|
818
1153
|
let i = 0;
|
|
819
|
-
|
|
820
|
-
|
|
1154
|
+
const childNodes = elm.childNodes;
|
|
1155
|
+
const ilen = childNodes.length;
|
|
821
1156
|
for (; i < ilen; i++) {
|
|
822
1157
|
childNode = childNodes[i];
|
|
823
1158
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -833,7 +1168,7 @@ const relocateSlotContent = (elm) => {
|
|
|
833
1168
|
// that is suppose to always represent the original content location
|
|
834
1169
|
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
835
1170
|
// it's possible we've already decided to relocate this node
|
|
836
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
1171
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
837
1172
|
// made some changes to slots
|
|
838
1173
|
// let's make sure we also double check
|
|
839
1174
|
// fallbacks are correctly hidden or shown
|
|
@@ -852,9 +1187,9 @@ const relocateSlotContent = (elm) => {
|
|
|
852
1187
|
});
|
|
853
1188
|
}
|
|
854
1189
|
if (node['s-sr']) {
|
|
855
|
-
relocateNodes.map(relocateNode => {
|
|
1190
|
+
relocateNodes.map((relocateNode) => {
|
|
856
1191
|
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
857
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
1192
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
858
1193
|
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
859
1194
|
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
860
1195
|
}
|
|
@@ -862,7 +1197,7 @@ const relocateSlotContent = (elm) => {
|
|
|
862
1197
|
});
|
|
863
1198
|
}
|
|
864
1199
|
}
|
|
865
|
-
else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
|
|
1200
|
+
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
866
1201
|
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
867
1202
|
// if we never find a home for this element then we'll need to hide it
|
|
868
1203
|
relocateNodes.push({
|
|
@@ -872,13 +1207,13 @@ const relocateSlotContent = (elm) => {
|
|
|
872
1207
|
}
|
|
873
1208
|
}
|
|
874
1209
|
}
|
|
875
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1210
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
876
1211
|
relocateSlotContent(childNode);
|
|
877
1212
|
}
|
|
878
1213
|
}
|
|
879
1214
|
};
|
|
880
1215
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
881
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1216
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
882
1217
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
883
1218
|
return true;
|
|
884
1219
|
}
|
|
@@ -898,6 +1233,18 @@ const callNodeRefs = (vNode) => {
|
|
|
898
1233
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
899
1234
|
}
|
|
900
1235
|
};
|
|
1236
|
+
/**
|
|
1237
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1238
|
+
*
|
|
1239
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1240
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1241
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1242
|
+
* relocation, and reflecting attributes.
|
|
1243
|
+
*
|
|
1244
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1245
|
+
* the DOM node into which it should be rendered.
|
|
1246
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1247
|
+
*/
|
|
901
1248
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
902
1249
|
const hostElm = hostRef.$hostElement$;
|
|
903
1250
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -905,15 +1252,15 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
905
1252
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
906
1253
|
hostTagName = hostElm.tagName;
|
|
907
1254
|
rootVnode.$tag$ = null;
|
|
908
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1255
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
909
1256
|
hostRef.$vnode$ = rootVnode;
|
|
910
|
-
rootVnode.$elm$ = oldVNode.$elm$ = (
|
|
1257
|
+
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
911
1258
|
{
|
|
912
1259
|
scopeId = hostElm['s-sc'];
|
|
913
1260
|
}
|
|
914
1261
|
{
|
|
915
1262
|
contentRef = hostElm['s-cr'];
|
|
916
|
-
useNativeShadowDom =
|
|
1263
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
917
1264
|
// always reset
|
|
918
1265
|
checkSlotFallbackVisibility = false;
|
|
919
1266
|
}
|
|
@@ -922,7 +1269,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
922
1269
|
{
|
|
923
1270
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
924
1271
|
// the disconnectCallback from working
|
|
925
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1272
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
926
1273
|
if (checkSlotRelocate) {
|
|
927
1274
|
relocateSlotContent(rootVnode.$elm$);
|
|
928
1275
|
let relocateData;
|
|
@@ -938,7 +1285,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
938
1285
|
if (!nodeToRelocate['s-ol']) {
|
|
939
1286
|
// add a reference node marking this node's original location
|
|
940
1287
|
// keep a reference to this node for later lookups
|
|
941
|
-
orgLocationNode =
|
|
1288
|
+
orgLocationNode =
|
|
1289
|
+
doc.createTextNode('');
|
|
942
1290
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
943
1291
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
944
1292
|
}
|
|
@@ -962,7 +1310,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
962
1310
|
}
|
|
963
1311
|
}
|
|
964
1312
|
}
|
|
965
|
-
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1313
|
+
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1314
|
+
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
966
1315
|
// we've checked that it's worth while to relocate
|
|
967
1316
|
// since that the node to relocate
|
|
968
1317
|
// has a different next sibling or parent relocated
|
|
@@ -978,7 +1327,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
978
1327
|
}
|
|
979
1328
|
else {
|
|
980
1329
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
981
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1330
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
982
1331
|
nodeToRelocate.hidden = true;
|
|
983
1332
|
}
|
|
984
1333
|
}
|
|
@@ -989,41 +1338,22 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
989
1338
|
}
|
|
990
1339
|
// done moving nodes around
|
|
991
1340
|
// allow the disconnect callback to work again
|
|
992
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1341
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
993
1342
|
// always reset
|
|
994
1343
|
relocateNodes.length = 0;
|
|
995
1344
|
}
|
|
996
1345
|
};
|
|
997
|
-
const getElement = (ref) => ( getHostRef(ref).$hostElement$ );
|
|
998
|
-
const createEvent = (ref, name, flags) => {
|
|
999
|
-
const elm = getElement(ref);
|
|
1000
|
-
return {
|
|
1001
|
-
emit: (detail) => {
|
|
1002
|
-
return emitEvent(elm, name, {
|
|
1003
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1004
|
-
composed: !!(flags & 2 /* Composed */),
|
|
1005
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1006
|
-
detail,
|
|
1007
|
-
});
|
|
1008
|
-
},
|
|
1009
|
-
};
|
|
1010
|
-
};
|
|
1011
|
-
const emitEvent = (elm, name, opts) => {
|
|
1012
|
-
const ev = plt.ce(name, opts);
|
|
1013
|
-
elm.dispatchEvent(ev);
|
|
1014
|
-
return ev;
|
|
1015
|
-
};
|
|
1016
1346
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1017
|
-
if (
|
|
1018
|
-
ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
|
|
1347
|
+
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1348
|
+
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
1019
1349
|
}
|
|
1020
1350
|
};
|
|
1021
1351
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1022
1352
|
{
|
|
1023
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1353
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1024
1354
|
}
|
|
1025
|
-
if (
|
|
1026
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1355
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1356
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
1027
1357
|
return;
|
|
1028
1358
|
}
|
|
1029
1359
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -1031,11 +1361,11 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1031
1361
|
// has already fired off its lifecycle update then
|
|
1032
1362
|
// fire off the initial update
|
|
1033
1363
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1034
|
-
return
|
|
1364
|
+
return writeTask(dispatch) ;
|
|
1035
1365
|
};
|
|
1036
1366
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1037
1367
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
1038
|
-
const instance =
|
|
1368
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1039
1369
|
let promise;
|
|
1040
1370
|
if (isInitialLoad) {
|
|
1041
1371
|
{
|
|
@@ -1050,7 +1380,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1050
1380
|
const elm = hostRef.$hostElement$;
|
|
1051
1381
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
1052
1382
|
const rc = elm['s-rc'];
|
|
1053
|
-
if (
|
|
1383
|
+
if (isInitialLoad) {
|
|
1054
1384
|
// DOM WRITE!
|
|
1055
1385
|
attachStyles(hostRef);
|
|
1056
1386
|
}
|
|
@@ -1058,11 +1388,11 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1058
1388
|
{
|
|
1059
1389
|
callRender(hostRef, instance);
|
|
1060
1390
|
}
|
|
1061
|
-
if (
|
|
1391
|
+
if (rc) {
|
|
1062
1392
|
// ok, so turns out there are some child host elements
|
|
1063
1393
|
// waiting on this parent element to load
|
|
1064
1394
|
// let's fire off all update callbacks waiting
|
|
1065
|
-
rc.map(cb => cb());
|
|
1395
|
+
rc.map((cb) => cb());
|
|
1066
1396
|
elm['s-rc'] = undefined;
|
|
1067
1397
|
}
|
|
1068
1398
|
endRender();
|
|
@@ -1075,7 +1405,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1075
1405
|
}
|
|
1076
1406
|
else {
|
|
1077
1407
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1078
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1408
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1079
1409
|
childrenPromises.length = 0;
|
|
1080
1410
|
}
|
|
1081
1411
|
}
|
|
@@ -1083,12 +1413,12 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1083
1413
|
const callRender = (hostRef, instance, elm) => {
|
|
1084
1414
|
try {
|
|
1085
1415
|
renderingRef = instance;
|
|
1086
|
-
instance =
|
|
1416
|
+
instance = instance.render() ;
|
|
1087
1417
|
{
|
|
1088
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1418
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1089
1419
|
}
|
|
1090
1420
|
{
|
|
1091
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1421
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1092
1422
|
}
|
|
1093
1423
|
{
|
|
1094
1424
|
{
|
|
@@ -1112,10 +1442,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1112
1442
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1113
1443
|
const elm = hostRef.$hostElement$;
|
|
1114
1444
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1115
|
-
const instance =
|
|
1445
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1116
1446
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1117
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1118
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1447
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1448
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1119
1449
|
{
|
|
1120
1450
|
// DOM WRITE!
|
|
1121
1451
|
addHydratedFlag(elm);
|
|
@@ -1144,10 +1474,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1144
1474
|
hostRef.$onRenderResolve$();
|
|
1145
1475
|
hostRef.$onRenderResolve$ = undefined;
|
|
1146
1476
|
}
|
|
1147
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1477
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1148
1478
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1149
1479
|
}
|
|
1150
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1480
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1151
1481
|
}
|
|
1152
1482
|
// ( •_•)
|
|
1153
1483
|
// ( •_•)>⌐■-■
|
|
@@ -1157,7 +1487,8 @@ const forceUpdate = (ref) => {
|
|
|
1157
1487
|
{
|
|
1158
1488
|
const hostRef = getHostRef(ref);
|
|
1159
1489
|
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1160
|
-
if (isConnected &&
|
|
1490
|
+
if (isConnected &&
|
|
1491
|
+
(hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1161
1492
|
scheduleUpdate(hostRef, false);
|
|
1162
1493
|
}
|
|
1163
1494
|
// Returns "true" when the forced update was successfully scheduled
|
|
@@ -1186,45 +1517,25 @@ const safeCall = (instance, method, arg) => {
|
|
|
1186
1517
|
const then = (promise, thenFn) => {
|
|
1187
1518
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1188
1519
|
};
|
|
1189
|
-
const addHydratedFlag = (elm) =>
|
|
1190
|
-
|
|
1191
|
-
// ensure this value is of the correct prop type
|
|
1192
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1193
|
-
if ( propType & 4 /* Boolean */) {
|
|
1194
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1195
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1196
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1197
|
-
}
|
|
1198
|
-
if ( propType & 2 /* Number */) {
|
|
1199
|
-
// force it to be a number
|
|
1200
|
-
return parseFloat(propValue);
|
|
1201
|
-
}
|
|
1202
|
-
if ( propType & 1 /* String */) {
|
|
1203
|
-
// could have been passed as a number or boolean
|
|
1204
|
-
// but we still want it as a string
|
|
1205
|
-
return String(propValue);
|
|
1206
|
-
}
|
|
1207
|
-
// redundant return here for better minification
|
|
1208
|
-
return propValue;
|
|
1209
|
-
}
|
|
1210
|
-
// not sure exactly what type we want
|
|
1211
|
-
// so no need to change to a different type
|
|
1212
|
-
return propValue;
|
|
1213
|
-
};
|
|
1520
|
+
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1521
|
+
;
|
|
1214
1522
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1215
1523
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1216
1524
|
// check our new property value against our internal value
|
|
1217
1525
|
const hostRef = getHostRef(ref);
|
|
1218
1526
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1219
1527
|
const flags = hostRef.$flags$;
|
|
1220
|
-
const instance =
|
|
1528
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1221
1529
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1222
|
-
|
|
1530
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1531
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1532
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1533
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1223
1534
|
// gadzooks! the property's value has changed!!
|
|
1224
1535
|
// set our new value!
|
|
1225
1536
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1226
|
-
if (
|
|
1227
|
-
if (
|
|
1537
|
+
if (instance) {
|
|
1538
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1228
1539
|
// looks like this value actually changed, so we've got work to do!
|
|
1229
1540
|
// but only if we've already rendered, otherwise just chill out
|
|
1230
1541
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1234,13 +1545,24 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1234
1545
|
}
|
|
1235
1546
|
}
|
|
1236
1547
|
};
|
|
1548
|
+
/**
|
|
1549
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1550
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1551
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1552
|
+
*
|
|
1553
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1554
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1555
|
+
* @param flags a number used to store a series of bit flags
|
|
1556
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1557
|
+
*/
|
|
1237
1558
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1238
|
-
if (
|
|
1559
|
+
if (cmpMeta.$members$) {
|
|
1239
1560
|
// It's better to have a const than two Object.entries()
|
|
1240
1561
|
const members = Object.entries(cmpMeta.$members$);
|
|
1241
1562
|
const prototype = Cstr.prototype;
|
|
1242
1563
|
members.map(([memberName, [memberFlags]]) => {
|
|
1243
|
-
if (
|
|
1564
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1565
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1244
1566
|
// proxyComponent - prop
|
|
1245
1567
|
Object.defineProperty(prototype, memberName, {
|
|
1246
1568
|
get() {
|
|
@@ -1255,7 +1577,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1255
1577
|
enumerable: true,
|
|
1256
1578
|
});
|
|
1257
1579
|
}
|
|
1258
|
-
else if (
|
|
1580
|
+
else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
|
|
1581
|
+
memberFlags & 64 /* MEMBER_FLAGS.Method */) {
|
|
1259
1582
|
// proxyComponent - method
|
|
1260
1583
|
Object.defineProperty(prototype, memberName, {
|
|
1261
1584
|
value(...args) {
|
|
@@ -1265,18 +1588,63 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1265
1588
|
});
|
|
1266
1589
|
}
|
|
1267
1590
|
});
|
|
1268
|
-
if (
|
|
1591
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1269
1592
|
const attrNameToPropName = new Map();
|
|
1270
1593
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1271
1594
|
plt.jmp(() => {
|
|
1272
1595
|
const propName = attrNameToPropName.get(attrName);
|
|
1596
|
+
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1597
|
+
// in the case where an attribute was set inline.
|
|
1598
|
+
// ```html
|
|
1599
|
+
// <my-component some-attribute="some-value"></my-component>
|
|
1600
|
+
// ```
|
|
1601
|
+
//
|
|
1602
|
+
// There is an edge case where a developer sets the attribute inline on a custom element and then
|
|
1603
|
+
// programmatically changes it before it has been upgraded as shown below:
|
|
1604
|
+
//
|
|
1605
|
+
// ```html
|
|
1606
|
+
// <!-- this component has _not_ been upgraded yet -->
|
|
1607
|
+
// <my-component id="test" some-attribute="some-value"></my-component>
|
|
1608
|
+
// <script>
|
|
1609
|
+
// // grab non-upgraded component
|
|
1610
|
+
// el = document.querySelector("#test");
|
|
1611
|
+
// el.someAttribute = "another-value";
|
|
1612
|
+
// // upgrade component
|
|
1613
|
+
// customElements.define('my-component', MyComponent);
|
|
1614
|
+
// </script>
|
|
1615
|
+
// ```
|
|
1616
|
+
// In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1617
|
+
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1618
|
+
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1619
|
+
// the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
|
|
1620
|
+
//
|
|
1621
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
|
|
1622
|
+
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1623
|
+
//
|
|
1624
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1625
|
+
//
|
|
1626
|
+
// TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
|
|
1627
|
+
// properties here given that this goes against best practices outlined here
|
|
1628
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
|
|
1629
|
+
if (this.hasOwnProperty(propName)) {
|
|
1630
|
+
newValue = this[propName];
|
|
1631
|
+
delete this[propName];
|
|
1632
|
+
}
|
|
1633
|
+
else if (prototype.hasOwnProperty(propName) &&
|
|
1634
|
+
typeof this[propName] === 'number' &&
|
|
1635
|
+
this[propName] == newValue) {
|
|
1636
|
+
// if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
|
|
1637
|
+
// APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
|
|
1638
|
+
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1273
1641
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1274
1642
|
});
|
|
1275
1643
|
};
|
|
1276
1644
|
// create an array of attributes to observe
|
|
1277
1645
|
// and also create a map of html attribute name to js property name
|
|
1278
1646
|
Cstr.observedAttributes = members
|
|
1279
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1647
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1280
1648
|
.map(([propName, m]) => {
|
|
1281
1649
|
const attrName = m[1] || propName;
|
|
1282
1650
|
attrNameToPropName.set(attrName, propName);
|
|
@@ -1288,10 +1656,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1288
1656
|
};
|
|
1289
1657
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1290
1658
|
// initializeComponent
|
|
1291
|
-
if (
|
|
1659
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1292
1660
|
{
|
|
1293
1661
|
// we haven't initialized this element yet
|
|
1294
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1662
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1295
1663
|
// lazy loaded components
|
|
1296
1664
|
// request the component's implementation to be
|
|
1297
1665
|
// wired up with the host element
|
|
@@ -1302,8 +1670,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1302
1670
|
Cstr = await Cstr;
|
|
1303
1671
|
endLoad();
|
|
1304
1672
|
}
|
|
1305
|
-
if (
|
|
1306
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1673
|
+
if (!Cstr.isProxied) {
|
|
1674
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1307
1675
|
Cstr.isProxied = true;
|
|
1308
1676
|
}
|
|
1309
1677
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1311,7 +1679,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1311
1679
|
// but let's keep track of when we start and stop
|
|
1312
1680
|
// so that the getters/setters don't incorrectly step on data
|
|
1313
1681
|
{
|
|
1314
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1682
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1315
1683
|
}
|
|
1316
1684
|
// construct the lazy-loaded component implementation
|
|
1317
1685
|
// passing the hostRef is very important during
|
|
@@ -1324,18 +1692,18 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1324
1692
|
consoleError(e);
|
|
1325
1693
|
}
|
|
1326
1694
|
{
|
|
1327
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1695
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1328
1696
|
}
|
|
1329
1697
|
endNewInstance();
|
|
1330
1698
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1331
1699
|
}
|
|
1332
|
-
if (
|
|
1700
|
+
if (Cstr.style) {
|
|
1333
1701
|
// this component has styles but we haven't registered them yet
|
|
1334
1702
|
let style = Cstr.style;
|
|
1335
1703
|
const scopeId = getScopeId(cmpMeta);
|
|
1336
1704
|
if (!styles.has(scopeId)) {
|
|
1337
1705
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1338
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1706
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1339
1707
|
endRegisterStyles();
|
|
1340
1708
|
}
|
|
1341
1709
|
}
|
|
@@ -1343,8 +1711,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1343
1711
|
// we've successfully created a lazy instance
|
|
1344
1712
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1345
1713
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1346
|
-
if (
|
|
1347
|
-
// this is the
|
|
1714
|
+
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
1715
|
+
// this is the initial load and this component it has an ancestor component
|
|
1348
1716
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
1349
1717
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
1350
1718
|
// this will get fired off when the ancestor component
|
|
@@ -1362,19 +1730,19 @@ const fireConnectedCallback = (instance) => {
|
|
|
1362
1730
|
}
|
|
1363
1731
|
};
|
|
1364
1732
|
const connectedCallback = (elm) => {
|
|
1365
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1733
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1366
1734
|
const hostRef = getHostRef(elm);
|
|
1367
1735
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1368
1736
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1369
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1737
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1370
1738
|
// first time this component has connected
|
|
1371
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1739
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1372
1740
|
{
|
|
1373
1741
|
// initUpdate
|
|
1374
1742
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1375
1743
|
// in here to act as original content anchors as we move nodes around
|
|
1376
1744
|
// host element has been connected to the DOM
|
|
1377
|
-
if (
|
|
1745
|
+
if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1378
1746
|
setContentReference(elm);
|
|
1379
1747
|
}
|
|
1380
1748
|
}
|
|
@@ -1385,8 +1753,7 @@ const connectedCallback = (elm) => {
|
|
|
1385
1753
|
while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
|
|
1386
1754
|
// climb up the ancestors looking for the first
|
|
1387
1755
|
// component that hasn't finished its lifecycle update yet
|
|
1388
|
-
if (
|
|
1389
|
-
ancestorComponent['s-p']) {
|
|
1756
|
+
if (ancestorComponent['s-p']) {
|
|
1390
1757
|
// we found this components first ancestor component
|
|
1391
1758
|
// keep a reference to this component's ancestor component
|
|
1392
1759
|
attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
|
|
@@ -1396,9 +1763,9 @@ const connectedCallback = (elm) => {
|
|
|
1396
1763
|
}
|
|
1397
1764
|
// Lazy properties
|
|
1398
1765
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1399
|
-
if (
|
|
1766
|
+
if (cmpMeta.$members$) {
|
|
1400
1767
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1401
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1768
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1402
1769
|
const value = elm[memberName];
|
|
1403
1770
|
delete elm[memberName];
|
|
1404
1771
|
elm[memberName] = value;
|
|
@@ -1423,14 +1790,14 @@ const setContentReference = (elm) => {
|
|
|
1423
1790
|
// let's pick out the inner content for slot projection
|
|
1424
1791
|
// create a node to represent where the original
|
|
1425
1792
|
// content was first placed, which is useful later on
|
|
1426
|
-
const contentRefElm = (elm['s-cr'] = doc.createComment(
|
|
1793
|
+
const contentRefElm = (elm['s-cr'] = doc.createComment(''));
|
|
1427
1794
|
contentRefElm['s-cn'] = true;
|
|
1428
1795
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1429
1796
|
};
|
|
1430
1797
|
const disconnectedCallback = (elm) => {
|
|
1431
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1798
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1432
1799
|
const hostRef = getHostRef(elm);
|
|
1433
|
-
const instance =
|
|
1800
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1434
1801
|
{
|
|
1435
1802
|
safeCall(instance, 'disconnectedCallback');
|
|
1436
1803
|
}
|
|
@@ -1440,17 +1807,31 @@ const patchCloneNode = (HostElementPrototype) => {
|
|
|
1440
1807
|
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
1441
1808
|
HostElementPrototype.cloneNode = function (deep) {
|
|
1442
1809
|
const srcNode = this;
|
|
1443
|
-
const isShadowDom =
|
|
1810
|
+
const isShadowDom = srcNode.shadowRoot && supportsShadow ;
|
|
1444
1811
|
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
1445
|
-
if (
|
|
1812
|
+
if (!isShadowDom && deep) {
|
|
1446
1813
|
let i = 0;
|
|
1447
1814
|
let slotted, nonStencilNode;
|
|
1448
|
-
|
|
1815
|
+
const stencilPrivates = [
|
|
1816
|
+
's-id',
|
|
1817
|
+
's-cr',
|
|
1818
|
+
's-lr',
|
|
1819
|
+
's-rc',
|
|
1820
|
+
's-sc',
|
|
1821
|
+
's-p',
|
|
1822
|
+
's-cn',
|
|
1823
|
+
's-sr',
|
|
1824
|
+
's-sn',
|
|
1825
|
+
's-hn',
|
|
1826
|
+
's-ol',
|
|
1827
|
+
's-nr',
|
|
1828
|
+
's-si',
|
|
1829
|
+
];
|
|
1449
1830
|
for (; i < srcNode.childNodes.length; i++) {
|
|
1450
1831
|
slotted = srcNode.childNodes[i]['s-nr'];
|
|
1451
1832
|
nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
|
|
1452
1833
|
if (slotted) {
|
|
1453
|
-
if (
|
|
1834
|
+
if (clonedNode.__appendChild) {
|
|
1454
1835
|
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
1455
1836
|
}
|
|
1456
1837
|
else {
|
|
@@ -1484,7 +1865,7 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
|
1484
1865
|
return this[n];
|
|
1485
1866
|
}
|
|
1486
1867
|
}
|
|
1487
|
-
if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
1868
|
+
if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
|
|
1488
1869
|
const childNodesFn = elm.__lookupGetter__('childNodes');
|
|
1489
1870
|
Object.defineProperty(elm, 'children', {
|
|
1490
1871
|
get() {
|
|
@@ -1499,7 +1880,8 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
|
1499
1880
|
Object.defineProperty(elm, 'childNodes', {
|
|
1500
1881
|
get() {
|
|
1501
1882
|
const childNodes = childNodesFn.call(this);
|
|
1502
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 &&
|
|
1883
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&
|
|
1884
|
+
getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {
|
|
1503
1885
|
const result = new FakeNodeList();
|
|
1504
1886
|
for (let i = 0; i < childNodes.length; i++) {
|
|
1505
1887
|
const slot = childNodes[i]['s-nr'];
|
|
@@ -1515,6 +1897,12 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
|
1515
1897
|
}
|
|
1516
1898
|
};
|
|
1517
1899
|
const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
|
|
1900
|
+
/**
|
|
1901
|
+
* Recursively searches a series of child nodes for a slot with the provided name.
|
|
1902
|
+
* @param childNodes the nodes to search for a slot with a specific name.
|
|
1903
|
+
* @param slotName the name of the slot to match on.
|
|
1904
|
+
* @returns a reference to the slot node that matches the provided name, `null` otherwise
|
|
1905
|
+
*/
|
|
1518
1906
|
const getHostSlotNode = (childNodes, slotName) => {
|
|
1519
1907
|
let i = 0;
|
|
1520
1908
|
let childNode;
|
|
@@ -1538,6 +1926,7 @@ const getHostSlotChildNodes = (n, slotName) => {
|
|
|
1538
1926
|
return childNodes;
|
|
1539
1927
|
};
|
|
1540
1928
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1929
|
+
var _a;
|
|
1541
1930
|
const endBootstrap = createTime();
|
|
1542
1931
|
const cmpTags = [];
|
|
1543
1932
|
const exclude = options.exclude || [];
|
|
@@ -1550,80 +1939,87 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1550
1939
|
let isBootstrapping = true;
|
|
1551
1940
|
Object.assign(plt, options);
|
|
1552
1941
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1553
|
-
lazyBundles.map(lazyBundle =>
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1942
|
+
lazyBundles.map((lazyBundle) => {
|
|
1943
|
+
lazyBundle[1].map((compactMeta) => {
|
|
1944
|
+
const cmpMeta = {
|
|
1945
|
+
$flags$: compactMeta[0],
|
|
1946
|
+
$tagName$: compactMeta[1],
|
|
1947
|
+
$members$: compactMeta[2],
|
|
1948
|
+
$listeners$: compactMeta[3],
|
|
1949
|
+
};
|
|
1950
|
+
{
|
|
1951
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
1952
|
+
}
|
|
1953
|
+
const tagName = cmpMeta.$tagName$;
|
|
1954
|
+
const HostElement = class extends HTMLElement {
|
|
1955
|
+
// StencilLazyHost
|
|
1956
|
+
constructor(self) {
|
|
1957
|
+
// @ts-ignore
|
|
1958
|
+
super(self);
|
|
1959
|
+
self = this;
|
|
1960
|
+
registerHost(self, cmpMeta);
|
|
1961
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1962
|
+
// this component is using shadow dom
|
|
1963
|
+
// and this browser supports shadow dom
|
|
1964
|
+
// add the read-only property "shadowRoot" to the host element
|
|
1965
|
+
// adding the shadow root build conditionals to minimize runtime
|
|
1577
1966
|
{
|
|
1578
|
-
|
|
1967
|
+
{
|
|
1968
|
+
self.attachShadow({ mode: 'open' });
|
|
1969
|
+
}
|
|
1579
1970
|
}
|
|
1580
1971
|
}
|
|
1972
|
+
{
|
|
1973
|
+
patchChildSlotNodes(self, cmpMeta);
|
|
1974
|
+
}
|
|
1581
1975
|
}
|
|
1582
|
-
{
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1976
|
+
connectedCallback() {
|
|
1977
|
+
if (appLoadFallback) {
|
|
1978
|
+
clearTimeout(appLoadFallback);
|
|
1979
|
+
appLoadFallback = null;
|
|
1980
|
+
}
|
|
1981
|
+
if (isBootstrapping) {
|
|
1982
|
+
// connectedCallback will be processed once all components have been registered
|
|
1983
|
+
deferredConnectedCallbacks.push(this);
|
|
1984
|
+
}
|
|
1985
|
+
else {
|
|
1986
|
+
plt.jmp(() => connectedCallback(this));
|
|
1987
|
+
}
|
|
1590
1988
|
}
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
deferredConnectedCallbacks.push(this);
|
|
1989
|
+
disconnectedCallback() {
|
|
1990
|
+
plt.jmp(() => disconnectedCallback(this));
|
|
1594
1991
|
}
|
|
1595
|
-
|
|
1596
|
-
|
|
1992
|
+
componentOnReady() {
|
|
1993
|
+
return getHostRef(this).$onReadyPromise$;
|
|
1597
1994
|
}
|
|
1995
|
+
};
|
|
1996
|
+
{
|
|
1997
|
+
patchCloneNode(HostElement.prototype);
|
|
1598
1998
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1999
|
+
{
|
|
2000
|
+
patchSlotAppendChild(HostElement.prototype);
|
|
1601
2001
|
}
|
|
1602
|
-
|
|
1603
|
-
|
|
2002
|
+
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
2003
|
+
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
2004
|
+
cmpTags.push(tagName);
|
|
2005
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1604
2006
|
}
|
|
1605
|
-
};
|
|
1606
|
-
|
|
1607
|
-
patchCloneNode(HostElement.prototype);
|
|
1608
|
-
}
|
|
1609
|
-
{
|
|
1610
|
-
patchSlotAppendChild(HostElement.prototype);
|
|
1611
|
-
}
|
|
1612
|
-
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1613
|
-
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1614
|
-
cmpTags.push(tagName);
|
|
1615
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1616
|
-
}
|
|
1617
|
-
}));
|
|
2007
|
+
});
|
|
2008
|
+
});
|
|
1618
2009
|
{
|
|
1619
2010
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1620
2011
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2012
|
+
// Apply CSP nonce to the style tag if it exists
|
|
2013
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2014
|
+
if (nonce != null) {
|
|
2015
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
2016
|
+
}
|
|
1621
2017
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1622
2018
|
}
|
|
1623
2019
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1624
2020
|
isBootstrapping = false;
|
|
1625
2021
|
if (deferredConnectedCallbacks.length) {
|
|
1626
|
-
deferredConnectedCallbacks.map(host => host.connectedCallback());
|
|
2022
|
+
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
1627
2023
|
}
|
|
1628
2024
|
else {
|
|
1629
2025
|
{
|
|
@@ -1633,12 +2029,15 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1633
2029
|
// Fallback appLoad event
|
|
1634
2030
|
endBootstrap();
|
|
1635
2031
|
};
|
|
1636
|
-
const getAssetPath = (path) => {
|
|
1637
|
-
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
1638
|
-
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
1639
|
-
};
|
|
1640
2032
|
const Fragment = (_, children) => children;
|
|
1641
|
-
|
|
2033
|
+
/**
|
|
2034
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
2035
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
2036
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
2037
|
+
* @returns void
|
|
2038
|
+
*/
|
|
2039
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2040
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1642
2041
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1643
2042
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1644
2043
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1649,45 +2048,71 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1649
2048
|
$instanceValues$: new Map(),
|
|
1650
2049
|
};
|
|
1651
2050
|
{
|
|
1652
|
-
hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
|
|
2051
|
+
hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
|
|
1653
2052
|
}
|
|
1654
2053
|
{
|
|
1655
|
-
hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
|
|
2054
|
+
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1656
2055
|
elm['s-p'] = [];
|
|
1657
2056
|
elm['s-rc'] = [];
|
|
1658
2057
|
}
|
|
1659
2058
|
return hostRefs.set(elm, hostRef);
|
|
1660
2059
|
};
|
|
1661
2060
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1662
|
-
const consoleError = (e, el) => (
|
|
2061
|
+
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
1663
2062
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
1664
2063
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
1665
2064
|
// loadModuleImport
|
|
1666
2065
|
const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
|
|
1667
2066
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1668
|
-
const module =
|
|
2067
|
+
const module = cmpModules.get(bundleId) ;
|
|
1669
2068
|
if (module) {
|
|
1670
2069
|
return module[exportName];
|
|
1671
2070
|
}
|
|
2071
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1672
2072
|
return import(
|
|
2073
|
+
/* @vite-ignore */
|
|
1673
2074
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1674
2075
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1675
2076
|
/* webpackMode: "lazy" */
|
|
1676
|
-
`./${bundleId}.entry.js${
|
|
2077
|
+
`./${bundleId}.entry.js${''}`).then((importedModule) => {
|
|
1677
2078
|
{
|
|
1678
2079
|
cmpModules.set(bundleId, importedModule);
|
|
1679
2080
|
}
|
|
1680
2081
|
return importedModule[exportName];
|
|
1681
2082
|
}, consoleError);
|
|
1682
2083
|
};
|
|
1683
|
-
const styles = new Map();
|
|
2084
|
+
const styles = /*@__PURE__*/ new Map();
|
|
2085
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
2086
|
+
const doc = win.document || { head: {} };
|
|
2087
|
+
const H = (win.HTMLElement || class {
|
|
2088
|
+
});
|
|
2089
|
+
const plt = {
|
|
2090
|
+
$flags$: 0,
|
|
2091
|
+
$resourcesUrl$: '',
|
|
2092
|
+
jmp: (h) => h(),
|
|
2093
|
+
raf: (h) => requestAnimationFrame(h),
|
|
2094
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2095
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2096
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2097
|
+
};
|
|
2098
|
+
const supportsShadow = true;
|
|
2099
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
2100
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2101
|
+
try {
|
|
2102
|
+
new CSSStyleSheet();
|
|
2103
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2104
|
+
}
|
|
2105
|
+
catch (e) { }
|
|
2106
|
+
return false;
|
|
2107
|
+
})()
|
|
2108
|
+
;
|
|
1684
2109
|
const queueDomReads = [];
|
|
1685
2110
|
const queueDomWrites = [];
|
|
1686
2111
|
const queueTask = (queue, write) => (cb) => {
|
|
1687
2112
|
queue.push(cb);
|
|
1688
2113
|
if (!queuePending) {
|
|
1689
2114
|
queuePending = true;
|
|
1690
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2115
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1691
2116
|
nextTick(flush);
|
|
1692
2117
|
}
|
|
1693
2118
|
else {
|
|
@@ -1724,4 +2149,4 @@ const flush = () => {
|
|
|
1724
2149
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1725
2150
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1726
2151
|
|
|
1727
|
-
export { Fragment as F, H, getRenderingRef as a, bootstrapLazy as b, Host as c, getAssetPath as d, createEvent as e, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
2152
|
+
export { Fragment as F, H, getRenderingRef as a, bootstrapLazy as b, Host as c, getAssetPath as d, createEvent as e, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|