@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,264 @@
1
+ # PCore: Case Utilities, Collaboration & GenAI
2
+
3
+ > Part of the [PCore / PConnect API Reference skills](../README.md). See [pcore-case-collaboration-details.md](./pcore-case-collaboration-details.md) and [pcore-analytics-genai-details.md](./pcore-analytics-genai-details.md) for the full method catalogs of the objects these accessors return.
4
+
5
+ ## `getContainerUtils()`
6
+
7
+ **Purpose:** Container management APIs — inspecting container state (`getContainers`, `getContainerData`, `isContainerInitialized`, and related helpers).
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getContainerUtils(): ContainerUtils
13
+ ```
14
+
15
+ **Example:**
16
+
17
+ ```typescript
18
+ const isInitialized = PCore.getContainerUtils().isContainerInitialized(context, containerName);
19
+ ```
20
+
21
+ ---
22
+
23
+ ## `getAttachmentUtils()`
24
+
25
+ **Purpose:** Utility APIs to manage a case's attachments (`uploadAttachment`, `downloadAttachment`, `linkAttachmentsToCase`, `getCaseAttachments`, and others).
26
+
27
+ **Signature:**
28
+
29
+ ```typescript
30
+ getAttachmentUtils(): AttachmentUtils
31
+ ```
32
+
33
+ **Example:**
34
+
35
+ ```typescript
36
+ const { uploadAttachment } = PCore.getAttachmentUtils();
37
+ await uploadAttachment(file, onUploadProgress, errorHandler, context, caseID);
38
+ ```
39
+
40
+ **Notes:** Most `AttachmentUtils` methods return a `Promise`.
41
+
42
+ ---
43
+
44
+ ## `getFeedUtils()`
45
+
46
+ **Purpose:** APIs to manage a case's feed/pulse (`postMessage`, `getFeeds`, `editMessage`, `likeMessage`, `deleteMessage`, and others).
47
+
48
+ **Signature:**
49
+
50
+ ```typescript
51
+ getFeedUtils(): FeedUtils
52
+ ```
53
+
54
+ **Example:**
55
+
56
+ ```typescript
57
+ await PCore.getFeedUtils().postMessage(context, 'Reviewed and approved.', pConn);
58
+ ```
59
+
60
+ ---
61
+
62
+ ## `getTagUtils()`
63
+
64
+ **Purpose:** APIs to manage a case's tags (`getTaggedCases`, `getTags`, `postTags`, `removeTag`, `getTagsLandingPageURL`).
65
+
66
+ **Signature:**
67
+
68
+ ```typescript
69
+ getTagUtils(): TagUtils
70
+ ```
71
+
72
+ **Example:**
73
+
74
+ ```typescript
75
+ const { getTags, postTags } = PCore.getTagUtils();
76
+ const tags = await getTags(caseID, pConn);
77
+ ```
78
+
79
+ ---
80
+
81
+ ## `getStakeholderUtils()`
82
+
83
+ **Purpose:** APIs to manage a case's participants (`getParticipants`, `getRoleView`, `getParticipantRoles`, `getParticipant`, `createParticipant`, `updateParticipant`, `deleteParticipant`).
84
+
85
+ **Signature:**
86
+
87
+ ```typescript
88
+ getStakeholderUtils(): StakeholderUtils
89
+ ```
90
+
91
+ **Example:**
92
+
93
+ ```typescript
94
+ const participant = await PCore.getStakeholderUtils().getParticipant(caseID, participantID, pConn);
95
+ ```
96
+
97
+ ---
98
+
99
+ ## `getUserApi()`
100
+
101
+ **Purpose:** APIs to retrieve user/operator data.
102
+
103
+ **Signature:**
104
+
105
+ ```typescript
106
+ getUserApi(): UserApi
107
+ ```
108
+
109
+ **Example:**
110
+
111
+ ```typescript
112
+ // The typedefs type the result as a bare `object`; at runtime it is an Axios-style response, so cast to read `.data`.
113
+ const { data } = (await PCore.getUserApi().getOperatorDetails(operatorID)) as { data: Record<string, unknown> };
114
+ ```
115
+
116
+ ---
117
+
118
+ ## `getCaseFollowerApi()`
119
+
120
+ **Purpose:** APIs to manage a case's followers (`addCaseFollower`, `deleteCaseFollower`, `getCaseFollowers`).
121
+
122
+ **Signature:**
123
+
124
+ ```typescript
125
+ getCaseFollowerApi(): CaseFollowerApi
126
+ ```
127
+
128
+ **Example:**
129
+
130
+ ```typescript
131
+ const { addCaseFollower, getCaseFollowers } = PCore.getCaseFollowerApi();
132
+ await addCaseFollower(caseID, [userID], context);
133
+ ```
134
+
135
+ ---
136
+
137
+ ## `getCaseUtils()`
138
+
139
+ **Purpose:** Case-related utility checks (`isCaseActive`, `isExternalCaseType`, `isObjectCaseType`, and related helpers).
140
+
141
+ **Signature:**
142
+
143
+ ```typescript
144
+ getCaseUtils(): CaseUtils
145
+ ```
146
+
147
+ **Example:**
148
+
149
+ ```typescript
150
+ const isObjectType = PCore.getCaseUtils().isObjectCaseType(caseClassName);
151
+ ```
152
+
153
+ ---
154
+
155
+ ## `getRelatedCasesApi()`
156
+
157
+ **Purpose:** APIs to manage a case's related cases (`addRelatedCases`, `removeRelatedCase`, `getRelatedCases`).
158
+
159
+ **Signature:**
160
+
161
+ ```typescript
162
+ getRelatedCasesApi(): RelatedCasesApi
163
+ ```
164
+
165
+ **Example:**
166
+
167
+ ```typescript
168
+ const { getRelatedCases } = PCore.getRelatedCasesApi();
169
+ const relatedCases = await getRelatedCases(caseID, context);
170
+ ```
171
+
172
+ ---
173
+
174
+ ## `getGenAIAssistantUtils()`
175
+
176
+ **Purpose:** APIs for the GenAI Assistant conversational experience (`createConversation`, `sendMessage`, `getConversations`, `getMessages`, `getCoach`, `getAgent`, and related agent-scoped variants).
177
+
178
+ **Signature:**
179
+
180
+ ```typescript
181
+ getGenAIAssistantUtils(): GenAIAssistantUtils
182
+ ```
183
+
184
+ **Example:**
185
+
186
+ ```typescript
187
+ const { createConversation, sendMessage } = PCore.getGenAIAssistantUtils();
188
+ const conversation = await createConversation(contextID, assistantID, context);
189
+ await sendMessage(assistantID, conversation.data.ID, userMessage, context);
190
+ ```
191
+
192
+ **Notes:** Message/conversation APIs return `Promise`s. `createConversation` resolves to `{ data: { ID, response, ... } }`, so the conversation ID is `conversation.data.ID`; `getMessages`/`sendMessage` resolve to an Axios response (payload on `.data`). `sendMessage` accepts an optional trailing `config` (`{ enableStreaming: boolean; ... }`).
193
+
194
+ ---
195
+
196
+ ## `getGenAIUtils()`
197
+
198
+ **Purpose:** APIs for GenAI text operations, such as rewriting text.
199
+
200
+ **Signature:**
201
+
202
+ ```typescript
203
+ getGenAIUtils(): GenAIUtils
204
+ ```
205
+
206
+ **Example:**
207
+
208
+ ```typescript
209
+ if (PCore.getEnvironmentInfo().isGenAIEnabled()) {
210
+ const result = await PCore.getGenAIUtils().rewriteText({
211
+ originalText,
212
+ rewriteAction: 'Improve'
213
+ });
214
+ if (result.success) {
215
+ // use result.rewrittenText
216
+ }
217
+ }
218
+ ```
219
+
220
+ **Notes:** Check `PCore.getEnvironmentInfo().isGenAIEnabled()` first; `rewriteText()` resolves a discriminated union — handle the `success: false` case.
221
+
222
+ ---
223
+
224
+ ## `getAnalyticsUtils()`
225
+
226
+ **Purpose:** Analytics/insight APIs (`getInsightIDs`, `getInsightByID`, `createInsight`, `exportToExcel`, `exportToCSV`, and others). All methods return a `Promise`.
227
+
228
+ **Signature:**
229
+
230
+ ```typescript
231
+ getAnalyticsUtils(): AnalyticsUtils
232
+ ```
233
+
234
+ **Example:**
235
+
236
+ ```typescript
237
+ const insightIDs = await PCore.getAnalyticsUtils().getInsightIDs();
238
+ ```
239
+
240
+ ---
241
+
242
+ ## `getPersonalizationUtils(listID)`
243
+
244
+ **Purpose:** APIs to manage saved personalization instances (view/filter/sort configurations) for a list component.
245
+
246
+ **Signature:**
247
+
248
+ ```typescript
249
+ getPersonalizationUtils(listID: string): {
250
+ createPersonalization: (personalizationID: string, personalizedState: CreatePersonalizationInfo) => Promise<AxiosResponse<string>>;
251
+ updatePersonalization: (personalizationID: string, personalizedState: CreatePersonalizationInfo) => Promise<AxiosResponse<string>>;
252
+ deletePersonalization: (personalizationID: string) => Promise<AxiosResponse<string>>;
253
+ fetchPersonalizations: () => Promise<PersonalizationStore | AxiosResponse<PersonalizationStore>>;
254
+ }
255
+ ```
256
+
257
+ **Example:**
258
+
259
+ ```typescript
260
+ const personalizationUtils = PCore.getPersonalizationUtils(listComponentID);
261
+ const savedViews = await personalizationUtils.fetchPersonalizations();
262
+ ```
263
+
264
+ **Notes:** `listID` should be limited to 32 characters. If `listID` is falsy, the returned methods are safe no-op stubs rather than throwing.
@@ -0,0 +1,96 @@
1
+ # EnvironmentInfo, LocaleUtils & AuthUtils — Method Details
2
+
3
+ > Part of the [PCore / PConnect API Reference skills](../README.md). Companion to [pcore-environment-locale-namespace.md](./pcore-environment-locale-namespace.md), which covers the top-level `PCore.get*()` accessors. This file catalogs the methods available on the objects those accessors return.
4
+ >
5
+ > This is a curated subset — methods that are purely internal bootstrap/theme-branding plumbing are intentionally omitted.
6
+
7
+ ## EnvironmentInfo (via `PCore.getEnvironmentInfo()`)
8
+
9
+ | Method | Signature | Purpose |
10
+ | --------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------- |
11
+ | `getLocale()` | `(): string \| undefined` | Returns the current operator locale. |
12
+ | `getTimeZone()` | `(): string \| undefined` | Returns the application's configured time zone. |
13
+ | `getOperatorIdentifier()` | `(): string \| undefined` | Returns the current operator's identifier. |
14
+ | `getOperatorName()` | `(): string \| undefined` | Returns the current operator's user name. |
15
+ | `getApplicationName()` | `(): string \| undefined` | Returns the application name. |
16
+ | `getApplicationLabel()` | `(): string \| undefined` | Returns the localized application label. |
17
+ | `getApplicationID()` | `(): string \| undefined` | Returns the application ID. |
18
+ | `getAccessGroup()` | `(): string \| undefined` | Returns the operator's access group. |
19
+ | `getPortalName()` | `(): string \| undefined` | Returns the current portal name. |
20
+ | `getRenderingMode()` | `(): string \| undefined` | Returns the rendering mode (`FULL_PORTAL`, `EMBED`, `HYBRID`, `PREVIEW`). |
21
+ | `getFeatureMap()` | `(): Record<string, unknown>` | Returns the configured application feature-flag overrides. |
22
+ | `isWSSPortal()` | `(): boolean` | Checks whether the current portal is a WSS (self-service) type. |
23
+ | `isInfinityRuntime()` | `(): boolean` | Returns whether the runtime is Pega Infinity (as opposed to Launchpad). |
24
+ | `isGenAIEnabled()` | `(): boolean` | Returns whether the GenAI feature is enabled for the application. |
25
+ | `isPegaMobile()` | `(): boolean` | Checks whether the app is running inside the Pega Mobile shell. |
26
+ | `getMaxAttachmentSize()` | `(): number \| undefined` | Returns the system-configured attachment size limit, in MB. |
27
+ | `getTheme(options?)` | `(options?: { type: 'light' \| 'dark' }): unknown` | Returns theme overrides for light or dark mode. |
28
+ | `setTheme(theme, options?)` | `(theme: unknown, options?: { type: 'light' \| 'dark' }): unknown` | Updates theme overrides for light or dark mode. |
29
+ | `getBaseLocale()` | `(): string` | Returns the base locale string (defaults to `'en-US'`). |
30
+ | `getKeyMapping(keyValue)` | `(keyValue: string): string \| null` | Returns the Launchpad-namespaced identifier for a given key. |
31
+ | `getRuntime()` | `(): 'Browser' \| 'Native'` | Returns the runtime environment type. |
32
+ | `getCaseTypeList()` | `(): unknown[]` | Returns the list of case types available in the application. |
33
+
34
+ **Example:**
35
+
36
+ ```typescript
37
+ const envInfo = PCore.getEnvironmentInfo();
38
+ const applicationName = envInfo.getApplicationName();
39
+ const isEmbedMode = envInfo.getRenderingMode() === 'EMBED';
40
+ ```
41
+
42
+ ---
43
+
44
+ ## LocaleUtils (via `PCore.getLocaleUtils()`)
45
+
46
+ | Method | Signature | Purpose |
47
+ | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
48
+ | `getLocaleValue(localeKey, localePath?, localeRuleKey?, componentName?)` | `(localeKey: string, localePath?: string, localeRuleKey?: string, componentName?: string): string` | Returns the localized value for a key, falling back to the raw key if not found. |
49
+ | `getPortalLocaleReference(portal)` | `(portal: string \| null): string` | Returns the locale reference string for a portal (for example, `PORTAL!WEBPORTAL`). |
50
+ | `getCaseLocaleReference(caseClass)` | `(caseClass: string): string \| null` | Returns the locale reference string for a case type (for example, `CASE!MY-APP-WORK`). |
51
+ | `setLocaleForRule(localeJson, localeRuleKey)` | `(localeJson: unknown, localeRuleKey: string): void` | Sets the locale bundle for a specific rule key. |
52
+ | `getLocaleForRule(localeRuleKey)` | `(localeRuleKey: string): unknown` | Returns the locale bundle fields for a rule key. |
53
+ | `resetLocaleStore()` | `(): void` | Resets the in-memory localization store. |
54
+ | `loadLocaleResources(locales)` | `(locales: string[]): Promise<void>` | Loads locale bundles and localization assets for the given locales. |
55
+ | `setTimezone(timezone)` | `(timezone: string): void` | Sets the active time zone. |
56
+ | `getTimeZoneInUse()` | `(): string` | Returns the configured time zone, falling back to the browser's time zone. |
57
+
58
+ **Example:**
59
+
60
+ ```typescript
61
+ const localizedLabel = PCore.getLocaleUtils().getLocaleValue('pyLabel');
62
+ const caseLocaleRef = PCore.getLocaleUtils().getCaseLocaleReference('MyOrg-MyApp-Work-Request');
63
+ ```
64
+
65
+ ---
66
+
67
+ ## AuthUtils (via `PCore.getAuthUtils()`)
68
+
69
+ | Method | Signature | Purpose |
70
+ | ------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------- |
71
+ | `setTokens(tokenInfo)` | `(tokenInfo: TokenInfo): void` | Adds an access token to outgoing REST request headers. `TokenInfo` is defined below the example. |
72
+ | `getAuthInstance(config)` | `(config: unknown): unknown` | Returns an OAuth 2.0 auth instance for the given configuration. |
73
+ | `revokeTokens()` | `(): Promise<void>` | Revokes the current access and refresh tokens. |
74
+ | `setAuthorizationHeader(value)` | `(value: string): void` | Sets the `Authorization` header value used on outgoing requests. |
75
+
76
+ **Example:**
77
+
78
+ ```typescript
79
+ PCore.getAuthUtils().setTokens({ token_type: 'Bearer', access_token: token, expires_in: expiresIn, eA: eA });
80
+ // ...on logout
81
+ await PCore.getAuthUtils().revokeTokens();
82
+ ```
83
+
84
+ **`TokenInfo`** (from the typedefs' `service_broker/types.d.ts`):
85
+
86
+ ```typescript
87
+ type TokenInfo = {
88
+ expires_in: number;
89
+ eA: number; // required; its meaning is not documented in the typedefs
90
+ session_index?: string;
91
+ token_type?: string;
92
+ refresh_token?: string;
93
+ } & ({ csrf: string; access_token?: undefined } | { csrf?: undefined; access_token: string });
94
+ ```
95
+
96
+ Exactly one of `csrf` or `access_token` is supplied.
@@ -0,0 +1,175 @@
1
+ # PCore: Environment, Locale & Namespace
2
+
3
+ > Part of the [PCore / PConnect API Reference skills](../README.md). See [pcore-environment-info-details.md](./pcore-environment-info-details.md) for the full method catalogs of `EnvironmentInfo`, `LocaleUtils`, and `AuthUtils`.
4
+
5
+ ## `getEnvironmentInfo()`
6
+
7
+ **Purpose:** Returns the `EnvironmentInfo` API — locale, operator, and application information.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getEnvironmentInfo(): EnvironmentInfo
13
+ ```
14
+
15
+ **Example:**
16
+
17
+ ```typescript
18
+ const envInfo = PCore.getEnvironmentInfo();
19
+ const applicationName = envInfo.getApplicationName();
20
+ const locale = envInfo.getLocale();
21
+ ```
22
+
23
+ ---
24
+
25
+ ## `switchLocale(locale)`
26
+
27
+ **Purpose:** Switches the application locale at runtime and hot-reloads locale bundles without a full page reload.
28
+
29
+ **Signature:**
30
+
31
+ ```typescript
32
+ switchLocale(locale: string): Promise<void>
33
+ ```
34
+
35
+ **Example:**
36
+
37
+ ```typescript
38
+ await PCore.switchLocale('fr-FR');
39
+ ```
40
+
41
+ ---
42
+
43
+ ## `getLocaleUtils(locale?)`
44
+
45
+ **Purpose:** Returns a `LocaleUtils` instance scoped to the given locale (or the current operator locale if omitted).
46
+
47
+ **Signature:**
48
+
49
+ ```typescript
50
+ getLocaleUtils(locale?: string): LocaleUtils
51
+ ```
52
+
53
+ **Example:**
54
+
55
+ ```typescript
56
+ const localizedLabel = PCore.getLocaleUtils().getLocaleValue('pyLabel');
57
+ ```
58
+
59
+ ---
60
+
61
+ ## `registerLocaleManager(customLocaleUtilApis)`
62
+
63
+ **Purpose:** Registers custom `LocaleUtils` implementations, overriding the default ones in place.
64
+
65
+ **Signature:**
66
+
67
+ ```typescript
68
+ registerLocaleManager(customLocaleUtilApis: Partial<LocaleUtils>): void
69
+ ```
70
+
71
+ **Example:**
72
+
73
+ ```typescript
74
+ PCore.registerLocaleManager({
75
+ getLocaleValue: (key) => myCustomTranslationLookup(key)
76
+ });
77
+ ```
78
+
79
+ **Notes:** Only the keys present on `customLocaleUtilApis` are overridden — every other `LocaleUtils` method keeps its default implementation.
80
+
81
+ ---
82
+
83
+ ## `getQualifiedName(ruleName, namespace)`
84
+
85
+ **Purpose:** Returns the fully qualified rule name for the given namespace.
86
+
87
+ **Signature:**
88
+
89
+ ```typescript
90
+ getQualifiedName(ruleName: string, namespace: string): string
91
+ ```
92
+
93
+ **Example:**
94
+
95
+ ```typescript
96
+ const qualifiedName = PCore.getQualifiedName('TestRule', 'MyNamespace'); // "MyNamespace__TestRule"
97
+ ```
98
+
99
+ ---
100
+
101
+ ## `getDefaultQualifiedName(ruleName)`
102
+
103
+ **Purpose:** Returns the rule name qualified with the application's default namespace.
104
+
105
+ **Signature:**
106
+
107
+ ```typescript
108
+ getDefaultQualifiedName(ruleName: string): string
109
+ ```
110
+
111
+ **Example:**
112
+
113
+ ```typescript
114
+ const dataPageName = PCore.getDefaultQualifiedName('D_Accounts');
115
+ ```
116
+
117
+ ---
118
+
119
+ ## `getNameSpaceUtils()`
120
+
121
+ **Purpose:** Returns `NamespaceUtils`, which provides namespace-related helpers (`getQualifiedName`, `getDefaultQualifiedName`, and related utilities).
122
+
123
+ **Signature:**
124
+
125
+ ```typescript
126
+ getNameSpaceUtils(): NamespaceUtils
127
+ ```
128
+
129
+ **Example:**
130
+
131
+ ```typescript
132
+ const dataPageName = PCore.getNameSpaceUtils().getDefaultQualifiedName('D_Accounts');
133
+ ```
134
+
135
+ ---
136
+
137
+ ## `getNetworkUtils()`
138
+
139
+ **Purpose:** Returns the central controller for online/offline application state.
140
+
141
+ **Signature:**
142
+
143
+ ```typescript
144
+ getNetworkUtils(): NetworkUtils
145
+ ```
146
+
147
+ **Example:**
148
+
149
+ ```typescript
150
+ const isOnline = PCore.getNetworkUtils().isOnline();
151
+
152
+ const unsubscribe = PCore.getNetworkUtils().onStatusChange((online) => {
153
+ // react to connectivity changes
154
+ });
155
+ ```
156
+
157
+ **Notes:** Prefer this over reading `navigator.onLine` directly or adding your own `online`/`offline` window listeners.
158
+
159
+ ---
160
+
161
+ ## `getAuthUtils()`
162
+
163
+ **Purpose:** Returns `AuthUtils`, used to manage authentication tokens for REST API calls.
164
+
165
+ **Signature:**
166
+
167
+ ```typescript
168
+ getAuthUtils(): AuthUtils
169
+ ```
170
+
171
+ **Example:**
172
+
173
+ ```typescript
174
+ PCore.getAuthUtils().setTokens(tokenObject);
175
+ ```
@@ -0,0 +1,99 @@
1
+ # Messages, Pub/Sub, Events & Messaging Service — Method Details
2
+
3
+ > Part of the [PCore / PConnect API Reference skills](../README.md). Companion to [pcore-rest-data-messaging.md](./pcore-rest-data-messaging.md), which covers the top-level `PCore.get*()` accessors. This file catalogs the methods available on the objects those accessors return.
4
+
5
+ ## SemanticUrlUtils (via `PCore.getSemanticUrlUtils()`)
6
+
7
+ | Method | Signature | Purpose |
8
+ | ------------------------------------------------------------ | -------------------------------------------------------------------------------- | -------------------------------------------------------------- |
9
+ | `getResolvedSemanticURL(routeKey, payload, params, locale?)` | `(routeKey: string, payload: unknown, params: unknown, locale?: string): string` | Builds a resolved semantic URL for a given route. |
10
+ | `getActions()` | `(): Record<string, string>` | Returns the constant names for supported semantic-URL actions. |
11
+
12
+ **Example:**
13
+
14
+ ```typescript
15
+ const url = PCore.getSemanticUrlUtils().getResolvedSemanticURL(routeKey, payload, params);
16
+ ```
17
+
18
+ ---
19
+
20
+ ## MessageManager (via `PCore.getMessageManager()`)
21
+
22
+ | Method | Signature | Purpose |
23
+ | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |
24
+ | `addMessages(config)` | `(config: { messages: unknown[]; category: string; context?: string; property?: string }): void` | Adds one or more messages to a context or property. |
25
+ | `getMessages(config)` | `(config: { context: string \| null }): unknown[]` | Retrieves messages (property, HTTP, or page) for a context. |
26
+ | `clearMessages(config)` | `(config: { category?: string; context?: string; property?: string }): void` | Clears messages matching the given criteria. |
27
+ | `clearContextMessages(config)` | `(config: { context: string }): void` | Clears all messages for a given context. |
28
+ | `clearContextMessagesInActiveWorkArea(context)` | `(context: string): void` | Clears all messages in the active work-area container. |
29
+ | `getValidationErrorMessages(context, localizationService?)` | `(context: string, localizationService?: unknown): unknown[]` | Returns all validation error messages for a context, localized. |
30
+ | `isCustomPageErrorExist(context)` | `(context: string): boolean` | Checks whether a custom page error exists for a context. |
31
+
32
+ **Example:**
33
+
34
+ ```typescript
35
+ const { addMessages, clearMessages } = PCore.getMessageManager();
36
+
37
+ addMessages({
38
+ messages: [{ type: 'error', message: 'Something went wrong' }],
39
+ category: 'PAGE',
40
+ context
41
+ });
42
+ clearMessages({ category: 'PAGE', context });
43
+ ```
44
+
45
+ ---
46
+
47
+ ## PubSubUtils (via `PCore.getPubSubUtils()`)
48
+
49
+ | Method | Signature | Purpose |
50
+ | -------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------ |
51
+ | `subscribe(eventType, handler, name?, subscribeOnce?, contextName?)` | `(...): void` | Subscribes a handler to an event type. |
52
+ | `subscribeOnce(eventType, handler, name)` | `(eventType: string, handler: Function, name: string): void` | Subscribes a handler that fires only once, then auto-unsubscribes. |
53
+ | `publish(eventType, payload?)` | `(eventType: string, payload?: unknown): void` | Publishes an event, invoking all subscribed handlers. |
54
+ | `unsubscribe(eventType, name, contextName?)` | `(eventType: string, name: string, contextName?: string): void` | Unsubscribes a named handler from an event type. |
55
+ | `cleanContextSubscribers(contextName)` | `(contextName: string): void` | Removes all subscriptions registered under a context. |
56
+
57
+ **Example:**
58
+
59
+ ```typescript
60
+ const { subscribe, unsubscribe } = PCore.getPubSubUtils();
61
+ subscribe(PCore.getEvents().getCaseEvent().CREATE_STAGE_DONE, onStageCreated, 'my-subscriber');
62
+ // later
63
+ unsubscribe(PCore.getEvents().getCaseEvent().CREATE_STAGE_DONE, 'my-subscriber');
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Events (via `PCore.getEvents()`)
69
+
70
+ | Method | Signature | Purpose |
71
+ | ------------------------------ | ---------------------------- | --------------------------------------------------------------- |
72
+ | `getCaseEvent()` | `(): Record<string, string>` | Returns case-related event name constants (for pub/sub topics). |
73
+ | `getDataEvent()` | `(): Record<string, string>` | Returns data-object-related event name constants. |
74
+ | `getBulkProcessEvent()` | `(): Record<string, string>` | Returns the bulk-action-submitted event constant. |
75
+ | `getLocalActionProcessEvent()` | `(): Record<string, string>` | Returns the local-action-submitted event constant. |
76
+
77
+ **Example:**
78
+
79
+ ```typescript
80
+ const caseCreated = PCore.getEvents().getCaseEvent().CREATE_STAGE_DONE;
81
+ ```
82
+
83
+ ---
84
+
85
+ ## MessagingServiceManager (via `PCore.getMessagingServiceManager()`)
86
+
87
+ | Method | Signature | Purpose |
88
+ | ------------------------------------------------------ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
89
+ | `subscribe(filter, messageHandler, contextName?, id?)` | `(filter: { matcher: string; criteria: Record<string, string> }, messageHandler: Function, contextName?: string, id?: string): string` | Subscribes to WebSocket messaging service updates matching a filter (for example `{ matcher: 'CASE', criteria: { caseId } }` for case updates); returns a subscription ID. |
90
+ | `unsubscribe(id, notRemove?)` | `(id: string, notRemove?: boolean): void` | Removes a messaging-service subscription. |
91
+ | `dispatchLocalMessage(payload)` | `(payload: unknown): void` | Dispatches a locally-constructed message through the subscriber pipeline (used for offline support). |
92
+ | `getUserPresence()` | `(): { getUserState: (userIdentifier: string) => unknown }` | Returns the user-presence manager, used to read a user's online/away state. |
93
+ | `getCaseSubscription(caseId)` | `(caseId: string): AtomicSubscription` | Gets or creates a subscription for case-specific server push updates. The returned object has `subscribe(criteria, callback): string` and `unsubscribe(subscriptionId): void`. |
94
+
95
+ **Example:**
96
+
97
+ ```typescript
98
+ const userState = PCore.getMessagingServiceManager().getUserPresence().getUserState(userIdentifier);
99
+ ```