@pega/custom-dx-components 2.0.18 → 2.0.19

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 (30) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +1 -0
  3. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +11 -6
  4. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +11 -7
  5. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +7 -7
  6. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +9 -8
  7. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +7 -7
  8. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +7 -7
  9. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +16 -10
  10. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +9 -7
  11. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +8 -8
  12. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +7 -7
  13. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +7 -7
  14. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +6 -6
  15. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +1 -1
  16. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +6 -6
  17. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +3 -174
  18. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.js.mustache +172 -0
  19. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.jsx.mustache +10 -5
  20. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +59 -51
  21. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +64 -59
  22. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +43 -39
  23. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +46 -46
  24. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +24 -25
  25. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +7 -7
  26. package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +2 -1
  27. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +1 -1
  28. package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +2 -1
  29. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +6 -6
  30. package/src/tasks/init/template/package.json.mustache +1 -1
@@ -44,8 +44,8 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
44
44
  resolve({});
45
45
  });
46
46
  },
47
- updateFieldValue: () => {},
48
- triggerFieldChange: () => {}
47
+ updateFieldValue: () => {/* nothing */},
48
+ triggerFieldChange: () => {/* nothing */}
49
49
  };
50
50
  },
51
51
  getChildren: () => {
@@ -61,31 +61,30 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
61
61
  return pyHome1Raw;
62
62
  },
63
63
  createComponent: config => {
64
- switch (config.type) {
65
- case 'AppAnnouncement':
66
- return (
67
- <PegaAppAnnouncement
68
- heading='Announcements'
69
- description={configProps.description}
70
- whatsNewLink={configProps.whatsnewlink}
71
- image={configProps.image.replace(/ /g, '+')}
72
- datasource={configProps.datasource}
73
- label={configProps.label}
74
- getPConnect={() => {
75
- return {
76
- getChildren: () => {
77
- return pyHome1Resolved.children;
78
- }
79
- };
80
- }}
81
- />
82
- );
64
+ if (config.type === 'AppAnnouncement') {
65
+ return (
66
+ <PegaAppAnnouncement
67
+ heading='Announcements'
68
+ description={configProps.description}
69
+ whatsNewLink={configProps.whatsnewlink}
70
+ image={configProps.image.replace(/ /g, '+')}
71
+ datasource={configProps.datasource}
72
+ label={configProps.label}
73
+ getPConnect={() => {
74
+ return {
75
+ getChildren: () => {
76
+ return pyHome1Resolved.children;
77
+ }
78
+ };
79
+ }}
80
+ />
81
+ );
83
82
  }
84
83
  },
85
- ignoreSuggestion: () => {},
86
- acceptSuggestion: () => {},
87
- setInheritedProps: () => {},
88
- resolveConfigProps: () => {}
84
+ ignoreSuggestion: () => {/* nothing */},
85
+ acceptSuggestion: () => {/* nothing */},
86
+ setInheritedProps: () => {/* nothing */},
87
+ resolveConfigProps: () => {/* nothing */}
89
88
  };
90
89
  }
91
90
  };
@@ -2,7 +2,7 @@ import { withKnobs } from '@storybook/addon-knobs';
2
2
 
3
3
  import {{COMPONENT_CLASS_NAME}} from './index.jsx';
4
4
 
5
- import { historyData } from './mock.stories';
5
+ import historyData from './mock.stories';
6
6
 
7
7
  export default {
8
8
  title: '{{COMPONENT_CLASS_NAME}}',
@@ -58,14 +58,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
58
58
  },
59
59
  getActionsApi: () => {
60
60
  return {
61
- updateFieldValue: () => {},
62
- triggerFieldChange: () => {}
61
+ updateFieldValue: () => {/* nothing */},
62
+ triggerFieldChange: () => {/* nothing */}
63
63
  };
64
64
  },
65
- ignoreSuggestion: () => {},
66
- acceptSuggestion: () => {},
67
- setInheritedProps: () => {},
68
- resolveConfigProps: () => {}
65
+ ignoreSuggestion: () => {/* nothing */},
66
+ acceptSuggestion: () => {/* nothing */},
67
+ setInheritedProps: () => {/* nothing */},
68
+ resolveConfigProps: () => {/* nothing */}
69
69
  };
70
70
  }
71
71
  };
@@ -1,4 +1,4 @@
1
- export const historyData = {
1
+ const historyData = {
2
2
  data: {
3
3
  fetchDateTime: '2023-01-18T12:04:56.517Z',
4
4
  pxObjClass: 'Pega-API-DataExploration-Data',
@@ -387,3 +387,4 @@ export const historyData = {
387
387
  },
388
388
  request: {}
389
389
  };
390
+ export default historyData;
@@ -3,7 +3,7 @@ import { withKnobs } from '@storybook/addon-knobs';
3
3
  import {{COMPONENT_CLASS_NAME}} from './index.jsx';
4
4
 
5
5
 
6
- import { configProps } from './mock.stories';
6
+ import configProps from './mock.stories';
7
7
 
8
8
  export default {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
@@ -1,4 +1,4 @@
1
- export const configProps = {
1
+ const configProps = {
2
2
  label: 'App announcement',
3
3
  header: 'Announcements',
4
4
  description: 'Welcome to MediaCo Application for testing SDK frameworks.',
@@ -20,3 +20,4 @@ export const configProps = {
20
20
  fields: {}
21
21
  }
22
22
  };
23
+ export default configProps;
@@ -48,14 +48,14 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
48
48
  return {
49
49
  getActionsApi: () => {
50
50
  return {
51
- updateFieldValue: () => {},
52
- triggerFieldChange: () => {}
51
+ updateFieldValue: () => {/* nothing */},
52
+ triggerFieldChange: () => {/* nothing */}
53
53
  };
54
54
  },
55
- ignoreSuggestion: () => {},
56
- acceptSuggestion: () => {},
57
- setInheritedProps: () => {},
58
- resolveConfigProps: () => {}
55
+ ignoreSuggestion: () => {/* nothing */},
56
+ acceptSuggestion: () => {/* nothing */},
57
+ setInheritedProps: () => {/* nothing */},
58
+ resolveConfigProps: () => {/* nothing */}
59
59
  };
60
60
  }
61
61
  };
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@pega/configs": "^0.3.4",
57
- "@pega/custom-dx-components": "^2.0.18",
57
+ "@pega/custom-dx-components": "^2.0.19",
58
58
  "@pega/eslint-config": "^0.3.2",
59
59
  "@storybook/addon-actions": "^6.5.12",
60
60
  "@storybook/addon-essentials": "^6.5.12",