@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,87 @@
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 { DataClient } from "../../api/data-client.service";
9
+ import { AuthFormComponent } from "../../features/authentication/auth-form/auth-form";
10
+ import { ReactiveFormPageBase } from "../../features/authentication/reactive-form-page.base";
11
+ import { FieldComponent } from "../../components/ui/field/field";
12
+ import { InputComponent } from "../../components/ui/input/input";
13
+ import {
14
+ API_ROUTES,
15
+ AUTH_PLACEHOLDERS,
16
+ ROUTES,
17
+ } from "../../features/authentication/config/authentication.config";
18
+ import { ApiError, handleApiResponse } from "../../features/authentication/utils/helpers";
19
+ import type { AbstractControl, ValidationErrors } from "@angular/forms";
20
+
21
+ /**
22
+ * Username validator — mirrors the React forgot-password zod schema which
23
+ * validates the username as an email but with the message "Please enter a
24
+ * valid username". Kept local since this message is unique to this page.
25
+ */
26
+ function usernameValidator(control: AbstractControl): ValidationErrors | null {
27
+ const value = (control.value ?? "").toString().trim();
28
+ const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
29
+ return value !== "" && emailPattern.test(value)
30
+ ? null
31
+ : { email: "Please enter a valid username" };
32
+ }
33
+
34
+ /**
35
+ * Forgot-password page — Angular port of the React `ForgotPassword`.
36
+ *
37
+ * Anti-enumeration: the success message is intentionally generic ("If that
38
+ * username exists…") regardless of whether the account exists, and after a
39
+ * successful submit the username field and the submit button are disabled — an
40
+ * exact mirror of the React behavior.
41
+ */
42
+ @Component({
43
+ selector: "app-forgot-password-page",
44
+ changeDetection: ChangeDetectionStrategy.OnPush,
45
+ imports: [AuthFormComponent, FieldComponent, InputComponent],
46
+ templateUrl: "./forgot-password-page.html",
47
+ })
48
+ export class ForgotPasswordPageComponent extends ReactiveFormPageBase {
49
+ private readonly fb = inject(FormBuilder);
50
+ private readonly dataClient = inject(DataClient);
51
+
52
+ protected readonly placeholders = AUTH_PLACEHOLDERS;
53
+ protected readonly routes = ROUTES;
54
+
55
+ protected override readonly form = this.fb.group({
56
+ username: ["", [usernameValidator]],
57
+ });
58
+
59
+ protected readonly submitError = signal<string | string[] | null>(null);
60
+ protected readonly submitting = signal<boolean>(false);
61
+ protected readonly success = signal<boolean>(false);
62
+
63
+ protected async onSubmit(): Promise<void> {
64
+ this.form.markAllAsTouched();
65
+ if (this.form.invalid) {
66
+ return;
67
+ }
68
+ this.submitError.set(null);
69
+ this.success.set(false);
70
+ this.submitting.set(true);
71
+ try {
72
+ const username = (this.form.controls.username.value ?? "").trim();
73
+ const response = await this.dataClient.fetch(API_ROUTES.FORGOT_PASSWORD, {
74
+ method: "POST",
75
+ body: JSON.stringify({ username }),
76
+ headers: { "Content-Type": "application/json", Accept: "application/json" },
77
+ });
78
+ await handleApiResponse(response);
79
+ this.success.set(true);
80
+ } catch (err) {
81
+ console.error("Failed to send reset link", err);
82
+ this.submitError.set(err instanceof ApiError ? err.errors : "Failed to send reset link");
83
+ } finally {
84
+ this.submitting.set(false);
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,6 @@
1
+ <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
2
+ <div class="text-center">
3
+ <h1 class="text-4xl font-bold text-gray-900 mb-4">Home</h1>
4
+ <p class="text-lg text-gray-600 mb-8">Welcome to your Angular application.</p>
5
+ </div>
6
+ </main>
@@ -0,0 +1,23 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { HomeComponent } from './home';
3
+
4
+ describe('HomeComponent', () => {
5
+ beforeEach(async () => {
6
+ await TestBed.configureTestingModule({
7
+ imports: [HomeComponent],
8
+ }).compileComponents();
9
+ });
10
+
11
+ it('should create the component', () => {
12
+ const fixture = TestBed.createComponent(HomeComponent);
13
+ const component = fixture.componentInstance;
14
+ expect(component).toBeTruthy();
15
+ });
16
+
17
+ it('should render main landmark', async () => {
18
+ const fixture = TestBed.createComponent(HomeComponent);
19
+ await fixture.whenStable();
20
+ const compiled = fixture.nativeElement as HTMLElement;
21
+ expect(compiled.querySelector('main')).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,13 @@
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 } from '@angular/core';
7
+
8
+ @Component({
9
+ selector: 'app-home',
10
+ changeDetection: ChangeDetectionStrategy.OnPush,
11
+ templateUrl: './home.html',
12
+ })
13
+ export class HomeComponent {}
@@ -0,0 +1,47 @@
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
+ <app-auth-form
4
+ title="Login"
5
+ description="Enter your email below to login to your account"
6
+ [error]="submitError()"
7
+ submitText="Login"
8
+ submitLoadingText="Logging in…"
9
+ [submitting]="submitting()"
10
+ [footer]="{
11
+ text: 'Don\'t have an account?',
12
+ link: routes.REGISTER.PATH,
13
+ linkText: 'Sign up',
14
+ }"
15
+ (submitted)="onSubmit()"
16
+ >
17
+ <div class="mt-4 flex flex-col gap-4">
18
+ <app-field label="Email" htmlFor="login-email" [error]="controlError('email', 'email')">
19
+ <app-input
20
+ type="email"
21
+ [value]="form.controls.email.value ?? ''"
22
+ (valueChange)="setControl('email', $event)"
23
+ [placeholder]="placeholders.EMAIL"
24
+ />
25
+ </app-field>
26
+
27
+ <app-field
28
+ label="Password"
29
+ htmlFor="login-password"
30
+ [error]="controlError('password', 'required')"
31
+ >
32
+ <app-input
33
+ type="password"
34
+ [value]="form.controls.password.value ?? ''"
35
+ (valueChange)="setControl('password', $event)"
36
+ />
37
+ <a
38
+ [routerLink]="routes.FORGOT_PASSWORD.PATH"
39
+ class="text-sm underline-offset-4 hover:underline"
40
+ >
41
+ Forgot your password?
42
+ </a>
43
+ </app-field>
44
+ </div>
45
+ </app-auth-form>
46
+ </div>
47
+ </main>
@@ -0,0 +1,89 @@
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, 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 { 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
+ requiredWithMessage,
24
+ } from "../../features/authentication/utils/auth-validators";
25
+
26
+ /**
27
+ * Login page — Angular port of the React `Login`. Reactive Forms replace
28
+ * `@tanstack/react-form` + zod; the login POST + redirect logic is identical.
29
+ * On success with a `redirectUrl` it hard-navigates (establishes the server
30
+ * session cookie); otherwise it client-navigates to `/`.
31
+ */
32
+ @Component({
33
+ selector: "app-login-page",
34
+ changeDetection: ChangeDetectionStrategy.OnPush,
35
+ imports: [RouterLink, AuthFormComponent, FieldComponent, InputComponent],
36
+ templateUrl: "./login-page.html",
37
+ })
38
+ export class LoginPageComponent extends ReactiveFormPageBase {
39
+ private readonly fb = inject(FormBuilder);
40
+ private readonly router = inject(Router);
41
+ private readonly route = inject(ActivatedRoute);
42
+ private readonly dataClient = inject(DataClient);
43
+
44
+ protected readonly placeholders = AUTH_PLACEHOLDERS;
45
+ protected readonly routes = ROUTES;
46
+
47
+ protected override readonly form = this.fb.group({
48
+ email: ["", [emailValidator]],
49
+ password: ["", [requiredWithMessage("Password is required")]],
50
+ });
51
+
52
+ protected readonly submitError = signal<string | string[] | null>(null);
53
+ protected readonly submitting = signal<boolean>(false);
54
+
55
+ protected async onSubmit(): Promise<void> {
56
+ this.form.markAllAsTouched();
57
+ if (this.form.invalid) {
58
+ return;
59
+ }
60
+ this.submitError.set(null);
61
+ this.submitting.set(true);
62
+ try {
63
+ const { email, password } = this.form.getRawValue();
64
+ const startUrl = getStartUrl(this.route.snapshot.queryParamMap);
65
+ const response = await this.dataClient.fetch(API_ROUTES.LOGIN, {
66
+ method: "POST",
67
+ body: JSON.stringify({
68
+ email: (email ?? "").trim().toLowerCase(),
69
+ password: password ?? "",
70
+ startUrl,
71
+ }),
72
+ headers: { "Content-Type": "application/json", Accept: "application/json" },
73
+ });
74
+ const result = await handleApiResponse<AuthResponse>(response);
75
+ if (result?.redirectUrl) {
76
+ // Hard navigate to the URL which establishes the server session cookie.
77
+ window.location.replace(result.redirectUrl);
78
+ } else {
79
+ // In case redirectUrl is null, navigate to home.
80
+ void this.router.navigate(["/"], { replaceUrl: true });
81
+ }
82
+ } catch (err) {
83
+ console.error("Login failed", err);
84
+ this.submitError.set(err instanceof ApiError ? err.errors : "Login failed");
85
+ } finally {
86
+ this.submitting.set(false);
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,12 @@
1
+ <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
2
+ <div class="text-center">
3
+ <h1 class="text-4xl font-bold text-gray-900 mb-4">404</h1>
4
+ <p class="text-lg text-gray-600 mb-8">Page not found</p>
5
+ <a
6
+ routerLink="/"
7
+ class="inline-block px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
8
+ >
9
+ Go to Home
10
+ </a>
11
+ </div>
12
+ </main>
@@ -0,0 +1,33 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { provideRouter } from '@angular/router';
3
+ import { NotFoundComponent } from './not-found';
4
+
5
+ describe('NotFoundComponent', () => {
6
+ beforeEach(async () => {
7
+ await TestBed.configureTestingModule({
8
+ imports: [NotFoundComponent],
9
+ providers: [provideRouter([])],
10
+ }).compileComponents();
11
+ });
12
+
13
+ it('should create the component', () => {
14
+ const fixture = TestBed.createComponent(NotFoundComponent);
15
+ const component = fixture.componentInstance;
16
+ expect(component).toBeTruthy();
17
+ });
18
+
19
+ it('should render main landmark', async () => {
20
+ const fixture = TestBed.createComponent(NotFoundComponent);
21
+ await fixture.whenStable();
22
+ const compiled = fixture.nativeElement as HTMLElement;
23
+ expect(compiled.querySelector('main')).toBeTruthy();
24
+ });
25
+
26
+ it('should have a link to home', async () => {
27
+ const fixture = TestBed.createComponent(NotFoundComponent);
28
+ await fixture.whenStable();
29
+ const compiled = fixture.nativeElement as HTMLElement;
30
+ const link = compiled.querySelector('a');
31
+ expect(link?.getAttribute('href')).toBe('/');
32
+ });
33
+ });
@@ -0,0 +1,15 @@
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 } from '@angular/core';
7
+ import { RouterLink } from '@angular/router';
8
+
9
+ @Component({
10
+ selector: 'app-not-found',
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ imports: [RouterLink],
13
+ templateUrl: './not-found.html',
14
+ })
15
+ export class NotFoundComponent {}
@@ -0,0 +1,116 @@
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 (loadError()) {
4
+ <app-status-alert variant="error" [message]="loadError()!" />
5
+ } @else {
6
+ <app-auth-form
7
+ title="Profile"
8
+ description="Update your account information"
9
+ [showAlreadyLoggedIn]="false"
10
+ [error]="submitError()"
11
+ [success]="success() ? 'Profile updated!' : null"
12
+ submitText="Save Changes"
13
+ submitLoadingText="Saving…"
14
+ [submitting]="submitting()"
15
+ [submitDisabled]="loading()"
16
+ [footer]="{ link: routes.CHANGE_PASSWORD.PATH, linkText: 'Change password' }"
17
+ (submitted)="onSubmit()"
18
+ >
19
+ @if (loading()) {
20
+ <div role="status" aria-live="polite">
21
+ <span class="sr-only">Loading profile…</span>
22
+ <app-field label="Email"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
23
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 items-start">
24
+ <app-field label="First name"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
25
+ <app-field label="Last name"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
26
+ </div>
27
+ <app-field label="Phone"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
28
+ <app-field label="Street"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
29
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 items-start">
30
+ <app-field label="City"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
31
+ <app-field label="State"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
32
+ </div>
33
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 items-start">
34
+ <app-field label="Postal Code"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
35
+ <app-field label="Country"><app-skeleton class="h-9 w-full rounded-md" /></app-field>
36
+ </div>
37
+ </div>
38
+ } @else {
39
+ <div class="mt-4 flex flex-col gap-4">
40
+ <app-field label="Email" htmlFor="profile-email" [error]="controlError('Email', 'email')">
41
+ <app-input type="email" [value]="form.controls.Email.value ?? ''" [disabled]="true" />
42
+ </app-field>
43
+
44
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 items-start">
45
+ <app-field
46
+ label="First name"
47
+ htmlFor="profile-first-name"
48
+ [error]="controlError('FirstName', 'required')"
49
+ >
50
+ <app-input
51
+ [value]="form.controls.FirstName.value ?? ''"
52
+ (valueChange)="setControl('FirstName', $event)"
53
+ />
54
+ </app-field>
55
+ <app-field
56
+ label="Last name"
57
+ htmlFor="profile-last-name"
58
+ [error]="controlError('LastName', 'required')"
59
+ >
60
+ <app-input
61
+ [value]="form.controls.LastName.value ?? ''"
62
+ (valueChange)="setControl('LastName', $event)"
63
+ />
64
+ </app-field>
65
+ </div>
66
+
67
+ <app-field label="Phone" htmlFor="profile-phone">
68
+ <app-input
69
+ type="tel"
70
+ [value]="form.controls.Phone.value ?? ''"
71
+ (valueChange)="setControl('Phone', $event)"
72
+ />
73
+ </app-field>
74
+
75
+ <app-field label="Street" htmlFor="profile-street">
76
+ <app-input
77
+ [value]="form.controls.Street.value ?? ''"
78
+ (valueChange)="setControl('Street', $event)"
79
+ />
80
+ </app-field>
81
+
82
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 items-start">
83
+ <app-field label="City" htmlFor="profile-city">
84
+ <app-input
85
+ [value]="form.controls.City.value ?? ''"
86
+ (valueChange)="setControl('City', $event)"
87
+ />
88
+ </app-field>
89
+ <app-field label="State" htmlFor="profile-state">
90
+ <app-input
91
+ [value]="form.controls.State.value ?? ''"
92
+ (valueChange)="setControl('State', $event)"
93
+ />
94
+ </app-field>
95
+ </div>
96
+
97
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 items-start">
98
+ <app-field label="Postal Code" htmlFor="profile-postal-code">
99
+ <app-input
100
+ [value]="form.controls.PostalCode.value ?? ''"
101
+ (valueChange)="setControl('PostalCode', $event)"
102
+ />
103
+ </app-field>
104
+ <app-field label="Country" htmlFor="profile-country">
105
+ <app-input
106
+ [value]="form.controls.Country.value ?? ''"
107
+ (valueChange)="setControl('Country', $event)"
108
+ />
109
+ </app-field>
110
+ </div>
111
+ </div>
112
+ }
113
+ </app-auth-form>
114
+ }
115
+ </div>
116
+ </main>
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import {
7
+ ChangeDetectionStrategy,
8
+ Component,
9
+ computed,
10
+ inject,
11
+ OnInit,
12
+ signal,
13
+ } from "@angular/core";
14
+ import { FormBuilder } from "@angular/forms";
15
+ import { AuthFormComponent } from "../../features/authentication/auth-form/auth-form";
16
+ import { ReactiveFormPageBase } from "../../features/authentication/reactive-form-page.base";
17
+ import { StatusAlertComponent } from "../../features/authentication/status-alert/status-alert";
18
+ import { FieldComponent } from "../../components/ui/field/field";
19
+ import { InputComponent } from "../../components/ui/input/input";
20
+ import { SkeletonComponent } from "../../components/ui/skeleton/skeleton";
21
+ import { AuthService } from "../../features/authentication/auth/auth.service";
22
+ import { UserProfileService } from "../../api/user-profile.service";
23
+ import { ROUTES } from "../../features/authentication/config/authentication.config";
24
+ import {
25
+ emailValidator,
26
+ requiredWithMessage,
27
+ } from "../../features/authentication/utils/auth-validators";
28
+
29
+ /**
30
+ * The profile form value shape (mirrors the React `ProfileFormValues`).
31
+ *
32
+ * Declared as a `type` (not an `interface`) so it is assignable to
33
+ * `Record<string, unknown>` when passed to `UserProfileService.updateUserProfile`:
34
+ * an interface is not index-signature-assignable (it can be augmented via
35
+ * declaration merging), whereas a type-literal is.
36
+ */
37
+ type ProfileFormValues = {
38
+ FirstName: string;
39
+ LastName: string;
40
+ Email: string;
41
+ Phone: string | null;
42
+ Street: string | null;
43
+ City: string | null;
44
+ State: string | null;
45
+ PostalCode: string | null;
46
+ Country: string | null;
47
+ };
48
+
49
+ /**
50
+ * Profile page — Angular port of the React `Profile`. Protected route.
51
+ *
52
+ * Loads the current user's profile via GraphQL (`UserProfileService`) on init,
53
+ * showing a skeleton while loading. Email is read-only. On submit it updates
54
+ * via GraphQL and merges the returned record with the submitted values so
55
+ * FLS-hidden fields don't blank the form — identical to the React merge logic.
56
+ * `showAlreadyLoggedIn` is false.
57
+ */
58
+ @Component({
59
+ selector: "app-profile-page",
60
+ changeDetection: ChangeDetectionStrategy.OnPush,
61
+ imports: [
62
+ AuthFormComponent,
63
+ StatusAlertComponent,
64
+ FieldComponent,
65
+ InputComponent,
66
+ SkeletonComponent,
67
+ ],
68
+ templateUrl: "./profile-page.html",
69
+ })
70
+ export class ProfilePageComponent extends ReactiveFormPageBase implements OnInit {
71
+ private readonly fb = inject(FormBuilder);
72
+ private readonly authService = inject(AuthService);
73
+ private readonly profileService = inject(UserProfileService);
74
+
75
+ protected readonly routes = ROUTES;
76
+ private readonly user = this.authService.requireUser();
77
+
78
+ protected override readonly form = this.fb.group({
79
+ FirstName: ["", [requiredWithMessage("First name is required")]],
80
+ LastName: ["", [requiredWithMessage("Last name is required")]],
81
+ Email: [{ value: "", disabled: true }, [emailValidator]],
82
+ Phone: [""],
83
+ Street: [""],
84
+ City: [""],
85
+ State: [""],
86
+ PostalCode: [""],
87
+ Country: [""],
88
+ });
89
+
90
+ protected readonly loadError = signal<string | null>(null);
91
+ protected readonly submitError = signal<string | null>(null);
92
+ protected readonly submitting = signal<boolean>(false);
93
+ protected readonly success = signal<boolean>(false);
94
+ private readonly loaded = signal<boolean>(false);
95
+
96
+ /** True until the profile has loaded and no load error occurred. */
97
+ protected readonly loading = computed(() => !this.loaded() && this.loadError() === null);
98
+
99
+ ngOnInit(): void {
100
+ void this.loadProfile();
101
+ }
102
+
103
+ private async loadProfile(): Promise<void> {
104
+ try {
105
+ const data = await this.profileService.fetchUserProfile<Partial<ProfileFormValues>>(
106
+ this.user.id,
107
+ );
108
+ // Merge with defaults so missing fields (e.g. due to FLS) don't break the form.
109
+ this.applyProfile({
110
+ FirstName: data.FirstName ?? "",
111
+ LastName: data.LastName ?? "",
112
+ Email: data.Email ?? "",
113
+ Phone: data.Phone ?? null,
114
+ Street: data.Street ?? null,
115
+ City: data.City ?? null,
116
+ State: data.State ?? null,
117
+ PostalCode: data.PostalCode ?? null,
118
+ Country: data.Country ?? null,
119
+ });
120
+ this.loaded.set(true);
121
+ } catch (err) {
122
+ console.error("Failed to load profile", err);
123
+ this.loadError.set("Failed to load profile");
124
+ }
125
+ }
126
+
127
+ private applyProfile(profile: ProfileFormValues): void {
128
+ this.form.reset({
129
+ FirstName: profile.FirstName,
130
+ LastName: profile.LastName,
131
+ Email: profile.Email,
132
+ Phone: profile.Phone ?? "",
133
+ Street: profile.Street ?? "",
134
+ City: profile.City ?? "",
135
+ State: profile.State ?? "",
136
+ PostalCode: profile.PostalCode ?? "",
137
+ Country: profile.Country ?? "",
138
+ });
139
+ }
140
+
141
+ protected async onSubmit(): Promise<void> {
142
+ this.form.markAllAsTouched();
143
+ if (this.form.invalid) {
144
+ return;
145
+ }
146
+ this.submitError.set(null);
147
+ this.success.set(false);
148
+ this.submitting.set(true);
149
+ try {
150
+ // getRawValue includes the disabled Email control.
151
+ const raw = this.form.getRawValue();
152
+ const value: ProfileFormValues = {
153
+ FirstName: (raw.FirstName ?? "").trim(),
154
+ LastName: (raw.LastName ?? "").trim(),
155
+ Email: (raw.Email ?? "").trim(),
156
+ Phone: this.optional(raw.Phone),
157
+ Street: this.optional(raw.Street),
158
+ City: this.optional(raw.City),
159
+ State: this.optional(raw.State),
160
+ PostalCode: this.optional(raw.PostalCode),
161
+ Country: this.optional(raw.Country),
162
+ };
163
+ const updated = await this.profileService.updateUserProfile<Partial<ProfileFormValues>>(
164
+ this.user.id,
165
+ value,
166
+ );
167
+ // Merge with submitted values so missing fields (e.g. FLS) don't break the form.
168
+ this.applyProfile({
169
+ FirstName: updated.FirstName ?? value.FirstName ?? "",
170
+ LastName: updated.LastName ?? value.LastName ?? "",
171
+ Email: updated.Email ?? value.Email ?? "",
172
+ Phone: updated.Phone ?? value.Phone ?? null,
173
+ Street: updated.Street ?? value.Street ?? null,
174
+ City: updated.City ?? value.City ?? null,
175
+ State: updated.State ?? value.State ?? null,
176
+ PostalCode: updated.PostalCode ?? value.PostalCode ?? null,
177
+ Country: updated.Country ?? value.Country ?? null,
178
+ });
179
+ this.success.set(true);
180
+ window.scrollTo({ top: 0, behavior: "smooth" });
181
+ } catch (err) {
182
+ console.error("Failed to update profile", err);
183
+ this.submitError.set("Failed to update profile");
184
+ } finally {
185
+ this.submitting.set(false);
186
+ }
187
+ }
188
+
189
+ /** Mirrors the React `optionalString`: trim and coerce empty to null. */
190
+ private optional(value: string | null | undefined): string | null {
191
+ const trimmed = (value ?? "").trim();
192
+ return trimmed === "" ? null : trimmed;
193
+ }
194
+ }