@unidy.io/sdk 1.1.8 → 1.1.10
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-Pb3mNuRv.js +10 -0
- package/dist/cjs/app-globals-Pb3mNuRv.js.map +1 -0
- package/dist/cjs/auth-ChsE2RD7.js +614 -0
- package/dist/cjs/auth-ChsE2RD7.js.map +1 -0
- package/dist/cjs/auth-store-BO38Txmj.js +187 -0
- package/dist/cjs/auth-store-BO38Txmj.js.map +1 -0
- package/dist/cjs/component-utils-bu3SY4dE.js +42 -0
- package/dist/cjs/component-utils-bu3SY4dE.js.map +1 -0
- package/dist/cjs/flash-store-D5vGuIFc.js +50 -0
- package/dist/cjs/flash-store-D5vGuIFc.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/cjs/i18n-B2T1e9Mf.js +3072 -0
- package/dist/cjs/i18n-B2T1e9Mf.js.map +1 -0
- package/dist/cjs/index-BzhKFIXk.js +14706 -0
- package/dist/cjs/index-BzhKFIXk.js.map +1 -0
- package/dist/cjs/index-DmDGhWTM.js +6338 -0
- package/dist/cjs/index-DmDGhWTM.js.map +1 -0
- package/dist/cjs/index-DxENvy7x.js +283 -0
- package/dist/cjs/index-DxENvy7x.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/cjs/newsletter-helpers-B5P7q8Xk.js +289 -0
- package/dist/cjs/newsletter-helpers-B5P7q8Xk.js.map +1 -0
- package/dist/cjs/newsletter-store-f5zhJljn.js +38 -0
- package/dist/cjs/newsletter-store-f5zhJljn.js.map +1 -0
- package/dist/cjs/pagination-store-DjGYEIqm.js +16 -0
- package/dist/cjs/pagination-store-DjGYEIqm.js.map +1 -0
- package/dist/cjs/profile-helpers-BcLjojeG.js +39 -0
- package/dist/cjs/profile-helpers-BcLjojeG.js.map +1 -0
- package/dist/cjs/profile-store-BWJ9qAcg.js +22 -0
- package/dist/cjs/profile-store-BWJ9qAcg.js.map +1 -0
- package/dist/cjs/sdk.cjs.js +53 -0
- package/dist/cjs/sdk.cjs.js.map +1 -0
- package/dist/cjs/u-conditional-render.cjs.entry.js +102 -0
- package/dist/cjs/u-conditional-render.entry.cjs.js.map +1 -0
- package/dist/cjs/u-config.cjs.entry.js +91 -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 +371 -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.u-signed-in.entry.cjs.js.map +1 -0
- package/dist/cjs/u-logout-button_2.cjs.entry.js +62 -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 +77 -0
- package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +41 -0
- package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +120 -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 +106 -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 +329 -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 +56 -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-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 +6097 -0
- package/dist/cjs/u-ticketable-list.entry.cjs.js.map +1 -0
- package/dist/cjs/unidy-store-zhdhlK0a.js +41 -0
- package/dist/cjs/unidy-store-zhdhlK0a.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 +274 -0
- package/dist/collection/auth/api/auth.js.map +1 -0
- package/dist/collection/auth/auth-helpers.js +314 -0
- package/dist/collection/auth/auth-helpers.js.map +1 -0
- package/dist/collection/auth/auth.js +139 -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 +94 -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 +168 -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 +68 -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/collection/auth/error-definitions.js +26 -0
- package/dist/collection/auth/error-definitions.js.map +1 -0
- package/dist/collection/auth/index.js +13 -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/collection/auth/store/auth-store.js +178 -0
- 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 +53 -0
- package/dist/collection/newsletter/components/logout-button/logout-button.js.map +1 -0
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +165 -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 +234 -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/collection/newsletter/newsletter-helpers.js +277 -0
- package/dist/collection/newsletter/newsletter-helpers.js.map +1 -0
- package/dist/collection/newsletter/store/newsletter-store.js +34 -0
- 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 +355 -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 +12 -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 +35 -0
- package/dist/collection/shared/component-utils.js.map +1 -0
- package/dist/collection/shared/components/conditional-render/conditional-render.js +177 -0
- package/dist/collection/shared/components/conditional-render/conditional-render.js.map +1 -0
- package/dist/collection/shared/components/config/config.js +284 -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 +198 -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 +505 -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/components/auth-store.js +182 -0
- package/dist/components/auth-store.js.map +1 -0
- package/dist/components/auth.js +613 -0
- package/dist/components/auth.js.map +1 -0
- package/dist/components/component-utils.js +39 -0
- package/dist/components/component-utils.js.map +1 -0
- package/dist/components/exports.js +4262 -0
- package/dist/components/exports.js.map +1 -0
- package/dist/components/field.js +134 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/flash-store.js +47 -0
- 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/components/i18n.js +3070 -0
- package/dist/components/i18n.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +5929 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index2.js +6327 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/index3.js +281 -0
- 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/components/newsletter-helpers.js +278 -0
- package/dist/components/newsletter-helpers.js.map +1 -0
- package/dist/components/newsletter-store.js +34 -0
- 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/components/profile-helpers.js +36 -0
- package/dist/components/profile-helpers.js.map +1 -0
- package/dist/components/profile-store.js +18 -0
- package/dist/components/profile-store.js.map +1 -0
- package/dist/components/profile.js +151 -0
- package/dist/components/profile.js.map +1 -0
- package/dist/components/raw-field.js +318 -0
- 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 +233 -0
- package/dist/components/submit-button.js.map +1 -0
- package/dist/components/u-conditional-render.d.ts +11 -0
- package/dist/components/u-conditional-render.js +120 -0
- package/dist/components/u-conditional-render.js.map +1 -0
- package/dist/components/u-config.d.ts +11 -0
- package/dist/components/u-config.js +118 -0
- package/dist/components/u-config.js.map +1 -0
- package/dist/components/u-email-field.d.ts +11 -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.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-field.js +9 -0
- package/dist/components/u-field.js.map +1 -0
- package/dist/components/u-flash-message.d.ts +11 -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.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-logout-button.js +61 -0
- package/dist/components/u-logout-button.js.map +1 -0
- package/dist/components/u-magic-code-field.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-missing-field.js +51 -0
- package/dist/components/u-missing-field.js.map +1 -0
- package/dist/components/u-missing-fields-submit-button.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-newsletter-checkbox.js +93 -0
- package/dist/components/u-newsletter-checkbox.js.map +1 -0
- package/dist/components/u-newsletter-logout-button.d.ts +11 -0
- package/dist/components/u-newsletter-logout-button.js +56 -0
- package/dist/components/u-newsletter-logout-button.js.map +1 -0
- package/dist/components/u-newsletter-preference-checkbox.d.ts +11 -0
- package/dist/components/u-newsletter-preference-checkbox.js +140 -0
- package/dist/components/u-newsletter-preference-checkbox.js.map +1 -0
- package/dist/components/u-newsletter-resend-doi-button.d.ts +11 -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.d.ts +11 -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.d.ts +11 -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.d.ts +11 -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.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-passkey.js +65 -0
- package/dist/components/u-passkey.js.map +1 -0
- package/dist/components/u-password-field.d.ts +11 -0
- package/dist/components/u-password-field.js +127 -0
- package/dist/components/u-password-field.js.map +1 -0
- package/dist/components/u-profile.d.ts +11 -0
- package/dist/components/u-profile.js +9 -0
- package/dist/components/u-profile.js.map +1 -0
- package/dist/components/u-raw-field.d.ts +11 -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.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-reset-password-button.js +72 -0
- package/dist/components/u-reset-password-button.js.map +1 -0
- package/dist/components/u-send-magic-code-button.d.ts +11 -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.d.ts +11 -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.d.ts +11 -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.d.ts +11 -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.d.ts +11 -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.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-spinner.js +9 -0
- package/dist/components/u-spinner.js.map +1 -0
- package/dist/components/u-submit-button.d.ts +11 -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.d.ts +11 -0
- package/dist/components/u-ticketable-list.js +6130 -0
- package/dist/components/u-ticketable-list.js.map +1 -0
- package/dist/components/unidy-store.js +37 -0
- package/dist/components/unidy-store.js.map +1 -0
- package/dist/esm/app-globals-BHWOrMsm.js +8 -0
- package/dist/esm/app-globals-BHWOrMsm.js.map +1 -0
- package/dist/esm/auth-CAHM6e4m.js +612 -0
- package/dist/esm/auth-CAHM6e4m.js.map +1 -0
- package/dist/esm/auth-store-ItTnEMlF.js +182 -0
- package/dist/esm/auth-store-ItTnEMlF.js.map +1 -0
- package/dist/esm/component-utils-BGq0leDV.js +39 -0
- package/dist/esm/component-utils-BGq0leDV.js.map +1 -0
- package/dist/esm/flash-store-CMXH65i_.js +47 -0
- package/dist/esm/flash-store-CMXH65i_.js.map +1 -0
- package/dist/esm/helpers-BqFCd65h.js +9 -0
- package/dist/esm/helpers-BqFCd65h.js.map +1 -0
- package/dist/esm/helpers-DUHc_Cx7.js +9 -0
- package/dist/esm/helpers-DUHc_Cx7.js.map +1 -0
- package/dist/esm/i18n-OKf8uE5j.js +3069 -0
- package/dist/esm/i18n-OKf8uE5j.js.map +1 -0
- package/dist/esm/index-COQ27Nb6.js +14684 -0
- package/dist/esm/index-COQ27Nb6.js.map +1 -0
- package/dist/esm/index-DVkRTYPC.js +281 -0
- package/dist/esm/index-DVkRTYPC.js.map +1 -0
- package/dist/esm/index-Du3hUdhU.js +6325 -0
- package/dist/esm/index-Du3hUdhU.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/esm/newsletter-helpers-ChXON0f4.js +278 -0
- package/dist/esm/newsletter-helpers-ChXON0f4.js.map +1 -0
- package/dist/esm/newsletter-store-CIsyE51r.js +34 -0
- package/dist/esm/newsletter-store-CIsyE51r.js.map +1 -0
- package/dist/esm/pagination-store-B9lk_lqK.js +14 -0
- package/dist/esm/pagination-store-B9lk_lqK.js.map +1 -0
- package/dist/esm/profile-helpers-Beduxnin.js +36 -0
- package/dist/esm/profile-helpers-Beduxnin.js.map +1 -0
- package/dist/esm/profile-store-CsSDT9Tb.js +18 -0
- package/dist/esm/profile-store-CsSDT9Tb.js.map +1 -0
- package/dist/esm/sdk.js +49 -0
- package/dist/esm/sdk.js.map +1 -0
- package/dist/esm/u-conditional-render.entry.js +100 -0
- package/dist/esm/u-conditional-render.entry.js.map +1 -0
- package/dist/esm/u-config.entry.js +89 -0
- package/dist/esm/u-config.entry.js.map +1 -0
- package/dist/esm/u-email-field.entry.js +75 -0
- package/dist/esm/u-email-field.entry.js.map +1 -0
- package/dist/esm/u-error-message.entry.js +80 -0
- 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 +368 -0
- package/dist/esm/u-flash-message.entry.js +35 -0
- package/dist/esm/u-flash-message.entry.js.map +1 -0
- package/dist/esm/u-full-profile.entry.js +35 -0
- package/dist/esm/u-full-profile.entry.js.map +1 -0
- package/dist/esm/u-logout-button.u-signed-in.entry.js.map +1 -0
- package/dist/esm/u-logout-button_2.entry.js +59 -0
- package/dist/esm/u-magic-code-field.entry.js +89 -0
- package/dist/esm/u-magic-code-field.entry.js.map +1 -0
- package/dist/esm/u-missing-field.entry.js +20 -0
- package/dist/esm/u-missing-field.entry.js.map +1 -0
- package/dist/esm/u-missing-fields-submit-button.entry.js +44 -0
- package/dist/esm/u-missing-fields-submit-button.entry.js.map +1 -0
- package/dist/esm/u-newsletter-checkbox.entry.js +75 -0
- package/dist/esm/u-newsletter-checkbox.entry.js.map +1 -0
- package/dist/esm/u-newsletter-logout-button.entry.js +39 -0
- package/dist/esm/u-newsletter-logout-button.entry.js.map +1 -0
- package/dist/esm/u-newsletter-preference-checkbox.entry.js +118 -0
- package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +1 -0
- package/dist/esm/u-newsletter-resend-doi-button.entry.js +47 -0
- package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +1 -0
- package/dist/esm/u-newsletter-root.entry.js +70 -0
- package/dist/esm/u-newsletter-root.entry.js.map +1 -0
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js +71 -0
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +1 -0
- package/dist/esm/u-pagination-button.entry.js +61 -0
- package/dist/esm/u-pagination-button.entry.js.map +1 -0
- package/dist/esm/u-pagination-page.entry.js +42 -0
- package/dist/esm/u-pagination-page.entry.js.map +1 -0
- package/dist/esm/u-passkey.entry.js +45 -0
- package/dist/esm/u-passkey.entry.js.map +1 -0
- package/dist/esm/u-password-field.entry.js +104 -0
- 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 +326 -0
- package/dist/esm/u-registration-button.entry.js +46 -0
- package/dist/esm/u-registration-button.entry.js.map +1 -0
- package/dist/esm/u-reset-password-button.entry.js +54 -0
- package/dist/esm/u-reset-password-button.entry.js.map +1 -0
- package/dist/esm/u-send-magic-code-button.entry.js +66 -0
- package/dist/esm/u-send-magic-code-button.entry.js.map +1 -0
- package/dist/esm/u-signin-root.entry.js +41 -0
- package/dist/esm/u-signin-root.entry.js.map +1 -0
- package/dist/esm/u-signin-step.entry.js +64 -0
- package/dist/esm/u-signin-step.entry.js.map +1 -0
- package/dist/esm/u-signin-strategy.entry.js +28 -0
- package/dist/esm/u-signin-strategy.entry.js.map +1 -0
- package/dist/esm/u-social-login-button.entry.js +98 -0
- 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/esm/u-ticketable-list.entry.js +6095 -0
- package/dist/esm/u-ticketable-list.entry.js.map +1 -0
- package/dist/esm/unidy-store-CAcMVdD8.js +37 -0
- package/dist/esm/unidy-store-CAcMVdD8.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/sdk/index.esm.js +2 -0
- package/dist/sdk/index.esm.js.map +1 -0
- package/dist/sdk/loader.esm.js.map +1 -0
- package/dist/sdk/locales/de.json +133 -0
- package/dist/sdk/locales/en.json +133 -0
- package/dist/sdk/locales/fr.json +133 -0
- package/dist/sdk/locales/it.json +133 -0
- package/dist/sdk/locales/nl_be.json +133 -0
- package/dist/sdk/locales/ro.json +133 -0
- package/dist/sdk/p-1bad3fd0.entry.js +2 -0
- package/dist/sdk/p-1bad3fd0.entry.js.map +1 -0
- package/dist/sdk/p-1d6982cd.entry.js +2 -0
- package/dist/sdk/p-1d6982cd.entry.js.map +1 -0
- package/dist/sdk/p-23d8e922.entry.js +2 -0
- package/dist/sdk/p-23d8e922.entry.js.map +1 -0
- package/dist/sdk/p-2855d3bb.entry.js +2 -0
- package/dist/sdk/p-2855d3bb.entry.js.map +1 -0
- package/dist/sdk/p-288f37c3.entry.js +2 -0
- package/dist/sdk/p-288f37c3.entry.js.map +1 -0
- package/dist/sdk/p-32842e98.entry.js +2 -0
- package/dist/sdk/p-32842e98.entry.js.map +1 -0
- package/dist/sdk/p-34af7470.entry.js +2 -0
- package/dist/sdk/p-34af7470.entry.js.map +1 -0
- package/dist/sdk/p-39126514.entry.js +2 -0
- package/dist/sdk/p-39126514.entry.js.map +1 -0
- package/dist/sdk/p-438f62e5.entry.js +2 -0
- package/dist/sdk/p-438f62e5.entry.js.map +1 -0
- package/dist/sdk/p-46013b2f.entry.js +2 -0
- package/dist/sdk/p-46013b2f.entry.js.map +1 -0
- package/dist/sdk/p-46cdb255.entry.js +2 -0
- package/dist/sdk/p-46cdb255.entry.js.map +1 -0
- package/dist/sdk/p-4d9bde6e.entry.js +2 -0
- package/dist/sdk/p-4d9bde6e.entry.js.map +1 -0
- package/dist/sdk/p-5c40c6ea.entry.js +2 -0
- package/dist/sdk/p-5c40c6ea.entry.js.map +1 -0
- package/dist/sdk/p-5c8b31bd.entry.js +2 -0
- package/dist/sdk/p-5c8b31bd.entry.js.map +1 -0
- package/dist/sdk/p-69172b22.entry.js +2 -0
- package/dist/sdk/p-69172b22.entry.js.map +1 -0
- package/dist/sdk/p-7381aca7.entry.js +2 -0
- package/dist/sdk/p-7381aca7.entry.js.map +1 -0
- package/dist/sdk/p-BGq0leDV.js +2 -0
- package/dist/sdk/p-BGq0leDV.js.map +1 -0
- package/dist/sdk/p-BR6L248H.js +2 -0
- package/dist/sdk/p-BR6L248H.js.map +1 -0
- package/dist/sdk/p-BhrvnKAS.js +2 -0
- package/dist/sdk/p-BhrvnKAS.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-CMw6v6sC.js +2 -0
- package/dist/sdk/p-CMw6v6sC.js.map +1 -0
- package/dist/sdk/p-COQ27Nb6.js +14 -0
- package/dist/sdk/p-COQ27Nb6.js.map +1 -0
- package/dist/sdk/p-CSLU6kes.js +2 -0
- package/dist/sdk/p-CSLU6kes.js.map +1 -0
- package/dist/sdk/p-Cai8JwlG.js +2 -0
- package/dist/sdk/p-Cai8JwlG.js.map +1 -0
- package/dist/sdk/p-CpJghKnM.js +2 -0
- package/dist/sdk/p-CpJghKnM.js.map +1 -0
- package/dist/sdk/p-DAn4FkxC.js +2 -0
- package/dist/sdk/p-DAn4FkxC.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-FFRhPCmc.js +2 -0
- package/dist/sdk/p-FFRhPCmc.js.map +1 -0
- package/dist/sdk/p-Jrp0G45B.js +2 -0
- package/dist/sdk/p-Jrp0G45B.js.map +1 -0
- package/dist/sdk/p-MA26cw6g.js +2 -0
- package/dist/sdk/p-MA26cw6g.js.map +1 -0
- package/dist/sdk/p-P0eZf5rH.js +2 -0
- package/dist/sdk/p-P0eZf5rH.js.map +1 -0
- package/dist/sdk/p-PSIHL0wP.js +2 -0
- package/dist/sdk/p-PSIHL0wP.js.map +1 -0
- package/dist/sdk/p-a341c7f6.entry.js +2 -0
- package/dist/sdk/p-a341c7f6.entry.js.map +1 -0
- package/dist/sdk/p-a38cd448.entry.js +2 -0
- package/dist/sdk/p-a38cd448.entry.js.map +1 -0
- package/dist/sdk/p-a45ef398.entry.js +2 -0
- package/dist/sdk/p-a45ef398.entry.js.map +1 -0
- package/dist/sdk/p-b5a6ad01.entry.js +2 -0
- package/dist/sdk/p-b5a6ad01.entry.js.map +1 -0
- package/dist/sdk/p-b93bf91d.entry.js +2 -0
- package/dist/sdk/p-b93bf91d.entry.js.map +1 -0
- package/dist/sdk/p-baf5dcb7.entry.js +2 -0
- package/dist/sdk/p-baf5dcb7.entry.js.map +1 -0
- package/dist/sdk/p-c07a43e2.entry.js +2 -0
- package/dist/sdk/p-c07a43e2.entry.js.map +1 -0
- package/dist/sdk/p-c98ad60d.entry.js +2 -0
- package/dist/sdk/p-c98ad60d.entry.js.map +1 -0
- package/dist/sdk/p-d0c0fb6b.entry.js +2 -0
- package/dist/sdk/p-d0c0fb6b.entry.js.map +1 -0
- package/dist/sdk/p-d47aaf26.entry.js +2 -0
- package/dist/sdk/p-d47aaf26.entry.js.map +1 -0
- package/dist/sdk/p-e5ef30ef.entry.js +2 -0
- package/dist/sdk/p-e5ef30ef.entry.js.map +1 -0
- package/dist/sdk/p-eb348798.entry.js +2 -0
- package/dist/sdk/p-eb348798.entry.js.map +1 -0
- package/dist/sdk/p-f82f500d.entry.js +2 -0
- package/dist/sdk/p-f82f500d.entry.js.map +1 -0
- package/dist/sdk/p-f88ed6e8.entry.js +2 -0
- package/dist/sdk/p-f88ed6e8.entry.js.map +1 -0
- package/dist/sdk/p-f9affafe.entry.js +2 -0
- package/dist/sdk/p-f9affafe.entry.js.map +1 -0
- package/dist/sdk/p-jyF1XwDG.js +2 -0
- package/dist/sdk/p-jyF1XwDG.js.map +1 -0
- package/dist/sdk/sdk.css +39 -0
- package/dist/sdk/sdk.esm.js +2 -0
- package/dist/sdk/sdk.esm.js.map +1 -0
- package/dist/sdk/u-conditional-render.entry.esm.js.map +1 -0
- package/dist/sdk/u-config.entry.esm.js.map +1 -0
- package/dist/sdk/u-email-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-error-message.entry.esm.js.map +1 -0
- package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-flash-message.entry.esm.js.map +1 -0
- package/dist/sdk/u-full-profile.entry.esm.js.map +1 -0
- package/dist/sdk/u-logout-button.u-signed-in.entry.esm.js.map +1 -0
- package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-missing-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-missing-fields-submit-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-newsletter-checkbox.entry.esm.js.map +1 -0
- package/dist/sdk/u-newsletter-logout-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-newsletter-preference-checkbox.entry.esm.js.map +1 -0
- package/dist/sdk/u-newsletter-resend-doi-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-newsletter-root.entry.esm.js.map +1 -0
- package/dist/sdk/u-newsletter-toggle-subscription-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-pagination-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-pagination-page.entry.esm.js.map +1 -0
- package/dist/sdk/u-passkey.entry.esm.js.map +1 -0
- package/dist/sdk/u-password-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-registration-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-reset-password-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-send-magic-code-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-signin-root.entry.esm.js.map +1 -0
- package/dist/sdk/u-signin-step.entry.esm.js.map +1 -0
- package/dist/sdk/u-signin-strategy.entry.esm.js.map +1 -0
- package/dist/sdk/u-social-login-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-spinner.entry.esm.js.map +1 -0
- package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -0
- package/dist/types/api/client.d.ts +32 -0
- package/dist/types/api/index.d.ts +22 -0
- package/dist/types/api/shared.d.ts +20 -0
- package/dist/types/auth/api/auth.d.ts +302 -0
- package/dist/types/auth/auth-helpers.d.ts +376 -0
- package/dist/types/auth/auth.d.ts +62 -0
- package/dist/types/auth/components/helpers.d.ts +1 -0
- package/dist/types/auth/components/logout-button/logout-button.d.ts +11 -0
- package/dist/types/auth/components/magic-code-field/magic-code-field.d.ts +10 -0
- package/dist/types/auth/components/missing-field/missing-field.d.ts +4 -0
- package/dist/types/auth/components/missing-fields-submit-button/missing-fields-submit-button.d.ts +5 -0
- package/dist/types/auth/components/passkey/passkey.d.ts +9 -0
- package/dist/types/auth/components/password-field/password-field.d.ts +15 -0
- package/dist/types/auth/components/registration/registration-button.d.ts +11 -0
- package/dist/types/auth/components/reset-pass-button/reset-pass-button.d.ts +7 -0
- package/dist/types/auth/components/send-magic-code-button/send-magic-code-button.d.ts +11 -0
- package/dist/types/auth/components/signed-in/signed-in.d.ts +5 -0
- package/dist/types/auth/components/signin-root/signin-root.d.ts +14 -0
- package/dist/types/auth/components/signin-step/signin-step.d.ts +8 -0
- package/dist/types/auth/components/signin-strategy/signin-strategy.d.ts +5 -0
- package/dist/types/auth/components/social-logins/logos/apple.d.ts +4 -0
- package/dist/types/auth/components/social-logins/logos/discord.d.ts +4 -0
- package/dist/types/auth/components/social-logins/logos/facebook.d.ts +4 -0
- package/dist/types/auth/components/social-logins/logos/google.d.ts +4 -0
- package/dist/types/auth/components/social-logins/logos/linkedin.d.ts +4 -0
- package/dist/types/auth/components/social-logins/social-login-button.d.ts +24 -0
- package/dist/types/auth/components/submit-button/auth-submit-button.d.ts +3 -0
- package/dist/types/auth/error-definitions.d.ts +23 -0
- package/dist/types/auth/index.d.ts +15 -0
- package/dist/types/auth/passkey-auth.d.ts +2 -0
- package/dist/types/auth/store/auth-store.d.ts +58 -0
- package/dist/types/components.d.ts +1270 -0
- package/dist/types/globalScript.d.ts +1 -0
- package/dist/types/i18n.d.ts +3 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/logger.d.ts +55 -0
- package/dist/types/newsletter/api/newsletters.d.ts +198 -0
- package/dist/types/newsletter/components/helpers.d.ts +1 -0
- package/dist/types/newsletter/components/logout-button/logout-button.d.ts +8 -0
- package/dist/types/newsletter/components/newsletter-checkbox/newsletter-checkbox.d.ts +15 -0
- package/dist/types/newsletter/components/newsletter-root/newsletter-root.d.ts +11 -0
- package/dist/types/newsletter/components/preference-checkbox/preference-checkbox.d.ts +28 -0
- package/dist/types/newsletter/components/resend-doi-button/resend-doi-button.d.ts +8 -0
- package/dist/types/newsletter/components/submit-button/newsletter-submit-button.d.ts +3 -0
- package/dist/types/newsletter/components/toggle-subscription-button/toggle-subscription-button.d.ts +12 -0
- package/dist/types/newsletter/index.d.ts +10 -0
- package/dist/types/newsletter/newsletter-helpers.d.ts +15 -0
- package/dist/types/newsletter/store/newsletter-store.d.ts +25 -0
- package/dist/types/profile/api/profile.d.ts +238 -0
- package/dist/types/profile/components/field/field.d.ts +39 -0
- package/dist/types/profile/components/full-profile/full-profile.d.ts +6 -0
- package/dist/types/profile/components/profile/profile.d.ts +27 -0
- package/dist/types/profile/components/raw-field/raw-field.d.ts +45 -0
- package/dist/types/profile/components/raw-input-fields/Input.d.ts +17 -0
- package/dist/types/profile/components/raw-input-fields/MultiSelect.d.ts +28 -0
- package/dist/types/profile/components/raw-input-fields/RadioGroup.d.ts +30 -0
- package/dist/types/profile/components/raw-input-fields/Select.d.ts +24 -0
- package/dist/types/profile/components/raw-input-fields/Textarea.d.ts +17 -0
- package/dist/types/profile/components/submit-button/profile-submit-button.d.ts +2 -0
- package/dist/types/profile/index.d.ts +12 -0
- package/dist/types/profile/profile-helpers.d.ts +7 -0
- package/dist/types/profile/store/profile-store.d.ts +39 -0
- package/dist/types/shared/component-utils.d.ts +16 -0
- package/dist/types/shared/components/conditional-render/conditional-render.d.ts +11 -0
- package/dist/types/shared/components/config/config.d.ts +32 -0
- package/dist/types/shared/components/email-field/email-field.d.ts +13 -0
- package/dist/types/shared/components/error-message/error-message.d.ts +15 -0
- package/dist/types/shared/components/flash-message/close-icon.d.ts +1 -0
- package/dist/types/shared/components/flash-message/flash-message.d.ts +6 -0
- package/dist/types/shared/components/spinner/spinner.d.ts +3 -0
- package/dist/types/shared/components/submit-button/context.d.ts +9 -0
- package/dist/types/shared/components/submit-button/submit-button.d.ts +20 -0
- package/dist/types/shared/store/flash-store.d.ts +29 -0
- package/dist/types/shared/store/unidy-store.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +1756 -0
- package/dist/types/ticketable/api/get-with-schema.d.ts +3 -0
- package/dist/types/ticketable/api/schemas.d.ts +18 -0
- package/dist/types/ticketable/api/subscriptions.d.ts +84 -0
- package/dist/types/ticketable/api/tickets.d.ts +86 -0
- package/dist/types/ticketable/components/pagination/pagination-button.d.ts +14 -0
- package/dist/types/ticketable/components/pagination/pagination-page.d.ts +12 -0
- package/dist/types/ticketable/components/ticketable-list/skeleton-helpers.d.ts +13 -0
- package/dist/types/ticketable/components/ticketable-list/ticketable-list.d.ts +41 -0
- package/dist/types/ticketable/index.d.ts +12 -0
- package/dist/types/ticketable/store/pagination-store.d.ts +10 -0
- 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 +23 -18
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { t } from './i18n.js';
|
|
3
|
+
import { s as state } from './auth-store.js';
|
|
4
|
+
import { g as getParentSigninStep } from './helpers.js';
|
|
5
|
+
import { n as newsletterStore } from './newsletter-store.js';
|
|
6
|
+
import { g as getParentNewsletterRoot } from './helpers2.js';
|
|
7
|
+
import { s as state$1 } from './profile-store.js';
|
|
8
|
+
import { h as hasSlotContent } from './component-utils.js';
|
|
9
|
+
import { d as defineCustomElement$1 } from './spinner.js';
|
|
10
|
+
|
|
11
|
+
const authContext = {
|
|
12
|
+
handleClick: async (event, el, _forProp) => {
|
|
13
|
+
event.preventDefault();
|
|
14
|
+
await getParentSigninStep(el)?.submit();
|
|
15
|
+
},
|
|
16
|
+
isDisabled(forProp, disabled) {
|
|
17
|
+
if (disabled || state.loading)
|
|
18
|
+
return true;
|
|
19
|
+
if (state.step === "email" && forProp === "email") {
|
|
20
|
+
return state.email === "";
|
|
21
|
+
}
|
|
22
|
+
if (state.step === "verification" && forProp === "password") {
|
|
23
|
+
return state.password === "";
|
|
24
|
+
}
|
|
25
|
+
if (state.step === "reset-password" && forProp === "resetPassword") {
|
|
26
|
+
return !state.resetPassword.newPassword || !state.resetPassword.passwordConfirmation;
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
},
|
|
30
|
+
isLoading() {
|
|
31
|
+
return state.loading;
|
|
32
|
+
},
|
|
33
|
+
getButtonText(forProp, text) {
|
|
34
|
+
if (text)
|
|
35
|
+
return text;
|
|
36
|
+
switch (state.step) {
|
|
37
|
+
case "email":
|
|
38
|
+
return t("buttons.continue");
|
|
39
|
+
case "verification":
|
|
40
|
+
if (forProp === "password") {
|
|
41
|
+
return t("auth.password.button_text", { defaultValue: "Sign In with Password" });
|
|
42
|
+
}
|
|
43
|
+
return t("buttons.submit");
|
|
44
|
+
case "reset-password":
|
|
45
|
+
if (forProp === "resetPassword") {
|
|
46
|
+
return t("auth.resetPassword.button_text_set", { defaultValue: "Set Password" });
|
|
47
|
+
}
|
|
48
|
+
return t("buttons.submit");
|
|
49
|
+
default:
|
|
50
|
+
return t("buttons.submit");
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
shouldRender(forProp) {
|
|
54
|
+
if (!state.availableLoginOptions?.password && forProp === "password") {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
if (state.step === "email") {
|
|
58
|
+
return forProp === "email";
|
|
59
|
+
}
|
|
60
|
+
if (state.step === "verification") {
|
|
61
|
+
return forProp === "password" && state.magicCodeStep !== "sent";
|
|
62
|
+
}
|
|
63
|
+
if (state.step === "reset-password") {
|
|
64
|
+
return forProp === "resetPassword";
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const newsletterContext = {
|
|
71
|
+
handleClick: async (event, el, forProp) => {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
return await getParentNewsletterRoot(el)?.submit(forProp);
|
|
74
|
+
},
|
|
75
|
+
isDisabled(forProp, disabled) {
|
|
76
|
+
if (forProp === "login") {
|
|
77
|
+
return disabled || !newsletterStore.state.email;
|
|
78
|
+
}
|
|
79
|
+
return disabled || !newsletterStore.state.email || Object.keys(newsletterStore.state.checkedNewsletters).length === 0;
|
|
80
|
+
},
|
|
81
|
+
isLoading() {
|
|
82
|
+
return false;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
function getParentProfile(el) {
|
|
87
|
+
return el.closest("u-profile");
|
|
88
|
+
}
|
|
89
|
+
const profileContext = {
|
|
90
|
+
async handleClick(event, el, _forProp) {
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
await getParentProfile(el)?.submitProfile();
|
|
93
|
+
},
|
|
94
|
+
isDisabled(_forProp, disabled) {
|
|
95
|
+
return disabled || (state$1.errors && Object.keys(state$1.errors).length > 0) || state$1.phoneValid === false;
|
|
96
|
+
},
|
|
97
|
+
isLoading() {
|
|
98
|
+
return state$1.loading;
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const defaultContext = {
|
|
103
|
+
async handleClick() { },
|
|
104
|
+
isDisabled(_forProp, disabled = false) {
|
|
105
|
+
return disabled || false;
|
|
106
|
+
},
|
|
107
|
+
isLoading() {
|
|
108
|
+
return false;
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const submitButtonCss = "/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--u-animate-spin:spin 1s linear infinite;--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\\:justify-center{justify-content:center}.u\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.u\\:disabled\\:opacity-50:disabled{opacity:.5}.u\\:inline-flex{display:inline-flex}.u\\:h-\\[1em\\]{height:1em}.u\\:w-\\[1em\\]{width:1em}.u\\:animate-spin{animation:var(--u-animate-spin)}.u\\:items-center{align-items:center}.u\\:rounded-\\[50\\%\\]{border-radius:50%}} /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{}@keyframes spin{to{transform:rotate(1turn)}} /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{.u\\:justify-end{justify-content:flex-end}} /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.18 | 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}";
|
|
113
|
+
|
|
114
|
+
const SubmitButton = /*@__PURE__*/ proxyCustomElement(class SubmitButton extends HTMLElement {
|
|
115
|
+
constructor(registerHost) {
|
|
116
|
+
super();
|
|
117
|
+
if (registerHost !== false) {
|
|
118
|
+
this.__registerHost();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
get el() { return this; }
|
|
122
|
+
for;
|
|
123
|
+
text;
|
|
124
|
+
disabled = false;
|
|
125
|
+
componentClassName = "";
|
|
126
|
+
context = "auth";
|
|
127
|
+
contextModule = defaultContext;
|
|
128
|
+
hasSlot = false;
|
|
129
|
+
async componentWillLoad() {
|
|
130
|
+
// this needs to be evaluated on load, bc doing it on render will evaluate the generated dom for "shadow: false"
|
|
131
|
+
// components and always return true on re-render
|
|
132
|
+
this.hasSlot = hasSlotContent(this.el);
|
|
133
|
+
this.context = this.detectContext();
|
|
134
|
+
switch (this.context) {
|
|
135
|
+
case "auth":
|
|
136
|
+
this.contextModule = authContext;
|
|
137
|
+
break;
|
|
138
|
+
case "profile":
|
|
139
|
+
this.contextModule = profileContext;
|
|
140
|
+
break;
|
|
141
|
+
case "newsletter":
|
|
142
|
+
this.contextModule = newsletterContext;
|
|
143
|
+
break;
|
|
144
|
+
default:
|
|
145
|
+
this.contextModule = defaultContext;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
detectContext() {
|
|
149
|
+
if (this.el.closest("u-signin-root") || this.el.closest("u-signin-step"))
|
|
150
|
+
return "auth";
|
|
151
|
+
if (this.el.closest("u-profile"))
|
|
152
|
+
return "profile";
|
|
153
|
+
if (this.el.closest("u-newsletter-root"))
|
|
154
|
+
return "newsletter";
|
|
155
|
+
throw new Error("No context found for submit button. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.");
|
|
156
|
+
}
|
|
157
|
+
handleClick = async (event) => {
|
|
158
|
+
await this.contextModule.handleClick(event, this.el, this.for);
|
|
159
|
+
};
|
|
160
|
+
isDisabled() {
|
|
161
|
+
return this.contextModule.isDisabled(this.for, this.disabled);
|
|
162
|
+
}
|
|
163
|
+
isLoading() {
|
|
164
|
+
return this.contextModule.isLoading();
|
|
165
|
+
}
|
|
166
|
+
getButtonText() {
|
|
167
|
+
if (this.contextModule.getButtonText) {
|
|
168
|
+
return this.contextModule.getButtonText(this.for, this.text);
|
|
169
|
+
}
|
|
170
|
+
if (this.text) {
|
|
171
|
+
return this.text;
|
|
172
|
+
}
|
|
173
|
+
return t("buttons.submit");
|
|
174
|
+
}
|
|
175
|
+
getButtonContent() {
|
|
176
|
+
const loading = this.isLoading();
|
|
177
|
+
if (loading) {
|
|
178
|
+
return h("u-spinner", null);
|
|
179
|
+
}
|
|
180
|
+
if (this.hasSlot) {
|
|
181
|
+
return h("slot", null);
|
|
182
|
+
}
|
|
183
|
+
return this.getButtonText();
|
|
184
|
+
}
|
|
185
|
+
render() {
|
|
186
|
+
if (this.contextModule.shouldRender && !this.contextModule.shouldRender(this.for)) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
const buttonClasses = [
|
|
190
|
+
this.componentClassName,
|
|
191
|
+
this.context === "auth" ? "u:flex u:justify-center" : "",
|
|
192
|
+
"u:disabled:opacity-50 u:disabled:cursor-not-allowed",
|
|
193
|
+
].join(" ");
|
|
194
|
+
const buttonProps = {
|
|
195
|
+
type: "submit",
|
|
196
|
+
part: `${this.context}-submit-button`,
|
|
197
|
+
disabled: this.isDisabled() || this.isLoading(),
|
|
198
|
+
class: buttonClasses,
|
|
199
|
+
onClick: this.handleClick,
|
|
200
|
+
"aria-live": "polite",
|
|
201
|
+
};
|
|
202
|
+
return h("button", { ...buttonProps }, this.getButtonContent());
|
|
203
|
+
}
|
|
204
|
+
static get style() { return submitButtonCss; }
|
|
205
|
+
}, [772, "u-submit-button", {
|
|
206
|
+
"for": [1],
|
|
207
|
+
"text": [1],
|
|
208
|
+
"disabled": [4],
|
|
209
|
+
"componentClassName": [1, "class-name"]
|
|
210
|
+
}]);
|
|
211
|
+
function defineCustomElement() {
|
|
212
|
+
if (typeof customElements === "undefined") {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const components = ["u-submit-button", "u-spinner"];
|
|
216
|
+
components.forEach(tagName => { switch (tagName) {
|
|
217
|
+
case "u-submit-button":
|
|
218
|
+
if (!customElements.get(tagName)) {
|
|
219
|
+
customElements.define(tagName, SubmitButton);
|
|
220
|
+
}
|
|
221
|
+
break;
|
|
222
|
+
case "u-spinner":
|
|
223
|
+
if (!customElements.get(tagName)) {
|
|
224
|
+
defineCustomElement$1();
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
} });
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export { SubmitButton as S, defineCustomElement as d };
|
|
231
|
+
//# sourceMappingURL=submit-button.js.map
|
|
232
|
+
|
|
233
|
+
//# sourceMappingURL=submit-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"submit-button.js","mappings":";;;;;;;;;;AAOO,MAAM,WAAW,GAAuC;IAC7D,WAAW,EAAE,OAAO,KAAiB,EAAE,EAAe,EAAE,QAAwB,KAAI;QAClF,KAAK,CAAC,cAAc,EAAE;AACtB,QAAA,MAAM,mBAAmB,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE;KACxC;IAED,UAAU,CAAC,OAAuB,EAAE,QAAkB,EAAA;AACpD,QAAA,IAAI,QAAQ,IAAIA,KAAS,CAAC,OAAO;AAAE,YAAA,OAAO,IAAI;QAE9C,IAAIA,KAAS,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,KAAK,OAAO,EAAE;AACrD,YAAA,OAAOA,KAAS,CAAC,KAAK,KAAK,EAAE;;QAG/B,IAAIA,KAAS,CAAC,IAAI,KAAK,cAAc,IAAI,OAAO,KAAK,UAAU,EAAE;AAC/D,YAAA,OAAOA,KAAS,CAAC,QAAQ,KAAK,EAAE;;QAGlC,IAAIA,KAAS,CAAC,IAAI,KAAK,gBAAgB,IAAI,OAAO,KAAK,eAAe,EAAE;AACtE,YAAA,OAAO,CAACA,KAAS,CAAC,aAAa,CAAC,WAAW,IAAI,CAACA,KAAS,CAAC,aAAa,CA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qDAAqD;AACtD,SAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,QAAA,MAAM,WAAW,GAA4B;AAC3C,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,IAAI,EAAE,CAAA,EAAG,IAAI,CAAC,OAAO,CAAgB,cAAA,CAAA;YACrC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE;AAC/C,YAAA,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,IAAI,CAAC,WAAW;AACzB,YAAA,WAAW,EAAE,QAAQ;SACtB;AAED,QAAA,OAAO,CAAA,CAAA,QAAA,EAAA,EAAA,GAAY,WAAW,EAAG,EAAA,IAAI,CAAC,gBAAgB,EAAE,CAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["authState","profileState","__stencil_proxyCustomElement"],"sources":["src/auth/components/submit-button/auth-submit-button.ts","src/newsletter/components/submit-button/newsletter-submit-button.ts","src/profile/components/submit-button/profile-submit-button.ts","src/shared/components/submit-button/context.ts","src/shared/components/submit-button/submit-button.css?tag=u-submit-button","src/shared/components/submit-button/submit-button.tsx"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { authState } from \"../../store/auth-store\";\nimport { getParentSigninStep } from \"../helpers\";\n\nexport type AuthButtonFor = \"email\" | \"password\" | \"resetPassword\";\n\nexport const authContext: SubmitButtonContext<AuthButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, _forProp?: AuthButtonFor) => {\n event.preventDefault();\n await getParentSigninStep(el)?.submit();\n },\n\n isDisabled(forProp?: AuthButtonFor, disabled?: boolean): boolean {\n if (disabled || authState.loading) return true;\n\n if (authState.step === \"email\" && forProp === \"email\") {\n return authState.email === \"\";\n }\n\n if (authState.step === \"verification\" && forProp === \"password\") {\n return authState.password === \"\";\n }\n\n if (authState.step === \"reset-password\" && forProp === \"resetPassword\") {\n return !authState.resetPassword.newPassword || !authState.resetPassword.passwordConfirmation;\n }\n\n return false;\n },\n\n isLoading(): boolean {\n return authState.loading;\n },\n\n getButtonText(forProp?: AuthButtonFor, text?: string): string {\n if (text) return text;\n\n switch (authState.step) {\n case \"email\":\n return t(\"buttons.continue\");\n case \"verification\":\n if (forProp === \"password\") {\n return t(\"auth.password.button_text\", { defaultValue: \"Sign In with Password\" });\n }\n return t(\"buttons.submit\");\n case \"reset-password\":\n if (forProp === \"resetPassword\") {\n return t(\"auth.resetPassword.button_text_set\", { defaultValue: \"Set Password\" });\n }\n return t(\"buttons.submit\");\n default:\n return t(\"buttons.submit\");\n }\n },\n\n shouldRender(forProp?: AuthButtonFor): boolean {\n if (!authState.availableLoginOptions?.password && forProp === \"password\") {\n return false;\n }\n\n if (authState.step === \"email\") {\n return forProp === \"email\";\n }\n\n if (authState.step === \"verification\") {\n return forProp === \"password\" && authState.magicCodeStep !== \"sent\";\n }\n\n if (authState.step === \"reset-password\") {\n return forProp === \"resetPassword\";\n }\n\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\nimport { getParentNewsletterRoot } from \"../helpers\";\n\nexport type NewsletterButtonFor = \"login\" | \"create\";\n\nexport const newsletterContext: SubmitButtonContext<NewsletterButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, forProp?: NewsletterButtonFor) => {\n event.preventDefault();\n return await getParentNewsletterRoot(el)?.submit(forProp);\n },\n\n isDisabled(forProp, disabled?: boolean): boolean {\n if (forProp === \"login\") {\n return disabled || !newsletterStore.state.email;\n }\n\n return disabled || !newsletterStore.state.email || Object.keys(newsletterStore.state.checkedNewsletters).length === 0;\n },\n\n isLoading(): boolean {\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { state as profileState } from \"../../store/profile-store\";\n\nfunction getParentProfile(el: HTMLElement) {\n return el.closest(\"u-profile\") as HTMLUProfileElement | null;\n}\n\nexport const profileContext: SubmitButtonContext = {\n async handleClick(event: MouseEvent, el: HTMLElement, _forProp?: string) {\n event.preventDefault();\n await getParentProfile(el)?.submitProfile();\n },\n\n isDisabled(_forProp, disabled?: boolean): boolean {\n return disabled || (profileState.errors && Object.keys(profileState.errors).length > 0) || profileState.phoneValid === false;\n },\n\n isLoading(): boolean {\n return profileState.loading;\n },\n};\n","export interface SubmitButtonContext<ForContext = string> {\n init?(): Promise<void>;\n handleClick(event: MouseEvent, el: HTMLElement, forProp?: ForContext): Promise<void>;\n isDisabled(forProp?: ForContext, disabled?: boolean): boolean;\n isLoading(): boolean;\n getButtonText?(forProp?: ForContext, text?: string): string;\n shouldRender?(forProp?: ForContext): boolean;\n}\n\nexport const defaultContext: SubmitButtonContext = {\n async handleClick() {},\n\n isDisabled(_forProp, disabled = false): boolean {\n return disabled || false;\n },\n\n isLoading(): boolean {\n return false;\n },\n};\n","","import { Component, Element, h, Prop } from \"@stencil/core\";\nimport { type AuthButtonFor, authContext } from \"../../../auth/components/submit-button/auth-submit-button\";\nimport { t } from \"../../../i18n\";\nimport { type NewsletterButtonFor, newsletterContext } from \"../../../newsletter/components/submit-button/newsletter-submit-button\";\nimport { profileContext } from \"../../../profile/components/submit-button/profile-submit-button\";\nimport { hasSlotContent } from \"../../component-utils\";\nimport { defaultContext, type SubmitButtonContext } from \"./context\";\n\n@Component({\n tag: \"u-submit-button\",\n styleUrl: \"submit-button.css\",\n shadow: false,\n})\nexport class SubmitButton {\n @Element() el!: HTMLElement;\n @Prop() for?: AuthButtonFor | NewsletterButtonFor;\n @Prop() text?: string;\n @Prop() disabled = false;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n private context: \"auth\" | \"profile\" | \"newsletter\" = \"auth\";\n private contextModule: SubmitButtonContext = defaultContext;\n private hasSlot = false;\n\n async componentWillLoad() {\n // this needs to be evaluated on load, bc doing it on render will evaluate the generated dom for \"shadow: false\"\n // components and always return true on re-render\n this.hasSlot = hasSlotContent(this.el);\n\n this.context = this.detectContext();\n\n switch (this.context) {\n case \"auth\":\n this.contextModule = authContext;\n break;\n case \"profile\":\n this.contextModule = profileContext;\n break;\n case \"newsletter\":\n this.contextModule = newsletterContext;\n break;\n default:\n this.contextModule = defaultContext;\n }\n }\n\n private detectContext(): \"auth\" | \"profile\" | \"newsletter\" {\n if (this.el.closest(\"u-signin-root\") || this.el.closest(\"u-signin-step\")) return \"auth\";\n\n if (this.el.closest(\"u-profile\")) return \"profile\";\n\n if (this.el.closest(\"u-newsletter-root\")) return \"newsletter\";\n\n throw new Error(\n \"No context found for submit button. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.\",\n );\n }\n\n private handleClick = async (event: MouseEvent) => {\n await this.contextModule.handleClick(event, this.el, this.for);\n };\n\n private isDisabled(): boolean {\n return this.contextModule.isDisabled(this.for, this.disabled);\n }\n\n private isLoading(): boolean {\n return this.contextModule.isLoading();\n }\n\n private getButtonText(): string {\n if (this.contextModule.getButtonText) {\n return this.contextModule.getButtonText(this.for, this.text);\n }\n if (this.text) {\n return this.text;\n }\n\n return t(\"buttons.submit\");\n }\n\n private getButtonContent() {\n const loading = this.isLoading();\n\n if (loading) {\n return <u-spinner />;\n }\n\n if (this.hasSlot) {\n return <slot />;\n }\n\n return this.getButtonText();\n }\n\n render() {\n if (this.contextModule.shouldRender && !this.contextModule.shouldRender(this.for)) {\n return null;\n }\n\n const buttonClasses = [\n this.componentClassName,\n this.context === \"auth\" ? \"u:flex u:justify-center\" : \"\",\n \"u:disabled:opacity-50 u:disabled:cursor-not-allowed\",\n ].join(\" \");\n\n const buttonProps: Record<string, unknown> = {\n type: \"submit\",\n part: `${this.context}-submit-button`,\n disabled: this.isDisabled() || this.isLoading(),\n class: buttonClasses,\n onClick: this.handleClick,\n \"aria-live\": \"polite\",\n };\n\n return <button {...buttonProps}>{this.getButtonContent()}</button>;\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UConditionalRender extends Components.UConditionalRender, HTMLElement {}
|
|
4
|
+
export const UConditionalRender: {
|
|
5
|
+
prototype: UConditionalRender;
|
|
6
|
+
new (): UConditionalRender;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { proxyCustomElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as state } from './auth-store.js';
|
|
3
|
+
import { U as UnidyComponent } from './logger.js';
|
|
4
|
+
import { i as isConfirmed, a as isSubscribed } from './newsletter-helpers.js';
|
|
5
|
+
import { n as newsletterStore } from './newsletter-store.js';
|
|
6
|
+
import { a as profileStore } from './profile-store.js';
|
|
7
|
+
|
|
8
|
+
const PREDEFINED_CONDITIONS = {
|
|
9
|
+
"auth.passkeyEnabled": () => state.availableLoginOptions?.passkey,
|
|
10
|
+
"auth.passwordEnabled": () => state.availableLoginOptions?.password,
|
|
11
|
+
"auth.magicCodeEnabled": () => state.availableLoginOptions?.magic_link,
|
|
12
|
+
"auth.socialLoginsEnabled": () => (state.availableLoginOptions?.social_logins?.length ?? 0) > 0,
|
|
13
|
+
"auth.hasSocialLogin": (provider) => state.availableLoginOptions?.social_logins?.includes(provider) ?? false,
|
|
14
|
+
"auth.loading": () => state.loading,
|
|
15
|
+
"auth.authenticated": () => state.authenticated,
|
|
16
|
+
"auth.magicCodeSent": () => state.magicCodeStep === "sent" || state.magicCodeStep === "requested",
|
|
17
|
+
"auth.magicCodeRequested": () => state.magicCodeStep === "requested",
|
|
18
|
+
"auth.resetPasswordSent": () => state.resetPassword.step === "sent" || state.resetPassword.step === "requested",
|
|
19
|
+
"auth.resetPasswordRequested": () => state.resetPassword.step === "requested",
|
|
20
|
+
"newsletter.hasCheckedNewsletters": () => Object.keys(newsletterStore.state.checkedNewsletters).length > 0,
|
|
21
|
+
"newsletter.hasPreferenceToken": () => !!newsletterStore.state.preferenceToken,
|
|
22
|
+
"newsletter.hasEmail": () => !!newsletterStore.state.email,
|
|
23
|
+
"newsletter.subscribed": (newsletterInternalName) => isSubscribed(newsletterInternalName),
|
|
24
|
+
"newsletter.confirmed": (newsletterInternalName) => isConfirmed(newsletterInternalName),
|
|
25
|
+
"newsletter.loggedIn": () => newsletterStore.state.isAuthenticated || newsletterStore.state.preferenceToken !== "",
|
|
26
|
+
"profile.loading": () => profileStore.state.loading,
|
|
27
|
+
"profile.hasErrors": () => Object.keys(profileStore.state.errors).some((key) => profileStore.state.errors[key] !== null),
|
|
28
|
+
"profile.hasFlashErrors": () => Object.keys(profileStore.state.flashErrors).some((key) => profileStore.state.flashErrors[key] !== null),
|
|
29
|
+
"profile.phoneValid": () => profileStore.state.phoneValid,
|
|
30
|
+
"profile.hasData": () => Object.keys(profileStore.state.data).length > 0,
|
|
31
|
+
};
|
|
32
|
+
function isTruthy(value) {
|
|
33
|
+
return Boolean(value);
|
|
34
|
+
}
|
|
35
|
+
const ConditionalRender = /*@__PURE__*/ proxyCustomElement(class ConditionalRender extends UnidyComponent {
|
|
36
|
+
constructor(registerHost) {
|
|
37
|
+
super();
|
|
38
|
+
if (registerHost !== false) {
|
|
39
|
+
this.__registerHost();
|
|
40
|
+
}
|
|
41
|
+
this.__attachShadow();
|
|
42
|
+
}
|
|
43
|
+
when; // condition to check
|
|
44
|
+
is; // optional value to compare against
|
|
45
|
+
not = false;
|
|
46
|
+
conditionFunction;
|
|
47
|
+
evaluateCondition() {
|
|
48
|
+
const predefinedFunction = PREDEFINED_CONDITIONS[this.when];
|
|
49
|
+
if (predefinedFunction) {
|
|
50
|
+
return predefinedFunction(this.is);
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
shouldRender() {
|
|
55
|
+
if (!this.when && !this.conditionFunction) {
|
|
56
|
+
this.logger.error("[u-conditional-render] Either 'when' or 'conditionFunction' prop is required");
|
|
57
|
+
}
|
|
58
|
+
if (this.conditionFunction) {
|
|
59
|
+
const result = this.conditionFunction(state);
|
|
60
|
+
return this.not ? !result : result;
|
|
61
|
+
}
|
|
62
|
+
const value = this.evaluateCondition();
|
|
63
|
+
if (value === null) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
const normalizedIs = this.is?.toString().toLowerCase();
|
|
67
|
+
let result;
|
|
68
|
+
if (typeof value === "boolean") {
|
|
69
|
+
if (normalizedIs === "false" || normalizedIs === "disabled") {
|
|
70
|
+
result = !value;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
result = value;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else if (this.is === undefined) {
|
|
77
|
+
result = isTruthy(value);
|
|
78
|
+
}
|
|
79
|
+
else if (normalizedIs === "enabled" || normalizedIs === "true") {
|
|
80
|
+
result = isTruthy(value);
|
|
81
|
+
}
|
|
82
|
+
else if (normalizedIs === "disabled" || normalizedIs === "false") {
|
|
83
|
+
result = !isTruthy(value);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
result = String(value) === String(this.is); // to compare exact value
|
|
87
|
+
}
|
|
88
|
+
return this.not ? !result : result;
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
const visible = this.shouldRender();
|
|
92
|
+
return (h(Host, { key: '9ccf807174a600e86a593f812c3ad89d7f7a97ad', hidden: !visible, style: { display: visible ? "contents" : undefined }, "aria-hidden": !visible ? "true" : null, "aria-live": "polite" }, h("slot", { key: '6747ba1cbe28344c1f5a0258843948a046644471' })));
|
|
93
|
+
}
|
|
94
|
+
}, [769, "u-conditional-render", {
|
|
95
|
+
"when": [1],
|
|
96
|
+
"is": [1],
|
|
97
|
+
"not": [4],
|
|
98
|
+
"conditionFunction": [16]
|
|
99
|
+
}]);
|
|
100
|
+
function defineCustomElement$1() {
|
|
101
|
+
if (typeof customElements === "undefined") {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const components = ["u-conditional-render"];
|
|
105
|
+
components.forEach(tagName => { switch (tagName) {
|
|
106
|
+
case "u-conditional-render":
|
|
107
|
+
if (!customElements.get(tagName)) {
|
|
108
|
+
customElements.define(tagName, ConditionalRender);
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
} });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const UConditionalRender = ConditionalRender;
|
|
115
|
+
const defineCustomElement = defineCustomElement$1;
|
|
116
|
+
|
|
117
|
+
export { UConditionalRender, defineCustomElement };
|
|
118
|
+
//# sourceMappingURL=u-conditional-render.js.map
|
|
119
|
+
|
|
120
|
+
//# sourceMappingURL=u-conditional-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-conditional-render.js","mappings":";;;;;;;AAOA,MAAM,qBAAqB,GAAoD;IAC7E,qBAAqB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,OAAO;IACrE,sBAAsB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,QAAQ;IACvE,uBAAuB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,UAAU;AAC1E,IAAA,0BAA0B,EAAE,MAAM,CAACA,KAAS,CAAC,qBAAqB,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC;AACnG,IAAA,qBAAqB,EAAE,CAAC,QAAgB,KAAKA,KAAS,CAAC,qBAAqB,EAAE,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK;AACxH,IAAA,cAAc,EAAE,MAAMA,KAAS,CAAC,OAAO;AACvC,IAAA,oBAAoB,EAAE,MAAMA,KAAS,CAAC,aAAa;AACnD,IAAA,oBAAoB,EAAE,MAAMA,KAAS,CAAC,aAAa,KAAK,MAAM,IAAIA,KAAS,CAAC,aAAa,KAAK,WAAW;IACzG,yBAAyB,EAAE,MAAMA,KAAS,CAAC,aAAa,KAAK,WAAW;AACxE,IAAA,wBAAwB,E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BACL,MAAM,GAAG,KAAK;;;AAEX,aAAA,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,EAAE;AAChC,YAAA,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;;aACnB,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,MAAM,EAAE;AAChE,YAAA,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;;aACnB,IAAI,YAAY,KAAK,UAAU,IAAI,YAAY,KAAK,OAAO,EAAE;AAClE,YAAA,MAAM,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;;aACpB;AACL,YAAA,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;AAG7C,QAAA,OAAO,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,MAAM;;IAGpC,MAAM,GAAA;AACJ,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE;AAEnC,QAAA,QACE,CAAC,CAAA,IAAI,EACH,EAAA,GAAA,EAAA,0CAAA,EAAA,MAAM,EAAE,CAAC,OAAO,EAChB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,EAAE,EAAA,aAAA,EACvC,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,eAC3B,QAAQ,EAAA,EAElB,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["authState","NewsletterHelpers.isSubscribed","NewsletterHelpers.isConfirmed","__stencil_proxyCustomElement"],"sources":["src/shared/components/conditional-render/conditional-render.tsx"],"sourcesContent":["import { Component, Host, h, Prop } from \"@stencil/core\";\nimport { type AuthState, authState } from \"../../../auth/store/auth-store\";\nimport { UnidyComponent } from \"../../../logger\";\nimport * as NewsletterHelpers from \"../../../newsletter/newsletter-helpers\";\nimport { newsletterStore } from \"../../../newsletter/store/newsletter-store\";\nimport { profileStore } from \"../../../profile/store/profile-store\";\n\nconst PREDEFINED_CONDITIONS: Record<string, (...args: unknown[]) => unknown> = {\n \"auth.passkeyEnabled\": () => authState.availableLoginOptions?.passkey,\n \"auth.passwordEnabled\": () => authState.availableLoginOptions?.password,\n \"auth.magicCodeEnabled\": () => authState.availableLoginOptions?.magic_link,\n \"auth.socialLoginsEnabled\": () => (authState.availableLoginOptions?.social_logins?.length ?? 0) > 0,\n \"auth.hasSocialLogin\": (provider: string) => authState.availableLoginOptions?.social_logins?.includes(provider) ?? false,\n \"auth.loading\": () => authState.loading,\n \"auth.authenticated\": () => authState.authenticated,\n \"auth.magicCodeSent\": () => authState.magicCodeStep === \"sent\" || authState.magicCodeStep === \"requested\",\n \"auth.magicCodeRequested\": () => authState.magicCodeStep === \"requested\",\n \"auth.resetPasswordSent\": () => authState.resetPassword.step === \"sent\" || authState.resetPassword.step === \"requested\",\n \"auth.resetPasswordRequested\": () => authState.resetPassword.step === \"requested\",\n\n \"newsletter.hasCheckedNewsletters\": () => Object.keys(newsletterStore.state.checkedNewsletters).length > 0,\n \"newsletter.hasPreferenceToken\": () => !!newsletterStore.state.preferenceToken,\n \"newsletter.hasEmail\": () => !!newsletterStore.state.email,\n \"newsletter.subscribed\": (newsletterInternalName: string) => NewsletterHelpers.isSubscribed(newsletterInternalName),\n \"newsletter.confirmed\": (newsletterInternalName: string) => NewsletterHelpers.isConfirmed(newsletterInternalName),\n \"newsletter.loggedIn\": () => newsletterStore.state.isAuthenticated || newsletterStore.state.preferenceToken !== \"\",\n\n \"profile.loading\": () => profileStore.state.loading,\n \"profile.hasErrors\": () => Object.keys(profileStore.state.errors).some((key) => profileStore.state.errors[key] !== null),\n \"profile.hasFlashErrors\": () => Object.keys(profileStore.state.flashErrors).some((key) => profileStore.state.flashErrors[key] !== null),\n \"profile.phoneValid\": () => profileStore.state.phoneValid,\n \"profile.hasData\": () => Object.keys(profileStore.state.data).length > 0,\n};\n\nfunction isTruthy(value: unknown): boolean {\n return Boolean(value);\n}\n\n@Component({\n tag: \"u-conditional-render\",\n shadow: true,\n})\nexport class ConditionalRender extends UnidyComponent {\n @Prop() when?: string; // condition to check\n @Prop() is?: string; // optional value to compare against\n @Prop() not = false;\n @Prop() conditionFunction?: (state: AuthState) => boolean;\n\n private evaluateCondition(): unknown {\n const predefinedFunction = PREDEFINED_CONDITIONS[this.when];\n if (predefinedFunction) {\n return predefinedFunction(this.is);\n }\n\n return null;\n }\n\n private shouldRender(): boolean {\n if (!this.when && !this.conditionFunction) {\n this.logger.error(\"[u-conditional-render] Either 'when' or 'conditionFunction' prop is required\");\n }\n\n if (this.conditionFunction) {\n const result = this.conditionFunction(authState);\n return this.not ? !result : result;\n }\n\n const value = this.evaluateCondition();\n if (value === null) {\n return false;\n }\n\n const normalizedIs = this.is?.toString().toLowerCase();\n let result: boolean;\n\n if (typeof value === \"boolean\") {\n if (normalizedIs === \"false\" || normalizedIs === \"disabled\") {\n result = !value;\n } else {\n result = value;\n }\n } else if (this.is === undefined) {\n result = isTruthy(value);\n } else if (normalizedIs === \"enabled\" || normalizedIs === \"true\") {\n result = isTruthy(value);\n } else if (normalizedIs === \"disabled\" || normalizedIs === \"false\") {\n result = !isTruthy(value);\n } else {\n result = String(value) === String(this.is); // to compare exact value\n }\n\n return this.not ? !result : result;\n }\n\n render() {\n const visible = this.shouldRender();\n\n return (\n <Host\n hidden={!visible}\n style={{ display: visible ? \"contents\" : undefined }}\n aria-hidden={!visible ? \"true\" : null}\n aria-live=\"polite\"\n >\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UConfig extends Components.UConfig, HTMLElement {}
|
|
4
|
+
export const UConfig: {
|
|
5
|
+
prototype: UConfig;
|
|
6
|
+
new (): UConfig;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { proxyCustomElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getUnidyClient } from './index2.js';
|
|
3
|
+
import { A as Auth } from './auth.js';
|
|
4
|
+
import './auth-store.js';
|
|
5
|
+
import { i as instance } from './i18n.js';
|
|
6
|
+
import { U as UnidyComponent } from './logger.js';
|
|
7
|
+
import { u as unidyState } from './unidy-store.js';
|
|
8
|
+
import { _ as captureException } from './exports.js';
|
|
9
|
+
|
|
10
|
+
const UnidyConfig = /*@__PURE__*/ proxyCustomElement(class UnidyConfig extends UnidyComponent {
|
|
11
|
+
constructor(registerHost) {
|
|
12
|
+
super();
|
|
13
|
+
if (registerHost !== false) {
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
}
|
|
16
|
+
this.unidyInitialized = createEvent(this, "unidyInitialized", 7);
|
|
17
|
+
this.configChange = createEvent(this, "configChange", 7);
|
|
18
|
+
}
|
|
19
|
+
mode = "production";
|
|
20
|
+
baseUrl = "";
|
|
21
|
+
apiKey = "";
|
|
22
|
+
customTranslations = "";
|
|
23
|
+
fallbackLocale = "en";
|
|
24
|
+
locale = "en";
|
|
25
|
+
checkSignedIn = false;
|
|
26
|
+
unidyInitialized;
|
|
27
|
+
configChange;
|
|
28
|
+
async componentWillLoad() {
|
|
29
|
+
if (!this.baseUrl || !this.apiKey) {
|
|
30
|
+
this.logger.error("baseUrl and apiKey are required");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
unidyState.apiKey = this.apiKey;
|
|
34
|
+
unidyState.baseUrl = this.baseUrl;
|
|
35
|
+
unidyState.locale = this.locale;
|
|
36
|
+
unidyState.isConfigured = true;
|
|
37
|
+
this.unidyInitialized.emit({
|
|
38
|
+
apiKey: this.apiKey,
|
|
39
|
+
baseUrl: this.baseUrl,
|
|
40
|
+
locale: this.locale,
|
|
41
|
+
mode: this.mode,
|
|
42
|
+
});
|
|
43
|
+
instance.options.fallbackLng = this.fallbackLocale;
|
|
44
|
+
this.loadCustomTranslations();
|
|
45
|
+
unidyState.locale = this.locale;
|
|
46
|
+
const auth = await Auth.initialize(getUnidyClient());
|
|
47
|
+
if (this.checkSignedIn) {
|
|
48
|
+
auth.helpers.checkSignedIn();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// extend the list of properties that should be watched when new properties are added to the Config
|
|
52
|
+
onPropChange(newValue, oldValue, propName) {
|
|
53
|
+
if (oldValue === undefined)
|
|
54
|
+
return;
|
|
55
|
+
if (propName in unidyState) {
|
|
56
|
+
unidyState[propName] = newValue;
|
|
57
|
+
}
|
|
58
|
+
this.configChange.emit({
|
|
59
|
+
key: propName,
|
|
60
|
+
value: newValue,
|
|
61
|
+
previousValue: oldValue,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return h("slot", { key: 'de45e5c349c49f10aea1005f15edcdda4a32bbaa' });
|
|
66
|
+
}
|
|
67
|
+
loadCustomTranslations() {
|
|
68
|
+
if (this.customTranslations) {
|
|
69
|
+
try {
|
|
70
|
+
const translations = typeof this.customTranslations === "string" ? JSON.parse(this.customTranslations) : this.customTranslations;
|
|
71
|
+
for (const lang in translations) {
|
|
72
|
+
if (Object.hasOwn(translations, lang)) {
|
|
73
|
+
instance.addResourceBundle(lang, "translation", translations[lang], true, true);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
captureException("Failed to parse customTranslations", error);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
static get watchers() { return {
|
|
83
|
+
"mode": ["onPropChange"],
|
|
84
|
+
"locale": ["onPropChange"]
|
|
85
|
+
}; }
|
|
86
|
+
}, [772, "u-config", {
|
|
87
|
+
"mode": [1],
|
|
88
|
+
"baseUrl": [1, "base-url"],
|
|
89
|
+
"apiKey": [1, "api-key"],
|
|
90
|
+
"customTranslations": [1, "custom-translations"],
|
|
91
|
+
"fallbackLocale": [1, "fallback-locale"],
|
|
92
|
+
"locale": [1],
|
|
93
|
+
"checkSignedIn": [4, "check-signed-in"]
|
|
94
|
+
}, undefined, {
|
|
95
|
+
"mode": ["onPropChange"],
|
|
96
|
+
"locale": ["onPropChange"]
|
|
97
|
+
}]);
|
|
98
|
+
function defineCustomElement$1() {
|
|
99
|
+
if (typeof customElements === "undefined") {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const components = ["u-config"];
|
|
103
|
+
components.forEach(tagName => { switch (tagName) {
|
|
104
|
+
case "u-config":
|
|
105
|
+
if (!customElements.get(tagName)) {
|
|
106
|
+
customElements.define(tagName, UnidyConfig);
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
} });
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const UConfig = UnidyConfig;
|
|
113
|
+
const defineCustomElement = defineCustomElement$1;
|
|
114
|
+
|
|
115
|
+
export { UConfig, defineCustomElement };
|
|
116
|
+
//# sourceMappingURL=u-config.js.map
|
|
117
|
+
|
|
118
|
+
//# sourceMappingURL=u-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"u-config.js","mappings":";;;;;;;;;MA6Ba,WAAY,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAQ,cAAc,CAAA;;;;;;;;;IACrC,IAAI,GAAiC,YAAY;IACjD,OAAO,GAAG,EAAE;IACZ,MAAM,GAAG,EAAE;IACX,kBAAkB,GAA6C,EAAE;IACjE,cAAc,GAAG,IAAI;IACrB,MAAM,GAAG,IAAI;IACb,aAAa,GAAG,KAAK;AAEpB,IAAA,gBAAgB;AAChB,IAAA,YAAY;AAErB,IAAA,MAAM,iBAAiB,GAAA;QACrB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AACjC,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAA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AC3B,YAAA,IAAI;gBACF,MAAM,YAAY,GAAG,OAAO,IAAI,CAAC,kBAAkB,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,kBAAkB;AAEhI,gBAAA,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;oBAC/B,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;AACrC,wBAAAA,QAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;;;;YAG/E,OAAO,KAAK,EAAE;AACd,gBAAAC,gBAAuB,CAAC,oCAAoC,EAAE,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","i18n","Sentry.captureException"],"sources":["src/shared/components/config/config.tsx"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\nimport { Component, Event, type EventEmitter, h, Prop, Watch } from \"@stencil/core\";\nimport { getUnidyClient } from \"../../../api/\";\nimport { Auth } from \"../../../auth\";\nimport i18n from \"../../../i18n\";\nimport { UnidyComponent } from \"../../../logger\";\nimport { unidyState } from \"../../store/unidy-store\";\n\nexport interface Config {\n apiKey: string;\n baseUrl: string;\n locale: string;\n mode: \"production\" | \"development\";\n}\n\nexport interface ConfigChange {\n key: string;\n value: string;\n previousValue: string;\n}\n\ntype TranslationTree = {\n [key: string]: string | TranslationTree;\n};\n\n@Component({\n tag: \"u-config\",\n shadow: false,\n})\nexport class UnidyConfig extends UnidyComponent {\n @Prop() mode: \"production\" | \"development\" = \"production\";\n @Prop() baseUrl = \"\";\n @Prop() apiKey = \"\";\n @Prop() customTranslations: string | Record<string, TranslationTree> = \"\";\n @Prop() fallbackLocale = \"en\";\n @Prop() locale = \"en\";\n @Prop() checkSignedIn = false;\n\n @Event() unidyInitialized!: EventEmitter<Config>;\n @Event() configChange!: EventEmitter<ConfigChange>;\n\n async componentWillLoad() {\n if (!this.baseUrl || !this.apiKey) {\n this.logger.error(\"baseUrl and apiKey are required\");\n return;\n }\n\n unidyState.apiKey = this.apiKey;\n unidyState.baseUrl = this.baseUrl;\n unidyState.locale = this.locale;\n unidyState.isConfigured = true;\n\n this.unidyInitialized.emit({\n apiKey: this.apiKey,\n baseUrl: this.baseUrl,\n locale: this.locale,\n mode: this.mode,\n });\n\n i18n.options.fallbackLng = this.fallbackLocale;\n\n this.loadCustomTranslations();\n unidyState.locale = this.locale;\n\n const auth = await Auth.initialize(getUnidyClient());\n\n if (this.checkSignedIn) {\n auth.helpers.checkSignedIn();\n }\n }\n\n // extend the list of properties that should be watched when new properties are added to the Config\n @Watch(\"mode\")\n @Watch(\"locale\")\n onPropChange(newValue: string, oldValue: string, propName: keyof Config) {\n if (oldValue === undefined) return;\n\n if (propName in unidyState) {\n (unidyState as Record<keyof Config, string>)[propName] = newValue;\n }\n\n this.configChange.emit({\n key: propName,\n value: newValue,\n previousValue: oldValue,\n });\n }\n\n render() {\n return <slot />;\n }\n\n private loadCustomTranslations() {\n if (this.customTranslations) {\n try {\n const translations = typeof this.customTranslations === \"string\" ? JSON.parse(this.customTranslations) : this.customTranslations;\n\n for (const lang in translations) {\n if (Object.hasOwn(translations, lang)) {\n i18n.addResourceBundle(lang, \"translation\", translations[lang], true, true);\n }\n }\n } catch (error) {\n Sentry.captureException(\"Failed to parse customTranslations\", error);\n }\n }\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UEmailField extends Components.UEmailField, HTMLElement {}
|
|
4
|
+
export const UEmailField: {
|
|
5
|
+
prototype: UEmailField;
|
|
6
|
+
new (): UEmailField;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|