@pega/dx-component-builder-sdk 0.23.14 → 0.23.16

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 (159) hide show
  1. package/package.json +1 -1
  2. package/src/constants.js +8 -0
  3. package/src/tasks/create/templates/Constellation/field/Boolean/index.tsx.mustache +1 -1
  4. package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.html.mustache +5 -1
  5. package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +6 -0
  6. package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.html.mustache +5 -1
  7. package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.ts.mustache +7 -0
  8. package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.ts.mustache +2 -1
  9. package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.scss.mustache +14 -5
  10. package/src/tasks/create/templates/SDK-React/field/Boolean/demo.stories.tsx.mustache +8 -4
  11. package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +17 -15
  12. package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +15 -14
  13. package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.tsx.mustache +15 -14
  14. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +1 -1
  15. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +14 -12
  16. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +2 -2
  17. package/src/tasks/create/templates/SDK-React/field/Integer/demo.stories.tsx.mustache +3 -3
  18. package/src/tasks/create/templates/SDK-React/field/Picklist/demo.stories.tsx.mustache +2 -3
  19. package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/demo.stories.tsx.mustache +3 -3
  20. package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/demo.stories.tsx.mustache +6 -4
  21. package/src/tasks/create/templates/SDK-React/field/Text/demo.stories.tsx.mustache +8 -4
  22. package/src/tasks/create/templates/SDK-React/field/Text-Email/demo.stories.tsx.mustache +8 -4
  23. package/src/tasks/create/templates/SDK-React/field/Text-Input/demo.stories.tsx.mustache +8 -4
  24. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/demo.stories.tsx.mustache +8 -5
  25. package/src/tasks/create/templates/SDK-React/field/Text-Phone/demo.stories.tsx.mustache +6 -4
  26. package/src/tasks/create/templates/SDK-React/field/Text-URL/demo.stories.tsx.mustache +8 -4
  27. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/demo.stories.tsx.mustache +6 -4
  28. package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +22 -22
  29. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +17 -17
  30. package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +30 -18
  31. package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +50 -24
  32. package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.tsx.mustache +37 -21
  33. package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +22 -10
  34. package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +3 -4
  35. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +21 -9
  36. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.html +21 -0
  37. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.scss +18 -0
  38. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.spec.ts +21 -0
  39. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.ts +24 -0
  40. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/material-details-fields/material-details-fields.component.html +8 -2
  41. package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.html +5 -1
  42. package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.ts +6 -0
  43. package/tests/assets/sdk-a/components/create/override-sdk/field/date/date.component.html +5 -1
  44. package/tests/assets/sdk-a/components/create/override-sdk/field/date/date.component.ts +7 -0
  45. package/tests/assets/sdk-a/components/create/override-sdk/field/group/config-ext.json +8 -0
  46. package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.html +25 -0
  47. package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.scss +0 -0
  48. package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.spec.ts +21 -0
  49. package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.ts +84 -0
  50. package/tests/assets/sdk-a/components/create/override-sdk/template/app-shell/app-shell.component.ts +2 -2
  51. package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts +1 -1
  52. package/tests/assets/sdk-a/components/create/override-sdk/template/default-form/default-form.component.scss +9 -5
  53. package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts +2 -1
  54. package/tests/assets/sdk-a/components/create/override-sdk/template/list-view/utils.ts +4 -2
  55. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.html +5 -1
  56. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.ts +6 -0
  57. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/pega-dxil-my-date.component.html +5 -1
  58. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/pega-dxil-my-date.component.ts +7 -0
  59. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/pega-dxil-my-details.component.ts +2 -1
  60. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.scss +14 -5
  61. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.html +21 -0
  62. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.scss +18 -0
  63. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.spec.ts +21 -0
  64. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.ts +24 -0
  65. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/material-details-fields/material-details-fields.component.html +8 -2
  66. package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.html +5 -1
  67. package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.ts +6 -0
  68. package/tests/assets/sdk-a/components/createAll/override-sdk/field/date/date.component.html +5 -1
  69. package/tests/assets/sdk-a/components/createAll/override-sdk/field/date/date.component.ts +7 -0
  70. package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/config-ext.json +8 -0
  71. package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.html +25 -0
  72. package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.scss +0 -0
  73. package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.spec.ts +21 -0
  74. package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.ts +84 -0
  75. package/tests/assets/sdk-a/components/createAll/override-sdk/template/app-shell/app-shell.component.ts +2 -2
  76. package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.ts +1 -1
  77. package/tests/assets/sdk-a/components/createAll/override-sdk/template/default-form/default-form.component.scss +9 -5
  78. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts +2 -1
  79. package/tests/assets/sdk-a/components/createAll/override-sdk/template/list-view/utils.ts +4 -2
  80. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +8 -4
  81. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +15 -16
  82. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +35 -6
  83. package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +7 -4
  84. package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +37 -0
  85. package/tests/assets/sdk-r/components/create/override-sdk/field/Group/config-ext.json +8 -0
  86. package/tests/assets/sdk-r/components/create/override-sdk/field/Group/index.tsx +1 -0
  87. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +14 -1
  88. package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/DefaultForm.css +6 -2
  89. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
  90. package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +22 -16
  91. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/PConnProps.d.ts +46 -0
  92. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +54 -0
  93. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +73 -0
  94. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/mock.ts +15 -0
  95. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/styles.ts +15 -0
  96. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -4
  97. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +23 -21
  98. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.tsx +14 -12
  99. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +0 -1
  100. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +17 -15
  101. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +21 -23
  102. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +15 -14
  103. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +20 -22
  104. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.tsx +15 -14
  105. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +1 -2
  106. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/demo.stories.tsx +8 -4
  107. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +23 -24
  108. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/demo.stories.tsx +3 -3
  109. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +0 -1
  110. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
  111. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +18 -19
  112. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/demo.stories.tsx +2 -2
  113. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +0 -1
  114. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/demo.stories.tsx +6 -4
  115. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +33 -34
  116. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/demo.stories.tsx +2 -3
  117. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
  118. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +6 -4
  119. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +22 -23
  120. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/demo.stories.tsx +3 -3
  121. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/index.tsx +28 -29
  122. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/config.json +83 -0
  123. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +59 -0
  124. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +101 -0
  125. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +16 -0
  126. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/styles.js +7 -0
  127. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/demo.stories.tsx +8 -4
  128. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +15 -16
  129. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/demo.stories.tsx +8 -4
  130. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +15 -16
  131. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +6 -4
  132. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -2
  133. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/demo.stories.tsx +8 -4
  134. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +16 -17
  135. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +22 -22
  136. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +16 -17
  137. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +56 -18
  138. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +3 -4
  139. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/demo.stories.tsx +37 -21
  140. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/index.tsx +4 -5
  141. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +17 -17
  142. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +16 -17
  143. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +50 -24
  144. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +8 -9
  145. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +22 -10
  146. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +10 -11
  147. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +21 -9
  148. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +34 -34
  149. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +3 -4
  150. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +23 -24
  151. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +35 -6
  152. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +7 -4
  153. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +37 -0
  154. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/config-ext.json +8 -0
  155. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/index.tsx +1 -0
  156. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +14 -1
  157. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/DefaultForm.css +6 -2
  158. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
  159. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +22 -16
