@pega/angular-sdk-overrides 25.1.12 → 26.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 (168) hide show
  1. package/lib/designSystemExtension/alert/alert.component.html +4 -1
  2. package/lib/designSystemExtension/alert/alert.component.scss +9 -10
  3. package/lib/designSystemExtension/alert/alert.component.ts +6 -2
  4. package/lib/designSystemExtension/field-group/field-group.component.ts +11 -3
  5. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +51 -36
  6. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +12 -0
  7. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +11 -0
  8. package/lib/designSystemExtension/operator/operator.component.html +5 -3
  9. package/lib/designSystemExtension/operator/operator.component.scss +7 -0
  10. package/lib/designSystemExtension/operator/operator.component.ts +2 -1
  11. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +100 -10
  12. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +141 -1
  13. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +1 -1
  14. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +240 -72
  15. package/lib/field/auto-complete/auto-complete.component.html +46 -5
  16. package/lib/field/auto-complete/auto-complete.component.scss +92 -0
  17. package/lib/field/auto-complete/auto-complete.component.ts +350 -23
  18. package/lib/field/cancel-alert/cancel-alert.component.ts +38 -15
  19. package/lib/field/check-box/check-box.component.html +8 -6
  20. package/lib/field/check-box/check-box.component.ts +9 -2
  21. package/lib/field/currency/currency.component.html +2 -1
  22. package/lib/field/currency/currency.component.ts +10 -1
  23. package/lib/field/date/date.component.html +2 -1
  24. package/lib/field/date/date.component.ts +2 -0
  25. package/lib/field/date-time/date-time.component.html +2 -1
  26. package/lib/field/date-time/date-time.component.scss +46 -40
  27. package/lib/field/date-time/date-time.component.ts +29 -0
  28. package/lib/field/decimal/decimal.component.html +2 -1
  29. package/lib/field/decimal/decimal.component.ts +2 -0
  30. package/lib/field/dropdown/dropdown.component.html +4 -1
  31. package/lib/field/dropdown/dropdown.component.ts +18 -19
  32. package/lib/field/email/email.component.html +2 -1
  33. package/lib/field/email/email.component.ts +2 -2
  34. package/lib/field/embedded-data-multi/embedded-data-multi.component.html +3 -0
  35. package/lib/field/embedded-data-multi/embedded-data-multi.component.scss +0 -0
  36. package/lib/field/embedded-data-multi/embedded-data-multi.component.ts +173 -0
  37. package/lib/field/field.base.ts +27 -1
  38. package/lib/field/group/group.component.html +1 -1
  39. package/lib/field/group/group.component.ts +16 -7
  40. package/lib/field/integer/integer.component.html +2 -1
  41. package/lib/field/integer/integer.component.ts +4 -2
  42. package/lib/field/location/location.component.html +2 -1
  43. package/lib/field/location/location.component.ts +3 -1
  44. package/lib/field/multiselect/multiselect.component.html +1 -1
  45. package/lib/field/multiselect/multiselect.component.ts +23 -4
  46. package/lib/field/multiselect/utils.ts +5 -3
  47. package/lib/field/object-reference/object-reference.component.html +30 -15
  48. package/lib/field/object-reference/object-reference.component.ts +818 -94
  49. package/lib/field/percentage/percentage.component.html +2 -1
  50. package/lib/field/percentage/percentage.component.ts +10 -1
  51. package/lib/field/phone/phone.component.html +2 -1
  52. package/lib/field/phone/phone.component.ts +2 -1
  53. package/lib/field/radio-buttons/radio-buttons.component.html +2 -1
  54. package/lib/field/radio-buttons/radio-buttons.component.ts +10 -1
  55. package/lib/field/rich-text/rich-text.component.scss +1 -166
  56. package/lib/field/rich-text/rich-text.component.spec.ts +1 -1
  57. package/lib/field/rich-text/rich-text.component.ts +1 -1
  58. package/lib/field/selectable-card/selectable-card.component.html +1 -0
  59. package/lib/field/selectable-card/selectable-card.component.ts +31 -16
  60. package/lib/field/semantic-link/semantic-link.component.html +1 -1
  61. package/lib/field/semantic-link/semantic-link.component.scss +4 -0
  62. package/lib/field/semantic-link/semantic-link.component.ts +13 -7
  63. package/lib/field/text-area/text-area.component.html +2 -1
  64. package/lib/field/text-area/text-area.component.ts +2 -1
  65. package/lib/field/text-input/text-input.component.html +2 -1
  66. package/lib/field/text-input/text-input.component.ts +2 -1
  67. package/lib/field/time/time.component.html +2 -1
  68. package/lib/field/time/time.component.ts +2 -1
  69. package/lib/field/url/url.component.html +2 -1
  70. package/lib/field/url/url.component.ts +2 -1
  71. package/lib/field/user-reference/user-reference.component.html +4 -2
  72. package/lib/field/user-reference/user-reference.component.ts +11 -6
  73. package/lib/infra/Containers/flow-container/flow-container.component.html +2 -2
  74. package/lib/infra/Containers/flow-container/flow-container.component.ts +34 -42
  75. package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.html +12 -0
  76. package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.spec.ts +130 -0
  77. package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.ts +77 -0
  78. package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +35 -8
  79. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +185 -196
  80. package/lib/infra/Containers/view-container/view-container.component.html +1 -1
  81. package/lib/infra/Containers/view-container/view-container.component.ts +36 -43
  82. package/lib/infra/assignment/assignment.component.html +2 -1
  83. package/lib/infra/assignment/assignment.component.ts +44 -22
  84. package/lib/infra/assignment-card/assignment-card.component.html +1 -0
  85. package/lib/infra/assignment-card/assignment-card.component.ts +2 -8
  86. package/lib/infra/defer-load/defer-load.component.ts +7 -5
  87. package/lib/infra/multi-step/multi-step.component.html +25 -33
  88. package/lib/infra/multi-step/multi-step.component.scss +67 -125
  89. package/lib/infra/multi-step/multi-step.component.ts +11 -0
  90. package/lib/infra/navbar/navbar.component.ts +33 -36
  91. package/lib/infra/reference/reference.component.html +7 -1
  92. package/lib/infra/reference/reference.component.ts +63 -109
  93. package/lib/infra/region/region.component.ts +1 -3
  94. package/lib/infra/root-container/root-container.component.html +1 -0
  95. package/lib/infra/root-container/root-container.component.ts +34 -42
  96. package/lib/infra/view/view.component.ts +22 -46
  97. package/lib/template/advanced-search/advanced-search.component.ts +0 -1
  98. package/lib/template/advanced-search/search-groups/search-groups.component.ts +2 -3
  99. package/lib/template/app-shell/app-shell.component.ts +13 -13
  100. package/lib/template/banner-page/banner-page.component.ts +1 -2
  101. package/lib/template/base/details-template-base.ts +41 -14
  102. package/lib/template/base/form-template-base.ts +0 -2
  103. package/lib/template/case-summary/case-summary.component.ts +15 -7
  104. package/lib/template/case-view/case-view.component.html +14 -2
  105. package/lib/template/case-view/case-view.component.spec.ts +119 -10
  106. package/lib/template/case-view/case-view.component.ts +52 -3
  107. package/lib/template/data-reference/data-reference.component.ts +29 -22
  108. package/lib/template/data-reference/search-form/search-form.component.html +1 -1
  109. package/lib/template/data-reference/search-form/search-form.component.ts +9 -1
  110. package/lib/template/data-reference/search-form/tabsData.ts +0 -1
  111. package/lib/template/default-form/default-form.component.html +20 -4
  112. package/lib/template/default-form/default-form.component.ts +14 -5
  113. package/lib/template/default-page/default-page.component.ts +1 -2
  114. package/lib/template/details/details.component.html +23 -3
  115. package/lib/template/details/details.component.scss +9 -2
  116. package/lib/template/details/details.component.ts +3 -70
  117. package/lib/template/details-narrow-wide/details-narrow-wide.component.html +21 -2
  118. package/lib/template/details-narrow-wide/details-narrow-wide.component.scss +8 -1
  119. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +3 -39
  120. package/lib/template/details-one-column/details-one-column.component.html +23 -1
  121. package/lib/template/details-one-column/details-one-column.component.scss +14 -0
  122. package/lib/template/details-one-column/details-one-column.component.ts +3 -40
  123. package/lib/template/details-three-column/details-three-column.component.html +21 -2
  124. package/lib/template/details-three-column/details-three-column.component.scss +8 -1
  125. package/lib/template/details-three-column/details-three-column.component.ts +3 -48
  126. package/lib/template/details-two-column/details-two-column.component.html +21 -2
  127. package/lib/template/details-two-column/details-two-column.component.scss +8 -1
  128. package/lib/template/details-two-column/details-two-column.component.ts +3 -46
  129. package/lib/template/details-wide-narrow/details-wide-narrow.component.html +21 -2
  130. package/lib/template/details-wide-narrow/details-wide-narrow.component.scss +8 -1
  131. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +3 -43
  132. package/lib/template/dynamic-tabs/dynamic-tabs.component.html +1 -0
  133. package/lib/template/field-group-template/field-group-template.component.ts +19 -6
  134. package/lib/template/field-value-list/field-value-list.component.scss +17 -0
  135. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -10
  136. package/lib/template/list-view/list-view.component.ts +47 -11
  137. package/lib/template/one-column/one-column.component.html +3 -0
  138. package/lib/template/one-column-tab/one-column-tab.component.html +1 -0
  139. package/lib/template/page/page.component.html +1 -0
  140. package/lib/template/self-service-case-view/self-service-case-view.component.html +13 -1
  141. package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +96 -11
  142. package/lib/template/self-service-case-view/self-service-case-view.component.ts +52 -3
  143. package/lib/template/simple-table/simple-table.component.ts +11 -1
  144. package/lib/template/simple-table-manual/helpers.ts +84 -16
  145. package/lib/template/simple-table-manual/simple-table-manual.component.html +30 -14
  146. package/lib/template/simple-table-manual/simple-table-manual.component.scss +8 -2
  147. package/lib/template/simple-table-manual/simple-table-manual.component.ts +142 -46
  148. package/lib/template/single-reference-readonly/single-reference-readonly.component.html +0 -0
  149. package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +2 -3
  150. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +7 -8
  151. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +0 -3
  152. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +19 -21
  153. package/lib/widget/attachment/AttachmentUtils.ts +19 -11
  154. package/lib/widget/attachment/attachment.component.html +16 -6
  155. package/lib/widget/attachment/attachment.component.ts +14 -4
  156. package/lib/widget/case-history/case-history.component.ts +6 -2
  157. package/lib/widget/feed-container/feed-container.component.ts +1 -199
  158. package/lib/widget/file-utility/file-utility.component.ts +26 -30
  159. package/lib/widget/todo/todo.component.ts +7 -2
  160. package/package.json +2 -2
  161. package/lib/designSystemExtension/material-details/material-details.component.html +0 -40
  162. package/lib/designSystemExtension/material-details/material-details.component.scss +0 -116
  163. package/lib/designSystemExtension/material-details/material-details.component.spec.ts +0 -24
  164. package/lib/designSystemExtension/material-details/material-details.component.ts +0 -31
  165. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +0 -29
  166. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +0 -34
  167. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts +0 -22
  168. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +0 -37
