Skip to content

Commit 911bc75

Browse files
Fix FieldGroup issues, add support for highlighted fields and display modes (#192)
1 parent 35f138a commit 911bc75

File tree

80 files changed

+936
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+936
-348
lines changed

src/app/_components/_forms/auto-complete/auto-complete.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<div *ngIf="displayMode$; else noDisplayMode">
2+
<app-field-value-list [label$]="label$" [value$]="value$" [displayMode$]="displayMode$"></app-field-value-list>
3+
</div>
4+
<ng-template #noDisplayMode>
15
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
26
<div [formGroup]="formGroup$" *ngIf="bVisible$">
37
<mat-form-field class="psdk-full-width">
@@ -23,6 +27,7 @@
2327
</mat-form-field>
2428
</div>
2529
</div>
30+
</ng-template>
2631
<ng-template #noEdit>
2732
<app-text [pConn$]="pConn$" [formatAs$]="'text'"></app-text>
2833
</ng-template>

src/app/_components/_forms/auto-complete/auto-complete.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class AutoCompleteComponent implements OnInit {
2424
bReadonly$: boolean = false;
2525
bDisabled$: boolean = false;
2626
bVisible$: boolean = true;
27+
displayMode$: string = '';
2728
controlName$: string;
2829
bHasForm$: boolean = true;
2930
options$: Array<any>;
@@ -101,6 +102,7 @@ export class AutoCompleteComponent implements OnInit {
101102

102103
this.testId = this.configProps$['testId'];
103104
this.label$ = this.configProps$['label'];
105+
this.displayMode$ = this.configProps$['displayMode'];
104106
this.listType = this.configProps$['listType'];
105107
const displayMode = this.configProps$['displayMode'];
106108
const datasource = this.configProps$['datasource'];

src/app/_components/_forms/check-box/check-box.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<div *ngIf="displayMode$; else noDisplayMode">
2+
<app-field-value-list [label$]="label$" [value$]="value$" [displayMode$]="displayMode$"></app-field-value-list>
3+
</div>
4+
<ng-template #noDisplayMode>
15
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
26
<div [formGroup]="formGroup$" *ngIf="bVisible$">
37
<div class="mat-form-field-infix" *ngIf="showLabel$">
@@ -29,6 +33,7 @@
2933
</div>
3034
</div>
3135
</div>
36+
</ng-template>
3237
<ng-template #noEdit>
3338
<app-text [pConn$]="pConn$" [formatAs$]="'text'"></app-text>
3439
</ng-template>

src/app/_components/_forms/check-box/check-box.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export class CheckBoxComponent implements OnInit {
2727
bReadonly$: boolean = false;
2828
bDisabled$: boolean = false;
2929
bVisible$: boolean = true;
30+
displayMode$: string = '';
3031
controlName$: string;
3132
bHasForm$: boolean = true;
3233
componentReference: string = '';
@@ -93,7 +94,7 @@ export class CheckBoxComponent implements OnInit {
9394
}
9495
this.testId = this.configProps$['testId'];
9596
this.label$ = this.configProps$['label'];
96-
97+
this.displayMode$ = this.configProps$['displayMode'];
9798
this.caption$ = this.configProps$['caption'];
9899

99100
// timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError

src/app/_components/_forms/currency/currency.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<div *ngIf="displayMode$; else noDisplayMode">
2+
<app-field-value-list [label$]="label$" [value$]="value$" [displayMode$]="displayMode$"></app-field-value-list>
3+
</div>
4+
<ng-template #noDisplayMode>
15
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
26
<div [formGroup]="formGroup$" *ngIf="bVisible$">
37
<mat-form-field class="psdk-full-width">
@@ -20,6 +24,7 @@
2024
</mat-form-field>
2125
</div>
2226
</div>
27+
</ng-template>
2328
<ng-template #noEdit>
2429
<app-text [pConn$]="pConn$" [formatAs$]="'text'"></app-text>
2530
</ng-template>

src/app/_components/_forms/currency/currency.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class CurrencyComponent implements OnInit {
2323
bReadonly$: boolean = false;
2424
bDisabled$: boolean = false;
2525
bVisible$: boolean = true;
26+
displayMode$: string = '';
2627
controlName$: string;
2728
bHasForm$: boolean = true;
2829
componentReference: string = '';
@@ -88,6 +89,7 @@ export class CurrencyComponent implements OnInit {
8889
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
8990
this.testId = this.configProps$['testId'];
9091
this.label$ = this.configProps$['label'];
92+
this.displayMode$ = this.configProps$['displayMode'];
9193
let nValue = this.configProps$['value'];
9294
this.value$ = nValue && typeof nValue == 'string' ? parseFloat(nValue) : nValue;
9395
// timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError

src/app/_components/_forms/date-time/date-time.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<div *ngIf="displayMode$; else noDisplayMode">
2+
<app-field-value-list [label$]="label$" [value$]="value$" [displayMode$]="displayMode$"></app-field-value-list>
3+
</div>
4+
<ng-template #noDisplayMode>
15
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
26
<div [formGroup]="formGroup$" *ngIf="bVisible$">
37
<mat-form-field class="psdk-full-width">
@@ -18,6 +22,7 @@
1822
</mat-form-field>
1923
</div>
2024
</div>
25+
</ng-template>
2126
<ng-template #noEdit>
2227
<app-text [pConn$]="pConn$" [formatAs$]="'date-time'"></app-text>
2328
</ng-template>

src/app/_components/_forms/date-time/date-time.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class DateTimeComponent implements OnInit {
2323
bReadonly$: boolean = false;
2424
bDisabled$: boolean = false;
2525
bVisible$: boolean = true;
26+
displayMode$: string = '';
2627
controlName$: string;
2728
bHasForm$: boolean = true;
2829
componentReference: string = '';
@@ -84,6 +85,7 @@ export class DateTimeComponent implements OnInit {
8485
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
8586

8687
this.label$ = this.configProps$['label'];
88+
this.displayMode$ = this.configProps$['displayMode'];
8789
this.testId = this.configProps$['testId'];
8890
if (this.configProps$['value'] != undefined) {
8991
const value = this.configProps$['value'];

src/app/_components/_forms/date/date.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<div *ngIf="displayMode$; else noDisplayMode">
2+
<app-field-value-list [label$]="label$" [value$]="value$" [displayMode$]="displayMode$"></app-field-value-list>
3+
</div>
4+
<ng-template #noDisplayMode>
15
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
26
<div [formGroup]="formGroup$" *ngIf="bVisible$">
37
<mat-form-field class="psdk-full-width">
@@ -22,6 +26,7 @@
2226
</mat-form-field>
2327
</div>
2428
</div>
29+
</ng-template>
2530
<ng-template #noEdit>
2631
<app-text [pConn$]="pConn$" [formatAs$]="'date'"></app-text>
2732
</ng-template>

src/app/_components/_forms/date/date.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export class DateComponent implements OnInit {
2222
bReadonly$: boolean = false;
2323
bDisabled$: boolean = false;
2424
bVisible$: boolean = true;
25+
displayMode$: string = '';
2526
controlName$: string;
2627
bHasForm$: boolean = true;
2728
componentReference: string = '';
@@ -101,6 +102,7 @@ export class DateComponent implements OnInit {
101102
}
102103
this.testId = this.configProps$['testId'];
103104
this.label$ = this.configProps$['label'];
105+
this.displayMode$ = this.configProps$['displayMode'];
104106

105107
// timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
106108
setTimeout(() => {

0 commit comments

Comments
 (0)