@pega/dx-component-builder-sdk 0.8.5 → 0.8.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 (176) hide show
  1. package/package.json +1 -1
  2. package/src/constants.js +16 -0
  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 +5 -1
  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 +5 -1
  8. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +6 -2
  9. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +6 -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 +5 -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 -1
  20. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +4 -1
  21. package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +7 -6
  22. package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +4 -1
  23. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +47 -0
  24. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/AlertBanner/index.tsx +1 -0
  25. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +5 -3
  26. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +1 -1
  27. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
  28. package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/RichTextEditor/index.tsx +1 -0
  29. package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx +29 -27
  30. package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +25 -28
  31. package/tests/assets/components/SDK-React/create/override-sdk/field/Currency/Currency.tsx +16 -15
  32. package/tests/assets/components/SDK-React/create/override-sdk/field/Date/Date.tsx +16 -15
  33. package/tests/assets/components/SDK-React/create/override-sdk/field/DateTime/DateTime.tsx +19 -14
  34. package/tests/assets/components/SDK-React/create/override-sdk/field/Decimal/Decimal.tsx +18 -16
  35. package/tests/assets/components/SDK-React/create/override-sdk/field/Dropdown/Dropdown.tsx +22 -31
  36. package/tests/assets/components/SDK-React/create/override-sdk/field/Email/Email.tsx +11 -11
  37. package/tests/assets/components/SDK-React/create/override-sdk/field/Integer/Integer.tsx +9 -7
  38. package/tests/assets/components/SDK-React/create/override-sdk/field/Percentage/Percentage.tsx +9 -9
  39. package/tests/assets/components/SDK-React/create/override-sdk/field/Phone/Phone.tsx +13 -12
  40. package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +18 -38
  41. package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/RichText.tsx +93 -0
  42. package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/index.tsx +1 -0
  43. package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/ScalarList.tsx +64 -0
  44. package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/config-ext.json +8 -0
  45. package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/index.tsx +1 -0
  46. package/tests/assets/components/SDK-React/create/override-sdk/field/SemanticLink/SemanticLink.tsx +19 -19
  47. package/tests/assets/components/SDK-React/create/override-sdk/field/TextArea/TextArea.tsx +8 -6
  48. package/tests/assets/components/SDK-React/create/override-sdk/field/TextInput/TextInput.tsx +8 -7
  49. package/tests/assets/components/SDK-React/create/override-sdk/field/Time/Time.tsx +16 -28
  50. package/tests/assets/components/SDK-React/create/override-sdk/field/URL/URL.tsx +10 -8
  51. package/tests/assets/components/SDK-React/create/override-sdk/field/UserReference/UserReference.tsx +29 -29
  52. package/tests/assets/components/SDK-React/create/override-sdk/infra/Assignment/Assignment.tsx +5 -2
  53. package/tests/assets/components/SDK-React/create/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +4 -2
  54. package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +13 -13
  55. package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +1 -1
  56. package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +172 -0
  57. package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/index.tsx +1 -0
  58. package/tests/assets/components/SDK-React/create/override-sdk/infra/MultiStep/MultiStep.tsx +4 -3
  59. package/tests/assets/components/SDK-React/create/override-sdk/infra/NavBar/NavBar.tsx +2 -1
  60. package/tests/assets/components/SDK-React/create/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +4 -1
  61. package/tests/assets/components/SDK-React/create/override-sdk/template/AppShell/AppShell.tsx +6 -4
  62. package/tests/assets/components/SDK-React/create/override-sdk/template/BannerPage/BannerPage.tsx +4 -1
  63. package/tests/assets/components/SDK-React/create/override-sdk/template/CaseSummary/CaseSummary.tsx +7 -2
  64. package/tests/assets/components/SDK-React/create/override-sdk/template/CaseView/CaseView.tsx +10 -13
  65. package/tests/assets/components/SDK-React/create/override-sdk/template/Confirmation/Confirmation.tsx +23 -44
  66. package/tests/assets/components/SDK-React/create/override-sdk/template/DataReference/DataReference.tsx +28 -49
  67. package/tests/assets/components/SDK-React/create/override-sdk/template/Details/Details.tsx +8 -4
  68. package/tests/assets/components/SDK-React/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +8 -4
  69. package/tests/assets/components/SDK-React/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +8 -4
  70. package/tests/assets/components/SDK-React/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +6 -2
  71. package/tests/assets/components/SDK-React/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +5 -1
  72. package/tests/assets/components/SDK-React/create/override-sdk/template/ListPage/ListPage.tsx +6 -3
  73. package/tests/assets/components/SDK-React/create/override-sdk/template/ListView/ListView.tsx +89 -93
  74. package/tests/assets/components/SDK-React/create/override-sdk/template/ListView/utils.ts +170 -23
  75. package/tests/assets/components/SDK-React/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +9 -9
  76. package/tests/assets/components/SDK-React/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +8 -4
  77. package/tests/assets/components/SDK-React/create/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +4 -1
  78. package/tests/assets/components/SDK-React/create/override-sdk/template/OneColumnPage/OneColumnPage.tsx +3 -1
  79. package/tests/assets/components/SDK-React/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +16 -11
  80. package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTable/SimpleTable.tsx +96 -13
  81. package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +6 -4
  82. package/tests/assets/components/SDK-React/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +22 -17
  83. package/tests/assets/components/SDK-React/create/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +3 -2
  84. package/tests/assets/components/SDK-React/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +8 -3
  85. package/tests/assets/components/SDK-React/create/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +4 -3
  86. package/tests/assets/components/SDK-React/create/override-sdk/widget/Attachment/Attachment.tsx +7 -3
  87. package/tests/assets/components/SDK-React/create/override-sdk/widget/FileUtility/FileUtility.tsx +8 -2
  88. package/tests/assets/components/SDK-React/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +4 -1
  89. package/tests/assets/components/SDK-React/create/override-sdk/widget/SummaryList/SummaryList.tsx +4 -1
  90. package/tests/assets/components/SDK-React/create/override-sdk/widget/ToDo/ToDo.tsx +53 -82
  91. package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.jsx +1 -1
  92. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +5 -1
  93. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +6 -2
  94. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +6 -2
  95. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +6 -2
  96. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +5 -1
  97. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +6 -2
  98. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +6 -2
  99. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +4 -1
  100. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +6 -2
  101. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +5 -1
  102. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +4 -1
  103. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +4 -1
  104. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +4 -1
  105. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +6 -2
  106. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +6 -2
  107. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +4 -1
  108. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +7 -6
  109. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -1
  110. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +47 -0
  111. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/AlertBanner/index.tsx +1 -0
  112. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +5 -3
  113. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
  114. package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/RichTextEditor/index.tsx +1 -0
  115. package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +29 -27
  116. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +25 -28
  117. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx +16 -15
  118. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Date/Date.tsx +16 -15
  119. package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx +19 -14
  120. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Decimal/Decimal.tsx +18 -16
  121. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx +22 -31
  122. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Email/Email.tsx +11 -11
  123. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Integer/Integer.tsx +9 -7
  124. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Percentage/Percentage.tsx +9 -9
  125. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Phone/Phone.tsx +13 -12
  126. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +18 -38
  127. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/RichText.tsx +93 -0
  128. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/index.tsx +1 -0
  129. package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +28 -30
  130. package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/config-ext.json +7 -22
  131. package/tests/assets/components/SDK-React/createAll/override-sdk/field/SemanticLink/SemanticLink.tsx +19 -19
  132. package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextArea/TextArea.tsx +8 -6
  133. package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx +8 -7
  134. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Time/Time.tsx +16 -28
  135. package/tests/assets/components/SDK-React/createAll/override-sdk/field/URL/URL.tsx +10 -8
  136. package/tests/assets/components/SDK-React/createAll/override-sdk/field/UserReference/UserReference.tsx +29 -29
  137. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx +5 -2
  138. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +4 -2
  139. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +172 -0
  140. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/index.tsx +1 -0
  141. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +4 -3
  142. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +4 -1
  143. package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx +6 -4
  144. package/tests/assets/components/SDK-React/createAll/override-sdk/template/BannerPage/BannerPage.tsx +4 -1
  145. package/tests/assets/components/SDK-React/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +7 -2
  146. package/tests/assets/components/SDK-React/createAll/override-sdk/template/CaseView/CaseView.tsx +6 -3
  147. package/tests/assets/components/SDK-React/createAll/override-sdk/template/Confirmation/Confirmation.tsx +23 -44
  148. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +27 -21
  149. package/tests/assets/components/SDK-React/createAll/override-sdk/template/Details/Details.tsx +6 -2
  150. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +6 -2
  151. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +6 -2
  152. package/tests/assets/components/SDK-React/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +6 -2
  153. package/tests/assets/components/SDK-React/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +5 -1
  154. package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListPage/ListPage.tsx +6 -3
  155. package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListView/ListView.tsx +89 -93
  156. package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListView/utils.ts +170 -23
  157. package/tests/assets/components/SDK-React/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +6 -2
  158. package/tests/assets/components/SDK-React/createAll/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +4 -1
  159. package/tests/assets/components/SDK-React/createAll/override-sdk/template/OneColumnPage/OneColumnPage.tsx +3 -1
  160. package/tests/assets/components/SDK-React/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +16 -11
  161. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTable/SimpleTable.tsx +96 -13
  162. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +6 -4
  163. package/tests/assets/components/SDK-React/createAll/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +3 -2
  164. package/tests/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +8 -4
  165. package/tests/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +4 -3
  166. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/Attachment/Attachment.tsx +7 -3
  167. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +8 -2
  168. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +4 -1
  169. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/SummaryList/SummaryList.tsx +4 -1
  170. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/ToDo/ToDo.tsx +53 -82
  171. package/tests/functional/localCreateBuildAllDeleteAllCustom.test.js +0 -1
  172. package/tests/functional/localCreateBuildDeleteCustom.test.js +1 -1
  173. package/tests/functional/localCreateBuildDeleteOverride.test.js +1 -1
  174. package/tests/functional/localCreatePublishAllDeleteAllCustom.test.js +5 -2
  175. package/tests/functional/localCreatePublishAllDeleteAllOverride.test.js +5 -6
  176. package/tests/functional/localCreatePublishDeleteOverride.test.js +1 -4
