@pega/dx-component-builder-sdk 24.2.13 → 25.1.10
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/README.md +3 -3
- package/package.json +1 -1
- package/src/constants.js +46 -0
- package/src/tasks/create/index.js +50 -51
- package/src/tasks/create/templates/Constellation/field/Boolean/Boolean.ts.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Boolean/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Date/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Date/date.ts.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/DateTime/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Integer/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/date.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/index.tsx.mustache +7 -2
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/repeat-utils.ts.mustache +0 -4
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/index.tsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/field/Text/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Email/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Input/{StatusWork.tsx → StatusWork.tsx.mustache} +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Input/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Phone/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/HighlightRender.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/StatusWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/utils.js.mustache +0 -2
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/HighlightRender.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/StatusWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/FORM/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/FORM-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/PAGE/GetNextWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/widget/CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/widget/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.html.mustache +14 -6
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +4 -3
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.ts.mustache +4 -3
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Integer/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.ts.mustache +7 -6
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/picklist-autocomplete.component.html.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/picklist-autocomplete.component.ts.mustache +10 -14
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/picklist-radio-buttons.component.html.mustache +14 -6
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/picklist-radio-buttons.component.ts.mustache +5 -2
- package/src/tasks/create/templates/SDK-Angular/field/Text/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.html.mustache +5 -4
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.ts.mustache +17 -5
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.ts.mustache +1 -2
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Boolean/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Date/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/DateTime/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Integer/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Picklist/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Input/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-URL/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +10 -11
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +9 -10
- package/src/tasks/create/templates/SDK-React/template/FORM/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/FORM-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +5 -3
- package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +10 -8
- package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +8 -5
- package/src/tasks/create/templates/SDK-React/template/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/widget/CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/widget/CASE/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +14 -12
- package/src/tasks/create-all/index.js +68 -55
- package/src/tasks/publish/helper.js +1 -1
- package/src/tasks/validator/index.js +19 -0
- package/src/util.js +89 -4
- package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/config.json +0 -1
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +0 -1
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Banner/Banner.css +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Banner/Banner.tsx +10 -7
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +8 -9
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Operator/Operator.tsx +21 -19
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Pulse/Pulse.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
- package/tests/assets/sdk-r/components/create/override-sdk/field/AutoComplete/AutoComplete.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.css +4 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +7 -10
- package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +97 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +10 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/currency-utils.ts +1 -2
- package/tests/assets/sdk-r/components/create/override-sdk/field/Date/Date.tsx +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/DateTime/DateTime.tsx +16 -13
- package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +10 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/Dropdown/Dropdown.tsx +30 -25
- package/tests/assets/sdk-r/components/create/override-sdk/field/Email/Email.tsx +11 -13
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +10 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Integer/Integer.tsx +5 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/Location/Location.css +4 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Location/Location.tsx +258 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Location/config-ext.json +10 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Location/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/utils.ts +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/field/ObjectReference/ObjectReference.tsx +235 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/ObjectReference/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/ObjectReference/utils.ts +111 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +9 -9
- package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +7 -5
- package/tests/assets/sdk-r/components/create/override-sdk/field/RadioButtons/RadioButtons.tsx +47 -5
- package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.css +79 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.tsx +3 -1
- package/tests/assets/sdk-r/components/create/override-sdk/field/ScalarList/ScalarList.tsx +2 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/SelectableCard/SelectableCard.tsx +175 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/SelectableCard/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/SelectableCard/utils.tsx +223 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/SemanticLink/SemanticLink.tsx +160 -28
- package/tests/assets/sdk-r/components/create/override-sdk/field/SemanticLink/utils.ts +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextArea/TextArea.tsx +5 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextContent/TextContent.tsx +1 -2
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextInput/TextInput.tsx +5 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/Time/Time.tsx +4 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/URL/URL.tsx +5 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/UserReference.tsx +3 -6
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ActionButtons/ActionButtons.tsx +28 -21
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +38 -35
- package/tests/assets/sdk-r/components/create/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +5 -9
- package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +3 -6
- package/tests/assets/sdk-r/components/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +7 -9
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/FlowContainer.tsx +21 -113
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/helpers.ts +1 -5
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +4 -3
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +7 -6
- package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.css +48 -70
- package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.tsx +27 -58
- package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.css +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +31 -30
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/Reference.tsx +3 -4
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Region/Region.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/RootContainer.tsx +3 -4
- package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/helper.ts +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Stages/Stages.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/infra/View/View.tsx +4 -3
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/ViewContainer.tsx +4 -5
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/config-ext.json +10 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/AppShell/AppShell.css +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/AppShell/AppShell.tsx +22 -23
- package/tests/assets/sdk-r/components/create/override-sdk/template/BannerPage/BannerPage.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseSummary/CaseSummary.tsx +28 -41
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +31 -38
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/Confirmation/Confirmation.tsx +3 -4
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/DataReference.tsx +312 -106
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/SearchForm.tsx +149 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/utils.ts +90 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/DefaultForm.tsx +3 -3
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/utils/index.ts +1 -3
- package/tests/assets/sdk-r/components/create/override-sdk/template/Details/Details.tsx +11 -11
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
- package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/DynamicTabs.tsx +1 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -5
- package/tests/assets/sdk-r/components/create/override-sdk/template/InlineDashboard/InlineDashboard.tsx +14 -16
- package/tests/assets/sdk-r/components/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListPage/ListPage.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +285 -204
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/hooks.ts +1 -5
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +38 -6
- package/tests/assets/sdk-r/components/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWide/NarrowWide.tsx +5 -5
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideForm/NarrowWideForm.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumn/OneColumn.tsx +7 -7
- package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumnPage/OneColumnPage.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumnTab/OneColumnTab.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -3
- package/tests/assets/sdk-r/components/create/override-sdk/template/SearchGroups/SearchGroups.tsx +244 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/SearchGroups/hooks.ts +37 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/SearchGroups/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/SearchGroups/utils.ts +29 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTable/SimpleTable.tsx +2 -5
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +99 -84
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
- package/tests/assets/sdk-r/components/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/SubTabs/SubTabs.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/SubTabs/tabUtils.ts +118 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumn/TwoColumn.tsx +9 -10
- package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnTab/TwoColumnTab.tsx +9 -10
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrow/WideNarrow.tsx +5 -5
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowForm/WideNarrowForm.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/WssNavBar/WssNavBar.css +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/WssNavBar/WssNavBar.tsx +6 -6
- package/tests/assets/sdk-r/components/create/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/tests/assets/sdk-r/components/create/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
- package/tests/assets/sdk-r/components/create/override-sdk/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.css +7 -8
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +304 -231
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.types.ts +96 -0
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/AttachmentUtils.ts +316 -0
- package/tests/assets/sdk-r/components/create/override-sdk/widget/CaseHistory/CaseHistory.tsx +5 -5
- package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.css +7 -6
- package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +30 -23
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Followers/Followers.tsx +2 -4
- package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +1 -3
- package/tests/assets/sdk-r/components/create/override-sdk/widget/SummaryItem/SummaryItem.css +9 -11
- package/tests/assets/sdk-r/components/create/override-sdk/widget/SummaryItem/SummaryItem.tsx +3 -3
- package/tests/assets/sdk-r/components/create/override-sdk/widget/SummaryList/SummaryList.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/ToDo/ToDo.css +1 -13
- package/tests/assets/sdk-r/components/create/override-sdk/widget/ToDo/ToDo.tsx +38 -37
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/Boolean.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/date.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/demo.stories.tsx +0 -16
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -17
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/mock.ts +1 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +9 -20
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/mock.ts +1 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/demo.stories.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/date.ts +0 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/index.tsx +7 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/demo.stories.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/demo.stories.tsx +10 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/utils.js +0 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/demo.stories.tsx +1 -13
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +10 -32
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +10 -22
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +10 -21
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +0 -24
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -24
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -6
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +0 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +8 -28
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +10 -11
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +10 -16
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +8 -28
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +9 -10
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +5 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +7 -8
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +10 -20
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +10 -20
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +11 -12
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/config.json +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +9 -19
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Banner/Banner.css +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Banner/Banner.tsx +10 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +8 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Operator/Operator.tsx +21 -19
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Pulse/Pulse.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.css +4 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +7 -10
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +97 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +10 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/currency-utils.ts +1 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Date/Date.tsx +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/DateTime/DateTime.tsx +16 -13
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +10 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Dropdown/Dropdown.tsx +30 -25
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Email/Email.tsx +11 -13
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +10 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Integer/Integer.tsx +5 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Location/Location.css +4 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Location/Location.tsx +258 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Location/config-ext.json +10 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Location/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/utils.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/ObjectReference/ObjectReference.tsx +235 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/ObjectReference/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/ObjectReference/utils.ts +111 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +9 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +7 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +47 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.css +79 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.tsx +3 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/ScalarList/ScalarList.tsx +2 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/SelectableCard/SelectableCard.tsx +175 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/SelectableCard/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/SelectableCard/utils.tsx +223 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/SemanticLink/SemanticLink.tsx +160 -28
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/SemanticLink/utils.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextArea/TextArea.tsx +5 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextContent/TextContent.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextInput/TextInput.tsx +5 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Time/Time.tsx +4 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/URL/URL.tsx +5 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/UserReference.tsx +3 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ActionButtons/ActionButtons.tsx +28 -21
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +38 -35
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +5 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +3 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +7 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/FlowContainer.tsx +21 -113
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/helpers.ts +1 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +4 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +7 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.css +48 -70
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +27 -58
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.css +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +31 -30
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/Reference.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Region/Region.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/RootContainer.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/helper.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Stages/Stages.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/View/View.tsx +4 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/ViewContainer.tsx +4 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/config-ext.json +10 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AdvancedSearch/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AppShell/AppShell.css +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AppShell/AppShell.tsx +22 -23
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/BannerPage/BannerPage.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +28 -41
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +31 -38
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/Confirmation/Confirmation.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/DataReference.tsx +312 -106
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/SearchForm.tsx +149 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/utils.ts +90 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/DefaultForm.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/utils/index.ts +1 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/Details/Details.tsx +11 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/DynamicTabs.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/InlineDashboard/InlineDashboard.tsx +14 -16
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListPage/ListPage.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +285 -204
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/hooks.ts +1 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +38 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWide/NarrowWide.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideForm/NarrowWideForm.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumn/OneColumn.tsx +7 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumnPage/OneColumnPage.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumnTab/OneColumnTab.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SearchGroups/SearchGroups.tsx +244 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SearchGroups/hooks.ts +37 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SearchGroups/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SearchGroups/utils.ts +29 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTable/SimpleTable.tsx +2 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +99 -84
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SubTabs/SubTabs.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SubTabs/tabUtils.ts +118 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumn/TwoColumn.tsx +9 -10
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumnTab/TwoColumnTab.tsx +9 -10
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrow/WideNarrow.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowForm/WideNarrowForm.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WssNavBar/WssNavBar.css +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WssNavBar/WssNavBar.tsx +6 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.css +7 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +304 -231
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.types.ts +96 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/AttachmentUtils.ts +316 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/CaseHistory/CaseHistory.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.css +7 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +30 -23
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Followers/Followers.tsx +2 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +1 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/SummaryItem/SummaryItem.css +9 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/SummaryItem/SummaryItem.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/SummaryList/SummaryList.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ToDo/ToDo.css +1 -13
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ToDo/ToDo.tsx +38 -37
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import React, { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { Button, Grid2, Select, MenuItem, Box } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
|
+
import TemplateContext from '@pega/react-sdk-components/lib/components/template/AdvancedSearch/TemplateContext';
|
|
6
|
+
import componentCachePersistUtils from '@pega/react-sdk-components/lib/components/template/AdvancedSearch/SearchGroup/persistUtils';
|
|
7
|
+
|
|
8
|
+
import { getCacheInfo, isValidInput } from './utils';
|
|
9
|
+
import { useCacheWhenListViewReady } from './hooks';
|
|
10
|
+
|
|
11
|
+
export const initializeSearchFields = (searchFields, getPConnect, referenceListClassID, searchFieldRestoreValues = {}) => {
|
|
12
|
+
const filtersProperties = {};
|
|
13
|
+
searchFields.forEach(field => {
|
|
14
|
+
let val = '';
|
|
15
|
+
const { value, defaultValue = '' } = field.config;
|
|
16
|
+
const propPath = PCore.getAnnotationUtils().getPropertyName(value);
|
|
17
|
+
|
|
18
|
+
if (searchFieldRestoreValues[propPath]) {
|
|
19
|
+
val = searchFieldRestoreValues[propPath];
|
|
20
|
+
} else if (PCore.getAnnotationUtils().isProperty(defaultValue)) {
|
|
21
|
+
val = getPConnect().getValue(defaultValue.split(' ')[1]);
|
|
22
|
+
} else if (defaultValue.startsWith('@L')) {
|
|
23
|
+
val = defaultValue.split(' ')[1];
|
|
24
|
+
} else {
|
|
25
|
+
val = defaultValue;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
filtersProperties[propPath] = val;
|
|
29
|
+
|
|
30
|
+
const valueSplit = value.split('@P ')[1]?.split('.').filter(Boolean) ?? [];
|
|
31
|
+
valueSplit.pop();
|
|
32
|
+
|
|
33
|
+
if (valueSplit.length) {
|
|
34
|
+
let path = '';
|
|
35
|
+
let currentClassID = referenceListClassID;
|
|
36
|
+
valueSplit.forEach(item => {
|
|
37
|
+
path = path.length ? `${path}.${item}` : item;
|
|
38
|
+
currentClassID = (PCore.getMetadataUtils().getPropertyMetadata(item, currentClassID) as any).pageClass;
|
|
39
|
+
if (currentClassID) {
|
|
40
|
+
filtersProperties[`${path}.classID`] = currentClassID;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return filtersProperties;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const flattenObj = obj => {
|
|
49
|
+
const result = {};
|
|
50
|
+
Object.keys(obj).forEach(key => {
|
|
51
|
+
if (!['context_data', 'pageInstructions'].includes(key)) {
|
|
52
|
+
if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {
|
|
53
|
+
const temp = flattenObj(obj[key]);
|
|
54
|
+
Object.keys(temp).forEach(nestedKey => {
|
|
55
|
+
result[`${key}.${nestedKey}`] = temp[nestedKey];
|
|
56
|
+
});
|
|
57
|
+
} else {
|
|
58
|
+
result[key] = obj[key];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return result;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default function SearchGroups(props) {
|
|
66
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
67
|
+
const { getPConnect, editableField, localeReference, setShowRecords, searchSelectCacheKey, cache } = props;
|
|
68
|
+
const referenceFieldName = editableField.replaceAll('.', '_');
|
|
69
|
+
|
|
70
|
+
const state: any = useRef({ searchFields: {}, activeGroupId: '' }).current;
|
|
71
|
+
const options = componentCachePersistUtils.getComponentStateOptions(getPConnect);
|
|
72
|
+
|
|
73
|
+
const { searchGroups: groups, referenceList } = getPConnect().getConfigProps();
|
|
74
|
+
const { useCache, initialActiveGroupId } = getCacheInfo(cache, groups);
|
|
75
|
+
const [activeGroupId, setActiveGroupId] = useState(initialActiveGroupId);
|
|
76
|
+
const [transientItemID, setTransientItemID] = useState<any>(null);
|
|
77
|
+
const [previousFormValues, setPreviousFormValues] = useState<any>(null);
|
|
78
|
+
const viewName = getPConnect().getCurrentView();
|
|
79
|
+
|
|
80
|
+
const rawGroupsConfig = getPConnect().getRawConfigProps().searchGroups;
|
|
81
|
+
const activeGroupIndex = groups.findIndex(group => group.config.id === activeGroupId);
|
|
82
|
+
const { children: searchFieldsChildren = [] } = activeGroupIndex !== -1 ? rawGroupsConfig[activeGroupIndex] : {};
|
|
83
|
+
const searchFields = searchFieldsChildren.map(field => ({
|
|
84
|
+
...field,
|
|
85
|
+
config: { ...field.config, isSearchField: true }
|
|
86
|
+
}));
|
|
87
|
+
|
|
88
|
+
const searchByRef = useRef(null);
|
|
89
|
+
const searchFieldsRef = useRef(null);
|
|
90
|
+
const isValidatorField = searchFields.some(field => field.config.validator);
|
|
91
|
+
const { classID: referenceListClassID } = PCore.getMetadataUtils().getDataPageMetadata(referenceList) as any;
|
|
92
|
+
|
|
93
|
+
const initialSearchFields = useMemo(
|
|
94
|
+
() =>
|
|
95
|
+
initializeSearchFields(
|
|
96
|
+
searchFields,
|
|
97
|
+
getPConnect,
|
|
98
|
+
referenceListClassID,
|
|
99
|
+
useCache && cache.activeGroupId === activeGroupId ? cache.searchFields : {}
|
|
100
|
+
),
|
|
101
|
+
[activeGroupId, getPConnect, cache.searchFields]
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
if (transientItemID) {
|
|
106
|
+
const filtersWithClassID = {
|
|
107
|
+
...initialSearchFields,
|
|
108
|
+
classID: referenceListClassID
|
|
109
|
+
};
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
PCore.getContainerUtils().replaceTransientData({ transientItemID, data: filtersWithClassID });
|
|
112
|
+
}
|
|
113
|
+
}, [activeGroupId]);
|
|
114
|
+
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
const filtersWithClassID = {
|
|
117
|
+
...initialSearchFields,
|
|
118
|
+
classID: referenceListClassID
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const transientId = getPConnect()
|
|
122
|
+
.getContainerManager()
|
|
123
|
+
.addTransientItem({ id: `${referenceFieldName}-${viewName}`, data: filtersWithClassID });
|
|
124
|
+
setTransientItemID(transientId);
|
|
125
|
+
}, []);
|
|
126
|
+
|
|
127
|
+
const getFilterData = useCallback(() => {
|
|
128
|
+
// @ts-ignore
|
|
129
|
+
let changes = PCore.getFormUtils().getSubmitData(transientItemID, {
|
|
130
|
+
isTransientContext: true,
|
|
131
|
+
includeDisabledFields: true
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
if (Object.keys(cache.searchFields ?? {}).length > 0 && Object.keys(changes).length === 1) {
|
|
135
|
+
changes = cache.searchFields;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const formValues = flattenObj(changes);
|
|
139
|
+
|
|
140
|
+
if (!PCore.isDeepEqual(previousFormValues, formValues) && PCore.getFormUtils().isFormValid(transientItemID) && isValidInput(formValues)) {
|
|
141
|
+
if (isValidatorField) {
|
|
142
|
+
// @ts-ignore
|
|
143
|
+
PCore.getMessageManager().clearContextMessages({ context: transientItemID });
|
|
144
|
+
}
|
|
145
|
+
setPreviousFormValues(formValues);
|
|
146
|
+
setShowRecords(true);
|
|
147
|
+
PCore.getPubSubUtils().publish(PCore.getEvents().getTransientEvent().UPDATE_PROMOTED_FILTERS, {
|
|
148
|
+
payload: formValues,
|
|
149
|
+
showRecords: true,
|
|
150
|
+
viewName
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
state.activeGroupId = activeGroupId;
|
|
155
|
+
state.searchFields = changes;
|
|
156
|
+
state.selectedCategory = viewName;
|
|
157
|
+
|
|
158
|
+
componentCachePersistUtils.setComponentCache({ cacheKey: searchSelectCacheKey, state, options });
|
|
159
|
+
}, [transientItemID, setShowRecords, viewName, activeGroupId, previousFormValues]);
|
|
160
|
+
|
|
161
|
+
const resetFilterData = useCallback(() => {
|
|
162
|
+
// @ts-ignore
|
|
163
|
+
PCore.getNavigationUtils().resetComponentCache(searchSelectCacheKey);
|
|
164
|
+
const resetPayload = {
|
|
165
|
+
transientItemID,
|
|
166
|
+
data: initializeSearchFields(searchFields, getPConnect, referenceListClassID),
|
|
167
|
+
options: { reset: true }
|
|
168
|
+
};
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
PCore.getContainerUtils().updateTransientData(resetPayload);
|
|
171
|
+
}, [transientItemID, initialSearchFields]);
|
|
172
|
+
|
|
173
|
+
useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey);
|
|
174
|
+
|
|
175
|
+
const searchDropdown = groups.length > 1 && (
|
|
176
|
+
<Grid2 container spacing={2}>
|
|
177
|
+
<Select value={activeGroupId} onChange={e => setActiveGroupId(e.target.value)} ref={searchByRef} fullWidth>
|
|
178
|
+
{groups.map(group => (
|
|
179
|
+
<MenuItem key={group.config.id} value={group.config.id}>
|
|
180
|
+
{group.config.label}
|
|
181
|
+
</MenuItem>
|
|
182
|
+
))}
|
|
183
|
+
</Select>
|
|
184
|
+
</Grid2>
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
const actionButtons = (
|
|
188
|
+
<Box display='flex' gap={2}>
|
|
189
|
+
<Button variant='outlined' onClick={resetFilterData}>
|
|
190
|
+
{localizedVal('Reset', 'SimpleTable')}
|
|
191
|
+
</Button>
|
|
192
|
+
<Button variant='contained' onClick={getFilterData}>
|
|
193
|
+
{localizedVal('Search', 'SimpleTable')}
|
|
194
|
+
</Button>
|
|
195
|
+
</Box>
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
const searchFieldsViewConfig = {
|
|
199
|
+
name: 'SearchFields',
|
|
200
|
+
type: 'View',
|
|
201
|
+
config: {
|
|
202
|
+
template: 'DefaultForm',
|
|
203
|
+
NumCols: '3',
|
|
204
|
+
contextName: transientItemID,
|
|
205
|
+
readOnly: false,
|
|
206
|
+
context: transientItemID,
|
|
207
|
+
localeReference
|
|
208
|
+
},
|
|
209
|
+
children: [
|
|
210
|
+
{
|
|
211
|
+
name: 'Fields',
|
|
212
|
+
type: 'Region',
|
|
213
|
+
children: searchFields
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const searchFieldsC11nEnv = PCore.createPConnect({
|
|
219
|
+
meta: searchFieldsViewConfig,
|
|
220
|
+
options: {
|
|
221
|
+
hasForm: true,
|
|
222
|
+
contextName: transientItemID
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
const templateContext = useContext(TemplateContext);
|
|
227
|
+
const templateContextValue = useMemo(() => ({ ...templateContext, outerColumnCount: undefined }), []);
|
|
228
|
+
|
|
229
|
+
const searchFieldsViewComp = transientItemID ? (
|
|
230
|
+
<TemplateContext.Provider value={templateContextValue}>
|
|
231
|
+
<div ref={searchFieldsRef}>{createElement(createPConnectComponent(), { ...searchFieldsC11nEnv })}</div>
|
|
232
|
+
</TemplateContext.Provider>
|
|
233
|
+
) : null;
|
|
234
|
+
|
|
235
|
+
const childrenToRender = [searchDropdown, searchFieldsViewComp, actionButtons];
|
|
236
|
+
|
|
237
|
+
return (
|
|
238
|
+
<Box display='flex' flexDirection='column' gap={2}>
|
|
239
|
+
{childrenToRender.map((child, index) => (
|
|
240
|
+
<React.Fragment key={index}>{child}</React.Fragment>
|
|
241
|
+
))}
|
|
242
|
+
</Box>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const listViewConstants = {
|
|
4
|
+
EVENTS: {
|
|
5
|
+
LIST_VIEW_READY: 'LIST_VIEW_READY'
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* This hook registers a callback for the whenever list view component is ready
|
|
10
|
+
* then makes a call to get the data using the search fields pre-filled with cache data.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export function useCacheWhenListViewReady(
|
|
14
|
+
cache: { searchFields: unknown },
|
|
15
|
+
viewName: string,
|
|
16
|
+
useCache: boolean,
|
|
17
|
+
getFilterData: (params: { isCalledFromCache: boolean }) => void,
|
|
18
|
+
searchSelectCacheKey: string
|
|
19
|
+
) {
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (Object.keys(cache.searchFields ?? {}).length > 0) {
|
|
22
|
+
PCore.getPubSubUtils().subscribe(
|
|
23
|
+
listViewConstants.EVENTS.LIST_VIEW_READY,
|
|
24
|
+
({ viewName: viewNameFromListView }: { viewName: string }) => {
|
|
25
|
+
if (viewNameFromListView === viewName && useCache) {
|
|
26
|
+
getFilterData({ isCalledFromCache: true });
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
`${searchSelectCacheKey}-listview-ready`
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return () => {
|
|
34
|
+
PCore.getPubSubUtils().unsubscribe(listViewConstants.EVENTS.LIST_VIEW_READY, `${searchSelectCacheKey}-listview-ready`);
|
|
35
|
+
};
|
|
36
|
+
}, []);
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SearchGroups';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function isEmpty(value: any): boolean {
|
|
2
|
+
return (
|
|
3
|
+
// null or undefined
|
|
4
|
+
value === null ||
|
|
5
|
+
value === undefined ||
|
|
6
|
+
((Array.isArray(value) || typeof value === 'string') && value.length === 0) ||
|
|
7
|
+
// is an Object and has no keys
|
|
8
|
+
(value.constructor === Object && Object.keys(value).length === 0)
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function getCacheInfo(
|
|
13
|
+
cache: { selectedCategory: string; activeGroupId: string; searchFields: unknown },
|
|
14
|
+
groups: { config: { id: string } }[]
|
|
15
|
+
) {
|
|
16
|
+
let initialActiveGroupId = groups.length ? groups[0].config.id : '';
|
|
17
|
+
|
|
18
|
+
let useCache = false;
|
|
19
|
+
if (cache.activeGroupId && groups?.find(group => group.config.id === cache.activeGroupId)) {
|
|
20
|
+
initialActiveGroupId = cache.activeGroupId;
|
|
21
|
+
useCache = true;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return { useCache, initialActiveGroupId };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function isValidInput(input: { [s: string]: unknown }) {
|
|
28
|
+
return Object.values(input).some(value => !isEmpty(value));
|
|
29
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/template/AdvancedSearch/TemplateContext.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
const TemplateContext = createContext({
|
|
4
|
+
depth: 0,
|
|
5
|
+
columnCount: 1,
|
|
6
|
+
outerColumnCount: undefined,
|
|
7
|
+
templateOverrideMode: undefined,
|
|
8
|
+
inheritParentLayout: undefined,
|
|
9
|
+
lastContainerItem: undefined
|
|
10
|
+
});
|
|
11
|
+
export default TemplateContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AdvancedSearch';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PropsWithChildren, useEffect, useState } from 'react';
|
|
1
|
+
import { type PropsWithChildren, useEffect, useState } from 'react';
|
|
2
2
|
import makeStyles from '@mui/styles/makeStyles';
|
|
3
3
|
import Avatar from '@mui/material/Avatar';
|
|
4
4
|
|
|
5
5
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
6
6
|
import { NavContext } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
|
|
7
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
9
|
|
|
10
10
|
import './AppShell.css';
|
|
11
11
|
|
|
@@ -29,9 +29,7 @@ interface AppShellProps extends PConnProps {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const useStyles = makeStyles(theme => ({
|
|
32
|
-
root: {
|
|
33
|
-
display: 'flex'
|
|
34
|
-
},
|
|
32
|
+
root: {},
|
|
35
33
|
content: {
|
|
36
34
|
flexGrow: 1,
|
|
37
35
|
height: '100vh',
|
|
@@ -73,7 +71,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
73
71
|
const pConn = getPConnect();
|
|
74
72
|
const envInfo = PCore.getEnvironmentInfo();
|
|
75
73
|
const imageKey = envInfo.getOperatorImageInsKey();
|
|
76
|
-
const userName = envInfo.getOperatorName();
|
|
74
|
+
const userName = envInfo.getOperatorName() || '';
|
|
77
75
|
const currentUserInitials = Utils.getInitials(userName);
|
|
78
76
|
const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : '';
|
|
79
77
|
const portalClass = pConn.getValue('.classID', ''); // 2nd arg empty string until typedef marked correctly
|
|
@@ -83,7 +81,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
83
81
|
const classes = useStyles();
|
|
84
82
|
const actionsAPI = pConn.getActionsApi();
|
|
85
83
|
const localeReference = pConn.getValue('.pyLocaleReference', ''); // 2nd arg empty string until typedef marked correctly
|
|
86
|
-
const [imageBlobUrl, setImageBlobUrl] = useState<string | null>(null);
|
|
84
|
+
const [imageBlobUrl, setImageBlobUrl] = useState<string | Blob | null>(null);
|
|
87
85
|
// useState for appName and mapChildren - note these are ONLY updated once (on component mount!)
|
|
88
86
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
89
87
|
const [appName, setAppName] = useState('');
|
|
@@ -101,7 +99,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
101
99
|
);
|
|
102
100
|
// Initial setting of appName and mapChildren
|
|
103
101
|
useEffect(() => {
|
|
104
|
-
setAppName(PCore.getEnvironmentInfo().getApplicationName());
|
|
102
|
+
setAppName(PCore.getEnvironmentInfo().getApplicationName() || '');
|
|
105
103
|
|
|
106
104
|
const tempMap: any = (pConn.getChildren() as any)?.map((child: any, index) => {
|
|
107
105
|
const theChildComp = child.getPConnect().getComponentName();
|
|
@@ -114,10 +112,15 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
114
112
|
});
|
|
115
113
|
|
|
116
114
|
setMapChildren(tempMap);
|
|
115
|
+
|
|
116
|
+
/* TODO: We're setting the `pyPortalTemplate` for now, this would be handled by the CoreJS in the future releases */
|
|
117
|
+
if (portalTemplate === 'wss') {
|
|
118
|
+
PCore.getEnvironmentInfo().setEnvironmentInfo({ ...PCore.getEnvironmentInfo().environmentInfoObject, pyPortalTemplate: 'wss' } as any);
|
|
119
|
+
}
|
|
117
120
|
}, []);
|
|
118
121
|
|
|
119
122
|
useEffect(() => {
|
|
120
|
-
// @ts-
|
|
123
|
+
// @ts-expect-error
|
|
121
124
|
const caseTypesAvailableToCreateDP = PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP;
|
|
122
125
|
if (caseTypesAvailableToCreateDP) {
|
|
123
126
|
const portalID = pConn.getValue('.pyOwner');
|
|
@@ -125,7 +128,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
125
128
|
.getPageDataAsync(caseTypesAvailableToCreateDP, pConn.getContextName(), {
|
|
126
129
|
PortalName: portalID
|
|
127
130
|
})
|
|
128
|
-
.then(response => {
|
|
131
|
+
.then((response: { pyCaseTypesAvailableToCreate?: any }) => {
|
|
129
132
|
if (response?.pyCaseTypesAvailableToCreate) {
|
|
130
133
|
pConn.replaceState('.pyCaseTypesAvailableToCreate', response.pyCaseTypesAvailableToCreate, {
|
|
131
134
|
skipDirtyValidation: true
|
|
@@ -135,8 +138,8 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
135
138
|
}
|
|
136
139
|
}, []);
|
|
137
140
|
|
|
138
|
-
const [iconURL, setIconURL] = useState('');
|
|
139
|
-
const [fullIconURL, setFullIconURL] = useState('');
|
|
141
|
+
const [iconURL, setIconURL] = useState<string | Blob>('');
|
|
142
|
+
const [fullIconURL, setFullIconURL] = useState<string | Blob>('');
|
|
140
143
|
useEffect(() => {
|
|
141
144
|
// using the default icon then fetch it from the static folder (not auth involved)
|
|
142
145
|
if (
|
|
@@ -152,14 +155,12 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
152
155
|
// not using default icon to fetch it using the way which uses authentication
|
|
153
156
|
else {
|
|
154
157
|
PCore.getAssetLoader()
|
|
155
|
-
.
|
|
156
|
-
.then(blob => window.URL.createObjectURL(blob))
|
|
158
|
+
.getSvcImageUrl(portalLogo)
|
|
157
159
|
.then(data => {
|
|
158
160
|
setIconURL(data);
|
|
159
161
|
setFullIconURL(data);
|
|
160
162
|
})
|
|
161
163
|
.catch(() => {
|
|
162
|
-
// eslint-disable-next-line no-console
|
|
163
164
|
console.error(`${localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`);
|
|
164
165
|
});
|
|
165
166
|
}
|
|
@@ -168,8 +169,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
168
169
|
useEffect(() => {
|
|
169
170
|
if (imageKey && portalTemplate === 'wss') {
|
|
170
171
|
PCore.getAssetLoader()
|
|
171
|
-
.
|
|
172
|
-
.then(blob => window.URL.createObjectURL(blob))
|
|
172
|
+
.getSvcImageUrl(imageKey)
|
|
173
173
|
.then(imagePath => setImageBlobUrl(imagePath));
|
|
174
174
|
}
|
|
175
175
|
}, []);
|
|
@@ -213,15 +213,15 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
213
213
|
|
|
214
214
|
if (portalTemplate === 'wss') {
|
|
215
215
|
return (
|
|
216
|
-
<div id='AppShell'>
|
|
216
|
+
<div id='AppShell' className={classes.root}>
|
|
217
217
|
<WssNavBar
|
|
218
218
|
portalName={portalName}
|
|
219
219
|
imageSrc={iconURL}
|
|
220
220
|
fullImageSrc={fullIconURL}
|
|
221
|
-
appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
|
|
221
|
+
appName={localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
|
|
222
222
|
appInfo={{
|
|
223
223
|
imageSrc: iconURL,
|
|
224
|
-
appName: localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),
|
|
224
|
+
appName: localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),
|
|
225
225
|
onClick: links[0] && /* links[0].onClick ? */ links[0].onClick /* : undefined */
|
|
226
226
|
}}
|
|
227
227
|
navLinks={links.filter((link, index) => {
|
|
@@ -239,13 +239,12 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
return (
|
|
242
|
-
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
243
242
|
<NavContext.Provider value={{ open, setOpen }}>
|
|
244
|
-
<div id='AppShell' className={classes.root}>
|
|
243
|
+
<div id='AppShell' className={classes.root} style={{ display: 'flex' }}>
|
|
245
244
|
<NavBar
|
|
246
245
|
getPConnect={getPConnect}
|
|
247
246
|
pConn={getPConnect()}
|
|
248
|
-
appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
|
|
247
|
+
appName={localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
|
|
249
248
|
pages={pages}
|
|
250
249
|
caseTypes={caseTypes}
|
|
251
250
|
/>
|
package/tests/assets/sdk-r/components/create/override-sdk/template/BannerPage/BannerPage.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Children, PropsWithChildren, useMemo } from 'react';
|
|
1
|
+
import { Children, type PropsWithChildren, useMemo } from 'react';
|
|
2
2
|
|
|
3
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
6
|
interface BannerPageProps extends PConnProps {
|
|
7
7
|
// If any, enter additional props that only exist on this component
|
package/tests/assets/sdk-r/components/create/override-sdk/template/CaseSummary/CaseSummary.tsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactElement } from 'react';
|
|
1
|
+
import type { PropsWithChildren, ReactElement } from 'react';
|
|
2
2
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
3
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
3
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
4
|
|
|
5
5
|
interface CaseSummaryProps extends PConnProps {
|
|
6
|
+
arPrimaryFields: any[];
|
|
7
|
+
arSecondaryFields: any[];
|
|
6
8
|
// If any, enter additional props that only exist on this component
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -11,26 +13,16 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
11
13
|
const CaseSummaryFields = getComponentFromMap('CaseSummaryFields');
|
|
12
14
|
|
|
13
15
|
const { getPConnect, children } = props;
|
|
16
|
+
let { arPrimaryFields = [], arSecondaryFields = [] } = props;
|
|
14
17
|
|
|
15
|
-
const thePConn = getPConnect();
|
|
16
|
-
const theConfigProps: any = thePConn
|
|
17
|
-
|
|
18
|
-
const status = theConfigProps
|
|
19
|
-
const showStatus = theConfigProps
|
|
18
|
+
const thePConn = getPConnect && getPConnect();
|
|
19
|
+
const theConfigProps: any = thePConn?.getConfigProps();
|
|
20
|
+
|
|
21
|
+
const status = theConfigProps?.status;
|
|
22
|
+
const showStatus = theConfigProps?.showStatus;
|
|
20
23
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
21
24
|
const localeCategory = 'ModalContainer';
|
|
22
|
-
// from Constellation DX Components
|
|
23
|
-
// get the primary and secondary fields with the raw data (which has the non-resolved property values)
|
|
24
|
-
// const regionsRaw = getPConnect().getRawMetadata().children;
|
|
25
|
-
// const primaryFieldsRaw = regionsRaw[0].children;
|
|
26
|
-
// const secondaryFieldsRaw = regionsRaw[1].children;
|
|
27
|
-
|
|
28
|
-
// From other SDKs
|
|
29
|
-
// may want to move these into useEffect/useState combo
|
|
30
|
-
let arPrimaryFields: any[] = [];
|
|
31
|
-
let arSecondaryFields: any[] = [];
|
|
32
25
|
|
|
33
|
-
/* eslint-disable @typescript-eslint/no-shadow */
|
|
34
26
|
function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
|
|
35
27
|
const { config, children } = pConnectMeta;
|
|
36
28
|
const pConnect = getPConnect();
|
|
@@ -62,32 +54,27 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
62
54
|
return summaryFieldChildren ? convertChildrenToSummaryData(summaryFieldChildren?.getChildren()) : undefined;
|
|
63
55
|
}
|
|
64
56
|
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
field.config
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
field
|
|
80
|
-
|
|
57
|
+
if (arPrimaryFields.length === 0 && arSecondaryFields.length === 0) {
|
|
58
|
+
for (const child of children as ReactElement[]) {
|
|
59
|
+
const childPConn = (child as ReactElement).props.getPConnect();
|
|
60
|
+
const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());
|
|
61
|
+
if (childPConnData.name.toLowerCase() === 'primary fields') {
|
|
62
|
+
arPrimaryFields = childPConnData.children;
|
|
63
|
+
arPrimaryFields.forEach(field => {
|
|
64
|
+
if (field.config?.value && typeof field.config?.value === 'string') {
|
|
65
|
+
field.config.value = localizedVal(field.config.value, localeCategory);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
} else if (childPConnData.name.toLowerCase() === 'secondary fields') {
|
|
69
|
+
const secondarySummaryFields = prepareCaseSummaryData(childPConn);
|
|
70
|
+
arSecondaryFields = childPConnData.children;
|
|
71
|
+
arSecondaryFields.forEach((field, index) => {
|
|
72
|
+
field.config.displayLabel = secondarySummaryFields[index]?.value?.props?.label;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
81
75
|
}
|
|
82
76
|
}
|
|
83
77
|
|
|
84
|
-
// At this point, should hand off to another component for layout and rendering
|
|
85
|
-
// of primary and secondary fields in the Case Summary
|
|
86
|
-
|
|
87
|
-
// debugging/investigation help
|
|
88
|
-
// console.log(`CaseSummary: arPrimaryFields: ${JSON.stringify(arPrimaryFields)}`);
|
|
89
|
-
// console.log(`CaseSummary: arSecondaryFields: ${JSON.stringify(arSecondaryFields)}`);
|
|
90
|
-
|
|
91
78
|
return (
|
|
92
79
|
<div id='CaseSummary'>
|
|
93
80
|
<CaseSummaryFields status={status} showStatus={showStatus} theFields={arPrimaryFields} />
|