@salesforce/templates 66.1.1 → 66.2.1

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 (238) hide show
  1. package/lib/generators/projectGenerator.d.ts +6 -0
  2. package/lib/generators/projectGenerator.js +42 -3
  3. package/lib/generators/projectGenerator.js.map +1 -1
  4. package/lib/templates/project/reactb2e/.a4drules/README.md +35 -0
  5. package/lib/templates/project/reactb2e/.a4drules/a4d-webapp-generate.md +27 -0
  6. package/lib/templates/project/reactb2e/.a4drules/build-validation.md +78 -0
  7. package/lib/templates/project/reactb2e/.a4drules/code-quality.md +137 -0
  8. package/lib/templates/project/reactb2e/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
  9. package/lib/templates/project/reactb2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
  10. package/lib/templates/project/reactb2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
  11. package/lib/templates/project/reactb2e/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
  12. package/lib/templates/project/reactb2e/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
  13. package/lib/templates/project/reactb2e/.a4drules/graphql.md +409 -0
  14. package/lib/templates/project/reactb2e/.a4drules/images.md +13 -0
  15. package/lib/templates/project/reactb2e/.a4drules/react.md +387 -0
  16. package/lib/templates/project/reactb2e/.a4drules/react_image_processing.md +45 -0
  17. package/lib/templates/project/reactb2e/.a4drules/typescript.md +224 -0
  18. package/lib/templates/project/reactb2e/.a4drules/ui-layout.md +23 -0
  19. package/lib/templates/project/reactb2e/.a4drules/webapp-nav-and-placeholders.md +33 -0
  20. package/lib/templates/project/reactb2e/.a4drules/webapp-no-node-e.md +25 -0
  21. package/lib/templates/project/reactb2e/.a4drules/webapp-ui-first.md +32 -0
  22. package/lib/templates/project/reactb2e/.a4drules/webapp.md +75 -0
  23. package/lib/templates/project/reactb2e/.forceignore +15 -0
  24. package/lib/templates/project/reactb2e/.husky/pre-commit +4 -0
  25. package/lib/templates/project/reactb2e/.prettierignore +11 -0
  26. package/lib/templates/project/reactb2e/.prettierrc +17 -0
  27. package/lib/templates/project/reactb2e/AGENT.md +75 -0
  28. package/lib/templates/project/reactb2e/CHANGELOG.md +696 -0
  29. package/lib/templates/project/reactb2e/README.md +18 -0
  30. package/lib/templates/project/reactb2e/config/project-scratch-def.json +13 -0
  31. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/.graphqlrc.yml +2 -0
  32. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/.prettierignore +9 -0
  33. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/.prettierrc +11 -0
  34. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/appreacttemplateb2e.webapplication-meta.xml +7 -0
  35. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.d.ts +2 -0
  36. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.js +93 -0
  37. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/codegen.yml +94 -0
  38. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/e2e/app.spec.ts +17 -0
  39. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/eslint.config.js +141 -0
  40. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/index.html +13 -0
  41. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +14392 -0
  42. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/package.json +58 -0
  43. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/playwright.config.ts +24 -0
  44. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/scripts/get-graphql-schema.mjs +68 -0
  45. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/scripts/rewrite-e2e-assets.mjs +23 -0
  46. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/graphql-operations-types.ts +116 -0
  47. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/accounts.ts +33 -0
  48. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
  49. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/app.tsx +22 -0
  50. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +19 -0
  51. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/book.svg +3 -0
  52. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/copy.svg +4 -0
  53. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/rocket.svg +3 -0
  54. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/star.svg +3 -0
  55. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-1.png +0 -0
  56. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-2.png +0 -0
  57. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-3.png +0 -0
  58. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/vibe-codey.svg +194 -0
  59. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/AgentforceConversationClient.tsx +127 -0
  60. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/index.ts +6 -0
  61. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/navigationMenu.tsx +80 -0
  62. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Home.tsx +12 -0
  63. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/NotFound.tsx +18 -0
  64. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/router-utils.tsx +35 -0
  65. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +22 -0
  66. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +13 -0
  67. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/types/conversation.ts +21 -0
  68. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.json +36 -0
  69. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.node.json +13 -0
  70. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/vite-env.d.ts +1 -0
  71. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/vite.config.ts +102 -0
  72. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest-env.d.ts +2 -0
  73. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest.config.ts +11 -0
  74. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest.setup.ts +1 -0
  75. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/webapplication.json +7 -0
  76. package/lib/templates/project/reactb2e/jest.config.js +6 -0
  77. package/lib/templates/project/reactb2e/package.json +38 -0
  78. package/lib/templates/project/reactb2e/scripts/apex/hello.apex +10 -0
  79. package/lib/templates/project/reactb2e/scripts/soql/account.soql +6 -0
  80. package/lib/templates/project/reactb2e/sfdx-project.json +12 -0
  81. package/lib/templates/project/reactb2x/.a4drules/README.md +35 -0
  82. package/lib/templates/project/reactb2x/.a4drules/a4d-webapp-generate.md +27 -0
  83. package/lib/templates/project/reactb2x/.a4drules/build-validation.md +78 -0
  84. package/lib/templates/project/reactb2x/.a4drules/code-quality.md +137 -0
  85. package/lib/templates/project/reactb2x/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
  86. package/lib/templates/project/reactb2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
  87. package/lib/templates/project/reactb2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
  88. package/lib/templates/project/reactb2x/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
  89. package/lib/templates/project/reactb2x/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
  90. package/lib/templates/project/reactb2x/.a4drules/graphql.md +409 -0
  91. package/lib/templates/project/reactb2x/.a4drules/images.md +13 -0
  92. package/lib/templates/project/reactb2x/.a4drules/react.md +387 -0
  93. package/lib/templates/project/reactb2x/.a4drules/react_image_processing.md +45 -0
  94. package/lib/templates/project/reactb2x/.a4drules/typescript.md +224 -0
  95. package/lib/templates/project/reactb2x/.a4drules/ui-layout.md +23 -0
  96. package/lib/templates/project/reactb2x/.a4drules/webapp-nav-and-placeholders.md +33 -0
  97. package/lib/templates/project/reactb2x/.a4drules/webapp-no-node-e.md +25 -0
  98. package/lib/templates/project/reactb2x/.a4drules/webapp-ui-first.md +32 -0
  99. package/lib/templates/project/reactb2x/.a4drules/webapp.md +75 -0
  100. package/lib/templates/project/reactb2x/.forceignore +15 -0
  101. package/lib/templates/project/reactb2x/.husky/pre-commit +4 -0
  102. package/lib/templates/project/reactb2x/.prettierignore +11 -0
  103. package/lib/templates/project/reactb2x/.prettierrc +17 -0
  104. package/lib/templates/project/reactb2x/AGENT.md +75 -0
  105. package/lib/templates/project/reactb2x/CHANGELOG.md +696 -0
  106. package/lib/templates/project/reactb2x/README.md +18 -0
  107. package/lib/templates/project/reactb2x/config/project-scratch-def.json +13 -0
  108. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppAuthUtils.cls +68 -0
  109. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppAuthUtils.cls-meta.xml +5 -0
  110. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppChangePassword.cls +77 -0
  111. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppChangePassword.cls-meta.xml +5 -0
  112. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppForgotPassword.cls +71 -0
  113. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppForgotPassword.cls-meta.xml +5 -0
  114. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppLogin.cls +105 -0
  115. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppLogin.cls-meta.xml +5 -0
  116. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppRegistration.cls +162 -0
  117. package/lib/templates/project/reactb2x/force-app/main/default/classes/WebAppRegistration.cls-meta.xml +5 -0
  118. package/lib/templates/project/reactb2x/force-app/main/default/digitalExperienceConfigs/appreacttemplateb2x1.digitalExperienceConfig +8 -0
  119. package/lib/templates/project/reactb2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/appreacttemplateb2x1.digitalExperience-meta.xml +11 -0
  120. package/lib/templates/project/reactb2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/_meta.json +5 -0
  121. package/lib/templates/project/reactb2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/content.json +10 -0
  122. package/lib/templates/project/reactb2x/force-app/main/default/networks/appreacttemplateb2x.network +60 -0
  123. package/lib/templates/project/reactb2x/force-app/main/default/package.xml +20 -0
  124. package/lib/templates/project/reactb2x/force-app/main/default/sites/appreacttemplateb2x.site +31 -0
  125. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/.graphqlrc.yml +2 -0
  126. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/.prettierignore +9 -0
  127. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/.prettierrc +11 -0
  128. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/appreacttemplateb2x.webapplication-meta.xml +7 -0
  129. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.d.ts +2 -0
  130. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.js +93 -0
  131. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/codegen.yml +94 -0
  132. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/e2e/app.spec.ts +17 -0
  133. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/eslint.config.js +141 -0
  134. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/index.html +13 -0
  135. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/package-lock.json +18408 -0
  136. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/package.json +66 -0
  137. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/playwright.config.ts +24 -0
  138. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/scripts/get-graphql-schema.mjs +68 -0
  139. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/scripts/rewrite-e2e-assets.mjs +23 -0
  140. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/graphql-operations-types.ts +116 -0
  141. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/accounts.ts +33 -0
  142. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
  143. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/app.tsx +13 -0
  144. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/appLayout.tsx +11 -0
  145. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/book.svg +3 -0
  146. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/copy.svg +4 -0
  147. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/rocket.svg +3 -0
  148. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/star.svg +3 -0
  149. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-1.png +0 -0
  150. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-2.png +0 -0
  151. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-3.png +0 -0
  152. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/vibe-codey.svg +194 -0
  153. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/alerts/status-alert.tsx +45 -0
  154. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authHelpers.ts +73 -0
  155. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationConfig.ts +61 -0
  156. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationRouteLayout.tsx +21 -0
  157. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/privateRouteLayout.tsx +36 -0
  158. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/SessionTimeoutValidator.tsx +616 -0
  159. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeService.ts +161 -0
  160. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeoutConfig.ts +77 -0
  161. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/footers/footer-link.tsx +36 -0
  162. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/auth-form.tsx +81 -0
  163. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/submit-button.tsx +49 -0
  164. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-layout.tsx +23 -0
  165. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-skeleton.tsx +38 -0
  166. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/centered-page-layout.tsx +73 -0
  167. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/alert.tsx +69 -0
  168. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/button.tsx +67 -0
  169. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/card.tsx +92 -0
  170. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/dialog.tsx +143 -0
  171. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/field.tsx +222 -0
  172. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/index.ts +72 -0
  173. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/input.tsx +19 -0
  174. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/label.tsx +19 -0
  175. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/pagination.tsx +112 -0
  176. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/select.tsx +183 -0
  177. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/separator.tsx +26 -0
  178. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/skeleton.tsx +14 -0
  179. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/spinner.tsx +15 -0
  180. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/table.tsx +87 -0
  181. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/tabs.tsx +78 -0
  182. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components.json +18 -0
  183. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/context/AuthContext.tsx +95 -0
  184. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/form.tsx +116 -0
  185. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useCountdownTimer.ts +266 -0
  186. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useRetryWithBackoff.ts +109 -0
  187. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/layouts/AuthAppLayout.tsx +12 -0
  188. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/data-sdk.ts +21 -0
  189. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/utils.ts +6 -0
  190. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/navigationMenu.tsx +80 -0
  191. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ChangePassword.tsx +107 -0
  192. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ForgotPassword.tsx +73 -0
  193. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Home.tsx +12 -0
  194. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Login.tsx +97 -0
  195. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/NotFound.tsx +18 -0
  196. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Profile.tsx +178 -0
  197. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Register.tsx +138 -0
  198. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ResetPassword.tsx +107 -0
  199. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/router-utils.tsx +35 -0
  200. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/routes.tsx +71 -0
  201. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/styles/global.css +135 -0
  202. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/utils/helpers.ts +121 -0
  203. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.json +36 -0
  204. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.node.json +13 -0
  205. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/vite-env.d.ts +1 -0
  206. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/vite.config.ts +102 -0
  207. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest-env.d.ts +2 -0
  208. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest.config.ts +11 -0
  209. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest.setup.ts +1 -0
  210. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/webapplication.json +7 -0
  211. package/lib/templates/project/reactb2x/jest.config.js +6 -0
  212. package/lib/templates/project/reactb2x/package.json +38 -0
  213. package/lib/templates/project/reactb2x/scripts/apex/hello.apex +10 -0
  214. package/lib/templates/project/reactb2x/scripts/soql/account.soql +6 -0
  215. package/lib/templates/project/reactb2x/sfdx-project.json +12 -0
  216. package/lib/templates/webapplication/reactbasic/.graphqlrc.yml +2 -0
  217. package/lib/templates/webapplication/reactbasic/build/vite.config.js +20 -1
  218. package/lib/templates/webapplication/reactbasic/codegen.yml +94 -0
  219. package/lib/templates/webapplication/reactbasic/e2e/app.spec.ts +0 -7
  220. package/lib/templates/webapplication/reactbasic/eslint.config.js +28 -0
  221. package/lib/templates/webapplication/reactbasic/package-lock.json +10090 -2874
  222. package/lib/templates/webapplication/reactbasic/package.json +16 -4
  223. package/lib/templates/webapplication/reactbasic/scripts/get-graphql-schema.mjs +68 -0
  224. package/lib/templates/webapplication/reactbasic/src/api/graphql-operations-types.ts +23 -34
  225. package/lib/templates/webapplication/reactbasic/src/api/utils/accounts.ts +33 -0
  226. package/lib/templates/webapplication/reactbasic/src/app.tsx +10 -1
  227. package/lib/templates/webapplication/reactbasic/src/appLayout.tsx +2 -0
  228. package/lib/templates/webapplication/reactbasic/src/navigationMenu.tsx +80 -0
  229. package/lib/templates/webapplication/reactbasic/src/router-utils.tsx +35 -0
  230. package/lib/templates/webapplication/reactbasic/src/routes.tsx +1 -7
  231. package/lib/templates/webapplication/reactbasic/vite.config.ts +20 -1
  232. package/lib/tsconfig.tsbuildinfo +1 -1
  233. package/lib/utils/types.d.ts +1 -1
  234. package/lib/utils/webappTemplateUtils.d.ts +54 -0
  235. package/lib/utils/webappTemplateUtils.js +219 -0
  236. package/lib/utils/webappTemplateUtils.js.map +1 -0
  237. package/package.json +7 -5
  238. package/lib/templates/webapplication/reactbasic/src/pages/About.tsx +0 -12
