@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
  Display-only grid of typed field values for a case summary header. Renders a 2-column grid of read-only fields, each formatted according to its type (text, date, currency, phone, email, checkbox, status, operator, 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
 
@@ -13,70 +13,52 @@ Renders a responsive 2-column read-only grid of field values for a case summary
13
13
  ## Pega Metadata
14
14
 
15
15
  - **Pega Name:** `CaseSummaryFields`
16
- - **Registration key:** `CaseSummaryFields` (in `component-map.ts`)
17
- - **Does NOT use `getPConnect` directly** — receives pre-processed `theFields` array as a prop
16
+ - **Registration key:** `CaseSummaryFields` (in the project's component map)
17
+ - **Does NOT use `getPConnect` directly** — receives pre-processed `theFields` array as an input
18
18
 
19
- ## Props
19
+ ## Component Inputs
20
20
 
21
- | Prop | Type | Required | Description |
21
+ The component accepts the following inputs. Define the input contract using the project's framework conventions.
22
+
23
+ | Name | Type | Required | Description |
22
24
  | ------------ | ---------------------------------------------- | -------- | ------------------------------------------------------------------------- |
23
25
  | `theFields` | `Array<{ type: string; config: FieldConfig }>` | Yes | Array of typed field descriptors to render |
24
26
  | `status` | `string` | No | The case status value, injected at position 1 if `showStatus` is true |
25
27
  | `showStatus` | `boolean` | No | If `true`, splices a status field entry at position 1 in the fields array |
26
28
 
27
- ## Component Skeleton
28
-
29
- ```typescript
30
- import { useState, useEffect } from 'react';
31
- import isDeepEqual from 'fast-deep-equal/react';
32
- import { getDateFormatInfo } from '../../helpers/date-format-utils';
33
- import { getCurrencyOptions } from '../../field/Currency/currency-utils';
34
- import { getComponentFromRegistry } from '@pega/sdk-react';
35
- import { format } from '../../helpers/formatters';
36
- import './CaseSummaryFields.css';
37
-
38
- interface CaseSummaryFieldsProps {
39
- status?: string;
40
- showStatus?: boolean;
41
- theFields: any[];
42
- }
43
-
44
- export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
45
- const Operator = getComponentFromRegistry('Operator');
46
- const { status, showStatus, theFields } = props;
47
- const [theFieldsToRender, setFieldsToRender] = useState([]);
48
- const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<any[]>([]);
49
-
50
- // 1. getFieldValue(field) — type-based rendering switch
51
- // See Behavioral Contract #4 for the full type switch
52
-
53
- // 2. useEffect: recompute grid items when theFieldsToRender changes
54
- useEffect(() => {
55
- const items = theFieldsToRender?.map(field => {
56
- if (field.config.visibility === undefined || field.config.visibility === true)
57
- return <GridItem xs={6} key={field.config.label}>{getFieldValue(field)}</GridItem>;
58
- return null;
59
- });
60
- setFieldsAsGridItems(items);
61
- }, [theFieldsToRender]);
62
-
63
- // 3. Status injection (mutates theFields)
64
- const theFieldsModifiable = theFields;
65
- if (showStatus && theFields?.[1]?.type !== 'status') {
66
- const oStatus = { type: 'status', config: { value: status, label: 'Status' } };
67
- if (theFieldsModifiable.length < 2) theFieldsModifiable.push(oStatus);
68
- else theFieldsModifiable.splice(1, 0, oStatus);
69
- }
70
-
71
- // 4. Deep equality check before state update (prevents infinite re-render)
72
- if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {
73
- setFieldsToRender(theFieldsModifiable);
74
- }
75
-
76
- // 5. Render: 2-column grid
77
- return <GridContainer className="psdk-case-summary-fields">{theFieldsAsGridItems}</GridContainer>;
78
- }
79
- ```
29
+ ## Implementation Structure
30
+
31
+ ### Module Setup
32
+
33
+ The component imports the following dependencies:
34
+
35
+ - A state management mechanism (local state for the fields array and rendered grid items)
36
+ - A lifecycle effect to recompute grid items when the fields array changes
37
+ - A deep-equality utility (for comparing field arrays before updates)
38
+ - `getDateFormatInfo` from the project's date-format utilities for locale date format strings
39
+ - `getCurrencyOptions` from the project's currency utilities for currency formatting
40
+ - The `Operator` component retrieved from the project's component registry at runtime
41
+ - `format` from the project's formatting helpers for value formatting (phone, email, date, currency, etc.)
42
+ - Companion styles (for status field and grid styling) co-located following the project's styling convention
43
+
44
+ The component is named `CaseSummaryFields` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
45
+
46
+ ### Component Logic
47
+
48
+ The component performs these steps in order:
49
+
50
+ 1. **Resolve Operator** — retrieve the `Operator` component from the project's component registry (allows runtime override).
51
+ 2. **Receive inputs** — extract `status`, `showStatus`, and `theFields`.
52
+ 3. **Declare state** — two state variables:
53
+ - `theFieldsToRender` (array) — the final fields array after status injection.
54
+ - `theFieldsAsGridItems` (array) — the rendered grid item elements.
55
+ 4. **Define `getFieldValue(field)` helper** — a type-based rendering switch (see Behavioral Contract #4 for the full type-to-rendering table).
56
+ 5. **Lifecycle effect on `theFieldsToRender`** — when `theFieldsToRender` changes, recompute `theFieldsAsGridItems` by mapping each field:
57
+ - Skip fields where `config.visibility` exists and is `false`.
58
+ - For visible fields, render a grid cell (6 of 12 columns) keyed by `field.config.label`, containing `getFieldValue(field)`.
59
+ 6. **Status injection** — if `showStatus` is `true` AND `theFields[1].type !== 'status'`, inject a status entry at position 1 (an object with `type: 'status'` and `config` containing `value` from the `status` input and `label` set to `'Status'`). If the array has fewer than 2 items, append at the end instead.
60
+ 7. **Deep equality guard** — only update `theFieldsToRender` with the new array if it is NOT deep-equal to the current `theFieldsToRender` (prevents infinite re-render/change-detection loops).
61
+ 8. **Render** — return a grid container with class `psdk-case-summary-fields` containing `theFieldsAsGridItems` (a 2-column layout).
80
62
 
81
63
  ### FieldConfig shape (within each item in `theFields`)
82
64
 
@@ -94,19 +76,13 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
94
76
 
95
77
  ### 1. Status Field Injection
96
78
 
97
- Before rendering, if `showStatus` is `true` AND `theFields[1].type !== 'status'`, inject a status entry at position 1:
98
-
99
- ```
100
- { type: 'status', config: { value: status, label: 'Status' } }
101
- ```
102
-
103
- If the fields array has fewer than 2 items, append the status entry at the end.
79
+ Before rendering, if `showStatus` is `true` AND `theFields[1].type !== 'status'`, inject a status entry at position 1 — an object with `type` set to `'status'` and `config` containing `value` (from the `status` input) and `label` set to `'Status'`. If the fields array has fewer than 2 items, append the status entry at the end.
104
80
 
105
81
  ### 2. State Management with Deep Equality
106
82
 
107
83
  - Store the final fields array in `theFieldsToRender` state.
108
- - Only update `theFieldsToRender` if the new value is not deep-equal to the current value (use `fast-deep-equal/react`).
109
- - When `theFieldsToRender` changes, recompute `theFieldsAsGridItems` (via `useEffect`).
84
+ - Only update `theFieldsToRender` if the new value is not deep-equal to the current value (use a deep-equality utility).
85
+ - When `theFieldsToRender` changes, recompute `theFieldsAsGridItems` (via a lifecycle effect).
110
86
 
111
87
  ### 3. Field Visibility
112
88
 
@@ -116,34 +92,34 @@ Skip any field where `config.visibility` exists and is `false`.
116
92
 
117
93
  When `field.config.value` is `null` or `''` (empty):
118
94
 
119
- - For `caseoperator`: render `<Operator {...field.config} />`.
120
- - For all other types: render a read-only TextField with value `'---'` and the field label.
95
+ - For `caseoperator`: render the `Operator` component with `field.config` spread as inputs.
96
+ - For all other types: render a read-only text display element with value `'---'` and the field label.
121
97
 
122
98
  When `field.config.value` is non-empty, switch on `field.type.toLowerCase()`:
123
99
 
124
- | Type | Rendering |
125
- | --------------------------------------------- | --------------------------------------------------------------------------------------------------- |
126
- | `textinput`, `decimal`, `integer`, `dropdown` | Read-only TextField (standard, no underline) with `value` |
127
- | `checkbox` | Label: `label \|\| caption`; Value: `value ? trueLabel : falseLabel`; read-only TextField |
128
- | `status` | Read-only TextField with class `psdk-csf-status-style` (uppercase, small, bold) |
129
- | `phone` | `<a href={'tel:' + value}>` wrapping a read-only TextField with pointer cursor |
130
- | `email` | `<a href={'mailto:' + format(value, 'email')}>` wrapping a read-only TextField with pointer cursor |
131
- | `date` | Read-only TextField with `format(value, 'date', { format: dateFormatStringLong })` |
132
- | `datetime` | Read-only TextField with `format(value, 'datetime', { format: dateFormatStringLong + ' hh:mm a' })` |
133
- | `currency` | Read-only TextField with `format(value, 'currency', getCurrencyOptions(currencyISOCode))` |
134
- | `boolean`, `userreference` | Read-only TextField with `format(value, type)` |
135
- | `caseoperator` | `<Operator {...field.config} />` |
136
- | default (unknown) | `<span>{type} {value}</span>` |
137
-
138
- All TextFields use: `variant='standard'`, `slotProps.input.readOnly = true`, `slotProps.input.disableUnderline = true`.
100
+ | Type | Rendering |
101
+ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
102
+ | `textinput`, `decimal`, `integer`, `dropdown` | Read-only text display (no underline) with `value` and `label` |
103
+ | `checkbox` | Label: `label \|\| caption`; Value: `value ? trueLabel : falseLabel`; read-only text display |
104
+ | `status` | Read-only text display with class `psdk-csf-status-style` (uppercase, small, bold) |
105
+ | `phone` | `<a href={'tel:' + value}>` wrapping a read-only text display with pointer cursor |
106
+ | `email` | `<a href={'mailto:' + format(value, 'email')}>` wrapping a read-only text display with pointer cursor |
107
+ | `date` | Read-only text display with `format(value, 'date', { format: dateFormatStringLong })` |
108
+ | `datetime` | Read-only text display with `format(value, 'datetime', { format: dateFormatStringLong + ' hh:mm a' })` |
109
+ | `currency` | Read-only text display with `format(value, 'currency', getCurrencyOptions(currencyISOCode))` |
110
+ | `boolean`, `userreference` | Read-only text display with `format(value, type)` |
111
+ | `caseoperator` | Render the `Operator` component with `field.config` as inputs |
112
+ | default (unknown) | `<span>{type} {value}</span>` |
113
+
114
+ All read-only text display elements use: no underline/border, read-only state, with the field label shown above the value.
139
115
 
140
116
  ### 5. Grid Layout
141
117
 
142
- Render each visible field in `Grid size={{ xs: 6 }}` (2-column layout) inside a container `Grid` with class `psdk-case-summary-fields`.
118
+ Render each visible field in a grid cell (6 of 12 columns — 2-column layout) inside a grid container with class `psdk-case-summary-fields`.
143
119
 
144
120
  ## Visual Specifications
145
121
 
146
- Derived from `CaseSummaryFields.css`:
122
+ Derived from the component's companion styles:
147
123
 
148
124
  ### Status Field
149
125
 
@@ -173,41 +149,32 @@ Derived from `CaseSummaryFields.css`:
173
149
 
174
150
  ## Edge Cases & Special Logic
175
151
 
176
- - Use `fast-deep-equal/react` deep equality before updating `theFieldsToRender` to prevent infinite re-render loops.
152
+ - Use deep equality before updating `theFieldsToRender` to prevent infinite re-render loops.
177
153
  - Status splicing mutates `theFields` directly — ensure the original array reference is used (not a copy) when checking `theFields[1].type`.
178
154
  - Date format comes from `getDateFormatInfo().dateFormatStringLong` — defaults to locale format.
179
155
  - Currency options come from `getCurrencyOptions(field.config?.currencyISOCode)`.
180
- - The `Operator` component is retrieved via `getComponentFromRegistry('Operator')` — not imported directly. This allows runtime component override.
156
+ - The `Operator` component is retrieved from the project's component registry — not imported directly. This allows runtime component override.
181
157
  - If `theFields` is null or undefined, initialize to empty to avoid crashes.
182
158
 
183
159
  ## Dependencies
184
160
 
185
- - `getComponentFromRegistry` from `@pega/sdk-react` — to retrieve the `Operator` component at runtime
186
- - `isDeepEqual` from `fast-deep-equal/react` — for state change detection
187
- - `getDateFormatInfo` from `../../helpers/date-format-utils` — for locale date format string
188
- - `getCurrencyOptions` from `../../field/Currency/currency-utils` — for currency formatting options
189
- - `format` from `../../helpers/formatters` — for formatting phone, email, date, datetime, currency, boolean, userreference values
161
+ - The project's component registry — to retrieve the `Operator` component at runtime
162
+ - A deep-equality utility — for state change detection
163
+ - The project's date-format utility — for locale date format string
164
+ - The project's currency utility — for currency formatting options
165
+ - The project's formatting helper — for formatting phone, email, date, datetime, currency, boolean, userreference values
190
166
  - `Operator` component (resolved via registry) — for `caseoperator` type rendering
191
167
 
192
168
  ## Design System Mapping
193
169
 
194
170
  **UI control type:** 2-column grid of read-only labeled field values.
195
171
 
196
- Listed design systems are examples only.
197
-
198
- | Design System | Recommended Component |
199
- | ------------------ | ------------------------------------------------------------------------------------------------------------ |
200
- | Default (CSS only) | CSS Grid 2-column layout with label/value pairs |
201
- | MUI | `<Grid container>` with `<Grid size={{ xs: 6 }}>` cells; `<TextField variant='standard' readOnly>` per field |
202
- | Ant Design | `<Descriptions layout='vertical' column={2}>` with typed item renderers |
203
- | Chakra UI | `<SimpleGrid columns={2}>` with `<FormControl>` label/value pairs |
204
- | Shadcn/ui | 2-column grid with `<Label>` / `<p>` pairs |
205
-
206
172
  When implementing in a specific design system, map the following:
207
173
 
208
- - Read-only TextField (standard, no underline) → design system's read-only text display
209
- - Phone field → `<a href='tel:...'>` wrapper around the display
210
- - Email field → `<a href='mailto:...'>` wrapper around the display
211
- - Status field → uppercase badge/chip or styled text
212
- - `caseoperator` type → delegate to the `Operator` component
213
- - Missing/empty value → always display `'---'`
174
+ - **Grid layout** → use the DS's grid system to create a 2-column responsive layout (each cell occupies 6 of 12 columns)
175
+ - **Read-only text display** (label above value, no underline) → use the DS's form field in read-only/display mode, or a simple label/value pair with appropriate typography
176
+ - **Phone field** → wrap in an `<a href='tel:...'>` link with pointer cursor
177
+ - **Email field** → wrap in an `<a href='mailto:...'>` link with pointer cursor
178
+ - **Status field** → uppercase badge/chip or styled text (font-size: 0.75rem, bold, uppercase)
179
+ - **`caseoperator` type** → delegate to the `Operator` component from the registry
180
+ - **Missing/empty value** → always display `'---'`
@@ -1,81 +1,73 @@
1
1
  # Skill: DetailsFields
2
2
 
3
- Read-only field display component that receives an array of PConnect-aware field objects and renders each as a label/value pair. Delegates value rendering to `PConnectComponent` in DISPLAY_ONLY mode.
3
+ Read-only field display component that receives an array of PConnect-aware field objects and renders each as a label/value pair. Delegates value rendering to the PConnect bridge component in DISPLAY_ONLY mode.
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
 
9
9
  ## Component Purpose
10
10
 
11
- Renders a vertical list of read-only field name/value pairs for a details/summary panel. Each field is a PConnect-aware object. The component extracts type, label, and view config from each field's PConnect, forces the view into `readOnly + DISPLAY_ONLY` mode, and delegates rendering to `PConnectComponent`.
11
+ Renders a vertical list of read-only field name/value pairs for a details/summary panel. Each field is a PConnect-aware object. The component extracts type, label, and view config from each field's PConnect, forces the view into `readOnly + DISPLAY_ONLY` mode, and delegates rendering to the PConnect bridge component.
12
12
 
13
13
  Supports three item layouts:
14
14
 
15
15
  - **Reference type:** Renders the value directly (no label/value grid wrapper).
16
- - **React element value:** Renders value in a single full-width cell (no label).
16
+ - **Rendered component value:** Renders value in a single full-width cell (no label).
17
17
  - **Label + value pair:** Renders label in a 6-col cell and value in a 6-col cell.
18
18
 
19
19
  ## Pega Metadata
20
20
 
21
21
  - **Pega Name:** `DetailsFields`
22
- - **Registration key:** `DetailsFields` (in `component-map.ts`)
22
+ - **Registration key:** `DetailsFields` (in the project's component map)
23
23
  - **Does NOT use `getPConnect` on the component itself** — iterates `fields[]` each of which has `.getPConnect()`
24
24
 
25
- ## Props
25
+ ## Component Inputs
26
26
 
27
- | Prop | Type | Required | Description |
27
+ The component accepts the following inputs. Define the input contract using the project's framework conventions.
28
+
29
+ | Name | Type | Required | Description |
28
30
  | -------- | ------- | -------- | ----------------------------------------------------------------------------- |
29
31
  | `fields` | `any[]` | Yes | Array of PConnect-aware field objects. Each must have `.getPConnect()` method |
30
32
 
31
- ## Component Skeleton
32
-
33
- ```typescript
34
- import { createElement, isValidElement } from 'react';
35
- import { PConnectComponent } from '@pega/sdk-react';
36
- import { format } from '../../helpers/formatters';
37
-
38
- interface DetailsFieldsProps { fields: any[]; }
39
-
40
- export default function DetailsFields(props: DetailsFieldsProps) {
41
- const { fields = [] } = props;
42
- const fieldComponents: any[] = [];
43
-
44
- // 1. Build field components array
45
- fields?.forEach((field, index) => {
46
- const thePConn = field.getPConnect();
47
- const theCompType = thePConn.getComponentName().toLowerCase();
48
- const { label } = thePConn.getConfigProps();
49
- const configObj = thePConn.getReferencedView();
50
- configObj.config.readOnly = true;
51
- configObj.config.displayMode = 'DISPLAY_ONLY';
52
- if (theCompType === 'reference') configObj.config.label = thePConn.getInheritedProps()?.label;
53
- fieldComponents.push({
54
- type: theCompType, label,
55
- value: createElement(PConnectComponent, thePConn.getReferencedViewPConnect()),
56
- });
57
- });
58
-
59
- // 2. Render grid items per field
60
- return (
61
- <>
62
- {fieldComponents.map((field, index) => {
63
- if (field.type === 'reference') return field.value;
64
- if (isValidElement(field.value)) {
65
- return <GridRow key={index}><GridItem xs={12}>{field.value}</GridItem></GridRow>;
66
- }
67
- const formattedValue = field.type === 'date' ? format(field.value, 'date') : field.value;
68
- return (
69
- <GridRow key={index} style={{ padding: '4px 0' }}>
70
- <GridItem xs={6}><Label>{field.label}</Label></GridItem>
71
- <GridItem xs={6}><Value>{formattedValue || '---'}</Value></GridItem>
72
- </GridRow>
73
- );
74
- })}
75
- </>
76
- );
77
- }
78
- ```
33
+ ## Implementation Structure
34
+
35
+ ### Module Setup
36
+
37
+ The component imports the following dependencies:
38
+
39
+ - A utility to check if a value is a rendered component element (to distinguish rendered child components from plain string/primitive values)
40
+ - The project's PConnect bridge component — renders PConnect-configured children
41
+ - `format` from the project's formatting helpers — for date value formatting
42
+
43
+ The component is named `DetailsFields` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
44
+
45
+ ### Component Logic
46
+
47
+ The component receives `fields` (defaults to `[]`) as input, then performs two phases:
48
+
49
+ **Phase 1: Build field components array**
50
+
51
+ Iterate over `fields` using `forEach`. For each field:
52
+
53
+ 1. Call `field.getPConnect()` to obtain the PConnect instance (`thePConn`).
54
+ 2. Get `theCompType = thePConn.getComponentName().toLowerCase()`.
55
+ 3. Get `label` from `thePConn.getConfigProps()`.
56
+ 4. Get the referenced view config: `configObj = thePConn.getReferencedView()`.
57
+ 5. Force display-only mode: set `configObj.config.readOnly = true` and `configObj.config.displayMode = 'DISPLAY_ONLY'`.
58
+ 6. For `reference` type components: override the label with `thePConn.getInheritedProps()?.label`.
59
+ 7. Render the value by invoking the PConnect bridge component with `thePConn.getReferencedViewPConnect()` as its configuration.
60
+ 8. Push an object with `{ type, label, value }` into the field components array.
61
+
62
+ **Phase 2: Render grid items**
63
+
64
+ Return a fragment containing the mapped field components. For each field, choose the layout:
65
+
66
+ - **`type === 'reference'`** — render `field.value` directly with no grid wrapper.
67
+ - **Value is a rendered element/component** — render a grid row with a single 12-column cell containing `field.value` (full width, no label).
68
+ - **Default (primitive/string value)** — render a grid row (with `padding: 4px 0`) containing:
69
+ - A 6-column label cell with body-small text, secondary text color, `fontWeight: 400`.
70
+ - A 6-column value cell with body-small text, primary text color. Format the value using `format(value, 'date')` if `type === 'date'`, otherwise use value as-is. If the formatted value is `undefined` or empty string, display `'---'`.
79
71
 
80
72
  ## Behavioral Contract
81
73
 
@@ -89,24 +81,24 @@ For each field in `fields`:
89
81
  4. Call `configObj = thePConn.getReferencedView()` — get the referenced view config object.
90
82
  5. Set `configObj.config.readOnly = true` and `configObj.config.displayMode = 'DISPLAY_ONLY'` — forces display-only rendering.
91
83
  6. For `reference` type: override label with `thePConn.getInheritedProps().label`.
92
- 7. Render the value using `createElement(PConnectComponent, thePConn.getReferencedViewPConnect())`.
93
- 8. Push `{ type: theCompType, label, value: <React.Fragment key={index}>{renderedValue}</React.Fragment> }` into the field components array.
84
+ 7. Render the value using the PConnect bridge component with `thePConn.getReferencedViewPConnect()` as its configuration.
85
+ 8. Push `{ type: theCompType, label, value: renderedElement }` into the field components array.
94
86
 
95
87
  ### 2. Item Layout (per field component)
96
88
 
97
89
  Choose the layout based on the field:
98
90
 
99
- | Condition | Layout |
100
- | -------------------------------- | ------------------------------------------------------ |
101
- | `type === 'reference'` | Render `field.value` directly with no wrapper |
102
- | `isValidElement(field.value)` | Single 12-col cell containing `field.value` (no label) |
103
- | Default (string/primitive value) | 6-col label cell + 6-col value cell |
91
+ | Condition | Layout |
92
+ | ------------------------------------- | ------------------------------------------------------ |
93
+ | `type === 'reference'` | Render `field.value` directly with no wrapper |
94
+ | Value is a rendered element/component | Single 12-col cell containing `field.value` (no label) |
95
+ | Default (string/primitive value) | 6-col label cell + 6-col value cell |
104
96
 
105
97
  ### 3. Label/Value Grid Row
106
98
 
107
- - **Row wrapper:** `<Grid container spacing={1} style={{ padding: '4px 0px' }}>`
108
- - **Label cell:** `<Grid size={{ xs: 6 }}>` containing `<Typography variant='body2' component='span' className='fieldLabel'>{field.label}</Typography>`
109
- - **Value cell:** `<Grid size={{ xs: 6 }}>` containing `<Typography variant='body2' component='span' className='fieldValue'>{formattedValue}</Typography>`
99
+ - **Row wrapper:** a grid container with spacing and `padding: 4px 0`
100
+ - **Label cell:** 6 of 12 columns containing a body-small text element with secondary text color, `fontWeight: 400`, displaying `field.label`
101
+ - **Value cell:** 6 of 12 columns containing a body-small text element with primary text color, displaying the formatted value
110
102
 
111
103
  ### 4. Value Formatting
112
104
 
@@ -114,30 +106,30 @@ Choose the layout based on the field:
114
106
  - For all others: use value as-is.
115
107
  - If formatted value is `undefined` or `''`, display `'---'` instead.
116
108
 
117
- ### 5. React element detection
109
+ ### 5. Rendered element detection
118
110
 
119
- Use `isValidElement(field.value)` — if true, render full-width (12 cols) without label.
111
+ Use the framework's equivalent of checking if a value is a rendered/component element — if true, render full-width (12 cols) without label.
120
112
 
121
113
  ## Visual Specifications
122
114
 
123
- Derived from `DetailsFields.tsx` makeStyles:
115
+ Derived from the component's companion styles:
124
116
 
125
117
  ### Label
126
118
 
127
- | Property | Value |
128
- | ----------- | ------------------------------ |
129
- | Display | block |
130
- | Font weight | 400 |
131
- | Color | `theme.palette.text.secondary` |
132
- | Typography | `body2` (≈ 0.875rem / 14px) |
119
+ | Property | Value |
120
+ | ----------- | ------------------------------------------------------------------------------------- |
121
+ | Display | block |
122
+ | Font weight | 400 |
123
+ | Color | secondary text color (e.g. `theme.palette.text.secondary` or `var(--text-secondary)`) |
124
+ | Typography | body-small (≈ 0.875rem / 14px) |
133
125
 
134
126
  ### Value
135
127
 
136
- | Property | Value |
137
- | ----------- | ---------------------------- |
138
- | Font weight | 400 |
139
- | Color | `theme.palette.text.primary` |
140
- | Typography | `body2` (≈ 0.875rem / 14px) |
128
+ | Property | Value |
129
+ | ----------- | ------------------------------------------------------------------------------- |
130
+ | Font weight | 400 |
131
+ | Color | primary text color (e.g. `theme.palette.text.primary` or `var(--text-primary)`) |
132
+ | Typography | body-small (≈ 0.875rem / 14px) |
141
133
 
142
134
  ### Row Padding
143
135
 
@@ -150,48 +142,39 @@ Derived from `DetailsFields.tsx` makeStyles:
150
142
  - Each row: `display: grid; grid-template-columns: 1fr 1fr; padding: 4px 0; gap: 8px`.
151
143
  - Label: `font-size: 0.875rem; font-weight: 400; color: var(--text-secondary); display: block`.
152
144
  - Value: `font-size: 0.875rem; font-weight: 400; color: var(--text-primary)`.
153
- - For a React element value (full-width): render in a single column spanning full width.
145
+ - For a rendered element value (full-width): render in a single column spanning full width.
154
146
  - For a reference type: render the component directly with no wrapping grid.
155
147
 
156
148
  ## Edge Cases & Special Logic
157
149
 
158
150
  - `fields` defaults to `[]` — guard against null/undefined.
159
151
  - Reference fields bypass the label/value layout entirely — their rendered output fills the full row.
160
- - React element values (e.g., from child components) are detected with `isValidElement` and rendered full-width without a label cell.
152
+ - Rendered element values (e.g., from child components) are detected using the framework's element-check utility and rendered full-width without a label cell.
161
153
  - The `configObj` mutation (`readOnly = true`, `displayMode = 'DISPLAY_ONLY'`) happens on the object returned by `getReferencedView()` — this is intentional side-effectful configuration.
162
154
  - `format(value, 'date')` is only called for `date` type — all other types pass through raw.
163
155
 
164
156
  ## Dependencies
165
157
 
166
- - `createElement`, `isValidElement` from `react`
167
- - `PConnectComponent` from `@pega/sdk-react` — used to render each field in DISPLAY_ONLY mode
168
- - `format` from `../../helpers/formatters` — for date formatting
158
+ - The project's PConnect bridge component — used to render each field in DISPLAY_ONLY mode
159
+ - The project's formatting helper — for date formatting
160
+ - A utility to detect rendered elements (framework equivalent of checking if a value is a component/element)
169
161
  - Each `field` in `fields[]` must support `.getPConnect()` returning a PConnect object with:
170
162
  - `.getComponentName()` → string
171
163
  - `.getConfigProps()` → `{ label: string }`
172
164
  - `.getReferencedView()` → mutable config object
173
- - `.getReferencedViewPConnect()` → props object for `PConnectComponent`
165
+ - `.getReferencedViewPConnect()` → configuration for the PConnect bridge component
174
166
  - `.getInheritedProps()` → `{ label?: string }` (for reference type)
175
167
 
176
168
  ## Design System Mapping
177
169
 
178
170
  **UI control type:** Vertical list of read-only label/value field pairs with PConnect delegation.
179
171
 
180
- Listed design systems are examples only.
181
-
182
- | Design System | Recommended Component |
183
- | ------------------ | ----------------------------------------------------------------------------- |
184
- | Default (CSS only) | CSS grid 2-column rows per field pair |
185
- | MUI | `<Grid container spacing={1}>` per row with `<Typography>` label and value |
186
- | Ant Design | `<Descriptions layout='horizontal' column={1}>` with PConnect-rendered values |
187
- | Chakra UI | `<Grid templateColumns='1fr 1fr'>` rows with `<Text>` label/value |
188
- | Shadcn/ui | `<div class='grid grid-cols-2'>` rows |
189
-
190
172
  When implementing in a specific design system, map the following:
191
173
 
192
- - Label → secondary muted text, `body2` size
193
- - Value → primary text, `body2` size
194
- - Row padding → `4px 0` vertical spacing between pairs
195
- - Full-width value (React element) → single column spanning full width
196
- - Reference type → render the child component without any label wrapper
197
- - Empty value → display `'---'`
174
+ - **Grid rows** → use the DS's grid system with 2 columns (6/12 + 6/12) per label/value pair
175
+ - **Label** → secondary/muted text, body-small size (~0.875rem), `fontWeight: 400`
176
+ - **Value** → primary text, body-small size (~0.875rem), `fontWeight: 400`
177
+ - **Row padding** → `4px 0` vertical spacing between pairs
178
+ - **Full-width value (rendered element)** → single column spanning full width, no label
179
+ - **Reference type** → render the child component without any label wrapper
180
+ - **Empty value** → display `'---'`