@pega/angular-sdk-overrides 0.25.15 → 0.26.2

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 (86) 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/material-details-fields/material-details-fields.component.html +30 -21
  5. package/lib/designSystemExtension/operator/operator.component.ts +2 -1
  6. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +104 -10
  7. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +141 -1
  8. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +224 -72
  9. package/lib/field/auto-complete/auto-complete.component.html +2 -1
  10. package/lib/field/auto-complete/auto-complete.component.ts +2 -0
  11. package/lib/field/check-box/check-box.component.html +4 -2
  12. package/lib/field/check-box/check-box.component.ts +10 -1
  13. package/lib/field/currency/currency.component.html +2 -1
  14. package/lib/field/currency/currency.component.ts +10 -1
  15. package/lib/field/date/date.component.html +2 -1
  16. package/lib/field/date/date.component.ts +2 -0
  17. package/lib/field/date-time/date-time.component.html +2 -1
  18. package/lib/field/date-time/date-time.component.scss +46 -40
  19. package/lib/field/date-time/date-time.component.ts +2 -0
  20. package/lib/field/decimal/decimal.component.html +2 -1
  21. package/lib/field/decimal/decimal.component.ts +2 -0
  22. package/lib/field/dropdown/dropdown.component.html +2 -1
  23. package/lib/field/dropdown/dropdown.component.ts +10 -1
  24. package/lib/field/email/email.component.html +2 -1
  25. package/lib/field/email/email.component.ts +2 -2
  26. package/lib/field/embedded-data-multi/embedded-data-multi.component.html +3 -0
  27. package/lib/field/embedded-data-multi/embedded-data-multi.component.scss +0 -0
  28. package/lib/field/embedded-data-multi/embedded-data-multi.component.ts +173 -0
  29. package/lib/field/field.base.ts +27 -1
  30. package/lib/field/integer/integer.component.html +2 -1
  31. package/lib/field/integer/integer.component.ts +4 -2
  32. package/lib/field/location/location.component.html +2 -1
  33. package/lib/field/location/location.component.ts +3 -1
  34. package/lib/field/multiselect/multiselect.component.html +1 -1
  35. package/lib/field/multiselect/multiselect.component.ts +22 -3
  36. package/lib/field/multiselect/utils.ts +5 -3
  37. package/lib/field/object-reference/object-reference.component.html +30 -15
  38. package/lib/field/object-reference/object-reference.component.ts +819 -94
  39. package/lib/field/percentage/percentage.component.html +2 -1
  40. package/lib/field/percentage/percentage.component.ts +10 -1
  41. package/lib/field/phone/phone.component.html +2 -1
  42. package/lib/field/phone/phone.component.ts +2 -1
  43. package/lib/field/radio-buttons/radio-buttons.component.html +2 -1
  44. package/lib/field/radio-buttons/radio-buttons.component.ts +10 -1
  45. package/lib/field/rich-text/rich-text.component.scss +1 -166
  46. package/lib/field/rich-text/rich-text.component.ts +1 -1
  47. package/lib/field/selectable-card/selectable-card.component.html +1 -0
  48. package/lib/field/selectable-card/selectable-card.component.ts +31 -16
  49. package/lib/field/semantic-link/semantic-link.component.ts +9 -5
  50. package/lib/field/text-area/text-area.component.html +2 -1
  51. package/lib/field/text-area/text-area.component.ts +2 -1
  52. package/lib/field/text-input/text-input.component.html +2 -1
  53. package/lib/field/text-input/text-input.component.ts +2 -1
  54. package/lib/field/time/time.component.html +2 -1
  55. package/lib/field/time/time.component.ts +2 -1
  56. package/lib/field/url/url.component.html +2 -1
  57. package/lib/field/url/url.component.ts +2 -1
  58. package/lib/field/user-reference/user-reference.component.html +4 -2
  59. package/lib/field/user-reference/user-reference.component.ts +10 -5
  60. package/lib/infra/Containers/flow-container/flow-container.component.ts +35 -46
  61. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +46 -50
  62. package/lib/infra/Containers/view-container/view-container.component.ts +32 -31
  63. package/lib/infra/navbar/navbar.component.ts +33 -35
  64. package/lib/infra/root-container/root-container.component.ts +33 -38
  65. package/lib/template/app-shell/app-shell.component.ts +12 -11
  66. package/lib/template/base/details-template-base.ts +2 -1
  67. package/lib/template/data-reference/data-reference.component.ts +18 -27
  68. package/lib/template/data-reference/search-form/search-form.component.ts +7 -1
  69. package/lib/template/default-form/default-form.component.html +19 -3
  70. package/lib/template/default-form/default-form.component.ts +13 -3
  71. package/lib/template/simple-table/simple-table.component.ts +6 -0
  72. package/lib/template/simple-table-manual/helpers.ts +5 -5
  73. package/lib/template/simple-table-manual/simple-table-manual.component.html +29 -11
  74. package/lib/template/simple-table-manual/simple-table-manual.component.scss +4 -2
  75. package/lib/template/simple-table-manual/simple-table-manual.component.ts +82 -24
  76. package/lib/template/single-reference-readonly/single-reference-readonly.component.html +1 -1
  77. package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +4 -0
  78. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +4 -4
  79. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +18 -20
  80. package/lib/widget/attachment/AttachmentUtils.ts +18 -10
  81. package/lib/widget/attachment/attachment.component.html +16 -6
  82. package/lib/widget/attachment/attachment.component.ts +12 -2
  83. package/lib/widget/case-history/case-history.component.ts +6 -2
  84. package/lib/widget/file-utility/file-utility.component.ts +25 -29
  85. package/lib/widget/todo/todo.component.ts +7 -2
  86. package/package.json +1 -1
