@salesforce/templates 66.3.1 → 66.3.2

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 (328) hide show
  1. package/lib/templates/project/reactb2e/.a4drules/{graphql.md → features/feature-graphql-graphql-data-access-rule.md} +186 -125
  2. package/lib/templates/project/reactb2e/.a4drules/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +32 -0
  3. package/lib/templates/project/reactb2e/.a4drules/features/feature-react-chart-analytics-charts-rule.md +27 -0
  4. package/lib/templates/project/reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/SKILL.md +155 -0
  5. package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/explore-schema.md} +58 -29
  6. package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md} +52 -42
  7. package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md} +32 -22
  8. package/lib/templates/project/{reactb2x/.a4drules/graphql/tools/schemas/shared.graphqls → reactb2e/.a4drules/skills/feature-graphql-graphql-data-access/docs/shared-schema.graphqls} +1 -1
  9. package/lib/templates/project/reactb2e/.a4drules/skills/feature-micro-frontend-micro-frontend/SKILL.md +137 -0
  10. package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/SKILL.md +108 -0
  11. package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/docs/embed-examples.md +182 -0
  12. package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-chart-analytics-charts/SKILL.md +41 -0
  13. package/lib/templates/project/reactb2e/.a4drules/skills/feature-react-chart-analytics-charts/docs/schema-mapping.md +4 -0
  14. package/lib/templates/project/reactb2e/.a4drules/webapp-code-quality.md +136 -0
  15. package/lib/templates/project/reactb2e/.a4drules/{images.md → webapp-images.md} +6 -4
  16. package/lib/templates/project/reactb2e/.a4drules/webapp-no-node-e.md +3 -2
  17. package/lib/templates/project/reactb2e/.a4drules/webapp-react.md +149 -0
  18. package/lib/templates/project/reactb2e/.a4drules/{typescript.md → webapp-typescript.md} +10 -29
  19. package/lib/templates/project/reactb2e/.a4drules/webapp.md +60 -45
  20. package/lib/templates/project/reactb2e/AGENT.md +1 -1
  21. package/lib/templates/project/reactb2e/CHANGELOG.md +377 -0
  22. package/lib/templates/project/reactb2e/README.md +38 -4
  23. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/CHANGELOG.md +10 -0
  24. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/README.md +35 -0
  25. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/package.json +17 -7
  26. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +76 -10
  27. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/__inherit_AgentforceConversationClient.tsx +3 -0
  28. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/alerts/status-alert.tsx +49 -0
  29. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layouts/card-layout.tsx +29 -0
  30. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/alert.tsx +76 -0
  31. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/button.tsx +67 -0
  32. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/card.tsx +103 -0
  33. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/dialog.tsx +162 -0
  34. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/field.tsx +237 -0
  35. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/index.ts +84 -0
  36. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/input.tsx +19 -0
  37. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/label.tsx +22 -0
  38. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/pagination.tsx +132 -0
  39. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/select.tsx +193 -0
  40. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/separator.tsx +26 -0
  41. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/skeleton.tsx +14 -0
  42. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/spinner.tsx +16 -0
  43. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/table.tsx +114 -0
  44. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/tabs.tsx +88 -0
  45. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components.json +18 -0
  46. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/constants.ts +39 -0
  47. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/index.ts +19 -0
  48. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/objectDetailService.ts +125 -0
  49. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/objectInfoGraphQLService.ts +194 -0
  50. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/objectInfoService.ts +199 -0
  51. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/api/recordListGraphQLService.ts +365 -0
  52. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailFields.tsx +55 -0
  53. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailForm.tsx +146 -0
  54. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailHeader.tsx +34 -0
  55. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/DetailLayoutSections.tsx +80 -0
  56. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/Section.tsx +108 -0
  57. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/SectionRow.tsx +20 -0
  58. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/UiApiDetailForm.tsx +140 -0
  59. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FieldValueDisplay.tsx +73 -0
  60. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedAddress.tsx +29 -0
  61. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedEmail.tsx +17 -0
  62. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedPhone.tsx +24 -0
  63. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedText.tsx +11 -0
  64. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/FormattedUrl.tsx +29 -0
  65. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/detail/formatted/index.ts +6 -0
  66. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FilterField.tsx +54 -0
  67. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FilterInput.tsx +55 -0
  68. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FilterSelect.tsx +72 -0
  69. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/filters/FiltersPanel.tsx +380 -0
  70. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/forms/filters-form.tsx +114 -0
  71. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/forms/submit-button.tsx +47 -0
  72. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/GlobalSearchInput.tsx +114 -0
  73. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/ResultCardFields.tsx +71 -0
  74. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchHeader.tsx +31 -0
  75. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchPagination.tsx +144 -0
  76. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchResultCard.tsx +136 -0
  77. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/search/SearchResultsPanel.tsx +197 -0
  78. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/components/shared/LoadingFallback.tsx +61 -0
  79. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/filters/FilterInput.tsx +55 -0
  80. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/filters/FilterSelect.tsx +72 -0
  81. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/form.tsx +209 -0
  82. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/index.ts +22 -0
  83. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useObjectInfoBatch.ts +65 -0
  84. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useObjectSearchData.ts +395 -0
  85. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useRecordDetailLayout.ts +156 -0
  86. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/hooks/useRecordListGraphQL.ts +135 -0
  87. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/pages/DetailPage.tsx +109 -0
  88. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/pages/GlobalSearch.tsx +229 -0
  89. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/filters/filters.ts +120 -0
  90. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/filters/picklist.ts +32 -0
  91. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/index.ts +4 -0
  92. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/objectInfo/objectInfo.ts +166 -0
  93. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/recordDetail/recordDetail.ts +61 -0
  94. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/types/search/searchResults.ts +229 -0
  95. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/apiUtils.ts +125 -0
  96. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/cacheUtils.ts +76 -0
  97. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/debounce.ts +89 -0
  98. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/fieldUtils.ts +354 -0
  99. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/fieldValueExtractor.ts +67 -0
  100. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/filterUtils.ts +32 -0
  101. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/formDataTransformUtils.ts +260 -0
  102. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/formUtils.ts +142 -0
  103. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/graphQLNodeFieldUtils.ts +186 -0
  104. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/graphQLObjectInfoAdapter.ts +319 -0
  105. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/graphQLRecordAdapter.ts +90 -0
  106. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/index.ts +59 -0
  107. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/layoutTransformUtils.ts +236 -0
  108. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/linkUtils.ts +14 -0
  109. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/paginationUtils.ts +49 -0
  110. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/recordUtils.ts +159 -0
  111. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/features/global-search/utils/sanitizationUtils.ts +49 -0
  112. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/lib/utils.ts +6 -0
  113. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Home.tsx +11 -10
  114. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/TestAccPage.tsx +19 -0
  115. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +28 -0
  116. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +122 -0
  117. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/vite.config.ts +2 -1
  118. package/lib/templates/project/reactb2e/package.json +1 -1
  119. package/lib/templates/project/reactb2x/.a4drules/{graphql.md → features/feature-graphql-graphql-data-access-rule.md} +186 -125
  120. package/lib/templates/project/reactb2x/.a4drules/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +32 -0
  121. package/lib/templates/project/reactb2x/.a4drules/features/feature-react-chart-analytics-charts-rule.md +27 -0
  122. package/lib/templates/project/reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/SKILL.md +155 -0
  123. package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/explore-schema.md} +58 -29
  124. package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md} +52 -42
  125. package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md} +32 -22
  126. package/lib/templates/project/{reactb2e/.a4drules/graphql/tools/schemas/shared.graphqls → reactb2x/.a4drules/skills/feature-graphql-graphql-data-access/docs/shared-schema.graphqls} +1 -1
  127. package/lib/templates/project/reactb2x/.a4drules/skills/feature-micro-frontend-micro-frontend/SKILL.md +137 -0
  128. package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/SKILL.md +108 -0
  129. package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-agentforce-conversation-client-embedded-agent/docs/embed-examples.md +182 -0
  130. package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-chart-analytics-charts/SKILL.md +41 -0
  131. package/lib/templates/project/reactb2x/.a4drules/skills/feature-react-chart-analytics-charts/docs/schema-mapping.md +4 -0
  132. package/lib/templates/project/reactb2x/.a4drules/webapp-code-quality.md +136 -0
  133. package/lib/templates/project/reactb2x/.a4drules/{images.md → webapp-images.md} +6 -4
  134. package/lib/templates/project/reactb2x/.a4drules/webapp-no-node-e.md +3 -2
  135. package/lib/templates/project/reactb2x/.a4drules/webapp-react.md +149 -0
  136. package/lib/templates/project/reactb2x/.a4drules/{typescript.md → webapp-typescript.md} +10 -29
  137. package/lib/templates/project/reactb2x/.a4drules/webapp.md +60 -45
  138. package/lib/templates/project/reactb2x/AGENT.md +1 -1
  139. package/lib/templates/project/reactb2x/CHANGELOG.md +377 -0
  140. package/lib/templates/project/reactb2x/README.md +58 -4
  141. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/CHANGELOG.md +10 -0
  142. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/README.md +35 -0
  143. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/package.json +8 -7
  144. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/appLayout.tsx +75 -3
  145. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/alerts/status-alert.tsx +36 -32
  146. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layouts/card-layout.tsx +29 -0
  147. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/alert.tsx +61 -54
  148. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/button.tsx +57 -57
  149. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/card.tsx +86 -75
  150. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/dialog.tsx +129 -110
  151. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/field.tsx +208 -193
  152. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/index.ts +65 -53
  153. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/input.tsx +14 -14
  154. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/label.tsx +17 -14
  155. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/pagination.tsx +108 -88
  156. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/select.tsx +156 -146
  157. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/separator.tsx +19 -19
  158. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/skeleton.tsx +10 -10
  159. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/spinner.tsx +12 -11
  160. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/table.tsx +96 -69
  161. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/tabs.tsx +71 -61
  162. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components.json +1 -1
  163. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/constants.ts +39 -0
  164. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{context → features/authentication/context}/AuthContext.tsx +1 -1
  165. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/footers/footer-link.tsx +1 -1
  166. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/forms/auth-form.tsx +4 -4
  167. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/forms/submit-button.tsx +4 -4
  168. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{hooks → features/authentication/hooks}/form.tsx +13 -9
  169. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/layout/card-skeleton.tsx +2 -2
  170. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components → features/authentication}/layout/centered-page-layout.tsx +2 -3
  171. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{layouts → features/authentication/layouts}/AuthAppLayout.tsx +2 -2
  172. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication/layouts}/authenticationRouteLayout.tsx +2 -2
  173. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication/layouts}/privateRouteLayout.tsx +2 -2
  174. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/ChangePassword.tsx +6 -6
  175. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/ForgotPassword.tsx +5 -5
  176. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/Login.tsx +6 -6
  177. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/Profile.tsx +22 -13
  178. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/Register.tsx +6 -11
  179. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{pages → features/authentication/pages}/ResetPassword.tsx +8 -8
  180. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/sessionTimeout/SessionTimeoutValidator.tsx +6 -6
  181. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/index.ts +19 -0
  182. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/objectDetailService.ts +125 -0
  183. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/objectInfoGraphQLService.ts +194 -0
  184. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/objectInfoService.ts +199 -0
  185. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/api/recordListGraphQLService.ts +365 -0
  186. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailFields.tsx +55 -0
  187. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailForm.tsx +146 -0
  188. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailHeader.tsx +34 -0
  189. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/DetailLayoutSections.tsx +80 -0
  190. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/Section.tsx +108 -0
  191. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/SectionRow.tsx +20 -0
  192. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/UiApiDetailForm.tsx +140 -0
  193. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FieldValueDisplay.tsx +73 -0
  194. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedAddress.tsx +29 -0
  195. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedEmail.tsx +17 -0
  196. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedPhone.tsx +24 -0
  197. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedText.tsx +11 -0
  198. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/FormattedUrl.tsx +29 -0
  199. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/detail/formatted/index.ts +6 -0
  200. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FilterField.tsx +54 -0
  201. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FilterInput.tsx +55 -0
  202. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FilterSelect.tsx +72 -0
  203. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/filters/FiltersPanel.tsx +380 -0
  204. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/forms/filters-form.tsx +114 -0
  205. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/forms/submit-button.tsx +47 -0
  206. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/GlobalSearchInput.tsx +114 -0
  207. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/ResultCardFields.tsx +71 -0
  208. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchHeader.tsx +31 -0
  209. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchPagination.tsx +144 -0
  210. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchResultCard.tsx +136 -0
  211. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/search/SearchResultsPanel.tsx +197 -0
  212. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/components/shared/LoadingFallback.tsx +61 -0
  213. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/filters/FilterInput.tsx +55 -0
  214. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/filters/FilterSelect.tsx +72 -0
  215. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/form.tsx +209 -0
  216. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/index.ts +22 -0
  217. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useObjectInfoBatch.ts +65 -0
  218. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useObjectSearchData.ts +395 -0
  219. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useRecordDetailLayout.ts +156 -0
  220. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/hooks/useRecordListGraphQL.ts +135 -0
  221. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/pages/DetailPage.tsx +109 -0
  222. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/pages/GlobalSearch.tsx +229 -0
  223. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/filters/filters.ts +120 -0
  224. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/filters/picklist.ts +32 -0
  225. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/index.ts +4 -0
  226. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/objectInfo/objectInfo.ts +166 -0
  227. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/recordDetail/recordDetail.ts +61 -0
  228. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/types/search/searchResults.ts +229 -0
  229. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/apiUtils.ts +125 -0
  230. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/cacheUtils.ts +76 -0
  231. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/debounce.ts +89 -0
  232. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/fieldUtils.ts +354 -0
  233. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/fieldValueExtractor.ts +67 -0
  234. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/filterUtils.ts +32 -0
  235. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/formDataTransformUtils.ts +260 -0
  236. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/formUtils.ts +142 -0
  237. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/graphQLNodeFieldUtils.ts +186 -0
  238. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/graphQLObjectInfoAdapter.ts +319 -0
  239. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/graphQLRecordAdapter.ts +90 -0
  240. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/index.ts +59 -0
  241. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/layoutTransformUtils.ts +236 -0
  242. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/linkUtils.ts +14 -0
  243. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/paginationUtils.ts +49 -0
  244. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/recordUtils.ts +159 -0
  245. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/features/global-search/utils/sanitizationUtils.ts +49 -0
  246. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/utils.ts +3 -3
  247. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Home.tsx +11 -10
  248. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/routes.tsx +33 -11
  249. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/styles/global.css +107 -107
  250. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/vite.config.ts +2 -1
  251. package/lib/templates/project/reactb2x/package.json +1 -1
  252. package/lib/templates/webapplication/reactbasic/CHANGELOG.md +10 -0
  253. package/lib/templates/webapplication/reactbasic/README.md +75 -0
  254. package/lib/templates/webapplication/reactbasic/package.json +13 -5
  255. package/lib/templates/webapplication/reactbasic/src/appLayout.tsx +75 -3
  256. package/lib/templates/webapplication/reactbasic/src/components/alerts/status-alert.tsx +49 -0
  257. package/lib/templates/webapplication/reactbasic/src/components/layouts/card-layout.tsx +29 -0
  258. package/lib/templates/webapplication/reactbasic/src/components/ui/alert.tsx +76 -0
  259. package/lib/templates/webapplication/reactbasic/src/components/ui/button.tsx +67 -0
  260. package/lib/templates/webapplication/reactbasic/src/components/ui/card.tsx +103 -0
  261. package/lib/templates/webapplication/reactbasic/src/components/ui/dialog.tsx +162 -0
  262. package/lib/templates/webapplication/reactbasic/src/components/ui/field.tsx +237 -0
  263. package/lib/templates/webapplication/reactbasic/src/components/ui/index.ts +84 -0
  264. package/lib/templates/webapplication/reactbasic/src/components/ui/input.tsx +19 -0
  265. package/lib/templates/webapplication/reactbasic/src/components/ui/label.tsx +22 -0
  266. package/lib/templates/webapplication/reactbasic/src/components/ui/pagination.tsx +132 -0
  267. package/lib/templates/webapplication/reactbasic/src/components/ui/select.tsx +193 -0
  268. package/lib/templates/webapplication/reactbasic/src/components/ui/separator.tsx +26 -0
  269. package/lib/templates/webapplication/reactbasic/src/components/ui/skeleton.tsx +14 -0
  270. package/lib/templates/webapplication/reactbasic/src/components/ui/spinner.tsx +16 -0
  271. package/lib/templates/webapplication/reactbasic/src/components/ui/table.tsx +114 -0
  272. package/lib/templates/webapplication/reactbasic/src/components/ui/tabs.tsx +88 -0
  273. package/lib/templates/webapplication/reactbasic/src/components.json +18 -0
  274. package/lib/templates/webapplication/reactbasic/src/lib/utils.ts +6 -0
  275. package/lib/templates/webapplication/reactbasic/src/styles/global.css +122 -0
  276. package/lib/templates/webapplication/reactbasic/vite.config.ts +2 -1
  277. package/lib/templates/webapplication/webappbasic/README.md +15 -0
  278. package/lib/utils/webappTemplateUtils.d.ts +10 -0
  279. package/lib/utils/webappTemplateUtils.js +55 -7
  280. package/lib/utils/webappTemplateUtils.js.map +1 -1
  281. package/package.json +5 -5
  282. package/lib/templates/project/reactb2e/.a4drules/README.md +0 -35
  283. package/lib/templates/project/reactb2e/.a4drules/a4d-webapp-generate.md +0 -27
  284. package/lib/templates/project/reactb2e/.a4drules/build-validation.md +0 -78
  285. package/lib/templates/project/reactb2e/.a4drules/code-quality.md +0 -137
  286. package/lib/templates/project/reactb2e/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +0 -205
  287. package/lib/templates/project/reactb2e/.a4drules/react.md +0 -387
  288. package/lib/templates/project/reactb2e/.a4drules/react_image_processing.md +0 -45
  289. package/lib/templates/project/reactb2e/.a4drules/ui-layout.md +0 -23
  290. package/lib/templates/project/reactb2e/.a4drules/webapp-nav-and-placeholders.md +0 -33
  291. package/lib/templates/project/reactb2e/.a4drules/webapp-ui-first.md +0 -32
  292. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.d.ts +0 -2
  293. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.js +0 -93
  294. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +0 -14392
  295. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/graphql-operations-types.ts +0 -116
  296. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/accounts.ts +0 -33
  297. package/lib/templates/project/reactb2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -29
  298. package/lib/templates/project/reactb2x/.a4drules/README.md +0 -35
  299. package/lib/templates/project/reactb2x/.a4drules/a4d-webapp-generate.md +0 -27
  300. package/lib/templates/project/reactb2x/.a4drules/build-validation.md +0 -78
  301. package/lib/templates/project/reactb2x/.a4drules/code-quality.md +0 -137
  302. package/lib/templates/project/reactb2x/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +0 -205
  303. package/lib/templates/project/reactb2x/.a4drules/react.md +0 -387
  304. package/lib/templates/project/reactb2x/.a4drules/react_image_processing.md +0 -45
  305. package/lib/templates/project/reactb2x/.a4drules/ui-layout.md +0 -23
  306. package/lib/templates/project/reactb2x/.a4drules/webapp-nav-and-placeholders.md +0 -33
  307. package/lib/templates/project/reactb2x/.a4drules/webapp-ui-first.md +0 -32
  308. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.d.ts +0 -2
  309. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.js +0 -93
  310. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/package-lock.json +0 -18408
  311. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/graphql-operations-types.ts +0 -116
  312. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/accounts.ts +0 -33
  313. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -29
  314. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-layout.tsx +0 -23
  315. package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/data-sdk.ts +0 -21
  316. package/lib/templates/webapplication/reactbasic/build/vite.config.d.ts +0 -2
  317. package/lib/templates/webapplication/reactbasic/build/vite.config.js +0 -93
  318. package/lib/templates/webapplication/reactbasic/package-lock.json +0 -14373
  319. package/lib/templates/webapplication/reactbasic/src/api/graphql-operations-types.ts +0 -116
  320. package/lib/templates/webapplication/reactbasic/src/api/utils/accounts.ts +0 -33
  321. package/lib/templates/webapplication/reactbasic/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -29
  322. /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/authHelpers.ts +0 -0
  323. /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/authenticationConfig.ts +0 -0
  324. /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{hooks → features/authentication/hooks}/useCountdownTimer.ts +0 -0
  325. /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{hooks → features/authentication/hooks}/useRetryWithBackoff.ts +0 -0
  326. /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/sessionTimeout/sessionTimeService.ts +0 -0
  327. /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{components/auth → features/authentication}/sessionTimeout/sessionTimeoutConfig.ts +0 -0
  328. /package/lib/templates/project/reactb2x/force-app/main/default/webapplications/appreacttemplateb2x/src/{utils → features/authentication/utils}/helpers.ts +0 -0
