@salesforce/ui-bundle-template-feature-vue-authentication 0.0.0-stage → 13.1.0

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 (217) hide show
  1. package/LICENSE.txt +82 -0
  2. package/README.md +106 -2
  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 +5423 -0
  8. package/dist/README.md +83 -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/UIBundleAuthUtils_Test.cls +141 -0
  14. package/dist/force-app/main/default/classes/UIBundleAuthUtils_Test.cls-meta.xml +5 -0
  15. package/dist/force-app/main/default/classes/UIBundleChangePassword.cls +77 -0
  16. package/dist/force-app/main/default/classes/UIBundleChangePassword.cls-meta.xml +5 -0
  17. package/dist/force-app/main/default/classes/UIBundleForgotPassword.cls +71 -0
  18. package/dist/force-app/main/default/classes/UIBundleForgotPassword.cls-meta.xml +5 -0
  19. package/dist/force-app/main/default/classes/UIBundleLogin.cls +105 -0
  20. package/dist/force-app/main/default/classes/UIBundleLogin.cls-meta.xml +5 -0
  21. package/dist/force-app/main/default/classes/UIBundleRegistration.cls +162 -0
  22. package/dist/force-app/main/default/classes/UIBundleRegistration.cls-meta.xml +5 -0
  23. package/dist/force-app/main/default/classes/UIBundleSocialLoginConfig.cls +145 -0
  24. package/dist/force-app/main/default/classes/UIBundleSocialLoginConfig.cls-meta.xml +5 -0
  25. package/dist/force-app/main/default/classes/UIBundleSocialLoginConfig_Test.cls +181 -0
  26. package/dist/force-app/main/default/classes/UIBundleSocialLoginConfig_Test.cls-meta.xml +5 -0
  27. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/.forceignore +15 -0
  28. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/.graphqlrc.yml +2 -0
  29. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/.prettierignore +9 -0
  30. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/.prettierrc +11 -0
  31. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/README.md +43 -0
  32. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/codegen.yml +95 -0
  33. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/components.json +19 -0
  34. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/e2e/app.spec.ts +17 -0
  35. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/eslint.config.js +124 -0
  36. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/feature-vue-authentication.uibundle-meta.xml +7 -0
  37. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/index.html +12 -0
  38. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/package.json +74 -0
  39. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/playwright.config.ts +24 -0
  40. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/scripts/get-graphql-schema.mjs +71 -0
  41. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/scripts/rewrite-e2e-assets.mjs +23 -0
  42. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/App.vue +5 -0
  43. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/api/graphqlClient.ts +44 -0
  44. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/appLayout.vue +80 -0
  45. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/alerts/status-alert.vue +59 -0
  46. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/layouts/card-layout.vue +30 -0
  47. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/alert/Alert.vue +21 -0
  48. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/alert/AlertAction.vue +17 -0
  49. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/alert/AlertDescription.vue +22 -0
  50. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/alert/AlertTitle.vue +22 -0
  51. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/alert/index.ts +25 -0
  52. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/avatar/Avatar.vue +23 -0
  53. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/avatar/AvatarFallback.vue +31 -0
  54. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/avatar/AvatarImage.vue +16 -0
  55. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/avatar/index.ts +3 -0
  56. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/button/Button.vue +33 -0
  57. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/button/index.ts +43 -0
  58. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/Card.vue +29 -0
  59. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/CardAction.vue +22 -0
  60. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/CardContent.vue +17 -0
  61. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/CardDescription.vue +17 -0
  62. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/CardFooter.vue +22 -0
  63. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/CardHeader.vue +22 -0
  64. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/CardTitle.vue +22 -0
  65. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/card/index.ts +7 -0
  66. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/checkbox/Checkbox.vue +43 -0
  67. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/checkbox/index.ts +1 -0
  68. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/collapsible/Collapsible.vue +19 -0
  69. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/collapsible/CollapsibleContent.vue +12 -0
  70. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/collapsible/CollapsibleTrigger.vue +12 -0
  71. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/collapsible/index.ts +3 -0
  72. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/Dialog.vue +15 -0
  73. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogClose.vue +12 -0
  74. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogContent.vue +59 -0
  75. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogDescription.vue +31 -0
  76. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogFooter.vue +33 -0
  77. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogHeader.vue +17 -0
  78. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogOverlay.vue +31 -0
  79. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogPortal.vue +12 -0
  80. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogTitle.vue +26 -0
  81. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/DialogTrigger.vue +12 -0
  82. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dialog/index.ts +10 -0
  83. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
  84. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +51 -0
  85. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuContent.vue +47 -0
  86. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
  87. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuItem.vue +44 -0
  88. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +30 -0
  89. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuPortal.vue +12 -0
  90. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
  91. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +52 -0
  92. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +26 -0
  93. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +19 -0
  94. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
  95. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +37 -0
  96. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +38 -0
  97. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
  98. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/dropdown-menu/index.ts +15 -0
  99. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/Field.vue +27 -0
  100. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldContent.vue +22 -0
  101. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldDescription.vue +24 -0
  102. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldError.vue +48 -0
  103. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldGroup.vue +22 -0
  104. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldLabel.vue +24 -0
  105. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldLegend.vue +29 -0
  106. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldSeparator.vue +31 -0
  107. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldSet.vue +22 -0
  108. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/FieldTitle.vue +22 -0
  109. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/field/index.ts +33 -0
  110. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/index.ts +115 -0
  111. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/input/Input.vue +30 -0
  112. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/input/index.ts +1 -0
  113. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/label/Label.vue +29 -0
  114. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/label/index.ts +1 -0
  115. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/Pagination.vue +17 -0
  116. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/PaginationContent.vue +15 -0
  117. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/PaginationEllipsis.vue +23 -0
  118. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/PaginationItem.vue +7 -0
  119. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/PaginationLink.vue +31 -0
  120. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/PaginationNext.vue +29 -0
  121. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/PaginationPrevious.vue +29 -0
  122. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/pagination/index.ts +7 -0
  123. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/Popover.vue +15 -0
  124. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/PopoverAnchor.vue +12 -0
  125. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/PopoverContent.vue +44 -0
  126. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/PopoverDescription.vue +17 -0
  127. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/PopoverHeader.vue +17 -0
  128. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/PopoverTitle.vue +14 -0
  129. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/PopoverTrigger.vue +12 -0
  130. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/popover/index.ts +7 -0
  131. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/Select.vue +15 -0
  132. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectContent.vue +65 -0
  133. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectGroup.vue +26 -0
  134. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectItem.vue +41 -0
  135. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectLabel.vue +26 -0
  136. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectScrollDownButton.vue +32 -0
  137. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectScrollUpButton.vue +32 -0
  138. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectSeparator.vue +24 -0
  139. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectTrigger.vue +45 -0
  140. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/SelectValue.vue +12 -0
  141. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/select/index.ts +10 -0
  142. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/separator/Separator.vue +33 -0
  143. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/separator/index.ts +1 -0
  144. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/skeleton/Skeleton.vue +15 -0
  145. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/skeleton/index.ts +1 -0
  146. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/sonner/Sonner.vue +29 -0
  147. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/sonner/index.ts +3 -0
  148. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/spinner/Spinner.vue +17 -0
  149. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/components/ui/spinner/index.ts +1 -0
  150. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/composables/useAsyncData.ts +69 -0
  151. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/api/userProfileApi.ts +107 -0
  152. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/authHelpers.ts +78 -0
  153. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/authenticationConfig.ts +66 -0
  154. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/components/SocialLogin.vue +150 -0
  155. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/composables/useCountdownTimer.ts +246 -0
  156. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/composables/useRetryWithBackoff.ts +112 -0
  157. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/composables/useSessionTimeout.ts +244 -0
  158. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/context/authContext.ts +115 -0
  159. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/footers/FooterLink.vue +47 -0
  160. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/forms/AuthForm.vue +141 -0
  161. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/forms/SubmitButton.vue +57 -0
  162. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/hooks/EmailField.vue +46 -0
  163. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/hooks/PasswordField.vue +48 -0
  164. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/hooks/TextField.vue +106 -0
  165. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/hooks/form.ts +90 -0
  166. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/hooks/formContexts.ts +61 -0
  167. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/layout/CenteredPageLayout.vue +76 -0
  168. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/layouts/AuthAppLayout.vue +24 -0
  169. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/layouts/PrivateRouteLayout.vue +50 -0
  170. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/menu/AuthMenu.vue +143 -0
  171. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/pages/ChangePassword.vue +122 -0
  172. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/pages/ForgotPassword.vue +90 -0
  173. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/pages/Login.vue +106 -0
  174. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/pages/Profile.vue +180 -0
  175. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/pages/Register.vue +135 -0
  176. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/pages/ResetPassword.vue +114 -0
  177. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/sessionTimeout/SessionExpiredAlert.vue +50 -0
  178. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/sessionTimeout/SessionTimeoutValidator.vue +136 -0
  179. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/sessionTimeout/SessionWarningModal.vue +151 -0
  180. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/sessionTimeout/sessionTimeService.ts +142 -0
  181. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/sessionTimeout/sessionTimeoutConfig.ts +82 -0
  182. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/utils/helpers.ts +90 -0
  183. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/features/authentication/utils/queryToSearchParams.ts +33 -0
  184. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/lib/utils.ts +6 -0
  185. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/main.ts +6 -0
  186. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/pages/Home.vue +10 -0
  187. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/pages/NotFound.vue +18 -0
  188. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/router-utils.ts +32 -0
  189. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/router.ts +90 -0
  190. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/styles/global.css +134 -0
  191. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/src/test/setup.ts +1 -0
  192. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/tsconfig.json +45 -0
  193. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/tsconfig.node.json +13 -0
  194. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/tsconfig.tsbuildinfo +1 -0
  195. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/ui-bundle.json +7 -0
  196. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/vite-env.d.ts +14 -0
  197. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/vite.config.ts +106 -0
  198. package/dist/force-app/main/default/uiBundles/feature-vue-authentication/vitest-env.d.ts +2 -0
  199. package/dist/jest.config.js +6 -0
  200. package/dist/package-lock.json +12554 -0
  201. package/dist/package.json +46 -0
  202. package/dist/scripts/apex/hello.apex +10 -0
  203. package/dist/scripts/gitignore-templates.json +4 -0
  204. package/dist/scripts/graphql-search.sh +191 -0
  205. package/dist/scripts/network-senders.mjs +84 -0
  206. package/dist/scripts/org-setup-config-schema.mjs +132 -0
  207. package/dist/scripts/org-setup-dev.mjs +114 -0
  208. package/dist/scripts/org-setup-url.mjs +108 -0
  209. package/dist/scripts/org-setup-utils.mjs +569 -0
  210. package/dist/scripts/org-setup-xml.mjs +283 -0
  211. package/dist/scripts/org-setup.config.json +5 -0
  212. package/dist/scripts/org-setup.mjs +2545 -0
  213. package/dist/scripts/sf-project-setup.mjs +103 -0
  214. package/dist/scripts/soql/account.soql +6 -0
  215. package/dist/scripts/validate-org-setup-config.mjs +38 -0
  216. package/dist/sfdx-project.json +12 -0
  217. package/package.json +44 -4