@@ -10,7 +10,10 @@
10
10
  <div class="psdk-alert-icon">
11
11
  <mat-icon>{{ getMatIcon(severity) }}</mat-icon>
12
12
  </div>
13
- <div>{{ message }}</div>
13
+ <div *ngIf="messageIsHtml; else textMessage" [innerHTML]="messageText"></div>
14
+ <ng-template #textMessage>
15
+ <div>{{ messageText }}</div>
16
+ </ng-template>
14
17
  <div *ngIf="!hideClose" style="margin-left: auto">
15
18
  <button class="close-button" mat-icon-button (click)="onCloseClick()">
16
19
  <mat-icon>close</mat-icon>
@@ -1,8 +1,10 @@
1
1
  .psdk-alert {
2
- border: 1px solid;
2
+ background-color: var(--mat-sys-surface-container-high);
3
+ border: 1px solid var(--mat-sys-outline-variant);
3
4
  display: flex;
4
5
  align-items: center;
5
6
  border-radius: 4px;
7
+ color: var(--mat-sys-on-surface);
6
8
  padding: 10px;
7
9
  margin: 5px 0px;
8
10
  }
@@ -22,26 +24,23 @@
22
24
  }
23
25
 
24
26
  .psdk-grid-warning {
25
- color: var(--app-alert-warning-color);
26
- border: 1px solid var(--app-alert-warning-border-color);
27
+ border-color: var(--mat-sys-secondary);
27
28
  .mat-icon {
28
- color: var(--app-alert-warning-border-color);
29
+ color: var(--mat-sys-secondary);
29
30
  }
30
31
  }
31
32
 
32
33
  .psdk-grid-success {
33
- color: var(--app-alert-success-color);
34
- border: 1px solid var(--app-alert-success-border-color);
34
+ border-color: var(--mat-sys-tertiary);
35
35
  .mat-icon {
36
- color: var(--app-alert-success-border-color);
36
+ color: var(--mat-sys-tertiary);
37
37
  }
38
38
  }
39
39
 
40
40
  .psdk-grid-info {
41
- color: var(--app-alert-info-color);
42
- border: 1px solid var(--app-alert-info-border-color);
41
+ border-color: var(--mat-sys-primary);
43
42
  .mat-icon {
44
- color: var(--app-alert-info-border-color);
43
+ color: var(--mat-sys-primary);
45
44
  }
46
45
  }