@@ -14,7 +14,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
14
14
  export default meta;
15
15
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
16
16
 
17
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
17
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
18
18
  const [value, setValue] = useState(configProps.value);
19
19
 
20
20
  const props = {
@@ -35,8 +35,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
35
35
  }
36
36
  };
37
37
  },
38
- onChange: (event) => { setValue(event.target.value); },
39
- onBlur: () => { return configProps.value; }
38
+ onChange: event => {
39
+ setValue(event.target.value);
40
+ },
41
+ onBlur: () => {
42
+ return configProps.value;
43
+ }
40
44
  };
41
45
 
42
46
  return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
@@ -52,5 +56,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
52
56
  status: configProps.status,
53
57
  hideLabel: configProps.hideLabel,
54
58
  displayMode: configProps.displayMode,
55
- validatemessage: configProps.validatemessage,
59
+ validatemessage: configProps.validatemessage
56
60
  };
@@ -14,7 +14,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
14
14
  export default meta;
15
15
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
16
16
 
17
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
17
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
18
18
  const [value, setValue] = useState(configProps.value);
19
19
 
20
20
  const props = {
@@ -35,8 +35,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
35
35
  }
36
36
  };
37
37
  },
38
- onChange: (event) => { setValue(event.target.value); },
39
- onBlur: () => { return configProps.value; }
38
+ onChange: event => {
39
+ setValue(event.target.value);
40
+ },
41
+ onBlur: () => {
42
+ return configProps.value;
43
+ }
40
44
  };
