@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
package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/Operator.tsx
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import TextField from '@mui/material/TextField';
|
|
3
|
+
import Popover from '@mui/material/Popover';
|
|
4
|
+
import Grid from '@mui/material/Grid';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
7
|
+
|
|
8
|
+
import Utils from '../../helpers/utils';
|
|
9
|
+
import type { PConnProps } from '@pega/sdk-react';
|
|
10
|
+
|
|
11
|
+
// Operator is one of the few components that does NOT have getPConnect.
|
|
12
|
+
// So, no need to extend PConnProps
|
|
13
|
+
interface OperatorProps extends PConnProps {
|
|
14
|
+
// If any, enter additional props that only exist on this component
|
|
15
|
+
label: string;
|
|
16
|
+
createDateTime: string;
|
|
17
|
+
createLabel: string;
|
|
18
|
+
createOperator: { userName: string; userId: string };
|
|
19
|
+
updateDateTime: string;
|
|
20
|
+
updateLabel: string;
|
|
21
|
+
updateOperator: { userName: string; userId: string };
|
|
22
|
+
displayLabel?: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const useStyles = makeStyles(theme => ({
|
|
26
|
+
root: {
|
|
27
|
+
padding: theme.spacing(1),
|
|
28
|
+
margin: theme.spacing(1)
|
|
29
|
+
},
|
|
30
|
+
popover: {
|
|
31
|
+
padding: theme.spacing(1),
|
|
32
|
+
margin: theme.spacing(1)
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
export default function Operator(props: OperatorProps) {
|
|
37
|
+
// const componentName = "Operator";
|
|
38
|
+
const classes = useStyles();
|
|
39
|
+
|
|
40
|
+
const fieldLabel = props?.label?.toLowerCase();
|
|
41
|
+
const displayLabel = props?.displayLabel?.toLowerCase();
|
|
42
|
+
let caseOpLabel = '---';
|
|
43
|
+
let caseOpName = '---';
|
|
44
|
+
let caseOpId = '';
|
|
45
|
+
let caseTime = '';
|
|
46
|
+
|
|
47
|
+
if (fieldLabel === 'create operator' || displayLabel === 'create operator') {
|
|
48
|
+
caseOpLabel = props.createLabel;
|
|
49
|
+
caseOpName = props.createOperator.userName;
|
|
50
|
+
caseTime = props.createDateTime;
|
|
51
|
+
caseOpId = props.createOperator.userId;
|
|
52
|
+
} else if (fieldLabel === 'update operator' || displayLabel === 'update operator') {
|
|
53
|
+
caseOpLabel = props.updateLabel;
|
|
54
|
+
caseOpName = props.updateOperator.userName;
|
|
55
|
+
caseTime = props.updateDateTime;
|
|
56
|
+
caseOpId = props.updateOperator.userId;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Popover-related
|
|
60
|
+
const [popoverAnchorEl, setPopoverAnchorEl] = useState(null);
|
|
61
|
+
const [popoverFields, setPopoverFields] = useState<any[]>([]);
|
|
62
|
+
|
|
63
|
+
const popoverOpen = Boolean(popoverAnchorEl);
|
|
64
|
+
const popoverId = popoverOpen ? 'operator-details-popover' : undefined;
|
|
65
|
+
|
|
66
|
+
const handlePopoverClose = () => {
|
|
67
|
+
setPopoverAnchorEl(null);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
function showOperatorDetails(event) {
|
|
71
|
+
const operatorPreviewPromise = PCore.getUserApi().getOperatorDetails(caseOpId);
|
|
72
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
73
|
+
const localeCategory = 'Operator';
|
|
74
|
+
|
|
75
|
+
operatorPreviewPromise.then((res: any) => {
|
|
76
|
+
const fillerString = '---';
|
|
77
|
+
let fields: any = [];
|
|
78
|
+
if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {
|
|
79
|
+
fields = [
|
|
80
|
+
{
|
|
81
|
+
id: 'pyPosition',
|
|
82
|
+
name: localizedVal('Position', localeCategory),
|
|
83
|
+
value: res.data.pyOperatorInfo.pyPosition ? res.data.pyOperatorInfo.pyPosition : fillerString
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'pyOrganization',
|
|
87
|
+
name: localizedVal('Organization', localeCategory),
|
|
88
|
+
value: res.data.pyOperatorInfo.pyOrganization ? res.data.pyOperatorInfo.pyOrganization : fillerString
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'ReportToUserName',
|
|
92
|
+
name: localizedVal('Reports to', localeCategory),
|
|
93
|
+
value: res.data.pyOperatorInfo.pyReportToUserName ? res.data.pyOperatorInfo.pyReportToUserName : fillerString
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'pyTelephone',
|
|
97
|
+
name: localizedVal('Telephone', localeCategory),
|
|
98
|
+
value: res.data.pyOperatorInfo.pyTelephone ? (
|
|
99
|
+
<a href={`tel:${res.data.pyOperatorInfo.pyTelephone}`}>{res.data.pyOperatorInfo.pyTelephone}</a>
|
|
100
|
+
) : (
|
|
101
|
+
fillerString
|
|
102
|
+
)
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'pyEmailAddress',
|
|
106
|
+
name: localizedVal('Email address', localeCategory),
|
|
107
|
+
value: res.data.pyOperatorInfo.pyEmailAddress ? (
|
|
108
|
+
<a href={`mailto:${res.data.pyOperatorInfo.pyEmailAddress}`}>{res.data.pyOperatorInfo.pyEmailAddress}</a>
|
|
109
|
+
) : (
|
|
110
|
+
fillerString
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
} else {
|
|
115
|
+
console.log(
|
|
116
|
+
`Operator: PCore.getUserApi().getOperatorDetails(${caseOpId}); returned empty res.data.pyOperatorInfo.pyUserName - adding default`
|
|
117
|
+
);
|
|
118
|
+
fields = [
|
|
119
|
+
{
|
|
120
|
+
id: 'pyPosition',
|
|
121
|
+
name: localizedVal('Position', localeCategory),
|
|
122
|
+
value: fillerString
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'pyOrganization',
|
|
126
|
+
name: localizedVal('Organization', localeCategory),
|
|
127
|
+
value: fillerString
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 'ReportToUserName',
|
|
131
|
+
name: localizedVal('Reports to', localeCategory),
|
|
132
|
+
value: fillerString
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'pyTelephone',
|
|
136
|
+
name: localizedVal('Telephone', localeCategory),
|
|
137
|
+
value: fillerString
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 'pyEmailAddress',
|
|
141
|
+
name: localizedVal('Email address', localeCategory),
|
|
142
|
+
value: fillerString
|
|
143
|
+
}
|
|
144
|
+
];
|
|
145
|
+
}
|
|
146
|
+
// Whatever the fields are, update the component's popoverFields
|
|
147
|
+
setPopoverFields(fields);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
setPopoverAnchorEl(event.currentTarget);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function getPopoverGrid() {
|
|
154
|
+
// return popoverFields.map((field) => {
|
|
155
|
+
// return <div className={classes.popover}>{field.name}: {field.value}</div>
|
|
156
|
+
// })
|
|
157
|
+
|
|
158
|
+
if (popoverFields.length === 0) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// There are fields, so build the grid.
|
|
163
|
+
return (
|
|
164
|
+
<Grid container className={classes.popover} spacing={1}>
|
|
165
|
+
<Grid size={{ xs: 12 }}>
|
|
166
|
+
<Typography variant='h6'>{caseOpName}</Typography>
|
|
167
|
+
</Grid>
|
|
168
|
+
{popoverFields.map(field => {
|
|
169
|
+
return (
|
|
170
|
+
<React.Fragment key={field.id}>
|
|
171
|
+
<Grid container size={{ xs: 12 }} spacing={1}>
|
|
172
|
+
<Grid size={{ xs: 6 }}>
|
|
173
|
+
<Typography variant='caption'>{field.name}</Typography>
|
|
174
|
+
</Grid>
|
|
175
|
+
<Grid size={{ xs: 6 }}>
|
|
176
|
+
<Typography variant='subtitle2'>{field.value}</Typography>
|
|
177
|
+
</Grid>
|
|
178
|
+
</Grid>
|
|
179
|
+
</React.Fragment>
|
|
180
|
+
);
|
|
181
|
+
})}
|
|
182
|
+
</Grid>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// End of popover-related
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
<>
|
|
190
|
+
<TextField
|
|
191
|
+
variant='standard'
|
|
192
|
+
defaultValue={caseOpName}
|
|
193
|
+
label={caseOpLabel}
|
|
194
|
+
onClick={showOperatorDetails}
|
|
195
|
+
slotProps={{
|
|
196
|
+
input: {
|
|
197
|
+
readOnly: true,
|
|
198
|
+
disableUnderline: true,
|
|
199
|
+
inputProps: { style: { cursor: 'pointer' } }
|
|
200
|
+
}
|
|
201
|
+
}}
|
|
202
|
+
/>
|
|
203
|
+
<br />
|
|
204
|
+
{Utils.generateDateTime(caseTime, 'DateTime-Since')}
|
|
205
|
+
<Popover
|
|
206
|
+
id={popoverId}
|
|
207
|
+
open={popoverOpen}
|
|
208
|
+
anchorEl={popoverAnchorEl}
|
|
209
|
+
onClose={handlePopoverClose}
|
|
210
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
|
211
|
+
transformOrigin={{ vertical: 'top', horizontal: 'center' }}
|
|
212
|
+
slotProps={{
|
|
213
|
+
paper: { style: { maxWidth: '45ch' } }
|
|
214
|
+
}}
|
|
215
|
+
>
|
|
216
|
+
{getPopoverGrid()}
|
|
217
|
+
</Popover>
|
|
218
|
+
</>
|
|
219
|
+
);
|
|
220
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Operator';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import { Card, CardContent, CardHeader, Typography } from '@mui/material';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
|
+
|
|
5
|
+
// Pulse is one of the few components that does NOT have getPConnect.
|
|
6
|
+
// So, no need to extend PConnProps
|
|
7
|
+
interface PulseProps {
|
|
8
|
+
// If any, enter additional props that only exist on this component
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const useStyles = makeStyles(theme => ({
|
|
12
|
+
root: {
|
|
13
|
+
marginTop: theme.spacing(1),
|
|
14
|
+
marginBottom: theme.spacing(1),
|
|
15
|
+
borderLeft: '6px solid',
|
|
16
|
+
borderLeftColor: theme.palette.primary.light
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
export default function Pulse(props: PropsWithChildren<PulseProps>) {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
|
+
const { children } = props;
|
|
23
|
+
const classes = useStyles();
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Card className={classes.root}>
|
|
27
|
+
<CardHeader title={<Typography variant='h6'>Pulse</Typography>} />
|
|
28
|
+
<CardContent>
|
|
29
|
+
<Typography>Pulse</Typography>
|
|
30
|
+
</CardContent>
|
|
31
|
+
</Card>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Pulse';
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { Editor } from '@tinymce/tinymce-react';
|
|
3
|
+
import {
|
|
4
|
+
FormControl,
|
|
5
|
+
FormHelperText,
|
|
6
|
+
InputLabel,
|
|
7
|
+
useTheme,
|
|
8
|
+
} from '@mui/material';
|
|
9
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
10
|
+
import {
|
|
11
|
+
useAfterInitialEffect,
|
|
12
|
+
useConsolidatedRef,
|
|
13
|
+
useUID,
|
|
14
|
+
} from '@pega/sdk-react';
|
|
15
|
+
|
|
16
|
+
const useStyles = makeStyles((theme) => ({
|
|
17
|
+
fieldLabel: {
|
|
18
|
+
position: 'relative',
|
|
19
|
+
transform: 'translate(0, 0px) scale(1)',
|
|
20
|
+
marginBottom: '5px',
|
|
21
|
+
color: theme.palette.text.secondary,
|
|
22
|
+
},
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
interface RichTextEditorProps {
|
|
26
|
+
id?: string;
|
|
27
|
+
defaultValue: string;
|
|
28
|
+
label: string;
|
|
29
|
+
labelHidden: boolean;
|
|
30
|
+
info: string;
|
|
31
|
+
testId: string;
|
|
32
|
+
placeholder: string;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
required: boolean;
|
|
35
|
+
readOnly: boolean;
|
|
36
|
+
error: boolean;
|
|
37
|
+
onBlur: React.EventHandler<any>;
|
|
38
|
+
onChange: React.EventHandler<any>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const RichTextEditor = forwardRef(function RichTextEditor(
|
|
42
|
+
props: RichTextEditorProps,
|
|
43
|
+
ref,
|
|
44
|
+
) {
|
|
45
|
+
const theme = useTheme();
|
|
46
|
+
const classes = useStyles();
|
|
47
|
+
const uid = useUID();
|
|
48
|
+
const {
|
|
49
|
+
id = uid,
|
|
50
|
+
defaultValue,
|
|
51
|
+
label,
|
|
52
|
+
labelHidden,
|
|
53
|
+
info,
|
|
54
|
+
testId,
|
|
55
|
+
placeholder,
|
|
56
|
+
disabled,
|
|
57
|
+
required,
|
|
58
|
+
readOnly,
|
|
59
|
+
error,
|
|
60
|
+
onBlur,
|
|
61
|
+
onChange,
|
|
62
|
+
} = props;
|
|
63
|
+
|
|
64
|
+
const editorRef: any = useConsolidatedRef(ref);
|
|
65
|
+
let richTextComponent: any = null;
|
|
66
|
+
|
|
67
|
+
useAfterInitialEffect(() => {
|
|
68
|
+
editorRef?.current.mode.set(readOnly || disabled ? 'readonly' : 'design');
|
|
69
|
+
}, [readOnly, disabled]);
|
|
70
|
+
|
|
71
|
+
const filePickerCallback = (cb) => {
|
|
72
|
+
const input = document.createElement('input');
|
|
73
|
+
input.setAttribute('type', 'file');
|
|
74
|
+
input.setAttribute('accept', 'image/*');
|
|
75
|
+
|
|
76
|
+
input.addEventListener('change', (e: any) => {
|
|
77
|
+
const file = e.target.files[0];
|
|
78
|
+
|
|
79
|
+
const reader: any = new FileReader();
|
|
80
|
+
reader.addEventListener('load', () => {
|
|
81
|
+
/*
|
|
82
|
+
Note: Now we need to register the blob in TinyMCEs image blob
|
|
83
|
+
registry. In the next release this part hopefully won't be
|
|
84
|
+
necessary, as we are looking to handle it internally.
|
|
85
|
+
*/
|
|
86
|
+
const blobId = `blobid${new Date().getTime()}`;
|
|
87
|
+
const blobCache = editorRef.current.editorUpload.blobCache;
|
|
88
|
+
const base64 = reader.result.split(',')[1];
|
|
89
|
+
const blobInfo = blobCache.create(blobId, file, base64);
|
|
90
|
+
blobCache.add(blobInfo);
|
|
91
|
+
|
|
92
|
+
/* call the callback and populate the Title field with the file name */
|
|
93
|
+
cb(blobInfo.blobUri(), { title: file.name });
|
|
94
|
+
});
|
|
95
|
+
reader.readAsDataURL(file);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
input.click();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
if (readOnly) {
|
|
102
|
+
const value = defaultValue || '--';
|
|
103
|
+
|
|
104
|
+
richTextComponent = (
|
|
105
|
+
<div
|
|
106
|
+
key={id}
|
|
107
|
+
id={id}
|
|
108
|
+
className='readonly-richtext-editor'
|
|
109
|
+
dangerouslySetInnerHTML={{ __html: value }}
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
} else {
|
|
113
|
+
richTextComponent = (
|
|
114
|
+
<Editor
|
|
115
|
+
tinymceScriptSrc='tinymce/tinymce.min.js'
|
|
116
|
+
onInit={(_evt, editor) => {
|
|
117
|
+
editorRef.current = editor;
|
|
118
|
+
}}
|
|
119
|
+
id={id}
|
|
120
|
+
initialValue={defaultValue}
|
|
121
|
+
disabled={disabled}
|
|
122
|
+
init={{
|
|
123
|
+
skin: theme.palette.mode === 'dark' ? 'oxide-dark' : 'oxide',
|
|
124
|
+
// ...other TinyMCE config...
|
|
125
|
+
content_style: `
|
|
126
|
+
body {
|
|
127
|
+
font-family: ${theme.typography.fontFamily};
|
|
128
|
+
font-size: ${theme.typography.fontSize}px;
|
|
129
|
+
color: ${theme.palette.text.primary};
|
|
130
|
+
background: ${theme.palette.background.paper};
|
|
131
|
+
}
|
|
132
|
+
a { color: ${theme.palette.primary.main}; }
|
|
133
|
+
h1, h2, h3, h4, h5, h6 { color: ${theme.palette.text.primary}; font-family: ${theme.typography.fontFamily}; }
|
|
134
|
+
blockquote { color: ${theme.palette.text.secondary}; border-left: 4px solid ${theme.palette.primary.light}; padding-left: 8px; }
|
|
135
|
+
ul, ol { color: ${theme.palette.text.primary}; }
|
|
136
|
+
input, textarea, select {
|
|
137
|
+
background: ${theme.palette.background.paper};
|
|
138
|
+
color: ${theme.palette.text.primary};
|
|
139
|
+
border: 1px solid ${theme.palette.divider};
|
|
140
|
+
border-radius: 4px;
|
|
141
|
+
padding: 6px 10px;
|
|
142
|
+
font-size: 1em;
|
|
143
|
+
font-family: inherit;
|
|
144
|
+
}
|
|
145
|
+
.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
|
|
146
|
+
color: ${theme.palette.text.secondary};
|
|
147
|
+
opacity: 0.7;
|
|
148
|
+
}
|
|
149
|
+
/* Add more styles as needed */
|
|
150
|
+
`,
|
|
151
|
+
placeholder,
|
|
152
|
+
menubar: false,
|
|
153
|
+
statusbar: false,
|
|
154
|
+
min_height: 130,
|
|
155
|
+
plugins: [
|
|
156
|
+
'lists',
|
|
157
|
+
'advlist',
|
|
158
|
+
'autolink',
|
|
159
|
+
'image',
|
|
160
|
+
'link',
|
|
161
|
+
'autoresize',
|
|
162
|
+
],
|
|
163
|
+
autoresize_bottom_margin: 0,
|
|
164
|
+
toolbar: disabled
|
|
165
|
+
? false
|
|
166
|
+
: 'blocks | bold italic strikethrough | bullist numlist outdent indent | link image',
|
|
167
|
+
toolbar_location: 'bottom',
|
|
168
|
+
// content_style: 'body { font-family:Helvetica, Arial,sans-serif; font-size:14px }',
|
|
169
|
+
branding: false,
|
|
170
|
+
paste_data_images: true,
|
|
171
|
+
file_picker_types: 'image',
|
|
172
|
+
file_picker_callback: filePickerCallback,
|
|
173
|
+
}}
|
|
174
|
+
onBlur={onBlur}
|
|
175
|
+
onEditorChange={onChange}
|
|
176
|
+
/>
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<FormControl
|
|
182
|
+
variant='standard'
|
|
183
|
+
data-test-id={testId}
|
|
184
|
+
error={error}
|
|
185
|
+
required={required}
|
|
186
|
+
>
|
|
187
|
+
{!labelHidden && (
|
|
188
|
+
<InputLabel
|
|
189
|
+
id='demo-simple-select-error-label'
|
|
190
|
+
className={classes.fieldLabel}
|
|
191
|
+
>
|
|
192
|
+
{label}
|
|
193
|
+
</InputLabel>
|
|
194
|
+
)}
|
|
195
|
+
{richTextComponent}
|
|
196
|
+
{info && <FormHelperText>{info}</FormHelperText>}
|
|
197
|
+
</FormControl>
|
|
198
|
+
);
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
export default RichTextEditor;
|
package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/index.tsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './RichTextEditor';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.quick-link-ul-list {
|
|
2
|
+
list-style: none;
|
|
3
|
+
padding: 0;
|
|
4
|
+
grid-template-columns: repeat(auto-fit, minmax(min(20ch, 100%), 1fr));
|
|
5
|
+
display: grid;
|
|
6
|
+
gap: calc(1rem);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.quick-link-button {
|
|
10
|
+
text-transform: capitalize !important;
|
|
11
|
+
font-size: 16px !important;
|
|
12
|
+
color: var(--app-text-color) !important;
|
|
13
|
+
height: 10rem;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.quick-link-icon {
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
object-fit: contain;
|
|
20
|
+
width: 3rem;
|
|
21
|
+
height: 3rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.quick-link-button-span {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 0.5rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.quick-link-heading {
|
|
32
|
+
margin-top: 8px;
|
|
33
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Button } from '@mui/material';
|
|
2
|
+
import { makeStyles } from '@mui/styles';
|
|
3
|
+
import './WssQuickCreate.css';
|
|
4
|
+
|
|
5
|
+
// WssQuickCreate is one of the few components that does NOT have getPConnect.
|
|
6
|
+
// So, no need to extend PConnProps
|
|
7
|
+
interface WssQuickCreateProps {
|
|
8
|
+
// If any, enter additional props that only exist on this component
|
|
9
|
+
heading: string;
|
|
10
|
+
actions?: any[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const useStyles = makeStyles(theme => ({
|
|
14
|
+
quickLinkList: {
|
|
15
|
+
backgroundColor: theme.palette.mode === 'dark' ? 'var(--app-background-color)' : 'var(--link-button-color)',
|
|
16
|
+
color: 'var(--app-text-color)',
|
|
17
|
+
borderRadius: '16px',
|
|
18
|
+
border: '1px solid var(--app-primary-color)'
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
export default function WssQuickCreate(props: WssQuickCreateProps) {
|
|
23
|
+
const { heading, actions } = props;
|
|
24
|
+
const classes = useStyles();
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div>
|
|
28
|
+
<h1 id='quick-links-heading' className='quick-links-heading'>
|
|
29
|
+
{heading}
|
|
30
|
+
</h1>
|
|
31
|
+
<ul id='quick-links' className='quick-link-ul-list'>
|
|
32
|
+
{actions &&
|
|
33
|
+
actions.map(element => {
|
|
34
|
+
return (
|
|
35
|
+
<li className={classes.quickLinkList} key={element.label}>
|
|
36
|
+
<Button className='quick-link-button' onClick={element.onClick}>
|
|
37
|
+
<span className='quick-link-button-span'>
|
|
38
|
+
{element.icon && <img className='quick-link-icon' src={element.icon} />}
|
|
39
|
+
<span>{element.label}</span>
|
|
40
|
+
</span>
|
|
41
|
+
</Button>
|
|
42
|
+
</li>
|
|
43
|
+
);
|
|
44
|
+
})}
|
|
45
|
+
</ul>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/index.tsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './WssQuickCreate';
|