@mintplayer/ng-focus-on-load 15.2.1 → 16.0.1
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/esm2022/lib/directives/focus-on-load/focus-on-load.directive.mjs +41 -0
- package/esm2022/lib/focus-on-load.module.mjs +23 -0
- package/{fesm2020 → fesm2022}/mintplayer-ng-focus-on-load.mjs +7 -7
- package/fesm2022/mintplayer-ng-focus-on-load.mjs.map +1 -0
- package/lib/directives/focus-on-load/focus-on-load.directive.d.ts +1 -1
- package/package.json +8 -14
- package/esm2020/lib/directives/focus-on-load/focus-on-load.directive.mjs +0 -40
- package/esm2020/lib/focus-on-load.module.mjs +0 -22
- package/fesm2015/mintplayer-ng-focus-on-load.mjs +0 -66
- package/fesm2015/mintplayer-ng-focus-on-load.mjs.map +0 -1
- package/fesm2020/mintplayer-ng-focus-on-load.mjs.map +0 -1
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/directives/index.mjs +0 -0
- /package/{esm2020 → esm2022}/mintplayer-ng-focus-on-load.mjs +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Input, ViewContainerRef, Directive } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
class FocusOnLoadDirective {
|
|
4
|
+
constructor(viewContainer) {
|
|
5
|
+
this.viewContainer = viewContainer;
|
|
6
|
+
this._autofocus = true;
|
|
7
|
+
const container = this.viewContainer['_lContainer'][0];
|
|
8
|
+
if (container instanceof HTMLElement) {
|
|
9
|
+
this.inputBox = container;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
this.inputBox = container[8];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
set autofocus(value) {
|
|
16
|
+
if (value === '') {
|
|
17
|
+
// <bs-select2 ... autofocus></bs-select2>
|
|
18
|
+
value = true;
|
|
19
|
+
}
|
|
20
|
+
this._autofocus = value;
|
|
21
|
+
}
|
|
22
|
+
ngAfterViewInit() {
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
if (this._autofocus) {
|
|
25
|
+
this.inputBox.focus();
|
|
26
|
+
}
|
|
27
|
+
}, 10);
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
30
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 }); }
|
|
31
|
+
}
|
|
32
|
+
export { FocusOnLoadDirective };
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
34
|
+
type: Directive,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: '*[autofocus]'
|
|
37
|
+
}]
|
|
38
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { autofocus: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}] } });
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMtb24tbG9hZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctZm9jdXMtb24tbG9hZC9zcmMvbGliL2RpcmVjdGl2ZXMvZm9jdXMtb24tbG9hZC9mb2N1cy1vbi1sb2FkLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLGdCQUFnQixFQUFFLFNBQVMsRUFBaUIsTUFBTSxlQUFlL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dXMoKTtcbiAgICAgIH1cbiAgICB9LCAxMCk7XG4gIH1cbn0iXX0=
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FocusOnLoadDirective } from './directives/focus-on-load/focus-on-load.directive';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
class FocusOnLoadModule {
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] }); }
|
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] }); }
|
|
9
|
+
}
|
|
10
|
+
export { FocusOnLoadModule };
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
12
|
+
type: NgModule,
|
|
13
|
+
args: [{
|
|
14
|
+
imports: [CommonModule],
|
|
15
|
+
declarations: [
|
|
16
|
+
FocusOnLoadDirective
|
|
17
|
+
],
|
|
18
|
+
exports: [
|
|
19
|
+
FocusOnLoadDirective
|
|
20
|
+
],
|
|
21
|
+
}]
|
|
22
|
+
}] });
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMtb24tbG9hZC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctZm9jdXMtb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4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIEZvY3VzT25Mb2FkTW9kdWxlIHt9XG4iXX0=
|
|
@@ -28,10 +28,10 @@ class FocusOnLoadDirective {
|
|
|
28
28
|
}
|
|
29
29
|
}, 10);
|
|
30
30
|
}
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
32
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 }); }
|
|
31
33
|
}
|
|
32
|
-
|
|
33
|
-
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
35
35
|
type: Directive,
|
|
36
36
|
args: [{
|
|
37
37
|
selector: '*[autofocus]'
|
|
@@ -41,11 +41,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
41
41
|
}] } });
|
|
42
42
|
|
|
43
43
|
class FocusOnLoadModule {
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
45
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] }); }
|
|
46
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] }); }
|
|
44
47
|
}
|
|
45
|
-
|
|
46
|
-
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] });
|
|
47
|
-
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] });
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
49
49
|
type: NgModule,
|
|
50
50
|
args: [{
|
|
51
51
|
imports: [CommonModule],
|
|
@@ -0,0 +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, 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":";;;;AAEA,MAGa,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,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,KAAK,EAAE,CAAC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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;;;;"}
|
|
@@ -8,5 +8,5 @@ export declare class FocusOnLoadDirective implements AfterViewInit {
|
|
|
8
8
|
set autofocus(value: any);
|
|
9
9
|
ngAfterViewInit(): void;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<FocusOnLoadDirective, never>;
|
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusOnLoadDirective, "*[autofocus]", never, { "autofocus": "autofocus"; }, {}, never, never, false, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusOnLoadDirective, "*[autofocus]", never, { "autofocus": { "alias": "autofocus"; "required": false; }; }, {}, never, never, false, never>;
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-focus-on-load",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "16.0.1",
|
|
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": "^16.0.0",
|
|
12
|
+
"@angular/core": "^16.0.0",
|
|
13
|
+
"@angular/platform-browser": "^16.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.3.0"
|
|
17
17
|
},
|
|
18
|
-
"module": "
|
|
19
|
-
"es2020": "fesm2020/mintplayer-ng-focus-on-load.mjs",
|
|
20
|
-
"esm2020": "esm2020/mintplayer-ng-focus-on-load.mjs",
|
|
21
|
-
"fesm2020": "fesm2020/mintplayer-ng-focus-on-load.mjs",
|
|
22
|
-
"fesm2015": "fesm2015/mintplayer-ng-focus-on-load.mjs",
|
|
18
|
+
"module": "fesm2022/mintplayer-ng-focus-on-load.mjs",
|
|
23
19
|
"typings": "index.d.ts",
|
|
24
20
|
"exports": {
|
|
25
21
|
"./package.json": {
|
|
@@ -27,11 +23,9 @@
|
|
|
27
23
|
},
|
|
28
24
|
".": {
|
|
29
25
|
"types": "./index.d.ts",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"node": "./fesm2015/mintplayer-ng-focus-on-load.mjs",
|
|
34
|
-
"default": "./fesm2020/mintplayer-ng-focus-on-load.mjs"
|
|
26
|
+
"esm2022": "./esm2022/mintplayer-ng-focus-on-load.mjs",
|
|
27
|
+
"esm": "./esm2022/mintplayer-ng-focus-on-load.mjs",
|
|
28
|
+
"default": "./fesm2022/mintplayer-ng-focus-on-load.mjs"
|
|
35
29
|
}
|
|
36
30
|
},
|
|
37
31
|
"sideEffects": false
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Input, ViewContainerRef, Directive } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class FocusOnLoadDirective {
|
|
4
|
-
constructor(viewContainer) {
|
|
5
|
-
this.viewContainer = viewContainer;
|
|
6
|
-
this._autofocus = true;
|
|
7
|
-
const container = this.viewContainer['_lContainer'][0];
|
|
8
|
-
if (container instanceof HTMLElement) {
|
|
9
|
-
this.inputBox = container;
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
this.inputBox = container[8];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
set autofocus(value) {
|
|
16
|
-
if (value === '') {
|
|
17
|
-
// <bs-select2 ... autofocus></bs-select2>
|
|
18
|
-
value = true;
|
|
19
|
-
}
|
|
20
|
-
this._autofocus = value;
|
|
21
|
-
}
|
|
22
|
-
ngAfterViewInit() {
|
|
23
|
-
setTimeout(() => {
|
|
24
|
-
if (this._autofocus) {
|
|
25
|
-
this.inputBox.focus();
|
|
26
|
-
}
|
|
27
|
-
}, 10);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
-
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
33
|
-
type: Directive,
|
|
34
|
-
args: [{
|
|
35
|
-
selector: '*[autofocus]'
|
|
36
|
-
}]
|
|
37
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { autofocus: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}] } });
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMtb24tbG9hZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctZm9jdXMtb24tbG9hZC9zcmMvbGliL2RpcmVjdGl2ZXMvZm9jdXMtb24tbG9hZC9mb2N1cy1vbi1sb2FkLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLGdCQUFnQixF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gICB0aGlzLmlucHV0Qm94LmZvY3VzKCk7XG4gICAgICB9XG4gICAgfSwgMTApO1xuICB9XG59Il19
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FocusOnLoadDirective } from './directives/focus-on-load/focus-on-load.directive';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class FocusOnLoadModule {
|
|
6
|
-
}
|
|
7
|
-
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
-
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] });
|
|
9
|
-
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
11
|
-
type: NgModule,
|
|
12
|
-
args: [{
|
|
13
|
-
imports: [CommonModule],
|
|
14
|
-
declarations: [
|
|
15
|
-
FocusOnLoadDirective
|
|
16
|
-
],
|
|
17
|
-
exports: [
|
|
18
|
-
FocusOnLoadDirective
|
|
19
|
-
],
|
|
20
|
-
}]
|
|
21
|
-
}] });
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMtb24tbG9hZC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbm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SlcbmV4cG9ydCBjbGFzcyBGb2N1c09uTG9hZE1vZHVsZSB7fVxuIl19
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, NgModule } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
|
|
5
|
-
class FocusOnLoadDirective {
|
|
6
|
-
constructor(viewContainer) {
|
|
7
|
-
this.viewContainer = viewContainer;
|
|
8
|
-
this._autofocus = true;
|
|
9
|
-
const container = this.viewContainer['_lContainer'][0];
|
|
10
|
-
if (container instanceof HTMLElement) {
|
|
11
|
-
this.inputBox = container;
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
this.inputBox = container[8];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
set autofocus(value) {
|
|
18
|
-
if (value === '') {
|
|
19
|
-
// <bs-select2 ... autofocus></bs-select2>
|
|
20
|
-
value = true;
|
|
21
|
-
}
|
|
22
|
-
this._autofocus = value;
|
|
23
|
-
}
|
|
24
|
-
ngAfterViewInit() {
|
|
25
|
-
setTimeout(() => {
|
|
26
|
-
if (this._autofocus) {
|
|
27
|
-
this.inputBox.focus();
|
|
28
|
-
}
|
|
29
|
-
}, 10);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
FocusOnLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
-
FocusOnLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: FocusOnLoadDirective, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
|
|
35
|
-
type: Directive,
|
|
36
|
-
args: [{
|
|
37
|
-
selector: '*[autofocus]'
|
|
38
|
-
}]
|
|
39
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { autofocus: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}] } });
|
|
42
|
-
|
|
43
|
-
class FocusOnLoadModule {
|
|
44
|
-
}
|
|
45
|
-
FocusOnLoadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
46
|
-
FocusOnLoadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, declarations: [FocusOnLoadDirective], imports: [CommonModule], exports: [FocusOnLoadDirective] });
|
|
47
|
-
FocusOnLoadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, imports: [CommonModule] });
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusOnLoadModule, decorators: [{
|
|
49
|
-
type: NgModule,
|
|
50
|
-
args: [{
|
|
51
|
-
imports: [CommonModule],
|
|
52
|
-
declarations: [
|
|
53
|
-
FocusOnLoadDirective
|
|
54
|
-
],
|
|
55
|
-
exports: [
|
|
56
|
-
FocusOnLoadDirective
|
|
57
|
-
],
|
|
58
|
-
}]
|
|
59
|
-
}] });
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Generated bundle index. Do not edit.
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
export { FocusOnLoadDirective, FocusOnLoadModule };
|
|
66
|
-
//# sourceMappingURL=mintplayer-ng-focus-on-load.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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, 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":";;;;MAKa,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,YA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A,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;iBACF,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
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, 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":";;;;MAKa,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,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,KAAK,EAAE,CAAC;AACvB,aAAA;SACF,EAAE,EAAE,CAAC,CAAC;KACR;;iHA9BU,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qGAApB,oBAAoB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,SAAA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