@pega/custom-dx-components 0.23.48 → 0.24.1

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 (147) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/cli.js +8 -2
  4. package/src/tasks/build-jest-assets/index.js +171 -0
  5. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +4 -13
  6. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +8 -5
  7. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +9 -19
  8. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +1 -1
  9. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +9 -18
  10. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +1 -1
  11. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.ts.mustache +1 -0
  12. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +3 -7
  13. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +1 -1
  14. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.ts.mustache +1 -0
  15. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +6 -9
  16. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +4 -2
  17. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +3 -0
  18. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +3 -6
  19. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +1 -1
  20. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +1 -1
  21. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +3 -6
  22. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +1 -1
  23. package/src/tasks/create/templates/Constellation/Field/Integer/mock.ts.mustache +0 -1
  24. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +3 -6
  25. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +1 -1
  26. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.ts.mustache +1 -0
  27. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +4 -8
  28. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +3 -7
  29. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +0 -3
  30. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.ts.mustache +1 -0
  31. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +1 -3
  32. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +2 -5
  33. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +1 -1
  34. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.tsx +3 -9
  35. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +2 -5
  36. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +1 -1
  37. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.ts.mustache +1 -0
  38. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +2 -5
  39. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +1 -1
  40. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.ts.mustache +1 -0
  41. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +3 -5
  42. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +1 -1
  43. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.ts.mustache +1 -0
  44. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +2 -5
  45. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.ts.mustache +1 -0
  46. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +6 -15
  47. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +1 -1
  48. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.tsx.mustache +17 -19
  49. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +3 -6
  50. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.tsx.mustache +17 -19
  51. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +3 -7
  52. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +5 -3
  53. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +4 -2
  54. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +4 -3
  55. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +3 -2
  56. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +5 -8
  57. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +5 -4
  58. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +1 -5
  59. package/src/tasks/index.js +1 -0
  60. package/src/tasks/init/template/.storybook/preview.js +3 -0
  61. package/src/tasks/init/template/package.json.mustache +7 -6
  62. package/src/util.js +18 -0
  63. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +1 -0
  64. package/tests/assets/components/create/_components.md +1 -0
  65. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -0
  66. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +1 -1
  67. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +4 -0
  68. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +4 -2
  69. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +1 -0
  70. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +1 -0
  71. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +1 -1
  72. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -0
  73. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +1 -1
  74. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +2 -0
  75. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +1 -1
  76. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
  77. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +1 -4
  78. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +1 -0
  79. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +1 -1
  80. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +1 -0
  81. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +1 -1
  82. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.ts +0 -1
  83. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -0
  84. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +1 -1
  85. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +1 -0
  86. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +1 -1
  87. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +0 -1
  88. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +1 -0
  89. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +1 -1
  90. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +1 -0
  91. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +1 -1
  92. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +3 -1
  93. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +0 -3
  94. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.ts +1 -0
  95. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -0
  96. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +1 -0
  97. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
  98. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -0
  99. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +1 -1
  100. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +1 -0
  101. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
  102. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
  103. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -5
  104. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +1 -0
  105. package/tests/assets/components/createAll/Constellation/_components.md +1 -0
  106. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -0
  107. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +1 -1
  108. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +4 -0
  109. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +4 -2
  110. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +1 -0
  111. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +1 -0
  112. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +1 -1
  113. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -0
  114. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +1 -1
  115. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +2 -0
  116. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +1 -1
  117. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
  118. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +1 -4
  119. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +1 -0
  120. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +1 -1
  121. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +1 -0
  122. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +1 -1
  123. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.ts +0 -1
  124. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -5
  125. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -0
  126. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +1 -1
  127. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +1 -0
  128. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +1 -1
  129. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +0 -1
  130. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +1 -0
  131. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +1 -1
  132. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +1 -0
  133. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +1 -1
  134. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +3 -1
  135. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +0 -3
  136. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.ts +1 -0
  137. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -0
  138. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +1 -0
  139. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
  140. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -0
  141. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +1 -1
  142. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +1 -0
  143. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
  144. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
  145. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -5
  146. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +1 -0
  147. package/tests/assets/components/createAll/Launchpad/_components.md +1 -0
