@pega/sdk 0.0.5 → 0.0.7

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 (269) hide show
  1. package/README.md +10 -3
  2. package/dist/index.js +828 -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/mcp/claude-code.mcp.json +8 -0
  159. package/templates/react-sdk-reference/.ai-common/mcp/copilot.mcp.json +8 -0
  160. package/templates/react-sdk-reference/.ai-common/mcp/cursor.mcp.json +11 -0
  161. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
  162. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
  163. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
  164. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
  165. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
  166. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
  167. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
  168. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
  169. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
  170. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
  171. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
  172. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
  173. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
  174. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
  175. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
  176. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
  177. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
  178. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
  179. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
  180. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
  181. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
  182. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
  183. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
  184. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
  185. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
  186. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
  187. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
  188. package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
  189. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
  190. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
  191. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
  192. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
  193. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
  194. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
  195. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
  196. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
  197. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
  198. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
  199. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
  200. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
  201. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
  202. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
  203. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
  204. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
  205. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
  206. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
  207. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
  208. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
  209. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
  210. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
  211. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
  212. package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
  213. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
  214. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
  215. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
  216. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
  217. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
  218. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
  219. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
  220. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
  221. package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
  222. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
  223. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
  224. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
  225. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
  226. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
  227. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
  228. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
  229. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
  230. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
  231. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
  232. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
  233. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
  234. package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
  235. package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
  236. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
  237. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
  238. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
  239. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
  240. package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
  241. package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
  242. package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
  243. package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
  244. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
  245. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
  246. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
  247. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
  248. package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
  249. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
  250. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
  251. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
  252. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
  253. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
  254. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
  255. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
  256. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
  257. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
  258. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
  259. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
  260. package/templates/react-sdk-reference/package.json +1 -1
  261. package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
  262. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  263. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
  264. package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
  265. package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
  266. package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
  267. package/templates/react-native-sdk-reference/App.tsx +0 -49
  268. package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
  269. package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Cancel confirmation dialog that offers the user a choice between going back or discarding/deleting the current case/action.
4
4
 
5
- > **Note:** This component extends `PConnFieldProps` for registry compatibility but does **not** use standard field patterns (no `displayMode`, no `handleEvent`, no value binding). It is an internal modal dialog.
5
+ > **Note:** This component extends the project's field input contract for registry compatibility but does **not** use standard field patterns (no `displayMode`, no event-commit utility, no value binding). It is an internal modal dialog.
6
6
 
7
7
  ---
8
8
 
@@ -14,9 +14,9 @@ Renders a full-screen modal overlay with a confirmation dialog. Presents two act
14
14
 
15
15
  - **Pega Name:** `CancelAlert`
16
16
  - **Type / Subtype:** Internal modal/alert
