@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
@@ -0,0 +1,172 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ :host {
4
+ display: block;
5
+ background-color: var(--mat-sys-surface, #fff);
6
+ color: var(--mat-sys-on-surface, #000);
7
+ }
8
+
9
+ ::ng-deep {
10
+ .tox-tinymce {
11
+ border: 1px solid var(--mat-sys-outline, #ccc) !important;
12
+ border-radius: 4px !important;
13
+ }
14
+
15
+ .tox-edit-area__iframe {
16
+ background-color: transparent !important;
17
+ }
18
+
19
+ .tox .tox-toolbar,
20
+ .tox .tox-toolbar__primary,
21
+ .tox .tox-editor-header {
22
+ background-color: var(--mat-sys-surface-container-high, #f0f0f0) !important;
23
+ border-bottom: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
24
+ }
25
+
26
+ .tox .tox-tbtn {
27
+ color: var(--mat-sys-on-surface-variant, #555) !important;
28
+ background: transparent !important;
29
+ }
30
+
31
+ .tox .tox-tbtn svg {
32
+ fill: var(--mat-sys-on-surface-variant, #555) !important;
33
+ }
34
+
35
+ .tox .tox-tbtn:hover {
36
+ background: var(--mat-sys-hover-state-layer-opacity, rgba(0, 0, 0, 0.05)) !important;
37
+ }
38
+
39
+ .tox .tox-tbtn--enabled,
40
+ .tox .tox-tbtn--enabled:hover {
41
+ background: var(--mat-sys-secondary-container, #e8def8) !important;
42
+ color: var(--mat-sys-on-secondary-container, #1d192b) !important;
43
+ }
44
+
45
+ .tox .tox-tbtn--enabled svg {
46
+ fill: var(--mat-sys-on-secondary-container, #1d192b) !important;
47
+ }
48
+
49
+ .tox .tox-tbtn--select {
50
+ background-color: transparent !important;
51
+ margin: 2px 0;
52
+ }
53
+
54
+ .tox .tox-tbtn__select-label {
55
+ color: var(--mat-sys-on-surface, #000) !important;
56
+ }
57
+
58
+ .tox .tox-tbtn__select-chevron svg {
59
+ fill: var(--mat-sys-on-surface-variant, #555) !important;
60
+ }
61
+
62
+ .tox .tox-tbtn--select:hover {
63
+ background-color: var(--mat-sys-hover-state-layer-opacity, rgba(0, 0, 0, 0.05)) !important;
64
+ }
65
+
66
+ .tox .tox-statusbar {
67
+ background-color: var(--mat-sys-surface-container-high, #f0f0f0) !important;
68
+ border-top: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
69
+ color: var(--mat-sys-on-surface-variant, #555) !important;
70
+ }
71
+
72
+ .tox .tox-dialog {
73
+ background-color: var(--mat-sys-surface-container, #fff) !important;
74
+ color: var(--mat-sys-on-surface, #000) !important;
75
+ border: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
76
+ box-shadow: 0 4px 12px var(--mat-sys-shadow, rgba(0, 0, 0, 0.2)) !important;
77
+ }
78
+
79
+ .tox .tox-dialog__header {
80
+ background-color: var(--mat-sys-surface-container, #fff) !important;
81
+ color: var(--mat-sys-on-surface, #000) !important;
82
+ border-bottom: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
83
+ }
84
+
85
+ .tox .tox-dialog__footer {
86
+ background-color: var(--mat-sys-surface-container, #fff) !important;
87
+ border-top: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
88
+ }
89
+
90
+ .tox .tox-dialog-wrap__backdrop {
91
+ background-color: var(--mat-sys-scrim, rgba(0, 0, 0, 0.5)) !important;
92
+ opacity: 0.6;
93
+ }
94
+
95
+ .tox .tox-dialog__body input,
96
+ .tox .tox-dialog__body textarea,
97
+ .tox .tox-dialog__body select {
98
+ background-color: transparent !important;
99
+ color: var(--mat-sys-on-surface, #000) !important;
100
+ border: 1px solid var(--mat-sys-outline, #ccc) !important;
101
+ border-radius: 4px !important;
102
+ }
103
+
104
+ .tox .tox-label {
105
+ color: var(--mat-sys-on-surface-variant, #555) !important;
106
+ }
107
+
108
+ .tox .tox-button--icon--hover:hover {
109
+ background-color: var(--mat-sys-hover-state-layer-opacity) !important;
110
+ color: var(--mat-sys-on-surface) !important;
111
+ }
112
+
113
+ .tox .tox-dialog__footer .tox-button {
114
+ background-color: var(--mat-sys-primary, #6200ee) !important;
115
+ color: var(--mat-sys-on-primary, #fff) !important;
116
+ border: none !important;
117
+ }
118
+
119
+ .tox .tox-dialog__footer .tox-button--secondary {
120
+ background-color: transparent !important;
121
+ color: var(--mat-sys-primary, #6200ee) !important;
122
+ border: 1px solid var(--mat-sys-outline, #ccc) !important;
123
+ }
124
+ }
125
+
126
+ ::ng-deep {
127
+ .tox .tox-menu {
128
+ background-color: var(--mat-sys-surface-container, #2e334f) !important;
129
+ border: 1px solid var(--mat-sys-outline-variant, #404562) !important;
130
+ box-shadow: 0 4px 10px var(--mat-sys-shadow, rgba(0, 0, 0, 0.3)) !important;
131
+ }
132
+
133
+ .tox .tox-collection__item {
134
+ color: var(--mat-sys-on-surface, #dde1ff) !important;
135
+ }
136
+
137
+ .tox .tox-collection__item--active {
138
+ background-color: var(--mat-sys-secondary-container, #810081) !important;
139
+ color: var(--mat-sys-on-secondary-container, #ffd7f5) !important;
140
+ }
141
+
142
+ .tox .tox-collection__item-icon svg {
143
+ fill: var(--mat-sys-on-surface, #dde1ff) !important;
144
+ }
145
+
146
+ .tox .tox-collection__item-accessory {
147
+ color: var(--mat-sys-on-surface-variant, #c0c5e7) !important;
148
+ }
149
+
150
+ .tox .tox-swatches__picker-btn {
151
+ border-color: var(--mat-sys-outline-variant) !important;
152
+ }
153
+
154
+ .tox .tox-listbox {
155
+ background-color: transparent !important;
156
+ border: 1px solid var(--mat-sys-outline, #8a8faf) !important;
157
+ color: var(--mat-sys-on-surface, #dde1ff) !important;
158
+ }
159
+
160
+ .tox .tox-listbox__select-chevron svg {
161
+ fill: var(--mat-sys-on-surface-variant, #c0c5e7) !important;
162
+ }
163
+
164
+ .tox .tox-listbox__select-label {
165
+ color: var(--mat-sys-on-surface, #dde1ff) !important;
166
+ }
167
+
168
+ .tox .tox-listboxfield .tox-listbox--select {
169
+ background-color: transparent !important;
170
+ color: var(--mat-sys-on-surface, #dde1ff) !important;
171
+ }
172
+ }
@@ -1,8 +1,8 @@
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, ReactiveFormsModule } from '@angular/forms';
4
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
5
- import { Utils } from '@pega/angular-sdk-components';
3
+ import { ReactiveFormsModule } from '@angular/forms';
4
+
5
+ import { FieldBase } from '@pega/angular-sdk-components';
6
6
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
7
  import { handleEvent } from '@pega/angular-sdk-components';
8
8
  import { PConnFieldProps } from '@pega/angular-sdk-components';
@@ -15,110 +15,39 @@ interface RichTextProps extends PConnFieldProps {
15
15
  selector: 'app-rich-text',
16
16
  templateUrl: './rich-text.component.html',
17
17
  styleUrls: ['./rich-text.component.scss'],
18
- standalone: true,
19
18
  imports: [CommonModule, ReactiveFormsModule, forwardRef(() => ComponentMapperComponent)]
20
19
  })
21
- export class RichTextComponent implements OnInit, OnDestroy {
22
- @Input() pConn$: typeof PConnect;
23
- @Input() formGroup$: FormGroup;
24
-
25
- // Used with AngularPConnect
26
- angularPConnectData: AngularPConnectData = {};
20
+ export class RichTextComponent extends FieldBase {
27
21
  configProps$: RichTextProps;
28
22
 
29
- label$ = '';
30
- value$ = '';
31
- bRequired$ = false;
32
- bReadonly$ = false;
33
- bDisabled$ = false;
34
- bVisible$ = true;
35
- displayMode$?: string = '';
36
- controlName$: string;
37
- testId: string;
38
- helperText: string;
39
- placeholder: any;
40
23
  info: any;
41
24
  error: boolean;
42
25
  status: any;
43
- actionsApi: Object;
44
- propName: string;
45
-
46
- constructor(
47
- private angularPConnect: AngularPConnectService,
48
- private utils: Utils
49
- ) {}
50
-
51
- ngOnInit(): void {
52
- // First thing in initialization is registering and subscribing to the AngularPConnect service
53
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
54
-
55
- // call updateSelf when initializing
56
- this.checkAndUpdate();
57
- }
58
-
59
- ngOnDestroy(): void {
60
- if (this.angularPConnectData.unsubscribeFn) {
61
- this.angularPConnectData.unsubscribeFn();
62
- }
63
- }
64
-
65
- // Callback passed when subscribing to store change
66
- onStateChange() {
67
- this.checkAndUpdate();
68
- }
69
-
70
- checkAndUpdate() {
71
- // Should always check the bridge to see if the component should
72
- // update itself (re-render)
73
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
74
-
75
- // ONLY call updateSelf when the component should update
76
- if (bUpdateSelf) {
77
- this.updateSelf();
78
- }
79
- }
80
26
 
81
- // updateSelf
82
- updateSelf(): void {
83
- // moved this from ngOnInit() and call this from there instead...
27
+ /**
28
+ * Updates the component when there are changes in the state.
29
+ */
30
+ override updateSelf(): void {
31
+ // Resolve config properties
84
32
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as RichTextProps;
85
- const stateProps = this.pConn$.getStateProps();
86
- this.status = stateProps?.status;
87
-
88
- if (this.configProps$.value != undefined) {
89
- this.value$ = this.configProps$.value;
90
- }
91
33
 
92
- this.testId = this.configProps$.testId;
93
- this.displayMode$ = this.configProps$.displayMode;
94
- this.label$ = this.configProps$.label;
95
- this.placeholder = this.configProps$.placeholder;
96
- this.info = stateProps?.validatemessage || this.configProps$.helperText;
97
- this.error = stateProps?.status === 'error';
34
+ // Update component common properties
35
+ this.updateComponentCommonProperties(this.configProps$);
98
36
 
99
- this.actionsApi = this.pConn$.getActionsApi();
100
- this.propName = this.pConn$.getStateProps().value;
37
+ // Extract and normalize the value property
38
+ const { value, helperText } = this.configProps$;
39
+ this.value$ = value;
101
40
 
102
- if (this.configProps$.required != null) {
103
- this.bRequired$ = this.utils.getBooleanValue(this.configProps$.required);
104
- }
105
-
106
- if (this.configProps$.visibility != null) {
107
- this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
108
- }
109
-
110
- if (this.configProps$.disabled != undefined) {
111
- this.bDisabled$ = this.utils.getBooleanValue(this.configProps$.disabled);
112
- }
113
-
114
- if (this.configProps$.readOnly != null) {
115
- this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
116
- }
41
+ const { status, validatemessage } = this.pConn$.getStateProps();
42
+ this.status = status;
43
+ this.info = validatemessage || helperText;
44
+ this.error = status === 'error';
117
45
  }
118
46
 
119
47
  fieldOnChange(editorValue: any) {
120
48
  const oldVal = this.value$ ?? '';
121
49
  const newVal = editorValue?.editor?.getBody()?.innerHTML ?? '';
50
+
122
51
  const isValueChanged = newVal.toString() !== oldVal.toString();
123
52
 
124
53
  if (isValueChanged || this.status === 'error') {
@@ -133,6 +62,7 @@ export class RichTextComponent implements OnInit, OnDestroy {
133
62
 
134
63
  fieldOnBlur(editorValue: any) {
135
64
  const oldVal = this.value$ ?? '';
65
+
136
66
  const isValueChanged = editorValue.toString() !== oldVal.toString();
137
67
 
138
68
  if (isValueChanged) {
@@ -1,7 +1,7 @@
1
1
  import { CommonModule } from '@angular/common';
2
- import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core';
3
- import { FormControl, FormGroup } from '@angular/forms';
4
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
2
+ import { Component, forwardRef } from '@angular/core';
3
+
4
+ import { FieldBase } from '@pega/angular-sdk-components';
5
5
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  import { PConnFieldProps } from '@pega/angular-sdk-components';
7
7
 
@@ -17,86 +17,29 @@ interface ScalarListProps extends Omit<PConnFieldProps, 'value'> {
17
17
  selector: 'app-scalar-list',
18
18
  templateUrl: './scalar-list.component.html',
19
19
  styleUrls: ['./scalar-list.component.scss'],
20
- standalone: true,
21
20
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
22
21
  })
23
- export class ScalarListComponent implements OnInit, OnDestroy {
24
- @Input() pConn$: typeof PConnect;
25
- @Input() formGroup$: FormGroup;
26
-
27
- angularPConnectData: AngularPConnectData = {};
22
+ export class ScalarListComponent extends FieldBase {
28
23
  configProps$: ScalarListProps;
29
24
 
30
- label$ = '';
31
- value$: any;
32
- displayMode$?: string = '';
33
25
  items: any[];
34
26
  isDisplayModeEnabled = false;
35
- controlName$: string;
36
- fieldControl = new FormControl('', null);
37
- bHasForm$ = true;
38
- bReadonly$ = false;
39
-
40
- constructor(private angularPConnect: AngularPConnectService) {}
41
-
42
- ngOnInit(): void {
43
- // First thing in initialization is registering and subscribing to the AngularPConnect service
44
- this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
45
- this.controlName$ = this.angularPConnect.getComponentID(this);
46
- // Then, continue on with other initialization
47
-
48
- // call updateSelf when initializing
49
- // this.updateSelf();
50
- this.checkAndUpdate();
51
-
52
- if (this.formGroup$) {
53
- // add control to formGroup
54
- this.formGroup$.addControl(this.controlName$, this.fieldControl);
55
- this.fieldControl.setValue(this.value$);
56
- this.bHasForm$ = true;
57
- } else {
58
- this.bReadonly$ = true;
59
- this.bHasForm$ = false;
60
- }
61
- }
62
-
63
- ngOnDestroy(): void {
64
- if (this.formGroup$) {
65
- this.formGroup$.removeControl(this.controlName$);
66
- }
67
27
 
68
- if (this.angularPConnectData.unsubscribeFn) {
69
- this.angularPConnectData.unsubscribeFn();
70
- }
71
- }
28
+ /**
29
+ * Updates the component when there are changes in the state.
30
+ */
31
+ override updateSelf(): void {
32
+ // Resolve config properties
33
+ this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as ScalarListProps;
72
34
 
73
- // Callback passed when subscribing to store change
74
- onStateChange() {
75
- this.checkAndUpdate();
76
- }
35
+ // Extract properties from config props
36
+ const { componentType, displayMode = '', label, value, restProps } = this.configProps$;
77
37
 
78
- checkAndUpdate() {
79
- // Should always check the bridge to see if the component should
80
- // update itself (re-render)
81
- const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
38
+ // Update component properties
39
+ this.label$ = label;
40
+ this.displayMode$ = displayMode;
82
41
 
83
- // ONLY call updateSelf when the component should update
84
- if (bUpdateSelf) {
85
- this.updateSelf();
86
- }
87
- }
88
-
89
- // updateSelf
90
- updateSelf(): void {
91
- this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as ScalarListProps;
92
- this.label$ = this.configProps$.label;
93
- const componentType = this.configProps$.componentType;
94
- const scalarValues = this.configProps$.value;
95
- this.displayMode$ = this.configProps$.displayMode;
96
- const restProps = this.configProps$.restProps;
97
- console.log('scalar values: ', scalarValues);
98
- this.items = scalarValues?.map(scalarValue => {
99
- console.log('scalar value: ', scalarValue);
42
+ this.items = value?.map(scalarValue => {
100
43
  return this.pConn$.createComponent(
101
44
  {
102
45
  type: componentType,
@@ -113,6 +56,7 @@ export class ScalarListComponent implements OnInit, OnDestroy {
113
56
  {}
114
57
  ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
115
58
  });
59
+
116
60
  this.isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(this.displayMode$ as string);
117
61
  this.value$ = this.items;
118
62
  }
@@ -0,0 +1,70 @@
1
+ <div
2
+ *ngIf="type === 'checkbox'"
3
+ style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 0.5rem"
4
+ >
5
+ <div *ngFor="let cardContent of contentList">
6
+ <mat-card [ngStyle]="cardStyle" appearance="outlined" (click)="cardSelect($event, cardContent.commonCardProps)">
7
+ <img
8
+ *ngIf="cardContent.cardImage"
9
+ mat-card-image
10
+ src="{{ cardContent.cardImage.src }}"
11
+ alt="{{ cardContent.cardImage.alt }}"
12
+ [ngStyle]="cardContent.cardImage.style"
13
+ />
14
+ <mat-card-content>
15
+ <mat-checkbox
16
+ [labelPosition]="'after'"
17
+ [checked]="cardContent.commonCardProps.selected"
18
+ [disabled]="disabled || readOnly"
19
+ [attr.data-test-id]="testId + ':' + cardContent.commonCardProps.label"
20
+ (change)="handleChangeMultiMode($event, cardContent.commonCardProps)"
21
+ (blur)="fieldOnBlur()"
22
+ >{{ cardContent.commonCardProps.label }}</mat-checkbox
23
+ >
24
+ <div
25
+ *ngFor="let field of cardContent.commonCardProps.fields"
26
+ [ngStyle]="field.type !== 'TextArea' ? (field.name ? defaultStyle : noLabelStyle) : specialStyle"
27
+ >
28
+ <div>{{ field.name }}</div>
29
+ <div>{{ field?.value?.getPConnect().getConfigProps().value ?? '--' }}</div>
30
+ </div>
31
+ </mat-card-content>
32
+ </mat-card>
33
+ </div>
34
+ </div>
35
+
36
+ <mat-radio-group
37
+ *ngIf="type === 'radio'"
38
+ style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 0.5rem"
39
+ [name]="propName"
40
+ [value]="radioBtnValue"
41
+ (change)="fieldOnChange($event.value)"
42
+ >
43
+ <div *ngFor="let cardContent of contentList">
44
+ <mat-card [ngStyle]="cardStyle" appearance="outlined" (click)="cardSelect($event, cardContent.commonCardProps)">
45
+ <img
46
+ *ngIf="cardContent.cardImage"
47
+ mat-card-image
48
+ src="{{ cardContent.cardImage.src }}"
49
+ alt="{{ cardContent.cardImage.alt }}"
50
+ [ngStyle]="cardContent.cardImage.style"
51
+ />
52
+ <mat-card-content>
53
+ <mat-radio-button
54
+ [checked]="radioBtnValue === cardContent?.commonCardProps?.key"
55
+ [disabled]="disabled"
56
+ [value]="cardContent.commonCardProps.key"
57
+ >
58
+ {{ cardContent.commonCardProps.label }}
59
+ </mat-radio-button>
60
+ <div
61
+ *ngFor="let field of cardContent.commonCardProps.fields"
62
+ [ngStyle]="field.type !== 'TextArea' ? (field.name ? defaultStyle : noLabelStyle) : specialStyle"
63
+ >
64
+ <div>{{ field.name }}</div>
65
+ <div>{{ field?.value?.getPConnect().getConfigProps().value ?? '--' }}</div>
66
+ </div>
67
+ </mat-card-content>
68
+ </mat-card>
69
+ </div>
70
+ </mat-radio-group>
@@ -0,0 +1,11 @@
1
+ ::ng-deep .mdc-label {
2
+ font-size: large;
3
+ }
4
+
5
+ .mat-mdc-card-content:last-child {
6
+ padding-bottom: 0;
7
+ }
8
+
9
+ .mat-mdc-card-content:first-child {
10
+ padding-top: 0;
11
+ }
@@ -0,0 +1,22 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { SelectableCardComponent } from './selectable-card.component';
4
+
5
+ describe('SelectableCardComponent', () => {
6
+ let component: SelectableCardComponent;
7
+ let fixture: ComponentFixture<SelectableCardComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [SelectableCardComponent]
12
+ }).compileComponents();
13
+
14
+ fixture = TestBed.createComponent(SelectableCardComponent);
15
+ component = fixture.componentInstance;
16
+ fixture.detectChanges();
17
+ });
18
+
19
+ it('should create', () => {
20
+ expect(component).toBeTruthy();
21
+ });
22
+ });