@pega/dx-component-builder-sdk 25.1.16 → 26.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/package.json +1 -1
- package/pega-dx-component-builder-sdk-26.1.10.tgz +0 -0
- package/src/constants.js +4 -0
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/utils.ts.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/DetailsRender.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/DetailsRender.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/template/FORM/DetailsRender.tsx +1 -1
- package/src/tasks/create/templates/Constellation/template/FORM-region/DetailsRender.tsx +1 -1
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +22 -6
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +8 -1
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +22 -13
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +9 -1
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +23 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +24 -8
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +24 -8
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +24 -10
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +26 -14
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +34 -8
- package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/index.tsx.mustache +25 -9
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +21 -5
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +25 -14
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +32 -21
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +25 -10
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +26 -14
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +28 -10
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +26 -14
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/demo.stories.tsx.mustache +9 -1
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +22 -17
- package/src/tasks/create/templates/SDK-React/template/FORM/DefaultForm.css +82 -2
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +51 -11
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +19 -15
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +2 -167
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +72 -15
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +25 -14
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/AlertBanner/AlertBanner.css +46 -0
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +37 -20
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +14 -0
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +57 -5
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +18 -11
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +19 -4
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Operator/Operator.tsx +125 -74
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +184 -90
- package/tests/assets/sdk-r/components/create/override-sdk/field/AutoComplete/AutoComplete.tsx +372 -26
- package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +22 -6
- package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +22 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Date/Date.tsx +35 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/DateTime/DateTime.tsx +35 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +22 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Dropdown/Dropdown.tsx +48 -16
- package/tests/assets/sdk-r/components/create/override-sdk/field/Email/Email.tsx +21 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +28 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Integer/Integer.tsx +21 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/Multiselect.tsx +42 -20
- package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/utils.ts +5 -3
- package/tests/assets/sdk-r/components/create/override-sdk/field/ObjectReference/ObjectReference.tsx +554 -66
- package/tests/assets/sdk-r/components/create/override-sdk/field/ObjectReference/utils.ts +108 -20
- package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +22 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +23 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/RadioButtons/RadioButtons.tsx +20 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.css +0 -79
- package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/field/SelectableCard/SelectableCard.tsx +25 -10
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextArea/TextArea.tsx +22 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextInput/TextInput.tsx +21 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Time/Time.tsx +35 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/URL/URL.tsx +22 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/UserReference.tsx +10 -6
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +36 -14
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/useValidationBanner.ts +29 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +31 -10
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/FlowContainer.tsx +5 -6
- package/tests/assets/sdk-r/components/create/override-sdk/infra/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/DataViewActionButtons/DataViewActionButtons.tsx +138 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +110 -64
- package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.css +63 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.tsx +23 -52
- package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +8 -3
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/Reference.tsx +5 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/RootContainer.tsx +4 -5
- package/tests/assets/sdk-r/components/create/override-sdk/infra/View/View.css +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/View/View.tsx +10 -17
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/ViewContainer.tsx +8 -10
- package/tests/assets/sdk-r/components/create/override-sdk/template/AppShell/AppShell.css +0 -4
- package/tests/assets/sdk-r/components/create/override-sdk/template/AppShell/AppShell.tsx +7 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseSummary/CaseSummary.tsx +9 -42
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +8 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +58 -3
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/DataReference.tsx +56 -33
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/SearchForm.tsx +3 -4
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/DefaultForm.css +71 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/DefaultForm.tsx +45 -9
- package/tests/assets/sdk-r/components/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +139 -59
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/hooks.ts +80 -13
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +13 -3
- package/tests/assets/sdk-r/components/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +16 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +167 -93
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +71 -56
- package/tests/assets/sdk-r/components/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +12 -7
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +119 -26
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/AttachmentUtils.ts +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/CaseHistory/CaseHistory.tsx +16 -12
- package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +40 -28
- package/tests/assets/sdk-r/components/create/override-sdk/widget/ToDo/ToDo.tsx +14 -6
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/utils.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/DetailsRender.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/DetailsRender.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +22 -6
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +24 -8
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +8 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +22 -13
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +23 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +24 -8
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +32 -21
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +26 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +26 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +24 -10
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +25 -10
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +34 -8
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +21 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/index.tsx +22 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +25 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +25 -10
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +22 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +26 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/DefaultForm.css +82 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +45 -8
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +19 -15
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +66 -15
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +2 -167
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/AlertBanner/AlertBanner.css +46 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +37 -20
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +14 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +57 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +18 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +19 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Operator/Operator.tsx +125 -74
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +184 -90
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +372 -26
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +22 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +22 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Date/Date.tsx +35 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/DateTime/DateTime.tsx +35 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +22 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Dropdown/Dropdown.tsx +48 -16
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Email/Email.tsx +21 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +28 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Integer/Integer.tsx +21 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/Multiselect.tsx +42 -20
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/utils.ts +5 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/ObjectReference/ObjectReference.tsx +554 -66
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/ObjectReference/utils.ts +108 -20
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +22 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +23 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +20 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.css +0 -79
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/SelectableCard/SelectableCard.tsx +25 -10
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextArea/TextArea.tsx +22 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextInput/TextInput.tsx +21 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Time/Time.tsx +35 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/URL/URL.tsx +22 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/UserReference.tsx +10 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +36 -14
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/useValidationBanner.ts +29 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +31 -10
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/FlowContainer.tsx +5 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/DataViewActionButtons/DataViewActionButtons.tsx +138 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +110 -64
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.css +63 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +23 -52
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +8 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/Reference.tsx +5 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/RootContainer.tsx +4 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/View/View.css +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/View/View.tsx +10 -17
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/ViewContainer.tsx +8 -10
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AppShell/AppShell.css +0 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/AppShell/AppShell.tsx +7 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +9 -42
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +8 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +58 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/DataReference.tsx +56 -33
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/SearchForm.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/DefaultForm.css +71 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/DefaultForm.tsx +45 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +139 -59
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/hooks.ts +80 -13
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +13 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +16 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +167 -93
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +71 -56
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +12 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +119 -26
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/AttachmentUtils.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/CaseHistory/CaseHistory.tsx +16 -12
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +40 -28
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ToDo/ToDo.tsx +14 -6
- package/SECURITY.md +0 -10
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
1
2
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
2
|
-
|
|
3
|
+
import { getFieldMeta } from '@pega/react-sdk-components/lib/components/template/DataReference/utils';
|
|
3
4
|
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
5
|
|
|
5
6
|
interface SimpleTableSelectProps extends PConnProps {
|
|
@@ -13,100 +14,96 @@ interface SimpleTableSelectProps extends PConnProps {
|
|
|
13
14
|
parameters: any;
|
|
14
15
|
readonlyContextList: object[] | string;
|
|
15
16
|
dataRelationshipContext: string;
|
|
17
|
+
defaultRowHeight: string | number;
|
|
18
|
+
showPromotedFilters: boolean;
|
|
19
|
+
displayAs: string;
|
|
20
|
+
contextPage: object;
|
|
21
|
+
toggleFieldVisibility: boolean;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
const [, parentPropName] = param.split('.');
|
|
20
|
-
return parentPropName === referenceProp;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* SimpleTable react component
|
|
25
|
-
* @param {*} props - props
|
|
26
|
-
*/
|
|
27
|
-
export default function SimpleTableSelect(props: SimpleTableSelectProps) {
|
|
24
|
+
function SelectableTable(props: SimpleTableSelectProps) {
|
|
28
25
|
// Get emitted components from map (so we can get any override that may exist)
|
|
29
26
|
const ListView = getComponentFromMap('ListView');
|
|
30
|
-
const SimpleTable = getComponentFromMap('SimpleTable');
|
|
31
27
|
const PromotedFilters = getComponentFromMap('PromotedFilters');
|
|
32
28
|
|
|
33
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
label,
|
|
31
|
+
getPConnect,
|
|
32
|
+
showLabel = true,
|
|
33
|
+
viewName = '',
|
|
34
|
+
parameters,
|
|
35
|
+
dataRelationshipContext = null,
|
|
36
|
+
referenceList,
|
|
37
|
+
showPromotedFilters,
|
|
38
|
+
displayAs,
|
|
39
|
+
readonlyContextList,
|
|
40
|
+
contextPage,
|
|
41
|
+
toggleFieldVisibility
|
|
42
|
+
} = props;
|
|
43
|
+
|
|
44
|
+
const pConn = getPConnect();
|
|
34
45
|
|
|
35
46
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
36
47
|
if (propsToUse.showLabel === false) {
|
|
37
48
|
propsToUse.label = '';
|
|
38
49
|
}
|
|
39
50
|
|
|
40
|
-
const
|
|
51
|
+
const { compositeKeys, fieldMetadata } = getFieldMeta(getPConnect, dataRelationshipContext);
|
|
52
|
+
const { pageClass } = fieldMetadata;
|
|
53
|
+
|
|
41
54
|
const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
|
|
42
55
|
const { selectionMode, selectionList } = pConn.getConfigProps() as any;
|
|
43
56
|
const isMultiSelectMode = selectionMode === MULTI;
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
let referenceProp = isMultiSelectMode ? selectionList.substring(1) : pageReference.substring(pageReference.lastIndexOf('.') + 1);
|
|
51
|
-
// Replace here to use the context name instead
|
|
52
|
-
let contextPageReference: string | null = null;
|
|
53
|
-
if (props.dataRelationshipContext !== null && selectionMode === 'single') {
|
|
54
|
-
referenceProp = dataRelationshipContext;
|
|
55
|
-
contextPageReference = pageReference.concat('.').concat(referenceProp);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Need to get this written so typedefs work
|
|
59
|
-
const { datasource: { parameters: fieldParameters = {} } = {}, pageClass } = isMultiSelectMode
|
|
60
|
-
? pConn.getFieldMetadata(`@P .${referenceProp}`)
|
|
61
|
-
: pConn.getCurrentPageFieldMetadata(contextPageReference);
|
|
62
|
-
|
|
63
|
-
const compositeKeys: any[] = [];
|
|
64
|
-
Object.values(fieldParameters).forEach((param: any) => {
|
|
65
|
-
if (isSelfReferencedProperty(param, referenceProp)) {
|
|
66
|
-
compositeKeys.push(param.substring(param.lastIndexOf('.') + 1));
|
|
58
|
+
useLayoutEffect(() => {
|
|
59
|
+
if (isMultiSelectMode) {
|
|
60
|
+
// register selectionList in c11nEnv stateProps for client side validation
|
|
61
|
+
pConn.setStateProps({ selectionList });
|
|
62
|
+
pConn.getListActions().initDefaultPageInstructions(selectionList, compositeKeys);
|
|
67
63
|
}
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
// setting default row height for select table
|
|
71
|
-
const defaultRowHeight = '2';
|
|
64
|
+
}, []);
|
|
72
65
|
|
|
73
|
-
const additionalTableConfig = {
|
|
74
|
-
rowDensity:
|
|
75
|
-
enableFreezeColumns:
|
|
76
|
-
autoSizeColumns:
|
|
77
|
-
resetColumnWidths:
|
|
66
|
+
const additionalTableConfig: any = {
|
|
67
|
+
rowDensity: displayAs === 'table' || displayAs === 'advancedSearch',
|
|
68
|
+
enableFreezeColumns: displayAs === 'table' || displayAs === 'advancedSearch',
|
|
69
|
+
autoSizeColumns: displayAs === 'table' || displayAs === 'advancedSearch',
|
|
70
|
+
resetColumnWidths: displayAs === 'table' || displayAs === 'advancedSearch',
|
|
78
71
|
defaultFieldDef: {
|
|
79
|
-
|
|
80
|
-
noContextMenu: true,
|
|
81
|
-
grouping: false
|
|
72
|
+
aggregation: false
|
|
82
73
|
},
|
|
83
|
-
itemKey: '$key'
|
|
84
|
-
defaultRowHeight
|
|
74
|
+
itemKey: '$key'
|
|
85
75
|
};
|
|
86
76
|
|
|
77
|
+
const searchFields = (pConn as any).getRawConfigProps?.()?.searchFields ?? [];
|
|
78
|
+
let selectedValues: any = isMultiSelectMode ? readonlyContextList : contextPage;
|
|
79
|
+
|
|
80
|
+
if (displayAs === 'advancedSearch') {
|
|
81
|
+
selectedValues = null;
|
|
82
|
+
}
|
|
83
|
+
|
|
87
84
|
const listViewProps = {
|
|
88
85
|
...props,
|
|
89
86
|
title: propsToUse.label,
|
|
90
87
|
personalization: false,
|
|
91
88
|
grouping: false,
|
|
92
89
|
expandGroups: false,
|
|
93
|
-
reorderFields: false,
|
|
94
90
|
showHeaderIcons: false,
|
|
95
91
|
editing: false,
|
|
96
92
|
globalSearch: true,
|
|
97
|
-
toggleFieldVisibility:
|
|
93
|
+
toggleFieldVisibility: (displayAs === 'table' || displayAs === 'advancedSearch') && toggleFieldVisibility,
|
|
98
94
|
basicMode: true,
|
|
99
95
|
additionalTableConfig,
|
|
100
96
|
compositeKeys,
|
|
101
97
|
viewName,
|
|
102
|
-
parameters
|
|
98
|
+
parameters,
|
|
99
|
+
searchFields,
|
|
100
|
+
selectedValues,
|
|
101
|
+
isAdvancedSearchAndSelect: displayAs === 'advancedSearch'
|
|
103
102
|
};
|
|
104
103
|
|
|
105
104
|
const filters = (getPConnect().getRawMetadata() as any).config.promotedFilters ?? [];
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (isSearchable) {
|
|
106
|
+
if (showPromotedFilters && filters.length > 0) {
|
|
110
107
|
return (
|
|
111
108
|
<PromotedFilters
|
|
112
109
|
getPConnect={getPConnect}
|
|
@@ -115,8 +112,26 @@ export default function SimpleTableSelect(props: SimpleTableSelectProps) {
|
|
|
115
112
|
listViewProps={listViewProps}
|
|
116
113
|
pageClass={pageClass}
|
|
117
114
|
parameters={parameters}
|
|
115
|
+
referenceList={referenceList}
|
|
118
116
|
/>
|
|
119
117
|
);
|
|
120
118
|
}
|
|
121
119
|
return <ListView {...listViewProps} />;
|
|
122
120
|
}
|
|
121
|
+
|
|
122
|
+
export default function SimpleTableSelect(props: SimpleTableSelectProps) {
|
|
123
|
+
const SimpleTableManual = getComponentFromMap('SimpleTableManual');
|
|
124
|
+
|
|
125
|
+
const { getPConnect, renderMode = '' } = props;
|
|
126
|
+
|
|
127
|
+
const pConn = getPConnect();
|
|
128
|
+
const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
|
|
129
|
+
const { selectionMode } = pConn.getConfigProps() as any;
|
|
130
|
+
const isMultiSelectMode = selectionMode === MULTI;
|
|
131
|
+
|
|
132
|
+
if (isMultiSelectMode && renderMode === 'ReadOnly') {
|
|
133
|
+
return <SimpleTableManual {...props} />;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return <SelectableTable {...props} />;
|
|
137
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Grid2 from '@mui/material/Grid2';
|
|
2
|
+
import Typography from '@mui/material/Typography';
|
|
2
3
|
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
3
4
|
|
|
4
5
|
interface SingleReferenceReadOnlyProps extends PConnProps {
|
|
@@ -61,11 +62,15 @@ export default function SingleReferenceReadOnly(props: SingleReferenceReadOnlyPr
|
|
|
61
62
|
); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
62
63
|
|
|
63
64
|
return (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
<Grid2 container spacing={4} justifyContent='space-between'>
|
|
66
|
+
{!hideLabel && (
|
|
67
|
+
<Grid2 size={{ xs: 4 }}>
|
|
68
|
+
<Typography variant='body2' component='span' sx={{ fontWeight: 400, color: 'text.secondary' }}>
|
|
69
|
+
{label}
|
|
70
|
+
</Typography>
|
|
71
|
+
</Grid2>
|
|
72
|
+
)}
|
|
73
|
+
<Grid2 size={{ xs: hideLabel ? 12 : 8 }}>{component}</Grid2>
|
|
74
|
+
</Grid2>
|
|
70
75
|
);
|
|
71
76
|
}
|
package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx
CHANGED
|
@@ -66,15 +66,16 @@ export default function Attachment(props: AttachmentProps) {
|
|
|
66
66
|
const deleteIcon = Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl());
|
|
67
67
|
const srcImg = Utils.getImageSrc('document-doc', Utils.getSDKStaticConentUrl());
|
|
68
68
|
|
|
69
|
-
const [
|
|
70
|
-
const
|
|
69
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState(null);
|
|
70
|
+
const [menuOpenIndex, setMenuOpenIndex] = useState<number | null>(null);
|
|
71
71
|
|
|
72
72
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
73
73
|
const [toggleUploadBegin, setToggleUploadBegin] = useState(false);
|
|
74
74
|
|
|
75
75
|
const deleteFile = useCallback(
|
|
76
76
|
(file, fileIndex) => {
|
|
77
|
-
|
|
77
|
+
setMenuAnchorEl(null);
|
|
78
|
+
setMenuOpenIndex(null);
|
|
78
79
|
|
|
79
80
|
// reset the file input so that it will allow re-uploading the same file after deletion
|
|
80
81
|
if (fileInputRef.current) {
|
|
@@ -327,9 +328,14 @@ export default function Attachment(props: AttachmentProps) {
|
|
|
327
328
|
|
|
328
329
|
useEffect(() => {
|
|
329
330
|
if (toggleUploadBegin && files.length > 0) {
|
|
330
|
-
actionSequencer
|
|
331
|
-
|
|
332
|
-
|
|
331
|
+
actionSequencer
|
|
332
|
+
.registerBlockingAction(contextName)
|
|
333
|
+
.then(() => {
|
|
334
|
+
uploadFiles();
|
|
335
|
+
})
|
|
336
|
+
.catch(e => {
|
|
337
|
+
console.error(e);
|
|
338
|
+
});
|
|
333
339
|
}
|
|
334
340
|
}, [toggleUploadBegin]);
|
|
335
341
|
|
|
@@ -343,22 +349,26 @@ export default function Attachment(props: AttachmentProps) {
|
|
|
343
349
|
return attachments;
|
|
344
350
|
}, [attachments]);
|
|
345
351
|
|
|
346
|
-
// Prepares new structure as per Cosmos component
|
|
352
|
+
// Prepares new structure as per Cosmos component (immutable - does not mutate source)
|
|
347
353
|
const transformAttachments = () => {
|
|
348
|
-
const transformedFiles = [...attachments];
|
|
349
354
|
let deleteIndex = -1;
|
|
350
|
-
transformedFiles.
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
attachment.
|
|
355
|
+
const transformedFiles = attachments.map(attachment => {
|
|
356
|
+
const newProps = {
|
|
357
|
+
...attachment.props,
|
|
358
|
+
id: attachment.responseProps.ID,
|
|
359
|
+
format: attachment.props.name.split('.').pop()
|
|
360
|
+
};
|
|
361
|
+
const newResponseProps = { ...attachment.responseProps };
|
|
362
|
+
if (newProps.error) {
|
|
363
|
+
newResponseProps.deleteIndex = deleteIndex;
|
|
355
364
|
} else {
|
|
356
365
|
deleteIndex += 1;
|
|
357
|
-
|
|
366
|
+
newResponseProps.deleteIndex = deleteIndex;
|
|
358
367
|
}
|
|
359
|
-
if (
|
|
360
|
-
thumbnailURLs.current.push(
|
|
368
|
+
if (newProps.thumbnail) {
|
|
369
|
+
thumbnailURLs.current.push(newProps.thumbnail);
|
|
361
370
|
}
|
|
371
|
+
return { ...attachment, props: newProps, responseProps: newResponseProps };
|
|
362
372
|
});
|
|
363
373
|
|
|
364
374
|
return transformedFiles;
|
|
@@ -426,16 +436,27 @@ export default function Attachment(props: AttachmentProps) {
|
|
|
426
436
|
isArrayDeepMerge: false,
|
|
427
437
|
removePropertyFromChangedList: true
|
|
428
438
|
});
|
|
439
|
+
} else if (filesWithError.current.length === 0) {
|
|
440
|
+
// Sync local state from server when attachments genuinely changed (e.g., table remount after modal submit)
|
|
441
|
+
const hasActiveUpload = files.some(f => f.inProgress);
|
|
442
|
+
if (!hasActiveUpload) {
|
|
443
|
+
const serverFiles = transformAttachments();
|
|
444
|
+
attachmentCount.current = attachments.length;
|
|
445
|
+
filesWithError.current = [];
|
|
446
|
+
setFiles(serverFiles);
|
|
447
|
+
}
|
|
429
448
|
}
|
|
430
449
|
}
|
|
431
450
|
}, [memoizedAttachments]);
|
|
432
451
|
|
|
433
|
-
const handleClick = event => {
|
|
434
|
-
|
|
452
|
+
const handleClick = (event, index) => {
|
|
453
|
+
setMenuAnchorEl(event.currentTarget);
|
|
454
|
+
setMenuOpenIndex(index);
|
|
435
455
|
};
|
|
436
456
|
|
|
437
457
|
const handleClose = () => {
|
|
438
|
-
|
|
458
|
+
setMenuAnchorEl(null);
|
|
459
|
+
setMenuOpenIndex(null);
|
|
439
460
|
};
|
|
440
461
|
|
|
441
462
|
const content = (
|
|
@@ -489,29 +510,37 @@ export default function Attachment(props: AttachmentProps) {
|
|
|
489
510
|
{item.props.meta && <div style={{ color: item.props.error ? 'red' : undefined }}>{item.props.meta}</div>}
|
|
490
511
|
</div>
|
|
491
512
|
<div className='psdk-utility-action'>
|
|
492
|
-
{item.ID && (
|
|
513
|
+
{(item.ID || item.responseProps?.localAttachment) && (
|
|
493
514
|
<button type='button' className='psdk-utility-button' aria-label='Delete Attachment' onClick={() => deleteFile(item, index)}>
|
|
494
515
|
<img className='psdk-utility-card-action-svg-icon' src={deleteIcon} />
|
|
495
516
|
</button>
|
|
496
517
|
)}
|
|
497
|
-
{!item.ID && (
|
|
518
|
+
{!item.ID && !item.responseProps?.localAttachment && (
|
|
498
519
|
<div>
|
|
499
520
|
<IconButton
|
|
500
521
|
id='setting-button'
|
|
501
|
-
aria-controls={
|
|
502
|
-
aria-expanded={
|
|
522
|
+
aria-controls={menuOpenIndex === index ? 'file-menu' : undefined}
|
|
523
|
+
aria-expanded={menuOpenIndex === index ? 'true' : undefined}
|
|
503
524
|
aria-haspopup='true'
|
|
504
|
-
onClick={handleClick}
|
|
525
|
+
onClick={event => handleClick(event, index)}
|
|
505
526
|
size='large'
|
|
506
527
|
>
|
|
507
528
|
<MoreVertIcon />
|
|
508
529
|
</IconButton>
|
|
509
|
-
<Menu
|
|
530
|
+
<Menu
|
|
531
|
+
id='file-menu'
|
|
532
|
+
anchorEl={menuAnchorEl}
|
|
533
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
|
534
|
+
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
|
535
|
+
keepMounted
|
|
536
|
+
open={menuOpenIndex === index}
|
|
537
|
+
onClose={handleClose}
|
|
538
|
+
>
|
|
510
539
|
<MenuItem
|
|
511
540
|
style={{ fontSize: '14px' }}
|
|
512
541
|
key='download'
|
|
513
542
|
onClick={() => {
|
|
514
|
-
|
|
543
|
+
handleClose();
|
|
515
544
|
onFileDownload(item.responseProps ? item.responseProps : {});
|
|
516
545
|
}}
|
|
517
546
|
>
|
|
@@ -530,6 +559,70 @@ export default function Attachment(props: AttachmentProps) {
|
|
|
530
559
|
</div>
|
|
531
560
|
);
|
|
532
561
|
|
|
562
|
+
const displayOnlyFileDisplay = (
|
|
563
|
+
<div>
|
|
564
|
+
{files &&
|
|
565
|
+
files.length > 0 &&
|
|
566
|
+
files.map((item, index) => {
|
|
567
|
+
return (
|
|
568
|
+
<div key={index} className='psdk-utility-card'>
|
|
569
|
+
<div className='psdk-utility-card-icon'>
|
|
570
|
+
<img className='psdk-utility-card-svg-icon' src={srcImg} />
|
|
571
|
+
</div>
|
|
572
|
+
<div className='psdk-utility-card-main'>
|
|
573
|
+
<div className='psdk-utility-card-main-primary-label'>{item.props.name}</div>
|
|
574
|
+
{item.props.meta && <div style={{ color: item.props.error ? 'red' : undefined }}>{item.props.meta}</div>}
|
|
575
|
+
</div>
|
|
576
|
+
<div className='psdk-utility-action'>
|
|
577
|
+
<div>
|
|
578
|
+
<IconButton
|
|
579
|
+
id='setting-button'
|
|
580
|
+
aria-controls={menuOpenIndex === index ? 'file-menu' : undefined}
|
|
581
|
+
aria-expanded={menuOpenIndex === index ? 'true' : undefined}
|
|
582
|
+
aria-haspopup='true'
|
|
583
|
+
onClick={event => handleClick(event, index)}
|
|
584
|
+
size='large'
|
|
585
|
+
>
|
|
586
|
+
<MoreVertIcon />
|
|
587
|
+
</IconButton>
|
|
588
|
+
<Menu
|
|
589
|
+
id='file-menu'
|
|
590
|
+
anchorEl={menuAnchorEl}
|
|
591
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
|
592
|
+
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
|
593
|
+
keepMounted
|
|
594
|
+
open={menuOpenIndex === index}
|
|
595
|
+
onClose={handleClose}
|
|
596
|
+
>
|
|
597
|
+
<MenuItem
|
|
598
|
+
style={{ fontSize: '14px' }}
|
|
599
|
+
key='download'
|
|
600
|
+
onClick={() => {
|
|
601
|
+
handleClose();
|
|
602
|
+
onFileDownload(item.responseProps ? item.responseProps : {});
|
|
603
|
+
}}
|
|
604
|
+
>
|
|
605
|
+
Download
|
|
606
|
+
</MenuItem>
|
|
607
|
+
</Menu>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
</div>
|
|
611
|
+
);
|
|
612
|
+
})}
|
|
613
|
+
</div>
|
|
614
|
+
);
|
|
615
|
+
|
|
616
|
+
if (displayMode === 'DISPLAY_ONLY') {
|
|
617
|
+
return (
|
|
618
|
+
<div className='file-upload-container'>
|
|
619
|
+
<span className={`label ${required ? 'file-label' : ''}`}>{label}</span>
|
|
620
|
+
{validatemessage !== '' ? <span className='file-error'>{validatemessage}</span> : <span style={{ fontSize: '14px' }}>{helperText}</span>}
|
|
621
|
+
{files && files.length > 0 ? <section>{displayOnlyFileDisplay}</section> : <span>---</span>}
|
|
622
|
+
</div>
|
|
623
|
+
);
|
|
624
|
+
}
|
|
625
|
+
|
|
533
626
|
return (
|
|
534
627
|
<div className='file-upload-container'>
|
|
535
628
|
<span className={`label ${required ? 'file-label' : ''}`}>{label}</span>
|
package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/AttachmentUtils.ts
CHANGED
|
@@ -308,7 +308,7 @@ export const useFileDownload = (context: string) => {
|
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
export const useDeepMemo = (memoFn, key) => {
|
|
311
|
-
const ref: any = useRef();
|
|
311
|
+
const ref: any = useRef(null);
|
|
312
312
|
if (!ref.current || !equal(key, ref.current.key)) {
|
|
313
313
|
ref.current = { key, value: memoFn() };
|
|
314
314
|
}
|
package/tests/assets/sdk-r/components/createAll/override-sdk/widget/CaseHistory/CaseHistory.tsx
CHANGED
|
@@ -101,18 +101,22 @@ export default function CaseHistory(props: CaseHistoryProps) {
|
|
|
101
101
|
context
|
|
102
102
|
) as Promise<any>;
|
|
103
103
|
|
|
104
|
-
historyData
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
historyData
|
|
105
|
+
.then((historyJSON: any) => {
|
|
106
|
+
const tableDataResults = historyJSON.data.data;
|
|
107
|
+
|
|
108
|
+
// compute the rowData using the tableDataResults
|
|
109
|
+
computeRowData(tableDataResults);
|
|
110
|
+
|
|
111
|
+
// At this point, if we have data ready to render and haven't been asked
|
|
112
|
+
// to NOT call setWaitingForData, we can stop progress indicator
|
|
113
|
+
if (bCallSetWaitingForData) {
|
|
114
|
+
setWaitingForData(false);
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
.catch(e => {
|
|
118
|
+
console.error(e);
|
|
119
|
+
});
|
|
116
120
|
|
|
117
121
|
return () => {
|
|
118
122
|
// Inspired by https://juliangaramendy.dev/blog/use-promise-subscription
|
package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx
CHANGED
|
@@ -195,7 +195,9 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
195
195
|
window.open(content.data, '_blank');
|
|
196
196
|
}
|
|
197
197
|
})
|
|
198
|
-
.catch(
|
|
198
|
+
.catch(e => {
|
|
199
|
+
console.error(e);
|
|
200
|
+
});
|
|
199
201
|
}
|
|
200
202
|
|
|
201
203
|
function deleteAttachedFile(att: any) {
|
|
@@ -208,7 +210,9 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
208
210
|
.then(() => {
|
|
209
211
|
getAttachments();
|
|
210
212
|
})
|
|
211
|
-
.catch(
|
|
213
|
+
.catch(e => {
|
|
214
|
+
console.error(e);
|
|
215
|
+
});
|
|
212
216
|
}
|
|
213
217
|
|
|
214
218
|
const getAttachments = () => {
|
|
@@ -217,33 +221,37 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
217
221
|
if (caseID && caseID !== '') {
|
|
218
222
|
const attPromise = attachmentUtils.getCaseAttachments(caseID, thePConn.getContextName());
|
|
219
223
|
|
|
220
|
-
attPromise
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
224
|
+
attPromise
|
|
225
|
+
.then((resp: any) => {
|
|
226
|
+
const arFullListAttachments = addAttachments(resp);
|
|
227
|
+
const attachmentsCount = arFullListAttachments.length;
|
|
228
|
+
const arItems: any = arFullListAttachments.slice(0, 3).map(att => {
|
|
229
|
+
return getListUtilityItemProps({
|
|
230
|
+
att,
|
|
231
|
+
downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,
|
|
232
|
+
cancelFile: null,
|
|
233
|
+
deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,
|
|
234
|
+
removeFile: null
|
|
235
|
+
});
|
|
230
236
|
});
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
const viewAllarItems: any = arFullListAttachments.map(att => {
|
|
238
|
+
return getListUtilityItemProps({
|
|
239
|
+
att,
|
|
240
|
+
downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,
|
|
241
|
+
cancelFile: null,
|
|
242
|
+
deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,
|
|
243
|
+
removeFile: null
|
|
244
|
+
});
|
|
239
245
|
});
|
|
246
|
+
setProgress(false);
|
|
247
|
+
setList(current => {
|
|
248
|
+
return { ...current, count: attachmentsCount, data: arItems };
|
|
249
|
+
});
|
|
250
|
+
setFullAttachments(viewAllarItems);
|
|
251
|
+
})
|
|
252
|
+
.catch(e => {
|
|
253
|
+
console.error(e);
|
|
240
254
|
});
|
|
241
|
-
setProgress(false);
|
|
242
|
-
setList(current => {
|
|
243
|
-
return { ...current, count: attachmentsCount, data: arItems };
|
|
244
|
-
});
|
|
245
|
-
setFullAttachments(viewAllarItems);
|
|
246
|
-
});
|
|
247
255
|
}
|
|
248
256
|
};
|
|
249
257
|
|
|
@@ -373,10 +381,14 @@ export default function FileUtility(props: FileUtilityProps) {
|
|
|
373
381
|
});
|
|
374
382
|
getAttachments();
|
|
375
383
|
})
|
|
376
|
-
.catch(
|
|
384
|
+
.catch(e => {
|
|
385
|
+
console.error(e);
|
|
386
|
+
});
|
|
377
387
|
}
|
|
378
388
|
})
|
|
379
|
-
.catch(
|
|
389
|
+
.catch(e => {
|
|
390
|
+
console.error(e);
|
|
391
|
+
});
|
|
380
392
|
}
|
|
381
393
|
|
|
382
394
|
function onAddLinksClick() {
|
|
@@ -165,9 +165,13 @@ export default function ToDo(props: ToDoProps) {
|
|
|
165
165
|
|
|
166
166
|
useEffect(() => {
|
|
167
167
|
if (Object.keys(myWorkList).length && myWorkList.datapage) {
|
|
168
|
-
fetchMyWorkList(myWorkList.datapage, getPConnect().getComponentConfig()?.myWorkList.fields, 3, true, context)
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
fetchMyWorkList(myWorkList.datapage, getPConnect().getComponentConfig()?.myWorkList.fields, 3, true, context)
|
|
169
|
+
.then(responseData => {
|
|
170
|
+
deferLoadWorklistItems(responseData);
|
|
171
|
+
})
|
|
172
|
+
.catch(e => {
|
|
173
|
+
console.error(e);
|
|
174
|
+
});
|
|
171
175
|
}
|
|
172
176
|
}, []);
|
|
173
177
|
|
|
@@ -203,9 +207,13 @@ export default function ToDo(props: ToDoProps) {
|
|
|
203
207
|
function _showMore() {
|
|
204
208
|
setBShowMore(false);
|
|
205
209
|
if (type === CONSTS.WORKLIST && count && count > assignments.length && !assignmentsSource) {
|
|
206
|
-
fetchMyWorkList(myWorkList.datapage, getPConnect().getComponentConfig()?.myWorkList.fields, count, false, context)
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
fetchMyWorkList(myWorkList.datapage, getPConnect().getComponentConfig()?.myWorkList.fields, count, false, context)
|
|
211
|
+
.then(response => {
|
|
212
|
+
setAssignments(response.data);
|
|
213
|
+
})
|
|
214
|
+
.catch(e => {
|
|
215
|
+
console.error(e);
|
|
216
|
+
});
|
|
209
217
|
} else {
|
|
210
218
|
setAssignments(assignmentsSource);
|
|
211
219
|
}
|
package/SECURITY.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Reporting Security Issues
|
|
2
|
-
|
|
3
|
-
Pegasystems takes security seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
|
|
4
|
-
|
|
5
|
-
To report a security issue, [email us](mailto:opensource@pega.com;security@pega.com) and include the word "SECURITY" in the subject line.
|
|
6
|
-
|
|
7
|
-
The Pega team will send a response indicating the next steps in handling your report. We may ask for additional information or guidance.
|
|
8
|
-
|
|
9
|
-
## Learning More About Security
|
|
10
|
-
To learn more about securing a Pega application or our security capabilities, please see the [security article](https://community.pega.com/knowledgebase/capabilities/security) on Pega Community and the [Pega Trust Center](https://www.pega.com/products/cloud/pega-trust-center).
|