@@ -1,8 +1,24 @@
1
- <div *ngIf="instructions" class="psdk-default-form-instruction-text">
2
- <div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
3
- </div>
1
+ <ng-container *ngIf="instructions && bShowInstructions$">
2
+ <component-mapper
3
+ *ngIf="instructionBannerVariant$; else instructionText"
4
+ name="Alert"
5
+ [props]="{
6
+ message: instructions,
7
+ messageIsHtml: true,
8
+ severity: instructionBannerVariant$,
9
+ hideClose: !bDismissInstructions$
10
+ }"
11
+ [parent]="this"
12
+ [outputEvents]="{ onClose: dismissInstructions }"
13
+ ></component-mapper>
14
+ <ng-template #instructionText>
15
+ <div class="psdk-default-form-instruction-text">
16
+ <div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
17
+ </div>
18
+ </ng-template>
19
+ </ng-container>
4
20
  <div [className]="divClass$">
5
- <div *ngFor="let kid of arChildren$" [ngClass]="{ 'grid-column': kid.getPConnect().getComponentName() === 'View' }">
21
+ <div *ngFor="let kid of arChildren$" [ngClass]="{ 'grid-column': kid.getPConnect().getComponentName() === 'reference' }">
6
22
  <component-mapper
7
23
  [name]="kid.getPConnect().getComponentName()"
