@pega/angular-sdk-overrides 24.2.10 → 25.1.10

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 (257) hide show
  1. package/lib/designSystemExtension/alert/alert.component.scss +3 -3
  2. package/lib/designSystemExtension/alert/alert.component.ts +0 -1
  3. package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +0 -1
  4. package/lib/designSystemExtension/banner/banner.component.html +1 -1
  5. package/lib/designSystemExtension/banner/banner.component.scss +17 -3
  6. package/lib/designSystemExtension/banner/banner.component.ts +0 -1
  7. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +0 -1
  8. package/lib/designSystemExtension/field-group/field-group.component.ts +0 -1
  9. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -3
  10. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +5 -34
  11. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +0 -2
  12. package/lib/designSystemExtension/material-details/material-details.component.scss +0 -5
  13. package/lib/designSystemExtension/material-details/material-details.component.ts +0 -1
  14. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +3 -3
  15. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +4 -3
  16. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +6 -1
  17. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.scss +4 -17
  18. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.ts +0 -1
  19. package/lib/designSystemExtension/material-summary-list/material-summary-list.component.ts +0 -1
  20. package/lib/designSystemExtension/material-utility/material-utility.component.scss +1 -2
  21. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.scss +1 -1
  22. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.ts +0 -1
  23. package/lib/designSystemExtension/operator/operator.component.html +2 -2
  24. package/lib/designSystemExtension/operator/operator.component.scss +13 -12
  25. package/lib/designSystemExtension/operator/operator.component.ts +4 -5
  26. package/lib/designSystemExtension/pulse/pulse.component.scss +2 -2
  27. package/lib/designSystemExtension/pulse/pulse.component.ts +0 -1
  28. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +4 -17
  29. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +0 -1
  30. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +30 -1
  31. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.scss +16 -9
  32. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.ts +0 -1
  33. package/lib/field/auto-complete/auto-complete.component.html +0 -2
  34. package/lib/field/auto-complete/auto-complete.component.ts +48 -173
  35. package/lib/field/cancel-alert/cancel-alert.component.html +8 -12
  36. package/lib/field/cancel-alert/cancel-alert.component.scss +2 -3
  37. package/lib/field/cancel-alert/cancel-alert.component.ts +24 -37
  38. package/lib/field/check-box/check-box.component.html +17 -6
  39. package/lib/field/check-box/check-box.component.scss +0 -1
  40. package/lib/field/check-box/check-box.component.ts +25 -151
  41. package/lib/field/currency/currency.component.ts +54 -181
  42. package/lib/field/date/date.component.html +4 -3
  43. package/lib/field/date/date.component.ts +30 -151
  44. package/lib/field/date-time/date-time.component.html +2 -2
  45. package/lib/field/date-time/date-time.component.ts +47 -148
  46. package/lib/field/decimal/decimal.component.html +1 -0
  47. package/lib/field/decimal/decimal.component.ts +61 -164
  48. package/lib/field/dropdown/dropdown.component.html +1 -0
  49. package/lib/field/dropdown/dropdown.component.ts +43 -152
  50. package/lib/field/email/email.component.ts +28 -158
  51. package/lib/field/field.base.ts +149 -0
  52. package/lib/field/group/group.component.ts +7 -5
  53. package/lib/field/integer/integer.component.html +1 -1
  54. package/lib/field/integer/integer.component.ts +30 -160
  55. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +1 -1
  56. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +3 -3
  57. package/lib/field/location/config-ext.json +8 -0
  58. package/lib/field/location/location.component.html +45 -0
  59. package/lib/field/location/location.component.scss +18 -0
  60. package/lib/field/location/location.component.spec.ts +22 -0
  61. package/lib/field/location/location.component.ts +280 -0
  62. package/lib/field/multiselect/multiselect.component.ts +47 -152
  63. package/lib/field/multiselect/utils.ts +55 -47
  64. package/lib/field/object-reference/object-reference.component.html +17 -0
  65. package/lib/field/object-reference/object-reference.component.scss +0 -0
  66. package/lib/field/object-reference/object-reference.component.spec.ts +22 -0
  67. package/lib/field/object-reference/object-reference.component.ts +237 -0
  68. package/lib/field/percentage/percentage.component.html +1 -1
  69. package/lib/field/percentage/percentage.component.ts +62 -170
  70. package/lib/field/phone/config-ext.json +1 -1
  71. package/lib/field/phone/phone.component.html +18 -17
  72. package/lib/field/phone/phone.component.scss +4 -0
  73. package/lib/field/phone/phone.component.ts +47 -156
  74. package/lib/field/radio-buttons/radio-buttons.component.html +17 -12
  75. package/lib/field/radio-buttons/radio-buttons.component.scss +4 -2
  76. package/lib/field/radio-buttons/radio-buttons.component.ts +37 -160
  77. package/lib/field/rich-text/rich-text.component.html +2 -0
  78. package/lib/field/rich-text/rich-text.component.scss +172 -0
  79. package/lib/field/rich-text/rich-text.component.ts +32 -93
  80. package/lib/field/scalar-list/scalar-list.component.ts +17 -73
  81. package/lib/field/selectable-card/selectable-card.component.html +70 -0
  82. package/lib/field/selectable-card/selectable-card.component.scss +11 -0
  83. package/lib/field/selectable-card/selectable-card.component.spec.ts +22 -0
  84. package/lib/field/selectable-card/selectable-card.component.ts +219 -0
  85. package/lib/field/semantic-link/semantic-link.component.html +4 -8
  86. package/lib/field/semantic-link/semantic-link.component.scss +0 -13
  87. package/lib/field/semantic-link/semantic-link.component.ts +165 -6
  88. package/lib/field/text/text.component.scss +0 -1
  89. package/lib/field/text/text.component.ts +6 -5
  90. package/lib/field/text-area/text-area.component.html +4 -2
  91. package/lib/field/text-area/text-area.component.ts +30 -155
  92. package/lib/field/text-content/text-content.component.ts +0 -1
  93. package/lib/field/text-input/text-input.component.html +1 -1
  94. package/lib/field/text-input/text-input.component.ts +28 -158
  95. package/lib/field/time/time.component.html +2 -2
  96. package/lib/field/time/time.component.ts +34 -154
  97. package/lib/field/url/url.component.html +1 -1
  98. package/lib/field/url/url.component.ts +28 -157
  99. package/lib/field/user-reference/user-reference.component.html +40 -38
  100. package/lib/field/user-reference/user-reference.component.scss +0 -1
  101. package/lib/field/user-reference/user-reference.component.ts +70 -9
  102. package/lib/infra/Containers/flow-container/flow-container.component.html +2 -2
  103. package/lib/infra/Containers/flow-container/flow-container.component.ts +24 -51
  104. package/lib/infra/Containers/flow-container/helpers.ts +2 -2
  105. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +0 -1
  106. package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +1 -11
  107. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +5 -18
  108. package/lib/infra/Containers/view-container/helper.ts +35 -2
  109. package/lib/infra/Containers/view-container/view-container.component.ts +1 -2
  110. package/lib/infra/action-buttons/action-buttons.component.html +13 -8
  111. package/lib/infra/action-buttons/action-buttons.component.scss +23 -0
  112. package/lib/infra/action-buttons/action-buttons.component.ts +1 -3
  113. package/lib/infra/assignment/assignment.component.html +1 -1
  114. package/lib/infra/assignment/assignment.component.ts +100 -46
  115. package/lib/infra/assignment-card/assignment-card.component.html +2 -2
  116. package/lib/infra/assignment-card/assignment-card.component.scss +0 -4
  117. package/lib/infra/assignment-card/assignment-card.component.ts +21 -5
  118. package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
  119. package/lib/infra/defer-load/defer-load.component.html +6 -2
  120. package/lib/infra/defer-load/defer-load.component.ts +25 -12
  121. package/lib/infra/error-boundary/error-boundary.component.ts +0 -1
  122. package/lib/infra/multi-step/multi-step.component.html +22 -38
  123. package/lib/infra/multi-step/multi-step.component.scss +14 -27
  124. package/lib/infra/multi-step/multi-step.component.ts +0 -1
  125. package/lib/infra/navbar/navbar.component.html +36 -41
  126. package/lib/infra/navbar/navbar.component.scss +22 -4
  127. package/lib/infra/navbar/navbar.component.ts +8 -6
  128. package/lib/infra/reference/reference.component.ts +82 -90
  129. package/lib/infra/region/region.component.ts +0 -1
  130. package/lib/infra/root-container/root-container.component.html +2 -15
  131. package/lib/infra/root-container/root-container.component.scss +0 -1
  132. package/lib/infra/root-container/root-container.component.ts +25 -32
  133. package/lib/infra/stages/stages.component.html +4 -3
  134. package/lib/infra/stages/stages.component.scss +12 -36
  135. package/lib/infra/stages/stages.component.ts +4 -3
  136. package/lib/infra/view/view.component.html +1 -1
  137. package/lib/infra/view/view.component.ts +3 -7
  138. package/lib/template/advanced-search/advanced-search.component.html +12 -0
  139. package/lib/template/advanced-search/advanced-search.component.scss +0 -0
  140. package/lib/template/advanced-search/advanced-search.component.spec.ts +0 -0
  141. package/lib/template/advanced-search/advanced-search.component.ts +112 -0
  142. package/lib/template/advanced-search/advanced-search.service.ts +27 -0
  143. package/lib/template/advanced-search/search-group/persist-utils.ts +56 -0
  144. package/lib/template/advanced-search/search-groups/search-groups.component.html +32 -0
  145. package/lib/template/advanced-search/search-groups/search-groups.component.scss +0 -0
  146. package/lib/template/advanced-search/search-groups/search-groups.component.spec.ts +0 -0
  147. package/lib/template/advanced-search/search-groups/search-groups.component.ts +294 -0
  148. package/lib/template/advanced-search/search-groups/utils.ts +29 -0
  149. package/lib/template/app-shell/app-shell.component.html +4 -1
  150. package/lib/template/app-shell/app-shell.component.scss +0 -3
  151. package/lib/template/app-shell/app-shell.component.ts +46 -8
  152. package/lib/template/banner-page/banner-page.component.ts +0 -1
  153. package/lib/template/base/form-template-base.ts +6 -0
  154. package/lib/template/case-summary/case-summary.component.scss +0 -2
  155. package/lib/template/case-summary/case-summary.component.ts +6 -22
  156. package/lib/template/case-view/case-view.component.html +4 -4
  157. package/lib/template/case-view/case-view.component.scss +18 -10
  158. package/lib/template/case-view/case-view.component.ts +1 -11
  159. package/lib/template/confirmation/confirmation.component.html +2 -2
  160. package/lib/template/confirmation/confirmation.component.ts +0 -1
  161. package/lib/template/data-reference/data-reference.component.html +11 -8
  162. package/lib/template/data-reference/data-reference.component.ts +346 -113
  163. package/lib/template/data-reference/search-form/search-form.component.html +39 -0
  164. package/lib/template/data-reference/search-form/search-form.component.scss +11 -0
  165. package/lib/template/data-reference/search-form/search-form.component.spec.ts +0 -0
  166. package/lib/template/data-reference/search-form/search-form.component.ts +167 -0
  167. package/lib/template/data-reference/search-form/tabsData.ts +160 -0
  168. package/lib/template/data-reference/utils.ts +92 -0
  169. package/lib/template/default-form/default-form.component.ts +45 -5
  170. package/lib/template/default-page/default-page.component.html +34 -0
  171. package/lib/template/default-page/default-page.component.scss +31 -0
  172. package/lib/template/default-page/default-page.component.spec.ts +24 -0
  173. package/lib/template/default-page/default-page.component.ts +64 -0
  174. package/lib/template/details/details.component.ts +0 -1
  175. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +0 -1
  176. package/lib/template/details-one-column/details-one-column.component.ts +0 -1
  177. package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +0 -1
  178. package/lib/template/details-three-column/details-three-column.component.ts +0 -1
  179. package/lib/template/details-two-column/details-two-column.component.ts +0 -1
  180. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +0 -1
  181. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +0 -1
  182. package/lib/template/field-group-list/field-group-list.component.scss +0 -1
  183. package/lib/template/field-group-list/field-group-list.component.ts +0 -1
  184. package/lib/template/field-group-template/field-group-template.component.html +7 -7
  185. package/lib/template/field-group-template/field-group-template.component.scss +8 -0
  186. package/lib/template/field-group-template/field-group-template.component.ts +64 -55
  187. package/lib/template/field-value-list/field-value-list.component.html +2 -2
  188. package/lib/template/field-value-list/field-value-list.component.scss +4 -0
  189. package/lib/template/field-value-list/field-value-list.component.ts +0 -1
  190. package/lib/template/inline-dashboard/inline-dashboard.component.ts +0 -1
  191. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +1 -2
  192. package/lib/template/list-page/list-page.component.ts +0 -1
  193. package/lib/template/list-view/list-view.component.html +170 -160
  194. package/lib/template/list-view/list-view.component.scss +25 -21
  195. package/lib/template/list-view/list-view.component.ts +208 -122
  196. package/lib/template/list-view/listViewHelpers.ts +3 -9
  197. package/lib/template/list-view/utils.ts +27 -7
  198. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +0 -1
  199. package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +0 -1
  200. package/lib/template/object-page/object-page.component.html +1 -0
  201. package/lib/template/object-page/object-page.component.scss +0 -0
  202. package/lib/template/object-page/object-page.component.spec.ts +22 -0
  203. package/lib/template/object-page/object-page.component.ts +14 -0
  204. package/lib/template/one-column/one-column.component.ts +0 -1
  205. package/lib/template/one-column-page/one-column-page.component.ts +0 -1
  206. package/lib/template/one-column-tab/one-column-tab.component.scss +1 -1
  207. package/lib/template/one-column-tab/one-column-tab.component.ts +0 -1
  208. package/lib/template/page/page.component.ts +0 -1
  209. package/lib/template/promoted-filters/promoted-filters.component.ts +0 -1
  210. package/lib/template/repeating-structures/repeating-structures.component.ts +0 -2
  211. package/lib/template/self-service-case-view/self-service-case-view.component.html +78 -0
  212. package/lib/template/self-service-case-view/self-service-case-view.component.scss +132 -0
  213. package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +24 -0
  214. package/lib/template/self-service-case-view/self-service-case-view.component.ts +207 -0
  215. package/lib/template/simple-table/simple-table.component.ts +0 -2
  216. package/lib/template/simple-table-manual/helpers.ts +126 -10
  217. package/lib/template/simple-table-manual/simple-table-manual.component.html +27 -8
  218. package/lib/template/simple-table-manual/simple-table-manual.component.scss +15 -17
  219. package/lib/template/simple-table-manual/simple-table-manual.component.ts +103 -45
  220. package/lib/template/simple-table-select/simple-table-select.component.ts +0 -1
  221. package/lib/template/single-reference-readonly/single-reference-readonly.component.html +4 -1
  222. package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +21 -0
  223. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +104 -4
  224. package/lib/template/sub-tabs/sub-tabs.component.ts +0 -1
  225. package/lib/template/three-column/three-column.component.ts +0 -1
  226. package/lib/template/three-column-page/three-column-page.component.ts +0 -1
  227. package/lib/template/two-column/two-column.component.ts +0 -1
  228. package/lib/template/two-column-page/two-column-page.component.ts +0 -1
  229. package/lib/template/two-column-tab/two-column-tab.component.ts +0 -1
  230. package/lib/template/utils.ts +58 -0
  231. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +0 -1
  232. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +0 -1
  233. package/lib/template/wss-nav-bar/wss-nav-bar.component.html +6 -5
  234. package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +8 -17
  235. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +1 -9
  236. package/lib/widget/app-announcement/app-announcement.component.html +1 -2
  237. package/lib/widget/app-announcement/app-announcement.component.scss +2 -2
  238. package/lib/widget/app-announcement/app-announcement.component.ts +0 -1
  239. package/lib/widget/attachment/Attachment.types.ts +92 -0
  240. package/lib/widget/attachment/AttachmentUtils.ts +287 -0
  241. package/lib/widget/attachment/attachment.component.html +3 -3
  242. package/lib/widget/attachment/attachment.component.scss +9 -12
  243. package/lib/widget/attachment/attachment.component.ts +267 -254
  244. package/lib/widget/case-history/case-history.component.ts +0 -1
  245. package/lib/widget/feed-container/feed-container.component.scss +3 -9
  246. package/lib/widget/feed-container/feed-container.component.ts +2 -5
  247. package/lib/widget/file-utility/file-utility.component.html +3 -3
  248. package/lib/widget/file-utility/file-utility.component.scss +6 -17
  249. package/lib/widget/file-utility/file-utility.component.ts +24 -9
  250. package/lib/widget/list-utility/list-utility.component.scss +4 -5
  251. package/lib/widget/list-utility/list-utility.component.ts +0 -1
  252. package/lib/widget/quick-create/quick-create.component.ts +41 -23
  253. package/lib/widget/todo/todo.component.html +12 -10
  254. package/lib/widget/todo/todo.component.scss +20 -10
  255. package/lib/widget/todo/todo.component.ts +11 -7
  256. package/lib/widget/utility/utility.component.ts +0 -1
  257. package/package.json +1 -1
