@keycloakify/angular 0.0.1-rc.0 → 0.0.1-rc.11

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 (497) hide show
  1. package/account/DefaultPage.d.ts +38 -0
  2. package/account/DefaultPage.js +34 -0
  3. package/account/KcContext.d.ts +1 -0
  4. package/account/KcContext.js +2 -0
  5. package/account/classes/component-reference.class.d.ts +6 -0
  6. package/account/classes/component-reference.class.js +3 -0
  7. package/account/containers/template.component.d.ts +26 -0
  8. package/account/containers/template.component.js +66 -0
  9. package/account/directives/kc-class.directive.d.ts +26 -0
  10. package/account/directives/kc-class.directive.js +137 -0
  11. package/account/i18n.d.ts +4 -0
  12. package/account/i18n.js +2 -0
  13. package/account/pages/account/account.component.d.ts +14 -0
  14. package/account/pages/account/account.component.js +39 -0
  15. package/account/pages/applications/applications.component.d.ts +13 -0
  16. package/account/pages/applications/applications.component.js +37 -0
  17. package/account/pages/federatedIdentity/federatedIdentity.component.d.ts +13 -0
  18. package/account/pages/federatedIdentity/federatedIdentity.component.js +36 -0
  19. package/account/pages/log/log.component.d.ts +13 -0
  20. package/account/pages/log/log.component.js +36 -0
  21. package/account/pages/password/password.component.d.ts +28 -0
  22. package/account/pages/password/password.component.js +107 -0
  23. package/account/pages/sessions/sessions.component.d.ts +13 -0
  24. package/account/pages/sessions/sessions.component.js +36 -0
  25. package/account/pages/totp/totp.component.d.ts +13 -0
  26. package/account/pages/totp/totp.component.js +37 -0
  27. package/account/providers/keycloakify-angular.providers.d.ts +15 -0
  28. package/account/providers/keycloakify-angular.providers.js +48 -0
  29. package/account/services/i18n.service.d.ts +6 -0
  30. package/account/services/i18n.service.js +12 -0
  31. package/account/services/resource-injector.service.d.ts +10 -0
  32. package/account/services/resource-injector.service.js +37 -0
  33. package/account/tokens/classes.token.d.ts +16 -0
  34. package/account/tokens/classes.token.js +3 -0
  35. package/account/tokens/i18n.token.d.ts +2 -0
  36. package/account/tokens/i18n.token.js +3 -0
  37. package/account/tokens/kc-context.token.d.ts +3 -0
  38. package/account/tokens/kc-context.token.js +3 -0
  39. package/lib/directives/attributes.directive.d.ts +8 -0
  40. package/lib/directives/attributes.directive.js +26 -0
  41. package/lib/models/script.model.js +1 -1
  42. package/lib/pipes/input-type.pipe.d.ts +7 -0
  43. package/lib/pipes/input-type.pipe.js +20 -0
  44. package/lib/pipes/is-array-with-empty-object.pipe.d.ts +7 -0
  45. package/lib/pipes/is-array-with-empty-object.pipe.js +20 -0
  46. package/lib/pipes/kc-sanitize.pipe.d.ts +9 -0
  47. package/lib/pipes/kc-sanitize.pipe.js +29 -0
  48. package/lib/pipes/to-array.pipe.d.ts +7 -0
  49. package/lib/pipes/to-array.pipe.js +21 -0
  50. package/lib/pipes/to-number.pipe.d.ts +7 -0
  51. package/lib/pipes/to-number.pipe.js +20 -0
  52. package/lib/services/resource-injector.service.d.ts +5 -2
  53. package/lib/services/resource-injector.service.js +19 -22
  54. package/lib/tokens/use-default-css.token.d.ts +2 -0
  55. package/lib/tokens/use-default-css.token.js +3 -0
  56. package/login/DefaultPage.d.ts +28 -28
  57. package/login/DefaultPage.js +74 -74
  58. package/login/KcContext.d.ts +1 -1
  59. package/login/KcContext.js +1 -1
  60. package/login/classes/component-reference.class.d.ts +1 -1
  61. package/login/classes/component-reference.class.js +1 -1
  62. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +7 -2
  63. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js +19 -36
  64. package/login/components/field-errors/field-errors.component.d.ts +7 -4
  65. package/login/components/field-errors/field-errors.component.js +23 -35
  66. package/login/components/group-label/group-label.component.d.ts +8 -3
  67. package/login/components/group-label/group-label.component.js +29 -41
  68. package/login/components/input-field-by-type/input-field-by-type.component.d.ts +7 -4
  69. package/login/components/input-field-by-type/input-field-by-type.component.js +33 -50
  70. package/login/components/input-tag/input-tag.component.d.ts +9 -4
  71. package/login/components/input-tag/input-tag.component.js +47 -64
  72. package/login/components/input-tag-selects/input-tag-selects.component.d.ts +11 -6
  73. package/login/components/input-tag-selects/input-tag-selects.component.js +41 -56
  74. package/login/components/logout-other-sessions/logout-other-sessions.component.d.ts +7 -2
  75. package/login/components/logout-other-sessions/logout-other-sessions.component.js +25 -36
  76. package/login/components/password-wrapper/password-wrapper.component.d.ts +8 -3
  77. package/login/components/password-wrapper/password-wrapper.component.js +27 -38
  78. package/login/components/select-tag/select-tag.component.d.ts +9 -4
  79. package/login/components/select-tag/select-tag.component.js +32 -47
  80. package/login/components/textarea-tag/textarea-tag.component.d.ts +7 -4
  81. package/login/components/textarea-tag/textarea-tag.component.js +28 -42
  82. package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +11 -5
  83. package/login/components/user-profile-form-fields/user-profile-form-fields.component.js +45 -57
  84. package/login/containers/template.component.d.ts +11 -8
  85. package/login/containers/template.component.js +36 -42
  86. package/login/directives/kc-class.directive.d.ts +5 -2
  87. package/login/directives/kc-class.directive.js +35 -43
  88. package/login/i18n.d.ts +2 -2
  89. package/login/i18n.js +1 -1
  90. package/login/pages/code/code.component.d.ts +8 -3
  91. package/login/pages/code/code.component.js +28 -31
  92. package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +8 -3
  93. package/login/pages/delete-account-confirm/delete-account-confirm.component.js +28 -31
  94. package/login/pages/delete-credential/delete-credential.component.d.ts +8 -3
  95. package/login/pages/delete-credential/delete-credential.component.js +28 -31
  96. package/login/pages/error/error.component.d.ts +8 -3
  97. package/login/pages/error/error.component.js +28 -31
  98. package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +9 -4
  99. package/login/pages/frontchannel-logout/frontchannel-logout.component.js +28 -31
  100. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +13 -3
  101. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js +40 -41
  102. package/login/pages/info/info.component.d.ts +8 -9
  103. package/login/pages/info/info.component.js +31 -43
  104. package/login/pages/login/login.component.d.ts +8 -3
  105. package/login/pages/login/login.component.js +33 -47
  106. package/login/pages/login-config-totp/login-config-totp.component.d.ts +8 -3
  107. package/login/pages/login-config-totp/login-config-totp.component.js +31 -42
  108. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +8 -3
  109. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js +28 -31
  110. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +8 -3
  111. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js +28 -31
  112. package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +8 -3
  113. package/login/pages/login-idp-link-email/login-idp-link-email.component.js +28 -31
  114. package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +8 -3
  115. package/login/pages/login-oauth-grant/login-oauth-grant.component.js +29 -33
  116. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +8 -3
  117. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js +28 -31
  118. package/login/pages/login-otp/login-otp.component.d.ts +8 -3
  119. package/login/pages/login-otp/login-otp.component.js +30 -33
  120. package/login/pages/login-page-expired/login-page-expired.component.d.ts +8 -3
  121. package/login/pages/login-page-expired/login-page-expired.component.js +27 -30
  122. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +9 -6
  123. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js +37 -44
  124. package/login/pages/login-password/login-password.component.d.ts +8 -3
  125. package/login/pages/login-password/login-password.component.js +31 -40
  126. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +8 -3
  127. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js +30 -38
  128. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +8 -3
  129. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js +30 -33
  130. package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +8 -3
  131. package/login/pages/login-reset-otp/login-reset-otp.component.js +29 -32
  132. package/login/pages/login-reset-password/login-reset-password.component.d.ts +8 -3
  133. package/login/pages/login-reset-password/login-reset-password.component.js +30 -33
  134. package/login/pages/login-update-password/login-update-password.component.d.ts +8 -3
  135. package/login/pages/login-update-password/login-update-password.component.js +32 -42
  136. package/login/pages/login-update-profile/login-update-profile.component.d.ts +13 -3
  137. package/login/pages/login-update-profile/login-update-profile.component.js +39 -39
  138. package/login/pages/login-username/login-username.component.d.ts +8 -3
  139. package/login/pages/login-username/login-username.component.js +32 -45
  140. package/login/pages/login-verify-email/login-verify-email.component.d.ts +8 -3
  141. package/login/pages/login-verify-email/login-verify-email.component.js +28 -31
  142. package/login/pages/login-x509-info/login-x509-info.component.d.ts +8 -3
  143. package/login/pages/login-x509-info/login-x509-info.component.js +28 -31
  144. package/login/pages/logout-confirm/logout-confirm.component.d.ts +8 -3
  145. package/login/pages/logout-confirm/logout-confirm.component.js +28 -31
  146. package/login/pages/register/register.component.d.ts +13 -3
  147. package/login/pages/register/register.component.js +41 -48
  148. package/login/pages/saml-post-form/saml-post-form.component.d.ts +9 -4
  149. package/login/pages/saml-post-form/saml-post-form.component.js +32 -35
  150. package/login/pages/select-authenticator/select-authenticator.component.d.ts +8 -3
  151. package/login/pages/select-authenticator/select-authenticator.component.js +29 -39
  152. package/login/pages/terms/terms.component.d.ts +8 -3
  153. package/login/pages/terms/terms.component.js +28 -31
  154. package/login/pages/update-email/update-email.component.d.ts +13 -3
  155. package/login/pages/update-email/update-email.component.js +40 -41
  156. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +9 -6
  157. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js +37 -50
  158. package/login/pages/webauthn-error/webauthn-error.component.d.ts +8 -3
  159. package/login/pages/webauthn-error/webauthn-error.component.js +32 -40
  160. package/login/pages/webauthn-register/webauthn-register.component.d.ts +9 -6
  161. package/login/pages/webauthn-register/webauthn-register.component.js +36 -46
  162. package/login/providers/keycloakify-angular.providers.d.ts +16 -0
  163. package/login/providers/keycloakify-angular.providers.js +53 -0
  164. package/login/services/i18n.service.d.ts +6 -0
  165. package/login/services/i18n.service.js +12 -0
  166. package/login/services/login-resource-injector.service.d.ts +4 -1
  167. package/login/services/login-resource-injector.service.js +22 -25
  168. package/login/services/submit.service.d.ts +9 -0
  169. package/login/services/submit.service.js +20 -0
  170. package/login/services/user-profile-form.service.d.ts +16 -12
  171. package/login/services/user-profile-form.service.js +293 -305
  172. package/{lib/providers/keycloakify-angular.providers.d.ts → login/tokens/classes.token.d.ts} +14 -37
  173. package/login/tokens/classes.token.js +3 -0
  174. package/login/tokens/i18n.token.d.ts +2 -0
  175. package/login/tokens/i18n.token.js +3 -0
  176. package/login/tokens/kc-context.token.d.ts +3 -0
  177. package/login/tokens/kc-context.token.js +3 -0
  178. package/login/tokens/make-user-confirm-password.token.d.ts +2 -0
  179. package/login/tokens/make-user-confirm-password.token.js +3 -0
  180. package/package.json +123 -181
  181. package/src/account/DefaultPage.ts +51 -0
  182. package/src/account/KcContext.ts +1 -0
  183. package/src/account/classes/component-reference.class.ts +6 -0
  184. package/src/account/containers/template.component.html +125 -0
  185. package/src/account/containers/template.component.ts +71 -0
  186. package/src/account/directives/kc-class.directive.ts +150 -0
  187. package/src/account/i18n.ts +4 -0
  188. package/src/account/pages/account/account.component.html +165 -0
  189. package/src/account/pages/account/account.component.ts +34 -0
  190. package/src/account/pages/applications/applications.component.html +156 -0
  191. package/src/account/pages/applications/applications.component.ts +32 -0
  192. package/src/account/pages/federatedIdentity/federatedIdentity.component.html +97 -0
  193. package/src/account/pages/federatedIdentity/federatedIdentity.component.ts +31 -0
  194. package/src/account/pages/log/log.component.html +44 -0
  195. package/src/account/pages/log/log.component.ts +31 -0
  196. package/src/account/pages/password/password.component.html +131 -0
  197. package/src/account/pages/password/password.component.ts +110 -0
  198. package/src/account/pages/sessions/sessions.component.html +63 -0
  199. package/src/account/pages/sessions/sessions.component.ts +31 -0
  200. package/src/account/pages/totp/totp.component.html +258 -0
  201. package/src/account/pages/totp/totp.component.ts +32 -0
  202. package/src/account/providers/keycloakify-angular.providers.ts +64 -0
  203. package/src/account/services/i18n.service.ts +7 -0
  204. package/src/account/services/resource-injector.service.ts +37 -0
  205. package/src/account/tokens/classes.token.ts +6 -0
  206. package/src/account/tokens/i18n.token.ts +3 -0
  207. package/src/account/tokens/kc-context.token.ts +4 -0
  208. package/src/{login → lib}/directives/attributes.directive.ts +2 -2
  209. package/src/{login → lib}/pipes/input-type.pipe.ts +4 -4
  210. package/src/lib/pipes/is-array-with-empty-object.pipe.ts +16 -0
  211. package/src/lib/pipes/kc-sanitize.pipe.ts +34 -0
  212. package/src/lib/pipes/to-array.pipe.ts +15 -0
  213. package/src/lib/pipes/to-number.pipe.ts +13 -0
  214. package/src/lib/services/resource-injector.service.ts +7 -7
  215. package/src/lib/tokens/use-default-css.token.ts +3 -0
  216. package/src/login/DefaultPage.ts +76 -76
  217. package/src/login/KcContext.ts +1 -1
  218. package/src/login/classes/component-reference.class.ts +1 -1
  219. package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +19 -19
  220. package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +15 -23
  221. package/src/login/components/field-errors/field-errors.component.html +10 -10
  222. package/src/login/components/field-errors/field-errors.component.ts +11 -16
  223. package/src/login/components/group-label/group-label.component.html +25 -25
  224. package/src/login/components/group-label/group-label.component.ts +17 -21
  225. package/src/login/components/input-field-by-type/input-field-by-type.component.html +57 -57
  226. package/src/login/components/input-field-by-type/input-field-by-type.component.ts +18 -35
  227. package/src/login/components/input-tag/input-tag.component.html +41 -45
  228. package/src/login/components/input-tag/input-tag.component.ts +25 -34
  229. package/src/login/components/input-tag-selects/input-tag-selects.component.html +22 -22
  230. package/src/login/components/input-tag-selects/input-tag-selects.component.ts +32 -43
  231. package/src/login/components/logout-other-sessions/logout-other-sessions.component.html +15 -15
  232. package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +13 -10
  233. package/src/login/components/password-wrapper/password-wrapper.component.html +13 -13
  234. package/src/login/components/password-wrapper/password-wrapper.component.ts +15 -25
  235. package/src/login/components/select-tag/select-tag.component.html +26 -26
  236. package/src/login/components/select-tag/select-tag.component.ts +23 -35
  237. package/src/login/components/textarea-tag/textarea-tag.component.html +13 -15
  238. package/src/login/components/textarea-tag/textarea-tag.component.ts +16 -25
  239. package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.html +70 -73
  240. package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +33 -47
  241. package/src/login/containers/template.component.html +183 -183
  242. package/src/login/containers/template.component.ts +26 -42
  243. package/src/login/directives/kc-class.directive.ts +11 -11
  244. package/src/login/i18n.ts +2 -2
  245. package/src/login/pages/code/code.component.html +21 -21
  246. package/src/login/pages/code/code.component.ts +17 -17
  247. package/src/login/pages/delete-account-confirm/delete-account-confirm.component.html +44 -42
  248. package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +17 -18
  249. package/src/login/pages/delete-credential/delete-credential.component.html +29 -29
  250. package/src/login/pages/delete-credential/delete-credential.component.ts +17 -24
  251. package/src/login/pages/error/error.component.html +20 -20
  252. package/src/login/pages/error/error.component.ts +17 -17
  253. package/src/login/pages/frontchannel-logout/frontchannel-logout.component.html +31 -31
  254. package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +17 -25
  255. package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +36 -36
  256. package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +34 -33
  257. package/src/login/pages/info/info.component.html +45 -45
  258. package/src/login/pages/info/info.component.ts +20 -37
  259. package/src/login/pages/login/login.component.html +194 -194
  260. package/src/login/pages/login/login.component.ts +22 -43
  261. package/src/login/pages/login-config-totp/login-config-totp.component.html +189 -179
  262. package/src/login/pages/login-config-totp/login-config-totp.component.ts +20 -39
  263. package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +35 -35
  264. package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +17 -24
  265. package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +34 -34
  266. package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +17 -26
  267. package/src/login/pages/login-idp-link-email/login-idp-link-email.component.html +32 -30
  268. package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +17 -24
  269. package/src/login/pages/login-oauth-grant/login-oauth-grant.component.html +83 -81
  270. package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +18 -26
  271. package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +57 -57
  272. package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +17 -26
  273. package/src/login/pages/login-otp/login-otp.component.html +96 -96
  274. package/src/login/pages/login-otp/login-otp.component.ts +19 -25
  275. package/src/login/pages/login-page-expired/login-page-expired.component.html +31 -31
  276. package/src/login/pages/login-page-expired/login-page-expired.component.ts +16 -23
  277. package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +183 -181
  278. package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +25 -32
  279. package/src/login/pages/login-password/login-password.component.html +82 -82
  280. package/src/login/pages/login-password/login-password.component.ts +20 -33
  281. package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +142 -142
  282. package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +19 -34
  283. package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +67 -67
  284. package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +19 -29
  285. package/src/login/pages/login-reset-otp/login-reset-otp.component.html +61 -59
  286. package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +18 -24
  287. package/src/login/pages/login-reset-password/login-reset-password.component.html +84 -84
  288. package/src/login/pages/login-reset-password/login-reset-password.component.ts +19 -26
  289. package/src/login/pages/login-update-password/login-update-password.component.html +107 -107
  290. package/src/login/pages/login-update-password/login-update-password.component.ts +21 -38
  291. package/src/login/pages/login-update-profile/login-update-profile.component.html +52 -53
  292. package/src/login/pages/login-update-profile/login-update-profile.component.ts +31 -32
  293. package/src/login/pages/login-username/login-username.component.html +146 -146
  294. package/src/login/pages/login-username/login-username.component.ts +21 -38
  295. package/src/login/pages/login-verify-email/login-verify-email.component.html +22 -22
  296. package/src/login/pages/login-verify-email/login-verify-email.component.ts +17 -24
  297. package/src/login/pages/login-x509-info/login-x509-info.component.html +96 -96
  298. package/src/login/pages/login-x509-info/login-x509-info.component.ts +17 -23
  299. package/src/login/pages/logout-confirm/logout-confirm.component.html +51 -51
  300. package/src/login/pages/logout-confirm/logout-confirm.component.ts +17 -23
  301. package/src/login/pages/register/register.component.html +113 -113
  302. package/src/login/pages/register/register.component.ts +33 -39
  303. package/src/login/pages/saml-post-form/saml-post-form.component.html +47 -48
  304. package/src/login/pages/saml-post-form/saml-post-form.component.ts +19 -27
  305. package/src/login/pages/select-authenticator/select-authenticator.component.html +43 -44
  306. package/src/login/pages/select-authenticator/select-authenticator.component.ts +18 -32
  307. package/src/login/pages/terms/terms.component.html +32 -32
  308. package/src/login/pages/terms/terms.component.ts +17 -23
  309. package/src/login/pages/update-email/update-email.component.html +52 -52
  310. package/src/login/pages/update-email/update-email.component.ts +33 -33
  311. package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +146 -148
  312. package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +26 -50
  313. package/src/login/pages/webauthn-error/webauthn-error.component.html +53 -53
  314. package/src/login/pages/webauthn-error/webauthn-error.component.ts +21 -32
  315. package/src/login/pages/webauthn-register/webauthn-register.component.html +73 -73
  316. package/src/login/pages/webauthn-register/webauthn-register.component.ts +26 -40
  317. package/src/login/providers/keycloakify-angular.providers.ts +68 -0
  318. package/src/login/services/i18n.service.ts +7 -0
  319. package/src/login/services/login-resource-injector.service.ts +13 -12
  320. package/src/login/services/submit.service.ts +12 -0
  321. package/src/login/services/user-profile-form.service.ts +185 -187
  322. package/src/login/tokens/classes.token.ts +6 -0
  323. package/src/login/tokens/i18n.token.ts +3 -0
  324. package/src/login/tokens/kc-context.token.ts +4 -0
  325. package/src/login/tokens/make-user-confirm-password.token.ts +5 -0
  326. package/src/tsconfig.json +6 -1
  327. package/stories/login/pages/login/login.stories.ts +146 -0
  328. package/lib/i18n.d.ts +0 -4
  329. package/lib/i18n.js +0 -6
  330. package/lib/i18n.js.map +0 -1
  331. package/lib/models/index.d.ts +0 -1
  332. package/lib/models/index.js +0 -2
  333. package/lib/models/index.js.map +0 -1
  334. package/lib/models/script.model.js.map +0 -1
  335. package/lib/providers/keycloakify-angular.providers.js +0 -58
  336. package/lib/providers/keycloakify-angular.providers.js.map +0 -1
  337. package/lib/public-api.d.ts +0 -10
  338. package/lib/public-api.js +0 -4
  339. package/lib/public-api.js.map +0 -1
  340. package/lib/services/i18n.service.d.ts +0 -3
  341. package/lib/services/i18n.service.js +0 -14
  342. package/lib/services/i18n.service.js.map +0 -1
  343. package/lib/services/index.d.ts +0 -2
  344. package/lib/services/index.js +0 -3
  345. package/lib/services/index.js.map +0 -1
  346. package/lib/services/resource-injector.service.js.map +0 -1
  347. package/login/DefaultPage.js.map +0 -1
  348. package/login/KcContext.js.map +0 -1
  349. package/login/classes/component-reference.class.js.map +0 -1
  350. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +0 -24
  351. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js.map +0 -1
  352. package/login/components/field-errors/field-errors.component.html +0 -15
  353. package/login/components/field-errors/field-errors.component.js.map +0 -1
  354. package/login/components/group-label/group-label.component.html +0 -30
  355. package/login/components/group-label/group-label.component.js.map +0 -1
  356. package/login/components/index.d.ts +0 -11
  357. package/login/components/index.js +0 -12
  358. package/login/components/index.js.map +0 -1
  359. package/login/components/input-field-by-type/input-field-by-type.component.html +0 -63
  360. package/login/components/input-field-by-type/input-field-by-type.component.js.map +0 -1
  361. package/login/components/input-tag/input-tag.component.html +0 -49
  362. package/login/components/input-tag/input-tag.component.js.map +0 -1
  363. package/login/components/input-tag-selects/input-tag-selects.component.html +0 -29
  364. package/login/components/input-tag-selects/input-tag-selects.component.js.map +0 -1
  365. package/login/components/logout-other-sessions/logout-other-sessions.component.html +0 -19
  366. package/login/components/logout-other-sessions/logout-other-sessions.component.js.map +0 -1
  367. package/login/components/password-wrapper/password-wrapper.component.html +0 -15
  368. package/login/components/password-wrapper/password-wrapper.component.js.map +0 -1
  369. package/login/components/select-tag/select-tag.component.html +0 -31
  370. package/login/components/select-tag/select-tag.component.js.map +0 -1
  371. package/login/components/textarea-tag/textarea-tag.component.html +0 -18
  372. package/login/components/textarea-tag/textarea-tag.component.js.map +0 -1
  373. package/login/components/user-profile-form-fields/user-profile-form-fields.component.html +0 -85
  374. package/login/components/user-profile-form-fields/user-profile-form-fields.component.js.map +0 -1
  375. package/login/containers/template.component.html +0 -203
  376. package/login/containers/template.component.js.map +0 -1
  377. package/login/directives/attributes.directive.d.ts +0 -5
  378. package/login/directives/attributes.directive.js +0 -34
  379. package/login/directives/attributes.directive.js.map +0 -1
  380. package/login/directives/index.d.ts +0 -2
  381. package/login/directives/index.js +0 -3
  382. package/login/directives/index.js.map +0 -1
  383. package/login/directives/kc-class.directive.js.map +0 -1
  384. package/login/i18n.js.map +0 -1
  385. package/login/pages/code/code.component.html +0 -26
  386. package/login/pages/code/code.component.js.map +0 -1
  387. package/login/pages/delete-account-confirm/delete-account-confirm.component.html +0 -46
  388. package/login/pages/delete-account-confirm/delete-account-confirm.component.js.map +0 -1
  389. package/login/pages/delete-credential/delete-credential.component.html +0 -35
  390. package/login/pages/delete-credential/delete-credential.component.js.map +0 -1
  391. package/login/pages/error/error.component.html +0 -25
  392. package/login/pages/error/error.component.js.map +0 -1
  393. package/login/pages/frontchannel-logout/frontchannel-logout.component.html +0 -35
  394. package/login/pages/frontchannel-logout/frontchannel-logout.component.js.map +0 -1
  395. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +0 -41
  396. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js.map +0 -1
  397. package/login/pages/info/info.component.html +0 -54
  398. package/login/pages/info/info.component.js.map +0 -1
  399. package/login/pages/login/login.component.html +0 -212
  400. package/login/pages/login/login.component.js.map +0 -1
  401. package/login/pages/login-config-totp/login-config-totp.component.html +0 -190
  402. package/login/pages/login-config-totp/login-config-totp.component.js.map +0 -1
  403. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +0 -41
  404. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js.map +0 -1
  405. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +0 -40
  406. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js.map +0 -1
  407. package/login/pages/login-idp-link-email/login-idp-link-email.component.html +0 -37
  408. package/login/pages/login-idp-link-email/login-idp-link-email.component.js.map +0 -1
  409. package/login/pages/login-oauth-grant/login-oauth-grant.component.html +0 -92
  410. package/login/pages/login-oauth-grant/login-oauth-grant.component.js.map +0 -1
  411. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +0 -63
  412. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js.map +0 -1
  413. package/login/pages/login-otp/login-otp.component.html +0 -103
  414. package/login/pages/login-otp/login-otp.component.js.map +0 -1
  415. package/login/pages/login-page-expired/login-page-expired.component.html +0 -35
  416. package/login/pages/login-page-expired/login-page-expired.component.js.map +0 -1
  417. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +0 -203
  418. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js.map +0 -1
  419. package/login/pages/login-password/login-password.component.html +0 -90
  420. package/login/pages/login-password/login-password.component.js.map +0 -1
  421. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +0 -155
  422. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js.map +0 -1
  423. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +0 -76
  424. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js.map +0 -1
  425. package/login/pages/login-reset-otp/login-reset-otp.component.html +0 -65
  426. package/login/pages/login-reset-otp/login-reset-otp.component.js.map +0 -1
  427. package/login/pages/login-reset-password/login-reset-password.component.html +0 -95
  428. package/login/pages/login-reset-password/login-reset-password.component.js.map +0 -1
  429. package/login/pages/login-update-password/login-update-password.component.html +0 -116
  430. package/login/pages/login-update-password/login-update-password.component.js.map +0 -1
  431. package/login/pages/login-update-profile/login-update-profile.component.html +0 -59
  432. package/login/pages/login-update-profile/login-update-profile.component.js.map +0 -1
  433. package/login/pages/login-username/login-username.component.html +0 -161
  434. package/login/pages/login-username/login-username.component.js.map +0 -1
  435. package/login/pages/login-verify-email/login-verify-email.component.html +0 -27
  436. package/login/pages/login-verify-email/login-verify-email.component.js.map +0 -1
  437. package/login/pages/login-x509-info/login-x509-info.component.html +0 -102
  438. package/login/pages/login-x509-info/login-x509-info.component.js.map +0 -1
  439. package/login/pages/logout-confirm/logout-confirm.component.html +0 -59
  440. package/login/pages/logout-confirm/logout-confirm.component.js.map +0 -1
  441. package/login/pages/register/register.component.html +0 -126
  442. package/login/pages/register/register.component.js.map +0 -1
  443. package/login/pages/saml-post-form/saml-post-form.component.html +0 -51
  444. package/login/pages/saml-post-form/saml-post-form.component.js.map +0 -1
  445. package/login/pages/select-authenticator/select-authenticator.component.html +0 -49
  446. package/login/pages/select-authenticator/select-authenticator.component.js.map +0 -1
  447. package/login/pages/terms/terms.component.html +0 -36
  448. package/login/pages/terms/terms.component.js.map +0 -1
  449. package/login/pages/update-email/update-email.component.html +0 -58
  450. package/login/pages/update-email/update-email.component.js.map +0 -1
  451. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +0 -162
  452. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js.map +0 -1
  453. package/login/pages/webauthn-error/webauthn-error.component.html +0 -60
  454. package/login/pages/webauthn-error/webauthn-error.component.js.map +0 -1
  455. package/login/pages/webauthn-register/webauthn-register.component.html +0 -82
  456. package/login/pages/webauthn-register/webauthn-register.component.js.map +0 -1
  457. package/login/pipes/advanced-msg-str.pipe.d.ts +0 -5
  458. package/login/pipes/advanced-msg-str.pipe.js +0 -31
  459. package/login/pipes/advanced-msg-str.pipe.js.map +0 -1
  460. package/login/pipes/index.d.ts +0 -6
  461. package/login/pipes/index.js +0 -7
  462. package/login/pipes/index.js.map +0 -1
  463. package/login/pipes/input-type.pipe.d.ts +0 -4
  464. package/login/pipes/input-type.pipe.js +0 -23
  465. package/login/pipes/input-type.pipe.js.map +0 -1
  466. package/login/pipes/kc-sanitize.pipe.d.ts +0 -7
  467. package/login/pipes/kc-sanitize.pipe.js +0 -36
  468. package/login/pipes/kc-sanitize.pipe.js.map +0 -1
  469. package/login/pipes/msg-str.pipe.d.ts +0 -6
  470. package/login/pipes/msg-str.pipe.js +0 -31
  471. package/login/pipes/msg-str.pipe.js.map +0 -1
  472. package/login/pipes/to-array.pipe.d.ts +0 -4
  473. package/login/pipes/to-array.pipe.js +0 -24
  474. package/login/pipes/to-array.pipe.js.map +0 -1
  475. package/login/pipes/to-number.pipe.d.ts +0 -4
  476. package/login/pipes/to-number.pipe.js +0 -23
  477. package/login/pipes/to-number.pipe.js.map +0 -1
  478. package/login/services/index.d.ts +0 -2
  479. package/login/services/index.js +0 -3
  480. package/login/services/index.js.map +0 -1
  481. package/login/services/login-resource-injector.service.js.map +0 -1
  482. package/login/services/user-profile-form.service.js.map +0 -1
  483. package/src/lib/i18n.ts +0 -9
  484. package/src/lib/models/index.ts +0 -1
  485. package/src/lib/providers/keycloakify-angular.providers.ts +0 -92
  486. package/src/lib/public-api.ts +0 -12
  487. package/src/lib/services/i18n.service.ts +0 -5
  488. package/src/lib/services/index.ts +0 -2
  489. package/src/login/components/index.ts +0 -11
  490. package/src/login/directives/index.ts +0 -2
  491. package/src/login/pipes/advanced-msg-str.pipe.ts +0 -13
  492. package/src/login/pipes/index.ts +0 -6
  493. package/src/login/pipes/kc-sanitize.pipe.ts +0 -36
  494. package/src/login/pipes/msg-str.pipe.ts +0 -14
  495. package/src/login/pipes/to-array.pipe.ts +0 -15
  496. package/src/login/pipes/to-number.pipe.ts +0 -13
  497. package/src/login/services/index.ts +0 -2
