@pega/react-sdk-overrides 0.23.37 → 0.23.38
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.
|
@@ -4,6 +4,7 @@ import { Typography } from '@material-ui/core';
|
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
6
|
|
|
7
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
8
|
import { getUserId, isUserNameAvailable } from './UserReferenceUtils';
|
|
8
9
|
|
|
9
10
|
const DROPDOWN_LIST = 'Drop-down list';
|
|
@@ -12,6 +13,7 @@ const SEARCH_BOX = 'Search box';
|
|
|
12
13
|
interface UserReferenceProps extends PConnProps {
|
|
13
14
|
// If any, enter additional props that only exist on URLComponent here
|
|
14
15
|
displayAs?: string;
|
|
16
|
+
displayMode?: string;
|
|
15
17
|
label?: string;
|
|
16
18
|
value?: any;
|
|
17
19
|
testId?: string;
|
|
@@ -36,6 +38,7 @@ const UserReference = (props: UserReferenceProps) => {
|
|
|
36
38
|
const {
|
|
37
39
|
label = '',
|
|
38
40
|
displayAs = '',
|
|
41
|
+
displayMode = '',
|
|
39
42
|
getPConnect,
|
|
40
43
|
value = '',
|
|
41
44
|
testId = '',
|
|
@@ -96,6 +99,14 @@ const UserReference = (props: UserReferenceProps) => {
|
|
|
96
99
|
|
|
97
100
|
let userReferenceComponent: any = null;
|
|
98
101
|
|
|
102
|
+
if (displayMode === 'LABELS_LEFT') {
|
|
103
|
+
return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} />;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
107
|
+
return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} variant='stacked' />;
|
|
108
|
+
}
|
|
109
|
+
|
|
99
110
|
if (readOnly && showAsFormattedText) {
|
|
100
111
|
if (userId) {
|
|
101
112
|
userReferenceComponent = (
|
|
@@ -172,7 +183,6 @@ const UserReference = (props: UserReferenceProps) => {
|
|
|
172
183
|
);
|
|
173
184
|
}
|
|
174
185
|
}
|
|
175
|
-
|
|
176
186
|
return userReferenceComponent;
|
|
177
187
|
};
|
|
178
188
|
|
package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx
CHANGED
|
@@ -49,10 +49,13 @@ function ListViewActionButtons(props: ListViewActionButtonsProps) {
|
|
|
49
49
|
getPConnect()
|
|
50
50
|
.getActionsApi()
|
|
51
51
|
.submitEmbeddedDataModal(context)
|
|
52
|
-
.then(() => {
|
|
53
|
-
.finally(() => {
|
|
52
|
+
.then(() => {
|
|
54
53
|
setIsDisabled(false);
|
|
55
54
|
closeActionsDialog();
|
|
55
|
+
})
|
|
56
|
+
.catch(err => {
|
|
57
|
+
// eslint-disable-next-line no-console
|
|
58
|
+
console.log(err);
|
|
56
59
|
});
|
|
57
60
|
}}
|
|
58
61
|
>
|
|
@@ -20,13 +20,8 @@ export const getKeyForMappedField = field => {
|
|
|
20
20
|
|
|
21
21
|
const pConnect = field?.getPConnect?.();
|
|
22
22
|
|
|
23
|
-
if (pConnect?.meta
|
|
24
|
-
return
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Using label as a fallback if name is not defined.
|
|
28
|
-
if (pConnect?.meta?.type && pConnect?.meta?.config?.label) {
|
|
29
|
-
return `${pConnect.meta.type}_${pConnect.meta.config.label}`;
|
|
23
|
+
if (pConnect?.meta) {
|
|
24
|
+
return JSON.stringify(pConnect.meta);
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
return uuidv4();
|
package/package.json
CHANGED