@@ -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,9 +1,9 @@
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 '../../../types/PConnProps';
5
5
 
6
- // Can't use PConn props until proper props for getPConnect().getChildren()[0].getPConnect;
6
+ // ReferenceProps can't be used until getComponentConfig() is NOT private
7
7
  // interface DataReferenceProps extends PConnProps {
8
8
  // // If any, enter additional props that only exist on this component
9
9
  // children: Array<any>,
@@ -26,7 +26,11 @@ const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
26
26
  declare const PCore: any;
27
27
 
28
28
 
29
- export default function DataReference(props /* : DataReferenceProps */) {
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,
@@ -49,9 +53,9 @@ export default function DataReference(props /* : DataReferenceProps */) {
49
53
  propsToUse.label = '';
50
54
  }
51
55
  const rawViewMetadata = pConn.getRawMetadata();
52
- const viewName = rawViewMetadata.name;
53
- const [firstChildMeta] = rawViewMetadata.children;
54
- const refList = rawViewMetadata.config.referenceList;
56
+ const viewName = rawViewMetadata["name"];
57
+ const [firstChildMeta] = rawViewMetadata["children"];
58
+ const refList = rawViewMetadata["config"].referenceList;
55
59
  const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
56
60
  let propName;
57
61
  const isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode);