@@ -8,32 +8,30 @@ import {
8
8
  signal,
9
9
  Signal,
10
10
  WritableSignal
11
- } from "@angular/core";
12
- import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
11
+ } from '@angular/core';
12
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
13
+ import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n.token';
14
+ import { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context.token';
15
+ import { DO_MAKE_USER_CONFIRM_PASSWORD } from '@keycloakify/angular/login/tokens/make-user-confirm-password.token';
13
16
  import {
14
- DO_MAKE_USER_CONFIRM_PASSWORD,
15
- I18N,
16
- KC_CONTEXT
17
- } from "@keycloakify/angular/lib/public-api";
18
- import {
19
- Attribute,
20
- KcContext,
21
- PasswordPolicies,
22
- Validators
23
- } from "keycloakify/login/KcContext";
17
+ type Attribute,
18
+ type PasswordPolicies,
19
+ type Validators
20
+ } from 'keycloakify/login/KcContext';
24
21
  import type {
25
22
  KcContextLike as KcContextLike_i18n,
26
23
  MessageKey_defaultSet
27
- } from "keycloakify/login/i18n/noJsx";
28
- import type { I18n } from "../i18n";
29
- import { emailRegexp } from "keycloakify/tools/emailRegExp";
30
- import { formatNumber } from "keycloakify/tools/formatNumber";
31
- import { structuredCloneButFunctions } from "keycloakify/tools/structuredCloneButFunctions";
32
- import { assert, id } from "tsafe";
33
- import { LoginResourceInjectorService } from "./login-resource-injector.service";
24
+ } from 'keycloakify/login/i18n/noJsx';
25
+ import { emailRegexp } from 'keycloakify/tools/emailRegExp';
26
+ import { formatNumber } from 'keycloakify/tools/formatNumber';
27
+ import { structuredCloneButFunctions } from 'keycloakify/tools/structuredCloneButFunctions';
28
+ import { assert, id } from 'tsafe';
29
+ import { type KcContext } from '../KcContext';
30
+ import type { I18n } from '../i18n';
31
+ import { LoginResourceInjectorService } from './login-resource-injector.service';
34
32
 