8
24
  [props]="{
@@ -2,9 +2,8 @@ import { Component, OnInit, Input, forwardRef, OnChanges } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
5
- import { ReferenceComponent } from '@pega/angular-sdk-components';
6
5
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
- import { TemplateUtils } from '@pega/angular-sdk-components';
6
+ import { InstructionObject, TemplateUtils } from '@pega/angular-sdk-components';
8
7
  import { FormTemplateBase } from '@pega/angular-sdk-components';
9
8
 
10
9
  function areViewsChanged(oldViews: any[], newViews: any[]): boolean {
@@ -21,7 +20,7 @@ function areViewsChanged(oldViews: any[], newViews: any[]): boolean {
21
20
  interface DefaultFormProps {
22
21
  // If any, enter additional props that only exist on this component
23
22
  NumCols: string;
24
- instructions: string;
23
+ instructions?: string | InstructionObject;
25
24
  }
26
25
 
27
26
  @Component({
@@ -39,7 +38,10 @@ export class DefaultFormComponent extends FormTemplateBase implements OnInit, On
39
38
 
40
39
  arChildren$: any[];
41
40
  divClass$: string;
42
- instructions: string;
41
+ instructions: string | undefined;
42
+ instructionBannerVariant$: 'warning' | 'info' | 'success' | undefined;
43
+ bDismissInstructions$ = false;
44
+ bShowInstructions$ = true;
43
45
 
44
46
  constructor(
45
47
  private angularPConnect: AngularPConnectService,
@@ -71,6 +73,9 @@ export class DefaultFormComponent extends FormTemplateBase implements OnInit, On
71
73
  const configProps = this.pConn$.getConfigProps() as DefaultFormProps;
72
74
  const kids = this.pConn$.getChildren();
73
75
  this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
76
+ const instructionsType = this.templateUtils.getInstructionsType(configProps?.instructions);
77
+ this.instructionBannerVariant$ = instructionsType ? this.templateUtils.mapInstructionsTypeToBannerVariant(instructionsType) : undefined;
78
+ this.bDismissInstructions$ = this.templateUtils.getDismissBanner(configProps?.instructions);
74
79
 
75
80
  const numCols = configProps.NumCols ? configProps.NumCols : '1';
76
81
  switch (numCols) {
@@ -91,10 +96,14 @@ export class DefaultFormComponent extends FormTemplateBase implements OnInit, On
91
96
  // repoint children before getting templateArray
92
97
  // Children may contain 'reference' component, so we need to
93
98
  // normalize them
94
- const children = ReferenceComponent.normalizePConnArray(kids[0].getPConnect().getChildren());
99
+ const children = kids[0].getPConnect().getChildren();
95
100
 
96
101
  if (areViewsChanged(this.arChildren$, children)) {
97
102
  this.arChildren$ = children;
98
103
  }
99
104
  }
105
+
106
+ dismissInstructions() {
107
+ this.bShowInstructions$ = false;
108
+ }
100
109
  }
@@ -1,6 +1,5 @@
1
1
  import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
- import { ReferenceComponent } from '@pega/angular-sdk-components';
4
3
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
5
4
 
6
5
  interface DefaultPageProps {
@@ -59,6 +58,6 @@ export class DefaultPageComponent implements OnInit, OnChanges {
59
58
  this.backgroundImage = this.configProps$.backgroundImage;
60
59
  this.enableBanner$ = this.configProps$.enableBanner;
61
60
 
62
- this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
61
+ this.arChildren$ = this.pConn$.getChildren();
63
62
  }
64
63
  }
@@ -1,3 +1,23 @@
1
- <div>
2
- <component-mapper name="MaterialDetails" [props]="{ arFields$, arHighlightedFields: highlightedDataArr, layout: 'one-column' }"></component-mapper>
3
- </div>
1
+ <component-mapper
2
+ name="FieldGroup"
3
+ [props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
4
+ ></component-mapper>
5
+
6
+ <ng-template #detailsContent>
7
+ <ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
8
+ <div class="psdk-grid-highlighted">
9
+ <component-mapper
10
+ *ngFor="let field of highlightedDataArr"
11
+ [name]="field.getComponentName()"
12
+ [props]="{ pConn$: field, formGroup$ }"
13
+ ></component-mapper>
14
+ </div>
15
+ </ng-container>
16
+ <div class="psdk-grid-filter-1">
17
+ <component-mapper
18
+ *ngFor="let child of children"
19
+ [name]="child.getPConnect().getComponentName()"
20
+ [props]="{ pConn$: child.getPConnect(), formGroup$ }"
21
+ ></component-mapper>
22
+ </div>
23
+ </ng-template>
@@ -1,7 +1,14 @@
1
- .psdk-grid-filter {
1
+ .psdk-grid-filter-1 {
2
2
  display: grid;
3
- grid-template-columns: repeat(2, minmax(0, 1fr));
3
+ grid-template-columns: repeat(1, minmax(0, 1fr));
4
4
  column-gap: calc(2 * 0.5rem);
5
5
  row-gap: calc(2 * 0.5rem);
6
6
  align-items: start;
7
7
  }
8
+
9
+ .psdk-grid-highlighted {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: flex-start;
13
+ gap: calc(0.5rem) calc(5rem);
14
+ }
@@ -1,4 +1,5 @@
1
1
  import { Component, forwardRef } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
2
3
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
4
  import { DetailsTemplateBase } from '@pega/angular-sdk-components';
4
5
 
@@ -6,74 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
7
  selector: 'app-details',
7
8
  templateUrl: './details.component.html',
8
9
  styleUrls: ['./details.component.scss'],
9
- imports: [forwardRef(() => ComponentMapperComponent)]
10
+ imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
10
11
  })
11
- export class DetailsComponent extends DetailsTemplateBase {
12
- override pConn$: typeof PConnect;
13
-
14
- highlightedDataArr: any[] = [];
15
- showHighlightedData: boolean;
16
- arFields$: any[] = [];
17
-
18
- override updateSelf() {
19
- const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
20
- this.showHighlightedData = rawMetaData?.showHighlightedData;
21
-
22
- if (this.showHighlightedData) {
23
- const highlightedData = rawMetaData?.highlightedData;
24
- this.highlightedDataArr = highlightedData.map(field => {
25
- field.config.displayMode = 'STACKED_LARGE_VAL';
26
-
27
- if (field.config.value === '@P .pyStatusWork') {
28
- field.type = 'TextInput';
29
- field.config.displayAsStatus = true;
30
- }
31
-
32
- return field;
33
- });
34
- }
35
-
36
- const kids = this.pConn$.getChildren() as any[];
37
- for (const kid of kids) {
38
- this.arFields$ = [];
39
- const pKid = kid.getPConnect();
40
- const fields = pKid.getChildren();
41
- fields?.forEach(field => {
42
- const thePConn = field.getPConnect();
43
- const theCompType = thePConn.getComponentName().toLowerCase();
44
- if (theCompType === 'reference' || theCompType === 'group') {
45
- const configProps = thePConn.getConfigProps();
46
- configProps.readOnly = true;
47
- configProps.displayMode = 'DISPLAY_ONLY';
48
- const propToUse = { ...thePConn.getInheritedProps() };
49
- configProps.label = propToUse?.label;
50
- const options = {
51
- context: thePConn.getContextName(),
52
- pageReference: thePConn.getPageReference(),
53
- referenceList: thePConn.getReferenceList()
54
- };
55
- const viewContConfig = {
56
- meta: {
57
- ...thePConn.getMetadata(),
58
- type: theCompType,
59
- config: configProps
60
- },
61
- options
62
- };
63
- const theViewCont = PCore.createPConnect(viewContConfig);
64
- const data = {
65
- type: theCompType,
66
- pConn: theViewCont?.getPConnect()
67
- };
68
- this.arFields$.push(data);
69
- } else {
70
- const data = {
71
- type: theCompType,
72
- config: thePConn.getConfigProps()
73
- };
74
- this.arFields$.push(data);
75
- }
76
- });
77
- }
78
- }
79
- }
12
+ export class DetailsComponent extends DetailsTemplateBase {}
@@ -1,4 +1,23 @@
1
1
  <component-mapper
2
- name="MaterialDetails"
3
- [props]="{ arFields$, arFields2$, arHighlightedFields: highlightedDataArr, layout: 'narrow-wide' }"
2
+ name="FieldGroup"
3
+ [props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
4
4
  ></component-mapper>
5
+
6
+ <ng-template #detailsContent>
7
+ <ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
8
+ <div class="psdk-grid-highlighted">
9
+ <component-mapper
10
+ *ngFor="let field of highlightedDataArr"
11
+ [name]="field.getComponentName()"
12
+ [props]="{ pConn$: field, formGroup$ }"
13
+ ></component-mapper>
14
+ </div>
15
+ </ng-container>
16
+ <div class="psdk-grid-filter-narrow-wide">
17
+ <component-mapper
18
+ *ngFor="let child of children"
19
+ [name]="child.getPConnect().getComponentName()"
20
+ [props]="{ pConn$: child.getPConnect(), formGroup$ }"
21
+ ></component-mapper>
22
+ </div>
23
+ </ng-template>
@@ -1,7 +1,14 @@
1
- .psdk-grid-filter {
1
+ .psdk-grid-filter-narrow-wide {
2
2
  display: grid;
3
3
  grid-template-columns: 3fr 7fr;
4
4
  column-gap: calc(2 * 0.5rem);
5
5
  row-gap: calc(2 * 0.5rem);
6
6
  align-items: start;
7
7
  }
8
+
9
+ .psdk-grid-highlighted {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: flex-start;
13
+ gap: calc(0.5rem) calc(5rem);
14
+ }
@@ -1,4 +1,5 @@
1
1
  import { Component, forwardRef } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
2
3
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
4
  import { DetailsTemplateBase } from '@pega/angular-sdk-components';
4
5
 
@@ -6,43 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
7
  selector: 'app-details-narrow-wide',
7
8
  templateUrl: './details-narrow-wide.component.html',
8
9
  styleUrls: ['./details-narrow-wide.component.scss'],
9
- imports: [forwardRef(() => ComponentMapperComponent)]
10
+ imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
10
11
  })
11
- export class DetailsNarrowWideComponent extends DetailsTemplateBase {
12
- override pConn$: typeof PConnect;
13
-
14
- arFields$: any[] = [];
15
- arFields2$: any[] = [];
16
- highlightedDataArr: any[] = [];
17
- showHighlightedData: boolean;
18
-
19
- override updateSelf() {
20
- const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
21
- this.showHighlightedData = rawMetaData?.showHighlightedData;
22
-
23
- if (this.showHighlightedData) {
24
- const highlightedData = rawMetaData?.highlightedData;
25
- this.highlightedDataArr = highlightedData.map(field => {
26
- field.config.displayMode = 'STACKED_LARGE_VAL';
27
-
28
- if (field.config.value === '@P .pyStatusWork') {
29
- field.type = 'TextInput';
30
- field.config.displayAsStatus = true;
31
- }
32
-
33
- return field;
34
- });
35
- }
36
-
37
- const kids = this.pConn$.getChildren() as any[];
38
- for (const kid of kids) {
39
- const pKid = kid.getPConnect();
40
- const pKidData = pKid.resolveConfigProps(pKid.getRawMetadata());
41
- if (kids.indexOf(kid) == 0) {
42
- this.arFields$ = pKidData.children;
43
- } else {
44
- this.arFields2$ = pKidData.children;
45
- }
46
- }
47
- }
48
- }
12
+ export class DetailsNarrowWideComponent extends DetailsTemplateBase {}
@@ -1 +1,23 @@
1
- <component-mapper name="MaterialDetails" [props]="{ arFields$, arHighlightedFields: highlightedDataArr, layout: 'one-column' }"></component-mapper>
1
+ <component-mapper
2
+ name="FieldGroup"
3
+ [props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
4
+ ></component-mapper>
5
+
6
+ <ng-template #detailsContent>
7
+ <ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
8
+ <div class="psdk-grid-highlighted">
9
+ <component-mapper
10
+ *ngFor="let field of highlightedDataArr"
11
+ [name]="field.getComponentName()"
12
+ [props]="{ pConn$: field, formGroup$ }"
13
+ ></component-mapper>
14
+ </div>
15
+ </ng-container>
16
+ <div class="psdk-grid-filter-1">
17
+ <component-mapper
18
+ *ngFor="let child of children"
19
+ [name]="child.getPConnect().getComponentName()"
20
+ [props]="{ pConn$: child.getPConnect(), formGroup$ }"
21
+ ></component-mapper>
22
+ </div>
23
+ </ng-template>
@@ -0,0 +1,14 @@
1
+ .psdk-grid-filter-1 {
2
+ display: grid;
3
+ grid-template-columns: repeat(1, minmax(0, 1fr));
4
+ column-gap: calc(2 * 0.5rem);
5
+ row-gap: calc(2 * 0.5rem);
6
+ align-items: start;
7
+ }
8
+
9
+ .psdk-grid-highlighted {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: flex-start;
13
+ gap: calc(0.5rem) calc(5rem);
14
+ }
@@ -1,4 +1,5 @@
1
1
  import { Component, forwardRef } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
2
3
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
4
  import { DetailsTemplateBase } from '@pega/angular-sdk-components';
4
5
 
@@ -6,44 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
7
  selector: 'app-details-one-column',
7
8
  templateUrl: './details-one-column.component.html',
8
9
  styleUrls: ['./details-one-column.component.scss'],
9
- imports: [forwardRef(() => ComponentMapperComponent)]
10
+ imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
10
11
  })
11
- export class DetailsOneColumnComponent extends DetailsTemplateBase {
12
- override pConn$: typeof PConnect;
13
-
14
- showHighlightedData: boolean;
15
- highlightedDataArr: any;
16
-
17
- arFields$: any[] = [];
18
-
19
- override updateSelf() {
20
- const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
21
- this.showHighlightedData = rawMetaData?.showHighlightedData;
22
-
23
- if (this.showHighlightedData) {
24
- const highlightedData = rawMetaData?.highlightedData;
25
- this.highlightedDataArr = highlightedData.map(field => {
26
- field.config.displayMode = 'STACKED_LARGE_VAL';
27
-
28
- if (field.config.value === '@P .pyStatusWork') {
29
- field.type = 'TextInput';
30
- field.config.displayAsStatus = true;
31
- }
32
-
33
- return field;
34
- });
35
- }
36
-
37
- this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
38
- this.pConn$.setInheritedProp('readOnly', true);
39
-
40
- const kids = this.pConn$.getChildren() as any[];
41
- for (const kid of kids) {
42
- const pKid = kid.getPConnect();
43
- const pKidData = pKid.resolveConfigProps(pKid.getRawMetadata());
44
- if (kids.indexOf(kid) == 0) {
45
- this.arFields$ = pKidData.children;
46
- }
47
- }
48
- }
49
- }
12
+ export class DetailsOneColumnComponent extends DetailsTemplateBase {}
@@ -1,4 +1,23 @@
1
1
  <component-mapper
2
- name="MaterialDetails"
3
- [props]="{ arFields$, arFields2$, arFields3$, arHighlightedFields: highlightedDataArr, layout: 'three-column' }"
2
+ name="FieldGroup"
3
+ [props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
4
4
  ></component-mapper>
5
+
6
+ <ng-template #detailsContent>
7
+ <ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
8
+ <div class="psdk-grid-highlighted">
9
+ <component-mapper
10
+ *ngFor="let field of highlightedDataArr"
11
+ [name]="field.getComponentName()"
12
+ [props]="{ pConn$: field, formGroup$ }"
13
+ ></component-mapper>
14
+ </div>
15
+ </ng-container>
16
+ <div class="psdk-grid-filter-3">
17
+ <component-mapper
18
+ *ngFor="let child of children"
19
+ [name]="child.getPConnect().getComponentName()"
20
+ [props]="{ pConn$: child.getPConnect(), formGroup$ }"
21
+ ></component-mapper>
22
+ </div>
23
+ </ng-template>
@@ -1,7 +1,14 @@
1
- .psdk-grid-filter {
1
+ .psdk-grid-filter-3 {
2
2
  display: grid;
3
3
  grid-template-columns: repeat(3, minmax(0, 1fr));
4
4
  column-gap: calc(2 * 0.5rem);
5
5
  row-gap: calc(2 * 0.5rem);
6
6
  align-items: start;
7
7
  }
8
+
9
+ .psdk-grid-highlighted {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: flex-start;
13
+ gap: calc(0.5rem) calc(5rem);
14
+ }
@@ -1,4 +1,5 @@
1
1
  import { Component, forwardRef } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
2
3
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
4
  import { DetailsTemplateBase } from '@pega/angular-sdk-components';
4
5
 
@@ -6,52 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
7
  selector: 'app-details-three-column',
7
8
  templateUrl: './details-three-column.component.html',
8
9
  styleUrls: ['./details-three-column.component.scss'],
9
- imports: [forwardRef(() => ComponentMapperComponent)]
10
+ imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
10
11
  })
11
- export class DetailsThreeColumnComponent extends DetailsTemplateBase {
12
- override pConn$: typeof PConnect;
13
-
14
- showHighlightedData: boolean;
15
- highlightedDataArr: any;
16
-
17
- arFields$: any[] = [];
18
- arFields2$: any[] = [];
19
- arFields3$: any[] = [];
20
-
21
- propsToUse: any = {};
22
-
23
- override updateSelf() {
24
- const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
25
- this.showHighlightedData = rawMetaData?.showHighlightedData;
26
-
27
- if (this.showHighlightedData) {
28
- const highlightedData = rawMetaData?.highlightedData;
29
- this.highlightedDataArr = highlightedData.map(field => {
30
- field.config.displayMode = 'STACKED_LARGE_VAL';
31
-
32
- if (field.config.value === '@P .pyStatusWork') {
33
- field.type = 'TextInput';
34
- field.config.displayAsStatus = true;
35
- }
36
-
37
- return field;
38
- });
39
- }
40
-
41
- this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
42
- this.pConn$.setInheritedProp('readOnly', true);
43
-
44
- const kids = this.pConn$.getChildren() as any[];
45
- for (const kid of kids) {
46
- const pKid = kid.getPConnect();
47
- const pKidData = pKid.resolveConfigProps(pKid.getRawMetadata());
48
- if (kids.indexOf(kid) == 0) {
49
- this.arFields$ = pKidData.children;
50
- } else if (kids.indexOf(kid) == 1) {
51
- this.arFields2$ = pKidData.children;
52
- } else {
53
- this.arFields3$ = pKidData.children;
54
- }
55
- }
56
- }
57
- }
12
+ export class DetailsThreeColumnComponent extends DetailsTemplateBase {}
@@ -1,4 +1,23 @@
1
1
  <component-mapper
2
- name="MaterialDetails"
3
- [props]="{ arFields$, arFields2$, arHighlightedFields: highlightedDataArr, layout: 'two-column' }"
2
+ name="FieldGroup"
3
+ [props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
4
4
  ></component-mapper>
5
+
6
+ <ng-template #detailsContent>
7
+ <ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
8
+ <div class="psdk-grid-highlighted">
9
+ <component-mapper
10
+ *ngFor="let field of highlightedDataArr"
11
+ [name]="field.getComponentName()"
12
+ [props]="{ pConn$: field, formGroup$ }"
13
+ ></component-mapper>
14
+ </div>
15
+ </ng-container>
16
+ <div class="psdk-grid-filter-2">
17
+ <component-mapper
18
+ *ngFor="let child of children"
19
+ [name]="child.getPConnect().getComponentName()"
20
+ [props]="{ pConn$: child.getPConnect(), formGroup$ }"
21
+ ></component-mapper>
22
+ </div>
23
+ </ng-template>
@@ -1,7 +1,14 @@
1
- .psdk-grid-filter {
1
+ .psdk-grid-filter-2 {
2
2
  display: grid;
3
3
  grid-template-columns: repeat(2, minmax(0, 1fr));
4
4
  column-gap: calc(2 * 0.5rem);
5
5
  row-gap: calc(2 * 0.5rem);
6
6
  align-items: start;
7
7
  }
8
+
9
+ .psdk-grid-highlighted {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: flex-start;
13
+ gap: calc(0.5rem) calc(5rem);
14
+ }
@@ -1,4 +1,5 @@
1
1
  import { Component, forwardRef } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
2
3
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
3
4
  import { DetailsTemplateBase } from '@pega/angular-sdk-components';
4
5
 
@@ -6,50 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
6
7
  selector: 'app-details-two-column',
7
8
  templateUrl: './details-two-column.component.html',
8
9
  styleUrls: ['./details-two-column.component.scss'],
9
- imports: [forwardRef(() => ComponentMapperComponent)]
10
+ imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
10
11
  })
11
- export class DetailsTwoColumnComponent extends DetailsTemplateBase {
12
- override pConn$: typeof PConnect;
13
-
14
- showHighlightedData: boolean;
15
- highlightedDataArr: any;
16
-
17
- arFields$: any[] = [];
18
- arFields2$: any[] = [];
19
- arFields3$: any[] = [];
20
-
21
- propsToUse: any = {};
22
-
23
- override updateSelf() {
24
- const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
25
- this.showHighlightedData = rawMetaData?.showHighlightedData;
26
-
27
- if (this.showHighlightedData) {
28
- const highlightedData = rawMetaData?.highlightedData;
29
- this.highlightedDataArr = highlightedData?.map(field => {
30
- field.config.displayMode = 'STACKED_LARGE_VAL';
31
-
32
- if (field.config.value === '@P .pyStatusWork') {
33
- field.type = 'TextInput';
34
- field.config.displayAsStatus = true;
35
- }
36
-
37
- return field;
38
- });
39
- }
40
-
41
- this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
42
- this.pConn$.setInheritedProp('readOnly', true);
43
-
44
- const kids = this.pConn$.getChildren() as any[];
45
- for (const kid of kids) {
46
- const pKid = kid.getPConnect();
47
- const pKidData = pKid.resolveConfigProps(pKid.getRawMetadata());
48
- if (kids.indexOf(kid) == 0) {
49
- this.arFields$ = pKidData.children;
50
- } else {
51
- this.arFields2$ = pKidData.children;
52
- }
53
- }
54
- }
55
- }
12
+ export class DetailsTwoColumnComponent extends DetailsTemplateBase {}
@@ -1,4 +1,23 @@
1
1
  <component-mapper
2
- name="MaterialDetails"
3
- [props]="{ arFields$, arFields2$, arHighlightedFields: highlightedDataArr, layout: 'wide-narrow' }"
2
+ name="FieldGroup"
3
+ [props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
4
4
  ></component-mapper>
5
+
6
+ <ng-template #detailsContent>
7
+ <ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
8
+ <div class="psdk-grid-highlighted">
9
+ <component-mapper
10
+ *ngFor="let field of highlightedDataArr"
11
+ [name]="field.getComponentName()"
12
+ [props]="{ pConn$: field, formGroup$ }"
13
+ ></component-mapper>
14
+ </div>
15
+ </ng-container>
16
+ <div class="psdk-grid-filter-wide-narrow">
17
+ <component-mapper
18
+ *ngFor="let child of children"
19
+ [name]="child.getPConnect().getComponentName()"
20
+ [props]="{ pConn$: child.getPConnect(), formGroup$ }"
21
+ ></component-mapper>
22
+ </div>
23
+ </ng-template>
@@ -1,7 +1,14 @@
1
- .psdk-grid-filter {
1
+ .psdk-grid-filter-wide-narrow {
2
2
  display: grid;
3
3
  grid-template-columns: 7fr 3fr;
4
4
  column-gap: calc(2 * 0.5rem);
5
5
  row-gap: calc(2 * 0.5rem);
6
6
  align-items: start;
7
7
  }
8
+
9
+ .psdk-grid-highlighted {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: flex-start;
13
+ gap: calc(0.5rem) calc(5rem);
14
+ }