@pega/sdk 0.0.4 → 0.0.5
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/dist/index.js +287 -1
- package/package.json +1 -1
- package/templates/angular-sdk-reference/package.json +12 -12
- package/templates/angular-sdk-reference/tsconfig.json +1 -1
- package/templates/react-native-sdk-reference/expo-env.d.ts +3 -0
- package/templates/react-sdk-reference/{.github/agents/implementation-expert.agent.md → .ai-common/agents/implementation-expert.md} +23 -26
- package/templates/react-sdk-reference/{.github/copilot-instructions.md → .ai-common/global/ai-agent-instructions.md} +7 -7
- package/templates/react-sdk-reference/{.github/instructions/component-map.instructions.md → .ai-common/instructions/component-map.md} +8 -1
- package/templates/react-sdk-reference/{.github/instructions/dse-component.instructions.md → .ai-common/instructions/dse-component.md} +1 -1
- package/templates/react-sdk-reference/{.github/instructions/field-component.instructions.md → .ai-common/instructions/field-component.md} +2 -1
- package/templates/react-sdk-reference/{.github/instructions/template-component.instructions.md → .ai-common/instructions/template-component.md} +1 -1
- package/templates/react-sdk-reference/{.github/instructions/widget-component.instructions.md → .ai-common/instructions/widget-component.md} +1 -1
- package/templates/react-sdk-reference/{.github/prompts/add-component.prompt.md → .ai-common/prompts/add-component.md} +45 -18
- package/templates/react-sdk-reference/{.cursor/rules → .ai-common}/prompts/component-manifest.json +8 -2
- package/templates/react-sdk-reference/{.github/prompts/generate-all-components.prompt.md → .ai-common/prompts/generate-all-components.md} +195 -78
- package/templates/react-sdk-reference/{.github/prompts/generate-dse-components.prompt.md → .ai-common/prompts/generate-dse-components.md} +28 -17
- package/templates/react-sdk-reference/{.github/prompts/generate-field-components.prompt.md → .ai-common/prompts/generate-field-components.md} +32 -16
- package/templates/react-sdk-reference/{.github/prompts/generate-template-components.prompt.md → .ai-common/prompts/generate-template-components.md} +76 -22
- package/templates/react-sdk-reference/{.github/prompts/generate-widget-components.prompt.md → .ai-common/prompts/generate-widget-components.md} +44 -30
- package/templates/react-sdk-reference/{.claude → .ai-common}/prompts/identify-components.md +4 -0
- package/templates/react-sdk-reference/{.cursor/rules/prompts/replace-design-system.mdrules → .ai-common/prompts/replace-design-system.md} +2 -3
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/AlertBanner.md +50 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/Banner.md +44 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/CaseSummaryFields.md +54 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/DetailsFields.md +49 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/FieldGroup.md +44 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/FieldGroupList.md +43 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/FieldValueList.md +46 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/design-system-extension-skills/Operator.md +67 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/Pulse.md +20 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/RichTextEditor.md +58 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension-skills/WssQuickCreate.md +31 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/design-system-extension.md +1 -1
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-components.md +18 -1
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +298 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/CancelAlert.md +132 -3
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +358 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +230 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +221 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +213 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Decimal.md +112 -13
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Dropdown.md +127 -1
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Email.md +68 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Group.md +51 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Integer.md +81 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/Location.md +105 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Multiselect.md +70 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/ObjectReference.md +74 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Percentage.md +84 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Phone.md +81 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/RadioButtons.md +93 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/RichText.md +85 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/ScalarList.md +54 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/SelectableCard.md +55 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/SemanticLink.md +64 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/TextArea.md +66 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/TextContent.md +28 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/TextInput.md +67 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/Time.md +67 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/field-skills/URL.md +59 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/field-skills/UserReference.md +90 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-components.md +83 -52
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/AdvancedSearch.md +77 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +273 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/BannerPage.md +39 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/CaseSummary.md +79 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +399 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +282 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/Confirmation.md +89 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DataReference.md +50 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DefaultForm.md +117 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DefaultPage.md +49 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/Details.md +59 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/DetailsSubTabs.md +60 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DetailsThreeColumn.md +12 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/DetailsTwoColumn.md +12 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/DynamicTabs.md +67 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/FieldGroupTemplate.md +119 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/HierarchicalForm.md +45 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/InlineDashboard.md +41 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/InlineDashboardPage.md +56 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/ListPage.md +18 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +419 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/MultiReferenceReadOnly.md +40 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/NarrowWide.md +66 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/OneColumn.md +34 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/PromotedFilters.md +92 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/SelfServiceCaseView.md +56 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/SimpleTable.md +59 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/SingleReferenceReadOnly.md +52 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/template-skills/SubTabs.md +47 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/TwoColumn.md +49 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/WssNavBar.md +71 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-components.md +1 -1
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/AppAnnouncement.md +38 -1
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/Attachment.md +58 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/CaseHistory.md +63 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/widget-skills/FileUtility.md +81 -14
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/Followers.md +20 -0
- package/templates/react-sdk-reference/{.github → .ai-common}/skills/widget-skills/QuickCreate.md +48 -0
- package/templates/react-sdk-reference/{.claude → .ai-common}/skills/widget-skills/SummaryItem.md +66 -0
- package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +492 -0
- package/templates/react-sdk-reference/package.minimal.json +29 -0
- package/templates/react-sdk-reference/src/AppProviders.tsx +17 -0
- package/templates/react-sdk-reference/src/MashupApp.tsx +8 -19
- package/templates/react-sdk-reference/src/PortalApp.tsx +6 -17
- package/templates/react-sdk-reference/.claude/instructions/component-map.md +0 -38
- package/templates/react-sdk-reference/.claude/instructions/dse-component.md +0 -75
- package/templates/react-sdk-reference/.claude/instructions/field-component.md +0 -75
- package/templates/react-sdk-reference/.claude/instructions/template-component.md +0 -93
- package/templates/react-sdk-reference/.claude/instructions/widget-component.md +0 -88
- package/templates/react-sdk-reference/.claude/prompts/add-component.md +0 -152
- package/templates/react-sdk-reference/.claude/prompts/component-manifest.json +0 -193
- package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +0 -158
- package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +0 -140
- package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +0 -153
- package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +0 -165
- package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +0 -138
- package/templates/react-sdk-reference/.claude/prompts/replace-design-system.md +0 -519
- package/templates/react-sdk-reference/.claude/skills/component-contracts.md +0 -140
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +0 -137
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +0 -118
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +0 -85
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +0 -232
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/WssQuickCreate.md +0 -137
- package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +0 -291
- package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +0 -113
- package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +0 -175
- package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +0 -101
- package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +0 -88
- package/templates/react-sdk-reference/.claude/skills/field-skills/Multiselect.md +0 -188
- package/templates/react-sdk-reference/.claude/skills/field-skills/ObjectReference.md +0 -173
- package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +0 -93
- package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +0 -129
- package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +0 -167
- package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +0 -149
- package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +0 -134
- package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +0 -231
- package/templates/react-sdk-reference/.claude/skills/field-skills/SemanticLink.md +0 -155
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +0 -107
- package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +0 -89
- package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +0 -86
- package/templates/react-sdk-reference/.claude/skills/template-components.md +0 -321
- package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +0 -150
- package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +0 -124
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +0 -106
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +0 -137
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +0 -131
- package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +0 -109
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +0 -97
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +0 -80
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListPage.md +0 -70
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +0 -142
- package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +0 -114
- package/templates/react-sdk-reference/.claude/skills/template-skills/SimpleTable.md +0 -131
- package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +0 -108
- package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +0 -82
- package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +0 -206
- package/templates/react-sdk-reference/.claude/skills/widget-skills/QuickCreate.md +0 -118
- package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +0 -198
- package/templates/react-sdk-reference/.cursor/rules/component-map.mdrules +0 -41
- package/templates/react-sdk-reference/.cursor/rules/dse-component.mdrules +0 -78
- package/templates/react-sdk-reference/.cursor/rules/field-component.mdrules +0 -74
- package/templates/react-sdk-reference/.cursor/rules/pega-sdk.mdrules +0 -247
- package/templates/react-sdk-reference/.cursor/rules/prompts/add-component.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-all-components.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-dse-components.mdrules +0 -131
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-field-components.mdrules +0 -144
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-template-components.mdrules +0 -156
- package/templates/react-sdk-reference/.cursor/rules/prompts/generate-widget-components.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/prompts/identify-components.mdrules +0 -110
- package/templates/react-sdk-reference/.cursor/rules/skills/component-contracts.mdrules +0 -145
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/AlertBanner.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Banner.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/CaseSummaryFields.mdrules +0 -159
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/DetailsFields.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroup.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroupList.mdrules +0 -116
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldValueList.mdrules +0 -120
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Operator.mdrules +0 -154
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Pulse.mdrules +0 -88
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/RichTextEditor.mdrules +0 -211
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/WssQuickCreate.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension.mdrules +0 -294
- package/templates/react-sdk-reference/.cursor/rules/skills/field-components.mdrules +0 -299
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/AutoComplete.mdrules +0 -117
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/CancelAlert.mdrules +0 -208
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Checkbox.mdrules +0 -163
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Currency.mdrules +0 -111
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Date.mdrules +0 -104
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/DateTime.mdrules +0 -108
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Decimal.mdrules +0 -103
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Dropdown.mdrules +0 -119
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Email.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Group.mdrules +0 -95
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Integer.mdrules +0 -92
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Location.mdrules +0 -141
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Multiselect.mdrules +0 -169
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ObjectReference.mdrules +0 -169
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Percentage.mdrules +0 -97
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Phone.mdrules +0 -115
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RadioButtons.mdrules +0 -151
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RichText.mdrules +0 -143
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ScalarList.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SelectableCard.mdrules +0 -221
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SemanticLink.mdrules +0 -153
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextArea.mdrules +0 -101
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextContent.mdrules +0 -106
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextInput.mdrules +0 -109
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Time.mdrules +0 -93
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/URL.mdrules +0 -90
- package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/UserReference.mdrules +0 -185
- package/templates/react-sdk-reference/.cursor/rules/skills/run-and-verify.mdrules +0 -73
- package/templates/react-sdk-reference/.cursor/rules/skills/template-components.mdrules +0 -327
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AdvancedSearch.mdrules +0 -149
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AppShell.mdrules +0 -127
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/BannerPage.mdrules +0 -88
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseSummary.mdrules +0 -105
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseView.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseViewActionsMenu.mdrules +0 -131
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Confirmation.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DataReference.mdrules +0 -125
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultForm.mdrules +0 -107
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultPage.mdrules +0 -115
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Details.mdrules +0 -93
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsSubTabs.mdrules +0 -100
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsThreeColumn.mdrules +0 -83
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsTwoColumn.mdrules +0 -83
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DynamicTabs.mdrules +0 -106
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/FieldGroupTemplate.mdrules +0 -114
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/HierarchicalForm.mdrules +0 -118
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboard.mdrules +0 -109
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboardPage.mdrules +0 -90
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListPage.mdrules +0 -73
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListView.mdrules +0 -144
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/MultiReferenceReadOnly.mdrules +0 -85
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/NarrowWide.mdrules +0 -146
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/OneColumn.mdrules +0 -114
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/PromotedFilters.mdrules +0 -129
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SelfServiceCaseView.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SimpleTable.mdrules +0 -132
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SingleReferenceReadOnly.mdrules +0 -108
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SubTabs.mdrules +0 -84
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/TwoColumn.mdrules +0 -136
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WideNarrow.mdrules +0 -155
- package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WssNavBar.mdrules +0 -140
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-components.mdrules +0 -276
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/AppAnnouncement.mdrules +0 -87
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Attachment.mdrules +0 -151
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/CaseHistory.mdrules +0 -112
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/FileUtility.mdrules +0 -205
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Followers.mdrules +0 -104
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/QuickCreate.mdrules +0 -119
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/SummaryItem.mdrules +0 -172
- package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/ToDo.mdrules +0 -195
- package/templates/react-sdk-reference/.cursor/rules/template-component.mdrules +0 -95
- package/templates/react-sdk-reference/.cursor/rules/widget-component.mdrules +0 -90
- package/templates/react-sdk-reference/.github/prompts/component-manifest.json +0 -193
- package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +0 -110
- package/templates/react-sdk-reference/.github/prompts/replace-design-system.prompt.md +0 -524
- package/templates/react-sdk-reference/.github/skills/component-contracts.md +0 -140
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +0 -152
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +0 -159
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +0 -148
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +0 -113
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +0 -155
- package/templates/react-sdk-reference/.github/skills/field-components.md +0 -295
- package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +0 -113
- package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +0 -211
- package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +0 -175
- package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +0 -109
- package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +0 -101
- package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +0 -106
- package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +0 -99
- package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +0 -134
- package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +0 -109
- package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +0 -96
- package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +0 -145
- package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +0 -98
- package/templates/react-sdk-reference/.github/skills/field-skills/TextContent.md +0 -117
- package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +0 -203
- package/templates/react-sdk-reference/.github/skills/run-and-verify.md +0 -70
- package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +0 -124
- package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +0 -86
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +0 -137
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +0 -131
- package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +0 -124
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +0 -104
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultPage.md +0 -112
- package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +0 -90
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +0 -80
- package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +0 -106
- package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +0 -112
- package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +0 -116
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +0 -108
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +0 -82
- package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +0 -142
- package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +0 -143
- package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +0 -130
- package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +0 -142
- package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +0 -133
- package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +0 -152
- package/templates/react-sdk-reference/.github/skills/template-skills/WssNavBar.md +0 -139
- package/templates/react-sdk-reference/.github/skills/widget-components.md +0 -260
- package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +0 -84
- package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +0 -151
- package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +0 -110
- package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +0 -103
- package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +0 -169
- package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +0 -198
- package/templates/react-sdk-reference/AGENTS.md +0 -246
- /package/templates/react-sdk-reference/{.claude → .ai-common}/skills/run-and-verify.md +0 -0
- /package/templates/react-sdk-reference/{.claude → .ai-common}/skills/template-skills/WideNarrow.md +0 -0
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Skill: SubTabs
|
|
2
|
-
|
|
3
|
-
Sub-tabs navigation template. Renders a tab container for case view sections using shared tab utilities with deferred content loading.
|
|
4
|
-
|
|
5
|
-
> **Prerequisite skill:** [`template-components.md`](../template-components.md) — covers architecture, child rendering patterns, and registration conventions common to ALL template components.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Component Purpose
|
|
10
|
-
|
|
11
|
-
Renders a horizontal tab bar for navigating between case view sections. Uses shared `tabUtils` for tab state management (visible tabs, transient tabs, tab click). Tab content is deferred — only the active tab loads content. No section heading.
|
|
12
|
-
|
|
13
|
-
## Pega Metadata
|
|
14
|
-
|
|
15
|
-
- **Registration key:** `SubTabs` (in `component-map.ts`)
|
|
16
|
-
- **Category:** Navigation template
|
|
17
|
-
- **Extends:** `PConnProps`
|
|
18
|
-
|
|
19
|
-
## Props
|
|
20
|
-
|
|
21
|
-
| Prop | Type | Required | Description |
|
|
22
|
-
| ------------- | ------------- | -------- | --------------------------------------------------- |
|
|
23
|
-
| `children` | `ReactNode[]` | Yes | `children[0]` is the deferred-loaded tabs container |
|
|
24
|
-
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
25
|
-
|
|
26
|
-
## Behavioral Contract
|
|
27
|
-
|
|
28
|
-
1. **Extract deferred tabs:** `deferLoadedTabs = Children.toArray(children)[0]`.
|
|
29
|
-
2. **State:** `currentTabId` (string, default `'0'`), `tabItems` (array).
|
|
30
|
-
3. **Compute visible tabs:** `getVisibleTabs(deferLoadedTabs, 'tabsSubs')` in `useEffect([deferLoadedTabs])` → `availableTabs`.
|
|
31
|
-
4. **Transient tabs:** `useEffect([currentTabId])` → `setTabItems(getTransientTabs(availableTabs, currentTabId, tabItems))`.
|
|
32
|
-
5. **Tab click:** `tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems)` from `tabUtils`.
|
|
33
|
-
6. **Render:**
|
|
34
|
-
- `<TabContext value={currentTabId}>`
|
|
35
|
-
- `<Tabs onChange={handleTabClick} value={currentTabId}>` — one `<Tab>` per `tabItems`
|
|
36
|
-
- One `<TabPanel>` per `tabItems` with `tab.content || ''`
|
|
37
|
-
7. No section heading (unlike `DetailsSubTabs`).
|
|
38
|
-
|
|
39
|
-
> **Difference from `DetailsSubTabs`:** SubTabs has no `label`/`showLabel` props and no `<h3>` heading. Uses `'tabsSubs'` identifier for `getVisibleTabs` (vs `'detailsSubTabs'`).
|
|
40
|
-
|
|
41
|
-
## Visual Specifications
|
|
42
|
-
|
|
43
|
-
Identical to `DetailsSubTabs` except no heading above the tab bar.
|
|
44
|
-
|
|
45
|
-
**CSS-only implementation notes:**
|
|
46
|
-
|
|
47
|
-
- Tab bar: `display: flex; border-bottom: 2px solid var(--divider)`.
|
|
48
|
-
- Each tab: `padding: 8px 16px; cursor: pointer; border-bottom: 2px solid transparent`.
|
|
49
|
-
- Active tab: `border-bottom-color: var(--app-primary-color); font-weight: 600`.
|
|
50
|
-
- Tab panel: `padding: 16px 0`.
|
|
51
|
-
|
|
52
|
-
## Edge Cases & Special Logic
|
|
53
|
-
|
|
54
|
-
See `DetailsSubTabs.md` for shared edge cases. Additional:
|
|
55
|
-
|
|
56
|
-
- `tabUtils` identifier string `'tabsSubs'` must match exactly — it is used internally by `getVisibleTabs` for scoping.
|
|
57
|
-
|
|
58
|
-
## Dependencies
|
|
59
|
-
|
|
60
|
-
- `getTransientTabs`, `getVisibleTabs`, `tabClick` from `./tabUtils`
|
|
61
|
-
- `TabContext`, `TabPanel` from `@mui/lab`
|
|
62
|
-
- `Tab`, `Tabs` from `@mui/material`
|
|
63
|
-
|
|
64
|
-
## Design System Mapping
|
|
65
|
-
|
|
66
|
-
**UI control type:** Tab navigation container — no heading, deferred content loading.
|
|
67
|
-
|
|
68
|
-
Listed design systems are examples only.
|
|
69
|
-
|
|
70
|
-
| Design System | Recommended Component |
|
|
71
|
-
| ------------------ | -------------------------------------------------------- |
|
|
72
|
-
| Default (CSS only) | Custom tab bar with CSS underline indicator |
|
|
73
|
-
| MUI | `<TabContext>` + `<Tabs>` + `<TabPanel>` from `@mui/lab` |
|
|
74
|
-
| Ant Design | `<Tabs>` with `items` array |
|
|
75
|
-
| Chakra UI | `<Tabs>` + `<TabList>` + `<TabPanels>` |
|
|
76
|
-
| Shadcn/ui | `<Tabs>` + `<TabsList>` + `<TabsContent>` |
|
|
77
|
-
|
|
78
|
-
When implementing in a specific design system:
|
|
79
|
-
|
|
80
|
-
- Use `getVisibleTabs(tabs, 'tabsSubs')` — the identifier string must be `'tabsSubs'`
|
|
81
|
-
- No heading above the tab bar (unlike `DetailsSubTabs`)
|
|
82
|
-
- Deferred loading: content populates lazily via `getTransientTabs`
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
# Skill: FileUtility
|
|
2
|
-
|
|
3
|
-
File and URL management utility widget. Displays case attachments and links, supports upload/download/delete, and provides modals for adding new files or URLs. Also covers `ActionButtonsForFileUtil` sub-component.
|
|
4
|
-
|
|
5
|
-
> **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Component Purpose
|
|
10
|
-
|
|
11
|
-
The primary attachments management panel in the case utilities column. Shows up to 3 attachments/links in the main view with a "View all" option that opens a modal with the full list. Users can upload files, attach URLs, download, and delete items. Attachment state is kept fresh via debounced pub-sub subscriptions.
|
|
12
|
-
|
|
13
|
-
## Pega Metadata
|
|
14
|
-
|
|
15
|
-
- **Registration key:** `FileUtility` (in `component-map.ts`)
|
|
16
|
-
- **Category:** Widget — file management
|
|
17
|
-
- **Extends:** `PConnProps`
|
|
18
|
-
|
|
19
|
-
## Props
|
|
20
|
-
|
|
21
|
-
| Prop | Type | Required | Description |
|
|
22
|
-
| ------------- | ---------- | -------- | --------------------------------------------------------------------------------- |
|
|
23
|
-
| `caseId` | `string` | No | Optional case ID override. If absent, resolved from `pConn.getCaseInfo().getID()` |
|
|
24
|
-
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
25
|
-
|
|
26
|
-
## Behavioral Contract
|
|
27
|
-
|
|
28
|
-
### Attachment Fetch
|
|
29
|
-
|
|
30
|
-
On mount and on attachment change events:
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
PCore.getAttachmentUtils().getCaseAttachments(caseKey, context)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Returns array of attachment/link objects. Store in `attachments` state.
|
|
37
|
-
|
|
38
|
-
Debounced auto-refresh: on `CASE_ATTACHMENTS_UPDATED` pub-sub event, wait 1000ms (debounced) then re-fetch. This prevents rapid re-fetches when multiple files are uploaded simultaneously.
|
|
39
|
-
|
|
40
|
-
### Main View — Top 3 Display
|
|
41
|
-
|
|
42
|
-
Show only the first 3 items from `attachments`. If `attachments.length > 3`, show a `"View all (N)"` button that opens the full-list modal.
|
|
43
|
-
|
|
44
|
-
### SummaryList Integration
|
|
45
|
-
|
|
46
|
-
Map each attachment/link to a `SummaryItem`-compatible object:
|
|
47
|
-
|
|
48
|
-
```typescript
|
|
49
|
-
{
|
|
50
|
-
id: attachment.ID,
|
|
51
|
-
visual: { icon: getFileIcon(attachment.mimeType) },
|
|
52
|
-
primary: {
|
|
53
|
-
type: attachment.category === 'FILE' ? 'FILE' : 'URL',
|
|
54
|
-
name: attachment.name,
|
|
55
|
-
click: () => handleDownloadOrOpen(attachment)
|
|
56
|
-
},
|
|
57
|
-
secondary: { text: attachment.createdBy + ' · ' + formatDate(attachment.createTime) }
|
|
58
|
-
actions: [
|
|
59
|
-
{ id: 'delete', text: 'Delete', icon: 'trash', onClick: () => handleDelete(attachment.ID) }
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Pass to `<SummaryList arItems$={summaryItems} />`.
|
|
65
|
-
|
|
66
|
-
### File Upload
|
|
67
|
-
|
|
68
|
-
1. User clicks "Add file" from the `<Menu>`.
|
|
69
|
-
2. Opens an add-file modal (dialog).
|
|
70
|
-
3. User selects a file via `<input type='file'>`.
|
|
71
|
-
4. On confirm: call `PCore.getAttachmentUtils().uploadAttachment(file, onProgress, onError, context)`.
|
|
72
|
-
5. On success: call `PCore.getAttachmentUtils().linkAttachmentsToCase(caseKey, [newAttachment], context)`.
|
|
73
|
-
6. Refresh attachment list.
|
|
74
|
-
|
|
75
|
-
### URL Attachment
|
|
76
|
-
|
|
77
|
-
1. User clicks "Add link" from the `<Menu>`.
|
|
78
|
-
2. Opens add-link modal with two fields: `Title` (required) and `URL` (required).
|
|
79
|
-
3. The "Attach" button is enabled only when both `title` and `url` are non-empty.
|
|
80
|
-
4. On confirm: call `PCore.getAttachmentUtils().linkAttachmentsToCase(caseKey, [{ name: title, url, category: 'URL' }], context)`.
|
|
81
|
-
5. Refresh attachment list.
|
|
82
|
-
|
|
83
|
-
### Download / Open
|
|
84
|
-
|
|
85
|
-
- **FILE type:** Call `PCore.getAttachmentUtils().downloadAttachment(attachmentID, context)` then trigger browser download via `downloadjs`.
|
|
86
|
-
- **URL type:** Open `attachment.url` in a new browser tab (`window.open(url, '_blank')`).
|
|
87
|
-
|
|
88
|
-
### Delete
|
|
89
|
-
|
|
90
|
-
Call `PCore.getAttachmentUtils().deleteAttachment(attachmentID, context)`. Refresh attachment list after success.
|
|
91
|
-
|
|
92
|
-
### Actions Menu
|
|
93
|
-
|
|
94
|
-
Render a `<MoreVertIcon>` `<IconButton>` that opens a `<Menu>` with:
|
|
95
|
-
|
|
96
|
-
- `"Add file"` — opens add-file modal
|
|
97
|
-
- `"Add link"` — opens add-link modal
|
|
98
|
-
|
|
99
|
-
## Visual Specifications
|
|
100
|
-
|
|
101
|
-
### Main Card
|
|
102
|
-
|
|
103
|
-
| Element | Description |
|
|
104
|
-
| ----------------- | -------------------------------------------- |
|
|
105
|
-
| Card header | `"Attachments"` (or localized) + count badge |
|
|
106
|
-
| Actions icon | `<MoreVertIcon>` button top-right |
|
|
107
|
-
| Attachment rows | Up to 3 `SummaryItem` cards |
|
|
108
|
-
| "View all" button | Text button, shown when > 3 attachments |
|
|
109
|
-
|
|
110
|
-
### "View all" Modal
|
|
111
|
-
|
|
112
|
-
| Element | Description |
|
|
113
|
-
| --------------- | -------------------------- |
|
|
114
|
-
| Modal header | `"All attachments (N)"` |
|
|
115
|
-
| Attachment rows | All items in `SummaryList` |
|
|
116
|
-
| Close button | `X` in modal header |
|
|
117
|
-
|
|
118
|
-
### Add File Modal
|
|
119
|
-
|
|
120
|
-
| Element | Description |
|
|
121
|
-
| -------------- | -------------------------------------------- |
|
|
122
|
-
| File picker | `<input type='file'>` |
|
|
123
|
-
| Progress bar | Per-file upload progress |
|
|
124
|
-
| Action buttons | `ActionButtonsForFileUtil` (Cancel + Attach) |
|
|
125
|
-
|
|
126
|
-
### Add Link Modal
|
|
127
|
-
|
|
128
|
-
| Element | Description |
|
|
129
|
-
| -------------- | -------------------------------------------- |
|
|
130
|
-
| Title field | `<TextField label='Title'>` — required |
|
|
131
|
-
| URL field | `<TextField label='URL'>` — required |
|
|
132
|
-
| Attach button | Enabled only when both fields are filled |
|
|
133
|
-
| Action buttons | `ActionButtonsForFileUtil` (Cancel + Attach) |
|
|
134
|
-
|
|
135
|
-
**CSS-only implementation notes:**
|
|
136
|
-
|
|
137
|
-
- Main card: standard card styles.
|
|
138
|
-
- Modal: `position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.2); min-width: 480px; padding: 1.5rem`.
|
|
139
|
-
- "View all" button: text style, `color: var(--app-primary-color); cursor: pointer`.
|
|
140
|
-
- Progress bar: `height: 4px; background: var(--app-primary-color); transition: width 0.3s`.
|
|
141
|
-
|
|
142
|
-
## Sub-Component: ActionButtonsForFileUtil
|
|
143
|
-
|
|
144
|
-
**Registration key:** `ActionButtonsForFileUtil`
|
|
145
|
-
|
|
146
|
-
A simple button row component used inside the FileUtility modals to render Cancel + primary action buttons.
|
|
147
|
-
|
|
148
|
-
### Props
|
|
149
|
-
|
|
150
|
-
| Prop | Type | Required | Description |
|
|
151
|
-
| -------------------- | ---------- | -------- | ------------------------------------------------------------ |
|
|
152
|
-
| `arMainButtons` | `any[]` | Yes | Primary button definitions `[{ actionID, name }]` |
|
|
153
|
-
| `arSecondaryButtons` | `any[]` | Yes | Secondary (cancel) button definitions `[{ actionID, name }]` |
|
|
154
|
-
| `primaryAction` | `function` | Yes | Callback invoked when the primary button is clicked |
|
|
155
|
-
| `secondaryAction` | `function` | Yes | Callback invoked when the secondary/cancel button is clicked |
|
|
156
|
-
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
157
|
-
|
|
158
|
-
### Layout
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
[Secondary buttons (left)] [Primary buttons (right)]
|
|
162
|
-
Cancel Attach
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
- Secondary buttons: outlined/text style.
|
|
166
|
-
- Primary buttons: contained/filled style with theme primary color.
|
|
167
|
-
- Render using `arSecondaryButtons.map(...)` and `arMainButtons.map(...)`.
|
|
168
|
-
|
|
169
|
-
## Edge Cases & Special Logic
|
|
170
|
-
|
|
171
|
-
- **Debounce (1000ms):** Prevents excessive re-fetches when multiple attachment events fire in quick succession.
|
|
172
|
-
- **Add link "Attach" button disabled state:** Title and URL validation must happen on every keystroke — use controlled inputs with `!title || !url` to derive disabled state.
|
|
173
|
-
- **`linkAttachmentsToCase`:** After upload, the file must be explicitly linked to the case. Uploading alone does not associate the file with the case.
|
|
174
|
-
- **Pub-sub cleanup:** Unsubscribe from `CASE_ATTACHMENTS_UPDATED` on unmount to prevent stale callbacks.
|
|
175
|
-
- **Error display:** Use `PCore.getMessageManager()` or inline error state in the modal — do not silently fail on upload/link errors.
|
|
176
|
-
|
|
177
|
-
## Dependencies
|
|
178
|
-
|
|
179
|
-
- `PCore.getAttachmentUtils()` — getCaseAttachments, uploadAttachment, downloadAttachment, deleteAttachment, linkAttachmentsToCase
|
|
180
|
-
- `PCore.getMessagingServiceManager()` — subscribe to attachment change events
|
|
181
|
-
- `PCore.getConstants()` — case info ID, summary refresh timing
|
|
182
|
-
- `getComponentFromRegistry('SummaryList')` — renders the attachment item list
|
|
183
|
-
- `getComponentFromRegistry('ActionButtonsForFileUtil')` — renders modal action buttons
|
|
184
|
-
- `downloadjs` — browser file download trigger
|
|
185
|
-
- MUI: `<Card>`, `<CardHeader>`, `<CardContent>`, `<IconButton>`, `<Menu>`, `<MenuItem>`, `<Button>`, `<TextField>`, `<Dialog>`, `<CircularProgress>`
|
|
186
|
-
- MUI Icons: `<MoreVertIcon>`
|
|
187
|
-
|
|
188
|
-
## Design System Mapping
|
|
189
|
-
|
|
190
|
-
**UI control type:** File management widget — attachment list with upload/download/delete and add modals.
|
|
191
|
-
|
|
192
|
-
Listed design systems are examples only.
|
|
193
|
-
|
|
194
|
-
| Design System | Card | Action Menu | Modal | Progress |
|
|
195
|
-
| ------------------ | ------------ | ------------------------------------ | ---------- | ------------------------------------------ |
|
|
196
|
-
| Default (CSS only) | `<div>` card | `<button>` + custom dropdown | `<dialog>` | CSS progress bar |
|
|
197
|
-
| MUI | `<Card>` | `<IconButton>` + `<Menu>/<MenuItem>` | `<Dialog>` | `<CircularProgress>` or `<LinearProgress>` |
|
|
198
|
-
| Ant Design | `<Card>` | `<Dropdown menu={{ items }}>` | `<Modal>` | `<Progress>` |
|
|
199
|
-
| Chakra UI | `<Card>` | `<Menu>/<MenuButton>/<MenuList>` | `<Modal>` | `<Progress>` |
|
|
200
|
-
| Shadcn/ui | `<Card>` | `<DropdownMenu>` | `<Dialog>` | Custom progress bar |
|
|
201
|
-
|
|
202
|
-
When implementing in a specific design system:
|
|
203
|
-
|
|
204
|
-
- Debounced refresh (1000ms) after pub-sub attachment events is required — prevents excessive API calls
|
|
205
|
-
- `linkAttachmentsToCase` must be called after upload — uploading alone does not attach to the case
|
|
206
|
-
- `ActionButtonsForFileUtil` receives button definition arrays — render them generically from `arMainButtons`/`arSecondaryButtons`
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# Skill: QuickCreate
|
|
2
|
-
|
|
3
|
-
Quick case creation widget. Renders a set of buttons — one per available case type — allowing users to create cases directly from the widget without navigating to a separate form.
|
|
4
|
-
|
|
5
|
-
> **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Component Purpose
|
|
10
|
-
|
|
11
|
-
Provides a shortcut panel for creating new cases. Case types are sourced from the Pega environment info (or a fallback portal config for Launchpad). The list can be filtered by class name. Each button triggers case creation via `pConn.getActionsApi().createWork()`. Rendering is delegated to the `WssQuickCreate` design system extension component.
|
|
12
|
-
|
|
13
|
-
## Pega Metadata
|
|
14
|
-
|
|
15
|
-
- **Registration key:** `QuickCreate` (in `component-map.ts`)
|
|
16
|
-
- **Category:** Widget — action / case creation
|
|
17
|
-
- **Extends:** `PConnProps`
|
|
18
|
-
|
|
19
|
-
## Props
|
|
20
|
-
|
|
21
|
-
| Prop | Type | Required | Description |
|
|
22
|
-
| --------------- | ---------- | -------- | --------------------------------------------------------------------------- |
|
|
23
|
-
| `heading` | `string` | Yes | Widget title (e.g., `"Create"`) |
|
|
24
|
-
| `showCaseIcons` | `boolean` | No | Whether to show case type icons alongside labels. Default `false` |
|
|
25
|
-
| `classFilter` | `any[]` | No | Array of class names to filter available case types. Empty array = show all |
|
|
26
|
-
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
27
|
-
|
|
28
|
-
## Behavioral Contract
|
|
29
|
-
|
|
30
|
-
### Case Types Resolution
|
|
31
|
-
|
|
32
|
-
1. Read `PCore.getEnvironmentInfo().environmentInfoObject.pyCaseTypeList` — the primary source.
|
|
33
|
-
2. If the list is empty or unavailable (e.g., Launchpad mode), fall back to the app portal config:
|
|
34
|
-
```
|
|
35
|
-
PCore.getConfig().getApplicationName() // or portal config equivalent
|
|
36
|
-
```
|
|
37
|
-
3. Apply `classFilter`: if `classFilter` is non-empty, retain only case types whose class name is included in the array.
|
|
38
|
-
|
|
39
|
-
### Case Type Object Mapping
|
|
40
|
-
|
|
41
|
-
For each case type, build:
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
{
|
|
45
|
-
classname: caseType.pyClassName,
|
|
46
|
-
label: caseType.pyLabel,
|
|
47
|
-
onClick: () => pConn.getActionsApi().createWork(caseType.pyClassName, {
|
|
48
|
-
openCaseViewAfterCreate: true,
|
|
49
|
-
containerName: PCore.getConstants().APP.APP
|
|
50
|
-
}),
|
|
51
|
-
icon: showCaseIcons ? getIconURL(caseType.pyClassName) : undefined
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Rendering Delegation
|
|
56
|
-
|
|
57
|
-
Pass the mapped case type array to `WssQuickCreate` (retrieved via `getComponentFromRegistry('WssQuickCreate')`):
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
const WssQuickCreate = getComponentFromRegistry('WssQuickCreate');
|
|
61
|
-
return <WssQuickCreate heading={heading} caseTypes={caseTypeObjects} />;
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
This component handles all button rendering — `QuickCreate` is purely a data-preparation orchestrator.
|
|
65
|
-
|
|
66
|
-
## Visual Specifications
|
|
67
|
-
|
|
68
|
-
Visual rendering is owned by `WssQuickCreate` (a design system extension component). Typical layout:
|
|
69
|
-
|
|
70
|
-
| Element | Description |
|
|
71
|
-
| ----------------- | ------------------------------------------------- |
|
|
72
|
-
| Heading | Widget title at the top |
|
|
73
|
-
| Case type buttons | One button per case type; icon (optional) + label |
|
|
74
|
-
|
|
75
|
-
**CSS-only implementation notes (if implementing without `WssQuickCreate`):**
|
|
76
|
-
|
|
77
|
-
- Container: `display: flex; flex-direction: column; gap: 0.5rem`.
|
|
78
|
-
- Heading: `font-weight: 600; margin-bottom: 0.5rem`.
|
|
79
|
-
- Case type button: `display: flex; align-items: center; gap: 0.5rem; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; background: white`.
|
|
80
|
-
- Icon: `width: 20px; height: 20px; object-fit: contain`.
|
|
81
|
-
|
|
82
|
-
## Edge Cases & Special Logic
|
|
83
|
-
|
|
84
|
-
- `classFilter` is an empty array by default — empty array means **no filtering** (show all case types).
|
|
85
|
-
- If `pyCaseTypeList` is empty and the fallback also produces no results, render the widget with a `"No case types available"` message or hide the widget.
|
|
86
|
-
- `showCaseIcons` requires a valid icon URL — `getIconURL(classname)` returns `undefined` if no icon is configured; guard against rendering a broken `<img>`.
|
|
87
|
-
- `createWork` opens the case creation form in the primary container. If the user already has an unsaved case open, behavior depends on container configuration (may replace or open in a new tab).
|
|
88
|
-
|
|
89
|
-
## Dependencies
|
|
90
|
-
|
|
91
|
-
- `getComponentFromRegistry('WssQuickCreate')` — design system extension for case type button rendering
|
|
92
|
-
- `pConn.getActionsApi().createWork()` — triggers case creation
|
|
93
|
-
- `PCore.getEnvironmentInfo()` — primary source for available case types
|
|
94
|
-
- `PCore.getConstants().APP.APP` — app context constant
|
|
95
|
-
|
|
96
|
-
## Design System Mapping
|
|
97
|
-
|
|
98
|
-
**UI control type:** Quick-action panel with one button per available case type.
|
|
99
|
-
|
|
100
|
-
Listed design systems are examples only.
|
|
101
|
-
|
|
102
|
-
Rendering is delegated to `WssQuickCreate` — implement that DSE component for your design system. `QuickCreate` itself has no direct UI output beyond the delegation.
|
|
103
|
-
|
|
104
|
-
If implementing without `WssQuickCreate`:
|
|
105
|
-
|
|
106
|
-
| Design System | Button List |
|
|
107
|
-
| ------------------ | --------------------------------------------------------- |
|
|
108
|
-
| Default (CSS only) | `<button>` list with optional `<img>` icon |
|
|
109
|
-
| MUI | `<List>` + `<ListItemButton>` or `<Button>` stack |
|
|
110
|
-
| Ant Design | `<Space direction='vertical'>` + `<Button>` per case type |
|
|
111
|
-
| Chakra UI | `<VStack>` + `<Button>` per case type |
|
|
112
|
-
| Shadcn/ui | `<div>` stack + `<Button variant='outline'>` |
|
|
113
|
-
|
|
114
|
-
When implementing in a specific design system:
|
|
115
|
-
|
|
116
|
-
- `classFilter` empty array = show ALL case types (not zero) — this is a common gotcha
|
|
117
|
-
- `createWork` must be called with the correct `containerName` constant (`APP.APP`)
|
|
118
|
-
- `showCaseIcons` is optional — only fetch/render icons when this prop is `true`
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
# Skill: ToDo
|
|
2
|
-
|
|
3
|
-
Assignment worklist widget. Displays the current user's pending assignments with expand/collapse, click-to-open, priority indicators, badge counts, responsive layout, and snackbar error notifications.
|
|
4
|
-
|
|
5
|
-
> **Prerequisite skill:** [`widget-components.md`](../widget-components.md) — covers architecture, props interface, data-fetching patterns, and registration conventions common to ALL widget components.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Component Purpose
|
|
10
|
-
|
|
11
|
-
Renders a compact to-do / worklist panel showing the user's pending assignments. Shows the top 3 items by default with a "Show more" / "Show less" toggle. Supports two modes: `worklist` (personal workbasket) and `todo` (case-level assignments). Clicking an item opens the assignment. A badge in the card header shows the total count.
|
|
12
|
-
|
|
13
|
-
## Pega Metadata
|
|
14
|
-
|
|
15
|
-
- **Registration key:** `Todo` (note: lowercase `o` in the key; file is `ToDo.tsx`)
|
|
16
|
-
- **Category:** Widget — assignment / action
|
|
17
|
-
- **Extends:** `PConnProps`
|
|
18
|
-
|
|
19
|
-
## Props
|
|
20
|
-
|
|
21
|
-
| Prop | Type | Required | Description |
|
|
22
|
-
| -------------- | ---------- | -------- | -------------------------------------------------------------------------------------------------- |
|
|
23
|
-
| `datasource` | `any` | No | Array of assignments passed directly (used in `todo` type). If provided, skips the data page fetch |
|
|
24
|
-
| `myWorkList` | `any` | No | Work list config object `{ datapage: string, fields: [...] }` — for `worklist` type |
|
|
25
|
-
| `caseInfoID` | `string` | No | Case ID to filter assignments (used in `todo` type) |
|
|
26
|
-
| `headerText` | `string` | No | Widget title. Default: `"To do"` |
|
|
27
|
-
| `itemKey` | `string` | No | Field key (reserved, currently unused) |
|
|
28
|
-
| `showTodoList` | `boolean` | No | Whether to show the assignment list. Default `true` |
|
|
29
|
-
| `type` | `string` | No | `'worklist'` (personal work) or `'todo'` (case-level). Default `'worklist'` |
|
|
30
|
-
| `context` | `string` | No | Context name for API calls. Falls back to `pConn.getContextName()` |
|
|
31
|
-
| `isConfirm` | `boolean` | No | Confirmation mode — adjusts rendering for post-submit confirmation view |
|
|
32
|
-
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
33
|
-
|
|
34
|
-
## Behavioral Contract
|
|
35
|
-
|
|
36
|
-
### Data Source Resolution
|
|
37
|
-
|
|
38
|
-
**`type === 'todo'` (case-level):**
|
|
39
|
-
|
|
40
|
-
- Use `datasource` prop directly (array of assignment objects).
|
|
41
|
-
- `caseInfoID` is used to scope the assignments.
|
|
42
|
-
|
|
43
|
-
**`type === 'worklist'` (personal work):**
|
|
44
|
-
|
|
45
|
-
- Fetch from `myWorkList.datapage` (e.g., `D_WorkList`) via:
|
|
46
|
-
```
|
|
47
|
-
PCore.getDataPageUtils().getDataAsync(
|
|
48
|
-
myWorkList.datapage,
|
|
49
|
-
context,
|
|
50
|
-
{},
|
|
51
|
-
{ pageNumber: 1, pageSize: 50 },
|
|
52
|
-
{ select: myWorkList.fields },
|
|
53
|
-
{ invalidateCache: true }
|
|
54
|
-
)
|
|
55
|
-
```
|
|
56
|
-
- Map the response to assignment objects.
|
|
57
|
-
|
|
58
|
-
### Top 3 + Show More
|
|
59
|
-
|
|
60
|
-
- `showCount` state: default `3`.
|
|
61
|
-
- Render only `assignments.slice(0, showCount)`.
|
|
62
|
-
- If `assignments.length > 3`:
|
|
63
|
-
- Show a `"Show more"` button → sets `showCount = assignments.length`.
|
|
64
|
-
- When expanded: show `"Show less"` button → sets `showCount = 3`.
|
|
65
|
-
|
|
66
|
-
### Badge Count
|
|
67
|
-
|
|
68
|
-
- Render a `<Badge badgeContent={assignments.length}>` on the card header or alongside the title.
|
|
69
|
-
- Badge shows the total count of assignments, not the currently-visible count.
|
|
70
|
-
|
|
71
|
-
### Open Assignment
|
|
72
|
-
|
|
73
|
-
On item click:
|
|
74
|
-
|
|
75
|
-
```typescript
|
|
76
|
-
pConn.getActionsApi().openAssignment(
|
|
77
|
-
assignment.pxRefObjectKey, // case key
|
|
78
|
-
assignment.pxRefObjectClass, // class name
|
|
79
|
-
{
|
|
80
|
-
containerName: pConn.getContainerName() || PCore.getConstants().APP.APP,
|
|
81
|
-
channelName: '',
|
|
82
|
-
},
|
|
83
|
-
);
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Assignment Item Rendering
|
|
87
|
-
|
|
88
|
-
For each assignment, show:
|
|
89
|
-
|
|
90
|
-
- **Avatar:** Circle with user initials (derived from `pConn.getContextObject?.().pyLabel` or operator name).
|
|
91
|
-
- **Name/title:** `assignment.pyLabel` — the assignment task name.
|
|
92
|
-
- **Status badge (worklist only):** `assignment.pyStatusWork` — colored status pill.
|
|
93
|
-
- **Priority/urgency:** `assignment.pyUrgencyWork` — urgency level indicator.
|
|
94
|
-
- **Child case indicator:** If `assignment.isChild === true`, show an indent or nested indicator.
|
|
95
|
-
- **Arrow icon:** Right-pointing arrow (`<ArrowForwardIosOutlinedIcon>`) indicating clickable.
|
|
96
|
-
|
|
97
|
-
### Responsive Layout
|
|
98
|
-
|
|
99
|
-
Use `useMediaQuery(theme.breakpoints.down('sm'))` (MUI) to detect mobile:
|
|
100
|
-
|
|
101
|
-
- **Desktop:** Show avatar, name, status, priority, and arrow in a horizontal row.
|
|
102
|
-
- **Mobile:** Stack or truncate elements for narrow display.
|
|
103
|
-
|
|
104
|
-
### `canPerform` Permission Check
|
|
105
|
-
|
|
106
|
-
If an assignment has `canPerform === false`, render it as non-clickable (greyed out, no onClick handler).
|
|
107
|
-
|
|
108
|
-
### Snackbar Error
|
|
109
|
-
|
|
110
|
-
- On `openAssignment` failure, catch the error and show a `<Snackbar>` with the error message.
|
|
111
|
-
- Auto-hide after 3000ms.
|
|
112
|
-
- `<IconButton>` (`<CloseIcon>`) to manually dismiss.
|
|
113
|
-
|
|
114
|
-
### Operator Avatar Initials
|
|
115
|
-
|
|
116
|
-
Extract initials from `PCore.getEnvironmentInfo().getOperatorName()`:
|
|
117
|
-
|
|
118
|
-
```typescript
|
|
119
|
-
const initials = operatorName
|
|
120
|
-
.split(' ')
|
|
121
|
-
.map((w) => w[0])
|
|
122
|
-
.join('')
|
|
123
|
-
.substring(0, 2)
|
|
124
|
-
.toUpperCase();
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Visual Specifications
|
|
128
|
-
|
|
129
|
-
### Card Layout
|
|
130
|
-
|
|
131
|
-
| Element | Description |
|
|
132
|
-
| --------------------- | --------------------------------------------------- |
|
|
133
|
-
| Card header | `headerText` (default `"To do"`) + badge with count |
|
|
134
|
-
| Assignment rows | Up to `showCount` items |
|
|
135
|
-
| Show more/less button | Below the last visible item |
|
|
136
|
-
|
|
137
|
-
### Assignment Row
|
|
138
|
-
|
|
139
|
-
| Element | Desktop | Mobile |
|
|
140
|
-
| ------------------ | --------- | --------------- |
|
|
141
|
-
| Avatar circle | Shown | Shown |
|
|
142
|
-
| Task name | Full text | Truncated |
|
|
143
|
-
| Status badge | Shown | Hidden or small |
|
|
144
|
-
| Priority indicator | Shown | Simplified |
|
|
145
|
-
| Arrow icon | Shown | Shown |
|
|
146
|
-
|
|
147
|
-
**CSS-only implementation notes:**
|
|
148
|
-
|
|
149
|
-
- Card: standard card layout.
|
|
150
|
-
- Assignment row: `display: flex; align-items: center; gap: 0.75rem; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--divider-color)`.
|
|
151
|
-
- Avatar: `width: 36px; height: 36px; border-radius: 50%; background: var(--avatar-bg); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600`.
|
|
152
|
-
- Status badge: `padding: 2px 6px; border-radius: 10px; font-size: 0.75rem; background: var(--status-bg-color)`.
|
|
153
|
-
- Priority: `font-size: 0.75rem; color: var(--secondary-text-color)`.
|
|
154
|
-
- Arrow: `margin-left: auto; color: var(--secondary-text-color)`.
|
|
155
|
-
- Non-clickable (canPerform=false): `opacity: 0.5; cursor: not-allowed`.
|
|
156
|
-
- Show more button: `width: 100%; text-align: center; padding: 8px; color: var(--app-primary-color)`.
|
|
157
|
-
|
|
158
|
-
## Edge Cases & Special Logic
|
|
159
|
-
|
|
160
|
-
- `type` defaults to `'worklist'` — handle the fallback gracefully if `type` is undefined.
|
|
161
|
-
- `datasource` prop vs fetch: if `datasource` is provided (non-empty), skip the data page fetch entirely.
|
|
162
|
-
- `myWorkList` may be undefined for `todo` type — do not attempt a fetch if it's missing.
|
|
163
|
-
- `showTodoList === false` — render only the card header (with badge count) and hide the list body.
|
|
164
|
-
- `isConfirm === true` — used in the Confirmation template context; may adjust layout to hide certain elements (e.g., hide status badge, show simpler view).
|
|
165
|
-
- Empty assignments — show a `"No tasks"` or `"You're all caught up!"` empty state message.
|
|
166
|
-
- `canPerform` check: if `false`, disable click and show cursor `not-allowed`. Do not open the assignment.
|
|
167
|
-
- Container name fallback: `pConn.getContainerName() || PCore.getConstants().APP.APP` — always provide a container name to `openAssignment`.
|
|
168
|
-
|
|
169
|
-
## Dependencies
|
|
170
|
-
|
|
171
|
-
- `PCore.getDataPageUtils().getDataAsync()` — worklist data page fetch
|
|
172
|
-
- `PCore.getEnvironmentInfo()` — operator name for avatar initials
|
|
173
|
-
- `PCore.getConstants()` — CASE_INFO, WORK_BASKET, TODO, APP constants
|
|
174
|
-
- `PCore.getLocaleUtils()` — assignment label localization
|
|
175
|
-
- `pConn.getActionsApi().openAssignment()` — opens the selected assignment
|
|
176
|
-
- MUI: `<Card>`, `<CardContent>`, `<CardHeader>`, `<Avatar>`, `<Typography>`, `<Badge>`, `<List>`, `<ListItem>`, `<ListItemText>`, `<Button>`, `<Snackbar>`, `<IconButton>`, `useMediaQuery`, `useTheme`
|
|
177
|
-
- MUI Icons: `<CloseIcon>`, `<ArrowForwardIosOutlinedIcon>`
|
|
178
|
-
|
|
179
|
-
## Design System Mapping
|
|
180
|
-
|
|
181
|
-
**UI control type:** Assignment worklist widget with expand/collapse, click-to-open, badge count, and error toast.
|
|
182
|
-
|
|
183
|
-
Listed design systems are examples only.
|
|
184
|
-
|
|
185
|
-
| Design System | Card | List | Badge | Snackbar |
|
|
186
|
-
| ------------------ | ------------------------- | ------------------- | ------------------- | ----------------------------- |
|
|
187
|
-
| Default (CSS only) | `<div>` card | `<ul>/<li>` | CSS counter badge | Custom toast overlay |
|
|
188
|
-
| MUI | `<Card>` + `<CardHeader>` | `<List>/<ListItem>` | `<Badge>` | `<Snackbar>/<Alert>` |
|
|
189
|
-
| Ant Design | `<Card>` | `<List>` | `<Badge count={N}>` | `message.error()` |
|
|
190
|
-
| Chakra UI | `<Card>` | `<VStack>` | `<Badge>` | `useToast()` |
|
|
191
|
-
| Shadcn/ui | `<Card>` | `<ul>/<li>` | Custom badge | `<Toaster>` + `toast.error()` |
|
|
192
|
-
|
|
193
|
-
When implementing in a specific design system:
|
|
194
|
-
|
|
195
|
-
- Show top 3 items by default — `showCount` state controls slice; "Show more/less" toggles between 3 and full length
|
|
196
|
-
- `canPerform === false` must make the row non-clickable — check this before calling `openAssignment`
|
|
197
|
-
- `type === 'worklist'` fetches from a data page; `type === 'todo'` uses the `datasource` prop — both paths must be implemented
|
|
198
|
-
- Operator initials for the avatar must be derived from `PCore.getEnvironmentInfo().getOperatorName()`
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
globs: ["**/component-map.ts"]
|
|
3
|
-
alwaysApply: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Component Map Rules
|
|
7
|
-
|
|
8
|
-
The component map (`src/components/component-map.ts`) is the registry that maps Pega component names to React implementations.
|
|
9
|
-
|
|
10
|
-
## Structure
|
|
11
|
-
|
|
12
|
-
```typescript
|
|
13
|
-
import { sdkComponents } from '@pega/sdk-react';
|
|
14
|
-
|
|
15
|
-
function getSampleComponentMap() {
|
|
16
|
-
return {
|
|
17
|
-
...sdkComponents, // NEVER remove this — provides infrastructure
|
|
18
|
-
// Your components below:
|
|
19
|
-
TextInput,
|
|
20
|
-
Dropdown,
|
|
21
|
-
// ...
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Rules
|
|
27
|
-
|
|
28
|
-
1. **NEVER remove `...sdkComponents`** — it provides View, Region, Reference, RootContainer, FlowContainer, ViewContainer, Assignment, AssignmentCard, ErrorBoundary, MultiStep, CaseSummary, and their aliases.
|
|
29
|
-
|
|
30
|
-
2. **Map keys must match Pega component names exactly** — these are resolved at runtime by the platform. The key is what Pega sends; the value is your React component.
|
|
31
|
-
|
|
32
|
-
3. **To replace a component**: change its import path to your new implementation. Do NOT rename the key.
|
|
33
|
-
|
|
34
|
-
4. **To add a new component**: add the import + add a new key-value entry.
|
|
35
|
-
|
|
36
|
-
5. **Key naming exceptions** (where key differs from variable name):
|
|
37
|
-
- `Date: DateField` (Date is reserved in JS)
|
|
38
|
-
- `URL: URLComponent` (URL is a global)
|
|
39
|
-
- `Todo: ToDo` (casing difference)
|
|
40
|
-
|
|
41
|
-
6. **Keep the `registerSampleComponents` function** — it registers all entries into the `ComponentRegistry` instance used by the PConnect bridge.
|