@pega/sdk 0.0.4 → 0.0.5

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 (317) hide show
  1. package/dist/index.js +287 -1
  2. package/package.json +1 -1
  3. package/templates/angular-sdk-reference/package.json +12 -12
  4. package/templates/angular-sdk-reference/tsconfig.json +1 -1
  5. package/templates/react-native-sdk-reference/expo-env.d.ts +3 -0
  6. package/templates/react-sdk-reference/{.github/agents/implementation-expert.agent.md → .ai-common/agents/implementation-expert.md} +23 -26
  7. package/templates/react-sdk-reference/{.github/copilot-instructions.md → .ai-common/global/ai-agent-instructions.md} +7 -7
  8. package/templates/react-sdk-reference/{.github/instructions/component-map.instructions.md → .ai-common/instructions/component-map.md} +8 -1
  9. package/templates/react-sdk-reference/{.github/instructions/dse-component.instructions.md → .ai-common/instructions/dse-component.md} +1 -1
  10. package/templates/react-sdk-reference/{.github/instructions/field-component.instructions.md → .ai-common/instructions/field-component.md} +2 -1
  11. package/templates/react-sdk-reference/{.github/instructions/template-component.instructions.md → .ai-common/instructions/template-component.md} +1 -1
  12. package/templates/react-sdk-reference/{.github/instructions/widget-component.instructions.md → .ai-common/instructions/widget-component.md} +1 -1
  13. package/templates/react-sdk-reference/{.github/prompts/add-component.prompt.md → .ai-common/prompts/add-component.md} +45 -18
  14. package/templates/react-sdk-reference/{.cursor/rules → .ai-common}/prompts/component-manifest.json +8 -2
  15. package/templates/react-sdk-reference/{.github/prompts/generate-all-components.prompt.md → .ai-common/prompts/generate-all-components.md} +195 -78
  16. package/templates/react-sdk-reference/{.github/prompts/generate-dse-components.prompt.md → .ai-common/prompts/generate-dse-components.md} +28 -17
  17. package/templates/react-sdk-reference/{.github/prompts/generate-field-components.prompt.md → .ai-common/prompts/generate-field-components.md} +32 -16
  18. package/templates/react-sdk-reference/{.github/prompts/generate-template-components.prompt.md → .ai-common/prompts/generate-template-components.md} +76 -22
  19. package/templates/react-sdk-reference/{.github/prompts/generate-widget-components.prompt.md → .ai-common/prompts/generate-widget-components.md} +44 -30
  20. package/templates/react-sdk-reference/{.claude → .ai-common}/prompts/identify-components.md +4 -0
  21. package/templates/react-sdk-reference/{.cursor/rules/prompts/replace-design-system.mdrules → .ai-common/prompts/replace-design-system.md} +2 -3
  22. package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/AlertBanner.md +50 -0
  23. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/Banner.md +44 -0
  24. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/CaseSummaryFields.md +54 -0
  25. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/DetailsFields.md +49 -0
  26. package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/FieldGroup.md +44 -0
  27. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/FieldGroupList.md +43 -0
  28. package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/FieldValueList.md +46 -0
  29. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/Operator.md +67 -0
  30. package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/Pulse.md +20 -0
  31. package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/RichTextEditor.md +58 -0
  32. package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/WssQuickCreate.md +31 -0
  33. package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension.md +1 -1
  34. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-components.md +18 -1
  35. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +298 -0
  36. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/CancelAlert.md +132 -3
  37. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +358 -0
  38. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +230 -0
  39. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +221 -0
  40. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +213 -0
  41. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Decimal.md +112 -13
  42. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Dropdown.md +127 -1
  43. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Email.md +68 -0
  44. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Group.md +51 -0
  45. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Integer.md +81 -0
  46. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Location.md +105 -0
  47. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Multiselect.md +70 -0
  48. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/ObjectReference.md +74 -0
  49. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Percentage.md +84 -0
  50. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Phone.md +81 -0
  51. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/RadioButtons.md +93 -0
  52. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/RichText.md +85 -0
  53. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/ScalarList.md +54 -0
  54. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/SelectableCard.md +55 -0
  55. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/SemanticLink.md +64 -0
  56. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/TextArea.md +66 -0
  57. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/TextContent.md +28 -0
  58. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/TextInput.md +67 -0
  59. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Time.md +67 -0
  60. package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/URL.md +59 -0
  61. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/UserReference.md +90 -0
  62. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-components.md +83 -52
  63. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/AdvancedSearch.md +77 -0
  64. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +273 -0
  65. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/BannerPage.md +39 -0
  66. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/CaseSummary.md +79 -0
  67. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +399 -0
  68. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +282 -0
  69. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/Confirmation.md +89 -0
  70. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DataReference.md +50 -0
  71. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DefaultForm.md +117 -0
  72. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DefaultPage.md +49 -0
  73. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/Details.md +59 -0
  74. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/DetailsSubTabs.md +60 -0
  75. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DetailsThreeColumn.md +12 -0
  76. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/DetailsTwoColumn.md +12 -0
  77. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DynamicTabs.md +67 -0
  78. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/FieldGroupTemplate.md +119 -0
  79. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/HierarchicalForm.md +45 -0
  80. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/InlineDashboard.md +41 -0
  81. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/InlineDashboardPage.md +56 -0
  82. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/ListPage.md +18 -0
  83. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +419 -0
  84. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/MultiReferenceReadOnly.md +40 -0
  85. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/NarrowWide.md +66 -0
  86. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/OneColumn.md +34 -0
  87. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/PromotedFilters.md +92 -0
  88. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/SelfServiceCaseView.md +56 -0
  89. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/SimpleTable.md +59 -0
  90. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/SingleReferenceReadOnly.md +52 -0
  91. package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/SubTabs.md +47 -0
  92. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/TwoColumn.md +49 -0
  93. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/WssNavBar.md +71 -0
  94. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-components.md +1 -1
  95. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/AppAnnouncement.md +38 -1
  96. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/Attachment.md +58 -0
  97. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/CaseHistory.md +63 -0
  98. package/templates/react-sdk-reference/{.github → .ai-common}/skills/widget-skills/FileUtility.md +81 -14
  99. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/Followers.md +20 -0
  100. package/templates/react-sdk-reference/{.github → .ai-common}/skills/widget-skills/QuickCreate.md +48 -0
  101. package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/SummaryItem.md +66 -0
  102. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +492 -0
  103. package/templates/react-sdk-reference/package.minimal.json +29 -0
  104. package/templates/react-sdk-reference/src/AppProviders.tsx +17 -0
  105. package/templates/react-sdk-reference/src/MashupApp.tsx +8 -19
  106. package/templates/react-sdk-reference/src/PortalApp.tsx +6 -17
  107. package/templates/react-sdk-reference/.claude/instructions/component-map.md +0 -38
  108. package/templates/react-sdk-reference/.claude/instructions/dse-component.md +0 -75
  109. package/templates/react-sdk-reference/.claude/instructions/field-component.md +0 -75
  110. package/templates/react-sdk-reference/.claude/instructions/template-component.md +0 -93
  111. package/templates/react-sdk-reference/.claude/instructions/widget-component.md +0 -88
  112. package/templates/react-sdk-reference/.claude/prompts/add-component.md +0 -152
  113. package/templates/react-sdk-reference/.claude/prompts/component-manifest.json +0 -193
  114. package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +0 -158
  115. package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +0 -140
  116. package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +0 -153
  117. package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +0 -165
  118. package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +0 -138
  119. package/templates/react-sdk-reference/.claude/prompts/replace-design-system.md +0 -519
  120. package/templates/react-sdk-reference/.claude/skills/component-contracts.md +0 -140
  121. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +0 -137
  122. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +0 -134
  123. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +0 -118
  124. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +0 -85
  125. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +0 -232
  126. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/WssQuickCreate.md +0 -137
  127. package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +0 -291
  128. package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +0 -113
  129. package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +0 -175
  130. package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +0 -109
  131. package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +0 -101
  132. package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +0 -106
  133. package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +0 -88
  134. package/templates/react-sdk-reference/.claude/skills/field-skills/Multiselect.md +0 -188
  135. package/templates/react-sdk-reference/.claude/skills/field-skills/ObjectReference.md +0 -173
  136. package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +0 -93
  137. package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +0 -129
  138. package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +0 -167
  139. package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +0 -149
  140. package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +0 -134
  141. package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +0 -231
  142. package/templates/react-sdk-reference/.claude/skills/field-skills/SemanticLink.md +0 -155
  143. package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +0 -107
  144. package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +0 -89
  145. package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +0 -86
  146. package/templates/react-sdk-reference/.claude/skills/template-components.md +0 -321
  147. package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +0 -150
  148. package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +0 -124
  149. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +0 -106
  150. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +0 -137
  151. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +0 -131
  152. package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +0 -109
  153. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +0 -97
  154. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +0 -80
  155. package/templates/react-sdk-reference/.claude/skills/template-skills/ListPage.md +0 -70
  156. package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +0 -142
  157. package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +0 -82
  158. package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +0 -114
  159. package/templates/react-sdk-reference/.claude/skills/template-skills/SimpleTable.md +0 -131
  160. package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +0 -108
  161. package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +0 -82
  162. package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +0 -206
  163. package/templates/react-sdk-reference/.claude/skills/widget-skills/QuickCreate.md +0 -118
  164. package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +0 -198
  165. package/templates/react-sdk-reference/.cursor/rules/component-map.mdrules +0 -41
  166. package/templates/react-sdk-reference/.cursor/rules/dse-component.mdrules +0 -78
  167. package/templates/react-sdk-reference/.cursor/rules/field-component.mdrules +0 -74
  168. package/templates/react-sdk-reference/.cursor/rules/pega-sdk.mdrules +0 -247
  169. package/templates/react-sdk-reference/.cursor/rules/prompts/add-component.mdrules +0 -149
  170. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-all-components.mdrules +0 -154
  171. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-dse-components.mdrules +0 -131
  172. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-field-components.mdrules +0 -144
  173. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-template-components.mdrules +0 -156
  174. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-widget-components.mdrules +0 -129
  175. package/templates/react-sdk-reference/.cursor/rules/prompts/identify-components.mdrules +0 -110
  176. package/templates/react-sdk-reference/.cursor/rules/skills/component-contracts.mdrules +0 -145
  177. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/AlertBanner.mdrules +0 -140
  178. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Banner.mdrules +0 -154
  179. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/CaseSummaryFields.mdrules +0 -159
  180. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/DetailsFields.mdrules +0 -149
  181. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroup.mdrules +0 -136
  182. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroupList.mdrules +0 -116
  183. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldValueList.mdrules +0 -120
  184. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Operator.mdrules +0 -154
  185. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Pulse.mdrules +0 -88
  186. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/RichTextEditor.mdrules +0 -211
  187. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/WssQuickCreate.mdrules +0 -140
  188. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension.mdrules +0 -294
  189. package/templates/react-sdk-reference/.cursor/rules/skills/field-components.mdrules +0 -299
  190. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/AutoComplete.mdrules +0 -117
  191. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/CancelAlert.mdrules +0 -208
  192. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Checkbox.mdrules +0 -163
  193. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Currency.mdrules +0 -111
  194. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Date.mdrules +0 -104
  195. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/DateTime.mdrules +0 -108
  196. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Decimal.mdrules +0 -103
  197. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Dropdown.mdrules +0 -119
  198. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Email.mdrules +0 -112
  199. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Group.mdrules +0 -95
  200. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Integer.mdrules +0 -92
  201. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Location.mdrules +0 -141
  202. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Multiselect.mdrules +0 -169
  203. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ObjectReference.mdrules +0 -169
  204. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Percentage.mdrules +0 -97
  205. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Phone.mdrules +0 -115
  206. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RadioButtons.mdrules +0 -151
  207. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RichText.mdrules +0 -143
  208. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ScalarList.mdrules +0 -129
  209. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SelectableCard.mdrules +0 -221
  210. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SemanticLink.mdrules +0 -153
  211. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextArea.mdrules +0 -101
  212. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextContent.mdrules +0 -106
  213. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextInput.mdrules +0 -109
  214. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Time.mdrules +0 -93
  215. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/URL.mdrules +0 -90
  216. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/UserReference.mdrules +0 -185
  217. package/templates/react-sdk-reference/.cursor/rules/skills/run-and-verify.mdrules +0 -73
  218. package/templates/react-sdk-reference/.cursor/rules/skills/template-components.mdrules +0 -327
  219. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AdvancedSearch.mdrules +0 -149
  220. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AppShell.mdrules +0 -127
  221. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/BannerPage.mdrules +0 -88
  222. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseSummary.mdrules +0 -105
  223. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseView.mdrules +0 -136
  224. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseViewActionsMenu.mdrules +0 -131
  225. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Confirmation.mdrules +0 -112
  226. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DataReference.mdrules +0 -125
  227. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultForm.mdrules +0 -107
  228. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultPage.mdrules +0 -115
  229. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Details.mdrules +0 -93
  230. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsSubTabs.mdrules +0 -100
  231. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsThreeColumn.mdrules +0 -83
  232. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsTwoColumn.mdrules +0 -83
  233. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DynamicTabs.mdrules +0 -106
  234. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/FieldGroupTemplate.mdrules +0 -114
  235. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/HierarchicalForm.mdrules +0 -118
  236. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboard.mdrules +0 -109
  237. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboardPage.mdrules +0 -90
  238. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListPage.mdrules +0 -73
  239. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListView.mdrules +0 -144
  240. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/MultiReferenceReadOnly.mdrules +0 -85
  241. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/NarrowWide.mdrules +0 -146
  242. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/OneColumn.mdrules +0 -114
  243. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/PromotedFilters.mdrules +0 -129
  244. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SelfServiceCaseView.mdrules +0 -140
  245. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SimpleTable.mdrules +0 -132
  246. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SingleReferenceReadOnly.mdrules +0 -108
  247. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SubTabs.mdrules +0 -84
  248. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/TwoColumn.mdrules +0 -136
  249. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WideNarrow.mdrules +0 -155
  250. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WssNavBar.mdrules +0 -140
  251. package/templates/react-sdk-reference/.cursor/rules/skills/widget-components.mdrules +0 -276
  252. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/AppAnnouncement.mdrules +0 -87
  253. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Attachment.mdrules +0 -151
  254. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/CaseHistory.mdrules +0 -112
  255. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/FileUtility.mdrules +0 -205
  256. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Followers.mdrules +0 -104
  257. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/QuickCreate.mdrules +0 -119
  258. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/SummaryItem.mdrules +0 -172
  259. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/ToDo.mdrules +0 -195
  260. package/templates/react-sdk-reference/.cursor/rules/template-component.mdrules +0 -95
  261. package/templates/react-sdk-reference/.cursor/rules/widget-component.mdrules +0 -90
  262. package/templates/react-sdk-reference/.github/prompts/component-manifest.json +0 -193
  263. package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +0 -110
  264. package/templates/react-sdk-reference/.github/prompts/replace-design-system.prompt.md +0 -524
  265. package/templates/react-sdk-reference/.github/skills/component-contracts.md +0 -140
  266. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +0 -152
  267. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +0 -159
  268. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +0 -148
  269. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +0 -113
  270. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +0 -155
  271. package/templates/react-sdk-reference/.github/skills/field-components.md +0 -295
  272. package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +0 -113
  273. package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +0 -211
  274. package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +0 -175
  275. package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +0 -109
  276. package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +0 -101
  277. package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +0 -106
  278. package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +0 -99
  279. package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +0 -134
  280. package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +0 -109
  281. package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +0 -96
  282. package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +0 -145
  283. package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +0 -98
  284. package/templates/react-sdk-reference/.github/skills/field-skills/TextContent.md +0 -117
  285. package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +0 -203
  286. package/templates/react-sdk-reference/.github/skills/run-and-verify.md +0 -70
  287. package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +0 -124
  288. package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +0 -86
  289. package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +0 -137
  290. package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +0 -131
  291. package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +0 -124
  292. package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +0 -104
  293. package/templates/react-sdk-reference/.github/skills/template-skills/DefaultPage.md +0 -112
  294. package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +0 -90
  295. package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +0 -80
  296. package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +0 -106
  297. package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +0 -112
  298. package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +0 -116
  299. package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +0 -108
  300. package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +0 -82
  301. package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +0 -142
  302. package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +0 -143
  303. package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +0 -130
  304. package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +0 -142
  305. package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +0 -133
  306. package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +0 -152
  307. package/templates/react-sdk-reference/.github/skills/template-skills/WssNavBar.md +0 -139
  308. package/templates/react-sdk-reference/.github/skills/widget-components.md +0 -260
  309. package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +0 -84
  310. package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +0 -151
  311. package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +0 -110
  312. package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +0 -103
  313. package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +0 -169
  314. package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +0 -198
  315. package/templates/react-sdk-reference/AGENTS.md +0 -246
  316. /package/templates/react-sdk-reference/{.claude → .ai-common}/skills/run-and-verify.md +0 -0
  317. /package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/WideNarrow.md +0 -0
