@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,138 +2,118 @@
|
|
|
2
2
|
|
|
3
3
|
WYSIWYG rich text editor field backed by TinyMCE. Supports editable and read-only modes, optional label, helper text, error/required states, and a file picker for image uploads.
|
|
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
|
|
|
9
9
|
## Component Purpose
|
|
10
10
|
|
|
11
|
-
Renders a rich text editing area (WYSIWYG) for Pega case properties that store HTML content. In **edit mode**, uses
|
|
11
|
+
Renders a rich text editing area (WYSIWYG) for Pega case properties that store HTML content. In **edit mode**, uses a rich text editor library with a bottom toolbar. In **read-only mode**, renders the HTML content as a read-only `<div>`. Wraps the editor in a form field wrapper with an optional label and helper text, consistent with other field components.
|
|
12
12
|
|
|
13
|
-
The editor
|
|
13
|
+
The editor supports exposing its instance to parent components — use the framework's standard instance-sharing mechanism.
|
|
14
14
|
|
|
15
|
-
> **Note:** TinyMCE is the reference editor library. In
|
|
15
|
+
> **Note:** TinyMCE is the reference editor library. In other implementations, this component can be replaced with an alternative rich text library (Quill, ProseMirror, Slate.js, Tiptap, etc.). The behavioral contract below remains the same regardless of library.
|
|
16
16
|
|
|
17
17
|
## Pega Metadata
|
|
18
18
|
|
|
19
19
|
- **Pega Name:** `RichTextEditor`
|
|
20
|
-
- **Registration key:** `RichTextEditor` (in
|
|
21
|
-
- **Does NOT extend
|
|
22
|
-
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
disabled={disabled} onBlur={onBlur} onEditorChange={onChange}
|
|
90
|
-
placeholder={placeholder} onInit={(evt, editor) => { editorRef.current = editor; }} />
|
|
91
|
-
{info && <HelperText>{info}</HelperText>}
|
|
92
|
-
</FormWrapper>
|
|
93
|
-
);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
export default RichTextEditor;
|
|
97
|
-
```
|
|
20
|
+
- **Registration key:** `RichTextEditor` (in the project's component map)
|
|
21
|
+
- **Does NOT extend the base PConnect interface** — receives all data as explicit field-like inputs
|
|
22
|
+
|
|
23
|
+
## Component Inputs
|
|
24
|
+
|
|
25
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions.
|
|
26
|
+
|
|
27
|
+
| Name | Type | Required | Description |
|
|
28
|
+
| -------------- | ---------- | -------- | ----------------------------------------------------------------- |
|
|
29
|
+
| `id` | `string` | No | DOM id for the editor element. Defaults to a generated UID |
|
|
30
|
+
| `defaultValue` | `string` | Yes | Initial HTML content of the editor |
|
|
31
|
+
| `label` | `string` | Yes | Field label displayed above the editor |
|
|
32
|
+
| `labelHidden` | `boolean` | Yes | If `true`, hide the label |
|
|
33
|
+
| `info` | `string` | No | Helper text displayed below the editor |
|
|
34
|
+
| `testId` | `string` | No | Value for the test id attribute on the form wrapper |
|
|
35
|
+
| `placeholder` | `string` | No | Placeholder text shown in empty editor |
|
|
36
|
+
| `disabled` | `boolean` | Yes | If `true`, editor is in read-only/disabled mode with no toolbar |
|
|
37
|
+
| `required` | `boolean` | Yes | If `true`, marks the field as required |
|
|
38
|
+
| `readOnly` | `boolean` | Yes | If `true`, render as static HTML display (not interactive editor) |
|
|
39
|
+
| `error` | `boolean` | Yes | If `true`, applies error styling to the form wrapper |
|
|
40
|
+
| `onBlur` | `function` | Yes | Called when the editor loses focus |
|
|
41
|
+
| `onChange` | `function` | Yes | Called when the editor content changes |
|
|
42
|
+
|
|
43
|
+
## Implementation Structure
|
|
44
|
+
|
|
45
|
+
### Module Setup
|
|
46
|
+
|
|
47
|
+
The component imports:
|
|
48
|
+
|
|
49
|
+
- The framework's mechanism for exposing the editor instance to parent components (e.g., ref forwarding in React, `@ViewChild` in Angular)
|
|
50
|
+
- Lifecycle and utility helpers from the SDK bridge package: a post-initial-mount change watcher, a consolidated instance reference utility, and a unique ID generator
|
|
51
|
+
- A rich text editor library (TinyMCE in the reference implementation — can be swapped for Quill, ProseMirror, Tiptap, etc.)
|
|
52
|
+
- Form wrapper components from the design system (form control, helper text, label)
|
|
53
|
+
- Theme/token access from the design system for palette and typography values
|
|
54
|
+
|
|
55
|
+
The component is named `RichTextEditor`, accepts the inputs listed above, and supports exposing the editor instance to parent components. Define the input contract and export the component following the project's framework conventions.
|
|
56
|
+
|
|
57
|
+
### Editor Instance and ID Management
|
|
58
|
+
|
|
59
|
+
- Use the SDK bridge package's consolidated reference utility to create a reference to the editor instance — the rich text editor instance is stored here after initialization via `onInit`.
|
|
60
|
+
- If `id` is not provided in the inputs, generate one using the SDK bridge package's unique ID generator.
|
|
61
|
+
|
|
62
|
+
### Mode Transition Effect
|
|
63
|
+
|
|
64
|
+
After initial mount, use the SDK bridge package's post-initial-mount change watcher, observing `[readOnly, disabled]`. When either changes, switch the editor's mode to read-only if either `readOnly` or `disabled` is true, otherwise switch to edit/design mode. This transitions the editor mode without re-mounting it.
|
|
65
|
+
|
|
66
|
+
### Render Paths
|
|
67
|
+
|
|
68
|
+
The component has two mutually exclusive render paths, both wrapped in a common form wrapper:
|
|
69
|
+
|
|
70
|
+
**Read-only path** (when `readOnly === true`):
|
|
71
|
+
|
|
72
|
+
- Render a `<div>` with the resolved `id`, class `readonly-richtext-editor`, and raw HTML content containing `defaultValue` (or `'--'` if defaultValue is falsy) via the framework's trusted HTML injection mechanism.
|
|
73
|
+
- Skip the TinyMCE Editor entirely.
|
|
74
|
+
|
|
75
|
+
**Edit path** (when `readOnly === false`):
|
|
76
|
+
|
|
77
|
+
- Render the TinyMCE editor instance with the configuration described in the Behavioral Contract sections below.
|
|
78
|
+
- On init, store the editor instance in the component's editor reference.
|
|
79
|
+
|
|
80
|
+
### Wrapper Structure
|
|
81
|
+
|
|
82
|
+
Both paths are wrapped in a form field wrapper (the DS's form control component) with:
|
|
83
|
+
|
|
84
|
+
- The test id attribute set to the `testId` input
|
|
85
|
+
- `error` and `required` states passed through
|
|
86
|
+
- If `labelHidden` is false: render a label element with class `fieldLabel` containing the `label` text (non-floating — positioned relative with no transform)
|
|
87
|
+
- The rich text component (either read-only div or interactive editor)
|
|
88
|
+
- If `info` is provided: render a helper text element containing the info text
|
|
98
89
|
|
|
99
90
|
## Behavioral Contract
|
|
100
91
|
|
|
101
|
-
### 1.
|
|
92
|
+
### 1. Exposing the Editor Instance
|
|
102
93
|
|
|
103
|
-
The component
|
|
94
|
+
The component exposes the editor instance to parent components. Internally, use the SDK bridge package's consolidated reference utility to store the editor instance after initialization.
|
|
104
95
|
|
|
105
96
|
### 2. UID for id
|
|
106
97
|
|
|
107
|
-
If `id` is not provided, generate one using
|
|
98
|
+
If `id` is not provided, generate one using the SDK bridge package's unique ID generator.
|
|
108
99
|
|
|
109
100
|
### 3. Read-Only Mode
|
|
110
101
|
|
|
111
|
-
If `readOnly` is `true`, render
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
<div
|
|
115
|
-
key={id}
|
|
116
|
-
id={id}
|
|
117
|
-
className='readonly-richtext-editor'
|
|
118
|
-
dangerouslySetInnerHTML={{ __html: defaultValue || '--' }}
|
|
119
|
-
/>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Skip the TinyMCE Editor entirely in this case.
|
|
102
|
+
If `readOnly` is `true`, render a `<div>` with `key` and `id` set to the resolved id, class `readonly-richtext-editor`, and the raw HTML content set to `defaultValue` (or `'--'` as fallback if defaultValue is falsy). Skip the interactive editor entirely in this case.
|
|
123
103
|
|
|
124
104
|
### 4. Edit Mode (TinyMCE)
|
|
125
105
|
|
|
126
|
-
When `readOnly` is `false`, render
|
|
106
|
+
When `readOnly` is `false`, render the TinyMCE editor component from the project's framework-specific TinyMCE integration package with:
|
|
127
107
|
|
|
128
|
-
| Config | Value
|
|
129
|
-
| ------------------ |
|
|
130
|
-
| `tinymceScriptSrc` | `'tinymce/tinymce.min.js'` (local script)
|
|
131
|
-
| `id` | The resolved `id`
|
|
132
|
-
| `initialValue` | `defaultValue`
|
|
133
|
-
| `disabled` | `disabled`
|
|
134
|
-
| `onBlur` | `onBlur`
|
|
135
|
-
| `onEditorChange` | `onChange`
|
|
136
|
-
| `onInit` | Store editor in
|
|
108
|
+
| Config | Value |
|
|
109
|
+
| ------------------ | ------------------------------------------------ |
|
|
110
|
+
| `tinymceScriptSrc` | `'tinymce/tinymce.min.js'` (local script) |
|
|
111
|
+
| `id` | The resolved `id` |
|
|
112
|
+
| `initialValue` | `defaultValue` |
|
|
113
|
+
| `disabled` | `disabled` input |
|
|
114
|
+
| `onBlur` | `onBlur` input |
|
|
115
|
+
| `onEditorChange` | `onChange` input |
|
|
116
|
+
| `onInit` | Store editor in the component's editor reference |
|
|
137
117
|
|
|
138
118
|
### 5. TinyMCE `init` Configuration
|
|
139
119
|
|
|
@@ -152,51 +132,21 @@ When `readOnly` is `false`, render `<Editor>` from `@tinymce/tinymce-react` with
|
|
|
152
132
|
| `file_picker_types` | `'image'` |
|
|
153
133
|
| `file_picker_callback` | See file picker section below |
|
|
154
134
|
| `content_style` | Theme-aware CSS string (see below) |
|
|
155
|
-
| `placeholder` | `placeholder`
|
|
135
|
+
| `placeholder` | `placeholder` input |
|
|
156
136
|
|
|
157
137
|
### 6. Theme-Aware Content Style
|
|
158
138
|
|
|
159
|
-
Inject a `content_style` string that uses theme values for the
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
h1-h6 {
|
|
172
|
-
color: <theme.palette.text.primary>;
|
|
173
|
-
font-family: <theme.typography.fontFamily>;
|
|
174
|
-
}
|
|
175
|
-
blockquote {
|
|
176
|
-
color: <theme.palette.text.secondary>;
|
|
177
|
-
border-left: 4px solid <theme.palette.primary.light>;
|
|
178
|
-
padding-left: 8px;
|
|
179
|
-
}
|
|
180
|
-
ul,
|
|
181
|
-
ol {
|
|
182
|
-
color: <theme.palette.text.primary>;
|
|
183
|
-
}
|
|
184
|
-
input,
|
|
185
|
-
textarea,
|
|
186
|
-
select {
|
|
187
|
-
background: <theme.palette.background.paper>;
|
|
188
|
-
color: <theme.palette.text.primary>;
|
|
189
|
-
border: 1px solid <theme.palette.divider>;
|
|
190
|
-
border-radius: 4px;
|
|
191
|
-
padding: 6px 10px;
|
|
192
|
-
font-size: 1em;
|
|
193
|
-
font-family: inherit;
|
|
194
|
-
}
|
|
195
|
-
.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
|
|
196
|
-
color: <theme.palette.text.secondary>;
|
|
197
|
-
opacity: 0.7;
|
|
198
|
-
}
|
|
199
|
-
```
|
|
139
|
+
Inject a `content_style` string into the TinyMCE init config that uses theme values. The style string should set properties for the following selectors:
|
|
140
|
+
|
|
141
|
+
| CSS Selector | Properties |
|
|
142
|
+
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
143
|
+
| `body` | `font-family` from theme typography; `font-size` from theme typography (in px); `color` from theme's primary text color; `background` from theme's paper/surface background |
|
|
144
|
+
| `a` | `color` from theme's primary/link color |
|
|
145
|
+
| `h1` through `h6` | `color` from theme's primary text color; `font-family` from theme typography |
|
|
146
|
+
| `blockquote` | `color` from theme's secondary text color; `border-left: 4px solid` using theme's primary-light color; `padding-left: 8px` |
|
|
147
|
+
| `ul, ol` | `color` from theme's primary text color |
|
|
148
|
+
| `input, textarea, select` | `background` from theme's paper/surface background; `color` from theme's primary text color; `border: 1px solid` using theme's divider color; `border-radius: 4px`; `padding: 6px 10px`; `font-size: 1em`; `font-family: inherit` |
|
|
149
|
+
| `.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before` | `color` from theme's secondary text color; `opacity: 0.7` |
|
|
200
150
|
|
|
201
151
|
### 7. File Picker Callback
|
|
202
152
|
|
|
@@ -204,32 +154,25 @@ When a user clicks the image upload in the toolbar:
|
|
|
204
154
|
|
|
205
155
|
1. Create a hidden `<input type='file' accept='image/*'>`.
|
|
206
156
|
2. On file selected: read as DataURL using `FileReader`.
|
|
207
|
-
3. On `FileReader.load`: create a blob in TinyMCE's blob cache (`
|
|
157
|
+
3. On `FileReader.load`: create a blob in TinyMCE's blob cache (accessed via the stored editor instance's `editorUpload.blobCache`), then call `cb(blobInfo.blobUri(), { title: file.name })`.
|
|
208
158
|
4. Programmatically click the input to open the file dialog.
|
|
209
159
|
|
|
210
160
|
### 8. readOnly/disabled Transition (after initial mount)
|
|
211
161
|
|
|
212
|
-
Use `
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
editorRef?.current.mode.set(readOnly || disabled ? 'readonly' : 'design')
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
This switches the TinyMCE mode without re-mounting the editor.
|
|
162
|
+
Use the SDK bridge package's post-initial-mount change watcher, observing `[readOnly, disabled]`. When either value changes after the initial render, switch the editor mode to read-only (if readOnly or disabled is true) or to editable/design mode (otherwise). This transitions the editor mode without re-mounting it.
|
|
219
163
|
|
|
220
164
|
### 9. Wrapper Structure
|
|
221
165
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
```
|
|
166
|
+
The component nests elements in this order:
|
|
167
|
+
|
|
168
|
+
1. **Form field wrapper** (the DS's form control) with the test id attribute, `error`, and `required` states
|
|
169
|
+
2. Inside the wrapper, conditionally: **Label element** with class `fieldLabel` containing `{label}` (only if `labelHidden` is false)
|
|
170
|
+
3. The rich text component — either the read-only div or the interactive editor
|
|
171
|
+
4. Conditionally: **Helper text element** containing `{info}` (only if `info` is provided)
|
|
229
172
|
|
|
230
173
|
## Visual Specifications
|
|
231
174
|
|
|
232
|
-
Derived from
|
|
175
|
+
Derived from the component's companion styles:
|
|
233
176
|
|
|
234
177
|
### Label
|
|
235
178
|
|
|
@@ -238,7 +181,7 @@ Derived from `RichTextEditor.tsx` makeStyles:
|
|
|
238
181
|
| Position | relative |
|
|
239
182
|
| Transform | `translate(0, 0px) scale(1)` (non-floating — stays at top) |
|
|
240
183
|
| Margin bottom | 5px |
|
|
241
|
-
| Color |
|
|
184
|
+
| Color | secondary text color |
|
|
242
185
|
|
|
243
186
|
**CSS-only implementation notes:**
|
|
244
187
|
|
|
@@ -254,37 +197,30 @@ Derived from `RichTextEditor.tsx` makeStyles:
|
|
|
254
197
|
|
|
255
198
|
- `defaultValue` in read-only mode falls back to `'--'` if empty.
|
|
256
199
|
- `readOnly` and `disabled` are both handled — `readOnly` suppresses the editor entirely; `disabled` keeps the editor mounted but in TinyMCE's `readonly` mode with no toolbar.
|
|
257
|
-
- Mode transitions (readOnly/disabled changing after mount) use
|
|
200
|
+
- Mode transitions (readOnly/disabled changing after mount) use the SDK bridge package's post-initial-mount change watcher — it fires on subsequent changes but NOT on the initial mount, preventing a double-set.
|
|
258
201
|
- The file picker creates a transient `<input type='file'>` element that is never appended to the DOM — it is clicked programmatically.
|
|
259
|
-
- `id` must be stable across renders — use
|
|
202
|
+
- `id` must be stable across renders — use the SDK's unique ID generator only as a fallback when `id` input is absent.
|
|
260
203
|
|
|
261
204
|
## Dependencies
|
|
262
205
|
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
206
|
+
- A rich text editor library (TinyMCE in the reference — can be swapped for Quill, ProseMirror, Slate.js, Tiptap, etc.)
|
|
207
|
+
- Lifecycle and utility helpers from the SDK bridge package: a post-initial-mount change watcher, a consolidated instance reference utility, and a unique ID generator
|
|
208
|
+
- The design system's theme/token mechanism — for theme-aware content styles
|
|
209
|
+
- The design system's form field wrapper components (form control, helper text, label)
|
|
267
210
|
|
|
268
211
|
## Design System Mapping
|
|
269
212
|
|
|
270
213
|
**UI control type:** Rich text / WYSIWYG editor field with label, helper text, and error state.
|
|
271
214
|
|
|
272
|
-
Listed design systems are examples only.
|
|
273
|
-
|
|
274
|
-
| Design System | Rich Text Library |
|
|
275
|
-
| ------------------ | ------------------------------------------------------------- |
|
|
276
|
-
| Default (CSS only) | `contenteditable` div with custom toolbar, or `<textarea>` |
|
|
277
|
-
| MUI | TinyMCE (`@tinymce/tinymce-react`) wrapped in `<FormControl>` |
|
|
278
|
-
| Ant Design | Quill (`react-quill`) or TinyMCE inside an `<AntForm.Item>` |
|
|
279
|
-
| Chakra UI | Quill or Slate.js inside a `<FormControl>` |
|
|
280
|
-
| Shadcn/ui | Tiptap (`@tiptap/react`) inside a field wrapper |
|
|
281
|
-
|
|
282
215
|
When implementing in a specific design system, map the following:
|
|
283
216
|
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
-
|
|
289
|
-
- `
|
|
290
|
-
-
|
|
217
|
+
- **Rich text editor** → use TinyMCE, Quill, ProseMirror, Tiptap, or any WYSIWYG library appropriate for the project
|
|
218
|
+
- **Form wrapper** → use the DS's form field wrapper (form control, form group, or field container) with error/required states
|
|
219
|
+
- **Label** → use the DS's field label component (non-floating, positioned above the editor)
|
|
220
|
+
- **Helper text** → use the DS's helper/description text below the editor, with error color when `error` is true
|
|
221
|
+
- **`defaultValue`** → initial HTML content
|
|
222
|
+
- **`readOnly` = true** → always render as static HTML display (no editor instance)
|
|
223
|
+
- **`disabled` = true** → editor mounted but in read-only mode with toolbar hidden
|
|
224
|
+
- **`onBlur` / `onChange`** → editor's blur and content-change callbacks
|
|
225
|
+
- **File picker** → `<input type='file' accept='image/*'>` triggered programmatically when the image toolbar button is clicked
|
|
226
|
+
- **Theme-aware styles** → inject the DS's typography and palette values into the editor's content styles so content inside the editor matches the app's theme
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Quick-launch action grid that displays a heading and a set of labeled buttons, each optionally with an icon, for creating WSS cases.
|
|
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,46 +13,39 @@ Renders a titled section of clickable action cards arranged in a responsive CSS
|
|
|
13
13
|
## Pega Metadata
|
|
14
14
|
|
|
15
15
|
- **Pega Name:** `WssQuickCreate`
|
|
16
|
-
- **Registration key:** `WssQuickCreate` (in
|
|
17
|
-
- **Does NOT use `getPConnect`** — receives all data as direct
|
|
16
|
+
- **Registration key:** `WssQuickCreate` (in the project's component map)
|
|
17
|
+
- **Does NOT use `getPConnect`** — receives all data as direct inputs
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Component Inputs
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
The component accepts the following inputs. Define the input contract using the project's framework conventions.
|
|
22
|
+
|
|
23
|
+
| Name | Type | Required | Description |
|
|
22
24
|
| --------- | -------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------- |
|
|
23
25
|
| `heading` | `string` | Yes | Section title rendered as an `<h1>` |
|
|
24
26
|
| `actions` | `Array<{ label: string; onClick: () => void; icon?: string }>` | No | List of action items; each has a label, click handler, and optional icon URL |
|
|
25
27
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</span>
|
|
48
|
-
</button>
|
|
49
|
-
</li>
|
|
50
|
-
))}
|
|
51
|
-
</ul>
|
|
52
|
-
</>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
```
|
|
28
|
+
## Implementation Structure
|
|
29
|
+
|
|
30
|
+
### Module Setup
|
|
31
|
+
|
|
32
|
+
The component requires companion styles (for action list and button styling) co-located following the project's styling convention. It does NOT import any Pega SDK modules — all data arrives via direct inputs.
|
|
33
|
+
|
|
34
|
+
The component is named `WssQuickCreate` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
|
|
35
|
+
|
|
36
|
+
### Component Logic
|
|
37
|
+
|
|
38
|
+
The component receives `heading` and `actions` as inputs, then renders:
|
|
39
|
+
|
|
40
|
+
1. **Heading** — an `<h1>` element with `id="quick-links-heading"` and class `quick-links-heading`, containing the `heading` text.
|
|
41
|
+
2. **Action list** — a `<ul>` with `id="quick-links"` and class `quick-link-ul-list`.
|
|
42
|
+
3. **Action items** — if `actions` is provided, iterate over the array rendering one `<li>` per action:
|
|
43
|
+
- The `<li>` has the `quickLinkList` style class (styled card appearance with border, rounded corners, and themed background color).
|
|
44
|
+
- Inside each `<li>`, render a `<button>` with `type="button"`, class `quick-link-button`, and the action's `onClick` handler.
|
|
45
|
+
- Button content is a `<span>` with class `quick-link-button-span` (flex column layout) containing:
|
|
46
|
+
- If `action.icon` is provided: an `<img>` with class `quick-link-icon` and `src` set to the icon URL.
|
|
47
|
+
- A `<span>` containing `action.label`.
|
|
48
|
+
4. If `actions` is not provided or is empty, render only the heading with an empty list.
|
|
56
49
|
|
|
57
50
|
## Behavioral Contract
|
|
58
51
|
|
|
@@ -68,7 +61,7 @@ export default function WssQuickCreate({ heading, actions }: WssQuickCreateProps
|
|
|
68
61
|
|
|
69
62
|
## Visual Specifications
|
|
70
63
|
|
|
71
|
-
Derived from
|
|
64
|
+
Derived from the component's companion styles:
|
|
72
65
|
|
|
73
66
|
### Section Heading
|
|
74
67
|
|
|
@@ -150,19 +143,10 @@ Derived from `WssQuickCreate.css` and component makeStyles:
|
|
|
150
143
|
|
|
151
144
|
**UI control type:** Responsive grid of action cards / quick-launch buttons.
|
|
152
145
|
|
|
153
|
-
Listed design systems are examples only.
|
|
154
|
-
|
|
155
|
-
| Design System | Recommended Component |
|
|
156
|
-
| ------------------ | ----------------------------------------------------------------------- |
|
|
157
|
-
| Default (CSS only) | CSS grid `<ul>` + `<button>` cards with flex icon/label layout |
|
|
158
|
-
| MUI | `<Button>` inside Grid items; use `makeStyles` or `sx` for card styling |
|
|
159
|
-
| Ant Design | `<List>` with `<Card>` items or `<Button>` blocks inside a CSS grid |
|
|
160
|
-
| Chakra UI | `<SimpleGrid>` with `<Button>` children; `flexDir='column'` |
|
|
161
|
-
| Shadcn/ui | Grid of custom `<Button variant='outline'>` cards |
|
|
162
|
-
|
|
163
146
|
When implementing in a specific design system, map the following:
|
|
164
147
|
|
|
165
|
-
- Card border/background →
|
|
166
|
-
- Button
|
|
167
|
-
- Icon + label stacked layout →
|
|
168
|
-
- Responsive grid →
|
|
148
|
+
- **Card border/background** → use the DS's card or outlined button variant with the themed background and border colors
|
|
149
|
+
- **Button click** → standard click handler wired to `action.onClick`
|
|
150
|
+
- **Icon + label stacked layout** → use a flex column layout inside the button content area
|
|
151
|
+
- **Responsive grid** → use the DS's responsive grid component or CSS grid with `repeat(auto-fit, minmax(min(20ch, 100%), 1fr))`
|
|
152
|
+
- **Dark/light mode background** → use `var(--app-background-color)` in dark mode or `var(--link-button-color)` in light mode (or detect from the DS's theme mode)
|