@pega/sdk 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/README.md +10 -3
  2. package/dist/index.js +764 -165
  3. package/package.json +1 -1
  4. package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
  5. package/templates/react-native-sdk-reference/.prettierignore +17 -0
  6. package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
  7. package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
  8. package/templates/react-native-sdk-reference/AGENTS.md +3 -0
  9. package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
  10. package/templates/react-native-sdk-reference/README.md +56 -0
  11. package/templates/react-native-sdk-reference/app.json +40 -5
  12. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  13. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
  14. package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
  15. package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
  16. package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
  17. package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
  18. package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
  19. package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
  20. package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
  21. package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
  22. package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
  23. package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
  24. package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
  25. package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
  26. package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
  27. package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
  28. package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
  29. package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
  30. package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
  31. package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
  32. package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
  33. package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
  34. package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
  35. package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
  36. package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
  37. package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
  38. package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
  39. package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
  40. package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
  41. package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
  42. package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
  43. package/templates/react-native-sdk-reference/package.json +59 -14
  44. package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
  45. package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  46. package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
  47. package/templates/react-native-sdk-reference/sdk-config.json +31 -9
  48. package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
  49. package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
  50. package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
  51. package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
  52. package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
  53. package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
  54. package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
  55. package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
  56. package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
  57. package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
  58. package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
  59. package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
  60. package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
  61. package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
  62. package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
  63. package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
  64. package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
  65. package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
  66. package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
  67. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
  68. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
  69. package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
  70. package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
  71. package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
  72. package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
  73. package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
  74. package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
  75. package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
  76. package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
  77. package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
  78. package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
  79. package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
  80. package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
  81. package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
  82. package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
  83. package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
  84. package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
  85. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
  86. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
  87. package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
  88. package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
  89. package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
  90. package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
  91. package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
  92. package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
  93. package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
  94. package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
  95. package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
  96. package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
  97. package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
  98. package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
  99. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
  100. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
  101. package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
  102. package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
  103. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
  104. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
  105. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
  106. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
  107. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
  108. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
  109. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
  110. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
  111. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
  112. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
  113. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
  114. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
  115. package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
  116. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
  117. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
  118. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
  119. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
  120. package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
  121. package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
  122. package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
  123. package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
  124. package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
  125. package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
  126. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
  127. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
  128. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
  129. package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
  130. package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
  131. package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
  132. package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
  133. package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
  134. package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
  135. package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
  136. package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
  137. package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
  138. package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
  139. package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
  140. package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
  141. package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
  142. package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
  143. package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
  144. package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
  145. package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
  146. package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
  147. package/templates/react-native-sdk-reference/tsconfig.json +9 -8
  148. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
  149. package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
  150. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
  151. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
  152. package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
  153. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
  154. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
  155. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
  156. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
  157. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
  158. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
  159. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
  160. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
  161. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
  162. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
  163. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
  164. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
  165. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
  166. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
  167. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
  168. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
  169. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
  170. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
  171. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
  172. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
  173. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
  174. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
  175. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
  176. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
  177. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
  178. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
  179. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
  180. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
  181. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
  182. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
  183. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
  184. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
  185. package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
  186. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
  187. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
  188. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
  189. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
  190. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
  191. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
  192. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
  193. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
  194. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
  195. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
  196. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
  197. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
  198. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
  199. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
  200. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
  201. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
  202. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
  203. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
  204. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
  205. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
  206. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
  207. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
  208. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
  209. package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
  210. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
  211. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
  212. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
  213. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
  214. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
  215. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
  216. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
  217. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
  218. package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
  219. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
  220. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
  221. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
  222. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
  223. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
  224. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
  225. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
  226. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
  227. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
  228. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
  229. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
  230. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
  231. package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
  232. package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
  233. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
  234. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
  235. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
  236. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
  237. package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
  238. package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
  239. package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
  240. package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
  241. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
  242. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
  243. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
  244. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
  245. package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
  246. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
  247. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
  248. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
  249. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
  250. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
  251. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
  252. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
  253. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
  254. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
  255. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
  256. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
  257. package/templates/react-sdk-reference/package.json +1 -1
  258. package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
  259. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  260. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
  261. package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
  262. package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
  263. package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
  264. package/templates/react-native-sdk-reference/App.tsx +0 -49
  265. package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
  266. package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