41
45
 
42
46
  return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
@@ -52,6 +56,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
52
56
  status: configProps.status,
53
57
  hideLabel: configProps.hideLabel,
54
58
  displayMode: configProps.displayMode,
55
- validatemessage: configProps.validatemessage,
59
+ validatemessage: configProps.validatemessage
56
60
  };
57
-
@@ -13,9 +13,9 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
13
13
  export default meta;
14
14
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
15
15
 
16
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
16
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
17
17
  const [value, setValue] = useState(configProps.value);
18
-
18
+
19
19
  const props = {
20
20
  value,
21
21
  placeholder: configProps.placeholder,
@@ -36,7 +36,9 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
36
36
  onChange: phone => {
37
37
  setValue(phone.value);
38
38
  },
39
- onBlur: () => { return configProps.value; }
39
+ onBlur: () => {
40
+ return configProps.value;
41
+ }
40
42
  };
41
43
 
42
44
  return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
@@ -52,5 +54,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
52
54
  status: configProps.status,
53
55
  hideLabel: configProps.hideLabel,
54
56
  displayMode: configProps.displayMode,
55
- validatemessage: configProps.validatemessage,
57
+ validatemessage: configProps.validatemessage
56
58
  };
@@ -13,7 +13,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
13
13
  export default meta;
14
14
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
15
15
 
16
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
16
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
17
17
  const [value, setValue] = useState(configProps.value);
18
18
 
19
19
  const props = {
@@ -33,8 +33,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
33
33
  }
34
34
  };
35
35
  },
36
- onChange: (event) => { setValue(event.target.value); },
37
- onBlur: () => { return configProps.value; }
36
+ onChange: event => {
37
+ setValue(event.target.value);
38
+ },
39
+ onBlur: () => {
40
+ return configProps.value;
41
+ }
38
42
  };
39
43
 
40
44
  return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
@@ -50,5 +54,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
50
54
  status: configProps.status,
51
55
  hideLabel: configProps.hideLabel,
52
56
  displayMode: configProps.displayMode,
53
- validatemessage: configProps.validatemessage,
57
+ validatemessage: configProps.validatemessage
54
58
  };
@@ -13,7 +13,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}} > = {
13
13
  export default meta;
14
14
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}} >;
15
15
 
16
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
16
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
17
17
  const [value, setValue] = useState(configProps.value);
18
18
 
19
19
  const props = {
@@ -26,7 +26,9 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
26
26
  updateFieldValue: (propName, theValue) => {
27
27
  setValue(theValue);
28
28
  },
29
- triggerFieldChange: () => {/* nothing */}
29
+ triggerFieldChange: () => {
30
+ /* nothing */
31
+ }
30
32
  };
31
33
  },
