@pega/sdk 0.0.2 → 0.0.3

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 (222) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
  3. package/templates/react-sdk-reference/.claude/instructions/component-map.md +38 -0
  4. package/templates/react-sdk-reference/.claude/instructions/dse-component.md +75 -0
  5. package/templates/react-sdk-reference/.claude/instructions/field-component.md +71 -0
  6. package/templates/react-sdk-reference/.claude/instructions/template-component.md +92 -0
  7. package/templates/react-sdk-reference/.claude/instructions/widget-component.md +87 -0
  8. package/templates/react-sdk-reference/.claude/prompts/add-component.md +144 -0
  9. package/templates/react-sdk-reference/.claude/prompts/component-manifest.json +111 -0
  10. package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +149 -0
  11. package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +126 -0
  12. package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +139 -0
  13. package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +151 -0
  14. package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +124 -0
  15. package/templates/react-sdk-reference/.claude/prompts/identify-components.md +105 -0
  16. package/templates/react-sdk-reference/.claude/prompts/replace-design-system.md +519 -0
  17. package/templates/react-sdk-reference/.claude/skills/component-contracts.md +140 -0
  18. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +135 -0
  19. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Banner.md +149 -0
  20. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/CaseSummaryFields.md +154 -0
  21. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/DetailsFields.md +144 -0
  22. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +131 -0
  23. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroupList.md +111 -0
  24. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +115 -0
  25. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Operator.md +149 -0
  26. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +83 -0
  27. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +206 -0
  28. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/WssQuickCreate.md +135 -0
  29. package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +289 -0
  30. package/templates/react-sdk-reference/.claude/skills/field-components.md +294 -0
  31. package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +112 -0
  32. package/templates/react-sdk-reference/.claude/skills/field-skills/CancelAlert.md +203 -0
  33. package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +158 -0
  34. package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +106 -0
  35. package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +99 -0
  36. package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +103 -0
  37. package/templates/react-sdk-reference/.claude/skills/field-skills/Decimal.md +98 -0
  38. package/templates/react-sdk-reference/.claude/skills/field-skills/Dropdown.md +114 -0
  39. package/templates/react-sdk-reference/.claude/skills/field-skills/Email.md +107 -0
  40. package/templates/react-sdk-reference/.claude/skills/field-skills/Group.md +90 -0
  41. package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +87 -0
  42. package/templates/react-sdk-reference/.claude/skills/field-skills/Location.md +136 -0
  43. package/templates/react-sdk-reference/.claude/skills/field-skills/Multiselect.md +164 -0
  44. package/templates/react-sdk-reference/.claude/skills/field-skills/ObjectReference.md +164 -0
  45. package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +92 -0
  46. package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +110 -0
  47. package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +146 -0
  48. package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +138 -0
  49. package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +124 -0
  50. package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +216 -0
  51. package/templates/react-sdk-reference/.claude/skills/field-skills/SemanticLink.md +148 -0
  52. package/templates/react-sdk-reference/.claude/skills/field-skills/TextArea.md +96 -0
  53. package/templates/react-sdk-reference/.claude/skills/field-skills/TextContent.md +101 -0
  54. package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +104 -0
  55. package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +88 -0
  56. package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +85 -0
  57. package/templates/react-sdk-reference/.claude/skills/field-skills/UserReference.md +180 -0
  58. package/templates/react-sdk-reference/.claude/skills/run-and-verify.md +68 -0
  59. package/templates/react-sdk-reference/.claude/skills/template-components.md +322 -0
  60. package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +144 -0
  61. package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +122 -0
  62. package/templates/react-sdk-reference/.claude/skills/template-skills/BannerPage.md +83 -0
  63. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +100 -0
  64. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +131 -0
  65. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +126 -0
  66. package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +107 -0
  67. package/templates/react-sdk-reference/.claude/skills/template-skills/DataReference.md +120 -0
  68. package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultForm.md +102 -0
  69. package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultPage.md +110 -0
  70. package/templates/react-sdk-reference/.claude/skills/template-skills/Details.md +88 -0
  71. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +95 -0
  72. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsThreeColumn.md +78 -0
  73. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +78 -0
  74. package/templates/react-sdk-reference/.claude/skills/template-skills/DynamicTabs.md +101 -0
  75. package/templates/react-sdk-reference/.claude/skills/template-skills/FieldGroupTemplate.md +109 -0
  76. package/templates/react-sdk-reference/.claude/skills/template-skills/HierarchicalForm.md +113 -0
  77. package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboard.md +104 -0
  78. package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboardPage.md +85 -0
  79. package/templates/react-sdk-reference/.claude/skills/template-skills/ListPage.md +68 -0
  80. package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +139 -0
  81. package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +80 -0
  82. package/templates/react-sdk-reference/.claude/skills/template-skills/NarrowWide.md +141 -0
  83. package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +109 -0
  84. package/templates/react-sdk-reference/.claude/skills/template-skills/PromotedFilters.md +124 -0
  85. package/templates/react-sdk-reference/.claude/skills/template-skills/SelfServiceCaseView.md +135 -0
  86. package/templates/react-sdk-reference/.claude/skills/template-skills/SimpleTable.md +127 -0
  87. package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +103 -0
  88. package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +79 -0
  89. package/templates/react-sdk-reference/.claude/skills/template-skills/TwoColumn.md +131 -0
  90. package/templates/react-sdk-reference/.claude/skills/template-skills/WideNarrow.md +150 -0
  91. package/templates/react-sdk-reference/.claude/skills/template-skills/WssNavBar.md +135 -0
  92. package/templates/react-sdk-reference/.claude/skills/widget-components.md +271 -0
  93. package/templates/react-sdk-reference/.claude/skills/widget-skills/AppAnnouncement.md +82 -0
  94. package/templates/react-sdk-reference/.claude/skills/widget-skills/Attachment.md +146 -0
  95. package/templates/react-sdk-reference/.claude/skills/widget-skills/CaseHistory.md +107 -0
  96. package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +200 -0
  97. package/templates/react-sdk-reference/.claude/skills/widget-skills/Followers.md +99 -0
  98. package/templates/react-sdk-reference/.claude/skills/widget-skills/QuickCreate.md +114 -0
  99. package/templates/react-sdk-reference/.claude/skills/widget-skills/SummaryItem.md +167 -0
  100. package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +190 -0
  101. package/templates/react-sdk-reference/.cursor/rules/component-map.mdrules +41 -0
  102. package/templates/react-sdk-reference/.cursor/rules/dse-component.mdrules +78 -0
  103. package/templates/react-sdk-reference/.cursor/rules/field-component.mdrules +74 -0
  104. package/templates/react-sdk-reference/.cursor/rules/pega-sdk.mdrules +247 -0
  105. package/templates/react-sdk-reference/.cursor/rules/prompts/add-component.mdrules +149 -0
  106. package/templates/react-sdk-reference/.cursor/rules/prompts/component-manifest.json +111 -0
  107. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-all-components.mdrules +154 -0
  108. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-dse-components.mdrules +131 -0
  109. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-field-components.mdrules +144 -0
  110. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-template-components.mdrules +156 -0
  111. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-widget-components.mdrules +129 -0
  112. package/templates/react-sdk-reference/.cursor/rules/prompts/identify-components.mdrules +110 -0
  113. package/templates/react-sdk-reference/.cursor/rules/prompts/replace-design-system.mdrules +524 -0
  114. package/templates/react-sdk-reference/.cursor/rules/skills/component-contracts.mdrules +145 -0
  115. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/AlertBanner.mdrules +140 -0
  116. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Banner.mdrules +154 -0
  117. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/CaseSummaryFields.mdrules +159 -0
  118. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/DetailsFields.mdrules +149 -0
  119. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroup.mdrules +136 -0
  120. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroupList.mdrules +116 -0
  121. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldValueList.mdrules +120 -0
  122. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Operator.mdrules +154 -0
  123. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Pulse.mdrules +88 -0
  124. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/RichTextEditor.mdrules +211 -0
  125. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/WssQuickCreate.mdrules +140 -0
  126. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension.mdrules +294 -0
  127. package/templates/react-sdk-reference/.cursor/rules/skills/field-components.mdrules +299 -0
  128. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/AutoComplete.mdrules +117 -0
  129. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/CancelAlert.mdrules +208 -0
  130. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Checkbox.mdrules +163 -0
  131. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Currency.mdrules +111 -0
  132. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Date.mdrules +104 -0
  133. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/DateTime.mdrules +108 -0
  134. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Decimal.mdrules +103 -0
  135. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Dropdown.mdrules +119 -0
  136. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Email.mdrules +112 -0
  137. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Group.mdrules +95 -0
  138. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Integer.mdrules +92 -0
  139. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Location.mdrules +141 -0
  140. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Multiselect.mdrules +169 -0
  141. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ObjectReference.mdrules +169 -0
  142. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Percentage.mdrules +97 -0
  143. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Phone.mdrules +115 -0
  144. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RadioButtons.mdrules +151 -0
  145. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RichText.mdrules +143 -0
  146. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ScalarList.mdrules +129 -0
  147. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SelectableCard.mdrules +221 -0
  148. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SemanticLink.mdrules +153 -0
  149. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextArea.mdrules +101 -0
  150. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextContent.mdrules +106 -0
  151. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextInput.mdrules +109 -0
  152. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Time.mdrules +93 -0
  153. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/URL.mdrules +90 -0
  154. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/UserReference.mdrules +185 -0
  155. package/templates/react-sdk-reference/.cursor/rules/skills/run-and-verify.mdrules +73 -0
  156. package/templates/react-sdk-reference/.cursor/rules/skills/template-components.mdrules +327 -0
  157. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AdvancedSearch.mdrules +149 -0
  158. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AppShell.mdrules +127 -0
  159. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/BannerPage.mdrules +88 -0
  160. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseSummary.mdrules +105 -0
  161. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseView.mdrules +136 -0
  162. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseViewActionsMenu.mdrules +131 -0
  163. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Confirmation.mdrules +112 -0
  164. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DataReference.mdrules +125 -0
  165. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultForm.mdrules +107 -0
  166. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultPage.mdrules +115 -0
  167. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Details.mdrules +93 -0
  168. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsSubTabs.mdrules +100 -0
  169. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsThreeColumn.mdrules +83 -0
  170. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsTwoColumn.mdrules +83 -0
  171. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DynamicTabs.mdrules +106 -0
  172. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/FieldGroupTemplate.mdrules +114 -0
  173. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/HierarchicalForm.mdrules +118 -0
  174. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboard.mdrules +109 -0
  175. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboardPage.mdrules +90 -0
  176. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListPage.mdrules +73 -0
  177. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListView.mdrules +144 -0
  178. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/MultiReferenceReadOnly.mdrules +85 -0
  179. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/NarrowWide.mdrules +146 -0
  180. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/OneColumn.mdrules +114 -0
  181. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/PromotedFilters.mdrules +129 -0
  182. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SelfServiceCaseView.mdrules +140 -0
  183. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SimpleTable.mdrules +132 -0
  184. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SingleReferenceReadOnly.mdrules +108 -0
  185. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SubTabs.mdrules +84 -0
  186. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/TwoColumn.mdrules +136 -0
  187. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WideNarrow.mdrules +155 -0
  188. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WssNavBar.mdrules +140 -0
  189. package/templates/react-sdk-reference/.cursor/rules/skills/widget-components.mdrules +276 -0
  190. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/AppAnnouncement.mdrules +87 -0
  191. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Attachment.mdrules +151 -0
  192. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/CaseHistory.mdrules +112 -0
  193. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/FileUtility.mdrules +205 -0
  194. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Followers.mdrules +104 -0
  195. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/QuickCreate.mdrules +119 -0
  196. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/SummaryItem.mdrules +172 -0
  197. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/ToDo.mdrules +195 -0
  198. package/templates/react-sdk-reference/.cursor/rules/template-component.mdrules +95 -0
  199. package/templates/react-sdk-reference/.cursor/rules/widget-component.mdrules +90 -0
  200. package/templates/react-sdk-reference/.github/copilot-instructions.md +58 -0
  201. package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +144 -16
  202. package/templates/react-sdk-reference/.github/prompts/generate-all-components.prompt.md +154 -0
  203. package/templates/react-sdk-reference/.github/prompts/generate-dse-components.prompt.md +131 -0
  204. package/templates/react-sdk-reference/.github/prompts/generate-field-components.prompt.md +144 -0
  205. package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md +156 -0
  206. package/templates/react-sdk-reference/.github/prompts/generate-widget-components.prompt.md +129 -0
  207. package/templates/react-sdk-reference/.github/skills/design-system-extension.md +58 -18
  208. package/templates/react-sdk-reference/.github/skills/field-components.md +55 -23
  209. package/templates/react-sdk-reference/.github/skills/template-components.md +48 -11
  210. package/templates/react-sdk-reference/.github/skills/widget-components.md +49 -12
  211. package/templates/react-sdk-reference/AGENTS.md +217 -29
  212. package/templates/react-sdk-reference/package.json +1 -1
  213. package/templates/react-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
  214. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  215. package/templates/react-sdk-reference/sdk-config.json +1 -1
  216. package/templates/react-sdk-reference/vite.config.ts +1 -1
  217. package/templates/react-sdk-reference/.github/prompts/replace-all-fields.prompt.md +0 -48
  218. package/templates/react-sdk-reference/.github/prompts/replace-component.prompt.md +0 -81
  219. package/templates/react-sdk-reference/.github/prompts/replace-field.prompt.md +0 -41
  220. package/templates/react-sdk-reference/.github/prompts/swap-design-system.prompt.md +0 -49
  221. package/templates/react-sdk-reference/.github/skills/swap-design-system.md +0 -105
  222. package/templates/react-sdk-reference/pega-constellationjs-0.26.2.tgz +0 -0