47
46
 
@@ -9,11 +9,16 @@ import { MatIconModule } from '@angular/material/icon';
9
9
  imports: [CommonModule, MatIconModule]
10
10
  })
11
11
  export class AlertComponent {
12
- @Input() message: any[];
12
+ @Input() message: unknown;
13
+ @Input() messageIsHtml = false;
13
14
  @Input() severity;
14
15
  @Input() hideClose;
15
16
  @Output() onClose: EventEmitter<any> = new EventEmitter();
16
17
 
18
+ get messageText(): string {
19
+ return this.message == null ? '' : String(this.message);
20
+ }
21
+
17
22
  getMatIcon(severity) {
18
23
  let variant;
19
24
  switch (severity) {
@@ -36,7 +41,6 @@ export class AlertComponent {
36
41
  }
37
42
 
38
43
  onCloseClick() {
39
- alert('Close clicked');
40
44
  this.onClose.emit({ Page: 'Page', target: 'target', type: 'type' });
41
45
  }
42
46
  }
@@ -14,27 +14,36 @@
14
14
  <div class="psdk-details-fields-label">
15
15
  {{ field.config.label }}
16
16
  </div>
17
- <div [ngSwitch]="field.type.toLowerCase()" class="psdk-csf-primary-field-value">
18
- <span *ngSwitchCase="'textinput'" class="psdk-details-text-style">{{ _getValue(field.config.value) }}</span>
19
- <span *ngSwitchCase="'status'" class="psdk-details-status-style">{{ _getValue(field.config.value) }}</span>
20
- <a *ngSwitchCase="'phone'" class="psdk-primary-color" as="a" href="tel: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
21
- <a *ngSwitchCase="'email'" class="psdk-primary-color" href="mailto: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
22
- <span *ngSwitchCase="'date'" class="psdk-details-text-style">{{ _formatDate(field.config.value, field.type) }}</span>
23
- <span *ngSwitchCase="'decimal'" class="psdk-details-text-style">{{ _formatDecimal(field) }}</span>
24
- <span *ngSwitchCase="'currency'" class="psdk-details-text-style">{{ _formatCurrency(field) }}</span>
25
- <span *ngSwitchCase="'richtext'" class="psdk-details-text-style" [innerHTML]="_getValue(field.config.value)"></span>
26
- <ng-container *ngSwitchCase="'scalarlist'">
27
- <span *ngIf="field.config.componentType?.toLowerCase() === 'decimal'" class="psdk-details-text-style">{{ _formatDecimal(field) }}</span>
28
- <span *ngIf="field.config.componentType?.toLowerCase() === 'currency'" class="psdk-details-text-style">{{ _formatCurrency(field) }}</span>
29
- <span
30
- *ngIf="field.config.componentType?.toLowerCase() !== 'decimal' && field.config.componentType?.toLowerCase() !== 'currency'"
31
- class="psdk-details-text-style"
32
- >{{ _getValue(field.config.value) }}</span
33
- >
34
- </ng-container>
35
- <span *ngSwitchCase="'caseoperator'"></span>
36
- <span *ngSwitchDefault>{{ _getValue(field.config.value, field) }}</span>
37
- </div>
17
+ <ng-container *ngIf="field.type.toLowerCase() === 'objectreference'; else standardFieldValue">
18
+ <div>
19
+ <component-mapper name="ObjectReference" [props]="{ pConn$: field.pConn, isDetails$: true }"></component-mapper>
20
+ </div>
21
+ </ng-container>
22
+ <ng-template #standardFieldValue>
23
+ <div [ngSwitch]="field.type.toLowerCase()" class="psdk-csf-primary-field-value">
24
+ <span *ngSwitchCase="'textinput'" class="psdk-details-text-style">{{ _getValue(field.config.value) }}</span>
25
+ <span *ngSwitchCase="'status'" class="psdk-details-status-style">{{ _getValue(field.config.value) }}</span>
26
+ <a *ngSwitchCase="'phone'" class="psdk-primary-color" as="a" href="tel: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
27
+ <a *ngSwitchCase="'email'" class="psdk-primary-color" href="mailto: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
28
+ <span *ngSwitchCase="'date'" class="psdk-details-text-style">{{ _formatDate(field.config.value, field.type) }}</span>
29
+ <span *ngSwitchCase="'decimal'" class="psdk-details-text-style">{{ _formatDecimal(field) }}</span>
30
+ <span *ngSwitchCase="'currency'" class="psdk-details-text-style">{{ _formatCurrency(field) }}</span>
31
+ <span *ngSwitchCase="'richtext'" class="psdk-details-text-style" [innerHTML]="_getValue(field.config.value)"></span>
32
+ <ng-container *ngSwitchCase="'scalarlist'">
33
+ <span *ngIf="field.config.componentType?.toLowerCase() === 'decimal'" class="psdk-details-text-style">{{ _formatDecimal(field) }}</span>
34
+ <span *ngIf="field.config.componentType?.toLowerCase() === 'currency'" class="psdk-details-text-style">{{
35
+ _formatCurrency(field)
36
+ }}</span>
37
+ <span
38
+ *ngIf="field.config.componentType?.toLowerCase() !== 'decimal' && field.config.componentType?.toLowerCase() !== 'currency'"
39
+ class="psdk-details-text-style"
40
+ >{{ _getValue(field.config.value) }}</span
41
+ >
42
+ </ng-container>
43
+ <span *ngSwitchCase="'caseoperator'"></span>
44
+ <span *ngSwitchDefault>{{ _getValue(field.config.value, field) }}</span>
45
+ </div>
46
+ </ng-template>
38
47
  </div>
39
48
  </ng-template>
40
49
  </div>
@@ -112,7 +112,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
112
112
  ];
113
113
 
114
114
  this.bShowPopover$ = true;
115
- this.cdRef.detectChanges();
115
+ this.cdRef.markForCheck();
116
116
  } else {
117
117
  console.log(
118
118
  `Operator: PCore.getUserApi().getOperatorDetails(${this.id$}); returned empty res.data.pyOperatorInfo.pyUserName - adding default`
@@ -144,6 +144,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
144
144
  value: fillerString
145
145
  }
146
146
  ];
