@pega/custom-dx-components 0.23.15 → 0.23.16
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/Constellation/Template/FORM/index.jsx.mustache +18 -12
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +12 -9
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -1
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.jsx +15 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.jsx +12 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.jsx +15 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.jsx +12 -9
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Grid } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Grid, FieldGroup } from '@pega/cosmos-react-core';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -11,27 +11,33 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
|
11
11
|
export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const { children, NumCols } = props;
|
|
14
|
+
const { children, NumCols, label, showLabel, getPConnect } = props;
|
|
15
|
+
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
15
16
|
|
|
16
17
|
const nCols = parseInt(NumCols, 10);
|
|
17
18
|
|
|
18
19
|
// console.log(`Rendering ${getPConnect()?.getComponentName()} with ${template} with ${children?.length} Region(s)`);
|
|
19
20
|
|
|
21
|
+
|
|
22
|
+
|
|
20
23
|
return (
|
|
21
24
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
{{! pick new delimiteres for mustache }}
|
|
26
|
+
{{=<% %>=}}
|
|
27
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
28
|
+
<Grid container={{
|
|
29
|
+
cols: `repeat(${nCols}, minmax(0, 1fr))`,
|
|
30
|
+
gap: 2,
|
|
31
|
+
wrap: `wrap`
|
|
32
|
+
}}>
|
|
33
|
+
{children}
|
|
34
|
+
</Grid>
|
|
35
|
+
</FieldGroup>
|
|
36
|
+
<%={{ }}=%> {{! revert delimiteres for mustache }}
|
|
32
37
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
33
38
|
);
|
|
34
39
|
|
|
40
|
+
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Grid, Flex } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Grid, Flex, FieldGroup } from '@pega/cosmos-react-core';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -11,7 +11,8 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
|
11
11
|
export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const { children } = props;
|
|
14
|
+
const { children, label, showLabel, getPConnect } = props;
|
|
15
|
+
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
15
16
|
|
|
16
17
|
const numRegions = children?.length;
|
|
17
18
|
const gridRepeat = "repeat(".concat(numRegions).concat(", 1fr)");
|
|
@@ -26,13 +27,15 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
26
27
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
27
28
|
{{! pick new delimiteres for mustache }}
|
|
28
29
|
{{=<% %>=}}
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
31
|
+
<Grid container={gridContainer}>
|
|
32
|
+
{children.map((child, i) => (
|
|
33
|
+
<Flex container={flexContainer} key={`r-${i + 1}`}>
|
|
34
|
+
{child}
|
|
35
|
+
</Flex>
|
|
36
|
+
))}
|
|
37
|
+
</Grid>
|
|
38
|
+
</FieldGroup>
|
|
36
39
|
<%={{ }}=%> {{! revert delimiteres for mustache }}
|
|
37
40
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
38
41
|
);
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@pega/configs": "^0.5.3",
|
|
69
|
-
"@pega/custom-dx-components": "^0.23.
|
|
69
|
+
"@pega/custom-dx-components": "^0.23.16",
|
|
70
70
|
"@pega/eslint-config": "^0.3.2",
|
|
71
71
|
"@storybook/addon-actions": "^6.5.12",
|
|
72
72
|
"@storybook/addon-essentials": "^6.5.12",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Grid } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Grid, FieldGroup } from '@pega/cosmos-react-core';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import StyledPegaDxilMyFormWrapper from './styles';
|
|
@@ -11,24 +11,30 @@ import StyledPegaDxilMyFormWrapper from './styles';
|
|
|
11
11
|
export default function PegaDxilMyForm(props) {
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const { children, NumCols } = props;
|
|
14
|
+
const { children, NumCols, label, showLabel, getPConnect } = props;
|
|
15
|
+
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
15
16
|
|
|
16
17
|
const nCols = parseInt(NumCols, 10);
|
|
17
18
|
|
|
18
19
|
// console.log(`Rendering ${getPConnect()?.getComponentName()} with ${template} with ${children?.length} Region(s)`);
|
|
19
20
|
|
|
21
|
+
|
|
22
|
+
|
|
20
23
|
return (
|
|
21
24
|
<StyledPegaDxilMyFormWrapper>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
26
|
+
<Grid container={{
|
|
27
|
+
cols: `repeat(${nCols}, minmax(0, 1fr))`,
|
|
28
|
+
gap: 2,
|
|
29
|
+
wrap: `wrap`
|
|
30
|
+
}}>
|
|
31
|
+
{children}
|
|
32
|
+
</Grid>
|
|
33
|
+
</FieldGroup>
|
|
29
34
|
</StyledPegaDxilMyFormWrapper>
|
|
30
35
|
);
|
|
31
36
|
|
|
37
|
+
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
PegaDxilMyForm.defaultProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Grid, Flex } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Grid, Flex, FieldGroup } from '@pega/cosmos-react-core';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import StyledPegaDxilMyTwoColumnFormWrapper from './styles';
|
|
@@ -11,7 +11,8 @@ import StyledPegaDxilMyTwoColumnFormWrapper from './styles';
|
|
|
11
11
|
export default function PegaDxilMyTwoColumnForm(props) {
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const { children } = props;
|
|
14
|
+
const { children, label, showLabel, getPConnect } = props;
|
|
15
|
+
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
15
16
|
|
|
16
17
|
const numRegions = children?.length;
|
|
17
18
|
const gridRepeat = "repeat(".concat(numRegions).concat(", 1fr)");
|
|
@@ -24,13 +25,15 @@ export default function PegaDxilMyTwoColumnForm(props) {
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<StyledPegaDxilMyTwoColumnFormWrapper>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
29
|
+
<Grid container={gridContainer}>
|
|
30
|
+
{children.map((child, i) => (
|
|
31
|
+
<Flex container={flexContainer} key={`r-${i + 1}`}>
|
|
32
|
+
{child}
|
|
33
|
+
</Flex>
|
|
34
|
+
))}
|
|
35
|
+
</Grid>
|
|
36
|
+
</FieldGroup>
|
|
34
37
|
</StyledPegaDxilMyTwoColumnFormWrapper>
|
|
35
38
|
);
|
|
36
39
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Grid } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Grid, FieldGroup } from '@pega/cosmos-react-core';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import StyledPegaDxilMyFormWrapper from './styles';
|
|
@@ -11,24 +11,30 @@ import StyledPegaDxilMyFormWrapper from './styles';
|
|
|
11
11
|
export default function PegaDxilMyForm(props) {
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const { children, NumCols } = props;
|
|
14
|
+
const { children, NumCols, label, showLabel, getPConnect } = props;
|
|
15
|
+
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
15
16
|
|
|
16
17
|
const nCols = parseInt(NumCols, 10);
|
|
17
18
|
|
|
18
19
|
// console.log(`Rendering ${getPConnect()?.getComponentName()} with ${template} with ${children?.length} Region(s)`);
|
|
19
20
|
|
|
21
|
+
|
|
22
|
+
|
|
20
23
|
return (
|
|
21
24
|
<StyledPegaDxilMyFormWrapper>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
26
|
+
<Grid container={{
|
|
27
|
+
cols: `repeat(${nCols}, minmax(0, 1fr))`,
|
|
28
|
+
gap: 2,
|
|
29
|
+
wrap: `wrap`
|
|
30
|
+
}}>
|
|
31
|
+
{children}
|
|
32
|
+
</Grid>
|
|
33
|
+
</FieldGroup>
|
|
29
34
|
</StyledPegaDxilMyFormWrapper>
|
|
30
35
|
);
|
|
31
36
|
|
|
37
|
+
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
PegaDxilMyForm.defaultProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Grid, Flex } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Grid, Flex, FieldGroup } from '@pega/cosmos-react-core';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import StyledPegaDxilMyTwoColumnFormWrapper from './styles';
|
|
@@ -11,7 +11,8 @@ import StyledPegaDxilMyTwoColumnFormWrapper from './styles';
|
|
|
11
11
|
export default function PegaDxilMyTwoColumnForm(props) {
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const { children } = props;
|
|
14
|
+
const { children, label, showLabel, getPConnect } = props;
|
|
15
|
+
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
15
16
|
|
|
16
17
|
const numRegions = children?.length;
|
|
17
18
|
const gridRepeat = "repeat(".concat(numRegions).concat(", 1fr)");
|
|
@@ -24,13 +25,15 @@ export default function PegaDxilMyTwoColumnForm(props) {
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<StyledPegaDxilMyTwoColumnFormWrapper>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
29
|
+
<Grid container={gridContainer}>
|
|
30
|
+
{children.map((child, i) => (
|
|
31
|
+
<Flex container={flexContainer} key={`r-${i + 1}`}>
|
|
32
|
+
{child}
|
|
33
|
+
</Flex>
|
|
34
|
+
))}
|
|
35
|
+
</Grid>
|
|
36
|
+
</FieldGroup>
|
|
34
37
|
</StyledPegaDxilMyTwoColumnFormWrapper>
|
|
35
38
|
);
|
|
36
39
|
|