@pega/angular-sdk-overrides 0.25.15 → 0.25.17
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/operator/operator.component.ts +2 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +33 -40
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +46 -50
- package/lib/infra/Containers/view-container/view-container.component.ts +29 -30
- package/lib/infra/defer-load/defer-load.component.ts +6 -3
- package/lib/infra/navbar/navbar.component.ts +33 -35
- package/lib/infra/root-container/root-container.component.ts +33 -38
- package/lib/infra/view/view.component.ts +17 -39
- package/lib/template/app-shell/app-shell.component.ts +12 -11
- package/lib/template/base/details-template-base.ts +35 -53
- package/lib/template/case-summary/case-summary.component.ts +14 -0
- 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 -32
- 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 -37
- 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 -38
- 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 -46
- 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 -44
- 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 -41
- package/lib/template/field-value-list/field-value-list.component.scss +17 -0
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +18 -20
- package/lib/widget/attachment/attachment.component.ts +5 -2
- package/lib/widget/case-history/case-history.component.ts +6 -2
- package/lib/widget/file-utility/file-utility.component.ts +25 -29
- package/lib/widget/todo/todo.component.ts +7 -2
- package/package.json +1 -1
- 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 -41
- 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 -61
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { MaterialDetailsComponent } from './material-details.component';
|
|
4
|
-
|
|
5
|
-
describe('MaterialDetailsComponent', () => {
|
|
6
|
-
let component: MaterialDetailsComponent;
|
|
7
|
-
let fixture: ComponentFixture<MaterialDetailsComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [MaterialDetailsComponent]
|
|
12
|
-
}).compileComponents();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
beforeEach(() => {
|
|
16
|
-
fixture = TestBed.createComponent(MaterialDetailsComponent);
|
|
17
|
-
component = fixture.componentInstance;
|
|
18
|
-
fixture.detectChanges();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('should create', () => {
|
|
22
|
-
expect(component).toBeTruthy();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Component, Input, forwardRef } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { Utils } from '@pega/angular-sdk-components';
|
|
4
|
-
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-material-details',
|
|
8
|
-
templateUrl: './material-details.component.html',
|
|
9
|
-
styleUrls: ['./material-details.component.scss'],
|
|
10
|
-
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
11
|
-
})
|
|
12
|
-
export class MaterialDetailsComponent {
|
|
13
|
-
constructor(private utils: Utils) {}
|
|
14
|
-
|
|
15
|
-
@Input() arFields$: any[];
|
|
16
|
-
@Input() arFields2$: any[];
|
|
17
|
-
@Input() arFields3$: any[];
|
|
18
|
-
@Input() arHighlightedFields: any[];
|
|
19
|
-
@Input() layout: any;
|
|
20
|
-
|
|
21
|
-
_getValue(configValue) {
|
|
22
|
-
if (configValue && configValue != '') {
|
|
23
|
-
return configValue;
|
|
24
|
-
}
|
|
25
|
-
return '---';
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
_formatDate(dateValue: string, dateFormat: string): string {
|
|
29
|
-
return this.utils.generateDate(dateValue, dateFormat);
|
|
30
|
-
}
|
|
31
|
-
}
|
package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<div id="details-fields-list">
|
|
2
|
-
<div *ngFor="let field of arFields$">
|
|
3
|
-
<div *ngIf="field.type === 'group'; else noGroup">
|
|
4
|
-
<component-mapper name="Group" [props]="{ pConn$: field.pConn }"></component-mapper>
|
|
5
|
-
</div>
|
|
6
|
-
<ng-template #noGroup>
|
|
7
|
-
<div *ngIf="field.type === 'reference'; else showDetails">
|
|
8
|
-
<component-mapper name="reference" [props]="{ pConn$: field.pConn }"></component-mapper>
|
|
9
|
-
</div>
|
|
10
|
-
</ng-template>
|
|
11
|
-
|
|
12
|
-
<ng-template #showDetails>
|
|
13
|
-
<div class="psdk-grid-filter" *ngIf="field.config.label && _getVisibility(field.config)">
|
|
14
|
-
<div class="psdk-details-fields-label">
|
|
15
|
-
{{ field.config.label }}
|
|
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>
|
|
38
|
-
</div>
|
|
39
|
-
</ng-template>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
.psdk-details-fields-label {
|
|
2
|
-
margin: 8px 0px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
span.psdk-details-text-style-hf {
|
|
6
|
-
font-weight: bold;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
span.psdk-details-status-style-hf {
|
|
10
|
-
border-radius: calc(0.25 * 0.5rem);
|
|
11
|
-
display: inline-block;
|
|
12
|
-
font-size: 0.75rem;
|
|
13
|
-
font-weight: bold;
|
|
14
|
-
line-height: calc(0.5rem * 2.5);
|
|
15
|
-
height: calc(0.5rem * 2.5);
|
|
16
|
-
padding: 0 0.5rem;
|
|
17
|
-
text-transform: uppercase;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.psdk-grid-filter {
|
|
21
|
-
display: grid;
|
|
22
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
23
|
-
column-gap: calc(2 * 0.5rem);
|
|
24
|
-
row-gap: calc(2 * 0.5rem);
|
|
25
|
-
align-items: start;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.psdk-csf-primary-field-value {
|
|
29
|
-
margin: 8px 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.psdk-primary-color {
|
|
33
|
-
color: var(--mat-sys-primary);
|
|
34
|
-
}
|
package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { MaterialDetailsFieldsComponent } from './material-details-fields.component';
|
|
4
|
-
|
|
5
|
-
describe('MaterialDetailsFieldsComponent', () => {
|
|
6
|
-
let component: MaterialDetailsFieldsComponent;
|
|
7
|
-
let fixture: ComponentFixture<MaterialDetailsFieldsComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [MaterialDetailsFieldsComponent]
|
|
12
|
-
}).compileComponents();
|
|
13
|
-
|
|
14
|
-
fixture = TestBed.createComponent(MaterialDetailsFieldsComponent);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
fixture.detectChanges();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should create', () => {
|
|
20
|
-
expect(component).toBeTruthy();
|
|
21
|
-
});
|
|
22
|
-
});
|
package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Component, Input, forwardRef } from '@angular/core';
|
|
2
|
-
import { Utils } from '@pega/angular-sdk-components';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
-
import { getCurrencyOptions } from '@pega/angular-sdk-components';
|
|
6
|
-
import { format } from '@pega/angular-sdk-components';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'app-material-details-fields',
|
|
10
|
-
templateUrl: './material-details-fields.component.html',
|
|
11
|
-
styleUrls: ['./material-details-fields.component.scss'],
|
|
12
|
-
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
13
|
-
})
|
|
14
|
-
export class MaterialDetailsFieldsComponent {
|
|
15
|
-
constructor(private utils: Utils) {}
|
|
16
|
-
|
|
17
|
-
@Input() arFields$: any[];
|
|
18
|
-
@Input() arHighlightedFields: any[];
|
|
19
|
-
|
|
20
|
-
_getValue(configValue, field: any = {}) {
|
|
21
|
-
if (field?.type === 'userreference') {
|
|
22
|
-
return configValue.userName;
|
|
23
|
-
}
|
|
24
|
-
if (configValue && configValue != '') {
|
|
25
|
-
return configValue;
|
|
26
|
-
}
|
|
27
|
-
return '---';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
_formatDate(dateValue: string, dateFormat: string): string {
|
|
31
|
-
return this.utils.generateDate(dateValue, dateFormat);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
_formatDecimal(field: any): string {
|
|
35
|
-
const { currencyISOCode = '', formatter } = field.config;
|
|
36
|
-
|
|
37
|
-
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
38
|
-
const formatterLower = formatter?.toLowerCase() || 'decimal';
|
|
39
|
-
const formattedValue = format(field.config.value, formatterLower, theCurrencyOptions);
|
|
40
|
-
|
|
41
|
-
return formattedValue;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_formatCurrency(field: any): string {
|
|
45
|
-
const { currencyISOCode = 'USD', formatter } = field.config;
|
|
46
|
-
|
|
47
|
-
const formattedValue = format(
|
|
48
|
-
field.config.value,
|
|
49
|
-
formatter ? (formatter.toLowerCase() === 'defaultcurrency' ? 'currency' : formatter.toLowerCase()) : 'currency',
|
|
50
|
-
getCurrencyOptions(currencyISOCode)
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
return formattedValue;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
_getVisibility(config): boolean {
|
|
57
|
-
const { visibility = true } = config;
|
|
58
|
-
|
|
59
|
-
return this.utils.getBooleanValue(visibility);
|
|
60
|
-
}
|
|
61
|
-
}
|