147
+ this.cdRef.markForCheck();
147
148
  }
148
149
  });
149
150
  }
@@ -2,16 +2,110 @@
2
2
  <label [ngClass]="{ 'label-required': required === true }" class="rich-text-label">{{ label }}</label>
3
3
 
4
4
  <div class="rich-text-editor" *ngIf="!readonly">
5
- <editor
6
- [formControl]="richText"
7
- [attr.disabled]="disabled"
8
- [initialValue]="value"
9
- [init]="editorConfig"
10
- (onBlur)="blur()"
11
- (onChange)="change($event)"
12
- ></editor>
13
-
14
- <p *ngIf="richText.invalid" [ngClass]="'text-editor-error'">{{ info }}</p>
5
+ <div
6
+ class="tiptap-container"
7
+ [class.disabled]="disabled"
8
+ [class.tiptap-container-invalid]="richText.invalid && (error || richText.touched || richText.dirty)"
9
+ >
10
+ <div #editorEl class="tiptap-editor-area" [attr.aria-invalid]="richText.invalid && (error || richText.touched || richText.dirty)"></div>
11
+
12
+ <div class="tiptap-toolbar" *ngIf="!disabled" (mousedown)="$event.preventDefault()">
13
+ <mat-form-field class="tiptap-block-select" appearance="outline" subscriptSizing="dynamic">
14
+ <mat-select [value]="currentBlock" (selectionChange)="setBlock($event.value)" aria-label="Text block type">
15
+ <mat-option value="paragraph">Paragraph</mat-option>
16
+ <mat-option value="h1">Heading 1</mat-option>
17
+ <mat-option value="h2">Heading 2</mat-option>
18
+ <mat-option value="h3">Heading 3</mat-option>
19
+ </mat-select>
20
+ </mat-form-field>
21
+
22
+ <span class="tiptap-sep"></span>
23
+
24
+ <button
25
+ mat-icon-button
26
+ type="button"
27
+ class="tiptap-btn"
28
+ [class.active]="isActive('bold')"
29
+ (click)="toggleBold()"
30
+ title="Bold"
31
+ aria-label="Bold"
32
+ >
33
+ <mat-icon>format_bold</mat-icon>
34
+ </button>
35
+ <button
36
+ mat-icon-button
37
+ type="button"
38
+ class="tiptap-btn"
39
+ [class.active]="isActive('italic')"
40
+ (click)="toggleItalic()"
41
+ title="Italic"
42
+ aria-label="Italic"
43
+ >
44
+ <mat-icon>format_italic</mat-icon>
45
+ </button>
46
+ <button
47
+ mat-icon-button
48
+ type="button"
49
+ class="tiptap-btn"
50
+ [class.active]="isActive('strike')"
51
+ (click)="toggleStrike()"
52
+ title="Strikethrough"
53
+ aria-label="Strikethrough"
54
+ >
55
+ <mat-icon>strikethrough_s</mat-icon>
56
+ </button>
57
+
58
+ <span class="tiptap-sep"></span>
59
+
60
+ <button
61
+ mat-icon-button
62
+ type="button"
63
+ class="tiptap-btn"
64
+ [class.active]="isActive('bulletList')"
65
+ (click)="toggleBulletList()"
66
+ title="Bulleted list"
67
+ aria-label="Bulleted list"
68
+ >
69
+ <mat-icon>format_list_bulleted</mat-icon>
70
+ </button>
71
+ <button
72
+ mat-icon-button
73
+ type="button"
74
+ class="tiptap-btn"
75
+ [class.active]="isActive('orderedList')"
76
+ (click)="toggleOrderedList()"
77
+ title="Numbered list"
78
+ aria-label="Numbered list"
79
+ >
80
+ <mat-icon>format_list_numbered</mat-icon>
81
+ </button>
82
+ <button mat-icon-button type="button" class="tiptap-btn" (click)="outdent()" title="Decrease indent" aria-label="Decrease indent">
83
+ <mat-icon>format_indent_decrease</mat-icon>
84
+ </button>
85
+ <button mat-icon-button type="button" class="tiptap-btn" (click)="indent()" title="Increase indent" aria-label="Increase indent">
86
+ <mat-icon>format_indent_increase</mat-icon>
87
+ </button>
88
+
89
+ <span class="tiptap-sep"></span>
90
+
91
+ <button
92
+ mat-icon-button
93
+ type="button"
94
+ class="tiptap-btn"
95
+ [class.active]="isActive('link')"
96
+ (click)="addLink()"
97
+ title="Insert link"
98
+ aria-label="Insert link"
99
+ >
100
+ <mat-icon>link</mat-icon>
101
+ </button>
102
+ <button mat-icon-button type="button" class="tiptap-btn" (click)="addImage()" title="Insert image" aria-label="Insert image">
103
+ <mat-icon>image</mat-icon>
104
+ </button>
105
+ </div>
106
+ </div>
107
+
108
+ <p *ngIf="richText.invalid && (error || richText.touched || richText.dirty)" [ngClass]="'text-editor-error'">{{ info }}</p>
15
109
  </div>