@@ -0,0 +1,151 @@
1
+ <!--
2
+ Copyright (c) 2026, Salesforce, Inc.,
3
+ All rights reserved.
4
+ For full license text, see the LICENSE.txt file
5
+ -->
6
+ <script setup lang="ts">
7
+ import { ref, watch } from "vue";
8
+ import {
9
+ Dialog,
10
+ DialogContent,
11
+ DialogDescription,
12
+ DialogFooter,
13
+ DialogHeader,
14
+ DialogTitle,
15
+ } from "@/components/ui/dialog";
16
+ import { Button } from "@/components/ui/button";
17
+ import { useCountdownTimer } from "../composables/useCountdownTimer";
18
+ import { LABELS } from "./sessionTimeoutConfig";
19
+
20
+ /**
21
+ * Modal dialog with a countdown timer, shown when the session is near
22
+ * expiration. The Vue analogue of the React `SessionWarningModal`.
23
+ */
24
+ const props = defineProps<{
25
+ /** Whether the modal is visible. */
26
+ isOpen: boolean;
27
+ /** Seconds remaining until the session expires. */
28
+ timeRemaining: number;
29
+ }>();
30
+
31
+ const emit = defineEmits<{
32
+ /** User clicked "Continue Working". */
33
+ (e: "extendSession"): void;
34
+ /** User clicked "Log Out". */
35
+ (e: "logout"): void;
36
+ /** Countdown reached 0 (before logout). */
37
+ (e: "countdownExpire"): void;
38
+ }>();
39
+
40
+ const continueButton = ref<InstanceType<typeof Button> | null>(null);
41
+ // Control focused before the modal opened, restored when it closes.
42
+ let previousFocus: HTMLElement | null = null;
43
+
44
+ const timer = useCountdownTimer({
45
+ initialTime: props.timeRemaining,
46
+ onExpire: () => emit("countdownExpire"),
47
+ });
48
+
49
+ const { start, stop, reset, formattedTime, isoTime, accessibilityAnnouncement } = timer;
50
+
51
+ // Consolidated timer management: handle both open/close and timeRemaining changes.
52
+ watch(
53
+ () => [props.isOpen, props.timeRemaining] as const,
54
+ ([isOpen]) => {
55
+ if (!isOpen) {
56
+ stop();
57
+ return;
58
+ }
59
+ // Modal is open: reset and (re)start the timer.
60
+ reset();
61
+ start();
62
+ },
63
+ { immediate: true },
64
+ );
65
+
66
+ function onOpenAutoFocus(event: Event): void {
67
+ event.preventDefault();
68
+ previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
69
+ (continueButton.value?.$el as HTMLElement | undefined)?.focus();
70
+ }
71
+
72
+ function onCloseAutoFocus(event: Event): void {
73
+ event.preventDefault();
74
+ const previous = previousFocus;
75
+ previousFocus = null;
76
+ if (previous?.isConnected && previous !== document.body) {
77
+ previous.focus();
78
+ if (document.activeElement === previous) return;
79
+ }
80
+ // The previous control is gone or can no longer take focus (e.g. disabled).
81
+ const target = document.querySelector<HTMLElement>("main, #main-content");
82
+ if (target) {
83
+ if (target.tabIndex < 0 && !target.hasAttribute("tabindex")) {
84
+ target.setAttribute("tabindex", "-1");
85
+ }
86
+ target.focus();
87
+ }
88
+ }
89
+
90
+ function handleContinue(): void {
91
+ stop();
92
+ emit("extendSession");
93
+ }
94
+
95
+ function handleLogoutClick(): void {
96
+ stop();
97
+ emit("logout");
98
+ }
99
+ </script>
100
+
101
+ <template>
102
+ <!-- onOpenChange is intentionally ignored: the modal is dismissable only via its actions. -->
103
+ <Dialog :open="isOpen">
104
+ <DialogContent
105
+ aria-labelledby="session-warning-title"
106
+ aria-describedby="session-warning-description"
107
+ :show-close-button="false"
108
+ class="max-w-md"
109
+ @escape-key-down="(e: Event) => e.preventDefault()"
110
+ @pointer-down-outside="(e: Event) => e.preventDefault()"
111
+ @interact-outside="(e: Event) => e.preventDefault()"
112
+ @open-auto-focus="onOpenAutoFocus"
113
+ @close-auto-focus="onCloseAutoFocus"
114
+ >
115
+ <DialogHeader>
116
+ <DialogTitle id="session-warning-title">{{ LABELS.sessionWarningTitle }}</DialogTitle>
117
+ <DialogDescription id="session-warning-description">
118
+ {{ LABELS.sessionWarningMessage }}
119
+ </DialogDescription>
120
+ </DialogHeader>
121
+
122
+ <div class="flex flex-col items-center gap-4 py-6">
123
+ <!-- Countdown timer display -->
124
+ <time
125
+ :datetime="isoTime"
126
+ role="timer"
127
+ aria-live="off"
128
+ aria-atomic="true"
129
+ aria-describedby="session-warning-description"
130
+ class="text-5xl font-bold text-center tabular-nums text-destructive"
131
+ >
132
+ {{ formattedTime }}
133
+ </time>
134
+
135
+ <!-- Accessibility announcement region -->
136
+ <div role="status" aria-live="polite" aria-atomic="true" class="sr-only">
137
+ {{ accessibilityAnnouncement }}
138
+ </div>
139
+ </div>
140
+
141
+ <DialogFooter class="flex gap-4 justify-end">
142
+ <Button variant="outline" @click="handleLogoutClick">
143
+ {{ LABELS.logoutButton }}
144
+ </Button>
145
+ <Button ref="continueButton" variant="default" @click="handleContinue">
146
+ {{ LABELS.continueButton }}
147
+ </Button>
148
+ </DialogFooter>
149
+ </DialogContent>
150
+ </Dialog>
151
+ </template>
@@ -0,0 +1,142 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ /**
7
+ * SessionTimeServlet API service
8
+ * Handles communication with the session validation endpoint
9
+ */
10
+
11
+ import { SESSION_CONFIG } from "./sessionTimeoutConfig";
12
+
13
+ /**
14
+ * Response from SessionTimeServlet API
15
+ */
16
+ export interface SessionResponse {
17
+ /** Session phase */
18
+ sp: number;
19
+ /** Seconds remaining in session */
20
+ sr: number;
21
+ }
22
+
23
+ /**
24
+ * Parse the servlet response text into SessionResponse object
25
+ * Handles CSRF protection prefix
26
+ *
27
+ * @param text - Raw response text from servlet
28
+ * @returns Parsed session response, or undefined if parsing fails
29
+ */
30
+ function parseResponseResult(text: string): SessionResponse | undefined {
31
+ let cleanedText = text;
32
+
33
+ // Strip CSRF protection prefix if present
34
+ if (cleanedText.startsWith(SESSION_CONFIG.CSRF_TOKEN)) {
35
+ cleanedText = cleanedText.substring(SESSION_CONFIG.CSRF_TOKEN.length);
36
+ }
37
+
38
+ // Trim whitespace
39
+ cleanedText = cleanedText.trim();
40
+
41
+ try {
42
+ const parsed = JSON.parse(cleanedText) as SessionResponse;
43
+
44
+ // Validate response structure
45
+ if (typeof parsed.sp !== "number" || typeof parsed.sr !== "number") {
46
+ throw new Error("Invalid response structure: missing sp or sr properties");
47
+ }
48
+
49
+ return parsed;
50
+ } catch (error) {
51
+ console.error("[sessionTimeService] Failed to parse response:", error, "Text:", cleanedText);
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Call SessionTimeServlet API
57
+ * Internal function used by both poll and extend functions.
58
+ * Returns undefined on any failure so the session timeout feature
59
+ * never crashes the running application.
60
+ *
61
+ * @param basePath - Community base path (e.g., "/sfsites/c/")
62
+ * @param extend - Whether to extend the session (updateTimedOutSession param)
63
+ * @returns Session response with remaining time, or undefined on failure
64
+ */
65
+ async function callSessionTimeServlet(
66
+ basePath: string,
67
+ extend: boolean = false,
68
+ ): Promise<SessionResponse | undefined> {
69
+ // Build URL with cache-busting timestamp
70
+ const timestamp = Date.now();
71
+ let url = `${basePath}${SESSION_CONFIG.SERVLET_URL}?buster=${timestamp}`;
72
+
73
+ if (extend) {
74
+ url += "&updateTimedOutSession=true";
75
+ }
76
+
77
+ try {
78
+ const response = await fetch(url, {
79
+ method: "GET",
80
+ credentials: "same-origin",
81
+ cache: "no-cache",
82
+ headers: {
83
+ "X-Requested-With": "XMLHttpRequest",
84
+ },
85
+ });
86
+
87
+ if (!response.ok) {
88
+ console.error(`[sessionTimeService] HTTP ${response.status}: ${response.statusText}`);
89
+ return undefined;
90
+ }
91
+
92
+ const contentType = response.headers.get("content-type");
93
+ if (contentType && !contentType.includes("text") && !contentType.includes("json")) {
94
+ console.error(`[sessionTimeService] Unexpected content type: ${contentType}`);
95
+ return undefined;
96
+ }
97
+
98
+ const text = await response.text();
99
+ const parsed = parseResponseResult(text);
100
+ if (!parsed) {
101
+ return undefined;
102
+ }
103
+
104
+ return {
105
+ sp: parsed.sp,
106
+ sr: Math.max(0, parsed.sr - SESSION_CONFIG.LATENCY_BUFFER_SECONDS),
107
+ };
108
+ } catch (error) {
109
+ console.error("[sessionTimeService] API call failed:", error);
110
+ return undefined;
111
+ }
112
+ }
113
+
114
+ /**
115
+ * Poll SessionTimeServlet to check remaining session time
116
+ * Called periodically to monitor session status
117
+ *
118
+ * @param basePath - Community base path (e.g., "/sfsites/c/")
119
+ * @returns Session response with remaining time, or undefined on failure
120
+ */
121
+ export async function pollSessionTimeServlet(
122
+ basePath: string,
123
+ ): Promise<SessionResponse | undefined> {
124
+ return callSessionTimeServlet(basePath, false);
125
+ }
126
+
127
+ /**
128
+ * Extend the current session time
129
+ * Called when user clicks "Continue Working" in warning modal
130
+ *
131
+ * @param basePath - Community base path (e.g., "/sfsites/c/")
132
+ * @returns Session response with new remaining time, or undefined on failure
133
+ */
134
+ export async function extendSessionTime(basePath: string): Promise<SessionResponse | undefined> {
135
+ return callSessionTimeServlet(basePath, true);
136
+ }
137
+
138
+ /**
139
+ * Export parseResponseResult for testing purposes
140
+ * @internal
141
+ */
142
+ export { parseResponseResult };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ /**
7
+ * Configuration constants for session timeout monitoring
8
+ */
9
+
10
+ // ============================================================================
11
+ // Retry Configuration
12
+ // ============================================================================
13
+
14
+ /** Initial delay for first retry attempt (2 seconds) */
15
+ export const INITIAL_RETRY_DELAY = 2000;
16
+
17
+ /** Maximum number of retry attempts before giving up */
18
+ export const MAX_RETRY_ATTEMPTS = 10;
19
+
20
+ /** Maximum retry delay (30 minutes) */
21
+ export const MAX_RETRY_DELAY = 30 * 60 * 1000;
22
+
23
+ // ============================================================================
24
+ // Session Storage Keys
25
+ // ============================================================================
26
+
27
+ /** sessionStorage keys used by session validator */
28
+ export const STORAGE_KEYS = {
29
+ /** Flag to show session expired message on login page */
30
+ SHOW_SESSION_MESSAGE: "lwrSessionValidator.showSessionMessage",
31
+ } as const;
32
+
33
+ // ============================================================================
34
+ // Servlet Configuration
35
+ // ============================================================================
36
+
37
+ /** SessionTimeServlet configuration */
38
+ export const SESSION_CONFIG = {
39
+ /** Relative URL to SessionTimeServlet */
40
+ SERVLET_URL: "/sfsites/c/_nc_external/system/security/session/SessionTimeServlet",
41
+
42
+ /** Latency buffer to subtract from server response (seconds) */
43
+ LATENCY_BUFFER_SECONDS: 3,
44
+
45
+ /** CSRF protection prefix in servlet responses */
46
+ CSRF_TOKEN: "while(1);\n",
47
+ } as const;
48
+
49
+ // ============================================================================
50
+ // UI Labels
51
+ // ============================================================================
52
+
53
+ /**
54
+ * UI labels for session timeout components
55
+ */
56
+ export const LABELS = {
57
+ /** Title for session warning modal */
58
+ sessionWarningTitle: "Session Timeout Warning",
59
+
60
+ /** Message text in session warning modal */
61
+ sessionWarningMessage:
62
+ "For security, we log you out if you’re inactive for too long. To continue working, click Continue before the time expires.",
63
+
64
+ /** Text for "Continue" button */
65
+ continueButton: "Continue",
66
+
67
+ /** Text for "Log Out" button */
68
+ logoutButton: "Log Out",
69
+
70
+ /** Message shown on login page after session expires */
71
+ invalidSessionMessage: "Your session has expired. Please log in again.",
72
+
73
+ /** Accessibility label for close button */
74
+ closeLabel: "Close",
75
+ } as const;
76
+
77
+ // ============================================================================
78
+ // Session Timeout Configuration
79
+ // ============================================================================
80
+
81
+ /** Session warning time in seconds (30 seconds) */
82
+ export const SESSION_WARNING_TIME = 30;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ /**
7
+ * Error thrown when the API returns a non-OK response with structured error messages.
8
+ * The `errors` array contains user-facing messages that are safe to display —
9
+ * backend Apex classes guarantee that system exceptions are never exposed.
10
+ */
11
+ export class ApiError extends Error {
12
+ errors: string[];
13
+ constructor(errors: string[]) {
14
+ super(errors[0]);
15
+ this.name = "ApiError";
16
+ this.errors = errors;
17
+ }
18
+ }
19
+
20
+ /**
21
+ * [Dev Note] Helper to parse the fetch Response.
22
+ * It handles the distinction between success (JSON) and failure (throwing Error).
23
+ */
24
+ export async function handleApiResponse<T = unknown>(response: Response): Promise<T> {
25
+ // 1. Robustness: Handle 204 No Content gracefully
26
+ if (response.status === 204) {
27
+ return {} as T;
28
+ }
29
+
30
+ let data: unknown = null;
31
+
32
+ const contentType = response.headers.get("content-type");
33
+ if (contentType?.includes("application/json")) {
34
+ data = await response.json();
35
+ } else {
36
+ // [Dev Note] If Salesforce returns HTML (e.g. standard error page),
37
+ // we consume text to avoid parsing errors.
38
+ await response.text();
39
+ }
40
+
41
+ if (!response.ok) {
42
+ console.error("API request failed", data);
43
+ const errors = (data as { errors?: string[] } | null)?.errors;
44
+ if (errors?.length) {
45
+ throw new ApiError(errors);
46
+ }
47
+ throw new Error("An unexpected error occurred");
48
+ }
49
+
50
+ return data as T;
51
+ }
52
+
53
+ /**
54
+ * UI API Record response structure.
55
+ */
56
+ export type RecordResponse = {
57
+ fields: Record<
58
+ string,
59
+ {
60
+ value: string;
61
+ }
62
+ >;
63
+ };
64
+
65
+ /**
66
+ * [Dev Note] GraphQL can return a complex nested structure.
67
+ * This helper flattens it to a simple object for easier form binding.
68
+ *
69
+ * @param data - Extracted payload from the GraphQL response.
70
+ * @param fallbackError - Fallback error message if data is null/undefined or not an object.
71
+ * @throws {Error} If data is not valid.
72
+ * @returns Flattened object with values mapped directly to the fields.
73
+ */
74
+ export function flattenGraphQLRecord<T>(
75
+ data: unknown,
76
+ fallbackError: string = "An unknown error occurred",
77
+ ): T {
78
+ if (!data || typeof data !== "object") {
79
+ throw new Error(fallbackError);
80
+ }
81
+
82
+ return Object.fromEntries(
83
+ Object.entries(data as Record<string, unknown>).map(([key, field]) => [
84
+ key,
85
+ field !== null && typeof field === "object" && "value" in field
86
+ ? (field as { value: unknown }).value
87
+ : (field ?? null),
88
+ ]),
89
+ ) as T;
90
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import type { LocationQuery } from "vue-router";
7
+
8
+ /**
9
+ * Converts a vue-router `LocationQuery` into a `URLSearchParams` instance so the
10
+ * framework-neutral auth helpers (e.g. `getStartUrl`) can consume it unchanged.
11
+ *
12
+ * vue-router represents each value as `string | null` (or an array of those for
13
+ * repeated keys); null values are omitted and array values are appended once
14
+ * per entry.
15
+ */
16
+ export function queryToSearchParams(query: LocationQuery): URLSearchParams {
17
+ const params = new URLSearchParams();
18
+ for (const [key, value] of Object.entries(query)) {
19
+ if (value == null) {
20
+ continue;
21
+ }
22
+ if (Array.isArray(value)) {
23
+ for (const item of value) {
24
+ if (item != null) {
25
+ params.append(key, item);
26
+ }
27
+ }
28
+ } else {
29
+ params.append(key, value);
30
+ }
31
+ }
32
+ return params;
33
+ }
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
+ }
@@ -0,0 +1,6 @@
1
+ import { createApp } from 'vue';
2
+ import App from '@/App.vue';
3
+ import { router } from '@/router';
4
+ import './styles/global.css';
5
+
6
+ createApp(App).use(router).mount('#app');
@@ -0,0 +1,10 @@
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>
4
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
5
+ <div class="text-center">
6
+ <h1 class="text-4xl font-bold text-gray-900 mb-4">Home</h1>
7
+ <p class="text-lg text-gray-600 mb-8">Welcome to your Vue application.</p>
8
+ </div>
9
+ </div>
10
+ </template>
@@ -0,0 +1,18 @@
1
+ <script setup lang="ts">
2
+ import { RouterLink } from 'vue-router';
3
+ </script>
4
+
5
+ <template>
6
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
7
+ <div class="text-center">
8
+ <h1 class="text-4xl font-bold text-gray-900 mb-4">404</h1>
9
+ <p class="text-lg text-gray-600 mb-8">Page not found</p>
10
+ <RouterLink
11
+ to="/"
12
+ class="inline-block px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
13
+ >
14
+ Go to Home
15
+ </RouterLink>
16
+ </div>
17
+ </div>
18
+ </template>
@@ -0,0 +1,32 @@
1
+ import type { RouteRecordRaw } from 'vue-router';
2
+ import { routes } from './router';
3
+
4
+ export type RouteWithFullPath = RouteRecordRaw & { fullPath: string };
5
+
6
+ const joinPath = (parentPath: string, childPath: string): string => {
7
+ if (childPath.startsWith('/')) {
8
+ return childPath;
9
+ }
10
+ if (childPath === '') {
11
+ return parentPath || '/';
12
+ }
13
+ return parentPath === '/' ? `/${childPath}` : `${parentPath}/${childPath}`;
14
+ };
15
+
16
+ const flatMapRoutes = (
17
+ route: RouteRecordRaw,
18
+ parentPath: string = ''
19
+ ): RouteWithFullPath[] => {
20
+ const fullPath = joinPath(parentPath, route.path ?? '');
21
+
22
+ const routeWithPath = { ...route, fullPath } as RouteWithFullPath;
23
+
24
+ const childRoutes =
25
+ route.children?.flatMap(child => flatMapRoutes(child, fullPath)) || [];
26
+
27
+ return [routeWithPath, ...childRoutes];
28
+ };
29
+
30
+ export const getAllRoutes = (): RouteWithFullPath[] => {
31
+ return routes.flatMap(route => flatMapRoutes(route));
32
+ };
@@ -0,0 +1,90 @@
1
+ import {
2
+ createRouter,
3
+ createWebHistory,
4
+ type RouteRecordRaw,
5
+ } from 'vue-router';
6
+ import HomePage from '@/pages/Home.vue';
7
+ import NotFound from '@/pages/NotFound.vue';
8
+ import AuthAppLayout from "./features/authentication/layouts/AuthAppLayout.vue";
9
+ import PrivateRouteLayout from "./features/authentication/layouts/PrivateRouteLayout.vue";
10
+ import Login from "./features/authentication/pages/Login.vue";
11
+ import Register from "./features/authentication/pages/Register.vue";
12
+ import ForgotPassword from "./features/authentication/pages/ForgotPassword.vue";
13
+ import ResetPassword from "./features/authentication/pages/ResetPassword.vue";
14
+ import Profile from "./features/authentication/pages/Profile.vue";
15
+ import ChangePassword from "./features/authentication/pages/ChangePassword.vue";
16
+ import { ROUTES } from "./features/authentication/authenticationConfig";
17
+
18
+ // The route-merger composes feature routes into this `routes` array by matching
19
+ // on `path`, so features ship a router.ts with the same top-level `path: ''`
20
+ // node and their child routes are appended as siblings of the base app's routes.
21
+ export const routes: RouteRecordRaw[] = [
22
+ {
23
+ path: "/",
24
+ component: AuthAppLayout,
25
+ children: [
26
+ {
27
+ path: '',
28
+ component: HomePage,
29
+ meta: { showInNavigation: true, label: 'Home' }
30
+ },
31
+ {
32
+ path: ROUTES.LOGIN.PATH.replace(/^\//, ""),
33
+ component: Login,
34
+ meta: { showInNavigation: false, label: "Login", title: ROUTES.LOGIN.TITLE }
35
+ },
36
+ {
37
+ path: ROUTES.REGISTER.PATH.replace(/^\//, ""),
38
+ component: Register,
39
+ meta: { showInNavigation: false, title: ROUTES.REGISTER.TITLE }
40
+ },
41
+ {
42
+ path: ROUTES.FORGOT_PASSWORD.PATH.replace(/^\//, ""),
43
+ component: ForgotPassword,
44
+ meta: { showInNavigation: false, title: ROUTES.FORGOT_PASSWORD.TITLE }
45
+ },
46
+ {
47
+ path: ROUTES.RESET_PASSWORD.PATH.replace(/^\//, ""),
48
+ component: ResetPassword,
49
+ meta: { showInNavigation: false, title: ROUTES.RESET_PASSWORD.TITLE }
50
+ },
51
+ {
52
+ path: ROUTES.PROFILE.PATH.replace(/^\//, ""),
53
+ component: PrivateRouteLayout,
54
+ children: [
55
+ {
56
+ path: "",
57
+ component: Profile,
58
+ meta: { showInNavigation: false, label: "Profile", title: ROUTES.PROFILE.TITLE }
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ path: ROUTES.CHANGE_PASSWORD.PATH.replace(/^\//, ""),
64
+ component: PrivateRouteLayout,
65
+ children: [
66
+ {
67
+ path: "",
68
+ component: ChangePassword,
69
+ meta: { showInNavigation: false, title: ROUTES.CHANGE_PASSWORD.TITLE }
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ path: ':pathMatch(.*)*',
75
+ component: NotFound
76
+ }
77
+ ]
78
+ }
79
+ ];
80
+
81
+ // Normalize basename: strip trailing slash so it matches URLs like /lwr/application/ai/c-app
82
+ const rawBasePath = (globalThis as { SFDC_ENV?: { basePath?: string } })
83
+ .SFDC_ENV?.basePath;
84
+ const basename =
85
+ typeof rawBasePath === 'string' ? rawBasePath.replace(/\/+$/, '') : undefined;
86
+
87
+ export const router = createRouter({
88
+ history: createWebHistory(basename),
89
+ routes,
90
+ });