@pega/sdk 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/index.js +764 -165
- package/package.json +1 -1
- package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
- package/templates/react-native-sdk-reference/.prettierignore +17 -0
- package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
- package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
- package/templates/react-native-sdk-reference/AGENTS.md +3 -0
- package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
- package/templates/react-native-sdk-reference/README.md +56 -0
- package/templates/react-native-sdk-reference/app.json +40 -5
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
- package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
- package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
- package/templates/react-native-sdk-reference/package.json +59 -14
- package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/sdk-config.json +31 -9
- package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
- package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
- package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
- package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
- package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
- package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
- package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
- package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
- package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
- package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
- package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
- package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
- package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
- package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
- package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
- package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
- package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
- package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
- package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
- package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
- package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
- package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
- package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
- package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
- package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
- package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
- package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
- package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
- package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
- package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
- package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
- package/templates/react-native-sdk-reference/tsconfig.json +9 -8
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
- package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
- package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
- package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
- package/templates/react-sdk-reference/package.json +1 -1
- package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
- package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
- package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
- package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
- package/templates/react-native-sdk-reference/App.tsx +0 -49
- package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
- package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
|
@@ -1,219 +1,115 @@
|
|
|
1
1
|
# Skill: Field Components
|
|
2
2
|
|
|
3
|
-
Create or replace field components (form inputs) in the
|
|
3
|
+
Create or replace field components (form inputs) in the project. Field components render individual form controls that bind to Pega case properties.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Architecture Overview
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
src/components/field/<ComponentName>/
|
|
11
|
-
├── <ComponentName>.tsx # Component implementation
|
|
12
|
-
├── index.tsx # Re-export: export { default } from './<ComponentName>'
|
|
13
|
-
└── config-ext.json # Metadata (name, label, description, type, subtype)
|
|
14
|
-
```
|
|
9
|
+
Each field component lives in its own folder under the project's field components directory, named after the component. The folder contains:
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
| File | Purpose |
|
|
12
|
+
| ---------------------------- | --------------------------------------------------------------- |
|
|
13
|
+
| Component implementation | The component's logic and markup |
|
|
14
|
+
| Re-export module | Re-exports the component as the folder's default export |
|
|
15
|
+
| Metadata (`config-ext.json`) | Registration metadata (name, label, description, type, subtype) |
|
|
16
|
+
|
|
17
|
+
Components are registered in the project's component map and resolved at runtime via the project's component registry.
|
|
17
18
|
|
|
18
19
|
---
|
|
19
20
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
All field components extend `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
interface PConnProps {
|
|
45
|
-
getPConnect: () => typeof PConnect; // Returns the PConnect API object
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Extend `PConnFieldProps` for component-specific additional props:
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
interface MyFieldProps extends PConnFieldProps {
|
|
53
|
-
fieldMetadata?: any;
|
|
54
|
-
maxLength?: number;
|
|
55
|
-
}
|
|
56
|
-
```
|
|
21
|
+
## Input Contract
|
|
22
|
+
|
|
23
|
+
All field components extend the project's **field input contract**. The field input contract itself extends a **base component interface**, which provides a single `getPConnect` accessor function (returns the PConnect API object).
|
|
24
|
+
|
|
25
|
+
The field input contract defines these fields:
|
|
26
|
+
|
|
27
|
+
| Field | Type | Description |
|
|
28
|
+
| ----------------- | ------------------- | ------------------------------------------------------ |
|
|
29
|
+
| `label` | `string` | Field label text |
|
|
30
|
+
| `required` | `boolean` | Whether the field is required |
|
|
31
|
+
| `disabled` | `boolean` | Whether the field is disabled |
|
|
32
|
+
| `value` | `string` (optional) | Current field value from the store |
|
|
33
|
+
| `validatemessage` | `string` | Validation error message |
|
|
34
|
+
| `status` | `string` (optional) | `'error'` \| `'warning'` \| undefined |
|
|
35
|
+
| `onChange` | `any` | Change handler (wired by platform) |
|
|
36
|
+
| `onBlur` | `any` (optional) | Blur handler (wired by platform) |
|
|
37
|
+
| `readOnly` | `boolean` | Whether the field is read-only |
|
|
38
|
+
| `testId` | `string` | Test identifier for automation |
|
|
39
|
+
| `helperText` | `string` | Helper/hint text below the field |
|
|
40
|
+
| `displayMode` | `string` (optional) | `'DISPLAY_ONLY'` \| `'STACKED_LARGE_VAL'` \| undefined |
|
|
41
|
+
| `hideLabel` | `boolean` | Whether to hide the label |
|
|
42
|
+
| `placeholder` | `string` (optional) | Placeholder text |
|
|
43
|
+
|
|
44
|
+
Extend the field input contract for component-specific additional inputs (e.g., a component that needs `fieldMetadata` and `maxLength` would extend the field input contract with those two additional optional fields).
|
|
57
45
|
|
|
58
46
|
---
|
|
59
47
|
|
|
60
48
|
## Implementation Pattern
|
|
61
49
|
|
|
62
|
-
### Abstract Field Component
|
|
63
|
-
|
|
64
|
-
This
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const {
|
|
84
|
-
getPConnect,
|
|
85
|
-
label,
|
|
86
|
-
required,
|
|
87
|
-
disabled,
|
|
88
|
-
value = '',
|
|
89
|
-
validatemessage,
|
|
90
|
-
status,
|
|
91
|
-
readOnly,
|
|
92
|
-
testId,
|
|
93
|
-
helperText,
|
|
94
|
-
displayMode,
|
|
95
|
-
hideLabel,
|
|
96
|
-
placeholder
|
|
97
|
-
} = props;
|
|
98
|
-
|
|
99
|
-
const pConn = getPConnect();
|
|
100
|
-
const actions = pConn.getActionsApi();
|
|
101
|
-
const propName = (pConn.getStateProps() as any).value;
|
|
102
|
-
const helperTextToDisplay = validatemessage || helperText;
|
|
103
|
-
|
|
104
|
-
// 1. Track input value locally — do NOT commit on every keystroke
|
|
105
|
-
const [inputValue, setInputValue] = useState(value);
|
|
106
|
-
|
|
107
|
-
// 2. Sync local state when the store value changes
|
|
108
|
-
useEffect(() => {
|
|
109
|
-
setInputValue(value);
|
|
110
|
-
}, [value]);
|
|
111
|
-
|
|
112
|
-
// 3. Display modes — must short-circuit before any interactive rendering
|
|
113
|
-
if (displayMode === 'DISPLAY_ONLY') {
|
|
114
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
118
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// 4. Event handlers
|
|
122
|
-
function handleChange(newValue: string) {
|
|
123
|
-
setInputValue(newValue); // update local state only
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function handleBlur() {
|
|
127
|
-
handleEvent(actions, 'changeNblur', propName, inputValue); // commit to Pega store
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// 5. [DS RENDER] — replace with your design system's input primitive
|
|
131
|
-
// Refer to "Design System Adaptation" below for prop mapping guidance
|
|
132
|
-
return (
|
|
133
|
-
<YourDesignSystemInput
|
|
134
|
-
value={inputValue}
|
|
135
|
-
onChange={handleChange}
|
|
136
|
-
onBlur={!readOnly ? handleBlur : undefined}
|
|
137
|
-
disabled={disabled}
|
|
138
|
-
readOnly={readOnly}
|
|
139
|
-
required={required}
|
|
140
|
-
placeholder={placeholder}
|
|
141
|
-
label={label}
|
|
142
|
-
helperText={helperTextToDisplay}
|
|
143
|
-
isInvalid={status === 'error'}
|
|
144
|
-
data-test-id={testId}
|
|
145
|
-
/>
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
```
|
|
50
|
+
### Abstract Field Component Pattern
|
|
51
|
+
|
|
52
|
+
This pattern is design-system agnostic. It defines the **behavioral skeleton** every field component must follow. The final render step must be adapted to your design system's input primitive — see the "Design System Adaptation" section below for guidance.
|
|
53
|
+
|
|
54
|
+
**Module Setup:** The component depends on the project's event-commit utility (for committing value changes to the Pega store) and the project's component registry (for resolving the display-mode renderer). Define the input contract as an extension of the project's field input contract with any component-specific additional inputs. Export the component as the module's default export.
|
|
55
|
+
|
|
56
|
+
**Main Component Logic** — the component follows these steps in order:
|
|
57
|
+
|
|
58
|
+
1. **Registry lookup** — resolve `FieldValueList` via the project's component registry to get the display-mode renderer.
|
|
59
|
+
2. **Receive inputs** — extract `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`, plus any component-specific inputs.
|
|
60
|
+
3. **PConnect setup** — call `getPConnect()` to get `pConn`; get `actions` via `pConn.getActionsApi()`; get `propName` via `(pConn.getStateProps() as any).value`; compute `helperTextToDisplay = validatemessage || helperText`.
|
|
61
|
+
4. **Track input value locally** — maintain local state initialized to `value`. Do NOT commit to the store on every keystroke.
|
|
62
|
+
5. **Sync local state from the store** — use a lifecycle effect watching `value` to update the local state whenever the store value changes.
|
|
63
|
+
6. **Display mode short-circuits** — these must be checked before any interactive rendering:
|
|
64
|
+
- If `displayMode === 'DISPLAY_ONLY'`: return `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value`.
|
|
65
|
+
- If `displayMode === 'STACKED_LARGE_VAL'`: return the same but with a stacked layout variant.
|
|
66
|
+
7. **Event handlers:**
|
|
67
|
+
- The change handler — updates local state only (no store commit).
|
|
68
|
+
- The blur handler — invokes the project's event-commit utility with event type `'changeNblur'`, the property name, and the local value to commit to the Pega store.
|
|
69
|
+
8. **Render** — render the design system's input primitive with these inputs wired: `value` (local state), the change handler, the blur handler (only when not read-only), `disabled`, `readOnly`, `required`, `placeholder`, `label`, `helperText` (the computed display text), an error/invalid flag driven by `status === 'error'`, and a test-id attribute driven by `testId`.
|
|
149
70
|
|
|
150
71
|
---
|
|
151
72
|
|
|
152
73
|
## Design System Adaptation
|
|
153
74
|
|
|
154
|
-
When
|
|
155
|
-
|
|
156
|
-
**1. Check the component-specific skill file** — `{{SKILL_DIR}}/field-skills/<ComponentName>.md` contains a **Design System Mapping** table that lists the recommended DS component for common design systems. Use it as a starting point.
|
|
75
|
+
When implementing the render section with a specific design system:
|
|
157
76
|
|
|
158
|
-
**
|
|
77
|
+
**1. Check the component-specific skill file** — `{{SKILL_DIR}}/field-skills/<ComponentName>.md` contains a **Design System Mapping** section that describes how to map the component's behavior to a DS primitive. Use it as a starting point.
|
|
159
78
|
|
|
160
|
-
**
|
|
79
|
+
**2. If the chosen design system is not covered** — use the **UI control type** field in the same skill file (e.g., `"Combobox / typeahead autocomplete input"`) to identify the closest DS primitive.
|
|
161
80
|
|
|
162
|
-
|
|
163
|
-
find node_modules/<ds-package> -name "ComponentName.d.ts" | head -3
|
|
164
|
-
grep -A 40 "interface.*Props" <path-to-file>
|
|
165
|
-
```
|
|
81
|
+
**3. Discover the API from installed packages** — before writing the render markup, confirm all input names from the design system's type declarations. Never rely on training-knowledge of a DS API. Search the design system package's type declaration files for the target component name, then read the exported input interface to confirm exact input names and types.
|
|
166
82
|
|
|
167
|
-
**4.
|
|
83
|
+
**4. Input mapping conventions** — adapt these Pega/SDK inputs to whatever the DS component calls them:
|
|
168
84
|
|
|
169
|
-
| Pega/SDK
|
|
170
|
-
| --------------------------------- | ----------------------------- |
|
|
171
|
-
| `status === 'error'` | Validation error state | `error`, `status="error"`, `invalid`, `isInvalid`
|
|
172
|
-
| `validatemessage \|\| helperText` | Helper/error text below field | `helperText`, `description`, `hint`, `extra`
|
|
173
|
-
| `readOnly` | Non-editable, still visible | `readOnly`, `isReadOnly`, `variant="borderless"`
|
|
174
|
-
| `testId` | Automation selector |
|
|
175
|
-
| `required` | Required field marker | `required`, `isRequired`
|
|
176
|
-
| `hideLabel` | Suppress label display | Pass empty string `''` as label
|
|
85
|
+
| Pega/SDK input | Meaning | Typical DS equivalent |
|
|
86
|
+
| --------------------------------- | ----------------------------- | --------------------------------------------------- |
|
|
87
|
+
| `status === 'error'` | Validation error state | `error`, `status="error"`, `invalid`, `isInvalid` |
|
|
88
|
+
| `validatemessage \|\| helperText` | Helper/error text below field | `helperText`, `description`, `hint`, `extra` |
|
|
89
|
+
| `readOnly` | Non-editable, still visible | `readOnly`, `isReadOnly`, `variant="borderless"` |
|
|
90
|
+
| `testId` | Automation selector | A test-id attribute on the underlying input element |
|
|
91
|
+
| `required` | Required field marker | `required`, `isRequired` |
|
|
92
|
+
| `hideLabel` | Suppress label display | Pass empty string `''` as label |
|
|
177
93
|
|
|
178
|
-
**5. Use a form layout wrapper** — if the DS provides a wrapper that combines label + input + helper text (e.g.,
|
|
94
|
+
**5. Use a form layout wrapper** — if the DS provides a wrapper that combines label + input + helper text (e.g., a form-item or form-control component), use it rather than composing them manually.
|
|
179
95
|
|
|
180
96
|
---
|
|
181
97
|
|
|
182
98
|
## Event Handling
|
|
183
99
|
|
|
184
|
-
> ⚠️ **CRITICAL — DO NOT DUPLICATE IMPORTS FROM
|
|
100
|
+
> ⚠️ **CRITICAL — DO NOT DUPLICATE IMPORTS FROM FIELD UTILITIES**
|
|
185
101
|
>
|
|
186
|
-
> If the project has a
|
|
102
|
+
> If the project has a field-utilities module that exports utility functions AND types (e.g., field input types, commit helpers, value getters, context helpers, option-list helpers), import everything you need in a **single import statement**. NEVER add a separate type-only import for a symbol that is already imported from the same module — doing so causes a duplicate identifier error.
|
|
187
103
|
>
|
|
188
|
-
>
|
|
189
|
-
> // ✅ CORRECT — one import for both types and functions
|
|
190
|
-
> import { commitField, DynamicFieldProps, FieldValue, getFieldContext, helperText } from '../field-utils';
|
|
191
|
-
>
|
|
192
|
-
> // ❌ WRONG — duplicate identifier error!
|
|
193
|
-
> import type { DynamicFieldProps } from '../field-utils';
|
|
194
|
-
> import { commitField, DynamicFieldProps, FieldValue, getFieldContext } from '../field-utils';
|
|
195
|
-
> ```
|
|
196
|
-
>
|
|
197
|
-
> TypeScript allows mixing type and value exports in a single import. NEVER add a separate `import type` line for a symbol that is already imported in another import from the same module.
|
|
198
|
-
>
|
|
199
|
-
> **Before writing imports:** Check what `field-utils` exports. If it exports `DynamicFieldProps` as a `type`, you can import it alongside value exports in one statement.
|
|
200
|
-
|
|
201
|
-
Use `src/components/helpers/event-utils.ts` to commit values to the Pega store:
|
|
202
|
-
|
|
203
|
-
```typescript
|
|
204
|
-
import handleEvent from '../../helpers/event-utils';
|
|
104
|
+
> **Before writing imports:** Check what the field-utilities module exports. If it exports a type, you can import it alongside value exports in one statement.
|
|
205
105
|
|
|
206
|
-
|
|
207
|
-
const actions = pConn.getActionsApi();
|
|
208
|
-
const propName = (pConn.getStateProps() as any).value;
|
|
106
|
+
Use the project's event-commit utility to commit values to the Pega store. Obtain the two references it needs: `actions` via `pConn.getActionsApi()` and `propName` via `(pConn.getStateProps() as any).value`. Then invoke the utility with one of three event types:
|
|
209
107
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
handleEvent(actions, 'changeNblur', propName, value); // Update + validate (most common)
|
|
214
|
-
```
|
|
108
|
+
- `'change'` — update store only.
|
|
109
|
+
- `'blur'` — trigger validation only.
|
|
110
|
+
- `'changeNblur'` — update and validate (most common).
|
|
215
111
|
|
|
216
|
-
**Pattern:** Track local state
|
|
112
|
+
**Pattern:** Track local state, update on user input, then call the event-commit utility on blur to commit.
|
|
217
113
|
|
|
218
114
|
---
|
|
219
115
|
|
|
@@ -221,26 +117,19 @@ handleEvent(actions, 'changeNblur', propName, value); // Update + validate (most
|
|
|
221
117
|
|
|
222
118
|
Every field component MUST handle these `displayMode` values:
|
|
223
119
|
|
|
224
|
-
| Mode | Behavior
|
|
225
|
-
| --------------------- |
|
|
226
|
-
| `undefined` / `null` | Render editable form control
|
|
227
|
-
| `'DISPLAY_ONLY'` | Render read-only via `FieldValueList` (inline layout)
|
|
228
|
-
| `'STACKED_LARGE_VAL'` | Render read-only via `FieldValueList` with
|
|
120
|
+
| Mode | Behavior |
|
|
121
|
+
| --------------------- | ------------------------------------------------------------------- |
|
|
122
|
+
| `undefined` / `null` | Render editable form control |
|
|
123
|
+
| `'DISPLAY_ONLY'` | Render read-only via `FieldValueList` (inline layout) |
|
|
124
|
+
| `'STACKED_LARGE_VAL'` | Render read-only via `FieldValueList` with a stacked layout variant |
|
|
229
125
|
|
|
230
|
-
|
|
126
|
+
Resolve the `FieldValueList` component via the project's component registry.
|
|
231
127
|
|
|
232
128
|
---
|
|
233
129
|
|
|
234
130
|
## Resolving Other Components
|
|
235
131
|
|
|
236
|
-
Use
|
|
237
|
-
|
|
238
|
-
```typescript
|
|
239
|
-
import { getComponentFromRegistry } from '@pega/sdk-react';
|
|
240
|
-
|
|
241
|
-
const FieldValueList = getComponentFromRegistry('FieldValueList');
|
|
242
|
-
const TextInput = getComponentFromRegistry('TextInput');
|
|
243
|
-
```
|
|
132
|
+
Use the project's component registry to resolve components by name at runtime — for example, resolving `'FieldValueList'` or `'TextInput'` returns the currently-registered component for that name (including any override).
|
|
244
133
|
|
|
245
134
|
This is used when:
|
|
246
135
|
|
|
@@ -251,62 +140,51 @@ This is used when:
|
|
|
251
140
|
|
|
252
141
|
## Registration
|
|
253
142
|
|
|
254
|
-
After creating a component, register it in
|
|
255
|
-
|
|
256
|
-
```typescript
|
|
257
|
-
import MyField from './field/MyField';
|
|
258
|
-
|
|
259
|
-
// In the getSampleComponentMap() return object:
|
|
260
|
-
{
|
|
261
|
-
...sdkComponents,
|
|
262
|
-
// ... other fields ...
|
|
263
|
-
MyField, // Key must match the Pega component name exactly
|
|
264
|
-
}
|
|
265
|
-
```
|
|
143
|
+
After creating a component, register it in the project's component map: import the component's default export from its folder under the field components directory, then add it to the object returned by the project's component registration function. The key used must match the Pega component name exactly.
|
|
266
144
|
|
|
267
145
|
---
|
|
268
146
|
|
|
269
147
|
## Existing Field Components
|
|
270
148
|
|
|
271
|
-
| Component | Pega Name | Description
|
|
272
|
-
| --------------- | --------------- |
|
|
273
|
-
| AutoComplete | AutoComplete | Typeahead search field
|
|
274
|
-
| CancelAlert | CancelAlert | Cancel confirmation dialog
|
|
275
|
-
| Checkbox | Checkbox | Single checkbox with label
|
|
276
|
-
| Currency | Currency | Currency input with formatting
|
|
277
|
-
| Date | Date | Date picker
|
|
278
|
-
| DateTime | DateTime | Date + time picker
|
|
279
|
-
| Decimal | Decimal | Decimal number input
|
|
280
|
-
| Dropdown | Dropdown | Select/dropdown with options
|
|
281
|
-
| Email | Email | Email input with icon
|
|
282
|
-
| Group | Group | Field group container
|
|
283
|
-
| Integer | Integer | Integer-only input
|
|
284
|
-
| Location | Location | Google Maps location picker
|
|
285
|
-
| Multiselect | Multiselect | Multi-select dropdown
|
|
286
|
-
| ObjectReference | ObjectReference | Reference to another object
|
|
287
|
-
| Percentage | Percentage | Percentage input
|
|
288
|
-
| Phone | Phone | Phone input
|
|
289
|
-
| RadioButtons | RadioButtons | Radio button group
|
|
290
|
-
| RichText | RichText | Rich text editor
|
|
291
|
-
| ScalarList | ScalarList | List of scalar values
|
|
292
|
-
| SelectableCard | SelectableCard | Card-style selection
|
|
293
|
-
| SemanticLink | SemanticLink | Clickable link to another case
|
|
294
|
-
| TextArea | TextArea | Multi-line text input
|
|
295
|
-
| TextContent | TextContent | Static text display
|
|
296
|
-
| TextInput | TextInput | Single-line text input
|
|
297
|
-
| Time | Time | Time picker
|
|
298
|
-
| URL | URL | URL input with validation
|
|
299
|
-
| UserReference | UserReference | User picker
|
|
149
|
+
| Component | Pega Name | Description |
|
|
150
|
+
| --------------- | --------------- | --------------------------------- |
|
|
151
|
+
| AutoComplete | AutoComplete | Typeahead search field |
|
|
152
|
+
| CancelAlert | CancelAlert | Cancel confirmation dialog |
|
|
153
|
+
| Checkbox | Checkbox | Single checkbox with label |
|
|
154
|
+
| Currency | Currency | Currency input with formatting |
|
|
155
|
+
| Date | Date | Date picker |
|
|
156
|
+
| DateTime | DateTime | Date + time picker |
|
|
157
|
+
| Decimal | Decimal | Decimal number input |
|
|
158
|
+
| Dropdown | Dropdown | Select/dropdown with options |
|
|
159
|
+
| Email | Email | Email input with icon |
|
|
160
|
+
| Group | Group | Field group container |
|
|
161
|
+
| Integer | Integer | Integer-only input |
|
|
162
|
+
| Location | Location | Google Maps location picker |
|
|
163
|
+
| Multiselect | Multiselect | Multi-select dropdown |
|
|
164
|
+
| ObjectReference | ObjectReference | Reference to another object |
|
|
165
|
+
| Percentage | Percentage | Percentage input |
|
|
166
|
+
| Phone | Phone | Phone input with country selector |
|
|
167
|
+
| RadioButtons | RadioButtons | Radio button group |
|
|
168
|
+
| RichText | RichText | Rich text editor |
|
|
169
|
+
| ScalarList | ScalarList | List of scalar values |
|
|
170
|
+
| SelectableCard | SelectableCard | Card-style selection |
|
|
171
|
+
| SemanticLink | SemanticLink | Clickable link to another case |
|
|
172
|
+
| TextArea | TextArea | Multi-line text input |
|
|
173
|
+
| TextContent | TextContent | Static text display |
|
|
174
|
+
| TextInput | TextInput | Single-line text input |
|
|
175
|
+
| Time | Time | Time picker |
|
|
176
|
+
| URL | URL | URL input with validation |
|
|
177
|
+
| UserReference | UserReference | User picker |
|
|
300
178
|
|
|
301
179
|
---
|
|
302
180
|
|
|
303
181
|
## Key Conventions
|
|
304
182
|
|
|
305
|
-
1. **Default export** — Each component
|
|
306
|
-
2. **
|
|
307
|
-
3. **Local state** — Track input value locally, sync from `value`
|
|
308
|
-
4. **Commit on blur** — Use
|
|
309
|
-
5. **Error display** — Show `validatemessage` or `helperText` below the field;
|
|
310
|
-
6. **Read-only** — Set
|
|
311
|
-
7. **Test IDs** — Pass
|
|
312
|
-
8. **No PCore imports** — Access PCore globals directly (they're declared globally by
|
|
183
|
+
1. **Default export** — Each component is exported as the module's default export.
|
|
184
|
+
2. **Re-export module** — A re-export file in the folder exports the component as the folder's default.
|
|
185
|
+
3. **Local state** — Track input value locally, sync from the `value` input via a lifecycle effect.
|
|
186
|
+
4. **Commit on blur** — Use the project's event-commit utility with event type `'changeNblur'` on blur, not on every keystroke.
|
|
187
|
+
5. **Error display** — Show `validatemessage` or `helperText` below the field; apply an error visual state when `status === 'error'`.
|
|
188
|
+
6. **Read-only** — Set the read-only attribute on the input element or render a display-only component.
|
|
189
|
+
7. **Test IDs** — Pass a test-id attribute driven by `testId` to the underlying input element.
|
|
190
|
+
8. **No PCore imports** — Access PCore globals directly (they're declared globally by the Pega runtime type definitions).
|