@clr/angular 17.11.9 → 17.11.10

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.
@@ -9,7 +9,7 @@ import { Subject, BehaviorSubject, Observable, fromEvent, isObservable, of, shar
9
9
  import * as i2 from '@angular/animations';
10
10
  import { animation, style, animate, trigger, transition, state, useAnimation, keyframes } from '@angular/animations';
11
11
  import * as i1 from '@angular/forms';
12
- import { FormControl, FormGroup, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, SelectMultipleControlValueAccessor, DefaultValueAccessor } from '@angular/forms';
12
+ import { FormControl, FormGroup, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, SelectMultipleControlValueAccessor } from '@angular/forms';
13
13
  import * as i1$1 from '@angular/router';
14
14
  import { RouterModule } from '@angular/router';
15
15
  import * as i1$2 from '@angular/cdk/a11y';
@@ -21394,14 +21394,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
21394
21394
  * This software is released under MIT license.
21395
21395
  * The full license information can be found in LICENSE in the root directory of this project.
21396
21396
  */
21397
- class ClrDatagridSingleSelectionValueAccessor extends DefaultValueAccessor {
21397
+ class ClrDatagridSingleSelectionValueAccessor {
21398
21398
  constructor(renderer, elementRef) {
21399
- super(renderer, elementRef, null);
21400
21399
  this.renderer = renderer;
21401
21400
  this.elementRef = elementRef;
21401
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
21402
+ this.onChange = () => { };
21403
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
21404
+ this.onTouched = () => { };
21405
+ }
21406
+ registerOnChange(fn) {
21407
+ this.onChange = fn;
21408
+ }
21409
+ registerOnTouched(fn) {
21410
+ this.onTouched = fn;
21411
+ }
21412
+ setDisabledState(isDisabled) {
21413
+ this.renderer.setProperty(this.elementRef.nativeElement, 'disabled', isDisabled);
21402
21414
  }
21403
21415
  writeValue(value) {
21404
- this.model = value;
21416
+ this.state = value;
21405
21417
  this.updateChecked();
21406
21418
  }
21407
21419
  keyOf(value) {
@@ -21411,7 +21423,7 @@ class ClrDatagridSingleSelectionValueAccessor extends DefaultValueAccessor {
21411
21423
  return value;
21412
21424
  }
21413
21425
  updateChecked() {
21414
- const model = this.keyOf(this.model);
21426
+ const model = this.keyOf(this.state);
21415
21427
  const value = this.keyOf(this.value);
21416
21428
  this.renderer.setProperty(this.elementRef.nativeElement, 'checked', model === value);
21417
21429
  }
@@ -21423,7 +21435,7 @@ ClrDatagridSingleSelectionValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minV
21423
21435
  useExisting: forwardRef(() => ClrDatagridSingleSelectionValueAccessor),
21424
21436
  multi: true,
21425
21437
  },
21426
- ], usesInheritance: true, ngImport: i0 });
21438
+ ], ngImport: i0 });
21427
21439
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrDatagridSingleSelectionValueAccessor, decorators: [{
21428
21440
  type: Directive,
21429
21441
  args: [{