@pega/custom-dx-components 8.8.20 → 23.1.10
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/.prettierrc.json +1 -7
- package/package.json +5 -5
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +5 -1
- package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +6 -5
- package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +4 -3
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text/index.jsx.mustache +5 -4
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/index.jsx.mustache +5 -4
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +3 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +3 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +18 -12
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +14 -11
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Widget/CASE/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.jsx.mustache +2 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.jsx.mustache +2 -2
- package/src/tasks/create-all/index.js +105 -98
- package/src/tasks/delete/helper.js +32 -24
- package/src/tasks/delete-all/helper.js +15 -12
- package/src/tasks/init/template/jest.config.cjs +21 -0
- package/src/tasks/init/template/package.json.mustache +9 -4
- package/src/tasks/list/helper.js +14 -19
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.jsx +5 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +3 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +5 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.jsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.jsx +15 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.jsx +5 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +5 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.jsx +12 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +3 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +5 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.jsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.jsx +15 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.jsx +5 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +5 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.jsx +12 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.jsx +1 -1
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +15 -6
- package/tests/functional/localCreateBuildDelete.test.js +1 -1
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +15 -6
- package/tests/functional/localCreatePublishDelete.test.js +2 -1
- /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/time-of-day.js.mustache +0 -0
package/.prettierrc.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/custom-dx-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.1.10",
|
|
4
4
|
"description": "Utility for building custom UI components",
|
|
5
5
|
"bin": "./bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@babel/core": "^7.
|
|
19
|
-
"@babel/plugin-
|
|
20
|
-
"@babel/preset-react": "^7.
|
|
18
|
+
"@babel/core": "^7.23.3",
|
|
19
|
+
"@babel/plugin-transform-class-properties": "^7.23.3",
|
|
20
|
+
"@babel/preset-react": "^7.23.3",
|
|
21
21
|
"adm-zip": "^0.5.9",
|
|
22
22
|
"ajv": "^8.12.0",
|
|
23
23
|
"ajv-keywords": "^5.1.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"custom-components"
|
|
65
65
|
],
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@babel/preset-env": "^7.
|
|
67
|
+
"@babel/preset-env": "^7.23.3",
|
|
68
68
|
"@pega/configs": "^0.4.0",
|
|
69
69
|
"@pega/prettier-config": "^0.5.3",
|
|
70
70
|
"@types/jest": "^29.5.3",
|
|
@@ -65,7 +65,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
65
65
|
/>
|
|
66
66
|
);
|
|
67
67
|
|
|
68
|
-
const parentTestId = testId ? `${testId}-parent` : testId;
|
|
68
|
+
const parentTestId = testId === '' ? `${testId}-parent` : testId;
|
|
69
69
|
|
|
70
70
|
let displayComponent;
|
|
71
71
|
if (displayMode) {
|
|
@@ -138,13 +138,13 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
138
138
|
disabled: false,
|
|
139
139
|
readOnly: false,
|
|
140
140
|
required: false,
|
|
141
|
-
testId:
|
|
141
|
+
testId: '',
|
|
142
142
|
additionalProps: {},
|
|
143
143
|
displayMode: null,
|
|
144
144
|
variant: 'inline',
|
|
145
145
|
displayValue: 'Yes/No',
|
|
146
146
|
trueLabel: '',
|
|
147
|
-
falseLabel: ''
|
|
147
|
+
falseLabel: '',
|
|
148
148
|
};
|
|
149
149
|
|
|
150
150
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -182,6 +182,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
182
182
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
183
183
|
);
|
|
184
184
|
} else {
|
|
185
|
+
|
|
185
186
|
dateComponent = (
|
|
186
187
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
187
188
|
<DateInput
|
|
@@ -222,7 +223,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
222
223
|
showWeekNumber: false,
|
|
223
224
|
nextYearRange: "",
|
|
224
225
|
previousYearRange: "",
|
|
225
|
-
testId:
|
|
226
|
+
testId: "",
|
|
226
227
|
showAsFormattedText: false,
|
|
227
228
|
additionalProps: {},
|
|
228
229
|
displayMode: null,
|
|
@@ -100,7 +100,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
{{! pick new
|
|
103
|
+
{{! pick new delimiters for mustache }}
|
|
104
104
|
{{=<% %>=}}
|
|
105
105
|
|
|
106
106
|
const displayComp =
|
|
@@ -128,7 +128,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
128
128
|
/>
|
|
129
129
|
);
|
|
130
130
|
|
|
131
|
-
<%={{ }}=%> {{! revert
|
|
131
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
132
132
|
|
|
133
133
|
switch (displayMode) {
|
|
134
134
|
case 'DISPLAY_ONLY': {
|
|
@@ -225,7 +225,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
225
225
|
disabled: false,
|
|
226
226
|
readOnly: false,
|
|
227
227
|
required: false,
|
|
228
|
-
testId:
|
|
228
|
+
testId: "",
|
|
229
229
|
decimalPrecision: '',
|
|
230
230
|
showGroupSeparators: false,
|
|
231
231
|
displayMode: null,
|
|
@@ -95,7 +95,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
95
95
|
|
|
96
96
|
const displayValue = !value && value !== 0 ? undefined : Number(currencyValue);
|
|
97
97
|
|
|
98
|
-
{{! pick new
|
|
98
|
+
{{! pick new delimiters for mustache }}
|
|
99
99
|
{{=<% %>=}}
|
|
100
100
|
|
|
101
101
|
displayComp = (
|
|
@@ -151,7 +151,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
<%={{ }}=%> {{! revert
|
|
154
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
155
155
|
|
|
156
156
|
switch (displayMode) {
|
|
157
157
|
case 'DISPLAY_ONLY': {
|
|
@@ -251,7 +251,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
251
251
|
allowDecimals: true,
|
|
252
252
|
currencyISOCode: 'USD',
|
|
253
253
|
isoCodeSelection: 'constant',
|
|
254
|
-
testId:
|
|
254
|
+
testId: '',
|
|
255
255
|
displayMode: null,
|
|
256
256
|
additionalProps: {},
|
|
257
257
|
variant: 'inline',
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache
CHANGED
|
@@ -42,6 +42,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
42
42
|
const actions = pConn.getActionsApi();
|
|
43
43
|
const propName = pConn.getStateProps().value;
|
|
44
44
|
const [percentageValue, setPercentageValue] = useState(value?.toString());
|
|
45
|
+
|
|
45
46
|
const hasValueChange = useRef(false);
|
|
46
47
|
|
|
47
48
|
let { readOnly, required, disabled } = props;
|
|
@@ -101,7 +102,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
{{! pick new
|
|
105
|
+
{{! pick new delimiters for mustache }}
|
|
105
106
|
{{=<% %>=}}
|
|
106
107
|
|
|
107
108
|
displayComp = (
|
|
@@ -132,7 +133,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
132
133
|
);
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
<%={{ }}=%> {{! revert
|
|
136
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
136
137
|
|
|
137
138
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
138
139
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -149,7 +150,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
149
150
|
);
|
|
150
151
|
}
|
|
151
152
|
|
|
152
|
-
{{! pick new
|
|
153
|
+
{{! pick new delimiters for mustache }}
|
|
153
154
|
{{=<% %>=}}
|
|
154
155
|
|
|
155
156
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
@@ -164,7 +165,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
164
165
|
/>
|
|
165
166
|
);
|
|
166
167
|
|
|
167
|
-
<%={{ }}=%> {{! revert
|
|
168
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
168
169
|
|
|
169
170
|
return (
|
|
170
171
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -243,7 +244,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
243
244
|
disabled: false,
|
|
244
245
|
readOnly: false,
|
|
245
246
|
required: false,
|
|
246
|
-
testId:
|
|
247
|
+
testId: '',
|
|
247
248
|
decimalPrecision: '',
|
|
248
249
|
showGroupSeparators: false,
|
|
249
250
|
additionalProps: {},
|
|
@@ -46,6 +46,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
46
46
|
const propName = pConn.getStateProps().value;
|
|
47
47
|
const [integerValue, setIntegerValue] = useState(value?.toString());
|
|
48
48
|
const sliderDefaultValue = !defaultValue && defaultValue !== 0 ? max : defaultValue;
|
|
49
|
+
|
|
49
50
|
const hasValueChange = useRef(false);
|
|
50
51
|
|
|
51
52
|
|
|
@@ -112,7 +113,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
{{! pick new
|
|
116
|
+
{{! pick new delimiters for mustache }}
|
|
116
117
|
{{=<% %>=}}
|
|
117
118
|
|
|
118
119
|
const displayComp =
|
|
@@ -141,7 +142,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
141
142
|
/>
|
|
142
143
|
);
|
|
143
144
|
|
|
144
|
-
<%={{ }}=%> {{! revert
|
|
145
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
145
146
|
|
|
146
147
|
switch (displayMode) {
|
|
147
148
|
case 'DISPLAY_ONLY': {
|
|
@@ -275,7 +276,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
275
276
|
disabled: false,
|
|
276
277
|
readOnly: false,
|
|
277
278
|
required: false,
|
|
278
|
-
testId:
|
|
279
|
+
testId: '',
|
|
279
280
|
showGroupSeparators: false,
|
|
280
281
|
displayMode: null,
|
|
281
282
|
displayAs: 'input',
|
|
@@ -262,6 +262,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
262
262
|
suggestionsHandler(accepted, pConnect, setStatus);
|
|
263
263
|
};
|
|
264
264
|
|
|
265
|
+
|
|
265
266
|
return (
|
|
266
267
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
267
268
|
<Select
|
|
@@ -305,7 +306,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
305
306
|
disabled: false,
|
|
306
307
|
readOnly: false,
|
|
307
308
|
required: false,
|
|
308
|
-
testId:
|
|
309
|
+
testId: '',
|
|
309
310
|
helperText: '',
|
|
310
311
|
datasource: [],
|
|
311
312
|
listType: '',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { Input
|
|
2
|
+
import { Input } from '@pega/cosmos-react-core';
|
|
3
3
|
|
|
4
4
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
|
9
9
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
10
10
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
11
11
|
const {{COMPONENT_CLASS_NAME}} = props => {
|
|
12
|
-
const { getPConnect, value, placeholder, disabled, readOnly, required, label, testId } = props;
|
|
12
|
+
const { getPConnect, value, placeholder, disabled, readOnly, required, label, hideLabel, testId } = props;
|
|
13
13
|
|
|
14
14
|
const pConn = getPConnect();
|
|
15
15
|
const actions = pConn.getActionsApi();
|
|
@@ -22,10 +22,11 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
25
|
-
<Label>{label}</Label>
|
|
26
25
|
<Input
|
|
27
26
|
type='text'
|
|
28
27
|
value={value}
|
|
28
|
+
label={label}
|
|
29
|
+
labelHidden={hideLabel}
|
|
29
30
|
placeholder={placeholder}
|
|
30
31
|
disabled={disabled}
|
|
31
32
|
readOnly={readOnly}
|
|
@@ -43,7 +44,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
43
44
|
disabled: false,
|
|
44
45
|
readOnly: false,
|
|
45
46
|
required: false,
|
|
46
|
-
testId:
|
|
47
|
+
testId: ''
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -76,6 +76,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
76
76
|
const pConn = getPConnect();
|
|
77
77
|
const actions = pConn.getActionsApi();
|
|
78
78
|
const propName = pConn.getStateProps().value;
|
|
79
|
+
|
|
79
80
|
const hasValueChange = useRef(false);
|
|
80
81
|
|
|
81
82
|
|
|
@@ -199,7 +200,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
199
200
|
disabled: false,
|
|
200
201
|
readOnly: false,
|
|
201
202
|
required: false,
|
|
202
|
-
testId:
|
|
203
|
+
testId: '',
|
|
203
204
|
displayMode: null,
|
|
204
205
|
additionalProps: {},
|
|
205
206
|
variant: 'inline',
|
|
@@ -80,7 +80,6 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
80
80
|
const maxLength = fieldMetadata?.maxLength;
|
|
81
81
|
const hasValueChange = useRef(false);
|
|
82
82
|
|
|
83
|
-
|
|
84
83
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
85
84
|
let { readOnly, required, disabled } = props;
|
|
86
85
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
@@ -197,7 +196,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
197
196
|
disabled: false,
|
|
198
197
|
readOnly: false,
|
|
199
198
|
required: false,
|
|
200
|
-
testId:
|
|
199
|
+
testId: '',
|
|
201
200
|
displayMode: null,
|
|
202
201
|
fieldMetadata: {},
|
|
203
202
|
additionalProps: {},
|
package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/index.jsx.mustache
RENAMED
|
@@ -38,7 +38,6 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
38
38
|
const actions = pConn.getActionsApi();
|
|
39
39
|
const propName = pConn.getStateProps().value;
|
|
40
40
|
|
|
41
|
-
|
|
42
41
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
43
42
|
let { readOnly, required, disabled } = props;
|
|
44
43
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
@@ -183,11 +182,12 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
183
182
|
required: false,
|
|
184
183
|
pickerInterval: "30",
|
|
185
184
|
clockFormat: 0,
|
|
186
|
-
testId:
|
|
185
|
+
testId: '',
|
|
187
186
|
additionalProps: {},
|
|
188
187
|
displayMode: null,
|
|
189
188
|
variant: "inline",
|
|
190
|
-
formatter:"defaultTime"
|
|
189
|
+
formatter:"defaultTime",
|
|
190
|
+
hasSuggestions: false
|
|
191
191
|
};
|
|
192
192
|
|
|
193
193
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -207,7 +207,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
207
207
|
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
208
208
|
displayMode: PropTypes.string,
|
|
209
209
|
variant: PropTypes.string,
|
|
210
|
-
formatter : PropTypes.string
|
|
210
|
+
formatter : PropTypes.string,
|
|
211
|
+
hasSuggestions: PropTypes.bool
|
|
211
212
|
};
|
|
212
213
|
|
|
213
214
|
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -46,7 +46,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
49
|
-
{{! pick new
|
|
49
|
+
{{! pick new delimiters for mustache }}
|
|
50
50
|
{{=<% %>=}}
|
|
51
51
|
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
52
52
|
{showHighlightedData && highlightedDataArr.length > 0 && (
|
|
@@ -65,7 +65,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
65
65
|
))}
|
|
66
66
|
</Grid>
|
|
67
67
|
</FieldGroup>
|
|
68
|
-
<%={{ }}=%> {{! revert
|
|
68
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
69
69
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
70
70
|
);
|
|
71
71
|
|
|
@@ -46,7 +46,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
49
|
-
{{! pick new
|
|
49
|
+
{{! pick new delimiters for mustache }}
|
|
50
50
|
{{=<% %>=}}
|
|
51
51
|
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
52
52
|
{showHighlightedData && highlightedDataArr.length > 0 && (
|
|
@@ -65,7 +65,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
65
65
|
))}
|
|
66
66
|
</Grid>
|
|
67
67
|
</FieldGroup>
|
|
68
|
-
<%={{ }}=%> {{! revert
|
|
68
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
69
69
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
70
70
|
);
|
|
71
71
|
|
|
@@ -37,7 +37,7 @@ const renderField = resolvedProps => {
|
|
|
37
37
|
''
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
{{! pick new
|
|
40
|
+
{{! pick new delimiters for mustache }}
|
|
41
41
|
{{=<% %>=}}
|
|
42
42
|
|
|
43
43
|
if (label === 'Service Date')
|
|
@@ -91,7 +91,7 @@ const renderField = resolvedProps => {
|
|
|
91
91
|
></CosmosPhone>
|
|
92
92
|
);
|
|
93
93
|
|
|
94
|
-
<%={{ }}=%> {{! revert
|
|
94
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
95
95
|
|
|
96
96
|
if (variant === 'inline') {
|
|
97
97
|
val = value || (
|
|
@@ -136,6 +136,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
|
|
|
136
136
|
getChildren: () => {
|
|
137
137
|
return pyReviewRaw.children;
|
|
138
138
|
},
|
|
139
|
+
getInheritedProps: () => {
|
|
140
|
+
return pyReviewRaw.config.inheritedProps;
|
|
141
|
+
},
|
|
139
142
|
createComponent: config => {
|
|
140
143
|
// eslint-disable-next-line default-case
|
|
141
144
|
switch (config.config.value) {
|
|
@@ -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 delimiters 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 delimiters for mustache }}
|
|
32
37
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
33
38
|
);
|
|
34
39
|
|
|
40
|
+
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache
CHANGED
|
@@ -38,7 +38,7 @@ const renderField = resolvedProps => {
|
|
|
38
38
|
''
|
|
39
39
|
);
|
|
40
40
|
|
|
41
|
-
{{! pick new
|
|
41
|
+
{{! pick new delimiters for mustache }}
|
|
42
42
|
{{=<% %>=}}
|
|
43
43
|
|
|
44
44
|
if (label === 'Service Date')
|
|
@@ -93,7 +93,7 @@ const renderField = resolvedProps => {
|
|
|
93
93
|
></CosmosPhone>
|
|
94
94
|
);
|
|
95
95
|
|
|
96
|
-
<%={{ }}=%> {{! revert
|
|
96
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
97
97
|
|
|
98
98
|
if (variant === 'inline') {
|
|
99
99
|
val = value || (
|
|
@@ -141,6 +141,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
|
|
|
141
141
|
getChildren: () => {
|
|
142
142
|
return pyReviewRaw.children;
|
|
143
143
|
},
|
|
144
|
+
getInheritedProps: () => {
|
|
145
|
+
return pyReviewRaw.config.inheritedProps;
|
|
146
|
+
},
|
|
144
147
|
createComponent: config => {
|
|
145
148
|
// eslint-disable-next-line default-case
|
|
146
149
|
switch (config.config.value) {
|
|
@@ -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)");
|
|
@@ -24,16 +25,18 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
27
|
-
{{! pick new
|
|
28
|
+
{{! pick new delimiters for mustache }}
|
|
28
29
|
{{=<% %>=}}
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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>
|
|
39
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
37
40
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
38
41
|
);
|
|
39
42
|
|
|
@@ -33,7 +33,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
33
33
|
if (response.data.data !== null) {
|
|
34
34
|
setHistory(
|
|
35
35
|
response.data.data.map((entry, index) => {
|
|
36
|
-
{{! pick new
|
|
36
|
+
{{! pick new delimiters for mustache }}
|
|
37
37
|
{{=<% %>=}}
|
|
38
38
|
return {
|
|
39
39
|
date: new Date(entry.pxTimeCreated).toLocaleString(),
|
|
@@ -41,7 +41,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
41
41
|
user: entry.pyPerformer,
|
|
42
42
|
id: index
|
|
43
43
|
};
|
|
44
|
-
<%={{ }}=%> {{! revert
|
|
44
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
45
45
|
})
|
|
46
46
|
);
|
|
47
47
|
} else {
|
|
@@ -31,7 +31,7 @@ const Operator = (props) => {
|
|
|
31
31
|
}, [id]);
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
{{! pick new
|
|
34
|
+
{{! pick new delimiters for mustache }}
|
|
35
35
|
{{=<% %>=}}
|
|
36
36
|
|
|
37
37
|
const OperatorPreview = () => {
|
|
@@ -145,7 +145,7 @@ const Operator = (props) => {
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
<%={{ }}=%> {{! revert
|
|
148
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
149
149
|
|
|
150
150
|
const clickAction = (e) => {
|
|
151
151
|
setPopoverTarget(e.currentTarget);
|