@@ -12,11 +12,11 @@ Entry-point template for embedded table data in a form or detail view. Routes to
12
12
 
13
13
  ## Pega Metadata
14
14
 
15
- - **Registration keys:** `SimpleTable`, `SimpleTableManual`, `SimpleTableSelect`, `SimpleTableSelectReadonly` (all in `component-map.ts`)
15
+ - **Registration keys:** `SimpleTable`, `SimpleTableManual`, `SimpleTableSelect`, `SimpleTableSelectReadonly` (all in the project's component map)
16
16
  - **Category:** Data display / Form template — embedded table
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
  | ---------------------- | ---------- | -------- | ----------------------------------------------------------------------------------------- |
@@ -29,35 +29,18 @@ Entry-point template for embedded table data in a form or detail view. Routes to
29
29
  | `readOnly` | `boolean` | No | Alternative read-only flag |
30
30
  | `getPConnect` | `function` | Yes | PConnect getter |
31
31
 
32
- ## Component Skeleton
32
+ ## Implementation Structure
33
33
 
34
34
  ### SimpleTable (router)
35
35
 
36
- ```typescript
37
- import { getComponentFromRegistry } from '@pega/sdk-react';
38
- import { buildMetaForListView, getContext } from '../../../helpers/simpleTableHelpers';
36
+ **Module Setup:** The component depends on the project's component registry (to resolve `ListView`, `FieldGroupTemplate`, and `SimpleTableManual`) and the project's simple-table helper utilities (`buildMetaForListView` and `getContext`).
39
37
 
40
- export default function SimpleTable(props: SimpleTableProps) {
41
- const ListView = getComponentFromRegistry('ListView');
42
- const FieldGroupTemplate = getComponentFromRegistry('FieldGroupTemplate');
43
- const SimpleTableManual = getComponentFromRegistry('SimpleTableManual');
44
- const { getPConnect, multiRecordDisplayAs, allowTableEdit, fieldMetadata, displayMode, ... } = props;
38
+ **Main Component Logic** — steps in order:
45
39
 
46
- // 1. Route: fieldGroup
47
- if (multiRecordDisplayAs === 'fieldGroup') {
48
- return <FieldGroupTemplate {...props} contextClass={contextClass} />;
49
- }
50
-
51
- // 2. Route: reference list (read-only ListView)
52
- if (fieldMetadata?.type === 'Page List' && fieldMetadata?.dataRetrievalType === 'refer') {
53
- const metaForListView = buildMetaForListView(...);
54
- return <ListView {...listViewProps} bInForm={true} displayMode={displayMode} />;
55
- }
56
-
57
- // 3. Route: editable table
58
- return <SimpleTableManual {...props} contextClass={contextClass} />;
59
- }
60
- ```
40
+ 1. Resolve `ListView`, `FieldGroupTemplate`, and `SimpleTableManual` from the project's component registry; receive `getPConnect`, `multiRecordDisplayAs`, `allowTableEdit`, `fieldMetadata`, `displayMode`, and other relevant inputs.
41
+ 2. **Route to `fieldGroup`:** when `multiRecordDisplayAs === 'fieldGroup'`, render `FieldGroupTemplate` with all inputs plus `contextClass`.
42
+ 3. **Route to a read-only reference list:** when `fieldMetadata?.type === 'Page List'` and `fieldMetadata?.dataRetrievalType === 'refer'`, build `metaForListView` via `buildMetaForListView(...)` and render `ListView` with the list-view inputs plus `bInForm: true` and `displayMode`.
43
+ 4. **Route to the editable table:** otherwise, render `SimpleTableManual` with all inputs plus `contextClass`.
61
44
 
62
45
  ### SimpleTableManual (editable table — ~600+ lines)
63
46
 
@@ -72,38 +55,21 @@ Key structural outline:
72
55
 
73
56
  ### SimpleTableSelect (selection wrapper)
74
57
 
75
- ```typescript
76
- const ListView = getComponentFromRegistry('ListView');
77
- const PromotedFilters = getComponentFromRegistry('PromotedFilters');
78
- // Build additionalTableConfig with selectionMode, compositeKeys
79
- // If promoted filters exist: <PromotedFilters ... />
80
- // Else: <ListView {...listViewProps} />
81
- ```
58
+ Retrieve `ListView` and `PromotedFilters` from the component registry. Build an `additionalTableConfig` incorporating `selectionMode` and `compositeKeys`. When promoted filters are configured, render `<PromotedFilters ... />`; otherwise render `<ListView {...listViewProps} />` directly.
82
59
 
83
60
  ### SimpleTableSelectReadonly (link + modal)
84
61
 
85
- ```typescript
86
- // Renders SemanticLink per selected item (comma-separated)
87
- // If list > 5 items: show "(N Total)" link that opens modal
88
- // Modal: <Dialog><SimpleTableManual readOnly ... /></Dialog>
89
- ```
62
+ Renders a `SemanticLink` per selected item (comma-separated). When the list has more than 5 items, show a "(N Total)" link that opens a modal. The modal renders a `<Dialog>` wrapping a read-only `<SimpleTableManual readOnly ... />`.
90
63
 
91
64
  ## Behavioral Contract
92
65
 
93
66
  ### SimpleTable — Routing Logic
94
67
 
95
- ```
96
- if multiRecordDisplayAs === 'fieldGroup':
97
- → render FieldGroupTemplate
98
- else if fieldMetadata.dataRetrievalType === 'refer':
99
- → render ListView (read-only, bInForm: true)
100
- else:
101
- → render SimpleTableManual (editable table)
102
- ```
68
+ When `multiRecordDisplayAs === 'fieldGroup'`, render `FieldGroupTemplate`. Otherwise, when `fieldMetadata.dataRetrievalType === 'refer'`, render `ListView` (read-only, `bInForm: true`). Otherwise, render `SimpleTableManual` (the editable table).
103
69
 
104
70
  ### SimpleTableManual — Full Editable Table
105
71
 
106
- Full MUI table with add/delete rows, inline editing, sort, filter, and column customization (~600+ lines).
72
+ Full editable table with add/delete rows, inline editing, sort, filter, and column customization (~600+ lines).
107
73
 
108
74
  Key behaviors:
109
75
 
@@ -127,7 +93,7 @@ Wraps `ListView` with additional selection configuration:
127
93
 
128
94
  1. Renders a link/chip showing the current selection count.
129
95
  2. On click: opens a `<Dialog>` containing a `<SimpleTableManual>` in read-only mode.
130
- 3. Props: same as `SimpleTableManual` but all fields locked (no add/delete/edit).
96
+ 3. Inputs: same as `SimpleTableManual` but all fields locked (no add/delete/edit).
131
97
 
132
98
  ## Visual Specifications
133
99
 
@@ -168,23 +134,18 @@ Wraps `ListView` with additional selection configuration:
168
134
 
169
135
  - `FieldGroupTemplate` (for `multiRecordDisplayAs === 'fieldGroup'` routing)
170
136
  - `ListView` (for `dataRetrievalType === 'refer'` routing)
171
- - `buildView` from `../../helpers/field-group-utils` (for inline cell rendering in SimpleTableManual)
172
- - MUI: `<Table>`, `<Dialog>`, `<Popover>`, `<IconButton>`, `<Button>`, `<Checkbox>`
137
+ - `buildView` from the project's field-group utility helpers (for inline cell rendering in SimpleTableManual)
138
+ - The design system's table, dialog, popover, icon button, button, and checkbox components.
173
139
 
174
140
  ## Design System Mapping
175
141
 
176
142
  **UI control type:** Embedded data table with routing to field group, read-only list, or fully editable table.
177
143
 
178
- Listed design systems are examples only.
179
-
180
- | Sub-variant | Default (CSS only) | MUI |
181
- | ------------------------- | ----------------------------- | -------------------- |
182
- | SimpleTableManual | `<table>` + custom controls | MUI `<Table>` |
183
- | SimpleTableSelect | Custom table + radio/checkbox | `<ListView>` wrapper |
184
- | SimpleTableSelectReadonly | Link + `<dialog>` | Chip + `<Dialog>` |
185
-
186
- When implementing in a specific design system:
144
+ When implementing in a specific design system, map the following:
187
145
 
146
+ - **SimpleTableManual** → use the DS's table component with add/delete row controls and inline editing
147
+ - **SimpleTableSelect** → use `ListView` with selection mode enabled, optionally with promoted filters
148
+ - **SimpleTableSelectReadonly** → render selected values as chips/links that open a modal with full list view
188
149
  - Always check `multiRecordDisplayAs === 'fieldGroup'` first — this bypasses the table entirely
189
150
  - `SimpleTableManual` add/delete row controls must be hidden when `readOnly === true` or `displayMode === 'DISPLAY_ONLY'`
190
151
  - `SimpleTableSelect` uses the same `ListView` but adds selection callbacks
@@ -12,86 +12,45 @@ Renders a single data reference field in read-only mode. For fields that were di
12
12
 
13
13
  ## Pega Metadata
14
14
 
15
- - **Registration key:** `SingleReferenceReadOnly` (in `component-map.ts`)
15
+ - **Registration key:** `SingleReferenceReadOnly` (in the project's component map)
16
16
  - **Category:** Display template — read-only reference
17
- - **Extends:** `PConnProps`
18
-
19
- ## Props
20
-
21
- | Prop | Type | Required | Description |
22
- | ----------------- | ---------- | -------- | --------------------------------------------------------- |
23
- | `label` | `string` | Yes | Field label |
24
- | `displayAs` | `string` | Yes | The edit-mode display type this field was configured with |
25
- | `value` | `string` | No | Current field value (display text) |
26
- | `caseClass` | `string` | No | Class identifier for the referenced case |
27
- | `text` | `string` | No | Display text for the semantic link |
28
- | `caseID` | `string` | No | Case ID for the semantic link |
29
- | `contextPage` | `string` | No | Context page identifier |
30
- | `resourceParams` | `object` | No | Parameters for the referenced resource |
31
- | `resourcePayload` | `object` | No | Payload for resource navigation |
32
- | `getPConnect` | `function` | Yes | PConnect getter |
33
-
34
- ## Component Skeleton
35
-
36
- ```typescript
37
- import type { PConnProps } from '@pega/sdk-react';
38
-
39
- interface SingleReferenceReadOnlyProps extends PConnProps {
40
- config: any;
41
- displayAs?: string;
42
- ruleClass?: string;
43
- label?: string;
44
- displayMode?: string;
45
- type: string;
46
- referenceType?: string;
47
- hideLabel?: boolean;
48
- dataRelationshipContext?: string;
49
- }
50
-
51
- export default function SingleReferenceReadOnly(props: SingleReferenceReadOnlyProps) {
52
- const {
53
- getPConnect, displayAs = '', ruleClass = '', label = '',
54
- type = '', displayMode = '', referenceType = '',
55
- hideLabel = false, dataRelationshipContext = null, config,
56
- } = props;
57
-
58
- const editableComponents = ['AutoComplete', 'SimpleTableSelect', 'Dropdown'];
59
-
60
- // 1. For editable field types: build SemanticLink config
61
- if (editableComponents.includes(type)) {
62
- config.caseClass = ruleClass;
63
- config.text = config.primaryField;
64
- config.caseID = config.value;
65
- config.contextPage = `@P .${dataRelationshipContext}`;
66
- config.resourceParams = { workID: displayAs === 'table' ? config.selectionKey : config.value };
67
- config.resourcePayload = { caseClassName: ruleClass };
68
- }
69
-
70
- // 2. Create SemanticLink component
71
- const component = getPConnect().createComponent(
72
- { type: 'SemanticLink', config: { ...config, label, displayMode, referenceType, hideLabel, dataRelationshipContext } },
73
- '', 0, {},
74
- );
75
-
76
- // 3. Render: label + semantic link in row layout
77
- return (
78
- <FormRow>
79
- <Label>{label}</Label>
80
- {component}
81
- </FormRow>
82
- );
83
- }
84
- ```
17
+ - **Extends:** the project's base component interface
18
+
19
+ ## Inputs
20
+
21
+ | Input | Type | Required | Description |
22
+ | ------------------------- | ---------- | -------- | --------------------------------------------------------- |
23
+ | `label` | `string` | Yes | Field label |
24
+ | `displayAs` | `string` | Yes | The edit-mode display type this field was configured with |
25
+ | `value` | `string` | No | Current field value (display text) |
26
+ | `caseClass` | `string` | No | Class identifier for the referenced case |
27
+ | `text` | `string` | No | Display text for the semantic link |
28
+ | `caseID` | `string` | No | Case ID for the semantic link |
29
+ | `contextPage` | `string` | No | Context page identifier |
30
+ | `resourceParams` | `object` | No | Parameters for the referenced resource |
31
+ | `resourcePayload` | `object` | No | Payload for resource navigation |
32
+ | `dataRelationshipContext` | `string` | No | Data relationship context identifier |
33
+ | `getPConnect` | `function` | Yes | PConnect getter |
34
+
35
+ ## Implementation Structure
36
+
37
+ **Module Setup:** This component requires the project's base component interface. Define a component input contract extending the base interface with `config` (object), optional `displayAs`, optional `ruleClass`, optional `label`, optional `displayMode`, `type` (string), optional `referenceType`, optional `hideLabel`, and optional `dataRelationshipContext`.
38
+
39
+ **Main Component Logic** — steps in order:
40
+
41
+ 1. Receive inputs: `getPConnect`, `displayAs` (default `''`), `ruleClass` (default `''`), `label` (default `''`), `type` (default `''`), `displayMode` (default `''`), `referenceType` (default `''`), `hideLabel` (default `false`), `dataRelationshipContext` (default `null`), and `config`.
42
+ 2. Define `editableComponents = ['AutoComplete', 'SimpleTableSelect', 'Dropdown']`.
43
+ 3. **For editable field types** (when `type` is in `editableComponents`), mutate `config` to add semantic link configuration: `caseClass = ruleClass`; `text = config.primaryField`; `caseID = config.value`; `contextPage = '@P .' + dataRelationshipContext`; `resourceParams = { workID: displayAs === 'table' ? config.selectionKey : config.value }`; `resourcePayload = { caseClassName: ruleClass }`.
44
+ 4. Create the `SemanticLink` component via `getPConnect().createComponent({ type: 'SemanticLink', config: { ...config, label, displayMode, referenceType, hideLabel, dataRelationshipContext } }, '', 0, {})`.
45
+ 5. Render a form row containing a label showing `label`, followed by the created component.
85
46
 
86
47
  ## Behavioral Contract
87
48
 
88
49
  ### Editable Component Check
89
50
 
90
- ```
91
- editableComponents = ['AutoComplete', 'SimpleTableSelect', 'Dropdown']
92
- ```
51
+ `editableComponents = ['AutoComplete', 'SimpleTableSelect', 'Dropdown']`.
93
52
 
94
- If `displayAs` is in `editableComponents`:
53
+ If `type` is in `editableComponents`:
95
54
 
96
55
  1. Build config with: `caseClass`, `text`, `caseID`, `contextPage`, `resourceParams`, `resourcePayload`.
97
56
  2. Create: `createComponent({ type: 'SemanticLink', config: { ...builtConfig } })`.
@@ -99,18 +58,11 @@ If `displayAs` is in `editableComponents`:
99
58
 
100
59
  Else:
101
60
 
102
- - Render a plain read-only display using `<FormControl variant='standard'>` + `<FormLabel>` + value text.
61
+ - Render a plain read-only display with a label and value text.
103
62
 
104
63
  ### Layout
105
64
 
106
- For both variants, wrap with:
107
-
108
- ```tsx
109
- <FormControl variant="standard" sx={{ flexDirection: 'row' }}>
110
- <FormLabel sx={{ marginRight: '2rem' }}>{label}</FormLabel>
111
- {semanLinkOrValue}
112
- </FormControl>
113
- ```
65
+ For both variants, wrap the label and the semantic link (or plain value) in a row-oriented form control: a container styled with row direction, containing a label element (with right margin) showing `label`, followed by the semantic link or value.
114
66
 
115
67
  ## Visual Specifications
116
68
 
@@ -128,33 +80,24 @@ For both variants, wrap with:
128
80
 
129
81
  ## Edge Cases & Special Logic
130
82
 
131
- - `displayAs` check is case-sensitive — values are `'AutoComplete'`, `'SimpleTableSelect'`, `'Dropdown'` (exact match).
132
- - `createComponent` returns a PConnect config — render via `createElement(PConnectComponent, { ...createdConfig })`.
83
+ - `type` check is case-sensitive — values are `'AutoComplete'`, `'SimpleTableSelect'`, `'Dropdown'` (exact match).
84
+ - `createComponent` returns a renderable component — render it via the project's component registry conventions.
133
85
  - If `text` is empty/undefined, the semantic link shows the `caseID` as fallback text.
134
86
  - `SemanticLink` navigation requires `caseClass` and `caseID` — if either is missing, fall back to plain read-only display.
135
87
 
136
88
  ## Dependencies
137
89
 
138
- - `PConnectComponent` from `@pega/sdk-react` — for rendering the `SemanticLink`
90
+ - The project's component registry — for rendering the `SemanticLink`
139
91
  - `getPConnect().createComponent()` — creates the SemanticLink component config
140
- - MUI: `<FormControl>`, `<FormLabel>`
141
92
 
142
93
  ## Design System Mapping
143
94
 
144
95
  **UI control type:** Read-only reference field — semantic link for navigable references, plain label otherwise.
145
96
 
146
- Listed design systems are examples only.
147
-
148
- | Design System | Semantic Link | Plain Read-Only |
149
- | ------------------ | --------------------------------------------- | ------------------- |
150
- | Default (CSS only) | `<a>` with case navigation | `<span>` |
151
- | MUI | `SemanticLink` rendered via `createComponent` | `<Typography>` |
152
- | Ant Design | `<Typography.Link>` | `<Typography.Text>` |
153
- | Chakra UI | `<Link>` | `<Text>` |
154
- | Shadcn/ui | Custom link | `<span>` |
155
-
156
- When implementing in a specific design system:
97
+ When implementing in a specific design system, map the following:
157
98
 
158
- - The `editableComponents` list (`'AutoComplete'`, `'SimpleTableSelect'`, `'Dropdown'`) controls semantic link vs plain display
159
- - `SemanticLink` must be rendered via `createComponent` — do not implement the link logic directly in this component
160
- - Horizontal label + value layout (row direction) is required
99
+ - For editable field types (`'AutoComplete'`, `'SimpleTableSelect'`, `'Dropdown'`), render a semantic link that navigates to the referenced case.
100
+ - For other field types, render a plain read-only label with the value text.
101
+ - `SemanticLink` must be rendered via `createComponent` — do not implement the link logic directly in this component.
102
+ - Horizontal label + value layout (row direction) is required.
103
+ - The wrapper should be a form-control-style container with flex row direction and appropriate spacing between label and value.
@@ -12,78 +12,47 @@ Renders a horizontal tab bar for navigating between case view sections. Uses sha
12
12
 
13
13
  ## Pega Metadata
14
14
 
15
- - **Registration key:** `SubTabs` (in `component-map.ts`)
15
+ - **Registration key:** `SubTabs` (in the project's component map)
16
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
- ## Component Skeleton
27
-
28
- ```typescript
29
- import { Children, type PropsWithChildren, useEffect, useState } from 'react';
30
- import { getTransientTabs, getVisibleTabs, tabClick } from './tabUtils';
31
- import type { PConnProps } from '@pega/sdk-react';
32
-
33
- export default function SubTabs(props: PropsWithChildren<PConnProps>) {
34
- const { children = [] } = props;
35
-
36
- // 1. Extract deferred tabs
37
- const deferLoadedTabs = Children.toArray(children)[0];
38
- const availableTabs = getVisibleTabs(deferLoadedTabs, 'tabsSubs');
39
-
40
- // 2. State
41
- const [currentTabId, setCurrentTabId] = useState('0');
42
- const [tabItems, setTabitem] = useState<any[]>([]);
43
-
44
- // 3. Update tab items when currentTabId changes
45
- useEffect(() => {
46
- setTabitem(getTransientTabs(availableTabs, currentTabId, tabItems));
47
- }, [currentTabId]);
48
-
49
- // 4. Tab click
50
- const handleTabClick = (id, index: string) => {
51
- setCurrentTabId(index);
52
- tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems);
53
- };
54
-
55
- // 5. Render: TabContext + Tabs (scrollable) + TabPanels (no heading)
56
- return (
57
- <TabContext value={currentTabId.toString()}>
58
- <TabBar onChange={handleTabClick} value={currentTabId} variant="scrollable">
59
- {tabItems.map(tab => <Tab key={tab.id} label={tab.name} value={tab.id} />)}
60
- </TabBar>
61
- {tabItems.map(tab => (
62
- <TabPanel key={tab.id} value={tab.id} tabIndex={+tab.id}>
63
- {tab.content || 'No content exists'}
64
- </TabPanel>
65
- ))}
66
- </TabContext>
67
- );
68
- }
69
- ```
70
-
71
- > **Key difference from `DetailsSubTabs`:** No heading, uses `'tabsSubs'` identifier, `getVisibleTabs` called directly (not in useEffect).
17
+ - **Extends:** the project's base component interface
18
+
19
+ ## Inputs
20
+
21
+ | Input | Type | Required | Description |
22
+ | ------------- | ---------------- | -------- | --------------------------------------------------- |
23
+ | `children` | child node array | Yes | `children[0]` is the deferred-loaded tabs container |
24
+ | `getPConnect` | function | Yes | PConnect getter |
25
+
26
+ ## Implementation Structure
27
+
28
+ **Module Setup:** The component requires access to a framework utility for converting children to an array, local state and lifecycle effect primitives, `getTransientTabs`, `getVisibleTabs`, and `tabClick` from the local tab utilities module, and the project's base component interface.
29
+
30
+ **Main Component Logic** — steps in order:
31
+
32
+ 1. Receive inputs: extract `children` (defaulting to an empty array).
33
+ 2. Extract the deferred tabs container: convert children to an array and take the first element.
34
+ 3. Compute `availableTabs` via `getVisibleTabs(deferLoadedTabs, 'tabsSubs')`.
35
+ 4. Declare local state: `currentTabId` (string, initialized to `'0'`) and `tabItems` (array, initialized empty).
36
+ 5. In a lifecycle effect keyed on `currentTabId`, update `tabItems` via `getTransientTabs(availableTabs, currentTabId, tabItems)`.
37
+ 6. Define a tab-click handler that sets `currentTabId` to the clicked index and calls `tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems)`.
38
+ 7. Render a tab context wrapping a scrollable tab bar (one tab per `tabItems` entry, labeled `tab.name`) and a set of tab panels (each showing `tab.content` or a "No content exists" fallback) — no section heading is rendered.
39
+
40
+ > **Key difference from `DetailsSubTabs`:** No heading, uses `'tabsSubs'` identifier, `getVisibleTabs` called directly (not inside a lifecycle effect).
72
41
 
73
42
  ## Behavioral Contract
74
43
 
75
- 1. **Extract deferred tabs:** `deferLoadedTabs = Children.toArray(children)[0]`.
44
+ 1. **Extract deferred tabs:** `deferLoadedTabs` = first element of the children array.
76
45
  2. **State:** `currentTabId` (string, default `'0'`), `tabItems` (array).
77
- 3. **Compute visible tabs:** `getVisibleTabs(deferLoadedTabs, 'tabsSubs')` in `useEffect([deferLoadedTabs])` → `availableTabs`.
78
- 4. **Transient tabs:** `useEffect([currentTabId])` → `setTabItems(getTransientTabs(availableTabs, currentTabId, tabItems))`.
46
+ 3. **Compute visible tabs:** `getVisibleTabs(deferLoadedTabs, 'tabsSubs')` → `availableTabs`.
47
+ 4. **Transient tabs:** lifecycle effect keyed on `currentTabId` → update `tabItems` via `getTransientTabs(availableTabs, currentTabId, tabItems)`.
79
48
  5. **Tab click:** `tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems)` from `tabUtils`.
80
49
  6. **Render:**
81
- - `<TabContext value={currentTabId}>`
82
- - `<Tabs onChange={handleTabClick} value={currentTabId}>` — one `<Tab>` per `tabItems`
83
- - One `<TabPanel>` per `tabItems` with `tab.content || ''`
50
+ - A tab context container bound to `currentTabId`
51
+ - A scrollable tab bar with change handler — one tab per `tabItems` entry
52
+ - One tab panel per `tabItems` entry with `tab.content` or empty fallback text "No content exists"
84
53
  7. No section heading (unlike `DetailsSubTabs`).
85
54
 
86
- > **Difference from `DetailsSubTabs`:** SubTabs has no `label`/`showLabel` props and no `<h3>` heading. Uses `'tabsSubs'` identifier for `getVisibleTabs` (vs `'detailsSubTabs'`).
55
+ > **Difference from `DetailsSubTabs`:** SubTabs has no `label`/`showLabel` inputs and no heading. Uses `'tabsSubs'` identifier for `getVisibleTabs` (vs `'detailsSubTabs'`).
87
56
 
88
57
  ## Visual Specifications
89
58
 
@@ -104,25 +73,16 @@ See `DetailsSubTabs.md` for shared edge cases. Additional:
104
73
 
105
74
  ## Dependencies
106
75
 
107
- - `getTransientTabs`, `getVisibleTabs`, `tabClick` from `./tabUtils`
108
- - `TabContext`, `TabPanel` from `@mui/lab`
109
- - `Tab`, `Tabs` from `@mui/material`
76
+ - `getTransientTabs`, `getVisibleTabs`, `tabClick` from the local tab utilities module (`tabUtils`)
77
+ - A design-system tab container, tab bar, and tab panel component (see below)
110
78
 
111
79
  ## Design System Mapping
112
80
 
113
81
  **UI control type:** Tab navigation container — no heading, deferred content loading.
114
82
 
115
- Listed design systems are examples only.
116
-
117
- | Design System | Recommended Component |
118
- | ------------------ | -------------------------------------------------------- |
119
- | Default (CSS only) | Custom tab bar with CSS underline indicator |
120
- | MUI | `<TabContext>` + `<Tabs>` + `<TabPanel>` from `@mui/lab` |
121
- | Ant Design | `<Tabs>` with `items` array |
122
- | Chakra UI | `<Tabs>` + `<TabList>` + `<TabPanels>` |
123
- | Shadcn/ui | `<Tabs>` + `<TabsList>` + `<TabsContent>` |
83
+ When implementing in a specific design system, map the following: a tab context container that holds the current tab value; a scrollable tab bar component that emits a change event with the selected index; individual tab items with label text; and tab panel containers that display content for the active tab. In a CSS-only approach, use a custom tab bar with an underline indicator. Other design systems provide equivalent compound tab components.
124
84
 
125
- When implementing in a specific design system:
85
+ When implementing:
126
86
 
127
87
  - Use `getVisibleTabs(tabs, 'tabsSubs')` — the identifier string must be `'tabsSubs'`
128
88
  - No heading above the tab bar (unlike `DetailsSubTabs`)