@pega/sdk 0.0.5 → 0.0.6

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 (266) hide show
  1. package/README.md +10 -3
  2. package/dist/index.js +764 -165
  3. package/package.json +1 -1
  4. package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
  5. package/templates/react-native-sdk-reference/.prettierignore +17 -0
  6. package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
  7. package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
  8. package/templates/react-native-sdk-reference/AGENTS.md +3 -0
  9. package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
  10. package/templates/react-native-sdk-reference/README.md +56 -0
  11. package/templates/react-native-sdk-reference/app.json +40 -5
  12. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  13. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
  14. package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
  15. package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
  16. package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
  17. package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
  18. package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
  19. package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
  20. package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
  21. package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
  22. package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
  23. package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
  24. package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
  25. package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
  26. package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
  27. package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
  28. package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
  29. package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
  30. package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
  31. package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
  32. package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
  33. package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
  34. package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
  35. package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
  36. package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
  37. package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
  38. package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
  39. package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
  40. package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
  41. package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
  42. package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
  43. package/templates/react-native-sdk-reference/package.json +59 -14
  44. package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
  45. package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  46. package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
  47. package/templates/react-native-sdk-reference/sdk-config.json +31 -9
  48. package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
  49. package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
  50. package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
  51. package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
  52. package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
  53. package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
  54. package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
  55. package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
  56. package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
  57. package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
  58. package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
  59. package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
  60. package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
  61. package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
  62. package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
  63. package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
  64. package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
  65. package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
  66. package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
  67. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
  68. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
  69. package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
  70. package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
  71. package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
  72. package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
  73. package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
  74. package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
  75. package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
  76. package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
  77. package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
  78. package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
  79. package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
  80. package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
  81. package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
  82. package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
  83. package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
  84. package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
  85. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
  86. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
  87. package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
  88. package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
  89. package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
  90. package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
  91. package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
  92. package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
  93. package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
  94. package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
  95. package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
  96. package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
  97. package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
  98. package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
  99. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
  100. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
  101. package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
  102. package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
  103. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
  104. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
  105. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
  106. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
  107. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
  108. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
  109. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
  110. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
  111. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
  112. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
  113. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
  114. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
  115. package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
  116. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
  117. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
  118. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
  119. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
  120. package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
  121. package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
  122. package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
  123. package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
  124. package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
  125. package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
  126. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
  127. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
  128. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
  129. package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
  130. package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
  131. package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
  132. package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
  133. package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
  134. package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
  135. package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
  136. package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
  137. package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
  138. package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
  139. package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
  140. package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
  141. package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
  142. package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
  143. package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
  144. package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
  145. package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
  146. package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
  147. package/templates/react-native-sdk-reference/tsconfig.json +9 -8
  148. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
  149. package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
  150. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
  151. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
  152. package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
  153. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
  154. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
  155. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
  156. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
  157. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
  158. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
  159. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
  160. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
  161. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
  162. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
  163. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
  164. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
  165. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
  166. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
  167. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
  168. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
  169. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
  170. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
  171. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
  172. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
  173. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
  174. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
  175. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
  176. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
  177. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
  178. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
  179. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
  180. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
  181. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
  182. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
  183. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
  184. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
  185. package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
  186. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
  187. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
  188. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
  189. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
  190. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
  191. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
  192. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
  193. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
  194. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
  195. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
  196. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
  197. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
  198. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
  199. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
  200. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
  201. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
  202. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
  203. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
  204. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
  205. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
  206. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
  207. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
  208. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
  209. package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
  210. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
  211. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
  212. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
  213. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
  214. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
  215. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
  216. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
  217. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
  218. package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
  219. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
  220. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
  221. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
  222. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
  223. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
  224. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
  225. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
  226. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
  227. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
  228. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
  229. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
  230. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
  231. package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
  232. package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
  233. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
  234. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
  235. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
  236. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
  237. package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
  238. package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
  239. package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
  240. package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
  241. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
  242. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
  243. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
  244. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
  245. package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
  246. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
  247. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
  248. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
  249. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
  250. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
  251. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
  252. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
  253. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
  254. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
  255. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
  256. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
  257. package/templates/react-sdk-reference/package.json +1 -1
  258. package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
  259. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  260. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
  261. package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
  262. package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
  263. package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
  264. package/templates/react-native-sdk-reference/App.tsx +0 -49
  265. package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
  266. package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Collapsible or static container that groups related fields under an optional section header and instructions text.
4
4
 
5
- > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, props interface, styling patterns, and registration patterns common to ALL DSE components.
5
+ > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
6
6
 
