@pega/angular-sdk-overrides 0.242.10 → 0.242.12
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/field/check-box/check-box.component.html +4 -0
- package/lib/field/date/date.component.html +2 -1
- package/lib/field/date-time/date-time.component.html +2 -1
- package/lib/field/dropdown/dropdown.component.html +1 -0
- package/lib/field/phone/phone.component.html +3 -1
- package/lib/field/radio-buttons/radio-buttons.component.html +3 -6
- package/lib/field/text/text.component.ts +4 -2
- package/lib/field/text-area/text-area.component.html +3 -1
- package/lib/field/time/time.component.html +1 -1
- package/lib/infra/navbar/navbar.component.ts +0 -2
- package/lib/template/field-group-template/field-group-template.component.ts +1 -1
- package/lib/template/list-view/list-view.component.ts +0 -2
- package/lib/template/list-view/listViewHelpers.ts +2 -5
- package/lib/template/list-view/utils.ts +2 -5
- package/lib/template/simple-table-manual/helpers.ts +0 -16
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +2 -3
- package/lib/template/utils.ts +16 -0
- package/lib/widget/feed-container/feed-container.component.ts +0 -2
- package/package.json +1 -1
- package/lib/template/field-group-template/utils.ts +0 -9
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
<mat-checkbox
|
|
19
19
|
[labelPosition]="'after'"
|
|
20
20
|
[checked]="item.selected"
|
|
21
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
22
|
+
[required]="bRequired$"
|
|
21
23
|
[attr.data-test-id]="testId + ':' + item.value"
|
|
22
24
|
(change)="handleChangeMultiMode($event, item)"
|
|
23
25
|
(blur)="fieldOnBlur($event)"
|
|
@@ -29,6 +31,8 @@
|
|
|
29
31
|
<mat-checkbox
|
|
30
32
|
[labelPosition]="'after'"
|
|
31
33
|
[checked]="isChecked$"
|
|
34
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
35
|
+
[required]="bRequired$"
|
|
32
36
|
[attr.data-test-id]="testId"
|
|
33
37
|
[formControl]="fieldControl"
|
|
34
38
|
(change)="fieldOnChange($event)"
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
type="text"
|
|
16
16
|
[value]="value$"
|
|
17
17
|
[required]="bRequired$"
|
|
18
|
+
[disabled]="bDisabled$"
|
|
18
19
|
[formControl]="fieldControl"
|
|
19
20
|
(dateChange)="fieldOnDateChange($event)"
|
|
20
21
|
/>
|
|
21
|
-
<mat-datepicker-toggle matSuffix [for]="pegadate"></mat-datepicker-toggle>
|
|
22
|
+
<mat-datepicker-toggle matSuffix [for]="pegadate" [disabled]="bDisabled$"></mat-datepicker-toggle>
|
|
22
23
|
<mat-datepicker #pegadate [startAt]="value$"></mat-datepicker>
|
|
23
24
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
24
25
|
</mat-form-field>
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
[formControl]="fieldControl"
|
|
15
15
|
(dateTimeChange)="fieldOnDateChange($event)"
|
|
16
16
|
[required]="bRequired$"
|
|
17
|
+
[readonly]="bDisabled$"
|
|
17
18
|
/>
|
|
18
19
|
<mat-datepicker-toggle matSuffix [owlDateTimeTrigger]="dtPicker"></mat-datepicker-toggle>
|
|
19
|
-
<owl-date-time #dtPicker></owl-date-time>
|
|
20
|
+
<owl-date-time #dtPicker [disabled]="bDisabled$"></owl-date-time>
|
|
20
21
|
<mat-error *ngIf="fieldControl?.invalid">{{ getErrorMessage() }}</mat-error>
|
|
21
22
|
</mat-form-field>
|
|
22
23
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper>
|
|
3
3
|
</div>
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
|
-
<div *ngIf="
|
|
5
|
+
<div *ngIf="bHasForm$; else noEdit">
|
|
6
6
|
<div #f="ngForm" [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
7
7
|
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
8
8
|
<ngx-mat-intl-tel-input
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
[preferredCountries]="['us']"
|
|
12
12
|
[enablePlaceholder]="true"
|
|
13
13
|
[enableSearch]="true"
|
|
14
|
+
[required]="bRequired$"
|
|
15
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
14
16
|
(change)="fieldOnChange()"
|
|
15
17
|
(blur)="fieldOnBlur()"
|
|
16
18
|
>
|
|
@@ -8,11 +8,8 @@
|
|
|
8
8
|
<ng-template #noDisplayMode>
|
|
9
9
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
10
10
|
<mat-form-field class="psdk-radio-form" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
</span>
|
|
14
|
-
<!-- <mat-label>{{label$}}</mat-label> -->
|
|
15
|
-
<input matInput [placeholder]="placeholder" style="display: none" />
|
|
11
|
+
<mat-label>{{ label$ }}</mat-label>
|
|
12
|
+
<input matInput [placeholder]="placeholder" style="display: none" [required]="bRequired$" />
|
|
16
13
|
<mat-radio-group
|
|
17
14
|
[value]="value$"
|
|
18
15
|
[required]="bRequired$"
|
|
@@ -24,7 +21,7 @@
|
|
|
24
21
|
<mat-radio-button
|
|
25
22
|
*ngFor="let opt of options$"
|
|
26
23
|
[checked]="isSelected(opt.key)"
|
|
27
|
-
[disabled]="bReadonly$"
|
|
24
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
28
25
|
[value]="opt.key"
|
|
29
26
|
class="psdk-radio-button"
|
|
30
27
|
>
|
|
@@ -5,6 +5,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
5
5
|
import { Utils } from '@pega/angular-sdk-components';
|
|
6
6
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
7
7
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
8
|
+
import { format } from '@pega/angular-sdk-components';
|
|
8
9
|
|
|
9
10
|
interface TextProps extends PConnFieldProps {
|
|
10
11
|
// If any, enter additional props that only exist on Text here
|
|
@@ -99,8 +100,9 @@ export class TextComponent implements OnInit, OnDestroy {
|
|
|
99
100
|
break;
|
|
100
101
|
case 'time':
|
|
101
102
|
if (this.value$) {
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
this.formattedValue$ = format(this.value$, 'timeonly', {
|
|
104
|
+
format: 'hh:mm A'
|
|
105
|
+
});
|
|
104
106
|
} else {
|
|
105
107
|
this.formattedValue$ = '';
|
|
106
108
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
<component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper>
|
|
3
3
|
</div>
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
|
-
<div *ngIf="
|
|
5
|
+
<div *ngIf="bHasForm$; else noEdit">
|
|
6
6
|
<div [formGroup]="formGroup$">
|
|
7
7
|
<div *ngIf="bVisible$">
|
|
8
8
|
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
9
|
+
<mat-label>{{ label$ }}</mat-label>
|
|
9
10
|
<textarea
|
|
10
11
|
matInput
|
|
11
12
|
rows="5"
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
[value]="value$"
|
|
16
17
|
[required]="bRequired$"
|
|
17
18
|
[disabled]="bDisabled$"
|
|
19
|
+
[readonly]="bReadonly$"
|
|
18
20
|
[formControl]="fieldControl"
|
|
19
21
|
(change)="fieldOnChange($event)"
|
|
20
22
|
(blur)="fieldOnBlur($event)"
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</ng-template>
|
|
25
25
|
<ng-template #noEdit>
|
|
26
|
-
<component-mapper *ngIf="bVisible$ !== false" name="Text" [props]="{ pConn$, formatAs$: '
|
|
26
|
+
<component-mapper *ngIf="bVisible$ !== false" name="Text" [props]="{ pConn$, formatAs$: 'time' }"></component-mapper>
|
|
27
27
|
</ng-template>
|
|
@@ -7,8 +7,6 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
7
7
|
import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
8
8
|
import { Utils } from '@pega/angular-sdk-components';
|
|
9
9
|
|
|
10
|
-
declare const window: any;
|
|
11
|
-
|
|
12
10
|
interface NavBarProps {
|
|
13
11
|
// If any, enter additional props that only exist on this component
|
|
14
12
|
showAppName?: boolean;
|
|
@@ -6,7 +6,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
6
6
|
import { buildView, getReferenceList } from '@pega/angular-sdk-components';
|
|
7
7
|
import { Utils } from '@pega/angular-sdk-components';
|
|
8
8
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
9
|
-
import { evaluateAllowRowAction } from '
|
|
9
|
+
import { evaluateAllowRowAction } from '@pega/angular-sdk-components';
|
|
10
10
|
|
|
11
11
|
interface FieldGroupTemplateProps {
|
|
12
12
|
// If any, enter additional props that only exist on this component
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { getContext, readContextResponse } from './utils';
|
|
2
2
|
|
|
3
|
-
// Remove this and use "real" PCore type once .d.ts is fixed (currently shows 1 error)
|
|
4
|
-
declare const PCore: any;
|
|
5
|
-
|
|
6
3
|
export function init(props) {
|
|
7
4
|
const {
|
|
8
5
|
referenceList,
|
|
@@ -25,9 +22,9 @@ export function init(props) {
|
|
|
25
22
|
let selectionCountThreshold;
|
|
26
23
|
|
|
27
24
|
// promise to fetch metadata
|
|
28
|
-
const metaDataPromise = PCore.getAnalyticsUtils().getDataViewMetadata(referenceList, showDynamicFields);
|
|
25
|
+
const metaDataPromise = PCore.getAnalyticsUtils().getDataViewMetadata(referenceList, showDynamicFields, null);
|
|
29
26
|
|
|
30
|
-
const promisesArray = [metaDataPromise];
|
|
27
|
+
const promisesArray: any = [metaDataPromise];
|
|
31
28
|
|
|
32
29
|
// promise to fetch report configured columns
|
|
33
30
|
const reportColumnsPromise = PCore.getAnalyticsUtils()
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { getDefaultViewMeta } from './DefaultViewMeta';
|
|
2
2
|
|
|
3
|
-
// Remove this and use "real" PCore type once .d.ts is fixed (currently shows 5 errors)
|
|
4
|
-
declare const PCore: any;
|
|
5
|
-
|
|
6
3
|
const USER_REFERENCE = 'UserReference';
|
|
7
4
|
const PAGE = '!P!';
|
|
8
5
|
const PAGELIST = '!PL!';
|
|
@@ -121,7 +118,7 @@ export const isPageListInPath = (propertyName, currentClassID) => {
|
|
|
121
118
|
return false;
|
|
122
119
|
}
|
|
123
120
|
const [first, ...rest] = propertyName.split('.');
|
|
124
|
-
const metadata = PCore.getMetadataUtils().getPropertyMetadata(first, currentClassID);
|
|
121
|
+
const metadata: any = PCore.getMetadataUtils().getPropertyMetadata(first, currentClassID);
|
|
125
122
|
if (metadata?.type === 'Page List') {
|
|
126
123
|
return true;
|
|
127
124
|
}
|
|
@@ -205,7 +202,7 @@ export function getConfigEmbeddedFieldsMeta(configFields, classID) {
|
|
|
205
202
|
if (value.includes('[')) {
|
|
206
203
|
value = value.substring(0, value.indexOf('[')) + value.substring(value.indexOf(']') + 1);
|
|
207
204
|
}
|
|
208
|
-
const meta = PCore.getMetadataUtils().getEmbeddedPropertyMetadata(value, classID);
|
|
205
|
+
const meta: any = PCore.getMetadataUtils().getEmbeddedPropertyMetadata(value, classID);
|
|
209
206
|
meta.fieldID = field;
|
|
210
207
|
configEmbeddedFieldsMeta.push(meta);
|
|
211
208
|
}
|
|
@@ -294,19 +294,3 @@ export const createPConnect = (contextName, referenceList, pageReference) => {
|
|
|
294
294
|
|
|
295
295
|
return getPConnect();
|
|
296
296
|
};
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* This method evaluates whether a row action is allowed based on the provided conditions.
|
|
300
|
-
* @param {string|boolean|undefined} allowRowDelete - The condition for allowing row deletion.
|
|
301
|
-
* @param {object} rowData - The data of the row being evaluated.
|
|
302
|
-
* @returns {boolean} - Returns true if the row action is allowed, false otherwise.
|
|
303
|
-
*/
|
|
304
|
-
export const evaluateAllowRowAction = (allowRowDelete, rowData) => {
|
|
305
|
-
if (allowRowDelete === undefined || allowRowDelete === true) return true;
|
|
306
|
-
if (allowRowDelete.startsWith?.('@E ')) {
|
|
307
|
-
const expression = allowRowDelete.replace('@E ', '');
|
|
308
|
-
// @ts-ignore - Expected 3 arguments, but got 2
|
|
309
|
-
return PCore.getExpressionEngine().evaluate(expression, rowData);
|
|
310
|
-
}
|
|
311
|
-
return false;
|
|
312
|
-
};
|
|
@@ -16,12 +16,11 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
16
16
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
17
17
|
import { DatapageService } from '@pega/angular-sdk-components';
|
|
18
18
|
import { getReferenceList } from '@pega/angular-sdk-components';
|
|
19
|
-
import { buildFieldsForTable,
|
|
19
|
+
import { buildFieldsForTable, filterDataByCommonFields, filterDataByDate, getContext } from './helpers';
|
|
20
|
+
import { evaluateAllowRowAction } from '@pega/angular-sdk-components';
|
|
20
21
|
import { Utils } from '@pega/angular-sdk-components';
|
|
21
22
|
import { getSeconds } from '@pega/angular-sdk-components';
|
|
22
23
|
|
|
23
|
-
declare const window: any;
|
|
24
|
-
|
|
25
24
|
interface SimpleTableManualProps {
|
|
26
25
|
// If any, enter additional props that only exist on this component
|
|
27
26
|
visibility?: boolean;
|
package/lib/template/utils.ts
CHANGED
|
@@ -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
|
+
};
|
|
@@ -9,8 +9,6 @@ import isEqual from 'fast-deep-equal';
|
|
|
9
9
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
10
10
|
import { Utils } from '@pega/angular-sdk-components';
|
|
11
11
|
|
|
12
|
-
declare const window: any;
|
|
13
|
-
|
|
14
12
|
@Component({
|
|
15
13
|
selector: 'app-feed-container',
|
|
16
14
|
templateUrl: './feed-container.component.html',
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const evaluateAllowRowAction = (allowRowDelete, rowData) => {
|
|
2
|
-
if (allowRowDelete === undefined || allowRowDelete === true) return true;
|
|
3
|
-
if (allowRowDelete.startsWith?.('@E ')) {
|
|
4
|
-
const expression = allowRowDelete.replace('@E ', '');
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
return PCore.getExpressionEngine().evaluate(expression, rowData);
|
|
7
|
-
}
|
|
8
|
-
return false;
|
|
9
|
-
};
|