@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,116 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
Time picker field with 5-minute step increments, binds to a Pega case property.
|
|
4
4
|
|
|
5
|
-
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture,
|
|
5
|
+
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## Component Purpose
|
|
10
10
|
|
|
11
|
-
Renders a time-only picker. Stores time as `HH:mm:ss` string. Displays time in 12-hour (`hh:mm a`) format. Uses
|
|
11
|
+
Renders a time-only picker. Stores time as `HH:mm:ss` string. Displays time in 12-hour (`hh:mm a`) format. Uses 5-minute step increments for the picker. Delegates read-only rendering to `TextInput`.
|
|
12
12
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `Time`
|
|
16
16
|
- **Type / Subtype:** `Field` / `Time`
|
|
17
|
-
- **Registration key:** `Time` (in
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
No
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export default function Time(props: TimeProps) {
|
|
40
|
-
// 1. Registry lookups
|
|
41
|
-
const FieldValueList = getComponentFromRegistry('FieldValueList');
|
|
42
|
-
const TextInput = getComponentFromRegistry('TextInput');
|
|
43
|
-
|
|
44
|
-
// 2. Destructure props
|
|
45
|
-
const {
|
|
46
|
-
getPConnect, label, required, disabled, value = '',
|
|
47
|
-
validatemessage, status, readOnly, helperText, displayMode,
|
|
48
|
-
hideLabel, testId,
|
|
49
|
-
} = props;
|
|
50
|
-
const helperTextToDisplay = validatemessage || helperText;
|
|
51
|
-
const pConn = getPConnect();
|
|
52
|
-
const actions = pConn.getActionsApi();
|
|
53
|
-
const propName = (pConn.getStateProps() as any).value;
|
|
54
|
-
|
|
55
|
-
// 3. Display mode returns
|
|
56
|
-
if (displayMode === 'DISPLAY_ONLY') {
|
|
57
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
58
|
-
}
|
|
59
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
60
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// 4. Read-only return
|
|
64
|
-
if (readOnly) return <TextInput {...props} />;
|
|
65
|
-
|
|
66
|
-
// 5. Test ID
|
|
67
|
-
const testProps: any = { 'data-test-id': testId };
|
|
68
|
-
|
|
69
|
-
// 6. handleChange — commit on change (not blur)
|
|
70
|
-
const handleChange = (date) => {
|
|
71
|
-
const theValue = date && date.isValid() ? date.format('HH:mm:ss') : null;
|
|
72
|
-
handleEvent(actions, 'changeNblur', propName, theValue);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// 7. Parse time value from HH:mm:ss string
|
|
76
|
-
let timeValue: any = null;
|
|
77
|
-
if (value && Object.keys(value).length) {
|
|
78
|
-
const timeArray = value.split(':').map(itm => Number(itm));
|
|
79
|
-
timeValue = dayjs().hour(timeArray[0]).minute(timeArray[1]);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// 8. Main render — time picker
|
|
83
|
-
// Key props:
|
|
84
|
-
// - disabled, label, value: timeValue
|
|
85
|
-
// - minutesStep: 5, format: 'hh:mm a'
|
|
86
|
-
// - onChange: handleChange
|
|
87
|
-
// - textField slot: variant 'outlined', placeholder 'hh:mm am',
|
|
88
|
-
// required, error: status === 'error', helperText: helperTextToDisplay,
|
|
89
|
-
// size: 'small', InputProps: { ...testProps }
|
|
90
|
-
return <TimePickerWidget ... />;
|
|
91
|
-
}
|
|
92
|
-
```
|
|
17
|
+
- **Registration key:** `Time` (in the project's component map)
|
|
18
|
+
|
|
19
|
+
## Inputs (component-specific)
|
|
20
|
+
|
|
21
|
+
No inputs beyond the project's field input contract (see prerequisite skill).
|
|
22
|
+
|
|
23
|
+
## Implementation Structure
|
|
24
|
+
|
|
25
|
+
No local state for the time value — it is derived directly from the `value` input on each render.
|
|
26
|
+
|
|
27
|
+
**Module Setup:** The component depends on the project's component registry (to resolve `FieldValueList` and `TextInput`), the project's event-commit utility, and a date/time manipulation library (for parsing and formatting time values). Define the input contract as the project's field input contract with no additional fields.
|
|
28
|
+
|
|
29
|
+
**Main Component Logic** — steps in order:
|
|
30
|
+
|
|
31
|
+
1. **Registry lookups** — resolve `FieldValueList` and `TextInput` via the project's component registry.
|
|
32
|
+
2. **Receive inputs** — `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `helperText`, `displayMode`, `hideLabel`, `testId`. Compute `helperTextToDisplay = validatemessage || helperText`, and set up the PConnect instance, actions API, and bound property name.
|
|
33
|
+
3. **Display mode returns** — `DISPLAY_ONLY` and `STACKED_LARGE_VAL` both return `FieldValueList` using the raw `value`, the latter with a stacked variant.
|
|
34
|
+
4. **Read-only return** — when `readOnly` is true, render the `TextInput` component with all inputs passed through directly (full delegation).
|
|
35
|
+
5. **Test ID** — build a test-id attribute from `testId`.
|
|
36
|
+
6. **Change handler — commit on change, not blur** — given a selected time object: if it is valid, format it to `'HH:mm:ss'`; otherwise use `null`. Immediately commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and the formatted value — there is no separate blur-triggered commit for this field.
|
|
37
|
+
7. **Parse time value from the `HH:mm:ss` string** — when `value` is present and non-empty, split it on `:` into numeric parts and construct a time object with the parsed hours and minutes to get the picker's controlled time value; otherwise the time value is `null`.
|
|
38
|
+
8. **Render** — a time picker configured with: `disabled`, `label`, current time value, minutes step of `5`, display format `'hh:mm a'`, the change handler, and a nested text-field slot configured with an outlined style, placeholder `'hh:mm am'`, `required`, an error state when `status === 'error'`, `helperText: helperTextToDisplay`, small size, and the test-id attribute applied to the input element.
|
|
93
39
|
|
|
94
40
|
## Behavioral Contract
|
|
95
41
|
|
|
96
42
|
1. **Value format stored/committed:** `HH:mm:ss` (24-hour, e.g., `'14:30:00'`).
|
|
97
|
-
2. **Value parsed for display:** Split the `HH:mm:ss` string into `[hours, minutes, seconds]` and construct a time object
|
|
98
|
-
3. **Local state:** No explicit local state for the time value — the picker's controlled
|
|
43
|
+
2. **Value parsed for display:** Split the `HH:mm:ss` string into `[hours, minutes, seconds]` and construct a time object using the date library.
|
|
44
|
+
3. **Local state:** No explicit local state for the time value — the picker's controlled value is derived from the `value` input directly on each render.
|
|
99
45
|
4. **On change:**
|
|
100
|
-
- If
|
|
101
|
-
- Commit immediately via
|
|
46
|
+
- If the time object is valid: format to `'HH:mm:ss'`, else use `null`.
|
|
47
|
+
- Commit immediately via the project's event-commit utility with event type `'changeNblur'`, the property name, and the formatted value.
|
|
102
48
|
5. **Display format:** `'hh:mm a'` (12-hour with am/pm) in the picker UI.
|
|
103
49
|
6. **Placeholder:** `'hh:mm am'`.
|
|
104
50
|
7. **Minutes step:** 5 minutes.
|
|
105
|
-
8. **Read-only:** Delegate to `TextInput
|
|
51
|
+
8. **Read-only:** Delegate to `TextInput`, passing all inputs through.
|
|
106
52
|
|
|
107
53
|
## Display Mode Rendering
|
|
108
54
|
|
|
109
|
-
- **`DISPLAY_ONLY`:**
|
|
110
|
-
- **`STACKED_LARGE_VAL`:**
|
|
55
|
+
- **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value` set to the raw `value` — raw time string, no extra formatting.
|
|
56
|
+
- **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked layout variant.
|
|
111
57
|
|
|
112
58
|
## Read-Only Rendering
|
|
113
59
|
|
|
114
|
-
Delegate to `TextInput
|
|
60
|
+
Delegate to `TextInput`, passing all inputs through.
|
|
115
61
|
|
|
116
62
|
## Visual Specifications
|
|
117
63
|
|
|
@@ -129,28 +75,28 @@ Delegate to `TextInput`: `return <TextInput {...props} />`.
|
|
|
129
75
|
|
|
130
76
|
## Edge Cases & Special Logic
|
|
131
77
|
|
|
132
|
-
- **Null/empty value:** When `value` is empty or
|
|
78
|
+
- **Null/empty value:** When `value` is empty or has no content, set the time value to `null` — do NOT try to parse an empty value.
|
|
133
79
|
- **Value parsing:** Split by `:` and convert each part to a number before constructing the time object.
|
|
134
80
|
- **Commits on change** (picker selection), not on blur.
|
|
135
|
-
- If
|
|
81
|
+
- If the time object is invalid (user clears the time), commit `null`.
|
|
136
82
|
|
|
137
83
|
## Dependencies
|
|
138
84
|
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- `
|
|
143
|
-
- `
|
|
85
|
+
- A date/time manipulation library — for time parsing and formatting to `'HH:mm:ss'`.
|
|
86
|
+
- A time picker UI component (for the clock popup or time selection UI).
|
|
87
|
+
- The project's event-commit utility.
|
|
88
|
+
- The project's component registry, resolving `TextInput` — for read-only delegation.
|
|
89
|
+
- The project's component registry, resolving `FieldValueList` — for display modes.
|
|
144
90
|
|
|
145
91
|
## Design System Mapping
|
|
146
92
|
|
|
147
93
|
**UI control type:** Time picker (clock popup or input with am/pm selector).
|
|
148
94
|
|
|
149
|
-
|
|
95
|
+
When implementing in a specific design system, map the following:
|
|
150
96
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
97
|
+
- **Time picker** → use the DS's time picker component or a compatible third-party picker
|
|
98
|
+
- **Display format** → `'hh:mm a'` (12-hour with am/pm)
|
|
99
|
+
- **Minutes step** → configure the time picker to snap to 5-minute increments
|
|
100
|
+
- **Stored format** → `'HH:mm:ss'` (24-hour, committed to the Pega store)
|
|
101
|
+
- **Read-only mode** → delegate to the `TextInput` component
|
|
102
|
+
- **Commit behavior** → commit on valid selection (not on blur)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
URL input field with browser-native URL validation, binds to a Pega case property.
|
|
4
4
|
|
|
5
|
-
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture,
|
|
5
|
+
> **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -14,94 +14,47 @@ Renders a single-line text input of type `url`. Provides browser-native URL form
|
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `URL`
|
|
16
16
|
- **Type / Subtype:** `Field` / `Text-URL`
|
|
17
|
-
- **Registration key:** `URL` (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export default function URLComponent(props: URLComponentProps) {
|
|
42
|
-
// 1. Registry lookups
|
|
43
|
-
const FieldValueList = getComponentFromRegistry('FieldValueList');
|
|
44
|
-
const TextInput = getComponentFromRegistry('TextInput');
|
|
45
|
-
|
|
46
|
-
// 2. Destructure props
|
|
47
|
-
const {
|
|
48
|
-
getPConnect, label, required, disabled, value = '',
|
|
49
|
-
validatemessage, status, readOnly, testId,
|
|
50
|
-
helperText, displayMode, hideLabel, placeholder,
|
|
51
|
-
} = props;
|
|
52
|
-
const helperTextToDisplay = validatemessage || helperText;
|
|
53
|
-
const [inputValue, setInputValue] = useState('');
|
|
54
|
-
const pConn = getPConnect();
|
|
55
|
-
const actions = pConn.getActionsApi();
|
|
56
|
-
const propName = (pConn.getStateProps() as any).value;
|
|
57
|
-
|
|
58
|
-
// 3. useEffect: sync — deps: [value]
|
|
59
|
-
useEffect(() => { setInputValue(value); }, [value]);
|
|
60
|
-
|
|
61
|
-
// 4. Display mode returns
|
|
62
|
-
if (displayMode === 'DISPLAY_ONLY') {
|
|
63
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
64
|
-
}
|
|
65
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
66
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// 5. Read-only return
|
|
70
|
-
if (readOnly) return <TextInput {...props} />;
|
|
71
|
-
|
|
72
|
-
// 6. Handlers
|
|
73
|
-
const testProps: any = { 'data-test-id': testId };
|
|
74
|
-
const handleChange = (event) => { setInputValue(event?.target?.value); };
|
|
75
|
-
function handleBlur() { handleEvent(actions, 'changeNblur', propName, inputValue); }
|
|
76
|
-
|
|
77
|
-
// 7. Main render — URL input (type='url')
|
|
78
|
-
// Key props: same as TextInput but type: 'url'
|
|
79
|
-
// - fullWidth, variant: 'outlined', size: 'small'
|
|
80
|
-
// - value: inputValue, onChange, onBlur: !readOnly ? handleBlur : undefined
|
|
81
|
-
// - label, helperText: helperTextToDisplay, placeholder: placeholder ?? ''
|
|
82
|
-
// - required, disabled, error: status === 'error'
|
|
83
|
-
// - slotProps: { input: { inputProps: { ...testProps } } }
|
|
84
|
-
return <TextFieldWidget type="url" ... />;
|
|
85
|
-
}
|
|
86
|
-
```
|
|
17
|
+
- **Registration key:** `URL` (in the project's component map)
|
|
18
|
+
|
|
19
|
+
> **Important naming note:** The component's export name should avoid conflicts with the platform's built-in `URL` global (e.g., use `URLComponent` as the export name). Register it under the key `URL` in the project's component map.
|
|
20
|
+
|
|
21
|
+
## Inputs (component-specific)
|
|
22
|
+
|
|
23
|
+
No inputs beyond the project's field input contract (see prerequisite skill).
|
|
24
|
+
|
|
25
|
+
## Implementation Structure
|
|
26
|
+
|
|
27
|
+
Nearly identical to TextInput — only difference is the `url` input type.
|
|
28
|
+
|
|
29
|
+
**Module Setup:** The component depends on the project's component registry (to resolve `FieldValueList` and `TextInput`) and the project's event-commit utility (for committing value changes to the store). Define the input contract as the project's field input contract with no additional fields. Export the component with a name that avoids conflicts with the platform's built-in `URL` global.
|
|
30
|
+
|
|
31
|
+
**Main Component Logic** — steps in order:
|
|
32
|
+
|
|
33
|
+
1. **Registry lookups** — resolve `FieldValueList` and `TextInput` via the project's component registry.
|
|
34
|
+
2. **Receive inputs** — `getPConnect`, `label`, `required`, `disabled`, `value` (default `''`), `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`. Compute `helperTextToDisplay = validatemessage || helperText`, initialize `inputValue` local state to `''`, and set up the PConnect instance, actions API, and bound property name.
|
|
35
|
+
3. **Sync from store** — a lifecycle effect watching `value` updates `inputValue` whenever it changes.
|
|
36
|
+
4. **Display mode returns** — `DISPLAY_ONLY` and `STACKED_LARGE_VAL` both return `FieldValueList` using the raw `value`, the latter with a stacked variant.
|
|
37
|
+
5. **Read-only return** — when `readOnly` is true, render the `TextInput` component with all inputs passed through directly (full delegation).
|
|
38
|
+
6. **Handlers** — build a test-id attribute from `testId`; the change handler updates `inputValue` from the event's input value; the blur handler commits the value via the project's event-commit utility with event type `'changeNblur'`, the property name, and `inputValue`.
|
|
39
|
+
7. **Render** — same configuration as TextInput but with a `url` input type: full width, an outlined style, small size, current `inputValue`, the change handler, the blur handler wired only when not read-only, `label`, `helperText: helperTextToDisplay`, `placeholder: placeholder ?? ''`, `required`, `disabled`, an error state when `status === 'error'`, and the test-id attribute applied to the underlying input element.
|
|
87
40
|
|
|
88
41
|
## Behavioral Contract
|
|
89
42
|
|
|
90
|
-
1. **Local state:** Maintain `inputValue` (string). Initialize from `value`
|
|
91
|
-
2. **Sync from store:**
|
|
43
|
+
1. **Local state:** Maintain `inputValue` (string). Initialize from the `value` input (`''` default).
|
|
44
|
+
2. **Sync from store:** A lifecycle effect watching `value` updates `inputValue`.
|
|
92
45
|
3. **On change:** Update local state only.
|
|
93
|
-
4. **On blur:** Commit via
|
|
94
|
-
5. **Input type:** Use `
|
|
95
|
-
6. **Read-only:** Delegate entirely to `TextInput
|
|
46
|
+
4. **On blur:** Commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and `inputValue`.
|
|
47
|
+
5. **Input type:** Use a `url`-typed input for browser-native URL format hint/validation.
|
|
48
|
+
6. **Read-only:** Delegate entirely to the `TextInput` component, passing all inputs through.
|
|
96
49
|
|
|
97
50
|
## Display Mode Rendering
|
|
98
51
|
|
|
99
|
-
- **`DISPLAY_ONLY`:**
|
|
100
|
-
- **`STACKED_LARGE_VAL`:**
|
|
52
|
+
- **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `label` (or empty when `hideLabel` is true) and `value` set to the raw `value` — raw URL string.
|
|
53
|
+
- **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked layout variant.
|
|
101
54
|
|
|
102
55
|
## Read-Only Rendering
|
|
103
56
|
|
|
104
|
-
Delegate to `TextInput
|
|
57
|
+
Delegate to `TextInput`, passing all inputs through.
|
|
105
58
|
|
|
106
59
|
## Visual Specifications
|
|
107
60
|
|
|
@@ -117,29 +70,27 @@ Identical to `TextInput` visually — no additional adornments.
|
|
|
117
70
|
| Error state | Red border + red helper text |
|
|
118
71
|
| Helper text | Below input |
|
|
119
72
|
|
|
120
|
-
No special icon or adornment — the only difference from `TextInput` is `type
|
|
73
|
+
No special icon or adornment — the only difference from `TextInput` is the `url` input type.
|
|
121
74
|
|
|
122
75
|
## Edge Cases & Special Logic
|
|
123
76
|
|
|
124
|
-
- The component
|
|
125
|
-
- `
|
|
126
|
-
-
|
|
77
|
+
- The component's export name should avoid shadowing the platform's global `URL` constructor. Register under the key `URL` in the project's component map.
|
|
78
|
+
- The `url` input type triggers browser tooltip/validation but Pega validation is the authoritative source.
|
|
79
|
+
- The blur handler is only wired when the field is not read-only.
|
|
127
80
|
|
|
128
81
|
## Dependencies
|
|
129
82
|
|
|
130
|
-
-
|
|
131
|
-
- `
|
|
132
|
-
- `
|
|
83
|
+
- The project's event-commit utility.
|
|
84
|
+
- The project's component registry, resolving `TextInput` — for read-only delegation.
|
|
85
|
+
- The project's component registry, resolving `FieldValueList` — for display modes.
|
|
133
86
|
|
|
134
87
|
## Design System Mapping
|
|
135
88
|
|
|
136
89
|
**UI control type:** Single-line URL text input.
|
|
137
90
|
|
|
138
|
-
|
|
91
|
+
When implementing in a specific design system, map the following:
|
|
139
92
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
| Ant Design | `<Input type="url" />` |
|
|
145
|
-
| Chakra UI | `<Input type="url" />` |
|
|
93
|
+
- **URL input** → use the DS's text input with input type set to `url`
|
|
94
|
+
- **Read-only mode** → delegate to the `TextInput` component
|
|
95
|
+
- **Error state** → the DS's error/danger visual state
|
|
96
|
+
- **Helper text** → the DS's helper/description text slot below the input
|