@pega/dx-component-builder-sdk 0.242.14 → 0.242.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/src/constants.js +39 -6
  4. package/src/tasks/create/index.js +7 -5
  5. package/src/tasks/create/templates/Constellation/field/Date/demo.stories.tsx.mustache +0 -16
  6. package/src/tasks/create/templates/Constellation/field/DateTime/demo.stories.tsx.mustache +0 -17
  7. package/src/tasks/create/templates/Constellation/field/Decimal/demo.stories.tsx.mustache +0 -1
  8. package/src/tasks/create/templates/Constellation/field/Decimal-Currency/demo.stories.tsx.mustache +0 -1
  9. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/demo.stories.tsx.mustache +0 -1
  10. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/mock.ts.mustache +1 -0
  11. package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/demo.stories.tsx.mustache +9 -20
  12. package/src/tasks/create/templates/Constellation/field/Picklist/demo.stories.tsx.mustache +0 -1
  13. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/demo.stories.tsx.mustache +0 -1
  14. package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/demo.stories.tsx.mustache +0 -1
  15. package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/index.tsx.mustache +3 -5
  16. package/src/tasks/create/templates/Constellation/field/Text/demo.stories.tsx.mustache +0 -1
  17. package/src/tasks/create/templates/Constellation/field/Text-Email/demo.stories.tsx.mustache +0 -1
  18. package/src/tasks/create/templates/Constellation/field/Text-Email/mock.ts.mustache +1 -0
  19. package/src/tasks/create/templates/Constellation/field/Text-Input/demo.stories.tsx.mustache +0 -1
  20. package/src/tasks/create/templates/Constellation/field/Text-Paragraph/demo.stories.tsx.mustache +0 -1
  21. package/src/tasks/create/templates/Constellation/field/Text-Phone/demo.stories.tsx.mustache +1 -2
  22. package/src/tasks/create/templates/Constellation/field/Text-URL/demo.stories.tsx.mustache +0 -1
  23. package/src/tasks/create/templates/Constellation/field/TimeOfDay/demo.stories.tsx.mustache +0 -1
  24. package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.tsx.mustache +10 -0
  25. package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.tsx.mustache +0 -13
  26. package/src/tasks/create/templates/Constellation/widget/CASE/demo.stories.tsx.mustache +10 -32
  27. package/src/tasks/create/templates/Constellation/widget/CASE/index.tsx.mustache +2 -2
  28. package/src/tasks/create/templates/Constellation/widget/PAGE/demo.stories.tsx.mustache +10 -21
  29. package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/demo.stories.tsx.mustache +10 -22
  30. package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +0 -21
  31. package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +5 -1
  32. package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +0 -21
  33. package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +13 -5
  34. package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.tsx.mustache +0 -14
  35. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +6 -1
  36. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +0 -14
  37. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +6 -1
  38. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +0 -14
  39. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +5 -1
  40. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/demo.stories.tsx.mustache +2 -6
  41. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +1 -1
  42. package/src/tasks/create/templates/SDK-React/field/Integer/demo.stories.tsx.mustache +3 -0
  43. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +25 -20
  44. package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +1 -4
  45. package/src/tasks/create/templates/SDK-React/field/Text/demo.stories.tsx.mustache +3 -0
  46. package/src/tasks/create/templates/SDK-React/field/Text-Email/demo.stories.tsx.mustache +3 -0
  47. package/src/tasks/create/templates/SDK-React/field/Text-Input/demo.stories.tsx.mustache +3 -0
  48. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/demo.stories.tsx.mustache +3 -0
  49. package/src/tasks/create/templates/SDK-React/field/Text-Phone/demo.stories.tsx.mustache +3 -0
  50. package/src/tasks/create/templates/SDK-React/field/Text-URL/demo.stories.tsx.mustache +3 -0
  51. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +1 -1
  52. package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +8 -28
  53. package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +7 -2
  54. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +8 -28
  55. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +7 -2
  56. package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +10 -16
  57. package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +5 -5
  58. package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +10 -20
  59. package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +2 -1
  60. package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +9 -19
  61. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +10 -20
  62. package/src/tasks/quarantine/index.js +4 -2
  63. package/tests/assets/sdk-a/components/create/override-sdk/field/dropdown/dropdown.component.ts +122 -7
  64. package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.html +4 -4
  65. package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts +7 -12
  66. package/tests/assets/sdk-a/components/create/override-sdk/template/default-form/default-form.component.ts +2 -2
  67. package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts +5 -39
  68. package/tests/assets/sdk-a/components/create/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
  69. package/tests/assets/sdk-a/components/create/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
  70. package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
  71. package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
  72. package/tests/assets/sdk-a/components/create/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
  73. package/tests/assets/sdk-a/components/create/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
  74. package/tests/assets/sdk-a/components/create/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
  75. package/tests/assets/sdk-a/components/create/override-sdk/template/one-column/one-column.component.ts +2 -2
  76. package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
  77. package/tests/assets/sdk-a/components/create/override-sdk/template/three-column/three-column.component.ts +2 -2
  78. package/tests/assets/sdk-a/components/create/override-sdk/template/two-column/two-column.component.ts +2 -2
  79. package/tests/assets/sdk-a/components/create/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
  80. package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyRadioButtons/index.tsx +3 -5
  81. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-picklist/pega-dxil-my-picklist.component.ts +29 -15
  82. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/pega-dxil-my-details.component.ts +5 -39
  83. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/demo.stories.tsx +1 -4
  84. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.ts +2 -2
  85. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-details/pega-dxil-my-two-column-details.component.ts +6 -42
  86. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-form/pega-dxil-my-two-column-form.component.ts +2 -2
  87. package/tests/assets/sdk-a/components/createAll/override-sdk/field/dropdown/dropdown.component.ts +122 -7
  88. package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.html +4 -4
  89. package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.ts +7 -12
  90. package/tests/assets/sdk-a/components/createAll/override-sdk/template/default-form/default-form.component.ts +2 -2
  91. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts +5 -39
  92. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
  93. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
  94. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
  95. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
  96. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
  97. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
  98. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
  99. package/tests/assets/sdk-a/components/createAll/override-sdk/template/one-column/one-column.component.ts +2 -2
  100. package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
  101. package/tests/assets/sdk-a/components/createAll/override-sdk/template/three-column/three-column.component.ts +2 -2
  102. package/tests/assets/sdk-a/components/createAll/override-sdk/template/two-column/two-column.component.ts +2 -2
  103. package/tests/assets/sdk-a/components/createAll/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
  104. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +3 -0
  105. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
  106. package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +5 -5
  107. package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/FlowContainer.tsx +360 -0
  108. package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/helpers.ts +138 -0
  109. package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/index.tsx +1 -0
  110. package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +68 -0
  111. package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
  112. package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +345 -0
  113. package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/index.tsx +1 -0
  114. package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.css +1 -0
  115. package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/Reference.tsx +52 -0
  116. package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/index.tsx +1 -0
  117. package/tests/assets/sdk-r/components/create/override-sdk/infra/Region/Region.tsx +17 -0
  118. package/tests/assets/sdk-r/components/create/override-sdk/infra/Region/index.tsx +1 -0
  119. package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/RootContainer.tsx +240 -0
  120. package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/index.tsx +1 -0
  121. package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/SimpleView.tsx +48 -0
  122. package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/helper.ts +125 -0
  123. package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/index.tsx +1 -0
  124. package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/ViewContainer.tsx +201 -0
  125. package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/index.tsx +1 -0
  126. package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/DynamicTabs.tsx +80 -0
  127. package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/config.json +36 -0
  128. package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/index.tsx +1 -0
  129. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +29 -28
  130. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +13 -5
  131. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +3 -5
  132. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +2 -2
  133. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +6 -1
  134. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +3 -0
  135. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +5 -1
  136. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +3 -0
  137. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +13 -5
  138. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +6 -1
  139. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/demo.stories.tsx +3 -0
  140. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +1 -1
  141. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/demo.stories.tsx +3 -0
  142. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/demo.stories.tsx +3 -0
  143. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +5 -1
  144. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/demo.stories.tsx +3 -0
  145. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +5 -5
  146. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +25 -20
  147. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +1 -4
  148. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/demo.stories.tsx +3 -0
  149. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/demo.stories.tsx +3 -0
  150. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
  151. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/demo.stories.tsx +3 -0
  152. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +7 -2
  153. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +7 -2
  154. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +28 -13
  155. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +5 -5
  156. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +2 -1
  157. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
  158. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +5 -5
  159. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/FlowContainer.tsx +360 -0
  160. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/helpers.ts +138 -0
  161. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/index.tsx +1 -0
  162. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +68 -0
  163. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
  164. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +345 -0
  165. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/index.tsx +1 -0
  166. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.css +1 -0
  167. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/Reference.tsx +52 -0
  168. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/index.tsx +1 -0
  169. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Region/Region.tsx +17 -0
  170. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Region/index.tsx +1 -0
  171. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/RootContainer.tsx +240 -0
  172. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/index.tsx +1 -0
  173. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/SimpleView.tsx +48 -0
  174. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/helper.ts +125 -0
  175. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/index.tsx +1 -0
  176. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/ViewContainer.tsx +201 -0
  177. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/index.tsx +1 -0
  178. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/DynamicTabs.tsx +80 -0
  179. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/config.json +36 -0
  180. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/index.tsx +1 -0
  181. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +29 -28
  182. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +13 -5
  183. package/tests/functional/sdk-a/localCreateAllListDeleteAllCustom.test.js +5 -5
  184. package/tests/functional/sdk-a/localCreateAllListDeleteAllOverride.test.js +5 -5
  185. package/tests/functional/sdk-a/localCreateBuildAllDeleteAllCustom.test.js +2 -2
  186. package/tests/functional/sdk-a/localCreateBuildDeleteCustom.test.js +2 -2
  187. package/tests/functional/sdk-a/localCreateBuildDeleteOverride.test.js +2 -2
  188. package/tests/functional/sdk-a/localCreateListDeleteCustom.test.js +1 -1
  189. package/tests/functional/sdk-a/localCreateListDeleteOverride.test.js +1 -1
  190. package/tests/functional/sdk-a/localCreateMapAllClearMap.test.js +2 -2
  191. package/tests/functional/sdk-a/localCreatePublishAllDeleteAllCustom.test.js +2 -2
  192. package/tests/functional/sdk-a/localCreatePublishAllDeleteAllOverride.test.js +2 -2
  193. package/tests/functional/sdk-a/localCreatePublishDeleteCustom.test.js +2 -2
  194. package/tests/functional/sdk-a/localCreatePublishDeleteOverride.test.js +2 -2
  195. package/tests/functional/sdk-a/localCreateRenameDeleteCustom.test.js +1 -1
