@dsivd/prestations-ng 15.3.1-beta3 → 15.3.1-beta4

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.
@@ -7283,16 +7283,19 @@ class FoehnInputTextareaComponent extends FoehnInputStringComponent {
7283
7283
  onModelChange(value) {
7284
7284
  if (value === undefined || !!value) {
7285
7285
  this.updateNgModel(value);
7286
+ if (this.displayCharCount) {
7287
+ this.checkCharCountExceeded();
7288
+ this.countCharLeft();
7289
+ }
7290
+ return;
7286
7291
  }
7287
- else {
7288
- this.ngZone.onMicrotaskEmpty.pipe(first()).subscribe(() => {
7289
- this.updateNgModel(null);
7290
- });
7291
- }
7292
- if (this.displayCharCount) {
7293
- this.checkCharCountExceeded();
7294
- this.countCharLeft();
7295
- }
7292
+ this.ngZone.onMicrotaskEmpty.pipe(first()).subscribe(() => {
7293
+ this.updateNgModel(null);
7294
+ if (this.displayCharCount) {
7295
+ this.checkCharCountExceeded();
7296
+ this.countCharLeft();
7297
+ }
7298
+ });
7296
7299
  }
7297
7300
  countCharLeft() {
7298
7301
  if (!this.max) {
@@ -7327,7 +7330,9 @@ class FoehnInputTextareaComponent extends FoehnInputStringComponent {
7327
7330
  checkCharCountExceeded() {
7328
7331
  if (this.model && this.max) {
7329
7332
  this.isCharCountExceeded = this.model.length > this.max;
7333
+ return;
7330
7334
  }
7335
+ this.isCharCountExceeded = false;
7331
7336
  }
7332
7337
  getCharCountLabel(nbRemaining) {
7333
7338
  return this.charCountLeft === 1
@@ -9511,7 +9516,7 @@ FoehnBooleanCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
9511
9516
  useExisting: forwardRef(() => FoehnBooleanCheckboxComponent),
9512
9517
  multi: true
9513
9518
  }
9514
- ], usesInheritance: true, ngImport: i0, template: "<div\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n class=\"form-group\"\n [attr.id]=\"buildId('Container')\"\n tabindex=\"-1\"\n>\n <foehn-validation-alerts [component]=\"this\"></foehn-validation-alerts>\n\n <small\n *ngIf=\"helpText\"\n [attr.id]=\"buildChildId() + 'Help'\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText\"\n ></small>\n\n <ng-content></ng-content>\n\n <div class=\"form-check\">\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n [ngModel]=\"model\"\n (ngModelChange)=\"updateNgModel($event)\"\n [name]=\"buildChildName()\"\n [attr.name]=\"buildChildName()\"\n [attr.id]=\"buildChildId()\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n [attr.disabled]=\"disabled ? 'disabled' : null\"\n [attr.aria-describedby]=\"getDescribedBy()\"\n (change)=\"handleChange(model)\"\n #entryComponent\n />\n <label class=\"form-check-label\" [for]=\"buildChildId()\">\n <span [innerHTML]=\"label\"></span>\n <span\n *ngIf=\"!required && !hideNotRequiredExtraLabel\"\n aria-hidden=\"true\"\n >\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n </label>\n </div>\n</div>\n", components: [{ type: FoehnValidationAlertsComponent, selector: "foehn-validation-alerts", inputs: ["component", "shouldErrorsBeLive"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
9519
+ ], usesInheritance: true, ngImport: i0, template: "<div\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n class=\"form-group\"\n [attr.id]=\"buildId('Container')\"\n tabindex=\"-1\"\n>\n <foehn-validation-alerts [component]=\"this\"></foehn-validation-alerts>\n\n <small\n *ngIf=\"helpText\"\n [attr.id]=\"buildChildId() + 'Help'\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText\"\n ></small>\n\n <ng-content></ng-content>\n\n <div class=\"form-check\">\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n [ngModel]=\"model\"\n (ngModelChange)=\"updateNgModel($event)\"\n [name]=\"buildChildName()\"\n [attr.name]=\"buildChildName()\"\n [attr.id]=\"buildChildId()\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n [attr.disabled]=\"disabled ? 'disabled' : null\"\n [attr.aria-describedby]=\"getDescribedBy()\"\n (change)=\"handleChange(model)\"\n #entryComponent\n />\n <label\n [ngClass]=\"\n isLabelSrOnly\n ? 'form-check-label sr-only'\n : 'form-check-label vd-p'\n \"\n [for]=\"buildChildId()\"\n >\n <span [innerHTML]=\"label\"></span>\n <span\n *ngIf=\"!required && !hideNotRequiredExtraLabel\"\n aria-hidden=\"true\"\n >\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n </label>\n </div>\n</div>\n", components: [{ type: FoehnValidationAlertsComponent, selector: "foehn-validation-alerts", inputs: ["component", "shouldErrorsBeLive"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
9515
9520
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FoehnBooleanCheckboxComponent, decorators: [{
9516
9521
  type: Component,
9517
9522
  args: [{ selector: 'foehn-boolean-checkbox', providers: [
@@ -9520,7 +9525,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
9520
9525
  useExisting: forwardRef(() => FoehnBooleanCheckboxComponent),
9521
9526
  multi: true
9522
9527
  }
9523
- ], template: "<div\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n class=\"form-group\"\n [attr.id]=\"buildId('Container')\"\n tabindex=\"-1\"\n>\n <foehn-validation-alerts [component]=\"this\"></foehn-validation-alerts>\n\n <small\n *ngIf=\"helpText\"\n [attr.id]=\"buildChildId() + 'Help'\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText\"\n ></small>\n\n <ng-content></ng-content>\n\n <div class=\"form-check\">\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n [ngModel]=\"model\"\n (ngModelChange)=\"updateNgModel($event)\"\n [name]=\"buildChildName()\"\n [attr.name]=\"buildChildName()\"\n [attr.id]=\"buildChildId()\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n [attr.disabled]=\"disabled ? 'disabled' : null\"\n [attr.aria-describedby]=\"getDescribedBy()\"\n (change)=\"handleChange(model)\"\n #entryComponent\n />\n <label class=\"form-check-label\" [for]=\"buildChildId()\">\n <span [innerHTML]=\"label\"></span>\n <span\n *ngIf=\"!required && !hideNotRequiredExtraLabel\"\n aria-hidden=\"true\"\n >\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n </label>\n </div>\n</div>\n" }]
9528
+ ], template: "<div\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n class=\"form-group\"\n [attr.id]=\"buildId('Container')\"\n tabindex=\"-1\"\n>\n <foehn-validation-alerts [component]=\"this\"></foehn-validation-alerts>\n\n <small\n *ngIf=\"helpText\"\n [attr.id]=\"buildChildId() + 'Help'\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText\"\n ></small>\n\n <ng-content></ng-content>\n\n <div class=\"form-check\">\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n [ngModel]=\"model\"\n (ngModelChange)=\"updateNgModel($event)\"\n [name]=\"buildChildName()\"\n [attr.name]=\"buildChildName()\"\n [attr.id]=\"buildChildId()\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n [attr.disabled]=\"disabled ? 'disabled' : null\"\n [attr.aria-describedby]=\"getDescribedBy()\"\n (change)=\"handleChange(model)\"\n #entryComponent\n />\n <label\n [ngClass]=\"\n isLabelSrOnly\n ? 'form-check-label sr-only'\n : 'form-check-label vd-p'\n \"\n [for]=\"buildChildId()\"\n >\n <span [innerHTML]=\"label\"></span>\n <span\n *ngIf=\"!required && !hideNotRequiredExtraLabel\"\n aria-hidden=\"true\"\n >\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n </label>\n </div>\n</div>\n" }]
9524
9529
  }] });
9525
9530
 
9526
9531
  class FoehnBooleanRadioComponent extends FoehnInputComponent {