32
34
  getStateProps: () => {
@@ -52,5 +54,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
52
54
  status: configProps.status,
53
55
  hideLabel: configProps.hideLabel,
54
56
  displayMode: configProps.displayMode,
55
- validatemessage: configProps.validatemessage,
56
- };
57
+ validatemessage: configProps.validatemessage
58
+ };
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import {{COMPONENT_CLASS_NAME}} from "./index";
4
- import operatorDetails, { pyReviewRaw } from "./mock";
3
+ import {{COMPONENT_CLASS_NAME}} from './index';
4
+ import operatorDetails, { pyReviewRaw } from './mock';
5
5
 
6
6
  const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
7
7
  title: '{{COMPONENT_CLASS_NAME}}',
@@ -20,28 +20,28 @@ window.PCore = {
20
20
  getUserApi: (): any => {
21
21
  return {
22
22
  getOperatorDetails: () => {
23
- return new Promise((resolve) => {
23
+ return new Promise(resolve => {
24
24
  resolve(operatorDetails);
25
25
  });
26
- },
26
+ }
27
27
  };
28
28
  },
29
29
  getEnvironmentInfo: (): any => {
30
- return {
31
- getUseLocale: () => {
32
- return 'en-GB';
33
- },
34
- getLocale: () => {
35
- return 'en-GB';
36
- }
37
- };
38
- }
30
+ return {
31
+ getUseLocale: () => {
32
+ return 'en-GB';
33
+ },
34
+ getLocale: () => {
35
+ return 'en-GB';
36
+ }
37
+ };
38
+ }
39
39
  };
40
40
 
41
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
41
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
42
42
  const props = {
43
- NumCols: "1",
44
- template: "DefaultForm",
43
+ NumCols: '1',
44
+ template: 'DefaultForm',
45
45
  showHighlightedData: false,
46
46
  getPConnect: () => {
47
47
  return {
@@ -57,21 +57,21 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
57
57
  getInheritedProps: () => {
58
58
  return pyReviewRaw.config.inheritedProps;
59
59
  },
60
-
60
+
61
61
  setInheritedProp: () => {
62
62
  /* nothing */
63
63
  },
64
64
  resolveConfigProps: () => {
65
65
  /* nothing */
66
- },
66
+ }
67
67
  };
68
- },
68
+ }
69
69
  };
70
70
 
71
71
  return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
72
72
  };
73
73
 
74
74
  Base{{COMPONENT_CLASS_NAME}}.args = {
75
- label: "Details",
76
- showLabel: true,
77
- }
75
+ label: 'Details',
76
+ showLabel: true
77
+ };
@@ -1,43 +1,43 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import {{COMPONENT_CLASS_NAME}} from "./index";
4
- import operatorDetails, { pyReviewRaw } from "./mock";
3
+ import {{COMPONENT_CLASS_NAME}} from './index';
4
+ import operatorDetails, { pyReviewRaw } from './mock';
5
5
 
6
6
  window.PCore = {
7
7
  ...window.PCore,
8
8
  getUserApi: (): any => {
9
- return new Promise((resolve) => {
10
- resolve(operatorDetails);
11
- });
9
+ return new Promise(resolve => {
10
+ resolve(operatorDetails);
11
+ });
12
12
  },
13
13
  getEnvironmentInfo: (): any => {
14
14
  return {
15
15
  getUseLocale: () => {
16
- return "en-US";
16
+ return 'en-US';
17
17
  },
18
18
  getLocale: () => {
19
19
  return 'en-GB';
20
20
  }
21
21
  };
22
22
  }
23
- }
23
+ };
24
24
 
25
25
  const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
26
26
  title: '{{COMPONENT_CLASS_NAME}}',
27
27
  component: {{COMPONENT_CLASS_NAME}},
28
28
  excludeStories: /.*Data$/,
29
29
  parameters: {
30
- type: "DetailsRegion",
31
- },
30
+ type: 'DetailsRegion'
31
+ }
32
32
  };
33
33
 
34
34
  export default meta;
35
35
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
36
36
 
