nmce-directives 1.5.2 → 1.5.3
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/fesm2022/nmce-directives.mjs +26 -2
- package/fesm2022/nmce-directives.mjs.map +1 -1
- package/index.d.ts +10 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Directive } from '@angular/core';
|
|
2
|
+
import { Input, Directive, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Use as a parameterized input parameter in html element.
|
|
@@ -59,6 +59,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
59
59
|
type: Input
|
|
60
60
|
}] } });
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Contain components for apps preferring importing module.
|
|
64
|
+
*/
|
|
65
|
+
class NmceDirectivesModule {
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NmceDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
67
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: NmceDirectivesModule, imports: [AutofocusDirective,
|
|
68
|
+
ScrollIntoDirective], exports: [AutofocusDirective,
|
|
69
|
+
ScrollIntoDirective] });
|
|
70
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NmceDirectivesModule });
|
|
71
|
+
}
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NmceDirectivesModule, decorators: [{
|
|
73
|
+
type: NgModule,
|
|
74
|
+
args: [{
|
|
75
|
+
imports: [
|
|
76
|
+
AutofocusDirective,
|
|
77
|
+
ScrollIntoDirective
|
|
78
|
+
],
|
|
79
|
+
exports: [
|
|
80
|
+
AutofocusDirective,
|
|
81
|
+
ScrollIntoDirective
|
|
82
|
+
]
|
|
83
|
+
}]
|
|
84
|
+
}] });
|
|
85
|
+
|
|
62
86
|
/*
|
|
63
87
|
* Public API Surface of nmce-directives
|
|
64
88
|
*/
|
|
@@ -68,5 +92,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
68
92
|
* Generated bundle index. Do not edit.
|
|
69
93
|
*/
|
|
70
94
|
|
|
71
|
-
export { AutofocusDirective, ScrollIntoDirective };
|
|
95
|
+
export { AutofocusDirective, NmceDirectivesModule, ScrollIntoDirective };
|
|
72
96
|
//# sourceMappingURL=nmce-directives.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nmce-directives.mjs","sources":["../../../projects/nmce-directives/src/_directives/autofocus.ts","../../../projects/nmce-directives/src/_directives/scrollInto.directive.ts","../../../projects/nmce-directives/src/public-api.ts","../../../projects/nmce-directives/src/nmce-directives.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\r\n\r\n/**\r\n * Use as a parameterized input parameter in html element.\r\n * When used inside a material dialog, this directive may be at odd against the autofocus config parameter of MatDialogConfig, \r\n * if the autofocus config is not false. Generally speaking, no need to use this directive in a component presented in a material dialog.\r\n */\r\n@Directive({\r\n\tselector: '[autofocus]',\r\n\tstandalone: true\r\n})\r\nexport class AutofocusDirective implements AfterViewInit {\r\n\t@Input('autofocus') autofocus = false;\r\n\r\n\tconstructor(private el: ElementRef) {\r\n\t}\r\n\r\n\tngAfterViewInit() {\r\n\t\tif (this.autofocus) {\r\n\t\t\tthis.el.nativeElement.focus();\r\n\t\t}\r\n\t}\r\n}\r\n","import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\r\n\r\n/**\r\n * Scroll to element attached. And the element may be an Angular Material component too.\r\n */\r\n@Directive({\r\n selector: '[scrollInto]',\r\n standalone: true\r\n})\r\nexport class ScrollIntoDirective implements AfterViewInit {\r\n\tconstructor(private el: ElementRef) {\r\n\t\t//\tconsole.debug('ScrollIntoDirective created.');\r\n\t}\r\n\r\n\t@Input()\r\n\tscrollInto: boolean = false;\r\n\r\n\tngAfterViewInit() {\r\n\t\tif (this.scrollInto) {\r\n\t\t\tthis.el.nativeElement.scrollIntoView();\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * Public API Surface of nmce-directives\r\n */\r\n/// <reference types=\"@angular/localize\" />\r\n\r\nexport * from './_directives/autofocus';\r\nexport * from './_directives/scrollInto.directive';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;;;AAIG;MAKU,kBAAkB,CAAA;AAGV,IAAA,EAAA;IAFA,SAAS,GAAG,KAAK;AAErC,IAAA,WAAA,CAAoB,EAAc,EAAA;QAAd,IAAA,CAAA,EAAE,GAAF,EAAE;IACtB;IAEA,eAAe,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;QAC9B;IACD;wGAVY,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE;AACZ,iBAAA;;sBAEC,KAAK;uBAAC,WAAW;;;ACVnB;;AAEG;MAKU,mBAAmB,CAAA;AACX,IAAA,EAAA;AAApB,IAAA,WAAA,CAAoB,EAAc,EAAA;QAAd,IAAA,CAAA,EAAE,GAAF,EAAE;;IAEtB;IAGA,UAAU,GAAY,KAAK;IAE3B,eAAe,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACpB,YAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE;QACvC;IACD;wGAZY,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE;AACf,iBAAA;;sBAMC;;;
|
|
1
|
+
{"version":3,"file":"nmce-directives.mjs","sources":["../../../projects/nmce-directives/src/_directives/autofocus.ts","../../../projects/nmce-directives/src/_directives/scrollInto.directive.ts","../../../projects/nmce-directives/src/nmce-directives.module.ts","../../../projects/nmce-directives/src/public-api.ts","../../../projects/nmce-directives/src/nmce-directives.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\r\n\r\n/**\r\n * Use as a parameterized input parameter in html element.\r\n * When used inside a material dialog, this directive may be at odd against the autofocus config parameter of MatDialogConfig, \r\n * if the autofocus config is not false. Generally speaking, no need to use this directive in a component presented in a material dialog.\r\n */\r\n@Directive({\r\n\tselector: '[autofocus]',\r\n\tstandalone: true\r\n})\r\nexport class AutofocusDirective implements AfterViewInit {\r\n\t@Input('autofocus') autofocus = false;\r\n\r\n\tconstructor(private el: ElementRef) {\r\n\t}\r\n\r\n\tngAfterViewInit() {\r\n\t\tif (this.autofocus) {\r\n\t\t\tthis.el.nativeElement.focus();\r\n\t\t}\r\n\t}\r\n}\r\n","import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\r\n\r\n/**\r\n * Scroll to element attached. And the element may be an Angular Material component too.\r\n */\r\n@Directive({\r\n selector: '[scrollInto]',\r\n standalone: true\r\n})\r\nexport class ScrollIntoDirective implements AfterViewInit {\r\n\tconstructor(private el: ElementRef) {\r\n\t\t//\tconsole.debug('ScrollIntoDirective created.');\r\n\t}\r\n\r\n\t@Input()\r\n\tscrollInto: boolean = false;\r\n\r\n\tngAfterViewInit() {\r\n\t\tif (this.scrollInto) {\r\n\t\t\tthis.el.nativeElement.scrollIntoView();\r\n\t\t}\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { AutofocusDirective } from './_directives/autofocus';\r\nimport { ScrollIntoDirective } from './_directives/scrollInto.directive';\r\n\r\n/**\r\n * Contain components for apps preferring importing module.\r\n */\r\n@NgModule({\r\n\timports: [\r\n\t\tAutofocusDirective,\r\n\t\tScrollIntoDirective\r\n\t],\r\n\r\n\texports: [\r\n\t\tAutofocusDirective,\r\n\t\tScrollIntoDirective\r\n\t]\r\n})\r\nexport class NmceDirectivesModule { }\r\n","/*\r\n * Public API Surface of nmce-directives\r\n */\r\n/// <reference types=\"@angular/localize\" />\r\n\r\nexport * from './_directives/autofocus';\r\nexport * from './_directives/scrollInto.directive';\r\nexport * from './nmce-directives.module';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;;;AAIG;MAKU,kBAAkB,CAAA;AAGV,IAAA,EAAA;IAFA,SAAS,GAAG,KAAK;AAErC,IAAA,WAAA,CAAoB,EAAc,EAAA;QAAd,IAAA,CAAA,EAAE,GAAF,EAAE;IACtB;IA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AA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE;AACf,iBAAA;;sBAMC;;;ACVF;;AAEG;MAYU,oBAAoB,CAAA;wGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAT/B,kBAAkB;AAClB,YAAA,mBAAmB,aAInB,kBAAkB;YAClB,mBAAmB,CAAA,EAAA,CAAA;yGAGR,oBAAoB,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE;wBACR,kBAAkB;wBAClB;AACA,qBAAA;AAED,oBAAA,OAAO,EAAE;wBACR,kBAAkB;wBAClB;AACA;AACD,iBAAA;;;ACjBD;;AAEG;AACH;;ACHA;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -27,4 +27,13 @@ declare class ScrollIntoDirective implements AfterViewInit {
|
|
|
27
27
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollIntoDirective, "[scrollInto]", never, { "scrollInto": { "alias": "scrollInto"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Contain components for apps preferring importing module.
|
|
32
|
+
*/
|
|
33
|
+
declare class NmceDirectivesModule {
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NmceDirectivesModule, never>;
|
|
35
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NmceDirectivesModule, never, [typeof AutofocusDirective, typeof ScrollIntoDirective], [typeof AutofocusDirective, typeof ScrollIntoDirective]>;
|
|
36
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NmceDirectivesModule>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { AutofocusDirective, NmceDirectivesModule, ScrollIntoDirective };
|