35
33
  type KcContextLike_useGetErrors = KcContextLike_i18n & {
36
- messagesPerField: Pick<KcContext["messagesPerField"], "existsError" | "get">;
34
+ messagesPerField: Pick<KcContext['messagesPerField'], 'existsError' | 'get'>;
37
35
  passwordPolicies?: PasswordPolicies;
38
36
  };
39
37
  export namespace FormFieldError {
@@ -45,20 +43,20 @@ export namespace FormFieldError {
45
43
 
46
44
  export namespace Source {
47
45
  export type Validator = {
48
- type: "validator";
46
+ type: 'validator';
49
47
  name: keyof Validators;
50
48
  };
51
49
  export type PasswordPolicy = {
52
- type: "passwordPolicy";
50
+ type: 'passwordPolicy';
53
51
  name: keyof PasswordPolicies;
54
52
  };
55
53
  export type Server = {
56
- type: "server";
54
+ type: 'server';
57
55
  };
58
56
 
59
57
  export type Other = {
60
- type: "other";
61
- rule: "passwordConfirmMatchesPassword" | "requiredField";
58
+ type: 'other';
59
+ rule: 'passwordConfirmMatchesPassword' | 'requiredField';
62
60
  };
63
61
  }
64
62
  }
@@ -104,23 +102,23 @@ type FormState = {
104
102
  };
105
103
  export type FormAction =
106
104
  | {
107
- action: "update";
105
+ action: 'update';
108
106
  name: string;
109
107
  valueOrValues: string | string[];
110
108
  /** Default false */
111
109
  displayErrorsImmediately?: boolean;
112
110
  }
113
111
  | {
114
- action: "focus lost";
112
+ action: 'focus lost';
115
113
  name: string;
116
114
  fieldIndex: number | undefined;
117
115
  };
118
116
 
119
- @Injectable({ providedIn: "root" })
117
+ @Injectable({ providedIn: 'root' })
120
118
  export class UserProfileFormService {
121
119
  private kcContext: KcContextLike =
122
- inject<Extract<KcContext, { pageId: "register.ftl" }>>(KC_CONTEXT);
123
- private i18n = inject<I18n>(I18N);
120
+ inject<Extract<KcContext, { pageId: 'register.ftl' }>>(KC_LOGIN_CONTEXT);
121
+ private i18n = inject<I18n>(LOGIN_I18N);
124
122
  private doMakeUserConfirmPassword = inject(DO_MAKE_USER_CONFIRM_PASSWORD);
125
123
  private loginResourceInjectorService = inject(LoginResourceInjectorService);
126
124
  private sanitizer: DomSanitizer = inject(DomSanitizer);
@@ -128,22 +126,22 @@ export class UserProfileFormService {
128
126
  const attributes: Attribute[] = (() => {
129
127
  mock_user_profile_attributes_for_older_keycloak_versions: {
130
128
  if (
131
- "profile" in this.kcContext &&
132
- "attributesByName" in this.kcContext.profile &&
129
+ 'profile' in this.kcContext &&
130
+ 'attributesByName' in this.kcContext.profile &&
133
131
  Object.keys(this.kcContext.profile.attributesByName).length !== 0
134
132
  ) {
135
133
  break mock_user_profile_attributes_for_older_keycloak_versions;
136
134
  }
137
135
 
138
136
  if (
139
- "register" in this.kcContext &&
137
+ 'register' in this.kcContext &&
140
138
  this.kcContext.register instanceof Object &&
141
- "formData" in this.kcContext.register
139
+ 'formData' in this.kcContext.register
142
140
  ) {
143
141
  //NOTE: Handle legacy register.ftl page
144
- return (["firstName", "lastName", "email", "username"] as const)
142
+ return (['firstName', 'lastName', 'email', 'username'] as const)
145
143
  .filter(name =>
146
- name !== "username"
144
+ name !== 'username'
147
145
  ? true
148
146
  : !this.kcContext.realm.registrationEmailAsUsername
149
147
  )
@@ -155,17 +153,17 @@ export class UserProfileFormService {
155
153
  ),
156
154
  required: true,
157
155
  value:
158
- (this.kcContext as any).register.formData[name] ?? "",
156
+ (this.kcContext as any).register.formData[name] ?? '',
159
157
  html5DataAnnotations: {},
160
158
  readOnly: false,
161
159
  validators: {},
162
160
  annotations: {},
163
161
  autocomplete: (() => {
164
162
  switch (name) {
165
- case "email":
166
- return "email";
167
- case "username":
168
- return "username";
163
+ case 'email':
164
+ return 'email';
165
+ case 'username':
166
+ return 'username';
169
167
  default:
170
168
  return undefined;
171
169
  }
@@ -174,11 +172,11 @@ export class UserProfileFormService {
174
172
  );
175
173
  }
176
174
 
177
- if ("user" in this.kcContext && this.kcContext.user instanceof Object) {
175
+ if ('user' in this.kcContext && this.kcContext.user instanceof Object) {
178
176
  //NOTE: Handle legacy login-update-profile.ftl
179
- return (["username", "email", "firstName", "lastName"] as const)
177
+ return (['username', 'email', 'firstName', 'lastName'] as const)
180
178
  .filter(name =>
181
- name !== "username"
179
+ name !== 'username'
182
180
  ? true
183
181
  : (this.kcContext as any).user.editUsernameAllowed
184
182
  )
@@ -189,17 +187,17 @@ export class UserProfileFormService {
189
187
  `\${${name}}`
190
188
  ),
191
189
  required: true,
192
- value: (this.kcContext as any).user[name] ?? "",
190
+ value: (this.kcContext as any).user[name] ?? '',
193
191
  html5DataAnnotations: {},
194
192
  readOnly: false,
195
193
  validators: {},
196
194
  annotations: {},
197
195
  autocomplete: (() => {
198
196
  switch (name) {
199
- case "email":
200
- return "email";
201
- case "username":
202
- return "username";
197
+ case 'email':
198
+ return 'email';
199
+ case 'username':
200
+ return 'username';
203
201
  default:
204
202
  return undefined;
205
203
  }
@@ -208,24 +206,24 @@ export class UserProfileFormService {
208
206
  );
209
207
  }
210
208
 
211
- if ("email" in this.kcContext && this.kcContext.email instanceof Object) {
209
+ if ('email' in this.kcContext && this.kcContext.email instanceof Object) {
212
210
  //NOTE: Handle legacy update-email.ftl
213
211
  return [
214
212
  id<Attribute>({
215
- name: "email",
213
+ name: 'email',
216
214
  displayName: id<`\${${MessageKey_defaultSet}}`>(`\${email}`),
217
215
  required: true,
218
- value: (this.kcContext.email as any).value ?? "",
216
+ value: (this.kcContext.email as any).value ?? '',
219
217
  html5DataAnnotations: {},
220
218
  readOnly: false,
221
219
  validators: {},
222
220
  annotations: {},
223
- autocomplete: "email"
221
+ autocomplete: 'email'
224
222
  })
225
223
  ];
226
224
  }
227
225
 
228
- assert(false, "Unable to mock user profile from the current kcContext");
226
+ assert(false, 'Unable to mock user profile from the current kcContext');
229
227
  }
230
228
 
231
229
  return Object.values(this.kcContext.profile.attributesByName).map(
@@ -235,7 +233,7 @@ export class UserProfileFormService {
235
233
  // Retro-compatibility and consistency patches
236
234
  attributes.forEach(attribute => {
237
235
  patch_legacy_group: {
238
- if (typeof attribute.group !== "string") {
236
+ if (typeof attribute.group !== 'string') {
239
237
  break patch_legacy_group;
240
238
  }
241
239
 
@@ -259,7 +257,7 @@ export class UserProfileFormService {
259
257
  // @ts-expect-error
260
258
  delete attribute.groupAnnotations;
261
259
 
262
- if (group === "") {
260
+ if (group === '') {
263
261
  break patch_legacy_group;
264
262
  }
265
263
 
@@ -277,7 +275,7 @@ export class UserProfileFormService {
277
275
  attribute.validators.options !== undefined &&
278
276
  attribute.annotations.inputType === undefined
279
277
  ) {
280
- attribute.annotations.inputType = "select";
278
+ attribute.annotations.inputType = 'select';
281
279
  }
282
280
 
283
281
  // Consistency patch on values/value property
@@ -305,8 +303,8 @@ export class UserProfileFormService {
305
303
  if (
306
304
  attribute.name !==
307
305
  (this.kcContext.realm.registrationEmailAsUsername
308
- ? "email"
309
- : "username")
306
+ ? 'email'
307
+ : 'username')
310
308
  ) {
311
309
  // NOTE: We want to add password and password-confirm after the field that identifies the user.
312
310
  // It's either email or username.
@@ -317,25 +315,25 @@ export class UserProfileFormService {
317
315
  i + 1,
318
316
  0,
319
317
  {
320
- name: "password",
321
- displayName: id<`\${${MessageKey_defaultSet}}`>("${password}"),
318
+ name: 'password',
319
+ displayName: id<`\${${MessageKey_defaultSet}}`>('${password}'),
322
320
  required: true,
323
321
  readOnly: false,
324
322
  validators: {},
325
323
  annotations: {},
326
- autocomplete: "new-password",
324
+ autocomplete: 'new-password',
327
325
  html5DataAnnotations: {}
328
326
  },
329
327
  {
330
- name: "password-confirm",
328
+ name: 'password-confirm',
331
329
  displayName:
332
- id<`\${${MessageKey_defaultSet}}`>("${passwordConfirm}"),
330
+ id<`\${${MessageKey_defaultSet}}`>('${passwordConfirm}'),
333
331
  required: true,
334
332
  readOnly: false,
335
333
  validators: {},
336
334
  annotations: {},
337
335
  html5DataAnnotations: {},
338
- autocomplete: "new-password"
336
+ autocomplete: 'new-password'
339
337
  }
340
338
  );
341
339
  });
@@ -351,7 +349,7 @@ export class UserProfileFormService {
351
349
  break handle_multi_valued_attribute;
352
350
  }
353
351
 
354
- const values = attribute.values?.length ? attribute.values : [""];
352
+ const values = attribute.values?.length ? attribute.values : [''];
355
353
 
356
354
  apply_validator_min_range: {
357
355
  if (this.getIsMultivaluedSingleField({ attribute })) {
@@ -373,7 +371,7 @@ export class UserProfileFormService {
373
371
  const min = parseInt(`${minStr}`);
374
372
 
375
373
  for (let index = values.length; index < min; index++) {
376
- values.push("");
374
+ values.push('');
377
375
  }
378
376
  }
379
377
 
@@ -387,7 +385,7 @@ export class UserProfileFormService {
387
385
 
388
386
  initialFormFieldState.push({
389
387
  attribute,
390
- valueOrValues: attribute.value ?? ""
388
+ valueOrValues: attribute.value ?? ''
391
389
  });
392
390
  }
393
391
 
@@ -425,7 +423,7 @@ export class UserProfileFormService {
425
423
  }) => ({
426
424
  displayableErrors: errors.filter(error => {
427
425
  const hasLostFocusAtLeastOnce =
428
- typeof hasLostFocusAtLeastOnceOrArr === "boolean"
426
+ typeof hasLostFocusAtLeastOnceOrArr === 'boolean'
429
427
  ? hasLostFocusAtLeastOnceOrArr
430
428
  : error.fieldIndex !== undefined
431
429
  ? hasLostFocusAtLeastOnceOrArr[error.fieldIndex]
@@ -434,64 +432,64 @@ export class UserProfileFormService {
434
432
  ];
435
433
  let value = false;
436
434
  switch (error.source.type) {
437
- case "server":
435
+ case 'server':
438
436
  value = true;
439
437
  break;
440
- case "other":
438
+ case 'other':
441
439
  switch (error.source.rule) {
442
- case "requiredField":
440
+ case 'requiredField':
443
441
  value = hasLostFocusAtLeastOnce;
444
442
  break;
445
- case "passwordConfirmMatchesPassword":
443
+ case 'passwordConfirmMatchesPassword':
446
444
  value = hasLostFocusAtLeastOnce;
447
445
  break;
448
446
  }
449
447
  // assert<Equals<typeof error.source.rule, never>>(false);
450
448
  break;
451
- case "passwordPolicy":
449
+ case 'passwordPolicy':
452
450
  switch (error.source.name) {
453
- case "length":
451
+ case 'length':
454
452
  value = hasLostFocusAtLeastOnce;
455
453
  break;
456
- case "digits":
454
+ case 'digits':
457
455
  value = hasLostFocusAtLeastOnce;
458
456
  break;
459
- case "lowerCase":
457
+ case 'lowerCase':
460
458
  value = hasLostFocusAtLeastOnce;
461
459
  break;
462
- case "upperCase":
460
+ case 'upperCase':
463
461
  value = hasLostFocusAtLeastOnce;
464
462
  break;
465
- case "specialChars":
463
+ case 'specialChars':
466
464
  value = hasLostFocusAtLeastOnce;
467
465
  break;
468
- case "notUsername":
466
+ case 'notUsername':
469
467
  value = true;
470
468
  break;
471
- case "notEmail":
469
+ case 'notEmail':
472
470
  value = true;
473
471
  break;
474
472
  }
475
473
  // assert<Equals<typeof error.source, never>>(false);
476
474
  break;
477
- case "validator":
475
+ case 'validator':
478
476
  switch (error.source.name) {
479
- case "length":
477
+ case 'length':
480
478
  value = hasLostFocusAtLeastOnce;
481
479
  break;
482
- case "pattern":
480
+ case 'pattern':
483
481
  value = hasLostFocusAtLeastOnce;
484
482
  break;
485
- case "email":
483
+ case 'email':
486
484
  value = hasLostFocusAtLeastOnce;
487
485
  break;
488
- case "integer":
486
+ case 'integer':
489
487
  value = hasLostFocusAtLeastOnce;
490
488
  break;
491
- case "multivalued":
489
+ case 'multivalued':
492
490
  value = hasLostFocusAtLeastOnce;
493
491
  break;
494
- case "options":
492
+ case 'options':
495
493
  value = hasLostFocusAtLeastOnce;
496
494
  break;
497
495
  }
@@ -513,9 +511,9 @@ export class UserProfileFormService {
513
511
  constructor() {
514
512
  this.loginResourceInjectorService.insertAdditionalScripts(
515
513
  Object.keys(this.kcContext.profile?.html5DataAnnotations ?? {})
516
- .filter(key => key !== "kcMultivalued" && key !== "kcNumberFormat") // NOTE: Keycloakify handles it.
514
+ .filter(key => key !== 'kcMultivalued' && key !== 'kcNumberFormat') // NOTE: Keycloakify handles it.
517
515
  .map(key => ({
518
- type: "module",
516
+ type: 'module',
519
517
  src: `${this.kcContext.url.resourcesPath}/js/${key}.js`,
520
518
  id: `${this.kcContext.url.resourcesPath}/js/${key}.js`
521
519
  }))
@@ -530,7 +528,7 @@ export class UserProfileFormService {
530
528
  );
531
529
  assert(formFieldState !== undefined);
532
530
  switch (formAction.action) {
533
- case "update":
531
+ case 'update':
534
532
  formFieldState.valueOrValues = formAction.valueOrValues;
535
533
 
536
534
  apply_formatters: {
@@ -570,7 +568,7 @@ export class UserProfileFormService {
570
568
  ? formAction.valueOrValues.map((...[, index]) => index)
571
569
  : [undefined]) {
572
570
  this.dispatchFormAction({
573
- action: "focus lost",
571
+ action: 'focus lost',
574
572
  name: formAction.name,
575
573
  fieldIndex
576
574
  });
@@ -582,13 +580,13 @@ export class UserProfileFormService {
582
580
  break update_password_confirm;
583
581
  }
584
582
 
585
- if (formAction.name !== "password") {
583
+ if (formAction.name !== 'password') {
586
584
  break update_password_confirm;
587
585
  }
588
586
 
589
587
  this.dispatchFormAction({
590
- action: "update",
591
- name: "password-confirm",
588
+ action: 'update',
589
+ name: 'password-confirm',
592
590
  valueOrValues: formAction.valueOrValues,
593
591
  displayErrorsImmediately: formAction.displayErrorsImmediately
594
592
  });
@@ -599,16 +597,16 @@ export class UserProfileFormService {
599
597
  break trigger_password_confirm_validation_on_password_change;
600
598
  }
601
599
 
602
- if (formAction.name !== "password") {
600
+ if (formAction.name !== 'password') {
603
601
  break trigger_password_confirm_validation_on_password_change;
604
602
  }
605
603
 
606
604
  this.dispatchFormAction({
607
- action: "update",
608
- name: "password-confirm",
605
+ action: 'update',
606
+ name: 'password-confirm',
609
607
  valueOrValues: (() => {
610
608
  const formFieldState = state.formFieldStates.find(
611
- ({ attribute }) => attribute.name === "password-confirm"
609
+ ({ attribute }) => attribute.name === 'password-confirm'
612
610
  );
613
611
 
614
612
  assert(formFieldState !== undefined);
@@ -620,7 +618,7 @@ export class UserProfileFormService {
620
618
  }
621
619
 
622
620
  break;
623
- case "focus lost":
621
+ case 'focus lost':
624
622
  if (formFieldState.hasLostFocusAtLeastOnce instanceof Array) {
625
623
  const { fieldIndex } = formAction;
626
624
  assert(fieldIndex !== undefined);
@@ -643,7 +641,7 @@ export class UserProfileFormService {
643
641
  private getIsMultivaluedSingleField(params: { attribute: Attribute }) {
644
642
  const { attribute } = params;
645
643
 
646
- return attribute.annotations.inputType?.startsWith("multiselect") ?? false;
644
+ return attribute.annotations.inputType?.startsWith('multiselect') ?? false;
647
645
  }
648
646
 
649
647
  private getErrors(params: {
@@ -692,7 +690,7 @@ export class UserProfileFormService {
692
690
 
693
691
  server_side_error: {
694
692
  if (attribute.multivalued) {
695
- const defaultValues = attribute.values?.length ? attribute.values : [""];
693
+ const defaultValues = attribute.values?.length ? attribute.values : [''];
696
694
 
697
695
  assert(valueOrValues instanceof Array);
698
696
 
@@ -705,9 +703,9 @@ export class UserProfileFormService {
705
703
  break server_side_error;
706
704
  }
707
705
  } else {
708
- const defaultValue = attribute.value ?? "";
706
+ const defaultValue = attribute.value ?? '';
709
707
 
710
- assert(typeof valueOrValues === "string");
708
+ assert(typeof valueOrValues === 'string');
711
709
 
712
710
  const value = valueOrValues;
713
711
 
@@ -738,7 +736,7 @@ export class UserProfileFormService {
738
736
  ),
739
737
  fieldIndex: undefined,
740
738
  source: {
741
- type: "server"
739
+ type: 'server'
742
740
  }
743
741
  }
744
742
  ];
@@ -784,8 +782,8 @@ export class UserProfileFormService {
784
782
  return specificValueErrors
785
783
  .filter(error => {
786
784
  if (
787
- error.source.type === "other" &&
788
- error.source.rule === "requiredField"
785
+ error.source.type === 'other' &&
786
+ error.source.rule === 'requiredField'
789
787
  ) {
790
788
  return false;
791
789
  }
@@ -806,11 +804,11 @@ export class UserProfileFormService {
806
804
  break required_field;
807
805
  }
808
806
 
809
- if (values.every(value => value !== "")) {
807
+ if (values.every(value => value !== '')) {
810
808
  break required_field;
811
809
  }
812
810
 
813
- const msgArgs = ["error-user-attribute-required"] as const;
811
+ const msgArgs = ['error-user-attribute-required'] as const;
814
812
 
815
813
  errors.push({
816
814
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -819,8 +817,8 @@ export class UserProfileFormService {
819
817
  errorMessageStr: msgStr(...msgArgs),
820
818
  fieldIndex: undefined,
821
819
  source: {
822
- type: "other",
823
- rule: "requiredField"
820
+ type: 'other',
821
+ rule: 'requiredField'
824
822
  }
825
823
  });
826
824
  }
@@ -837,7 +835,7 @@ export class UserProfileFormService {
837
835
  break handle_multi_valued_single_field;
838
836
  }
839
837
 
840
- const validatorName = "multivalued";
838
+ const validatorName = 'multivalued';
841
839
 
842
840
  const validator = attribute.validators[validatorName];
843
841
 
@@ -866,7 +864,7 @@ export class UserProfileFormService {
866
864
  }
867
865
 
868
866
  const msgArgs = [
869
- "error-invalid-multivalued-size",
867
+ 'error-invalid-multivalued-size',
870
868
  `${min}`,
871
869
  `${max}`
872
870
  ] as const;
@@ -879,21 +877,21 @@ export class UserProfileFormService {
879
877
  errorMessageStr: msgStr(...msgArgs),
880
878
  fieldIndex: undefined,
881
879
  source: {
882
- type: "validator",
880
+ type: 'validator',
883
881
  name: validatorName
884
882
  }
885
883
  }
886
884
  ];
887
885
  }
888
886
 
889
- assert(typeof valueOrValues === "string");
887
+ assert(typeof valueOrValues === 'string');
890
888
 
891
889
  const value = valueOrValues;
892
890
 
893
891
  const errors: FormFieldError[] = [];
894
892
 
895
893
  check_password_policies: {
896
- if (attributeName !== "password") {
894
+ if (attributeName !== 'password') {
897
895
  break check_password_policies;
898
896
  }
899
897
 
@@ -902,7 +900,7 @@ export class UserProfileFormService {
902
900
  }
903
901
 
904
902
  check_password_policy_x: {
905
- const policyName = "length";
903
+ const policyName = 'length';
906
904
 
907
905
  const policy = passwordPolicies[policyName];
908
906
 
@@ -917,7 +915,7 @@ export class UserProfileFormService {
917
915
  }
918
916
 
919
917
  const msgArgs = [
920
- "invalidPasswordMinLengthMessage",
918
+ 'invalidPasswordMinLengthMessage',
921
919
  `${minLength}`
922
920
  ] as const;
923
921
 
@@ -928,14 +926,14 @@ export class UserProfileFormService {
928
926
  errorMessageStr: msgStr(...msgArgs),
929
927
  fieldIndex: undefined,
930
928
  source: {
931
- type: "passwordPolicy",
929
+ type: 'passwordPolicy',
932
930
  name: policyName
933
931
  }
934
932
  });
935
933
  }
936
934
 
937
935
  check_password_policy_x: {
938
- const policyName = "digits";
936
+ const policyName = 'digits';
939
937
 
940
938
  const policy = passwordPolicies[policyName];
941
939
 
@@ -946,14 +944,14 @@ export class UserProfileFormService {
946
944
  const minNumberOfDigits = policy;
947
945
 
948
946
  if (
949
- value.split("").filter(char => !isNaN(parseInt(char))).length >=
947
+ value.split('').filter(char => !isNaN(parseInt(char))).length >=
950
948
  minNumberOfDigits
951
949
  ) {
952
950
  break check_password_policy_x;
953
951
  }
954
952
 
955
953
  const msgArgs = [
956
- "invalidPasswordMinDigitsMessage",
954
+ 'invalidPasswordMinDigitsMessage',
957
955
  `${minNumberOfDigits}`
958
956
  ] as const;
959
957
 
@@ -964,14 +962,14 @@ export class UserProfileFormService {
964
962
  errorMessageStr: msgStr(...msgArgs),
965
963
  fieldIndex: undefined,
966
964
  source: {
967
- type: "passwordPolicy",
965
+ type: 'passwordPolicy',
968
966
  name: policyName
969
967
  }
970
968
  });
971
969
  }
972
970
 
973
971
  check_password_policy_x: {
974
- const policyName = "lowerCase";
972
+ const policyName = 'lowerCase';
975
973
 
976
974
  const policy = passwordPolicies[policyName];
977
975
 
@@ -983,7 +981,7 @@ export class UserProfileFormService {
983
981
 
984
982
  if (
985
983
  value
986
- .split("")
984
+ .split('')
987
985
  .filter(
988
986
  char =>
989
987
  char === char.toLowerCase() && char !== char.toUpperCase()
@@ -993,7 +991,7 @@ export class UserProfileFormService {
993
991
  }
994
992
 
995
993
  const msgArgs = [
996
- "invalidPasswordMinLowerCaseCharsMessage",
994
+ 'invalidPasswordMinLowerCaseCharsMessage',
997
995
  `${minNumberOfLowerCaseChar}`
998
996
  ] as const;
999
997
 
@@ -1004,14 +1002,14 @@ export class UserProfileFormService {
1004
1002
  errorMessageStr: msgStr(...msgArgs),
1005
1003
  fieldIndex: undefined,
1006
1004
  source: {
1007
- type: "passwordPolicy",
1005
+ type: 'passwordPolicy',
1008
1006
  name: policyName
1009
1007
  }
1010
1008
  });
1011
1009
  }
1012
1010
 
1013
1011
  check_password_policy_x: {
1014
- const policyName = "upperCase";
1012
+ const policyName = 'upperCase';
1015
1013
 
1016
1014
  const policy = passwordPolicies[policyName];
1017
1015
 
@@ -1023,7 +1021,7 @@ export class UserProfileFormService {
1023
1021
 
1024
1022
  if (
1025
1023
  value
1026
- .split("")
1024
+ .split('')
1027
1025
  .filter(
1028
1026
  char =>
1029
1027
  char === char.toUpperCase() && char !== char.toLowerCase()
@@ -1033,7 +1031,7 @@ export class UserProfileFormService {
1033
1031
  }
1034
1032
 
1035
1033
  const msgArgs = [
1036
- "invalidPasswordMinUpperCaseCharsMessage",
1034
+ 'invalidPasswordMinUpperCaseCharsMessage',
1037
1035
  `${minNumberOfUpperCaseChar}`
1038
1036
  ] as const;
1039
1037
 
@@ -1044,14 +1042,14 @@ export class UserProfileFormService {
1044
1042
  errorMessageStr: msgStr(...msgArgs),
1045
1043
  fieldIndex: undefined,
1046
1044
  source: {
1047
- type: "passwordPolicy",
1045
+ type: 'passwordPolicy',
1048
1046
  name: policyName
1049
1047
  }
1050
1048
  });
1051
1049
  }
1052
1050
 
1053
1051
  check_password_policy_x: {
1054
- const policyName = "specialChars";
1052
+ const policyName = 'specialChars';
1055
1053
 
1056
1054
  const policy = passwordPolicies[policyName];
1057
1055
 
@@ -1062,14 +1060,14 @@ export class UserProfileFormService {
1062
1060
  const minNumberOfSpecialChar = policy;
1063
1061
 
1064
1062
  if (
1065
- value.split("").filter(char => !char.match(/[a-zA-Z0-9]/)).length >=
1063
+ value.split('').filter(char => !char.match(/[a-zA-Z0-9]/)).length >=
1066
1064
  minNumberOfSpecialChar
1067
1065
  ) {
1068
1066
  break check_password_policy_x;
1069
1067
  }
1070
1068
 
1071
1069
  const msgArgs = [
1072
- "invalidPasswordMinSpecialCharsMessage",
1070
+ 'invalidPasswordMinSpecialCharsMessage',
1073
1071
  `${minNumberOfSpecialChar}`
1074
1072
  ] as const;
1075
1073
 
@@ -1080,14 +1078,14 @@ export class UserProfileFormService {
1080
1078
  errorMessageStr: msgStr(...msgArgs),
1081
1079
  fieldIndex: undefined,
1082
1080
  source: {
1083
- type: "passwordPolicy",
1081
+ type: 'passwordPolicy',
1084
1082
  name: policyName
1085
1083
  }
1086
1084
  });
1087
1085
  }
1088
1086
 
1089
1087
  check_password_policy_x: {
1090
- const policyName = "notUsername";
1088
+ const policyName = 'notUsername';
1091
1089
 
1092
1090
  const notUsername = passwordPolicies[policyName];
1093
1091
 
@@ -1096,7 +1094,7 @@ export class UserProfileFormService {
1096
1094
  }
1097
1095
 
1098
1096
  const usernameFormFieldState = formFieldStates.find(
1099
- formFieldState => formFieldState.attribute.name === "username"
1097
+ formFieldState => formFieldState.attribute.name === 'username'
1100
1098
  );
1101
1099
 
1102
1100
  if (!usernameFormFieldState) {
@@ -1106,7 +1104,7 @@ export class UserProfileFormService {
1106
1104
  const usernameValue = (() => {
1107
1105
  let { valueOrValues } = usernameFormFieldState;
1108
1106
 
1109
- assert(typeof valueOrValues === "string");
1107
+ assert(typeof valueOrValues === 'string');
1110
1108
 
1111
1109
  unFormat_number: {
1112
1110
  const { kcNumberUnFormat } = attribute.html5DataAnnotations ?? {};
@@ -1121,7 +1119,7 @@ export class UserProfileFormService {
1121
1119
  return valueOrValues;
1122
1120
  })();
1123
1121
 
1124
- if (usernameValue === "") {
1122
+ if (usernameValue === '') {
1125
1123
  break check_password_policy_x;
1126
1124
  }
1127
1125
 
@@ -1129,7 +1127,7 @@ export class UserProfileFormService {
1129
1127
  break check_password_policy_x;
1130
1128
  }
1131
1129
 
1132
- const msgArgs = ["invalidPasswordNotUsernameMessage"] as const;
1130
+ const msgArgs = ['invalidPasswordNotUsernameMessage'] as const;
1133
1131
 
1134
1132
  errors.push({
1135
1133
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1138,14 +1136,14 @@ export class UserProfileFormService {
1138
1136
  errorMessageStr: msgStr(...msgArgs),
1139
1137
  fieldIndex: undefined,
1140
1138
  source: {
1141
- type: "passwordPolicy",
1139
+ type: 'passwordPolicy',
1142
1140
  name: policyName
1143
1141
  }
1144
1142
  });
1145
1143
  }
1146
1144
 
1147
1145
  check_password_policy_x: {
1148
- const policyName = "notEmail";
1146
+ const policyName = 'notEmail';
1149
1147
 
1150
1148
  const notEmail = passwordPolicies[policyName];
1151
1149
 
@@ -1154,19 +1152,19 @@ export class UserProfileFormService {
1154
1152
  }
1155
1153
 
1156
1154
  const emailFormFieldState = formFieldStates.find(
1157
- formFieldState => formFieldState.attribute.name === "email"
1155
+ formFieldState => formFieldState.attribute.name === 'email'
1158
1156
  );
1159
1157
 
1160
1158
  if (!emailFormFieldState) {
1161
1159
  break check_password_policy_x;
1162
1160
  }
1163
1161
 
1164
- assert(typeof emailFormFieldState.valueOrValues === "string");
1162
+ assert(typeof emailFormFieldState.valueOrValues === 'string');
1165
1163
 
1166
1164
  {
1167
1165
  const emailValue = emailFormFieldState.valueOrValues;
1168
1166
 
1169
- if (emailValue === "") {
1167
+ if (emailValue === '') {
1170
1168
  break check_password_policy_x;
1171
1169
  }
1172
1170
 
@@ -1175,7 +1173,7 @@ export class UserProfileFormService {
1175
1173
  }
1176
1174
  }
1177
1175
 
1178
- const msgArgs = ["invalidPasswordNotEmailMessage"] as const;
1176
+ const msgArgs = ['invalidPasswordNotEmailMessage'] as const;
1179
1177
 
1180
1178
  errors.push({
1181
1179
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1184,7 +1182,7 @@ export class UserProfileFormService {
1184
1182
  errorMessageStr: msgStr(...msgArgs),
1185
1183
  fieldIndex: undefined,
1186
1184
  source: {
1187
- type: "passwordPolicy",
1185
+ type: 'passwordPolicy',
1188
1186
  name: policyName
1189
1187
  }
1190
1188
  });
@@ -1192,17 +1190,17 @@ export class UserProfileFormService {
1192
1190
  }
1193
1191
 
1194
1192
  password_confirm_matches_password: {
1195
- if (attributeName !== "password-confirm") {
1193
+ if (attributeName !== 'password-confirm') {
1196
1194
  break password_confirm_matches_password;
1197
1195
  }
1198
1196
 
1199
1197
  const passwordFormFieldState = formFieldStates.find(
1200
- formFieldState => formFieldState.attribute.name === "password"
1198
+ formFieldState => formFieldState.attribute.name === 'password'
1201
1199
  );
1202
1200
 
1203
1201
  assert(passwordFormFieldState !== undefined);
1204
1202
 
1205
- assert(typeof passwordFormFieldState.valueOrValues === "string");
1203
+ assert(typeof passwordFormFieldState.valueOrValues === 'string');
1206
1204
 
1207
1205
  {
1208
1206
  const passwordValue = passwordFormFieldState.valueOrValues;
@@ -1212,7 +1210,7 @@ export class UserProfileFormService {
1212
1210
  }
1213
1211
  }
1214
1212
 
1215
- const msgArgs = ["invalidPasswordConfirmMessage"] as const;
1213
+ const msgArgs = ['invalidPasswordConfirmMessage'] as const;
1216
1214
 
1217
1215
  errors.push({
1218
1216
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1221,8 +1219,8 @@ export class UserProfileFormService {
1221
1219
  errorMessageStr: msgStr(...msgArgs),
1222
1220
  fieldIndex: undefined,
1223
1221
  source: {
1224
- type: "other",
1225
- rule: "passwordConfirmMatchesPassword"
1222
+ type: 'other',
1223
+ rule: 'passwordConfirmMatchesPassword'
1226
1224
  }
1227
1225
  });
1228
1226
  }
@@ -1234,11 +1232,11 @@ export class UserProfileFormService {
1234
1232
  break required_field;
1235
1233
  }
1236
1234
 
1237
- if (value !== "") {
1235
+ if (value !== '') {
1238
1236
  break required_field;
1239
1237
  }
1240
1238
 
1241
- const msgArgs = ["error-user-attribute-required"] as const;
1239
+ const msgArgs = ['error-user-attribute-required'] as const;
1242
1240
 
1243
1241
  errors.push({
1244
1242
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1247,14 +1245,14 @@ export class UserProfileFormService {
1247
1245
  errorMessageStr: msgStr(...msgArgs),
1248
1246
  fieldIndex: undefined,
1249
1247
  source: {
1250
- type: "other",
1251
- rule: "requiredField"
1248
+ type: 'other',
1249
+ rule: 'requiredField'
1252
1250
  }
1253
1251
  });
1254
1252
  }
1255
1253
 
1256
1254
  validator_x: {
1257
- const validatorName = "length";
1255
+ const validatorName = 'length';
1258
1256
 
1259
1257
  const validator = validators[validatorName];
1260
1258
 
@@ -1263,22 +1261,22 @@ export class UserProfileFormService {
1263
1261
  }
1264
1262
 
1265
1263
  const {
1266
- "ignore.empty.value": ignoreEmptyValue = false,
1264
+ 'ignore.empty.value': ignoreEmptyValue = false,
1267
1265
  max,
1268
1266
  min
1269
1267
  } = validator;
1270
1268
 
1271
- if (ignoreEmptyValue && value === "") {
1269
+ if (ignoreEmptyValue && value === '') {
1272
1270
  break validator_x;
1273
1271
  }
1274
1272
 
1275
1273
  const source: FormFieldError.Source = {
1276
- type: "validator",
1274
+ type: 'validator',
1277
1275
  name: validatorName
1278
1276
  };
1279
1277
 
1280
1278
  if (max && value.length > parseInt(`${max}`)) {
1281
- const msgArgs = ["error-invalid-length-too-long", `${max}`] as const;
1279
+ const msgArgs = ['error-invalid-length-too-long', `${max}`] as const;
1282
1280
 
1283
1281
  errors.push({
1284
1282
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1291,7 +1289,7 @@ export class UserProfileFormService {
1291
1289
  }
1292
1290
 
1293
1291
  if (min && value.length < parseInt(`${min}`)) {
1294
- const msgArgs = ["error-invalid-length-too-short", `${min}`] as const;
1292
+ const msgArgs = ['error-invalid-length-too-short', `${min}`] as const;
1295
1293
 
1296
1294
  errors.push({
1297
1295
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1305,7 +1303,7 @@ export class UserProfileFormService {
1305
1303
  }
1306
1304
 
1307
1305
  validator_x: {
1308
- const validatorName = "pattern";
1306
+ const validatorName = 'pattern';
1309
1307
 
1310
1308
  const validator = validators[validatorName];
1311
1309
 
@@ -1314,12 +1312,12 @@ export class UserProfileFormService {
1314
1312
  }
1315
1313
 
1316
1314
  const {
1317
- "ignore.empty.value": ignoreEmptyValue = false,
1315
+ 'ignore.empty.value': ignoreEmptyValue = false,
1318
1316
  pattern,
1319
- "error-message": errorMessageKey
1317
+ 'error-message': errorMessageKey
1320
1318
  } = validator;
1321
1319
 
1322
- if (ignoreEmptyValue && value === "") {
1320
+ if (ignoreEmptyValue && value === '') {
1323
1321
  break validator_x;
1324
1322
  }
1325
1323
 
@@ -1328,7 +1326,7 @@ export class UserProfileFormService {
1328
1326
  }
1329
1327
 
1330
1328
  const msgArgs = [
1331
- errorMessageKey ?? id<MessageKey_defaultSet>("shouldMatchPattern"),
1329
+ errorMessageKey ?? id<MessageKey_defaultSet>('shouldMatchPattern'),
1332
1330
  pattern
1333
1331
  ] as const;
1334
1332
 
@@ -1339,7 +1337,7 @@ export class UserProfileFormService {
1339
1337
  errorMessageStr: advancedMsgStr(...msgArgs),
1340
1338
  fieldIndex: undefined,
1341
1339
  source: {
1342
- type: "validator",
1340
+ type: 'validator',
1343
1341
  name: validatorName
1344
1342
  }
1345
1343
  });
@@ -1350,14 +1348,14 @@ export class UserProfileFormService {
1350
1348
  const lastError = errors[errors.length - 1];
1351
1349
  if (
1352
1350
  lastError !== undefined &&
1353
- lastError.source.type === "validator" &&
1354
- lastError.source.name === "pattern"
1351
+ lastError.source.type === 'validator' &&
1352
+ lastError.source.name === 'pattern'
1355
1353
  ) {
1356
1354
  break validator_x;
1357
1355
  }
1358
1356
  }
1359
1357
 
1360
- const validatorName = "email";
1358
+ const validatorName = 'email';
1361
1359
 
1362
1360
  const validator = validators[validatorName];
1363
1361
 
@@ -1365,9 +1363,9 @@ export class UserProfileFormService {
1365
1363
  break validator_x;
1366
1364
  }
1367
1365
 
1368
- const { "ignore.empty.value": ignoreEmptyValue = false } = validator;
1366
+ const { 'ignore.empty.value': ignoreEmptyValue = false } = validator;
1369
1367
 
1370
- if (ignoreEmptyValue && value === "") {
1368
+ if (ignoreEmptyValue && value === '') {
1371
1369
  break validator_x;
1372
1370
  }
1373
1371
 
@@ -1375,7 +1373,7 @@ export class UserProfileFormService {
1375
1373
  break validator_x;
1376
1374
  }
1377
1375
 
1378
- const msgArgs = [id<MessageKey_defaultSet>("invalidEmailMessage")] as const;
1376
+ const msgArgs = [id<MessageKey_defaultSet>('invalidEmailMessage')] as const;
1379
1377
 
1380
1378
  errors.push({
1381
1379
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1384,14 +1382,14 @@ export class UserProfileFormService {
1384
1382
  errorMessageStr: msgStr(...msgArgs),
1385
1383
  fieldIndex: undefined,
1386
1384
  source: {
1387
- type: "validator",
1385
+ type: 'validator',
1388
1386
  name: validatorName
1389
1387
  }
1390
1388
  });
1391
1389
  }
1392
1390
 
1393
1391
  validator_x: {
1394
- const validatorName = "integer";
1392
+ const validatorName = 'integer';
1395
1393
 
1396
1394
  const validator = validators[validatorName];
1397
1395
 
@@ -1400,24 +1398,24 @@ export class UserProfileFormService {
1400
1398
  }
1401
1399
 
1402
1400
  const {
1403
- "ignore.empty.value": ignoreEmptyValue = false,
1401
+ 'ignore.empty.value': ignoreEmptyValue = false,
1404
1402
  max,
1405
1403
  min
1406
1404
  } = validator;
1407
1405
 
1408
- if (ignoreEmptyValue && value === "") {
1406
+ if (ignoreEmptyValue && value === '') {
1409
1407
  break validator_x;
1410
1408
  }
1411
1409
 
1412
1410
  const intValue = parseInt(value);
1413
1411
 
1414
1412
  const source: FormFieldError.Source = {
1415
- type: "validator",
1413
+ type: 'validator',
1416
1414
  name: validatorName
1417
1415
  };
1418
1416
 
1419
1417
  if (isNaN(intValue)) {
1420
- const msgArgs = ["mustBeAnInteger"] as const;
1418
+ const msgArgs = ['mustBeAnInteger'] as const;
1421
1419
 
1422
1420
  errors.push({
1423
1421
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1432,7 +1430,7 @@ export class UserProfileFormService {
1432
1430
  }
1433
1431
 
1434
1432
  if (max && intValue > parseInt(`${max}`)) {
1435
- const msgArgs = ["error-number-out-of-range-too-big", `${max}`] as const;
1433
+ const msgArgs = ['error-number-out-of-range-too-big', `${max}`] as const;
1436
1434
 
1437
1435
  errors.push({
1438
1436
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1448,7 +1446,7 @@ export class UserProfileFormService {
1448
1446
 
1449
1447
  if (min && intValue < parseInt(`${min}`)) {
1450
1448
  const msgArgs = [
1451
- "error-number-out-of-range-too-small",
1449
+ 'error-number-out-of-range-too-small',
1452
1450
  `${min}`
1453
1451
  ] as const;
1454
1452
 
@@ -1466,7 +1464,7 @@ export class UserProfileFormService {
1466
1464
  }
1467
1465
 
1468
1466
  validator_x: {
1469
- const validatorName = "options";
1467
+ const validatorName = 'options';
1470
1468
 
1471
1469
  const validator = validators[validatorName];
1472
1470
 
@@ -1474,7 +1472,7 @@ export class UserProfileFormService {
1474
1472
  break validator_x;
1475
1473
  }
1476
1474
 
1477
- if (value === "") {
1475
+ if (value === '') {
1478
1476
  break validator_x;
1479
1477
  }
1480
1478
 
@@ -1482,7 +1480,7 @@ export class UserProfileFormService {
1482
1480
  break validator_x;
1483
1481
  }
1484
1482
 
1485
- const msgArgs = [id<MessageKey_defaultSet>("notAValidOption")] as const;
1483
+ const msgArgs = [id<MessageKey_defaultSet>('notAValidOption')] as const;
1486
1484
 
1487
1485
  errors.push({
1488
1486
  errorMessage: this.sanitizer.bypassSecurityTrustHtml(
@@ -1491,7 +1489,7 @@ export class UserProfileFormService {
1491
1489
  errorMessageStr: msgStr(...msgArgs),
1492
1490
  fieldIndex: undefined,
1493
1491
  source: {
1494
- type: "validator",
1492
+ type: 'validator',
1495
1493
  name: validatorName
1496
1494
  }
1497
1495
  });