@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
@@ -1,18 +1,20 @@
1
1
  import React from 'react';
2
2
  import { TextField } from '@material-ui/core';
3
- import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
4
- 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';
5
4
  import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
5
 
7
6
  interface URLComponentProps extends PConnFieldProps {
8
7
  // If any, enter additional props that only exist on URLComponent here
9
8
  }
10
9
 
11
-
12
10
  // NOTE: that we had to change the name from URL to URLComponent
13
11
  // Otherwise, we were getting all kinds of weird errors when we
14
12
  // referred to URL as a component.
15
13
  export default function URLComponent(props: URLComponentProps) {
14
+ // Get emitted components from map (so we can get any override that may exist)
15
+ const FieldValueList = getComponentFromMap('FieldValueList');
16
+ const TextInput = getComponentFromMap('TextInput');
17
+
16
18
  const {
17
19
  label,
18
20
  required,
@@ -35,7 +37,7 @@ export default function URLComponent(props: URLComponentProps) {
35
37
  }
36
38
 
37
39
  if (displayMode === 'STACKED_LARGE_VAL') {
38
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
40
+ return <FieldValueList name={hideLabel ? '' : label} value={value} variant="stacked" />;
39
41
  }
40
42
 
41
43
  if (readOnly) {
@@ -50,12 +52,12 @@ export default function URLComponent(props: URLComponentProps) {
50
52
 
51
53
  return (
52
54
  <TextField
53
- type='url'
55
+ type="url"
54
56
  fullWidth
55
- variant='outlined'
57
+ variant="outlined"
56
58
  helperText={helperTextToDisplay}
57
- placeholder=''
58
- size='small'
59
+ placeholder=""
60
+ size="small"
59
61
  required={required}
60
62
  disabled={disabled}
61
63
  onChange={onChange}
@@ -1,8 +1,7 @@
1
1
  import React, { Fragment, memo, useEffect, useState } from 'react';
2
2
  import { Typography } from '@material-ui/core';
3
- import AutoComplete from '@pega/react-sdk-components/lib/components/field/AutoComplete';
4
- import Dropdown from '@pega/react-sdk-components/lib/components/field/Dropdown';
5
3
  import { getUserId, isUserNameAvailable } from './UserReferenceUtils';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
5
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
6
 
8
7
  // Remove this and use "real" PCore type once .d.ts is fixed (currently shows 1 errors)
@@ -11,35 +10,37 @@ declare const PCore: any;
11
10
  const DROPDOWN_LIST = 'Drop-down list';
12
11
  const SEARCH_BOX = 'Search box';
13
12
 
14
-
15
13
  interface UserReferenceProps extends PConnProps {
16
14
  // If any, enter additional props that only exist on URLComponent here
17
- displayAs?: string,
18
- label?: string,
19
- value?: any,
20
- testId?: string,
21
- placeholder?: string,
22
- helperText?: string,
23
- disabled?: boolean,
24
- readOnly?: boolean,
25
- required?: boolean,
26
- validatemessage?: string,
27
- showAsFormattedText?: boolean,
28
- additionalProps?: object,
29
- hideLabel?: boolean,
30
- variant?: string
31
- onChange?: any
15
+ displayAs?: string;
16
+ label?: string;
17
+ value?: any;
18
+ testId?: string;
19
+ placeholder?: string;
20
+ helperText?: string;
21
+ disabled?: boolean;
22
+ readOnly?: boolean;
23
+ required?: boolean;
24
+ validatemessage?: string;
25
+ showAsFormattedText?: boolean;
26
+ additionalProps?: object;
27
+ hideLabel?: boolean;
28
+ variant?: string;
29
+ onChange?: any;
32
30
  }
33
31
 
34
-
35
32
  const UserReference = (props: UserReferenceProps) => {
33
+ // Get emitted components from map (so we can get any override that may exist)
34
+ const AutoComplete = getComponentFromMap('AutoComplete');
35
+ const Dropdown = getComponentFromMap('Dropdown');
36
+
36
37
  const {
37
38
  label = '',
38
39
  displayAs = '',
39
40
  getPConnect,
40
41
  value = '',
41
42
  testId = '',
42
- helperText= '',
43
+ helperText = '',
43
44
  validatemessage = '',
44
45
  placeholder = '',
45
46
  showAsFormattedText = false,
@@ -65,7 +66,7 @@ const UserReference = (props: UserReferenceProps) => {
65
66
  // if same user ref field is referred in view as editable & readonly formatted text
66
67
  // referenced users won't be available, so get user details from dx api
67
68
  const { getOperatorDetails } = PCore.getUserApi();
68
- getOperatorDetails(userId).then(res => {
69
+ getOperatorDetails(userId).then((res) => {
69
70
  if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {
70
71
  setUserName(res.data.pyOperatorInfo.pyUserName);
71
72
  }
@@ -77,14 +78,14 @@ const UserReference = (props: UserReferenceProps) => {
77
78
  };
78
79
  PCore.getRestClient()
79
80
  .invokeRestApi('getListData', { queryPayload })
80
- .then(res => {
81
- const ddDataSource = res.data.data.map(listItem => ({
81
+ .then((res) => {
82
+ const ddDataSource = res.data.data.map((listItem) => ({
82
83
  key: listItem.pyUserIdentifier,
83
84
  value: listItem.pyUserName
84
85
  }));
85
86
  setDropDownDataSource(ddDataSource);
86
87
  })
87
- .catch(err => {
88
+ .catch((err) => {
88
89
  // eslint-disable-next-line no-console
89
90
  console.error(err);
90
91
  });
@@ -101,8 +102,8 @@ const UserReference = (props: UserReferenceProps) => {
101
102
  TODO: This has to be replaced with Operator Component
102
103
  */}
103
104
  <div>
104
- <Typography variant='caption'>{label}</Typography>
105
- <Typography variant='body1'>{userName}</Typography>
105
+ <Typography variant="caption">{label}</Typography>
106
+ <Typography variant="body1">{userName}</Typography>
106
107
  </div>
107
108
  </Fragment>
108
109
  );
@@ -132,7 +133,7 @@ const UserReference = (props: UserReferenceProps) => {
132
133
  label={label}
133
134
  getPConnect={getPConnect}
134
135
  datasource={OPERATORS_DP}
135
- listType='datapage'
136
+ listType="datapage"
136
137
  columns={columns}
137
138
  testId={testId}
138
139
  placeholder={placeholder}
@@ -152,7 +153,7 @@ const UserReference = (props: UserReferenceProps) => {
152
153
  <Dropdown
153
154
  additionalProps={additionalProps}
154
155
  datasource={dropDownDataSource}
155
- listType='associated'
156
+ listType="associated"
156
157
  getPConnect={getPConnect}
157
158
  label={label}
158
159
  value={userId}
@@ -173,7 +174,6 @@ const UserReference = (props: UserReferenceProps) => {
173
174
  return userReferenceComponent;
174
175
  };
175
176
 
176
-
177
177
  // as objects are there in props, shallow comparision fails & re-rendering of comp happens even with
178
178
  // same key value pairs in obj. hence using custom comparison function on when to re-render
179
179
  const comparisonFn = (prevProps, nextProps) => {
@@ -1,9 +1,8 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import AssignmentCard from '@pega/react-sdk-components/lib/components/infra/AssignmentCard';
3
- import MultiStep from '@pega/react-sdk-components/lib/components/infra/MultiStep';
4
2
  import Snackbar from '@material-ui/core/Snackbar';
5
3
  import IconButton from '@material-ui/core/IconButton';
6
4
  import CloseIcon from '@material-ui/icons/Close';
5
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
6
 
8
7
  // import type { PConnProps } from '../../../types/PConnProps';
9
8
 
@@ -22,6 +21,10 @@ import CloseIcon from '@material-ui/icons/Close';
22
21
 
23
22
 
24
23
  export default function Assignment(props /* : AssignmentProps */) {
24
+ // Get emitted components from map (so we can get any override that may exist)
25
+ const AssignmentCard = getComponentFromMap("AssignmentCard");
26
+ const MultiStep = getComponentFromMap("MultiStep");
27
+
25
28
  const { getPConnect, children, itemKey = '', isInModal = false, banners = [] } = props;
26
29
  const thePConn = getPConnect();
27
30
 
@@ -1,7 +1,6 @@
1
1
  import React, { useState, useEffect } from "react";
2
2
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
3
-
4
- import ActionButtons from "@pega/react-sdk-components/lib/components/infra/ActionButtons";
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
4
 
6
5
  interface AssignmentCardProps extends PConnProps {
7
6
  // If any, enter additional props that only exist on this component
@@ -14,6 +13,9 @@ interface AssignmentCardProps extends PConnProps {
14
13
 
15
14
 
16
15
  export default function AssignmentCard(props: AssignmentCardProps) {
16
+ // Get emitted components from map (so we can get any override that may exist)
17
+ const ActionButtons = getComponentFromMap("ActionButtons");
18
+
17
19
  const { children, actionButtons, onButtonPress} = props;
18
20
 
19
21
  const [arMainButtons, setArMainButtons] = useState([]);
@@ -0,0 +1,172 @@
1
+ import React, { useState, useEffect, createElement } from 'react';
2
+ import { Box, Card, CircularProgress } from '@material-ui/core';
3
+ import { makeStyles } from '@material-ui/core/styles';
4
+
5
+ import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
6
+
7
+ // import type { PConnProps } from '../../../types/PConnProps';
8
+
9
+ // Can't use PConnProps until typedefs for showData are fixed
10
+ // interface DeferLoadProps extends PConnProps {
11
+ // // If any, enter additional props that only exist on this component
12
+ // name: string,
13
+ // isChildDeferLoad?: boolean,
14
+ // isTab: boolean
15
+ // }
16
+
17
+
18
+ //
19
+ // WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
20
+ // Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
21
+ // is totally at your own risk.
22
+ //
23
+
24
+ const useStyles = makeStyles(theme => ({
25
+ root: {
26
+ paddingRight: theme.spacing(1),
27
+ paddingLeft: theme.spacing(1),
28
+ paddingTop: theme.spacing(1),
29
+ paddingBottom: theme.spacing(1),
30
+ marginRight: theme.spacing(1),
31
+ marginLeft: theme.spacing(1),
32
+ marginTop: theme.spacing(1),
33
+ marginBottom: theme.spacing(1)
34
+ }
35
+ }));
36
+
37
+ export default function DeferLoad(props /* : DeferLoadProps */) {
38
+ const { getPConnect, name, deferLoadId, isTab } = props;
39
+ const [content, setContent] = useState<any>(null);
40
+ const [isLoading, setLoading] = useState(true);
41
+ const [currentLoadedAssignment, setCurrentLoadedAssignment] = useState("");
42
+
43
+ const classes = useStyles();
44
+
45
+ const pConnect = getPConnect();
46
+ const constants = PCore.getConstants();
47
+
48
+ const theRequestedAssignment = pConnect.getValue( PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL, ''); // 2nd arg empty string until typedef allows optional
49
+ if (theRequestedAssignment !== currentLoadedAssignment) {
50
+ // console.log(`DeferLoad: currentLoadedAssignment about to change from ${currentLoadedAssignment} to ${theRequestedAssignment}`);
51
+ setCurrentLoadedAssignment(theRequestedAssignment);
52
+ }
53
+
54
+ const { CASE, PAGE, DATA } = constants.RESOURCE_TYPES;
55
+ const loadViewCaseID =
56
+ pConnect.getValue(constants.PZINSKEY, '') || pConnect.getValue(constants.CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef allows optional
57
+ let containerName;
58
+ let containerItemData;
59
+ const targetName = pConnect.getTarget();
60
+ if (targetName) {
61
+ containerName = PCore.getContainerUtils().getActiveContainerItemName(targetName);
62
+
63
+ containerItemData = PCore.getContainerUtils().getContainerItemData(targetName, containerName);
64
+ }
65
+
66
+ const { resourceType = CASE } = containerItemData || {
67
+ resourceType: loadViewCaseID ? CASE : PAGE
68
+ };
69
+ const isContainerPreview = /preview_[0-9]*/g.test(pConnect.getContextName());
70
+
71
+ const getViewOptions = () => ({
72
+ viewContext: resourceType,
73
+ pageClass: loadViewCaseID ? '' : pConnect.getDataObject('').pyPortal.classID, // 2nd arg empty string until typedef allows optional
74
+ container: isContainerPreview ? 'preview' : null,
75
+ containerName: isContainerPreview ? 'preview' : null,
76
+ updateData: isContainerPreview
77
+ });
78
+
79
+ const onResponse = data => {
80
+ setLoading(false);
81
+ if (deferLoadId) {
82
+ PCore.getDeferLoadManager().start(
83
+ name,
84
+ getPConnect().getCaseInfo().getKey(),
85
+ getPConnect().getPageReference().replace('caseInfo.content', ''),
86
+ getPConnect().getContextName(),
87
+ deferLoadId
88
+ );
89
+ }
90
+
91
+ if (data && !(data.type && data.type === 'error')) {
92
+ const config = {
93
+ meta: data,
94
+ options: {
95
+ context: pConnect.getContextName(),
96
+ pageReference: pConnect.getPageReference()
97
+ }
98
+ };
99
+ const configObject = PCore.createPConnect(config);
100
+ configObject.getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');
101
+ setContent(createElement(createPConnectComponent(), configObject));
102
+ if (deferLoadId) {
103
+ PCore.getDeferLoadManager().stop(deferLoadId, getPConnect().getContextName());
104
+ }
105
+ }
106
+ };
107
+
108
+ useEffect(() => {
109
+ if (resourceType === DATA) {
110
+ // Rendering defer loaded tabs in data context
111
+ if (containerName) {
112
+ const dataContext = PCore.getStoreValue('.dataContext', 'dataInfo', containerName);
113
+ const dataContextParameters = PCore.getStoreValue(
114
+ '.dataContextParameters',
115
+ 'dataInfo',
116
+ containerName
117
+ );
118
+
119
+ getPConnect()
120
+ .getActionsApi()
121
+ .showData(name, dataContext, dataContextParameters, { // Need to wait for typedefs to be fixed for showData
122
+ skipSemanticUrl: true,
123
+ isDeferLoaded: true
124
+ })
125
+ .then(data => {
126
+ onResponse(data);
127
+ });
128
+ } else {
129
+ // eslint-disable-next-line no-console
130
+ console.error('Cannot load the defer loaded view without container information');
131
+ }
132
+ } else if (resourceType === PAGE) {
133
+ // Rendering defer loaded tabs in case/ page context
134
+ getPConnect()
135
+ .getActionsApi()
136
+ .loadView(encodeURI(loadViewCaseID), name, getViewOptions())
137
+ .then(data => {
138
+ onResponse(data);
139
+ });
140
+ } else {
141
+ getPConnect()
142
+ .getActionsApi()
143
+ .refreshCaseView(encodeURI(loadViewCaseID), name, '') // 3rd arg empty string until typedef allows optional
144
+ .then(data => {
145
+ onResponse(data.root);
146
+ });
147
+ }
148
+ }, [name, getPConnect, currentLoadedAssignment]);
149
+ /* TODO Cosmos need to handle for now added a wrapper div with pos relative */
150
+ let deferLoadContent;
151
+ if (isLoading) {
152
+ deferLoadContent = (
153
+ <div style={{ position: 'relative', height: '100px' }}>
154
+ <Box textAlign='center'>
155
+ <CircularProgress />
156
+ </Box>
157
+ </div>
158
+ );
159
+ } else {
160
+ deferLoadContent = !isTab ? (
161
+ <div className={classes.root}>
162
+ <React.Fragment>{content}</React.Fragment>
163
+ </div>
164
+ ) : (
165
+ <Card id='DeferLoad' className={classes.root}>
166
+ <React.Fragment>{content}</React.Fragment>
167
+ </Card>
168
+ );
169
+ }
170
+
171
+ return deferLoadContent;
172
+ }
@@ -0,0 +1 @@
1
+ export { default } from './DeferLoad';
@@ -1,9 +1,7 @@
1
1
  import React from "react";
2
-
2
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
3
3
  import './MultiStep.css';
4
4
 
5
- import AssignmentCard from '@pega/react-sdk-components/lib/components/infra/AssignmentCard';
6
-
7
5
  // import { useConstellationContext } from "../../bridge/Context/StoreContext";
8
6
 
9
7
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -23,6 +21,9 @@ interface MultiStepProps extends PConnProps {
23
21
 
24
22
 
25
23
  export default function MultiStep(props: MultiStepProps) {
24
+ // Get emitted components from map (so we can get any override that may exist)
25
+ const AssignmentCard = getComponentFromMap("AssignmentCard");
26
+
26
27
  const { getPConnect, children, itemKey = '', actionButtons, onButtonPress} = props;
27
28
  const { bIsVertical, arNavigationSteps } = props;
28
29
 
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react";
2
2
  import { makeStyles } from '@material-ui/core/styles'
3
3
 
4
4
  import Tabs from '@material-ui/core/Tabs';
5
- import LeftAlignVerticalTab from '@pega/react-sdk-components/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs';
5
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
6
 
7
7
  // VerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps
8
8
  interface VerticalTabsProps {
@@ -37,6 +37,9 @@ const createCustomEvent = (eventName: string, additionalData: {[key: string]: st
37
37
 
38
38
 
39
39
  export default function VerticalTabs(props: VerticalTabsProps) {
40
+ // Get emitted components from map (so we can get any override that may exist)
41
+ const LeftAlignVerticalTab = getComponentFromMap("LeftAlignVerticalTabs");
42
+
40
43
  // Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig
41
44
  const { tabconfig = [] } = props;
42
45
  const classes = useStyles();
@@ -4,10 +4,7 @@ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
4
4
  import Avatar from '@material-ui/core/Avatar';
5
5
  import { NavContext } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
6
6
  import './AppShell.css';
7
-
8
- // AppShell can emit NavBar or WssNavBar
9
- import NavBar from '@pega/react-sdk-components/lib/components/infra/NavBar';
10
- import WssNavBar from '@pega/react-sdk-components/lib/components/template/WssNavBar';
7
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
11
8
 
12
9
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
13
10
 
@@ -55,6 +52,10 @@ declare const PCore: any;
55
52
 
56
53
 
57
54
  export default function AppShell(props:AppShellProps) {
55
+ // Get emitted components from map (so we can get any override that may exist)
56
+ const NavBar = getComponentFromMap("NavBar");
57
+ const WssNavBar = getComponentFromMap("WssNavBar");
58
+
58
59
  const {
59
60
  pages = [],
60
61
  caseTypes = [],
@@ -66,6 +67,7 @@ export default function AppShell(props:AppShellProps) {
66
67
  portalLogo,
67
68
  navDisplayOptions
68
69
  } = props;
70
+
69
71
  const [open, setOpen] = useState(true);
70
72
  // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
71
73
  const [activeTab, setActiveTab] = useState(!pages ? null : pages[0]?.pyRuleName);
@@ -1,6 +1,6 @@
1
1
  import { useMemo, Children } from 'react';
2
- import Banner from '@pega/react-sdk-components/lib/components/designSystemExtension/Banner';
3
2
  import React from 'react';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
4
 
5
5
  // BannerPage does NOT have getPConnect. So, no need to extend from PConnProps
6
6
 
@@ -20,6 +20,9 @@ interface BannerPageProps {
20
20
  * BannerPage template.
21
21
  */
22
22
  export default function BannerPage(props: BannerPageProps) {
23
+ // Get emitted components from map (so we can get any override that may exist)
24
+ const Banner = getComponentFromMap('Banner');
25
+
23
26
  const {
24
27
  children,
25
28
  layout = 'two-column',
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
2
3
 
3
- import CaseSummaryFields from '@pega/react-sdk-components/lib/components/designSystemExtension/CaseSummaryFields';
4
4
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  interface CaseSummaryProps extends PConnProps {
@@ -10,6 +10,9 @@ interface CaseSummaryProps extends PConnProps {
10
10
 
11
11
 
12
12
  export default function CaseSummary(props: CaseSummaryProps) {
13
+ // Get emitted components from map (so we can get any override that may exist)
14
+ const CaseSummaryFields = getComponentFromMap('CaseSummaryFields');
15
+
13
16
  const { getPConnect, children } = props;
14
17
  const thePConn = getPConnect();
15
18
  const theConfigProps = thePConn.getConfigProps();
@@ -9,9 +9,7 @@ import Button from '@material-ui/core/Button';
9
9
  import Grid from '@material-ui/core/Grid';
10
10
 
11
11
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
12
- import CaseViewActionsMenu from '@pega/react-sdk-components/lib/components/template/CaseViewActionsMenu';
13
- import VerticalTabs from '@pega/react-sdk-components/lib/components/infra/VerticalTabs/VerticalTabs';
14
- import DeferLoad from '@pega/react-sdk-components/lib/components/infra/DeferLoad';
12
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
15
13
 
16
14
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
17
15
 
@@ -58,6 +56,11 @@ const useStyles = makeStyles(theme => ({
58
56
  }));
59
57
 
60
58
  export default function CaseView(props: CaseViewProps) {
59
+ // Get emitted components from map (so we can get any override that may exist)
60
+ const CaseViewActionsMenu = getComponentFromMap("CaseViewActionsMenu");
61
+ const VerticalTabs = getComponentFromMap("VerticalTabs");
62
+ const DeferLoad = getComponentFromMap("DeferLoad");
63
+
61
64
  const {
62
65
  getPConnect,
63
66
  icon = '',
@@ -1,28 +1,25 @@
1
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  /* eslint-disable no-unused-vars */
3
3
  /* eslint-disable no-nested-ternary */
4
- import { Fragment, useState } from 'react';
5
- import React from 'react';
6
- import { getToDoAssignments } from '@pega/react-sdk-components/lib/components/infra/Containers/FlowContainer/helpers';
7
- import ToDo from '@pega/react-sdk-components/lib/components/widget/ToDo';
8
- import Details from '@pega/react-sdk-components/lib/components/template/Details/Details';
4
+ import React, { useState } from 'react';
9
5
  import { Button, Card, makeStyles } from '@material-ui/core';
6
+ import { getToDoAssignments } from '@pega/react-sdk-components/lib/components/infra/Containers/FlowContainer/helpers';
7
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
8
+
10
9
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
11
10
 
12
- // XX does NOT have getPConnect. So, no need to extend from PConnProps
11
+ // Confirmation does NOT have getPConnect. So, no need to extend from PConnProps
13
12
 
14
13
  interface ConfirmationProps extends PConnProps {
15
14
  // If any, enter additional props that only exist on this component
16
- children: Array<any>,
17
- datasource: { source: any },
18
- label: string,
19
- showLabel: boolean,
20
- showTasks: boolean
15
+ children: Array<any>;
16
+ datasource: { source: any };
17
+ label: string;
18
+ showLabel: boolean;
19
+ showTasks: boolean;
21
20
  }
22
21
 
23
-
24
-
25
- const useStyles = makeStyles(theme => ({
22
+ const useStyles = makeStyles((theme) => ({
26
23
  root: {
27
24
  paddingRight: theme.spacing(1),
28
25
  paddingLeft: theme.spacing(1),
@@ -36,6 +33,10 @@ const useStyles = makeStyles(theme => ({
36
33
  }));
37
34
 
38
35
  export default function Confirmation(props: ConfirmationProps) {
36
+ // Get emitted components from map (so we can get any override that may exist)
37
+ const ToDo = getComponentFromMap('Todo'); // NOTE: ConstellationJS Engine uses "Todo" and not "ToDo"!!!
38
+ const Details = getComponentFromMap('Details');
39
+
39
40
  const classes = useStyles();
40
41
  const CONSTS = PCore.getConstants();
41
42
  const [showConfirmView, setShowConfirmView] = useState(true);
@@ -43,20 +44,12 @@ export default function Confirmation(props: ConfirmationProps) {
43
44
  // Get the inherited props from the parent to determine label settings
44
45
  // Not using whatsNext at the moment, need to figure out the use of it
45
46
  const whatsNext = datasource?.source;
46
- const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';
47
- const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(
48
- getPConnect().getTarget()
49
- );
50
- const rootInfo = PCore.getContainerUtils().getContainerItemData(
51
- getPConnect().getTarget(),
52
- activeContainerItemID
53
- );
47
+ const items = whatsNext.length > 0 ? whatsNext.map((item) => item.label) : '';
48
+ const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget());
49
+ const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), activeContainerItemID);
54
50
  const onConfirmViewClose = () => {
55
51
  setShowConfirmView(false);
56
- PCore.getPubSubUtils().publish(
57
- PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CLOSE_CONFIRM_VIEW,
58
- rootInfo
59
- );
52
+ PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CLOSE_CONFIRM_VIEW, rootInfo);
60
53
  };
61
54
  const todoProps = { ...props, renderTodoInConfirm: true };
62
55
  const toDoList = getToDoAssignments(getPConnect());
@@ -64,36 +57,22 @@ export default function Confirmation(props: ConfirmationProps) {
64
57
  const showDetails = detailProps?.children?.[0]?.props?.getPConnect()?.getChildren()?.length > 0;
65
58
  return showConfirmView ? (
66
59
  <Card className={classes.root}>
67
- <h2 id='confirm-label'>{props.showLabel ? props.label : ''}</h2>
60
+ <h2 id="confirm-label">{props.showLabel ? props.label : ''}</h2>
68
61
  {showDetails ? <Details {...detailProps} /> : undefined}
69
62
  {showTasks ? (
70
63
  toDoList && toDoList.length > 0 ? (
71
- <ToDo
72
- {...todoProps}
73
- datasource={{ source: toDoList }}
74
- getPConnect={getPConnect}
75
- type={CONSTS.TODO}
76
- headerText='Open Tasks'
77
- isConfirm
78
- />
64
+ <ToDo {...todoProps} datasource={{ source: toDoList }} getPConnect={getPConnect} type={CONSTS.TODO} headerText="Open Tasks" isConfirm />
79
65
  ) : undefined
80
66
  ) : undefined}
81
67
  <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
82
- <Button variant='contained' color='primary' onClick={onConfirmViewClose}>
68
+ <Button variant="contained" color="primary" onClick={onConfirmViewClose}>
83
69
  Done
84
70
  </Button>
85
71
  </div>
86
72
  </Card>
87
73
  ) : toDoList && toDoList.length > 0 ? (
88
74
  <Card className={classes.root}>
89
- <ToDo
90
- {...props}
91
- datasource={{ source: toDoList }}
92
- getPConnect={getPConnect}
93
- type={CONSTS.TODO}
94
- headerText='Tasks'
95
- isConfirm
96
- />
75
+ <ToDo {...props} datasource={{ source: toDoList }} getPConnect={getPConnect} type={CONSTS.TODO} headerText="Tasks" isConfirm />
97
76
  </Card>
98
77
  ) : null;
99
78
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo, useState, useEffect } from 'react';
2
- import SingleReferenceReadonly from '@pega/react-sdk-components/lib/components/template/SingleReferenceReadOnly';
3
- import MultiReferenceReadonly from '@pega/react-sdk-components/lib/components/template/MultiReferenceReadOnly';
2
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
3
+
4
4
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  // ReferenceProps can't be used until getComponentConfig() is NOT private
@@ -27,6 +27,10 @@ declare const PCore: any;
27
27
 
28
28
 
29
29
  export default function DataReference(props: DataReferenceProps) {
30
+ // Get emitted components from map (so we can get any override that may exist)
31
+ const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');
32
+ const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');
33
+
30
34
  const {
31
35
  children,
32
36
  getPConnect,