7
7
  ---
8
8
 
@@ -19,61 +19,45 @@ Children are rendered inside a full-width inner container.
19
19
  ## Pega Metadata
20
20
 
21
21
  - **Pega Name:** `FieldGroup`
22
- - **Registration key:** `FieldGroup` (in `component-map.ts`)
23
- - **Does NOT use `getPConnect`** — receives children via `PropsWithChildren`
24
-
25
- ## Props
26
-
27
- | Prop | Type | Required | Description |
28
- | -------------- | ----------- | -------- | ----------------------------------------------------------------------- |
29
- | `children` | `ReactNode` | No | Field components to render inside the group |
30
- | `name` | `string` | No | Section heading displayed above the fields |
31
- | `collapsible` | `boolean` | No | If `true`, the header acts as a collapse/expand toggle. Default `false` |
32
- | `instructions` | `string` | No | HTML string of instruction text shown between header and fields |
33
-
34
- ## Component Skeleton
35
-
36
- ```typescript
37
- import { type PropsWithChildren, useState } from 'react';
38
-
39
- interface FieldGroupProps {
40
- name?: string;
41
- collapsible?: boolean;
42
- instructions?: string;
43
- }
44
-
45
- export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
46
- const { children, name, collapsible = false, instructions } = props;
47
- const [collapsed, setCollapsed] = useState(false);
48
-
49
- return (
50
- <OuterContainer spacing={4}>
51
- <InnerFullWidth>
52
- {/* Header */}
53
- {name && (
54
- <div className="field-margin">
55
- {collapsible ? (
56
- <span id="field-group-header" className="header-clickable"
57
- style={{ cursor: 'pointer' }} onClick={() => setCollapsed(c => !c)}>
58
- {collapsed ? <ArrowRightIcon /> : <ArrowDownIcon />}
59
- <b>{name}</b>
60
- </span>
61
- ) : (
62
- <b>{name}</b>
63
- )}
64
- </div>
65
- )}
66
- {/* Instructions (skip if === 'none') */}
67
- {instructions && instructions !== 'none' && (
68
- <div className="instruction-text" dangerouslySetInnerHTML={{ __html: instructions }} />
69
- )}
70
- {/* Children (hidden when collapsed) */}
71
- {!collapsed && <div style={{ width: '100%' }}>{children}</div>}
72
- </InnerFullWidth>
73
- </OuterContainer>
74
- );
75
- }
76
- ```
22
+ - **Registration key:** `FieldGroup` (in the project's component map)
23
+ - **Does NOT use `getPConnect`** — receives children via framework's content projection mechanism
24
+
25
+ ## Component Inputs
26
+
27
+ The component accepts the following inputs. Define the input contract using the project's framework conventions.
28
+
29
+ | Name | Type | Required | Description |
30
+ | -------------- | ------------------ | -------- | ----------------------------------------------------------------------- |
31
+ | `children` | renderable content | No | Field components to render inside the group |
32
+ | `name` | `string` | No | Section heading displayed above the fields |
33
+ | `collapsible` | `boolean` | No | If `true`, the header acts as a collapse/expand toggle. Default `false` |
34
+ | `instructions` | `string` | No | HTML string of instruction text shown between header and fields |
35
+
36
+ ## Implementation Structure
37
+
38
+ ### Module Setup
39
+
40
+ The component accepts children via the framework's content projection mechanism. It maintains local state for the collapsed/expanded toggle. It does NOT import any Pega SDK modules.
41
+
42
+ The component is named `FieldGroup` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
43
+
44
+ ### Component Logic
45
+
46
+ The component receives `children`, `name`, `collapsible` (defaults to `false`), and `instructions` as inputs. It maintains a `collapsed` boolean state initialized to `false` (expanded). The render tree is:
47
+
48
+ 1. **Outer container** — a Grid container with `spacing={4}` and `justifyContent: 'space-between'`.
49
+ 2. **Inner full-width wrapper** — a single Grid item at full width containing all content.
50
+ 3. **Header section** (conditional — only if `name` is provided):
51
+ - Wrapped in a div with margin/padding styling (top/bottom padding of 1 spacing unit, top margin of 1 spacing unit).
52
+ - **Non-collapsible** (`collapsible === false`): render `<b>{name}</b>` as static bold text.
53
+ - **Collapsible** (`collapsible === true`): render a clickable `<span>` with `id="field-group-header"`, flex layout (`display: flex; align-items: center; gap: 5px`), and `cursor: pointer`. Inside the span:
54
+ - A directional arrow icon: **right-pointing arrow** when `collapsed === true`, **down-pointing arrow** when `collapsed === false`.
55
+ - Bold name text: `<b>{name}</b>`.
56
+ - Clicking the span toggles `collapsed` state.
57
+ 4. **Instructions section** (conditional — only if `instructions` is provided AND is not the literal string `'none'`):
58
+ - Render a div with class `instruction-text` (padding: `5px 0`) using the framework's trusted HTML injection mechanism.
59
+ 5. **Children section** (conditional — only if `collapsed === false`):
60
+ - Render children inside a full-width container div (`width: 100%`) wrapped in a Grid container.
77
61
 
78
62
  ## Behavioral Contract
79
63
 
@@ -86,37 +70,37 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
86
70
  - A directional arrow icon: **right arrow** when `collapsed === true`, **down arrow** when `collapsed === false`.
87
71
  - The bold name text beside the arrow.
88
72
  - Clicking the span toggles `collapsed`.
89
- 3. **Instructions:** If `instructions` is provided AND is not the string `'none'`, render it with `dangerouslySetInnerHTML={{ __html: instructions }}`.
73
+ 3. **Instructions:** If `instructions` is provided AND is not the string `'none'`, render it using the framework's trusted HTML injection mechanism.
90
74
  4. **Children:** Render children inside a full-width div. If `collapsed` is `true`, do NOT render children (or instructions).
91
75
  5. **Header cursor:** When `collapsible` is `true`, the header span uses `cursor: pointer`. When `collapsible` is `false`, cursor is `auto`.
92
76
  6. **Layout:** All content is wrapped in a `Grid container` with `spacing={4}` and `justifyContent='space-between'`. The name row and children are inside a single inner `Grid` at full width.
93
77
 
94
78
  ## Visual Specifications
95
79
 
96
- Derived from `FieldGroup.tsx` makeStyles:
80
+ Derived from the component's companion styles:
97
81
 
98
82
  ### Outer Container
99
83
 
100
- | Property | Value |
101
- | -------- | ------------------------------- |
102
- | Spacing | 4 units (≈ 32px in MUI default) |
84
+ | Property | Value |
85
+ | -------- | ---------------- |
86
+ | Spacing | 4 units (≈ 32px) |
103
87
 
104
88
  ### Component Root Margins
105
89
 
106
- | Property | Value |
107
- | ------------- | -------------------------- |
108
- | Margin right | `theme.spacing(1)` (≈ 8px) |
109
- | Margin left | `theme.spacing(1)` |
110
- | Margin top | `theme.spacing(1)` |
111
- | Margin bottom | `theme.spacing(1)` |
90
+ | Property | Value |
91
+ | ------------- | ---------------------- |
92
+ | Margin right | 1 spacing unit (≈ 8px) |
93
+ | Margin left | 1 spacing unit |
94
+ | Margin top | 1 spacing unit |
95
+ | Margin bottom | 1 spacing unit |
112
96
 
113
97
  ### Field Margin (name row)
114
98
 
115
- | Property | Value |
116
- | -------------- | ------------------ |
117
- | Padding top | `theme.spacing(1)` |
118
- | Padding bottom | `theme.spacing(1)` |
119
- | Margin top | `theme.spacing(1)` |
99
+ | Property | Value |
100
+ | -------------- | -------------- |
101
+ | Padding top | 1 spacing unit |
102
+ | Padding bottom | 1 spacing unit |
103
+ | Margin top | 1 spacing unit |
120
104
 
121
105
  ### Header Row (collapsible)
122
106
 
@@ -154,25 +138,16 @@ Derived from `FieldGroup.tsx` makeStyles:
154
138
  ## Dependencies
155
139
 
156
140
  - No Pega SDK imports required (no `getPConnect`)
157
- - Arrow icons: `KeyboardArrowRightIcon` / `KeyboardArrowDownIcon` from `@mui/icons-material` (MUI only) — use equivalent icons or Unicode characters in non-MUI implementations
141
+ - Arrow icons: use a right-pointing arrow icon (collapsed) and a down-pointing arrow icon (expanded) from the chosen design system's icon set, or use Unicode characters (`▶`/`▼` or `›`/`⌄`)
158
142
 
159
143
  ## Design System Mapping
160
144
 
161
145
  **UI control type:** Collapsible section container with label, instructions, and children.
162
146
 
163
- Listed design systems are examples only.
164
-
165
- | Design System | Recommended Component |
166
- | ------------------ | ----------------------------------------------------------------------- |
167
- | Default (CSS only) | `<div>` with toggled `display: none` on children, `<b>` header |
168
- | MUI | Grid container with `KeyboardArrowRight/Down` icons for collapse toggle |
169
- | Ant Design | `<Collapse>` or `<Card>` with collapsible panels |
170
- | Chakra UI | `<Accordion>` or manual `<Box>` with toggle state |
171
- | Shadcn/ui | `<Collapsible>` + `<CollapsibleTrigger>` + `<CollapsibleContent>` |
172
-
173
147
  When implementing in a specific design system, map the following:
174
148
 
175
- - `collapsed` toggle → design system's collapse/expand state or controlled component
176
- - Arrow direction → visual indicator of expand/collapse state (chevron or arrow icon)
177
- - `instructions` HTML → design system's `dangerouslySetInnerHTML` or rich content slot
178
- - Full-width children → ensure children container spans the full group width
149
+ - **Collapse toggle** → use the DS's collapse/accordion component if available, or implement manually with local state toggling visibility of the children section
150
+ - **Arrow direction icon** → use the DS's chevron/arrow icon that points right when collapsed and down when expanded
151
+ - **`instructions` HTML** → render as raw/trusted HTML content using the framework's mechanism for injecting HTML strings
152
+ - **Full-width children** → ensure the children container spans the full group width
153
+ - **Header click** → when `collapsible` is `true`, the entire header row (icon + name) is clickable and toggles the collapsed state
@@ -2,7 +2,7 @@
2
2
 
3
3
  Repeating list of named field groups, each with its own children. Supports per-item delete and a global "+Add" link at the bottom.
4
4
 
5
- > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, props interface, styling patterns, and registration patterns common to ALL DSE components.
5
+ > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
6
6
 
7
7
  ---
8
8
 
@@ -13,66 +13,56 @@ Renders a vertical list of field group items. Each item has a bold name header,
13
13
  ## Pega Metadata
14
14
 
15
15
  - **Pega Name:** `FieldGroupList`
16
- - **Registration key:** `FieldGroupList` (in `component-map.ts`)
17
- - **Does NOT use `getPConnect`** — receives all data as direct props
18
-
19
- ## Props
20
-
21
- | Prop | Type | Required | Description |
22
- | ---------- | ---------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------- |
23
- | `items` | `Array<{ name: string; id: string; children: ReactNode }>` | Yes | List of field group items to render |
24
- | `onDelete` | `(id: string) => void` | No | Called with the item's `id` when the delete button is clicked. If not provided, no delete button is shown |
25
- | `onAdd` | `() => void` | No | Called when the "+Add" link is clicked. If not provided, no add link or dividers are shown |
26
-
27
- ## Component Skeleton
28
-
29
- ```typescript
30
- import { Utils } from '../../helpers/utils';
31
-
32
- interface FieldGroupListProps {
33
- items: Array<{ name: string; id: string; children: any }>;
34
- onDelete?: (id: string) => void;
35
- onAdd?: () => void;
36
- }
37
-
38
- export default function FieldGroupList(props: FieldGroupListProps) {
39
- const trashIcon = Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl());
40
-
41
- return (
42
- <OuterContainer spacing={4}>
43
- <InnerFullWidth>
44
- <InnerGrid spacing={1}>
45
- {props.items.map(item => (
46
- <FullWidthItem key={item.name}>
47
- <b>{item.name}</b>
48
- {props.onDelete && (
49
- <button type="button" style={{ float: 'right' }} className="psdk-utility-button"
50
- id={`delete-row-${item.id}`} aria-label="Delete Row"
51
- onClick={() => props.onDelete(item.id)}>
52
- <img className="psdk-utility-card-action-svg-icon" src={trashIcon} />
53
- </button>
54
- )}
55
- {item.children}
56
- <br />
57
- {props.onAdd && <><Divider /><br /></>}
58
- </FullWidthItem>
59
- ))}
60
- {props.onAdd && (
61
- <LinkButton onClick={props.onAdd} style={{ cursor: 'pointer' }}>+Add</LinkButton>
62
- )}
63
- </InnerGrid>
64
- </InnerFullWidth>
65
- </OuterContainer>
66
- );
67
- }
68
- ```
16
+ - **Registration key:** `FieldGroupList` (in the project's component map)
17
+ - **Does NOT use `getPConnect`** — receives all data as direct inputs
18
+
19
+ ## Component Inputs
20
+
21
+ The component accepts the following inputs. Define the input contract using the project's framework conventions.
22
+
23
+ | Name | Type | Required | Description |
24
+ | ---------- | ------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------- |
25
+ | `items` | `Array<{ name: string; id: string; children: renderable content }>` | Yes | List of field group items to render |
26
+ | `onDelete` | `(id: string) => void` | No | Called with the item's `id` when the delete button is clicked. If not provided, no delete button is shown |
27
+ | `onAdd` | `() => void` | No | Called when the "+Add" link is clicked. If not provided, no add link or dividers are shown |
28
+
29
+ ## Implementation Structure
30
+
31
+ ### Module Setup
32
+
33
+ The component uses the project's utility helper to resolve the trash icon path. It does NOT import any Pega SDK modules.
34
+
35
+ The component is named `FieldGroupList` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
36
+
37
+ ### Component Logic
38
+
39
+ The component receives `items`, `onDelete`, and `onAdd` as inputs. At the top of the logic, resolve the trash icon source: call `Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl())` and store the result.
40
+
41
+ The render tree is:
42
+
43
+ 1. **Outer container** — a grid container with spacing of 4 units (≈32px) and `justifyContent: 'space-between'`.
44
+ 2. **Inner full-width wrapper** — a single grid cell at full width.
45
+ 3. **Inner grid** — a grid container with spacing of 1 unit (≈8px), containing the iterated items.
46
+ 4. **Item iteration** — for each item in `items`, render a full-width grid cell keyed by `item.name`:
47
+ - Render `<b>{item.name}</b>` as the item header.
48
+ - **Delete button** (conditional — only if `onDelete` is provided):
49
+ - Floated right (`float: right`).
50
+ - `type="button"`, `id` set to `"delete-row-{item.id}"`, `aria-label="Delete Row"`.
51
+ - Class: `psdk-utility-button`.
52
+ - On click: call `onDelete(item.id)`.
53
+ - Contains an `<img>` with class `psdk-utility-card-action-svg-icon` and `src` set to the resolved trash icon path.
54
+ - Render `{item.children}` (the field group content).
55
+ - Render a `<br />` for spacing.
56
+ - **Divider** (conditional — only if `onAdd` is provided): render a horizontal divider element followed by another `<br />`.
57
+ 5. **Add link** (conditional — only if `onAdd` is provided):
58
+ - After all items, render a clickable link with text `"+Add"`, `cursor: pointer`, underline on hover, and click handler wired to `onAdd`.
69
59
 
70
60
  ## Behavioral Contract
71
61
 
72
- 1. Render a `Grid container` with `spacing={4}` and `justifyContent='space-between'` as the outer wrapper.
73
- 2. Inside, render a full-width inner Grid with `spacing={1}`.
74
- 3. For **each item** in `props.items`:
75
- - Render a full-width `Grid` keyed by `item.name`.
62
+ 1. Render a grid container with spacing of 4 units (≈32px) and `justifyContent='space-between'` as the outer wrapper.
63
+ 2. Inside, render a full-width inner grid with spacing of 1 unit (≈8px).
64
+ 3. For **each item** in `items`:
65
+ - Render a full-width grid cell keyed by `item.name`.
76
66
  - Render `<b>{item.name}</b>` as the item header.
77
67
  - If `onDelete` is provided, render a delete button:
78
68
  - Floated right.
@@ -83,12 +73,12 @@ export default function FieldGroupList(props: FieldGroupListProps) {
83
73
  - Image class: `psdk-utility-card-action-svg-icon`.
84
74
  - Render `{item.children}`.
85
75
  - Render `<br />`.
86
- - If `onAdd` is provided: render `<Divider />`, then `<br />`.
87
- 4. After all items, if `onAdd` is provided, render a `<Link>` (or `<a>`) with text `'+Add'`, `cursor: pointer`, and `onClick={onAdd}`.
76
+ - If `onAdd` is provided: render a horizontal divider, then `<br />`.
77
+ 4. After all items, if `onAdd` is provided, render a clickable link element with text `'+Add'`, `cursor: pointer`, and click handler calling `onAdd`.
88
78
 
89
79
  ## Visual Specifications
90
80
 
91
- Derived from `FieldGroupList.tsx`:
81
+ Derived from the component source:
92
82
 
93
83
  ### Outer Layout
94
84
 
@@ -131,26 +121,16 @@ Derived from `FieldGroupList.tsx`:
131
121
 
132
122
  ## Dependencies
133
123
 
134
- - `Utils` from `../../helpers/utils` — for `getImageSrc` and `getSDKStaticConentUrl` (used only for the trash icon)
124
+ - The project's `Utils` helper — for `getImageSrc` and `getSDKStaticConentUrl` (used only for the trash icon)
135
125
  - No Pega SDK `getPConnect` imports required
136
126
 
137
127
  ## Design System Mapping
138
128
 
139
129
  **UI control type:** Repeating list of named groups with optional delete and add actions.
140
130
 
141
- Listed design systems are examples only.
142
-
143
- | Design System | Recommended Component |
144
- | ------------------ | --------------------------------------------------------------------- |
145
- | Default (CSS only) | Flex column layout with `<hr>` divider and `<button>` delete |
146
- | MUI | `<Grid container>` items with `<Divider>` and `<Link>` for "+Add" |
147
- | Ant Design | `<List>` items with `<Divider>` and `<Button type='link'>` for "+Add" |
148
- | Chakra UI | `<VStack>` with `<Divider>` and `<Button variant='link'>` |
149
- | Shadcn/ui | `<div>` flex column with `<Separator>` and a link button |
150
-
151
131
  When implementing in a specific design system, map the following:
152
132
 
153
- - Delete button → icon button or `danger` variant button placed at the item top-right
154
- - Divider between items → `<Divider>` / `<hr>` (only when `onAdd` is present)
155
- - "+Add" link → a text link / `Button variant='link'` that calls `onAdd`
156
- - Trash icon → design system's delete icon or an SVG
133
+ - **Delete button** → use the DS's icon button or danger-variant button placed at the item top-right. Use a trash/delete icon from the DS's icon set.
134
+ - **Divider between items** → use the DS's horizontal divider/separator component (only when `onAdd` is present)
135
+ - **"+Add" link** → use the DS's link button or text-variant button that calls `onAdd`
136
+ - **Trash icon** → use the DS's delete/trash icon, or fall back to the SDK's `Utils.getImageSrc('trash', ...)` path
@@ -2,7 +2,7 @@
2
2
 
3
3
  Single field-value pair display component. Renders a label and value in either an inline (side-by-side) or stacked layout. Also used as a display mode renderer by field components (e.g., `TextInput`, `Dropdown`, etc.).
4
4
 
5
- > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, props interface, styling patterns, and registration patterns common to ALL DSE components.
5
+ > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
6
6
 
7
7
  ---
8
8
 
@@ -18,63 +18,48 @@ When no name is provided, only the value is rendered at full width. Used directl
18
18
  ## Pega Metadata
19
19
 
20
20
  - **Pega Name:** `FieldValueList`
21
- - **Registration key:** `FieldValueList` (in `component-map.ts`)
22
- - **Does NOT use `getPConnect`** — receives all data as direct props
21
+ - **Registration key:** `FieldValueList` (in the project's component map)
22
+ - **Does NOT use `getPConnect`** — receives all data as direct inputs
23
23
 
24
- ## Props
24
+ ## Component Inputs
25
25
 
26
- | Prop | Type | Required | Description |
26
+ The component accepts the following inputs. Define the input contract using the project's framework conventions.
27
+
28
+ | Name | Type | Required | Description |
27
29
  | --------- | --------- | -------- | ----------------------------------------------------- |
28
30
  | `name` | `string` | No | Field label. If omitted, only the value is rendered |
29
31
  | `value` | `any` | Yes | Field value to display |
30
32
  | `variant` | `string` | No | Layout: `'inline'` (default) or `'stacked'` |
31
33
  | `isHtml` | `boolean` | No | If `true`, render value as raw HTML (default `false`) |
32
34
 
33
- ## Component Skeleton
34
-
35
- ```typescript
36
- interface FieldValueListProps {
37
- name?: string;
38
- value: any;
39
- variant?: string;
40
- isHtml?: boolean;
41
- }
42
-
43
- export default function FieldValueList({ name, value, variant, isHtml = false }: FieldValueListProps) {
44
- // 1. Fallback for empty value
45
- const formattedValue = (value === undefined || value === '') ? '---' : value;
46
-
47
- // 2. No-name case: render value only at full width
48
- if (!name) {
49
- const typography = variant === 'stacked' ? 'h6' : 'body2';
50
- return isHtml
51
- ? <ValueContainer typography={typography} dangerouslySetInnerHTML={{ __html: formattedValue }} />
52
- : <ValueContainer typography={typography}>{formattedValue}</ValueContainer>;
53
- }
54
-
55
- // 3. Stacked variant: label on top, larger value below
56
- if (variant === 'stacked') {
57
- return (
58
- <Row direction="column">
59
- <Label style={{ paddingBottom: 0 }}>{name}</Label>
60
- {isHtml
61
- ? <Value typography="h6" style={{ paddingTop: 0 }} dangerouslySetInnerHTML={{ __html: formattedValue }} />
62
- : <Value typography="h6" style={{ paddingTop: 0 }}>{formattedValue}</Value>}
63
- </Row>
64
- );
65
- }
66
-
67
- // 4. Inline variant (default): label 4 cols, value 8 cols
68
- return (
69
- <Row>
70
- <Label xs={4}>{name}</Label>
71
- {isHtml
72
- ? <Value xs={8} dangerouslySetInnerHTML={{ __html: formattedValue }} />
73
- : <Value xs={8}>{formattedValue}</Value>}
74
- </Row>
75
- );
76
- }
77
- ```
35
+ ## Implementation Structure
36
+
37
+ ### Module Setup
38
+
39
+ The component does NOT import any Pega SDK modules — all data arrives via direct inputs. It uses a grid layout and text elements from the chosen design system.
40
+
41
+ The component is named `FieldValueList` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
42
+
43
+ ### Component Logic
44
+
45
+ The component receives `name`, `value`, `variant` (defaults to `'inline'`), and `isHtml` (defaults to `false`) as inputs, then follows this rendering logic:
46
+
47
+ 1. **Empty value fallback** — if `value` is `undefined` or an empty string (`''`), substitute with the placeholder string `'---'`.
48
+
49
+ 2. **No-name path** — if `name` is not provided (falsy), render only the value at full width (12 columns):
50
+ - Use heading-6 text (≈1.25rem, weight 500) if `variant === 'stacked'`, otherwise use body-small text (≈0.875rem).
51
+ - If `isHtml` is true, render value as raw HTML.
52
+ - Return early (do not render a label).
53
+
54
+ 3. **Stacked variant path** — if `variant === 'stacked'`, render a column-direction layout:
55
+ - **Label row:** full-width (12 columns), with `paddingBottom: 0` to sit tight above the value. Text style: body-small (≈0.875rem), secondary text color, `fontWeight: 400`.
56
+ - **Value row:** full-width (12 columns), with `paddingTop: 0` to sit tight below the label. Text style: heading-6 (≈1.25rem, weight 500, larger/more prominent). If `isHtml`, render as raw HTML.
57
+
58
+ 4. **Inline variant path** (default) — render a side-by-side row layout:
59
+ - **Label cell:** occupies 4 of 12 columns. Text style: body-small (≈0.875rem), secondary text color, `fontWeight: 400`. Contains `name`.
60
+ - **Value cell:** occupies 8 of 12 columns (or 12 if no name). Text style: body-small (≈0.875rem), primary text color. If `isHtml`, render as raw HTML.
61
+
62
+ 5. **Layout wrapper** — all variants render inside a container row (Grid container) with `spacing={4}` and `justifyContent: 'space-between'`.
78
63
 
79
64
  ## Behavioral Contract
80
65
 
@@ -83,35 +68,35 @@ export default function FieldValueList({ name, value, variant, isHtml = false }:
83
68
  3. **Inline variant** (default — `variant !== 'stacked'`):
84
69
  - Label column: 4 of 12 columns.
85
70
  - Value column: 8 of 12 columns (or 12 if no name).
86
- - Label: secondary text color, `body2` typography, `fontWeight: 400`.
87
- - Value: primary text color, `body2` typography.
71
+ - Label: secondary text color, body-small text (≈0.875rem), `fontWeight: 400`.
72
+ - Value: primary text color, body-small text (≈0.875rem).
88
73
  4. **Stacked variant** (`variant === 'stacked'`):
89
74
  - Label column: 12 of 12, `paddingBottom: 0` (label sits tight above value).
90
75
  - Value column: 12 of 12, `paddingTop: 0` (value sits tight below label).
91
- - Label: secondary text color, `body2` typography, `fontWeight: 400`.
92
- - Value: primary text color, **`h6` typography** (larger / more prominent than inline).
93
- 5. **HTML rendering:** If `isHtml` is `true`, wrap value in a `<div dangerouslySetInnerHTML={{ __html: formattedValue }}>`. The formatted value (with `'---'` fallback) is passed to `__html`.
76
+ - Label: secondary text color, body-small text (≈0.875rem), `fontWeight: 400`.
77
+ - Value: primary text color, **heading-6 text** (≈1.25rem, weight 500 — larger / more prominent than inline).
78
+ 5. **HTML rendering:** If `isHtml` is `true`, render the formatted value as raw HTML content using the framework's mechanism for injecting HTML strings. The formatted value (with `'---'` fallback) is passed as the HTML content.
94
79
  6. **Layout wrapper:** Render everything inside a container row with space-between justification and consistent spacing.
95
80
 
96
81
  ## Visual Specifications
97
82
 
98
- Derived from `FieldValueList.tsx` makeStyles:
83
+ Derived from the component's companion styles:
99
84
 
100
85
  ### Label
101
86
 
102
- | Property | Value |
103
- | ----------- | ----------------------------------------------------- |
104
- | Font weight | 400 |
105
- | Color | `theme.palette.text.secondary` (muted/secondary text) |
106
- | Typography | `body2` (≈ 0.875rem / 14px) |
87
+ | Property | Value |
88
+ | ----------- | ------------------------------ |
89
+ | Font weight | 400 |
90
+ | Color | secondary text color (muted) |
91
+ | Text size | body-small (≈ 0.875rem / 14px) |
107
92
 
108
93
  ### Value
109
94
 
110
- | Property | Value |
111
- | -------------------- | ------------------------------------------- |
112
- | Color | `theme.palette.text.primary` (default text) |
113
- | Typography (inline) | `body2` (≈ 0.875rem / 14px) |
114
- | Typography (stacked) | `h6` (≈ 1.25rem / 20px, weight 500) |
95
+ | Property | Value |
96
+ | ------------------- | ---------------------------------------- |
97
+ | Color | primary text color (default) |
98
+ | Text size (inline) | body-small (≈ 0.875rem / 14px) |
99
+ | Text size (stacked) | heading-6 (≈ 1.25rem / 20px, weight 500) |
115
100
 
116
101
  ### Padding Adjustments (stacked only)
117
102
 
@@ -131,10 +116,10 @@ Derived from `FieldValueList.tsx` makeStyles:
131
116
 
132
117
  ## Edge Cases & Special Logic
133
118
 
134
- - `value` can be any type (string, number, boolean, React element). Render it as-is unless it's empty/undefined.
135
- - When `isHtml` is `true`, set the raw HTML from the formatted value — do NOT sanitize (the caller is responsible). Ensure value is a string before passing to `dangerouslySetInnerHTML`.
136
- - When `variant` is `'stacked'` and `name` is absent, render value at 12 cols with `h6` typography.
137
- - When `variant` is `'inline'` and `name` is absent, render value at 12 cols with `body2` typography.
119
+ - `value` can be any type (string, number, boolean, rendered element). Render it as-is unless it's empty/undefined.
120
+ - When `isHtml` is `true`, render the raw HTML from the formatted value using the framework's HTML injection mechanism — do NOT sanitize (the caller is responsible). Ensure value is a string before injecting.
121
+ - When `variant` is `'stacked'` and `name` is absent, render value at 12 cols with heading-6 text.
122
+ - When `variant` is `'inline'` and `name` is absent, render value at 12 cols with body-small text.
138
123
 
139
124
  ## Dependencies
140
125
 
@@ -145,20 +130,11 @@ Derived from `FieldValueList.tsx` makeStyles:
145
130
 
146
131
  **UI control type:** Read-only field label/value display pair.
147
132
 
148
- Listed design systems are examples only.
149
-
150
- | Design System | Recommended Component |
151
- | ------------------ | ------------------------------------------------------------------------------------ |
152
- | Default (CSS only) | `<div class='field-value-inline'>` or `<div class='field-value-stacked'>` with CSS |
153
- | MUI | `<Grid container>` with `<Typography>` for label and value |
154
- | Ant Design | `<Descriptions>` item, or `<Typography.Text type='secondary'>` + `<Typography.Text>` |
155
- | Chakra UI | `<Stack direction='row'>` (inline) or `<Stack spacing={0}>` (stacked) |
156
- | Shadcn/ui | Custom label/value pair with Tailwind flex utilities |
157
-
158
133
  When implementing in a specific design system, map the following:
159
134
 
160
- - Label → secondary/muted text style
161
- - Value inline → same size as label
162
- - Value stacked → larger typography (h6 equivalent)
163
- - Empty value → always display `'---'` (never show blank)
164
- - `isHtml={true}` → design system's `dangerouslySetInnerHTML` or `innerHTML` equivalent
135
+ - **Label** → secondary/muted text style (body-small size)
136
+ - **Value inline** → same size as label (body-small), primary text color
137
+ - **Value stacked** → larger text (heading-6 equivalent, ≈1.25rem, weight 500)
138
+ - **Empty value** → always display `'---'` (never show blank)
139
+ - **`isHtml` = true** → use the framework's mechanism for rendering raw HTML content
140
+ - **Grid layout** → use the DS's grid system with 4/8 column split (inline) or 12/12 stacked columns