@salesforce/ui-bundle-template-feature-angular-authentication 12.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/LICENSE.txt +82 -0
  2. package/README.md +130 -0
  3. package/dist/.forceignore +15 -0
  4. package/dist/.husky/pre-commit +4 -0
  5. package/dist/.prettierignore +11 -0
  6. package/dist/.prettierrc +17 -0
  7. package/dist/CHANGELOG.md +5238 -0
  8. package/dist/README.md +77 -0
  9. package/dist/config/project-scratch-def.json +13 -0
  10. package/dist/eslint.config.js +7 -0
  11. package/dist/force-app/main/default/classes/UIBundleAuthUtils.cls +68 -0
  12. package/dist/force-app/main/default/classes/UIBundleAuthUtils.cls-meta.xml +5 -0
  13. package/dist/force-app/main/default/classes/UIBundleChangePassword.cls +77 -0
  14. package/dist/force-app/main/default/classes/UIBundleChangePassword.cls-meta.xml +5 -0
  15. package/dist/force-app/main/default/classes/UIBundleForgotPassword.cls +71 -0
  16. package/dist/force-app/main/default/classes/UIBundleForgotPassword.cls-meta.xml +5 -0
  17. package/dist/force-app/main/default/classes/UIBundleLogin.cls +105 -0
  18. package/dist/force-app/main/default/classes/UIBundleLogin.cls-meta.xml +5 -0
  19. package/dist/force-app/main/default/classes/UIBundleRegistration.cls +162 -0
  20. package/dist/force-app/main/default/classes/UIBundleRegistration.cls-meta.xml +5 -0
  21. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/.forceignore +15 -0
  22. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/.graphqlrc.yml +2 -0
  23. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/.postcssrc.json +5 -0
  24. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/.prettierignore +8 -0
  25. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/.prettierrc +12 -0
  26. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/CHANGELOG.md +4 -0
  27. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/README.md +85 -0
  28. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/angular.json +98 -0
  29. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/codegen.yml +95 -0
  30. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/components.json +6 -0
  31. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/e2e/app.spec.ts +15 -0
  32. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/esbuild/api-version.mjs +17 -0
  33. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/esbuild/graphql-codegen.mjs +13 -0
  34. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/eslint-plugin-angular-graphql.js +148 -0
  35. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/eslint.config.js +76 -0
  36. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/feature-angular-authentication.uibundle-meta.xml +7 -0
  37. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/middleware/html.mjs +3 -0
  38. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/middleware/proxy.mjs +12 -0
  39. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/package.json +69 -0
  40. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/playwright.config.ts +25 -0
  41. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/public/favicon.ico +0 -0
  42. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/scripts/get-graphql-schema.mjs +69 -0
  43. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/scripts/rewrite-e2e-assets.mjs +30 -0
  44. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/api/data-client.service.spec.ts +184 -0
  45. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/api/data-client.service.ts +74 -0
  46. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/api/user-profile.service.ts +126 -0
  47. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/app.config.ts +20 -0
  48. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/app.html +1 -0
  49. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/app.routes.ts +66 -0
  50. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/app.spec.ts +18 -0
  51. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/app.ts +15 -0
  52. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/layout/app-layout/app-layout.html +51 -0
  53. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/layout/app-layout/app-layout.spec.ts +63 -0
  54. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/layout/app-layout/app-layout.ts +27 -0
  55. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/alert/alert.html +27 -0
  56. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/alert/alert.ts +41 -0
  57. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/button/button.html +27 -0
  58. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/button/button.ts +66 -0
  59. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/card/card.ts +100 -0
  60. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/collapsible/collapsible.html +38 -0
  61. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/collapsible/collapsible.ts +21 -0
  62. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/date-picker/date-picker.html +20 -0
  63. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/date-picker/date-picker.ts +49 -0
  64. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/date-range-picker/date-range-picker.html +20 -0
  65. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/date-range-picker/date-range-picker.ts +69 -0
  66. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/dialog/dialog.html +20 -0
  67. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/dialog/dialog.ts +40 -0
  68. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/dropdown-menu/dropdown-menu.html +20 -0
  69. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/dropdown-menu/dropdown-menu.ts +100 -0
  70. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/field/field.html +15 -0
  71. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/field/field.ts +28 -0
  72. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/field-appearance.ts +8 -0
  73. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/field-size.ts +8 -0
  74. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/icon/icon.ts +68 -0
  75. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/input/input.html +34 -0
  76. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/input/input.ts +79 -0
  77. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/label/label.ts +21 -0
  78. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/paginator/paginator.html +74 -0
  79. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/paginator/paginator.ts +93 -0
  80. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/paginator/types.ts +13 -0
  81. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/popover/popover.html +13 -0
  82. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/popover/popover.ts +37 -0
  83. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/select/select.html +36 -0
  84. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/select/select.ts +63 -0
  85. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/separator/separator.ts +31 -0
  86. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/skeleton/skeleton.ts +20 -0
  87. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/components/ui/spinner/spinner.ts +28 -0
  88. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/auth/auth.guard.ts +50 -0
  89. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/auth/auth.service.ts +158 -0
  90. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/auth-form/auth-form.html +33 -0
  91. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/auth-form/auth-form.ts +94 -0
  92. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/auth-layout/auth-layout.html +2 -0
  93. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/auth-layout/auth-layout.ts +30 -0
  94. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/card-layout/card-layout.html +16 -0
  95. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/card-layout/card-layout.ts +40 -0
  96. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/config/authentication.config.ts +75 -0
  97. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/footer-link/footer-link.html +9 -0
  98. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/footer-link/footer-link.ts +26 -0
  99. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/menu/auth-menu/auth-menu.html +36 -0
  100. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/menu/auth-menu/auth-menu.ts +34 -0
  101. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/reactive-form-page.base.ts +50 -0
  102. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/session/session.html +55 -0
  103. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/session/session.ts +205 -0
  104. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/status-alert/status-alert.html +5 -0
  105. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/status-alert/status-alert.ts +52 -0
  106. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/submit-button/submit-button.html +9 -0
  107. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/submit-button/submit-button.ts +23 -0
  108. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/utils/auth-helpers.ts +68 -0
  109. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/utils/auth-validators.ts +72 -0
  110. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/utils/helpers.ts +85 -0
  111. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/utils/session-time-servlet.ts +130 -0
  112. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/utils/session-timeout.config.ts +83 -0
  113. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/features/authentication/utils/session-timeout.service.ts +201 -0
  114. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/change-password/change-password-page.html +68 -0
  115. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/change-password/change-password-page.ts +82 -0
  116. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/forgot-password/forgot-password-page.html +35 -0
  117. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/forgot-password/forgot-password-page.ts +87 -0
  118. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/home/home.html +6 -0
  119. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/home/home.spec.ts +23 -0
  120. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/home/home.ts +13 -0
  121. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/login/login-page.html +47 -0
  122. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/login/login-page.ts +89 -0
  123. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/not-found/not-found.html +12 -0
  124. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/not-found/not-found.spec.ts +33 -0
  125. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/not-found/not-found.ts +15 -0
  126. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/profile/profile-page.html +116 -0
  127. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/profile/profile-page.ts +194 -0
  128. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/register/register-page.html +80 -0
  129. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/register/register-page.ts +93 -0
  130. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/reset-password/reset-password-page.html +60 -0
  131. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/pages/reset-password/reset-password-page.ts +96 -0
  132. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/alert/hlm-alert-action.ts +14 -0
  133. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/alert/hlm-alert-description.ts +17 -0
  134. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/alert/hlm-alert-title.ts +17 -0
  135. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/alert/hlm-alert.ts +35 -0
  136. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/alert/index.ts +16 -0
  137. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/button/hlm-button.token.ts +22 -0
  138. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/button/hlm-button.ts +72 -0
  139. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/button/index.ts +6 -0
  140. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/calendar/hlm-calendar-multi.ts +195 -0
  141. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/calendar/hlm-calendar-range.ts +194 -0
  142. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/calendar/hlm-calendar.ts +189 -0
  143. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/calendar/hlm-month-year-calendar.ts +119 -0
  144. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/calendar/index.ts +16 -0
  145. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card-action.ts +12 -0
  146. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card-avatar.ts +14 -0
  147. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card-content.ts +12 -0
  148. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card-description.ts +12 -0
  149. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card-footer.ts +12 -0
  150. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card-header.ts +15 -0
  151. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card-title.ts +12 -0
  152. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card.token.ts +19 -0
  153. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/hlm-card.ts +22 -0
  154. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/card/index.ts +28 -0
  155. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/collapsible/hlm-collapsible-content.ts +14 -0
  156. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/collapsible/hlm-collapsible-trigger.ts +9 -0
  157. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/collapsible/hlm-collapsible.ts +15 -0
  158. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/collapsible/index.ts +13 -0
  159. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-multi-input.ts +104 -0
  160. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-picker-anchor.ts +23 -0
  161. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-picker-input.ts +118 -0
  162. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-picker-multi.token.ts +109 -0
  163. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-picker-multi.ts +220 -0
  164. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-picker-trigger.ts +104 -0
  165. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-picker.token.ts +69 -0
  166. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-picker.ts +203 -0
  167. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-range-input.ts +120 -0
  168. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-range-picker.token.ts +86 -0
  169. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-date-range-picker.ts +252 -0
  170. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-month-year-input.ts +105 -0
  171. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-month-year-picker.token.ts +89 -0
  172. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/hlm-month-year-picker.ts +196 -0
  173. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/date-picker/index.ts +38 -0
  174. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-close.ts +9 -0
  175. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-content.ts +74 -0
  176. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-description.ts +17 -0
  177. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-footer.ts +15 -0
  178. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-header.ts +12 -0
  179. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-overlay.ts +27 -0
  180. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-portal.ts +8 -0
  181. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-title.ts +14 -0
  182. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog-trigger.ts +14 -0
  183. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog.service.ts +46 -0
  184. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/hlm-dialog.ts +24 -0
  185. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dialog/index.ts +35 -0
  186. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox-indicator.ts +21 -0
  187. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-checkbox.ts +54 -0
  188. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-focus-on-hover.ts +35 -0
  189. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-group.ts +14 -0
  190. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-item-sub-indicator.ts +19 -0
  191. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-item.ts +42 -0
  192. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-label.ts +20 -0
  193. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio-indicator.ts +21 -0
  194. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-radio.ts +49 -0
  195. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-separator.ts +12 -0
  196. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-shortcut.ts +15 -0
  197. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub-trigger.ts +52 -0
  198. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-sub.ts +53 -0
  199. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-token.ts +26 -0
  200. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu-trigger.ts +46 -0
  201. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/hlm-dropdown-menu.ts +57 -0
  202. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/dropdown-menu/index.ts +49 -0
  203. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-content.ts +12 -0
  204. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-description.ts +53 -0
  205. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-error.ts +100 -0
  206. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-group.ts +15 -0
  207. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-label.ts +17 -0
  208. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-legend.ts +19 -0
  209. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-separator.ts +24 -0
  210. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-set.ts +15 -0
  211. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field-title.ts +15 -0
  212. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/hlm-field.ts +47 -0
  213. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/field/index.ts +34 -0
  214. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input/hlm-input.ts +21 -0
  215. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input/index.ts +5 -0
  216. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input-group/hlm-input-group-addon.ts +40 -0
  217. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input-group/hlm-input-group-button.ts +47 -0
  218. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input-group/hlm-input-group-input.ts +17 -0
  219. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input-group/hlm-input-group-text.ts +14 -0
  220. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input-group/hlm-input-group.ts +18 -0
  221. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/input-group/index.ts +19 -0
  222. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/label/hlm-label.ts +17 -0
  223. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/label/index.ts +5 -0
  224. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/label/label.html +11 -0
  225. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-numbered-pagination-query-params.ts +191 -0
  226. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-numbered-pagination.ts +290 -0
  227. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-pagination-content.ts +12 -0
  228. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-pagination-ellipsis.ts +27 -0
  229. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-pagination-item.ts +7 -0
  230. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-pagination-link.ts +51 -0
  231. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-pagination-next.ts +65 -0
  232. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-pagination-previous.ts +65 -0
  233. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/hlm-pagination.ts +19 -0
  234. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/pagination/index.ts +31 -0
  235. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/hlm-popover-content.ts +25 -0
  236. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/hlm-popover-description.ts +12 -0
  237. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/hlm-popover-header.ts +12 -0
  238. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/hlm-popover-portal.ts +8 -0
  239. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/hlm-popover-title.ts +12 -0
  240. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/hlm-popover-trigger.ts +14 -0
  241. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/hlm-popover.ts +23 -0
  242. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/popover/index.ts +25 -0
  243. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-content.ts +44 -0
  244. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-group.ts +14 -0
  245. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-item.ts +36 -0
  246. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-label.ts +14 -0
  247. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-multiple.ts +37 -0
  248. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-placeholder.ts +17 -0
  249. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-portal.ts +8 -0
  250. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-scroll-down.ts +22 -0
  251. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-scroll-up.ts +22 -0
  252. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-separator.ts +14 -0
  253. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-trigger.ts +59 -0
  254. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-value-template.ts +5 -0
  255. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-value.ts +18 -0
  256. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-values-content.ts +9 -0
  257. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select-values.ts +5 -0
  258. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/hlm-select.ts +37 -0
  259. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/select/index.ts +52 -0
  260. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/separator/hlm-separator.ts +19 -0
  261. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/separator/index.ts +5 -0
  262. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/skeleton/hlm-skeleton.ts +14 -0
  263. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/skeleton/index.ts +5 -0
  264. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/spinner/hlm-spinner.ts +26 -0
  265. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/spinner/index.ts +5 -0
  266. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/utils/hlm.ts +313 -0
  267. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/utils/index.ts +2 -0
  268. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/shared/utils/provide-spartan-hlm.ts +34 -0
  269. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/app/utils/async-data.ts +99 -0
  270. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/index.html +13 -0
  271. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/main.ts +5 -0
  272. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/styles.css +139 -0
  273. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/src/types/sf-globals.d.ts +9 -0
  274. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/tsconfig.app.json +11 -0
  275. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/tsconfig.json +36 -0
  276. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/tsconfig.spec.json +10 -0
  277. package/dist/force-app/main/default/uiBundles/feature-angular-authentication/ui-bundle.json +7 -0
  278. package/dist/jest.config.js +6 -0
  279. package/dist/package-lock.json +12554 -0
  280. package/dist/package.json +46 -0
  281. package/dist/scripts/apex/hello.apex +10 -0
  282. package/dist/scripts/gitignore-templates.json +4 -0
  283. package/dist/scripts/graphql-search.sh +191 -0
  284. package/dist/scripts/org-setup-config-schema.mjs +132 -0
  285. package/dist/scripts/org-setup-dev.mjs +114 -0
  286. package/dist/scripts/org-setup-url.mjs +108 -0
  287. package/dist/scripts/org-setup-utils.mjs +569 -0
  288. package/dist/scripts/org-setup-xml.mjs +278 -0
  289. package/dist/scripts/org-setup.config.json +5 -0
  290. package/dist/scripts/org-setup.mjs +2537 -0
  291. package/dist/scripts/sf-project-setup.mjs +103 -0
  292. package/dist/scripts/soql/account.soql +6 -0
  293. package/dist/scripts/validate-org-setup-config.mjs +38 -0
  294. package/dist/sfdx-project.json +12 -0
  295. package/package.json +45 -0
