@pega/dx-component-builder-sdk 8.23.17 → 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.
Files changed (133) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/bundle/builderAngular/webpack.config.js +1 -2
  3. package/src/tasks/create/templates/Constellation/field/Boolean/index.jsx.mustache +15 -3
  4. package/src/tasks/create/templates/Constellation/field/Date/index.jsx.mustache +20 -4
  5. package/src/tasks/create/templates/Constellation/field/DateTime/index.jsx.mustache +18 -3
  6. package/src/tasks/create/templates/Constellation/field/Decimal/index.jsx.mustache +19 -4
  7. package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.jsx.mustache +19 -4
  8. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.jsx.mustache +20 -4
  9. package/src/tasks/create/templates/Constellation/field/Integer/index.jsx.mustache +21 -4
  10. package/src/tasks/create/templates/Constellation/field/Picklist/index.jsx.mustache +25 -3
  11. package/src/tasks/create/templates/Constellation/field/Text/index.jsx.mustache +1 -3
  12. package/src/tasks/create/templates/Constellation/field/Text-Email/index.jsx.mustache +19 -3
  13. package/src/tasks/create/templates/Constellation/field/Text-Input/index.jsx.mustache +15 -3
  14. package/src/tasks/create/templates/Constellation/field/Text-Paragraph/index.jsx.mustache +15 -3
  15. package/src/tasks/create/templates/Constellation/field/Text-Phone/index.jsx.mustache +18 -3
  16. package/src/tasks/create/templates/Constellation/field/Text-URL/index.jsx.mustache +18 -3
  17. package/src/tasks/create/templates/Constellation/field/TimeOfDay/index.jsx.mustache +20 -4
  18. package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +1 -0
  19. package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.jsx.mustache +1 -1
  20. package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +0 -1
  21. package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.jsx.mustache +1 -1
  22. package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.jsx.mustache +1 -0
  23. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +1 -0
  24. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.jsx.mustache +1 -1
  25. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +2 -2
  26. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +1 -1
  27. package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +1 -3
  28. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +0 -1
  29. package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +0 -1
  30. package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +1 -2
  31. package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +0 -1
  32. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +0 -1
  33. package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +0 -2
  34. package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +0 -1
  35. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +1 -1
  36. package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +0 -1
  37. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +2 -3
  38. package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.jsx.mustache +1 -1
  39. package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +9 -9
  40. package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.jsx.mustache +1 -1
  41. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.jsx.mustache +1 -1
  42. package/tests/assets/components/SDK-React/create/custom-constellation/field/Pega_DXIL_MyTestText/index.jsx +1 -3
  43. package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +0 -1
  44. package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx +2 -2
  45. package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +41 -32
  46. package/tests/assets/components/SDK-React/create/override-sdk/field/Currency/Currency.tsx +1 -1
  47. package/tests/assets/components/SDK-React/create/override-sdk/field/Date/Date.tsx +1 -1
  48. package/tests/assets/components/SDK-React/create/override-sdk/field/DateTime/DateTime.tsx +1 -1
  49. package/tests/assets/components/SDK-React/create/override-sdk/field/Decimal/Decimal.tsx +1 -1
  50. package/tests/assets/components/SDK-React/create/override-sdk/field/Dropdown/Dropdown.tsx +17 -15
  51. package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +11 -9
  52. package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/RichText.tsx +5 -3
  53. package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/ScalarList.tsx +15 -6
  54. package/tests/assets/components/SDK-React/create/override-sdk/field/TextInput/TextInput.tsx +1 -1
  55. package/tests/assets/components/SDK-React/create/override-sdk/infra/Assignment/Assignment.tsx +19 -16
  56. package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  57. package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  58. package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +1 -1
  59. package/tests/assets/components/SDK-React/create/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
  60. package/tests/assets/components/SDK-React/create/override-sdk/template/AppShell/AppShell.tsx +1 -1
  61. package/tests/assets/components/SDK-React/create/override-sdk/template/DataReference/DataReference.tsx +16 -16
  62. package/tests/assets/components/SDK-React/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
  63. package/tests/assets/components/SDK-React/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  64. package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
  65. package/tests/assets/components/SDK-React/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -2
  66. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.jsx +15 -3
  67. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.jsx +19 -4
  68. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.jsx +20 -4
  69. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/index.jsx +18 -3
  70. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.jsx +19 -4
  71. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyEmail/index.jsx +19 -3
  72. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.jsx +21 -4
  73. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/index.jsx +15 -3
  74. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.jsx +20 -4
  75. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPhone/index.jsx +18 -3
  76. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.jsx +25 -3
  77. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyText/index.jsx +1 -3
  78. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.jsx +15 -3
  79. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/index.jsx +20 -4
  80. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyURL/index.jsx +18 -3
  81. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +1 -0
  82. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.jsx +1 -1
  83. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +2 -2
  84. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.jsx +1 -1
  85. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +0 -1
  86. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.jsx +1 -1
  87. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.jsx +1 -0
  88. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +1 -0
  89. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +1 -2
  90. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +1 -3
  91. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +0 -1
  92. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +1 -1
  93. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +0 -2
  94. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
  95. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +0 -1
  96. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +0 -1
  97. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
  98. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +0 -1
  99. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +0 -1
  100. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.jsx +1 -1
  101. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +9 -9
  102. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +2 -3
  103. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +1 -1
  104. package/tests/assets/components/SDK-React/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +1 -1
  105. package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +2 -2
  106. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +41 -32
  107. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx +1 -1
  108. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Date/Date.tsx +1 -1
  109. package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx +1 -1
  110. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Decimal/Decimal.tsx +1 -1
  111. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx +17 -15
  112. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +11 -9
  113. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/RichText.tsx +5 -3
  114. package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +15 -6
  115. package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx +1 -1
  116. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx +19 -16
  117. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  118. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  119. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +1 -1
  120. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
  121. package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx +1 -1
  122. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +16 -16
  123. package/tests/assets/components/SDK-React/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
  124. package/tests/assets/components/SDK-React/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  125. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
  126. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -2
  127. package/tests/functional/localCreateBuildAllDeleteAllCustom.test.js +1 -0
  128. package/tests/functional/localCreateBuildDeleteCustom.test.js +13 -0
  129. package/tests/functional/localCreateBuildDeleteOverride.test.js +1 -0
  130. package/tests/functional/localCreatePublishAllDeleteAllCustom.test.js +1 -2
  131. package/tests/functional/localCreatePublishAllDeleteAllOverride.test.js +1 -2
  132. package/tests/functional/localCreatePublishDeleteCustom.test.js +4 -3
  133. package/tests/functional/localCreatePublishDeleteOverride.test.js +2 -2
