@mintplayer/ng-focus-on-load 14.2.0 → 15.0.0
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.
- package/esm2020/lib/directives/focus-on-load/focus-on-load.directive.mjs +4 -5
- package/esm2020/lib/focus-on-load.module.mjs +4 -4
- package/fesm2015/mintplayer-ng-focus-on-load.mjs +7 -8
- package/fesm2015/mintplayer-ng-focus-on-load.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-focus-on-load.mjs +7 -8
- package/fesm2020/mintplayer-ng-focus-on-load.mjs.map +1 -1
- package/lib/directives/focus-on-load/focus-on-load.directive.d.ts +1 -1
- package/package.json +4 -4
|
@@ -5,7 +5,6 @@ export class FocusOnLoadDirective {
|
|
|
5
5
|
constructor(viewContainer) {
|
|
6
6
|
this.viewContainer = viewContainer;
|
|
7
7
|
this._autofocus = true;
|
|
8
|
-
console.log('init FocusOnLoadDirective');
|
|
9
8
|
const container = this.viewContainer['_lContainer'][0];
|
|
10
9
|
if (container instanceof HTMLElement) {
|
|
11
10
|
this.inputBox = container;
|
|
@@ -29,9 +28,9 @@ export class FocusOnLoadDirective {
|
|
|
29
28
|
}, 10);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
33
|
-
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
31
|
+
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
32
|
+
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
35
34
|
type: Directive,
|
|
36
35
|
args: [{
|
|
37
36
|
selector: '*[autofocus]'
|
|
@@ -39,4 +38,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
39
38
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { autofocus: [{
|
|
40
39
|
type: Input
|
|
41
40
|
}] } });
|
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMtb24tbG9hZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctZm9jdXMtb24tbG9hZC9zcmMvbGliL2RpcmVjdGl2ZXMvZm9jdXMtb24tbG9hZC9mb2N1cy1vbi1sb2FkLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3hELE9BQU8sRUFBRSxTQUFTLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQUt6RCxNQUFNLE9BQU8sb0JBQW9CO0lBRS9CLFlBQ1UsYUFBK0I7UUFBL0Isa0JBQWEsR0FBYixhQUFhLENBQWtCO1FBWWpDLGVBQVUsR0FBRyxJQUFJLENBQUM7UUFWeEIsTUFBTSxTQUFTLEdBQVMsSUFBSSxDQUFDLGFBQWMsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUM3R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ZXdJbml0IHtcblxuICBjb25zdHJ1Y3RvcihcbiAgICBwcml2YXRlIHZpZXdDb250YWluZXI6IFZpZXdDb250YWluZXJSZWZcbiAgKSB7XG4gICAgY29uc3QgY29udGFpbmVyID0gKDxhbnk+dGhpcy52aWV3Q29udGFpbmVyKVsnX2xDb250YWluZXInXVswXVxuICAgIGlmIChjb250YWluZXIgaW5zdGFuY2VvZiBIVE1MRWxlbWVudCkge1xuICAgICAgdGhpcy5pbnB1dEJveCA9IDxIVE1MSW5wdXRFbGVtZW50PmNvbnRhaW5lcjtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5pbnB1dEJveCA9IGNvbnRhaW5lcls4XTtcbiAgICB9XG4gIH1cblxuICBwcml2YXRlIHJlYWRvbmx5IGlucHV0Qm94ITogYW55O1xuXG4gIHByaXZhdGUgX2F1dG9mb2N1cyA9IHRydWU7XG4gIEBJbnB1dCgpIHB1YmxpYyBzZXQgYXV0b2ZvY3VzKHZhbHVlOiBhbnkpIHtcbiAgICBpZiAodmFsdWUgPT09ICcnKSB7XG4gICAgICAvLyA8YnMtc2VsZWN0MiAuLi4gYXV0b2ZvY3VzPjwvYnMtc2VsZWN0Mj5cbiAgICAgIHZhbHVlID0gdHJ1ZTtcbiAgICB9XG4gICAgdGhpcy5fYXV0b2ZvY3VzID0gdmFsdWU7ICBcbiAgfVxuXG4gIG5nQWZ0ZXJWaWV3SW5pdCgpIHtcbiAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgIGlmICh0aGlzLl9hdXRvZm9jdXMpIHtcbiAgICAgICAgdGhpcy5pbnB1dEJveC5mb2N1cygpO1xuICAgICAgfVxuICAgIH0sIDEwKTtcbiAgfVxufSJdfQ==
|
|
@@ -4,10 +4,10 @@ import { FocusOnLoadDirective } from './directives/focus-on-load/focus-on-load.d
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export class FocusOnLoadModule {
|
|
6
6
|
}
|
|
7
|
-
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8
|
-
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
9
|
-
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7
|
+
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
+
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] });
|
|
9
|
+
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] });
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
11
11
|
type: NgModule,
|
|
12
12
|
args: [{
|
|
13
13
|
imports: [CommonModule],
|
|
@@ -6,7 +6,6 @@ class FocusOnLoadDirective {
|
|
|
6
6
|
constructor(viewContainer) {
|
|
7
7
|
this.viewContainer = viewContainer;
|
|
8
8
|
this._autofocus = true;
|
|
9
|
-
console.log('init FocusOnLoadDirective');
|
|
10
9
|
const container = this.viewContainer['_lContainer'][0];
|
|
11
10
|
if (container instanceof HTMLElement) {
|
|
12
11
|
this.inputBox = container;
|
|
@@ -30,9 +29,9 @@ class FocusOnLoadDirective {
|
|
|
30
29
|
}, 10);
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
34
|
-
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
32
|
+
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
+
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
36
35
|
type: Directive,
|
|
37
36
|
args: [{
|
|
38
37
|
selector: '*[autofocus]'
|
|
@@ -43,10 +42,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
43
42
|
|
|
44
43
|
class FocusOnLoadModule {
|
|
45
44
|
}
|
|
46
|
-
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
47
|
-
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
48
|
-
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
46
|
+
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] });
|
|
47
|
+
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] });
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
50
49
|
type: NgModule,
|
|
51
50
|
args: [{
|
|
52
51
|
imports: [CommonModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-focus-on-load.mjs","sources":["../../../../libs/mintplayer-ng-focus-on-load/src/lib/directives/focus-on-load/focus-on-load.directive.ts","../../../../libs/mintplayer-ng-focus-on-load/src/lib/focus-on-load.module.ts","../../../../libs/mintplayer-ng-focus-on-load/src/mintplayer-ng-focus-on-load.ts"],"sourcesContent":["import { Input, ViewContainerRef } from '@angular/core';\nimport { Directive, AfterViewInit } from '@angular/core';\n\n@Directive({\n selector: '*[autofocus]'\n})\nexport class FocusOnLoadDirective implements AfterViewInit {\n\n constructor(\n private viewContainer: ViewContainerRef\n ) {\n
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-focus-on-load.mjs","sources":["../../../../libs/mintplayer-ng-focus-on-load/src/lib/directives/focus-on-load/focus-on-load.directive.ts","../../../../libs/mintplayer-ng-focus-on-load/src/lib/focus-on-load.module.ts","../../../../libs/mintplayer-ng-focus-on-load/src/mintplayer-ng-focus-on-load.ts"],"sourcesContent":["import { Input, ViewContainerRef } from '@angular/core';\nimport { Directive, AfterViewInit } from '@angular/core';\n\n@Directive({\n selector: '*[autofocus]'\n})\nexport class FocusOnLoadDirective implements AfterViewInit {\n\n constructor(\n private viewContainer: ViewContainerRef\n ) {\n const container = (<any>this.viewContainer)['_lContainer'][0]\n if (container instanceof HTMLElement) {\n this.inputBox = <HTMLInputElement>container;\n } else {\n this.inputBox = container[8];\n }\n }\n\n private readonly inputBox!: any;\n\n private _autofocus = true;\n @Input() public set autofocus(value: any) {\n if (value === '') {\n // <bs-select2 ... autofocus></bs-select2>\n value = true;\n }\n this._autofocus = value; \n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n if (this._autofocus) {\n this.inputBox.focus();\n }\n }, 10);\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FocusOnLoadDirective } from './directives/focus-on-load/focus-on-load.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [\n FocusOnLoadDirective\n ],\n exports: [\n FocusOnLoadDirective\n ],\n})\nexport class FocusOnLoadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,oBAAoB,CAAA;AAE/B,IAAA,WAAA,CACU,aAA+B,EAAA;AAA/B,QAAA,IAAa,CAAA,aAAA,GAAb,aAAa,CAAkB;AAYjC,QAAA,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;QAVxB,MAAM,SAAS,GAAS,IAAI,CAAC,aAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7D,IAAI,SAAS,YAAY,WAAW,EAAE;AACpC,YAAA,IAAI,CAAC,QAAQ,GAAqB,SAAS,CAAC;AAC7C,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC9B,SAAA;KACF;IAKD,IAAoB,SAAS,CAAC,KAAU,EAAA;QACtC,IAAI,KAAK,KAAK,EAAE,EAAE;;YAEhB,KAAK,GAAG,IAAI,CAAC;AACd,SAAA;AACD,QAAA,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;KACzB;IAED,eAAe,GAAA;QACb,UAAU,CAAC,MAAK;YACd,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,gBAAA,IAAI,CAAC,QAAQ,CAAC,K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AACvB,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;AACrB,qBAAA;iBACF,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -6,7 +6,6 @@ class FocusOnLoadDirective {
|
|
|
6
6
|
constructor(viewContainer) {
|
|
7
7
|
this.viewContainer = viewContainer;
|
|
8
8
|
this._autofocus = true;
|
|
9
|
-
console.log('init FocusOnLoadDirective');
|
|
10
9
|
const container = this.viewContainer['_lContainer'][0];
|
|
11
10
|
if (container instanceof HTMLElement) {
|
|
12
11
|
this.inputBox = container;
|
|
@@ -30,9 +29,9 @@ class FocusOnLoadDirective {
|
|
|
30
29
|
}, 10);
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
34
|
-
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
32
|
+
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
+
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
36
35
|
type: Directive,
|
|
37
36
|
args: [{
|
|
38
37
|
selector: '*[autofocus]'
|
|
@@ -43,10 +42,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
43
42
|
|
|
44
43
|
class FocusOnLoadModule {
|
|
45
44
|
}
|
|
46
|
-
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
47
|
-
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
48
|
-
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
46
|
+
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] });
|
|
47
|
+
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] });
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
50
49
|
type: NgModule,
|
|
51
50
|
args: [{
|
|
52
51
|
imports: [CommonModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-focus-on-load.mjs","sources":["../../../../libs/mintplayer-ng-focus-on-load/src/lib/directives/focus-on-load/focus-on-load.directive.ts","../../../../libs/mintplayer-ng-focus-on-load/src/lib/focus-on-load.module.ts","../../../../libs/mintplayer-ng-focus-on-load/src/mintplayer-ng-focus-on-load.ts"],"sourcesContent":["import { Input, ViewContainerRef } from '@angular/core';\nimport { Directive, AfterViewInit } from '@angular/core';\n\n@Directive({\n selector: '*[autofocus]'\n})\nexport class FocusOnLoadDirective implements AfterViewInit {\n\n constructor(\n private viewContainer: ViewContainerRef\n ) {\n
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-focus-on-load.mjs","sources":["../../../../libs/mintplayer-ng-focus-on-load/src/lib/directives/focus-on-load/focus-on-load.directive.ts","../../../../libs/mintplayer-ng-focus-on-load/src/lib/focus-on-load.module.ts","../../../../libs/mintplayer-ng-focus-on-load/src/mintplayer-ng-focus-on-load.ts"],"sourcesContent":["import { Input, ViewContainerRef } from '@angular/core';\nimport { Directive, AfterViewInit } from '@angular/core';\n\n@Directive({\n selector: '*[autofocus]'\n})\nexport class FocusOnLoadDirective implements AfterViewInit {\n\n constructor(\n private viewContainer: ViewContainerRef\n ) {\n const container = (<any>this.viewContainer)['_lContainer'][0]\n if (container instanceof HTMLElement) {\n this.inputBox = <HTMLInputElement>container;\n } else {\n this.inputBox = container[8];\n }\n }\n\n private readonly inputBox!: any;\n\n private _autofocus = true;\n @Input() public set autofocus(value: any) {\n if (value === '') {\n // <bs-select2 ... autofocus></bs-select2>\n value = true;\n }\n this._autofocus = value; \n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n if (this._autofocus) {\n this.inputBox.focus();\n }\n }, 10);\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FocusOnLoadDirective } from './directives/focus-on-load/focus-on-load.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [\n FocusOnLoadDirective\n ],\n exports: [\n FocusOnLoadDirective\n ],\n})\nexport class FocusOnLoadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,oBAAoB,CAAA;AAE/B,IAAA,WAAA,CACU,aAA+B,EAAA;QAA/B,IAAa,CAAA,aAAA,GAAb,aAAa,CAAkB;QAYjC,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;QAVxB,MAAM,SAAS,GAAS,IAAI,CAAC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,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAN1B,YAAA,EAAA,CAAA,oBAAoB,CAFZ,EAAA,OAAA,EAAA,CAAA,YAAY,aAKpB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAGX,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YARlB,YAAY,CAAA,EAAA,CAAA,CAAA;2FAQX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -9,5 +9,5 @@ export declare class FocusOnLoadDirective implements AfterViewInit {
|
|
|
9
9
|
set autofocus(value: any);
|
|
10
10
|
ngAfterViewInit(): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<FocusOnLoadDirective, never>;
|
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusOnLoadDirective, "*[autofocus]", never, { "autofocus": "autofocus"; }, {}, never, never, false>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusOnLoadDirective, "*[autofocus]", never, { "autofocus": "autofocus"; }, {}, never, never, false, never>;
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-focus-on-load",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "15.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/MintPlayer/mintplayer-ng-bootstrap",
|
|
8
8
|
"directory": "libs/mintplayer-ng-focus-on-load"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^
|
|
12
|
-
"@angular/core": "^
|
|
13
|
-
"@angular/platform-browser": "
|
|
11
|
+
"@angular/common": "^15.0.0",
|
|
12
|
+
"@angular/core": "^15.0.0",
|
|
13
|
+
"@angular/platform-browser": "15.0.3"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.3.0"
|