@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
@@ -0,0 +1,29 @@
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import { PConnProps } from '@/types/PConnProps';
4
+
5
+ interface OneColumnProps extends PConnProps {
6
+ // If any, enter additional props that only exist on this component
7
+ additionalProp?: string;
8
+ }
9
+
10
+ export default function OneColumn(props: PropsWithChildren<OneColumnProps>) {
11
+ const { children } = props;
12
+
13
+ return (
14
+ <View style={styles.container}>
15
+ {(children as ReactElement[]).map((child) => {
16
+ return child;
17
+ })}
18
+ </View>
19
+ );
20
+ }
21
+
22
+ const styles = StyleSheet.create({
23
+ container: {
24
+ display: 'flex',
25
+ flexDirection: 'column',
26
+ gap: 16, // Use numeric value for spacing in React Native
27
+ alignItems: 'flex-start',
28
+ },
29
+ });
@@ -0,0 +1 @@
1
+ export { default } from './OneColumn';
@@ -0,0 +1,42 @@
1
+ import React, { createContext, useContext, useState } from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import { ActivityIndicator } from 'react-native-paper';
4
+
5
+ const LoaderContext = createContext({
6
+ showLoader: () => {},
7
+ hideLoader: () => {},
8
+ loading: false,
9
+ });
10
+
11
+ export const LoaderProvider = ({ children }: any) => {
12
+ const [loading, setLoading] = useState(false);
13
+
14
+ const showLoader = () => setLoading(true);
15
+ const hideLoader = () => setLoading(false);
16
+
17
+ return (
18
+ <LoaderContext.Provider value={{ showLoader, hideLoader, loading }}>
19
+ {children}
20
+ {loading && (
21
+ <View style={styles.loaderContainer}>
22
+ <ActivityIndicator animating={true} size="large" color="#7B8CE5" />
23
+ </View>
24
+ )}
25
+ </LoaderContext.Provider>
26
+ );
27
+ };
28
+
29
+ const styles = StyleSheet.create({
30
+ loaderContainer: {
31
+ position: 'absolute',
32
+ top: 0,
33
+ left: 0,
34
+ right: 0,
35
+ bottom: 0,
36
+ justifyContent: 'center',
37
+ alignItems: 'center',
38
+ backgroundColor: 'rgba(0,0,0,0.4)',
39
+ },
40
+ });
41
+
42
+ export const useLoader = () => useContext(LoaderContext);
@@ -0,0 +1,62 @@
1
+ import { Image } from 'expo-image';
2
+ import { StyleSheet, Text, View } from 'react-native';
3
+
4
+ const AdvBanner = () => {
5
+ return (
6
+ <View style={styles.container}>
7
+ <View style={styles.titleContainer}>
8
+ <Text style={styles.title}>Blazing fast internet speeds!</Text>
9
+ <Image source={require('../../assets/icons/cross.png')} style={styles.icon} />
10
+ </View>
11
+ <View style={styles.descContainer}>
12
+ <Text style={styles.descText}>Check how your internet works. Get the test for free now!</Text>
13
+ <Image source={require('../../assets/icons/clock.png')} style={styles.clockIcon} />
14
+ </View>
15
+ </View>
16
+ );
17
+ };
18
+
19
+ export default AdvBanner;
20
+
21
+ const styles = StyleSheet.create({
22
+ container: {
23
+ flexDirection: 'column',
24
+ backgroundColor: '#5A688259',
25
+ paddingHorizontal: 16,
26
+ paddingVertical: 16,
27
+ borderRadius: 18,
28
+ marginVertical: 10,
29
+ height: 108,
30
+ width: '100%',
31
+ },
32
+ titleContainer: {
33
+ display: 'flex',
34
+ flexDirection: 'row',
35
+ width: '100%',
36
+ justifyContent: 'space-between',
37
+ alignItems: 'center',
38
+ marginBottom: 10,
39
+ color: '#fff',
40
+ fontWeight: '500',
41
+ },
42
+ descContainer: {
43
+ flexDirection: 'row',
44
+ },
45
+ title: {
46
+ fontSize: 18,
47
+ color: '#fff',
48
+ },
49
+ descText: {
50
+ color: '#BDBCC0',
51
+ fontSize: 15,
52
+ width: '90%',
53
+ },
54
+ icon: {
55
+ width: 20,
56
+ height: 20,
57
+ },
58
+ clockIcon: {
59
+ width: 45,
60
+ height: 45,
61
+ },
62
+ });
@@ -0,0 +1,60 @@
1
+ import MaterialIcons from '@expo/vector-icons/MaterialIcons';
2
+ import { Image } from 'expo-image';
3
+ import { router } from 'expo-router';
4
+ import { Alert, StyleSheet, TouchableOpacity, View } from 'react-native';
5
+ import { logout } from '../utils/auth';
6
+
7
+ const Header = () => {
8
+ return (
9
+ <View style={styles.container}>
10
+ <Image source={require('../../assets/images/MediaCo.png')} style={styles.logo} />
11
+
12
+ <TouchableOpacity
13
+ style={styles.logoutIcon}
14
+ onPress={() => {
15
+ // Handle logout logic here
16
+ Alert.alert('Logout', 'Are you sure you want to logout?', [
17
+ {
18
+ text: 'Cancel',
19
+ style: 'cancel',
20
+ },
21
+ {
22
+ text: 'OK',
23
+ onPress: () => {
24
+ logout().finally(() => {
25
+ router.replace('/');
26
+ });
27
+ },
28
+ },
29
+ ]);
30
+ }}
31
+ >
32
+ <MaterialIcons name="logout" size={20} color="#fff" />
33
+ </TouchableOpacity>
34
+ </View>
35
+ );
36
+ };
37
+
38
+ export default Header;
39
+
40
+ const styles = StyleSheet.create({
41
+ container: {
42
+ height: 50,
43
+ display: 'flex',
44
+ flexDirection: 'row',
45
+ justifyContent: 'center',
46
+ alignItems: 'center',
47
+ width: '100%',
48
+ paddingHorizontal: 20,
49
+ },
50
+ logo: {
51
+ height: 20,
52
+ width: 90,
53
+ },
54
+ logoutIcon: {
55
+ position: 'absolute',
56
+ right: 20,
57
+ top: 15,
58
+ zIndex: 1,
59
+ },
60
+ });
@@ -0,0 +1,78 @@
1
+ import { router } from 'expo-router';
2
+ import { StyleSheet, Text, View } from 'react-native';
3
+ import { FAB } from 'react-native-paper';
4
+ import AdvBanner from './AdvBanner';
5
+ import QuickActions from './QuickActions';
6
+ import YourServices from './YourServices';
7
+
8
+ const HomeScreen = () => {
9
+ return (
10
+ <View style={styles.container}>
11
+ <QuickActions />
12
+
13
+ <AdvBanner />
14
+
15
+ <View style={styles.bundleContainer}>
16
+ <Text
17
+ style={{
18
+ color: '#fff',
19
+ fontSize: 20,
20
+ marginBottom: 16,
21
+ fontWeight: '600',
22
+ }}
23
+ >
24
+ Your bundles
25
+ </Text>
26
+ <YourServices />
27
+ </View>
28
+
29
+ <FAB
30
+ icon="plus"
31
+ label="Data Package"
32
+ style={[
33
+ styles.fab,
34
+ {
35
+ // @ts-ignore - 'color' does not exist in type 'WithAnimatedObject
36
+ color: '#FFFFFF',
37
+ backgroundColor: '#0B84FF',
38
+ },
39
+ ]}
40
+ color="#FFFFFF"
41
+ onPress={() => router.push('/workarea')}
42
+ />
43
+ </View>
44
+ );
45
+ };
46
+
47
+ export default HomeScreen;
48
+
49
+ const styles = StyleSheet.create({
50
+ container: {
51
+ width: '100%',
52
+ paddingHorizontal: 18,
53
+ flex: 1,
54
+ },
55
+ quickActionsContainer: {
56
+ flex: 1,
57
+ flexDirection: 'row',
58
+ justifyContent: 'space-around',
59
+ alignItems: 'center',
60
+ width: '100%',
61
+ },
62
+ bundleContainer: {
63
+ flexDirection: 'column',
64
+ marginTop: 20,
65
+ },
66
+ fab: {
67
+ position: 'absolute',
68
+ margin: 16,
69
+ right: 0,
70
+ bottom: 65,
71
+ borderRadius: 30,
72
+ borderCurve: 'continuous',
73
+ height: 50,
74
+ width: 170,
75
+ alignItems: 'center',
76
+ justifyContent: 'center',
77
+ },
78
+ });
@@ -0,0 +1,68 @@
1
+ import { StyleSheet, Text, View } from 'react-native';
2
+
3
+ import { Image } from 'expo-image';
4
+
5
+ const QuickActions = () => {
6
+ return (
7
+ <View style={styles.container}>
8
+ <View style={styles.item}>
9
+ <View style={[styles.iconContainer]}>
10
+ <Image source={require('../../assets/icons/donut.png')} style={styles.icon} />
11
+ </View>
12
+ <Text style={[styles.text]}>Data usage</Text>
13
+ </View>
14
+
15
+ <View style={styles.item}>
16
+ <View style={[styles.iconContainer]}>
17
+ <Image source={require('../../assets/icons/bell.png')} style={styles.icon} />
18
+ </View>
19
+ <Text style={[styles.text]}>Notifications</Text>
20
+ </View>
21
+
22
+ <View style={styles.item}>
23
+ <View style={[styles.iconContainer]}>
24
+ <Image source={require('../../assets/icons/gear.png')} style={styles.icon} />
25
+ </View>
26
+ <Text style={[styles.text]}>Settings</Text>
27
+ </View>
28
+ </View>
29
+ );
30
+ };
31
+
32
+ export default QuickActions;
33
+
34
+ const styles = StyleSheet.create({
35
+ container: {
36
+ flexDirection: 'row',
37
+ justifyContent: 'space-between',
38
+ alignItems: 'center',
39
+ padding: 10,
40
+ width: '100%',
41
+ marginTop: 20,
42
+ },
43
+ item: {
44
+ justifyContent: 'center',
45
+ alignItems: 'center',
46
+ gap: 5,
47
+ width: '30%',
48
+ },
49
+ text: {
50
+ fontSize: 15,
51
+ marginTop: 5,
52
+ textAlign: 'center',
53
+ color: '#fff',
54
+ },
55
+ iconContainer: {
56
+ justifyContent: 'center',
57
+ alignItems: 'center',
58
+ width: 44,
59
+ height: 44,
60
+ borderRadius: '50%',
61
+ backgroundColor: '#FFFFFF59',
62
+ },
63
+ icon: {
64
+ height: 20,
65
+ width: 20,
66
+ textAlign: 'center',
67
+ },
68
+ });
@@ -0,0 +1,48 @@
1
+ import { router } from 'expo-router';
2
+ import { Text, View } from 'react-native';
3
+ import { Button } from 'react-native-paper';
4
+
5
+ const ResolutionScreen = () => {
6
+ return (
7
+ <View
8
+ style={{
9
+ flex: 1,
10
+ backgroundColor: '#01153d',
11
+ }}
12
+ >
13
+ <Text
14
+ style={{
15
+ color: '#FFFFFF',
16
+ fontSize: 24,
17
+ fontWeight: 'bold',
18
+ textAlign: 'center',
19
+ marginTop: 100,
20
+ }}
21
+ >
22
+ Thank you! The next step in this case has been routed appropriately.
23
+ </Text>
24
+
25
+ <Button
26
+ mode="contained"
27
+ buttonColor="#fff"
28
+ textColor="#000"
29
+ onPress={() => {
30
+ router.replace('/home');
31
+ }}
32
+ style={{
33
+ position: 'absolute',
34
+ bottom: 20,
35
+ alignSelf: 'center',
36
+ paddingHorizontal: 20,
37
+ paddingVertical: 5,
38
+ width: '90%',
39
+ marginHorizontal: 20,
40
+ }}
41
+ >
42
+ Done
43
+ </Button>
44
+ </View>
45
+ );
46
+ };
47
+
48
+ export default ResolutionScreen;
@@ -0,0 +1,11 @@
1
+ import { SafeAreaView } from 'react-native-safe-area-context';
2
+
3
+ const SafeArea = ({ children }) => {
4
+ return (
5
+ <SafeAreaView style={{ flex: 1 }} edges={['top', 'bottom']}>
6
+ {children}
7
+ </SafeAreaView>
8
+ );
9
+ };
10
+
11
+ export default SafeArea;
@@ -0,0 +1,102 @@
1
+ import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
2
+
3
+ import AntDesign from '@expo/vector-icons/AntDesign';
4
+ import Entypo from '@expo/vector-icons/Entypo';
5
+ import FontAwesome from '@expo/vector-icons/FontAwesome';
6
+ import FontAwesome6 from '@expo/vector-icons/FontAwesome6';
7
+
8
+ export default function TabBar({ state, descriptors, navigation }) {
9
+ const icons = {
10
+ index: (props) => <Entypo name="home" size={20} color="#BDBCC0" {...props} />,
11
+ 'your-services': (props) => <AntDesign name="heart" size={24} color="#BDBCC0" {...props} />,
12
+ shop: (props) => <FontAwesome name="shopping-cart" size={20} color="#BDBCC0" {...props} />,
13
+ contact: (props) => <FontAwesome6 name="phone-volume" size={20} color="#BDBCC0" {...props} />,
14
+ };
15
+
16
+ return (
17
+ <View
18
+ style={[
19
+ styles.tabBar,
20
+ {
21
+ backgroundColor: '#16264c',
22
+ borderTopColor: '#595976',
23
+ },
24
+ ]}
25
+ >
26
+ {state.routes.map((route, index) => {
27
+ const { options } = descriptors[route.key];
28
+ const label =
29
+ options.tabBarLabel !== undefined
30
+ ? options.tabBarLabel
31
+ : options.title !== undefined
32
+ ? options.title
33
+ : route.name;
34
+
35
+ const isFocused = state.index === index;
36
+
37
+ const onPress = () => {
38
+ const event = navigation.emit({
39
+ type: 'tabPress',
40
+ target: route.key,
41
+ canPreventDefault: true,
42
+ });
43
+
44
+ if (!isFocused && !event.defaultPrevented) {
45
+ navigation.navigate(route.name, route.params);
46
+ }
47
+ };
48
+
49
+ const onLongPress = () => {
50
+ navigation.emit({
51
+ type: 'tabLongPress',
52
+ target: route.key,
53
+ });
54
+ };
55
+
56
+ return (
57
+ <TouchableOpacity
58
+ key={route.name}
59
+ style={styles.tabBarItem}
60
+ accessibilityRole="button"
61
+ accessibilityState={isFocused ? { selected: true } : {}}
62
+ accessibilityLabel={options.tabBarAccessibilityLabel}
63
+ testID={options.tabBarTestID}
64
+ onPress={onPress}
65
+ onLongPress={onLongPress}
66
+ >
67
+ {icons[route.name]({
68
+ color: isFocused ? '#FFF' : '#BDBCC0',
69
+ })}
70
+ <Text
71
+ style={{
72
+ color: isFocused ? '#FFF' : '#BDBCC0',
73
+ fontSize: 10,
74
+ }}
75
+ >
76
+ {label}
77
+ </Text>
78
+ </TouchableOpacity>
79
+ );
80
+ })}
81
+ </View>
82
+ );
83
+ }
84
+
85
+ const styles = StyleSheet.create({
86
+ tabBar: {
87
+ position: 'absolute',
88
+ bottom: 0,
89
+ flexDirection: 'row',
90
+ justifyContent: 'space-around',
91
+ alignItems: 'center',
92
+ paddingTop: 8,
93
+ paddingBottom: 10,
94
+ borderWidth: 1,
95
+ },
96
+ tabBarItem: {
97
+ flex: 1,
98
+ justifyContent: 'center',
99
+ alignItems: 'center',
100
+ gap: 5,
101
+ },
102
+ });
@@ -0,0 +1,90 @@
1
+ import { createElement } from 'react';
2
+ import { StyleSheet, Text, View } from 'react-native';
3
+ import { List } from 'react-native-paper';
4
+ import { Image } from 'expo-image';
5
+
6
+ const LIST = [
7
+ {
8
+ title: 'Entertainment package',
9
+ description: '',
10
+ icon: (props) => (
11
+ <Image source={require(`../../assets/icons/music.png`)} style={[props.style, styles.rightImage]} />
12
+ ),
13
+ },
14
+ {
15
+ title: 'High-speed data',
16
+ description: '',
17
+ icon: (props) => (
18
+ <Image source={require(`../../assets/icons/speed.png`)} style={[props.style, styles.rightImage]} />
19
+ ),
20
+ },
21
+ {
22
+ title: 'Home Internet',
23
+ description: 'internet',
24
+ icon: (props) => (
25
+ <Image source={require(`../../assets/icons/internet.png`)} style={[props.style, styles.rightImage]} />
26
+ ),
27
+ },
28
+ {
29
+ title: '📡 Satellite service',
30
+ description: 'Anyone with a compatible device is eligible for beta trial!',
31
+ icon: (props) => (
32
+ <Image source={require(`../../assets/icons/globe.png`)} style={[props.style, styles.rightImage]} />
33
+ ),
34
+ },
35
+ ];
36
+
37
+ const YourServices = () => {
38
+ return (
39
+ <View style={styles.container}>
40
+ <View style={{ marginBottom: 16, paddingHorizontal: 20 }}>
41
+ <Text
42
+ style={{
43
+ color: '#75808A',
44
+ fontSize: 14,
45
+ fontWeight: '400',
46
+ marginBottom: 10,
47
+ }}
48
+ >
49
+ Motion Plus
50
+ </Text>
51
+ <Text style={{ color: '#191C1F', fontSize: 22, fontWeight: '600' }}>212-456-7890</Text>
52
+ </View>
53
+ {LIST.map((item, index) => (
54
+ <List.Item
55
+ key={index}
56
+ title={item.title}
57
+ description={item.description}
58
+ left={(props) => createElement(item.icon, props)}
59
+ right={(props: any) => (
60
+ <Image
61
+ source={require('../../assets/icons/right-arrow.png')}
62
+ style={[styles.image, props.style, { alignSelf: 'center' }]}
63
+ />
64
+ )}
65
+ />
66
+ ))}
67
+ </View>
68
+ );
69
+ };
70
+
71
+ export default YourServices;
72
+
73
+ const styles = StyleSheet.create({
74
+ container: {
75
+ backgroundColor: '#FFFFFF',
76
+ height: 408,
77
+ borderRadius: 18,
78
+ paddingVertical: 20,
79
+ },
80
+ image: {
81
+ width: 7, // Adjust width as needed
82
+ height: 20, // Adjust height as needed
83
+ borderRadius: 20, // Example for a circular image
84
+ marginRight: 8, // Add some spacing
85
+ },
86
+ rightImage: {
87
+ width: 44, // Adjust width as needed
88
+ height: 44, // Adjust height as needed
89
+ },
90
+ });
@@ -0,0 +1,64 @@
1
+ import type { ComponentRegistry } from '@pega/sdk-types';
2
+
3
+ import RootContainer from './components/infra/Containers/RootContainer';
4
+ import ViewContainer from './components/infra/Containers/ViewContainer';
5
+ import FlowContainer from './components/infra/Containers/FlowContainer';
6
+ import Reference from './components/infra/Reference';
7
+ import Region from './components/infra/Region';
8
+ import View from './components/infra/View/View';
9
+ import DefaultForm from './components/template/DefaultForm';
10
+ import OneColumn from './components/template/OneColumn';
11
+ import Details from './components/template/Details';
12
+
13
+ import AutoComplete from './components/field/AutoComplete';
14
+ import Checkbox from './components/field/Checkbox';
15
+ import Currency from './components/field/Currency';
16
+ import Date from './components/field/Date';
17
+ import Dropdown from './components/field/Dropdown';
18
+ import Email from './components/field/Email';
19
+ import Group from './components/field/Group';
20
+ import Integer from './components/field/Integer';
21
+ import Phone from './components/field/Phone';
22
+ import RadioButtons from './components/field/RadioButtons';
23
+ import TextArea from './components/field/TextArea';
24
+ import TextInput from './components/field/TextInput';
25
+ import URL from './components/field/URL';
26
+
27
+ const pegaSdkComponentMap: any = {
28
+ RootContainer: RootContainer,
29
+ ViewContainer: ViewContainer,
30
+ reference: Reference,
31
+ View,
32
+ Region: Region,
33
+ FlowContainer: FlowContainer,
34
+ DefaultForm: DefaultForm,
35
+ OneColumn: OneColumn,
36
+ TwoColumn: OneColumn, // Showing TwoColumn template as OneColumn for mobile compatibility
37
+ Details: Details,
38
+
39
+ AutoComplete: AutoComplete,
40
+ Checkbox: Checkbox,
41
+ Currency: Currency,
42
+ Date: Date,
43
+ Dropdown: Dropdown,
44
+ Email: Email,
45
+ Group: Group,
46
+ Integer: Integer,
47
+ Phone: Phone,
48
+ RadioButtons: RadioButtons,
49
+ TextArea: TextArea,
50
+ TextInput: TextInput,
51
+ URL: URL,
52
+ };
53
+
54
+ export default pegaSdkComponentMap;
55
+
56
+ /**
57
+ * Register all SDK components into a ComponentRegistry.
58
+ * Call once during workarea bootstrap, before initCoreContainers().
59
+ */
60
+ export function registerComponents(registry: ComponentRegistry<React.ComponentType<any>>) {
61
+ for (const key in pegaSdkComponentMap) {
62
+ registry.register(key, pegaSdkComponentMap[key]);
63
+ }
64
+ }