@pega/react-sdk-overrides 0.23.9 → 0.23.11
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/designSystemExtensions/FieldGroupList/FieldGroupList.tsx +1 -1
- package/lib/{infra/Attachment/AttachmentUtils.js → helpers/attachmentHelpers.js} +0 -0
- package/lib/templates/FieldGroupTemplate/FieldGroupTemplate.tsx +13 -2
- package/lib/{infra → widgets}/Attachment/Attachment.css +0 -0
- package/lib/{infra → widgets}/Attachment/Attachment.tsx +1 -1
- package/lib/{infra → widgets}/Attachment/index.tsx +0 -0
- package/lib/widgets/FileUtility/FileUtility/FileUtility.tsx +1 -1
- package/package.json +1 -1
|
File without changes
|
|
@@ -17,6 +17,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
17
17
|
lookForChildInConfig,
|
|
18
18
|
heading,
|
|
19
19
|
displayMode,
|
|
20
|
+
fieldHeader,
|
|
20
21
|
allowTableEdit: allowAddEdit
|
|
21
22
|
} = props;
|
|
22
23
|
const pConn = getPConnect();
|
|
@@ -26,13 +27,20 @@ export default function FieldGroupTemplate(props) {
|
|
|
26
27
|
const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === 'LABELS_LEFT';
|
|
27
28
|
const HEADING = heading ?? 'Row';
|
|
28
29
|
|
|
30
|
+
const getDynamicHeaderProp = (item, index) => {
|
|
31
|
+
if (fieldHeader === 'propertyRef' && heading && item[heading.substring(1)]) {
|
|
32
|
+
return item[heading.substring(1)];
|
|
33
|
+
}
|
|
34
|
+
return `Row ${index + 1}`;
|
|
35
|
+
};
|
|
36
|
+
|
|
29
37
|
const addRecord = () => {
|
|
30
38
|
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
31
39
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
|
|
32
40
|
} else {
|
|
33
41
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length);
|
|
34
42
|
}
|
|
35
|
-
}
|
|
43
|
+
};
|
|
36
44
|
|
|
37
45
|
if (!isReadonlyMode) {
|
|
38
46
|
const addFieldGroupItem = () => {
|
|
@@ -52,7 +60,10 @@ export default function FieldGroupTemplate(props) {
|
|
|
52
60
|
const MemoisedChildren = useMemo(() => {
|
|
53
61
|
return referenceList.map((item, index) => ({
|
|
54
62
|
id: index,
|
|
55
|
-
name:
|
|
63
|
+
name:
|
|
64
|
+
fieldHeader === 'propertyRef'
|
|
65
|
+
? getDynamicHeaderProp(item, index)
|
|
66
|
+
: `${HEADING} ${index + 1}`,
|
|
56
67
|
children: buildView(pConn, index, lookForChildInConfig)
|
|
57
68
|
}));
|
|
58
69
|
}, [referenceList?.length]);
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Button } from '@material-ui/core';
|
|
4
4
|
import React, { useState, useEffect } from 'react';
|
|
5
|
-
import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from '
|
|
5
|
+
import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from '@pega/react-sdk-components/lib/components/helpers/attachmentHelpers';
|
|
6
6
|
import './Attachment.css';
|
|
7
7
|
import SummaryList from '@pega/react-sdk-components/lib/components/widgets/SummaryList'
|
|
8
8
|
import { CircularProgress } from "@material-ui/core";
|
|
File without changes
|
|
@@ -8,7 +8,7 @@ import './FileUtility.css';
|
|
|
8
8
|
import { IconButton, Menu, MenuItem } from '@material-ui/core';
|
|
9
9
|
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
|
10
10
|
import { Button } from '@material-ui/core';
|
|
11
|
-
import { validateMaxSize } from '@pega/react-sdk-components/lib/components/
|
|
11
|
+
import { validateMaxSize } from '@pega/react-sdk-components/lib/components/helpers/attachmentHelpers';
|
|
12
12
|
import { CircularProgress } from "@material-ui/core";
|
|
13
13
|
|
|
14
14
|
declare const PCore;
|
package/package.json
CHANGED