@pega/sdk 0.0.4 → 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 +977 -92
- package/package.json +1 -1
- package/templates/angular-sdk-reference/package.json +12 -12
- package/templates/angular-sdk-reference/tsconfig.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/{.github/agents/implementation-expert.agent.md → .ai-common/agents/implementation-expert.md} +44 -48
- 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 +192 -0
- package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +35 -0
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +47 -0
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +50 -0
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +43 -0
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +45 -0
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +193 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/prompts/component-manifest.json +106 -2
- 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 +358 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +165 -0
- 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 +190 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +227 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +172 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/prompts/identify-components.md +4 -0
- package/templates/react-sdk-reference/{.cursor/rules/prompts/replace-design-system.mdrules → .ai-common/prompts/replace-design-system.md} +2 -3
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/AlertBanner.md +61 -25
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +176 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +180 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +180 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +153 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +136 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +140 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/Operator.md +85 -41
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +97 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +226 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/WssQuickCreate.md +35 -20
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +169 -0
- 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 +190 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +157 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +178 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +189 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +136 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +126 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +115 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +119 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +136 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +99 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +88 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +102 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +142 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Multiselect.md +42 -53
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/ObjectReference.md +36 -60
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +113 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +100 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +153 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +117 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +95 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +155 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/SemanticLink.md +35 -57
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +109 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/TextContent.md +27 -52
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +112 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +102 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +96 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/UserReference.md +41 -78
- 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 +198 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +126 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +160 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +90 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +129 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +196 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +157 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +149 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DataReference.md +46 -31
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +141 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/DefaultPage.md +40 -34
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +96 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +103 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +85 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +77 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +103 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +130 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +200 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +110 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +105 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/ListPage.md +21 -16
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +234 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/MultiReferenceReadOnly.md +18 -23
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +161 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +114 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +132 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +173 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/SimpleTable.md +44 -24
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +103 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +89 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +133 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/WideNarrow.md +36 -43
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/WssNavBar.md +26 -45
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +124 -0
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +94 -0
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +163 -0
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +90 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/widget-skills/FileUtility.md +68 -62
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/Followers.md +24 -19
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/QuickCreate.md +27 -44
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/SummaryItem.md +35 -61
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +261 -0
- package/templates/react-sdk-reference/package.json +1 -1
- package/templates/react-sdk-reference/package.minimal.json +29 -0
- 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/AppProviders.tsx +17 -0
- package/templates/react-sdk-reference/src/MashupApp.tsx +8 -19
- package/templates/react-sdk-reference/src/PortalApp.tsx +6 -17
- 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-sdk-reference/.claude/instructions/component-map.md +0 -38
- package/templates/react-sdk-reference/.claude/instructions/dse-component.md +0 -75
- package/templates/react-sdk-reference/.claude/instructions/field-component.md +0 -75
- package/templates/react-sdk-reference/.claude/instructions/template-component.md +0 -93
- package/templates/react-sdk-reference/.claude/instructions/widget-component.md +0 -88
- package/templates/react-sdk-reference/.claude/prompts/add-component.md +0 -152
- package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +0 -158
- package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +0 -140
- package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +0 -153
- package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +0 -165
- package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +0 -138
- package/templates/react-sdk-reference/.claude/prompts/replace-design-system.md +0 -519
- package/templates/react-sdk-reference/.claude/skills/component-contracts.md +0 -140
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +0 -137
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Banner.md +0 -152
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/CaseSummaryFields.md +0 -159
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/DetailsFields.md +0 -148
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroupList.md +0 -113
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +0 -118
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +0 -85
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +0 -232
- package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +0 -291
- package/templates/react-sdk-reference/.claude/skills/field-components.md +0 -295
- package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +0 -113
- package/templates/react-sdk-reference/.claude/skills/field-skills/CancelAlert.md +0 -211
- package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +0 -175
- package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +0 -101
- package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/field-skills/Decimal.md +0 -99
- package/templates/react-sdk-reference/.claude/skills/field-skills/Dropdown.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/field-skills/Email.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/field-skills/Group.md +0 -96
- package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +0 -88
- package/templates/react-sdk-reference/.claude/skills/field-skills/Location.md +0 -145
- package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +0 -93
- package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +0 -129
- package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +0 -167
- package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +0 -149
- package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +0 -231
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextArea.md +0 -98
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextContent.md +0 -117
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +0 -107
- package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +0 -89
- package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +0 -86
- package/templates/react-sdk-reference/.claude/skills/template-components.md +0 -321
- package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +0 -150
- package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +0 -124
- package/templates/react-sdk-reference/.claude/skills/template-skills/BannerPage.md +0 -86
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +0 -137
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +0 -131
- package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultForm.md +0 -104
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultPage.md +0 -112
- package/templates/react-sdk-reference/.claude/skills/template-skills/Details.md +0 -90
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +0 -97
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsThreeColumn.md +0 -80
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +0 -80
- package/templates/react-sdk-reference/.claude/skills/template-skills/DynamicTabs.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/template-skills/FieldGroupTemplate.md +0 -112
- package/templates/react-sdk-reference/.claude/skills/template-skills/HierarchicalForm.md +0 -116
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboard.md +0 -108
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboardPage.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +0 -142
- package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/template-skills/NarrowWide.md +0 -143
- package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +0 -114
- package/templates/react-sdk-reference/.claude/skills/template-skills/PromotedFilters.md +0 -130
- package/templates/react-sdk-reference/.claude/skills/template-skills/SelfServiceCaseView.md +0 -142
- package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +0 -108
- package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/template-skills/TwoColumn.md +0 -133
- package/templates/react-sdk-reference/.claude/skills/template-skills/WssNavBar.md +0 -139
- package/templates/react-sdk-reference/.claude/skills/widget-components.md +0 -260
- package/templates/react-sdk-reference/.claude/skills/widget-skills/AppAnnouncement.md +0 -84
- package/templates/react-sdk-reference/.claude/skills/widget-skills/Attachment.md +0 -151
- package/templates/react-sdk-reference/.claude/skills/widget-skills/CaseHistory.md +0 -110
- package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +0 -206
- package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +0 -198
- package/templates/react-sdk-reference/.cursor/rules/component-map.mdrules +0 -41
- package/templates/react-sdk-reference/.cursor/rules/dse-component.mdrules +0 -78
- package/templates/react-sdk-reference/.cursor/rules/field-component.mdrules +0 -74
- package/templates/react-sdk-reference/.cursor/rules/pega-sdk.mdrules +0 -247
- package/templates/react-sdk-reference/.cursor/rules/prompts/add-component.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/prompts/component-manifest.json +0 -193
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-all-components.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-dse-components.mdrules +0 -131
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-field-components.mdrules +0 -144
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-template-components.mdrules +0 -156
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-widget-components.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/prompts/identify-components.mdrules +0 -110
- package/templates/react-sdk-reference/.cursor/rules/skills/component-contracts.mdrules +0 -145
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/AlertBanner.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Banner.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/CaseSummaryFields.mdrules +0 -159
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/DetailsFields.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroup.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroupList.mdrules +0 -116
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldValueList.mdrules +0 -120
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Operator.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Pulse.mdrules +0 -88
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/RichTextEditor.mdrules +0 -211
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/WssQuickCreate.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension.mdrules +0 -294
- package/templates/react-sdk-reference/.cursor/rules/skills/field-components.mdrules +0 -299
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/AutoComplete.mdrules +0 -117
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/CancelAlert.mdrules +0 -208
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Checkbox.mdrules +0 -163
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Currency.mdrules +0 -111
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Date.mdrules +0 -104
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/DateTime.mdrules +0 -108
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Decimal.mdrules +0 -103
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Dropdown.mdrules +0 -119
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Email.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Group.mdrules +0 -95
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Integer.mdrules +0 -92
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Location.mdrules +0 -141
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Multiselect.mdrules +0 -169
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ObjectReference.mdrules +0 -169
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Percentage.mdrules +0 -97
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Phone.mdrules +0 -115
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RadioButtons.mdrules +0 -151
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RichText.mdrules +0 -143
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ScalarList.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SelectableCard.mdrules +0 -221
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SemanticLink.mdrules +0 -153
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextArea.mdrules +0 -101
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextContent.mdrules +0 -106
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextInput.mdrules +0 -109
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Time.mdrules +0 -93
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/URL.mdrules +0 -90
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/UserReference.mdrules +0 -185
- package/templates/react-sdk-reference/.cursor/rules/skills/run-and-verify.mdrules +0 -73
- package/templates/react-sdk-reference/.cursor/rules/skills/template-components.mdrules +0 -327
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AdvancedSearch.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AppShell.mdrules +0 -127
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/BannerPage.mdrules +0 -88
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseSummary.mdrules +0 -105
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseView.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseViewActionsMenu.mdrules +0 -131
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Confirmation.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DataReference.mdrules +0 -125
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultForm.mdrules +0 -107
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultPage.mdrules +0 -115
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Details.mdrules +0 -93
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsSubTabs.mdrules +0 -100
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsThreeColumn.mdrules +0 -83
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsTwoColumn.mdrules +0 -83
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DynamicTabs.mdrules +0 -106
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/FieldGroupTemplate.mdrules +0 -114
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/HierarchicalForm.mdrules +0 -118
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboard.mdrules +0 -109
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboardPage.mdrules +0 -90
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListPage.mdrules +0 -73
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListView.mdrules +0 -144
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/MultiReferenceReadOnly.mdrules +0 -85
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/NarrowWide.mdrules +0 -146
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/OneColumn.mdrules +0 -114
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/PromotedFilters.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SelfServiceCaseView.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SimpleTable.mdrules +0 -132
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SingleReferenceReadOnly.mdrules +0 -108
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SubTabs.mdrules +0 -84
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/TwoColumn.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WideNarrow.mdrules +0 -155
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WssNavBar.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-components.mdrules +0 -276
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/AppAnnouncement.mdrules +0 -87
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Attachment.mdrules +0 -151
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/CaseHistory.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/FileUtility.mdrules +0 -205
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Followers.mdrules +0 -104
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/QuickCreate.mdrules +0 -119
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/SummaryItem.mdrules +0 -172
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/ToDo.mdrules +0 -195
- package/templates/react-sdk-reference/.cursor/rules/template-component.mdrules +0 -95
- package/templates/react-sdk-reference/.cursor/rules/widget-component.mdrules +0 -90
- package/templates/react-sdk-reference/.github/copilot-instructions.md +0 -243
- package/templates/react-sdk-reference/.github/instructions/component-map.instructions.md +0 -40
- package/templates/react-sdk-reference/.github/instructions/dse-component.instructions.md +0 -77
- package/templates/react-sdk-reference/.github/instructions/field-component.instructions.md +0 -77
- package/templates/react-sdk-reference/.github/instructions/template-component.instructions.md +0 -95
- package/templates/react-sdk-reference/.github/instructions/widget-component.instructions.md +0 -90
- package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +0 -192
- package/templates/react-sdk-reference/.github/prompts/component-manifest.json +0 -193
- package/templates/react-sdk-reference/.github/prompts/generate-all-components.prompt.md +0 -411
- package/templates/react-sdk-reference/.github/prompts/generate-dse-components.prompt.md +0 -205
- package/templates/react-sdk-reference/.github/prompts/generate-field-components.prompt.md +0 -223
- package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md +0 -229
- package/templates/react-sdk-reference/.github/prompts/generate-widget-components.prompt.md +0 -208
- package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +0 -110
- package/templates/react-sdk-reference/.github/prompts/replace-design-system.prompt.md +0 -524
- package/templates/react-sdk-reference/.github/skills/component-contracts.md +0 -140
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +0 -152
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +0 -159
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +0 -148
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroup.md +0 -134
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +0 -113
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldValueList.md +0 -118
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +0 -155
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Pulse.md +0 -85
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/RichTextEditor.md +0 -232
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/WssQuickCreate.md +0 -137
- package/templates/react-sdk-reference/.github/skills/design-system-extension.md +0 -291
- package/templates/react-sdk-reference/.github/skills/field-components.md +0 -295
- package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +0 -113
- package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +0 -211
- package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +0 -175
- package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +0 -109
- package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +0 -101
- package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +0 -106
- package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +0 -99
- package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +0 -134
- package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +0 -109
- package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +0 -96
- package/templates/react-sdk-reference/.github/skills/field-skills/Integer.md +0 -88
- package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +0 -145
- package/templates/react-sdk-reference/.github/skills/field-skills/Multiselect.md +0 -188
- package/templates/react-sdk-reference/.github/skills/field-skills/ObjectReference.md +0 -173
- package/templates/react-sdk-reference/.github/skills/field-skills/Percentage.md +0 -93
- package/templates/react-sdk-reference/.github/skills/field-skills/Phone.md +0 -129
- package/templates/react-sdk-reference/.github/skills/field-skills/RadioButtons.md +0 -167
- package/templates/react-sdk-reference/.github/skills/field-skills/RichText.md +0 -149
- package/templates/react-sdk-reference/.github/skills/field-skills/ScalarList.md +0 -134
- package/templates/react-sdk-reference/.github/skills/field-skills/SelectableCard.md +0 -231
- package/templates/react-sdk-reference/.github/skills/field-skills/SemanticLink.md +0 -155
- package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +0 -98
- package/templates/react-sdk-reference/.github/skills/field-skills/TextInput.md +0 -107
- package/templates/react-sdk-reference/.github/skills/field-skills/Time.md +0 -89
- package/templates/react-sdk-reference/.github/skills/field-skills/URL.md +0 -86
- package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +0 -203
- package/templates/react-sdk-reference/.github/skills/run-and-verify.md +0 -70
- package/templates/react-sdk-reference/.github/skills/template-components.md +0 -321
- package/templates/react-sdk-reference/.github/skills/template-skills/AdvancedSearch.md +0 -150
- package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +0 -124
- package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +0 -86
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseSummary.md +0 -106
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +0 -137
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +0 -131
- package/templates/react-sdk-reference/.github/skills/template-skills/Confirmation.md +0 -109
- package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +0 -124
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +0 -104
- package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +0 -90
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsSubTabs.md +0 -97
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +0 -80
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsTwoColumn.md +0 -80
- package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +0 -106
- package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +0 -112
- package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +0 -116
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +0 -108
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +0 -82
- package/templates/react-sdk-reference/.github/skills/template-skills/ListPage.md +0 -70
- package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +0 -142
- package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +0 -143
- package/templates/react-sdk-reference/.github/skills/template-skills/OneColumn.md +0 -114
- package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +0 -130
- package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +0 -142
- package/templates/react-sdk-reference/.github/skills/template-skills/SimpleTable.md +0 -131
- package/templates/react-sdk-reference/.github/skills/template-skills/SingleReferenceReadOnly.md +0 -108
- package/templates/react-sdk-reference/.github/skills/template-skills/SubTabs.md +0 -82
- package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +0 -133
- package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +0 -152
- package/templates/react-sdk-reference/.github/skills/widget-components.md +0 -260
- package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +0 -84
- package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +0 -151
- package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +0 -110
- package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +0 -103
- package/templates/react-sdk-reference/.github/skills/widget-skills/QuickCreate.md +0 -118
- package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +0 -169
- package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +0 -198
- package/templates/react-sdk-reference/AGENTS.md +0 -246
- package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
- /package/templates/react-sdk-reference/{.claude → .ai-common}/skills/run-and-verify.md +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Skill: Decimal
|
|
2
|
+
|
|
3
|
+
Decimal number input with configurable precision, group separators, and optional currency/percentage display formatting.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Component Purpose
|
|
10
|
+
|
|
11
|
+
Renders a numeric input that accepts decimal values. Supports configurable decimal precision, optional thousands separator, and optional formatter override (`'Currency'` or `'Percentage'`). Differs from `Currency` in that it's more generic — it can display values as currency, percentage, or plain decimal based on a `formatter` input.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Pega Name:** `Decimal`
|
|
16
|
+
- **Type / Subtype:** `Field` / `Decimal`
|
|
17
|
+
- **Registration key:** `Decimal` (in the project's component map)
|
|
18
|
+
|
|
19
|
+
## Inputs (component-specific)
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| --------------------- | -------------------- | ------- | -------------------------------------------------------------------------------------------- |
|
|
23
|
+
| `currencyISOCode` | `string` (optional) | `'USD'` | ISO code for symbol/separator lookup (used when `formatter === 'Currency'`) |
|
|
24
|
+
| `decimalPrecision` | `number` (optional) | — | Number of decimal places to show |
|
|
25
|
+
| `showGroupSeparators` | `boolean` (optional) | — | Whether to show thousands separators |
|
|
26
|
+
| `formatter` | `string` (optional) | — | `'Currency'` or `'Percentage'` — changes display mode formatting and read-only prefix/suffix |
|
|
27
|
+
|
|
28
|
+
All other inputs come from the project's field input contract (see prerequisite skill).
|
|
29
|
+
|
|
30
|
+
## Implementation Structure
|
|
31
|
+
|
|
32
|
+
Follow this exact structure. Nearly identical to Currency but with configurable precision and conditional prefix/suffix.
|
|
33
|
+
|
|
34
|
+
**Module Setup:** The component depends on the project's component registry (to resolve `FieldValueList`), the project's event-commit utility, the project's currency utility helpers (for decimal/separator/symbol lookup), and the project's formatting helpers (for display-mode value formatting). It also uses a numeric-format masking library that handles locale-aware decimal/thousands display within a text input. Define the input contract as an extension of the project's field input contract, adding optional `currencyISOCode`, `decimalPrecision`, `showGroupSeparators`, and `formatter` fields.
|
|
35
|
+
|
|
36
|
+
**Main Component Logic** — steps in order:
|
|
37
|
+
|
|
38
|
+
1. **Registry lookup** — resolve `FieldValueList` via the project's component registry.
|
|
39
|
+
2. **Receive inputs** — `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `helperText`, `displayMode`, `hideLabel`, `currencyISOCode` (default `'USD'`), `decimalPrecision`, `showGroupSeparators`, `testId`, `placeholder`, `formatter`.
|
|
40
|
+
3. **Local state** — `values` initialized from `value.toString()`.
|
|
41
|
+
4. **PConnect setup** — obtain the PConnect instance, its actions API, and the bound property name; compute `helperTextToDisplay = validatemessage || helperText`.
|
|
42
|
+
5. **Currency/decimal symbols** — derive the decimal indicator, digit group separator, and currency symbol via the project's currency utility helpers using `currencyISOCode`, and obtain the currency formatting options object.
|
|
43
|
+
6. **Sync from store** — a lifecycle effect watching `value` updates `values` (as a string) whenever it changes.
|
|
44
|
+
7. **Read-only flag** — build a read-only configuration, set to mark the input read-only only when `readOnly` is true.
|
|
45
|
+
8. **Formatted value** — computed eagerly, before the display-mode check: if `formatter === 'Currency'`, compute the formatted value using the project's formatting helper with format key `'currency'` and the currency options; otherwise compute using the component's type name (from `pConn.getComponentName()?.toLowerCase()`) as the format key with the same currency options.
|
|
46
|
+
9. **Display mode returns** — `DISPLAY_ONLY` and `STACKED_LARGE_VAL` both return `FieldValueList` using the formatted value, the latter with a stacked variant.
|
|
47
|
+
10. **Test ID and event handlers** — build a test-id attribute from `testId`; the blur handler commits via the project's event-commit utility with event type `'changeNblur'`, the property name, and `values`; the value-change handler updates `values` with the raw numeric string from the masking library's callback.
|
|
48
|
+
11. **Render** — a numeric-format input configured with: value-is-numeric-string flag, full width, current `values`, an outlined style when editable or flat/borderless style when read-only, prefix set to the currency symbol only when read-only AND `formatter === 'Currency'` (otherwise empty), suffix set to `'%'` only when read-only AND `formatter === 'Percentage'` (otherwise empty), decimal separator set to the locale-derived decimal indicator, thousands separator set to the locale-derived group separator only when `showGroupSeparators` is truthy (otherwise empty string), decimal scale set to `undefined` when read-only AND `formatter === 'Currency'` (otherwise `decimalPrecision`), the value-change handler, the blur handler wired only when not read-only, `label`, `helperText: helperTextToDisplay`, `placeholder: placeholder ?? ''`, `required`, `disabled`, an error state when `status === 'error'`, small size, and the read-only/test-id attributes applied to the underlying input element.
|
|
49
|
+
|
|
50
|
+
## Behavioral Contract
|
|
51
|
+
|
|
52
|
+
1. **Local state:** Maintain `values` (string). Initialize from `value.toString()`.
|
|
53
|
+
2. **Sync from store:** A lifecycle effect watching `value` updates `values` (converted to string).
|
|
54
|
+
3. **Helper text:** `helperTextToDisplay = validatemessage || helperText`.
|
|
55
|
+
4. **Separators:** Derive the decimal indicator and digit group separator from the project's currency utility helpers using `currencyISOCode`. Apply the thousands separator only when `showGroupSeparators` is truthy (otherwise pass an empty string).
|
|
56
|
+
5. **Formatted value (computed eagerly):** When `formatter === 'Currency'`, compute the formatted value using the project's formatting helper with format key `'currency'` and the currency options; otherwise compute using the component's type name (from `pConn.getComponentName()?.toLowerCase()`) as the format key with the same options.
|
|
57
|
+
6. **Prefix/Suffix (read-only only):**
|
|
58
|
+
- Prefix: the currency symbol when read-only AND `formatter === 'Currency'`, otherwise empty.
|
|
59
|
+
- Suffix: `'%'` when read-only AND `formatter === 'Percentage'`, otherwise empty.
|
|
60
|
+
7. **Decimal scale:** `undefined` when read-only AND `formatter === 'Currency'` (let the formatter decide), otherwise `decimalPrecision`.
|
|
61
|
+
8. **On value change:** Update `values` with the raw numeric string from the masking library's callback.
|
|
62
|
+
9. **On blur:** Commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and `values`.
|
|
63
|
+
10. **Read-only:** Set the read-only attribute on the underlying input. Switch to a flat/borderless visual style. Omit the blur handler.
|
|
64
|
+
11. **Render ordering:** state → read-only flag → formatted value → display modes → test-id + handlers → main render.
|
|
65
|
+
|
|
66
|
+
## Display Mode Rendering
|
|
67
|
+
|
|
68
|
+
- **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value` set to the formatted value.
|
|
69
|
+
- **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked layout variant.
|
|
70
|
+
|
|
71
|
+
The formatted value is computed before the display-mode check:
|
|
72
|
+
|
|
73
|
+
- `formatter === 'Currency'` → currency-formatted string.
|
|
74
|
+
- Otherwise → decimal-formatted string using the component's type name as the format key.
|
|
75
|
+
|
|
76
|
+
## Read-Only Rendering
|
|
77
|
+
|
|
78
|
+
Keep the numeric-format input with the read-only attribute set. Apply prefix (currency symbol) or suffix (`%`) based on `formatter`. Use a flat/borderless visual style.
|
|
79
|
+
|
|
80
|
+
## Visual Specifications
|
|
81
|
+
|
|
82
|
+
| Property | Standard (editable) | Read-only |
|
|
83
|
+
| ------------------- | ------------------------------------ | ---------------------------------------------------- |
|
|
84
|
+
| Width | 100% | 100% |
|
|
85
|
+
| Size | Small | Small |
|
|
86
|
+
| Variant | Outlined | Flat/borderless |
|
|
87
|
+
| Prefix | None (unless read-only Currency) | Currency symbol if `formatter='Currency'` |
|
|
88
|
+
| Suffix | None (unless read-only Percentage) | `%` if `formatter='Percentage'` |
|
|
89
|
+
| Thousands separator | Only when `showGroupSeparators=true` | Same |
|
|
90
|
+
| Decimal scale | From `decimalPrecision` | Undefined for Currency, `decimalPrecision` otherwise |
|
|
91
|
+
| Placeholder | From the `placeholder` input | — |
|
|
92
|
+
|
|
93
|
+
## Edge Cases & Special Logic
|
|
94
|
+
|
|
95
|
+
- In read-only Currency mode, decimal scale is set to `undefined` (let the formatter decide), not `decimalPrecision`.
|
|
96
|
+
- `thousandSeparator` defaults to empty string (disabled) unless `showGroupSeparators` is `true`.
|
|
97
|
+
- Prefix and suffix are only rendered in read-only mode — NOT in editable mode.
|
|
98
|
+
- The stored value is always a raw numeric string, not the formatted display string.
|
|
99
|
+
|
|
100
|
+
## Dependencies
|
|
101
|
+
|
|
102
|
+
- A numeric-format masking library (for locale-aware decimal/thousands display within a text input).
|
|
103
|
+
- The project's currency utility helpers — for decimal indicator, digit group separator, and currency symbol lookup.
|
|
104
|
+
- The project's currency options helper — for formatting options based on ISO code.
|
|
105
|
+
- The project's formatting helpers — specifically the named `format` export (not a method on the default export). Use it as a standalone function, not as a property of the default-exported object.
|
|
106
|
+
- The project's event-commit utility.
|
|
107
|
+
- The project's component registry, resolving `FieldValueList` — for display modes.
|
|
108
|
+
|
|
109
|
+
## Design System Mapping
|
|
110
|
+
|
|
111
|
+
**UI control type:** Decimal / numeric formatted input.
|
|
112
|
+
|
|
113
|
+
When implementing in a specific design system, map the following:
|
|
114
|
+
|
|
115
|
+
- **Numeric format input** → use a numeric masking library compatible with the project's framework, or implement custom input masking
|
|
116
|
+
- **Decimal/thousands separators** → derive from the currency utility helpers based on the ISO code
|
|
117
|
+
- **Read-only prefix/suffix** → conditionally display the currency symbol or `%` sign
|
|
118
|
+
- **Error state** → the DS's error/danger visual state
|
|
119
|
+
- **Flat/borderless style** → the DS's read-only/standard input variant
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Skill: Dropdown
|
|
2
|
+
|
|
3
|
+
Select/dropdown field with options loaded from a data page, associated list, or deferred datasource. Includes localization of option labels.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Component Purpose
|
|
10
|
+
|
|
11
|
+
Renders a single-select dropdown (select box). Options are loaded from a Pega datasource — either an `associated` list (static key/value pairs) or a `datapage` (async data page fetch). Supports deferred datasource loading and localized option labels. Commits value immediately on selection change.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Pega Name:** `Dropdown`
|
|
16
|
+
- **Type / Subtype:** `Field` / `Picklist`
|
|
17
|
+
- **Registration key:** `Dropdown` (in the project's component map)
|
|
18
|
+
|
|
19
|
+
## Inputs (component-specific)
|
|
20
|
+
|
|
21
|
+
| Name | Type | Description |
|
|
22
|
+
| -------------------- | -------------------- | ------------------------------------------------------------------- |
|
|
23
|
+
| `listType` | `string` | `'associated'` or `'datapage'` — determines how options are loaded |
|
|
24
|
+
| `datasource` | `any[]` (optional) | The raw datasource (array for associated, string name for datapage) |
|
|
25
|
+
| `columns` | `any[]` | Column config for extracting key/value from datasource records |
|
|
26
|
+
| `parameters` | `any` (optional) | Query parameters for data page calls |
|
|
27
|
+
| `deferDatasource` | `boolean` (optional) | If true, transform `datasourceMetadata` into datapage config |
|
|
28
|
+
| `datasourceMetadata` | `any` (optional) | Metadata from deferred datasource resolution |
|
|
29
|
+
| `fieldMetadata` | `any` (optional) | Field metadata for localization context |
|
|
30
|
+
| `onRecordChange` | `any` (optional) | Callback fired after a selection change |
|
|
31
|
+
|
|
32
|
+
All other inputs come from the project's field input contract (see prerequisite skill).
|
|
33
|
+
|
|
34
|
+
## Implementation Structure
|
|
35
|
+
|
|
36
|
+
Follow this exact structure. Same helper functions as AutoComplete (`flattenParameters`, `preProcessColumns`, `getDisplayFieldsMetaData`) — see that skill file for their exact behavior.
|
|
37
|
+
|
|
38
|
+
**Module Setup:** The component depends on the project's component registry (to resolve `FieldValueList`), the project's event-commit utility, a deep-equality utility (for datasource change detection), the project's utility helpers (for associated option list loading), and the project's data-page utility (for async data page fetching). Define an option type with `key: string` and `value: string`. Declare the same top-level helper functions used by AutoComplete (`flattenParameters`, `preProcessColumns`, `getDisplayFieldsMetaData`). Define the input contract as an extension of the project's field input contract, adding `datasource`, `onRecordChange`, `fieldMetadata`, `listType`, `deferDatasource`, `datasourceMetadata`, `parameters`, and `columns` fields.
|
|
39
|
+
|
|
40
|
+
**Main Component Logic** — steps in order:
|
|
41
|
+
|
|
42
|
+
1. **Registry lookup** — resolve `FieldValueList` via the project's component registry.
|
|
43
|
+
2. **Receive inputs** — `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `deferDatasource`, `datasourceMetadata`, `hideLabel`, `onRecordChange`, `fieldMetadata`; separately receive `placeholder` (default `''`) as a reassignable variable since it may be overridden; also grab `context` via `getPConnect().getContextName()`, and `listType`, `parameters`, `datasource` (default `[]`), `columns` (default `[]`) as reassignable since they may be overridden. Default `placeholder` to `'Select...'` when empty.
|
|
44
|
+
3. **Local state** — `options` (array of option objects, default `[]`) and `theDatasource` (default `null`).
|
|
45
|
+
4. **PConnect setup** — `helperTextToDisplay = validatemessage || helperText`; obtain the PConnect instance, actions API, bound property name; derive `className` via `thePConn.getCaseInfo().getClassName()`; derive `refName` by taking the substring of the property name after its last `.`.
|
|
46
|
+
5. **Render-time datasource comparison (not in a lifecycle effect)** — if deep-equal comparison of incoming `datasource` vs cached `theDatasource` is false, update `theDatasource` directly during render to trigger the associated-list effect.
|
|
47
|
+
6. **Deferred datasource transformation** (same as AutoComplete) — reassigns `listType`, `datasource`, `parameters`, and `columns` when deferred.
|
|
48
|
+
7. **Column preprocessing** — apply `preProcessColumns(columns)`.
|
|
49
|
+
8. **Lifecycle effect: associated options** — watching `theDatasource`: prepend a placeholder option, then load options via the project's utility helper.
|
|
50
|
+
9. **Lifecycle effect: datapage options** — on mount only, guarded to skip when `listType === 'associated'`.
|
|
51
|
+
10. **Localization metadata derivation** — compute `metaData`, `displayName`, `localeContext`, `localeClass`, `localeName`, `localePath` (see Behavioral Contract item 10 for the exact derivation).
|
|
52
|
+
11. **Display mode** — when `displayMode` is set: resolve the display value by matching `value` against the `key` of an entry in `options` (falling back to the raw `value` if no match), localize it via `thePConn.getLocalizedValue(resolvedValue, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))`, and return `FieldValueList` with that localized value.
|
|
53
|
+
12. **Read-only flag** — build a read-only configuration, set to mark the input read-only only when `readOnly` is true.
|
|
54
|
+
13. **Test ID and change handler** — build a test-id attribute from `testId`; the change handler treats a selection equal to the placeholder as an empty string, commits via the project's event-commit utility with event type `'changeNblur'`, the property name, and the selected value, and invokes `onRecordChange` when provided.
|
|
55
|
+
14. **Render** — return `null` when `options` is empty (avoids rendering with no options); otherwise render the select widget with `value` set to the placeholder when `value === '' && !readOnly`, and options rendered with localized labels via `thePConn.getLocalizedValue()`.
|
|
56
|
+
|
|
57
|
+
## Behavioral Contract
|
|
58
|
+
|
|
59
|
+
1. **Options state:** Maintain `options` as an array of `{key: string, value: string}` objects. Initially empty — render nothing (`return null`) until options are populated (avoids design system warnings about undefined options).
|
|
60
|
+
2. **Datasource detection:** Use deep equality to compare incoming `datasource` input with cached `theDatasource` state. If different, update `theDatasource` to trigger a lifecycle effect.
|
|
61
|
+
3. **Deferred datasource transformation:** If `deferDatasource && datasourceMetadata?.datasource?.name`:
|
|
62
|
+
- Override `listType = 'datapage'`
|
|
63
|
+
- Set `datasource` to the metadata's datasource name (string page name)
|
|
64
|
+
- Flatten `parameters` from `{key: {name, value}}` format to `{name: value}` pairs
|
|
65
|
+
- Build `columns` from `propertyForDisplayText` and `propertyForValue`
|
|
66
|
+
4. **Column preprocessing:** Strip leading `.` from column `value` fields.
|
|
67
|
+
5. **Loading options for `associated` listType:** In a lifecycle effect watching `theDatasource`, load options via the project's utility helper. Prepend a placeholder option `{key: placeholder, value: localizedPlaceholder}`.
|
|
68
|
+
6. **Loading options for `datapage` listType:** In a mount-time lifecycle effect, call the project's data-page utility. Map results using `getDisplayFieldsMetaData(columns)` to extract `key` and `value` per row.
|
|
69
|
+
7. **Placeholder:** Default `'Select...'` if not provided. Prepended as the first option for associated lists.
|
|
70
|
+
8. **On change:**
|
|
71
|
+
- If selected value equals `placeholder`, treat as empty string.
|
|
72
|
+
- Commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and the selected value.
|
|
73
|
+
- Fire `onRecordChange` if provided.
|
|
74
|
+
9. **Read-only:** Set the read-only attribute on the select input. Flat/borderless style. Change handler omitted.
|
|
75
|
+
10. **Localization metadata:** Derived from `fieldMetadata`: if `fieldMetadata` is an array, filter to the entry whose `classID` matches `className` and take the first match, otherwise use `fieldMetadata` directly, to get `metaData`. `displayName` is `metaData?.datasource?.propertyForDisplayText`, trimmed to the substring after its last `.`. `localeContext` is `'datapage'` when `metaData?.datasource?.tableType === 'DataPage'`, else `'associated'`. `localeClass` is `'@baseclass'` for datapage context, else `className`. `localeName` is `metaData?.datasource?.name` for datapage context, else `refName`. `localePath` is `displayName` for datapage context, else `localeName`. Where `className = thePConn.getCaseInfo().getClassName()` and `refName` is the substring of the property name after its last `.`.
|
|
76
|
+
11. **Display mode rendering:** Resolve the display value by matching `value` (the stored key) against `options` to find the corresponding `value` field (falling back to the raw `value` if no match), then localize it via `thePConn.getLocalizedValue(resolvedValue, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))` and render it inside `FieldValueList`.
|
|
77
|
+
12. **Select value when empty:** Show the placeholder as selected when `value` is empty and the field is not read-only.
|
|
78
|
+
13. **Return null until options load:** Prevents rendering an empty select.
|
|
79
|
+
14. **Option labels localized:** Each option's label is wrapped in `thePConn.getLocalizedValue(option.value, localePath, localeRuleName)`.
|
|
80
|
+
|
|
81
|
+
## Display Mode Rendering
|
|
82
|
+
|
|
83
|
+
Display modes use the **resolved display value** (the `value` string matching the selected `key`), NOT the raw stored key: found by matching `value` against each option's `key` field and taking its `value` field (falling back to the raw `value` if no match found).
|
|
84
|
+
|
|
85
|
+
Both modes pass this resolved value through `pConn.getLocalizedValue()` for localization:
|
|
86
|
+
|
|
87
|
+
- **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value` set to the localized display value.
|
|
88
|
+
- **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked layout variant.
|
|
89
|
+
|
|
90
|
+
## Read-Only Rendering
|
|
91
|
+
|
|
92
|
+
Set the read-only attribute on the select element. Flat/borderless style. Change handler removed.
|
|
93
|
+
|
|
94
|
+
## Visual Specifications
|
|
95
|
+
|
|
96
|
+
| Property | Standard (editable) | Read-only |
|
|
97
|
+
| ------------------ | ------------------------------------ | --------------- |
|
|
98
|
+
| Width | 100% | 100% |
|
|
99
|
+
| Size | Small | Small |
|
|
100
|
+
| Variant | Outlined | Flat/borderless |
|
|
101
|
+
| Placeholder option | First option in list (`'Select...'`) | Not shown |
|
|
102
|
+
| Options | Rendered as select menu items | — |
|
|
103
|
+
| Error state | Red border + red helper text | — |
|
|
104
|
+
| Label | Floating label | — |
|
|
105
|
+
|
|
106
|
+
**Visual-only styling notes:** The select element spans full width at a fixed ~40px height, with a 1px solid outlined border and 4px border radius. On focus, the border switches to an accent color (no default browser outline). In an error state, the border switches to red. When read-only, the border is removed, the background becomes transparent, and pointer interaction is disabled.
|
|
107
|
+
|
|
108
|
+
## Edge Cases & Special Logic
|
|
109
|
+
|
|
110
|
+
- Do NOT render the component until `options.length > 0` — return `null` until options load.
|
|
111
|
+
- **Localization keys:** Build from `fieldMetadata`:
|
|
112
|
+
- `localeContext`: `'datapage'` if `tableType === 'DataPage'`, else `'associated'`
|
|
113
|
+
- `localeClass`: `'@baseclass'` for datapage, else the case className
|
|
114
|
+
- `localeName`, `localePath` derived from datasource name and display text property
|
|
115
|
+
- Display mode check must resolve the key→value mapping before localizing and rendering.
|
|
116
|
+
|
|
117
|
+
## Dependencies
|
|
118
|
+
|
|
119
|
+
- A deep-equality utility — for datasource change detection.
|
|
120
|
+
- The project's utility helpers — for associated list option loading.
|
|
121
|
+
- The project's data-page utility — for async datapage fetch.
|
|
122
|
+
- The project's event-commit utility.
|
|
123
|
+
- The project's component registry, resolving `FieldValueList` — for display modes.
|
|
124
|
+
|
|
125
|
+
## Design System Mapping
|
|
126
|
+
|
|
127
|
+
**UI control type:** Single-select dropdown / select box.
|
|
128
|
+
|
|
129
|
+
When implementing in a specific design system, map the following:
|
|
130
|
+
|
|
131
|
+
- **Select/dropdown** → use the DS's select component with option items
|
|
132
|
+
- **Placeholder option** → prepend as the first option for associated lists
|
|
133
|
+
- **Option labels** → localize via `pConn.getLocalizedValue()` before display
|
|
134
|
+
- **Read-only mode** → flat/borderless style with read-only attribute
|
|
135
|
+
- **Error state** → the DS's error/danger visual state
|
|
136
|
+
- **Return null until loaded** → do not render an empty select
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Skill: Email
|
|
2
|
+
|
|
3
|
+
Email input field with a leading mail icon, binds to a Pega case property.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, 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 `email` with a leading mail icon adornment. Provides browser-native email validation via the `email` input type. Delegates read-only rendering to the `TextInput` component.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Pega Name:** `Email`
|
|
16
|
+
- **Type / Subtype:** `Field` / `Text-Email`
|
|
17
|
+
- **Registration key:** `Email` (in the project's component map)
|
|
18
|
+
|
|
19
|
+
## Inputs (component-specific)
|
|
20
|
+
|
|
21
|
+
No inputs beyond the project's field input contract (see prerequisite skill).
|
|
22
|
+
|
|
23
|
+
## Implementation Structure
|
|
24
|
+
|
|
25
|
+
Follow this exact structure. Replace the mail icon and text field with equivalents from your chosen design system.
|
|
26
|
+
|
|
27
|
+
**Module Setup:** The component depends on the project's component registry (to resolve `TextInput` and `FieldValueList`) and the project's event-commit utility (for committing value changes to the store). Define the input contract as the project's field input contract with no additional fields.
|
|
28
|
+
|
|
29
|
+
**Main Component Logic** — steps in order:
|
|
30
|
+
|
|
31
|
+
1. **Registry lookups** — resolve `TextInput` and `FieldValueList` via the project's component registry.
|
|
32
|
+
2. **Receive inputs** — `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`.
|
|
33
|
+
3. **PConnect setup** — obtain the PConnect instance, its actions API, and the bound property name; compute `helperTextToDisplay = validatemessage || helperText`.
|
|
34
|
+
4. **Local state** — `inputValue` initialized to `''`.
|
|
35
|
+
5. **Sync from store** — a lifecycle effect watching `value` updates `inputValue` whenever `value` changes.
|
|
36
|
+
6. **Display mode returns** — `DISPLAY_ONLY` and `STACKED_LARGE_VAL` both return `FieldValueList` using the raw `value`, the latter with a stacked variant.
|
|
37
|
+
7. **Read-only return** — when `readOnly` is true, render the `TextInput` component with all inputs passed through directly (full delegation; no mail icon in read-only mode).
|
|
38
|
+
8. **Test ID and event handlers** — build a test-id attribute from `testId`; the change handler updates `inputValue` from the event's input value; the blur handler commits the value via the project's event-commit utility, passing the actions API, event type `'changeNblur'`, the property name, and `inputValue`.
|
|
39
|
+
9. **Render** — an email input with a leading mail icon, configured with: full width, an outlined style, small size, input type `email`, current `inputValue`, the change handler, the blur handler wired only when not read-only, `label`, `helperText: helperTextToDisplay`, `placeholder: placeholder ?? ''`, `required`, `disabled`, an error state when `status === 'error'`, a start-adornment slot containing a mail/envelope icon, and the test-id attribute applied to the underlying input element.
|
|
40
|
+
|
|
41
|
+
## Behavioral Contract
|
|
42
|
+
|
|
43
|
+
1. **Local state:** Maintain `inputValue` (string). Initialize from the `value` input (`''` default).
|
|
44
|
+
2. **Sync from store:** A lifecycle effect watching `value` updates `inputValue`.
|
|
45
|
+
3. **On change:** Update local state only (set `inputValue` from the event's input value).
|
|
46
|
+
4. **On blur:** Commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and `inputValue`.
|
|
47
|
+
5. **Input type:** Use an `email`-typed input for browser-native email format validation.
|
|
48
|
+
6. **Read-only:** Delegate entirely to the `TextInput` component, passing all inputs through. Do NOT render the email-specific UI.
|
|
49
|
+
|
|
50
|
+
## Display Mode Rendering
|
|
51
|
+
|
|
52
|
+
- **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value` set to the raw `value` — raw email string, no formatting.
|
|
53
|
+
- **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked layout variant.
|
|
54
|
+
|
|
55
|
+
## Read-Only Rendering
|
|
56
|
+
|
|
57
|
+
Delegate to `TextInput`, passing all inputs through. This means the mail icon adornment is NOT shown in read-only mode.
|
|
58
|
+
|
|
59
|
+
## Visual Specifications
|
|
60
|
+
|
|
61
|
+
Derived from the reference component's styling:
|
|
62
|
+
|
|
63
|
+
| Property | Value |
|
|
64
|
+
| ------------- | --------------------------------------------- |
|
|
65
|
+
| Width | 100% |
|
|
66
|
+
| Size | Small (~40px height) |
|
|
67
|
+
| Variant | Outlined |
|
|
68
|
+
| Leading icon | Mail/envelope icon (start-adornment position) |
|
|
69
|
+
| Icon color | Inherits text color |
|
|
70
|
+
| Border | 1px solid outlined |
|
|
71
|
+
| Border radius | 4px |
|
|
72
|
+
| Error state | Red border + red helper text |
|
|
73
|
+
| Helper text | Below input |
|
|
74
|
+
| Placeholder | From the `placeholder` input (`''` default) |
|
|
75
|
+
|
|
76
|
+
**Visual-only styling notes:** The wrapper element is a flex container spanning the full input width, with a 1px solid outlined border (`rgba(0, 0, 0, 0.23)`) and 4px border radius. Left padding is increased (36px) to make room for the icon. The icon itself is absolutely positioned near the left edge (10px), colored with a muted text tone (`rgba(0, 0, 0, 0.54)`), and marked non-interactive (`pointer-events: none`) so clicks pass through to the input. In the error state, the wrapper border color switches to red (`#d32f2f`).
|
|
77
|
+
|
|
78
|
+
## Edge Cases & Special Logic
|
|
79
|
+
|
|
80
|
+
- The `email` input type triggers browser-native validation — this is intentional and supplements Pega's server-side validation.
|
|
81
|
+
- In read-only mode, the full delegation to `TextInput` means the component renders without the mail icon adornment.
|
|
82
|
+
- The blur handler is only attached when the field is not read-only.
|
|
83
|
+
|
|
84
|
+
## Dependencies
|
|
85
|
+
|
|
86
|
+
- The project's event-commit utility.
|
|
87
|
+
- The project's component registry, resolving `TextInput` — for read-only delegation.
|
|
88
|
+
- The project's component registry, resolving `FieldValueList` — for display modes.
|
|
89
|
+
- A mail/envelope icon (e.g., from an icon library or inline SVG).
|
|
90
|
+
|
|
91
|
+
## Design System Mapping
|
|
92
|
+
|
|
93
|
+
**UI control type:** Email text input with leading icon adornment.
|
|
94
|
+
|
|
95
|
+
When implementing in a specific design system, map the following:
|
|
96
|
+
|
|
97
|
+
- **Email input** → use the DS's text input with input type set to `email`
|
|
98
|
+
- **Leading mail icon** → use the DS's input adornment/prefix slot, or an absolutely-positioned icon if the DS has no adornment slot
|
|
99
|
+
- **Read-only mode** → delegate to the `TextInput` component (no icon shown)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Skill: Group
|
|
2
|
+
|
|
3
|
+
Field group container that wraps child fields in a collapsible section with an optional heading and instructions.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Component Purpose
|
|
10
|
+
|
|
11
|
+
A layout/structural component (not a form input). Wraps a set of child field components in a `FieldGroup` container with an optional heading, collapsibility, and instructions text. Arranges children in a responsive grid. Does not bind to a Pega property directly.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Pega Name:** `Group`
|
|
16
|
+
- **Type / Subtype:** `Field` / `Group`
|
|
17
|
+
- **Registration key:** `Group` (in the project's component map)
|
|
18
|
+
|
|
19
|
+
## Inputs (component-specific)
|
|
20
|
+
|
|
21
|
+
| Input | Type | Description |
|
|
22
|
+
| -------------- | ----------------------- | ------------------------------------------------- |
|
|
23
|
+
| `children` | array of child elements | Child field components to render inside the group |
|
|
24
|
+
| `heading` | `string` | The group heading/title |
|
|
25
|
+
| `showHeading` | `boolean` | Whether to display the heading |
|
|
26
|
+
| `instructions` | `string` (optional) | Instructional text shown below the heading |
|
|
27
|
+
| `collapsible` | `boolean` | Whether the group can be collapsed |
|
|
28
|
+
| `type` | `string` | Group type (used for layout context) |
|
|
29
|
+
|
|
30
|
+
`displayMode` is also consumed from the project's field input contract.
|
|
31
|
+
|
|
32
|
+
## Implementation Structure
|
|
33
|
+
|
|
34
|
+
**Module Setup:** The component depends on the project's component registry (to resolve `FieldGroup`). Define the input contract as the project's field input contract extended with `children` (array of child elements), `heading: string`, `showHeading: boolean`, `instructions?: string`, `collapsible: boolean`, and `type: string`.
|
|
35
|
+
|
|
36
|
+
**Main Component Logic** — steps in order:
|
|
37
|
+
|
|
38
|
+
1. **Registry lookup** — resolve `FieldGroup` via the project's component registry.
|
|
39
|
+
2. **Receive inputs** — `children`, `heading`, `showHeading`, `instructions`, `collapsible`, `displayMode`, `type`.
|
|
40
|
+
3. **Derived flag** — `isReadOnly = displayMode === 'DISPLAY_ONLY'`.
|
|
41
|
+
4. **Memoized content grid** (dependencies: `children`, `type`, `isReadOnly`) — build a grid container (spacing 2) where each child is wrapped in a full-width grid item, preserving each child's key.
|
|
42
|
+
5. **Null guard** — if `!children`, return `null`.
|
|
43
|
+
6. **Return `FieldGroup` wrapper** — pass `name` as `heading` only when `showHeading` is true (otherwise `undefined`), plus `collapsible` and `instructions`, wrapping the memoized content grid.
|
|
44
|
+
|
|
45
|
+
## Behavioral Contract
|
|
46
|
+
|
|
47
|
+
1. **No state, no event handling** — purely structural/layout.
|
|
48
|
+
2. **`isReadOnly` flag:** `isReadOnly = displayMode === 'DISPLAY_ONLY'` — passed through to grid for layout context.
|
|
49
|
+
3. **Content grid:** Build a responsive grid of children using a memoized computation (dependencies: `children`, `type`, `isReadOnly`):
|
|
50
|
+
- Each child gets a full-width grid item (100% column width in a 12-column grid system or equivalent).
|
|
51
|
+
- Children are mapped with their unique key preserved.
|
|
52
|
+
4. **Null guard:** If `!children`, return `null`.
|
|
53
|
+
5. **Heading:** Pass `showHeading ? heading : undefined` to `FieldGroup` — if `showHeading` is false, heading is `undefined` (not shown).
|
|
54
|
+
6. **FieldGroup:** Resolved via the project's component registry with key `'FieldGroup'`. Receives `name`, `collapsible`, and `instructions` inputs.
|
|
55
|
+
|
|
56
|
+
## Display Mode Rendering
|
|
57
|
+
|
|
58
|
+
`displayMode` is not explicitly handled — it's passed through as an input for context. `FieldGroup` and children handle their own display mode behavior.
|
|
59
|
+
|
|
60
|
+
## Visual Specifications
|
|
61
|
+
|
|
62
|
+
The visual appearance is determined by the `FieldGroup` design system extension component. `Group` itself only applies grid layout to children: a grid container with spacing 2, where each child occupies a full-width grid item.
|
|
63
|
+
|
|
64
|
+
**Visual-only styling notes:** The children grid uses a single-column layout with a consistent gap between items.
|
|
65
|
+
|
|
66
|
+
The `FieldGroup` component itself provides:
|
|
67
|
+
|
|
68
|
+
- Optional heading/title above the children
|
|
69
|
+
- Optional collapse/expand control
|
|
70
|
+
- Optional instructions text
|
|
71
|
+
- Container border/background (design-system-dependent)
|
|
72
|
+
|
|
73
|
+
## Edge Cases & Special Logic
|
|
74
|
+
|
|
75
|
+
- **Memoized computation dependencies:** `children`, `type`, `isReadOnly` — the grid re-renders only when these change, not on every parent render.
|
|
76
|
+
- Children must have stable keys for reconciliation.
|
|
77
|
+
- `instructions` may be undefined — `FieldGroup` should handle this gracefully.
|
|
78
|
+
|
|
79
|
+
## Dependencies
|
|
80
|
+
|
|
81
|
+
- The project's component registry to resolve `FieldGroup` — the design system extension providing the collapsible container.
|
|
82
|
+
- A grid layout mechanism for arranging children in a single-column layout with consistent spacing.
|
|
83
|
+
|
|
84
|
+
## Design System Mapping
|
|
85
|
+
|
|
86
|
+
**UI control type:** Collapsible field group container with heading.
|
|
87
|
+
|
|
88
|
+
When implementing in a specific design system, map the following: a grid container component with consistent spacing (gap of 2 units) where each child occupies a full-width row, and a collapsible section/panel component for the outer `FieldGroup` wrapper. The collapsible panel should support an optional title, collapse/expand toggle, and an instructions area. Native HTML equivalents include `<fieldset>` or `<details>/<summary>` for collapsibility.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Skill: Integer
|
|
2
|
+
|
|
3
|
+
Integer-only text input that filters out decimal separators, binds to a Pega case property.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, 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 restricted to integer values. Actively filters out decimal (`.`) and thousands separator (`,`) characters as the user types, mimicking Pega's native integer field behavior. Delegates read-only rendering to `TextInput`.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Pega Name:** `Integer`
|
|
16
|
+
- **Type / Subtype:** `Field` / `Integer`
|
|
17
|
+
- **Registration key:** `Integer` (in the project's component map)
|
|
18
|
+
|
|
19
|
+
## Inputs (component-specific)
|
|
20
|
+
|
|
21
|
+
No inputs beyond the project's field input contract (see prerequisite skill).
|
|
22
|
+
|
|
23
|
+
## Implementation Structure
|
|
24
|
+
|
|
25
|
+
Follow this exact structure. The key differentiator from TextInput is the character filtering in the change handler.
|
|
26
|
+
|
|
27
|
+
**Module Setup:** The component depends on the project's component registry (to resolve `TextInput` and `FieldValueList`) and the project's event-commit utility (for committing value changes to the store). Define the input contract as the project's field input contract with no additional fields.
|
|
28
|
+
|
|
29
|
+
**Main Component Logic** — steps in order:
|
|
30
|
+
|
|
31
|
+
1. **Registry lookups** — resolve `TextInput` and `FieldValueList` via the project's component registry.
|
|
32
|
+
2. **Receive inputs** — `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`.
|
|
33
|
+
3. **PConnect setup** — obtain the PConnect instance, its actions API, and the bound property name; compute `helperTextToDisplay = validatemessage || helperText`.
|
|
34
|
+
4. **Local state** — `inputValue` initialized to `''`.
|
|
35
|
+
5. **Sync from store** — a lifecycle effect watching `value` updates `inputValue` whenever it changes.
|
|
36
|
+
6. **Display mode returns** — `DISPLAY_ONLY` and `STACKED_LARGE_VAL` both return `FieldValueList` using the raw `value`, the latter with a stacked variant.
|
|
37
|
+
7. **Read-only return** — when `readOnly` is true, render the `TextInput` component with all inputs passed through directly (full delegation).
|
|
38
|
+
8. **Test ID** — build a test-id attribute from `testId`.
|
|
39
|
+
9. **Change handler with character filtering** — read the attempted value from the change event, check whether its last character is a disallowed character (`.` or `,`), and if so strip that last character before updating the DOM value; then update local `inputValue` with the (possibly trimmed) value. This mimics Pega's native integer field behavior of blocking decimal/thousands separators as the user types.
|
|
40
|
+
10. **Blur handler** — commit to store via the project's event-commit utility with event type `'changeNblur'`, the property name, and `inputValue`.
|
|
41
|
+
11. **Render** — a text input configured with: input type `text` (explicitly NOT `number`, to retain full control over character filtering), full width, outlined style, small size, current `inputValue`, the change handler, the blur handler wired only when not read-only, `label`, `helperText: helperTextToDisplay`, `placeholder: placeholder ?? ''`, `required`, `disabled`, an error state when `status === 'error'`, and HTML input attributes `inputMode: 'numeric'` and `pattern: '[0-9]*'` merged with the test-id attribute to hint numeric keyboards on mobile while still filtering as plain text.
|
|
42
|
+
|
|
43
|
+
## Behavioral Contract
|
|
44
|
+
|
|
45
|
+
1. **Local state:** Maintain `inputValue` (string). Initialize from `value` input (`''` default).
|
|
46
|
+
2. **Sync from store:** A lifecycle effect watching `value` updates `inputValue`.
|
|
47
|
+
3. **On change (character filtering):** Before updating local state, inspect the last character typed:
|
|
48
|
+
- If the last character is `.` or `,`, strip it from the value (slice off the last character).
|
|
49
|
+
- Then update local state with the sanitized value.
|
|
50
|
+
- This "eating" of separator characters replicates Pega's native integer field behavior.
|
|
51
|
+
4. **Input mode:** Set `inputMode='numeric'` and `pattern='[0-9]*'` on the input element for mobile keyboards.
|
|
52
|
+
5. **Input type:** Use `type='text'` (NOT `type='number'`) — this avoids browser-specific number input quirks.
|
|
53
|
+
6. **On blur:** Commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and `inputValue`.
|
|
54
|
+
7. **Read-only:** Delegate to `TextInput`, passing all inputs through.
|
|
55
|
+
|
|
56
|
+
## Display Mode Rendering
|
|
57
|
+
|
|
58
|
+
- **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value` set to the raw `value`.
|
|
59
|
+
- **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked layout variant.
|
|
60
|
+
|
|
61
|
+
## Read-Only Rendering
|
|
62
|
+
|
|
63
|
+
Delegate to `TextInput`, passing all inputs through.
|
|
64
|
+
|
|
65
|
+
## Visual Specifications
|
|
66
|
+
|
|
67
|
+
Identical to `TextInput` visually:
|
|
68
|
+
|
|
69
|
+
| Property | Value |
|
|
70
|
+
| ------------- | -------------------------------------------- |
|
|
71
|
+
| Width | 100% |
|
|
72
|
+
| Size | Small (~40px height) |
|
|
73
|
+
| Variant | Outlined |
|
|
74
|
+
| Border | 1px solid |
|
|
75
|
+
| Border radius | 4px |
|
|
76
|
+
| Error state | Red border + red helper text |
|
|
77
|
+
| Input mode | `numeric` (shows numeric keyboard on mobile) |
|
|
78
|
+
| Pattern | `[0-9]*` |
|
|
79
|
+
|
|
80
|
+
## Edge Cases & Special Logic
|
|
81
|
+
|
|
82
|
+
- **Character filtering is inline** — do NOT use `type='number'` as it introduces inconsistent behavior across browsers (e.g., accepts `e`, `+`, `-` by default).
|
|
83
|
+
- The disallowed characters array is `['.', ',']` — both decimal point and thousands separator are rejected.
|
|
84
|
+
- Strip only the LAST character if it is disallowed — do not strip from anywhere else in the string (user may paste a valid integer that is then validated by blur).
|
|
85
|
+
- The blur handler is omitted when `readOnly`.
|
|
86
|
+
|
|
87
|
+
## Dependencies
|
|
88
|
+
|
|
89
|
+
- The project's event-commit utility.
|
|
90
|
+
- The project's component registry, resolving `TextInput` — for read-only delegation.
|
|
91
|
+
- The project's component registry, resolving `FieldValueList` — for display modes.
|
|
92
|
+
|
|
93
|
+
## Design System Mapping
|
|
94
|
+
|
|
95
|
+
**UI control type:** Numeric text input (integer-only).
|
|
96
|
+
|
|
97
|
+
When implementing in a specific design system, map the following:
|
|
98
|
+
|
|
99
|
+
- **Text input** → use the DS's text input with `type='text'`, `inputMode='numeric'`, `pattern='[0-9]*'`
|
|
100
|
+
- **Character filtering** → implement in the change handler (strip `.` and `,` from the last character)
|
|
101
|
+
- **Read-only mode** → delegate to the `TextInput` component
|
|
102
|
+
- **Error state** → the DS's error/danger visual state
|