@tetacom/ng-components 1.6.4 → 1.6.5
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.
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
1
2
|
import { NgControl } from '@angular/forms';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DisableControlDirective {
|
|
4
|
+
export declare class DisableControlDirective implements OnInit {
|
|
4
5
|
private ngControl;
|
|
6
|
+
private disabled;
|
|
5
7
|
set tetaDisableControl(val: boolean);
|
|
6
8
|
constructor(ngControl: NgControl);
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
private toggleControl;
|
|
7
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<DisableControlDirective, never>;
|
|
8
12
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DisableControlDirective, "[tetaDisableControl]", never, { "tetaDisableControl": { "alias": "tetaDisableControl"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
13
|
}
|
|
@@ -6124,6 +6124,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
6124
6124
|
|
|
6125
6125
|
class DisableControlDirective {
|
|
6126
6126
|
set tetaDisableControl(val) {
|
|
6127
|
+
this.toggleControl(val);
|
|
6128
|
+
this.disabled = val;
|
|
6129
|
+
}
|
|
6130
|
+
constructor(ngControl) {
|
|
6131
|
+
this.ngControl = ngControl;
|
|
6132
|
+
}
|
|
6133
|
+
ngOnInit() {
|
|
6134
|
+
this.toggleControl(this.disabled);
|
|
6135
|
+
}
|
|
6136
|
+
toggleControl(val) {
|
|
6127
6137
|
if (this.ngControl.control) {
|
|
6128
6138
|
if (val) {
|
|
6129
6139
|
this.ngControl.control.disable({
|
|
@@ -6137,9 +6147,6 @@ class DisableControlDirective {
|
|
|
6137
6147
|
}
|
|
6138
6148
|
}
|
|
6139
6149
|
}
|
|
6140
|
-
constructor(ngControl) {
|
|
6141
|
-
this.ngControl = ngControl;
|
|
6142
|
-
}
|
|
6143
6150
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DisableControlDirective, deps: [{ token: i2.NgControl }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6144
6151
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: DisableControlDirective, isStandalone: true, selector: "[tetaDisableControl]", inputs: { tetaDisableControl: "tetaDisableControl" }, ngImport: i0 }); }
|
|
6145
6152
|
}
|