@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.
Files changed (75) 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/group/group.component.ts +2 -2
  14. package/lib/field/integer/integer.component.ts +1 -1
  15. package/lib/field/multiselect/multiselect.component.ts +4 -2
  16. package/lib/field/percentage/percentage.component.ts +2 -2
  17. package/lib/field/phone/phone.component.ts +1 -1
  18. package/lib/field/radio-buttons/radio-buttons.component.ts +2 -2
  19. package/lib/field/rich-text/rich-text.component.ts +3 -3
  20. package/lib/field/scalar-list/scalar-list.component.ts +3 -4
  21. package/lib/field/text-area/text-area.component.ts +1 -1
  22. package/lib/field/text-input/text-input.component.ts +1 -1
  23. package/lib/field/time/time.component.ts +1 -1
  24. package/lib/field/url/url.component.ts +1 -1
  25. package/lib/field/user-reference/user-reference.component.ts +1 -1
  26. package/lib/infra/Containers/flow-container/flow-container.component.ts +9 -6
  27. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -1
  28. package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
  29. package/lib/infra/Containers/view-container/helper.ts +22 -0
  30. package/lib/infra/Containers/view-container/view-container.component.ts +5 -17
  31. package/lib/infra/assignment/assignment.component.ts +0 -1
  32. package/lib/infra/defer-load/defer-load.component.ts +4 -4
  33. package/lib/infra/navbar/navbar.component.ts +3 -3
  34. package/lib/infra/root-container/root-container.component.ts +3 -3
  35. package/lib/infra/view/view.component.html +6 -19
  36. package/lib/template/app-shell/app-shell.component.ts +20 -2
  37. package/lib/template/case-summary/case-summary.component.ts +1 -1
  38. package/lib/template/case-view/case-view.component.ts +1 -1
  39. package/lib/template/confirmation/confirmation.component.ts +1 -1
  40. package/lib/template/data-reference/data-reference.component.ts +36 -40
  41. package/lib/template/default-form/default-form.component.ts +7 -4
  42. package/lib/template/details/details.component.ts +2 -2
  43. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +1 -1
  44. package/lib/template/details-one-column/details-one-column.component.ts +2 -2
  45. package/lib/template/details-three-column/details-three-column.component.ts +2 -2
  46. package/lib/template/details-two-column/details-two-column.component.ts +2 -2
  47. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +2 -2
  48. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +2 -2
  49. package/lib/template/field-group-template/field-group-template.component.ts +2 -4
  50. package/lib/template/field-value-list/field-value-list.component.html +1 -1
  51. package/lib/template/form-template-base/form-template-base.component.ts +10 -0
  52. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
  53. package/lib/template/list-view/list-view.component.ts +3 -3
  54. package/lib/template/list-view/listViewHelpers.ts +1 -1
  55. package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -1
  56. package/lib/template/one-column/one-column.component.ts +4 -3
  57. package/lib/template/one-column-tab/one-column-tab.component.ts +1 -1
  58. package/lib/template/page/page.component.ts +1 -1
  59. package/lib/template/promoted-filters/promoted-filters.component.ts +1 -1
  60. package/lib/template/repeating-structures/repeating-structures.component.ts +1 -1
  61. package/lib/template/simple-table-manual/helpers.ts +1 -1
  62. package/lib/template/simple-table-manual/simple-table-manual.component.ts +15 -13
  63. package/lib/template/simple-table-select/simple-table-select.component.ts +3 -3
  64. package/lib/template/three-column/three-column.component.ts +4 -3
  65. package/lib/template/two-column/two-column.component.ts +4 -3
  66. package/lib/template/two-column-tab/two-column-tab.component.ts +1 -1
  67. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -3
  68. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -1
  69. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -3
  70. package/lib/widget/attachment/attachment.component.ts +7 -9
  71. package/lib/widget/feed-container/feed-container.component.ts +7 -7
  72. package/lib/widget/file-utility/file-utility.component.ts +2 -5
  73. package/lib/widget/todo/todo.component.html +2 -2
  74. package/lib/widget/todo/todo.component.ts +93 -83
  75. package/package.json +1 -1
