@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
@@ -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 != '') {
@@ -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,7 +101,6 @@ 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
105
  displayMode: 'LABELS_LEFT',
107
106
  label: this.label$,
@@ -110,7 +109,7 @@ export class ScalarListComponent implements OnInit, OnDestroy {
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
  });
@@ -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,
@@ -198,7 +198,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
198
198
  }
199
199
 
200
200
  initContainer() {
201
- const containerMgr: any = this.pConn$.getContainerManager();
201
+ const containerMgr = this.pConn$.getContainerManager();
202
202
  const baseContext = this.pConn$.getContextName();
203
203
  const containerName = this.pConn$.getContainerName();
204
204
  const containerType = 'single';
@@ -237,7 +237,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
237
237
 
238
238
  // when true, update arChildren from pConn, otherwise, arChilren will be updated in updateSelf()
239
239
  if (bLoadChildren) {
240
- this.arChildren$ = this.pConn$.getChildren() as any[];
240
+ this.arChildren$ = this.pConn$.getChildren();
241
241
  }
242
242
 
243
243
  // const oData = this.pConn$.getDataObject();
@@ -277,7 +277,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
277
277
 
278
278
  hasAssignments() {
279
279
  let hasAssignments = false;
280
- const assignmentsList: any[] = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
280
+ const assignmentsList = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
281
281
  // const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
282
282
  // 8.7 includes assignments in Assignments List that may be assigned to
283
283
  // a different operator. So, see if there are any assignments for
@@ -312,7 +312,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
312
312
 
313
313
  isCaseWideLocalAction() {
314
314
  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[];
315
+ const caseActions = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.AVAILABLEACTIONS);
316
316
  let bCaseWideAction = false;
317
317
  if (caseActions && actionID) {
318
318
  const actionObj = caseActions.find(caseAction => caseAction.ID === actionID);
@@ -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,37 +97,19 @@ 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
  };
102
+ containerMgr.initializeContainers({
103
+ type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE
104
+ });
103
105
 
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
- 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
- containerMgr.initializeContainers({
114
- type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE
115
- });
116
-
117
- if (mode === CONTAINER_TYPE.MULTIPLE && limit) {
118
- /* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
119
- PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);
120
- }
106
+ if (mode === CONTAINER_TYPE.MULTIPLE && limit) {
107
+ /* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
108
+ PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);
121
109
  }
122
110
 
123
- if (sessionStorage.getItem('hasViewContainer') == 'false') {
124
- if (this.pConn$.getMetadata().children) {
125
- containerMgr.addContainerItem(this.dispatchObject);
126
- }
127
-
128
- sessionStorage.setItem('hasViewContainer', 'true');
129
- }
111
+ if (!PCore.checkIfSemanticURL()) containerMgr.addContainerItem(this.pConn$ as any);
112
+ if (!this.displayOnlyFA$) configureBrowserBookmark(this.pConn$);
130
113
 
131
114
  // cannot call checkAndUpdate becasue first time through, will call updateSelf and that is incorrect (causes issues).
132
115
  // however, need angularPConnect to be initialized with currentProps for future updates, so calling shouldComponentUpdate directly
@@ -254,7 +237,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
254
237
  console.error(`ViewContainer has a newComp that is NOT a reference!`);
255
238
 
256
239
  this.createdViewPConn$ = newComp;
257
- const newConfigProps: any = newComp.getConfigProps();
240
+ const newConfigProps = newComp.getConfigProps();
258
241
  this.templateName$ = newConfigProps.template || '';
259
242
  this.title$ = newConfigProps.title || '';
260
243
  // 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 });
@@ -81,7 +81,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
81
81
  this.resourceType = resourceType;
82
82
  this.isContainerPreview = /preview_[0-9]*/g.test(this.pConn$.getContextName());
83
83
 
84
- const theConfigProps: any = this.pConn$.getConfigProps();
84
+ const theConfigProps = this.pConn$.getConfigProps();
85
85
  this.deferLoadId = theConfigProps.deferLoadId;
86
86
  this.name = this.name || theConfigProps.name;
87
87
 
@@ -91,8 +91,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
91
91
  getViewOptions = () => ({
92
92
  viewContext: this.resourceType,
93
93
  pageClass: this.loadViewCaseID ? '' : this.pConn$.getDataObject().pyPortal.classID,
94
- container: this.isContainerPreview ? 'preview' : null,
95
- containerName: this.isContainerPreview ? 'preview' : null,
94
+ container: this.isContainerPreview ? 'preview' : undefined,
95
+ containerName: this.isContainerPreview ? 'preview' : undefined,
96
96
  updateData: this.isContainerPreview
97
97
  });
98
98
 
@@ -36,11 +36,11 @@ export class NavbarComponent implements OnInit, OnDestroy {
36
36
  navExpandCollapse$: string;
37
37
  bShowCaseTypes$ = false;
38
38
 
39
- portalApp$ = '';
39
+ portalApp$: string | undefined = '';
40
40
  portalLogoImage$: string;
41
41
  showAppName$?: boolean = false;
42
42
 
43
- portalOperator$: string;
43
+ portalOperator$: string | undefined;
44
44
  portalOperatorInitials$: string;
45
45
 
46
46
  actionsAPI: any;
@@ -131,7 +131,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
131
131
 
132
132
  this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
133
133
  this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
134
- this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$);
134
+ this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
135
135
  this.showAppName$ = this.configProps$.showAppName;
136
136
 
137
137
  this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();