@pega/dx-component-builder-sdk 24.2.14 → 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/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
package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.types.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { ReactElement, Ref } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ResponseProps {
|
|
4
|
+
ID: string;
|
|
5
|
+
extension: string;
|
|
6
|
+
createDateTime?: Date | string | number;
|
|
7
|
+
createUser?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface AttachmentActions {
|
|
12
|
+
rel: string;
|
|
13
|
+
href: string;
|
|
14
|
+
title: string;
|
|
15
|
+
type: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface AttachmentLinks {
|
|
19
|
+
delete: AttachmentActions;
|
|
20
|
+
download: AttachmentActions;
|
|
21
|
+
edit: AttachmentActions;
|
|
22
|
+
}
|
|
23
|
+
export interface FileObject extends File {
|
|
24
|
+
icon?: string;
|
|
25
|
+
ID: string;
|
|
26
|
+
fileName: string;
|
|
27
|
+
category: string;
|
|
28
|
+
responseType: string;
|
|
29
|
+
fileType: string;
|
|
30
|
+
mimeType: string;
|
|
31
|
+
extension: string;
|
|
32
|
+
thumbnail?: string;
|
|
33
|
+
nameWithExt: string;
|
|
34
|
+
inProgress?: boolean;
|
|
35
|
+
progress?: number;
|
|
36
|
+
handle: string;
|
|
37
|
+
label: string;
|
|
38
|
+
delete?: boolean;
|
|
39
|
+
error?: boolean;
|
|
40
|
+
description: string;
|
|
41
|
+
|
|
42
|
+
props: {
|
|
43
|
+
icon?: string;
|
|
44
|
+
|
|
45
|
+
ref?: Ref<HTMLDivElement>;
|
|
46
|
+
id: string;
|
|
47
|
+
error?: string;
|
|
48
|
+
format?: string;
|
|
49
|
+
name: string;
|
|
50
|
+
thumbnail?: string;
|
|
51
|
+
onPreview?: () => void;
|
|
52
|
+
onDelete?: () => void;
|
|
53
|
+
onOpen?: () => void;
|
|
54
|
+
onEdit?: () => void;
|
|
55
|
+
onCancel?: () => void;
|
|
56
|
+
};
|
|
57
|
+
responseProps: ResponseProps;
|
|
58
|
+
value?: {
|
|
59
|
+
filename: string;
|
|
60
|
+
ID: string;
|
|
61
|
+
thumbnail: string;
|
|
62
|
+
};
|
|
63
|
+
categoryName: string;
|
|
64
|
+
createTime: string;
|
|
65
|
+
createdBy: string;
|
|
66
|
+
createdByName: string;
|
|
67
|
+
links: AttachmentLinks;
|
|
68
|
+
name: string;
|
|
69
|
+
meta?: ReactElement;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface ReduxAttachments {
|
|
73
|
+
ID?: string;
|
|
74
|
+
pzInsKey?: string;
|
|
75
|
+
FileName: string;
|
|
76
|
+
Category: string;
|
|
77
|
+
MimeType?: string;
|
|
78
|
+
FileExtension: string;
|
|
79
|
+
error: string | null;
|
|
80
|
+
localAttachment: boolean;
|
|
81
|
+
thumbnail?: string;
|
|
82
|
+
fileIndex?: number;
|
|
83
|
+
instruction?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface PageInstructionOptions {
|
|
87
|
+
allowMultiple: boolean;
|
|
88
|
+
isMultiAttachmentInInlineEditTable: boolean;
|
|
89
|
+
attachmentCount: number;
|
|
90
|
+
insertPageInstruction: boolean;
|
|
91
|
+
deletePageInstruction: boolean;
|
|
92
|
+
deleteIndex: number;
|
|
93
|
+
insertRedux: boolean;
|
|
94
|
+
isOldAttachment: boolean;
|
|
95
|
+
deleteRedux: boolean;
|
|
96
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/AttachmentUtils.ts
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { useCallback, useRef } from 'react';
|
|
2
|
+
import download from 'downloadjs';
|
|
3
|
+
import equal from 'fast-deep-equal';
|
|
4
|
+
|
|
5
|
+
import type { FileObject, PageInstructionOptions, ReduxAttachments } from './Attachment.types';
|
|
6
|
+
|
|
7
|
+
export const isContentBinary = (headers: Record<string, string>) => {
|
|
8
|
+
return headers && headers['content-transfer-encoding'] === 'binary';
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const isContentBase64 = (headers: Record<string, string>) => {
|
|
12
|
+
return headers && headers['content-transfer-encoding'] === 'base64';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const validateFileExtension = (fileObj: Record<string, string>, allowedExtensions: string) => {
|
|
16
|
+
if (!allowedExtensions) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
const allowedExtensionList = allowedExtensions
|
|
20
|
+
.toLowerCase()
|
|
21
|
+
.split(',')
|
|
22
|
+
.map(item => item.replaceAll('.', '').trim());
|
|
23
|
+
const extension = fileObj.name.split('.').pop()?.toLowerCase() || '';
|
|
24
|
+
return allowedExtensionList.includes(extension);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const fileDownload = (data: string | Blob, fileName: string, ext: string | null, headers: Record<string, string>) => {
|
|
28
|
+
const name = ext ? `${fileName}.${ext}` : fileName;
|
|
29
|
+
// Temp fix: downloading EMAIl type attachment as html file
|
|
30
|
+
if (ext === 'html') {
|
|
31
|
+
download(isContentBase64(headers) ? atob(data as string) : data, name, 'text/html');
|
|
32
|
+
} else if (isContentBinary(headers)) {
|
|
33
|
+
download(data, name);
|
|
34
|
+
} else {
|
|
35
|
+
download(atob(data as string), name);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const getIconFromFileType = (fileType: string) => {
|
|
40
|
+
let icon = 'document-doc';
|
|
41
|
+
if (!fileType) return icon;
|
|
42
|
+
if (fileType.startsWith('audio')) {
|
|
43
|
+
icon = 'audio';
|
|
44
|
+
} else if (fileType.startsWith('video')) {
|
|
45
|
+
icon = 'video';
|
|
46
|
+
} else if (fileType.startsWith('image')) {
|
|
47
|
+
icon = 'picture';
|
|
48
|
+
} else if (fileType.includes('pdf')) {
|
|
49
|
+
icon = 'document-pdf';
|
|
50
|
+
} else {
|
|
51
|
+
const [, subtype] = fileType.split('/');
|
|
52
|
+
const foundMatch = (sources: string[]) => {
|
|
53
|
+
return sources.some(key => subtype.includes(key));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
if (foundMatch(['excel', 'spreadsheet'])) {
|
|
57
|
+
icon = 'document-xls';
|
|
58
|
+
} else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {
|
|
59
|
+
icon = 'document-compress';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return icon;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const fileDownloadVar = (content: { data: string; headers: Record<string, string> }, type: string, name: string, extension: string) => {
|
|
67
|
+
if (type === 'FILE' || type === undefined) {
|
|
68
|
+
fileDownload(content.data, name, extension, content.headers);
|
|
69
|
+
} else if (type === 'URL') {
|
|
70
|
+
let { data } = content;
|
|
71
|
+
if (!/^(http|https):\/\//.test(data)) {
|
|
72
|
+
data = `//${data}`;
|
|
73
|
+
}
|
|
74
|
+
window.open(content.data, '_blank');
|
|
75
|
+
} else if (type === 'EMAIL') {
|
|
76
|
+
// Temp Fix: for EMAIL type attachment
|
|
77
|
+
fileDownload(content.data, name, 'html', content.headers);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const getMappedValue = (value: string): string => {
|
|
82
|
+
return PCore.getEnvironmentInfo().getKeyMapping(value) ?? value;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const generateInstructions = (
|
|
86
|
+
files: FileObject[],
|
|
87
|
+
pConn: typeof PConnect,
|
|
88
|
+
attachmentsInModal: ReduxAttachments[] | Pick<ReduxAttachments, 'instruction' | 'fileIndex'>[],
|
|
89
|
+
options: {
|
|
90
|
+
allowMultiple: boolean;
|
|
91
|
+
isMultiAttachmentInInlineEditTable: boolean;
|
|
92
|
+
attachmentCount: number;
|
|
93
|
+
insertPageInstruction: boolean;
|
|
94
|
+
deletePageInstruction: boolean;
|
|
95
|
+
deleteIndex: number;
|
|
96
|
+
}
|
|
97
|
+
) => {
|
|
98
|
+
const { allowMultiple, isMultiAttachmentInInlineEditTable, attachmentCount, insertPageInstruction, deletePageInstruction, deleteIndex } = options;
|
|
99
|
+
const transformedAttachments: ReduxAttachments[] = [];
|
|
100
|
+
let valueRef = pConn.getStateProps().value;
|
|
101
|
+
valueRef = valueRef?.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
|
|
102
|
+
const uniqueKey = getMappedValue('pzInsKey');
|
|
103
|
+
files.forEach((file, index) => {
|
|
104
|
+
const filename = file.value?.filename || file.props?.name || '';
|
|
105
|
+
const payload = {
|
|
106
|
+
[uniqueKey]: file.value?.ID || file.props?.id,
|
|
107
|
+
FileName: filename,
|
|
108
|
+
Category: '',
|
|
109
|
+
// MimeType: getMimeTypeFromFile(filename),
|
|
110
|
+
FileExtension: filename.split('.').pop() ?? filename,
|
|
111
|
+
error: file.props?.error || null,
|
|
112
|
+
localAttachment: true,
|
|
113
|
+
thumbnail: file.value?.thumbnail
|
|
114
|
+
};
|
|
115
|
+
transformedAttachments.push(payload);
|
|
116
|
+
if (payload.error) {
|
|
117
|
+
return; // Don't process page instructions for error files, skip current iteration
|
|
118
|
+
}
|
|
119
|
+
if (allowMultiple) {
|
|
120
|
+
if (isMultiAttachmentInInlineEditTable) {
|
|
121
|
+
if (insertPageInstruction) {
|
|
122
|
+
attachmentsInModal.push({ ...payload, instruction: 'insert' } as any);
|
|
123
|
+
} else if (deletePageInstruction) {
|
|
124
|
+
(attachmentsInModal as Pick<ReduxAttachments, 'instruction' | 'fileIndex'>[]).push({
|
|
125
|
+
instruction: 'delete',
|
|
126
|
+
fileIndex: deleteIndex
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
} else if (insertPageInstruction) {
|
|
130
|
+
pConn.getListActions().insert({ ID: payload[uniqueKey] }, attachmentCount + index, undefined, {
|
|
131
|
+
skipStateUpdate: true
|
|
132
|
+
});
|
|
133
|
+
} else if (deletePageInstruction) {
|
|
134
|
+
pConn.getListActions().deleteEntry(deleteIndex, undefined, { skipStateUpdate: true });
|
|
135
|
+
}
|
|
136
|
+
} else if (insertPageInstruction) {
|
|
137
|
+
pConn.getListActions().replacePage(`.${valueRef}`, { ID: payload[uniqueKey] }, { skipStateUpdate: true });
|
|
138
|
+
} else if (deletePageInstruction) {
|
|
139
|
+
pConn.getListActions().deletePage(`.${valueRef}`, { skipStateUpdate: true });
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
return transformedAttachments;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export const updateReduxState = (
|
|
146
|
+
transformedAttachments: ReduxAttachments[],
|
|
147
|
+
pConn: typeof PConnect,
|
|
148
|
+
valueRef: string,
|
|
149
|
+
options: PageInstructionOptions
|
|
150
|
+
) => {
|
|
151
|
+
const { allowMultiple, isOldAttachment, insertRedux, deleteRedux } = options;
|
|
152
|
+
let deleteIndex = -1;
|
|
153
|
+
|
|
154
|
+
if (allowMultiple || isOldAttachment) {
|
|
155
|
+
transformedAttachments.forEach(attachment => {
|
|
156
|
+
const key = isOldAttachment ? `${valueRef}.pxResults` : valueRef;
|
|
157
|
+
const existingAttachments: ReduxAttachments[] = PCore.getStoreValue(`.${key}`, pConn.getPageReference(), pConn.getContextName()) || [];
|
|
158
|
+
|
|
159
|
+
if (insertRedux) {
|
|
160
|
+
const actionPayLoad = {
|
|
161
|
+
type: 'LIST_ACTION',
|
|
162
|
+
payload: {
|
|
163
|
+
instruction: 'INSERT',
|
|
164
|
+
context: pConn.getContextName(),
|
|
165
|
+
referenceList: `${pConn.getPageReference()}.${key}`,
|
|
166
|
+
listIndex: existingAttachments.length,
|
|
167
|
+
content: attachment
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
PCore.getStore()?.dispatch(actionPayLoad);
|
|
171
|
+
} else if (deleteRedux) {
|
|
172
|
+
const uniqueKey = getMappedValue('pzInsKey');
|
|
173
|
+
deleteIndex = existingAttachments.findIndex(
|
|
174
|
+
existingAttachment =>
|
|
175
|
+
existingAttachment[uniqueKey as keyof ReduxAttachments] === transformedAttachments[0][uniqueKey as keyof ReduxAttachments]
|
|
176
|
+
);
|
|
177
|
+
const actionPayLoad = {
|
|
178
|
+
type: 'LIST_ACTION',
|
|
179
|
+
payload: {
|
|
180
|
+
instruction: 'DELETE',
|
|
181
|
+
context: pConn.getContextName(),
|
|
182
|
+
referenceList: `${pConn.getPageReference()}.${key}`,
|
|
183
|
+
listIndex: deleteIndex
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
PCore.getStore()?.dispatch(actionPayLoad);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
} else if (insertRedux) {
|
|
190
|
+
const actionPayLoad = {
|
|
191
|
+
type: 'LIST_ACTION',
|
|
192
|
+
payload: {
|
|
193
|
+
instruction: 'REPLACE',
|
|
194
|
+
context: pConn.getContextName(),
|
|
195
|
+
referenceList: `${pConn.getPageReference()}.${valueRef}`,
|
|
196
|
+
content: transformedAttachments[0]
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
PCore.getStore()?.dispatch(actionPayLoad);
|
|
200
|
+
} else if (deleteRedux) {
|
|
201
|
+
const actionPayLoad = {
|
|
202
|
+
type: 'LIST_ACTION',
|
|
203
|
+
payload: {
|
|
204
|
+
instruction: 'DELETEPAGE',
|
|
205
|
+
context: pConn.getContextName(),
|
|
206
|
+
referenceList: `${pConn.getPageReference()}.${valueRef}`
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
PCore.getStore()?.dispatch(actionPayLoad);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export const insertAttachments = (
|
|
214
|
+
files: FileObject[],
|
|
215
|
+
pConn: typeof PConnect,
|
|
216
|
+
attachmentsInModal: ReduxAttachments[],
|
|
217
|
+
options: PageInstructionOptions
|
|
218
|
+
) => {
|
|
219
|
+
const { isMultiAttachmentInInlineEditTable } = options;
|
|
220
|
+
let valueRef = pConn.getStateProps().value;
|
|
221
|
+
valueRef = valueRef?.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
|
|
222
|
+
const transformedAttachments = generateInstructions(files, pConn, attachmentsInModal, {
|
|
223
|
+
...options,
|
|
224
|
+
insertPageInstruction: true
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
if (isMultiAttachmentInInlineEditTable) {
|
|
228
|
+
return; // For attachments within modal, redux update is not necessary yet, as modal isn't submitted at this stage
|
|
229
|
+
}
|
|
230
|
+
updateReduxState(transformedAttachments, pConn, valueRef, { ...options, insertRedux: true });
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export const deleteAttachments = (
|
|
234
|
+
files: FileObject[],
|
|
235
|
+
pConn: typeof PConnect,
|
|
236
|
+
attachmentsInModal: Pick<ReduxAttachments, 'instruction' | 'fileIndex'>[],
|
|
237
|
+
options: PageInstructionOptions
|
|
238
|
+
) => {
|
|
239
|
+
const { isMultiAttachmentInInlineEditTable } = options;
|
|
240
|
+
let valueRef = pConn.getStateProps().value;
|
|
241
|
+
valueRef = valueRef?.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
|
|
242
|
+
const transformedAttachments = generateInstructions(files, pConn, attachmentsInModal, {
|
|
243
|
+
...options,
|
|
244
|
+
deletePageInstruction: true
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
if (isMultiAttachmentInInlineEditTable) {
|
|
248
|
+
return; // For attachments within modal, redux update is not necessary yet, as modal isn't submitted at this stage
|
|
249
|
+
}
|
|
250
|
+
updateReduxState(transformedAttachments, pConn, valueRef, { ...options, deleteRedux: true });
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
export const clearFieldErrorMessages = (pConn: typeof PConnect) => {
|
|
254
|
+
const fieldName = pConn.getStateProps().value;
|
|
255
|
+
PCore.getMessageManager().clearMessages({
|
|
256
|
+
type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,
|
|
257
|
+
property: fieldName,
|
|
258
|
+
pageReference: pConn.getPageReference(),
|
|
259
|
+
context: pConn.getContextName()
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export const useFileDownload = (context: string) => {
|
|
264
|
+
return useCallback(
|
|
265
|
+
({
|
|
266
|
+
ID,
|
|
267
|
+
name,
|
|
268
|
+
extension,
|
|
269
|
+
type,
|
|
270
|
+
category,
|
|
271
|
+
responseType
|
|
272
|
+
}: {
|
|
273
|
+
ID: string;
|
|
274
|
+
name: string;
|
|
275
|
+
extension: string;
|
|
276
|
+
type: string;
|
|
277
|
+
category: string;
|
|
278
|
+
responseType: string;
|
|
279
|
+
}) => {
|
|
280
|
+
if (category !== 'pxDocument') {
|
|
281
|
+
(
|
|
282
|
+
PCore.getAttachmentUtils().downloadAttachment(ID, context, responseType) as Promise<{
|
|
283
|
+
data: string;
|
|
284
|
+
headers: Record<string, string>;
|
|
285
|
+
}>
|
|
286
|
+
)
|
|
287
|
+
.then(content => {
|
|
288
|
+
fileDownloadVar(content, type, name, extension);
|
|
289
|
+
})
|
|
290
|
+
|
|
291
|
+
.catch(console.error);
|
|
292
|
+
} else {
|
|
293
|
+
(
|
|
294
|
+
PCore.getAttachmentUtils().downloadDocument(ID, context) as Promise<{
|
|
295
|
+
data: string;
|
|
296
|
+
headers: Record<string, string>;
|
|
297
|
+
}>
|
|
298
|
+
)
|
|
299
|
+
.then(content => {
|
|
300
|
+
fileDownloadVar(content, type, name, extension);
|
|
301
|
+
})
|
|
302
|
+
|
|
303
|
+
.catch(console.error);
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
[context]
|
|
307
|
+
);
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
export const useDeepMemo = (memoFn, key) => {
|
|
311
|
+
const ref: any = useRef();
|
|
312
|
+
if (!ref.current || !equal(key, ref.current.key)) {
|
|
313
|
+
ref.current = { key, value: memoFn() };
|
|
314
|
+
}
|
|
315
|
+
return ref.current.value;
|
|
316
|
+
};
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/CaseHistory/CaseHistory.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { Theme } from '@mui/material/styles';
|
|
2
|
+
import type { Theme } from '@mui/material/styles';
|
|
3
3
|
import withStyles from '@mui/styles/withStyles';
|
|
4
4
|
import createStyles from '@mui/styles/createStyles';
|
|
5
5
|
import Table from '@mui/material/Table';
|
|
@@ -11,7 +11,7 @@ import TableRow from '@mui/material/TableRow';
|
|
|
11
11
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
12
12
|
|
|
13
13
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
14
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
15
15
|
|
|
16
16
|
interface CaseHistoryProps extends PConnProps {
|
|
17
17
|
// If any, enter additional props that only exist on this component
|
|
@@ -66,8 +66,8 @@ export default function CaseHistory(props: CaseHistoryProps) {
|
|
|
66
66
|
const dataViewName = 'D_pyWorkHistory';
|
|
67
67
|
const context = thePConn.getContextName();
|
|
68
68
|
|
|
69
|
-
function computeRowData(rows:
|
|
70
|
-
const theRowData:
|
|
69
|
+
function computeRowData(rows: object[]): void {
|
|
70
|
+
const theRowData: object[] = [];
|
|
71
71
|
|
|
72
72
|
rows.forEach((row: any, rowIndex: number) => {
|
|
73
73
|
// Now, for each property in the index of row properties (displayedColumns), add an object
|
|
@@ -142,7 +142,7 @@ export default function CaseHistory(props: CaseHistoryProps) {
|
|
|
142
142
|
// Note: using rowData.current since we're using useRef as a mutatable
|
|
143
143
|
// value that's only updated when it changes.
|
|
144
144
|
if (rowData.current.length > 0) {
|
|
145
|
-
rowData.current.forEach((dataRow:
|
|
145
|
+
rowData.current.forEach((dataRow: object[], index) => {
|
|
146
146
|
// using dataRow[0]-dataRow[1] as the array key since it's a unique value
|
|
147
147
|
const theKey = `CaseHistory-${index}`;
|
|
148
148
|
theDataRows.push(
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
padding: 0.625rem 0rem;
|
|
4
4
|
text-align: left;
|
|
5
|
-
background-color:
|
|
5
|
+
/* background-color: var(--utility-background-color); */
|
|
6
6
|
border-radius: 0.6125rem;
|
|
7
7
|
margin: 0.3125rem 0rem;
|
|
8
8
|
position: relative;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
.psdk-file-utility-card-svg-icon {
|
|
17
17
|
width: 1.4rem;
|
|
18
18
|
display: inline-block;
|
|
19
|
+
filter: var(--svg-color);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.header-text {
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.psdk-utility-count {
|
|
28
|
-
background:
|
|
29
|
+
background: var(--utility-count-background-color);
|
|
29
30
|
border-radius: calc(1.125 * 0.5rem);
|
|
30
31
|
font-size: 0.75rem;
|
|
31
32
|
font-weight: bold;
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
align-items: center;
|
|
41
42
|
height: 100%;
|
|
42
43
|
width: 100%;
|
|
43
|
-
background-color:
|
|
44
|
+
background-color: var(--modal-background-color);
|
|
44
45
|
position: fixed;
|
|
45
46
|
z-index: 999;
|
|
46
47
|
top: 0px;
|
|
@@ -51,11 +52,11 @@
|
|
|
51
52
|
display: table;
|
|
52
53
|
margin: auto;
|
|
53
54
|
min-width: 650px;
|
|
54
|
-
background-color:
|
|
55
|
-
border: 1px solid
|
|
55
|
+
background-color: var(--modal-top-color);
|
|
56
|
+
border: 1px solid var(--modal-border-color);
|
|
56
57
|
border-radius: 10px;
|
|
57
58
|
padding: 20px;
|
|
58
|
-
box-shadow: 0 0 10px 3px
|
|
59
|
+
box-shadow: 0 0 10px 3px var(--modal-box-shadow-color);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
.psdk-modal-file-selector {
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx
CHANGED
|
@@ -7,15 +7,17 @@ import download from 'downloadjs';
|
|
|
7
7
|
// import SummaryList from '../../SummaryList';
|
|
8
8
|
// import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';
|
|
9
9
|
import './FileUtility.css';
|
|
10
|
-
import { IconButton, Menu, MenuItem, Button, CircularProgress } from '@mui/material';
|
|
10
|
+
import { IconButton, Menu, MenuItem, Button, CircularProgress, Card, debounce } from '@mui/material';
|
|
11
11
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
12
12
|
|
|
13
|
-
import { validateMaxSize } from '@pega/react-sdk-components/lib/components/helpers/
|
|
13
|
+
import { validateMaxSize } from '@pega/react-sdk-components/lib/components/helpers/attachmentShared';
|
|
14
|
+
import { getResolvedConstantValue } from '@pega/react-sdk-components/lib/components/helpers/object-utils';
|
|
14
15
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
15
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
16
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
16
17
|
|
|
17
18
|
interface FileUtilityProps extends PConnProps {
|
|
18
19
|
// If any, enter additional props that only exist on this component
|
|
20
|
+
caseId?: string;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export default function FileUtility(props: FileUtilityProps) {
|
|
@@ -23,8 +25,9 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
23
25
|
const SummaryList = getComponentFromMap('SummaryList');
|
|
24
26
|
const ActionButtonsForFileUtil = getComponentFromMap('ActionButtonsForFileUtil');
|
|
25
27
|
|
|
26
|
-
const { getPConnect } = props;
|
|
28
|
+
const { getPConnect, caseId } = props;
|
|
27
29
|
const thePConn = getPConnect();
|
|
30
|
+
const caseID = caseId ?? getResolvedConstantValue(thePConn, PCore.getConstants().CASE_INFO.CASE_INFO_ID);
|
|
28
31
|
const required = true;
|
|
29
32
|
const listTemp = {
|
|
30
33
|
data: [],
|
|
@@ -179,7 +182,7 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
179
182
|
const context = thePConn.getContextName();
|
|
180
183
|
|
|
181
184
|
attachUtils
|
|
182
|
-
// @ts-
|
|
185
|
+
// @ts-expect-error - 3rd parameter "responseEncoding" is optional
|
|
183
186
|
.downloadAttachment(ID, context)
|
|
184
187
|
.then((content: any) => {
|
|
185
188
|
if (type === 'FILE') {
|
|
@@ -203,7 +206,6 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
203
206
|
attachUtils
|
|
204
207
|
.deleteAttachment(ID, context)
|
|
205
208
|
.then(() => {
|
|
206
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
207
209
|
getAttachments();
|
|
208
210
|
})
|
|
209
211
|
.catch();
|
|
@@ -211,7 +213,6 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
211
213
|
|
|
212
214
|
const getAttachments = () => {
|
|
213
215
|
const attachmentUtils = PCore.getAttachmentUtils();
|
|
214
|
-
const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
|
|
215
216
|
|
|
216
217
|
if (caseID && caseID !== '') {
|
|
217
218
|
const attPromise = attachmentUtils.getCaseAttachments(caseID, thePConn.getContextName());
|
|
@@ -246,25 +247,32 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
246
247
|
}
|
|
247
248
|
};
|
|
248
249
|
|
|
250
|
+
const debouncedGetAttachments = debounce(getAttachments, 1000);
|
|
251
|
+
|
|
249
252
|
useEffect(() => {
|
|
250
|
-
|
|
253
|
+
debouncedGetAttachments();
|
|
251
254
|
}, []);
|
|
252
255
|
|
|
253
256
|
useEffect(() => {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
);
|
|
257
|
+
const attachSubObject = {
|
|
258
|
+
matcher: 'ATTACHMENTS',
|
|
259
|
+
criteria: {
|
|
260
|
+
ID: caseID
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
const attachSubId = PCore.getMessagingServiceManager().subscribe(attachSubObject, debouncedGetAttachments, getPConnect().getContextName());
|
|
264
|
+
|
|
265
|
+
return function cleanup() {
|
|
266
|
+
PCore.getMessagingServiceManager().unsubscribe(attachSubId);
|
|
265
267
|
};
|
|
266
268
|
}, []);
|
|
267
269
|
|
|
270
|
+
useEffect(() => {
|
|
271
|
+
thePConn.registerAdditionalProps({
|
|
272
|
+
lastRefreshTime: `@P ${PCore.getConstants().SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME}`
|
|
273
|
+
});
|
|
274
|
+
}, [thePConn]);
|
|
275
|
+
|
|
268
276
|
function setNewFiles(arFiles) {
|
|
269
277
|
let index = 0;
|
|
270
278
|
for (const file of arFiles) {
|
|
@@ -488,7 +496,7 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
488
496
|
}
|
|
489
497
|
|
|
490
498
|
return (
|
|
491
|
-
<
|
|
499
|
+
<Card className='psdk-utility' id='file-utility'>
|
|
492
500
|
{inProgress && (
|
|
493
501
|
<div className='progress-div'>
|
|
494
502
|
<CircularProgress />
|
|
@@ -512,7 +520,7 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
512
520
|
>
|
|
513
521
|
<MoreVertIcon />
|
|
514
522
|
</IconButton>
|
|
515
|
-
<Menu
|
|
523
|
+
<Menu id='simple-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>
|
|
516
524
|
<MenuItem style={{ fontSize: '14px' }} onClick={onAddFilesClick}>
|
|
517
525
|
{thePConn.getLocalizedValue('Add files', '', '')}
|
|
518
526
|
</MenuItem>{' '}
|
|
@@ -630,7 +638,6 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
630
638
|
<div className='psdk-modal-file-top'>
|
|
631
639
|
<div className='psdk-view-all-header'>
|
|
632
640
|
<h3>{thePConn.getLocalizedValue('Attachments', '', '')}</h3> {/* 2nd and 3rd args empty string until typedef marked correctly */}
|
|
633
|
-
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
|
|
634
641
|
<button type='button' className='psdk-close-button' onClick={() => setViewAll(false)}>
|
|
635
642
|
<img className='psdk-utility-card-actions-svg-icon' src={closeSvgIcon} />
|
|
636
643
|
</button>
|
|
@@ -641,6 +648,6 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
641
648
|
</div>
|
|
642
649
|
</div>
|
|
643
650
|
)}
|
|
644
|
-
</
|
|
651
|
+
</Card>
|
|
645
652
|
);
|
|
646
653
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import { Card, CardContent, CardHeader, Typography } from '@mui/material';
|
|
3
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
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 FollowersProps extends PConnProps {
|
|
7
7
|
// If any, enter additional props that only exist on this component
|
|
@@ -17,8 +17,6 @@ const useStyles = makeStyles(theme => ({
|
|
|
17
17
|
marginLeft: theme.spacing(1),
|
|
18
18
|
marginTop: theme.spacing(1),
|
|
19
19
|
marginBottom: theme.spacing(1)
|
|
20
|
-
// borderLeft: "6px solid",
|
|
21
|
-
// borderLeftColor: green[300]
|
|
22
20
|
}
|
|
23
21
|
}));
|
|
24
22
|
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
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 QuickCreateProps extends PConnProps {
|
|
7
7
|
// If any, enter additional props that only exist on this component
|
|
@@ -21,7 +21,6 @@ export default function QuickCreate(props: QuickCreateProps) {
|
|
|
21
21
|
.getActionsApi()
|
|
22
22
|
.createWork(className, {} as any)
|
|
23
23
|
.catch(error => {
|
|
24
|
-
// eslint-disable-next-line no-console
|
|
25
24
|
console.log('Error in case creation: ', error?.message);
|
|
26
25
|
});
|
|
27
26
|
};
|
|
@@ -35,7 +34,6 @@ export default function QuickCreate(props: QuickCreateProps) {
|
|
|
35
34
|
const defaultCases: any = [];
|
|
36
35
|
const envInfo = PCore.getEnvironmentInfo();
|
|
37
36
|
if (envInfo?.environmentInfoObject?.pyCaseTypeList) {
|
|
38
|
-
// @ts-ignore - Property 'forEach' does not exist on type 'string'
|
|
39
37
|
envInfo.environmentInfoObject.pyCaseTypeList.forEach(casetype => {
|
|
40
38
|
if (casetype.pyWorkTypeName && casetype.pyWorkTypeImplementationClassName) {
|
|
41
39
|
defaultCases.push({
|