@pega/angular-sdk-overrides 24.2.12 → 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 (237) 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 -1
  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 +2 -2
  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 +0 -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 +1 -1
  24. package/lib/designSystemExtension/operator/operator.component.scss +3 -10
  25. package/lib/designSystemExtension/operator/operator.component.ts +0 -2
  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 -1
  34. package/lib/field/auto-complete/auto-complete.component.ts +35 -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 +14 -7
  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 +36 -169
  42. package/lib/field/date/date.component.html +2 -2
  43. package/lib/field/date/date.component.ts +30 -151
  44. package/lib/field/date-time/date-time.component.html +1 -1
  45. package/lib/field/date-time/date-time.component.ts +34 -149
  46. package/lib/field/decimal/decimal.component.ts +38 -164
  47. package/lib/field/dropdown/dropdown.component.ts +29 -152
  48. package/lib/field/email/email.component.ts +16 -156
  49. package/lib/field/field.base.ts +149 -0
  50. package/lib/field/group/group.component.ts +7 -5
  51. package/lib/field/integer/integer.component.ts +18 -158
  52. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +0 -1
  53. package/lib/field/location/config-ext.json +8 -0
  54. package/lib/field/location/location.component.html +45 -0
  55. package/lib/field/location/location.component.scss +18 -0
  56. package/lib/field/location/location.component.spec.ts +22 -0
  57. package/lib/field/location/location.component.ts +280 -0
  58. package/lib/field/multiselect/multiselect.component.ts +47 -152
  59. package/lib/field/multiselect/utils.ts +55 -47
  60. package/lib/field/object-reference/object-reference.component.html +17 -0
  61. package/lib/field/object-reference/object-reference.component.scss +0 -0
  62. package/lib/field/object-reference/object-reference.component.spec.ts +22 -0
  63. package/lib/field/object-reference/object-reference.component.ts +237 -0
  64. package/lib/field/percentage/percentage.component.ts +37 -155
  65. package/lib/field/phone/phone.component.html +18 -19
  66. package/lib/field/phone/phone.component.scss +4 -0
  67. package/lib/field/phone/phone.component.ts +43 -145
  68. package/lib/field/radio-buttons/radio-buttons.component.html +14 -6
  69. package/lib/field/radio-buttons/radio-buttons.component.scss +4 -2
  70. package/lib/field/radio-buttons/radio-buttons.component.ts +37 -160
  71. package/lib/field/rich-text/rich-text.component.html +2 -0
  72. package/lib/field/rich-text/rich-text.component.scss +172 -0
  73. package/lib/field/rich-text/rich-text.component.ts +21 -91
  74. package/lib/field/scalar-list/scalar-list.component.ts +17 -73
  75. package/lib/field/selectable-card/selectable-card.component.html +70 -0
  76. package/lib/field/selectable-card/selectable-card.component.scss +11 -0
  77. package/lib/field/selectable-card/selectable-card.component.spec.ts +22 -0
  78. package/lib/field/selectable-card/selectable-card.component.ts +219 -0
  79. package/lib/field/semantic-link/semantic-link.component.html +4 -8
  80. package/lib/field/semantic-link/semantic-link.component.scss +0 -13
  81. package/lib/field/semantic-link/semantic-link.component.ts +165 -6
  82. package/lib/field/text/text.component.scss +0 -1
  83. package/lib/field/text/text.component.ts +0 -1
  84. package/lib/field/text-area/text-area.component.ts +18 -153
  85. package/lib/field/text-content/text-content.component.ts +0 -1
  86. package/lib/field/text-input/text-input.component.ts +16 -156
  87. package/lib/field/time/time.component.ts +17 -152
  88. package/lib/field/url/url.component.ts +16 -155
  89. package/lib/field/user-reference/user-reference.component.scss +0 -1
  90. package/lib/field/user-reference/user-reference.component.ts +2 -4
  91. package/lib/infra/Containers/flow-container/flow-container.component.html +2 -2
  92. package/lib/infra/Containers/flow-container/flow-container.component.ts +8 -9
  93. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +0 -1
  94. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +5 -11
  95. package/lib/infra/Containers/view-container/helper.ts +35 -2
  96. package/lib/infra/Containers/view-container/view-container.component.ts +1 -2
  97. package/lib/infra/action-buttons/action-buttons.component.html +13 -8
  98. package/lib/infra/action-buttons/action-buttons.component.scss +23 -0
  99. package/lib/infra/action-buttons/action-buttons.component.ts +1 -3
  100. package/lib/infra/assignment/assignment.component.ts +21 -10
  101. package/lib/infra/assignment-card/assignment-card.component.html +1 -2
  102. package/lib/infra/assignment-card/assignment-card.component.scss +0 -4
  103. package/lib/infra/assignment-card/assignment-card.component.ts +21 -5
  104. package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
  105. package/lib/infra/defer-load/defer-load.component.html +6 -2
  106. package/lib/infra/defer-load/defer-load.component.ts +22 -12
  107. package/lib/infra/error-boundary/error-boundary.component.ts +0 -1
  108. package/lib/infra/multi-step/multi-step.component.html +22 -38
  109. package/lib/infra/multi-step/multi-step.component.scss +14 -27
  110. package/lib/infra/multi-step/multi-step.component.ts +0 -1
  111. package/lib/infra/navbar/navbar.component.html +36 -41
  112. package/lib/infra/navbar/navbar.component.scss +22 -4
  113. package/lib/infra/navbar/navbar.component.ts +8 -4
  114. package/lib/infra/reference/reference.component.ts +5 -0
  115. package/lib/infra/region/region.component.ts +0 -1
  116. package/lib/infra/root-container/root-container.component.scss +0 -1
  117. package/lib/infra/root-container/root-container.component.ts +1 -5
  118. package/lib/infra/stages/stages.component.html +4 -3
  119. package/lib/infra/stages/stages.component.scss +12 -36
  120. package/lib/infra/stages/stages.component.ts +4 -3
  121. package/lib/infra/view/view.component.html +1 -1
  122. package/lib/infra/view/view.component.ts +3 -7
  123. package/lib/template/advanced-search/advanced-search.component.html +12 -0
  124. package/lib/template/advanced-search/advanced-search.component.scss +0 -0
  125. package/lib/template/advanced-search/advanced-search.component.spec.ts +0 -0
  126. package/lib/template/advanced-search/advanced-search.component.ts +112 -0
  127. package/lib/template/advanced-search/advanced-search.service.ts +27 -0
  128. package/lib/template/advanced-search/search-group/persist-utils.ts +56 -0
  129. package/lib/template/advanced-search/search-groups/search-groups.component.html +32 -0
  130. package/lib/template/advanced-search/search-groups/search-groups.component.scss +0 -0
  131. package/lib/template/advanced-search/search-groups/search-groups.component.spec.ts +0 -0
  132. package/lib/template/advanced-search/search-groups/search-groups.component.ts +294 -0
  133. package/lib/template/advanced-search/search-groups/utils.ts +29 -0
  134. package/lib/template/app-shell/app-shell.component.html +4 -1
  135. package/lib/template/app-shell/app-shell.component.scss +0 -3
  136. package/lib/template/app-shell/app-shell.component.ts +46 -8
  137. package/lib/template/banner-page/banner-page.component.ts +0 -1
  138. package/lib/template/case-summary/case-summary.component.scss +0 -2
  139. package/lib/template/case-summary/case-summary.component.ts +6 -22
  140. package/lib/template/case-view/case-view.component.html +4 -4
  141. package/lib/template/case-view/case-view.component.scss +18 -10
  142. package/lib/template/case-view/case-view.component.ts +1 -11
  143. package/lib/template/confirmation/confirmation.component.html +1 -1
  144. package/lib/template/confirmation/confirmation.component.ts +0 -1
  145. package/lib/template/data-reference/data-reference.component.html +11 -8
  146. package/lib/template/data-reference/data-reference.component.ts +346 -113
  147. package/lib/template/data-reference/search-form/search-form.component.html +39 -0
  148. package/lib/template/data-reference/search-form/search-form.component.scss +11 -0
  149. package/lib/template/data-reference/search-form/search-form.component.spec.ts +0 -0
  150. package/lib/template/data-reference/search-form/search-form.component.ts +167 -0
  151. package/lib/template/data-reference/search-form/tabsData.ts +160 -0
  152. package/lib/template/data-reference/utils.ts +92 -0
  153. package/lib/template/default-form/default-form.component.ts +10 -3
  154. package/lib/template/default-page/default-page.component.html +34 -0
  155. package/lib/template/default-page/default-page.component.scss +31 -0
  156. package/lib/template/default-page/default-page.component.spec.ts +24 -0
  157. package/lib/template/default-page/default-page.component.ts +64 -0
  158. package/lib/template/details/details.component.ts +0 -1
  159. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +0 -1
  160. package/lib/template/details-one-column/details-one-column.component.ts +0 -1
  161. package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +0 -1
  162. package/lib/template/details-three-column/details-three-column.component.ts +0 -1
  163. package/lib/template/details-two-column/details-two-column.component.ts +0 -1
  164. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +0 -1
  165. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +0 -1
  166. package/lib/template/field-group-list/field-group-list.component.scss +0 -1
  167. package/lib/template/field-group-list/field-group-list.component.ts +0 -1
  168. package/lib/template/field-group-template/field-group-template.component.ts +14 -28
  169. package/lib/template/field-value-list/field-value-list.component.ts +0 -1
  170. package/lib/template/inline-dashboard/inline-dashboard.component.ts +0 -1
  171. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +1 -2
  172. package/lib/template/list-page/list-page.component.ts +0 -1
  173. package/lib/template/list-view/list-view.component.html +170 -162
  174. package/lib/template/list-view/list-view.component.scss +25 -21
  175. package/lib/template/list-view/list-view.component.ts +207 -119
  176. package/lib/template/list-view/listViewHelpers.ts +1 -4
  177. package/lib/template/list-view/utils.ts +25 -2
  178. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +0 -1
  179. package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +0 -1
  180. package/lib/template/object-page/object-page.component.html +1 -0
  181. package/lib/template/object-page/object-page.component.scss +0 -0
  182. package/lib/template/object-page/object-page.component.spec.ts +22 -0
  183. package/lib/template/object-page/object-page.component.ts +14 -0
  184. package/lib/template/one-column/one-column.component.ts +0 -1
  185. package/lib/template/one-column-page/one-column-page.component.ts +0 -1
  186. package/lib/template/one-column-tab/one-column-tab.component.scss +1 -1
  187. package/lib/template/one-column-tab/one-column-tab.component.ts +0 -1
  188. package/lib/template/page/page.component.ts +0 -1
  189. package/lib/template/promoted-filters/promoted-filters.component.ts +0 -1
  190. package/lib/template/repeating-structures/repeating-structures.component.ts +0 -2
  191. package/lib/template/self-service-case-view/self-service-case-view.component.html +78 -0
  192. package/lib/template/self-service-case-view/self-service-case-view.component.scss +132 -0
  193. package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +24 -0
  194. package/lib/template/self-service-case-view/self-service-case-view.component.ts +207 -0
  195. package/lib/template/simple-table/simple-table.component.ts +0 -2
  196. package/lib/template/simple-table-manual/helpers.ts +117 -3
  197. package/lib/template/simple-table-manual/simple-table-manual.component.html +4 -4
  198. package/lib/template/simple-table-manual/simple-table-manual.component.scss +4 -14
  199. package/lib/template/simple-table-manual/simple-table-manual.component.ts +45 -25
  200. package/lib/template/simple-table-select/simple-table-select.component.ts +0 -1
  201. package/lib/template/single-reference-readonly/single-reference-readonly.component.html +4 -1
  202. package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +21 -0
  203. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +104 -4
  204. package/lib/template/sub-tabs/sub-tabs.component.ts +0 -1
  205. package/lib/template/three-column/three-column.component.ts +0 -1
  206. package/lib/template/three-column-page/three-column-page.component.ts +0 -1
  207. package/lib/template/two-column/two-column.component.ts +0 -1
  208. package/lib/template/two-column-page/two-column-page.component.ts +0 -1
  209. package/lib/template/two-column-tab/two-column-tab.component.ts +0 -1
  210. package/lib/template/utils.ts +42 -0
  211. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +0 -1
  212. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +0 -1
  213. package/lib/template/wss-nav-bar/wss-nav-bar.component.html +6 -5
  214. package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +8 -17
  215. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +1 -9
  216. package/lib/widget/app-announcement/app-announcement.component.html +1 -2
  217. package/lib/widget/app-announcement/app-announcement.component.scss +2 -2
  218. package/lib/widget/app-announcement/app-announcement.component.ts +0 -1
  219. package/lib/widget/attachment/Attachment.types.ts +92 -0
  220. package/lib/widget/attachment/AttachmentUtils.ts +287 -0
  221. package/lib/widget/attachment/attachment.component.html +3 -3
  222. package/lib/widget/attachment/attachment.component.scss +9 -12
  223. package/lib/widget/attachment/attachment.component.ts +267 -254
  224. package/lib/widget/case-history/case-history.component.ts +0 -1
  225. package/lib/widget/feed-container/feed-container.component.scss +3 -9
  226. package/lib/widget/feed-container/feed-container.component.ts +2 -3
  227. package/lib/widget/file-utility/file-utility.component.html +3 -3
  228. package/lib/widget/file-utility/file-utility.component.scss +6 -17
  229. package/lib/widget/file-utility/file-utility.component.ts +24 -9
  230. package/lib/widget/list-utility/list-utility.component.scss +4 -5
  231. package/lib/widget/list-utility/list-utility.component.ts +0 -1
  232. package/lib/widget/quick-create/quick-create.component.ts +41 -23
  233. package/lib/widget/todo/todo.component.html +8 -5
  234. package/lib/widget/todo/todo.component.scss +11 -10
  235. package/lib/widget/todo/todo.component.ts +7 -4
  236. package/lib/widget/utility/utility.component.ts +0 -1
  237. package/package.json +1 -1
