@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
@@ -1,219 +1,115 @@
1
1
  # Skill: Field Components
2
2
 
3
- Create or replace field components (form inputs) in the react-sdk-reference application. Field components render individual form controls that bind to Pega case properties.
3
+ Create or replace field components (form inputs) in the project. Field components render individual form controls that bind to Pega case properties.
4
4
 
5
5
  ---
6
6
 
7
7
  ## Architecture Overview
8
8
 
9
- ```
10
- src/components/field/<ComponentName>/
11
- ├── <ComponentName>.tsx # Component implementation
12
- ├── index.tsx # Re-export: export { default } from './<ComponentName>'
13
- └── config-ext.json # Metadata (name, label, description, type, subtype)
14
- ```
9
+ Each field component lives in its own folder under the project's field components directory, named after the component. The folder contains:
15
10
 
16
- Components are registered in `src/components/component-map.ts` and resolved at runtime via `getComponentFromRegistry` from `@pega/sdk-react`.
11
+ | File | Purpose |
12
+ | ---------------------------- | --------------------------------------------------------------- |
13
+ | Component implementation | The component's logic and markup |
14
+ | Re-export module | Re-exports the component as the folder's default export |
15
+ | Metadata (`config-ext.json`) | Registration metadata (name, label, description, type, subtype) |
16
+
17
+ Components are registered in the project's component map and resolved at runtime via the project's component registry.
17
18
 
18
19
  ---
19
20
 
20
- ## Props Interface
21
-
22
- All field components extend `PConnFieldProps` from `src/types/PConnProps.d.ts`:
23
-
24
- ```typescript
25
- import type { PConnFieldProps } from '../../../types/PConnProps';
26
-
27
- interface PConnFieldProps extends PConnProps {
28
- label: string; // Field label text
29
- required: boolean; // Whether the field is required
30
- disabled: boolean; // Whether the field is disabled
31
- value?: string; // Current field value from the store
32
- validatemessage: string; // Validation error message
33
- status?: string; // 'error' | 'warning' | undefined
34
- onChange: any; // Change handler (wired by platform)
35
- onBlur?: any; // Blur handler (wired by platform)
36
- readOnly: boolean; // Whether the field is read-only
37
- testId: string; // Test identifier for automation
38
- helperText: string; // Helper/hint text below the field
39
- displayMode?: string; // 'DISPLAY_ONLY' | 'STACKED_LARGE_VAL' | undefined
40
- hideLabel: boolean; // Whether to hide the label
41
- placeholder?: string; // Placeholder text
42
- }
43
-
44
- interface PConnProps {
45
- getPConnect: () => typeof PConnect; // Returns the PConnect API object
46
- }
47
- ```
48
-
49
- Extend `PConnFieldProps` for component-specific additional props:
50
-
51
- ```typescript
52
- interface MyFieldProps extends PConnFieldProps {
53
- fieldMetadata?: any;
54
- maxLength?: number;
55
- }
56
- ```
21
+ ## Input Contract
22
+
23
+ All field components extend the project's **field input contract**. The field input contract itself extends a **base component interface**, which provides a single `getPConnect` accessor function (returns the PConnect API object).
24
+
25
+ The field input contract defines these fields:
26
+
27
+ | Field | Type | Description |
28
+ | ----------------- | ------------------- | ------------------------------------------------------ |
29
+ | `label` | `string` | Field label text |
30
+ | `required` | `boolean` | Whether the field is required |
31
+ | `disabled` | `boolean` | Whether the field is disabled |
32
+ | `value` | `string` (optional) | Current field value from the store |
33
+ | `validatemessage` | `string` | Validation error message |
34
+ | `status` | `string` (optional) | `'error'` \| `'warning'` \| undefined |
35
+ | `onChange` | `any` | Change handler (wired by platform) |
36
+ | `onBlur` | `any` (optional) | Blur handler (wired by platform) |
37
+ | `readOnly` | `boolean` | Whether the field is read-only |
38
+ | `testId` | `string` | Test identifier for automation |
39
+ | `helperText` | `string` | Helper/hint text below the field |
40
+ | `displayMode` | `string` (optional) | `'DISPLAY_ONLY'` \| `'STACKED_LARGE_VAL'` \| undefined |
41
+ | `hideLabel` | `boolean` | Whether to hide the label |
42
+ | `placeholder` | `string` (optional) | Placeholder text |
43
+
44
+ Extend the field input contract for component-specific additional inputs (e.g., a component that needs `fieldMetadata` and `maxLength` would extend the field input contract with those two additional optional fields).
57
45
 
