@leanix/components 0.2.245 → 0.2.246
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/lib/core-ui/directives/autofocus.directive.mjs +6 -3
- package/fesm2015/leanix-components.mjs +5 -2
- package/fesm2015/leanix-components.mjs.map +1 -1
- package/fesm2020/leanix-components.mjs +5 -2
- package/fesm2020/leanix-components.mjs.map +1 -1
- package/lib/core-ui/directives/autofocus.directive.d.ts +2 -1
- package/package.json +1 -1
@@ -5,23 +5,26 @@ export class AutofocusDirective {
|
|
5
5
|
this.elementRef = elementRef;
|
6
6
|
this.ngZone = ngZone;
|
7
7
|
this.lxAutofocus = true;
|
8
|
+
this.lxAutofocusPreventScroll = false;
|
8
9
|
}
|
9
10
|
ngAfterContentInit() {
|
10
11
|
if (this.lxAutofocus !== false) {
|
11
12
|
this.ngZone.runOutsideAngular(() => {
|
12
13
|
setTimeout(() => {
|
13
|
-
this.elementRef.nativeElement.focus();
|
14
|
+
this.elementRef.nativeElement.focus({ preventScroll: this.lxAutofocusPreventScroll });
|
14
15
|
});
|
15
16
|
});
|
16
17
|
}
|
17
18
|
}
|
18
19
|
}
|
19
20
|
AutofocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AutofocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
20
|
-
AutofocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AutofocusDirective, selector: "[lxAutofocus]", inputs: { lxAutofocus: "lxAutofocus" }, ngImport: i0 });
|
21
|
+
AutofocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AutofocusDirective, selector: "[lxAutofocus]", inputs: { lxAutofocus: "lxAutofocus", lxAutofocusPreventScroll: "lxAutofocusPreventScroll" }, ngImport: i0 });
|
21
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AutofocusDirective, decorators: [{
|
22
23
|
type: Directive,
|
23
24
|
args: [{ selector: '[lxAutofocus]' }]
|
24
25
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { lxAutofocus: [{
|
25
26
|
type: Input
|
27
|
+
}], lxAutofocusPreventScroll: [{
|
28
|
+
type: Input
|
26
29
|
}] } });
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b2ZvY3VzLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9zcmMvbGliL2NvcmUtdWkvZGlyZWN0aXZlcy9hdXRvZm9jdXMuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBb0IsU0FBUyxFQUFjLEtBQUssRUFBVSxNQUFNLGVBQWUsQ0FBQzs7QUFHdkYsTUFBTSxPQUFPLGtCQUFrQjtJQUk3QixZQUFvQixVQUFtQyxFQUFVLE1BQWM7UUFBM0QsZUFBVSxHQUFWLFVBQVUsQ0FBeUI7UUFBVSxXQUFNLEdBQU4sTUFBTSxDQUFRO1FBSHRFLGdCQUFXLEdBQVksSUFBSSxDQUFDO1FBQzVCLDZCQUF3QixHQUFZLEtBQUssQ0FBQztJQUUrQixDQUFDO0lBRW5GLGtCQUFrQjtRQUNoQixJQUFJLElBQUksQ0FBQyxXQUFXLEtBQUssS0FBSyxFQUFFO1lBQzlCLElBQUksQ0FBQyxNQUFNLENBQUMsaUJBQWlCLENBQUMsR0FBRyxFQUFFO2dCQUNqQyxVQUFVLENBQUMsR0FBRyxFQUFFO29CQUNkLElBQUksQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxFQUF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mVmLm5hdGl2ZUVsZW1lbnQuZm9jdXMoeyBwcmV2ZW50U2Nyb2xsOiB0aGlzLmx4QXV0b2ZvY3VzUHJldmVudFNjcm9sbCB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
@@ -990,24 +990,27 @@ class AutofocusDirective {
|
|
990
990
|
this.elementRef = elementRef;
|
991
991
|
this.ngZone = ngZone;
|
992
992
|
this.lxAutofocus = true;
|
993
|
+
this.lxAutofocusPreventScroll = false;
|
993
994
|
}
|
994
995
|
ngAfterContentInit() {
|
995
996
|
if (this.lxAutofocus !== false) {
|
996
997
|
this.ngZone.runOutsideAngular(() => {
|
997
998
|
setTimeout(() => {
|
998
|
-
this.elementRef.nativeElement.focus();
|
999
|
+
this.elementRef.nativeElement.focus({ preventScroll: this.lxAutofocusPreventScroll });
|
999
1000
|
});
|
1000
1001
|
});
|
1001
1002
|
}
|
1002
1003
|
}
|
1003
1004
|
}
|
1004
1005
|
AutofocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AutofocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
1005
|
-
AutofocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AutofocusDirective, selector: "[lxAutofocus]", inputs: { lxAutofocus: "lxAutofocus" }, ngImport: i0 });
|
1006
|
+
AutofocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AutofocusDirective, selector: "[lxAutofocus]", inputs: { lxAutofocus: "lxAutofocus", lxAutofocusPreventScroll: "lxAutofocusPreventScroll" }, ngImport: i0 });
|
1006
1007
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AutofocusDirective, decorators: [{
|
1007
1008
|
type: Directive,
|
1008
1009
|
args: [{ selector: '[lxAutofocus]' }]
|
1009
1010
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { lxAutofocus: [{
|
1010
1011
|
type: Input
|
1012
|
+
}], lxAutofocusPreventScroll: [{
|
1013
|
+
type: Input
|
1011
1014
|
}] } });
|
1012
1015
|
|
1013
1016
|
/**
|