@@ -61,7 +65,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
61
65
  useEffect(() => {
62
66
  if (
63
67
  firstChildMeta?.type === "Dropdown" &&
64
- rawViewMetadata.config?.parameters
68
+ rawViewMetadata["config"]?.parameters
65
69
  ) {
66
70
  const { value, key, text } = firstChildMeta.config.datasource.fields;
67
71
  PCore.getDataApiUtils()
@@ -101,14 +105,14 @@ export default function DataReference(props /* : DataReferenceProps */) {
101
105
  delete firstChildMeta.config.readOnly;
102
106
  }
103
107
  if (firstChildMeta?.type === 'Dropdown') {
104
- firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters
108
+ firstChildMeta.config.datasource.source = rawViewMetadata["config"]?.parameters
105
109
  ? dropDownDataSource
106
110
  : '@DATASOURCE '.concat(refList).concat('.pxResults');
107
111
  } else if (firstChildMeta?.type === 'AutoComplete') {
108
112
  firstChildMeta.config.datasource = refList;
109
113
 
110
114
  /* Insert the parameters to the component only if present */
111
- if (rawViewMetadata.config?.parameters) {
115
+ if (rawViewMetadata["config"]?.parameters) {
112
116
  firstChildMeta.config.parameters = parameters;
113
117
  }
114
118
  }
@@ -187,8 +191,10 @@ export default function DataReference(props /* : DataReferenceProps */) {
187
191
  const recreatedFirstChild = useMemo(() => {
188
192
  const { type, config } = firstChildMeta;
189
193
  if (firstChildMeta?.type !== 'Region') {
190
- pConn.clearErrorMessages({
191
- property: propName
194
+ pConn.clearErrorMessages({ // Need to add empty string for category and context to match typdef
195
+ property: propName,
196
+ category: '',
197
+ context: ''
192
198
  });
193
199
  if (!canBeChangedInReviewMode && isDisplayModeEnabled && selectionMode === SELECTION_MODE.SINGLE) {
194
200
  return (
@@ -203,7 +209,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
203
209
  referenceType={referenceType}
204
210
  hideLabel={hideLabel}
205
211
  dataRelationshipContext={
206
- rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null
212
+ rawViewMetadata["config"].contextClass && rawViewMetadata["config"].name ? rawViewMetadata["config"].name : null
207
213
  }
208
214
  />
209
215
  );
@@ -223,7 +229,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
223
229
  // In the case of a datasource with parameters you cannot load the dropdown before the parameters
224
230
  if (
225
231
  type === 'Dropdown' &&
226
- rawViewMetadata.config?.parameters &&
232
+ rawViewMetadata["config"]?.parameters &&
227
233
  dropDownDataSource === null
228
234
  ) {
229
235
  return null;
@@ -238,19 +244,19 @@ export default function DataReference(props /* : DataReferenceProps */) {
238
244
  disabled: propsToUse.disabled,
239
245
  label: propsToUse.label,
240
246
  viewName: getPConnect().getCurrentView(),
241
- parameters: rawViewMetadata.config.parameters,
247
+ parameters: rawViewMetadata["config"].parameters,
242
248
  readOnly: false,
243
- localeReference: rawViewMetadata.config.localeReference,
249
+ localeReference: rawViewMetadata["config"].localeReference,
244
250
  ...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),
245
251
  dataRelationshipContext:
246
- rawViewMetadata.config.contextClass && rawViewMetadata.config.name
247
- ? rawViewMetadata.config.name
252
+ rawViewMetadata["config"].contextClass && rawViewMetadata["config"].name
253
+ ? rawViewMetadata["config"].name
248
254
  : null,
249
255
  hideLabel,
250
256
  onRecordChange: handleSelection
251
- }
257
+ },
252
258
  },
253
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;);
259
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
254
260
  }
255
261
  }, [
256
262
  firstChildMeta.config?.datasource?.source,
@@ -262,7 +268,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
262
268
 
263
269
  // Only include the views region for rendering when it has content
264
270
  if (firstChildMeta?.type !== 'Region') {
265
- const viewsRegion = rawViewMetadata.children[1];
271
+ const viewsRegion = rawViewMetadata["children"][1];
266
272
  if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {
267
273
  childrenToRender = [recreatedFirstChild, ...children.slice(1)];
268
274
  } else {
@@ -1,7 +1,8 @@
1
1
  import React, { createElement } from 'react';
2
2
  import Grid from '@material-ui/core/Grid';
3
3
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
4
- import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
+
5
6
  // import type { PConnProps } from '../../../../types/PConnProps';
6
7
 
7
8
 
@@ -12,6 +13,9 @@ import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemEx
12
13
 
13
14
 
14
15
  export default function Details(props /* : DetailsProps */) {
16
+ // Get emitted components from map (so we can get any override that may exist)
17
+ const FieldGroup = getComponentFromMap('FieldGroup');
18
+
15
19
  const { label, showLabel, getPConnect, showHighlightedData } = props;
16
20
 
17
21
  // Get the inherited props from the parent to determine label settings
@@ -45,7 +49,7 @@ export default function Details(props /* : DetailsProps */) {
45
49
  }
46
50
 
47
51
  return getPConnect().createComponent(field,
48
- '','', {}); // 2nd, 3rd, and 4th args empty string/object until typedef marked correctly as optional;);
52
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
49
53
  });
50
54
  }
51
55
 
@@ -1,7 +1,8 @@
1
1
  import React, { createElement } from 'react';
2
2
  import Grid from '@material-ui/core/Grid';
3
3
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
4
- import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
+
5
6
  // import type { PConnProps } from '../../../../types/PConnProps';
6
7
 
7
8
  // Can't use PConnProps until getPConnect().getChildren() type is ok
@@ -14,6 +15,9 @@ import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemEx
14
15
 
15
16
 
16
17
  export default function DetailsThreeColumn(props /* : DetailsThreeColumnProps */) {
18
+ // Get emitted components from map (so we can get any override that may exist)
19
+ const FieldGroup = getComponentFromMap('FieldGroup');
20
+
17
21
  const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;
18
22
 
19
23
  // Get the inherited props from the parent to determine label settings
@@ -47,7 +51,7 @@ export default function DetailsThreeColumn(props /* : DetailsThreeColumnProps */
47
51
  }
48
52
 
49
53
  return getPConnect().createComponent(field,
50
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
54
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
51
55
  });
52
56
  }
53
57
 
@@ -1,7 +1,8 @@
1
1
  import React, { createElement } from 'react';
2
2
  import Grid from '@material-ui/core/Grid';
3
3
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
4
- import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
+
5
6
  // import type { PConnProps } from '../../../../types/PConnProps';
6
7
 
7
8
 
@@ -15,6 +16,9 @@ import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemEx
15
16
 
16
17
 
17
18
  export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
19
+ // Get emitted components from map (so we can get any override that may exist)
20
+ const FieldGroup = getComponentFromMap('FieldGroup');
21
+
18
22
  const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;
19
23
 
20
24
  // Get the inherited props from the parent to determine label settings
@@ -48,7 +52,7 @@ export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
48
52
  }
49
53
 
50
54
  return getPConnect().createComponent(field,
51
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
55
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
52
56
  });
53
57
  }
54
58
 
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
2
  import React, { useMemo } from 'react';
3
- import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
4
- import FieldGroupList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroupList';
5
3
  import { getReferenceList, buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
+
6
6
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
8
8
  interface FieldGroupTemplateProps extends PConnProps {
@@ -19,6 +19,10 @@ interface FieldGroupTemplateProps extends PConnProps {
19
19
 
20
20
 
21
21
  export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
22
+ // Get emitted components from map (so we can get any override that may exist)
23
+ const FieldGroup = getComponentFromMap('FieldGroup');
24
+ const FieldGroupList = getComponentFromMap('FieldGroupList');
25
+
22
26
  const {
23
27
  referenceList = [],
24
28
  renderMode,
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import { useMemo, Children, useEffect, useState } from 'react';
3
3
 
4
4
  import { buildFilterComponents } from '@pega/react-sdk-components/lib/components/infra/DashboardFilter/filterUtils';
5
- import InlineDashboard from '@pega/react-sdk-components/lib/components/template/InlineDashboard';
5
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
+
6
7
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
8
 
8
9
 
@@ -16,6 +17,9 @@ interface InlineDashboardPageProps extends PConnProps {
16
17
 
17
18
 
18
19
  export default function InlineDashboardPage(props: InlineDashboardPageProps) {
20
+ // Get emitted components from map (so we can get any override that may exist)
21
+ const InlineDashboard = getComponentFromMap("InlineDashboard");
22
+
19
23
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
20
24
  const { children, getPConnect, icon = '', filterPosition = 'block-start' } = props;
21
25
  const [filterComponents, setFilterComponents] = useState([]);
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
-
3
- import ListView from '@pega/react-sdk-components/lib/components/template/ListView';
2
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
3
 
5
4
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
5
 
@@ -11,8 +10,12 @@ interface ListPageProps extends PConnProps {
11
10
 
12
11
 
13
12
  export default function ListPage(props: ListPageProps) {
13
+ // Get emitted components from map (so we can get any override that may exist)
14
+ const ListView = getComponentFromMap('ListView');
14
15
 
16
+ // special case for ListView - add in a prop
17
+ const listViewProps = {...props, bInForm: false};
15
18
  return (
16
- <ListView {...props}></ListView>
19
+ <ListView {...listViewProps}></ListView>
17
20
  )
18
21
  }