@@ -0,0 +1,96 @@
1
+ # Skill: TextArea
2
+
3
+ Multi-line text input field that binds to a Pega case property.
4
+
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Renders an editable multi-line text area. Used for long-form text input such as descriptions, notes, or comments. Similar to `TextInput` but allows multiple lines with configurable min/max rows.
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Pega Name:** `TextArea`
16
+ - **Type / Subtype:** `Field` / `Text` (multi-line)
17
+ - **Registration key:** `TextArea` (in `component-map.ts`)
18
+
19
+ ## Props (component-specific)
20
+
21
+ | Prop | Type | Description |
22
+ |------|------|-------------|
23
+ | `fieldMetadata` | `any` (optional) | Metadata object; used to read `maxLength` for the textarea |
24
+
25
+ All other props come from `PConnFieldProps`. Import type as:
26
+ ```typescript
27
+ import type { PConnFieldProps } from '@pega/sdk-react';
28
+ ```
29
+
30
+ ## Behavioral Contract
31
+
32
+ 1. **Local state:** Maintain `inputValue` in local state (string). Initialize to `''`.
33
+ 2. **Sync from store:** `useEffect` watching `value` prop — call `setInputValue(value)` whenever `value` changes.
34
+ 3. **On change:** Update local `inputValue` state only (do NOT commit to store on every keystroke).
35
+ 4. **On blur:** Commit to store by calling `handleEvent(actions, 'changeNblur', propName, inputValue)`.
36
+ 5. **Read-only:** Set `readOnly` attribute on the textarea; use visually borderless ("standard") variant. Omit `onBlur` handler: `onBlur={!readOnly ? handleBlur : undefined}`.
37
+ 6. **maxLength:** Read from `fieldMetadata?.maxLength`; pass to the textarea's `maxLength` attribute.
38
+ 7. **Row sizing:** Fixed at `minRows={5}` and `maxRows={5}` — the textarea does not auto-expand; it shows a scrollbar if content exceeds 5 rows.
39
+
40
+ ## Display Mode Rendering
41
+
42
+ - **`DISPLAY_ONLY`:** Render `<FieldValueList name={hideLabel ? '' : label} value={value} />`.
43
+ - **`STACKED_LARGE_VAL`:** Render `<FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />`.
44
+ - Both modes short-circuit before interactive rendering.
45
+
46
+ ## Read-Only Rendering
47
+
48
+ Set `readOnly` on the textarea element (NOT a read-only version via `TextInput` — preserves the multiline appearance). Switch to a flat/borderless visual style. The `minRows`/`maxRows` constraint is still applied in read-only.
49
+
50
+ ## Visual Specifications
51
+
52
+ Derived from the reference component's MUI props:
53
+
54
+ | Property | Standard (editable) | Read-only |
55
+ |----------|---------------------|-----------|
56
+ | Width | 100% | 100% |
57
+ | Min rows | 5 | 5 |
58
+ | Max rows | 5 (scrollable beyond) | 5 |
59
+ | Border | 1px solid (outlined) | None (standard/flat) |
60
+ | Border radius | 4px | — |
61
+ | Label | Floating label | Floating label |
62
+ | Helper text | Below textarea | Below textarea |
63
+ | Error state | Red border + red helper text | — |
64
+ | Resize | Vertical resize handle (browser default) | Same |
65
+ | Font size | 0.875rem | 0.875rem |
66
+ | Padding | 8px 14px | — |
67
+
68
+ **CSS-only implementation notes:**
69
+ - `textarea { min-height: calc(5 * 1.4375em + 16px); max-height: calc(5 * 1.4375em + 16px); overflow-y: auto; resize: vertical; }`
70
+ - Error: `border-color: #d32f2f`
71
+ - Read-only: `border: none; background: transparent;`
72
+
73
+ ## Edge Cases & Special Logic
74
+
75
+ - Unlike `TextInput`, do NOT delegate to `TextInput` in read-only mode — render the textarea directly with `readOnly` set, so the multi-line appearance is preserved.
76
+ - `maxLength` is optional; only apply the attribute if `fieldMetadata?.maxLength` is defined.
77
+
78
+ ## Dependencies
79
+
80
+ - `handleEvent` from `../../helpers/event-utils`
81
+ - `getComponentFromRegistry('FieldValueList')` for display modes
82
+ - No third-party UI libraries required
83
+
84
+ ## Design System Mapping
85
+
86
+ **UI control type:** Multi-line text input (`<textarea>`).
87
+
88
+ Listed design systems are examples only.
89
+
90
+ | Design System | Recommended Component |
91
+ |---|---|
92
+ | Default (CSS only) | `<textarea rows="5">` with floating label |
93
+ | MUI | `<TextField multiline minRows={5} maxRows={5} />` |
94
+ | Ant Design | `<Input.TextArea rows={5} />` |
95
+ | Chakra UI | `<Textarea />` |
96
+ | Shadcn/ui | `<Textarea />` |
@@ -0,0 +1,101 @@
1
+ # Skill: TextContent
2
+
3
+ Static text display component that renders formatted text content (paragraph or heading). Non-interactive — no form binding.
4
+
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Displays static, read-only text content. Used to embed headings or descriptive paragraph text within forms or views. Not an input field — does NOT bind to a case property value and does NOT use `PConnFieldProps`. It renders purely based on static configuration props.
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Pega Name:** `TextContent`
16
+ - **Type / Subtype:** `Field` / `Text`
17
+ - **Registration key:** `TextContent` (in `component-map.ts`)
18
+
19
+ ## Props (component-specific)
20
+
21
+ Extends `PConnProps` (NOT `PConnFieldProps` — there is no form value binding):
22
+
23
+ ```typescript
24
+ import type { PConnProps } from '@pega/sdk-react';
25
+
26
+ interface TextContentProps extends PConnProps {
27
+ content: string;
28
+ displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';
29
+ }
30
+ ```
31
+
32
+ | Prop | Type | Description |
33
+ |------|------|-------------|
34
+ | `content` | `string` | The text string to render |
35
+ | `displayAs` | `'Paragraph' \| 'Heading 1' \| 'Heading 2' \| 'Heading 3' \| 'Heading 4'` | How to render the text — maps to typography level |
36
+
37
+ ## Behavioral Contract
38
+
39
+ 1. **No state, no effects** — purely presentational. Render `content` using the appropriate typography element for `displayAs`.
40
+ 2. **Mapping:**
41
+ - `'Paragraph'` → `<p>` / body text
42
+ - `'Heading 1'` → `<h1>`
43
+ - `'Heading 2'` → `<h2>`
44
+ - `'Heading 3'` → `<h3>`
45
+ - `'Heading 4'` → `<h4>`
46
+ 3. **Fallthrough:** Log an error for unrecognized `displayAs` values and render nothing (or a default fallback).
47
+
48
+ ## Display Mode Rendering
49
+
50
+ Not applicable — this component is display-only by nature. It does not accept a `displayMode` prop.
51
+
52
+ ## Read-Only Rendering
53
+
54
+ Always read-only — there is no editable state.
55
+
56
+ ## Visual Specifications
57
+
58
+ Derived from standard HTML typography:
59
+
60
+ | `displayAs` | Element | Font size | Font weight |
61
+ |-------------|---------|-----------|-------------|
62
+ | `Paragraph` | `<p>` / `body1` | 1rem (16px) | 400 |
63
+ | `Heading 1` | `<h1>` | 2.5rem | 300 |
64
+ | `Heading 2` | `<h2>` | 2rem | 300 |
65
+ | `Heading 3` | `<h3>` | 1.75rem | 400 |
66
+ | `Heading 4` | `<h4>` | 1.5rem | 400 |
67
+
68
+ Color inherits from the surrounding text color. No padding, margin, border, or background beyond what the browser/design-system applies to the heading element.
69
+
70
+ **CSS-only implementation notes:**
71
+ ```css
72
+ .text-content-h1 { font-size: 2.5rem; font-weight: 300; }
73
+ .text-content-h2 { font-size: 2rem; font-weight: 300; }
74
+ .text-content-h3 { font-size: 1.75rem; font-weight: 400; }
75
+ .text-content-h4 { font-size: 1.5rem; font-weight: 400; }
76
+ .text-content-body { font-size: 1rem; font-weight: 400; }
77
+ ```
78
+
79
+ ## Edge Cases & Special Logic
80
+
81
+ - Unrecognized `displayAs` values should trigger a `console.error` and fall back to body text.
82
+ - No `handleEvent`, no store interaction, no `useEffect`.
83
+
84
+ ## Dependencies
85
+
86
+ - No event utilities needed
87
+ - No `FieldValueList` needed
88
+ - Only a typography rendering element
89
+
90
+ ## Design System Mapping
91
+
92
+ **UI control type:** Static typography / text block.
93
+
94
+ Listed design systems are examples only.
95
+
96
+ | Design System | Recommended Component |
97
+ |---|---|
98
+ | Default (CSS only) | Native `<h1>`–`<h4>` or `<p>` |
99
+ | MUI | `<Typography variant='h1' \| 'h2' \| 'h3' \| 'h4' \| 'body1'>` |
100
+ | Ant Design | `<Typography.Title level={1-4}>` or `<Typography.Text>` |
101
+ | Chakra UI | `<Heading as='h1'-'h4'>` or `<Text>` |
@@ -0,0 +1,104 @@
1
+ # Skill: TextInput
2
+
3
+ Single-line text input field that binds to a Pega case property.
4
+
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Renders a single-line editable text field. It is the simplest and most foundational field component — used directly for free-text string properties and also delegated to by other components (e.g., `Email`, `URL`, `Date` in read-only mode).
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Pega Name:** `TextInput`
16
+ - **Type / Subtype:** `Field` / `Text`
17
+ - **Registration key:** `TextInput` (in `component-map.ts`)
18
+
19
+ ## Props (component-specific)
20
+
21
+ | Prop | Type | Description |
22
+ |------|------|-------------|
23
+ | `fieldMetadata` | `any` (optional) | Metadata object; used to read `maxLength` for the input |
24
+
25
+ All other props come from `PConnFieldProps`. Import type as:
26
+ ```typescript
27
+ import type { PConnFieldProps } from '@pega/sdk-react';
28
+ ```
29
+
30
+ ## Behavioral Contract
31
+
32
+ 1. **Local state:** Maintain `inputValue` in local state (string). Initialize to `value` prop (`''` default).
33
+ 2. **Sync from store:** `useEffect` watching `value` prop — call `setInputValue(value)` whenever `value` changes.
34
+ 3. **On change:** Update local `inputValue` state only (do NOT commit to store on every keystroke).
35
+ 4. **On blur:** Commit to store by calling `handleEvent(actions, 'changeNblur', propName, inputValue)`.
36
+ 5. **Read-only:** Render input with `readOnly` attribute set; use a visually borderless ("standard") variant. Do NOT skip the blur handler when readOnly — simply omit it (`onBlur={!readOnly ? handleBlur : undefined}`).
37
+ 6. **maxLength:** Read from `fieldMetadata?.maxLength`; pass to the underlying input's `maxLength` attribute.
38
+ 7. **testId:** Pass as `data-test-id` attribute on the underlying `<input>` element.
39
+
40
+ ## Display Mode Rendering
41
+
42
+ - **`DISPLAY_ONLY`:** Render `<FieldValueList name={hideLabel ? '' : label} value={value} />` — display raw string value, no formatting.
43
+ - **`STACKED_LARGE_VAL`:** Render `<FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />`.
44
+ - Both modes use `value` prop directly (not local state).
45
+ - Both modes short-circuit before any interactive rendering.
46
+
47
+ ## Read-Only Rendering
48
+
49
+ Set the `readOnly` attribute on the underlying input element. Use a visually flat/borderless style (no border box). The editable `outlined` variant switches to a `standard` (no outline) variant when read-only.
50
+
51
+ ## Visual Specifications
52
+
53
+ Derived from the reference component's MUI props and styles:
54
+
55
+ | Property | Standard (editable) | Read-only |
56
+ |----------|---------------------|-----------|
57
+ | Width | 100% of container | 100% of container |
58
+ | Height / size | Small (`height ~40px`) | Small |
59
+ | Border | 1px solid (outlined) | None (standard variant) |
60
+ | Border radius | 4px | — |
61
+ | Label | Floating label (above input when focused/filled) | Floating label |
62
+ | Helper text | Shown below input | Shown below input |
63
+ | Error state | Red border + red helper text | — |
64
+ | Disabled | Reduced opacity (~0.38), not-allowed cursor | — |
65
+ | Padding (input) | 8px 14px | — |
66
+ | Font size | 0.875rem (14px) | 0.875rem |
67
+
68
+ **CSS-only implementation notes:**
69
+ - Floating label: use `<label>` positioned absolutely, translate upward on `:focus-within` or when input has value.
70
+ - Error state: add `.error` class → border-color: `#d32f2f`; helper text color: `#d32f2f`.
71
+ - Outlined box shadow on focus: `0 0 0 2px rgba(25, 118, 210, 0.2)`.
72
+
73
+ ## Edge Cases & Special Logic
74
+
75
+ - If `value` prop is `undefined`, default to `''` to keep the input controlled.
76
+ - If `readOnly` is true, the `onBlur` handler must be omitted — do not commit on blur for read-only.
77
+ - `maxLength` is optional; only apply the attribute if `fieldMetadata?.maxLength` is defined.
78
+
79
+ ## Dependencies
80
+
81
+ - `handleEvent` from `../../helpers/event-utils` — for committing value to store.
82
+ - `getComponentFromRegistry('FieldValueList')` — for display modes.
83
+ - No third-party UI libraries required beyond a basic text input element.
84
+
85
+ ## Design System Mapping
86
+
87
+ **UI control type:** Single-line text input (`<input type="text">`).
88
+
89
+ Listed design systems are examples only.
90
+
91
+ | Design System | Recommended Component |
92
+ |---|---|
93
+ | Default (CSS only) | `<input type="text">` with floating label pattern |
94
+ | MUI | `<TextField variant='outlined' size='small' fullWidth />` |
95
+ | Ant Design | `<Input />` |
96
+ | Chakra UI | `<Input />` |
97
+ | Shadcn/ui | `<Input />` |
98
+
99
+ When implementing in a specific design system, map the following behaviors:
100
+ - `error={status === 'error'}` → error/danger variant
101
+ - `helperText` → helper/description slot below the input
102
+ - `label` → field label (floating or static depending on design system)
103
+ - `disabled` → disabled prop
104
+ - `required` → required/asterisk indicator
@@ -0,0 +1,88 @@
1
+ # Skill: Time
2
+
3
+ Time picker field with 5-minute step increments, binds to a Pega case property.
4
+
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Renders a time-only picker. Stores time as `HH:mm:ss` string. Displays time in 12-hour (`hh:mm a`) format. Uses `minutesStep={5}` for the picker. Delegates read-only rendering to `TextInput`.
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Pega Name:** `Time`
16
+ - **Type / Subtype:** `Field` / `Time`
17
+ - **Registration key:** `Time` (in `component-map.ts`)
18
+
19
+ ## Props (component-specific)
20
+
21
+ No props beyond `PConnFieldProps`. Import type as:
22
+ ```typescript
23
+ import type { PConnFieldProps } from '@pega/sdk-react';
24
+ ```
25
+
26
+ ## Behavioral Contract
27
+
28
+ 1. **Value format stored/committed:** `HH:mm:ss` (24-hour, e.g., `'14:30:00'`).
29
+ 2. **Value parsed for display:** Split the `HH:mm:ss` string into `[hours, minutes, seconds]` and construct a time object. Use the date library: `dayjs().hour(hours).minute(minutes)`.
30
+ 3. **Local state:** No explicit local state for the time value — the picker's controlled `value` is derived from `props.value` directly on each render.
31
+ 4. **On change:**
32
+ - If date is valid: `theValue = date.format('HH:mm:ss')`, else `theValue = null`.
33
+ - Commit immediately via `handleEvent(actions, 'changeNblur', propName, theValue)`.
34
+ 5. **Display format:** `'hh:mm a'` (12-hour with am/pm) in the picker UI.
35
+ 6. **Placeholder:** `'hh:mm am'`.
36
+ 7. **Minutes step:** 5 minutes.
37
+ 8. **Read-only:** Delegate to `TextInput`: `return <TextInput {...props} />`.
38
+
39
+ ## Display Mode Rendering
40
+
41
+ - **`DISPLAY_ONLY`:** `<FieldValueList name={hideLabel ? '' : label} value={value} />` — raw time string, no extra formatting.
42
+ - **`STACKED_LARGE_VAL`:** `<FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />`.
43
+
44
+ ## Read-Only Rendering
45
+
46
+ Delegate to `TextInput`: `return <TextInput {...props} />`.
47
+
48
+ ## Visual Specifications
49
+
50
+ | Property | Value |
51
+ |----------|-------|
52
+ | Width | Auto (time picker natural width) |
53
+ | Size | Small |
54
+ | Variant | Outlined |
55
+ | Format | `hh:mm a` (12-hour) |
56
+ | Placeholder | `hh:mm am` |
57
+ | Minutes step | 5 |
58
+ | Error state | Red border + red helper text |
59
+
60
+ **Note on known issue:** Keyboard input in the minute field may jump to the am/pm field after one digit — same as DateTime, this is a known date picker library quirk.
61
+
62
+ ## Edge Cases & Special Logic
63
+
64
+ - **Null/empty value:** When `value` is empty or `Object.keys(value).length === 0`, set `timeValue = null` — do NOT try to parse an empty object.
65
+ - **Value parsing:** Split by `:` and convert each part to a number before constructing the time object.
66
+ - **Commits on change** (picker selection), not on blur.
67
+ - If `date.isValid()` is false (user clears the time), commit `null`.
68
+
69
+ ## Dependencies
70
+
71
+ - Date manipulation library (e.g., `dayjs`) — for time parsing and `format('HH:mm:ss')`.
72
+ - Time picker UI component (e.g., `@mui/x-date-pickers/TimePicker`).
73
+ - `handleEvent` from `../../helpers/event-utils`.
74
+ - `getComponentFromRegistry('TextInput')` for read-only.
75
+ - `getComponentFromRegistry('FieldValueList')` for display modes.
76
+
77
+ ## Design System Mapping
78
+
79
+ **UI control type:** Time picker (clock popup or input with am/pm selector).
80
+
81
+ Listed design systems are examples only.
82
+
83
+ | Design System | Recommended Component |
84
+ |---|---|
85
+ | Default (CSS only) | `<input type="time">` (24h, no am/pm) |
86
+ | MUI | `<TimePicker minutesStep={5} format='hh:mm a' />` |
87
+ | Ant Design | `<TimePicker format="hh:mm a" minuteStep={5} />` |
88
+ | Chakra UI | Third-party time picker |
@@ -0,0 +1,85 @@
1
+ # Skill: URL
2
+
3
+ URL input field with browser-native URL validation, binds to a Pega case property.
4
+
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Renders a single-line text input of type `url`. Provides browser-native URL format validation. Delegates read-only rendering to the `TextInput` component.
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Pega Name:** `URL`
16
+ - **Type / Subtype:** `Field` / `Text-URL`
17
+ - **Registration key:** `URL` (mapped to `URLComponent` in `component-map.ts` — the component export is named `URLComponent` to avoid conflicts with the global `URL` API)
18
+
19
+ ## Props (component-specific)
20
+
21
+ No props beyond `PConnFieldProps`. Import type as:
22
+ ```typescript
23
+ import type { PConnFieldProps } from '@pega/sdk-react';
24
+ ```
25
+
26
+ > **Important naming note:** Export the component as `URLComponent` (not `URL`) to avoid conflicts with the browser's built-in `URL` global. Register it in `component-map.ts` as `URL: URLComponent`.
27
+
28
+ ## Behavioral Contract
29
+
30
+ 1. **Local state:** Maintain `inputValue` (string). Initialize from `value` prop (`''` default).
31
+ 2. **Sync from store:** `useEffect` watching `value` → `setInputValue(value)`.
32
+ 3. **On change:** Update local state only.
33
+ 4. **On blur:** Commit via `handleEvent(actions, 'changeNblur', propName, inputValue)`.
34
+ 5. **Input type:** Use `type='url'` for browser-native URL format hint/validation.
35
+ 6. **Read-only:** Delegate entirely to `TextInput`: `return <TextInput {...props} />`.
36
+
37
+ ## Display Mode Rendering
38
+
39
+ - **`DISPLAY_ONLY`:** `<FieldValueList name={hideLabel ? '' : label} value={value} />` — raw URL string.
40
+ - **`STACKED_LARGE_VAL`:** `<FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />`.
41
+
42
+ ## Read-Only Rendering
43
+
44
+ Delegate to `TextInput`: `return <TextInput {...props} />`.
45
+
46
+ ## Visual Specifications
47
+
48
+ Identical to `TextInput` visually — no additional adornments.
49
+
50
+ | Property | Value |
51
+ |----------|-------|
52
+ | Width | 100% |
53
+ | Size | Small (~40px height) |
54
+ | Variant | Outlined |
55
+ | Border | 1px solid outlined |
56
+ | Border radius | 4px |
57
+ | Error state | Red border + red helper text |
58
+ | Helper text | Below input |
59
+
60
+ No special icon or adornment — the only difference from `TextInput` is `type='url'`.
61
+
62
+ ## Edge Cases & Special Logic
63
+
64
+ - The component is named `URLComponent` internally to avoid shadowing the global `URL` constructor. Register under the key `URL` in the component map.
65
+ - `type='url'` triggers browser tooltip/validation but Pega validation is the authoritative source.
66
+ - `onBlur` is only wired when `!readOnly`.
67
+
68
+ ## Dependencies
69
+
70
+ - `handleEvent` from `../../helpers/event-utils`
71
+ - `getComponentFromRegistry('TextInput')` — for read-only delegation
72
+ - `getComponentFromRegistry('FieldValueList')` — for display modes
73
+
74
+ ## Design System Mapping
75
+
76
+ **UI control type:** Single-line URL text input.
77
+
78
+ Listed design systems are examples only.
79
+
80
+ | Design System | Recommended Component |
81
+ |---|---|
82
+ | Default (CSS only) | `<input type="url">` |
83
+ | MUI | `<TextField type='url' />` |
84
+ | Ant Design | `<Input type="url" />` |
85
+ | Chakra UI | `<Input type="url" />` |
@@ -0,0 +1,180 @@
1
+ # Skill: UserReference
2
+
3
+ User picker field that renders as either a search box (AutoComplete) or a dropdown, populated from the Pega operators data page.
4
+
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Renders a user selection field. Can display as a typeahead search box or a dropdown list of Pega users. Resolves user IDs to display names for read-only and display modes. Optimized with shallow comparison to avoid unnecessary re-renders.
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Pega Name:** `UserReference`
16
+ - **Type / Subtype:** `Field` / `Text-UserReference`
17
+ - **Registration key:** `UserReference` (in `component-map.ts`)
18
+
19
+ ## Props (component-specific)
20
+
21
+ > Extends `PConnProps` (NOT `PConnFieldProps` — field-specific props are defined manually):
22
+
23
+ ```typescript
24
+ import type { PConnProps } from '@pega/sdk-react';
25
+ ```
26
+
27
+ | Prop | Type | Default | Description |
28
+ |------|------|---------|-------------|
29
+ | `displayAs` | `string` (optional) | `''` | `'Drop-down list'` or `'Search box'` — determines the input type |
30
+ | `displayMode` | `string` (optional) | `''` | `'DISPLAY_ONLY'` or `'STACKED_LARGE_VAL'` |
31
+ | `label` | `string` (optional) | `''` | Field label |
32
+ | `value` | `any` (optional) | `''` | Raw value from Pega store (may be a user object or string ID) |
33
+ | `testId` | `string` (optional) | `''` | Test identifier |
34
+ | `placeholder` | `string` (optional) | `''` | Placeholder text |
35
+ | `helperText` | `string` (optional) | `''` | Helper text |
36
+ | `disabled` | `boolean` (optional) | `false` | |
37
+ | `readOnly` | `boolean` (optional) | `false` | |
38
+ | `required` | `boolean` (optional) | `false` | |
39
+ | `validatemessage` | `string` (optional) | `''` | Validation error message |
40
+ | `showAsFormattedText` | `boolean` (optional) | `false` | When `true` in read-only mode, show formatted user name text |
41
+ | `additionalProps` | `object` (optional) | `{}` | Extra props forwarded to the child component |
42
+ | `hideLabel` | `boolean` (optional) | `false` | |
43
+ | `variant` | `string` (optional) | `'inline'` | Layout variant |
44
+ | `onChange` | `any` (optional) | — | Change handler (passed through to child) |
45
+
46
+ ## Behavioral Contract
47
+
48
+ ### User ID extraction
49
+
50
+ `getUserId(value)` — utility that extracts the user identifier from the value (which may be a plain string or a user object with an ID property).
51
+
52
+ ### State
53
+
54
+ - `dropDownDataSource` (array): populated when `displayAs === 'Drop-down list'`
55
+ - `userName` (string): resolved display name for formatted text mode
56
+
57
+ ### Mount effect: `useEffect([displayAs, readOnly, showAsFormattedText, value])`
58
+
59
+ **Case 1: `userId && readOnly && showAsFormattedText`**
60
+ - If `isUserNameAvailable(value)`: `setUserName(value.userName)` — username already in value object
61
+ - Else: call `PCore.getUserApi().getOperatorDetails(userId)` and extract `pyUserName` from response
62
+
63
+ **Case 2: `displayAs === 'Drop-down list'`**
64
+ - Call `PCore.getRestClient().invokeRestApi('getListData', { queryPayload: { dataViewName: OPERATORS_DP } })`
65
+ - Map results to `{key: pyUserIdentifier, value: pyUserName}` array
66
+ - `setDropDownDataSource(mapped)`
67
+
68
+ `OPERATORS_DP = PCore.getEnvironmentInfo().getDefaultOperatorDP()` — the default operators data page name.
69
+
70
+ ### Rendering decision tree
71
+
72
+ ```
73
+ if displayMode === 'DISPLAY_ONLY' → FieldValueList(userName || '')
74
+ if displayMode === 'STACKED_LARGE_VAL' → FieldValueList(userName || '', variant='stacked')
75
+ if readOnly && showAsFormattedText && userId → formatted text label+body
76
+ else if displayAs === 'Search box' → AutoComplete component
77
+ else if displayAs === 'Drop-down list' → Dropdown component
78
+ ```
79
+
80
+ ### Subsection: Search box mode (`displayAs === 'Search box'`)
81
+
82
+ Render `AutoComplete` with hardcoded columns for operator search:
83
+ ```typescript
84
+ columns = [
85
+ { value: 'pyUserName', display: 'true', useForSearch: true, primary: 'true' },
86
+ { value: 'pyUserIdentifier', setProperty: 'Associated property', key: 'true', display: 'true', secondary: 'true', useForSearch: 'true' }
87
+ ]
88
+ ```
89
+ Props: `datasource={OPERATORS_DP}`, `listType='datapage'`, `value={userId}`, plus label/placeholder/readOnly/disabled/required/helperText/validatemessage/hideLabel/onChange/additionalProps/testId.
90
+
91
+ ### Subsection: Dropdown mode (`displayAs === 'Drop-down list'`)
92
+
93
+ Render `Dropdown` with:
94
+ - `datasource={dropDownDataSource}` (fetched user list)
95
+ - `listType='associated'`
96
+ - `value={userId}`
97
+ - Plus same field props as above
98
+
99
+ ### Subsection: Formatted text read-only (`readOnly && showAsFormattedText && userId`)
100
+
101
+ Render a label + name display:
102
+ ```html
103
+ <div>
104
+ <caption-text>{label}</caption-text>
105
+ <body-text>{userName}</body-text>
106
+ </div>
107
+ ```
108
+
109
+ ### Re-render optimization
110
+
111
+ Export with `memo` using custom comparison `comparisonFn`:
112
+ ```typescript
113
+ const comparisonFn = (prevProps, nextProps) =>
114
+ getUserId(prevProps.value) === getUserId(nextProps.value) &&
115
+ prevProps.validatemessage === nextProps.validatemessage &&
116
+ prevProps.required === nextProps.required &&
117
+ prevProps.disabled === nextProps.disabled &&
118
+ prevProps.readOnly === nextProps.readOnly
119
+ ```
120
+
121
+ `export default memo(UserReference, comparisonFn)`
122
+
123
+ ## Display Mode Rendering
124
+
125
+ Uses resolved `userName` (not raw `value`):
126
+ - **`DISPLAY_ONLY`:** `<FieldValueList name={hideLabel ? '' : label} value={userName || ''} />`
127
+ - **`STACKED_LARGE_VAL`:** `<FieldValueList name={hideLabel ? '' : label} value={userName || ''} variant='stacked' />`
128
+
129
+ `userName` may still be empty string while the async `getOperatorDetails` call resolves — this is expected.
130
+
131
+ ## Visual Specifications
132
+
133
+ The visual appearance is determined by the child component rendered:
134
+ - **Search box**: Same as `AutoComplete` — combobox input with outlined border, floating label
135
+ - **Dropdown**: Same as `Dropdown` — select field with outlined border, floating label
136
+ - **Formatted text read-only**:
137
+
138
+ | Property | Value |
139
+ |----------|-------|
140
+ | Label | Caption-size text (small, secondary color) above the name |
141
+ | Name | Body text (normal size) |
142
+ | Spacing | Standard form field spacing |
143
+
144
+ **CSS-only for formatted text:**
145
+ ```css
146
+ .user-reference-label { font-size: 0.75rem; color: rgba(0,0,0,0.6); margin-bottom: 4px; }
147
+ .user-reference-name { font-size: 1rem; }
148
+ ```
149
+
150
+ ## Edge Cases & Special Logic
151
+
152
+ - **`getUserId`**: handles both plain string values and object values with an ID property.
153
+ - **`isUserNameAvailable`**: checks whether the value object already contains a `userName` property (avoiding unnecessary API call).
154
+ - **Async name resolution**: when `userName` is not available in the value object, a REST call is made. The component renders empty initially and updates when the call completes.
155
+ - **Drop-down source**: Users are fetched via REST API (`getListData`), not via a data page config — this is different from `AutoComplete`/`Dropdown` field patterns.
156
+ - **`onChange` prop** is passed through to the child component unchanged — it's the platform-wired handler.
157
+
158
+ ## Dependencies
159
+
160
+ - `memo` from React.
161
+ - `getUserId`, `isUserNameAvailable` from `./UserReferenceUtils` (local utility).
162
+ - `getComponentFromRegistry('AutoComplete')` — for search box mode.
163
+ - `getComponentFromRegistry('Dropdown')` — for dropdown mode.
164
+ - `getComponentFromRegistry('FieldValueList')` — for display modes.
165
+ - `PCore.getUserApi().getOperatorDetails()` — for async user name resolution.
166
+ - `PCore.getRestClient().invokeRestApi('getListData', ...)` — for dropdown data source.
167
+ - `PCore.getEnvironmentInfo().getDefaultOperatorDP()` — for operators data page name.
168
+
169
+ ## Design System Mapping
170
+
171
+ **UI control type:** User picker — delegates to AutoComplete or Dropdown for the actual input.
172
+
173
+ Listed design systems are examples only.
174
+
175
+ | Mode | Underlying control |
176
+ |------|--------------------|
177
+ | Search box | AutoComplete (combobox/typeahead) |
178
+ | Drop-down list | Dropdown (select) |
179
+ | Formatted text read-only | Label + text display |
180
+ | Display mode | FieldValueList |