@pega/dx-component-builder-sdk 0.242.21 → 0.242.22
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/package.json +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/picklist-radio-buttons.component.html.mustache +2 -3
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.html.mustache +3 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.html.mustache +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.html +4 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/date/date.component.html +2 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.html +2 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/dropdown/dropdown.component.html +1 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/phone/phone.component.html +3 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/radio-buttons/radio-buttons.component.html +3 -4
- package/tests/assets/sdk-a/components/create/override-sdk/field/text/text.component.ts +1 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/text-area/text-area.component.html +3 -1
- package/tests/assets/sdk-a/components/create/override-sdk/template/field-group-template/field-group-template.component.ts +1 -1
- package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/helpers.ts +0 -16
- package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/simple-table-manual.component.ts +2 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.html +1 -0
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-paragraph/pega-dxil-my-paragraph.component.html +3 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-phone/pega-dxil-my-phone.component.html +2 -2
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-radiobuttons/pega-dxil-my-radiobuttons.component.html +2 -3
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.html +4 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date/date.component.html +2 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date-time/date-time.component.html +2 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/dropdown/dropdown.component.html +1 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/phone/phone.component.html +3 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/radio-buttons/radio-buttons.component.html +3 -4
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/text/text.component.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/text-area/text-area.component.html +3 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/field-group-template/field-group-template.component.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/helpers.ts +0 -16
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/simple-table-manual.component.ts +2 -1
- package/tests/assets/sdk-a/components/create/override-sdk/template/field-group-template/utils.ts +0 -9
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/field-group-template/utils.ts +0 -9
package/package.json
CHANGED
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
12
12
|
<mat-form-field class="psdk-radio-form" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
13
13
|
<span class="psdk-label-wrapper-readonly">
|
|
14
|
-
<label class="psdk-label-readonly">{{ label$ }}</label>
|
|
14
|
+
<mat-label class="psdk-label-readonly">{{ label$ }}</mat-label>
|
|
15
15
|
</span>
|
|
16
|
-
|
|
17
|
-
<input matInput [placeholder]="placeholder" style="display: none" />
|
|
16
|
+
<input matInput [placeholder]="placeholder" style="display: none" [required]="bRequired$" />
|
|
18
17
|
<mat-radio-group
|
|
19
18
|
[value]="value$"
|
|
20
19
|
[required]="bRequired$"
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
{{! pick new delimiters for mustache }}
|
|
5
5
|
{{=<% %>=}}
|
|
6
6
|
<ng-template #noDisplayMode>
|
|
7
|
-
<div *ngIf="
|
|
7
|
+
<div *ngIf="bHasForm$; else noEdit">
|
|
8
8
|
<div [formGroup]="formGroup$">
|
|
9
9
|
<div *ngIf="bVisible$">
|
|
10
10
|
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
11
|
+
<mat-label>{{ label$ }}</mat-label>
|
|
11
12
|
<textarea
|
|
12
13
|
matInput
|
|
13
14
|
rows="5"
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
[value]="value$"
|
|
18
19
|
[required]="bRequired$"
|
|
19
20
|
[disabled]="bDisabled$"
|
|
21
|
+
[readonly]="bReadonly$"
|
|
20
22
|
[formControl]="fieldControl"
|
|
21
23
|
(change)="fieldOnChange($event)"
|
|
22
24
|
(blur)="fieldOnBlur($event)"
|
package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.html.mustache
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{{! pick new delimiters for mustache }}
|
|
5
5
|
{{=<% %>=}}
|
|
6
6
|
<ng-template #noDisplayMode>
|
|
7
|
-
<div *ngIf="
|
|
7
|
+
<div *ngIf="bHasForm$; else noEdit">
|
|
8
8
|
<div #f="ngForm" [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
9
9
|
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
10
10
|
<ngx-mat-intl-tel-input
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
[enablePlaceholder]="true"
|
|
15
15
|
[enableSearch]="true"
|
|
16
16
|
[required]="bRequired$"
|
|
17
|
-
[disabled]="bDisabled$"
|
|
17
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
18
18
|
(change)="fieldOnChange()"
|
|
19
19
|
(blur)="fieldOnBlur()"
|
|
20
20
|
>
|
package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.html
CHANGED
|
@@ -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>
|
package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.html
CHANGED
|
@@ -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
|
>
|
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
10
10
|
<mat-form-field class="psdk-radio-form" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
11
11
|
<span class="psdk-label-wrapper-readonly">
|
|
12
|
-
<label class="psdk-label-readonly">{{ label$ }}</label>
|
|
12
|
+
<mat-label class="psdk-label-readonly">{{ label$ }}</mat-label>
|
|
13
13
|
</span>
|
|
14
|
-
|
|
15
|
-
<input matInput [placeholder]="placeholder" style="display: none" />
|
|
14
|
+
<input matInput [placeholder]="placeholder" style="display: none" [required]="bRequired$" />
|
|
16
15
|
<mat-radio-group
|
|
17
16
|
[value]="value$"
|
|
18
17
|
[required]="bRequired$"
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
<mat-radio-button
|
|
25
24
|
*ngFor="let opt of options$"
|
|
26
25
|
[checked]="isSelected(opt.key)"
|
|
27
|
-
[disabled]="bReadonly$"
|
|
26
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
28
27
|
[value]="opt.key"
|
|
29
28
|
class="psdk-radio-button"
|
|
30
29
|
>
|
|
@@ -138,7 +138,7 @@ export class TextComponent implements OnInit, OnDestroy {
|
|
|
138
138
|
// day: 'numeric'
|
|
139
139
|
// }).format(new Date(sVal + "T00:00"));
|
|
140
140
|
|
|
141
|
-
return this.utils.generateDate(sVal, 'Date-Long-Custom-YYYY');
|
|
141
|
+
return this.utils.generateDate(sVal, 'Date-Long-Custom-DD/MM/YYYY');
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
generateDateTime(sVal): string {
|
package/tests/assets/sdk-a/components/create/override-sdk/field/text-area/text-area.component.html
CHANGED
|
@@ -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)"
|
|
@@ -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
|
package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/helpers.ts
CHANGED
|
@@ -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,7 +16,8 @@ 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
|
|
|
@@ -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)"
|
|
@@ -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
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[enablePlaceholder]="true"
|
|
13
13
|
[enableSearch]="true"
|
|
14
14
|
[required]="bRequired$"
|
|
15
|
-
[disabled]="bDisabled$"
|
|
15
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
16
16
|
(change)="fieldOnChange()"
|
|
17
17
|
(blur)="fieldOnBlur()"
|
|
18
18
|
>
|
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
10
10
|
<mat-form-field class="psdk-radio-form" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
11
11
|
<span class="psdk-label-wrapper-readonly">
|
|
12
|
-
<label class="psdk-label-readonly">{{ label$ }}</label>
|
|
12
|
+
<mat-label class="psdk-label-readonly">{{ label$ }}</mat-label>
|
|
13
13
|
</span>
|
|
14
|
-
|
|
15
|
-
<input matInput [placeholder]="placeholder" style="display: none" />
|
|
14
|
+
<input matInput [placeholder]="placeholder" style="display: none" [required]="bRequired$" />
|
|
16
15
|
<mat-radio-group
|
|
17
16
|
[value]="value$"
|
|
18
17
|
[required]="bRequired$"
|
|
@@ -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>
|
package/tests/assets/sdk-a/components/createAll/override-sdk/field/phone/phone.component.html
CHANGED
|
@@ -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
|
>
|
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
10
10
|
<mat-form-field class="psdk-radio-form" subscriptSizing="dynamic" [hintLabel]="helperText">
|
|
11
11
|
<span class="psdk-label-wrapper-readonly">
|
|
12
|
-
<label class="psdk-label-readonly">{{ label$ }}</label>
|
|
12
|
+
<mat-label class="psdk-label-readonly">{{ label$ }}</mat-label>
|
|
13
13
|
</span>
|
|
14
|
-
|
|
15
|
-
<input matInput [placeholder]="placeholder" style="display: none" />
|
|
14
|
+
<input matInput [placeholder]="placeholder" style="display: none" [required]="bRequired$" />
|
|
16
15
|
<mat-radio-group
|
|
17
16
|
[value]="value$"
|
|
18
17
|
[required]="bRequired$"
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
<mat-radio-button
|
|
25
24
|
*ngFor="let opt of options$"
|
|
26
25
|
[checked]="isSelected(opt.key)"
|
|
27
|
-
[disabled]="bReadonly$"
|
|
26
|
+
[disabled]="bDisabled$ || bReadonly$"
|
|
28
27
|
[value]="opt.key"
|
|
29
28
|
class="psdk-radio-button"
|
|
30
29
|
>
|
|
@@ -138,7 +138,7 @@ export class TextComponent implements OnInit, OnDestroy {
|
|
|
138
138
|
// day: 'numeric'
|
|
139
139
|
// }).format(new Date(sVal + "T00:00"));
|
|
140
140
|
|
|
141
|
-
return this.utils.generateDate(sVal, 'Date-Long-Custom-YYYY');
|
|
141
|
+
return this.utils.generateDate(sVal, 'Date-Long-Custom-DD/MM/YYYY');
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
generateDateTime(sVal): string {
|
|
@@ -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)"
|
|
@@ -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
|
package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/helpers.ts
CHANGED
|
@@ -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,7 +16,8 @@ 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
|
|
package/tests/assets/sdk-a/components/create/override-sdk/template/field-group-template/utils.ts
DELETED
|
@@ -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
|
-
};
|
package/tests/assets/sdk-a/components/createAll/override-sdk/template/field-group-template/utils.ts
DELETED
|
@@ -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
|
-
};
|