@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,86 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { t } from './i18n.js';
|
|
3
|
-
import { s as state } from './profile-store.js';
|
|
4
|
-
import { d as defineCustomElement$6 } from './field.js';
|
|
5
|
-
import { d as defineCustomElement$5 } from './profile.js';
|
|
6
|
-
import { d as defineCustomElement$4 } from './raw-field.js';
|
|
7
|
-
import { d as defineCustomElement$3 } from './spinner.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './submit-button.js';
|
|
9
|
-
|
|
10
|
-
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}";
|
|
11
|
-
|
|
12
|
-
const FullProfile = /*@__PURE__*/ proxyCustomElement(class FullProfile extends HTMLElement {
|
|
13
|
-
constructor(registerHost) {
|
|
14
|
-
super();
|
|
15
|
-
if (registerHost !== false) {
|
|
16
|
-
this.__registerHost();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
fields;
|
|
20
|
-
countryCodeDisplayOption = "label";
|
|
21
|
-
list() {
|
|
22
|
-
if (this.fields) {
|
|
23
|
-
return this.fields
|
|
24
|
-
.split(",")
|
|
25
|
-
.map((field) => field.trim())
|
|
26
|
-
.filter(Boolean);
|
|
27
|
-
}
|
|
28
|
-
return [
|
|
29
|
-
...Object.keys(state.data || {}).filter((field) => field !== "custom_attributes" && field !== "email"),
|
|
30
|
-
...Object.keys(state.data?.custom_attributes || {}).map((field) => `custom_attributes.${field}`),
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
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")))));
|
|
35
|
-
}
|
|
36
|
-
static get style() { return fullProfileCss; }
|
|
37
|
-
}, [768, "u-full-profile", {
|
|
38
|
-
"fields": [1],
|
|
39
|
-
"countryCodeDisplayOption": [1, "country-code-display-option"]
|
|
40
|
-
}]);
|
|
41
|
-
function defineCustomElement$1() {
|
|
42
|
-
if (typeof customElements === "undefined") {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const components = ["u-full-profile", "u-field", "u-profile", "u-raw-field", "u-spinner", "u-submit-button"];
|
|
46
|
-
components.forEach(tagName => { switch (tagName) {
|
|
47
|
-
case "u-full-profile":
|
|
48
|
-
if (!customElements.get(tagName)) {
|
|
49
|
-
customElements.define(tagName, FullProfile);
|
|
50
|
-
}
|
|
51
|
-
break;
|
|
52
|
-
case "u-field":
|
|
53
|
-
if (!customElements.get(tagName)) {
|
|
54
|
-
defineCustomElement$6();
|
|
55
|
-
}
|
|
56
|
-
break;
|
|
57
|
-
case "u-profile":
|
|
58
|
-
if (!customElements.get(tagName)) {
|
|
59
|
-
defineCustomElement$5();
|
|
60
|
-
}
|
|
61
|
-
break;
|
|
62
|
-
case "u-raw-field":
|
|
63
|
-
if (!customElements.get(tagName)) {
|
|
64
|
-
defineCustomElement$4();
|
|
65
|
-
}
|
|
66
|
-
break;
|
|
67
|
-
case "u-spinner":
|
|
68
|
-
if (!customElements.get(tagName)) {
|
|
69
|
-
defineCustomElement$3();
|
|
70
|
-
}
|
|
71
|
-
break;
|
|
72
|
-
case "u-submit-button":
|
|
73
|
-
if (!customElements.get(tagName)) {
|
|
74
|
-
defineCustomElement$2();
|
|
75
|
-
}
|
|
76
|
-
break;
|
|
77
|
-
} });
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const UFullProfile = FullProfile;
|
|
81
|
-
const defineCustomElement = defineCustomElement$1;
|
|
82
|
-
|
|
83
|
-
export { UFullProfile, defineCustomElement };
|
|
84
|
-
//# sourceMappingURL=u-full-profile.js.map
|
|
85
|
-
|
|
86
|
-
//# sourceMappingURL=u-full-profile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-full-profile.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,+/OAA+/O;;MCSzgP,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAA,WAAA,CAAA;;;;;;;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,CAACC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","profileState"],"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"],"version":3}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { A as Auth } from './auth.js';
|
|
3
|
-
import { t } from './i18n.js';
|
|
4
|
-
|
|
5
|
-
const LogoutButton = /*@__PURE__*/ proxyCustomElement(class LogoutButton extends HTMLElement {
|
|
6
|
-
constructor(registerHost) {
|
|
7
|
-
super();
|
|
8
|
-
if (registerHost !== false) {
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
}
|
|
11
|
-
this.logout = createEvent(this, "logout", 7);
|
|
12
|
-
}
|
|
13
|
-
componentClassName = "";
|
|
14
|
-
reloadOnSuccess = true;
|
|
15
|
-
logout;
|
|
16
|
-
handleLogout = async () => {
|
|
17
|
-
const authInstance = await Auth.getInstance();
|
|
18
|
-
const result = await authInstance.logout();
|
|
19
|
-
if (result === true) {
|
|
20
|
-
this.logout.emit();
|
|
21
|
-
if (this.reloadOnSuccess) {
|
|
22
|
-
window.location.reload();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
render() {
|
|
27
|
-
return (h("button", { key: '88a2362402a6194c9dc685adbae55a9ac601e7d5', type: "button", class: this.componentClassName, onClick: this.handleLogout, "aria-live": "polite" }, t("buttons.logout")));
|
|
28
|
-
}
|
|
29
|
-
}, [768, "u-logout-button", {
|
|
30
|
-
"componentClassName": [1, "class-name"],
|
|
31
|
-
"reloadOnSuccess": [4, "reload-on-success"]
|
|
32
|
-
}]);
|
|
33
|
-
function defineCustomElement$1() {
|
|
34
|
-
if (typeof customElements === "undefined") {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const components = ["u-logout-button"];
|
|
38
|
-
components.forEach(tagName => { switch (tagName) {
|
|
39
|
-
case "u-logout-button":
|
|
40
|
-
if (!customElements.get(tagName)) {
|
|
41
|
-
customElements.define(tagName, LogoutButton);
|
|
42
|
-
}
|
|
43
|
-
break;
|
|
44
|
-
} });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const ULogoutButton = LogoutButton;
|
|
48
|
-
const defineCustomElement = defineCustomElement$1;
|
|
49
|
-
|
|
50
|
-
export { ULogoutButton, defineCustomElement };
|
|
51
|
-
//# sourceMappingURL=u-logout-button.js.map
|
|
52
|
-
|
|
53
|
-
//# sourceMappingURL=u-logout-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-logout-button.js","mappings":";;;;MAQa,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAA,WAAA,CAAA;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"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"],"version":3}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as state } from './auth-store.js';
|
|
3
|
-
import { A as Auth } from './auth.js';
|
|
4
|
-
|
|
5
|
-
const magicCodeFieldCss = "/*! 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-border-style:solid;--tw-duration:initial;--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 theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--u-color-slate-200:oklch(92.9% .013 255.508);--u-spacing:.25rem;--u-text-lg:1.125rem;--u-text-lg--line-height:1.55556;--u-radius-lg:.5rem;--u-default-transition-duration:.15s;--u-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--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\\:h-\\[50px\\]{height:50px}.u\\:w-\\[50px\\]{width:50px}.u\\:w-full{width:100%}.u\\:justify-center{justify-content:center}.u\\:gap-0\\.5{gap:calc(var(--u-spacing)*.5)}.u\\:rounded-lg{border-radius:var(--u-radius-lg)}.u\\:border-2{border-style:var(--tw-border-style);border-width:2px}.u\\:border-solid{--tw-border-style:solid;border-style:solid}.u\\:border-slate-200{border-color:var(--u-color-slate-200)}.u\\:text-center{text-align:center}.u\\:text-lg{font-size:var(--u-text-lg);line-height:var(--tw-leading,var(--u-text-lg--line-height))}.u\\:transition-colors{transition-duration:var(--tw-duration,var(--u-default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--u-default-transition-timing-function))}.u\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.u\\:outline-none{--tw-outline-style:none;outline-style:none}.fixed{position:fixed}.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)}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}@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}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-duration{syntax:\"*\";inherits:false}";
|
|
6
|
-
|
|
7
|
-
const MagicCodeField = /*@__PURE__*/ proxyCustomElement(class MagicCodeField extends HTMLElement {
|
|
8
|
-
constructor(registerHost) {
|
|
9
|
-
super();
|
|
10
|
-
if (registerHost !== false) {
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
componentClassName = "";
|
|
15
|
-
codeDigits = ["", "", "", ""];
|
|
16
|
-
inputRefs = [];
|
|
17
|
-
handleInput = (event, index) => {
|
|
18
|
-
const target = event.target;
|
|
19
|
-
const value = target.value.replace(/[^0-9]/g, "");
|
|
20
|
-
const sanitizedDigit = value.slice(-1);
|
|
21
|
-
target.value = sanitizedDigit;
|
|
22
|
-
const newDigits = [...this.codeDigits];
|
|
23
|
-
newDigits[index] = sanitizedDigit;
|
|
24
|
-
this.codeDigits = newDigits;
|
|
25
|
-
const fullCode = newDigits.join("");
|
|
26
|
-
if (value && index < 3) {
|
|
27
|
-
const nextInput = this.inputRefs[index + 1];
|
|
28
|
-
if (nextInput) {
|
|
29
|
-
nextInput.focus();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (fullCode.length === 4) {
|
|
33
|
-
this.authenticateWithCode(fullCode);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
handleKeyDown = (event, index) => {
|
|
37
|
-
if (event.key === "Backspace" && !this.codeDigits[index] && index > 0) {
|
|
38
|
-
const prevInput = this.inputRefs[index - 1];
|
|
39
|
-
if (prevInput) {
|
|
40
|
-
prevInput.focus();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
handlePaste = (event) => {
|
|
45
|
-
event.preventDefault();
|
|
46
|
-
const pastedData = event.clipboardData?.getData("text") || "";
|
|
47
|
-
const digits = pastedData
|
|
48
|
-
.replace(/[^0-9]/g, "")
|
|
49
|
-
.slice(0, 4)
|
|
50
|
-
.split("");
|
|
51
|
-
while (digits.length < 4) {
|
|
52
|
-
digits.push("");
|
|
53
|
-
}
|
|
54
|
-
this.codeDigits = digits;
|
|
55
|
-
const firstEmptyIndex = digits.findIndex((digit) => !digit);
|
|
56
|
-
const targetIndex = firstEmptyIndex !== -1 ? firstEmptyIndex : 3;
|
|
57
|
-
if (this.inputRefs[targetIndex]) {
|
|
58
|
-
this.inputRefs[targetIndex].focus();
|
|
59
|
-
}
|
|
60
|
-
const fullCode = digits.join("");
|
|
61
|
-
if (fullCode.length === 4) {
|
|
62
|
-
this.authenticateWithCode(fullCode);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
authenticateWithCode = async (code) => {
|
|
66
|
-
const authInstance = await Auth.getInstance();
|
|
67
|
-
await authInstance.helpers.authenticateWithMagicCode(code);
|
|
68
|
-
};
|
|
69
|
-
render() {
|
|
70
|
-
if (state.step !== "magic-code") {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
return (h("div", { class: `u:flex u:gap-0.5 u:w-full u:justify-center ${this.componentClassName}` }, this.codeDigits.map((digit, index) => (h("input", {
|
|
74
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: digits are fixed position inputs
|
|
75
|
-
key: index, ref: (el) => {
|
|
76
|
-
if (el)
|
|
77
|
-
this.inputRefs[index] = el;
|
|
78
|
-
}, id: `digit-input-${index + 1}`, type: "text", inputmode: "numeric", maxlength: "1", value: digit, disabled: state.loading, onInput: (event) => this.handleInput(event, index), onKeyDown: (event) => this.handleKeyDown(event, index), onPaste: index === 0 ? this.handlePaste : undefined, "aria-label": `Digit ${index + 1} of ${this.codeDigits.length}`, 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", part: "digit-input"
|
|
79
|
-
})))));
|
|
80
|
-
}
|
|
81
|
-
static get style() { return magicCodeFieldCss; }
|
|
82
|
-
}, [768, "u-magic-code-field", {
|
|
83
|
-
"componentClassName": [1, "class-name"],
|
|
84
|
-
"codeDigits": [32]
|
|
85
|
-
}]);
|
|
86
|
-
function defineCustomElement$1() {
|
|
87
|
-
if (typeof customElements === "undefined") {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const components = ["u-magic-code-field"];
|
|
91
|
-
components.forEach(tagName => { switch (tagName) {
|
|
92
|
-
case "u-magic-code-field":
|
|
93
|
-
if (!customElements.get(tagName)) {
|
|
94
|
-
customElements.define(tagName, MagicCodeField);
|
|
95
|
-
}
|
|
96
|
-
break;
|
|
97
|
-
} });
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const UMagicCodeField = MagicCodeField;
|
|
101
|
-
const defineCustomElement = defineCustomElement$1;
|
|
102
|
-
|
|
103
|
-
export { UMagicCodeField, defineCustomElement };
|
|
104
|
-
//# sourceMappingURL=u-magic-code-field.js.map
|
|
105
|
-
|
|
106
|
-
//# sourceMappingURL=u-magic-code-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-magic-code-field.js","mappings":";;;;AAAA,MAAM,iBAAiB,GAAG,6/PAA6/P;;MCS1gQ,cAAc,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAA,WAAA,CAAA;;;;;;;IACU,kBAAkB,GAAG,EAAE;IAEjD,UAAU,GAAa,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAExC,SAAS,GAAuB,EAAE;AAElC,IAAA,WAAW,GAAG,CAAC,KAAY,EAAE,KAAa,KAAI;AACpD,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAA0B;AAC/C,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;QACjD,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;AACtC,QAAA,MAAM,CAAC,KAAK,GAAG,cAAc;QAE7B,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;AACtC,QAAA,SAAS,CAAC,KAAK,CAAC,GAAG,cAAc;AACjC,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS;QAE3B,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;AAEnC,QAAA,IAAI,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE;YACtB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC;YAC3C,IAAI,SAAS,EAAE;gBACb,SAAS,CAAC,KAAK,EAAE;;;AAIrB,QAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACzB,YAAA,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC;;AAEvC,KAAC;AAEO,IAAA,aAAa,GAAG,CAAC,KAAoB,EAAE,KAAa,KAAI;AAC9D,QAAA,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE;YACrE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC;YAC3C,IAAI,SAAS,EAAE;gBACb,SAAS,CAAC,KAAK,EAAE;;;AAGvB,KAAC;AAEO,IAAA,WAAW,GAAG,CAAC,KAAqB,KAAI;QAC9C,KAAK,CAAC,cAAc,EAAE;AACtB,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE;QAC7D,MAAM,MAAM,GAAG;AACZ,aAAA,OAAO,CAAC,SAAS,EAAE,EAAE;AACrB,aAAA,KAAK,CAAC,CAAC,EAAE,CAAC;aACV,KAAK,CAAC,EAAE,CAAC;AAEZ,QAAA,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;AACxB,YAAA,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;;AAGjB,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM;AAExB,QAAA,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC;AAC3D,QAAA,MAAM,WAAW,GAAG,eAAe,KAAK,EAAE,GAAG,eAAe,GAAG,CAAC;AAChE,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;YAC/B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE;;QAGrC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;AAChC,QAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACzB,YAAA,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC;;AAEvC,KAAC;AAEO,IAAA,oBAAoB,GAAG,OAAO,IAAY,KAAI;AACpD,QAAA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE;QAE7C,MAAM,YAAY,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC;AAC5D,KAAC;IACD,MAAM,GAAA;AACJ,QAAA,IAAIC,KAAS,CAAC,IAAI,KAAK,YAAY,EAAE;AACnC,YAAA,OAAO,IAAI;;AAGb,QAAA,QACE,WAAK,KAAK,EAAE,CAAA,2CAAA,EAA8C,IAAI,CAAC,kBAAkB,CAAA,CAAE,EAChF,EAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MAChC,CAAA,CAAA,OAAA,EAAA;;YAEE,GAAG,EAAE,KAAK,EACV,GAAG,EAAE,CAAC,EAAE,KAAI;AACV,gBAAA,IAAI,EAAE;AAAE,oBAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE;aACnC,EACD,EAAE,EAAE,CAAA,YAAA,EAAe,KAAK,GAAG,CAAC,EAAE,EAC9B,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,SAAS,EACnB,SAAS,EAAC,GAAG,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAEA,KAAS,CAAC,OAAO,EAC3B,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,EAClD,SAAS,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,EACtD,OAAO,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,SAAS,gBACvC,SAAS,KAAK,GAAG,CAAC,CAAA,IAAA,EAAO,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,EAC7D,KAAK,EAAC,2JAA2J,EACjK,IAAI,EAAC;UACL,CACH,CAAC,CACE;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","authState"],"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"],"version":3}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as state, m as missingFieldNames } from './auth-store.js';
|
|
3
|
-
import { d as defineCustomElement$4 } from './field.js';
|
|
4
|
-
import { d as defineCustomElement$3 } from './raw-field.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './spinner.js';
|
|
6
|
-
|
|
7
|
-
const MissingField = /*@__PURE__*/ proxyCustomElement(class MissingField extends HTMLElement {
|
|
8
|
-
constructor(registerHost) {
|
|
9
|
-
super();
|
|
10
|
-
if (registerHost !== false) {
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
get el() { return this; }
|
|
15
|
-
render() {
|
|
16
|
-
if (state.step !== "missing-fields")
|
|
17
|
-
return null;
|
|
18
|
-
const fieldNames = missingFieldNames();
|
|
19
|
-
return (h("div", { class: "missing-fields" }, h("form", null, fieldNames.map((fieldName) => (h("u-field", { key: fieldName, field: fieldName, renderDefaultLabel: true }))))));
|
|
20
|
-
}
|
|
21
|
-
}, [256, "u-missing-field"]);
|
|
22
|
-
function defineCustomElement$1() {
|
|
23
|
-
if (typeof customElements === "undefined") {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const components = ["u-missing-field", "u-field", "u-raw-field", "u-spinner"];
|
|
27
|
-
components.forEach(tagName => { switch (tagName) {
|
|
28
|
-
case "u-missing-field":
|
|
29
|
-
if (!customElements.get(tagName)) {
|
|
30
|
-
customElements.define(tagName, MissingField);
|
|
31
|
-
}
|
|
32
|
-
break;
|
|
33
|
-
case "u-field":
|
|
34
|
-
if (!customElements.get(tagName)) {
|
|
35
|
-
defineCustomElement$4();
|
|
36
|
-
}
|
|
37
|
-
break;
|
|
38
|
-
case "u-raw-field":
|
|
39
|
-
if (!customElements.get(tagName)) {
|
|
40
|
-
defineCustomElement$3();
|
|
41
|
-
}
|
|
42
|
-
break;
|
|
43
|
-
case "u-spinner":
|
|
44
|
-
if (!customElements.get(tagName)) {
|
|
45
|
-
defineCustomElement$2();
|
|
46
|
-
}
|
|
47
|
-
break;
|
|
48
|
-
} });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const UMissingField = MissingField;
|
|
52
|
-
const defineCustomElement = defineCustomElement$1;
|
|
53
|
-
|
|
54
|
-
export { UMissingField, defineCustomElement };
|
|
55
|
-
//# sourceMappingURL=u-missing-field.js.map
|
|
56
|
-
|
|
57
|
-
//# sourceMappingURL=u-missing-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-missing-field.js","mappings":";;;;;;MAOa,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAA,WAAA,CAAA;;;;;;;;IAGvB,MAAM,GAAA;AACJ,QAAA,IAAIC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","authState"],"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"],"version":3}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as getUnidyClient } from './index2.js';
|
|
3
|
-
import { s as state } from './profile-store.js';
|
|
4
|
-
import { s as state$1, a as authStore } from './auth-store.js';
|
|
5
|
-
import { v as validateRequiredFieldsUnchanged, b as buildPayload } from './profile-helpers.js';
|
|
6
|
-
import { h as hasSlotContent } from './component-utils.js';
|
|
7
|
-
import { t } from './i18n.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './spinner.js';
|
|
9
|
-
|
|
10
|
-
const MissingFieldsSubmitButton = /*@__PURE__*/ proxyCustomElement(class MissingFieldsSubmitButton extends HTMLElement {
|
|
11
|
-
constructor(registerHost) {
|
|
12
|
-
super();
|
|
13
|
-
if (registerHost !== false) {
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
}
|
|
16
|
-
this.__attachShadow();
|
|
17
|
-
}
|
|
18
|
-
get el() { return this; }
|
|
19
|
-
async onSubmit() {
|
|
20
|
-
state.loading = true;
|
|
21
|
-
const { configuration, ...stateWithoutConfig } = state;
|
|
22
|
-
if (!validateRequiredFieldsUnchanged(stateWithoutConfig.data)) {
|
|
23
|
-
state.loading = false;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const updatedProfileData = buildPayload(stateWithoutConfig.data);
|
|
27
|
-
const sid = state$1.sid;
|
|
28
|
-
const [error, response] = await getUnidyClient().auth.updateMissingFields(sid, updatedProfileData);
|
|
29
|
-
if (error) {
|
|
30
|
-
state.loading = false;
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const { jwt } = response;
|
|
34
|
-
state.loading = false;
|
|
35
|
-
authStore.setToken(jwt);
|
|
36
|
-
// Emit authEvent to allow modal-based logins to close after successful submission
|
|
37
|
-
this.el.dispatchEvent(new CustomEvent("authEvent", { detail: { jwt }, bubbles: true, composed: true }));
|
|
38
|
-
}
|
|
39
|
-
render() {
|
|
40
|
-
if (state$1.step !== "missing-fields")
|
|
41
|
-
return null;
|
|
42
|
-
return (h("div", null, h("button", { type: "button", onClick: () => this.onSubmit(), part: "button", disabled: (state.errors && Object.keys(state.errors).length > 0) || state.phoneValid === false, "aria-live": "polite" }, state.loading ? h("u-spinner", null) : hasSlotContent(this.el) ? h("slot", null) : t("buttons.submit"))));
|
|
43
|
-
}
|
|
44
|
-
}, [257, "u-missing-fields-submit-button"]);
|
|
45
|
-
function defineCustomElement$1() {
|
|
46
|
-
if (typeof customElements === "undefined") {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const components = ["u-missing-fields-submit-button", "u-spinner"];
|
|
50
|
-
components.forEach(tagName => { switch (tagName) {
|
|
51
|
-
case "u-missing-fields-submit-button":
|
|
52
|
-
if (!customElements.get(tagName)) {
|
|
53
|
-
customElements.define(tagName, MissingFieldsSubmitButton);
|
|
54
|
-
}
|
|
55
|
-
break;
|
|
56
|
-
case "u-spinner":
|
|
57
|
-
if (!customElements.get(tagName)) {
|
|
58
|
-
defineCustomElement$2();
|
|
59
|
-
}
|
|
60
|
-
break;
|
|
61
|
-
} });
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const UMissingFieldsSubmitButton = MissingFieldsSubmitButton;
|
|
65
|
-
const defineCustomElement = defineCustomElement$1;
|
|
66
|
-
|
|
67
|
-
export { UMissingFieldsSubmitButton, defineCustomElement };
|
|
68
|
-
//# sourceMappingURL=u-missing-fields-submit-button.js.map
|
|
69
|
-
|
|
70
|
-
//# sourceMappingURL=u-missing-fields-submit-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-missing-fields-submit-button.js","mappings":";;;;;;;;;MAaa,yBAAyB,iBAAAA,kBAAA,CAAA,MAAA,yBAAA,SAAA,WAAA,CAAA;;;;;;;;;AAG5B,IAAA,MAAM,QAAQ,GAAA;AACpB,QAAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","profileState","authState"],"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"],"version":3}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { a as isSubscribed } from './newsletter-helpers.js';
|
|
3
|
-
import { n as newsletterStore } from './newsletter-store.js';
|
|
4
|
-
|
|
5
|
-
const NewsletterCheckbox = /*@__PURE__*/ proxyCustomElement(class NewsletterCheckbox extends HTMLElement {
|
|
6
|
-
constructor(registerHost) {
|
|
7
|
-
super();
|
|
8
|
-
if (registerHost !== false) {
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
internalName;
|
|
13
|
-
checked = false;
|
|
14
|
-
componentClassName;
|
|
15
|
-
componentWillLoad() {
|
|
16
|
-
if (this.checked && !this.isSubscribed) {
|
|
17
|
-
const checkedNewsletters = newsletterStore.state.checkedNewsletters;
|
|
18
|
-
if (!(this.internalName in checkedNewsletters)) {
|
|
19
|
-
newsletterStore.set("checkedNewsletters", {
|
|
20
|
-
...checkedNewsletters,
|
|
21
|
-
[this.internalName]: [],
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
get isSubscribed() {
|
|
27
|
-
return isSubscribed(this.internalName);
|
|
28
|
-
}
|
|
29
|
-
get isChecked() {
|
|
30
|
-
return this.isSubscribed || this.internalName in newsletterStore.state.checkedNewsletters;
|
|
31
|
-
}
|
|
32
|
-
syncToStore(checked) {
|
|
33
|
-
if (checked) {
|
|
34
|
-
newsletterStore.set("checkedNewsletters", {
|
|
35
|
-
...newsletterStore.state.checkedNewsletters,
|
|
36
|
-
[this.internalName]: [],
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
const { [this.internalName]: _, ...rest } = newsletterStore.state.checkedNewsletters;
|
|
41
|
-
newsletterStore.set("checkedNewsletters", rest);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
handleChange = () => {
|
|
45
|
-
if (this.isSubscribed)
|
|
46
|
-
return;
|
|
47
|
-
this.syncToStore(!this.isChecked);
|
|
48
|
-
};
|
|
49
|
-
/** Public method to toggle the checkbox programmatically */
|
|
50
|
-
async toggle() {
|
|
51
|
-
this.handleChange();
|
|
52
|
-
}
|
|
53
|
-
/** Public method to set the checkbox state programmatically */
|
|
54
|
-
async setChecked(checked) {
|
|
55
|
-
if (this.isSubscribed)
|
|
56
|
-
return;
|
|
57
|
-
if (checked !== this.isChecked) {
|
|
58
|
-
this.syncToStore(checked);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
render() {
|
|
62
|
-
return (h("input", { key: 'f628c5c8586ffd1c2b4b8acc31f5a7a17c2e37b0', type: "checkbox", checked: this.isChecked, disabled: this.isSubscribed, onChange: this.handleChange, class: this.componentClassName, "aria-checked": this.isChecked }));
|
|
63
|
-
}
|
|
64
|
-
}, [768, "u-newsletter-checkbox", {
|
|
65
|
-
"internalName": [1, "internal-name"],
|
|
66
|
-
"checked": [4],
|
|
67
|
-
"componentClassName": [1, "class-name"],
|
|
68
|
-
"toggle": [64],
|
|
69
|
-
"setChecked": [64]
|
|
70
|
-
}]);
|
|
71
|
-
function defineCustomElement$1() {
|
|
72
|
-
if (typeof customElements === "undefined") {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const components = ["u-newsletter-checkbox"];
|
|
76
|
-
components.forEach(tagName => { switch (tagName) {
|
|
77
|
-
case "u-newsletter-checkbox":
|
|
78
|
-
if (!customElements.get(tagName)) {
|
|
79
|
-
customElements.define(tagName, NewsletterCheckbox);
|
|
80
|
-
}
|
|
81
|
-
break;
|
|
82
|
-
} });
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const UNewsletterCheckbox = NewsletterCheckbox;
|
|
86
|
-
const defineCustomElement = defineCustomElement$1;
|
|
87
|
-
|
|
88
|
-
export { UNewsletterCheckbox, defineCustomElement };
|
|
89
|
-
//# sourceMappingURL=u-newsletter-checkbox.js.map
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=u-newsletter-checkbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-newsletter-checkbox.js","mappings":";;;;MAQa,kBAAkB,iBAAAA,kBAAA,CAAA,MAAA,kBAAA,SAAA,WAAA,CAAA;;;;;;;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,OAAOC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","NewsletterHelpers.isSubscribed"],"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"],"version":3}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { n as newsletterLogout } from './newsletter-helpers.js';
|
|
3
|
-
import { t } from './i18n.js';
|
|
4
|
-
import { F as Flash } from './flash-store.js';
|
|
5
|
-
import { n as newsletterStore } from './newsletter-store.js';
|
|
6
|
-
import { h as hasSlotContent } from './component-utils.js';
|
|
7
|
-
|
|
8
|
-
const LogoutButton = /*@__PURE__*/ proxyCustomElement(class LogoutButton extends HTMLElement {
|
|
9
|
-
constructor(registerHost) {
|
|
10
|
-
super();
|
|
11
|
-
if (registerHost !== false) {
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
get el() { return this; }
|
|
16
|
-
componentClassName = "";
|
|
17
|
-
handleLogout = () => {
|
|
18
|
-
newsletterLogout();
|
|
19
|
-
Flash.success.addMessage(t("newsletter.success.logout"));
|
|
20
|
-
};
|
|
21
|
-
render() {
|
|
22
|
-
if (newsletterStore.state.preferenceToken === "" || newsletterStore.state.isAuthenticated) {
|
|
23
|
-
return h(Host, { style: { display: "none" } });
|
|
24
|
-
}
|
|
25
|
-
const hasContent = hasSlotContent(this.el);
|
|
26
|
-
return (h(Host, null, h("button", { type: "button", part: "button", class: this.componentClassName, onClick: this.handleLogout, "aria-label": "Logout", "aria-live": "polite" }, hasContent ? h("slot", null) : t("newsletter.buttons.logout"))));
|
|
27
|
-
}
|
|
28
|
-
}, [772, "u-newsletter-logout-button", {
|
|
29
|
-
"componentClassName": [1, "class-name"]
|
|
30
|
-
}]);
|
|
31
|
-
function defineCustomElement$1() {
|
|
32
|
-
if (typeof customElements === "undefined") {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const components = ["u-newsletter-logout-button"];
|
|
36
|
-
components.forEach(tagName => { switch (tagName) {
|
|
37
|
-
case "u-newsletter-logout-button":
|
|
38
|
-
if (!customElements.get(tagName)) {
|
|
39
|
-
customElements.define(tagName, LogoutButton);
|
|
40
|
-
}
|
|
41
|
-
break;
|
|
42
|
-
} });
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const UNewsletterLogoutButton = LogoutButton;
|
|
46
|
-
const defineCustomElement = defineCustomElement$1;
|
|
47
|
-
|
|
48
|
-
export { UNewsletterLogoutButton, defineCustomElement };
|
|
49
|
-
//# sourceMappingURL=u-newsletter-logout-button.js.map
|
|
50
|
-
|
|
51
|
-
//# sourceMappingURL=u-newsletter-logout-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"u-newsletter-logout-button.js","mappings":";;;;;;;MAWa,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAA,WAAA,CAAA;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"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"],"version":3}
|