@pega/angular-sdk-overrides 0.24.9 → 0.242.1

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.
Files changed (70) hide show
  1. package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +1 -1
  2. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -1
  3. package/lib/designSystemExtension/operator/operator.component.ts +1 -1
  4. package/lib/designSystemExtension/pulse/pulse.component.ts +7 -7
  5. package/lib/field/auto-complete/auto-complete.component.ts +3 -3
  6. package/lib/field/check-box/check-box.component.ts +3 -3
  7. package/lib/field/currency/currency.component.ts +3 -3
  8. package/lib/field/date/date.component.ts +3 -3
  9. package/lib/field/date-time/date-time.component.ts +2 -2
  10. package/lib/field/decimal/decimal.component.ts +4 -4
  11. package/lib/field/dropdown/dropdown.component.ts +3 -3
  12. package/lib/field/email/email.component.ts +1 -1
  13. package/lib/field/integer/integer.component.ts +1 -1
  14. package/lib/field/multiselect/multiselect.component.ts +4 -2
  15. package/lib/field/percentage/percentage.component.ts +2 -2
  16. package/lib/field/phone/phone.component.ts +1 -1
  17. package/lib/field/radio-buttons/radio-buttons.component.ts +2 -2
  18. package/lib/field/rich-text/rich-text.component.ts +3 -3
  19. package/lib/field/scalar-list/scalar-list.component.ts +1 -2
  20. package/lib/field/text-area/text-area.component.ts +1 -1
  21. package/lib/field/text-input/text-input.component.ts +1 -1
  22. package/lib/field/time/time.component.ts +1 -1
  23. package/lib/field/url/url.component.ts +1 -1
  24. package/lib/field/user-reference/user-reference.component.ts +1 -1
  25. package/lib/infra/Containers/flow-container/flow-container.component.ts +4 -4
  26. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -1
  27. package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
  28. package/lib/infra/Containers/view-container/helper.ts +22 -0
  29. package/lib/infra/Containers/view-container/view-container.component.ts +11 -28
  30. package/lib/infra/assignment/assignment.component.ts +0 -1
  31. package/lib/infra/defer-load/defer-load.component.ts +3 -3
  32. package/lib/infra/navbar/navbar.component.ts +3 -3
  33. package/lib/infra/root-container/root-container.component.ts +3 -6
  34. package/lib/template/app-shell/app-shell.component.ts +20 -2
  35. package/lib/template/case-summary/case-summary.component.ts +1 -1
  36. package/lib/template/case-view/case-view.component.ts +1 -1
  37. package/lib/template/confirmation/confirmation.component.ts +1 -1
  38. package/lib/template/data-reference/data-reference.component.ts +35 -39
  39. package/lib/template/default-form/default-form.component.ts +1 -1
  40. package/lib/template/details/details.component.ts +1 -1
  41. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +1 -1
  42. package/lib/template/details-one-column/details-one-column.component.ts +1 -1
  43. package/lib/template/details-three-column/details-three-column.component.ts +1 -1
  44. package/lib/template/details-two-column/details-two-column.component.ts +1 -1
  45. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +1 -1
  46. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +1 -1
  47. package/lib/template/field-group-template/field-group-template.component.ts +0 -2
  48. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
  49. package/lib/template/list-view/list-view.component.ts +2 -2
  50. package/lib/template/list-view/listViewHelpers.ts +1 -1
  51. package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -1
  52. package/lib/template/one-column/one-column.component.ts +1 -1
  53. package/lib/template/one-column-tab/one-column-tab.component.ts +1 -1
  54. package/lib/template/page/page.component.ts +1 -4
  55. package/lib/template/promoted-filters/promoted-filters.component.ts +1 -1
  56. package/lib/template/repeating-structures/repeating-structures.component.ts +1 -1
  57. package/lib/template/simple-table-manual/simple-table-manual.component.ts +15 -13
  58. package/lib/template/simple-table-select/simple-table-select.component.ts +3 -3
  59. package/lib/template/three-column/three-column.component.ts +1 -1
  60. package/lib/template/two-column/two-column.component.ts +1 -1
  61. package/lib/template/two-column-tab/two-column-tab.component.ts +1 -1
  62. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +1 -1
  63. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -1
  64. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -3
  65. package/lib/widget/attachment/attachment.component.ts +7 -9
  66. package/lib/widget/feed-container/feed-container.component.ts +7 -7
  67. package/lib/widget/file-utility/file-utility.component.ts +2 -5
  68. package/lib/widget/todo/todo.component.html +2 -2
  69. package/lib/widget/todo/todo.component.ts +93 -83
  70. package/package.json +1 -1
