@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
|
@@ -20,61 +20,67 @@
|
|
|
20
20
|
width: auto;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
0px 2px 4px -1px rgba(0, 0, 0, 0.2),
|
|
27
|
-
0px 4px 5px 0px rgba(0, 0, 0, 0.14),
|
|
28
|
-
0px 1px 10px 0px rgba(0, 0, 0, 0.12);
|
|
29
|
-
display: block;
|
|
30
|
-
border-radius: 4px;
|
|
31
|
-
background-color: var(--mat-datepicker-calendar-container-background-color);
|
|
32
|
-
color: var(--mat-datepicker-calendar-container-text-color);
|
|
23
|
+
.owl-dt-container {
|
|
24
|
+
background-color: var(--mat-sys-surface-container);
|
|
25
|
+
color: var(--mat-sys-on-surface);
|
|
33
26
|
}
|
|
34
27
|
|
|
35
|
-
.
|
|
36
|
-
|
|
37
|
-
border-color: var(--mat-
|
|
28
|
+
.owl-dt-container-row,
|
|
29
|
+
.owl-dt-container-info .owl-dt-container-range:last-child {
|
|
30
|
+
border-color: var(--mat-sys-outline-variant);
|
|
38
31
|
}
|
|
39
32
|
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
color: var(--mat-
|
|
33
|
+
.owl-dt-calendar-control,
|
|
34
|
+
.owl-dt-calendar-table .owl-dt-calendar-cell {
|
|
35
|
+
color: var(--mat-sys-on-surface);
|
|
43
36
|
}
|
|
44
37
|
|
|
45
|
-
.
|
|
46
|
-
|
|
38
|
+
.owl-dt-calendar-table .owl-dt-calendar-header,
|
|
39
|
+
.owl-dt-calendar-table .owl-dt-calendar-cell-disabled > .owl-dt-calendar-cell-content:not(.owl-dt-calendar-cell-selected) {
|
|
40
|
+
color: var(--mat-sys-on-surface-variant);
|
|
47
41
|
}
|
|
48
42
|
|
|
49
|
-
.
|
|
50
|
-
|
|
51
|
-
background-color: var(--mat-datepicker-calendar-date-hover-state-background-color);
|
|
43
|
+
.owl-dt-calendar-table .owl-dt-calendar-header .owl-dt-calendar-table-divider::after {
|
|
44
|
+
background-color: var(--mat-sys-outline-variant);
|
|
52
45
|
}
|
|
53
46
|
|
|
54
|
-
.
|
|
55
|
-
|
|
47
|
+
.owl-dt-calendar-table .owl-dt-calendar-cell-today:not(.owl-dt-calendar-cell-selected) {
|
|
48
|
+
border-color: var(--mat-sys-outline);
|
|
56
49
|
}
|
|
57
50
|
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
color: var(--mat-datepicker-calendar-header-text-color);
|
|
62
|
-
font-size: var(--mat-datepicker-calendar-header-text-size);
|
|
63
|
-
font-weight: var(--mat-datepicker-calendar-header-text-weight);
|
|
51
|
+
.owl-dt-calendar-table .owl-dt-calendar-cell-selected {
|
|
52
|
+
background-color: var(--mat-sys-primary);
|
|
53
|
+
color: var(--mat-sys-on-primary);
|
|
64
54
|
}
|
|
65
55
|
|
|
66
|
-
.
|
|
67
|
-
.
|
|
68
|
-
|
|
56
|
+
.owl-dt-calendar-table .owl-dt-calendar-cell-active:focus > .owl-dt-calendar-cell-content:not(.owl-dt-calendar-cell-selected),
|
|
57
|
+
.owl-dt-calendar-table :not(.owl-dt-calendar-cell-disabled):hover > .owl-dt-calendar-cell-content:not(.owl-dt-calendar-cell-selected),
|
|
58
|
+
.owl-dt-calendar-control .owl-dt-calendar-control-content .owl-dt-calendar-control-button:hover,
|
|
59
|
+
.owl-dt-control-period-button:hover > .owl-dt-control-button-content,
|
|
60
|
+
.owl-dt-container-control-button:hover .owl-dt-control-button-content,
|
|
61
|
+
.owl-dt-control:focus > .owl-dt-control-content {
|
|
62
|
+
background-color: var(--mat-sys-surface-container-high);
|
|
69
63
|
}
|
|
70
64
|
|
|
71
|
-
.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
.owl-dt-timer-content .owl-dt-timer-input {
|
|
66
|
+
border-color: var(--mat-sys-outline);
|
|
67
|
+
background-color: var(--mat-sys-surface-container-highest);
|
|
68
|
+
color: var(--mat-sys-on-surface);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.owl-dt-container-buttons,
|
|
72
|
+
.owl-dt-container-info .owl-dt-container-info-active,
|
|
73
|
+
.owl-dt-timer-hour12 {
|
|
74
|
+
color: var(--mat-sys-primary);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.owl-dt-control-arrow-button[disabled] {
|
|
78
|
+
color: var(--mat-sys-on-surface-variant);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.owl-dt-timer-hour12 .owl-dt-timer-hour12-box:focus .owl-dt-control-button-content,
|
|
82
|
+
.owl-dt-timer-hour12 .owl-dt-timer-hour12-box:hover .owl-dt-control-button-content {
|
|
83
|
+
background-color: var(--mat-sys-primary);
|
|
84
|
+
color: var(--mat-sys-on-primary);
|
|
79
85
|
}
|
|
80
86
|
}
|
|
@@ -95,6 +95,12 @@ export class DateTimeComponent extends FieldBase implements OnInit, OnDestroy {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
fieldOnDateChange(event: any) {
|
|
98
|
+
// owl picker emits null when the typed text can't be parsed; clear the input instead of defaulting to now
|
|
99
|
+
if (!event.value) {
|
|
100
|
+
this.fieldControl.setValue('');
|
|
101
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, '');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
98
104
|
// this comes from the date pop up
|
|
99
105
|
if (typeof event.value === 'object') {
|
|
100
106
|
// convert date to pega "date" format
|
|
@@ -104,4 +110,25 @@ export class DateTimeComponent extends FieldBase implements OnInit, OnDestroy {
|
|
|
104
110
|
}
|
|
105
111
|
handleEvent(this.actionsApi, 'changeNblur', this.propName, event.value);
|
|
106
112
|
}
|
|
113
|
+
|
|
114
|
+
override getErrorMessage() {
|
|
115
|
+
// look for validation messages for json, pre-defined or just an error pushed from workitem (400)
|
|
116
|
+
if (this.fieldControl.hasError('message')) {
|
|
117
|
+
return this.angularPConnectData.validateMessage ?? '';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (this.fieldControl.hasError('required')) {
|
|
121
|
+
return 'You must enter a value';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (this.fieldControl.hasError('owlDateTimeParse')) {
|
|
125
|
+
return `${this.fieldControl.errors?.['owlDateTimeParse'].text} is not a valid date time value`;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (this.fieldControl.errors) {
|
|
129
|
+
return 'Invalid date time value';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return '';
|
|
133
|
+
}
|
|
107
134
|
}
|
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
12
12
|
<mat-select
|
|
13
13
|
[value]="value$"
|
|
14
|
+
[placeholder]="placeholderText"
|
|
14
15
|
[required]="bRequired$"
|
|
15
16
|
[disabled]="bDisabled$"
|
|
16
17
|
[attr.data-test-id]="testId"
|
|
17
18
|
(selectionChange)="fieldOnChange($event)"
|
|
18
19
|
[formControl]="fieldControl"
|
|
19
20
|
>
|
|
21
|
+
<mat-option>{{ placeholderText }}</mat-option>
|
|
20
22
|
<mat-option *ngFor="let opt of options$" [value]="opt.key">
|
|
21
23
|
{{ getLocalizedOptionValue(opt) }}
|
|
22
24
|
</mat-option>
|
|
@@ -80,16 +80,19 @@ export class DropdownComponent extends FieldBase implements OnInit, OnDestroy {
|
|
|
80
80
|
localeName = '';
|
|
81
81
|
localePath = '';
|
|
82
82
|
localizedValue = '';
|
|
83
|
+
placeholderText = '';
|
|
83
84
|
|
|
84
85
|
set options(options: IOption[]) {
|
|
85
86
|
this.options$ = options;
|
|
86
87
|
if (this.displayMode$) {
|
|
87
88
|
this.value$ = this.options$?.find(option => option.key === this.value$)?.value || this.value$;
|
|
88
89
|
this.localizedValue = this.pConn$.getLocalizedValue(
|
|
89
|
-
this.value
|
|
90
|
+
this.value$,
|
|
90
91
|
this.localePath,
|
|
91
92
|
this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName)
|
|
92
93
|
);
|
|
94
|
+
|
|
95
|
+
this.cdRef.markForCheck();
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
|
|
@@ -115,20 +118,15 @@ export class DropdownComponent extends FieldBase implements OnInit, OnDestroy {
|
|
|
115
118
|
const { value, fieldMetadata, datasource } = configProps;
|
|
116
119
|
|
|
117
120
|
this.value$ = value;
|
|
121
|
+
this.placeholderText = this.pConn$.getLocalizedValue(this.placeholder || 'Select...', '', '');
|
|
118
122
|
|
|
119
123
|
if (!isEqual(datasource, this.theDatasource)) {
|
|
120
124
|
// inbound datasource is different, so update theDatasource
|
|
121
125
|
this.theDatasource = datasource || null;
|
|
122
126
|
}
|
|
123
127
|
|
|
124
|
-
if (this.value$ === '' && !this.bReadonly$) {
|
|
125
|
-
this.value$ = 'Select';
|
|
126
|
-
}
|
|
127
|
-
|
|
128
128
|
if (this.theDatasource) {
|
|
129
|
-
|
|
130
|
-
optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
131
|
-
this.options = optionsList;
|
|
129
|
+
this.options = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject());
|
|
132
130
|
}
|
|
133
131
|
|
|
134
132
|
this.actionsApi = this.pConn$.getActionsApi();
|
|
@@ -215,27 +213,21 @@ export class DropdownComponent extends FieldBase implements OnInit, OnDestroy {
|
|
|
215
213
|
};
|
|
216
214
|
optionsData.push(obj);
|
|
217
215
|
});
|
|
218
|
-
optionsData?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
219
216
|
this.options = optionsData;
|
|
220
217
|
});
|
|
221
218
|
});
|
|
222
219
|
}
|
|
223
220
|
|
|
224
|
-
isSelected(buttonValue: string): boolean {
|
|
225
|
-
return this.value$ === buttonValue;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
221
|
fieldOnChange(event: any) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
handleEvent(this.actionsApi, 'changeNblur', this.propName, event.value);
|
|
222
|
+
// The reset option has no value; Pega expects '' for a cleared field
|
|
223
|
+
const value = event.value ?? '';
|
|
224
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
|
|
233
225
|
|
|
234
226
|
this.pConn$.clearErrorMessages({
|
|
235
227
|
property: this.propName
|
|
236
228
|
});
|
|
237
229
|
if (this.onRecordChange) {
|
|
238
|
-
this.onRecordChange.emit(
|
|
230
|
+
this.onRecordChange.emit(value);
|
|
239
231
|
}
|
|
240
232
|
}
|
|
241
233
|
|
package/lib/field/field.base.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive, inject, Input, OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { Directive, inject, Input, OnDestroy, OnInit, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
|
|
4
4
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
@@ -11,6 +11,7 @@ export class FieldBase implements OnInit, OnDestroy {
|
|
|
11
11
|
|
|
12
12
|
protected angularPConnect = inject(AngularPConnectService);
|
|
13
13
|
protected utils = inject(Utils);
|
|
14
|
+
protected cdRef = inject(ChangeDetectorRef);
|
|
14
15
|
|
|
15
16
|
protected angularPConnectData: AngularPConnectData = {};
|
|
16
17
|
|
|
@@ -21,11 +21,10 @@ const NO_HEADER_TEMPLATES = [
|
|
|
21
21
|
|
|
22
22
|
const DETAILS_TEMPLATES = [
|
|
23
23
|
'Details',
|
|
24
|
-
'DetailsFields',
|
|
25
24
|
'DetailsOneColumn',
|
|
26
|
-
'DetailsSubTabs',
|
|
27
|
-
'DetailsThreeColumn',
|
|
28
25
|
'DetailsTwoColumn',
|
|
26
|
+
'DetailsThreeColumn',
|
|
27
|
+
'DetailsSubTabs',
|
|
29
28
|
'NarrowWideDetails',
|
|
30
29
|
'WideNarrowDetails'
|
|
31
30
|
];
|
|
@@ -10,9 +10,11 @@ export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
|
10
10
|
// For interaction with AngularPConnect
|
|
11
11
|
protected angularPConnectData: AngularPConnectData = {};
|
|
12
12
|
protected angularPConnect;
|
|
13
|
-
propsToUse: any = {};
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
children: any[] = [];
|
|
15
|
+
propsToUse: any = {};
|
|
16
|
+
showHighlightedData: boolean;
|
|
17
|
+
highlightedDataArr: any = [];
|
|
16
18
|
|
|
17
19
|
constructor(injector: Injector) {
|
|
18
20
|
this.angularPConnect = injector.get(AngularPConnectService);
|
|
@@ -40,23 +42,13 @@ export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
|
40
42
|
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
41
43
|
|
|
42
44
|
// Only call updateSelf when the component should update
|
|
43
|
-
if (bUpdateSelf
|
|
45
|
+
if (bUpdateSelf) {
|
|
44
46
|
this.updateSelf();
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
hasRawMetadataChanged(): boolean {
|
|
52
|
-
const newChildrenMetadata = this.fetchChildrenMetadata();
|
|
53
|
-
|
|
54
|
-
if (!PCore.isDeepEqual(newChildrenMetadata, this.childrenMetadataOld)) {
|
|
55
|
-
this.childrenMetadataOld = newChildrenMetadata;
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return false;
|
|
50
|
+
updateSelf() {
|
|
51
|
+
this.updateDetailsProps();
|
|
60
52
|
}
|
|
61
53
|
|
|
62
54
|
fetchChildrenMetadata() {
|
|
@@ -69,53 +61,34 @@ export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
|
69
61
|
}
|
|
70
62
|
|
|
71
63
|
updateDetailsProps() {
|
|
72
|
-
const { label, showLabel } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
|
|
64
|
+
const { label, showLabel, showHighlightedData } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
|
|
73
65
|
this.propsToUse = { label, showLabel, ...this.pConn$.getInheritedProps() };
|
|
66
|
+
this.showHighlightedData = showHighlightedData;
|
|
67
|
+
|
|
68
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
69
|
+
this.pConn$.setInheritedProp('readOnly', true);
|
|
70
|
+
|
|
71
|
+
this.children = this.pConn$.getChildren() as any[];
|
|
72
|
+
|
|
73
|
+
// Process highlighted fields for display in the highlighted section
|
|
74
|
+
this.highlightedDataArr = this.processHighlightedFields();
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const propToUse = { ...thePConn.getInheritedProps() };
|
|
89
|
-
configProps.label = propToUse?.label;
|
|
90
|
-
const options = {
|
|
91
|
-
context: thePConn.getContextName(),
|
|
92
|
-
pageReference: thePConn.getPageReference(),
|
|
93
|
-
referenceList: thePConn.getReferenceList()
|
|
94
|
-
};
|
|
95
|
-
const viewContConfig = {
|
|
96
|
-
meta: {
|
|
97
|
-
...thePConn.getMetadata(),
|
|
98
|
-
type: theCompType,
|
|
99
|
-
config: configProps
|
|
100
|
-
},
|
|
101
|
-
options
|
|
102
|
-
};
|
|
103
|
-
const theViewCont = PCore.createPConnect(viewContConfig);
|
|
104
|
-
processedFields.push({
|
|
105
|
-
type: theCompType,
|
|
106
|
-
pConn: theViewCont?.getPConnect()
|
|
107
|
-
});
|
|
108
|
-
} else {
|
|
109
|
-
thePConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
110
|
-
thePConn.setInheritedProp('readOnly', true);
|
|
111
|
-
processedFields.push({
|
|
112
|
-
type: theCompType,
|
|
113
|
-
config: thePConn.getConfigProps(),
|
|
114
|
-
pConn: thePConn
|
|
115
|
-
});
|
|
77
|
+
processHighlightedFields(): any[] {
|
|
78
|
+
if (!this.showHighlightedData) return [];
|
|
79
|
+
|
|
80
|
+
const { highlightedData = [] } = (this.pConn$.getRawMetadata() as any).config;
|
|
81
|
+
|
|
82
|
+
return (highlightedData ?? []).map(field => {
|
|
83
|
+
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
84
|
+
field.config.readOnly = true;
|
|
85
|
+
|
|
86
|
+
if (field.config.value === '@P .pyStatusWork') {
|
|
87
|
+
field.type = 'TextInput';
|
|
88
|
+
field.config.displayAsStatus = true;
|
|
116
89
|
}
|
|
117
|
-
});
|
|
118
90
|
|
|
119
|
-
|
|
91
|
+
return this.pConn$.createComponent(field, '', 0, {}).getPConnect();
|
|
92
|
+
});
|
|
120
93
|
}
|
|
121
94
|
}
|
|
@@ -4,8 +4,20 @@
|
|
|
4
4
|
></component-mapper>
|
|
5
5
|
|
|
6
6
|
<ng-template #detailsContent>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-1">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
11
23
|
</ng-template>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
.psdk-grid-filter {
|
|
1
|
+
.psdk-grid-filter-1 {
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: repeat(
|
|
3
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,37 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details',
|
|
7
8
|
templateUrl: './details.component.html',
|
|
8
9
|
styleUrls: ['./details.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
highlightedDataArr: any[] = [];
|
|
15
|
-
showHighlightedData: boolean;
|
|
16
|
-
arFields$: any[] = [];
|
|
17
|
-
|
|
18
|
-
override updateSelf() {
|
|
19
|
-
this.updateDetailsProps();
|
|
20
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
21
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
22
|
-
|
|
23
|
-
if (this.showHighlightedData) {
|
|
24
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
25
|
-
this.highlightedDataArr = highlightedData.map(field => {
|
|
26
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
27
|
-
|
|
28
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
29
|
-
field.type = 'TextInput';
|
|
30
|
-
field.config.displayAsStatus = true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return field;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
38
|
-
for (const kid of kids) {
|
|
39
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
12
|
+
export class DetailsComponent extends DetailsTemplateBase {}
|
|
@@ -4,8 +4,20 @@
|
|
|
4
4
|
></component-mapper>
|
|
5
5
|
|
|
6
6
|
<ng-template #detailsContent>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-narrow-wide">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
11
23
|
</ng-template>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
.psdk-grid-filter {
|
|
1
|
+
.psdk-grid-filter-narrow-wide {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: 3fr 7fr;
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,42 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details-narrow-wide',
|
|
7
8
|
templateUrl: './details-narrow-wide.component.html',
|
|
8
9
|
styleUrls: ['./details-narrow-wide.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
arFields$: any[] = [];
|
|
15
|
-
arFields2$: any[] = [];
|
|
16
|
-
highlightedDataArr: any[] = [];
|
|
17
|
-
showHighlightedData: boolean;
|
|
18
|
-
|
|
19
|
-
override updateSelf() {
|
|
20
|
-
this.updateDetailsProps();
|
|
21
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
22
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
23
|
-
|
|
24
|
-
if (this.showHighlightedData) {
|
|
25
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
26
|
-
this.highlightedDataArr = highlightedData.map(field => {
|
|
27
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
28
|
-
|
|
29
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
30
|
-
field.type = 'TextInput';
|
|
31
|
-
field.config.displayAsStatus = true;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return field;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
39
|
-
for (const kid of kids) {
|
|
40
|
-
if (kids.indexOf(kid) == 0) {
|
|
41
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
42
|
-
} else {
|
|
43
|
-
this.arFields2$ = this.processDetailFields(kid);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
12
|
+
export class DetailsNarrowWideComponent extends DetailsTemplateBase {}
|
|
@@ -4,8 +4,20 @@
|
|
|
4
4
|
></component-mapper>
|
|
5
5
|
|
|
6
6
|
<ng-template #detailsContent>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-1">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
11
23
|
</ng-template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.psdk-grid-filter-1 {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
4
|
+
column-gap: calc(2 * 0.5rem);
|
|
5
|
+
row-gap: calc(2 * 0.5rem);
|
|
6
|
+
align-items: start;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,43 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details-one-column',
|
|
7
8
|
templateUrl: './details-one-column.component.html',
|
|
8
9
|
styleUrls: ['./details-one-column.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
showHighlightedData: boolean;
|
|
15
|
-
highlightedDataArr: any;
|
|
16
|
-
|
|
17
|
-
arFields$: any[] = [];
|
|
18
|
-
|
|
19
|
-
override updateSelf() {
|
|
20
|
-
this.updateDetailsProps();
|
|
21
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
22
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
23
|
-
|
|
24
|
-
if (this.showHighlightedData) {
|
|
25
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
26
|
-
this.highlightedDataArr = highlightedData.map(field => {
|
|
27
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
28
|
-
|
|
29
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
30
|
-
field.type = 'TextInput';
|
|
31
|
-
field.config.displayAsStatus = true;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return field;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
39
|
-
this.pConn$.setInheritedProp('readOnly', true);
|
|
40
|
-
|
|
41
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
42
|
-
for (const kid of kids) {
|
|
43
|
-
if (kids.indexOf(kid) == 0) {
|
|
44
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
12
|
+
export class DetailsOneColumnComponent extends DetailsTemplateBase {}
|