@@ -5,12 +5,47 @@ import { MatOptionModule } from '@angular/material/core';
5
5
  import { MatSelectModule } from '@angular/material/select';
6
6
  import { MatFormFieldModule } from '@angular/material/form-field';
7
7
  import { interval } from 'rxjs';
8
+ import isEqual from 'fast-deep-equal';
8
9
  import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
10
+ import { DatapageService } from '@pega/angular-sdk-components';
9
11
  import { Utils } from '@pega/angular-sdk-components';
10
12
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
11
13
  import { handleEvent } from '@pega/angular-sdk-components';
12
14
  import { PConnFieldProps } from '@pega/angular-sdk-components';
13
15
 
16
+ function flattenParameters(params = {}) {
17
+ const flatParams = {};
18
+ Object.keys(params).forEach(key => {
19
+ const { name, value: theVal } = params[key];
20
+ flatParams[name] = theVal;
21
+ });
22
+
23
+ return flatParams;
24
+ }
25
+
26
+ function preProcessColumns(columnList) {
27
+ return columnList.map(col => {
28
+ const tempColObj = { ...col };
29
+ tempColObj.value = col.value && col.value.startsWith('.') ? col.value.substring(1) : col.value;
30
+ return tempColObj;
31
+ });
32
+ }
33
+
34
+ function getDisplayFieldsMetaData(columnList) {
35
+ const displayColumns = columnList.filter(col => col.display === 'true');
36
+ const metaDataObj: any = { key: '', primary: '', secondary: [] };
37
+ const keyCol = columnList.filter(col => col.key === 'true');
38
+ metaDataObj.key = keyCol.length > 0 ? keyCol[0].value : 'auto';
39
+ for (let index = 0; index < displayColumns.length; index += 1) {
40
+ if (displayColumns[index].primary === 'true') {
41
+ metaDataObj.primary = displayColumns[index].value;
42
+ } else {
43
+ metaDataObj.secondary.push(displayColumns[index].value);
44
+ }
45
+ }
46
+ return metaDataObj;
47
+ }
48
+
14
49
  interface IOption {
15
50
  key: string;
16
51
  value: string;
@@ -22,6 +57,11 @@ interface DropdownProps extends PConnFieldProps {
22
57
  datasource?: any[];
23
58
  onRecordChange?: any;
24
59
  fieldMetadata?: any;
60
+ listType?: string;
61
+ columns?: any[];
62
+ deferDatasource?: boolean;
63
+ datasourceMetadata?: any;
64
+ parameters?: any;
25
65
  }
26
66
 
27
67
  @Component({
@@ -53,7 +93,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
53
93
  testId = '';
54
94
  helperText: string;
55
95
  hideLabel: any;
56
-
96
+ theDatasource: any[] | null;
57
97
  fieldControl = new FormControl('', null);
58
98
  fieldMetadata: any[];
59
99
  localeContext = '';
@@ -67,7 +107,8 @@ export class DropdownComponent implements OnInit, OnDestroy {
67
107
  constructor(
68
108
  private angularPConnect: AngularPConnectService,
69
109
  private cdRef: ChangeDetectorRef,
70
- private utils: Utils
110
+ private utils: Utils,
111
+ private dataPageService: DatapageService
71
112
  ) {}
72
113
 
73
114
  ngOnInit(): void {
@@ -78,8 +119,9 @@ export class DropdownComponent implements OnInit, OnDestroy {
78
119
  // Then, continue on with other initialization
79
120
 
80
121
  // call updateSelf when initializing
81
- // this.updateSelf();
82
122
  this.checkAndUpdate();
123
+ // this should get called afer checkAndUpdate
124
+ this.getDatapageData();
83
125
 
84
126
  if (this.formGroup$) {
85
127
  // add control to formGroup
@@ -122,7 +164,6 @@ export class DropdownComponent implements OnInit, OnDestroy {
122
164
  updateSelf(): void {
123
165
  // moved this from ngOnInit() and call this from there instead...
124
166
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DropdownProps;
125
-
126
167
  if (this.configProps$.value != undefined) {
127
168
  this.value$ = this.configProps$.value;
128
169
  }
@@ -132,6 +173,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
132
173
  this.label$ = this.configProps$.label;
133
174
  this.helperText = this.configProps$.helperText;
134
175
  this.hideLabel = this.configProps$.hideLabel;
176
+ const datasource = this.configProps$.datasource;
135
177
  // timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
136
178
  setTimeout(() => {
137
179
  if (this.configProps$.required != null) {
@@ -140,6 +182,11 @@ export class DropdownComponent implements OnInit, OnDestroy {
140
182
  this.cdRef.detectChanges();
141
183
  });
142
184
 
185
+ if (!isEqual(datasource, this.theDatasource)) {
186
+ // inbound datasource is different, so update theDatasource
187
+ this.theDatasource = datasource || null;
188
+ }
189
+
143
190
  if (this.configProps$.visibility != null) {
144
191
  this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
145
192
  }
@@ -161,14 +208,18 @@ export class DropdownComponent implements OnInit, OnDestroy {
161
208
 
162
209
  this.componentReference = this.pConn$.getStateProps().value;
163
210
 
164
- const optionsList = [...this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject())];
165
- optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
166
- this.options$ = optionsList;
167
211
  if (this.value$ === '' && !this.bReadonly$) {
168
212
  this.value$ = 'Select';
169
213
  }
170
214
 
215
+ if (this.theDatasource) {
216
+ const optionsList = [...this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject())];
217
+ optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
218
+ this.options$ = optionsList;
219
+ }
220
+
171
221
  this.actionsApi = this.pConn$.getActionsApi();
222
+
172
223
  this.propName = this.pConn$.getStateProps().value;
173
224
  const className = this.pConn$.getCaseInfo().getClassName();
174
225
  const refName = this.propName?.slice(this.propName.lastIndexOf('.') + 1);
@@ -199,6 +250,70 @@ export class DropdownComponent implements OnInit, OnDestroy {
199
250
  }
200
251
  }
201
252
 
253
+ getDatapageData() {
254
+ const configProps = this.pConn$.getConfigProps() as DropdownProps;
255
+ let { listType, parameters, datasource = [], columns = [] } = configProps;
256
+ const { deferDatasource, datasourceMetadata } = configProps;
257
+ const context = this.pConn$.getContextName();
258
+ if (deferDatasource && datasourceMetadata?.datasource?.name) {
259
+ listType = 'datapage';
260
+ datasource = datasourceMetadata.datasource.name;
261
+ const { parameters: dataSourceParameters, propertyForDisplayText, propertyForValue } = datasourceMetadata.datasource;
262
+ parameters = flattenParameters(dataSourceParameters);
263
+ const displayProp = propertyForDisplayText?.startsWith('@P') ? propertyForDisplayText.substring(3) : propertyForDisplayText;
264
+ const valueProp = propertyForValue?.startsWith('@P') ? propertyForValue.substring(3) : propertyForValue;
265
+ columns = [
266
+ {
267
+ key: 'true',
268
+ setProperty: 'Associated property',
269
+ value: valueProp
270
+ },
271
+ {
272
+ display: 'true',
273
+ primary: 'true',
274
+ useForSearch: true,
275
+ value: displayProp
276
+ }
277
+ ];
278
+ }
279
+
280
+ columns = preProcessColumns(columns) || [];
281
+ if (!this.displayMode$ && listType !== 'associated' && typeof datasource === 'string') {
282
+ this.getData(datasource, parameters, columns, context, listType);
283
+ }
284
+ }
285
+
286
+ getData(dataSource, parameters, columns, context, listType) {
287
+ const dataConfig: any = {
288
+ columns,
289
+ dataSource,
290
+ deferDatasource: true,
291
+ listType,
292
+ parameters,
293
+ matchPosition: 'contains',
294
+ maxResultsDisplay: '5000',
295
+ cacheLifeSpan: 'form'
296
+ };
297
+ PCore.getDataApi()
298
+ .init(dataConfig, context)
299
+ .then((dataApiObj: any) => {
300
+ const optionsData: any[] = [];
301
+ const displayColumn = getDisplayFieldsMetaData(columns);
302
+ dataApiObj?.fetchData('').then(response => {
303
+ response.data?.forEach(element => {
304
+ const val = element[displayColumn.primary]?.toString();
305
+ const obj = {
306
+ key: element[displayColumn.key] || element.pyGUID,
307
+ value: val
308
+ };
309
+ optionsData.push(obj);
310
+ });
311
+ optionsData?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
312
+ this.options$ = optionsData;
313
+ });
314
+ });
315
+ }
316
+
202
317
  isSelected(buttonValue: string): boolean {
203
318
  return this.value$ === buttonValue;
204
319
  }
@@ -1,5 +1,5 @@
1
1
  <div class="psdk-case-view" id="case-view">
2
- <div *ngIf="!displayOnlyFA$" class="psdk-case-view-info">
2
+ <div class="psdk-case-view-info">
3
3
  <mat-toolbar color="primary" class="psdk-case-view-toolbar">
4
4
  <mat-toolbar-row style="padding-left: 1rem">
5
5
  <div class="psdk-case-icon-div">
@@ -47,7 +47,7 @@
47
47
  ></component-mapper>
48
48
  </div>
49
49
  <div class="psdk-case-view-main">
50
- <div *ngIf="!displayOnlyFA$">
50
+ <div>
51
51
  <div *ngFor="let kid of arChildren$">
52
52
  <div
53
53
  *ngIf="
@@ -73,11 +73,11 @@
73
73
  </div>
74
74
  </div>
75
75
 
76
- <div *ngIf="!displayOnlyFA$">
76
+ <div>
77
77
  <component-mapper name="DeferLoad" [props]="{ pConn$, loadData$: tabData$, name: tabData$?.config?.name }"></component-mapper>
78
78
  </div>
79
79
  </div>
80
- <div *ngIf="!displayOnlyFA$">
80
+ <div>
81
81
  <div *ngIf="arChildren$" class="psdk-case-view-utilities">
82
82
  <div *ngFor="let kid of arChildren$">
83
83
  <div *ngIf="kid.getPConnect().getRawMetadata()?.type.toLowerCase() == 'region' && kid.getPConnect().getRawMetadata()?.name == 'Utilities'">
@@ -27,7 +27,6 @@ interface CaseViewProps {
27
27
  export class CaseViewComponent implements OnInit, OnDestroy {
28
28
  @Input() pConn$: typeof PConnect;
29
29
  @Input() formGroup$: FormGroup;
30
- @Input() displayOnlyFA$: boolean;
31
30
 
32
31
  // Used with AngularPConnect
33
32
  angularPConnectData: AngularPConnectData = {};
@@ -161,19 +160,15 @@ export class CaseViewComponent implements OnInit, OnDestroy {
161
160
 
162
161
  this.svgCase$ = this.utils.getImageSrc(this.configProps$.icon, this.utils.getSDKStaticContentUrl());
163
162
 
164
- // this.utils.consoleKidDump(this.pConn$);
165
-
166
- if (!this.displayOnlyFA$) {
167
- for (const kid of this.arChildren$) {
168
- const kidPConn = kid.getPConnect();
169
- if (kidPConn.getRawMetadata().name == 'Tabs') {
170
- this.mainTabs = kid;
171
- this.mainTabData = this.mainTabs.getPConnect().getChildren();
172
- }
163
+ for (const kid of this.arChildren$) {
164
+ const kidPConn = kid.getPConnect();
165
+ if (kidPConn.getRawMetadata().name == 'Tabs') {
166
+ this.mainTabs = kid;
167
+ this.mainTabData = this.mainTabs.getPConnect().getChildren();
173
168
  }
174
-
175
- this.generateTabsData();
176
169
  }
170
+
171
+ this.generateTabsData();
177
172
  }
178
173
 
179
174
  generateTabsData() {
@@ -4,7 +4,7 @@ import { FormGroup } from '@angular/forms';
4
4
  import { ReferenceComponent } from '@pega/angular-sdk-components';
5
5
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  import { TemplateUtils } from '@pega/angular-sdk-components';
7
- import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
7
+ import { FormTemplateBase } from '@pega/angular-sdk-components';
8
8
 
9
9
  interface DefaultFormProps {
10
10
  // If any, enter additional props that only exist on this component
@@ -19,7 +19,7 @@ interface DefaultFormProps {
19
19
  standalone: true,
20
20
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
21
21
  })
22
- export class DefaultFormComponent extends FormTemplateBaseComponent implements OnInit {
22
+ export class DefaultFormComponent extends FormTemplateBase implements OnInit {
23
23
  @Input() override pConn$: typeof PConnect;
24
24
  @Input() formGroup$: FormGroup;
25
25
 
@@ -1,6 +1,6 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
1
+ import { Component, forwardRef } from '@angular/core';
3
2
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
+ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
4
4
 
5
5
  @Component({
6
6
  selector: 'app-details',
@@ -9,48 +9,14 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
9
9
  standalone: true,
10
10
  imports: [forwardRef(() => ComponentMapperComponent)]
11
11
  })
12
- export class DetailsComponent implements OnInit, OnDestroy {
13
- constructor(private angularPConnect: AngularPConnectService) {}
14
-
15
- @Input() pConn$: typeof PConnect;
12
+ export class DetailsComponent extends DetailsTemplateBase {
13
+ override pConn$: typeof PConnect;
16
14
 
17
15
  highlightedDataArr: any[] = [];
18
16
  showHighlightedData: boolean;
19
17
  arFields$: any[] = [];
20
18
 
21
- // Used with AngularPConnect
22
- angularPConnectData: AngularPConnectData = {};
23
-
24
- ngOnInit(): void {
25
- // First thing in initialization is registering and subscribing to the AngularPConnect service
26
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
27
-
28
- // this.updateSelf();
29
- this.checkAndUpdate();
30
- }
31
-
32
- ngOnDestroy() {
33
- if (this.angularPConnectData.unsubscribeFn) {
34
- this.angularPConnectData.unsubscribeFn();
35
- }
36
- }
37
-
38
- onStateChange() {
39
- this.checkAndUpdate();
40
- }
41
-
42
- checkAndUpdate() {
43
- // Should always check the bridge to see if the component should
44
- // update itself (re-render)
45
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
46
-
47
- // ONLY call updateSelf when the component should update
48
- if (bUpdateSelf) {
49
- this.updateSelf();
50
- }
51
- }
52
-
53
- updateSelf() {
19
+ override updateSelf() {
54
20
  const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
55
21
  this.showHighlightedData = rawMetaData?.showHighlightedData;
56
22
 
@@ -1,6 +1,6 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
1
+ import { Component, forwardRef } from '@angular/core';
3
2
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
+ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
4
4
 
5
5
  @Component({
6
6
  selector: 'app-details-narrow-wide',
@@ -9,48 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
9
9
  standalone: true,
10
10
  imports: [forwardRef(() => ComponentMapperComponent)]
11
11
  })
12
- export class DetailsNarrowWideComponent implements OnInit, OnDestroy {
13
- constructor(private angularPConnect: AngularPConnectService) {}
14
-
15
- @Input() pConn$: typeof PConnect;
12
+ export class DetailsNarrowWideComponent extends DetailsTemplateBase {
13
+ override pConn$: typeof PConnect;
16
14
 
17
15
  arFields$: any[] = [];
18
16
  arFields2$: any[] = [];
19
17
  highlightedDataArr: any[] = [];
20
18
  showHighlightedData: boolean;
21
- // Used with AngularPConnect
22
- angularPConnectData: AngularPConnectData = {};
23
-
24
- ngOnInit(): void {
25
- // First thing in initialization is registering and subscribing to the AngularPConnect service
26
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
27
-
28
- // this.updateSelf();
29
- this.checkAndUpdate();
30
- }
31
-
32
- ngOnDestroy() {
33
- if (this.angularPConnectData.unsubscribeFn) {
34
- this.angularPConnectData.unsubscribeFn();
35
- }
36
- }
37
-
38
- onStateChange() {
39
- this.checkAndUpdate();
40
- }
41
-
42
- checkAndUpdate() {
43
- // Should always check the bridge to see if the component should
44
- // update itself (re-render)
45
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
46
-
47
- // ONLY call updateSelf when the component should update
48
- if (bUpdateSelf) {
49
- this.updateSelf();
50
- }
51
- }
52
19
 
53
- updateSelf() {
20
+ override updateSelf() {
54
21
  const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
55
22
  this.showHighlightedData = rawMetaData?.showHighlightedData;
56
23
 
@@ -1,7 +1,6 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
3
- import { FormGroup } from '@angular/forms';
1
+ import { Component, forwardRef } from '@angular/core';
4
2
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
+ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
5
4
 
6
5
  @Component({
7
6
  selector: 'app-details-one-column',
@@ -10,49 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
9
  standalone: true,
11
10
  imports: [forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
- export class DetailsOneColumnComponent implements OnInit, OnDestroy {
14
- constructor(private angularPConnect: AngularPConnectService) {}
12
+ export class DetailsOneColumnComponent extends DetailsTemplateBase {
13
+ override pConn$: typeof PConnect;
15
14
 
16
- @Input() pConn$: typeof PConnect;
17
- @Input() formGroup$: FormGroup;
18
15
  showHighlightedData: boolean;
19
16
  highlightedDataArr: any;
20
17
 
21
18
  arFields$: any[] = [];
22
19
 
23
- // Used with AngularPConnect
24
- angularPConnectData: AngularPConnectData = {};
25
-
26
- ngOnInit(): void {
27
- // First thing in initialization is registering and subscribing to the AngularPConnect service
28
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
29
-
30
- // this.updateSelf();
31
- this.checkAndUpdate();
32
- }
33
-
34
- ngOnDestroy() {
35
- if (this.angularPConnectData.unsubscribeFn) {
36
- this.angularPConnectData.unsubscribeFn();
37
- }
38
- }
39
-
40
- onStateChange() {
41
- this.checkAndUpdate();
42
- }
43
-
44
- checkAndUpdate() {
45
- // Should always check the bridge to see if the component should
46
- // update itself (re-render)
47
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
48
-
49
- // ONLY call updateSelf when the component should update
50
- if (bUpdateSelf) {
51
- this.updateSelf();
52
- }
53
- }
54
-
55
- updateSelf() {
20
+ override updateSelf() {
56
21
  const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
57
22
  this.showHighlightedData = rawMetaData?.showHighlightedData;
58
23
 
@@ -5,8 +5,7 @@
5
5
  *ngIf="tab.content?.getPConnect()"
6
6
  [name]="tab.content?.getPConnect().getComponentName()"
7
7
  [props]="{
8
- pConn$: tab.content?.getPConnect(),
9
- formGroup$: formGroup$
8
+ pConn$: tab.content?.getPConnect()
10
9
  }"
11
10
  errorMsg="Details Sub tabs wants component not yet available: {{ tab.content?.getPConnect().getComponentName() }}"
12
11
  ></component-mapper>
@@ -1,10 +1,9 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
1
+ import { Component, forwardRef } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
- import { FormGroup } from '@angular/forms';
4
3
  import { MatTabsModule } from '@angular/material/tabs';
5
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
6
4
  import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/angular-sdk-components';
7
5
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
+ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
8
7
 
9
8
  @Component({
10
9
  selector: 'app-details-sub-tabs',
@@ -13,45 +12,14 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
13
12
  standalone: true,
14
13
  imports: [MatTabsModule, CommonModule, forwardRef(() => ComponentMapperComponent)]
15
14
  })
16
- export class DetailsSubTabsComponent implements OnInit, OnDestroy {
17
- @Input() pConn$: typeof PConnect;
18
- @Input() formGroup$: FormGroup;
15
+ export class DetailsSubTabsComponent extends DetailsTemplateBase {
16
+ override pConn$: typeof PConnect;
19
17
 
20
- angularPConnectData: AngularPConnectData = {};
21
18
  currentTabId = '0';
22
19
  tabItems: any[];
23
20
  availableTabs: any[];
24
21
 
25
- constructor(private angularPConnect: AngularPConnectService) {}
26
-
27
- ngOnInit(): void {
28
- // First thing in initialization is registering and subscribing to the AngularPConnect service
29
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
30
- this.checkAndUpdate();
31
- }
32
-
33
- ngOnDestroy() {
34
- if (this.angularPConnectData.unsubscribeFn) {
35
- this.angularPConnectData.unsubscribeFn();
36
- }
37
- }
38
-
39
- onStateChange() {
40
- this.checkAndUpdate();
41
- }
42
-
43
- checkAndUpdate() {
44
- // Should always check the bridge to see if the component should
45
- // update itself (re-render)
46
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
47
-
48
- // ONLY call updateSelf when the component should update
49
- if (bUpdateSelf) {
50
- this.updateSelf();
51
- }
52
- }
53
-
54
- updateSelf() {
22
+ override updateSelf() {
55
23
  const children = this.pConn$?.getChildren();
56
24
  const deferLoadedTabs = children[0];
57
25
  this.availableTabs = getVisibleTabs(deferLoadedTabs, 'tabsSubs');
@@ -1,7 +1,6 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
1
+ import { Component, forwardRef } from '@angular/core';
4
2
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
+ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
5
4
 
6
5
  @Component({
7
6
  selector: 'app-details-three-column',
@@ -10,11 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
9
  standalone: true,
11
10
  imports: [forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
- export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
14
- constructor(private angularPConnect: AngularPConnectService) {}
15
-
16
- @Input() pConn$: typeof PConnect;
17
- @Input() formGroup$: FormGroup;
12
+ export class DetailsThreeColumnComponent extends DetailsTemplateBase {
13
+ override pConn$: typeof PConnect;
18
14
 
19
15
  showHighlightedData: boolean;
20
16
  highlightedDataArr: any;
@@ -25,39 +21,7 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
25
21
 
26
22
  propsToUse: any = {};
27
23
 
28
- // Used with AngularPConnect
29
- angularPConnectData: AngularPConnectData = {};
30
-
31
- ngOnInit(): void {
32
- // First thing in initialization is registering and subscribing to the AngularPConnect service
33
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
34
-
35
- // this.updateSelf();
36
- this.checkAndUpdate();
37
- }
38
-
39
- ngOnDestroy() {
40
- if (this.angularPConnectData.unsubscribeFn) {
41
- this.angularPConnectData.unsubscribeFn();
42
- }
43
- }
44
-
45
- onStateChange() {
46
- this.checkAndUpdate();
47
- }
48
-
49
- checkAndUpdate() {
50
- // Should always check the bridge to see if the component should
51
- // update itself (re-render)
52
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
53
-
54
- // ONLY call updateSelf when the component should update
55
- if (bUpdateSelf) {
56
- this.updateSelf();
57
- }
58
- }
59
-
60
- updateSelf() {
24
+ override updateSelf() {
61
25
  const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
62
26
  this.showHighlightedData = rawMetaData?.showHighlightedData;
63
27
 
@@ -1,7 +1,6 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
1
+ import { Component, forwardRef } from '@angular/core';
4
2
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
+ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
5
4
 
6
5
  @Component({
7
6
  selector: 'app-details-two-column',
@@ -10,11 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
9
  standalone: true,
11
10
  imports: [forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
- export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
14
- constructor(private angularPConnect: AngularPConnectService) {}
15
-
16
- @Input() pConn$: typeof PConnect;
17
- @Input() formGroup$: FormGroup;
12
+ export class DetailsTwoColumnComponent extends DetailsTemplateBase {
13
+ override pConn$: typeof PConnect;
18
14
 
19
15
  showHighlightedData: boolean;
20
16
  highlightedDataArr: any;
@@ -25,39 +21,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
25
21
 
26
22
  propsToUse: any = {};
27
23
 
28
- // Used with AngularPConnect
29
- angularPConnectData: AngularPConnectData = {};
30
-
31
- ngOnInit(): void {
32
- // First thing in initialization is registering and subscribing to the AngularPConnect service
33
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
34
-
35
- // this.updateSelf();
36
- this.checkAndUpdate();
37
- }
38
-
39
- ngOnDestroy() {
40
- if (this.angularPConnectData.unsubscribeFn) {
41
- this.angularPConnectData.unsubscribeFn();
42
- }
43
- }
44
-
45
- onStateChange() {
46
- this.checkAndUpdate();
47
- }
48
-
49
- checkAndUpdate() {
50
- // Should always check the bridge to see if the component should
51
- // update itself (re-render)
52
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
53
-
54
- // ONLY call updateSelf when the component should update
55
- if (bUpdateSelf) {
56
- this.updateSelf();
57
- }
58
- }
59
-
60
- updateSelf() {
24
+ override updateSelf() {
61
25
  const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
62
26
  this.showHighlightedData = rawMetaData?.showHighlightedData;
63
27