@pega/angular-sdk-overrides 0.24.9 → 0.25.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 (172) hide show
  1. package/lib/designSystemExtension/alert/alert.component.ts +0 -1
  2. package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +1 -2
  3. package/lib/designSystemExtension/banner/banner.component.ts +0 -1
  4. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -2
  5. package/lib/designSystemExtension/field-group/field-group.component.ts +0 -1
  6. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
  7. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +0 -2
  8. package/lib/designSystemExtension/material-details/material-details.component.ts +0 -1
  9. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +2 -2
  10. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +10 -2
  11. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.ts +0 -1
  12. package/lib/designSystemExtension/material-summary-list/material-summary-list.component.ts +0 -1
  13. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.ts +0 -1
  14. package/lib/designSystemExtension/operator/operator.component.html +1 -1
  15. package/lib/designSystemExtension/operator/operator.component.scss +10 -2
  16. package/lib/designSystemExtension/operator/operator.component.ts +5 -5
  17. package/lib/designSystemExtension/pulse/pulse.component.ts +7 -8
  18. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +0 -1
  19. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.ts +0 -1
  20. package/lib/field/auto-complete/auto-complete.component.html +0 -1
  21. package/lib/field/auto-complete/auto-complete.component.ts +31 -16
  22. package/lib/field/cancel-alert/cancel-alert.component.ts +0 -1
  23. package/lib/field/check-box/check-box.component.html +18 -6
  24. package/lib/field/check-box/check-box.component.ts +17 -12
  25. package/lib/field/currency/currency.component.html +4 -4
  26. package/lib/field/currency/currency.component.ts +42 -20
  27. package/lib/field/date/date.component.html +3 -7
  28. package/lib/field/date/date.component.ts +22 -40
  29. package/lib/field/date-time/date-time.component.html +3 -4
  30. package/lib/field/date-time/date-time.component.ts +35 -17
  31. package/lib/field/decimal/decimal.component.html +4 -3
  32. package/lib/field/decimal/decimal.component.ts +47 -22
  33. package/lib/field/dropdown/dropdown.component.html +1 -0
  34. package/lib/field/dropdown/dropdown.component.ts +146 -19
  35. package/lib/field/email/email.component.ts +24 -5
  36. package/lib/field/group/group.component.ts +2 -3
  37. package/lib/field/integer/integer.component.ts +22 -5
  38. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +1 -1
  39. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +3 -3
  40. package/lib/field/location/config-ext.json +8 -0
  41. package/lib/field/location/location.component.html +45 -0
  42. package/lib/field/location/location.component.scss +18 -0
  43. package/lib/field/location/location.component.spec.ts +22 -0
  44. package/lib/field/location/location.component.ts +385 -0
  45. package/lib/field/multiselect/multiselect.component.ts +17 -10
  46. package/lib/field/percentage/percentage.component.html +3 -3
  47. package/lib/field/percentage/percentage.component.ts +45 -21
  48. package/lib/field/phone/config-ext.json +1 -1
  49. package/lib/field/phone/phone.component.html +9 -6
  50. package/lib/field/phone/phone.component.scss +9 -0
  51. package/lib/field/phone/phone.component.ts +30 -27
  52. package/lib/field/radio-buttons/radio-buttons.component.html +17 -12
  53. package/lib/field/radio-buttons/radio-buttons.component.ts +13 -10
  54. package/lib/field/rich-text/rich-text.component.ts +19 -9
  55. package/lib/field/scalar-list/scalar-list.component.ts +3 -5
  56. package/lib/field/selectable-card/selectable-card.component.html +40 -0
  57. package/lib/field/selectable-card/selectable-card.component.scss +0 -0
  58. package/lib/field/selectable-card/selectable-card.component.spec.ts +22 -0
  59. package/lib/field/selectable-card/selectable-card.component.ts +255 -0
  60. package/lib/field/semantic-link/semantic-link.component.ts +0 -1
  61. package/lib/field/text/text.component.ts +8 -5
  62. package/lib/field/text-area/text-area.component.html +4 -1
  63. package/lib/field/text-area/text-area.component.ts +22 -6
  64. package/lib/field/text-content/text-content.component.ts +0 -1
  65. package/lib/field/text-input/text-input.component.ts +22 -5
  66. package/lib/field/time/time.component.html +2 -2
  67. package/lib/field/time/time.component.ts +35 -7
  68. package/lib/field/url/url.component.ts +22 -5
  69. package/lib/field/user-reference/user-reference.component.html +40 -46
  70. package/lib/field/user-reference/user-reference.component.ts +111 -21
  71. package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
  72. package/lib/infra/Containers/flow-container/flow-container.component.ts +25 -48
  73. package/lib/infra/Containers/flow-container/helpers.ts +2 -2
  74. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +0 -1
  75. package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +1 -11
  76. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -9
  77. package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
  78. package/lib/infra/Containers/view-container/helper.ts +22 -0
  79. package/lib/infra/Containers/view-container/view-container.component.ts +5 -18
  80. package/lib/infra/action-buttons/action-buttons.component.html +1 -1
  81. package/lib/infra/action-buttons/action-buttons.component.ts +0 -1
  82. package/lib/infra/assignment/assignment.component.html +1 -1
  83. package/lib/infra/assignment/assignment.component.ts +82 -41
  84. package/lib/infra/assignment-card/assignment-card.component.html +1 -0
  85. package/lib/infra/assignment-card/assignment-card.component.ts +0 -1
  86. package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
  87. package/lib/infra/defer-load/defer-load.component.ts +8 -6
  88. package/lib/infra/error-boundary/error-boundary.component.ts +0 -1
  89. package/lib/infra/multi-step/multi-step.component.ts +0 -1
  90. package/lib/infra/navbar/navbar.component.ts +3 -6
  91. package/lib/infra/reference/reference.component.ts +77 -90
  92. package/lib/infra/region/region.component.ts +0 -1
  93. package/lib/infra/root-container/root-container.component.html +2 -15
  94. package/lib/infra/root-container/root-container.component.ts +27 -33
  95. package/lib/infra/stages/stages.component.scss +2 -2
  96. package/lib/infra/stages/stages.component.ts +0 -1
  97. package/lib/infra/view/view.component.html +7 -20
  98. package/lib/infra/view/view.component.ts +20 -3
  99. package/lib/template/app-shell/app-shell.component.ts +20 -3
  100. package/lib/template/banner-page/banner-page.component.ts +0 -1
  101. package/lib/template/base/details-template-base.ts +67 -0
  102. package/lib/template/base/form-template-base.ts +16 -0
  103. package/lib/template/case-summary/case-summary.component.ts +7 -23
  104. package/lib/template/case-view/case-view.component.html +4 -4
  105. package/lib/template/case-view/case-view.component.ts +8 -14
  106. package/lib/template/confirmation/confirmation.component.html +1 -1
  107. package/lib/template/confirmation/confirmation.component.ts +1 -2
  108. package/lib/template/data-reference/data-reference.component.ts +36 -41
  109. package/lib/template/default-form/default-form.component.html +0 -4
  110. package/lib/template/default-form/default-form.component.ts +41 -25
  111. package/lib/template/details/details.component.ts +7 -42
  112. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +6 -40
  113. package/lib/template/details-one-column/details-one-column.component.ts +7 -43
  114. package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
  115. package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -38
  116. package/lib/template/details-three-column/details-three-column.component.ts +7 -44
  117. package/lib/template/details-two-column/details-two-column.component.ts +8 -45
  118. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +7 -43
  119. package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
  120. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +8 -4
  121. package/lib/template/field-group-list/field-group-list.component.ts +0 -1
  122. package/lib/template/field-group-template/field-group-template.component.html +7 -7
  123. package/lib/template/field-group-template/field-group-template.component.scss +8 -0
  124. package/lib/template/field-group-template/field-group-template.component.ts +68 -48
  125. package/lib/template/field-value-list/field-value-list.component.html +2 -2
  126. package/lib/template/field-value-list/field-value-list.component.scss +6 -1
  127. package/lib/template/field-value-list/field-value-list.component.ts +0 -1
  128. package/lib/template/inline-dashboard/inline-dashboard.component.ts +0 -1
  129. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -3
  130. package/lib/template/list-page/list-page.component.ts +0 -1
  131. package/lib/template/list-view/list-view.component.html +6 -1
  132. package/lib/template/list-view/list-view.component.scss +11 -0
  133. package/lib/template/list-view/list-view.component.ts +25 -11
  134. package/lib/template/list-view/listViewHelpers.ts +4 -10
  135. package/lib/template/list-view/utils.ts +2 -5
  136. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +0 -1
  137. package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -2
  138. package/lib/template/one-column/one-column.component.ts +4 -4
  139. package/lib/template/one-column-page/one-column-page.component.ts +0 -1
  140. package/lib/template/one-column-tab/one-column-tab.component.ts +1 -2
  141. package/lib/template/page/page.component.ts +1 -2
  142. package/lib/template/promoted-filters/promoted-filters.component.ts +1 -2
  143. package/lib/template/repeating-structures/repeating-structures.component.ts +1 -2
  144. package/lib/template/simple-table/simple-table.component.ts +0 -1
  145. package/lib/template/simple-table-manual/helpers.ts +126 -10
  146. package/lib/template/simple-table-manual/simple-table-manual.component.html +25 -6
  147. package/lib/template/simple-table-manual/simple-table-manual.component.scss +12 -3
  148. package/lib/template/simple-table-manual/simple-table-manual.component.ts +110 -54
  149. package/lib/template/simple-table-select/simple-table-select.component.ts +3 -4
  150. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +0 -1
  151. package/lib/template/sub-tabs/sub-tabs.component.ts +0 -1
  152. package/lib/template/three-column/three-column.component.ts +4 -4
  153. package/lib/template/three-column-page/three-column-page.component.ts +0 -1
  154. package/lib/template/two-column/two-column.component.ts +4 -4
  155. package/lib/template/two-column-page/two-column-page.component.ts +0 -1
  156. package/lib/template/two-column-tab/two-column-tab.component.ts +1 -2
  157. package/lib/template/utils.ts +16 -0
  158. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -4
  159. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -2
  160. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -4
  161. package/lib/widget/app-announcement/app-announcement.component.ts +0 -1
  162. package/lib/widget/attachment/attachment.component.ts +9 -13
  163. package/lib/widget/case-history/case-history.component.ts +0 -1
  164. package/lib/widget/feed-container/feed-container.component.ts +7 -10
  165. package/lib/widget/file-utility/file-utility.component.ts +2 -6
  166. package/lib/widget/list-utility/list-utility.component.ts +0 -1
  167. package/lib/widget/quick-create/quick-create.component.ts +0 -1
  168. package/lib/widget/todo/todo.component.html +5 -6
  169. package/lib/widget/todo/todo.component.scss +9 -0
  170. package/lib/widget/todo/todo.component.ts +95 -85
  171. package/lib/widget/utility/utility.component.ts +0 -1
  172. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-classes-per-file */
