@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,507 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Button,
|
|
5
|
+
Card,
|
|
6
|
+
CardContent,
|
|
7
|
+
CardHeader,
|
|
8
|
+
Avatar,
|
|
9
|
+
Typography,
|
|
10
|
+
Badge,
|
|
11
|
+
List,
|
|
12
|
+
ListItem,
|
|
13
|
+
ListItemText,
|
|
14
|
+
} from '@mui/material';
|
|
15
|
+
import Snackbar from '@mui/material/Snackbar';
|
|
16
|
+
import IconButton from '@mui/material/IconButton';
|
|
17
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
18
|
+
import ArrowForwardIosOutlinedIcon from '@mui/icons-material/ArrowForwardIosOutlined';
|
|
19
|
+
import { useTheme } from '@mui/material/styles';
|
|
20
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
21
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
22
|
+
|
|
23
|
+
import { Utils } from '../../helpers/utils';
|
|
24
|
+
import type { PConnProps } from '@pega/sdk-react';
|
|
25
|
+
|
|
26
|
+
import './ToDo.css';
|
|
27
|
+
|
|
28
|
+
const fetchMyWorkList = (
|
|
29
|
+
datapage,
|
|
30
|
+
fields,
|
|
31
|
+
numberOfRecords,
|
|
32
|
+
includeTotalCount,
|
|
33
|
+
context,
|
|
34
|
+
) => {
|
|
35
|
+
return PCore.getDataPageUtils()
|
|
36
|
+
.getDataAsync(
|
|
37
|
+
datapage,
|
|
38
|
+
context,
|
|
39
|
+
{},
|
|
40
|
+
{
|
|
41
|
+
pageNumber: 1,
|
|
42
|
+
pageSize: numberOfRecords,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
select: Object.keys(fields).map((key) => ({
|
|
46
|
+
field: PCore.getAnnotationUtils().getPropertyName(fields[key]),
|
|
47
|
+
})),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
invalidateCache: true,
|
|
51
|
+
additionalApiParams: {
|
|
52
|
+
includeTotalCount,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
.then((response) => {
|
|
57
|
+
return {
|
|
58
|
+
...response,
|
|
59
|
+
data: (Array.isArray(response?.data) ? response.data : []).map((row) =>
|
|
60
|
+
Object.keys(fields).reduce((obj, key) => {
|
|
61
|
+
obj[key] =
|
|
62
|
+
row[PCore.getAnnotationUtils().getPropertyName(fields[key])];
|
|
63
|
+
return obj;
|
|
64
|
+
}, {}),
|
|
65
|
+
),
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
interface ToDoProps extends PConnProps {
|
|
71
|
+
// If any, enter additional props that only exist on this component
|
|
72
|
+
datasource?: any;
|
|
73
|
+
myWorkList?: any;
|
|
74
|
+
|
|
75
|
+
caseInfoID?: string;
|
|
76
|
+
headerText?: string;
|
|
77
|
+
|
|
78
|
+
itemKey?: string;
|
|
79
|
+
showTodoList?: boolean;
|
|
80
|
+
type?: string;
|
|
81
|
+
|
|
82
|
+
context?: string;
|
|
83
|
+
isConfirm?: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const isChildCase = (assignment) => {
|
|
87
|
+
return assignment.isChild;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
function topThreeAssignments(assignmentsSource: any[]): any[] {
|
|
91
|
+
return Array.isArray(assignmentsSource) ? assignmentsSource.slice(0, 3) : [];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function getID(assignment: any) {
|
|
95
|
+
if (assignment.value) {
|
|
96
|
+
const refKey = assignment.value;
|
|
97
|
+
return refKey.substring(refKey.lastIndexOf(' ') + 1);
|
|
98
|
+
}
|
|
99
|
+
const refKey = assignment.ID;
|
|
100
|
+
const arKeys = refKey.split('!')[0].split(' ');
|
|
101
|
+
return arKeys[2];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const useStyles = makeStyles((theme: any) => ({
|
|
105
|
+
root: {
|
|
106
|
+
marginBottom: theme.spacing(1),
|
|
107
|
+
paddingBottom: theme.spacing(1),
|
|
108
|
+
borderRadius: 16,
|
|
109
|
+
},
|
|
110
|
+
avatar: {
|
|
111
|
+
backgroundColor: theme.palette.primary.light,
|
|
112
|
+
color: theme.palette.getContrastText(theme.palette.primary.light),
|
|
113
|
+
},
|
|
114
|
+
todoWrapper: {
|
|
115
|
+
padding: theme.spacing(1),
|
|
116
|
+
margin: theme.spacing(1),
|
|
117
|
+
},
|
|
118
|
+
psdkTodoAssignmentStatus: {
|
|
119
|
+
backgroundColor: 'var(--app-neutral-light-color)',
|
|
120
|
+
borderRadius: '0.125rem',
|
|
121
|
+
color: theme.embedded?.resolutionTextColor ?? theme.palette.text.secondary,
|
|
122
|
+
fontSize: '0.75rem',
|
|
123
|
+
fontWeight: 'bold',
|
|
124
|
+
lineHeight: 'calc(0.5rem * 2.5)',
|
|
125
|
+
height: 'calc(0.5rem * 2.5)',
|
|
126
|
+
padding: '0 0.5rem',
|
|
127
|
+
textTransform: 'uppercase',
|
|
128
|
+
},
|
|
129
|
+
}));
|
|
130
|
+
|
|
131
|
+
export default function ToDo(props: ToDoProps) {
|
|
132
|
+
const {
|
|
133
|
+
getPConnect,
|
|
134
|
+
context,
|
|
135
|
+
datasource = [],
|
|
136
|
+
headerText = 'To do',
|
|
137
|
+
showTodoList = true,
|
|
138
|
+
myWorkList = {},
|
|
139
|
+
type = 'worklist',
|
|
140
|
+
isConfirm = false,
|
|
141
|
+
} = props;
|
|
142
|
+
|
|
143
|
+
const CONSTS = PCore.getConstants();
|
|
144
|
+
|
|
145
|
+
const bLogging = true;
|
|
146
|
+
const currentUser = PCore.getEnvironmentInfo().getOperatorName() ?? '';
|
|
147
|
+
const currentUserInitials = Utils.getInitials(currentUser);
|
|
148
|
+
const assignmentsSource = datasource?.source || myWorkList?.source;
|
|
149
|
+
|
|
150
|
+
const [bShowMore, setBShowMore] = useState(true);
|
|
151
|
+
const [showSnackbar, setShowSnackbar] = useState(false);
|
|
152
|
+
const [snackbarMessage, setSnackbarMessage]: any = useState('');
|
|
153
|
+
|
|
154
|
+
const [assignments, setAssignments] = useState<any[]>(initAssignments());
|
|
155
|
+
|
|
156
|
+
const thePConn = getPConnect();
|
|
157
|
+
const classes = useStyles();
|
|
158
|
+
const theme = useTheme();
|
|
159
|
+
const isDesktop = useMediaQuery(theme.breakpoints.up('md'));
|
|
160
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
161
|
+
const localeCategory = 'Todo';
|
|
162
|
+
const showlessLocalizedValue = localizedVal('show_less', 'CosmosFields');
|
|
163
|
+
const showMoreLocalizedValue = localizedVal('show_more', 'CosmosFields');
|
|
164
|
+
const canPerform =
|
|
165
|
+
assignments?.[0]?.canPerform === 'true' ||
|
|
166
|
+
assignments?.[0]?.canPerform === true;
|
|
167
|
+
const [count, setCount] = useState(0);
|
|
168
|
+
|
|
169
|
+
const {
|
|
170
|
+
WORK_BASKET: { MY_WORK_LIST },
|
|
171
|
+
} = PCore.getConstants();
|
|
172
|
+
|
|
173
|
+
function initAssignments(): any[] {
|
|
174
|
+
if (assignmentsSource) {
|
|
175
|
+
return topThreeAssignments(assignmentsSource);
|
|
176
|
+
}
|
|
177
|
+
// turn off todolist
|
|
178
|
+
return [];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const deferLoadWorklistItems = useCallback(
|
|
182
|
+
(responseData) => {
|
|
183
|
+
setCount(responseData.totalCount);
|
|
184
|
+
setAssignments(responseData.data);
|
|
185
|
+
},
|
|
186
|
+
[MY_WORK_LIST],
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
if (Object.keys(myWorkList).length && myWorkList.datapage) {
|
|
191
|
+
fetchMyWorkList(
|
|
192
|
+
myWorkList.datapage,
|
|
193
|
+
getPConnect().getComponentConfig()?.myWorkList.fields,
|
|
194
|
+
3,
|
|
195
|
+
true,
|
|
196
|
+
context,
|
|
197
|
+
).then((responseData) => {
|
|
198
|
+
deferLoadWorklistItems(responseData);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}, []);
|
|
202
|
+
|
|
203
|
+
const getAssignmentId = (assignment) => {
|
|
204
|
+
return type === CONSTS.TODO ? assignment.ID : assignment.id;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const getPriority = (assignment) => {
|
|
208
|
+
return type === CONSTS.TODO ? assignment.urgency : assignment.priority;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const getAssignmentName = (assignment) => {
|
|
212
|
+
return type === CONSTS.TODO
|
|
213
|
+
? localizedVal(
|
|
214
|
+
assignment.name,
|
|
215
|
+
'',
|
|
216
|
+
PCore.getLocaleUtils().getCaseLocaleReference(assignment.classname),
|
|
217
|
+
)
|
|
218
|
+
: localizedVal(
|
|
219
|
+
assignment.stepName,
|
|
220
|
+
'',
|
|
221
|
+
PCore.getLocaleUtils().getCaseLocaleReference(assignment.classname),
|
|
222
|
+
);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
function showToast(message: string) {
|
|
226
|
+
const theMessage = `Assignment: ${message}`;
|
|
227
|
+
|
|
228
|
+
console.error(theMessage);
|
|
229
|
+
setSnackbarMessage(message);
|
|
230
|
+
setShowSnackbar(true);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function handleSnackbarClose(
|
|
234
|
+
event: React.SyntheticEvent<any> | Event,
|
|
235
|
+
reason?: string,
|
|
236
|
+
) {
|
|
237
|
+
if (reason === 'clickaway') {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
setShowSnackbar(false);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function _showMore() {
|
|
244
|
+
setBShowMore(false);
|
|
245
|
+
if (
|
|
246
|
+
type === CONSTS.WORKLIST &&
|
|
247
|
+
count &&
|
|
248
|
+
count > assignments.length &&
|
|
249
|
+
!assignmentsSource
|
|
250
|
+
) {
|
|
251
|
+
fetchMyWorkList(
|
|
252
|
+
myWorkList.datapage,
|
|
253
|
+
getPConnect().getComponentConfig()?.myWorkList.fields,
|
|
254
|
+
count,
|
|
255
|
+
false,
|
|
256
|
+
context,
|
|
257
|
+
).then((response) => {
|
|
258
|
+
setAssignments(response.data);
|
|
259
|
+
});
|
|
260
|
+
} else {
|
|
261
|
+
setAssignments(assignmentsSource);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function _showLess() {
|
|
266
|
+
setBShowMore(true);
|
|
267
|
+
setAssignments((assignments) => assignments.slice(0, 3));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function clickGo(assignment) {
|
|
271
|
+
const id = getAssignmentId(assignment);
|
|
272
|
+
let { classname = '' } = assignment;
|
|
273
|
+
const sTarget = thePConn.getContainerName();
|
|
274
|
+
const sTargetContainerName = sTarget;
|
|
275
|
+
|
|
276
|
+
const options: any = {
|
|
277
|
+
containerName: sTargetContainerName,
|
|
278
|
+
channelName: '',
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
if (classname === null || classname === '') {
|
|
282
|
+
classname = thePConn.getCaseInfo().getClassName();
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (sTarget === 'workarea') {
|
|
286
|
+
options.isActionFromToDoList = true;
|
|
287
|
+
options.target = '';
|
|
288
|
+
options.context = null;
|
|
289
|
+
options.isChild = isChildCase(assignment);
|
|
290
|
+
} else {
|
|
291
|
+
options.isActionFromToDoList = false;
|
|
292
|
+
options.target = sTarget;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
thePConn
|
|
296
|
+
.getActionsApi()
|
|
297
|
+
.openAssignment(id, classname, options)
|
|
298
|
+
.then(() => {
|
|
299
|
+
if (bLogging) {
|
|
300
|
+
console.log(`openAssignment completed`);
|
|
301
|
+
}
|
|
302
|
+
})
|
|
303
|
+
.catch(() => {
|
|
304
|
+
showToast(`Submit failed!`);
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const renderTaskId = (type, getPConnect, showTodoList, assignment) => {
|
|
309
|
+
const displayID = getID(assignment);
|
|
310
|
+
|
|
311
|
+
if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {
|
|
312
|
+
/* Supress link for todo inside flow step */
|
|
313
|
+
return (
|
|
314
|
+
<Button
|
|
315
|
+
size='small'
|
|
316
|
+
color='primary'
|
|
317
|
+
>{`${assignment.name} ${getID(assignment)}`}</Button>
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
return displayID;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
const getListItemComponent = (assignment) => {
|
|
324
|
+
const caseLocaleRef = PCore.getLocaleUtils().getCaseLocaleReference(
|
|
325
|
+
assignment.classname,
|
|
326
|
+
);
|
|
327
|
+
if (isDesktop) {
|
|
328
|
+
return (
|
|
329
|
+
<>
|
|
330
|
+
{localizedVal('In', localeCategory)}
|
|
331
|
+
{renderTaskId(type, getPConnect, showTodoList, assignment)}
|
|
332
|
+
{type === CONSTS.WORKLIST && assignment.status
|
|
333
|
+
? `\u2022 `
|
|
334
|
+
: undefined}
|
|
335
|
+
{type === CONSTS.WORKLIST && assignment.status ? (
|
|
336
|
+
<span className='psdk-todo-assignment-status'>
|
|
337
|
+
{localizedVal(assignment.status, '', caseLocaleRef)}
|
|
338
|
+
</span>
|
|
339
|
+
) : undefined}
|
|
340
|
+
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
341
|
+
</>
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
return (
|
|
345
|
+
<>
|
|
346
|
+
<Button
|
|
347
|
+
size='small'
|
|
348
|
+
color='primary'
|
|
349
|
+
>{`${assignment.name} ${getID(assignment)}`}</Button>
|
|
350
|
+
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
351
|
+
</>
|
|
352
|
+
);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const getCount = () =>
|
|
356
|
+
assignmentsSource
|
|
357
|
+
? assignmentsSource.length
|
|
358
|
+
: type === CONSTS.WORKLIST
|
|
359
|
+
? count
|
|
360
|
+
: 0;
|
|
361
|
+
|
|
362
|
+
const toDoContent = (
|
|
363
|
+
<>
|
|
364
|
+
{showTodoList && (
|
|
365
|
+
<CardHeader
|
|
366
|
+
title={
|
|
367
|
+
<Badge
|
|
368
|
+
badgeContent={getCount()}
|
|
369
|
+
overlap='rectangular'
|
|
370
|
+
color='primary'
|
|
371
|
+
>
|
|
372
|
+
<Typography variant='h6'>
|
|
373
|
+
{headerText}
|
|
374
|
+
</Typography>
|
|
375
|
+
</Badge>
|
|
376
|
+
}
|
|
377
|
+
/>
|
|
378
|
+
)}
|
|
379
|
+
<List>
|
|
380
|
+
{assignments.map((assignment) => (
|
|
381
|
+
<div
|
|
382
|
+
className='psdk-todo-avatar-header'
|
|
383
|
+
key={getAssignmentId(assignment)}
|
|
384
|
+
>
|
|
385
|
+
<Avatar className={classes.avatar} style={{ marginRight: '16px' }}>
|
|
386
|
+
{currentUserInitials}
|
|
387
|
+
</Avatar>
|
|
388
|
+
<div style={{ display: 'block' }}>
|
|
389
|
+
<Typography variant='h6'>
|
|
390
|
+
{localizedVal(assignment?.name, localeCategory)}
|
|
391
|
+
</Typography>
|
|
392
|
+
{`${localizedVal('In', localeCategory)} ${getID(assignment)} \u2022 ${localizedVal(
|
|
393
|
+
'Urgency',
|
|
394
|
+
localeCategory,
|
|
395
|
+
)} ${getPriority(assignment)}`}
|
|
396
|
+
</div>
|
|
397
|
+
{(!isConfirm || canPerform) && (
|
|
398
|
+
<div style={{ marginLeft: 'auto' }}>
|
|
399
|
+
<IconButton
|
|
400
|
+
id='go-btn'
|
|
401
|
+
onClick={() => clickGo(assignment)}
|
|
402
|
+
size='large'
|
|
403
|
+
>
|
|
404
|
+
<ArrowForwardIosOutlinedIcon />
|
|
405
|
+
</IconButton>
|
|
406
|
+
</div>
|
|
407
|
+
)}
|
|
408
|
+
</div>
|
|
409
|
+
))}
|
|
410
|
+
</List>
|
|
411
|
+
</>
|
|
412
|
+
);
|
|
413
|
+
|
|
414
|
+
return (
|
|
415
|
+
<>
|
|
416
|
+
{type === CONSTS.WORKLIST && (
|
|
417
|
+
<Card className={classes.root}>
|
|
418
|
+
{showTodoList && (
|
|
419
|
+
<CardHeader
|
|
420
|
+
title={
|
|
421
|
+
<Badge
|
|
422
|
+
badgeContent={getCount()}
|
|
423
|
+
overlap='rectangular'
|
|
424
|
+
color='primary'
|
|
425
|
+
>
|
|
426
|
+
<Typography variant='h6'>
|
|
427
|
+
{headerText}
|
|
428
|
+
</Typography>
|
|
429
|
+
</Badge>
|
|
430
|
+
}
|
|
431
|
+
avatar={
|
|
432
|
+
<Avatar className={classes.avatar}>
|
|
433
|
+
{currentUserInitials}
|
|
434
|
+
</Avatar>
|
|
435
|
+
}
|
|
436
|
+
/>
|
|
437
|
+
)}
|
|
438
|
+
<CardContent>
|
|
439
|
+
<List>
|
|
440
|
+
{assignments.map((assignment) => (
|
|
441
|
+
<ListItem
|
|
442
|
+
key={getAssignmentId(assignment)}
|
|
443
|
+
dense
|
|
444
|
+
divider
|
|
445
|
+
onClick={() => clickGo(assignment)}
|
|
446
|
+
secondaryAction={
|
|
447
|
+
<IconButton
|
|
448
|
+
onClick={() => clickGo(assignment)}
|
|
449
|
+
size='large'
|
|
450
|
+
>
|
|
451
|
+
<ArrowForwardIosOutlinedIcon />
|
|
452
|
+
</IconButton>
|
|
453
|
+
}
|
|
454
|
+
>
|
|
455
|
+
<ListItemText
|
|
456
|
+
primary={getAssignmentName(assignment)}
|
|
457
|
+
secondary={getListItemComponent(assignment)}
|
|
458
|
+
/>
|
|
459
|
+
</ListItem>
|
|
460
|
+
))}
|
|
461
|
+
</List>
|
|
462
|
+
</CardContent>
|
|
463
|
+
</Card>
|
|
464
|
+
)}
|
|
465
|
+
|
|
466
|
+
{type === CONSTS.TODO && !isConfirm && (
|
|
467
|
+
<Card className={classes.todoWrapper}>{toDoContent}</Card>
|
|
468
|
+
)}
|
|
469
|
+
{type === CONSTS.TODO && isConfirm && <>{toDoContent}</>}
|
|
470
|
+
|
|
471
|
+
{getCount() > 3 && (
|
|
472
|
+
<Box display='flex' justifyContent='center'>
|
|
473
|
+
{bShowMore ? (
|
|
474
|
+
<Button color='primary' onClick={_showMore}>
|
|
475
|
+
{showMoreLocalizedValue === 'show_more'
|
|
476
|
+
? 'Show more'
|
|
477
|
+
: showMoreLocalizedValue}
|
|
478
|
+
</Button>
|
|
479
|
+
) : (
|
|
480
|
+
<Button onClick={_showLess}>
|
|
481
|
+
{showlessLocalizedValue === 'show_less'
|
|
482
|
+
? 'Show less'
|
|
483
|
+
: showlessLocalizedValue}
|
|
484
|
+
</Button>
|
|
485
|
+
)}
|
|
486
|
+
</Box>
|
|
487
|
+
)}
|
|
488
|
+
|
|
489
|
+
<Snackbar
|
|
490
|
+
open={showSnackbar}
|
|
491
|
+
autoHideDuration={3000}
|
|
492
|
+
onClose={handleSnackbarClose}
|
|
493
|
+
message={snackbarMessage}
|
|
494
|
+
action={
|
|
495
|
+
<IconButton
|
|
496
|
+
size='small'
|
|
497
|
+
aria-label='close'
|
|
498
|
+
color='inherit'
|
|
499
|
+
onClick={handleSnackbarClose}
|
|
500
|
+
>
|
|
501
|
+
<CloseIcon fontSize='small' />
|
|
502
|
+
</IconButton>
|
|
503
|
+
}
|
|
504
|
+
/>
|
|
505
|
+
</>
|
|
506
|
+
);
|
|
507
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ToDo';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '@pega/sdk-react/dist/index.css';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import { AppSelector } from './AppSelector';
|
|
5
|
+
|
|
6
|
+
const outlet = document.getElementById('outlet');
|
|
7
|
+
if (outlet) {
|
|
8
|
+
createRoot(outlet).render(
|
|
9
|
+
<BrowserRouter>
|
|
10
|
+
<AppSelector />
|
|
11
|
+
</BrowserRouter>,
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"paths": {
|
|
8
|
+
"@pega/sdk-types": ["../../packages/sdk-types/src/index.ts"],
|
|
9
|
+
"@pega/sdk-react": ["../../packages/sdk-react/src/index.ts"]
|
|
10
|
+
},
|
|
11
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
12
|
+
"jsx": "react-jsx",
|
|
13
|
+
"strict": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"noEmit": true,
|
|
19
|
+
"typeRoots": ["../../node_modules/@types", "../../node_modules/@pega"],
|
|
20
|
+
"types": ["pcore-pconnect-typedefs"],
|
|
21
|
+
"noImplicitAny": false
|
|
22
|
+
},
|
|
23
|
+
"include": ["src", "vite.config.ts"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// Resolve paths from hoisted node_modules (npm workspaces hoist to monorepo root)
|
|
10
|
+
const constellationDist = path.join(
|
|
11
|
+
path.dirname(require.resolve('@pega/constellationjs/package.json')),
|
|
12
|
+
'dist',
|
|
13
|
+
);
|
|
14
|
+
const authLibDir = path.join(
|
|
15
|
+
path.dirname(require.resolve('@pega/auth/package.json')),
|
|
16
|
+
'lib',
|
|
17
|
+
'oauth-client',
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export default defineConfig({
|
|
21
|
+
plugins: [
|
|
22
|
+
react(),
|
|
23
|
+
viteStaticCopy({
|
|
24
|
+
targets: [
|
|
25
|
+
{
|
|
26
|
+
src: path.join(constellationDist, 'bootstrap-shell.js'),
|
|
27
|
+
dest: 'constellation',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
src: path.join(constellationDist, 'lib_asset.json'),
|
|
31
|
+
dest: 'constellation',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
src: path.join(constellationDist, 'constellation-core.*'),
|
|
35
|
+
dest: 'constellation/prerequisite',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
src: path.join(constellationDist, 'js'),
|
|
39
|
+
dest: 'constellation/prerequisite',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
src: path.join(authLibDir, 'authDone.html'),
|
|
43
|
+
dest: '.',
|
|
44
|
+
rename: 'auth.html',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
src: path.join(authLibDir, 'authDone.js'),
|
|
48
|
+
dest: '.',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
src: 'sdk-config.json',
|
|
52
|
+
dest: '.',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
src: 'assets/*',
|
|
56
|
+
dest: './constellation',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
}),
|
|
60
|
+
],
|
|
61
|
+
server: {
|
|
62
|
+
port: 3500,
|
|
63
|
+
open: true,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Agents
|
|
2
|
+
|
|
3
|
+
## SDK Component Developer
|
|
4
|
+
|
|
5
|
+
This agent specializes in creating and modifying Pega SDK components.
|
|
6
|
+
|
|
7
|
+
### Capabilities
|
|
8
|
+
|
|
9
|
+
- Creating new field, template, and widget components
|
|
10
|
+
- Registering components in the component map
|
|
11
|
+
- Debugging PConnect prop issues
|
|
12
|
+
- Handling form validation and state management
|
|
13
|
+
|
|
14
|
+
### Skills
|
|
15
|
+
|
|
16
|
+
- [pega-sdk-component](.github/skills/pega-sdk-component.md)
|
|
17
|
+
|
|
18
|
+
### Instructions
|
|
19
|
+
|
|
20
|
+
- Always follow the PConnect pattern for data binding
|
|
21
|
+
- Use MUI components for UI primitives
|
|
22
|
+
- Handle loading states and error states gracefully
|
|
23
|
+
- Ensure components are registered in the component map after creation
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Pega SDK Project
|
|
2
|
+
|
|
3
|
+
## Coding Guidelines
|
|
4
|
+
|
|
5
|
+
- Use TypeScript strict mode
|
|
6
|
+
- Follow the component patterns established in the `src/components/` directory
|
|
7
|
+
- Each component should handle its own PConnect props via `getPConnect()`
|
|
8
|
+
- Use MUI (Material UI) for UI primitives
|
|
9
|
+
- Register all components in `src/components/component-map.ts`
|
|
10
|
+
|
|
11
|
+
## Pega SDK Architecture
|
|
12
|
+
|
|
13
|
+
- **PConnect**: The bridge between Pega's DX engine and your UI components
|
|
14
|
+
- **ComponentRegistry**: Maps Pega component type names to your React/Angular/WC implementations
|
|
15
|
+
- **BootstrapClient**: Handles auth + loading the Pega runtime
|
|
16
|
+
- **PCore**: Global Pega runtime API (available after bootstrap)
|
|
17
|
+
|
|
18
|
+
## Key Patterns
|
|
19
|
+
|
|
20
|
+
### Creating a new field component
|
|
21
|
+
|
|
22
|
+
1. Create a file in `src/components/field/MyField/index.ts`
|
|
23
|
+
2. Accept `getPConnect` prop, extract `actionsApi` and `stateProps`
|
|
24
|
+
3. Call `actions.updateFieldValue()` on change and `actions.triggerFieldChange()` on blur
|
|
25
|
+
4. Register in `component-map.ts`
|
|
26
|
+
|
|
27
|
+
### Creating a new template component
|
|
28
|
+
|
|
29
|
+
1. Create in `src/components/template/MyTemplate/index.ts`
|
|
30
|
+
2. Use `pConn.getChildren()` to get child PConnect nodes
|
|
31
|
+
3. Render children via `<PConnectComponent getPConnect={() => child.getPConnect()} />`
|
|
32
|
+
|
|
33
|
+
## SDK Config
|
|
34
|
+
|
|
35
|
+
The `sdk-config.json` file configures:
|
|
36
|
+
|
|
37
|
+
- `serverConfig.infinityRestServerUrl` — Pega server endpoint
|
|
38
|
+
- `serverConfig.appAlias` — Application alias
|
|
39
|
+
- `authConfig.mashupClientId` — OAuth client ID for embedded mode
|
|
40
|
+
- `authConfig.portalClientId` — OAuth client ID for portal mode
|