@pega/angular-sdk-overrides 24.1.10 → 24.2.12
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-banner/alert-banner.component.ts +1 -1
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +0 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +2 -2
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +10 -1
- package/lib/designSystemExtension/operator/operator.component.html +1 -1
- package/lib/designSystemExtension/operator/operator.component.scss +10 -2
- package/lib/designSystemExtension/operator/operator.component.ts +5 -4
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -7
- package/lib/field/auto-complete/auto-complete.component.html +0 -1
- package/lib/field/auto-complete/auto-complete.component.ts +31 -15
- package/lib/field/check-box/check-box.component.html +4 -0
- package/lib/field/check-box/check-box.component.ts +11 -10
- package/lib/field/currency/currency.component.html +4 -4
- package/lib/field/currency/currency.component.ts +42 -19
- package/lib/field/date/date.component.html +3 -7
- package/lib/field/date/date.component.ts +22 -39
- package/lib/field/date-time/date-time.component.html +3 -4
- package/lib/field/date-time/date-time.component.ts +35 -16
- package/lib/field/decimal/decimal.component.html +4 -3
- package/lib/field/decimal/decimal.component.ts +47 -21
- package/lib/field/dropdown/dropdown.component.html +1 -0
- package/lib/field/dropdown/dropdown.component.ts +146 -18
- package/lib/field/email/email.component.ts +24 -4
- package/lib/field/group/group.component.ts +2 -2
- package/lib/field/integer/integer.component.ts +22 -4
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +1 -1
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +3 -2
- package/lib/field/multiselect/multiselect.component.ts +15 -5
- package/lib/field/percentage/percentage.component.html +3 -3
- package/lib/field/percentage/percentage.component.ts +45 -20
- package/lib/field/phone/config-ext.json +1 -1
- package/lib/field/phone/phone.component.html +4 -2
- package/lib/field/phone/phone.component.ts +16 -26
- package/lib/field/radio-buttons/radio-buttons.component.html +3 -6
- package/lib/field/radio-buttons/radio-buttons.component.ts +9 -9
- package/lib/field/rich-text/rich-text.component.ts +19 -8
- package/lib/field/scalar-list/scalar-list.component.ts +3 -4
- package/lib/field/text/text.component.ts +8 -4
- package/lib/field/text-area/text-area.component.html +4 -1
- package/lib/field/text-area/text-area.component.ts +22 -5
- package/lib/field/text-input/text-input.component.ts +22 -4
- package/lib/field/time/time.component.html +2 -2
- package/lib/field/time/time.component.ts +35 -6
- package/lib/field/url/url.component.ts +22 -4
- package/lib/field/user-reference/user-reference.component.html +40 -46
- package/lib/field/user-reference/user-reference.component.ts +111 -20
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +25 -47
- package/lib/infra/Containers/flow-container/helpers.ts +2 -2
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +1 -11
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -8
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
- package/lib/infra/Containers/view-container/helper.ts +22 -0
- package/lib/infra/Containers/view-container/view-container.component.ts +5 -17
- package/lib/infra/action-buttons/action-buttons.component.html +1 -1
- package/lib/infra/assignment/assignment.component.html +1 -1
- package/lib/infra/assignment/assignment.component.ts +82 -40
- package/lib/infra/assignment-card/assignment-card.component.html +1 -0
- package/lib/infra/defer-load/defer-load.component.ts +8 -5
- package/lib/infra/navbar/navbar.component.ts +3 -5
- package/lib/infra/reference/reference.component.ts +77 -90
- package/lib/infra/root-container/root-container.component.html +2 -15
- package/lib/infra/root-container/root-container.component.ts +27 -30
- package/lib/infra/stages/stages.component.scss +2 -2
- package/lib/infra/view/view.component.html +7 -20
- package/lib/infra/view/view.component.ts +20 -2
- package/lib/template/app-shell/app-shell.component.ts +20 -2
- package/lib/template/base/details-template-base.ts +67 -0
- package/lib/template/base/form-template-base.ts +16 -0
- package/lib/template/case-summary/case-summary.component.ts +1 -1
- package/lib/template/case-view/case-view.component.html +4 -4
- package/lib/template/case-view/case-view.component.ts +8 -13
- package/lib/template/confirmation/confirmation.component.html +1 -1
- package/lib/template/confirmation/confirmation.component.ts +1 -1
- package/lib/template/data-reference/data-reference.component.ts +36 -40
- package/lib/template/default-form/default-form.component.html +0 -4
- package/lib/template/default-form/default-form.component.ts +41 -24
- package/lib/template/details/details.component.ts +7 -41
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +6 -39
- package/lib/template/details-one-column/details-one-column.component.ts +7 -42
- package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/lib/template/details-three-column/details-three-column.component.ts +7 -43
- package/lib/template/details-two-column/details-two-column.component.ts +8 -44
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +7 -42
- package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +8 -3
- package/lib/template/field-group-template/field-group-template.component.html +7 -7
- package/lib/template/field-group-template/field-group-template.component.scss +8 -0
- package/lib/template/field-group-template/field-group-template.component.ts +68 -47
- package/lib/template/field-value-list/field-value-list.component.html +2 -2
- package/lib/template/field-value-list/field-value-list.component.scss +6 -1
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
- package/lib/template/list-view/list-view.component.html +6 -1
- package/lib/template/list-view/list-view.component.scss +11 -0
- package/lib/template/list-view/list-view.component.ts +25 -7
- package/lib/template/list-view/listViewHelpers.ts +3 -6
- package/lib/template/list-view/utils.ts +2 -5
- package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -1
- package/lib/template/one-column/one-column.component.ts +4 -3
- package/lib/template/one-column-tab/one-column-tab.component.ts +1 -1
- package/lib/template/page/page.component.ts +1 -1
- package/lib/template/promoted-filters/promoted-filters.component.ts +1 -1
- package/lib/template/repeating-structures/repeating-structures.component.ts +1 -1
- package/lib/template/simple-table-manual/helpers.ts +10 -8
- package/lib/template/simple-table-manual/simple-table-manual.component.html +25 -6
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +12 -3
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +77 -37
- package/lib/template/simple-table-select/simple-table-select.component.ts +3 -3
- package/lib/template/three-column/three-column.component.ts +4 -3
- package/lib/template/two-column/two-column.component.ts +4 -3
- package/lib/template/two-column-tab/two-column-tab.component.ts +1 -1
- package/lib/template/utils.ts +16 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -3
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -1
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -3
- package/lib/widget/attachment/attachment.component.ts +7 -9
- package/lib/widget/feed-container/feed-container.component.ts +7 -9
- package/lib/widget/file-utility/file-utility.component.ts +2 -5
- package/lib/widget/todo/todo.component.html +5 -6
- package/lib/widget/todo/todo.component.scss +9 -0
- package/lib/widget/todo/todo.component.ts +95 -84
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="psdk-case-view" id="case-view">
|
|
2
|
-
<div
|
|
2
|
+
<div class="psdk-case-view-info">
|
|
3
3
|
<mat-toolbar color="primary" class="psdk-case-view-toolbar">
|
|
4
4
|
<mat-toolbar-row style="padding-left: 1rem">
|
|
5
5
|
<div class="psdk-case-icon-div">
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
></component-mapper>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="psdk-case-view-main">
|
|
50
|
-
<div
|
|
50
|
+
<div>
|
|
51
51
|
<div *ngFor="let kid of arChildren$">
|
|
52
52
|
<div
|
|
53
53
|
*ngIf="
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
</div>
|
|
74
74
|
</div>
|
|
75
75
|
|
|
76
|
-
<div
|
|
76
|
+
<div>
|
|
77
77
|
<component-mapper name="DeferLoad" [props]="{ pConn$, loadData$: tabData$, name: tabData$?.config?.name }"></component-mapper>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
|
-
<div
|
|
80
|
+
<div>
|
|
81
81
|
<div *ngIf="arChildren$" class="psdk-case-view-utilities">
|
|
82
82
|
<div *ngFor="let kid of arChildren$">
|
|
83
83
|
<div *ngIf="kid.getPConnect().getRawMetadata()?.type.toLowerCase() == 'region' && kid.getPConnect().getRawMetadata()?.name == 'Utilities'">
|
|
@@ -27,7 +27,6 @@ interface CaseViewProps {
|
|
|
27
27
|
export class CaseViewComponent implements OnInit, OnDestroy {
|
|
28
28
|
@Input() pConn$: typeof PConnect;
|
|
29
29
|
@Input() formGroup$: FormGroup;
|
|
30
|
-
@Input() displayOnlyFA$: boolean;
|
|
31
30
|
|
|
32
31
|
// Used with AngularPConnect
|
|
33
32
|
angularPConnectData: AngularPConnectData = {};
|
|
@@ -120,7 +119,7 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
120
119
|
if (hasNewAttachments !== this.bHasNewAttachments) {
|
|
121
120
|
this.bHasNewAttachments = hasNewAttachments;
|
|
122
121
|
if (this.bHasNewAttachments) {
|
|
123
|
-
PCore.getPubSubUtils().publish(
|
|
122
|
+
PCore.getPubSubUtils().publish(PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
124
123
|
}
|
|
125
124
|
}
|
|
126
125
|
|
|
@@ -161,19 +160,15 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
161
160
|
|
|
162
161
|
this.svgCase$ = this.utils.getImageSrc(this.configProps$.icon, this.utils.getSDKStaticContentUrl());
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (kidPConn.getRawMetadata().name == 'Tabs') {
|
|
170
|
-
this.mainTabs = kid;
|
|
171
|
-
this.mainTabData = this.mainTabs.getPConnect().getChildren();
|
|
172
|
-
}
|
|
163
|
+
for (const kid of this.arChildren$) {
|
|
164
|
+
const kidPConn = kid.getPConnect();
|
|
165
|
+
if (kidPConn.getRawMetadata().name == 'Tabs') {
|
|
166
|
+
this.mainTabs = kid;
|
|
167
|
+
this.mainTabData = this.mainTabs.getPConnect().getChildren();
|
|
173
168
|
}
|
|
174
|
-
|
|
175
|
-
this.generateTabsData();
|
|
176
169
|
}
|
|
170
|
+
|
|
171
|
+
this.generateTabsData();
|
|
177
172
|
}
|
|
178
173
|
|
|
179
174
|
generateTabsData() {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<button mat-raised-button color="primary" (click)="onConfirmViewClose()">Done</button>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
|
-
<div *ngIf="toDoList?.length > 0">
|
|
17
|
+
<div *ngIf="!showConfirmView && toDoList?.length > 0">
|
|
18
18
|
<component-mapper
|
|
19
19
|
name="Todo"
|
|
20
20
|
[props]="{ pConn$, datasource$: { source: toDoList }, headerText$: 'Tasks', type$: CONSTS.TODO, isConfirm: true }"
|
|
@@ -43,7 +43,7 @@ export class ConfirmationComponent implements OnInit, OnDestroy {
|
|
|
43
43
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
44
44
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
45
45
|
this.CONSTS = PCore.getConstants();
|
|
46
|
-
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(this.pConn$.getTarget());
|
|
46
|
+
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(this.pConn$.getTarget() ?? null);
|
|
47
47
|
this.rootInfo = PCore.getContainerUtils().getContainerItemData(this.pConn$.getTarget(), activeContainerItemID);
|
|
48
48
|
this.checkAndUpdate();
|
|
49
49
|
}
|
|
@@ -45,19 +45,18 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
45
45
|
ngOnInit(): void {
|
|
46
46
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
47
47
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
48
|
-
this.children = this.pConn$.getChildren()
|
|
48
|
+
this.children = this.pConn$.getChildren();
|
|
49
49
|
this.updateSelf();
|
|
50
50
|
if (this.firstChildMeta?.type === 'Dropdown' && this.rawViewMetadata.config?.parameters) {
|
|
51
51
|
const { value, key, text } = this.firstChildMeta.config.datasource.fields;
|
|
52
|
-
(
|
|
53
|
-
|
|
52
|
+
PCore.getDataApiUtils()
|
|
53
|
+
.getData(
|
|
54
54
|
this.refList,
|
|
55
55
|
{
|
|
56
56
|
dataViewParameters: this.parameters
|
|
57
|
-
}
|
|
57
|
+
},
|
|
58
58
|
''
|
|
59
|
-
)
|
|
60
|
-
)
|
|
59
|
+
)
|
|
61
60
|
.then(res => {
|
|
62
61
|
if (res.data.data !== null) {
|
|
63
62
|
const ddDataSource = res.data.data
|
|
@@ -103,7 +102,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
103
102
|
|
|
104
103
|
updateSelf() {
|
|
105
104
|
// Update properties based on configProps
|
|
106
|
-
const theConfigProps
|
|
105
|
+
const theConfigProps = this.pConn$.getConfigProps();
|
|
107
106
|
this.updatePropertiesFromProps(theConfigProps);
|
|
108
107
|
|
|
109
108
|
const displayAs = theConfigProps.displayAs;
|
|
@@ -114,7 +113,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
114
113
|
this.refList = this.rawViewMetadata.config.referenceList;
|
|
115
114
|
this.canBeChangedInReviewMode = theConfigProps.allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
|
|
116
115
|
// this.childrenToRender = this.children;
|
|
117
|
-
this.isDisplayModeEnabled = ['
|
|
116
|
+
this.isDisplayModeEnabled = ['DISPLAY_ONLY', 'STACKED_LARGE_VAL'].includes(displayMode);
|
|
118
117
|
|
|
119
118
|
if (this.firstChildMeta?.type !== 'Region') {
|
|
120
119
|
this.firstChildPConnect = this.pConn$.getChildren()[0].getPConnect;
|
|
@@ -187,41 +186,38 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
187
186
|
// AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value
|
|
188
187
|
const propValue = event?.id || event?.target?.value;
|
|
189
188
|
if (propValue && this.canBeChangedInReviewMode && this.isDisplayModeEnabled) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
PCore.getDataApiUtils()
|
|
190
|
+
.getCaseEditLock(caseKey, '')
|
|
191
|
+
.then(caseResponse => {
|
|
192
|
+
const pageTokens = this.pConn$.getPageReference().replace('caseInfo.content', '').split('.');
|
|
193
|
+
let curr = {};
|
|
194
|
+
const commitData = curr;
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
pageTokens.forEach(el => {
|
|
197
|
+
if (el !== '') {
|
|
198
|
+
curr[el] = {};
|
|
199
|
+
curr = curr[el];
|
|
200
|
+
}
|
|
201
|
+
});
|
|
201
202
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
203
|
+
// expecting format like {Customer: {pyID:"C-100"}}
|
|
204
|
+
const propArr = this.propName.split('.');
|
|
205
|
+
propArr.forEach((element, idx) => {
|
|
206
|
+
if (idx + 1 === propArr.length) {
|
|
207
|
+
curr[element] = propValue;
|
|
208
|
+
} else {
|
|
209
|
+
curr[element] = {};
|
|
210
|
+
curr = curr[element];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
212
213
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
) as Promise<any>
|
|
220
|
-
).then(response => {
|
|
221
|
-
PCore.getContainerUtils().updateParentLastUpdateTime(this.pConn$.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
222
|
-
PCore.getContainerUtils().updateRelatedContextEtag(this.pConn$.getContextName(), response.headers.etag);
|
|
214
|
+
PCore.getCaseUtils()
|
|
215
|
+
.updateCaseEditFieldsData(caseKey, { [caseKey]: commitData }, caseResponse.headers.etag, this.pConn$.getContextName())
|
|
216
|
+
.then(response => {
|
|
217
|
+
PCore.getContainerUtils().updateParentLastUpdateTime(this.pConn$.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
218
|
+
PCore.getContainerUtils().updateRelatedContextEtag(this.pConn$.getContextName(), response.headers.etag);
|
|
219
|
+
});
|
|
223
220
|
});
|
|
224
|
-
});
|
|
225
221
|
}
|
|
226
222
|
}
|
|
227
223
|
|
|
@@ -235,7 +231,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
235
231
|
property: this.propName,
|
|
236
232
|
category: '',
|
|
237
233
|
context: ''
|
|
238
|
-
}
|
|
234
|
+
});
|
|
239
235
|
if (!this.canBeChangedInReviewMode && this.isDisplayModeEnabled && this.selectionMode === SELECTION_MODE.SINGLE) {
|
|
240
236
|
this.displaySingleRef = true;
|
|
241
237
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
<!-- When adding a component here, add the same component in 'region' template as well -->
|
|
2
|
-
<div *ngIf="!NO_HEADER_TEMPLATES.includes(template) && showLabel">
|
|
3
|
-
<div class="template-title-container">{{ label }}</div>
|
|
4
|
-
</div>
|
|
5
1
|
<div *ngIf="instructions" class="psdk-default-form-instruction-text">
|
|
6
2
|
<div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
|
|
7
3
|
</div>
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { Component, OnInit, Input, forwardRef } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
|
+
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
4
5
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
5
6
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
7
|
import { TemplateUtils } from '@pega/angular-sdk-components';
|
|
8
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
9
|
+
|
|
10
|
+
function areViewsChanged(oldViews: any[], newViews: any[]): boolean {
|
|
11
|
+
if (oldViews?.length !== newViews?.length) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return !oldViews?.every((oldView, index) => {
|
|
16
|
+
const newView = newViews[index];
|
|
17
|
+
return oldView.getPConnect().viewName === newView.getPConnect().viewName;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
7
20
|
|
|
8
21
|
interface DefaultFormProps {
|
|
9
22
|
// If any, enter additional props that only exist on this component
|
|
10
23
|
NumCols: string;
|
|
11
|
-
template: string;
|
|
12
24
|
instructions: string;
|
|
13
25
|
}
|
|
14
26
|
|
|
@@ -19,37 +31,38 @@ interface DefaultFormProps {
|
|
|
19
31
|
standalone: true,
|
|
20
32
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
33
|
})
|
|
22
|
-
export class DefaultFormComponent implements OnInit {
|
|
23
|
-
@Input() pConn$: typeof PConnect;
|
|
34
|
+
export class DefaultFormComponent extends FormTemplateBase implements OnInit {
|
|
35
|
+
@Input() override pConn$: typeof PConnect;
|
|
24
36
|
@Input() formGroup$: FormGroup;
|
|
25
37
|
|
|
38
|
+
// Used with AngularPConnect
|
|
39
|
+
override angularPConnectData: AngularPConnectData = {};
|
|
40
|
+
|
|
26
41
|
arChildren$: any[];
|
|
27
42
|
divClass$: string;
|
|
28
|
-
template: any;
|
|
29
|
-
showLabel: any;
|
|
30
|
-
label: any;
|
|
31
43
|
instructions: string;
|
|
32
44
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
'NarrowWideDetails',
|
|
40
|
-
'WideNarrowDetails',
|
|
41
|
-
'Confirmation'
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
constructor(private templateUtils: TemplateUtils) {}
|
|
45
|
+
constructor(
|
|
46
|
+
private angularPConnect: AngularPConnectService,
|
|
47
|
+
private templateUtils: TemplateUtils
|
|
48
|
+
) {
|
|
49
|
+
super();
|
|
50
|
+
}
|
|
45
51
|
|
|
46
52
|
ngOnInit(): void {
|
|
53
|
+
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
54
|
+
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
55
|
+
|
|
56
|
+
this.updateSelf();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
onStateChange() {
|
|
60
|
+
this.updateSelf();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
updateSelf() {
|
|
47
64
|
const configProps = this.pConn$.getConfigProps() as DefaultFormProps;
|
|
48
|
-
|
|
49
|
-
const propToUse: any = { ...this.pConn$.getInheritedProps() };
|
|
50
|
-
this.showLabel = propToUse?.showLabel;
|
|
51
|
-
this.label = propToUse?.label;
|
|
52
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
65
|
+
const kids = this.pConn$.getChildren();
|
|
53
66
|
this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
|
|
54
67
|
|
|
55
68
|
const numCols = configProps.NumCols ? configProps.NumCols : '1';
|
|
@@ -71,6 +84,10 @@ export class DefaultFormComponent implements OnInit {
|
|
|
71
84
|
// repoint children before getting templateArray
|
|
72
85
|
// Children may contain 'reference' component, so we need to
|
|
73
86
|
// normalize them
|
|
74
|
-
|
|
87
|
+
const children = ReferenceComponent.normalizePConnArray(kids[0].getPConnect().getChildren());
|
|
88
|
+
|
|
89
|
+
if (areViewsChanged(this.arChildren$, children)) {
|
|
90
|
+
this.arChildren$ = children;
|
|
91
|
+
}
|
|
75
92
|
}
|
|
76
93
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details',
|
|
@@ -9,49 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
highlightedDataArr: any[] = [];
|
|
18
16
|
showHighlightedData: boolean;
|
|
19
17
|
arFields$: any[] = [];
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps((this.pConn$.getRawMetadata() as any).config);
|
|
19
|
+
override updateSelf() {
|
|
20
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
21
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
22
|
|
|
57
23
|
if (this.showHighlightedData) {
|
|
@@ -79,7 +45,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
|
|
|
79
45
|
if (theCompType === 'reference' || theCompType === 'group') {
|
|
80
46
|
const configProps = thePConn.getConfigProps();
|
|
81
47
|
configProps.readOnly = true;
|
|
82
|
-
configProps.displayMode = '
|
|
48
|
+
configProps.displayMode = 'DISPLAY_ONLY';
|
|
83
49
|
const propToUse = { ...thePConn.getInheritedProps() };
|
|
84
50
|
configProps.label = propToUse?.label;
|
|
85
51
|
const options = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details-narrow-wide',
|
|
@@ -9,49 +9,16 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsNarrowWideComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
arFields$: any[] = [];
|
|
18
16
|
arFields2$: any[] = [];
|
|
19
17
|
highlightedDataArr: any[] = [];
|
|
20
18
|
showHighlightedData: boolean;
|
|
21
|
-
// Used with AngularPConnect
|
|
22
|
-
angularPConnectData: AngularPConnectData = {};
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
19
|
|
|
53
|
-
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
20
|
+
override updateSelf() {
|
|
21
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
23
|
|
|
57
24
|
if (this.showHighlightedData) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-one-column',
|
|
@@ -10,50 +9,16 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsOneColumnComponent
|
|
14
|
-
|
|
12
|
+
export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
15
14
|
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
18
15
|
showHighlightedData: boolean;
|
|
19
16
|
highlightedDataArr: any;
|
|
20
17
|
|
|
21
18
|
arFields$: any[] = [];
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
ngOnInit(): void {
|
|
27
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
28
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
29
|
-
|
|
30
|
-
// this.updateSelf();
|
|
31
|
-
this.checkAndUpdate();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
ngOnDestroy() {
|
|
35
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
36
|
-
this.angularPConnectData.unsubscribeFn();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
onStateChange() {
|
|
41
|
-
this.checkAndUpdate();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
checkAndUpdate() {
|
|
45
|
-
// Should always check the bridge to see if the component should
|
|
46
|
-
// update itself (re-render)
|
|
47
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
48
|
-
|
|
49
|
-
// ONLY call updateSelf when the component should update
|
|
50
|
-
if (bUpdateSelf) {
|
|
51
|
-
this.updateSelf();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
updateSelf() {
|
|
56
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps((this.pConn$.getRawMetadata() as any).config);
|
|
20
|
+
override updateSelf() {
|
|
21
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
57
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
58
23
|
|
|
59
24
|
if (this.showHighlightedData) {
|
|
@@ -70,7 +35,7 @@ export class DetailsOneColumnComponent implements OnInit, OnDestroy {
|
|
|
70
35
|
});
|
|
71
36
|
}
|
|
72
37
|
|
|
73
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
38
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
74
39
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
75
40
|
|
|
76
41
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
*ngIf="tab.content?.getPConnect()"
|
|
6
6
|
[name]="tab.content?.getPConnect().getComponentName()"
|
|
7
7
|
[props]="{
|
|
8
|
-
pConn$: tab.content?.getPConnect()
|
|
9
|
-
formGroup$: formGroup$
|
|
8
|
+
pConn$: tab.content?.getPConnect()
|
|
10
9
|
}"
|
|
11
10
|
errorMsg="Details Sub tabs wants component not yet available: {{ tab.content?.getPConnect().getComponentName() }}"
|
|
12
11
|
></component-mapper>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
4
3
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
5
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
6
4
|
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/angular-sdk-components';
|
|
7
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
8
7
|
|
|
9
8
|
@Component({
|
|
10
9
|
selector: 'app-details-sub-tabs',
|
|
@@ -13,45 +12,14 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
13
12
|
standalone: true,
|
|
14
13
|
imports: [MatTabsModule, CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
15
14
|
})
|
|
16
|
-
export class DetailsSubTabsComponent
|
|
17
|
-
|
|
18
|
-
@Input() formGroup$: FormGroup;
|
|
15
|
+
export class DetailsSubTabsComponent extends DetailsTemplateBase {
|
|
16
|
+
override pConn$: typeof PConnect;
|
|
19
17
|
|
|
20
|
-
angularPConnectData: AngularPConnectData = {};
|
|
21
18
|
currentTabId = '0';
|
|
22
19
|
tabItems: any[];
|
|
23
20
|
availableTabs: any[];
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ngOnInit(): void {
|
|
28
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
29
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
30
|
-
this.checkAndUpdate();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ngOnDestroy() {
|
|
34
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
35
|
-
this.angularPConnectData.unsubscribeFn();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
onStateChange() {
|
|
40
|
-
this.checkAndUpdate();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
checkAndUpdate() {
|
|
44
|
-
// Should always check the bridge to see if the component should
|
|
45
|
-
// update itself (re-render)
|
|
46
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
47
|
-
|
|
48
|
-
// ONLY call updateSelf when the component should update
|
|
49
|
-
if (bUpdateSelf) {
|
|
50
|
-
this.updateSelf();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
updateSelf() {
|
|
22
|
+
override updateSelf() {
|
|
55
23
|
const children = this.pConn$?.getChildren();
|
|
56
24
|
const deferLoadedTabs = children[0];
|
|
57
25
|
this.availableTabs = getVisibleTabs(deferLoadedTabs, 'tabsSubs');
|