@pega/sdk 0.0.5 → 0.0.7
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 +828 -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/mcp/claude-code.mcp.json +8 -0
- package/templates/react-sdk-reference/.ai-common/mcp/copilot.mcp.json +8 -0
- package/templates/react-sdk-reference/.ai-common/mcp/cursor.mcp.json +11 -0
- 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
|
Cancel confirmation dialog that offers the user a choice between going back or discarding/deleting the current case/action.
|
|
4
4
|
|
|
5
|
-
> **Note:** This component extends
|
|
5
|
+
> **Note:** This component extends the project's field input contract for registry compatibility but does **not** use standard field patterns (no `displayMode`, no event-commit utility, no value binding). It is an internal modal dialog.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -14,9 +14,9 @@ Renders a full-screen modal overlay with a confirmation dialog. Presents two act
|
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `CancelAlert`
|
|
16
16
|
- **Type / Subtype:** Internal modal/alert
|
|
17
|
-
- **Registration key:** `CancelAlert` (in
|
|
17
|
+
- **Registration key:** `CancelAlert` (in the project's component map)
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Inputs (component-specific)
|
|
20
20
|
|
|
21
21
|
| Prop | Type | Description |
|
|
22
22
|
| ------------------------ | ---------- | ---------------------------------------------------------------------------------------- |
|
|
@@ -28,135 +28,39 @@ Renders a full-screen modal overlay with a confirmation dialog. Presents two act
|
|
|
28
28
|
| `skipReleaseLockRequest` | `any` | Whether to skip lock release when removing container item |
|
|
29
29
|
| `dismiss` | `Function` | Callback to close/dismiss this dialog (called with `true` to indicate confirmed dismiss) |
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
All other inputs come from the project's field input contract (for registry compatibility only).
|
|
32
|
+
|
|
33
|
+
## Implementation Structure
|
|
32
34
|
|
|
33
35
|
Follow this exact structure when implementing. Replace modal/button/snackbar components with equivalents from your chosen design system.
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// ── Component ────────────────────────────────────────────────
|
|
52
|
-
export default function CancelAlert(props: CancelAlertProps) {
|
|
53
|
-
// 1. Destructure props (note: itemKey aliased to containerItemID)
|
|
54
|
-
const {
|
|
55
|
-
heading, content, getPConnect,
|
|
56
|
-
itemKey: containerItemID,
|
|
57
|
-
hideDelete, isDataObject, skipReleaseLockRequest, dismiss,
|
|
58
|
-
} = props;
|
|
59
|
-
|
|
60
|
-
// 2. PConnect APIs
|
|
61
|
-
const actionsAPI = getPConnect().getActionsApi();
|
|
62
|
-
const containerManagerAPI = getPConnect().getContainerManager();
|
|
63
|
-
const isLocalAction = getPConnect().getValue(
|
|
64
|
-
PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION
|
|
65
|
-
);
|
|
66
|
-
// @ts-ignore - Property 'options' is private
|
|
67
|
-
const isBulkAction = getPConnect()?.options?.isBulkAction;
|
|
68
|
-
|
|
69
|
-
// 3. Localization setup
|
|
70
|
-
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
71
|
-
const localeCategory = 'ModalContainer';
|
|
72
|
-
|
|
73
|
-
// 4. Coexistence setup
|
|
74
|
-
const broadCastUtils: any = PCore.getCoexistenceManager().getBroadcastUtils();
|
|
75
|
-
const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();
|
|
76
|
-
|
|
77
|
-
// 5. Button ID constants
|
|
78
|
-
const btnIds = {
|
|
79
|
-
SAVE_AND_CLOSE: 'saveAndClose',
|
|
80
|
-
CONTINUE_WORKING: 'continueWorking',
|
|
81
|
-
DELETE: 'delete',
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// 6. State
|
|
85
|
-
const [buttonsState, setButtonsState] = useState({
|
|
86
|
-
[btnIds.SAVE_AND_CLOSE]: false,
|
|
87
|
-
[btnIds.DELETE]: false,
|
|
88
|
-
});
|
|
89
|
-
const [showSnackbar, setShowSnackbar] = useState(false);
|
|
90
|
-
const [snackbarMessage, setSnackbarMessage] = useState('');
|
|
91
|
-
|
|
92
|
-
// 7. Button enable/disable helpers
|
|
93
|
-
function disableButton(id) {
|
|
94
|
-
setButtonsState(prev => ({ ...prev, [id]: true }));
|
|
95
|
-
}
|
|
96
|
-
function enableButton(id) {
|
|
97
|
-
setButtonsState(prev => ({ ...prev, [id]: false }));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// 8. cancelHandler — see Behavioral Contract "Discard" section
|
|
101
|
-
function cancelHandler() { /* decision tree */ }
|
|
102
|
-
|
|
103
|
-
// 9. handleSnackbarClose — see Behavioral Contract
|
|
104
|
-
function handleSnackbarClose(event, reason?) {
|
|
105
|
-
if (reason === 'clickaway') return;
|
|
106
|
-
setShowSnackbar(false);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// 10. Build leftButton ("Go back") and rightButton ("Discard") JSX
|
|
110
|
-
// leftButton: onClick → dismiss(), plus reverse coexistence cleanup
|
|
111
|
-
// rightButton: onClick → cancelHandler(), disabled={buttonsState[btnIds.DELETE]}
|
|
112
|
-
// All button text wrapped in localizedVal(text, localeCategory)
|
|
113
|
-
|
|
114
|
-
// 11. Return: overlay div + dialog box + snackbar
|
|
115
|
-
// See Visual Specifications for layout and CSS classes
|
|
116
|
-
return (
|
|
117
|
-
<>
|
|
118
|
-
<div className="cancel-alert-background">
|
|
119
|
-
<div className="cancel-alert-top">
|
|
120
|
-
<h3>{localizedVal(heading, localeCategory)}</h3>
|
|
121
|
-
<div><p>{localizedVal(content, localeCategory)}</p></div>
|
|
122
|
-
<div className="action-controls">
|
|
123
|
-
{/* Two buttons: Go back (secondary) | Discard (primary) */}
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
{/* Snackbar: open={showSnackbar}, autoHideDuration=3000, message={snackbarMessage} */}
|
|
128
|
-
</>
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
```
|
|
37
|
+
**Module Setup:** The component depends on a companion stylesheet for dialog/overlay styling. Define the input contract as an extension of the project's field input contract (for registry compatibility), adding `heading`, `content`, `itemKey`, `hideDelete`, `isDataObject`, `skipReleaseLockRequest`, and `dismiss` fields.
|
|
38
|
+
|
|
39
|
+
**Main Component Logic** — steps in order:
|
|
40
|
+
|
|
41
|
+
1. **Receive inputs** (note: `itemKey` is aliased to `containerItemID`) — `heading`, `content`, `getPConnect`, `itemKey` as `containerItemID`, `hideDelete`, `isDataObject`, `skipReleaseLockRequest`, `dismiss`.
|
|
42
|
+
2. **PConnect APIs** — `actionsAPI` via `getPConnect().getActionsApi()`; `containerManagerAPI` via `getPConnect().getContainerManager()`; `isLocalAction` via `getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION)`; `isBulkAction` via `getPConnect()?.options?.isBulkAction` (a private property, may require suppressing type checks).
|
|
43
|
+
3. **Localization setup** — `localizedVal` bound to `PCore.getLocaleUtils().getLocaleValue`; `localeCategory = 'ModalContainer'`.
|
|
44
|
+
4. **Coexistence setup** — `broadCastUtils` via `PCore.getCoexistenceManager().getBroadcastUtils()`; `isReverseCoexistence` via `broadCastUtils.isReverseCoexistenceCaseLoaded()`.
|
|
45
|
+
5. **Button ID constants** — an object `btnIds` with `SAVE_AND_CLOSE: 'saveAndClose'`, `CONTINUE_WORKING: 'continueWorking'`, `DELETE: 'delete'`.
|
|
46
|
+
6. **Local state** — `buttonsState` initialized to `{ [btnIds.SAVE_AND_CLOSE]: false, [btnIds.DELETE]: false }`; `showSnackbar` initialized to `false`; `snackbarMessage` initialized to `''`.
|
|
47
|
+
7. **Button enable/disable helpers** — `disableButton(id)` sets `buttonsState[id]` to `true` (via functional state update); `enableButton(id)` sets it to `false`.
|
|
48
|
+
8. **`cancelHandler()`** — the "Discard" decision tree; see the Behavioral Contract "Discard" section.
|
|
49
|
+
9. **`handleSnackbarClose(event, reason?)`** — returns without closing when `reason === 'clickaway'`, otherwise sets `showSnackbar` to `false`.
|
|
50
|
+
10. **Build the "Go back" (`leftButton`) and "Discard" (`rightButton`) elements** — `leftButton`'s `onClick` calls `dismiss()` plus reverse-coexistence cleanup; `rightButton`'s `onClick` calls `cancelHandler()` and is disabled when `buttonsState[btnIds.DELETE]` is true. All button text is wrapped in `localizedVal(text, localeCategory)`.
|
|
51
|
+
11. **Return** — a full-screen overlay `<div>` containing a dialog box `<div>` with a heading (`localizedVal(heading, localeCategory)`), body text (`localizedVal(content, localeCategory)`), and an action-controls row holding the two buttons ("Go back" as secondary, "Discard" as primary); alongside the dialog, a snackbar with `open={showSnackbar}`, `autoHideDuration={3000}`, and `message={snackbarMessage}`. See the Visual Specifications section for layout and CSS classes.
|
|
132
52
|
|
|
133
53
|
## Behavioral Contract
|
|
134
54
|
|
|
135
55
|
### Setup
|
|
136
56
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
// Localization
|
|
146
|
-
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
147
|
-
const localeCategory = 'ModalContainer';
|
|
148
|
-
|
|
149
|
-
// Coexistence (store broadCastUtils — reused in Go back handler)
|
|
150
|
-
const broadCastUtils: any = PCore.getCoexistenceManager().getBroadcastUtils();
|
|
151
|
-
const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();
|
|
152
|
-
|
|
153
|
-
// Button IDs (used as keys in buttonsState)
|
|
154
|
-
const btnIds = {
|
|
155
|
-
SAVE_AND_CLOSE: 'saveAndClose',
|
|
156
|
-
CONTINUE_WORKING: 'continueWorking',
|
|
157
|
-
DELETE: 'delete',
|
|
158
|
-
};
|
|
159
|
-
```
|
|
57
|
+
`actionsAPI` is `getPConnect().getActionsApi()`; `containerManagerAPI` is `getPConnect().getContainerManager()`; `isLocalAction` is `getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION)`; `isBulkAction` is read from the private `getPConnect()?.options?.isBulkAction` (may require suppressing type checks since the property is private).
|
|
58
|
+
|
|
59
|
+
Localization: `localizedVal` is bound to `PCore.getLocaleUtils().getLocaleValue`; `localeCategory` is `'ModalContainer'`.
|
|
60
|
+
|
|
61
|
+
Coexistence: `broadCastUtils` is `PCore.getCoexistenceManager().getBroadcastUtils()` (stored for reuse in the Go back handler); `isReverseCoexistence` is `broadCastUtils.isReverseCoexistenceCaseLoaded()`.
|
|
62
|
+
|
|
63
|
+
Button IDs (used as keys in `buttonsState`): `btnIds = { SAVE_AND_CLOSE: 'saveAndClose', CONTINUE_WORKING: 'continueWorking', DELETE: 'delete' }`.
|
|
160
64
|
|
|
161
65
|
### State
|
|
162
66
|
|
|
@@ -166,34 +70,17 @@ const btnIds = {
|
|
|
166
70
|
|
|
167
71
|
### Helper Functions
|
|
168
72
|
|
|
169
|
-
|
|
170
|
-
function disableButton(id) {
|
|
171
|
-
setButtonsState((prev) => ({ ...prev, [id]: true }));
|
|
172
|
-
}
|
|
173
|
-
function enableButton(id) {
|
|
174
|
-
setButtonsState((prev) => ({ ...prev, [id]: false }));
|
|
175
|
-
}
|
|
176
|
-
```
|
|
73
|
+
`disableButton(id)` sets `buttonsState[id]` to `true` via a functional state update (spreading the previous state). `enableButton(id)` sets it to `false` the same way.
|
|
177
74
|
|
|
178
75
|
### "Go back" button (`leftButton`)
|
|
179
76
|
|
|
180
|
-
Always calls `dismiss()` (no argument = don't confirm). If `isReverseCoexistence
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
broadCastUtils.setCallBackFunction(null)
|
|
184
|
-
broadCastUtils.setIsDirtyDialogActive(false)
|
|
185
|
-
```
|
|
77
|
+
Always calls `dismiss()` (no argument = don't confirm). If `isReverseCoexistence`, additionally call `broadCastUtils.setCallBackFunction(null)` and `broadCastUtils.setIsDirtyDialogActive(false)`.
|
|
186
78
|
|
|
187
79
|
### "Discard" button (`rightButton`) — `cancelHandler()`
|
|
188
80
|
|
|
189
81
|
Decision tree (evaluated in order):
|
|
190
82
|
|
|
191
|
-
1. **Reverse coexistence:**
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
dismiss(true)
|
|
195
|
-
PCore.getPubSubUtils().publish(REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD)
|
|
196
|
-
```
|
|
83
|
+
1. **Reverse coexistence:** call `dismiss(true)`, then publish `PCore.getPubSubUtils().publish(REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD)`.
|
|
197
84
|
|
|
198
85
|
2. **Standard case in create stage** (`!isDataObject && !isLocalAction && !isBulkAction`):
|
|
199
86
|
- Disable delete button
|
|
@@ -202,25 +89,11 @@ Decision tree (evaluated in order):
|
|
|
202
89
|
- `.catch()`: show snackbar with `'Delete failed.'`
|
|
203
90
|
- `.finally()`: re-enable delete button, call `dismiss(true)`
|
|
204
91
|
|
|
205
|
-
3. **Local action** (`isLocalAction`):
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
dismiss(true)
|
|
209
|
-
actionsAPI.cancelAssignment(containerItemID, false)
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
4. **Bulk action** (`isBulkAction`):
|
|
92
|
+
3. **Local action** (`isLocalAction`): call `dismiss(true)`, then `actionsAPI.cancelAssignment(containerItemID, false)`.
|
|
213
93
|
|
|
214
|
-
|
|
215
|
-
dismiss(true)
|
|
216
|
-
actionsAPI.cancelBulkAction(containerItemID)
|
|
217
|
-
```
|
|
94
|
+
4. **Bulk action** (`isBulkAction`): call `dismiss(true)`, then `actionsAPI.cancelBulkAction(containerItemID)`.
|
|
218
95
|
|
|
219
|
-
5. **Data object or other** (default):
|
|
220
|
-
```
|
|
221
|
-
dismiss(true)
|
|
222
|
-
containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest })
|
|
223
|
-
```
|
|
96
|
+
5. **Data object or other** (default): call `dismiss(true)`, then `containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest })`.
|
|
224
97
|
|
|
225
98
|
### Snackbar dismissal
|
|
226
99
|
|
|
@@ -242,50 +115,15 @@ Derived from `CancelAlert.css`:
|
|
|
242
115
|
|
|
243
116
|
### Full-screen overlay (`.cancel-alert-background`)
|
|
244
117
|
|
|
245
|
-
|
|
246
|
-
.cancel-alert-background {
|
|
247
|
-
display: flex;
|
|
248
|
-
flex-direction: column;
|
|
249
|
-
justify-content: center;
|
|
250
|
-
align-items: center;
|
|
251
|
-
height: 100%;
|
|
252
|
-
width: 100%;
|
|
253
|
-
background-color: var(--modal-background-color);
|
|
254
|
-
position: fixed;
|
|
255
|
-
z-index: 9999;
|
|
256
|
-
top: 0;
|
|
257
|
-
left: 0;
|
|
258
|
-
}
|
|
259
|
-
```
|
|
118
|
+
**Visual-only styling notes:** A fixed, full-viewport overlay (`position: fixed`, top/left `0`, `100%` height and width) with a high z-index (`9999`), using a semi-transparent modal background color, laid out as a centered flex column (both horizontally and vertically).
|
|
260
119
|
|
|
261
120
|
### Dialog box (`.cancel-alert-top`)
|
|
262
121
|
|
|
263
|
-
|
|
264
|
-
.cancel-alert-top {
|
|
265
|
-
display: table;
|
|
266
|
-
margin: auto;
|
|
267
|
-
min-width: 550px;
|
|
268
|
-
background-color: var(--modal-top-color);
|
|
269
|
-
border: 1px solid var(--modal-border-color);
|
|
270
|
-
border-radius: 10px;
|
|
271
|
-
padding: 20px;
|
|
272
|
-
box-shadow: 0 0 10px 3px var(--modal-box-shadow-color);
|
|
273
|
-
}
|
|
274
|
-
```
|
|
122
|
+
**Visual-only styling notes:** A centered table-display box with a minimum width of 550px, a themed dialog background color, a 1px themed border, 10px border radius, 20px padding, and a themed drop shadow.
|
|
275
123
|
|
|
276
124
|
### Content layout
|
|
277
125
|
|
|
278
|
-
|
|
279
|
-
.cancel-alert-top
|
|
280
|
-
<h3>{heading}</h3>
|
|
281
|
-
<div>
|
|
282
|
-
<p>{content}</p>
|
|
283
|
-
</div>
|
|
284
|
-
<div class="action-controls">
|
|
285
|
-
Grid container spacing=4, justifyContent='space-between'
|
|
286
|
-
Grid → leftButton ("Go back", secondary/outlined)
|
|
287
|
-
Grid → rightButton ("Discard", primary/contained, can be disabled)
|
|
288
|
-
```
|
|
126
|
+
Inside the `.cancel-alert-top` dialog box: a heading (`<h3>`) showing `heading`, a body paragraph showing `content`, and an `action-controls` row laid out as a grid container (spacing 4, `justifyContent='space-between'`) containing two grid items — the left one holding `leftButton` ("Go back", secondary/outlined) and the right one holding `rightButton` ("Discard", primary/contained, can be disabled).
|
|
289
127
|
|
|
290
128
|
### Button styles
|
|
291
129
|
|
|
@@ -322,19 +160,19 @@ Derived from `CancelAlert.css`:
|
|
|
322
160
|
- `PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION`, `PUB_SUB_EVENTS.EVENT_CANCEL`, etc.
|
|
323
161
|
- `PCore.getPubSubUtils().publish()` — for pub/sub events.
|
|
324
162
|
- `PCore.getCoexistenceManager().getBroadcastUtils()` — for reverse coexistence handling.
|
|
325
|
-
-
|
|
326
|
-
-
|
|
327
|
-
-
|
|
163
|
+
- The DS's button, grid/layout, icon button, and snackbar/toast components.
|
|
164
|
+
- A close icon.
|
|
165
|
+
- A companion stylesheet for dialog/overlay styling.
|
|
328
166
|
|
|
329
167
|
## Design System Mapping
|
|
330
168
|
|
|
331
169
|
**UI control type:** Full-screen modal confirmation dialog.
|
|
332
170
|
|
|
333
|
-
|
|
171
|
+
When implementing in a specific design system, map the following:
|
|
334
172
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
173
|
+
- **Overlay** → use the DS's modal overlay or a fixed full-viewport container with semi-transparent background
|
|
174
|
+
- **Dialog box** → a centered card/container with heading, body text, and action buttons
|
|
175
|
+
- **"Go back" button** → secondary/outlined style button
|
|
176
|
+
- **"Discard" button** → primary/contained style button (disableable during async operations)
|
|
177
|
+
- **Snackbar/toast** → the DS's notification/toast component with auto-hide (3s) and manual close
|
|
178
|
+
- **Grid layout** → space the two buttons apart using the DS's layout utility
|