@@ -18,7 +18,6 @@ interface RepeatingStructuresProps {
18
18
  selector: 'app-repeating-structures',
19
19
  templateUrl: './repeating-structures.component.html',
20
20
  styleUrls: ['./repeating-structures.component.scss'],
21
- standalone: true,
22
21
  imports: [CommonModule, MatFormFieldModule, MatIconModule, MatInputModule, MatTableModule, MatSortModule, MatPaginatorModule]
23
22
  })
24
23
  export class RepeatingStructuresComponent implements OnInit, AfterViewInit {
@@ -69,7 +68,6 @@ export class RepeatingStructuresComponent implements OnInit, AfterViewInit {
69
68
  }
70
69
 
71
70
  rowClick(row) {
72
- // eslint-disable-next-line sonarjs/no-small-switch
73
71
  switch (this.configProps$.rowClickAction) {
74
72
  case 'openAssignment':
75
73
  this.psService.sendMessage(true);
@@ -0,0 +1,78 @@
1
+ <div class="psdk-self-service-case-view">
2
+ <div class="psdk-self-service-case-view-header">
3
+ <div class="heading">{{ this.heading$ }}</div>
4
+ <div *ngIf="showCaseActions" class="psdk-case-view-buttons">
5
+ <button mat-raised-button color="secondary" [matMenuTriggerFor]="actionMenu">{{ localizedVal('Actions...', localeCategory) }}</button>
6
+ <mat-menu #actionMenu="matMenu" overlapTrigger="false">
7
+ <ng-container *ngFor="let action of arAvailableActions$">
8
+ <button mat-menu-item (click)="_menuActionClick(action)">
9
+ {{ localizedVal(action.name, '', localeKey) }}
10
+ </button>
11
+ </ng-container>
12
+ <ng-container *ngFor="let process of arAvailabeProcesses$">
13
+ <button mat-menu-item (click)="_menuProcessClick(process)">
14
+ {{ process.name }}
15
+ </button>
16
+ </ng-container>
17
+ </mat-menu>
18
+ </div>
19
+ </div>
20
+ <div class="psdk-case-view" id="case-view">
21
+ <div class="psdk-case-view-info" *ngIf="showSummaryRegion && (primarySummaryFields.length > 0 || secondarySummaryFields.length > 0)">
22
+ <mat-toolbar class="psdk-case-view-toolbar">
23
+ <mat-toolbar-row class="psdk-case-view-toolbar-row">
24
+ <div class="psdk-case-view-heading">
25
+ <div>
26
+ <h1 id="case-name">{{ heading$ }}</h1>
27
+ </div>
28
+ <div id="current-caseID" [hidden]="true">{{ currentCaseID }}</div>
29
+ <div class="psdk-case-view-heading-id" id="caseId">{{ id$ }}</div>
30
+ </div>
31
+ </mat-toolbar-row>
32
+ </mat-toolbar>
33
+ <div class="psdk-case-view-divider"></div>
34
+ <div class="psdk-case-view-summary">
35
+ <component-mapper
36
+ name="CaseSummaryFields"
37
+ [props]="{ primaryFields$: primarySummaryFields, secondaryFields$: secondarySummaryFields }"
38
+ ></component-mapper>
39
+ </div>
40
+ </div>
41
+ <div class="psdk-case-view-main">
42
+ <div>
43
+ <div *ngFor="let kid of arChildren$">
44
+ <div
45
+ *ngIf="
46
+ kid.getPConnect().getRawMetadata().type.toLowerCase() == 'region' &&
47
+ kid.getPConnect().getRawMetadata().name.toLowerCase() == 'stages' &&
48
+ showCaseLifecycle
49
+ "
50
+ >
51
+ <component-mapper name="Region" [props]="{ pConn$: kid.getPConnect() }"></component-mapper>
52
+ </div>
53
+ </div>
54
+ </div>
55
+
56
+ <div *ngFor="let kid of arChildren$">
57
+ <div
58
+ *ngIf="kid.getPConnect().getRawMetadata().type.toLowerCase() == 'region' && kid.getPConnect().getRawMetadata().name.toLowerCase() == 'todo'"
59
+ >
60
+ <component-mapper name="Region" [props]="{ pConn$: kid.getPConnect(), formGroup$ }"></component-mapper>
61
+ </div>
62
+ </div>
63
+
64
+ <div *ngFor="let kid of arChildren$">
65
+ <div *ngIf="kid.getPConnect().getRawMetadata().type.toLowerCase() == 'region' && kid.getPConnect().getRawMetadata().name == 'Main'">
66
+ <component-mapper name="Region" [props]="{ pConn$: kid.getPConnect(), formGroup$ }"></component-mapper>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <div class="psdk-case-view-utilities" *ngIf="arChildren$ && showUtilitiesRegion && isUtilitiesRegionNotEmpty()">
71
+ <div *ngFor="let kid of arChildren$">
72
+ <div *ngIf="kid.getPConnect().getRawMetadata()?.type.toLowerCase() == 'region' && kid.getPConnect().getRawMetadata()?.name == 'Utilities'">
73
+ <component-mapper name="Region" [props]="{ pConn$: kid.getPConnect() }"></component-mapper>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
@@ -0,0 +1,132 @@
1
+ h1 {
2
+ font-size: 1.1rem;
3
+ line-height: 1.3rem;
4
+ }
5
+
6
+ ::ng-deep .mat-mdc-menu-panel {
7
+ overflow: unset;
8
+ max-width: unset;
9
+ }
10
+
11
+ .psdk-case-view-label {
12
+ font-size: 1rem;
13
+ display: block;
14
+ transform: translateY(0.2em) scale(0.75) perspective(100px) translateZ(0.001px);
15
+ -ms-transform: translateY(0.2em) scale(0.75);
16
+ width: 133.33333%;
17
+ border-radius: 0.6125rem;
18
+ }
19
+
20
+ .psdk-case-view {
21
+ box-sizing: border-box;
22
+ display: flex;
23
+ }
24
+
25
+ .ng-case-view-toolbar {
26
+ padding: 0.625rem 0.625rem;
27
+ }
28
+
29
+ .psdk-case-icon-div {
30
+ background-color: var(--mat-sys-on-primary-fixed);
31
+ border-radius: 1rem;
32
+ padding: 0.5rem 0.3rem 0.3rem 0.3rem;
33
+ }
34
+ .psdk-case-svg-icon {
35
+ width: 2rem;
36
+ padding: 0rem 0.3125rem;
37
+ filter: var(--app-white-color-filter);
38
+ }
39
+
40
+ .psdk-case-view-info-box {
41
+ display: flex;
42
+ flex-direction: row;
43
+ padding: 0rem 0.3125rem 0rem 0rem;
44
+ }
45
+
46
+ .psdk-case-view-info {
47
+ flex: 0 0 auto;
48
+ width: 25rem;
49
+ float: left;
50
+ // padding: 0rem 0.3125rem 0rem 0rem;
51
+ background-color: var(--mat-sys-surface-container);
52
+ height: 100%;
53
+ }
54
+
55
+ .psdk-case-view-main {
56
+ flex-grow: 2;
57
+ float: left;
58
+ padding: 0rem 0.3125rem;
59
+ height: 100%;
60
+ padding-left: 0;
61
+ }
62
+
63
+ .psdk-case-view-summary {
64
+ padding-left: 0.75rem;
65
+ }
66
+
67
+ .psdk-case-view-heading {
68
+ display: block;
69
+ text-align: left;
70
+ padding-left: 0.5rem;
71
+ padding-bottom: 0;
72
+ padding-top: 5px;
73
+ }
74
+ .psdk-case-view-heading-id {
75
+ font-size: 0.9rem;
76
+ font-weight: normal;
77
+ }
78
+
79
+ .psdk-case-view-buttons {
80
+ display: flex;
81
+ justify-content: flex-start;
82
+ padding: 0.3125rem;
83
+ }
84
+
85
+ .psdk-case-view-utilities {
86
+ background-color: var(--mat-sys-surface-container);
87
+ width: 21.875rem;
88
+ float: left;
89
+ padding: 0rem 0.3125rem;
90
+ }
91
+
92
+ .psdk-case-view-divider {
93
+ border-bottom: 0.0625rem solid var(--mat-sys-outline-variant);
94
+ }
95
+
96
+ .psdk-status {
97
+ padding: 0.3125rem 0.3125rem;
98
+ background-color: var(--mat-sys-primary);
99
+ color: var(--mat-sys-surface-container);
100
+ width: fit-content;
101
+ margin: 0.625rem;
102
+ }
103
+
104
+ .psdk-case-view-toolbar {
105
+ background-color: var(--mat-sys-primary);
106
+ justify-content: center;
107
+ }
108
+
109
+ button {
110
+ margin: 0rem 0.3125rem;
111
+ }
112
+
113
+ .psdk-case-view-toolbar-row {
114
+ padding-left: 1rem;
115
+ white-space: normal;
116
+ height: auto;
117
+ }
118
+
119
+ .psdk-self-service-case-view-header {
120
+ height: 50px;
121
+ display: flex;
122
+ justify-content: space-between;
123
+ align-items: center;
124
+ background-color: var(--mat-sys-primary);
125
+ padding: 0px 8px;
126
+ }
127
+
128
+ .heading {
129
+ font-size: 20px;
130
+ color: var(--mat-sys-on-primary);
131
+ font-weight: 600;
132
+ }
@@ -0,0 +1,24 @@
1
+ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
+
3
+ import { SelfServiceCaseViewComponent } from './self-service-case-view.component';
4
+
5
+ describe('SelfServiceCaseViewComponent', () => {
6
+ let component: SelfServiceCaseViewComponent;
7
+ let fixture: ComponentFixture<SelfServiceCaseViewComponent>;
8
+
9
+ beforeEach(waitForAsync(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [SelfServiceCaseViewComponent]
12
+ }).compileComponents();
13
+ }));
14
+
15
+ beforeEach(() => {
16
+ fixture = TestBed.createComponent(SelfServiceCaseViewComponent);
17
+ component = fixture.componentInstance;
18
+ fixture.detectChanges();
19
+ });
20
+
21
+ it('should create', () => {
22
+ expect(component).toBeTruthy();
23
+ });
24
+ });
@@ -0,0 +1,207 @@
1
+ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormGroup } from '@angular/forms';
4
+ import { MatToolbarModule } from '@angular/material/toolbar';
5
+ import { MatButtonModule } from '@angular/material/button';
6
+ import { MatMenuModule } from '@angular/material/menu';
7
+ import { interval } from 'rxjs';
8
+ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
9
+ import { Utils } from '@pega/angular-sdk-components';
10
+ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
11
+ import { prepareCaseSummaryData } from '@pega/angular-sdk-components';
12
+
13
+ interface SelfServiceCaseViewProps {
14
+ // If any, enter additional props that only exist on this component
15
+ icon: string;
16
+ subheader: string;
17
+ header: string;
18
+ showCaseLifecycle: any;
19
+ showSummaryRegion: any;
20
+ showUtilitiesRegion: any;
21
+ showCaseActions: any;
22
+ caseClass: any;
23
+ }
24
+
25
+ @Component({
26
+ selector: 'app-self-service-case-view',
27
+ templateUrl: './self-service-case-view.component.html',
28
+ styleUrls: ['./self-service-case-view.component.scss'],
29
+ providers: [Utils],
30
+ imports: [CommonModule, MatToolbarModule, MatButtonModule, MatMenuModule, forwardRef(() => ComponentMapperComponent)]
31
+ })
32
+ export class SelfServiceCaseViewComponent implements OnInit, OnDestroy {
33
+ @Input() pConn$: typeof PConnect;
34
+ @Input() formGroup$: FormGroup;
35
+
36
+ // Used with AngularPConnect
37
+ angularPConnectData: AngularPConnectData = {};
38
+ configProps$: SelfServiceCaseViewProps;
39
+
40
+ arChildren$: any[];
41
+
42
+ heading$ = '';
43
+ id$ = '';
44
+ status$ = '';
45
+
46
+ arAvailableActions$: any[] = [];
47
+ arAvailabeProcesses$: any[] = [];
48
+
49
+ caseSummaryPConn$: any;
50
+ currentCaseID = '';
51
+ editAction: boolean;
52
+ localizedVal: any;
53
+ localeCategory = 'CaseView';
54
+ localeKey: any;
55
+ showCaseLifecycle: boolean;
56
+ showSummaryRegion: boolean;
57
+ showUtilitiesRegion: boolean;
58
+ showCaseActions: boolean;
59
+ utilityRegion: any;
60
+ primarySummaryFields: any;
61
+ secondarySummaryFields: any;
62
+
63
+ constructor(
64
+ private angularPConnect: AngularPConnectService,
65
+ private utils: Utils
66
+ ) {}
67
+
68
+ ngOnInit(): void {
69
+ // First thing in initialization is registering and subscribing to the AngularPConnect service
70
+ this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
71
+ this.checkAndUpdate();
72
+ this.localizedVal = PCore.getLocaleUtils().getLocaleValue;
73
+ }
74
+
75
+ ngOnDestroy(): void {
76
+ if (this.angularPConnectData.unsubscribeFn) {
77
+ this.angularPConnectData.unsubscribeFn();
78
+ }
79
+ }
80
+
81
+ // Callback passed when subscribing to store change
82
+ onStateChange() {
83
+ this.checkAndUpdate();
84
+ }
85
+
86
+ checkAndUpdate() {
87
+ // Should always check the bridge to see if the component should update itself (re-render)
88
+ const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
89
+
90
+ // ONLY call updateSelf when the component should update
91
+ // AND removing the "gate" that was put there since shouldComponentUpdate
92
+ // should be the real "gate"
93
+ if (bUpdateSelf) {
94
+ // generally, don't want to refresh everything when data changes in caseView, it is usually the
95
+ // case summary. But check if the case ID changes, this means a different case and we should
96
+ // update all.
97
+ if (this.hasCaseIDChanged()) {
98
+ this.fullUpdate();
99
+
100
+ // update okToInitFlowContainer, because case view was drawn, flow container will need to be init
101
+ // to match Nebula/Constellation
102
+ sessionStorage.setItem('okToInitFlowContainer', 'true');
103
+ } else {
104
+ this.updateHeaderAndSummary();
105
+ }
106
+ }
107
+ }
108
+
109
+ hasCaseIDChanged(): boolean {
110
+ if (this.currentCaseID !== this.pConn$.getDataObject().caseInfo.ID) {
111
+ this.currentCaseID = this.pConn$.getDataObject().caseInfo.ID;
112
+ return true;
113
+ }
114
+ return false;
115
+ }
116
+
117
+ updateHeaderAndSummary() {
118
+ this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as SelfServiceCaseViewProps;
119
+
120
+ const kids = this.pConn$.getChildren() as any[];
121
+ for (const kid of kids) {
122
+ const meta = kid.getPConnect().getRawMetadata();
123
+ if (meta.type.toLowerCase() == 'region' && meta.name.toLowerCase() == 'summary') {
124
+ this.caseSummaryPConn$ = kid.getPConnect().getChildren()[0].getPConnect();
125
+ }
126
+ }
127
+
128
+ // have to put in a timeout, otherwise get an angular change event error
129
+ const timer = interval(100).subscribe(() => {
130
+ timer.unsubscribe();
131
+
132
+ this.heading$ = PCore.getLocaleUtils().getLocaleValue(this.configProps$.header, '', this.localeKey);
133
+ this.id$ = this.configProps$.subheader;
134
+ this.status$ = this.pConn$.getValue('.pyStatusWork');
135
+ });
136
+ }
137
+
138
+ fullUpdate() {
139
+ this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as SelfServiceCaseViewProps;
140
+ this.localeKey = this.pConn$?.getCaseLocaleReference();
141
+ this.updateHeaderAndSummary();
142
+
143
+ this.arChildren$ = this.pConn$.getChildren() as any[];
144
+
145
+ const caseInfo = this.pConn$.getDataObject().caseInfo;
146
+ this.currentCaseID = caseInfo.ID;
147
+ this.arAvailableActions$ = caseInfo?.availableActions ? caseInfo.availableActions : [];
148
+ this.editAction = this.arAvailableActions$.find(action => action.ID === 'pyUpdateCaseDetails');
149
+ this.arAvailabeProcesses$ = caseInfo?.availableProcesses ? caseInfo.availableProcesses : [];
150
+
151
+ const { showCaseLifecycle = true, showSummaryRegion = true, showUtilitiesRegion = true, showCaseActions = true, caseClass } = this.configProps$;
152
+ this.showCaseLifecycle = this.utils.getBooleanValue(showCaseLifecycle);
153
+ this.showSummaryRegion = this.utils.getBooleanValue(showSummaryRegion);
154
+ this.showUtilitiesRegion = this.utils.getBooleanValue(showUtilitiesRegion);
155
+ this.showCaseActions = this.utils.getBooleanValue(showCaseActions);
156
+ const isObjectType: boolean = (PCore.getCaseUtils() as any).isObjectCaseType(caseClass);
157
+ this.utilityRegion = isObjectType ? this.filterUtilities(this.arChildren$[2]) : this.filterUtilities(this.arChildren$[4]);
158
+ if (this.showSummaryRegion) {
159
+ const { primarySummaryFields, secondarySummaryFields } = prepareCaseSummaryData(
160
+ this.arChildren$[0],
161
+ (config: any) => config?.availableInChannel?.selfService === true
162
+ );
163
+ this.primarySummaryFields = primarySummaryFields;
164
+ this.secondarySummaryFields = secondarySummaryFields;
165
+ }
166
+ }
167
+
168
+ filterUtilities(utils) {
169
+ let utilsMeta;
170
+ const pConnect = utils.getPConnect();
171
+ utilsMeta = pConnect.getRawMetadata?.();
172
+ if (!utilsMeta?.children?.length) return;
173
+ utilsMeta = {
174
+ ...utilsMeta,
175
+ children: utilsMeta.children.filter((child: any) => child.config?.availableInChannel?.selfService === true)
176
+ };
177
+ return utilsMeta.children?.length ? pConnect.createComponent(utilsMeta) : undefined;
178
+ }
179
+
180
+ isUtilitiesRegionNotEmpty() {
181
+ if (this.utilityRegion && this.utilityRegion.getPConnect()?.getChildren()?.length > 0) {
182
+ return this.utilityRegion
183
+ .getPConnect()
184
+ .getChildren()
185
+ .some((prop: { getPConnect: () => any }) => prop.getPConnect().getConfigProps().visibility !== false);
186
+ }
187
+ return false;
188
+ }
189
+
190
+ updateSelf() {
191
+ this.fullUpdate();
192
+ }
193
+
194
+ _menuActionClick(data) {
195
+ const actionsAPI = this.pConn$.getActionsApi();
196
+ const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
197
+
198
+ openLocalAction(data.ID, { ...data, containerName: 'modal', type: 'express' });
199
+ }
200
+
201
+ _menuProcessClick(data) {
202
+ const actionsAPI = this.pConn$.getActionsApi();
203
+ const openProcessAction = actionsAPI.openProcessAction.bind(actionsAPI);
204
+
205
+ openProcessAction(data.ID, { ...data });
206
+ }
207
+ }
@@ -28,7 +28,6 @@ interface SimpleTableProps {
28
28
  selector: 'app-simple-table',
29
29
  templateUrl: './simple-table.component.html',
30
30
  styleUrls: ['./simple-table.component.scss'],
31
- standalone: true,
32
31
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
33
32
  })
