@pega/custom-dx-components 2.0.18 → 2.0.20

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 (31) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/index.js +53 -60
  3. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +1 -0
  4. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +11 -6
  5. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +11 -7
  6. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +7 -7
  7. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +9 -8
  8. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +7 -7
  9. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +7 -7
  10. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +16 -10
  11. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +9 -7
  12. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +8 -8
  13. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +7 -7
  14. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +7 -7
  15. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +6 -6
  16. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +1 -1
  17. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +6 -6
  18. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +3 -174
  19. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.js.mustache +172 -0
  20. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.jsx.mustache +10 -5
  21. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +59 -51
  22. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +64 -59
  23. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +43 -39
  24. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +46 -46
  25. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +24 -25
  26. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +7 -7
  27. package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +2 -1
  28. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +1 -1
  29. package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +2 -1
  30. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +6 -6
  31. package/src/tasks/init/template/package.json.mustache +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -175,15 +175,15 @@ const validateCompile = async (
175
175
  export default async options => {
176
176
  showVersion();
177
177
 
178
- if (options.params[10]) {
179
- const componentName = options.params[3];
180
- const componentLabel = options.params[4];
181
- const library = options.params[5];
182
- const version = options.params[6];
183
- const framework = options.params[7];
184
- const type = options.params[8];
185
- const subtype = options.params[9];
186
- const description = options.params[10];
178
+ if (options.params[9]) {
179
+
180
+ const type = options.params[3];
181
+ const subtype = options.params[4];
182
+ const componentName = options.params[5];
183
+ const componentLabel = options.params[6];
184
+ const library = options.params[7];
185
+ const version = options.params[9];
186
+ const description = options.params[9];
187
187
 
188
188
  await validateCompile(
189
189
  {
@@ -201,6 +201,50 @@ export default async options => {
201
201
  } else {
202
202
  const componentDefaults = await getComponentDefaults();
203
203
  const questions = [
204
+ {
205
+ name: 'type',
206
+ type: 'rawlist',
207
+ message: 'Enter type of component',
208
+ default: componentDefaults.type,
209
+ choices: COMPONENT_SCHEMA.type
210
+ },
211
+ {
212
+ name: 'subtype',
213
+ type: 'rawlist',
214
+ message: 'Enter subtype of component',
215
+ default: componentDefaults.subtype,
216
+ choices: COMPONENT_SCHEMA.subtype.field,
217
+ when(answers) {
218
+ return answers.type === 'Field';
219
+ }
220
+ },
221
+ {
222
+ name: 'subtype',
223
+ type: 'rawlist',
224
+ message: 'Enter subtype of component',
225
+ default: componentDefaults.subtype,
226
+ choices: COMPONENT_SCHEMA.subtype.template,
227
+ when(answers) {
228
+ return answers.type === 'Template';
229
+ }
230
+ },
231
+ {
232
+ name: 'subtype',
233
+ type: 'rawlist',
234
+ message: 'Enter subtype of component',
235
+ default: [componentDefaults.subtype || COMPONENT_SCHEMA.subtype.widget[0]],
236
+ choices: COMPONENT_SCHEMA.subtype.widget,
237
+ when(answers) {
238
+ return answers.type === 'Widget';
239
+ },
240
+ validate: value => {
241
+ /* value should not be empty */
242
+ if (Array.isArray(value) && value.length) {
243
+ return true;
244
+ }
245
+ return 'Please select subtype';
246
+ }
247
+ },
204
248
  {
205
249
  name: 'componentName',
206
250
  message: 'Enter component name (required)',
@@ -258,57 +302,6 @@ export default async options => {
258
302
  message: 'Please enter the application names to be supported (comma-separated). ',
259
303
  suffix: 'Keep empty for all applications'
260
304
  },
261
- // {
262
- // name: 'framework',
263
- // type: 'rawlist',
264
- // message: 'Enter framework a',
265
- // default: 'COSMOS_React',
266
- // choices: COMPONENT_SCHEMA.framework
267
- // },
268
- {
269
- name: 'type',
270
- type: 'rawlist',
271
- message: 'Enter type of component',
272
- default: componentDefaults.type,
273
- choices: COMPONENT_SCHEMA.type
274
- },
275
- {
276
- name: 'subtype',
277
- type: 'rawlist',
278
- message: 'Enter subtype of component',
279
- default: componentDefaults.subtype,
280
- choices: COMPONENT_SCHEMA.subtype.field,
281
- when(answers) {
282
- return answers.type === 'Field';
283
- }
284
- },
285
- {
286
- name: 'subtype',
287
- type: 'rawlist',
288
- message: 'Enter subtype of component',
289
- default: componentDefaults.subtype,
290
- choices: COMPONENT_SCHEMA.subtype.template,
291
- when(answers) {
292
- return answers.type === 'Template';
293
- }
294
- },
295
- {
296
- name: 'subtype',
297
- type: 'rawlist',
298
- message: 'Enter subtype of component',
299
- default: [componentDefaults.subtype || COMPONENT_SCHEMA.subtype.widget[0]],
300
- choices: COMPONENT_SCHEMA.subtype.widget,
301
- when(answers) {
302
- return answers.type === 'Widget';
303
- },
304
- validate: value => {
305
- /* value should not be empty */
306
- if (Array.isArray(value) && value.length) {
307
- return true;
308
- }
309
- return 'Please select subtype';
310
- }
311
- },
312
305
  {
313
306
  name: 'description',
314
307
  message: 'Enter description for the component',
@@ -12,6 +12,7 @@ export default {
12
12
  };
13
13
 
14
14
  export const base{{COMPONENT_CLASS_NAME}} = () => {
15
+ // eslint-disable-next-line react-hooks/rules-of-hooks
15
16
  const [value, setValue] = useState(configProps.value);
16
17
 
17
18
  const props = {
@@ -1,4 +1,4 @@
1
- import { withKnobs, text, boolean } from '@storybook/addon-knobs';
1
+ import { withKnobs } from '@storybook/addon-knobs';
2
2
  import { configProps, stateProps } from './mock.stories';
3
3
  import {{COMPONENT_CLASS_NAME}} from './index.jsx';
4
4
 
@@ -26,8 +26,13 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
26
26
  return {
27
27
  getActionsApi: () => {
28
28
  return {
29
- updateFieldValue: () => {},
30
- triggerFieldChange: () => {}
29
+ updateFieldValue: () => {/* nothing */},
30
+ triggerFieldChange: () => {/* nothing */}
31
+ };
32
+ },
33
+ getValidationApi: () => {
34
+ return {
35
+ validate: () => {/* nothing */}
31
36
  };
32
37
  },
33
38
  getStateProps: () => {
@@ -36,9 +41,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
36
41
  getConfigProps: () => {
37
42
  return configProps;
38
43
  },
39
- ignoreSuggestion: () => {},
40
- acceptSuggestion: () => {},
41
- clearErrorMessages: () => {}
44
+ ignoreSuggestion: () => {/* nothing */},
45
+ acceptSuggestion: () => {/* nothing */},
46
+ clearErrorMessages: () => {/* nothing */}
42
47
  };
43
48
  },
44
49
  value: configProps.value,
@@ -1,5 +1,4 @@
1
- import { useState } from 'react';
2
- import { withKnobs, text, boolean } from '@storybook/addon-knobs';
1
+ import { withKnobs } from '@storybook/addon-knobs';
3
2
  import { configProps, stateProps } from './mock.stories';
4
3
  import {{COMPONENT_CLASS_NAME}} from './index.jsx';
5
4
 
@@ -27,8 +26,13 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
27
26
  return {
28
27
  getActionsApi: () => {
29
28
  return {
30
- updateFieldValue: () => {},
31
- triggerFieldChange: () => {}
29
+ updateFieldValue: () => {/* nothing */},
30
+ triggerFieldChange: () => {/* nothing */}
31
+ };
32
+ },
33
+ getValidationApi: () => {
34
+ return {
35
+ validate: () => {/* nothing */}
32
36
  };
33
37
  },
34
38
  getStateProps: () => {
@@ -37,9 +41,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
37
41
  getConfigProps: () => {
38
42
  return configProps;
39
43
  },
40
- ignoreSuggestion: () => {},
41
- acceptSuggestion: () => {},
42
- clearErrorMessages: () => {}
44
+ ignoreSuggestion: () => {/* nothing */},
45
+ acceptSuggestion: () => {/* nothing */},
46
+ clearErrorMessages: () => {/* nothing */}
43
47
  };
44
48
  },
45
49
  value: configProps.value,
@@ -20,7 +20,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
20
20
  showGroupSeparators: configProps.showGroupSeparators,
21
21
  hasSuggestions: configProps.hasSuggestions,
22
22
  testId: configProps.testId,
23
- fieldMetadata: fieldMetadata,
23
+ fieldMetadata,
24
24
 
25
25
  getPConnect: () => {
26
26
  return {
@@ -29,14 +29,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
29
29
  },
30
30
  getActionsApi: () => {
31
31
  return {
32
- updateFieldValue: () => {},
33
- triggerFieldChange: () => {}
32
+ updateFieldValue: () => {/* nothing */},
33
+ triggerFieldChange: () => {/* nothing */}
34
34
  };
35
35
  },
36
- ignoreSuggestion: () => {},
37
- acceptSuggestion: () => {},
38
- setInheritedProps: () => {},
39
- resolveConfigProps: () => {}
36
+ ignoreSuggestion: () => {/* nothing */},
37
+ acceptSuggestion: () => {/* nothing */},
38
+ setInheritedProps: () => {/* nothing */},
39
+ resolveConfigProps: () => {/* nothing */}
40
40
  };
41
41
  }
42
42
  };
@@ -13,7 +13,7 @@ export default {
13
13
  export const base{{COMPONENT_CLASS_NAME}} = () => {
14
14
 
15
15
  const props = {
16
- value: configProps.value,
16
+ value: Number(configProps.value),
17
17
  placeholder: configProps.placeholder,
18
18
  label: configProps.label,
19
19
  helperText: configProps.helperText,
@@ -23,7 +23,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
23
23
  alwaysShowISOCode: configProps.alwaysShowISOCode,
24
24
  hasSuggestions: configProps.hasSuggestions,
25
25
  testId: configProps.testId,
26
- fieldMetadata: fieldMetadata,
26
+ fieldMetadata,
27
27
 
28
28
  getPConnect: () => {
29
29
  return {
@@ -32,14 +32,15 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
32
32
  },
33
33
  getActionsApi: () => {
34
34
  return {
35
- updateFieldValue: () => {},
36
- triggerFieldChange: () => {}
35
+ updateFieldValue: () => {/* nothing */},
36
+ triggerFieldChange: () => {/* nothing */}
37
37
  };
38
38
  },
39
- ignoreSuggestion: () => {},
40
- acceptSuggestion: () => {},
41
- setInheritedProps: () => {},
42
- resolveConfigProps: () => {}
39
+ ignoreSuggestion: () => {/* nothing */},
40
+ acceptSuggestion: () => {/* nothing */},
41
+ setInheritedProps: () => {/* nothing */},
42
+ resolveConfigProps: () => {/* nothing */},
43
+ clearErrorMessages: () => {/* nothing */}
43
44
  };
44
45
  }
45
46
  };
@@ -20,7 +20,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
20
20
  showGroupSeparators: configProps.showGroupSeparators,
21
21
  hasSuggestions: configProps.hasSuggestions,
22
22
  testId: configProps.testId,
23
- fieldMetadata: fieldMetadata,
23
+ fieldMetadata,
24
24
 
25
25
  getPConnect: () => {
26
26
  return {
@@ -29,14 +29,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
29
29
  },
30
30
  getActionsApi: () => {
31
31
  return {
32
- updateFieldValue: () => {},
33
- triggerFieldChange: () => {}
32
+ updateFieldValue: () => {/* nothing */},
33
+ triggerFieldChange: () => {/* nothing */}
34
34
  };
35
35
  },
36
- ignoreSuggestion: () => {},
37
- acceptSuggestion: () => {},
38
- setInheritedProps: () => {},
39
- resolveConfigProps: () => {}
36
+ ignoreSuggestion: () => {/* nothing */},
37
+ acceptSuggestion: () => {/* nothing */},
38
+ setInheritedProps: () => {/* nothing */},
39
+ resolveConfigProps: () => {/* nothing */}
40
40
  };
41
41
  }
42
42
  };
@@ -20,7 +20,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
20
20
  showGroupSeparators: configProps.showGroupSeparators,
21
21
  hasSuggestions: configProps.hasSuggestions,
22
22
  testId: configProps.testId,
23
- fieldMetadata: fieldMetadata,
23
+ fieldMetadata,
24
24
 
25
25
  getPConnect: () => {
26
26
  return {
@@ -29,14 +29,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
29
29
  },
30
30
  getActionsApi: () => {
31
31
  return {
32
- updateFieldValue: () => {},
33
- triggerFieldChange: () => {}
32
+ updateFieldValue: () => {/* nothing */},
33
+ triggerFieldChange: () => {/* nothing */}
34
34
  };
35
35
  },
36
- ignoreSuggestion: () => {},
37
- acceptSuggestion: () => {},
38
- setInheritedProps: () => {},
39
- resolveConfigProps: () => {}
36
+ ignoreSuggestion: () => {/* nothing */},
37
+ acceptSuggestion: () => {/* nothing */},
38
+ setInheritedProps: () => {/* nothing */},
39
+ resolveConfigProps: () => {/* nothing */}
40
40
  };
41
41
  }
42
42
  };
@@ -12,6 +12,7 @@ export default {
12
12
  };
13
13
 
14
14
  export const base{{COMPONENT_CLASS_NAME}} = () => {
15
+ // eslint-disable-next-line react-hooks/rules-of-hooks
15
16
  const [value, setValue] = useState(configProps.value);
16
17
 
17
18
  const props = {
@@ -22,7 +23,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
22
23
  datasource: configProps.datasource,
23
24
  testId: configProps.testId,
24
25
  hasSuggestions: configProps.hasSuggestions,
25
- fieldMetadata: fieldMetadata,
26
+ fieldMetadata,
26
27
 
27
28
  getPConnect: () => {
28
29
  return {
@@ -32,8 +33,8 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
32
33
  getStateProps: () => {
33
34
  return stateProps;
34
35
  },
35
- getLocalizedValue: value => {
36
- return value;
36
+ getLocalizedValue: val => {
37
+ return val;
37
38
  },
38
39
  getLocaleRuleNameFromKeys: (localeClass, localeContext, localeName) => {
39
40
  return `${localeClass}!${localeContext}!${localeName}`;
@@ -50,16 +51,21 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
50
51
  },
51
52
  getActionsApi: () => {
52
53
  return {
53
- updateFieldValue: (propName, value) => {
54
- setValue(value);
54
+ updateFieldValue: (propName, theValue) => {
55
+ setValue(theValue);
55
56
  },
56
- triggerFieldChange: () => {}
57
+ triggerFieldChange: () => {/* nothing */}
57
58
  };
58
59
  },
59
- ignoreSuggestion: () => {},
60
- acceptSuggestion: () => {},
61
- setInheritedProps: () => {},
62
- resolveConfigProps: () => {}
60
+ getValidationApi: () => {
61
+ return {
62
+ validate: () => {/* nothing */}
63
+ };
64
+ },
65
+ ignoreSuggestion: () => {/* nothing */},
66
+ acceptSuggestion: () => {/* nothing */},
67
+ setInheritedProps: () => {/* nothing */},
68
+ resolveConfigProps: () => {/* nothing */}
63
69
  };
64
70
  }
65
71
  };
@@ -12,7 +12,7 @@ export default {
12
12
  };
13
13
 
14
14
  export const base{{COMPONENT_CLASS_NAME}} = () => {
15
-
15
+ // eslint-disable-next-line react-hooks/rules-of-hooks
16
16
  const [value, setValue] = useState(configProps.value);
17
17
 
18
18
  const props = {
@@ -29,14 +29,16 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
29
29
  },
30
30
  getActionsApi: () => {
31
31
  return {
32
- updateFieldValue: () => {},
33
- triggerFieldChange: () => {}
32
+ updateFieldValue: (propName, theValue) => {
33
+ setValue(theValue);
34
+ },
35
+ triggerFieldChange: () => {/* nothing */}
34
36
  };
35
37
  },
36
- ignoreSuggestion: () => {},
37
- acceptSuggestion: () => {},
38
- setInheritedProps: () => {},
39
- resolveConfigProps: () => {}
38
+ ignoreSuggestion: () => {/* nothing */},
39
+ acceptSuggestion: () => {/* nothing */},
40
+ setInheritedProps: () => {/* nothing */},
41
+ resolveConfigProps: () => {/* nothing */}
40
42
  };
41
43
  }
42
44
  };
@@ -1,4 +1,4 @@
1
- import { withKnobs, text, boolean } from '@storybook/addon-knobs';
1
+ import { withKnobs } from '@storybook/addon-knobs';
2
2
 
3
3
  import {{COMPONENT_CLASS_NAME}} from './index.jsx';
4
4
 
@@ -19,7 +19,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
19
19
  helperText: configProps.helperText,
20
20
  testId: configProps.testId,
21
21
  hasSuggestions: configProps.hasSuggestions,
22
- fieldMetadata: fieldMetadata,
22
+ fieldMetadata,
23
23
 
24
24
  getPConnect: () => {
25
25
  return {
@@ -28,14 +28,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
28
28
  },
29
29
  getActionsApi: () => {
30
30
  return {
31
- updateFieldValue: () => {},
32
- triggerFieldChange: () => {}
31
+ updateFieldValue: () => {/* nothing */},
32
+ triggerFieldChange: () => {/* nothing */}
33
33
  };
34
34
  },
35
- ignoreSuggestion: () => {},
36
- acceptSuggestion: () => {},
37
- setInheritedProps: () => {},
38
- resolveConfigProps: () => {}
35
+ ignoreSuggestion: () => {/* nothing */},
36
+ acceptSuggestion: () => {/* nothing */},
37
+ setInheritedProps: () => {/* nothing */},
38
+ resolveConfigProps: () => {/* nothing */}
39
39
  };
40
40
  }
41
41
  };
@@ -19,7 +19,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
19
19
  helperText: configProps.helperText,
20
20
  testId: configProps.testId,
21
21
  hasSuggestions: configProps.hasSuggestions,
22
- fieldMetadata: fieldMetadata,
22
+ fieldMetadata,
23
23
 
24
24
  getPConnect: () => {
25
25
  return {
@@ -28,14 +28,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
28
28
  },
29
29
  getActionsApi: () => {
30
30
  return {
31
- updateFieldValue: () => {},
32
- triggerFieldChange: () => {}
31
+ updateFieldValue: () => {/* nothing */},
32
+ triggerFieldChange: () => {/* nothing */}
33
33
  };
34
34
  },
35
- ignoreSuggestion: () => {},
36
- acceptSuggestion: () => {},
37
- setInheritedProps: () => {},
38
- resolveConfigProps: () => {}
35
+ ignoreSuggestion: () => {/* nothing */},
36
+ acceptSuggestion: () => {/* nothing */},
37
+ setInheritedProps: () => {/* nothing */},
38
+ resolveConfigProps: () => {/* nothing */}
39
39
  };
40
40
  }
41
41
  };
@@ -19,7 +19,7 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
19
19
  helperText: configProps.helperText,
20
20
  testId: configProps.testId,
21
21
  hasSuggestions: configProps.hasSuggestions,
22
- fieldMetadata: fieldMetadata,
22
+ fieldMetadata,
23
23
 
24
24
  getPConnect: () => {
25
25
  return {
@@ -28,14 +28,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
28
28
  },
29
29
  getActionsApi: () => {
30
30
  return {
31
- updateFieldValue: () => {},
32
- triggerFieldChange: () => {}
31
+ updateFieldValue: () => {/* nothing */},
32
+ triggerFieldChange: () => {/* nothing */}
33
33
  };
34
34
  },
35
- ignoreSuggestion: () => {},
36
- acceptSuggestion: () => {},
37
- setInheritedProps: () => {},
38
- resolveConfigProps: () => {}
35
+ ignoreSuggestion: () => {/* nothing */},
36
+ acceptSuggestion: () => {/* nothing */},
37
+ setInheritedProps: () => {/* nothing */},
38
+ resolveConfigProps: () => {/* nothing */}
39
39
  };
40
40
  }
41
41
  };
@@ -26,14 +26,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
26
26
  },
27
27
  getActionsApi: () => {
28
28
  return {
29
- updateFieldValue: () => {},
30
- triggerFieldChange: () => {}
29
+ updateFieldValue: () => {/* nothing */},
30
+ triggerFieldChange: () => {/* nothing */}
31
31
  };
32
32
  },
33
- ignoreSuggestion: () => {},
34
- acceptSuggestion: () => {},
35
- setInheritedProps: () => {},
36
- resolveConfigProps: () => {}
33
+ ignoreSuggestion: () => {/* nothing */},
34
+ acceptSuggestion: () => {/* nothing */},
35
+ setInheritedProps: () => {/* nothing */},
36
+ resolveConfigProps: () => {/* nothing */}
37
37
  };