@@ -35,9 +35,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
35
35
 
36
36
  const props = {
37
37
  useConfigurableLayout: false,
38
- enableGetNextWork: pyHome1Raw.config.enableGetNextWork,
39
38
  icon: pyHome1Raw.config.icon,
40
- title: 'Page Template',
41
39
 
42
40
  getPConnect: () => {
43
41
  return {
@@ -108,4 +106,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
108
106
  );
109
107
  };
110
108
 
111
- Base{{COMPONENT_CLASS_NAME}}.args = {};
109
+ Base{{COMPONENT_CLASS_NAME}}.args = {
110
+ title: 'Page Template',
111
+ enableGetNextWork: pyHome1Raw.config.enableGetNextWork,
112
+ };
@@ -49,7 +49,6 @@ window.PCore.getDataApiUtils = () => {
49
49
  export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
50
50
 
51
51
  const props = {
52
- label: 'Case history',
53
52
 
54
53
  getPConnect: () => {
55
54
  return {
@@ -83,4 +82,6 @@ return (
83
82
  );
84
83
  };
85
84
 
86
- Base{{COMPONENT_CLASS_NAME}}.args = {};
85
+ Base{{COMPONENT_CLASS_NAME}}.args = {
86
+ label: 'Case history',
87
+ };
@@ -20,13 +20,8 @@ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
20
20
  export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
21
21
 
22
22
  const props = {
23
- label: configProps.label,
24
- header: configProps.header,
25
- description: configProps.description,
26
- image: configProps.image,
27
- datasource: configProps.datasource,
28
- whatsnewlink: configProps.whatsnewlink
29
- };
23
+ image: configProps.image
24
+ };
30
25
 
31
26
  return (
32
27
  <>
@@ -37,5 +32,7 @@ return (
37
32
 
38
33
  Base{{COMPONENT_CLASS_NAME}}.args = {
39
34
  header: configProps.header,
40
- description: configProps.description
35
+ description: configProps.description,
36
+ whatsnewlink: configProps.whatsnewlink,
37
+ datasource: configProps.datasource,
41
38
  };
@@ -41,13 +41,10 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
41
41
 
42
42
  const props = {
43
43
  label: configProps.label,
44
- createLabel: configProps.createLabel,
45
- updateLabel: configProps.updateLabel,
46
44
  createOperator: configProps.createOperator,
47
45
  updateOperator: configProps.updateOperator,
48
46
  createDateTime: configProps.createDateTime,
49
47
  updateDateTime: configProps.updateDateTime,
50
- hideLabel: configProps.hideLabel,
51
48
 
52
49
  getPConnect: () => {
53
50
  return {
@@ -72,4 +69,8 @@ return (
72
69
  );
73
70
  };
74
71
 
75
- Base{{COMPONENT_CLASS_NAME}}.args = {};
72
+ Base{{COMPONENT_CLASS_NAME}}.args = {
73
+ createLabel: configProps.createLabel,
74
+ updateLabel: configProps.updateLabel,
75
+ hideLabel: configProps.hideLabel
76
+ };
@@ -78,8 +78,4 @@ return (
78
78
  );
79
79
  };
80
80
 
81
- Base{{COMPONENT_CLASS_NAME}}.args = {
82
- updateDateTime: '2023-01-16T14:53:33.280Z',
83
- createDateTime: '2023-01-16T14:53:33.198Z',
84
- ...configProps
85
- };
81
+ Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -15,3 +15,4 @@ export { default as authenticate } from './authenticate/index.js';
15
15
  export { default as upgrade } from './upgrade/index.js';
16
16
  export { default as buildComponent } from './build-comp/index.js';
17
17
  export { default as buildAllComponents } from './build-all/index.js';
18
+ export { default as buildJestAssets } from './build-jest-assets/index.js';
@@ -7,6 +7,9 @@ const preview = {
7
7
  color: /(background|color)$/i,
8
8
  date: /Date$/i
9
9
  }
10
+ },
11
+ docs: {
12
+ source: { type: 'code' }
10
13
  }
11
14
  }
12
15
  };
@@ -28,6 +28,7 @@
28
28
  "_internal-test-full": "npm run _internal-test-functional && npm run _internal-test-unit",
29
29
  "_internal-test-functional": "npm run test:functional:local --prefix node_modules/@pega/custom-dx-components",
30
30
  "_internal-test-unit": "npm run test:unit:local --prefix node_modules/@pega/custom-dx-components",
31
+ "_internal-build-jest-assets": "custom-dx-components buildJestAssets",
31
32
  "_lint:styles": "stylelint \"./**/*.@(js|jsx|ts|tsx)\"",
32
33
  "_lint:format": "prettier -c .",
33
34
  "_lint:spelling": "cspell --no-progress **/*",
@@ -50,16 +51,16 @@
50
51
  "license": "Enter License",
51
52
  "sideEffects": false,
52
53
  "dependencies": {
53
- "@pega/cosmos-react-condition-builder": "^4.2.0",
54
- "@pega/cosmos-react-core": "^4.2.0",
55
- "@pega/cosmos-react-work": "^4.2.0",
54
+ "@pega/cosmos-react-condition-builder": "^6.0.3",
55
+ "@pega/cosmos-react-core": "^6.0.3",
56
+ "@pega/cosmos-react-work": "^6.0.3",
56
57
  "dayjs": "^1.11.10",
57
58
  "lodash.get": "^4.4.2",
58
59
  "polished": "^4.2.2",
59
60
  "prop-types": "^15.8.1",
60
- "react": "^17.0.2",
61
+ "react": "^18.2.0",
61
62
  "react-autosuggest": "^10.1.0",
62
- "react-dom": "^17.0.2",
63
+ "react-dom": "^18.2.0",
63
64
  "react-is": "^18.2.0",
64
65
  "react-player": "^2.10.1",
65
66
  "react-redux": "^7.2.6",
@@ -68,7 +69,7 @@
68
69
  },
69
70
  "devDependencies": {
70
71
  "@pega/configs": "^0.6.0",
71
- "@pega/custom-dx-components": "0.23.48",
72
+ "@pega/custom-dx-components": "0.24.1",
72
73
  "@pega/pcore-pconnect-typedefs": "~2.1.1",
73
74
  "@storybook/addon-actions": "^7.6.7",
74
75
  "@storybook/addon-essentials": "^7.6.7",
package/src/util.js CHANGED
@@ -262,6 +262,24 @@ export const getComponentDefaults = async () => {
262
262
  return config.component;
263
263
  };
264
264
 
265
+ export const getServerType = async () => {
266
+ const defaultPegaServerConfig = await getPegaServerConfig();
267
+ return defaultPegaServerConfig.serverType;
268
+ }
269
+
270
+ export const setServerType = async(serverType) => {
271
+ const currentDirectory = process.cwd();
272
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
273
+ let configData = await getPegaConfig();
274
+ let serverConfig = configData['server-config'];
275
+ serverConfig.serverType = serverType;
276
+
277
+ // update file
278
+ // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
279
+ fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8' });
280
+
281
+ }
282
+
265
283
  export const getComponentDirectoryPath = async componentKey => {
266
284
  const currentDirectory = process.cwd();
267
285
  const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
@@ -59,6 +59,7 @@ export const BasePegaDxilMyTestText: Story = args => {
59
59
  BasePegaDxilMyTestText.args = {
60
60
  label: configProps.label,
61
61
  helperText: configProps.helperText,
62
+ placeholder: configProps.placeholder,
62
63
  testId: configProps.testId,
63
64
  readOnly: configProps.readOnly,
64
65
  disabled: configProps.disabled,
@@ -0,0 +1 @@
1
+ # directory for components #
@@ -69,6 +69,7 @@ export const BasePegaDxilMyBoolean: Story = args => {
69
69
  BasePegaDxilMyBoolean.args = {
70
70
  label: configProps.label,
71
71
  helperText: configProps.helperText,
72
+ caption: configProps.caption,
72
73
  testId: configProps.testId,
73
74
  readOnly: configProps.readOnly,
74
75
  disabled: configProps.disabled,
@@ -104,7 +104,7 @@ function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
104
104
  }
105
105
 
106
106
  if (displayMode === 'DISPLAY_ONLY') {
107
- return ( <StyledPegaDxilMyBooleanWrapper> displayComponent </StyledPegaDxilMyBooleanWrapper>);
107
+ return ( <StyledPegaDxilMyBooleanWrapper> {displayComponent} </StyledPegaDxilMyBooleanWrapper>);
108
108
  }
109
109
 
110
110
  if (displayMode === "LABELS_LEFT") {
@@ -61,6 +61,10 @@ export const BasePegaDxilMyCurrency: Story = args => {
61
61
  BasePegaDxilMyCurrency.args = {
62
62
  label: configProps.label,
63
63
  helperText: configProps.helperText,
64
+ showGroupSeparators: configProps.showGroupSeparators,
65
+ allowDecimals: configProps.allowDecimals,
66
+ currencyISOCode: configProps.currencyISOCode,
67
+ alwaysShowISOCode: configProps.alwaysShowISOCode,
64
68
  testId: configProps.testId,
65
69
  readOnly: configProps.readOnly,
66
70
  disabled: configProps.disabled,
@@ -86,6 +86,7 @@ function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
86
86
  const [currencyValue, setCurrencyValue] = useState(() => formatValue(value));
87
87
 
88
88
  let { readOnly = false, required = false, disabled = false } = props;
89
+ let { showGroupSeparators = false } = props;
89
90
 
90
91
  [readOnly, required, disabled] = [readOnly, required, disabled].map(
91
92
  (prop) => prop === true || (typeof prop === 'string' && prop === 'true')
@@ -120,7 +121,7 @@ function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
120
121
  displayMode === 'DISPLAY_ONLY'
121
122
  ) {
122
123
  let displayComp;
123
- let { showGroupSeparators = false } = props;
124
+ // let { showGroupSeparators = false } = props;
124
125
  if (displayMode === 'LABELS_LEFT' && isTableFormatter) {
125
126
  noOfFractionDigits = undefined;
126
127
  showGroupSeparators = true;
@@ -188,7 +189,7 @@ function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
188
189
 
189
190
  switch (displayMode) {
190
191
  case 'DISPLAY_ONLY': {
191
- return (<StyledPegaDxilMyCurrencyWrapper> displayComp </StyledPegaDxilMyCurrencyWrapper>) ;
192
+ return (<StyledPegaDxilMyCurrencyWrapper> {displayComp} </StyledPegaDxilMyCurrencyWrapper>) ;
192
193
  }
193
194
  case 'LABELS_LEFT': {
194
195
  return (
@@ -242,6 +243,7 @@ function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
242
243
  showDecimal={allowDecimals}
243
244
  currencyISOCode={currencyISOCode}
244
245
  alwaysShowISOCode={alwaysShowISOCode}
246
+ showGroupSeparators={showGroupSeparators}
245
247
  placeholder={placeholder}
246
248
  disabled={disabled}
247
249
  readOnly={readOnly}
@@ -5,6 +5,7 @@ export const configProps = {
5
5
  label: 'Currency Sample',
6
6
  currencyISOCode: 'USD',
7
7
  allowDecimals: true,
8
+ showGroupSeparators: true,
8
9
  alwaysShowISOCode: true,
9
10
  placeholder: 'Currency Placeholder',
10
11
  helperText: 'Currency Helper Text',
@@ -85,6 +85,7 @@ export const BasePegaDxilMyDate: Story = args => {
85
85
  BasePegaDxilMyDate.args = {
86
86
  label: configProps.label,
87
87
  helperText: configProps.helperText,
88
+ showWeekNumber: configProps.showWeekNumber,
88
89
  testId: configProps.testId,
89
90
  readOnly: configProps.readOnly,
90
91
  disabled: configProps.disabled,
@@ -175,7 +175,7 @@ function PegaDxilMyDate (props: PegaDxilMyDateProps) {
175
175
  );
176
176
  switch(displayMode){
177
177
  case 'DISPLAY_ONLY': {
178
- return ( <StyledPegaDxilMyDateWrapper> displayComp </StyledPegaDxilMyDateWrapper>);
178
+ return ( <StyledPegaDxilMyDateWrapper> {displayComp} </StyledPegaDxilMyDateWrapper>);
179
179
  }
180
180
  case "LABELS_LEFT" : {
181
181
  return (
@@ -84,6 +84,8 @@ export const BasePegaDxilMyDateTime: Story = args => {
84
84
  BasePegaDxilMyDateTime.args = {
85
85
  label: configProps.label,
86
86
  helperText: configProps.helperText,
87
+ withSeconds: configProps.withSeconds,
88
+ showWeekNumber: configProps.showWeekNumber,
87
89
  testId: configProps.testId,
88
90
  readOnly: configProps.readOnly,
89
91
  disabled: configProps.disabled,
@@ -181,7 +181,7 @@ function PegaDxilMyDateTime (props: PegaDxilMyDateTimeProps) {
181
181
  );
182
182
  switch (displayMode) {
183
183
  case 'DISPLAY_ONLY': {
184
- return ( <StyledPegaDxilMyDateTimeWrapper> displayComp </StyledPegaDxilMyDateTimeWrapper>);
184
+ return ( <StyledPegaDxilMyDateTimeWrapper> {displayComp} </StyledPegaDxilMyDateTimeWrapper>);
185
185
  }
186
186
  case 'LABELS_LEFT': {
187
187
  return (
@@ -57,6 +57,8 @@ export const BasePegaDxilMyDecimal: Story = args => {
57
57
  BasePegaDxilMyDecimal.args = {
58
58
  label: configProps.label,
59
59
  helperText: configProps.helperText,
60
+ placeholder: configProps.placeholder,
61
+ showGroupSeparators: configProps.showGroupSeparators,
60
62
  testId: configProps.testId,
61
63
  readOnly: configProps.readOnly,
62
64
  disabled: configProps.disabled,
@@ -158,7 +158,7 @@ function PegaDxilMyDecimal(props: PegaDxilMyDecimalProps) {
158
158
 
159
159
  switch (displayMode) {
160
160
  case 'DISPLAY_ONLY': {
161
- return (<StyledPegaDxilMyDecimalWrapper> displayComp </StyledPegaDxilMyDecimalWrapper>);
161
+ return (<StyledPegaDxilMyDecimalWrapper> {displayComp} </StyledPegaDxilMyDecimalWrapper>);
162
162
  }
163
163
  case 'LABELS_LEFT': {
164
164
  return (
@@ -1,28 +1,26 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
2
  import React from 'react';
3
- import { Status } from "@pega/cosmos-react-core";
3
+ import { Status } from '@pega/cosmos-react-core';
4
4
 
5
5
  export default function StatusWorkRenderer({ value }: any) {
6
- let variant: "pending" | "success" | "info" | "warn" | "urgent" = "info";
6
+ // need to cast variant
7
+ let variant: 'success' | 'urgent' | 'warn' | 'pending' | 'info';
8
+ variant = 'info';
7
9
 
8
- const warnStrings = ["fail", "cancel", "reject", "revoke", "stopped", "warn"];
9
- const infoStrings = ["open", "hold", "info", "new"];
10
- const successStrings = ["resolved", "completed", "success"];
11
- const pendingStrings = ["pending"];
10
+ const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];
11
+ const infoStrings = ['open', 'hold', 'info', 'new'];
12
+ const successStrings = ['resolved', 'completed', 'success'];
13
+ const pendingStrings = ['pending'];
12
14
 
13
- if (new RegExp(warnStrings.join("|"), "i").test(value)) {
14
- variant = "warn";
15
- } else if (new RegExp(infoStrings.join("|"), "i").test(value)) {
16
- variant = "info";
17
- } else if (new RegExp(successStrings.join("|"), "i").test(value)) {
18
- variant = "success";
19
- } else if (new RegExp(pendingStrings.join("|"), "i").test(value)) {
20
- variant = "pending";
15
+ if (new RegExp(warnStrings.join('|'), 'i').test(value)) {
16
+ variant = 'warn';
17
+ } else if (new RegExp(infoStrings.join('|'), 'i').test(value)) {
18
+ variant = 'info';
19
+ } else if (new RegExp(successStrings.join('|'), 'i').test(value)) {
20
+ variant = 'success';
21
+ } else if (new RegExp(pendingStrings.join('|'), 'i').test(value)) {
22
+ variant = 'pending';
21
23
  }
22
24
 
23
- return (
24
- <Status type="rectangle" variant={variant}>
25
- {value}
26
- </Status>
27
- );
25
+ return <Status variant={variant}>{value}</Status>;
28
26
  }
@@ -146,7 +146,4 @@ export const BasePegaDxilMyDetails: Story = args => {
146
146
  );
147
147
  };
148
148
 
149
- BasePegaDxilMyDetails.args = {
150
- label: 'Test Details',
151
- showLabel: true
152
- };
149
+ BasePegaDxilMyDetails.args = {};
@@ -56,6 +56,7 @@ export const BasePegaDxilMyEmail: Story = args => {
56
56
  BasePegaDxilMyEmail.args = {
57
57
  label: configProps.label,
58
58
  helperText: configProps.helperText,
59
+ placeholder: configProps.placeholder,
59
60
  testId: configProps.testId,
60
61
  readOnly: configProps.readOnly,
61
62
  disabled: configProps.disabled,
@@ -128,7 +128,7 @@ function PegaDxilMyEmail(props: PegaDxilMyEmailProps) {
128
128
  }
129
129
  return displayMode === 'DISPLAY_ONLY' ? (
130
130
  <StyledPegaDxilMyEmailWrapper>
131
- displayComp
131
+ {displayComp}
132
132
  </StyledPegaDxilMyEmailWrapper>
133
133
  ) : (
134
134
  <StyledPegaDxilMyEmailWrapper>
@@ -56,6 +56,7 @@ export const BasePegaDxilMyInteger: Story = args => {
56
56
  BasePegaDxilMyInteger.args = {
57
57
  label: configProps.label,
58
58
  helperText: configProps.helperText,
59
+ showGroupSeparators: configProps.showGroupSeparators,
59
60
  testId: configProps.testId,
60
61
  readOnly: configProps.readOnly,
61
62
  disabled: configProps.disabled,
@@ -184,7 +184,7 @@ function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
184
184
 
185
185
  switch (displayMode) {
186
186
  case 'DISPLAY_ONLY': {
187
- return (<StyledPegaDxilMyIntegerWrapper> displayComp </StyledPegaDxilMyIntegerWrapper>);
187
+ return (<StyledPegaDxilMyIntegerWrapper> {displayComp} </StyledPegaDxilMyIntegerWrapper>);
188
188
  }
189
189
  case 'LABELS_LEFT': {
190
190
  return (
@@ -3,7 +3,6 @@ export const configProps = {
3
3
  value: '',
4
4
  label: 'Integer Sample',
5
5
  showGroupSeparators: true,
6
- placeholder: 'Integer Placeholder',
7
6
  helperText: 'Integer Helper Text',
8
7
  testId: 'integer-12345678',
9
8
  hasSuggestions: false,
@@ -56,6 +56,7 @@ export const BasePegaDxilMyParagraph: Story = args => {
56
56
  BasePegaDxilMyParagraph.args = {
57
57
  label: configProps.label,
58
58
  helperText: configProps.helperText,
59
+ placeholder: configProps.placeholder,
59
60
  testId: configProps.testId,
60
61
  readOnly: configProps.readOnly,
61
62
  disabled: configProps.disabled,
@@ -126,7 +126,7 @@ function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
126
126
  }
127
127
  return displayMode === 'DISPLAY_ONLY' ? (
128
128
  <StyledPegaDxilMyParagraphWrapper>
129
- displayComp
129
+ {displayComp}
130
130
  </StyledPegaDxilMyParagraphWrapper>
131
131
  ) : (
132
132
  <StyledPegaDxilMyParagraphWrapper>
@@ -57,6 +57,7 @@ export const BasePegaDxilMyPercentage: Story = args => {
57
57
  BasePegaDxilMyPercentage.args = {
58
58
  label: configProps.label,
59
59
  helperText: configProps.helperText,
60
+ showGroupSeparators: configProps.showGroupSeparators,
60
61
  testId: configProps.testId,
61
62
  readOnly: configProps.readOnly,
62
63
  disabled: configProps.disabled,
@@ -165,7 +165,7 @@ function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
165
165
 
166
166
  return displayMode === 'DISPLAY_ONLY' ? (
167
167
  <StyledPegaDxilMyPercentageWrapper>
168
- displayComp
168
+ {displayComp}
169
169
  </StyledPegaDxilMyPercentageWrapper>
170
170
  ) : (
171
171
  <StyledPegaDxilMyPercentageWrapper>
@@ -4,7 +4,6 @@ export const configProps = {
4
4
  value: '',
5
5
  label: 'Percentage Sample',
6
6
  showGroupSeparators: true,
7
- placeholder: 'Percentage Placeholder',
8
7
  helperText: 'Percentage Helper Text',
9
8
  testId: 'percentage-12345678',
10
9
  hasSuggestions: false,
@@ -54,6 +54,7 @@ export const BasePegaDxilMyPhone: Story = args => {
54
54
  BasePegaDxilMyPhone.args = {
55
55
  label: configProps.label,
56
56
  helperText: configProps.helperText,
57
+ placeholder: configProps.placeholder,
57
58
  testId: configProps.testId,
58
59
  readOnly: configProps.readOnly,
59
60
  disabled: configProps.disabled,
@@ -164,7 +164,7 @@ function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
164
164
  }
165
165
  return displayMode === 'DISPLAY_ONLY' ? (
166
166
  <StyledPegaDxilMyPhoneWrapper>
167
- displayComp
167
+ {displayComp}
168
168
  </StyledPegaDxilMyPhoneWrapper>
169
169
  ) : (
170
170
  <StyledPegaDxilMyPhoneWrapper>
@@ -86,6 +86,7 @@ export const BasePegaDxilMyPicklist: Story = args => {
86
86
  BasePegaDxilMyPicklist.args = {
87
87
  label: configProps.label,
88
88
  helperText: configProps.helperText,
89
+ placeholder: configProps.placeholder,
89
90
  testId: configProps.testId,
90
91
  readOnly: configProps.readOnly,
91
92
  disabled: configProps.disabled,
@@ -256,7 +256,7 @@ function PegaDxilMyPicklist(props: PegaDxilMyPicklistProps) {
256
256
 
257
257
  return displayMode === 'DISPLAY_ONLY' ? (
258
258
  <StyledPegaDxilMyPicklistWrapper>
259
- displayComp
259
+ {displayComp}
260
260
  </StyledPegaDxilMyPicklistWrapper>
261
261
  ) : (
262
262
  <StyledPegaDxilMyPicklistWrapper>
@@ -23,11 +23,11 @@ export const BasePegaDxilMyRadiobuttons: Story = args => {
23
23
 
24
24
  const props = {
25
25
  value,
26
- align: 'vertical',
27
26
  placeholder: configProps.placeholder,
28
27
  label: configProps.label,
29
28
  helperText: configProps.helperText,
30
29
  datasource: configProps.datasource,
30
+ inline: configProps.inline,
31
31
  testId: configProps.testId,
32
32
  hasSuggestions: configProps.hasSuggestions,
33
33
  fieldMetadata,
@@ -90,6 +90,8 @@ export const BasePegaDxilMyRadiobuttons: Story = args => {
90
90
  BasePegaDxilMyRadiobuttons.args = {
91
91
  label: configProps.label,
92
92
  helperText: configProps.helperText,
93
+ placeholder: configProps.placeholder,
94
+ inline: configProps.inline,
93
95
  testId: configProps.testId,
94
96
  readOnly: configProps.readOnly,
95
97
  disabled: configProps.disabled,
@@ -19,7 +19,6 @@ interface PegaDxilMyRadiobuttonsProps extends PConnFieldProps {
19
19
  listType: string;
20
20
  datasource: Array<any>;
21
21
  inline: boolean;
22
- align: string;
23
22
  }
24
23
 
25
24
 
@@ -62,7 +61,6 @@ function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
62
61
  datasource = [],
63
62
  listType,
64
63
  validatemessage,
65
- align = 'vertical',
66
64
  testId,
67
65
  additionalProps = {},
68
66
  displayMode,
@@ -185,7 +183,6 @@ function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
185
183
  // @ts-ignore
186
184
  pConn.getValidationApi().validate(event.target.value);
187
185
  }}
188
- align={align}
189
186
  disabled={disabled}
190
187
  className='standard'
191
188
  name={fullReference}
@@ -23,6 +23,7 @@ export const configProps = {
23
23
  testId: 'picklist-12345678',
24
24
  hasSuggestions: false,
25
25
  displayMode: '',
26
+ inline: false,
26
27
  hideLabel: false,
27
28
  readOnly: false,
28
29
  required: false,
@@ -95,6 +95,8 @@ export const BasePegaDxilMySearchbox: Story = args => {
95
95
  BasePegaDxilMySearchbox.args = {
96
96
  label: configProps.label,
97
97
  helperText: configProps.helperText,
98
+ placeholder: configProps.placeholder,
99
+ isTableFormatter: false,
98
100
  testId: configProps.testId,
99
101
  readOnly: configProps.readOnly,
100
102
  disabled: configProps.disabled,
@@ -59,6 +59,7 @@ export const BasePegaDxilMyText: Story = args => {
59
59
  BasePegaDxilMyText.args = {
60
60
  label: configProps.label,
61
61
  helperText: configProps.helperText,
62
+ placeholder: configProps.placeholder,
62
63
  testId: configProps.testId,
63
64
  readOnly: configProps.readOnly,
64
65
  disabled: configProps.disabled,
@@ -2,9 +2,9 @@
2
2
  import React from 'react';
3
3
  import { Status } from '@pega/cosmos-react-core';
4
4
 
5
- export default function StatusWorkRenderer({ value } : any) {
5
+ export default function StatusWorkRenderer({ value }: any) {
6
6
  // need to cast variant
7
- let variant : 'success' | 'urgent' | 'warn' | 'pending' | 'info';
7
+ let variant: 'success' | 'urgent' | 'warn' | 'pending' | 'info';
8
8
  variant = 'info';
9
9
 
10
10
  const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];
@@ -22,11 +22,5 @@ export default function StatusWorkRenderer({ value } : any) {
22
22
  variant = 'pending';
23
23
  }
24
24
 
25
-
26
-
27
- return (
28
- <Status type='rectangle' variant={variant} >
29
- {value}
30
- </Status>
31
- );
25
+ return <Status variant={variant}>{value}</Status>;
32
26
  }
@@ -56,6 +56,7 @@ export const BasePegaDxilMyTextInput: Story = args => {
56
56
  BasePegaDxilMyTextInput.args = {
57
57
  label: configProps.label,
58
58
  helperText: configProps.helperText,
59
+ placeholder: configProps.placeholder,
59
60
  testId: configProps.testId,
60
61
  readOnly: configProps.readOnly,
61
62
  disabled: configProps.disabled,
@@ -143,7 +143,7 @@ function PegaDxilMyTextInput(props: PegaDxilMyTextInputProps) {
143
143
  displayComp = textFormatter(formatter, value);
144
144
  }
145
145
  return displayMode === 'DISPLAY_ONLY' ? (
146
- <StyledPegaDxilMyTextInputWrapper> displayComp </StyledPegaDxilMyTextInputWrapper>
146
+ <StyledPegaDxilMyTextInputWrapper> {displayComp} </StyledPegaDxilMyTextInputWrapper>
147
147
  ) : (
148
148
  <StyledPegaDxilMyTextInputWrapper>
149
149
  <FieldValueList