@pega/dx-component-builder-sdk 0.25.5 → 0.242.1
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 +2 -2
- package/src/tasks/authenticate/index.js +1 -1
- package/src/tasks/create/templates/Constellation/field/Boolean/demo.stories.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/field/Boolean/index.tsx.mustache +5 -4
- package/src/tasks/create/templates/Constellation/field/Boolean/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Date/index.tsx.mustache +3 -5
- package/src/tasks/create/templates/Constellation/field/Integer/demo.stories.tsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/field/Integer/event-utils.ts.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Integer/index.tsx.mustache +2 -12
- package/src/tasks/create/templates/Constellation/field/Integer/mock.ts.mustache +3 -2
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.html.mustache +2 -2
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.ts.mustache +8 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +3 -2
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +30 -50
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +29 -39
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +4 -3
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +4 -3
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +11 -11
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +3 -2
- package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/index.tsx.mustache +4 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +3 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +23 -21
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +6 -6
- package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +11 -10
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +25 -19
- package/src/tasks/create/templates/SDK-React/widget/PAGE/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +18 -10
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/operator/operator.component.ts +4 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.html +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.ts +9 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/percentage/percentage.component.ts +1 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/config-ext.json +11 -0
- package/tests/assets/sdk-a/components/create/override-sdk/infra/assignment/assignment.component.ts +7 -32
- package/tests/assets/sdk-a/components/create/override-sdk/infra/flow-container/flow-container.component.html +7 -2
- package/tests/assets/sdk-a/components/create/override-sdk/infra/flow-container/flow-container.component.ts +15 -8
- package/tests/assets/sdk-a/components/create/override-sdk/infra/modal-view-container/modal-view-container.component.ts +40 -7
- package/tests/assets/sdk-a/components/create/override-sdk/template/banner-page/config-ext.json +10 -0
- package/tests/assets/sdk-a/components/create/override-sdk/template/inline-dashboard-page/config-ext.json +10 -0
- package/tests/assets/sdk-a/components/create/override-sdk/widget/quick-create/config-ext.json +10 -0
- package/tests/assets/sdk-a/components/create/override-sdk/widget/todo/todo.component.html +2 -1
- package/tests/assets/sdk-a/components/create/override-sdk/widget/todo/todo.component.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date-time/pega-dxil-my-date-time.component.html +2 -2
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date-time/pega-dxil-my-date-time.component.ts +8 -0
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-percentage/pega-dxil-my-percentage.component.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/operator/operator.component.ts +4 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date-time/date-time.component.html +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date-time/date-time.component.ts +9 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/percentage/percentage.component.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/config-ext.json +11 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/infra/assignment/assignment.component.ts +7 -32
- package/tests/assets/sdk-a/components/createAll/override-sdk/infra/flow-container/flow-container.component.html +7 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/infra/flow-container/flow-container.component.ts +15 -8
- package/tests/assets/sdk-a/components/createAll/override-sdk/infra/modal-view-container/modal-view-container.component.ts +40 -7
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/banner-page/config-ext.json +10 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/inline-dashboard-page/config-ext.json +10 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/widget/quick-create/config-ext.json +10 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/widget/todo/todo.component.html +2 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/widget/todo/todo.component.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
|
-
import { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@material
|
|
2
|
+
import { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@mui/material';
|
|
3
3
|
|
|
4
4
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
6
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
|
|
8
9
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
9
10
|
|
|
10
11
|
// Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
|
-
import { TextField } from '@material
|
|
2
|
+
import { TextField } from '@mui/material';
|
|
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';
|
|
6
6
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
|
|
7
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
9
|
|
|
9
10
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { InputAdornment, TextField } from '@material
|
|
2
|
-
import MailOutlineIcon from '@
|
|
1
|
+
import { InputAdornment, TextField } from '@mui/material';
|
|
2
|
+
import MailOutlineIcon from '@mui/icons-material/MailOutline';
|
|
3
3
|
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
|
|
6
7
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
7
8
|
|
|
8
9
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
|
-
import { TextField } from '@material
|
|
2
|
+
import { TextField } from '@mui/material';
|
|
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';
|
|
6
6
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
|
|
7
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
9
|
|
|
9
10
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { TextField } from '@material
|
|
1
|
+
import { TextField } from '@mui/material';
|
|
2
2
|
|
|
3
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
4
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
|
+
|
|
5
6
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
6
7
|
|
|
7
8
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { TextField } from '@material
|
|
1
|
+
import { TextField } from '@mui/material';
|
|
2
2
|
|
|
3
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
4
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
|
+
|
|
5
6
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
6
7
|
|
|
7
8
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
|
1
|
+
import { TimePicker } from '@mui/x-date-pickers/TimePicker';
|
|
2
|
+
// import AccessTimeIcon from '@mui/icons-material/AccessTime';
|
|
4
3
|
import dayjs from 'dayjs';
|
|
5
4
|
|
|
6
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
6
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
|
|
8
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
9
9
|
|
|
10
10
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -58,31 +58,33 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
60
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
placeholder='hh:mm am'
|
|
66
|
-
keyboardIcon={<AccessTimeIcon />}
|
|
67
|
-
fullWidth
|
|
68
|
-
required={required}
|
|
61
|
+
<TimePicker
|
|
62
|
+
// keyboardIcon={<AccessTimeIcon />}
|
|
63
|
+
// fullWidth
|
|
64
|
+
|
|
69
65
|
disabled={disabled}
|
|
70
|
-
error={status === 'error'}
|
|
71
|
-
helperText={helperTextToDisplay}
|
|
72
66
|
minutesStep={5}
|
|
73
|
-
size='small'
|
|
74
67
|
label={label}
|
|
75
|
-
autoOk
|
|
76
|
-
mask='__:__ _m'
|
|
68
|
+
// autoOk
|
|
69
|
+
// mask='__:__ _m'
|
|
77
70
|
format='hh:mm a'
|
|
78
71
|
value={timeValue}
|
|
79
72
|
onChange={handleChange}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
{{! pick new delimiters for mustache }}
|
|
74
|
+
{{=<% %>=}}
|
|
75
|
+
slotProps={{
|
|
76
|
+
textField: {
|
|
77
|
+
variant: 'outlined',
|
|
78
|
+
placeholder: 'hh:mm am',
|
|
79
|
+
required,
|
|
80
|
+
error: status === 'error',
|
|
81
|
+
helperText: helperTextToDisplay,
|
|
82
|
+
size: 'small',
|
|
83
|
+
InputProps: { inputProps: { ...testProp } }
|
|
84
|
+
}
|
|
85
|
+
}}
|
|
86
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
84
87
|
/>
|
|
85
|
-
</MuiPickersUtilsProvider>
|
|
86
88
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
87
89
|
);
|
|
88
90
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import Grid from '@material
|
|
2
|
+
import Grid from '@mui/material/Grid';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import Grid from '@material
|
|
2
|
+
import Grid from '@mui/material/Grid';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { Grid
|
|
3
|
-
import
|
|
2
|
+
import { Grid } from '@mui/material';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
|
|
5
5
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
6
6
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
@@ -35,8 +35,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMP
|
|
|
35
35
|
// Calculate the size
|
|
36
36
|
// Default to assume the 2 columns are evenly split. However, override if templateCol
|
|
37
37
|
// (example value: "1fr 1fr")
|
|
38
|
-
let aSize
|
|
39
|
-
let bSize
|
|
38
|
+
let aSize = 6;
|
|
39
|
+
let bSize = 6;
|
|
40
40
|
|
|
41
41
|
const colAArray = templateCol
|
|
42
42
|
.replaceAll(/[a-z]+/g, '')
|
|
@@ -44,8 +44,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMP
|
|
|
44
44
|
.map(itm => Number(itm));
|
|
45
45
|
const totalCols = colAArray.reduce((v, itm) => itm + v, 0);
|
|
46
46
|
const ratio = 12 / totalCols;
|
|
47
|
-
aSize = (ratio * colAArray[0]) as
|
|
48
|
-
bSize = (ratio * colAArray[1]) as
|
|
47
|
+
aSize = (ratio * colAArray[0]) as number;
|
|
48
|
+
bSize = (ratio * colAArray[1]) as number;
|
|
49
49
|
|
|
50
50
|
return (
|
|
51
51
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import Grid from '@mui/material/Grid';
|
|
2
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
3
3
|
|
|
4
4
|
interface OneColumnProps {
|
|
5
5
|
// If any, enter additional props that only exist on this component
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { withStyles,
|
|
3
|
-
import Table from '@material
|
|
4
|
-
import TableBody from '@material
|
|
5
|
-
import TableCell from '@material
|
|
6
|
-
import TableContainer from '@material
|
|
7
|
-
import TableHead from '@material
|
|
8
|
-
import TableRow from '@material
|
|
2
|
+
import { withStyles, createStyles } from '@mui/styles';
|
|
3
|
+
import Table from '@mui/material/Table';
|
|
4
|
+
import TableBody from '@mui/material/TableBody';
|
|
5
|
+
import TableCell from '@mui/material/TableCell';
|
|
6
|
+
import TableContainer from '@mui/material/TableContainer';
|
|
7
|
+
import TableHead from '@mui/material/TableHead';
|
|
8
|
+
import TableRow from '@mui/material/TableRow';
|
|
9
9
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
10
10
|
|
|
11
11
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
12
12
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
13
|
+
|
|
13
14
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
14
15
|
|
|
15
16
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
16
17
|
// If any, enter additional props that only exist on this component
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
const StyledTableCell = withStyles((
|
|
20
|
+
const StyledTableCell = withStyles((myTheme) =>
|
|
20
21
|
createStyles({
|
|
21
22
|
head: {
|
|
22
23
|
borderWidth: '1px',
|
|
23
24
|
borderStyle: 'solid',
|
|
24
25
|
borderColor: 'silver',
|
|
25
|
-
backgroundColor:
|
|
26
|
-
color:
|
|
26
|
+
backgroundColor: myTheme.palette.text.disabled,
|
|
27
|
+
color: myTheme.palette.getContrastText(myTheme.palette.text.disabled)
|
|
27
28
|
},
|
|
28
29
|
body: {
|
|
29
30
|
borderWidth: '1px',
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Card,
|
|
3
|
-
CardContent,
|
|
4
|
-
CardHeader,
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CardContent,
|
|
4
|
+
CardHeader,
|
|
5
5
|
Typography,
|
|
6
|
-
CardActions,
|
|
6
|
+
CardActions,
|
|
7
7
|
Button,
|
|
8
8
|
TableContainer,
|
|
9
9
|
Table,
|
|
10
10
|
TableBody,
|
|
11
11
|
TableHead,
|
|
12
|
-
withStyles,
|
|
13
|
-
createStyles,
|
|
14
|
-
Theme,
|
|
15
12
|
TableCell,
|
|
16
|
-
TableRow
|
|
17
|
-
} from '@material
|
|
18
|
-
import {
|
|
13
|
+
TableRow
|
|
14
|
+
} from '@mui/material';
|
|
15
|
+
import { withStyles, createStyles } from '@mui/styles';
|
|
16
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
19
17
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
18
|
+
|
|
20
19
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
21
20
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
22
21
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
23
22
|
import { useRef, useEffect, useState } from 'react';
|
|
23
|
+
import { Theme as MuiTheme } from "@mui/material/styles";
|
|
24
|
+
|
|
25
|
+
declare module "@mui/private-theming" {
|
|
26
|
+
interface DefaultTheme extends MuiTheme {
|
|
27
|
+
spacing: (spacing: number) => string;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
24
30
|
|
|
25
31
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
26
32
|
// If any, enter additional props that only exist on this component
|
|
@@ -30,23 +36,23 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
|
30
36
|
whatsnewlink?: string;
|
|
31
37
|
}
|
|
32
38
|
|
|
33
|
-
const useStyles = makeStyles(
|
|
39
|
+
const useStyles = makeStyles(myTheme => ({
|
|
34
40
|
root: {
|
|
35
|
-
marginTop:
|
|
36
|
-
marginBottom:
|
|
41
|
+
marginTop: myTheme.spacing(1),
|
|
42
|
+
marginBottom: myTheme.spacing(1),
|
|
37
43
|
borderLeft: '6px solid',
|
|
38
|
-
borderLeftColor:
|
|
44
|
+
borderLeftColor: myTheme.palette.primary.light
|
|
39
45
|
}
|
|
40
46
|
}));
|
|
41
47
|
|
|
42
|
-
const StyledTableCell = withStyles((
|
|
48
|
+
const StyledTableCell = withStyles((myTheme) =>
|
|
43
49
|
createStyles({
|
|
44
50
|
head: {
|
|
45
51
|
borderWidth: '1px',
|
|
46
52
|
borderStyle: 'solid',
|
|
47
53
|
borderColor: 'silver',
|
|
48
|
-
backgroundColor:
|
|
49
|
-
color:
|
|
54
|
+
backgroundColor: myTheme.palette.text.disabled,
|
|
55
|
+
color: myTheme.palette.getContrastText(myTheme.palette.text.disabled)
|
|
50
56
|
},
|
|
51
57
|
body: {
|
|
52
58
|
borderWidth: '1px',
|
|
@@ -73,7 +79,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
73
79
|
const [waitingForData, setWaitingForData] = useState<boolean>(true);
|
|
74
80
|
const thePConn = getPConnect();
|
|
75
81
|
const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
|
|
76
|
-
const dataViewName = '
|
|
82
|
+
const dataViewName = 'D_pyMyWorkList';
|
|
77
83
|
const context = thePConn.getContextName();
|
|
78
84
|
|
|
79
85
|
const rowData: any = useRef([]);
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import TextField from '@material
|
|
3
|
-
import Popover from '@material
|
|
4
|
-
import Grid from '@material
|
|
5
|
-
import Typography from '@material
|
|
6
|
-
import
|
|
2
|
+
import TextField from '@mui/material/TextField';
|
|
3
|
+
import Popover from '@mui/material/Popover';
|
|
4
|
+
import Grid from '@mui/material/Grid';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
7
|
+
import { Theme as MuiTheme } from "@mui/material/styles";
|
|
7
8
|
|
|
8
9
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
9
10
|
|
|
10
11
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
12
|
+
|
|
11
13
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
12
14
|
|
|
15
|
+
declare module "@mui/private-theming" {
|
|
16
|
+
interface DefaultTheme extends MuiTheme {
|
|
17
|
+
spacing: (spacing: number) => string;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
14
22
|
// If any, enter additional props that only exist on this component
|
|
15
23
|
label: string;
|
|
@@ -22,14 +30,14 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
|
22
30
|
displayLabel?: any;
|
|
23
31
|
}
|
|
24
32
|
|
|
25
|
-
const useStyles = makeStyles(
|
|
33
|
+
const useStyles = makeStyles(myTheme => ({
|
|
26
34
|
root: {
|
|
27
|
-
padding:
|
|
28
|
-
margin:
|
|
35
|
+
padding: myTheme.spacing(1),
|
|
36
|
+
margin: myTheme.spacing(1)
|
|
29
37
|
},
|
|
30
38
|
popover: {
|
|
31
|
-
padding:
|
|
32
|
-
margin:
|
|
39
|
+
padding: myTheme.spacing(1),
|
|
40
|
+
margin: myTheme.spacing(1)
|
|
33
41
|
}
|
|
34
42
|
}));
|
|
35
43
|
|
|
@@ -45,8 +45,11 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
48
49
|
ngOnDestroy(): void {
|
|
49
|
-
|
|
50
|
+
// Ref: https://medium.com/@kamil.galek/mythical-angular-component-styles-cleanup-in-angular-17-f799a08b2abc
|
|
51
|
+
// Commenting the below line as it is causing the Operator component's styles not getting applied.
|
|
52
|
+
// this.renderer.destroy();
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
updateSelf(): void {
|
package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.html
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
[placeholder]="placeholder"
|
|
14
14
|
[formControl]="fieldControl"
|
|
15
15
|
(blur)="fieldOnBlur($event)"
|
|
16
|
-
(dateTimeChange)="
|
|
16
|
+
(dateTimeChange)="fieldOnDateChange($event)"
|
|
17
17
|
[value]="value$"
|
|
18
18
|
[required]="bRequired$"
|
|
19
19
|
/>
|
|
20
|
-
<mat-datepicker-toggle matSuffix [
|
|
20
|
+
<mat-datepicker-toggle matSuffix [owlDateTimeTrigger]="dtPicker"></mat-datepicker-toggle>
|
|
21
21
|
<owl-date-time #dtPicker></owl-date-time>
|
|
22
22
|
<mat-error *ngIf="fieldControl?.invalid">{{ getErrorMessage() }}</mat-error>
|
|
23
23
|
</mat-form-field>
|
package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.ts
CHANGED
|
@@ -168,6 +168,15 @@ export class DateTimeComponent implements OnInit, OnDestroy {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
fieldOnDateChange(event: any) {
|
|
172
|
+
// this comes from the date pop up
|
|
173
|
+
if (typeof event.value === 'object') {
|
|
174
|
+
// convert date to pega "date" format
|
|
175
|
+
event.value = event.value?.toISOString();
|
|
176
|
+
}
|
|
177
|
+
this.angularPConnectData.actions?.onChange(this, { value: event.value });
|
|
178
|
+
}
|
|
179
|
+
|
|
171
180
|
fieldOnBlur(event: any) {
|
|
172
181
|
if (typeof event.value === 'object') {
|
|
173
182
|
// convert date to pega "date" format
|
package/tests/assets/sdk-a/components/create/override-sdk/field/percentage/percentage.component.ts
CHANGED
|
@@ -177,7 +177,7 @@ export class PercentageComponent implements OnInit, OnDestroy {
|
|
|
177
177
|
const actionsApi = this.pConn$?.getActionsApi();
|
|
178
178
|
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
179
179
|
let value = event?.target?.value;
|
|
180
|
-
value = value
|
|
180
|
+
value = value ? value.replace(/%/g, '') : '';
|
|
181
181
|
if (this.currSep === ',') {
|
|
182
182
|
value = value.replace(/,/g, '');
|
|
183
183
|
} else {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"componentKey": "RichText",
|
|
3
|
+
"name": "RichText",
|
|
4
|
+
"label": "Rich text editor",
|
|
5
|
+
"description": "Text (paragraph)",
|
|
6
|
+
"type": "Field",
|
|
7
|
+
"subtype": "Text-Paragraph",
|
|
8
|
+
"icon": "images/pz-text-area-active.svg",
|
|
9
|
+
"properties": [],
|
|
10
|
+
"defaultConfig": {}
|
|
11
|
+
}
|
package/tests/assets/sdk-a/components/create/override-sdk/infra/assignment/assignment.component.ts
CHANGED
|
@@ -38,7 +38,6 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
38
38
|
newPConn$: any;
|
|
39
39
|
containerName$: string;
|
|
40
40
|
|
|
41
|
-
bIsRefComponent = false;
|
|
42
41
|
bInitialized = false;
|
|
43
42
|
|
|
44
43
|
templateName$: string;
|
|
@@ -129,45 +128,19 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
129
128
|
}
|
|
130
129
|
|
|
131
130
|
updateChanges() {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
this.ngZone.run(() => {
|
|
135
|
-
// pConn$ may be a 'reference' component, so normalize it
|
|
136
|
-
// this.pConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
137
|
-
this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
138
|
-
|
|
139
|
-
// If 'reference' so we need to get the children of the normalized pConn
|
|
140
|
-
if (this.bIsRefComponent) {
|
|
141
|
-
// this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
|
|
142
|
-
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.newPConn$.getChildren());
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
this.createButtons();
|
|
147
|
-
}
|
|
131
|
+
// pConn$ may be a 'reference' component, so normalize it
|
|
132
|
+
this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
148
133
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (thePConn && thePConn.getComponentName() == 'reference') {
|
|
152
|
-
bReturn = true;
|
|
134
|
+
if (this.arChildren$) {
|
|
135
|
+
this.createButtons();
|
|
153
136
|
}
|
|
154
|
-
|
|
155
|
-
return bReturn;
|
|
156
137
|
}
|
|
157
138
|
|
|
158
139
|
initComponent() {
|
|
159
|
-
this.bIsRefComponent = this.checkIfRefComponent(this.pConn$);
|
|
160
|
-
|
|
161
140
|
// pConn$ may be a 'reference' component, so normalize it
|
|
162
141
|
// this.pConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
163
142
|
this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
164
143
|
|
|
165
|
-
// If 'reference' so we need to get the children of the normalized pConn
|
|
166
|
-
if (this.bIsRefComponent) {
|
|
167
|
-
// this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
|
|
168
|
-
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.newPConn$.getChildren());
|
|
169
|
-
}
|
|
170
|
-
|
|
171
144
|
// prevent re-intializing with flowContainer update unless an action is taken
|
|
172
145
|
this.bReInit = false;
|
|
173
146
|
this.bHasNavigation$ = false;
|
|
@@ -210,7 +183,9 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
210
183
|
this.approveCase = actionsAPI.approveCase?.bind(actionsAPI);
|
|
211
184
|
this.rejectCase = actionsAPI.rejectCase?.bind(actionsAPI);
|
|
212
185
|
|
|
213
|
-
this.
|
|
186
|
+
if (this.arChildren$) {
|
|
187
|
+
this.createButtons();
|
|
188
|
+
}
|
|
214
189
|
}
|
|
215
190
|
|
|
216
191
|
createButtons() {
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<div *ngIf="todo_showTodo$">
|
|
10
10
|
<component-mapper
|
|
11
|
+
*ngIf="pConnectOfActiveContainerItem"
|
|
11
12
|
name="Todo"
|
|
12
13
|
[props]="{
|
|
13
|
-
pConn$:
|
|
14
|
+
pConn$: pConnectOfActiveContainerItem,
|
|
14
15
|
caseInfoID$: todo_caseInfoID$,
|
|
15
16
|
datasource$: todo_datasource$,
|
|
16
17
|
showTodoList$: todo_showTodoList$,
|
|
@@ -22,7 +23,11 @@
|
|
|
22
23
|
></component-mapper>
|
|
23
24
|
</div>
|
|
24
25
|
<div *ngIf="!todo_showTodo$">
|
|
25
|
-
<component-mapper
|
|
26
|
+
<component-mapper
|
|
27
|
+
*ngIf="pConnectOfActiveContainerItem"
|
|
28
|
+
name="Assignment"
|
|
29
|
+
[props]="{ pConn$: pConnectOfActiveContainerItem, formGroup$, arChildren$, itemKey$ }"
|
|
30
|
+
></component-mapper>
|
|
26
31
|
</div>
|
|
27
32
|
</div>
|
|
28
33
|
<div *ngIf="bHasCaseMessages$">
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Component, OnInit, Input, ChangeDetectorRef, NgZone, forwardRef, OnDestroy } from '@angular/core';
|
|
1
|
+
import { Component, OnInit, Input, ChangeDetectorRef, NgZone, forwardRef, OnDestroy, Injector } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
4
4
|
import { MatCardModule } from '@angular/material/card';
|
|
5
5
|
import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
|
|
6
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
7
6
|
import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
8
7
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
9
8
|
import { Utils } from '@pega/angular-sdk-components';
|
|
10
9
|
import { getToDoAssignments, showBanner } from './helpers';
|
|
11
10
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
11
|
+
import { FlowContainerBaseComponent } from '@pega/angular-sdk-components';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
|
|
@@ -32,11 +32,9 @@ interface FlowContainerProps {
|
|
|
32
32
|
standalone: true,
|
|
33
33
|
imports: [CommonModule, MatCardModule, forwardRef(() => ComponentMapperComponent)]
|
|
34
34
|
})
|
|
35
|
-
export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
35
|
+
export class FlowContainerComponent extends FlowContainerBaseComponent implements OnInit, OnDestroy {
|
|
36
36
|
@Input() pConn$: typeof PConnect;
|
|
37
37
|
|
|
38
|
-
// For interaction with AngularPConnect
|
|
39
|
-
angularPConnectData: AngularPConnectData = {};
|
|
40
38
|
pCoreConstants: typeof publicConstants;
|
|
41
39
|
configProps$: FlowContainerProps;
|
|
42
40
|
|
|
@@ -72,14 +70,17 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
72
70
|
banners: any[];
|
|
73
71
|
// itemKey: string = ""; // JA - this is what Nebula/Constellation uses to pass to finishAssignment, navigateToStep
|
|
74
72
|
|
|
73
|
+
pConnectOfActiveContainerItem;
|
|
74
|
+
|
|
75
75
|
constructor(
|
|
76
|
-
|
|
76
|
+
injector: Injector,
|
|
77
77
|
private cdRef: ChangeDetectorRef,
|
|
78
78
|
private psService: ProgressSpinnerService,
|
|
79
79
|
private fb: FormBuilder,
|
|
80
80
|
private ngZone: NgZone,
|
|
81
81
|
private utils: Utils
|
|
82
82
|
) {
|
|
83
|
+
super(injector);
|
|
83
84
|
// create the formGroup
|
|
84
85
|
this.formGroup$ = this.fb.group({ hideRequired: false });
|
|
85
86
|
}
|
|
@@ -148,10 +149,14 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
148
149
|
// Should always check the bridge to see if the component should update itself (re-render)
|
|
149
150
|
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
150
151
|
|
|
152
|
+
const pConn = this.pConnectOfActiveContainerItem || this.pConn$;
|
|
153
|
+
const caseViewModeFromProps = this.angularPConnect.getComponentProp(this, 'caseViewMode');
|
|
154
|
+
const caseViewModeFromRedux = pConn.getValue('context_data.caseViewMode', '');
|
|
155
|
+
|
|
151
156
|
// ONLY call updateSelf when the component should update
|
|
152
157
|
// AND removing the "gate" that was put there since shouldComponentUpdate
|
|
153
158
|
// should be the real "gate"
|
|
154
|
-
if (bUpdateSelf) {
|
|
159
|
+
if (bUpdateSelf || caseViewModeFromProps !== caseViewModeFromRedux) {
|
|
155
160
|
// don't want to redraw the flow container when there are page messages, because
|
|
156
161
|
// the redraw causes us to loose the errors on the elements
|
|
157
162
|
const completeProps = this.angularPConnect.getCurrentCompleteProps(this) as FlowContainerProps;
|
|
@@ -369,7 +374,9 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
369
374
|
// const { getPConnect } = this.arChildren$[0].getPConnect();
|
|
370
375
|
const localPConn = this.arChildren$[0].getPConnect();
|
|
371
376
|
|
|
372
|
-
|
|
377
|
+
this.pConnectOfActiveContainerItem = this.getPConnectOfActiveContainerItem(this.pConn$) || this.pConn$;
|
|
378
|
+
|
|
379
|
+
const caseViewMode = this.pConnectOfActiveContainerItem.getValue('context_data.caseViewMode');
|
|
373
380
|
this.bShowBanner = showBanner(this.pConn$);
|
|
374
381
|
|
|
375
382
|
if (caseViewMode && caseViewMode == 'review') {
|