@@ -1,82 +0,0 @@
1
- # Skill: SubTabs
2
-
3
- Sub-tabs navigation template. Renders a tab container for case view sections using shared tab utilities with deferred content loading.
4
-
5
- > **Prerequisite skill:** [`template-components.md`](../template-components.md) — covers architecture, child rendering patterns, and registration conventions common to ALL template components.
6
-
7
- ---
8
-
9
- ## Component Purpose
10
-
11
- Renders a horizontal tab bar for navigating between case view sections. Uses shared `tabUtils` for tab state management (visible tabs, transient tabs, tab click). Tab content is deferred — only the active tab loads content. No section heading.
12
-
13
- ## Pega Metadata
14
-
15
- - **Registration key:** `SubTabs` (in `component-map.ts`)
16
- - **Category:** Navigation template
17
- - **Extends:** `PConnProps`
18
-
19
- ## Props
20
-
21
- | Prop | Type | Required | Description |
22
- | ------------- | ------------- | -------- | --------------------------------------------------- |
23
- | `children` | `ReactNode[]` | Yes | `children[0]` is the deferred-loaded tabs container |
24
- | `getPConnect` | `function` | Yes | PConnect getter |
25
-
26
- ## Behavioral Contract
27
-
28
- 1. **Extract deferred tabs:** `deferLoadedTabs = Children.toArray(children)[0]`.
29
- 2. **State:** `currentTabId` (string, default `'0'`), `tabItems` (array).
30
- 3. **Compute visible tabs:** `getVisibleTabs(deferLoadedTabs, 'tabsSubs')` in `useEffect([deferLoadedTabs])` → `availableTabs`.
31
- 4. **Transient tabs:** `useEffect([currentTabId])` → `setTabItems(getTransientTabs(availableTabs, currentTabId, tabItems))`.
32
- 5. **Tab click:** `tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems)` from `tabUtils`.
33
- 6. **Render:**
34
- - `<TabContext value={currentTabId}>`
35
- - `<Tabs onChange={handleTabClick} value={currentTabId}>` — one `<Tab>` per `tabItems`
36
- - One `<TabPanel>` per `tabItems` with `tab.content || ''`
37
- 7. No section heading (unlike `DetailsSubTabs`).
38
-
39
- > **Difference from `DetailsSubTabs`:** SubTabs has no `label`/`showLabel` props and no `<h3>` heading. Uses `'tabsSubs'` identifier for `getVisibleTabs` (vs `'detailsSubTabs'`).
40
-
41
- ## Visual Specifications
42
-
43
- Identical to `DetailsSubTabs` except no heading above the tab bar.
44
-
45
- **CSS-only implementation notes:**
46
-
47
- - Tab bar: `display: flex; border-bottom: 2px solid var(--divider)`.
48
- - Each tab: `padding: 8px 16px; cursor: pointer; border-bottom: 2px solid transparent`.
49
- - Active tab: `border-bottom-color: var(--app-primary-color); font-weight: 600`.
50
- - Tab panel: `padding: 16px 0`.
51
-
52
- ## Edge Cases & Special Logic
53
-
54
- See `DetailsSubTabs.md` for shared edge cases. Additional:
55
-
56
- - `tabUtils` identifier string `'tabsSubs'` must match exactly — it is used internally by `getVisibleTabs` for scoping.
57
-
58
- ## Dependencies
59
-
60
- - `getTransientTabs`, `getVisibleTabs`, `tabClick` from `./tabUtils`
61
- - `TabContext`, `TabPanel` from `@mui/lab`
62
- - `Tab`, `Tabs` from `@mui/material`
63
-
64
- ## Design System Mapping
65
-
66
- **UI control type:** Tab navigation container — no heading, deferred content loading.
67
-
68
- Listed design systems are examples only.
69
-
70
- | Design System | Recommended Component |
71
- | ------------------ | -------------------------------------------------------- |
72
- | Default (CSS only) | Custom tab bar with CSS underline indicator |
73
- | MUI | `<TabContext>` + `<Tabs>` + `<TabPanel>` from `@mui/lab` |
74
- | Ant Design | `<Tabs>` with `items` array |
75
- | Chakra UI | `<Tabs>` + `<TabList>` + `<TabPanels>` |
76
- | Shadcn/ui | `<Tabs>` + `<TabsList>` + `<TabsContent>` |
77
-
78
- When implementing in a specific design system:
79
-
80
- - Use `getVisibleTabs(tabs, 'tabsSubs')` — the identifier string must be `'tabsSubs'`
81
- - No heading above the tab bar (unlike `DetailsSubTabs`)
82
- - Deferred loading: content populates lazily via `getTransientTabs`
@@ -1,206 +0,0 @@
1
- # Skill: FileUtility
2
-
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
-
5
- > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
6
-
7
- ---
8
-
9
- ## Component Purpose
10
-
11
- The primary attachments management panel in the case utilities column. Shows up to 3 attachments/links in the main view with a "View all" option that opens a modal with the full list. Users can upload files, attach URLs, download, and delete items. Attachment state is kept fresh via debounced pub-sub subscriptions.
12
-
13
- ## Pega Metadata
14
-
15
- - **Registration key:** `FileUtility` (in `component-map.ts`)
16
- - **Category:** Widget — file management
17
- - **Extends:** `PConnProps`
18
-
19
- ## Props
20
-
21
- | Prop | Type | Required | Description |
22
- | ------------- | ---------- | -------- | --------------------------------------------------------------------------------- |
23
- | `caseId` | `string` | No | Optional case ID override. If absent, resolved from `pConn.getCaseInfo().getID()` |
24
- | `getPConnect` | `function` | Yes | PConnect getter |
25
-
26
- ## Behavioral Contract
27
-
28
- ### Attachment Fetch
29
-
30
- On mount and on attachment change events:
31
-
32
- ```
33
- PCore.getAttachmentUtils().getCaseAttachments(caseKey, context)
34
- ```
35
-
36
- Returns array of attachment/link objects. Store in `attachments` state.
37
-
38
- Debounced auto-refresh: on `CASE_ATTACHMENTS_UPDATED` pub-sub event, wait 1000ms (debounced) then re-fetch. This prevents rapid re-fetches when multiple files are uploaded simultaneously.
39
-
40
- ### Main View — Top 3 Display
41
-
42
- Show only the first 3 items from `attachments`. If `attachments.length > 3`, show a `"View all (N)"` button that opens the full-list modal.
43
-
44
- ### SummaryList Integration
45
-
46
- Map each attachment/link to a `SummaryItem`-compatible object:
47
-
48
- ```typescript
49
- {
50
- id: attachment.ID,
51
- visual: { icon: getFileIcon(attachment.mimeType) },
52
- primary: {
53
- type: attachment.category === 'FILE' ? 'FILE' : 'URL',
54
- name: attachment.name,
55
- click: () => handleDownloadOrOpen(attachment)
56
- },
57
- secondary: { text: attachment.createdBy + ' · ' + formatDate(attachment.createTime) }
58
- actions: [
59
- { id: 'delete', text: 'Delete', icon: 'trash', onClick: () => handleDelete(attachment.ID) }
60
- ]
61
- }
62
- ```
63
-
64
- Pass to `<SummaryList arItems$={summaryItems} />`.
65
-
66
- ### File Upload
67
-
68
- 1. User clicks "Add file" from the `<Menu>`.
69
- 2. Opens an add-file modal (dialog).
70
- 3. User selects a file via `<input type='file'>`.
71
- 4. On confirm: call `PCore.getAttachmentUtils().uploadAttachment(file, onProgress, onError, context)`.
72
- 5. On success: call `PCore.getAttachmentUtils().linkAttachmentsToCase(caseKey, [newAttachment], context)`.
73
- 6. Refresh attachment list.
74
-
75
- ### URL Attachment
76
-
77
- 1. User clicks "Add link" from the `<Menu>`.
78
- 2. Opens add-link modal with two fields: `Title` (required) and `URL` (required).
79
- 3. The "Attach" button is enabled only when both `title` and `url` are non-empty.
80
- 4. On confirm: call `PCore.getAttachmentUtils().linkAttachmentsToCase(caseKey, [{ name: title, url, category: 'URL' }], context)`.
81
- 5. Refresh attachment list.
82
-
83
- ### Download / Open
84
-
85
- - **FILE type:** Call `PCore.getAttachmentUtils().downloadAttachment(attachmentID, context)` then trigger browser download via `downloadjs`.
86
- - **URL type:** Open `attachment.url` in a new browser tab (`window.open(url, '_blank')`).
87
-
88
- ### Delete
89
-
90
- Call `PCore.getAttachmentUtils().deleteAttachment(attachmentID, context)`. Refresh attachment list after success.
91
-
92
- ### Actions Menu
93
-
94
- Render a `<MoreVertIcon>` `<IconButton>` that opens a `<Menu>` with:
95
-
96
- - `"Add file"` — opens add-file modal
97
- - `"Add link"` — opens add-link modal
98
-
99
- ## Visual Specifications
100
-
101
- ### Main Card
102
-
103
- | Element | Description |
104
- | ----------------- | -------------------------------------------- |
105
- | Card header | `"Attachments"` (or localized) + count badge |
106
- | Actions icon | `<MoreVertIcon>` button top-right |
107
- | Attachment rows | Up to 3 `SummaryItem` cards |
108
- | "View all" button | Text button, shown when > 3 attachments |
109
-
110
- ### "View all" Modal
111
-
112
- | Element | Description |
113
- | --------------- | -------------------------- |
114
- | Modal header | `"All attachments (N)"` |
115
- | Attachment rows | All items in `SummaryList` |
116
- | Close button | `X` in modal header |
117
-
118
- ### Add File Modal
119
-
120
- | Element | Description |
121
- | -------------- | -------------------------------------------- |
122
- | File picker | `<input type='file'>` |
123
- | Progress bar | Per-file upload progress |
124
- | Action buttons | `ActionButtonsForFileUtil` (Cancel + Attach) |
125
-
126
- ### Add Link Modal
127
-
128
- | Element | Description |
129
- | -------------- | -------------------------------------------- |
130
- | Title field | `<TextField label='Title'>` — required |
131
- | URL field | `<TextField label='URL'>` — required |
132
- | Attach button | Enabled only when both fields are filled |
133
- | Action buttons | `ActionButtonsForFileUtil` (Cancel + Attach) |
134
-
135
- **CSS-only implementation notes:**
136
-
137
- - Main card: standard card styles.
138
- - Modal: `position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.2); min-width: 480px; padding: 1.5rem`.
139
- - "View all" button: text style, `color: var(--app-primary-color); cursor: pointer`.
140
- - Progress bar: `height: 4px; background: var(--app-primary-color); transition: width 0.3s`.
141
-
142
- ## Sub-Component: ActionButtonsForFileUtil
143
-
144
- **Registration key:** `ActionButtonsForFileUtil`
145
-
146
- A simple button row component used inside the FileUtility modals to render Cancel + primary action buttons.
147
-
148
- ### Props
149
-
150
- | Prop | Type | Required | Description |
151
- | -------------------- | ---------- | -------- | ------------------------------------------------------------ |
152
- | `arMainButtons` | `any[]` | Yes | Primary button definitions `[{ actionID, name }]` |
153
- | `arSecondaryButtons` | `any[]` | Yes | Secondary (cancel) button definitions `[{ actionID, name }]` |
154
- | `primaryAction` | `function` | Yes | Callback invoked when the primary button is clicked |
155
- | `secondaryAction` | `function` | Yes | Callback invoked when the secondary/cancel button is clicked |
156
- | `getPConnect` | `function` | Yes | PConnect getter |
157
-
158
- ### Layout
159
-
160
- ```
161
- [Secondary buttons (left)] [Primary buttons (right)]
162
- Cancel Attach
163
- ```
164
-
165
- - Secondary buttons: outlined/text style.
166
- - Primary buttons: contained/filled style with theme primary color.
167
- - Render using `arSecondaryButtons.map(...)` and `arMainButtons.map(...)`.
168
-
169
- ## Edge Cases & Special Logic
170
-
171
- - **Debounce (1000ms):** Prevents excessive re-fetches when multiple attachment events fire in quick succession.
172
- - **Add link "Attach" button disabled state:** Title and URL validation must happen on every keystroke — use controlled inputs with `!title || !url` to derive disabled state.
173
- - **`linkAttachmentsToCase`:** After upload, the file must be explicitly linked to the case. Uploading alone does not associate the file with the case.
174
- - **Pub-sub cleanup:** Unsubscribe from `CASE_ATTACHMENTS_UPDATED` on unmount to prevent stale callbacks.
175
- - **Error display:** Use `PCore.getMessageManager()` or inline error state in the modal — do not silently fail on upload/link errors.
176
-
177
- ## Dependencies
178
-
179
- - `PCore.getAttachmentUtils()` — getCaseAttachments, uploadAttachment, downloadAttachment, deleteAttachment, linkAttachmentsToCase
180
- - `PCore.getMessagingServiceManager()` — subscribe to attachment change events
181
- - `PCore.getConstants()` — case info ID, summary refresh timing
182
- - `getComponentFromRegistry('SummaryList')` — renders the attachment item list
183
- - `getComponentFromRegistry('ActionButtonsForFileUtil')` — renders modal action buttons
184
- - `downloadjs` — browser file download trigger
185
- - MUI: `<Card>`, `<CardHeader>`, `<CardContent>`, `<IconButton>`, `<Menu>`, `<MenuItem>`, `<Button>`, `<TextField>`, `<Dialog>`, `<CircularProgress>`
186
- - MUI Icons: `<MoreVertIcon>`
187
-
188
- ## Design System Mapping
189
-
190
- **UI control type:** File management widget — attachment list with upload/download/delete and add modals.
191
-
192
- Listed design systems are examples only.
193
-
194
- | Design System | Card | Action Menu | Modal | Progress |
195
- | ------------------ | ------------ | ------------------------------------ | ---------- | ------------------------------------------ |
196
- | Default (CSS only) | `<div>` card | `<button>` + custom dropdown | `<dialog>` | CSS progress bar |
197
- | MUI | `<Card>` | `<IconButton>` + `<Menu>/<MenuItem>` | `<Dialog>` | `<CircularProgress>` or `<LinearProgress>` |
198
- | Ant Design | `<Card>` | `<Dropdown menu={{ items }}>` | `<Modal>` | `<Progress>` |
199
- | Chakra UI | `<Card>` | `<Menu>/<MenuButton>/<MenuList>` | `<Modal>` | `<Progress>` |
200
- | Shadcn/ui | `<Card>` | `<DropdownMenu>` | `<Dialog>` | Custom progress bar |
201
-
202
- When implementing in a specific design system:
203
-
204
- - Debounced refresh (1000ms) after pub-sub attachment events is required — prevents excessive API calls
205
- - `linkAttachmentsToCase` must be called after upload — uploading alone does not attach to the case
206
- - `ActionButtonsForFileUtil` receives button definition arrays — render them generically from `arMainButtons`/`arSecondaryButtons`
@@ -1,118 +0,0 @@
1
- # Skill: QuickCreate
2
-
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
-
5
- > **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
6
-
7
- ---
8
-
9
- ## Component Purpose
10
-
11
- Provides a shortcut panel for creating new cases. Case types are sourced from the Pega environment info (or a fallback portal config for Launchpad). The list can be filtered by class name. Each button triggers case creation via `pConn.getActionsApi().createWork()`. Rendering is delegated to the `WssQuickCreate` design system extension component.
12
-
13
- ## Pega Metadata
14
-
15
- - **Registration key:** `QuickCreate` (in `component-map.ts`)
16
- - **Category:** Widget — action / case creation
17
- - **Extends:** `PConnProps`
18
-
19
- ## Props
20
-
21
- | Prop | Type | Required | Description |
22
- | --------------- | ---------- | -------- | --------------------------------------------------------------------------- |
23
- | `heading` | `string` | Yes | Widget title (e.g., `"Create"`) |
24
- | `showCaseIcons` | `boolean` | No | Whether to show case type icons alongside labels. Default `false` |
25
- | `classFilter` | `any[]` | No | Array of class names to filter available case types. Empty array = show all |
26
- | `getPConnect` | `function` | Yes | PConnect getter |
27
-
28
- ## Behavioral Contract
29
-
30
- ### Case Types Resolution
31
-
32
- 1. Read `PCore.getEnvironmentInfo().environmentInfoObject.pyCaseTypeList` — the primary source.
33
- 2. If the list is empty or unavailable (e.g., Launchpad mode), fall back to the app portal config:
34
- ```
35
- PCore.getConfig().getApplicationName() // or portal config equivalent
36
- ```
37
- 3. Apply `classFilter`: if `classFilter` is non-empty, retain only case types whose class name is included in the array.
38
-
39
- ### Case Type Object Mapping
40
-
41
- For each case type, build:
42
-
43
- ```typescript
44
- {
45
- classname: caseType.pyClassName,
46
- label: caseType.pyLabel,
47
- onClick: () => pConn.getActionsApi().createWork(caseType.pyClassName, {
48
- openCaseViewAfterCreate: true,
49
- containerName: PCore.getConstants().APP.APP
50
- }),
51
- icon: showCaseIcons ? getIconURL(caseType.pyClassName) : undefined
52
- }
53
- ```
54
-
55
- ### Rendering Delegation
56
-
57
- Pass the mapped case type array to `WssQuickCreate` (retrieved via `getComponentFromRegistry('WssQuickCreate')`):
58
-
59
- ```tsx
60
- const WssQuickCreate = getComponentFromRegistry('WssQuickCreate');
61
- return <WssQuickCreate heading={heading} caseTypes={caseTypeObjects} />;
62
- ```
63
-
64
- This component handles all button rendering — `QuickCreate` is purely a data-preparation orchestrator.
65
-
66
- ## Visual Specifications
67
-
68
- Visual rendering is owned by `WssQuickCreate` (a design system extension component). Typical layout:
69
-
70
- | Element | Description |
71
- | ----------------- | ------------------------------------------------- |
72
- | Heading | Widget title at the top |
73
- | Case type buttons | One button per case type; icon (optional) + label |
74
-
75
- **CSS-only implementation notes (if implementing without `WssQuickCreate`):**
76
-
77
- - Container: `display: flex; flex-direction: column; gap: 0.5rem`.
78
- - Heading: `font-weight: 600; margin-bottom: 0.5rem`.
79
- - Case type button: `display: flex; align-items: center; gap: 0.5rem; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; background: white`.
80
- - Icon: `width: 20px; height: 20px; object-fit: contain`.
81
-
82
- ## Edge Cases & Special Logic
83
-
84
- - `classFilter` is an empty array by default — empty array means **no filtering** (show all case types).
85
- - If `pyCaseTypeList` is empty and the fallback also produces no results, render the widget with a `"No case types available"` message or hide the widget.
86
- - `showCaseIcons` requires a valid icon URL — `getIconURL(classname)` returns `undefined` if no icon is configured; guard against rendering a broken `<img>`.
87
- - `createWork` opens the case creation form in the primary container. If the user already has an unsaved case open, behavior depends on container configuration (may replace or open in a new tab).
88
-
89
- ## Dependencies
90
-
91
- - `getComponentFromRegistry('WssQuickCreate')` — design system extension for case type button rendering
92
- - `pConn.getActionsApi().createWork()` — triggers case creation
93
- - `PCore.getEnvironmentInfo()` — primary source for available case types
94
- - `PCore.getConstants().APP.APP` — app context constant
95
-
96
- ## Design System Mapping
97
-
98
- **UI control type:** Quick-action panel with one button per available case type.
99
-
100
- Listed design systems are examples only.
101
-
102
- Rendering is delegated to `WssQuickCreate` — implement that DSE component for your design system. `QuickCreate` itself has no direct UI output beyond the delegation.
103
-
104
- If implementing without `WssQuickCreate`:
105
-
106
- | Design System | Button List |
107
- | ------------------ | --------------------------------------------------------- |
108
- | Default (CSS only) | `<button>` list with optional `<img>` icon |
109
- | MUI | `<List>` + `<ListItemButton>` or `<Button>` stack |
110
- | Ant Design | `<Space direction='vertical'>` + `<Button>` per case type |
111
- | Chakra UI | `<VStack>` + `<Button>` per case type |
112
- | Shadcn/ui | `<div>` stack + `<Button variant='outline'>` |
113
-
114
- When implementing in a specific design system:
115
-
116
- - `classFilter` empty array = show ALL case types (not zero) — this is a common gotcha
117
- - `createWork` must be called with the correct `containerName` constant (`APP.APP`)
118
- - `showCaseIcons` is optional — only fetch/render icons when this prop is `true`
@@ -1,198 +0,0 @@
1
- # Skill: ToDo
2
-
3
- Assignment worklist widget. Displays the current user's pending assignments with expand/collapse, click-to-open, priority indicators, badge counts, responsive layout, and snackbar error notifications.
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.
6
-
7
- ---
8
-
9
- ## Component Purpose
10
-
11
- Renders a compact to-do / worklist panel showing the user's pending assignments. Shows the top 3 items by default with a "Show more" / "Show less" toggle. Supports two modes: `worklist` (personal workbasket) and `todo` (case-level assignments). Clicking an item opens the assignment. A badge in the card header shows the total count.
12
-
13
- ## Pega Metadata
14
-
15
- - **Registration key:** `Todo` (note: lowercase `o` in the key; file is `ToDo.tsx`)
16
- - **Category:** Widget — assignment / action
17
- - **Extends:** `PConnProps`
18
-
19
- ## Props
20
-
21
- | Prop | Type | Required | Description |
22
- | -------------- | ---------- | -------- | -------------------------------------------------------------------------------------------------- |
23
- | `datasource` | `any` | No | Array of assignments passed directly (used in `todo` type). If provided, skips the data page fetch |
24
- | `myWorkList` | `any` | No | Work list config object `{ datapage: string, fields: [...] }` — for `worklist` type |
25
- | `caseInfoID` | `string` | No | Case ID to filter assignments (used in `todo` type) |
26
- | `headerText` | `string` | No | Widget title. Default: `"To do"` |
27
- | `itemKey` | `string` | No | Field key (reserved, currently unused) |
28
- | `showTodoList` | `boolean` | No | Whether to show the assignment list. Default `true` |
29
- | `type` | `string` | No | `'worklist'` (personal work) or `'todo'` (case-level). Default `'worklist'` |
30
- | `context` | `string` | No | Context name for API calls. Falls back to `pConn.getContextName()` |
31
- | `isConfirm` | `boolean` | No | Confirmation mode — adjusts rendering for post-submit confirmation view |
32
- | `getPConnect` | `function` | Yes | PConnect getter |
33
-
34
- ## Behavioral Contract
35
-
36
- ### Data Source Resolution
37
-
38
- **`type === 'todo'` (case-level):**
39
-
40
- - Use `datasource` prop directly (array of assignment objects).
41
- - `caseInfoID` is used to scope the assignments.
42
-
43
- **`type === 'worklist'` (personal work):**
44
-
45
- - Fetch from `myWorkList.datapage` (e.g., `D_WorkList`) via:
46
- ```
47
- PCore.getDataPageUtils().getDataAsync(
48
- myWorkList.datapage,
49
- context,
50
- {},
51
- { pageNumber: 1, pageSize: 50 },
52
- { select: myWorkList.fields },
53
- { invalidateCache: true }
54
- )
55
- ```
56
- - Map the response to assignment objects.
57
-
58
- ### Top 3 + Show More
59
-
60
- - `showCount` state: default `3`.
61
- - Render only `assignments.slice(0, showCount)`.
62
- - If `assignments.length > 3`:
63
- - Show a `"Show more"` button → sets `showCount = assignments.length`.
64
- - When expanded: show `"Show less"` button → sets `showCount = 3`.
65
-
66
- ### Badge Count
67
-
68
- - Render a `<Badge badgeContent={assignments.length}>` on the card header or alongside the title.
69
- - Badge shows the total count of assignments, not the currently-visible count.
70
-
71
- ### Open Assignment
72
-
73
- On item click:
74
-
75
- ```typescript
76
- pConn.getActionsApi().openAssignment(
77
- assignment.pxRefObjectKey, // case key
78
- assignment.pxRefObjectClass, // class name
79
- {
80
- containerName: pConn.getContainerName() || PCore.getConstants().APP.APP,
81
- channelName: '',
82
- },
83
- );
84
- ```
85
-
86
- ### Assignment Item Rendering
87
-
88
- For each assignment, show:
89
-
90
- - **Avatar:** Circle with user initials (derived from `pConn.getContextObject?.().pyLabel` or operator name).
91
- - **Name/title:** `assignment.pyLabel` — the assignment task name.
92
- - **Status badge (worklist only):** `assignment.pyStatusWork` — colored status pill.
93
- - **Priority/urgency:** `assignment.pyUrgencyWork` — urgency level indicator.
94
- - **Child case indicator:** If `assignment.isChild === true`, show an indent or nested indicator.
95
- - **Arrow icon:** Right-pointing arrow (`<ArrowForwardIosOutlinedIcon>`) indicating clickable.
96
-
97
- ### Responsive Layout
98
-
99
- Use `useMediaQuery(theme.breakpoints.down('sm'))` (MUI) to detect mobile:
100
-
101
- - **Desktop:** Show avatar, name, status, priority, and arrow in a horizontal row.
102
- - **Mobile:** Stack or truncate elements for narrow display.
103
-
104
- ### `canPerform` Permission Check
105
-
106
- If an assignment has `canPerform === false`, render it as non-clickable (greyed out, no onClick handler).
107
-
108
- ### Snackbar Error
109
-
110
- - On `openAssignment` failure, catch the error and show a `<Snackbar>` with the error message.
111
- - Auto-hide after 3000ms.
112
- - `<IconButton>` (`<CloseIcon>`) to manually dismiss.
113
-
114
- ### Operator Avatar Initials
115
-
116
- Extract initials from `PCore.getEnvironmentInfo().getOperatorName()`:
117
-
118
- ```typescript
119
- const initials = operatorName
120
- .split(' ')
121
- .map((w) => w[0])
122
- .join('')
123
- .substring(0, 2)
124
- .toUpperCase();
125
- ```
126
-
127
- ## Visual Specifications
128
-
129
- ### Card Layout
130
-
131
- | Element | Description |
132
- | --------------------- | --------------------------------------------------- |
133
- | Card header | `headerText` (default `"To do"`) + badge with count |
134
- | Assignment rows | Up to `showCount` items |
135
- | Show more/less button | Below the last visible item |
136
-
137
- ### Assignment Row
138
-
139
- | Element | Desktop | Mobile |
140
- | ------------------ | --------- | --------------- |
141
- | Avatar circle | Shown | Shown |
142
- | Task name | Full text | Truncated |
143
- | Status badge | Shown | Hidden or small |
144
- | Priority indicator | Shown | Simplified |
145
- | Arrow icon | Shown | Shown |
146
-
147
- **CSS-only implementation notes:**
148
-
149
- - Card: standard card layout.
150
- - Assignment row: `display: flex; align-items: center; gap: 0.75rem; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--divider-color)`.
151
- - Avatar: `width: 36px; height: 36px; border-radius: 50%; background: var(--avatar-bg); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600`.
152
- - Status badge: `padding: 2px 6px; border-radius: 10px; font-size: 0.75rem; background: var(--status-bg-color)`.
153
- - Priority: `font-size: 0.75rem; color: var(--secondary-text-color)`.
154
- - Arrow: `margin-left: auto; color: var(--secondary-text-color)`.
155
- - Non-clickable (canPerform=false): `opacity: 0.5; cursor: not-allowed`.
156
- - Show more button: `width: 100%; text-align: center; padding: 8px; color: var(--app-primary-color)`.
157
-
158
- ## Edge Cases & Special Logic
159
-
160
- - `type` defaults to `'worklist'` — handle the fallback gracefully if `type` is undefined.
161
- - `datasource` prop vs fetch: if `datasource` is provided (non-empty), skip the data page fetch entirely.
162
- - `myWorkList` may be undefined for `todo` type — do not attempt a fetch if it's missing.
163
- - `showTodoList === false` — render only the card header (with badge count) and hide the list body.
164
- - `isConfirm === true` — used in the Confirmation template context; may adjust layout to hide certain elements (e.g., hide status badge, show simpler view).
165
- - Empty assignments — show a `"No tasks"` or `"You're all caught up!"` empty state message.
166
- - `canPerform` check: if `false`, disable click and show cursor `not-allowed`. Do not open the assignment.
167
- - Container name fallback: `pConn.getContainerName() || PCore.getConstants().APP.APP` — always provide a container name to `openAssignment`.
168
-
169
- ## Dependencies
170
-
171
- - `PCore.getDataPageUtils().getDataAsync()` — worklist data page fetch
172
- - `PCore.getEnvironmentInfo()` — operator name for avatar initials
173
- - `PCore.getConstants()` — CASE_INFO, WORK_BASKET, TODO, APP constants
174
- - `PCore.getLocaleUtils()` — assignment label localization
175
- - `pConn.getActionsApi().openAssignment()` — opens the selected assignment
176
- - MUI: `<Card>`, `<CardContent>`, `<CardHeader>`, `<Avatar>`, `<Typography>`, `<Badge>`, `<List>`, `<ListItem>`, `<ListItemText>`, `<Button>`, `<Snackbar>`, `<IconButton>`, `useMediaQuery`, `useTheme`
177
- - MUI Icons: `<CloseIcon>`, `<ArrowForwardIosOutlinedIcon>`
178
-
179
- ## Design System Mapping
180
-
181
- **UI control type:** Assignment worklist widget with expand/collapse, click-to-open, badge count, and error toast.
182
-
183
- Listed design systems are examples only.
184
-
185
- | Design System | Card | List | Badge | Snackbar |
186
- | ------------------ | ------------------------- | ------------------- | ------------------- | ----------------------------- |
187
- | Default (CSS only) | `<div>` card | `<ul>/<li>` | CSS counter badge | Custom toast overlay |
188
- | MUI | `<Card>` + `<CardHeader>` | `<List>/<ListItem>` | `<Badge>` | `<Snackbar>/<Alert>` |
189
- | Ant Design | `<Card>` | `<List>` | `<Badge count={N}>` | `message.error()` |
190
- | Chakra UI | `<Card>` | `<VStack>` | `<Badge>` | `useToast()` |
191
- | Shadcn/ui | `<Card>` | `<ul>/<li>` | Custom badge | `<Toaster>` + `toast.error()` |
192
-
193
- When implementing in a specific design system:
194
-
195
- - Show top 3 items by default — `showCount` state controls slice; "Show more/less" toggles between 3 and full length
196
- - `canPerform === false` must make the row non-clickable — check this before calling `openAssignment`
197
- - `type === 'worklist'` fetches from a data page; `type === 'todo'` uses the `datasource` prop — both paths must be implemented
198
- - Operator initials for the avatar must be derived from `PCore.getEnvironmentInfo().getOperatorName()`
@@ -1,41 +0,0 @@
1
- ---
2
- globs: ["**/component-map.ts"]
3
- alwaysApply: false
4
- ---
5
-
6
- # Component Map Rules
7
-
8
- The component map (`src/components/component-map.ts`) is the registry that maps Pega component names to React implementations.
9
-
10
- ## Structure
11
-
12
- ```typescript
13
- import { sdkComponents } from '@pega/sdk-react';
14
-
15
- function getSampleComponentMap() {
16
- return {
17
- ...sdkComponents, // NEVER remove this — provides infrastructure
18
- // Your components below:
19
- TextInput,
20
- Dropdown,
21
- // ...
22
- };
23
- }
24
- ```
25
-
26
- ## Rules
27
-
28
- 1. **NEVER remove `...sdkComponents`** — it provides View, Region, Reference, RootContainer, FlowContainer, ViewContainer, Assignment, AssignmentCard, ErrorBoundary, MultiStep, CaseSummary, and their aliases.
29
-
30
- 2. **Map keys must match Pega component names exactly** — these are resolved at runtime by the platform. The key is what Pega sends; the value is your React component.
31
-
32
- 3. **To replace a component**: change its import path to your new implementation. Do NOT rename the key.
33
-
34
- 4. **To add a new component**: add the import + add a new key-value entry.
35
-
36
- 5. **Key naming exceptions** (where key differs from variable name):
37
- - `Date: DateField` (Date is reserved in JS)
38
- - `URL: URLComponent` (URL is a global)
39
- - `Todo: ToDo` (casing difference)
40
-
41
- 6. **Keep the `registerSampleComponents` function** — it registers all entries into the `ComponentRegistry` instance used by the PConnect bridge.