58
46
  ---
59
47
 
60
48
  ## Implementation Pattern
61
49
 
62
- ### Abstract Field Component Template
63
-
64
- This template is design-system agnostic. It defines the **behavioral skeleton** every field component must follow. Replace the `// [DS RENDER]` section with your design system's input primitive — see the "Design System Adaptation" section below for guidance.
65
-
66
- ```typescript
67
- import { useState, useEffect } from 'react';
68
- // Import your design system component here:
69
- // e.g. import { Input } from 'antd';
70
- // e.g. import { Input } from '@chakra-ui/react';
71
-
72
- import handleEvent from '../../helpers/event-utils';
73
- import { getComponentFromRegistry } from '@pega/sdk-react';
74
- import type { PConnFieldProps } from '@pega/sdk-react';
75
-
76
- interface MyFieldProps extends PConnFieldProps {
77
- // Add component-specific props here
78
- }
79
-
80
- export default function MyField(props: MyFieldProps) {
81
- const FieldValueList = getComponentFromRegistry('FieldValueList');
82
-
83
- const {
84
- getPConnect,
85
- label,
86
- required,
87
- disabled,
88
- value = '',
89
- validatemessage,
90
- status,
91
- readOnly,
92
- testId,
93
- helperText,
94
- displayMode,
95
- hideLabel,
96
- placeholder
97
- } = props;
98
-
99
- const pConn = getPConnect();
100
- const actions = pConn.getActionsApi();
101
- const propName = (pConn.getStateProps() as any).value;
102
- const helperTextToDisplay = validatemessage || helperText;
103
-
104
- // 1. Track input value locally — do NOT commit on every keystroke
105
- const [inputValue, setInputValue] = useState(value);
106
-
107
- // 2. Sync local state when the store value changes
108
- useEffect(() => {
109
- setInputValue(value);
110
- }, [value]);
111
-
112
- // 3. Display modes — must short-circuit before any interactive rendering
113
- if (displayMode === 'DISPLAY_ONLY') {
114
- return <FieldValueList name={hideLabel ? '' : label} value={value} />;
115
- }
116
-
117
- if (displayMode === 'STACKED_LARGE_VAL') {
118
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
119
- }
120
-
121
- // 4. Event handlers
122
- function handleChange(newValue: string) {
123
- setInputValue(newValue); // update local state only
124
- }
125
-
126
- function handleBlur() {
127
- handleEvent(actions, 'changeNblur', propName, inputValue); // commit to Pega store
128
- }
129
-
130
- // 5. [DS RENDER] — replace with your design system's input primitive
131
- // Refer to "Design System Adaptation" below for prop mapping guidance
132
- return (
133
- <YourDesignSystemInput
134
- value={inputValue}
135
- onChange={handleChange}
136
- onBlur={!readOnly ? handleBlur : undefined}
137
- disabled={disabled}
138
- readOnly={readOnly}
139
- required={required}
140
- placeholder={placeholder}
141
- label={label}
142
- helperText={helperTextToDisplay}
143
- isInvalid={status === 'error'}
144
- data-test-id={testId}
145
- />
146
- );
147
- }
148
- ```
50
+ ### Abstract Field Component Pattern
51
+
52
+ This pattern is design-system agnostic. It defines the **behavioral skeleton** every field component must follow. The final render step must be adapted to your design system's input primitive — see the "Design System Adaptation" section below for guidance.
53
+
54
+ **Module Setup:** The component depends on the project's event-commit utility (for committing value changes to the Pega store) and the project's component registry (for resolving the display-mode renderer). Define the input contract as an extension of the project's field input contract with any component-specific additional inputs. Export the component as the module's default export.
55
+
56
+ **Main Component Logic** — the component follows these steps in order:
57
+
58
+ 1. **Registry lookup** — resolve `FieldValueList` via the project's component registry to get the display-mode renderer.
59
+ 2. **Receive inputs** — extract `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`, plus any component-specific inputs.
60
+ 3. **PConnect setup** — call `getPConnect()` to get `pConn`; get `actions` via `pConn.getActionsApi()`; get `propName` via `(pConn.getStateProps() as any).value`; compute `helperTextToDisplay = validatemessage || helperText`.
61
+ 4. **Track input value locally** — maintain local state initialized to `value`. Do NOT commit to the store on every keystroke.
62
+ 5. **Sync local state from the store** — use a lifecycle effect watching `value` to update the local state whenever the store value changes.
63
+ 6. **Display mode short-circuits** — these must be checked before any interactive rendering:
64
+ - If `displayMode === 'DISPLAY_ONLY'`: return `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value`.
65
+ - If `displayMode === 'STACKED_LARGE_VAL'`: return the same but with a stacked layout variant.
66
+ 7. **Event handlers:**
67
+ - The change handler — updates local state only (no store commit).
68
+ - The blur handler — invokes the project's event-commit utility with event type `'changeNblur'`, the property name, and the local value to commit to the Pega store.
69
+ 8. **Render** — render the design system's input primitive with these inputs wired: `value` (local state), the change handler, the blur handler (only when not read-only), `disabled`, `readOnly`, `required`, `placeholder`, `label`, `helperText` (the computed display text), an error/invalid flag driven by `status === 'error'`, and a test-id attribute driven by `testId`.
149
70
 
