@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.
- package/package.json +1 -1
- package/src/tasks/bundle/builderAngular/webpack.config.js +1 -2
- package/src/tasks/create/templates/Constellation/field/Boolean/index.jsx.mustache +15 -3
- package/src/tasks/create/templates/Constellation/field/Date/index.jsx.mustache +20 -4
- package/src/tasks/create/templates/Constellation/field/DateTime/index.jsx.mustache +18 -3
- package/src/tasks/create/templates/Constellation/field/Decimal/index.jsx.mustache +19 -4
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.jsx.mustache +19 -4
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.jsx.mustache +20 -4
- package/src/tasks/create/templates/Constellation/field/Integer/index.jsx.mustache +21 -4
- package/src/tasks/create/templates/Constellation/field/Picklist/index.jsx.mustache +25 -3
- package/src/tasks/create/templates/Constellation/field/Text/index.jsx.mustache +1 -3
- package/src/tasks/create/templates/Constellation/field/Text-Email/index.jsx.mustache +19 -3
- package/src/tasks/create/templates/Constellation/field/Text-Input/index.jsx.mustache +15 -3
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/index.jsx.mustache +15 -3
- package/src/tasks/create/templates/Constellation/field/Text-Phone/index.jsx.mustache +18 -3
- package/src/tasks/create/templates/Constellation/field/Text-URL/index.jsx.mustache +18 -3
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/index.jsx.mustache +20 -4
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.jsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +1 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +1 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +2 -3
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +9 -9
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.jsx.mustache +1 -1
- package/tests/assets/components/SDK-React/create/custom-constellation/field/Pega_DXIL_MyTestText/index.jsx +1 -3
- package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +0 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx +2 -2
- package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +41 -32
- package/tests/assets/components/SDK-React/create/override-sdk/field/Currency/Currency.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/Date/Date.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/DateTime/DateTime.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/Decimal/Decimal.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/Dropdown/Dropdown.tsx +17 -15
- package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +11 -9
- package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/RichText.tsx +5 -3
- package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/ScalarList.tsx +15 -6
- package/tests/assets/components/SDK-React/create/override-sdk/field/TextInput/TextInput.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/Assignment/Assignment.tsx +19 -16
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/AppShell/AppShell.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/DataReference/DataReference.tsx +16 -16
- package/tests/assets/components/SDK-React/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -2
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.jsx +15 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.jsx +19 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.jsx +20 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/index.jsx +18 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.jsx +19 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyEmail/index.jsx +19 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.jsx +21 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/index.jsx +15 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.jsx +20 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPhone/index.jsx +18 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.jsx +25 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyText/index.jsx +1 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.jsx +15 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/index.jsx +20 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyURL/index.jsx +18 -3
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +2 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.jsx +1 -0
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +1 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +1 -3
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +0 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +9 -9
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +2 -3
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +2 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +41 -32
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Date/Date.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Decimal/Decimal.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx +17 -15
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +11 -9
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/RichText.tsx +5 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +15 -6
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx +19 -16
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +16 -16
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -2
- package/tests/functional/localCreateBuildAllDeleteAllCustom.test.js +1 -0
- package/tests/functional/localCreateBuildDeleteCustom.test.js +13 -0
- package/tests/functional/localCreateBuildDeleteOverride.test.js +1 -0
- package/tests/functional/localCreatePublishAllDeleteAllCustom.test.js +1 -2
- package/tests/functional/localCreatePublishAllDeleteAllOverride.test.js +1 -2
- package/tests/functional/localCreatePublishDeleteCustom.test.js +4 -3
- package/tests/functional/localCreatePublishDeleteOverride.test.js +2 -2
package/package.json
CHANGED
|
@@ -29,12 +29,21 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
29
29
|
displayMode,
|
|
30
30
|
variant,
|
|
31
31
|
trueLabel,
|
|
32
|
-
falseLabel
|
|
32
|
+
falseLabel,
|
|
33
|
+
fieldMetadata
|
|
33
34
|
} = props;
|
|
34
35
|
const pConn = getPConnect();
|
|
35
36
|
const actions = pConn.getActionsApi();
|
|
36
37
|
const propName = pConn.getStateProps().value;
|
|
37
38
|
|
|
39
|
+
const fieldAdditionalInfo = fieldMetadata?.additionalInformation;
|
|
40
|
+
const additionalInfo = fieldAdditionalInfo
|
|
41
|
+
? {
|
|
42
|
+
heading: caption,
|
|
43
|
+
content: fieldAdditionalInfo
|
|
44
|
+
}
|
|
45
|
+
: undefined;
|
|
46
|
+
|
|
38
47
|
let { readOnly, required, disabled } = props;
|
|
39
48
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
40
49
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
@@ -62,6 +71,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
62
71
|
pConn.getValidationApi().validate(event.target.checked);
|
|
63
72
|
}}
|
|
64
73
|
data-testid={testId}
|
|
74
|
+
additionalInfo={additionalInfo}
|
|
65
75
|
/>
|
|
66
76
|
);
|
|
67
77
|
|
|
@@ -144,7 +154,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
144
154
|
variant: 'inline',
|
|
145
155
|
displayValue: 'Yes/No',
|
|
146
156
|
trueLabel: '',
|
|
147
|
-
falseLabel: ''
|
|
157
|
+
falseLabel: '',
|
|
158
|
+
fieldMetadata: {}
|
|
148
159
|
};
|
|
149
160
|
|
|
150
161
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -164,7 +175,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
164
175
|
variant: PropTypes.string,
|
|
165
176
|
displayValue: PropTypes.string,
|
|
166
177
|
trueLabel: PropTypes.string,
|
|
167
|
-
falseLabel: PropTypes.string
|
|
178
|
+
falseLabel: PropTypes.string,
|
|
179
|
+
fieldMetadata: PropTypes.objectOf(PropTypes.any)
|
|
168
180
|
};
|
|
169
181
|
|
|
170
182
|
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -37,7 +37,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
37
37
|
additionalProps,
|
|
38
38
|
displayMode,
|
|
39
39
|
variant,
|
|
40
|
-
hasSuggestions
|
|
40
|
+
hasSuggestions,
|
|
41
|
+
fieldMetadata,
|
|
42
|
+
enableAdditionalInformation
|
|
41
43
|
} = props;
|
|
42
44
|
|
|
43
45
|
let {formatter} = props;
|
|
@@ -181,6 +183,15 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
181
183
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
182
184
|
);
|
|
183
185
|
} else {
|
|
186
|
+
const fieldDescription = fieldMetadata?.description;
|
|
187
|
+
const additionalInfo =
|
|
188
|
+
enableAdditionalInformation && fieldDescription
|
|
189
|
+
? {
|
|
190
|
+
heading: label,
|
|
191
|
+
content: fieldDescription
|
|
192
|
+
}
|
|
193
|
+
: undefined;
|
|
194
|
+
|
|
184
195
|
dateComponent = (
|
|
185
196
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
186
197
|
<DateInput
|
|
@@ -188,6 +199,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
188
199
|
label={label}
|
|
189
200
|
labelHidden={hideLabel}
|
|
190
201
|
info={validatemessage || helperText}
|
|
202
|
+
additionalInfo={additionalInfo}
|
|
191
203
|
status={status}
|
|
192
204
|
value={value || undefined}
|
|
193
205
|
disabled={disabled}
|
|
@@ -221,13 +233,15 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
221
233
|
showWeekNumber: false,
|
|
222
234
|
nextYearRange: "",
|
|
223
235
|
previousYearRange: "",
|
|
224
|
-
testId:
|
|
236
|
+
testId: "",
|
|
225
237
|
showAsFormattedText: false,
|
|
226
238
|
additionalProps: {},
|
|
227
239
|
displayMode: null,
|
|
228
240
|
variant: "inline",
|
|
229
241
|
formatter: "defaultDate",
|
|
230
|
-
hasSuggestions: false
|
|
242
|
+
hasSuggestions: false,
|
|
243
|
+
fieldMetadata: {},
|
|
244
|
+
enableAdditionalInformation: false
|
|
231
245
|
};
|
|
232
246
|
|
|
233
247
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -249,7 +263,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
249
263
|
displayMode: PropTypes.string,
|
|
250
264
|
variant: PropTypes.string,
|
|
251
265
|
formatter: PropTypes.string,
|
|
252
|
-
hasSuggestions: PropTypes.bool
|
|
266
|
+
hasSuggestions: PropTypes.bool,
|
|
267
|
+
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
268
|
+
enableAdditionalInformation: PropTypes.bool
|
|
253
269
|
};
|
|
254
270
|
|
|
255
271
|
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -39,12 +39,22 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -247,7 +260,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|
|
@@ -30,7 +30,9 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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;
|
|
@@ -190,6 +200,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
190
200
|
numberOfDecimals={numberOfDecimals}
|
|
191
201
|
showGroupSeparators={showGroupSeparators}
|
|
192
202
|
data-testid={testId}
|
|
203
|
+
additionalInfo={additionalInfo}
|
|
193
204
|
onChange={(enteredValue) => {
|
|
194
205
|
if (hasSuggestions) {
|
|
195
206
|
setStatus(undefined);
|
|
@@ -225,7 +236,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
225
236
|
disabled: false,
|
|
226
237
|
readOnly: false,
|
|
227
238
|
required: false,
|
|
228
|
-
testId:
|
|
239
|
+
testId: "",
|
|
229
240
|
decimalPrecision: '',
|
|
230
241
|
showGroupSeparators: false,
|
|
231
242
|
displayMode: null,
|
|
@@ -239,7 +250,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
239
250
|
currencyDisplay: 'symbol',
|
|
240
251
|
currencyDecimalPrecision: 'auto',
|
|
241
252
|
isTableFormatter: false,
|
|
242
|
-
hasSuggestions: false
|
|
253
|
+
hasSuggestions: false,
|
|
254
|
+
fieldMetadata: {},
|
|
255
|
+
enableAdditionalInformation: false
|
|
243
256
|
};
|
|
244
257
|
|
|
245
258
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -267,7 +280,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
267
280
|
currencyDisplay: PropTypes.string,
|
|
268
281
|
currencyDecimalPrecision: PropTypes.string,
|
|
269
282
|
isTableFormatter: PropTypes.bool,
|
|
270
|
-
hasSuggestions: PropTypes.bool
|
|
283
|
+
hasSuggestions: PropTypes.bool,
|
|
284
|
+
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
285
|
+
enableAdditionalInformation: PropTypes.bool
|
|
271
286
|
};
|
|
272
287
|
|
|
273
288
|
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -46,13 +46,23 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
46
46
|
negative,
|
|
47
47
|
notation,
|
|
48
48
|
isTableFormatter,
|
|
49
|
-
hasSuggestions
|
|
49
|
+
hasSuggestions,
|
|
50
|
+
fieldMetadata,
|
|
51
|
+
enableAdditionalInformation
|
|
50
52
|
} = props;
|
|
51
53
|
let { currencyDisplay } = props;
|
|
52
54
|
const pConn = getPConnect();
|
|
53
55
|
const actions = pConn.getActionsApi();
|
|
54
56
|
const propName = pConn.getStateProps().value;
|
|
55
57
|
const [currencyValue, setCurrencyValue] = useState(() => formatValue(value));
|
|
58
|
+
const fieldDescription = fieldMetadata?.description;
|
|
59
|
+
const additionalInfo =
|
|
60
|
+
enableAdditionalInformation && fieldDescription
|
|
61
|
+
? {
|
|
62
|
+
heading: label,
|
|
63
|
+
content: fieldDescription
|
|
64
|
+
}
|
|
65
|
+
: undefined;
|
|
56
66
|
|
|
57
67
|
let { readOnly, required, disabled } = props;
|
|
58
68
|
|
|
@@ -214,6 +224,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
214
224
|
readOnly={readOnly}
|
|
215
225
|
required={required}
|
|
216
226
|
data-testid={testId}
|
|
227
|
+
additionalInfo={additionalInfo}
|
|
217
228
|
onChange={(enteredValue) => {
|
|
218
229
|
if (hasSuggestions) {
|
|
219
230
|
setStatus(undefined);
|
|
@@ -251,7 +262,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
251
262
|
allowDecimals: true,
|
|
252
263
|
currencyISOCode: 'USD',
|
|
253
264
|
isoCodeSelection: 'constant',
|
|
254
|
-
testId:
|
|
265
|
+
testId: "",
|
|
255
266
|
displayMode: null,
|
|
256
267
|
additionalProps: {},
|
|
257
268
|
variant: 'inline',
|
|
@@ -263,7 +274,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
263
274
|
currencyDecimalPrecision: 'auto',
|
|
264
275
|
isTableFormatter: false,
|
|
265
276
|
alwaysShowISOCode: false,
|
|
266
|
-
hasSuggestions: false
|
|
277
|
+
hasSuggestions: false,
|
|
278
|
+
fieldMetadata: {},
|
|
279
|
+
enableAdditionalInformation: false
|
|
267
280
|
};
|
|
268
281
|
|
|
269
282
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -293,7 +306,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
293
306
|
currencyDecimalPrecision: PropTypes.string,
|
|
294
307
|
isTableFormatter: PropTypes.bool,
|
|
295
308
|
alwaysShowISOCode: PropTypes.bool,
|
|
296
|
-
hasSuggestions: PropTypes.bool
|
|
309
|
+
hasSuggestions: PropTypes.bool,
|
|
310
|
+
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
311
|
+
enableAdditionalInformation: PropTypes.bool
|
|
297
312
|
};
|
|
298
313
|
|
|
299
314
|
export default {{COMPONENT_CLASS_NAME}};
|
package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.jsx.mustache
CHANGED
|
@@ -35,13 +35,24 @@ const {{COMPONENT_CLASS_NAME}} = 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;
|
|
@@ -198,6 +209,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
198
209
|
label={label}
|
|
199
210
|
labelHidden={hideLabel}
|
|
200
211
|
info={validatemessage || helperText}
|
|
212
|
+
additionalInfo={additionalInfo}
|
|
201
213
|
value={percentageValue}
|
|
202
214
|
status={status}
|
|
203
215
|
placeholder={placeholder}
|
|
@@ -243,7 +255,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
243
255
|
disabled: false,
|
|
244
256
|
readOnly: false,
|
|
245
257
|
required: false,
|
|
246
|
-
testId:
|
|
258
|
+
testId: "",
|
|
247
259
|
decimalPrecision: '',
|
|
248
260
|
showGroupSeparators: false,
|
|
249
261
|
additionalProps: {},
|
|
@@ -252,7 +264,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
252
264
|
currencyISOCode: 'USD',
|
|
253
265
|
formatter: '',
|
|
254
266
|
isTableFormatter: false,
|
|
255
|
-
hasSuggestions: false
|
|
267
|
+
hasSuggestions: false,
|
|
268
|
+
fieldMetadata: {},
|
|
269
|
+
enableAdditionalInformation: false
|
|
256
270
|
};
|
|
257
271
|
|
|
258
272
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -275,7 +289,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
275
289
|
formatter: PropTypes.string,
|
|
276
290
|
currencyISOCode: PropTypes.string,
|
|
277
291
|
isTableFormatter: PropTypes.bool,
|
|
278
|
-
hasSuggestions: PropTypes.bool
|
|
292
|
+
hasSuggestions: PropTypes.bool,
|
|
293
|
+
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
294
|
+
enableAdditionalInformation: PropTypes.bool
|
|
279
295
|
};
|
|
280
296
|
|
|
281
297
|
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -37,7 +37,9 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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
|
|
|
@@ -210,6 +221,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
210
221
|
label={label}
|
|
211
222
|
labelHidden={hideLabel}
|
|
212
223
|
info={validatemessage || helperText}
|
|
224
|
+
additionalInfo={additionalInfo}
|
|
213
225
|
value={!integerValue ? sliderDefaultValue : Number(integerValue)}
|
|
214
226
|
status={status}
|
|
215
227
|
placeholder={placeholder}
|
|
@@ -237,6 +249,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
237
249
|
label={label}
|
|
238
250
|
labelHidden={hideLabel}
|
|
239
251
|
info={validatemessage || helperText}
|
|
252
|
+
additionalInfo={additionalInfo}
|
|
240
253
|
value={integerValue}
|
|
241
254
|
status={status}
|
|
242
255
|
placeholder={displayAs === 'input' ? placeholder : ''}
|
|
@@ -275,7 +288,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
275
288
|
disabled: false,
|
|
276
289
|
readOnly: false,
|
|
277
290
|
required: false,
|
|
278
|
-
testId:
|
|
291
|
+
testId: "",
|
|
279
292
|
showGroupSeparators: false,
|
|
280
293
|
displayMode: null,
|
|
281
294
|
displayAs: 'input',
|
|
@@ -295,7 +308,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
295
308
|
currencyDisplay: 'symbol',
|
|
296
309
|
currencyDecimalPrecision: 'auto',
|
|
297
310
|
isTableFormatter: false,
|
|
298
|
-
hasSuggestions: false
|
|
311
|
+
hasSuggestions: false,
|
|
312
|
+
fieldMetadata: {},
|
|
313
|
+
enableAdditionalInformation: false
|
|
299
314
|
};
|
|
300
315
|
|
|
301
316
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -330,7 +345,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
330
345
|
currencyDisplay: PropTypes.string,
|
|
331
346
|
currencyDecimalPrecision: PropTypes.string,
|
|
332
347
|
isTableFormatter: PropTypes.bool,
|
|
333
|
-
hasSuggestions: PropTypes.bool
|
|
348
|
+
hasSuggestions: PropTypes.bool,
|
|
349
|
+
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
350
|
+
enableAdditionalInformation: PropTypes.bool
|
|
334
351
|
};
|
|
335
352
|
|
|
336
353
|
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -96,7 +96,9 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
267
277
|
<Select
|
|
@@ -290,6 +300,11 @@ const {{COMPONENT_CLASS_NAME}} = 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 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -345,7 +362,12 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|
|
@@ -24,9 +24,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
24
24
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
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 {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
40
40
|
|
|
41
41
|
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
42
42
|
value: '',
|
|
43
|
-
hideLabel: false,
|
|
44
43
|
placeholder: '',
|
|
45
44
|
disabled: false,
|
|
46
45
|
readOnly: false,
|
|
@@ -50,7 +49,6 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
50
49
|
|
|
51
50
|
{{COMPONENT_CLASS_NAME}}.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,
|
|
@@ -70,12 +70,23 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -225,7 +239,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|
|
@@ -73,13 +73,15 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
194
204
|
);
|
|
@@ -211,7 +221,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -233,7 +244,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|