@pega/angular-sdk-overrides 25.1.13 → 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.
- package/lib/designSystemExtension/alert/alert.component.html +4 -1
- package/lib/designSystemExtension/alert/alert.component.scss +9 -10
- package/lib/designSystemExtension/alert/alert.component.ts +6 -2
- package/lib/designSystemExtension/field-group/field-group.component.ts +11 -3
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +51 -36
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +12 -0
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +11 -0
- package/lib/designSystemExtension/operator/operator.component.html +5 -3
- package/lib/designSystemExtension/operator/operator.component.scss +7 -0
- package/lib/designSystemExtension/operator/operator.component.ts +2 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +100 -10
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +141 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +1 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +240 -72
- package/lib/field/auto-complete/auto-complete.component.html +46 -5
- package/lib/field/auto-complete/auto-complete.component.scss +92 -0
- package/lib/field/auto-complete/auto-complete.component.ts +350 -23
- package/lib/field/cancel-alert/cancel-alert.component.ts +38 -15
- package/lib/field/check-box/check-box.component.html +8 -6
- package/lib/field/check-box/check-box.component.ts +9 -2
- package/lib/field/currency/currency.component.html +2 -1
- package/lib/field/currency/currency.component.ts +10 -1
- package/lib/field/date/date.component.html +2 -1
- package/lib/field/date/date.component.ts +2 -0
- package/lib/field/date-time/date-time.component.html +2 -1
- package/lib/field/date-time/date-time.component.scss +46 -40
- package/lib/field/date-time/date-time.component.ts +29 -0
- package/lib/field/decimal/decimal.component.html +2 -1
- package/lib/field/decimal/decimal.component.ts +2 -0
- package/lib/field/dropdown/dropdown.component.html +4 -1
- package/lib/field/dropdown/dropdown.component.ts +18 -19
- package/lib/field/email/email.component.html +2 -1
- package/lib/field/email/email.component.ts +2 -2
- package/lib/field/embedded-data-multi/embedded-data-multi.component.html +3 -0
- package/lib/field/embedded-data-multi/embedded-data-multi.component.scss +0 -0
- package/lib/field/embedded-data-multi/embedded-data-multi.component.ts +173 -0
- package/lib/field/field.base.ts +27 -1
- package/lib/field/group/group.component.html +1 -1
- package/lib/field/group/group.component.ts +15 -5
- package/lib/field/integer/integer.component.html +2 -1
- package/lib/field/integer/integer.component.ts +4 -2
- package/lib/field/location/location.component.html +2 -1
- package/lib/field/location/location.component.ts +3 -1
- package/lib/field/multiselect/multiselect.component.html +1 -1
- package/lib/field/multiselect/multiselect.component.ts +23 -4
- package/lib/field/multiselect/utils.ts +5 -3
- package/lib/field/object-reference/object-reference.component.html +30 -15
- package/lib/field/object-reference/object-reference.component.ts +818 -94
- package/lib/field/percentage/percentage.component.html +2 -1
- package/lib/field/percentage/percentage.component.ts +10 -1
- package/lib/field/phone/phone.component.html +2 -1
- package/lib/field/phone/phone.component.ts +2 -1
- package/lib/field/radio-buttons/radio-buttons.component.html +2 -1
- package/lib/field/radio-buttons/radio-buttons.component.ts +10 -1
- package/lib/field/rich-text/rich-text.component.scss +1 -166
- package/lib/field/rich-text/rich-text.component.spec.ts +1 -1
- package/lib/field/rich-text/rich-text.component.ts +1 -1
- package/lib/field/selectable-card/selectable-card.component.html +1 -0
- package/lib/field/selectable-card/selectable-card.component.ts +31 -16
- package/lib/field/semantic-link/semantic-link.component.html +1 -1
- package/lib/field/semantic-link/semantic-link.component.scss +4 -0
- package/lib/field/semantic-link/semantic-link.component.ts +13 -7
- package/lib/field/text-area/text-area.component.html +2 -1
- package/lib/field/text-area/text-area.component.ts +2 -1
- package/lib/field/text-input/text-input.component.html +2 -1
- package/lib/field/text-input/text-input.component.ts +2 -1
- package/lib/field/time/time.component.html +2 -1
- package/lib/field/time/time.component.ts +2 -1
- package/lib/field/url/url.component.html +2 -1
- package/lib/field/url/url.component.ts +2 -1
- package/lib/field/user-reference/user-reference.component.html +4 -2
- package/lib/field/user-reference/user-reference.component.ts +11 -6
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +35 -46
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.html +12 -0
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.spec.ts +130 -0
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.ts +77 -0
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +35 -8
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +185 -194
- package/lib/infra/Containers/view-container/view-container.component.ts +32 -35
- package/lib/infra/assignment/assignment.component.html +2 -1
- package/lib/infra/assignment/assignment.component.ts +42 -15
- package/lib/infra/defer-load/defer-load.component.ts +6 -3
- package/lib/infra/multi-step/multi-step.component.html +25 -33
- package/lib/infra/multi-step/multi-step.component.scss +67 -125
- package/lib/infra/multi-step/multi-step.component.ts +11 -0
- package/lib/infra/navbar/navbar.component.ts +33 -36
- package/lib/infra/reference/reference.component.ts +1 -2
- package/lib/infra/root-container/root-container.component.ts +33 -38
- package/lib/infra/view/view.component.ts +21 -40
- package/lib/template/advanced-search/advanced-search.component.ts +0 -1
- package/lib/template/advanced-search/search-groups/search-groups.component.ts +2 -3
- package/lib/template/app-shell/app-shell.component.ts +13 -13
- package/lib/template/base/details-template-base.ts +41 -14
- package/lib/template/case-summary/case-summary.component.ts +15 -1
- package/lib/template/case-view/case-view.component.html +13 -1
- package/lib/template/case-view/case-view.component.spec.ts +119 -10
- package/lib/template/case-view/case-view.component.ts +52 -3
- package/lib/template/data-reference/data-reference.component.ts +2 -4
- package/lib/template/data-reference/search-form/search-form.component.html +1 -1
- package/lib/template/data-reference/search-form/search-form.component.ts +9 -1
- package/lib/template/data-reference/search-form/tabsData.ts +0 -1
- package/lib/template/default-form/default-form.component.html +19 -3
- package/lib/template/default-form/default-form.component.ts +13 -3
- package/lib/template/details/details.component.html +23 -3
- package/lib/template/details/details.component.scss +9 -2
- package/lib/template/details/details.component.ts +3 -70
- package/lib/template/details-narrow-wide/details-narrow-wide.component.html +21 -2
- package/lib/template/details-narrow-wide/details-narrow-wide.component.scss +8 -1
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +3 -39
- package/lib/template/details-one-column/details-one-column.component.html +23 -1
- package/lib/template/details-one-column/details-one-column.component.scss +14 -0
- package/lib/template/details-one-column/details-one-column.component.ts +3 -40
- package/lib/template/details-three-column/details-three-column.component.html +21 -2
- package/lib/template/details-three-column/details-three-column.component.scss +8 -1
- package/lib/template/details-three-column/details-three-column.component.ts +3 -48
- package/lib/template/details-two-column/details-two-column.component.html +21 -2
- package/lib/template/details-two-column/details-two-column.component.scss +8 -1
- package/lib/template/details-two-column/details-two-column.component.ts +3 -46
- package/lib/template/details-wide-narrow/details-wide-narrow.component.html +21 -2
- package/lib/template/details-wide-narrow/details-wide-narrow.component.scss +8 -1
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +3 -43
- package/lib/template/field-group-template/field-group-template.component.ts +19 -6
- package/lib/template/field-value-list/field-value-list.component.scss +17 -0
- package/lib/template/list-view/list-view.component.ts +47 -11
- package/lib/template/self-service-case-view/self-service-case-view.component.html +13 -1
- package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +96 -11
- package/lib/template/self-service-case-view/self-service-case-view.component.ts +52 -3
- package/lib/template/simple-table/simple-table.component.ts +6 -0
- package/lib/template/simple-table-manual/helpers.ts +84 -16
- package/lib/template/simple-table-manual/simple-table-manual.component.html +30 -14
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +8 -2
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +131 -43
- package/lib/template/single-reference-readonly/single-reference-readonly.component.html +0 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +2 -3
- package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +7 -8
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +19 -21
- package/lib/widget/attachment/AttachmentUtils.ts +19 -11
- package/lib/widget/attachment/attachment.component.html +16 -6
- package/lib/widget/attachment/attachment.component.ts +14 -4
- package/lib/widget/case-history/case-history.component.ts +6 -2
- package/lib/widget/feed-container/feed-container.component.ts +1 -199
- package/lib/widget/file-utility/file-utility.component.ts +26 -30
- package/lib/widget/todo/todo.component.ts +7 -2
- package/package.json +2 -2
- package/lib/designSystemExtension/material-details/material-details.component.html +0 -40
- package/lib/designSystemExtension/material-details/material-details.component.scss +0 -116
- package/lib/designSystemExtension/material-details/material-details.component.spec.ts +0 -24
- package/lib/designSystemExtension/material-details/material-details.component.ts +0 -31
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +0 -29
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +0 -34
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts +0 -22
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +0 -37
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
<div class="psdk-alert-icon">
|
|
11
11
|
<mat-icon>{{ getMatIcon(severity) }}</mat-icon>
|
|
12
12
|
</div>
|
|
13
|
-
<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
|
-
|
|
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(--
|
|
26
|
-
border: 1px solid var(--app-alert-warning-border-color);
|
|
27
|
+
border-color: var(--mat-sys-secondary);
|
|
27
28
|
.mat-icon {
|
|
28
|
-
color: var(--
|
|
29
|
+
color: var(--mat-sys-secondary);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.psdk-grid-success {
|
|
33
|
-
color: var(--
|
|
34
|
-
border: 1px solid var(--app-alert-success-border-color);
|
|
34
|
+
border-color: var(--mat-sys-tertiary);
|
|
35
35
|
.mat-icon {
|
|
36
|
-
color: var(--
|
|
36
|
+
color: var(--mat-sys-tertiary);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.psdk-grid-info {
|
|
41
|
-
color: var(--
|
|
42
|
-
border: 1px solid var(--app-alert-info-border-color);
|
|
41
|
+
border-color: var(--mat-sys-primary);
|
|
43
42
|
.mat-icon {
|
|
44
|
-
color: var(--
|
|
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:
|
|
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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, Input, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Component, Input, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
3
3
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
4
4
|
import { MatIconModule } from '@angular/material/icon';
|
|
5
5
|
|
|
@@ -9,14 +9,22 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
9
9
|
styleUrls: ['./field-group.component.scss'],
|
|
10
10
|
imports: [CommonModule, MatGridListModule, MatIconModule]
|
|
11
11
|
})
|
|
12
|
-
export class FieldGroupComponent {
|
|
12
|
+
export class FieldGroupComponent implements OnChanges {
|
|
13
13
|
@Input() name?: string;
|
|
14
|
-
@Input()
|
|
14
|
+
@Input() collapseOnLoad: 'none' | 'expanded' | 'collapsed' = 'none';
|
|
15
15
|
@Input() instructions: string;
|
|
16
16
|
@Input() childrenTemplate: TemplateRef<any>;
|
|
17
17
|
|
|
18
|
+
collapsible = false;
|
|
18
19
|
collapsed = false;
|
|
19
20
|
|
|
21
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
22
|
+
if (changes['collapseOnLoad']) {
|
|
23
|
+
this.collapsible = this.collapseOnLoad !== 'none';
|
|
24
|
+
this.collapsed = this.collapseOnLoad === 'collapsed';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
headerClickHandler() {
|
|
21
29
|
this.collapsed = !this.collapsed;
|
|
22
30
|
}
|
package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html
CHANGED
|
@@ -1,58 +1,73 @@
|
|
|
1
1
|
<div class="psdk-case-summary-fields">
|
|
2
2
|
<dl class="psdk-case-summary-fields-primary">
|
|
3
3
|
<div *ngFor="let field of primaryFieldsWithStatus$" class="psdk-csf-primary-field">
|
|
4
|
-
<dt
|
|
4
|
+
<dt
|
|
5
|
+
*ngIf="
|
|
6
|
+
field.type.toLowerCase() !== 'objectreference' && field.type.toLowerCase() !== 'reference' && field.type.toLowerCase() !== 'caseoperator'
|
|
7
|
+
"
|
|
8
|
+
class="psdk-csf-primary-field-header"
|
|
9
|
+
>
|
|
5
10
|
{{ field.config?.label }}
|
|
6
11
|
</dt>
|
|
7
|
-
<dd
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
<dd class="psdk-csf-primary-field-data" [ngSwitch]="field.type.toLowerCase()">
|
|
13
|
+
<span *ngSwitchCase="'textinput'" class="psdk-csf-text-style">{{ field.config.value || '---' }}</span>
|
|
14
|
+
<span *ngSwitchCase="'status'" class="psdk-csf-status-style">{{ field.config.value || '---' }}</span>
|
|
15
|
+
<a *ngSwitchCase="'phone'" class="psdk-primary-color" as="a" href="tel: {{ field.config.value }}">{{ field.config.value || '---' }}</a>
|
|
16
|
+
<a *ngSwitchCase="'email'" class="psdk-primary-color" href="mailto: {{ field.config.value }}">{{ field.config.value || '---' }}</a>
|
|
17
|
+
<span *ngSwitchCase="'date'" class="psdk-csf-text-style">{{ field.config.value || '---' }}</span>
|
|
18
|
+
<div class="psdk-case-summary-operator" *ngSwitchCase="'caseoperator'">
|
|
19
|
+
<component-mapper
|
|
20
|
+
name="Operator"
|
|
21
|
+
[props]="{ pConn$: field?.kid, displayLabel: field?.displayLabel || field?.config.displayLabel }"
|
|
22
|
+
></component-mapper>
|
|
23
|
+
</div>
|
|
24
|
+
<div *ngSwitchCase="'objectreference'">
|
|
25
|
+
<component-mapper name="ObjectReference" [props]="{ pConn$: field.kid }"></component-mapper>
|
|
26
|
+
</div>
|
|
27
|
+
<div *ngSwitchCase="'reference'" class="psdk-csf-object-reference-value">
|
|
28
|
+
<component-mapper name="reference" [props]="{ pConn$: field.kid }"></component-mapper>
|
|
29
|
+
</div>
|
|
30
|
+
<span *ngSwitchDefault class="psdk-csf-text-style">{{ field.config.value || '---' }}</span>
|
|
12
31
|
</dd>
|
|
13
|
-
<ng-template #hasValue>
|
|
14
|
-
<dd class="psdk-csf-primary-field-data" [ngSwitch]="field.type.toLowerCase()">
|
|
15
|
-
<span *ngSwitchCase="'textinput'" class="psdk-csf-text-style">{{ field.config.value }}</span>
|
|
16
|
-
<span *ngSwitchCase="'status'" class="psdk-csf-status-style">{{ field.config.value }}</span>
|
|
17
|
-
<a *ngSwitchCase="'phone'" class="psdk-primary-color" as="a" href="tel: {{ field.config.value }}">{{ field.config.value }}</a>
|
|
18
|
-
<a *ngSwitchCase="'email'" class="psdk-primary-color" href="mailto: {{ field.config.value }}">{{ field.config.value }}</a>
|
|
19
|
-
<span *ngSwitchCase="'date'" class="psdk-csf-text-style">{{ field.config.value }}</span>
|
|
20
|
-
<label *ngSwitchCase="'caseoperator'">operator</label>
|
|
21
|
-
<span *ngSwitchDefault class="psdk-csf-text-style">{{ field.config.value }}</span>
|
|
22
|
-
</dd>
|
|
23
|
-
</ng-template>
|
|
24
32
|
</div>
|
|
25
33
|
</dl>
|
|
26
34
|
</div>
|
|
27
35
|
<div class="psdk-case-summary-fields">
|
|
28
36
|
<dl *ngFor="let field of secondaryFields$" class="psdk-case-summary-fields-secondary">
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
@if (
|
|
38
|
+
field?.config?.label?.toLowerCase() == 'create operator' ||
|
|
39
|
+
field?.displayLabel?.toLowerCase() == 'create operator' ||
|
|
40
|
+
field?.config?.label?.toLowerCase() == 'update operator' ||
|
|
41
|
+
field?.displayLabel?.toLowerCase() == 'update operator'
|
|
42
|
+
) {
|
|
43
|
+
<div>
|
|
44
|
+
<component-mapper
|
|
45
|
+
name="Operator"
|
|
46
|
+
[props]="{ pConn$: field?.kid, displayLabel: field?.displayLabel || field?.config.displayLabel }"
|
|
47
|
+
></component-mapper>
|
|
48
|
+
</div>
|
|
49
|
+
} @else if (field.type.toLowerCase() === 'objectreference') {
|
|
50
|
+
<div class="psdk-csf-object-reference-value">
|
|
51
|
+
<component-mapper name="ObjectReference" [props]="{ pConn$: field.kid, displayMode: 'DISPLAY_ONLY', hideLabel: true }"></component-mapper>
|
|
52
|
+
</div>
|
|
53
|
+
} @else if (field.type.toLowerCase() === 'reference') {
|
|
54
|
+
<div class="psdk-csf-object-reference-value">
|
|
55
|
+
<component-mapper name="reference" [props]="{ pConn$: field.kid }"></component-mapper>
|
|
56
|
+
</div>
|
|
57
|
+
} @else {
|
|
44
58
|
<div class="psdk-csf-secondary-field">
|
|
45
59
|
<dt class="psdk-csf-secondary-field-header">
|
|
46
60
|
{{ field.config?.displayLabel || field.config?.label }}
|
|
47
61
|
</dt>
|
|
62
|
+
|
|
48
63
|
<dd class="psdk-csf-secondary-field-data">
|
|
49
|
-
<div [ngSwitch]="field.type">
|
|
50
|
-
<label *ngSwitchCase="'
|
|
51
|
-
<label *ngSwitchCase="'
|
|
64
|
+
<div [ngSwitch]="field.type.toLowerCase()">
|
|
65
|
+
<label *ngSwitchCase="'userreference'" class="psdk-secondary-value">{{ field.config.value.userName || '---' }}</label>
|
|
66
|
+
<label *ngSwitchCase="'checkbox'" class="psdk-secondary-value">{{ field.config.falseLabel || '---' }}</label>
|
|
52
67
|
<label *ngSwitchDefault class="psdk-secondary-value">{{ field.config.value || '---' }}</label>
|
|
53
68
|
</div>
|
|
54
69
|
</dd>
|
|
55
70
|
</div>
|
|
56
|
-
|
|
71
|
+
}
|
|
57
72
|
</dl>
|
|
58
73
|
</div>
|
package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss
CHANGED
|
@@ -110,3 +110,15 @@ span.psdk-csf-status-style {
|
|
|
110
110
|
.psdk-primary-color {
|
|
111
111
|
color: var(--mat-sys-primary);
|
|
112
112
|
}
|
|
113
|
+
|
|
114
|
+
.psdk-case-summary-operator {
|
|
115
|
+
::ng-deep .psdk-operator {
|
|
116
|
+
flex-direction: column !important;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.psdk-csf-object-reference-value {
|
|
121
|
+
::ng-deep .psdk-grid-label {
|
|
122
|
+
font-size: 0.8125rem !important;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -53,6 +53,17 @@ export class MaterialCaseSummaryComponent implements OnInit, OnChanges {
|
|
|
53
53
|
case 'checkbox':
|
|
54
54
|
field.config.displayLabel = field.config.caption;
|
|
55
55
|
break;
|
|
56
|
+
case 'reference': {
|
|
57
|
+
const referenceLabel = field.kid.getInheritedProps()?.label;
|
|
58
|
+
if (referenceLabel) {
|
|
59
|
+
field.config.label = referenceLabel;
|
|
60
|
+
}
|
|
61
|
+
field.kid.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case 'objectreference':
|
|
65
|
+
field.kid.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
66
|
+
break;
|
|
56
67
|
default:
|
|
57
68
|
break;
|
|
58
69
|
}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
<div class="psdk-label">
|
|
3
3
|
{{ label$ }}
|
|
4
4
|
</div>
|
|
5
|
-
<div class="psdk-
|
|
6
|
-
<
|
|
5
|
+
<div class="psdk-operator-details">
|
|
6
|
+
<div class="psdk-double">
|
|
7
|
+
<button mat-button color="primary" style="text-decoration: underline" (click)="showOperator()">{{ name$ }}</button>
|
|
8
|
+
</div>
|
|
9
|
+
<div>{{ date$ }}</div>
|
|
7
10
|
</div>
|
|
8
|
-
<div>{{ date$ }}</div>
|
|
9
11
|
</div>
|
|
10
12
|
|
|
11
13
|
<div>
|
|
@@ -112,7 +112,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
112
112
|
];
|
|
113
113
|
|
|
114
114
|
this.bShowPopover$ = true;
|
|
115
|
-
this.cdRef.
|
|
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,106 @@
|
|
|
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
|
-
<
|
|
6
|
-
[
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
<div class="tiptap-container" [class.disabled]="disabled" [class.tiptap-container-invalid]="showError">
|
|
6
|
+
<div #editorEl class="tiptap-editor-area" [attr.aria-invalid]="showError"></div>
|
|
7
|
+
|
|
8
|
+
<div class="tiptap-toolbar" *ngIf="!disabled" (mousedown)="$event.preventDefault()">
|
|
9
|
+
<mat-form-field class="tiptap-block-select" appearance="outline" subscriptSizing="dynamic">
|
|
10
|
+
<mat-select [value]="currentBlock" (selectionChange)="setBlock($event.value)" aria-label="Text block type">
|
|
11
|
+
<mat-option value="paragraph">Paragraph</mat-option>
|
|
12
|
+
<mat-option value="h1">Heading 1</mat-option>
|
|
13
|
+
<mat-option value="h2">Heading 2</mat-option>
|
|
14
|
+
<mat-option value="h3">Heading 3</mat-option>
|
|
15
|
+
</mat-select>
|
|
16
|
+
</mat-form-field>
|
|
17
|
+
|
|
18
|
+
<span class="tiptap-sep"></span>
|
|
19
|
+
|
|
20
|
+
<button
|
|
21
|
+
mat-icon-button
|
|
22
|
+
type="button"
|
|
23
|
+
class="tiptap-btn"
|
|
24
|
+
[class.active]="isActive('bold')"
|
|
25
|
+
(click)="toggleBold()"
|
|
26
|
+
title="Bold"
|
|
27
|
+
aria-label="Bold"
|
|
28
|
+
>
|
|
29
|
+
<mat-icon>format_bold</mat-icon>
|
|
30
|
+
</button>
|
|
31
|
+
<button
|
|
32
|
+
mat-icon-button
|
|
33
|
+
type="button"
|
|
34
|
+
class="tiptap-btn"
|
|
35
|
+
[class.active]="isActive('italic')"
|
|
36
|
+
(click)="toggleItalic()"
|
|
37
|
+
title="Italic"
|
|
38
|
+
aria-label="Italic"
|
|
39
|
+
>
|
|
40
|
+
<mat-icon>format_italic</mat-icon>
|
|
41
|
+
</button>
|
|
42
|
+
<button
|
|
43
|
+
mat-icon-button
|
|
44
|
+
type="button"
|
|
45
|
+
class="tiptap-btn"
|
|
46
|
+
[class.active]="isActive('strike')"
|
|
47
|
+
(click)="toggleStrike()"
|
|
48
|
+
title="Strikethrough"
|
|
49
|
+
aria-label="Strikethrough"
|
|
50
|
+
>
|
|
51
|
+
<mat-icon>strikethrough_s</mat-icon>
|
|
52
|
+
</button>
|
|
53
|
+
|
|
54
|
+
<span class="tiptap-sep"></span>
|
|
55
|
+
|
|
56
|
+
<button
|
|
57
|
+
mat-icon-button
|
|
58
|
+
type="button"
|
|
59
|
+
class="tiptap-btn"
|
|
60
|
+
[class.active]="isActive('bulletList')"
|
|
61
|
+
(click)="toggleBulletList()"
|
|
62
|
+
title="Bulleted list"
|
|
63
|
+
aria-label="Bulleted list"
|
|
64
|
+
>
|
|
65
|
+
<mat-icon>format_list_bulleted</mat-icon>
|
|
66
|
+
</button>
|
|
67
|
+
<button
|
|
68
|
+
mat-icon-button
|
|
69
|
+
type="button"
|
|
70
|
+
class="tiptap-btn"
|
|
71
|
+
[class.active]="isActive('orderedList')"
|
|
72
|
+
(click)="toggleOrderedList()"
|
|
73
|
+
title="Numbered list"
|
|
74
|
+
aria-label="Numbered list"
|
|
75
|
+
>
|
|
76
|
+
<mat-icon>format_list_numbered</mat-icon>
|
|
77
|
+
</button>
|
|
78
|
+
<button mat-icon-button type="button" class="tiptap-btn" (click)="outdent()" title="Decrease indent" aria-label="Decrease indent">
|
|
79
|
+
<mat-icon>format_indent_decrease</mat-icon>
|
|
80
|
+
</button>
|
|
81
|
+
<button mat-icon-button type="button" class="tiptap-btn" (click)="indent()" title="Increase indent" aria-label="Increase indent">
|
|
82
|
+
<mat-icon>format_indent_increase</mat-icon>
|
|
83
|
+
</button>
|
|
84
|
+
|
|
85
|
+
<span class="tiptap-sep"></span>
|
|
86
|
+
|
|
87
|
+
<button
|
|
88
|
+
mat-icon-button
|
|
89
|
+
type="button"
|
|
90
|
+
class="tiptap-btn"
|
|
91
|
+
[class.active]="isActive('link')"
|
|
92
|
+
(click)="addLink()"
|
|
93
|
+
title="Insert link"
|
|
94
|
+
aria-label="Insert link"
|
|
95
|
+
>
|
|
96
|
+
<mat-icon>link</mat-icon>
|
|
97
|
+
</button>
|
|
98
|
+
<button mat-icon-button type="button" class="tiptap-btn" (click)="addImage()" title="Insert image" aria-label="Insert image">
|
|
99
|
+
<mat-icon>image</mat-icon>
|
|
100
|
+
</button>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<p *ngIf="showError" [ngClass]="'text-editor-error'">{{ errorMessage }}</p>
|
|
15
105
|
</div>
|
|
16
106
|
|
|
17
107
|
<div *ngIf="readonly">
|
|
@@ -14,5 +14,145 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.text-editor-error {
|
|
17
|
-
|
|
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
|
}
|
|
@@ -2,7 +2,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
|
2
2
|
|
|
3
3
|
import { RichTextEditorComponent } from './rich-text-editor.component';
|
|
4
4
|
|
|
5
|
-
describe('
|
|
5
|
+
describe('RichTextEditorComponent', () => {
|
|
6
6
|
let component: RichTextEditorComponent;
|
|
7
7
|
let fixture: ComponentFixture<RichTextEditorComponent>;
|
|
8
8
|
|