@pega/custom-dx-components 0.23.16 → 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 +5 -5
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +2 -14
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +0 -5
- package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +3 -18
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +3 -18
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +5 -20
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +5 -19
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +7 -22
- package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +5 -21
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +3 -24
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +3 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +3 -15
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +3 -16
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +3 -18
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +3 -18
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.jsx.mustache +3 -18
- 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 +2 -2
- 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 +2 -2
- 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/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/init/template/package.json.mustache +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +2 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +3 -17
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +0 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +3 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +3 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +3 -18
- 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 +3 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +3 -19
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +3 -16
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +3 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +3 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +3 -24
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +3 -15
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +3 -18
- 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_MyURL/index.jsx +3 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +2 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +3 -17
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +0 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +3 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +3 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +3 -18
- 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 +3 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +3 -19
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +3 -16
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +3 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +3 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +3 -24
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +3 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +3 -18
- 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_MyURL/index.jsx +3 -18
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +13 -4
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +13 -4
|
@@ -40,22 +40,12 @@ const PegaDxilMyDateTime = props => {
|
|
|
40
40
|
additionalProps,
|
|
41
41
|
displayMode,
|
|
42
42
|
variant,
|
|
43
|
-
hasSuggestions
|
|
44
|
-
fieldMetadata,
|
|
45
|
-
enableAdditionalInformation
|
|
43
|
+
hasSuggestions
|
|
46
44
|
} = props;
|
|
47
45
|
let { formatter } = props;
|
|
48
46
|
const pConn = getPConnect();
|
|
49
47
|
const actions = pConn.getActionsApi();
|
|
50
48
|
const propName = pConn.getStateProps().value;
|
|
51
|
-
const fieldDescription = fieldMetadata?.description;
|
|
52
|
-
const additionalInfo =
|
|
53
|
-
enableAdditionalInformation && fieldDescription
|
|
54
|
-
? {
|
|
55
|
-
heading: label,
|
|
56
|
-
content: fieldDescription
|
|
57
|
-
}
|
|
58
|
-
: undefined;
|
|
59
49
|
|
|
60
50
|
const environmentInfo = PCore.getEnvironmentInfo();
|
|
61
51
|
const timezone = environmentInfo && environmentInfo.getTimeZone();
|
|
@@ -191,7 +181,6 @@ const PegaDxilMyDateTime = props => {
|
|
|
191
181
|
label={label}
|
|
192
182
|
labelHidden={hideLabel}
|
|
193
183
|
info={validatemessage || helperText}
|
|
194
|
-
additionalInfo={additionalInfo}
|
|
195
184
|
status={status}
|
|
196
185
|
value={DateTimeFormatter.convertToTimezone(value, { timezone }) || undefined}
|
|
197
186
|
withSeconds={withSeconds}
|
|
@@ -234,9 +223,7 @@ PegaDxilMyDateTime.defaultProps = {
|
|
|
234
223
|
displayMode: null,
|
|
235
224
|
variant: "inline",
|
|
236
225
|
Format: "defaultDateTime",
|
|
237
|
-
hasSuggestions: false
|
|
238
|
-
fieldMetadata: {},
|
|
239
|
-
enableAdditionalInformation: false
|
|
226
|
+
hasSuggestions: false
|
|
240
227
|
};
|
|
241
228
|
|
|
242
229
|
PegaDxilMyDateTime.propTypes = {
|
|
@@ -261,9 +248,7 @@ PegaDxilMyDateTime.propTypes = {
|
|
|
261
248
|
variant: PropTypes.string,
|
|
262
249
|
formatter: PropTypes.string,
|
|
263
250
|
Format: PropTypes.string,
|
|
264
|
-
hasSuggestions: PropTypes.bool
|
|
265
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
266
|
-
enableAdditionalInformation: PropTypes.bool
|
|
251
|
+
hasSuggestions: PropTypes.bool
|
|
267
252
|
};
|
|
268
253
|
|
|
269
254
|
export default PegaDxilMyDateTime;
|
|
@@ -30,9 +30,7 @@ const PegaDxilMyDecimal = props => {
|
|
|
30
30
|
notation,
|
|
31
31
|
currencyISOCode,
|
|
32
32
|
isTableFormatter,
|
|
33
|
-
hasSuggestions
|
|
34
|
-
fieldMetadata,
|
|
35
|
-
enableAdditionalInformation
|
|
33
|
+
hasSuggestions
|
|
36
34
|
} = props;
|
|
37
35
|
let { showGroupSeparators } = props;
|
|
38
36
|
let { currencyDisplay } = props;
|
|
@@ -40,14 +38,6 @@ const PegaDxilMyDecimal = props => {
|
|
|
40
38
|
const actions = pConn.getActionsApi();
|
|
41
39
|
const propName = pConn.getStateProps().value;
|
|
42
40
|
const [decimalValue, setDecimalValue] = useState(value?.toString());
|
|
43
|
-
const fieldDescription = fieldMetadata?.description;
|
|
44
|
-
const additionalInfo =
|
|
45
|
-
enableAdditionalInformation && fieldDescription
|
|
46
|
-
? {
|
|
47
|
-
heading: label,
|
|
48
|
-
content: fieldDescription
|
|
49
|
-
}
|
|
50
|
-
: undefined;
|
|
51
41
|
const hasValueChange = useRef(false);
|
|
52
42
|
|
|
53
43
|
let { readOnly, required, disabled } = props;
|
|
@@ -197,7 +187,6 @@ const PegaDxilMyDecimal = props => {
|
|
|
197
187
|
numberOfDecimals={numberOfDecimals}
|
|
198
188
|
showGroupSeparators={showGroupSeparators}
|
|
199
189
|
data-testid={testId}
|
|
200
|
-
additionalInfo={additionalInfo}
|
|
201
190
|
onChange={(enteredValue) => {
|
|
202
191
|
if (hasSuggestions) {
|
|
203
192
|
setStatus(undefined);
|
|
@@ -247,9 +236,7 @@ PegaDxilMyDecimal.defaultProps = {
|
|
|
247
236
|
currencyDisplay: 'symbol',
|
|
248
237
|
currencyDecimalPrecision: 'auto',
|
|
249
238
|
isTableFormatter: false,
|
|
250
|
-
hasSuggestions: false
|
|
251
|
-
fieldMetadata: {},
|
|
252
|
-
enableAdditionalInformation: false
|
|
239
|
+
hasSuggestions: false
|
|
253
240
|
};
|
|
254
241
|
|
|
255
242
|
PegaDxilMyDecimal.propTypes = {
|
|
@@ -277,9 +264,7 @@ PegaDxilMyDecimal.propTypes = {
|
|
|
277
264
|
currencyDisplay: PropTypes.string,
|
|
278
265
|
currencyDecimalPrecision: PropTypes.string,
|
|
279
266
|
isTableFormatter: PropTypes.bool,
|
|
280
|
-
hasSuggestions: PropTypes.bool
|
|
281
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
282
|
-
enableAdditionalInformation: PropTypes.bool
|
|
267
|
+
hasSuggestions: PropTypes.bool
|
|
283
268
|
};
|
|
284
269
|
|
|
285
270
|
export default PegaDxilMyDecimal;
|
|
@@ -70,22 +70,12 @@ const PegaDxilMyEmail = props => {
|
|
|
70
70
|
additionalProps,
|
|
71
71
|
variant,
|
|
72
72
|
isTableFormatter,
|
|
73
|
-
hasSuggestions
|
|
74
|
-
fieldMetadata,
|
|
75
|
-
enableAdditionalInformation
|
|
73
|
+
hasSuggestions
|
|
76
74
|
} = props;
|
|
77
75
|
const { formatter } = props;
|
|
78
76
|
const pConn = getPConnect();
|
|
79
77
|
const actions = pConn.getActionsApi();
|
|
80
78
|
const propName = pConn.getStateProps().value;
|
|
81
|
-
const fieldDescription = fieldMetadata?.description;
|
|
82
|
-
const additionalInfo =
|
|
83
|
-
enableAdditionalInformation && fieldDescription
|
|
84
|
-
? {
|
|
85
|
-
heading: label,
|
|
86
|
-
content: fieldDescription
|
|
87
|
-
}
|
|
88
|
-
: undefined;
|
|
89
79
|
|
|
90
80
|
const hasValueChange = useRef(false);
|
|
91
81
|
|
|
@@ -168,7 +158,6 @@ const PegaDxilMyEmail = props => {
|
|
|
168
158
|
label={label}
|
|
169
159
|
labelHidden={hideLabel}
|
|
170
160
|
info={validatemessage || helperText}
|
|
171
|
-
additionalInfo={additionalInfo}
|
|
172
161
|
value={inputValue}
|
|
173
162
|
status={status}
|
|
174
163
|
placeholder={placeholder}
|
|
@@ -217,9 +206,7 @@ PegaDxilMyEmail.defaultProps = {
|
|
|
217
206
|
variant: 'inline',
|
|
218
207
|
formatter: '',
|
|
219
208
|
isTableFormatter: false,
|
|
220
|
-
hasSuggestions: false
|
|
221
|
-
fieldMetadata: {},
|
|
222
|
-
enableAdditionalInformation: false
|
|
209
|
+
hasSuggestions: false
|
|
223
210
|
};
|
|
224
211
|
|
|
225
212
|
PegaDxilMyEmail.propTypes = {
|
|
@@ -239,9 +226,7 @@ PegaDxilMyEmail.propTypes = {
|
|
|
239
226
|
variant: PropTypes.string,
|
|
240
227
|
formatter: PropTypes.string,
|
|
241
228
|
isTableFormatter: PropTypes.bool,
|
|
242
|
-
hasSuggestions: PropTypes.bool
|
|
243
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
244
|
-
enableAdditionalInformation: PropTypes.bool
|
|
229
|
+
hasSuggestions: PropTypes.bool
|
|
245
230
|
};
|
|
246
231
|
|
|
247
232
|
export default PegaDxilMyEmail;
|
|
@@ -133,6 +133,9 @@ export const basePegaDxilMyForm = () => {
|
|
|
133
133
|
getChildren: () => {
|
|
134
134
|
return pyReviewRaw.children;
|
|
135
135
|
},
|
|
136
|
+
getInheritedProps: () => {
|
|
137
|
+
return pyReviewRaw.config.inheritedProps;
|
|
138
|
+
},
|
|
136
139
|
createComponent: config => {
|
|
137
140
|
// eslint-disable-next-line default-case
|
|
138
141
|
switch (config.config.value) {
|
|
@@ -37,9 +37,7 @@ const PegaDxilMyInteger = props => {
|
|
|
37
37
|
negative,
|
|
38
38
|
notation,
|
|
39
39
|
isTableFormatter,
|
|
40
|
-
hasSuggestions
|
|
41
|
-
fieldMetadata,
|
|
42
|
-
enableAdditionalInformation
|
|
40
|
+
hasSuggestions
|
|
43
41
|
} = props;
|
|
44
42
|
let { showGroupSeparators } = props;
|
|
45
43
|
let { currencyDisplay } = props;
|
|
@@ -48,14 +46,6 @@ const PegaDxilMyInteger = props => {
|
|
|
48
46
|
const propName = pConn.getStateProps().value;
|
|
49
47
|
const [integerValue, setIntegerValue] = useState(value?.toString());
|
|
50
48
|
const sliderDefaultValue = !defaultValue && defaultValue !== 0 ? max : defaultValue;
|
|
51
|
-
const fieldDescription = fieldMetadata?.description;
|
|
52
|
-
const additionalInfo =
|
|
53
|
-
enableAdditionalInformation && fieldDescription
|
|
54
|
-
? {
|
|
55
|
-
heading: label,
|
|
56
|
-
content: fieldDescription
|
|
57
|
-
}
|
|
58
|
-
: undefined;
|
|
59
49
|
|
|
60
50
|
const hasValueChange = useRef(false);
|
|
61
51
|
|
|
@@ -218,7 +208,6 @@ const PegaDxilMyInteger = props => {
|
|
|
218
208
|
label={label}
|
|
219
209
|
labelHidden={hideLabel}
|
|
220
210
|
info={validatemessage || helperText}
|
|
221
|
-
additionalInfo={additionalInfo}
|
|
222
211
|
value={!integerValue ? sliderDefaultValue : Number(integerValue)}
|
|
223
212
|
status={status}
|
|
224
213
|
placeholder={placeholder}
|
|
@@ -246,7 +235,6 @@ const PegaDxilMyInteger = props => {
|
|
|
246
235
|
label={label}
|
|
247
236
|
labelHidden={hideLabel}
|
|
248
237
|
info={validatemessage || helperText}
|
|
249
|
-
additionalInfo={additionalInfo}
|
|
250
238
|
value={integerValue}
|
|
251
239
|
status={status}
|
|
252
240
|
placeholder={displayAs === 'input' ? placeholder : ''}
|
|
@@ -305,9 +293,7 @@ PegaDxilMyInteger.defaultProps = {
|
|
|
305
293
|
currencyDisplay: 'symbol',
|
|
306
294
|
currencyDecimalPrecision: 'auto',
|
|
307
295
|
isTableFormatter: false,
|
|
308
|
-
hasSuggestions: false
|
|
309
|
-
fieldMetadata: {},
|
|
310
|
-
enableAdditionalInformation: false
|
|
296
|
+
hasSuggestions: false
|
|
311
297
|
};
|
|
312
298
|
|
|
313
299
|
PegaDxilMyInteger.propTypes = {
|
|
@@ -342,9 +328,7 @@ PegaDxilMyInteger.propTypes = {
|
|
|
342
328
|
currencyDisplay: PropTypes.string,
|
|
343
329
|
currencyDecimalPrecision: PropTypes.string,
|
|
344
330
|
isTableFormatter: PropTypes.bool,
|
|
345
|
-
hasSuggestions: PropTypes.bool
|
|
346
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
347
|
-
enableAdditionalInformation: PropTypes.bool
|
|
331
|
+
hasSuggestions: PropTypes.bool
|
|
348
332
|
};
|
|
349
333
|
|
|
350
334
|
export default PegaDxilMyInteger;
|
|
@@ -71,8 +71,7 @@ const PegaDxilMyParagraph = props => {
|
|
|
71
71
|
additionalProps,
|
|
72
72
|
variant,
|
|
73
73
|
isTableFormatter,
|
|
74
|
-
hasSuggestions
|
|
75
|
-
enableAdditionalInformation
|
|
74
|
+
hasSuggestions
|
|
76
75
|
} = props;
|
|
77
76
|
const { formatter } = props;
|
|
78
77
|
const pConn = getPConnect();
|
|
@@ -80,8 +79,6 @@ const PegaDxilMyParagraph = props => {
|
|
|
80
79
|
const propName = pConn.getStateProps().value;
|
|
81
80
|
const maxLength = fieldMetadata?.maxLength;
|
|
82
81
|
const hasValueChange = useRef(false);
|
|
83
|
-
const fieldDescription = fieldMetadata?.description;
|
|
84
|
-
|
|
85
82
|
|
|
86
83
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
87
84
|
let { readOnly, required, disabled } = props;
|
|
@@ -185,14 +182,6 @@ const PegaDxilMyParagraph = props => {
|
|
|
185
182
|
}
|
|
186
183
|
}}
|
|
187
184
|
onResolveSuggestion={onResolveSuggestionHandler}
|
|
188
|
-
{...(enableAdditionalInformation && fieldDescription
|
|
189
|
-
? {
|
|
190
|
-
additionalInfo: {
|
|
191
|
-
heading: label,
|
|
192
|
-
content: fieldDescription
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
: {})}
|
|
196
185
|
/>
|
|
197
186
|
</StyledPegaDxilMyParagraphWrapper>
|
|
198
187
|
);
|
|
@@ -214,8 +203,7 @@ PegaDxilMyParagraph.defaultProps = {
|
|
|
214
203
|
variant: 'inline',
|
|
215
204
|
formatter: '',
|
|
216
205
|
isTableFormatter: false,
|
|
217
|
-
hasSuggestions: false
|
|
218
|
-
enableAdditionalInformation: false
|
|
206
|
+
hasSuggestions: false
|
|
219
207
|
};
|
|
220
208
|
|
|
221
209
|
PegaDxilMyParagraph.propTypes = {
|
|
@@ -236,8 +224,7 @@ PegaDxilMyParagraph.propTypes = {
|
|
|
236
224
|
variant: PropTypes.string,
|
|
237
225
|
formatter: PropTypes.string,
|
|
238
226
|
isTableFormatter: PropTypes.bool,
|
|
239
|
-
hasSuggestions: PropTypes.bool
|
|
240
|
-
enableAdditionalInformation: PropTypes.bool
|
|
227
|
+
hasSuggestions: PropTypes.bool
|
|
241
228
|
};
|
|
242
229
|
|
|
243
230
|
export default PegaDxilMyParagraph;
|
|
@@ -35,23 +35,13 @@ const PegaDxilMyPercentage = props => {
|
|
|
35
35
|
variant,
|
|
36
36
|
formatter,
|
|
37
37
|
isTableFormatter,
|
|
38
|
-
hasSuggestions
|
|
39
|
-
fieldMetadata,
|
|
40
|
-
enableAdditionalInformation
|
|
38
|
+
hasSuggestions
|
|
41
39
|
} = props;
|
|
42
40
|
let { showGroupSeparators } = props;
|
|
43
41
|
const pConn = getPConnect();
|
|
44
42
|
const actions = pConn.getActionsApi();
|
|
45
43
|
const propName = pConn.getStateProps().value;
|
|
46
44
|
const [percentageValue, setPercentageValue] = useState(value?.toString());
|
|
47
|
-
const fieldDescription = fieldMetadata?.description;
|
|
48
|
-
const additionalInfo =
|
|
49
|
-
enableAdditionalInformation && fieldDescription
|
|
50
|
-
? {
|
|
51
|
-
heading: label,
|
|
52
|
-
content: fieldDescription
|
|
53
|
-
}
|
|
54
|
-
: undefined;
|
|
55
45
|
|
|
56
46
|
const hasValueChange = useRef(false);
|
|
57
47
|
|
|
@@ -203,7 +193,6 @@ const PegaDxilMyPercentage = props => {
|
|
|
203
193
|
label={label}
|
|
204
194
|
labelHidden={hideLabel}
|
|
205
195
|
info={validatemessage || helperText}
|
|
206
|
-
additionalInfo={additionalInfo}
|
|
207
196
|
value={percentageValue}
|
|
208
197
|
status={status}
|
|
209
198
|
placeholder={placeholder}
|
|
@@ -258,9 +247,7 @@ PegaDxilMyPercentage.defaultProps = {
|
|
|
258
247
|
currencyISOCode: 'USD',
|
|
259
248
|
formatter: '',
|
|
260
249
|
isTableFormatter: false,
|
|
261
|
-
hasSuggestions: false
|
|
262
|
-
fieldMetadata: {},
|
|
263
|
-
enableAdditionalInformation: false
|
|
250
|
+
hasSuggestions: false
|
|
264
251
|
};
|
|
265
252
|
|
|
266
253
|
PegaDxilMyPercentage.propTypes = {
|
|
@@ -283,9 +270,7 @@ PegaDxilMyPercentage.propTypes = {
|
|
|
283
270
|
formatter: PropTypes.string,
|
|
284
271
|
currencyISOCode: PropTypes.string,
|
|
285
272
|
isTableFormatter: PropTypes.bool,
|
|
286
|
-
hasSuggestions: PropTypes.bool
|
|
287
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
288
|
-
enableAdditionalInformation: PropTypes.bool
|
|
273
|
+
hasSuggestions: PropTypes.bool
|
|
289
274
|
};
|
|
290
275
|
|
|
291
276
|
export default PegaDxilMyPercentage;
|
|
@@ -79,15 +79,12 @@ const PegaDxilMyPhone = props => {
|
|
|
79
79
|
additionalProps,
|
|
80
80
|
variant,
|
|
81
81
|
isTableFormatter,
|
|
82
|
-
hasSuggestions
|
|
83
|
-
fieldMetadata,
|
|
84
|
-
enableAdditionalInformation
|
|
82
|
+
hasSuggestions
|
|
85
83
|
} = props;
|
|
86
84
|
const { formatter } = props;
|
|
87
85
|
const pConn = getPConnect();
|
|
88
86
|
const actions = pConn.getActionsApi();
|
|
89
87
|
const propName = pConn.getStateProps().value;
|
|
90
|
-
const fieldDescription = fieldMetadata?.description;
|
|
91
88
|
const hasValueChange = useRef(false);
|
|
92
89
|
|
|
93
90
|
let callingCodesList = [];
|
|
@@ -219,14 +216,6 @@ const PegaDxilMyPhone = props => {
|
|
|
219
216
|
}
|
|
220
217
|
}}
|
|
221
218
|
onResolveSuggestion={onResolveSuggestionHandler}
|
|
222
|
-
{...(enableAdditionalInformation && fieldDescription
|
|
223
|
-
? {
|
|
224
|
-
additionalInfo: {
|
|
225
|
-
heading: label,
|
|
226
|
-
content: fieldDescription
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
: {})}
|
|
230
219
|
/>
|
|
231
220
|
</StyledPegaDxilMyPhoneWrapper>
|
|
232
221
|
);
|
|
@@ -249,9 +238,7 @@ PegaDxilMyPhone.defaultProps = {
|
|
|
249
238
|
variant: 'inline',
|
|
250
239
|
formatter: '',
|
|
251
240
|
isTableFormatter: false,
|
|
252
|
-
hasSuggestions: false
|
|
253
|
-
fieldMetadata: {},
|
|
254
|
-
enableAdditionalInformation: false
|
|
241
|
+
hasSuggestions: false
|
|
255
242
|
};
|
|
256
243
|
|
|
257
244
|
PegaDxilMyPhone.propTypes = {
|
|
@@ -273,9 +260,7 @@ PegaDxilMyPhone.propTypes = {
|
|
|
273
260
|
variant: PropTypes.string,
|
|
274
261
|
formatter: PropTypes.string,
|
|
275
262
|
isTableFormatter: PropTypes.bool,
|
|
276
|
-
hasSuggestions: PropTypes.bool
|
|
277
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
278
|
-
enableAdditionalInformation: PropTypes.bool
|
|
263
|
+
hasSuggestions: PropTypes.bool
|
|
279
264
|
};
|
|
280
265
|
|
|
281
266
|
export default PegaDxilMyPhone;
|
|
@@ -96,9 +96,7 @@ const PegaDxilMyPicklist = props => {
|
|
|
96
96
|
variant,
|
|
97
97
|
fieldMetadata,
|
|
98
98
|
isTableFormatter,
|
|
99
|
-
hasSuggestions
|
|
100
|
-
enableAdditionalInformation,
|
|
101
|
-
additionalInfo
|
|
99
|
+
hasSuggestions
|
|
102
100
|
} = props;
|
|
103
101
|
const { formatter } = props;
|
|
104
102
|
const pConnect = getPConnect();
|
|
@@ -107,8 +105,6 @@ const PegaDxilMyPicklist = props => {
|
|
|
107
105
|
const className = pConnect.getCaseInfo().getClassName();
|
|
108
106
|
const refName = propName?.slice(propName.lastIndexOf('.') + 1);
|
|
109
107
|
|
|
110
|
-
const fieldDescription = fieldMetadata?.description;
|
|
111
|
-
|
|
112
108
|
let { readOnly, required, disabled } = props;
|
|
113
109
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
114
110
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
@@ -266,11 +262,6 @@ const PegaDxilMyPicklist = props => {
|
|
|
266
262
|
suggestionsHandler(accepted, pConnect, setStatus);
|
|
267
263
|
};
|
|
268
264
|
|
|
269
|
-
// In case of User Reference additionalInfo prop is directly passed down
|
|
270
|
-
const additionalInfoProp = additionalInfo || {
|
|
271
|
-
heading: label,
|
|
272
|
-
content: fieldDescription
|
|
273
|
-
};
|
|
274
265
|
|
|
275
266
|
return (
|
|
276
267
|
<StyledPegaDxilMyPicklistWrapper>
|
|
@@ -300,11 +291,6 @@ const PegaDxilMyPicklist = props => {
|
|
|
300
291
|
pConnect.getValidationApi().validate(event.target.value);
|
|
301
292
|
}}
|
|
302
293
|
onResolveSuggestion={onResolveSuggestionHandler}
|
|
303
|
-
{...(additionalInfo || (enableAdditionalInformation && fieldDescription)
|
|
304
|
-
? {
|
|
305
|
-
additionalInfo: additionalInfoProp
|
|
306
|
-
}
|
|
307
|
-
: {})}
|
|
308
294
|
>
|
|
309
295
|
{items}
|
|
310
296
|
</Select>
|
|
@@ -331,9 +317,7 @@ PegaDxilMyPicklist.defaultProps = {
|
|
|
331
317
|
variant: 'inline',
|
|
332
318
|
formatter: '',
|
|
333
319
|
isTableFormatter: false,
|
|
334
|
-
hasSuggestions: false
|
|
335
|
-
enableAdditionalInformation: false,
|
|
336
|
-
additionalInfo: null
|
|
320
|
+
hasSuggestions: false
|
|
337
321
|
};
|
|
338
322
|
|
|
339
323
|
PegaDxilMyPicklist.propTypes = {
|
|
@@ -362,12 +346,7 @@ PegaDxilMyPicklist.propTypes = {
|
|
|
362
346
|
variant: PropTypes.string,
|
|
363
347
|
formatter: PropTypes.string,
|
|
364
348
|
isTableFormatter: PropTypes.bool,
|
|
365
|
-
hasSuggestions: PropTypes.bool
|
|
366
|
-
enableAdditionalInformation: PropTypes.bool,
|
|
367
|
-
additionalInfo: PropTypes.shape({
|
|
368
|
-
heading: PropTypes.string,
|
|
369
|
-
content: PropTypes.string
|
|
370
|
-
})
|
|
349
|
+
hasSuggestions: PropTypes.bool
|
|
371
350
|
};
|
|
372
351
|
|
|
373
352
|
export default PegaDxilMyPicklist;
|
|
@@ -73,15 +73,13 @@ const PegaDxilMyTextInput = props => {
|
|
|
73
73
|
displayAsStatus,
|
|
74
74
|
variant,
|
|
75
75
|
hasSuggestions,
|
|
76
|
-
isTableFormatter
|
|
77
|
-
enableAdditionalInformation
|
|
76
|
+
isTableFormatter
|
|
78
77
|
} = props;
|
|
79
78
|
const { formatter } = props;
|
|
80
79
|
const pConn = getPConnect();
|
|
81
80
|
const actions = pConn.getActionsApi();
|
|
82
81
|
const propName = pConn.getStateProps().value;
|
|
83
82
|
const maxLength = fieldMetadata?.maxLength;
|
|
84
|
-
const fieldDescription = fieldMetadata?.description;
|
|
85
83
|
const hasValueChange = useRef(false);
|
|
86
84
|
|
|
87
85
|
let { value, readOnly, required, disabled } = props;
|
|
@@ -191,14 +189,6 @@ const PegaDxilMyTextInput = props => {
|
|
|
191
189
|
}
|
|
192
190
|
}}
|
|
193
191
|
onResolveSuggestion={onResolveSuggestionHandler}
|
|
194
|
-
{...(enableAdditionalInformation && fieldDescription
|
|
195
|
-
? {
|
|
196
|
-
additionalInfo: {
|
|
197
|
-
heading: label,
|
|
198
|
-
content: fieldDescription
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
: {})}
|
|
202
192
|
/>
|
|
203
193
|
</StyledPegaDxilMyTextInputWrapper>
|
|
204
194
|
);
|
|
@@ -221,8 +211,7 @@ PegaDxilMyTextInput.defaultProps = {
|
|
|
221
211
|
variant: 'inline',
|
|
222
212
|
formatter: '',
|
|
223
213
|
isTableFormatter: false,
|
|
224
|
-
hasSuggestions: false
|
|
225
|
-
enableAdditionalInformation: false
|
|
214
|
+
hasSuggestions: false
|
|
226
215
|
};
|
|
227
216
|
|
|
228
217
|
PegaDxilMyTextInput.propTypes = {
|
|
@@ -244,8 +233,7 @@ PegaDxilMyTextInput.propTypes = {
|
|
|
244
233
|
variant: PropTypes.string,
|
|
245
234
|
formatter: PropTypes.string,
|
|
246
235
|
isTableFormatter: PropTypes.bool,
|
|
247
|
-
hasSuggestions: PropTypes.bool
|
|
248
|
-
enableAdditionalInformation: PropTypes.bool
|
|
236
|
+
hasSuggestions: PropTypes.bool
|
|
249
237
|
};
|
|
250
238
|
|
|
251
239
|
export default PegaDxilMyTextInput;
|
|
@@ -31,15 +31,12 @@ const PegaDxilMyTimeOfDay = props => {
|
|
|
31
31
|
additionalProps,
|
|
32
32
|
displayMode,
|
|
33
33
|
variant,
|
|
34
|
-
hasSuggestions
|
|
35
|
-
fieldMetadata,
|
|
36
|
-
enableAdditionalInformation
|
|
34
|
+
hasSuggestions
|
|
37
35
|
} = props;
|
|
38
36
|
let { formatter } = props;
|
|
39
37
|
const pConn = getPConnect();
|
|
40
38
|
const actions = pConn.getActionsApi();
|
|
41
39
|
const propName = pConn.getStateProps().value;
|
|
42
|
-
const fieldDescription = fieldMetadata?.description;
|
|
43
40
|
|
|
44
41
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
45
42
|
let { readOnly, required, disabled } = props;
|
|
@@ -169,14 +166,6 @@ const PegaDxilMyTimeOfDay = props => {
|
|
|
169
166
|
onChange={handleChange}
|
|
170
167
|
onBlur={handleBlur}
|
|
171
168
|
onResolveSuggestion={onResolveSuggestionHandler}
|
|
172
|
-
{...(enableAdditionalInformation && fieldDescription
|
|
173
|
-
? {
|
|
174
|
-
additionalInfo: {
|
|
175
|
-
heading: label,
|
|
176
|
-
content: fieldDescription
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
: {})}
|
|
180
169
|
/>
|
|
181
170
|
</StyledPegaDxilMyTimeOfDayWrapper>
|
|
182
171
|
);
|
|
@@ -198,9 +187,7 @@ PegaDxilMyTimeOfDay.defaultProps = {
|
|
|
198
187
|
displayMode: null,
|
|
199
188
|
variant: "inline",
|
|
200
189
|
formatter:"defaultTime",
|
|
201
|
-
hasSuggestions: false
|
|
202
|
-
fieldMetadata: {},
|
|
203
|
-
enableAdditionalInformation: false
|
|
190
|
+
hasSuggestions: false
|
|
204
191
|
};
|
|
205
192
|
|
|
206
193
|
PegaDxilMyTimeOfDay.propTypes = {
|
|
@@ -221,9 +208,7 @@ PegaDxilMyTimeOfDay.propTypes = {
|
|
|
221
208
|
displayMode: PropTypes.string,
|
|
222
209
|
variant: PropTypes.string,
|
|
223
210
|
formatter : PropTypes.string,
|
|
224
|
-
hasSuggestions: PropTypes.bool
|
|
225
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
226
|
-
enableAdditionalInformation: PropTypes.bool
|
|
211
|
+
hasSuggestions: PropTypes.bool
|
|
227
212
|
};
|
|
228
213
|
|
|
229
214
|
export default PegaDxilMyTimeOfDay;
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx
CHANGED
|
@@ -138,6 +138,9 @@ export const basePegaDxilMyTwoColumnForm = () => {
|
|
|
138
138
|
getChildren: () => {
|
|
139
139
|
return pyReviewRaw.children;
|
|
140
140
|
},
|
|
141
|
+
getInheritedProps: () => {
|
|
142
|
+
return pyReviewRaw.config.inheritedProps;
|
|
143
|
+
},
|
|
141
144
|
createComponent: config => {
|
|
142
145
|
// eslint-disable-next-line default-case
|
|
143
146
|
switch (config.config.value) {
|
|
@@ -38,15 +38,12 @@ const PegaDxilMyUrl = props => {
|
|
|
38
38
|
propUrlLabel,
|
|
39
39
|
urlLabelSelection,
|
|
40
40
|
tableDisplayAs,
|
|
41
|
-
hasSuggestions
|
|
42
|
-
fieldMetadata,
|
|
43
|
-
enableAdditionalInformation
|
|
41
|
+
hasSuggestions
|
|
44
42
|
} = props;
|
|
45
43
|
const { formatter } = props;
|
|
46
44
|
const pConn = getPConnect();
|
|
47
45
|
const actions = pConn.getActionsApi();
|
|
48
46
|
const propName = pConn.getStateProps().value;
|
|
49
|
-
const fieldDescription = fieldMetadata?.description;
|
|
50
47
|
const hasValueChange = useRef(false);
|
|
51
48
|
|
|
52
49
|
|
|
@@ -169,14 +166,6 @@ const PegaDxilMyUrl = props => {
|
|
|
169
166
|
}}
|
|
170
167
|
onFocus={actions.onFocus}
|
|
171
168
|
onResolveSuggestion={onResolveSuggestionHandler}
|
|
172
|
-
{...(enableAdditionalInformation && fieldDescription
|
|
173
|
-
? {
|
|
174
|
-
additionalInfo: {
|
|
175
|
-
heading: label,
|
|
176
|
-
content: fieldDescription
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
: {})}
|
|
180
169
|
/>
|
|
181
170
|
</StyledPegaDxilMyUrlWrapper>
|
|
182
171
|
);
|
|
@@ -207,9 +196,7 @@ PegaDxilMyUrl.defaultProps = {
|
|
|
207
196
|
propUrlLabel: '',
|
|
208
197
|
urlLabelSelection: 'constant',
|
|
209
198
|
tableDisplayAs: 'link',
|
|
210
|
-
hasSuggestions: false
|
|
211
|
-
fieldMetadata: {},
|
|
212
|
-
enableAdditionalInformation: false
|
|
199
|
+
hasSuggestions: false
|
|
213
200
|
};
|
|
214
201
|
|
|
215
202
|
PegaDxilMyUrl.propTypes = {
|
|
@@ -239,9 +226,7 @@ PegaDxilMyUrl.propTypes = {
|
|
|
239
226
|
propUrlLabel: PropTypes.string,
|
|
240
227
|
urlLabelSelection: PropTypes.string,
|
|
241
228
|
tableDisplayAs: PropTypes.string,
|
|
242
|
-
hasSuggestions: PropTypes.bool
|
|
243
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
244
|
-
enableAdditionalInformation: PropTypes.bool
|
|
229
|
+
hasSuggestions: PropTypes.bool
|
|
245
230
|
};
|
|
246
231
|
|
|
247
232
|
export default PegaDxilMyUrl;
|