@pega/react-sdk-overrides 0.25.11 → 0.25.12
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.
|
@@ -33,6 +33,15 @@ export default function SelectableCard(props) {
|
|
|
33
33
|
const cardDataSource = readOnly || displayMode === 'DISPLAY_ONLY' ? readOnlyList || [] : dataSource?.source;
|
|
34
34
|
const imageDescriptionKey = showImageDescription ? imageDescription : undefined;
|
|
35
35
|
|
|
36
|
+
const handleCardClick = event => {
|
|
37
|
+
if (disabled || readOnly) return;
|
|
38
|
+
// If the click landed on or inside a label/input, native behavior already handles it.
|
|
39
|
+
if (event.target.closest?.('label, input')) return;
|
|
40
|
+
// Find the radio/checkbox input inside this card and click it programmatically.
|
|
41
|
+
const input = event.currentTarget.querySelector('input[type="radio"], input[type="checkbox"]');
|
|
42
|
+
if (input) input.click();
|
|
43
|
+
};
|
|
44
|
+
|
|
36
45
|
let radioItemSelected = false;
|
|
37
46
|
|
|
38
47
|
return (
|
|
@@ -75,7 +84,12 @@ export default function SelectableCard(props) {
|
|
|
75
84
|
|
|
76
85
|
const component = (
|
|
77
86
|
<div key={item[recordKey]} style={{ paddingTop: '15px' }}>
|
|
78
|
-
<Card
|
|
87
|
+
<Card
|
|
88
|
+
className={className}
|
|
89
|
+
style={{ display: 'flex', flexDirection: 'column', height: '100%', cursor: disabled || readOnly ? 'default' : 'pointer' }}
|
|
90
|
+
data-testid={testId}
|
|
91
|
+
onClick={handleCardClick}
|
|
92
|
+
>
|
|
79
93
|
<CardContent
|
|
80
94
|
style={{
|
|
81
95
|
...((imagePosition === 'inline-start' || imagePosition === 'inline-end') && { display: 'flex', height: '100%' }),
|
|
@@ -118,7 +132,7 @@ export default function SelectableCard(props) {
|
|
|
118
132
|
onBlur={onBlur}
|
|
119
133
|
onClick={onClick}
|
|
120
134
|
onKeyDown={onKeyDown}
|
|
121
|
-
disabled={disabled}
|
|
135
|
+
disabled={disabled || readOnly}
|
|
122
136
|
{...additionalProps}
|
|
123
137
|
/>
|
|
124
138
|
}
|
|
@@ -135,7 +149,7 @@ export default function SelectableCard(props) {
|
|
|
135
149
|
onBlur={onBlur}
|
|
136
150
|
onClick={onClick}
|
|
137
151
|
onKeyDown={onKeyDown}
|
|
138
|
-
disabled={disabled}
|
|
152
|
+
disabled={disabled || readOnly}
|
|
139
153
|
{...additionalProps}
|
|
140
154
|
/>
|
|
141
155
|
}
|
|
@@ -198,7 +198,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
198
198
|
}, [props]);
|
|
199
199
|
|
|
200
200
|
const caseId = thePConn.getCaseSummary().content.pyID;
|
|
201
|
-
const urgency = getPConnect().getCaseSummary().assignments ? getPConnect().getCaseSummary().assignments?.[0]
|
|
201
|
+
const urgency = getPConnect().getCaseSummary().assignments ? getPConnect().getCaseSummary().assignments?.[0]?.urgency : '';
|
|
202
202
|
const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName() || '');
|
|
203
203
|
|
|
204
204
|
const displayPageMessages = () => {
|
|
@@ -12,14 +12,9 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
12
12
|
// Get emitted components from map (so we can get any override that may exist)
|
|
13
13
|
const CaseSummaryFields = getComponentFromMap('CaseSummaryFields');
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const { children } = props;
|
|
16
16
|
let { arPrimaryFields = [], arSecondaryFields = [] } = props;
|
|
17
17
|
|
|
18
|
-
const thePConn = getPConnect && getPConnect();
|
|
19
|
-
const theConfigProps: any = thePConn?.getConfigProps();
|
|
20
|
-
|
|
21
|
-
const status = theConfigProps?.status;
|
|
22
|
-
const showStatus = theConfigProps?.showStatus;
|
|
23
18
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
24
19
|
const localeCategory = 'ModalContainer';
|
|
25
20
|
|
|
@@ -77,7 +72,7 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
77
72
|
|
|
78
73
|
return (
|
|
79
74
|
<div id='CaseSummary'>
|
|
80
|
-
<CaseSummaryFields
|
|
75
|
+
<CaseSummaryFields theFields={arPrimaryFields} />
|
|
81
76
|
<CaseSummaryFields theFields={arSecondaryFields} />
|
|
82
77
|
</div>
|
|
83
78
|
);
|
package/package.json
CHANGED