@@ -0,0 +1,64 @@
1
+ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { ReferenceComponent } from '@pega/angular-sdk-components';
4
+ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
5
+
6
+ interface DefaultPageProps {
7
+ // If any, enter additional props that only exist on this component
8
+ layout?: string;
9
+ title?: string;
10
+ heading?: string;
11
+ message?: string;
12
+ backgroundImage?: string;
13
+ enableBanner?: boolean;
14
+ }
15
+
16
+ @Component({
17
+ selector: 'app-default-page',
18
+ templateUrl: './default-page.component.html',
19
+ styleUrls: ['./default-page.component.scss'],
20
+ imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
21
+ })
22
+ export class DefaultPageComponent implements OnInit, OnChanges {
23
+ @Input() pConn$: typeof PConnect;
24
+ @Input() formGroup$: any;
25
+
26
+ configProps$: DefaultPageProps;
27
+ arChildren$: any[];
28
+ title?: string;
29
+ heading: any;
30
+ message?: string;
31
+ backgroundImage?: string;
32
+ layout$?: string;
33
+ enableBanner$?: boolean;
34
+
35
+ constructor() {
36
+ this.backgroundImage = this.configProps$?.backgroundImage;
37
+ }
38
+
39
+ ngOnInit() {
40
+ this.backgroundImage = this.configProps$?.backgroundImage;
41
+ this.updateSelf();
42
+ }
43
+
44
+ ngOnChanges(changes: SimpleChanges): void {
45
+ const { pConn$ } = changes;
46
+ this.backgroundImage = this.configProps$?.backgroundImage;
47
+
48
+ if (pConn$.previousValue && pConn$.previousValue !== pConn$.currentValue) {
49
+ this.updateSelf();
50
+ }
51
+ }
52
+
53
+ updateSelf() {
54
+ this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DefaultPageProps;
55
+
56
+ this.layout$ = this.configProps$.layout;
57
+ this.heading = this.configProps$.heading;
58
+ this.message = this.configProps$.message;
59
+ this.backgroundImage = this.configProps$.backgroundImage;
60
+ this.enableBanner$ = this.configProps$.enableBanner;
61
+
62
+ this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
63
+ }
64
+ }
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
6
  selector: 'app-details',