37
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
37
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
38
38
  const props = {
39
- NumCols: "2",
40
- template: "DefaultForm",
39
+ NumCols: '2',
40
+ template: 'DefaultForm',
41
41
  getPConnect: () => {
42
42
  return {
43
43
  getChildren: () => {
@@ -57,9 +57,9 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
57
57
  },
58
58
  resolveConfigProps: () => {
59
59
  /* nothing */
60
- },
60
+ }
61
61
  };
62
- },
62
+ }
63
63
  };
64
64
 
65
65
  return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
@@ -67,6 +67,6 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
67
67
 
68
68
  Base{{COMPONENT_CLASS_NAME}}.args = {
69
69
  showHighlightedData: false,
70
- label: "Details Region",
71
- showLabel: true,
72
- }
70
+ label: 'Details Region',
71
+ showLabel: true
72
+ };
@@ -11,16 +11,16 @@ window.PCore = {
11
11
  getGenericFailedMessage() {
12
12
  /* nothing */
13
13
  }
14
- }
14
+ };
15
15
  },
16
16
  getConstants: (): any => {
17
17
  return {
18
18
  CASE_INFO: {
19
- INSTRUCTIONS: ""
19
+ INSTRUCTIONS: ''
20
20
  }
21
- }
22
- }
23
- }
21
+ };
22
+ }
23
+ };
24
24
 
25
25
  const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
26
26
  title: '{{COMPONENT_CLASS_NAME}}',
@@ -34,7 +34,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
34
34
  export default meta;
35
35
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
36
36
 
37
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
37
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
38
38
 
39
39
  const [firstName, setFirstName] = useState('John');
40
40
  const [middleName, setMiddleName] = useState('');
@@ -44,10 +44,10 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
44
44
  const [email, setEmail] = useState('john@doe.com');
45
45
 
