@pega/angular-sdk-overrides 0.25.16 → 0.25.18
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/field/date-time/date-time.component.scss +46 -40
- package/lib/field/date-time/date-time.component.ts +27 -0
- package/lib/field/dropdown/dropdown.component.html +2 -0
- package/lib/field/dropdown/dropdown.component.ts +10 -18
- package/lib/field/field.base.ts +2 -1
- package/lib/infra/view/view.component.ts +2 -3
- package/lib/template/base/details-template-base.ts +31 -58
- package/lib/template/details/details.component.html +16 -4
- package/lib/template/details/details.component.scss +9 -2
- package/lib/template/details/details.component.ts +3 -33
- package/lib/template/details-narrow-wide/details-narrow-wide.component.html +16 -4
- 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 -38
- package/lib/template/details-one-column/details-one-column.component.html +16 -4
- 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 -39
- package/lib/template/details-three-column/details-three-column.component.html +16 -10
- 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 -45
- package/lib/template/details-two-column/details-two-column.component.html +16 -4
- 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 -43
- package/lib/template/details-wide-narrow/details-wide-narrow.component.html +16 -4
- 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 -40
- package/lib/template/field-value-list/field-value-list.component.scss +17 -0
- 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
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
|
-
}
|