@pega/angular-sdk-overrides 0.24.9 → 0.242.2
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/operator/operator.component.ts +1 -1
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -7
- package/lib/field/auto-complete/auto-complete.component.ts +3 -3
- package/lib/field/check-box/check-box.component.ts +3 -3
- package/lib/field/currency/currency.component.ts +3 -3
- package/lib/field/date/date.component.ts +3 -3
- package/lib/field/date-time/date-time.component.ts +2 -2
- package/lib/field/decimal/decimal.component.ts +4 -4
- package/lib/field/dropdown/dropdown.component.ts +3 -3
- package/lib/field/email/email.component.ts +1 -1
- package/lib/field/group/group.component.ts +2 -2
- package/lib/field/integer/integer.component.ts +1 -1
- package/lib/field/multiselect/multiselect.component.ts +4 -2
- package/lib/field/percentage/percentage.component.ts +2 -2
- package/lib/field/phone/phone.component.ts +1 -1
- package/lib/field/radio-buttons/radio-buttons.component.ts +2 -2
- package/lib/field/rich-text/rich-text.component.ts +3 -3
- package/lib/field/scalar-list/scalar-list.component.ts +3 -4
- package/lib/field/text-area/text-area.component.ts +1 -1
- package/lib/field/text-input/text-input.component.ts +1 -1
- package/lib/field/time/time.component.ts +1 -1
- package/lib/field/url/url.component.ts +1 -1
- package/lib/field/user-reference/user-reference.component.ts +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +9 -6
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -1
- 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/assignment/assignment.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.ts +4 -4
- package/lib/infra/navbar/navbar.component.ts +3 -3
- package/lib/infra/root-container/root-container.component.ts +3 -3
- package/lib/infra/view/view.component.html +6 -19
- package/lib/template/app-shell/app-shell.component.ts +20 -2
- package/lib/template/case-summary/case-summary.component.ts +1 -1
- package/lib/template/case-view/case-view.component.ts +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.ts +7 -4
- package/lib/template/details/details.component.ts +2 -2
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +1 -1
- package/lib/template/details-one-column/details-one-column.component.ts +2 -2
- package/lib/template/details-three-column/details-three-column.component.ts +2 -2
- package/lib/template/details-two-column/details-two-column.component.ts +2 -2
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +2 -2
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +2 -2
- package/lib/template/field-group-template/field-group-template.component.ts +2 -4
- package/lib/template/field-value-list/field-value-list.component.html +1 -1
- package/lib/template/form-template-base/form-template-base.component.ts +10 -0
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
- package/lib/template/list-view/list-view.component.ts +3 -3
- package/lib/template/list-view/listViewHelpers.ts +1 -1
- 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 +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +15 -13
- 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/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 -7
- package/lib/widget/file-utility/file-utility.component.ts +2 -5
- package/lib/widget/todo/todo.component.html +2 -2
- package/lib/widget/todo/todo.component.ts +93 -83
- package/package.json +1 -1
|
@@ -81,7 +81,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
81
81
|
this.resourceType = resourceType;
|
|
82
82
|
this.isContainerPreview = /preview_[0-9]*/g.test(this.pConn$.getContextName());
|
|
83
83
|
|
|
84
|
-
const theConfigProps
|
|
84
|
+
const theConfigProps = this.pConn$.getConfigProps();
|
|
85
85
|
this.deferLoadId = theConfigProps.deferLoadId;
|
|
86
86
|
this.name = this.name || theConfigProps.name;
|
|
87
87
|
|
|
@@ -91,8 +91,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
91
91
|
getViewOptions = () => ({
|
|
92
92
|
viewContext: this.resourceType,
|
|
93
93
|
pageClass: this.loadViewCaseID ? '' : this.pConn$.getDataObject().pyPortal.classID,
|
|
94
|
-
container: this.isContainerPreview ? 'preview' :
|
|
95
|
-
containerName: this.isContainerPreview ? 'preview' :
|
|
94
|
+
container: this.isContainerPreview ? 'preview' : undefined,
|
|
95
|
+
containerName: this.isContainerPreview ? 'preview' : undefined,
|
|
96
96
|
updateData: this.isContainerPreview
|
|
97
97
|
});
|
|
98
98
|
|
|
@@ -116,7 +116,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
const configObject = PCore.createPConnect(config);
|
|
119
|
-
configObject.getPConnect().setInheritedProp('displayMode', '
|
|
119
|
+
configObject.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
120
120
|
this.loadedPConn$ = ReferenceComponent.normalizePConn(configObject.getPConnect());
|
|
121
121
|
this.componentName$ = this.loadedPConn$.getComponentName();
|
|
122
122
|
if (this.deferLoadId) {
|
|
@@ -36,11 +36,11 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
36
36
|
navExpandCollapse$: string;
|
|
37
37
|
bShowCaseTypes$ = false;
|
|
38
38
|
|
|
39
|
-
portalApp
|
|
39
|
+
portalApp$: string | undefined = '';
|
|
40
40
|
portalLogoImage$: string;
|
|
41
41
|
showAppName$?: boolean = false;
|
|
42
42
|
|
|
43
|
-
portalOperator$: string;
|
|
43
|
+
portalOperator$: string | undefined;
|
|
44
44
|
portalOperatorInitials$: string;
|
|
45
45
|
|
|
46
46
|
actionsAPI: any;
|
|
@@ -131,7 +131,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
131
131
|
|
|
132
132
|
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
133
133
|
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
134
|
-
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$);
|
|
134
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
135
135
|
this.showAppName$ = this.configProps$.showAppName;
|
|
136
136
|
|
|
137
137
|
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
@@ -67,7 +67,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
67
67
|
const { containers } = PCore.getStore().getState();
|
|
68
68
|
const items = Object.keys(containers).filter(item => item.includes('root'));
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
PCore.getContainerUtils().getContainerAPI().addContainerItems(items);
|
|
71
71
|
|
|
72
72
|
// add preview and modalview containers to redux
|
|
73
73
|
// keep local copies of the the pConnect that is related
|
|
@@ -156,7 +156,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
156
156
|
if (items[key] && items[key].view && Object.keys(items[key].view).length > 0) {
|
|
157
157
|
const itemView = items[key].view;
|
|
158
158
|
|
|
159
|
-
const rootObject
|
|
159
|
+
const rootObject = PCore.createPConnect({
|
|
160
160
|
meta: itemView,
|
|
161
161
|
options: {
|
|
162
162
|
context: items[key].context
|
|
@@ -202,7 +202,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
202
202
|
|
|
203
203
|
this.componentName$ = localPConn.getComponentName();
|
|
204
204
|
if (this.componentName$ === 'ViewContainer') {
|
|
205
|
-
const configProps
|
|
205
|
+
const configProps = this.pConn$.getConfigProps();
|
|
206
206
|
const viewContConfig = {
|
|
207
207
|
meta: {
|
|
208
208
|
type: 'ViewContainer',
|
|
@@ -14,25 +14,12 @@
|
|
|
14
14
|
</ng-container>
|
|
15
15
|
|
|
16
16
|
<ng-template #noTemplate>
|
|
17
|
-
<div *
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
errorMsg="View Missing (displayOnlyFA): {{ kid.getPConnect().getComponentName() }}"
|
|
24
|
-
></component-mapper>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
17
|
+
<div *ngFor="let kid of arChildren$">
|
|
18
|
+
<component-mapper
|
|
19
|
+
[name]="kid.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: kid.getPConnect() }"
|
|
21
|
+
errorMsg="View Missing (displayAll): {{ kid.getPConnect().getComponentName() }}"
|
|
22
|
+
></component-mapper>
|
|
27
23
|
</div>
|
|
28
|
-
<ng-template #displayAll>
|
|
29
|
-
<div *ngFor="let kid of arChildren$">
|
|
30
|
-
<component-mapper
|
|
31
|
-
[name]="kid.getPConnect().getComponentName()"
|
|
32
|
-
[props]="{ pConn$: kid.getPConnect() }"
|
|
33
|
-
errorMsg="View Missing (displayAll): {{ kid.getPConnect().getComponentName() }}"
|
|
34
|
-
></component-mapper>
|
|
35
|
-
</div>
|
|
36
|
-
</ng-template>
|
|
37
24
|
</ng-template>
|
|
38
25
|
</div>
|
|
@@ -78,9 +78,27 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
78
78
|
if (this.pages$) {
|
|
79
79
|
this.bShowAppShell$ = true;
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
// @ts-ignore - Property 'pyCaseTypesAvailableToCreateDP' does not exist on type pxApplication
|
|
83
|
+
const caseTypesAvailableToCreateDP = PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP;
|
|
84
|
+
if (caseTypesAvailableToCreateDP) {
|
|
85
|
+
const portalID = this.pConn$.getValue('.pyOwner');
|
|
86
|
+
PCore.getDataPageUtils()
|
|
87
|
+
.getPageDataAsync(caseTypesAvailableToCreateDP, this.pConn$.getContextName(), {
|
|
88
|
+
PortalName: portalID
|
|
89
|
+
})
|
|
90
|
+
.then((response: any) => {
|
|
91
|
+
if (response?.pyCaseTypesAvailableToCreate) {
|
|
92
|
+
this.pConn$.replaceState('.pyCaseTypesAvailableToCreate', response.pyCaseTypesAvailableToCreate, {
|
|
93
|
+
skipDirtyValidation: true
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
81
99
|
this.caseTypes$ = this.configProps$.caseTypes;
|
|
82
100
|
|
|
83
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
101
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
84
102
|
|
|
85
103
|
this.portalTemplate = this.configProps$.portalTemplate;
|
|
86
104
|
|
|
@@ -129,7 +147,7 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
129
147
|
}
|
|
130
148
|
|
|
131
149
|
this.caseTypes$ = this.configProps$.caseTypes;
|
|
132
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
150
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
133
151
|
});
|
|
134
152
|
}
|
|
135
153
|
|
|
@@ -55,7 +55,7 @@ export class CaseSummaryComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
55
55
|
// Then, continue on with other initialization
|
|
56
56
|
|
|
57
57
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as CaseSummaryProps;
|
|
58
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
58
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
59
59
|
|
|
60
60
|
this.generatePrimaryAndSecondaryFields();
|
|
61
61
|
|
|
@@ -120,7 +120,7 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
120
120
|
if (hasNewAttachments !== this.bHasNewAttachments) {
|
|
121
121
|
this.bHasNewAttachments = hasNewAttachments;
|
|
122
122
|
if (this.bHasNewAttachments) {
|
|
123
|
-
PCore.getPubSubUtils().publish(
|
|
123
|
+
PCore.getPubSubUtils().publish(PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -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
|
}
|
|
@@ -4,6 +4,7 @@ import { FormGroup } from '@angular/forms';
|
|
|
4
4
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
5
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
6
|
import { TemplateUtils } from '@pega/angular-sdk-components';
|
|
7
|
+
import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
|
|
7
8
|
|
|
8
9
|
interface DefaultFormProps {
|
|
9
10
|
// If any, enter additional props that only exist on this component
|
|
@@ -19,8 +20,8 @@ interface DefaultFormProps {
|
|
|
19
20
|
standalone: true,
|
|
20
21
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
22
|
})
|
|
22
|
-
export class DefaultFormComponent implements OnInit {
|
|
23
|
-
@Input() pConn$: typeof PConnect;
|
|
23
|
+
export class DefaultFormComponent extends FormTemplateBaseComponent implements OnInit {
|
|
24
|
+
@Input() override pConn$: typeof PConnect;
|
|
24
25
|
@Input() formGroup$: FormGroup;
|
|
25
26
|
|
|
26
27
|
arChildren$: any[];
|
|
@@ -41,7 +42,9 @@ export class DefaultFormComponent implements OnInit {
|
|
|
41
42
|
'Confirmation'
|
|
42
43
|
];
|
|
43
44
|
|
|
44
|
-
constructor(private templateUtils: TemplateUtils) {
|
|
45
|
+
constructor(private templateUtils: TemplateUtils) {
|
|
46
|
+
super();
|
|
47
|
+
}
|
|
45
48
|
|
|
46
49
|
ngOnInit(): void {
|
|
47
50
|
const configProps = this.pConn$.getConfigProps() as DefaultFormProps;
|
|
@@ -49,7 +52,7 @@ export class DefaultFormComponent implements OnInit {
|
|
|
49
52
|
const propToUse: any = { ...this.pConn$.getInheritedProps() };
|
|
50
53
|
this.showLabel = propToUse?.showLabel;
|
|
51
54
|
this.label = propToUse?.label;
|
|
52
|
-
const kids = this.pConn$.getChildren()
|
|
55
|
+
const kids = this.pConn$.getChildren();
|
|
53
56
|
this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
|
|
54
57
|
|
|
55
58
|
const numCols = configProps.NumCols ? configProps.NumCols : '1';
|
|
@@ -51,7 +51,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
54
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
55
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
56
|
|
|
57
57
|
if (this.showHighlightedData) {
|
|
@@ -79,7 +79,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
|
|
|
79
79
|
if (theCompType === 'reference' || theCompType === 'group') {
|
|
80
80
|
const configProps = thePConn.getConfigProps();
|
|
81
81
|
configProps.readOnly = true;
|
|
82
|
-
configProps.displayMode = '
|
|
82
|
+
configProps.displayMode = 'DISPLAY_ONLY';
|
|
83
83
|
const propToUse = { ...thePConn.getInheritedProps() };
|
|
84
84
|
configProps.label = propToUse?.label;
|
|
85
85
|
const options = {
|
|
@@ -51,7 +51,7 @@ export class DetailsNarrowWideComponent implements OnInit, OnDestroy {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
54
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
55
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
56
|
|
|
57
57
|
if (this.showHighlightedData) {
|
|
@@ -53,7 +53,7 @@ export class DetailsOneColumnComponent implements OnInit, OnDestroy {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
updateSelf() {
|
|
56
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
56
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
57
57
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
58
58
|
|
|
59
59
|
if (this.showHighlightedData) {
|
|
@@ -70,7 +70,7 @@ export class DetailsOneColumnComponent implements OnInit, OnDestroy {
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
73
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
74
74
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
75
75
|
|
|
76
76
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -58,7 +58,7 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
updateSelf() {
|
|
61
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
61
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
62
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
63
|
|
|
64
64
|
if (this.showHighlightedData) {
|
|
@@ -75,7 +75,7 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
78
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
79
79
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
80
80
|
|
|
81
81
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -58,7 +58,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
updateSelf() {
|
|
61
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
61
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
62
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
63
|
|
|
64
64
|
if (this.showHighlightedData) {
|
|
@@ -75,7 +75,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
78
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
79
79
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
80
80
|
|
|
81
81
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -54,7 +54,7 @@ export class DetailsWideNarrowComponent implements OnInit, OnDestroy {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
updateSelf() {
|
|
57
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
57
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
58
58
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
59
59
|
|
|
60
60
|
if (this.showHighlightedData) {
|
|
@@ -71,7 +71,7 @@ export class DetailsWideNarrowComponent implements OnInit, OnDestroy {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
74
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
75
75
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
76
76
|
|
|
77
77
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -59,10 +59,10 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
|
|
|
59
59
|
const { tablabel } = this.pConn$.getComponentConfig();
|
|
60
60
|
const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
|
|
61
61
|
|
|
62
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
62
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
63
63
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
64
64
|
|
|
65
|
-
const referenceListData
|
|
65
|
+
const referenceListData = this.pConn$.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
66
66
|
|
|
67
67
|
this.tabsItems =
|
|
68
68
|
referenceListData?.map((item, i) => {
|
|
@@ -105,7 +105,7 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
105
105
|
|
|
106
106
|
const renderMode = this.configProps$.renderMode;
|
|
107
107
|
const displayMode = this.configProps$.displayMode;
|
|
108
|
-
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === '
|
|
108
|
+
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
|
|
109
109
|
this.contextClass = this.configProps$.contextClass;
|
|
110
110
|
const lookForChildInConfig = this.configProps$.lookForChildInConfig;
|
|
111
111
|
this.heading = this.configProps$.heading ?? 'Row';
|
|
@@ -114,7 +114,7 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
114
114
|
this.pageReference = `${this.pConn$.getPageReference()}${resolvedList}`;
|
|
115
115
|
this.pConn$.setReferenceList(resolvedList);
|
|
116
116
|
if (this.readonlyMode) {
|
|
117
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
117
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
118
118
|
}
|
|
119
119
|
this.referenceList = this.configProps$.referenceList;
|
|
120
120
|
if (this.prevRefLength != this.referenceList.length) {
|
|
@@ -149,12 +149,10 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
addFieldGroupItem() {
|
|
152
|
-
// @ts-ignore - second parameter "pageRef" is optional for insert method
|
|
153
152
|
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
deleteFieldGroupItem(index) {
|
|
157
|
-
// @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
|
|
158
156
|
this.pConn$.getListActions().deleteEntry(index);
|
|
159
157
|
}
|
|
160
158
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div *ngIf="displayMode$ === '
|
|
1
|
+
<div *ngIf="displayMode$ === 'DISPLAY_ONLY'; else STACKED_LARGE_VAL" class="psdk-container-labels-left">
|
|
2
2
|
<div class="psdk-grid-label">{{ label$ }}</div>
|
|
3
3
|
<div class="psdk-val-labels-left">
|
|
4
4
|
<ng-container *ngTemplateOutlet="valueTemplate"></ng-container>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Directive, OnDestroy } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive()
|
|
4
|
+
export class FormTemplateBaseComponent implements OnDestroy {
|
|
5
|
+
pConn$: any;
|
|
6
|
+
|
|
7
|
+
ngOnDestroy(): void {
|
|
8
|
+
PCore.getContextTreeManager().removeContextTreeNode(this.pConn$.getContextName());
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -45,8 +45,8 @@ export class InlineDashboardPageComponent implements OnInit, OnChanges {
|
|
|
45
45
|
|
|
46
46
|
updateSelf() {
|
|
47
47
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as InlineDashboardPageProps;
|
|
48
|
-
const arChildren$ = this.pConn$.getChildren()
|
|
49
|
-
const allFilters =
|
|
48
|
+
const arChildren$ = this.pConn$.getChildren();
|
|
49
|
+
const allFilters = this.pConn$.getRawMetadata()?.children[1];
|
|
50
50
|
const filterComponents = buildFilterComponents(this.pConn$, allFilters);
|
|
51
51
|
this.inlineProps = this.configProps$;
|
|
52
52
|
this.children[0] = arChildren$[0];
|
|
@@ -22,7 +22,7 @@ import { getCurrencyOptions } from '@pega/angular-sdk-components';
|
|
|
22
22
|
import { getLocale, getSeconds } from '@pega/angular-sdk-components';
|
|
23
23
|
import { formatters } from '@pega/angular-sdk-components';
|
|
24
24
|
|
|
25
|
-
import {
|
|
25
|
+
import { init } from './listViewHelpers';
|
|
26
26
|
|
|
27
27
|
declare const window: any;
|
|
28
28
|
|
|
@@ -218,7 +218,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
218
218
|
if (!this.payload) {
|
|
219
219
|
this.payload = { referenceList: this.configProps$.referenceList };
|
|
220
220
|
}
|
|
221
|
-
|
|
221
|
+
init({
|
|
222
222
|
pConn$: this.pConn$,
|
|
223
223
|
bInForm$: this.bInForm$,
|
|
224
224
|
...this.payload,
|
|
@@ -961,7 +961,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
961
961
|
|
|
962
962
|
filterDataWithDate(item, filterObj, filterValue) {
|
|
963
963
|
let bKeep;
|
|
964
|
-
let value = item[filterObj.ref] != null
|
|
964
|
+
let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
|
|
965
965
|
filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;
|
|
966
966
|
|
|
967
967
|
switch (filterObj.containsFilter) {
|
|
@@ -3,7 +3,7 @@ import { getContext, readContextResponse } from './utils';
|
|
|
3
3
|
// Remove this and use "real" PCore type once .d.ts is fixed (currently shows 1 error)
|
|
4
4
|
declare const PCore: any;
|
|
5
5
|
|
|
6
|
-
export function
|
|
6
|
+
export function init(props) {
|
|
7
7
|
const {
|
|
8
8
|
referenceList,
|
|
9
9
|
pConn$,
|
|
@@ -2,6 +2,7 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
+
import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
|
|
5
6
|
|
|
6
7
|
@Component({
|
|
7
8
|
selector: 'app-one-column',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class OneColumnComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class OneColumnComponent extends FormTemplateBaseComponent implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class OneColumnComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -34,7 +34,7 @@ export class PageComponent implements OnInit, OnDestroy {
|
|
|
34
34
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
35
35
|
|
|
36
36
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as PageProps;
|
|
37
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
37
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
38
38
|
|
|
39
39
|
this.title$ = this.configProps$.title;
|
|
40
40
|
const operator = this.configProps$.operator;
|
|
@@ -81,7 +81,7 @@ export class PromotedFiltersComponent implements OnInit, OnDestroy {
|
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
const filtersWithClassID = { ...this.filtersProperties, classID: this.pageClass };
|
|
84
|
-
this.transientItemID =
|
|
84
|
+
this.transientItemID = this.pConn$.getContainerManager().addTransientItem({ id: this.viewName, data: filtersWithClassID });
|
|
85
85
|
this.processedFilters = [];
|
|
86
86
|
this.filters.forEach(filter => {
|
|
87
87
|
const filterClone = { ...filter };
|
|
@@ -107,7 +107,7 @@ export class RepeatingStructuresComponent implements OnInit, AfterViewInit {
|
|
|
107
107
|
openAssignment(row) {
|
|
108
108
|
const { pxRefObjectClass, pzInsKey } = row;
|
|
109
109
|
const sTarget = this.pConn$.getContainerName();
|
|
110
|
-
const options
|
|
110
|
+
const options = { containerName: sTarget };
|
|
111
111
|
this.pConn$
|
|
112
112
|
.getActionsApi()
|
|
113
113
|
.openAssignment(pzInsKey, pxRefObjectClass, options)
|