@pega/sdk 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/index.js +764 -165
- package/package.json +1 -1
- package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
- package/templates/react-native-sdk-reference/.prettierignore +17 -0
- package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
- package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
- package/templates/react-native-sdk-reference/AGENTS.md +3 -0
- package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
- package/templates/react-native-sdk-reference/README.md +56 -0
- package/templates/react-native-sdk-reference/app.json +40 -5
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
- package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
- package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
- package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
- package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
- package/templates/react-native-sdk-reference/package.json +59 -14
- package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
- package/templates/react-native-sdk-reference/sdk-config.json +31 -9
- package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
- package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
- package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
- package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
- package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
- package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
- package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
- package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
- package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
- package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
- package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
- package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
- package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
- package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
- package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
- package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
- package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
- package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
- package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
- package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
- package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
- package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
- package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
- package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
- package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
- package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
- package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
- package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
- package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
- package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
- package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
- package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
- package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
- package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
- package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
- package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
- package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
- package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
- package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
- package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
- package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
- package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
- package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
- package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
- package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
- package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
- package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
- package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
- package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
- package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
- package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
- package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
- package/templates/react-native-sdk-reference/tsconfig.json +9 -8
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
- package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
- package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
- package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
- package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
- package/templates/react-sdk-reference/package.json +1 -1
- package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
- package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
- package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
- package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
- package/templates/react-native-sdk-reference/App.tsx +0 -49
- package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
- package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Read-only display of a Pega case operator (creator or updater). Shows the operator's name and relative timestamp. On click, fetches full operator details from Pega and displays them in a popover.
|
|
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,14 +13,14 @@ Renders a clickable read-only field displaying a case operator's name and the re
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `Operator`
|
|
16
|
-
- **Registration key:** `Operator` (in
|
|
17
|
-
- **Extends
|
|
16
|
+
- **Registration key:** `Operator` (in the project's component map)
|
|
17
|
+
- **Extends the base component interface** — but does NOT call `getPConnect()`. All rendering data is passed directly as inputs.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Component Inputs
|
|
20
20
|
|
|
21
|
-
The component
|
|
21
|
+
The component extends the project's base component interface but all rendering data is passed as explicit inputs. Define the input contract using the project's framework conventions.
|
|
22
22
|
|
|
23
|
-
|
|
|
23
|
+
| Name | Type | Required | Description |
|
|
24
24
|
| ---------------- | -------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
25
|
| `label` | `string` | Yes | The field label used to identify which operator to display. Must be `'create operator'` or `'update operator'` (case-insensitive). |
|
|
26
26
|
| `displayLabel` | `any` | No | Alternative label (used if `label` doesn't match). Also compared case-insensitively. |
|
|
@@ -31,72 +31,59 @@ The component interface extends `PConnProps` but all rendering data is passed as
|
|
|
31
31
|
| `updateLabel` | `string` | Yes | Display label for the update operator field |
|
|
32
32
|
| `updateOperator` | `{ userName: string; userId: string }` | Yes | Updater's name and ID |
|
|
33
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<Popover anchorEl={popoverAnchorEl} onClose={() => setPopoverAnchorEl(null)}>
|
|
88
|
-
<h6>{caseOpName}</h6>
|
|
89
|
-
{popoverFields.map(f => (
|
|
90
|
-
<Row key={f.label}>
|
|
91
|
-
<Caption>{f.label}</Caption>
|
|
92
|
-
<Value>{f.href ? <a href={f.href}>{f.value}</a> : f.value}</Value>
|
|
93
|
-
</Row>
|
|
94
|
-
))}
|
|
95
|
-
</Popover>
|
|
96
|
-
</div>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
```
|
|
34
|
+
## Implementation Structure
|
|
35
|
+
|
|
36
|
+
### Module Setup
|
|
37
|
+
|
|
38
|
+
The component imports:
|
|
39
|
+
|
|
40
|
+
- A local state mechanism for popover visibility and content
|
|
41
|
+
- The project's `Utils` helper for relative date/time formatting
|
|
42
|
+
- The project's base component interface (the component extends it, though `getPConnect()` is not called)
|
|
43
|
+
|
|
44
|
+
The component is named `Operator` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
45
|
+
|
|
46
|
+
### State
|
|
47
|
+
|
|
48
|
+
Maintain two state variables:
|
|
49
|
+
|
|
50
|
+
- `popoverAnchorEl` (initially `null`) — the DOM element the popover is anchored to; setting it opens the popover.
|
|
51
|
+
- `popoverFields` (initially `[]`) — array of field objects to display inside the popover.
|
|
52
|
+
|
|
53
|
+
### Operator Selection Logic
|
|
54
|
+
|
|
55
|
+
At the top of the component logic, determine which operator to display:
|
|
56
|
+
|
|
57
|
+
1. Coalesce `label` and `displayLabel` into a single string, then lowercase it.
|
|
58
|
+
2. If the lowercased value equals `'create operator'`: use `createLabel`, `createOperator.userName`, `createOperator.userId`, and `createDateTime`.
|
|
59
|
+
3. If the lowercased value equals `'update operator'`: use `updateLabel`, `updateOperator.userName`, `updateOperator.userId`, and `updateDateTime`.
|
|
60
|
+
4. Otherwise: set label and name to `'---'`, id and time to empty strings.
|
|
61
|
+
|
|
62
|
+
Store these as local variables: `caseOpLabel`, `caseOpName`, `caseOpId`, `caseTime`.
|
|
63
|
+
|
|
64
|
+
### Click Handler (`showOperatorDetails`)
|
|
65
|
+
|
|
66
|
+
Define an event handler that:
|
|
67
|
+
|
|
68
|
+
1. Early-returns if `caseOpId` is empty (no operator to fetch).
|
|
69
|
+
2. Calls `PCore.getUserApi().getOperatorDetails(caseOpId)` — an async API that returns operator profile data.
|
|
70
|
+
3. Uses `PCore.getLocaleUtils().getLocaleValue(key, 'Operator')` to localize field label strings.
|
|
71
|
+
4. On resolution, builds a `popoverFields` array with these entries (each with `label`, `value`, and optional `href`):
|
|
72
|
+
- Position (`pyPosition`) — no href
|
|
73
|
+
- Organization (`pyOrganization`) — no href
|
|
74
|
+
- Reports to (`pyReportToUserName`) — no href
|
|
75
|
+
- Telephone (`pyTelephone`) — `href: 'tel:{value}'`
|
|
76
|
+
- Email address (`pyEmailAddress`) — `href: 'mailto:{value}'`
|
|
77
|
+
- All values fall back to `'---'` if the property is missing/falsy.
|
|
78
|
+
5. Sets `popoverAnchorEl` to `event.currentTarget` (opens the popover).
|
|
79
|
+
|
|
80
|
+
### Render Tree
|
|
81
|
+
|
|
82
|
+
1. **Read-only text display** — no underline/border, `readOnly: true`, `cursor: pointer`. Shows `caseOpName` as value and `caseOpLabel` as the field label. Wires click handler to `showOperatorDetails`.
|
|
83
|
+
2. **Relative time** — below the text display, render the output of `Utils.generateDateTime(caseTime, 'DateTime-Since')` as helper/caption text.
|
|
84
|
+
3. **Popover** — anchored to the clicked element, closed by clearing the anchor reference:
|
|
85
|
+
- Header: operator name (`caseOpName`) in heading-6 text (≈1.25rem, weight 500).
|
|
86
|
+
- Body: iterate `popoverFields`, rendering each as a row with a caption-style label (6 columns) and a subtitle-style value (6 columns). For fields with `href`, wrap the value in an `<a>` tag with the href.
|
|
100
87
|
|
|
101
88
|
## Behavioral Contract
|
|
102
89
|
|
|
@@ -118,18 +105,18 @@ Determine which operator to display based on `label.toLowerCase()` or `displayLa
|
|
|
118
105
|
|
|
119
106
|
### 2. Main Display
|
|
120
107
|
|
|
121
|
-
Render a read-only
|
|
108
|
+
Render a read-only text display element (no underline/border, pointer cursor) with:
|
|
122
109
|
|
|
123
110
|
- `defaultValue={caseOpName}`
|
|
124
111
|
- `label={caseOpLabel}`
|
|
125
|
-
- `
|
|
126
|
-
- `readOnly: true`,
|
|
112
|
+
- Click handler wired to `showOperatorDetails`
|
|
113
|
+
- `readOnly: true`, no underline/border, `cursor: 'pointer'`
|
|
127
114
|
|
|
128
|
-
Below the
|
|
115
|
+
Below the text display, render the relative time: `Utils.generateDateTime(caseTime, 'DateTime-Since')`.
|
|
129
116
|
|
|
130
117
|
### 3. Popover on Click (`showOperatorDetails`)
|
|
131
118
|
|
|
132
|
-
When the
|
|
119
|
+
When the text display is clicked:
|
|
133
120
|
|
|
134
121
|
1. Call `PCore.getUserApi().getOperatorDetails(caseOpId)` — returns a Promise.
|
|
135
122
|
2. Use `PCore.getLocaleUtils().getLocaleValue(key, 'Operator')` to localize field labels.
|
|
@@ -150,30 +137,30 @@ The popover renders when `popoverAnchorEl` is set:
|
|
|
150
137
|
- Anchor origin: `{ vertical: 'bottom', horizontal: 'center' }`
|
|
151
138
|
- Transform origin: `{ vertical: 'top', horizontal: 'center' }`
|
|
152
139
|
- Max width: `45ch`
|
|
153
|
-
- Content: A
|
|
154
|
-
-
|
|
155
|
-
- One row per field: 6-col
|
|
140
|
+
- Content: A grid layout with:
|
|
141
|
+
- Heading-6 text (≈1.25rem, weight 500) showing `caseOpName` at full width.
|
|
142
|
+
- One row per field: 6-col caption text (label) + 6-col subtitle text (value).
|
|
156
143
|
|
|
157
|
-
Closing the popover
|
|
144
|
+
Closing the popover clears the anchor reference.
|
|
158
145
|
|
|
159
146
|
## Visual Specifications
|
|
160
147
|
|
|
161
|
-
Derived from
|
|
148
|
+
Derived from the component's companion styles:
|
|
162
149
|
|
|
163
150
|
### Root Container
|
|
164
151
|
|
|
165
|
-
| Property | Value
|
|
166
|
-
| -------- |
|
|
167
|
-
| Padding |
|
|
168
|
-
| Margin |
|
|
152
|
+
| Property | Value |
|
|
153
|
+
| -------- | ---------------------- |
|
|
154
|
+
| Padding | 1 spacing unit (≈ 8px) |
|
|
155
|
+
| Margin | 1 spacing unit |
|
|
169
156
|
|
|
170
157
|
### Popover Container
|
|
171
158
|
|
|
172
|
-
| Property | Value
|
|
173
|
-
| --------- |
|
|
174
|
-
| Padding |
|
|
175
|
-
| Margin |
|
|
176
|
-
| Max width | 45ch
|
|
159
|
+
| Property | Value |
|
|
160
|
+
| --------- | -------------- |
|
|
161
|
+
| Padding | 1 spacing unit |
|
|
162
|
+
| Margin | 1 spacing unit |
|
|
163
|
+
| Max width | 45ch |
|
|
177
164
|
|
|
178
165
|
**CSS-only implementation notes:**
|
|
179
166
|
|
|
@@ -195,7 +182,7 @@ Derived from `Operator.tsx` makeStyles:
|
|
|
195
182
|
|
|
196
183
|
## Dependencies
|
|
197
184
|
|
|
198
|
-
- `Utils`
|
|
185
|
+
- The project's `Utils` helper — `Utils.generateDateTime` for relative time display
|
|
199
186
|
- `PCore.getUserApi().getOperatorDetails(userId)` — global Pega runtime API for operator details
|
|
200
187
|
- `PCore.getLocaleUtils().getLocaleValue(key, 'Operator')` — for localized field labels in the popover
|
|
201
188
|
|
|
@@ -203,20 +190,10 @@ Derived from `Operator.tsx` makeStyles:
|
|
|
203
190
|
|
|
204
191
|
**UI control type:** Clickable read-only field with async popover detail panel.
|
|
205
192
|
|
|
206
|
-
Listed design systems are examples only.
|
|
207
|
-
|
|
208
|
-
| Design System | Recommended Component |
|
|
209
|
-
| ------------------ | --------------------------------------------------------------- |
|
|
210
|
-
| Default (CSS only) | `<div>` with click handler, custom CSS popover/tooltip panel |
|
|
211
|
-
| MUI | Read-only `<TextField>` + `<Popover>` with `<Grid>` detail rows |
|
|
212
|
-
| Ant Design | `<Input readOnly>` + `<Popover>` with `<Descriptions>` |
|
|
213
|
-
| Chakra UI | `<Input isReadOnly>` + `<Popover>` with custom content |
|
|
214
|
-
| Shadcn/ui | `<Input readOnly>` + `<Popover>` + `<PopoverContent>` |
|
|
215
|
-
|
|
216
193
|
When implementing in a specific design system, map the following:
|
|
217
194
|
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
- Popover
|
|
221
|
-
- `Utils.generateDateTime(caseTime, 'DateTime-Since')`
|
|
222
|
-
- Telephone/email
|
|
195
|
+
- **Read-only clickable field** → use the DS's read-only input/text display with pointer cursor and click handler
|
|
196
|
+
- **Popover/tooltip** → use the DS's popover component anchored to the clicked element, with close-on-outside-click behavior
|
|
197
|
+
- **Popover content** → a grid layout with heading (operator name) and label/value rows
|
|
198
|
+
- **Relative time** → render `Utils.generateDateTime(caseTime, 'DateTime-Since')` as secondary/muted caption text below the operator name
|
|
199
|
+
- **Telephone/email** → clickable `<a href='tel:...'>` and `<a href='mailto:...'>` links in the popover
|
package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Placeholder activity feed / comments stream card. Currently a stub implementation that renders a card titled "Pulse".
|
|
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,41 +13,41 @@ Renders a card container intended to display an activity feed or comments stream
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `Pulse`
|
|
16
|
-
- **Registration key:** `Pulse` (in
|
|
17
|
-
- **Does NOT use `getPConnect`** — receives children via
|
|
16
|
+
- **Registration key:** `Pulse` (in the project's component map)
|
|
17
|
+
- **Does NOT use `getPConnect`** — receives children via the framework's content projection mechanism
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Component Inputs
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
| ---------- | ----------- | -------- | ------------------------------------------------------------------------- |
|
|
23
|
-
| `children` | `ReactNode` | No | Child components (activity stream content) — currently unused in the stub |
|
|
21
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions.
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
| Name | Type | Required | Description |
|
|
24
|
+
| ---------- | ------------------ | -------- | ------------------------------------------------------------------------- |
|
|
25
|
+
| `children` | renderable content | No | Child components (activity stream content) — currently unused in the stub |
|
|
26
|
+
|
|
27
|
+
## Implementation Structure
|
|
26
28
|
|
|
27
29
|
Stub implementation — placeholder only.
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
### Module Setup
|
|
32
|
+
|
|
33
|
+
The component accepts children via the framework's content projection mechanism. It does NOT import any Pega SDK modules.
|
|
34
|
+
|
|
35
|
+
The component is named `Pulse` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
31
36
|
|
|
32
|
-
|
|
33
|
-
// Stub: renders a card with left accent border and placeholder content
|
|
34
|
-
return (
|
|
35
|
-
<Card style={{ marginTop: '8px', marginBottom: '8px', borderLeft: '6px solid var(--app-primary-light-color)' }}>
|
|
36
|
-
<CardHeader><h6>Pulse</h6></CardHeader>
|
|
37
|
-
<CardContent>Pulse</CardContent>
|
|
38
|
-
</Card>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
```
|
|
37
|
+
### Component Logic
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
The component receives `children` as input (though the current stub does not render them), then:
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
1. **Render a Card container** — a card-style element with a distinct 6px left border accent using the primary light color from the design system's palette (or CSS variable `--app-primary-light-color`). Apply top and bottom margin of 1 spacing unit (≈ 8px).
|
|
42
|
+
2. **Render a CardHeader** — containing a heading (heading-6 text, ≈1.25rem, weight 500) with the text `"Pulse"`.
|
|
43
|
+
3. **Render CardContent** — containing placeholder text `"Pulse"`.
|
|
44
|
+
|
|
45
|
+
> **Note:** The current reference implementation ignores `children` and renders placeholder content. A production implementation would render the children (the activity stream) inside the card body.
|
|
46
46
|
|
|
47
47
|
## Behavioral Contract
|
|
48
48
|
|
|
49
49
|
1. Render a `Card` (or equivalent container) with a distinct left border accent.
|
|
50
|
-
2. Render a card header with the title text `"Pulse"` using a heading style (
|
|
50
|
+
2. Render a card header with the title text `"Pulse"` using a heading style (heading-6, ≈1.25rem, weight 500).
|
|
51
51
|
3. Render card content body with placeholder text `"Pulse"`.
|
|
52
52
|
4. The left border accent uses the **primary light** color from the design system's theme.
|
|
53
53
|
5. The card has top and bottom margin (1 spacing unit each).
|
|
@@ -56,16 +56,16 @@ export default function Pulse(props: PropsWithChildren<{}>) {
|
|
|
56
56
|
|
|
57
57
|
## Visual Specifications
|
|
58
58
|
|
|
59
|
-
Derived from
|
|
59
|
+
Derived from the component's companion styles:
|
|
60
60
|
|
|
61
61
|
### Card Container
|
|
62
62
|
|
|
63
|
-
| Property | Value
|
|
64
|
-
| ----------------- |
|
|
65
|
-
| Margin top |
|
|
66
|
-
| Margin bottom |
|
|
67
|
-
| Border left | `6px solid`
|
|
68
|
-
| Border left color |
|
|
63
|
+
| Property | Value |
|
|
64
|
+
| ----------------- | ---------------------------------------------------- |
|
|
65
|
+
| Margin top | 1 spacing unit (≈ 8px) |
|
|
66
|
+
| Margin bottom | 1 spacing unit (≈ 8px) |
|
|
67
|
+
| Border left | `6px solid` |
|
|
68
|
+
| Border left color | Primary light color from the design system's palette |
|
|
69
69
|
|
|
70
70
|
**CSS-only implementation notes:**
|
|
71
71
|
|
|
@@ -76,8 +76,8 @@ Derived from `Pulse.tsx` makeStyles:
|
|
|
76
76
|
|
|
77
77
|
## Edge Cases & Special Logic
|
|
78
78
|
|
|
79
|
-
- The `children`
|
|
80
|
-
- The component renders unconditionally (no conditional logic based on
|
|
79
|
+
- The `children` input is received but not currently rendered — it is intentional in the stub.
|
|
80
|
+
- The component renders unconditionally (no conditional logic based on inputs).
|
|
81
81
|
|
|
82
82
|
## Dependencies
|
|
83
83
|
|
|
@@ -88,18 +88,10 @@ Derived from `Pulse.tsx` makeStyles:
|
|
|
88
88
|
|
|
89
89
|
**UI control type:** Card with left accent border and header/body sections.
|
|
90
90
|
|
|
91
|
-
Listed design systems are examples only.
|
|
92
|
-
|
|
93
|
-
| Design System | Recommended Component |
|
|
94
|
-
| ------------------ | --------------------------------------------------------------------------------------- |
|
|
95
|
-
| Default (CSS only) | `<div>` with `border-left: 6px solid` + inner header/body divs |
|
|
96
|
-
| MUI | `<Card><CardHeader title={<Typography variant='h6'>Pulse</Typography>} /><CardContent>` |
|
|
97
|
-
| Ant Design | `<Card title='Pulse'>` with left border via `style` prop |
|
|
98
|
-
| Chakra UI | `<Card>` with `borderLeft='6px solid' borderColor='blue.300'` |
|
|
99
|
-
| Shadcn/ui | `<Card><CardHeader><CardTitle>` |
|
|
100
|
-
|
|
101
91
|
When implementing in a specific design system, map the following:
|
|
102
92
|
|
|
103
|
-
-
|
|
104
|
-
- Left border
|
|
93
|
+
- **Card container** → use the DS's card component (or a bordered container element)
|
|
94
|
+
- **Left border accent** → apply `border-left: 6px solid` with the DS's primary-light color
|
|
95
|
+
- **Card header** → use the DS's card header/title slot with heading-6 text
|
|
96
|
+
- **Card body** → use the DS's card content/body slot
|
|
105
97
|
- Card header title typography → design system's heading variant (h6 or equivalent)
|