17
- - **Registration key:** `CancelAlert` (in `component-map.ts`)
17
+ - **Registration key:** `CancelAlert` (in the project's component map)
18
18
 
19
- ## Props (component-specific)
19
+ ## Inputs (component-specific)
20
20
 
21
21
  | Prop | Type | Description |
22
22
  | ------------------------ | ---------- | ---------------------------------------------------------------------------------------- |
@@ -28,135 +28,39 @@ Renders a full-screen modal overlay with a confirmation dialog. Presents two act
28
28
  | `skipReleaseLockRequest` | `any` | Whether to skip lock release when removing container item |
29
29
  | `dismiss` | `Function` | Callback to close/dismiss this dialog (called with `true` to indicate confirmed dismiss) |
30
30
 
31
- ## Component Skeleton
31
+ All other inputs come from the project's field input contract (for registry compatibility only).
32
+
33
+ ## Implementation Structure
32
34
 
33
35
  Follow this exact structure when implementing. Replace modal/button/snackbar components with equivalents from your chosen design system.
34
36
 
35
- ```typescript
36
- import { useState } from 'react';
37
- import type { PConnFieldProps } from '@pega/sdk-react';
38
- import './CancelAlert.css';
39
-
40
- // ── Props interface ──────────────────────────────────────────
41
- interface CancelAlertProps extends PConnFieldProps {
42
- heading: string;
43
- content: string;
44
- itemKey: string;
45
- hideDelete: boolean;
46
- isDataObject: boolean;
47
- skipReleaseLockRequest: any;
48
- dismiss: Function;
49
- }
50
-
51
- // ── Component ────────────────────────────────────────────────
52
- export default function CancelAlert(props: CancelAlertProps) {
53
- // 1. Destructure props (note: itemKey aliased to containerItemID)
54
- const {
55
- heading, content, getPConnect,
56
- itemKey: containerItemID,
57
- hideDelete, isDataObject, skipReleaseLockRequest, dismiss,
58
- } = props;
59
-
60
- // 2. PConnect APIs
61
- const actionsAPI = getPConnect().getActionsApi();
62
- const containerManagerAPI = getPConnect().getContainerManager();
63
- const isLocalAction = getPConnect().getValue(
64
- PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION
65
- );
66
- // @ts-ignore - Property 'options' is private
67
- const isBulkAction = getPConnect()?.options?.isBulkAction;
68
-
69
- // 3. Localization setup
70
- const localizedVal = PCore.getLocaleUtils().getLocaleValue;
71
- const localeCategory = 'ModalContainer';
72
-
73
- // 4. Coexistence setup
74
- const broadCastUtils: any = PCore.getCoexistenceManager().getBroadcastUtils();
75
- const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();
76
-
77
- // 5. Button ID constants
78
- const btnIds = {
79
- SAVE_AND_CLOSE: 'saveAndClose',
80
- CONTINUE_WORKING: 'continueWorking',
81
- DELETE: 'delete',
82
- };
83
-
84
- // 6. State
85
- const [buttonsState, setButtonsState] = useState({
86
- [btnIds.SAVE_AND_CLOSE]: false,
87
- [btnIds.DELETE]: false,
88
- });
89
- const [showSnackbar, setShowSnackbar] = useState(false);
90
- const [snackbarMessage, setSnackbarMessage] = useState('');
91
-
92
- // 7. Button enable/disable helpers
93
- function disableButton(id) {
94
- setButtonsState(prev => ({ ...prev, [id]: true }));
95
- }
96
- function enableButton(id) {
97
- setButtonsState(prev => ({ ...prev, [id]: false }));
98
- }
99
-
100
- // 8. cancelHandler — see Behavioral Contract "Discard" section
101
- function cancelHandler() { /* decision tree */ }
102
-
103
- // 9. handleSnackbarClose — see Behavioral Contract
104
- function handleSnackbarClose(event, reason?) {
105
- if (reason === 'clickaway') return;
106
- setShowSnackbar(false);
107
- }
108
-
109
- // 10. Build leftButton ("Go back") and rightButton ("Discard") JSX
110
- // leftButton: onClick → dismiss(), plus reverse coexistence cleanup
111
- // rightButton: onClick → cancelHandler(), disabled={buttonsState[btnIds.DELETE]}
112
- // All button text wrapped in localizedVal(text, localeCategory)
113
-
114
- // 11. Return: overlay div + dialog box + snackbar
115
- // See Visual Specifications for layout and CSS classes
116
- return (
117
- <>
118
- <div className="cancel-alert-background">
119
- <div className="cancel-alert-top">
120
- <h3>{localizedVal(heading, localeCategory)}</h3>
121
- <div><p>{localizedVal(content, localeCategory)}</p></div>
122
- <div className="action-controls">
123
- {/* Two buttons: Go back (secondary) | Discard (primary) */}
124
- </div>
125
- </div>
126
- </div>
127
- {/* Snackbar: open={showSnackbar}, autoHideDuration=3000, message={snackbarMessage} */}
128
- </>
129
- );
130
- }
131
- ```
37
+ **Module Setup:** The component depends on a companion stylesheet for dialog/overlay styling. Define the input contract as an extension of the project's field input contract (for registry compatibility), adding `heading`, `content`, `itemKey`, `hideDelete`, `isDataObject`, `skipReleaseLockRequest`, and `dismiss` fields.
38
+
39
+ **Main Component Logic** — steps in order:
40
+
41
+ 1. **Receive inputs** (note: `itemKey` is aliased to `containerItemID`) — `heading`, `content`, `getPConnect`, `itemKey` as `containerItemID`, `hideDelete`, `isDataObject`, `skipReleaseLockRequest`, `dismiss`.
42
+ 2. **PConnect APIs** — `actionsAPI` via `getPConnect().getActionsApi()`; `containerManagerAPI` via `getPConnect().getContainerManager()`; `isLocalAction` via `getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION)`; `isBulkAction` via `getPConnect()?.options?.isBulkAction` (a private property, may require suppressing type checks).
43
+ 3. **Localization setup** — `localizedVal` bound to `PCore.getLocaleUtils().getLocaleValue`; `localeCategory = 'ModalContainer'`.
44
+ 4. **Coexistence setup** — `broadCastUtils` via `PCore.getCoexistenceManager().getBroadcastUtils()`; `isReverseCoexistence` via `broadCastUtils.isReverseCoexistenceCaseLoaded()`.
45
+ 5. **Button ID constants** — an object `btnIds` with `SAVE_AND_CLOSE: 'saveAndClose'`, `CONTINUE_WORKING: 'continueWorking'`, `DELETE: 'delete'`.
46
+ 6. **Local state** — `buttonsState` initialized to `{ [btnIds.SAVE_AND_CLOSE]: false, [btnIds.DELETE]: false }`; `showSnackbar` initialized to `false`; `snackbarMessage` initialized to `''`.
47
+ 7. **Button enable/disable helpers** — `disableButton(id)` sets `buttonsState[id]` to `true` (via functional state update); `enableButton(id)` sets it to `false`.
48
+ 8. **`cancelHandler()`** — the "Discard" decision tree; see the Behavioral Contract "Discard" section.
49
+ 9. **`handleSnackbarClose(event, reason?)`** — returns without closing when `reason === 'clickaway'`, otherwise sets `showSnackbar` to `false`.
50
+ 10. **Build the "Go back" (`leftButton`) and "Discard" (`rightButton`) elements** — `leftButton`'s `onClick` calls `dismiss()` plus reverse-coexistence cleanup; `rightButton`'s `onClick` calls `cancelHandler()` and is disabled when `buttonsState[btnIds.DELETE]` is true. All button text is wrapped in `localizedVal(text, localeCategory)`.
51
+ 11. **Return** — a full-screen overlay `<div>` containing a dialog box `<div>` with a heading (`localizedVal(heading, localeCategory)`), body text (`localizedVal(content, localeCategory)`), and an action-controls row holding the two buttons ("Go back" as secondary, "Discard" as primary); alongside the dialog, a snackbar with `open={showSnackbar}`, `autoHideDuration={3000}`, and `message={snackbarMessage}`. See the Visual Specifications section for layout and CSS classes.
132
52
 
133
53
  ## Behavioral Contract
134
54
 
135
55
  ### Setup
136
56
 
137
- ```typescript
138
- // PConnect APIs
139
- const actionsAPI = getPConnect().getActionsApi();
140
- const containerManagerAPI = getPConnect().getContainerManager();
141
- const isLocalAction = getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION);
142
- // @ts-ignore - Property 'options' is private and only accessible within class 'C11nEnv'
143
- const isBulkAction = getPConnect()?.options?.isBulkAction;
144
-
145
- // Localization
146
- const localizedVal = PCore.getLocaleUtils().getLocaleValue;
147
- const localeCategory = 'ModalContainer';
148
-
149
- // Coexistence (store broadCastUtils — reused in Go back handler)
150
- const broadCastUtils: any = PCore.getCoexistenceManager().getBroadcastUtils();
151
- const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();
152
-
153
- // Button IDs (used as keys in buttonsState)
154
- const btnIds = {
155
- SAVE_AND_CLOSE: 'saveAndClose',
156
- CONTINUE_WORKING: 'continueWorking',
157
- DELETE: 'delete',
158
- };
159
- ```
57
+ `actionsAPI` is `getPConnect().getActionsApi()`; `containerManagerAPI` is `getPConnect().getContainerManager()`; `isLocalAction` is `getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION)`; `isBulkAction` is read from the private `getPConnect()?.options?.isBulkAction` (may require suppressing type checks since the property is private).
58
+
59
+ Localization: `localizedVal` is bound to `PCore.getLocaleUtils().getLocaleValue`; `localeCategory` is `'ModalContainer'`.
60
+
61
+ Coexistence: `broadCastUtils` is `PCore.getCoexistenceManager().getBroadcastUtils()` (stored for reuse in the Go back handler); `isReverseCoexistence` is `broadCastUtils.isReverseCoexistenceCaseLoaded()`.
62
+
63
+ Button IDs (used as keys in `buttonsState`): `btnIds = { SAVE_AND_CLOSE: 'saveAndClose', CONTINUE_WORKING: 'continueWorking', DELETE: 'delete' }`.
160
64
 
161
65
  ### State
162
66
 
@@ -166,34 +70,17 @@ const btnIds = {
166
70
 
167
71
  ### Helper Functions
168
72
 
169
- ```typescript
170
- function disableButton(id) {
171
- setButtonsState((prev) => ({ ...prev, [id]: true }));
172
- }
173
- function enableButton(id) {
174
- setButtonsState((prev) => ({ ...prev, [id]: false }));
175
- }
176
- ```
73
+ `disableButton(id)` sets `buttonsState[id]` to `true` via a functional state update (spreading the previous state). `enableButton(id)` sets it to `false` the same way.
177
74
 
178
75
  ### "Go back" button (`leftButton`)
179
76
 
180
- Always calls `dismiss()` (no argument = don't confirm). If `isReverseCoexistence`:
181
-
182
- ```
183
- broadCastUtils.setCallBackFunction(null)
184
- broadCastUtils.setIsDirtyDialogActive(false)
185
- ```
77
+ Always calls `dismiss()` (no argument = don't confirm). If `isReverseCoexistence`, additionally call `broadCastUtils.setCallBackFunction(null)` and `broadCastUtils.setIsDirtyDialogActive(false)`.
186
78
 
187
79
  ### "Discard" button (`rightButton`) — `cancelHandler()`
188
80
 
189
81
  Decision tree (evaluated in order):
190
82
 
191
- 1. **Reverse coexistence:**
192
-
193
- ```
194
- dismiss(true)
195
- PCore.getPubSubUtils().publish(REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD)
196
- ```
83
+ 1. **Reverse coexistence:** call `dismiss(true)`, then publish `PCore.getPubSubUtils().publish(REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD)`.
197
84
 
198
85
  2. **Standard case in create stage** (`!isDataObject && !isLocalAction && !isBulkAction`):
199
86
  - Disable delete button
@@ -202,25 +89,11 @@ Decision tree (evaluated in order):
202
89
  - `.catch()`: show snackbar with `'Delete failed.'`
203
90
  - `.finally()`: re-enable delete button, call `dismiss(true)`
204
91
 
205
- 3. **Local action** (`isLocalAction`):
206
-
207
- ```
208
- dismiss(true)
209
- actionsAPI.cancelAssignment(containerItemID, false)
210
- ```
211
-
212
- 4. **Bulk action** (`isBulkAction`):
92
+ 3. **Local action** (`isLocalAction`): call `dismiss(true)`, then `actionsAPI.cancelAssignment(containerItemID, false)`.
213
93
 
214
- ```
215
- dismiss(true)
216
- actionsAPI.cancelBulkAction(containerItemID)
217
- ```
94
+ 4. **Bulk action** (`isBulkAction`): call `dismiss(true)`, then `actionsAPI.cancelBulkAction(containerItemID)`.
218
95
 
219
- 5. **Data object or other** (default):
220
- ```
221
- dismiss(true)
222
- containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest })
223
- ```
96
+ 5. **Data object or other** (default): call `dismiss(true)`, then `containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest })`.
224
97
 
225
98
  ### Snackbar dismissal
226
99
 
@@ -242,50 +115,15 @@ Derived from `CancelAlert.css`:
242
115
 
243
116
  ### Full-screen overlay (`.cancel-alert-background`)
244
117
 
245
- ```css
246
- .cancel-alert-background {
247
- display: flex;
248
- flex-direction: column;
249
- justify-content: center;
250
- align-items: center;
251
- height: 100%;
252
- width: 100%;
253
- background-color: var(--modal-background-color);
254
- position: fixed;
255
- z-index: 9999;
256
- top: 0;
257
- left: 0;
258
- }
259
- ```
118
+ **Visual-only styling notes:** A fixed, full-viewport overlay (`position: fixed`, top/left `0`, `100%` height and width) with a high z-index (`9999`), using a semi-transparent modal background color, laid out as a centered flex column (both horizontally and vertically).
260
119
 
261
120
  ### Dialog box (`.cancel-alert-top`)
262
121
 
263
- ```css
264
- .cancel-alert-top {
265
- display: table;
266
- margin: auto;
267
- min-width: 550px;
268
- background-color: var(--modal-top-color);
269
- border: 1px solid var(--modal-border-color);
270
- border-radius: 10px;
271
- padding: 20px;
272
- box-shadow: 0 0 10px 3px var(--modal-box-shadow-color);
273
- }
274
- ```
122
+ **Visual-only styling notes:** A centered table-display box with a minimum width of 550px, a themed dialog background color, a 1px themed border, 10px border radius, 20px padding, and a themed drop shadow.
275
123
 
276
124
  ### Content layout
277
125
 
278
- ```
279
- .cancel-alert-top
280
- <h3>{heading}</h3>
281
- <div>
282
- <p>{content}</p>
283
- </div>
284
- <div class="action-controls">
285
- Grid container spacing=4, justifyContent='space-between'
286
- Grid → leftButton ("Go back", secondary/outlined)
287
- Grid → rightButton ("Discard", primary/contained, can be disabled)
288
- ```
126
+ Inside the `.cancel-alert-top` dialog box: a heading (`<h3>`) showing `heading`, a body paragraph showing `content`, and an `action-controls` row laid out as a grid container (spacing 4, `justifyContent='space-between'`) containing two grid items — the left one holding `leftButton` ("Go back", secondary/outlined) and the right one holding `rightButton` ("Discard", primary/contained, can be disabled).
289
127
 
290
128
  ### Button styles
291
129
 
@@ -322,19 +160,19 @@ Derived from `CancelAlert.css`:
322
160
  - `PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION`, `PUB_SUB_EVENTS.EVENT_CANCEL`, etc.
323
161
  - `PCore.getPubSubUtils().publish()` — for pub/sub events.
324
162
  - `PCore.getCoexistenceManager().getBroadcastUtils()` — for reverse coexistence handling.
325
- - Button, Grid, IconButton, Snackbar components.
326
- - Close icon.
327
- - `./CancelAlert.css` — must be imported.
163
+ - The DS's button, grid/layout, icon button, and snackbar/toast components.
164
+ - A close icon.
165
+ - A companion stylesheet for dialog/overlay styling.
328
166
 
329
167
  ## Design System Mapping
330
168
 
331
169
  **UI control type:** Full-screen modal confirmation dialog.
332
170
 
333
- Listed design systems are examples only.
171
+ When implementing in a specific design system, map the following:
334
172
 
335
- | Design System | Recommended Component |
336
- | ------------------ | ------------------------------------------------------------------------------------------- |
337
- | Default (CSS only) | `<div class="cancel-alert-background">` + `<div class="cancel-alert-top">` + CSS from above |
338
- | MUI | `<Button>`, `<Grid>`, `<Snackbar>`, `<IconButton>`, fixed overlay `<div>` |
339
- | Ant Design | `<Modal>` or custom overlay |
340
- | Chakra UI | `<Modal>` or `<AlertDialog>` |
173
+ - **Overlay** → use the DS's modal overlay or a fixed full-viewport container with semi-transparent background
174
+ - **Dialog box** → a centered card/container with heading, body text, and action buttons
175
+ - **"Go back" button** → secondary/outlined style button
176
+ - **"Discard" button** → primary/contained style button (disableable during async operations)
177
+ - **Snackbar/toast** → the DS's notification/toast component with auto-hide (3s) and manual close
178
+ - **Grid layout** → space the two buttons apart using the DS's layout utility