@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
  Field group container that wraps child fields in a collapsible section with an optional heading and instructions.
4
4
 
5
- > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
6
6
 
7
7
  ---
8
8
 
@@ -14,105 +14,54 @@ A layout/structural component (not a form input). Wraps a set of child field com
14
14
 
15
15
  - **Pega Name:** `Group`
16
16
  - **Type / Subtype:** `Field` / `Group`
17
- - **Registration key:** `Group` (in `component-map.ts`)
18
-
19
- ## Props (component-specific)
20
-
21
- | Prop | Type | Description |
22
- | -------------- | ------------------- | ------------------------------------------------- |
23
- | `children` | `ReactElement[]` | Child field components to render inside the group |
24
- | `heading` | `string` | The group heading/title |
25
- | `showHeading` | `boolean` | Whether to display the heading |
26
- | `instructions` | `string` (optional) | Instructional text shown below the heading |
27
- | `collapsible` | `boolean` | Whether the group can be collapsed |
28
- | `type` | `string` | Group type (used for layout context) |
29
-
30
- `displayMode` is also consumed from `PConnFieldProps`.
31
-
32
- ## Component Skeleton
33
-
34
- ```typescript
35
- import { type ReactElement, useMemo } from 'react';
36
- import { getComponentFromRegistry } from '@pega/sdk-react';
37
- import type { PConnFieldProps } from '@pega/sdk-react';
38
-
39
- interface GroupProps extends PConnFieldProps {
40
- children: ReactElement[];
41
- heading: string;
42
- showHeading: boolean;
43
- instructions?: string;
44
- collapsible: boolean;
45
- type: string;
46
- }
47
-
48
- export default function Group(props: GroupProps) {
49
- // 1. Registry lookup
50
- const FieldGroup = getComponentFromRegistry('FieldGroup');
51
-
52
- // 2. Destructure props
53
- const { children, heading, showHeading, instructions, collapsible, displayMode, type } = props;
54
-
55
- // 3. Derived flag
56
- const isReadOnly = displayMode === 'DISPLAY_ONLY';
57
-
58
- // 4. Memoized content grid — deps: [children, type, isReadOnly]
59
- const content = useMemo(() => (
60
- <GridContainer spacing={2}>
61
- {children?.map(child => (
62
- <GridItem fullWidth key={child.key}>{child}</GridItem>
63
- ))}
64
- </GridContainer>
65
- ), [children, type, isReadOnly]);
66
-
67
- // 5. Null guard
68
- if (!children) return null;
69
-
70
- // 6. Return FieldGroup wrapper
71
- return (
72
- <FieldGroup
73
- name={showHeading ? heading : undefined}
74
- collapsible={collapsible}
75
- instructions={instructions}
76
- >
77
- {content}
78
- </FieldGroup>
79
- );
80
- }
81
- ```
17
+ - **Registration key:** `Group` (in the project's component map)
18
+
19
+ ## Inputs (component-specific)
20
+
21
+ | Input | Type | Description |
22
+ | -------------- | ----------------------- | ------------------------------------------------- |
23
+ | `children` | array of child elements | Child field components to render inside the group |
24
+ | `heading` | `string` | The group heading/title |
25
+ | `showHeading` | `boolean` | Whether to display the heading |
26
+ | `instructions` | `string` (optional) | Instructional text shown below the heading |
27
+ | `collapsible` | `boolean` | Whether the group can be collapsed |
28
+ | `type` | `string` | Group type (used for layout context) |
29
+
30
+ `displayMode` is also consumed from the project's field input contract.
31
+
32
+ ## Implementation Structure
33
+
34
+ **Module Setup:** The component depends on the project's component registry (to resolve `FieldGroup`). Define the input contract as the project's field input contract extended with `children` (array of child elements), `heading: string`, `showHeading: boolean`, `instructions?: string`, `collapsible: boolean`, and `type: string`.
35
+
36
+ **Main Component Logic** — steps in order:
37
+
38
+ 1. **Registry lookup** — resolve `FieldGroup` via the project's component registry.
39
+ 2. **Receive inputs** — `children`, `heading`, `showHeading`, `instructions`, `collapsible`, `displayMode`, `type`.
40
+ 3. **Derived flag** — `isReadOnly = displayMode === 'DISPLAY_ONLY'`.
41
+ 4. **Memoized content grid** (dependencies: `children`, `type`, `isReadOnly`) — build a grid container (spacing 2) where each child is wrapped in a full-width grid item, preserving each child's key.
42
+ 5. **Null guard** — if `!children`, return `null`.
43
+ 6. **Return `FieldGroup` wrapper** — pass `name` as `heading` only when `showHeading` is true (otherwise `undefined`), plus `collapsible` and `instructions`, wrapping the memoized content grid.
82
44
 
83
45
  ## Behavioral Contract
84
46
 
85
47
  1. **No state, no event handling** — purely structural/layout.
86
48
  2. **`isReadOnly` flag:** `isReadOnly = displayMode === 'DISPLAY_ONLY'` — passed through to grid for layout context.
87
- 3. **Content grid:** Build a responsive grid of children using `useMemo` (memoized based on `children`, `type`, `isReadOnly`):
88
- - Each child gets a full-width grid item (`xs: 12` in a 12-column grid, or equivalent `100%` column).
89
- - Children are mapped with their `key` prop preserved.
49
+ 3. **Content grid:** Build a responsive grid of children using a memoized computation (dependencies: `children`, `type`, `isReadOnly`):
50
+ - Each child gets a full-width grid item (100% column width in a 12-column grid system or equivalent).
51
+ - Children are mapped with their unique key preserved.
90
52
  4. **Null guard:** If `!children`, return `null`.
91
53
  5. **Heading:** Pass `showHeading ? heading : undefined` to `FieldGroup` — if `showHeading` is false, heading is `undefined` (not shown).
92
- 6. **FieldGroup:** Resolved via `getComponentFromRegistry('FieldGroup')`. Receives `name`, `collapsible`, and `instructions` props.
54
+ 6. **FieldGroup:** Resolved via the project's component registry with key `'FieldGroup'`. Receives `name`, `collapsible`, and `instructions` inputs.
93
55
 
94
56
  ## Display Mode Rendering
95
57
 
96
- `displayMode` is not explicitly handled — it's passed through as a prop for context. `FieldGroup` and children handle their own display mode behavior.
58
+ `displayMode` is not explicitly handled — it's passed through as an input for context. `FieldGroup` and children handle their own display mode behavior.
97
59
 
98
60
  ## Visual Specifications
99
61
 
100
- The visual appearance is determined by the `FieldGroup` design system extension component. `Group` itself only applies grid layout to children:
101
-
102
- ```
103
- Grid container (spacing=2):
104
- per child → Grid item (xs: 12, full width)
105
- ```
62
+ The visual appearance is determined by the `FieldGroup` design system extension component. `Group` itself only applies grid layout to children: a grid container with spacing 2, where each child occupies a full-width grid item.
106
63
 
107
- **CSS-only grid layout:**
108
-
109
- ```css
110
- .field-group-children {
111
- display: grid;
112
- grid-template-columns: 1fr;
113
- gap: 16px;
114
- }
115
- ```
64
+ **Visual-only styling notes:** The children grid uses a single-column layout with a consistent gap between items.
116
65
 
117
66
  The `FieldGroup` component itself provides:
118
67
 
@@ -123,25 +72,17 @@ The `FieldGroup` component itself provides:
123
72
 
124
73
  ## Edge Cases & Special Logic
125
74
 
126
- - **`useMemo` dependencies:** `[children, type, isReadOnly]` — the grid re-renders only when these change, not on every parent render.
127
- - Children must have stable `key` props for React reconciliation.
75
+ - **Memoized computation dependencies:** `children`, `type`, `isReadOnly` — the grid re-renders only when these change, not on every parent render.
76
+ - Children must have stable keys for reconciliation.
128
77
  - `instructions` may be undefined — `FieldGroup` should handle this gracefully.
129
78
 
130
79
  ## Dependencies
131
80
 
132
- - `getComponentFromRegistry('FieldGroup')` — design system extension providing the collapsible container.
133
- - `useMemo` from React.
134
- - Grid layout component (e.g., MUI `Grid`).
81
+ - The project's component registry to resolve `FieldGroup` — the design system extension providing the collapsible container.
82
+ - A grid layout mechanism for arranging children in a single-column layout with consistent spacing.
135
83
 
136
84
  ## Design System Mapping
137
85
 
138
86
  **UI control type:** Collapsible field group container with heading.
139
87
 
140
- Listed design systems are examples only.
141
-
142
- | Design System | Recommended Component |
143
- | ------------------ | ------------------------------------------------------------------------ |
144
- | Default (CSS only) | `<fieldset>` or `<details>/<summary>` for collapsible |
145
- | MUI | `<Grid container spacing={2}>` with `<Grid size={{ xs: 12 }}>` per child |
146
- | Ant Design | `<Collapse>` panel or `<Card>` |
147
- | Chakra UI | `<Box>` or `<Accordion>` |
88
+ When implementing in a specific design system, map the following: a grid container component with consistent spacing (gap of 2 units) where each child occupies a full-width row, and a collapsible section/panel component for the outer `FieldGroup` wrapper. The collapsible panel should support an optional title, collapse/expand toggle, and an instructions area. Native HTML equivalents include `<fieldset>` or `<details>/<summary>` for collapsibility.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Integer-only text input that filters out decimal separators, binds to a Pega case property.
4
4
 
5
- > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
6
6
 
7
7
  ---
8
8
 
@@ -14,118 +14,53 @@ Renders a single-line text input restricted to integer values. Actively filters
14
14
 
15
15
  - **Pega Name:** `Integer`
16
16
  - **Type / Subtype:** `Field` / `Integer`
17
- - **Registration key:** `Integer` (in `component-map.ts`)
18
-
19
- ## Props (component-specific)
20
-
21
- No props beyond `PConnFieldProps`. Import type as:
22
-
23
- ```typescript
24
- import type { PConnFieldProps } from '@pega/sdk-react';
25
- ```
26
-
27
- ## Component Skeleton
28
-
29
- Follow this exact structure. The key differentiator from TextInput is the character filtering in `onChange`.
30
-
31
- ```typescript
32
- import { useEffect, useState } from 'react';
33
- import handleEvent from '../../helpers/event-utils';
34
- import { getComponentFromRegistry } from '@pega/sdk-react';
35
- import type { PConnFieldProps } from '@pega/sdk-react';
36
-
37
- interface IntegerProps extends PConnFieldProps {}
38
-
39
- export default function Integer(props: IntegerProps) {
40
- // 1. Registry lookups
41
- const TextInput = getComponentFromRegistry('TextInput');
42
- const FieldValueList = getComponentFromRegistry('FieldValueList');
43
-
44
- // 2. Destructure props
45
- const {
46
- getPConnect, label, required, disabled, value = '',
47
- validatemessage, status, readOnly, testId,
48
- helperText, displayMode, hideLabel, placeholder,
49
- } = props;
50
-
51
- // 3. PConnect setup
52
- const pConn = getPConnect();
53
- const actions = pConn.getActionsApi();
54
- const propName = (pConn.getStateProps() as any).value;
55
- const helperTextToDisplay = validatemessage || helperText;
56
-
57
- // 4. State
58
- const [inputValue, setInputValue] = useState('');
59
-
60
- // 5. useEffect: sync from store — deps: [value]
61
- useEffect(() => { setInputValue(value); }, [value]);
62
-
63
- // 6. Display mode returns
64
- if (displayMode === 'DISPLAY_ONLY') {
65
- return <FieldValueList name={hideLabel ? '' : label} value={value} />;
66
- }
67
- if (displayMode === 'STACKED_LARGE_VAL') {
68
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
69
- }
70
-
71
- // 7. Read-only return
72
- if (readOnly) {
73
- return <TextInput {...props} />;
74
- }
75
-
76
- // 8. Test ID
77
- const testProps: any = { 'data-test-id': testId };
78
-
79
- // 9. onChange with character filtering
80
- function intOnChange(event) {
81
- const disallowedChars = ['.', ','];
82
- const theAttemptedValue = event.target.value;
83
- const lastChar = theAttemptedValue.slice(-1);
84
- if (disallowedChars.includes(lastChar)) {
85
- event.target.value = theAttemptedValue.slice(0, -1);
86
- }
87
- setInputValue(event.target.value);
88
- }
89
-
90
- // 10. onBlur — commit to store
91
- function handleBlur() {
92
- handleEvent(actions, 'changeNblur', propName, inputValue);
93
- }
94
-
95
- // 11. Main render — text input (type='text', NOT 'number')
96
- // Key props:
97
- // - fullWidth, variant: 'outlined', size: 'small'
98
- // - type: 'text' (NOT 'number')
99
- // - value: inputValue, onChange: intOnChange
100
- // - onBlur: !readOnly ? handleBlur : undefined
101
- // - label, helperText: helperTextToDisplay, placeholder: placeholder ?? ''
102
- // - required, disabled, error: status === 'error'
103
- // - htmlInput: { inputMode: 'numeric', pattern: '[0-9]*', ...testProps }
104
- return <TextFieldWidget ... />;
105
- }
106
- ```
17
+ - **Registration key:** `Integer` (in the project's component map)
18
+
19
+ ## Inputs (component-specific)
20
+
21
+ No inputs beyond the project's field input contract (see prerequisite skill).
22
+
23
+ ## Implementation Structure
24
+
25
+ Follow this exact structure. The key differentiator from TextInput is the character filtering in the change handler.
26
+
27
+ **Module Setup:** The component depends on the project's component registry (to resolve `TextInput` and `FieldValueList`) and the project's event-commit utility (for committing value changes to the store). Define the input contract as the project's field input contract with no additional fields.
28
+
29
+ **Main Component Logic** — steps in order:
30
+
31
+ 1. **Registry lookups** — resolve `TextInput` and `FieldValueList` via the project's component registry.
32
+ 2. **Receive inputs** — `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`.
33
+ 3. **PConnect setup** — obtain the PConnect instance, its actions API, and the bound property name; compute `helperTextToDisplay = validatemessage || helperText`.
34
+ 4. **Local state** — `inputValue` initialized to `''`.
35
+ 5. **Sync from store** — a lifecycle effect watching `value` updates `inputValue` whenever it changes.
36
+ 6. **Display mode returns** — `DISPLAY_ONLY` and `STACKED_LARGE_VAL` both return `FieldValueList` using the raw `value`, the latter with a stacked variant.
37
+ 7. **Read-only return** — when `readOnly` is true, render the `TextInput` component with all inputs passed through directly (full delegation).
38
+ 8. **Test ID** — build a test-id attribute from `testId`.
39
+ 9. **Change handler with character filtering** — read the attempted value from the change event, check whether its last character is a disallowed character (`.` or `,`), and if so strip that last character before updating the DOM value; then update local `inputValue` with the (possibly trimmed) value. This mimics Pega's native integer field behavior of blocking decimal/thousands separators as the user types.
40
+ 10. **Blur handler** — commit to store via the project's event-commit utility with event type `'changeNblur'`, the property name, and `inputValue`.
41
+ 11. **Render** — a text input configured with: input type `text` (explicitly NOT `number`, to retain full control over character filtering), full width, outlined style, small size, current `inputValue`, the change handler, the blur handler wired only when not read-only, `label`, `helperText: helperTextToDisplay`, `placeholder: placeholder ?? ''`, `required`, `disabled`, an error state when `status === 'error'`, and HTML input attributes `inputMode: 'numeric'` and `pattern: '[0-9]*'` merged with the test-id attribute to hint numeric keyboards on mobile while still filtering as plain text.
107
42
 
108
43
  ## Behavioral Contract
109
44
 
110
- 1. **Local state:** Maintain `inputValue` (string). Initialize from `value` prop (`''` default).
111
- 2. **Sync from store:** `useEffect` watching `value` → `setInputValue(value)`.
45
+ 1. **Local state:** Maintain `inputValue` (string). Initialize from `value` input (`''` default).
46
+ 2. **Sync from store:** A lifecycle effect watching `value` updates `inputValue`.
112
47
  3. **On change (character filtering):** Before updating local state, inspect the last character typed:
113
- - If the last character is `.` or `,`, strip it from the value: `event.target.value = theAttemptedValue.slice(0, -1)`.
48
+ - If the last character is `.` or `,`, strip it from the value (slice off the last character).
114
49
  - Then update local state with the sanitized value.
115
50
  - This "eating" of separator characters replicates Pega's native integer field behavior.
116
51
  4. **Input mode:** Set `inputMode='numeric'` and `pattern='[0-9]*'` on the input element for mobile keyboards.
117
52
  5. **Input type:** Use `type='text'` (NOT `type='number'`) — this avoids browser-specific number input quirks.
118
- 6. **On blur:** Commit via `handleEvent(actions, 'changeNblur', propName, inputValue)`.
119
- 7. **Read-only:** Delegate to `TextInput`: `return <TextInput {...props} />`.
53
+ 6. **On blur:** Commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and `inputValue`.
54
+ 7. **Read-only:** Delegate to `TextInput`, passing all inputs through.
120
55
 
121
56
  ## Display Mode Rendering
122
57
 
123
- - **`DISPLAY_ONLY`:** `<FieldValueList name={hideLabel ? '' : label} value={value} />`.
124
- - **`STACKED_LARGE_VAL`:** `<FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />`.
58
+ - **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value` set to the raw `value`.
59
+ - **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked layout variant.
125
60
 
126
61
  ## Read-Only Rendering
127
62
 
128
- Delegate to `TextInput`: `return <TextInput {...props} />`.
63
+ Delegate to `TextInput`, passing all inputs through.
129
64
 
130
65
  ## Visual Specifications
131
66
 
@@ -147,23 +82,21 @@ Identical to `TextInput` visually:
147
82
  - **Character filtering is inline** — do NOT use `type='number'` as it introduces inconsistent behavior across browsers (e.g., accepts `e`, `+`, `-` by default).
148
83
  - The disallowed characters array is `['.', ',']` — both decimal point and thousands separator are rejected.
149
84
  - Strip only the LAST character if it is disallowed — do not strip from anywhere else in the string (user may paste a valid integer that is then validated by blur).
150
- - `onBlur` is omitted when `readOnly`.
85
+ - The blur handler is omitted when `readOnly`.
151
86
 
152
87
  ## Dependencies
153
88
 
154
- - `handleEvent` from `../../helpers/event-utils`
155
- - `getComponentFromRegistry('TextInput')` — for read-only delegation
156
- - `getComponentFromRegistry('FieldValueList')` — for display modes
89
+ - The project's event-commit utility.
90
+ - The project's component registry, resolving `TextInput` — for read-only delegation.
91
+ - The project's component registry, resolving `FieldValueList` — for display modes.
157
92
 
158
93
  ## Design System Mapping
159
94
 
160
- **UI control type:** Numeric text input (integer-only) — use `<input type="text" inputmode="numeric" pattern="[0-9]*">`.
95
+ **UI control type:** Numeric text input (integer-only).
161
96
 
162
- Listed design systems are examples only.
97
+ When implementing in a specific design system, map the following:
163
98
 
164
- | Design System | Recommended Component |
165
- | ------------------ | -------------------------------------------------------------------------------------------------- |
166
- | Default (CSS only) | `<input type="text" inputMode="numeric" pattern="[0-9]*">` |
167
- | MUI | `<TextField type='text' slotProps={{ htmlInput: { inputMode: 'numeric', pattern: '[0-9]*' } }} />` |
168
- | Ant Design | `<InputNumber precision={0} />` or `<Input />` with custom `onChange` filter |
169
- | Chakra UI | `<NumberInput allowMouseWheel={false} />` or plain `<Input>` with filter |
99
+ - **Text input** → use the DS's text input with `type='text'`, `inputMode='numeric'`, `pattern='[0-9]*'`
100
+ - **Character filtering** → implement in the change handler (strip `.` and `,` from the last character)
101
+ - **Read-only mode** → delegate to the `TextInput` component
102
+ - **Error state** → the DS's error/danger visual state