@gerandon/ngx-widgets 18.0.0 → 18.0.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gerandon/ngx-widgets",
3
- "version": "18.0.0",
3
+ "version": "18.0.1",
4
4
  "description": "Angular widget (components) collection using CVA (ControlValueAccessor)",
5
5
  "keywords": [
6
6
  "CVA",
@@ -31,9 +31,12 @@
31
31
  @if (control.errors?.['server']) {
32
32
  <mat-error>{{ control.errors?.['server'] }}</mat-error>
33
33
  } @else if (control.errors?.['required']) {
34
- <mat-error>{{ validationTranslations.required }}</mat-error>
35
- @for (error of validatorMessagesArray; track error) {
36
- <mat-error>{{ error.value }}</mat-error>
34
+ @if (validationTranslations.required) {
35
+ <mat-error>{{ validationTranslations.required }}</mat-error>
36
+ } @else {
37
+ @for (error of validatorMessagesArray; track error) {
38
+ <mat-error>{{ error.value }}</mat-error>
39
+ }
37
40
  }
38
41
  }
39
42
  </mat-form-field>
@@ -33,10 +33,13 @@
33
33
  @if (control.errors?.['server']) {
34
34
  <mat-error>{{ control.errors?.['server'] }}</mat-error>
35
35
  } @else if (control.errors?.['required']) {
36
- <mat-error>{{ validationTranslations.required }}</mat-error>
37
- @for (error of validatorMessagesArray; track error) {
38
- @if (control.errors?.[error.key]) {
39
- <mat-error>{{ error.value }}</mat-error>
36
+ @if (validationTranslations.required) {
37
+ <mat-error>{{ validationTranslations.required }}</mat-error>
38
+ } @else {
39
+ @for (error of validatorMessagesArray; track error) {
40
+ @if (control.errors?.[error.key]) {
41
+ <mat-error>{{ error.value }}</mat-error>
42
+ }
40
43
  }
41
44
  }
42
45
  }
@@ -28,9 +28,12 @@
28
28
  @if (control.errors?.['server']) {
29
29
  <mat-error>{{ control.errors?.['server'] }}</mat-error>
30
30
  } @else if (control.errors?.['required']) {
31
- <mat-error>{{ validationTranslations.required }}</mat-error>
32
- @for (error of validatorMessagesArray; track error) {
33
- <mat-error>{{ error.value }}</mat-error>
31
+ @if (validationTranslations.required) {
32
+ <mat-error>{{ validationTranslations.required }}</mat-error>
33
+ } @else {
34
+ @for (error of validatorMessagesArray; track error) {
35
+ <mat-error>{{ error.value }}</mat-error>
36
+ }
34
37
  }
35
38
  }
36
39
  </mat-form-field>
@@ -19,7 +19,7 @@
19
19
  [maxLength]="maxLength"
20
20
  [name]="name">
21
21
  </textarea>
22
- <span class="counter">{{control?.value?.length || 0}} / {{ maxLength }}</span>
22
+ <span class="counter">{{control.value?.length || 0}} / {{ maxLength }}</span>
23
23
  @if (prefixIcon) {
24
24
  <mat-icon matPrefix color="accent">
25
25
  {{prefixIcon}}
@@ -36,9 +36,12 @@
36
36
  @if (control.errors?.['server']) {
37
37
  <mat-error>{{ control.errors?.['server'] }}</mat-error>
38
38
  } @else if (control.errors?.['required']) {
39
- <mat-error>{{ validationTranslations.required }}</mat-error>
40
- @for (error of validatorMessagesArray; track error) {
41
- <mat-error>{{ error.value }}</mat-error>
39
+ @if (validationTranslations.required) {
40
+ <mat-error>{{ validationTranslations.required }}</mat-error>
41
+ } @else {
42
+ @for (error of validatorMessagesArray; track error) {
43
+ <mat-error>{{ error.value }}</mat-error>
44
+ }
42
45
  }
43
46
  }
44
47
  </mat-form-field>