7
7
  templateUrl: './details.component.html',
8
8
  styleUrls: ['./details.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class DetailsComponent extends DetailsTemplateBase {
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
6
  selector: 'app-details-narrow-wide',
7
7
  templateUrl: './details-narrow-wide.component.html',
8
8
  styleUrls: ['./details-narrow-wide.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class DetailsNarrowWideComponent extends DetailsTemplateBase {
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
6
  selector: 'app-details-one-column',
7
7
  templateUrl: './details-one-column.component.html',
8
8
  styleUrls: ['./details-one-column.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class DetailsOneColumnComponent extends DetailsTemplateBase {
@@ -9,7 +9,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
9
9
  selector: 'app-details-sub-tabs',
10
10
  templateUrl: './details-sub-tabs.component.html',
11
11
  styleUrls: ['./details-sub-tabs.component.scss'],
12
- standalone: true,
13
12
  imports: [MatTabsModule, CommonModule, forwardRef(() => ComponentMapperComponent)]
14
13
  })
15
14
  export class DetailsSubTabsComponent extends DetailsTemplateBase {
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
6
  selector: 'app-details-three-column',
7
7
  templateUrl: './details-three-column.component.html',
8
8
  styleUrls: ['./details-three-column.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class DetailsThreeColumnComponent extends DetailsTemplateBase {
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
6
  selector: 'app-details-two-column',
7
7
  templateUrl: './details-two-column.component.html',
8
8
  styleUrls: ['./details-two-column.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class DetailsTwoColumnComponent extends DetailsTemplateBase {
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
6
  selector: 'app-details-wide-narrow',
7
7
  templateUrl: './details-wide-narrow.component.html',
8
8
  styleUrls: ['./details-wide-narrow.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class DetailsWideNarrowComponent extends DetailsTemplateBase {
@@ -17,7 +17,6 @@ interface DynamicTabsProps {
17
17
  selector: 'app-dynamic-tabs',
18
18
  templateUrl: './dynamic-tabs.component.html',
19
19
  styleUrls: ['./dynamic-tabs.component.scss'],
20
- standalone: true,
21
20
  imports: [CommonModule, MatTabsModule, forwardRef(() => ComponentMapperComponent)]
22
21
  })
23
22
  export class DynamicTabsComponent implements OnInit, OnDestroy {
@@ -1,5 +1,4 @@
1
1
  .psdk-details-fields-label {
2
- color: var(--app-label-color);
3
2
  margin: 8px 0px;
4
3
  }
5
4
 
@@ -6,7 +6,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  selector: 'app-field-group-list',
7
7
  templateUrl: './field-group-list.component.html',
8
8
  styleUrls: ['./field-group-list.component.scss'],
9
- standalone: true,
10
9
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class FieldGroupListComponent {
@@ -1,5 +1,5 @@
1
1
  <div id="field-group">
2
- <h3 *ngIf="showLabel$" className="label" style="font-weight: bold">
2
+ <h3 *ngIf="showLabel$" class="field-group-template-header" style="font-weight: bold">
3
3
  {{ label$ }}
4
4
  </h3>
5
5
  <div *ngIf="readonlyMode; else editable">
@@ -11,23 +11,23 @@
11
11
  </div>
12
12
  <ng-template #editable>
13
13
  <div *ngIf="children && children.length > 0">
14
- <div *ngFor="let kid of children; let i = index">
14
+ <div class="field-group-template-item" *ngFor="let child of children; let i = index">
15
15
  <div class="header-div">
16
16
  <div style="width: 80%">
17
- <b>{{ kid.name }}</b>
17
+ <b>{{ child.name }}</b>
18
18
  </div>
19
- <div *ngIf="allowAddEdit !== false" style="width: 20%; text-align: right">
19
+ <div *ngIf="allowDelete && child.allowRowDelete" style="width: 20%; text-align: right">
20
20
  <button id="delete-button" mat-icon-button (click)="deleteFieldGroupItem(i)">
21
21
  <img class="psdk-utility-card-action-svg-icon" src="{{ menuIconOverride$ }}" />
22
22
  </button>
23
23
  </div>
24
24
  </div>
25
25
 
26
- <div *ngIf="kid.children.getPConnect().getRawMetadata().type.toLowerCase() == 'region'">
27
- <component-mapper name="Region" [props]="{ pConn$: kid.children.getPConnect(), formGroup$ }"></component-mapper>
26
+ <div *ngIf="child.children.getPConnect().getRawMetadata().type.toLowerCase() == 'region'">
27
+ <component-mapper name="Region" [props]="{ pConn$: child.children.getPConnect(), formGroup$ }"></component-mapper>
28
28
  </div>
29
29
  </div>
30
- <button *ngIf="allowAddEdit !== false" mat-button color="primary" style="font-size: 16px" (click)="addFieldGroupItem()">+ Add</button>
31
30
  </div>
31
+ <button *ngIf="allowAdd" mat-button color="primary" style="font-size: 16px" (click)="addFieldGroupItem()">{{ getAddBtnLabel() }}</button>
32
32
  </ng-template>
33
33
  </div>
@@ -6,3 +6,11 @@
6
6
  display: flex;
7
7
  align-items: center;
8
8
  }
9
+
10
+ .field-group-template-header {
11
+ margin-left: 0;
12
+ }
13
+
14
+ .field-group-template-item {
15
+ padding-block: 1rem;
16
+ }
@@ -1,4 +1,4 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges } from '@angular/core';
1
+ import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, signal } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { MatButtonModule } from '@angular/material/button';
@@ -6,11 +6,14 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
6
6
  import { buildView, getReferenceList } from '@pega/angular-sdk-components';
7
7
  import { Utils } from '@pega/angular-sdk-components';
8
8
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
9
+ import { evaluateAllowRowAction } from '@pega/angular-sdk-components';
9
10
 
10
11
  interface FieldGroupTemplateProps {
11
12
  // If any, enter additional props that only exist on this component
12
13
  label?: string;
13
- showLabel?: boolean;
14
+ hideLabel?: boolean;
15
+ allowActions?: any;
16
+ allowRowDelete?: any;
14
17
  referenceList?: any[];
15
18
  contextClass: string;
16
19
  renderMode?: string;
@@ -19,13 +22,13 @@ interface FieldGroupTemplateProps {
19
22
  displayMode?: string;
20
23
  fieldHeader?: string;
21
24
  allowTableEdit: boolean;
25
+ targetClassLabel?: string;
22
26
  }
23
27
 
24
28
  @Component({
25
29
  selector: 'app-field-group-template',
26
30
  templateUrl: './field-group-template.component.html',
27
31
  styleUrls: ['./field-group-template.component.scss'],
28
- standalone: true,
29
32
  imports: [CommonModule, MatButtonModule, forwardRef(() => ComponentMapperComponent)]
30
33
  })
31
34
  export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges {
@@ -34,33 +37,42 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
34
37
  @Input() formGroup$: FormGroup;
35
38
 
36
39
  angularPConnectData: AngularPConnectData = {};
37
- inheritedProps$: object;
40
+
38
41
  showLabel$?: boolean = true;
39
42
  label$?: string;
40
43
  readonlyMode: boolean;
41
44
  contextClass: any;
42
- referenceList: any;
43
- pageReference: any;
44
45
  heading: any;
45
46
  children: any;
46
47
  menuIconOverride$: any;
47
- prevRefLength: number;
48
- allowAddEdit: boolean;
48
+ referenceListLength = signal<number | null>(null);
49
49
  fieldHeader: any;
50
50
 
51
+ allowAdd = true;
52
+ allowEdit = true;
53
+ allowDelete = true;
54
+
51
55
  constructor(
52
56
  private angularPConnect: AngularPConnectService,
53
57
  private utils: Utils
54
58
  ) {}
55
59
 
56
60
  ngOnInit(): void {
57
- // First thing in initialization is registering and subscribing to the AngularPConnect service
58
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
59
- this.updateSelf();
61
+ this.menuIconOverride$ = this.utils.getImageSrc('trash', this.utils.getSDKStaticContentUrl());
62
+
63
+ const { allowActions, allowTableEdit, referenceList } = this.configProps$;
60
64
 
61
- const menuIconOverride$ = 'trash';
62
- if (menuIconOverride$) {
63
- this.menuIconOverride$ = this.utils.getImageSrc(menuIconOverride$, this.utils.getSDKStaticContentUrl());
65
+ if (allowActions && Object.keys(allowActions).length > 0) {
66
+ this.allowAdd = allowActions.allowAdd ?? allowTableEdit ?? true;
67
+ this.allowEdit = allowActions.allowEdit ?? true;
68
+ this.allowDelete = allowActions.allowDelete ?? allowTableEdit ?? true;
69
+ } else {
70
+ this.allowAdd = allowTableEdit ?? true;
71
+ this.allowDelete = allowTableEdit ?? true;
72
+ }
73
+
74
+ if (referenceList?.length === 0 && (this.allowAdd || this.allowEdit)) {
75
+ this.pConn$.getListActions().insert({ classID: this.contextClass }, referenceList.length);
64
76
  }
65
77
  }
66
78
 
@@ -70,71 +82,63 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
70
82
  }
71
83
  }
72
84
 
73
- onStateChange() {
74
- // Should always check the bridge to see if the component should
75
- // update itself (re-render)
76
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
77
- // ONLY call updateSelf when the component should update
78
- if (bUpdateSelf) {
79
- this.updateSelf();
80
- }
81
- }
82
-
83
85
  ngOnChanges(changes) {
84
86
  if (changes && changes.configProps$) {
85
87
  const props = changes.configProps$;
86
88
  if (props.currentValue !== props.previousValue) {
87
89
  this.configProps$ = props.currentValue;
90
+
88
91
  if (changes?.pConn$?.currentValue) {
89
92
  this.pConn$ = changes?.pConn$?.currentValue;
90
93
  }
94
+
91
95
  this.updateSelf();
96
+
97
+ setTimeout(() => {
98
+ this.angularPConnect.shouldComponentUpdate(this);
99
+ }, 100);
92
100
  }
93
101
  }
94
102
  }
95
103
 
96
104
  updateSelf() {
97
- this.inheritedProps$ = this.pConn$.getInheritedProps();
98
- this.label$ = this.configProps$.label;
99
- this.showLabel$ = this.configProps$.showLabel;
100
- // label & showLabel within inheritedProps takes precedence over configProps
101
- this.label$ = (this.inheritedProps$ as any).label || this.label$;
102
- this.showLabel$ = (this.inheritedProps$ as any).showLabel || this.showLabel$;
105
+ const inheritedProps: any = this.pConn$.getInheritedProps();
103
106
 
104
- this.allowAddEdit = this.configProps$.allowTableEdit;
107
+ const { label, hideLabel, allowRowDelete, referenceList, fieldHeader, renderMode, displayMode, heading, contextClass, lookForChildInConfig } =
108
+ this.configProps$;
109
+
110
+ // label within inheritedProps takes precedence over configProps
111
+ this.label$ = inheritedProps.label || label;
112
+
113
+ this.showLabel$ = referenceList?.length === 0 || !hideLabel;
105
114
 
106
- const renderMode = this.configProps$.renderMode;
107
- const displayMode = this.configProps$.displayMode;
108
115
  this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
109
- this.contextClass = this.configProps$.contextClass;
110
- const lookForChildInConfig = this.configProps$.lookForChildInConfig;
111
- this.heading = this.configProps$.heading ?? 'Row';
112
- this.fieldHeader = this.configProps$.fieldHeader;
116
+
117
+ this.contextClass = contextClass;
118
+ this.heading = heading ?? 'Row';
119
+ this.fieldHeader = fieldHeader;
120
+
113
121
  const resolvedList = getReferenceList(this.pConn$);
114
- this.pageReference = `${this.pConn$.getPageReference()}${resolvedList}`;
115
122
  this.pConn$.setReferenceList(resolvedList);
123
+
116
124
  if (this.readonlyMode) {
117
125
  this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
118
126
  }
119
- this.referenceList = this.configProps$.referenceList;
120
- if (this.prevRefLength != this.referenceList.length) {
121
- // eslint-disable-next-line sonarjs/no-collapsible-if
122
- if (!this.readonlyMode) {
123
- if (this.referenceList?.length === 0 && this.allowAddEdit !== false) {
124
- this.addFieldGroupItem();
125
- }
126
- }
127
- const children: any = [];
128
- this.referenceList?.forEach((item, index) => {
129
- children.push({
127
+
128
+ if (this.referenceListLength() != referenceList?.length) {
129
+ // @ts-ignore - Expected 3 arguments, but got 1
130
+ this.pConn$.getListActions().initDefaultPageInstructions(resolvedList);
131
+
132
+ this.children = referenceList?.map((item, index) => {
133
+ return {
130
134
  id: index,
131
135
  name: this.fieldHeader === 'propertyRef' ? this.getDynamicHeader(item, index) : this.getStaticHeader(this.heading, index),
132
- children: buildView(this.pConn$, index, lookForChildInConfig)
133
- });
136
+ children: buildView(this.pConn$, index, lookForChildInConfig),
137
+ allowRowDelete: evaluateAllowRowAction(allowRowDelete, item)
138
+ };
134
139
  });
135
- this.children = children;
136
140
  }
137
- this.prevRefLength = this.referenceList.length;
141
+ this.referenceListLength.set(referenceList?.length || 0);
138
142
  }
139
143
 
140
144
  getStaticHeader = (heading, index) => {
@@ -142,17 +146,22 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
142
146
  };
143
147
 
144
148
  getDynamicHeader = (item, index) => {
145
- if (this.fieldHeader === 'propertyRef' && this.heading && item[this.heading.substring(1)]) {
149
+ if (this.heading && item[this.heading.substring(1)]) {
146
150
  return item[this.heading.substring(1)];
147
151
  }
148
152
  return `Row ${index + 1}`;
149
153
  };
150
154
 
151
155
  addFieldGroupItem() {
152
- this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
156
+ this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceListLength() as number);
153
157
  }
154
158
 
155
159
  deleteFieldGroupItem(index) {
156
160
  this.pConn$.getListActions().deleteEntry(index);
157
161
  }
162
+
163
+ getAddBtnLabel() {
164
+ const { targetClassLabel } = this.configProps$;
165
+ return targetClassLabel ? `+ Add ${targetClassLabel}` : '+ Add';
166
+ }
158
167
  }
@@ -1,5 +1,5 @@
1
- <div *ngIf="displayMode$ === 'DISPLAY_ONLY'; else STACKED_LARGE_VAL" class="psdk-container-labels-left">
2
- <div class="psdk-grid-label">{{ label$ }}</div>
1
+ <div *ngIf="displayMode$ === 'DISPLAY_ONLY'; else STACKED_LARGE_VAL" [ngClass]="label$ ? 'psdk-container-labels-left' : 'psdk-container-nolabels'">
2
+ <div *ngIf="label$" class="psdk-grid-label">{{ label$ }}</div>
3
3
  <div class="psdk-val-labels-left">
4
4
  <ng-container *ngTemplateOutlet="valueTemplate"></ng-container>
5
5
  </div>
@@ -6,6 +6,10 @@
6
6
  align-items: start;
7
7
  padding-block: 8px;
8
8
  }
9
+ .psdk-container-nolabels {
10
+ align-items: start;
11
+ padding-block: 8px;
12
+ }
9
13
  .psdk-value {
10
14
  margin: 8px 0px;
11
15
  }
@@ -5,7 +5,6 @@ import { Component, Input } from '@angular/core';
5
5
  selector: 'app-field-value-list',
6
6
  templateUrl: './field-value-list.component.html',
7
7
  styleUrls: ['./field-value-list.component.scss'],
8
- standalone: true,
9
8
  imports: [CommonModule]
10
9
  })
11
10
  export class FieldValueListComponent {
@@ -13,7 +13,6 @@ interface InlineDashboardProps {
13
13
  selector: 'app-inline-dashboard',
14
14
  templateUrl: './inline-dashboard.component.html',
15
15
  styleUrls: ['./inline-dashboard.component.scss'],
16
- standalone: true,
17
16
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
18
17
  })
19
18
  export class InlineDashboardComponent {
@@ -15,7 +15,6 @@ interface InlineDashboardPageProps {
15
15
  selector: 'app-inline-dashboard-page',
16
16
  templateUrl: './inline-dashboard-page.component.html',
17
17
  styleUrls: ['./inline-dashboard-page.component.scss'],
18
- standalone: true,
19
18
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
20
19
  })
21
20
  export class InlineDashboardPageComponent implements OnInit, OnChanges {
@@ -46,7 +45,7 @@ export class InlineDashboardPageComponent implements OnInit, OnChanges {
46
45
  updateSelf() {
47
46
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as InlineDashboardPageProps;
48
47
  const arChildren$ = this.pConn$.getChildren();
49
- const allFilters = this.pConn$.getRawMetadata()?.children[1];
48
+ const allFilters = this.pConn$.getRawMetadata()?.children?.[1];
50
49
  const filterComponents = buildFilterComponents(this.pConn$, allFilters);
51
50
  this.inlineProps = this.configProps$;
52
51
  this.children[0] = arChildren$[0];
@@ -5,7 +5,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
5
5
  selector: 'app-list-page',
6
6
  templateUrl: './list-page.component.html',
7
7
  styleUrls: ['./list-page.component.scss'],
8
- standalone: true,
9
8
  imports: [forwardRef(() => ComponentMapperComponent)]
10
9
  })
11
10
  export class ListPageComponent {