@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/template-skills/MultiReferenceReadOnly.md
CHANGED
|
@@ -8,17 +8,17 @@ Multi-reference read-only template. Routes to `SimpleTableSelectReadonly` or `Si
|
|
|
8
8
|
|
|
9
9
|
## Component Purpose
|
|
10
10
|
|
|
11
|
-
Renders a multi-value reference field in read-only mode. Routing is based on the `displayAs`
|
|
11
|
+
Renders a multi-value reference field in read-only mode. Routing is based on the `displayAs` input: certain display variants use `SimpleTableSelectReadonly` (link + modal), while others use `SimpleTable` directly.
|
|
12
12
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
|
-
- **Registration key:** `MultiReferenceReadOnly` (in
|
|
15
|
+
- **Registration key:** `MultiReferenceReadOnly` (in the project's component map)
|
|
16
16
|
- **Category:** Display template — read-only multi-reference
|
|
17
|
-
- **Extends:**
|
|
17
|
+
- **Extends:** the project's base component interface
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Inputs
|
|
20
20
|
|
|
21
|
-
|
|
|
21
|
+
| Input | Type | Required | Description |
|
|
22
22
|
| --------------------- | ---------- | -------- | -------------------------------------------------------- |
|
|
23
23
|
| `displayAs` | `string` | Yes | UI variant that was used in edit mode |
|
|
24
24
|
| `referenceList` | `string` | No | Property path to the reference list |
|
|
@@ -26,56 +26,16 @@ Renders a multi-value reference field in read-only mode. Routing is based on the
|
|
|
26
26
|
| `fieldMetadata` | `object` | No | Field-level metadata |
|
|
27
27
|
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
28
28
|
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
displayAs?: any;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default function MultiReferenceReadOnly(props: MultiReferenceReadOnlyProps) {
|
|
43
|
-
const { getPConnect, label = '', hideLabel = false, config, displayMode, displayAs } = props;
|
|
44
|
-
const { referenceList, readonlyContextList } = config;
|
|
45
|
-
|
|
46
|
-
// 1. Route: SimpleTableSelectReadonly for specific displayAs values
|
|
47
|
-
if (['readonlyMulti', 'combobox', 'checkboxgroup'].includes(displayAs)) {
|
|
48
|
-
return getPConnect().createComponent({
|
|
49
|
-
type: 'SimpleTableSelectReadonly',
|
|
50
|
-
config: { ...config, displayMode, label, hideLabel, displayAs },
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// 2. Fallback: use readonlyContextList if referenceList is not a property annotation
|
|
55
|
-
let readonlyContextObject;
|
|
56
|
-
if (!PCore.getAnnotationUtils().isProperty(referenceList)) {
|
|
57
|
-
readonlyContextObject = { referenceList: readonlyContextList };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// 3. Route: SimpleTable for all other displayAs values
|
|
61
|
-
const component = getPConnect().createComponent(
|
|
62
|
-
{ type: 'SimpleTable', config: { ...config, ...readonlyContextObject, label, hideLabel } },
|
|
63
|
-
'', 0, {},
|
|
64
|
-
);
|
|
65
|
-
return <>{component}</>;
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Behavioral Contract
|
|
70
|
-
|
|
71
|
-
### Routing by `displayAs`
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
if displayAs in ['readonlyMulti', 'combobox', 'checkboxgroup']:
|
|
75
|
-
→ render SimpleTableSelectReadonly
|
|
76
|
-
else:
|
|
77
|
-
→ render SimpleTable (with readOnly=true / displayMode='DISPLAY_ONLY')
|
|
78
|
-
```
|
|
29
|
+
## Implementation Structure
|
|
30
|
+
|
|
31
|
+
**Module Setup:** This component requires the project's base component interface. Define a component input contract extending the base interface with `config: { referenceList, readonlyContextList }`, `label` (string), `hideLabel` (boolean), and optional `displayMode`/`displayAs`.
|
|
32
|
+
|
|
33
|
+
**Main Component Logic** — steps in order:
|
|
34
|
+
|
|
35
|
+
1. Receive inputs: `getPConnect`, `label` (default `''`), `hideLabel` (default `false`), `config`, `displayMode`, and `displayAs`; further extract `referenceList` and `readonlyContextList` from `config`.
|
|
36
|
+
2. **Route to `SimpleTableSelectReadonly`:** if `displayAs` is one of `'readonlyMulti'`, `'combobox'`, or `'checkboxgroup'`, return `getPConnect().createComponent({ type: 'SimpleTableSelectReadonly', config: { ...config, displayMode, label, hideLabel, displayAs } })`.
|
|
37
|
+
3. **Reference list fallback:** if `referenceList` is not recognized as a property annotation (checked via `PCore.getAnnotationUtils().isProperty(referenceList)`), build a `readonlyContextObject = { referenceList: readonlyContextList }` to use in its place.
|
|
38
|
+
4. **Route to `SimpleTable`:** for all other `displayAs` values, call `getPConnect().createComponent({ type: 'SimpleTable', config: { ...config, ...readonlyContextObject, label, hideLabel } }, '', 0, {})` and render the result.
|
|
79
39
|
|
|
80
40
|
### Reference List Fallback
|
|
81
41
|
|
|
@@ -109,14 +69,9 @@ See `SimpleTable.md` and `ListView.md` for detailed visual specs.
|
|
|
109
69
|
|
|
110
70
|
**UI control type:** Read-only multi-value reference display — routes to modal table or flat table.
|
|
111
71
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| `displayAs` | Routing | DS Implementation |
|
|
115
|
-
| -------------------------------------------- | --------------------------- | -------------------- |
|
|
116
|
-
| `readonlyMulti`, `combobox`, `checkboxgroup` | `SimpleTableSelectReadonly` | Link/chip + modal |
|
|
117
|
-
| All others | `SimpleTable` | Flat read-only table |
|
|
118
|
-
|
|
119
|
-
When implementing in a specific design system:
|
|
72
|
+
When implementing in a specific design system, map the following:
|
|
120
73
|
|
|
121
|
-
-
|
|
122
|
-
- `
|
|
74
|
+
- When `displayAs` is `'readonlyMulti'`, `'combobox'`, or `'checkboxgroup'`, route to `SimpleTableSelectReadonly` — typically rendered as a link/chip showing selection count with a modal dialog for details.
|
|
75
|
+
- For all other `displayAs` values, route to `SimpleTable` — typically rendered as a flat read-only table.
|
|
76
|
+
- The `displayAs` routing list must match the edit-mode variants defined in `DataReference.md`.
|
|
77
|
+
- `readonlyContextList` fallback is critical — reference list data may not be available on initial render.
|
|
@@ -10,8 +10,8 @@ Asymmetric two-column layout with a narrow left column (~33%) and a wide right c
|
|
|
10
10
|
|
|
11
11
|
Renders two children side by side with the left column narrower than the right. Used for case layouts where a sidebar panel sits beside a main content area. Four sub-variants:
|
|
12
12
|
|
|
13
|
-
- **`NarrowWide`** — core CSS-based layout, accepts either `a`/`b` slot
|
|
14
|
-
- **`NarrowWidePage`** — wrapper that passes
|
|
13
|
+
- **`NarrowWide`** — core CSS-based layout, accepts either `a`/`b` slot inputs or `children[0]`/`children[1]`
|
|
14
|
+
- **`NarrowWidePage`** — wrapper that passes children as `a` and `b` slot inputs to `NarrowWide`
|
|
15
15
|
- **`NarrowWideForm`** — simplified wrapper using only `children` (no `a`/`b` slots, no title/icon)
|
|
16
16
|
- **`NarrowWideDetails`** — details read-only variant; sets children to DISPLAY_ONLY mode and supports highlighted data
|
|
17
17
|
|
|
@@ -24,110 +24,69 @@ Renders two children side by side with the left column narrower than the right.
|
|
|
24
24
|
| NarrowWideForm | `NarrowWideForm` |
|
|
25
25
|
| NarrowWideDetails | `NarrowWideDetails` |
|
|
26
26
|
|
|
27
|
-
All extend
|
|
27
|
+
All extend the project's base component interface.
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Inputs
|
|
30
30
|
|
|
31
31
|
### NarrowWide
|
|
32
32
|
|
|
33
|
-
|
|
|
34
|
-
| ---------- |
|
|
35
|
-
| `children` |
|
|
36
|
-
| `a` | `any`
|
|
37
|
-
| `b` | `any`
|
|
38
|
-
| `title` | `string`
|
|
39
|
-
| `cols` | `string`
|
|
40
|
-
| `icon` | `string`
|
|
33
|
+
| Name | Type | Required | Description |
|
|
34
|
+
| ---------- | ------------------ | -------- | ---------------------------------------------------------- |
|
|
35
|
+
| `children` | renderable content | No | Two children rendered in narrow/wide slots |
|
|
36
|
+
| `a` | `any` | No | Narrow (left) column content |
|
|
37
|
+
| `b` | `any` | No | Wide (right) column content |
|
|
38
|
+
| `title` | `string` | No | Optional title (not rendered in reference implementation) |
|
|
39
|
+
| `cols` | `string` | No | Column template (not rendered in reference implementation) |
|
|
40
|
+
| `icon` | `string` | No | Optional icon (not rendered in reference implementation) |
|
|
41
41
|
|
|
42
42
|
### NarrowWidePage
|
|
43
43
|
|
|
44
|
-
|
|
|
45
|
-
| ------------- |
|
|
46
|
-
| `children` |
|
|
47
|
-
| `title` | `string`
|
|
48
|
-
| `templateCol` | `string`
|
|
49
|
-
| `icon` | `string`
|
|
44
|
+
| Name | Type | Required | Description |
|
|
45
|
+
| ------------- | ------------------ | -------- | ----------------------------------------------------- |
|
|
46
|
+
| `children` | renderable content | Yes | Two children — `[0]` → narrow slot, `[1]` → wide slot |
|
|
47
|
+
| `title` | `string` | Yes | Page title (passed to NarrowWide) |
|
|
48
|
+
| `templateCol` | `string` | No | Column ratio (default `'1fr 1fr'`) |
|
|
49
|
+
| `icon` | `string` | No | Icon name (strips `'pi pi-'` prefix) |
|
|
50
50
|
|
|
51
51
|
### NarrowWideForm
|
|
52
52
|
|
|
53
|
-
|
|
|
54
|
-
| ---------- |
|
|
55
|
-
| `children` |
|
|
53
|
+
| Name | Type | Required | Description |
|
|
54
|
+
| ---------- | ------------------ | -------- | ----------------------------------------------------- |
|
|
55
|
+
| `children` | renderable content | Yes | Two children — `[0]` → narrow slot, `[1]` → wide slot |
|
|
56
56
|
|
|
57
57
|
### NarrowWideDetails
|
|
58
58
|
|
|
59
|
-
|
|
|
59
|
+
| Name | Type | Required | Description |
|
|
60
60
|
| --------------------- | ---------- | -------- | ------------------------------------------------------------------------- |
|
|
61
61
|
| `label` | `string` | Yes | Section label for FieldGroup |
|
|
62
62
|
| `showLabel` | `boolean` | No | Whether to show the label. Default `true` |
|
|
63
63
|
| `showHighlightedData` | `boolean` | No | Whether to render highlighted data fields above children. Default `false` |
|
|
64
64
|
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
65
65
|
|
|
66
|
-
##
|
|
66
|
+
## Implementation Structure
|
|
67
67
|
|
|
68
68
|
### NarrowWide (core)
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export default function NarrowWide(props: PropsWithChildren<NarrowWideProps>) {
|
|
80
|
-
const { a, b, children } = props;
|
|
81
|
-
return (
|
|
82
|
-
<>
|
|
83
|
-
{children && (children as ReactElement[]).length === 2 && (
|
|
84
|
-
<div className="psdk-narrow-wide-column">
|
|
85
|
-
<div className="psdk-narrow-column-column">{children[0]}</div>
|
|
86
|
-
<div className="psdk-wide-column-column">{children[1]}</div>
|
|
87
|
-
</div>
|
|
88
|
-
)}
|
|
89
|
-
{a && b && (
|
|
90
|
-
<div className="psdk-narrow-wide-column">
|
|
91
|
-
<div className="psdk-narrow-column-column">{a}</div>
|
|
92
|
-
<div className="psdk-wide-column-column">{b}</div>
|
|
93
|
-
</div>
|
|
94
|
-
)}
|
|
95
|
-
</>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
```
|
|
70
|
+
**Module Setup:** Define the input contract as an extension of the project's base component interface, adding `a`, `b`, optional `title`, optional `cols`, and optional `icon` fields, and accepting children via the framework's content projection mechanism. Import a companion stylesheet for the layout CSS classes.
|
|
71
|
+
|
|
72
|
+
**Main Component Logic** — steps in order:
|
|
73
|
+
|
|
74
|
+
1. Receive `a`, `b`, and `children` from inputs.
|
|
75
|
+
2. When `children` is present and has exactly 2 items, render a `.psdk-narrow-wide-column` container containing a `.psdk-narrow-column-column` element with `children[0]` and a `.psdk-wide-column-column` element with `children[1]`.
|
|
76
|
+
3. When both `a` and `b` are present, render the same `.psdk-narrow-wide-column` / `.psdk-narrow-column-column` / `.psdk-wide-column-column` structure but with `a` and `b` in place of the children.
|
|
77
|
+
4. Both render branches can coexist in the returned fragment — whichever condition is true determines what actually renders.
|
|
99
78
|
|
|
100
79
|
### NarrowWidePage
|
|
101
80
|
|
|
102
|
-
|
|
103
|
-
const NarrowWide = getComponentFromRegistry('NarrowWide');
|
|
104
|
-
const { children, title, templateCol = '1fr 1fr', icon = '' } = props;
|
|
105
|
-
return <NarrowWide a={children[0]} b={children[1]} title={title}
|
|
106
|
-
cols={templateCol} icon={icon?.replace('pi pi-', '')} />;
|
|
107
|
-
```
|
|
81
|
+
A wrapper that forwards children as `a`/`b` slot inputs: resolve `NarrowWide` from the project's component registry; receive `children`, `title`, `templateCol` (default `'1fr 1fr'`), and `icon` (default `''`) from inputs; render `NarrowWide` with `a` set to `children[0]`, `b` set to `children[1]`, `title`, `cols` set to `templateCol`, and `icon` with the `'pi pi-'` prefix stripped.
|
|
108
82
|
|
|
109
83
|
### NarrowWideForm
|
|
110
84
|
|
|
111
|
-
|
|
112
|
-
const { children } = props;
|
|
113
|
-
return children?.length === 2 ? (
|
|
114
|
-
<div className="psdk-narrow-wide-column">
|
|
115
|
-
<div className="psdk-narrow-column-column">{children[0]}</div>
|
|
116
|
-
<div className="psdk-wide-column-column">{children[1]}</div>
|
|
117
|
-
</div>
|
|
118
|
-
) : null;
|
|
119
|
-
```
|
|
85
|
+
A simplified wrapper using only `children` (no `a`/`b` slots, no title/icon): receive `children` from inputs; when `children.length === 2`, render the same `.psdk-narrow-wide-column` structure as the core component (children[0] in the narrow column, children[1] in the wide column); otherwise render nothing.
|
|
120
86
|
|
|
121
87
|
### NarrowWideDetails
|
|
122
88
|
|
|
123
|
-
Same pattern as `Details` but uses `COLUMN_WIDTHS = [4, 8]
|
|
124
|
-
|
|
125
|
-
```typescript
|
|
126
|
-
const COLUMN_WIDTHS = [4, 8];
|
|
127
|
-
// highlighted data: <GridItem xs={COLUMN_WIDTHS[i]}>
|
|
128
|
-
// regular children: <GridItem xs={COLUMN_WIDTHS[i]}>
|
|
129
|
-
// Wrap in FieldGroup, setInheritedProp DISPLAY_ONLY + readOnly
|
|
130
|
-
```
|
|
89
|
+
Same pattern as `Details` (see [`Details.md`](./Details.md)) but uses `COLUMN_WIDTHS = [4, 8]` for its grid items instead of `[12]` — highlighted data fields and regular children are both laid out with the column widths array, and the whole thing is wrapped in a `FieldGroup` with `displayMode` and `readOnly` forced via `setInheritedProp`.
|
|
131
90
|
|
|
132
91
|
## Behavioral Contract
|
|
133
92
|
|
|
@@ -139,20 +98,20 @@ const COLUMN_WIDTHS = [4, 8];
|
|
|
139
98
|
|
|
140
99
|
### NarrowWidePage
|
|
141
100
|
|
|
142
|
-
1. Extract
|
|
143
|
-
2.
|
|
144
|
-
3. Render
|
|
101
|
+
1. Extract the children array from the content projection.
|
|
102
|
+
2. Resolve `NarrowWide` from the project's component registry.
|
|
103
|
+
3. Render `NarrowWide` with `a` set to `children[0]`, `b` set to `children[1]`, `title`, `cols` set to `templateCol`, and `icon` with the `'pi pi-'` prefix stripped.
|
|
145
104
|
|
|
146
105
|
### NarrowWideForm
|
|
147
106
|
|
|
148
107
|
1. Render exactly as `NarrowWide` with `children` path — checks `children.length === 2`, renders narrow/wide slots.
|
|
149
|
-
2. Does not support `a`/`b`
|
|
108
|
+
2. Does not support `a`/`b` slot inputs.
|
|
150
109
|
|
|
151
110
|
### NarrowWideDetails
|
|
152
111
|
|
|
153
112
|
1. Call `getPConnect().getInheritedProps()` and merge with `{ label, showLabel }` for `propsToUse`.
|
|
154
113
|
2. Set `getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY')` and `setInheritedProp('readOnly', true)`.
|
|
155
|
-
3. Map `getPConnect().getChildren()` →
|
|
114
|
+
3. Map `getPConnect().getChildren()` → render each child using the project's PConnect bridge utility with the config object and a unique key.
|
|
156
115
|
4. If `showHighlightedData` is true, read `getRawMetadata().config.highlightedData`, set each field's `displayMode = 'STACKED_LARGE_VAL'`, mark `pyStatusWork` fields as `type='TextInput', displayAsStatus=true`, and create components via `getPConnect().createComponent(field, '', 0, {})`.
|
|
157
116
|
5. Wrap everything in `<FieldGroup name={theName}>` where `theName = propsToUse.showLabel && propsToUse.label ? propsToUse.label : ''`.
|
|
158
117
|
6. Layout: highlighted data in `Grid size={{ xs: COLUMN_WIDTHS[i] }}` where `COLUMN_WIDTHS = [4, 8]`, then children in `Grid size={{ xs: 12 }}` rows.
|
|
@@ -180,30 +139,23 @@ Derived from `NarrowWide.css`:
|
|
|
180
139
|
|
|
181
140
|
- `NarrowWide` supports both `children` and `a`/`b` slot patterns — check `children` length first.
|
|
182
141
|
- `NarrowWideDetails` highlighted data grid uses `[4, 8]` column widths (narrow left, wide right for STACKED_LARGE_VAL fields).
|
|
183
|
-
- `NarrowWideDetails` reads `theName` from `propsToUse` (which merges inherited
|
|
142
|
+
- `NarrowWideDetails` reads `theName` from `propsToUse` (which merges inherited inputs) — the `label` input alone may be overridden by inherited inputs.
|
|
184
143
|
- Icon cleanup in `NarrowWidePage`: strip `'pi pi-'` prefix from the icon string before passing to `NarrowWide`.
|
|
185
144
|
|
|
186
145
|
## Dependencies
|
|
187
146
|
|
|
188
|
-
- `NarrowWidePage`: `
|
|
189
|
-
- `NarrowWideDetails`:
|
|
147
|
+
- `NarrowWidePage`: the project's component registry — to resolve `NarrowWide` at runtime.
|
|
148
|
+
- `NarrowWideDetails`: the project's component registry (to resolve `FieldGroup`) and the project's PConnect bridge utility.
|
|
190
149
|
|
|
191
150
|
## Design System Mapping
|
|
192
151
|
|
|
193
152
|
**UI control type:** Asymmetric two-column layout (sidebar + main content).
|
|
194
153
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
| Design System | Recommended Component |
|
|
198
|
-
| ------------------ | -------------------------------------------------------------------------------- |
|
|
199
|
-
| Default (CSS only) | CSS Grid `grid-template-columns: 1fr 2fr; gap: 1rem` |
|
|
200
|
-
| MUI | `<Grid container><Grid size={{ xs: 12, md: 4 }}><Grid size={{ xs: 12, md: 8 }}>` |
|
|
201
|
-
| Ant Design | `<Row gutter={16}><Col xs={24} md={8}><Col xs={24} md={16}>` |
|
|
202
|
-
| Chakra UI | `<Grid templateColumns={{ base: '1fr', md: '1fr 2fr' }} gap={4}>` |
|
|
203
|
-
| Shadcn/ui | Tailwind `grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-4` |
|
|
204
|
-
|
|
205
|
-
When implementing in a specific design system:
|
|
154
|
+
When implementing in a specific design system, map the following:
|
|
206
155
|
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
156
|
+
- **Two-column grid** → use the DS's grid with `1fr 2fr` column ratio (narrow left, wide right)
|
|
157
|
+
- **Mobile** → collapse to single column (`1fr`)
|
|
158
|
+
- **NarrowWideDetails** → forces DISPLAY_ONLY + readOnly on children via inherited inputs
|
|
159
|
+
- **NarrowWidePage** → resolve via the project's component registry and delegate
|
|
160
|
+
- **Narrow column** ≈ 33% width (1fr of 3fr total)
|
|
161
|
+
- **Wide column** ≈ 67% width (2fr of 3fr total)
|
|
@@ -11,8 +11,8 @@ Single-column layout template that stacks all children in a full-width column.
|
|
|
11
11
|
Renders all children stacked vertically in a single full-width column. Three closely related sub-variants:
|
|
12
12
|
|
|
13
13
|
- **`OneColumn`** — core layout with internal grid and column style
|
|
14
|
-
- **`OneColumnPage`** — thin wrapper that delegates to `OneColumn` via the component registry
|
|
15
|
-
- **`OneColumnTab`** — minimal pass-through wrapper for tab context (
|
|
14
|
+
- **`OneColumnPage`** — thin wrapper that delegates to `OneColumn` via the project's component registry
|
|
15
|
+
- **`OneColumnTab`** — minimal pass-through wrapper for tab context (a plain container element with id `OneColumnTab`)
|
|
16
16
|
|
|
17
17
|
## Pega Metadata
|
|
18
18
|
|
|
@@ -22,81 +22,55 @@ Renders all children stacked vertically in a single full-width column. Three clo
|
|
|
22
22
|
| OneColumnPage | `OneColumnPage` |
|
|
23
23
|
| OneColumnTab | `OneColumnTab` |
|
|
24
24
|
|
|
25
|
-
All extend
|
|
25
|
+
All extend the project's base component interface. Children are received via the framework's content projection mechanism.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Implementation Structure
|
|
28
28
|
|
|
29
29
|
### OneColumn (core)
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<GridItem xs={12} className="col-styles">
|
|
40
|
-
{(children as ReactElement[]).map(child => child)}
|
|
41
|
-
</GridItem>
|
|
42
|
-
</GridContainer>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
// CSS: .col-styles { display: grid; gap: 1rem; align-content: baseline; }
|
|
46
|
-
```
|
|
31
|
+
**Module Setup:** Define the input contract as an extension of the project's base component interface, accepting children.
|
|
32
|
+
|
|
33
|
+
**Main Component Logic** — steps in order:
|
|
34
|
+
|
|
35
|
+
1. Receive `children` from inputs.
|
|
36
|
+
2. Render a grid container with spacing of 2 units (≈ 16px) containing a single grid item at full width (12 of 12 columns) with a column-styles class, which iterates over `children` and renders each one unchanged.
|
|
37
|
+
|
|
38
|
+
**Visual-only styling notes:** apply a column-styles class with `display: grid; gap: 1rem; align-content: baseline`.
|
|
47
39
|
|
|
48
40
|
### OneColumnPage
|
|
49
41
|
|
|
50
|
-
|
|
51
|
-
const OneColumn = getComponentFromRegistry('OneColumn');
|
|
52
|
-
return <OneColumn {...props} />;
|
|
53
|
-
```
|
|
42
|
+
A thin pass-through wrapper: resolve `OneColumn` from the project's component registry and render it forwarding all inputs.
|
|
54
43
|
|
|
55
44
|
### OneColumnTab
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
return <div id="OneColumnTab">{children}</div>;
|
|
59
|
-
```
|
|
46
|
+
A minimal wrapper that renders children inside a plain container element with `id="OneColumnTab"` — no grid or column styles applied.
|
|
60
47
|
|
|
61
|
-
##
|
|
48
|
+
## Inputs
|
|
62
49
|
|
|
63
|
-
|
|
|
64
|
-
| ---------- |
|
|
65
|
-
| `children` |
|
|
50
|
+
| Name | Type | Required | Description |
|
|
51
|
+
| ---------- | ------------------ | -------- | --------------------------------------------------- |
|
|
52
|
+
| `children` | renderable content | Yes | One or more children to render in the single column |
|
|
66
53
|
|
|
67
54
|
## Sub-Variants
|
|
68
55
|
|
|
69
56
|
### OneColumnPage
|
|
70
57
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
const OneColumn = getComponentFromRegistry('OneColumn');
|
|
75
|
-
return <OneColumn {...props} />;
|
|
76
|
-
```
|
|
58
|
+
A thin pass-through wrapper: resolve `OneColumn` from the project's component registry and render it forwarding all inputs.
|
|
77
59
|
|
|
78
60
|
### OneColumnTab
|
|
79
61
|
|
|
80
|
-
Minimal wrapper — renders children in a plain
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
return <div id='OneColumnTab'>{children}</div>;
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
No grid or column styles applied. Used purely as a slot container inside tab panels.
|
|
62
|
+
Minimal wrapper — renders children in a plain container element with `id='OneColumnTab'` and no grid or column styles applied. Used purely as a slot container inside tab panels.
|
|
87
63
|
|
|
88
64
|
## Behavioral Contract
|
|
89
65
|
|
|
90
|
-
1. Render a
|
|
91
|
-
2. Render a single inner
|
|
92
|
-
3.
|
|
93
|
-
4. `OneColumnPage` delegates all rendering to `OneColumn` from the registry.
|
|
94
|
-
5. `OneColumnTab` renders children in a plain
|
|
66
|
+
1. Render a grid container with spacing of 2 units.
|
|
67
|
+
2. Render a single inner grid item at full width (12 of 12 columns) with column-styles applied.
|
|
68
|
+
3. Iterate over all `children` and render each child.
|
|
69
|
+
4. `OneColumnPage` delegates all rendering to `OneColumn` from the project's component registry.
|
|
70
|
+
5. `OneColumnTab` renders children in a plain container element — no grid, no styles.
|
|
95
71
|
|
|
96
72
|
## Visual Specifications
|
|
97
73
|
|
|
98
|
-
Derived from `OneColumn.tsx` makeStyles:
|
|
99
|
-
|
|
100
74
|
### Column Style
|
|
101
75
|
|
|
102
76
|
| Property | Value |
|
|
@@ -115,34 +89,26 @@ Derived from `OneColumn.tsx` makeStyles:
|
|
|
115
89
|
|
|
116
90
|
- Column: `display: grid; gap: 1rem; align-content: baseline; width: 100%`.
|
|
117
91
|
- Outer container: `display: grid; grid-template-columns: 1fr; gap: 16px`.
|
|
118
|
-
- `OneColumnTab`: just
|
|
92
|
+
- `OneColumnTab`: just a plain container with no special styling.
|
|
119
93
|
|
|
120
94
|
## Edge Cases & Special Logic
|
|
121
95
|
|
|
122
|
-
- `OneColumn`
|
|
96
|
+
- `OneColumn` iterates over all children (not just first/second) — supports any number of children.
|
|
123
97
|
- `OneColumnPage` uses the registry — if an override exists for `OneColumn`, it will be used.
|
|
124
|
-
- `OneColumnTab` does NOT apply the
|
|
125
|
-
|
|
126
|
-
## Dependencies
|
|
127
|
-
|
|
128
|
-
- `OneColumnPage`: `getComponentFromRegistry` from `@pega/sdk-react`
|
|
129
|
-
- `OneColumn` / `OneColumnTab`: no special dependencies
|
|
98
|
+
- `OneColumnTab` does NOT apply the column-styles grid — it is intentionally simpler.
|
|
130
99
|
|
|
131
100
|
## Design System Mapping
|
|
132
101
|
|
|
133
|
-
**UI control type:** Single
|
|
102
|
+
**UI control type:** Single-column vertical stack layout.
|
|
134
103
|
|
|
135
|
-
|
|
104
|
+
When implementing in a specific design system, map the following:
|
|
136
105
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
| Ant Design | `<Row><Col span={24}>` |
|
|
142
|
-
| Chakra UI | `<Stack spacing={4}>` or `<Grid templateColumns='1fr'>` |
|
|
143
|
-
| Shadcn/ui | Tailwind `flex flex-col gap-4` |
|
|
106
|
+
- **Grid container** → use the DS's grid/layout component with a single full-width column
|
|
107
|
+
- **Column style** → apply `display: grid; gap: 1rem; align-content: baseline` to the inner column
|
|
108
|
+
- **OneColumnPage** → resolve via the project's component registry and delegate
|
|
109
|
+
- **OneColumnTab** → render a plain container element (no styling)
|
|
144
110
|
|
|
145
|
-
|
|
111
|
+
## Dependencies
|
|
146
112
|
|
|
147
|
-
-
|
|
148
|
-
- `
|
|
113
|
+
- `OneColumnPage`: the project's component registry — to resolve the `OneColumn` component at runtime.
|
|
114
|
+
- `OneColumn` / `OneColumnTab`: no special dependencies.
|