@pega/dx-component-builder-sdk 0.23.5 → 0.23.7

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 (178) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/templates/Constellation/field/Text/index.jsx.mustache +1 -1
  3. package/src/tasks/create/templates/Constellation/field/Text-Input/index.jsx.mustache +1 -1
  4. package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +30 -29
  5. package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +6 -2
  6. package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +6 -2
  7. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +4 -1
  8. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +4 -1
  9. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +5 -2
  10. package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +6 -2
  11. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +4 -1
  12. package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +4 -1
  13. package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +6 -2
  14. package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +4 -1
  15. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +4 -1
  16. package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +4 -1
  17. package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +6 -2
  18. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +6 -2
  19. package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +4 -2
  20. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +4 -2
  21. package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +7 -6
  22. package/tests/assets/components/SDK-React/create/custom-constellation/field/Pega_DXIL_MyTestText/index.jsx +1 -1
  23. package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +4 -1
  24. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +47 -0
  25. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/AlertBanner/index.tsx +1 -0
  26. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +5 -3
  27. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +1 -1
  28. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
  29. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/RichTextEditor/index.tsx +1 -0
  30. package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx +29 -27
  31. package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +10 -6
  32. package/tests/assets/components/SDK-React/create/override-sdk/field/Currency/Currency.tsx +16 -15
  33. package/tests/assets/components/SDK-React/create/override-sdk/field/Date/Date.tsx +16 -15
  34. package/tests/assets/components/SDK-React/create/override-sdk/field/DateTime/DateTime.tsx +19 -14
  35. package/tests/assets/components/SDK-React/create/override-sdk/field/Decimal/Decimal.tsx +18 -16
  36. package/tests/assets/components/SDK-React/create/override-sdk/field/Dropdown/Dropdown.tsx +17 -25
  37. package/tests/assets/components/SDK-React/create/override-sdk/field/Email/Email.tsx +11 -11
  38. package/tests/assets/components/SDK-React/create/override-sdk/field/Integer/Integer.tsx +9 -7
  39. package/tests/assets/components/SDK-React/create/override-sdk/field/Percentage/Percentage.tsx +9 -9
  40. package/tests/assets/components/SDK-React/create/override-sdk/field/Phone/Phone.tsx +13 -12
  41. package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +16 -35
  42. package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/RichText.tsx +95 -0
  43. package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/index.tsx +1 -0
  44. package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/ScalarList.tsx +73 -0
  45. package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/config-ext.json +8 -0
  46. package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/index.tsx +1 -0
  47. package/tests/assets/components/SDK-React/create/override-sdk/field/SemanticLink/SemanticLink.tsx +19 -19
  48. package/tests/assets/components/SDK-React/create/override-sdk/field/TextArea/TextArea.tsx +8 -6
  49. package/tests/assets/components/SDK-React/create/override-sdk/field/TextInput/TextInput.tsx +8 -7
  50. package/tests/assets/components/SDK-React/create/override-sdk/field/Time/Time.tsx +16 -28
  51. package/tests/assets/components/SDK-React/create/override-sdk/field/URL/URL.tsx +10 -8
  52. package/tests/assets/components/SDK-React/create/override-sdk/field/UserReference/UserReference.tsx +29 -29
  53. package/tests/assets/components/SDK-React/create/override-sdk/infra/Assignment/Assignment.tsx +5 -2
  54. package/tests/assets/components/SDK-React/create/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +4 -2
  55. package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +13 -13
  56. package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  57. package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +172 -0
  58. package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/index.tsx +1 -0
  59. package/tests/assets/components/SDK-React/create/override-sdk/infra/MultiStep/MultiStep.tsx +4 -3
  60. package/tests/assets/components/SDK-React/create/override-sdk/infra/NavBar/NavBar.tsx +2 -1
  61. package/tests/assets/components/SDK-React/create/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +4 -1
  62. package/tests/assets/components/SDK-React/create/override-sdk/template/AppShell/AppShell.tsx +6 -4
  63. package/tests/assets/components/SDK-React/create/override-sdk/template/BannerPage/BannerPage.tsx +4 -1
  64. package/tests/assets/components/SDK-React/create/override-sdk/template/CaseSummary/CaseSummary.tsx +4 -1
  65. package/tests/assets/components/SDK-React/create/override-sdk/template/CaseView/CaseView.tsx +10 -13
  66. package/tests/assets/components/SDK-React/create/override-sdk/template/Confirmation/Confirmation.tsx +23 -44
  67. package/tests/assets/components/SDK-React/create/override-sdk/template/DataReference/DataReference.tsx +43 -64
  68. package/tests/assets/components/SDK-React/create/override-sdk/template/Details/Details.tsx +8 -4
  69. package/tests/assets/components/SDK-React/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +8 -4
  70. package/tests/assets/components/SDK-React/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +8 -4
  71. package/tests/assets/components/SDK-React/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +6 -2
  72. package/tests/assets/components/SDK-React/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +5 -1
  73. package/tests/assets/components/SDK-React/create/override-sdk/template/ListPage/ListPage.tsx +6 -3
  74. package/tests/assets/components/SDK-React/create/override-sdk/template/ListView/ListView.tsx +89 -93
  75. package/tests/assets/components/SDK-React/create/override-sdk/template/ListView/utils.ts +170 -23
  76. package/tests/assets/components/SDK-React/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +9 -9
  77. package/tests/assets/components/SDK-React/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +8 -4
  78. package/tests/assets/components/SDK-React/create/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +4 -1
  79. package/tests/assets/components/SDK-React/create/override-sdk/template/OneColumnPage/OneColumnPage.tsx +3 -1
  80. package/tests/assets/components/SDK-React/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +4 -1
  81. package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTable/SimpleTable.tsx +88 -5
  82. package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +6 -4
  83. package/tests/assets/components/SDK-React/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +22 -18
  84. package/tests/assets/components/SDK-React/create/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +3 -2
  85. package/tests/assets/components/SDK-React/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +8 -3
  86. package/tests/assets/components/SDK-React/create/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +4 -3
  87. package/tests/assets/components/SDK-React/create/override-sdk/widget/Attachment/Attachment.tsx +5 -1
  88. package/tests/assets/components/SDK-React/create/override-sdk/widget/FileUtility/FileUtility.tsx +8 -2
  89. package/tests/assets/components/SDK-React/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +4 -1
  90. package/tests/assets/components/SDK-React/create/override-sdk/widget/SummaryList/SummaryList.tsx +4 -1
  91. package/tests/assets/components/SDK-React/create/override-sdk/widget/ToDo/ToDo.tsx +53 -82
  92. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyText/index.jsx +1 -1
  93. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.jsx +1 -1
  94. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +30 -29
  95. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +4 -1
  96. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +6 -2
  97. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +6 -2
  98. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +4 -1
  99. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +6 -2
  100. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +6 -2
  101. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +4 -1
  102. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +5 -2
  103. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +4 -1
  104. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +4 -1
  105. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +4 -1
  106. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +4 -1
  107. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +6 -2
  108. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +6 -2
  109. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +4 -2
  110. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +7 -6
  111. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -2
  112. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +47 -0
  113. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/AlertBanner/index.tsx +1 -0
  114. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +5 -3
  115. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
  116. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/RichTextEditor/index.tsx +1 -0
  117. package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +29 -27
  118. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +10 -6
  119. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx +16 -15
  120. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Date/Date.tsx +16 -15
  121. package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx +19 -14
  122. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Decimal/Decimal.tsx +18 -16
  123. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx +17 -25
  124. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Email/Email.tsx +11 -11
  125. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Integer/Integer.tsx +9 -7
  126. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Percentage/Percentage.tsx +9 -9
  127. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Phone/Phone.tsx +13 -12
  128. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +16 -35
  129. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/RichText.tsx +95 -0
  130. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/index.tsx +1 -0
  131. package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +25 -18
  132. package/tests/assets/components/SDK-React/createAll/override-sdk/field/SemanticLink/SemanticLink.tsx +19 -19
  133. package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextArea/TextArea.tsx +8 -6
  134. package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx +8 -7
  135. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Time/Time.tsx +16 -28
  136. package/tests/assets/components/SDK-React/createAll/override-sdk/field/URL/URL.tsx +10 -8
  137. package/tests/assets/components/SDK-React/createAll/override-sdk/field/UserReference/UserReference.tsx +29 -29
  138. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx +5 -2
  139. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +4 -2
  140. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +172 -0
  141. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/index.tsx +1 -0
  142. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +4 -3
  143. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +4 -1
  144. package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx +6 -4
  145. package/tests/assets/components/SDK-React/createAll/override-sdk/template/BannerPage/BannerPage.tsx +4 -1
  146. package/tests/assets/components/SDK-React/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +4 -1
  147. package/tests/assets/components/SDK-React/createAll/override-sdk/template/CaseView/CaseView.tsx +6 -3
  148. package/tests/assets/components/SDK-React/createAll/override-sdk/template/Confirmation/Confirmation.tsx +23 -44
  149. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +6 -2
  150. package/tests/assets/components/SDK-React/createAll/override-sdk/template/Details/Details.tsx +5 -1
  151. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +5 -1
  152. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +5 -1
  153. package/tests/assets/components/SDK-React/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +6 -2
  154. package/tests/assets/components/SDK-React/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +5 -1
  155. package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListPage/ListPage.tsx +6 -3
  156. package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListView/ListView.tsx +89 -93
  157. package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListView/utils.ts +170 -23
  158. package/tests/assets/components/SDK-React/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +5 -1
  159. package/tests/assets/components/SDK-React/createAll/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +4 -1
  160. package/tests/assets/components/SDK-React/createAll/override-sdk/template/OneColumnPage/OneColumnPage.tsx +3 -1
  161. package/tests/assets/components/SDK-React/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +4 -1
  162. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTable/SimpleTable.tsx +88 -5
  163. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +6 -4
  164. package/tests/assets/components/SDK-React/createAll/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +3 -2
  165. package/tests/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +5 -1
  166. package/tests/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +4 -3
  167. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/Attachment/Attachment.tsx +5 -1
  168. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +8 -2
  169. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +4 -1
  170. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/SummaryList/SummaryList.tsx +4 -1
  171. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/ToDo/ToDo.tsx +53 -82
  172. package/tests/functional/localCreateBuildAllDeleteAllCustom.test.js +1 -1
  173. package/tests/functional/localCreateBuildDeleteCustom.test.js +14 -1
  174. package/tests/functional/localCreateBuildDeleteOverride.test.js +2 -1
  175. package/tests/functional/localCreatePublishAllDeleteAllCustom.test.js +5 -3
  176. package/tests/functional/localCreatePublishAllDeleteAllOverride.test.js +3 -5
  177. package/tests/functional/localCreatePublishDeleteCustom.test.js +4 -3
  178. package/tests/functional/localCreatePublishDeleteOverride.test.js +2 -5