150
71
  ---
151
72
 
152
73
  ## Design System Adaptation
153
74
 
154
- When filling in the `// [DS RENDER]` section with a specific design system:
155
-
156
- **1. Check the component-specific skill file** — `{{SKILL_DIR}}/field-skills/<ComponentName>.md` contains a **Design System Mapping** table that lists the recommended DS component for common design systems. Use it as a starting point.
75
+ When implementing the render section with a specific design system:
157
76
 
158
- **2. If the chosen design system is not in the mapping table** — use the **UI control type** field in the same skill file (e.g., `"Combobox / typeahead autocomplete input"`) to identify the closest DS primitive.
77
+ **1. Check the component-specific skill file** — `{{SKILL_DIR}}/field-skills/<ComponentName>.md` contains a **Design System Mapping** section that describes how to map the component's behavior to a DS primitive. Use it as a starting point.
159
78
 
160
- **3. Discover the API from installed packages** — before writing any render JSX, confirm all prop names from `.d.ts` files. Never rely on training-knowledge of a DS API:
79
+ **2. If the chosen design system is not covered** — use the **UI control type** field in the same skill file (e.g., `"Combobox / typeahead autocomplete input"`) to identify the closest DS primitive.
161
80
 
162
- ```bash
163
- find node_modules/<ds-package> -name "ComponentName.d.ts" | head -3
164
- grep -A 40 "interface.*Props" <path-to-file>
165
- ```
81
+ **3. Discover the API from installed packages** — before writing the render markup, confirm all input names from the design system's type declarations. Never rely on training-knowledge of a DS API. Search the design system package's type declaration files for the target component name, then read the exported input interface to confirm exact input names and types.
166
82
 
167
- **4. Prop mapping conventions** — adapt these Pega/SDK props to whatever your DS component calls them:
83
+ **4. Input mapping conventions** — adapt these Pega/SDK inputs to whatever the DS component calls them:
168
84
 
