@pega/angular-sdk-overrides 24.1.10 → 24.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +1 -1
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +1 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +4 -1
- package/lib/designSystemExtension/operator/operator.component.ts +1 -1
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -7
- package/lib/field/auto-complete/auto-complete.component.ts +16 -13
- package/lib/field/check-box/check-box.component.ts +11 -10
- package/lib/field/currency/currency.component.html +4 -4
- package/lib/field/currency/currency.component.ts +32 -15
- package/lib/field/date/date.component.html +1 -6
- package/lib/field/date/date.component.ts +22 -39
- package/lib/field/date-time/date-time.component.html +1 -2
- package/lib/field/date-time/date-time.component.ts +18 -13
- package/lib/field/decimal/decimal.component.html +3 -3
- package/lib/field/decimal/decimal.component.ts +21 -18
- package/lib/field/dropdown/dropdown.component.ts +132 -18
- package/lib/field/email/email.component.ts +14 -4
- package/lib/field/group/group.component.ts +2 -2
- package/lib/field/integer/integer.component.html +1 -1
- package/lib/field/integer/integer.component.ts +13 -5
- package/lib/field/multiselect/multiselect.component.ts +15 -5
- package/lib/field/percentage/percentage.component.html +4 -4
- package/lib/field/percentage/percentage.component.ts +34 -19
- package/lib/field/phone/phone.component.html +1 -1
- package/lib/field/phone/phone.component.ts +11 -14
- package/lib/field/radio-buttons/radio-buttons.component.ts +9 -9
- package/lib/field/rich-text/rich-text.component.ts +8 -6
- package/lib/field/scalar-list/scalar-list.component.ts +3 -4
- package/lib/field/text/text.component.ts +2 -0
- package/lib/field/text-area/text-area.component.html +2 -1
- package/lib/field/text-area/text-area.component.ts +13 -6
- package/lib/field/text-input/text-input.component.html +1 -1
- package/lib/field/text-input/text-input.component.ts +13 -5
- package/lib/field/time/time.component.html +2 -2
- package/lib/field/time/time.component.ts +21 -7
- package/lib/field/url/url.component.html +1 -1
- package/lib/field/url/url.component.ts +13 -5
- package/lib/field/user-reference/user-reference.component.html +2 -10
- package/lib/field/user-reference/user-reference.component.ts +42 -14
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +10 -6
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -1
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
- package/lib/infra/Containers/view-container/helper.ts +22 -0
- package/lib/infra/Containers/view-container/view-container.component.ts +5 -17
- package/lib/infra/assignment/assignment.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.ts +4 -4
- package/lib/infra/navbar/navbar.component.ts +3 -3
- package/lib/infra/root-container/root-container.component.ts +3 -3
- package/lib/infra/stages/stages.component.scss +2 -2
- package/lib/infra/view/view.component.html +7 -20
- package/lib/infra/view/view.component.ts +20 -2
- package/lib/template/app-shell/app-shell.component.ts +20 -2
- package/lib/template/base/details-template-base.ts +67 -0
- package/lib/template/base/form-template-base.ts +10 -0
- package/lib/template/case-summary/case-summary.component.ts +1 -1
- package/lib/template/case-view/case-view.component.html +4 -4
- package/lib/template/case-view/case-view.component.ts +8 -13
- package/lib/template/confirmation/confirmation.component.ts +1 -1
- package/lib/template/data-reference/data-reference.component.ts +36 -40
- package/lib/template/default-form/default-form.component.html +0 -4
- package/lib/template/default-form/default-form.component.ts +7 -23
- package/lib/template/details/details.component.ts +7 -41
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +6 -39
- package/lib/template/details-one-column/details-one-column.component.ts +7 -42
- package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/lib/template/details-three-column/details-three-column.component.ts +7 -43
- package/lib/template/details-two-column/details-two-column.component.ts +8 -44
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +7 -42
- package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +8 -3
- package/lib/template/field-group-template/field-group-template.component.ts +2 -4
- package/lib/template/field-value-list/field-value-list.component.html +1 -1
- package/lib/template/field-value-list/field-value-list.component.scss +2 -1
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
- package/lib/template/list-view/list-view.component.html +3 -0
- package/lib/template/list-view/list-view.component.scss +11 -0
- package/lib/template/list-view/list-view.component.ts +24 -4
- package/lib/template/list-view/listViewHelpers.ts +1 -1
- package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -1
- package/lib/template/one-column/one-column.component.ts +4 -3
- package/lib/template/one-column-tab/one-column-tab.component.ts +1 -1
- package/lib/template/page/page.component.ts +1 -1
- package/lib/template/promoted-filters/promoted-filters.component.ts +1 -1
- package/lib/template/repeating-structures/repeating-structures.component.ts +1 -1
- package/lib/template/simple-table-manual/helpers.ts +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +1 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +15 -13
- package/lib/template/simple-table-select/simple-table-select.component.ts +3 -3
- package/lib/template/three-column/three-column.component.ts +4 -3
- package/lib/template/two-column/two-column.component.ts +4 -3
- package/lib/template/two-column-tab/two-column-tab.component.ts +1 -1
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -3
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -1
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -3
- package/lib/widget/attachment/attachment.component.ts +7 -9
- package/lib/widget/feed-container/feed-container.component.ts +7 -7
- package/lib/widget/file-utility/file-utility.component.ts +2 -5
- package/lib/widget/todo/todo.component.html +2 -2
- package/lib/widget/todo/todo.component.ts +93 -83
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-wide-narrow',
|
|
@@ -10,51 +9,17 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsWideNarrowComponent
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
12
|
+
export class DetailsWideNarrowComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
18
14
|
|
|
19
15
|
highlightedDataArr: any[] = [];
|
|
20
16
|
showHighlightedData: boolean;
|
|
21
17
|
arFields$: any[] = [];
|
|
22
18
|
arFields2$: any[] = [];
|
|
23
19
|
propsToUse: any = {};
|
|
24
|
-
// Used with AngularPConnect
|
|
25
|
-
angularPConnectData: AngularPConnectData = {};
|
|
26
|
-
|
|
27
|
-
ngOnInit(): void {
|
|
28
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
29
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
30
|
-
|
|
31
|
-
// this.updateSelf();
|
|
32
|
-
this.checkAndUpdate();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
ngOnDestroy() {
|
|
36
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
37
|
-
this.angularPConnectData.unsubscribeFn();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
onStateChange() {
|
|
42
|
-
this.checkAndUpdate();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
checkAndUpdate() {
|
|
46
|
-
// Should always check the bridge to see if the component should
|
|
47
|
-
// update itself (re-render)
|
|
48
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
49
|
-
|
|
50
|
-
// ONLY call updateSelf when the component should update
|
|
51
|
-
if (bUpdateSelf) {
|
|
52
|
-
this.updateSelf();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
20
|
|
|
56
|
-
updateSelf() {
|
|
57
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
21
|
+
override updateSelf() {
|
|
22
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
58
23
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
59
24
|
|
|
60
25
|
if (this.showHighlightedData) {
|
|
@@ -71,7 +36,7 @@ export class DetailsWideNarrowComponent implements OnInit, OnDestroy {
|
|
|
71
36
|
});
|
|
72
37
|
}
|
|
73
38
|
|
|
74
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
39
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
75
40
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
76
41
|
|
|
77
42
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
<div *ngIf="propsToUse.showLabel && propsToUse.label" class="template-title-container">
|
|
2
|
+
<span>{{ propsToUse.label }}</span>
|
|
3
|
+
</div>
|
|
1
4
|
<mat-tab-group id="dynamic-tabs" mat-stretch-tabs="false" animationDuration="0">
|
|
2
5
|
<mat-tab *ngFor="let tab of tabsItems" [label]="tab.name">
|
|
3
6
|
<component-mapper name="View" [props]="{ pConn$: tab.content.getPConnect() }"></component-mapper>
|
|
@@ -9,6 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
interface DynamicTabsProps {
|
|
10
10
|
referenceList: string;
|
|
11
11
|
template: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
showLabel?: boolean;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
@Component({
|
|
@@ -24,6 +26,7 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
|
|
|
24
26
|
|
|
25
27
|
angularPConnectData: AngularPConnectData = {};
|
|
26
28
|
tabsItems: any[];
|
|
29
|
+
propsToUse: any;
|
|
27
30
|
|
|
28
31
|
constructor(private angularPConnect: AngularPConnectService) {}
|
|
29
32
|
|
|
@@ -54,15 +57,17 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
|
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
updateSelf() {
|
|
57
|
-
const { referenceList } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DynamicTabsProps;
|
|
60
|
+
const { referenceList, label, showLabel } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DynamicTabsProps;
|
|
61
|
+
|
|
62
|
+
this.propsToUse = { label, showLabel, ...this.pConn$.getInheritedProps() };
|
|
58
63
|
|
|
59
64
|
const { tablabel } = this.pConn$.getComponentConfig();
|
|
60
65
|
const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
|
|
61
66
|
|
|
62
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
67
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
63
68
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
64
69
|
|
|
65
|
-
const referenceListData
|
|
70
|
+
const referenceListData = this.pConn$.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
66
71
|
|
|
67
72
|
this.tabsItems =
|
|
68
73
|
referenceListData?.map((item, i) => {
|
|
@@ -105,7 +105,7 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
105
105
|
|
|
106
106
|
const renderMode = this.configProps$.renderMode;
|
|
107
107
|
const displayMode = this.configProps$.displayMode;
|
|
108
|
-
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === '
|
|
108
|
+
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
|
|
109
109
|
this.contextClass = this.configProps$.contextClass;
|
|
110
110
|
const lookForChildInConfig = this.configProps$.lookForChildInConfig;
|
|
111
111
|
this.heading = this.configProps$.heading ?? 'Row';
|
|
@@ -114,7 +114,7 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
114
114
|
this.pageReference = `${this.pConn$.getPageReference()}${resolvedList}`;
|
|
115
115
|
this.pConn$.setReferenceList(resolvedList);
|
|
116
116
|
if (this.readonlyMode) {
|
|
117
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
117
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
118
118
|
}
|
|
119
119
|
this.referenceList = this.configProps$.referenceList;
|
|
120
120
|
if (this.prevRefLength != this.referenceList.length) {
|
|
@@ -149,12 +149,10 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
addFieldGroupItem() {
|
|
152
|
-
// @ts-ignore - second parameter "pageRef" is optional for insert method
|
|
153
152
|
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
deleteFieldGroupItem(index) {
|
|
157
|
-
// @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
|
|
158
156
|
this.pConn$.getListActions().deleteEntry(index);
|
|
159
157
|
}
|
|
160
158
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div *ngIf="displayMode$ === '
|
|
1
|
+
<div *ngIf="displayMode$ === 'DISPLAY_ONLY'; else STACKED_LARGE_VAL" class="psdk-container-labels-left">
|
|
2
2
|
<div class="psdk-grid-label">{{ label$ }}</div>
|
|
3
3
|
<div class="psdk-val-labels-left">
|
|
4
4
|
<ng-container *ngTemplateOutlet="valueTemplate"></ng-container>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
|
+
padding-block: 8px;
|
|
7
8
|
}
|
|
8
9
|
.psdk-value {
|
|
9
10
|
margin: 8px 0px;
|
|
@@ -14,5 +15,5 @@
|
|
|
14
15
|
font-size: 1.25rem;
|
|
15
16
|
}
|
|
16
17
|
.psdk-val-labels-left {
|
|
17
|
-
|
|
18
|
+
white-space: break-spaces;
|
|
18
19
|
}
|
|
@@ -45,8 +45,8 @@ export class InlineDashboardPageComponent implements OnInit, OnChanges {
|
|
|
45
45
|
|
|
46
46
|
updateSelf() {
|
|
47
47
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as InlineDashboardPageProps;
|
|
48
|
-
const arChildren$ = this.pConn$.getChildren()
|
|
49
|
-
const allFilters =
|
|
48
|
+
const arChildren$ = this.pConn$.getChildren();
|
|
49
|
+
const allFilters = this.pConn$.getRawMetadata()?.children[1];
|
|
50
50
|
const filterComponents = buildFilterComponents(this.pConn$, allFilters);
|
|
51
51
|
this.inlineProps = this.configProps$;
|
|
52
52
|
this.children[0] = arChildren$[0];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<div class="psdk-list-header">
|
|
2
2
|
<div>
|
|
3
|
+
<h3 *ngIf="label" class="label" style="font-weight: bold">
|
|
4
|
+
{{ label }} <span class="results-count">{{ getResultsText() }}</span>
|
|
5
|
+
</h3>
|
|
3
6
|
<mat-form-field class="psdk-search" *ngIf="bShowSearch$">
|
|
4
7
|
<mat-label><img class="psdk-icon-search" src="{{ searchIcon$ }}" /> <span class="psdk-search-label">Search</span> </mat-label>
|
|
5
8
|
<input matInput id="search" (keyup)="applySearch($event)" placeholder="" />
|
|
@@ -165,3 +165,14 @@ tr.mat-mdc-row {
|
|
|
165
165
|
background-color: transparent;
|
|
166
166
|
align-items: center;
|
|
167
167
|
}
|
|
168
|
+
|
|
169
|
+
.results-count {
|
|
170
|
+
opacity: 0.7;
|
|
171
|
+
font-size: 0.8rem;
|
|
172
|
+
font-weight: bold;
|
|
173
|
+
margin-inline-start: 0.625rem;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.label {
|
|
177
|
+
margin: 8px;
|
|
178
|
+
}
|
|
@@ -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 { MatDatepickerModule } from '@angular/material/datepicker';
|
|
@@ -22,13 +21,15 @@ import { getCurrencyOptions } from '@pega/angular-sdk-components';
|
|
|
22
21
|
import { getLocale, getSeconds } from '@pega/angular-sdk-components';
|
|
23
22
|
import { formatters } from '@pega/angular-sdk-components';
|
|
24
23
|
|
|
25
|
-
import {
|
|
24
|
+
import { init } from './listViewHelpers';
|
|
26
25
|
|
|
27
26
|
declare const window: any;
|
|
28
27
|
|
|
29
28
|
const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
|
|
30
29
|
|
|
31
30
|
interface ListViewProps {
|
|
31
|
+
inheritedProps: any;
|
|
32
|
+
title: string | undefined;
|
|
32
33
|
// If any, enter additional props that only exist on this component
|
|
33
34
|
globalSearch?: boolean;
|
|
34
35
|
referenceList?: any;
|
|
@@ -42,6 +43,7 @@ interface ListViewProps {
|
|
|
42
43
|
grouping: string | boolean;
|
|
43
44
|
value: any;
|
|
44
45
|
readonlyContextList: any;
|
|
46
|
+
label?: string;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
export class Group {
|
|
@@ -159,6 +161,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
159
161
|
xRayApis = PCore.getDebugger().getXRayRuntime();
|
|
160
162
|
xRayUid = this.xRayApis.startXRay();
|
|
161
163
|
checkBoxValue: string;
|
|
164
|
+
label?: string = '';
|
|
162
165
|
|
|
163
166
|
constructor(
|
|
164
167
|
private psService: ProgressSpinnerService,
|
|
@@ -192,6 +195,18 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
192
195
|
this.arFilterMainButtons$.push({ actionID: 'submit', jsAction: 'submit', name: 'Submit' });
|
|
193
196
|
this.arFilterSecondaryButtons$.push({ actionID: 'cancel', jsAction: 'cancel', name: 'Cancel' });
|
|
194
197
|
|
|
198
|
+
let title = this.configProps$?.title || this.configProps$?.label || 'List';
|
|
199
|
+
const inheritedProps = this.configProps$?.inheritedProps;
|
|
200
|
+
if (title === 'List' && inheritedProps) {
|
|
201
|
+
for (const inheritedProp of inheritedProps) {
|
|
202
|
+
if (inheritedProp?.prop === 'label') {
|
|
203
|
+
title = inheritedProp?.value;
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
this.label = title;
|
|
209
|
+
|
|
195
210
|
this.searchIcon$ = this.utils.getImageSrc('search', this.utils.getSDKStaticContentUrl());
|
|
196
211
|
setTimeout(() => {
|
|
197
212
|
PCore.getPubSubUtils().subscribe(
|
|
@@ -218,7 +233,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
218
233
|
if (!this.payload) {
|
|
219
234
|
this.payload = { referenceList: this.configProps$.referenceList };
|
|
220
235
|
}
|
|
221
|
-
|
|
236
|
+
init({
|
|
222
237
|
pConn$: this.pConn$,
|
|
223
238
|
bInForm$: this.bInForm$,
|
|
224
239
|
...this.payload,
|
|
@@ -961,7 +976,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
961
976
|
|
|
962
977
|
filterDataWithDate(item, filterObj, filterValue) {
|
|
963
978
|
let bKeep;
|
|
964
|
-
let value = item[filterObj.ref] != null
|
|
979
|
+
let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
|
|
965
980
|
filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;
|
|
966
981
|
|
|
967
982
|
switch (filterObj.containsFilter) {
|
|
@@ -1380,6 +1395,11 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
1380
1395
|
return listFields;
|
|
1381
1396
|
}
|
|
1382
1397
|
|
|
1398
|
+
getResultsText() {
|
|
1399
|
+
const recordsCount = this.repeatList$?.paginator?.length || 0;
|
|
1400
|
+
return `${recordsCount || 0} result${recordsCount > 1 ? 's' : ''}`;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1383
1403
|
getField(fieldDefs, columnId) {
|
|
1384
1404
|
const fieldsMap = this.getFieldsMap(fieldDefs);
|
|
1385
1405
|
return fieldsMap.get(columnId);
|
|
@@ -3,7 +3,7 @@ import { getContext, readContextResponse } from './utils';
|
|
|
3
3
|
// Remove this and use "real" PCore type once .d.ts is fixed (currently shows 1 error)
|
|
4
4
|
declare const PCore: any;
|
|
5
5
|
|
|
6
|
-
export function
|
|
6
|
+
export function init(props) {
|
|
7
7
|
const {
|
|
8
8
|
referenceList,
|
|
9
9
|
pConn$,
|
|
@@ -2,6 +2,7 @@ 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-one-column',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class OneColumnComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class OneColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class OneColumnComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -34,7 +34,7 @@ export class PageComponent implements OnInit, OnDestroy {
|
|
|
34
34
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
35
35
|
|
|
36
36
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as PageProps;
|
|
37
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
37
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
38
38
|
|
|
39
39
|
this.title$ = this.configProps$.title;
|
|
40
40
|
const operator = this.configProps$.operator;
|
|
@@ -81,7 +81,7 @@ export class PromotedFiltersComponent implements OnInit, OnDestroy {
|
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
const filtersWithClassID = { ...this.filtersProperties, classID: this.pageClass };
|
|
84
|
-
this.transientItemID =
|
|
84
|
+
this.transientItemID = this.pConn$.getContainerManager().addTransientItem({ id: this.viewName, data: filtersWithClassID });
|
|
85
85
|
this.processedFilters = [];
|
|
86
86
|
this.filters.forEach(filter => {
|
|
87
87
|
const filterClone = { ...filter };
|
|
@@ -107,7 +107,7 @@ export class RepeatingStructuresComponent implements OnInit, AfterViewInit {
|
|
|
107
107
|
openAssignment(row) {
|
|
108
108
|
const { pxRefObjectClass, pzInsKey } = row;
|
|
109
109
|
const sTarget = this.pConn$.getContainerName();
|
|
110
|
-
const options
|
|
110
|
+
const options = { containerName: sTarget };
|
|
111
111
|
this.pConn$
|
|
112
112
|
.getActionsApi()
|
|
113
113
|
.openAssignment(pzInsKey, pxRefObjectClass, options)
|
|
@@ -190,7 +190,7 @@ export const createMetaForTable = (fields, renderMode) => {
|
|
|
190
190
|
|
|
191
191
|
export const filterDataByDate = (item, filterObj) => {
|
|
192
192
|
let bKeep;
|
|
193
|
-
let value = item[filterObj.ref] != null
|
|
193
|
+
let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
|
|
194
194
|
let filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;
|
|
195
195
|
|
|
196
196
|
switch (filterObj.containsFilter) {
|
|
@@ -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 {
|
|
@@ -158,6 +159,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
158
159
|
settingsSvgIcon$: string;
|
|
159
160
|
|
|
160
161
|
isInitialized = false;
|
|
162
|
+
targetClassLabel: string;
|
|
161
163
|
|
|
162
164
|
constructor(
|
|
163
165
|
private angularPConnect: AngularPConnectService,
|
|
@@ -219,7 +221,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
219
221
|
// but getRawMetadata() has each child.config with datasource and value showing their unresolved values (ex: "@P thePropName")
|
|
220
222
|
// We need to use the prop name as the "glue" to tie the Angular Material table dataSource, displayColumns and data together.
|
|
221
223
|
// 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
|
|
224
|
+
const rawMetadata = this.pConn$.getRawMetadata();
|
|
223
225
|
|
|
224
226
|
// Adapted from Nebula
|
|
225
227
|
const {
|
|
@@ -237,13 +239,14 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
237
239
|
editModeConfig,
|
|
238
240
|
displayMode,
|
|
239
241
|
useSeparateViewForEdit,
|
|
240
|
-
viewForEditModal
|
|
242
|
+
viewForEditModal,
|
|
243
|
+
targetClassLabel
|
|
241
244
|
} = this.configProps$;
|
|
242
245
|
|
|
243
246
|
this.referenceListStr = getContext(this.pConn$).referenceListStr;
|
|
244
247
|
this.label = labelProp || propertyLabel;
|
|
245
248
|
this.parameters = fieldMetadata?.datasource?.parameters;
|
|
246
|
-
|
|
249
|
+
this.targetClassLabel = targetClassLabel;
|
|
247
250
|
const hideAddRow = allowTableEdit === false;
|
|
248
251
|
const hideDeleteRow = allowTableEdit === false;
|
|
249
252
|
let { contextClass } = this.configProps$;
|
|
@@ -262,7 +265,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
262
265
|
// config.value (ex: "@P .DeclarantChoice") or
|
|
263
266
|
// config.datasource (ex: "@ASSOCIATED .DeclarantChoice")
|
|
264
267
|
// Neither of these appear in the resolved (this.configProps$)
|
|
265
|
-
const rawConfig = rawMetadata?.config;
|
|
268
|
+
const rawConfig: any = rawMetadata?.config;
|
|
266
269
|
const rawFields = rawConfig?.children?.[0]?.children || rawConfig?.presets?.[0].children?.[0]?.children;
|
|
267
270
|
this.rawFields = rawFields;
|
|
268
271
|
// At this point, fields has resolvedFields and rawFields we can use
|
|
@@ -355,7 +358,6 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
355
358
|
if (this.isInitialized) {
|
|
356
359
|
this.isInitialized = false;
|
|
357
360
|
if (this.allowEditingInModal) {
|
|
358
|
-
// @ts-ignore - An argument for 'uniqueField' was not provided.
|
|
359
361
|
this.pConn$.getListActions().initDefaultPageInstructions(
|
|
360
362
|
this.pConn$.getReferenceList(),
|
|
361
363
|
this.fieldDefs.filter(item => item.name).map(item => item.name)
|
|
@@ -918,19 +920,19 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
918
920
|
.getActionsApi()
|
|
919
921
|
.openEmbeddedDataModal(
|
|
920
922
|
this.defaultView,
|
|
921
|
-
this.pConn
|
|
923
|
+
this.pConn$ as any,
|
|
922
924
|
this.referenceListStr,
|
|
923
925
|
this.referenceList.length,
|
|
924
|
-
PCore.getConstants().RESOURCE_STATUS.CREATE
|
|
926
|
+
PCore.getConstants().RESOURCE_STATUS.CREATE,
|
|
927
|
+
this.targetClassLabel
|
|
925
928
|
);
|
|
926
929
|
} else {
|
|
927
|
-
// @ts-ignore - second parameter "pageRef" is optional for insert method
|
|
928
930
|
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
|
|
929
931
|
}
|
|
930
932
|
|
|
931
933
|
this.pConn$.clearErrorMessages({
|
|
932
|
-
property:
|
|
933
|
-
}
|
|
934
|
+
property: this.pConn$.getStateProps()?.referenceList?.substring(1)
|
|
935
|
+
});
|
|
934
936
|
}
|
|
935
937
|
|
|
936
938
|
editRecord(data, index) {
|
|
@@ -939,16 +941,16 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
939
941
|
.getActionsApi()
|
|
940
942
|
.openEmbeddedDataModal(
|
|
941
943
|
this.bUseSeparateViewForEdit ? this.editView : this.defaultView,
|
|
942
|
-
this.pConn
|
|
944
|
+
this.pConn$ as any,
|
|
943
945
|
this.referenceListStr,
|
|
944
946
|
index,
|
|
945
|
-
PCore.getConstants().RESOURCE_STATUS.UPDATE
|
|
947
|
+
PCore.getConstants().RESOURCE_STATUS.UPDATE,
|
|
948
|
+
this.targetClassLabel
|
|
946
949
|
);
|
|
947
950
|
}
|
|
948
951
|
}
|
|
949
952
|
|
|
950
953
|
deleteRecord(index) {
|
|
951
|
-
// @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
|
|
952
954
|
this.pConn$.getListActions().deleteEntry(index);
|
|
953
955
|
}
|
|
954
956
|
|
|
@@ -57,7 +57,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
updateSelf() {
|
|
60
|
-
const theConfigProps
|
|
60
|
+
const theConfigProps = this.pConn$.getConfigProps();
|
|
61
61
|
this.label = theConfigProps.label;
|
|
62
62
|
this.renderMode = theConfigProps.renderMode;
|
|
63
63
|
this.showLabel = theConfigProps.showLabel;
|
|
@@ -71,7 +71,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
71
71
|
this.propsToUse.label = '';
|
|
72
72
|
}
|
|
73
73
|
const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
|
|
74
|
-
const { selectionMode, selectionList }
|
|
74
|
+
const { selectionMode, selectionList } = this.pConn$.getConfigProps();
|
|
75
75
|
const isMultiSelectMode = selectionMode === MULTI;
|
|
76
76
|
if (isMultiSelectMode && this.renderMode === 'ReadOnly') {
|
|
77
77
|
this.showSimpleTableManual = true;
|
|
@@ -137,7 +137,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
137
137
|
parameters: this.parameters
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
this.filters = (this.pConn$.getRawMetadata() as any).
|
|
140
|
+
this.filters = (this.pConn$.getRawMetadata()?.config as any).promotedFilters ?? [];
|
|
141
141
|
|
|
142
142
|
this.isSearchable = this.filters.length > 0;
|
|
143
143
|
}
|
|
@@ -2,6 +2,7 @@ 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',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class ThreeColumnComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class ThreeColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class ThreeColumnComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -2,6 +2,7 @@ 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',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class TwoColumnComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class TwoColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class TwoColumnComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -2,6 +2,7 @@ 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',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class WideNarrowFormComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class WideNarrowFormComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class WideNarrowFormComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -15,7 +15,7 @@ export class WideNarrowPageComponent implements OnInit, OnDestroy {
|
|
|
15
15
|
@Input() pConn$: typeof PConnect;
|
|
16
16
|
@Input() formGroup$: FormGroup;
|
|
17
17
|
|
|
18
|
-
thePConnType = '';
|
|
18
|
+
thePConnType: string | undefined = '';
|
|
19
19
|
|
|
20
20
|
// Used with AngularPConnect
|
|
21
21
|
angularPConnectData: AngularPConnectData = {};
|
|
@@ -37,11 +37,11 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
37
37
|
navExpandCollapse$: string;
|
|
38
38
|
bShowCaseTypes$ = false;
|
|
39
39
|
|
|
40
|
-
portalApp
|
|
40
|
+
portalApp$: string | undefined = '';
|
|
41
41
|
portalLogoImage$: string;
|
|
42
42
|
showAppName$ = false;
|
|
43
43
|
|
|
44
|
-
portalOperator$: string;
|
|
44
|
+
portalOperator$: string | undefined;
|
|
45
45
|
portalOperatorInitials$: string;
|
|
46
46
|
|
|
47
47
|
actionsAPI: any;
|
|
@@ -129,7 +129,7 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
129
129
|
|
|
130
130
|
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
131
131
|
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
132
|
-
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$);
|
|
132
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
133
133
|
this.showAppName$ = this.configProps$.showAppName;
|
|
134
134
|
|
|
135
135
|
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|