@pega/react-sdk-overrides 0.23.30 → 0.23.32
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/lib/template/ListView/utils.ts +3 -1
- package/lib/widget/QuickCreate/QuickCreate.tsx +52 -25
- package/package.json +1 -1
- /package/lib/{infra/Containers/ModalViewContainer → field}/CancelAlert/CancelAlert.css +0 -0
- /package/lib/{infra/Containers/ModalViewContainer → field}/CancelAlert/CancelAlert.tsx +0 -0
- /package/lib/{infra/Containers/ModalViewContainer → field}/CancelAlert/index.tsx +0 -0
|
@@ -680,7 +680,9 @@ export const readContextResponse = async (context, params) => {
|
|
|
680
680
|
if (compositeKeys.length) {
|
|
681
681
|
otherContext.setCompositeKeys(compositeKeys);
|
|
682
682
|
}
|
|
683
|
-
otherContext
|
|
683
|
+
if (otherContext) {
|
|
684
|
+
otherContext.fetchRowActionDetails = null;
|
|
685
|
+
}
|
|
684
686
|
}
|
|
685
687
|
|
|
686
688
|
const presetArray = [];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
1
2
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
2
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
3
4
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
@@ -25,38 +26,64 @@ export default function QuickCreate(props: QuickCreateProps) {
|
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
let icon = Utils.getImageSrc('polaris-solid', Utils.getSDKStaticConentUrl());
|
|
38
|
-
let label = '';
|
|
29
|
+
const [quickCreatecases, setCases] = useState([]);
|
|
30
|
+
|
|
31
|
+
/* If the classFilter is empty and has no entries - we will default to the default set of case types
|
|
32
|
+
It will usually come from the envInfo but for Launchpad, this is not populated - instead get the list of cases from the store */
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const cases: any = [];
|
|
35
|
+
const defaultCases: any = [];
|
|
36
|
+
const envInfo = PCore.getEnvironmentInfo();
|
|
37
|
+
if (envInfo?.environmentInfoObject?.pyCaseTypeList) {
|
|
39
38
|
envInfo.environmentInfoObject.pyCaseTypeList.forEach(casetype => {
|
|
40
|
-
if (casetype.
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
if (casetype.pyWorkTypeName && casetype.pyWorkTypeImplementationClassName) {
|
|
40
|
+
defaultCases.push({
|
|
41
|
+
classname: casetype.pyWorkTypeImplementationClassName,
|
|
42
|
+
onClick: () => {
|
|
43
|
+
createCase(casetype.pyWorkTypeImplementationClassName);
|
|
44
|
+
},
|
|
45
|
+
...(showCaseIcons && { icon: Utils.getImageSrc(casetype?.pxIcon, Utils.getSDKStaticConentUrl()) }),
|
|
46
|
+
label: casetype.pyWorkTypeName
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
const pConnectInAppContext = PCore.createPConnect({
|
|
52
|
+
options: { context: PCore.getConstants().APP.APP }
|
|
53
|
+
}).getPConnect();
|
|
54
|
+
const pyPortalInAppContext = pConnectInAppContext.getValue('pyPortal') as any;
|
|
55
|
+
pyPortalInAppContext?.pyCaseTypesAvailableToCreate?.forEach(casetype => {
|
|
56
|
+
if (casetype.pyClassName && casetype.pyLabel) {
|
|
57
|
+
defaultCases.push({
|
|
58
|
+
classname: casetype.pyClassName,
|
|
59
|
+
onClick: () => {
|
|
60
|
+
createCase(casetype.pyClassName);
|
|
61
|
+
},
|
|
62
|
+
...(showCaseIcons && { icon: Utils.getImageSrc(casetype?.pxIcon, Utils.getSDKStaticConentUrl()) }),
|
|
63
|
+
label: casetype.pyLabel
|
|
64
|
+
});
|
|
43
65
|
}
|
|
44
66
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* If classFilter is not empty - filter from the list of defaultCases */
|
|
70
|
+
if (classFilter?.length > 0) {
|
|
71
|
+
classFilter.forEach(item => {
|
|
72
|
+
defaultCases.forEach(casetype => {
|
|
73
|
+
if (casetype.classname === item) {
|
|
74
|
+
cases.push(casetype);
|
|
75
|
+
}
|
|
52
76
|
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
77
|
+
});
|
|
78
|
+
setCases(cases);
|
|
79
|
+
} else {
|
|
80
|
+
setCases(defaultCases);
|
|
81
|
+
}
|
|
82
|
+
}, []);
|
|
56
83
|
|
|
57
84
|
return (
|
|
58
85
|
<div>
|
|
59
|
-
<WssQuickCreate heading={heading} actions={
|
|
86
|
+
<WssQuickCreate heading={heading} actions={quickCreatecases} />
|
|
60
87
|
</div>
|
|
61
88
|
);
|
|
62
89
|
}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|