@@ -22,6 +22,6 @@ export class AlertBannerComponent {
22
22
  onAlertClose(config) {
23
23
  const { PAGE, type, target } = config;
24
24
  const { clearMessages } = PCore.getMessageManager();
25
- clearMessages({ category: PAGE, type, context: target } as any);
25
+ clearMessages({ category: PAGE, type, context: target });
26
26
  }
27
27
  }
@@ -53,6 +53,6 @@ export class CaseCreateStageComponent implements OnInit, OnDestroy {
53
53
  }
54
54
 
55
55
  updateSelf() {
56
- this.arChildren$ = this.pConn$.getChildren() as any[];
56
+ this.arChildren$ = this.pConn$.getChildren();
57
57
  }
58
58
  }
@@ -53,7 +53,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
53
53
  }
54
54
 
55
55
  updateSelf(): void {
56
- const configProps$ = this.pConn$.getConfigProps() as any;
56
+ const configProps$ = this.pConn$.getConfigProps();
57
57
  this.displayLabel = this.displayLabel?.toLowerCase();
58
58
  const label = configProps$?.label?.toLowerCase();
59
59
  if (label === 'create operator' || this.displayLabel === 'create operator') {
@@ -17,8 +17,8 @@ export class PulseComponent implements OnInit {
17
17
  @Input() pConn$: typeof PConnect;
18
18
 
19
19
  configProps$: PulseProps;
20
- currentUser$: string;
21
- currentUserInitials$ = '--';
20
+ currentUser$: string | undefined;
21
+ currentUserInitials$: string | undefined = '--';
22
22
 
23
23
  ngOnInit() {
24
24
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
@@ -26,13 +26,13 @@ export class PulseComponent implements OnInit {
26
26
  this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
27
27
 
28
28
  if (this.currentUser$ != '') {
29
- this.currentUserInitials$ = this.currentUser$.charAt(0);
29
+ this.currentUserInitials$ = this.currentUser$?.charAt(0);
30
30
 
31
- if (this.currentUser$.lastIndexOf(' ') > 0) {
32
- const lastName = this.currentUser$.substring(this.currentUser$.lastIndexOf(' ') + 1);
31
+ if (this.currentUser$ && this.currentUser$.lastIndexOf(' ') > 0) {
32
+ const lastName = this.currentUser$?.substring(this.currentUser$.lastIndexOf(' ') + 1);
33
33
  this.currentUserInitials$ += lastName.charAt(0);
34
- } else if (this.currentUser$.lastIndexOf('.') > 0) {
35
- const lastName = this.currentUser$.substring(this.currentUser$.lastIndexOf('.') + 1);
34
+ } else if (this.currentUser$ && this.currentUser$.lastIndexOf('.') > 0) {
35
+ const lastName = this.currentUser$?.substring(this.currentUser$.lastIndexOf('.') + 1);
36
36
  this.currentUserInitials$ += lastName.charAt(0);
37
37
  }
38
38
  }
@@ -184,7 +184,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
184
184
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
185
185
  }
186
186
 
187
- this.componentReference = (this.pConn$.getStateProps() as any).value;
187
+ this.componentReference = this.pConn$.getStateProps().value;
188
188
  if (this.listType === 'associated') {
189
189
  this.options$ = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject('')); // 1st arg empty string until typedef marked correctly
190
190
  }
@@ -220,7 +220,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
220
220
  let datasource = this.configProps$.datasource;
221
221
  let columns = this.configProps$.columns;
222
222
  // const { deferDatasource, datasourceMetadata } = this.configProps$;
223
- const { deferDatasource, datasourceMetadata }: any = this.pConn$.getConfigProps();
223
+ const { deferDatasource, datasourceMetadata } = this.pConn$.getConfigProps();
224
224
  // convert associated to datapage listtype and transform props
225
225
  // Process deferDatasource when datapage name is present. WHhen tableType is promptList / localList
226
226
  if (deferDatasource && datasourceMetadata?.datasource?.name) {
@@ -318,7 +318,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
318
318
 
319
319
  const value = key;
320
320
  const actionsApi = this.pConn$?.getActionsApi();
321
- const propName = (this.pConn$?.getStateProps() as any).value;
321
+ const propName = this.pConn$?.getStateProps().value;
322
322
  handleEvent(actionsApi, 'changeNblur', propName, value);
323
323
  if (this.configProps$?.onRecordChange) {
324
324
  el.value = value;
@@ -146,7 +146,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
146
146
  }
147
147
 
148
148
  this.actionsApi = this.pConn$.getActionsApi();
149
- this.propName = (this.pConn$.getStateProps() as any).value;
149
+ this.propName = this.pConn$.getStateProps().value;
150
150
 
151
151
  // multi case
152
152
  this.selectionMode = this.configProps$.selectionMode;
@@ -159,7 +159,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
159
159
  this.datasource = this.configProps$.datasource;
160
160
  this.selectionKey = this.configProps$.selectionKey;
161
161
  const listSourceItems = this.datasource?.source ?? [];
162
- const dataField: any = this.selectionKey?.split?.('.')[1];
162
+ const dataField = this.selectionKey?.split?.('.')[1] ?? '';
163
163
  const listToDisplay: any[] = [];
164
164
  listSourceItems.forEach(element => {
165
165
  element.selected = this.selectedvalues?.some?.(data => data[dataField] === element.key);
@@ -203,7 +203,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
203
203
  this.fieldControl.enable();
204
204
  }
205
205
 
206
- this.componentReference = (this.pConn$.getStateProps() as any).value;
206
+ this.componentReference = this.pConn$.getStateProps().value;
207
207
 
208
208
  // eslint-disable-next-line sonarjs/no-redundant-boolean
209
209
  if (this.value$ === 'true' || this.value$ == true) {
@@ -129,7 +129,7 @@ export class CurrencyComponent implements OnInit, OnDestroy {
129
129
  }
130
130
  this.helperText = this.configProps$.helperText;
131
131
  this.placeholder = this.configProps$.placeholder || '';
132
- const currencyISOCode: any = this.configProps$?.currencyISOCode;
132
+ const currencyISOCode = this.configProps$?.currencyISOCode ?? '';
133
133
 
134
134
  const theSymbols = getCurrencyCharacters(currencyISOCode);
135
135
  this.currSym = theSymbols.theCurrencySymbol;
@@ -169,7 +169,7 @@ export class CurrencyComponent implements OnInit, OnDestroy {
169
169
 
170
170
  this.decimalPrecision = this.configProps$?.allowDecimals ? 2 : 0;
171
171
 
172
- this.componentReference = (this.pConn$.getStateProps() as any).value;
172
+ this.componentReference = this.pConn$.getStateProps().value;
173
173
 
174
174
  // trigger display of error message with field control
175
175
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -184,7 +184,7 @@ export class CurrencyComponent implements OnInit, OnDestroy {
184
184
 
185
185
  fieldOnBlur(event: any) {
186
186
  const actionsApi = this.pConn$?.getActionsApi();
187
- const propName = (this.pConn$?.getStateProps() as any).value;
187
+ const propName = this.pConn$?.getStateProps().value;
188
188
  let value = event?.target?.value;
189
189
  value = value?.substring(1);
190
190
  if (this.currSep === ',') {
@@ -21,7 +21,7 @@ interface DateProps extends PConnFieldProps {
21
21
  }
22
22
 
23
23
  class MyFormat {
24
- theDateFormat: any = getDateFormatInfo();
24
+ theDateFormat = getDateFormatInfo();
25
25
 
26
26
  get display() {
27
27
  return {
@@ -83,7 +83,7 @@ export class DateComponent implements OnInit, OnDestroy {
83
83
  // Start with default dateFormatInfo
84
84
  dateFormatInfo = dateFormatInfoDefault;
85
85
  // and then update, as needed, based on locale, etc.
86
- theDateFormat: any = getDateFormatInfo();
86
+ theDateFormat = getDateFormatInfo();
87
87
 
88
88
  constructor(
89
89
  private angularPConnect: AngularPConnectService,
@@ -194,7 +194,7 @@ export class DateComponent implements OnInit, OnDestroy {
194
194
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
195
195
  }
196
196
 
197
- this.componentReference = (this.pConn$.getStateProps() as any).value;
197
+ this.componentReference = this.pConn$.getStateProps().value;
198
198
 
199
199
  // trigger display of error message with field control
200
200
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -61,7 +61,7 @@ export class DateTimeComponent implements OnInit, OnDestroy {
61
61
  // Start with default dateFormatInfo
62
62
  dateFormatInfo = dateFormatInfoDefault;
63
63
  // and then update, as needed, based on locale, etc.
64
- theDateFormat: any = getDateFormatInfo();
64
+ theDateFormat = getDateFormatInfo();
65
65
  placeholder: string;
66
66
 
67
67
  constructor(
@@ -155,7 +155,7 @@ export class DateTimeComponent implements OnInit, OnDestroy {
155
155
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
156
156
  }
157
157
 
158
- this.componentReference = (this.pConn$.getStateProps() as any).value;
158
+ this.componentReference = this.pConn$.getStateProps().value;
159
159
 
160
160
  // trigger display of error message with field control
161
161
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -140,7 +140,7 @@ export class DecimalComponent implements OnInit, OnDestroy {
140
140
  this.helperText = this.configProps$.helperText;
141
141
  this.placeholder = this.configProps$.placeholder || '';
142
142
  const showGroupSeparators = this.configProps$.showGroupSeparators;
143
- const currencyISOCode: any = this.configProps$?.currencyISOCode;
143
+ const currencyISOCode = this.configProps$?.currencyISOCode ?? '';
144
144
 
145
145
  const theSymbols = getCurrencyCharacters(currencyISOCode);
146
146
  this.currDec = theSymbols.theDecimalIndicator;
@@ -152,7 +152,7 @@ export class DecimalComponent implements OnInit, OnDestroy {
152
152
  if (this.formatter === 'Currency') {
153
153
  this.formattedValue = format(this.value$, this.formatter.toLowerCase(), theCurrencyOptions);
154
154
  } else {
155
- this.formattedValue = format(this.value$, this.pConn$.getComponentName().toLowerCase(), theCurrencyOptions);
155
+ this.formattedValue = format(this.value$, this.pConn$.getComponentName()?.toLowerCase(), theCurrencyOptions);
156
156
  }
157
157
 
158
158
  // timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
@@ -189,12 +189,12 @@ export class DecimalComponent implements OnInit, OnDestroy {
189
189
  }
190
190
  this.decimalPrecision = this.configProps$?.decimalPrecision ?? 2;
191
191
 
192
- this.componentReference = (this.pConn$.getStateProps() as any).value;
192
+ this.componentReference = this.pConn$.getStateProps().value;
193
193
  }
194
194
 
195
195
  fieldOnBlur(event: any) {
196
196
  const actionsApi = this.pConn$?.getActionsApi();
197
- const propName = (this.pConn$?.getStateProps() as any).value;
197
+ const propName = this.pConn$?.getStateProps().value;
198
198
  let value = event?.target?.value;
199
199
  if (this.currSep === ',') {
200
200
  value = value.replace(/,/g, '');
@@ -157,7 +157,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
157
157
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
158
158
  }
159
159
 
160
- this.componentReference = (this.pConn$.getStateProps() as any).value;
160
+ this.componentReference = this.pConn$.getStateProps().value;
161
161
 
162
162
  const optionsList = [...this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject())];
163
163
  optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
@@ -166,7 +166,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
166
166
  this.value$ = 'Select';
167
167
  }
168
168
 
169
- const propName = (this.pConn$.getStateProps() as any).value;
169
+ const propName = this.pConn$.getStateProps().value;
170
170
  const className = this.pConn$.getCaseInfo().getClassName();
171
171
  const refName = propName?.slice(propName.lastIndexOf('.') + 1);
172
172
 
@@ -205,7 +205,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
205
205
  event.value = '';
206
206
  }
207
207
  const actionsApi = this.pConn$?.getActionsApi();
208
- const propName = (this.pConn$?.getStateProps() as any).value;
208
+ const propName = this.pConn$?.getStateProps().value;
209
209
  handleEvent(actionsApi, 'changeNblur', propName, event.value);
210
210
  if (this.configProps$?.onRecordChange) {
211
211
  this.configProps$.onRecordChange(event);
@@ -139,7 +139,7 @@ export class EmailComponent implements OnInit, OnDestroy {
139
139
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
140
140
  }
141
141
 
142
- this.componentReference = (this.pConn$.getStateProps() as any).value;
142
+ this.componentReference = this.pConn$.getStateProps().value;
143
143
 
144
144
  // trigger display of error message with field control
145
145
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -73,12 +73,12 @@ export class GroupComponent implements OnInit {
73
73
  this.visibility$ = this.pConn$.getComputedVisibility();
74
74
  }
75
75
 
76
- if (this.configProps$.displayMode === 'LABELS_LEFT') {
76
+ if (this.configProps$.displayMode === 'DISPLAY_ONLY') {
77
77
  if (this.configProps$.visibility === undefined) this.visibility$ = true;
78
78
 
79
79
  this.arChildren$.forEach(child => {
80
80
  const pConn = child.getPConnect();
81
- pConn.setInheritedProp('displayMode', 'LABELS_LEFT');
81
+ pConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');
82
82
  pConn.setInheritedProp('readOnly', true);
83
83
 
84
84
  return child;
@@ -142,7 +142,7 @@ export class IntegerComponent implements OnInit, OnDestroy {
142
142
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
143
143
  }
144
144
 
145
- this.componentReference = (this.pConn$.getStateProps() as any).value;
145
+ this.componentReference = this.pConn$.getStateProps().value;
146
146
 
147
147
  // trigger display of error message with field control
148
148
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -181,7 +181,9 @@ export class MultiselectComponent implements OnInit, OnDestroy {
181
181
  listType: this.listType,
182
182
  maxResultsDisplay: this.maxResultsDisplay || '100',
183
183
  columns: preProcessColumns(columns),
184
- groupColumnsConfig: preProcessColumns(this.groupColumnsConfig)
184
+ groupColumnsConfig: preProcessColumns(this.groupColumnsConfig),
185
+ associationFilter: undefined,
186
+ ignoreCase: undefined
185
187
  };
186
188
 
187
189
  const groupsDisplayFieldMeta = this.listType !== 'associated' ? getDisplayFieldsMetaData(dataConfig.groupColumnsConfig) : null;
@@ -326,7 +328,7 @@ export class MultiselectComponent implements OnInit, OnDestroy {
326
328
 
327
329
  setSelectedItemsForReferenceList(data: any) {
328
330
  // Clear error messages if any
329
- const propName = (this.pConn$.getStateProps() as any).selectionList;
331
+ const propName = this.pConn$.getStateProps().selectionList;
330
332
  this.pConn$.clearErrorMessages({
331
333
  property: propName,
332
334
  category: '',
@@ -157,7 +157,7 @@ export class PercentageComponent implements OnInit, OnDestroy {
157
157
 
158
158
  this.decimalPrecision = this.configProps$?.decimalPrecision ?? 2;
159
159
 
160
- this.componentReference = (this.pConn$.getStateProps() as any).value;
160
+ this.componentReference = this.pConn$.getStateProps().value;
161
161
 
162
162
  // trigger display of error message with field control
163
163
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -175,7 +175,7 @@ export class PercentageComponent implements OnInit, OnDestroy {
175
175
 
176
176
  fieldOnBlur(event: any) {
177
177
  const actionsApi = this.pConn$?.getActionsApi();
178
- const propName = (this.pConn$?.getStateProps() as any).value;
178
+ const propName = this.pConn$?.getStateProps()?.value;
179
179
  let value = event?.target?.value;
180
180
  value = value ? value.replace(/%/g, '') : '';
181
181
  if (this.currSep === ',') {
@@ -162,7 +162,7 @@ export class PhoneComponent implements OnInit, OnDestroy {
162
162
  fieldOnChange() {
163
163
  if (this.formGroup$.controls[this.controlName$].value) {
164
164
  const actionsApi = this.pConn$?.getActionsApi();
165
- const propName = (this.pConn$?.getStateProps() as any).value;
165
+ const propName = this.pConn$?.getStateProps().value;
166
166
  const value = this.formGroup$.controls[this.controlName$].value;
167
167
  const eventObj = {
168
168
  target: {
@@ -164,11 +164,11 @@ export class RadioButtonsComponent implements OnInit, OnDestroy {
164
164
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
165
165
  }
166
166
 
167
- this.componentReference = (this.pConn$.getStateProps() as any).value;
167
+ this.componentReference = this.pConn$.getStateProps().value;
168
168
 
169
169
  this.options$ = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject());
170
170
 
171
- const propName = (this.pConn$.getStateProps() as any).value;
171
+ const propName = this.pConn$.getStateProps().value;
172
172
  const className = this.pConn$.getCaseInfo().getClassName();
173
173
  const refName = propName?.slice(propName.lastIndexOf('.') + 1);
174
174
 
@@ -80,7 +80,7 @@ export class RichTextComponent implements OnInit, OnDestroy {
80
80
  updateSelf(): void {
81
81
  // moved this from ngOnInit() and call this from there instead...
82
82
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as RichTextProps;
83
- const stateProps: any = this.pConn$.getStateProps();
83
+ const stateProps = this.pConn$.getStateProps();
84
84
  this.status = stateProps?.status;
85
85
 
86
86
  if (this.configProps$.value != undefined) {
@@ -113,7 +113,7 @@ export class RichTextComponent implements OnInit, OnDestroy {
113
113
 
114
114
  fieldOnChange() {
115
115
  if (this.status === 'error') {
116
- const property = (this.pConn$.getStateProps() as any).value;
116
+ const property = this.pConn$.getStateProps().value;
117
117
  this.pConn$.clearErrorMessages({
118
118
  property,
119
119
  category: '',
@@ -125,7 +125,7 @@ export class RichTextComponent implements OnInit, OnDestroy {
125
125
  fieldOnBlur(editorValue: any) {
126
126
  // PConnect wants to use eventHandler for onBlur
127
127
  const actionsApi = this.pConn$?.getActionsApi();
128
- const propName = (this.pConn$?.getStateProps() as any).value;
128
+ const propName = this.pConn$?.getStateProps()?.value;
129
129
  handleEvent(actionsApi, 'changeNblur', propName, editorValue);
130
130
  }
131
131
  }
@@ -101,20 +101,19 @@ export class ScalarListComponent implements OnInit, OnDestroy {
101
101
  {
102
102
  type: componentType,
103
103
  config: {
104
- // @ts-ignore - Object literal may only specify known properties, and 'value' does not exist in type 'ComponentMetadataConfig'.
105
104
  value: scalarValue,
106
- displayMode: 'LABELS_LEFT',
105
+ displayMode: 'DISPLAY_ONLY',
107
106
  label: this.label$,
108
107
  ...restProps,
109
108
  readOnly: true
110
109
  }
111
110
  },
112
111
  '',
113
- '',
112
+ 0,
114
113
  {}
115
114
  ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
116
115
  });
117
- this.isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(this.displayMode$ as string);
116
+ this.isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(this.displayMode$ as string);
118
117
  this.value$ = this.items;
119
118
  }
120
119
  }
@@ -140,7 +140,7 @@ export class TextAreaComponent implements OnInit, OnDestroy {
140
140
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
141
141
  }
142
142
 
143
- this.componentReference = (this.pConn$.getStateProps() as any).value;
143
+ this.componentReference = this.pConn$.getStateProps().value;
144
144
 
145
145
  // trigger display of error message with field control
146
146
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -113,7 +113,7 @@ export class TextInputComponent implements OnInit, OnDestroy {
113
113
  this.label$ = this.configProps$.label;
114
114
  this.displayMode$ = this.configProps$.displayMode;
115
115
 
116
- this.componentReference = (this.pConn$.getStateProps() as any).value;
116
+ this.componentReference = this.pConn$.getStateProps().value;
117
117
 
118
118
  if (this.configProps$.visibility != null) {
119
119
  this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
@@ -138,7 +138,7 @@ export class TimeComponent implements OnInit, OnDestroy {
138
138
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
139
139
  }
140
140
 
141
- this.componentReference = (this.pConn$.getStateProps() as any).value;
141
+ this.componentReference = this.pConn$.getStateProps().value;
142
142
 
143
143
  // trigger display of error message with field control
144
144
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -140,7 +140,7 @@ export class UrlComponent implements OnInit, OnDestroy {
140
140
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
141
141
  }
142
142
 
143
- this.componentReference = (this.pConn$.getStateProps() as any).value;
143
+ this.componentReference = this.pConn$.getStateProps().value;
144
144
 
145
145
  // trigger display of error message with field control
146
146
  if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -174,7 +174,7 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
174
174
  dataViewName: OPERATORS_DP
175
175
  };
176
176
  try {
177
- const resp: any = await PCore.getRestClient().invokeRestApi('getListData', { queryPayload } as any, ''); // 3rd arg empty string until typedef marked correctly
177
+ const resp = await PCore.getRestClient().invokeRestApi('getListData', { queryPayload }, ''); // 3rd arg empty string until typedef marked correctly
178
178
  if (resp?.data) {
179
179
  const ddDataSource = resp.data.data.map(listItem => ({
180
180
  key: listItem.pyUserIdentifier,
@@ -104,6 +104,8 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
104
104
 
105
105
  this.initContainer();
106
106
 
107
+ this.checkAndUpdate();
108
+
107
109
  PCore.getPubSubUtils().subscribe(
108
110
  PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL,
109
111
  () => {
@@ -198,7 +200,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
198
200
  }
199
201
 
200
202
  initContainer() {
201
- const containerMgr: any = this.pConn$.getContainerManager();
203
+ const containerMgr = this.pConn$.getContainerManager();
202
204
  const baseContext = this.pConn$.getContextName();
203
205
  const containerName = this.pConn$.getContainerName();
204
206
  const containerType = 'single';
@@ -237,7 +239,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
237
239
 
238
240
  // when true, update arChildren from pConn, otherwise, arChilren will be updated in updateSelf()
239
241
  if (bLoadChildren) {
240
- this.arChildren$ = this.pConn$.getChildren() as any[];
242
+ this.arChildren$ = this.pConn$.getChildren();
241
243
  }
242
244
 
243
245
  // const oData = this.pConn$.getDataObject();
@@ -277,7 +279,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
277
279
 
278
280
  hasAssignments() {
279
281
  let hasAssignments = false;
280
- const assignmentsList: any[] = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
282
+ const assignmentsList = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
281
283
  // const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
282
284
  // 8.7 includes assignments in Assignments List that may be assigned to
283
285
  // a different operator. So, see if there are any assignments for
@@ -312,7 +314,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
312
314
 
313
315
  isCaseWideLocalAction() {
314
316
  const actionID = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID);
315
- const caseActions = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.AVAILABLEACTIONS) as any[];
317
+ const caseActions = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.AVAILABLEACTIONS);
316
318
  let bCaseWideAction = false;
317
319
  if (caseActions && actionID) {
318
320
  const actionObj = caseActions.find(caseAction => caseAction.ID === actionID);
@@ -457,7 +459,9 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
457
459
 
458
460
  showCaseMessages() {
459
461
  this.caseMessages$ = this.localizedVal(this.pConn$.getValue('caseMessages'), this.localeCategory);
460
- if (this.caseMessages$ || !this.hasAssignments()) {
462
+ // caseMessages's behavior has changed in 24.2, and hence it doesn't let Optional Action work.
463
+ // Changing the below condition for now. Was: (theCaseMessages || !hasAssignments())
464
+ if (!this.hasAssignments()) {
461
465
  this.bHasCaseMessages$ = true;
462
466
  this.bShowConfirm = true;
463
467
  this.checkSvg$ = this.utils.getImageSrc('check', this.utils.getSDKStaticContentUrl());
@@ -593,7 +597,6 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
593
597
  });
594
598
  }
595
599
 
596
- // eslint-disable-next-line sonarjs/no-identical-functions
597
600
  topViewRefresh(): void {
598
601
  Object.values(this.formGroup$.controls).forEach(control => {
599
602
  control.markAsTouched();
@@ -89,7 +89,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
89
89
  this.itemKey$ = baseContext.concat('/').concat(acName);
90
90
  }
91
91
 
92
- const containerMgr: any = this.pConn$.getContainerManager();
92
+ const containerMgr = this.pConn$.getContainerManager();
93
93
 
94
94
  containerMgr.initializeContainers({
95
95
  type: 'multiple'
@@ -18,7 +18,7 @@ export class PreviewViewContainerComponent implements OnInit {
18
18
  @Input() pConn$: typeof PConnect;
19
19
 
20
20
  ngOnInit(): void {
21
- const containerMgr: any = this.pConn$.getContainerManager();
21
+ const containerMgr = this.pConn$.getContainerManager();
22
22
 
23
23
  containerMgr.initializeContainers({
24
24
  type: 'multiple'
@@ -0,0 +1,22 @@
1
+ export const addContainerItem = pConnect => {
2
+ const containerManager = pConnect.getContainerManager();
3
+ const context = pConnect.getContextName();
4
+ containerManager.addContainerItem({
5
+ context,
6
+ semanticURL: ''
7
+ });
8
+ };
9
+
10
+ export const configureBrowserBookmark = pConnect => {
11
+ const context = pConnect.getContextName();
12
+ const containerName = pConnect.getContainerName();
13
+ const navPages = pConnect.getValue('pyPortal.pyPrimaryNavPages');
14
+ const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : '';
15
+ PCore.configureForBrowserBookmark({
16
+ context,
17
+ containerName,
18
+ acName: containerName,
19
+ semanticURL: '',
20
+ defaultViewLabel
21
+ });
22
+ };
@@ -5,6 +5,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
5
5
  import { ProgressSpinnerService } from '@pega/angular-sdk-components';
6
6
  import { ReferenceComponent } from '@pega/angular-sdk-components';
7
7
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
8
+ import { configureBrowserBookmark } from './helper';
8
9
 
9
10
  /**
10
11
  * WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
@@ -86,7 +87,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
86
87
 
87
88
  this.pConn$.isBoundToState();
88
89
 
89
- const containerMgr: any = this.pConn$.getContainerManager();
90
+ const containerMgr = this.pConn$.getContainerManager();
90
91
 
91
92
  this.prepareDispatchObject = this.prepareDispatchObject.bind(this);
92
93
 
@@ -96,20 +97,10 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
96
97
  // And expose less via ui-bootstrap.js
97
98
  this.state = {
98
99
  dispatchObject: this.dispatchObject,
99
- // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore
100
-
101
100
  visible: !PCore.checkIfSemanticURL()
102
101
  };
103
102
 
104
- // here, to match Nebula/Constellation, the constructor of ViewContainer is only called once, and thus init/add container is only
105
- // called once. Because of Angular creating and destroy components if the parent changes a lot, this component will be
106
- // created and destroyed more than once. So the sessionStore "hasViewContainer" is set to false in rootContainer and then
107
- // after first round is true here. Subsequent ViewContainer creation will not init/add more containers.
108
-
109
103
  if (sessionStorage.getItem('hasViewContainer') == 'false') {
110
- // unlike Nebula/Constellation, have to initializeContainer after we create a dispatcObject and state, otherwise, when calling
111
- // initializeContainer before, code will get executed that needs state that wasn't defined.
112
-
113
104
  containerMgr.initializeContainers({
114
105
  type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE
115
106
  });
@@ -118,12 +109,9 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
118
109
  /* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
119
110
  PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);
120
111
  }
121
- }
122
112
 
123
- if (sessionStorage.getItem('hasViewContainer') == 'false') {
124
- if (this.pConn$.getMetadata().children) {
125
- containerMgr.addContainerItem(this.dispatchObject);
126
- }
113
+ if (!PCore.checkIfSemanticURL()) containerMgr.addContainerItem(this.pConn$ as any);
114
+ if (!this.displayOnlyFA$) configureBrowserBookmark(this.pConn$);
127
115
 
128
116
  sessionStorage.setItem('hasViewContainer', 'true');
129
117
  }
@@ -254,7 +242,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
254
242
  console.error(`ViewContainer has a newComp that is NOT a reference!`);
255
243
 
256
244
  this.createdViewPConn$ = newComp;
257
- const newConfigProps: any = newComp.getConfigProps();
245
+ const newConfigProps = newComp.getConfigProps();
258
246
  this.templateName$ = newConfigProps.template || '';
259
247
  this.title$ = newConfigProps.title || '';
260
248
  // update children with new view's children
@@ -332,7 +332,6 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
332
332
 
333
333
  savePromise
334
334
  .then(() => {
335
- // @ts-ignore - Property 'c11nEnv' is private and only accessible within class 'CaseInfo'.
336
335
  const caseType = this.pConn$.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);
337
336
  PCore.getPubSubUtils().publish('cancelPressed');
338
337
  this.onSaveActionSuccess({ caseType, caseID, assignmentID });