@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,372 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, g as getElement, h, U as UnidyComponent } from './index-Ci3aTmzp.js';
|
|
2
|
-
import { t } from './i18n-BR-AGAnn.js';
|
|
3
|
-
import { s as state } from './profile-store-RmZB2PTc.js';
|
|
4
|
-
import './unidy-store-BldTAtO0.js';
|
|
5
|
-
import './index-Bjp1XO-f.js';
|
|
6
|
-
|
|
7
|
-
const fieldCss = "/*! tailwindcss v4.1.17 | 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,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{.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\\:justify-center{justify-content:center}.u\\:rounded-\\[50\\%\\]{border-radius:50%}}@keyframes spin{to{transform:rotate(1turn)}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{.u\\:flex{display:flex}.u\\:justify-end{justify-content:flex-end}.u\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.u\\:disabled\\:opacity-50:disabled{opacity:.5}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.block{display:block}.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)}}:host{display:block}.field-error:focus{border-color:red;outline-color:red}.multi-select-readonly-container{list-style:none}.multi-select-readonly-container li{display:inline-block}[part=input]:disabled,[part=select]:disabled{cursor:not-allowed}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
8
|
-
|
|
9
|
-
const Field = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
field;
|
|
14
|
-
required = false;
|
|
15
|
-
readonlyPlaceholder = "No information";
|
|
16
|
-
countryCodeDisplayOption = "label";
|
|
17
|
-
invalidPhoneMessage = "Please enter a valid phone number.";
|
|
18
|
-
componentClassName;
|
|
19
|
-
emptyOption = true;
|
|
20
|
-
placeholder;
|
|
21
|
-
renderDefaultLabel = true;
|
|
22
|
-
pattern;
|
|
23
|
-
patternErrorMessage;
|
|
24
|
-
validationFunc;
|
|
25
|
-
get el() { return getElement(this); }
|
|
26
|
-
selected;
|
|
27
|
-
getFieldData() {
|
|
28
|
-
return this.field.startsWith("custom_attributes.")
|
|
29
|
-
? state.data.custom_attributes?.[this.field.replace("custom_attributes.", "")]
|
|
30
|
-
: state.data[this.field];
|
|
31
|
-
}
|
|
32
|
-
componentWillLoad() { }
|
|
33
|
-
componentDidRender() {
|
|
34
|
-
const fieldErrors = state.errors;
|
|
35
|
-
if (Object.keys(fieldErrors)[0] === this.field) {
|
|
36
|
-
this.el.shadowRoot?.getElementById(this.field)?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
37
|
-
this.el.shadowRoot
|
|
38
|
-
?.getElementById(this.field)
|
|
39
|
-
?.querySelector("input, select, textarea")
|
|
40
|
-
?.focus();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
createSpecificPartKey(fieldName) {
|
|
44
|
-
if (fieldName.startsWith("custom_attributes.")) {
|
|
45
|
-
return fieldName.replace(/[^\w-]/g, "-");
|
|
46
|
-
}
|
|
47
|
-
return fieldName;
|
|
48
|
-
}
|
|
49
|
-
// biome-ignore lint/suspicious/noExplicitAny: needed for dynamic fieldData
|
|
50
|
-
multiSelectLabel = (fieldData) => {
|
|
51
|
-
const multiselectMatches = [];
|
|
52
|
-
if (Array.isArray(fieldData.value)) {
|
|
53
|
-
for (const val of fieldData.value) {
|
|
54
|
-
// biome-ignore lint/suspicious/noExplicitAny: needed for dynamic option
|
|
55
|
-
const match = fieldData.options?.find((opt) => opt.value === val);
|
|
56
|
-
const optionTranslationKey = `fields.${this.field}.options.${val}`;
|
|
57
|
-
const translatedOptionLabel = t(optionTranslationKey);
|
|
58
|
-
const optionLabel = translatedOptionLabel !== optionTranslationKey ? translatedOptionLabel : match?.label;
|
|
59
|
-
multiselectMatches.push(optionLabel ?? val);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return multiselectMatches;
|
|
63
|
-
};
|
|
64
|
-
render() {
|
|
65
|
-
if (state.loading) {
|
|
66
|
-
return h("u-spinner", null);
|
|
67
|
-
}
|
|
68
|
-
const fieldData = this.getFieldData();
|
|
69
|
-
if (!fieldData) {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
const labelTranslationKey = `fields.${this.field}.label`;
|
|
73
|
-
const label = t(labelTranslationKey, { defaultValue: fieldData?.label });
|
|
74
|
-
const placeholderTranslationKey = `fields.${this.field}.placeholder`;
|
|
75
|
-
const placeholder = t(placeholderTranslationKey, { defaultValue: this.placeholder ? this.placeholder : "" });
|
|
76
|
-
const readonlyPlaceholderTranslationKey = `fields.${this.field}.readonlyPlaceholder`;
|
|
77
|
-
const readonlyPlaceholder = t(readonlyPlaceholderTranslationKey, {
|
|
78
|
-
defaultValue: this.readonlyPlaceholder ? this.readonlyPlaceholder : "",
|
|
79
|
-
});
|
|
80
|
-
const translatedOptions = (fieldData.options || []).map((opt) => {
|
|
81
|
-
const translationKey = `fields.${this.field}.options.${opt.value}`;
|
|
82
|
-
const label = t(translationKey, { defaultValue: opt.label });
|
|
83
|
-
return { ...opt, label };
|
|
84
|
-
});
|
|
85
|
-
const translatedRadioOptions = (fieldData.radio_options || []).map((opt) => {
|
|
86
|
-
const translationKey = `fields.${this.field}.options.${opt.value}`;
|
|
87
|
-
const label = t(translationKey, { defaultValue: opt.label });
|
|
88
|
-
return { ...opt, label };
|
|
89
|
-
});
|
|
90
|
-
const errorPrefix = t("errors.prefix", { defaultValue: "ERROR: " });
|
|
91
|
-
const isLocked = !!fieldData?.locked;
|
|
92
|
-
const lockedText = fieldData?.locked_text ? fieldData.locked_text : "";
|
|
93
|
-
const isReadonly = fieldData?.readonly === true;
|
|
94
|
-
const multiSelectReadonlyLabels = this.multiSelectLabel(fieldData);
|
|
95
|
-
return (h("div", { part: `field-container field-container--${this.createSpecificPartKey(this.field)}` }, h("slot", { name: "label" }), this.renderDefaultLabel && (h("label", { htmlFor: this.field, part: `field_label field_label--${this.createSpecificPartKey(this.field)}` }, label, fieldData?.required || this.required ? h("span", { part: "required-indicator" }, " *") : null)), isReadonly && fieldData?.type !== "checkbox" ? (h("span", { id: this.field, part: "readonly-indicator" }, fieldData?.value || readonlyPlaceholder)) : null, isReadonly && fieldData?.type === "checkbox" && (h("ul", { id: this.field, class: "multi-select-readonly-container", part: "multi-select-readonly-container" }, multiSelectReadonlyLabels.map((label) => (h("li", { key: label, part: "multi-select-readonly-field" }, label))))), !isReadonly && (h("u-raw-field", { id: this.field, field: this.field, type: fieldData.type, value: fieldData.value, options: fieldData.type === "select" ? translatedOptions : undefined, radioOptions: fieldData.type === "radio" ? translatedRadioOptions : undefined, multiSelectOptions: fieldData.type === "checkbox" ? translatedOptions : undefined, required: fieldData.required || this.required, disabled: isLocked, tooltip: isLocked ? lockedText : undefined, placeholder: placeholder, componentClassName: this.componentClassName, emptyOption: this.emptyOption, countryCodeDisplayOption: this.countryCodeDisplayOption, attrName: fieldData.attr_name, specificPartKey: this.createSpecificPartKey(this.field), ariaDescribedBy: state.errors[this.field] ? `${this.field}-error` : undefined, pattern: this.pattern, patternErrorMessage: this.patternErrorMessage, validationFunc: this.validationFunc })), state.errors[this.field] && (h("span", { id: `${this.field}-error`, part: "field-error-message", "aria-live": "assertive" }, errorPrefix, " ", state.errors[this.field]))));
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
Field.style = fieldCss;
|
|
99
|
-
|
|
100
|
-
const RadioGroup = (props) => {
|
|
101
|
-
if (!("options" in props)) {
|
|
102
|
-
return (h("input", { type: props.type, name: props.name, required: props.required, value: String(props.value), checked: props.checked, disabled: props.disabled, title: props.title, class: props.componentClassName, onChange: () => props.onChange(String(props.value)), "aria-describedby": props.ariaDescribedBy || undefined }));
|
|
103
|
-
}
|
|
104
|
-
return (h("div", { part: `radio-group_field ${props.specificPartKey ? `radio-group_field--${props.specificPartKey}` : ""}`, title: props.title, "aria-describedby": props.ariaDescribedBy || undefined }, props.options.map((opt) => (h("label", { htmlFor: `${props.name}-${opt.value}`, key: String(opt.value), part: `radio-group-item_label ${props.specificPartKey ? `radio-group-item_label--${props.specificPartKey}` : ""} ${opt.checked ? "radio_checked" : ""}`, "data-checked": opt.checked ? "true" : "false" }, h("input", { id: `${props.name}-${opt.value}`, type: props.type, name: props.name, required: props.required, value: String(opt.value), checked: opt.checked, disabled: props.disabled, onChange: () => props.onChange(String(opt.value)), part: `radio-group-item_radio ${props.specificPartKey ? `radio-group-item_radio--${props.specificPartKey}` : ""}` }), opt.label)))));
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const Textarea = (props) => (h("textarea", { id: props.id, value: props.value, name: props.name, class: props.componentClassName, required: props.required, part: `textarea_field ${props.specificPartKey ? `textarea_field--${props.specificPartKey}` : ""}`, disabled: props.disabled, title: props.title, onChange: (e) => props.onChange(e.target.value), onBlur: props.onBlur, "aria-describedby": props.ariaDescribedBy || undefined }));
|
|
108
|
-
|
|
109
|
-
const Input = (props) => (h("input", { id: props.id, type: props.type, value: props.value, class: props.componentClassName, disabled: props.disabled, required: props.required, part: `input_field ${props.specificPartKey ? `input_field--${props.specificPartKey}` : ""}`, title: props.title, placeholder: props.placeholder, onChange: (e) => props.onChange(e.target.value), onBlur: (e) => props.onBlur?.(e), "aria-describedby": props.ariaDescribedBy || undefined }));
|
|
110
|
-
|
|
111
|
-
const Select = (props) => {
|
|
112
|
-
const renderOptionLabel = (opt) => {
|
|
113
|
-
if (props.attr_name === "country_code" && props.countryCodeDisplayOption === "icon" && props.countryIcon) {
|
|
114
|
-
return props.countryIcon(opt.value);
|
|
115
|
-
}
|
|
116
|
-
return opt.label;
|
|
117
|
-
};
|
|
118
|
-
return (h("select", { id: props.id, name: props.name, class: props.componentClassName, "data-value": props.value, part: `select_field ${props.specificPartKey ? `select_field--${props.specificPartKey}` : ""}`, disabled: props.disabled, title: props.title, onChange: (e) => props.onChange(e.target.value), "aria-describedby": props.ariaDescribedBy || undefined }, props.emptyOption ? h("option", { value: "", selected: props.value === null || props.value === "" }) : null, props.options.map((opt) => (h("option", { key: opt.value, value: opt.value, "data-selected": opt.value === props.value ? "true" : "false", selected: opt.value === props.value, disabled: opt.value === "--" }, renderOptionLabel(opt))))));
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const MultiSelect = (props) => {
|
|
122
|
-
if (!("options" in props)) {
|
|
123
|
-
return (h("input", { id: props.id, type: props.type, name: props.name, value: props.value, checked: props.checked, disabled: props.disabled, title: props.title, class: props.componentClassName, onChange: (e) => props.onToggle(props.value, e.target.checked), "aria-describedby": props.ariaDescribedBy || undefined }));
|
|
124
|
-
}
|
|
125
|
-
return (h("div", { part: `multi-select-group_field ${props.specificPartKey ? `multi-select-group_field--${props.specificPartKey}` : ""}`, title: props.title, "aria-describedby": props.ariaDescribedBy || undefined }, props.options.map((opt) => (h("label", { key: opt.value, htmlFor: `${props.specificPartKey}-${opt.value}`, part: `multi-select-item_label ${props.specificPartKey ? `multi-select-item_label--${props.specificPartKey}` : ""}` }, h("input", { id: `${props.specificPartKey}-${opt.value}`, type: props.type, checked: Array.isArray(props.value) && props.value.includes(opt.value), disabled: props.disabled, title: props.title, onChange: (e) => props.onToggle(opt.value, e.target.checked), part: `multi-select-item_checkbox ${props.specificPartKey ? `multi-select-item_checkbox--${props.specificPartKey}` : ""}` }), opt.label)))));
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
const RawField = class extends UnidyComponent {
|
|
129
|
-
constructor(hostRef) {
|
|
130
|
-
super();
|
|
131
|
-
registerInstance(this, hostRef);
|
|
132
|
-
}
|
|
133
|
-
required = false;
|
|
134
|
-
readonlyPlaceholder = "";
|
|
135
|
-
countryCodeDisplayOption = "label";
|
|
136
|
-
invalidPhoneMessage = "Please enter a valid phone number.";
|
|
137
|
-
componentClassName;
|
|
138
|
-
field;
|
|
139
|
-
value;
|
|
140
|
-
checked;
|
|
141
|
-
disabled;
|
|
142
|
-
tooltip;
|
|
143
|
-
type;
|
|
144
|
-
placeholder;
|
|
145
|
-
options;
|
|
146
|
-
emptyOption = false;
|
|
147
|
-
attrName;
|
|
148
|
-
radioOptions;
|
|
149
|
-
multiSelectOptions;
|
|
150
|
-
specificPartKey;
|
|
151
|
-
ariaDescribedBy = "";
|
|
152
|
-
pattern;
|
|
153
|
-
patternErrorMessage;
|
|
154
|
-
validationFunc;
|
|
155
|
-
get el() { return getElement(this); }
|
|
156
|
-
selected;
|
|
157
|
-
readStore(fieldName) {
|
|
158
|
-
if (!fieldName)
|
|
159
|
-
return;
|
|
160
|
-
const data = state.data;
|
|
161
|
-
if (!data)
|
|
162
|
-
return;
|
|
163
|
-
let field;
|
|
164
|
-
if (fieldName.startsWith("custom_attributes.")) {
|
|
165
|
-
const key = fieldName.replace("custom_attributes.", "");
|
|
166
|
-
field = data.custom_attributes?.[key];
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
field = data[fieldName];
|
|
170
|
-
}
|
|
171
|
-
if (!field)
|
|
172
|
-
return;
|
|
173
|
-
if (field.radio_options) {
|
|
174
|
-
const checkedOption = field.radio_options.find((option) => option.checked);
|
|
175
|
-
const checkedValue = checkedOption?.value ?? field.value ?? "";
|
|
176
|
-
return String(checkedValue);
|
|
177
|
-
}
|
|
178
|
-
if (field.type === "checkbox") {
|
|
179
|
-
return Array.isArray(field.value) ? field.value : [];
|
|
180
|
-
}
|
|
181
|
-
return field.value;
|
|
182
|
-
}
|
|
183
|
-
writeStore(fieldName, value) {
|
|
184
|
-
if (!fieldName)
|
|
185
|
-
return;
|
|
186
|
-
const data = state.data;
|
|
187
|
-
if (!data)
|
|
188
|
-
return;
|
|
189
|
-
const isCustomAttribute = fieldName.startsWith("custom_attributes.");
|
|
190
|
-
const key = isCustomAttribute ? fieldName.replace("custom_attributes.", "") : fieldName;
|
|
191
|
-
if (isCustomAttribute) {
|
|
192
|
-
const field = data.custom_attributes?.[key];
|
|
193
|
-
state.data = {
|
|
194
|
-
...data,
|
|
195
|
-
custom_attributes: {
|
|
196
|
-
...data.custom_attributes,
|
|
197
|
-
[key]: { ...field, value },
|
|
198
|
-
},
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
const field = data[key];
|
|
203
|
-
state.data = { ...data, [key]: { ...field, value } };
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
runExternalValidator(value) {
|
|
207
|
-
if (this.validationFunc) {
|
|
208
|
-
try {
|
|
209
|
-
return this.validationFunc(value);
|
|
210
|
-
}
|
|
211
|
-
catch (e) {
|
|
212
|
-
this.logger.error("External validator (validationFunc) threw an error:", e);
|
|
213
|
-
return null;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
validateValue(value) {
|
|
218
|
-
// TODO: We should validate this when the component is loading.
|
|
219
|
-
if (this.required) {
|
|
220
|
-
const empty = value === undefined || value === null || value === "";
|
|
221
|
-
if (empty) {
|
|
222
|
-
return { valid: false, message: "This field is required." };
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
if (this.pattern && typeof value === "string") {
|
|
226
|
-
const regex = new RegExp(this.pattern);
|
|
227
|
-
if (!regex.test(value)) {
|
|
228
|
-
return { valid: false, message: this.patternErrorMessage || "Invalid format." };
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
const externalResult = this.runExternalValidator(value);
|
|
232
|
-
if (externalResult && !externalResult.valid) {
|
|
233
|
-
return { valid: false, message: externalResult.message || "Invalid input." };
|
|
234
|
-
}
|
|
235
|
-
if (this.type === "tel") {
|
|
236
|
-
const phonePattern = /^(?=.{4,13}$)(\+\d+|\d+)$/;
|
|
237
|
-
if (typeof value === "string" && value !== "" && !phonePattern.test(value)) {
|
|
238
|
-
return { valid: false, message: this.invalidPhoneMessage };
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
return { valid: true, message: "" };
|
|
242
|
-
}
|
|
243
|
-
getNormalizedOptions() {
|
|
244
|
-
if (Array.isArray(this.options))
|
|
245
|
-
return this.options;
|
|
246
|
-
// unidy-raw-field select-options prop can be a JSON string
|
|
247
|
-
if (typeof this.options === "string")
|
|
248
|
-
return JSON.parse(this.options);
|
|
249
|
-
return [];
|
|
250
|
-
}
|
|
251
|
-
countryIcon(countryCode, placeholder = "➖") {
|
|
252
|
-
if (!/^[A-Z]{2}$/.test(countryCode)) {
|
|
253
|
-
return placeholder;
|
|
254
|
-
}
|
|
255
|
-
return Array.from(countryCode)
|
|
256
|
-
.map((char) => String.fromCodePoint(0x1f1e6 + (char.charCodeAt(0) - "A".charCodeAt(0))))
|
|
257
|
-
.join("");
|
|
258
|
-
}
|
|
259
|
-
onMultiToggle = (optValue, checked) => {
|
|
260
|
-
const currentValues = Array.isArray(this.selected) ? this.selected : [];
|
|
261
|
-
let updatedValues;
|
|
262
|
-
if (checked) {
|
|
263
|
-
updatedValues = currentValues.includes(optValue) ? currentValues : [...currentValues, optValue];
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
updatedValues = currentValues.filter((v) => v !== optValue);
|
|
267
|
-
}
|
|
268
|
-
this.selected = updatedValues;
|
|
269
|
-
// TODO: validate multiselect if needed
|
|
270
|
-
this.writeStore(this.field, updatedValues);
|
|
271
|
-
};
|
|
272
|
-
onBlurFieldValidation = (e) => {
|
|
273
|
-
const input = e.target;
|
|
274
|
-
const val = input.value;
|
|
275
|
-
const result = this.validateValue(val);
|
|
276
|
-
const newErrors = { ...state.errors };
|
|
277
|
-
if (result.valid) {
|
|
278
|
-
delete newErrors[this.field];
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
newErrors[this.field] = result.message;
|
|
282
|
-
}
|
|
283
|
-
state.errors = newErrors;
|
|
284
|
-
};
|
|
285
|
-
onChangeFieldValidation = (newValue) => {
|
|
286
|
-
this.selected = newValue;
|
|
287
|
-
const result = this.validateValue(newValue);
|
|
288
|
-
const newErrors = { ...state.errors };
|
|
289
|
-
if (result.valid) {
|
|
290
|
-
delete newErrors[this.field];
|
|
291
|
-
this.writeStore(this.field, newValue);
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
newErrors[this.field] = result.message;
|
|
295
|
-
}
|
|
296
|
-
state.errors = newErrors;
|
|
297
|
-
};
|
|
298
|
-
componentWillLoad() {
|
|
299
|
-
if (!this.field)
|
|
300
|
-
throw new Error('u-raw-field: "field" is required.');
|
|
301
|
-
if (!this.type)
|
|
302
|
-
throw new Error('u-raw-field: "type" is required.');
|
|
303
|
-
const allowed = new Set(["text", "email", "tel", "password", "number", "date", "radio", "textarea", "select", "checkbox"]);
|
|
304
|
-
if (!allowed.has(this.type)) {
|
|
305
|
-
this.type = "text";
|
|
306
|
-
}
|
|
307
|
-
const current = this.readStore(this.field);
|
|
308
|
-
const isType = this.type === "text" ||
|
|
309
|
-
this.type === "email" ||
|
|
310
|
-
this.type === "tel" ||
|
|
311
|
-
this.type === "password" ||
|
|
312
|
-
this.type === "number" ||
|
|
313
|
-
this.type === "date" ||
|
|
314
|
-
this.type === "textarea" ||
|
|
315
|
-
this.type === "select";
|
|
316
|
-
if (isType && (current === undefined || current === null) && typeof this.value === "string") {
|
|
317
|
-
this.writeStore(this.field, this.value);
|
|
318
|
-
}
|
|
319
|
-
this.selected = current;
|
|
320
|
-
}
|
|
321
|
-
componentDidRender() {
|
|
322
|
-
const errs = state.errors;
|
|
323
|
-
if (errs?.[this.field]) {
|
|
324
|
-
this.el.querySelector(`#${CSS.escape(this.field)}`)?.focus();
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
render() {
|
|
328
|
-
if (this.type === "radio") {
|
|
329
|
-
if (Array.isArray(this.radioOptions) && this.radioOptions.length) {
|
|
330
|
-
const checkedOptions = this.radioOptions.map((opt) => ({
|
|
331
|
-
...opt,
|
|
332
|
-
checked: String(opt.value) === this.selected,
|
|
333
|
-
}));
|
|
334
|
-
return (h(RadioGroup, { name: this.field, disabled: this.disabled, title: this.tooltip, type: "radio", onChange: this.onChangeFieldValidation, options: checkedOptions, specificPartKey: this.specificPartKey, "aria-describedby": this.ariaDescribedBy, required: this.required }));
|
|
335
|
-
}
|
|
336
|
-
if (typeof this.value === "string") {
|
|
337
|
-
const currentValue = this.readStore(this.field);
|
|
338
|
-
const isChecked = currentValue != null && String(currentValue) === this.value;
|
|
339
|
-
return (h(RadioGroup, { name: this.field, value: this.value, checked: isChecked, disabled: this.disabled, title: this.tooltip, componentClassName: this.componentClassName, type: "radio", specificPartKey: this.specificPartKey, onChange: this.onChangeFieldValidation, "aria-describedby": this.ariaDescribedBy, required: this.required }));
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
if (this.type === "checkbox") {
|
|
343
|
-
if (Array.isArray(this.multiSelectOptions) && this.multiSelectOptions.length) {
|
|
344
|
-
const selected = Array.isArray(this.selected) ? this.selected : [];
|
|
345
|
-
return (h(MultiSelect, { value: selected, options: this.multiSelectOptions, disabled: this.disabled, title: this.tooltip, type: "checkbox", specificPartKey: this.specificPartKey, onToggle: this.onMultiToggle, "aria-describedby": this.ariaDescribedBy }));
|
|
346
|
-
}
|
|
347
|
-
if (this.value) {
|
|
348
|
-
const currentValue = this.readStore(this.field) ?? [];
|
|
349
|
-
const isChecked = currentValue?.includes(this.value);
|
|
350
|
-
return (h(MultiSelect, { id: `${this.field}-${this.value}`, name: this.field, value: this.value, checked: isChecked, disabled: this.disabled, title: this.tooltip, componentClassName: this.componentClassName, type: "checkbox", onToggle: (val, checked) => {
|
|
351
|
-
const current = this.readStore(this.field);
|
|
352
|
-
const updated = checked ? [...current, val] : current.filter((v) => v !== val);
|
|
353
|
-
this.writeStore(this.field, updated);
|
|
354
|
-
}, "aria-describedby": this.ariaDescribedBy }));
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
if (this.type === "select") {
|
|
358
|
-
const currentValue = this.readStore(this.field) ?? "";
|
|
359
|
-
const option = this.getNormalizedOptions();
|
|
360
|
-
return (h(Select, { id: this.field, name: this.field, value: currentValue, options: option, disabled: this.disabled, title: this.tooltip, emptyOption: this.emptyOption, onChange: this.onChangeFieldValidation, componentClassName: this.componentClassName, countryCodeDisplayOption: this.countryCodeDisplayOption, countryIcon: this.countryIcon, attr_name: this.attrName, specificPartKey: this.specificPartKey, "aria-describedby": this.ariaDescribedBy }));
|
|
361
|
-
}
|
|
362
|
-
if (this.type === "textarea") {
|
|
363
|
-
const currentValue = this.readStore(this.field) || "";
|
|
364
|
-
return (h(Textarea, { id: this.field, value: currentValue, required: this.required, disabled: this.disabled, title: this.tooltip, componentClassName: this.componentClassName, specificPartKey: this.specificPartKey, onChange: this.onChangeFieldValidation, onBlur: this.onBlurFieldValidation, "aria-describedby": this.ariaDescribedBy }));
|
|
365
|
-
}
|
|
366
|
-
const currentValue = this.readStore(this.field) || "";
|
|
367
|
-
return (h(Input, { id: this.field, value: currentValue, required: this.required, disabled: this.disabled, title: this.tooltip, type: this.type, componentClassName: this.componentClassName, placeholder: this.placeholder, specificPartKey: this.specificPartKey, onChange: this.onChangeFieldValidation, onBlur: this.onBlurFieldValidation, "aria-describedby": this.ariaDescribedBy }));
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
export { Field as u_field, RawField as u_raw_field };
|
|
372
|
-
//# sourceMappingURL=u-field.u-raw-field.entry.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { h, r as registerInstance } from './index-Ci3aTmzp.js';
|
|
2
|
-
import { f as flashState, F as Flash } from './flash-store-CEvWSG0c.js';
|
|
3
|
-
import './index-Bjp1XO-f.js';
|
|
4
|
-
|
|
5
|
-
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" })));
|
|
6
|
-
|
|
7
|
-
const variantClasses = {
|
|
8
|
-
error: "u:bg-red-50 u:border-red-300 u:text-red-800",
|
|
9
|
-
success: "u:bg-green-50 u:border-green-400 u:text-green-800",
|
|
10
|
-
info: "u:bg-blue-50 u:border-blue-300 u:text-blue-800",
|
|
11
|
-
};
|
|
12
|
-
const FlashMessage = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
registerInstance(this, hostRef);
|
|
15
|
-
}
|
|
16
|
-
componentClassName = "";
|
|
17
|
-
removeAfterSeconds = null;
|
|
18
|
-
componentWillLoad() {
|
|
19
|
-
if (this.removeAfterSeconds) {
|
|
20
|
-
flashState.autoRemoveDelay = this.removeAfterSeconds * 1000;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
if (flashState.messages.length === 0) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
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)))))));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { FlashMessage as u_flash_message };
|
|
32
|
-
//# sourceMappingURL=u-flash-message.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-flash-message.entry.js","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"],"names":[],"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,EAAA,OAAO,qBACN,OAAO,EAAA,EAEvB,CAAoB,CAAA,OAAA,EAAA,IAAA,EAAA,OAAA,CAAA,EACpB,CAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAG,CAAA,EACtC,CAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAG,CAAA,CAClC,CACP;;ACdD,MAAM,cAAc,GAAG;AACrB,IAAA,KAAK,EAAE,6CAA6C;AACpD,IAAA,OAAO,EAAE,mDAAmD;AAC5D,IAAA,IAAI,EAAE,gDAAgD;CACvD;MAMY,YAAY,GAAA,MAAA;;;;IACY,kBAAkB,GAAG,EAAE;IAClD,kBAAkB,GAAkB,IAAI;IAEhD,iBAAiB,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,UAAU,CAAC,eAAe,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI;;;IAI/D,MAAM,GAAA;QACJ,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACpC,YAAA,OAAO,IAAI;;QAGb,QACE,WAAK,KAAK,EAAE,CAAA,0DAAA,EAA6D,IAAI,CAAC,kBAAkB,CAAA,CAAE,EAAA,EAC/F,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,MAC/B,WACE,GAAG,EAAE,OAAO,CAAC,EAAE,EACf,KAAK,EAAE,CAAA,wEAAA,EAA2E,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA,CAAE,EACnH,IAAI,EAAC,OAAO,eACF,QAAQ,EAAA,EAElB,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,eAAe,IAAE,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;;;;;;"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-Ci3aTmzp.js';
|
|
2
|
-
import { t } from './i18n-BR-AGAnn.js';
|
|
3
|
-
import { s as state } from './profile-store-RmZB2PTc.js';
|
|
4
|
-
import './unidy-store-BldTAtO0.js';
|
|
5
|
-
import './index-Bjp1XO-f.js';
|
|
6
|
-
|
|
7
|
-
const fullProfileCss = "/*! tailwindcss v4.1.17 | 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-end{justify-content:flex-end}.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\\:justify-center{justify-content:center}.u\\:rounded-\\[50\\%\\]{border-radius:50%}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{}@keyframes spin{to{transform:rotate(1turn)}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{.u\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.u\\:disabled\\:opacity-50:disabled{opacity:.5}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
8
|
-
|
|
9
|
-
const FullProfile = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
fields;
|
|
14
|
-
countryCodeDisplayOption = "label";
|
|
15
|
-
list() {
|
|
16
|
-
if (this.fields) {
|
|
17
|
-
return this.fields
|
|
18
|
-
.split(",")
|
|
19
|
-
.map((field) => field.trim())
|
|
20
|
-
.filter(Boolean);
|
|
21
|
-
}
|
|
22
|
-
return [
|
|
23
|
-
...Object.keys(state.data || {}).filter((field) => field !== "custom_attributes" && field !== "email"),
|
|
24
|
-
...Object.keys(state.data?.custom_attributes || {}).map((field) => `custom_attributes.${field}`),
|
|
25
|
-
];
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return (h("u-profile", { key: '0cdaf68ab9eae2f57a83f413e30b1882a3189826' }, this.list().map((field) => (h("u-field", { key: field, field: field, countryCodeDisplayOption: this.countryCodeDisplayOption }))), h("div", { key: '5a12786199ef18c3429da162aaccff672b3b46a3', class: "u:flex u:justify-end" }, h("u-submit-button", { key: '4ae649be44f8fe36ab0e99ecd64b043b951730ea' }, t("buttons.submit")))));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
FullProfile.style = fullProfileCss;
|
|
32
|
-
|
|
33
|
-
export { FullProfile as u_full_profile };
|
|
34
|
-
//# sourceMappingURL=u-full-profile.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-full-profile.entry.js","sources":["src/profile/components/full-profile/full-profile.css?tag=u-full-profile","src/profile/components/full-profile/full-profile.tsx"],"sourcesContent":["","import { Component, h, Prop } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { state as profileState } from \"../../store/profile-store\";\n\n@Component({\n tag: \"u-full-profile\",\n styleUrl: \"full-profile.css\",\n shadow: false,\n})\nexport class FullProfile {\n @Prop() fields?: string;\n @Prop() countryCodeDisplayOption?: \"icon\" | \"label\" = \"label\";\n\n private list() {\n if (this.fields) {\n return this.fields\n .split(\",\")\n .map((field) => field.trim())\n .filter(Boolean);\n }\n return [\n ...Object.keys(profileState.data || {}).filter((field) => field !== \"custom_attributes\" && field !== \"email\"),\n ...Object.keys(profileState.data?.custom_attributes || {}).map((field) => `custom_attributes.${field}`),\n ];\n }\n\n render() {\n return (\n <u-profile>\n {this.list().map((field) => (\n <u-field key={field} field={field} countryCodeDisplayOption={this.countryCodeDisplayOption} />\n ))}\n <div class=\"u:flex u:justify-end\">\n <u-submit-button>{t(\"buttons.submit\")}</u-submit-button>\n </div>\n </u-profile>\n );\n }\n}\n"],"names":["profileState"],"mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,+/OAA+/O;;MCSzgP,WAAW,GAAA,MAAA;;;;AACd,IAAA,MAAM;IACN,wBAAwB,GAAsB,OAAO;IAErD,IAAI,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC;iBACT,KAAK,CAAC,GAAG;iBACT,GAAG,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,EAAE;iBAC3B,MAAM,CAAC,OAAO,CAAC;;QAEpB,OAAO;YACL,GAAG,MAAM,CAAC,IAAI,CAACA,KAAY,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,KAAK,mBAAmB,IAAI,KAAK,KAAK,OAAO,CAAC;YAC7G,GAAG,MAAM,CAAC,IAAI,CAACA,KAAY,CAAC,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,CAAA,kBAAA,EAAqB,KAAK,CAAA,CAAE,CAAC;SACxG;;IAGH,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACG,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,MACrB,CAAS,CAAA,SAAA,EAAA,EAAA,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EAAI,CAAA,CAC/F,CAAC,EACF,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,sBAAsB,EAAA,EAC/B,CAAkB,CAAA,iBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,CAAC,CAAC,gBAAgB,CAAC,CAAmB,CACpD,CACI;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-logout-button.entry.js","sources":["src/auth/components/logout-button/logout-button.tsx"],"sourcesContent":["import { Component, h, Prop, type EventEmitter, Event } from \"@stencil/core\";\nimport { Auth } from \"../../auth\";\nimport { t } from \"../../../i18n\";\n\n@Component({\n tag: \"u-logout-button\",\n shadow: false,\n})\nexport class LogoutButton {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() reloadOnSuccess = true;\n\n @Event() logout!: EventEmitter<void>;\n\n private handleLogout = async () => {\n const authInstance = await Auth.getInstance();\n\n const result = await authInstance.logout();\n\n if (result === true) {\n this.logout.emit();\n\n if (this.reloadOnSuccess) {\n window.location.reload();\n }\n }\n };\n\n render() {\n return (\n <button type=\"button\" class={this.componentClassName} onClick={this.handleLogout} aria-live=\"polite\">\n {t(\"buttons.logout\")}\n </button>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;MAQa,YAAY,GAAA,MAAA;;;;;IACY,kBAAkB,GAAG,EAAE;IAClD,eAAe,GAAG,IAAI;AAErB,IAAA,MAAM;IAEP,YAAY,GAAG,YAAW;AAChC,QAAA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE;AAE7C,QAAA,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE;AAE1C,QAAA,IAAI,MAAM,KAAK,IAAI,EAAE;AACnB,YAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AAElB,YAAA,IAAI,IAAI,CAAC,eAAe,EAAE;AACxB,gBAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;;;AAG9B,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,QACE,CAAQ,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,EAAA,WAAA,EAAY,QAAQ,EAAA,EACjG,CAAC,CAAC,gBAAgB,CAAC,CACb;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-magic-code-field.entry.js","sources":["src/auth/components/magic-code-field/magic-code-field.css?tag=u-magic-code-field","src/auth/components/magic-code-field/magic-code-field.tsx"],"sourcesContent":["","import { Component, h, Prop, State } from \"@stencil/core\";\nimport { authState } from \"../../store/auth-store\";\nimport { Auth } from \"../../auth\";\n\n@Component({\n tag: \"u-magic-code-field\",\n styleUrl: \"magic-code-field.css\",\n shadow: false,\n})\nexport class MagicCodeField {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n @State() codeDigits: string[] = [\"\", \"\", \"\", \"\"];\n\n private inputRefs: HTMLInputElement[] = [];\n\n private handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement;\n const value = target.value.replace(/[^0-9]/g, \"\");\n const sanitizedDigit = value.slice(-1);\n target.value = sanitizedDigit;\n\n const newDigits = [...this.codeDigits];\n newDigits[index] = sanitizedDigit;\n this.codeDigits = newDigits;\n\n const fullCode = newDigits.join(\"\");\n\n if (value && index < 3) {\n const nextInput = this.inputRefs[index + 1];\n if (nextInput) {\n nextInput.focus();\n }\n }\n\n if (fullCode.length === 4) {\n this.authenticateWithCode(fullCode);\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent, index: number) => {\n if (event.key === \"Backspace\" && !this.codeDigits[index] && index > 0) {\n const prevInput = this.inputRefs[index - 1];\n if (prevInput) {\n prevInput.focus();\n }\n }\n };\n\n private handlePaste = (event: ClipboardEvent) => {\n event.preventDefault();\n const pastedData = event.clipboardData?.getData(\"text\") || \"\";\n const digits = pastedData\n .replace(/[^0-9]/g, \"\")\n .slice(0, 4)\n .split(\"\");\n\n while (digits.length < 4) {\n digits.push(\"\");\n }\n\n this.codeDigits = digits;\n\n const firstEmptyIndex = digits.findIndex((digit) => !digit);\n const targetIndex = firstEmptyIndex !== -1 ? firstEmptyIndex : 3;\n if (this.inputRefs[targetIndex]) {\n this.inputRefs[targetIndex].focus();\n }\n\n const fullCode = digits.join(\"\");\n if (fullCode.length === 4) {\n this.authenticateWithCode(fullCode);\n }\n };\n\n private authenticateWithCode = async (code: string) => {\n const authInstance = await Auth.getInstance();\n\n await authInstance.helpers.authenticateWithMagicCode(code);\n };\n render() {\n if (authState.step !== \"magic-code\") {\n return null;\n }\n\n return (\n <div class={`u:flex u:gap-0.5 u:w-full u:justify-center ${this.componentClassName}`}>\n {this.codeDigits.map((digit, index) => (\n <input\n // biome-ignore lint/suspicious/noArrayIndexKey: digits are fixed position inputs\n key={index}\n ref={(el) => {\n if (el) this.inputRefs[index] = el;\n }}\n id={`digit-input-${index + 1}`}\n type=\"text\"\n inputmode=\"numeric\"\n maxlength=\"1\"\n value={digit}\n disabled={authState.loading}\n onInput={(event) => this.handleInput(event, index)}\n onKeyDown={(event) => this.handleKeyDown(event, index)}\n onPaste={index === 0 ? this.handlePaste : undefined}\n aria-label={`Digit ${index + 1} of ${this.codeDigits.length}`}\n class=\"u:w-[50px] u:h-[50px] u:text-center u:text-lg u:border-2 u:border-solid u:border-slate-200 u:rounded-lg u:outline-none u:transition-colors u:duration-200\"\n part=\"digit-input\"\n />\n ))}\n </div>\n );\n }\n}\n"],"names":["authState"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-missing-field.entry.js","sources":["src/auth/components/missing-field/missing-field.tsx"],"sourcesContent":["import { Component, h, Element } from \"@stencil/core\";\nimport { authState, missingFieldNames } from \"../../store/auth-store\";\n\n@Component({\n tag: \"u-missing-field\",\n shadow: false,\n})\nexport class MissingField {\n @Element() el!: HTMLElement;\n\n render() {\n if (authState.step !== \"missing-fields\") return null;\n\n const fieldNames = missingFieldNames();\n\n return (\n <div class=\"missing-fields\">\n <form>\n {fieldNames.map((fieldName) => (\n <u-field key={fieldName} field={fieldName} renderDefaultLabel={true} />\n ))}\n </form>\n </div>\n );\n }\n}\n"],"names":["authState"],"mappings":";;;;;MAOa,YAAY,GAAA,MAAA;;;;;IAGvB,MAAM,GAAA;AACJ,QAAA,IAAIA,KAAS,CAAC,IAAI,KAAK,gBAAgB;AAAE,YAAA,OAAO,IAAI;AAEpD,QAAA,MAAM,UAAU,GAAG,iBAAiB,EAAE;QAEtC,QACE,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,gBAAgB,EAAA,EACzB,CAAA,CAAA,MAAA,EAAA,IAAA,EACG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,MACxB,CAAS,CAAA,SAAA,EAAA,EAAA,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAI,CAAA,CACxE,CAAC,CACG,CACH;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-missing-fields-submit-button.entry.js","sources":["src/auth/components/missing-fields-submit-button/missing-fields-submit-button.tsx"],"sourcesContent":["import { Component, Element, h } from \"@stencil/core\";\nimport { getUnidyClient } from \"../../../api\";\nimport { state as profileState } from \"../../../profile/store/profile-store\";\nimport { authState, authStore } from \"../../store/auth-store\";\nimport { validateRequiredFieldsUnchanged, buildPayload } from \"../../../profile/profile-helpers\";\nimport type { TokenResponse } from \"../../api/auth\";\nimport { hasSlotContent } from \"../../../shared/component-utils\";\nimport { t } from \"../../../i18n\";\n\n@Component({\n tag: \"u-missing-fields-submit-button\",\n shadow: true,\n})\nexport class MissingFieldsSubmitButton {\n @Element() el!: HTMLElement;\n\n private async onSubmit() {\n profileState.loading = true;\n\n const { configuration, ...stateWithoutConfig } = profileState;\n\n if (!validateRequiredFieldsUnchanged(stateWithoutConfig.data)) {\n profileState.loading = false;\n return;\n }\n\n const updatedProfileData = buildPayload(stateWithoutConfig.data);\n const sid = authState.sid as string;\n\n const [error, response] = await getUnidyClient().auth.updateMissingFields(sid, updatedProfileData);\n\n if (error) {\n profileState.loading = false;\n return;\n }\n\n const { jwt } = response as TokenResponse;\n profileState.loading = false;\n authStore.setToken(jwt);\n\n // Emit authEvent to allow modal-based logins to close after successful submission\n this.el.dispatchEvent(new CustomEvent(\"authEvent\", { detail: { jwt }, bubbles: true, composed: true }));\n }\n\n render() {\n if (authState.step !== \"missing-fields\") return null;\n\n return (\n <div>\n <button\n type=\"button\"\n onClick={() => this.onSubmit()}\n part=\"button\"\n disabled={(profileState.errors && Object.keys(profileState.errors).length > 0) || profileState.phoneValid === false}\n aria-live=\"polite\"\n >\n {profileState.loading ? <u-spinner /> : hasSlotContent(this.el) ? <slot /> : t(\"buttons.submit\")}\n </button>\n </div>\n );\n }\n}\n"],"names":["profileState","authState"],"mappings":";;;;;;;;;;MAaa,yBAAyB,GAAA,MAAA;;;;;AAG5B,IAAA,MAAM,QAAQ,GAAA;AACpB,QAAAA,KAAY,CAAC,OAAO,GAAG,IAAI;QAE3B,MAAM,EAAE,aAAa,EAAE,GAAG,kBAAkB,EAAE,GAAGA,KAAY;QAE7D,IAAI,CAAC,+BAA+B,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;AAC7D,YAAAA,KAAY,CAAC,OAAO,GAAG,KAAK;YAC5B;;QAGF,MAAM,kBAAkB,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC;AAChE,QAAA,MAAM,GAAG,GAAGC,OAAS,CAAC,GAAa;AAEnC,QAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,MAAM,cAAc,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,CAAC;QAElG,IAAI,KAAK,EAAE;AACT,YAAAD,KAAY,CAAC,OAAO,GAAG,KAAK;YAC5B;;AAGF,QAAA,MAAM,EAAE,GAAG,EAAE,GAAG,QAAyB;AACzC,QAAAA,KAAY,CAAC,OAAO,GAAG,KAAK;AAC5B,QAAA,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;;QAGvB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;;IAGzG,MAAM,GAAA;AACJ,QAAA,IAAIC,OAAS,CAAC,IAAI,KAAK,gBAAgB;AAAE,YAAA,OAAO,IAAI;QAEpD,QACE,CAAA,CAAA,KAAA,EAAA,IAAA,EACE,CAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAC9B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAACD,KAAY,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAACA,KAAY,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,KAAKA,KAAY,CAAC,UAAU,KAAK,KAAK,EAAA,WAAA,EACzG,QAAQ,EAEjB,EAAAA,KAAY,CAAC,OAAO,GAAG,CAAa,CAAA,WAAA,EAAA,IAAA,CAAA,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,GAAG,CAAC,CAAC,gBAAgB,CAAC,CACzF,CACL;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-newsletter-checkbox.entry.js","sources":["src/newsletter/components/newsletter-checkbox/newsletter-checkbox.tsx"],"sourcesContent":["import { Component, h, Method, Prop } from \"@stencil/core\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\n\n@Component({\n tag: \"u-newsletter-checkbox\",\n shadow: false,\n})\nexport class NewsletterCheckbox {\n @Prop() internalName!: string;\n @Prop() checked = false;\n @Prop({ attribute: \"class-name\" }) componentClassName?: string;\n\n componentWillLoad() {\n if (this.checked && !this.isSubscribed) {\n const checkedNewsletters = newsletterStore.state.checkedNewsletters;\n if (!(this.internalName in checkedNewsletters)) {\n newsletterStore.set(\"checkedNewsletters\", {\n ...checkedNewsletters,\n [this.internalName]: [],\n });\n }\n }\n }\n\n private get isSubscribed(): boolean {\n return NewsletterHelpers.isSubscribed(this.internalName);\n }\n\n private get isChecked(): boolean {\n return this.isSubscribed || this.internalName in newsletterStore.state.checkedNewsletters;\n }\n\n private syncToStore(checked: boolean) {\n if (checked) {\n newsletterStore.set(\"checkedNewsletters\", {\n ...newsletterStore.state.checkedNewsletters,\n [this.internalName]: [],\n });\n } else {\n const { [this.internalName]: _, ...rest } = newsletterStore.state.checkedNewsletters;\n newsletterStore.set(\"checkedNewsletters\", rest);\n }\n }\n\n private handleChange = () => {\n if (this.isSubscribed) return;\n this.syncToStore(!this.isChecked);\n };\n\n /** Public method to toggle the checkbox programmatically */\n @Method()\n async toggle() {\n this.handleChange();\n }\n\n /** Public method to set the checkbox state programmatically */\n @Method()\n async setChecked(checked: boolean) {\n if (this.isSubscribed) return;\n if (checked !== this.isChecked) {\n this.syncToStore(checked);\n }\n }\n\n render() {\n return (\n <input\n type=\"checkbox\"\n checked={this.isChecked}\n disabled={this.isSubscribed}\n onChange={this.handleChange}\n class={this.componentClassName}\n aria-checked={this.isChecked}\n />\n );\n }\n}\n"],"names":["NewsletterHelpers.isSubscribed"],"mappings":";;;;;;;;;;;;;MAQa,kBAAkB,GAAA,MAAA;;;;AACrB,IAAA,YAAY;IACZ,OAAO,GAAG,KAAK;AACY,IAAA,kBAAkB;IAErD,iBAAiB,GAAA;QACf,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;AACtC,YAAA,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,kBAAkB;YACnE,IAAI,EAAE,IAAI,CAAC,YAAY,IAAI,kBAAkB,CAAC,EAAE;AAC9C,gBAAA,eAAe,CAAC,GAAG,CAAC,oBAAoB,EAAE;AACxC,oBAAA,GAAG,kBAAkB;AACrB,oBAAA,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE;AACxB,iBAAA,CAAC;;;;AAKR,IAAA,IAAY,YAAY,GAAA;QACtB,OAAOA,YAA8B,CAAC,IAAI,CAAC,YAAY,CAAC;;AAG1D,IAAA,IAAY,SAAS,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,IAAI,eAAe,CAAC,KAAK,CAAC,kBAAkB;;AAGnF,IAAA,WAAW,CAAC,OAAgB,EAAA;QAClC,IAAI,OAAO,EAAE;AACX,YAAA,eAAe,CAAC,GAAG,CAAC,oBAAoB,EAAE;AACxC,gBAAA,GAAG,eAAe,CAAC,KAAK,CAAC,kBAAkB;AAC3C,gBAAA,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE;AACxB,aAAA,CAAC;;aACG;AACL,YAAA,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,kBAAkB;AACpF,YAAA,eAAe,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC;;;IAI3C,YAAY,GAAG,MAAK;QAC1B,IAAI,IAAI,CAAC,YAAY;YAAE;QACvB,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;AACnC,KAAC;;AAID,IAAA,MAAM,MAAM,GAAA;QACV,IAAI,CAAC,YAAY,EAAE;;;IAKrB,MAAM,UAAU,CAAC,OAAgB,EAAA;QAC/B,IAAI,IAAI,CAAC,YAAY;YAAE;AACvB,QAAA,IAAI,OAAO,KAAK,IAAI,CAAC,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;;;IAI7B,MAAM,GAAA;QACJ,QACE,CAAA,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,KAAK,EAAE,IAAI,CAAC,kBAAkB,kBAChB,IAAI,CAAC,SAAS,EAAA,CAC5B;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-newsletter-logout-button.entry.js","sources":["src/newsletter/components/logout-button/logout-button.tsx"],"sourcesContent":["import { Component, h, Prop, Element, Host } from \"@stencil/core\";\nimport { newsletterLogout } from \"../../newsletter-helpers\";\nimport { t } from \"../../../i18n\";\nimport { Flash } from \"../../../shared/store/flash-store\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\nimport { hasSlotContent } from \"../../../shared/component-utils\";\n\n@Component({\n tag: \"u-newsletter-logout-button\",\n shadow: false,\n})\nexport class LogoutButton {\n @Element() el!: HTMLElement;\n\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n private handleLogout = () => {\n newsletterLogout();\n Flash.success.addMessage(t(\"newsletter.success.logout\"));\n };\n\n render() {\n if (newsletterStore.state.preferenceToken === \"\" || newsletterStore.state.isAuthenticated) {\n return <Host style={{ display: \"none\" }} />;\n }\n\n const hasContent = hasSlotContent(this.el);\n\n return (\n <Host>\n <button\n type=\"button\"\n part=\"button\"\n class={this.componentClassName}\n onClick={this.handleLogout}\n aria-label=\"Logout\"\n aria-live=\"polite\"\n >\n {hasContent ? <slot /> : t(\"newsletter.buttons.logout\")}\n </button>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,YAAY,GAAA,MAAA;;;;;IAGY,kBAAkB,GAAG,EAAE;IAElD,YAAY,GAAG,MAAK;AAC1B,QAAA,gBAAgB,EAAE;QAClB,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC;AAC1D,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,eAAe,CAAC,KAAK,CAAC,eAAe,KAAK,EAAE,IAAI,eAAe,CAAC,KAAK,CAAC,eAAe,EAAE;AACzF,YAAA,OAAO,CAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAA,CAAI;;QAG7C,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;AAE1C,QAAA,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAC9B,OAAO,EAAE,IAAI,CAAC,YAAY,EACf,YAAA,EAAA,QAAQ,eACT,QAAQ,EAAA,EAEjB,UAAU,GAAG,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,GAAG,CAAC,CAAC,2BAA2B,CAAC,CAChD,CACJ;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u-newsletter-preference-checkbox.entry.js","sources":["src/newsletter/components/preference-checkbox/preference-checkbox.tsx"],"sourcesContent":["import { Component, h, Method, Prop, State } from \"@stencil/core\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\nimport { type ExistingSubscription, newsletterStore } from \"../../store/newsletter-store\";\n\n@Component({\n tag: \"u-newsletter-preference-checkbox\",\n shadow: false,\n})\nexport class NewsletterPreferenceCheckbox {\n @Prop() internalName!: string;\n @Prop() preferenceIdentifier!: string;\n @Prop() checked = false;\n @Prop({ attribute: \"class-name\" }) componentClassName?: string;\n\n @State() loading = false;\n\n @State() existingSubscriptions: ExistingSubscription[] = [];\n @State() checkedPreferences: string[] = [];\n\n private storeUnsubscribe?: () => void;\n\n componentWillLoad() {\n this.subscribeToStore();\n this.initializeCheckedState();\n }\n\n disconnectedCallback() {\n this.storeUnsubscribe?.();\n }\n\n private subscribeToStore() {\n this.storeUnsubscribe = newsletterStore.onChange(\"existingSubscriptions\", (subscriptions) => {\n this.existingSubscriptions = subscriptions;\n });\n\n newsletterStore.onChange(\"checkedNewsletters\", (checkedNewsletters) => {\n this.checkedPreferences = checkedNewsletters[this.internalName] || [];\n });\n\n this.existingSubscriptions = newsletterStore.state.existingSubscriptions;\n this.checkedPreferences = newsletterStore.state.checkedNewsletters[this.internalName] || [];\n }\n\n private initializeCheckedState() {\n if (NewsletterHelpers.isSubscribed(this.internalName)) {\n return;\n }\n\n if (this.checked) {\n this.syncToStore(true);\n }\n }\n\n private get subscription(): ExistingSubscription | undefined {\n return this.existingSubscriptions.find((sub) => sub.newsletter_internal_name === this.internalName);\n }\n\n private get isSubscribed(): boolean {\n return this.subscription !== undefined;\n }\n\n private get isConfirmed(): boolean {\n return this.subscription?.confirmed ?? false;\n }\n\n private get isDisabled(): boolean {\n return this.loading || (this.isSubscribed && !this.isConfirmed);\n }\n\n private get isChecked(): boolean {\n return this.checkedPreferences.includes(this.preferenceIdentifier);\n }\n\n private syncToStore(add: boolean) {\n const currentPreferences = newsletterStore.state.checkedNewsletters[this.internalName] || [];\n\n if (add) {\n if (!currentPreferences.includes(this.preferenceIdentifier)) {\n newsletterStore.set(\"checkedNewsletters\", {\n ...newsletterStore.state.checkedNewsletters,\n [this.internalName]: [...currentPreferences, this.preferenceIdentifier],\n });\n }\n } else {\n newsletterStore.set(\"checkedNewsletters\", {\n ...newsletterStore.state.checkedNewsletters,\n [this.internalName]: currentPreferences.filter((p) => p !== this.preferenceIdentifier),\n });\n }\n }\n\n private async persistIfSubscribed() {\n if (this.isSubscribed && this.isConfirmed) {\n this.loading = true;\n await NewsletterHelpers.updateSubscriptionPreferences(this.internalName);\n this.loading = false;\n }\n }\n\n private handleChange = async () => {\n if (this.isDisabled) return;\n\n this.syncToStore(!this.isChecked);\n await this.persistIfSubscribed();\n };\n\n /** Public method to toggle the checkbox programmatically */\n @Method()\n async toggle() {\n await this.handleChange();\n }\n\n /** Public method to set the checkbox state programmatically */\n @Method()\n async setChecked(checked: boolean) {\n if (this.isDisabled) return;\n if (checked !== this.isChecked) {\n this.syncToStore(checked);\n await this.persistIfSubscribed();\n }\n }\n\n render() {\n return (\n <input\n type=\"checkbox\"\n checked={this.isChecked}\n disabled={this.isDisabled}\n onChange={this.handleChange}\n class={this.componentClassName}\n aria-checked={this.isChecked}\n aria-busy={this.loading}\n aria-disabled={this.isDisabled}\n data-internal-name={this.internalName}\n data-preference-identifier={this.preferenceIdentifier}\n />\n );\n }\n}\n"],"names":["NewsletterHelpers.isSubscribed","NewsletterHelpers.updateSubscriptionPreferences"],"mappings":"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"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-Ci3aTmzp.js';
|
|
2
|
-
import { t } from './i18n-BR-AGAnn.js';
|
|
3
|
-
import { a as isSubscribed, i as isConfirmed, r as resendDoi } from './newsletter-helpers-Dh9k-4Ph.js';
|
|
4
|
-
import { F as Flash } from './flash-store-CEvWSG0c.js';
|
|
5
|
-
import './unidy-store-BldTAtO0.js';
|
|
6
|
-
import './index-Bjp1XO-f.js';
|
|
7
|
-
import './index-DKaIwo59.js';
|
|
8
|
-
import './profile-store-RmZB2PTc.js';
|
|
9
|
-
import './auth-DLKPv5Zm.js';
|
|
10
|
-
import './auth-store-BMqUdTpC.js';
|
|
11
|
-
import './component-utils-D1lzXl_Z.js';
|
|
12
|
-
import './newsletter-store-BYmuLQg8.js';
|
|
13
|
-
|
|
14
|
-
const NewsletterResendDoiButton = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
registerInstance(this, hostRef);
|
|
17
|
-
}
|
|
18
|
-
internalName;
|
|
19
|
-
componentClassName = "";
|
|
20
|
-
isResending = false;
|
|
21
|
-
get shouldShow() {
|
|
22
|
-
return isSubscribed(this.internalName) && !isConfirmed(this.internalName);
|
|
23
|
-
}
|
|
24
|
-
handleClick = async () => {
|
|
25
|
-
this.isResending = true;
|
|
26
|
-
const success = await resendDoi(this.internalName);
|
|
27
|
-
this.isResending = false;
|
|
28
|
-
if (success) {
|
|
29
|
-
Flash.success.addMessage(t("newsletter.success.doi_sent"));
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
Flash.error.addMessage(t("newsletter.errors.resend_doi_failed"));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
render() {
|
|
36
|
-
if (!this.shouldShow) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
return (h("button", { type: "button", onClick: this.handleClick, disabled: this.isResending, "aria-busy": this.isResending, "aria-live": "polite", class: `${this.componentClassName} u:flex u:items-center u:justify-center` }, this.isResending ? h("u-spinner", null) : t("newsletter.buttons.resend_doi")));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export { NewsletterResendDoiButton as u_newsletter_resend_doi_button };
|
|
44
|
-
//# sourceMappingURL=u-newsletter-resend-doi-button.entry.js.map
|