46
46
  const props = {
47
- NumCols: "1",
47
+ NumCols: '1',
48
48
  template: 'DefaultForm',
49
49
 
50
- getPConnect: () => {
50
+ getPConnect: () => {
51
51
  return {
52
52
  getChildren: () => {
53
53
  return [
@@ -69,8 +69,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
69
69
  return {
70
70
  getActionsApi: () => {
71
71
  return {
72
- updateFieldValue: () => {/* nothing */},
73
- triggerFieldChange: () => {/* nothing */}
72
+ updateFieldValue: () => {
73
+ /* nothing */
74
+ },
75
+ triggerFieldChange: () => {
76
+ /* nothing */
77
+ }
74
78
  };
75
79
  },
76
80
  getStateProps: () => {
@@ -95,8 +99,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
95
99
  return {
96
100
  getActionsApi: () => {
97
101
  return {
98
- updateFieldValue: () => {/* nothing */},
99
- triggerFieldChange: () => {/* nothing */}
102
+ updateFieldValue: () => {
103
+ /* nothing */
104
+ },
105
+ triggerFieldChange: () => {
106
+ /* nothing */
107
+ }
100
108
  };
101
109
  },
102
110
  getStateProps: () => {
@@ -123,8 +131,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
123
131
  return {
124
132
  getActionsApi: () => {
125
133
  return {
126
- updateFieldValue: () => {/* nothing */},
127
- triggerFieldChange: () => {/* nothing */}
134
+ updateFieldValue: () => {
135
+ /* nothing */
136
+ },
137
+ triggerFieldChange: () => {
138
+ /* nothing */
139
+ }
128
140
  };
129
141
  },
130
142
  getStateProps: () => {
@@ -263,14 +275,14 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
263
275
  }
264
276
  ];
265
277
  },
266
- getValue: (val) => {
278
+ getValue: val => {
267
279
  return val;
268
280
  },
269
281
  getCurrentView: () => {
270
- return "";
282
+ return '';
271
283
  },
272
284
  getCurrentClassID: () => {
273
- return "";
285
+ return '';
274
286
  }
275
287
  };
276
288
  }
@@ -279,4 +291,4 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
279
291
  return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
280
292
  };
281
293
 
282
- Base{{COMPONENT_CLASS_NAME}}.args = {}
294
+ Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -14,44 +14,69 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
14
14
  component: {{COMPONENT_CLASS_NAME}},
15
15
  excludeStories: /.*Data$/,
16
16
  parameters: {
17
- type: "TwoColumnForm",
18
- },
17
+ type: 'TwoColumnForm'
18
+ }
19
19
  };
20
20
 
21
21
  export default meta;
22
22
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
23
23
 
24
24
  const renderField = resolvedProps => {
25
- const { displayMode, value = '', label = '', onChange} = resolvedProps;
25
+ const { displayMode, value = '', label = '', onChange } = resolvedProps;
26
26
 
27
27
  const variant = displayMode === 'LABELS_LEFT' ? 'inline' : 'stacked';
28
28
  let val: any = '';
29
29
  if (label === 'Service Date')
30
- val = <MuiPickersUtilsProvider utils={DayjsUtils}><KeyboardDatePicker
31
- variant='inline'
32
- inputVariant='outlined'
33
- placeholder='mm/dd/yyyy'
34
- fullWidth
35
- format='MM/DD/YYYY'
36
- mask='__/__/____'
37
- size='small'
38
- label={label}
39
- value={value || null}
40
- onChange={onChange}
41
- />
42
- </MuiPickersUtilsProvider>
30
+ val = (
31
+ <MuiPickersUtilsProvider utils={DayjsUtils}>
32
+ <KeyboardDatePicker
33
+ variant='inline'
34
+ inputVariant='outlined'
35
+ placeholder='mm/dd/yyyy'
36
+ fullWidth
37
+ format='MM/DD/YYYY'
38
+ mask='__/__/____'
39
+ size='small'
40
+ label={label}
41
+ value={value || null}
42
+ onChange={onChange}
43
+ />
44
+ </MuiPickersUtilsProvider>
45
+ );
43
46
 
44
47
  {{! pick new delimiters for mustache }}
45
48
  {{=<% %>=}}
46
49
 
47
50
  if (label === 'Email')
48
- val = <TextField type='email' fullWidth value={value} size='small' variant='outlined' style={{ fontSize: '14px' }} label={label} onChange={onChange} />;
51
+ val = (
52
+ <TextField
53
+ type='email'
54
+ fullWidth
55
+ value={value}
56
+ size='small'
57
+ variant='outlined'
58
+ style={{ fontSize: '14px' }}
59
+ label={label}
60
+ onChange={onChange}
61
+ />
62
+ );
49
63
 
50
64
  if (label === 'First Name' || label === 'Last Name' || label === 'Middle Name')
51
65
  val = <TextField value={value} fullWidth size='small' variant='outlined' style={{ fontSize: '14px' }} label={label} onChange={onChange} />;
52
66
 
53
67
  if (label === 'Phone Number')
54
- val = <MuiPhoneNumber value={value} fullWidth variant='outlined' size='small' style={{ fontSize: '14px' }} defaultCountry='us' label={label} onChange={onChange} />;
68
+ val = (
69
+ <MuiPhoneNumber
70
+ value={value}
71
+ fullWidth
72
+ variant='outlined'
73
+ size='small'
74
+ style={{ fontSize: '14px' }}
75
+ defaultCountry='us'
76
+ label={label}
77
+ onChange={onChange}
78
+ />
79
+ );
55
80
 
56
81
  <%={{ }}=%> {{! revert delimiters for mustache }}
57
82
 
@@ -62,7 +87,7 @@ const renderField = resolvedProps => {
62
87
  return <span key={label}>{val}</span>;
63
88
  };
64
89
 
65
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
90
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
66
91
  const [firstName, setFirstName] = useState('John');
67
92
  const [middleName, setMiddleName] = useState('');
68
93
  const [lastName, setLastName] = useState('Joe');
@@ -143,7 +168,6 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
143
168
  const changeValue = date && date.isValid() ? date.toISOString() : null;
144
169
  setServiceDate(changeValue);
145
170
  }
146
-
147
171
  }
148
172
  ];
149
173
  const props = {
@@ -182,10 +206,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
182
206
  return props.getPConnect().createComponent(child);
183
207
  });
184
208
 
185
- return <{{COMPONENT_CLASS_NAME}} {...props} {...args} >
186
- {regionAChildren}
187
- {regionBChildren}
188
- </{{COMPONENT_CLASS_NAME}}>;
209
+ return (
210
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args}>
211
+ {regionAChildren}
212
+ {regionBChildren}
213
+ </{{COMPONENT_CLASS_NAME}}>
214
+ );
189
215
  };
