@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.
Files changed (661) hide show
  1. package/dist/{esm/auth-DLKPv5Zm.js → sdk/auth-Che07PeV.js} +9 -9
  2. package/dist/{esm/auth-DLKPv5Zm.js.map → sdk/auth-Che07PeV.js.map} +1 -1
  3. package/dist/{components/auth-store.js → sdk/auth-store-CapiC8gJ.js} +4 -4
  4. package/dist/{esm/auth-store-BMqUdTpC.js.map → sdk/auth-store-CapiC8gJ.js.map} +1 -1
  5. package/dist/{components/flash-store.js → sdk/flash-store-DNcSEn2p.js} +4 -3
  6. package/dist/{esm/flash-store-CEvWSG0c.js.map → sdk/flash-store-DNcSEn2p.js.map} +1 -1
  7. package/dist/{components/i18n.js → sdk/i18n-BCI_ARJL.js} +25 -5
  8. package/dist/sdk/i18n-BCI_ARJL.js.map +1 -0
  9. package/dist/{esm/index-Bjp1XO-f.js → sdk/index-BnBstyfp.js} +3 -3
  10. package/dist/{esm/index-Bjp1XO-f.js.map → sdk/index-BnBstyfp.js.map} +1 -1
  11. package/dist/sdk/index-BqL27K_R.js +49640 -0
  12. package/dist/sdk/index-BqL27K_R.js.map +1 -0
  13. package/dist/{collection/auth/error-definitions.js → sdk/index-Cz3idqu9.js} +19 -2
  14. package/dist/sdk/index-Cz3idqu9.js.map +1 -0
  15. package/dist/sdk/index-gEcJztft.js +15349 -0
  16. package/dist/sdk/index-gEcJztft.js.map +1 -0
  17. package/dist/sdk/index.esm.js +22 -2
  18. package/dist/sdk/index.esm.js.map +1 -1
  19. package/dist/sdk/loader.esm.js.map +1 -1
  20. package/dist/sdk/locales/de.json +1 -0
  21. package/dist/sdk/locales/en.json +1 -0
  22. package/dist/sdk/locales/fr.json +1 -0
  23. package/dist/sdk/locales/it.json +1 -0
  24. package/dist/sdk/locales/nl_be.json +1 -0
  25. package/dist/sdk/locales/ro.json +1 -0
  26. package/dist/{esm/newsletter-helpers-Dh9k-4Ph.js → sdk/newsletter-helpers-DEXEBD0F.js} +16 -9
  27. package/dist/sdk/newsletter-helpers-DEXEBD0F.js.map +1 -0
  28. package/dist/sdk/newsletter-store-CvULKmsu.js +39 -0
  29. package/dist/sdk/newsletter-store-CvULKmsu.js.map +1 -0
  30. package/dist/{components/profile-helpers.js → sdk/profile-helpers-Bs3aj0CO.js} +4 -4
  31. package/dist/{esm/profile-helpers-7onubaoR.js.map → sdk/profile-helpers-Bs3aj0CO.js.map} +1 -1
  32. package/dist/{components/profile-store.js → sdk/profile-store-DD6sq42i.js} +3 -3
  33. package/dist/{esm/profile-store-RmZB2PTc.js.map → sdk/profile-store-DD6sq42i.js.map} +1 -1
  34. package/dist/sdk/sdk.esm.js +48 -2
  35. package/dist/sdk/sdk.esm.js.map +1 -1
  36. package/dist/sdk/u-conditional-render.entry.esm.js.map +1 -1
  37. package/dist/{esm → sdk}/u-conditional-render.entry.js +13 -12
  38. package/dist/sdk/u-config.entry.esm.js.map +1 -1
  39. package/dist/{esm → sdk}/u-config.entry.js +13 -12
  40. package/dist/sdk/u-email-field.entry.esm.js.map +1 -1
  41. package/dist/sdk/u-email-field.entry.js +75 -0
  42. package/dist/{esm → sdk}/u-error-message.entry.js +7 -7
  43. package/dist/sdk/u-field.entry.esm.js.map +1 -0
  44. package/dist/sdk/u-field.entry.js +101 -0
  45. package/dist/sdk/u-flash-message.entry.esm.js.map +1 -1
  46. package/dist/sdk/u-flash-message.entry.js +35 -0
  47. package/dist/sdk/u-full-profile.entry.esm.js.map +1 -1
  48. package/dist/sdk/u-full-profile.entry.js +35 -0
  49. package/dist/{esm → sdk}/u-logout-button.entry.js +11 -11
  50. package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
  51. package/dist/{esm → sdk}/u-magic-code-field.entry.js +10 -10
  52. package/dist/{esm → sdk}/u-missing-field.entry.js +5 -5
  53. package/dist/{esm → sdk}/u-missing-fields-submit-button.entry.js +9 -9
  54. package/dist/sdk/u-newsletter-checkbox.entry.esm.js.map +1 -1
  55. package/dist/{esm → sdk}/u-newsletter-checkbox.entry.js +25 -37
  56. package/dist/{esm → sdk}/u-newsletter-logout-button.entry.js +12 -12
  57. package/dist/sdk/u-newsletter-preference-checkbox.entry.esm.js.map +1 -1
  58. package/dist/{esm → sdk}/u-newsletter-preference-checkbox.entry.js +22 -33
  59. package/dist/sdk/u-newsletter-resend-doi-button.entry.esm.js.map +1 -1
  60. package/dist/sdk/u-newsletter-resend-doi-button.entry.js +47 -0
  61. package/dist/sdk/u-newsletter-root.entry.esm.js.map +1 -1
  62. package/dist/{esm → sdk}/u-newsletter-root.entry.js +19 -33
  63. package/dist/sdk/u-newsletter-toggle-subscription-button.entry.esm.js.map +1 -1
  64. package/dist/sdk/u-newsletter-toggle-subscription-button.entry.js +71 -0
  65. package/dist/{esm → sdk}/u-pagination-button.entry.js +2 -2
  66. package/dist/{esm → sdk}/u-pagination-page.entry.js +2 -2
  67. package/dist/{esm → sdk}/u-passkey.entry.js +10 -10
  68. package/dist/{esm → sdk}/u-password-field.entry.js +6 -6
  69. package/dist/sdk/u-profile.entry.esm.js.map +1 -0
  70. package/dist/{components/profile.js → sdk/u-profile.entry.js} +18 -38
  71. package/dist/sdk/u-raw-field.entry.esm.js.map +1 -0
  72. package/dist/{components/raw-field.js → sdk/u-raw-field.entry.js} +10 -51
  73. package/dist/{esm → sdk}/u-registration-button.entry.js +6 -6
  74. package/dist/{esm → sdk}/u-reset-password-button.entry.js +10 -10
  75. package/dist/{esm → sdk}/u-send-magic-code-button.entry.js +10 -10
  76. package/dist/{esm → sdk}/u-signed-in.entry.js +5 -5
  77. package/dist/{esm → sdk}/u-signin-root.entry.js +7 -7
  78. package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
  79. package/dist/{esm → sdk}/u-signin-step.entry.js +11 -10
  80. package/dist/{esm → sdk}/u-signin-strategy.entry.js +5 -5
  81. package/dist/{esm → sdk}/u-social-login-button.entry.js +6 -6
  82. package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
  83. package/dist/{esm → sdk}/u-spinner.entry.js +3 -3
  84. package/dist/sdk/u-submit-button.entry.esm.js.map +1 -0
  85. package/dist/sdk/u-submit-button.entry.js +204 -0
  86. package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
  87. package/dist/{esm → sdk}/u-ticketable-list.entry.js +141 -73
  88. package/dist/{components/unidy-store.js → sdk/unidy-store-BwZym11Y.js} +4 -3
  89. package/dist/{esm/unidy-store-BldTAtO0.js.map → sdk/unidy-store-BwZym11Y.js.map} +1 -1
  90. package/dist/types/components.d.ts +0 -36
  91. package/dist/types/newsletter/components/newsletter-checkbox/newsletter-checkbox.d.ts +0 -5
  92. package/dist/types/newsletter/components/newsletter-root/newsletter-root.d.ts +0 -9
  93. package/dist/types/newsletter/components/preference-checkbox/preference-checkbox.d.ts +0 -5
  94. package/dist/types/newsletter/newsletter-helpers.d.ts +1 -1
  95. package/dist/types/newsletter/store/newsletter-store.d.ts +3 -0
  96. package/dist/types/shared/components/email-field/email-field.d.ts +0 -2
  97. package/package.json +1 -1
  98. package/dist/cjs/app-globals-DSKjcXX_.js +0 -10
  99. package/dist/cjs/app-globals-DSKjcXX_.js.map +0 -1
  100. package/dist/cjs/auth-BVKZHhXz.js +0 -573
  101. package/dist/cjs/auth-BVKZHhXz.js.map +0 -1
  102. package/dist/cjs/auth-store-DC9EVec8.js +0 -184
  103. package/dist/cjs/auth-store-DC9EVec8.js.map +0 -1
  104. package/dist/cjs/component-utils-BpMyeVQo.js +0 -35
  105. package/dist/cjs/component-utils-BpMyeVQo.js.map +0 -1
  106. package/dist/cjs/flash-store-BuIBuQDx.js +0 -50
  107. package/dist/cjs/flash-store-BuIBuQDx.js.map +0 -1
  108. package/dist/cjs/helpers-BcPlKlBG.js +0 -11
  109. package/dist/cjs/helpers-BcPlKlBG.js.map +0 -1
  110. package/dist/cjs/helpers-DJyRa0Qo.js +0 -11
  111. package/dist/cjs/helpers-DJyRa0Qo.js.map +0 -1
  112. package/dist/cjs/i18n-Xy1So-ba.js +0 -3224
  113. package/dist/cjs/i18n-Xy1So-ba.js.map +0 -1
  114. package/dist/cjs/index-B_N5xKgH.js +0 -12025
  115. package/dist/cjs/index-B_N5xKgH.js.map +0 -1
  116. package/dist/cjs/index-DLz3FT7T.js +0 -214
  117. package/dist/cjs/index-DLz3FT7T.js.map +0 -1
  118. package/dist/cjs/index-DiUlebpf.js +0 -5256
  119. package/dist/cjs/index-DiUlebpf.js.map +0 -1
  120. package/dist/cjs/index.cjs.js +0 -64
  121. package/dist/cjs/index.cjs.js.map +0 -1
  122. package/dist/cjs/loader.cjs.js +0 -14
  123. package/dist/cjs/loader.cjs.js.map +0 -1
  124. package/dist/cjs/newsletter-helpers-D34j8zxr.js +0 -280
  125. package/dist/cjs/newsletter-helpers-D34j8zxr.js.map +0 -1
  126. package/dist/cjs/newsletter-store-dhtu8ywO.js +0 -27
  127. package/dist/cjs/newsletter-store-dhtu8ywO.js.map +0 -1
  128. package/dist/cjs/pagination-store-BEiW3MQd.js +0 -16
  129. package/dist/cjs/pagination-store-BEiW3MQd.js.map +0 -1
  130. package/dist/cjs/profile-helpers-DrcTgN5n.js +0 -39
  131. package/dist/cjs/profile-helpers-DrcTgN5n.js.map +0 -1
  132. package/dist/cjs/profile-store-P_BcYkef.js +0 -22
  133. package/dist/cjs/profile-store-P_BcYkef.js.map +0 -1
  134. package/dist/cjs/sdk.cjs.js +0 -26
  135. package/dist/cjs/sdk.cjs.js.map +0 -1
  136. package/dist/cjs/u-conditional-render.cjs.entry.js +0 -102
  137. package/dist/cjs/u-conditional-render.entry.cjs.js.map +0 -1
  138. package/dist/cjs/u-config.cjs.entry.js +0 -87
  139. package/dist/cjs/u-config.entry.cjs.js.map +0 -1
  140. package/dist/cjs/u-email-field.cjs.entry.js +0 -75
  141. package/dist/cjs/u-email-field.entry.cjs.js.map +0 -1
  142. package/dist/cjs/u-error-message.cjs.entry.js +0 -82
  143. package/dist/cjs/u-error-message.entry.cjs.js.map +0 -1
  144. package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +0 -1
  145. package/dist/cjs/u-field_2.cjs.entry.js +0 -375
  146. package/dist/cjs/u-flash-message.cjs.entry.js +0 -34
  147. package/dist/cjs/u-flash-message.entry.cjs.js.map +0 -1
  148. package/dist/cjs/u-full-profile.cjs.entry.js +0 -36
  149. package/dist/cjs/u-full-profile.entry.cjs.js.map +0 -1
  150. package/dist/cjs/u-logout-button.cjs.entry.js +0 -38
  151. package/dist/cjs/u-logout-button.entry.cjs.js.map +0 -1
  152. package/dist/cjs/u-magic-code-field.cjs.entry.js +0 -91
  153. package/dist/cjs/u-magic-code-field.entry.cjs.js.map +0 -1
  154. package/dist/cjs/u-missing-field.cjs.entry.js +0 -22
  155. package/dist/cjs/u-missing-field.entry.cjs.js.map +0 -1
  156. package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +0 -46
  157. package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +0 -1
  158. package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +0 -75
  159. package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +0 -1
  160. package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +0 -36
  161. package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +0 -1
  162. package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +0 -117
  163. package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +0 -1
  164. package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +0 -46
  165. package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +0 -1
  166. package/dist/cjs/u-newsletter-root.cjs.entry.js +0 -86
  167. package/dist/cjs/u-newsletter-root.entry.cjs.js.map +0 -1
  168. package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +0 -70
  169. package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +0 -1
  170. package/dist/cjs/u-pagination-button.cjs.entry.js +0 -63
  171. package/dist/cjs/u-pagination-button.entry.cjs.js.map +0 -1
  172. package/dist/cjs/u-pagination-page.cjs.entry.js +0 -44
  173. package/dist/cjs/u-pagination-page.entry.cjs.js.map +0 -1
  174. package/dist/cjs/u-passkey.cjs.entry.js +0 -47
  175. package/dist/cjs/u-passkey.entry.cjs.js.map +0 -1
  176. package/dist/cjs/u-password-field.cjs.entry.js +0 -104
  177. package/dist/cjs/u-password-field.entry.cjs.js.map +0 -1
  178. package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +0 -1
  179. package/dist/cjs/u-profile_2.cjs.entry.js +0 -311
  180. package/dist/cjs/u-registration-button.cjs.entry.js +0 -48
  181. package/dist/cjs/u-registration-button.entry.cjs.js.map +0 -1
  182. package/dist/cjs/u-reset-password-button.cjs.entry.js +0 -47
  183. package/dist/cjs/u-reset-password-button.entry.cjs.js.map +0 -1
  184. package/dist/cjs/u-send-magic-code-button.cjs.entry.js +0 -68
  185. package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +0 -1
  186. package/dist/cjs/u-signed-in.cjs.entry.js +0 -25
  187. package/dist/cjs/u-signed-in.entry.cjs.js.map +0 -1
  188. package/dist/cjs/u-signin-root.cjs.entry.js +0 -43
  189. package/dist/cjs/u-signin-root.entry.cjs.js.map +0 -1
  190. package/dist/cjs/u-signin-step.cjs.entry.js +0 -66
  191. package/dist/cjs/u-signin-step.entry.cjs.js.map +0 -1
  192. package/dist/cjs/u-signin-strategy.cjs.entry.js +0 -30
  193. package/dist/cjs/u-signin-strategy.entry.cjs.js.map +0 -1
  194. package/dist/cjs/u-social-login-button.cjs.entry.js +0 -100
  195. package/dist/cjs/u-social-login-button.entry.cjs.js.map +0 -1
  196. package/dist/cjs/u-spinner.cjs.entry.js +0 -18
  197. package/dist/cjs/u-spinner.entry.cjs.js.map +0 -1
  198. package/dist/cjs/u-ticketable-list.cjs.entry.js +0 -6078
  199. package/dist/cjs/u-ticketable-list.entry.cjs.js.map +0 -1
  200. package/dist/cjs/unidy-store-7AbWnZ6g.js +0 -41
  201. package/dist/cjs/unidy-store-7AbWnZ6g.js.map +0 -1
  202. package/dist/collection/api/client.js +0 -144
  203. package/dist/collection/api/client.js.map +0 -1
  204. package/dist/collection/api/index.js +0 -42
  205. package/dist/collection/api/index.js.map +0 -1
  206. package/dist/collection/api/shared.js +0 -18
  207. package/dist/collection/api/shared.js.map +0 -1
  208. package/dist/collection/auth/api/auth.js +0 -264
  209. package/dist/collection/auth/api/auth.js.map +0 -1
  210. package/dist/collection/auth/auth-helpers.js +0 -291
  211. package/dist/collection/auth/auth-helpers.js.map +0 -1
  212. package/dist/collection/auth/auth.js +0 -121
  213. package/dist/collection/auth/auth.js.map +0 -1
  214. package/dist/collection/auth/components/helpers.js +0 -5
  215. package/dist/collection/auth/components/helpers.js.map +0 -1
  216. package/dist/collection/auth/components/logout-button/logout-button.js +0 -85
  217. package/dist/collection/auth/components/logout-button/logout-button.js.map +0 -1
  218. package/dist/collection/auth/components/magic-code-field/magic-code-field.css +0 -1
  219. package/dist/collection/auth/components/magic-code-field/magic-code-field.js +0 -113
  220. package/dist/collection/auth/components/magic-code-field/magic-code-field.js.map +0 -1
  221. package/dist/collection/auth/components/missing-field/missing-field.js +0 -14
  222. package/dist/collection/auth/components/missing-field/missing-field.js.map +0 -1
  223. package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +0 -39
  224. package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +0 -1
  225. package/dist/collection/auth/components/passkey/passkey.js +0 -103
  226. package/dist/collection/auth/components/passkey/passkey.js.map +0 -1
  227. package/dist/collection/auth/components/password-field/password-field.js +0 -166
  228. package/dist/collection/auth/components/password-field/password-field.js.map +0 -1
  229. package/dist/collection/auth/components/registration/registration-button.js +0 -104
  230. package/dist/collection/auth/components/registration/registration-button.js.map +0 -1
  231. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +0 -59
  232. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +0 -1
  233. package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js +0 -104
  234. package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js.map +0 -1
  235. package/dist/collection/auth/components/signed-in/signed-in.js +0 -59
  236. package/dist/collection/auth/components/signed-in/signed-in.js.map +0 -1
  237. package/dist/collection/auth/components/signin-root/signin-root.js +0 -97
  238. package/dist/collection/auth/components/signin-root/signin-root.js.map +0 -1
  239. package/dist/collection/auth/components/signin-step/signin-step.js +0 -135
  240. package/dist/collection/auth/components/signin-step/signin-step.js.map +0 -1
  241. package/dist/collection/auth/components/signin-strategy/signin-strategy.js +0 -64
  242. package/dist/collection/auth/components/signin-strategy/signin-strategy.js.map +0 -1
  243. package/dist/collection/auth/components/social-logins/logos/apple.js +0 -3
  244. package/dist/collection/auth/components/social-logins/logos/apple.js.map +0 -1
  245. package/dist/collection/auth/components/social-logins/logos/discord.js +0 -3
  246. package/dist/collection/auth/components/social-logins/logos/discord.js.map +0 -1
  247. package/dist/collection/auth/components/social-logins/logos/facebook.js +0 -3
  248. package/dist/collection/auth/components/social-logins/logos/facebook.js.map +0 -1
  249. package/dist/collection/auth/components/social-logins/logos/google.js +0 -3
  250. package/dist/collection/auth/components/social-logins/logos/google.js.map +0 -1
  251. package/dist/collection/auth/components/social-logins/logos/linkedin.js +0 -3
  252. package/dist/collection/auth/components/social-logins/logos/linkedin.js.map +0 -1
  253. package/dist/collection/auth/components/social-logins/social-login-button.css +0 -1
  254. package/dist/collection/auth/components/social-logins/social-login-button.js +0 -188
  255. package/dist/collection/auth/components/social-logins/social-login-button.js.map +0 -1
  256. package/dist/collection/auth/components/submit-button/auth-submit-button.js +0 -62
  257. package/dist/collection/auth/components/submit-button/auth-submit-button.js.map +0 -1
  258. package/dist/collection/auth/error-definitions.js.map +0 -1
  259. package/dist/collection/auth/index.js +0 -14
  260. package/dist/collection/auth/index.js.map +0 -1
  261. package/dist/collection/auth/passkey-auth.js +0 -106
  262. package/dist/collection/auth/passkey-auth.js.map +0 -1
  263. package/dist/collection/auth/store/auth-store.js +0 -175
  264. package/dist/collection/auth/store/auth-store.js.map +0 -1
  265. package/dist/collection/collection-manifest.json +0 -46
  266. package/dist/collection/globalScript.js +0 -18
  267. package/dist/collection/globalScript.js.map +0 -1
  268. package/dist/collection/i18n.js +0 -31
  269. package/dist/collection/i18n.js.map +0 -1
  270. package/dist/collection/index.js +0 -16
  271. package/dist/collection/index.js.map +0 -1
  272. package/dist/collection/locales/de.json +0 -131
  273. package/dist/collection/locales/en.json +0 -131
  274. package/dist/collection/locales/fr.json +0 -131
  275. package/dist/collection/locales/it.json +0 -131
  276. package/dist/collection/locales/nl_be.json +0 -131
  277. package/dist/collection/locales/ro.json +0 -131
  278. package/dist/collection/logger.js +0 -106
  279. package/dist/collection/logger.js.map +0 -1
  280. package/dist/collection/newsletter/api/newsletters.js +0 -189
  281. package/dist/collection/newsletter/api/newsletters.js.map +0 -1
  282. package/dist/collection/newsletter/components/helpers.js +0 -5
  283. package/dist/collection/newsletter/components/helpers.js.map +0 -1
  284. package/dist/collection/newsletter/components/logout-button/logout-button.js +0 -48
  285. package/dist/collection/newsletter/components/logout-button/logout-button.js.map +0 -1
  286. package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +0 -163
  287. package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js.map +0 -1
  288. package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js +0 -164
  289. package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js.map +0 -1
  290. package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js +0 -231
  291. package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js.map +0 -1
  292. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js +0 -79
  293. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js.map +0 -1
  294. package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js +0 -19
  295. package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js.map +0 -1
  296. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js +0 -144
  297. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js.map +0 -1
  298. package/dist/collection/newsletter/index.js +0 -11
  299. package/dist/collection/newsletter/index.js.map +0 -1
  300. package/dist/collection/newsletter/newsletter-helpers.js +0 -268
  301. package/dist/collection/newsletter/newsletter-helpers.js.map +0 -1
  302. package/dist/collection/newsletter/store/newsletter-store.js +0 -24
  303. package/dist/collection/newsletter/store/newsletter-store.js.map +0 -1
  304. package/dist/collection/profile/api/profile.js +0 -156
  305. package/dist/collection/profile/api/profile.js.map +0 -1
  306. package/dist/collection/profile/components/field/field.css +0 -1
  307. package/dist/collection/profile/components/field/field.js +0 -359
  308. package/dist/collection/profile/components/field/field.js.map +0 -1
  309. package/dist/collection/profile/components/full-profile/full-profile.css +0 -1
  310. package/dist/collection/profile/components/full-profile/full-profile.js +0 -77
  311. package/dist/collection/profile/components/full-profile/full-profile.js.map +0 -1
  312. package/dist/collection/profile/components/profile/profile.js +0 -189
  313. package/dist/collection/profile/components/profile/profile.js.map +0 -1
  314. package/dist/collection/profile/components/raw-field/raw-field.js +0 -697
  315. package/dist/collection/profile/components/raw-field/raw-field.js.map +0 -1
  316. package/dist/collection/profile/components/raw-input-fields/Input.js +0 -3
  317. package/dist/collection/profile/components/raw-input-fields/Input.js.map +0 -1
  318. package/dist/collection/profile/components/raw-input-fields/MultiSelect.js +0 -8
  319. package/dist/collection/profile/components/raw-input-fields/MultiSelect.js.map +0 -1
  320. package/dist/collection/profile/components/raw-input-fields/RadioGroup.js +0 -8
  321. package/dist/collection/profile/components/raw-input-fields/RadioGroup.js.map +0 -1
  322. package/dist/collection/profile/components/raw-input-fields/Select.js +0 -11
  323. package/dist/collection/profile/components/raw-input-fields/Select.js.map +0 -1
  324. package/dist/collection/profile/components/raw-input-fields/Textarea.js +0 -3
  325. package/dist/collection/profile/components/raw-input-fields/Textarea.js.map +0 -1
  326. package/dist/collection/profile/components/submit-button/profile-submit-button.js +0 -17
  327. package/dist/collection/profile/components/submit-button/profile-submit-button.js.map +0 -1
  328. package/dist/collection/profile/index.js +0 -13
  329. package/dist/collection/profile/index.js.map +0 -1
  330. package/dist/collection/profile/profile-helpers.js +0 -31
  331. package/dist/collection/profile/profile-helpers.js.map +0 -1
  332. package/dist/collection/profile/store/profile-store.js +0 -15
  333. package/dist/collection/profile/store/profile-store.js.map +0 -1
  334. package/dist/collection/sdk.css +0 -39
  335. package/dist/collection/shared/component-utils.js +0 -28
  336. package/dist/collection/shared/component-utils.js.map +0 -1
  337. package/dist/collection/shared/components/conditional-render/conditional-render.js +0 -177
  338. package/dist/collection/shared/components/conditional-render/conditional-render.js.map +0 -1
  339. package/dist/collection/shared/components/config/config.js +0 -260
  340. package/dist/collection/shared/components/config/config.js.map +0 -1
  341. package/dist/collection/shared/components/email-field/email-field.js +0 -161
  342. package/dist/collection/shared/components/email-field/email-field.js.map +0 -1
  343. package/dist/collection/shared/components/error-message/error-message.js +0 -141
  344. package/dist/collection/shared/components/error-message/error-message.js.map +0 -1
  345. package/dist/collection/shared/components/flash-message/close-icon.js +0 -3
  346. package/dist/collection/shared/components/flash-message/close-icon.js.map +0 -1
  347. package/dist/collection/shared/components/flash-message/flash-message.js +0 -69
  348. package/dist/collection/shared/components/flash-message/flash-message.js.map +0 -1
  349. package/dist/collection/shared/components/spinner/spinner.css +0 -1
  350. package/dist/collection/shared/components/spinner/spinner.js +0 -19
  351. package/dist/collection/shared/components/spinner/spinner.js.map +0 -1
  352. package/dist/collection/shared/components/submit-button/context.js +0 -10
  353. package/dist/collection/shared/components/submit-button/context.js.map +0 -1
  354. package/dist/collection/shared/components/submit-button/submit-button.js +0 -186
  355. package/dist/collection/shared/components/submit-button/submit-button.js.map +0 -1
  356. package/dist/collection/shared/store/flash-store.js +0 -43
  357. package/dist/collection/shared/store/flash-store.js.map +0 -1
  358. package/dist/collection/shared/store/unidy-store.js +0 -33
  359. package/dist/collection/shared/store/unidy-store.js.map +0 -1
  360. package/dist/collection/ticketable/api/get-with-schema.js +0 -35
  361. package/dist/collection/ticketable/api/get-with-schema.js.map +0 -1
  362. package/dist/collection/ticketable/api/schemas.js +0 -12
  363. package/dist/collection/ticketable/api/schemas.js.map +0 -1
  364. package/dist/collection/ticketable/api/subscriptions.js +0 -47
  365. package/dist/collection/ticketable/api/subscriptions.js.map +0 -1
  366. package/dist/collection/ticketable/api/tickets.js +0 -48
  367. package/dist/collection/ticketable/api/tickets.js.map +0 -1
  368. package/dist/collection/ticketable/components/pagination/pagination-button.js +0 -108
  369. package/dist/collection/ticketable/components/pagination/pagination-button.js.map +0 -1
  370. package/dist/collection/ticketable/components/pagination/pagination-page.js +0 -69
  371. package/dist/collection/ticketable/components/pagination/pagination-page.js.map +0 -1
  372. package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js +0 -54
  373. package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js.map +0 -1
  374. package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +0 -442
  375. package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +0 -1
  376. package/dist/collection/ticketable/index.js +0 -13
  377. package/dist/collection/ticketable/index.js.map +0 -1
  378. package/dist/collection/ticketable/store/pagination-store.js +0 -9
  379. package/dist/collection/ticketable/store/pagination-store.js.map +0 -1
  380. package/dist/components/auth-store.js.map +0 -1
  381. package/dist/components/auth.js +0 -572
  382. package/dist/components/auth.js.map +0 -1
  383. package/dist/components/component-utils.js +0 -32
  384. package/dist/components/component-utils.js.map +0 -1
  385. package/dist/components/exports.js +0 -4106
  386. package/dist/components/exports.js.map +0 -1
  387. package/dist/components/field.js +0 -144
  388. package/dist/components/field.js.map +0 -1
  389. package/dist/components/flash-store.js.map +0 -1
  390. package/dist/components/helpers.js +0 -9
  391. package/dist/components/helpers.js.map +0 -1
  392. package/dist/components/helpers2.js +0 -9
  393. package/dist/components/helpers2.js.map +0 -1
  394. package/dist/components/i18n.js.map +0 -1
  395. package/dist/components/index.js +0 -5902
  396. package/dist/components/index.js.map +0 -1
  397. package/dist/components/index2.js +0 -5245
  398. package/dist/components/index2.js.map +0 -1
  399. package/dist/components/index3.js +0 -212
  400. package/dist/components/index3.js.map +0 -1
  401. package/dist/components/logger.js +0 -111
  402. package/dist/components/logger.js.map +0 -1
  403. package/dist/components/newsletter-helpers.js +0 -269
  404. package/dist/components/newsletter-helpers.js.map +0 -1
  405. package/dist/components/newsletter-store.js +0 -24
  406. package/dist/components/newsletter-store.js.map +0 -1
  407. package/dist/components/pagination-store.js +0 -14
  408. package/dist/components/pagination-store.js.map +0 -1
  409. package/dist/components/profile-helpers.js.map +0 -1
  410. package/dist/components/profile-store.js.map +0 -1
  411. package/dist/components/profile.js.map +0 -1
  412. package/dist/components/raw-field.js.map +0 -1
  413. package/dist/components/spinner.js +0 -35
  414. package/dist/components/spinner.js.map +0 -1
  415. package/dist/components/submit-button.js +0 -229
  416. package/dist/components/submit-button.js.map +0 -1
  417. package/dist/components/u-conditional-render.js +0 -120
  418. package/dist/components/u-conditional-render.js.map +0 -1
  419. package/dist/components/u-config.js +0 -113
  420. package/dist/components/u-config.js.map +0 -1
  421. package/dist/components/u-email-field.js +0 -98
  422. package/dist/components/u-email-field.js.map +0 -1
  423. package/dist/components/u-error-message.js +0 -105
  424. package/dist/components/u-error-message.js.map +0 -1
  425. package/dist/components/u-field.js +0 -9
  426. package/dist/components/u-field.js.map +0 -1
  427. package/dist/components/u-flash-message.js +0 -55
  428. package/dist/components/u-flash-message.js.map +0 -1
  429. package/dist/components/u-full-profile.js +0 -86
  430. package/dist/components/u-full-profile.js.map +0 -1
  431. package/dist/components/u-logout-button.js +0 -53
  432. package/dist/components/u-logout-button.js.map +0 -1
  433. package/dist/components/u-magic-code-field.js +0 -106
  434. package/dist/components/u-magic-code-field.js.map +0 -1
  435. package/dist/components/u-missing-field.js +0 -57
  436. package/dist/components/u-missing-field.js.map +0 -1
  437. package/dist/components/u-missing-fields-submit-button.js +0 -70
  438. package/dist/components/u-missing-fields-submit-button.js.map +0 -1
  439. package/dist/components/u-newsletter-checkbox.js +0 -91
  440. package/dist/components/u-newsletter-checkbox.js.map +0 -1
  441. package/dist/components/u-newsletter-logout-button.js +0 -51
  442. package/dist/components/u-newsletter-logout-button.js.map +0 -1
  443. package/dist/components/u-newsletter-preference-checkbox.js +0 -137
  444. package/dist/components/u-newsletter-preference-checkbox.js.map +0 -1
  445. package/dist/components/u-newsletter-resend-doi-button.js +0 -67
  446. package/dist/components/u-newsletter-resend-doi-button.js.map +0 -1
  447. package/dist/components/u-newsletter-root.js +0 -104
  448. package/dist/components/u-newsletter-root.js.map +0 -1
  449. package/dist/components/u-newsletter-toggle-subscription-button.js +0 -94
  450. package/dist/components/u-newsletter-toggle-subscription-button.js.map +0 -1
  451. package/dist/components/u-pagination-button.js +0 -86
  452. package/dist/components/u-pagination-button.js.map +0 -1
  453. package/dist/components/u-pagination-page.js +0 -66
  454. package/dist/components/u-pagination-page.js.map +0 -1
  455. package/dist/components/u-passkey.js +0 -65
  456. package/dist/components/u-passkey.js.map +0 -1
  457. package/dist/components/u-password-field.js +0 -125
  458. package/dist/components/u-password-field.js.map +0 -1
  459. package/dist/components/u-profile.js +0 -9
  460. package/dist/components/u-profile.js.map +0 -1
  461. package/dist/components/u-raw-field.js +0 -9
  462. package/dist/components/u-raw-field.js.map +0 -1
  463. package/dist/components/u-registration-button.js +0 -70
  464. package/dist/components/u-registration-button.js.map +0 -1
  465. package/dist/components/u-reset-password-button.js +0 -63
  466. package/dist/components/u-reset-password-button.js.map +0 -1
  467. package/dist/components/u-send-magic-code-button.js +0 -85
  468. package/dist/components/u-send-magic-code-button.js.map +0 -1
  469. package/dist/components/u-signed-in.js +0 -44
  470. package/dist/components/u-signed-in.js.map +0 -1
  471. package/dist/components/u-signin-root.js +0 -63
  472. package/dist/components/u-signin-root.js.map +0 -1
  473. package/dist/components/u-signin-step.js +0 -84
  474. package/dist/components/u-signin-step.js.map +0 -1
  475. package/dist/components/u-signin-strategy.js +0 -50
  476. package/dist/components/u-signin-strategy.js.map +0 -1
  477. package/dist/components/u-social-login-button.js +0 -125
  478. package/dist/components/u-social-login-button.js.map +0 -1
  479. package/dist/components/u-spinner.js +0 -9
  480. package/dist/components/u-spinner.js.map +0 -1
  481. package/dist/components/u-submit-button.js +0 -9
  482. package/dist/components/u-submit-button.js.map +0 -1
  483. package/dist/components/u-ticketable-list.js +0 -6113
  484. package/dist/components/u-ticketable-list.js.map +0 -1
  485. package/dist/components/unidy-store.js.map +0 -1
  486. package/dist/esm/app-globals-CPU9ZcqZ.js +0 -8
  487. package/dist/esm/app-globals-CPU9ZcqZ.js.map +0 -1
  488. package/dist/esm/auth-store-BMqUdTpC.js +0 -179
  489. package/dist/esm/flash-store-CEvWSG0c.js +0 -47
  490. package/dist/esm/i18n-BR-AGAnn.js +0 -3221
  491. package/dist/esm/i18n-BR-AGAnn.js.map +0 -1
  492. package/dist/esm/index-Ci3aTmzp.js +0 -12007
  493. package/dist/esm/index-Ci3aTmzp.js.map +0 -1
  494. package/dist/esm/index-DKaIwo59.js +0 -5243
  495. package/dist/esm/index-DKaIwo59.js.map +0 -1
  496. package/dist/esm/index.js +0 -40
  497. package/dist/esm/index.js.map +0 -1
  498. package/dist/esm/loader.js +0 -12
  499. package/dist/esm/loader.js.map +0 -1
  500. package/dist/esm/newsletter-helpers-Dh9k-4Ph.js.map +0 -1
  501. package/dist/esm/newsletter-store-BYmuLQg8.js +0 -24
  502. package/dist/esm/newsletter-store-BYmuLQg8.js.map +0 -1
  503. package/dist/esm/pagination-store-DzdJOp-n.js +0 -14
  504. package/dist/esm/pagination-store-DzdJOp-n.js.map +0 -1
  505. package/dist/esm/profile-helpers-7onubaoR.js +0 -36
  506. package/dist/esm/profile-store-RmZB2PTc.js +0 -18
  507. package/dist/esm/sdk.js +0 -22
  508. package/dist/esm/sdk.js.map +0 -1
  509. package/dist/esm/u-conditional-render.entry.js.map +0 -1
  510. package/dist/esm/u-config.entry.js.map +0 -1
  511. package/dist/esm/u-email-field.entry.js +0 -73
  512. package/dist/esm/u-email-field.entry.js.map +0 -1
  513. package/dist/esm/u-error-message.entry.js.map +0 -1
  514. package/dist/esm/u-field.u-raw-field.entry.js.map +0 -1
  515. package/dist/esm/u-field_2.entry.js +0 -372
  516. package/dist/esm/u-flash-message.entry.js +0 -32
  517. package/dist/esm/u-flash-message.entry.js.map +0 -1
  518. package/dist/esm/u-full-profile.entry.js +0 -34
  519. package/dist/esm/u-full-profile.entry.js.map +0 -1
  520. package/dist/esm/u-logout-button.entry.js.map +0 -1
  521. package/dist/esm/u-magic-code-field.entry.js.map +0 -1
  522. package/dist/esm/u-missing-field.entry.js.map +0 -1
  523. package/dist/esm/u-missing-fields-submit-button.entry.js.map +0 -1
  524. package/dist/esm/u-newsletter-checkbox.entry.js.map +0 -1
  525. package/dist/esm/u-newsletter-logout-button.entry.js.map +0 -1
  526. package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +0 -1
  527. package/dist/esm/u-newsletter-resend-doi-button.entry.js +0 -44
  528. package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +0 -1
  529. package/dist/esm/u-newsletter-root.entry.js.map +0 -1
  530. package/dist/esm/u-newsletter-toggle-subscription-button.entry.js +0 -68
  531. package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +0 -1
  532. package/dist/esm/u-pagination-button.entry.js.map +0 -1
  533. package/dist/esm/u-pagination-page.entry.js.map +0 -1
  534. package/dist/esm/u-passkey.entry.js.map +0 -1
  535. package/dist/esm/u-password-field.entry.js.map +0 -1
  536. package/dist/esm/u-profile.u-submit-button.entry.js.map +0 -1
  537. package/dist/esm/u-profile_2.entry.js +0 -308
  538. package/dist/esm/u-registration-button.entry.js.map +0 -1
  539. package/dist/esm/u-reset-password-button.entry.js.map +0 -1
  540. package/dist/esm/u-send-magic-code-button.entry.js.map +0 -1
  541. package/dist/esm/u-signed-in.entry.js.map +0 -1
  542. package/dist/esm/u-signin-root.entry.js.map +0 -1
  543. package/dist/esm/u-signin-step.entry.js.map +0 -1
  544. package/dist/esm/u-signin-strategy.entry.js.map +0 -1
  545. package/dist/esm/u-social-login-button.entry.js.map +0 -1
  546. package/dist/esm/u-spinner.entry.js.map +0 -1
  547. package/dist/esm/u-ticketable-list.entry.js.map +0 -1
  548. package/dist/esm/unidy-store-BldTAtO0.js +0 -37
  549. package/dist/index.cjs.js +0 -1
  550. package/dist/index.js +0 -1
  551. package/dist/sdk/p-10e06612.entry.js +0 -2
  552. package/dist/sdk/p-10e06612.entry.js.map +0 -1
  553. package/dist/sdk/p-16f86a4d.entry.js +0 -2
  554. package/dist/sdk/p-16f86a4d.entry.js.map +0 -1
  555. package/dist/sdk/p-20240b02.entry.js +0 -2
  556. package/dist/sdk/p-20240b02.entry.js.map +0 -1
  557. package/dist/sdk/p-26f3d8db.entry.js +0 -2
  558. package/dist/sdk/p-26f3d8db.entry.js.map +0 -1
  559. package/dist/sdk/p-2da4497a.entry.js +0 -2
  560. package/dist/sdk/p-2da4497a.entry.js.map +0 -1
  561. package/dist/sdk/p-3f4c947d.entry.js +0 -2
  562. package/dist/sdk/p-3f4c947d.entry.js.map +0 -1
  563. package/dist/sdk/p-431ec460.entry.js +0 -2
  564. package/dist/sdk/p-431ec460.entry.js.map +0 -1
  565. package/dist/sdk/p-4f54194a.entry.js +0 -2
  566. package/dist/sdk/p-4f54194a.entry.js.map +0 -1
  567. package/dist/sdk/p-552056e7.entry.js +0 -2
  568. package/dist/sdk/p-552056e7.entry.js.map +0 -1
  569. package/dist/sdk/p-5da49d00.entry.js +0 -2
  570. package/dist/sdk/p-5da49d00.entry.js.map +0 -1
  571. package/dist/sdk/p-67096601.entry.js +0 -2
  572. package/dist/sdk/p-67096601.entry.js.map +0 -1
  573. package/dist/sdk/p-6893d167.entry.js +0 -2
  574. package/dist/sdk/p-6893d167.entry.js.map +0 -1
  575. package/dist/sdk/p-6e3c210c.entry.js +0 -2
  576. package/dist/sdk/p-6e3c210c.entry.js.map +0 -1
  577. package/dist/sdk/p-6febeead.entry.js +0 -2
  578. package/dist/sdk/p-6febeead.entry.js.map +0 -1
  579. package/dist/sdk/p-73c2ec89.entry.js +0 -2
  580. package/dist/sdk/p-73c2ec89.entry.js.map +0 -1
  581. package/dist/sdk/p-745742f1.entry.js +0 -2
  582. package/dist/sdk/p-745742f1.entry.js.map +0 -1
  583. package/dist/sdk/p-7a7c0db2.entry.js +0 -2
  584. package/dist/sdk/p-7a7c0db2.entry.js.map +0 -1
  585. package/dist/sdk/p-8d787494.entry.js +0 -2
  586. package/dist/sdk/p-8d787494.entry.js.map +0 -1
  587. package/dist/sdk/p-94dde7e5.entry.js +0 -2
  588. package/dist/sdk/p-94dde7e5.entry.js.map +0 -1
  589. package/dist/sdk/p-97d8ae02.entry.js +0 -2
  590. package/dist/sdk/p-97d8ae02.entry.js.map +0 -1
  591. package/dist/sdk/p-9da4dd6d.entry.js +0 -2
  592. package/dist/sdk/p-9da4dd6d.entry.js.map +0 -1
  593. package/dist/sdk/p-BZ1kW_eK.js +0 -2
  594. package/dist/sdk/p-BZ1kW_eK.js.map +0 -1
  595. package/dist/sdk/p-BlOjABPD.js +0 -2
  596. package/dist/sdk/p-BlOjABPD.js.map +0 -1
  597. package/dist/sdk/p-BqFCd65h.js +0 -2
  598. package/dist/sdk/p-BqFCd65h.js.map +0 -1
  599. package/dist/sdk/p-C0feI0p8.js +0 -2
  600. package/dist/sdk/p-C0feI0p8.js.map +0 -1
  601. package/dist/sdk/p-CDtLILSR.js +0 -2
  602. package/dist/sdk/p-CDtLILSR.js.map +0 -1
  603. package/dist/sdk/p-CFiZLMAA.js +0 -2
  604. package/dist/sdk/p-CFiZLMAA.js.map +0 -1
  605. package/dist/sdk/p-CR1oWC4S.js +0 -2
  606. package/dist/sdk/p-CR1oWC4S.js.map +0 -1
  607. package/dist/sdk/p-Ce8zGAi1.js +0 -2
  608. package/dist/sdk/p-Ce8zGAi1.js.map +0 -1
  609. package/dist/sdk/p-Ci3aTmzp.js +0 -3
  610. package/dist/sdk/p-Ci3aTmzp.js.map +0 -1
  611. package/dist/sdk/p-D1lzXl_Z.js +0 -2
  612. package/dist/sdk/p-D1lzXl_Z.js.map +0 -1
  613. package/dist/sdk/p-D4B6Zkq_.js +0 -2
  614. package/dist/sdk/p-D4B6Zkq_.js.map +0 -1
  615. package/dist/sdk/p-D8RGdjD3.js +0 -2
  616. package/dist/sdk/p-D8RGdjD3.js.map +0 -1
  617. package/dist/sdk/p-DGqadgLO.js +0 -2
  618. package/dist/sdk/p-DGqadgLO.js.map +0 -1
  619. package/dist/sdk/p-DSwwVdp1.js +0 -2
  620. package/dist/sdk/p-DSwwVdp1.js.map +0 -1
  621. package/dist/sdk/p-DUHc_Cx7.js +0 -2
  622. package/dist/sdk/p-DUHc_Cx7.js.map +0 -1
  623. package/dist/sdk/p-DYtgart8.js +0 -2
  624. package/dist/sdk/p-DYtgart8.js.map +0 -1
  625. package/dist/sdk/p-DsSffQBc.js +0 -2
  626. package/dist/sdk/p-DsSffQBc.js.map +0 -1
  627. package/dist/sdk/p-b79abe80.entry.js +0 -2
  628. package/dist/sdk/p-b79abe80.entry.js.map +0 -1
  629. package/dist/sdk/p-bb5ae222.entry.js +0 -2
  630. package/dist/sdk/p-bb5ae222.entry.js.map +0 -1
  631. package/dist/sdk/p-bbbec3d4.entry.js +0 -2
  632. package/dist/sdk/p-bbbec3d4.entry.js.map +0 -1
  633. package/dist/sdk/p-c2b6c674.entry.js +0 -2
  634. package/dist/sdk/p-c2b6c674.entry.js.map +0 -1
  635. package/dist/sdk/p-c2fba7c8.entry.js +0 -2
  636. package/dist/sdk/p-c2fba7c8.entry.js.map +0 -1
  637. package/dist/sdk/p-cba5d81e.entry.js +0 -2
  638. package/dist/sdk/p-cba5d81e.entry.js.map +0 -1
  639. package/dist/sdk/p-d2c6179a.entry.js +0 -2
  640. package/dist/sdk/p-d2c6179a.entry.js.map +0 -1
  641. package/dist/sdk/p-dcd4e8f0.entry.js +0 -2
  642. package/dist/sdk/p-dcd4e8f0.entry.js.map +0 -1
  643. package/dist/sdk/p-eaedb08e.entry.js +0 -2
  644. package/dist/sdk/p-eaedb08e.entry.js.map +0 -1
  645. package/dist/sdk/p-f0aecd55.entry.js +0 -2
  646. package/dist/sdk/p-f0aecd55.entry.js.map +0 -1
  647. package/dist/sdk/p-fc51c88d.entry.js +0 -2
  648. package/dist/sdk/p-fc51c88d.entry.js.map +0 -1
  649. package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +0 -1
  650. package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +0 -1
  651. package/loader/cdn.js +0 -1
  652. package/loader/index.cjs.js +0 -1
  653. package/loader/index.d.ts +0 -24
  654. package/loader/index.es2017.js +0 -1
  655. package/loader/index.js +0 -2
  656. /package/dist/{esm → sdk}/component-utils-D1lzXl_Z.js +0 -0
  657. /package/dist/{esm → sdk}/component-utils-D1lzXl_Z.js.map +0 -0
  658. /package/dist/{esm → sdk}/helpers-BqFCd65h.js +0 -0
  659. /package/dist/{esm → sdk}/helpers-BqFCd65h.js.map +0 -0
  660. /package/dist/{esm → sdk}/helpers-DUHc_Cx7.js +0 -0
  661. /package/dist/{esm → sdk}/helpers-DUHc_Cx7.js.map +0 -0
