@pega/sdk 0.0.1
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/LICENSE +201 -0
- package/README.md +111 -0
- package/SECURITY.md +10 -0
- package/dist/index.js +753 -0
- package/package.json +41 -0
- package/templates/angular-sdk-reference/.github/AGENTS.md +23 -0
- package/templates/angular-sdk-reference/.github/copilot-instructions.md +40 -0
- package/templates/angular-sdk-reference/.github/skills/pega-sdk-component.md +48 -0
- package/templates/angular-sdk-reference/angular.json +34 -0
- package/templates/angular-sdk-reference/package.json +31 -0
- package/templates/angular-sdk-reference/sdk-config.json +26 -0
- package/templates/angular-sdk-reference/src/app/app.component.ts +54 -0
- package/templates/angular-sdk-reference/src/index.html +12 -0
- package/templates/angular-sdk-reference/src/main.ts +4 -0
- package/templates/angular-sdk-reference/src/styles.css +19 -0
- package/templates/angular-sdk-reference/tsconfig.json +32 -0
- package/templates/react-native-sdk-reference/.github/AGENTS.md +23 -0
- package/templates/react-native-sdk-reference/.github/copilot-instructions.md +40 -0
- package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +48 -0
- package/templates/react-native-sdk-reference/App.tsx +51 -0
- package/templates/react-native-sdk-reference/app.json +11 -0
- package/templates/react-native-sdk-reference/package.json +22 -0
- package/templates/react-native-sdk-reference/sdk-config.json +14 -0
- package/templates/react-native-sdk-reference/tsconfig.json +12 -0
- package/templates/react-sdk-reference/.github/copilot-instructions.md +185 -0
- package/templates/react-sdk-reference/.github/instructions/component-map.instructions.md +40 -0
- package/templates/react-sdk-reference/.github/instructions/dse-component.instructions.md +77 -0
- package/templates/react-sdk-reference/.github/instructions/field-component.instructions.md +73 -0
- package/templates/react-sdk-reference/.github/instructions/template-component.instructions.md +94 -0
- package/templates/react-sdk-reference/.github/instructions/widget-component.instructions.md +89 -0
- package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +21 -0
- package/templates/react-sdk-reference/.github/prompts/component-manifest.json +111 -0
- package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +110 -0
- package/templates/react-sdk-reference/.github/prompts/replace-all-fields.prompt.md +48 -0
- package/templates/react-sdk-reference/.github/prompts/replace-component.prompt.md +81 -0
- package/templates/react-sdk-reference/.github/prompts/replace-design-system.prompt.md +524 -0
- package/templates/react-sdk-reference/.github/prompts/replace-field.prompt.md +41 -0
- package/templates/react-sdk-reference/.github/prompts/swap-design-system.prompt.md +49 -0
- package/templates/react-sdk-reference/.github/skills/component-contracts.md +140 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/AlertBanner.md +135 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +149 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +154 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +144 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroup.md +131 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +111 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldValueList.md +115 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +149 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Pulse.md +83 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/RichTextEditor.md +206 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/WssQuickCreate.md +135 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension.md +249 -0
- package/templates/react-sdk-reference/.github/skills/field-components.md +262 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +112 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +203 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +158 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +106 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +99 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +103 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +98 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +114 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +107 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +90 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Integer.md +87 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +136 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Multiselect.md +164 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/ObjectReference.md +164 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Percentage.md +92 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Phone.md +110 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/RadioButtons.md +146 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/RichText.md +138 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/ScalarList.md +124 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/SelectableCard.md +216 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/SemanticLink.md +148 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +96 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/TextContent.md +101 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/TextInput.md +104 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Time.md +88 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/URL.md +85 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +180 -0
- package/templates/react-sdk-reference/.github/skills/run-and-verify.md +68 -0
- package/templates/react-sdk-reference/.github/skills/swap-design-system.md +105 -0
- package/templates/react-sdk-reference/.github/skills/template-components.md +285 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/AdvancedSearch.md +144 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +122 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +83 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseSummary.md +100 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +131 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +126 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/Confirmation.md +107 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +120 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +102 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultPage.md +110 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +88 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsSubTabs.md +95 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +78 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsTwoColumn.md +78 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +101 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +109 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +113 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +104 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +85 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/ListPage.md +68 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +139 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/MultiReferenceReadOnly.md +80 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +141 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/OneColumn.md +109 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +124 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +135 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SimpleTable.md +127 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SingleReferenceReadOnly.md +103 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SubTabs.md +79 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +131 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +150 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/WssNavBar.md +135 -0
- package/templates/react-sdk-reference/.github/skills/widget-components.md +234 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +82 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +146 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +107 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/FileUtility.md +200 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +99 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/QuickCreate.md +114 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +167 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +190 -0
- package/templates/react-sdk-reference/AGENTS.md +59 -0
- package/templates/react-sdk-reference/assets/icons/analytics-good-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/cart-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/headset.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/mobile-phone-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/money-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/multi-device-solid.svg +3 -0
- package/templates/react-sdk-reference/index.html +36 -0
- package/templates/react-sdk-reference/package.json +52 -0
- package/templates/react-sdk-reference/sdk-config.json +26 -0
- package/templates/react-sdk-reference/src/AppSelector.tsx +18 -0
- package/templates/react-sdk-reference/src/FallbackComponent.tsx +40 -0
- package/templates/react-sdk-reference/src/MashupApp.styles.ts +105 -0
- package/templates/react-sdk-reference/src/MashupApp.tsx +254 -0
- package/templates/react-sdk-reference/src/PortalApp.tsx +175 -0
- package/templates/react-sdk-reference/src/components/component-map.ts +255 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/AlertBanner.css +46 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/AlertBanner.tsx +91 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/Banner.css +39 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/Banner.tsx +53 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +16 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +270 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/DetailsFields/DetailsFields.tsx +164 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/DetailsFields/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +79 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +58 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +84 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/Operator.tsx +220 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Pulse/Pulse.tsx +33 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Pulse/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx +201 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +33 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +48 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +218 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/config-ext.json +10 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.css +24 -0
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +148 -0
- package/templates/react-sdk-reference/src/components/field/CancelAlert/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +263 -0
- package/templates/react-sdk-reference/src/components/field/Checkbox/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +111 -0
- package/templates/react-sdk-reference/src/components/field/Currency/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/field/Currency/currency-utils.ts +67 -0
- package/templates/react-sdk-reference/src/components/field/Currency/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +94 -0
- package/templates/react-sdk-reference/src/components/field/Date/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/field/Date/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +101 -0
- package/templates/react-sdk-reference/src/components/field/DateTime/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/DateTime/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +122 -0
- package/templates/react-sdk-reference/src/components/field/Decimal/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Decimal/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +238 -0
- package/templates/react-sdk-reference/src/components/field/Dropdown/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +96 -0
- package/templates/react-sdk-reference/src/components/field/Email/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Email/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Group/Group.tsx +41 -0
- package/templates/react-sdk-reference/src/components/field/Group/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/Group/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +100 -0
- package/templates/react-sdk-reference/src/components/field/Integer/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Integer/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Location/Location.css +4 -0
- package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +258 -0
- package/templates/react-sdk-reference/src/components/field/Location/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Location/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +238 -0
- package/templates/react-sdk-reference/src/components/field/Multiselect/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Multiselect/utils.ts +230 -0
- package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +235 -0
- package/templates/react-sdk-reference/src/components/field/ObjectReference/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +111 -0
- package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +112 -0
- package/templates/react-sdk-reference/src/components/field/Percentage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Percentage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +113 -0
- package/templates/react-sdk-reference/src/components/field/Phone/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Phone/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +158 -0
- package/templates/react-sdk-reference/src/components/field/RadioButtons/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/RadioButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/RichText/RichText.css +79 -0
- package/templates/react-sdk-reference/src/components/field/RichText/RichText.tsx +98 -0
- package/templates/react-sdk-reference/src/components/field/RichText/config-ext.json +10 -0
- package/templates/react-sdk-reference/src/components/field/RichText/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/ScalarList/ScalarList.tsx +63 -0
- package/templates/react-sdk-reference/src/components/field/ScalarList/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/ScalarList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +189 -0
- package/templates/react-sdk-reference/src/components/field/SelectableCard/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/SelectableCard/utils.tsx +223 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/SemanticLink.tsx +208 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/utils.ts +49 -0
- package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +94 -0
- package/templates/react-sdk-reference/src/components/field/TextArea/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/TextContent/TextContent.tsx +46 -0
- package/templates/react-sdk-reference/src/components/field/TextContent/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/TextContent/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +92 -0
- package/templates/react-sdk-reference/src/components/field/TextInput/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +79 -0
- package/templates/react-sdk-reference/src/components/field/Time/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Time/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +89 -0
- package/templates/react-sdk-reference/src/components/field/URL/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/URL/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +198 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReferenceUtils.ts +13 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/helpers/attachmentShared.ts +6 -0
- package/templates/react-sdk-reference/src/components/helpers/case-utils.tsx +99 -0
- package/templates/react-sdk-reference/src/components/helpers/common-utils.ts +26 -0
- package/templates/react-sdk-reference/src/components/helpers/data_page.ts +20 -0
- package/templates/react-sdk-reference/src/components/helpers/date-format-utils.ts +76 -0
- package/templates/react-sdk-reference/src/components/helpers/event-utils.ts +20 -0
- package/templates/react-sdk-reference/src/components/helpers/field-group-utils.ts +63 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/Boolean.ts +21 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/Currency.ts +77 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/CurrencyMap.ts +913 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/Date.ts +71 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/common.ts +14 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +130 -0
- package/templates/react-sdk-reference/src/components/helpers/instructions-utils.ts +38 -0
- package/templates/react-sdk-reference/src/components/helpers/object-utils.ts +10 -0
- package/templates/react-sdk-reference/src/components/helpers/reactContextHelpers.ts +3 -0
- package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +452 -0
- package/templates/react-sdk-reference/src/components/helpers/state-utils.tsx +43 -0
- package/templates/react-sdk-reference/src/components/helpers/template-utils.ts +76 -0
- package/templates/react-sdk-reference/src/components/helpers/utils.ts +349 -0
- package/templates/react-sdk-reference/src/components/helpers/versionHelpers.ts +14 -0
- package/templates/react-sdk-reference/src/components/index.ts +8 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +329 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/AppShell/AppShell.css +35 -0
- package/templates/react-sdk-reference/src/components/template/AppShell/AppShell.tsx +259 -0
- package/templates/react-sdk-reference/src/components/template/AppShell/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/BannerPage/BannerPage.tsx +54 -0
- package/templates/react-sdk-reference/src/components/template/BannerPage/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/template/BannerPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/CaseSummary/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/CaseSummary/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/CaseView/CaseView.tsx +261 -0
- package/templates/react-sdk-reference/src/components/template/CaseView/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/CaseView/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +117 -0
- package/templates/react-sdk-reference/src/components/template/CaseViewActionsMenu/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Confirmation/Confirmation.tsx +102 -0
- package/templates/react-sdk-reference/src/components/template/Confirmation/config-ext.json +11 -0
- package/templates/react-sdk-reference/src/components/template/Confirmation/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReference.tsx +590 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +213 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/utils.ts +90 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/DefaultForm.css +34 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +74 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/utils/index.ts +26 -0
- package/templates/react-sdk-reference/src/components/template/DefaultPage/DefaultPage.tsx +108 -0
- package/templates/react-sdk-reference/src/components/template/DefaultPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/Details/Details.tsx +74 -0
- package/templates/react-sdk-reference/src/components/template/Details/Details/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +58 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsSubTabs/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsSubTabs/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/DynamicTabs.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/config.json +36 -0
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx +116 -0
- package/templates/react-sdk-reference/src/components/template/FieldGroupTemplate/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +58 -0
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/hooks.ts +293 -0
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +72 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboardPage/InlineDashboardPage.tsx +39 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboardPage/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboardPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ListPage/ListPage.tsx +16 -0
- package/templates/react-sdk-reference/src/components/template/ListPage/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/template/ListPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ListView/DefaultViewMeta.ts +220 -0
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.css +10 -0
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +1391 -0
- package/templates/react-sdk-reference/src/components/template/ListView/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/ListView/hooks.ts +93 -0
- package/templates/react-sdk-reference/src/components/template/ListView/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ListView/utils.ts +781 -0
- package/templates/react-sdk-reference/src/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +52 -0
- package/templates/react-sdk-reference/src/components/template/MultiReferenceReadOnly/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/NarrowWide.css +19 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/NarrowWide.tsx +37 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +85 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +19 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +22 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +28 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ObjectPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/OneColumn.tsx +32 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnPage/OneColumnPage.tsx +17 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnPage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/OneColumnTab.tsx +11 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/PromotedFilters.css +7 -0
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/PromotedFilters.tsx +204 -0
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SelfServiceCaseView/SelfServiceCaseView.tsx +153 -0
- package/templates/react-sdk-reference/src/components/template/SelfServiceCaseView/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/SimpleTable.tsx +126 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +985 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +122 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.tsx +207 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelectReadonly/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +71 -0
- package/templates/react-sdk-reference/src/components/template/SingleReferenceReadOnly/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/SubTabs.tsx +46 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/tabUtils.ts +185 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/TwoColumn.css +12 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/TwoColumn.tsx +54 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +17 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnPage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.css +12 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +54 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/WideNarrow.css +19 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/WideNarrow.tsx +37 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +96 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +19 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +22 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +28 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WssNavBar/WssNavBar.css +11 -0
- package/templates/react-sdk-reference/src/components/template/WssNavBar/WssNavBar.tsx +160 -0
- package/templates/react-sdk-reference/src/components/template/WssNavBar/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/utils.tsx +58 -0
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/AppAnnouncement.tsx +60 -0
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.css +95 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.tsx +541 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.types.ts +96 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/AttachmentUtils.ts +316 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/CaseHistory.tsx +171 -0
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +13 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +32 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/FileUtility.css +118 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/FileUtility.tsx +653 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/Followers/Followers.tsx +43 -0
- package/templates/react-sdk-reference/src/components/widget/Followers/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/Followers/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/QuickCreate.tsx +88 -0
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/SummaryItem.css +76 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/SummaryItem.tsx +89 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryList/SummaryList.tsx +23 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.css +81 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +507 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/index.tsx +1 -0
- package/templates/react-sdk-reference/src/main.tsx +13 -0
- package/templates/react-sdk-reference/src/mui-theme-augmentation.d.ts +6 -0
- package/templates/react-sdk-reference/tsconfig.json +24 -0
- package/templates/react-sdk-reference/vite.config.ts +65 -0
- package/templates/wc-sdk-reference/.github/AGENTS.md +23 -0
- package/templates/wc-sdk-reference/.github/copilot-instructions.md +40 -0
- package/templates/wc-sdk-reference/.github/skills/pega-sdk-component.md +48 -0
- package/templates/wc-sdk-reference/index.html +21 -0
- package/templates/wc-sdk-reference/package.json +19 -0
- package/templates/wc-sdk-reference/sdk-config.json +19 -0
- package/templates/wc-sdk-reference/src/index.ts +98 -0
- package/templates/wc-sdk-reference/tsconfig.json +21 -0
- package/templates/wc-sdk-reference/vite.config.ts +8 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Skill: AppShell
|
|
2
|
+
|
|
3
|
+
Top-level application shell template. Renders the outer portal/WSS portal frame: navigation bar, alert banners, operator avatar, portal logo, and case types. Provides NavContext to child components.
|
|
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
|
+
The outermost container for the Pega SDK React app. Determines whether the app is running in WSS portal or standard portal mode, renders the appropriate navigation bar, handles HTTP and page-level alert messages, loads the portal logo asynchronously, and passes navigation links and case types to the nav bar.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `AppShell` (in `component-map.ts`)
|
|
16
|
+
- **Category:** Page template — application shell
|
|
17
|
+
- **Extends:** `PConnProps`
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Required | Description |
|
|
22
|
+
|------|------|----------|-------------|
|
|
23
|
+
| `pages` | `array` | Yes | Array of portal page objects `{ name, pyLabel, linkUrl }` |
|
|
24
|
+
| `caseTypes` | `array` | No | Fallback case types (overridden by data page fetch if empty) |
|
|
25
|
+
| `portalName` | `string` | Yes | Portal identifier — determines WSS vs standard rendering |
|
|
26
|
+
| `displayName` | `string` | No | Operator display name for avatar |
|
|
27
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
28
|
+
| `children` | `ReactNode` | Yes | Main content area |
|
|
29
|
+
|
|
30
|
+
## Behavioral Contract
|
|
31
|
+
|
|
32
|
+
### Portal Type Detection
|
|
33
|
+
|
|
34
|
+
- Check `portalName` (or metadata flag) against WSS portal identifier.
|
|
35
|
+
- WSS portal → render `<WssNavBar>` component.
|
|
36
|
+
- Standard portal → render `<NavBar>` component.
|
|
37
|
+
|
|
38
|
+
### Alert Banners
|
|
39
|
+
|
|
40
|
+
1. Subscribe to `getPConnect()` for `httpMessages` and `pageMessages` updates.
|
|
41
|
+
2. If either array is non-empty, render `<AlertBanner>` DSE component above the main content.
|
|
42
|
+
3. `AlertBanner` receives the combined message array and a dismiss handler.
|
|
43
|
+
|
|
44
|
+
### Portal Logo
|
|
45
|
+
|
|
46
|
+
1. On mount, call `PCore.getAssetLoader().getSvcImageUrl(logoAssetName)` asynchronously.
|
|
47
|
+
2. Store the resolved URL in `portalLogoUrl` state.
|
|
48
|
+
3. Pass `portalLogoUrl` to the nav bar as the `logo` prop.
|
|
49
|
+
|
|
50
|
+
### Operator Avatar
|
|
51
|
+
|
|
52
|
+
- Read `displayName` from `getPConnect().getValue('.pyUserName')` or the `displayName` prop.
|
|
53
|
+
- Render operator avatar (initials) in the nav bar via the `operatorInfo` prop.
|
|
54
|
+
|
|
55
|
+
### Case Types
|
|
56
|
+
|
|
57
|
+
1. On mount, fetch case types via `PCore.getDataPageUtils().getPageDataAsync('D_pyPortalTypeList', 'root', {})`.
|
|
58
|
+
2. Store result in `caseTypes` state (overrides the prop default).
|
|
59
|
+
3. Pass `caseTypes` to the nav bar.
|
|
60
|
+
|
|
61
|
+
### NavContext
|
|
62
|
+
|
|
63
|
+
- Wrap children in `<NavContext.Provider value={{ links, caseTypes }}>`.
|
|
64
|
+
- `links` is derived from `pages` prop: `pages.map(p => ({ label: p.pyLabel, url: p.linkUrl, id: p.name }))`.
|
|
65
|
+
|
|
66
|
+
### Render Structure
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
<div className="psdk-app-shell">
|
|
70
|
+
<NavBar | WssNavBar (with logo, caseTypes, operatorInfo, links) />
|
|
71
|
+
<AlertBanner (if messages) />
|
|
72
|
+
<main className="psdk-app-shell-content">
|
|
73
|
+
<NavContext.Provider>
|
|
74
|
+
{children}
|
|
75
|
+
</NavContext.Provider>
|
|
76
|
+
</main>
|
|
77
|
+
</div>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Visual Specifications
|
|
81
|
+
|
|
82
|
+
**CSS-only implementation notes:**
|
|
83
|
+
- Shell wrapper: `display: flex; flex-direction: column; height: 100vh`.
|
|
84
|
+
- Nav bar: `flex: 0 0 auto` (fixed height).
|
|
85
|
+
- Alert banner: `flex: 0 0 auto` (shown below nav, pushes content down).
|
|
86
|
+
- Content area: `flex: 1 1 auto; overflow-y: auto`.
|
|
87
|
+
|
|
88
|
+
## Edge Cases & Special Logic
|
|
89
|
+
|
|
90
|
+
- Logo loading is async — show fallback (app name or blank) until URL resolves.
|
|
91
|
+
- Case types fetch may fail — catch errors and fall back to the `caseTypes` prop.
|
|
92
|
+
- `httpMessages` are transient (from API errors) — clear them after display or on next navigation.
|
|
93
|
+
- `pageMessages` are persistent until explicitly dismissed.
|
|
94
|
+
- If `pages` is empty, `links` array is empty — nav bar may render without page links.
|
|
95
|
+
|
|
96
|
+
## Dependencies
|
|
97
|
+
|
|
98
|
+
- `NavBar` DSE component — standard portal navigation
|
|
99
|
+
- `WssNavBar` template component — WSS portal navigation (see `WssNavBar.md`)
|
|
100
|
+
- `AlertBanner` DSE component — message display
|
|
101
|
+
- `NavContext` from `../../context/nav-context`
|
|
102
|
+
- `PCore.getAssetLoader().getSvcImageUrl()` — logo URL resolution
|
|
103
|
+
- `PCore.getDataPageUtils().getPageDataAsync()` — case types data page
|
|
104
|
+
|
|
105
|
+
## Design System Mapping
|
|
106
|
+
|
|
107
|
+
**UI control type:** Application shell layout — fixed nav + scrollable content area.
|
|
108
|
+
|
|
109
|
+
Listed design systems are examples only.
|
|
110
|
+
|
|
111
|
+
| Design System | Nav Bar | Alert Banner | Shell Layout |
|
|
112
|
+
|---|---|---|---|
|
|
113
|
+
| Default (CSS only) | `<header>` + custom nav | `<div role='alert'>` | CSS flexbox column |
|
|
114
|
+
| MUI | `<AppBar>` + `<Toolbar>` | `<Alert>` | `<Box display='flex' flexDirection='column'>` |
|
|
115
|
+
| Ant Design | `<Layout.Header>` | `<Alert>` | `<Layout>` |
|
|
116
|
+
| Chakra UI | `<Box as='header'>` | `<Alert>` | `<Flex direction='column'>` |
|
|
117
|
+
| Shadcn/ui | Custom header | `<Alert>` | Tailwind `flex flex-col h-screen` |
|
|
118
|
+
|
|
119
|
+
When implementing in a specific design system:
|
|
120
|
+
- WSS vs portal detection must remain — the nav bar component differs for each
|
|
121
|
+
- Logo URL must be loaded asynchronously from `PCore.getAssetLoader()`
|
|
122
|
+
- `NavContext.Provider` must wrap children so descendant nav-aware components can access links
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Skill: BannerPage
|
|
2
|
+
|
|
3
|
+
Page template that wraps the `Banner` DSE component, rendering a hero image section with a configurable two-column content area below.
|
|
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
|
+
A thin template wrapper that delegates entirely to the `Banner` DSE component. Translates page-template props (heading, message, layout, backgroundImage) into `Banner`'s props and passes the first two React children as the `a` (left) and `b` (right) content slot.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `BannerPage` (in `component-map.ts`)
|
|
16
|
+
- **Category:** Page template
|
|
17
|
+
- **Extends:** `PConnProps`
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Required | Description |
|
|
22
|
+
|------|------|----------|-------------|
|
|
23
|
+
| `children` | `ReactNode[]` | Yes | At least 2 children — `[0]` → left (`a`) slot, `[1]` → right (`b`) slot |
|
|
24
|
+
| `layout` | `string` | No | Column layout variant for `Banner`: `'two-column'` (default), `'narrow-wide'`, `'wide-narrow'` |
|
|
25
|
+
| `heading` | `string` | No | Hero section heading text. Default `''` |
|
|
26
|
+
| `message` | `string` | No | Hero section message/subtitle. Default `''` |
|
|
27
|
+
| `imageTheme` | `string` | No | Banner image theme (e.g., `'light'`). Default `'light'` |
|
|
28
|
+
| `backgroundImage` | `string` | No | URL of the background image for the hero. Default `''` |
|
|
29
|
+
| `backgroundColor` | `string` | No | Background color for the hero. Default `''` |
|
|
30
|
+
| `tintImage` | `boolean` | No | Whether to tint the background image. Default `false` |
|
|
31
|
+
|
|
32
|
+
## Behavioral Contract
|
|
33
|
+
|
|
34
|
+
1. Retrieve `Banner` from the component registry via `getComponentFromRegistry('Banner')`.
|
|
35
|
+
2. Convert `children` to an array using `Children.toArray(children)` (memoized).
|
|
36
|
+
3. Render `<Banner>` with the following props:
|
|
37
|
+
- `variant={layout}` — controls column widths below the hero
|
|
38
|
+
- `a={childArray[0]}` — left/first column content
|
|
39
|
+
- `b={childArray[1]}` — right/second column content
|
|
40
|
+
- `banner={{ variant: imageTheme, backgroundColor, title: heading, message, backgroundImage, tintImage }}`
|
|
41
|
+
4. No additional wrapper or layout — this component IS a single `<Banner>` render.
|
|
42
|
+
|
|
43
|
+
## Visual Specifications
|
|
44
|
+
|
|
45
|
+
This component has no independent visual output — all visual behavior is defined by the `Banner` DSE component. See [`design-system-extension-skills/Banner.md`](../design-system-extension-skills/Banner.md) for full visual specs.
|
|
46
|
+
|
|
47
|
+
Key visual behaviors inherited from `Banner`:
|
|
48
|
+
- Hero: full-width background image section, height `19rem`, centered title and message overlay
|
|
49
|
+
- Content area: two-column grid below the hero, column widths driven by `variant`/`layout`
|
|
50
|
+
|
|
51
|
+
**CSS-only implementation notes:**
|
|
52
|
+
- This template creates no CSS of its own — implement it as a pure pass-through to `Banner`.
|
|
53
|
+
- The `layout` prop maps directly to `Banner`'s `variant` prop.
|
|
54
|
+
- `heading` → `Banner.banner.title`, `message` → `Banner.banner.message`.
|
|
55
|
+
|
|
56
|
+
## Edge Cases & Special Logic
|
|
57
|
+
|
|
58
|
+
- Children are memoized: `useMemo(() => Children.toArray(children), [children])` — only recomputed when `children` changes.
|
|
59
|
+
- If only one child is provided, `childArray[1]` will be `undefined` — `Banner` receives `b={undefined}` and should render an empty second column.
|
|
60
|
+
- `BannerPage` does NOT call `getPConnect()` itself for layout — children are React children (passed by the Pega rendering engine).
|
|
61
|
+
|
|
62
|
+
## Dependencies
|
|
63
|
+
|
|
64
|
+
- `getComponentFromRegistry('Banner')` from `@pega/sdk-react` — all rendering delegated to `Banner`
|
|
65
|
+
- `Children.toArray` from React — for child array normalization
|
|
66
|
+
|
|
67
|
+
## Design System Mapping
|
|
68
|
+
|
|
69
|
+
**UI control type:** Full-width banner hero page with configurable two-column content area.
|
|
70
|
+
|
|
71
|
+
Listed design systems are examples only.
|
|
72
|
+
|
|
73
|
+
| Design System | Recommended Component |
|
|
74
|
+
|---|---|
|
|
75
|
+
| Default (CSS only) | Pass-through to `Banner` — implement Banner's CSS hero + grid layout |
|
|
76
|
+
| MUI | Pass-through to `Banner` (MUI-based) |
|
|
77
|
+
| Ant Design | Pass-through to `Banner` (Ant-based) |
|
|
78
|
+
| Chakra UI | Pass-through to `Banner` (Chakra-based) |
|
|
79
|
+
| Shadcn/ui | Pass-through to `Banner` (Shadcn-based) |
|
|
80
|
+
|
|
81
|
+
When implementing in a specific design system:
|
|
82
|
+
- `BannerPage` is always a thin wrapper — implement `Banner` first, then `BannerPage` simply delegates to it
|
|
83
|
+
- Prop mapping: `layout` → `variant`, `heading` → `banner.title`, `message` → `banner.message`, `backgroundImage` → `banner.backgroundImage`
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Skill: CaseSummary
|
|
2
|
+
|
|
3
|
+
Case summary template. Renders a summary panel with primary and secondary case fields, derived from either props or child region extraction.
|
|
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
|
+
Displays a case's key summary data in a structured summary panel. Primary fields are shown prominently; secondary fields are shown with labels. Data is sourced either directly from props or by extracting child regions. All field values are localized before display.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `CaseSummary` (in `component-map.ts`)
|
|
16
|
+
- **Category:** Page template — summary
|
|
17
|
+
- **Extends:** `PConnProps`
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Required | Description |
|
|
22
|
+
|------|------|----------|-------------|
|
|
23
|
+
| `children` | `ReactNode[]` | No | Region children when fields come from PConnect metadata |
|
|
24
|
+
| `arPrimaryFields` | `array` | No | Array of primary field objects (direct prop) |
|
|
25
|
+
| `arSecondaryFields` | `array` | No | Array of secondary field objects (direct prop) |
|
|
26
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
27
|
+
|
|
28
|
+
## Behavioral Contract
|
|
29
|
+
|
|
30
|
+
### Field Sourcing
|
|
31
|
+
|
|
32
|
+
Two modes — prefer direct props if provided:
|
|
33
|
+
|
|
34
|
+
**Mode A — Direct props:**
|
|
35
|
+
- `arPrimaryFields` and `arSecondaryFields` are passed directly.
|
|
36
|
+
- Call `prepareCaseSummaryData(primaryFields, secondaryFields, getPConnect)` to localize values.
|
|
37
|
+
|
|
38
|
+
**Mode B — Child extraction:**
|
|
39
|
+
- Extract primary and secondary regions from `children` by type/name matching.
|
|
40
|
+
- Primary region: first region child (or `type === 'Region' && name === 'Primary'`).
|
|
41
|
+
- Secondary region: second region child (or `type === 'Region' && name === 'Secondary'`).
|
|
42
|
+
- Build field arrays from the extracted region children metadata.
|
|
43
|
+
- Then call `prepareCaseSummaryData(...)` as in Mode A.
|
|
44
|
+
|
|
45
|
+
### `prepareCaseSummaryData(primaryFields, secondaryFields, getPConnect)`
|
|
46
|
+
|
|
47
|
+
Helper that:
|
|
48
|
+
1. Iterates each field in both arrays.
|
|
49
|
+
2. Localizes the field value via `PCore.getLocaleUtils().getLocaleValue(value, classID, value)`.
|
|
50
|
+
3. Returns `{ arPrimaryFields: localizedPrimary, arSecondaryFields: localizedSecondary }`.
|
|
51
|
+
|
|
52
|
+
### Render
|
|
53
|
+
|
|
54
|
+
Delegates entirely to `<CaseSummaryFields>` DSE component, passing:
|
|
55
|
+
- `arPrimaryFields` — array of `{ name, value }` objects for primary display
|
|
56
|
+
- `arSecondaryFields` — array of `{ name, value, displayLabel }` objects for secondary display
|
|
57
|
+
|
|
58
|
+
## Visual Specifications
|
|
59
|
+
|
|
60
|
+
- `<CaseSummaryFields>` handles all rendering — see the DSE component skill for details.
|
|
61
|
+
- Primary fields: large text, no label.
|
|
62
|
+
- Secondary fields: label + value pairs.
|
|
63
|
+
|
|
64
|
+
**CSS-only implementation notes (for `CaseSummaryFields` wrapper):**
|
|
65
|
+
- Container: `display: flex; flex-direction: column; gap: 8px`.
|
|
66
|
+
- Primary field value: `font-size: 1rem; font-weight: 600`.
|
|
67
|
+
- Secondary field row: `display: flex; gap: 4px; font-size: 0.875rem`.
|
|
68
|
+
- Secondary label: `color: var(--secondary-text-color)`.
|
|
69
|
+
|
|
70
|
+
## Edge Cases & Special Logic
|
|
71
|
+
|
|
72
|
+
- If both `arPrimaryFields` prop and children are present, the direct prop takes priority.
|
|
73
|
+
- `prepareCaseSummaryData` — guard against undefined/null field values before passing to `getLocaleValue`.
|
|
74
|
+
- `displayLabel` on secondary fields controls whether the field label is shown alongside the value.
|
|
75
|
+
- If `arSecondaryFields` is empty, the secondary section is not rendered.
|
|
76
|
+
|
|
77
|
+
## Dependencies
|
|
78
|
+
|
|
79
|
+
- `prepareCaseSummaryData` from `./utils` (local helper)
|
|
80
|
+
- `CaseSummaryFields` — DSE component registered in the component registry
|
|
81
|
+
- `PCore.getLocaleUtils().getLocaleValue()` — value localization
|
|
82
|
+
|
|
83
|
+
## Design System Mapping
|
|
84
|
+
|
|
85
|
+
**UI control type:** Read-only case summary panel with primary and secondary field groups.
|
|
86
|
+
|
|
87
|
+
Listed design systems are examples only.
|
|
88
|
+
|
|
89
|
+
| Design System | Recommended Approach |
|
|
90
|
+
|---|---|
|
|
91
|
+
| Default (CSS only) | Flexbox column with CSS-styled field rows |
|
|
92
|
+
| MUI | `<Typography>` variants for primary/secondary text |
|
|
93
|
+
| Ant Design | `<Descriptions>` with `bordered={false}` |
|
|
94
|
+
| Chakra UI | `<VStack>` with `<Text>` variants |
|
|
95
|
+
| Shadcn/ui | Custom `<dl>/<dt>/<dd>` or card |
|
|
96
|
+
|
|
97
|
+
When implementing in a specific design system:
|
|
98
|
+
- Always localize field values before display — use `PCore.getLocaleUtils().getLocaleValue()`
|
|
99
|
+
- `CaseSummaryFields` is a DSE component — implement it separately and call it from here
|
|
100
|
+
- Primary fields have no labels; secondary fields have labels
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Skill: CaseView
|
|
2
|
+
|
|
3
|
+
Case view template. Renders the full case workspace: summary sidebar, stages, to-do region, main content tabs, and utilities column. Also covers `ObjectPage` (which is a re-export of `CaseView`).
|
|
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
|
+
The primary case workspace template. Extracts named regions from PConnect children by metadata type and name, arranges them in a 3-column responsive grid (3/6/3), handles deferred tab loading, and supports a `displayOnlyFA` mode that shows only the to-do region. Edit actions are triggered via the utilities column.
|
|
12
|
+
|
|
13
|
+
> **Note:** `ObjectPage` is a direct re-export of `CaseView` — `export { default } from '../CaseView'`. Do not create a separate `ObjectPage` component; register both keys pointing to the same implementation.
|
|
14
|
+
|
|
15
|
+
## Pega Metadata
|
|
16
|
+
|
|
17
|
+
- **Registration key:** `CaseView` and `ObjectPage` (both point to the same component)
|
|
18
|
+
- **Category:** Page template — case workspace
|
|
19
|
+
- **Extends:** `PConnProps`
|
|
20
|
+
|
|
21
|
+
## Props
|
|
22
|
+
|
|
23
|
+
| Prop | Type | Required | Description |
|
|
24
|
+
|------|------|----------|-------------|
|
|
25
|
+
| `children` | `ReactNode[]` | Yes | Named region children (summary, stages, todo, utilities, tabs) |
|
|
26
|
+
| `displayOnlyFA` | `boolean` | No | If true, renders only the to-do region (focused action mode) |
|
|
27
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
28
|
+
|
|
29
|
+
## Behavioral Contract
|
|
30
|
+
|
|
31
|
+
### Region Extraction
|
|
32
|
+
|
|
33
|
+
Use `getRawMetadata()` to access `children` with `type` and `name` metadata. Extract by:
|
|
34
|
+
- **Summary region:** `type === 'Region' && name === 'Summary'`
|
|
35
|
+
- **Stages region:** `type === 'Region' && name === 'Stages'`
|
|
36
|
+
- **ToDo region:** `type === 'Region' && name === 'ToDo'`
|
|
37
|
+
- **Utilities region:** `type === 'Region' && name === 'Utilities'`
|
|
38
|
+
- **Tabs region:** `type === 'Region' && name === 'Tabs'`
|
|
39
|
+
|
|
40
|
+
Render each region as a React child element using `createElement(PConnectComponent, { ...regionConfig })`.
|
|
41
|
+
|
|
42
|
+
### Tabs Region — Deferred Load
|
|
43
|
+
|
|
44
|
+
- From the Tabs region children, build `vertTabInfo` (vertical tab definitions) and `deferLoadInfo` (deferred loading metadata).
|
|
45
|
+
- Pass both to `<DeferLoad>` component which handles lazy rendering of tab content.
|
|
46
|
+
- The tabs list comes from `theTabsRegionChildren` (the children of the Tabs region).
|
|
47
|
+
|
|
48
|
+
### displayOnlyFA Mode
|
|
49
|
+
|
|
50
|
+
If `displayOnlyFA === true`:
|
|
51
|
+
- Render only the ToDo region, centered.
|
|
52
|
+
- Skip summary, stages, tabs, utilities rendering.
|
|
53
|
+
|
|
54
|
+
### Attachments Subscription
|
|
55
|
+
|
|
56
|
+
- Subscribe to `PCore.getPubSubUtils().subscribe(CASE_ATTACHMENTS_UPDATED, handleAttachmentUpdate, 'CaseView')`.
|
|
57
|
+
- Track `hasNewAttachments` boolean state — passed to utilities region.
|
|
58
|
+
- Unsubscribe on unmount.
|
|
59
|
+
|
|
60
|
+
### Edit Action
|
|
61
|
+
|
|
62
|
+
- The utilities region may include an edit action button.
|
|
63
|
+
- On click: call `getPConnect().getActionsApi().openLocalAction(editActionId, { ... })`.
|
|
64
|
+
|
|
65
|
+
## Visual Specifications
|
|
66
|
+
|
|
67
|
+
### 3-Column Grid Layout
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
[Col xs:3] [Col xs:6] [Col xs:3]
|
|
71
|
+
Summary Main tabs Utilities
|
|
72
|
+
Stages (Deferred)
|
|
73
|
+
ToDo
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| Column | xs | Contents |
|
|
77
|
+
|--------|----|----------|
|
|
78
|
+
| Left | 3 | Summary, Stages, ToDo regions |
|
|
79
|
+
| Center | 6 | Tabs region (deferred content) |
|
|
80
|
+
| Right | 3 | Utilities region |
|
|
81
|
+
|
|
82
|
+
**CSS-only implementation notes:**
|
|
83
|
+
- Outer grid: `display: grid; grid-template-columns: 25% 50% 25%; gap: 1rem`.
|
|
84
|
+
- Left column: `display: flex; flex-direction: column; gap: 0.5rem`.
|
|
85
|
+
- Center column: `overflow: hidden`.
|
|
86
|
+
- Responsive: on mobile, stack to single column.
|
|
87
|
+
|
|
88
|
+
## Edge Cases & Special Logic
|
|
89
|
+
|
|
90
|
+
- `displayOnlyFA === true` — completely different render tree (only ToDo), no grid layout.
|
|
91
|
+
- Missing regions — guard each region before rendering; a region may not exist for all case types.
|
|
92
|
+
- `DeferLoad` handles progressive loading — do not eagerly render all tab content.
|
|
93
|
+
- `hasNewAttachments` is passed down to the utilities region — it affects attachment icon badge display.
|
|
94
|
+
|
|
95
|
+
## Dependencies
|
|
96
|
+
|
|
97
|
+
- `DeferLoad` component from `@pega/sdk-react` — deferred tab content loading
|
|
98
|
+
- `PCore.getPubSubUtils()` — pub/sub for attachment updates
|
|
99
|
+
- `PConnectComponent` from `@pega/sdk-react`
|
|
100
|
+
- `CASE_ATTACHMENTS_UPDATED` constant from `@pega/sdk-core` (or local constants)
|
|
101
|
+
|
|
102
|
+
## Sub-Variants
|
|
103
|
+
|
|
104
|
+
### ObjectPage
|
|
105
|
+
|
|
106
|
+
`ObjectPage` is registered as:
|
|
107
|
+
```tsx
|
|
108
|
+
// packages/sdk-react/src/components/template/ObjectPage/index.tsx
|
|
109
|
+
export { default } from '../CaseView';
|
|
110
|
+
```
|
|
111
|
+
- No separate implementation needed.
|
|
112
|
+
- In `component-map.ts`, register `ObjectPage` key pointing to the same component as `CaseView`.
|
|
113
|
+
|
|
114
|
+
## Design System Mapping
|
|
115
|
+
|
|
116
|
+
**UI control type:** Full case workspace layout — 3-column grid with sidebar, main content, and utilities.
|
|
117
|
+
|
|
118
|
+
Listed design systems are examples only.
|
|
119
|
+
|
|
120
|
+
| Design System | Grid | Sidebar | Deferred Tabs |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| Default (CSS only) | CSS Grid 25/50/25 | `<aside>` | Intersection Observer lazy load |
|
|
123
|
+
| MUI | `<Grid container>` with `<Grid size={{ xs: 3/6/3 }}>` | `<Box>` | MUI `<Tabs>` + DeferLoad |
|
|
124
|
+
| Ant Design | `<Row><Col span={6/12/6}>` | `<Sider>` | `<Tabs>` lazy |
|
|
125
|
+
| Chakra UI | `<Grid templateColumns='1fr 2fr 1fr'>` | `<Box>` | Custom lazy tabs |
|
|
126
|
+
| Shadcn/ui | Tailwind `grid grid-cols-[1fr_2fr_1fr]` | `<aside>` | Custom |
|
|
127
|
+
|
|
128
|
+
When implementing in a specific design system:
|
|
129
|
+
- `displayOnlyFA` must completely bypass the grid — render only ToDo region
|
|
130
|
+
- Region extraction by metadata name is required — do not assume positional ordering
|
|
131
|
+
- Deferred loading is mandatory for performance — tab content must not all load at once
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Skill: CaseViewActionsMenu
|
|
2
|
+
|
|
3
|
+
Case actions dropdown menu. Renders an "Actions" button that opens a menu of local actions and process actions for the current case.
|
|
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 button that opens a dropdown menu containing all available case actions. Distinguishes between local actions (UI flow) and process actions (server-side), invoking the appropriate API for each. Shows a Snackbar toast on process action error.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `CaseViewActionsMenu` (in `component-map.ts`)
|
|
16
|
+
- **Category:** Page template — action menu
|
|
17
|
+
- **Extends:** `PConnProps`
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Required | Description |
|
|
22
|
+
|------|------|----------|-------------|
|
|
23
|
+
| `localActions` | `array` | No | Array of `{ ID, name }` local action objects |
|
|
24
|
+
| `processActions` | `array` | No | Array of `{ ID, name }` process action objects |
|
|
25
|
+
| `caseTypeID` | `string` | Yes | Case type identifier for label localization |
|
|
26
|
+
| `caseTypeName` | `string` | Yes | Case type display name for label localization |
|
|
27
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
28
|
+
|
|
29
|
+
## Behavioral Contract
|
|
30
|
+
|
|
31
|
+
### Button Label
|
|
32
|
+
|
|
33
|
+
- Localized via `PCore.getLocaleUtils().getLocaleValue('Actions', 'CaseView', 'Actions')`.
|
|
34
|
+
- Rendered as an outlined/secondary button with a dropdown indicator icon.
|
|
35
|
+
|
|
36
|
+
### Menu Items
|
|
37
|
+
|
|
38
|
+
The menu combines:
|
|
39
|
+
1. **Local actions** — each item triggers `getPConnect().getActionsApi().openLocalAction(action.ID, { caseID: getPConnect().getCaseInfo().getID() })`.
|
|
40
|
+
2. **Process actions** — each item triggers `getPConnect().getActionsApi().openProcessAction(action.ID, { ... })`.
|
|
41
|
+
|
|
42
|
+
If both groups exist, render a divider between them.
|
|
43
|
+
|
|
44
|
+
### Localized Action Labels
|
|
45
|
+
|
|
46
|
+
For localized case type context:
|
|
47
|
+
```
|
|
48
|
+
localeKey = `${caseTypeID}!CASE!${caseTypeName.toUpperCase()}`
|
|
49
|
+
```
|
|
50
|
+
Action name localization: `PCore.getLocaleUtils().getLocaleValue(action.name, localeKey, action.name)`.
|
|
51
|
+
|
|
52
|
+
### Process Action Error Handling
|
|
53
|
+
|
|
54
|
+
1. On process action click, wrap in `try/catch`.
|
|
55
|
+
2. On error: show Snackbar toast with the error message.
|
|
56
|
+
3. Snackbar auto-hides after 3000ms.
|
|
57
|
+
|
|
58
|
+
### Menu State
|
|
59
|
+
|
|
60
|
+
- `anchorEl` state controls menu open/close.
|
|
61
|
+
- Open: `setAnchorEl(event.currentTarget)`.
|
|
62
|
+
- Close: `setAnchorEl(null)`.
|
|
63
|
+
|
|
64
|
+
## Visual Specifications
|
|
65
|
+
|
|
66
|
+
### Button
|
|
67
|
+
|
|
68
|
+
| Property | Value |
|
|
69
|
+
|----------|-------|
|
|
70
|
+
| Label | Localized `"Actions"` |
|
|
71
|
+
| Variant | Outlined or secondary |
|
|
72
|
+
| Icon | Dropdown chevron or expand_more |
|
|
73
|
+
|
|
74
|
+
### Menu
|
|
75
|
+
|
|
76
|
+
| Property | Value |
|
|
77
|
+
|----------|-------|
|
|
78
|
+
| Position | Anchored below the button |
|
|
79
|
+
| Divider | Between local and process action groups |
|
|
80
|
+
| Item height | Standard menu item height |
|
|
81
|
+
|
|
82
|
+
**CSS-only implementation notes:**
|
|
83
|
+
- Button: `padding: 6px 12px; border: 1px solid var(--app-primary-color); border-radius: 4px; cursor: pointer`.
|
|
84
|
+
- Dropdown menu: `position: absolute; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.2); border-radius: 4px; min-width: 160px; z-index: 1000`.
|
|
85
|
+
- Menu item: `padding: 8px 16px; cursor: pointer`. Hover: `background: var(--hover-bg)`.
|
|
86
|
+
- Divider: `border-top: 1px solid var(--divider-color); margin: 4px 0`.
|
|
87
|
+
|
|
88
|
+
### Snackbar Toast
|
|
89
|
+
|
|
90
|
+
| Property | Value |
|
|
91
|
+
|----------|-------|
|
|
92
|
+
| Position | Bottom-center or bottom-right |
|
|
93
|
+
| Auto-hide | 3000ms |
|
|
94
|
+
| Severity | Error (red) |
|
|
95
|
+
|
|
96
|
+
## Edge Cases & Special Logic
|
|
97
|
+
|
|
98
|
+
- If both `localActions` and `processActions` are empty, the "Actions" button may be hidden or disabled.
|
|
99
|
+
- `caseTypeName.toUpperCase()` — guard against `undefined`/`null` values.
|
|
100
|
+
- Process action errors may include HTML — sanitize before displaying in the Snackbar message.
|
|
101
|
+
- Menu should close on any item click (both local and process).
|
|
102
|
+
|
|
103
|
+
## Dependencies
|
|
104
|
+
|
|
105
|
+
- `PCore.getLocaleUtils().getLocaleValue()` — label localization
|
|
106
|
+
- `PConnectComponent` from `@pega/sdk-react`
|
|
107
|
+
- MUI: `<Button>`, `<Menu>`, `<MenuItem>`, `<Divider>`, `<Snackbar>`
|
|
108
|
+
|
|
109
|
+
## Design System Mapping
|
|
110
|
+
|
|
111
|
+
**UI control type:** Dropdown action menu with button trigger and toast error notification.
|
|
112
|
+
|
|
113
|
+
Listed design systems are examples only.
|
|
114
|
+
|
|
115
|
+
| Design System | Button | Menu | Toast |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| Default (CSS only) | `<button>` + custom dropdown | `<ul>/<li>` with CSS | Custom toast overlay |
|
|
118
|
+
| MUI | `<Button>` + `<Menu>/<MenuItem>` | MUI Menu | `<Snackbar>/<Alert>` |
|
|
119
|
+
| Ant Design | `<Dropdown menu={{ items }}>` | Ant Dropdown | `message.error()` |
|
|
120
|
+
| Chakra UI | `<Menu>/<MenuButton>/<MenuList>` | Chakra Menu | `useToast()` |
|
|
121
|
+
| Shadcn/ui | `<DropdownMenu>/<DropdownMenuTrigger>` | Shadcn DropdownMenu | `<Toaster>` + `toast.error()` |
|
|
122
|
+
|
|
123
|
+
When implementing in a specific design system:
|
|
124
|
+
- Local vs process action distinction must be preserved — they call different APIs
|
|
125
|
+
- Localized labels via `localeKey = ${caseTypeID}!CASE!${caseTypeName.toUpperCase()}`
|
|
126
|
+
- Process action errors must be surfaced via a dismissible toast
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Skill: Confirmation
|
|
2
|
+
|
|
3
|
+
Case confirmation template. Renders the post-submission confirmation view with a Done button, optionally showing ToDo assignments that remain after the case is submitted.
|
|
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
|
+
Displayed after a case or assignment is submitted. Shows the confirmation view (with `Details` region) and a Done button. If outstanding ToDo assignments remain after the user clicks Done, they are displayed. When the user truly finishes, publishes `CLOSE_CONFIRM_VIEW` to close the container.
|
|
12
|
+
|
|
13
|
+
## Pega Metadata
|
|
14
|
+
|
|
15
|
+
- **Registration key:** `Confirmation` (in `component-map.ts`)
|
|
16
|
+
- **Category:** Page template — confirmation
|
|
17
|
+
- **Extends:** `PConnProps`
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Required | Description |
|
|
22
|
+
|------|------|----------|-------------|
|
|
23
|
+
| `children` | `ReactNode[]` | Yes | Region children: `[0]` = ToDo region, `[1]` = Details region (when available) |
|
|
24
|
+
| `getPConnect` | `function` | Yes | PConnect getter |
|
|
25
|
+
|
|
26
|
+
## Behavioral Contract
|
|
27
|
+
|
|
28
|
+
### State
|
|
29
|
+
|
|
30
|
+
- `showConfirmView`: boolean, initially `true`.
|
|
31
|
+
- `toDoAssignments`: array from `getToDoAssignments(getPConnect())` — pending assignments.
|
|
32
|
+
|
|
33
|
+
### Done Button Click
|
|
34
|
+
|
|
35
|
+
1. Call `getPConnect().getContainerManager().closeContainerItem(getPConnect().getContainerName())`.
|
|
36
|
+
2. OR call `PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getContainerName())`.
|
|
37
|
+
3. Check remaining `toDoAssignments`.
|
|
38
|
+
4. If assignments remain: `setShowConfirmView(false)` — show ToDo view instead.
|
|
39
|
+
5. If no assignments remain: publish `PCore.getPubSubUtils().publish(CLOSE_CONFIRM_VIEW, {})`.
|
|
40
|
+
|
|
41
|
+
### Show Details
|
|
42
|
+
|
|
43
|
+
- `showDetails`: `children.length > 1` — true when a Details region is present.
|
|
44
|
+
|
|
45
|
+
### Render: Confirm View (`showConfirmView === true`)
|
|
46
|
+
|
|
47
|
+
1. Confirmation message header (localized `"Your submission is confirmed"` or equivalent).
|
|
48
|
+
2. If `showDetails`: render `children[1]` (Details region) using `createElement(PConnectComponent, ...)`.
|
|
49
|
+
3. Done button (`localized "Done"`) — triggers done click handler above.
|
|
50
|
+
|
|
51
|
+
### Render: ToDo View (`showConfirmView === false`)
|
|
52
|
+
|
|
53
|
+
- Render `children[0]` (ToDo region) using `createElement(PConnectComponent, ...)`.
|
|
54
|
+
|
|
55
|
+
## Visual Specifications
|
|
56
|
+
|
|
57
|
+
### Confirm View
|
|
58
|
+
|
|
59
|
+
| Element | Description |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| Confirmation header | Success icon + heading text |
|
|
62
|
+
| Details section | Optional — rendered below confirmation header |
|
|
63
|
+
| Done button | Primary button, bottom of the form |
|
|
64
|
+
|
|
65
|
+
**CSS-only implementation notes:**
|
|
66
|
+
- Confirm view: `display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding: 2rem`.
|
|
67
|
+
- Success icon: large checkmark or success indicator, centered.
|
|
68
|
+
- Confirmation heading: `font-size: 1.5rem; font-weight: 600; text-align: center`.
|
|
69
|
+
- Done button: `align-self: flex-end` or centered.
|
|
70
|
+
|
|
71
|
+
### ToDo View
|
|
72
|
+
|
|
73
|
+
- Full-width ToDo region rendered in place of confirmation.
|
|
74
|
+
- No additional wrapping — render the region directly.
|
|
75
|
+
|
|
76
|
+
## Edge Cases & Special Logic
|
|
77
|
+
|
|
78
|
+
- `getToDoAssignments(getPConnect())` — returns empty array if no assignments remain; triggers close publish immediately.
|
|
79
|
+
- `children[1]` may not exist — always check `showDetails` before rendering.
|
|
80
|
+
- `CLOSE_CONFIRM_VIEW` is a PubSub constant — ensure it matches the consuming container's subscription key.
|
|
81
|
+
- The confirmation view should not be navigable backward — Done is the only exit.
|
|
82
|
+
|
|
83
|
+
## Dependencies
|
|
84
|
+
|
|
85
|
+
- `getToDoAssignments` from `../../helpers/case-utils` (or equivalent)
|
|
86
|
+
- `PCore.getPubSubUtils().publish()` — for CLOSE_CONFIRM_VIEW event
|
|
87
|
+
- `PCore.getContainerUtils()` — for container item management
|
|
88
|
+
- `PConnectComponent` from `@pega/sdk-react`
|
|
89
|
+
|
|
90
|
+
## Design System Mapping
|
|
91
|
+
|
|
92
|
+
**UI control type:** Post-submission confirmation page with done action and optional todo view.
|
|
93
|
+
|
|
94
|
+
Listed design systems are examples only.
|
|
95
|
+
|
|
96
|
+
| Design System | Success Indicator | Done Button | Layout |
|
|
97
|
+
|---|---|---|---|
|
|
98
|
+
| Default (CSS only) | CSS checkmark SVG | `<button class='primary'>` | Centered flexbox column |
|
|
99
|
+
| MUI | `<CheckCircleIcon>` | `<Button variant='contained'>` | `<Box display='flex' flexDirection='column'>` |
|
|
100
|
+
| Ant Design | `<Result status='success'>` | `<Button type='primary'>` | Ant Result component |
|
|
101
|
+
| Chakra UI | `<CheckCircleIcon>` + `<Text>` | `<Button colorScheme='blue'>` | `<VStack>` |
|
|
102
|
+
| Shadcn/ui | Custom icon + `<h2>` | `<Button>` | Tailwind centered div |
|
|
103
|
+
|
|
104
|
+
When implementing in a specific design system:
|
|
105
|
+
- Done button must check remaining `toDoAssignments` before deciding whether to show ToDo view or close
|
|
106
|
+
- `CLOSE_CONFIRM_VIEW` publish must happen only after confirming no assignments remain
|
|
107
|
+
- `showDetails` check must guard `children[1]` access
|