190
216
 
191
217
  Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable react/no-unstable-nested-components */
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
 
4
- import AppAnnouncement from "@pega/react-sdk-components/lib/components/widget/AppAnnouncement";
4
+ import AppAnnouncement from '@pega/react-sdk-components/lib/components/widget/AppAnnouncement';
5
5
 
6
6
  import {{COMPONENT_CLASS_NAME}} from './index';
7
7
  import { pyHome1Resolved, pyHome1Raw } from './mock';
@@ -15,8 +15,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
15
15
  export default meta;
16
16
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
17
17
 
18
- export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
19
-
18
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
20
19
  const configProps = pyHome1Resolved.children[0].children[0].config;
21
20
 
22
21
  const props = {
@@ -32,8 +31,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
32
31
  resolve({});
33
32
  });
34
33
  },
35
- updateFieldValue: () => {/* nothing */},
36
- triggerFieldChange: () => {/* nothing */}
34
+ updateFieldValue: () => {
35
+ /* nothing */
36
+ },
37
+ triggerFieldChange: () => {
38
+ /* nothing */
39
+ }
37
40
  };
38
41
  },
39
42
  getChildren: () => {
@@ -49,31 +52,44 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
49
52
  return pyHome1Raw;
50
53
  },
51
54
  createComponent: config => {
52
- if(config.type === 'AppAnnouncement') {
53
- return (
54
- <AppAnnouncement
55
- key='announcement'
56
- header='Announcements'
57
- description={configProps.description}
58
- datasource={configProps.datasource}
59
- whatsnewlink={configProps.whatsnewlink}
60
- />
61
- );
55
+ if (config.type === 'AppAnnouncement') {
56
+ return (
57
+ <AppAnnouncement
58
+ key='announcement'
59
+ header='Announcements'
60
+ description={configProps.description}
61
+ datasource={configProps.datasource}
62
+ whatsnewlink={configProps.whatsnewlink}
63
+ getPConnect={(): typeof PConnect => ({}) as typeof PConnect}
64
+ />
65
+ );
62
66
  }
63
67
  },
64
- ignoreSuggestion: () => {/* nothing */},
65
- acceptSuggestion: () => {/* nothing */},
66
- setInheritedProps: () => {/* nothing */},
67
- resolveConfigProps: () => {/* nothing */}
68
+ ignoreSuggestion: () => {
69
+ /* nothing */
70
+ },
71
+ acceptSuggestion: () => {
72
+ /* nothing */
73
+ },
74
+ setInheritedProps: () => {
75
+ /* nothing */
76
+ },
77
+ resolveConfigProps: () => {
78
+ /* nothing */
79
+ }
68
80
  };
69
81
  }
70
82
  };
71
83
 
72
84
  const regionAChildren = pyHome1Raw.children[0].children.map(child => {
73
- return props.getPConnect().createComponent(child);
85
+ return props.getPConnect().createComponent(child);
74
86
  });
75
87
 
76
- return <{{COMPONENT_CLASS_NAME}} {...props} {...args} >{regionAChildren}</{{COMPONENT_CLASS_NAME}}>;
88
+ return (
89
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args}>
90
+ {regionAChildren}
91
+ </{{COMPONENT_CLASS_NAME}}>
92
+ );
77
93
  };
78
94
 
79
95
  Base{{COMPONENT_CLASS_NAME}}.args = {};