34
33
  export class SimpleTableComponent implements OnInit, OnDestroy {
@@ -80,7 +79,6 @@ export class SimpleTableComponent implements OnInit, OnDestroy {
80
79
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as SimpleTableProps;
81
80
 
82
81
  if (this.configProps$.visibility != null) {
83
- // eslint-disable-next-line no-multi-assign
84
82
  this.bVisible$ = this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
85
83
  }
86
84
 
@@ -126,11 +126,125 @@ export const buildMetaForListView = (fieldMetadata, fields, type, ruleClass, nam
126
126
  };
127
127
  };
128
128
 
129
- export const buildFieldsForTable = (configFields, fields, showDeleteButton) => {
129
+ const PRIMARY_FIELDS = 'pyPrimaryFields';
130
+ const SUPPORTED_FIELD_TYPES = [
131
+ 'Address',
132
+ 'TextArea',
133
+ 'TextInput',
134
+ 'Phone',
135
+ 'Email',
136
+ 'Time',
137
+ 'URL',
138
+ 'Percentage',
139
+ 'Integer',
140
+ 'Decimal',
141
+ 'Date',
142
+ 'DateTime',
143
+ 'Currency',
144
+ 'Checkbox',
145
+ 'Dropdown',
146
+ 'AutoComplete',
147
+ 'UserReference',
148
+ 'RichText'
149
+ ];
150
+
151
+ export const getConfigFields = (rawFields, contextClass, primaryFieldsViewIndex) => {
152
+ let primaryFields: any = [];
153
+ let configFields: any = [];
154
+
155
+ if (primaryFieldsViewIndex > -1) {
156
+ let primaryFieldVMD: any = PCore.getMetadataUtils().resolveView(PRIMARY_FIELDS);
157
+ if (Array.isArray(primaryFieldVMD)) {
158
+ primaryFieldVMD = primaryFieldVMD.find(primaryFieldView => primaryFieldView.classID === contextClass);
159
+ primaryFields = primaryFieldVMD?.children?.[0]?.children || [];
160
+ } else if (primaryFieldVMD?.classID === contextClass) {
161
+ primaryFields = primaryFieldVMD?.children?.[0]?.children || [];
162
+ }
163
+
164
+ if (primaryFields.length) {
165
+ primaryFields = primaryFields.filter(primaryField => SUPPORTED_FIELD_TYPES.includes(primaryField.type));
166
+ }
167
+ }
168
+
169
+ configFields = [...rawFields.slice(0, primaryFieldsViewIndex), ...primaryFields, ...rawFields.slice(primaryFieldsViewIndex + 1)];
170
+ // filter duplicate fields after combining raw fields and primary fields
171
+ return configFields.filter((field, index) => configFields.findIndex(_field => field.config?.value === _field.config?.value) === index);
172
+ };
173
+
174
+ export function isFLProperty(label) {
175
+ return label?.startsWith('@FL');
176
+ }
177
+
178
+ /**
179
+ * [getFieldLabel]
180
+ * Description - A utility that returns resolved field label for "@FL" annotation i.e from data model.
181
+ * @param {Object} fieldConfig
182
+ * @returns {string} resolved label string
183
+ *
184
+ * example:
185
+ * fieldConfig = {label: "@FL .pyID", classID: "TestCase-Work"};
186
+ * return "Case ID"
187
+ */
188
+ export function getFieldLabel(fieldConfig) {
189
+ const { label, classID, caption } = fieldConfig;
190
+ let fieldLabel = (label ?? caption)?.substring(4);
191
+ const labelSplit = fieldLabel?.split('.');
192
+ const propertyName = labelSplit?.pop();
193
+ const fieldMetaData: any = PCore.getMetadataUtils().getPropertyMetadata(propertyName, classID) ?? {};
194
+ fieldLabel = fieldMetaData.label ?? fieldMetaData.caption ?? propertyName;
195
+ return fieldLabel;
196
+ }
197
+
198
+ export const updateFieldLabels = (fields, configFields, primaryFieldsViewIndex, pConnect, options) => {
199
+ const labelsOfFields: any = [];
200
+ const { columnsRawConfig = [] } = options;
201
+ fields.forEach((field, idx) => {
202
+ const rawColumnConfig = columnsRawConfig[idx]?.config;
203
+ if (field.config.value === PRIMARY_FIELDS) {
204
+ labelsOfFields.push('');
205
+ } else if (isFLProperty(rawColumnConfig?.label ?? rawColumnConfig?.caption)) {
206
+ labelsOfFields.push(getFieldLabel(rawColumnConfig) || field.config.label || field.config.caption);
207
+ } else {
208
+ labelsOfFields.push(field.config.label || field.config.caption);
209
+ }
210
+ });
211
+
212
+ if (primaryFieldsViewIndex > -1) {
213
+ const totalPrimaryFieldsColumns = configFields.length - fields.length + 1;
214
+ if (totalPrimaryFieldsColumns) {
215
+ const primaryFieldLabels: any = [];
216
+ for (let i = primaryFieldsViewIndex; i < primaryFieldsViewIndex + totalPrimaryFieldsColumns; i += 1) {
217
+ let label = configFields[i].config?.label;
218
+ if (isFLProperty(label)) {
219
+ label = getFieldLabel(configFields[i].config);
220
+ } else if (label.startsWith('@')) {
221
+ label = label.substring(3);
222
+ }
223
+ if (pConnect) {
224
+ label = pConnect.getLocalizedValue(label);
225
+ }
226
+ primaryFieldLabels.push(label);
227
+ }
228
+ labelsOfFields.splice(primaryFieldsViewIndex, 1, ...primaryFieldLabels);
229
+ } else {
230
+ labelsOfFields.splice(primaryFieldsViewIndex, 1);
231
+ }
232
+ }
233
+ return labelsOfFields;
234
+ };
235
+
236
+ export const buildFieldsForTable = (configFields, pConnect, showDeleteButton, options) => {
237
+ const { primaryFieldsViewIndex, fields } = options;
238
+
239
+ // get resolved field labels for primary fields raw config included in configFields
240
+ const fieldsLabels = updateFieldLabels(fields, configFields, primaryFieldsViewIndex, pConnect, {
241
+ columnsRawConfig: pConnect.getRawConfigProps()?.children?.find(item => item?.name === 'Columns')?.children
242
+ });
243
+
130
244
  const fieldDefs = configFields?.map((field, index) => {
131
245
  return {
132
246
  type: 'text',
133
- label: fields[index].config.label || fields[index].config.caption,
247
+ label: fieldsLabels[index],
134
248
  fillAvailableSpace: !!field.config.fillAvailableSpace,
135
249
  id: `${index}`,
136
250
  name: field.config.value.substr(4),
@@ -290,7 +404,7 @@ export const createPConnect = (contextName, referenceList, pageReference) => {
290
404
 
291
405
  // create PConnect object
292
406
  const config = { meta: {}, options };
293
- const { getPConnect } = PCore.createPConnect(config);
407
+ const { getPConnect } = PCore.createPConnect(config as any);
294
408
 
295
409
  return getPConnect();
296
410
  };
@@ -44,7 +44,7 @@
44
44
  <td mat-cell *matCellDef="let element; index as j">
45
45
  <div class="header-icon">
46
46
  <button mat-icon-button [matMenuTriggerFor]="utilityMenu">
47
- <img class="psdk-utility-card-actions-svg-icon" src="{{ settingsSvgIcon$ }}" />
47
+ <mat-icon>more_vert</mat-icon>
48
48
  </button>
49
49
  <mat-menu #utilityMenu="matMenu" overlapTrigger="false">
50
50
  <button mat-menu-item (click)="editRecord(element, j)">Edit</button>
@@ -58,7 +58,7 @@
58
58
  <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
59
59
  <tr class="mat-row psdk-no-records" *matNoDataRow>
60
60
  <td id="no-records" class="mat-cell" [attr.colspan]="displayedColumns.length">
61
- {{ utils.getGenericFieldsLocalizedValue('CosmosFields.fields.lists', 'No records found.') }}
61
+ {{ utils.getGenericFieldsLocalizedValue('COSMOSFIELDS.lists', 'No records found.') }}
62
62
  </td>
63
63
  </tr>
64
64
  </table>
@@ -82,7 +82,7 @@
82
82
  <th mat-header-cell *matHeaderCellDef></th>
83
83
  <td mat-cell *matCellDef="let element; index as j">
84
84
  <button id="delete-button" mat-icon-button (click)="deleteRecord(j)">
85
- <img class="psdk-utility-card-action-svg-icon" src="{{ menuIconOverride$ }}" />
85
+ <mat-icon>delete</mat-icon>
86
86
  </button>
87
87
  </td>
88
88
  </ng-container>
@@ -90,7 +90,7 @@
90
90
  <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
91
91
  <tr class="mat-row psdk-no-records" *matNoDataRow>
92
92
  <td id="no-records" class="mat-cell" [attr.colspan]="displayedColumns.length">
93
- {{ utils.getGenericFieldsLocalizedValue('CosmosFields.fields.lists', 'No records found.') }}
93
+ {{ utils.getGenericFieldsLocalizedValue('COSMOSFIELDS.lists', 'No records found.') }}
94
94
  </td>
95
95
  </tr>
96
96
  </table>