@pega/custom-dx-components 26.1.11 → 26.1.12-alpha.0.2

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 (323) hide show
  1. package/README.md +6 -2
  2. package/package.json +48 -64
  3. package/src/ai/README.md +44 -0
  4. package/src/ai/catalog/README.md +133 -0
  5. package/src/ai/catalog/best-practices/README.md +24 -0
  6. package/src/ai/catalog/best-practices/accessibility-for-async-components.md +53 -0
  7. package/src/ai/catalog/best-practices/error-handling-and-resiliency.md +116 -0
  8. package/src/ai/catalog/best-practices/genai-assistant-integration-patterns.md +49 -0
  9. package/src/ai/catalog/best-practices/performance-and-efficiency.md +109 -0
  10. package/src/ai/catalog/best-practices/security-considerations.md +93 -0
  11. package/src/ai/catalog/best-practices/testing-pconnect-components.md +245 -0
  12. package/src/ai/catalog/best-practices/troubleshooting-common-pitfalls.md +132 -0
  13. package/src/ai/catalog/pconnect-assignment-lifecycle/SKILL.md +44 -0
  14. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/README.md +39 -0
  15. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/approval-workflow-decision.md +47 -0
  16. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/attachment-upload.md +45 -0
  17. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/bulk-action-submit.md +50 -0
  18. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/confirm-before-destructive-action.md +43 -0
  19. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/create-and-stage-new-case.md +45 -0
  20. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/graceful-submit-failure.md +39 -0
  21. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/modal-assignment-submit.md +58 -0
  22. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/multi-step-wizard.md +44 -0
  23. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/resolve-or-ignore-duplicate.md +47 -0
  24. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/safe-case-deletion.md +36 -0
  25. package/src/ai/catalog/pconnect-case-collaboration/SKILL.md +42 -0
  26. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/README.md +36 -0
  27. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/look-up-user-details.md +43 -0
  28. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-attachments.md +51 -0
  29. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-participants.md +52 -0
  30. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/participant-and-follower.md +40 -0
  31. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/post-and-manage-feed.md +50 -0
  32. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/relate-cases.md +35 -0
  33. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/tag-case-and-find-related.md +44 -0
  34. package/src/ai/catalog/pconnect-data-subscriptions/SKILL.md +42 -0
  35. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/README.md +35 -0
  36. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/data-page-subscription-cleanup.md +41 -0
  37. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/publish-and-subscribe-events.md +40 -0
  38. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/pubsub-cleanup.md +38 -0
  39. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/query-paginated-list-data.md +44 -0
  40. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/realtime-case-subscription.md +46 -0
  41. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/refresh-and-update-data.md +41 -0
  42. package/src/ai/catalog/pconnect-forms-and-fields/SKILL.md +44 -0
  43. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/README.md +36 -0
  44. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/autosave-tracking.md +45 -0
  45. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/cascading-dependent-fields.md +51 -0
  46. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/collect-form-changes-for-manual-save.md +45 -0
  47. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/custom-field-validators.md +44 -0
  48. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/discard-changes-and-reset-form.md +41 -0
  49. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/full-form-validation.md +38 -0
  50. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/persist-widget-ui-state.md +41 -0
  51. package/src/ai/catalog/pconnect-lists-and-views/SKILL.md +44 -0
  52. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/README.md +35 -0
  53. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/activate-and-switch-container-items.md +52 -0
  54. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/container-item-lifecycle.md +61 -0
  55. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/insert-delete-list-rows.md +40 -0
  56. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/reorder-list-rows.md +39 -0
  57. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/repeating-row-edit.md +39 -0
  58. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/view-personalization.md +60 -0
  59. package/src/ai/catalog/pconnect-navigation-locale-genai/SKILL.md +45 -0
  60. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/README.md +35 -0
  61. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/agent-conversation-for-tasks.md +54 -0
  62. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/bookmarkable-filter-state.md +40 -0
  63. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/deep-link-semantic-url.md +39 -0
  64. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/genai-assistant-conversation.md +43 -0
  65. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/locale-switch-and-relocalize.md +38 -0
  66. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/persist-operator-preferences.md +40 -0
  67. package/src/ai/catalog/references/architecture-overview.md +52 -0
  68. package/src/ai/catalog/references/pconnect-actions-api.md +948 -0
  69. package/src/ai/catalog/references/pconnect-case-info-data-info-localization.md +618 -0
  70. package/src/ai/catalog/references/pconnect-case-validation-utilities.md +238 -0
  71. package/src/ai/catalog/references/pconnect-container-manager.md +215 -0
  72. package/src/ai/catalog/references/pconnect-list-actions.md +250 -0
  73. package/src/ai/catalog/references/pconnect-misc-suggestions-creation.md +231 -0
  74. package/src/ai/catalog/references/pconnect-reference-context-component.md +471 -0
  75. package/src/ai/catalog/references/pconnect-state-config.md +316 -0
  76. package/src/ai/catalog/references/pconnect-validation-api.md +45 -0
  77. package/src/ai/catalog/references/pcore-analytics-genai-details.md +50 -0
  78. package/src/ai/catalog/references/pcore-bootstrap-init-details.md +121 -0
  79. package/src/ai/catalog/references/pcore-bootstrap-registry-routing.md +253 -0
  80. package/src/ai/catalog/references/pcore-case-collaboration-details.md +191 -0
  81. package/src/ai/catalog/references/pcore-case-collaboration-genai.md +264 -0
  82. package/src/ai/catalog/references/pcore-environment-info-details.md +96 -0
  83. package/src/ai/catalog/references/pcore-environment-locale-namespace.md +175 -0
  84. package/src/ai/catalog/references/pcore-messaging-details.md +99 -0
  85. package/src/ai/catalog/references/pcore-misc-details.md +207 -0
  86. package/src/ai/catalog/references/pcore-misc-utilities.md +325 -0
  87. package/src/ai/catalog/references/pcore-rest-data-details.md +164 -0
  88. package/src/ai/catalog/references/pcore-rest-data-messaging.md +308 -0
  89. package/src/ai/catalog/references/pcore-store-context-details.md +40 -0
  90. package/src/ai/catalog/references/pcore-store-context-state.md +130 -0
  91. package/src/ai/index.js +154 -0
  92. package/src/ai/project/.claude/skills/boolean/SKILL.md +43 -0
  93. package/src/ai/project/.claude/skills/case/SKILL.md +58 -0
  94. package/src/ai/project/.claude/skills/create-dx-component/SKILL.md +98 -0
  95. package/src/ai/project/.claude/skills/create-dx-component/assets/PConnProps.d.ts +24 -0
  96. package/src/ai/project/.claude/skills/create-dx-component/assets/create-nonce.ts +5 -0
  97. package/src/ai/project/.claude/skills/create-dx-component/assets/event-utils.ts +18 -0
  98. package/src/ai/project/.claude/skills/create-dx-component/assets/styles.ts +7 -0
  99. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/README.md +28 -0
  100. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/build-a-data-widget.md +281 -0
  101. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/field-with-limits-and-validation.md +156 -0
  102. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/status-badge-field.md +97 -0
  103. package/src/ai/project/.claude/skills/create-dx-component/references/accessibility.md +71 -0
  104. package/src/ai/project/.claude/skills/create-dx-component/references/choosing-type-and-subtype.md +79 -0
  105. package/src/ai/project/.claude/skills/create-dx-component/references/cli-workflow.md +125 -0
  106. package/src/ai/project/.claude/skills/create-dx-component/references/component-patterns.md +241 -0
  107. package/src/ai/project/.claude/skills/create-dx-component/references/config-schema.md +296 -0
  108. package/src/ai/project/.claude/skills/create-dx-component/references/cosmos-components.md +137 -0
  109. package/src/ai/project/.claude/skills/create-dx-component/references/field-behavior.md +155 -0
  110. package/src/ai/project/.claude/skills/create-dx-component/references/field-essentials.md +90 -0
  111. package/src/ai/project/.claude/skills/create-dx-component/references/field-subtypes-extra.md +68 -0
  112. package/src/ai/project/.claude/skills/create-dx-component/references/localization.md +30 -0
  113. package/src/ai/project/.claude/skills/create-dx-component/references/pcore-pconnect-apis.md +77 -0
  114. package/src/ai/project/.claude/skills/create-dx-component/references/presentation-essentials.md +57 -0
  115. package/src/ai/project/.claude/skills/create-dx-component/references/props-contract.md +182 -0
  116. package/src/ai/project/.claude/skills/create-dx-component/references/state-matrix.md +102 -0
  117. package/src/ai/project/.claude/skills/create-dx-component/references/storybook-pattern.md +262 -0
  118. package/src/ai/project/.claude/skills/create-dx-component/references/styles-pattern.md +54 -0
  119. package/src/ai/project/.claude/skills/create-dx-component/references/template-essentials.md +87 -0
  120. package/src/ai/project/.claude/skills/create-dx-component/references/template-patterns.md +131 -0
  121. package/src/ai/project/.claude/skills/create-dx-component/references/test-pattern.md +215 -0
  122. package/src/ai/project/.claude/skills/create-dx-component/references/ui-gallery-reuse.md +93 -0
  123. package/src/ai/project/.claude/skills/create-dx-component/references/widget-essentials.md +84 -0
  124. package/src/ai/project/.claude/skills/create-dx-component/references/widget-patterns.md +164 -0
  125. package/src/ai/project/.claude/skills/currency/SKILL.md +46 -0
  126. package/src/ai/project/.claude/skills/date/SKILL.md +46 -0
  127. package/src/ai/project/.claude/skills/decimal/SKILL.md +49 -0
  128. package/src/ai/project/.claude/skills/details/SKILL.md +60 -0
  129. package/src/ai/project/.claude/skills/email/SKILL.md +42 -0
  130. package/src/ai/project/.claude/skills/field/SKILL.md +68 -0
  131. package/src/ai/project/.claude/skills/form/SKILL.md +51 -0
  132. package/src/ai/project/.claude/skills/generate-component-set/SKILL.md +80 -0
  133. package/src/ai/project/.claude/skills/generate-component-set/component-manifest.json +161 -0
  134. package/src/ai/project/.claude/skills/identify-components/SKILL.md +76 -0
  135. package/src/ai/project/.claude/skills/integer/SKILL.md +45 -0
  136. package/src/ai/project/.claude/skills/page/SKILL.md +60 -0
  137. package/src/ai/project/.claude/skills/page-widget/SKILL.md +55 -0
  138. package/src/ai/project/.claude/skills/percentage/SKILL.md +52 -0
  139. package/src/ai/project/.claude/skills/phone/SKILL.md +44 -0
  140. package/src/ai/project/.claude/skills/picklist/SKILL.md +50 -0
  141. package/src/ai/project/.claude/skills/plan-dx-component/SKILL.md +51 -0
  142. package/src/ai/project/.claude/skills/plan-dx-component/references/design-system-mapping.md +108 -0
  143. package/src/ai/project/.claude/skills/plan-dx-component/references/intake.md +146 -0
  144. package/src/ai/project/.claude/skills/plan-dx-component/references/plan-template.md +76 -0
  145. package/src/ai/project/.claude/skills/plan-dx-component/references/requirements-template.md +88 -0
  146. package/src/ai/project/.claude/skills/presentation/SKILL.md +61 -0
  147. package/src/ai/project/.claude/skills/publish-library/SKILL.md +106 -0
  148. package/src/ai/project/.claude/skills/radiobuttons/SKILL.md +51 -0
  149. package/src/ai/project/.claude/skills/review-component/SKILL.md +49 -0
  150. package/src/ai/project/.claude/skills/review-component/references/checklist.md +77 -0
  151. package/src/ai/project/.claude/skills/template/SKILL.md +60 -0
  152. package/src/ai/project/.claude/skills/text/SKILL.md +45 -0
  153. package/src/ai/project/.claude/skills/update-dx-component/SKILL.md +56 -0
  154. package/src/ai/project/.claude/skills/update-dx-component/references/maintenance.md +43 -0
  155. package/src/ai/project/.claude/skills/url/SKILL.md +46 -0
  156. package/src/ai/project/.claude/skills/validate-component/SKILL.md +78 -0
  157. package/src/ai/project/.claude/skills/validate-component/references/runtime-troubleshooting.md +56 -0
  158. package/src/ai/project/.claude/skills/validate-component/scripts/check-component.mjs +327 -0
  159. package/src/ai/project/.claude/skills/widget/SKILL.md +59 -0
  160. package/src/ai/project/.gemini/settings.json +5 -0
  161. package/src/ai/project/AGENTS.md +74 -0
  162. package/src/ai/readme-section.md +91 -0
  163. package/src/cli.js +48 -7
  164. package/src/constants.js +54 -53
  165. package/src/internal-tests.js +27 -0
  166. package/src/tasks/ai-toggle/index.js +46 -0
  167. package/src/tasks/authenticate/helper.js +38 -38
  168. package/src/tasks/authenticate/index.js +17 -15
  169. package/src/tasks/build-all/helper.js +4 -4
  170. package/src/tasks/build-all/index.js +7 -7
  171. package/src/tasks/build-comp/helper.js +17 -17
  172. package/src/tasks/build-comp/index.js +10 -10
  173. package/src/tasks/build-jest-assets/index.js +7 -9
  174. package/src/tasks/build-lib/helper.js +8 -8
  175. package/src/tasks/build-lib/index.js +8 -8
  176. package/src/tasks/bundle/builder/index.js +9 -12
  177. package/src/tasks/bundle/builder/modules.js +8 -9
  178. package/src/tasks/bundle/builder/paths.js +2 -19
  179. package/src/tasks/bundle/builder/webpack.config.js +60 -77
  180. package/src/tasks/bundle/index.js +8 -8
  181. package/src/tasks/create/index.js +35 -35
  182. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +1 -36
  183. package/src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache +2 -2
  184. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +2 -27
  185. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.ts.mustache +2 -2
  186. package/src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache +2 -2
  187. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +2 -35
  188. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +3 -36
  189. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +4 -39
  190. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +4 -53
  191. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/index.tsx.mustache +5 -5
  192. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +3 -36
  193. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +7 -42
  194. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.ts +1 -1
  195. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache +0 -2
  196. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.ts.mustache +1 -1
  197. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +11 -11
  198. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +3 -13
  199. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache +2 -3
  200. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +28 -28
  201. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +2 -2
  202. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.tsx.mustache +2 -3
  203. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -33
  204. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +3 -33
  205. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +3 -31
  206. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +3 -31
  207. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +3 -35
  208. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +3 -33
  209. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.tsx.mustache +2 -3
  210. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +2 -35
  211. package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.ts.mustache +2 -2
  212. package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +19 -15
  213. package/src/tasks/create/templates/Constellation/Template/DETAILS/Operator.tsx.mustache +6 -6
  214. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -1
  215. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -8
  216. package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.ts.mustache +9 -9
  217. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +4 -8
  218. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +19 -15
  219. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Operator.tsx.mustache +6 -6
  220. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +1 -1
  221. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +1 -1
  222. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.ts.mustache +9 -9
  223. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache +4 -8
  224. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +8 -8
  225. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +8 -8
  226. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache +4 -9
  227. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.test.tsx.mustache +3 -3
  228. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +19 -14
  229. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +6 -6
  230. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +1 -1
  231. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.ts.mustache +1 -1
  232. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/index.tsx.mustache +5 -5
  233. package/src/tasks/create/templates/Launchpad/Field/Text-Phone/index.tsx.mustache +3 -35
  234. package/src/tasks/create/templates/Launchpad/Field/__components.md +1 -1
  235. package/src/tasks/create/templates/Launchpad/Template/FORM/demo.stories.tsx.mustache +8 -8
  236. package/src/tasks/create/templates/Launchpad/Template/FORM-region/demo.stories.tsx.mustache +8 -8
  237. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.test.tsx.mustache +3 -3
  238. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +1 -1
  239. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.ts.mustache +1 -1
  240. package/src/tasks/create-all/index.js +42 -41
  241. package/src/tasks/create-lib/helper.js +13 -13
  242. package/src/tasks/create-lib/index.js +5 -5
  243. package/src/tasks/create-version/helper.js +10 -10
  244. package/src/tasks/create-version/index.js +3 -4
  245. package/src/tasks/delete/helper.js +20 -19
  246. package/src/tasks/delete/index.js +2 -2
  247. package/src/tasks/delete-all/helper.js +26 -25
  248. package/src/tasks/delete-all/index.js +2 -2
  249. package/src/tasks/delete-lib/helper.js +6 -6
  250. package/src/tasks/delete-lib/index.js +6 -6
  251. package/src/tasks/delete-pub/helper.js +18 -18
  252. package/src/tasks/delete-pub/index.js +8 -8
  253. package/src/tasks/delete-version/index.js +2 -2
  254. package/src/tasks/dev-server/index.js +1 -1
  255. package/src/tasks/export-archive/helper.js +21 -21
  256. package/src/tasks/export-archive/index.js +27 -40
  257. package/src/tasks/export-rc/helper.js +34 -34
  258. package/src/tasks/export-rc/index.js +21 -31
  259. package/src/tasks/import-archive/helper.js +39 -39
  260. package/src/tasks/import-archive/index.js +69 -89
  261. package/src/tasks/import-comp/helper.js +8 -8
  262. package/src/tasks/import-comp/index.js +30 -42
  263. package/src/tasks/index.js +5 -0
  264. package/src/tasks/init/Node.gitignore +149 -0
  265. package/src/tasks/init/helper.js +15 -8
  266. package/src/tasks/init/index.js +115 -35
  267. package/src/tasks/init/template/.prettierrc.json +4 -1
  268. package/src/tasks/init/template/.storybook/main.ts +1 -4
  269. package/src/tasks/init/template/.storybook/manager.ts +1 -1
  270. package/src/tasks/init/template/.storybook/preview.tsx +2 -2
  271. package/src/tasks/init/template/.storybook/theme.js +1 -1
  272. package/src/tasks/init/template/.vscode/extensions.json +0 -1
  273. package/src/tasks/init/template/README.md +2 -2
  274. package/src/tasks/init/template/eslint.config.mjs +13 -155
  275. package/src/tasks/init/template/jest.config.cjs +2 -0
  276. package/src/tasks/init/template/package-lock.json +26864 -0
  277. package/src/tasks/init/template/package.json.mustache +19 -74
  278. package/src/tasks/init/template/setupTests.ts +10 -4
  279. package/src/tasks/init/template/tsconfig.json +14 -6
  280. package/src/tasks/internal-test/index.js +21 -0
  281. package/src/tasks/internal-test-full/index.js +15 -0
  282. package/src/tasks/internal-test-functional/index.js +15 -0
  283. package/src/tasks/internal-test-unit/index.js +13 -0
  284. package/src/tasks/linter/index.js +2 -2
  285. package/src/tasks/list/helper.js +41 -40
  286. package/src/tasks/list/index.js +3 -3
  287. package/src/tasks/list-lib/helper.js +5 -5
  288. package/src/tasks/list-lib/index.js +8 -8
  289. package/src/tasks/list-pub/helper.js +23 -16
  290. package/src/tasks/list-pub/index.js +24 -21
  291. package/src/tasks/move/helper.js +8 -8
  292. package/src/tasks/move/index.js +19 -23
  293. package/src/tasks/promote-webpack/index.js +4 -4
  294. package/src/tasks/promote-webpack/webpack.config.js +62 -93
  295. package/src/tasks/publish/helper.js +21 -21
  296. package/src/tasks/publish/index.js +16 -16
  297. package/src/tasks/publish-all/helper.js +20 -20
  298. package/src/tasks/publish-all/index.js +11 -12
  299. package/src/tasks/publish-archive/helper.js +9 -9
  300. package/src/tasks/publish-archive/index.js +12 -14
  301. package/src/tasks/publish-lib/helper.js +3 -3
  302. package/src/tasks/publish-lib/index.js +28 -34
  303. package/src/tasks/quarantine/index.js +8 -8
  304. package/src/tasks/rename/index.js +26 -30
  305. package/src/tasks/rename-lib/index.js +21 -25
  306. package/src/tasks/restore/index.js +8 -8
  307. package/src/tasks/restore-config/index.js +3 -5
  308. package/src/tasks/set-perm/index.js +8 -8
  309. package/src/tasks/show-help/index.js +17 -9
  310. package/src/tasks/show-status/index.js +2 -2
  311. package/src/tasks/store/index.js +8 -8
  312. package/src/tasks/switch-lib/helper.js +7 -7
  313. package/src/tasks/switch-lib/index.js +7 -7
  314. package/src/tasks/switch-version/helper.js +6 -6
  315. package/src/tasks/switch-version/index.js +7 -7
  316. package/src/tasks/update/index.js +1 -1
  317. package/src/tasks/upgrade/index.js +7 -7
  318. package/src/tasks/validator/index.js +49 -203
  319. package/src/util.js +169 -186
  320. package/src/rules/no-pcore-pconnect-in-presentation.js +0 -103
  321. package/src/tasks/init/template/.stylelintrc.json +0 -4
  322. package/src/tasks/init/template/babel.config.cjs +0 -22
  323. package/src/tasks/init/template/cspell.json +0 -14
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: date
3
+ description: 'Scaffold a Pega DX Field component with subtype **Date** — date or date-time input bound to a date case property. Use when: user asks for a date picker, calendar input, due date, birth date, date range endpoint, or a formatted date display.'
4
+ argument-hint: 'Describe the date field (e.g., "a due-date picker that blocks past dates")'
5
+ ---
6
+
7
+ # Create Date Field
8
+
9
+ Field subtype `Date`. Binds to a date or date-time case property.
10
+
11
+ Read [../field/SKILL.md](../field/SKILL.md) for the shared Field rules first. This skill adds only what is specific to `Date`.
12
+
13
+ ## Cosmos Mapping
14
+
15
+ | Mode | Component |
16
+ | --- | --- |
17
+ | Edit, date only | `DateInput` from `@pega/cosmos-react-core` |
18
+ | Edit, time only | `TimeInput` |
19
+ | `DISPLAY_ONLY` | `DateTimeDisplay` |
20
+
21
+ ## Value Handling
22
+
23
+ - Pega stores dates as ISO-8601 strings. Keep the ISO string as the source of truth and never store a `Date` object in state.
24
+ - In Cosmos `DateInput`, `onChange` and `onBlur` receive an object `{ valueAsISOString, state }`, not a DOM event (verify against the installed `.d.ts`). A date-only value is the date part of that string:
25
+ The date part is the text before `T` in `valueAsISOString`; an empty value is `''`. `state` is `'invalid'` or `'incomplete'` while the user is mid-entry. In that case keep the draft and call `getValidationApi().validate(...)`; commit with `changeNblur` only for a complete valid date. See Dates in [field-behavior.md](../create-dx-component/references/field-behavior.md).
26
+ - Use `dayjs` (already a dependency) for any comparison or arithmetic. Do not reach for `moment` or hand-rolled parsing.
27
+ - Format for display through `DateTimeDisplay` rather than formatting the string yourself, so the user's locale is respected.
28
+
29
+ ## config.json Additions
30
+
31
+ | Property | Label | Format | Default | Notes |
32
+ | --- | --- | --- | --- | --- |
33
+ | `minDate` | Earliest date | `TEXT` | | |
34
+ | `maxDate` | Latest date | `TEXT` | | |
35
+ | `showTime` | Include time | `BOOLEAN` | `false` | |
36
+
37
+ ## Gotchas
38
+
39
+ - Time zones are the main source of bugs. A date-only property must not be shifted by local offset: take the year with `value.slice(0, 4)` and, if you must parse, treat it as UTC (`dayjs.utc(value)`). `dayjs(value)` parses a bare date as local midnight and can cross a day boundary. A date-time value is a UTC instant; convert it with the operator's zone from `PCore.getEnvironmentInfo().getTimeZone()`.
40
+ - Set a sensible year range (default 100 years back, 20 forward), widened to include the stored value's year, so a legacy date is still displayed.
41
+ - An empty date must dispatch `''` or `null`, not the string `'Invalid Date'`.
42
+ - Relative bounds such as "no past dates" belong in the blur handler, not in `config.json`, since they are evaluated at runtime.
43
+
44
+ ## Validate
45
+
46
+ Run `node .claude/skills/validate-component/scripts/check-component.mjs <Org>_<Library>_<Name>` and paste its table into your final report.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: decimal
3
+ description: 'Scaffold a Pega DX Field component with subtype **Decimal** — fractional number input bound to a decimal case property. Use when: user asks for a decimal input, measurement, weight, rate, score, ratio, or a precision-formatted number display.'
4
+ argument-hint: 'Describe the decimal field (e.g., "a weight input in kg with three decimals")'
5
+ ---
6
+
7
+ # Create Decimal Field
8
+
9
+ Field subtype `Decimal`. Binds to a fractional-number case property.
10
+
11
+ Read [../field/SKILL.md](../field/SKILL.md) for the shared Field rules first. This skill adds only what is specific to `Decimal`.
12
+
13
+ ## Cosmos Mapping
14
+
15
+ | Mode | Component |
16
+ | --- | --- |
17
+ | Edit | `NumberInput` from `@pega/cosmos-react-core` |
18
+ | `DISPLAY_ONLY` | Number formatted to the configured precision |
19
+
20
+ ## Value Handling
21
+
22
+ - Keep the raw typed string in the input while the user is editing. Converting on every keystroke destroys a trailing decimal point and blocks typing `1.` on the way to `1.5`.
23
+ - Convert and dispatch on blur:
24
+ Take the entered text from the event; the value to commit is `''` for empty text and `Number(text)` otherwise, sent with `changeNblur`.
25
+ - Dispatch `''` for an empty input (what the platform's numeric fields send), never `0` and never `NaN`. The stored value can be `null`; read it as `valueProp ?? ''`.
26
+ - Read the entered text from the blur event and skip the commit when it equals the stored value; call `validate(entered)` only. See [field-behavior.md](../create-dx-component/references/field-behavior.md).
27
+ - Keep intermediate drafts such as `-`, `-0` and `-0.` valid while typing.
28
+ - Apply the configured precision on blur, not while typing.
29
+
30
+ ## config.json Additions
31
+
32
+ | Property | Label | Format | Default | Notes |
33
+ | --- | --- | --- | --- | --- |
34
+ | `precision` | Decimal places | `NUMBER` | `2` | |
35
+ | `min` | Minimum | `NUMBER` | | |
36
+ | `max` | Maximum | `NUMBER` | | |
37
+ | `unit` | Unit suffix | `TEXT` | | |
38
+
39
+ ## Gotchas
40
+
41
+ - Decimal separators are locale-dependent. Cosmos `NumberInput` hands your blur callback a canonical dot-separated string, so check what it passes before adding your own comma handling; if you parse user text yourself, normalize a comma decimal before `Number()`, which would otherwise yield `NaN`.
42
+ - Compare the stored value and the parsed entry as strings (`value.toString() !== parsable`), not with `===` on floats and not with an epsilon. Then `1.600` redisplays as `1.6` after commit.
43
+ - `decimalPrecision` arrives as a string. `parseInt` it; an empty string means unlimited, but any other `NaN` should fall back to 2.
44
+ - `toFixed` returns a string. Dispatch the numeric value, and use the fixed string only for display.
45
+ - If the property is truly monetary, use `currency` instead — it carries the currency code and minor-unit rules.
46
+
47
+ ## Validate
48
+
49
+ Run `node .claude/skills/validate-component/scripts/check-component.mjs <Org>_<Library>_<Name>` and paste its table into your final report.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: details
3
+ description: 'Scaffold a Pega DX Template component with subtype **DETAILS** — a read-only layout that presents child field values as label-value pairs. Use when: user asks for a details view, summary panel, review section, read-only case snapshot, or a label-value arrangement.'
4
+ argument-hint: 'Describe the details layout (e.g., "a two-column summary panel with inline labels")'
5
+ ---
6
+
7
+ # Create DETAILS Template
8
+
9
+ Template subtype `DETAILS`. Presents child field values **read-only**, as label-value pairs.
10
+
11
+ Read [../template/SKILL.md](../template/SKILL.md) for the shared Template rules first. This skill adds only what is specific to `DETAILS`.
12
+
13
+ ## Cosmos Mapping
14
+
15
+ | Concern | Component |
16
+ | --- | --- |
17
+ | Label-value pairs | `FieldValueList` with `variant='inline'` or `'stacked'` |
18
+ | Column arrangement | `Grid` |
19
+ | Named section | `FieldGroup`, or `Card` + `CardHeader` + `CardContent` |
20
+
21
+ ## Label Variants
22
+
23
+ | Variant | Layout | Use when |
24
+ | --- | --- | --- |
25
+ | `inline` | Label left, value right | Dense summaries, wide containers |
26
+ | `stacked` | Label above value | Narrow columns, long values |
27
+
28
+ Expose this choice as a config property rather than hard-coding it.
29
+
30
+ ## Layout Rules
31
+
32
+ - **Force read-only on the children.** The shipped DETAILS scaffold calls `child.props.getPConnect().setInheritedProp('readOnly', true)` and `setInheritedProp('displayMode', 'DISPLAY_ONLY')` on every region child; without it the template shows editable inputs. Keep those calls (they must be idempotent).
33
+ - `children` are regions. Read each region's fields with `getChildren()`, render them with a memoized `getComponent()`, and read the label and variant from `resolveConfigProps(getConfigProps())`. See [template-patterns.md](../create-dx-component/references/template-patterns.md).
34
+ - Use `inline` labels by default and **stacked** when the value is long (a text area or rich text of about 60 characters or more, an image URL, a map). A Checkbox's label is its `caption`.
35
+ - Check whether the installed `@pega/cosmos-react-work` exports `Details` / `DetailsList`; they handle column fitting, heading depth and label alignment, and are what Pega's own details view uses.
36
+ - Prefer one `FieldValueList` over many, so labels align on a shared column. Separate lists break the alignment grid.
37
+ - Empty values should render a neutral placeholder such as an em dash, not a blank cell that looks like a rendering bug.
38
+
39
+ ## config.json Additions
40
+
41
+ | Property | Label | Format | Default | Notes |
42
+ | --- | --- | --- | --- | --- |
43
+ | `variant` | Label placement | `SELECT` | `"inline"` | options: `inline`, `stacked` |
44
+ | `NumCols` | Number of columns | `SELECT` | `"1"` | options: `1`, `2` |
45
+ | `showLabel` | Show section label | `BOOLEAN` | `true` | |
46
+ | (help text) | | `INSTRUCTIONS` | | no name; shows help text |
47
+ | `A` | Region A | `CONTENTPICKER` | | allows creating groups |
48
+
49
+ The shipped DETAILS scaffold names its regions `A` and `B` (`A` for the main column, `B` for the second); `Fields` is only used by a single-region form. Keep the scaffold's region names.
50
+
51
+ ## Gotchas
52
+
53
+ - Do not render inputs. If the author needs editing, the correct subtype is `form`.
54
+ - `FieldValueList` needs a stable `id` per entry. Do not use the array index.
55
+ - A details template must not call `updateFieldValue` or `triggerFieldChange`.
56
+ - Long values need wrapping, not truncation, unless the author explicitly asked for truncation.
57
+
58
+ ## Validate
59
+
60
+ Run `node .claude/skills/validate-component/scripts/check-component.mjs <Org>_<Library>_<Name>` and paste its table into your final report.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: email
3
+ description: 'Scaffold a Pega DX Field component with subtype **Email** — email address input bound to a string case property. Use when: user asks for an email input, contact address field, mailto link display, or email validation.'
4
+ argument-hint: 'Describe the email field (e.g., "a work email input restricted to the company domain")'
5
+ ---
6
+
7
+ # Create Email Field
8
+
9
+ Field subtype `Email`. Binds to a string case property holding an email address.
10
+
11
+ Read [../field/SKILL.md](../field/SKILL.md) for the shared Field rules first. This skill adds only what is specific to `Email`.
12
+
13
+ ## Cosmos Mapping
14
+
15
+ | Mode | Component |
16
+ | --- | --- |
17
+ | Edit | `Input` with `type='email'` from `@pega/cosmos-react-core` |
18
+ | `DISPLAY_ONLY` | `EmailDisplay` — renders a `mailto:` link |
19
+
20
+ ## Value Handling
21
+
22
+ - `value` is a plain string. Default to `''`.
23
+ - Lowercasing and trimming is **this skill's design choice**: the platform's own Email field commits the raw string. Ask the user before normalizing, since it changes stored data. If they agree, trim and lowercase on blur, then dispatch the normalized value:
24
+ Compute the normalized value, send it with `handleEvent(actions, 'blur', ...)`, then call `getValidationApi().validate(normalized)`.
25
+ - Do not validate on every keystroke. Users see an error before they finish typing the domain.
26
+
27
+ ## config.json Additions
28
+
29
+ | Property | Label | Format | Default | Notes |
30
+ | --- | --- | --- | --- | --- |
31
+ | `allowedDomains` | Allowed domains (comma separated) | `TEXT` | | |
32
+ | `showMailtoLink` | Link the address when read-only | `BOOLEAN` | `true` | |
33
+
34
+ ## Gotchas
35
+
36
+ - Keep client-side validation permissive. Pega runs the authoritative rule, and an over-strict regex rejects valid addresses such as plus-addressing and long TLDs.
37
+ - `EmailDisplay` builds the `mailto:` href itself. Do not construct the link manually, and never interpolate the raw value into an `href` string.
38
+ - Domain restriction is a business rule. Read it from `config.json`, do not hard-code it.
39
+
40
+ ## Validate
41
+
42
+ Run `node .claude/skills/validate-component/scripts/check-component.mjs <Org>_<Library>_<Name>` and paste its table into your final report.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: field
3
+ description: 'Scaffold and implement a Pega DX **Field** component (Text, Boolean, Integer, Date, Email, Phone, Currency, Decimal, Percentage, URL, Picklist, Radiobuttons, etc.). Use when: user asks for an input/display component bound to a single case property; needs displayMode handling; asks for a Field subtype.'
4
+ argument-hint: 'Describe the field (e.g., "a masked SSN input" or "a color-picker field bound to .FavoriteColor")'
5
+ ---
6
+
7
+ # Create Field Component Skill
8
+
9
+ ## Prefer a Subtype Skill
10
+
11
+ If the subtype is clear, use the narrower skill instead — it carries the value-handling and formatting rules this skill does not repeat.
12
+
13
+ | Subtype | Skill |
14
+ | --- | --- |
15
+ | Text | `text` |
16
+ | Boolean | `boolean` |
17
+ | Integer | `integer` |
18
+ | Decimal | `decimal` |
19
+ | Currency | `currency` |
20
+ | Percentage | `percentage` |
21
+ | Date | `date` |
22
+ | Email | `email` |
23
+ | Phone | `phone` |
24
+ | URL | `url` |
25
+ | Picklist | `picklist` |
26
+ | Radiobuttons | `radiobuttons` |
27
+
28
+ Use this skill when the subtype is unclear, or for a subtype with no dedicated skill (`Text-Input`, `Text-Paragraph`, `Icon-Button-URL`, `DateTime`, `TimeOfDay`, `Picklist-Autocomplete`). The specifics of those six are in [field-subtypes-extra.md](../create-dx-component/references/field-subtypes-extra.md). For a custom control (a rating, a slider, a color or signature input), choose the subtype by the type of the **stored value** using [choosing-type-and-subtype.md](../create-dx-component/references/choosing-type-and-subtype.md), and say so if the request needs a list or several properties, which no Field subtype supports.
29
+
30
+ ## When to Use
31
+
32
+ - User wants a component **bound to a single case property** (`value` in / `updateFieldValue` out)
33
+ - User mentions a Field subtype: Text, Boolean, Integer, Date, Email, Phone, Currency, Decimal, Percentage, URL, Picklist, Radiobuttons
34
+ - User needs read-only, edit, and `DISPLAY_ONLY` rendering for the same value
35
+
36
+ Do NOT use this skill for layout containers (see `template`), data-driven blocks (see `widget`), or standalone read-only blocks that never bind to a property (see `widget`).
37
+
38
+ ## Procedure
39
+
40
+ The repo-wide rules (gallery reuse, contract approval and its layout, authoring properties, consent, Cosmos first, no dead code) are in `AGENTS.md` and are not repeated here.
41
+
42
+ ### Step 0: Check the UI Gallery
43
+
44
+ Follow [ui-gallery-reuse.md](../create-dx-component/references/ui-gallery-reuse.md).
45
+
46
+ ### Step 1: Agree the contract
47
+
48
+ Besides the name, label, description, library and version, the draft states:
49
+
50
+ - **Subtype**: any Field subtype the CLI accepts, chosen by the stored value type ([cli-workflow.md](../create-dx-component/references/cli-workflow.md))
51
+ - **Cosmos input**: which `@pega/cosmos-react-core` control renders it (`Input`, `Checkbox`, `NumberInput`, `DateInput`, `Select`, `RadioButtonGroup`, `CurrencyInput`, `PhoneInput`, `EmailDisplay` for read, etc.)
52
+ - **Field behavior**: bound property type, editable and read-only behavior, validation, display modes
53
+ - **Authoring properties**: a compact, field-specific list with formats and defaults; propose `label`, `hideLabel`, `readOnly`, `required`, `disabled`, `helperText` only when they apply
54
+ - **States to cover**: the applicable rows from [state-matrix.md](../create-dx-component/references/state-matrix.md)
55
+
56
+ ### Step 2: Scaffold
57
+
58
+ `npm run create -- Field <cliSubtype> <Name> "<Label>" <version> <Library> "<description>" <Organization>`
59
+
60
+ Pass every argument: a bare `npm run create` prompts interactively and hangs an agent. `<cliSubtype>` is the exact value from [component-manifest.json](../generate-component-set/component-manifest.json) (for example `Text-Email`, `Decimal-Currency`, `Picklist-RadioButtons`). If no library exists yet, run `npm run createLib -- <Library> 1.0.0 Y Current` first.
61
+
62
+ ### Step 3: Implement
63
+
64
+ Implement every scaffolded file from [field-essentials.md](../create-dx-component/references/field-essentials.md); open a deeper reference only when its closing table says so. `event-utils.ts` is generated for some subtypes (for example `Integer`, `Picklist`); if the scaffold did not create it and the component needs it, copy [event-utils.ts](../create-dx-component/assets/event-utils.ts) into the component folder and `import handleEvent from './event-utils'`.
65
+
66
+ ### Step 4: Validate
67
+
68
+ Run `node .claude/skills/validate-component/scripts/check-component.mjs <Org>_<Library>_<Name>` (`--no-build` while fixing), and paste the final table into your report. For a new component, run the `review-component` skill as described in [create-dx-component](../create-dx-component/SKILL.md). `npm run startStorybook` is long-running, so leave it to the user.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: form
3
+ description: 'Scaffold a Pega DX Template component with subtype **FORM** — an editable layout that arranges child input fields for data entry. Use when: user asks for a form layout, multi-column entry form, field group arrangement, wizard step layout, or an editable section container.'
4
+ argument-hint: 'Describe the form layout (e.g., "a two-column form with a full-width notes row")'
5
+ ---
6
+
7
+ # Create FORM Template
8
+
9
+ Template subtype `FORM`. Arranges child **input** fields for data entry.
10
+
11
+ Read [../template/SKILL.md](../template/SKILL.md) for the shared Template rules first. This skill adds only what is specific to `FORM`.
12
+
13
+ ## Cosmos Mapping
14
+
15
+ | Concern | Component |
16
+ | --- | --- |
17
+ | Column arrangement | `Grid` with `container={{ cols: 'repeat(N, minmax(0, 1fr))', gap: 2 }}` |
18
+ | Named section | `FieldGroup` |
19
+ | Stacked rows | `Flex` with `container={{ direction: 'column', gap: 2 }}` |
20
+
21
+ ## FORM vs DETAILS
22
+
23
+ `FORM` renders fields in **edit** mode. If every child is read-only, the author wants `details` instead — using FORM there produces inputs that cannot be edited.
24
+
25
+ ## Layout Rules
26
+
27
+ - Render `children` directly into the `Grid`. Constellation has already resolved each child to a field component.
28
+ - Column count comes from the `NumCols` config property, never a literal.
29
+ - Large controls (`TextArea`, `RichText`, `RadioButtons`, `Checkbox` groups, `Attachment`, `Address`, `Group`, tables and references) span the whole row: `item={{ colStart: '1', colEnd: cols + 1 }}`. A field's `isFormWidth` config flag asks for the same. This needs per-field access, so go one level below the regions (see [template-patterns.md](../create-dx-component/references/template-patterns.md)).
30
+ - Show `instructions` (from the `INSTRUCTIONS` property) only when a heading is shown. `templateOverrideMode` and `inheritParentLayout` let a nested form keep its parent's column count; add them if the template can be nested.
31
+ - Do not intercept or reorder `children`. The author controls order through the content picker.
32
+
33
+ ## config.json Additions
34
+
35
+ | Property | Label | Format | Default | Notes |
36
+ | --- | --- | --- | --- | --- |
37
+ | `NumCols` | Number of columns | `SELECT` | `"1"` | options: `1`, `2`, `3` |
38
+ | `showLabel` | Show section label | `BOOLEAN` | `true` | |
39
+ | (help text) | | `INSTRUCTIONS` | | no name; shows help text |
40
+ | `Fields` | Fields | `CONTENTPICKER` | | allows creating groups |
41
+
42
+ ## Gotchas
43
+
44
+ - `minmax(0, 1fr)` is required, not `1fr`. Without it a long value inside a child overflows the column instead of wrapping.
45
+ - Merge `getPConnect().getInheritedProps()` before deciding whether to render the label — the parent may already be showing it.
46
+ - Multi-column forms must collapse to a single column when narrow. Prefer container-width wrapping (a `ResizeObserver` on the template container) to a viewport query, because a template often sits in a side panel or modal; otherwise use the Cosmos `Grid` responsive props. A theme that places helper text above fields also forces one column.
47
+ - Do not add validation or submit handling. The surrounding Constellation view owns both.
48
+
49
+ ## Validate
50
+
51
+ Run `node .claude/skills/validate-component/scripts/check-component.mjs <Org>_<Library>_<Name>` and paste its table into your final report.
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: generate-component-set
3
+ description: 'Batch-generate MANY Pega DX components in one session: every Field subtype (or a named subset), every Template subtype, a set of Widgets or Presentation components, or a full library across all four types. Use when the user asks for "all", "every", "a set of" or "a whole library of" components. For ONE component use the type skill (`field`, `template`, `widget`, `presentation`) or `create-dx-component` instead.'
4
+ argument-hint: 'Which types or subtypes to generate (e.g. "all fields", "Date and Currency", "full library with two widgets")'
5
+ ---
6
+
7
+ # Generate a Set of Components
8
+
9
+ Generate several components in a single session. The shared context is loaded **once** and then reused for every component, so a batch costs far less than repeating the single-component flow.
10
+
11
+ The catalogue is [component-manifest.json](./component-manifest.json): every type, every subtype, each subtype's `cliSubtype`, its skill path, and whether the type's catalogue is `fixed` or `user-supplied`. Work from that file, never from a list remembered from elsewhere.
12
+
13
+ ## Step 0 — Resolve inputs
14
+
15
+ Read the user's message and extract:
16
+
17
+ - **Types in scope**: Field, Template, Widget, Presentation (default for "full library": all four).
18
+ - **Field and Template subtypes**: every entry of `types.Field.subtypes` / `types.Template.subtypes`, or only the ones the user named.
19
+ - **Widgets and Presentation components**: their `catalogue` is `user-supplied`, so the user must name each one. A Widget needs a scope (`CASE` or `PAGE`) and a data source; a Presentation component needs a subtype (`CASEVIEW` or `WSSCASEVIEW`).
20
+ - **Naming**: the PascalCase suffix per component. Default is the subtype name (`<Org>_<Library>_Text`, …). Apply any prefix or suffix convention the user gives, consistently.
21
+
22
+ Stop and ask if Widget or Presentation is in scope and the user named none. Never invent widgets.
23
+
24
+ Fetch the [Constellation UI Gallery](https://github.com/pegasystems/constellation-ui-gallery/tree/master/src/components) catalogue once, per [ui-gallery-reuse.md](../create-dx-component/references/ui-gallery-reuse.md), and mark each planned component as **reuse `Pega_Extensions_<Name>`** or **build from scratch**. Step 3 reuses this catalogue rather than fetching it again.
25
+
26
+ The output path is fixed at `src/components/<Org>_<Library>_<Name>/`; do not ask for it. Echo the resolved plan as a numbered list before starting, and wait for confirmation if it has more than 10 components.
27
+
28
+ ## Step 1 — Load the shared context once
29
+
30
+ Read these once and keep them active for the whole session. Do not re-read them per component.
31
+
32
+ 1. The type skill for each type in scope: [field](../field/SKILL.md), [template](../template/SKILL.md), [widget](../widget/SKILL.md), [presentation](../presentation/SKILL.md).
33
+ 2. [component-patterns.md](../create-dx-component/references/component-patterns.md)
34
+ 3. [config-schema.md](../create-dx-component/references/config-schema.md)
35
+ 4. [cosmos-components.md](../create-dx-component/references/cosmos-components.md)
36
+ 5. [pcore-pconnect-apis.md](../create-dx-component/references/pcore-pconnect-apis.md) (an index into the `pconnect-*` skills; open those on demand)
37
+ 6. [storybook-pattern.md](../create-dx-component/references/storybook-pattern.md)
38
+ 7. [test-pattern.md](../create-dx-component/references/test-pattern.md)
39
+ 8. One existing component in `src/components/`, end to end, to match this project's conventions.
40
+
41
+ ## Step 2 — Overwrite check, once
42
+
43
+ Check `src/components/` for every target folder across every type. Report all collisions in one message and ask **Overwrite all / Skip existing / Cancel**, then wait for the answer. Do it once here, not per type.
44
+
45
+ ## Step 3 — Generate by type, in this order
46
+
47
+ Fields first, then Templates (which arrange them), then Widgets, then Presentation. For each component, in manifest order:
48
+
49
+ 1. **Read the subtype skill (mandatory)** at the manifest's `skill` path. The type skill gives the skeleton; the subtype skill gives the exact Cosmos control, value coercion, formatting and edge cases. Generating from the parent alone produces generic components that miss subtype behavior.
50
+ 2. **Scaffold non-interactively**, passing every argument. A bare `npm run create` prompts and hangs an agent. If no library exists yet, run `npm run createLib -- <Library> 1.0.0 Y Current` first.
51
+
52
+ ```bash
53
+ npm run create -- <type> <cliSubtype> <Name> "<Label>" <version> <Library> "<description>" <Organization>
54
+ ```
55
+
56
+ `<cliSubtype>` is the manifest entry's `cliSubtype` (for example `Decimal-Currency`, not `Currency`). The organization comes from `package.json`, the library from `createLib` or `tasks.config.json`. See [cli-workflow.md](../create-dx-component/references/cli-workflow.md). If the CLI cannot be driven, create the folder by hand and copy the shared files from [assets](../create-dx-component/assets/) into `src/components/shared/`.
57
+
58
+ If Step 0 marked the component for reuse, adapt the gallery component per [ui-gallery-reuse.md](../create-dx-component/references/ui-gallery-reuse.md) instead of implementing from scratch in the next step.
59
+
60
+ 3. **Implement** `index.tsx`, `config.json`, `styles.ts`, `mock.ts`, `demo.stories.tsx` and `demo.test.tsx`, following the type rules below and the Cosmos-first and dead-code rules in `AGENTS.md`.
61
+ 4. **Report one line**: "`<Org>_<Library>_<Name>` ✓ — <what it uses>".
62
+
63
+ ### Rules by type
64
+
65
+ | Type | Read first | Rules |
66
+ | ------------ | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
67
+ | Field | the subtype skill (`text`, `date`, `currency`, …) | `handleEvent` on change and blur, `getValidationApi().validate` on blur, a `DISPLAY_ONLY` mode, string-boolean normalization for `readOnly` / `required` / `disabled`, `status` from `validatemessage`. The Cosmos control owns label, required, disabled and read-only rendering. |
68
+ | Template | the subtype skill (`form`, `details`, `page`, …) | Layout from Cosmos `Flex`, `Grid`, `Card`; never a hand-rolled styled `div`. Render children through PConnect and guard an empty or undefined `children`. |
69
+ | Widget | `case` or `page-widget` by scope (CLI subtype `CASE` or `PAGE`) | Render loading (`Progress`), error (`Banner`), empty (`EmptyState`) and populated states. Wrap in `Card`. Fetch in `useEffect`, never in render, and do not set state after unmount. `mock.ts` supplies a realistic fixture so the story renders without a server. |
70
+ | Presentation | the prop types: `CaseView.types.d.ts` in `@pega/cosmos-react-work` (`@pega/cosmos-react-wss` for `WSSCASEVIEW`) | Pure render from props: no `getPConnect`, no `PCore`, no fetching, no event wiring. Handle optional props (`subheading`, `banners`, `utilities`, …) explicitly. `config.json` has no properties by default. |
71
+
72
+ All types: export with `withConfiguration()` and keep the `create-nonce` import the scaffold provides (`../shared/create-nonce` for Field, Template and Widget).
73
+
74
+ ## Step 4 — Validate
75
+
76
+ Run `node .claude/skills/validate-component/scripts/check-component.mjs <Org>_<Library>_<Name>` for each generated component and keep every table for the final report, then `npm run validateAll`, `npm run test` and `npm run lint`. Fix every build, lint, spelling and coverage failure before reporting. Use [validate-component](../validate-component/SKILL.md) for failure triage.
77
+
78
+ ## Step 5 — Final report
79
+
80
+ A table of every component: name, type, subtype or scope, and the main Cosmos component used. Then list anything the user asked for that was skipped, and why.
@@ -0,0 +1,161 @@
1
+ {
2
+ "$comment": "Machine-readable catalogue of every component type and subtype this library can generate. Single source of truth for the generate-component-set and identify-components skills \u2014 do not duplicate these lists in markdown.",
3
+ "namePrefix": "<Org>_<Library>_",
4
+ "namePrefixComment": "Not a literal. <Org> is the organization in package.json and <Library> is the library created with createLib (component.library in tasks.config.json).",
5
+ "outputPath": "src/components/{namePrefix}{Name}",
6
+ "skillRoot": ".claude/skills",
7
+ "referenceRoot": ".claude/skills/create-dx-component/references",
8
+ "assetRoot": ".claude/skills/create-dx-component/assets",
9
+ "sharedAssets": ["PConnProps.d.ts", "create-nonce.ts", "styles.ts", "event-utils.ts"],
10
+ "componentFiles": ["index.tsx", "config.json", "styles.ts", "mock.ts", "demo.stories.tsx", "demo.test.tsx"],
11
+ "types": {
12
+ "Field": {
13
+ "skill": "field/SKILL.md",
14
+ "catalogue": "fixed",
15
+ "subtypes": [
16
+ {
17
+ "subtype": "Text",
18
+ "cliSubtype": "Text",
19
+ "skill": "text/SKILL.md",
20
+ "cosmos": "Input / TextArea"
21
+ },
22
+ {
23
+ "subtype": "Boolean",
24
+ "cliSubtype": "Boolean",
25
+ "skill": "boolean/SKILL.md",
26
+ "cosmos": "Checkbox / BooleanDisplay"
27
+ },
28
+ {
29
+ "subtype": "Integer",
30
+ "cliSubtype": "Integer",
31
+ "skill": "integer/SKILL.md",
32
+ "cosmos": "NumberInput"
33
+ },
34
+ {
35
+ "subtype": "Decimal",
36
+ "cliSubtype": "Decimal",
37
+ "skill": "decimal/SKILL.md",
38
+ "cosmos": "NumberInput"
39
+ },
40
+ {
41
+ "subtype": "Currency",
42
+ "cliSubtype": "Decimal-Currency",
43
+ "skill": "currency/SKILL.md",
44
+ "cosmos": "CurrencyInput / CurrencyDisplay"
45
+ },
46
+ {
47
+ "subtype": "Percentage",
48
+ "cliSubtype": "Decimal-Percentage",
49
+ "skill": "percentage/SKILL.md",
50
+ "cosmos": "NumberInput with % suffix"
51
+ },
52
+ {
53
+ "subtype": "Date",
54
+ "cliSubtype": "Date",
55
+ "skill": "date/SKILL.md",
56
+ "cosmos": "DateInput / DateTimeDisplay"
57
+ },
58
+ {
59
+ "subtype": "Email",
60
+ "cliSubtype": "Text-Email",
61
+ "skill": "email/SKILL.md",
62
+ "cosmos": "Input type=email / EmailDisplay"
63
+ },
64
+ {
65
+ "subtype": "Phone",
66
+ "cliSubtype": "Text-Phone",
67
+ "skill": "phone/SKILL.md",
68
+ "cosmos": "PhoneInput / PhoneDisplay"
69
+ },
70
+ {
71
+ "subtype": "URL",
72
+ "cliSubtype": "Text-URL",
73
+ "skill": "url/SKILL.md",
74
+ "cosmos": "Input type=url / URLDisplay"
75
+ },
76
+ {
77
+ "subtype": "Picklist",
78
+ "cliSubtype": "Picklist",
79
+ "skill": "picklist/SKILL.md",
80
+ "cosmos": "Select"
81
+ },
82
+ {
83
+ "subtype": "RadioButtons",
84
+ "cliSubtype": "Picklist-RadioButtons",
85
+ "skill": "radiobuttons/SKILL.md",
86
+ "cosmos": "RadioButtonGroup"
87
+ }
88
+ ]
89
+ },
90
+ "Template": {
91
+ "skill": "template/SKILL.md",
92
+ "catalogue": "fixed",
93
+ "subtypes": [
94
+ {
95
+ "subtype": "FORM",
96
+ "cliSubtype": "FORM",
97
+ "skill": "form/SKILL.md",
98
+ "cosmos": "Grid / FieldGroup / Flex",
99
+ "renders": "Editable layout that arranges input children"
100
+ },
101
+ {
102
+ "subtype": "DETAILS",
103
+ "cliSubtype": "DETAILS",
104
+ "skill": "details/SKILL.md",
105
+ "cosmos": "FieldValueList / Grid / Card",
106
+ "renders": "Read-only label/value summary of children"
107
+ },
108
+ {
109
+ "subtype": "PAGE",
110
+ "cliSubtype": "PAGE",
111
+ "skill": "page/SKILL.md",
112
+ "cosmos": "Grid / Flex / Card",
113
+ "renders": "Whole-page region layout, portal shell"
114
+ }
115
+ ]
116
+ },
117
+ "Widget": {
118
+ "skill": "widget/SKILL.md",
119
+ "catalogue": "user-supplied",
120
+ "$comment": "Widgets have no default list. The user must name each one, its scope, and its data source.",
121
+ "subtypes": [
122
+ {
123
+ "subtype": "CASE",
124
+ "cliSubtype": "CASE",
125
+ "skill": "case/SKILL.md",
126
+ "cosmos": "Card / CardHeader / CardContent",
127
+ "renders": "Case-scoped chart, KPI, or related-records block"
128
+ },
129
+ {
130
+ "subtype": "PAGE_WIDGET",
131
+ "cliSubtype": "PAGE",
132
+ "skill": "page-widget/SKILL.md",
133
+ "cosmos": "Card / CardHeader / CardContent",
134
+ "renders": "Dashboard tile or portal block with no case context"
135
+ }
136
+ ]
137
+ },
138
+ "Presentation": {
139
+ "skill": "presentation/SKILL.md",
140
+ "catalogue": "user-supplied",
141
+ "$comment": "Presentation components replace how a whole case view is rendered. The user chooses the subtype (CASEVIEW or WSSCASEVIEW) and the name; there is no default set. They take all data as props and cannot use PCore or getPConnect. For badges, formatters and other read-only displays use a Field or a Widget instead.",
142
+ "subtypes": [
143
+ {
144
+ "subtype": "CASEVIEW",
145
+ "cliSubtype": "CASEVIEW",
146
+ "skill": "presentation/SKILL.md",
147
+ "cosmos": "CaseViewProps from @pega/cosmos-react-work",
148
+ "renders": "Replacement case view"
149
+ },
150
+ {
151
+ "subtype": "WSSCASEVIEW",
152
+ "cliSubtype": "WSSCASEVIEW",
153
+ "skill": "presentation/SKILL.md",
154
+ "cosmos": "CaseViewProps from @pega/cosmos-react-wss",
155
+ "renders": "Replacement case view for Web Self Service"
156
+ }
157
+ ]
158
+ }
159
+ },
160
+ "cliSubtypeComment": "cliSubtype is the exact <subtype> argument for 'npm run create -- <type> <subtype> ...'. Use it instead of the display name."
161
+ }
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: identify-components
3
+ description: 'Analyze an attached screenshot, mockup or UI description and decide which custom Pega DX components to build (Field, Template, Widget, Presentation). Use when the user shares a design and asks what to build, or asks to break a UI into components. Outputs a compact list that feeds the `generate-component-set` skill.'
4
+ argument-hint: 'Attach a screenshot or describe the UI'
5
+ ---
6
+
7
+ # Identify Components from a Design
8
+
9
+ Analyze the attached screenshot, mockup or described UI (for written requirements, links or a design system as the source, use [plan-dx-component](../plan-dx-component/SKILL.md)) and identify which **custom** Pega DX components are needed. Emit only type and subtype names that appear in [component-manifest.json](../generate-component-set/component-manifest.json).
10
+
11
+ **Output only these lines**, nothing else:
12
+
13
+ ```
14
+ fields="Text,Date,Picklist"
15
+ templates="Form,Details"
16
+ widgets="Name:CASE:dataPageOrSource"
17
+ presentation="Name:CASEVIEW"
18
+ ```
19
+
20
+ Omit any line that would be empty. The output can be handed straight to the [generate-component-set](../generate-component-set/SKILL.md) skill.
21
+
22
+ ## Visual recognition guide
23
+
24
+ ### Field: a control bound to a single case property
25
+
26
+ | What you see | Subtype |
27
+ | ---------------------------------------------------- | -------------- |
28
+ | Single-line text box, textarea, masked string | `text` |
29
+ | Checkbox, toggle, yes/no, consent switch | `boolean` |
30
+ | Whole-number spinner, count, quantity, year | `integer` |
31
+ | Fractional number, measurement, rate, score | `decimal` |
32
+ | Money input, price, amount, budget (currency prefix) | `currency` |
33
+ | Percent input, discount, completion rate (% suffix) | `percentage` |
34
+ | Calendar icon input, due date, birth date | `date` |
35
+ | Email input, envelope icon, `mailto` display | `email` |
36
+ | Telephone input with country code prefix | `phone` |
37
+ | Web address input, external link icon | `url` |
38
+ | Dropdown / select / lookup with chevron | `picklist` |
39
+ | Radio group, small mutually exclusive choice | `radiobuttons` |
40
+
41
+ A status pill, count badge, tag, icon or formatted value bound to a property is also a Field: it handles `DISPLAY_ONLY`. Pick the subtype that matches the bound value.
42
+
43
+ ### Template: a layout that arranges other components
44
+
45
+ | What you see | Subtype |
46
+ | ---------------------------------------------- | --------- |
47
+ | Card or panel wrapping editable input fields | `form` |
48
+ | Read-only label/value pair summary block | `details` |
49
+ | Full-page shell: header, regions, content area | `page` |
50
+
51
+ ### Widget: a self-fetching data block
52
+
53
+ | What you see | Scope |
54
+ | ------------------------------------------------------ | ------ |
55
+ | Chart, KPI tile, or related-records list inside a case | `CASE` |
56
+ | Dashboard tile or portal block with no case context | `PAGE` |
57
+
58
+ For each widget emit `Name:SCOPE:source`. If the data source is not inferable from the image, use `unknown`. Do not guess a data page name.
59
+
60
+ ### Presentation: a replacement case view page
61
+
62
+ | What you see | Subtype |
63
+ | ----------------------------------------------------------------------------------- | ------------- |
64
+ | A full case page: case header, summary panel, stage tracker, tabs, tasks, utilities | `CASEVIEW` |
65
+ | The same case page in a Web Self Service portal | `WSSCASEVIEW` |
66
+
67
+ For each emit `Name:SUBTYPE`. A badge, pill, tag, icon or formatted value is **not** a Presentation component: classify it as the Field subtype that matches the bound value, or as a Widget if it loads its own data.
68
+
69
+ ## Rules
70
+
71
+ 1. **Only list what is visible.** Do not include components that might exist off-screen.
72
+ 2. **Do not list anything Constellation already ships.** This project builds custom components. A plain stock input, stock case view or stock nav bar is left out.
73
+ 3. **A read-only value bound to a property is a Field**, not a Presentation component.
74
+ 4. **A block that loads its own data is a Widget, not a Template.** Templates arrange `children` handed to them; widgets fetch.
75
+ 5. **When torn between two subtypes** (for example `decimal` vs `currency`), pick the one whose formatting affordance is visible. A currency symbol means `currency`.
76
+ 6. **Output only the lines shown above.** No explanation, no prose, no bullet list.