@unidy.io/sdk 1.1.1-alpha2 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{esm/auth-DLKPv5Zm.js → sdk/auth-Che07PeV.js} +9 -9
- package/dist/{esm/auth-DLKPv5Zm.js.map → sdk/auth-Che07PeV.js.map} +1 -1
- package/dist/{components/auth-store.js → sdk/auth-store-CapiC8gJ.js} +4 -4
- package/dist/{esm/auth-store-BMqUdTpC.js.map → sdk/auth-store-CapiC8gJ.js.map} +1 -1
- package/dist/{components/flash-store.js → sdk/flash-store-DNcSEn2p.js} +4 -3
- package/dist/{esm/flash-store-CEvWSG0c.js.map → sdk/flash-store-DNcSEn2p.js.map} +1 -1
- package/dist/{components/i18n.js → sdk/i18n-BCI_ARJL.js} +25 -5
- package/dist/sdk/i18n-BCI_ARJL.js.map +1 -0
- package/dist/{esm/index-Bjp1XO-f.js → sdk/index-BnBstyfp.js} +3 -3
- package/dist/{esm/index-Bjp1XO-f.js.map → sdk/index-BnBstyfp.js.map} +1 -1
- package/dist/sdk/index-BqL27K_R.js +49640 -0
- package/dist/sdk/index-BqL27K_R.js.map +1 -0
- package/dist/{collection/auth/error-definitions.js → sdk/index-Cz3idqu9.js} +19 -2
- package/dist/sdk/index-Cz3idqu9.js.map +1 -0
- package/dist/sdk/index-gEcJztft.js +15349 -0
- package/dist/sdk/index-gEcJztft.js.map +1 -0
- package/dist/sdk/index.esm.js +22 -2
- package/dist/sdk/index.esm.js.map +1 -1
- package/dist/sdk/loader.esm.js.map +1 -1
- package/dist/sdk/locales/de.json +1 -0
- package/dist/sdk/locales/en.json +1 -0
- package/dist/sdk/locales/fr.json +1 -0
- package/dist/sdk/locales/it.json +1 -0
- package/dist/sdk/locales/nl_be.json +1 -0
- package/dist/sdk/locales/ro.json +1 -0
- package/dist/{esm/newsletter-helpers-Dh9k-4Ph.js → sdk/newsletter-helpers-DEXEBD0F.js} +16 -9
- package/dist/sdk/newsletter-helpers-DEXEBD0F.js.map +1 -0
- package/dist/sdk/newsletter-store-CvULKmsu.js +39 -0
- package/dist/sdk/newsletter-store-CvULKmsu.js.map +1 -0
- package/dist/{components/profile-helpers.js → sdk/profile-helpers-Bs3aj0CO.js} +4 -4
- package/dist/{esm/profile-helpers-7onubaoR.js.map → sdk/profile-helpers-Bs3aj0CO.js.map} +1 -1
- package/dist/{components/profile-store.js → sdk/profile-store-DD6sq42i.js} +3 -3
- package/dist/{esm/profile-store-RmZB2PTc.js.map → sdk/profile-store-DD6sq42i.js.map} +1 -1
- package/dist/sdk/sdk.esm.js +48 -2
- package/dist/sdk/sdk.esm.js.map +1 -1
- package/dist/sdk/u-conditional-render.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-conditional-render.entry.js +13 -12
- package/dist/sdk/u-config.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-config.entry.js +13 -12
- package/dist/sdk/u-email-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-email-field.entry.js +75 -0
- package/dist/{esm → sdk}/u-error-message.entry.js +7 -7
- package/dist/sdk/u-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-field.entry.js +101 -0
- package/dist/sdk/u-flash-message.entry.esm.js.map +1 -1
- package/dist/sdk/u-flash-message.entry.js +35 -0
- package/dist/sdk/u-full-profile.entry.esm.js.map +1 -1
- package/dist/sdk/u-full-profile.entry.js +35 -0
- package/dist/{esm → sdk}/u-logout-button.entry.js +11 -11
- package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-magic-code-field.entry.js +10 -10
- package/dist/{esm → sdk}/u-missing-field.entry.js +5 -5
- package/dist/{esm → sdk}/u-missing-fields-submit-button.entry.js +9 -9
- package/dist/sdk/u-newsletter-checkbox.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-newsletter-checkbox.entry.js +25 -37
- package/dist/{esm → sdk}/u-newsletter-logout-button.entry.js +12 -12
- package/dist/sdk/u-newsletter-preference-checkbox.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-newsletter-preference-checkbox.entry.js +22 -33
- package/dist/sdk/u-newsletter-resend-doi-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-resend-doi-button.entry.js +47 -0
- package/dist/sdk/u-newsletter-root.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-newsletter-root.entry.js +19 -33
- package/dist/sdk/u-newsletter-toggle-subscription-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-toggle-subscription-button.entry.js +71 -0
- package/dist/{esm → sdk}/u-pagination-button.entry.js +2 -2
- package/dist/{esm → sdk}/u-pagination-page.entry.js +2 -2
- package/dist/{esm → sdk}/u-passkey.entry.js +10 -10
- package/dist/{esm → sdk}/u-password-field.entry.js +6 -6
- package/dist/sdk/u-profile.entry.esm.js.map +1 -0
- package/dist/{components/profile.js → sdk/u-profile.entry.js} +18 -38
- package/dist/sdk/u-raw-field.entry.esm.js.map +1 -0
- package/dist/{components/raw-field.js → sdk/u-raw-field.entry.js} +10 -51
- package/dist/{esm → sdk}/u-registration-button.entry.js +6 -6
- package/dist/{esm → sdk}/u-reset-password-button.entry.js +10 -10
- package/dist/{esm → sdk}/u-send-magic-code-button.entry.js +10 -10
- package/dist/{esm → sdk}/u-signed-in.entry.js +5 -5
- package/dist/{esm → sdk}/u-signin-root.entry.js +7 -7
- package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-signin-step.entry.js +11 -10
- package/dist/{esm → sdk}/u-signin-strategy.entry.js +5 -5
- package/dist/{esm → sdk}/u-social-login-button.entry.js +6 -6
- package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-spinner.entry.js +3 -3
- package/dist/sdk/u-submit-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-submit-button.entry.js +204 -0
- package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
- package/dist/{esm → sdk}/u-ticketable-list.entry.js +141 -73
- package/dist/{components/unidy-store.js → sdk/unidy-store-BwZym11Y.js} +4 -3
- package/dist/{esm/unidy-store-BldTAtO0.js.map → sdk/unidy-store-BwZym11Y.js.map} +1 -1
- package/dist/types/components.d.ts +0 -36
- package/dist/types/newsletter/components/newsletter-checkbox/newsletter-checkbox.d.ts +0 -5
- package/dist/types/newsletter/components/newsletter-root/newsletter-root.d.ts +0 -9
- package/dist/types/newsletter/components/preference-checkbox/preference-checkbox.d.ts +0 -5
- package/dist/types/newsletter/newsletter-helpers.d.ts +1 -1
- package/dist/types/newsletter/store/newsletter-store.d.ts +3 -0
- package/dist/types/shared/components/email-field/email-field.d.ts +0 -2
- package/package.json +1 -1
- package/dist/cjs/app-globals-DSKjcXX_.js +0 -10
- package/dist/cjs/app-globals-DSKjcXX_.js.map +0 -1
- package/dist/cjs/auth-BVKZHhXz.js +0 -573
- package/dist/cjs/auth-BVKZHhXz.js.map +0 -1
- package/dist/cjs/auth-store-DC9EVec8.js +0 -184
- package/dist/cjs/auth-store-DC9EVec8.js.map +0 -1
- package/dist/cjs/component-utils-BpMyeVQo.js +0 -35
- package/dist/cjs/component-utils-BpMyeVQo.js.map +0 -1
- package/dist/cjs/flash-store-BuIBuQDx.js +0 -50
- package/dist/cjs/flash-store-BuIBuQDx.js.map +0 -1
- package/dist/cjs/helpers-BcPlKlBG.js +0 -11
- package/dist/cjs/helpers-BcPlKlBG.js.map +0 -1
- package/dist/cjs/helpers-DJyRa0Qo.js +0 -11
- package/dist/cjs/helpers-DJyRa0Qo.js.map +0 -1
- package/dist/cjs/i18n-Xy1So-ba.js +0 -3224
- package/dist/cjs/i18n-Xy1So-ba.js.map +0 -1
- package/dist/cjs/index-B_N5xKgH.js +0 -12025
- package/dist/cjs/index-B_N5xKgH.js.map +0 -1
- package/dist/cjs/index-DLz3FT7T.js +0 -214
- package/dist/cjs/index-DLz3FT7T.js.map +0 -1
- package/dist/cjs/index-DiUlebpf.js +0 -5256
- package/dist/cjs/index-DiUlebpf.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -64
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -14
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/newsletter-helpers-D34j8zxr.js +0 -280
- package/dist/cjs/newsletter-helpers-D34j8zxr.js.map +0 -1
- package/dist/cjs/newsletter-store-dhtu8ywO.js +0 -27
- package/dist/cjs/newsletter-store-dhtu8ywO.js.map +0 -1
- package/dist/cjs/pagination-store-BEiW3MQd.js +0 -16
- package/dist/cjs/pagination-store-BEiW3MQd.js.map +0 -1
- package/dist/cjs/profile-helpers-DrcTgN5n.js +0 -39
- package/dist/cjs/profile-helpers-DrcTgN5n.js.map +0 -1
- package/dist/cjs/profile-store-P_BcYkef.js +0 -22
- package/dist/cjs/profile-store-P_BcYkef.js.map +0 -1
- package/dist/cjs/sdk.cjs.js +0 -26
- package/dist/cjs/sdk.cjs.js.map +0 -1
- package/dist/cjs/u-conditional-render.cjs.entry.js +0 -102
- package/dist/cjs/u-conditional-render.entry.cjs.js.map +0 -1
- package/dist/cjs/u-config.cjs.entry.js +0 -87
- package/dist/cjs/u-config.entry.cjs.js.map +0 -1
- package/dist/cjs/u-email-field.cjs.entry.js +0 -75
- package/dist/cjs/u-email-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-error-message.cjs.entry.js +0 -82
- package/dist/cjs/u-error-message.entry.cjs.js.map +0 -1
- package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-field_2.cjs.entry.js +0 -375
- package/dist/cjs/u-flash-message.cjs.entry.js +0 -34
- package/dist/cjs/u-flash-message.entry.cjs.js.map +0 -1
- package/dist/cjs/u-full-profile.cjs.entry.js +0 -36
- package/dist/cjs/u-full-profile.entry.cjs.js.map +0 -1
- package/dist/cjs/u-logout-button.cjs.entry.js +0 -38
- package/dist/cjs/u-logout-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-magic-code-field.cjs.entry.js +0 -91
- package/dist/cjs/u-magic-code-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-missing-field.cjs.entry.js +0 -22
- package/dist/cjs/u-missing-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +0 -46
- package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +0 -75
- package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +0 -36
- package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +0 -117
- package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +0 -46
- package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-root.cjs.entry.js +0 -86
- package/dist/cjs/u-newsletter-root.entry.cjs.js.map +0 -1
- package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +0 -70
- package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-pagination-button.cjs.entry.js +0 -63
- package/dist/cjs/u-pagination-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-pagination-page.cjs.entry.js +0 -44
- package/dist/cjs/u-pagination-page.entry.cjs.js.map +0 -1
- package/dist/cjs/u-passkey.cjs.entry.js +0 -47
- package/dist/cjs/u-passkey.entry.cjs.js.map +0 -1
- package/dist/cjs/u-password-field.cjs.entry.js +0 -104
- package/dist/cjs/u-password-field.entry.cjs.js.map +0 -1
- package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-profile_2.cjs.entry.js +0 -311
- package/dist/cjs/u-registration-button.cjs.entry.js +0 -48
- package/dist/cjs/u-registration-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-reset-password-button.cjs.entry.js +0 -47
- package/dist/cjs/u-reset-password-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-send-magic-code-button.cjs.entry.js +0 -68
- package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signed-in.cjs.entry.js +0 -25
- package/dist/cjs/u-signed-in.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signin-root.cjs.entry.js +0 -43
- package/dist/cjs/u-signin-root.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signin-step.cjs.entry.js +0 -66
- package/dist/cjs/u-signin-step.entry.cjs.js.map +0 -1
- package/dist/cjs/u-signin-strategy.cjs.entry.js +0 -30
- package/dist/cjs/u-signin-strategy.entry.cjs.js.map +0 -1
- package/dist/cjs/u-social-login-button.cjs.entry.js +0 -100
- package/dist/cjs/u-social-login-button.entry.cjs.js.map +0 -1
- package/dist/cjs/u-spinner.cjs.entry.js +0 -18
- package/dist/cjs/u-spinner.entry.cjs.js.map +0 -1
- package/dist/cjs/u-ticketable-list.cjs.entry.js +0 -6078
- package/dist/cjs/u-ticketable-list.entry.cjs.js.map +0 -1
- package/dist/cjs/unidy-store-7AbWnZ6g.js +0 -41
- package/dist/cjs/unidy-store-7AbWnZ6g.js.map +0 -1
- package/dist/collection/api/client.js +0 -144
- package/dist/collection/api/client.js.map +0 -1
- package/dist/collection/api/index.js +0 -42
- package/dist/collection/api/index.js.map +0 -1
- package/dist/collection/api/shared.js +0 -18
- package/dist/collection/api/shared.js.map +0 -1
- package/dist/collection/auth/api/auth.js +0 -264
- package/dist/collection/auth/api/auth.js.map +0 -1
- package/dist/collection/auth/auth-helpers.js +0 -291
- package/dist/collection/auth/auth-helpers.js.map +0 -1
- package/dist/collection/auth/auth.js +0 -121
- package/dist/collection/auth/auth.js.map +0 -1
- package/dist/collection/auth/components/helpers.js +0 -5
- package/dist/collection/auth/components/helpers.js.map +0 -1
- package/dist/collection/auth/components/logout-button/logout-button.js +0 -85
- package/dist/collection/auth/components/logout-button/logout-button.js.map +0 -1
- package/dist/collection/auth/components/magic-code-field/magic-code-field.css +0 -1
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js +0 -113
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js.map +0 -1
- package/dist/collection/auth/components/missing-field/missing-field.js +0 -14
- package/dist/collection/auth/components/missing-field/missing-field.js.map +0 -1
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +0 -39
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +0 -1
- package/dist/collection/auth/components/passkey/passkey.js +0 -103
- package/dist/collection/auth/components/passkey/passkey.js.map +0 -1
- package/dist/collection/auth/components/password-field/password-field.js +0 -166
- package/dist/collection/auth/components/password-field/password-field.js.map +0 -1
- package/dist/collection/auth/components/registration/registration-button.js +0 -104
- package/dist/collection/auth/components/registration/registration-button.js.map +0 -1
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +0 -59
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +0 -1
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js +0 -104
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js.map +0 -1
- package/dist/collection/auth/components/signed-in/signed-in.js +0 -59
- package/dist/collection/auth/components/signed-in/signed-in.js.map +0 -1
- package/dist/collection/auth/components/signin-root/signin-root.js +0 -97
- package/dist/collection/auth/components/signin-root/signin-root.js.map +0 -1
- package/dist/collection/auth/components/signin-step/signin-step.js +0 -135
- package/dist/collection/auth/components/signin-step/signin-step.js.map +0 -1
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js +0 -64
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/apple.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/apple.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/discord.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/discord.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/facebook.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/facebook.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/google.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/google.js.map +0 -1
- package/dist/collection/auth/components/social-logins/logos/linkedin.js +0 -3
- package/dist/collection/auth/components/social-logins/logos/linkedin.js.map +0 -1
- package/dist/collection/auth/components/social-logins/social-login-button.css +0 -1
- package/dist/collection/auth/components/social-logins/social-login-button.js +0 -188
- package/dist/collection/auth/components/social-logins/social-login-button.js.map +0 -1
- package/dist/collection/auth/components/submit-button/auth-submit-button.js +0 -62
- package/dist/collection/auth/components/submit-button/auth-submit-button.js.map +0 -1
- package/dist/collection/auth/error-definitions.js.map +0 -1
- package/dist/collection/auth/index.js +0 -14
- package/dist/collection/auth/index.js.map +0 -1
- package/dist/collection/auth/passkey-auth.js +0 -106
- package/dist/collection/auth/passkey-auth.js.map +0 -1
- package/dist/collection/auth/store/auth-store.js +0 -175
- package/dist/collection/auth/store/auth-store.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -46
- package/dist/collection/globalScript.js +0 -18
- package/dist/collection/globalScript.js.map +0 -1
- package/dist/collection/i18n.js +0 -31
- package/dist/collection/i18n.js.map +0 -1
- package/dist/collection/index.js +0 -16
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/locales/de.json +0 -131
- package/dist/collection/locales/en.json +0 -131
- package/dist/collection/locales/fr.json +0 -131
- package/dist/collection/locales/it.json +0 -131
- package/dist/collection/locales/nl_be.json +0 -131
- package/dist/collection/locales/ro.json +0 -131
- package/dist/collection/logger.js +0 -106
- package/dist/collection/logger.js.map +0 -1
- package/dist/collection/newsletter/api/newsletters.js +0 -189
- package/dist/collection/newsletter/api/newsletters.js.map +0 -1
- package/dist/collection/newsletter/components/helpers.js +0 -5
- package/dist/collection/newsletter/components/helpers.js.map +0 -1
- package/dist/collection/newsletter/components/logout-button/logout-button.js +0 -48
- package/dist/collection/newsletter/components/logout-button/logout-button.js.map +0 -1
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +0 -163
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js.map +0 -1
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js +0 -164
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js.map +0 -1
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js +0 -231
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js.map +0 -1
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js +0 -79
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js.map +0 -1
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js +0 -19
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js.map +0 -1
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js +0 -144
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js.map +0 -1
- package/dist/collection/newsletter/index.js +0 -11
- package/dist/collection/newsletter/index.js.map +0 -1
- package/dist/collection/newsletter/newsletter-helpers.js +0 -268
- package/dist/collection/newsletter/newsletter-helpers.js.map +0 -1
- package/dist/collection/newsletter/store/newsletter-store.js +0 -24
- package/dist/collection/newsletter/store/newsletter-store.js.map +0 -1
- package/dist/collection/profile/api/profile.js +0 -156
- package/dist/collection/profile/api/profile.js.map +0 -1
- package/dist/collection/profile/components/field/field.css +0 -1
- package/dist/collection/profile/components/field/field.js +0 -359
- package/dist/collection/profile/components/field/field.js.map +0 -1
- package/dist/collection/profile/components/full-profile/full-profile.css +0 -1
- package/dist/collection/profile/components/full-profile/full-profile.js +0 -77
- package/dist/collection/profile/components/full-profile/full-profile.js.map +0 -1
- package/dist/collection/profile/components/profile/profile.js +0 -189
- package/dist/collection/profile/components/profile/profile.js.map +0 -1
- package/dist/collection/profile/components/raw-field/raw-field.js +0 -697
- package/dist/collection/profile/components/raw-field/raw-field.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/Input.js +0 -3
- package/dist/collection/profile/components/raw-input-fields/Input.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js +0 -8
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js +0 -8
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/Select.js +0 -11
- package/dist/collection/profile/components/raw-input-fields/Select.js.map +0 -1
- package/dist/collection/profile/components/raw-input-fields/Textarea.js +0 -3
- package/dist/collection/profile/components/raw-input-fields/Textarea.js.map +0 -1
- package/dist/collection/profile/components/submit-button/profile-submit-button.js +0 -17
- package/dist/collection/profile/components/submit-button/profile-submit-button.js.map +0 -1
- package/dist/collection/profile/index.js +0 -13
- package/dist/collection/profile/index.js.map +0 -1
- package/dist/collection/profile/profile-helpers.js +0 -31
- package/dist/collection/profile/profile-helpers.js.map +0 -1
- package/dist/collection/profile/store/profile-store.js +0 -15
- package/dist/collection/profile/store/profile-store.js.map +0 -1
- package/dist/collection/sdk.css +0 -39
- package/dist/collection/shared/component-utils.js +0 -28
- package/dist/collection/shared/component-utils.js.map +0 -1
- package/dist/collection/shared/components/conditional-render/conditional-render.js +0 -177
- package/dist/collection/shared/components/conditional-render/conditional-render.js.map +0 -1
- package/dist/collection/shared/components/config/config.js +0 -260
- package/dist/collection/shared/components/config/config.js.map +0 -1
- package/dist/collection/shared/components/email-field/email-field.js +0 -161
- package/dist/collection/shared/components/email-field/email-field.js.map +0 -1
- package/dist/collection/shared/components/error-message/error-message.js +0 -141
- package/dist/collection/shared/components/error-message/error-message.js.map +0 -1
- package/dist/collection/shared/components/flash-message/close-icon.js +0 -3
- package/dist/collection/shared/components/flash-message/close-icon.js.map +0 -1
- package/dist/collection/shared/components/flash-message/flash-message.js +0 -69
- package/dist/collection/shared/components/flash-message/flash-message.js.map +0 -1
- package/dist/collection/shared/components/spinner/spinner.css +0 -1
- package/dist/collection/shared/components/spinner/spinner.js +0 -19
- package/dist/collection/shared/components/spinner/spinner.js.map +0 -1
- package/dist/collection/shared/components/submit-button/context.js +0 -10
- package/dist/collection/shared/components/submit-button/context.js.map +0 -1
- package/dist/collection/shared/components/submit-button/submit-button.js +0 -186
- package/dist/collection/shared/components/submit-button/submit-button.js.map +0 -1
- package/dist/collection/shared/store/flash-store.js +0 -43
- package/dist/collection/shared/store/flash-store.js.map +0 -1
- package/dist/collection/shared/store/unidy-store.js +0 -33
- package/dist/collection/shared/store/unidy-store.js.map +0 -1
- package/dist/collection/ticketable/api/get-with-schema.js +0 -35
- package/dist/collection/ticketable/api/get-with-schema.js.map +0 -1
- package/dist/collection/ticketable/api/schemas.js +0 -12
- package/dist/collection/ticketable/api/schemas.js.map +0 -1
- package/dist/collection/ticketable/api/subscriptions.js +0 -47
- package/dist/collection/ticketable/api/subscriptions.js.map +0 -1
- package/dist/collection/ticketable/api/tickets.js +0 -48
- package/dist/collection/ticketable/api/tickets.js.map +0 -1
- package/dist/collection/ticketable/components/pagination/pagination-button.js +0 -108
- package/dist/collection/ticketable/components/pagination/pagination-button.js.map +0 -1
- package/dist/collection/ticketable/components/pagination/pagination-page.js +0 -69
- package/dist/collection/ticketable/components/pagination/pagination-page.js.map +0 -1
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js +0 -54
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js.map +0 -1
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +0 -442
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +0 -1
- package/dist/collection/ticketable/index.js +0 -13
- package/dist/collection/ticketable/index.js.map +0 -1
- package/dist/collection/ticketable/store/pagination-store.js +0 -9
- package/dist/collection/ticketable/store/pagination-store.js.map +0 -1
- package/dist/components/auth-store.js.map +0 -1
- package/dist/components/auth.js +0 -572
- package/dist/components/auth.js.map +0 -1
- package/dist/components/component-utils.js +0 -32
- package/dist/components/component-utils.js.map +0 -1
- package/dist/components/exports.js +0 -4106
- package/dist/components/exports.js.map +0 -1
- package/dist/components/field.js +0 -144
- package/dist/components/field.js.map +0 -1
- package/dist/components/flash-store.js.map +0 -1
- package/dist/components/helpers.js +0 -9
- package/dist/components/helpers.js.map +0 -1
- package/dist/components/helpers2.js +0 -9
- package/dist/components/helpers2.js.map +0 -1
- package/dist/components/i18n.js.map +0 -1
- package/dist/components/index.js +0 -5902
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js +0 -5245
- package/dist/components/index2.js.map +0 -1
- package/dist/components/index3.js +0 -212
- package/dist/components/index3.js.map +0 -1
- package/dist/components/logger.js +0 -111
- package/dist/components/logger.js.map +0 -1
- package/dist/components/newsletter-helpers.js +0 -269
- package/dist/components/newsletter-helpers.js.map +0 -1
- package/dist/components/newsletter-store.js +0 -24
- package/dist/components/newsletter-store.js.map +0 -1
- package/dist/components/pagination-store.js +0 -14
- package/dist/components/pagination-store.js.map +0 -1
- package/dist/components/profile-helpers.js.map +0 -1
- package/dist/components/profile-store.js.map +0 -1
- package/dist/components/profile.js.map +0 -1
- package/dist/components/raw-field.js.map +0 -1
- package/dist/components/spinner.js +0 -35
- package/dist/components/spinner.js.map +0 -1
- package/dist/components/submit-button.js +0 -229
- package/dist/components/submit-button.js.map +0 -1
- package/dist/components/u-conditional-render.js +0 -120
- package/dist/components/u-conditional-render.js.map +0 -1
- package/dist/components/u-config.js +0 -113
- package/dist/components/u-config.js.map +0 -1
- package/dist/components/u-email-field.js +0 -98
- package/dist/components/u-email-field.js.map +0 -1
- package/dist/components/u-error-message.js +0 -105
- package/dist/components/u-error-message.js.map +0 -1
- package/dist/components/u-field.js +0 -9
- package/dist/components/u-field.js.map +0 -1
- package/dist/components/u-flash-message.js +0 -55
- package/dist/components/u-flash-message.js.map +0 -1
- package/dist/components/u-full-profile.js +0 -86
- package/dist/components/u-full-profile.js.map +0 -1
- package/dist/components/u-logout-button.js +0 -53
- package/dist/components/u-logout-button.js.map +0 -1
- package/dist/components/u-magic-code-field.js +0 -106
- package/dist/components/u-magic-code-field.js.map +0 -1
- package/dist/components/u-missing-field.js +0 -57
- package/dist/components/u-missing-field.js.map +0 -1
- package/dist/components/u-missing-fields-submit-button.js +0 -70
- package/dist/components/u-missing-fields-submit-button.js.map +0 -1
- package/dist/components/u-newsletter-checkbox.js +0 -91
- package/dist/components/u-newsletter-checkbox.js.map +0 -1
- package/dist/components/u-newsletter-logout-button.js +0 -51
- package/dist/components/u-newsletter-logout-button.js.map +0 -1
- package/dist/components/u-newsletter-preference-checkbox.js +0 -137
- package/dist/components/u-newsletter-preference-checkbox.js.map +0 -1
- package/dist/components/u-newsletter-resend-doi-button.js +0 -67
- package/dist/components/u-newsletter-resend-doi-button.js.map +0 -1
- package/dist/components/u-newsletter-root.js +0 -104
- package/dist/components/u-newsletter-root.js.map +0 -1
- package/dist/components/u-newsletter-toggle-subscription-button.js +0 -94
- package/dist/components/u-newsletter-toggle-subscription-button.js.map +0 -1
- package/dist/components/u-pagination-button.js +0 -86
- package/dist/components/u-pagination-button.js.map +0 -1
- package/dist/components/u-pagination-page.js +0 -66
- package/dist/components/u-pagination-page.js.map +0 -1
- package/dist/components/u-passkey.js +0 -65
- package/dist/components/u-passkey.js.map +0 -1
- package/dist/components/u-password-field.js +0 -125
- package/dist/components/u-password-field.js.map +0 -1
- package/dist/components/u-profile.js +0 -9
- package/dist/components/u-profile.js.map +0 -1
- package/dist/components/u-raw-field.js +0 -9
- package/dist/components/u-raw-field.js.map +0 -1
- package/dist/components/u-registration-button.js +0 -70
- package/dist/components/u-registration-button.js.map +0 -1
- package/dist/components/u-reset-password-button.js +0 -63
- package/dist/components/u-reset-password-button.js.map +0 -1
- package/dist/components/u-send-magic-code-button.js +0 -85
- package/dist/components/u-send-magic-code-button.js.map +0 -1
- package/dist/components/u-signed-in.js +0 -44
- package/dist/components/u-signed-in.js.map +0 -1
- package/dist/components/u-signin-root.js +0 -63
- package/dist/components/u-signin-root.js.map +0 -1
- package/dist/components/u-signin-step.js +0 -84
- package/dist/components/u-signin-step.js.map +0 -1
- package/dist/components/u-signin-strategy.js +0 -50
- package/dist/components/u-signin-strategy.js.map +0 -1
- package/dist/components/u-social-login-button.js +0 -125
- package/dist/components/u-social-login-button.js.map +0 -1
- package/dist/components/u-spinner.js +0 -9
- package/dist/components/u-spinner.js.map +0 -1
- package/dist/components/u-submit-button.js +0 -9
- package/dist/components/u-submit-button.js.map +0 -1
- package/dist/components/u-ticketable-list.js +0 -6113
- package/dist/components/u-ticketable-list.js.map +0 -1
- package/dist/components/unidy-store.js.map +0 -1
- package/dist/esm/app-globals-CPU9ZcqZ.js +0 -8
- package/dist/esm/app-globals-CPU9ZcqZ.js.map +0 -1
- package/dist/esm/auth-store-BMqUdTpC.js +0 -179
- package/dist/esm/flash-store-CEvWSG0c.js +0 -47
- package/dist/esm/i18n-BR-AGAnn.js +0 -3221
- package/dist/esm/i18n-BR-AGAnn.js.map +0 -1
- package/dist/esm/index-Ci3aTmzp.js +0 -12007
- package/dist/esm/index-Ci3aTmzp.js.map +0 -1
- package/dist/esm/index-DKaIwo59.js +0 -5243
- package/dist/esm/index-DKaIwo59.js.map +0 -1
- package/dist/esm/index.js +0 -40
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -12
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/newsletter-helpers-Dh9k-4Ph.js.map +0 -1
- package/dist/esm/newsletter-store-BYmuLQg8.js +0 -24
- package/dist/esm/newsletter-store-BYmuLQg8.js.map +0 -1
- package/dist/esm/pagination-store-DzdJOp-n.js +0 -14
- package/dist/esm/pagination-store-DzdJOp-n.js.map +0 -1
- package/dist/esm/profile-helpers-7onubaoR.js +0 -36
- package/dist/esm/profile-store-RmZB2PTc.js +0 -18
- package/dist/esm/sdk.js +0 -22
- package/dist/esm/sdk.js.map +0 -1
- package/dist/esm/u-conditional-render.entry.js.map +0 -1
- package/dist/esm/u-config.entry.js.map +0 -1
- package/dist/esm/u-email-field.entry.js +0 -73
- package/dist/esm/u-email-field.entry.js.map +0 -1
- package/dist/esm/u-error-message.entry.js.map +0 -1
- package/dist/esm/u-field.u-raw-field.entry.js.map +0 -1
- package/dist/esm/u-field_2.entry.js +0 -372
- package/dist/esm/u-flash-message.entry.js +0 -32
- package/dist/esm/u-flash-message.entry.js.map +0 -1
- package/dist/esm/u-full-profile.entry.js +0 -34
- package/dist/esm/u-full-profile.entry.js.map +0 -1
- package/dist/esm/u-logout-button.entry.js.map +0 -1
- package/dist/esm/u-magic-code-field.entry.js.map +0 -1
- package/dist/esm/u-missing-field.entry.js.map +0 -1
- package/dist/esm/u-missing-fields-submit-button.entry.js.map +0 -1
- package/dist/esm/u-newsletter-checkbox.entry.js.map +0 -1
- package/dist/esm/u-newsletter-logout-button.entry.js.map +0 -1
- package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +0 -1
- package/dist/esm/u-newsletter-resend-doi-button.entry.js +0 -44
- package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +0 -1
- package/dist/esm/u-newsletter-root.entry.js.map +0 -1
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js +0 -68
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +0 -1
- package/dist/esm/u-pagination-button.entry.js.map +0 -1
- package/dist/esm/u-pagination-page.entry.js.map +0 -1
- package/dist/esm/u-passkey.entry.js.map +0 -1
- package/dist/esm/u-password-field.entry.js.map +0 -1
- package/dist/esm/u-profile.u-submit-button.entry.js.map +0 -1
- package/dist/esm/u-profile_2.entry.js +0 -308
- package/dist/esm/u-registration-button.entry.js.map +0 -1
- package/dist/esm/u-reset-password-button.entry.js.map +0 -1
- package/dist/esm/u-send-magic-code-button.entry.js.map +0 -1
- package/dist/esm/u-signed-in.entry.js.map +0 -1
- package/dist/esm/u-signin-root.entry.js.map +0 -1
- package/dist/esm/u-signin-step.entry.js.map +0 -1
- package/dist/esm/u-signin-strategy.entry.js.map +0 -1
- package/dist/esm/u-social-login-button.entry.js.map +0 -1
- package/dist/esm/u-spinner.entry.js.map +0 -1
- package/dist/esm/u-ticketable-list.entry.js.map +0 -1
- package/dist/esm/unidy-store-BldTAtO0.js +0 -37
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/sdk/p-10e06612.entry.js +0 -2
- package/dist/sdk/p-10e06612.entry.js.map +0 -1
- package/dist/sdk/p-16f86a4d.entry.js +0 -2
- package/dist/sdk/p-16f86a4d.entry.js.map +0 -1
- package/dist/sdk/p-20240b02.entry.js +0 -2
- package/dist/sdk/p-20240b02.entry.js.map +0 -1
- package/dist/sdk/p-26f3d8db.entry.js +0 -2
- package/dist/sdk/p-26f3d8db.entry.js.map +0 -1
- package/dist/sdk/p-2da4497a.entry.js +0 -2
- package/dist/sdk/p-2da4497a.entry.js.map +0 -1
- package/dist/sdk/p-3f4c947d.entry.js +0 -2
- package/dist/sdk/p-3f4c947d.entry.js.map +0 -1
- package/dist/sdk/p-431ec460.entry.js +0 -2
- package/dist/sdk/p-431ec460.entry.js.map +0 -1
- package/dist/sdk/p-4f54194a.entry.js +0 -2
- package/dist/sdk/p-4f54194a.entry.js.map +0 -1
- package/dist/sdk/p-552056e7.entry.js +0 -2
- package/dist/sdk/p-552056e7.entry.js.map +0 -1
- package/dist/sdk/p-5da49d00.entry.js +0 -2
- package/dist/sdk/p-5da49d00.entry.js.map +0 -1
- package/dist/sdk/p-67096601.entry.js +0 -2
- package/dist/sdk/p-67096601.entry.js.map +0 -1
- package/dist/sdk/p-6893d167.entry.js +0 -2
- package/dist/sdk/p-6893d167.entry.js.map +0 -1
- package/dist/sdk/p-6e3c210c.entry.js +0 -2
- package/dist/sdk/p-6e3c210c.entry.js.map +0 -1
- package/dist/sdk/p-6febeead.entry.js +0 -2
- package/dist/sdk/p-6febeead.entry.js.map +0 -1
- package/dist/sdk/p-73c2ec89.entry.js +0 -2
- package/dist/sdk/p-73c2ec89.entry.js.map +0 -1
- package/dist/sdk/p-745742f1.entry.js +0 -2
- package/dist/sdk/p-745742f1.entry.js.map +0 -1
- package/dist/sdk/p-7a7c0db2.entry.js +0 -2
- package/dist/sdk/p-7a7c0db2.entry.js.map +0 -1
- package/dist/sdk/p-8d787494.entry.js +0 -2
- package/dist/sdk/p-8d787494.entry.js.map +0 -1
- package/dist/sdk/p-94dde7e5.entry.js +0 -2
- package/dist/sdk/p-94dde7e5.entry.js.map +0 -1
- package/dist/sdk/p-97d8ae02.entry.js +0 -2
- package/dist/sdk/p-97d8ae02.entry.js.map +0 -1
- package/dist/sdk/p-9da4dd6d.entry.js +0 -2
- package/dist/sdk/p-9da4dd6d.entry.js.map +0 -1
- package/dist/sdk/p-BZ1kW_eK.js +0 -2
- package/dist/sdk/p-BZ1kW_eK.js.map +0 -1
- package/dist/sdk/p-BlOjABPD.js +0 -2
- package/dist/sdk/p-BlOjABPD.js.map +0 -1
- package/dist/sdk/p-BqFCd65h.js +0 -2
- package/dist/sdk/p-BqFCd65h.js.map +0 -1
- package/dist/sdk/p-C0feI0p8.js +0 -2
- package/dist/sdk/p-C0feI0p8.js.map +0 -1
- package/dist/sdk/p-CDtLILSR.js +0 -2
- package/dist/sdk/p-CDtLILSR.js.map +0 -1
- package/dist/sdk/p-CFiZLMAA.js +0 -2
- package/dist/sdk/p-CFiZLMAA.js.map +0 -1
- package/dist/sdk/p-CR1oWC4S.js +0 -2
- package/dist/sdk/p-CR1oWC4S.js.map +0 -1
- package/dist/sdk/p-Ce8zGAi1.js +0 -2
- package/dist/sdk/p-Ce8zGAi1.js.map +0 -1
- package/dist/sdk/p-Ci3aTmzp.js +0 -3
- package/dist/sdk/p-Ci3aTmzp.js.map +0 -1
- package/dist/sdk/p-D1lzXl_Z.js +0 -2
- package/dist/sdk/p-D1lzXl_Z.js.map +0 -1
- package/dist/sdk/p-D4B6Zkq_.js +0 -2
- package/dist/sdk/p-D4B6Zkq_.js.map +0 -1
- package/dist/sdk/p-D8RGdjD3.js +0 -2
- package/dist/sdk/p-D8RGdjD3.js.map +0 -1
- package/dist/sdk/p-DGqadgLO.js +0 -2
- package/dist/sdk/p-DGqadgLO.js.map +0 -1
- package/dist/sdk/p-DSwwVdp1.js +0 -2
- package/dist/sdk/p-DSwwVdp1.js.map +0 -1
- package/dist/sdk/p-DUHc_Cx7.js +0 -2
- package/dist/sdk/p-DUHc_Cx7.js.map +0 -1
- package/dist/sdk/p-DYtgart8.js +0 -2
- package/dist/sdk/p-DYtgart8.js.map +0 -1
- package/dist/sdk/p-DsSffQBc.js +0 -2
- package/dist/sdk/p-DsSffQBc.js.map +0 -1
- package/dist/sdk/p-b79abe80.entry.js +0 -2
- package/dist/sdk/p-b79abe80.entry.js.map +0 -1
- package/dist/sdk/p-bb5ae222.entry.js +0 -2
- package/dist/sdk/p-bb5ae222.entry.js.map +0 -1
- package/dist/sdk/p-bbbec3d4.entry.js +0 -2
- package/dist/sdk/p-bbbec3d4.entry.js.map +0 -1
- package/dist/sdk/p-c2b6c674.entry.js +0 -2
- package/dist/sdk/p-c2b6c674.entry.js.map +0 -1
- package/dist/sdk/p-c2fba7c8.entry.js +0 -2
- package/dist/sdk/p-c2fba7c8.entry.js.map +0 -1
- package/dist/sdk/p-cba5d81e.entry.js +0 -2
- package/dist/sdk/p-cba5d81e.entry.js.map +0 -1
- package/dist/sdk/p-d2c6179a.entry.js +0 -2
- package/dist/sdk/p-d2c6179a.entry.js.map +0 -1
- package/dist/sdk/p-dcd4e8f0.entry.js +0 -2
- package/dist/sdk/p-dcd4e8f0.entry.js.map +0 -1
- package/dist/sdk/p-eaedb08e.entry.js +0 -2
- package/dist/sdk/p-eaedb08e.entry.js.map +0 -1
- package/dist/sdk/p-f0aecd55.entry.js +0 -2
- package/dist/sdk/p-f0aecd55.entry.js.map +0 -1
- package/dist/sdk/p-fc51c88d.entry.js +0 -2
- package/dist/sdk/p-fc51c88d.entry.js.map +0 -1
- package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +0 -1
- package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +0 -1
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +0 -2
- /package/dist/{esm → sdk}/component-utils-D1lzXl_Z.js +0 -0
- /package/dist/{esm → sdk}/component-utils-D1lzXl_Z.js.map +0 -0
- /package/dist/{esm → sdk}/helpers-BqFCd65h.js +0 -0
- /package/dist/{esm → sdk}/helpers-BqFCd65h.js.map +0 -0
- /package/dist/{esm → sdk}/helpers-DUHc_Cx7.js +0 -0
- /package/dist/{esm → sdk}/helpers-DUHc_Cx7.js.map +0 -0
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as state } from './auth-store.js';
|
|
3
|
-
import { n as newsletterStore } from './newsletter-store.js';
|
|
4
|
-
import { p as profileStore } from './profile-store.js';
|
|
5
|
-
import { i as isConfirmed, a as isSubscribed } from './newsletter-helpers.js';
|
|
6
|
-
import { U as UnidyComponent } from './logger.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.loading": () => state.loading,
|
|
14
|
-
"auth.authenticated": () => state.authenticated,
|
|
15
|
-
"auth.magicCodeSent": () => state.magicCodeStep === "sent" || state.magicCodeStep === "requested",
|
|
16
|
-
"auth.magicCodeRequested": () => state.magicCodeStep === "requested",
|
|
17
|
-
"auth.resetPasswordSent": () => state.resetPassword.step === "sent" || state.resetPassword.step === "requested",
|
|
18
|
-
"auth.resetPasswordRequested": () => state.resetPassword.step === "requested",
|
|
19
|
-
"newsletter.hasCheckedNewsletters": () => Object.keys(newsletterStore.state.checkedNewsletters).length > 0,
|
|
20
|
-
"newsletter.hasPreferenceToken": () => !!newsletterStore.state.preferenceToken,
|
|
21
|
-
"newsletter.subscribed": (newsletterInternalName) => isSubscribed(newsletterInternalName),
|
|
22
|
-
"newsletter.confirmed": (newsletterInternalName) => isConfirmed(newsletterInternalName),
|
|
23
|
-
"newsletter.loggedIn": () => newsletterStore.state.isAuthenticated || newsletterStore.state.preferenceToken !== "",
|
|
24
|
-
"profile.loading": () => profileStore.state.loading,
|
|
25
|
-
"profile.hasErrors": () => Object.keys(profileStore.state.errors).some((key) => profileStore.state.errors[key] !== null),
|
|
26
|
-
"profile.hasFlashErrors": () => Object.keys(profileStore.state.flashErrors).some((key) => profileStore.state.flashErrors[key] !== null),
|
|
27
|
-
"profile.phoneValid": () => profileStore.state.phoneValid,
|
|
28
|
-
"profile.hasData": () => Object.keys(profileStore.state.data).length > 0,
|
|
29
|
-
};
|
|
30
|
-
function isTruthy(value) {
|
|
31
|
-
return Boolean(value);
|
|
32
|
-
}
|
|
33
|
-
const ConditionalRender = /*@__PURE__*/ proxyCustomElement(class ConditionalRender extends UnidyComponent {
|
|
34
|
-
constructor(registerHost) {
|
|
35
|
-
super();
|
|
36
|
-
if (registerHost !== false) {
|
|
37
|
-
this.__registerHost();
|
|
38
|
-
}
|
|
39
|
-
this.__attachShadow();
|
|
40
|
-
}
|
|
41
|
-
when; // condition to check
|
|
42
|
-
is; // optional value to compare against
|
|
43
|
-
not = false;
|
|
44
|
-
conditionFunction;
|
|
45
|
-
evaluateCondition() {
|
|
46
|
-
const predefinedFunction = PREDEFINED_CONDITIONS[this.when];
|
|
47
|
-
if (predefinedFunction) {
|
|
48
|
-
return predefinedFunction(this.is);
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
shouldRender() {
|
|
53
|
-
if (!this.when && !this.conditionFunction) {
|
|
54
|
-
this.logger.error("[u-conditional-render] Either 'when' or 'conditionFunction' prop is required");
|
|
55
|
-
}
|
|
56
|
-
if (this.conditionFunction) {
|
|
57
|
-
const result = this.conditionFunction(state);
|
|
58
|
-
return this.not ? !result : result;
|
|
59
|
-
}
|
|
60
|
-
const value = this.evaluateCondition();
|
|
61
|
-
if (value === null) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
const normalizedIs = this.is?.toString().toLowerCase();
|
|
65
|
-
let result;
|
|
66
|
-
if (typeof value === "boolean") {
|
|
67
|
-
if (normalizedIs === "false" || normalizedIs === "disabled") {
|
|
68
|
-
result = !value;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
result = value;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
else if (this.is === undefined) {
|
|
75
|
-
result = isTruthy(value);
|
|
76
|
-
}
|
|
77
|
-
else if (normalizedIs === "enabled" || normalizedIs === "true") {
|
|
78
|
-
result = isTruthy(value);
|
|
79
|
-
}
|
|
80
|
-
else if (normalizedIs === "disabled" || normalizedIs === "false") {
|
|
81
|
-
result = !isTruthy(value);
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
result = String(value) === String(this.is); // to compare exact value
|
|
85
|
-
}
|
|
86
|
-
return this.not ? !result : result;
|
|
87
|
-
}
|
|
88
|
-
render() {
|
|
89
|
-
if (!this.shouldRender()) {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
return (h(Host, { "aria-live": "polite" }, h("slot", null)));
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,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,EAAE,MAAMA,KAAS,CAAC,aAAa,CAAC,IAAI,KAAK,MAAM,IAAIA,KAAS,CAAC,aAAa,CAAC,IAAI,KAAK,WAAW;IACvH,6BAA6B,EAAE,MAAMA,KAAS,CAAC,aAAa,CAAC,IAAI,KAAK,WAAW;AAEjF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AI,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,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;AACxB,YAAA,OAAO,IAAI;;AAGb,QAAA,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAW,QAAQ,EAAA,EACtB,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["authState","NewsletterHelpers.isSubscribed","NewsletterHelpers.isConfirmed","__stencil_proxyCustomElement"],"sources":["src/shared/components/conditional-render/conditional-render.tsx"],"sourcesContent":["import { Component, h, Prop, Host } from \"@stencil/core\";\nimport { authState, type AuthState } from \"../../../auth/store/auth-store\";\nimport { newsletterStore } from \"../../../newsletter/store/newsletter-store\";\nimport { profileStore } from \"../../../profile/store/profile-store\";\nimport * as NewsletterHelpers from \"../../../newsletter/newsletter-helpers\";\nimport { UnidyComponent } from \"../../../logger\";\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.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.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 if (!this.shouldRender()) {\n return null;\n }\n\n return (\n <Host aria-live=\"polite\">\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { i as instance } from './i18n.js';
|
|
3
|
-
import { u as unidyState } from './unidy-store.js';
|
|
4
|
-
import './auth-store.js';
|
|
5
|
-
import { A as Auth } from './auth.js';
|
|
6
|
-
import { g as getUnidyClient } from './index2.js';
|
|
7
|
-
import { U as UnidyComponent } from './logger.js';
|
|
8
|
-
import { Y 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
|
-
unidyInitialized;
|
|
26
|
-
configChange;
|
|
27
|
-
componentWillLoad() {
|
|
28
|
-
if (!this.baseUrl || !this.apiKey) {
|
|
29
|
-
this.logger.error("baseUrl and apiKey are required");
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
unidyState.apiKey = this.apiKey;
|
|
33
|
-
unidyState.baseUrl = this.baseUrl;
|
|
34
|
-
unidyState.locale = this.locale;
|
|
35
|
-
unidyState.isConfigured = true;
|
|
36
|
-
this.unidyInitialized.emit({
|
|
37
|
-
apiKey: this.apiKey,
|
|
38
|
-
baseUrl: this.baseUrl,
|
|
39
|
-
locale: this.locale,
|
|
40
|
-
mode: this.mode,
|
|
41
|
-
});
|
|
42
|
-
instance.options.fallbackLng = this.fallbackLocale;
|
|
43
|
-
this.loadCustomTranslations();
|
|
44
|
-
unidyState.locale = this.locale;
|
|
45
|
-
Auth.initialize(getUnidyClient());
|
|
46
|
-
}
|
|
47
|
-
// extend the list of properties that should be watched when new properties are added to the Config
|
|
48
|
-
onPropChange(newValue, oldValue, propName) {
|
|
49
|
-
if (oldValue === undefined)
|
|
50
|
-
return;
|
|
51
|
-
if (propName in unidyState) {
|
|
52
|
-
unidyState[propName] = newValue;
|
|
53
|
-
}
|
|
54
|
-
this.configChange.emit({
|
|
55
|
-
key: propName,
|
|
56
|
-
value: newValue,
|
|
57
|
-
previousValue: oldValue,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
return h("slot", { key: '1105e4e4e3732dfa457352ef7d9b3fdc1095f960' });
|
|
62
|
-
}
|
|
63
|
-
loadCustomTranslations() {
|
|
64
|
-
if (this.customTranslations) {
|
|
65
|
-
try {
|
|
66
|
-
const translations = typeof this.customTranslations === "string" ? JSON.parse(this.customTranslations) : this.customTranslations;
|
|
67
|
-
for (const lang in translations) {
|
|
68
|
-
if (Object.hasOwn(translations, lang)) {
|
|
69
|
-
instance.addResourceBundle(lang, "translation", translations[lang], true, true);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
captureException("Failed to parse customTranslations", error);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
static get watchers() { return {
|
|
79
|
-
"mode": ["onPropChange"],
|
|
80
|
-
"locale": ["onPropChange"]
|
|
81
|
-
}; }
|
|
82
|
-
}, [772, "u-config", {
|
|
83
|
-
"mode": [1],
|
|
84
|
-
"baseUrl": [1, "base-url"],
|
|
85
|
-
"apiKey": [1, "api-key"],
|
|
86
|
-
"customTranslations": [1, "custom-translations"],
|
|
87
|
-
"fallbackLocale": [1, "fallback-locale"],
|
|
88
|
-
"locale": [1]
|
|
89
|
-
}, undefined, {
|
|
90
|
-
"mode": ["onPropChange"],
|
|
91
|
-
"locale": ["onPropChange"]
|
|
92
|
-
}]);
|
|
93
|
-
function defineCustomElement$1() {
|
|
94
|
-
if (typeof customElements === "undefined") {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const components = ["u-config"];
|
|
98
|
-
components.forEach(tagName => { switch (tagName) {
|
|
99
|
-
case "u-config":
|
|
100
|
-
if (!customElements.get(tagName)) {
|
|
101
|
-
customElements.define(tagName, UnidyConfig);
|
|
102
|
-
}
|
|
103
|
-
break;
|
|
104
|
-
} });
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const UConfig = UnidyConfig;
|
|
108
|
-
const defineCustomElement = defineCustomElement$1;
|
|
109
|
-
|
|
110
|
-
export { UConfig, defineCustomElement };
|
|
111
|
-
//# sourceMappingURL=u-config.js.map
|
|
112
|
-
|
|
113
|
-
//# sourceMappingURL=u-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAE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,sBAAsB,GAAA;AAC5B,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;AAC3B,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, Prop, Watch, Event, type EventEmitter, h } from \"@stencil/core\";\nimport i18n from \"../../../i18n\";\nimport { unidyState } from \"../../store/unidy-store\";\nimport { Auth } from \"../../../auth\";\nimport { getUnidyClient } from \"../../../api/\";\nimport { UnidyComponent } from \"../../../logger\";\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\n @Event() unidyInitialized!: EventEmitter<Config>;\n @Event() configChange!: EventEmitter<ConfigChange>;\n\n 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 Auth.initialize(getUnidyClient());\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}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as getParentSigninStep } from './helpers.js';
|
|
3
|
-
import { a as authStore, s as state } from './auth-store.js';
|
|
4
|
-
import { t } from './i18n.js';
|
|
5
|
-
import { g as getParentNewsletterRoot } from './helpers2.js';
|
|
6
|
-
import { n as newsletterStore } from './newsletter-store.js';
|
|
7
|
-
|
|
8
|
-
const EmailField = /*@__PURE__*/ proxyCustomElement(class EmailField extends HTMLElement {
|
|
9
|
-
constructor(registerHost) {
|
|
10
|
-
super();
|
|
11
|
-
if (registerHost !== false) {
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
get el() { return this; }
|
|
16
|
-
componentClassName = "";
|
|
17
|
-
for;
|
|
18
|
-
ariaLabel = "Email";
|
|
19
|
-
disabled = false;
|
|
20
|
-
emailValue = "";
|
|
21
|
-
get context() {
|
|
22
|
-
if (this.el.closest("u-signin-root"))
|
|
23
|
-
return "auth";
|
|
24
|
-
if (this.el.closest("u-newsletter-root"))
|
|
25
|
-
return "newsletter";
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
get store() {
|
|
29
|
-
switch (this.context) {
|
|
30
|
-
case "auth":
|
|
31
|
-
return authStore;
|
|
32
|
-
case "newsletter":
|
|
33
|
-
return newsletterStore;
|
|
34
|
-
default:
|
|
35
|
-
throw new Error("No store found for email field. Make sure you are using the component within a u-signin-root or u-newsletter-root.");
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
handleInput = (event) => {
|
|
39
|
-
const target = event.target;
|
|
40
|
-
this.store.state.email = target.value;
|
|
41
|
-
if (this.context === "newsletter") {
|
|
42
|
-
this.store.state.errors = {};
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.store.clearFieldError("email");
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
handleSubmit = async (event) => {
|
|
49
|
-
event.preventDefault();
|
|
50
|
-
if (this.store.state.email === "")
|
|
51
|
-
return;
|
|
52
|
-
if (this.context === "auth")
|
|
53
|
-
return await getParentSigninStep(this.el)?.submit();
|
|
54
|
-
if (this.context === "newsletter")
|
|
55
|
-
return await getParentNewsletterRoot(this.el)?.submit(this.for);
|
|
56
|
-
};
|
|
57
|
-
isDisabled() {
|
|
58
|
-
if (this.disabled)
|
|
59
|
-
return true;
|
|
60
|
-
if (this.context === "auth")
|
|
61
|
-
return state.loading || state.step === "verification" || state.step === "registration";
|
|
62
|
-
if (this.context === "newsletter") {
|
|
63
|
-
return !!newsletterStore.state.preferenceToken && !!newsletterStore.state.email;
|
|
64
|
-
}
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
const placeholderText = t("auth.email.placeholder", { defaultValue: "Enter your email" });
|
|
69
|
-
return (h("form", { key: 'a578ecb30bd45355bfa266a2ee8e9fc6a72760e6', onSubmit: this.handleSubmit }, h("input", { key: '7e7e323cb5b1aab9edba7f9fb8841f28aca8342b', id: "email", type: "email", value: this.store.state.email, autocomplete: "email", placeholder: placeholderText, disabled: this.isDisabled(), class: `${this.componentClassName} u:disabled:opacity-40 u:disabled:bg-gray-200 u:disabled:cursor-not-allowed`, onInput: this.handleInput, "aria-label": this.ariaLabel }), h("slot", { key: 'a2dcf0b021609bad22cfc7cddacdb0075d6d70ae' })));
|
|
70
|
-
}
|
|
71
|
-
}, [772, "u-email-field", {
|
|
72
|
-
"componentClassName": [1, "class-name"],
|
|
73
|
-
"for": [1],
|
|
74
|
-
"ariaLabel": [1, "aria-label"],
|
|
75
|
-
"disabled": [4],
|
|
76
|
-
"emailValue": [32]
|
|
77
|
-
}]);
|
|
78
|
-
function defineCustomElement$1() {
|
|
79
|
-
if (typeof customElements === "undefined") {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const components = ["u-email-field"];
|
|
83
|
-
components.forEach(tagName => { switch (tagName) {
|
|
84
|
-
case "u-email-field":
|
|
85
|
-
if (!customElements.get(tagName)) {
|
|
86
|
-
customElements.define(tagName, EmailField);
|
|
87
|
-
}
|
|
88
|
-
break;
|
|
89
|
-
} });
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const UEmailField = EmailField;
|
|
93
|
-
const defineCustomElement = defineCustomElement$1;
|
|
94
|
-
|
|
95
|
-
export { UEmailField, defineCustomElement };
|
|
96
|
-
//# sourceMappingURL=u-email-field.js.map
|
|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AE,EAC3B,KAAK,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAA6E,2EAAA,CAAA,EAC9G,OAAO,EAAE,IAAI,CAAC,WAAW,EACb,YAAA,EAAA,IAAI,CAAC,SAAS,EAC1B,CAAA,EACF,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","authState"],"sources":["src/shared/components/email-field/email-field.tsx"],"sourcesContent":["import { Component, Element, h, Prop, State } from \"@stencil/core\";\nimport { getParentSigninStep } from \"../../../auth/components/helpers\";\nimport { authState, authStore } from \"../../../auth/store/auth-store\";\nimport { t } from \"../../../i18n\";\nimport { getParentNewsletterRoot } from \"../../../newsletter/components/helpers\";\nimport type { NewsletterButtonFor } from \"../../../newsletter/components/submit-button/newsletter-submit-button\";\nimport { newsletterStore } from \"../../../newsletter/store/newsletter-store\";\n\n@Component({\n tag: \"u-email-field\",\n shadow: false,\n})\nexport class EmailField {\n @Element() el!: HTMLElement;\n\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() for?: NewsletterButtonFor;\n @Prop() ariaLabel = \"Email\";\n @Prop() disabled = false;\n\n @State() emailValue = \"\";\n\n private get context(): \"auth\" | \"newsletter\" | null {\n if (this.el.closest(\"u-signin-root\")) return \"auth\";\n\n if (this.el.closest(\"u-newsletter-root\")) return \"newsletter\";\n\n return null;\n }\n\n private get store(): typeof authStore | typeof newsletterStore | null {\n switch (this.context) {\n case \"auth\":\n return authStore;\n case \"newsletter\":\n return newsletterStore;\n default:\n throw new Error(\n \"No store found for email field. Make sure you are using the component within a u-signin-root or u-newsletter-root.\",\n );\n }\n }\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n\n (this.store as { state: { email: string } }).state.email = target.value;\n\n if (this.context === \"newsletter\") {\n this.store.state.errors = {};\n } else {\n (this.store as { clearFieldError: (field: \"email\") => void }).clearFieldError(\"email\");\n }\n };\n\n private handleSubmit = async (event: Event) => {\n event.preventDefault();\n\n if (this.store.state.email === \"\") return;\n\n if (this.context === \"auth\") return await getParentSigninStep(this.el)?.submit();\n\n if (this.context === \"newsletter\") return await getParentNewsletterRoot(this.el)?.submit(this.for);\n };\n\n private isDisabled(): boolean {\n if (this.disabled) return true;\n\n if (this.context === \"auth\") return authState.loading || authState.step === \"verification\" || authState.step === \"registration\";\n\n if (this.context === \"newsletter\") {\n return !!newsletterStore.state.preferenceToken && !!newsletterStore.state.email;\n }\n\n return false;\n }\n\n render() {\n const placeholderText = t(\"auth.email.placeholder\", { defaultValue: \"Enter your email\" });\n\n return (\n <form onSubmit={this.handleSubmit}>\n <input\n id=\"email\"\n type=\"email\"\n value={this.store.state.email}\n autocomplete=\"email\"\n placeholder={placeholderText}\n disabled={this.isDisabled()}\n class={`${this.componentClassName} u:disabled:opacity-40 u:disabled:bg-gray-200 u:disabled:cursor-not-allowed`}\n onInput={this.handleInput}\n aria-label={this.ariaLabel}\n />\n <slot />\n </form>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { t } from './i18n.js';
|
|
3
|
-
import { s as state } from './auth-store.js';
|
|
4
|
-
import { u as unidyState } from './unidy-store.js';
|
|
5
|
-
import { n as newsletterStore } from './newsletter-store.js';
|
|
6
|
-
import { h as hasSlotContent } from './component-utils.js';
|
|
7
|
-
|
|
8
|
-
const ErrorMessage = /*@__PURE__*/ proxyCustomElement(class ErrorMessage extends HTMLElement {
|
|
9
|
-
constructor(registerHost) {
|
|
10
|
-
super();
|
|
11
|
-
if (registerHost !== false) {
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
}
|
|
14
|
-
this.__attachShadow();
|
|
15
|
-
}
|
|
16
|
-
componentClassName = "";
|
|
17
|
-
for;
|
|
18
|
-
errorMessages;
|
|
19
|
-
get el() { return this; }
|
|
20
|
-
detectContext() {
|
|
21
|
-
if (this.el.closest("u-signin-root") || this.el.closest("u-signin-step"))
|
|
22
|
-
return "auth";
|
|
23
|
-
if (this.el.closest("u-profile"))
|
|
24
|
-
return "profile";
|
|
25
|
-
if (this.el.closest("u-newsletter-root"))
|
|
26
|
-
return "newsletter";
|
|
27
|
-
if (this.for === "general" || this.for === "connection")
|
|
28
|
-
return "other";
|
|
29
|
-
throw new Error("No context found for error message. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.");
|
|
30
|
-
}
|
|
31
|
-
get context() {
|
|
32
|
-
return this.detectContext();
|
|
33
|
-
}
|
|
34
|
-
getAuthErrorMessage(errorCode) {
|
|
35
|
-
if (this.errorMessages?.[errorCode]) {
|
|
36
|
-
return this.errorMessages[errorCode];
|
|
37
|
-
}
|
|
38
|
-
const translatedError = t(`errors.${errorCode}`);
|
|
39
|
-
if (translatedError !== `errors.${errorCode}`) {
|
|
40
|
-
return translatedError;
|
|
41
|
-
}
|
|
42
|
-
return errorCode || t("errors.unknown", { defaultValue: "An error occurred" });
|
|
43
|
-
}
|
|
44
|
-
getNewsletterErrorMessage(errorIdentifier) {
|
|
45
|
-
return t(`newsletter.errors.${errorIdentifier}`) || t("errors.unknown", { defaultValue: "An unknown error occurred" });
|
|
46
|
-
}
|
|
47
|
-
getErrorMessage(errorCode) {
|
|
48
|
-
if (this.context === "auth") {
|
|
49
|
-
return this.getAuthErrorMessage(errorCode);
|
|
50
|
-
}
|
|
51
|
-
return this.getNewsletterErrorMessage(errorCode);
|
|
52
|
-
}
|
|
53
|
-
getAuthErrorCode() {
|
|
54
|
-
const forValue = this.for;
|
|
55
|
-
if (forValue === "connection") {
|
|
56
|
-
return unidyState.backendConnected ? null : "connection_failed";
|
|
57
|
-
}
|
|
58
|
-
if (forValue === "general") {
|
|
59
|
-
return state.globalErrors.auth;
|
|
60
|
-
}
|
|
61
|
-
return state.errors[forValue];
|
|
62
|
-
}
|
|
63
|
-
getNewsletterErrorCode() {
|
|
64
|
-
const error = newsletterStore.state.errors[this.for];
|
|
65
|
-
return error ?? null;
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
const errorCode = this.context === "newsletter" ? this.getNewsletterErrorCode() : this.getAuthErrorCode();
|
|
69
|
-
if (!errorCode) {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
// Only render connection_failed for "general" and "connection" types
|
|
73
|
-
if (errorCode === "connection_failed" && this.for !== "general" && this.for !== "connection") {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
const errorMessage = this.getErrorMessage(errorCode);
|
|
77
|
-
const formattedMessage = errorMessage?.includes("\n") ? h("div", { style: { whiteSpace: "pre-line" } }, errorMessage) : errorMessage;
|
|
78
|
-
return h(Host, { class: this.componentClassName }, hasSlotContent(this.el) ? h("slot", null) : formattedMessage);
|
|
79
|
-
}
|
|
80
|
-
}, [769, "u-error-message", {
|
|
81
|
-
"componentClassName": [1, "class-name"],
|
|
82
|
-
"for": [1],
|
|
83
|
-
"errorMessages": [16]
|
|
84
|
-
}]);
|
|
85
|
-
function defineCustomElement$1() {
|
|
86
|
-
if (typeof customElements === "undefined") {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const components = ["u-error-message"];
|
|
90
|
-
components.forEach(tagName => { switch (tagName) {
|
|
91
|
-
case "u-error-message":
|
|
92
|
-
if (!customElements.get(tagName)) {
|
|
93
|
-
customElements.define(tagName, ErrorMessage);
|
|
94
|
-
}
|
|
95
|
-
break;
|
|
96
|
-
} });
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const UErrorMessage = ErrorMessage;
|
|
100
|
-
const defineCustomElement = defineCustomElement$1;
|
|
101
|
-
|
|
102
|
-
export { UErrorMessage, defineCustomElement };
|
|
103
|
-
//# sourceMappingURL=u-error-message.js.map
|
|
104
|
-
|
|
105
|
-
//# sourceMappingURL=u-error-message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-error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,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAA,EAAG,YAAY,CAAO,GAAG,YAAY;AAEnI,QAAA,OAAO,CAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAG,EAAA,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAA,CAAA,MAAA,EAAA,IAAA,CAAQ,GAAG,gBAAgB,CAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","authState"],"sources":["src/shared/components/error-message/error-message.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { authState } from \"../../../auth/store/auth-store\";\nimport { unidyState } from \"../../store/unidy-store\";\nimport { type NewsletterErrorIdentifier, newsletterStore } from \"../../../newsletter/store/newsletter-store\";\nimport { hasSlotContent } from \"../../component-utils\";\n\nexport type AuthErrorType = \"email\" | \"password\" | \"magicCode\" | \"resetPassword\" | \"general\" | \"connection\";\n\n@Component({\n tag: \"u-error-message\",\n shadow: true,\n})\nexport class ErrorMessage {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() for!: string;\n\n @Prop() errorMessages?: Record<string, string>;\n @Element() el!: HTMLElement;\n\n private detectContext(): \"auth\" | \"newsletter\" | \"profile\" | \"other\" {\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 if (this.for === \"general\" || this.for === \"connection\") return \"other\";\n\n throw new Error(\n \"No context found for error message. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.\",\n );\n }\n\n private get context(): \"auth\" | \"newsletter\" | \"profile\" | \"other\" {\n return this.detectContext();\n }\n\n private getAuthErrorMessage(errorCode: string): string {\n if (this.errorMessages?.[errorCode]) {\n return this.errorMessages[errorCode];\n }\n\n const translatedError = t(`errors.${errorCode}`);\n if (translatedError !== `errors.${errorCode}`) {\n return translatedError;\n }\n\n return errorCode || t(\"errors.unknown\", { defaultValue: \"An error occurred\" });\n }\n\n private getNewsletterErrorMessage(errorIdentifier: NewsletterErrorIdentifier): string {\n return t(`newsletter.errors.${errorIdentifier}`) || t(\"errors.unknown\", { defaultValue: \"An unknown error occurred\" });\n }\n\n private getErrorMessage(errorCode: string): string | null {\n if (this.context === \"auth\") {\n return this.getAuthErrorMessage(errorCode);\n }\n\n return this.getNewsletterErrorMessage(errorCode as NewsletterErrorIdentifier);\n }\n\n private getAuthErrorCode(): string | null {\n const forValue = this.for as AuthErrorType;\n\n if (forValue === \"connection\") {\n return unidyState.backendConnected ? null : \"connection_failed\";\n }\n\n if (forValue === \"general\") {\n return authState.globalErrors.auth;\n }\n\n return authState.errors[forValue];\n }\n\n private getNewsletterErrorCode(): string | null {\n const error = newsletterStore.state.errors[this.for];\n return error ?? null;\n }\n\n render() {\n const errorCode = this.context === \"newsletter\" ? this.getNewsletterErrorCode() : this.getAuthErrorCode();\n\n if (!errorCode) {\n return null;\n }\n\n // Only render connection_failed for \"general\" and \"connection\" types\n if (errorCode === \"connection_failed\" && this.for !== \"general\" && this.for !== \"connection\") {\n return null;\n }\n\n const errorMessage = this.getErrorMessage(errorCode);\n const formattedMessage = errorMessage?.includes(\"\\n\") ? <div style={{ whiteSpace: \"pre-line\" }}>{errorMessage}</div> : errorMessage;\n\n return <Host class={this.componentClassName}>{hasSlotContent(this.el) ? <slot /> : formattedMessage}</Host>;\n }\n}\n"],"version":3}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { F as Field, d as defineCustomElement$1 } from './field.js';
|
|
2
|
-
|
|
3
|
-
const UField = Field;
|
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
|
5
|
-
|
|
6
|
-
export { UField, defineCustomElement };
|
|
7
|
-
//# sourceMappingURL=u-field.js.map
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=u-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-field.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { h, proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
|
2
|
-
import { f as flashState, F as Flash } from './flash-store.js';
|
|
3
|
-
|
|
4
|
-
const CloseIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("title", null, "Close"), h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })));
|
|
5
|
-
|
|
6
|
-
const variantClasses = {
|
|
7
|
-
error: "u:bg-red-50 u:border-red-300 u:text-red-800",
|
|
8
|
-
success: "u:bg-green-50 u:border-green-400 u:text-green-800",
|
|
9
|
-
info: "u:bg-blue-50 u:border-blue-300 u:text-blue-800",
|
|
10
|
-
};
|
|
11
|
-
const FlashMessage = /*@__PURE__*/ proxyCustomElement(class FlashMessage extends HTMLElement {
|
|
12
|
-
constructor(registerHost) {
|
|
13
|
-
super();
|
|
14
|
-
if (registerHost !== false) {
|
|
15
|
-
this.__registerHost();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
componentClassName = "";
|
|
19
|
-
removeAfterSeconds = null;
|
|
20
|
-
componentWillLoad() {
|
|
21
|
-
if (this.removeAfterSeconds) {
|
|
22
|
-
flashState.autoRemoveDelay = this.removeAfterSeconds * 1000;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
if (flashState.messages.length === 0) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
return (h("div", { class: `u:flex u:flex-col u:gap-2 u:z-[500] u:min-w-64 u:max-w-lg ${this.componentClassName}` }, flashState.messages.map((message) => (h("div", { key: message.id, class: `u:flex u:items-start u:justify-between u:gap-3 u:p-3 u:rounded u:border ${variantClasses[message.variant]}`, role: "alert", "aria-live": "polite" }, h("span", { class: "u:break-words" }, message.text), h("button", { type: "button", class: "u:cursor-pointer u:leading-none u:pt-1", onClick: () => Flash.remove(message.id), "aria-label": "Close" }, h(CloseIcon, null)))))));
|
|
30
|
-
}
|
|
31
|
-
}, [768, "u-flash-message", {
|
|
32
|
-
"componentClassName": [1, "class-name"],
|
|
33
|
-
"removeAfterSeconds": [2, "remove-after-seconds"]
|
|
34
|
-
}]);
|
|
35
|
-
function defineCustomElement$1() {
|
|
36
|
-
if (typeof customElements === "undefined") {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const components = ["u-flash-message"];
|
|
40
|
-
components.forEach(tagName => { switch (tagName) {
|
|
41
|
-
case "u-flash-message":
|
|
42
|
-
if (!customElements.get(tagName)) {
|
|
43
|
-
customElements.define(tagName, FlashMessage);
|
|
44
|
-
}
|
|
45
|
-
break;
|
|
46
|
-
} });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const UFlashMessage = FlashMessage;
|
|
50
|
-
const defineCustomElement = defineCustomElement$1;
|
|
51
|
-
|
|
52
|
-
export { UFlashMessage, defineCustomElement };
|
|
53
|
-
//# sourceMappingURL=u-flash-message.js.map
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=u-flash-message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-flash-message.js","mappings":";;;AAEO,MAAM,SAAS,GAAG,OACvB,CACE,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EAAA,cAAA,EACR,GAAG,EACD,gBAAA,EAA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AE,OAAO,CAAC,IAAI,CAAQ,EACjD,CACE,CAAA,QAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,wCAAwC,EAC9C,OAAO,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAA,YAAA,EAC5B,OAAO,EAAA,EAElB,CAAC,CAAA,SAAS,OAAG,CACN,CACL,CACP,CAAC,CACE;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/shared/components/flash-message/close-icon.tsx","src/shared/components/flash-message/flash-message.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <title>Close</title>\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n","import { Component, Prop, h } from \"@stencil/core\";\nimport { flashState, Flash } from \"../../store/flash-store\";\nimport { CloseIcon } from \"./close-icon\";\n\nconst variantClasses = {\n error: \"u:bg-red-50 u:border-red-300 u:text-red-800\",\n success: \"u:bg-green-50 u:border-green-400 u:text-green-800\",\n info: \"u:bg-blue-50 u:border-blue-300 u:text-blue-800\",\n};\n\n@Component({\n tag: \"u-flash-message\",\n shadow: false,\n})\nexport class FlashMessage {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() removeAfterSeconds: number | null = null;\n\n componentWillLoad() {\n if (this.removeAfterSeconds) {\n flashState.autoRemoveDelay = this.removeAfterSeconds * 1000;\n }\n }\n\n render() {\n if (flashState.messages.length === 0) {\n return null;\n }\n\n return (\n <div class={`u:flex u:flex-col u:gap-2 u:z-[500] u:min-w-64 u:max-w-lg ${this.componentClassName}`}>\n {flashState.messages.map((message) => (\n <div\n key={message.id}\n class={`u:flex u:items-start u:justify-between u:gap-3 u:p-3 u:rounded u:border ${variantClasses[message.variant]}`}\n role=\"alert\"\n aria-live=\"polite\"\n >\n <span class=\"u:break-words\">{message.text}</span>\n <button\n type=\"button\"\n class=\"u:cursor-pointer u:leading-none u:pt-1\"\n onClick={() => Flash.remove(message.id)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n </div>\n ))}\n </div>\n );\n }\n}\n"],"version":3}
|