16
110
 
17
111
  <div *ngIf="readonly">
@@ -14,5 +14,145 @@
14
14
  }
15
15
 
16
16
  .text-editor-error {
17
- color: var(--app-error-light-color);
17
+ margin: 4px 0 0;
18
+ color: var(--mat-sys-error, var(--app-error-light-color, #ba1a1a));
19
+ }
20
+
21
+ .tiptap-container {
22
+ display: flex;
23
+ flex-direction: column;
24
+ border: 1px solid var(--mat-sys-outline, #ccc);
25
+ border-radius: 4px;
26
+ overflow: hidden;
27
+ background-color: transparent;
28
+
29
+ &.tiptap-container-invalid {
30
+ border-color: var(--mat-sys-error, var(--app-error-light-color, #ba1a1a));
31
+ }
32
+
33
+ &.disabled {
34
+ opacity: 0.6;
35
+ pointer-events: none;
36
+ }
37
+ }
38
+
39
+ .tiptap-editor-area {
40
+ min-height: 130px;
41
+ padding: 8px 12px;
42
+ color: var(--mat-sys-on-surface, #000);
43
+ font-family: Helvetica, Arial, sans-serif;
44
+ font-size: 14px;
45
+ outline: none;
46
+ background: var(--mat-sys-surface, #fff);
47
+
48
+ ::ng-deep .ProseMirror {
49
+ min-height: 130px;
50
+ outline: none;
51
+
52
+ > * + * {
53
+ margin-top: 0.5em;
54
+ }
55
+
56
+ ul,
57
+ ol {
58
+ padding-left: 1.25rem;
59
+ }
60
+
61
+ a {
62
+ color: var(--mat-sys-primary, #6200ee);
63
+ text-decoration: underline;
64
+ }
65
+
66
+ img {
67
+ max-width: 100%;
68
+ height: auto;
69
+ }
70
+ }
71
+
72
+ ::ng-deep .ProseMirror p.is-editor-empty:first-child::before {
73
+ content: attr(data-placeholder);
74
+ float: left;
75
+ color: var(--mat-sys-on-surface-variant, #888);
76
+ pointer-events: none;
77
+ height: 0;
78
+ }
79
+ }
80
+
81
+ .tiptap-toolbar {
82
+ display: flex;
83
+ flex-wrap: wrap;
84
+ align-items: center;
85
+ gap: 4px;
86
+ min-height: 56px;
87
+ padding: 5px 12px;
88
+ background-color: var(--mat-sys-surface-container-high, #f0f0f0);
89
+ border-top: 1px solid var(--mat-sys-outline-variant, #ccc);
90
+ }
91
+
92
+ .tiptap-block-select {
93
+ width: 176px;
94
+ margin: 0;
95
+
96
+ ::ng-deep .mat-mdc-form-field-subscript-wrapper {
97
+ display: none;
98
+ }
99
+
100
+ ::ng-deep .mat-mdc-text-field-wrapper {
101
+ height: 40px;
102
+ }
103
+
104
+ ::ng-deep .mat-mdc-form-field-flex,
105
+ ::ng-deep .mat-mdc-form-field-infix {
106
+ min-height: 40px;
107
+ height: 40px;
108
+ }
109
+
110
+ ::ng-deep .mat-mdc-form-field-infix {
111
+ padding-left: 8px;
112
+ padding-right: 8px;
113
+ padding-top: 8px;
114
+ padding-bottom: 8px;
115
+ }
116
+ }
117
+
118
+ .tiptap-btn {
119
+ background: transparent;
120
+ border: none;
121
+ color: var(--mat-sys-on-surface-variant, #555);
122
+ cursor: pointer;
123
+ width: 40px;
124
+ height: 40px;
125
+ padding: 8px;
126
+ border-radius: 4px;
127
+ line-height: 1;
128
+
129
+ ::ng-deep .mat-icon {
130
+ width: 22px;
131
+ height: 22px;
132
+ font-size: 22px;
133
+ line-height: 22px;
134
+ }
135
+
136
+ &:hover {
137
+ background: var(--mat-sys-hover-state-layer-opacity, rgba(0, 0, 0, 0.05));
138
+ }
139
+
140
+ &.active {
141
+ background: var(--mat-sys-secondary-container, #e8def8);
142
+ color: var(--mat-sys-on-secondary-container, #1d192b);
143
+ }
144
+ }
145
+
146
+ .tiptap-sep {
147
+ width: 1px;
148
+ height: 24px;
149
+ background: var(--mat-sys-outline-variant, #ccc);
150
+ margin: 0 4px;
151
+ }
152
+
153
+ .readonly-richtext-editor {
154
+ ::ng-deep img {
155
+ max-width: 100%;
156
+ height: auto;
157
+ }
18
158
  }