@pega/angular-sdk-overrides 0.26.1 → 0.26.3
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 +12 -3
- package/lib/designSystemExtension/operator/operator.component.ts +2 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +104 -10
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +141 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +224 -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 +349 -22
- package/lib/field/cancel-alert/cancel-alert.component.ts +38 -15
- package/lib/field/check-box/check-box.component.html +3 -1
- package/lib/field/check-box/check-box.component.ts +10 -1
- 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 +2 -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 +2 -1
- package/lib/field/dropdown/dropdown.component.ts +10 -1
- package/lib/field/email/email.component.html +2 -1
- package/lib/field/email/email.component.ts +2 -2
- package/lib/field/field.base.ts +27 -1
- package/lib/field/group/group.component.html +1 -1
- package/lib/field/group/group.component.ts +1 -3
- 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/object-reference/object-reference.component.html +1 -1
- package/lib/field/object-reference/object-reference.component.ts +3 -0
- 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.ts +1 -1
- 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 +9 -5
- 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 +10 -5
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +33 -40
- 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.spec.ts +24 -11
- 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 -31
- package/lib/infra/assignment/assignment.component.html +2 -1
- package/lib/infra/assignment/assignment.component.ts +30 -13
- 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 +48 -0
- package/lib/infra/multi-step/multi-step.component.ts +11 -0
- 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 +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 +27 -18
- package/lib/template/data-reference/search-form/search-form.component.html +1 -1
- package/lib/template/data-reference/search-form/search-form.component.ts +2 -0
- 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 -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/list-view/list-view.component.ts +39 -0
- 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-manual/helpers.ts +30 -9
- package/lib/template/simple-table-manual/simple-table-manual.component.html +30 -14
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +4 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +118 -29
- package/lib/template/single-reference-readonly/single-reference-readonly.component.html +1 -1
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +2 -2
- package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +4 -4
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +18 -20
- package/lib/widget/attachment/AttachmentUtils.ts +18 -10
- package/lib/widget/attachment/attachment.component.html +16 -6
- package/lib/widget/attachment/attachment.component.ts +12 -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,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input,
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatButtonModule } from '@angular/material/button';
|
|
4
4
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -74,7 +74,7 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
74
74
|
constructor(
|
|
75
75
|
private angularPConnect: AngularPConnectService,
|
|
76
76
|
private utils: Utils,
|
|
77
|
-
private
|
|
77
|
+
private cdRef: ChangeDetectorRef
|
|
78
78
|
) {}
|
|
79
79
|
|
|
80
80
|
ngOnInit(): void {
|
|
@@ -273,9 +273,8 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
273
273
|
for (let fileIndex = 0; fileIndex < arFileList.length; fileIndex++) {
|
|
274
274
|
if (arFileList[fileIndex].id == itemId) {
|
|
275
275
|
// remove the file from the list and redraw
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
});
|
|
276
|
+
arFileList.splice(fileIndex, 1);
|
|
277
|
+
this.cdRef.markForCheck();
|
|
279
278
|
break;
|
|
280
279
|
}
|
|
281
280
|
}
|
|
@@ -293,9 +292,8 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
293
292
|
// remove the file from the list and redraw
|
|
294
293
|
localLinksList.splice(linkIndex, 1);
|
|
295
294
|
|
|
296
|
-
this.
|
|
297
|
-
|
|
298
|
-
});
|
|
295
|
+
this.arLinksList$ = localLinksList.slice();
|
|
296
|
+
this.cdRef.markForCheck();
|
|
299
297
|
|
|
300
298
|
break;
|
|
301
299
|
}
|
|
@@ -482,24 +480,23 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
482
480
|
oLink.primary.icon = 'open';
|
|
483
481
|
oLink.secondary.text = url;
|
|
484
482
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
this.arLinksList$.push(oLink);
|
|
483
|
+
// need to create a new array or summary list won't detect changes
|
|
484
|
+
this.arLinksList$ = localList.slice();
|
|
485
|
+
this.arLinksList$.push(oLink);
|
|
489
486
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
487
|
+
// list for actually attachments
|
|
488
|
+
const link: any = {};
|
|
489
|
+
link.id = oLink.id;
|
|
490
|
+
link.linkTitle = this.link_title$;
|
|
491
|
+
link.type = oLink.type;
|
|
492
|
+
link.url = url;
|
|
496
493
|
|
|
497
|
-
|
|
494
|
+
this.arLinks$.push(link);
|
|
498
495
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
496
|
+
// clear values
|
|
497
|
+
this.link_title$ = '';
|
|
498
|
+
this.link_url$ = '';
|
|
499
|
+
this.cdRef.markForCheck();
|
|
503
500
|
}
|
|
504
501
|
|
|
505
502
|
_changeTitle(event: any) {
|
|
@@ -575,15 +572,13 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
575
572
|
createModal(modalType: string) {
|
|
576
573
|
switch (modalType) {
|
|
577
574
|
case 'addLocalFile':
|
|
578
|
-
this.
|
|
579
|
-
|
|
580
|
-
});
|
|
575
|
+
this.bShowFileModal$ = true;
|
|
576
|
+
this.cdRef.markForCheck();
|
|
581
577
|
|
|
582
578
|
break;
|
|
583
579
|
case 'addLocalLink':
|
|
584
|
-
this.
|
|
585
|
-
|
|
586
|
-
});
|
|
580
|
+
this.bShowLinkModal$ = true;
|
|
581
|
+
this.cdRef.markForCheck();
|
|
587
582
|
break;
|
|
588
583
|
default:
|
|
589
584
|
break;
|
|
@@ -716,6 +711,7 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
716
711
|
})
|
|
717
712
|
.finally(() => {
|
|
718
713
|
this.lu_bLoading$ = false;
|
|
714
|
+
this.cdRef.markForCheck();
|
|
719
715
|
});
|
|
720
716
|
}
|
|
721
717
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, OnDestroy } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatButtonModule } from '@angular/material/button';
|
|
4
4
|
import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
|
|
@@ -97,7 +97,8 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
97
97
|
constructor(
|
|
98
98
|
private psService: ProgressSpinnerService,
|
|
99
99
|
private erService: ErrorMessagesService,
|
|
100
|
-
private utils: Utils
|
|
100
|
+
private utils: Utils,
|
|
101
|
+
private cdRef: ChangeDetectorRef
|
|
101
102
|
) {}
|
|
102
103
|
|
|
103
104
|
ngOnInit() {
|
|
@@ -167,6 +168,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
167
168
|
deferLoadWorklistItems(responseData) {
|
|
168
169
|
this.count = responseData.totalCount;
|
|
169
170
|
this.arAssignments$ = responseData.data;
|
|
171
|
+
this.cdRef.markForCheck();
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
getID(assignment: any) {
|
|
@@ -221,6 +223,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
221
223
|
fetchMyWorkList(this.myWorkList$.datapage, this.pConn$.getComponentConfig()?.myWorkList.fields, this.count, false, this.context$).then(
|
|
222
224
|
response => {
|
|
223
225
|
this.arAssignments$ = response.data;
|
|
226
|
+
this.cdRef.markForCheck();
|
|
224
227
|
}
|
|
225
228
|
);
|
|
226
229
|
} else {
|
|
@@ -268,6 +271,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
268
271
|
.openAssignment(id, classname, options)
|
|
269
272
|
.then(() => {
|
|
270
273
|
this.psService.sendMessage(false);
|
|
274
|
+
this.cdRef.markForCheck();
|
|
271
275
|
if (this.bLogging) {
|
|
272
276
|
console.log(`openAssignment completed`);
|
|
273
277
|
}
|
|
@@ -275,6 +279,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
275
279
|
.catch(() => {
|
|
276
280
|
this.psService.sendMessage(false);
|
|
277
281
|
this.erService.sendMessage('show', 'Failed to open');
|
|
282
|
+
this.cdRef.markForCheck();
|
|
278
283
|
});
|
|
279
284
|
}
|
|
280
285
|
}
|
package/package.json
CHANGED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<div id="details-fields-list">
|
|
2
|
-
<div
|
|
3
|
-
*ngIf="arHighlightedFields && arHighlightedFields.length > 0"
|
|
4
|
-
[ngClass]="{
|
|
5
|
-
'psdk-grid-filter-1': this.layout === 'one-column',
|
|
6
|
-
'psdk-grid-filter-2': this.layout === 'two-column',
|
|
7
|
-
'psdk-grid-filter-3': this.layout === 'three-column',
|
|
8
|
-
'psdk-grid-filter-wide-narrow': this.layout === 'wide-narrow',
|
|
9
|
-
'psdk-grid-filter-narrow-wide': this.layout === 'narrow-wide'
|
|
10
|
-
}"
|
|
11
|
-
>
|
|
12
|
-
<div *ngFor="let field of arHighlightedFields">
|
|
13
|
-
<div class="psdk-details-fields-label">
|
|
14
|
-
{{ field.config.label }}
|
|
15
|
-
</div>
|
|
16
|
-
<div [ngSwitch]="field.type.toLowerCase()" class="psdk-csf-primary-field-value">
|
|
17
|
-
<span *ngSwitchCase="'textinput'" class="psdk-details-text-style-hf">{{ _getValue(field.config.value) }}</span>
|
|
18
|
-
<span *ngSwitchCase="'status'" class="psdk-details-status-style-hf">{{ _getValue(field.config.value) }}</span>
|
|
19
|
-
<a *ngSwitchCase="'phone'" as="a" href="tel: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
|
|
20
|
-
<a *ngSwitchCase="'email'" href="mailto: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
|
|
21
|
-
<span *ngSwitchCase="'date'" class="psdk-details-text-style-hf">{{ _formatDate(field.config.value, field.type) }}</span>
|
|
22
|
-
<span *ngSwitchCase="'caseoperator'"></span>
|
|
23
|
-
<span *ngSwitchDefault>{{ _getValue(field.config.value) }}</span>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<div
|
|
28
|
-
[ngClass]="{
|
|
29
|
-
'psdk-grid-filter-1': this.layout === 'one-column',
|
|
30
|
-
'psdk-grid-filter-2': this.layout === 'two-column',
|
|
31
|
-
'psdk-grid-filter-3': this.layout === 'three-column',
|
|
32
|
-
'psdk-grid-filter-wide-narrow': this.layout === 'wide-narrow',
|
|
33
|
-
'psdk-grid-filter-narrow-wide': this.layout === 'narrow-wide'
|
|
34
|
-
}"
|
|
35
|
-
>
|
|
36
|
-
<component-mapper *ngIf="arFields$" name="DetailsFields" [props]="{ arFields$: arFields$ }"></component-mapper>
|
|
37
|
-
<component-mapper *ngIf="arFields2$" name="DetailsFields" [props]="{ arFields$: arFields2$ }"></component-mapper>
|
|
38
|
-
<component-mapper *ngIf="arFields3$" name="DetailsFields" [props]="{ arFields$: arFields3$ }"></component-mapper>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
.psdk-details-group {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
}
|
|
6
|
-
.psdk-details-fields {
|
|
7
|
-
padding: calc(2 * 0.5rem);
|
|
8
|
-
grid-row-gap: calc(2 * 0.5rem);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.psdk-details-fields-primary {
|
|
12
|
-
width: 100%;
|
|
13
|
-
display: grid;
|
|
14
|
-
grid-template-columns: 1fr;
|
|
15
|
-
grid-column-gap: calc(2 * 0.5rem);
|
|
16
|
-
grid-row-gap: calc(1 * 0.5rem);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.psdk-details-fields-single {
|
|
20
|
-
display: grid;
|
|
21
|
-
grid-template-columns: 20ch 1fr;
|
|
22
|
-
grid-column-gap: calc(2 * 0.5rem);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.psdk-details-fields-label {
|
|
26
|
-
margin: 8px 0px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.psdk-details-fields-value {
|
|
30
|
-
word-break: break-word;
|
|
31
|
-
grid-column-start: 2;
|
|
32
|
-
grid-row-start: 1;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
span.psdk-details-text-style-hf {
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
font-size: 1.25rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
span.psdk-details-text-style {
|
|
41
|
-
font-weight: 400;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
span.psdk-details-status-style {
|
|
45
|
-
border-radius: calc(0.25 * 0.5rem);
|
|
46
|
-
display: inline-block;
|
|
47
|
-
font-size: 0.75rem;
|
|
48
|
-
font-weight: bold;
|
|
49
|
-
line-height: calc(0.5rem * 2.5);
|
|
50
|
-
height: calc(0.5rem * 2.5);
|
|
51
|
-
padding: 0 0.5rem;
|
|
52
|
-
text-transform: uppercase;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.psdk-grid-filter {
|
|
56
|
-
display: grid;
|
|
57
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
58
|
-
column-gap: calc(2 * 0.5rem);
|
|
59
|
-
row-gap: calc(2 * 0.5rem);
|
|
60
|
-
align-items: start;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.psdk-csf-primary-field-value {
|
|
64
|
-
margin: 8px 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
span.psdk-details-status-style-hf {
|
|
68
|
-
border-radius: calc(0.25 * 0.5rem);
|
|
69
|
-
display: inline-block;
|
|
70
|
-
font-size: 1.25rem;
|
|
71
|
-
font-weight: 500;
|
|
72
|
-
line-height: calc(0.5rem * 2.5);
|
|
73
|
-
height: calc(0.5rem * 2.5);
|
|
74
|
-
padding: 0 0.5rem;
|
|
75
|
-
text-transform: uppercase;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.psdk-grid-filter-1 {
|
|
79
|
-
display: grid;
|
|
80
|
-
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
81
|
-
column-gap: calc(2 * 0.5rem);
|
|
82
|
-
row-gap: calc(2 * 0.5rem);
|
|
83
|
-
align-items: start;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.psdk-grid-filter-2 {
|
|
87
|
-
display: grid;
|
|
88
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
89
|
-
column-gap: calc(2 * 0.5rem);
|
|
90
|
-
row-gap: calc(2 * 0.5rem);
|
|
91
|
-
align-items: start;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.psdk-grid-filter-3 {
|
|
95
|
-
display: grid;
|
|
96
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
97
|
-
column-gap: calc(2 * 0.5rem);
|
|
98
|
-
row-gap: calc(2 * 0.5rem);
|
|
99
|
-
align-items: start;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.psdk-grid-filter-wide-narrow {
|
|
103
|
-
display: grid;
|
|
104
|
-
grid-template-columns: 7fr 3fr;
|
|
105
|
-
column-gap: calc(2 * 0.5rem);
|
|
106
|
-
row-gap: calc(2 * 0.5rem);
|
|
107
|
-
align-items: start;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.psdk-grid-filter-narrow-wide {
|
|
111
|
-
display: grid;
|
|
112
|
-
grid-template-columns: 3fr 7fr;
|
|
113
|
-
column-gap: calc(2 * 0.5rem);
|
|
114
|
-
row-gap: calc(2 * 0.5rem);
|
|
115
|
-
align-items: start;
|
|
116
|
-
}
|
|
@@ -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
|
-
}
|