38
38
  }
39
39
  };
@@ -245,7 +245,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
245
245
  {{COMPONENT_CLASS_NAME}}.propTypes = {
246
246
  value: PropTypes.string,
247
247
  placeholder: PropTypes.string,
248
- datasource: PropTypes.node,
248
+ datasource: PropTypes.objectOf(PropTypes.any),
249
249
  label: PropTypes.string.isRequired,
250
250
  hideLabel: PropTypes.bool,
251
251
  getPConnect: PropTypes.func.isRequired,
@@ -26,14 +26,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
26
26
  },
27
27
  getActionsApi: () => {
28
28
  return {
29
- updateFieldValue: () => {},
30
- triggerFieldChange: () => {}
29
+ updateFieldValue: () => {/* nothing */},
30
+ triggerFieldChange: () => {/* nothing */}
31
31
  };
32
32
  },
33
- ignoreSuggestion: () => {},
34
- acceptSuggestion: () => {},
35
- setInheritedProps: () => {},
36
- resolveConfigProps: () => {}
33
+ ignoreSuggestion: () => {/* nothing */},
34
+ acceptSuggestion: () => {/* nothing */},
35
+ setInheritedProps: () => {/* nothing */},
36
+ resolveConfigProps: () => {/* nothing */}
37
37
  };
38
38
  }
39
39
  };