@unidy.io/sdk 1.1.1-alpha2 → 1.1.2
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/{esm/auth-DLKPv5Zm.js → sdk/auth-Che07PeV.js} +9 -9
- package/dist/{esm/auth-DLKPv5Zm.js.map → sdk/auth-Che07PeV.js.map} +1 -1
- package/dist/{components/auth-store.js → sdk/auth-store-CapiC8gJ.js} +4 -4
- package/dist/{esm/auth-store-BMqUdTpC.js.map → sdk/auth-store-CapiC8gJ.js.map} +1 -1
- package/dist/{components/flash-store.js → sdk/flash-store-DNcSEn2p.js} +4 -3
- package/dist/{esm/flash-store-CEvWSG0c.js.map → sdk/flash-store-DNcSEn2p.js.map} +1 -1
- package/dist/{components/i18n.js → sdk/i18n-BCI_ARJL.js} +25 -5
- package/dist/sdk/i18n-BCI_ARJL.js.map +1 -0
- package/dist/{esm/index-Bjp1XO-f.js → sdk/index-BnBstyfp.js} +3 -3
- package/dist/{esm/index-Bjp1XO-f.js.map → sdk/index-BnBstyfp.js.map} +1 -1
- package/dist/sdk/index-BqL27K_R.js +49640 -0
- package/dist/sdk/index-BqL27K_R.js.map +1 -0
- package/dist/{collection/auth/error-definitions.js → sdk/index-Cz3idqu9.js} +19 -2
- package/dist/sdk/index-Cz3idqu9.js.map +1 -0
- package/dist/sdk/index-gEcJztft.js +15349 -0
- package/dist/sdk/index-gEcJztft.js.map +1 -0
- package/dist/sdk/index.esm.js +22 -2
- package/dist/sdk/index.esm.js.map +1 -1
- package/dist/sdk/loader.esm.js.map +1 -1
- package/dist/sdk/locales/de.json +1 -0
- package/dist/sdk/locales/en.json +1 -0
- package/dist/sdk/locales/fr.json +1 -0
- package/dist/sdk/locales/it.json +1 -0
- package/dist/sdk/locales/nl_be.json +1 -0
- package/dist/sdk/locales/ro.json +1 -0
- package/dist/{esm/newsletter-helpers-Dh9k-4Ph.js → sdk/newsletter-helpers-DEXEBD0F.js} +16 -9
- package/dist/sdk/newsletter-helpers-DEXEBD0F.js.map +1 -0
- package/dist/sdk/newsletter-store-CvULKmsu.js +39 -0
- package/dist/sdk/newsletter-store-CvULKmsu.js.map +1 -0
- package/dist/{components/profile-helpers.js → sdk/profile-helpers-Bs3aj0CO.js} +4 -4
- package/dist/{esm/profile-helpers-7onubaoR.js.map → sdk/profile-helpers-Bs3aj0CO.js.map} +1 -1
- package/dist/{components/profile-store.js → sdk/profile-store-DD6sq42i.js} +3 -3
- package/dist/{esm/profile-store-RmZB2PTc.js.map → sdk/profile-store-DD6sq42i.js.map} +1 -1
- package/dist/sdk/sdk.esm.js +48 -2
- package/dist/sdk/sdk.esm.js.map +1 -1
- package/dist/sdk/u-conditional-render.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-conditional-render.entry.js +13 -12
- package/dist/sdk/u-config.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-config.entry.js +13 -12
- package/dist/sdk/u-email-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-email-field.entry.js +75 -0
- package/dist/{esm → sdk}/u-error-message.entry.js +7 -7
- package/dist/sdk/u-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-field.entry.js +101 -0
- package/dist/sdk/u-flash-message.entry.esm.js.map +1 -1
- package/dist/sdk/u-flash-message.entry.js +35 -0
- package/dist/sdk/u-full-profile.entry.esm.js.map +1 -1
- package/dist/sdk/u-full-profile.entry.js +35 -0
- package/dist/{esm → sdk}/u-logout-button.entry.js +11 -11
- package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-magic-code-field.entry.js +10 -10
- package/dist/{esm → sdk}/u-missing-field.entry.js +5 -5
- package/dist/{esm → sdk}/u-missing-fields-submit-button.entry.js +9 -9
- package/dist/sdk/u-newsletter-checkbox.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-newsletter-checkbox.entry.js +25 -37
- package/dist/{esm → sdk}/u-newsletter-logout-button.entry.js +12 -12
- package/dist/sdk/u-newsletter-preference-checkbox.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-newsletter-preference-checkbox.entry.js +22 -33
- package/dist/sdk/u-newsletter-resend-doi-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-resend-doi-button.entry.js +47 -0
- package/dist/sdk/u-newsletter-root.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-newsletter-root.entry.js +19 -33
- package/dist/sdk/u-newsletter-toggle-subscription-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-toggle-subscription-button.entry.js +71 -0
- package/dist/{esm → sdk}/u-pagination-button.entry.js +2 -2
- package/dist/{esm → sdk}/u-pagination-page.entry.js +2 -2
- package/dist/{esm → sdk}/u-passkey.entry.js +10 -10
- package/dist/{esm → sdk}/u-password-field.entry.js +6 -6
- package/dist/sdk/u-profile.entry.esm.js.map +1 -0
- package/dist/{components/profile.js → sdk/u-profile.entry.js} +18 -38
- package/dist/sdk/u-raw-field.entry.esm.js.map +1 -0
- package/dist/{components/raw-field.js → sdk/u-raw-field.entry.js} +10 -51
- package/dist/{esm → sdk}/u-registration-button.entry.js +6 -6
- package/dist/{esm → sdk}/u-reset-password-button.entry.js +10 -10
- package/dist/{esm → sdk}/u-send-magic-code-button.entry.js +10 -10
- package/dist/{esm → sdk}/u-signed-in.entry.js +5 -5
- package/dist/{esm → sdk}/u-signin-root.entry.js +7 -7
- package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-signin-step.entry.js +11 -10
- package/dist/{esm → sdk}/u-signin-strategy.entry.js +5 -5
- package/dist/{esm → sdk}/u-social-login-button.entry.js +6 -6
- package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-spinner.entry.js +3 -3
- package/dist/sdk/u-submit-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-submit-button.entry.js +204 -0
- package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-ticketable-list.entry.js +141 -73
- package/dist/{components/unidy-store.js → sdk/unidy-store-BwZym11Y.js} +4 -3
- package/dist/{esm/unidy-store-BldTAtO0.js.map → sdk/unidy-store-BwZym11Y.js.map} +1 -1
- package/dist/types/components.d.ts +0 -36
- package/dist/types/newsletter/components/newsletter-checkbox/newsletter-checkbox.d.ts +0 -5
- package/dist/types/newsletter/components/newsletter-root/newsletter-root.d.ts +0 -9
- package/dist/types/newsletter/components/preference-checkbox/preference-checkbox.d.ts +0 -5
- package/dist/types/newsletter/newsletter-helpers.d.ts +1 -1
- package/dist/types/newsletter/store/newsletter-store.d.ts +3 -0
- package/dist/types/shared/components/email-field/email-field.d.ts +0 -2
- package/package.json +1 -1
- package/dist/cjs/app-globals-DSKjcXX_.js +0 -10
- package/dist/cjs/app-globals-DSKjcXX_.js.map +0 -1
- package/dist/cjs/auth-BVKZHhXz.js +0 -573
- package/dist/cjs/auth-BVKZHhXz.js.map +0 -1
- package/dist/cjs/auth-store-DC9EVec8.js +0 -184
- package/dist/cjs/auth-store-DC9EVec8.js.map +0 -1
- package/dist/cjs/component-utils-BpMyeVQo.js +0 -35
- package/dist/cjs/component-utils-BpMyeVQo.js.map +0 -1
- package/dist/cjs/flash-store-BuIBuQDx.js +0 -50
- package/dist/cjs/flash-store-BuIBuQDx.js.map +0 -1
- package/dist/cjs/helpers-BcPlKlBG.js +0 -11
- package/dist/cjs/helpers-BcPlKlBG.js.map +0 -1
- package/dist/cjs/helpers-DJyRa0Qo.js +0 -11
- package/dist/cjs/helpers-DJyRa0Qo.js.map +0 -1
- package/dist/cjs/i18n-Xy1So-ba.js +0 -3224
- package/dist/cjs/i18n-Xy1So-ba.js.map +0 -1
- package/dist/cjs/index-B_N5xKgH.js +0 -12025
- package/dist/cjs/index-B_N5xKgH.js.map +0 -1
- package/dist/cjs/index-DLz3FT7T.js +0 -214
- package/dist/cjs/index-DLz3FT7T.js.map +0 -1
- package/dist/cjs/index-DiUlebpf.js +0 -5256
- package/dist/cjs/index-DiUlebpf.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -64
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -14
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/newsletter-helpers-D34j8zxr.js +0 -280
- package/dist/cjs/newsletter-helpers-D34j8zxr.js.map +0 -1
- package/dist/cjs/newsletter-store-dhtu8ywO.js +0 -27
- package/dist/cjs/newsletter-store-dhtu8ywO.js.map +0 -1
- package/dist/cjs/pagination-store-BEiW3MQd.js +0 -16
- package/dist/cjs/pagination-store-BEiW3MQd.js.map +0 -1
- package/dist/cjs/profile-helpers-DrcTgN5n.js +0 -39
- package/dist/cjs/profile-helpers-DrcTgN5n.js.map +0 -1
- package/dist/cjs/profile-store-P_BcYkef.js +0 -22
- package/dist/cjs/profile-store-P_BcYkef.js.map +0 -1
- package/dist/cjs/sdk.cjs.js +0 -26
- package/dist/cjs/sdk.cjs.js.map +0 -1
- package/dist/cjs/u-conditional-render.cjs.entry.js +0 -102
- package/dist/cjs/u-conditional-render.entry.cjs.js.map +0 -1
- package/dist/cjs/u-config.cjs.entry.js +0 -87
- package/dist/cjs/u-config.entry.cjs.js.map +0 -1
- package/dist/cjs/u-email-field.cjs.entry.js +0 -75
- package/dist/cjs/u-email-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-error-message.cjs.entry.js +0 -82
- package/dist/cjs/u-error-message.entry.cjs.js.map +0 -1
- package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-field_2.cjs.entry.js +0 -375
- package/dist/cjs/u-flash-message.cjs.entry.js +0 -34
- package/dist/cjs/u-flash-message.entry.cjs.js.map +0 -1
- package/dist/cjs/u-full-profile.cjs.entry.js +0 -36
- package/dist/cjs/u-full-profile.entry.cjs.js.map +0 -1
- package/dist/cjs/u-logout-button.cjs.entry.js +0 -38
- package/dist/cjs/u-logout-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-magic-code-field.cjs.entry.js +0 -91
- package/dist/cjs/u-magic-code-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-missing-field.cjs.entry.js +0 -22
- package/dist/cjs/u-missing-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +0 -46
- package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +0 -75
- package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +0 -36
- package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +0 -117
- package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +0 -46
- package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-root.cjs.entry.js +0 -86
- package/dist/cjs/u-newsletter-root.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +0 -70
- package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-pagination-button.cjs.entry.js +0 -63
- package/dist/cjs/u-pagination-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-pagination-page.cjs.entry.js +0 -44
- package/dist/cjs/u-pagination-page.entry.cjs.js.map +0 -1
- package/dist/cjs/u-passkey.cjs.entry.js +0 -47
- package/dist/cjs/u-passkey.entry.cjs.js.map +0 -1
- package/dist/cjs/u-password-field.cjs.entry.js +0 -104
- package/dist/cjs/u-password-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-profile_2.cjs.entry.js +0 -311
- package/dist/cjs/u-registration-button.cjs.entry.js +0 -48
- package/dist/cjs/u-registration-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-reset-password-button.cjs.entry.js +0 -47
- package/dist/cjs/u-reset-password-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-send-magic-code-button.cjs.entry.js +0 -68
- package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signed-in.cjs.entry.js +0 -25
- package/dist/cjs/u-signed-in.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signin-root.cjs.entry.js +0 -43
- package/dist/cjs/u-signin-root.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signin-step.cjs.entry.js +0 -66
- package/dist/cjs/u-signin-step.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signin-strategy.cjs.entry.js +0 -30
- package/dist/cjs/u-signin-strategy.entry.cjs.js.map +0 -1
- package/dist/cjs/u-social-login-button.cjs.entry.js +0 -100
- package/dist/cjs/u-social-login-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-spinner.cjs.entry.js +0 -18
- package/dist/cjs/u-spinner.entry.cjs.js.map +0 -1
- package/dist/cjs/u-ticketable-list.cjs.entry.js +0 -6078
- package/dist/cjs/u-ticketable-list.entry.cjs.js.map +0 -1
- package/dist/cjs/unidy-store-7AbWnZ6g.js +0 -41
- package/dist/cjs/unidy-store-7AbWnZ6g.js.map +0 -1
- package/dist/collection/api/client.js +0 -144
- package/dist/collection/api/client.js.map +0 -1
- package/dist/collection/api/index.js +0 -42
- package/dist/collection/api/index.js.map +0 -1
- package/dist/collection/api/shared.js +0 -18
- package/dist/collection/api/shared.js.map +0 -1
- package/dist/collection/auth/api/auth.js +0 -264
- package/dist/collection/auth/api/auth.js.map +0 -1
- package/dist/collection/auth/auth-helpers.js +0 -291
- package/dist/collection/auth/auth-helpers.js.map +0 -1
- package/dist/collection/auth/auth.js +0 -121
- package/dist/collection/auth/auth.js.map +0 -1
- package/dist/collection/auth/components/helpers.js +0 -5
- package/dist/collection/auth/components/helpers.js.map +0 -1
- package/dist/collection/auth/components/logout-button/logout-button.js +0 -85
- package/dist/collection/auth/components/logout-button/logout-button.js.map +0 -1
- package/dist/collection/auth/components/magic-code-field/magic-code-field.css +0 -1
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js +0 -113
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js.map +0 -1
- package/dist/collection/auth/components/missing-field/missing-field.js +0 -14
- package/dist/collection/auth/components/missing-field/missing-field.js.map +0 -1
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +0 -39
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +0 -1
- package/dist/collection/auth/components/passkey/passkey.js +0 -103
- package/dist/collection/auth/components/passkey/passkey.js.map +0 -1
- package/dist/collection/auth/components/password-field/password-field.js +0 -166
- package/dist/collection/auth/components/password-field/password-field.js.map +0 -1
- package/dist/collection/auth/components/registration/registration-button.js +0 -104
- package/dist/collection/auth/components/registration/registration-button.js.map +0 -1
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +0 -59
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +0 -1
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js +0 -104
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js.map +0 -1
- package/dist/collection/auth/components/signed-in/signed-in.js +0 -59
- package/dist/collection/auth/components/signed-in/signed-in.js.map +0 -1
- package/dist/collection/auth/components/signin-root/signin-root.js +0 -97
- package/dist/collection/auth/components/signin-root/signin-root.js.map +0 -1
- package/dist/collection/auth/components/signin-step/signin-step.js +0 -135
- package/dist/collection/auth/components/signin-step/signin-step.js.map +0 -1
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js +0 -64
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/apple.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/apple.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/discord.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/discord.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/facebook.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/facebook.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/google.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/google.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/linkedin.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/linkedin.js.map +0 -1
- package/dist/collection/auth/components/social-logins/social-login-button.css +0 -1
- package/dist/collection/auth/components/social-logins/social-login-button.js +0 -188
- package/dist/collection/auth/components/social-logins/social-login-button.js.map +0 -1
- package/dist/collection/auth/components/submit-button/auth-submit-button.js +0 -62
- package/dist/collection/auth/components/submit-button/auth-submit-button.js.map +0 -1
- package/dist/collection/auth/error-definitions.js.map +0 -1
- package/dist/collection/auth/index.js +0 -14
- package/dist/collection/auth/index.js.map +0 -1
- package/dist/collection/auth/passkey-auth.js +0 -106
- package/dist/collection/auth/passkey-auth.js.map +0 -1
- package/dist/collection/auth/store/auth-store.js +0 -175
- package/dist/collection/auth/store/auth-store.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -46
- package/dist/collection/globalScript.js +0 -18
- package/dist/collection/globalScript.js.map +0 -1
- package/dist/collection/i18n.js +0 -31
- package/dist/collection/i18n.js.map +0 -1
- package/dist/collection/index.js +0 -16
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/locales/de.json +0 -131
- package/dist/collection/locales/en.json +0 -131
- package/dist/collection/locales/fr.json +0 -131
- package/dist/collection/locales/it.json +0 -131
- package/dist/collection/locales/nl_be.json +0 -131
- package/dist/collection/locales/ro.json +0 -131
- package/dist/collection/logger.js +0 -106
- package/dist/collection/logger.js.map +0 -1
- package/dist/collection/newsletter/api/newsletters.js +0 -189
- package/dist/collection/newsletter/api/newsletters.js.map +0 -1
- package/dist/collection/newsletter/components/helpers.js +0 -5
- package/dist/collection/newsletter/components/helpers.js.map +0 -1
- package/dist/collection/newsletter/components/logout-button/logout-button.js +0 -48
- package/dist/collection/newsletter/components/logout-button/logout-button.js.map +0 -1
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +0 -163
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js.map +0 -1
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js +0 -164
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js.map +0 -1
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js +0 -231
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js.map +0 -1
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js +0 -79
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js.map +0 -1
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js +0 -19
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js.map +0 -1
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js +0 -144
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js.map +0 -1
- package/dist/collection/newsletter/index.js +0 -11
- package/dist/collection/newsletter/index.js.map +0 -1
- package/dist/collection/newsletter/newsletter-helpers.js +0 -268
- package/dist/collection/newsletter/newsletter-helpers.js.map +0 -1
- package/dist/collection/newsletter/store/newsletter-store.js +0 -24
- package/dist/collection/newsletter/store/newsletter-store.js.map +0 -1
- package/dist/collection/profile/api/profile.js +0 -156
- package/dist/collection/profile/api/profile.js.map +0 -1
- package/dist/collection/profile/components/field/field.css +0 -1
- package/dist/collection/profile/components/field/field.js +0 -359
- package/dist/collection/profile/components/field/field.js.map +0 -1
- package/dist/collection/profile/components/full-profile/full-profile.css +0 -1
- package/dist/collection/profile/components/full-profile/full-profile.js +0 -77
- package/dist/collection/profile/components/full-profile/full-profile.js.map +0 -1
- package/dist/collection/profile/components/profile/profile.js +0 -189
- package/dist/collection/profile/components/profile/profile.js.map +0 -1
- package/dist/collection/profile/components/raw-field/raw-field.js +0 -697
- package/dist/collection/profile/components/raw-field/raw-field.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/Input.js +0 -3
- package/dist/collection/profile/components/raw-input-fields/Input.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js +0 -8
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js +0 -8
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/Select.js +0 -11
- package/dist/collection/profile/components/raw-input-fields/Select.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/Textarea.js +0 -3
- package/dist/collection/profile/components/raw-input-fields/Textarea.js.map +0 -1
- package/dist/collection/profile/components/submit-button/profile-submit-button.js +0 -17
- package/dist/collection/profile/components/submit-button/profile-submit-button.js.map +0 -1
- package/dist/collection/profile/index.js +0 -13
- package/dist/collection/profile/index.js.map +0 -1
- package/dist/collection/profile/profile-helpers.js +0 -31
- package/dist/collection/profile/profile-helpers.js.map +0 -1
- package/dist/collection/profile/store/profile-store.js +0 -15
- package/dist/collection/profile/store/profile-store.js.map +0 -1
- package/dist/collection/sdk.css +0 -39
- package/dist/collection/shared/component-utils.js +0 -28
- package/dist/collection/shared/component-utils.js.map +0 -1
- package/dist/collection/shared/components/conditional-render/conditional-render.js +0 -177
- package/dist/collection/shared/components/conditional-render/conditional-render.js.map +0 -1
- package/dist/collection/shared/components/config/config.js +0 -260
- package/dist/collection/shared/components/config/config.js.map +0 -1
- package/dist/collection/shared/components/email-field/email-field.js +0 -161
- package/dist/collection/shared/components/email-field/email-field.js.map +0 -1
- package/dist/collection/shared/components/error-message/error-message.js +0 -141
- package/dist/collection/shared/components/error-message/error-message.js.map +0 -1
- package/dist/collection/shared/components/flash-message/close-icon.js +0 -3
- package/dist/collection/shared/components/flash-message/close-icon.js.map +0 -1
- package/dist/collection/shared/components/flash-message/flash-message.js +0 -69
- package/dist/collection/shared/components/flash-message/flash-message.js.map +0 -1
- package/dist/collection/shared/components/spinner/spinner.css +0 -1
- package/dist/collection/shared/components/spinner/spinner.js +0 -19
- package/dist/collection/shared/components/spinner/spinner.js.map +0 -1
- package/dist/collection/shared/components/submit-button/context.js +0 -10
- package/dist/collection/shared/components/submit-button/context.js.map +0 -1
- package/dist/collection/shared/components/submit-button/submit-button.js +0 -186
- package/dist/collection/shared/components/submit-button/submit-button.js.map +0 -1
- package/dist/collection/shared/store/flash-store.js +0 -43
- package/dist/collection/shared/store/flash-store.js.map +0 -1
- package/dist/collection/shared/store/unidy-store.js +0 -33
- package/dist/collection/shared/store/unidy-store.js.map +0 -1
- package/dist/collection/ticketable/api/get-with-schema.js +0 -35
- package/dist/collection/ticketable/api/get-with-schema.js.map +0 -1
- package/dist/collection/ticketable/api/schemas.js +0 -12
- package/dist/collection/ticketable/api/schemas.js.map +0 -1
- package/dist/collection/ticketable/api/subscriptions.js +0 -47
- package/dist/collection/ticketable/api/subscriptions.js.map +0 -1
- package/dist/collection/ticketable/api/tickets.js +0 -48
- package/dist/collection/ticketable/api/tickets.js.map +0 -1
- package/dist/collection/ticketable/components/pagination/pagination-button.js +0 -108
- package/dist/collection/ticketable/components/pagination/pagination-button.js.map +0 -1
- package/dist/collection/ticketable/components/pagination/pagination-page.js +0 -69
- package/dist/collection/ticketable/components/pagination/pagination-page.js.map +0 -1
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js +0 -54
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js.map +0 -1
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +0 -442
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +0 -1
- package/dist/collection/ticketable/index.js +0 -13
- package/dist/collection/ticketable/index.js.map +0 -1
- package/dist/collection/ticketable/store/pagination-store.js +0 -9
- package/dist/collection/ticketable/store/pagination-store.js.map +0 -1
- package/dist/components/auth-store.js.map +0 -1
- package/dist/components/auth.js +0 -572
- package/dist/components/auth.js.map +0 -1
- package/dist/components/component-utils.js +0 -32
- package/dist/components/component-utils.js.map +0 -1
- package/dist/components/exports.js +0 -4106
- package/dist/components/exports.js.map +0 -1
- package/dist/components/field.js +0 -144
- package/dist/components/field.js.map +0 -1
- package/dist/components/flash-store.js.map +0 -1
- package/dist/components/helpers.js +0 -9
- package/dist/components/helpers.js.map +0 -1
- package/dist/components/helpers2.js +0 -9
- package/dist/components/helpers2.js.map +0 -1
- package/dist/components/i18n.js.map +0 -1
- package/dist/components/index.js +0 -5902
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js +0 -5245
- package/dist/components/index2.js.map +0 -1
- package/dist/components/index3.js +0 -212
- package/dist/components/index3.js.map +0 -1
- package/dist/components/logger.js +0 -111
- package/dist/components/logger.js.map +0 -1
- package/dist/components/newsletter-helpers.js +0 -269
- package/dist/components/newsletter-helpers.js.map +0 -1
- package/dist/components/newsletter-store.js +0 -24
- package/dist/components/newsletter-store.js.map +0 -1
- package/dist/components/pagination-store.js +0 -14
- package/dist/components/pagination-store.js.map +0 -1
- package/dist/components/profile-helpers.js.map +0 -1
- package/dist/components/profile-store.js.map +0 -1
- package/dist/components/profile.js.map +0 -1
- package/dist/components/raw-field.js.map +0 -1
- package/dist/components/spinner.js +0 -35
- package/dist/components/spinner.js.map +0 -1
- package/dist/components/submit-button.js +0 -229
- package/dist/components/submit-button.js.map +0 -1
- package/dist/components/u-conditional-render.js +0 -120
- package/dist/components/u-conditional-render.js.map +0 -1
- package/dist/components/u-config.js +0 -113
- package/dist/components/u-config.js.map +0 -1
- package/dist/components/u-email-field.js +0 -98
- package/dist/components/u-email-field.js.map +0 -1
- package/dist/components/u-error-message.js +0 -105
- package/dist/components/u-error-message.js.map +0 -1
- package/dist/components/u-field.js +0 -9
- package/dist/components/u-field.js.map +0 -1
- package/dist/components/u-flash-message.js +0 -55
- package/dist/components/u-flash-message.js.map +0 -1
- package/dist/components/u-full-profile.js +0 -86
- package/dist/components/u-full-profile.js.map +0 -1
- package/dist/components/u-logout-button.js +0 -53
- package/dist/components/u-logout-button.js.map +0 -1
- package/dist/components/u-magic-code-field.js +0 -106
- package/dist/components/u-magic-code-field.js.map +0 -1
- package/dist/components/u-missing-field.js +0 -57
- package/dist/components/u-missing-field.js.map +0 -1
- package/dist/components/u-missing-fields-submit-button.js +0 -70
- package/dist/components/u-missing-fields-submit-button.js.map +0 -1
- package/dist/components/u-newsletter-checkbox.js +0 -91
- package/dist/components/u-newsletter-checkbox.js.map +0 -1
- package/dist/components/u-newsletter-logout-button.js +0 -51
- package/dist/components/u-newsletter-logout-button.js.map +0 -1
- package/dist/components/u-newsletter-preference-checkbox.js +0 -137
- package/dist/components/u-newsletter-preference-checkbox.js.map +0 -1
- package/dist/components/u-newsletter-resend-doi-button.js +0 -67
- package/dist/components/u-newsletter-resend-doi-button.js.map +0 -1
- package/dist/components/u-newsletter-root.js +0 -104
- package/dist/components/u-newsletter-root.js.map +0 -1
- package/dist/components/u-newsletter-toggle-subscription-button.js +0 -94
- package/dist/components/u-newsletter-toggle-subscription-button.js.map +0 -1
- package/dist/components/u-pagination-button.js +0 -86
- package/dist/components/u-pagination-button.js.map +0 -1
- package/dist/components/u-pagination-page.js +0 -66
- package/dist/components/u-pagination-page.js.map +0 -1
- package/dist/components/u-passkey.js +0 -65
- package/dist/components/u-passkey.js.map +0 -1
- package/dist/components/u-password-field.js +0 -125
- package/dist/components/u-password-field.js.map +0 -1
- package/dist/components/u-profile.js +0 -9
- package/dist/components/u-profile.js.map +0 -1
- package/dist/components/u-raw-field.js +0 -9
- package/dist/components/u-raw-field.js.map +0 -1
- package/dist/components/u-registration-button.js +0 -70
- package/dist/components/u-registration-button.js.map +0 -1
- package/dist/components/u-reset-password-button.js +0 -63
- package/dist/components/u-reset-password-button.js.map +0 -1
- package/dist/components/u-send-magic-code-button.js +0 -85
- package/dist/components/u-send-magic-code-button.js.map +0 -1
- package/dist/components/u-signed-in.js +0 -44
- package/dist/components/u-signed-in.js.map +0 -1
- package/dist/components/u-signin-root.js +0 -63
- package/dist/components/u-signin-root.js.map +0 -1
- package/dist/components/u-signin-step.js +0 -84
- package/dist/components/u-signin-step.js.map +0 -1
- package/dist/components/u-signin-strategy.js +0 -50
- package/dist/components/u-signin-strategy.js.map +0 -1
- package/dist/components/u-social-login-button.js +0 -125
- package/dist/components/u-social-login-button.js.map +0 -1
- package/dist/components/u-spinner.js +0 -9
- package/dist/components/u-spinner.js.map +0 -1
- package/dist/components/u-submit-button.js +0 -9
- package/dist/components/u-submit-button.js.map +0 -1
- package/dist/components/u-ticketable-list.js +0 -6113
- package/dist/components/u-ticketable-list.js.map +0 -1
- package/dist/components/unidy-store.js.map +0 -1
- package/dist/esm/app-globals-CPU9ZcqZ.js +0 -8
- package/dist/esm/app-globals-CPU9ZcqZ.js.map +0 -1
- package/dist/esm/auth-store-BMqUdTpC.js +0 -179
- package/dist/esm/flash-store-CEvWSG0c.js +0 -47
- package/dist/esm/i18n-BR-AGAnn.js +0 -3221
- package/dist/esm/i18n-BR-AGAnn.js.map +0 -1
- package/dist/esm/index-Ci3aTmzp.js +0 -12007
- package/dist/esm/index-Ci3aTmzp.js.map +0 -1
- package/dist/esm/index-DKaIwo59.js +0 -5243
- package/dist/esm/index-DKaIwo59.js.map +0 -1
- package/dist/esm/index.js +0 -40
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -12
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/newsletter-helpers-Dh9k-4Ph.js.map +0 -1
- package/dist/esm/newsletter-store-BYmuLQg8.js +0 -24
- package/dist/esm/newsletter-store-BYmuLQg8.js.map +0 -1
- package/dist/esm/pagination-store-DzdJOp-n.js +0 -14
- package/dist/esm/pagination-store-DzdJOp-n.js.map +0 -1
- package/dist/esm/profile-helpers-7onubaoR.js +0 -36
- package/dist/esm/profile-store-RmZB2PTc.js +0 -18
- package/dist/esm/sdk.js +0 -22
- package/dist/esm/sdk.js.map +0 -1
- package/dist/esm/u-conditional-render.entry.js.map +0 -1
- package/dist/esm/u-config.entry.js.map +0 -1
- package/dist/esm/u-email-field.entry.js +0 -73
- package/dist/esm/u-email-field.entry.js.map +0 -1
- package/dist/esm/u-error-message.entry.js.map +0 -1
- package/dist/esm/u-field.u-raw-field.entry.js.map +0 -1
- package/dist/esm/u-field_2.entry.js +0 -372
- package/dist/esm/u-flash-message.entry.js +0 -32
- package/dist/esm/u-flash-message.entry.js.map +0 -1
- package/dist/esm/u-full-profile.entry.js +0 -34
- package/dist/esm/u-full-profile.entry.js.map +0 -1
- package/dist/esm/u-logout-button.entry.js.map +0 -1
- package/dist/esm/u-magic-code-field.entry.js.map +0 -1
- package/dist/esm/u-missing-field.entry.js.map +0 -1
- package/dist/esm/u-missing-fields-submit-button.entry.js.map +0 -1
- package/dist/esm/u-newsletter-checkbox.entry.js.map +0 -1
- package/dist/esm/u-newsletter-logout-button.entry.js.map +0 -1
- package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +0 -1
- package/dist/esm/u-newsletter-resend-doi-button.entry.js +0 -44
- package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +0 -1
- package/dist/esm/u-newsletter-root.entry.js.map +0 -1
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js +0 -68
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +0 -1
- package/dist/esm/u-pagination-button.entry.js.map +0 -1
- package/dist/esm/u-pagination-page.entry.js.map +0 -1
- package/dist/esm/u-passkey.entry.js.map +0 -1
- package/dist/esm/u-password-field.entry.js.map +0 -1
- package/dist/esm/u-profile.u-submit-button.entry.js.map +0 -1
- package/dist/esm/u-profile_2.entry.js +0 -308
- package/dist/esm/u-registration-button.entry.js.map +0 -1
- package/dist/esm/u-reset-password-button.entry.js.map +0 -1
- package/dist/esm/u-send-magic-code-button.entry.js.map +0 -1
- package/dist/esm/u-signed-in.entry.js.map +0 -1
- package/dist/esm/u-signin-root.entry.js.map +0 -1
- package/dist/esm/u-signin-step.entry.js.map +0 -1
- package/dist/esm/u-signin-strategy.entry.js.map +0 -1
- package/dist/esm/u-social-login-button.entry.js.map +0 -1
- package/dist/esm/u-spinner.entry.js.map +0 -1
- package/dist/esm/u-ticketable-list.entry.js.map +0 -1
- package/dist/esm/unidy-store-BldTAtO0.js +0 -37
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/sdk/p-10e06612.entry.js +0 -2
- package/dist/sdk/p-10e06612.entry.js.map +0 -1
- package/dist/sdk/p-16f86a4d.entry.js +0 -2
- package/dist/sdk/p-16f86a4d.entry.js.map +0 -1
- package/dist/sdk/p-20240b02.entry.js +0 -2
- package/dist/sdk/p-20240b02.entry.js.map +0 -1
- package/dist/sdk/p-26f3d8db.entry.js +0 -2
- package/dist/sdk/p-26f3d8db.entry.js.map +0 -1
- package/dist/sdk/p-2da4497a.entry.js +0 -2
- package/dist/sdk/p-2da4497a.entry.js.map +0 -1
- package/dist/sdk/p-3f4c947d.entry.js +0 -2
- package/dist/sdk/p-3f4c947d.entry.js.map +0 -1
- package/dist/sdk/p-431ec460.entry.js +0 -2
- package/dist/sdk/p-431ec460.entry.js.map +0 -1
- package/dist/sdk/p-4f54194a.entry.js +0 -2
- package/dist/sdk/p-4f54194a.entry.js.map +0 -1
- package/dist/sdk/p-552056e7.entry.js +0 -2
- package/dist/sdk/p-552056e7.entry.js.map +0 -1
- package/dist/sdk/p-5da49d00.entry.js +0 -2
- package/dist/sdk/p-5da49d00.entry.js.map +0 -1
- package/dist/sdk/p-67096601.entry.js +0 -2
- package/dist/sdk/p-67096601.entry.js.map +0 -1
- package/dist/sdk/p-6893d167.entry.js +0 -2
- package/dist/sdk/p-6893d167.entry.js.map +0 -1
- package/dist/sdk/p-6e3c210c.entry.js +0 -2
- package/dist/sdk/p-6e3c210c.entry.js.map +0 -1
- package/dist/sdk/p-6febeead.entry.js +0 -2
- package/dist/sdk/p-6febeead.entry.js.map +0 -1
- package/dist/sdk/p-73c2ec89.entry.js +0 -2
- package/dist/sdk/p-73c2ec89.entry.js.map +0 -1
- package/dist/sdk/p-745742f1.entry.js +0 -2
- package/dist/sdk/p-745742f1.entry.js.map +0 -1
- package/dist/sdk/p-7a7c0db2.entry.js +0 -2
- package/dist/sdk/p-7a7c0db2.entry.js.map +0 -1
- package/dist/sdk/p-8d787494.entry.js +0 -2
- package/dist/sdk/p-8d787494.entry.js.map +0 -1
- package/dist/sdk/p-94dde7e5.entry.js +0 -2
- package/dist/sdk/p-94dde7e5.entry.js.map +0 -1
- package/dist/sdk/p-97d8ae02.entry.js +0 -2
- package/dist/sdk/p-97d8ae02.entry.js.map +0 -1
- package/dist/sdk/p-9da4dd6d.entry.js +0 -2
- package/dist/sdk/p-9da4dd6d.entry.js.map +0 -1
- package/dist/sdk/p-BZ1kW_eK.js +0 -2
- package/dist/sdk/p-BZ1kW_eK.js.map +0 -1
- package/dist/sdk/p-BlOjABPD.js +0 -2
- package/dist/sdk/p-BlOjABPD.js.map +0 -1
- package/dist/sdk/p-BqFCd65h.js +0 -2
- package/dist/sdk/p-BqFCd65h.js.map +0 -1
- package/dist/sdk/p-C0feI0p8.js +0 -2
- package/dist/sdk/p-C0feI0p8.js.map +0 -1
- package/dist/sdk/p-CDtLILSR.js +0 -2
- package/dist/sdk/p-CDtLILSR.js.map +0 -1
- package/dist/sdk/p-CFiZLMAA.js +0 -2
- package/dist/sdk/p-CFiZLMAA.js.map +0 -1
- package/dist/sdk/p-CR1oWC4S.js +0 -2
- package/dist/sdk/p-CR1oWC4S.js.map +0 -1
- package/dist/sdk/p-Ce8zGAi1.js +0 -2
- package/dist/sdk/p-Ce8zGAi1.js.map +0 -1
- package/dist/sdk/p-Ci3aTmzp.js +0 -3
- package/dist/sdk/p-Ci3aTmzp.js.map +0 -1
- package/dist/sdk/p-D1lzXl_Z.js +0 -2
- package/dist/sdk/p-D1lzXl_Z.js.map +0 -1
- package/dist/sdk/p-D4B6Zkq_.js +0 -2
- package/dist/sdk/p-D4B6Zkq_.js.map +0 -1
- package/dist/sdk/p-D8RGdjD3.js +0 -2
- package/dist/sdk/p-D8RGdjD3.js.map +0 -1
- package/dist/sdk/p-DGqadgLO.js +0 -2
- package/dist/sdk/p-DGqadgLO.js.map +0 -1
- package/dist/sdk/p-DSwwVdp1.js +0 -2
- package/dist/sdk/p-DSwwVdp1.js.map +0 -1
- package/dist/sdk/p-DUHc_Cx7.js +0 -2
- package/dist/sdk/p-DUHc_Cx7.js.map +0 -1
- package/dist/sdk/p-DYtgart8.js +0 -2
- package/dist/sdk/p-DYtgart8.js.map +0 -1
- package/dist/sdk/p-DsSffQBc.js +0 -2
- package/dist/sdk/p-DsSffQBc.js.map +0 -1
- package/dist/sdk/p-b79abe80.entry.js +0 -2
- package/dist/sdk/p-b79abe80.entry.js.map +0 -1
- package/dist/sdk/p-bb5ae222.entry.js +0 -2
- package/dist/sdk/p-bb5ae222.entry.js.map +0 -1
- package/dist/sdk/p-bbbec3d4.entry.js +0 -2
- package/dist/sdk/p-bbbec3d4.entry.js.map +0 -1
- package/dist/sdk/p-c2b6c674.entry.js +0 -2
- package/dist/sdk/p-c2b6c674.entry.js.map +0 -1
- package/dist/sdk/p-c2fba7c8.entry.js +0 -2
- package/dist/sdk/p-c2fba7c8.entry.js.map +0 -1
- package/dist/sdk/p-cba5d81e.entry.js +0 -2
- package/dist/sdk/p-cba5d81e.entry.js.map +0 -1
- package/dist/sdk/p-d2c6179a.entry.js +0 -2
- package/dist/sdk/p-d2c6179a.entry.js.map +0 -1
- package/dist/sdk/p-dcd4e8f0.entry.js +0 -2
- package/dist/sdk/p-dcd4e8f0.entry.js.map +0 -1
- package/dist/sdk/p-eaedb08e.entry.js +0 -2
- package/dist/sdk/p-eaedb08e.entry.js.map +0 -1
- package/dist/sdk/p-f0aecd55.entry.js +0 -2
- package/dist/sdk/p-f0aecd55.entry.js.map +0 -1
- package/dist/sdk/p-fc51c88d.entry.js +0 -2
- package/dist/sdk/p-fc51c88d.entry.js.map +0 -1
- package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +0 -1
- package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +0 -1
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +0 -2
- /package/dist/{esm → sdk}/component-utils-D1lzXl_Z.js +0 -0
- /package/dist/{esm → sdk}/component-utils-D1lzXl_Z.js.map +0 -0
- /package/dist/{esm → sdk}/helpers-BqFCd65h.js +0 -0
- /package/dist/{esm → sdk}/helpers-BqFCd65h.js.map +0 -0
- /package/dist/{esm → sdk}/helpers-DUHc_Cx7.js +0 -0
- /package/dist/{esm → sdk}/helpers-DUHc_Cx7.js.map +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-newsletter-resend-doi-button.entry.js","sources":["src/newsletter/components/resend-doi-button/resend-doi-button.tsx"],"sourcesContent":["import { Component, h, Prop, State } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\nimport { Flash } from \"../../../shared/store/flash-store\";\n\n@Component({\n tag: \"u-newsletter-resend-doi-button\",\n shadow: false,\n})\nexport class NewsletterResendDoiButton {\n @Prop() internalName!: string;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n @State() isResending = false;\n\n private get shouldShow(): boolean {\n return NewsletterHelpers.isSubscribed(this.internalName) && !NewsletterHelpers.isConfirmed(this.internalName);\n }\n\n private handleClick = async () => {\n this.isResending = true;\n const success = await NewsletterHelpers.resendDoi(this.internalName);\n this.isResending = false;\n\n if (success) {\n Flash.success.addMessage(t(\"newsletter.success.doi_sent\"));\n } else {\n Flash.error.addMessage(t(\"newsletter.errors.resend_doi_failed\"));\n }\n };\n\n render() {\n if (!this.shouldShow) {\n return null;\n }\n\n return (\n <button\n type=\"button\"\n onClick={this.handleClick}\n disabled={this.isResending}\n aria-busy={this.isResending}\n aria-live=\"polite\"\n class={`${this.componentClassName} u:flex u:items-center u:justify-center`}\n >\n {this.isResending ? <u-spinner /> : t(\"newsletter.buttons.resend_doi\")}\n </button>\n );\n }\n}\n"],"names":["NewsletterHelpers.isSubscribed","NewsletterHelpers.isConfirmed","NewsletterHelpers.resendDoi"],"mappings":";;;;;;;;;;;;;MASa,yBAAyB,GAAA,MAAA;;;;AAC5B,IAAA,YAAY;IACe,kBAAkB,GAAG,EAAE;IAEjD,WAAW,GAAG,KAAK;AAE5B,IAAA,IAAY,UAAU,GAAA;AACpB,QAAA,OAAOA,YAA8B,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAACC,WAA6B,CAAC,IAAI,CAAC,YAAY,CAAC;;IAGvG,WAAW,GAAG,YAAW;AAC/B,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI;QACvB,MAAM,OAAO,GAAG,MAAMC,SAA2B,CAAC,IAAI,CAAC,YAAY,CAAC;AACpE,QAAA,IAAI,CAAC,WAAW,GAAG,KAAK;QAExB,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC;;aACrD;YACL,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC;;AAEpE,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;AACpB,YAAA,OAAO,IAAI;;AAGb,QAAA,QACE,cACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,WAAW,eACf,IAAI,CAAC,WAAW,EAAA,WAAA,EACjB,QAAQ,EAClB,KAAK,EAAE,CAAA,EAAG,IAAI,CAAC,kBAAkB,CAAA,uCAAA,CAAyC,EAEzE,EAAA,IAAI,CAAC,WAAW,GAAG,CAAa,CAAA,WAAA,EAAA,IAAA,CAAA,GAAG,CAAC,CAAC,+BAA+B,CAAC,CAC/D;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-newsletter-root.entry.js","sources":["src/newsletter/components/newsletter-root/newsletter-root.tsx"],"sourcesContent":["import { Component, Element, Event, type EventEmitter, Host, h, Method, Prop } from \"@stencil/core\";\nimport { Auth } from \"../../../auth/auth\";\nimport { t } from \"../../../i18n\";\nimport { logger, UnidyComponent } from \"../../../logger\";\nimport { clearUrlParam } from \"../../../shared/component-utils\";\nimport { Flash } from \"../../../shared/store/flash-store\";\nimport { waitForConfig } from \"../../../shared/store/unidy-store\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\nimport { type NewsletterErrorIdentifier, newsletterStore, persist } from \"../../store/newsletter-store\";\nimport type { NewsletterButtonFor } from \"../submit-button/newsletter-submit-button\";\n\n@Component({\n tag: \"u-newsletter-root\",\n shadow: false,\n})\nexport class NewsletterRoot extends UnidyComponent {\n @Element() el!: HTMLElement;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n @Event() uNewsletterSuccess!: EventEmitter<{ email: string; newsletters: string[] }>;\n @Event() uNewsletterError!: EventEmitter<{ email: string; error: string }>;\n\n getErrorText(errorIdentifier: NewsletterErrorIdentifier): string {\n return t(`newsletter.errors.${errorIdentifier}`) || t(\"errors.unknown\", { defaultValue: \"An unknown error occurred\" });\n }\n\n async componentWillLoad() {\n const newsletterError = clearUrlParam(\"newsletter_error\");\n const preferenceToken = clearUrlParam(\"preference_token\");\n const email = clearUrlParam(\"email\");\n\n if (newsletterError) {\n Flash.error.addMessage(this.getErrorText(newsletterError as NewsletterErrorIdentifier));\n }\n\n if (preferenceToken && email) {\n newsletterStore.state.preferenceToken = preferenceToken;\n newsletterStore.state.email = email;\n\n persist(\"preferenceToken\");\n persist(\"email\");\n }\n\n const authInstance = await Auth.getInstance();\n const isAuthenticated = await authInstance.isAuthenticated();\n newsletterStore.state.isAuthenticated = isAuthenticated;\n\n if (isAuthenticated) {\n const userData = await authInstance.userData();\n\n if (userData) {\n newsletterStore.state.email = userData.email;\n }\n }\n\n await waitForConfig();\n await NewsletterHelpers.fetchSubscriptions();\n }\n\n @Method()\n async submit(forType?: NewsletterButtonFor) {\n const { email, checkedNewsletters } = newsletterStore.state;\n\n if (!email) {\n // TODO: Mark this as an error (or probably by forcing the email field to be native required)\n logger.error(\"Email is required for login\");\n this.uNewsletterError.emit({ email: \"\", error: \"email_required\" });\n return;\n }\n\n if (forType === \"login\") {\n return await NewsletterHelpers.sendLoginEmail(email);\n }\n\n const newsletters = Object.keys(checkedNewsletters);\n\n if (newsletters.length === 0) {\n logger.error(\"No newsletters selected: please select at least one newsletter\");\n this.uNewsletterError.emit({ email, error: \"no_newsletters_selected\" });\n return;\n }\n\n const success = await NewsletterHelpers.createSubscriptions({ email });\n\n if (success) {\n this.uNewsletterSuccess.emit({ email, newsletters });\n } else {\n this.uNewsletterError.emit({ email, error: \"subscription_failed\" });\n }\n }\n\n render() {\n return (\n <Host class={this.componentClassName}>\n <slot />\n </Host>\n );\n }\n}\n"],"names":["NewsletterHelpers.fetchSubscriptions","NewsletterHelpers.sendLoginEmail","NewsletterHelpers.createSubscriptions"],"mappings":";;;;;;;;;;;;;MAea,cAAe,GAAA,cAAQ,cAAc,CAAA;;;;;;;;IAEb,kBAAkB,GAAG,EAAE;AAEjD,IAAA,kBAAkB;AAClB,IAAA,gBAAgB;AAEzB,IAAA,YAAY,CAAC,eAA0C,EAAA;AACrD,QAAA,OAAO,CAAC,CAAC,CAAA,kBAAA,EAAqB,eAAe,CAAA,CAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,EAAE,YAAY,EAAE,2BAA2B,EAAE,CAAC;;AAGxH,IAAA,MAAM,iBAAiB,GAAA;AACrB,QAAA,MAAM,eAAe,GAAG,aAAa,CAAC,kBAAkB,CAAC;AACzD,QAAA,MAAM,eAAe,GAAG,aAAa,CAAC,kBAAkB,CAAC;AACzD,QAAA,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC;QAEpC,IAAI,eAAe,EAAE;AACnB,YAAA,KAAK,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AE;AAC5B,YAAA,MAAM,CAAC,KAAK,CAAC,gEAAgE,CAAC;AAC9E,YAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC;YACvE;;QAGF,MAAM,OAAO,GAAG,MAAMC,mBAAqC,CAAC,EAAE,KAAK,EAAE,CAAC;QAEtE,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;;aAC/C;AACL,YAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC;;;IAIvE,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAA,EAClC,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-Ci3aTmzp.js';
|
|
2
|
-
import { t } from './i18n-BR-AGAnn.js';
|
|
3
|
-
import { n as newsletterStore } from './newsletter-store-BYmuLQg8.js';
|
|
4
|
-
import { a as isSubscribed, b as subscribeToNewsletter, d as deleteSubscription } from './newsletter-helpers-Dh9k-4Ph.js';
|
|
5
|
-
import { F as Flash } from './flash-store-CEvWSG0c.js';
|
|
6
|
-
import './unidy-store-BldTAtO0.js';
|
|
7
|
-
import './index-Bjp1XO-f.js';
|
|
8
|
-
import './index-DKaIwo59.js';
|
|
9
|
-
import './profile-store-RmZB2PTc.js';
|
|
10
|
-
import './auth-DLKPv5Zm.js';
|
|
11
|
-
import './auth-store-BMqUdTpC.js';
|
|
12
|
-
import './component-utils-D1lzXl_Z.js';
|
|
13
|
-
|
|
14
|
-
const ToggleNewsletterSubscriptionButton = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
registerInstance(this, hostRef);
|
|
17
|
-
}
|
|
18
|
-
internalName;
|
|
19
|
-
componentClassName = "";
|
|
20
|
-
subscribeClassName = "";
|
|
21
|
-
unsubscribeClassName = "";
|
|
22
|
-
loading = false;
|
|
23
|
-
get isSubscribed() {
|
|
24
|
-
return isSubscribed(this.internalName);
|
|
25
|
-
}
|
|
26
|
-
handleClick = async () => {
|
|
27
|
-
if (this.loading)
|
|
28
|
-
return;
|
|
29
|
-
if (this.isSubscribed) {
|
|
30
|
-
await this.handleUnsubscribe();
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
await this.handleSubscribe();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
handleSubscribe = async () => {
|
|
37
|
-
const { email } = newsletterStore.state;
|
|
38
|
-
if (!email) {
|
|
39
|
-
Flash.error.addMessage(t("newsletter.errors.email_required"));
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
this.loading = true;
|
|
43
|
-
const success = await subscribeToNewsletter(this.internalName, email);
|
|
44
|
-
this.loading = false;
|
|
45
|
-
if (success) {
|
|
46
|
-
Flash.success.addMessage(t("newsletter.success.subscribe"));
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
handleUnsubscribe = async () => {
|
|
50
|
-
this.loading = true;
|
|
51
|
-
const success = await deleteSubscription(this.internalName);
|
|
52
|
-
this.loading = false;
|
|
53
|
-
if (success) {
|
|
54
|
-
Flash.info.addMessage(t("newsletter.success.unsubscribe"));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
Flash.error.addMessage(t("newsletter.errors.unsubscribe_failed"));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
render() {
|
|
61
|
-
const isSubscribed = this.isSubscribed;
|
|
62
|
-
const stateClassName = isSubscribed ? this.unsubscribeClassName : this.subscribeClassName;
|
|
63
|
-
return (h("button", { key: '76b7f2de7c121586c04e70f30002ce65da5cce7e', type: "button", onClick: this.handleClick, disabled: this.loading, "aria-busy": this.loading, "aria-label": isSubscribed ? t("newsletter.buttons.unsubscribe") : t("newsletter.buttons.subscribe"), "aria-live": "polite", "data-subscribed": isSubscribed, class: `${this.componentClassName} ${stateClassName} u:flex u:items-center u:justify-center`.trim() }, this.loading ? h("u-spinner", null) : isSubscribed ? t("newsletter.buttons.unsubscribe") : t("newsletter.buttons.subscribe")));
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export { ToggleNewsletterSubscriptionButton as u_newsletter_toggle_subscription_button };
|
|
68
|
-
//# sourceMappingURL=u-newsletter-toggle-subscription-button.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-newsletter-toggle-subscription-button.entry.js","sources":["src/newsletter/components/toggle-subscription-button/toggle-subscription-button.tsx"],"sourcesContent":["import { Component, h, Prop, State } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\nimport { Flash } from \"../../../shared/store/flash-store\";\n\n@Component({\n tag: \"u-newsletter-toggle-subscription-button\",\n shadow: false,\n})\nexport class ToggleNewsletterSubscriptionButton {\n @Prop() internalName!: string;\n\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop({ attribute: \"subscribe-class-name\" }) subscribeClassName = \"\";\n @Prop({ attribute: \"unsubscribe-class-name\" }) unsubscribeClassName = \"\";\n\n @State() loading = false;\n\n private get isSubscribed(): boolean {\n return NewsletterHelpers.isSubscribed(this.internalName);\n }\n\n private handleClick = async () => {\n if (this.loading) return;\n\n if (this.isSubscribed) {\n await this.handleUnsubscribe();\n } else {\n await this.handleSubscribe();\n }\n };\n\n private handleSubscribe = async () => {\n const { email } = newsletterStore.state;\n\n if (!email) {\n Flash.error.addMessage(t(\"newsletter.errors.email_required\"));\n return;\n }\n\n this.loading = true;\n const success = await NewsletterHelpers.subscribeToNewsletter(this.internalName, email);\n this.loading = false;\n\n if (success) {\n Flash.success.addMessage(t(\"newsletter.success.subscribe\"));\n }\n };\n\n private handleUnsubscribe = async () => {\n this.loading = true;\n const success = await NewsletterHelpers.deleteSubscription(this.internalName);\n this.loading = false;\n\n if (success) {\n Flash.info.addMessage(t(\"newsletter.success.unsubscribe\"));\n } else {\n Flash.error.addMessage(t(\"newsletter.errors.unsubscribe_failed\"));\n }\n };\n\n render() {\n const isSubscribed = this.isSubscribed;\n const stateClassName = isSubscribed ? this.unsubscribeClassName : this.subscribeClassName;\n\n return (\n <button\n type=\"button\"\n onClick={this.handleClick}\n disabled={this.loading}\n aria-busy={this.loading}\n aria-label={isSubscribed ? t(\"newsletter.buttons.unsubscribe\") : t(\"newsletter.buttons.subscribe\")}\n aria-live=\"polite\"\n data-subscribed={isSubscribed}\n class={`${this.componentClassName} ${stateClassName} u:flex u:items-center u:justify-center`.trim()}\n >\n {this.loading ? <u-spinner /> : isSubscribed ? t(\"newsletter.buttons.unsubscribe\") : t(\"newsletter.buttons.subscribe\")}\n </button>\n );\n }\n}\n"],"names":["NewsletterHelpers.isSubscribed","NewsletterHelpers.subscribeToNewsletter","NewsletterHelpers.deleteSubscription"],"mappings":";;;;;;;;;;;;;MAUa,kCAAkC,GAAA,MAAA;;;;AACrC,IAAA,YAAY;IAEe,kBAAkB,GAAG,EAAE;IACb,kBAAkB,GAAG,EAAE;IACrB,oBAAoB,GAAG,EAAE;IAE/D,OAAO,GAAG,KAAK;AAExB,IAAA,IAAY,YAAY,GAAA;QACtB,OAAOA,YAA8B,CAAC,IAAI,CAAC,YAAY,CAAC;;IAGlD,WAAW,GAAG,YAAW;QAC/B,IAAI,IAAI,CAAC,OAAO;YAAE;AAElB,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACrB,YAAA,MAAM,IAAI,CAAC,iBAAiB,EAAE;;aACzB;AACL,YAAA,MAAM,IAAI,CAAC,eAAe,EAAE;;AAEhC,KAAC;IAEO,eAA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CAAC,GAAG,CAAC,CAAC,8BAA8B,CAAC,EAAA,WAAA,EACxF,QAAQ,EACD,iBAAA,EAAA,YAAY,EAC7B,KAAK,EAAE,CAAA,EAAG,IAAI,CAAC,kBAAkB,CAAA,CAAA,EAAI,cAAc,CAAyC,uCAAA,CAAA,CAAC,IAAI,EAAE,EAElG,EAAA,IAAI,CAAC,OAAO,GAAG,CAAA,CAAA,WAAA,EAAA,IAAA,CAAa,GAAG,YAAY,GAAG,CAAC,CAAC,gCAAgC,CAAC,GAAG,CAAC,CAAC,8BAA8B,CAAC,CAC/G;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-pagination-button.entry.js","sources":["src/ticketable/components/pagination/pagination-button.tsx"],"sourcesContent":["import { Component, h, Prop, Element, Host, State } from \"@stencil/core\";\nimport type { PaginationMeta } from \"../../../api\";\nimport type { PaginationStore } from \"../../store/pagination-store\";\nimport { UnidyComponent } from \"../../../logger\";\n\n@Component({ tag: \"u-pagination-button\", shadow: false })\nexport class PaginationButton extends UnidyComponent {\n @Element() element: HTMLElement;\n\n @Prop() direction: \"prev\" | \"next\" = \"next\";\n @Prop() customClass?: string;\n\n @State() paginationMeta: PaginationMeta | null = null;\n\n private store: PaginationStore | null = null;\n private unsubscribe: (() => void) | null = null;\n\n componentDidLoad() {\n this.store = this.element.closest(\"u-ticketable-list\")?.store;\n if (!this.store) {\n this.logger.warn(\"TicketableList component not found\");\n return;\n }\n\n // Get initial state\n this.paginationMeta = this.store.state.paginationMeta;\n\n // Subscribe to store changes - watch for changes to paginationMeta\n this.unsubscribe = this.store.onChange(\"paginationMeta\", (value: PaginationMeta | null) => {\n this.paginationMeta = value;\n });\n }\n\n disconnectedCallback() {\n this.unsubscribe?.();\n }\n\n private handleClick = () => {\n const parent = this.element.closest(\"u-ticketable-list\");\n if (!parent || !this.paginationMeta) {\n return;\n }\n\n const isPrev = this.direction === \"prev\";\n let newPage: number | null = null;\n\n if (isPrev && this.paginationMeta.prev !== null) {\n newPage = this.paginationMeta.prev;\n } else if (!isPrev && this.paginationMeta.next !== null) {\n newPage = this.paginationMeta.next;\n }\n\n if (newPage !== null) {\n parent.setAttribute(\"page\", String(newPage));\n }\n };\n\n render() {\n if (!this.store) {\n this.logger.warn(\"TicketableList component not found\");\n return null;\n }\n\n const isPrev = this.direction === \"prev\";\n const icon = isPrev ? \"←\" : \"→\";\n\n // Determine disabled state based on pagination meta\n const disabled = !this.paginationMeta || (isPrev ? this.paginationMeta.prev === null : this.paginationMeta.next === null);\n\n return (\n <Host>\n <button\n type=\"button\"\n onClick={this.handleClick}\n disabled={disabled}\n aria-label={isPrev ? \"Previous page\" : \"Next page\"}\n class={this.customClass}\n >\n <slot name=\"icon\">\n <span aria-hidden=\"true\">{icon}</span>\n </slot>\n </button>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;MAMa,gBAAiB,GAAA,cAAQ,cAAc,CAAA;;;;;;IAG1C,SAAS,GAAoB,MAAM;AACnC,IAAA,WAAW;IAEV,cAAc,GAA0B,IAAI;IAE7C,KAAK,GAA2B,IAAI;IACpC,WAAW,GAAwB,IAAI;IAE/C,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,KAAK;AAC7D,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACf,YAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC;YACtD;;;QAIF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc;;AAGrD,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,KAA4B,KAAI;AACxF,YAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,SAAC,CAAC;;IAGJ,oBAAoB,GAAA;AAClB,QAAA,IAAI,CAAC,W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EACzB,QAAQ,EAAE,QAAQ,EAAA,YAAA,EACN,MAAM,GAAG,eAAe,GAAG,WAAW,EAClD,KAAK,EAAE,IAAI,CAAC,WAAW,EAAA,EAEvB,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,MAAM,EAAA,EACf,CAAkB,CAAA,MAAA,EAAA,EAAA,aAAA,EAAA,MAAM,IAAE,IAAI,CAAQ,CACjC,CACA,CACJ;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-pagination-page.entry.js","sources":["src/ticketable/components/pagination/pagination-page.tsx"],"sourcesContent":["import { Component, h, Element, Host, State, Prop } from \"@stencil/core\";\nimport type { PaginationMeta } from \"../../../api\";\nimport type { PaginationStore } from \"../../store/pagination-store\";\nimport { UnidyComponent } from \"../../../logger\";\n\n@Component({ tag: \"u-pagination-page\", shadow: false })\nexport class PaginationPage extends UnidyComponent {\n @Element() element: HTMLElement;\n\n @Prop() customClass?: string;\n\n @State() paginationMeta: PaginationMeta | null = null;\n\n private store: PaginationStore | null = null;\n private unsubscribe: (() => void) | null = null;\n\n componentDidLoad() {\n this.store = this.element.closest(\"u-ticketable-list\")?.store;\n if (!this.store) {\n this.logger.warn(\"TicketableList component not found\");\n return;\n }\n\n // Get initial state\n this.paginationMeta = this.store.state.paginationMeta;\n\n // Subscribe to store changes - watch for changes to paginationMeta\n this.unsubscribe = this.store.onChange(\"paginationMeta\", (value: PaginationMeta | null) => {\n this.paginationMeta = value;\n });\n }\n\n disconnectedCallback() {\n this.unsubscribe?.();\n }\n\n render() {\n if (!this.store) {\n this.logger.warn(\"TicketableList component not found\");\n return null;\n }\n\n if (!this.paginationMeta) {\n return null;\n }\n\n return (\n <Host>\n <span class={this.customClass}>\n Page {this.paginationMeta.page} of {this.paginationMeta.last}\n </span>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;MAMa,cAAe,GAAA,cAAQ,cAAc,CAAA;;;;;;AAGxC,IAAA,WAAW;IAEV,cAAc,GAA0B,IAAI;IAE7C,KAAK,GAA2B,IAAI;IACpC,WAAW,GAAwB,IAAI;IAE/C,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,KAAK;AAC7D,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACf,YAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC;YACtD;;;QAIF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc;;AAGrD,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,KAA4B,KAAI;AACxF,YAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,SAAC,CAAC;;IAGJ,oBAAoB,GAAA;AAClB,QAAA,IAAI,CAAC,WAAW,IAAI;;IAGtB,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACf,YAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC;AACtD,YAAA,OAAO,IAAI;;AAGb,QAAA,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;AACxB,YAAA,OAAO,IAAI;;AAGb,QAAA,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAE,IAAI,CAAC,WAAW,EAAA,WACrB,IAAI,CAAC,cAAc,CAAC,IAAI,UAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CACvD,CACF;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-passkey.entry.js","sources":["src/auth/components/passkey/passkey.tsx"],"sourcesContent":["import { Component, h, Prop, State, Host } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { authState } from \"../../store/auth-store\";\nimport { Auth } from \"../../auth\";\n\n@Component({\n tag: \"u-passkey\",\n shadow: false,\n})\nexport class Passkey {\n @Prop() disabled = false;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() ariaDescribedBy? = \"\";\n\n @State() isSupported = false;\n\n componentWillLoad() {\n // Check if WebAuthn is supported\n this.isSupported = typeof window !== \"undefined\" && !!window.PublicKeyCredential;\n }\n\n private handleClick = async () => {\n if (this.disabled || authState.loading || !this.isSupported) return;\n\n const authInstance = await Auth.getInstance();\n\n await authInstance.helpers.authenticateWithPasskey();\n };\n\n render() {\n if (!authState.availableLoginOptions?.passkey) {\n return null;\n }\n\n if (!this.isSupported) {\n return null;\n }\n\n const isDisabled = this.disabled || authState.loading;\n const text = t(\"auth.passkey.button_text\", { defaultValue: \"Sign in with Passkey\" });\n const loadingText = t(\"auth.passkey.loading_text\", { defaultValue: \"Authenticating...\" });\n\n return (\n <Host>\n <button\n type=\"button\"\n disabled={isDisabled}\n onClick={this.handleClick}\n class={this.componentClassName}\n aria-live=\"polite\"\n aria-describedby={this.ariaDescribedBy || undefined}\n >\n {authState.loading ? loadingText : text}\n </button>\n </Host>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;;;;;;;MASa,OAAO,GAAA,MAAA;;;;IACV,QAAQ,GAAG,KAAK;IACW,kBAAkB,GAAG,EAAE;IAClD,eAAe,GAAI,EAAE;IAEpB,WAAW,GAAG,KAAK;IAE5B,iBAAiB,GAAA;;AAEf,QAAA,IAAI,CAAC,WAAW,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC,mBAAmB;;IAG1E,WAAW,GAAG,YAAW;QAC/B,IAAI,IAAI,CAAC,QAAQ,IAAIA,KAAS,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE;AAE7D,QAAA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE;AAE7C,QAAA,MAAM,YAAY,CAAC,OAAO,CAAC,uBAAuB,EAAE;AACtD,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,CAACA,KAAS,CAAC,qBAAqB,EAAE,OAAO,EAAE;AAC7C,YAAA,OAAO,IAAI;;AAGb,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;AACrB,YAAA,OAAO,IAAI;;QAGb,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,IAAIA,KAAS,CAAC,OAAO;AACrD,QAAA,MAAM,IAAI,GAAG,CAAC,CAAC,0BAA0B,EAAE,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC;AACpF,QAAA,MAAM,WAAW,GAAG,CAAC,CAAC,2BAA2B,EAAE,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC;QAEzF,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE,IAAI,CAAC,kBAAkB,EACpB,WAAA,EAAA,QAAQ,EACA,kBAAA,EAAA,IAAI,CAAC,eAAe,IAAI,SAAS,EAElD,EAAAA,KAAS,CAAC,OAAO,GAAG,WAAW,GAAG,IAAI,CAChC,CACJ;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-password-field.entry.js","sources":["src/auth/components/password-field/password-field.tsx"],"sourcesContent":["import { Component, h, Prop, Element } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { authState, authStore } from \"../../store/auth-store\";\nimport { getParentSigninStep } from \"../helpers\";\n\nexport type PasswordFieldFor = \"login\" | \"new-password\" | \"password-confirmation\";\n\n@Component({\n tag: \"u-password-field\",\n shadow: false,\n})\nexport class PasswordField {\n @Element() el!: HTMLElement;\n\n @Prop() for: PasswordFieldFor = \"login\";\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() ariaLabel = \"\";\n\n private getAriaLabel(): string {\n if (this.ariaLabel) return this.ariaLabel;\n\n switch (this.for) {\n case \"login\":\n return \"Password\";\n case \"new-password\":\n return \"New Password\";\n case \"password-confirmation\":\n return \"Password Confirmation\";\n }\n }\n\n private getValue(): string {\n switch (this.for) {\n case \"login\":\n return authState.password;\n case \"new-password\":\n return authState.resetPassword.newPassword;\n case \"password-confirmation\":\n return authState.resetPassword.passwordConfirmation;\n }\n }\n\n private getAutocomplete(): string {\n switch (this.for) {\n case \"login\":\n return \"current-password\";\n case \"new-password\":\n case \"password-confirmation\":\n return \"new-password\";\n }\n }\n\n private getInputName(): string {\n switch (this.for) {\n case \"login\":\n return \"password\";\n case \"new-password\":\n return \"new-password\";\n case \"password-confirmation\":\n return \"confirm-password\";\n }\n }\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n\n switch (this.for) {\n case \"login\":\n authStore.setPassword(target.value);\n break;\n case \"new-password\":\n authStore.setNewPassword(target.value);\n authStore.clearFieldError(\"resetPassword\");\n authStore.clearFieldError(\"password\");\n break;\n case \"password-confirmation\":\n authStore.setConfirmPassword(target.value);\n authStore.clearFieldError(\"resetPassword\");\n authStore.clearFieldError(\"password\");\n break;\n }\n };\n\n private handleSubmit = async (event: Event) => {\n event.preventDefault();\n\n (await getParentSigninStep(this.el))?.submit();\n };\n\n private shouldRender(): boolean {\n switch (this.for) {\n case \"login\":\n return (authState.step === \"verification\" && authState.availableLoginOptions?.password) || authState.step === \"single-login\";\n case \"new-password\":\n case \"password-confirmation\":\n return authState.step === \"reset-password\";\n }\n }\n\n render() {\n if (!this.shouldRender()) {\n return null;\n }\n\n if (authState.availableLoginOptions && !authState.availableLoginOptions.password && authState.step !== \"single-login\") {\n return null;\n }\n\n const key = this.for === \"password-confirmation\" ? \"auth.password.confirmation.placeholder\" : \"auth.password.placeholder\";\n const placeholder = t(key, { defaultValue: \"Enter your password\" });\n\n return (\n <form onSubmit={this.handleSubmit}>\n <input\n name={this.getInputName()}\n type=\"password\"\n value={this.getValue()}\n autocomplete={this.getAutocomplete()}\n placeholder={placeholder}\n disabled={authState.loading}\n class={this.componentClassName}\n onInput={this.handleInput}\n aria-label={this.getAriaLabel()}\n />\n </form>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;;;MAWa,aAAa,GAAA,MAAA;;;;;IAGhB,GAAG,GAAqB,OAAO;IACJ,kBAAkB,GAAG,EAAE;IAClD,SAAS,GAAG,EAAE;IAEd,YAAY,GAAA;QAClB,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS;AAEzC,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,UAAU;AACnB,YAAA,KAAK,cAAc;AACjB,gBAAA,OAAO,cAAc;AACvB,YAAA,KAAK,uBAAuB;AAC1B,gBAAA,OAAO,uBAAuB;;;IAI5B,QAAQ,GAAA;AACd,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;gBACV,OAAOA,KAAS,CAAC,QAAQ;AAC3B,YAAA,KAAK,cAAc;AACjB,gBAAA,OAAOA,KAAS,CAAC,aAAa,CAAC,WAAW;AAC5C,YAAA,KAAK,uBAAuB;AAC1B,gBAAA,OAAOA,KAAS,CAAC,aAAa,CAAC,oBAAoB;;;IAIjD,eAAe,GAAA;AACrB,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,kBAAkB;AAC3B,YAAA,KAAK,cAAc;AACnB,YAAA,KAAK,uBAAuB;AAC1B,gBAAA,OAAO,cAAc;;;IAInB,YAAY,GAAA;AAClB,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,UAAU;AACnB,YAAA,KAAK,cAAc;AACjB,gBAAA,OAAO,cAAc;AACvB,YAAA,KAAK,uBAAuB;AAC1B,gBAAA,OAAO,kBAAkB;;;AAIvB,IAAA,WAAW,GAAG,CAAC,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AC,qBAAqB,CAAC,QAAQ,IAAIA,KAAS,CAAC,IAAI,KAAK,cAAc,EAAE;AACrH,YAAA,OAAO,IAAI;;AAGb,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,KAAK,uBAAuB,GAAG,wCAAwC,GAAG,2BAA2B;AACzH,QAAA,MAAM,WAAW,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEnE,QAAA,QACE,CAAM,CAAA,MAAA,EAAA,EAAA,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAA,EAC/B,CACE,CAAA,OAAA,EAAA,EAAA,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,EACzB,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EACtB,YAAY,EAAE,IAAI,CAAC,eAAe,EAAE,EACpC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAEA,KAAS,CAAC,OAAO,EAC3B,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAC9B,OAAO,EAAE,IAAI,CAAC,WAAW,EACb,YAAA,EAAA,IAAI,CAAC,YAAY,EAAE,EAAA,CAC/B,CACG;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-profile.u-submit-button.entry.js","sources":["src/profile/components/profile/profile.tsx","src/auth/components/submit-button/auth-submit-button.ts","src/newsletter/components/submit-button/newsletter-submit-button.ts","src/profile/components/submit-button/profile-submit-button.ts","src/shared/components/submit-button/context.ts","src/shared/components/submit-button/submit-button.tsx"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\nimport { Component, Host, Method, Prop, State, h } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { Auth } from \"../../../auth\";\nimport { getUnidyClient } from \"../../../api\";\nimport { authStore, onChange as authOnChange } from \"../../../auth/store/auth-store\";\nimport { state as profileState, onChange as profileOnChange } from \"../../store/profile-store\";\nimport { unidyState, onChange as unidyOnChange } from \"../../../shared/store/unidy-store\";\nimport type { ProfileRaw } from \"../../store/profile-store\";\nimport { validateRequiredFieldsUnchanged, buildPayload } from \"../../profile-helpers\";\n\n@Component({\n tag: \"u-profile\",\n shadow: false,\n})\nexport class Profile {\n @Prop() profileId?: string;\n @Prop() initialData: string | Record<string, string> = \"\";\n\n @State() fetchingProfileData = false;\n\n constructor() {\n unidyOnChange(\"locale\", async (_locale) => {\n await this.getTokenAndFetchProfile();\n });\n }\n\n async componentWillLoad() {\n if (this.initialData !== \"\") {\n profileState.data = typeof this.initialData === \"string\" ? JSON.parse(this.initialData) : this.initialData;\n } else {\n await this.getTokenAndFetchProfile();\n }\n\n profileState.loading = false;\n }\n\n async getTokenAndFetchProfile() {\n const authInstance = await Auth.getInstance();\n\n const idToken = await authInstance.getToken();\n\n if (idToken && typeof idToken === \"string\") {\n await this.fetchProfileData(idToken as string);\n }\n }\n\n async fetchProfileData(idToken: string) {\n // avoid multiple requests\n if (this.fetchingProfileData) return;\n\n this.fetchingProfileData = true;\n try {\n const resp = await getUnidyClient().profile.fetchProfile({ idToken, lang: unidyState.locale });\n\n if (resp.success) {\n profileState.configuration = JSON.parse(JSON.stringify(resp.data)) as ProfileRaw;\n profileState.configUpdateSource = \"fetch\";\n profileState.errors = {};\n profileState.flashErrors = {};\n\n profileState.data = JSON.parse(JSON.stringify(resp.data)) as ProfileRaw;\n } else {\n profileState.flashErrors = { [String(resp?.status)]: String(resp?.error) };\n }\n } catch (error) {\n Sentry.captureException(\"Failed to fetch profile data:\", error);\n profileState.flashErrors = { error: t(\"errors.failed_to_load_profile\") };\n }\n this.fetchingProfileData = false;\n }\n\n @Method()\n async submitProfile() {\n const authInstance = await Auth.getInstance();\n\n profileState.loading = true;\n\n const { configuration, ...stateWithoutConfig } = profileState;\n\n if (!validateRequiredFieldsUnchanged(stateWithoutConfig.data)) {\n profileState.loading = false;\n return;\n }\n\n const updatedProfileData = buildPayload(stateWithoutConfig.data);\n\n const resp = await getUnidyClient().profile.updateProfile({\n idToken: (await authInstance.getToken()) as string,\n data: updatedProfileData,\n lang: unidyState.locale,\n });\n\n if (resp?.success) {\n profileState.loading = false;\n profileState.configuration = JSON.parse(JSON.stringify(resp.data));\n profileState.configUpdateSource = \"submit\";\n profileState.errors = {};\n } else {\n if (resp?.data && \"flatErrors\" in resp.data) {\n profileState.errors = resp.data.flatErrors as Record<string, string>;\n } else {\n profileState.flashErrors = { [String(resp?.status)]: String(resp?.error) };\n }\n profileState.loading = false;\n }\n }\n\n componentDidLoad() {\n profileOnChange(\"configuration\", (cfg) => {\n profileState.data = cfg as ProfileRaw;\n });\n\n authOnChange(\"token\", (newToken: string | null) => {\n const token = newToken ?? \"\";\n\n if (token) {\n this.fetchProfileData(token);\n }\n });\n }\n\n render() {\n const hasFieldErrors = Object.values(profileState.errors).some(Boolean);\n const errorMsg = Object.values(profileState.flashErrors).filter(Boolean).join(\", \");\n const wasSubmit = profileState.configUpdateSource === \"submit\";\n\n if (authStore.state.authenticated) {\n return this.fetchingProfileData ? (\n <div>{t(\"loading\")}</div>\n ) : (\n <Host>\n <slot />\n {!hasFieldErrors && errorMsg && <flash-message variant=\"error\" message={errorMsg} />}\n {wasSubmit && !errorMsg && !hasFieldErrors && <flash-message variant=\"success\" message={t(\"profile.updated\")} />}\n </Host>\n );\n }\n\n return <h2>{t(\"profile.signInToView\")}</h2>;\n }\n}\n","import { t } from \"../../../i18n\";\nimport type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { authState } from \"../../store/auth-store\";\nimport { getParentSigninStep } from \"../helpers\";\n\nexport type AuthButtonFor = \"email\" | \"password\" | \"resetPassword\";\n\nexport const authContext: SubmitButtonContext<AuthButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, _forProp?: AuthButtonFor) => {\n event.preventDefault();\n await getParentSigninStep(el)?.submit();\n },\n\n isDisabled(forProp?: AuthButtonFor, disabled?: boolean): boolean {\n if (disabled || authState.loading) return true;\n\n if (authState.step === \"email\" && forProp === \"email\") {\n return authState.email === \"\";\n }\n\n if (authState.step === \"verification\" && forProp === \"password\") {\n return authState.password === \"\";\n }\n\n if (authState.step === \"reset-password\" && forProp === \"resetPassword\") {\n return !authState.resetPassword.newPassword || !authState.resetPassword.passwordConfirmation;\n }\n\n return false;\n },\n\n isLoading(): boolean {\n return authState.loading;\n },\n\n getButtonText(forProp?: AuthButtonFor, text?: string): string {\n if (text) return text;\n\n switch (authState.step) {\n case \"email\":\n return t(\"buttons.continue\");\n case \"verification\":\n if (forProp === \"password\") {\n return t(\"auth.password.button_text\", { defaultValue: \"Sign In with Password\" });\n }\n return t(\"buttons.submit\");\n case \"reset-password\":\n if (forProp === \"resetPassword\") {\n return t(\"auth.resetPassword.button_text_set\", { defaultValue: \"Set Password\" });\n }\n return t(\"buttons.submit\");\n default:\n return t(\"buttons.submit\");\n }\n },\n\n shouldRender(forProp?: AuthButtonFor): boolean {\n if (!authState.availableLoginOptions?.password && forProp === \"password\") {\n return false;\n }\n\n if (authState.step === \"email\") {\n return forProp === \"email\";\n }\n\n if (authState.step === \"verification\") {\n return forProp === \"password\" && authState.magicCodeStep !== \"sent\";\n }\n\n if (authState.step === \"reset-password\") {\n return forProp === \"resetPassword\";\n }\n\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\nimport { getParentNewsletterRoot } from \"../helpers\";\n\nexport type NewsletterButtonFor = \"login\" | \"create\";\n\nexport const newsletterContext: SubmitButtonContext<NewsletterButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, forProp?: NewsletterButtonFor) => {\n event.preventDefault();\n return await getParentNewsletterRoot(el)?.submit(forProp);\n },\n\n isDisabled(forProp, disabled?: boolean): boolean {\n if (forProp === \"login\") {\n return disabled || !newsletterStore.state.email;\n }\n\n return disabled || !newsletterStore.state.email || Object.keys(newsletterStore.state.checkedNewsletters).length === 0;\n },\n\n isLoading(): boolean {\n // newsletter sdk doesn't have loading state yet\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { state as profileState } from \"../../store/profile-store\";\n\nfunction getParentProfile(el: HTMLElement) {\n return el.closest(\"u-profile\") as HTMLUProfileElement | null;\n}\n\nexport const profileContext: SubmitButtonContext = {\n async handleClick(event: MouseEvent, el: HTMLElement, _forProp?: string) {\n event.preventDefault();\n await getParentProfile(el)?.submitProfile();\n },\n\n isDisabled(_forProp, disabled?: boolean): boolean {\n return disabled || (profileState.errors && Object.keys(profileState.errors).length > 0) || profileState.phoneValid === false;\n },\n\n isLoading(): boolean {\n return profileState.loading;\n },\n};\n","export interface SubmitButtonContext<ForContext = string> {\n init?(): Promise<void>;\n handleClick(event: MouseEvent, el: HTMLElement, forProp?: ForContext): Promise<void>;\n isDisabled(forProp?: ForContext, disabled?: boolean): boolean;\n isLoading(): boolean;\n getButtonText?(forProp?: ForContext, text?: string): string;\n shouldRender?(forProp?: ForContext): boolean;\n}\n\nexport const defaultContext: SubmitButtonContext = {\n async handleClick() {},\n\n isDisabled(_forProp, disabled = false): boolean {\n return disabled || false;\n },\n\n isLoading(): boolean {\n return false;\n },\n};\n","import { Component, Element, h, Prop } from \"@stencil/core\";\nimport { type AuthButtonFor, authContext } from \"../../../auth/components/submit-button/auth-submit-button\";\nimport { t } from \"../../../i18n\";\nimport { type NewsletterButtonFor, newsletterContext } from \"../../../newsletter/components/submit-button/newsletter-submit-button\";\nimport { profileContext } from \"../../../profile/components/submit-button/profile-submit-button\";\nimport { hasSlotContent } from \"../../component-utils\";\nimport { defaultContext, type SubmitButtonContext } from \"./context\";\n\n@Component({\n tag: \"u-submit-button\",\n shadow: false,\n})\nexport class SubmitButton {\n @Element() el!: HTMLElement;\n @Prop() for?: AuthButtonFor | NewsletterButtonFor;\n @Prop() text?: string;\n @Prop() disabled = false;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n private context: \"auth\" | \"profile\" | \"newsletter\" = \"auth\";\n private contextModule: SubmitButtonContext = defaultContext;\n private hasSlot = false;\n\n async componentWillLoad() {\n this.hasSlot = hasSlotContent(this.el);\n this.context = this.detectContext();\n\n switch (this.context) {\n case \"auth\":\n this.contextModule = authContext;\n break;\n case \"profile\":\n this.contextModule = profileContext;\n break;\n case \"newsletter\":\n this.contextModule = newsletterContext;\n break;\n default:\n this.contextModule = defaultContext;\n }\n }\n\n private detectContext(): \"auth\" | \"profile\" | \"newsletter\" {\n if (this.el.closest(\"u-signin-root\") || this.el.closest(\"u-signin-step\")) return \"auth\";\n\n if (this.el.closest(\"u-profile\")) return \"profile\";\n\n if (this.el.closest(\"u-newsletter-root\")) return \"newsletter\";\n\n throw new Error(\n \"No context found for submit button. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.\",\n );\n }\n\n private handleClick = async (event: MouseEvent) => {\n await this.contextModule.handleClick(event, this.el, this.for);\n };\n\n private isDisabled(): boolean {\n return this.contextModule.isDisabled(this.for, this.disabled);\n }\n\n private isLoading(): boolean {\n return this.contextModule.isLoading();\n }\n\n private getButtonText(): string {\n if (this.contextModule.getButtonText) {\n return this.contextModule.getButtonText(this.for, this.text);\n }\n if (this.text) {\n return this.text;\n }\n\n return t(\"buttons.submit\");\n }\n\n private getButtonContent() {\n const loading = this.isLoading();\n\n if (loading) {\n return <u-spinner />;\n }\n\n if (this.hasSlot) {\n return <slot />;\n }\n\n return this.getButtonText();\n }\n\n render() {\n if (this.contextModule.shouldRender && !this.contextModule.shouldRender(this.for)) {\n return null;\n }\n\n const buttonClasses = [\n this.componentClassName,\n this.context === \"auth\" ? \"u:flex u:justify-center\" : \"\",\n \"u:disabled:opacity-50 u:disabled:cursor-not-allowed\",\n ].join(\" \");\n\n const buttonProps: Record<string, unknown> = {\n type: \"submit\",\n part: `${this.context}-submit-button`,\n disabled: this.isDisabled() || this.isLoading(),\n class: buttonClasses,\n onClick: this.handleClick,\n \"aria-live\": \"polite\",\n };\n\n return <button {...buttonProps}>{this.getButtonContent()}</button>;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AAC,EAAE;AACjF,YAAA,OAAO,IAAI;;AAGb,QAAA,MAAM,aAAa,GAAG;AACpB,YAAA,IAAI,CAAC,kBAAkB;YACvB,IAAI,CAAC,OAAO,KAAK,MAAM,GAAG,yBAAyB,GAAG,EAAE;YACxD,qDAAqD;AACtD,SAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,QAAA,MAAM,WAAW,GAA4B;AAC3C,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,IAAI,EAAE,CAAA,EAAG,IAAI,CAAC,OAAO,CAAgB,cAAA,CAAA;YACrC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE;AAC/C,YAAA,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,IAAI,CAAC,WAAW;AACzB,YAAA,WAAW,EAAE,QAAQ;SACtB;AAED,QAAA,OAAO,CAAA,CAAA,QAAA,EAAA,EAAA,GAAY,WAAW,EAAG,EAAA,IAAI,CAAC,gBAAgB,EAAE,CAAU;;;;;;"}
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, d as captureException, h, H as Host, g as getElement } from './index-Ci3aTmzp.js';
|
|
2
|
-
import { t } from './i18n-BR-AGAnn.js';
|
|
3
|
-
import { b as authStoreOnChange, a as authStore, s as state$1 } from './auth-store-BMqUdTpC.js';
|
|
4
|
-
import { A as Auth } from './auth-DLKPv5Zm.js';
|
|
5
|
-
import { g as getUnidyClient } from './index-DKaIwo59.js';
|
|
6
|
-
import { s as state, a as profileStoreOnChange } from './profile-store-RmZB2PTc.js';
|
|
7
|
-
import { o as onChange, u as unidyState } from './unidy-store-BldTAtO0.js';
|
|
8
|
-
import { v as validateRequiredFieldsUnchanged, b as buildPayload } from './profile-helpers-7onubaoR.js';
|
|
9
|
-
import { g as getParentSigninStep } from './helpers-DUHc_Cx7.js';
|
|
10
|
-
import { n as newsletterStore } from './newsletter-store-BYmuLQg8.js';
|
|
11
|
-
import { g as getParentNewsletterRoot } from './helpers-BqFCd65h.js';
|
|
12
|
-
import { h as hasSlotContent } from './component-utils-D1lzXl_Z.js';
|
|
13
|
-
import './index-Bjp1XO-f.js';
|
|
14
|
-
import './flash-store-CEvWSG0c.js';
|
|
15
|
-
|
|
16
|
-
const Profile = class {
|
|
17
|
-
profileId;
|
|
18
|
-
initialData = "";
|
|
19
|
-
fetchingProfileData = false;
|
|
20
|
-
constructor(hostRef) {
|
|
21
|
-
registerInstance(this, hostRef);
|
|
22
|
-
onChange("locale", async (_locale) => {
|
|
23
|
-
await this.getTokenAndFetchProfile();
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
async componentWillLoad() {
|
|
27
|
-
if (this.initialData !== "") {
|
|
28
|
-
state.data = typeof this.initialData === "string" ? JSON.parse(this.initialData) : this.initialData;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
await this.getTokenAndFetchProfile();
|
|
32
|
-
}
|
|
33
|
-
state.loading = false;
|
|
34
|
-
}
|
|
35
|
-
async getTokenAndFetchProfile() {
|
|
36
|
-
const authInstance = await Auth.getInstance();
|
|
37
|
-
const idToken = await authInstance.getToken();
|
|
38
|
-
if (idToken && typeof idToken === "string") {
|
|
39
|
-
await this.fetchProfileData(idToken);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
async fetchProfileData(idToken) {
|
|
43
|
-
// avoid multiple requests
|
|
44
|
-
if (this.fetchingProfileData)
|
|
45
|
-
return;
|
|
46
|
-
this.fetchingProfileData = true;
|
|
47
|
-
try {
|
|
48
|
-
const resp = await getUnidyClient().profile.fetchProfile({ idToken, lang: unidyState.locale });
|
|
49
|
-
if (resp.success) {
|
|
50
|
-
state.configuration = JSON.parse(JSON.stringify(resp.data));
|
|
51
|
-
state.configUpdateSource = "fetch";
|
|
52
|
-
state.errors = {};
|
|
53
|
-
state.flashErrors = {};
|
|
54
|
-
state.data = JSON.parse(JSON.stringify(resp.data));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
state.flashErrors = { [String(resp?.status)]: String(resp?.error) };
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
captureException("Failed to fetch profile data:", error);
|
|
62
|
-
state.flashErrors = { error: t("errors.failed_to_load_profile") };
|
|
63
|
-
}
|
|
64
|
-
this.fetchingProfileData = false;
|
|
65
|
-
}
|
|
66
|
-
async submitProfile() {
|
|
67
|
-
const authInstance = await Auth.getInstance();
|
|
68
|
-
state.loading = true;
|
|
69
|
-
const { configuration, ...stateWithoutConfig } = state;
|
|
70
|
-
if (!validateRequiredFieldsUnchanged(stateWithoutConfig.data)) {
|
|
71
|
-
state.loading = false;
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const updatedProfileData = buildPayload(stateWithoutConfig.data);
|
|
75
|
-
const resp = await getUnidyClient().profile.updateProfile({
|
|
76
|
-
idToken: (await authInstance.getToken()),
|
|
77
|
-
data: updatedProfileData,
|
|
78
|
-
lang: unidyState.locale,
|
|
79
|
-
});
|
|
80
|
-
if (resp?.success) {
|
|
81
|
-
state.loading = false;
|
|
82
|
-
state.configuration = JSON.parse(JSON.stringify(resp.data));
|
|
83
|
-
state.configUpdateSource = "submit";
|
|
84
|
-
state.errors = {};
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
if (resp?.data && "flatErrors" in resp.data) {
|
|
88
|
-
state.errors = resp.data.flatErrors;
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
state.flashErrors = { [String(resp?.status)]: String(resp?.error) };
|
|
92
|
-
}
|
|
93
|
-
state.loading = false;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
componentDidLoad() {
|
|
97
|
-
profileStoreOnChange("configuration", (cfg) => {
|
|
98
|
-
state.data = cfg;
|
|
99
|
-
});
|
|
100
|
-
authStoreOnChange("token", (newToken) => {
|
|
101
|
-
const token = newToken ?? "";
|
|
102
|
-
if (token) {
|
|
103
|
-
this.fetchProfileData(token);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
render() {
|
|
108
|
-
const hasFieldErrors = Object.values(state.errors).some(Boolean);
|
|
109
|
-
const errorMsg = Object.values(state.flashErrors).filter(Boolean).join(", ");
|
|
110
|
-
const wasSubmit = state.configUpdateSource === "submit";
|
|
111
|
-
if (authStore.state.authenticated) {
|
|
112
|
-
return this.fetchingProfileData ? (h("div", null, t("loading"))) : (h(Host, null, h("slot", null), !hasFieldErrors && errorMsg && h("flash-message", { variant: "error", message: errorMsg }), wasSubmit && !errorMsg && !hasFieldErrors && h("flash-message", { variant: "success", message: t("profile.updated") })));
|
|
113
|
-
}
|
|
114
|
-
return h("h2", null, t("profile.signInToView"));
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const authContext = {
|
|
119
|
-
handleClick: async (event, el, _forProp) => {
|
|
120
|
-
event.preventDefault();
|
|
121
|
-
await getParentSigninStep(el)?.submit();
|
|
122
|
-
},
|
|
123
|
-
isDisabled(forProp, disabled) {
|
|
124
|
-
if (disabled || state$1.loading)
|
|
125
|
-
return true;
|
|
126
|
-
if (state$1.step === "email" && forProp === "email") {
|
|
127
|
-
return state$1.email === "";
|
|
128
|
-
}
|
|
129
|
-
if (state$1.step === "verification" && forProp === "password") {
|
|
130
|
-
return state$1.password === "";
|
|
131
|
-
}
|
|
132
|
-
if (state$1.step === "reset-password" && forProp === "resetPassword") {
|
|
133
|
-
return !state$1.resetPassword.newPassword || !state$1.resetPassword.passwordConfirmation;
|
|
134
|
-
}
|
|
135
|
-
return false;
|
|
136
|
-
},
|
|
137
|
-
isLoading() {
|
|
138
|
-
return state$1.loading;
|
|
139
|
-
},
|
|
140
|
-
getButtonText(forProp, text) {
|
|
141
|
-
if (text)
|
|
142
|
-
return text;
|
|
143
|
-
switch (state$1.step) {
|
|
144
|
-
case "email":
|
|
145
|
-
return t("buttons.continue");
|
|
146
|
-
case "verification":
|
|
147
|
-
if (forProp === "password") {
|
|
148
|
-
return t("auth.password.button_text", { defaultValue: "Sign In with Password" });
|
|
149
|
-
}
|
|
150
|
-
return t("buttons.submit");
|
|
151
|
-
case "reset-password":
|
|
152
|
-
if (forProp === "resetPassword") {
|
|
153
|
-
return t("auth.resetPassword.button_text_set", { defaultValue: "Set Password" });
|
|
154
|
-
}
|
|
155
|
-
return t("buttons.submit");
|
|
156
|
-
default:
|
|
157
|
-
return t("buttons.submit");
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
shouldRender(forProp) {
|
|
161
|
-
if (!state$1.availableLoginOptions?.password && forProp === "password") {
|
|
162
|
-
return false;
|
|
163
|
-
}
|
|
164
|
-
if (state$1.step === "email") {
|
|
165
|
-
return forProp === "email";
|
|
166
|
-
}
|
|
167
|
-
if (state$1.step === "verification") {
|
|
168
|
-
return forProp === "password" && state$1.magicCodeStep !== "sent";
|
|
169
|
-
}
|
|
170
|
-
if (state$1.step === "reset-password") {
|
|
171
|
-
return forProp === "resetPassword";
|
|
172
|
-
}
|
|
173
|
-
return false;
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
const newsletterContext = {
|
|
178
|
-
handleClick: async (event, el, forProp) => {
|
|
179
|
-
event.preventDefault();
|
|
180
|
-
return await getParentNewsletterRoot(el)?.submit(forProp);
|
|
181
|
-
},
|
|
182
|
-
isDisabled(forProp, disabled) {
|
|
183
|
-
if (forProp === "login") {
|
|
184
|
-
return disabled || !newsletterStore.state.email;
|
|
185
|
-
}
|
|
186
|
-
return disabled || !newsletterStore.state.email || Object.keys(newsletterStore.state.checkedNewsletters).length === 0;
|
|
187
|
-
},
|
|
188
|
-
isLoading() {
|
|
189
|
-
// newsletter sdk doesn't have loading state yet
|
|
190
|
-
return false;
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
function getParentProfile(el) {
|
|
195
|
-
return el.closest("u-profile");
|
|
196
|
-
}
|
|
197
|
-
const profileContext = {
|
|
198
|
-
async handleClick(event, el, _forProp) {
|
|
199
|
-
event.preventDefault();
|
|
200
|
-
await getParentProfile(el)?.submitProfile();
|
|
201
|
-
},
|
|
202
|
-
isDisabled(_forProp, disabled) {
|
|
203
|
-
return disabled || (state.errors && Object.keys(state.errors).length > 0) || state.phoneValid === false;
|
|
204
|
-
},
|
|
205
|
-
isLoading() {
|
|
206
|
-
return state.loading;
|
|
207
|
-
},
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
const defaultContext = {
|
|
211
|
-
async handleClick() { },
|
|
212
|
-
isDisabled(_forProp, disabled = false) {
|
|
213
|
-
return disabled || false;
|
|
214
|
-
},
|
|
215
|
-
isLoading() {
|
|
216
|
-
return false;
|
|
217
|
-
},
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
const SubmitButton = class {
|
|
221
|
-
constructor(hostRef) {
|
|
222
|
-
registerInstance(this, hostRef);
|
|
223
|
-
}
|
|
224
|
-
get el() { return getElement(this); }
|
|
225
|
-
for;
|
|
226
|
-
text;
|
|
227
|
-
disabled = false;
|
|
228
|
-
componentClassName = "";
|
|
229
|
-
context = "auth";
|
|
230
|
-
contextModule = defaultContext;
|
|
231
|
-
hasSlot = false;
|
|
232
|
-
async componentWillLoad() {
|
|
233
|
-
this.hasSlot = hasSlotContent(this.el);
|
|
234
|
-
this.context = this.detectContext();
|
|
235
|
-
switch (this.context) {
|
|
236
|
-
case "auth":
|
|
237
|
-
this.contextModule = authContext;
|
|
238
|
-
break;
|
|
239
|
-
case "profile":
|
|
240
|
-
this.contextModule = profileContext;
|
|
241
|
-
break;
|
|
242
|
-
case "newsletter":
|
|
243
|
-
this.contextModule = newsletterContext;
|
|
244
|
-
break;
|
|
245
|
-
default:
|
|
246
|
-
this.contextModule = defaultContext;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
detectContext() {
|
|
250
|
-
if (this.el.closest("u-signin-root") || this.el.closest("u-signin-step"))
|
|
251
|
-
return "auth";
|
|
252
|
-
if (this.el.closest("u-profile"))
|
|
253
|
-
return "profile";
|
|
254
|
-
if (this.el.closest("u-newsletter-root"))
|
|
255
|
-
return "newsletter";
|
|
256
|
-
throw new Error("No context found for submit button. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.");
|
|
257
|
-
}
|
|
258
|
-
handleClick = async (event) => {
|
|
259
|
-
await this.contextModule.handleClick(event, this.el, this.for);
|
|
260
|
-
};
|
|
261
|
-
isDisabled() {
|
|
262
|
-
return this.contextModule.isDisabled(this.for, this.disabled);
|
|
263
|
-
}
|
|
264
|
-
isLoading() {
|
|
265
|
-
return this.contextModule.isLoading();
|
|
266
|
-
}
|
|
267
|
-
getButtonText() {
|
|
268
|
-
if (this.contextModule.getButtonText) {
|
|
269
|
-
return this.contextModule.getButtonText(this.for, this.text);
|
|
270
|
-
}
|
|
271
|
-
if (this.text) {
|
|
272
|
-
return this.text;
|
|
273
|
-
}
|
|
274
|
-
return t("buttons.submit");
|
|
275
|
-
}
|
|
276
|
-
getButtonContent() {
|
|
277
|
-
const loading = this.isLoading();
|
|
278
|
-
if (loading) {
|
|
279
|
-
return h("u-spinner", null);
|
|
280
|
-
}
|
|
281
|
-
if (this.hasSlot) {
|
|
282
|
-
return h("slot", null);
|
|
283
|
-
}
|
|
284
|
-
return this.getButtonText();
|
|
285
|
-
}
|
|
286
|
-
render() {
|
|
287
|
-
if (this.contextModule.shouldRender && !this.contextModule.shouldRender(this.for)) {
|
|
288
|
-
return null;
|
|
289
|
-
}
|
|
290
|
-
const buttonClasses = [
|
|
291
|
-
this.componentClassName,
|
|
292
|
-
this.context === "auth" ? "u:flex u:justify-center" : "",
|
|
293
|
-
"u:disabled:opacity-50 u:disabled:cursor-not-allowed",
|
|
294
|
-
].join(" ");
|
|
295
|
-
const buttonProps = {
|
|
296
|
-
type: "submit",
|
|
297
|
-
part: `${this.context}-submit-button`,
|
|
298
|
-
disabled: this.isDisabled() || this.isLoading(),
|
|
299
|
-
class: buttonClasses,
|
|
300
|
-
onClick: this.handleClick,
|
|
301
|
-
"aria-live": "polite",
|
|
302
|
-
};
|
|
303
|
-
return h("button", { ...buttonProps }, this.getButtonContent());
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
export { Profile as u_profile, SubmitButton as u_submit_button };
|
|
308
|
-
//# sourceMappingURL=u-profile.u-submit-button.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-registration-button.entry.js","sources":["src/auth/components/registration/registration-button.tsx"],"sourcesContent":["import { Component, Host, h, Prop, Element } from \"@stencil/core\";\nimport { authState, authStore } from \"../../store/auth-store\";\nimport { unidyState } from \"../../../shared/store/unidy-store\";\nimport { t } from \"../../../i18n\";\n\n@Component({\n tag: \"u-registration-button\",\n shadow: false,\n})\nexport class RegistrationButton {\n @Element() el!: HTMLElement;\n\n @Prop() for!: \"email\";\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() redirectUri: string = window.location.href;\n\n private getButtonText() {\n return t(\"buttons.registration\", { defaultValue: \"Register New Account\" });\n }\n\n private shouldRender(): boolean {\n if (authState.errors.email === \"account_not_found\") {\n authStore.setStep(\"registration\");\n return this.for === \"email\";\n }\n\n return false;\n }\n\n private getAuthUrl(): string {\n const baseUrl = unidyState.baseUrl;\n const redirectUri = this.redirectUri ? encodeURIComponent(this.redirectUri) : baseUrl;\n const encodedEmail = encodeURIComponent(authState.email);\n\n return `${baseUrl}/logins?email=${encodedEmail}&sdk_redirect_uri=${redirectUri}`;\n }\n\n private handleClick = async (event: Event) => {\n event.preventDefault();\n\n if (authState.errors.email === \"account_not_found\" && authState.step === \"registration\") {\n window.location.href = this.getAuthUrl();\n }\n };\n\n render() {\n if (!this.shouldRender()) {\n return null;\n }\n\n return (\n <Host>\n <slot name=\"registration-content\" />\n <button type=\"submit\" class={this.componentClassName} onClick={this.handleClick} aria-live=\"polite\">\n {this.getButtonText()}\n </button>\n </Host>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;;MASa,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AA,QAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAY,WAAA,EAAA,QAAQ,EAChG,EAAA,IAAI,CAAC,aAAa,EAAE,CACd,CACJ;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-reset-password-button.entry.js","sources":["src/auth/components/reset-pass-button/reset-pass-button.tsx"],"sourcesContent":["import { Component, h, Prop } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { Auth } from \"../../auth\";\nimport { authState } from \"../../store/auth-store\";\nimport { Flash } from \"../../../shared/store/flash-store\";\n\n@Component({\n tag: \"u-reset-password-button\",\n shadow: false,\n})\nexport class ResetPasswordButton {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n private handleClick = async () => {\n const authInstance = await Auth.getInstance();\n\n await authInstance.helpers.sendResetPasswordEmail();\n\n if (authState.resetPassword.step === \"sent\") {\n const successMessage = t(\"auth.resetPassword.success_message\", {\n defaultValue: \"Password reset email sent. Please check your inbox.\",\n });\n\n Flash.success.addMessage(successMessage);\n }\n };\n\n private getButtonText() {\n if (authState.step === \"verification\" && authState.availableLoginOptions && !authState.availableLoginOptions.password) {\n return t(\"auth.resetPassword.button_text_set\", { defaultValue: \"Set Password\" });\n }\n\n if (authState.step === \"reset-password\") {\n return t(\"auth.resetPassword.button_text_resend\", { defaultValue: \"Resend Password Reset Email\" });\n }\n\n return t(\"auth.resetPassword.button_text_reset\", { defaultValue: \"Reset Password\" });\n }\n render() {\n if (![\"verification\", \"reset-password\"].includes(authState.step)) {\n return null;\n }\n\n return (\n <button type=\"button\" onClick={this.handleClick} class={this.componentClassName}>\n {this.getButtonText()}\n </button>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;;;;;;;MAUa,mBAAmB,GAAA,MAAA;;;;IACK,kBAAkB,GAAG,EAAE;IAElD,WAAW,GAAG,YA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components/send-magic-code-button/send-magic-code-button.tsx"],"sourcesContent":["import { Component, h, Prop, State } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { authState, authStore } from \"../../store/auth-store\";\nimport { Auth } from \"../../auth\";\n\n@Component({\n tag: \"u-send-magic-code-button\",\n shadow: false,\n})\nexport class SendMagicCodeButton {\n @Prop() disabled = false;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n @State() countdown = 0;\n private countdownInterval: number | null = null;\n\n private handleClick = async () => {\n if (this.disabled || authState.loading || this.countdown > 0) return;\n\n const authInstance = await Auth.getInstance();\n\n const [_error, response] = await authInstance.helpers.sendMagicCode();\n\n if (response && \"enable_resend_after\" in response) {\n this.startCountdown(response.enable_resend_after);\n }\n };\n\n private startCountdown = (enableResendAfter: number) => {\n this.countdown = Math.ceil(enableResendAfter / 1000);\n\n this.countdownInterval = window.setInterval(() => {\n this.countdown--;\n if (this.countdown <= 0) {\n this.clearCountdown();\n authStore.clearFieldError(\"magicCode\");\n }\n }, 1000);\n };\n\n private clearCountdown = () => {\n if (this.countdownInterval) {\n clearInterval(this.countdownInterval);\n this.countdownInterval = null;\n }\n this.countdown = 0;\n };\n\n disconnectedCallback() {\n this.clearCountdown();\n }\n\n render() {\n if (!authState.availableLoginOptions?.magic_link && authState.step !== \"single-login\") {\n return null;\n }\n\n if (authState.step !== \"magic-code\" && authState.step !== \"verification\" && authState.step !== \"single-login\") {\n return null;\n }\n\n const isDisabled = this.disabled || authState.magicCodeStep === \"requested\" || this.countdown > 0 || authState.email === \"\";\n const buttonTextKey = authState.step !== \"magic-code\" ? \"auth.magicCode.button_text\" : \"auth.magicCode.resend.button_text\";\n const text = t(buttonTextKey, { defaultValue: \"Send Magic Code\" });\n const alreadySentText = t(\"auth.magicCode.already_sent_text\", { defaultValue: \"Magic code already sent to your email\" });\n const sendingText = t(\"auth.magicCode.sending_text\", { defaultValue: \"Sending...\" });\n\n return (\n <button type=\"button\" disabled={isDisabled} onClick={this.handleClick} class={this.componentClassName} aria-live=\"polite\">\n {this.countdown > 0 ? alreadySentText : authState.loading && authState.magicCodeStep === \"requested\" ? sendingText : text}\n </button>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;;;;;;;MASa,mBAAmB,GAAA,MAAA;;;;IACtB,QAAQ,GAAG,KAAK;IACW,kBAAkB,GAAG,EAAE;IAEjD,SAAS,GAAG,CAAC;IACd,iBAAiB,GAAkB,IAAI;IAEvC,WAAW,GAAG,YAAW;AAC/B,QAAA,IAAI,IAAI,CAAC,QAAQ,IAAIA,KAAS,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC;YAAE;AAE9D,QAAA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE;AAE7C,QAAA,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,aAAa,EAAE;AAErE,QAAA,IAAI,QAAQ,IAAI,qBAAqB,IAAI,QAAQ,EAAE;AACjD,YAAA,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC;;AAErD,KAAC;AAEO,IAAA,cAAc,GAAG,CAAC,iBAAyB,KAAI;QACrD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAEpD,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,WAAW,CAAC,MAAK;YAC/C,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,EAAE;gBACvB,IAAI,CAAC,cAAc,EAAE;AACrB,gBAAA,SAAS,CAAC,eAAe,CAAC,WAAW,CAAC;;SAEzC,EAAE,IAAI,CAAC;AACV,KAAC;IAEO,cAAc,GAAG,MAAK;AAC5B,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC1B,YAAA,aAAa,CAAC,IAAI,CAAC,iBAAiB,CAAC;AACrC,YAAA,IAAI,CA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IAAIA,KAAS,CAAC,aAAa,KAAK,WAAW,GAAG,WAAW,GAAG,IAAI,CAClH;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-signed-in.entry.js","sources":["src/auth/components/signed-in/signed-in.tsx"],"sourcesContent":["import { Component, Host, Prop, h } from \"@stencil/core\";\nimport { authStore } from \"../../store/auth-store\";\n\n@Component({\n tag: \"u-signed-in\",\n shadow: true,\n})\nexport class SignedIn {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() not = false;\n\n render() {\n if (this.not ? authStore.state.authenticated : !authStore.state.authenticated) {\n return null;\n }\n\n return (\n <Host class={this.componentClassName}>\n <slot />\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;MAOa,QAAQ,GAAA,MAAA;;;;IACgB,kBAAkB,GAAG,EAAE;IAClD,GAAG,GAAG,KAAK;IAEnB,MAAM,GAAA;QACJ,IAAI,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,aAAa,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,EAAE;AAC7E,YAAA,OAAO,IAAI;;QAGb,QACE,EAAC,IAAI,EAAA,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAA,EAClC,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,CACH;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-signin-root.entry.js","sources":["src/auth/components/signin-root/signin-root.tsx"],"sourcesContent":["import { Component, Host, h, Prop, Event, type EventEmitter, Element } from \"@stencil/core\";\nimport type { TokenResponse } from \"../../api/auth\";\nimport { authStore } from \"../../store/auth-store\";\n\n@Component({\n tag: \"u-signin-root\",\n shadow: true,\n})\nexport class SigninRoot {\n @Element() el!: HTMLElement;\n\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n @Event() authEvent!: EventEmitter<TokenResponse>;\n @Event() errorEvent!: EventEmitter<{ error: string }>;\n\n componentDidLoad() {\n authStore.setRootComponentRef(this);\n const signInSteps = this.el.querySelectorAll(\"u-signin-step\").values();\n if ([...signInSteps].some((step: HTMLUSigninStepElement) => step.name === \"single-login\")) {\n authStore.setInitialStep(\"single-login\");\n } else {\n authStore.setInitialStep(\"email\");\n }\n }\n\n onAuth(response: TokenResponse) {\n this.authEvent.emit(response);\n }\n\n onError(error: string) {\n this.errorEvent.emit({ error: error });\n }\n\n render() {\n if (authStore.state.authenticated) {\n return null;\n }\n\n return (\n <Host class={this.componentClassName}>\n <slot />\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;MAQa,UAAU,GAAA,MAAA;;;;;;;IAGc,kBAAkB,GAAG,EAAE;AAEjD,IAAA,SAAS;AACT,IAAA,UAAU;IAEnB,gBAAgB,GAAA;AACd,QAAA,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC;AACnC,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE;AACtE,QAAA,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAA4B,KAAK,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,EAAE;AACzF,YAAA,SAAS,CAAC,cAAc,CAAC,cAAc,CAAC;;aACnC;AACL,YAAA,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC;;;AAIrC,IAAA,MAAM,CAAC,QAAuB,EAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;;AAG/B,IAAA,OAAO,CAAC,KAAa,EAAA;QACnB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;;IAGxC,MAAM,GAAA;AACJ,QAAA,IAAI,SAAS,CAAC,KAAK,CAAC,aAAa,EAAE;AACjC,YAAA,OAAO,IAAI;;QAGb,QACE,EAAC,IAAI,EAAA,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAA,EAClC,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,CACH;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-signin-step.entry.js","sources":["src/auth/components/signin-step/signin-step.tsx"],"sourcesContent":["import { Component, Host, h, Prop, Method, Element } from \"@stencil/core\";\nimport { authState } from \"../../store/auth-store\";\nimport { Auth } from \"../..\";\n\n@Component({\n tag: \"u-signin-step\",\n shadow: true,\n})\nexport class SigninStep {\n @Element() el!: HTMLElement;\n @Prop() name!: \"email\" | \"verification\" | \"reset-password\" | \"single-login\" | \"missing-fields\" | \"registration\";\n @Prop() alwaysRender = false;\n\n @Method()\n async isActive(): Promise<boolean> {\n return authState.step === this.name || this.alwaysRender;\n }\n\n @Method()\n async submit() {\n if (authState.loading) return;\n\n const authInstance = await Auth.getInstance();\n\n if (authState.step === \"email\" || authState.step === \"single-login\") {\n await authInstance.helpers.createSignIn(authState.email, authState.password);\n } else if (authState.step === \"verification\") {\n await authInstance.helpers.authenticateWithPassword(authState.password);\n } else if (authState.step === \"reset-password\") {\n await authInstance.helpers.resetPassword();\n }\n }\n\n render() {\n let shouldRender = false;\n\n if (this.name === \"email\") {\n shouldRender = authState.step === \"email\";\n } else if (this.name === \"verification\") {\n shouldRender = authState.step === \"verification\" || authState.step === \"magic-code\";\n } else if (this.name === \"reset-password\") {\n shouldRender = authState.step === \"reset-password\";\n } else if (this.name === \"registration\") {\n shouldRender = authState.step === \"registration\" && authState.errors.email === \"account_not_found\";\n } else if (this.name === \"single-login\") {\n shouldRender = authState.step === \"single-login\";\n } else if (this.name === \"missing-fields\") {\n shouldRender = authState.step === \"missing-fields\";\n }\n\n if (!shouldRender) {\n return null;\n }\n\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;;;;;;;MAQa,UAAU,GAAA,MAAA;;;;;AAEb,IAAA,IAAI;IACJ,YAAY,GAAG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,IAAIA,KAAS,CAAC,MAAM,CAAC,KAAK,KAAK,mBAAmB;;AAC7F,aAAA,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,EAAE;AACvC,YAAA,YAAY,GAAGA,KAAS,CAAC,IAAI,KAAK,cAAc;;AAC3C,aAAA,IAAI,IAAI,CAAC,IAAI,KAAK,gBAAgB,EAAE;AACzC,YAAA,YAAY,GAAGA,KAAS,CAAC,IAAI,KAAK,gBAAgB;;QAGpD,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,OAAO,IAAI;;AAGb,QAAA,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,CACH;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-signin-strategy.entry.js","sources":["src/auth/components/signin-strategy/signin-strategy.tsx"],"sourcesContent":["import { Component, Host, h, Prop } from \"@stencil/core\";\nimport { authState } from \"../../store/auth-store\";\n\n@Component({\n tag: \"u-signin-strategy\",\n shadow: false,\n})\nexport class SigninStrategy {\n @Prop() type!: \"password\" | \"magic-code\";\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n render() {\n let shouldRender = false;\n\n if (this.type === \"password\") {\n shouldRender = authState.step === \"verification\" && authState.availableLoginOptions?.password;\n } else if (this.type === \"magic-code\") {\n shouldRender = authState.step === \"magic-code\" && authState.availableLoginOptions?.magic_link;\n }\n\n if (!shouldRender) {\n return null;\n }\n\n return (\n <Host class={this.componentClassName}>\n <slot />\n </Host>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;MAOa,cAAc,GAAA,MAAA;;;;AACjB,IAAA,IAAI;IACuB,kBAAkB,GAAG,EAAE;IAE1D,MAAM,GAAA;QACJ,IAAI,YAAY,GAAG,KAAK;AAExB,QAAA,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;AAC5B,YAAA,YAAY,GAAGA,KAAS,CAAC,IAAI,KAAK,cAAc,IAAIA,KAAS,CAAC,qBAAqB,EAAE,QAAQ;;AACxF,aAAA,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE;AACrC,YAAA,YAAY,GAAGA,KAAS,CAAC,IAAI,KAAK,YAAY,IAAIA,KAAS,CAAC,qBAAqB,EAAE,UAAU;;QAG/F,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,OAAO,IAAI;;QAGb,QACE,EAAC,IAAI,EAAA,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAA,EAClC,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,CACH;;;;;;"}
|