2
1
  import { Component, OnInit, Input, ViewChild, forwardRef, OnDestroy } from '@angular/core';
3
2
  import { CommonModule } from '@angular/common';
4
3
  import { FormGroup } from '@angular/forms';
@@ -18,11 +17,10 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
18
17
  import { DatapageService } from '@pega/angular-sdk-components';
19
18
  import { getReferenceList } from '@pega/angular-sdk-components';
20
19
  import { buildFieldsForTable, filterDataByCommonFields, filterDataByDate, getContext } from './helpers';
20
+ import { evaluateAllowRowAction } from '@pega/angular-sdk-components';
21
21
  import { Utils } from '@pega/angular-sdk-components';
22
22
  import { getSeconds } from '@pega/angular-sdk-components';
23
23
 
24
- declare const window: any;
25
-
26
24
  interface SimpleTableManualProps {
27
25
  // If any, enter additional props that only exist on this component
28
26
  visibility?: boolean;
@@ -37,7 +35,9 @@ interface SimpleTableManualProps {
37
35
  contextClass?: string;
38
36
  propertyLabel?: string;
39
37
  fieldMetadata?: any;
38
+ allowActions?: any;
40
39
  allowTableEdit?: boolean;
40
+ allowRowDelete?: any;
41
41
  editMode?: string;
42
42
  addAndEditRowsWithin?: any;
43
43
  viewForAddAndEditModal?: any;
@@ -45,6 +45,7 @@ interface SimpleTableManualProps {
45
45
  displayMode?: string;
46
46
  useSeparateViewForEdit: any;
47
47
  viewForEditModal: any;
48
+ targetClassLabel: string;
48
49
  }
49
50
 
50
51
  class Group {
@@ -61,7 +62,6 @@ class Group {
61
62
  selector: 'app-simple-table-manual',
62
63
  templateUrl: './simple-table-manual.component.html',
63
64
  styleUrls: ['./simple-table-manual.component.scss'],
64
- standalone: true,
65
65
  imports: [
66
66
  CommonModule,
67
67
  MatTableModule,
@@ -103,6 +103,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
103
103
  showAddRowButton: boolean;
104
104
  prevReferenceList: any[] = [];
105
105
  elementsData: MatTableDataSource<any>;
106
+ originalElementsData: MatTableDataSource<any>;
106
107
  rawFields: any;
107
108
  label?: string = '';
108
109
  searchIcon$: string;
@@ -158,14 +159,17 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
158
159
  settingsSvgIcon$: string;
159
160
 
160
161
  isInitialized = false;
161
-
162
+ targetClassLabel: string;
163
+ localizedVal = PCore.getLocaleUtils().getLocaleValue;
164
+ localeCategory = 'SimpleTable';
162
165
  constructor(
163
166
  private angularPConnect: AngularPConnectService,
164
- private utils: Utils,
167
+ public utils: Utils,
165
168
  private dataPageService: DatapageService
166
169
  ) {}
167
170
 
168
171
  ngOnInit(): void {
172
+ this.elementsData = new MatTableDataSource<any>([]);
169
173
  this.isInitialized = true;
170
174
  // First thing in initialization is registering and subscribing to the AngularPConnect service
171
175
  this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
@@ -219,7 +223,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
219
223
  // but getRawMetadata() has each child.config with datasource and value showing their unresolved values (ex: "@P thePropName")
220
224
  // We need to use the prop name as the "glue" to tie the Angular Material table dataSource, displayColumns and data together.
221
225
  // So, in the code below, we'll use the unresolved config.value (but replacing the space with an underscore to keep things happy)
222
- const rawMetadata: any = this.pConn$.getRawMetadata();
226
+ const rawMetadata = this.pConn$.getRawMetadata();
223
227
 
224
228
  // Adapted from Nebula
225
229
  const {
@@ -227,7 +231,9 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
227
231
  renderMode,
228
232
  children, // destructure children into an array var: "resolvedFields"
229
233
  presets,
234
+ allowActions,
230
235
  allowTableEdit,
236
+ allowRowDelete,
231
237
  label: labelProp,
232
238
  propertyLabel,
233
239
  fieldMetadata,
@@ -237,15 +243,26 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
237
243
  editModeConfig,
238
244
  displayMode,
239
245
  useSeparateViewForEdit,
240
- viewForEditModal
246
+ viewForEditModal,
247
+ targetClassLabel
241
248
  } = this.configProps$;
242
249
 
250
+ const simpleTableManualProps: any = {};
251
+ if (this.checkIfAllowActionsOrRowEditingExist(allowActions) && editMode) {
252
+ simpleTableManualProps.hideAddRow = allowActions?.allowAdd === false;
253
+ simpleTableManualProps.hideDeleteRow = allowActions?.allowDelete === false;
254
+ simpleTableManualProps.hideEditRow = allowActions?.allowEdit === false;
255
+ simpleTableManualProps.disableDragDrop = allowActions?.allowDragDrop === false;
256
+ } else if (allowTableEdit === false) {
257
+ simpleTableManualProps.hideAddRow = true;
258
+ simpleTableManualProps.hideDeleteRow = true;
259
+ simpleTableManualProps.disableDragDrop = true;
260
+ }
261
+
243
262
  this.referenceListStr = getContext(this.pConn$).referenceListStr;
244
263
  this.label = labelProp || propertyLabel;
245
264
  this.parameters = fieldMetadata?.datasource?.parameters;
246
-
247
- const hideAddRow = allowTableEdit === false;
248
- const hideDeleteRow = allowTableEdit === false;
265
+ this.targetClassLabel = targetClassLabel;
249
266
  let { contextClass } = this.configProps$;
250
267
  this.referenceList = referenceList;
251
268
  if (!contextClass) {
@@ -262,7 +279,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
262
279
  // config.value (ex: "@P .DeclarantChoice") or
263
280
  // config.datasource (ex: "@ASSOCIATED .DeclarantChoice")
264
281
  // Neither of these appear in the resolved (this.configProps$)
265
- const rawConfig = rawMetadata?.config;
282
+ const rawConfig: any = rawMetadata?.config;
266
283
  const rawFields = rawConfig?.children?.[0]?.children || rawConfig?.presets?.[0].children?.[0]?.children;
267
284
  this.rawFields = rawFields;
268
285
  // At this point, fields has resolvedFields and rawFields we can use
@@ -282,13 +299,14 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
282
299
  this.readOnlyMode = renderMode === 'ReadOnly';
283
300
  this.editableMode = renderMode === 'Editable';
284
301
  const isDisplayModeEnabled = displayMode === 'DISPLAY_ONLY';
285
- this.showAddRowButton = !this.readOnlyMode && !hideAddRow;
302
+ this.showAddRowButton = !this.readOnlyMode && !simpleTableManualProps.hideAddRow;
286
303
  this.allowEditingInModal =
287
304
  (editMode ? editMode === 'modal' : addAndEditRowsWithin === 'modal') && !(renderMode === 'ReadOnly' || isDisplayModeEnabled);
288
- const showDeleteButton = this.editableMode && !hideDeleteRow;
305
+ const showDeleteButton = this.editableMode && !simpleTableManualProps.hideDeleteRow && evaluateAllowRowAction(allowRowDelete, this.rowData);
289
306
  this.defaultView = editModeConfig ? editModeConfig.defaultView : viewForAddAndEditModal;
290
307
  this.bUseSeparateViewForEdit = editModeConfig ? editModeConfig.useSeparateViewForEdit : useSeparateViewForEdit;
291
308
  this.editView = editModeConfig ? editModeConfig.editView : viewForEditModal;
309
+ const primaryFieldsViewIndex = resolvedFields.findIndex(field => field.config.value === 'pyPrimaryFields');
292
310
  // const showDeleteButton = !this.readOnlyMode && !hideDeleteRow;
293
311
 
294
312
  // Nebula has other handling for isReadOnlyMode but has Cosmos-specific code
@@ -299,8 +317,11 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
299
317
  // Nebula does). It will also have the "label", and "meta" contains the original,
300
318
  // unchanged config info. For now, much of the info here is carried over from
301
319
  // Nebula and we may not end up using it all.
302
- this.fieldDefs = buildFieldsForTable(rawFields, resolvedFields, showDeleteButton);
303
-
320
+ this.fieldDefs = buildFieldsForTable(rawFields, this.pConn$, showDeleteButton, {
321
+ primaryFieldsViewIndex,
322
+ fields: resolvedFields
323
+ });
324
+ this.fieldDefs = this.fieldDefs?.filter(field => !(field.meta?.config?.hide === true));
304
325
  this.initializeDefaultPageInstructions();
305
326
 
306
327
  // end of from Nebula
@@ -316,15 +337,20 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
316
337
  // from from the fieldDefs. This "name" is the value that
317
338
  // we'll share to connect things together in the table.
318
339
 
340
+ const labelsMap = this.fieldDefs.reduce((acc, curr) => {
341
+ return { ...acc, [curr.name]: curr.label };
342
+ }, {});
343
+
319
344
  this.processedFields = [];
320
345
 
321
346
  this.processedFields = resolvedFields.map((field, i) => {
322
347
  field.config.name = this.displayedColumns[i]; // .config["value"].replace(/ ./g,"_"); // replace space dot with underscore
348
+ field.config.label = labelsMap[field.config.name] || field.config.label;
323
349
  return field;
324
350
  });
325
351
 
326
352
  // for adding rows to table when editable and not modal view
327
- if (this.prevReferenceList.length !== this.referenceList.length && this.editableMode && !this.allowEditingInModal) {
353
+ if (this.prevReferenceList.length !== this.referenceList.length) {
328
354
  this.buildElementsForTable();
329
355
  }
330
356
 
@@ -351,11 +377,14 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
351
377
  // ties the 3 data structures together.
352
378
  }
353
379
 
380
+ checkIfAllowActionsOrRowEditingExist(newflagobject) {
381
+ return (newflagobject && Object.keys(newflagobject).length > 0) || this.pConn$.getComponentConfig().allowRowEdit;
382
+ }
383
+
354
384
  initializeDefaultPageInstructions() {
355
385
  if (this.isInitialized) {
356
386
  this.isInitialized = false;
357
387
  if (this.allowEditingInModal) {
358
- // @ts-ignore - An argument for 'uniqueField' was not provided.
359
388
  this.pConn$.getListActions().initDefaultPageInstructions(
360
389
  this.pConn$.getReferenceList(),
361
390
  this.fieldDefs.filter(item => item.name).map(item => item.name)
@@ -373,8 +402,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
373
402
  }
374
403
 
375
404
  sortCompare(a, b): number {
376
- let aValue = a[this.compareRef];
377
- let bValue = b[this.compareRef];
405
+ let aValue = a[0][this.compareRef];
406
+ let bValue = b[0][this.compareRef];
378
407
 
379
408
  if (this.compareType == 'Date' || this.compareType == 'DateTime') {
380
409
  aValue = getSeconds(aValue);
@@ -497,17 +526,20 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
497
526
  // run through list of elements in path, if menu not in th path, then want to
498
527
  // hide (toggle) the menu
499
528
  const eventPath = event.path;
500
- for (let eventIndex = 0; eventIndex < eventPath.length; eventIndex++) {
501
- if (
502
- eventPath[eventIndex].className == 'psdk-modal-file-top' ||
503
- eventPath[eventIndex].tagName == 'BUTTON' ||
504
- eventPath[eventIndex].tagName == 'MAT-OPTION' ||
505
- eventPath[eventIndex].tagName == 'MAT-INPUT'
506
- ) {
507
- bInPopUp = true;
508
- break;
529
+ if (eventPath) {
530
+ for (let eventIndex = 0; eventIndex < eventPath.length; eventIndex++) {
531
+ if (
532
+ eventPath[eventIndex].className == 'psdk-modal-file-top' ||
533
+ eventPath[eventIndex].tagName == 'BUTTON' ||
534
+ eventPath[eventIndex].tagName == 'MAT-OPTION' ||
535
+ eventPath[eventIndex].tagName == 'MAT-INPUT'
536
+ ) {
537
+ bInPopUp = true;
538
+ break;
539
+ }
509
540
  }
510
541
  }
542
+
511
543
  if (!bInPopUp) {
512
544
  // this.bShowFilterPopover$ = false;
513
545
 
@@ -626,7 +658,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
626
658
  }
627
659
  }
628
660
 
629
- filterData(item: any) {
661
+ filterData(element: any) {
662
+ const item = element[0];
630
663
  let bKeep = true;
631
664
  for (const filterObj of this.filterByColumns) {
632
665
  if (filterObj.containsFilterValue != '' || filterObj.containsFilter == 'null' || filterObj.containsFilter == 'notnull') {
@@ -640,6 +673,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
640
673
  bKeep = filterDataByCommonFields(item, filterObj);
641
674
  break;
642
675
  }
676
+ } else if (filterObj.containsFilterValue === '') {
677
+ bKeep = true;
643
678
  }
644
679
 
645
680
  // if don't keep stop filtering
@@ -652,14 +687,22 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
652
687
  }
653
688
 
654
689
  filterSortGroupBy() {
655
- let theData = this.originalData.slice();
690
+ let theData = this.originalData.slice().map((item, index) => {
691
+ return [item, index];
692
+ });
656
693
 
657
694
  // last filter config data is global
658
695
  theData = theData.filter(this.filterData.bind(this));
659
696
 
660
697
  // last sort config data is global
661
698
  theData.sort(this.sortCompare.bind(this));
662
- this.rowData.data = theData;
699
+ this.rowData.data = theData.map(item => item[0]);
700
+
701
+ const newElements: any = new Array(this.rowData.data.length);
702
+ theData.forEach((item, index) => {
703
+ newElements[index] = this.originalElementsData[item[1]];
704
+ });
705
+ this.elementsData = newElements;
663
706
  }
664
707
 
665
708
  _headerSortClick(event, columnData) {
@@ -918,19 +961,19 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
918
961
  .getActionsApi()
919
962
  .openEmbeddedDataModal(
920
963
  this.defaultView,
921
- this.pConn$,
964
+ this.pConn$ as any,
922
965
  this.referenceListStr,
923
966
  this.referenceList.length,
924
- PCore.getConstants().RESOURCE_STATUS.CREATE
967
+ PCore.getConstants().RESOURCE_STATUS.CREATE,
968
+ this.targetClassLabel
925
969
  );
926
970
  } else {
927
- // @ts-ignore - second parameter "pageRef" is optional for insert method
928
971
  this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
929
972
  }
930
973
 
931
974
  this.pConn$.clearErrorMessages({
932
- property: (this.pConn$.getStateProps() as any)?.referenceList?.substring(1)
933
- } as any);
975
+ property: this.pConn$.getStateProps()?.referenceList?.substring(1)
976
+ });
934
977
  }
935
978
 
936
979
  editRecord(data, index) {
@@ -939,16 +982,16 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
939
982
  .getActionsApi()
940
983
  .openEmbeddedDataModal(
941
984
  this.bUseSeparateViewForEdit ? this.editView : this.defaultView,
942
- this.pConn$,
985
+ this.pConn$ as any,
943
986
  this.referenceListStr,
944
987
  index,
945
- PCore.getConstants().RESOURCE_STATUS.UPDATE
988
+ PCore.getConstants().RESOURCE_STATUS.UPDATE,
989
+ this.targetClassLabel
946
990
  );
947
991
  }
948
992
  }
949
993
 
950
994
  deleteRecord(index) {
951
- // @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
952
995
  this.pConn$.getListActions().deleteEntry(index);
953
996
  }
954
997
 
@@ -958,23 +1001,36 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
958
1001
  this.referenceList.forEach((element, index) => {
959
1002
  const data: any = [];
960
1003
  this.rawFields?.forEach(item => {
961
- const referenceListData = getReferenceList(this.pConn$);
962
- const isDatapage = referenceListData.startsWith('D_');
963
- const pageReferenceValue = isDatapage ? `${referenceListData}[${index}]` : `${this.pConn$.getPageReference()}${referenceListData}[${index}]`;
964
- const config = {
965
- meta: item,
966
- options: {
967
- context,
968
- pageReference: pageReferenceValue,
969
- referenceList: referenceListData,
970
- hasForm: true
971
- }
972
- };
973
- const view = PCore.createPConnect(config);
974
- data.push(view);
1004
+ if (!item?.config?.hide) {
1005
+ item = {
1006
+ ...item,
1007
+ config: {
1008
+ ...item.config,
1009
+ label: '',
1010
+ displayMode: this.readOnlyMode || this.allowEditingInModal ? 'DISPLAY_ONLY' : undefined
1011
+ }
1012
+ };
1013
+ const referenceListData = getReferenceList(this.pConn$);
1014
+ const isDatapage = referenceListData.startsWith('D_');
1015
+ const pageReferenceValue = isDatapage
1016
+ ? `${referenceListData}[${index}]`
1017
+ : `${this.pConn$.getPageReference()}${referenceListData}[${index}]`;
1018
+ const config = {
1019
+ meta: item,
1020
+ options: {
1021
+ context,
1022
+ pageReference: pageReferenceValue,
1023
+ referenceList: referenceListData,
1024
+ hasForm: true
1025
+ }
1026
+ };
1027
+ const view = PCore.createPConnect(config);
1028
+ data.push(view);
1029
+ }
975
1030
  });
976
1031
  eleData.push(data);
977
1032
  });
1033
+ this.originalElementsData = eleData;
978
1034
  this.elementsData = eleData;
979
1035
  }
980
1036
  }
@@ -8,7 +8,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
8
8
  selector: 'app-simple-table-select',
9
9
  templateUrl: './simple-table-select.component.html',
10
10
  styleUrls: ['./simple-table-select.component.scss'],
11
- standalone: true,
12
11
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
13
12
  })
14
13
  export class SimpleTableSelectComponent implements OnInit, OnDestroy {
@@ -57,7 +56,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
57
56
  }
58
57
 
59
58
  updateSelf() {
60
- const theConfigProps: any = this.pConn$.getConfigProps();
59
+ const theConfigProps = this.pConn$.getConfigProps();
61
60
  this.label = theConfigProps.label;
62
61
  this.renderMode = theConfigProps.renderMode;
63
62
  this.showLabel = theConfigProps.showLabel;
@@ -71,7 +70,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
71
70
  this.propsToUse.label = '';
72
71
  }
73
72
  const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
74
- const { selectionMode, selectionList }: any = this.pConn$.getConfigProps();
73
+ const { selectionMode, selectionList } = this.pConn$.getConfigProps();
75
74
  const isMultiSelectMode = selectionMode === MULTI;
76
75
  if (isMultiSelectMode && this.renderMode === 'ReadOnly') {
77
76
  this.showSimpleTableManual = true;
@@ -137,7 +136,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
137
136
  parameters: this.parameters
138
137
  };
139
138
 
140
- this.filters = (this.pConn$.getRawMetadata() as any).config.promotedFilters ?? [];
139
+ this.filters = (this.pConn$.getRawMetadata()?.config as any).promotedFilters ?? [];
141
140
 
142
141
  this.isSearchable = this.filters.length > 0;
143
142
  }
@@ -6,7 +6,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  selector: 'app-single-reference-readonly',
7
7
  templateUrl: './single-reference-readonly.component.html',
8
8
  styleUrls: ['./single-reference-readonly.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class SingleReferenceReadonlyComponent {
@@ -10,7 +10,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
10
  selector: 'app-sub-tabs',
11
11
  templateUrl: './sub-tabs.component.html',
12
12
  styleUrls: ['./sub-tabs.component.scss'],
13
- standalone: true,
14
13
  imports: [MatTabsModule, CommonModule, forwardRef(() => ComponentMapperComponent)]
15
14
  })
16
15
  export class SubTabsComponent implements OnInit, OnDestroy {
@@ -2,16 +2,16 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
5
+ import { FormTemplateBase } from '@pega/angular-sdk-components';
5
6
 
6
7
  @Component({
7
8
  selector: 'app-three-column',
8
9
  templateUrl: './three-column.component.html',
9
10
  styleUrls: ['./three-column.component.scss'],
10
- standalone: true,
11
11
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
12
  })
13
- export class ThreeColumnComponent implements OnInit, OnChanges {
14
- @Input() pConn$: typeof PConnect;
13
+ export class ThreeColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
14
+ @Input() override pConn$: typeof PConnect;
15
15
  @Input() formGroup$: FormGroup;
16
16
 
17
17
  arChildren$: any[];
@@ -29,6 +29,6 @@ export class ThreeColumnComponent implements OnInit, OnChanges {
29
29
  }
30
30
 
31
31
  updateSelf() {
32
- this.arChildren$ = this.pConn$.getChildren() as any[];
32
+ this.arChildren$ = this.pConn$.getChildren();
33
33
  }
34
34
  }
@@ -6,7 +6,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  selector: 'app-three-column-page',
7
7
  templateUrl: './three-column-page.component.html',
8
8
  styleUrls: ['./three-column-page.component.scss'],
9
- standalone: true,
10
9
  imports: [forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class ThreeColumnPageComponent {
@@ -2,16 +2,16 @@ import { Component, OnInit, Input, forwardRef, SimpleChanges, OnChanges } from '
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
5
+ import { FormTemplateBase } from '@pega/angular-sdk-components';
5
6
 
6
7
  @Component({
7
8
  selector: 'app-two-column',
8
9
  templateUrl: './two-column.component.html',
9
10
  styleUrls: ['./two-column.component.scss'],
10
- standalone: true,
11
11
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
12
  })
13
- export class TwoColumnComponent implements OnInit, OnChanges {
14
- @Input() pConn$: typeof PConnect;
13
+ export class TwoColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
14
+ @Input() override pConn$: typeof PConnect;
15
15
  @Input() formGroup$: FormGroup;
16
16
 
17
17
  arChildren$: any[];
@@ -29,6 +29,6 @@ export class TwoColumnComponent implements OnInit, OnChanges {
29
29
  }
30
30
 
31
31
  updateSelf() {
32
- this.arChildren$ = this.pConn$.getChildren() as any[];
32
+ this.arChildren$ = this.pConn$.getChildren();
33
33
  }
34
34
  }
@@ -7,7 +7,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
7
  selector: 'app-two-column-page',
8
8
  templateUrl: './two-column-page.component.html',
9
9
  styleUrls: ['./two-column-page.component.scss'],
10
- standalone: true,
11
10
  imports: [forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
12
  export class TwoColumnPageComponent implements OnInit, OnDestroy {
@@ -7,7 +7,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
7
  selector: 'app-two-column-tab',
8
8
  templateUrl: './two-column-tab.component.html',
9
9
  styleUrls: ['./two-column-tab.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
12
  export class TwoColumnTabComponent implements OnInit, OnChanges {
@@ -29,6 +28,6 @@ export class TwoColumnTabComponent implements OnInit, OnChanges {
29
28
  }
30
29
 
31
30
  updateSelf() {
32
- this.arChildren$ = this.pConn$.getChildren() as any[];
31
+ this.arChildren$ = this.pConn$.getChildren();
33
32
  }
34
33
  }
@@ -21,3 +21,19 @@ export function filterForFieldValueList(fields: any) {
21
21
  value
22
22
  }));
23
23
  }
24
+
25
+ /**
26
+ * This method evaluates whether a row action is allowed based on the provided conditions.
27
+ * @param {string|boolean|undefined} allowRowDelete - The condition for allowing row deletion.
28
+ * @param {object} rowData - The data of the row being evaluated.
29
+ * @returns {boolean} - Returns true if the row action is allowed, false otherwise.
30
+ */
31
+ export const evaluateAllowRowAction = (allowRowDelete, rowData) => {
32
+ if (allowRowDelete === undefined || allowRowDelete === true) return true;
33
+ if (allowRowDelete.startsWith?.('@E ')) {
34
+ const expression = allowRowDelete.replace('@E ', '');
35
+ // @ts-ignore - Expected 3 arguments, but got 2
36
+ return PCore.getExpressionEngine().evaluate(expression, rowData);
37
+ }
38
+ return false;
39
+ };
@@ -2,16 +2,16 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
5
+ import { FormTemplateBase } from '@pega/angular-sdk-components';
5
6
 
6
7
  @Component({
7
8
  selector: 'app-wide-narrow-form',
8
9
  templateUrl: './wide-narrow-form.component.html',
9
10
  styleUrls: ['./wide-narrow-form.component.scss'],
10
- standalone: true,
11
11
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
12
  })
13
- export class WideNarrowFormComponent implements OnInit, OnChanges {
14
- @Input() pConn$: typeof PConnect;
13
+ export class WideNarrowFormComponent extends FormTemplateBase implements OnInit, OnChanges {
14
+ @Input() override pConn$: typeof PConnect;
15
15
  @Input() formGroup$: FormGroup;
16
16
 
17
17
  arChildren$: any[];
@@ -29,6 +29,6 @@ export class WideNarrowFormComponent implements OnInit, OnChanges {
29
29
  }
30
30
 
31
31
  updateSelf() {
32
- this.arChildren$ = this.pConn$.getChildren() as any[];
32
+ this.arChildren$ = this.pConn$.getChildren();
33
33
  }
34
34
  }
@@ -8,14 +8,13 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
8
8
  selector: 'app-wide-narrow-page',
9
9
  templateUrl: './wide-narrow-page.component.html',
10
10
  styleUrls: ['./wide-narrow-page.component.scss'],
11
- standalone: true,
12
11
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
13
12
  })
14
13
  export class WideNarrowPageComponent implements OnInit, OnDestroy {
15
14
  @Input() pConn$: typeof PConnect;
16
15
  @Input() formGroup$: FormGroup;
17
16
 
18
- thePConnType = '';
17
+ thePConnType: string | undefined = '';
19
18
 
20
19
  // Used with AngularPConnect
21
20
  angularPConnectData: AngularPConnectData = {};
@@ -19,7 +19,6 @@ interface WssNavBarProps {
19
19
  templateUrl: './wss-nav-bar.component.html',
20
20
  styleUrls: ['./wss-nav-bar.component.scss'],
21
21
  providers: [Utils],
22
- standalone: true,
23
22
  imports: [CommonModule, MatListModule, MatMenuModule, MatIconModule, MatToolbarModule]
24
23
  })
25
24
  export class WssNavBarComponent implements OnInit, OnDestroy {
@@ -37,11 +36,11 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
37
36
  navExpandCollapse$: string;
38
37
  bShowCaseTypes$ = false;
39
38
 
40
- portalApp$ = '';
39
+ portalApp$: string | undefined = '';
41
40
  portalLogoImage$: string;
42
41
  showAppName$ = false;
43
42
 
44
- portalOperator$: string;
43
+ portalOperator$: string | undefined;
45
44
  portalOperatorInitials$: string;
46
45
 
47
46
  actionsAPI: any;
@@ -129,7 +128,7 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
129
128
 
130
129
  this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
131
130
  this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
132
- this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$);
131
+ this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
133
132
  this.showAppName$ = this.configProps$.showAppName;
134
133
 
135
134
  this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
@@ -15,7 +15,6 @@ interface AppAnnouncementProps {
15
15
  selector: 'app-app-announcement',
16
16
  templateUrl: './app-announcement.component.html',
17
17
  styleUrls: ['./app-announcement.component.scss'],
18
- standalone: true,
19
18
  imports: [CommonModule, MatButtonModule]
20
19
  })
21
20
  export class AppAnnouncementComponent implements OnInit {