@@ -120,7 +120,7 @@ export class AttachmentComponent implements OnInit, OnDestroy {
120
120
 
121
121
  updateSelf() {
122
122
  const configProps: AttachmentProps = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as AttachmentProps;
123
- const stateProps: any = this.pConn$.getStateProps();
123
+ const stateProps = this.pConn$.getStateProps();
124
124
  const { value, label, extensions, displayMode } = configProps;
125
125
 
126
126
  if (configProps.required != null) {
@@ -149,7 +149,7 @@ export class AttachmentComponent implements OnInit, OnDestroy {
149
149
 
150
150
  this.validateMessage = this.angularPConnectData.validateMessage;
151
151
  this.extensions$ = extensions;
152
- this.valueRef = (this.pConn$.getStateProps() as any).value;
152
+ this.valueRef = this.pConn$.getStateProps().value;
153
153
  this.valueRef = this.valueRef.startsWith('.') ? this.valueRef.substring(1) : this.valueRef;
154
154
  this.displayMode = displayMode;
155
155
  /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */
@@ -277,7 +277,7 @@ export class AttachmentComponent implements OnInit, OnDestroy {
277
277
  this.updateAttachmentState(this.pConn$, this.getAttachmentKey(this.valueRef), [...currentAttachmentList, ...attachmentsList]);
278
278
  if (file.inProgress) {
279
279
  // @ts-ignore - 3rd parameter "responseEncoding" should be optional
280
- PCore.getAttachmentUtils().cancelRequest(file.ID, pConn.getContextName());
280
+ PCore.getAttachmentUtils().cancelRequest(file.ID, this.pConn$.getContextName());
281
281
  }
282
282
  }
283
283
 
@@ -317,14 +317,13 @@ export class AttachmentComponent implements OnInit, OnDestroy {
317
317
  )} ${this.extensions$.replaceAll('.', '')}`;
318
318
  }
319
319
  if (f.props.error) {
320
- const fieldName = (this.pConn$.getStateProps() as any).value;
320
+ const fieldName = this.pConn$.getStateProps().value;
321
321
  const context = this.pConn$.getContextName();
322
322
  PCore.getMessageManager().addMessages({
323
323
  messages: [
324
324
  {
325
325
  type: 'error',
326
- // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.
327
- message: pConn.getLocalizedValue('Error with one or more files', '', '')
326
+ message: this.pConn$.getLocalizedValue('Error with one or more files', '', '')
328
327
  }
329
328
  ],
330
329
  property: fieldName,
@@ -348,7 +347,7 @@ export class AttachmentComponent implements OnInit, OnDestroy {
348
347
  }
349
348
 
350
349
  clearFieldErrorMessages() {
351
- const fieldName = (this.pConn$.getStateProps() as any).value;
350
+ const fieldName = this.pConn$.getStateProps().value;
352
351
  const context = this.pConn$.getContextName();
353
352
  PCore.getMessageManager().clearMessages({
354
353
  type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,
@@ -376,14 +375,13 @@ export class AttachmentComponent implements OnInit, OnDestroy {
376
375
  f.props.icon = this.utils.getIconFromFileType(f.type);
377
376
  f.props.name = this.pConn$.getLocalizedValue('Unable to upload file', '', '');
378
377
  f.inProgress = false;
379
- const fieldName = (this.pConn$.getStateProps() as any).value;
378
+ const fieldName = this.pConn$.getStateProps().value;
380
379
  const context = this.pConn$.getContextName();
381
380
  // set errors to property to block submit even on errors in file upload
382
381
  PCore.getMessageManager().addMessages({
383
382
  messages: [
384
383
  {
385
384
  type: 'error',
386
- // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.
387
385
  message: this.pConn$.getLocalizedValue('Error with one or more files', '', '')
388
386
  }
389
387
  ],
@@ -25,8 +25,8 @@ export class FeedContainerComponent implements OnInit, OnDestroy {
25
25
  // Used with AngularPConnect
26
26
  angularPConnectData: AngularPConnectData = {};
27
27
 
28
- userName$: string;
29
- imageKey$: string;
28
+ userName$: string | undefined;
29
+ imageKey$: string | undefined;
30
30
 
31
31
  currentUserInitials$: string;
32
32
  currentUserName$: string;
@@ -65,7 +65,7 @@ export class FeedContainerComponent implements OnInit, OnDestroy {
65
65
  ngOnInit(): void {
66
66
  this.userName$ = PCore.getEnvironmentInfo().getOperatorName();
67
67
  this.imageKey$ = PCore.getEnvironmentInfo().getOperatorImageInsKey();
68
- this.updateCurrentUserName(this.userName$);
68
+ this.updateCurrentUserName(this.userName$ ?? '');
69
69
 
70
70
  // First thing in initialization is registering and subscribing to the AngularPConnect service
71
71
  this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
@@ -402,11 +402,11 @@ export class FeedContainerComponent implements OnInit, OnDestroy {
402
402
  }
403
403
 
404
404
  getMessageData() {
405
- const messageIDs = (this.pConn$.getConfigProps() as any).messageIDs;
406
- const userName = (this.pConn$.getConfigProps() as any).currentUser;
405
+ const messageIDs = this.pConn$.getConfigProps().messageIDs;
406
+ const userName = this.pConn$.getConfigProps().currentUser;
407
407
  const imageKey = this.pConn$.getValue('OperatorID.pyImageInsKey');
408
408
 
409
- const oData: any = this.pConn$.getDataObject();
409
+ const oData = this.pConn$.getDataObject();
410
410
 
411
411
  if (messageIDs && messageIDs.length > 0) {
412
412
  this.pulseMessages$ = JSON.parse(JSON.stringify(oData.pulse.messages));
@@ -532,7 +532,7 @@ export class FeedContainerComponent implements OnInit, OnDestroy {
532
532
 
533
533
  // If feedAPI is defined then only post message
534
534
  if (this.feedAPI) {
535
- this./* feedAPI. */ postMessage((this.pConn$.getConfigProps() as any).value, this.pulseConversation);
535
+ this./* feedAPI. */ postMessage(this.pConn$.getConfigProps().value, this.pulseConversation);
536
536
  } else {
537
537
  console.log("We don't support Pulse yet");
538
538
  }
@@ -106,7 +106,7 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
106
106
  this.createModalButtons();
107
107
 
108
108
  PCore.getPubSubUtils().subscribe(
109
- (PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,
109
+ PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,
110
110
  this.updateSelf.bind(this),
111
111
  'caseAttachmentsUpdateFromCaseview'
112
112
  );
@@ -117,10 +117,7 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
117
117
  this.angularPConnectData.unsubscribeFn();
118
118
  }
119
119
 
120
- PCore.getPubSubUtils().unsubscribe(
121
- (PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,
122
- 'caseAttachmentsUpdateFromCaseview'
123
- );
120
+ PCore.getPubSubUtils().unsubscribe(PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, 'caseAttachmentsUpdateFromCaseview');
124
121
  }
125
122
 
126
123
  // Callback passed when subscribing to store change
@@ -2,7 +2,7 @@
2
2
  <div class="psdk-todo-header">
3
3
  <div *ngIf="showTodoList$" class="psdk-avatar">{{ this.currentUserInitials$ }}</div>
4
4
  <div id="worklist" class="psdk-todo-text">{{ headerText$ }}</div>
5
- <div *ngIf="showTodoList$" class="psdk-assignment-count">{{ assignmentCount$ }}</div>
5
+ <div *ngIf="showTodoList$" class="psdk-assignment-count">{{ count }}</div>
6
6
  </div>
7
7
  <br /><br />
8
8
  <div *ngIf="showTodoList$" class="psdk-display-divider"></div>
@@ -36,7 +36,7 @@
36
36
  </div>
37
37
  </div>
38
38
 
39
- <div *ngIf="assignmentCount$ > 3">
39
+ <div *ngIf="count > 3">
40
40
  <div *ngIf="bShowMore$; else showLess" class="psdk-todo-show-more">
41
41
  <button mat-stroked-button (click)="_showMore()">{{ showMoreLocalizedValue === 'show_more' ? 'Show more' : showMoreLocalizedValue }}</button>
42
42
  </div>
@@ -1,10 +1,54 @@
1
- import { Component, OnInit, Input, NgZone, OnDestroy, OnChanges } from '@angular/core';
1
+ import { Component, OnInit, Input, OnDestroy } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { MatButtonModule } from '@angular/material/button';
4
4
  import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
5
5
  import { ProgressSpinnerService } from '@pega/angular-sdk-components';
6
6
  import { ErrorMessagesService } from '@pega/angular-sdk-components';
7
7
  import { Utils } from '@pega/angular-sdk-components';
8
+ import { updateWorkList } from '@pega/angular-sdk-components';
9
+
10
+ const fetchMyWorkList = (datapage, fields, numberOfRecords, includeTotalCount, context) => {
11
+ return PCore.getDataPageUtils()
12
+ .getDataAsync(
13
+ datapage,
14
+ context,
15
+ {},
16
+ {
17
+ pageNumber: 1,
18
+ pageSize: numberOfRecords
19
+ },
20
+ {
21
+ select: Object.keys(fields).map(key => ({ field: PCore.getAnnotationUtils().getPropertyName(fields[key]) })),
22
+ sortBy: [
23
+ { field: 'pxUrgencyAssign', type: 'DESC' },
24
+ { field: 'pxDeadlineTime', type: 'ASC' },
25
+ { field: 'pxCreateDateTime', type: 'DESC' }
26
+ ]
27
+ },
28
+ {
29
+ invalidateCache: true,
30
+ additionalApiParams: {
31
+ includeTotalCount
32
+ }
33
+ }
34
+ )
35
+ .then(response => {
36
+ return {
37
+ ...response,
38
+ data: (Array.isArray(response?.data) ? response.data : []).map(row =>
39
+ Object.keys(fields).reduce((obj, key) => {
40
+ obj[key] = row[PCore.getAnnotationUtils().getPropertyName(fields[key])];
41
+ return obj;
42
+ }, {})
43
+ )
44
+ };
45
+ });
46
+ };
47
+
48
+ const getMappedValue = value => {
49
+ const mappedValue = PCore.getEnvironmentInfo().getKeyMapping(value);
50
+ return mappedValue === null ? value : mappedValue;
51
+ };
8
52
 
9
53
  interface ToDoProps {
10
54
  // If any, enter additional props that only exist on this component
@@ -23,7 +67,7 @@ interface ToDoProps {
23
67
  standalone: true,
24
68
  imports: [CommonModule, MatButtonModule]
25
69
  })
26
- export class TodoComponent implements OnInit, OnDestroy, OnChanges {
70
+ export class TodoComponent implements OnInit, OnDestroy {
27
71
  @Input() pConn$: typeof PConnect;
28
72
  @Input() caseInfoID$: string;
29
73
  @Input() datasource$: any;
@@ -36,9 +80,8 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
36
80
  @Input() isConfirm;
37
81
 
38
82
  configProps$: ToDoProps;
39
- currentUser$: string;
83
+ currentUser$: string | undefined;
40
84
  currentUserInitials$ = '--';
41
- assignmentCount$: number;
42
85
  bShowMore$ = true;
43
86
  arAssignments$: any[];
44
87
  assignmentsSource$: any;
@@ -49,99 +92,62 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
49
92
  showlessLocalizedValue = this.localizedVal('show_less', 'CosmosFields');
50
93
  showMoreLocalizedValue = this.localizedVal('show_more', 'CosmosFields');
51
94
  canPerform: boolean;
95
+ count: number;
52
96
 
53
97
  constructor(
54
98
  private psService: ProgressSpinnerService,
55
99
  private erService: ErrorMessagesService,
56
- private ngZone: NgZone,
57
100
  private utils: Utils
58
101
  ) {}
59
102
 
60
103
  ngOnInit() {
61
104
  this.CONSTS = PCore.getConstants();
62
- const { CREATE_STAGE_SAVED, CREATE_STAGE_DELETED }: any = PCore.getEvents().getCaseEvent();
63
-
64
- PCore.getPubSubUtils().subscribe(
65
- PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL,
66
- () => {
67
- this.updateToDo();
68
- },
69
- 'updateToDo'
70
- );
71
-
72
- PCore.getPubSubUtils().subscribe(
73
- CREATE_STAGE_SAVED,
74
- () => {
75
- this.updateList();
76
- },
77
- CREATE_STAGE_SAVED
78
- );
105
+ const { CREATE_STAGE_SAVED, CREATE_STAGE_DELETED } = PCore.getEvents().getCaseEvent();
79
106
 
80
- PCore.getPubSubUtils().subscribe(
81
- CREATE_STAGE_DELETED,
82
- () => {
83
- this.updateList();
84
- },
85
- CREATE_STAGE_DELETED
86
- );
107
+ PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL, () => this.updateToDo(), 'updateToDo');
108
+ PCore.getPubSubUtils().subscribe(CREATE_STAGE_SAVED, () => this.updateList(), CREATE_STAGE_SAVED);
109
+ PCore.getPubSubUtils().subscribe(CREATE_STAGE_DELETED, () => this.updateList(), CREATE_STAGE_DELETED);
87
110
 
88
111
  this.updateToDo();
89
112
  }
90
113
 
91
114
  ngOnDestroy() {
92
- const { CREATE_STAGE_SAVED, CREATE_STAGE_DELETED }: any = PCore.getEvents().getCaseEvent();
115
+ const { CREATE_STAGE_SAVED, CREATE_STAGE_DELETED } = PCore.getEvents().getCaseEvent();
93
116
 
94
117
  PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL, 'updateToDo');
95
-
96
118
  PCore.getPubSubUtils().unsubscribe(CREATE_STAGE_SAVED, CREATE_STAGE_SAVED);
97
-
98
119
  PCore.getPubSubUtils().unsubscribe(CREATE_STAGE_DELETED, CREATE_STAGE_DELETED);
99
120
  }
100
121
 
101
- ngOnChanges() {
102
- // don't update until we'va had an init
103
- if (PCore) {
104
- this.updateToDo();
105
- }
106
- }
107
-
108
- updateWorkList(key) {
109
- PCore.getDataApiUtils()
110
- // @ts-ignore - 2nd parameter "payload" and 3rd parameter "context" should be optional in getData method
111
- .getData(key)
112
- .then(responseData => {
113
- const dataObject = {};
114
- dataObject[key] = {
115
- pxResults: responseData.data.data
116
- };
117
-
118
- this.pConn$.updateState(dataObject);
119
- this.updateToDo();
120
- })
121
- .catch(err => {
122
- console.error(err?.stack);
123
- });
124
- }
125
-
126
122
  updateList() {
127
- this.updateWorkList('D_pyMyWorkList');
123
+ const {
124
+ WORK_BASKET: {
125
+ DATA_PAGES: { D__PY_MY_WORK_LIST }
126
+ }
127
+ } = PCore.getConstants();
128
+ updateWorkList(getPConnect, getMappedValue(D__PY_MY_WORK_LIST));
128
129
  }
129
130
 
130
131
  updateToDo() {
131
132
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as ToDoProps;
132
133
 
133
- if (this.headerText$ == undefined) {
134
- this.headerText$ = this.configProps$.headerText;
135
- }
136
-
137
- this.datasource$ = this.configProps$.datasource ? this.configProps$.datasource : this.datasource$;
138
- this.myWorkList$ = this.configProps$.myWorkList ? this.configProps$.myWorkList : this.myWorkList$;
134
+ this.headerText$ = this.headerText$ || this.configProps$.headerText;
135
+ this.datasource$ = this.datasource$ || this.configProps$.datasource;
136
+ this.myWorkList$ = this.myWorkList$ || this.configProps$.myWorkList;
139
137
 
140
138
  this.assignmentsSource$ = this.datasource$?.source || this.myWorkList$?.source;
141
139
 
142
140
  if (this.showTodoList$) {
143
- this.assignmentCount$ = this.assignmentsSource$ != null ? this.assignmentsSource$.length : 0;
144
- this.arAssignments$ = this.topThreeAssignments(this.assignmentsSource$);
141
+ if (this.assignmentsSource$) {
142
+ this.count = this.assignmentsSource$ ? this.assignmentsSource$.length : 0;
143
+ this.arAssignments$ = this.topThreeAssignments(this.assignmentsSource$);
144
+ } else if (this.myWorkList$.datapage) {
145
+ fetchMyWorkList(this.myWorkList$.datapage, this.pConn$.getComponentConfig()?.myWorkList.fields, 3, true, this.context$).then(responseData => {
146
+ this.deferLoadWorklistItems(responseData);
147
+ });
148
+ } else {
149
+ this.arAssignments$ = [];
150
+ }
145
151
  } else {
146
152
  // get caseInfoId assignment.
147
153
  // eslint-disable-next-line no-lonely-if
@@ -153,7 +159,12 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
153
159
  this.canPerform = this.arAssignments$?.[0]?.canPerform === 'true' || this.arAssignments$?.[0]?.canPerform === true;
154
160
 
155
161
  this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
156
- this.currentUserInitials$ = this.utils.getInitials(this.currentUser$);
162
+ this.currentUserInitials$ = this.utils.getInitials(this.currentUser$ ?? '');
163
+ }
164
+
165
+ deferLoadWorklistItems(responseData) {
166
+ this.count = responseData.totalCount;
167
+ this.arAssignments$ = responseData.data;
157
168
  }
158
169
 
159
170
  getID(assignment: any) {
@@ -182,15 +193,6 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
182
193
  return this.type$ === this.CONSTS.TODO ? assignment.name : assignment.stepName;
183
194
  }
184
195
 
185
- initAssignments(): any[] {
186
- if (this.assignmentsSource$) {
187
- this.assignmentCount$ = this.assignmentsSource$.length;
188
- return this.topThreeAssignments(this.assignmentsSource$);
189
- }
190
- // turn off todolist
191
- return [];
192
- }
193
-
194
196
  getCaseInfoAssignment(assignmentsSource: any[], caseInfoID: string) {
195
197
  const result: any[] = [];
196
198
  for (const source of assignmentsSource) {
@@ -207,18 +209,26 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
207
209
  }
208
210
 
209
211
  _showMore() {
210
- this.ngZone.run(() => {
211
- this.bShowMore$ = false;
212
+ this.bShowMore$ = false;
213
+
214
+ const { WORKLIST } = PCore.getConstants();
215
+
216
+ if (this.type$ === WORKLIST && this.count && this.count > this.arAssignments$.length && !this.assignmentsSource$) {
217
+ fetchMyWorkList(this.myWorkList$.datapage, this.pConn$.getComponentConfig()?.myWorkList.fields, this.count, false, this.context$).then(
218
+ response => {
219
+ this.arAssignments$ = response.data;
220
+ }
221
+ );
222
+ } else {
212
223
  this.arAssignments$ = this.assignmentsSource$;
213
- });
224
+ }
214
225
  }
215
226
 
216
227
  _showLess() {
217
- this.ngZone.run(() => {
218
- this.bShowMore$ = true;
228
+ this.bShowMore$ = true;
229
+ const { WORKLIST } = PCore.getConstants();
219
230
 
220
- this.arAssignments$ = this.topThreeAssignments(this.assignmentsSource$);
221
- });
231
+ this.arAssignments$ = this.type$ === WORKLIST ? this.arAssignments$.slice(0, 3) : this.topThreeAssignments(this.assignmentsSource$);
222
232
  }
223
233
 
224
234
  isChildCase(assignment) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/angular-sdk-overrides",
3
- "version": "0.24.9",
3
+ "version": "0.242.1",
4
4
  "description": "Angular SDK - Code for overriding components",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"