@pega/angular-sdk-overrides 23.1.10 → 24.2.10
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.html +7 -4
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +3 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +1 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +4 -1
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.html +1 -1
- package/lib/designSystemExtension/operator/operator.component.ts +11 -6
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -7
- package/lib/field/auto-complete/auto-complete.component.ts +17 -14
- package/lib/field/cancel-alert/cancel-alert.component.ts +0 -2
- package/lib/field/check-box/check-box.component.html +16 -15
- package/lib/field/check-box/check-box.component.scss +14 -1
- package/lib/field/check-box/check-box.component.ts +128 -45
- package/lib/field/currency/currency.component.html +16 -7
- package/lib/field/currency/currency.component.ts +55 -20
- package/lib/field/date/date.component.html +1 -6
- package/lib/field/date/date.component.ts +22 -39
- package/lib/field/date-time/date-time.component.html +6 -7
- package/lib/field/date-time/date-time.component.ts +28 -45
- package/lib/field/decimal/decimal.component.html +14 -4
- package/lib/field/decimal/decimal.component.ts +47 -7
- package/lib/field/dropdown/dropdown.component.ts +132 -21
- package/lib/field/email/email.component.ts +14 -4
- package/lib/field/group/group.component.html +1 -1
- package/lib/field/group/group.component.ts +6 -2
- package/lib/field/integer/integer.component.html +1 -1
- package/lib/field/integer/integer.component.ts +13 -5
- package/lib/field/multiselect/multiselect.component.html +33 -0
- package/lib/field/multiselect/multiselect.component.scss +7 -0
- package/lib/field/multiselect/multiselect.component.spec.ts +21 -0
- package/lib/field/multiselect/multiselect.component.ts +369 -0
- package/lib/field/multiselect/utils.ts +209 -0
- package/lib/field/percentage/percentage.component.html +17 -6
- package/lib/field/percentage/percentage.component.ts +51 -12
- package/lib/field/phone/phone.component.html +1 -1
- package/lib/field/phone/phone.component.ts +11 -14
- package/lib/field/radio-buttons/radio-buttons.component.ts +9 -12
- package/lib/field/rich-text/config-ext.json +10 -0
- package/lib/field/rich-text/rich-text.component.html +1 -1
- package/lib/field/rich-text/rich-text.component.ts +8 -6
- package/lib/field/scalar-list/scalar-list.component.ts +4 -4
- package/lib/field/text/text.component.ts +2 -0
- package/lib/field/text-area/text-area.component.html +2 -1
- package/lib/field/text-area/text-area.component.ts +13 -8
- package/lib/field/text-input/text-input.component.html +1 -1
- package/lib/field/text-input/text-input.component.ts +13 -5
- package/lib/field/time/time.component.html +3 -2
- package/lib/field/time/time.component.ts +23 -7
- package/lib/field/url/url.component.html +2 -1
- package/lib/field/url/url.component.ts +15 -5
- package/lib/field/user-reference/user-reference.component.html +42 -45
- package/lib/field/user-reference/user-reference.component.ts +73 -27
- package/lib/infra/Containers/base-components/flow-container-base.component.ts +22 -0
- package/lib/infra/Containers/base-components/helper.ts +89 -0
- package/lib/infra/Containers/flow-container/flow-container.component.html +9 -4
- package/lib/infra/Containers/flow-container/flow-container.component.ts +38 -33
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +41 -9
- 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 -18
- package/lib/infra/assignment/assignment.component.ts +37 -39
- package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.ts +9 -12
- package/lib/infra/multi-step/multi-step.component.html +1 -1
- package/lib/infra/multi-step/multi-step.component.scss +1 -0
- package/lib/infra/navbar/navbar.component.html +4 -4
- package/lib/infra/navbar/navbar.component.ts +9 -6
- package/lib/infra/root-container/root-container.component.ts +3 -3
- 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 +21 -3
- package/lib/template/app-shell/app-shell.component.ts +20 -2
- package/lib/template/banner-page/config-ext.json +9 -0
- package/lib/template/base/details-template-base.ts +67 -0
- package/lib/template/base/form-template-base.ts +10 -0
- package/lib/template/case-summary/case-summary.component.ts +38 -4
- package/lib/template/case-view/case-view.component.html +7 -7
- package/lib/template/case-view/case-view.component.scss +2 -0
- package/lib/template/case-view/case-view.component.ts +8 -19
- package/lib/template/confirmation/confirmation.component.ts +1 -1
- package/lib/template/data-reference/data-reference.component.ts +37 -43
- package/lib/template/default-form/default-form.component.html +0 -4
- package/lib/template/default-form/default-form.component.ts +7 -23
- 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 -4
- package/lib/template/field-group-template/field-group-template.component.ts +4 -14
- package/lib/template/field-value-list/field-value-list.component.html +8 -3
- package/lib/template/field-value-list/field-value-list.component.scss +2 -1
- package/lib/template/field-value-list/field-value-list.component.ts +1 -0
- package/lib/template/inline-dashboard-page/config-ext.json +9 -0
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
- package/lib/template/list-view/list-view.component.html +9 -6
- package/lib/template/list-view/list-view.component.scss +11 -0
- package/lib/template/list-view/list-view.component.ts +60 -32
- package/lib/template/list-view/listViewHelpers.ts +1 -2
- 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 +2 -3
- package/lib/template/simple-table/simple-table.component.ts +0 -2
- package/lib/template/simple-table-manual/helpers.ts +2 -2
- package/lib/template/simple-table-manual/simple-table-manual.component.html +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +1 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +60 -28
- package/lib/template/simple-table-select/simple-table-select.component.ts +5 -7
- 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.html +1 -1
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +5 -4
- package/lib/widget/attachment/attachment.component.html +50 -26
- package/lib/widget/attachment/attachment.component.scss +118 -0
- package/lib/widget/attachment/attachment.component.ts +256 -503
- package/lib/widget/case-history/case-history.component.ts +1 -2
- package/lib/widget/feed-container/feed-container.component.ts +7 -11
- package/lib/widget/file-utility/file-utility.component.html +2 -2
- package/lib/widget/file-utility/file-utility.component.ts +15 -22
- package/lib/widget/list-utility/list-utility.component.html +1 -1
- package/lib/widget/quick-create/config-ext.json +9 -0
- package/lib/widget/quick-create/quick-create.component.ts +1 -1
- package/lib/widget/todo/todo.component.html +8 -7
- package/lib/widget/todo/todo.component.ts +97 -86
- package/package.json +1 -1
|
@@ -44,7 +44,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
44
44
|
|
|
45
45
|
ngOnInit(): void {
|
|
46
46
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
47
|
-
|
|
47
|
+
// The below call is causing an error while creating/opening a case, hence commenting it out
|
|
48
|
+
// this.loadActiveTab();
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
ngOnDestroy(): void {
|
|
@@ -56,7 +57,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
56
57
|
onStateChange() {
|
|
57
58
|
// Should always check the bridge to see if the component should
|
|
58
59
|
// update itself (re-render)
|
|
59
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
60
60
|
const theRequestedAssignment = this.pConn$.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL);
|
|
61
61
|
if (theRequestedAssignment !== this.currentLoadedAssignment) {
|
|
62
62
|
this.currentLoadedAssignment = theRequestedAssignment;
|
|
@@ -65,7 +65,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
ngOnChanges() {
|
|
68
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
69
68
|
this.loadViewCaseID = this.pConn$.getValue(this.constants.PZINSKEY) || this.pConn$.getValue(this.constants.CASE_INFO.CASE_INFO_ID);
|
|
70
69
|
let containerItemData;
|
|
71
70
|
const targetName = this.pConn$.getTarget();
|
|
@@ -82,7 +81,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
82
81
|
this.resourceType = resourceType;
|
|
83
82
|
this.isContainerPreview = /preview_[0-9]*/g.test(this.pConn$.getContextName());
|
|
84
83
|
|
|
85
|
-
const theConfigProps
|
|
84
|
+
const theConfigProps = this.pConn$.getConfigProps();
|
|
86
85
|
this.deferLoadId = theConfigProps.deferLoadId;
|
|
87
86
|
this.name = this.name || theConfigProps.name;
|
|
88
87
|
|
|
@@ -91,10 +90,9 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
91
90
|
|
|
92
91
|
getViewOptions = () => ({
|
|
93
92
|
viewContext: this.resourceType,
|
|
94
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
95
93
|
pageClass: this.loadViewCaseID ? '' : this.pConn$.getDataObject().pyPortal.classID,
|
|
96
|
-
container: this.isContainerPreview ? 'preview' :
|
|
97
|
-
containerName: this.isContainerPreview ? 'preview' :
|
|
94
|
+
container: this.isContainerPreview ? 'preview' : undefined,
|
|
95
|
+
containerName: this.isContainerPreview ? 'preview' : undefined,
|
|
98
96
|
updateData: this.isContainerPreview
|
|
99
97
|
});
|
|
100
98
|
|
|
@@ -118,7 +116,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
118
116
|
}
|
|
119
117
|
};
|
|
120
118
|
const configObject = PCore.createPConnect(config);
|
|
121
|
-
configObject.getPConnect().setInheritedProp('displayMode', '
|
|
119
|
+
configObject.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
122
120
|
this.loadedPConn$ = ReferenceComponent.normalizePConn(configObject.getPConnect());
|
|
123
121
|
this.componentName$ = this.loadedPConn$.getComponentName();
|
|
124
122
|
if (this.deferLoadId) {
|
|
@@ -138,9 +136,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
138
136
|
this.pConn$
|
|
139
137
|
.getActionsApi()
|
|
140
138
|
.showData(this.name, dataContext, dataContextParameters, {
|
|
141
|
-
// @ts-ignore - skipSemanticUrl should be boolean type
|
|
142
139
|
skipSemanticUrl: true,
|
|
143
|
-
// @ts-ignore
|
|
140
|
+
// @ts-ignore - Object literal may only specify known properties, and 'isDeferLoaded' does not exist in type '{ containerName: string; skipSemanticUrl: boolean; }'
|
|
144
141
|
isDeferLoaded: true
|
|
145
142
|
})
|
|
146
143
|
.then(data => {
|
|
@@ -160,8 +157,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
160
157
|
} else {
|
|
161
158
|
this.pConn$
|
|
162
159
|
.getActionsApi()
|
|
163
|
-
.refreshCaseView(encodeURI(this.loadViewCaseID), this.name,
|
|
164
|
-
.then(data => {
|
|
160
|
+
.refreshCaseView(encodeURI(this.loadViewCaseID), this.name, '')
|
|
161
|
+
.then((data: any) => {
|
|
165
162
|
this.onResponse(data.root);
|
|
166
163
|
});
|
|
167
164
|
}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<span>{{ i + 1 }}</span>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
|
-
<div class="{{ _getHLabelClass(mainStep.visited_status) }}">
|
|
57
|
+
<div id="multi-step-label" class="{{ _getHLabelClass(mainStep.visited_status) }}">
|
|
58
58
|
<div class="psdk-horizontal-step-text-label">
|
|
59
59
|
{{ mainStep.name }}
|
|
60
60
|
</div>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*ngFor="let caseType of caseTypes$"
|
|
23
23
|
(click)="navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)"
|
|
24
24
|
>
|
|
25
|
-
<span class="psdk-nav-button-span">{{ caseType.pyLabel }}</span>
|
|
25
|
+
<span class="psdk-nav-button-span">{{ localeUtils.getLocaleValue(caseType.pyLabel, '', localeReference) }}</span>
|
|
26
26
|
</mat-list-item>
|
|
27
27
|
</mat-list>
|
|
28
28
|
</mat-list>
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
<mat-list-item (click)="navPanelButtonClick(page)">
|
|
33
33
|
<div class="flex-box">
|
|
34
34
|
<img class="psdk-nav-svg-icon" src="{{ page.iconName }}" />
|
|
35
|
-
<span class="psdk-nav-button-span">{{
|
|
35
|
+
<span class="psdk-nav-button-span">{{ localeUtils.getLocaleValue(page.pyLabel, '', localeReference) }}</span>
|
|
36
36
|
</div>
|
|
37
37
|
</mat-list-item>
|
|
38
38
|
</mat-list>
|
|
39
39
|
</div>
|
|
40
40
|
<div class="psdk-nav-divider"></div>
|
|
41
41
|
<div>
|
|
42
|
-
<mat-list>
|
|
42
|
+
<mat-list id="profile">
|
|
43
43
|
<mat-list-item [matMenuTriggerFor]="menu" class="psdk-profile-list-item">
|
|
44
44
|
<div class="flex-box">
|
|
45
45
|
<div class="psdk-nav-oper-avatar">{{ portalOperatorInitials$ }}</div>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</mat-list-item>
|
|
49
49
|
<mat-menu #menu="matMenu">
|
|
50
50
|
<button mat-menu-item>Profile</button>
|
|
51
|
-
<button mat-menu-item (click)="navPanelLogoutClick()">{{ localizedVal('
|
|
51
|
+
<button mat-menu-item (click)="navPanelLogoutClick()">{{ localizedVal('Log off', localeCategory) }}</button>
|
|
52
52
|
</mat-menu>
|
|
53
53
|
</mat-list>
|
|
54
54
|
</div>
|
|
@@ -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;
|
|
@@ -51,7 +51,8 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
51
51
|
navIcon$: string;
|
|
52
52
|
localizedVal: any;
|
|
53
53
|
localeCategory = 'AppShell';
|
|
54
|
-
|
|
54
|
+
localeUtils = PCore.getLocaleUtils();
|
|
55
|
+
localeReference: any;
|
|
55
56
|
constructor(
|
|
56
57
|
private angularPConnect: AngularPConnectService,
|
|
57
58
|
private chRef: ChangeDetectorRef,
|
|
@@ -119,7 +120,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
119
120
|
this.navPages$.forEach(page => {
|
|
120
121
|
page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
|
|
121
122
|
});
|
|
122
|
-
|
|
123
|
+
this.localeReference = this.pConn$.getValue('.pyLocaleReference');
|
|
123
124
|
this.actionsAPI = this.pConn$.getActionsApi();
|
|
124
125
|
this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
|
|
125
126
|
this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
|
|
@@ -130,7 +131,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
130
131
|
|
|
131
132
|
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
132
133
|
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
133
|
-
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$);
|
|
134
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
134
135
|
this.showAppName$ = this.configProps$.showAppName;
|
|
135
136
|
|
|
136
137
|
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
@@ -163,7 +164,9 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
163
164
|
containerName: 'primary',
|
|
164
165
|
flowType: sFlowType || 'pyStartCase'
|
|
165
166
|
};
|
|
166
|
-
this.createWork(sCaseType, actionInfo)
|
|
167
|
+
this.createWork(sCaseType, actionInfo).then(() => {
|
|
168
|
+
console.log('createWork completed');
|
|
169
|
+
});
|
|
167
170
|
}
|
|
168
171
|
|
|
169
172
|
navPanelLogoutClick() {
|
|
@@ -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',
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
border-radius: 0.5rem;
|
|
60
60
|
border: 0.0625rem solid var(--app-neutral-light-color);
|
|
61
61
|
overflow: hidden;
|
|
62
|
-
height: 2rem;
|
|
63
62
|
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.psdk-stages-chevron {
|
|
67
67
|
position: relative;
|
|
68
|
-
padding: calc(
|
|
68
|
+
padding: calc(0.5rem);
|
|
69
69
|
display: flex;
|
|
70
70
|
justify-content: center;
|
|
71
71
|
align-items: center;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div *ngIf="visibility$ !== false" class="ng-view-top">
|
|
2
|
-
<div *ngIf="showLabel$ && label$ && templateName$
|
|
2
|
+
<div *ngIf="showLabel$ && label$ && !noHeaderTemplates.includes(templateName$)" class="template-title-container">
|
|
3
3
|
<span>{{ label$ }}</span>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
@@ -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>
|
|
@@ -7,6 +7,22 @@ import { getAllFields } from '@pega/angular-sdk-components';
|
|
|
7
7
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
8
8
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
9
9
|
|
|
10
|
+
const NO_HEADER_TEMPLATES = ['SubTabs', 'SimpleTable', 'Confirmation', 'DynamicTabs', 'DetailsSubTabs'];
|
|
11
|
+
const DETAILS_TEMPLATES = [
|
|
12
|
+
'Details',
|
|
13
|
+
'DetailsFields',
|
|
14
|
+
'DetailsOneColumn',
|
|
15
|
+
'DetailsSubTabs',
|
|
16
|
+
'DetailsThreeColumn',
|
|
17
|
+
'DetailsTwoColumn',
|
|
18
|
+
'NarrowWideDetails',
|
|
19
|
+
'WideNarrowDetails'
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
function isDetailsTemplate(template) {
|
|
23
|
+
return DETAILS_TEMPLATES.includes(template);
|
|
24
|
+
}
|
|
25
|
+
|
|
10
26
|
/**
|
|
11
27
|
* WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
|
|
12
28
|
* Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
|
|
@@ -77,13 +93,15 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
77
93
|
|
|
78
94
|
angularPConnectData: AngularPConnectData = {};
|
|
79
95
|
|
|
96
|
+
noHeaderTemplates = NO_HEADER_TEMPLATES;
|
|
97
|
+
|
|
80
98
|
configProps$: ViewProps;
|
|
81
99
|
inheritedProps$: any;
|
|
82
100
|
arChildren$: any[];
|
|
83
101
|
templateName$: string;
|
|
84
102
|
title$ = '';
|
|
85
103
|
label$ = '';
|
|
86
|
-
showLabel$ =
|
|
104
|
+
showLabel$ = false;
|
|
87
105
|
visibility$ = true;
|
|
88
106
|
|
|
89
107
|
constructor(
|
|
@@ -142,7 +160,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
142
160
|
this.templateName$ = this.configProps$.template || '';
|
|
143
161
|
this.title$ = this.configProps$.title || '';
|
|
144
162
|
this.label$ = this.configProps$.label || '';
|
|
145
|
-
this.showLabel$ = this.configProps$.showLabel || this.showLabel$;
|
|
163
|
+
this.showLabel$ = this.configProps$.showLabel || isDetailsTemplate(this.templateName$) || this.showLabel$;
|
|
146
164
|
// label & showLabel within inheritedProps takes precedence over configProps
|
|
147
165
|
this.label$ = this.inheritedProps$.label || this.label$;
|
|
148
166
|
this.showLabel$ = this.inheritedProps$.showLabel || this.showLabel$;
|
|
@@ -159,7 +177,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
159
177
|
* The resolution lies in transferring this responsibility to the Reference component, eliminating the need for this code when Reference
|
|
160
178
|
* component is able to handle it.
|
|
161
179
|
*/
|
|
162
|
-
if (this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
|
|
180
|
+
if (!this.configProps$.visibility && this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
|
|
163
181
|
this.visibility$ = evaluateVisibility(this.pConn$);
|
|
164
182
|
}
|
|
165
183
|
|
|
@@ -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
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Directive, OnInit, OnDestroy, Injector, Input } from '@angular/core';
|
|
2
|
+
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
3
|
+
|
|
4
|
+
@Directive()
|
|
5
|
+
export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
6
|
+
@Input() pConn$: typeof PConnect;
|
|
7
|
+
|
|
8
|
+
// For interaction with AngularPConnect
|
|
9
|
+
protected angularPConnectData: AngularPConnectData = {};
|
|
10
|
+
protected angularPConnect;
|
|
11
|
+
|
|
12
|
+
childrenMetadataOld;
|
|
13
|
+
|
|
14
|
+
constructor(injector: Injector) {
|
|
15
|
+
this.angularPConnect = injector.get(AngularPConnectService);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
ngOnInit(): void {
|
|
19
|
+
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
20
|
+
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
21
|
+
|
|
22
|
+
this.checkAndUpdate();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ngOnDestroy() {
|
|
26
|
+
if (this.angularPConnectData.unsubscribeFn) {
|
|
27
|
+
this.angularPConnectData.unsubscribeFn();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
onStateChange() {
|
|
32
|
+
this.checkAndUpdate();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
checkAndUpdate() {
|
|
36
|
+
// Should always check the bridge to see if the component should update itself (re-render)
|
|
37
|
+
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
38
|
+
|
|
39
|
+
// Only call updateSelf when the component should update
|
|
40
|
+
if (bUpdateSelf || this.hasRawMetadataChanged()) {
|
|
41
|
+
this.updateSelf();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// this method will get overriden by the child component
|
|
46
|
+
updateSelf() {}
|
|
47
|
+
|
|
48
|
+
hasRawMetadataChanged(): boolean {
|
|
49
|
+
const newChildrenMetadata = this.fetchChildrenMetadata();
|
|
50
|
+
|
|
51
|
+
if (!PCore.isDeepEqual(newChildrenMetadata, this.childrenMetadataOld)) {
|
|
52
|
+
this.childrenMetadataOld = newChildrenMetadata;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
fetchChildrenMetadata() {
|
|
60
|
+
const children = this.pConn$.getChildren() || [];
|
|
61
|
+
|
|
62
|
+
return children.map(child => {
|
|
63
|
+
const pConnect = child.getPConnect();
|
|
64
|
+
return pConnect.resolveConfigProps(pConnect.getRawMetadata());
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -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
|
|
|
@@ -92,9 +92,43 @@ export class CaseSummaryComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
92
92
|
this.primaryFields$.push(kid.resolveConfigProps(kid.getRawMetadata()));
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
const secondarySummaryFields = this.prepareCaseSummaryData(this.arChildren$[1].getPConnect());
|
|
96
|
+
const secondaryChildren = this.arChildren$[1].getPConnect().getChildren();
|
|
97
|
+
secondaryChildren.forEach((oField, index) => {
|
|
96
98
|
const kid = oField.getPConnect();
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
const displayLabel = secondarySummaryFields[index].value.getPConnect().getConfigProps().label;
|
|
100
|
+
this.secondaryFields$.push({ ...kid.resolveConfigProps(kid.getRawMetadata()), kid, displayLabel });
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
|
|
105
|
+
const { config, children } = pConnectMeta;
|
|
106
|
+
const pConnect = getPConnect();
|
|
107
|
+
|
|
108
|
+
const caseSummaryComponentObject: any = {};
|
|
109
|
+
|
|
110
|
+
const { type } = pConnectMeta;
|
|
111
|
+
const createdComponent = pConnect.createComponent({
|
|
112
|
+
type,
|
|
113
|
+
children: children ? [...children] : [],
|
|
114
|
+
config: {
|
|
115
|
+
...config
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
caseSummaryComponentObject.value = createdComponent;
|
|
120
|
+
return caseSummaryComponentObject;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
prepareCaseSummaryData(summaryFieldChildren) {
|
|
124
|
+
const convertChildrenToSummaryData = kid => {
|
|
125
|
+
return kid?.map((childItem, index) => {
|
|
126
|
+
const childMeta = childItem.getPConnect().meta;
|
|
127
|
+
const caseSummaryComponentObject = this.prepareComponentInCaseSummary(childMeta, childItem.getPConnect);
|
|
128
|
+
caseSummaryComponentObject.id = index + 1;
|
|
129
|
+
return caseSummaryComponentObject;
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
return summaryFieldChildren ? convertChildrenToSummaryData(summaryFieldChildren?.getChildren()) : undefined;
|
|
99
133
|
}
|
|
100
134
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
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">
|
|
6
6
|
<img class="psdk-case-svg-icon" src="{{ svgCase$ }}" />
|
|
7
7
|
</div>
|
|
8
8
|
<div class="psdk-case-view-heading">
|
|
9
|
-
<div id="current-caseID" [hidden]="true">{{ currentCaseID }}</div>
|
|
10
|
-
<div class="psdk-case-view-heading-id" id="caseId">{{ id$ }}</div>
|
|
11
9
|
<div>
|
|
12
|
-
<h1>{{ heading$ }}</h1>
|
|
10
|
+
<h1 id="case-name">{{ heading$ }}</h1>
|
|
13
11
|
</div>
|
|
12
|
+
<div id="current-caseID" [hidden]="true">{{ currentCaseID }}</div>
|
|
13
|
+
<div class="psdk-case-view-heading-id" id="caseId">{{ id$ }}</div>
|
|
14
14
|
</div>
|
|
15
15
|
</mat-toolbar-row>
|
|
16
16
|
</mat-toolbar>
|
|
@@ -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 = {};
|
|
@@ -106,9 +105,7 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
hasCaseIDChanged(): boolean {
|
|
109
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
110
108
|
if (this.currentCaseID !== this.pConn$.getDataObject().caseInfo.ID) {
|
|
111
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
112
109
|
this.currentCaseID = this.pConn$.getDataObject().caseInfo.ID;
|
|
113
110
|
return true;
|
|
114
111
|
}
|
|
@@ -117,14 +114,12 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
117
114
|
|
|
118
115
|
updateHeaderAndSummary() {
|
|
119
116
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as CaseViewProps;
|
|
120
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
121
117
|
const hasNewAttachments = this.pConn$.getDataObject().caseInfo?.hasNewAttachments;
|
|
122
118
|
|
|
123
119
|
if (hasNewAttachments !== this.bHasNewAttachments) {
|
|
124
120
|
this.bHasNewAttachments = hasNewAttachments;
|
|
125
121
|
if (this.bHasNewAttachments) {
|
|
126
|
-
|
|
127
|
-
PCore.getPubSubUtils().publish((PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
122
|
+
PCore.getPubSubUtils().publish(PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
128
123
|
}
|
|
129
124
|
}
|
|
130
125
|
|
|
@@ -142,7 +137,6 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
142
137
|
|
|
143
138
|
this.heading$ = PCore.getLocaleUtils().getLocaleValue(this.configProps$.header, '', this.localeKey);
|
|
144
139
|
this.id$ = this.configProps$.subheader;
|
|
145
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
146
140
|
this.status$ = this.pConn$.getValue('.pyStatusWork');
|
|
147
141
|
});
|
|
148
142
|
}
|
|
@@ -158,7 +152,6 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
158
152
|
|
|
159
153
|
this.arChildren$ = this.pConn$.getChildren() as any[];
|
|
160
154
|
|
|
161
|
-
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
162
155
|
const caseInfo = this.pConn$.getDataObject().caseInfo;
|
|
163
156
|
this.currentCaseID = caseInfo.ID;
|
|
164
157
|
this.arAvailableActions$ = caseInfo?.availableActions ? caseInfo.availableActions : [];
|
|
@@ -167,19 +160,15 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
167
160
|
|
|
168
161
|
this.svgCase$ = this.utils.getImageSrc(this.configProps$.icon, this.utils.getSDKStaticContentUrl());
|
|
169
162
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (kidPConn.getRawMetadata().name == 'Tabs') {
|
|
176
|
-
this.mainTabs = kid;
|
|
177
|
-
this.mainTabData = this.mainTabs.getPConnect().getChildren();
|
|
178
|
-
}
|
|
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();
|
|
179
168
|
}
|
|
180
|
-
|
|
181
|
-
this.generateTabsData();
|
|
182
169
|
}
|
|
170
|
+
|
|
171
|
+
this.generateTabsData();
|
|
183
172
|
}
|
|
184
173
|
|
|
185
174
|
generateTabsData() {
|
|
@@ -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
|
}
|