@unidy.io/sdk 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-DSKjcXX_.js +10 -0
- package/dist/cjs/app-globals-DSKjcXX_.js.map +1 -0
- package/dist/cjs/auth-B83pzi0f.js +582 -0
- package/dist/cjs/auth-B83pzi0f.js.map +1 -0
- package/dist/cjs/auth-store-DPHWWmXf.js +183 -0
- package/dist/cjs/auth-store-DPHWWmXf.js.map +1 -0
- package/dist/cjs/component-utils-BpMyeVQo.js +35 -0
- package/dist/cjs/component-utils-BpMyeVQo.js.map +1 -0
- package/dist/{sdk/flash-store-DXuduRA_.js → cjs/flash-store-BuIBuQDx.js} +8 -6
- package/dist/cjs/flash-store-BuIBuQDx.js.map +1 -0
- package/dist/cjs/helpers-BcPlKlBG.js +11 -0
- package/dist/cjs/helpers-BcPlKlBG.js.map +1 -0
- package/dist/cjs/helpers-DJyRa0Qo.js +11 -0
- package/dist/cjs/helpers-DJyRa0Qo.js.map +1 -0
- package/dist/{sdk/i18n-CacW7WuC.js → cjs/i18n-BoDZ8kd2.js} +18 -24
- package/dist/cjs/i18n-BoDZ8kd2.js.map +1 -0
- package/dist/cjs/index-B_N5xKgH.js +12025 -0
- package/dist/cjs/index-B_N5xKgH.js.map +1 -0
- package/dist/{sdk/index-O6h7SI7-.js → cjs/index-DLz3FT7T.js} +10 -8
- package/dist/cjs/index-DLz3FT7T.js.map +1 -0
- package/dist/cjs/index-R2MKLaem.js +5267 -0
- package/dist/cjs/index-R2MKLaem.js.map +1 -0
- package/dist/cjs/index.cjs.js +64 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +14 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-CLSTOCvO.js → cjs/newsletter-helpers-D-V_8kiN.js} +83 -70
- package/dist/cjs/newsletter-helpers-D-V_8kiN.js.map +1 -0
- package/dist/cjs/newsletter-store-BzytX7Qh.js +38 -0
- package/dist/cjs/newsletter-store-BzytX7Qh.js.map +1 -0
- package/dist/cjs/pagination-store-BEiW3MQd.js +16 -0
- package/dist/cjs/pagination-store-BEiW3MQd.js.map +1 -0
- package/dist/{sdk/profile-helpers-mfEp18Tq.js → cjs/profile-helpers-B2h2III_.js} +10 -7
- package/dist/cjs/profile-helpers-B2h2III_.js.map +1 -0
- package/dist/cjs/profile-store-P_BcYkef.js +22 -0
- package/dist/cjs/profile-store-P_BcYkef.js.map +1 -0
- package/dist/cjs/sdk.cjs.js +26 -0
- package/dist/cjs/sdk.cjs.js.map +1 -0
- package/dist/cjs/u-conditional-render.cjs.entry.js +103 -0
- package/dist/cjs/u-conditional-render.entry.cjs.js.map +1 -0
- package/dist/cjs/u-config.cjs.entry.js +87 -0
- package/dist/cjs/u-config.entry.cjs.js.map +1 -0
- package/dist/cjs/u-email-field.cjs.entry.js +77 -0
- package/dist/cjs/u-email-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-error-message.cjs.entry.js +82 -0
- package/dist/cjs/u-error-message.entry.cjs.js.map +1 -0
- package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-field_2.cjs.entry.js +375 -0
- package/dist/cjs/u-flash-message.cjs.entry.js +37 -0
- package/dist/cjs/u-flash-message.entry.cjs.js.map +1 -0
- package/dist/cjs/u-full-profile.cjs.entry.js +37 -0
- package/dist/cjs/u-full-profile.entry.cjs.js.map +1 -0
- package/dist/cjs/u-logout-button.cjs.entry.js +38 -0
- package/dist/cjs/u-logout-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-magic-code-field.cjs.entry.js +91 -0
- package/dist/cjs/u-magic-code-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-missing-field.cjs.entry.js +22 -0
- package/dist/cjs/u-missing-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +46 -0
- package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +63 -0
- package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +36 -0
- package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +106 -0
- package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +49 -0
- package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-root.cjs.entry.js +72 -0
- package/dist/cjs/u-newsletter-root.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +73 -0
- package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-pagination-button.cjs.entry.js +63 -0
- package/dist/cjs/u-pagination-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-pagination-page.cjs.entry.js +44 -0
- package/dist/cjs/u-pagination-page.entry.cjs.js.map +1 -0
- package/dist/cjs/u-passkey.cjs.entry.js +47 -0
- package/dist/cjs/u-passkey.entry.cjs.js.map +1 -0
- package/dist/cjs/u-password-field.cjs.entry.js +104 -0
- package/dist/cjs/u-password-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-profile_2.cjs.entry.js +327 -0
- package/dist/cjs/u-registration-button.cjs.entry.js +48 -0
- package/dist/cjs/u-registration-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-reset-password-button.cjs.entry.js +47 -0
- package/dist/cjs/u-reset-password-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-send-magic-code-button.cjs.entry.js +68 -0
- package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signed-in.cjs.entry.js +25 -0
- package/dist/cjs/u-signed-in.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signin-root.cjs.entry.js +43 -0
- package/dist/cjs/u-signin-root.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signin-step.cjs.entry.js +66 -0
- package/dist/cjs/u-signin-step.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signin-strategy.cjs.entry.js +30 -0
- package/dist/cjs/u-signin-strategy.entry.cjs.js.map +1 -0
- package/dist/cjs/u-social-login-button.cjs.entry.js +100 -0
- package/dist/cjs/u-social-login-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-spinner.cjs.entry.js +18 -0
- package/dist/cjs/u-spinner.entry.cjs.js.map +1 -0
- package/dist/cjs/u-ticketable-list.cjs.entry.js +6087 -0
- package/dist/cjs/u-ticketable-list.entry.cjs.js.map +1 -0
- package/dist/{sdk/unidy-store-DPcuwuXf.js → cjs/unidy-store-7AbWnZ6g.js} +9 -6
- package/dist/cjs/unidy-store-7AbWnZ6g.js.map +1 -0
- package/dist/collection/api/client.js +144 -0
- package/dist/collection/api/client.js.map +1 -0
- package/dist/collection/api/index.js +42 -0
- package/dist/collection/api/index.js.map +1 -0
- package/dist/collection/api/shared.js +18 -0
- package/dist/collection/api/shared.js.map +1 -0
- package/dist/collection/auth/api/auth.js +264 -0
- package/dist/collection/auth/api/auth.js.map +1 -0
- package/dist/collection/auth/auth-helpers.js +297 -0
- package/dist/collection/auth/auth-helpers.js.map +1 -0
- package/dist/collection/auth/auth.js +124 -0
- package/dist/collection/auth/auth.js.map +1 -0
- package/dist/collection/auth/components/helpers.js +5 -0
- package/dist/collection/auth/components/helpers.js.map +1 -0
- package/dist/collection/auth/components/logout-button/logout-button.js +85 -0
- package/dist/collection/auth/components/logout-button/logout-button.js.map +1 -0
- package/dist/collection/auth/components/magic-code-field/magic-code-field.css +1 -0
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js +113 -0
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js.map +1 -0
- package/dist/collection/auth/components/missing-field/missing-field.js +14 -0
- package/dist/collection/auth/components/missing-field/missing-field.js.map +1 -0
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +39 -0
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +1 -0
- package/dist/collection/auth/components/passkey/passkey.js +103 -0
- package/dist/collection/auth/components/passkey/passkey.js.map +1 -0
- package/dist/collection/auth/components/password-field/password-field.js +166 -0
- package/dist/collection/auth/components/password-field/password-field.js.map +1 -0
- package/dist/collection/auth/components/registration/registration-button.js +104 -0
- package/dist/collection/auth/components/registration/registration-button.js.map +1 -0
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +59 -0
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +1 -0
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js +104 -0
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js.map +1 -0
- package/dist/collection/auth/components/signed-in/signed-in.js +59 -0
- package/dist/collection/auth/components/signed-in/signed-in.js.map +1 -0
- package/dist/collection/auth/components/signin-root/signin-root.js +97 -0
- package/dist/collection/auth/components/signin-root/signin-root.js.map +1 -0
- package/dist/collection/auth/components/signin-step/signin-step.js +135 -0
- package/dist/collection/auth/components/signin-step/signin-step.js.map +1 -0
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js +64 -0
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/apple.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/apple.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/discord.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/discord.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/facebook.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/facebook.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/google.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/google.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/linkedin.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/linkedin.js.map +1 -0
- package/dist/collection/auth/components/social-logins/social-login-button.css +1 -0
- package/dist/collection/auth/components/social-logins/social-login-button.js +188 -0
- package/dist/collection/auth/components/social-logins/social-login-button.js.map +1 -0
- package/dist/collection/auth/components/submit-button/auth-submit-button.js +62 -0
- package/dist/collection/auth/components/submit-button/auth-submit-button.js.map +1 -0
- package/dist/{sdk/index-CYip1Wgu.js → collection/auth/error-definitions.js} +2 -19
- package/dist/collection/auth/error-definitions.js.map +1 -0
- package/dist/collection/auth/index.js +14 -0
- package/dist/collection/auth/index.js.map +1 -0
- package/dist/collection/auth/passkey-auth.js +106 -0
- package/dist/collection/auth/passkey-auth.js.map +1 -0
- package/dist/{sdk/auth-store-Mjo3PyJP.js → collection/auth/store/auth-store.js} +7 -12
- package/dist/collection/auth/store/auth-store.js.map +1 -0
- package/dist/collection/collection-manifest.json +46 -0
- package/dist/collection/globalScript.js +18 -0
- package/dist/collection/globalScript.js.map +1 -0
- package/dist/collection/i18n.js +31 -0
- package/dist/collection/i18n.js.map +1 -0
- package/dist/collection/index.js +16 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/locales/de.json +133 -0
- package/dist/collection/locales/en.json +133 -0
- package/dist/collection/locales/fr.json +133 -0
- package/dist/collection/locales/it.json +133 -0
- package/dist/collection/locales/nl_be.json +133 -0
- package/dist/collection/locales/ro.json +133 -0
- package/dist/collection/logger.js +106 -0
- package/dist/collection/logger.js.map +1 -0
- package/dist/collection/newsletter/api/newsletters.js +189 -0
- package/dist/collection/newsletter/api/newsletters.js.map +1 -0
- package/dist/collection/newsletter/components/helpers.js +5 -0
- package/dist/collection/newsletter/components/helpers.js.map +1 -0
- package/dist/collection/newsletter/components/logout-button/logout-button.js +48 -0
- package/dist/collection/newsletter/components/logout-button/logout-button.js.map +1 -0
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +109 -0
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js.map +1 -0
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js +119 -0
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js.map +1 -0
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js +178 -0
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js.map +1 -0
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.css +1 -0
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js +89 -0
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js.map +1 -0
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js +18 -0
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js.map +1 -0
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.css +1 -0
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js +154 -0
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js.map +1 -0
- package/dist/collection/newsletter/index.js +11 -0
- package/dist/collection/newsletter/index.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-C3t2fsCe.js → collection/newsletter/newsletter-helpers.js} +25 -24
- package/dist/collection/newsletter/newsletter-helpers.js.map +1 -0
- package/dist/{sdk/newsletter-store-CvULKmsu.js → collection/newsletter/store/newsletter-store.js} +6 -11
- package/dist/collection/newsletter/store/newsletter-store.js.map +1 -0
- package/dist/collection/profile/api/profile.js +168 -0
- package/dist/collection/profile/api/profile.js.map +1 -0
- package/dist/collection/profile/components/field/field.css +1 -0
- package/dist/collection/profile/components/field/field.js +359 -0
- package/dist/collection/profile/components/field/field.js.map +1 -0
- package/dist/collection/profile/components/full-profile/full-profile.css +1 -0
- package/dist/collection/profile/components/full-profile/full-profile.js +78 -0
- package/dist/collection/profile/components/full-profile/full-profile.js.map +1 -0
- package/dist/collection/profile/components/profile/profile.js +250 -0
- package/dist/collection/profile/components/profile/profile.js.map +1 -0
- package/dist/collection/profile/components/raw-field/raw-field.js +697 -0
- package/dist/collection/profile/components/raw-field/raw-field.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/Input.js +3 -0
- package/dist/collection/profile/components/raw-input-fields/Input.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js +8 -0
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js +8 -0
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/Select.js +11 -0
- package/dist/collection/profile/components/raw-input-fields/Select.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/Textarea.js +3 -0
- package/dist/collection/profile/components/raw-input-fields/Textarea.js.map +1 -0
- package/dist/collection/profile/components/submit-button/profile-submit-button.js +17 -0
- package/dist/collection/profile/components/submit-button/profile-submit-button.js.map +1 -0
- package/dist/collection/profile/index.js +13 -0
- package/dist/collection/profile/index.js.map +1 -0
- package/dist/collection/profile/profile-helpers.js +31 -0
- package/dist/collection/profile/profile-helpers.js.map +1 -0
- package/dist/collection/profile/store/profile-store.js +15 -0
- package/dist/collection/profile/store/profile-store.js.map +1 -0
- package/dist/collection/sdk.css +39 -0
- package/dist/collection/shared/component-utils.js +28 -0
- package/dist/collection/shared/component-utils.js.map +1 -0
- package/dist/collection/shared/components/conditional-render/conditional-render.js +178 -0
- package/dist/collection/shared/components/conditional-render/conditional-render.js.map +1 -0
- package/dist/collection/shared/components/config/config.js +260 -0
- package/dist/collection/shared/components/config/config.js.map +1 -0
- package/dist/collection/shared/components/email-field/email-field.css +1 -0
- package/dist/collection/shared/components/email-field/email-field.js +145 -0
- package/dist/collection/shared/components/email-field/email-field.js.map +1 -0
- package/dist/collection/shared/components/error-message/error-message.js +141 -0
- package/dist/collection/shared/components/error-message/error-message.js.map +1 -0
- package/dist/collection/shared/components/flash-message/close-icon.js +3 -0
- package/dist/collection/shared/components/flash-message/close-icon.js.map +1 -0
- package/dist/collection/shared/components/flash-message/flash-message.css +1 -0
- package/dist/collection/shared/components/flash-message/flash-message.js +79 -0
- package/dist/collection/shared/components/flash-message/flash-message.js.map +1 -0
- package/dist/collection/shared/components/spinner/spinner.css +1 -0
- package/dist/collection/shared/components/spinner/spinner.js +19 -0
- package/dist/collection/shared/components/spinner/spinner.js.map +1 -0
- package/dist/collection/shared/components/submit-button/context.js +10 -0
- package/dist/collection/shared/components/submit-button/context.js.map +1 -0
- package/dist/collection/shared/components/submit-button/submit-button.css +1 -0
- package/dist/collection/shared/components/submit-button/submit-button.js +196 -0
- package/dist/collection/shared/components/submit-button/submit-button.js.map +1 -0
- package/dist/collection/shared/store/flash-store.js +43 -0
- package/dist/collection/shared/store/flash-store.js.map +1 -0
- package/dist/collection/shared/store/unidy-store.js +33 -0
- package/dist/collection/shared/store/unidy-store.js.map +1 -0
- package/dist/collection/ticketable/api/get-with-schema.js +35 -0
- package/dist/collection/ticketable/api/get-with-schema.js.map +1 -0
- package/dist/collection/ticketable/api/schemas.js +12 -0
- package/dist/collection/ticketable/api/schemas.js.map +1 -0
- package/dist/collection/ticketable/api/subscriptions.js +47 -0
- package/dist/collection/ticketable/api/subscriptions.js.map +1 -0
- package/dist/collection/ticketable/api/tickets.js +48 -0
- package/dist/collection/ticketable/api/tickets.js.map +1 -0
- package/dist/collection/ticketable/components/pagination/pagination-button.js +108 -0
- package/dist/collection/ticketable/components/pagination/pagination-button.js.map +1 -0
- package/dist/collection/ticketable/components/pagination/pagination-page.js +69 -0
- package/dist/collection/ticketable/components/pagination/pagination-page.js.map +1 -0
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js +54 -0
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js.map +1 -0
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +498 -0
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +1 -0
- package/dist/collection/ticketable/index.js +13 -0
- package/dist/collection/ticketable/index.js.map +1 -0
- package/dist/collection/ticketable/store/pagination-store.js +9 -0
- package/dist/collection/ticketable/store/pagination-store.js.map +1 -0
- package/dist/{sdk/auth-store-BzXDlgNb.js → components/auth-store.js} +5 -6
- package/dist/components/auth-store.js.map +1 -0
- package/dist/{sdk/auth-Che07PeV.js → components/auth.js} +134 -124
- package/dist/components/auth.js.map +1 -0
- package/dist/components/component-utils.js +32 -0
- package/dist/components/component-utils.js.map +1 -0
- package/dist/components/exports.js +4106 -0
- package/dist/components/exports.js.map +1 -0
- package/dist/{sdk/u-field.entry.js → components/field.js} +57 -14
- package/dist/components/field.js.map +1 -0
- package/dist/{sdk/flash-store-Cgu7WoSN.js → components/flash-store.js} +3 -4
- package/dist/components/flash-store.js.map +1 -0
- package/dist/components/helpers.js +9 -0
- package/dist/components/helpers.js.map +1 -0
- package/dist/components/helpers2.js +9 -0
- package/dist/components/helpers2.js.map +1 -0
- package/dist/{sdk/i18n-CRBOSzNq.js → components/i18n.js} +11 -19
- package/dist/components/i18n.js.map +1 -0
- package/dist/components/index.js +5902 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index2.js +5256 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/{sdk/index-XIuHpSzj.js → components/index3.js} +3 -3
- package/dist/components/index3.js.map +1 -0
- package/dist/components/logger.js +111 -0
- package/dist/components/logger.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-CnufIbIZ.js → components/newsletter-helpers.js} +14 -12
- package/dist/components/newsletter-helpers.js.map +1 -0
- package/dist/{sdk/newsletter-store-CPY2gFnU.js → components/newsletter-store.js} +3 -8
- package/dist/components/newsletter-store.js.map +1 -0
- package/dist/components/pagination-store.js +14 -0
- package/dist/components/pagination-store.js.map +1 -0
- package/dist/{sdk/profile-helpers-Bdz6gmG8.js → components/profile-helpers.js} +4 -4
- package/dist/components/profile-helpers.js.map +1 -0
- package/dist/{sdk/profile-store-Dr1DP9Te.js → components/profile-store.js} +3 -3
- package/dist/components/profile-store.js.map +1 -0
- package/dist/{sdk/u-profile.entry.js → components/profile.js} +51 -18
- package/dist/components/profile.js.map +1 -0
- package/dist/{sdk/u-raw-field.entry.js → components/raw-field.js} +51 -10
- package/dist/components/raw-field.js.map +1 -0
- package/dist/components/spinner.js +35 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/submit-button.js +231 -0
- package/dist/components/submit-button.js.map +1 -0
- package/dist/components/u-conditional-render.js +121 -0
- package/dist/components/u-conditional-render.js.map +1 -0
- package/dist/components/u-config.js +113 -0
- package/dist/components/u-config.js.map +1 -0
- package/dist/components/u-email-field.js +99 -0
- package/dist/components/u-email-field.js.map +1 -0
- package/dist/components/u-error-message.js +105 -0
- package/dist/components/u-error-message.js.map +1 -0
- package/dist/components/u-field.js +9 -0
- package/dist/components/u-field.js.map +1 -0
- package/dist/components/u-flash-message.js +58 -0
- package/dist/components/u-flash-message.js.map +1 -0
- package/dist/components/u-full-profile.js +87 -0
- package/dist/components/u-full-profile.js.map +1 -0
- package/dist/components/u-logout-button.js +53 -0
- package/dist/components/u-logout-button.js.map +1 -0
- package/dist/components/u-magic-code-field.js +106 -0
- package/dist/components/u-magic-code-field.js.map +1 -0
- package/dist/components/u-missing-field.js +57 -0
- package/dist/components/u-missing-field.js.map +1 -0
- package/dist/components/u-missing-fields-submit-button.js +70 -0
- package/dist/components/u-missing-fields-submit-button.js.map +1 -0
- package/dist/components/u-newsletter-checkbox.js +77 -0
- package/dist/components/u-newsletter-checkbox.js.map +1 -0
- package/dist/components/u-newsletter-logout-button.js +51 -0
- package/dist/components/u-newsletter-logout-button.js.map +1 -0
- package/dist/components/u-newsletter-preference-checkbox.js +124 -0
- package/dist/components/u-newsletter-preference-checkbox.js.map +1 -0
- package/dist/components/u-newsletter-resend-doi-button.js +70 -0
- package/dist/components/u-newsletter-resend-doi-button.js.map +1 -0
- package/dist/components/u-newsletter-root.js +90 -0
- package/dist/components/u-newsletter-root.js.map +1 -0
- package/dist/components/u-newsletter-toggle-subscription-button.js +97 -0
- package/dist/components/u-newsletter-toggle-subscription-button.js.map +1 -0
- package/dist/components/u-pagination-button.js +86 -0
- package/dist/components/u-pagination-button.js.map +1 -0
- package/dist/components/u-pagination-page.js +66 -0
- package/dist/components/u-pagination-page.js.map +1 -0
- package/dist/components/u-passkey.js +65 -0
- package/dist/components/u-passkey.js.map +1 -0
- package/dist/components/u-password-field.js +125 -0
- package/dist/components/u-password-field.js.map +1 -0
- package/dist/components/u-profile.js +9 -0
- package/dist/components/u-profile.js.map +1 -0
- package/dist/components/u-raw-field.js +9 -0
- package/dist/components/u-raw-field.js.map +1 -0
- package/dist/components/u-registration-button.js +70 -0
- package/dist/components/u-registration-button.js.map +1 -0
- package/dist/components/u-reset-password-button.js +63 -0
- package/dist/components/u-reset-password-button.js.map +1 -0
- package/dist/components/u-send-magic-code-button.js +85 -0
- package/dist/components/u-send-magic-code-button.js.map +1 -0
- package/dist/components/u-signed-in.js +44 -0
- package/dist/components/u-signed-in.js.map +1 -0
- package/dist/components/u-signin-root.js +63 -0
- package/dist/components/u-signin-root.js.map +1 -0
- package/dist/components/u-signin-step.js +84 -0
- package/dist/components/u-signin-step.js.map +1 -0
- package/dist/components/u-signin-strategy.js +50 -0
- package/dist/components/u-signin-strategy.js.map +1 -0
- package/dist/components/u-social-login-button.js +125 -0
- package/dist/components/u-social-login-button.js.map +1 -0
- package/dist/components/u-spinner.js +9 -0
- package/dist/components/u-spinner.js.map +1 -0
- package/dist/components/u-submit-button.js +9 -0
- package/dist/components/u-submit-button.js.map +1 -0
- package/dist/components/u-ticketable-list.js +6122 -0
- package/dist/components/u-ticketable-list.js.map +1 -0
- package/dist/{sdk/unidy-store-BwZym11Y.js → components/unidy-store.js} +3 -4
- package/dist/components/unidy-store.js.map +1 -0
- package/dist/esm/app-globals-CPU9ZcqZ.js +8 -0
- package/dist/esm/app-globals-CPU9ZcqZ.js.map +1 -0
- package/dist/{sdk/auth-B95hXtvh.js → esm/auth-B0RIcDM-.js} +132 -123
- package/dist/esm/auth-B0RIcDM-.js.map +1 -0
- package/dist/{sdk/auth-store-CapiC8gJ.js → esm/auth-store-BGMYm_jK.js} +5 -6
- package/dist/esm/auth-store-BGMYm_jK.js.map +1 -0
- package/dist/esm/component-utils-D1lzXl_Z.js.map +1 -0
- package/dist/{sdk/flash-store-DNcSEn2p.js → esm/flash-store-CEvWSG0c.js} +3 -4
- package/dist/{sdk/flash-store-DXuduRA_.js.map → esm/flash-store-CEvWSG0c.js.map} +1 -1
- package/dist/esm/helpers-BqFCd65h.js.map +1 -0
- package/dist/esm/helpers-DUHc_Cx7.js.map +1 -0
- package/dist/{sdk/i18n-BCI_ARJL.js → esm/i18n-CLdWzy5J.js} +10 -19
- package/dist/esm/i18n-CLdWzy5J.js.map +1 -0
- package/dist/{sdk/index-BnBstyfp.js → esm/index-Bjp1XO-f.js} +3 -3
- package/dist/{sdk/index-XIuHpSzj.js.map → esm/index-Bjp1XO-f.js.map} +1 -1
- package/dist/esm/index-Ci3aTmzp.js +12007 -0
- package/dist/esm/index-Ci3aTmzp.js.map +1 -0
- package/dist/esm/index-DSDkaHWI.js +5254 -0
- package/dist/esm/index-DSDkaHWI.js.map +1 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +12 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-DEXEBD0F.js → esm/newsletter-helpers-CONtbKYi.js} +14 -12
- package/dist/esm/newsletter-helpers-CONtbKYi.js.map +1 -0
- package/dist/{sdk/newsletter-store-CqD-GcDC.js → esm/newsletter-store-DBL1A203.js} +3 -8
- package/dist/{sdk/newsletter-store-CPY2gFnU.js.map → esm/newsletter-store-DBL1A203.js.map} +1 -1
- package/dist/esm/pagination-store-DzdJOp-n.js +14 -0
- package/dist/esm/pagination-store-DzdJOp-n.js.map +1 -0
- package/dist/{sdk/profile-helpers-Bs3aj0CO.js → esm/profile-helpers-CglNd6Nw.js} +4 -4
- package/dist/{sdk/profile-helpers-Bdz6gmG8.js.map → esm/profile-helpers-CglNd6Nw.js.map} +1 -1
- package/dist/{sdk/profile-store-BZKApsQm.js → esm/profile-store-RmZB2PTc.js} +3 -3
- package/dist/{sdk/profile-store-Dr1DP9Te.js.map → esm/profile-store-RmZB2PTc.js.map} +1 -1
- package/dist/esm/sdk.js +22 -0
- package/dist/esm/sdk.js.map +1 -0
- package/dist/{sdk → esm}/u-conditional-render.entry.js +12 -12
- package/dist/esm/u-conditional-render.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-config.entry.js +15 -16
- package/dist/esm/u-config.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-email-field.entry.js +7 -7
- package/dist/esm/u-email-field.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-error-message.entry.js +7 -7
- package/dist/esm/u-error-message.entry.js.map +1 -0
- package/dist/esm/u-field.u-raw-field.entry.js.map +1 -0
- package/dist/esm/u-field_2.entry.js +372 -0
- package/dist/{sdk → esm}/u-flash-message.entry.js +4 -4
- package/dist/esm/u-flash-message.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-full-profile.entry.js +7 -7
- package/dist/esm/u-full-profile.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-logout-button.entry.js +12 -12
- package/dist/esm/u-logout-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-magic-code-field.entry.js +10 -10
- package/dist/esm/u-magic-code-field.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-missing-field.entry.js +5 -5
- package/dist/esm/u-missing-field.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-missing-fields-submit-button.entry.js +9 -9
- package/dist/esm/u-missing-fields-submit-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-checkbox.entry.js +13 -13
- package/dist/esm/u-newsletter-checkbox.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-logout-button.entry.js +12 -12
- package/dist/esm/u-newsletter-logout-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-preference-checkbox.entry.js +13 -13
- package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-resend-doi-button.entry.js +12 -12
- package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-root.entry.js +13 -13
- package/dist/esm/u-newsletter-root.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-toggle-subscription-button.entry.js +13 -13
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-pagination-button.entry.js +2 -2
- package/dist/esm/u-pagination-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-pagination-page.entry.js +2 -2
- package/dist/esm/u-pagination-page.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-passkey.entry.js +10 -10
- package/dist/esm/u-passkey.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-password-field.entry.js +6 -6
- package/dist/esm/u-password-field.entry.js.map +1 -0
- package/dist/esm/u-profile.u-submit-button.entry.js.map +1 -0
- package/dist/esm/u-profile_2.entry.js +324 -0
- package/dist/{sdk → esm}/u-registration-button.entry.js +6 -6
- package/dist/esm/u-registration-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-reset-password-button.entry.js +10 -10
- package/dist/esm/u-reset-password-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-send-magic-code-button.entry.js +10 -10
- package/dist/esm/u-send-magic-code-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signed-in.entry.js +5 -5
- package/dist/esm/u-signed-in.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signin-root.entry.js +7 -7
- package/dist/esm/u-signin-root.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signin-step.entry.js +10 -11
- package/dist/esm/u-signin-step.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signin-strategy.entry.js +5 -5
- package/dist/esm/u-signin-strategy.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-social-login-button.entry.js +7 -7
- package/dist/esm/u-social-login-button.entry.js.map +1 -0
- package/dist/esm/u-spinner.entry.js +16 -0
- package/dist/esm/u-spinner.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-ticketable-list.entry.js +84 -143
- package/dist/esm/u-ticketable-list.entry.js.map +1 -0
- package/dist/{sdk/unidy-store-CtifvCkV.js → esm/unidy-store-BldTAtO0.js} +3 -4
- package/dist/{sdk/unidy-store-DPcuwuXf.js.map → esm/unidy-store-BldTAtO0.js.map} +1 -1
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/sdk/auth-BopPjv7G.js.map +1 -0
- package/dist/sdk/auth-C0vldOq6.js.map +1 -0
- package/dist/sdk/auth-store-DQaam_Qh.js.map +1 -0
- package/dist/sdk/auth-store-sOmplc4z.js.map +1 -0
- package/dist/sdk/{i18n-CRBOSzNq.js.map → i18n-B6rRU-m3.js.map} +1 -1
- package/dist/sdk/{i18n-BCI_ARJL.js.map → i18n-CZii1E-s.js.map} +1 -1
- package/dist/sdk/{index-CKre5JEG.js.map → index-B1aDcaWd.js.map} +1 -1
- package/dist/sdk/index-Df-7P3r0.js.map +1 -0
- package/dist/sdk/{index-CYip1Wgu.js.map → index-Eu7hg2ii.js.map} +1 -1
- package/dist/sdk/{index-CoYUNBeF.js.map → index-Iulyfmzq.js.map} +1 -1
- package/dist/sdk/index.esm.js +2 -22
- 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/sdk/newsletter-helpers-8ByV38YW.js.map +1 -0
- package/dist/sdk/newsletter-helpers-B-Md6T9k.js.map +1 -0
- package/dist/sdk/p-08ff2de2.entry.js +2 -0
- package/dist/sdk/p-08ff2de2.entry.js.map +1 -0
- package/dist/sdk/p-1ea49938.entry.js +2 -0
- package/dist/sdk/p-1ea49938.entry.js.map +1 -0
- package/dist/sdk/p-2a65bcbb.entry.js +2 -0
- package/dist/sdk/p-2a65bcbb.entry.js.map +1 -0
- package/dist/sdk/p-2af8b45f.entry.js +2 -0
- package/dist/sdk/p-2af8b45f.entry.js.map +1 -0
- package/dist/sdk/p-3411c743.entry.js +2 -0
- package/dist/sdk/p-3411c743.entry.js.map +1 -0
- package/dist/sdk/p-467c7304.entry.js +2 -0
- package/dist/sdk/p-467c7304.entry.js.map +1 -0
- package/dist/sdk/p-56abb377.entry.js +2 -0
- package/dist/sdk/p-56abb377.entry.js.map +1 -0
- package/dist/sdk/p-5703102b.entry.js +2 -0
- package/dist/sdk/p-5703102b.entry.js.map +1 -0
- package/dist/sdk/p-593c6dde.entry.js +2 -0
- package/dist/sdk/p-593c6dde.entry.js.map +1 -0
- package/dist/sdk/p-5b627aea.entry.js +2 -0
- package/dist/sdk/p-5b627aea.entry.js.map +1 -0
- package/dist/sdk/p-5babee6b.entry.js +2 -0
- package/dist/sdk/p-5babee6b.entry.js.map +1 -0
- package/dist/sdk/p-5cc20a8b.entry.js +2 -0
- package/dist/sdk/p-5cc20a8b.entry.js.map +1 -0
- package/dist/sdk/p-628ccd68.entry.js +2 -0
- package/dist/sdk/p-628ccd68.entry.js.map +1 -0
- package/dist/sdk/p-675eb13d.entry.js +2 -0
- package/dist/sdk/p-675eb13d.entry.js.map +1 -0
- package/dist/sdk/p-6893d167.entry.js +2 -0
- package/dist/sdk/p-6893d167.entry.js.map +1 -0
- package/dist/sdk/p-6a642433.entry.js +2 -0
- package/dist/sdk/p-6a642433.entry.js.map +1 -0
- package/dist/sdk/p-73c2ec89.entry.js +2 -0
- package/dist/sdk/p-73c2ec89.entry.js.map +1 -0
- package/dist/sdk/p-7a0cefff.entry.js +2 -0
- package/dist/sdk/p-7a0cefff.entry.js.map +1 -0
- package/dist/sdk/p-91bb8b59.entry.js +2 -0
- package/dist/sdk/p-91bb8b59.entry.js.map +1 -0
- package/dist/sdk/p-9f59909b.entry.js +2 -0
- package/dist/sdk/p-9f59909b.entry.js.map +1 -0
- package/dist/sdk/p-BZ1kW_eK.js +2 -0
- package/dist/sdk/p-BZ1kW_eK.js.map +1 -0
- package/dist/sdk/p-BlAULXyw.js +2 -0
- package/dist/sdk/p-BlAULXyw.js.map +1 -0
- package/dist/sdk/p-BlOjABPD.js +2 -0
- package/dist/sdk/p-BlOjABPD.js.map +1 -0
- package/dist/sdk/p-BqFCd65h.js +2 -0
- package/dist/sdk/p-BqFCd65h.js.map +1 -0
- package/dist/sdk/p-C0feI0p8.js +2 -0
- package/dist/sdk/p-C0feI0p8.js.map +1 -0
- package/dist/sdk/p-C3fhudPT.js +2 -0
- package/dist/sdk/p-C3fhudPT.js.map +1 -0
- package/dist/sdk/p-CFiZLMAA.js +2 -0
- package/dist/sdk/p-CFiZLMAA.js.map +1 -0
- package/dist/sdk/p-CPPYdoIv.js +2 -0
- package/dist/sdk/p-CPPYdoIv.js.map +1 -0
- package/dist/sdk/p-CbRhHGU5.js +2 -0
- package/dist/sdk/p-CbRhHGU5.js.map +1 -0
- package/dist/sdk/p-Ce8zGAi1.js +2 -0
- package/dist/sdk/p-Ce8zGAi1.js.map +1 -0
- package/dist/sdk/p-Ci3aTmzp.js +3 -0
- package/dist/sdk/p-Ci3aTmzp.js.map +1 -0
- package/dist/sdk/p-D1lzXl_Z.js +2 -0
- package/dist/sdk/p-D1lzXl_Z.js.map +1 -0
- package/dist/sdk/p-DA84OuuU.js +2 -0
- package/dist/sdk/p-DA84OuuU.js.map +1 -0
- package/dist/sdk/p-DUHc_Cx7.js +2 -0
- package/dist/sdk/p-DUHc_Cx7.js.map +1 -0
- package/dist/sdk/p-DYtgart8.js +2 -0
- package/dist/sdk/p-DYtgart8.js.map +1 -0
- package/dist/sdk/p-DdUvQelg.js +2 -0
- package/dist/sdk/p-DdUvQelg.js.map +1 -0
- package/dist/sdk/p-S3-2d2Qd.js +2 -0
- package/dist/sdk/p-S3-2d2Qd.js.map +1 -0
- package/dist/sdk/p-a4b7ffd8.entry.js +2 -0
- package/dist/sdk/p-a4b7ffd8.entry.js.map +1 -0
- package/dist/sdk/p-a5db968f.entry.js +2 -0
- package/dist/sdk/p-a5db968f.entry.js.map +1 -0
- package/dist/sdk/p-a6393d19.entry.js +2 -0
- package/dist/sdk/p-a6393d19.entry.js.map +1 -0
- package/dist/sdk/p-c31dbbb4.entry.js +2 -0
- package/dist/sdk/p-c31dbbb4.entry.js.map +1 -0
- package/dist/sdk/p-c5bffd90.entry.js +2 -0
- package/dist/sdk/p-c5bffd90.entry.js.map +1 -0
- package/dist/sdk/p-da363474.entry.js +2 -0
- package/dist/sdk/p-da363474.entry.js.map +1 -0
- package/dist/sdk/p-e3611b71.entry.js +2 -0
- package/dist/sdk/p-e3611b71.entry.js.map +1 -0
- package/dist/sdk/p-e3f28800.entry.js +2 -0
- package/dist/sdk/p-e3f28800.entry.js.map +1 -0
- package/dist/sdk/p-effaf86b.entry.js +2 -0
- package/dist/sdk/p-effaf86b.entry.js.map +1 -0
- package/dist/sdk/p-f0598e42.entry.js +2 -0
- package/dist/sdk/p-f0598e42.entry.js.map +1 -0
- package/dist/sdk/p-f369a996.entry.js +2 -0
- package/dist/sdk/p-f369a996.entry.js.map +1 -0
- package/dist/sdk/p-ffac964c.entry.js +2 -0
- package/dist/sdk/p-ffac964c.entry.js.map +1 -0
- package/dist/sdk/{profile-helpers-Bs3aj0CO.js.map → profile-helpers-BDjk573F.js.map} +1 -1
- package/dist/sdk/{profile-helpers-mfEp18Tq.js.map → profile-helpers-b8Koj20a.js.map} +1 -1
- package/dist/sdk/sdk.esm.js +2 -48
- package/dist/sdk/sdk.esm.js.map +1 -1
- package/dist/sdk/u-config.entry.esm.js.map +1 -1
- package/dist/sdk/u-error-message.entry.esm.js.map +1 -1
- package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-full-profile.entry.esm.js.map +1 -1
- package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-password-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
- package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
- package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
- package/dist/types/auth/auth-helpers.d.ts +24 -25
- package/dist/types/auth/auth.d.ts +1 -1
- package/dist/types/auth/store/auth-store.d.ts +4 -4
- package/dist/types/components.d.ts +72 -0
- package/dist/types/profile/api/profile.d.ts +1 -1
- package/dist/types/profile/components/profile/profile.d.ts +15 -0
- package/dist/types/shared/components/config/config.d.ts +1 -1
- package/dist/types/shared/components/error-message/error-message.d.ts +1 -1
- package/dist/types/ticketable/components/ticketable-list/ticketable-list.d.ts +12 -2
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +1 -1
- package/dist/sdk/auth-B95hXtvh.js.map +0 -1
- package/dist/sdk/auth-BiFlsRm-.js +0 -6821
- package/dist/sdk/auth-BiFlsRm-.js.map +0 -1
- package/dist/sdk/auth-Che07PeV.js.map +0 -1
- package/dist/sdk/auth-store-BzXDlgNb.js.map +0 -1
- package/dist/sdk/auth-store-CapiC8gJ.js.map +0 -1
- package/dist/sdk/auth-store-Mjo3PyJP.js.map +0 -1
- package/dist/sdk/auth-wavto6GW.js +0 -6822
- package/dist/sdk/auth-wavto6GW.js.map +0 -1
- package/dist/sdk/auth-y_LsX4Zn.js +0 -6822
- package/dist/sdk/auth-y_LsX4Zn.js.map +0 -1
- package/dist/sdk/i18n-CacW7WuC.js.map +0 -1
- package/dist/sdk/index-BDX4bHnk.js +0 -15349
- package/dist/sdk/index-BDX4bHnk.js.map +0 -1
- package/dist/sdk/index-BqL27K_R.js +0 -49640
- package/dist/sdk/index-C5jZjlU8.js +0 -49640
- package/dist/sdk/index-CKre5JEG.js +0 -15349
- package/dist/sdk/index-CoYUNBeF.js +0 -43
- package/dist/sdk/index-CvfZ-LfN.js +0 -43
- package/dist/sdk/index-CvfZ-LfN.js.map +0 -1
- package/dist/sdk/index-Cz3idqu9.js +0 -43
- package/dist/sdk/index-Cz3idqu9.js.map +0 -1
- package/dist/sdk/index-DJUE7Ceb.js +0 -6254
- package/dist/sdk/index-DJUE7Ceb.js.map +0 -1
- package/dist/sdk/index-DOyWRKSD.js +0 -43
- package/dist/sdk/index-DOyWRKSD.js.map +0 -1
- package/dist/sdk/index-gEcJztft.js +0 -15349
- package/dist/sdk/index-gEcJztft.js.map +0 -1
- package/dist/sdk/index-mfIOXLHL.js +0 -49640
- package/dist/sdk/index-mfIOXLHL.js.map +0 -1
- package/dist/sdk/newsletter-helpers-C3t2fsCe.js.map +0 -1
- package/dist/sdk/newsletter-helpers-CLSTOCvO.js.map +0 -1
- package/dist/sdk/newsletter-helpers-CnufIbIZ.js.map +0 -1
- package/dist/sdk/newsletter-helpers-DEXEBD0F.js.map +0 -1
- package/dist/sdk/newsletter-helpers-MgFueAV9.js +0 -276
- package/dist/sdk/newsletter-helpers-MgFueAV9.js.map +0 -1
- package/dist/sdk/profile-store-DD6sq42i.js +0 -18
- package/dist/sdk/u-field.entry.esm.js.map +0 -1
- package/dist/sdk/u-profile.entry.esm.js.map +0 -1
- package/dist/sdk/u-raw-field.entry.esm.js.map +0 -1
- package/dist/sdk/u-spinner.entry.js +0 -16
- package/dist/sdk/u-submit-button.entry.esm.js.map +0 -1
- package/dist/sdk/u-submit-button.entry.js +0 -204
- /package/dist/{sdk → esm}/component-utils-D1lzXl_Z.js +0 -0
- /package/dist/{sdk → esm}/helpers-BqFCd65h.js +0 -0
- /package/dist/{sdk → esm}/helpers-DUHc_Cx7.js +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { t } from './i18n.js';
|
|
3
|
+
import { F as Flash } from './flash-store.js';
|
|
4
|
+
import { a as isSubscribed, i as isConfirmed, r as resendDoi } from './newsletter-helpers.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
6
|
+
|
|
7
|
+
const resendDoiButtonCss = "/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:flex{display:flex}.u\\:items-center{align-items:center}.u\\:justify-center{justify-content:center}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
8
|
+
|
|
9
|
+
const NewsletterResendDoiButton = /*@__PURE__*/ proxyCustomElement(class NewsletterResendDoiButton extends HTMLElement {
|
|
10
|
+
constructor(registerHost) {
|
|
11
|
+
super();
|
|
12
|
+
if (registerHost !== false) {
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
internalName;
|
|
17
|
+
componentClassName = "";
|
|
18
|
+
isResending = false;
|
|
19
|
+
get shouldShow() {
|
|
20
|
+
return isSubscribed(this.internalName) && !isConfirmed(this.internalName);
|
|
21
|
+
}
|
|
22
|
+
handleClick = async () => {
|
|
23
|
+
this.isResending = true;
|
|
24
|
+
const success = await resendDoi(this.internalName);
|
|
25
|
+
this.isResending = false;
|
|
26
|
+
if (success) {
|
|
27
|
+
Flash.success.addMessage(t("newsletter.success.doi_sent"));
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
Flash.error.addMessage(t("newsletter.errors.resend_doi_failed"));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
render() {
|
|
34
|
+
if (!this.shouldShow) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return (h("button", { type: "button", onClick: this.handleClick, disabled: this.isResending, "aria-busy": this.isResending, "aria-live": "polite", class: `${this.componentClassName} u:flex u:items-center u:justify-center` }, this.isResending ? h("u-spinner", null) : t("newsletter.buttons.resend_doi")));
|
|
38
|
+
}
|
|
39
|
+
static get style() { return resendDoiButtonCss; }
|
|
40
|
+
}, [768, "u-newsletter-resend-doi-button", {
|
|
41
|
+
"internalName": [1, "internal-name"],
|
|
42
|
+
"componentClassName": [1, "class-name"],
|
|
43
|
+
"isResending": [32]
|
|
44
|
+
}]);
|
|
45
|
+
function defineCustomElement$1() {
|
|
46
|
+
if (typeof customElements === "undefined") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const components = ["u-newsletter-resend-doi-button", "u-spinner"];
|
|
50
|
+
components.forEach(tagName => { switch (tagName) {
|
|
51
|
+
case "u-newsletter-resend-doi-button":
|
|
52
|
+
if (!customElements.get(tagName)) {
|
|
53
|
+
customElements.define(tagName, NewsletterResendDoiButton);
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
case "u-spinner":
|
|
57
|
+
if (!customElements.get(tagName)) {
|
|
58
|
+
defineCustomElement$2();
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
} });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const UNewsletterResendDoiButton = NewsletterResendDoiButton;
|
|
65
|
+
const defineCustomElement = defineCustomElement$1;
|
|
66
|
+
|
|
67
|
+
export { UNewsletterResendDoiButton, defineCustomElement };
|
|
68
|
+
//# sourceMappingURL=u-newsletter-resend-doi-button.js.map
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=u-newsletter-resend-doi-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-newsletter-resend-doi-button.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,ypNAAypN;;MCUvqN,yBAAyB,iBAAAA,kBAAA,CAAA,MAAA,yBAAA,SAAA,WAAA,CAAA;;;;;;;AAC5B,IAAA,YAAY;IACe,kBAAkB,GAAG,EAAE;IAEjD,WAAW,GAAG,KAAK;AAE5B,IAAA,IAAY,UAAU,GAAA;AACpB,QAAA,OAAOC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","NewsletterHelpers.isSubscribed","NewsletterHelpers.isConfirmed","NewsletterHelpers.resendDoi"],"sources":["src/newsletter/components/resend-doi-button/resend-doi-button.css?tag=u-newsletter-resend-doi-button","src/newsletter/components/resend-doi-button/resend-doi-button.tsx"],"sourcesContent":["","import { Component, h, Prop, State } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { Flash } from \"../../../shared/store/flash-store\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\n\n@Component({\n tag: \"u-newsletter-resend-doi-button\",\n styleUrl: \"resend-doi-button.css\",\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"],"version":3}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { proxyCustomElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { A as Auth } from './auth.js';
|
|
3
|
+
import { t } from './i18n.js';
|
|
4
|
+
import { U as UnidyComponent, l as logger } from './logger.js';
|
|
5
|
+
import { c as clearUrlParam } from './component-utils.js';
|
|
6
|
+
import { F as Flash } from './flash-store.js';
|
|
7
|
+
import { w as waitForConfig } from './unidy-store.js';
|
|
8
|
+
import { f as fetchSubscriptions, s as sendLoginEmail, c as createSubscriptions } from './newsletter-helpers.js';
|
|
9
|
+
import { n as newsletterStore, p as persist } from './newsletter-store.js';
|
|
10
|
+
|
|
11
|
+
const NewsletterRoot = /*@__PURE__*/ proxyCustomElement(class NewsletterRoot extends UnidyComponent {
|
|
12
|
+
constructor(registerHost) {
|
|
13
|
+
super();
|
|
14
|
+
if (registerHost !== false) {
|
|
15
|
+
this.__registerHost();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
get el() { return this; }
|
|
19
|
+
componentClassName = "";
|
|
20
|
+
getErrorText(errorIdentifier) {
|
|
21
|
+
return t(`newsletter.errors.${errorIdentifier}`) || t("errors.unknown", { defaultValue: "An unknown error occurred" });
|
|
22
|
+
}
|
|
23
|
+
async componentWillLoad() {
|
|
24
|
+
const newsletterError = clearUrlParam("newsletter_error");
|
|
25
|
+
const preferenceToken = clearUrlParam("preference_token");
|
|
26
|
+
const email = clearUrlParam("email");
|
|
27
|
+
if (newsletterError) {
|
|
28
|
+
Flash.error.addMessage(this.getErrorText(newsletterError));
|
|
29
|
+
}
|
|
30
|
+
if (preferenceToken && email) {
|
|
31
|
+
newsletterStore.state.preferenceToken = preferenceToken;
|
|
32
|
+
newsletterStore.state.email = email;
|
|
33
|
+
persist("preferenceToken");
|
|
34
|
+
persist("email");
|
|
35
|
+
}
|
|
36
|
+
const authInstance = await Auth.getInstance();
|
|
37
|
+
const isAuthenticated = await authInstance.isAuthenticated();
|
|
38
|
+
newsletterStore.state.isAuthenticated = isAuthenticated;
|
|
39
|
+
if (isAuthenticated) {
|
|
40
|
+
const userData = await authInstance.userData();
|
|
41
|
+
if (userData) {
|
|
42
|
+
newsletterStore.state.email = userData.email;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
await waitForConfig();
|
|
46
|
+
await fetchSubscriptions();
|
|
47
|
+
}
|
|
48
|
+
async submit(forType) {
|
|
49
|
+
const { email, checkedNewsletters } = newsletterStore.state;
|
|
50
|
+
if (forType === "login") {
|
|
51
|
+
if (!email) {
|
|
52
|
+
Flash.error.addMessage(t("newsletter.errors.email_required"));
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
return await sendLoginEmail(email);
|
|
56
|
+
}
|
|
57
|
+
if (Object.keys(checkedNewsletters).length === 0) {
|
|
58
|
+
logger.error("No newsletters selected: please select at least one newsletter");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
await createSubscriptions({ email });
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return (h(Host, { key: '10358670a779f8ee38e85f26aae1addbe400e519', class: this.componentClassName }, h("slot", { key: '702944e986d7784a583c2245dc7a03f423ce271e' })));
|
|
65
|
+
}
|
|
66
|
+
}, [772, "u-newsletter-root", {
|
|
67
|
+
"componentClassName": [1, "class-name"],
|
|
68
|
+
"submit": [64]
|
|
69
|
+
}]);
|
|
70
|
+
function defineCustomElement$1() {
|
|
71
|
+
if (typeof customElements === "undefined") {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const components = ["u-newsletter-root"];
|
|
75
|
+
components.forEach(tagName => { switch (tagName) {
|
|
76
|
+
case "u-newsletter-root":
|
|
77
|
+
if (!customElements.get(tagName)) {
|
|
78
|
+
customElements.define(tagName, NewsletterRoot);
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
} });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const UNewsletterRoot = NewsletterRoot;
|
|
85
|
+
const defineCustomElement = defineCustomElement$1;
|
|
86
|
+
|
|
87
|
+
export { UNewsletterRoot, defineCustomElement };
|
|
88
|
+
//# sourceMappingURL=u-newsletter-root.js.map
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=u-newsletter-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-newsletter-root.js","mappings":";;;;;;;;;;MAea,cAAe,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAQ,cAAc,CAAA;;;;;;;;IAEb,kBAAkB,GAAG,EAAE;AAE1D,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,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,eAA4C,CAAC,CAAC;;AAGzF,QAAA,IAAI,eAAe,IAAI,KAAK,EAAE;AAC5B,YAAA,eAAe,CAAC,KAAK,CAAC,eAAe,GAAG,eAAe;AACvD,YAAA,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK;YAEnC,OAAO,CAAC,iBAAiB,CAAC;YAC1B,OAAO,CAAC,OAAO,CAAC;;AAGlB,QAAA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE;AAC7C,QAAA,MAAM,eAAe,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE;AAC5D,QAAA,eAAe,CAAC,KAAK,CAAC,eAAe,GAAG,eAAe;QAEvD,IAAI,eAAe,EAAE;AACnB,YAAA,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,QAAQ,EAAE;YAE9C,IAAI,QAAQ,EAAE;gBACZ,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK;;;QAIhD,MAAM,aAAa,EAAE;AACrB,QAAA,MAAMC,kBAAoC,EAAE;;IAI9C,MAAM,MAAM,CAAC,OAA6B,EAAA;QACxC,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,eAAe,CAAC,KAAK;AAE3D,QAAA,IAAI,OAAO,KAAK,OAAO,EAAE;YACvB,IAAI,CAAC,KAAK,EAAE;gBACV,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC;gBAC7D;;AAEF,YAAA,OAAO,MAAMC,cAAgC,CAAC,KAAK,CAAC;;QAGtD,IAAI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AAChD,YAAA,MAAM,CAAC,KAAK,CAAC,gEAAgE,CAAC;YAC9E;;QAGF,MAAMC,mBAAqC,CAAC,EAAE,KAAK,EAAE,CAAC;;IAGxD,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;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","NewsletterHelpers.fetchSubscriptions","NewsletterHelpers.sendLoginEmail","NewsletterHelpers.createSubscriptions"],"sources":["src/newsletter/components/newsletter-root/newsletter-root.tsx"],"sourcesContent":["import { Component, Element, 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 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 (forType === \"login\") {\n if (!email) {\n Flash.error.addMessage(t(\"newsletter.errors.email_required\"));\n return;\n }\n return await NewsletterHelpers.sendLoginEmail(email);\n }\n\n if (Object.keys(checkedNewsletters).length === 0) {\n logger.error(\"No newsletters selected: please select at least one newsletter\");\n return;\n }\n\n await NewsletterHelpers.createSubscriptions({ email });\n }\n\n render() {\n return (\n <Host class={this.componentClassName}>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { t } from './i18n.js';
|
|
3
|
+
import { F as Flash } from './flash-store.js';
|
|
4
|
+
import { a as isSubscribed, b as subscribeToNewsletter, d as deleteSubscription } from './newsletter-helpers.js';
|
|
5
|
+
import { n as newsletterStore } from './newsletter-store.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './spinner.js';
|
|
7
|
+
|
|
8
|
+
const toggleSubscriptionButtonCss = "/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:flex{display:flex}.u\\:items-center{align-items:center}.u\\:justify-center{justify-content:center}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
9
|
+
|
|
10
|
+
const ToggleNewsletterSubscriptionButton = /*@__PURE__*/ proxyCustomElement(class ToggleNewsletterSubscriptionButton extends HTMLElement {
|
|
11
|
+
constructor(registerHost) {
|
|
12
|
+
super();
|
|
13
|
+
if (registerHost !== false) {
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
internalName;
|
|
18
|
+
componentClassName = "";
|
|
19
|
+
subscribeClassName = "";
|
|
20
|
+
unsubscribeClassName = "";
|
|
21
|
+
loading = false;
|
|
22
|
+
get isSubscribed() {
|
|
23
|
+
return isSubscribed(this.internalName);
|
|
24
|
+
}
|
|
25
|
+
handleClick = async () => {
|
|
26
|
+
if (this.loading)
|
|
27
|
+
return;
|
|
28
|
+
if (this.isSubscribed) {
|
|
29
|
+
await this.handleUnsubscribe();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
await this.handleSubscribe();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
handleSubscribe = async () => {
|
|
36
|
+
const { email } = newsletterStore.state;
|
|
37
|
+
if (!email) {
|
|
38
|
+
Flash.error.addMessage(t("newsletter.errors.email_required"));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
this.loading = true;
|
|
42
|
+
const success = await subscribeToNewsletter(this.internalName, email);
|
|
43
|
+
this.loading = false;
|
|
44
|
+
if (success) {
|
|
45
|
+
Flash.success.addMessage(t("newsletter.success.subscribe"));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
handleUnsubscribe = async () => {
|
|
49
|
+
this.loading = true;
|
|
50
|
+
const success = await deleteSubscription(this.internalName);
|
|
51
|
+
this.loading = false;
|
|
52
|
+
if (success) {
|
|
53
|
+
Flash.info.addMessage(t("newsletter.success.unsubscribe"));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
Flash.error.addMessage(t("newsletter.errors.unsubscribe_failed"));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
render() {
|
|
60
|
+
const isSubscribed = this.isSubscribed;
|
|
61
|
+
const stateClassName = isSubscribed ? this.unsubscribeClassName : this.subscribeClassName;
|
|
62
|
+
return (h("button", { key: '2f858a8d382dd0a2b3e7c20aca3fbf8970f4be4e', 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")));
|
|
63
|
+
}
|
|
64
|
+
static get style() { return toggleSubscriptionButtonCss; }
|
|
65
|
+
}, [768, "u-newsletter-toggle-subscription-button", {
|
|
66
|
+
"internalName": [1, "internal-name"],
|
|
67
|
+
"componentClassName": [1, "class-name"],
|
|
68
|
+
"subscribeClassName": [1, "subscribe-class-name"],
|
|
69
|
+
"unsubscribeClassName": [1, "unsubscribe-class-name"],
|
|
70
|
+
"loading": [32]
|
|
71
|
+
}]);
|
|
72
|
+
function defineCustomElement$1() {
|
|
73
|
+
if (typeof customElements === "undefined") {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const components = ["u-newsletter-toggle-subscription-button", "u-spinner"];
|
|
77
|
+
components.forEach(tagName => { switch (tagName) {
|
|
78
|
+
case "u-newsletter-toggle-subscription-button":
|
|
79
|
+
if (!customElements.get(tagName)) {
|
|
80
|
+
customElements.define(tagName, ToggleNewsletterSubscriptionButton);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
case "u-spinner":
|
|
84
|
+
if (!customElements.get(tagName)) {
|
|
85
|
+
defineCustomElement$2();
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
} });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const UNewsletterToggleSubscriptionButton = ToggleNewsletterSubscriptionButton;
|
|
92
|
+
const defineCustomElement = defineCustomElement$1;
|
|
93
|
+
|
|
94
|
+
export { UNewsletterToggleSubscriptionButton, defineCustomElement };
|
|
95
|
+
//# sourceMappingURL=u-newsletter-toggle-subscription-button.js.map
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=u-newsletter-toggle-subscription-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-newsletter-toggle-subscription-button.js","mappings":";;;;;;;AAAA,MAAM,2BAA2B,GAAG,ypNAAypN;;MCWhrN,kCAAkC,iBAAAA,kBAAA,CAAA,MAAA,kCAAA,SAAA,WAAA,CAAA;;;;;;;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,OAAOC,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,eAAe,GAAG,YAAW;AACnC,QAAA,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,KAAK;QAEvC,IAAI,CAAC,KAAK,EAAE;YACV,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC;YAC7D;;AAGF,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,MAAM,OAAO,GAAG,MAAMC,qBAAuC,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC;AACvF,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;QAEpB,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC;;AAE/D,KAAC;IAEO,iBAAiB,GAAG,YAAW;AACrC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;QACnB,MAAM,OAAO,GAAG,MAAMC,kBAAoC,CAAC,IAAI,CAAC,YAAY,CAAC;AAC7E,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;QAEpB,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC;;aACrD;YACL,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC;;AAErE,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY;AACtC,QAAA,MAAM,cAAc,GAAG,YAAY,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,kBAAkB;QAEzF,QACE,CACE,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,OAAO,EACX,WAAA,EAAA,IAAI,CAAC,OAAO,gBACX,YAAY,GAAG,CAAC,CAAC,gCAAgC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","NewsletterHelpers.isSubscribed","NewsletterHelpers.subscribeToNewsletter","NewsletterHelpers.deleteSubscription"],"sources":["src/newsletter/components/toggle-subscription-button/toggle-subscription-button.css?tag=u-newsletter-toggle-subscription-button","src/newsletter/components/toggle-subscription-button/toggle-subscription-button.tsx"],"sourcesContent":["","import { Component, h, Prop, State } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { Flash } from \"../../../shared/store/flash-store\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\n\n@Component({\n tag: \"u-newsletter-toggle-subscription-button\",\n styleUrl: \"toggle-subscription-button.css\",\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"],"version":3}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { proxyCustomElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { U as UnidyComponent } from './logger.js';
|
|
3
|
+
|
|
4
|
+
const PaginationButton = /*@__PURE__*/ proxyCustomElement(class PaginationButton extends UnidyComponent {
|
|
5
|
+
constructor(registerHost) {
|
|
6
|
+
super();
|
|
7
|
+
if (registerHost !== false) {
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
get element() { return this; }
|
|
12
|
+
direction = "next";
|
|
13
|
+
customClass;
|
|
14
|
+
paginationMeta = null;
|
|
15
|
+
store = null;
|
|
16
|
+
unsubscribe = null;
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
this.store = this.element.closest("u-ticketable-list")?.store;
|
|
19
|
+
if (!this.store) {
|
|
20
|
+
this.logger.warn("TicketableList component not found");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
// Get initial state
|
|
24
|
+
this.paginationMeta = this.store.state.paginationMeta;
|
|
25
|
+
// Subscribe to store changes - watch for changes to paginationMeta
|
|
26
|
+
this.unsubscribe = this.store.onChange("paginationMeta", (value) => {
|
|
27
|
+
this.paginationMeta = value;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
this.unsubscribe?.();
|
|
32
|
+
}
|
|
33
|
+
handleClick = () => {
|
|
34
|
+
const parent = this.element.closest("u-ticketable-list");
|
|
35
|
+
if (!parent || !this.paginationMeta) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const isPrev = this.direction === "prev";
|
|
39
|
+
let newPage = null;
|
|
40
|
+
if (isPrev && this.paginationMeta.prev !== null) {
|
|
41
|
+
newPage = this.paginationMeta.prev;
|
|
42
|
+
}
|
|
43
|
+
else if (!isPrev && this.paginationMeta.next !== null) {
|
|
44
|
+
newPage = this.paginationMeta.next;
|
|
45
|
+
}
|
|
46
|
+
if (newPage !== null) {
|
|
47
|
+
parent.setAttribute("page", String(newPage));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
render() {
|
|
51
|
+
if (!this.store) {
|
|
52
|
+
this.logger.warn("TicketableList component not found");
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const isPrev = this.direction === "prev";
|
|
56
|
+
const icon = isPrev ? "←" : "→";
|
|
57
|
+
// Determine disabled state based on pagination meta
|
|
58
|
+
const disabled = !this.paginationMeta || (isPrev ? this.paginationMeta.prev === null : this.paginationMeta.next === null);
|
|
59
|
+
return (h(Host, null, h("button", { type: "button", onClick: this.handleClick, disabled: disabled, "aria-label": isPrev ? "Previous page" : "Next page", class: this.customClass }, h("slot", { name: "icon" }, h("span", { "aria-hidden": "true" }, icon)))));
|
|
60
|
+
}
|
|
61
|
+
}, [772, "u-pagination-button", {
|
|
62
|
+
"direction": [1],
|
|
63
|
+
"customClass": [1, "custom-class"],
|
|
64
|
+
"paginationMeta": [32]
|
|
65
|
+
}]);
|
|
66
|
+
function defineCustomElement$1() {
|
|
67
|
+
if (typeof customElements === "undefined") {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const components = ["u-pagination-button"];
|
|
71
|
+
components.forEach(tagName => { switch (tagName) {
|
|
72
|
+
case "u-pagination-button":
|
|
73
|
+
if (!customElements.get(tagName)) {
|
|
74
|
+
customElements.define(tagName, PaginationButton);
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
} });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const UPaginationButton = PaginationButton;
|
|
81
|
+
const defineCustomElement = defineCustomElement$1;
|
|
82
|
+
|
|
83
|
+
export { UPaginationButton, defineCustomElement };
|
|
84
|
+
//# sourceMappingURL=u-pagination-button.js.map
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=u-pagination-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-pagination-button.js","mappings":";;;MAMa,gBAAiB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAQ,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,WAAW,IAAI;;IAGd,WAAW,GAAG,MAAK;QACzB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;QACxD,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YACnC;;AAGF,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM;QACxC,IAAI,OAAO,GAAkB,IAAI;QAEjC,IAAI,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,EAAE;AAC/C,YAAA,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI;;aAC7B,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,EAAE;AACvD,YAAA,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI;;AAGpC,QAAA,IAAI,OAAO,KAAK,IAAI,EAAE;YACpB,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;;AAEhD,KAAC;IAED,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,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM;QACxC,MAAM,IAAI,GAAG,MAAM,GAAG,GAAG,GAAG,GAAG;;AAG/B,QAAA,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,cAAc,KAAK,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,CAAC;AAEzH,QAAA,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,WAAW,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;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"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"],"version":3}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { proxyCustomElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { U as UnidyComponent } from './logger.js';
|
|
3
|
+
|
|
4
|
+
const PaginationPage = /*@__PURE__*/ proxyCustomElement(class PaginationPage extends UnidyComponent {
|
|
5
|
+
constructor(registerHost) {
|
|
6
|
+
super();
|
|
7
|
+
if (registerHost !== false) {
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
get element() { return this; }
|
|
12
|
+
customClass;
|
|
13
|
+
paginationMeta = null;
|
|
14
|
+
store = null;
|
|
15
|
+
unsubscribe = null;
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
this.store = this.element.closest("u-ticketable-list")?.store;
|
|
18
|
+
if (!this.store) {
|
|
19
|
+
this.logger.warn("TicketableList component not found");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
// Get initial state
|
|
23
|
+
this.paginationMeta = this.store.state.paginationMeta;
|
|
24
|
+
// Subscribe to store changes - watch for changes to paginationMeta
|
|
25
|
+
this.unsubscribe = this.store.onChange("paginationMeta", (value) => {
|
|
26
|
+
this.paginationMeta = value;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
this.unsubscribe?.();
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
if (!this.store) {
|
|
34
|
+
this.logger.warn("TicketableList component not found");
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
if (!this.paginationMeta) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return (h(Host, null, h("span", { class: this.customClass }, "Page ", this.paginationMeta.page, " of ", this.paginationMeta.last)));
|
|
41
|
+
}
|
|
42
|
+
}, [768, "u-pagination-page", {
|
|
43
|
+
"customClass": [1, "custom-class"],
|
|
44
|
+
"paginationMeta": [32]
|
|
45
|
+
}]);
|
|
46
|
+
function defineCustomElement$1() {
|
|
47
|
+
if (typeof customElements === "undefined") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const components = ["u-pagination-page"];
|
|
51
|
+
components.forEach(tagName => { switch (tagName) {
|
|
52
|
+
case "u-pagination-page":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
customElements.define(tagName, PaginationPage);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const UPaginationPage = PaginationPage;
|
|
61
|
+
const defineCustomElement = defineCustomElement$1;
|
|
62
|
+
|
|
63
|
+
export { UPaginationPage, defineCustomElement };
|
|
64
|
+
//# sourceMappingURL=u-pagination-page.js.map
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=u-pagination-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-pagination-page.js","mappings":";;;MAMa,cAAe,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAQ,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;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"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"],"version":3}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { t } from './i18n.js';
|
|
3
|
+
import { s as state } from './auth-store.js';
|
|
4
|
+
import { A as Auth } from './auth.js';
|
|
5
|
+
|
|
6
|
+
const Passkey = /*@__PURE__*/ proxyCustomElement(class Passkey extends HTMLElement {
|
|
7
|
+
constructor(registerHost) {
|
|
8
|
+
super();
|
|
9
|
+
if (registerHost !== false) {
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
disabled = false;
|
|
14
|
+
componentClassName = "";
|
|
15
|
+
ariaDescribedBy = "";
|
|
16
|
+
isSupported = false;
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
// Check if WebAuthn is supported
|
|
19
|
+
this.isSupported = typeof window !== "undefined" && !!window.PublicKeyCredential;
|
|
20
|
+
}
|
|
21
|
+
handleClick = async () => {
|
|
22
|
+
if (this.disabled || state.loading || !this.isSupported)
|
|
23
|
+
return;
|
|
24
|
+
const authInstance = await Auth.getInstance();
|
|
25
|
+
await authInstance.helpers.authenticateWithPasskey();
|
|
26
|
+
};
|
|
27
|
+
render() {
|
|
28
|
+
if (!state.availableLoginOptions?.passkey) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
if (!this.isSupported) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const isDisabled = this.disabled || state.loading;
|
|
35
|
+
const text = t("auth.passkey.button_text", { defaultValue: "Sign in with Passkey" });
|
|
36
|
+
const loadingText = t("auth.passkey.loading_text", { defaultValue: "Authenticating..." });
|
|
37
|
+
return (h(Host, null, h("button", { type: "button", disabled: isDisabled, onClick: this.handleClick, class: this.componentClassName, "aria-live": "polite", "aria-describedby": this.ariaDescribedBy || undefined }, state.loading ? loadingText : text)));
|
|
38
|
+
}
|
|
39
|
+
}, [768, "u-passkey", {
|
|
40
|
+
"disabled": [4],
|
|
41
|
+
"componentClassName": [1, "class-name"],
|
|
42
|
+
"ariaDescribedBy": [1, "aria-described-by"],
|
|
43
|
+
"isSupported": [32]
|
|
44
|
+
}]);
|
|
45
|
+
function defineCustomElement$1() {
|
|
46
|
+
if (typeof customElements === "undefined") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const components = ["u-passkey"];
|
|
50
|
+
components.forEach(tagName => { switch (tagName) {
|
|
51
|
+
case "u-passkey":
|
|
52
|
+
if (!customElements.get(tagName)) {
|
|
53
|
+
customElements.define(tagName, Passkey);
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
} });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const UPasskey = Passkey;
|
|
60
|
+
const defineCustomElement = defineCustomElement$1;
|
|
61
|
+
|
|
62
|
+
export { UPasskey, defineCustomElement };
|
|
63
|
+
//# sourceMappingURL=u-passkey.js.map
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=u-passkey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-passkey.js","mappings":";;;;;MASa,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAA,WAAA,CAAA;;;;;;;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,IAAIC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","authState"],"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"],"version":3}
|