@unidy.io/sdk 1.1.2 → 1.1.4

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.
Files changed (653) hide show
  1. package/dist/cjs/app-globals-DSKjcXX_.js +10 -0
  2. package/dist/cjs/app-globals-DSKjcXX_.js.map +1 -0
  3. package/dist/cjs/auth-NU3DBc-6.js +581 -0
  4. package/dist/cjs/auth-NU3DBc-6.js.map +1 -0
  5. package/dist/cjs/auth-store-BaxuIp4z.js +185 -0
  6. package/dist/cjs/auth-store-BaxuIp4z.js.map +1 -0
  7. package/dist/cjs/component-utils-BpMyeVQo.js +35 -0
  8. package/dist/cjs/component-utils-BpMyeVQo.js.map +1 -0
  9. package/dist/cjs/flash-store-BuIBuQDx.js +50 -0
  10. package/dist/cjs/flash-store-BuIBuQDx.js.map +1 -0
  11. package/dist/cjs/helpers-BcPlKlBG.js +11 -0
  12. package/dist/cjs/helpers-BcPlKlBG.js.map +1 -0
  13. package/dist/cjs/helpers-DJyRa0Qo.js +11 -0
  14. package/dist/cjs/helpers-DJyRa0Qo.js.map +1 -0
  15. package/dist/cjs/i18n-BoDZ8kd2.js +3236 -0
  16. package/dist/cjs/i18n-BoDZ8kd2.js.map +1 -0
  17. package/dist/cjs/index-B_N5xKgH.js +12025 -0
  18. package/dist/cjs/index-B_N5xKgH.js.map +1 -0
  19. package/dist/cjs/index-DLz3FT7T.js +214 -0
  20. package/dist/cjs/index-DLz3FT7T.js.map +1 -0
  21. package/dist/cjs/index-R2MKLaem.js +5267 -0
  22. package/dist/cjs/index-R2MKLaem.js.map +1 -0
  23. package/dist/cjs/index.cjs.js +64 -0
  24. package/dist/cjs/index.cjs.js.map +1 -0
  25. package/dist/cjs/loader.cjs.js +14 -0
  26. package/dist/cjs/loader.cjs.js.map +1 -0
  27. package/dist/cjs/newsletter-helpers-DR0vsegt.js +289 -0
  28. package/dist/cjs/newsletter-helpers-DR0vsegt.js.map +1 -0
  29. package/dist/cjs/newsletter-store-BzytX7Qh.js +38 -0
  30. package/dist/cjs/newsletter-store-BzytX7Qh.js.map +1 -0
  31. package/dist/cjs/pagination-store-BEiW3MQd.js +16 -0
  32. package/dist/cjs/pagination-store-BEiW3MQd.js.map +1 -0
  33. package/dist/cjs/profile-helpers-B2h2III_.js +39 -0
  34. package/dist/cjs/profile-helpers-B2h2III_.js.map +1 -0
  35. package/dist/cjs/profile-store-P_BcYkef.js +22 -0
  36. package/dist/cjs/profile-store-P_BcYkef.js.map +1 -0
  37. package/dist/cjs/sdk.cjs.js +26 -0
  38. package/dist/cjs/sdk.cjs.js.map +1 -0
  39. package/dist/cjs/u-conditional-render.cjs.entry.js +103 -0
  40. package/dist/cjs/u-conditional-render.entry.cjs.js.map +1 -0
  41. package/dist/cjs/u-config.cjs.entry.js +87 -0
  42. package/dist/cjs/u-config.entry.cjs.js.map +1 -0
  43. package/dist/cjs/u-email-field.cjs.entry.js +77 -0
  44. package/dist/cjs/u-email-field.entry.cjs.js.map +1 -0
  45. package/dist/cjs/u-error-message.cjs.entry.js +82 -0
  46. package/dist/cjs/u-error-message.entry.cjs.js.map +1 -0
  47. package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +1 -0
  48. package/dist/cjs/u-field_2.cjs.entry.js +375 -0
  49. package/dist/cjs/u-flash-message.cjs.entry.js +37 -0
  50. package/dist/cjs/u-flash-message.entry.cjs.js.map +1 -0
  51. package/dist/cjs/u-full-profile.cjs.entry.js +37 -0
  52. package/dist/cjs/u-full-profile.entry.cjs.js.map +1 -0
  53. package/dist/cjs/u-logout-button.cjs.entry.js +38 -0
  54. package/dist/cjs/u-logout-button.entry.cjs.js.map +1 -0
  55. package/dist/cjs/u-magic-code-field.cjs.entry.js +91 -0
  56. package/dist/cjs/u-magic-code-field.entry.cjs.js.map +1 -0
  57. package/dist/cjs/u-missing-field.cjs.entry.js +22 -0
  58. package/dist/cjs/u-missing-field.entry.cjs.js.map +1 -0
  59. package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +46 -0
  60. package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +1 -0
  61. package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +63 -0
  62. package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +1 -0
  63. package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +36 -0
  64. package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +1 -0
  65. package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +106 -0
  66. package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +1 -0
  67. package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +49 -0
  68. package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +1 -0
  69. package/dist/cjs/u-newsletter-root.cjs.entry.js +72 -0
  70. package/dist/cjs/u-newsletter-root.entry.cjs.js.map +1 -0
  71. package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +73 -0
  72. package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +1 -0
  73. package/dist/cjs/u-pagination-button.cjs.entry.js +63 -0
  74. package/dist/cjs/u-pagination-button.entry.cjs.js.map +1 -0
  75. package/dist/cjs/u-pagination-page.cjs.entry.js +44 -0
  76. package/dist/cjs/u-pagination-page.entry.cjs.js.map +1 -0
  77. package/dist/cjs/u-passkey.cjs.entry.js +47 -0
  78. package/dist/cjs/u-passkey.entry.cjs.js.map +1 -0
  79. package/dist/cjs/u-password-field.cjs.entry.js +104 -0
  80. package/dist/cjs/u-password-field.entry.cjs.js.map +1 -0
  81. package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +1 -0
  82. package/dist/cjs/u-profile_2.cjs.entry.js +327 -0
  83. package/dist/cjs/u-registration-button.cjs.entry.js +48 -0
  84. package/dist/cjs/u-registration-button.entry.cjs.js.map +1 -0
  85. package/dist/cjs/u-reset-password-button.cjs.entry.js +47 -0
  86. package/dist/cjs/u-reset-password-button.entry.cjs.js.map +1 -0
  87. package/dist/cjs/u-send-magic-code-button.cjs.entry.js +68 -0
  88. package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +1 -0
  89. package/dist/cjs/u-signed-in.cjs.entry.js +25 -0
  90. package/dist/cjs/u-signed-in.entry.cjs.js.map +1 -0
  91. package/dist/cjs/u-signin-root.cjs.entry.js +43 -0
  92. package/dist/cjs/u-signin-root.entry.cjs.js.map +1 -0
  93. package/dist/cjs/u-signin-step.cjs.entry.js +66 -0
  94. package/dist/cjs/u-signin-step.entry.cjs.js.map +1 -0
  95. package/dist/cjs/u-signin-strategy.cjs.entry.js +30 -0
  96. package/dist/cjs/u-signin-strategy.entry.cjs.js.map +1 -0
  97. package/dist/cjs/u-social-login-button.cjs.entry.js +100 -0
  98. package/dist/cjs/u-social-login-button.entry.cjs.js.map +1 -0
  99. package/dist/cjs/u-spinner.cjs.entry.js +18 -0
  100. package/dist/cjs/u-spinner.entry.cjs.js.map +1 -0
  101. package/dist/cjs/u-ticketable-list.cjs.entry.js +6087 -0
  102. package/dist/cjs/u-ticketable-list.entry.cjs.js.map +1 -0
  103. package/dist/cjs/unidy-store-7AbWnZ6g.js +41 -0
  104. package/dist/cjs/unidy-store-7AbWnZ6g.js.map +1 -0
  105. package/dist/collection/api/client.js +144 -0
  106. package/dist/collection/api/client.js.map +1 -0
  107. package/dist/collection/api/index.js +42 -0
  108. package/dist/collection/api/index.js.map +1 -0
  109. package/dist/collection/api/shared.js +18 -0
  110. package/dist/collection/api/shared.js.map +1 -0
  111. package/dist/collection/auth/api/auth.js +264 -0
  112. package/dist/collection/auth/api/auth.js.map +1 -0
  113. package/dist/collection/auth/auth-helpers.js +299 -0
  114. package/dist/collection/auth/auth-helpers.js.map +1 -0
  115. package/dist/collection/auth/auth.js +121 -0
  116. package/dist/collection/auth/auth.js.map +1 -0
  117. package/dist/collection/auth/components/helpers.js +5 -0
  118. package/dist/collection/auth/components/helpers.js.map +1 -0
  119. package/dist/collection/auth/components/logout-button/logout-button.js +85 -0
  120. package/dist/collection/auth/components/logout-button/logout-button.js.map +1 -0
  121. package/dist/collection/auth/components/magic-code-field/magic-code-field.css +1 -0
  122. package/dist/collection/auth/components/magic-code-field/magic-code-field.js +113 -0
  123. package/dist/collection/auth/components/magic-code-field/magic-code-field.js.map +1 -0
  124. package/dist/collection/auth/components/missing-field/missing-field.js +14 -0
  125. package/dist/collection/auth/components/missing-field/missing-field.js.map +1 -0
  126. package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +39 -0
  127. package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +1 -0
  128. package/dist/collection/auth/components/passkey/passkey.js +103 -0
  129. package/dist/collection/auth/components/passkey/passkey.js.map +1 -0
  130. package/dist/collection/auth/components/password-field/password-field.js +166 -0
  131. package/dist/collection/auth/components/password-field/password-field.js.map +1 -0
  132. package/dist/collection/auth/components/registration/registration-button.js +104 -0
  133. package/dist/collection/auth/components/registration/registration-button.js.map +1 -0
  134. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +59 -0
  135. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +1 -0
  136. package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js +104 -0
  137. package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js.map +1 -0
  138. package/dist/collection/auth/components/signed-in/signed-in.js +59 -0
  139. package/dist/collection/auth/components/signed-in/signed-in.js.map +1 -0
  140. package/dist/collection/auth/components/signin-root/signin-root.js +97 -0
  141. package/dist/collection/auth/components/signin-root/signin-root.js.map +1 -0
  142. package/dist/collection/auth/components/signin-step/signin-step.js +135 -0
  143. package/dist/collection/auth/components/signin-step/signin-step.js.map +1 -0
  144. package/dist/collection/auth/components/signin-strategy/signin-strategy.js +64 -0
  145. package/dist/collection/auth/components/signin-strategy/signin-strategy.js.map +1 -0
  146. package/dist/collection/auth/components/social-logins/logos/apple.js +3 -0
  147. package/dist/collection/auth/components/social-logins/logos/apple.js.map +1 -0
  148. package/dist/collection/auth/components/social-logins/logos/discord.js +3 -0
  149. package/dist/collection/auth/components/social-logins/logos/discord.js.map +1 -0
  150. package/dist/collection/auth/components/social-logins/logos/facebook.js +3 -0
  151. package/dist/collection/auth/components/social-logins/logos/facebook.js.map +1 -0
  152. package/dist/collection/auth/components/social-logins/logos/google.js +3 -0
  153. package/dist/collection/auth/components/social-logins/logos/google.js.map +1 -0
  154. package/dist/collection/auth/components/social-logins/logos/linkedin.js +3 -0
  155. package/dist/collection/auth/components/social-logins/logos/linkedin.js.map +1 -0
  156. package/dist/collection/auth/components/social-logins/social-login-button.css +1 -0
  157. package/dist/collection/auth/components/social-logins/social-login-button.js +188 -0
  158. package/dist/collection/auth/components/social-logins/social-login-button.js.map +1 -0
  159. package/dist/collection/auth/components/submit-button/auth-submit-button.js +62 -0
  160. package/dist/collection/auth/components/submit-button/auth-submit-button.js.map +1 -0
  161. package/dist/{sdk/index-Cz3idqu9.js → collection/auth/error-definitions.js} +2 -19
  162. package/dist/collection/auth/error-definitions.js.map +1 -0
  163. package/dist/collection/auth/index.js +14 -0
  164. package/dist/collection/auth/index.js.map +1 -0
  165. package/dist/collection/auth/passkey-auth.js +106 -0
  166. package/dist/collection/auth/passkey-auth.js.map +1 -0
  167. package/dist/collection/auth/store/auth-store.js +176 -0
  168. package/dist/collection/auth/store/auth-store.js.map +1 -0
  169. package/dist/collection/collection-manifest.json +46 -0
  170. package/dist/collection/globalScript.js +18 -0
  171. package/dist/collection/globalScript.js.map +1 -0
  172. package/dist/collection/i18n.js +31 -0
  173. package/dist/collection/i18n.js.map +1 -0
  174. package/dist/collection/index.js +16 -0
  175. package/dist/collection/index.js.map +1 -0
  176. package/dist/collection/locales/de.json +133 -0
  177. package/dist/collection/locales/en.json +133 -0
  178. package/dist/collection/locales/fr.json +133 -0
  179. package/dist/collection/locales/it.json +133 -0
  180. package/dist/collection/locales/nl_be.json +133 -0
  181. package/dist/collection/locales/ro.json +133 -0
  182. package/dist/collection/logger.js +106 -0
  183. package/dist/collection/logger.js.map +1 -0
  184. package/dist/collection/newsletter/api/newsletters.js +189 -0
  185. package/dist/collection/newsletter/api/newsletters.js.map +1 -0
  186. package/dist/collection/newsletter/components/helpers.js +5 -0
  187. package/dist/collection/newsletter/components/helpers.js.map +1 -0
  188. package/dist/collection/newsletter/components/logout-button/logout-button.js +48 -0
  189. package/dist/collection/newsletter/components/logout-button/logout-button.js.map +1 -0
  190. package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +109 -0
  191. package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js.map +1 -0
  192. package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js +119 -0
  193. package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js.map +1 -0
  194. package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js +178 -0
  195. package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js.map +1 -0
  196. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.css +1 -0
  197. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js +89 -0
  198. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js.map +1 -0
  199. package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js +18 -0
  200. package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js.map +1 -0
  201. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.css +1 -0
  202. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js +154 -0
  203. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js.map +1 -0
  204. package/dist/collection/newsletter/index.js +11 -0
  205. package/dist/collection/newsletter/index.js.map +1 -0
  206. package/dist/collection/newsletter/newsletter-helpers.js +277 -0
  207. package/dist/collection/newsletter/newsletter-helpers.js.map +1 -0
  208. package/dist/collection/newsletter/store/newsletter-store.js +34 -0
  209. package/dist/collection/newsletter/store/newsletter-store.js.map +1 -0
  210. package/dist/collection/profile/api/profile.js +168 -0
  211. package/dist/collection/profile/api/profile.js.map +1 -0
  212. package/dist/collection/profile/components/field/field.css +1 -0
  213. package/dist/collection/profile/components/field/field.js +359 -0
  214. package/dist/collection/profile/components/field/field.js.map +1 -0
  215. package/dist/collection/profile/components/full-profile/full-profile.css +1 -0
  216. package/dist/collection/profile/components/full-profile/full-profile.js +78 -0
  217. package/dist/collection/profile/components/full-profile/full-profile.js.map +1 -0
  218. package/dist/collection/profile/components/profile/profile.js +250 -0
  219. package/dist/collection/profile/components/profile/profile.js.map +1 -0
  220. package/dist/collection/profile/components/raw-field/raw-field.js +697 -0
  221. package/dist/collection/profile/components/raw-field/raw-field.js.map +1 -0
  222. package/dist/collection/profile/components/raw-input-fields/Input.js +3 -0
  223. package/dist/collection/profile/components/raw-input-fields/Input.js.map +1 -0
  224. package/dist/collection/profile/components/raw-input-fields/MultiSelect.js +8 -0
  225. package/dist/collection/profile/components/raw-input-fields/MultiSelect.js.map +1 -0
  226. package/dist/collection/profile/components/raw-input-fields/RadioGroup.js +8 -0
  227. package/dist/collection/profile/components/raw-input-fields/RadioGroup.js.map +1 -0
  228. package/dist/collection/profile/components/raw-input-fields/Select.js +11 -0
  229. package/dist/collection/profile/components/raw-input-fields/Select.js.map +1 -0
  230. package/dist/collection/profile/components/raw-input-fields/Textarea.js +3 -0
  231. package/dist/collection/profile/components/raw-input-fields/Textarea.js.map +1 -0
  232. package/dist/collection/profile/components/submit-button/profile-submit-button.js +17 -0
  233. package/dist/collection/profile/components/submit-button/profile-submit-button.js.map +1 -0
  234. package/dist/collection/profile/index.js +13 -0
  235. package/dist/collection/profile/index.js.map +1 -0
  236. package/dist/collection/profile/profile-helpers.js +31 -0
  237. package/dist/collection/profile/profile-helpers.js.map +1 -0
  238. package/dist/collection/profile/store/profile-store.js +15 -0
  239. package/dist/collection/profile/store/profile-store.js.map +1 -0
  240. package/dist/collection/sdk.css +39 -0
  241. package/dist/collection/shared/component-utils.js +28 -0
  242. package/dist/collection/shared/component-utils.js.map +1 -0
  243. package/dist/collection/shared/components/conditional-render/conditional-render.js +178 -0
  244. package/dist/collection/shared/components/conditional-render/conditional-render.js.map +1 -0
  245. package/dist/collection/shared/components/config/config.js +260 -0
  246. package/dist/collection/shared/components/config/config.js.map +1 -0
  247. package/dist/collection/shared/components/email-field/email-field.css +1 -0
  248. package/dist/collection/shared/components/email-field/email-field.js +145 -0
  249. package/dist/collection/shared/components/email-field/email-field.js.map +1 -0
  250. package/dist/collection/shared/components/error-message/error-message.js +141 -0
  251. package/dist/collection/shared/components/error-message/error-message.js.map +1 -0
  252. package/dist/collection/shared/components/flash-message/close-icon.js +3 -0
  253. package/dist/collection/shared/components/flash-message/close-icon.js.map +1 -0
  254. package/dist/collection/shared/components/flash-message/flash-message.css +1 -0
  255. package/dist/collection/shared/components/flash-message/flash-message.js +79 -0
  256. package/dist/collection/shared/components/flash-message/flash-message.js.map +1 -0
  257. package/dist/collection/shared/components/spinner/spinner.css +1 -0
  258. package/dist/collection/shared/components/spinner/spinner.js +19 -0
  259. package/dist/collection/shared/components/spinner/spinner.js.map +1 -0
  260. package/dist/collection/shared/components/submit-button/context.js +10 -0
  261. package/dist/collection/shared/components/submit-button/context.js.map +1 -0
  262. package/dist/collection/shared/components/submit-button/submit-button.css +1 -0
  263. package/dist/collection/shared/components/submit-button/submit-button.js +196 -0
  264. package/dist/collection/shared/components/submit-button/submit-button.js.map +1 -0
  265. package/dist/collection/shared/store/flash-store.js +43 -0
  266. package/dist/collection/shared/store/flash-store.js.map +1 -0
  267. package/dist/collection/shared/store/unidy-store.js +33 -0
  268. package/dist/collection/shared/store/unidy-store.js.map +1 -0
  269. package/dist/collection/ticketable/api/get-with-schema.js +35 -0
  270. package/dist/collection/ticketable/api/get-with-schema.js.map +1 -0
  271. package/dist/collection/ticketable/api/schemas.js +12 -0
  272. package/dist/collection/ticketable/api/schemas.js.map +1 -0
  273. package/dist/collection/ticketable/api/subscriptions.js +47 -0
  274. package/dist/collection/ticketable/api/subscriptions.js.map +1 -0
  275. package/dist/collection/ticketable/api/tickets.js +48 -0
  276. package/dist/collection/ticketable/api/tickets.js.map +1 -0
  277. package/dist/collection/ticketable/components/pagination/pagination-button.js +108 -0
  278. package/dist/collection/ticketable/components/pagination/pagination-button.js.map +1 -0
  279. package/dist/collection/ticketable/components/pagination/pagination-page.js +69 -0
  280. package/dist/collection/ticketable/components/pagination/pagination-page.js.map +1 -0
  281. package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js +54 -0
  282. package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js.map +1 -0
  283. package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +498 -0
  284. package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +1 -0
  285. package/dist/collection/ticketable/index.js +13 -0
  286. package/dist/collection/ticketable/index.js.map +1 -0
  287. package/dist/collection/ticketable/store/pagination-store.js +9 -0
  288. package/dist/collection/ticketable/store/pagination-store.js.map +1 -0
  289. package/dist/{sdk/auth-store-CapiC8gJ.js → components/auth-store.js} +5 -4
  290. package/dist/components/auth-store.js.map +1 -0
  291. package/dist/components/auth.js +580 -0
  292. package/dist/components/auth.js.map +1 -0
  293. package/dist/components/component-utils.js +32 -0
  294. package/dist/components/component-utils.js.map +1 -0
  295. package/dist/components/exports.js +4106 -0
  296. package/dist/components/exports.js.map +1 -0
  297. package/dist/{sdk/u-field.entry.js → components/field.js} +57 -14
  298. package/dist/components/field.js.map +1 -0
  299. package/dist/{sdk/flash-store-DNcSEn2p.js → components/flash-store.js} +3 -4
  300. package/dist/components/flash-store.js.map +1 -0
  301. package/dist/components/helpers.js +9 -0
  302. package/dist/components/helpers.js.map +1 -0
  303. package/dist/components/helpers2.js +9 -0
  304. package/dist/components/helpers2.js.map +1 -0
  305. package/dist/{sdk/i18n-BCI_ARJL.js → components/i18n.js} +11 -19
  306. package/dist/components/i18n.js.map +1 -0
  307. package/dist/components/index.js +5902 -0
  308. package/dist/components/index.js.map +1 -0
  309. package/dist/components/index2.js +5256 -0
  310. package/dist/components/index2.js.map +1 -0
  311. package/dist/{sdk/index-BnBstyfp.js → components/index3.js} +3 -3
  312. package/dist/components/index3.js.map +1 -0
  313. package/dist/components/logger.js +111 -0
  314. package/dist/components/logger.js.map +1 -0
  315. package/dist/{sdk/newsletter-helpers-DEXEBD0F.js → components/newsletter-helpers.js} +14 -12
  316. package/dist/components/newsletter-helpers.js.map +1 -0
  317. package/dist/{sdk/newsletter-store-CvULKmsu.js → components/newsletter-store.js} +3 -8
  318. package/dist/components/newsletter-store.js.map +1 -0
  319. package/dist/components/pagination-store.js +14 -0
  320. package/dist/components/pagination-store.js.map +1 -0
  321. package/dist/{sdk/profile-helpers-Bs3aj0CO.js → components/profile-helpers.js} +4 -4
  322. package/dist/components/profile-helpers.js.map +1 -0
  323. package/dist/{sdk/profile-store-DD6sq42i.js → components/profile-store.js} +3 -3
  324. package/dist/components/profile-store.js.map +1 -0
  325. package/dist/{sdk/u-profile.entry.js → components/profile.js} +54 -20
  326. package/dist/components/profile.js.map +1 -0
  327. package/dist/{sdk/u-raw-field.entry.js → components/raw-field.js} +51 -10
  328. package/dist/components/raw-field.js.map +1 -0
  329. package/dist/components/spinner.js +35 -0
  330. package/dist/components/spinner.js.map +1 -0
  331. package/dist/{sdk/u-submit-button.entry.js → components/submit-button.js} +46 -19
  332. package/dist/components/submit-button.js.map +1 -0
  333. package/dist/components/u-conditional-render.js +121 -0
  334. package/dist/components/u-conditional-render.js.map +1 -0
  335. package/dist/components/u-config.js +113 -0
  336. package/dist/components/u-config.js.map +1 -0
  337. package/dist/components/u-email-field.js +99 -0
  338. package/dist/components/u-email-field.js.map +1 -0
  339. package/dist/components/u-error-message.js +105 -0
  340. package/dist/components/u-error-message.js.map +1 -0
  341. package/dist/components/u-field.js +9 -0
  342. package/dist/components/u-field.js.map +1 -0
  343. package/dist/components/u-flash-message.js +58 -0
  344. package/dist/components/u-flash-message.js.map +1 -0
  345. package/dist/components/u-full-profile.js +87 -0
  346. package/dist/components/u-full-profile.js.map +1 -0
  347. package/dist/components/u-logout-button.js +53 -0
  348. package/dist/components/u-logout-button.js.map +1 -0
  349. package/dist/components/u-magic-code-field.js +106 -0
  350. package/dist/components/u-magic-code-field.js.map +1 -0
  351. package/dist/components/u-missing-field.js +57 -0
  352. package/dist/components/u-missing-field.js.map +1 -0
  353. package/dist/components/u-missing-fields-submit-button.js +70 -0
  354. package/dist/components/u-missing-fields-submit-button.js.map +1 -0
  355. package/dist/components/u-newsletter-checkbox.js +77 -0
  356. package/dist/components/u-newsletter-checkbox.js.map +1 -0
  357. package/dist/components/u-newsletter-logout-button.js +51 -0
  358. package/dist/components/u-newsletter-logout-button.js.map +1 -0
  359. package/dist/components/u-newsletter-preference-checkbox.js +124 -0
  360. package/dist/components/u-newsletter-preference-checkbox.js.map +1 -0
  361. package/dist/components/u-newsletter-resend-doi-button.js +70 -0
  362. package/dist/components/u-newsletter-resend-doi-button.js.map +1 -0
  363. package/dist/components/u-newsletter-root.js +90 -0
  364. package/dist/components/u-newsletter-root.js.map +1 -0
  365. package/dist/components/u-newsletter-toggle-subscription-button.js +97 -0
  366. package/dist/components/u-newsletter-toggle-subscription-button.js.map +1 -0
  367. package/dist/components/u-pagination-button.js +86 -0
  368. package/dist/components/u-pagination-button.js.map +1 -0
  369. package/dist/components/u-pagination-page.js +66 -0
  370. package/dist/components/u-pagination-page.js.map +1 -0
  371. package/dist/components/u-passkey.js +65 -0
  372. package/dist/components/u-passkey.js.map +1 -0
  373. package/dist/components/u-password-field.js +125 -0
  374. package/dist/components/u-password-field.js.map +1 -0
  375. package/dist/components/u-profile.js +9 -0
  376. package/dist/components/u-profile.js.map +1 -0
  377. package/dist/components/u-raw-field.js +9 -0
  378. package/dist/components/u-raw-field.js.map +1 -0
  379. package/dist/components/u-registration-button.js +70 -0
  380. package/dist/components/u-registration-button.js.map +1 -0
  381. package/dist/components/u-reset-password-button.js +63 -0
  382. package/dist/components/u-reset-password-button.js.map +1 -0
  383. package/dist/components/u-send-magic-code-button.js +85 -0
  384. package/dist/components/u-send-magic-code-button.js.map +1 -0
  385. package/dist/components/u-signed-in.js +44 -0
  386. package/dist/components/u-signed-in.js.map +1 -0
  387. package/dist/components/u-signin-root.js +63 -0
  388. package/dist/components/u-signin-root.js.map +1 -0
  389. package/dist/components/u-signin-step.js +84 -0
  390. package/dist/components/u-signin-step.js.map +1 -0
  391. package/dist/components/u-signin-strategy.js +50 -0
  392. package/dist/components/u-signin-strategy.js.map +1 -0
  393. package/dist/components/u-social-login-button.js +125 -0
  394. package/dist/components/u-social-login-button.js.map +1 -0
  395. package/dist/components/u-spinner.js +9 -0
  396. package/dist/components/u-spinner.js.map +1 -0
  397. package/dist/components/u-submit-button.js +9 -0
  398. package/dist/components/u-submit-button.js.map +1 -0
  399. package/dist/components/u-ticketable-list.js +6122 -0
  400. package/dist/components/u-ticketable-list.js.map +1 -0
  401. package/dist/{sdk/unidy-store-BwZym11Y.js → components/unidy-store.js} +3 -4
  402. package/dist/components/unidy-store.js.map +1 -0
  403. package/dist/esm/app-globals-CPU9ZcqZ.js +8 -0
  404. package/dist/esm/app-globals-CPU9ZcqZ.js.map +1 -0
  405. package/dist/{sdk/auth-Che07PeV.js → esm/auth-nsjRdpvS.js} +40 -32
  406. package/dist/esm/auth-nsjRdpvS.js.map +1 -0
  407. package/dist/esm/auth-store-CVvBlKGv.js +180 -0
  408. package/dist/esm/auth-store-CVvBlKGv.js.map +1 -0
  409. package/dist/esm/flash-store-CEvWSG0c.js +47 -0
  410. package/dist/{sdk/flash-store-DNcSEn2p.js.map → esm/flash-store-CEvWSG0c.js.map} +1 -1
  411. package/dist/esm/i18n-CLdWzy5J.js +3233 -0
  412. package/dist/esm/i18n-CLdWzy5J.js.map +1 -0
  413. package/dist/esm/index-Bjp1XO-f.js +212 -0
  414. package/dist/{sdk/index-BnBstyfp.js.map → esm/index-Bjp1XO-f.js.map} +1 -1
  415. package/dist/esm/index-Ci3aTmzp.js +12007 -0
  416. package/dist/esm/index-Ci3aTmzp.js.map +1 -0
  417. package/dist/esm/index-DSDkaHWI.js +5254 -0
  418. package/dist/esm/index-DSDkaHWI.js.map +1 -0
  419. package/dist/esm/index.js +40 -0
  420. package/dist/esm/index.js.map +1 -0
  421. package/dist/esm/loader.js +12 -0
  422. package/dist/esm/loader.js.map +1 -0
  423. package/dist/esm/newsletter-helpers-Dc_24im3.js +278 -0
  424. package/dist/esm/newsletter-helpers-Dc_24im3.js.map +1 -0
  425. package/dist/esm/newsletter-store-DBL1A203.js +34 -0
  426. package/dist/{sdk/newsletter-store-CvULKmsu.js.map → esm/newsletter-store-DBL1A203.js.map} +1 -1
  427. package/dist/esm/pagination-store-DzdJOp-n.js +14 -0
  428. package/dist/esm/pagination-store-DzdJOp-n.js.map +1 -0
  429. package/dist/esm/profile-helpers-CglNd6Nw.js +36 -0
  430. package/dist/{sdk/profile-helpers-Bs3aj0CO.js.map → esm/profile-helpers-CglNd6Nw.js.map} +1 -1
  431. package/dist/esm/profile-store-RmZB2PTc.js +18 -0
  432. package/dist/{sdk/profile-store-DD6sq42i.js.map → esm/profile-store-RmZB2PTc.js.map} +1 -1
  433. package/dist/esm/sdk.js +22 -0
  434. package/dist/esm/sdk.js.map +1 -0
  435. package/dist/{sdk → esm}/u-conditional-render.entry.js +12 -12
  436. package/dist/esm/u-conditional-render.entry.js.map +1 -0
  437. package/dist/{sdk → esm}/u-config.entry.js +12 -13
  438. package/dist/esm/u-config.entry.js.map +1 -0
  439. package/dist/{sdk → esm}/u-email-field.entry.js +7 -7
  440. package/dist/esm/u-email-field.entry.js.map +1 -0
  441. package/dist/{sdk → esm}/u-error-message.entry.js +7 -7
  442. package/dist/esm/u-error-message.entry.js.map +1 -0
  443. package/dist/esm/u-field.u-raw-field.entry.js.map +1 -0
  444. package/dist/esm/u-field_2.entry.js +372 -0
  445. package/dist/{sdk → esm}/u-flash-message.entry.js +4 -4
  446. package/dist/esm/u-flash-message.entry.js.map +1 -0
  447. package/dist/{sdk → esm}/u-full-profile.entry.js +7 -7
  448. package/dist/esm/u-full-profile.entry.js.map +1 -0
  449. package/dist/{sdk → esm}/u-logout-button.entry.js +11 -11
  450. package/dist/esm/u-logout-button.entry.js.map +1 -0
  451. package/dist/{sdk → esm}/u-magic-code-field.entry.js +10 -10
  452. package/dist/esm/u-magic-code-field.entry.js.map +1 -0
  453. package/dist/{sdk → esm}/u-missing-field.entry.js +5 -5
  454. package/dist/esm/u-missing-field.entry.js.map +1 -0
  455. package/dist/{sdk → esm}/u-missing-fields-submit-button.entry.js +9 -9
  456. package/dist/esm/u-missing-fields-submit-button.entry.js.map +1 -0
  457. package/dist/{sdk → esm}/u-newsletter-checkbox.entry.js +12 -12
  458. package/dist/esm/u-newsletter-checkbox.entry.js.map +1 -0
  459. package/dist/{sdk → esm}/u-newsletter-logout-button.entry.js +12 -12
  460. package/dist/esm/u-newsletter-logout-button.entry.js.map +1 -0
  461. package/dist/{sdk → esm}/u-newsletter-preference-checkbox.entry.js +12 -12
  462. package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +1 -0
  463. package/dist/{sdk → esm}/u-newsletter-resend-doi-button.entry.js +12 -12
  464. package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +1 -0
  465. package/dist/{sdk → esm}/u-newsletter-root.entry.js +12 -12
  466. package/dist/esm/u-newsletter-root.entry.js.map +1 -0
  467. package/dist/{sdk → esm}/u-newsletter-toggle-subscription-button.entry.js +12 -12
  468. package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +1 -0
  469. package/dist/{sdk → esm}/u-pagination-button.entry.js +2 -2
  470. package/dist/esm/u-pagination-button.entry.js.map +1 -0
  471. package/dist/{sdk → esm}/u-pagination-page.entry.js +2 -2
  472. package/dist/esm/u-pagination-page.entry.js.map +1 -0
  473. package/dist/{sdk → esm}/u-passkey.entry.js +10 -10
  474. package/dist/esm/u-passkey.entry.js.map +1 -0
  475. package/dist/{sdk → esm}/u-password-field.entry.js +6 -6
  476. package/dist/esm/u-password-field.entry.js.map +1 -0
  477. package/dist/esm/u-profile.u-submit-button.entry.js.map +1 -0
  478. package/dist/esm/u-profile_2.entry.js +324 -0
  479. package/dist/{sdk → esm}/u-registration-button.entry.js +6 -6
  480. package/dist/esm/u-registration-button.entry.js.map +1 -0
  481. package/dist/{sdk → esm}/u-reset-password-button.entry.js +10 -10
  482. package/dist/esm/u-reset-password-button.entry.js.map +1 -0
  483. package/dist/{sdk → esm}/u-send-magic-code-button.entry.js +10 -10
  484. package/dist/esm/u-send-magic-code-button.entry.js.map +1 -0
  485. package/dist/{sdk → esm}/u-signed-in.entry.js +5 -5
  486. package/dist/esm/u-signed-in.entry.js.map +1 -0
  487. package/dist/{sdk → esm}/u-signin-root.entry.js +7 -7
  488. package/dist/esm/u-signin-root.entry.js.map +1 -0
  489. package/dist/{sdk → esm}/u-signin-step.entry.js +10 -11
  490. package/dist/esm/u-signin-step.entry.js.map +1 -0
  491. package/dist/{sdk → esm}/u-signin-strategy.entry.js +5 -5
  492. package/dist/esm/u-signin-strategy.entry.js.map +1 -0
  493. package/dist/{sdk → esm}/u-social-login-button.entry.js +6 -6
  494. package/dist/esm/u-social-login-button.entry.js.map +1 -0
  495. package/dist/{sdk → esm}/u-spinner.entry.js +3 -3
  496. package/dist/esm/u-spinner.entry.js.map +1 -0
  497. package/dist/{sdk → esm}/u-ticketable-list.entry.js +84 -143
  498. package/dist/esm/u-ticketable-list.entry.js.map +1 -0
  499. package/dist/esm/unidy-store-BldTAtO0.js +37 -0
  500. package/dist/{sdk/unidy-store-BwZym11Y.js.map → esm/unidy-store-BldTAtO0.js.map} +1 -1
  501. package/dist/index.cjs.js +1 -0
  502. package/dist/index.js +1 -0
  503. package/dist/sdk/index.esm.js +2 -22
  504. package/dist/sdk/index.esm.js.map +1 -1
  505. package/dist/sdk/loader.esm.js.map +1 -1
  506. package/dist/sdk/locales/de.json +1 -0
  507. package/dist/sdk/locales/en.json +1 -0
  508. package/dist/sdk/locales/fr.json +1 -0
  509. package/dist/sdk/locales/it.json +1 -0
  510. package/dist/sdk/locales/nl_be.json +1 -0
  511. package/dist/sdk/locales/ro.json +1 -0
  512. package/dist/sdk/p-0ab98e7a.entry.js +2 -0
  513. package/dist/sdk/p-0ab98e7a.entry.js.map +1 -0
  514. package/dist/sdk/p-0d324822.entry.js +2 -0
  515. package/dist/sdk/p-0d324822.entry.js.map +1 -0
  516. package/dist/sdk/p-0fb37ee9.entry.js +2 -0
  517. package/dist/sdk/p-0fb37ee9.entry.js.map +1 -0
  518. package/dist/sdk/p-2cb6a2d0.entry.js +2 -0
  519. package/dist/sdk/p-2cb6a2d0.entry.js.map +1 -0
  520. package/dist/sdk/p-3049e73f.entry.js +2 -0
  521. package/dist/sdk/p-3049e73f.entry.js.map +1 -0
  522. package/dist/sdk/p-312b919e.entry.js +2 -0
  523. package/dist/sdk/p-312b919e.entry.js.map +1 -0
  524. package/dist/sdk/p-319c5d3b.entry.js +2 -0
  525. package/dist/sdk/p-319c5d3b.entry.js.map +1 -0
  526. package/dist/sdk/p-34b98f55.entry.js +2 -0
  527. package/dist/sdk/p-34b98f55.entry.js.map +1 -0
  528. package/dist/sdk/p-39b61f33.entry.js +2 -0
  529. package/dist/sdk/p-39b61f33.entry.js.map +1 -0
  530. package/dist/sdk/p-4ec3302d.entry.js +2 -0
  531. package/dist/sdk/p-4ec3302d.entry.js.map +1 -0
  532. package/dist/sdk/p-568eabbc.entry.js +2 -0
  533. package/dist/sdk/p-568eabbc.entry.js.map +1 -0
  534. package/dist/sdk/p-5b40a68b.entry.js +2 -0
  535. package/dist/sdk/p-5b40a68b.entry.js.map +1 -0
  536. package/dist/sdk/p-5babee6b.entry.js +2 -0
  537. package/dist/sdk/p-5babee6b.entry.js.map +1 -0
  538. package/dist/sdk/p-66587fdd.entry.js +2 -0
  539. package/dist/sdk/p-66587fdd.entry.js.map +1 -0
  540. package/dist/sdk/p-6893d167.entry.js +2 -0
  541. package/dist/sdk/p-6893d167.entry.js.map +1 -0
  542. package/dist/sdk/p-73c2ec89.entry.js +2 -0
  543. package/dist/sdk/p-73c2ec89.entry.js.map +1 -0
  544. package/dist/sdk/p-80034205.entry.js +2 -0
  545. package/dist/sdk/p-80034205.entry.js.map +1 -0
  546. package/dist/sdk/p-88d93d64.entry.js +2 -0
  547. package/dist/sdk/p-88d93d64.entry.js.map +1 -0
  548. package/dist/sdk/p-90e2253e.entry.js +2 -0
  549. package/dist/sdk/p-90e2253e.entry.js.map +1 -0
  550. package/dist/sdk/p-9e71a36c.entry.js +2 -0
  551. package/dist/sdk/p-9e71a36c.entry.js.map +1 -0
  552. package/dist/sdk/p-BZ1kW_eK.js +2 -0
  553. package/dist/sdk/p-BZ1kW_eK.js.map +1 -0
  554. package/dist/sdk/p-BiILQPdb.js +2 -0
  555. package/dist/sdk/p-BiILQPdb.js.map +1 -0
  556. package/dist/sdk/p-BlOjABPD.js +2 -0
  557. package/dist/sdk/p-BlOjABPD.js.map +1 -0
  558. package/dist/sdk/p-BqFCd65h.js +2 -0
  559. package/dist/sdk/p-BqFCd65h.js.map +1 -0
  560. package/dist/sdk/p-C0feI0p8.js +2 -0
  561. package/dist/sdk/p-C0feI0p8.js.map +1 -0
  562. package/dist/sdk/p-CFiZLMAA.js +2 -0
  563. package/dist/sdk/p-CFiZLMAA.js.map +1 -0
  564. package/dist/sdk/p-CPPYdoIv.js +2 -0
  565. package/dist/sdk/p-CPPYdoIv.js.map +1 -0
  566. package/dist/sdk/p-CbRhHGU5.js +2 -0
  567. package/dist/sdk/p-CbRhHGU5.js.map +1 -0
  568. package/dist/sdk/p-Ce8zGAi1.js +2 -0
  569. package/dist/sdk/p-Ce8zGAi1.js.map +1 -0
  570. package/dist/sdk/p-Ci3aTmzp.js +3 -0
  571. package/dist/sdk/p-Ci3aTmzp.js.map +1 -0
  572. package/dist/sdk/p-D1lzXl_Z.js +2 -0
  573. package/dist/sdk/p-D1lzXl_Z.js.map +1 -0
  574. package/dist/sdk/p-DA84OuuU.js +2 -0
  575. package/dist/sdk/p-DA84OuuU.js.map +1 -0
  576. package/dist/sdk/p-DUHc_Cx7.js +2 -0
  577. package/dist/sdk/p-DUHc_Cx7.js.map +1 -0
  578. package/dist/sdk/p-DYtgart8.js +2 -0
  579. package/dist/sdk/p-DYtgart8.js.map +1 -0
  580. package/dist/sdk/p-DdUvQelg.js +2 -0
  581. package/dist/sdk/p-DdUvQelg.js.map +1 -0
  582. package/dist/sdk/p-PKvQIsOt.js +2 -0
  583. package/dist/sdk/p-PKvQIsOt.js.map +1 -0
  584. package/dist/sdk/p-a4f5940f.entry.js +2 -0
  585. package/dist/sdk/p-a4f5940f.entry.js.map +1 -0
  586. package/dist/sdk/p-a69b83ec.entry.js +2 -0
  587. package/dist/sdk/p-a69b83ec.entry.js.map +1 -0
  588. package/dist/sdk/p-aMrLKr2m.js +2 -0
  589. package/dist/sdk/p-aMrLKr2m.js.map +1 -0
  590. package/dist/sdk/p-bfb04b17.entry.js +2 -0
  591. package/dist/sdk/p-bfb04b17.entry.js.map +1 -0
  592. package/dist/sdk/p-c6816542.entry.js +2 -0
  593. package/dist/sdk/p-c6816542.entry.js.map +1 -0
  594. package/dist/sdk/p-da363474.entry.js +2 -0
  595. package/dist/sdk/p-da363474.entry.js.map +1 -0
  596. package/dist/sdk/p-e2e7061b.entry.js +2 -0
  597. package/dist/sdk/p-e2e7061b.entry.js.map +1 -0
  598. package/dist/sdk/p-e3f28800.entry.js +2 -0
  599. package/dist/sdk/p-e3f28800.entry.js.map +1 -0
  600. package/dist/sdk/p-e54d5d38.entry.js +2 -0
  601. package/dist/sdk/p-e54d5d38.entry.js.map +1 -0
  602. package/dist/sdk/p-e81bbd62.entry.js +2 -0
  603. package/dist/sdk/p-e81bbd62.entry.js.map +1 -0
  604. package/dist/sdk/p-effaf86b.entry.js +2 -0
  605. package/dist/sdk/p-effaf86b.entry.js.map +1 -0
  606. package/dist/sdk/p-f232929b.entry.js +2 -0
  607. package/dist/sdk/p-f232929b.entry.js.map +1 -0
  608. package/dist/sdk/p-f961fbea.entry.js +2 -0
  609. package/dist/sdk/p-f961fbea.entry.js.map +1 -0
  610. package/dist/sdk/sdk.esm.js +2 -48
  611. package/dist/sdk/sdk.esm.js.map +1 -1
  612. package/dist/sdk/u-config.entry.esm.js.map +1 -1
  613. package/dist/sdk/u-error-message.entry.esm.js.map +1 -1
  614. package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +1 -0
  615. package/dist/sdk/u-full-profile.entry.esm.js.map +1 -1
  616. package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
  617. package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +1 -0
  618. package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
  619. package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
  620. package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
  621. package/dist/types/auth/api/auth.d.ts +27 -27
  622. package/dist/types/auth/auth-helpers.d.ts +55 -54
  623. package/dist/types/auth/store/auth-store.d.ts +3 -3
  624. package/dist/types/components.d.ts +72 -0
  625. package/dist/types/profile/api/profile.d.ts +3 -3
  626. package/dist/types/profile/components/profile/profile.d.ts +15 -0
  627. package/dist/types/shared/components/error-message/error-message.d.ts +1 -1
  628. package/dist/types/ticketable/components/ticketable-list/ticketable-list.d.ts +12 -2
  629. package/loader/cdn.js +1 -0
  630. package/loader/index.cjs.js +1 -0
  631. package/loader/index.d.ts +24 -0
  632. package/loader/index.es2017.js +1 -0
  633. package/loader/index.js +2 -0
  634. package/package.json +1 -1
  635. package/dist/sdk/auth-Che07PeV.js.map +0 -1
  636. package/dist/sdk/auth-store-CapiC8gJ.js.map +0 -1
  637. package/dist/sdk/i18n-BCI_ARJL.js.map +0 -1
  638. package/dist/sdk/index-BqL27K_R.js +0 -49640
  639. package/dist/sdk/index-BqL27K_R.js.map +0 -1
  640. package/dist/sdk/index-Cz3idqu9.js.map +0 -1
  641. package/dist/sdk/index-gEcJztft.js +0 -15349
  642. package/dist/sdk/index-gEcJztft.js.map +0 -1
  643. package/dist/sdk/newsletter-helpers-DEXEBD0F.js.map +0 -1
  644. package/dist/sdk/u-field.entry.esm.js.map +0 -1
  645. package/dist/sdk/u-profile.entry.esm.js.map +0 -1
  646. package/dist/sdk/u-raw-field.entry.esm.js.map +0 -1
  647. package/dist/sdk/u-submit-button.entry.esm.js.map +0 -1
  648. /package/dist/{sdk → esm}/component-utils-D1lzXl_Z.js +0 -0
  649. /package/dist/{sdk → esm}/component-utils-D1lzXl_Z.js.map +0 -0
  650. /package/dist/{sdk → esm}/helpers-BqFCd65h.js +0 -0
  651. /package/dist/{sdk → esm}/helpers-BqFCd65h.js.map +0 -0
  652. /package/dist/{sdk → esm}/helpers-DUHc_Cx7.js +0 -0
  653. /package/dist/{sdk → esm}/helpers-DUHc_Cx7.js.map +0 -0