169
- | Pega/SDK prop | Meaning | Typical DS equivalent |
170
- | --------------------------------- | ----------------------------- | -------------------------------------------------- |
171
- | `status === 'error'` | Validation error state | `error`, `status="error"`, `invalid`, `isInvalid` |
172
- | `validatemessage \|\| helperText` | Helper/error text below field | `helperText`, `description`, `hint`, `extra` |
173
- | `readOnly` | Non-editable, still visible | `readOnly`, `isReadOnly`, `variant="borderless"` |
174
- | `testId` | Automation selector | `data-test-id` on the underlying `<input>` element |
175
- | `required` | Required field marker | `required`, `isRequired` |
176
- | `hideLabel` | Suppress label display | Pass empty string `''` as label |
85
+ | Pega/SDK input | Meaning | Typical DS equivalent |
86
+ | --------------------------------- | ----------------------------- | --------------------------------------------------- |
87
+ | `status === 'error'` | Validation error state | `error`, `status="error"`, `invalid`, `isInvalid` |
88
+ | `validatemessage \|\| helperText` | Helper/error text below field | `helperText`, `description`, `hint`, `extra` |
89
+ | `readOnly` | Non-editable, still visible | `readOnly`, `isReadOnly`, `variant="borderless"` |
90
+ | `testId` | Automation selector | A test-id attribute on the underlying input element |
91
+ | `required` | Required field marker | `required`, `isRequired` |
92
+ | `hideLabel` | Suppress label display | Pass empty string `''` as label |
177
93
 
178
- **5. Use a form layout wrapper** — if the DS provides a wrapper that combines label + input + helper text (e.g., `<Form.Item>` in Ant Design, `<FormControl>` in Chakra UI), use it rather than composing them manually.
94
+ **5. Use a form layout wrapper** — if the DS provides a wrapper that combines label + input + helper text (e.g., a form-item or form-control component), use it rather than composing them manually.
179
95
 
180
96
  ---
181
97
 
182
98
  ## Event Handling
183
99
 
184
- > ⚠️ **CRITICAL — DO NOT DUPLICATE IMPORTS FROM `field-utils`**
100
+ > ⚠️ **CRITICAL — DO NOT DUPLICATE IMPORTS FROM FIELD UTILITIES**
185
101
  >
186
- > If the project has a `field-utils.ts` or `field-utils.tsx` file that exports utility functions AND types (e.g., `DynamicFieldProps`, `commitField`, `FieldValue`, `getFieldContext`, `useFieldValue`, `helperText`, `getOptions`), import everything you need in a **single import statement**.
102
+ > If the project has a field-utilities module that exports utility functions AND types (e.g., field input types, commit helpers, value getters, context helpers, option-list helpers), import everything you need in a **single import statement**. NEVER add a separate type-only import for a symbol that is already imported from the same module — doing so causes a duplicate identifier error.
187
103
  >
188
- > ```typescript
189
- > // ✅ CORRECT — one import for both types and functions
190
- > import { commitField, DynamicFieldProps, FieldValue, getFieldContext, helperText } from '../field-utils';
191
- >
192
- > // ❌ WRONG — duplicate identifier error!
193
- > import type { DynamicFieldProps } from '../field-utils';
194
- > import { commitField, DynamicFieldProps, FieldValue, getFieldContext } from '../field-utils';
195
- > ```
196
- >
197
- > TypeScript allows mixing type and value exports in a single import. NEVER add a separate `import type` line for a symbol that is already imported in another import from the same module.
198
- >
199
- > **Before writing imports:** Check what `field-utils` exports. If it exports `DynamicFieldProps` as a `type`, you can import it alongside value exports in one statement.
200
-
201
- Use `src/components/helpers/event-utils.ts` to commit values to the Pega store:
202
-
203
- ```typescript
204
- import handleEvent from '../../helpers/event-utils';
104
+ > **Before writing imports:** Check what the field-utilities module exports. If it exports a type, you can import it alongside value exports in one statement.
205
105
 
206
- // Get references
207
- const actions = pConn.getActionsApi();
208
- const propName = (pConn.getStateProps() as any).value;
106
+ Use the project's event-commit utility to commit values to the Pega store. Obtain the two references it needs: `actions` via `pConn.getActionsApi()` and `propName` via `(pConn.getStateProps() as any).value`. Then invoke the utility with one of three event types:
209
107
 
210
- // Options:
211
- handleEvent(actions, 'change', propName, value); // Update store only
212
- handleEvent(actions, 'blur', propName, value); // Trigger validation only
213
- handleEvent(actions, 'changeNblur', propName, value); // Update + validate (most common)
214
- ```
108
+ - `'change'` — update store only.
109
+ - `'blur'` — trigger validation only.
110
+ - `'changeNblur'` — update and validate (most common).
215
111
 