@@ -0,0 +1,80 @@
1
+ <main class="flex min-h-svh w-full justify-center p-6 md:p-10 items-start">
2
+ <div class="w-full max-w-2xl">
3
+ <app-auth-form
4
+ title="Sign Up"
5
+ description="Enter your information to create an account"
6
+ [error]="submitError()"
7
+ submitText="Create an account"
8
+ submitLoadingText="Creating account…"
9
+ [submitting]="submitting()"
10
+ [footer]="{ text: 'Already have an account?', link: routes.LOGIN.PATH, linkText: 'Sign in' }"
11
+ (submitted)="onSubmit()"
12
+ >
13
+ <div class="mt-4 flex flex-col gap-4">
14
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 items-start">
15
+ <app-field
16
+ label="First name"
17
+ htmlFor="register-first-name"
18
+ [error]="controlError('firstName', 'required')"
19
+ >
20
+ <app-input
21
+ [value]="form.controls.firstName.value ?? ''"
22
+ (valueChange)="setControl('firstName', $event)"
23
+ [placeholder]="placeholders.FIRST_NAME"
24
+ />
25
+ </app-field>
26
+
27
+ <app-field
28
+ label="Last name"
29
+ htmlFor="register-last-name"
30
+ [error]="controlError('lastName', 'required')"
31
+ >
32
+ <app-input
33
+ [value]="form.controls.lastName.value ?? ''"
34
+ (valueChange)="setControl('lastName', $event)"
35
+ [placeholder]="placeholders.LAST_NAME"
36
+ />
37
+ </app-field>
38
+ </div>
39
+
40
+ <app-field label="Email" htmlFor="register-email" [error]="controlError('email', 'email')">
41
+ <app-input
42
+ type="email"
43
+ [value]="form.controls.email.value ?? ''"
44
+ (valueChange)="setControl('email', $event)"
45
+ [placeholder]="placeholders.EMAIL"
46
+ />
47
+ </app-field>
48
+
49
+ <app-field
50
+ label="Password"
51
+ htmlFor="register-password"
52
+ [error]="controlError('password', 'password')"
53
+ >
54
+ <app-input
55
+ type="password"
56
+ [value]="form.controls.password.value ?? ''"
57
+ (valueChange)="setControl('password', $event)"
58
+ [placeholder]="placeholders.PASSWORD_CREATE"
59
+ />
60
+ </app-field>
61
+
62
+ <app-field
63
+ label="Confirm Password"
64
+ htmlFor="register-confirm-password"
65
+ [error]="
66
+ controlError('confirmPassword', 'passwordMismatch') ??
67
+ controlError('confirmPassword', 'required')
68
+ "
69
+ >
70
+ <app-input
71
+ type="password"
72
+ [value]="form.controls.confirmPassword.value ?? ''"
73
+ (valueChange)="setControl('confirmPassword', $event)"
74
+ [placeholder]="placeholders.PASSWORD_CONFIRM"
75
+ />
76
+ </app-field>
77
+ </div>
78
+ </app-auth-form>
79
+ </div>
80
+ </main>
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import { ChangeDetectionStrategy, Component, inject, signal } from "@angular/core";
7
+ import { FormBuilder } from "@angular/forms";
8
+ import { ActivatedRoute, Router } from "@angular/router";
9
+ import { DataClient } from "../../api/data-client.service";
10
+ import { AuthFormComponent } from "../../features/authentication/auth-form/auth-form";
11
+ import { ReactiveFormPageBase } from "../../features/authentication/reactive-form-page.base";
12
+ import { FieldComponent } from "../../components/ui/field/field";
13
+ import { InputComponent } from "../../components/ui/input/input";
14
+ import {
15
+ API_ROUTES,
16
+ AUTH_PLACEHOLDERS,
17
+ ROUTES,
18
+ } from "../../features/authentication/config/authentication.config";
19
+ import { getStartUrl, type AuthResponse } from "../../features/authentication/utils/auth-helpers";
20
+ import { ApiError, handleApiResponse } from "../../features/authentication/utils/helpers";
21
+ import {
22
+ emailValidator,
23
+ passwordMinValidator,
24
+ passwordsMatchValidator,
25
+ requiredWithMessage,
26
+ } from "../../features/authentication/utils/auth-validators";
27
+
28
+ /**
29
+ * Register page — Angular port of the React `Register`. Same field set, same
30
+ * cross-field password-match rule, same POST body shape (`{ request }` with
31
+ * `confirmPassword` stripped) and same success handling (redirectUrl hard-nav,
32
+ * else navigate to login).
33
+ */
34
+ @Component({
35
+ selector: "app-register-page",
36
+ changeDetection: ChangeDetectionStrategy.OnPush,
37
+ imports: [AuthFormComponent, FieldComponent, InputComponent],
38
+ templateUrl: "./register-page.html",
39
+ })
40
+ export class RegisterPageComponent extends ReactiveFormPageBase {
41
+ private readonly fb = inject(FormBuilder);
42
+ private readonly router = inject(Router);
43
+ private readonly route = inject(ActivatedRoute);
44
+ private readonly dataClient = inject(DataClient);
45
+
46
+ protected readonly placeholders = AUTH_PLACEHOLDERS;
47
+ protected readonly routes = ROUTES;
48
+
49
+ protected override readonly form = this.fb.group(
50
+ {
51
+ firstName: ["", [requiredWithMessage("First name is required")]],
52
+ lastName: ["", [requiredWithMessage("Last name is required")]],
53
+ email: ["", [emailValidator]],
54
+ password: ["", [passwordMinValidator]],
55
+ confirmPassword: ["", [requiredWithMessage("Please confirm your password")]],
56
+ startUrl: [getStartUrl(this.route.snapshot.queryParamMap) || ""],
57
+ },
58
+ { validators: [passwordsMatchValidator("password", "confirmPassword")] },
59
+ );
60
+
61
+ protected readonly submitError = signal<string | string[] | null>(null);
62
+ protected readonly submitting = signal<boolean>(false);
63
+
64
+ protected async onSubmit(): Promise<void> {
65
+ this.form.markAllAsTouched();
66
+ if (this.form.invalid) {
67
+ return;
68
+ }
69
+ this.submitError.set(null);
70
+ this.submitting.set(true);
71
+ try {
72
+ const { confirmPassword: _confirmPassword, ...request } = this.form.getRawValue();
73
+ const response = await this.dataClient.fetch(API_ROUTES.REGISTER, {
74
+ method: "POST",
75
+ body: JSON.stringify({ request }),
76
+ headers: { "Content-Type": "application/json", Accept: "application/json" },
77
+ });
78
+ const result = await handleApiResponse<AuthResponse>(response);
79
+ if (result?.redirectUrl) {
80
+ // Hard navigate to the URL which logs the new user in.
81
+ window.location.replace(result.redirectUrl);
82
+ } else {
83
+ // In case redirectUrl is null, redirect to the login page.
84
+ void this.router.navigate([ROUTES.LOGIN.PATH], { replaceUrl: true });
85
+ }
86
+ } catch (err) {
87
+ console.error("Registration failed", err);
88
+ this.submitError.set(err instanceof ApiError ? err.errors : "Registration failed");
89
+ } finally {
90
+ this.submitting.set(false);
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,60 @@
1
+ <main class="flex min-h-svh w-full justify-center p-6 md:p-10 items-start">
2
+ <div class="w-full max-w-md">
3
+ @if (!token) {
4
+ <app-card-layout title="Reset Password">
5
+ <app-status-alert variant="error">
6
+ Reset token is invalid or expired.
7
+ <a [routerLink]="routes.FORGOT_PASSWORD.PATH" class="underline underline-offset-4">
8
+ Request a new password reset link.
9
+ </a>
10
+ </app-status-alert>
11
+ </app-card-layout>
12
+ } @else {
13
+ <app-auth-form
14
+ title="Reset Password"
15
+ description="Enter your new password below"
16
+ [error]="submitError()"
17
+ [success]="success() ? 'Password reset successfully! Use the link below to sign in.' : null"
18
+ submitText="Reset Password"
19
+ submitLoadingText="Resetting…"
20
+ [submitting]="submitting()"
21
+ [submitDisabled]="success()"
22
+ [footer]="{ text: 'Remember your password?', link: routes.LOGIN.PATH, linkText: 'Sign in' }"
23
+ (submitted)="onSubmit()"
24
+ >
25
+ <div class="mt-4 flex flex-col gap-4">
26
+ <app-field
27
+ label="New Password"
28
+ htmlFor="reset-new-password"
29
+ [error]="controlError('newPassword', 'password')"
30
+ >
31
+ <app-input
32
+ type="password"
33
+ [value]="form.controls.newPassword.value ?? ''"
34
+ (valueChange)="setControl('newPassword', $event)"
35
+ [placeholder]="placeholders.PASSWORD_NEW"
36
+ [disabled]="success()"
37
+ />
38
+ </app-field>
39
+
40
+ <app-field
41
+ label="Confirm Password"
42
+ htmlFor="reset-confirm-password"
43
+ [error]="
44
+ controlError('confirmPassword', 'passwordMismatch') ??
45
+ controlError('confirmPassword', 'required')
46
+ "
47
+ >
48
+ <app-input
49
+ type="password"
50
+ [value]="form.controls.confirmPassword.value ?? ''"
51
+ (valueChange)="setControl('confirmPassword', $event)"
52
+ [placeholder]="placeholders.PASSWORD_NEW_CONFIRM"
53
+ [disabled]="success()"
54
+ />
55
+ </app-field>
56
+ </div>
57
+ </app-auth-form>
58
+ }
59
+ </div>
60
+ </main>
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import { ChangeDetectionStrategy, Component, inject, signal } from "@angular/core";
7
+ import { FormBuilder } from "@angular/forms";
8
+ import { ActivatedRoute, RouterLink } from "@angular/router";
9
+ import { DataClient } from "../../api/data-client.service";
10
+ import { AuthFormComponent } from "../../features/authentication/auth-form/auth-form";
11
+ import { ReactiveFormPageBase } from "../../features/authentication/reactive-form-page.base";
12
+ import { CardLayoutComponent } from "../../features/authentication/card-layout/card-layout";
13
+ import { StatusAlertComponent } from "../../features/authentication/status-alert/status-alert";
14
+ import { FieldComponent } from "../../components/ui/field/field";
15
+ import { InputComponent } from "../../components/ui/input/input";
16
+ import {
17
+ API_ROUTES,
18
+ AUTH_PLACEHOLDERS,
19
+ ROUTES,
20
+ } from "../../features/authentication/config/authentication.config";
21
+ import { ApiError, handleApiResponse } from "../../features/authentication/utils/helpers";
22
+ import {
23
+ passwordMinValidator,
24
+ passwordsMatchValidator,
25
+ requiredWithMessage,
26
+ } from "../../features/authentication/utils/auth-validators";
27
+
28
+ /**
29
+ * Reset-password page — Angular port of the React `ResetPassword`.
30
+ *
31
+ * The reset `token` comes from the `?token=` query param; when absent the page
32
+ * shows the "invalid or expired" card (identical to React) instead of the form.
33
+ * The POST sends `{ token, newPassword }`; on success it shows a success alert
34
+ * with a Sign-in link and scrolls to top.
35
+ */
36
+ @Component({
37
+ selector: "app-reset-password-page",
38
+ changeDetection: ChangeDetectionStrategy.OnPush,
39
+ imports: [
40
+ RouterLink,
41
+ AuthFormComponent,
42
+ CardLayoutComponent,
43
+ StatusAlertComponent,
44
+ FieldComponent,
45
+ InputComponent,
46
+ ],
47
+ templateUrl: "./reset-password-page.html",
48
+ })
49
+ export class ResetPasswordPageComponent extends ReactiveFormPageBase {
50
+ private readonly fb = inject(FormBuilder);
51
+ private readonly route = inject(ActivatedRoute);
52
+ private readonly dataClient = inject(DataClient);
53
+
54
+ protected readonly placeholders = AUTH_PLACEHOLDERS;
55
+ protected readonly routes = ROUTES;
56
+ protected readonly token = this.route.snapshot.queryParamMap.get("token");
57
+
58
+ protected override readonly form = this.fb.group(
59
+ {
60
+ newPassword: ["", [passwordMinValidator]],
61
+ confirmPassword: ["", [requiredWithMessage("Please confirm your password")]],
62
+ },
63
+ { validators: [passwordsMatchValidator("newPassword", "confirmPassword")] },
64
+ );
65
+
66
+ protected readonly submitError = signal<string | string[] | null>(null);
67
+ protected readonly submitting = signal<boolean>(false);
68
+ protected readonly success = signal<boolean>(false);
69
+
70
+ protected async onSubmit(): Promise<void> {
71
+ this.form.markAllAsTouched();
72
+ if (this.form.invalid) {
73
+ return;
74
+ }
75
+ this.submitError.set(null);
76
+ this.success.set(false);
77
+ this.submitting.set(true);
78
+ try {
79
+ const newPassword = this.form.controls.newPassword.value ?? "";
80
+ const response = await this.dataClient.fetch(API_ROUTES.RESET_PASSWORD, {
81
+ method: "POST",
82
+ body: JSON.stringify({ token: this.token, newPassword }),
83
+ headers: { "Content-Type": "application/json", Accept: "application/json" },
84
+ });
85
+ await handleApiResponse(response);
86
+ this.success.set(true);
87
+ // Scroll to top of page after successful submission so user sees it.
88
+ window.scrollTo({ top: 0, behavior: "smooth" });
89
+ } catch (err) {
90
+ console.error("Password reset failed", err);
91
+ this.submitError.set(err instanceof ApiError ? err.errors : "Password reset failed");
92
+ } finally {
93
+ this.submitting.set(false);
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,14 @@
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '@spartan-ng/styles/utils';
3
+
4
+ @Directive({
5
+ selector: '[hlmAlertAction]',
6
+ host: {
7
+ 'data-slot': 'alert-action',
8
+ },
9
+ })
10
+ export class HlmAlertAction {
11
+ constructor() {
12
+ classes(() => 'absolute end-2 top-2');
13
+ }
14
+ }
@@ -0,0 +1,17 @@
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '@spartan-ng/styles/utils';
3
+
4
+ @Directive({
5
+ selector: '[hlmAlertDescription]',
6
+ host: {
7
+ 'data-slot': 'alert-description',
8
+ },
9
+ })
10
+ export class HlmAlertDescription {
11
+ constructor() {
12
+ classes(
13
+ () =>
14
+ 'text-sm text-balance md:text-pretty group-has-[>ng-icon]/alert:col-start-2 [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3',
15
+ );
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '@spartan-ng/styles/utils';
3
+
4
+ @Directive({
5
+ selector: '[hlmAlertTitle]',
6
+ host: {
7
+ 'data-slot': 'alert-title',
8
+ },
9
+ })
10
+ export class HlmAlertTitle {
11
+ constructor() {
12
+ classes(
13
+ () =>
14
+ 'font-medium group-has-[>ng-icon]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3',
15
+ );
16
+ }
17
+ }
@@ -0,0 +1,35 @@
1
+ import { Directive, input } from '@angular/core';
2
+ import { classes } from '@spartan-ng/styles/utils';
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+
5
+ const alertVariants = cva(
6
+ 'relative w-full grid gap-0.5 items-start rounded-lg border px-2.5 py-2 text-start text-sm has-data-[slot=alert-action]:pe-18 has-[>ng-icon]:grid-cols-[auto_1fr] has-[>ng-icon]:gap-x-2 *:[ng-icon]:row-span-2 *:[ng-icon]:translate-y-0.5 *:[ng-icon]:text-current *:[ng-icon:not([class*=text-])]:text-[length:--spacing(4)] group/alert',
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: 'bg-card text-card-foreground',
11
+ destructive: 'bg-card text-destructive',
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ variant: 'default',
16
+ },
17
+ },
18
+ );
19
+
20
+ export type AlertVariants = VariantProps<typeof alertVariants>;
21
+
22
+ @Directive({
23
+ selector: 'hlm-alert,[hlmAlert]',
24
+ host: {
25
+ 'data-slot': 'alert',
26
+ role: 'alert',
27
+ },
28
+ })
29
+ export class HlmAlert {
30
+ public readonly variant = input<AlertVariants['variant']>('default');
31
+
32
+ constructor() {
33
+ classes(() => alertVariants({ variant: this.variant() }));
34
+ }
35
+ }
@@ -0,0 +1,16 @@
1
+ import { HlmAlert } from './hlm-alert';
2
+ import { HlmAlertAction } from './hlm-alert-action';
3
+ import { HlmAlertDescription } from './hlm-alert-description';
4
+ import { HlmAlertTitle } from './hlm-alert-title';
5
+
6
+ export * from './hlm-alert';
7
+ export * from './hlm-alert-action';
8
+ export * from './hlm-alert-description';
9
+ export * from './hlm-alert-title';
10
+
11
+ export const HlmAlertImports = [
12
+ HlmAlert,
13
+ HlmAlertAction,
14
+ HlmAlertDescription,
15
+ HlmAlertTitle,
16
+ ] as const;
@@ -0,0 +1,22 @@
1
+ import { InjectionToken, type ValueProvider, inject } from '@angular/core';
2
+ import type { ButtonVariants } from './hlm-button';
3
+
4
+ export interface BrnButtonConfig {
5
+ variant: ButtonVariants['variant'];
6
+ size: ButtonVariants['size'];
7
+ }
8
+
9
+ const defaultConfig: BrnButtonConfig = {
10
+ variant: 'default',
11
+ size: 'default',
12
+ };
13
+
14
+ const BrnButtonConfigToken = new InjectionToken<BrnButtonConfig>('BrnButtonConfig');
15
+
16
+ export function provideBrnButtonConfig(config: Partial<BrnButtonConfig>): ValueProvider {
17
+ return { provide: BrnButtonConfigToken, useValue: { ...defaultConfig, ...config } };
18
+ }
19
+
20
+ export function injectBrnButtonConfig(): BrnButtonConfig {
21
+ return inject(BrnButtonConfigToken, { optional: true }) ?? defaultConfig;
22
+ }
@@ -0,0 +1,72 @@
1
+ import { Directive, input, signal } from '@angular/core';
2
+ import { BrnButton } from '@spartan-ng/brain/button';
3
+ import { classes } from '@spartan-ng/styles/utils';
4
+ import { cva, type VariantProps } from 'class-variance-authority';
5
+ import type { ClassValue } from 'clsx';
6
+ import { injectBrnButtonConfig } from './hlm-button.token';
7
+
8
+ export const buttonVariants = cva(
9
+ "focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px data-[matches-spartan-invalid=true]:ring-3 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0",
10
+ {
11
+ variants: {
12
+ variant: {
13
+ default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',
14
+ outline:
15
+ 'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground',
16
+ secondary:
17
+ 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
18
+ ghost:
19
+ 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',
20
+ destructive:
21
+ 'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',
22
+ link: 'text-primary underline-offset-4 hover:underline',
23
+ },
24
+ size: {
25
+ default:
26
+ 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',
27
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]",
28
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3.5)]",
29
+ lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3',
30
+ icon: 'size-8',
31
+ 'icon-xs':
32
+ "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]",
33
+ 'icon-sm':
34
+ 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
35
+ 'icon-lg': 'size-9',
36
+ },
37
+ },
38
+ defaultVariants: {
39
+ variant: 'default',
40
+ size: 'default',
41
+ },
42
+ },
43
+ );
44
+
45
+ export type ButtonVariants = VariantProps<typeof buttonVariants>;
46
+
47
+ @Directive({
48
+ selector: 'button[hlmBtn], a[hlmBtn]',
49
+ exportAs: 'hlmBtn',
50
+ hostDirectives: [{ directive: BrnButton, inputs: ['disabled'] }],
51
+ host: { 'data-slot': 'button' },
52
+ })
53
+ export class HlmButton {
54
+ private readonly _config = injectBrnButtonConfig();
55
+
56
+ private readonly _additionalClasses = signal<ClassValue>('');
57
+
58
+ public readonly variant = input<ButtonVariants['variant']>(this._config.variant);
59
+
60
+ public readonly size = input<ButtonVariants['size']>(this._config.size);
61
+
62
+ constructor() {
63
+ classes(() => [
64
+ buttonVariants({ variant: this.variant(), size: this.size() }),
65
+ this._additionalClasses(),
66
+ ]);
67
+ }
68
+
69
+ setClass(classes: string): void {
70
+ this._additionalClasses.set(classes);
71
+ }
72
+ }
@@ -0,0 +1,6 @@
1
+ import { HlmButton } from './hlm-button';
2
+
3
+ export * from './hlm-button';
4
+ export * from './hlm-button.token';
5
+
6
+ export const HlmButtonImports = [HlmButton] as const;