@@ -2,11 +2,9 @@ import React from 'react';
2
2
  import { TextField } from '@material-ui/core';
3
3
  import { makeStyles } from '@material-ui/core/styles';
4
4
 
5
- import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
6
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
5
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
6
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
7
 
9
-
10
8
  // Inspired by https://stackoverflow.com/questions/50823182/material-ui-remove-up-down-arrow-dials-from-textview
11
9
  const useStyles = makeStyles((/* theme */) => ({
12
10
  input: {
@@ -24,13 +22,15 @@ const useStyles = makeStyles((/* theme */) => ({
24
22
  }
25
23
  }));
26
24
 
27
-
28
25
  interface PercentageProps extends PConnFieldProps {
29
26
  // If any, enter additional props that only exist on Percentage here
30
27
  }
31
28
 
32
-
33
29
  export default function Percentage(props: PercentageProps) {
30
+ // Get emitted components from map (so we can get any override that may exist)
31
+ const TextInput = getComponentFromMap('TextInput');
32
+ const FieldValueList = getComponentFromMap('FieldValueList');
33
+
34
34
  const classes = useStyles();
35
35
 
36
36
  const {
@@ -57,7 +57,7 @@ export default function Percentage(props: PercentageProps) {
57
57
  }
58
58
 
59
59
  if (displayMode === 'STACKED_LARGE_VAL') {
60
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
60
+ return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
61
61
  }
62
62
 
63
63
  if (readOnly) {
@@ -76,8 +76,8 @@ export default function Percentage(props: PercentageProps) {
76
76
  fullWidth
77
77
  variant={readOnly ? 'standard' : 'outlined'}
78
78
  helperText={helperTextToDisplay}
79
- placeholder=''
80
- size='small'
79
+ placeholder=""
80
+ size="small"
81
81
  required={required}
82
82
  disabled={disabled}
83
83
  onChange={onChange}
@@ -85,7 +85,7 @@ export default function Percentage(props: PercentageProps) {
85
85
  error={status === 'error'}
86
86
  label={label}
87
87
  value={value}
88
- type='number'
88
+ type="number"
89
89
  inputProps={{ ...testProp }}
90
90
  />
91
91
  );
@@ -1,15 +1,16 @@
1
1
  import React from 'react';
2
2
  import MuiPhoneNumber from 'material-ui-phone-number';
3
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
4
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  interface PhoneProps extends PConnFieldProps {
7
7
  // If any, enter additional props that only exist on Phone here
8
8
  }
9
9
 
10
-
11
-
12
10
  export default function Phone(props: PhoneProps) {
11
+ // Get emitted components from map (so we can get any override that may exist)
12
+ const FieldValueList = getComponentFromMap('FieldValueList');
13
+
13
14
  const {
14
15
  label,
15
16
  required,
@@ -38,7 +39,7 @@ export default function Phone(props: PhoneProps) {
38
39
  }
39
40
 
40
41
  if (displayMode === 'STACKED_LARGE_VAL') {
41
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
42
+ return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
42
43
  }
43
44
 
44
45
  if (readOnly) {
@@ -48,8 +49,8 @@ export default function Phone(props: PhoneProps) {
48
49
  <MuiPhoneNumber
49
50
  fullWidth
50
51
  helperText={helperTextToDisplay}
51
- placeholder=''
52
- size='small'
52
+ placeholder=""
53
+ size="small"
53
54
  required={required}
54
55
  disabled={disabled}
55
56
  onChange={onChange}
@@ -66,13 +67,13 @@ export default function Phone(props: PhoneProps) {
66
67
  );
67
68
  }
68
69
 
69
- const handleChange = inputVal => {
70
+ const handleChange = (inputVal) => {
70
71
  let phoneValue = inputVal && inputVal.replace(/\D+/g, '');
71
72
  phoneValue = `+${phoneValue}`;
72
73
  onChange({ value: phoneValue });
73
74
  };
74
75
 
75
- const handleBlur = event => {
76
+ const handleBlur = (event) => {
76
77
  const phoneValue = event?.target?.value;
77
78
  event.target.value = `+${phoneValue && phoneValue.replace(/\D+/g, '')}`;
78
79
  onBlur(event);
@@ -81,11 +82,11 @@ export default function Phone(props: PhoneProps) {
81
82
  return (
82
83
  <MuiPhoneNumber
83
84
  fullWidth
84
- variant='outlined'
85
+ variant="outlined"
85
86
  helperText={helperTextToDisplay}
86
- placeholder=''
87
- size='small'
88
- defaultCountry='us'
87
+ placeholder=""
88
+ size="small"
89
+ defaultCountry="us"
89
90
  required={required}
90
91
  disabled={disabled}
91
92
  onChange={handleChange}
@@ -1,16 +1,9 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import {
3
- Radio,
4
- RadioGroup,
5
- FormControl,
6
- FormControlLabel,
7
- FormLabel,
8
- FormHelperText
9
- } from '@material-ui/core';
2
+ import { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@material-ui/core';
10
3
 
11
4
  import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
12
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
13
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
6
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
14
7
  // import type { PConnFieldProps } from '../../../types/PConnProps';
15
8
 
16
9
  // Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private
@@ -22,6 +15,9 @@ import FieldValueList from '@pega/react-sdk-components/lib/components/designSyst
22
15
 
23
16
 
24
17
  export default function RadioButtons(props /* : RadioButtonsProps */ ) {
18
+ // Get emitted components from map (so we can get any override that may exist)
19
+ const FieldValueList = getComponentFromMap('FieldValueList');
20
+
25
21
  const {
26
22
  getPConnect,
27
23
  label,
@@ -49,9 +45,7 @@ export default function RadioButtons(props /* : RadioButtonsProps */ ) {
49
45
  configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;
50
46
  configProperty = configProperty.startsWith('.') ? configProperty.substring(1) : configProperty;
51
47
 
52
- const metaData = Array.isArray(fieldMetadata)
53
- ? fieldMetadata.filter(field => field?.classID === className)[0]
54
- : fieldMetadata;
48
+ const metaData = Array.isArray(fieldMetadata) ? fieldMetadata.filter((field) => field?.classID === className)[0] : fieldMetadata;
55
49
  let displayName = metaData?.datasource?.propertyForDisplayText;
56
50
  displayName = displayName?.slice(displayName.lastIndexOf('.') + 1);
57
51
  const localeContext = metaData?.datasource?.tableType === 'DataPage' ? 'datapage' : 'associated';
@@ -72,11 +66,7 @@ export default function RadioButtons(props /* : RadioButtonsProps */ ) {
72
66
  return (
73
67
  <FieldValueList
74
68
  name={hideLabel ? '' : label}
75
- value={thePConn.getLocalizedValue(
76
- value,
77
- localePath,
78
- thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
79
- )}
69
+ value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
80
70
  />
81
71
  );
82
72
  }
@@ -85,34 +75,25 @@ export default function RadioButtons(props /* : RadioButtonsProps */ ) {
85
75
  return (
86
76
  <FieldValueList
87
77
  name={hideLabel ? '' : label}
88
- value={thePConn.getLocalizedValue(
89
- value,
90
- localePath,
91
- thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
92
- )}
93
- variant='stacked'
78
+ value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
79
+ variant="stacked"
94
80
  />
95
81
  );
96
82
  }
97
83
 
98
- const handleChange = event => {
84
+ const handleChange = (event) => {
99
85
  handleEvent(actionsApi, 'changeNblur', propName, event.target.value);
100
86
  };
101
87
 
102
- const handleBlur = event => {
103
- thePConn.getValidationApi().validate(event.target.value, ""); // 2nd arg empty string until typedef marked correctly as optional
88
+ const handleBlur = (event) => {
89
+ thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional
104
90
  };
105
91
 
106
92
  return (
107
93
  <FormControl error={status === 'error'} required={required}>
108
- <FormLabel component='legend'>{label}</FormLabel>
109
- <RadioGroup
110
- value={theSelectedButton}
111
- onChange={handleChange}
112
- onBlur={!readOnly ? handleBlur : undefined}
113
- row={inline}
114
- >
115
- {theOptions.map(theOption => {
94
+ <FormLabel component="legend">{label}</FormLabel>
95
+ <RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>
96
+ {theOptions.map((theOption) => {
116
97
  return (
117
98
  <FormControlLabel
118
99
  value={theOption.key}
@@ -122,7 +103,7 @@ export default function RadioButtons(props /* : RadioButtonsProps */ ) {
122
103
  localePath,
123
104
  thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
124
105
  )}
125
- control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}
106
+ control={<Radio key={theOption.key} color="primary" disabled={readOnly} />}
126
107
  />
127
108
  );
128
109
  })}
@@ -0,0 +1,95 @@
1
+ import React, { useRef } from 'react';
2
+ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+
6
+ interface RichTextProps extends PConnFieldProps {
7
+ // If any, enter additional props that only exist on TextArea here
8
+ additionalProps?: object;
9
+ }
10
+
11
+ export default function RichText(props: RichTextProps) {
12
+ // Get emitted components from map (so we can get any override that may exist)
13
+ const FieldValueList = getComponentFromMap('FieldValueList');
14
+ const RichTextEditor = getComponentFromMap('RichTextEditor');
15
+
16
+ const { getPConnect, value, placeholder, validatemessage, label, hideLabel, helperText, testId, displayMode, additionalProps } = props;
17
+ const pConn = getPConnect();
18
+ const editorRef: any = useRef(null);
19
+
20
+ let { readOnly, required, disabled } = props;
21
+ [readOnly, required, disabled] = [readOnly, required, disabled].map((prop) => prop === true || (typeof prop === 'string' && prop === 'true'));
22
+
23
+ const helperTextToDisplay = validatemessage || helperText;
24
+
25
+ if (displayMode === 'LABELS_LEFT') {
26
+ return <FieldValueList name={hideLabel ? '' : label} value={value} />;
27
+ }
28
+
29
+ if (displayMode === 'STACKED_LARGE_VAL') {
30
+ return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
31
+ }
32
+
33
+ let richTextComponent;
34
+
35
+ if (readOnly) {
36
+ // Rich Text read-only component
37
+ richTextComponent = (
38
+ <RichTextEditor
39
+ {...additionalProps}
40
+ label={label}
41
+ labelHidden={hideLabel}
42
+ defaultValue={value}
43
+ testId={testId}
44
+ info={helperTextToDisplay}
45
+ ref={editorRef}
46
+ readOnly
47
+ />
48
+ );
49
+ } else {
50
+ // Rich Text editable component
51
+ const actionsApi = pConn.getActionsApi();
52
+ let status = '';
53
+ if (validatemessage !== '') {
54
+ status = 'error';
55
+ }
56
+ const handleChange = () => {
57
+ if (status === 'error') {
58
+ const property = pConn.getStateProps()["value"];
59
+ pConn.clearErrorMessages({
60
+ property,
61
+ category: '',
62
+ context: ''
63
+ });
64
+ }
65
+ };
66
+
67
+ const handleBlur = () => {
68
+ if (editorRef.current) {
69
+ const editorValue = editorRef.current.getContent({ format: 'html' });
70
+ const property = pConn.getStateProps()["value"];
71
+ handleEvent(actionsApi, 'changeNblur', property, editorValue);
72
+ }
73
+ };
74
+
75
+ richTextComponent = (
76
+ <RichTextEditor
77
+ {...additionalProps}
78
+ label={label}
79
+ labelHidden={hideLabel}
80
+ info={helperTextToDisplay}
81
+ defaultValue={value}
82
+ placeholder={placeholder}
83
+ disabled={disabled}
84
+ required={required}
85
+ testId={testId}
86
+ ref={editorRef}
87
+ error={status === 'error'}
88
+ onBlur={handleBlur}
89
+ onChange={handleChange}
90
+ />
91
+ );
92
+ }
93
+
94
+ return richTextComponent;
95
+ }
@@ -0,0 +1 @@
1
+ export { default } from './RichText';
@@ -1,17 +1,17 @@
1
1
  /* eslint-disable react/no-array-index-key */
2
2
  import React from 'react';
3
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
4
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  // ScalarListProps can't extend PConnFieldProps because its 'value' has a different type
7
7
  interface ScalarListProps extends PConnProps {
8
8
  // If any, enter additional props that only exist on this component
9
- displayInModal: boolean,
10
- hideLabel: boolean,
11
- value: Array<any>,
12
- componentType: string,
13
- label: string,
14
- displayMode: string
9
+ displayInModal: boolean;
10
+ hideLabel: boolean;
11
+ value: Array<any>;
12
+ componentType: string;
13
+ label: string;
14
+ displayMode: string;
15
15
  }
16
16
 
17
17
  function CommaSeparatedList(props) {
@@ -27,6 +27,9 @@ function CommaSeparatedList(props) {
27
27
  }
28
28
 
29
29
  export default function ScalarList(props: ScalarListProps) {
30
+ // Get emitted components from map (so we can get any override that may exist)
31
+ const FieldValueList = getComponentFromMap('FieldValueList');
32
+
30
33
  const {
31
34
  label,
32
35
  getPConnect,
@@ -38,17 +41,21 @@ export default function ScalarList(props: ScalarListProps) {
38
41
  } = props;
39
42
 
40
43
  const items = scalarValues?.map(scalarValue => {
41
- return getPConnect().createComponent({
42
- type: componentType,
43
- config: {
44
- value: scalarValue,
45
- displayMode: 'LABELS_LEFT',
46
- label,
47
- ...restProps,
48
- readOnly: 'true'
49
- }
50
- },
51
- '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
44
+ return getPConnect().createComponent(
45
+ {
46
+ type: componentType,
47
+ config: {
48
+ value: scalarValue,
49
+ displayMode: 'LABELS_LEFT',
50
+ label,
51
+ ...restProps,
52
+ readOnly: 'true'
53
+ }
54
+ },
55
+ '',
56
+ '',
57
+ {}
58
+ ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
52
59
  });
53
60
 
54
61
  if (['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode)) {
@@ -1,11 +1,10 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  import Typography from '@material-ui/core/Typography';
3
3
  import Grid from '@material-ui/core/Grid';
4
4
  import { makeStyles } from '@material-ui/core/styles';
5
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
5
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
6
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
8
-
9
8
  /* although this is called the SemanticLink component, we are not yet displaying as a
10
9
  SemanticLink in SDK and only showing the value as a read only text field. */
11
10
 
@@ -18,7 +17,7 @@ const useStyles = makeStyles((theme) => ({
18
17
  marginRight: theme.spacing(1),
19
18
  marginLeft: theme.spacing(1),
20
19
  marginTop: theme.spacing(1),
21
- marginBottom: theme.spacing(1),
20
+ marginBottom: theme.spacing(1)
22
21
  },
23
22
  fieldMargin: {
24
23
  paddingRight: theme.spacing(1),
@@ -28,7 +27,7 @@ const useStyles = makeStyles((theme) => ({
28
27
  marginRight: theme.spacing(1),
29
28
  marginLeft: theme.spacing(1),
30
29
  marginTop: theme.spacing(1),
31
- marginBottom: theme.spacing(1),
30
+ marginBottom: theme.spacing(1)
32
31
  },
33
32
  fieldLabel: {
34
33
  fontWeight: 400,
@@ -43,34 +42,35 @@ const useStyles = makeStyles((theme) => ({
43
42
  interface SemanticLinkProps extends PConnFieldProps {
44
43
  // If any, enter additional props that only exist on SemanticLink here
45
44
  // from previous PropTypes
46
- text: string,
45
+ text: string;
47
46
  }
48
47
 
49
48
  export default function SemanticLink(props: SemanticLinkProps) {
50
- const {
51
- text,
52
- displayMode,
53
- label,
54
- hideLabel
55
- } = props;
56
- const classes = useStyles();
49
+ // Get emitted components from map (so we can get any override that may exist)
50
+ const FieldValueList = getComponentFromMap('FieldValueList');
57
51
 
52
+ const { text, displayMode, label, hideLabel } = props;
53
+ const classes = useStyles();
58
54
 
59
- if (displayMode === "LABELS_LEFT" || (!displayMode && label !== undefined)) {
60
- const value = text || "---";
55
+ if (displayMode === 'LABELS_LEFT' || (!displayMode && label !== undefined)) {
56
+ const value = text || '---';
61
57
  return (
62
- <Grid container spacing={1} style={{padding: "4px 0px"}} id="semantic-link-grid">
58
+ <Grid container spacing={1} style={{ padding: '4px 0px' }} id="semantic-link-grid">
63
59
  <Grid item xs={6}>
64
- <Typography variant="body2" component="span" className={`${classes.fieldLabel} ${classes.fieldMargin}`}>{label}</Typography>
60
+ <Typography variant="body2" component="span" className={`${classes.fieldLabel} ${classes.fieldMargin}`}>
61
+ {label}
62
+ </Typography>
65
63
  </Grid>
66
64
  <Grid item xs={6}>
67
- <Typography variant="body2" component="span" className={classes.fieldValue}>{value}</Typography>
65
+ <Typography variant="body2" component="span" className={classes.fieldValue}>
66
+ {value}
67
+ </Typography>
68
68
  </Grid>
69
69
  </Grid>
70
70
  );
71
71
  }
72
72
 
73
73
  if (displayMode === 'STACKED_LARGE_VAL') {
74
- return <FieldValueList name={hideLabel ? '' : label} value={text} variant='stacked' />;
74
+ return <FieldValueList name={hideLabel ? '' : label} value={text} variant="stacked" />;
75
75
  }
76
76
  }
@@ -1,15 +1,17 @@
1
1
  import React from 'react';
2
2
  import { TextField } from '@material-ui/core';
3
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
4
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  interface TextAreaProps extends PConnFieldProps {
7
7
  // If any, enter additional props that only exist on TextArea here
8
- fieldMetadata?: any
8
+ fieldMetadata?: any;
9
9
  }
10
10
 
11
-
12
11
  export default function TextArea(props: TextAreaProps) {
12
+ // Get emitted components from map (so we can get any override that may exist)
13
+ const FieldValueList = getComponentFromMap('FieldValueList');
14
+
13
15
  const {
14
16
  label,
15
17
  required,
@@ -37,7 +39,7 @@ export default function TextArea(props: TextAreaProps) {
37
39
  }
38
40
 
39
41
  if (displayMode === 'STACKED_LARGE_VAL') {
40
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
42
+ return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
41
43
  }
42
44
 
43
45
  if (readOnly) {
@@ -60,8 +62,8 @@ export default function TextArea(props: TextAreaProps) {
60
62
  fullWidth
61
63
  variant={readOnly ? 'standard' : 'outlined'}
62
64
  helperText={helperTextToDisplay}
63
- placeholder=''
64
- size='small'
65
+ placeholder=""
66
+ size="small"
65
67
  required={required}
66
68
  disabled={disabled}
67
69
  onChange={onChange}
@@ -1,17 +1,18 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { TextField } from '@material-ui/core';
3
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
4
3
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
 
7
7
  interface TextInputProps extends PConnFieldProps {
8
8
  // If any, enter additional props that only exist on TextInput here
9
- fieldMetadata?: any
9
+ fieldMetadata?: any;
10
10
  }
11
11
 
12
-
13
-
14
12
  export default function TextInput(props: TextInputProps) {
13
+ // Get emitted components from map (so we can get any override that may exist)
14
+ const FieldValueList = getComponentFromMap('FieldValueList');
15
+
15
16
  const {
16
17
  getPConnect,
17
18
  label,
@@ -49,7 +50,7 @@ export default function TextInput(props: TextInputProps) {
49
50
  }
50
51
 
51
52
  if (displayMode === 'STACKED_LARGE_VAL') {
52
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
53
+ return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
53
54
  }
54
55
 
55
56
  if (readOnly) {
@@ -76,8 +77,8 @@ export default function TextInput(props: TextInputProps) {
76
77
  fullWidth
77
78
  variant={readOnly ? 'standard' : 'outlined'}
78
79
  helperText={helperTextToDisplay}
79
- placeholder=''
80
- size='small'
80
+ placeholder=""
81
+ size="small"
81
82
  required={required}
82
83
  disabled={disabled}
83
84
  onChange={handleChange}
@@ -1,32 +1,20 @@
1
1
  import React from 'react';
2
2
  import { KeyboardTimePicker } from '@material-ui/pickers';
3
- import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
4
- import dayjs from 'dayjs';
5
3
  import AccessTimeIcon from '@material-ui/icons/AccessTime';
6
- import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
4
+ import dayjs from 'dayjs';
5
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
6
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
7
 
9
-
10
8
  interface TimeProps extends PConnFieldProps {
11
9
  // If any, enter additional props that only exist on Time here
12
10
  }
13
11
 
14
-
15
12
  export default function Time(props: TimeProps) {
16
- const {
17
- label,
18
- required,
19
- disabled,
20
- value = '',
21
- validatemessage,
22
- status,
23
- onChange,
24
- readOnly,
25
- helperText,
26
- displayMode,
27
- hideLabel,
28
- testId
29
- } = props;
13
+ // Get emitted components from map (so we can get any override that may exist)
14
+ const FieldValueList = getComponentFromMap('FieldValueList');
15
+ const TextInput = getComponentFromMap('TextInput');
16
+
17
+ const { label, required, disabled, value = '', validatemessage, status, onChange, readOnly, helperText, displayMode, hideLabel, testId } = props;
30
18
  const helperTextToDisplay = validatemessage || helperText;
31
19
 
32
20
  if (displayMode === 'LABELS_LEFT') {
@@ -34,7 +22,7 @@ export default function Time(props: TimeProps) {
34
22
  }
35
23
 
36
24
  if (displayMode === 'STACKED_LARGE_VAL') {
37
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
25
+ return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
38
26
  }
39
27
 
40
28
  if (readOnly) {
@@ -47,14 +35,14 @@ export default function Time(props: TimeProps) {
47
35
  'data-test-id': testId
48
36
  };
49
37
 
50
- const handleChange = date => {
38
+ const handleChange = (date) => {
51
39
  const theValue = date && date.isValid() ? date.format('HH:mm') : null;
52
40
  onChange({ value: theValue });
53
41
  };
54
42
 
55
43
  let timeValue: any = null;
56
44
  if (value) {
57
- const timeArray = value.split(':').map(itm => Number(itm));
45
+ const timeArray = value.split(':').map((itm) => Number(itm));
58
46
  timeValue = dayjs().hour(timeArray[0]).minute(timeArray[1]);
59
47
  }
60
48
 
@@ -65,9 +53,9 @@ export default function Time(props: TimeProps) {
65
53
 
66
54
  return (
67
55
  <KeyboardTimePicker
68
- variant='inline'
69
- inputVariant='outlined'
70
- placeholder='hh:mm am'
56
+ variant="inline"
57
+ inputVariant="outlined"
58
+ placeholder="hh:mm am"
71
59
  keyboardIcon={<AccessTimeIcon />}
72
60
  fullWidth
73
61
  required={required}
@@ -75,11 +63,11 @@ export default function Time(props: TimeProps) {
75
63
  error={status === 'error'}
76
64
  helperText={helperTextToDisplay}
77
65
  minutesStep={5}
78
- size='small'
66
+ size="small"
79
67
  label={label}
80
68
  autoOk
81
- mask='__:__ _m'
82
- format='hh:mm a'
69
+ mask="__:__ _m"
70
+ format="hh:mm a"
83
71
  value={timeValue}
84
72
  onChange={handleChange}
85
73
  InputProps={{ inputProps: { ...testProp } }}