@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
|
@@ -4,29 +4,12 @@ import {
|
|
|
4
4
|
CardHeader,
|
|
5
5
|
Typography,
|
|
6
6
|
CardActions,
|
|
7
|
-
Button
|
|
8
|
-
TableContainer,
|
|
9
|
-
Table,
|
|
10
|
-
TableBody,
|
|
11
|
-
TableHead,
|
|
12
|
-
TableCell,
|
|
13
|
-
TableRow
|
|
7
|
+
Button
|
|
14
8
|
} from '@mui/material';
|
|
15
|
-
import { withStyles, createStyles } from '@mui/styles';
|
|
16
9
|
import makeStyles from '@mui/styles/makeStyles';
|
|
17
10
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
18
11
|
|
|
19
12
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
20
|
-
import isDeepEqual from 'fast-deep-equal/react';
|
|
21
|
-
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
22
|
-
import { useRef, useEffect, useState } from 'react';
|
|
23
|
-
import { Theme as MuiTheme } from "@mui/material/styles";
|
|
24
|
-
|
|
25
|
-
declare module "@mui/private-theming" {
|
|
26
|
-
interface DefaultTheme extends MuiTheme {
|
|
27
|
-
spacing: (spacing: number) => string;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
13
|
|
|
31
14
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
32
15
|
// If any, enter additional props that only exist on this component
|
|
@@ -45,29 +28,11 @@ const useStyles = makeStyles(myTheme => ({
|
|
|
45
28
|
}
|
|
46
29
|
}));
|
|
47
30
|
|
|
48
|
-
const StyledTableCell = withStyles((myTheme) =>
|
|
49
|
-
createStyles({
|
|
50
|
-
head: {
|
|
51
|
-
borderWidth: '1px',
|
|
52
|
-
borderStyle: 'solid',
|
|
53
|
-
borderColor: 'silver',
|
|
54
|
-
backgroundColor: myTheme.palette.text.disabled,
|
|
55
|
-
color: myTheme.palette.getContrastText(myTheme.palette.text.disabled)
|
|
56
|
-
},
|
|
57
|
-
body: {
|
|
58
|
-
borderWidth: '1px',
|
|
59
|
-
borderStyle: 'solid',
|
|
60
|
-
borderColor: 'silver'
|
|
61
|
-
// fontSize: 14,
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
)(TableCell);
|
|
65
|
-
|
|
66
31
|
// Page Widget example is the "App Announcment"
|
|
67
32
|
|
|
68
33
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
69
34
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
70
|
-
const { header = '', description = '', datasource = [], whatsnewlink = ''
|
|
35
|
+
const { header = '', description = '', datasource = [], whatsnewlink = '' } = props;
|
|
71
36
|
let details = [];
|
|
72
37
|
if (datasource && datasource.source) {
|
|
73
38
|
details = datasource.source.map(item => {
|
|
@@ -75,136 +40,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
75
40
|
});
|
|
76
41
|
}
|
|
77
42
|
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
79
|
-
const [waitingForData, setWaitingForData] = useState<boolean>(true);
|
|
80
|
-
const thePConn = getPConnect();
|
|
81
|
-
const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
|
|
82
|
-
const dataViewName = 'D_pyMyWorkList';
|
|
83
|
-
const context = thePConn.getContextName();
|
|
84
|
-
|
|
85
|
-
const rowData: any = useRef([]);
|
|
86
|
-
|
|
87
43
|
const classes = useStyles();
|
|
88
44
|
|
|
89
|
-
const displayedColumns = [
|
|
90
|
-
{
|
|
91
|
-
label: thePConn.getLocalizedValue('Case type', '', ''),
|
|
92
|
-
type: 'TextInput',
|
|
93
|
-
fieldName: 'pxProcessName'
|
|
94
|
-
}, // 2nd and 3rd args empty string until typedef marked correctly
|
|
95
|
-
{
|
|
96
|
-
label: thePConn.getLocalizedValue('Key', '', ''),
|
|
97
|
-
type: 'TextInput',
|
|
98
|
-
fieldName: 'pxRefObjectInsName'
|
|
99
|
-
}, // 2nd and 3rd args empty string until typedef marked correctly
|
|
100
|
-
{
|
|
101
|
-
label: thePConn.getLocalizedValue('Status', '', ''),
|
|
102
|
-
type: 'TextInput',
|
|
103
|
-
fieldName: 'pyAssignmentStatus'
|
|
104
|
-
}, // 2nd and 3rd args empty string until typedef marked correctly
|
|
105
|
-
{
|
|
106
|
-
label: thePConn.getLocalizedValue('Stage', '', ''),
|
|
107
|
-
type: 'TextInput',
|
|
108
|
-
fieldName: 'pxTaskLabel'
|
|
109
|
-
} // 2nd and 3rd args empty string until typedef marked correctly
|
|
110
|
-
];
|
|
111
|
-
|
|
112
|
-
function computeRowData(rows: object[]): void {
|
|
113
|
-
const theRowData: object[] = [];
|
|
114
|
-
|
|
115
|
-
rows?.forEach((row: any, rowIndex: number) => {
|
|
116
|
-
// Now, for each property in the index of row properties (displayedColumns), add an object
|
|
117
|
-
// to a new array of values
|
|
118
|
-
const rowDisplayValues: any = [];
|
|
119
|
-
|
|
120
|
-
displayedColumns.forEach((column: any, rowValIndex) => {
|
|
121
|
-
const theType = column.type;
|
|
122
|
-
const theFieldName = column.fieldName;
|
|
123
|
-
const theValue =
|
|
124
|
-
theType === 'Date' || theType === 'DateTime' ? Utils.generateDateTime(row[theFieldName], 'DateTime-Short') : row[theFieldName];
|
|
125
|
-
rowDisplayValues[rowValIndex] = theValue;
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
theRowData[rowIndex] = rowDisplayValues;
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
if (!isDeepEqual(theRowData, rowData.current)) {
|
|
132
|
-
// Only update rowData.current when it actually changes (to prevent infinite loop)
|
|
133
|
-
rowData.current = theRowData;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
45
|
const handleClick = () => {
|
|
138
46
|
window.open(whatsnewlink);
|
|
139
47
|
};
|
|
140
48
|
|
|
141
|
-
// Get the case history data when component mounted/initialized
|
|
142
|
-
useEffect(() => {
|
|
143
|
-
let bCallSetWaitingForData = true;
|
|
144
|
-
|
|
145
|
-
const worklistData = PCore.getDataApiUtils().getData(
|
|
146
|
-
dataViewName,
|
|
147
|
-
{ dataViewParameters: [{ CaseInstanceKey: caseID }] } as any,
|
|
148
|
-
context
|
|
149
|
-
) as Promise<any>;
|
|
150
|
-
|
|
151
|
-
worklistData.then((worklistJSON: any) => {
|
|
152
|
-
const tableDataResults = worklistJSON.data.data;
|
|
153
|
-
|
|
154
|
-
// compute the rowData using the tableDataResults
|
|
155
|
-
computeRowData(tableDataResults);
|
|
156
|
-
|
|
157
|
-
// At this point, if we have data ready to render and haven't been asked
|
|
158
|
-
// to NOT call setWaitingForData, we can stop progress indicator
|
|
159
|
-
if (bCallSetWaitingForData) {
|
|
160
|
-
setWaitingForData(false);
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
return () => {
|
|
165
|
-
// Inspired by https://juliangaramendy.dev/blog/use-promise-subscription
|
|
166
|
-
// The useEffect closure lets us have access to the bCallSetWaitingForData
|
|
167
|
-
// variable inside the useEffect and inside the "then" clause of the
|
|
168
|
-
// historyData promise
|
|
169
|
-
// So, if this cleanup code gets run before the promise .then is called,
|
|
170
|
-
// we can avoid calling the useState setter which would otherwise show a warning
|
|
171
|
-
bCallSetWaitingForData = false;
|
|
172
|
-
};
|
|
173
|
-
}, []);
|
|
174
|
-
|
|
175
|
-
function getTableHeader() {
|
|
176
|
-
const theRowKey = 'CaseHistory.TableHeader';
|
|
177
|
-
|
|
178
|
-
const theHeaderCells: any[] = displayedColumns.map((headerCol, index) => {
|
|
179
|
-
const theCellKey = `${theRowKey}.${index}`;
|
|
180
|
-
return <StyledTableCell key={theCellKey}>{headerCol.label}</StyledTableCell>;
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
return <TableRow key={theRowKey}>{theHeaderCells}</TableRow>;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function getTableData() {
|
|
187
|
-
const theDataRows: any[] = [];
|
|
188
|
-
|
|
189
|
-
// Note: using rowData.current since we're using useRef as a mutatable
|
|
190
|
-
// value that's only updated when it changes.
|
|
191
|
-
if (rowData.current.length > 0) {
|
|
192
|
-
rowData.current.forEach((dataRow: object[], index) => {
|
|
193
|
-
// using dataRow[0]-dataRow[1] as the array key since it's a unique value
|
|
194
|
-
const theKey = `CaseHistory-${index}`;
|
|
195
|
-
theDataRows.push(
|
|
196
|
-
<TableRow key={theKey}>
|
|
197
|
-
<StyledTableCell>{dataRow[0] ? (dataRow[0]) : '---' as any}</StyledTableCell>
|
|
198
|
-
<StyledTableCell>{dataRow[1] ? (dataRow[1]) : '---' as any}</StyledTableCell>
|
|
199
|
-
<StyledTableCell>{dataRow[2] ? (dataRow[2]) : '---' as any}</StyledTableCell>
|
|
200
|
-
<StyledTableCell>{dataRow[3] ? (dataRow[3]) : '---' as any}</StyledTableCell>
|
|
201
|
-
</TableRow>
|
|
202
|
-
);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
return theDataRows;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
49
|
return (
|
|
209
50
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
210
51
|
<Card title='AppAnnouncement' className={classes.root}>
|
|
@@ -228,12 +69,6 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
228
69
|
</Button>
|
|
229
70
|
</CardActions>
|
|
230
71
|
</Card>
|
|
231
|
-
<TableContainer>
|
|
232
|
-
<Table>
|
|
233
|
-
<TableHead>{getTableHeader()}</TableHead>
|
|
234
|
-
<TableBody>{getTableData()}</TableBody>
|
|
235
|
-
</Table>
|
|
236
|
-
</TableContainer>
|
|
237
72
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
238
73
|
);
|
|
239
74
|
}
|
|
@@ -4,7 +4,6 @@ import Popover from '@mui/material/Popover';
|
|
|
4
4
|
import Grid2 from '@mui/material/Grid2';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import makeStyles from '@mui/styles/makeStyles';
|
|
7
|
-
import { Theme as MuiTheme } from "@mui/material/styles";
|
|
8
7
|
|
|
9
8
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
10
9
|
|
|
@@ -12,12 +11,6 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
|
12
11
|
|
|
13
12
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
13
|
|
|
15
|
-
declare module "@mui/private-theming" {
|
|
16
|
-
interface DefaultTheme extends MuiTheme {
|
|
17
|
-
spacing: (spacing: number) => string;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
14
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
22
15
|
// If any, enter additional props that only exist on this component
|
|
23
16
|
label: string;
|
|
@@ -28,6 +21,7 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
|
28
21
|
updateLabel: string;
|
|
29
22
|
updateOperator: { userName: string; userId: string };
|
|
30
23
|
displayLabel?: any;
|
|
24
|
+
displayMode?: string;
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
const useStyles = makeStyles(myTheme => ({
|
|
@@ -38,6 +32,13 @@ const useStyles = makeStyles(myTheme => ({
|
|
|
38
32
|
popover: {
|
|
39
33
|
padding: myTheme.spacing(1),
|
|
40
34
|
margin: myTheme.spacing(1)
|
|
35
|
+
},
|
|
36
|
+
fieldLabel: {
|
|
37
|
+
fontWeight: 400,
|
|
38
|
+
color: myTheme.palette.text.secondary
|
|
39
|
+
},
|
|
40
|
+
fieldValue: {
|
|
41
|
+
color: myTheme.palette.text.primary
|
|
41
42
|
}
|
|
42
43
|
}));
|
|
43
44
|
|
|
@@ -85,7 +86,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
85
86
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
86
87
|
const localeCategory = 'Operator';
|
|
87
88
|
|
|
88
|
-
operatorPreviewPromise
|
|
89
|
+
operatorPreviewPromise
|
|
90
|
+
.then((res: any) => {
|
|
89
91
|
const fillerString = '---';
|
|
90
92
|
let fields: any = [];
|
|
91
93
|
if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {
|
|
@@ -158,7 +160,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
158
160
|
}
|
|
159
161
|
// Whatever the fields are, update the component's popoverFields
|
|
160
162
|
setPopoverFields(fields);
|
|
161
|
-
|
|
163
|
+
})
|
|
164
|
+
.catch(e => {
|
|
165
|
+
console.error(e);
|
|
166
|
+
});
|
|
162
167
|
|
|
163
168
|
setPopoverAnchorEl(event.currentTarget);
|
|
164
169
|
}
|
|
@@ -184,7 +189,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
184
189
|
return (
|
|
185
190
|
<React.Fragment key={field.id}>
|
|
186
191
|
<Grid2 container size={{ xs: 12 }} spacing={1}>
|
|
187
|
-
<Grid2 size={{ xs:
|
|
192
|
+
<Grid2 size={{ xs: 6 }}>
|
|
188
193
|
<Typography variant='caption'>{field.name}</Typography>
|
|
189
194
|
</Grid2>
|
|
190
195
|
<Grid2 size={{ xs: 6 }}>
|
|
@@ -201,19 +206,69 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
201
206
|
|
|
202
207
|
// End of popover-related
|
|
203
208
|
|
|
209
|
+
const { displayMode } = props;
|
|
210
|
+
|
|
211
|
+
if (displayMode === 'DISPLAY_ONLY') {
|
|
212
|
+
return (
|
|
213
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
214
|
+
<>
|
|
215
|
+
{{! pick new delimiters for mustache }}
|
|
216
|
+
{{=<% %>=}}
|
|
217
|
+
<Grid2 container spacing={4} justifyContent='space-between'>
|
|
218
|
+
<Grid2 size={{ xs: 4 }}>
|
|
219
|
+
<Typography variant='body2' component='span' className={classes.fieldLabel}>
|
|
220
|
+
{caseOpLabel}
|
|
221
|
+
</Typography>
|
|
222
|
+
</Grid2>
|
|
223
|
+
<Grid2 size={{ xs: 8 }}>
|
|
224
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem', alignItems: 'baseline' }}>
|
|
225
|
+
<Typography variant='body2' component='span' className={classes.fieldValue} onClick={showOperatorDetails} sx={{ cursor: 'pointer' }}>
|
|
226
|
+
{caseOpName}
|
|
227
|
+
</Typography>
|
|
228
|
+
<Typography variant='caption' component='span' sx={{ color: 'text.secondary' }}>
|
|
229
|
+
{Utils.generateDateTime(caseTime, 'DateTime-Since')}
|
|
230
|
+
</Typography>
|
|
231
|
+
</div>
|
|
232
|
+
</Grid2>
|
|
233
|
+
</Grid2>
|
|
234
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
235
|
+
<Popover
|
|
236
|
+
id={popoverId}
|
|
237
|
+
open={popoverOpen}
|
|
238
|
+
anchorEl={popoverAnchorEl}
|
|
239
|
+
onClose={handlePopoverClose}
|
|
240
|
+
{{! pick new delimiters for mustache }}
|
|
241
|
+
{{=<% %>=}}
|
|
242
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
|
243
|
+
transformOrigin={{ vertical: 'top', horizontal: 'center' }}
|
|
244
|
+
slotProps={{
|
|
245
|
+
paper: { style: { maxWidth: '45ch' } }
|
|
246
|
+
}}
|
|
247
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
248
|
+
>
|
|
249
|
+
{getPopoverGrid()}
|
|
250
|
+
</Popover>
|
|
251
|
+
</>
|
|
252
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
204
256
|
return (
|
|
205
257
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
206
258
|
<>
|
|
207
259
|
{{! pick new delimiters for mustache }}
|
|
208
260
|
{{=<% %>=}}
|
|
209
261
|
<TextField
|
|
262
|
+
variant='standard'
|
|
210
263
|
defaultValue={caseOpName}
|
|
211
264
|
label={caseOpLabel}
|
|
212
265
|
onClick={showOperatorDetails}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
266
|
+
slotProps={{
|
|
267
|
+
input: {
|
|
268
|
+
readOnly: true,
|
|
269
|
+
disableUnderline: true,
|
|
270
|
+
inputProps: { style: { cursor: 'pointer' } }
|
|
271
|
+
}
|
|
217
272
|
}}
|
|
218
273
|
/>
|
|
219
274
|
<br />
|
|
@@ -228,7 +283,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
228
283
|
{{=<% %>=}}
|
|
229
284
|
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
|
230
285
|
transformOrigin={{ vertical: 'top', horizontal: 'center' }}
|
|
231
|
-
|
|
286
|
+
slotProps={{
|
|
287
|
+
paper: { style: { maxWidth: '45ch' } }
|
|
288
|
+
}}
|
|
232
289
|
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
233
290
|
>
|
|
234
291
|
{getPopoverGrid()}
|
package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx
CHANGED
|
@@ -4,12 +4,20 @@ import { TextField } from '@mui/material';
|
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
6
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
import useStatus from '@pega/react-sdk-components/lib/hooks/useStatus';
|
|
8
|
+
import { getFieldSx } from '@pega/react-sdk-components/lib/components/helpers/field-utils';
|
|
7
9
|
|
|
8
10
|
import StyledPegaDxilMyTestTextWrapper from './styles';
|
|
9
11
|
|
|
10
12
|
interface PegaDxilMyTestTextProps extends PConnFieldProps {
|
|
11
13
|
// If any, enter additional props that only exist on this componentName
|
|
12
14
|
fieldMetadata?: any;
|
|
15
|
+
showFieldMessage?: boolean;
|
|
16
|
+
messageConfig?: {
|
|
17
|
+
content?: string;
|
|
18
|
+
visibility?: boolean;
|
|
19
|
+
};
|
|
20
|
+
variant?: string;
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
// Duplicated runtime code from React SDK
|
|
@@ -26,7 +34,6 @@ export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
|
26
34
|
disabled,
|
|
27
35
|
value = '',
|
|
28
36
|
validatemessage,
|
|
29
|
-
status,
|
|
30
37
|
/* onChange, onBlur */
|
|
31
38
|
readOnly,
|
|
32
39
|
testId,
|
|
@@ -34,14 +41,23 @@ export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
|
34
41
|
helperText,
|
|
35
42
|
displayMode,
|
|
36
43
|
hideLabel,
|
|
37
|
-
placeholder
|
|
44
|
+
placeholder,
|
|
45
|
+
showFieldMessage,
|
|
46
|
+
messageConfig = {}
|
|
38
47
|
} = props;
|
|
39
48
|
|
|
40
49
|
const pConn = getPConnect();
|
|
41
50
|
const actions = pConn.getActionsApi();
|
|
42
51
|
const propName = (pConn.getStateProps() as any).value;
|
|
52
|
+
const eligibleForFieldWarning = showFieldMessage && messageConfig.visibility && !readOnly;
|
|
53
|
+
const helperTextToDisplay = validatemessage || (eligibleForFieldWarning ? messageConfig.content : helperText);
|
|
43
54
|
|
|
44
|
-
const
|
|
55
|
+
const status = useStatus({
|
|
56
|
+
showFieldMessage,
|
|
57
|
+
messageVisibility: messageConfig.visibility,
|
|
58
|
+
validatemessage,
|
|
59
|
+
readOnly
|
|
60
|
+
});
|
|
45
61
|
|
|
46
62
|
const [inputValue, setInputValue] = useState('');
|
|
47
63
|
const maxLength = fieldMetadata?.maxLength;
|
|
@@ -53,22 +69,14 @@ export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
|
53
69
|
}, [value]);
|
|
54
70
|
|
|
55
71
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
56
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
60
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
|
|
72
|
+
return <FieldValueList name={hideLabel ? '' : label} value={value} variant={props.variant} />;
|
|
61
73
|
}
|
|
62
74
|
|
|
63
75
|
if (readOnly) {
|
|
64
76
|
readOnlyProp = { readOnly: true };
|
|
65
77
|
}
|
|
66
78
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
testProp = {
|
|
70
|
-
'data-test-id': testId
|
|
71
|
-
};
|
|
79
|
+
const testProps: any = { 'data-test-id': testId };
|
|
72
80
|
|
|
73
81
|
function handleChange(event) {
|
|
74
82
|
// update internal value
|
|
@@ -94,7 +102,10 @@ export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
|
94
102
|
error={status === 'error'}
|
|
95
103
|
label={label}
|
|
96
104
|
value={inputValue}
|
|
97
|
-
|
|
105
|
+
slotProps={{
|
|
106
|
+
input: { ...readOnlyProp, inputProps: { maxLength, ...testProps } }
|
|
107
|
+
}}
|
|
108
|
+
sx={getFieldSx(status)}
|
|
98
109
|
/>
|
|
99
110
|
</StyledPegaDxilMyTestTextWrapper>
|
|
100
111
|
);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.alert-banner-title {
|
|
2
|
+
font-weight: 700;
|
|
3
|
+
font-size: 1rem;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 0.25rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.alert-banner-badge {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
min-width: 1rem;
|
|
14
|
+
height: 1rem;
|
|
15
|
+
padding: 0 0.2rem;
|
|
16
|
+
border-radius: 999px;
|
|
17
|
+
font-size: 0.6rem;
|
|
18
|
+
font-weight: 700;
|
|
19
|
+
line-height: 1;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.alert-banner-badge--urgent {
|
|
24
|
+
background: var(--app-error-dark-color);
|
|
25
|
+
color: #fff;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.alert-banner-badge--warning {
|
|
29
|
+
background: var(--app-warning-color-dark);
|
|
30
|
+
color: #fff;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.alert-banner-badge--success {
|
|
34
|
+
background: var(--stepper-completed-bg-color);
|
|
35
|
+
color: #fff;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.alert-banner-badge--info {
|
|
39
|
+
background: var(--link-button-color);
|
|
40
|
+
color: #fff;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.alert-banner-list {
|
|
44
|
+
margin: 0;
|
|
45
|
+
padding-left: 1.25rem;
|
|
46
|
+
}
|
|
@@ -1,39 +1,56 @@
|
|
|
1
|
-
import { Alert } from '@mui/material';
|
|
1
|
+
import { Alert, AlertTitle } from '@mui/material';
|
|
2
|
+
import './AlertBanner.css';
|
|
2
3
|
|
|
3
4
|
// AlertBanner is one of the few components that does NOT have getPConnect.
|
|
4
5
|
// So, no need to extend PConnProps
|
|
5
6
|
interface AlertBannerProps {
|
|
6
|
-
// If any, enter additional props that only exist on Date here
|
|
7
7
|
id: string;
|
|
8
8
|
variant: string;
|
|
9
9
|
messages: string[];
|
|
10
10
|
onDismiss?: any;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
urgent: 'error',
|
|
15
|
-
warning: 'warning',
|
|
16
|
-
success: 'success',
|
|
17
|
-
info: 'info'
|
|
13
|
+
const VARIANT_MAP: Record<string, { severity: string; label: string }> = {
|
|
14
|
+
urgent: { severity: 'error', label: 'Error' },
|
|
15
|
+
warning: { severity: 'warning', label: 'Warning' },
|
|
16
|
+
success: { severity: 'success', label: 'Success' },
|
|
17
|
+
info: { severity: 'info', label: 'Info' }
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
function renderMessage(message: string) {
|
|
21
|
+
const colonIndex = message.indexOf(':');
|
|
22
|
+
if (colonIndex === -1) return message;
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<strong>{message.slice(0, colonIndex + 1)}</strong>
|
|
26
|
+
{message.slice(colonIndex + 1)}
|
|
27
|
+
</>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
}
|
|
31
|
+
export default function AlertBanner({ id, variant, messages, onDismiss }: AlertBannerProps) {
|
|
32
|
+
const { severity, label } = VARIANT_MAP[variant] ?? VARIANT_MAP.info;
|
|
33
|
+
const isMultiple = messages.length > 1;
|
|
29
34
|
|
|
30
35
|
return (
|
|
31
36
|
<div id={id}>
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
<Alert variant='outlined' severity={severity as any} {...(onDismiss && { onClose: onDismiss })}>
|
|
38
|
+
{isMultiple && (
|
|
39
|
+
<AlertTitle className='alert-banner-title'>
|
|
40
|
+
{label}
|
|
41
|
+
<span className={`alert-banner-badge alert-banner-badge--${variant}`}>{messages.length}</span>
|
|
42
|
+
</AlertTitle>
|
|
43
|
+
)}
|
|
44
|
+
{isMultiple ? (
|
|
45
|
+
<ul className='alert-banner-list'>
|
|
46
|
+
{messages.map(message => (
|
|
47
|
+
<li key={message}>{renderMessage(message)}</li>
|
|
48
|
+
))}
|
|
49
|
+
</ul>
|
|
50
|
+
) : (
|
|
51
|
+
renderMessage(messages[0])
|
|
52
|
+
)}
|
|
53
|
+
</Alert>
|
|
37
54
|
</div>
|
|
38
55
|
);
|
|
39
56
|
}
|
|
@@ -14,3 +14,17 @@
|
|
|
14
14
|
padding: calc(2 * 0.5rem);
|
|
15
15
|
grid-row-gap: calc(2 * 0.5rem);
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
.psdk-case-summary-fields .label {
|
|
19
|
+
font-size: 0.8rem;
|
|
20
|
+
color: #c0c0c0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.psdk-case-summary-object-ref {
|
|
24
|
+
text-align: left;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.psdk-case-summary-object-ref-value * {
|
|
28
|
+
justify-content: flex-start;
|
|
29
|
+
text-align: left;
|
|
30
|
+
}
|