@@ -0,0 +1,106 @@
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
@@ -0,0 +1 @@
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,KAA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AC,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}
@@ -0,0 +1,57 @@
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
@@ -0,0 +1 @@
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}
@@ -0,0 +1,70 @@
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
@@ -0,0 +1 @@
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,k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AAQ,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}
@@ -0,0 +1,77 @@
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
+ handleChange = () => {
33
+ if (this.isSubscribed)
34
+ return;
35
+ const currentlyChecked = this.internalName in newsletterStore.state.checkedNewsletters;
36
+ if (currentlyChecked) {
37
+ const { [this.internalName]: _, ...rest } = newsletterStore.state.checkedNewsletters;
38
+ newsletterStore.set("checkedNewsletters", rest);
39
+ }
40
+ else {
41
+ const prefs = newsletterStore.state.defaultPreferences[this.internalName];
42
+ const defaultPrefs = prefs ? Array.from(prefs) : [];
43
+ newsletterStore.set("checkedNewsletters", {
44
+ ...newsletterStore.state.checkedNewsletters,
45
+ [this.internalName]: defaultPrefs,
46
+ });
47
+ }
48
+ };
49
+ render() {
50
+ return (h("input", { key: 'cc271d9f9c00c561dac29e7b4edc96e0ddf148b6', type: "checkbox", checked: this.isChecked, disabled: this.isSubscribed, onChange: this.handleChange, class: this.componentClassName, "aria-checked": this.isChecked }));
51
+ }
52
+ }, [768, "u-newsletter-checkbox", {
53
+ "internalName": [1, "internal-name"],
54
+ "checked": [4],
55
+ "componentClassName": [1, "class-name"]
56
+ }]);
57
+ function defineCustomElement$1() {
58
+ if (typeof customElements === "undefined") {
59
+ return;
60
+ }
61
+ const components = ["u-newsletter-checkbox"];
62
+ components.forEach(tagName => { switch (tagName) {
63
+ case "u-newsletter-checkbox":
64
+ if (!customElements.get(tagName)) {
65
+ customElements.define(tagName, NewsletterCheckbox);
66
+ }
67
+ break;
68
+ } });
69
+ }
70
+
71
+ const UNewsletterCheckbox = NewsletterCheckbox;
72
+ const defineCustomElement = defineCustomElement$1;
73
+
74
+ export { UNewsletterCheckbox, defineCustomElement };
75
+ //# sourceMappingURL=u-newsletter-checkbox.js.map
76
+
77
+ //# sourceMappingURL=u-newsletter-checkbox.js.map
@@ -0,0 +1 @@
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;;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":["src/newsletter/components/newsletter-checkbox/newsletter-checkbox.tsx"],"sourcesContent":["import { Component, h, 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 handleChange = () => {\n if (this.isSubscribed) return;\n\n const currentlyChecked = this.internalName in newsletterStore.state.checkedNewsletters;\n\n if (currentlyChecked) {\n const { [this.internalName]: _, ...rest } = newsletterStore.state.checkedNewsletters;\n newsletterStore.set(\"checkedNewsletters\", rest);\n } else {\n const prefs = newsletterStore.state.defaultPreferences[this.internalName];\n const defaultPrefs: string[] = prefs ? Array.from(prefs) : [];\n\n newsletterStore.set(\"checkedNewsletters\", {\n ...newsletterStore.state.checkedNewsletters,\n [this.internalName]: defaultPrefs,\n });\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}
@@ -0,0 +1,51 @@
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
@@ -0,0 +1 @@
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}
@@ -0,0 +1,124 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { a as isSubscribed, u as updateSubscriptionPreferences } from './newsletter-helpers.js';
3
+ import { s as storeDefaultPreference, n as newsletterStore } from './newsletter-store.js';
4
+
5
+ const NewsletterPreferenceCheckbox = /*@__PURE__*/ proxyCustomElement(class NewsletterPreferenceCheckbox extends HTMLElement {
6
+ constructor(registerHost) {
7
+ super();
8
+ if (registerHost !== false) {
9
+ this.__registerHost();
10
+ }
11
+ }
12
+ internalName;
13
+ preferenceIdentifier;
14
+ checked = false;
15
+ componentClassName;
16
+ loading = false;
17
+ existingSubscriptions = [];
18
+ checkedPreferences = [];
19
+ storeUnsubscribe;
20
+ componentWillLoad() {
21
+ this.subscribeToStore();
22
+ this.initializeCheckedState();
23
+ if (this.checked) {
24
+ storeDefaultPreference(this.internalName, this.preferenceIdentifier);
25
+ }
26
+ }
27
+ disconnectedCallback() {
28
+ this.storeUnsubscribe?.();
29
+ }
30
+ subscribeToStore() {
31
+ this.storeUnsubscribe = newsletterStore.onChange("existingSubscriptions", (subscriptions) => {
32
+ this.existingSubscriptions = subscriptions;
33
+ });
34
+ newsletterStore.onChange("checkedNewsletters", (checkedNewsletters) => {
35
+ this.checkedPreferences = checkedNewsletters[this.internalName] || [];
36
+ });
37
+ this.existingSubscriptions = newsletterStore.state.existingSubscriptions;
38
+ this.checkedPreferences = newsletterStore.state.checkedNewsletters[this.internalName] || [];
39
+ }
40
+ initializeCheckedState() {
41
+ if (isSubscribed(this.internalName)) {
42
+ return;
43
+ }
44
+ if (this.checked) {
45
+ this.syncToStore(true);
46
+ }
47
+ }
48
+ get subscription() {
49
+ return this.existingSubscriptions.find((sub) => sub.newsletter_internal_name === this.internalName);
50
+ }
51
+ get isSubscribed() {
52
+ return this.subscription !== undefined;
53
+ }
54
+ get isConfirmed() {
55
+ return this.subscription?.confirmed ?? false;
56
+ }
57
+ get isDisabled() {
58
+ return this.loading || (this.isSubscribed && !this.isConfirmed);
59
+ }
60
+ get isChecked() {
61
+ return this.checkedPreferences.includes(this.preferenceIdentifier);
62
+ }
63
+ syncToStore(add) {
64
+ const currentPreferences = newsletterStore.state.checkedNewsletters[this.internalName] || [];
65
+ if (add) {
66
+ if (!currentPreferences.includes(this.preferenceIdentifier)) {
67
+ newsletterStore.set("checkedNewsletters", {
68
+ ...newsletterStore.state.checkedNewsletters,
69
+ [this.internalName]: [...currentPreferences, this.preferenceIdentifier],
70
+ });
71
+ }
72
+ }
73
+ else {
74
+ newsletterStore.set("checkedNewsletters", {
75
+ ...newsletterStore.state.checkedNewsletters,
76
+ [this.internalName]: currentPreferences.filter((p) => p !== this.preferenceIdentifier),
77
+ });
78
+ }
79
+ }
80
+ handleChange = async () => {
81
+ if (this.isDisabled)
82
+ return;
83
+ const currentlyChecked = this.isChecked;
84
+ this.syncToStore(!currentlyChecked);
85
+ // If subscribed and confirmed persist the change to the API
86
+ if (this.isSubscribed && this.isConfirmed) {
87
+ this.loading = true;
88
+ await updateSubscriptionPreferences(this.internalName);
89
+ this.loading = false;
90
+ }
91
+ };
92
+ render() {
93
+ return (h("input", { key: 'f0991d8f47d6d10ec177c1effdc9ac1371bd8e43', type: "checkbox", checked: this.isChecked, disabled: this.isDisabled, onChange: this.handleChange, class: this.componentClassName, "aria-checked": this.isChecked, "aria-busy": this.loading, "aria-disabled": this.isDisabled, "data-internal-name": this.internalName, "data-preference-identifier": this.preferenceIdentifier }));
94
+ }
95
+ }, [768, "u-newsletter-preference-checkbox", {
96
+ "internalName": [1, "internal-name"],
97
+ "preferenceIdentifier": [1, "preference-identifier"],
98
+ "checked": [4],
99
+ "componentClassName": [1, "class-name"],
100
+ "loading": [32],
101
+ "existingSubscriptions": [32],
102
+ "checkedPreferences": [32]
103
+ }]);
104
+ function defineCustomElement$1() {
105
+ if (typeof customElements === "undefined") {
106
+ return;
107
+ }
108
+ const components = ["u-newsletter-preference-checkbox"];
109
+ components.forEach(tagName => { switch (tagName) {
110
+ case "u-newsletter-preference-checkbox":
111
+ if (!customElements.get(tagName)) {
112
+ customElements.define(tagName, NewsletterPreferenceCheckbox);
113
+ }
114
+ break;
115
+ } });
116
+ }
117
+
118
+ const UNewsletterPreferenceCheckbox = NewsletterPreferenceCheckbox;
119
+ const defineCustomElement = defineCustomElement$1;
120
+
121
+ export { UNewsletterPreferenceCheckbox, defineCustomElement };
122
+ //# sourceMappingURL=u-newsletter-preference-checkbox.js.map
123
+
124
+ //# sourceMappingURL=u-newsletter-preference-checkbox.js.map
@@ -0,0 +1 @@
1
+ {"file":"u-newsletter-preference-checkbox.js","mappings":";;;;MAQa,4BAA4B,iBAAAA,kBAAA,CAAA,MAAA,4BAAA,SAAA,WAAA,CAAA;;;;;;;AAC/B,IAAA,YAAY;AACZ,IAAA,oBAAoB;IACpB,OAAO,GAAG,KAAK;AACY,IAAA,kBAAkB;IAE5C,OAAO,GAAG,KAAK;IAEf,qBAAqB,GAA2B,EAAE;IAClD,kBAAkB,GAAa,EAAE;AAElC,IAAA,gBAAgB;IAExB,iBAAiB,GAAA;QACf,IAAI,CAAC,gBAAgB,EAAE;QACvB,IAAI,CAAC,sBAAsB,EAAE;AAE7B,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,sBAAsB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,CAAC;;;IAIxE,oBAAoB,GAAA;AAClB,QAAA,IAAI,CAAC,gBAAgB,IAAI;;IAGnB,gBAAgB,GAAA;AACtB,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,QAAQ,CAAC,uB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EAC3B,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAA,cAAA,EAChB,IAAI,CAAC,SAAS,EACjB,WAAA,EAAA,IAAI,CAAC,OAAO,EACR,eAAA,EAAA,IAAI,CAAC,UAAU,EAAA,oBAAA,EACV,IAAI,CAAC,YAAY,EAAA,4BAAA,EACT,IAAI,CAAC,oBAAoB,EACrD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","NewsletterHelpers.isSubscribed","NewsletterHelpers.updateSubscriptionPreferences"],"sources":["src/newsletter/components/preference-checkbox/preference-checkbox.tsx"],"sourcesContent":["import { Component, h, Prop, State } from \"@stencil/core\";\nimport * as NewsletterHelpers from \"../../newsletter-helpers\";\nimport { type ExistingSubscription, newsletterStore, storeDefaultPreference } from \"../../store/newsletter-store\";\n\n@Component({\n tag: \"u-newsletter-preference-checkbox\",\n shadow: false,\n})\nexport class NewsletterPreferenceCheckbox {\n @Prop() internalName!: string;\n @Prop() preferenceIdentifier!: string;\n @Prop() checked = false;\n @Prop({ attribute: \"class-name\" }) componentClassName?: string;\n\n @State() loading = false;\n\n @State() existingSubscriptions: ExistingSubscription[] = [];\n @State() checkedPreferences: string[] = [];\n\n private storeUnsubscribe?: () => void;\n\n componentWillLoad() {\n this.subscribeToStore();\n this.initializeCheckedState();\n\n if (this.checked) {\n storeDefaultPreference(this.internalName, this.preferenceIdentifier);\n }\n }\n\n disconnectedCallback() {\n this.storeUnsubscribe?.();\n }\n\n private subscribeToStore() {\n this.storeUnsubscribe = newsletterStore.onChange(\"existingSubscriptions\", (subscriptions) => {\n this.existingSubscriptions = subscriptions;\n });\n\n newsletterStore.onChange(\"checkedNewsletters\", (checkedNewsletters) => {\n this.checkedPreferences = checkedNewsletters[this.internalName] || [];\n });\n\n this.existingSubscriptions = newsletterStore.state.existingSubscriptions;\n this.checkedPreferences = newsletterStore.state.checkedNewsletters[this.internalName] || [];\n }\n\n private initializeCheckedState() {\n if (NewsletterHelpers.isSubscribed(this.internalName)) {\n return;\n }\n\n if (this.checked) {\n this.syncToStore(true);\n }\n }\n\n private get subscription(): ExistingSubscription | undefined {\n return this.existingSubscriptions.find((sub) => sub.newsletter_internal_name === this.internalName);\n }\n\n private get isSubscribed(): boolean {\n return this.subscription !== undefined;\n }\n\n private get isConfirmed(): boolean {\n return this.subscription?.confirmed ?? false;\n }\n\n private get isDisabled(): boolean {\n return this.loading || (this.isSubscribed && !this.isConfirmed);\n }\n\n private get isChecked(): boolean {\n return this.checkedPreferences.includes(this.preferenceIdentifier);\n }\n\n private syncToStore(add: boolean) {\n const currentPreferences = newsletterStore.state.checkedNewsletters[this.internalName] || [];\n\n if (add) {\n if (!currentPreferences.includes(this.preferenceIdentifier)) {\n newsletterStore.set(\"checkedNewsletters\", {\n ...newsletterStore.state.checkedNewsletters,\n [this.internalName]: [...currentPreferences, this.preferenceIdentifier],\n });\n }\n } else {\n newsletterStore.set(\"checkedNewsletters\", {\n ...newsletterStore.state.checkedNewsletters,\n [this.internalName]: currentPreferences.filter((p) => p !== this.preferenceIdentifier),\n });\n }\n }\n\n private handleChange = async () => {\n if (this.isDisabled) return;\n\n const currentlyChecked = this.isChecked;\n this.syncToStore(!currentlyChecked);\n\n // If subscribed and confirmed persist the change to the API\n if (this.isSubscribed && this.isConfirmed) {\n this.loading = true;\n await NewsletterHelpers.updateSubscriptionPreferences(this.internalName);\n this.loading = false;\n }\n };\n\n render() {\n return (\n <input\n type=\"checkbox\"\n checked={this.isChecked}\n disabled={this.isDisabled}\n onChange={this.handleChange}\n class={this.componentClassName}\n aria-checked={this.isChecked}\n aria-busy={this.loading}\n aria-disabled={this.isDisabled}\n data-internal-name={this.internalName}\n data-preference-identifier={this.preferenceIdentifier}\n />\n );\n }\n}\n"],"version":3}