@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
  File and URL management utility widget. Displays case attachments and links, supports upload/download/delete, and provides modals for adding new files or URLs. Also covers `ActionButtonsForFileUtil` sub-component.
4
4
 
5
- > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
5
+ > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, input contract, data-fetching patterns, and registration conventions common to ALL widget components.
6
6
 
7
7
  ---
8
8
 
@@ -12,58 +12,34 @@ The primary attachments management panel in the case utilities column. Shows up
12
12
 
13
13
  ## Pega Metadata
14
14
 
15
- - **Registration key:** `FileUtility` (in `component-map.ts`)
15
+ - **Registration key:** `FileUtility` (in the project's component map)
16
16
  - **Category:** Widget — file management
17
- - **Extends:** `PConnProps`
17
+ - **Extends:** The project's base component interface
18
18
 
19
- ## Props
19
+ ## Inputs
20
20
 
21
21
  | Prop | Type | Required | Description |
22
22
  | ------------- | ---------- | -------- | --------------------------------------------------------------------------------- |
23
23
  | `caseId` | `string` | No | Optional case ID override. If absent, resolved from `pConn.getCaseInfo().getID()` |
24
24
  | `getPConnect` | `function` | Yes | PConnect getter |
25
25
 
26
- ## Component Skeleton
26
+ ## Implementation Structure
27
27
 
28
28
  This is the largest widget (~500 lines). Key structural outline:
29
29
 
30
- ```typescript
31
- import { useEffect, useState } from 'react';
32
- import { debounce } from '@mui/material';
33
- import download from 'downloadjs';
34
- import { Utils } from '../../../helpers/utils';
35
- import { validateMaxSize } from '../../../helpers/attachmentShared';
36
- import { getComponentFromRegistry } from '@pega/sdk-react';
37
- import type { PConnProps } from '@pega/sdk-react';
38
- import './FileUtility.css';
39
-
40
- export default function FileUtility(props: FileUtilityProps) {
41
- const SummaryList = getComponentFromRegistry('SummaryList');
42
- const ActionButtonsForFileUtil = getComponentFromRegistry('ActionButtonsForFileUtil');
43
- const { getPConnect, caseId } = props;
44
- const thePConn = getPConnect();
45
- const caseID = caseId ?? thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, '');
46
-
47
- // 1. State: list (top 3), fileData (add-file modal), linkData (add-link modal), link fields
48
- const [list, setList] = useState({ data: [], count: 0 });
49
- const [fileData, setFileData] = useState({ showfileModal: false, fileList: [], attachedFiles: [], ... });
50
- const [linkData, setLinkData] = useState({ showLinkModal: false, linksList: [], attachedLinks: [], ... });
51
- const [link, setLink] = useState({ title: '', url: '', disable: true });
52
-
53
- // 2. getAttachments — fetches case attachments, builds SummaryItem-compatible objects
54
- // 3. debouncedGetAttachments — debounce(getAttachments, 1000)
55
- // 4. useEffect: subscribe to messaging service for ATTACHMENTS changes
56
- // 5. downloadAttachedFile / deleteAttachedFile handlers
57
- // 6. onAttachFiles — upload + linkAttachmentsToCase
58
- // 7. onAttachLinks — linkAttachmentsToCase with URL category
59
-
60
- // 8. Render: Card with header + SummaryList(top 3) + View All button
61
- // + Add File modal (input + SummaryList + ActionButtons)
62
- // + Add Link modal (title + url fields + ActionButtons)
63
- // + View All modal (full SummaryList)
64
- return <Card>...</Card>;
65
- }
66
- ```
30
+ **Module Setup:** The component depends on lifecycle effects and local state management, a debounce utility, a file-download utility, the project's SDK utility helpers, the project's attachment-validation helpers, and the project's component registry (to resolve `SummaryList` and `ActionButtonsForFileUtil`). Define the input contract as an extension of the project's base component interface.
31
+
32
+ **Main Component Logic** — steps in order:
33
+
34
+ 1. Resolve `SummaryList` and `ActionButtonsForFileUtil` from the project's component registry. Receive `getPConnect` and `caseId` from inputs; call `getPConnect()` into `thePConn`; resolve `caseID` from `caseId ?? thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, '')`.
35
+ 2. Declare state: `list` (an object with `data` array and `count`, default `{ data: [], count: 0 }`) for the top-3 display; `fileData` (an object tracking the add-file modal's `showfileModal`, `fileList`, `attachedFiles`, and related fields); `linkData` (an object tracking the add-link modal's `showLinkModal`, `linksList`, `attachedLinks`, and related fields); and `link` (an object with `title`, `url`, and `disable`, default `{ title: '', url: '', disable: true }`).
36
+ 3. Define `getAttachments`: fetches case attachments and builds `SummaryItem`-compatible objects from them.
37
+ 4. Define `debouncedGetAttachments` as `debounce(getAttachments, 1000)`.
38
+ 5. In a lifecycle effect, subscribe to the messaging service for attachment-change events so the list stays fresh.
39
+ 6. Define `downloadAttachedFile` and `deleteAttachedFile` handlers.
40
+ 7. Define `onAttachFiles`: uploads the selected file(s) and links them to the case.
41
+ 8. Define `onAttachLinks`: links the given URL(s) to the case with the URL category.
42
+ 9. **Render**: a `Card` containing a header, a `SummaryList` showing the top 3 items, and a "View all" button; an Add File modal (file input + `SummaryList` + `ActionButtonsForFileUtil`); an Add Link modal (title + url fields + `ActionButtonsForFileUtil`); and a View All modal (the full `SummaryList`).
67
43
 
68
44
  > **Key patterns:** Debounced refresh (1000ms) on messaging subscription, `linkAttachmentsToCase` after upload, `ActionButtonsForFileUtil` for modal button rows, `SummaryList` for item display.
69
45
 
@@ -71,25 +47,13 @@ export default function FileUtility(props: FileUtilityProps) {
71
47
 
72
48
  ### Attachment Fetch
73
49
 
74
- On mount and on attachment change events:
75
-
76
- ```typescript
77
- const caseID = caseId ?? thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, '');
78
- // Do NOT use pConn.getCaseInfo().getID() — it may return the wrong format
79
- PCore.getAttachmentUtils().getCaseAttachments(caseID, context);
80
- ```
50
+ On mount and on attachment change events, resolve `caseID` from `caseId ?? thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, '')` — do NOT use `pConn.getCaseInfo().getID()`, since it may return the wrong format — then call `PCore.getAttachmentUtils().getCaseAttachments(caseID, context)`.
81
51
 
82
52
  Returns array of attachment/link objects. Store in `attachments` state. Guard: only fetch if `caseID` is non-empty.
83
53
 
84
54
  ### Pub/Sub Subscription
85
55
 
86
- Subscribe to the case attachments event for auto-refresh:
87
-
88
- ```typescript
89
- const eventName = (PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW;
90
- PCore.getPubSubUtils().subscribe(eventName, refresh, 'FileUtility');
91
- // Cleanup: PCore.getPubSubUtils().unsubscribe(eventName, 'FileUtility');
92
- ```
56
+ Subscribe to the case attachments event for auto-refresh: resolve `eventName` from `(PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW`, then call `PCore.getPubSubUtils().subscribe(eventName, refresh, 'FileUtility')`. On cleanup, call `PCore.getPubSubUtils().unsubscribe(eventName, 'FileUtility')`.
93
57
 
94
58
  This ensures attachments refresh when CaseView publishes the update event.
95
59
 
@@ -103,31 +67,15 @@ Show only the first 3 items from `attachments`. If `attachments.length > 3`, sho
103
67
 
104
68
  ### SummaryList Integration
105
69
 
106
- Map each attachment/link to a `SummaryItem`-compatible object:
107
-
108
- ```typescript
109
- {
110
- id: attachment.ID,
111
- visual: { icon: getFileIcon(attachment.mimeType) },
112
- primary: {
113
- type: attachment.category === 'FILE' ? 'FILE' : 'URL',
114
- name: attachment.name,
115
- click: () => handleDownloadOrOpen(attachment)
116
- },
117
- secondary: { text: attachment.createdBy + ' · ' + formatDate(attachment.createTime) }
118
- actions: [
119
- { id: 'delete', text: 'Delete', icon: 'trash', onClick: () => handleDelete(attachment.ID) }
120
- ]
121
- }
122
- ```
123
-
124
- Pass to `<SummaryList arItems$={summaryItems} />`.
70
+ Map each attachment/link to a `SummaryItem`-compatible object with: `id` from `attachment.ID`; `visual.icon` from `getFileIcon(attachment.mimeType)`; a `primary` object with `type` set to `'FILE'` or `'URL'` based on `attachment.category`, `name` from `attachment.name`, and a `click` handler that calls `handleDownloadOrOpen(attachment)`; a `secondary.text` combining `attachment.createdBy` and the formatted `attachment.createTime`; and an `actions` array with a single delete entry (`id: 'delete'`, label "Delete", trash icon, calling `handleDelete(attachment.ID)` on click).
71
+
72
+ Pass the resulting array to `<SummaryList arItems$={summaryItems} />`.
125
73
 
126
74
  ### File Upload
127
75
 
128
76
  1. User clicks "Add files" from the overflow menu (three-dot icon).
129
77
  2. Opens an add-file modal (DS Modal/Dialog component with `primaryButtonText="Attach"` and `secondaryButtonText="Cancel"`).
130
- 3. User selects a file via the DS file uploader button — do NOT use a plain `<input type='file'>`. Use the DS's styled file upload component (e.g., Carbon `FileUploaderButton`, Ant Design `Upload`, Chakra `Input type="file"` with custom styling). Show the selected file name below the button.
78
+ 3. User selects a file via the DS file uploader component — do NOT use a bare unstyled file input. Use the DS's styled file upload component for visual consistency. Show the selected file name below the button.
131
79
  4. "Attach" button is disabled until a file is selected.
132
80
  5. On confirm: call `PCore.getAttachmentUtils().uploadAttachment(file, onProgress, onError, context)`.
133
81
  6. On success: call `PCore.getAttachmentUtils().linkAttachmentsToCase(caseKey, [newAttachment], 'FILE', context)`.
@@ -212,7 +160,7 @@ Render a `<MoreVertIcon>` `<IconButton>` that opens a `<Menu>` with:
212
160
 
213
161
  A simple button row component used inside the FileUtility modals to render Cancel + primary action buttons.
214
162
 
215
- ### Props
163
+ ### Inputs
216
164
 
217
165
  | Prop | Type | Required | Description |
218
166
  | -------------------- | ---------- | -------- | ------------------------------------------------------------ |
@@ -224,10 +172,7 @@ A simple button row component used inside the FileUtility modals to render Cance
224
172
 
225
173
  ### Layout
226
174
 
227
- ```
228
- [Secondary buttons (left)] [Primary buttons (right)]
229
- Cancel Attach
230
- ```
175
+ The secondary (Cancel) buttons render on the left and the primary (Attach) buttons render on the right, in a single row.
231
176
 
232
177
  - Secondary buttons: outlined/text style.
233
178
  - Primary buttons: contained/filled style with theme primary color.
@@ -246,28 +191,22 @@ A simple button row component used inside the FileUtility modals to render Cance
246
191
  - `PCore.getAttachmentUtils()` — getCaseAttachments, uploadAttachment, downloadAttachment, deleteAttachment, linkAttachmentsToCase
247
192
  - `PCore.getMessagingServiceManager()` — subscribe to attachment change events
248
193
  - `PCore.getConstants()` — case info ID, summary refresh timing
249
- - `getComponentFromRegistry('SummaryList')` — renders the attachment item list
250
- - `getComponentFromRegistry('ActionButtonsForFileUtil')` — renders modal action buttons
251
- - `downloadjs` — browser file download trigger
252
- - MUI: `<Card>`, `<CardHeader>`, `<CardContent>`, `<IconButton>`, `<Menu>`, `<MenuItem>`, `<Button>`, `<TextField>`, `<Dialog>`, `<CircularProgress>`
253
- - MUI Icons: `<MoreVertIcon>`
194
+ - The project's component registry, resolving `SummaryList` — renders the attachment item list.
195
+ - The project's component registry, resolving `ActionButtonsForFileUtil` — renders modal action buttons.
196
+ - A file-download utility — browser file download trigger.
197
+ - The DS's card, icon button, menu, button, text input, modal/dialog, and progress indicator components.
254
198
 
255
199
  ## Design System Mapping
256
200
 
257
201
  **UI control type:** File management widget — attachment list with upload/download/delete and add modals.
258
202
 
259
- Listed design systems are examples only.
260
-
261
- | Design System | Card | Action Menu | Modal | Progress |
262
- | ------------------ | ------------ | ------------------------------------ | ---------- | ------------------------------------------ |
263
- | Default (CSS only) | `<div>` card | `<button>` + custom dropdown | `<dialog>` | CSS progress bar |
264
- | MUI | `<Card>` | `<IconButton>` + `<Menu>/<MenuItem>` | `<Dialog>` | `<CircularProgress>` or `<LinearProgress>` |
265
- | Ant Design | `<Card>` | `<Dropdown menu={{ items }}>` | `<Modal>` | `<Progress>` |
266
- | Chakra UI | `<Card>` | `<Menu>/<MenuButton>/<MenuList>` | `<Modal>` | `<Progress>` |
267
- | Shadcn/ui | `<Card>` | `<DropdownMenu>` | `<Dialog>` | Custom progress bar |
268
-
269
- When implementing in a specific design system:
203
+ When implementing in a specific design system, map the following:
270
204
 
271
- - Debounced refresh (1000ms) after pub-sub attachment events is required — prevents excessive API calls
205
+ - **Card** → use the DS's card component for the main panel
206
+ - **Action menu** → use the DS's overflow/dropdown menu (three-dot icon button)
207
+ - **Modal/dialog** → use the DS's modal or dialog for add-file, add-link, and view-all overlays
208
+ - **Progress indicator** → use the DS's progress bar or spinner for upload progress
209
+ - **File upload** → use the DS's styled file uploader component (not a bare file input)
210
+ - Debounced refresh (1000ms) after pub-sub attachment events is required
272
211
  - `linkAttachmentsToCase` must be called after upload — uploading alone does not attach to the case
273
212
  - `ActionButtonsForFileUtil` receives button definition arrays — render them generically from `arMainButtons`/`arSecondaryButtons`
@@ -2,7 +2,7 @@
2
2
 
3
3
  Followers widget. Displays the list of users following the current case. Currently a stub/placeholder in the reference implementation — renders an "unsupported" message.
4
4
 
5
- > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
5
+ > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, input contract, data-fetching patterns, and registration conventions common to ALL widget components.
6
6
 
7
7
  ---
8
8
 
@@ -12,37 +12,29 @@ Intended to display the list of operators following a case, allowing users to fo
12
12
 
13
13
  ## Pega Metadata
14
14
 
15
- - **Registration key:** `Followers` (in `component-map.ts`)
15
+ - **Registration key:** `Followers` (in the project's component map)
16
16
  - **Category:** Widget — social / collaboration
17
- - **Extends:** `PConnProps`
17
+ - **Extends:** The project's base component interface
18
18
 
19
- ## Props
19
+ ## Inputs
20
20
 
21
- | Prop | Type | Required | Description |
21
+ | Name | Type | Required | Description |
22
22
  | ------------- | ---------- | -------- | --------------- |
23
23
  | `getPConnect` | `function` | Yes | PConnect getter |
24
24
 
25
- ## Component Skeleton
25
+ ## Implementation Structure
26
26
 
27
- Stub implementation:
27
+ This is a stub implementation.
28
28
 
29
- ```typescript
30
- import type { PropsWithChildren } from 'react';
31
- import type { PConnProps } from '@pega/sdk-react';
29
+ **Module Setup:** Define the input contract as an extension of the project's base component interface, accepting children via the framework's content projection mechanism.
32
30
 
33
- export default function Followers(props: PropsWithChildren<PConnProps>) {
34
- return (
35
- <Card>
36
- <CardHeader><h6>Followers - <em>unsupported</em></h6></CardHeader>
37
- <CardContent>Followers content</CardContent>
38
- </Card>
39
- );
40
- }
41
- ```
31
+ **Main Component Logic** — steps in order:
32
+
33
+ 1. Render a `Card` containing a `CardHeader` with the heading text "Followers - " followed by the word "unsupported" in emphasis/italic styling, and a `CardContent` block with the plain text "Followers content".
42
34
 
43
35
  > A production implementation would fetch from `D_pyCaseFollowers` and provide follow/unfollow actions.
44
36
 
45
- No additional custom props in the current stub implementation. A full implementation would likely include:
37
+ No additional custom inputs in the current stub implementation. A full implementation would likely include:
46
38
 
47
39
  - `datasource` — data page name for follower list
48
40
  - `headerText` — widget title (e.g., `"Followers"`)
@@ -99,25 +91,18 @@ No additional custom props in the current stub implementation. A full implementa
99
91
 
100
92
  ## Dependencies
101
93
 
102
- - MUI: `<Card>`, `<CardContent>`, `<CardHeader>`, `<Typography>` (current stub)
103
- - Future full implementation would add: `<Avatar>`, `<Button>`, `<Badge>`, pub-sub subscriptions
94
+ - The DS's card and text components (current stub).
95
+ - Future full implementation would add: avatar, button, badge components, and pub-sub subscriptions.
104
96
 
105
97
  ## Design System Mapping
106
98
 
107
99
  **UI control type:** Social widget — follower list with follow/unfollow action.
108
100
 
109
- Listed design systems are examples only.
110
-
111
- | Design System | Card | Avatar | Toggle Button |
112
- | ------------------ | --------------------- | ------------------------ | ------------------------- |
113
- | Default (CSS only) | `<div>` with border | CSS circle with initials | `<button>` |
114
- | MUI | `<Card>` + `<Avatar>` | `<Avatar>` | `<Button>` variant toggle |
115
- | Ant Design | `<Card>` | `<Avatar>` | `<Button>` |
116
- | Chakra UI | `<Card>` | `<Avatar>` | `<Button>` |
117
- | Shadcn/ui | `<Card>` | Custom avatar | `<Button>` |
118
-
119
- When implementing in a specific design system:
101
+ When implementing in a specific design system, map the following:
120
102
 
103
+ - **Card** → use the DS's card component for the widget container
104
+ - **Avatar** → use the DS's avatar/initials component for follower display
105
+ - **Follow/unfollow toggle** → use the DS's button component with toggle state
121
106
  - The current stub only needs a card with a message — implement the full behavior once the Pega backend supports it
122
107
  - Follow/unfollow must be scoped to the current case (`caseKey` from `pConn.getCaseInfo().getKey()`)
123
108
  - Follower count badge in the card header improves scannability
@@ -2,7 +2,7 @@
2
2
 
3
3
  Quick case creation widget. Renders a set of buttons — one per available case type — allowing users to create cases directly from the widget without navigating to a separate form.
4
4
 
5
- > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
5
+ > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, input contract, data-fetching patterns, and registration conventions common to ALL widget components.
6
6
 
7
7
  ---
8
8
 
@@ -12,11 +12,11 @@ Provides a shortcut panel for creating new cases. Case types are sourced from th
12
12
 
13
13
  ## Pega Metadata
14
14
 
15
- - **Registration key:** `QuickCreate` (in `component-map.ts`)
15
+ - **Registration key:** `QuickCreate` (in the project's component map)
16
16
  - **Category:** Widget — action / case creation
17
- - **Extends:** `PConnProps`
17
+ - **Extends:** The project's base component interface
18
18
 
19
- ## Props
19
+ ## Inputs
20
20
 
21
21
  | Prop | Type | Required | Description |
22
22
  | --------------- | ---------- | -------- | --------------------------------------------------------------------------- |
@@ -25,89 +25,32 @@ Provides a shortcut panel for creating new cases. Case types are sourced from th
25
25
  | `classFilter` | `any[]` | No | Array of class names to filter available case types. Empty array = show all |
26
26
  | `getPConnect` | `function` | Yes | PConnect getter |
27
27
 
28
- ## Component Skeleton
29
-
30
- ```typescript
31
- import { useEffect, useState } from 'react';
32
- import { Utils } from '../../helpers/utils';
33
- import { getComponentFromRegistry } from '@pega/sdk-react';
34
- import type { PConnProps } from '@pega/sdk-react';
35
-
36
- interface QuickCreateProps extends PConnProps {
37
- heading: string;
38
- showCaseIcons: boolean;
39
- classFilter: any[];
40
- }
41
-
42
- export default function QuickCreate(props: QuickCreateProps) {
43
- const WssQuickCreate = getComponentFromRegistry('WssQuickCreate');
44
- const { getPConnect, heading, showCaseIcons, classFilter } = props;
45
- const pConn = getPConnect();
46
- const [quickCreateCases, setCases] = useState([]);
47
-
48
- useEffect(() => {
49
- // 1. Read case types from envInfo or fallback to portal config
50
- const envInfo = PCore.getEnvironmentInfo();
51
- let defaultCases = [];
52
- if (envInfo?.environmentInfoObject?.pyCaseTypeList) {
53
- defaultCases = envInfo.environmentInfoObject.pyCaseTypeList.map(ct => ({
54
- classname: ct.pyWorkTypeImplementationClassName,
55
- label: ct.pyWorkTypeName,
56
- onClick: () => pConn.getActionsApi().createWork(ct.pyWorkTypeImplementationClassName, {}),
57
- ...(showCaseIcons && { icon: Utils.getImageSrc(ct.pxIcon, Utils.getSDKStaticConentUrl()) }),
58
- }));
59
- } else {
60
- // Launchpad fallback: read from store/portal config
61
- }
62
-
63
- // 2. Apply classFilter (empty = show all)
64
- if (classFilter?.length > 0) {
65
- setCases(defaultCases.filter(c => classFilter.includes(c.classname)));
66
- } else {
67
- setCases(defaultCases);
68
- }
69
- }, []);
70
-
71
- // 3. Delegate rendering to WssQuickCreate DSE
72
- return <WssQuickCreate heading={heading} actions={quickCreateCases} />;
73
- }
74
- ```
28
+ ## Implementation Structure
29
+
30
+ **Module Setup:** The component depends on lifecycle effects, local state management, the project's SDK utility helpers, and the project's component registry (to resolve `WssQuickCreate`). Define the input contract as an extension of the project's base component interface with `heading`, `showCaseIcons`, and `classFilter` fields.
31
+
32
+ **Main Component Logic** — steps in order:
33
+
34
+ 1. Resolve `WssQuickCreate` from the project's component registry. Receive `getPConnect`, `heading`, `showCaseIcons`, and `classFilter` from inputs; call `getPConnect()` into `pConn`. Declare `quickCreateCases` local state (default `[]`).
35
+ 2. In a lifecycle effect that runs once on initialization: read `PCore.getEnvironmentInfo()` into `envInfo`; when `envInfo?.environmentInfoObject?.pyCaseTypeList` is present, map each case type entry to `{ classname: ct.pyWorkTypeImplementationClassName, label: ct.pyWorkTypeName, onClick: () => pConn.getActionsApi().createWork(ct.pyWorkTypeImplementationClassName, {}), ...(showCaseIcons and { icon: Utils.getImageSrc(ct.pxIcon, Utils.getSDKStaticConentUrl()) } when showCaseIcons is true) }` into `defaultCases`; otherwise (Launchpad mode), fall back to reading case types from the store/portal config.
36
+ 3. Apply `classFilter`: when it has entries, filter `defaultCases` down to only those whose `classname` is included in `classFilter`; otherwise use `defaultCases` unfiltered (empty filter array means show all). Store the result via `setCases`.
37
+ 4. Delegate rendering entirely to the `WssQuickCreate` design system extension component, passing `heading` and the resolved `quickCreateCases` as its `actions` prop.
75
38
 
76
39
  ## Behavioral Contract
77
40
 
78
41
  ### Case Types Resolution
79
42
 
80
43
  1. Read `PCore.getEnvironmentInfo().environmentInfoObject.pyCaseTypeList` — the primary source.
81
- 2. If the list is empty or unavailable (e.g., Launchpad mode), fall back to the app portal config:
82
- ```
83
- PCore.getConfig().getApplicationName() // or portal config equivalent
84
- ```
44
+ 2. If the list is empty or unavailable (e.g., Launchpad mode), fall back to the app portal config equivalent of `PCore.getConfig().getApplicationName()`.
85
45
  3. Apply `classFilter`: if `classFilter` is non-empty, retain only case types whose class name is included in the array.
86
46
 
87
47
  ### Case Type Object Mapping
88
48
 
89
- For each case type, build:
90
-
91
- ```typescript
92
- {
93
- classname: caseType.pyClassName,
94
- label: caseType.pyLabel,
95
- onClick: () => pConn.getActionsApi().createWork(caseType.pyClassName, {
96
- openCaseViewAfterCreate: true,
97
- containerName: PCore.getConstants().APP.APP
98
- }),
99
- icon: showCaseIcons ? getIconURL(caseType.pyClassName) : undefined
100
- }
101
- ```
49
+ For each case type, build an object with: `classname` from `caseType.pyClassName`; `label` from `caseType.pyLabel`; an `onClick` handler that calls `pConn.getActionsApi().createWork(caseType.pyClassName, { openCaseViewAfterCreate: true, containerName: PCore.getConstants().APP.APP })`; and, when `showCaseIcons` is true, an `icon` resolved via `getIconURL(caseType.pyClassName)` (otherwise `undefined`).
102
50
 
103
51
  ### Rendering Delegation
104
52
 
105
- Pass the mapped case type array to `WssQuickCreate` (retrieved via `getComponentFromRegistry('WssQuickCreate')`):
106
-
107
- ```tsx
108
- const WssQuickCreate = getComponentFromRegistry('WssQuickCreate');
109
- return <WssQuickCreate heading={heading} caseTypes={caseTypeObjects} />;
110
- ```
53
+ Pass the mapped case type array to `WssQuickCreate` (resolved from the project's component registry), passing `heading` and the resolved case type objects as its `actions` input.
111
54
 
112
55
  This component handles all button rendering — `QuickCreate` is purely a data-preparation orchestrator.
113
56
 
@@ -136,31 +79,23 @@ Visual rendering is owned by `WssQuickCreate` (a design system extension compone
136
79
 
137
80
  ## Dependencies
138
81
 
139
- - `getComponentFromRegistry('WssQuickCreate')` — design system extension for case type button rendering
140
- - `pConn.getActionsApi().createWork()` — triggers case creation
141
- - `PCore.getEnvironmentInfo()` — primary source for available case types
142
- - `PCore.getConstants().APP.APP` — app context constant
82
+ - The project's component registry, resolving `WssQuickCreate` — design system extension for case type button rendering.
83
+ - `pConn.getActionsApi().createWork()` — triggers case creation.
84
+ - `PCore.getEnvironmentInfo()` — primary source for available case types.
85
+ - `PCore.getConstants().APP.APP` — app context constant.
143
86
 
144
87
  ## Design System Mapping
145
88
 
146
89
  **UI control type:** Quick-action panel with one button per available case type.
147
90
 
148
- Listed design systems are examples only.
149
-
150
91
  Rendering is delegated to `WssQuickCreate` — implement that DSE component for your design system. `QuickCreate` itself has no direct UI output beyond the delegation.
151
92
 
152
- If implementing without `WssQuickCreate`:
93
+ When implementing in a specific design system without `WssQuickCreate`, map the following:
153
94
 
154
- | Design System | Button List |
155
- | ------------------ | --------------------------------------------------------- |
156
- | Default (CSS only) | `<button>` list with optional `<img>` icon |
157
- | MUI | `<List>` + `<ListItemButton>` or `<Button>` stack |
158
- | Ant Design | `<Space direction='vertical'>` + `<Button>` per case type |
159
- | Chakra UI | `<VStack>` + `<Button>` per case type |
160
- | Shadcn/ui | `<div>` stack + `<Button variant='outline'>` |
95
+ - **Button list** → use the DS's button or list-item-button component, one per case type
96
+ - **Icon** → render the case type icon when `showCaseIcons` is true
97
+ - **Click handler** → wire to `pConn.getActionsApi().createWork(classname, {})`
161
98
 
162
- When implementing in a specific design system:
99
+ `classFilter` empty array = show ALL case types (not zero) — this is a common gotcha. `createWork` must be called with the correct `containerName` constant (`APP.APP`).
163
100
 
164
- - `classFilter` empty array = show ALL case types (not zero) — this is a common gotcha
165
- - `createWork` must be called with the correct `containerName` constant (`APP.APP`)
166
101
  - `showCaseIcons` is optional — only fetch/render icons when this prop is `true`