@@ -0,0 +1,18 @@
1
+ # Salesforce DX Project: Next Steps
2
+
3
+ Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started.
4
+
5
+ ## How Do You Plan to Deploy Your Changes?
6
+
7
+ Do you want to deploy a set of changes, or create a self-contained application? Choose a [development model](https://developer.salesforce.com/tools/vscode/en/user-guide/development-models).
8
+
9
+ ## Configure Your Salesforce DX Project
10
+
11
+ The `sfdx-project.json` file contains useful configuration information for your project. See [Salesforce DX Project Configuration](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm) in the _Salesforce DX Developer Guide_ for details about this file.
12
+
13
+ ## Read All About It
14
+
15
+ - [Salesforce Extensions Documentation](https://developer.salesforce.com/tools/vscode/)
16
+ - [Salesforce CLI Setup Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm)
17
+ - [Salesforce DX Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm)
18
+ - [Salesforce CLI Command Reference](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm)
@@ -0,0 +1,13 @@
1
+ {
2
+ "orgName": "My Saleforce Org",
3
+ "edition": "Developer",
4
+ "features": ["EnableSetPasswordInApi"],
5
+ "settings": {
6
+ "lightningExperienceSettings": {
7
+ "enableS1DesktopEnabled": true
8
+ },
9
+ "mobileSettings": {
10
+ "enableS1EncryptedStoragePref2": false
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,2 @@
1
+ schema: '../../../../../schema.graphql'
2
+ documents: 'src/**/*.{graphql,js,ts,jsx,tsx}'
@@ -0,0 +1,9 @@
1
+ node_modules
2
+ dist
3
+ build
4
+ .vite
5
+ coverage
6
+ *.min.js
7
+ *.min.css
8
+ *.map
9
+ package-lock.json
@@ -0,0 +1,11 @@
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "es5",
4
+ "singleQuote": true,
5
+ "printWidth": 80,
6
+ "tabWidth": 2,
7
+ "useTabs": false,
8
+ "bracketSpacing": true,
9
+ "arrowParens": "avoid",
10
+ "endOfLine": "lf"
11
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <WebApplication xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <masterLabel>appreacttemplateb2e</masterLabel>
4
+ <description>A Salesforce web application.</description>
5
+ <isActive>true</isActive>
6
+ <version>1</version>
7
+ </WebApplication>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfigFnObject;
2
+ export default _default;
@@ -0,0 +1,93 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import path from 'path';
4
+ import { resolve } from 'path';
5
+ import tailwindcss from '@tailwindcss/vite';
6
+ import salesforce from '@salesforce/vite-plugin-webapp-experimental';
7
+ import codegen from 'vite-plugin-graphql-codegen';
8
+ export default defineConfig(function (_a) {
9
+ var mode = _a.mode;
10
+ return {
11
+ // Ensure root base for e2e/static serve; plugin may override when deployed under a path
12
+ base: '/',
13
+ plugins: [
14
+ tailwindcss(),
15
+ react(),
16
+ salesforce(),
17
+ codegen({
18
+ // Path to the codegen config file
19
+ configFilePathOverride: resolve(__dirname, 'codegen.yml'),
20
+ // Run codegen on dev server start
21
+ runOnStart: true,
22
+ // Don't run codegen on build for now
23
+ runOnBuild: false,
24
+ // Enable file watcher during development
25
+ enableWatcher: true,
26
+ // Fail build if codegen errors
27
+ throwOnBuild: true,
28
+ }),
29
+ ],
30
+ // Build configuration for MPA
31
+ build: {
32
+ outDir: resolve(__dirname, 'dist'),
33
+ assetsDir: 'assets',
34
+ sourcemap: false,
35
+ },
36
+ // Resolve aliases (shared between build and test)
37
+ resolve: {
38
+ dedupe: ['react', 'react-dom'],
39
+ alias: {
40
+ '@': path.resolve(__dirname, './src'),
41
+ '@api': path.resolve(__dirname, './src/api'),
42
+ '@components': path.resolve(__dirname, './src/components'),
43
+ '@utils': path.resolve(__dirname, './src/utils'),
44
+ '@styles': path.resolve(__dirname, './src/styles'),
45
+ '@assets': path.resolve(__dirname, './src/assets'),
46
+ },
47
+ },
48
+ // Vitest configuration
49
+ test: {
50
+ // Override root for tests (build uses src/pages as root)
51
+ root: resolve(__dirname),
52
+ // Use jsdom environment for React component testing
53
+ environment: 'jsdom',
54
+ // Setup files to run before each test
55
+ setupFiles: ['./src/test/setup.ts'],
56
+ // Global test patterns
57
+ include: [
58
+ 'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
59
+ 'src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
60
+ ],
61
+ // Coverage configuration
62
+ coverage: {
63
+ provider: 'v8',
64
+ reporter: ['text', 'html', 'clover', 'json'],
65
+ exclude: [
66
+ 'node_modules/',
67
+ 'src/test/',
68
+ 'src/**/*.d.ts',
69
+ 'src/main.tsx',
70
+ 'src/vite-env.d.ts',
71
+ 'src/components/**/index.ts',
72
+ '**/*.config.ts',
73
+ 'build/',
74
+ 'dist/',
75
+ 'coverage/',
76
+ 'eslint.config.js',
77
+ ],
78
+ thresholds: {
79
+ global: {
80
+ branches: 85,
81
+ functions: 85,
82
+ lines: 85,
83
+ statements: 85,
84
+ },
85
+ },
86
+ },
87
+ // Test timeout
88
+ testTimeout: 10000,
89
+ // Globals for easier testing
90
+ globals: true,
91
+ },
92
+ };
93
+ });
@@ -0,0 +1,94 @@
1
+ schema: '../../../../../schema.graphql'
2
+ documents: 'src/**/*.{graphql,ts,tsx}'
3
+ generates:
4
+ src/api/graphql-operations-types.ts:
5
+ plugins:
6
+ - 'graphql-codegen-typescript-operation-types'
7
+ - 'typescript-operations'
8
+ config:
9
+ onlyOperationTypes: true
10
+ skipTypename: true
11
+ preResolveTypes: true
12
+ scalars:
13
+ # String-serialized scalars
14
+ JSON:
15
+ input: 'string'
16
+ output: 'string'
17
+ Date:
18
+ input: 'string'
19
+ output: 'string'
20
+ DateTime:
21
+ input: 'string'
22
+ output: 'string'
23
+ Time:
24
+ input: 'string'
25
+ output: 'string'
26
+ Email:
27
+ input: 'string'
28
+ output: 'string'
29
+ Url:
30
+ input: 'string'
31
+ output: 'string'
32
+ PhoneNumber:
33
+ input: 'string'
34
+ output: 'string'
35
+ Picklist:
36
+ input: 'string'
37
+ output: 'string'
38
+ MultiPicklist:
39
+ input: 'string'
40
+ output: 'string'
41
+ TextArea:
42
+ input: 'string'
43
+ output: 'string'
44
+ LongTextArea:
45
+ input: 'string'
46
+ output: 'string'
47
+ RichTextArea:
48
+ input: 'string'
49
+ output: 'string'
50
+ EncryptedString:
51
+ input: 'string'
52
+ output: 'string'
53
+ Base64:
54
+ input: 'string'
55
+ output: 'string'
56
+ IdOrRef:
57
+ input: 'string'
58
+ output: 'string'
59
+ # BigDecimal-serialized scalars (accepts number or string, returns number)
60
+ Currency:
61
+ input: 'number | string'
62
+ output: 'number'
63
+ BigDecimal:
64
+ input: 'number | string'
65
+ output: 'number'
66
+ Double:
67
+ input: 'number | string'
68
+ output: 'number'
69
+ Percent:
70
+ input: 'number | string'
71
+ output: 'number'
72
+ Longitude:
73
+ input: 'number | string'
74
+ output: 'number'
75
+ Latitude:
76
+ input: 'number | string'
77
+ output: 'number'
78
+ # Integer-like scalars
79
+ Long:
80
+ input: 'number'
81
+ output: 'number'
82
+ BigInteger:
83
+ input: 'number'
84
+ output: 'number'
85
+ Short:
86
+ input: 'number'
87
+ output: 'number'
88
+ Byte:
89
+ input: 'number'
90
+ output: 'number'
91
+ Char:
92
+ input: 'number'
93
+ output: 'number'
94
+ overwrite: true
@@ -0,0 +1,17 @@
1
+ import { test, expect } from '@playwright/test';
2
+
3
+ test.describe('base-react-app', () => {
4
+ test('home page loads and shows welcome content', async ({ page }) => {
5
+ await page.goto('/');
6
+ await expect(page.getByRole('heading', { name: 'Home' })).toBeVisible();
7
+ await expect(
8
+ page.getByText('Welcome to your React application.')
9
+ ).toBeVisible();
10
+ });
11
+
12
+ test('not found route shows 404', async ({ page }) => {
13
+ await page.goto('/non-existent-route');
14
+ await expect(page.getByRole('heading', { name: '404' })).toBeVisible();
15
+ await expect(page.getByText('Page not found')).toBeVisible();
16
+ });
17
+ });
@@ -0,0 +1,141 @@
1
+ import js from '@eslint/js';
2
+ import tseslint from '@typescript-eslint/eslint-plugin';
3
+ import tsparser from '@typescript-eslint/parser';
4
+ import react from 'eslint-plugin-react';
5
+ import reactHooks from 'eslint-plugin-react-hooks';
6
+ import reactRefresh from 'eslint-plugin-react-refresh';
7
+ import globals from 'globals';
8
+ import graphqlPlugin from '@graphql-eslint/eslint-plugin';
9
+
10
+ export default [
11
+ // Global ignores
12
+ {
13
+ ignores: ['build/**/*', 'dist/**/*', 'coverage/**/*'],
14
+ },
15
+ // Config files and build tools (first to avoid inheritance)
16
+ {
17
+ files: ['*.config.{js,ts}', 'vite.config.ts'],
18
+ languageOptions: {
19
+ parser: tsparser,
20
+ parserOptions: {
21
+ ecmaVersion: 'latest',
22
+ sourceType: 'module',
23
+ },
24
+ globals: {
25
+ ...globals.node,
26
+ __dirname: 'readonly',
27
+ process: 'readonly',
28
+ },
29
+ },
30
+ plugins: {
31
+ '@typescript-eslint': tseslint,
32
+ },
33
+ rules: {
34
+ '@typescript-eslint/no-var-requires': 'off',
35
+ },
36
+ },
37
+ // Main TypeScript/React files
38
+ {
39
+ files: ['**/*.{ts,tsx}'],
40
+ ignores: [
41
+ 'coverage',
42
+ 'dist',
43
+ 'node_modules',
44
+ 'build',
45
+ '*.config.{js,ts}',
46
+ 'vite.config.ts',
47
+ ],
48
+ languageOptions: {
49
+ ecmaVersion: 2020,
50
+ sourceType: 'module',
51
+ parser: tsparser,
52
+ parserOptions: {
53
+ ecmaFeatures: {
54
+ jsx: true,
55
+ },
56
+ ecmaVersion: 'latest',
57
+ sourceType: 'module',
58
+ project: './tsconfig.json',
59
+ },
60
+ globals: {
61
+ ...globals.browser,
62
+ JSX: 'readonly',
63
+ },
64
+ },
65
+ plugins: {
66
+ react,
67
+ 'react-hooks': reactHooks,
68
+ 'react-refresh': reactRefresh,
69
+ '@typescript-eslint': tseslint,
70
+ },
71
+ rules: {
72
+ ...js.configs.recommended.rules,
73
+ ...tseslint.configs.recommended.rules,
74
+ ...react.configs.recommended.rules,
75
+ ...reactHooks.configs.recommended.rules,
76
+ 'react/react-in-jsx-scope': 'off',
77
+ 'react/prop-types': 'off',
78
+ 'react/jsx-no-comment-textnodes': 'off',
79
+ 'react/no-unescaped-entities': 'off',
80
+ '@typescript-eslint/no-unused-vars': [
81
+ 'error',
82
+ { argsIgnorePattern: '^_' },
83
+ ],
84
+ '@typescript-eslint/explicit-function-return-type': 'off',
85
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
86
+ '@typescript-eslint/no-explicit-any': 'off',
87
+ },
88
+ settings: {
89
+ react: {
90
+ version: 'detect',
91
+ },
92
+ },
93
+ },
94
+ // Test files
95
+ {
96
+ files: [
97
+ '**/*.test.{ts,tsx}',
98
+ '**/test/**/*.{ts,tsx}',
99
+ 'src/test/**/*.{ts,tsx}',
100
+ ],
101
+ languageOptions: {
102
+ parser: tsparser,
103
+ globals: {
104
+ ...globals.browser,
105
+ ...globals.node,
106
+ global: 'writable',
107
+ JSX: 'readonly',
108
+ },
109
+ },
110
+ rules: {
111
+ '@typescript-eslint/no-explicit-any': 'off',
112
+ },
113
+ },
114
+ // GraphQL processor - extracts GraphQL from gql template literals in TS/TSX files
115
+ {
116
+ files: ['**/*.{ts,tsx}'],
117
+ processor: graphqlPlugin.processor,
118
+ },
119
+ // GraphQL linting configuration for .graphql files
120
+ {
121
+ files: ['**/*.graphql'],
122
+ languageOptions: {
123
+ parser: graphqlPlugin.parser,
124
+ parserOptions: {
125
+ graphQLConfig: {
126
+ schema: '../../../../../schema.graphql',
127
+ },
128
+ },
129
+ },
130
+ plugins: {
131
+ '@graphql-eslint': graphqlPlugin,
132
+ },
133
+ rules: {
134
+ '@graphql-eslint/no-anonymous-operations': 'error',
135
+ '@graphql-eslint/no-duplicate-fields': 'error',
136
+ '@graphql-eslint/known-fragment-names': 'error',
137
+ '@graphql-eslint/no-undefined-variables': 'error',
138
+ '@graphql-eslint/no-unused-variables': 'error',
139
+ },
140
+ },
141
+ ];
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Welcome to React App</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/app.tsx"></script>
12
+ </body>
13
+ </html>