@mintplayer/ng-focus-on-load 19.0.0 → 20.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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input } from '@angular/core';
2
+ import { Input, Directive } from '@angular/core';
3
3
 
4
4
  class FocusOnLoadDirective {
5
5
  constructor(viewContainer) {
@@ -27,10 +27,10 @@ class FocusOnLoadDirective {
27
27
  }
28
28
  }, 10);
29
29
  }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
31
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: FocusOnLoadDirective, isStandalone: true, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
31
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: FocusOnLoadDirective, isStandalone: true, selector: "*[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 }); }
32
32
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: FocusOnLoadDirective, decorators: [{
34
34
  type: Directive,
35
35
  args: [{
36
36
  selector: '*[autofocus]',
@@ -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/mintplayer-ng-focus-on-load.ts"],"sourcesContent":["import { Input, ViewContainerRef, Directive, AfterViewInit } from '@angular/core';\n\n@Directive({\n selector: '*[autofocus]',\n standalone: true,\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}","/**\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;QAYf,IAAU,CAAA,UAAA,GAAG,IAAI;QAVvB,MAAM,SAAS,GAAS,IAAI,CAAC,aAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC7D,QAAA,IAAI,SAAS,YAAY,WAAW,EAAE;AACpC,YAAA,IAAI,CAAC,QAAQ,GAAqB,SAAS;;aACtC;AACL,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC;;;IAOhC,IAAoB,SAAS,CAAC,KAAU,EAAA;AACtC,QAAA,IAAI,KAAK,KAAK,EAAE,EAAE;;YAEhB,KAAK,GAAG,IAAI;;AAEd,QAAA,IAAI,CAAC,UAAU,GAAG,KAAK;;IAGzB,eAAe,GAAA;QACb,UAAU,CAAC,MAAK;AACd,YAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,gBAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;;SAExB,EAAE,EAAE,CAAC;;8GA7BG,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;qFAiBqB,SAAS,EAAA,CAAA;sBAA5B;;;ACtBH;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-focus-on-load.mjs","sources":["../tmp-esm2022/lib/directives/focus-on-load/focus-on-load.directive.js","../tmp-esm2022/mintplayer-ng-focus-on-load.js"],"sourcesContent":["import { Input, Directive } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nexport class FocusOnLoadDirective {\n constructor(viewContainer) {\n this.viewContainer = viewContainer;\n this._autofocus = true;\n const container = this.viewContainer['_lContainer'][0];\n if (container instanceof HTMLElement) {\n this.inputBox = container;\n }\n else {\n this.inputBox = container[8];\n }\n }\n set autofocus(value) {\n if (value === '') {\n // <bs-select2 ... autofocus></bs-select2>\n value = true;\n }\n this._autofocus = value;\n }\n ngAfterViewInit() {\n setTimeout(() => {\n if (this._autofocus) {\n this.inputBox.focus();\n }\n }, 10);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.0\", ngImport: i0, type: FocusOnLoadDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.0.0\", type: FocusOnLoadDirective, isStandalone: true, selector: \"*[autofocus]\", inputs: { autofocus: \"autofocus\" }, ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.0\", ngImport: i0, type: FocusOnLoadDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '*[autofocus]',\n standalone: true,\n }]\n }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { autofocus: [{\n type: Input\n }] } });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMtb24tbG9hZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL21pbnRwbGF5ZXItbmctZm9jdXMtb24tbG9hZC9zcmMvbGliL2RpcmVjdGl2ZXMvZm9jdXMtb24tbG9hZC9mb2N1cy1vbi1sb2FkLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFvQixTQUFTLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQU1sRixNQUFNLE9BQU8sb0JBQW9CO0lBRS9CLFlBQ1UsYUFBK0I7UUFBL0Isa0JBQWEsR0FBYixhQUFhLENBQWtCO1FBWWpDLGVBQVUsR0FBRyxJQUFJLENBQUM7UUFWeEIsTUFBTSxTQUFTLEdBQVMsSUFBSSxDQUFDLGFBQWMsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUM3RCxJQUFJLFNBQVMsWUFBWSxXQUFXLEVBQUUsQ0FBQztZQUNyQyxJQUFJLENBQUMsUUFBUSxHQUFxQixTQUFTLENBQUM7UUFDOUMsQ0FBQzthQUFNLENBQUM7WUFDTixJQUFJLENBQUMsUUFBUS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ZXJSZWZcbiAgKSB7XG4gICAgY29uc3QgY29udGFpbmVyID0gKDxhbnk+dGhpcy52aWV3Q29udGFpbmVyKVsnX2xDb250YWluZXInXVswXVxuICAgIGlmIChjb250YWluZXIgaW5zdGFuY2VvZiBIVE1MRWxlbWVudCkge1xuICAgICAgdGhpcy5pbnB1dEJveCA9IDxIVE1MSW5wdXRFbGVtZW50PmNvbnRhaW5lcjtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5pbnB1dEJveCA9IGNvbnRhaW5lcls4XTtcbiAgICB9XG4gIH1cblxuICBwcml2YXRlIHJlYWRvbmx5IGlucHV0Qm94ITogYW55O1xuXG4gIHByaXZhdGUgX2F1dG9mb2N1cyA9IHRydWU7XG4gIEBJbnB1dCgpIHB1YmxpYyBzZXQgYXV0b2ZvY3VzKHZhbHVlOiBhbnkpIHtcbiAgICBpZiAodmFsdWUgPT09ICcnKSB7XG4gICAgICAvLyA8YnMtc2VsZWN0MiAuLi4gYXV0b2ZvY3VzPjwvYnMtc2VsZWN0Mj5cbiAgICAgIHZhbHVlID0gdHJ1ZTtcbiAgICB9XG4gICAgdGhpcy5fYXV0b2ZvY3VzID0gdmFsdWU7ICBcbiAgfVxuXG4gIG5nQWZ0ZXJWaWV3SW5pdCgpIHtcbiAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgIGlmICh0aGlzLl9hdXRvZm9jdXMpIHtcbiAgICAgICAgdGhpcy5pbnB1dEJveC5mb2N1cygpO1xuICAgICAgfVxuICAgIH0sIDEwKTtcbiAgfVxufSJdfQ==","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWludHBsYXllci1uZy1mb2N1cy1vbi1sb2FkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGlicy9taW50cGxheWVyLW5nLWZvY3VzLW9uLWxvYWQvc3JjL21pbn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AI,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,gBAAgB,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC,CAAC;AACpN,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,oBAAoB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,oBAAoB,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1N;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,UAAU,EAAE,CAAC;AAC9H,YAAY,IAAI,EAAE,SAAS;AAC3B,YAAY,IAAI,EAAE,CAAC;AACnB,oBAAoB,QAAQ,EAAE,cAAc;AAC5C,oBAAoB,UAAU,EAAE,IAAI;AACpC,iBAAiB;AACjB,SAAS,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,CAAC;AACjG,gBAAgB,IAAI,EAAE;AACtB,aAAa,CAAC,EAAE,EAAE,CAAC;;ACvCnB;AACA;AACA;;;;"}
package/index.d.ts CHANGED
@@ -1 +1,15 @@
1
- export * from './lib/directives';
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewInit, ViewContainerRef } from '@angular/core';
3
+
4
+ declare class FocusOnLoadDirective implements AfterViewInit {
5
+ private viewContainer;
6
+ constructor(viewContainer: ViewContainerRef);
7
+ private readonly inputBox;
8
+ private _autofocus;
9
+ set autofocus(value: any);
10
+ ngAfterViewInit(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<FocusOnLoadDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FocusOnLoadDirective, "*[autofocus]", never, { "autofocus": { "alias": "autofocus"; "required": false; }; }, {}, never, never, true, never>;
13
+ }
14
+
15
+ export { FocusOnLoadDirective };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-focus-on-load",
3
3
  "private": false,
4
- "version": "19.0.0",
4
+ "version": "20.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": "^19.0.0",
12
- "@angular/core": "^19.0.0",
13
- "@angular/platform-browser": "^19.0.0"
11
+ "@angular/common": "^20.0.0",
12
+ "@angular/core": "^20.0.0",
13
+ "@angular/platform-browser": "^20.0.0"
14
14
  },
15
15
  "dependencies": {
16
16
  "tslib": "^2.3.0"
@@ -1,12 +0,0 @@
1
- import { ViewContainerRef, AfterViewInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class FocusOnLoadDirective implements AfterViewInit {
4
- private viewContainer;
5
- constructor(viewContainer: ViewContainerRef);
6
- private readonly inputBox;
7
- private _autofocus;
8
- set autofocus(value: any);
9
- ngAfterViewInit(): void;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<FocusOnLoadDirective, never>;
11
- static ɵdir: i0.ɵɵDirectiveDeclaration<FocusOnLoadDirective, "*[autofocus]", never, { "autofocus": { "alias": "autofocus"; "required": false; }; }, {}, never, never, true, never>;
12
- }
@@ -1 +0,0 @@
1
- export * from './focus-on-load/focus-on-load.directive';