@pega/sdk 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/index.js +764 -165
- package/package.json +1 -1
- package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
- package/templates/react-native-sdk-reference/.prettierignore +17 -0
- package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
- package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
- package/templates/react-native-sdk-reference/AGENTS.md +3 -0
- package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
- package/templates/react-native-sdk-reference/README.md +56 -0
- package/templates/react-native-sdk-reference/app.json +40 -5
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
- package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
- package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
- package/templates/react-native-sdk-reference/package.json +59 -14
- package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/sdk-config.json +31 -9
- package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
- package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
- package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
- package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
- package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
- package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
- package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
- package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
- package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
- package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
- package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
- package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
- package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
- package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
- package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
- package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
- package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
- package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
- package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
- package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
- package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
- package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
- package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
- package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
- package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
- package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
- package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
- package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
- package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
- package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
- package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
- package/templates/react-native-sdk-reference/tsconfig.json +9 -8
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
- package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
- package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
- package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
- package/templates/react-sdk-reference/package.json +1 -1
- package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
- package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
- package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
- package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
- package/templates/react-native-sdk-reference/App.tsx +0 -49
- package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
- package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Collapsible or static container that groups related fields under an optional section header and instructions text.
|
|
4
4
|
|
|
5
|
-
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture,
|
|
5
|
+
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -19,61 +19,45 @@ Children are rendered inside a full-width inner container.
|
|
|
19
19
|
## Pega Metadata
|
|
20
20
|
|
|
21
21
|
- **Pega Name:** `FieldGroup`
|
|
22
|
-
- **Registration key:** `FieldGroup` (in
|
|
23
|
-
- **Does NOT use `getPConnect`** — receives children via
|
|
24
|
-
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
) : (
|
|
62
|
-
<b>{name}</b>
|
|
63
|
-
)}
|
|
64
|
-
</div>
|
|
65
|
-
)}
|
|
66
|
-
{/* Instructions (skip if === 'none') */}
|
|
67
|
-
{instructions && instructions !== 'none' && (
|
|
68
|
-
<div className="instruction-text" dangerouslySetInnerHTML={{ __html: instructions }} />
|
|
69
|
-
)}
|
|
70
|
-
{/* Children (hidden when collapsed) */}
|
|
71
|
-
{!collapsed && <div style={{ width: '100%' }}>{children}</div>}
|
|
72
|
-
</InnerFullWidth>
|
|
73
|
-
</OuterContainer>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
```
|
|
22
|
+
- **Registration key:** `FieldGroup` (in the project's component map)
|
|
23
|
+
- **Does NOT use `getPConnect`** — receives children via framework's content projection mechanism
|
|
24
|
+
|
|
25
|
+
## Component Inputs
|
|
26
|
+
|
|
27
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions.
|
|
28
|
+
|
|
29
|
+
| Name | Type | Required | Description |
|
|
30
|
+
| -------------- | ------------------ | -------- | ----------------------------------------------------------------------- |
|
|
31
|
+
| `children` | renderable content | No | Field components to render inside the group |
|
|
32
|
+
| `name` | `string` | No | Section heading displayed above the fields |
|
|
33
|
+
| `collapsible` | `boolean` | No | If `true`, the header acts as a collapse/expand toggle. Default `false` |
|
|
34
|
+
| `instructions` | `string` | No | HTML string of instruction text shown between header and fields |
|
|
35
|
+
|
|
36
|
+
## Implementation Structure
|
|
37
|
+
|
|
38
|
+
### Module Setup
|
|
39
|
+
|
|
40
|
+
The component accepts children via the framework's content projection mechanism. It maintains local state for the collapsed/expanded toggle. It does NOT import any Pega SDK modules.
|
|
41
|
+
|
|
42
|
+
The component is named `FieldGroup` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
43
|
+
|
|
44
|
+
### Component Logic
|
|
45
|
+
|
|
46
|
+
The component receives `children`, `name`, `collapsible` (defaults to `false`), and `instructions` as inputs. It maintains a `collapsed` boolean state initialized to `false` (expanded). The render tree is:
|
|
47
|
+
|
|
48
|
+
1. **Outer container** — a Grid container with `spacing={4}` and `justifyContent: 'space-between'`.
|
|
49
|
+
2. **Inner full-width wrapper** — a single Grid item at full width containing all content.
|
|
50
|
+
3. **Header section** (conditional — only if `name` is provided):
|
|
51
|
+
- Wrapped in a div with margin/padding styling (top/bottom padding of 1 spacing unit, top margin of 1 spacing unit).
|
|
52
|
+
- **Non-collapsible** (`collapsible === false`): render `<b>{name}</b>` as static bold text.
|
|
53
|
+
- **Collapsible** (`collapsible === true`): render a clickable `<span>` with `id="field-group-header"`, flex layout (`display: flex; align-items: center; gap: 5px`), and `cursor: pointer`. Inside the span:
|
|
54
|
+
- A directional arrow icon: **right-pointing arrow** when `collapsed === true`, **down-pointing arrow** when `collapsed === false`.
|
|
55
|
+
- Bold name text: `<b>{name}</b>`.
|
|
56
|
+
- Clicking the span toggles `collapsed` state.
|
|
57
|
+
4. **Instructions section** (conditional — only if `instructions` is provided AND is not the literal string `'none'`):
|
|
58
|
+
- Render a div with class `instruction-text` (padding: `5px 0`) using the framework's trusted HTML injection mechanism.
|
|
59
|
+
5. **Children section** (conditional — only if `collapsed === false`):
|
|
60
|
+
- Render children inside a full-width container div (`width: 100%`) wrapped in a Grid container.
|
|
77
61
|
|
|
78
62
|
## Behavioral Contract
|
|
79
63
|
|
|
@@ -86,37 +70,37 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
|
|
|
86
70
|
- A directional arrow icon: **right arrow** when `collapsed === true`, **down arrow** when `collapsed === false`.
|
|
87
71
|
- The bold name text beside the arrow.
|
|
88
72
|
- Clicking the span toggles `collapsed`.
|
|
89
|
-
3. **Instructions:** If `instructions` is provided AND is not the string `'none'`, render it
|
|
73
|
+
3. **Instructions:** If `instructions` is provided AND is not the string `'none'`, render it using the framework's trusted HTML injection mechanism.
|
|
90
74
|
4. **Children:** Render children inside a full-width div. If `collapsed` is `true`, do NOT render children (or instructions).
|
|
91
75
|
5. **Header cursor:** When `collapsible` is `true`, the header span uses `cursor: pointer`. When `collapsible` is `false`, cursor is `auto`.
|
|
92
76
|
6. **Layout:** All content is wrapped in a `Grid container` with `spacing={4}` and `justifyContent='space-between'`. The name row and children are inside a single inner `Grid` at full width.
|
|
93
77
|
|
|
94
78
|
## Visual Specifications
|
|
95
79
|
|
|
96
|
-
Derived from
|
|
80
|
+
Derived from the component's companion styles:
|
|
97
81
|
|
|
98
82
|
### Outer Container
|
|
99
83
|
|
|
100
|
-
| Property | Value
|
|
101
|
-
| -------- |
|
|
102
|
-
| Spacing | 4 units (≈ 32px
|
|
84
|
+
| Property | Value |
|
|
85
|
+
| -------- | ---------------- |
|
|
86
|
+
| Spacing | 4 units (≈ 32px) |
|
|
103
87
|
|
|
104
88
|
### Component Root Margins
|
|
105
89
|
|
|
106
|
-
| Property | Value
|
|
107
|
-
| ------------- |
|
|
108
|
-
| Margin right |
|
|
109
|
-
| Margin left |
|
|
110
|
-
| Margin top |
|
|
111
|
-
| Margin bottom |
|
|
90
|
+
| Property | Value |
|
|
91
|
+
| ------------- | ---------------------- |
|
|
92
|
+
| Margin right | 1 spacing unit (≈ 8px) |
|
|
93
|
+
| Margin left | 1 spacing unit |
|
|
94
|
+
| Margin top | 1 spacing unit |
|
|
95
|
+
| Margin bottom | 1 spacing unit |
|
|
112
96
|
|
|
113
97
|
### Field Margin (name row)
|
|
114
98
|
|
|
115
|
-
| Property | Value
|
|
116
|
-
| -------------- |
|
|
117
|
-
| Padding top |
|
|
118
|
-
| Padding bottom |
|
|
119
|
-
| Margin top |
|
|
99
|
+
| Property | Value |
|
|
100
|
+
| -------------- | -------------- |
|
|
101
|
+
| Padding top | 1 spacing unit |
|
|
102
|
+
| Padding bottom | 1 spacing unit |
|
|
103
|
+
| Margin top | 1 spacing unit |
|
|
120
104
|
|
|
121
105
|
### Header Row (collapsible)
|
|
122
106
|
|
|
@@ -154,25 +138,16 @@ Derived from `FieldGroup.tsx` makeStyles:
|
|
|
154
138
|
## Dependencies
|
|
155
139
|
|
|
156
140
|
- No Pega SDK imports required (no `getPConnect`)
|
|
157
|
-
- Arrow icons:
|
|
141
|
+
- Arrow icons: use a right-pointing arrow icon (collapsed) and a down-pointing arrow icon (expanded) from the chosen design system's icon set, or use Unicode characters (`▶`/`▼` or `›`/`⌄`)
|
|
158
142
|
|
|
159
143
|
## Design System Mapping
|
|
160
144
|
|
|
161
145
|
**UI control type:** Collapsible section container with label, instructions, and children.
|
|
162
146
|
|
|
163
|
-
Listed design systems are examples only.
|
|
164
|
-
|
|
165
|
-
| Design System | Recommended Component |
|
|
166
|
-
| ------------------ | ----------------------------------------------------------------------- |
|
|
167
|
-
| Default (CSS only) | `<div>` with toggled `display: none` on children, `<b>` header |
|
|
168
|
-
| MUI | Grid container with `KeyboardArrowRight/Down` icons for collapse toggle |
|
|
169
|
-
| Ant Design | `<Collapse>` or `<Card>` with collapsible panels |
|
|
170
|
-
| Chakra UI | `<Accordion>` or manual `<Box>` with toggle state |
|
|
171
|
-
| Shadcn/ui | `<Collapsible>` + `<CollapsibleTrigger>` + `<CollapsibleContent>` |
|
|
172
|
-
|
|
173
147
|
When implementing in a specific design system, map the following:
|
|
174
148
|
|
|
175
|
-
-
|
|
176
|
-
- Arrow direction →
|
|
177
|
-
-
|
|
178
|
-
- Full-width children → ensure children container spans the full group width
|
|
149
|
+
- **Collapse toggle** → use the DS's collapse/accordion component if available, or implement manually with local state toggling visibility of the children section
|
|
150
|
+
- **Arrow direction icon** → use the DS's chevron/arrow icon that points right when collapsed and down when expanded
|
|
151
|
+
- **`instructions` HTML** → render as raw/trusted HTML content using the framework's mechanism for injecting HTML strings
|
|
152
|
+
- **Full-width children** → ensure the children container spans the full group width
|
|
153
|
+
- **Header click** → when `collapsible` is `true`, the entire header row (icon + name) is clickable and toggles the collapsed state
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Repeating list of named field groups, each with its own children. Supports per-item delete and a global "+Add" link at the bottom.
|
|
4
4
|
|
|
5
|
-
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture,
|
|
5
|
+
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -13,66 +13,56 @@ Renders a vertical list of field group items. Each item has a bold name header,
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `FieldGroupList`
|
|
16
|
-
- **Registration key:** `FieldGroupList` (in
|
|
17
|
-
- **Does NOT use `getPConnect`** — receives all data as direct
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
| `
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
))}
|
|
60
|
-
{props.onAdd && (
|
|
61
|
-
<LinkButton onClick={props.onAdd} style={{ cursor: 'pointer' }}>+Add</LinkButton>
|
|
62
|
-
)}
|
|
63
|
-
</InnerGrid>
|
|
64
|
-
</InnerFullWidth>
|
|
65
|
-
</OuterContainer>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
```
|
|
16
|
+
- **Registration key:** `FieldGroupList` (in the project's component map)
|
|
17
|
+
- **Does NOT use `getPConnect`** — receives all data as direct inputs
|
|
18
|
+
|
|
19
|
+
## Component Inputs
|
|
20
|
+
|
|
21
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions.
|
|
22
|
+
|
|
23
|
+
| Name | Type | Required | Description |
|
|
24
|
+
| ---------- | ------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| `items` | `Array<{ name: string; id: string; children: renderable content }>` | Yes | List of field group items to render |
|
|
26
|
+
| `onDelete` | `(id: string) => void` | No | Called with the item's `id` when the delete button is clicked. If not provided, no delete button is shown |
|
|
27
|
+
| `onAdd` | `() => void` | No | Called when the "+Add" link is clicked. If not provided, no add link or dividers are shown |
|
|
28
|
+
|
|
29
|
+
## Implementation Structure
|
|
30
|
+
|
|
31
|
+
### Module Setup
|
|
32
|
+
|
|
33
|
+
The component uses the project's utility helper to resolve the trash icon path. It does NOT import any Pega SDK modules.
|
|
34
|
+
|
|
35
|
+
The component is named `FieldGroupList` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
36
|
+
|
|
37
|
+
### Component Logic
|
|
38
|
+
|
|
39
|
+
The component receives `items`, `onDelete`, and `onAdd` as inputs. At the top of the logic, resolve the trash icon source: call `Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl())` and store the result.
|
|
40
|
+
|
|
41
|
+
The render tree is:
|
|
42
|
+
|
|
43
|
+
1. **Outer container** — a grid container with spacing of 4 units (≈32px) and `justifyContent: 'space-between'`.
|
|
44
|
+
2. **Inner full-width wrapper** — a single grid cell at full width.
|
|
45
|
+
3. **Inner grid** — a grid container with spacing of 1 unit (≈8px), containing the iterated items.
|
|
46
|
+
4. **Item iteration** — for each item in `items`, render a full-width grid cell keyed by `item.name`:
|
|
47
|
+
- Render `<b>{item.name}</b>` as the item header.
|
|
48
|
+
- **Delete button** (conditional — only if `onDelete` is provided):
|
|
49
|
+
- Floated right (`float: right`).
|
|
50
|
+
- `type="button"`, `id` set to `"delete-row-{item.id}"`, `aria-label="Delete Row"`.
|
|
51
|
+
- Class: `psdk-utility-button`.
|
|
52
|
+
- On click: call `onDelete(item.id)`.
|
|
53
|
+
- Contains an `<img>` with class `psdk-utility-card-action-svg-icon` and `src` set to the resolved trash icon path.
|
|
54
|
+
- Render `{item.children}` (the field group content).
|
|
55
|
+
- Render a `<br />` for spacing.
|
|
56
|
+
- **Divider** (conditional — only if `onAdd` is provided): render a horizontal divider element followed by another `<br />`.
|
|
57
|
+
5. **Add link** (conditional — only if `onAdd` is provided):
|
|
58
|
+
- After all items, render a clickable link with text `"+Add"`, `cursor: pointer`, underline on hover, and click handler wired to `onAdd`.
|
|
69
59
|
|
|
70
60
|
## Behavioral Contract
|
|
71
61
|
|
|
72
|
-
1. Render a
|
|
73
|
-
2. Inside, render a full-width inner
|
|
74
|
-
3. For **each item** in `
|
|
75
|
-
- Render a full-width
|
|
62
|
+
1. Render a grid container with spacing of 4 units (≈32px) and `justifyContent='space-between'` as the outer wrapper.
|
|
63
|
+
2. Inside, render a full-width inner grid with spacing of 1 unit (≈8px).
|
|
64
|
+
3. For **each item** in `items`:
|
|
65
|
+
- Render a full-width grid cell keyed by `item.name`.
|
|
76
66
|
- Render `<b>{item.name}</b>` as the item header.
|
|
77
67
|
- If `onDelete` is provided, render a delete button:
|
|
78
68
|
- Floated right.
|
|
@@ -83,12 +73,12 @@ export default function FieldGroupList(props: FieldGroupListProps) {
|
|
|
83
73
|
- Image class: `psdk-utility-card-action-svg-icon`.
|
|
84
74
|
- Render `{item.children}`.
|
|
85
75
|
- Render `<br />`.
|
|
86
|
-
- If `onAdd` is provided: render
|
|
87
|
-
4. After all items, if `onAdd` is provided, render a
|
|
76
|
+
- If `onAdd` is provided: render a horizontal divider, then `<br />`.
|
|
77
|
+
4. After all items, if `onAdd` is provided, render a clickable link element with text `'+Add'`, `cursor: pointer`, and click handler calling `onAdd`.
|
|
88
78
|
|
|
89
79
|
## Visual Specifications
|
|
90
80
|
|
|
91
|
-
Derived from
|
|
81
|
+
Derived from the component source:
|
|
92
82
|
|
|
93
83
|
### Outer Layout
|
|
94
84
|
|
|
@@ -131,26 +121,16 @@ Derived from `FieldGroupList.tsx`:
|
|
|
131
121
|
|
|
132
122
|
## Dependencies
|
|
133
123
|
|
|
134
|
-
- `Utils`
|
|
124
|
+
- The project's `Utils` helper — for `getImageSrc` and `getSDKStaticConentUrl` (used only for the trash icon)
|
|
135
125
|
- No Pega SDK `getPConnect` imports required
|
|
136
126
|
|
|
137
127
|
## Design System Mapping
|
|
138
128
|
|
|
139
129
|
**UI control type:** Repeating list of named groups with optional delete and add actions.
|
|
140
130
|
|
|
141
|
-
Listed design systems are examples only.
|
|
142
|
-
|
|
143
|
-
| Design System | Recommended Component |
|
|
144
|
-
| ------------------ | --------------------------------------------------------------------- |
|
|
145
|
-
| Default (CSS only) | Flex column layout with `<hr>` divider and `<button>` delete |
|
|
146
|
-
| MUI | `<Grid container>` items with `<Divider>` and `<Link>` for "+Add" |
|
|
147
|
-
| Ant Design | `<List>` items with `<Divider>` and `<Button type='link'>` for "+Add" |
|
|
148
|
-
| Chakra UI | `<VStack>` with `<Divider>` and `<Button variant='link'>` |
|
|
149
|
-
| Shadcn/ui | `<div>` flex column with `<Separator>` and a link button |
|
|
150
|
-
|
|
151
131
|
When implementing in a specific design system, map the following:
|
|
152
132
|
|
|
153
|
-
- Delete button → icon button or
|
|
154
|
-
- Divider between items →
|
|
155
|
-
- "+Add" link →
|
|
156
|
-
- Trash icon →
|
|
133
|
+
- **Delete button** → use the DS's icon button or danger-variant button placed at the item top-right. Use a trash/delete icon from the DS's icon set.
|
|
134
|
+
- **Divider between items** → use the DS's horizontal divider/separator component (only when `onAdd` is present)
|
|
135
|
+
- **"+Add" link** → use the DS's link button or text-variant button that calls `onAdd`
|
|
136
|
+
- **Trash icon** → use the DS's delete/trash icon, or fall back to the SDK's `Utils.getImageSrc('trash', ...)` path
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Single field-value pair display component. Renders a label and value in either an inline (side-by-side) or stacked layout. Also used as a display mode renderer by field components (e.g., `TextInput`, `Dropdown`, etc.).
|
|
4
4
|
|
|
5
|
-
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture,
|
|
5
|
+
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -18,63 +18,48 @@ When no name is provided, only the value is rendered at full width. Used directl
|
|
|
18
18
|
## Pega Metadata
|
|
19
19
|
|
|
20
20
|
- **Pega Name:** `FieldValueList`
|
|
21
|
-
- **Registration key:** `FieldValueList` (in
|
|
22
|
-
- **Does NOT use `getPConnect`** — receives all data as direct
|
|
21
|
+
- **Registration key:** `FieldValueList` (in the project's component map)
|
|
22
|
+
- **Does NOT use `getPConnect`** — receives all data as direct inputs
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Component Inputs
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions.
|
|
27
|
+
|
|
28
|
+
| Name | Type | Required | Description |
|
|
27
29
|
| --------- | --------- | -------- | ----------------------------------------------------- |
|
|
28
30
|
| `name` | `string` | No | Field label. If omitted, only the value is rendered |
|
|
29
31
|
| `value` | `any` | Yes | Field value to display |
|
|
30
32
|
| `variant` | `string` | No | Layout: `'inline'` (default) or `'stacked'` |
|
|
31
33
|
| `isHtml` | `boolean` | No | If `true`, render value as raw HTML (default `false`) |
|
|
32
34
|
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
? <Value typography="h6" style={{ paddingTop: 0 }} dangerouslySetInnerHTML={{ __html: formattedValue }} />
|
|
62
|
-
: <Value typography="h6" style={{ paddingTop: 0 }}>{formattedValue}</Value>}
|
|
63
|
-
</Row>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// 4. Inline variant (default): label 4 cols, value 8 cols
|
|
68
|
-
return (
|
|
69
|
-
<Row>
|
|
70
|
-
<Label xs={4}>{name}</Label>
|
|
71
|
-
{isHtml
|
|
72
|
-
? <Value xs={8} dangerouslySetInnerHTML={{ __html: formattedValue }} />
|
|
73
|
-
: <Value xs={8}>{formattedValue}</Value>}
|
|
74
|
-
</Row>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
```
|
|
35
|
+
## Implementation Structure
|
|
36
|
+
|
|
37
|
+
### Module Setup
|
|
38
|
+
|
|
39
|
+
The component does NOT import any Pega SDK modules — all data arrives via direct inputs. It uses a grid layout and text elements from the chosen design system.
|
|
40
|
+
|
|
41
|
+
The component is named `FieldValueList` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
42
|
+
|
|
43
|
+
### Component Logic
|
|
44
|
+
|
|
45
|
+
The component receives `name`, `value`, `variant` (defaults to `'inline'`), and `isHtml` (defaults to `false`) as inputs, then follows this rendering logic:
|
|
46
|
+
|
|
47
|
+
1. **Empty value fallback** — if `value` is `undefined` or an empty string (`''`), substitute with the placeholder string `'---'`.
|
|
48
|
+
|
|
49
|
+
2. **No-name path** — if `name` is not provided (falsy), render only the value at full width (12 columns):
|
|
50
|
+
- Use heading-6 text (≈1.25rem, weight 500) if `variant === 'stacked'`, otherwise use body-small text (≈0.875rem).
|
|
51
|
+
- If `isHtml` is true, render value as raw HTML.
|
|
52
|
+
- Return early (do not render a label).
|
|
53
|
+
|
|
54
|
+
3. **Stacked variant path** — if `variant === 'stacked'`, render a column-direction layout:
|
|
55
|
+
- **Label row:** full-width (12 columns), with `paddingBottom: 0` to sit tight above the value. Text style: body-small (≈0.875rem), secondary text color, `fontWeight: 400`.
|
|
56
|
+
- **Value row:** full-width (12 columns), with `paddingTop: 0` to sit tight below the label. Text style: heading-6 (≈1.25rem, weight 500, larger/more prominent). If `isHtml`, render as raw HTML.
|
|
57
|
+
|
|
58
|
+
4. **Inline variant path** (default) — render a side-by-side row layout:
|
|
59
|
+
- **Label cell:** occupies 4 of 12 columns. Text style: body-small (≈0.875rem), secondary text color, `fontWeight: 400`. Contains `name`.
|
|
60
|
+
- **Value cell:** occupies 8 of 12 columns (or 12 if no name). Text style: body-small (≈0.875rem), primary text color. If `isHtml`, render as raw HTML.
|
|
61
|
+
|
|
62
|
+
5. **Layout wrapper** — all variants render inside a container row (Grid container) with `spacing={4}` and `justifyContent: 'space-between'`.
|
|
78
63
|
|
|
79
64
|
## Behavioral Contract
|
|
80
65
|
|
|
@@ -83,35 +68,35 @@ export default function FieldValueList({ name, value, variant, isHtml = false }:
|
|
|
83
68
|
3. **Inline variant** (default — `variant !== 'stacked'`):
|
|
84
69
|
- Label column: 4 of 12 columns.
|
|
85
70
|
- Value column: 8 of 12 columns (or 12 if no name).
|
|
86
|
-
- Label: secondary text color,
|
|
87
|
-
- Value: primary text color,
|
|
71
|
+
- Label: secondary text color, body-small text (≈0.875rem), `fontWeight: 400`.
|
|
72
|
+
- Value: primary text color, body-small text (≈0.875rem).
|
|
88
73
|
4. **Stacked variant** (`variant === 'stacked'`):
|
|
89
74
|
- Label column: 12 of 12, `paddingBottom: 0` (label sits tight above value).
|
|
90
75
|
- Value column: 12 of 12, `paddingTop: 0` (value sits tight below label).
|
|
91
|
-
- Label: secondary text color,
|
|
92
|
-
- Value: primary text color,
|
|
93
|
-
5. **HTML rendering:** If `isHtml` is `true`,
|
|
76
|
+
- Label: secondary text color, body-small text (≈0.875rem), `fontWeight: 400`.
|
|
77
|
+
- Value: primary text color, **heading-6 text** (≈1.25rem, weight 500 — larger / more prominent than inline).
|
|
78
|
+
5. **HTML rendering:** If `isHtml` is `true`, render the formatted value as raw HTML content using the framework's mechanism for injecting HTML strings. The formatted value (with `'---'` fallback) is passed as the HTML content.
|
|
94
79
|
6. **Layout wrapper:** Render everything inside a container row with space-between justification and consistent spacing.
|
|
95
80
|
|
|
96
81
|
## Visual Specifications
|
|
97
82
|
|
|
98
|
-
Derived from
|
|
83
|
+
Derived from the component's companion styles:
|
|
99
84
|
|
|
100
85
|
### Label
|
|
101
86
|
|
|
102
|
-
| Property | Value
|
|
103
|
-
| ----------- |
|
|
104
|
-
| Font weight | 400
|
|
105
|
-
| Color |
|
|
106
|
-
|
|
|
87
|
+
| Property | Value |
|
|
88
|
+
| ----------- | ------------------------------ |
|
|
89
|
+
| Font weight | 400 |
|
|
90
|
+
| Color | secondary text color (muted) |
|
|
91
|
+
| Text size | body-small (≈ 0.875rem / 14px) |
|
|
107
92
|
|
|
108
93
|
### Value
|
|
109
94
|
|
|
110
|
-
| Property
|
|
111
|
-
|
|
|
112
|
-
| Color
|
|
113
|
-
|
|
|
114
|
-
|
|
|
95
|
+
| Property | Value |
|
|
96
|
+
| ------------------- | ---------------------------------------- |
|
|
97
|
+
| Color | primary text color (default) |
|
|
98
|
+
| Text size (inline) | body-small (≈ 0.875rem / 14px) |
|
|
99
|
+
| Text size (stacked) | heading-6 (≈ 1.25rem / 20px, weight 500) |
|
|
115
100
|
|
|
116
101
|
### Padding Adjustments (stacked only)
|
|
117
102
|
|
|
@@ -131,10 +116,10 @@ Derived from `FieldValueList.tsx` makeStyles:
|
|
|
131
116
|
|
|
132
117
|
## Edge Cases & Special Logic
|
|
133
118
|
|
|
134
|
-
- `value` can be any type (string, number, boolean,
|
|
135
|
-
- When `isHtml` is `true`,
|
|
136
|
-
- When `variant` is `'stacked'` and `name` is absent, render value at 12 cols with
|
|
137
|
-
- When `variant` is `'inline'` and `name` is absent, render value at 12 cols with
|
|
119
|
+
- `value` can be any type (string, number, boolean, rendered element). Render it as-is unless it's empty/undefined.
|
|
120
|
+
- When `isHtml` is `true`, render the raw HTML from the formatted value using the framework's HTML injection mechanism — do NOT sanitize (the caller is responsible). Ensure value is a string before injecting.
|
|
121
|
+
- When `variant` is `'stacked'` and `name` is absent, render value at 12 cols with heading-6 text.
|
|
122
|
+
- When `variant` is `'inline'` and `name` is absent, render value at 12 cols with body-small text.
|
|
138
123
|
|
|
139
124
|
## Dependencies
|
|
140
125
|
|
|
@@ -145,20 +130,11 @@ Derived from `FieldValueList.tsx` makeStyles:
|
|
|
145
130
|
|
|
146
131
|
**UI control type:** Read-only field label/value display pair.
|
|
147
132
|
|
|
148
|
-
Listed design systems are examples only.
|
|
149
|
-
|
|
150
|
-
| Design System | Recommended Component |
|
|
151
|
-
| ------------------ | ------------------------------------------------------------------------------------ |
|
|
152
|
-
| Default (CSS only) | `<div class='field-value-inline'>` or `<div class='field-value-stacked'>` with CSS |
|
|
153
|
-
| MUI | `<Grid container>` with `<Typography>` for label and value |
|
|
154
|
-
| Ant Design | `<Descriptions>` item, or `<Typography.Text type='secondary'>` + `<Typography.Text>` |
|
|
155
|
-
| Chakra UI | `<Stack direction='row'>` (inline) or `<Stack spacing={0}>` (stacked) |
|
|
156
|
-
| Shadcn/ui | Custom label/value pair with Tailwind flex utilities |
|
|
157
|
-
|
|
158
133
|
When implementing in a specific design system, map the following:
|
|
159
134
|
|
|
160
|
-
- Label → secondary/muted text style
|
|
161
|
-
- Value inline → same size as label
|
|
162
|
-
- Value stacked → larger
|
|
163
|
-
- Empty value → always display `'---'` (never show blank)
|
|
164
|
-
- `
|
|
135
|
+
- **Label** → secondary/muted text style (body-small size)
|
|
136
|
+
- **Value inline** → same size as label (body-small), primary text color
|
|
137
|
+
- **Value stacked** → larger text (heading-6 equivalent, ≈1.25rem, weight 500)
|
|
138
|
+
- **Empty value** → always display `'---'` (never show blank)
|
|
139
|
+
- **`isHtml` = true** → use the framework's mechanism for rendering raw HTML content
|
|
140
|
+
- **Grid layout** → use the DS's grid system with 4/8 column split (inline) or 12/12 stacked columns
|