@pega/sdk 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/index.js +764 -165
- package/package.json +1 -1
- package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
- package/templates/react-native-sdk-reference/.prettierignore +17 -0
- package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
- package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
- package/templates/react-native-sdk-reference/AGENTS.md +3 -0
- package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
- package/templates/react-native-sdk-reference/README.md +56 -0
- package/templates/react-native-sdk-reference/app.json +40 -5
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
- package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
- package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
- package/templates/react-native-sdk-reference/package.json +59 -14
- package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/sdk-config.json +31 -9
- package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
- package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
- package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
- package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
- package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
- package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
- package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
- package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
- package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
- package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
- package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
- package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
- package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
- package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
- package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
- package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
- package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
- package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
- package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
- package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
- package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
- package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
- package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
- package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
- package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
- package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
- package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
- package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
- package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
- package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
- package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
- package/templates/react-native-sdk-reference/tsconfig.json +9 -8
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
- package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
- package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
- package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
- package/templates/react-sdk-reference/package.json +1 -1
- package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
- package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
- package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
- package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
- package/templates/react-native-sdk-reference/App.tsx +0 -49
- package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
- package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Alert/notification banner that displays one or more messages with a severity variant and an optional dismiss button.
|
|
4
4
|
|
|
5
|
-
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture,
|
|
5
|
+
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -13,67 +13,61 @@ Renders a visually-styled alert box tied to a Pega `variant` value (urgent, warn
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `AlertBanner`
|
|
16
|
-
- **Registration key:** `AlertBanner` (in
|
|
17
|
-
- **Does NOT use `getPConnect`** — receives all data as direct
|
|
16
|
+
- **Registration key:** `AlertBanner` (in the project's component map)
|
|
17
|
+
- **Does NOT use `getPConnect`** — receives all data as direct inputs
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Component Inputs
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions for your target stack.
|
|
22
|
+
|
|
23
|
+
| Name | Type | Required | Description |
|
|
22
24
|
| ----------- | ----------------------------------------------------------- | -------- | ------------------------------------------------------------- |
|
|
23
25
|
| `id` | `string` | Yes | DOM id for the root wrapper element |
|
|
24
26
|
| `variant` | `string` | Yes | Alert variant: `'urgent'`, `'warning'`, `'success'`, `'info'` |
|
|
25
27
|
| `messages` | `Array<string \| { label?: string; description?: string }>` | Yes | One or more messages (string or structured object) |
|
|
26
28
|
| `onDismiss` | `function` (optional) | No | Dismiss/close handler; if provided, show a close button |
|
|
27
29
|
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{isMultiple
|
|
70
|
-
? <ul className="alert-banner-list">{messages.map((m, i) => <li key={i}>{renderMessage(m)}</li>)}</ul>
|
|
71
|
-
: renderMessage(messages[0])}
|
|
72
|
-
</AlertWidget>
|
|
73
|
-
</div>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
```
|
|
30
|
+
## Implementation Structure
|
|
31
|
+
|
|
32
|
+
### Module Setup
|
|
33
|
+
|
|
34
|
+
The component requires companion styles (for badge and list styling) that should be co-located with the component following the project's styling convention. It does NOT import any Pega SDK modules — all data arrives via direct inputs.
|
|
35
|
+
|
|
36
|
+
The component is named `AlertBanner` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
37
|
+
|
|
38
|
+
### Variant Map (module-level constant)
|
|
39
|
+
|
|
40
|
+
Define a module-level lookup object that maps Pega variant strings to a UI severity value and a human-readable display label:
|
|
41
|
+
|
|
42
|
+
| Pega Variant | Severity Value | Display Label |
|
|
43
|
+
| ------------ | -------------- | ------------- |
|
|
44
|
+
| `urgent` | `error` | `Error` |
|
|
45
|
+
| `warning` | `warning` | `Warning` |
|
|
46
|
+
| `success` | `success` | `Success` |
|
|
47
|
+
| `info` | `info` | `Info` |
|
|
48
|
+
|
|
49
|
+
The map is typed as `Record<string, { severity: string; label: string }>`.
|
|
50
|
+
|
|
51
|
+
### Helper: `renderMessage`
|
|
52
|
+
|
|
53
|
+
Define a private helper function `renderMessage` that accepts a single message (either a string or an object with optional `label` and `description` fields) and returns formatted markup. The function follows this decision tree:
|
|
54
|
+
|
|
55
|
+
1. **Object with truthy `label`** — render the label in a bold/strong element followed by a space and the `description` text.
|
|
56
|
+
2. **Object without `label`** (label is falsy/empty) — render only the `description` text.
|
|
57
|
+
3. **String containing a colon (`:`)** — find the index of the **first** colon only. Render everything from the start up to and including the colon in a bold/strong element, then render the remainder as plain text.
|
|
58
|
+
4. **String with no colon** — render the entire string as plain text with no formatting.
|
|
59
|
+
|
|
60
|
+
### Component Logic
|
|
61
|
+
|
|
62
|
+
The component receives `id`, `variant`, `messages`, and `onDismiss` as inputs, then:
|
|
63
|
+
|
|
64
|
+
1. **Resolve variant** — look up `variant` in the variant map. If the variant is not found (unknown/missing), fall back to the `info` entry.
|
|
65
|
+
2. **Determine plurality** — check whether `messages.length > 1` to decide between single-message and multi-message rendering.
|
|
66
|
+
3. **Render tree:**
|
|
67
|
+
- Outer wrapper: a plain `<div>` with the `id` input as its DOM id.
|
|
68
|
+
- Inside the wrapper: a design-system alert component displayed in **outlined** style, with the resolved `severity` passed as the severity/type attribute. If `onDismiss` is provided, wire it as the alert's close handler; otherwise omit the close button entirely.
|
|
69
|
+
- **Multiple messages path:** display an alert title row containing the display label text and a circular count badge (showing `messages.length`). Below the title, display messages as an unordered list (`<ul>` with class `alert-banner-list`), with each message processed via `renderMessage` inside a `<li>`.
|
|
70
|
+
- **Single message path:** display `renderMessage(messages[0])` directly as the alert's content (no title, no list).
|
|
77
71
|
|
|
78
72
|
## Behavioral Contract
|
|
79
73
|
|
|
@@ -97,7 +91,7 @@ export default function AlertBanner({ id, variant, messages, onDismiss }: AlertB
|
|
|
97
91
|
|
|
98
92
|
## Visual Specifications
|
|
99
93
|
|
|
100
|
-
Derived from
|
|
94
|
+
Derived from the component's companion styles and the reference implementation's alert usage:
|
|
101
95
|
|
|
102
96
|
### Alert Container
|
|
103
97
|
|
|
@@ -166,22 +160,14 @@ Derived from `AlertBanner.css` and MUI Alert usage:
|
|
|
166
160
|
|
|
167
161
|
**UI control type:** Alert / Notification banner with severity levels.
|
|
168
162
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
- `variant='urgent'` → `severity/type/status='error'` or `'danger'`
|
|
182
|
-
- `variant='warning'` → `severity/type/status='warning'`
|
|
183
|
-
- `variant='success'` → `severity/type/status='success'`
|
|
184
|
-
- `variant='info'` → `severity/type/status='info'`
|
|
185
|
-
- `onDismiss` → `onClose` / `closable` / close button prop
|
|
186
|
-
- Multiple messages → render as a list inside the alert description area
|
|
187
|
-
- Badge count → render as a tag/badge chip next to the title
|
|
163
|
+
When implementing in a specific design system, use the DS's alert/notification component and map the following:
|
|
164
|
+
|
|
165
|
+
- `variant='urgent'` → the DS's error/danger severity level
|
|
166
|
+
- `variant='warning'` → the DS's warning severity level
|
|
167
|
+
- `variant='success'` → the DS's success severity level
|
|
168
|
+
- `variant='info'` → the DS's info/informational severity level
|
|
169
|
+
- `onDismiss` → the DS alert's close/dismiss handler (e.g., `onClose`, `closable`, or a close button slot)
|
|
170
|
+
- The alert should render in an **outlined** style (visible border, no filled background) if the DS supports that variant; otherwise use the closest equivalent that shows a colored border indicating severity
|
|
171
|
+
- Multiple messages → render as a list inside the alert's description/content area
|
|
172
|
+
- Badge count → render as a small circular tag/badge element next to the title text
|
|
173
|
+
- If the DS has no built-in alert component, use a `<div role="alert">` with a severity-colored left border or outline, and render a custom close button if `onDismiss` is provided
|
package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Promotional/informational banner with a full-width background image hero section and a two-column content layout below it.
|
|
4
4
|
|
|
5
|
-
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture,
|
|
5
|
+
> **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -11,72 +11,61 @@ Promotional/informational banner with a full-width background image hero section
|
|
|
11
11
|
Renders a visually rich banner composed of two parts:
|
|
12
12
|
|
|
13
13
|
1. **Hero section:** Full-width area with a background image, centered title and message text overlaid.
|
|
14
|
-
2. **Content columns:** Two adjustable-width columns below the hero, rendered from the `a` and `b` slot
|
|
14
|
+
2. **Content columns:** Two adjustable-width columns below the hero, rendered from the `a` and `b` slot inputs. Column widths are controlled by the `variant` input.
|
|
15
15
|
|
|
16
16
|
## Pega Metadata
|
|
17
17
|
|
|
18
18
|
- **Pega Name:** `Banner`
|
|
19
|
-
- **Registration key:** `Banner` (in
|
|
20
|
-
- **Does NOT use `getPConnect`** — receives all data as direct
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `banner
|
|
31
|
-
| `banner.
|
|
32
|
-
| `banner.
|
|
33
|
-
| `banner.
|
|
34
|
-
| `banner.
|
|
35
|
-
| `
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
style={{ padding: '1rem', backgroundColor: 'var(--app-form-bg-color)', borderRadius: '16px', height: 'fit-content' }}>
|
|
70
|
-
{a}
|
|
71
|
-
</GridItem>
|
|
72
|
-
<GridItem xs={variantMap[variant][1]} style={{ padding: '0 1rem' }}>
|
|
73
|
-
{b}
|
|
74
|
-
</GridItem>
|
|
75
|
-
</GridContainer>
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
```
|
|
19
|
+
- **Registration key:** `Banner` (in the project's component map)
|
|
20
|
+
- **Does NOT use `getPConnect`** — receives all data as direct inputs
|
|
21
|
+
|
|
22
|
+
## Component Inputs
|
|
23
|
+
|
|
24
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions.
|
|
25
|
+
|
|
26
|
+
| Name | Type | Required | Description |
|
|
27
|
+
| ------------------------ | ------------------ | -------- | ------------------------------------------------------------------ |
|
|
28
|
+
| `a` | renderable content | Yes | Content for the first (left/narrower) column |
|
|
29
|
+
| `b` | renderable content | Yes | Content for the second (right/wider) column |
|
|
30
|
+
| `banner` | `object` | Yes | Banner metadata (see sub-fields below) |
|
|
31
|
+
| `banner.title` | `string` | Yes | Title text displayed in the hero section |
|
|
32
|
+
| `banner.message` | `string` | Yes | Descriptive message text in the hero section |
|
|
33
|
+
| `banner.backgroundImage` | `string` | Yes | URL of the background image for the hero section |
|
|
34
|
+
| `banner.variant` | `any` | No | Unused internally (layout variant comes from top-level `variant`) |
|
|
35
|
+
| `banner.backgroundColor` | `any` | No | Unused internally |
|
|
36
|
+
| `banner.tintImage` | `any` | No | Unused internally |
|
|
37
|
+
| `variant` | `string` | Yes | Column layout: `'two-column'`, `'narrow-wide'`, or `'wide-narrow'` |
|
|
38
|
+
|
|
39
|
+
## Implementation Structure
|
|
40
|
+
|
|
41
|
+
### Module Setup
|
|
42
|
+
|
|
43
|
+
The component requires companion styles (for hero section and layout styling) that should be co-located with the component following the project's styling convention. It does NOT import any Pega SDK modules — all data arrives via direct inputs.
|
|
44
|
+
|
|
45
|
+
The component is named `Banner` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
46
|
+
|
|
47
|
+
### Variant Map (module-level or function-level constant)
|
|
48
|
+
|
|
49
|
+
Define a lookup object that maps the `variant` string to a pair of column width values (out of 12):
|
|
50
|
+
|
|
51
|
+
| Variant | Column A (first) | Column B (second) |
|
|
52
|
+
| ------------- | ---------------- | ----------------- |
|
|
53
|
+
| `two-column` | 6 | 6 |
|
|
54
|
+
| `narrow-wide` | 4 | 8 |
|
|
55
|
+
| `wide-narrow` | 8 | 4 |
|
|
56
|
+
|
|
57
|
+
### Component Logic
|
|
58
|
+
|
|
59
|
+
The component receives `a`, `b`, `banner` (defaults to `{}`), and `variant` as inputs. From `banner`, extract `title`, `message`, and `backgroundImage`. The render tree is:
|
|
60
|
+
|
|
61
|
+
1. **Outer wrapper** — a `<div>` with `marginBottom: 2rem`.
|
|
62
|
+
2. **Hero section:**
|
|
63
|
+
- A `<div>` with class `background-image-style` and inline style `backgroundImage: url({backgroundImage})`.
|
|
64
|
+
- Inside: an overlay `<div>` with classes `background-style content`.
|
|
65
|
+
- Inside the overlay: `<h1>` with class `title` containing the title text, and `<p>` with class `message` containing the message text.
|
|
66
|
+
3. **Content columns** — below the hero, a 12-column grid container with `spacing={1}` containing two grid items:
|
|
67
|
+
- **Column A** (first child slot): grid item sized to the first value from the variant map. Styled with `padding: 1rem; background-color: var(--app-form-bg-color); border-radius: 16px; height: fit-content`. Renders `{a}`.
|
|
68
|
+
- **Column B** (second child slot): grid item sized to the second value from the variant map. Styled with `padding: 0 1rem` (no background). Renders `{b}`.
|
|
80
69
|
|
|
81
70
|
## Behavioral Contract
|
|
82
71
|
|
|
@@ -96,15 +85,15 @@ export default function Banner(props: BannerProps) {
|
|
|
96
85
|
|
|
97
86
|
## Layout Variants
|
|
98
87
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
wide
|
|
103
|
-
|
|
88
|
+
| Variant | Column A | Column B |
|
|
89
|
+
| ------------- | -------- | -------- |
|
|
90
|
+
| `two-column` | 50% (6) | 50% (6) |
|
|
91
|
+
| `narrow-wide` | 33% (4) | 67% (8) |
|
|
92
|
+
| `wide-narrow` | 67% (8) | 33% (4) |
|
|
104
93
|
|
|
105
94
|
## Visual Specifications
|
|
106
95
|
|
|
107
|
-
Derived from
|
|
96
|
+
Derived from the component's companion styles:
|
|
108
97
|
|
|
109
98
|
### Hero Section
|
|
110
99
|
|
|
@@ -167,7 +156,7 @@ Derived from `Banner.css`:
|
|
|
167
156
|
|
|
168
157
|
- If `backgroundImage` is an empty string or undefined, the hero section renders without a background image (transparent/color background).
|
|
169
158
|
- If `variant` is not one of the three known values, implement a safe default (e.g., `'two-column'`).
|
|
170
|
-
- The `banner.backgroundColor`, `banner.variant`, and `banner.tintImage`
|
|
159
|
+
- The `banner.backgroundColor`, `banner.variant`, and `banner.tintImage` inputs are received but not rendered in the reference implementation.
|
|
171
160
|
|
|
172
161
|
## Dependencies
|
|
173
162
|
|
|
@@ -178,19 +167,10 @@ Derived from `Banner.css`:
|
|
|
178
167
|
|
|
179
168
|
**UI control type:** Full-width banner hero with responsive two-column content area.
|
|
180
169
|
|
|
181
|
-
Listed design systems are examples only.
|
|
182
|
-
|
|
183
|
-
| Design System | Recommended Component |
|
|
184
|
-
| ------------------ | ------------------------------------------------------------------------- |
|
|
185
|
-
| Default (CSS only) | CSS Grid for columns, CSS background for hero |
|
|
186
|
-
| MUI | `<Grid container size={12}>` with `<Grid size={{ xs: ... }}>` for columns |
|
|
187
|
-
| Ant Design | `<Row gutter={8}>` with `<Col span={...}>` for columns |
|
|
188
|
-
| Chakra UI | `<SimpleGrid columns={2}>` or `<Grid templateColumns='...'>` |
|
|
189
|
-
| Shadcn/ui | CSS Grid with Tailwind column utilities |
|
|
190
|
-
|
|
191
170
|
When implementing in a specific design system, map the following:
|
|
192
171
|
|
|
193
|
-
-
|
|
194
|
-
- Background image hero → `backgroundImage`
|
|
195
|
-
- Column A (card-like) →
|
|
196
|
-
- Column B (plain) → plain container with horizontal padding only
|
|
172
|
+
- **Column layout** → use the DS's grid/column system to create two responsive columns. Map the variant column ratios (6/6, 4/8, 8/4 out of 12) to the DS's grid column sizing convention (span values, fractional units, or percentage widths).
|
|
173
|
+
- **Background image hero** → use inline `backgroundImage` style with `background-size: cover; background-position: center`. No DS component is needed for this — it's always a styled `<div>`.
|
|
174
|
+
- **Column A (card-like)** → use the DS's card component or a container with background color and border-radius (if available). Otherwise use a plain `<div>` with the specified styles.
|
|
175
|
+
- **Column B (plain)** → a plain container with horizontal padding only (no background).
|
|
176
|
+
- **Responsive** → on small viewports (mobile), collapse the two columns to a single stacked column.
|