@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,24 @@
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 AppLayout from "@/appLayout.vue";
8
+ import { provideAuth } from "../context/authContext";
9
+ import SessionTimeoutValidator from "../sessionTimeout/SessionTimeoutValidator.vue";
10
+
11
+ /**
12
+ * Top-level auth layout. The Vue analogue of the React `AuthAppLayout`.
13
+ *
14
+ * Establishes the auth context for the entire routed tree (so `useAuth` /
15
+ * `useUser` work in any descendant), mounts the session-timeout validator, and
16
+ * renders the shared base-app `AppLayout` (nav + <RouterView>).
17
+ */
18
+ provideAuth();
19
+ </script>
20
+
21
+ <template>
22
+ <SessionTimeoutValidator base-path="" />
23
+ <AppLayout />
24
+ </template>
@@ -0,0 +1,50 @@
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 { watch } from "vue";
8
+ import { RouterView, useRoute, useRouter } from "vue-router";
9
+ import { useAuth } from "../context/authContext";
10
+ import { AUTH_REDIRECT_PARAM, ROUTES } from "../authenticationConfig";
11
+
12
+ /**
13
+ * Route guard. The Vue analogue of the React `PrivateRoute` layout.
14
+ *
15
+ * Renders the matched child route (via <RouterView>) when the user is
16
+ * authenticated. Otherwise redirects to Login with a `startUrl` query param so
17
+ * the user is returned to this page after a successful login.
18
+ *
19
+ * Because auth state resolves asynchronously (see `provideAuth`), the guard is
20
+ * expressed reactively rather than as a synchronous `beforeEach` navigation
21
+ * guard: while `loading` is true it renders a "Checking sign-in…" status, and
22
+ * it redirects once auth has resolved to unauthenticated.
23
+ */
24
+ const { isAuthenticated, loading } = useAuth();
25
+ const route = useRoute();
26
+ const router = useRouter();
27
+
28
+ watch(
29
+ [loading, isAuthenticated],
30
+ ([isLoading, authed]) => {
31
+ if (isLoading) {
32
+ return;
33
+ }
34
+ if (!authed) {
35
+ // Capture the current location (path + query, no hash) to return to after login.
36
+ const destination = router.resolve({ path: route.path, query: route.query }).fullPath;
37
+ void router.replace({
38
+ path: ROUTES.LOGIN.PATH,
39
+ query: { [AUTH_REDIRECT_PARAM]: destination },
40
+ });
41
+ }
42
+ },
43
+ { immediate: true },
44
+ );
45
+ </script>
46
+
47
+ <template>
48
+ <p v-if="loading" role="status">Checking sign-in…</p>
49
+ <RouterView v-else-if="isAuthenticated" />
50
+ </template>
@@ -0,0 +1,143 @@
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, useId, watch, type HTMLAttributes } from "vue";
8
+ import { RouterLink, useRoute, useRouter } from "vue-router";
9
+ import { CircleUser, LogIn, LogOut, UserPen, UserPlus } from "@lucide/vue";
10
+ import { Button } from "@/components/ui/button";
11
+ import { Skeleton } from "@/components/ui/skeleton";
12
+ import {
13
+ DropdownMenu,
14
+ DropdownMenuContent,
15
+ DropdownMenuItem,
16
+ DropdownMenuLabel,
17
+ DropdownMenuSeparator,
18
+ DropdownMenuTrigger,
19
+ } from "@/components/ui/dropdown-menu";
20
+ import { useAuth } from "../context/authContext";
21
+ import { ROUTES } from "../authenticationConfig";
22
+
23
+ /**
24
+ * Authenticated-user dropdown menu. The Vue analogue of the React `AuthMenu`.
25
+ *
26
+ * - While auth state is loading, a circular skeleton is shown.
27
+ * - When unauthenticated, an optional `guestContent` slot renders in place of
28
+ * the dropdown (e.g. a standalone Sign In button); otherwise the dropdown
29
+ * offers Log In / Register.
30
+ * - When authenticated, the dropdown offers Edit Profile, any extra items
31
+ * provided via the `menuItems` slot, and Sign Out.
32
+ * - The `trigger` slot overrides the default user-menu button; it receives the
33
+ * current user via slot props.
34
+ * - The menu is described by the user's name (the visible label itself is
35
+ * hidden from assistive tech so it is not read as a menu child). If choosing
36
+ * an item navigates away, focus goes to the destination page's `main h1`
37
+ * (or `main`) instead of being lost when the menu closes.
38
+ */
39
+ withDefaults(
40
+ defineProps<{
41
+ /** CSS class applied to the DropdownMenuContent wrapper. @default "w-48" */
42
+ class?: HTMLAttributes["class"];
43
+ }>(),
44
+ {},
45
+ );
46
+
47
+ const { user, isAuthenticated, loading, logout } = useAuth();
48
+ const route = useRoute();
49
+ const router = useRouter();
50
+ const userLabelId = useId();
51
+ // Set when a link item that leads to another route is activated. The menu
52
+ // closes (and would refocus its trigger) before vue-router commits the new
53
+ // route, so the close handler can't compare paths the way the React menu does.
54
+ const pendingNavigation = ref(false);
55
+
56
+ function onOpenChange(open: boolean): void {
57
+ if (open) pendingNavigation.value = false;
58
+ }
59
+
60
+ function onContentClick(event: MouseEvent): void {
61
+ const href = (event.target as Element | null)?.closest("a[href]")?.getAttribute("href");
62
+ pendingNavigation.value = !!href && router.resolve(href).path !== route.path;
63
+ }
64
+
65
+ function onCloseAutoFocus(event: Event): void {
66
+ // Keep the destination's focus instead of pulling it back to the trigger.
67
+ if (pendingNavigation.value) event.preventDefault();
68
+ }
69
+
70
+ // Once the destination has rendered, recover page focus lost with the closed menu.
71
+ watch(
72
+ () => route.path,
73
+ () => {
74
+ if (!pendingNavigation.value) return;
75
+ pendingNavigation.value = false;
76
+ const active = document.activeElement;
77
+ if (active && active !== document.body && active.isConnected) return;
78
+ const target =
79
+ document.querySelector<HTMLElement>("main h1, [role='main'] h1") ??
80
+ document.querySelector<HTMLElement>("main, [role='main']");
81
+ if (target) {
82
+ if (!target.hasAttribute("tabindex")) target.setAttribute("tabindex", "-1");
83
+ target.focus();
84
+ }
85
+ },
86
+ { flush: "post" },
87
+ );
88
+ </script>
89
+
90
+ <template>
91
+ <Skeleton v-if="loading" class="size-8 rounded-full" />
92
+
93
+ <slot v-else-if="!isAuthenticated && $slots.guestContent" name="guestContent" />
94
+
95
+ <DropdownMenu v-else @update:open="onOpenChange">
96
+ <DropdownMenuTrigger as-child>
97
+ <slot v-if="isAuthenticated && user && $slots.trigger" name="trigger" :user="user" />
98
+ <Button v-else variant="ghost" size="icon" aria-label="User menu">
99
+ <CircleUser class="size-6" />
100
+ </Button>
101
+ </DropdownMenuTrigger>
102
+
103
+ <DropdownMenuContent
104
+ align="end"
105
+ :aria-describedby="isAuthenticated ? userLabelId : undefined"
106
+ :class="$props.class ?? 'w-48'"
107
+ @click.capture="onContentClick"
108
+ @close-auto-focus="onCloseAutoFocus"
109
+ >
110
+ <template v-if="isAuthenticated">
111
+ <DropdownMenuLabel :id="userLabelId" class="truncate" aria-hidden="true">
112
+ {{ user?.name }}
113
+ </DropdownMenuLabel>
114
+ <DropdownMenuSeparator aria-hidden="true" />
115
+ <DropdownMenuItem as-child>
116
+ <RouterLink :to="ROUTES.PROFILE.PATH">
117
+ <UserPen class="size-4" />
118
+ Edit Profile
119
+ </RouterLink>
120
+ </DropdownMenuItem>
121
+ <slot name="menuItems" />
122
+ <DropdownMenuItem @click="logout()">
123
+ <LogOut class="size-4" />
124
+ Sign Out
125
+ </DropdownMenuItem>
126
+ </template>
127
+ <template v-else>
128
+ <DropdownMenuItem as-child>
129
+ <RouterLink :to="ROUTES.LOGIN.PATH">
130
+ <LogIn class="size-4" />
131
+ Log In
132
+ </RouterLink>
133
+ </DropdownMenuItem>
134
+ <DropdownMenuItem as-child>
135
+ <RouterLink :to="ROUTES.REGISTER.PATH">
136
+ <UserPlus class="size-4" />
137
+ Register
138
+ </RouterLink>
139
+ </DropdownMenuItem>
140
+ </template>
141
+ </DropdownMenuContent>
142
+ </DropdownMenu>
143
+ </template>
@@ -0,0 +1,122 @@
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 } from "vue";
8
+ import { RouterLink } from "vue-router";
9
+ import { z } from "zod";
10
+ import { createDataSDK } from "@salesforce/platform-sdk";
11
+ import CenteredPageLayout from "../layout/CenteredPageLayout.vue";
12
+ import AuthForm from "../forms/AuthForm.vue";
13
+ import { fields, useAppForm } from "../hooks/form";
14
+ import { AUTH_PLACEHOLDERS, ROUTES } from "../authenticationConfig";
15
+ import { newPasswordSchema } from "../authHelpers";
16
+ import { ApiError, handleApiResponse } from "../utils/helpers";
17
+
18
+ const changePasswordSchema = z
19
+ .object({
20
+ currentPassword: z.string().min(1, "Current password is required"),
21
+ })
22
+ .and(newPasswordSchema);
23
+
24
+ const success = ref(false);
25
+ const submitError = ref<string | string[] | null>(null);
26
+
27
+ const form = useAppForm({
28
+ defaultValues: { currentPassword: "", newPassword: "", confirmPassword: "" },
29
+ validators: {
30
+ onChange: changePasswordSchema,
31
+ onSubmit: changePasswordSchema,
32
+ },
33
+ onSubmit: async ({
34
+ value: formFieldValues,
35
+ }: {
36
+ value: {
37
+ currentPassword: string;
38
+ newPassword: string;
39
+ confirmPassword: string;
40
+ };
41
+ }) => {
42
+ submitError.value = null;
43
+ success.value = false;
44
+ try {
45
+ // Custom Apex endpoint: /auth/change-password. Ensure this Apex class
46
+ // exists in your org.
47
+ const sdk = await createDataSDK();
48
+ const response = await sdk.fetch!("/services/apexrest/auth/change-password", {
49
+ method: "POST",
50
+ body: JSON.stringify({
51
+ currentPassword: formFieldValues.currentPassword,
52
+ newPassword: formFieldValues.newPassword,
53
+ }),
54
+ headers: {
55
+ "Content-Type": "application/json",
56
+ Accept: "application/json",
57
+ },
58
+ });
59
+ await handleApiResponse(response);
60
+ success.value = true;
61
+ form.reset();
62
+ } catch (err) {
63
+ console.error("Password change failed", err);
64
+ if (err instanceof ApiError) {
65
+ submitError.value = err.errors.length === 1 ? err.errors[0] : err.errors;
66
+ } else {
67
+ submitError.value = "Password change failed";
68
+ }
69
+ }
70
+ },
71
+ });
72
+
73
+ const isSubmitting = form.useStore((state: { isSubmitting: boolean }) => state.isSubmitting);
74
+ </script>
75
+
76
+ <template>
77
+ <CenteredPageLayout :title="ROUTES.CHANGE_PASSWORD.TITLE">
78
+ <form.AppForm>
79
+ <AuthForm
80
+ title="Change Password"
81
+ description="Enter your current and new password below"
82
+ :show-already-logged-in="false"
83
+ :error="submitError"
84
+ submit-text="Change Password"
85
+ submit-loading-text="Changing…"
86
+ :submit-disabled="success"
87
+ :is-submitting="isSubmitting"
88
+ :footer-link="ROUTES.PROFILE.PATH"
89
+ footer-link-text="Back to Profile"
90
+ >
91
+ <template v-if="success" #success>
92
+ Password changed successfully!
93
+ <RouterLink :to="ROUTES.PROFILE.PATH" class="underline">Back to Profile</RouterLink>
94
+ </template>
95
+ <form.AppField name="currentPassword">
96
+ <fields.PasswordField
97
+ label="Current Password"
98
+ :placeholder="AUTH_PLACEHOLDERS.PASSWORD"
99
+ autocomplete="current-password"
100
+ :disabled="success"
101
+ />
102
+ </form.AppField>
103
+ <form.AppField name="newPassword">
104
+ <fields.PasswordField
105
+ label="New Password"
106
+ :placeholder="AUTH_PLACEHOLDERS.PASSWORD_NEW"
107
+ autocomplete="new-password"
108
+ :disabled="success"
109
+ />
110
+ </form.AppField>
111
+ <form.AppField name="confirmPassword">
112
+ <fields.PasswordField
113
+ label="Confirm Password"
114
+ :placeholder="AUTH_PLACEHOLDERS.PASSWORD_NEW_CONFIRM"
115
+ autocomplete="new-password"
116
+ :disabled="success"
117
+ />
118
+ </form.AppField>
119
+ </AuthForm>
120
+ </form.AppForm>
121
+ </CenteredPageLayout>
122
+ </template>
@@ -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
+ <script setup lang="ts">
7
+ import { ref } from "vue";
8
+ import { z } from "zod";
9
+ import { createDataSDK } from "@salesforce/platform-sdk";
10
+ import CenteredPageLayout from "../layout/CenteredPageLayout.vue";
11
+ import AuthForm from "../forms/AuthForm.vue";
12
+ import { fields, useAppForm } from "../hooks/form";
13
+ import { AUTH_PLACEHOLDERS, ROUTES } from "../authenticationConfig";
14
+ import { ApiError, handleApiResponse } from "../utils/helpers";
15
+
16
+ const forgotPasswordSchema = z.object({
17
+ username: z.string().trim().toLowerCase().email("Please enter a valid username"),
18
+ });
19
+
20
+ const success = ref(false);
21
+ const submitError = ref<string | string[] | null>(null);
22
+
23
+ const form = useAppForm({
24
+ defaultValues: { username: "" },
25
+ validators: {
26
+ onChange: forgotPasswordSchema,
27
+ onSubmit: forgotPasswordSchema,
28
+ },
29
+ onSubmit: async ({ value }: { value: { username: string } }) => {
30
+ submitError.value = null;
31
+ success.value = false;
32
+ try {
33
+ // Custom Apex endpoint: /auth/forgot-password. Ensure this Apex class
34
+ // exists in your org.
35
+ const sdk = await createDataSDK();
36
+ const response = await sdk.fetch!("/services/apexrest/auth/forgot-password", {
37
+ method: "POST",
38
+ body: JSON.stringify({ username: value.username.trim() }),
39
+ headers: {
40
+ "Content-Type": "application/json",
41
+ Accept: "application/json",
42
+ },
43
+ });
44
+ await handleApiResponse(response);
45
+ success.value = true;
46
+ } catch (err) {
47
+ console.error("Failed to send reset link", err);
48
+ if (err instanceof ApiError) {
49
+ submitError.value = err.errors.length === 1 ? err.errors[0] : err.errors;
50
+ } else {
51
+ submitError.value = "Failed to send reset link";
52
+ }
53
+ }
54
+ },
55
+ });
56
+
57
+ const isSubmitting = form.useStore((state: { isSubmitting: boolean }) => state.isSubmitting);
58
+ </script>
59
+
60
+ <template>
61
+ <CenteredPageLayout :title="ROUTES.FORGOT_PASSWORD.TITLE">
62
+ <form.AppForm>
63
+ <AuthForm
64
+ title="Forgot Password"
65
+ description="Enter your username and we'll send you a reset link"
66
+ :error="submitError"
67
+ :success="
68
+ success
69
+ ? 'If that username exists in our system, you will receive a reset link shortly.'
70
+ : null
71
+ "
72
+ submit-text="Send Reset Link"
73
+ submit-loading-text="Sending…"
74
+ :submit-disabled="success"
75
+ :is-submitting="isSubmitting"
76
+ footer-text="Remember your password?"
77
+ :footer-link="ROUTES.LOGIN.PATH"
78
+ footer-link-text="Sign in"
79
+ >
80
+ <form.AppField name="username">
81
+ <fields.TextField
82
+ label="Username"
83
+ :placeholder="AUTH_PLACEHOLDERS.USERNAME"
84
+ autocomplete="username"
85
+ />
86
+ </form.AppField>
87
+ </AuthForm>
88
+ </form.AppForm>
89
+ </CenteredPageLayout>
90
+ </template>
@@ -0,0 +1,106 @@
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 } from "vue";
8
+ import { RouterLink, useRoute, useRouter } from "vue-router";
9
+ import { z } from "zod";
10
+ import { createDataSDK } from "@salesforce/platform-sdk";
11
+ import CenteredPageLayout from "../layout/CenteredPageLayout.vue";
12
+ import AuthForm from "../forms/AuthForm.vue";
13
+ import { fields, useAppForm } from "../hooks/form";
14
+ import { ROUTES } from "../authenticationConfig";
15
+ import { emailSchema, getStartUrl, type AuthResponse } from "../authHelpers";
16
+ import { ApiError, handleApiResponse } from "../utils/helpers";
17
+ import SocialLogin from "../components/SocialLogin.vue";
18
+ import { queryToSearchParams } from "../utils/queryToSearchParams";
19
+
20
+ const loginSchema = z.object({
21
+ email: emailSchema,
22
+ password: z.string().min(1, "Password is required"),
23
+ });
24
+
25
+ const router = useRouter();
26
+ const route = useRoute();
27
+ const submitError = ref<string | string[] | null>(null);
28
+
29
+ const form = useAppForm({
30
+ defaultValues: { email: "", password: "" },
31
+ validators: { onChange: loginSchema, onSubmit: loginSchema },
32
+ onSubmit: async ({ value }: { value: { email: string; password: string } }) => {
33
+ submitError.value = null;
34
+ try {
35
+ // Salesforce integration: the Data SDK fetch makes an authenticated (or
36
+ // guest) call to a custom Apex REST resource. Ensure the Apex class
37
+ // "/services/apexrest/auth/login" exists in your org.
38
+ const sdk = await createDataSDK();
39
+ const response = await sdk.fetch!("/services/apexrest/auth/login", {
40
+ method: "POST",
41
+ body: JSON.stringify({
42
+ email: value.email.trim().toLowerCase(),
43
+ password: value.password,
44
+ startUrl: getStartUrl(queryToSearchParams(route.query)),
45
+ }),
46
+ headers: {
47
+ "Content-Type": "application/json",
48
+ Accept: "application/json",
49
+ },
50
+ });
51
+ const result = await handleApiResponse<AuthResponse>(response);
52
+ if (result?.redirectUrl) {
53
+ // Hard navigate with assign (not replace) so /login stays in history and
54
+ // Back returns here after an MFA/verification screen.
55
+ window.location.assign(result.redirectUrl);
56
+ } else {
57
+ void router.replace("/");
58
+ }
59
+ } catch (err) {
60
+ console.error("Login failed", err);
61
+ if (err instanceof ApiError) {
62
+ submitError.value = err.errors.length === 1 ? err.errors[0] : err.errors;
63
+ } else {
64
+ submitError.value = "Login failed";
65
+ }
66
+ }
67
+ },
68
+ });
69
+
70
+ const isSubmitting = form.useStore((state: { isSubmitting: boolean }) => state.isSubmitting);
71
+ </script>
72
+
73
+ <template>
74
+ <CenteredPageLayout :title="ROUTES.LOGIN.TITLE">
75
+ <form.AppForm>
76
+ <AuthForm
77
+ title="Login"
78
+ description="Enter your email below to login to your account"
79
+ :error="submitError"
80
+ submit-text="Login"
81
+ submit-loading-text="Logging in…"
82
+ :is-submitting="isSubmitting"
83
+ footer-text="Don't have an account?"
84
+ :footer-link="ROUTES.REGISTER.PATH"
85
+ footer-link-text="Sign up"
86
+ >
87
+ <form.AppField name="email">
88
+ <fields.EmailField label="Email" />
89
+ </form.AppField>
90
+ <form.AppField name="password">
91
+ <fields.PasswordField label="Password">
92
+ <template #labelAction>
93
+ <RouterLink
94
+ :to="ROUTES.FORGOT_PASSWORD.PATH"
95
+ class="text-sm underline-offset-4 hover:underline"
96
+ >
97
+ Forgot your password?
98
+ </RouterLink>
99
+ </template>
100
+ </fields.PasswordField>
101
+ </form.AppField>
102
+ </AuthForm>
103
+ <SocialLogin />
104
+ </form.AppForm>
105
+ </CenteredPageLayout>
106
+ </template>