216
- **Pattern:** Track local state with `useState`, update on user input, then call `handleEvent` on blur to commit.
112
+ **Pattern:** Track local state, update on user input, then call the event-commit utility on blur to commit.
217
113
 
218
114
  ---
219
115
 
@@ -221,26 +117,19 @@ handleEvent(actions, 'changeNblur', propName, value); // Update + validate (most
221
117
 
222
118
  Every field component MUST handle these `displayMode` values:
223
119
 
224
- | Mode | Behavior |
225
- | --------------------- | -------------------------------------------------------------- |
226
- | `undefined` / `null` | Render editable form control |
227
- | `'DISPLAY_ONLY'` | Render read-only via `FieldValueList` (inline layout) |
228
- | `'STACKED_LARGE_VAL'` | Render read-only via `FieldValueList` with `variant='stacked'` |
120
+ | Mode | Behavior |
121
+ | --------------------- | ------------------------------------------------------------------- |
122
+ | `undefined` / `null` | Render editable form control |
123
+ | `'DISPLAY_ONLY'` | Render read-only via `FieldValueList` (inline layout) |
124
+ | `'STACKED_LARGE_VAL'` | Render read-only via `FieldValueList` with a stacked layout variant |
229
125
 
230
- Use `getComponentFromRegistry('FieldValueList')` to get the display component.
126
+ Resolve the `FieldValueList` component via the project's component registry.
231
127
 
232
128
  ---
233
129
 
234
130
  ## Resolving Other Components
235
131
 
236
- Use `getComponentFromRegistry` from `@pega/sdk-react` to resolve components by name:
237
-
238
- ```typescript
239
- import { getComponentFromRegistry } from '@pega/sdk-react';
240
-
241
- const FieldValueList = getComponentFromRegistry('FieldValueList');
242
- const TextInput = getComponentFromRegistry('TextInput');
243
- ```
132
+ Use the project's component registry to resolve components by name at runtime — for example, resolving `'FieldValueList'` or `'TextInput'` returns the currently-registered component for that name (including any override).
244
133
 
245
134
  This is used when:
246
135
 
@@ -251,62 +140,51 @@ This is used when:
251
140
 
252
141
  ## Registration
253
142
 
254
- After creating a component, register it in `src/components/component-map.ts`:
255
-
256
- ```typescript
257
- import MyField from './field/MyField';
258
-
259
- // In the getSampleComponentMap() return object:
260
- {
261
- ...sdkComponents,
262
- // ... other fields ...
263
- MyField, // Key must match the Pega component name exactly
264
- }
265
- ```
143
+ After creating a component, register it in the project's component map: import the component's default export from its folder under the field components directory, then add it to the object returned by the project's component registration function. The key used must match the Pega component name exactly.
266
144
 
267
145
  ---
268
146
 
269
147
  ## Existing Field Components
270
148
 
