@pega/dx-component-builder-sdk 8.23.18 → 23.1.11
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/src/tasks/publish-all/helper.js +2 -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
|
@@ -71,7 +71,8 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
188
198
|
);
|
|
@@ -204,7 +214,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -225,7 +236,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|
|
@@ -79,12 +79,15 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
221
232
|
);
|
|
@@ -238,7 +249,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -260,7 +273,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|
|
@@ -38,12 +38,15 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
171
182
|
);
|
|
@@ -196,7 +207,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -226,7 +239,9 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|
|
@@ -31,13 +31,15 @@ const {{COMPONENT_CLASS_NAME}} = 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 {{COMPONENT_CLASS_NAME}} = 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
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
172
182
|
);
|
|
@@ -187,7 +197,10 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
@@ -207,7 +220,10 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
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 {{COMPONENT_CLASS_NAME}};
|
|
@@ -84,6 +84,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
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
|
|
|
@@ -6,6 +6,7 @@ import { format } from "@pega/react-sdk-components/lib/components/helpers/format
|
|
|
6
6
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
10
11
|
|
|
11
12
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -6,6 +6,7 @@ import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-compo
|
|
|
6
6
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
10
11
|
|
|
11
12
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -44,7 +45,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
44
45
|
|
|
45
46
|
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
48
49
|
|
|
49
50
|
if (readOnly) {
|
|
50
51
|
readOnlyProp = { readOnly: true };
|
|
@@ -128,4 +129,3 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
128
129
|
);
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
|
|
@@ -5,6 +5,7 @@ import { TextField } from '@material-ui/core';
|
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
6
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
9
10
|
|
|
10
11
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -101,4 +102,3 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
101
102
|
);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
|
|
@@ -4,6 +4,7 @@ import { TextField } from '@material-ui/core';
|
|
|
4
4
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
9
|
|
|
9
10
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -56,8 +57,6 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
function intOnChange(event) {
|
|
59
|
-
// console.log(`Integer intOnChange inValue: ${event.target.value}`);
|
|
60
|
-
|
|
61
60
|
// Disallow "." and "," (separators) since this is an integer field
|
|
62
61
|
// Mimics Pega Integer behavior (where separator characters are "eaten" if they're typed)
|
|
63
62
|
const disallowedChars = ['.', ','];
|
|
@@ -97,4 +96,3 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
97
96
|
);
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
|
|
@@ -13,6 +13,7 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
// Duplicated runtime code from React SDK
|
|
17
18
|
|
|
18
19
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
@@ -87,5 +88,3 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
87
88
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
88
89
|
);
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
-
|
|
@@ -3,7 +3,6 @@ import MuiPhoneNumber from 'material-ui-phone-number';
|
|
|
3
3
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
7
|
|
|
9
8
|
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
@@ -116,4 +115,3 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
116
115
|
);
|
|
117
116
|
}
|
|
118
117
|
|
|
119
|
-
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
2
3
|
import { KeyboardTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
4
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
5
|
import dayjs from 'dayjs';
|
|
@@ -103,4 +104,3 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
103
104
|
);
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
|
|
@@ -3,7 +3,6 @@ import Grid from "@material-ui/core/Grid";
|
|
|
3
3
|
import createPConnectComponent from "@pega/react-sdk-components/lib/bridge/react_pconnect";
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
8
7
|
|
|
9
8
|
// Can't use PConnProps until getPConnect().getChildren() types are ok
|
|
@@ -3,7 +3,6 @@ import Grid from "@material-ui/core/Grid";
|
|
|
3
3
|
import createPConnectComponent from "@pega/react-sdk-components/lib/bridge/react_pconnect";
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
8
7
|
|
|
9
8
|
// Can't use PConnProps until getPConnect().getChildren() types are ok
|
|
@@ -22,9 +21,9 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
|
22
21
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
23
22
|
export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NAME}}Props */) {
|
|
24
23
|
const { label = '', showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
25
|
-
|
|
26
|
-
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
27
24
|
|
|
25
|
+
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
26
|
+
|
|
28
27
|
// Get the inherited props from the parent to determine label settings
|
|
29
28
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
30
29
|
|
|
@@ -2,26 +2,26 @@ import React, { createElement } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { getInstructions } from './utils';
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
6
|
|
|
6
7
|
import './DefaultForm.css';
|
|
7
8
|
|
|
8
9
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// }
|
|
11
|
+
interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
12
|
+
// If any, enter additional props that only exist on this componentName
|
|
13
|
+
NumCols?: string,
|
|
14
|
+
instructions?: string,
|
|
15
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
16
|
+
children: Array<any>
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
// Duplicated runtime code from React SDK
|
|
21
21
|
|
|
22
22
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
23
23
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
24
|
-
export default function {{COMPONENT_CLASS_NAME}}(props
|
|
24
|
+
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
25
25
|
const { getPConnect, NumCols = '1' } = props;
|
|
26
26
|
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
27
27
|
|
|
@@ -255,8 +255,9 @@ export const publishComponentToServer = async (data, doFetch = true) => {
|
|
|
255
255
|
if (!response.ok) {
|
|
256
256
|
if (response.status === 408) {
|
|
257
257
|
throw new Error(
|
|
258
|
-
'Time out'
|
|
258
|
+
'Server Time out'
|
|
259
259
|
);
|
|
260
|
+
|
|
260
261
|
}
|
|
261
262
|
if (response.status === 401) {
|
|
262
263
|
throw new Error(
|
|
@@ -24,9 +24,9 @@ const PegaDxilMyTestText = props => {
|
|
|
24
24
|
<StyledPegaDxilMyTestTextWrapper>
|
|
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 PegaDxilMyTestText = props => {
|
|
|
40
40
|
|
|
41
41
|
PegaDxilMyTestText.defaultProps = {
|
|
42
42
|
value: '',
|
|
43
|
-
hideLabel: false,
|
|
44
43
|
placeholder: '',
|
|
45
44
|
disabled: false,
|
|
46
45
|
readOnly: false,
|
|
@@ -50,7 +49,6 @@ PegaDxilMyTestText.defaultProps = {
|
|
|
50
49
|
|
|
51
50
|
PegaDxilMyTestText.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,
|
package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx
CHANGED
|
@@ -83,7 +83,7 @@ export default function AutoComplete(props: AutoCompleteProps) {
|
|
|
83
83
|
|
|
84
84
|
const thePConn = getPConnect();
|
|
85
85
|
const actionsApi = thePConn.getActionsApi();
|
|
86
|
-
const propName = thePConn.getStateProps()
|
|
86
|
+
const propName = thePConn.getStateProps()["value"];
|
|
87
87
|
|
|
88
88
|
if (!isDeepEqual(datasource, theDatasource)) {
|
|
89
89
|
// inbound datasource is different, so update theDatasource (to trigger useEffect)
|
|
@@ -130,7 +130,7 @@ export default function AutoComplete(props: AutoCompleteProps) {
|
|
|
130
130
|
|
|
131
131
|
useEffect(() => {
|
|
132
132
|
if (listType === 'associated') {
|
|
133
|
-
setOptions(Utils.getOptionList(props, getPConnect().getDataObject(
|
|
133
|
+
setOptions(Utils.getOptionList(props, getPConnect().getDataObject('')));
|
|
134
134
|
}
|
|
135
135
|
}, [theDatasource]);
|
|
136
136
|
|