@@ -39,12 +39,22 @@ const PegaDxilMyDateTime = props => {
39
39
  additionalProps,
40
40
  displayMode,
41
41
  variant,
42
- hasSuggestions
42
+ hasSuggestions,
43
+ fieldMetadata,
44
+ enableAdditionalInformation
43
45
  } = props;
44
46
  let { formatter } = props;
45
47
  const pConn = getPConnect();
46
48
  const actions = pConn.getActionsApi();
47
49
  const propName = pConn.getStateProps().value;
50
+ const fieldDescription = fieldMetadata?.description;
51
+ const additionalInfo =
52
+ enableAdditionalInformation && fieldDescription
53
+ ? {
54
+ heading: label,
55
+ content: fieldDescription
56
+ }
57
+ : undefined;
48
58
 
49
59
  const environmentInfo = PCore.getEnvironmentInfo();
50
60
  const timezone = environmentInfo && environmentInfo.getTimeZone();
@@ -180,6 +190,7 @@ const PegaDxilMyDateTime = props => {
180
190
  label={label}
181
191
  labelHidden={hideLabel}
182
192
  info={validatemessage || helperText}
193
+ additionalInfo={additionalInfo}
183
194
  status={status}
184
195
  value={DateTimeFormatter.convertToTimezone(value, { timezone }) || undefined}
185
196
  withSeconds={withSeconds}
@@ -222,7 +233,9 @@ PegaDxilMyDateTime.defaultProps = {
222
233
  displayMode: null,
223
234
  variant: "inline",
224
235
  Format: "defaultDateTime",
225
- hasSuggestions: false
236
+ hasSuggestions: false,
237
+ fieldMetadata: {},
238
+ enableAdditionalInformation: false
226
239
  };
227
240
 
228
241
  PegaDxilMyDateTime.propTypes = {
@@ -247,7 +260,9 @@ PegaDxilMyDateTime.propTypes = {
247
260
  variant: PropTypes.string,
248
261
  formatter: PropTypes.string,
249
262
  Format: PropTypes.string,
250
- hasSuggestions: PropTypes.bool
263
+ hasSuggestions: PropTypes.bool,
264
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
265
+ enableAdditionalInformation: PropTypes.bool
251
266
  };
252
267
 
253
268
  export default PegaDxilMyDateTime;
@@ -30,7 +30,9 @@ const PegaDxilMyDecimal = props => {
30
30
  notation,
31
31
  currencyISOCode,
32
32
  isTableFormatter,
33
- hasSuggestions
33
+ hasSuggestions,
34
+ fieldMetadata,
35
+ enableAdditionalInformation
34
36
  } = props;
35
37
  let { showGroupSeparators } = props;
36
38
  let { currencyDisplay } = props;
@@ -38,6 +40,14 @@ const PegaDxilMyDecimal = props => {
38
40
  const actions = pConn.getActionsApi();
39
41
  const propName = pConn.getStateProps().value;
40
42
  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;
41
51
  const hasValueChange = useRef(false);
42
52
 
43
53
  let { readOnly, required, disabled } = props;
@@ -187,6 +197,7 @@ const PegaDxilMyDecimal = props => {
187
197
  numberOfDecimals={numberOfDecimals}
188
198
  showGroupSeparators={showGroupSeparators}
189
199
  data-testid={testId}
200
+ additionalInfo={additionalInfo}
190
201
  onChange={(enteredValue) => {
191
202
  if (hasSuggestions) {
192
203
  setStatus(undefined);
@@ -222,7 +233,7 @@ PegaDxilMyDecimal.defaultProps = {
222
233
  disabled: false,
223
234
  readOnly: false,
224
235
  required: false,
225
- testId: '',
236
+ testId: "",
226
237
  decimalPrecision: '',
227
238
  showGroupSeparators: false,
228
239
  displayMode: null,
@@ -236,7 +247,9 @@ PegaDxilMyDecimal.defaultProps = {
236
247
  currencyDisplay: 'symbol',
237
248
  currencyDecimalPrecision: 'auto',
238
249
  isTableFormatter: false,
239
- hasSuggestions: false
250
+ hasSuggestions: false,
251
+ fieldMetadata: {},
252
+ enableAdditionalInformation: false
240
253
  };
241
254
 
242
255
  PegaDxilMyDecimal.propTypes = {
@@ -264,7 +277,9 @@ PegaDxilMyDecimal.propTypes = {
264
277
  currencyDisplay: PropTypes.string,
265
278
  currencyDecimalPrecision: PropTypes.string,
266
279
  isTableFormatter: PropTypes.bool,
267
- hasSuggestions: PropTypes.bool
280
+ hasSuggestions: PropTypes.bool,
281
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
282
+ enableAdditionalInformation: PropTypes.bool
268
283
  };
269
284
 
270
285
  export default PegaDxilMyDecimal;
@@ -70,12 +70,23 @@ const PegaDxilMyEmail = props => {
70
70
  additionalProps,
71
71
  variant,
72
72
  isTableFormatter,
73
- hasSuggestions
73
+ hasSuggestions,
74
+ fieldMetadata,
75
+ enableAdditionalInformation
74
76
  } = props;
75
77
  const { formatter } = props;
76
78
  const pConn = getPConnect();
77
79
  const actions = pConn.getActionsApi();
78
80
  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
  const hasValueChange = useRef(false);
80
91
 
81
92
 
@@ -157,6 +168,7 @@ const PegaDxilMyEmail = props => {
157
168
  label={label}
158
169
  labelHidden={hideLabel}
159
170
  info={validatemessage || helperText}
171
+ additionalInfo={additionalInfo}
160
172
  value={inputValue}
161
173
  status={status}
162
174
  placeholder={placeholder}
@@ -205,7 +217,9 @@ PegaDxilMyEmail.defaultProps = {
205
217
  variant: 'inline',
206
218
  formatter: '',
207
219
  isTableFormatter: false,
208
- hasSuggestions: false
220
+ hasSuggestions: false,
221
+ fieldMetadata: {},
222
+ enableAdditionalInformation: false
209
223
  };
210
224
 
211
225
  PegaDxilMyEmail.propTypes = {
@@ -225,7 +239,9 @@ PegaDxilMyEmail.propTypes = {
225
239
  variant: PropTypes.string,
226
240
  formatter: PropTypes.string,
227
241
  isTableFormatter: PropTypes.bool,
228
- hasSuggestions: PropTypes.bool
242
+ hasSuggestions: PropTypes.bool,
243
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
244
+ enableAdditionalInformation: PropTypes.bool
229
245
  };
230
246
 
231
247
  export default PegaDxilMyEmail;
@@ -37,7 +37,9 @@ const PegaDxilMyInteger = props => {
37
37
  negative,
38
38
  notation,
39
39
  isTableFormatter,
40
- hasSuggestions
40
+ hasSuggestions,
41
+ fieldMetadata,
42
+ enableAdditionalInformation
41
43
  } = props;
42
44
  let { showGroupSeparators } = props;
43
45
  let { currencyDisplay } = props;
@@ -46,6 +48,15 @@ const PegaDxilMyInteger = props => {
46
48
  const propName = pConn.getStateProps().value;
47
49
  const [integerValue, setIntegerValue] = useState(value?.toString());
48
50
  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
  const hasValueChange = useRef(false);
50
61
 
51
62
 
@@ -207,6 +218,7 @@ const PegaDxilMyInteger = props => {
207
218
  label={label}
208
219
  labelHidden={hideLabel}
209
220
  info={validatemessage || helperText}
221
+ additionalInfo={additionalInfo}
210
222
  value={!integerValue ? sliderDefaultValue : Number(integerValue)}
211
223
  status={status}
212
224
  placeholder={placeholder}
@@ -234,6 +246,7 @@ const PegaDxilMyInteger = props => {
234
246
  label={label}
235
247
  labelHidden={hideLabel}
236
248
  info={validatemessage || helperText}
249
+ additionalInfo={additionalInfo}
237
250
  value={integerValue}
238
251
  status={status}
239
252
  placeholder={displayAs === 'input' ? placeholder : ''}
@@ -272,7 +285,7 @@ PegaDxilMyInteger.defaultProps = {
272
285
  disabled: false,
273
286
  readOnly: false,
274
287
  required: false,
275
- testId: '',
288
+ testId: "",
276
289
  showGroupSeparators: false,
277
290
  displayMode: null,
278
291
  displayAs: 'input',
@@ -292,7 +305,9 @@ PegaDxilMyInteger.defaultProps = {
292
305
  currencyDisplay: 'symbol',
293
306
  currencyDecimalPrecision: 'auto',
294
307
  isTableFormatter: false,
295
- hasSuggestions: false
308
+ hasSuggestions: false,
309
+ fieldMetadata: {},
310
+ enableAdditionalInformation: false
296
311
  };
297
312
 
298
313
  PegaDxilMyInteger.propTypes = {
@@ -327,7 +342,9 @@ PegaDxilMyInteger.propTypes = {
327
342
  currencyDisplay: PropTypes.string,
328
343
  currencyDecimalPrecision: PropTypes.string,
329
344
  isTableFormatter: PropTypes.bool,
330
- hasSuggestions: PropTypes.bool
345
+ hasSuggestions: PropTypes.bool,
346
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
347
+ enableAdditionalInformation: PropTypes.bool
331
348
  };
332
349
 
333
350
  export default PegaDxilMyInteger;
@@ -71,7 +71,8 @@ const PegaDxilMyParagraph = props => {
71
71
  additionalProps,
72
72
  variant,
73
73
  isTableFormatter,
74
- hasSuggestions
74
+ hasSuggestions,
75
+ enableAdditionalInformation
75
76
  } = props;
76
77
  const { formatter } = props;
77
78
  const pConn = getPConnect();
@@ -79,6 +80,7 @@ const PegaDxilMyParagraph = props => {
79
80
  const propName = pConn.getStateProps().value;
80
81
  const maxLength = fieldMetadata?.maxLength;
81
82
  const hasValueChange = useRef(false);
83
+ const fieldDescription = fieldMetadata?.description;
82
84
 
83
85
 
84
86
  // BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
@@ -183,6 +185,14 @@ const PegaDxilMyParagraph = props => {
183
185
  }
184
186
  }}
185
187
  onResolveSuggestion={onResolveSuggestionHandler}
188
+ {...(enableAdditionalInformation && fieldDescription
189
+ ? {
190
+ additionalInfo: {
191
+ heading: label,
192
+ content: fieldDescription
193
+ }
194
+ }
195
+ : {})}
186
196
  />
187
197
  </StyledPegaDxilMyParagraphWrapper>
188
198
  );
@@ -204,7 +214,8 @@ PegaDxilMyParagraph.defaultProps = {
204
214
  variant: 'inline',
205
215
  formatter: '',
206
216
  isTableFormatter: false,
207
- hasSuggestions: false
217
+ hasSuggestions: false,
218
+ enableAdditionalInformation: false
208
219
  };
209
220
 
210
221
  PegaDxilMyParagraph.propTypes = {
@@ -225,7 +236,8 @@ PegaDxilMyParagraph.propTypes = {
225
236
  variant: PropTypes.string,
226
237
  formatter: PropTypes.string,
227
238
  isTableFormatter: PropTypes.bool,
228
- hasSuggestions: PropTypes.bool
239
+ hasSuggestions: PropTypes.bool,
240
+ enableAdditionalInformation: PropTypes.bool
229
241
  };
230
242
 
231
243
  export default PegaDxilMyParagraph;
@@ -35,13 +35,24 @@ const PegaDxilMyPercentage = props => {
35
35
  variant,
36
36
  formatter,
37
37
  isTableFormatter,
38
- hasSuggestions
38
+ hasSuggestions,
39
+ fieldMetadata,
40
+ enableAdditionalInformation
39
41
  } = props;
40
42
  let { showGroupSeparators } = props;
41
43
  const pConn = getPConnect();
42
44
  const actions = pConn.getActionsApi();
43
45
  const propName = pConn.getStateProps().value;
44
46
  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
  const hasValueChange = useRef(false);
46
57
 
47
58
  let { readOnly, required, disabled } = props;
@@ -192,6 +203,7 @@ const PegaDxilMyPercentage = props => {
192
203
  label={label}
193
204
  labelHidden={hideLabel}
194
205
  info={validatemessage || helperText}
206
+ additionalInfo={additionalInfo}
195
207
  value={percentageValue}
196
208
  status={status}
197
209
  placeholder={placeholder}
@@ -237,7 +249,7 @@ PegaDxilMyPercentage.defaultProps = {
237
249
  disabled: false,
238
250
  readOnly: false,
239
251
  required: false,
240
- testId: '',
252
+ testId: "",
241
253
  decimalPrecision: '',
242
254
  showGroupSeparators: false,
243
255
  additionalProps: {},
@@ -246,7 +258,9 @@ PegaDxilMyPercentage.defaultProps = {
246
258
  currencyISOCode: 'USD',
247
259
  formatter: '',
248
260
  isTableFormatter: false,
249
- hasSuggestions: false
261
+ hasSuggestions: false,
262
+ fieldMetadata: {},
263
+ enableAdditionalInformation: false
250
264
  };
251
265
 
252
266
  PegaDxilMyPercentage.propTypes = {
@@ -269,7 +283,9 @@ PegaDxilMyPercentage.propTypes = {
269
283
  formatter: PropTypes.string,
270
284
  currencyISOCode: PropTypes.string,
271
285
  isTableFormatter: PropTypes.bool,
272
- hasSuggestions: PropTypes.bool
286
+ hasSuggestions: PropTypes.bool,
287
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
288
+ enableAdditionalInformation: PropTypes.bool
273
289
  };
274
290
 
275
291
  export default PegaDxilMyPercentage;
@@ -79,12 +79,15 @@ const PegaDxilMyPhone = props => {
79
79
  additionalProps,
80
80
  variant,
81
81
  isTableFormatter,
82
- hasSuggestions
82
+ hasSuggestions,
83
+ fieldMetadata,
84
+ enableAdditionalInformation
83
85
  } = props;
84
86
  const { formatter } = props;
85
87
  const pConn = getPConnect();
86
88
  const actions = pConn.getActionsApi();
87
89
  const propName = pConn.getStateProps().value;
90
+ const fieldDescription = fieldMetadata?.description;
88
91
  const hasValueChange = useRef(false);
89
92
 
90
93
  let callingCodesList = [];
@@ -216,6 +219,14 @@ const PegaDxilMyPhone = props => {
216
219
  }
217
220
  }}
218
221
  onResolveSuggestion={onResolveSuggestionHandler}
222
+ {...(enableAdditionalInformation && fieldDescription
223
+ ? {
224
+ additionalInfo: {
225
+ heading: label,
226
+ content: fieldDescription
227
+ }
228
+ }
229
+ : {})}
219
230
  />
220
231
  </StyledPegaDxilMyPhoneWrapper>
221
232
  );
@@ -238,7 +249,9 @@ PegaDxilMyPhone.defaultProps = {
238
249
  variant: 'inline',
239
250
  formatter: '',
240
251
  isTableFormatter: false,
241
- hasSuggestions: false
252
+ hasSuggestions: false,
253
+ fieldMetadata: {},
254
+ enableAdditionalInformation: false
242
255
  };
243
256
 
244
257
  PegaDxilMyPhone.propTypes = {
@@ -260,7 +273,9 @@ PegaDxilMyPhone.propTypes = {
260
273
  variant: PropTypes.string,
261
274
  formatter: PropTypes.string,
262
275
  isTableFormatter: PropTypes.bool,
263
- hasSuggestions: PropTypes.bool
276
+ hasSuggestions: PropTypes.bool,
277
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
278
+ enableAdditionalInformation: PropTypes.bool
264
279
  };
265
280
 
266
281
  export default PegaDxilMyPhone;
@@ -96,7 +96,9 @@ const PegaDxilMyPicklist = props => {
96
96
  variant,
97
97
  fieldMetadata,
98
98
  isTableFormatter,
99
- hasSuggestions
99
+ hasSuggestions,
100
+ enableAdditionalInformation,
101
+ additionalInfo
100
102
  } = props;
101
103
  const { formatter } = props;
102
104
  const pConnect = getPConnect();
@@ -105,6 +107,8 @@ const PegaDxilMyPicklist = props => {
105
107
  const className = pConnect.getCaseInfo().getClassName();
106
108
  const refName = propName?.slice(propName.lastIndexOf('.') + 1);
107
109
 
110
+ const fieldDescription = fieldMetadata?.description;
111
+
108
112
  let { readOnly, required, disabled } = props;
109
113
  [readOnly, required, disabled] = [readOnly, required, disabled].map(
110
114
  (prop) => prop === true || (typeof prop === 'string' && prop === 'true')
@@ -262,6 +266,12 @@ const PegaDxilMyPicklist = props => {
262
266
  suggestionsHandler(accepted, pConnect, setStatus);
263
267
  };
264
268
 
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
  return (
266
276
  <StyledPegaDxilMyPicklistWrapper>
267
277
  <Select
@@ -290,6 +300,11 @@ const PegaDxilMyPicklist = props => {
290
300
  pConnect.getValidationApi().validate(event.target.value);
291
301
  }}
292
302
  onResolveSuggestion={onResolveSuggestionHandler}
303
+ {...(additionalInfo || (enableAdditionalInformation && fieldDescription)
304
+ ? {
305
+ additionalInfo: additionalInfoProp
306
+ }
307
+ : {})}
293
308
  >
294
309
  {items}
295
310
  </Select>
@@ -316,7 +331,9 @@ PegaDxilMyPicklist.defaultProps = {
316
331
  variant: 'inline',
317
332
  formatter: '',
318
333
  isTableFormatter: false,
319
- hasSuggestions: false
334
+ hasSuggestions: false,
335
+ enableAdditionalInformation: false,
336
+ additionalInfo: null
320
337
  };
321
338
 
322
339
  PegaDxilMyPicklist.propTypes = {
@@ -345,7 +362,12 @@ PegaDxilMyPicklist.propTypes = {
345
362
  variant: PropTypes.string,
346
363
  formatter: PropTypes.string,
347
364
  isTableFormatter: PropTypes.bool,
348
- hasSuggestions: PropTypes.bool
365
+ hasSuggestions: PropTypes.bool,
366
+ enableAdditionalInformation: PropTypes.bool,
367
+ additionalInfo: PropTypes.shape({
368
+ heading: PropTypes.string,
369
+ content: PropTypes.string
370
+ })
349
371
  };
350
372
 
351
373
  export default PegaDxilMyPicklist;
@@ -24,9 +24,9 @@ const PegaDxilMyText = props => {
24
24
  <StyledPegaDxilMyTextWrapper>
25
25
  <Input
26
26
  type='text'
27
+ value={value}
27
28
  label={label}
28
29
  labelHidden={hideLabel}
29
- value={value}
30
30
  placeholder={placeholder}
31
31
  disabled={disabled}
32
32
  readOnly={readOnly}
@@ -40,7 +40,6 @@ const PegaDxilMyText = props => {
40
40
 
41
41
  PegaDxilMyText.defaultProps = {
42
42
  value: '',
43
- hideLabel: false,
44
43
  placeholder: '',
45
44
  disabled: false,
46
45
  readOnly: false,
@@ -50,7 +49,6 @@ PegaDxilMyText.defaultProps = {
50
49
 
51
50
  PegaDxilMyText.propTypes = {
52
51
  label: PropTypes.string,
53
- hideLabel: PropTypes.bool,
54
52
  value: PropTypes.string,
55
53
  placeholder: PropTypes.string,
56
54
  getPConnect: PropTypes.func.isRequired,
@@ -73,13 +73,15 @@ const PegaDxilMyTextInput = props => {
73
73
  displayAsStatus,
74
74
  variant,
75
75
  hasSuggestions,
76
- isTableFormatter
76
+ isTableFormatter,
77
+ enableAdditionalInformation
77
78
  } = props;
78
79
  const { formatter } = props;
79
80
  const pConn = getPConnect();
80
81
  const actions = pConn.getActionsApi();
81
82
  const propName = pConn.getStateProps().value;
82
83
  const maxLength = fieldMetadata?.maxLength;
84
+ const fieldDescription = fieldMetadata?.description;
83
85
  const hasValueChange = useRef(false);
84
86
 
85
87
  let { value, readOnly, required, disabled } = props;
@@ -189,6 +191,14 @@ const PegaDxilMyTextInput = props => {
189
191
  }
190
192
  }}
191
193
  onResolveSuggestion={onResolveSuggestionHandler}
194
+ {...(enableAdditionalInformation && fieldDescription
195
+ ? {
196
+ additionalInfo: {
197
+ heading: label,
198
+ content: fieldDescription
199
+ }
200
+ }
201
+ : {})}
192
202
  />
193
203
  </StyledPegaDxilMyTextInputWrapper>
194
204
  );
@@ -211,7 +221,8 @@ PegaDxilMyTextInput.defaultProps = {
211
221
  variant: 'inline',
212
222
  formatter: '',
213
223
  isTableFormatter: false,
214
- hasSuggestions: false
224
+ hasSuggestions: false,
225
+ enableAdditionalInformation: false
215
226
  };
216
227
 
217
228
  PegaDxilMyTextInput.propTypes = {
@@ -233,7 +244,8 @@ PegaDxilMyTextInput.propTypes = {
233
244
  variant: PropTypes.string,
234
245
  formatter: PropTypes.string,
235
246
  isTableFormatter: PropTypes.bool,
236
- hasSuggestions: PropTypes.bool
247
+ hasSuggestions: PropTypes.bool,
248
+ enableAdditionalInformation: PropTypes.bool
237
249
  };
238
250
 
239
251
  export default PegaDxilMyTextInput;
@@ -31,13 +31,15 @@ const PegaDxilMyTimeOfDay = props => {
31
31
  additionalProps,
32
32
  displayMode,
33
33
  variant,
34
- hasSuggestions
34
+ hasSuggestions,
35
+ fieldMetadata,
36
+ enableAdditionalInformation
35
37
  } = props;
36
38
  let { formatter } = props;
37
39
  const pConn = getPConnect();
38
40
  const actions = pConn.getActionsApi();
39
41
  const propName = pConn.getStateProps().value;
40
-
42
+ const fieldDescription = fieldMetadata?.description;
41
43
 
42
44
  // BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
43
45
  let { readOnly, required, disabled } = props;
@@ -167,6 +169,14 @@ const PegaDxilMyTimeOfDay = props => {
167
169
  onChange={handleChange}
168
170
  onBlur={handleBlur}
169
171
  onResolveSuggestion={onResolveSuggestionHandler}
172
+ {...(enableAdditionalInformation && fieldDescription
173
+ ? {
174
+ additionalInfo: {
175
+ heading: label,
176
+ content: fieldDescription
177
+ }
178
+ }
179
+ : {})}
170
180
  />
171
181
  </StyledPegaDxilMyTimeOfDayWrapper>
172
182
  );
@@ -187,7 +197,10 @@ PegaDxilMyTimeOfDay.defaultProps = {
187
197
  additionalProps: {},
188
198
  displayMode: null,
189
199
  variant: "inline",
190
- formatter:"defaultTime"
200
+ formatter:"defaultTime",
201
+ hasSuggestions: false,
202
+ fieldMetadata: {},
203
+ enableAdditionalInformation: false
191
204
  };
192
205
 
193
206
  PegaDxilMyTimeOfDay.propTypes = {
@@ -207,7 +220,10 @@ PegaDxilMyTimeOfDay.propTypes = {
207
220
  additionalProps: PropTypes.objectOf(PropTypes.any),
208
221
  displayMode: PropTypes.string,
209
222
  variant: PropTypes.string,
210
- formatter : PropTypes.string
223
+ formatter : PropTypes.string,
224
+ hasSuggestions: PropTypes.bool,
225
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
226
+ enableAdditionalInformation: PropTypes.bool
211
227
  };
212
228
 
213
229
  export default PegaDxilMyTimeOfDay;
@@ -38,12 +38,15 @@ const PegaDxilMyUrl = props => {
38
38
  propUrlLabel,
39
39
  urlLabelSelection,
40
40
  tableDisplayAs,
41
- hasSuggestions
41
+ hasSuggestions,
42
+ fieldMetadata,
43
+ enableAdditionalInformation
42
44
  } = props;
43
45
  const { formatter } = props;
44
46
  const pConn = getPConnect();
45
47
  const actions = pConn.getActionsApi();
46
48
  const propName = pConn.getStateProps().value;
49
+ const fieldDescription = fieldMetadata?.description;
47
50
  const hasValueChange = useRef(false);
48
51
 
49
52
 
@@ -166,6 +169,14 @@ const PegaDxilMyUrl = props => {
166
169
  }}
167
170
  onFocus={actions.onFocus}
168
171
  onResolveSuggestion={onResolveSuggestionHandler}
172
+ {...(enableAdditionalInformation && fieldDescription
173
+ ? {
174
+ additionalInfo: {
175
+ heading: label,
176
+ content: fieldDescription
177
+ }
178
+ }
179
+ : {})}
169
180
  />
170
181
  </StyledPegaDxilMyUrlWrapper>
171
182
  );
@@ -196,7 +207,9 @@ PegaDxilMyUrl.defaultProps = {
196
207
  propUrlLabel: '',
197
208
  urlLabelSelection: 'constant',
198
209
  tableDisplayAs: 'link',
199
- hasSuggestions: false
210
+ hasSuggestions: false,
211
+ fieldMetadata: {},
212
+ enableAdditionalInformation: false
200
213
  };
201
214
 
202
215
  PegaDxilMyUrl.propTypes = {
@@ -226,7 +239,9 @@ PegaDxilMyUrl.propTypes = {
226
239
  propUrlLabel: PropTypes.string,
227
240
  urlLabelSelection: PropTypes.string,
228
241
  tableDisplayAs: PropTypes.string,
229
- hasSuggestions: PropTypes.bool
242
+ hasSuggestions: PropTypes.bool,
243
+ fieldMetadata: PropTypes.objectOf(PropTypes.any),
244
+ enableAdditionalInformation: PropTypes.bool
230
245
  };
231
246
 
232
247
  export default PegaDxilMyUrl;
@@ -84,6 +84,7 @@ export default function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
84
84
  };
85
85
 
86
86
  const handleBlur = event => {
87
+ // @ts-ignore
87
88
  thePConn.getValidationApi().validate(event.target.checked, ''); // 2nd arg empty string until typedef marked correctly as optional
88
89
  };
89
90
 
@@ -66,4 +66,4 @@ export const BasePegaDxilMyCurrency = () => {
66
66
  <PegaDxilMyCurrency {...props} />
67
67
  </>
68
68
  );
69
- };
69
+ };