@pega/dx-component-builder-sdk 0.23.17 → 0.23.18
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/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +3 -2
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +3 -9
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +7 -15
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +38 -37
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +3 -3
- package/src/tasks/map/map.js +29 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +3 -1
- package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +7 -15
- package/tests/assets/sdk-r/components/create/override-sdk/field/DateTime/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +3 -9
- package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Dropdown/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Email/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +2 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/config-ext.json +7 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/Integer/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +38 -36
- package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/RadioButtons/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/SemanticLink/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextArea/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextContent/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/TextInput/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/Time/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/URL/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseSummary/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/Confirmation/config-ext.json +11 -11
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/config-ext.json +9 -9
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsSubTabs/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsThreeColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsTwoColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListPage/config-ext.json +7 -7
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +3 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideDetails/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideForm/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWidePage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumnPage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumnTab/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTable/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/SubTabs/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnPage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnTab/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowDetails/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowForm/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowPage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/widget/AppAnnouncement/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +5 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/CaseHistory/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Followers/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +52 -25
- package/tests/assets/sdk-r/components/create/override-sdk/widget/ToDo/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +3 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +7 -15
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +3 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +38 -37
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +3 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +7 -15
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/DateTime/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +3 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Dropdown/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Email/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +2 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/config-ext.json +7 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Integer/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +38 -36
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RadioButtons/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/SemanticLink/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextArea/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextContent/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextInput/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Time/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/URL/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseSummary/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/Confirmation/config-ext.json +11 -11
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/config-ext.json +9 -9
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsSubTabs/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsThreeColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsTwoColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListPage/config-ext.json +7 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +3 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideDetails/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideForm/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWidePage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumnPage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumnTab/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTable/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SubTabs/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumn/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumnPage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumnTab/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowDetails/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowForm/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowPage/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/AppAnnouncement/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +5 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/CaseHistory/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Followers/config-ext.json +8 -8
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +52 -25
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ToDo/config-ext.json +8 -8
package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTable/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"label": "SimpleTable",
|
|
3
|
+
"componentKey": "SimpleTable",
|
|
4
|
+
"name": "SimpleTable",
|
|
5
|
+
"description": "Datatype List Template",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "DATAVIEW",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
|
-
import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import React, { PropsWithChildren, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
3
|
import Table from '@material-ui/core/Table';
|
|
4
4
|
import TableBody from '@material-ui/core/TableBody';
|
|
5
5
|
import TableCell from '@material-ui/core/TableCell';
|
|
@@ -197,6 +197,20 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
197
197
|
// Constellation DX Components.
|
|
198
198
|
const fieldDefs = buildFieldsForTable(rawFields, resolvedFields, showDeleteButton);
|
|
199
199
|
|
|
200
|
+
useLayoutEffect(() => {
|
|
201
|
+
if (allowEditingInModal) {
|
|
202
|
+
getPConnect()
|
|
203
|
+
.getListActions()
|
|
204
|
+
.initDefaultPageInstructions(
|
|
205
|
+
getPConnect().getReferenceList(),
|
|
206
|
+
fieldDefs.filter(item => item.name).map(item => item.name)
|
|
207
|
+
);
|
|
208
|
+
} else {
|
|
209
|
+
// @ts-ignore - An argument for 'fields' was not provided
|
|
210
|
+
getPConnect().getListActions().initDefaultPageInstructions(getPConnect().getReferenceList());
|
|
211
|
+
}
|
|
212
|
+
}, []);
|
|
213
|
+
|
|
200
214
|
const displayedColumns = fieldDefs.map(field => {
|
|
201
215
|
return field.name ? field.name : field.cellRenderer;
|
|
202
216
|
});
|
|
@@ -290,6 +304,10 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
290
304
|
} else {
|
|
291
305
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length);
|
|
292
306
|
}
|
|
307
|
+
|
|
308
|
+
getPConnect().clearErrorMessages({
|
|
309
|
+
property: (getPConnect().getStateProps() as any)?.referenceList?.substring(1)
|
|
310
|
+
} as any);
|
|
293
311
|
};
|
|
294
312
|
|
|
295
313
|
const editRecord = () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "SubTabs",
|
|
3
|
+
"name": "SubTabs",
|
|
4
|
+
"label": "Sub tabs",
|
|
5
|
+
"description": "Sub tabs view",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "TAB",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumn/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "TwoColumn",
|
|
3
|
+
"name": "TwoColumn",
|
|
4
|
+
"label": "Two column",
|
|
5
|
+
"description": "TwoColumn Template",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "FORM",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnPage/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "TwoColumnPage",
|
|
3
|
+
"name": "TwoColumnPage",
|
|
4
|
+
"label": "Two column",
|
|
5
|
+
"description": "TwoColumn Page Template",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "PAGE",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnTab/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "TwoColumnTab",
|
|
3
|
+
"name": "TwoColumnTab",
|
|
4
|
+
"label": "Two column",
|
|
5
|
+
"description": "Two column",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "TAB",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowDetails/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "WideNarrowDetails",
|
|
3
|
+
"name": "WideNarrowDetails",
|
|
4
|
+
"label": "Details (Wide-narrow)",
|
|
5
|
+
"description": "Details (Wide-narrow) template",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "DETAILS",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowForm/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "WideNarrowForm",
|
|
3
|
+
"name": "WideNarrowForm",
|
|
4
|
+
"label": "Wide-narrow",
|
|
5
|
+
"description": "WideNarrow Template",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "FORM",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowPage/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "WideNarrowPage",
|
|
3
|
+
"name": "WideNarrowPage",
|
|
4
|
+
"label": "Wide-narrow",
|
|
5
|
+
"description": "Wide-narrow Page Template",
|
|
6
|
+
"type": "Template",
|
|
7
|
+
"subtype": "PAGE",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/AppAnnouncement/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "AppAnnouncement",
|
|
3
|
+
"name": "AppAnnouncement",
|
|
4
|
+
"label": "App announcement",
|
|
5
|
+
"description": "App announcement widget",
|
|
6
|
+
"type": "Widget",
|
|
7
|
+
"subtype": "PAGE",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
|
@@ -6,7 +6,11 @@ import { CircularProgress, IconButton, Menu, MenuItem, Button } from '@material-
|
|
|
6
6
|
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
|
7
7
|
import download from 'downloadjs';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
buildFilePropsFromResponse,
|
|
11
|
+
getIconFromFileType,
|
|
12
|
+
validateMaxSize
|
|
13
|
+
} from '@pega/react-sdk-components/lib/components/helpers/attachmentHelpers';
|
|
10
14
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
11
15
|
import { isInfinity23OrHigher } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
|
|
12
16
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/CaseHistory/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "CaseHistory",
|
|
3
|
+
"name": "CaseHistory",
|
|
4
|
+
"label": "Case history",
|
|
5
|
+
"description": "Case history widget",
|
|
6
|
+
"type": "Widget",
|
|
7
|
+
"subtype": "CASE",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/config-ext.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "FileUtility",
|
|
3
|
+
"name": "FileUtility",
|
|
4
|
+
"label": "Attachments",
|
|
5
|
+
"description": "Attachments",
|
|
6
|
+
"type": "Widget",
|
|
7
|
+
"subtype": "CASE",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "Followers",
|
|
3
|
+
"name": "Followers",
|
|
4
|
+
"label": "Followers",
|
|
5
|
+
"description": "Followers",
|
|
6
|
+
"type": "Widget",
|
|
7
|
+
"subtype": "CASE",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx
CHANGED
|
@@ -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
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
"componentKey": "Todo",
|
|
3
|
+
"name": "Todo",
|
|
4
|
+
"label": "Todo",
|
|
5
|
+
"description": "My worklist widget",
|
|
6
|
+
"type": "Widget",
|
|
7
|
+
"subtype": "PAGE",
|
|
8
|
+
"properties": []
|
|
9
|
+
}
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
|
-
import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText } from '@material-ui/core';
|
|
2
|
+
import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';
|
|
3
3
|
|
|
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';
|
|
@@ -24,6 +24,7 @@ export default function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
|
|
|
24
24
|
|
|
25
25
|
const {
|
|
26
26
|
getPConnect,
|
|
27
|
+
label,
|
|
27
28
|
value = false,
|
|
28
29
|
readOnly,
|
|
29
30
|
testId,
|
|
@@ -78,6 +79,7 @@ export default function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
|
|
|
78
79
|
return (
|
|
79
80
|
<StyledPegaDxilMyBooleanWrapper>
|
|
80
81
|
<FormControl required={required} error={status === 'error'}>
|
|
82
|
+
{!hideLabel && <FormLabel component='legend'>{label}</FormLabel>}
|
|
81
83
|
<FormGroup>
|
|
82
84
|
<FormControlLabel
|
|
83
85
|
control={theCheckbox}
|
|
@@ -94,4 +96,3 @@ export default function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
|
|
|
94
96
|
</StyledPegaDxilMyBooleanWrapper>
|
|
95
97
|
);
|
|
96
98
|
}
|
|
97
|
-
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
1
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
2
|
|
|
4
|
-
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
|
-
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
6
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
4
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
-
|
|
5
|
+
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
+
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
9
7
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
10
8
|
import StyledPegaDxilMyCurrencyWrapper from './styles';
|
|
11
9
|
|
|
@@ -52,17 +50,11 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
52
50
|
'data-test-id': testId
|
|
53
51
|
};
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
|
|
61
|
-
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
62
|
-
setCurrSym(theSymbols.theCurrencySymbol);
|
|
63
|
-
setCurrDec(theSymbols.theDecimalIndicator);
|
|
64
|
-
setCurrSep(theSymbols.theDigitGroupSeparator);
|
|
65
|
-
}, [currencyISOCode]);
|
|
53
|
+
// currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
|
|
54
|
+
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
55
|
+
const theCurrSym = theSymbols.theCurrencySymbol;
|
|
56
|
+
const theCurrDec = theSymbols.theDecimalIndicator;
|
|
57
|
+
const theCurrSep = theSymbols.theDigitGroupSeparator;
|
|
66
58
|
|
|
67
59
|
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
68
60
|
const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
1
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
2
|
|
|
4
3
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
@@ -49,14 +48,9 @@ export default function PegaDxilMyDecimal(props: PegaDxilMyDecimalProps) {
|
|
|
49
48
|
const propName = (pConn.getStateProps() as any).value;
|
|
50
49
|
const helperTextToDisplay = validatemessage || helperText;
|
|
51
50
|
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
57
|
-
setCurrDec(theSymbols.theDecimalIndicator);
|
|
58
|
-
setCurrSep(theSymbols.theDigitGroupSeparator);
|
|
59
|
-
}, [currencyISOCode]);
|
|
51
|
+
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
52
|
+
const theCurrDec = theSymbols.theDecimalIndicator;
|
|
53
|
+
const theCurrSep = theSymbols.theDigitGroupSeparator;
|
|
60
54
|
|
|
61
55
|
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
62
56
|
const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx
CHANGED
|
@@ -1,69 +1,57 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
1
|
+
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
2
|
|
|
4
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
4
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
|
+
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
6
|
+
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
7
|
+
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
6
8
|
import StyledPegaDxilMyPercentageWrapper from './styles';
|
|
7
9
|
|
|
8
|
-
// Inspired by https://stackoverflow.com/questions/50823182/material-ui-remove-up-down-arrow-dials-from-textview
|
|
9
|
-
const useStyles = makeStyles((/* theme */) => ({
|
|
10
|
-
input: {
|
|
11
|
-
'& input[type=number]': {
|
|
12
|
-
'-moz-appearance': 'textfield'
|
|
13
|
-
},
|
|
14
|
-
'& input[type=number]::-webkit-outer-spin-button': {
|
|
15
|
-
'-webkit-appearance': 'none',
|
|
16
|
-
margin: 0
|
|
17
|
-
},
|
|
18
|
-
'& input[type=number]::-webkit-inner-spin-button': {
|
|
19
|
-
'-webkit-appearance': 'none',
|
|
20
|
-
margin: 0
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}));
|
|
24
|
-
|
|
25
10
|
interface PegaDxilMyPercentageProps extends PConnFieldProps {
|
|
26
11
|
// If any, enter additional props that only exist on this componentName
|
|
12
|
+
currencyISOCode: string;
|
|
27
13
|
}
|
|
28
14
|
|
|
29
15
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
30
16
|
export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
31
17
|
// Get emitted components from map (so we can get any override that may exist)
|
|
32
|
-
const TextInput = getComponentFromMap('TextInput');
|
|
33
18
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
34
19
|
|
|
35
|
-
const classes = useStyles();
|
|
36
|
-
|
|
37
20
|
const {
|
|
21
|
+
getPConnect,
|
|
38
22
|
label,
|
|
39
23
|
required,
|
|
40
24
|
disabled,
|
|
41
25
|
value = '',
|
|
42
26
|
validatemessage,
|
|
43
27
|
status,
|
|
44
|
-
onChange,
|
|
45
|
-
onBlur,
|
|
28
|
+
// onChange,
|
|
29
|
+
// onBlur,
|
|
46
30
|
readOnly,
|
|
31
|
+
currencyISOCode = 'USD',
|
|
47
32
|
testId,
|
|
48
33
|
helperText,
|
|
49
34
|
displayMode,
|
|
50
35
|
hideLabel,
|
|
51
36
|
placeholder
|
|
52
37
|
} = props;
|
|
38
|
+
|
|
39
|
+
const pConn = getPConnect();
|
|
40
|
+
const actions = pConn.getActionsApi();
|
|
41
|
+
const propName = (pConn.getStateProps() as any).value;
|
|
53
42
|
const helperTextToDisplay = validatemessage || helperText;
|
|
54
43
|
|
|
44
|
+
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
45
|
+
const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
|
|
46
|
+
|
|
55
47
|
// console.log(`Percentage: label: ${label} value: ${value}`);
|
|
56
48
|
|
|
57
49
|
if (displayMode === 'LABELS_LEFT') {
|
|
58
|
-
return <FieldValueList name={hideLabel ? '' : label} value={
|
|
50
|
+
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;
|
|
59
51
|
}
|
|
60
52
|
|
|
61
53
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
62
|
-
return <FieldValueList name={hideLabel ? '' : label} value={
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (readOnly) {
|
|
66
|
-
return <TextInput {...props} />;
|
|
54
|
+
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;
|
|
67
55
|
}
|
|
68
56
|
|
|
69
57
|
let testProp = {};
|
|
@@ -72,10 +60,17 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
72
60
|
'data-test-id': testId
|
|
73
61
|
};
|
|
74
62
|
|
|
63
|
+
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
64
|
+
const theCurrDec = theSymbols.theDecimalIndicator;
|
|
65
|
+
const theCurrSep = theSymbols.theDigitGroupSeparator;
|
|
66
|
+
|
|
67
|
+
function PercentageOnBlur(event, inValue) {
|
|
68
|
+
handleEvent(actions, 'changeNblur', propName, inValue !== '' ? Number(inValue) : inValue);
|
|
69
|
+
}
|
|
70
|
+
|
|
75
71
|
return (
|
|
76
72
|
<StyledPegaDxilMyPercentageWrapper>
|
|
77
|
-
<
|
|
78
|
-
className={classes.input}
|
|
73
|
+
<CurrencyTextField
|
|
79
74
|
fullWidth
|
|
80
75
|
variant={readOnly ? 'standard' : 'outlined'}
|
|
81
76
|
helperText={helperTextToDisplay}
|
|
@@ -83,15 +78,21 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
83
78
|
size='small'
|
|
84
79
|
required={required}
|
|
85
80
|
disabled={disabled}
|
|
86
|
-
|
|
87
|
-
onBlur={!readOnly ? onBlur : undefined}
|
|
81
|
+
readOnly={!!readOnly}
|
|
88
82
|
error={status === 'error'}
|
|
89
83
|
label={label}
|
|
90
84
|
value={value}
|
|
91
|
-
type='
|
|
92
|
-
|
|
85
|
+
type='text'
|
|
86
|
+
outputFormat='number'
|
|
87
|
+
textAlign='left'
|
|
88
|
+
InputProps={{
|
|
89
|
+
inputProps: { ...testProp }
|
|
90
|
+
}}
|
|
91
|
+
currencySymbol=''
|
|
92
|
+
decimalCharacter={theCurrDec}
|
|
93
|
+
digitGroupSeparator={theCurrSep}
|
|
94
|
+
onBlur={!readOnly ? PercentageOnBlur : undefined}
|
|
93
95
|
/>
|
|
94
96
|
</StyledPegaDxilMyPercentageWrapper>
|
|
95
97
|
);
|
|
96
98
|
}
|
|
97
|
-
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx
CHANGED
|
@@ -151,9 +151,9 @@ export default function PegaDxilMyCaseWidget(props: PegaDxilMyCaseWidgetProps) {
|
|
|
151
151
|
const theKey = `CaseHistory-${index}`;
|
|
152
152
|
theDataRows.push(
|
|
153
153
|
<TableRow key={theKey}>
|
|
154
|
-
<StyledTableCell>{dataRow[0] ? dataRow[0] : '---'}</StyledTableCell>
|
|
155
|
-
<StyledTableCell>{dataRow[1] ? dataRow[1] : '---'}</StyledTableCell>
|
|
156
|
-
<StyledTableCell>{dataRow[2] ? dataRow[2] : '---'}</StyledTableCell>
|
|
154
|
+
<StyledTableCell>{dataRow[0] ? dataRow[0] as any : '---'}</StyledTableCell>
|
|
155
|
+
<StyledTableCell>{dataRow[1] ? dataRow[1] as any : '---'}</StyledTableCell>
|
|
156
|
+
<StyledTableCell>{dataRow[2] ? dataRow[2] as any : '---'}</StyledTableCell>
|
|
157
157
|
</TableRow>
|
|
158
158
|
);
|
|
159
159
|
});
|