@@ -1,2 +1,22 @@
1
- export{A as ApiClient,a as AuthService,N as NewsletterService,c as PaginationMetaSchema,d as PaginationParamsSchema,P as ProfileService,S as SchemaValidationErrorSchema,e as SubscriptionsService,T as TicketsService,U as UnidyClient,b as UserProfileSchema,g as getUnidyClient}from"./p-CR1oWC4S.js";export{s as authState,a as authStore,m as missingFieldNames,b as onAuthChange}from"./p-DSwwVdp1.js";export{A as Auth}from"./p-DGqadgLO.js";export{a as onProfileChange,s as profileState,p as profileStore}from"./p-C0feI0p8.js";export{c as createPaginationStore}from"./p-Ce8zGAi1.js";export{F as Flash}from"./p-DYtgart8.js";import"./p-D4B6Zkq_.js";import"./p-Ci3aTmzp.js";import"./p-BlOjABPD.js";import"./p-BZ1kW_eK.js";import"./p-D1lzXl_Z.js";const o={EMAIL:{NOT_FOUND:"account_not_found"},PASSWORD:{INVALID:"invalid_password",NOT_SET:"password_not_set",RESET_PASSWORD_ALREADY_SENT:"reset_password_already_sent"},MAGIC_CODE:{RECENTLY_CREATED:"magic_code_recently_created",EXPIRED:"magic_code_expired",USED:"magic_code_used",NOT_VALID:"magic_code_not_valid"},PASSWORD_RESET:{PASSWORD_TOO_WEAK:"password_too_weak"},GENERAL:{ACCOUNT_LOCKED:"account_locked",SIGN_IN_EXPIRED:"sign_in_expired"}};export{o as AUTH_ERROR_CODES};
2
- //# sourceMappingURL=index.esm.js.map
1
+ export { A as ApiClient, a as AuthService, N as NewsletterService, c as PaginationMetaSchema, d as PaginationParamsSchema, P as ProfileService, S as SchemaValidationErrorSchema, e as SubscriptionsService, T as TicketsService, U as UnidyClient, b as UserProfileSchema, f as createPaginationStore, g as getUnidyClient } from './index-gEcJztft.js';
2
+ export { A as AUTH_ERROR_CODES } from './index-Cz3idqu9.js';
3
+ export { F as Flash } from './flash-store-DNcSEn2p.js';
4
+ export { s as authState, a as authStore, m as missingFieldNames, b as onAuthChange } from './auth-store-CapiC8gJ.js';
5
+ export { A as Auth } from './auth-Che07PeV.js';
6
+ export { a as onProfileChange, s as profileState, p as profileStore } from './profile-store-DD6sq42i.js';
7
+ import './index-BqL27K_R.js';
8
+ import './i18n-BCI_ARJL.js';
9
+ import './unidy-store-BwZym11Y.js';
10
+ import './index-BnBstyfp.js';
11
+ import './component-utils-D1lzXl_Z.js';
12
+
13
+ /**
14
+ * @fileoverview entry point for your component library
15
+ *
16
+ * This is the entry point for your component library. Use this file to export utilities,
17
+ * constants or data structure that accompany your components.
18
+ *
19
+ * DO NOT use this file to export your components. Instead, use the recommended approaches
20
+ * to consume components of this package as outlined in the `README.md`.
21
+ */
22
+ //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["src/auth/error-definitions.ts"],"sourcesContent":["export const AUTH_ERROR_CODES = {\n EMAIL: {\n NOT_FOUND: \"account_not_found\",\n },\n PASSWORD: {\n INVALID: \"invalid_password\",\n NOT_SET: \"password_not_set\",\n RESET_PASSWORD_ALREADY_SENT: \"reset_password_already_sent\",\n },\n MAGIC_CODE: {\n RECENTLY_CREATED: \"magic_code_recently_created\",\n EXPIRED: \"magic_code_expired\",\n USED: \"magic_code_used\",\n NOT_VALID: \"magic_code_not_valid\",\n },\n PASSWORD_RESET: {\n // TODO: figure out how to handle password requirements --> it should be same as in Unidy\n // just a placeholder for now\n PASSWORD_TOO_WEAK: \"password_too_weak\",\n },\n GENERAL: {\n ACCOUNT_LOCKED: \"account_locked\",\n SIGN_IN_EXPIRED: \"sign_in_expired\",\n },\n} as const;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAa,MAAA,gBAAgB,GAAG;AAC9B,IAAA,KAAK,EAAE;AACL,QAAA,SAAS,EAAE,mBAAmB;AAC/B,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,2BAA2B,EAAE,6BAA6B;AAC3D,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,gBAAgB,EAAE,6BAA6B;AAC/C,QAAA,OAAO,EAAE,oBAAoB;AAC7B,QAAA,IAAI,EAAE,iBAAiB;AACvB,QAAA,SAAS,EAAE,sBAAsB;AAClC,KAAA;AACD,IAAA,cAAc,EAAE;;;AAGd,QAAA,iBAAiB,EAAE,mBAAmB;AACvC,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,cAAc,EAAE,gBAAgB;AAChC,QAAA,eAAe,EAAE,iBAAiB;AACnC,KAAA;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["src/index.ts"],"sourcesContent":["/**\n * @fileoverview entry point for your component library\n *\n * This is the entry point for your component library. Use this file to export utilities,\n * constants or data structure that accompany your components.\n *\n * DO NOT use this file to export your components. Instead, use the recommended approaches\n * to consume components of this package as outlined in the `README.md`.\n */\n\nexport * from \"./api\";\nexport * from \"./auth\";\nexport * from \"./newsletter\";\nexport * from \"./profile\";\nexport * from \"./ticketable\";\nexport type * from \"./components.d\";\nexport { Flash } from \"./shared/store/flash-store\";\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;AAQG"}
@@ -1 +1 @@
1
- {"version":3,"file":"loader.esm.js","sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"names":[],"mappings":";;;;AAGY,MAAC,oBAAoB,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK;AAC5D,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,SAAS;AACrD,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D;;;;"}
1
+ {"version":3,"file":"loader.esm.js","sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"names":[],"mappings":";;;AAGY,MAAC,oBAAoB,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK;AAC5D,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,SAAS;AACrD,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D;;;;"}
@@ -107,6 +107,7 @@
107
107
  "already_subscribed": "Bereits abonniert",
108
108
  "email_required": "Bitte geben Sie Ihre E-Mail-Adresse ein",
109
109
  "invalid_email": "Ungültige E-Mail-Adresse",
110
+ "login_email_not_found": "Abonnement mit dieser E-Mail-Adresse existiert nicht",
110
111
  "newsletter_not_found": "Newsletter nicht gefunden",
111
112
  "preferences_not_found": "Präferenz nicht gefunden",
112
113
  "rate_limit_exceeded": "Anfragelimit überschritten. Bitte versuchen Sie es später erneut",
@@ -107,6 +107,7 @@
107
107
  "already_subscribed": "Already subscribed",
108
108
  "email_required": "Please enter your email address",
109
109
  "invalid_email": "Invalid email address",
110
+ "login_email_not_found": "Subscription with this email does not exist",
110
111
  "newsletter_not_found": "Newsletter not found",
111
112
  "preferences_not_found": "Preference not found",
112
113
  "rate_limit_exceeded": "Rate limit exceeded. Please try again later",
@@ -107,6 +107,7 @@
107
107
  "already_subscribed": "Déjà abonné",
108
108
  "email_required": "Veuillez entrer votre adresse e-mail",
109
109
  "invalid_email": "Adresse e-mail invalide",
110
+ "login_email_not_found": "L'abonnement avec cet e-mail n'existe pas",
110
111
  "newsletter_not_found": "Newsletter introuvable",
111
112
  "preferences_not_found": "Préférence introuvable",
112
113
  "rate_limit_exceeded": "Limite de débit dépassée. Veuillez réessayer plus tard",
@@ -107,6 +107,7 @@
107
107
  "already_subscribed": "Già iscritto",
108
108
  "email_required": "Inserisci il tuo indirizzo email",
109
109
  "invalid_email": "Indirizzo email non valido",
110
+ "login_email_not_found": "L'abbonamento con questa email non esiste",
110
111
  "newsletter_not_found": "Newsletter non trovata",
111
112
  "preferences_not_found": "Preferenza non trovata",
112
113
  "rate_limit_exceeded": "Limite di richieste superato. Riprova più tardi",
@@ -107,6 +107,7 @@
107
107
  "already_subscribed": "Al geabonneerd",
108
108
  "email_required": "Voer uw e-mailadres in",
109
109
  "invalid_email": "Ongeldig e-mailadres",
110
+ "login_email_not_found": "Abonnement met dit e-mailadres bestaat niet",
110
111
  "newsletter_not_found": "Nieuwsbrief niet gevonden",
111
112
  "preferences_not_found": "Voorkeur niet gevonden",
112
113
  "rate_limit_exceeded": "Snelheidslimiet overschreden. Probeer het later opnieuw",
@@ -107,6 +107,7 @@
107
107
  "already_subscribed": "Deja abonat",
108
108
  "email_required": "Vă rugăm să introduceți adresa dvs. de e-mail",
109
109
  "invalid_email": "Adresă de e-mail invalidă",
110
+ "login_email_not_found": "Abonamentul cu această adresă de e-mail nu există",
110
111
  "newsletter_not_found": "Newsletter negăsit",
111
112
  "preferences_not_found": "Preferință negăsită",
112
113
  "rate_limit_exceeded": "Limita de rată depășită. Vă rugăm să încercați din nou mai târziu",
@@ -1,9 +1,9 @@
1
- import { g as getUnidyClient } from './index-DKaIwo59.js';
2
- import { A as Auth } from './auth-DLKPv5Zm.js';
3
- import { t } from './i18n-BR-AGAnn.js';
4
- import { e as createLogger } from './index-Ci3aTmzp.js';
5
- import { F as Flash } from './flash-store-CEvWSG0c.js';
6
- import { n as newsletterStore, p as persist } from './newsletter-store-BYmuLQg8.js';
1
+ import { g as getUnidyClient } from './index-gEcJztft.js';
2
+ import { A as Auth } from './auth-Che07PeV.js';
3
+ import { t } from './i18n-BCI_ARJL.js';
4
+ import { i as createLogger } from './index-BqL27K_R.js';
5
+ import { F as Flash } from './flash-store-DNcSEn2p.js';
6
+ import { n as newsletterStore, p as persist } from './newsletter-store-CvULKmsu.js';
7
7
 
8
8
  const logger = createLogger("NewsletterHelpers");
9
9
  const PERSIST_KEY_PREFIX = "unidy_newsletter_";
@@ -39,6 +39,9 @@ async function sendLoginEmail(email) {
39
39
  if (response.status === 204) {
40
40
  Flash.info.addMessage(t("newsletter.success.login_email_sent"));
41
41
  }
42
+ else if (response.status === 404) {
43
+ Flash.error.addMessage(t("newsletter.errors.login_email_not_found"));
44
+ }
42
45
  else {
43
46
  Flash.error.addMessage(t("errors.unknown", { defaultValue: "An unknown error occurred" }));
44
47
  }
@@ -162,7 +165,7 @@ async function subscribeToNewsletter(internalName, email) {
162
165
  }
163
166
  async function createSubscriptions({ email }) {
164
167
  const internalNames = Object.keys(newsletterStore.state.checkedNewsletters);
165
- return handleCreateSubscriptionRequest(email, internalNames, true);
168
+ await handleCreateSubscriptionRequest(email, internalNames, true);
166
169
  }
167
170
  async function deleteSubscription(internalName) {
168
171
  const { preferenceToken } = newsletterStore.state;
@@ -221,6 +224,10 @@ function redirectToAfterConfirmationUrl() {
221
224
  const queryString = params.toString();
222
225
  return queryString ? `${baseUrl}?${queryString}` : baseUrl;
223
226
  }
227
+ function getSubscriptionPreferences(internalName) {
228
+ const subscription = getSubscription(internalName);
229
+ return subscription?.preference_identifiers || [];
230
+ }
224
231
  async function updateSubscriptionPreferences(internalName) {
225
232
  const { preferenceToken } = newsletterStore.state;
226
233
  // Either preference token is needed or the user must be authenticated
@@ -264,6 +271,6 @@ async function updateSubscriptionPreferences(internalName) {
264
271
  }
265
272
 
266
273
  export { isSubscribed as a, subscribeToNewsletter as b, createSubscriptions as c, deleteSubscription as d, fetchSubscriptions as f, isConfirmed as i, newsletterLogout as n, resendDoi as r, sendLoginEmail as s, updateSubscriptionPreferences as u };
267
- //# sourceMappingURL=newsletter-helpers-Dh9k-4Ph.js.map
274
+ //# sourceMappingURL=newsletter-helpers-DEXEBD0F.js.map
268
275
 
269
- //# sourceMappingURL=newsletter-helpers-Dh9k-4Ph.js.map
276
+ //# sourceMappingURL=newsletter-helpers-DEXEBD0F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"newsletter-helpers-DEXEBD0F.js","sources":["src/newsletter/newsletter-helpers.ts"],"sourcesContent":["import { getUnidyClient } from \"../api\";\nimport { Auth } from \"../auth/auth\";\nimport { t } from \"../i18n\";\nimport { createLogger } from \"../logger\";\nimport { Flash } from \"../shared/store/flash-store\";\nimport {\n type CheckedNewsletters,\n type ExistingSubscription,\n type NewsletterErrorIdentifier,\n newsletterStore,\n persist,\n} from \"./store/newsletter-store\";\n\nconst logger = createLogger(\"NewsletterHelpers\");\n\nconst PERSIST_KEY_PREFIX = \"unidy_newsletter_\";\n\nexport function newsletterLogout(): void {\n newsletterStore.state.preferenceToken = \"\";\n newsletterStore.state.existingSubscriptions = [];\n sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}preferenceToken`);\n sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}email`);\n}\n\nexport async function resendDoi(internalName: string): Promise<boolean> {\n const { preferenceToken } = newsletterStore.state;\n\n const authInstance = await Auth.getInstance();\n const idToken = await authInstance.getToken();\n\n const response = await getUnidyClient().newsletters.resendDoi(\n internalName,\n { redirect_to_after_confirmation: redirectToAfterConfirmationUrl() },\n {\n preferenceToken: typeof preferenceToken === \"string\" ? preferenceToken : \"\",\n idToken: typeof idToken === \"string\" ? idToken : \"\",\n },\n );\n\n if (response.status === 204) {\n return true;\n }\n\n if (response.status === 401) {\n Flash.error.addMessage(t(\"newsletter.errors.unauthorized\"));\n newsletterLogout();\n return false;\n }\n\n return false;\n}\n\nexport async function sendLoginEmail(email: string): Promise<void> {\n const response = await getUnidyClient().newsletters.sendLoginEmail({\n email,\n redirect_uri: redirectToAfterConfirmationUrl(),\n });\n\n if (response.status === 204) {\n Flash.info.addMessage(t(\"newsletter.success.login_email_sent\"));\n } else if (response.status === 404) {\n Flash.error.addMessage(t(\"newsletter.errors.login_email_not_found\"));\n } else {\n Flash.error.addMessage(t(\"errors.unknown\", { defaultValue: \"An unknown error occurred\" }));\n }\n}\n\nexport async function fetchSubscriptions(): Promise<void> {\n const { preferenceToken } = newsletterStore.state;\n\n // either preference token is needed or the user must be authenticated\n if (!preferenceToken && !newsletterStore.state.isAuthenticated) {\n logger.error(\"Preference token or authentication is required to fetch subscriptions\");\n return;\n }\n\n const authInstance = await Auth.getInstance();\n const idToken = await authInstance.getToken();\n\n newsletterStore.state.fetchingSubscriptions = true;\n\n const response = await getUnidyClient().newsletters.listSubscriptions({\n preferenceToken,\n idToken: typeof idToken === \"string\" ? idToken : \"\",\n });\n\n newsletterStore.state.fetchingSubscriptions = false;\n\n if (response.status === 401) {\n newsletterLogout();\n Flash.error.addMessage(t(\"newsletter.errors.unauthorized\"));\n return;\n }\n\n if (response.success && response.data) {\n newsletterStore.state.existingSubscriptions = response.data.map(\n (sub): ExistingSubscription => ({\n newsletter_internal_name: sub.newsletter_internal_name,\n confirmed: sub.confirmed_at !== null,\n preference_identifiers: sub.preference_identifiers || [],\n }),\n );\n\n // init checked newsletters and preferences\n const checkedNewsletters: CheckedNewsletters = { ...newsletterStore.state.checkedNewsletters };\n for (const sub of response.data) {\n checkedNewsletters[sub.newsletter_internal_name] = [...(sub.preference_identifiers || [])];\n }\n newsletterStore.state.checkedNewsletters = checkedNewsletters;\n }\n}\n\nasync function handleAlreadySubscribedError(\n email: string,\n errors: Array<{ error_identifier: string; meta: { newsletter_internal_name: string } }>,\n): Promise<void> {\n if (newsletterStore.state.isAuthenticated || newsletterStore.state.preferenceToken) {\n const existingNames = new Set(newsletterStore.state.existingSubscriptions.map((s) => s.newsletter_internal_name));\n\n const newSubscriptions: ExistingSubscription[] = errors\n .filter((err) => err.error_identifier === \"already_subscribed\" && !existingNames.has(err.meta.newsletter_internal_name))\n .map((err) => ({\n newsletter_internal_name: err.meta.newsletter_internal_name,\n confirmed: null,\n preference_identifiers: [],\n }));\n\n if (newSubscriptions.length > 0) {\n newsletterStore.state.existingSubscriptions = [...newsletterStore.state.existingSubscriptions, ...newSubscriptions];\n }\n } else {\n await sendLoginEmail(email);\n }\n}\n\nasync function handleCreateSubscriptionRequest(email: string, internalNames: string[], showSuccessMessage = true): Promise<boolean> {\n const authInstance = await Auth.getInstance();\n const idToken = await authInstance.getToken();\n const { checkedNewsletters } = newsletterStore.state;\n\n const [error, response] = await getUnidyClient().newsletters.createSubscriptions(\n {\n email,\n newsletter_subscriptions: internalNames.map((newsletter) => ({\n newsletter_internal_name: newsletter,\n preference_identifiers: checkedNewsletters[newsletter] || [],\n })),\n redirect_to_after_confirmation: redirectToAfterConfirmationUrl(),\n },\n {\n idToken: typeof idToken === \"string\" ? idToken : \"\",\n },\n );\n\n if (error === null) {\n if (response.data?.results && response.data.results.length > 0) {\n const newSubscriptions: ExistingSubscription[] = response.data.results.map((result) => ({\n newsletter_internal_name: result.newsletter_internal_name,\n confirmed: result.confirmed_at !== null,\n preference_identifiers: result.preference_identifiers || [],\n }));\n\n newsletterStore.state.existingSubscriptions = [...newsletterStore.state.existingSubscriptions, ...newSubscriptions];\n }\n\n if (showSuccessMessage) {\n Flash.success.addMessage(t(\"newsletter.success.subscribe\"));\n }\n\n return true;\n }\n\n if (error === \"unauthorized\") {\n Flash.error.addMessage(t(\"newsletter.errors.unauthorized\"));\n newsletterLogout();\n return false;\n }\n\n if (error === \"newsletter_error\") {\n const errors = response.data?.errors || [];\n const errorMap: Record<string, NewsletterErrorIdentifier> = {};\n\n // special error case which is handled differently: if user is not authenticated, we send a login email, otherwise we add the\n // already_subscribed subscriptions to the existing subscriptions\n const hasAlreadySubscribedError = errors.some((err) => err.error_identifier === \"already_subscribed\");\n if (hasAlreadySubscribedError) {\n await handleAlreadySubscribedError(email, errors);\n }\n\n const newsletterNotFoundError = errors.some((err) => err.error_identifier === \"newsletter_not_found\");\n if (newsletterNotFoundError) {\n errorMap.general = \"newsletter_not_found\";\n }\n\n const hasInvalidEmailError = errors.some(\n (err) => err.error_identifier === \"validation_error\" && err.error_details && \"email\" in err.error_details,\n );\n\n if (hasInvalidEmailError) {\n errorMap.email = \"invalid_email\";\n } else {\n for (const err of errors) {\n errorMap[err.meta.newsletter_internal_name] = err.error_identifier as NewsletterErrorIdentifier;\n }\n }\n\n newsletterStore.state.errors = errorMap;\n } else {\n Flash.error.addMessage(t(\"errors.unknown\", { defaultValue: \"An unknown error occurred\" }));\n }\n\n return false;\n}\n\nexport async function subscribeToNewsletter(internalName: string, email: string): Promise<boolean> {\n return handleCreateSubscriptionRequest(email, [internalName], false);\n}\n\nexport async function createSubscriptions({ email }: { email: string }): Promise<void> {\n const internalNames = Object.keys(newsletterStore.state.checkedNewsletters);\n await handleCreateSubscriptionRequest(email, internalNames, true);\n}\n\nexport async function deleteSubscription(internalName: string): Promise<boolean> {\n const { preferenceToken } = newsletterStore.state;\n\n // either preference token is needed or the user must be authenticated to delete a subscription\n if (!preferenceToken && !newsletterStore.state.isAuthenticated) {\n logger.error(\"Preference token or authentication is required to delete a subscription\");\n return false;\n }\n\n const authInstance = await Auth.getInstance();\n const idToken = await authInstance.getToken();\n\n const response = await getUnidyClient().newsletters.deleteSubscription(internalName, {\n preferenceToken,\n idToken: typeof idToken === \"string\" ? idToken : \"\",\n });\n\n if (response.status === 200 && response.data?.new_preference_token) {\n // if user is not authenticated, we need to store the new preference token which is used for the next request\n if (!newsletterStore.state.isAuthenticated) {\n newsletterStore.state.preferenceToken = response.data.new_preference_token;\n persist(\"preferenceToken\");\n }\n\n newsletterStore.state.existingSubscriptions = newsletterStore.state.existingSubscriptions.filter(\n (sub) => sub.newsletter_internal_name !== internalName,\n );\n return true;\n }\n\n if (response.status === 204) {\n newsletterLogout();\n\n newsletterStore.state.checkedNewsletters = {};\n return true;\n }\n\n if (response.status === 401) {\n Flash.error.addMessage(t(\"newsletter.errors.unauthorized\"));\n newsletterLogout();\n return false;\n }\n\n if (response.status === 422) {\n return false;\n }\n\n Flash.error.addMessage(t(\"errors.unknown\", { defaultValue: \"An unknown error occurred\" }));\n return false;\n}\n\nexport function getSubscription(internalName: string): ExistingSubscription | undefined {\n return newsletterStore.state.existingSubscriptions.find((sub) => sub.newsletter_internal_name === internalName);\n}\n\nexport function isSubscribed(internalName: string): boolean {\n return newsletterStore.state.existingSubscriptions.some((sub) => sub.newsletter_internal_name === internalName);\n}\n\nexport function isConfirmed(internalName: string): boolean {\n const sub = getSubscription(internalName);\n return sub?.confirmed ?? false;\n}\n\nfunction redirectToAfterConfirmationUrl(): string {\n const baseUrl = `${location.origin}${location.pathname}`;\n const params = new URLSearchParams(location.search);\n for (const key of [\"email\", \"newsletter_error\"]) {\n params.delete(key);\n }\n const queryString = params.toString();\n return queryString ? `${baseUrl}?${queryString}` : baseUrl;\n}\n\nexport function getSubscriptionPreferences(internalName: string): string[] {\n const subscription = getSubscription(internalName);\n return subscription?.preference_identifiers || [];\n}\n\nexport async function updateSubscriptionPreferences(internalName: string): Promise<boolean> {\n const { preferenceToken } = newsletterStore.state;\n\n // Either preference token is needed or the user must be authenticated\n if (!preferenceToken && !newsletterStore.state.isAuthenticated) {\n logger.error(\"Preference token or authentication is required to update subscription preferences\");\n return false;\n }\n\n // Check if the subscription exists\n if (!isSubscribed(internalName)) {\n logger.error(`Cannot update preferences: not subscribed to newsletter '${internalName}'`);\n return false;\n }\n\n const authInstance = await Auth.getInstance();\n const idToken = await authInstance.getToken();\n\n const preferenceIdentifiers = newsletterStore.state.checkedNewsletters[internalName] || [];\n\n const response = await getUnidyClient().newsletters.updateSubscription(\n internalName,\n { preference_identifiers: preferenceIdentifiers },\n {\n preferenceToken,\n idToken: typeof idToken === \"string\" ? idToken : \"\",\n },\n );\n\n if (response.status === 401) {\n Flash.error.addMessage(t(\"newsletter.errors.unauthorized\"));\n newsletterLogout();\n return false;\n }\n\n if (response.success && response.data) {\n // Update the local subscription with the new preferences\n const subscriptionIndex = newsletterStore.state.existingSubscriptions.findIndex((sub) => sub.newsletter_internal_name === internalName);\n\n if (subscriptionIndex !== -1) {\n const updatedSubscriptions = [...newsletterStore.state.existingSubscriptions];\n updatedSubscriptions[subscriptionIndex] = {\n ...updatedSubscriptions[subscriptionIndex],\n preference_identifiers: response.data.preference_identifiers || [],\n };\n newsletterStore.state.existingSubscriptions = updatedSubscriptions;\n }\n\n Flash.success.addMessage(t(\"newsletter.success.preferences_updated\"));\n return true;\n }\n\n Flash.error.addMessage(t(\"errors.unknown\", { defaultValue: \"An unknown error occurred\" }));\n return false;\n}\n"],"names":[],"mappings":";;;;;;;AAaA,MAAM,MAAM,GAAG,YAAY,CAAC,mBAAmB,CAAC;AAEhD,MAAM,kBAAkB,GAAG,mBAAmB;SAE9B,gBAAgB,GAAA;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M,oBAAoB,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,qBAAqB,CAAC;YAC7E,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;gBACxC,GAAG,oBAAoB,CAAC,iBAAiB,CAAC;AAC1C,gBAAA,sBAAsB,EAAE,QAAQ,CAAC,IAAI,CAAC,sBAAsB,IAAI,EAAE;aACnE;AACD,YAAA,eAAe,CAAC,KAAK,CAAC,qBAAqB,GAAG,oBAAoB;;QAGpE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC;AACrE,QAAA,OAAO,IAAI;;AAGb,IAAA,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,gBAAgB,EAAE,EAAE,YAAY,EAAE,2BAA2B,EAAE,CAAC,CAAC;AAC1F,IAAA,OAAO,KAAK;AACd;;;;"}
@@ -0,0 +1,39 @@
1
+ import { c as createStore } from './index-BnBstyfp.js';
2
+
3
+ const PERSIST_KEY_PREFIX = "unidy_newsletter_";
4
+ const persist = (key) => {
5
+ sessionStorage.setItem(`${PERSIST_KEY_PREFIX}${key}`, newsletterStore.state[key]);
6
+ };
7
+ const getPersistedValue = (key) => {
8
+ return sessionStorage.getItem(`${PERSIST_KEY_PREFIX}${key}`);
9
+ };
10
+ const initialState = {
11
+ email: getPersistedValue("email") ?? "",
12
+ preferenceToken: getPersistedValue("preferenceToken") ?? "",
13
+ checkedNewsletters: {},
14
+ defaultPreferences: {},
15
+ fetchingSubscriptions: false,
16
+ existingSubscriptions: [],
17
+ errors: {},
18
+ isAuthenticated: false,
19
+ };
20
+ const newsletterStore = createStore(initialState);
21
+ const storeDefaultPreference = (internalName, preferenceIdentifier) => {
22
+ const current = newsletterStore.state.defaultPreferences[internalName] ?? new Set();
23
+ const updated = new Set(current);
24
+ updated.add(preferenceIdentifier);
25
+ newsletterStore.state.defaultPreferences = {
26
+ ...newsletterStore.state.defaultPreferences,
27
+ [internalName]: updated,
28
+ };
29
+ };
30
+ const reset = () => {
31
+ sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}preferenceToken`);
32
+ sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}email`);
33
+ newsletterStore.state = initialState;
34
+ };
35
+
36
+ export { newsletterStore as n, persist as p, storeDefaultPreference as s };
37
+ //# sourceMappingURL=newsletter-store-CvULKmsu.js.map
38
+
39
+ //# sourceMappingURL=newsletter-store-CvULKmsu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"newsletter-store-CvULKmsu.js","sources":["src/newsletter/store/newsletter-store.ts"],"sourcesContent":["import { createStore } from \"@stencil/store\";\n\nexport type NewsletterErrorIdentifier =\n | \"unconfirmed\"\n | \"already_subscribed\"\n | \"invalid_email\"\n | \"newsletter_not_found\"\n | \"preferences_not_found\"\n | \"invalid_preference_token\"\n | \"unknown\";\n\nexport type NewsletterInternalName = string;\nexport type PreferenceIdentifier = string;\n\nexport interface ExistingSubscription {\n newsletter_internal_name: NewsletterInternalName;\n confirmed: boolean;\n preference_identifiers: PreferenceIdentifier[];\n}\n\nexport type CheckedNewsletters = Record<NewsletterInternalName, PreferenceIdentifier[]>;\n\nexport type DefaultPreferences = Record<NewsletterInternalName, Set<PreferenceIdentifier>>;\n\ninterface NewsletterState {\n email: string;\n preferenceToken: string;\n checkedNewsletters: CheckedNewsletters;\n defaultPreferences: DefaultPreferences;\n\n fetchingSubscriptions: boolean;\n existingSubscriptions: ExistingSubscription[];\n\n errors: Record<string, NewsletterErrorIdentifier>;\n\n isAuthenticated: boolean;\n}\n\nconst PERSIST_KEY_PREFIX = \"unidy_newsletter_\";\n\nexport const persist = (key: \"email\" | \"preferenceToken\") => {\n sessionStorage.setItem(`${PERSIST_KEY_PREFIX}${key}`, newsletterStore.state[key]);\n};\n\nconst getPersistedValue = (key: \"email\" | \"preferenceToken\") => {\n return sessionStorage.getItem(`${PERSIST_KEY_PREFIX}${key}`);\n};\n\nconst initialState: NewsletterState = {\n email: getPersistedValue(\"email\") ?? \"\",\n preferenceToken: getPersistedValue(\"preferenceToken\") ?? \"\",\n checkedNewsletters: {},\n defaultPreferences: {},\n\n fetchingSubscriptions: false,\n existingSubscriptions: [],\n\n errors: {},\n isAuthenticated: false,\n};\n\nexport const newsletterStore = createStore<NewsletterState>(initialState);\n\nexport const storeDefaultPreference = (internalName: NewsletterInternalName, preferenceIdentifier: PreferenceIdentifier) => {\n const current = newsletterStore.state.defaultPreferences[internalName] ?? new Set();\n const updated = new Set(current);\n updated.add(preferenceIdentifier);\n newsletterStore.state.defaultPreferences = {\n ...newsletterStore.state.defaultPreferences,\n [internalName]: updated,\n };\n};\n\nexport const reset = () => {\n sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}preferenceToken`);\n sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}email`);\n newsletterStore.state = initialState;\n};\n"],"names":[],"mappings":";;AAsCA,MAAM,kBAAkB,GAAG,mBAAmB;AAEjC,MAAA,OAAO,GAAG,CAAC,GAAgC,KAAI;AAC1D,IAAA,cAAc,CAAC,OAAO,CAAC,CAAG,EAAA,kBAAkB,GAAG,GAAG,CAAA,CAAE,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnF;AAEA,MAAM,iBAAiB,GAAG,CAAC,GAAgC,KAAI;IAC7D,OAAO,cAAc,CAAC,OAAO,CAAC,CAAA,EAAG,kBAAkB,CAAG,EAAA,GAAG,CAAE,CAAA,CAAC;AAC9D,CAAC;AAED,MAAM,YAAY,GAAoB;AACpC,IAAA,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,IAAI,EAAE;AACvC,IAAA,eAAe,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,EAAE;AAC3D,IAAA,kBAAkB,EAAE,EAAE;AACtB,IAAA,kBAAkB,EAAE,EAAE;AAEtB,IAAA,qBAAqB,EAAE,KAAK;AAC5B,IAAA,qBAAqB,EAAE,EAAE;AAEzB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,eAAe,EAAE,KAAK;CACvB;MAEY,eAAe,GAAG,WAAW,CAAkB,YAAY;MAE3D,sBAAsB,GAAG,CAAC,YAAoC,EAAE,oBAA0C,KAAI;AACzH,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,IAAI,GAAG,EAAE;AACnF,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC;AAChC,IAAA,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;AACjC,IAAA,eAAe,CAAC,KAAK,CAAC,kBAAkB,GAAG;AACzC,QAAA,GAAG,eAAe,CAAC,KAAK,CAAC,kBAAkB;QAC3C,CAAC,YAAY,GAAG,OAAO;KACxB;AACH;AAEO,MAAM,KAAK,GAAG,MAAK;AACxB,IAAA,cAAc,CAAC,UAAU,CAAC,GAAG,kBAAkB,CAAA,eAAA,CAAiB,CAAC;AACjE,IAAA,cAAc,CAAC,UAAU,CAAC,GAAG,kBAAkB,CAAA,KAAA,CAAO,CAAC;AACvD,IAAA,eAAe,CAAC,KAAK,GAAG,YAAY;AACtC,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
- import { s as state } from './profile-store.js';
2
- import { t } from './i18n.js';
1
+ import { s as state } from './profile-store-DD6sq42i.js';
2
+ import { t } from './i18n-BCI_ARJL.js';
3
3
 
4
4
  function validateRequiredFieldsUnchanged(sWC) {
5
5
  for (const key of Object.keys(sWC)) {
@@ -31,6 +31,6 @@ function buildPayload(stateData) {
31
31
  }
32
32
 
33
33
  export { buildPayload as b, validateRequiredFieldsUnchanged as v };
34
- //# sourceMappingURL=profile-helpers.js.map
34
+ //# sourceMappingURL=profile-helpers-Bs3aj0CO.js.map
35
35
 
36
- //# sourceMappingURL=profile-helpers.js.map
36
+ //# sourceMappingURL=profile-helpers-Bs3aj0CO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profile-helpers-7onubaoR.js","sources":["src/profile/profile-helpers.ts"],"sourcesContent":["import { type ProfileRaw, state as profileState } from \"./store/profile-store\";\nimport { t } from \"../i18n\";\n\nexport function validateRequiredFieldsUnchanged(sWC: ProfileRaw) {\n for (const key of Object.keys(sWC)) {\n if (key === \"custom_attributes\") continue;\n const field = sWC[key];\n if (field.required === true && (field.value === \"\" || field.value === null)) {\n profileState.errors = { [key]: t(\"errors.required_field\", { field: key }) };\n return false;\n }\n }\n\n for (const key of Object.keys(sWC.custom_attributes ?? {})) {\n const field = sWC.custom_attributes?.[key];\n const fieldDisplayName = `custom_attributes.${key}`;\n if (field?.required === true && (field.value === \"\" || field.value === null)) {\n profileState.errors = { [fieldDisplayName]: t(\"errors.required_field\", { field: fieldDisplayName }) };\n return false;\n }\n }\n\n return true;\n}\n\nexport function buildPayload(stateData: ProfileRaw) {\n return {\n ...Object.fromEntries(\n Object.entries(stateData)\n .filter(([k]) => k !== \"custom_attributes\")\n .map(([k, v]: [string, unknown]) => [k, (v as { value: unknown }).value]),\n ),\n custom_attributes: Object.fromEntries(\n Object.entries(stateData.custom_attributes ?? {}).map(([k, v]: [string, unknown]) => [k, (v as { value: unknown }).value]),\n ),\n };\n}\n"],"names":["profileState"],"mappings":";;;AAGM,SAAU,+BAA+B,CAAC,GAAe,EAAA;IAC7D,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAClC,IAAI,GAAG,KAAK,mBAAmB;YAAE;AACjC,QAAA,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC;QACtB,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,KAAK,KAAK,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,EAAE;AAC3E,YAAAA,KAAY,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE;AAC3E,YAAA,OAAO,KAAK;;;AAIhB,IAAA,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,EAAE;QAC1D,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC;AAC1C,QAAA,MAAM,gBAAgB,GAAG,CAAqB,kBAAA,EAAA,GAAG,EAAE;QACnD,IAAI,KAAK,EAAE,QAAQ,KAAK,IAAI,KAAK,KAAK,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,EAAE;AAC5E,YAAAA,KAAY,CAAC,MAAM,GAAG,EAAE,CAAC,gBAAgB,GAAG,CAAC,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,EAAE;AACrG,YAAA,OAAO,KAAK;;;AAIhB,IAAA,OAAO,IAAI;AACb;AAEM,SAAU,YAAY,CAAC,SAAqB,EAAA;IAChD,OAAO;QACL,GAAG,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,SAAS;aACrB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,mBAAmB;AACzC,aAAA,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAoB,KAAK,CAAC,CAAC,EAAG,CAAwB,CAAC,KAAK,CAAC,CAAC,CAC5E;AACD,QAAA,iBAAiB,EAAE,MAAM,CAAC,WAAW,CACnC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAoB,KAAK,CAAC,CAAC,EAAG,CAAwB,CAAC,KAAK,CAAC,CAAC,CAC3H;KACF;AACH;;;;"}
1
+ {"version":3,"file":"profile-helpers-Bs3aj0CO.js","sources":["src/profile/profile-helpers.ts"],"sourcesContent":["import { type ProfileRaw, state as profileState } from \"./store/profile-store\";\nimport { t } from \"../i18n\";\n\nexport function validateRequiredFieldsUnchanged(sWC: ProfileRaw) {\n for (const key of Object.keys(sWC)) {\n if (key === \"custom_attributes\") continue;\n const field = sWC[key];\n if (field.required === true && (field.value === \"\" || field.value === null)) {\n profileState.errors = { [key]: t(\"errors.required_field\", { field: key }) };\n return false;\n }\n }\n\n for (const key of Object.keys(sWC.custom_attributes ?? {})) {\n const field = sWC.custom_attributes?.[key];\n const fieldDisplayName = `custom_attributes.${key}`;\n if (field?.required === true && (field.value === \"\" || field.value === null)) {\n profileState.errors = { [fieldDisplayName]: t(\"errors.required_field\", { field: fieldDisplayName }) };\n return false;\n }\n }\n\n return true;\n}\n\nexport function buildPayload(stateData: ProfileRaw) {\n return {\n ...Object.fromEntries(\n Object.entries(stateData)\n .filter(([k]) => k !== \"custom_attributes\")\n .map(([k, v]: [string, unknown]) => [k, (v as { value: unknown }).value]),\n ),\n custom_attributes: Object.fromEntries(\n Object.entries(stateData.custom_attributes ?? {}).map(([k, v]: [string, unknown]) => [k, (v as { value: unknown }).value]),\n ),\n };\n}\n"],"names":["profileState"],"mappings":";;;AAGM,SAAU,+BAA+B,CAAC,GAAe,EAAA;IAC7D,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAClC,IAAI,GAAG,KAAK,mBAAmB;YAAE;AACjC,QAAA,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC;QACtB,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,KAAK,KAAK,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,EAAE;AAC3E,YAAAA,KAAY,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE;AAC3E,YAAA,OAAO,KAAK;;;AAIhB,IAAA,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,EAAE;QAC1D,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC;AAC1C,QAAA,MAAM,gBAAgB,GAAG,CAAqB,kBAAA,EAAA,GAAG,EAAE;QACnD,IAAI,KAAK,EAAE,QAAQ,KAAK,IAAI,KAAK,KAAK,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,EAAE;AAC5E,YAAAA,KAAY,CAAC,MAAM,GAAG,EAAE,CAAC,gBAAgB,GAAG,CAAC,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,EAAE;AACrG,YAAA,OAAO,KAAK;;;AAIhB,IAAA,OAAO,IAAI;AACb;AAEM,SAAU,YAAY,CAAC,SAAqB,EAAA;IAChD,OAAO;QACL,GAAG,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,SAAS;aACrB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,mBAAmB;AACzC,aAAA,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAoB,KAAK,CAAC,CAAC,EAAG,CAAwB,CAAC,KAAK,CAAC,CAAC,CAC5E;AACD,QAAA,iBAAiB,EAAE,MAAM,CAAC,WAAW,CACnC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAoB,KAAK,CAAC,CAAC,EAAG,CAAwB,CAAC,KAAK,CAAC,CAAC,CAC3H;KACF;AACH;;;;"}
@@ -1,4 +1,4 @@
1
- import { c as createStore } from './index3.js';
1
+ import { c as createStore } from './index-BnBstyfp.js';
2
2
 
3
3
  const initialState = {
4
4
  loading: true,
@@ -13,6 +13,6 @@ const profileStoreOnChange = profileStore.onChange;
13
13
  const { state } = profileStore;
14
14
 
15
15
  export { profileStoreOnChange as a, profileStore as p, state as s };
16
- //# sourceMappingURL=profile-store.js.map
16
+ //# sourceMappingURL=profile-store-DD6sq42i.js.map
17
17
 
18
- //# sourceMappingURL=profile-store.js.map
18
+ //# sourceMappingURL=profile-store-DD6sq42i.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profile-store-RmZB2PTc.js","sources":["src/profile/store/profile-store.ts"],"sourcesContent":["import { createStore } from \"@stencil/store\";\n\nexport type Option = { value: string; label: string; icon?: string | null };\nexport type RadioOption = { value: string; label: string; checked: boolean };\n\nexport interface ProfileNode {\n value?: string | undefined | string[];\n type?: string;\n label?: string;\n required?: boolean;\n readonly?: boolean;\n locked?: boolean;\n locked_text?: string;\n options?: Option[];\n radio_options?: RadioOption[];\n attr_name?: string;\n}\n\nexport type ProfileRaw = {\n custom_attributes?: Record<string, ProfileNode>;\n} & Record<string, ProfileNode>;\n\nexport interface ProfileState {\n loading: boolean;\n data: ProfileRaw;\n configuration: ProfileRaw;\n errors: Record<string, string | null>;\n configUpdateSource?: \"fetch\" | \"submit\";\n flashErrors: Record<string, string | null>;\n phoneValid: boolean;\n}\n\nconst initialState: ProfileState = {\n loading: true,\n data: {},\n configuration: {},\n errors: {},\n flashErrors: {},\n phoneValid: true,\n};\n\nconst profileStore = createStore<ProfileState>(initialState);\n\nconst profileStoreOnChange: <K extends keyof ProfileState>(prop: K, cb: (value: ProfileState[K]) => void) => () => void =\n profileStore.onChange;\n\nexport { profileStore };\nexport const { state } = profileStore;\nexport { profileStoreOnChange as onChange };\n"],"names":[],"mappings":";;AAgCA,MAAM,YAAY,GAAiB;AACjC,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,UAAU,EAAE,IAAI;CACjB;AAED,MAAM,YAAY,GAAG,WAAW,CAAe,YAAY;AAE3D,MAAM,oBAAoB,GACxB,YAAY,CAAC;AAGF,MAAA,EAAE,KAAK,EAAE,GAAG;;;;"}
1
+ {"version":3,"file":"profile-store-DD6sq42i.js","sources":["src/profile/store/profile-store.ts"],"sourcesContent":["import { createStore } from \"@stencil/store\";\n\nexport type Option = { value: string; label: string; icon?: string | null };\nexport type RadioOption = { value: string; label: string; checked: boolean };\n\nexport interface ProfileNode {\n value?: string | undefined | string[];\n type?: string;\n label?: string;\n required?: boolean;\n readonly?: boolean;\n locked?: boolean;\n locked_text?: string;\n options?: Option[];\n radio_options?: RadioOption[];\n attr_name?: string;\n}\n\nexport type ProfileRaw = {\n custom_attributes?: Record<string, ProfileNode>;\n} & Record<string, ProfileNode>;\n\nexport interface ProfileState {\n loading: boolean;\n data: ProfileRaw;\n configuration: ProfileRaw;\n errors: Record<string, string | null>;\n configUpdateSource?: \"fetch\" | \"submit\";\n flashErrors: Record<string, string | null>;\n phoneValid: boolean;\n}\n\nconst initialState: ProfileState = {\n loading: true,\n data: {},\n configuration: {},\n errors: {},\n flashErrors: {},\n phoneValid: true,\n};\n\nconst profileStore = createStore<ProfileState>(initialState);\n\nconst profileStoreOnChange: <K extends keyof ProfileState>(prop: K, cb: (value: ProfileState[K]) => void) => () => void =\n profileStore.onChange;\n\nexport { profileStore };\nexport const { state } = profileStore;\nexport { profileStoreOnChange as onChange };\n"],"names":[],"mappings":";;AAgCA,MAAM,YAAY,GAAiB;AACjC,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,UAAU,EAAE,IAAI;CACjB;AAED,MAAM,YAAY,GAAG,WAAW,CAAe,YAAY;AAE3D,MAAM,oBAAoB,GACxB,YAAY,CAAC;AAGF,MAAA,EAAE,KAAK,EAAE,GAAG;;;;"}
@@ -1,2 +1,48 @@
1
- import{p as e,b as a}from"./p-Ci3aTmzp.js";export{s as setNonce}from"./p-Ci3aTmzp.js";import{g as n}from"./p-CFiZLMAA.js";var t=()=>{const a=import.meta.url;const s={};if(a!==""){s.resourcesUrl=new URL(".",a).href}return e(s)};t().then((async e=>{await n();return a([["p-b79abe80",[[768,"u-full-profile",{fields:[1],countryCodeDisplayOption:[1,"country-code-display-option"]}]]],["p-c2fba7c8",[[256,"u-missing-field"]]],["p-d2c6179a",[[257,"u-missing-fields-submit-button"]]],["p-eaedb08e",[[768,"u-newsletter-resend-doi-button",{internalName:[1,"internal-name"],componentClassName:[1,"class-name"],isResending:[32]}]]],["p-26f3d8db",[[768,"u-newsletter-toggle-subscription-button",{internalName:[1,"internal-name"],componentClassName:[1,"class-name"],subscribeClassName:[1,"subscribe-class-name"],unsubscribeClassName:[1,"unsubscribe-class-name"],loading:[32]}]]],["p-4f54194a",[[769,"u-conditional-render",{when:[1],is:[1],not:[4],conditionFunction:[16]}]]],["p-c2b6c674",[[772,"u-config",{mode:[1],baseUrl:[1,"base-url"],apiKey:[1,"api-key"],customTranslations:[1,"custom-translations"],fallbackLocale:[1,"fallback-locale"],locale:[1]},null,{mode:["onPropChange"],locale:["onPropChange"]}]]],["p-97d8ae02",[[772,"u-email-field",{componentClassName:[1,"class-name"],for:[1],ariaLabel:[1,"aria-label"],disabled:[4],emailValue:[32]}]]],["p-dcd4e8f0",[[769,"u-error-message",{componentClassName:[1,"class-name"],for:[1],errorMessages:[16]}]]],["p-2da4497a",[[768,"u-flash-message",{componentClassName:[1,"class-name"],removeAfterSeconds:[2,"remove-after-seconds"]}]]],["p-cba5d81e",[[768,"u-logout-button",{componentClassName:[1,"class-name"],reloadOnSuccess:[4,"reload-on-success"]}]]],["p-94dde7e5",[[768,"u-magic-code-field",{componentClassName:[1,"class-name"],codeDigits:[32]}]]],["p-6e3c210c",[[768,"u-newsletter-checkbox",{internalName:[1,"internal-name"],checked:[4],componentClassName:[1,"class-name"],toggle:[64],setChecked:[64]}]]],["p-552056e7",[[772,"u-newsletter-logout-button",{componentClassName:[1,"class-name"]}]]],["p-10e06612",[[768,"u-newsletter-preference-checkbox",{internalName:[1,"internal-name"],preferenceIdentifier:[1,"preference-identifier"],checked:[4],componentClassName:[1,"class-name"],loading:[32],existingSubscriptions:[32],checkedPreferences:[32],toggle:[64],setChecked:[64]}]]],["p-3f4c947d",[[772,"u-newsletter-root",{componentClassName:[1,"class-name"],submit:[64]}]]],["p-73c2ec89",[[772,"u-pagination-button",{direction:[1],customClass:[1,"custom-class"],paginationMeta:[32]}]]],["p-6893d167",[[768,"u-pagination-page",{customClass:[1,"custom-class"],paginationMeta:[32]}]]],["p-67096601",[[768,"u-passkey",{disabled:[4],componentClassName:[1,"class-name"],ariaDescribedBy:[1,"aria-described-by"],isSupported:[32]}]]],["p-bb5ae222",[[768,"u-password-field",{for:[1],componentClassName:[1,"class-name"],ariaLabel:[1,"aria-label"]}]]],["p-8d787494",[[772,"u-registration-button",{for:[1],componentClassName:[1,"class-name"],redirectUri:[1,"redirect-uri"]}]]],["p-fc51c88d",[[768,"u-reset-password-button",{componentClassName:[1,"class-name"]}]]],["p-9da4dd6d",[[768,"u-send-magic-code-button",{disabled:[4],componentClassName:[1,"class-name"],countdown:[32]}]]],["p-bbbec3d4",[[769,"u-signed-in",{componentClassName:[1,"class-name"],not:[4]}]]],["p-5da49d00",[[769,"u-signin-root",{componentClassName:[1,"class-name"]}]]],["p-20240b02",[[769,"u-signin-step",{name:[1],alwaysRender:[4,"always-render"],isActive:[64],submit:[64]}]]],["p-745742f1",[[772,"u-signin-strategy",{type:[1],componentClassName:[1,"class-name"]}]]],["p-16f86a4d",[[769,"u-social-login-button",{provider:[1],redirectUri:[1,"redirect-uri"],iconOnly:[4,"icon-only"],theme:[1]}]]],["p-431ec460",[[772,"u-ticketable-list",{paginationMeta:[16],target:[1],containerClass:[1,"container-class"],filter:[1025],limit:[1026],page:[1026],skeletonCount:[2,"skeleton-count"],skeletonAllText:[4,"skeleton-all-text"],ticketableType:[1,"ticketable-type"],store:[16],items:[32],loading:[32],error:[32]},null,{page:["fetchData"],limit:["fetchData"],filter:["fetchData"]}]]],["p-6febeead",[[257,"u-spinner"]]],["p-7a7c0db2",[[772,"u-submit-button",{for:[1],text:[1],disabled:[4],componentClassName:[1,"class-name"]}],[772,"u-profile",{profileId:[1,"profile-id"],initialData:[1,"initial-data"],fetchingProfileData:[32],submitProfile:[64]}]]],["p-f0aecd55",[[769,"u-field",{field:[1],required:[4],readonlyPlaceholder:[1,"readonly-placeholder"],countryCodeDisplayOption:[1,"country-code-display-option"],invalidPhoneMessage:[1,"invalid-phone-message"],componentClassName:[1,"class-name"],emptyOption:[4,"empty-option"],placeholder:[1],renderDefaultLabel:[4,"render-default-label"],pattern:[1],patternErrorMessage:[1,"pattern-error-message"],validationFunc:[16],selected:[32]}],[768,"u-raw-field",{required:[4],readonlyPlaceholder:[1,"readonly-placeholder"],countryCodeDisplayOption:[1,"country-code-display-option"],invalidPhoneMessage:[1,"invalid-phone-message"],componentClassName:[1,"class-name"],field:[1],value:[1],checked:[4],disabled:[4],tooltip:[1],type:[1],placeholder:[1],options:[1],emptyOption:[4,"empty-option"],attrName:[1,"attr-name"],radioOptions:[16],multiSelectOptions:[16],specificPartKey:[1,"specific-part-key"],ariaDescribedBy:[1,"aria-described-by"],pattern:[1],patternErrorMessage:[1,"pattern-error-message"],validationFunc:[16],selected:[32]}]]]],e)}));
2
- //# sourceMappingURL=sdk.esm.js.map
1
+ import { B as BUILD, c as consoleDevInfo, H, w as win, N as NAMESPACE, p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-BqL27K_R.js';
2
+ export { s as setNonce } from './index-BqL27K_R.js';
3
+
4
+ /*
5
+ Stencil Client Patch Browser v4.38.3 | MIT Licensed | https://stenciljs.com
6
+ */
7
+
8
+ var patchBrowser = () => {
9
+ if (BUILD.isDev && !BUILD.isTesting) {
10
+ consoleDevInfo("Running in development mode.");
11
+ }
12
+ if (BUILD.cloneNodeFix) {
13
+ patchCloneNodeFix(H.prototype);
14
+ }
15
+ const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll("script")).find(
16
+ (s) => new RegExp(`/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === NAMESPACE
17
+ ) : null;
18
+ const importMeta = import.meta.url;
19
+ const opts = BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {};
20
+ if (importMeta !== "") {
21
+ opts.resourcesUrl = new URL(".", importMeta).href;
22
+ }
23
+ return promiseResolve(opts);
24
+ };
25
+ var patchCloneNodeFix = (HTMLElementPrototype) => {
26
+ const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
27
+ HTMLElementPrototype.cloneNode = function(deep) {
28
+ if (this.nodeName === "TEMPLATE") {
29
+ return nativeCloneNodeFn.call(this, deep);
30
+ }
31
+ const clonedNode = nativeCloneNodeFn.call(this, false);
32
+ const srcChildNodes = this.childNodes;
33
+ if (deep) {
34
+ for (let i = 0; i < srcChildNodes.length; i++) {
35
+ if (srcChildNodes[i].nodeType !== 2) {
36
+ clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
37
+ }
38
+ }
39
+ }
40
+ return clonedNode;
41
+ };
42
+ };
43
+
44
+ patchBrowser().then(async (options) => {
45
+ await globalScripts();
46
+ return bootstrapLazy([["u-full-profile",[[768,"u-full-profile",{"fields":[1],"countryCodeDisplayOption":[1,"country-code-display-option"]}]]],["u-missing-field",[[256,"u-missing-field"]]],["u-missing-fields-submit-button",[[257,"u-missing-fields-submit-button"]]],["u-newsletter-resend-doi-button",[[768,"u-newsletter-resend-doi-button",{"internalName":[1,"internal-name"],"componentClassName":[1,"class-name"],"isResending":[32]}]]],["u-newsletter-toggle-subscription-button",[[768,"u-newsletter-toggle-subscription-button",{"internalName":[1,"internal-name"],"componentClassName":[1,"class-name"],"subscribeClassName":[1,"subscribe-class-name"],"unsubscribeClassName":[1,"unsubscribe-class-name"],"loading":[32]}]]],["u-conditional-render",[[769,"u-conditional-render",{"when":[1],"is":[1],"not":[4],"conditionFunction":[16]}]]],["u-config",[[772,"u-config",{"mode":[1],"baseUrl":[1,"base-url"],"apiKey":[1,"api-key"],"customTranslations":[1,"custom-translations"],"fallbackLocale":[1,"fallback-locale"],"locale":[1]},null,{"mode":["onPropChange"],"locale":["onPropChange"]}]]],["u-email-field",[[772,"u-email-field",{"componentClassName":[1,"class-name"],"ariaLabel":[1,"aria-label"],"disabled":[4],"emailValue":[32]}]]],["u-error-message",[[769,"u-error-message",{"componentClassName":[1,"class-name"],"for":[1],"errorMessages":[16]}]]],["u-flash-message",[[768,"u-flash-message",{"componentClassName":[1,"class-name"],"removeAfterSeconds":[2,"remove-after-seconds"]}]]],["u-logout-button",[[768,"u-logout-button",{"componentClassName":[1,"class-name"],"reloadOnSuccess":[4,"reload-on-success"]}]]],["u-magic-code-field",[[768,"u-magic-code-field",{"componentClassName":[1,"class-name"],"codeDigits":[32]}]]],["u-newsletter-checkbox",[[768,"u-newsletter-checkbox",{"internalName":[1,"internal-name"],"checked":[4],"componentClassName":[1,"class-name"]}]]],["u-newsletter-logout-button",[[772,"u-newsletter-logout-button",{"componentClassName":[1,"class-name"]}]]],["u-newsletter-preference-checkbox",[[768,"u-newsletter-preference-checkbox",{"internalName":[1,"internal-name"],"preferenceIdentifier":[1,"preference-identifier"],"checked":[4],"componentClassName":[1,"class-name"],"loading":[32],"existingSubscriptions":[32],"checkedPreferences":[32]}]]],["u-newsletter-root",[[772,"u-newsletter-root",{"componentClassName":[1,"class-name"],"submit":[64]}]]],["u-pagination-button",[[772,"u-pagination-button",{"direction":[1],"customClass":[1,"custom-class"],"paginationMeta":[32]}]]],["u-pagination-page",[[768,"u-pagination-page",{"customClass":[1,"custom-class"],"paginationMeta":[32]}]]],["u-passkey",[[768,"u-passkey",{"disabled":[4],"componentClassName":[1,"class-name"],"ariaDescribedBy":[1,"aria-described-by"],"isSupported":[32]}]]],["u-password-field",[[768,"u-password-field",{"for":[1],"componentClassName":[1,"class-name"],"ariaLabel":[1,"aria-label"]}]]],["u-registration-button",[[772,"u-registration-button",{"for":[1],"componentClassName":[1,"class-name"],"redirectUri":[1,"redirect-uri"]}]]],["u-reset-password-button",[[768,"u-reset-password-button",{"componentClassName":[1,"class-name"]}]]],["u-send-magic-code-button",[[768,"u-send-magic-code-button",{"disabled":[4],"componentClassName":[1,"class-name"],"countdown":[32]}]]],["u-signed-in",[[769,"u-signed-in",{"componentClassName":[1,"class-name"],"not":[4]}]]],["u-signin-root",[[769,"u-signin-root",{"componentClassName":[1,"class-name"]}]]],["u-signin-step",[[769,"u-signin-step",{"name":[1],"alwaysRender":[4,"always-render"],"isActive":[64],"submit":[64]}]]],["u-signin-strategy",[[772,"u-signin-strategy",{"type":[1],"componentClassName":[1,"class-name"]}]]],["u-social-login-button",[[769,"u-social-login-button",{"provider":[1],"redirectUri":[1,"redirect-uri"],"iconOnly":[4,"icon-only"],"theme":[1]}]]],["u-ticketable-list",[[772,"u-ticketable-list",{"paginationMeta":[16],"target":[1],"containerClass":[1,"container-class"],"filter":[1025],"limit":[1026],"page":[1026],"skeletonCount":[2,"skeleton-count"],"skeletonAllText":[4,"skeleton-all-text"],"ticketableType":[1,"ticketable-type"],"store":[16],"items":[32],"loading":[32],"error":[32]},null,{"page":["fetchData"],"limit":["fetchData"],"filter":["fetchData"]}]]],["u-spinner",[[257,"u-spinner"]]],["u-submit-button",[[772,"u-submit-button",{"for":[1],"text":[1],"disabled":[4],"componentClassName":[1,"class-name"]}]]],["u-profile",[[772,"u-profile",{"profileId":[1,"profile-id"],"initialData":[1,"initial-data"],"fetchingProfileData":[32],"submitProfile":[64]}]]],["u-raw-field",[[768,"u-raw-field",{"required":[4],"readonlyPlaceholder":[1,"readonly-placeholder"],"countryCodeDisplayOption":[1,"country-code-display-option"],"invalidPhoneMessage":[1,"invalid-phone-message"],"componentClassName":[1,"class-name"],"field":[1],"value":[1],"checked":[4],"disabled":[4],"tooltip":[1],"type":[1],"placeholder":[1],"options":[1],"emptyOption":[4,"empty-option"],"attrName":[1,"attr-name"],"radioOptions":[16],"multiSelectOptions":[16],"specificPartKey":[1,"specific-part-key"],"ariaDescribedBy":[1,"aria-described-by"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"validationFunc":[16],"selected":[32]}]]],["u-field",[[769,"u-field",{"field":[1],"required":[4],"readonlyPlaceholder":[1,"readonly-placeholder"],"countryCodeDisplayOption":[1,"country-code-display-option"],"invalidPhoneMessage":[1,"invalid-phone-message"],"componentClassName":[1,"class-name"],"emptyOption":[4,"empty-option"],"placeholder":[1],"renderDefaultLabel":[4,"render-default-label"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"validationFunc":[16],"selected":[32]}]]]], options);
47
+ });
48
+ //# sourceMappingURL=sdk.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.esm.js","sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.38.3 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG;AACpC,EAAE,MAAM,IAAI,GAAiE,EAAE;AAC/E,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI;AACrD;AACA,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC;AAC7B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D,CAAC,CAAC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"sdk.esm.js","sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.38.3 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;A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,IAAI,EAAE,IAAI,CAAC;AAC/C;AACA,IAAI,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AAC1D,IAAI,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU;AACzC,IAAI,IAAI,IAAI,EAAE;AACd,MAAM,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACrD,QAAQ,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,EAAE;AAC7C,UAAU,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAClE;AACA;AACA;AACA,IAAI,OAAO,UAAU;AACrB,GAAG;AACH,CAAC;;ACrCD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D,CAAC,CAAC","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"u-conditional-render.entry.esm.js","sources":["src/shared/components/conditional-render/conditional-render.tsx"],"sourcesContent":["import { Component, h, Prop, Host } from \"@stencil/core\";\nimport { authState, type AuthState } from \"../../../auth/store/auth-store\";\nimport { newsletterStore } from \"../../../newsletter/store/newsletter-store\";\nimport { profileStore } from \"../../../profile/store/profile-store\";\nimport * as NewsletterHelpers from \"../../../newsletter/newsletter-helpers\";\nimport { UnidyComponent } from \"../../../logger\";\n\nconst PREDEFINED_CONDITIONS: Record<string, (...args: unknown[]) => unknown> = {\n \"auth.passkeyEnabled\": () => authState.availableLoginOptions?.passkey,\n \"auth.passwordEnabled\": () => authState.availableLoginOptions?.password,\n \"auth.magicCodeEnabled\": () => authState.availableLoginOptions?.magic_link,\n \"auth.socialLoginsEnabled\": () => (authState.availableLoginOptions?.social_logins?.length ?? 0) > 0,\n \"auth.loading\": () => authState.loading,\n \"auth.authenticated\": () => authState.authenticated,\n \"auth.magicCodeSent\": () => authState.magicCodeStep === \"sent\" || authState.magicCodeStep === \"requested\",\n \"auth.magicCodeRequested\": () => authState.magicCodeStep === \"requested\",\n \"auth.resetPasswordSent\": () => authState.resetPassword.step === \"sent\" || authState.resetPassword.step === \"requested\",\n \"auth.resetPasswordRequested\": () => authState.resetPassword.step === \"requested\",\n\n \"newsletter.hasCheckedNewsletters\": () => Object.keys(newsletterStore.state.checkedNewsletters).length > 0,\n \"newsletter.hasPreferenceToken\": () => !!newsletterStore.state.preferenceToken,\n \"newsletter.subscribed\": (newsletterInternalName: string) => NewsletterHelpers.isSubscribed(newsletterInternalName),\n \"newsletter.confirmed\": (newsletterInternalName: string) => NewsletterHelpers.isConfirmed(newsletterInternalName),\n \"newsletter.loggedIn\": () => newsletterStore.state.isAuthenticated || newsletterStore.state.preferenceToken !== \"\",\n\n \"profile.loading\": () => profileStore.state.loading,\n \"profile.hasErrors\": () => Object.keys(profileStore.state.errors).some((key) => profileStore.state.errors[key] !== null),\n \"profile.hasFlashErrors\": () => Object.keys(profileStore.state.flashErrors).some((key) => profileStore.state.flashErrors[key] !== null),\n \"profile.phoneValid\": () => profileStore.state.phoneValid,\n \"profile.hasData\": () => Object.keys(profileStore.state.data).length > 0,\n};\n\nfunction isTruthy(value: unknown): boolean {\n return Boolean(value);\n}\n\n@Component({\n tag: \"u-conditional-render\",\n shadow: true,\n})\nexport class ConditionalRender extends UnidyComponent {\n @Prop() when?: string; // condition to check\n @Prop() is?: string; // optional value to compare against\n @Prop() not = false;\n @Prop() conditionFunction?: (state: AuthState) => boolean;\n\n private evaluateCondition(): unknown {\n const predefinedFunction = PREDEFINED_CONDITIONS[this.when];\n if (predefinedFunction) {\n return predefinedFunction(this.is);\n }\n\n return null;\n }\n\n private shouldRender(): boolean {\n if (!this.when && !this.conditionFunction) {\n this.logger.error(\"[u-conditional-render] Either 'when' or 'conditionFunction' prop is required\");\n }\n\n if (this.conditionFunction) {\n const result = this.conditionFunction(authState);\n return this.not ? !result : result;\n }\n\n const value = this.evaluateCondition();\n if (value === null) {\n return false;\n }\n\n const normalizedIs = this.is?.toString().toLowerCase();\n let result: boolean;\n\n if (typeof value === \"boolean\") {\n if (normalizedIs === \"false\" || normalizedIs === \"disabled\") {\n result = !value;\n } else {\n result = value;\n }\n } else if (this.is === undefined) {\n result = isTruthy(value);\n } else if (normalizedIs === \"enabled\" || normalizedIs === \"true\") {\n result = isTruthy(value);\n } else if (normalizedIs === \"disabled\" || normalizedIs === \"false\") {\n result = !isTruthy(value);\n } else {\n result = String(value) === String(this.is); // to compare exact value\n }\n\n return this.not ? !result : result;\n }\n\n render() {\n if (!this.shouldRender()) {\n return null;\n }\n\n return (\n <Host aria-live=\"polite\">\n <slot />\n </Host>\n );\n }\n}\n"],"names":["authState","NewsletterHelpers.isSubscribed","NewsletterHelpers.isConfirmed"],"mappings":";;;;;;;;;;;;;AAOA,MAAM,qBAAqB,GAAoD;IAC7E,qBAAqB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,OAAO;IACrE,sBAAsB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,QAAQ;IACvE,uBAAuB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,UAAU;AAC1E,IAAA,0BAA0B,EAAE,MAAM,CAACA,KAAS,CAAC,qBAAqB,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC;AACnG,IAAA,cAAc,EAAE,MAAMA,KAAS,CAAC,OAAO;AACvC,IAAA,oBAAoB,EAAE,MAAMA,KAAS,CAAC,aAAa;AACnD,IAAA,oBAAoB,EAAE,MAAMA,KAAS,CAAC,aAAa,KAAK,MAAM,IAAIA,KAAS,CAAC,aAAa,KAAK,WAAW;IACzG,yBAAyB,EAAE,MAAMA,KAAS,CAAC,aAAa,KAAK,WAAW;AACxE,IAAA,wBAAwB,EAAE,MAA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CAAC,KAAK,CAAC;;aACnB,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,MAAM,EAAE;AAChE,YAAA,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;;aACnB,IAAI,YAAY,KAAK,UAAU,IAAI,YAAY,KAAK,OAAO,EAAE;AAClE,YAAA,MAAM,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;;aACpB;AACL,YAAA,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;AAG7C,QAAA,OAAO,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,MAAM;;IAGpC,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;AACxB,YAAA,OAAO,IAAI;;AAGb,QAAA,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAW,QAAQ,EAAA,EACtB,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,CACH;;;;;;"}
1
+ {"version":3,"file":"u-conditional-render.entry.esm.js","sources":["src/shared/components/conditional-render/conditional-render.tsx"],"sourcesContent":["import { Component, Host, h, Prop } from \"@stencil/core\";\nimport { type AuthState, authState } from \"../../../auth/store/auth-store\";\nimport { UnidyComponent } from \"../../../logger\";\nimport * as NewsletterHelpers from \"../../../newsletter/newsletter-helpers\";\nimport { newsletterStore } from \"../../../newsletter/store/newsletter-store\";\nimport { profileStore } from \"../../../profile/store/profile-store\";\n\nconst PREDEFINED_CONDITIONS: Record<string, (...args: unknown[]) => unknown> = {\n \"auth.passkeyEnabled\": () => authState.availableLoginOptions?.passkey,\n \"auth.passwordEnabled\": () => authState.availableLoginOptions?.password,\n \"auth.magicCodeEnabled\": () => authState.availableLoginOptions?.magic_link,\n \"auth.socialLoginsEnabled\": () => (authState.availableLoginOptions?.social_logins?.length ?? 0) > 0,\n \"auth.loading\": () => authState.loading,\n \"auth.authenticated\": () => authState.authenticated,\n \"auth.magicCodeSent\": () => authState.magicCodeStep === \"sent\" || authState.magicCodeStep === \"requested\",\n \"auth.magicCodeRequested\": () => authState.magicCodeStep === \"requested\",\n \"auth.resetPasswordSent\": () => authState.resetPassword.step === \"sent\" || authState.resetPassword.step === \"requested\",\n \"auth.resetPasswordRequested\": () => authState.resetPassword.step === \"requested\",\n\n \"newsletter.hasCheckedNewsletters\": () => Object.keys(newsletterStore.state.checkedNewsletters).length > 0,\n \"newsletter.hasPreferenceToken\": () => !!newsletterStore.state.preferenceToken,\n \"newsletter.hasEmail\": () => !!newsletterStore.state.email,\n \"newsletter.subscribed\": (newsletterInternalName: string) => NewsletterHelpers.isSubscribed(newsletterInternalName),\n \"newsletter.confirmed\": (newsletterInternalName: string) => NewsletterHelpers.isConfirmed(newsletterInternalName),\n \"newsletter.loggedIn\": () => newsletterStore.state.isAuthenticated || newsletterStore.state.preferenceToken !== \"\",\n\n \"profile.loading\": () => profileStore.state.loading,\n \"profile.hasErrors\": () => Object.keys(profileStore.state.errors).some((key) => profileStore.state.errors[key] !== null),\n \"profile.hasFlashErrors\": () => Object.keys(profileStore.state.flashErrors).some((key) => profileStore.state.flashErrors[key] !== null),\n \"profile.phoneValid\": () => profileStore.state.phoneValid,\n \"profile.hasData\": () => Object.keys(profileStore.state.data).length > 0,\n};\n\nfunction isTruthy(value: unknown): boolean {\n return Boolean(value);\n}\n\n@Component({\n tag: \"u-conditional-render\",\n shadow: true,\n})\nexport class ConditionalRender extends UnidyComponent {\n @Prop() when?: string; // condition to check\n @Prop() is?: string; // optional value to compare against\n @Prop() not = false;\n @Prop() conditionFunction?: (state: AuthState) => boolean;\n\n private evaluateCondition(): unknown {\n const predefinedFunction = PREDEFINED_CONDITIONS[this.when];\n if (predefinedFunction) {\n return predefinedFunction(this.is);\n }\n\n return null;\n }\n\n private shouldRender(): boolean {\n if (!this.when && !this.conditionFunction) {\n this.logger.error(\"[u-conditional-render] Either 'when' or 'conditionFunction' prop is required\");\n }\n\n if (this.conditionFunction) {\n const result = this.conditionFunction(authState);\n return this.not ? !result : result;\n }\n\n const value = this.evaluateCondition();\n if (value === null) {\n return false;\n }\n\n const normalizedIs = this.is?.toString().toLowerCase();\n let result: boolean;\n\n if (typeof value === \"boolean\") {\n if (normalizedIs === \"false\" || normalizedIs === \"disabled\") {\n result = !value;\n } else {\n result = value;\n }\n } else if (this.is === undefined) {\n result = isTruthy(value);\n } else if (normalizedIs === \"enabled\" || normalizedIs === \"true\") {\n result = isTruthy(value);\n } else if (normalizedIs === \"disabled\" || normalizedIs === \"false\") {\n result = !isTruthy(value);\n } else {\n result = String(value) === String(this.is); // to compare exact value\n }\n\n return this.not ? !result : result;\n }\n\n render() {\n if (!this.shouldRender()) {\n return null;\n }\n\n return (\n <Host aria-live=\"polite\">\n <slot />\n </Host>\n );\n }\n}\n"],"names":["authState","NewsletterHelpers.isSubscribed","NewsletterHelpers.isConfirmed"],"mappings":";;;;;;;;;;;;;AAOA,MAAM,qBAAqB,GAAoD;IAC7E,qBAAqB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,OAAO;IACrE,sBAAsB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,QAAQ;IACvE,uBAAuB,EAAE,MAAMA,KAAS,CAAC,qBAAqB,EAAE,UAAU;AAC1E,IAAA,0BAA0B,EAAE,MAAM,CAACA,KAAS,CAAC,qBAAqB,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC;AACnG,IAAA,cAAc,EAAE,MAAMA,KAAS,CAAC,OAAO;AACvC,IAAA,oBAAoB,EAAE,MAAMA,KAAS,CAAC,aAAa;AACnD,IAAA,oBAAoB,EAAE,MAAMA,KAAS,CAAC,aAAa,KAAK,MAAM,IAAIA,KAAS,CAAC,aAAa,KAAK,WAAW;IACzG,yBAAyB,EAAE,MAAMA,KAAS,CAAC,aAAa,KAAK,WAAW;AACxE,IAAA,wBAAwB,EAAE,MAAMA,KAAS,CAAC,aAAa,CAAC,IAAI,KA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E;AAChC,YAAA,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;;aACnB,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,MAAM,EAAE;AAChE,YAAA,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;;aACnB,IAAI,YAAY,KAAK,UAAU,IAAI,YAAY,KAAK,OAAO,EAAE;AAClE,YAAA,MAAM,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;;aACpB;AACL,YAAA,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;AAG7C,QAAA,OAAO,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,MAAM;;IAGpC,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;AACxB,YAAA,OAAO,IAAI;;AAGb,QAAA,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAW,QAAQ,EAAA,EACtB,CAAQ,CAAA,MAAA,EAAA,IAAA,CAAA,CACH;;;;;;"}
@@ -1,14 +1,14 @@
1
- import { U as UnidyComponent, r as registerInstance, h, H as Host } from './index-Ci3aTmzp.js';
2
- import { s as state } from './auth-store-BMqUdTpC.js';
3
- import { n as newsletterStore } from './newsletter-store-BYmuLQg8.js';
4
- import { p as profileStore } from './profile-store-RmZB2PTc.js';
5
- import { i as isConfirmed, a as isSubscribed } from './newsletter-helpers-Dh9k-4Ph.js';
6
- import './index-Bjp1XO-f.js';
7
- import './unidy-store-BldTAtO0.js';
8
- import './index-DKaIwo59.js';
9
- import './i18n-BR-AGAnn.js';
10
- import './auth-DLKPv5Zm.js';
11
- import './flash-store-CEvWSG0c.js';
1
+ import { U as UnidyComponent, r as registerInstance, h, a as Host } from './index-BqL27K_R.js';
2
+ import { s as state } from './auth-store-CapiC8gJ.js';
3
+ import { i as isConfirmed, a as isSubscribed } from './newsletter-helpers-DEXEBD0F.js';
4
+ import { n as newsletterStore } from './newsletter-store-CvULKmsu.js';
5
+ import { p as profileStore } from './profile-store-DD6sq42i.js';
6
+ import './index-BnBstyfp.js';
7
+ import './unidy-store-BwZym11Y.js';
8
+ import './index-gEcJztft.js';
9
+ import './i18n-BCI_ARJL.js';
10
+ import './auth-Che07PeV.js';
11
+ import './flash-store-DNcSEn2p.js';
12
12
  import './component-utils-D1lzXl_Z.js';
13
13
 
14
14
  const PREDEFINED_CONDITIONS = {
@@ -24,6 +24,7 @@ const PREDEFINED_CONDITIONS = {
24
24
  "auth.resetPasswordRequested": () => state.resetPassword.step === "requested",
25
25
  "newsletter.hasCheckedNewsletters": () => Object.keys(newsletterStore.state.checkedNewsletters).length > 0,
26
26
  "newsletter.hasPreferenceToken": () => !!newsletterStore.state.preferenceToken,
27
+ "newsletter.hasEmail": () => !!newsletterStore.state.email,
27
28
  "newsletter.subscribed": (newsletterInternalName) => isSubscribed(newsletterInternalName),
28
29
  "newsletter.confirmed": (newsletterInternalName) => isConfirmed(newsletterInternalName),
29
30
  "newsletter.loggedIn": () => newsletterStore.state.isAuthenticated || newsletterStore.state.preferenceToken !== "",
@@ -97,4 +98,4 @@ const ConditionalRender = class extends UnidyComponent {
97
98
  };
98
99
 
99
100
  export { ConditionalRender as u_conditional_render };
100
- //# sourceMappingURL=u-conditional-render.entry.js.map
101
+ //# sourceMappingURL=u-conditional-render.entry.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"u-config.entry.esm.js","sources":["src/shared/components/config/config.tsx"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\nimport { Component, Prop, Watch, Event, type EventEmitter, h } from \"@stencil/core\";\nimport i18n from \"../../../i18n\";\nimport { unidyState } from \"../../store/unidy-store\";\nimport { Auth } from \"../../../auth\";\nimport { getUnidyClient } from \"../../../api/\";\nimport { UnidyComponent } from \"../../../logger\";\n\nexport interface Config {\n apiKey: string;\n baseUrl: string;\n locale: string;\n mode: \"production\" | \"development\";\n}\n\nexport interface ConfigChange {\n key: string;\n value: string;\n previousValue: string;\n}\n\ntype TranslationTree = {\n [key: string]: string | TranslationTree;\n};\n\n@Component({\n tag: \"u-config\",\n shadow: false,\n})\nexport class UnidyConfig extends UnidyComponent {\n @Prop() mode: \"production\" | \"development\" = \"production\";\n @Prop() baseUrl = \"\";\n @Prop() apiKey = \"\";\n @Prop() customTranslations: string | Record<string, TranslationTree> = \"\";\n @Prop() fallbackLocale = \"en\";\n @Prop() locale = \"en\";\n\n @Event() unidyInitialized!: EventEmitter<Config>;\n @Event() configChange!: EventEmitter<ConfigChange>;\n\n componentWillLoad() {\n if (!this.baseUrl || !this.apiKey) {\n this.logger.error(\"baseUrl and apiKey are required\");\n return;\n }\n\n unidyState.apiKey = this.apiKey;\n unidyState.baseUrl = this.baseUrl;\n unidyState.locale = this.locale;\n unidyState.isConfigured = true;\n\n this.unidyInitialized.emit({\n apiKey: this.apiKey,\n baseUrl: this.baseUrl,\n locale: this.locale,\n mode: this.mode,\n });\n\n i18n.options.fallbackLng = this.fallbackLocale;\n\n this.loadCustomTranslations();\n unidyState.locale = this.locale;\n\n Auth.initialize(getUnidyClient());\n }\n\n // extend the list of properties that should be watched when new properties are added to the Config\n @Watch(\"mode\")\n @Watch(\"locale\")\n onPropChange(newValue: string, oldValue: string, propName: keyof Config) {\n if (oldValue === undefined) return;\n\n if (propName in unidyState) {\n (unidyState as Record<keyof Config, string>)[propName] = newValue;\n }\n\n this.configChange.emit({\n key: propName,\n value: newValue,\n previousValue: oldValue,\n });\n }\n\n render() {\n return <slot />;\n }\n\n private loadCustomTranslations() {\n if (this.customTranslations) {\n try {\n const translations = typeof this.customTranslations === \"string\" ? JSON.parse(this.customTranslations) : this.customTranslations;\n\n for (const lang in translations) {\n if (Object.hasOwn(translations, lang)) {\n i18n.addResourceBundle(lang, \"translation\", translations[lang], true, true);\n }\n }\n } catch (error) {\n Sentry.captureException(\"Failed to parse customTranslations\", error);\n }\n }\n }\n}\n"],"names":["i18n","Sentry.captureException"],"mappings":";;;;;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AAGnE,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACrB,YAAA,GAAG,EAAE,QAAQ;AACb,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,aAAa,EAAE,QAAQ;AACxB,SAAA,CAAC;;IAGJ,MAAM,GAAA;QACJ,OAAO,8DAAQ;;IAGT,sBAAsB,GAAA;AAC5B,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;AAC3B,YAAA,IAAI;gBACF,MAAM,YAAY,GAAG,OAAO,IAAI,CAAC,kBAAkB,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,kBAAkB;AAEhI,gBAAA,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;oBAC/B,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;AACrC,wBAAAA,QAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;;;;YAG/E,OAAO,KAAK,EAAE;AACd,gBAAAC,gBAAuB,CAAC,oCAAoC,EAAE,KAAK,CAAC;;;;;;;;;;;;"}
1
+ {"version":3,"file":"u-config.entry.esm.js","sources":["src/shared/components/config/config.tsx"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\nimport { Component, Prop, Watch, Event, type EventEmitter, h } from \"@stencil/core\";\nimport i18n from \"../../../i18n\";\nimport { unidyState } from \"../../store/unidy-store\";\nimport { Auth } from \"../../../auth\";\nimport { getUnidyClient } from \"../../../api/\";\nimport { UnidyComponent } from \"../../../logger\";\n\nexport interface Config {\n apiKey: string;\n baseUrl: string;\n locale: string;\n mode: \"production\" | \"development\";\n}\n\nexport interface ConfigChange {\n key: string;\n value: string;\n previousValue: string;\n}\n\ntype TranslationTree = {\n [key: string]: string | TranslationTree;\n};\n\n@Component({\n tag: \"u-config\",\n shadow: false,\n})\nexport class UnidyConfig extends UnidyComponent {\n @Prop() mode: \"production\" | \"development\" = \"production\";\n @Prop() baseUrl = \"\";\n @Prop() apiKey = \"\";\n @Prop() customTranslations: string | Record<string, TranslationTree> = \"\";\n @Prop() fallbackLocale = \"en\";\n @Prop() locale = \"en\";\n\n @Event() unidyInitialized!: EventEmitter<Config>;\n @Event() configChange!: EventEmitter<ConfigChange>;\n\n componentWillLoad() {\n if (!this.baseUrl || !this.apiKey) {\n this.logger.error(\"baseUrl and apiKey are required\");\n return;\n }\n\n unidyState.apiKey = this.apiKey;\n unidyState.baseUrl = this.baseUrl;\n unidyState.locale = this.locale;\n unidyState.isConfigured = true;\n\n this.unidyInitialized.emit({\n apiKey: this.apiKey,\n baseUrl: this.baseUrl,\n locale: this.locale,\n mode: this.mode,\n });\n\n i18n.options.fallbackLng = this.fallbackLocale;\n\n this.loadCustomTranslations();\n unidyState.locale = this.locale;\n\n Auth.initialize(getUnidyClient());\n }\n\n // extend the list of properties that should be watched when new properties are added to the Config\n @Watch(\"mode\")\n @Watch(\"locale\")\n onPropChange(newValue: string, oldValue: string, propName: keyof Config) {\n if (oldValue === undefined) return;\n\n if (propName in unidyState) {\n (unidyState as Record<keyof Config, string>)[propName] = newValue;\n }\n\n this.configChange.emit({\n key: propName,\n value: newValue,\n previousValue: oldValue,\n });\n }\n\n render() {\n return <slot />;\n }\n\n private loadCustomTranslations() {\n if (this.customTranslations) {\n try {\n const translations = typeof this.customTranslations === \"string\" ? JSON.parse(this.customTranslations) : this.customTranslations;\n\n for (const lang in translations) {\n if (Object.hasOwn(translations, lang)) {\n i18n.addResourceBundle(lang, \"translation\", translations[lang], true, true);\n }\n }\n } catch (error) {\n Sentry.captureException(\"Failed to parse customTranslations\", error);\n }\n }\n }\n}\n"],"names":["i18n","Sentry.captureException"],"mappings":";;;;;;;;;;;;MA6Ba,WAAY,GAAA,cAAQ,cAAc,CAAA;;;;;;;IACrC,IAAI,GAAiC,YAAY;IACjD,OAAO,GAAG,EAAE;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QAAQ;AACf,YAAA,aAAa,EAAE,QAAQ;AACxB,SAAA,CAAC;;IAGJ,MAAM,GAAA;QACJ,OAAO,8DAAQ;;IAGT,sBAAsB,GAAA;AAC5B,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;AAC3B,YAAA,IAAI;gBACF,MAAM,YAAY,GAAG,OAAO,IAAI,CAAC,kBAAkB,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,kBAAkB;AAEhI,gBAAA,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;oBAC/B,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;AACrC,wBAAAA,QAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;;;;YAG/E,OAAO,KAAK,EAAE;AACd,gBAAAC,gBAAuB,CAAC,oCAAoC,EAAE,KAAK,CAAC;;;;;;;;;;;;"}
@@ -1,20 +1,21 @@
1
- import { U as UnidyComponent, r as registerInstance, c as createEvent, h, d as captureException } from './index-Ci3aTmzp.js';
2
- import { i as instance } from './i18n-BR-AGAnn.js';
3
- import { u as unidyState } from './unidy-store-BldTAtO0.js';
4
- import './auth-store-BMqUdTpC.js';
5
- import { A as Auth } from './auth-DLKPv5Zm.js';
6
- import { g as getUnidyClient } from './index-DKaIwo59.js';
7
- import './index-Bjp1XO-f.js';
8
- import './profile-store-RmZB2PTc.js';
9
- import './flash-store-CEvWSG0c.js';
1
+ import { U as UnidyComponent, r as registerInstance, d as createEvent, h, e as captureException } from './index-BqL27K_R.js';
2
+ import { i as instance } from './i18n-BCI_ARJL.js';
3
+ import { u as unidyState } from './unidy-store-BwZym11Y.js';
4
+ import './index-Cz3idqu9.js';
5
+ import { g as getUnidyClient } from './index-gEcJztft.js';
6
+ import { A as Auth } from './auth-Che07PeV.js';
7
+ import './index-BnBstyfp.js';
8
+ import './auth-store-CapiC8gJ.js';
9
+ import './profile-store-DD6sq42i.js';
10
+ import './flash-store-DNcSEn2p.js';
10
11
  import './component-utils-D1lzXl_Z.js';
11
12
 
12
13
  const UnidyConfig = class extends UnidyComponent {
13
14
  constructor(hostRef) {
14
15
  super();
15
16
  registerInstance(this, hostRef);
16
- this.unidyInitialized = createEvent(this, "unidyInitialized");
17
- this.configChange = createEvent(this, "configChange");
17
+ this.unidyInitialized = createEvent(this, "unidyInitialized", 7);
18
+ this.configChange = createEvent(this, "configChange", 7);
18
19
  }
19
20
  mode = "production";
20
21
  baseUrl = "";
@@ -82,4 +83,4 @@ const UnidyConfig = class extends UnidyComponent {
82
83
  };
83
84
 
84
85
  export { UnidyConfig as u_config };
85
- //# sourceMappingURL=u-config.entry.js.map
86
+ //# sourceMappingURL=u-config.entry.esm.js.map