@pega/sdk 0.0.3 → 0.0.4
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 +183 -183
- package/README.md +6 -6
- package/SECURITY.md +2 -1
- package/dist/index.js +12 -55
- package/package.json +7 -6
- package/templates/angular-sdk-reference/package.json +15 -15
- package/templates/angular-sdk-reference/tsconfig.json +2 -2
- package/templates/react-native-sdk-reference/App.tsx +2 -4
- package/templates/react-native-sdk-reference/package.json +6 -6
- package/templates/react-native-sdk-reference/tsconfig.json +2 -1
- package/templates/react-sdk-reference/.claude/instructions/component-map.md +1 -1
- package/templates/react-sdk-reference/.claude/instructions/field-component.md +4 -0
- package/templates/react-sdk-reference/.claude/instructions/template-component.md +2 -1
- package/templates/react-sdk-reference/.claude/instructions/widget-component.md +1 -0
- package/templates/react-sdk-reference/.claude/prompts/add-component.md +18 -10
- package/templates/react-sdk-reference/.claude/prompts/component-manifest.json +165 -83
- package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +26 -17
- package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +27 -13
- package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +42 -28
- package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +48 -34
- package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +25 -11
- package/templates/react-sdk-reference/.claude/prompts/identify-components.md +65 -65
- package/templates/react-sdk-reference/.claude/skills/component-contracts.md +99 -99
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +40 -38
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Banner.md +54 -51
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/CaseSummaryFields.md +51 -46
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/DetailsFields.md +32 -28
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +38 -35
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroupList.md +25 -23
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +29 -26
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Operator.md +32 -26
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +17 -15
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +85 -59
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/WssQuickCreate.md +49 -47
- package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +13 -11
- package/templates/react-sdk-reference/.claude/skills/field-components.md +9 -8
- package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +27 -26
- package/templates/react-sdk-reference/.claude/skills/field-skills/CancelAlert.md +30 -22
- package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +60 -43
- package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +23 -20
- package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +18 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/Decimal.md +22 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Dropdown.md +50 -30
- package/templates/react-sdk-reference/.claude/skills/field-skills/Email.md +20 -18
- package/templates/react-sdk-reference/.claude/skills/field-skills/Group.md +21 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +17 -16
- package/templates/react-sdk-reference/.claude/skills/field-skills/Location.md +30 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Multiselect.md +66 -42
- package/templates/react-sdk-reference/.claude/skills/field-skills/ObjectReference.md +27 -18
- package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +22 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +36 -17
- package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +56 -35
- package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +23 -12
- package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +41 -31
- package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +70 -55
- package/templates/react-sdk-reference/.claude/skills/field-skills/SemanticLink.md +34 -27
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextArea.md +24 -22
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextContent.md +38 -22
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +24 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +16 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +16 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/UserReference.md +57 -34
- package/templates/react-sdk-reference/.claude/skills/run-and-verify.md +10 -8
- package/templates/react-sdk-reference/.claude/skills/template-components.md +7 -8
- package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +27 -21
- package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +17 -15
- package/templates/react-sdk-reference/.claude/skills/template-skills/BannerPage.md +19 -16
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +19 -13
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +23 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +34 -29
- package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +18 -16
- package/templates/react-sdk-reference/.claude/skills/template-skills/DataReference.md +36 -32
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultForm.md +23 -21
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultPage.md +31 -29
- package/templates/react-sdk-reference/.claude/skills/template-skills/Details.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +22 -20
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsThreeColumn.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/DynamicTabs.md +15 -10
- package/templates/react-sdk-reference/.claude/skills/template-skills/FieldGroupTemplate.md +19 -16
- package/templates/react-sdk-reference/.claude/skills/template-skills/HierarchicalForm.md +18 -15
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboard.md +17 -13
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboardPage.md +10 -13
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListPage.md +9 -7
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +33 -30
- package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +13 -11
- package/templates/react-sdk-reference/.claude/skills/template-skills/NarrowWide.md +42 -40
- package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +25 -20
- package/templates/react-sdk-reference/.claude/skills/template-skills/PromotedFilters.md +25 -19
- package/templates/react-sdk-reference/.claude/skills/template-skills/SelfServiceCaseView.md +36 -29
- package/templates/react-sdk-reference/.claude/skills/template-skills/SimpleTable.md +31 -27
- package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +29 -24
- package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +14 -11
- package/templates/react-sdk-reference/.claude/skills/template-skills/TwoColumn.md +34 -32
- package/templates/react-sdk-reference/.claude/skills/template-skills/WideNarrow.md +48 -46
- package/templates/react-sdk-reference/.claude/skills/template-skills/WssNavBar.md +23 -19
- package/templates/react-sdk-reference/.claude/skills/widget-components.md +11 -22
- package/templates/react-sdk-reference/.claude/skills/widget-skills/AppAnnouncement.md +22 -20
- package/templates/react-sdk-reference/.claude/skills/widget-skills/Attachment.md +33 -28
- package/templates/react-sdk-reference/.claude/skills/widget-skills/CaseHistory.md +18 -15
- package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +43 -37
- package/templates/react-sdk-reference/.claude/skills/widget-skills/Followers.md +23 -19
- package/templates/react-sdk-reference/.claude/skills/widget-skills/QuickCreate.md +20 -16
- package/templates/react-sdk-reference/.claude/skills/widget-skills/SummaryItem.md +26 -24
- package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +43 -35
- package/templates/react-sdk-reference/.cursor/rules/prompts/component-manifest.json +165 -83
- package/templates/react-sdk-reference/.github/agents/implementation-expert.agent.md +135 -0
- package/templates/react-sdk-reference/.github/instructions/component-map.instructions.md +2 -2
- package/templates/react-sdk-reference/.github/instructions/dse-component.instructions.md +1 -1
- package/templates/react-sdk-reference/.github/instructions/field-component.instructions.md +5 -1
- package/templates/react-sdk-reference/.github/instructions/template-component.instructions.md +3 -2
- package/templates/react-sdk-reference/.github/instructions/widget-component.instructions.md +2 -1
- package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +58 -15
- package/templates/react-sdk-reference/.github/prompts/component-manifest.json +165 -83
- package/templates/react-sdk-reference/.github/prompts/generate-all-components.prompt.md +322 -65
- package/templates/react-sdk-reference/.github/prompts/generate-dse-components.prompt.md +124 -50
- package/templates/react-sdk-reference/.github/prompts/generate-field-components.prompt.md +145 -66
- package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md +146 -73
- package/templates/react-sdk-reference/.github/prompts/generate-widget-components.prompt.md +128 -49
- package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +65 -65
- package/templates/react-sdk-reference/.github/skills/component-contracts.md +99 -99
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/AlertBanner.md +40 -38
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +54 -51
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +51 -46
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +32 -28
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroup.md +38 -35
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +25 -23
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldValueList.md +29 -26
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +32 -26
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Pulse.md +17 -15
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/RichTextEditor.md +85 -59
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/WssQuickCreate.md +49 -47
- package/templates/react-sdk-reference/.github/skills/design-system-extension.md +13 -11
- package/templates/react-sdk-reference/.github/skills/field-components.md +9 -8
- package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +27 -26
- package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +30 -22
- package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +60 -43
- package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +23 -20
- package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +19 -17
- package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +18 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +22 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +50 -30
- package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +20 -18
- package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +21 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/Integer.md +17 -16
- package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +30 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Multiselect.md +66 -42
- package/templates/react-sdk-reference/.github/skills/field-skills/ObjectReference.md +27 -18
- package/templates/react-sdk-reference/.github/skills/field-skills/Percentage.md +22 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Phone.md +36 -17
- package/templates/react-sdk-reference/.github/skills/field-skills/RadioButtons.md +56 -35
- package/templates/react-sdk-reference/.github/skills/field-skills/RichText.md +23 -12
- package/templates/react-sdk-reference/.github/skills/field-skills/ScalarList.md +41 -31
- package/templates/react-sdk-reference/.github/skills/field-skills/SelectableCard.md +70 -55
- package/templates/react-sdk-reference/.github/skills/field-skills/SemanticLink.md +34 -27
- package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +24 -22
- package/templates/react-sdk-reference/.github/skills/field-skills/TextContent.md +38 -22
- package/templates/react-sdk-reference/.github/skills/field-skills/TextInput.md +24 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Time.md +16 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/URL.md +16 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +57 -34
- package/templates/react-sdk-reference/.github/skills/run-and-verify.md +10 -8
- package/templates/react-sdk-reference/.github/skills/template-components.md +7 -8
- package/templates/react-sdk-reference/.github/skills/template-skills/AdvancedSearch.md +27 -21
- package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +17 -15
- package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +19 -16
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseSummary.md +19 -13
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +23 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +34 -29
- package/templates/react-sdk-reference/.github/skills/template-skills/Confirmation.md +18 -16
- package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +36 -32
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +23 -21
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultPage.md +31 -29
- package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +19 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsSubTabs.md +22 -20
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +19 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsTwoColumn.md +19 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +15 -10
- package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +19 -16
- package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +18 -15
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +17 -13
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +10 -13
- package/templates/react-sdk-reference/.github/skills/template-skills/ListPage.md +9 -7
- package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +33 -30
- package/templates/react-sdk-reference/.github/skills/template-skills/MultiReferenceReadOnly.md +13 -11
- package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +42 -40
- package/templates/react-sdk-reference/.github/skills/template-skills/OneColumn.md +25 -20
- package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +25 -19
- package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +36 -29
- package/templates/react-sdk-reference/.github/skills/template-skills/SimpleTable.md +31 -27
- package/templates/react-sdk-reference/.github/skills/template-skills/SingleReferenceReadOnly.md +29 -24
- package/templates/react-sdk-reference/.github/skills/template-skills/SubTabs.md +14 -11
- package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +34 -32
- package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +48 -46
- package/templates/react-sdk-reference/.github/skills/template-skills/WssNavBar.md +23 -19
- package/templates/react-sdk-reference/.github/skills/widget-components.md +11 -22
- package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +22 -20
- package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +33 -28
- package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +18 -15
- package/templates/react-sdk-reference/.github/skills/widget-skills/FileUtility.md +43 -37
- package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +23 -19
- package/templates/react-sdk-reference/.github/skills/widget-skills/QuickCreate.md +20 -16
- package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +26 -24
- package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +43 -35
- package/templates/react-sdk-reference/AGENTS.md +0 -1
- package/templates/react-sdk-reference/index.html +1 -4
- package/templates/react-sdk-reference/package.json +15 -15
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-sdk-reference/src/AppSelector.tsx +6 -6
- package/templates/react-sdk-reference/src/FallbackComponent.tsx +2 -6
- package/templates/react-sdk-reference/src/MashupApp.styles.ts +269 -41
- package/templates/react-sdk-reference/src/MashupApp.tsx +186 -85
- package/templates/react-sdk-reference/src/PortalApp.tsx +10 -34
- package/templates/react-sdk-reference/src/components/component-map.ts +2 -7
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/AlertBanner.tsx +7 -28
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/Banner.tsx +12 -7
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +35 -33
- package/templates/react-sdk-reference/src/components/designSystemExtension/DetailsFields/DetailsFields.tsx +6 -27
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +15 -11
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +7 -7
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +18 -12
- package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/Operator.tsx +27 -25
- package/templates/react-sdk-reference/src/components/designSystemExtension/Pulse/Pulse.tsx +4 -4
- package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx +8 -40
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +9 -9
- package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +26 -20
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +35 -17
- package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +27 -25
- package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +10 -6
- package/templates/react-sdk-reference/src/components/field/Currency/currency-utils.ts +1 -1
- package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +20 -7
- package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +23 -8
- package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +5 -5
- package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +45 -25
- package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +8 -8
- package/templates/react-sdk-reference/src/components/field/Group/Group.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +5 -5
- package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +21 -16
- package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +42 -27
- package/templates/react-sdk-reference/src/components/field/Multiselect/utils.ts +43 -29
- package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +53 -30
- package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +12 -11
- package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +6 -6
- package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +12 -12
- package/templates/react-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +38 -16
- package/templates/react-sdk-reference/src/components/field/RichText/RichText.tsx +17 -4
- package/templates/react-sdk-reference/src/components/field/ScalarList/ScalarList.tsx +5 -5
- package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +31 -18
- package/templates/react-sdk-reference/src/components/field/SelectableCard/utils.tsx +28 -20
- package/templates/react-sdk-reference/src/components/field/SemanticLink/SemanticLink.tsx +28 -19
- package/templates/react-sdk-reference/src/components/field/SemanticLink/utils.ts +3 -1
- package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +4 -4
- package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +4 -4
- package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +20 -7
- package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +7 -7
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +14 -14
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReferenceUtils.ts +2 -2
- package/templates/react-sdk-reference/src/components/helpers/case-utils.tsx +5 -5
- package/templates/react-sdk-reference/src/components/helpers/data_page.ts +3 -3
- package/templates/react-sdk-reference/src/components/helpers/date-format-utils.ts +5 -5
- package/templates/react-sdk-reference/src/components/helpers/field-group-utils.ts +2 -7
- package/templates/react-sdk-reference/src/components/helpers/formatters/Boolean.ts +9 -3
- package/templates/react-sdk-reference/src/components/helpers/formatters/Currency.ts +18 -6
- package/templates/react-sdk-reference/src/components/helpers/formatters/CurrencyMap.ts +168 -168
- package/templates/react-sdk-reference/src/components/helpers/formatters/Date.ts +5 -5
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +8 -5
- package/templates/react-sdk-reference/src/components/helpers/instructions-utils.ts +2 -2
- package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +54 -30
- package/templates/react-sdk-reference/src/components/helpers/state-utils.tsx +5 -2
- package/templates/react-sdk-reference/src/components/helpers/template-utils.ts +5 -4
- package/templates/react-sdk-reference/src/components/helpers/utils.ts +3 -3
- package/templates/react-sdk-reference/src/components/helpers/versionHelpers.ts +3 -1
- package/templates/react-sdk-reference/src/components/index.ts +1 -4
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/AdvancedSearch.tsx +18 -10
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts +3 -3
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +26 -90
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/hooks.ts +8 -5
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/utils.ts +8 -4
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/TemplateContext.ts +1 -1
- package/templates/react-sdk-reference/src/components/template/AppShell/AppShell.tsx +28 -19
- package/templates/react-sdk-reference/src/components/template/BannerPage/BannerPage.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +5 -5
- package/templates/react-sdk-reference/src/components/template/CaseView/CaseView.tsx +35 -16
- package/templates/react-sdk-reference/src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +10 -10
- package/templates/react-sdk-reference/src/components/template/Confirmation/Confirmation.tsx +12 -26
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReference.tsx +41 -124
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts +2 -2
- package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +18 -78
- package/templates/react-sdk-reference/src/components/template/DataReference/utils.ts +18 -12
- package/templates/react-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +4 -12
- package/templates/react-sdk-reference/src/components/template/DefaultForm/utils/index.ts +3 -3
- package/templates/react-sdk-reference/src/components/template/DefaultPage/DefaultPage.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/Details/Details/Details.tsx +6 -8
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +7 -14
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +7 -14
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/DynamicTabs.tsx +16 -8
- package/templates/react-sdk-reference/src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx +7 -4
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +20 -5
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/hooks.ts +35 -77
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +10 -10
- package/templates/react-sdk-reference/src/components/template/ListView/DefaultViewMeta.ts +31 -31
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +173 -133
- package/templates/react-sdk-reference/src/components/template/ListView/hooks.ts +17 -10
- package/templates/react-sdk-reference/src/components/template/ListView/utils.ts +64 -51
- package/templates/react-sdk-reference/src/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +6 -6
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/NarrowWide.tsx +6 -6
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +8 -18
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +7 -1
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/OneColumn.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/OneColumnTab.tsx +1 -1
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/PromotedFilters.tsx +13 -40
- package/templates/react-sdk-reference/src/components/template/SelfServiceCaseView/SelfServiceCaseView.tsx +19 -16
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/SimpleTable.tsx +8 -7
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +84 -203
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +15 -5
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.tsx +15 -29
- package/templates/react-sdk-reference/src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +7 -7
- package/templates/react-sdk-reference/src/components/template/SubTabs/SubTabs.tsx +1 -1
- package/templates/react-sdk-reference/src/components/template/SubTabs/tabUtils.ts +13 -11
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/TwoColumn.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/WideNarrow.tsx +6 -6
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +13 -24
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +7 -1
- package/templates/react-sdk-reference/src/components/template/WssNavBar/WssNavBar.tsx +25 -25
- package/templates/react-sdk-reference/src/components/template/utils.tsx +6 -6
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/AppAnnouncement.tsx +9 -9
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.tsx +125 -79
- package/templates/react-sdk-reference/src/components/widget/Attachment/AttachmentUtils.ts +58 -33
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/CaseHistory.tsx +14 -12
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +19 -7
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/FileUtility.tsx +137 -107
- package/templates/react-sdk-reference/src/components/widget/Followers/Followers.tsx +4 -4
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/QuickCreate.tsx +15 -11
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/SummaryItem.tsx +25 -18
- package/templates/react-sdk-reference/src/components/widget/SummaryList/SummaryList.tsx +7 -2
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +30 -116
- package/templates/react-sdk-reference/src/main.tsx +1 -1
- package/templates/react-sdk-reference/tsconfig.json +2 -1
- package/templates/react-sdk-reference/vite.config.ts +51 -26
- package/templates/wc-sdk-reference/package.json +3 -3
- package/templates/wc-sdk-reference/src/index.ts +10 -10
- package/templates/wc-sdk-reference/tsconfig.json +1 -0
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
createElement,
|
|
3
|
-
useCallback,
|
|
4
|
-
useContext,
|
|
5
|
-
useEffect,
|
|
6
|
-
useMemo,
|
|
7
|
-
useRef,
|
|
8
|
-
useState,
|
|
9
|
-
} from 'react';
|
|
1
|
+
import React, { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
2
|
import { Button, Grid, Select, MenuItem, Box } from '@mui/material';
|
|
11
3
|
|
|
12
4
|
import { PConnectComponent } from '@pega/sdk-react';
|
|
@@ -48,12 +40,7 @@ export const initializeSearchFields = (
|
|
|
48
40
|
let currentClassID = referenceListClassID;
|
|
49
41
|
valueSplit.forEach((item) => {
|
|
50
42
|
path = path.length ? `${path}.${item}` : item;
|
|
51
|
-
currentClassID = (
|
|
52
|
-
PCore.getMetadataUtils().getPropertyMetadata(
|
|
53
|
-
item,
|
|
54
|
-
currentClassID,
|
|
55
|
-
) as any
|
|
56
|
-
).pageClass;
|
|
43
|
+
currentClassID = (PCore.getMetadataUtils().getPropertyMetadata(item, currentClassID) as any).pageClass;
|
|
57
44
|
if (currentClassID) {
|
|
58
45
|
filtersProperties[`${path}.classID`] = currentClassID;
|
|
59
46
|
}
|
|
@@ -82,22 +69,13 @@ const flattenObj = (obj) => {
|
|
|
82
69
|
|
|
83
70
|
export default function SearchGroups(props) {
|
|
84
71
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
85
|
-
const {
|
|
86
|
-
getPConnect,
|
|
87
|
-
editableField,
|
|
88
|
-
localeReference,
|
|
89
|
-
setShowRecords,
|
|
90
|
-
searchSelectCacheKey,
|
|
91
|
-
cache,
|
|
92
|
-
} = props;
|
|
72
|
+
const { getPConnect, editableField, localeReference, setShowRecords, searchSelectCacheKey, cache } = props;
|
|
93
73
|
const referenceFieldName = editableField.replaceAll('.', '_');
|
|
94
74
|
|
|
95
75
|
const state: any = useRef({ searchFields: {}, activeGroupId: '' }).current;
|
|
96
|
-
const options =
|
|
97
|
-
componentCachePersistUtils.getComponentStateOptions(getPConnect);
|
|
76
|
+
const options = componentCachePersistUtils.getComponentStateOptions(getPConnect);
|
|
98
77
|
|
|
99
|
-
const { searchGroups: groups, referenceList } =
|
|
100
|
-
getPConnect().getConfigProps();
|
|
78
|
+
const { searchGroups: groups, referenceList } = getPConnect().getConfigProps();
|
|
101
79
|
const { useCache, initialActiveGroupId } = getCacheInfo(cache, groups);
|
|
102
80
|
const [activeGroupId, setActiveGroupId] = useState(initialActiveGroupId);
|
|
103
81
|
const [transientItemID, setTransientItemID] = useState<any>(null);
|
|
@@ -105,11 +83,8 @@ export default function SearchGroups(props) {
|
|
|
105
83
|
const viewName = getPConnect().getCurrentView();
|
|
106
84
|
|
|
107
85
|
const rawGroupsConfig = getPConnect().getRawConfigProps().searchGroups;
|
|
108
|
-
const activeGroupIndex = groups.findIndex(
|
|
109
|
-
|
|
110
|
-
);
|
|
111
|
-
const { children: searchFieldsChildren = [] } =
|
|
112
|
-
activeGroupIndex !== -1 ? rawGroupsConfig[activeGroupIndex] : {};
|
|
86
|
+
const activeGroupIndex = groups.findIndex((group) => group.config.id === activeGroupId);
|
|
87
|
+
const { children: searchFieldsChildren = [] } = activeGroupIndex !== -1 ? rawGroupsConfig[activeGroupIndex] : {};
|
|
113
88
|
const searchFields = searchFieldsChildren.map((field) => ({
|
|
114
89
|
...field,
|
|
115
90
|
config: { ...field.config, isSearchField: true },
|
|
@@ -118,8 +93,7 @@ export default function SearchGroups(props) {
|
|
|
118
93
|
const searchByRef = useRef(null);
|
|
119
94
|
const searchFieldsRef = useRef(null);
|
|
120
95
|
const isValidatorField = searchFields.some((field) => field.config.validator);
|
|
121
|
-
const { classID: referenceListClassID } =
|
|
122
|
-
PCore.getMetadataUtils().getDataPageMetadata(referenceList) as any;
|
|
96
|
+
const { classID: referenceListClassID } = PCore.getMetadataUtils().getDataPageMetadata(referenceList) as any;
|
|
123
97
|
|
|
124
98
|
const initialSearchFields = useMemo(
|
|
125
99
|
() =>
|
|
@@ -127,9 +101,7 @@ export default function SearchGroups(props) {
|
|
|
127
101
|
searchFields,
|
|
128
102
|
getPConnect,
|
|
129
103
|
referenceListClassID,
|
|
130
|
-
useCache && cache.activeGroupId === activeGroupId
|
|
131
|
-
? cache.searchFields
|
|
132
|
-
: {},
|
|
104
|
+
useCache && cache.activeGroupId === activeGroupId ? cache.searchFields : {},
|
|
133
105
|
),
|
|
134
106
|
[activeGroupId, getPConnect, cache.searchFields],
|
|
135
107
|
);
|
|
@@ -170,10 +142,7 @@ export default function SearchGroups(props) {
|
|
|
170
142
|
includeDisabledFields: true,
|
|
171
143
|
});
|
|
172
144
|
|
|
173
|
-
if (
|
|
174
|
-
Object.keys(cache.searchFields ?? {}).length > 0 &&
|
|
175
|
-
Object.keys(changes).length === 1
|
|
176
|
-
) {
|
|
145
|
+
if (Object.keys(cache.searchFields ?? {}).length > 0 && Object.keys(changes).length === 1) {
|
|
177
146
|
changes = cache.searchFields;
|
|
178
147
|
}
|
|
179
148
|
|
|
@@ -192,14 +161,11 @@ export default function SearchGroups(props) {
|
|
|
192
161
|
}
|
|
193
162
|
setPreviousFormValues(formValues);
|
|
194
163
|
setShowRecords(true);
|
|
195
|
-
PCore.getPubSubUtils().publish(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
viewName,
|
|
201
|
-
},
|
|
202
|
-
);
|
|
164
|
+
PCore.getPubSubUtils().publish(PCore.getEvents().getTransientEvent().UPDATE_PROMOTED_FILTERS, {
|
|
165
|
+
payload: formValues,
|
|
166
|
+
showRecords: true,
|
|
167
|
+
viewName,
|
|
168
|
+
});
|
|
203
169
|
}
|
|
204
170
|
|
|
205
171
|
state.activeGroupId = activeGroupId;
|
|
@@ -211,46 +177,25 @@ export default function SearchGroups(props) {
|
|
|
211
177
|
state,
|
|
212
178
|
options,
|
|
213
179
|
});
|
|
214
|
-
}, [
|
|
215
|
-
transientItemID,
|
|
216
|
-
setShowRecords,
|
|
217
|
-
viewName,
|
|
218
|
-
activeGroupId,
|
|
219
|
-
previousFormValues,
|
|
220
|
-
]);
|
|
180
|
+
}, [transientItemID, setShowRecords, viewName, activeGroupId, previousFormValues]);
|
|
221
181
|
|
|
222
182
|
const resetFilterData = useCallback(() => {
|
|
223
183
|
// @ts-ignore
|
|
224
184
|
PCore.getNavigationUtils().resetComponentCache(searchSelectCacheKey);
|
|
225
185
|
const resetPayload = {
|
|
226
186
|
transientItemID,
|
|
227
|
-
data: initializeSearchFields(
|
|
228
|
-
searchFields,
|
|
229
|
-
getPConnect,
|
|
230
|
-
referenceListClassID,
|
|
231
|
-
),
|
|
187
|
+
data: initializeSearchFields(searchFields, getPConnect, referenceListClassID),
|
|
232
188
|
options: { reset: true },
|
|
233
189
|
};
|
|
234
190
|
// @ts-ignore
|
|
235
191
|
PCore.getContainerUtils().updateTransientData(resetPayload);
|
|
236
192
|
}, [transientItemID, initialSearchFields]);
|
|
237
193
|
|
|
238
|
-
useCacheWhenListViewReady(
|
|
239
|
-
cache,
|
|
240
|
-
viewName,
|
|
241
|
-
useCache,
|
|
242
|
-
getFilterData,
|
|
243
|
-
searchSelectCacheKey,
|
|
244
|
-
);
|
|
194
|
+
useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey);
|
|
245
195
|
|
|
246
196
|
const searchDropdown = groups.length > 1 && (
|
|
247
197
|
<Grid container spacing={2}>
|
|
248
|
-
<Select
|
|
249
|
-
value={activeGroupId}
|
|
250
|
-
onChange={(e) => setActiveGroupId(e.target.value)}
|
|
251
|
-
ref={searchByRef}
|
|
252
|
-
fullWidth
|
|
253
|
-
>
|
|
198
|
+
<Select value={activeGroupId} onChange={(e) => setActiveGroupId(e.target.value)} ref={searchByRef} fullWidth>
|
|
254
199
|
{groups.map((group) => (
|
|
255
200
|
<MenuItem key={group.config.id} value={group.config.id}>
|
|
256
201
|
{group.config.label}
|
|
@@ -261,11 +206,11 @@ export default function SearchGroups(props) {
|
|
|
261
206
|
);
|
|
262
207
|
|
|
263
208
|
const actionButtons = (
|
|
264
|
-
<Box display=
|
|
265
|
-
<Button variant=
|
|
209
|
+
<Box display="flex" gap={2}>
|
|
210
|
+
<Button variant="outlined" onClick={resetFilterData}>
|
|
266
211
|
{localizedVal('Reset', 'SimpleTable')}
|
|
267
212
|
</Button>
|
|
268
|
-
<Button variant=
|
|
213
|
+
<Button variant="contained" onClick={getFilterData}>
|
|
269
214
|
{localizedVal('Search', 'SimpleTable')}
|
|
270
215
|
</Button>
|
|
271
216
|
</Box>
|
|
@@ -300,27 +245,18 @@ export default function SearchGroups(props) {
|
|
|
300
245
|
});
|
|
301
246
|
|
|
302
247
|
const templateContext = useContext(TemplateContext);
|
|
303
|
-
const templateContextValue = useMemo(
|
|
304
|
-
() => ({ ...templateContext, outerColumnCount: undefined }),
|
|
305
|
-
[],
|
|
306
|
-
);
|
|
248
|
+
const templateContextValue = useMemo(() => ({ ...templateContext, outerColumnCount: undefined }), []);
|
|
307
249
|
|
|
308
250
|
const searchFieldsViewComp = transientItemID ? (
|
|
309
251
|
<TemplateContext.Provider value={templateContextValue}>
|
|
310
|
-
<div ref={searchFieldsRef}>
|
|
311
|
-
{createElement(PConnectComponent, { ...searchFieldsC11nEnv })}
|
|
312
|
-
</div>
|
|
252
|
+
<div ref={searchFieldsRef}>{createElement(PConnectComponent, { ...searchFieldsC11nEnv })}</div>
|
|
313
253
|
</TemplateContext.Provider>
|
|
314
254
|
) : null;
|
|
315
255
|
|
|
316
|
-
const childrenToRender = [
|
|
317
|
-
searchDropdown,
|
|
318
|
-
searchFieldsViewComp,
|
|
319
|
-
actionButtons,
|
|
320
|
-
];
|
|
256
|
+
const childrenToRender = [searchDropdown, searchFieldsViewComp, actionButtons];
|
|
321
257
|
|
|
322
258
|
return (
|
|
323
|
-
<Box display=
|
|
259
|
+
<Box display="flex" flexDirection="column" gap={2}>
|
|
324
260
|
{childrenToRender.map((child, index) => (
|
|
325
261
|
<React.Fragment key={index}>{child}</React.Fragment>
|
|
326
262
|
))}
|
package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/hooks.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { useEffect } from 'react';
|
|
|
2
2
|
|
|
3
3
|
const listViewConstants = {
|
|
4
4
|
EVENTS: {
|
|
5
|
-
LIST_VIEW_READY: 'LIST_VIEW_READY'
|
|
6
|
-
}
|
|
5
|
+
LIST_VIEW_READY: 'LIST_VIEW_READY',
|
|
6
|
+
},
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* This hook registers a callback for the whenever list view component is ready
|
|
@@ -15,7 +15,7 @@ export function useCacheWhenListViewReady(
|
|
|
15
15
|
viewName: string,
|
|
16
16
|
useCache: boolean,
|
|
17
17
|
getFilterData: (params: { isCalledFromCache: boolean }) => void,
|
|
18
|
-
searchSelectCacheKey: string
|
|
18
|
+
searchSelectCacheKey: string,
|
|
19
19
|
) {
|
|
20
20
|
useEffect(() => {
|
|
21
21
|
if (Object.keys(cache.searchFields ?? {}).length > 0) {
|
|
@@ -26,12 +26,15 @@ export function useCacheWhenListViewReady(
|
|
|
26
26
|
getFilterData({ isCalledFromCache: true });
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
`${searchSelectCacheKey}-listview-ready
|
|
29
|
+
`${searchSelectCacheKey}-listview-ready`,
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
return () => {
|
|
34
|
-
PCore.getPubSubUtils().unsubscribe(
|
|
34
|
+
PCore.getPubSubUtils().unsubscribe(
|
|
35
|
+
listViewConstants.EVENTS.LIST_VIEW_READY,
|
|
36
|
+
`${searchSelectCacheKey}-listview-ready`,
|
|
37
|
+
);
|
|
35
38
|
};
|
|
36
39
|
}, []);
|
|
37
40
|
}
|
package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/utils.ts
CHANGED
|
@@ -10,13 +10,17 @@ function isEmpty(value: any): boolean {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function getCacheInfo(
|
|
13
|
-
cache: {
|
|
14
|
-
|
|
13
|
+
cache: {
|
|
14
|
+
selectedCategory: string;
|
|
15
|
+
activeGroupId: string;
|
|
16
|
+
searchFields: unknown;
|
|
17
|
+
},
|
|
18
|
+
groups: { config: { id: string } }[],
|
|
15
19
|
) {
|
|
16
20
|
let initialActiveGroupId = groups.length ? groups[0].config.id : '';
|
|
17
21
|
|
|
18
22
|
let useCache = false;
|
|
19
|
-
if (cache.activeGroupId && groups?.find(group => group.config.id === cache.activeGroupId)) {
|
|
23
|
+
if (cache.activeGroupId && groups?.find((group) => group.config.id === cache.activeGroupId)) {
|
|
20
24
|
initialActiveGroupId = cache.activeGroupId;
|
|
21
25
|
useCache = true;
|
|
22
26
|
}
|
|
@@ -25,5 +29,5 @@ export function getCacheInfo(
|
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
export function isValidInput(input: { [s: string]: unknown }) {
|
|
28
|
-
return Object.values(input).some(value => !isEmpty(value));
|
|
32
|
+
return Object.values(input).some((value) => !isEmpty(value));
|
|
29
33
|
}
|
|
@@ -28,21 +28,21 @@ interface AppShellProps extends PConnProps {
|
|
|
28
28
|
pageMessages: string[];
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const useStyles = makeStyles(theme => ({
|
|
31
|
+
const useStyles = makeStyles((theme) => ({
|
|
32
32
|
root: {},
|
|
33
33
|
content: {
|
|
34
34
|
flexGrow: 1,
|
|
35
35
|
height: '100vh',
|
|
36
36
|
overflow: 'auto',
|
|
37
37
|
marginLeft: theme.spacing(2),
|
|
38
|
-
marginRight: theme.spacing(2)
|
|
38
|
+
marginRight: theme.spacing(2),
|
|
39
39
|
},
|
|
40
40
|
wsscontent: {
|
|
41
41
|
flexGrow: 1,
|
|
42
42
|
height: '100vh',
|
|
43
43
|
marginLeft: theme.spacing(1),
|
|
44
|
-
marginRight: theme.spacing(1)
|
|
45
|
-
}
|
|
44
|
+
marginRight: theme.spacing(1),
|
|
45
|
+
},
|
|
46
46
|
}));
|
|
47
47
|
|
|
48
48
|
export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
@@ -62,7 +62,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
62
62
|
portalTemplate,
|
|
63
63
|
portalName,
|
|
64
64
|
portalLogo,
|
|
65
|
-
navDisplayOptions
|
|
65
|
+
navDisplayOptions,
|
|
66
66
|
} = props;
|
|
67
67
|
|
|
68
68
|
const [open, setOpen] = useState(true);
|
|
@@ -94,7 +94,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
94
94
|
let banners: any = null;
|
|
95
95
|
banners = hasBanner && (
|
|
96
96
|
<div style={{ display: 'flex', flexDirection: 'column', padding: '1em 0' }}>
|
|
97
|
-
<AlertBanner id=
|
|
97
|
+
<AlertBanner id="AppShell" variant="urgent" messages={messages} />
|
|
98
98
|
</div>
|
|
99
99
|
);
|
|
100
100
|
// Initial setting of appName and mapChildren
|
|
@@ -115,23 +115,27 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
115
115
|
|
|
116
116
|
/* TODO: We're setting the `pyPortalTemplate` for now, this would be handled by the CoreJS in the future releases */
|
|
117
117
|
if (portalTemplate === 'wss') {
|
|
118
|
-
PCore.getEnvironmentInfo().setEnvironmentInfo({
|
|
118
|
+
PCore.getEnvironmentInfo().setEnvironmentInfo({
|
|
119
|
+
...PCore.getEnvironmentInfo().environmentInfoObject,
|
|
120
|
+
pyPortalTemplate: 'wss',
|
|
121
|
+
} as any);
|
|
119
122
|
}
|
|
120
123
|
}, []);
|
|
121
124
|
|
|
122
125
|
useEffect(() => {
|
|
123
126
|
// @ts-expect-error
|
|
124
|
-
const caseTypesAvailableToCreateDP =
|
|
127
|
+
const caseTypesAvailableToCreateDP =
|
|
128
|
+
PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP;
|
|
125
129
|
if (caseTypesAvailableToCreateDP) {
|
|
126
130
|
const portalID = pConn.getValue('.pyOwner');
|
|
127
131
|
PCore.getDataPageUtils()
|
|
128
132
|
.getPageDataAsync(caseTypesAvailableToCreateDP, pConn.getContextName(), {
|
|
129
|
-
PortalName: portalID
|
|
133
|
+
PortalName: portalID,
|
|
130
134
|
})
|
|
131
135
|
.then((response: { pyCaseTypesAvailableToCreate?: any }) => {
|
|
132
136
|
if (response?.pyCaseTypesAvailableToCreate) {
|
|
133
137
|
pConn.replaceState('.pyCaseTypesAvailableToCreate', response.pyCaseTypesAvailableToCreate, {
|
|
134
|
-
skipDirtyValidation: true
|
|
138
|
+
skipDirtyValidation: true,
|
|
135
139
|
});
|
|
136
140
|
}
|
|
137
141
|
});
|
|
@@ -156,12 +160,14 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
156
160
|
else {
|
|
157
161
|
PCore.getAssetLoader()
|
|
158
162
|
.getSvcImageUrl(portalLogo)
|
|
159
|
-
.then(data => {
|
|
163
|
+
.then((data) => {
|
|
160
164
|
setIconURL(data);
|
|
161
165
|
setFullIconURL(data);
|
|
162
166
|
})
|
|
163
167
|
.catch(() => {
|
|
164
|
-
console.error(
|
|
168
|
+
console.error(
|
|
169
|
+
`${localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`,
|
|
170
|
+
);
|
|
165
171
|
});
|
|
166
172
|
}
|
|
167
173
|
}, [portalLogo]);
|
|
@@ -170,7 +176,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
170
176
|
if (imageKey && portalTemplate === 'wss') {
|
|
171
177
|
PCore.getAssetLoader()
|
|
172
178
|
.getSvcImageUrl(imageKey)
|
|
173
|
-
.then(imagePath => setImageBlobUrl(imagePath));
|
|
179
|
+
.then((imagePath) => setImageBlobUrl(imagePath));
|
|
174
180
|
}
|
|
175
181
|
}, []);
|
|
176
182
|
|
|
@@ -178,7 +184,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
178
184
|
return {
|
|
179
185
|
avatar: portalTemplate !== 'wss' ? <Avatar /> : { name: userName, imageSrc: imageBlobUrl },
|
|
180
186
|
name: userName,
|
|
181
|
-
currentUserInitials
|
|
187
|
+
currentUserInitials,
|
|
182
188
|
};
|
|
183
189
|
};
|
|
184
190
|
|
|
@@ -192,14 +198,17 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
192
198
|
|
|
193
199
|
const links = !pages
|
|
194
200
|
? []
|
|
195
|
-
: pages.map(page => {
|
|
201
|
+
: pages.map((page) => {
|
|
196
202
|
const name = localizedVal(page.pyLabel, '', localeReference);
|
|
197
203
|
return {
|
|
198
204
|
text: name,
|
|
199
205
|
name,
|
|
200
206
|
icon: page.pxPageViewIcon.replace('pi pi-', ''),
|
|
201
207
|
active: page.pyRuleName === activeTab,
|
|
202
|
-
onClick: () =>
|
|
208
|
+
onClick: () =>
|
|
209
|
+
!page.pyURLContent || page.pyURLContent === ''
|
|
210
|
+
? showPage(page.pyRuleName, page.pyClassName)
|
|
211
|
+
: openURL(page.pyURLContent),
|
|
203
212
|
};
|
|
204
213
|
});
|
|
205
214
|
|
|
@@ -213,7 +222,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
213
222
|
|
|
214
223
|
if (portalTemplate === 'wss') {
|
|
215
224
|
return (
|
|
216
|
-
<div id=
|
|
225
|
+
<div id="AppShell" className={classes.root}>
|
|
217
226
|
<WssNavBar
|
|
218
227
|
portalName={portalName}
|
|
219
228
|
imageSrc={iconURL}
|
|
@@ -222,7 +231,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
222
231
|
appInfo={{
|
|
223
232
|
imageSrc: iconURL,
|
|
224
233
|
appName: localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),
|
|
225
|
-
onClick: links[0] && /* links[0].onClick ? */ links[0].onClick /* : undefined
|
|
234
|
+
onClick: links[0] && /* links[0].onClick ? */ links[0].onClick /* : undefined */,
|
|
226
235
|
}}
|
|
227
236
|
navLinks={links.filter((link, index) => {
|
|
228
237
|
return index !== 0;
|
|
@@ -240,7 +249,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
240
249
|
|
|
241
250
|
return (
|
|
242
251
|
<NavContext.Provider value={{ open, setOpen }}>
|
|
243
|
-
<div id=
|
|
252
|
+
<div id="AppShell" className={classes.root} style={{ display: 'flex' }}>
|
|
244
253
|
<NavBar
|
|
245
254
|
getPConnect={getPConnect}
|
|
246
255
|
pConn={getPConnect()}
|
|
@@ -29,7 +29,7 @@ export default function BannerPage(props: PropsWithChildren<BannerPageProps>) {
|
|
|
29
29
|
imageTheme = 'light',
|
|
30
30
|
backgroundImage = '',
|
|
31
31
|
backgroundColor = '',
|
|
32
|
-
tintImage = false
|
|
32
|
+
tintImage = false,
|
|
33
33
|
} = props;
|
|
34
34
|
|
|
35
35
|
const childArray = useMemo(() => {
|
|
@@ -47,7 +47,7 @@ export default function BannerPage(props: PropsWithChildren<BannerPageProps>) {
|
|
|
47
47
|
title: heading,
|
|
48
48
|
message,
|
|
49
49
|
backgroundImage,
|
|
50
|
-
tintImage
|
|
50
|
+
tintImage,
|
|
51
51
|
}}
|
|
52
52
|
/>
|
|
53
53
|
);
|
|
@@ -29,8 +29,8 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
29
29
|
type,
|
|
30
30
|
children: children ? [...children] : [],
|
|
31
31
|
config: {
|
|
32
|
-
...config
|
|
33
|
-
}
|
|
32
|
+
...config,
|
|
33
|
+
},
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
caseSummaryComponentObject.value = createdComponent;
|
|
@@ -38,7 +38,7 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function prepareCaseSummaryData(summaryFieldChildren) {
|
|
41
|
-
const convertChildrenToSummaryData = kid => {
|
|
41
|
+
const convertChildrenToSummaryData = (kid) => {
|
|
42
42
|
return kid?.map((childItem, index) => {
|
|
43
43
|
const childMeta = childItem.getPConnect().meta;
|
|
44
44
|
const caseSummaryComponentObject = prepareComponentInCaseSummary(childMeta, childItem.getPConnect);
|
|
@@ -55,7 +55,7 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
55
55
|
const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());
|
|
56
56
|
if (childPConnData.name.toLowerCase() === 'primary fields') {
|
|
57
57
|
arPrimaryFields = childPConnData.children;
|
|
58
|
-
arPrimaryFields.forEach(field => {
|
|
58
|
+
arPrimaryFields.forEach((field) => {
|
|
59
59
|
if (field.config?.value && typeof field.config?.value === 'string') {
|
|
60
60
|
field.config.value = localizedVal(field.config.value, localeCategory);
|
|
61
61
|
}
|
|
@@ -71,7 +71,7 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
return (
|
|
74
|
-
<div id=
|
|
74
|
+
<div id="CaseSummary">
|
|
75
75
|
<CaseSummaryFields theFields={arPrimaryFields} />
|
|
76
76
|
<CaseSummaryFields theFields={arSecondaryFields} />
|
|
77
77
|
</div>
|
|
@@ -20,7 +20,7 @@ interface CaseViewProps extends PConnProps {
|
|
|
20
20
|
lastUpdateCaseTime: any;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const useStyles = makeStyles(theme => ({
|
|
23
|
+
const useStyles = makeStyles((theme) => ({
|
|
24
24
|
root: {
|
|
25
25
|
paddingRight: theme.spacing(1),
|
|
26
26
|
paddingLeft: theme.spacing(1),
|
|
@@ -29,19 +29,19 @@ const useStyles = makeStyles(theme => ({
|
|
|
29
29
|
marginRight: theme.spacing(1),
|
|
30
30
|
marginLeft: theme.spacing(1),
|
|
31
31
|
marginTop: theme.spacing(1),
|
|
32
|
-
marginBottom: theme.spacing(1)
|
|
32
|
+
marginBottom: theme.spacing(1),
|
|
33
33
|
},
|
|
34
34
|
caseViewHeader: {
|
|
35
35
|
backgroundColor: theme.palette.info.light,
|
|
36
36
|
color: theme.palette.getContrastText(theme.palette.info.light),
|
|
37
|
-
borderRadius: 'inherit'
|
|
37
|
+
borderRadius: 'inherit',
|
|
38
38
|
},
|
|
39
39
|
caseViewIconBox: {
|
|
40
40
|
backgroundColor: theme.palette.info.dark,
|
|
41
41
|
width: theme.spacing(8),
|
|
42
42
|
height: theme.spacing(8),
|
|
43
|
-
padding: theme.spacing(1)
|
|
44
|
-
}
|
|
43
|
+
padding: theme.spacing(1),
|
|
44
|
+
},
|
|
45
45
|
}));
|
|
46
46
|
|
|
47
47
|
export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
@@ -56,7 +56,14 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
56
56
|
header,
|
|
57
57
|
subheader,
|
|
58
58
|
children = [],
|
|
59
|
-
caseInfo: {
|
|
59
|
+
caseInfo: {
|
|
60
|
+
availableActions = [],
|
|
61
|
+
availableProcesses = [],
|
|
62
|
+
hasNewAttachments,
|
|
63
|
+
caseTypeID = '',
|
|
64
|
+
caseTypeName = '',
|
|
65
|
+
caseTypeIcon,
|
|
66
|
+
},
|
|
60
67
|
} = props;
|
|
61
68
|
const { lastUpdateCaseTime = getPConnect().getValue('caseInfo.lastUpdateTime') } = props;
|
|
62
69
|
const currentCaseID = props.caseInfo.ID;
|
|
@@ -67,7 +74,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
67
74
|
|
|
68
75
|
const classes = useStyles();
|
|
69
76
|
|
|
70
|
-
const editAction = availableActions.find(action => action.ID === 'pyUpdateCaseDetails');
|
|
77
|
+
const editAction = availableActions.find((action) => action.ID === 'pyUpdateCaseDetails');
|
|
71
78
|
|
|
72
79
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
73
80
|
const localizationService = thePConn.getLocalizationService();
|
|
@@ -124,7 +131,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
124
131
|
let { label, inheritedProps } = theTabCompConfig;
|
|
125
132
|
// For some tabs, "label" property is not avaialable in theTabCompConfig, so will get them from inheritedProps
|
|
126
133
|
if (!label) {
|
|
127
|
-
inheritedProps.forEach(inheritedProp => {
|
|
134
|
+
inheritedProps.forEach((inheritedProp) => {
|
|
128
135
|
if (inheritedProp.prop === 'label') {
|
|
129
136
|
label = inheritedProp.value;
|
|
130
137
|
}
|
|
@@ -166,7 +173,10 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
166
173
|
|
|
167
174
|
useEffect(() => {
|
|
168
175
|
if (hasNewAttachments) {
|
|
169
|
-
PCore.getPubSubUtils().publish(
|
|
176
|
+
PCore.getPubSubUtils().publish(
|
|
177
|
+
(PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,
|
|
178
|
+
true,
|
|
179
|
+
);
|
|
170
180
|
}
|
|
171
181
|
}, [hasNewAttachments]);
|
|
172
182
|
|
|
@@ -174,7 +184,11 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
174
184
|
const actionsAPI = thePConn.getActionsApi();
|
|
175
185
|
const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
|
|
176
186
|
|
|
177
|
-
openLocalAction(editAction.ID, {
|
|
187
|
+
openLocalAction(editAction.ID, {
|
|
188
|
+
...editAction,
|
|
189
|
+
containerName: 'modal',
|
|
190
|
+
type: 'express',
|
|
191
|
+
});
|
|
178
192
|
}
|
|
179
193
|
|
|
180
194
|
function getActionButtonsHtml(): any {
|
|
@@ -182,7 +196,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
182
196
|
<Box>
|
|
183
197
|
{editAction && (
|
|
184
198
|
<Button
|
|
185
|
-
id=
|
|
199
|
+
id="edit"
|
|
186
200
|
onClick={() => {
|
|
187
201
|
_editClick();
|
|
188
202
|
}}
|
|
@@ -207,24 +221,24 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
207
221
|
return (
|
|
208
222
|
<Grid container>
|
|
209
223
|
<Grid size={{ xs: 3 }}>
|
|
210
|
-
<div hidden={true} id=
|
|
224
|
+
<div hidden={true} id="current-caseID">
|
|
211
225
|
{currentCaseID}
|
|
212
226
|
</div>
|
|
213
227
|
<Card className={classes.root}>
|
|
214
228
|
<CardHeader
|
|
215
229
|
className={classes.caseViewHeader}
|
|
216
230
|
title={
|
|
217
|
-
<Typography variant=
|
|
231
|
+
<Typography variant="h6" component="div" id="case-name">
|
|
218
232
|
{localizationService.getLocalizedText(header)}
|
|
219
233
|
</Typography>
|
|
220
234
|
}
|
|
221
235
|
subheader={
|
|
222
|
-
<Typography variant=
|
|
236
|
+
<Typography variant="body1" component="div" id="caseId">
|
|
223
237
|
{subheader}
|
|
224
238
|
</Typography>
|
|
225
239
|
}
|
|
226
240
|
avatar={
|
|
227
|
-
<Avatar className={classes.caseViewIconBox} variant=
|
|
241
|
+
<Avatar className={classes.caseViewIconBox} variant="square">
|
|
228
242
|
<img src={caseSvgIconUrl} />
|
|
229
243
|
</Avatar>
|
|
230
244
|
}
|
|
@@ -241,7 +255,12 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
241
255
|
{theStagesRegion}
|
|
242
256
|
{theTodoRegion}
|
|
243
257
|
{deferLoadInfo.length > 0 && (
|
|
244
|
-
<DeferLoad
|
|
258
|
+
<DeferLoad
|
|
259
|
+
getPConnect={getPConnect}
|
|
260
|
+
name={deferLoadInfo[activeVertTab].config.name}
|
|
261
|
+
isTab
|
|
262
|
+
lastUpdateCaseTime={lastUpdateCaseTime}
|
|
263
|
+
/>
|
|
245
264
|
)}
|
|
246
265
|
</Grid>
|
|
247
266
|
|