@@ -1,51 +1,58 @@
1
- # AI Rule: GraphQL Data Access
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.tsx"
5
+ ---
2
6
 
3
- Instructs agents to use the established GraphQL utilities for Salesforce data access.
7
+ # GraphQL Data Access
4
8
 
5
- ## Targets
6
- - `force-app/main/default/webapplications/<appName>/**/*.ts`
7
- - `force-app/main/default/webapplications/<appName>/**/*.tsx`
9
+ Instructs agents to use the established GraphQL utilities for Salesforce data access.
8
10
 
9
11
  ## TypeScript Types & Code Generation
10
12
 
11
13
  ### Generated Types File
12
- Types are auto-generated at: `force-app/main/default/webapplications/<appName>/src/api/graphql-operations-types.ts`
14
+
15
+ Types are auto-generated at: `src/api/graphql-operations-types.ts`
13
16
 
14
17
  ### Generation Command
15
- Run from the web app directory (replace `<appName>` with your app folder name, e.g. `base-react-app`):
18
+
16
19
  ```bash
17
- cd force-app/main/default/webapplications/<appName> && npm run graphql:codegen
20
+ npm run graphql:codegen
18
21
  ```
19
22
 
20
- The codegen configuration is located at `scripts/graphql/codegen.js` (or the package's codegen config) and generates types from:
21
- - Schema: `schema.graphql` (root level of the web app or as configured)
22
- - Documents: `force-app/main/default/webapplications/<appName>/src/**/*.{graphql,ts,tsx}`
23
+ The codegen configuration is at `codegen.yml` and generates types from:
24
+
25
+ - Schema: `schema.graphql` (project root)
26
+ - Documents: `src/**/*.{graphql,ts,tsx}`
23
27
 
24
28
  ### Type Naming Convention
29
+
25
30
  For a GraphQL operation named `GetHighRevenueAccounts`:
31
+
26
32
  - **Query/Mutation Response Type**: `GetHighRevenueAccountsQuery` or `GetHighRevenueAccountsMutation`
27
33
  - **Input Variables Type**: `GetHighRevenueAccountsQueryVariables` or `GetHighRevenueAccountsMutationVariables`
28
34
 
29
35
  ## Core Types & Function Signatures
30
36
 
31
- ### executeGraphQL Function
32
- Located in `force-app/main/default/webapplications/<appName>/src/api/graphql.ts`:
37
+ ### getDataSDK Function
38
+
39
+ Available from `@salesforce/sdk-data`:
33
40
 
34
41
  ```typescript
35
- function executeGraphQL<T, InputVariables = Record<string, unknown>>(
36
- query: string,
37
- variables?: InputVariables
38
- ): Promise<T>
42
+ import { getDataSDK } from "@salesforce/sdk-data";
43
+
44
+ const data = await getDataSDK();
45
+ const response = await data.graphql?.<ResponseType, VariablesType>(query, variables);
39
46
  ```
40
47
 
41
- - `T` - The response type (e.g., `GetHighRevenueAccountsQuery`)
42
- - `InputVariables` - The variables type (e.g., `GetHighRevenueAccountsQueryVariables`)
48
+ `getDataSDK()` returns a lazily-initialized `DataSDK` singleton. The `graphql` method uses optional chaining (`?.`) because not all surfaces support GraphQL.
43
49
 
44
50
  ### gql Template Tag
45
- Also exported from `graphql.ts` for inline query definitions:
51
+
52
+ Also available from `@salesforce/sdk-data` for inline query definitions:
46
53
 
47
54
  ```typescript
48
- import { gql } from '../api/graphql';
55
+ import { gql } from "@salesforce/sdk-data";
49
56
 
50
57
  const MY_QUERY = gql`
51
58
  query MyQuery {
@@ -59,7 +66,8 @@ const MY_QUERY = gql`
59
66
  The `gql` tag is a template literal that allows defining GraphQL queries inline while maintaining syntax highlighting in most editors.
60
67
 
61
68
  ### GraphQLResponse Shape
62
- The raw response wrapper (handled internally by `executeGraphQL`):
69
+
70
+ `data.graphql?.()` returns `GraphQLResponse<T>`. Callers destructure `{ data, errors }` and handle errors themselves:
63
71
 
64
72
  ```typescript
65
73
  interface GraphQLResponse<T> {
@@ -72,20 +80,55 @@ interface GraphQLResponse<T> {
72
80
  }
73
81
  ```
74
82
 
83
+ ### Handling Mixed Responses (Partial Success)
84
+
85
+ GraphQL can return **both `data` and `errors`** in the same response (partial success). For example, some fields may resolve while others fail due to field-level security. Choose a strategy per use case:
86
+
87
+ ```typescript
88
+ // Strategy A: Strict — treat any errors as failure (default for most queries)
89
+ if (response?.errors?.length) {
90
+ throw new Error(response.errors.map((e) => e.message).join("; "));
91
+ }
92
+ const result = response?.data;
93
+
94
+ // Strategy B: Tolerant — log errors but use partial data
95
+ if (response?.errors?.length) {
96
+ console.warn("GraphQL partial errors:", response.errors);
97
+ }
98
+ const result = response?.data;
99
+
100
+ // Strategy C: Discriminated — fail only when no data came back
101
+ if (response?.errors?.length && !response?.data) {
102
+ throw new Error(response.errors.map((e) => e.message).join("; "));
103
+ }
104
+ if (response?.errors?.length) {
105
+ console.warn("Partial success with errors:", response.errors);
106
+ }
107
+ const result = response?.data;
108
+ ```
109
+
110
+ **When to use each:**
111
+
112
+ - **Strategy A** — Default. Use for queries where incomplete data would be misleading (e.g., financial summaries, approval workflows).
113
+ - **Strategy B** — Use when partial data is still useful and the UI can degrade gracefully (e.g., dashboard tiles, optional fields).
114
+ - **Strategy C** — Use for mutations where the operation may succeed but some return fields are inaccessible.
115
+
116
+ For mutation-specific partial responses, see `docs/generate-mutation-query.md` which covers `PARTIAL` and `FAILED` status handling workflows.
117
+
75
118
  ### NodeOfConnection Utility Type
119
+
76
120
  Extract the node type from a connection (edges/node pattern):
77
121
 
78
122
  ```typescript
79
- import { type NodeOfConnection } from '../api/graphql';
123
+ import { type NodeOfConnection } from "@salesforce/sdk-data";
80
124
 
81
125
  // Extract Account node type from the query response
82
- type AccountNode = NodeOfConnection<
83
- GetHighRevenueAccountsQuery['uiapi']['query']['Account']
84
- >;
126
+ type AccountNode = NodeOfConnection<GetHighRevenueAccountsQuery["uiapi"]["query"]["Account"]>;
85
127
  ```
86
128
 
87
129
  ### UIAPI Response Shape
88
- All Salesforce GraphQL queries follow this structure:
130
+
131
+ All Salesforce GraphQL record queries follow this structure (https://developer.salesforce.com/docs/platform/graphql/guide/query-record-objects.html):
89
132
 
90
133
  ```typescript
91
134
  interface UIAPIQueryResponse {
@@ -98,7 +141,7 @@ interface UIAPIQueryResponse {
98
141
  [FieldName]?: { value?: FieldType | null } | null;
99
142
  // Reference fields include the related record
100
143
  [ReferenceField]?: {
101
- value?: string | null; // The ID
144
+ value?: string | null; // The ID
102
145
  [RelatedField]?: { value?: RelatedType | null } | null;
103
146
  } | null;
104
147
  } | null;
@@ -116,10 +159,11 @@ There are **two acceptable patterns** for defining GraphQL queries:
116
159
  ### Pattern 1: External .graphql File (Recommended for complex queries)
117
160
 
118
161
  #### Step 1: Create .graphql File
162
+
119
163
  Store queries in `.graphql` files for codegen to process:
120
164
 
121
165
  ```graphql
122
- # force-app/main/default/webapplications/<appName>/src/api/utils/query/myQuery.graphql
166
+ # src/api/utils/query/myQuery.graphql
123
167
  query GetMyData($myVariable: String) {
124
168
  uiapi {
125
169
  query {
@@ -127,7 +171,9 @@ query GetMyData($myVariable: String) {
127
171
  edges {
128
172
  node {
129
173
  Id
130
- Name { value }
174
+ Name {
175
+ value
176
+ }
131
177
  }
132
178
  }
133
179
  }
@@ -137,41 +183,50 @@ query GetMyData($myVariable: String) {
137
183
  ```
138
184
 
139
185
  #### Step 2: Run Code Generation
186
+
140
187
  ```bash
141
- cd force-app/main/default/webapplications/<appName> && npm run graphql:codegen
188
+ npm run graphql:codegen
142
189
  ```
143
190
 
144
191
  This generates types in `graphql-operations-types.ts`:
192
+
145
193
  - `GetMyDataQuery` - response type
146
194
  - `GetMyDataQueryVariables` - variables type
147
195
 
148
196
  #### Step 3: Import and Use
197
+
149
198
  ```typescript
150
- import { executeGraphQL, type NodeOfConnection } from '../api/graphql';
151
- import MY_QUERY from './query/myQuery.graphql?raw';
152
- import type {
153
- GetMyDataQuery,
154
- GetMyDataQueryVariables,
155
- } from '../graphql-operations-types';
156
-
157
- // Extract node type for cleaner return types
158
- type MyNode = NodeOfConnection<GetMyDataQuery['uiapi']['query']['MyObject']>;
159
-
160
- export async function getMyData(
161
- variables: GetMyDataQueryVariables
162
- ): Promise<MyNode[]> {
163
- const response = await executeGraphQL<GetMyDataQuery>(MY_QUERY, variables);
164
- return response.uiapi?.query?.MyObject?.edges?.map(edge => edge?.node) || [];
199
+ import { getDataSDK, type NodeOfConnection } from "@salesforce/sdk-data";
200
+ import MY_QUERY from "./query/myQuery.graphql?raw";
201
+ import type { GetMyDataQuery, GetMyDataQueryVariables } from "../graphql-operations-types";
202
+
203
+ type MyNode = NodeOfConnection<GetMyDataQuery["uiapi"]["query"]["MyObject"]>;
204
+
205
+ export async function getMyData(variables: GetMyDataQueryVariables): Promise<MyNode[]> {
206
+ const data = await getDataSDK();
207
+ const response = await data.graphql?.<GetMyDataQuery, GetMyDataQueryVariables>(
208
+ MY_QUERY,
209
+ variables,
210
+ );
211
+
212
+ if (response?.errors?.length) {
213
+ const errorMessages = response.errors.map((e) => e.message).join("; ");
214
+ throw new Error(`GraphQL Error: ${errorMessages}`);
215
+ }
216
+
217
+ return response?.data?.uiapi?.query?.MyObject?.edges?.map((edge) => edge?.node) || [];
165
218
  }
166
219
  ```
167
220
 
168
221
  **Key imports for Pattern 1:**
169
- - `executeGraphQL` - Execute the query
222
+
223
+ - `getDataSDK` - Get the DataSDK singleton
170
224
  - `NodeOfConnection` - Extract node types from connection responses
171
225
  - Query from `.graphql` file with `?raw` suffix
172
226
  - Generated types from `graphql-operations-types.ts`
173
227
 
174
228
  **Pattern 1 Benefits:**
229
+
175
230
  - Full codegen support with automatic type generation
176
231
  - Syntax highlighting and validation in `.graphql` files
177
232
  - Easier to share queries across multiple files/components
@@ -181,6 +236,7 @@ export async function getMyData(
181
236
  - Clear separation of concerns between query definition and usage
182
237
 
183
238
  **Pattern 1 Limitations:**
239
+
184
240
  - Requires separate file management
185
241
  - Extra step to run codegen after query changes
186
242
  - More boilerplate (file import with `?raw`, separate file to maintain)
@@ -193,8 +249,8 @@ export async function getMyData(
193
249
  For simpler queries without variables or when colocation is preferred:
194
250
 
195
251
  ```typescript
196
- import { executeGraphQL, gql } from '../api/graphql';
197
- import { type CurrentUserQuery } from '../graphql-operations-types';
252
+ import { getDataSDK, gql } from "@salesforce/sdk-data";
253
+ import { type CurrentUserQuery } from "../graphql-operations-types";
198
254
 
199
255
  const CURRENT_USER_QUERY = gql`
200
256
  query CurrentUser {
@@ -210,37 +266,44 @@ const CURRENT_USER_QUERY = gql`
210
266
  `;
211
267
 
212
268
  interface User {
213
- id: string;
214
- name: string;
269
+ id: string;
270
+ name: string;
215
271
  }
216
272
 
217
273
  export async function getCurrentUser(): Promise<User | null> {
218
274
  try {
219
- const response = await executeGraphQL<CurrentUserQuery>(CURRENT_USER_QUERY);
275
+ const data = await getDataSDK();
276
+ const response = await data.graphql?.<CurrentUserQuery>(CURRENT_USER_QUERY);
277
+
278
+ if (response?.errors?.length) {
279
+ throw new Error(response.errors.map((e) => e.message).join("; "));
280
+ }
220
281
 
221
- const userData = response.uiapi.currentUser;
282
+ const userData = response?.data?.uiapi.currentUser;
222
283
 
223
284
  if (!userData) {
224
- throw new Error('No user data found');
285
+ throw new Error("No user data found");
225
286
  }
226
287
 
227
288
  return {
228
289
  id: userData.Id,
229
- name: userData.Name?.value || 'User',
290
+ name: userData.Name?.value || "User",
230
291
  };
231
292
  } catch (error) {
232
- console.error('Error fetching user data:', error);
293
+ console.error("Error fetching user data:", error);
233
294
  throw error;
234
295
  }
235
296
  }
236
297
  ```
237
298
 
238
299
  **Key imports for Pattern 2:**
239
- - `executeGraphQL` - Execute the query
300
+
301
+ - `getDataSDK` - Get the DataSDK singleton
240
302
  - `gql` - Template tag for inline query definition
241
303
  - Generated types from `graphql-operations-types.ts`
242
304
 
243
305
  **Pattern 2 Benefits:**
306
+
244
307
  - Query is colocated with usage code
245
308
  - Supports dynamic queries (e.g., the set of fields changes based on runtime conditions and cannot be predetermined)
246
309
  - No separate file to maintain
@@ -248,51 +311,33 @@ export async function getCurrentUser(): Promise<User | null> {
248
311
  - Simpler for straightforward queries
249
312
 
250
313
  **Pattern 2 Limitations:**
314
+
251
315
  - Inline queries without `gql` template tag are not processed by codegen
252
316
  - Must manually ensure query name matches generated types
253
317
  - Less suitable for complex queries with fragments
254
318
 
255
- ## Reference Examples
256
-
257
- ### Pattern 1 Example: accounts.ts
258
- See `force-app/main/default/webapplications/<appName>/src/api/utils/accounts.ts` for Pattern 1:
259
- 1. Importing query from `.graphql` file with `?raw` suffix
260
- 2. Importing generated types from `graphql-operations-types.ts`
261
- 3. Using `NodeOfConnection` to extract node types
262
- 4. Proper typing with `executeGraphQL<ResponseType>(query, variables)`
263
- 5. Safe data extraction from the nested response
264
-
265
- ### Pattern 2 Example: user.ts
266
- See `force-app/main/default/webapplications/<appName>/src/api/utils/user.ts` for Pattern 2:
267
- 1. Using `gql` template tag for inline query definition
268
- 2. Importing generated types from `graphql-operations-types.ts`
269
- 3. Simple query without variables
270
- 4. Error handling with try/catch
271
- 5. Direct access to `uiapi.currentUser` (non-connection response)
272
-
273
319
  ## Conditional Field Selection with Directives
274
320
 
275
321
  For dynamic fieldsets with known fields that should be conditionally included, use GraphQL directives instead of building queries dynamically. This preserves type generation while allowing runtime control.
276
322
 
277
323
  ### Directives
324
+
278
325
  - **`@include(if: $condition)`** - include field/fragment when `$condition` is `true`
279
326
  - **`@skip(if: $condition)`** - skip field/fragment when `$condition` is `true`
280
327
 
281
328
  ### Example with Fragments
329
+
282
330
  ```graphql
283
- # <appName>/src/api/utils/query/getAccountDetails.graphql
284
- query GetAccountDetails(
285
- $id: ID!
286
- $includeFinancials: Boolean!
287
- $includeContacts: Boolean!
288
- ) {
331
+ query GetAccountDetails($id: ID!, $includeFinancials: Boolean!, $includeContacts: Boolean!) {
289
332
  uiapi {
290
333
  query {
291
334
  Account(where: { Id: { eq: $id } }) {
292
335
  edges {
293
336
  node {
294
337
  Id
295
- Name { value }
338
+ Name {
339
+ value
340
+ }
296
341
  ...FinancialFields @include(if: $includeFinancials)
297
342
  ...ContactFields @include(if: $includeContacts)
298
343
  }
@@ -303,107 +348,123 @@ query GetAccountDetails(
303
348
  }
304
349
 
305
350
  fragment FinancialFields on Account {
306
- AnnualRevenue { value }
307
- NumberOfEmployees { value }
351
+ AnnualRevenue {
352
+ value
353
+ }
354
+ NumberOfEmployees {
355
+ value
356
+ }
308
357
  }
309
358
 
310
359
  fragment ContactFields on Account {
311
- Phone { value }
312
- Website { value }
360
+ Phone {
361
+ value
362
+ }
363
+ Website {
364
+ value
365
+ }
313
366
  }
314
367
  ```
315
368
 
316
369
  ### Usage
370
+
317
371
  ```typescript
318
- import { executeGraphQL } from '../api/graphql';
319
- import QUERY from './query/getAccountDetails.graphql?raw';
372
+ import { getDataSDK } from "@salesforce/sdk-data";
373
+ import QUERY from "./query/getAccountDetails.graphql?raw";
320
374
  import type {
321
375
  GetAccountDetailsQuery,
322
376
  GetAccountDetailsQueryVariables,
323
- } from '../graphql-operations-types';
324
-
325
- const data = await executeGraphQL<GetAccountDetailsQuery>(QUERY, {
326
- id: accountId,
327
- includeFinancials: userWantsFinancials,
328
- includeContacts: userWantsContacts,
329
- });
377
+ } from "../graphql-operations-types";
378
+
379
+ const data = await getDataSDK();
380
+ const response = await data.graphql?.<GetAccountDetailsQuery, GetAccountDetailsQueryVariables>(
381
+ QUERY,
382
+ {
383
+ id: accountId,
384
+ includeFinancials: userWantsFinancials,
385
+ includeContacts: userWantsContacts,
386
+ },
387
+ );
330
388
  ```
331
389
 
332
- ### Benefits
333
- - Query stays in `.graphql` file (codegen works)
334
- - Generated types include all possible fields as optional
335
- - Runtime control over which fields are fetched
336
- - Better performance when fields aren't needed
337
- - Type safety is preserved
338
-
339
390
  ## Anti-Patterns (Not Recommended)
340
391
 
341
392
  ### Direct API Calls
393
+
342
394
  ```typescript
343
395
  // NOT RECOMMENDED: Direct axios/fetch calls for GraphQL
344
- const response = await axios.post('/graphql', { query });
396
+ const response = await axios.post("/graphql", { query });
345
397
 
346
- // PREFERRED: Use executeGraphQL
347
- const data = await executeGraphQL<ResponseType>(query, variables);
398
+ // PREFERRED: Use the DataSDK
399
+ const data = await getDataSDK();
400
+ const response = await data.graphql?.<ResponseType>(query, variables);
348
401
  ```
349
402
 
350
403
  ### Missing Type Definitions
404
+
351
405
  ```typescript
352
406
  // NOT RECOMMENDED: Untyped GraphQL calls
353
- const data = await executeGraphQL(query);
407
+ const data = await getDataSDK();
408
+ await data.graphql?.(query);
354
409
 
355
410
  // PREFERRED: Provide response type
356
- const data = await executeGraphQL<GetMyDataQuery>(query);
411
+ const data = await getDataSDK();
412
+ const response = await data.graphql?.<GetMyDataQuery>(query);
357
413
  ```
358
414
 
359
415
  ### Plain String Queries (Without gql Tag)
416
+
360
417
  ```typescript
361
418
  // NOT RECOMMENDED: Plain string queries without gql tag
362
419
  const query = `query { ... }`;
363
- const data = await executeGraphQL(query);
420
+ const data = await getDataSDK();
421
+ await data.graphql?.(query);
364
422
 
365
423
  // PREFERRED: Use gql tag for inline queries
366
424
  const QUERY = gql`query { ... }`;
367
- const data = await executeGraphQL<ResponseType>(QUERY);
425
+ const data = await getDataSDK();
426
+ const response = await data.graphql?.<ResponseType>(QUERY);
368
427
 
369
428
  // OR: Use .graphql file for complex queries
370
- import QUERY from './query/myQuery.graphql?raw';
371
- const data = await executeGraphQL<ResponseType>(QUERY);
429
+ import QUERY from "./query/myQuery.graphql?raw";
430
+ const data = await getDataSDK();
431
+ const response = await data.graphql?.<ResponseType>(QUERY);
372
432
  ```
373
433
 
374
- **Why avoid plain strings:**
375
- - No syntax highlighting or validation
376
- - Harder to maintain and refactor
377
- - More error-prone
434
+ ## Benefits of the DataSDK GraphQL API
378
435
 
379
- ## Benefits of executeGraphQL
380
- - Centralized error handling for GraphQL errors
436
+ - Uses the DataSDK with proper authentication and CSRF token handling
381
437
  - Consistent typing with `GraphQLResponse<T>` interface
382
- - Uses the configured `baseDataClient` with proper authentication
383
- - Automatic extraction of `data` from response envelope
438
+ - Optional chaining (`?.`) safely handles surfaces where GraphQL is unavailable
439
+ - Callers get full `GraphQLResponse<T>` for flexible error handling
384
440
 
385
441
  ## Quality Checklist
442
+
386
443
  Before completing GraphQL data access code:
387
444
 
388
445
  ### For Pattern 1 (.graphql files):
446
+
389
447
  1. [ ] Create `.graphql` file for the query/mutation
390
448
  2. [ ] Run `npm run graphql:codegen` to generate types
391
449
  3. [ ] Import query with `?raw` suffix
392
450
  4. [ ] Import generated types from `graphql-operations-types.ts`
393
- 5. [ ] Use `executeGraphQL<ResponseType>()` with proper generic
394
- 6. [ ] Use `NodeOfConnection` for cleaner node types when needed
395
- 7. [ ] Handle optional chaining for nested response data
396
- 8. [ ] Follow the pattern in `accounts.ts`
451
+ 5. [ ] Use `data.graphql?.<ResponseType>()` with proper generic
452
+ 6. [ ] Handle `response.errors` and destructure `response.data`
453
+ 7. [ ] Use `NodeOfConnection` for cleaner node types when needed
454
+ 8. [ ] Handle optional chaining for nested response data
455
+ 9. [ ] Follow the pattern in `accounts.ts`
397
456
 
398
457
  ### For Pattern 2 (inline with gql):
458
+
399
459
  1. [ ] Define query using `gql` template tag
400
460
  2. [ ] Ensure query name matches generated types in `graphql-operations-types.ts`
401
461
  3. [ ] Import generated types for the query
402
- 4. [ ] Use `executeGraphQL<ResponseType>()` with proper generic
403
- 5. [ ] Handle errors with try/catch when appropriate
462
+ 4. [ ] Use `data.graphql?.<ResponseType>()` with proper generic
463
+ 5. [ ] Handle `response.errors` and destructure `response.data`
404
464
  6. [ ] Handle optional chaining for nested response data
405
465
  7. [ ] Follow the pattern in `user.ts`
406
466
 
407
467
  ### General:
468
+
408
469
  - [ ] Choose Pattern 1 for complex queries with variables, fragments, or when shared
409
470
  - [ ] Choose Pattern 2 for simple, colocated queries without complex requirements
@@ -0,0 +1,32 @@
1
+ ---
2
+ paths:
3
+ - "**/*.tsx"
4
+ - "**/components/**/*.ts"
5
+ ---
6
+
7
+ # Agentforce Conversation Client (standards)
8
+
9
+ When adding or editing the embedded Agentforce chat client in this project, follow these conventions.
10
+
11
+ ## Component and library
12
+
13
+ - Use the shared **AgentforceConversationClient** React component from `@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental`. Do not call `embedAgentforceClient` directly in application code.
14
+ - Install with `npm install @salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental`. The underlying SDK (`@salesforce/agentforce-conversation-client`) is included automatically as a dependency.
15
+
16
+ ## Authentication
17
+
18
+ - The component resolves auth automatically: **localhost** fetches `frontdoorUrl` from `/__lo/frontdoor`; **production** uses `window.location.origin` as `salesforceOrigin`.
19
+ - Do not hard-code `salesforceOrigin` or `frontdoorUrl` unless the consumer explicitly provides them as props.
20
+
21
+ ## Rendering mode
22
+
23
+ - Pass `agentforceClientConfig.renderingConfig.mode` to select **floating** (default) or **inline**. Do not apply custom positioning CSS to override the built-in layout.
24
+ - For inline mode, set `width` and `height` in `renderingConfig`. Do not override iframe dimensions with external CSS.
25
+
26
+ ## Agent selection
27
+
28
+ - Use `agentforceClientConfig.agentId` to select a specific agent. Ask the user for the agent ID; if not provided, note that the org's default agent is used.
29
+
30
+ ## Placement
31
+
32
+ - Render `<AgentforceConversationClient />` inside the existing app layout (e.g. alongside `<Outlet />`). Do not replace the entire page shell with the chat client.
@@ -0,0 +1,27 @@
1
+ ---
2
+ paths:
3
+ - "**/*.tsx"
4
+ - "**/components/**/*.ts"
5
+ ---
6
+
7
+ # Analytics charts (standards)
8
+
9
+ When adding or editing chart UI in this project, follow these conventions.
10
+
11
+ ## Components and library
12
+
13
+ - Use the shared **AnalyticsChart** component (and **ChartContainer** when a framed block is needed). Do not use raw Recharts components for standard line or bar charts.
14
+ - The project must have **recharts** installed (`npm install recharts`).
15
+
16
+ ## Data shape
17
+
18
+ - **Time-series** (line): data must be an array of `{ x: string, y: number }`. Map raw fields (e.g. `date`, `value`) to these keys before passing to the chart.
19
+ - **Categorical** (bar): data must be an array of `{ name: string, value: number }`. Map raw fields (e.g. `category`, `total`) accordingly.
20
+
21
+ ## Theming
22
+
23
+ - Use only the **theme** prop on AnalyticsChart: `red` (decline/loss), `green` (growth/gain), `neutral` (default or mixed). Do not introduce ad-hoc color schemes for these semantics.
24
+
25
+ ## Placement
26
+
27
+ - Render charts inside the existing application frame (e.g. main content or a route). Do not replace the full app shell with a single chart.