@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
package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DataReference.md
RENAMED
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
# Skill: DataReference
|
|
2
2
|
|
|
3
|
-
Data reference template. Routes to field, table, or search renderers based on `selectionMode` and `displayAs`
|
|
3
|
+
Data reference template. Routes to field, table, or search renderers based on `selectionMode` and `displayAs` inputs. Handles deferred data source loading, dropdown options, and multi-select variants.
|
|
4
4
|
|
|
5
5
|
> **Prerequisite skill:** [`template-components.md`](../template-components.md) — covers architecture, child rendering patterns, and registration conventions common to ALL template components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
> ⚠️ **CRITICAL — DataReference is a CONTENT-PROJECTION PASS-THROUGH**
|
|
10
|
+
>
|
|
11
|
+
> This component MUST render children provided via content projection directly. The PConnect bridge already resolves the correct sub-components (Dropdown, AutoComplete, SingleReferenceReadOnly, etc.) and passes them as projected content. DataReference just passes them through.
|
|
12
|
+
>
|
|
13
|
+
> The correct implementation is a simple pass-through: normalize the projected children to a list (if already a list use it directly, otherwise wrap the single item in a list filtering out empty entries), then return the single child directly if there is exactly one, otherwise wrap the list in a container element.
|
|
14
|
+
>
|
|
15
|
+
> ❌ **NEVER call `pConn.createComponent()`** — causes "Maximum call stack size exceeded" (infinite recursion back to form templates)
|
|
16
|
+
> ❌ **NEVER call `firstChildPConnect().createComponent()`** — causes "getPConnect is not a function" when child PConnect isn't ready
|
|
17
|
+
> ❌ **NEVER try to manually route to Dropdown/AutoComplete/etc based on `displayAs`** — the bridge already does this
|
|
18
|
+
>
|
|
19
|
+
> **Why the reference is ~460 lines but the generated version should be ~10:**
|
|
20
|
+
> The reference adds advanced features (deferred datasource fetching, review-mode editing, advanced search, card variants) that require careful PConnect lifecycle management. These features are NOT needed for the component to function correctly — the bridge handles core rendering. Attempting to replicate the reference's `createComponent` pattern without the full ~460 lines of config manipulation will crash.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
9
24
|
## Component Purpose
|
|
10
25
|
|
|
11
26
|
Renders a data reference field that can be displayed as a dropdown, autocomplete, checkbox group, radiobutton group, or a card-selection layout. In read-only mode, delegates to `SingleReferenceReadOnly` (single selection) or `MultiReferenceReadOnly` (multi-selection). Supports deferred/parameterized data sources.
|
|
12
27
|
|
|
13
28
|
## Pega Metadata
|
|
14
29
|
|
|
15
|
-
- **Registration key:** `DataReference` (in
|
|
30
|
+
- **Registration key:** `DataReference` (in the project's component map)
|
|
16
31
|
- **Category:** Form template — data selection
|
|
17
|
-
- **Extends:**
|
|
32
|
+
- **Extends:** the project's base component interface
|
|
18
33
|
|
|
19
|
-
##
|
|
34
|
+
## Inputs
|
|
20
35
|
|
|
21
|
-
|
|
|
36
|
+
| Input | Type | Required | Description |
|
|
22
37
|
| -------------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------ |
|
|
23
38
|
| `label` | `string` | Yes | Field label |
|
|
24
39
|
| `displayAs` | `string` | Yes | UI variant: `'dropdown'`, `'autocomplete'`, `'checkbox'`, `'radiobutton'`, `'listview'`, `'searchbox'` |
|
|
@@ -36,15 +51,25 @@ Renders a data reference field that can be displayed as a dropdown, autocomplete
|
|
|
36
51
|
| `fieldMetadata` | `object` | No | Extra field-level metadata |
|
|
37
52
|
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
38
53
|
|
|
54
|
+
## Implementation Structure
|
|
55
|
+
|
|
56
|
+
**Main Component Logic** — steps in order:
|
|
57
|
+
|
|
58
|
+
This component is a pure pass-through wrapper. The PConnect bridge resolves the correct sub-components (Dropdown, AutoComplete, SingleReferenceReadOnly, MultiReferenceReadOnly, etc.) and passes them as projected content. Do NOT call `pConn.createComponent()` or `firstChildPConnect().createComponent()` here — it causes "getPConnect is not a function" errors or infinite recursion.
|
|
59
|
+
|
|
60
|
+
1. Receive inputs, including projected children content.
|
|
61
|
+
2. Normalize the projected children into a list: if already a list use it directly, otherwise wrap the single item in a list filtering out empty entries.
|
|
62
|
+
3. Return the single child directly if the list has exactly one element; otherwise wrap the full list in a container element.
|
|
63
|
+
|
|
39
64
|
## Behavioral Contract
|
|
40
65
|
|
|
41
66
|
### Read-Only Routing
|
|
42
67
|
|
|
43
68
|
If `displayMode === 'DISPLAY_ONLY'` or `readOnly === true`:
|
|
44
69
|
|
|
45
|
-
- `selectionMode === 'single'` → render
|
|
46
|
-
- `selectionMode === 'multi'` → render
|
|
47
|
-
- Both receive all relevant
|
|
70
|
+
- `selectionMode === 'single'` → render `SingleReferenceReadOnly`.
|
|
71
|
+
- `selectionMode === 'multi'` → render `MultiReferenceReadOnly`.
|
|
72
|
+
- Both receive all relevant inputs plus `getPConnect`.
|
|
48
73
|
|
|
49
74
|
### Edit Routing (by `displayAs`)
|
|
50
75
|
|
|
@@ -61,17 +86,17 @@ If `displayMode === 'DISPLAY_ONLY'` or `readOnly === true`:
|
|
|
61
86
|
### Deferred Data Source (`isDDSourceDeferred === true`)
|
|
62
87
|
|
|
63
88
|
1. On mount, call `PCore.getDataApiUtils().getData(dataSourceName, parameters)`.
|
|
64
|
-
2. Store result in
|
|
65
|
-
3. Pass
|
|
89
|
+
2. Store result in local state for the dropdown data source.
|
|
90
|
+
3. Pass that data source to the rendered field component as `datasource`.
|
|
66
91
|
|
|
67
92
|
### Localized Placeholder
|
|
68
93
|
|
|
69
|
-
- Generate a localized "Please select..." option via `
|
|
70
|
-
- Prepend this option to
|
|
94
|
+
- Generate a localized "Please select..." option via `PCore.getLocaleUtils().getLocaleValue(...)`.
|
|
95
|
+
- Prepend this option to the dropdown data source for dropdown/autocomplete variants.
|
|
71
96
|
|
|
72
97
|
### SearchForm Sub-Component
|
|
73
98
|
|
|
74
|
-
When `displayAs === 'searchbox'`, renders an inline
|
|
99
|
+
When `displayAs === 'searchbox'`, renders an inline SearchForm sub-component that:
|
|
75
100
|
|
|
76
101
|
1. Shows a text input with search icon.
|
|
77
102
|
2. On submit: calls `getPConnect().getListActions().search(searchText)`.
|
|
@@ -79,27 +104,25 @@ When `displayAs === 'searchbox'`, renders an inline `<SearchForm>` sub-component
|
|
|
79
104
|
|
|
80
105
|
## Visual Specifications
|
|
81
106
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- Wrapper: `display: flex; flex-direction: column; gap: 4px`.
|
|
85
|
-
- Label: `font-size: 0.875rem; font-weight: 500; margin-bottom: 4px`.
|
|
107
|
+
- Wrapper: vertical flex layout with 4px gap.
|
|
108
|
+
- Label: 0.875rem font size, weight 500, 4px bottom margin.
|
|
86
109
|
- Dropdown/Autocomplete: standard select input, full-width.
|
|
87
110
|
- Checkbox/Radio group: grid layout matching `numCols`.
|
|
88
|
-
- SearchForm:
|
|
111
|
+
- SearchForm: horizontal flex layout with 8px gap (input + search button).
|
|
89
112
|
|
|
90
113
|
## Edge Cases & Special Logic
|
|
91
114
|
|
|
92
|
-
- `isDDSourceDeferred` — data is not available synchronously; show a loading indicator until
|
|
115
|
+
- `isDDSourceDeferred` — data is not available synchronously; show a loading indicator until the dropdown data source resolves.
|
|
93
116
|
- `parameters` may contain property references — resolve them via `pConn.getValue(paramRef)` before passing to `getData`.
|
|
94
117
|
- `listType === 'associated'` — use `pConn.getFieldMetadata().options` directly instead of fetching from data page.
|
|
95
|
-
- Card variant (`displayAs === 'listview'`) — may include image
|
|
118
|
+
- Card variant (`displayAs === 'listview'`) — may include image inputs (`image`, `imagePlaceholder`) from `getComponentConfig()`.
|
|
96
119
|
- Multi-select with `displayAs === 'checkbox'` — values stored as comma-separated string in the property.
|
|
97
120
|
|
|
98
121
|
## Dependencies
|
|
99
122
|
|
|
100
123
|
- `SingleReferenceReadOnly` (registered DSE or template component)
|
|
101
124
|
- `MultiReferenceReadOnly` (registered template component)
|
|
102
|
-
- Field components from registry: `Dropdown`, `AutoComplete`, `CheckboxGroup`, `RadioButtons`
|
|
125
|
+
- Field components from the project's component registry: `Dropdown`, `AutoComplete`, `CheckboxGroup`, `RadioButtons`
|
|
103
126
|
- `PCore.getDataApiUtils().getData()` — for deferred data source fetch
|
|
104
127
|
- `PCore.getLocaleUtils().getLocaleValue()` — for localized placeholder
|
|
105
128
|
|
|
@@ -107,17 +130,9 @@ When `displayAs === 'searchbox'`, renders an inline `<SearchForm>` sub-component
|
|
|
107
130
|
|
|
108
131
|
**UI control type:** Polymorphic data selection field — dropdown, autocomplete, checkbox, radiobutton, or search variants.
|
|
109
132
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
| Design System | Dropdown | Autocomplete | Checkbox Group | Radio Group |
|
|
113
|
-
| ------------------ | --------------------- | ---------------- | ------------------------------ | --------------------------- |
|
|
114
|
-
| Default (CSS only) | `<select>` | Custom combobox | `<input type='checkbox'>` list | `<input type='radio'>` list |
|
|
115
|
-
| MUI | `<Select>/<MenuItem>` | `<Autocomplete>` | `<FormGroup><Checkbox>` | `<RadioGroup><Radio>` |
|
|
116
|
-
| Ant Design | `<Select>` | `<AutoComplete>` | `<Checkbox.Group>` | `<Radio.Group>` |
|
|
117
|
-
| Chakra UI | `<Select>` | Custom | `<CheckboxGroup>` | `<RadioGroup>` |
|
|
118
|
-
| Shadcn/ui | `<Select>` + combobox | `<Combobox>` | custom | `<RadioGroup>` |
|
|
133
|
+
When implementing in a specific design system, use the appropriate select/combobox component for dropdown and autocomplete variants, a checkbox group component for the checkbox variant, a radio group component for the radiobutton variant, and native or custom search input for the searchbox variant. Each design system will have its own equivalents for these control types.
|
|
119
134
|
|
|
120
|
-
|
|
135
|
+
Design considerations:
|
|
121
136
|
|
|
122
137
|
- Always check `displayMode`/`readOnly` first and route to read-only components before rendering editable variants
|
|
123
138
|
- Deferred loading must be handled — show skeleton/spinner until data is ready
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Skill: DefaultForm
|
|
2
|
+
|
|
3
|
+
Standard form layout template supporting 1, 2, or 3 column arrangements. Renders form fields from the first PConnect region child and optionally displays instruction text above.
|
|
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
|
+
> This component REQUIRES the project's state-connection wrapper to function. Without it, **form fields will NOT render** because they won't receive visibility and state updates from the application store.
|
|
12
|
+
>
|
|
13
|
+
> **NEVER** replace the state-connection wrapper pattern with plain rendering of the project's PConnect bridge utility. That pattern does not subscribe children to the store and results in invisible/non-functional form fields.
|
|
14
|
+
>
|
|
15
|
+
> **MANDATORY artifacts when generating this component:**
|
|
16
|
+
>
|
|
17
|
+
> 1. Main component file — with state-connection wrapper wrapping each child
|
|
18
|
+
> 2. A utilities module — containing `mapStateToProps` and `getKeyForMappedField`
|
|
19
|
+
> 3. Companion styles — column layout styles (or DS equivalent)
|
|
20
|
+
> 4. Re-export module
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Component Purpose
|
|
25
|
+
|
|
26
|
+
Renders a form's fields in a 1, 2, or 3-column grid layout. Children come from a PConnect region (unwrapped one level). Each child field is connected to the application store via the project's state-connection wrapper so visibility and state updates flow reactively. Instruction HTML is displayed above the form when present.
|
|
27
|
+
|
|
28
|
+
## Pega Metadata
|
|
29
|
+
|
|
30
|
+
- **Registration key:** `DefaultForm` (in the project's component map)
|
|
31
|
+
- **Category:** Form template
|
|
32
|
+
- **Extends:** The project's base component interface
|
|
33
|
+
|
|
34
|
+
## Inputs
|
|
35
|
+
|
|
36
|
+
| Input | Type | Required | Description |
|
|
37
|
+
| -------------- | ---------- | -------- | -------------------------------------------------------- |
|
|
38
|
+
| `NumCols` | `string` | No | Number of columns: `'1'`, `'2'`, or `'3'`. Default `'1'` |
|
|
39
|
+
| `instructions` | `string` | No | HTML instruction text shown above the form |
|
|
40
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
41
|
+
|
|
42
|
+
## Implementation Structure
|
|
43
|
+
|
|
44
|
+
**Module Setup:** This component needs: an element-creation utility from the framework; the project's template-utils helper (provides `getInstructions`); the project's PConnect bridge utility (renders each child field); the project's state-connection wrapper (connects fields to the application store); `getKeyForMappedField` and `mapStateToProps` from the companion utilities module; the project's base component interface (for typing); and companion styles for column layouts. The component's input contract extends the base component interface with `NumCols: string` and `instructions: string`.
|
|
45
|
+
|
|
46
|
+
Outside the main component logic, define a `Child` wrapper using the project's state-connection wrapper invoked with `mapStateToProps`. This wrapper receives `key`, `visibility`, and the remaining inputs, then renders the project's PConnect bridge utility with those values. Defining this outside the component ensures it isn't recreated on every render cycle.
|
|
47
|
+
|
|
48
|
+
**Main Component Logic** — steps in order:
|
|
49
|
+
|
|
50
|
+
1. Receive inputs: extract `getPConnect` and `NumCols` (default `'1'`); compute `instructions = getInstructions(getPConnect(), inputs.instructions)`.
|
|
51
|
+
2. **Resolve column count:** switch on `NumCols || '1'` to pick a CSS class: `'1'` → `psdk-default-form-one-column`, `'2'` → `psdk-default-form-two-column`, `'3'` → `psdk-default-form-three-column`, default → `psdk-default-form-one-column`.
|
|
52
|
+
3. **Unwrap region children:** the first child is a region wrapper, so drill into it via `getPConnect().getChildren()[0].getPConnect().getChildren()` to get the actual array of form fields (`arChildren`).
|
|
53
|
+
4. **Wrap each child:** map `arChildren` to a `Child` element with `key={getKeyForMappedField(kid)}` and all field data spread as inputs, producing `dfChildren`.
|
|
54
|
+
5. **Render:** when `instructions` is truthy, render a `psdk-default-form-instruction-text` container holding another element with the instructions as raw inner HTML; always render a container with the resolved column class (`divClass`) containing `dfChildren`.
|
|
55
|
+
|
|
56
|
+
## Behavioral Contract
|
|
57
|
+
|
|
58
|
+
1. **Resolve column count:** Use `NumCols || '1'`. Switch to CSS class:
|
|
59
|
+
- `'1'` → `psdk-default-form-one-column`
|
|
60
|
+
- `'2'` → `psdk-default-form-two-column`
|
|
61
|
+
- `'3'` → `psdk-default-form-three-column`
|
|
62
|
+
- Default → `psdk-default-form-one-column`
|
|
63
|
+
2. **Get instructions:** Call `getInstructions(getPConnect(), inputs.instructions)` — returns sanitized HTML string or empty.
|
|
64
|
+
3. **Unwrap region children:** `arChildren = getPConnect().getChildren()[0].getPConnect().getChildren()` — the first child is a region; its children are the actual form fields.
|
|
65
|
+
4. **Wrap each child:** Create a `Child` component using the project's state-connection wrapper invoked with `mapStateToProps`, which in turn renders the project's PConnect bridge utility. Map each field to a Child element with `key={getKeyForMappedField(kid)}` and all field data spread.
|
|
66
|
+
5. **Render:**
|
|
67
|
+
- If instructions, render a `psdk-default-form-instruction-text` container with raw HTML content of the instructions.
|
|
68
|
+
- Render a container with `divClass` holding `dfChildren`.
|
|
69
|
+
|
|
70
|
+
## Visual Specifications
|
|
71
|
+
|
|
72
|
+
Derived from companion styles:
|
|
73
|
+
|
|
74
|
+
### Column Layouts
|
|
75
|
+
|
|
76
|
+
| Class | Layout |
|
|
77
|
+
| -------------------------------- | ------------------------- |
|
|
78
|
+
| `psdk-default-form-one-column` | Single column, full width |
|
|
79
|
+
| `psdk-default-form-two-column` | Two equal columns |
|
|
80
|
+
| `psdk-default-form-three-column` | Three equal columns |
|
|
81
|
+
|
|
82
|
+
**CSS-only implementation notes:**
|
|
83
|
+
|
|
84
|
+
- One column: `display: grid; grid-template-columns: 1fr; gap: 1rem`.
|
|
85
|
+
- Two column: `display: grid; grid-template-columns: 1fr 1fr; gap: 1rem`.
|
|
86
|
+
- Three column: `display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem`.
|
|
87
|
+
- Instructions container: `padding: 0.5rem 0; margin-bottom: 0.5rem; font-size: 0.875rem`.
|
|
88
|
+
- Responsive: collapse multi-column to single column on mobile.
|
|
89
|
+
|
|
90
|
+
### Instruction Text
|
|
91
|
+
|
|
92
|
+
| Property | Value |
|
|
93
|
+
| --------- | -------------------------------------------- |
|
|
94
|
+
| CSS class | `psdk-default-form-instruction-text` |
|
|
95
|
+
| Content | Raw HTML rendered as inner HTML of container |
|
|
96
|
+
|
|
97
|
+
## Edge Cases & Special Logic
|
|
98
|
+
|
|
99
|
+
- `NumCols` is a string (not number) — always compare with string literals `'1'`, `'2'`, `'3'`.
|
|
100
|
+
- The region unwrap (`getChildren()[0].getPConnect().getChildren()`) assumes the form metadata has exactly one region child. Guard against `undefined` if the region child is missing.
|
|
101
|
+
- The project's state-connection wrapper with `mapStateToProps` subscribes each field to the application store — if the store is not available, fall back to rendering the PConnect bridge utility directly without the wrapper.
|
|
102
|
+
- `getKeyForMappedField(kid)` generates a stable key for each field from the field's metadata path — provided by the companion utilities module.
|
|
103
|
+
- Instructions HTML is server-sanitized (comment in source code) — do not sanitize again on the client.
|
|
104
|
+
|
|
105
|
+
## Dependencies
|
|
106
|
+
|
|
107
|
+
- The project's template-utils helper (provides `getInstructions`) — extracts instruction text from PConnect metadata
|
|
108
|
+
- The project's state-connection wrapper — connects each child to the application store for visibility and state updates
|
|
109
|
+
- The project's PConnect bridge utility — renders each child field
|
|
110
|
+
- `getKeyForMappedField`, `mapStateToProps` from the companion utilities module — key generation and state mapping
|
|
111
|
+
|
|
112
|
+
## Mandatory File: Utilities Module
|
|
113
|
+
|
|
114
|
+
You MUST create a utilities module alongside the main component file. Without it, the component will not compile. It must export two members:
|
|
115
|
+
|
|
116
|
+
- `mapStateToProps`: a function taking `(_, ownInputs)` that extracts `getPConnect` from `ownInputs` and returns `{ visibility: getPConnect().getComputedVisibility(), getPConnect }`.
|
|
117
|
+
- `getKeyForMappedField`: a function taking a `field` that generates a stable render key. If `field` is an array, recursively map `getKeyForMappedField` over each item and join the results with `'__'`. Otherwise, read `field?.getPConnect?.()`; if its `meta` is present, return `JSON.stringify(pConnect.meta)`; otherwise fall back to `crypto.randomUUID()`.
|
|
118
|
+
|
|
119
|
+
## Post-Generation Checklist
|
|
120
|
+
|
|
121
|
+
After generating this component, verify ALL of the following:
|
|
122
|
+
|
|
123
|
+
- [ ] The project's state-connection wrapper is imported from the state-utils helper
|
|
124
|
+
- [ ] `mapStateToProps` and `getKeyForMappedField` are imported from the utilities module
|
|
125
|
+
- [ ] The state-connected `Child` wrapper is defined OUTSIDE the main component logic
|
|
126
|
+
- [ ] Each child field is rendered via the `Child` wrapper with `key={getKeyForMappedField(kid)}` and all field data spread
|
|
127
|
+
- [ ] The utilities module is created with `mapStateToProps` and `getKeyForMappedField`
|
|
128
|
+
- [ ] Column count CSS classes or DS grid component is applied based on `NumCols`
|
|
129
|
+
|
|
130
|
+
If ANY of these are missing, the form fields will NOT render at runtime.
|
|
131
|
+
|
|
132
|
+
## Design System Mapping
|
|
133
|
+
|
|
134
|
+
**UI control type:** Multi-column form field grid with optional instruction text header.
|
|
135
|
+
|
|
136
|
+
When implementing in a specific design system, map the following:
|
|
137
|
+
|
|
138
|
+
- The column grid can be realized with CSS Grid driven by `NumCols`, a grid layout component from your design system, or utility-class-based grid layouts.
|
|
139
|
+
- `NumCols` is always a string (`'1'`/`'2'`/`'3'`) — parse before use if the grid API expects a number.
|
|
140
|
+
- Instructions HTML is rendered above the form, before any fields.
|
|
141
|
+
- Each child field must be subscribed to the store via the project's state-connection wrapper for reactive visibility and state updates.
|
package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/DefaultPage.md
RENAMED
|
@@ -8,20 +8,20 @@ Flexible page layout template that renders children in a configurable column lay
|
|
|
8
8
|
|
|
9
9
|
## Component Purpose
|
|
10
10
|
|
|
11
|
-
Renders a page's child regions in a responsive grid layout. The number and proportions of columns are driven by the `layout`
|
|
11
|
+
Renders a page's child regions in a responsive grid layout. The number and proportions of columns are driven by the `layout` input. When `enableBanner` is true, delegates to the `Banner` DSE component for a full-width hero section with the child columns below it.
|
|
12
12
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
|
-
- **Registration key:** `DefaultPage` (in
|
|
15
|
+
- **Registration key:** `DefaultPage` (in the project's component map)
|
|
16
16
|
- **Category:** Page template
|
|
17
|
-
- **Extends:** `CommonPageProps` (does NOT directly extend
|
|
17
|
+
- **Extends:** `CommonPageProps` (does NOT directly extend the base component interface — no `getPConnect` in inputs)
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Inputs
|
|
20
20
|
|
|
21
|
-
|
|
|
21
|
+
| Input | Type | Required | Description |
|
|
22
22
|
| ----------------- | ----------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------- |
|
|
23
23
|
| `layout` | `'one-column' \| 'two-column' \| 'narrow-wide' \| 'wide-narrow' \| 'dynamic'` | No | Column layout. Default `'one-column'` |
|
|
24
|
-
| `children` |
|
|
24
|
+
| `children` | renderable content (single or array) | Yes | Child region components to render in columns |
|
|
25
25
|
| `title` | `string` | Yes | Page title (part of `CommonPageProps`, not directly rendered) |
|
|
26
26
|
| `icon` | `string` | Yes | Page icon (part of `CommonPageProps`, not directly rendered) |
|
|
27
27
|
| `localeReference` | `string` | Yes | Locale reference key |
|
|
@@ -33,37 +33,51 @@ Renders a page's child regions in a responsive grid layout. The number and propo
|
|
|
33
33
|
| `backgroundColor` | `string` | No | Banner background color. Default `''` |
|
|
34
34
|
| `tintImage` | `boolean` | No | Banner image tint flag |
|
|
35
35
|
|
|
36
|
+
## Implementation Structure
|
|
37
|
+
|
|
38
|
+
**Module Setup:** This component needs: a children-to-array utility from the framework, and the project's component registry (provides `Banner` at runtime). Declare a constant `COLUMNS_WIDTHS` mapping each layout name to its column width array: `'one-column'` → `[12]`, `'two-column'` → `[6, 6]`, `'narrow-wide'` → `[4, 8]`, `'wide-narrow'` → `[8, 4]`.
|
|
39
|
+
|
|
40
|
+
**Main Component Logic** — steps in order:
|
|
41
|
+
|
|
42
|
+
1. Receive inputs: extract `layout` (default `'one-column'`), `children`, `enableBanner`, `heading` (default `''`), `message` (default `''`), `imageTheme`, `backgroundImage` (default `''`), `backgroundColor` (default `''`), and `tintImage` from the component's inputs.
|
|
43
|
+
2. Retrieve `Banner` from the project's component registry.
|
|
44
|
+
3. Convert `children` to an array using the framework's children-to-array utility, as a memoized computation depending on `children`.
|
|
45
|
+
4. **Banner mode:** if `enableBanner` is true, render a `Banner` with `variant` set to `layout` (substituting `'two-column'` when `layout === 'one-column'`), `a={[childArray[0]]}`, `b={[childArray[1]]}`, and a `banner` configuration object combining `variant: imageTheme`, `backgroundColor`, `title: heading`, `message`, `backgroundImage`, `tintImage`.
|
|
46
|
+
5. **Standard grid mode:** otherwise, render a grid container with spacing of 1 unit containing one grid item per child, each sized according to `COLUMNS_WIDTHS[layout][index]`.
|
|
47
|
+
|
|
48
|
+
> **Note:** `DefaultPage` does NOT have a `getPConnect` input — it extends `CommonPageProps`, not the base component interface.
|
|
49
|
+
|
|
36
50
|
## Behavioral Contract
|
|
37
51
|
|
|
38
52
|
### Without Banner (`enableBanner` is falsy)
|
|
39
53
|
|
|
40
|
-
1. Convert children to an array using
|
|
54
|
+
1. Convert children to an array using the framework's children-to-array utility (as a memoized computation).
|
|
41
55
|
2. Look up column widths from `COLUMNS_WIDTHS` map using `layout`:
|
|
42
56
|
- `'one-column'`: `[12]` (single column, full width)
|
|
43
57
|
- `'two-column'`: `[6, 6]` (equal split)
|
|
44
58
|
- `'narrow-wide'`: `[4, 8]`
|
|
45
59
|
- `'wide-narrow'`: `[8, 4]`
|
|
46
|
-
3. Render a
|
|
47
|
-
4. Map over children array: for each child at index `i`, render
|
|
60
|
+
3. Render a grid container with spacing of 1 unit.
|
|
61
|
+
4. Map over children array: for each child at index `i`, render a grid item sized to `COLUMNS_WIDTHS[layout][i]` containing the child.
|
|
48
62
|
|
|
49
63
|
### With Banner (`enableBanner` is true)
|
|
50
64
|
|
|
51
|
-
1. Retrieve `Banner` from the component registry.
|
|
65
|
+
1. Retrieve `Banner` from the project's component registry.
|
|
52
66
|
2. Determine banner variant:
|
|
53
67
|
- If `layout === 'one-column'`, use `'two-column'` for the banner layout (equal split for `a`/`b`).
|
|
54
68
|
- Otherwise use the `layout` value directly.
|
|
55
|
-
3. Render
|
|
69
|
+
3. Render `Banner` with `variant`, `a={[childArray[0]]}`, `b={[childArray[1]]}`, and `banner` configuration: `{ variant: imageTheme, backgroundColor, title: heading, message, backgroundImage, tintImage }`.
|
|
56
70
|
|
|
57
71
|
## Visual Specifications
|
|
58
72
|
|
|
59
73
|
### Column Widths
|
|
60
74
|
|
|
61
|
-
| `layout` | Column sizes (
|
|
62
|
-
| --------------- |
|
|
63
|
-
| `'one-column'` | 12
|
|
64
|
-
| `'two-column'` | 6, 6
|
|
65
|
-
| `'narrow-wide'` | 4, 8
|
|
66
|
-
| `'wide-narrow'` | 8, 4
|
|
75
|
+
| `layout` | Column sizes (12-unit grid) |
|
|
76
|
+
| --------------- | --------------------------- |
|
|
77
|
+
| `'one-column'` | 12 |
|
|
78
|
+
| `'two-column'` | 6, 6 |
|
|
79
|
+
| `'narrow-wide'` | 4, 8 |
|
|
80
|
+
| `'wide-narrow'` | 8, 4 |
|
|
67
81
|
|
|
68
82
|
### Grid Spacing
|
|
69
83
|
|
|
@@ -84,29 +98,21 @@ Renders a page's child regions in a responsive grid layout. The number and propo
|
|
|
84
98
|
|
|
85
99
|
- `layout='dynamic'` is listed in the type union but has no entry in `COLUMNS_WIDTHS` — if accessed, it returns `undefined`, and no columns are rendered. This is a known stub.
|
|
86
100
|
- When `enableBanner` is true and `layout === 'one-column'`, the banner layout is forced to `'two-column'` to provide a meaningful two-slot layout for `a` and `b`.
|
|
87
|
-
- Children are
|
|
101
|
+
- Children are converted to an array via a memoized computation to avoid unnecessary re-renders.
|
|
88
102
|
|
|
89
103
|
## Dependencies
|
|
90
104
|
|
|
91
|
-
- When `enableBanner` is true: `
|
|
92
|
-
-
|
|
105
|
+
- When `enableBanner` is true: the project's component registry (to retrieve `Banner` at runtime)
|
|
106
|
+
- A grid layout mechanism (CSS Grid, a design system grid component, or utility classes)
|
|
93
107
|
|
|
94
108
|
## Design System Mapping
|
|
95
109
|
|
|
96
110
|
**UI control type:** Responsive multi-column page grid layout with optional banner hero.
|
|
97
111
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| Design System | Recommended Component |
|
|
101
|
-
| ------------------ | --------------------------------------------------------------- |
|
|
102
|
-
| Default (CSS only) | CSS Grid with column template driven by `layout` prop |
|
|
103
|
-
| MUI | `<Grid container spacing={1}>` with `<Grid size={N}>` per child |
|
|
104
|
-
| Ant Design | `<Row gutter={8}>` with `<Col span={N * 2}>` (24-col grid) |
|
|
105
|
-
| Chakra UI | `<SimpleGrid columns={{ base: 1, md: N }}>` |
|
|
106
|
-
| Shadcn/ui | Tailwind grid utilities matching the layout |
|
|
107
|
-
|
|
108
|
-
When implementing in a specific design system:
|
|
112
|
+
When implementing in a specific design system, map the following:
|
|
109
113
|
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
114
|
+
- The `layout` input drives column proportions — translate to the appropriate column template or grid configuration for your chosen system.
|
|
115
|
+
- The 12-unit grid widths (`[12]`, `[6, 6]`, `[4, 8]`, `[8, 4]`) can map to any proportional grid (e.g., a 24-unit grid by doubling values, or fractional CSS Grid columns).
|
|
116
|
+
- Banner mode delegates to the `Banner` component — implement Banner first.
|
|
117
|
+
- All children are sized uniformly within their column (no per-child overrides).
|
|
118
|
+
- Grid spacing of 1 unit (≈ 8px) should be applied between columns.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Skill: Details
|
|
2
|
+
|
|
3
|
+
Read-only single-column details template. Renders all child fields in DISPLAY_ONLY mode inside a labeled FieldGroup, with optional highlighted data strip above.
|
|
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 labeled group of read-only fields in a single-column vertical stack. Forces all children into `DISPLAY_ONLY` + `readOnly` mode via inherited configuration. Optionally renders a "highlighted data" banner row at the top (full-width, stacked-large-val display).
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `Details` (in the project's component map)
|
|
16
|
+
- **Category:** Display template
|
|
17
|
+
- **Extends:** the project's base component interface
|
|
18
|
+
|
|
19
|
+
## Inputs
|
|
20
|
+
|
|
21
|
+
| Input | Type | Required | Description |
|
|
22
|
+
| --------------------- | ---------- | -------- | --------------------------------------------------- |
|
|
23
|
+
| `label` | `string` | Yes | Section heading for the FieldGroup wrapper |
|
|
24
|
+
| `showLabel` | `boolean` | Yes | Whether to show the section label |
|
|
25
|
+
| `showHighlightedData` | `boolean` | Yes | Whether to render highlighted fields above children |
|
|
26
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
27
|
+
|
|
28
|
+
## Implementation Structure
|
|
29
|
+
|
|
30
|
+
**Module Setup:** Obtain the project's PConnect bridge utility (for rendering child PConnect nodes) and the project's component registry lookup function. The component accepts `label` (string), `showLabel` (boolean), `showHighlightedData` (boolean), and `getPConnect` (function) as its inputs.
|
|
31
|
+
|
|
32
|
+
**Main Component Logic** — steps in order:
|
|
33
|
+
|
|
34
|
+
1. Retrieve `FieldGroup` from the project's component registry; receive `label`, `showLabel`, `getPConnect`, and `showHighlightedData` from inputs.
|
|
35
|
+
2. Merge inherited configuration: `propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() }` (inherited values can override the direct inputs).
|
|
36
|
+
3. Force all children into display-only mode as a side effect: call `getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY')` and `getPConnect().setInheritedProp('readOnly', true)`.
|
|
37
|
+
4. Build the children array: map each entry of `getPConnect().getChildren()` to a renderable PConnect bridge element using the config object and a unique key.
|
|
38
|
+
5. If `showHighlightedData` is true, read `highlightedData` (default empty array) from `getPConnect().getRawMetadata().config`, and for each field: set `field.config.displayMode = 'STACKED_LARGE_VAL'`; if `field.config.value === '@P .pyStatusWork'`, set `field.type = 'TextInput'` and `field.config.displayAsStatus = true`; then create the component via `getPConnect().createComponent(field, '', 0, {})` and collect the results into `highlightedDataArr`.
|
|
39
|
+
6. Render a FieldGroup named `propsToUse.showLabel ? propsToUse.label : ''`, containing (when `showHighlightedData` is true and non-empty) a single-column grid container with spacing and bottom padding holding one full-width grid item per highlighted field, followed by a second single-column grid container with spacing holding one full-width grid item per regular child.
|
|
40
|
+
|
|
41
|
+
## Behavioral Contract
|
|
42
|
+
|
|
43
|
+
1. **Inherited inputs merge:** `propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() }` — inherited values can override label/showLabel.
|
|
44
|
+
2. **Force display mode:** Call `getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY')` and `getPConnect().setInheritedProp('readOnly', true)` — ensures all child fields render in read-only display mode.
|
|
45
|
+
3. **Render children:** Map `getPConnect().getChildren()` → renderable content via the project's PConnect bridge utility, passing each config object with a unique key.
|
|
46
|
+
4. **Highlighted data (when `showHighlightedData` is true):**
|
|
47
|
+
a. Read `getPConnect().getRawMetadata().config.highlightedData` (defaults to `[]`).
|
|
48
|
+
b. For each highlighted field, set `field.config.displayMode = 'STACKED_LARGE_VAL'`.
|
|
49
|
+
c. For fields with `field.config.value === '@P .pyStatusWork'`: set `field.type = 'TextInput'` and `field.config.displayAsStatus = true`.
|
|
50
|
+
d. Create each field via `getPConnect().createComponent(field, '', 0, {})`.
|
|
51
|
+
5. **Layout:**
|
|
52
|
+
- Wrap all content in a FieldGroup with name set to `propsToUse.showLabel ? propsToUse.label : ''`.
|
|
53
|
+
- Highlighted data: single-column grid container with ~8px gap and bottom padding (~1rem below).
|
|
54
|
+
- Regular children: single-column grid container with ~8px gap.
|
|
55
|
+
|
|
56
|
+
## Visual Specifications
|
|
57
|
+
|
|
58
|
+
### Overall Layout
|
|
59
|
+
|
|
60
|
+
| Property | Value |
|
|
61
|
+
| ------------------------ | -------------------------------------------- |
|
|
62
|
+
| Column structure | Single column (full width for each child) |
|
|
63
|
+
| Inner spacing | ~8px between fields |
|
|
64
|
+
| Highlighted data padding | ~1rem bottom padding before regular children |
|
|
65
|
+
|
|
66
|
+
**CSS-only implementation notes:**
|
|
67
|
+
|
|
68
|
+
- Outer wrapper: `FieldGroup` component (see `FieldGroupDSE.md` for styles).
|
|
69
|
+
- Children grid: single-column layout with ~8px gap between items.
|
|
70
|
+
- Highlighted data row: single-column layout with ~8px gap and ~1rem bottom padding.
|
|
71
|
+
- Fields inside highlighted data use `STACKED_LARGE_VAL` display (larger value typography).
|
|
72
|
+
|
|
73
|
+
## Edge Cases & Special Logic
|
|
74
|
+
|
|
75
|
+
- `setInheritedProp` is called with side effects before rendering — this modifies the PConnect context and affects all children.
|
|
76
|
+
- The `highlightedData` array defaults to `[]` if not present in metadata.
|
|
77
|
+
- The `pyStatusWork` special case: sets both `type` and `displayAsStatus` to ensure the status field renders as a badge/chip rather than plain text.
|
|
78
|
+
- `showHighlightedData` must be explicitly `true` — even if `highlightedData` has items, they won't render if the flag is false.
|
|
79
|
+
|
|
80
|
+
## Dependencies
|
|
81
|
+
|
|
82
|
+
- The project's PConnect bridge utility (for rendering child PConnect nodes)
|
|
83
|
+
- The project's component registry (to retrieve `FieldGroup`)
|
|
84
|
+
|
|
85
|
+
## Design System Mapping
|
|
86
|
+
|
|
87
|
+
**UI control type:** Read-only labeled section with vertically stacked fields.
|
|
88
|
+
|
|
89
|
+
When implementing in a specific design system, map the following:
|
|
90
|
+
|
|
91
|
+
- The outer wrapper is a labeled group container (e.g., a fieldset/legend, a card with a title header, or a boxed section with a heading). Use whatever grouped-section primitive your design system provides.
|
|
92
|
+
- Each child occupies the full width of the container (single column). Use your design system's grid or stack primitive with a single column and ~8px spacing between items.
|
|
93
|
+
- Highlighted data renders in the same single-column layout with additional bottom padding (~1rem) separating it from regular children.
|
|
94
|
+
- All children must have `displayMode='DISPLAY_ONLY'` and `readOnly=true` inherited.
|
|
95
|
+
- Highlighted data uses `STACKED_LARGE_VAL` — larger/bolder value display.
|
|
96
|
+
- `showLabel=false` hides the section heading entirely.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Skill: DetailsSubTabs
|
|
2
|
+
|
|
3
|
+
Read-only tabbed details template. Renders sub-tabs with deferred-loaded tab content, using shared tab utilities.
|
|
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 tabbed layout for a details region. Each tab contains display-only content loaded on demand. Uses the same tab utilities as `SubTabs` but is scoped to a details/display context. Optionally shows a section heading above the tabs.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `DetailsSubTabs` (in the project's component map)
|
|
16
|
+
- **Category:** Navigation / Display template
|
|
17
|
+
- **Extends:** the project's base component interface
|
|
18
|
+
|
|
19
|
+
## Inputs
|
|
20
|
+
|
|
21
|
+
| Name | Type | Required | Description |
|
|
22
|
+
| ------------- | ------------------ | -------- | ----------------------------------------------------------------- |
|
|
23
|
+
| `children` | renderable content | Yes | Tab content — `children[0]` is the deferred-loaded tabs container |
|
|
24
|
+
| `label` | `string` | Yes | Section heading shown above tabs when `showLabel` is true |
|
|
25
|
+
| `showLabel` | `boolean` | No | Whether to show the section heading. Default `true` |
|
|
26
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
27
|
+
|
|
28
|
+
## Implementation Structure
|
|
29
|
+
|
|
30
|
+
**Module Setup:** Obtain the shared tab utilities (`getVisibleTabs`, `getTransientTabs`, `tabClick`) from the project's SubTabs tab-utility module. These helpers are framework-independent and work with any rendering approach.
|
|
31
|
+
|
|
32
|
+
**Main Component Logic** — steps in order:
|
|
33
|
+
|
|
34
|
+
1. Receive inputs: `children` (default empty array), `label`, `showLabel` (default `true`), and `getPConnect`.
|
|
35
|
+
2. Merge inherited display settings: `propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() }`.
|
|
36
|
+
3. Extract the deferred tabs container from the first child element; initialize `availableTabs` to an empty array.
|
|
37
|
+
4. On mount (lifecycle effect), compute `availableTabs` via `getVisibleTabs(deferLoadedTabs, 'detailsSubTabs')`.
|
|
38
|
+
5. Declare local state: `currentTabId` (string, initialized to `'0'`) and `tabItems` (array, initialized empty).
|
|
39
|
+
6. In a lifecycle effect keyed on `currentTabId`, recompute `tabItems` via `getTransientTabs(availableTabs, currentTabId, tabItems)`.
|
|
40
|
+
7. Define a tab-click handler that sets `currentTabId` to the clicked index and calls `tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems)`.
|
|
41
|
+
8. Render: an optional heading (shown when `propsToUse.showLabel` is true, displaying `propsToUse.label`), followed by a tab context wrapping a tab bar (one tab per `tabItems` entry, labeled `tab.name`) and a set of tab panels (each showing `tab.content` or a "No content exists" fallback).
|
|
42
|
+
|
|
43
|
+
## Behavioral Contract
|
|
44
|
+
|
|
45
|
+
1. **Inherited settings merge:** `propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() }`.
|
|
46
|
+
2. **Extract deferred tabs:** `deferLoadedTabs` = first element from children array.
|
|
47
|
+
3. **Compute visible tabs:** On mount and when `availableTabs` changes, call `getVisibleTabs(deferLoadedTabs, 'detailsSubTabs')` to get the filtered visible tab list.
|
|
48
|
+
4. **Local state:** `currentTabId` (string, default `'0'`), `tabItems` (array of `{ id, name, content }` objects).
|
|
49
|
+
5. **Transient tabs:** On `currentTabId` change, call `getTransientTabs(availableTabs, currentTabId, tabItems)` and update `tabItems` state.
|
|
50
|
+
6. **Tab click handler:** `handleTabClick(id, index)` → sets `currentTabId` to `index` and calls `tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems)` from the tab utilities.
|
|
51
|
+
7. **Render:**
|
|
52
|
+
- If `propsToUse.showLabel`, render a heading with `propsToUse.label`.
|
|
53
|
+
- Render a tab context bound to `currentTabId`.
|
|
54
|
+
- Render a tab bar with one tab per `tabItems` entry (keyed by `tab.id`, labeled `tab.name`, valued `tab.id`).
|
|
55
|
+
- Render one tab panel per `tabItems` entry containing `tab.content` or the fallback text "No content exists".
|
|
56
|
+
|
|
57
|
+
## Visual Specifications
|
|
58
|
+
|
|
59
|
+
### Heading
|
|
60
|
+
|
|
61
|
+
| Property | Value |
|
|
62
|
+
| --------------- | ------------------------------- |
|
|
63
|
+
| Semantic level | Third-level heading (`<h3>`) |
|
|
64
|
+
| Shown only when | `propsToUse.showLabel === true` |
|
|
65
|
+
|
|
66
|
+
### Tab Bar
|
|
67
|
+
|
|
68
|
+
| Property | Value |
|
|
69
|
+
| ------------------ | ------------------------------------------------------------------ |
|
|
70
|
+
| Scrollable | Not specified (default non-scrollable in reference implementation) |
|
|
71
|
+
| Tab text transform | Inherits design system default |
|
|
72
|
+
|
|
73
|
+
**CSS-only implementation notes:**
|
|
74
|
+
|
|
75
|
+
- Heading: `font-size: 1.25rem; font-weight: 600; margin-bottom: 8px`.
|
|
76
|
+
- Tab bar: `display: flex; border-bottom: 2px solid var(--divider); gap: 0`.
|
|
77
|
+
- Each tab: `padding: 8px 16px; cursor: pointer; border-bottom: 2px solid transparent`.
|
|
78
|
+
- Active tab: `border-bottom-color: var(--app-primary-color)`.
|
|
79
|
+
- Tab panel: `padding: 16px 0`.
|
|
80
|
+
|
|
81
|
+
## Edge Cases & Special Logic
|
|
82
|
+
|
|
83
|
+
- `availableTabs` is computed inside a lifecycle effect (not immediately) — this means the initial render uses an empty array, and tabs populate after mount.
|
|
84
|
+
- The lifecycle effect watching `availableTabs` has a stale closure issue in the reference implementation — use an instance reference or memoized computation for production implementations if needed.
|
|
85
|
+
- `tabItems` starts as an empty array — the tab bar renders empty until the first `currentTabId` change triggers `getTransientTabs`.
|
|
86
|
+
- `propsToUse` label/showLabel may be overridden by inherited settings — always use `propsToUse` for the label, not the raw inputs.
|
|
87
|
+
|
|
88
|
+
## Dependencies
|
|
89
|
+
|
|
90
|
+
- `getTransientTabs`, `getVisibleTabs`, `tabClick` from the project's SubTabs tab-utility module (framework-independent helpers)
|
|
91
|
+
|
|
92
|
+
## Design System Mapping
|
|
93
|
+
|
|
94
|
+
**UI control type:** Tabbed section container for read-only details content.
|
|
95
|
+
|
|
96
|
+
When implementing in a specific design system, map the following:
|
|
97
|
+
|
|
98
|
+
- A tab context/wrapper that tracks the active tab
|
|
99
|
+
- A tab bar with clickable tab items
|
|
100
|
+
- Tab panels that show/hide based on active selection
|
|
101
|
+
- `getVisibleTabs` and `getTransientTabs` are tab-utility helpers — use them regardless of UI library
|
|
102
|
+
- Tab content is lazily loaded via the transient tab pattern
|
|
103
|
+
- Optional heading above the tab bar (controlled by `showLabel`)
|