@pega/angular-sdk-overrides 0.23.8 → 0.23.9
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/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 +7 -2
- package/lib/infra/Containers/flow-container/flow-container.component.ts +16 -9
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +39 -7
- package/lib/infra/assignment/assignment.component.ts +49 -23
- package/lib/infra/view/view.component.ts +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +1 -3
- package/lib/widget/todo/todo.component.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { getPConnectOfActiveContainerItem } from './helper';
|
|
3
|
+
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
4
|
+
|
|
5
|
+
export class FlowContainerBaseComponent {
|
|
6
|
+
// For interaction with AngularPConnect
|
|
7
|
+
protected angularPConnectData: AngularPConnectData = {};
|
|
8
|
+
protected angularPConnect;
|
|
9
|
+
|
|
10
|
+
constructor(injector: Injector) {
|
|
11
|
+
this.angularPConnect = injector.get(AngularPConnectService);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
getPConnectOfActiveContainerItem(parentPConnect) {
|
|
15
|
+
const routingInfo = this.angularPConnect.getComponentProp(this, 'routingInfo');
|
|
16
|
+
const isAssignmentView = this.angularPConnect.getComponentProp(this, 'isAssignmentView');
|
|
17
|
+
return getPConnectOfActiveContainerItem(routingInfo, {
|
|
18
|
+
isAssignmentView,
|
|
19
|
+
parentPConnect
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const processRootViewDetails = (rootView, containerItem, options) => {
|
|
2
|
+
const {
|
|
3
|
+
config: { context: viewContext, name: viewName }
|
|
4
|
+
} = rootView;
|
|
5
|
+
const { context: containerContext } = containerItem;
|
|
6
|
+
const { parentPConnect } = options;
|
|
7
|
+
let resolvedViewName = viewName;
|
|
8
|
+
let resolvedViewContext = viewContext;
|
|
9
|
+
|
|
10
|
+
const isAnnotedViewName = PCore.getAnnotationUtils().isProperty(viewName);
|
|
11
|
+
const isAnnotedViewContext = PCore.getAnnotationUtils().isProperty(viewContext);
|
|
12
|
+
|
|
13
|
+
// resolving annoted view context
|
|
14
|
+
if (isAnnotedViewContext) {
|
|
15
|
+
const viewContextProperty = PCore.getAnnotationUtils().getPropertyName(viewContext);
|
|
16
|
+
resolvedViewContext = PCore.getStoreValue(
|
|
17
|
+
`.${viewContextProperty}`,
|
|
18
|
+
viewContextProperty.startsWith('.') ? parentPConnect.getPageReference() : '',
|
|
19
|
+
containerContext
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!resolvedViewContext) {
|
|
24
|
+
resolvedViewContext = parentPConnect.getPageReference();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// resolving annoted view name
|
|
28
|
+
if (isAnnotedViewName) {
|
|
29
|
+
const viewNameProperty = PCore.getAnnotationUtils().getPropertyName(viewName);
|
|
30
|
+
resolvedViewName = PCore.getStoreValue(`.${viewNameProperty}`, resolvedViewContext, containerContext);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Special case where context and viewname are dynamic values
|
|
34
|
+
Use case - split for each shape
|
|
35
|
+
Ex - (caseInfo.content.SCRequestWorkQueues[1]):context --> .pyViewName:viewName
|
|
36
|
+
*/
|
|
37
|
+
if (isAnnotedViewName && isAnnotedViewContext && resolvedViewName !== '') {
|
|
38
|
+
/* Allow context processor to resolve view and context when both are dynamic */
|
|
39
|
+
resolvedViewName = viewName;
|
|
40
|
+
resolvedViewContext = viewContext;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
viewName: resolvedViewName,
|
|
45
|
+
viewContext: resolvedViewContext
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const getPConnectOfActiveContainerItem = (containerInfo, options) => {
|
|
50
|
+
const { accessedOrder, items } = containerInfo;
|
|
51
|
+
const { isAssignmentView = false, parentPConnect } = options;
|
|
52
|
+
const containerName = parentPConnect.getContainerName();
|
|
53
|
+
const { CONTAINER_NAMES } = PCore.getContainerUtils();
|
|
54
|
+
const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();
|
|
55
|
+
|
|
56
|
+
if (accessedOrder && items) {
|
|
57
|
+
const activeContainerItemKey = accessedOrder[accessedOrder.length - 1];
|
|
58
|
+
|
|
59
|
+
if (items[activeContainerItemKey] && items[activeContainerItemKey].view && Object.keys(items[activeContainerItemKey].view).length > 0) {
|
|
60
|
+
const activeContainerItem = items[activeContainerItemKey];
|
|
61
|
+
const target = activeContainerItemKey.substring(0, activeContainerItemKey.lastIndexOf('_'));
|
|
62
|
+
|
|
63
|
+
const { view: rootView, context } = activeContainerItem;
|
|
64
|
+
const { viewName, viewContext } = processRootViewDetails(rootView, activeContainerItem, { parentPConnect });
|
|
65
|
+
|
|
66
|
+
if (!viewName) return null;
|
|
67
|
+
|
|
68
|
+
const config = {
|
|
69
|
+
meta: rootView,
|
|
70
|
+
options: {
|
|
71
|
+
context,
|
|
72
|
+
pageReference: viewContext || parentPConnect.getPageReference(),
|
|
73
|
+
containerName,
|
|
74
|
+
containerItemID: activeContainerItemKey,
|
|
75
|
+
parentPageReference: parentPConnect.getPageReference(),
|
|
76
|
+
hasForm:
|
|
77
|
+
isAssignmentView ||
|
|
78
|
+
containerName === CONTAINER_NAMES.WORKAREA ||
|
|
79
|
+
containerName === CONTAINER_NAMES.MODAL ||
|
|
80
|
+
viewName === CREATE_DETAILS_VIEW_NAME,
|
|
81
|
+
target
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return PCore.createPConnect(config).getPConnect();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
};
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<div *ngIf="todo_showTodo$">
|
|
10
10
|
<component-mapper
|
|
11
|
+
*ngIf="pConnectOfActiveContainerItem"
|
|
11
12
|
name="Todo"
|
|
12
13
|
[props]="{
|
|
13
|
-
pConn$:
|
|
14
|
+
pConn$: pConnectOfActiveContainerItem,
|
|
14
15
|
caseInfoID$: todo_caseInfoID$,
|
|
15
16
|
datasource$: todo_datasource$,
|
|
16
17
|
showTodoList$: todo_showTodoList$,
|
|
@@ -23,7 +24,11 @@
|
|
|
23
24
|
></component-mapper>
|
|
24
25
|
</div>
|
|
25
26
|
<div *ngIf="!todo_showTodo$">
|
|
26
|
-
<component-mapper
|
|
27
|
+
<component-mapper
|
|
28
|
+
*ngIf="pConnectOfActiveContainerItem"
|
|
29
|
+
name="Assignment"
|
|
30
|
+
[props]="{ pConn$: pConnectOfActiveContainerItem, formGroup$, arChildren$, itemKey$ }"
|
|
31
|
+
></component-mapper>
|
|
27
32
|
</div>
|
|
28
33
|
</div>
|
|
29
34
|
<div *ngIf="bHasCaseMessages$">
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Component, OnInit, Input, ChangeDetectorRef, NgZone, forwardRef, OnDestroy } from '@angular/core';
|
|
1
|
+
import { Component, OnInit, Input, ChangeDetectorRef, NgZone, forwardRef, OnDestroy, Injector } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
4
4
|
import { MatCardModule } from '@angular/material/card';
|
|
5
5
|
import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
|
|
6
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
7
6
|
import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
8
7
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
9
8
|
import { Utils } from '@pega/angular-sdk-components';
|
|
10
9
|
import { getToDoAssignments, hasAssignments, showBanner } from './helpers';
|
|
11
10
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
11
|
+
import { FlowContainerBaseComponent } from '@pega/angular-sdk-components';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
|
|
@@ -32,11 +32,9 @@ interface FlowContainerProps {
|
|
|
32
32
|
standalone: true,
|
|
33
33
|
imports: [CommonModule, MatCardModule, forwardRef(() => ComponentMapperComponent)]
|
|
34
34
|
})
|
|
35
|
-
export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
35
|
+
export class FlowContainerComponent extends FlowContainerBaseComponent implements OnInit, OnDestroy {
|
|
36
36
|
@Input() pConn$: typeof PConnect;
|
|
37
37
|
|
|
38
|
-
// For interaction with AngularPConnect
|
|
39
|
-
angularPConnectData: AngularPConnectData = {};
|
|
40
38
|
pCoreConstants: typeof publicConstants;
|
|
41
39
|
configProps$: FlowContainerProps;
|
|
42
40
|
|
|
@@ -72,14 +70,17 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
72
70
|
banners: any[];
|
|
73
71
|
// itemKey: string = ""; // JA - this is what Nebula/Constellation uses to pass to finishAssignment, navigateToStep
|
|
74
72
|
|
|
73
|
+
pConnectOfActiveContainerItem;
|
|
74
|
+
|
|
75
75
|
constructor(
|
|
76
|
-
|
|
76
|
+
injector: Injector,
|
|
77
77
|
private cdRef: ChangeDetectorRef,
|
|
78
78
|
private psService: ProgressSpinnerService,
|
|
79
79
|
private fb: FormBuilder,
|
|
80
80
|
private ngZone: NgZone,
|
|
81
81
|
private utils: Utils
|
|
82
82
|
) {
|
|
83
|
+
super(injector);
|
|
83
84
|
// create the formGroup
|
|
84
85
|
this.formGroup$ = this.fb.group({ hideRequired: false });
|
|
85
86
|
}
|
|
@@ -148,10 +149,14 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
148
149
|
// Should always check the bridge to see if the component should update itself (re-render)
|
|
149
150
|
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
150
151
|
|
|
152
|
+
const pConn = this.pConnectOfActiveContainerItem || this.pConn$;
|
|
153
|
+
const caseViewModeFromProps = this.angularPConnect.getComponentProp(this, 'caseViewMode');
|
|
154
|
+
const caseViewModeFromRedux = pConn.getValue('context_data.caseViewMode', '');
|
|
155
|
+
|
|
151
156
|
// ONLY call updateSelf when the component should update
|
|
152
157
|
// AND removing the "gate" that was put there since shouldComponentUpdate
|
|
153
158
|
// should be the real "gate"
|
|
154
|
-
if (bUpdateSelf) {
|
|
159
|
+
if (bUpdateSelf || caseViewModeFromProps !== caseViewModeFromRedux) {
|
|
155
160
|
// don't want to redraw the flow container when there are page messages, because
|
|
156
161
|
// the redraw causes us to loose the errors on the elements
|
|
157
162
|
const completeProps = this.angularPConnect.getCurrentCompleteProps(this) as FlowContainerProps;
|
|
@@ -340,8 +345,10 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
|
|
|
340
345
|
// const { getPConnect } = this.arChildren$[0].getPConnect();
|
|
341
346
|
const localPConn = this.arChildren$[0].getPConnect();
|
|
342
347
|
|
|
343
|
-
|
|
344
|
-
|
|
348
|
+
this.pConnectOfActiveContainerItem = this.getPConnectOfActiveContainerItem(this.pConn$) || this.pConn$;
|
|
349
|
+
|
|
350
|
+
const caseViewMode = this.pConnectOfActiveContainerItem.getValue('context_data.caseViewMode');
|
|
351
|
+
|
|
345
352
|
this.bShowBanner = showBanner(this.pConn$);
|
|
346
353
|
|
|
347
354
|
if (caseViewMode && caseViewMode == 'review') {
|
|
@@ -6,6 +6,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
6
6
|
import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
7
7
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
8
8
|
import { getBanners } from '@pega/angular-sdk-components';
|
|
9
|
+
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
|
|
@@ -200,7 +201,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
createView(routingInfo, currentItem, latestItem, key) {
|
|
203
|
-
const configObject = this.getConfigObject(currentItem,
|
|
204
|
+
const configObject = this.getConfigObject(currentItem, null, false);
|
|
204
205
|
const newComp = configObject?.getPConnect();
|
|
205
206
|
// const newCompName = newComp.getComponentName();
|
|
206
207
|
// @ts-ignore - parameter “contextName” for getDataObject method should be optional
|
|
@@ -248,8 +249,16 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
248
249
|
ID,
|
|
249
250
|
`${theNewCaseInfo?.getClassName()}!CASE!${theNewCaseInfo.getName()}`.toUpperCase()
|
|
250
251
|
);
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
const bIsRefComponent = this.checkIfRefComponent(newComp);
|
|
253
|
+
|
|
254
|
+
if (bIsRefComponent) {
|
|
255
|
+
const newPConn = ReferenceComponent.normalizePConn(newComp);
|
|
256
|
+
this.arChildren$ = ReferenceComponent.normalizePConnArray(newPConn.getChildren());
|
|
257
|
+
} else {
|
|
258
|
+
// update children with new view's children
|
|
259
|
+
this.arChildren$ = newComp.getChildren() as any;
|
|
260
|
+
}
|
|
261
|
+
|
|
253
262
|
this.bShowModal$ = true;
|
|
254
263
|
|
|
255
264
|
// for when non modal
|
|
@@ -280,16 +289,30 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
280
289
|
});
|
|
281
290
|
}
|
|
282
291
|
|
|
283
|
-
getConfigObject(item, pConnect) {
|
|
292
|
+
getConfigObject(item, pConnect, isReverseCoexistence = false) {
|
|
293
|
+
let config;
|
|
294
|
+
if (isReverseCoexistence) {
|
|
295
|
+
config = {
|
|
296
|
+
options: {
|
|
297
|
+
pageReference: pConnect?.getPageReference(),
|
|
298
|
+
hasForm: true,
|
|
299
|
+
containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
return PCore.createPConnect(config);
|
|
303
|
+
}
|
|
284
304
|
if (item) {
|
|
285
|
-
const { context, view } = item;
|
|
286
|
-
const
|
|
305
|
+
const { context, view, isBulkAction } = item;
|
|
306
|
+
const target = PCore.getContainerUtils().getTargetFromContainerItemID(context);
|
|
307
|
+
config = {
|
|
287
308
|
meta: view,
|
|
288
309
|
options: {
|
|
289
310
|
context,
|
|
290
311
|
pageReference: view.config.context || pConnect.getPageReference(),
|
|
291
312
|
hasForm: true,
|
|
292
|
-
|
|
313
|
+
...(isBulkAction && { isBulkAction }),
|
|
314
|
+
containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL,
|
|
315
|
+
target
|
|
293
316
|
}
|
|
294
317
|
};
|
|
295
318
|
return PCore.createPConnect(config);
|
|
@@ -297,6 +320,15 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
297
320
|
return null;
|
|
298
321
|
}
|
|
299
322
|
|
|
323
|
+
checkIfRefComponent(thePConn: any): boolean {
|
|
324
|
+
let bReturn = false;
|
|
325
|
+
if (thePConn && thePConn.getComponentName() == 'reference') {
|
|
326
|
+
bReturn = true;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
return bReturn;
|
|
330
|
+
}
|
|
331
|
+
|
|
300
332
|
onAlertState(bData: boolean) {
|
|
301
333
|
this.bAlertState = bData;
|
|
302
334
|
this.bShowCancelAlert$ = false;
|
|
@@ -9,6 +9,14 @@ import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
|
9
9
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
10
10
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
11
11
|
|
|
12
|
+
function getRefreshProps(refreshConditions) {
|
|
13
|
+
// refreshConditions cuurently supports only "Changes" event
|
|
14
|
+
if (!refreshConditions) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
return refreshConditions.filter(item => item.event && item.event === 'Changes').map(item => [item.field, item.field?.substring(1)]) || [];
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
interface AssignmentProps {
|
|
13
21
|
// If any, enter additional props that only exist on this component
|
|
14
22
|
template: string;
|
|
@@ -38,7 +46,6 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
38
46
|
newPConn$: any;
|
|
39
47
|
containerName$: string;
|
|
40
48
|
|
|
41
|
-
bIsRefComponent = false;
|
|
42
49
|
bInitialized = false;
|
|
43
50
|
|
|
44
51
|
templateName$: string;
|
|
@@ -127,21 +134,14 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
127
134
|
}
|
|
128
135
|
|
|
129
136
|
updateChanges() {
|
|
130
|
-
this.
|
|
137
|
+
this.registerForRefresh();
|
|
131
138
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
// this.pConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
135
|
-
this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
136
|
-
|
|
137
|
-
// If 'reference' so we need to get the children of the normalized pConn
|
|
138
|
-
if (this.bIsRefComponent) {
|
|
139
|
-
// this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
|
|
140
|
-
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.newPConn$.getChildren());
|
|
141
|
-
}
|
|
142
|
-
});
|
|
139
|
+
// pConn$ may be a 'reference' component, so normalize it
|
|
140
|
+
this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
143
141
|
|
|
144
|
-
this.
|
|
142
|
+
if (this.arChildren$) {
|
|
143
|
+
this.createButtons();
|
|
144
|
+
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
checkIfRefComponent(thePConn: any): boolean {
|
|
@@ -154,18 +154,10 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
initComponent() {
|
|
157
|
-
this.bIsRefComponent = this.checkIfRefComponent(this.pConn$);
|
|
158
|
-
|
|
159
157
|
// pConn$ may be a 'reference' component, so normalize it
|
|
160
158
|
// this.pConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
161
159
|
this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
|
|
162
160
|
|
|
163
|
-
// If 'reference' so we need to get the children of the normalized pConn
|
|
164
|
-
if (this.bIsRefComponent) {
|
|
165
|
-
// this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
|
|
166
|
-
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.newPConn$.getChildren());
|
|
167
|
-
}
|
|
168
|
-
|
|
169
161
|
// prevent re-intializing with flowContainer update unless an action is taken
|
|
170
162
|
this.bReInit = false;
|
|
171
163
|
this.bHasNavigation$ = false;
|
|
@@ -206,7 +198,9 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
206
198
|
|
|
207
199
|
this.cancelCreateStageAssignment = actionsAPI.cancelCreateStageAssignment.bind(actionsAPI);
|
|
208
200
|
|
|
209
|
-
this.
|
|
201
|
+
if (this.arChildren$) {
|
|
202
|
+
this.createButtons();
|
|
203
|
+
}
|
|
210
204
|
}
|
|
211
205
|
|
|
212
206
|
createButtons() {
|
|
@@ -460,4 +454,36 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
460
454
|
control.markAsTouched();
|
|
461
455
|
});
|
|
462
456
|
}
|
|
457
|
+
|
|
458
|
+
registerForRefresh() {
|
|
459
|
+
// @ts-ignore - Property 'getActionRefreshConditions' is private and only accessible within class 'CaseInfo'
|
|
460
|
+
const refreshConditions = this.pConn$.getCaseInfo()?.getActionRefreshConditions();
|
|
461
|
+
const pageReference = this.pConn$.getPageReference();
|
|
462
|
+
const context = this.pConn$.getContextName();
|
|
463
|
+
|
|
464
|
+
// refresh api de-registration
|
|
465
|
+
PCore.getRefreshManager().deRegisterForRefresh(context);
|
|
466
|
+
|
|
467
|
+
// refresh api registration
|
|
468
|
+
const refreshProps = getRefreshProps(refreshConditions);
|
|
469
|
+
const caseKey = this.pConn$.getCaseInfo().getKey();
|
|
470
|
+
const refreshOptions = {
|
|
471
|
+
autoDetectRefresh: true,
|
|
472
|
+
preserveClientChanges: false
|
|
473
|
+
};
|
|
474
|
+
if (refreshProps.length > 0) {
|
|
475
|
+
refreshProps.forEach(prop => {
|
|
476
|
+
PCore.getRefreshManager().registerForRefresh(
|
|
477
|
+
'PROP_CHANGE',
|
|
478
|
+
this.pConn$.getActionsApi().refreshCaseView.bind(this.pConn$.getActionsApi(), caseKey, null, pageReference, {
|
|
479
|
+
...refreshOptions,
|
|
480
|
+
refreshFor: prop[0]
|
|
481
|
+
}),
|
|
482
|
+
`${pageReference}.${prop[1]}`,
|
|
483
|
+
`${context}/${pageReference}`,
|
|
484
|
+
context
|
|
485
|
+
);
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
}
|
|
463
489
|
}
|
|
@@ -159,7 +159,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
159
159
|
* The resolution lies in transferring this responsibility to the Reference component, eliminating the need for this code when Reference
|
|
160
160
|
* component is able to handle it.
|
|
161
161
|
*/
|
|
162
|
-
if (this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
|
|
162
|
+
if (!this.configProps$.visibility && this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
|
|
163
163
|
this.visibility$ = evaluateVisibility(this.pConn$);
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -965,9 +965,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
965
965
|
this.rawFields?.forEach(item => {
|
|
966
966
|
const referenceListData = getReferenceList(this.pConn$);
|
|
967
967
|
const isDatapage = referenceListData.startsWith('D_');
|
|
968
|
-
const pageReferenceValue = isDatapage
|
|
969
|
-
? `${referenceListData}[${index}]`
|
|
970
|
-
: `${this.pConn$.getPageReference()}${referenceListData.substring(referenceListData.lastIndexOf('.'))}[${index}]`;
|
|
968
|
+
const pageReferenceValue = isDatapage ? `${referenceListData}[${index}]` : `${this.pConn$.getPageReference()}${referenceListData}[${index}]`;
|
|
971
969
|
const config = {
|
|
972
970
|
meta: item,
|
|
973
971
|
options: {
|
|
@@ -234,7 +234,7 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
234
234
|
const sTarget = this.pConn$.getContainerName();
|
|
235
235
|
const sTargetContainerName = sTarget;
|
|
236
236
|
|
|
237
|
-
const options: any = { containerName: sTargetContainerName };
|
|
237
|
+
const options: any = { containerName: sTargetContainerName, channelName: '' };
|
|
238
238
|
|
|
239
239
|
if (classname === null || classname === '') {
|
|
240
240
|
classname = this.pConn$.getCaseInfo().getClassName();
|