271
- | Component | Pega Name | Description |
272
- | --------------- | --------------- | ---------------------------------------------- |
273
- | AutoComplete | AutoComplete | Typeahead search field |
274
- | CancelAlert | CancelAlert | Cancel confirmation dialog |
275
- | Checkbox | Checkbox | Single checkbox with label |
276
- | Currency | Currency | Currency input with formatting |
277
- | Date | Date | Date picker (uses @mui/x-date-pickers + dayjs) |
278
- | DateTime | DateTime | Date + time picker |
279
- | Decimal | Decimal | Decimal number input |
280
- | Dropdown | Dropdown | Select/dropdown with options from data page |
281
- | Email | Email | Email input with icon |
282
- | Group | Group | Field group container |
283
- | Integer | Integer | Integer-only input |
284
- | Location | Location | Google Maps location picker |
285
- | Multiselect | Multiselect | Multi-select dropdown |
286
- | ObjectReference | ObjectReference | Reference to another object |
287
- | Percentage | Percentage | Percentage input |
288
- | Phone | Phone | Phone input (uses mui-tel-input) |
289
- | RadioButtons | RadioButtons | Radio button group |
290
- | RichText | RichText | Rich text editor (TinyMCE) |
291
- | ScalarList | ScalarList | List of scalar values |
292
- | SelectableCard | SelectableCard | Card-style selection |
293
- | SemanticLink | SemanticLink | Clickable link to another case/object |
294
- | TextArea | TextArea | Multi-line text input |
295
- | TextContent | TextContent | Static text display |
296
- | TextInput | TextInput | Single-line text input |
297
- | Time | Time | Time picker |
298
- | URL | URL | URL input with validation |
299
- | UserReference | UserReference | User picker |
149
+ | Component | Pega Name | Description |
150
+ | --------------- | --------------- | --------------------------------- |
151
+ | AutoComplete | AutoComplete | Typeahead search field |
152
+ | CancelAlert | CancelAlert | Cancel confirmation dialog |
153
+ | Checkbox | Checkbox | Single checkbox with label |
154
+ | Currency | Currency | Currency input with formatting |
155
+ | Date | Date | Date picker |
156
+ | DateTime | DateTime | Date + time picker |
157
+ | Decimal | Decimal | Decimal number input |
158
+ | Dropdown | Dropdown | Select/dropdown with options |
159
+ | Email | Email | Email input with icon |
160
+ | Group | Group | Field group container |
161
+ | Integer | Integer | Integer-only input |
162
+ | Location | Location | Google Maps location picker |
163
+ | Multiselect | Multiselect | Multi-select dropdown |
164
+ | ObjectReference | ObjectReference | Reference to another object |
165
+ | Percentage | Percentage | Percentage input |
166
+ | Phone | Phone | Phone input with country selector |
167
+ | RadioButtons | RadioButtons | Radio button group |
168
+ | RichText | RichText | Rich text editor |
169
+ | ScalarList | ScalarList | List of scalar values |
170
+ | SelectableCard | SelectableCard | Card-style selection |
171
+ | SemanticLink | SemanticLink | Clickable link to another case |
172
+ | TextArea | TextArea | Multi-line text input |
173
+ | TextContent | TextContent | Static text display |
174
+ | TextInput | TextInput | Single-line text input |
175
+ | Time | Time | Time picker |
176
+ | URL | URL | URL input with validation |
177
+ | UserReference | UserReference | User picker |
300
178
 
301
179
  ---
302
180
 
303
181
  ## Key Conventions
304
182
 
305
- 1. **Default export** — Each component uses `export default function`.
306
- 2. **index.tsx** — Re-exports: `export { default } from './ComponentName'`.
307
- 3. **Local state** — Track input value locally, sync from `value` prop via `useEffect`.
308
- 4. **Commit on blur** — Use `handleEvent(actions, 'changeNblur', propName, localValue)` on blur, not on every keystroke.
309
- 5. **Error display** — Show `validatemessage` or `helperText` below the field; set `error={status === 'error'}`.
310
- 6. **Read-only** — Set `readOnly` on input props or render a display-only component.
311
- 7. **Test IDs** — Pass `data-test-id={testId}` to the underlying input element.
312
- 8. **No PCore imports** — Access PCore globals directly (they're declared globally by `@pega/pcore-pconnect-typedefs`).
183
+ 1. **Default export** — Each component is exported as the module's default export.
184
+ 2. **Re-export module** — A re-export file in the folder exports the component as the folder's default.
185
+ 3. **Local state** — Track input value locally, sync from the `value` input via a lifecycle effect.
186
+ 4. **Commit on blur** — Use the project's event-commit utility with event type `'changeNblur'` on blur, not on every keystroke.
187
+ 5. **Error display** — Show `validatemessage` or `helperText` below the field; apply an error visual state when `status === 'error'`.
188
+ 6. **Read-only** — Set the read-only attribute on the input element or render a display-only component.
189
+ 7. **Test IDs** — Pass a test-id attribute driven by `testId` to the underlying input element.
190
+ 8. **No PCore imports** — Access PCore globals directly (they're declared globally by the Pega runtime type definitions).