@pega/sdk 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/index.js +977 -92
- package/package.json +1 -1
- package/templates/angular-sdk-reference/package.json +12 -12
- package/templates/angular-sdk-reference/tsconfig.json +1 -1
- package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
- package/templates/react-native-sdk-reference/.prettierignore +17 -0
- package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
- package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
- package/templates/react-native-sdk-reference/AGENTS.md +3 -0
- package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
- package/templates/react-native-sdk-reference/README.md +56 -0
- package/templates/react-native-sdk-reference/app.json +40 -5
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
- package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
- package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
- package/templates/react-native-sdk-reference/package.json +59 -14
- package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/sdk-config.json +31 -9
- package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
- package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
- package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
- package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
- package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
- package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
- package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
- package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
- package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
- package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
- package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
- package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
- package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
- package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
- package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
- package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
- package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
- package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
- package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
- package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
- package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
- package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
- package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
- package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
- package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
- package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
- package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
- package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
- package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
- package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
- package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
- package/templates/react-native-sdk-reference/tsconfig.json +9 -8
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
- package/templates/react-sdk-reference/{.github/agents/implementation-expert.agent.md → .ai-common/agents/implementation-expert.md} +44 -48
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +192 -0
- package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +35 -0
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +47 -0
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +50 -0
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +43 -0
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +45 -0
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +193 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/prompts/component-manifest.json +106 -2
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +358 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +165 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +190 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +227 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +172 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/prompts/identify-components.md +4 -0
- package/templates/react-sdk-reference/{.cursor/rules/prompts/replace-design-system.mdrules → .ai-common/prompts/replace-design-system.md} +2 -3
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/AlertBanner.md +61 -25
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +176 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +180 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +180 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +153 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +136 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +140 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/Operator.md +85 -41
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +97 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +226 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/WssQuickCreate.md +35 -20
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +169 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +190 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +157 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +178 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +189 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +136 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +126 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +115 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +119 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +136 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +99 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +88 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +102 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +142 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Multiselect.md +42 -53
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/ObjectReference.md +36 -60
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +113 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +100 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +153 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +117 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +95 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +155 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/SemanticLink.md +35 -57
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +109 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/TextContent.md +27 -52
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +112 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +102 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +96 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/UserReference.md +41 -78
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +198 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +126 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +160 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +90 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +129 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +196 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +157 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +149 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DataReference.md +46 -31
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +141 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/DefaultPage.md +40 -34
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +96 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +103 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +85 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +77 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +103 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +130 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +200 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +110 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +105 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/ListPage.md +21 -16
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +234 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/MultiReferenceReadOnly.md +18 -23
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +161 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +114 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +132 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +173 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/SimpleTable.md +44 -24
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +103 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +89 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +133 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/WideNarrow.md +36 -43
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/WssNavBar.md +26 -45
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +124 -0
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +94 -0
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +163 -0
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +90 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/widget-skills/FileUtility.md +68 -62
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/Followers.md +24 -19
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/QuickCreate.md +27 -44
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/SummaryItem.md +35 -61
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +261 -0
- package/templates/react-sdk-reference/package.json +1 -1
- package/templates/react-sdk-reference/package.minimal.json +29 -0
- package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-sdk-reference/src/AppProviders.tsx +17 -0
- package/templates/react-sdk-reference/src/MashupApp.tsx +8 -19
- package/templates/react-sdk-reference/src/PortalApp.tsx +6 -17
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
- package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
- package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
- package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
- package/templates/react-native-sdk-reference/App.tsx +0 -49
- package/templates/react-sdk-reference/.claude/instructions/component-map.md +0 -38
- package/templates/react-sdk-reference/.claude/instructions/dse-component.md +0 -75
- package/templates/react-sdk-reference/.claude/instructions/field-component.md +0 -75
- package/templates/react-sdk-reference/.claude/instructions/template-component.md +0 -93
- package/templates/react-sdk-reference/.claude/instructions/widget-component.md +0 -88
- package/templates/react-sdk-reference/.claude/prompts/add-component.md +0 -152
- package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +0 -158
- package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +0 -140
- package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +0 -153
- package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +0 -165
- package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +0 -138
- package/templates/react-sdk-reference/.claude/prompts/replace-design-system.md +0 -519
- package/templates/react-sdk-reference/.claude/skills/component-contracts.md +0 -140
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +0 -137
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Banner.md +0 -152
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/CaseSummaryFields.md +0 -159
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/DetailsFields.md +0 -148
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroupList.md +0 -113
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +0 -118
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +0 -85
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +0 -232
- package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +0 -291
- package/templates/react-sdk-reference/.claude/skills/field-components.md +0 -295
- package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +0 -113
- package/templates/react-sdk-reference/.claude/skills/field-skills/CancelAlert.md +0 -211
- package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +0 -175
- package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +0 -101
- package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/field-skills/Decimal.md +0 -99
- package/templates/react-sdk-reference/.claude/skills/field-skills/Dropdown.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/field-skills/Email.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/field-skills/Group.md +0 -96
- package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +0 -88
- package/templates/react-sdk-reference/.claude/skills/field-skills/Location.md +0 -145
- package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +0 -93
- package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +0 -129
- package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +0 -167
- package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +0 -149
- package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +0 -231
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextArea.md +0 -98
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextContent.md +0 -117
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +0 -107
- package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +0 -89
- package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +0 -86
- package/templates/react-sdk-reference/.claude/skills/template-components.md +0 -321
- package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +0 -150
- package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +0 -124
- package/templates/react-sdk-reference/.claude/skills/template-skills/BannerPage.md +0 -86
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +0 -137
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +0 -131
- package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultForm.md +0 -104
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultPage.md +0 -112
- package/templates/react-sdk-reference/.claude/skills/template-skills/Details.md +0 -90
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +0 -97
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsThreeColumn.md +0 -80
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +0 -80
- package/templates/react-sdk-reference/.claude/skills/template-skills/DynamicTabs.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/template-skills/FieldGroupTemplate.md +0 -112
- package/templates/react-sdk-reference/.claude/skills/template-skills/HierarchicalForm.md +0 -116
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboard.md +0 -108
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboardPage.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +0 -142
- package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/template-skills/NarrowWide.md +0 -143
- package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +0 -114
- package/templates/react-sdk-reference/.claude/skills/template-skills/PromotedFilters.md +0 -130
- package/templates/react-sdk-reference/.claude/skills/template-skills/SelfServiceCaseView.md +0 -142
- package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +0 -108
- package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/template-skills/TwoColumn.md +0 -133
- package/templates/react-sdk-reference/.claude/skills/template-skills/WssNavBar.md +0 -139
- package/templates/react-sdk-reference/.claude/skills/widget-components.md +0 -260
- package/templates/react-sdk-reference/.claude/skills/widget-skills/AppAnnouncement.md +0 -84
- package/templates/react-sdk-reference/.claude/skills/widget-skills/Attachment.md +0 -151
- package/templates/react-sdk-reference/.claude/skills/widget-skills/CaseHistory.md +0 -110
- package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +0 -206
- package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +0 -198
- package/templates/react-sdk-reference/.cursor/rules/component-map.mdrules +0 -41
- package/templates/react-sdk-reference/.cursor/rules/dse-component.mdrules +0 -78
- package/templates/react-sdk-reference/.cursor/rules/field-component.mdrules +0 -74
- package/templates/react-sdk-reference/.cursor/rules/pega-sdk.mdrules +0 -247
- package/templates/react-sdk-reference/.cursor/rules/prompts/add-component.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/prompts/component-manifest.json +0 -193
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-all-components.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-dse-components.mdrules +0 -131
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-field-components.mdrules +0 -144
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-template-components.mdrules +0 -156
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-widget-components.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/prompts/identify-components.mdrules +0 -110
- package/templates/react-sdk-reference/.cursor/rules/skills/component-contracts.mdrules +0 -145
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/AlertBanner.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Banner.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/CaseSummaryFields.mdrules +0 -159
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/DetailsFields.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroup.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroupList.mdrules +0 -116
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldValueList.mdrules +0 -120
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Operator.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Pulse.mdrules +0 -88
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/RichTextEditor.mdrules +0 -211
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/WssQuickCreate.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension.mdrules +0 -294
- package/templates/react-sdk-reference/.cursor/rules/skills/field-components.mdrules +0 -299
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/AutoComplete.mdrules +0 -117
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/CancelAlert.mdrules +0 -208
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Checkbox.mdrules +0 -163
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Currency.mdrules +0 -111
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Date.mdrules +0 -104
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/DateTime.mdrules +0 -108
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Decimal.mdrules +0 -103
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Dropdown.mdrules +0 -119
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Email.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Group.mdrules +0 -95
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Integer.mdrules +0 -92
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Location.mdrules +0 -141
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Multiselect.mdrules +0 -169
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ObjectReference.mdrules +0 -169
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Percentage.mdrules +0 -97
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Phone.mdrules +0 -115
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RadioButtons.mdrules +0 -151
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RichText.mdrules +0 -143
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ScalarList.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SelectableCard.mdrules +0 -221
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SemanticLink.mdrules +0 -153
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextArea.mdrules +0 -101
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextContent.mdrules +0 -106
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextInput.mdrules +0 -109
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Time.mdrules +0 -93
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/URL.mdrules +0 -90
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/UserReference.mdrules +0 -185
- package/templates/react-sdk-reference/.cursor/rules/skills/run-and-verify.mdrules +0 -73
- package/templates/react-sdk-reference/.cursor/rules/skills/template-components.mdrules +0 -327
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AdvancedSearch.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AppShell.mdrules +0 -127
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/BannerPage.mdrules +0 -88
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseSummary.mdrules +0 -105
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseView.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseViewActionsMenu.mdrules +0 -131
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Confirmation.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DataReference.mdrules +0 -125
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultForm.mdrules +0 -107
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultPage.mdrules +0 -115
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Details.mdrules +0 -93
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsSubTabs.mdrules +0 -100
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsThreeColumn.mdrules +0 -83
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsTwoColumn.mdrules +0 -83
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DynamicTabs.mdrules +0 -106
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/FieldGroupTemplate.mdrules +0 -114
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/HierarchicalForm.mdrules +0 -118
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboard.mdrules +0 -109
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboardPage.mdrules +0 -90
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListPage.mdrules +0 -73
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListView.mdrules +0 -144
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/MultiReferenceReadOnly.mdrules +0 -85
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/NarrowWide.mdrules +0 -146
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/OneColumn.mdrules +0 -114
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/PromotedFilters.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SelfServiceCaseView.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SimpleTable.mdrules +0 -132
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SingleReferenceReadOnly.mdrules +0 -108
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SubTabs.mdrules +0 -84
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/TwoColumn.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WideNarrow.mdrules +0 -155
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WssNavBar.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-components.mdrules +0 -276
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/AppAnnouncement.mdrules +0 -87
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Attachment.mdrules +0 -151
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/CaseHistory.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/FileUtility.mdrules +0 -205
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Followers.mdrules +0 -104
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/QuickCreate.mdrules +0 -119
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/SummaryItem.mdrules +0 -172
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/ToDo.mdrules +0 -195
- package/templates/react-sdk-reference/.cursor/rules/template-component.mdrules +0 -95
- package/templates/react-sdk-reference/.cursor/rules/widget-component.mdrules +0 -90
- package/templates/react-sdk-reference/.github/copilot-instructions.md +0 -243
- package/templates/react-sdk-reference/.github/instructions/component-map.instructions.md +0 -40
- package/templates/react-sdk-reference/.github/instructions/dse-component.instructions.md +0 -77
- package/templates/react-sdk-reference/.github/instructions/field-component.instructions.md +0 -77
- package/templates/react-sdk-reference/.github/instructions/template-component.instructions.md +0 -95
- package/templates/react-sdk-reference/.github/instructions/widget-component.instructions.md +0 -90
- package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +0 -192
- package/templates/react-sdk-reference/.github/prompts/component-manifest.json +0 -193
- package/templates/react-sdk-reference/.github/prompts/generate-all-components.prompt.md +0 -411
- package/templates/react-sdk-reference/.github/prompts/generate-dse-components.prompt.md +0 -205
- package/templates/react-sdk-reference/.github/prompts/generate-field-components.prompt.md +0 -223
- package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md +0 -229
- package/templates/react-sdk-reference/.github/prompts/generate-widget-components.prompt.md +0 -208
- package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +0 -110
- package/templates/react-sdk-reference/.github/prompts/replace-design-system.prompt.md +0 -524
- package/templates/react-sdk-reference/.github/skills/component-contracts.md +0 -140
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +0 -152
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +0 -159
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +0 -148
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroup.md +0 -134
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +0 -113
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldValueList.md +0 -118
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +0 -155
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Pulse.md +0 -85
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/RichTextEditor.md +0 -232
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/WssQuickCreate.md +0 -137
- package/templates/react-sdk-reference/.github/skills/design-system-extension.md +0 -291
- package/templates/react-sdk-reference/.github/skills/field-components.md +0 -295
- package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +0 -113
- package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +0 -211
- package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +0 -175
- package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +0 -109
- package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +0 -101
- package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +0 -106
- package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +0 -99
- package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +0 -134
- package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +0 -109
- package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +0 -96
- package/templates/react-sdk-reference/.github/skills/field-skills/Integer.md +0 -88
- package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +0 -145
- package/templates/react-sdk-reference/.github/skills/field-skills/Multiselect.md +0 -188
- package/templates/react-sdk-reference/.github/skills/field-skills/ObjectReference.md +0 -173
- package/templates/react-sdk-reference/.github/skills/field-skills/Percentage.md +0 -93
- package/templates/react-sdk-reference/.github/skills/field-skills/Phone.md +0 -129
- package/templates/react-sdk-reference/.github/skills/field-skills/RadioButtons.md +0 -167
- package/templates/react-sdk-reference/.github/skills/field-skills/RichText.md +0 -149
- package/templates/react-sdk-reference/.github/skills/field-skills/ScalarList.md +0 -134
- package/templates/react-sdk-reference/.github/skills/field-skills/SelectableCard.md +0 -231
- package/templates/react-sdk-reference/.github/skills/field-skills/SemanticLink.md +0 -155
- package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +0 -98
- package/templates/react-sdk-reference/.github/skills/field-skills/TextInput.md +0 -107
- package/templates/react-sdk-reference/.github/skills/field-skills/Time.md +0 -89
- package/templates/react-sdk-reference/.github/skills/field-skills/URL.md +0 -86
- package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +0 -203
- package/templates/react-sdk-reference/.github/skills/run-and-verify.md +0 -70
- package/templates/react-sdk-reference/.github/skills/template-components.md +0 -321
- package/templates/react-sdk-reference/.github/skills/template-skills/AdvancedSearch.md +0 -150
- package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +0 -124
- package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +0 -86
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseSummary.md +0 -106
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +0 -137
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +0 -131
- package/templates/react-sdk-reference/.github/skills/template-skills/Confirmation.md +0 -109
- package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +0 -124
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +0 -104
- package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +0 -90
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsSubTabs.md +0 -97
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +0 -80
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsTwoColumn.md +0 -80
- package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +0 -106
- package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +0 -112
- package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +0 -116
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +0 -108
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +0 -82
- package/templates/react-sdk-reference/.github/skills/template-skills/ListPage.md +0 -70
- package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +0 -142
- package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +0 -143
- package/templates/react-sdk-reference/.github/skills/template-skills/OneColumn.md +0 -114
- package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +0 -130
- package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +0 -142
- package/templates/react-sdk-reference/.github/skills/template-skills/SimpleTable.md +0 -131
- package/templates/react-sdk-reference/.github/skills/template-skills/SingleReferenceReadOnly.md +0 -108
- package/templates/react-sdk-reference/.github/skills/template-skills/SubTabs.md +0 -82
- package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +0 -133
- package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +0 -152
- package/templates/react-sdk-reference/.github/skills/widget-components.md +0 -260
- package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +0 -84
- package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +0 -151
- package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +0 -110
- package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +0 -103
- package/templates/react-sdk-reference/.github/skills/widget-skills/QuickCreate.md +0 -118
- package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +0 -169
- package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +0 -198
- package/templates/react-sdk-reference/AGENTS.md +0 -246
- package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
- /package/templates/react-sdk-reference/{.claude → .ai-common}/skills/run-and-verify.md +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Skill: Template Components
|
|
2
|
+
|
|
3
|
+
Create or replace template components (layouts and page structures) in the project. Template components arrange child components into visual layouts (columns, tabs, forms, pages).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Architecture Overview
|
|
8
|
+
|
|
9
|
+
Each template component lives under the project's template components directory in its own folder, named after the component. The folder typically contains: the component implementation file; an optional re-export module; an optional companion stylesheet; an optional utilities module for template-specific helpers; and an optional metadata file.
|
|
10
|
+
|
|
11
|
+
Some templates have nested sub-templates instead of a flat structure. For example, `TwoColumn` organizes its three variants as separate sub-folders, each containing its own implementation file.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Input Contract
|
|
16
|
+
|
|
17
|
+
Template components extend the project's **base component interface**, which declares a single required member, `getPConnect` — a function returning the `PConnect` instance for the component.
|
|
18
|
+
|
|
19
|
+
Templates typically receive children through `getPConnect().getChildren()` rather than via the framework's content projection mechanism, though layout templates (TwoColumn, OneColumn) receive children via content projection directly.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Implementation Patterns
|
|
24
|
+
|
|
25
|
+
### Layout Template (renders children in grid)
|
|
26
|
+
|
|
27
|
+
Used for: TwoColumn, OneColumn, NarrowWide, WideNarrow
|
|
28
|
+
|
|
29
|
+
This pattern is design-system agnostic — the grid/flex section must be replaced with your design system's grid or flex layout primitive; see the "Design System Adaptation" section below.
|
|
30
|
+
|
|
31
|
+
**Module Setup:** Define the input contract as an extension of the project's base component interface, adding an optional `templateCol` string (e.g. `'1fr 1fr'`, `'2fr 1fr'`) representing the CSS grid column template. The component accepts children via the framework's content projection mechanism.
|
|
32
|
+
|
|
33
|
+
**Main Component Logic** — steps in order:
|
|
34
|
+
|
|
35
|
+
1. Receive `children` and `templateCol` (defaulting to `'1fr 1fr'`) from inputs; treat `children` as an array of child elements.
|
|
36
|
+
2. `templateCol` maps directly to CSS `grid-template-columns` — no conversion needed.
|
|
37
|
+
3. Render an outer container with `display: grid`, `gridTemplateColumns: templateCol`, a `gap`, and `width: 100%` so the layout always fills its parent.
|
|
38
|
+
4. Inside, render two inner wrapper elements — one per column — each with `display: grid`, a `gap`, and `alignContent: baseline`; the first wraps `children[0]`, the second wraps `children[1]`.
|
|
39
|
+
5. On mobile, use a media query or container query to stack the columns into a single column.
|
|
40
|
+
|
|
41
|
+
> ⚠️ **Do NOT use DS-specific grid components** for layout templates. Many DS grids have built-in `max-width` constraints that prevent the layout from filling its parent container. Use plain CSS grid with `grid-template-columns: templateCol` — this works with every design system and guarantees full-width rendering.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Design System Adaptation (Layout Templates Only)
|
|
46
|
+
|
|
47
|
+
> Form templates and page templates use the PConnect bridge pattern and do **not** use any design system primitives. This section applies only to layout templates: TwoColumn, OneColumn, NarrowWide, WideNarrow, and their sub-variants.
|
|
48
|
+
>
|
|
49
|
+
> **Use plain CSS grid** (`display: grid; grid-template-columns; width: 100%`) for all layout templates. The `templateCol` input value (e.g., `'1fr 1fr'`, `'2fr 1fr'`) maps directly to `grid-template-columns`. Do NOT use DS grid components — they may have max-width constraints.
|
|
50
|
+
|
|
51
|
+
**1. Check the component-specific skill file** — `{{SKILL_DIR}}/template-skills/<ComponentName>.md` contains a **Design System Mapping** section where available. Use it as a starting point.
|
|
52
|
+
|
|
53
|
+
**2. If the chosen design system is not covered** — use the **component purpose** description to identify the appropriate DS layout primitive (grid, flex, columns).
|
|
54
|
+
|
|
55
|
+
**3. Discover the API from installed packages** — before writing the component's markup, confirm the layout component names and inputs by searching the installed design-system package's type declaration files for grid/column/flex primitives, then inspecting the exported input interface.
|
|
56
|
+
|
|
57
|
+
**4. Column ratio mapping** — the `templateCol` input (e.g., `'2fr 1fr'`) gives you fractional widths. Map to your DS's column system:
|
|
58
|
+
|
|
59
|
+
| `templateCol` | Fraction | 12-col grid | CSS `grid-template-columns` |
|
|
60
|
+
| ------------- | --------- | ----------- | --------------------------- |
|
|
61
|
+
| `'1fr 1fr'` | 50% / 50% | 6 / 6 | `1fr 1fr` |
|
|
62
|
+
| `'2fr 1fr'` | 67% / 33% | 8 / 4 | `2fr 1fr` |
|
|
63
|
+
| `'1fr 2fr'` | 33% / 67% | 4 / 8 | `1fr 2fr` |
|
|
64
|
+
|
|
65
|
+
**5. Responsive behavior** — on mobile, both columns must stack to full width. Use your DS's responsive breakpoint mechanism or a CSS media query.
|
|
66
|
+
|
|
67
|
+
### Form Template (renders children via PConnect bridge)
|
|
68
|
+
|
|
69
|
+
Used for: DefaultForm, HierarchicalForm
|
|
70
|
+
|
|
71
|
+
> ⚠️ **CRITICAL:** Form templates MUST use the project's state-connection wrapper pattern. Without it, form fields will not render because they won't be subscribed to the application store for visibility and input updates.
|
|
72
|
+
|
|
73
|
+
**Module Setup:** The component depends on the framework's element-creation utility, the project's PConnect bridge utility, the project's state-connection wrapper (from the project's state utilities), and `getKeyForMappedField` / `mapStateToInputs` from the companion utilities module. Define the input contract as an extension of the project's base component interface with `NumCols: string` and `instructions: string`.
|
|
74
|
+
|
|
75
|
+
Outside the main component logic, define a `Child` wrapper using the project's state-connection wrapper invoked with `mapStateToInputs`. This is MANDATORY — it subscribes each field to the application store. Inside `Child`, receive `key`, `visibility`, and the remaining inputs, then render the project's PConnect bridge utility with those values.
|
|
76
|
+
|
|
77
|
+
**Main Component Logic** — steps in order:
|
|
78
|
+
|
|
79
|
+
1. Receive `getPConnect` and `NumCols` (defaulting to `'1'`) from inputs.
|
|
80
|
+
2. Unwrap the region children: the first child returned by `getPConnect().getChildren()` is a region, so call `.getPConnect().getChildren()` on it to get the actual field children.
|
|
81
|
+
3. Map each child through the `Child` wrapper defined above — every child MUST be rendered via the `Child` wrapper with `key` set to `getKeyForMappedField(kid)` and all field data spread, never directly through the PConnect bridge utility alone.
|
|
82
|
+
4. Return a container element with a class name derived from `NumCols` (e.g. `form-${NumCols}-col`) containing the mapped children.
|
|
83
|
+
|
|
84
|
+
> ❌ **INCORRECT pattern** (will cause fields to not render): mapping children directly through the PConnect bridge utility, bypassing the state-connection wrapper entirely. This causes fields to never subscribe to the application store, so they silently fail to render or update.
|
|
85
|
+
|
|
86
|
+
### Page Template (renders regions from PConnect children)
|
|
87
|
+
|
|
88
|
+
Used for: CaseView, DefaultPage, ObjectPage, AppShell, Confirmation
|
|
89
|
+
|
|
90
|
+
> ⚠️ **CRITICAL:** Page templates are NOT simple wrappers. They contain PCore API calls, lifecycle effects, state management, and complex input drilling to infrastructure components. NEVER simplify a Page template to a single return statement. Always follow the component-specific skill file's Implementation Structure faithfully.
|
|
91
|
+
>
|
|
92
|
+
> After generating a Page template, compare your output against the skill file's Implementation Structure. Every piece of state, every effect, every registry lookup, every PCore API call, helper function, and utility dependency described there MUST appear in your generated output. If your output is significantly shorter than what's described, you have over-simplified.
|
|
93
|
+
>
|
|
94
|
+
> ⚠️ **COMMON ERROR — `tabconfig` must be an array, NOT a rendered element:**
|
|
95
|
+
> The `VerticalTabs` infrastructure component expects `tabconfig` to be an array of `{ name: string; id: number }` objects. You MUST use the `extractTabsInfo` SDK utility to build this array. NEVER pass a raw rendered region element to `VerticalTabs` — it causes `TypeError: tabconfig.map is not a function`.
|
|
96
|
+
>
|
|
97
|
+
> ⚠️ **CRITICAL — Do NOT call `child.getPConnect()` on framework-rendered children:**
|
|
98
|
+
> Children passed to page templates via the framework's content projection mechanism are **rendered elements** — they do NOT expose `getPConnect` as a direct method. Calling `child.getPConnect()` on them causes `TypeError: child.getPConnect is not a function`. For named region extraction, use `PCore.getSDKUtils().getSDKCaseUtils().getChildRegionByName(childArr, name)`. For tab info, use `PCore.getSDKUtils().getSDKCaseUtils().extractTabsInfo(tabsRegion)`. For field extraction in CaseSummary, use `PCore.getSDKUtils().getSDKCaseUtils().filterSummaryFields(getPConnect)`. If you need PConnect metadata access by index (e.g., SelfServiceCaseView), use `getPConnect().getChildren()` which returns PConnect child envs that DO have `getPConnect` methods. Render extracted regions directly in the template — do NOT pass them through the PConnect bridge component.
|
|
99
|
+
|
|
100
|
+
**Module Setup:** The component depends on the project's component registry (to resolve infrastructure components like `VerticalTabs` and `DeferLoad`), SDK utilities from `PCore.getSDKUtils()`, local state management, and lifecycle effects. Define the input contract as an extension of the project's base component interface.
|
|
101
|
+
|
|
102
|
+
**Main Component Logic** — general shape for any Page template:
|
|
103
|
+
|
|
104
|
+
1. Look up infrastructure components from the project's component registry, e.g. `VerticalTabs` and `DeferLoad`.
|
|
105
|
+
2. Receive ALL inputs described in the component-specific skill file (e.g. `getPConnect`, `children`, `header`, etc.), then call `getPConnect()` once and reuse the result.
|
|
106
|
+
3. Declare ALL state, effects, and handlers described in the skill file — for example local state for active tab tracking, and lifecycle effects for event listeners or pub/sub subscriptions.
|
|
107
|
+
4. Use SDK utilities from `PCore.getSDKUtils().getSDKCaseUtils()` for region extraction (e.g., `getChildRegionByName`, `extractTabsInfo`, `filterSummaryFields`). For positional child access needing metadata, use `getPConnect().getChildren()` (PConnect child envs). **NEVER implement custom region extraction that calls `child.getPConnect()` on framework-rendered children.**
|
|
108
|
+
5. Render the full layout structure described in the skill file. Render extracted regions directly in the template — they are already renderable elements.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Rendering Children
|
|
113
|
+
|
|
114
|
+
Templates use three patterns to render child components:
|
|
115
|
+
|
|
116
|
+
### 1. Children via content projection (layout templates)
|
|
117
|
+
|
|
118
|
+
TwoColumn, OneColumn, and similar layout templates receive children via the framework's content projection mechanism. Receive `children` from inputs and treat it as an array of child elements before indexing into it.
|
|
119
|
+
|
|
120
|
+
### 2. PConnect children (form/page templates)
|
|
121
|
+
|
|
122
|
+
Get the child PConnect objects via `getPConnect().getChildren()`, then render each one through the project's PConnect bridge utility, passing the child's configuration object and a unique key for each child.
|
|
123
|
+
|
|
124
|
+
### 3. State-connected children (REQUIRED for Form templates)
|
|
125
|
+
|
|
126
|
+
> ⚠️ This is the ONLY correct pattern for Form templates (DefaultForm, HierarchicalForm). Using pattern #2 above for form fields will result in fields not rendering.
|
|
127
|
+
|
|
128
|
+
The component depends on the project's PConnect bridge utility, the project's state-connection wrapper (from the project's state utilities), and `getKeyForMappedField` / `mapStateToInputs` from the companion utilities module. Define a `Child` wrapper using the state-connection wrapper invoked with `mapStateToInputs` — this subscribes each field to the application store for visibility and dynamic input updates. Inside the wrapped component, receive `key`, `visibility`, and the remaining inputs, then render the PConnect bridge utility with those values.
|
|
129
|
+
|
|
130
|
+
To use it: unwrap the first region's children via `getPConnect().getChildren()[0].getPConnect().getChildren()`, then map each child through the `Child` wrapper with `key` set to `getKeyForMappedField(kid)` and all field data spread.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Helper Utilities
|
|
135
|
+
|
|
136
|
+
### PConnect bridge utility
|
|
137
|
+
|
|
138
|
+
The project's PConnect bridge component, used to render child PConnect objects. Use the framework's element-creation mechanism to create an instance of the bridge component for each child, passing the child's PConnect configuration and a unique key.
|
|
139
|
+
|
|
140
|
+
### State-connection wrapper
|
|
141
|
+
|
|
142
|
+
A higher-order utility that connects a component to the application store for visibility and dynamic input updates. Apply it with a state-mapping function to produce a store-connected version of the child component. Located in the project's state utilities module.
|
|
143
|
+
|
|
144
|
+
### Instructions helper
|
|
145
|
+
|
|
146
|
+
Extracts instruction text for forms. Located in the project's template utilities module. Call it with `getPConnect()` and the component's `instructions` input to obtain the resolved instruction HTML string.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Registration
|
|
151
|
+
|
|
152
|
+
Register templates in the project's component map by importing the template's default export from its folder under the template components directory and adding it to the object returned by the project's component registration function, using a key that matches the Pega component name.
|
|
153
|
+
|
|
154
|
+
For nested templates (e.g., TwoColumn/TwoColumnPage/TwoColumnTab), import each sub-variant from its own nested path and register all variants as separate keys in the component map.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Existing Template Components
|
|
159
|
+
|
|
160
|
+
| Component | Type | Description |
|
|
161
|
+
| ----------------------------------------------- | ---------- | ------------------------------------ |
|
|
162
|
+
| AdvancedSearch | Page | Advanced search with filters |
|
|
163
|
+
| AppShell | Page | Top-level app layout with nav |
|
|
164
|
+
| BannerPage | Page | Page with banner section |
|
|
165
|
+
| CaseSummary | Page | Case summary header |
|
|
166
|
+
| CaseView | Page | Main case view with regions |
|
|
167
|
+
| CaseViewActionsMenu | Widget | Case action dropdown menu |
|
|
168
|
+
| Confirmation | Page | Case completion confirmation |
|
|
169
|
+
| DataReference | Form | Embedded data reference lookup |
|
|
170
|
+
| DefaultForm | Form | Standard form layout (1/2/3 columns) |
|
|
171
|
+
| DefaultPage | Page | Default page structure |
|
|
172
|
+
| Details / DetailsTwoColumn / DetailsThreeColumn | Layout | Details region layouts |
|
|
173
|
+
| FieldGroupTemplate | Form | Repeating field group |
|
|
174
|
+
| HierarchicalForm | Form | Multi-step hierarchical form |
|
|
175
|
+
| InlineDashboard | Page | Inline dashboard container |
|
|
176
|
+
| ListPage | Page | List/table page |
|
|
177
|
+
| ListView | Page | Data table with filtering/sorting |
|
|
178
|
+
| MultiReferenceReadOnly | Display | Read-only multi-reference display |
|
|
179
|
+
| NarrowWide / WideNarrow | Layout | Asymmetric two-column layouts |
|
|
180
|
+
| ObjectPage | Page | Object detail page |
|
|
181
|
+
| OneColumn | Layout | Single-column layout |
|
|
182
|
+
| PromotedFilters | Widget | Filter bar for lists |
|
|
183
|
+
| SimpleTable | Table | Editable/read-only data tables |
|
|
184
|
+
| SingleReferenceReadOnly | Display | Read-only single reference |
|
|
185
|
+
| SubTabs | Navigation | Tab container |
|
|
186
|
+
| TwoColumn | Layout | Two-column layout |
|
|
187
|
+
| WssNavBar | Navigation | WSS navigation bar |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Key Conventions
|
|
192
|
+
|
|
193
|
+
1. **Default export** — Each component is exported as the module's default export.
|
|
194
|
+
2. **Children from PConnect** — Use `getPConnect().getChildren()` to access child regions.
|
|
195
|
+
3. **PConnect bridge pattern** — Use the project's PConnect bridge utility to render PConnect children.
|
|
196
|
+
4. **CSS files** — Template-specific styles go in a companion stylesheet alongside the component.
|
|
197
|
+
5. **Responsive** — Use CSS grid with full-width on mobile and computed column widths on desktop breakpoints.
|
|
198
|
+
6. **templateCol** — Layout templates often receive a `templateCol` input (e.g., `"1fr 1fr"`, `"2fr 1fr"`) to control column ratios.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Skill: AdvancedSearch
|
|
2
|
+
|
|
3
|
+
Advanced search template. Renders grouped search field sections with deduplication, delegating each section to a SearchGroups sub-component. Also covers the SearchGroups sub-component.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`template-components.md`](../template-components.md) — covers architecture, child rendering patterns, and registration conventions common to ALL template components.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Component Purpose
|
|
10
|
+
|
|
11
|
+
Renders a multi-section advanced search form where search fields are organized into groups. Deduplicates search fields by value across groups. Each group is rendered by the SearchGroups sub-component. Shares search configuration via a shared search-configuration context (provided by the parent DataReference component).
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `AdvancedSearch` (in the project's component map)
|
|
16
|
+
- **Category:** Search / Filter template
|
|
17
|
+
|
|
18
|
+
## Inputs
|
|
19
|
+
|
|
20
|
+
| Input | Type | Required | Description |
|
|
21
|
+
| ------------------- | ---------- | -------- | ----------------------------------------- |
|
|
22
|
+
| `targetObjectClass` | `string` | Yes | Class of the target object being searched |
|
|
23
|
+
| `localeReference` | `string` | No | Locale reference for i18n labels |
|
|
24
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
25
|
+
|
|
26
|
+
## Main Component Logic
|
|
27
|
+
|
|
28
|
+
Steps in order:
|
|
29
|
+
|
|
30
|
+
1. Receive inputs: `getPConnect`, `targetObjectClass`, and `localeReference`. Retrieve SearchGroups from the project's component registry.
|
|
31
|
+
2. **Read shared context:** consume a shared search-configuration context (provided by the parent DataReference). From it, obtain `dataReferenceConfigToChild`, `isCreateNewReferenceEnabled`, `disableStartingFieldsForReference`, `pyID`, and `searchSelectCacheKey`.
|
|
32
|
+
3. **Check for an existing selection:** from `dataReferenceConfigToChild`, obtain `selectionMode`, `value` (the single-select field value path), and `readonlyContextList` (the multi-select field path). Read the `MULTI` constant from `PCore.getConstants().LIST_SELECTION_MODE`. Compute whether a selection already exists — for multi-select, check if `getPConnect().getValue(multiSelectField)` has a non-zero length; for single-select, check if `getPConnect().getValue(singleSelectFieldValue)` is truthy. Initialize local state `showRecords` from this computed boolean.
|
|
33
|
+
4. **Deduplicate search fields from metadata:** call `getPConnect()` into `pConn`. Read `rawViewMetadata = pConn.getRawMetadata()`. Iterate `rawViewMetadata.config.searchGroups`, and for each group's children, add the child to a `searchFields` collection only if its `config.value` hasn't been seen yet (tracked via a set of seen values) and it has no `config.validator`. This prevents duplicate fields from appearing across groups.
|
|
34
|
+
5. **Create the editable field component from the first child:** get `firstChildPConnect` from `getPConnect().getChildren()[0].getPConnect`. Read `firstChildMeta` from `rawViewMetadata.children[0]`. Bind `localizedVal = PCore.getLocaleUtils().getLocaleValue`. Resolve `cache` via `PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey)` (default empty object). Call `firstChildPConnect().createComponent(...)` with `type: firstChildMeta.type` and a config that merges the output of `getFirstChildConfig(...)` (a utility from the DataReference helpers that assembles config from `firstChildMeta`, `getPConnect`, `rawViewMetadata`, `contextClass: targetObjectClass`, `dataReferenceConfigToChild`, `isCreateNewReferenceEnabled`, `disableStartingFieldsForReference`, and `pyID`) together with `searchFields`, `showRecords`, `label: localizedVal('Search results', 'DataReference')`, `searchSelectCacheKey`, and `cache`.
|
|
35
|
+
6. **Derive the editable field path:** from the created component's PConnect config, obtain `selectionList` and `dataRelationshipContext`. Set `editableField` to `selectionList.substring(1)` for multi-select mode, or `dataRelationshipContext` otherwise.
|
|
36
|
+
7. Render the SearchGroups component (passed `getPConnect`, `editableField`, `localeReference`, the `setShowRecords` state updater, `searchSelectCacheKey`, and `cache`) followed by the created editable field component.
|
|
37
|
+
|
|
38
|
+
## Behavioral Contract
|
|
39
|
+
|
|
40
|
+
### Search Groups from Metadata
|
|
41
|
+
|
|
42
|
+
1. `rawViewMetadata = getPConnect().getRawMetadata()`.
|
|
43
|
+
2. `searchGroups = rawViewMetadata.config.searchGroups` — array of group config objects.
|
|
44
|
+
3. Each group has a `label` and a `children` array containing field definitions.
|
|
45
|
+
|
|
46
|
+
### Field Deduplication
|
|
47
|
+
|
|
48
|
+
- Track seen field values in a set.
|
|
49
|
+
- For each field across all groups: if `field.config.value` already in the set, skip it.
|
|
50
|
+
- Also skip fields that have a `config.validator` (these are validation-only fields, not user-visible search fields).
|
|
51
|
+
- Deduplication is applied per-group in order — earlier groups take precedence.
|
|
52
|
+
|
|
53
|
+
### Shared Search-Configuration Context
|
|
54
|
+
|
|
55
|
+
The parent DataReference provides a shared context (a framework-appropriate context or dependency injection mechanism). This context supplies: `dataReferenceConfigToChild` (containing `selectionMode`, `value`, `readonlyContextList`), `isCreateNewReferenceEnabled`, `disableStartingFieldsForReference`, `pyID`, and `searchSelectCacheKey`. The AdvancedSearch component consumes this context to configure its search behavior.
|
|
56
|
+
|
|
57
|
+
### Render Structure
|
|
58
|
+
|
|
59
|
+
The component renders two things sequentially: the SearchGroups sub-component (which manages search field inputs and group switching) followed by the dynamically created editable field component (which displays search results).
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Sub-Component: SearchGroups
|
|
64
|
+
|
|
65
|
+
Manages search group selection, transient data for filter state, and search execution. It handles group switching, field initialization, caching, and triggering search.
|
|
66
|
+
|
|
67
|
+
### Inputs
|
|
68
|
+
|
|
69
|
+
| Input | Type | Description |
|
|
70
|
+
| ---------------------- | ---------- | --------------------------------------------------- |
|
|
71
|
+
| `getPConnect` | `function` | PConnect getter |
|
|
72
|
+
| `editableField` | `string` | The reference field name for search results binding |
|
|
73
|
+
| `localeReference` | `string` | Locale reference for i18n labels |
|
|
74
|
+
| `setShowRecords` | `function` | State updater to toggle search results visibility |
|
|
75
|
+
| `searchSelectCacheKey` | `string` | Cache key for persisting search state |
|
|
76
|
+
| `cache` | `object` | Previously cached search state (or empty object) |
|
|
77
|
+
|
|
78
|
+
### Behavioral Contract
|
|
79
|
+
|
|
80
|
+
1. **Initialize search fields:** For each field in the active search group, resolve its initial value from (in priority order): cached values for the field, a property-annotation default, a literal default, or empty string. Also resolve nested classID metadata for compound property paths.
|
|
81
|
+
2. **Manage transient data:** On mount, register a transient item with `getPConnect().getContainerManager().addTransientItem(...)` containing the initialized filter values plus the reference list classID. When the active group changes, replace the transient data via `PCore.getContainerUtils().replaceTransientData(...)`.
|
|
82
|
+
3. **Group switching:** Maintain local state for the active group ID. When the user selects a different group, update the active group and reinitialize transient data.
|
|
83
|
+
4. **Search execution:** On search trigger, gather form data from the transient context via `PCore.getFormUtils().getSubmitData(transientItemID, { isTransientContext: true, includeDisabledFields: true })`, flatten nested objects, and use the flattened values as filter parameters.
|
|
84
|
+
5. **Caching:** Persist search state (active group, field values, results) via `PCore.getNavigationUtils()` component cache for restoration on re-entry.
|
|
85
|
+
|
|
86
|
+
### Render Structure
|
|
87
|
+
|
|
88
|
+
The SearchGroups component renders: a group selector (when multiple groups exist), the search fields for the active group (created as live PConnect components), and a search action button.
|
|
89
|
+
|
|
90
|
+
## Visual Specifications
|
|
91
|
+
|
|
92
|
+
### AdvancedSearch Container
|
|
93
|
+
|
|
94
|
+
Vertical stack of sections: search groups control area followed by the editable results field.
|
|
95
|
+
|
|
96
|
+
### SearchGroups Section
|
|
97
|
+
|
|
98
|
+
- Group selector (dropdown or tabs when multiple groups exist).
|
|
99
|
+
- Search fields rendered as standard form controls in a vertical or grid layout.
|
|
100
|
+
- Search button to trigger the query.
|
|
101
|
+
|
|
102
|
+
Use companion styles for layout: vertical flex with appropriate gap between sections, grid or stacked layout for search fields (label plus input), and standard button styling for the search action.
|
|
103
|
+
|
|
104
|
+
## Edge Cases & Special Logic
|
|
105
|
+
|
|
106
|
+
- `rawViewMetadata.config.searchGroups` may be undefined if the view has no search groups — default to an empty array.
|
|
107
|
+
- Field deduplication is by `field.config.value` (the property path), not by label.
|
|
108
|
+
- `firstChildPConnect().createComponent(...)` — must use the correct field type from the first child metadata; the created component is a live PConnect view.
|
|
109
|
+
- The shared search-configuration context is required — SearchGroups depends on it for configuration. Always ensure the context is provided by the parent DataReference.
|
|
110
|
+
- The `getFirstChildConfig` utility (from the DataReference helpers) assembles configuration needed for the editable search results component.
|
|
111
|
+
- Cache retrieval via `PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey)` may return null — always default to an empty object.
|
|
112
|
+
|
|
113
|
+
## Dependencies
|
|
114
|
+
|
|
115
|
+
- A shared search-configuration context provided by the parent DataReference component
|
|
116
|
+
- A `getFirstChildConfig` utility from the DataReference helpers
|
|
117
|
+
- The project's component registry to retrieve SearchGroups
|
|
118
|
+
- The project's base component interface for rendering dynamically created PConnect components
|
|
119
|
+
- `PCore.getLocaleUtils().getLocaleValue` for i18n labels
|
|
120
|
+
- `PCore.getNavigationUtils().getComponentCache(...)` for search state caching
|
|
121
|
+
- `PCore.getContainerUtils().replaceTransientData(...)` for filter state management
|
|
122
|
+
- `PCore.getFormUtils().getSubmitData(...)` for collecting search form values
|
|
123
|
+
|
|
124
|
+
## Design System Mapping
|
|
125
|
+
|
|
126
|
+
Use a vertical stacked layout for the overall advanced search form. The group selector (when multiple groups exist) can be a dropdown, tabs, or segmented control depending on the design system. Search fields should render in a two-column grid (label plus input) or vertical stack. The search button uses the design system's primary or secondary button style. The editable results component renders below the search controls. All layout should respect the shared search-configuration context for selection mode (single vs. multi-select) to determine how results are displayed and selected.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Skill: AppShell
|
|
2
|
+
|
|
3
|
+
Top-level application shell template. Renders the outer portal/WSS portal frame: navigation bar, alert banners, operator avatar, portal logo, and case types. Provides a navigation store context to child components.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`template-components.md`](../template-components.md) — covers architecture, child rendering patterns, and registration conventions common to ALL template components.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> ⚠️ **CRITICAL — DO NOT SIMPLIFY THIS COMPONENT**
|
|
10
|
+
>
|
|
11
|
+
> **NavBar requires `pConn` input.** Without it, `pConn.resolveConfigProps()` throws `TypeError: Cannot read properties of undefined`. ALWAYS pass `pConn` where `const pConn = getPConnect()`.
|
|
12
|
+
>
|
|
13
|
+
> This component has **mandatory side effects** (portal logo loading, case type fetching from data page, WSS vs standard portal detection). Do NOT collapse to a single-line return statement.
|
|
14
|
+
>
|
|
15
|
+
> **Minimum Viable Implementation must include:**
|
|
16
|
+
>
|
|
17
|
+
> 1. `const pConn = getPConnect()` — and pass `pConn` to NavBar
|
|
18
|
+
> 2. WSS vs standard portal detection (`portalTemplate === 'wss'`)
|
|
19
|
+
> 3. Navigation store context wrapping the standard portal layout
|
|
20
|
+
> 4. NavBar receiving: `getPConnect`, `pConn`, `appName`, `pages`, `caseTypes`
|
|
21
|
+
> 5. AlertBanner rendering messages from `httpMessages` + `pageMessages`
|
|
22
|
+
>
|
|
23
|
+
> **Post-Generation Checklist:**
|
|
24
|
+
>
|
|
25
|
+
> - [ ] `pConn` passed to NavBar
|
|
26
|
+
> - [ ] Navigation store context wrapping standard portal
|
|
27
|
+
> - [ ] WSS vs standard portal detection
|
|
28
|
+
> - [ ] AlertBanner with combined messages
|
|
29
|
+
> - [ ] Operator info from `PCore.getEnvironmentInfo()`
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Component Purpose
|
|
34
|
+
|
|
35
|
+
The outermost container for the application. Determines whether the app is running in WSS portal or standard portal mode, renders the appropriate navigation bar, handles HTTP and page-level alert messages, loads the portal logo asynchronously, and passes navigation links and case types to the nav bar.
|
|
36
|
+
|
|
37
|
+
## Pega Metadata
|
|
38
|
+
|
|
39
|
+
- **Registration key:** `AppShell` (in the project's component map)
|
|
40
|
+
- **Category:** Page template — application shell
|
|
41
|
+
- **Extends:** the project's base component interface
|
|
42
|
+
|
|
43
|
+
## Inputs
|
|
44
|
+
|
|
45
|
+
| Input | Type | Required | Description |
|
|
46
|
+
| ------------- | ---------- | -------- | ------------------------------------------------------------ |
|
|
47
|
+
| `pages` | `array` | Yes | Array of portal page objects `{ name, pyLabel, linkUrl }` |
|
|
48
|
+
| `caseTypes` | `array` | No | Fallback case types (overridden by data page fetch if empty) |
|
|
49
|
+
| `portalName` | `string` | Yes | Portal identifier — determines WSS vs standard rendering |
|
|
50
|
+
| `displayName` | `string` | No | Operator display name for avatar |
|
|
51
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
52
|
+
| `children` | slot | Yes | Main content area |
|
|
53
|
+
|
|
54
|
+
## Implementation Structure
|
|
55
|
+
|
|
56
|
+
**Module Setup:** Use the project's base component interface for typing. Bring in the utility module that provides `getInitials` (the project's shared helpers), the navigation store context (shared context for nav drawer state), and a companion styles file. Register the component under its key in the project's component map.
|
|
57
|
+
|
|
58
|
+
**Main Component Logic** — steps in order:
|
|
59
|
+
|
|
60
|
+
1. Retrieve `NavBar`, `WssNavBar`, and `AlertBanner` from the project's component registry.
|
|
61
|
+
2. Receive inputs: `pages` (default `[]`), `caseTypes` (default `[]`), `showAppName`, `children` (default `[]`), `getPConnect`, `httpMessages`/`pageMessages` (default `[]`), `portalTemplate`, `portalName`, `portalLogo`, and `navDisplayOptions`.
|
|
62
|
+
3. Declare local state `open` (boolean, default `true`) for the nav drawer; call `getPConnect()` once into `pConn`; read `envInfo = PCore.getEnvironmentInfo()`, derive `userName = envInfo.getOperatorName() || ''`, `currentUserInitials = Utils.getInitials(userName)`, `appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : ''`, bind `localizedVal = PCore.getLocaleUtils().getLocaleValue`, and declare local state `iconURL` (string, default `''`) for the async-loaded logo.
|
|
63
|
+
4. Combine `httpMessages` and `pageMessages` into a single `messages` array; compute `hasBanner = messages.length > 0`.
|
|
64
|
+
5. Add three lifecycle effects: one to asynchronously load the portal logo and store its URL in `iconURL`; one to fetch case types from the environment-provided data page (see the Case Types section below); and one to set the `pyPortalTemplate` value for WSS detection.
|
|
65
|
+
6. Build `links` from `pages`: for each page, the click handler either calls `pConn.getActionsApi().showPage(page.pyRuleName, page.pyClassName)` when there's no external URL, or opens `page.pyURLContent` in a new tab; the label is `localizedVal(page.pyLabel, '', '')`.
|
|
66
|
+
7. **Render — WSS portal:** when `portalTemplate === 'wss'`, render a container `#AppShell` containing `WssNavBar` (passed `portalName`, `imageSrc` as `iconURL`, `navLinks` as `links`, `operator` as `{ name: userName, currentUserInitials }`, `navDisplayOptions`) followed by a content region showing the `AlertBanner` (when `hasBanner`) and `children`.
|
|
67
|
+
8. **Render — standard portal:** otherwise, wrap everything in the navigation store context (providing `{ open, setOpen }`) containing a flex container `#AppShell` with `NavBar` (passed `getPConnect`, `pConn`, `appName` as `appNameToDisplay`, `pages`, `caseTypes`) followed by a content region showing the `AlertBanner` (when `hasBanner`) and `children`.
|
|
68
|
+
|
|
69
|
+
## Behavioral Contract
|
|
70
|
+
|
|
71
|
+
### Portal Type Detection
|
|
72
|
+
|
|
73
|
+
- Check `portalName` (or metadata flag) against WSS portal identifier.
|
|
74
|
+
- WSS portal → render `WssNavBar` component.
|
|
75
|
+
- Standard portal → render `NavBar` component.
|
|
76
|
+
|
|
77
|
+
### Alert Banners
|
|
78
|
+
|
|
79
|
+
1. Subscribe to `getPConnect()` for `httpMessages` and `pageMessages` updates.
|
|
80
|
+
2. If either array is non-empty, render the `AlertBanner` component above the main content.
|
|
81
|
+
3. `AlertBanner` receives the combined message array and a dismiss handler.
|
|
82
|
+
|
|
83
|
+
### Portal Logo
|
|
84
|
+
|
|
85
|
+
1. On mount, call `PCore.getAssetLoader().getSvcImageUrl(logoAssetName)` asynchronously.
|
|
86
|
+
2. Store the resolved URL in local state `portalLogoUrl`.
|
|
87
|
+
3. Pass `portalLogoUrl` to the nav bar as the `logo` input.
|
|
88
|
+
|
|
89
|
+
### Operator Avatar
|
|
90
|
+
|
|
91
|
+
- Read `displayName` from `getPConnect().getValue('.pyUserName')` or the `displayName` input.
|
|
92
|
+
- Render operator avatar (initials) in the nav bar via the `operatorInfo` input.
|
|
93
|
+
|
|
94
|
+
### Case Types
|
|
95
|
+
|
|
96
|
+
> ⚠️ **DO NOT hardcode `'D_pyPortalTypeList'`** — this data page does not exist in most environments and will 404.
|
|
97
|
+
|
|
98
|
+
The correct pattern reads the data page name dynamically from the environment, inside a lifecycle effect that runs once on mount: read `caseTypesDP = PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP` (note this property may not appear in the type definitions, so a type suppression comment may be needed). When `caseTypesDP` is truthy, resolve `portalID = pConn.getValue('.pyOwner', '')`, then call `PCore.getDataPageUtils().getPageDataAsync(caseTypesDP, pConn.getContextName(), { PortalName: portalID })`; on success, if the response includes `pyCaseTypesAvailableToCreate`, store it via `pConn.replaceState('.pyCaseTypesAvailableToCreate', response.pyCaseTypesAvailableToCreate, { skipDirtyValidation: true })`; swallow any errors silently.
|
|
99
|
+
|
|
100
|
+
Key points:
|
|
101
|
+
|
|
102
|
+
1. Data page name comes from `environmentInfoObject.pxApplication.pyCaseTypesAvailableToCreateDP` (dynamic)
|
|
103
|
+
2. Context is `pConn.getContextName()` (NOT `'root'`)
|
|
104
|
+
3. Parameter `{ PortalName: portalID }` is required
|
|
105
|
+
4. Result is stored via `pConn.replaceState('.pyCaseTypesAvailableToCreate', ...)` — this populates PConnect state for other consumers
|
|
106
|
+
|
|
107
|
+
> ⚠️ **NavBar reads `caseTypes` from its INPUT, not from PConnect state.** Do NOT shadow the `caseTypes` input with local state. Instead, receive `caseTypes` (default empty array) directly from inputs and pass that same value straight through to `NavBar caseTypes`.
|
|
108
|
+
>
|
|
109
|
+
> If you store `caseTypes` in local state, NavBar will receive an empty array because the local state is never updated by `replaceState`.
|
|
110
|
+
|
|
111
|
+
### Navigation Store Context
|
|
112
|
+
|
|
113
|
+
- Wrap children in the navigation store context providing `{ open, setOpen }`.
|
|
114
|
+
|
|
115
|
+
### Render Structure
|
|
116
|
+
|
|
117
|
+
The navigation store context (providing `{ open, setOpen }`) wraps a flex container `#AppShell` containing `NavBar` (with `caseTypes` and other inputs) followed by a content region (`flexGrow: 1`, full viewport `height`, `overflow: auto`, horizontal `margin`) that shows the `AlertBanner` when there are messages, then `children`.
|
|
118
|
+
|
|
119
|
+
> ⚠️ The content region MUST have:
|
|
120
|
+
>
|
|
121
|
+
> - `flexGrow: 1` — fill remaining viewport width beside NavBar
|
|
122
|
+
> - `height: 100vh` — full viewport height
|
|
123
|
+
> - `overflow: auto` — scroll when content exceeds viewport
|
|
124
|
+
> - `margin: 0 1rem` — horizontal spacing between NavBar and content (approximately 16px)
|
|
125
|
+
|
|
126
|
+
## Visual Specifications
|
|
127
|
+
|
|
128
|
+
**CSS-only implementation notes:**
|
|
129
|
+
|
|
130
|
+
- Shell wrapper: `display: flex; flex-direction: column; height: 100vh`.
|
|
131
|
+
- Nav bar: `flex: 0 0 auto` (fixed height).
|
|
132
|
+
- Alert banner: `flex: 0 0 auto` (shown below nav, pushes content down).
|
|
133
|
+
- Content area: `flex: 1 1 auto; overflow-y: auto`.
|
|
134
|
+
|
|
135
|
+
## Edge Cases & Special Logic
|
|
136
|
+
|
|
137
|
+
- Logo loading is async — show fallback (app name or blank) until URL resolves.
|
|
138
|
+
- Case types fetch may fail — catch errors and fall back to the `caseTypes` input.
|
|
139
|
+
- `httpMessages` are transient (from API errors) — clear them after display or on next navigation.
|
|
140
|
+
- `pageMessages` are persistent until explicitly dismissed.
|
|
141
|
+
- If `pages` is empty, `links` array is empty — nav bar may render without page links.
|
|
142
|
+
|
|
143
|
+
## Dependencies
|
|
144
|
+
|
|
145
|
+
- `NavBar` component — standard portal navigation (from the project's component registry)
|
|
146
|
+
- `WssNavBar` template component — WSS portal navigation (see `WssNavBar.md`)
|
|
147
|
+
- `AlertBanner` component — message display (from the project's component registry)
|
|
148
|
+
- Navigation store context — shared nav drawer state for descendant components
|
|
149
|
+
- `PCore.getAssetLoader().getSvcImageUrl()` — logo URL resolution
|
|
150
|
+
- `PCore.getDataPageUtils().getPageDataAsync()` — case types data page
|
|
151
|
+
|
|
152
|
+
## Design System Mapping
|
|
153
|
+
|
|
154
|
+
**UI control type:** Application shell layout — fixed nav + scrollable content area.
|
|
155
|
+
|
|
156
|
+
When implementing, choose the design system's shell, nav bar, and alert components that match the project's chosen library. The structure should provide a fixed-height navigation bar at top, an optional alert region below it, and a scrollable content area filling remaining space. All design systems must preserve:
|
|
157
|
+
|
|
158
|
+
- WSS vs portal detection — the nav bar component differs for each mode
|
|
159
|
+
- Logo URL loaded asynchronously from `PCore.getAssetLoader()`
|
|
160
|
+
- Navigation store context wrapping children so descendant nav-aware components can access drawer state and links
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Skill: BannerPage
|
|
2
|
+
|
|
3
|
+
Page template that wraps the `Banner` DSE component, rendering a hero image section with a configurable two-column content area below.
|
|
4
|
+
|
|
5
|
+
> **Prerequisite skill:** [`template-components.md`](../template-components.md) — covers architecture, child rendering patterns, and registration conventions common to ALL template components.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Component Purpose
|
|
10
|
+
|
|
11
|
+
A thin template wrapper that delegates entirely to the `Banner` DSE component. Translates page-template inputs (heading, message, layout, backgroundImage) into the Banner component's inputs and passes the first two children as the `a` (left) and `b` (right) content slot.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `BannerPage` (in the project's component map)
|
|
16
|
+
- **Category:** Page template
|
|
17
|
+
- **Extends:** the project's base component interface
|
|
18
|
+
|
|
19
|
+
## Inputs
|
|
20
|
+
|
|
21
|
+
| Input | Type | Required | Description |
|
|
22
|
+
| ----------------- | ----------------------- | -------- | ---------------------------------------------------------------------------------------------- |
|
|
23
|
+
| `children` | array of child elements | Yes | At least 2 children — `[0]` → left (`a`) slot, `[1]` → right (`b`) slot |
|
|
24
|
+
| `layout` | `string` | No | Column layout variant for `Banner`: `'two-column'` (default), `'narrow-wide'`, `'wide-narrow'` |
|
|
25
|
+
| `heading` | `string` | No | Hero section heading text. Default `''` |
|
|
26
|
+
| `message` | `string` | No | Hero section message/subtitle. Default `''` |
|
|
27
|
+
| `imageTheme` | `string` | No | Banner image theme (e.g., `'light'`). Default `'light'` |
|
|
28
|
+
| `backgroundImage` | `string` | No | URL of the background image for the hero. Default `''` |
|
|
29
|
+
| `backgroundColor` | `string` | No | Background color for the hero. Default `''` |
|
|
30
|
+
| `tintImage` | `boolean` | No | Whether to tint the background image. Default `false` |
|
|
31
|
+
|
|
32
|
+
## Implementation Structure
|
|
33
|
+
|
|
34
|
+
Simplest template — pure pass-through to the `Banner` DSE component.
|
|
35
|
+
|
|
36
|
+
**Module Setup:** This component requires access to the project's component registry (to resolve `Banner` at runtime) and the project's base component interface. Define a component input contract extending the base component interface with optional `layout`, `heading`, `message`, `imageTheme`, `backgroundImage`, `backgroundColor` (all strings), and `tintImage` (boolean).
|
|
37
|
+
|
|
38
|
+
**Main Component Logic** — steps in order:
|
|
39
|
+
|
|
40
|
+
1. Retrieve `Banner` from the project's component registry (keyed by `'Banner'`).
|
|
41
|
+
2. Receive inputs: `children`, `layout` (default `'two-column'`), `heading` (default `''`), `message` (default `''`), `imageTheme` (default `'light'`), `backgroundImage` (default `''`), `backgroundColor` (default `''`), and `tintImage` (default `false`).
|
|
42
|
+
3. Normalize `children` to an array via a memoized computation keyed on `children`.
|
|
43
|
+
4. Render a single `Banner` element with: `variant={layout}`; `a={childArray[0]}`; `b={childArray[1]}`; and a `banner` input object combining `variant: imageTheme`, `backgroundColor`, `title: heading`, `message`, `backgroundImage`, and `tintImage`.
|
|
44
|
+
|
|
45
|
+
## Behavioral Contract
|
|
46
|
+
|
|
47
|
+
1. Retrieve `Banner` from the project's component registry (keyed by `'Banner'`).
|
|
48
|
+
2. Normalize `children` to an array (memoized computation).
|
|
49
|
+
3. Render `Banner` with the following inputs:
|
|
50
|
+
- `variant={layout}` — controls column widths below the hero
|
|
51
|
+
- `a={childArray[0]}` — left/first column content
|
|
52
|
+
- `b={childArray[1]}` — right/second column content
|
|
53
|
+
- `banner={{ variant: imageTheme, backgroundColor, title: heading, message, backgroundImage, tintImage }}`
|
|
54
|
+
4. No additional wrapper or layout — this component IS a single `Banner` render.
|
|
55
|
+
|
|
56
|
+
## Visual Specifications
|
|
57
|
+
|
|
58
|
+
This component has no independent visual output — all visual behavior is defined by the `Banner` DSE component. See [`design-system-extension-skills/Banner.md`](../design-system-extension-skills/Banner.md) for full visual specs.
|
|
59
|
+
|
|
60
|
+
Key visual behaviors inherited from `Banner`:
|
|
61
|
+
|
|
62
|
+
- Hero: full-width background image section, height `19rem`, centered title and message overlay
|
|
63
|
+
- Content area: two-column grid below the hero, column widths driven by `variant`/`layout`
|
|
64
|
+
|
|
65
|
+
**CSS-only implementation notes:**
|
|
66
|
+
|
|
67
|
+
- This template creates no CSS of its own — implement it as a pure pass-through to `Banner`.
|
|
68
|
+
- The `layout` input maps directly to `Banner`'s `variant` input.
|
|
69
|
+
- `heading` → `Banner.banner.title`, `message` → `Banner.banner.message`.
|
|
70
|
+
|
|
71
|
+
## Edge Cases & Special Logic
|
|
72
|
+
|
|
73
|
+
- Children are normalized to an array via a memoized computation — only recomputed when `children` changes.
|
|
74
|
+
- If only one child is provided, `childArray[1]` will be `undefined` — `Banner` receives `b={undefined}` and should render an empty second column.
|
|
75
|
+
- `BannerPage` does NOT call `getPConnect()` itself for layout — children are passed by the Pega rendering engine via content projection.
|
|
76
|
+
|
|
77
|
+
## Dependencies
|
|
78
|
+
|
|
79
|
+
- The project's component registry — to resolve the `Banner` component at runtime
|
|
80
|
+
- A utility to normalize children to an array — for child array normalization
|
|
81
|
+
|
|
82
|
+
## Design System Mapping
|
|
83
|
+
|
|
84
|
+
**UI control type:** Full-width banner hero page with configurable two-column content area.
|
|
85
|
+
|
|
86
|
+
When implementing in a specific design system, map the following:
|
|
87
|
+
|
|
88
|
+
- `BannerPage` is always a thin wrapper — implement `Banner` first, then `BannerPage` simply delegates to it
|
|
89
|
+
- Input mapping: `layout` → `variant`, `heading` → `banner.title`, `message` → `banner.message`, `backgroundImage` → `banner.backgroundImage`
|
|
90
|
+
- The Banner component renders a hero section (full-width background image with title/message overlay) plus a two-column content grid below; use your design system's layout primitives to achieve this
|