nmce-directives 1.2.2 → 1.4.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/README.md CHANGED
@@ -1,24 +1,24 @@
1
- # NmceDirectives
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.5.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project nmce-directives` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project nmce-directives`.
8
- > Note: Don't forget to add `--project nmce-directives` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build nmce-directives` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build nmce-directives`, go to the dist folder `cd dist/nmce-directives` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test nmce-directives` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
1
+ # NmceDirectives
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.5.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project nmce-directives` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project nmce-directives`.
8
+ > Note: Don't forget to add `--project nmce-directives` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build nmce-directives` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build nmce-directives`, go to the dist folder `cd dist/nmce-directives` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test nmce-directives` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -1,7 +1,7 @@
1
1
  import { AfterViewInit, DoCheck, ElementRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
- * Use as a parametered input parameter in html element.
4
+ * Use as a parameterized input parameter in html element.
5
5
  * When used inside a material dialog, this directive may be at odd against the autofocus config parameter of MatDialogConfig,
6
6
  * if the autofocus config is not false. Generally speaking, no need to use this directive in a component presented in a mateiral dialog.
7
7
  */
@@ -9,11 +9,12 @@ export declare class AutofocusDirective implements AfterViewInit, DoCheck {
9
9
  private el;
10
10
  private toFocus;
11
11
  private focused;
12
- private initialised;
12
+ private initialized;
13
13
  private everFocused;
14
14
  constructor(el: ElementRef);
15
15
  ngAfterViewInit(): void;
16
16
  ngDoCheck(): void;
17
+ get autofocus(): boolean;
17
18
  set autofocus(condition: boolean);
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<AutofocusDirective, never>;
19
20
  static ɵdir: i0.ɵɵDirectiveDeclaration<AutofocusDirective, "[autofocus]", never, { "autofocus": { "alias": "autofocus"; "required": false; }; }, {}, never, never, false, never>;
@@ -1,16 +1,15 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./autofocus";
3
- import * as i2 from "./currencyFormatter.directive";
4
- import * as i3 from "./scrollInto.directive";
5
- import * as i4 from "./dataComponent.directive";
6
- import * as i5 from "@angular/common";
7
- import * as i6 from "@angular/forms";
3
+ import * as i2 from "./scrollInto.directive";
4
+ import * as i3 from "./dataComponent.directive";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "@angular/forms";
8
7
  /**
9
8
  * Contain components. Other feature/lazy modules that need to access custom html element of components like my-datetimepicker still need to import this module explicitly.
10
9
  *
11
10
  */
12
11
  export declare class NmceDirectivesModule {
13
12
  static ɵfac: i0.ɵɵFactoryDeclaration<NmceDirectivesModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<NmceDirectivesModule, [typeof i1.AutofocusDirective, typeof i2.CurrencyFormatterDirective, typeof i3.ScrollIntoDirective, typeof i4.DataComponentDirective], [typeof i5.CommonModule, typeof i6.FormsModule], [typeof i1.AutofocusDirective, typeof i2.CurrencyFormatterDirective, typeof i3.ScrollIntoDirective, typeof i4.DataComponentDirective]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NmceDirectivesModule, [typeof i1.AutofocusDirective, typeof i2.ScrollIntoDirective, typeof i3.DataComponentDirective], [typeof i4.CommonModule, typeof i5.FormsModule], [typeof i1.AutofocusDirective, typeof i2.ScrollIntoDirective, typeof i3.DataComponentDirective]>;
15
14
  static ɵinj: i0.ɵɵInjectorDeclaration<NmceDirectivesModule>;
16
15
  }
@@ -1,4 +1,3 @@
1
1
  export * from './autofocus';
2
- export * from './currencyFormatter.directive';
3
2
  export * from './dataComponent.directive';
4
3
  export * from './scrollInto.directive';
@@ -1,11 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, HostListener, NgModule } from '@angular/core';
3
- import { CurrencyFunc } from 'nmce-func';
2
+ import { Input, Directive, NgModule } from '@angular/core';
4
3
  import { CommonModule } from '@angular/common';
5
4
  import { FormsModule } from '@angular/forms';
6
5
 
7
6
  /**
8
- * Use as a parametered input parameter in html element.
7
+ * Use as a parameterized input parameter in html element.
9
8
  * When used inside a material dialog, this directive may be at odd against the autofocus config parameter of MatDialogConfig,
10
9
  * if the autofocus config is not false. Generally speaking, no need to use this directive in a component presented in a mateiral dialog.
11
10
  */
@@ -13,18 +12,18 @@ class AutofocusDirective {
13
12
  el;
14
13
  toFocus = false;
15
14
  focused = false;
16
- initialised = false;
15
+ initialized = false;
17
16
  everFocused = false;
18
17
  constructor(el) {
19
18
  this.el = el;
20
19
  //console.debug('autofocusDirective created.');
21
20
  }
22
21
  ngAfterViewInit() {
23
- this.initialised = true;
22
+ this.initialized = true;
24
23
  this.ngDoCheck();
25
24
  }
26
25
  ngDoCheck() {
27
- if (!this.initialised) {
26
+ if (!this.initialized) {
28
27
  return;
29
28
  }
30
29
  if (this.toFocus && !this.everFocused && !this.focused) {
@@ -34,67 +33,38 @@ class AutofocusDirective {
34
33
  console.debug('focused now.');
35
34
  }
36
35
  }
36
+ get autofocus() {
37
+ return this.focused;
38
+ }
37
39
  set autofocus(condition) {
38
40
  this.toFocus = condition !== false;
39
41
  }
40
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: AutofocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
41
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: AutofocusDirective, selector: "[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
42
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AutofocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
43
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: AutofocusDirective, isStandalone: false, selector: "[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
42
44
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: AutofocusDirective, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AutofocusDirective, decorators: [{
44
46
  type: Directive,
45
47
  args: [{
46
- selector: '[autofocus]'
48
+ selector: '[autofocus]',
49
+ standalone: false
47
50
  }]
48
51
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { autofocus: [{
49
52
  type: Input
50
53
  }] } });
51
54
 
52
- /**
53
- * Decorate HTML input for inputing and displaying currency. The input type must not be number and should be text only.
54
- * If the input type is number, the built-in validator will be fighting against this directive.
55
- */
56
- class CurrencyFormatterDirective {
57
- elementRef;
58
- el;
59
- constructor(elementRef) {
60
- this.elementRef = elementRef;
61
- this.el = this.elementRef.nativeElement;
62
- }
63
- ngOnInit() {
64
- this.el.value = CurrencyFunc.transformCurrency(this.el.value);
65
- }
66
- onFocus(value) {
67
- this.el.value = CurrencyFunc.parseCurrency(value); // opossite of transform
68
- }
69
- onBlur(value) {
70
- this.el.value = CurrencyFunc.transformCurrency(value);
71
- }
72
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CurrencyFormatterDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
73
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: CurrencyFormatterDirective, selector: "[currencyFormatter]", host: { listeners: { "focus": "onFocus($event.target.value)", "blur": "onBlur($event.target.value)" } }, ngImport: i0 });
74
- }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CurrencyFormatterDirective, decorators: [{
76
- type: Directive,
77
- args: [{ selector: '[currencyFormatter]' }]
78
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onFocus: [{
79
- type: HostListener,
80
- args: ['focus', ['$event.target.value']]
81
- }], onBlur: [{
82
- type: HostListener,
83
- args: ['blur', ['$event.target.value']]
84
- }] } });
85
-
86
55
  class DataComponentDirective {
87
56
  viewContainerRef;
88
57
  constructor(viewContainerRef) {
89
58
  this.viewContainerRef = viewContainerRef;
90
59
  }
91
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: DataComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
92
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: DataComponentDirective, selector: "[dataComponentHost]", ngImport: i0 });
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DataComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
61
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: DataComponentDirective, isStandalone: false, selector: "[dataComponentHost]", ngImport: i0 });
93
62
  }
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: DataComponentDirective, decorators: [{
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DataComponentDirective, decorators: [{
95
64
  type: Directive,
96
65
  args: [{
97
66
  selector: '[dataComponentHost]',
67
+ standalone: false
98
68
  }]
99
69
  }], ctorParameters: () => [{ type: i0.ViewContainerRef }] });
100
70
 
@@ -113,13 +83,14 @@ class ScrollIntoDirective {
113
83
  this.el.nativeElement.scrollIntoView();
114
84
  }
115
85
  }
116
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ScrollIntoDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
117
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: ScrollIntoDirective, selector: "[scrollInto]", inputs: { scrollInto: "scrollInto" }, ngImport: i0 });
86
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ScrollIntoDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
87
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: ScrollIntoDirective, isStandalone: false, selector: "[scrollInto]", inputs: { scrollInto: "scrollInto" }, ngImport: i0 });
118
88
  }
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ScrollIntoDirective, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ScrollIntoDirective, decorators: [{
120
90
  type: Directive,
121
91
  args: [{
122
- selector: '[scrollInto]'
92
+ selector: '[scrollInto]',
93
+ standalone: false
123
94
  }]
124
95
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { scrollInto: [{
125
96
  type: Input
@@ -130,19 +101,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
130
101
  *
131
102
  */
132
103
  class NmceDirectivesModule {
133
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
134
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, declarations: [AutofocusDirective,
135
- CurrencyFormatterDirective,
104
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NmceDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
105
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: NmceDirectivesModule, declarations: [AutofocusDirective,
136
106
  ScrollIntoDirective,
137
107
  DataComponentDirective], imports: [CommonModule,
138
108
  FormsModule], exports: [AutofocusDirective,
139
- CurrencyFormatterDirective,
140
109
  ScrollIntoDirective,
141
110
  DataComponentDirective] });
142
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, imports: [CommonModule,
111
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NmceDirectivesModule, imports: [CommonModule,
143
112
  FormsModule] });
144
113
  }
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, decorators: [{
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NmceDirectivesModule, decorators: [{
146
115
  type: NgModule,
147
116
  args: [{
148
117
  imports: [
@@ -151,26 +120,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
151
120
  ],
152
121
  declarations: [
153
122
  AutofocusDirective,
154
- CurrencyFormatterDirective,
155
123
  ScrollIntoDirective,
156
124
  DataComponentDirective,
157
125
  ],
158
126
  exports: [
159
127
  AutofocusDirective,
160
- CurrencyFormatterDirective,
161
128
  ScrollIntoDirective,
162
129
  DataComponentDirective,
163
130
  ]
164
131
  }]
165
132
  }] });
166
133
 
167
- /*
168
- * Public API Surface of nmce-directives
169
- */
170
-
171
134
  /**
172
135
  * Generated bundle index. Do not edit.
173
136
  */
174
137
 
175
- export { AutofocusDirective, CurrencyFormatterDirective, DataComponentDirective, NmceDirectivesModule, ScrollIntoDirective };
138
+ export { AutofocusDirective, DataComponentDirective, NmceDirectivesModule, ScrollIntoDirective };
176
139
  //# 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/currencyFormatter.directive.ts","../../../projects/nmce-directives/src/_directives/dataComponent.directive.ts","../../../projects/nmce-directives/src/_directives/scrollInto.directive.ts","../../../projects/nmce-directives/src/_directives/directives.module.ts","../../../projects/nmce-directives/src/public-api.ts","../../../projects/nmce-directives/src/nmce-directives.ts"],"sourcesContent":["import { AfterViewInit, Directive, DoCheck, ElementRef, Input } from '@angular/core';\n\n/**\n * Use as a parametered input parameter in html element.\n * When used inside a material dialog, this directive may be at odd against the autofocus config parameter of MatDialogConfig, \n * if the autofocus config is not false. Generally speaking, no need to use this directive in a component presented in a mateiral dialog.\n */\n@Directive({\n\tselector: '[autofocus]'\n})\nexport class AutofocusDirective implements AfterViewInit, DoCheck {\n\tprivate toFocus = false;\n\tprivate focused = false;\n\tprivate initialised = false;\n\tprivate everFocused = false;\n\tconstructor(private el: ElementRef) {\n\t\t//console.debug('autofocusDirective created.');\n\t}\n\n\tngAfterViewInit() {\n\t\tthis.initialised = true;\n\t\tthis.ngDoCheck();\n\t}\n\n\tngDoCheck() {\n\t\tif (!this.initialised) { return; }\n\t\tif (this.toFocus && !this.everFocused && !this.focused) {\n\t\t\tthis.el.nativeElement.focus();\n\t\t\tthis.focused = true;\n\t\t\tthis.everFocused = true;\n\t\t\tconsole.debug('focused now.');\n\t\t}\n\t}\n\n\t@Input() set autofocus(condition: boolean) {\n\t\tthis.toFocus = condition !== false;\n\t}\n}\n","import { Directive, ElementRef, HostListener, OnInit } from '@angular/core';\nimport { CurrencyFunc } from 'nmce-func';\n\n/**\n * Decorate HTML input for inputing and displaying currency. The input type must not be number and should be text only.\n * If the input type is number, the built-in validator will be fighting against this directive.\n */\n@Directive({ selector: '[currencyFormatter]' })//inspired by https://blog.ngconsultant.io/custom-input-formatting-with-simple-directives-for-angular-2-ec792082976\nexport class CurrencyFormatterDirective implements OnInit {\n\n\tprivate el: HTMLInputElement;\n\n\tconstructor(private elementRef: ElementRef) {\n\t\tthis.el = this.elementRef.nativeElement;\n\t}\n\n\tngOnInit() {\n\t\tthis.el.value = CurrencyFunc.transformCurrency(this.el.value);\n\t}\n\n\t@HostListener('focus', ['$event.target.value'])\n\tonFocus(value: string) {\n\t\tthis.el.value = CurrencyFunc.parseCurrency(value); // opossite of transform\n\t}\n\n\t@HostListener('blur', ['$event.target.value'])\n\tonBlur(value: string) {\n\t\tthis.el.value = CurrencyFunc.transformCurrency(value);\n\t}\n\n}\n\n","import { Directive, ViewContainerRef } from '@angular/core';\n\n@Directive({\n\tselector: '[dataComponentHost]',\n})\nexport class DataComponentDirective {\n\tconstructor(public viewContainerRef: ViewContainerRef) { }\n}\n","import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\n\n/**\n * Scroll to element attached. And the element may be an Angular Material component too.\n */\n@Directive({\n\tselector: '[scrollInto]'\n})\nexport class ScrollIntoDirective implements AfterViewInit {\n\tconstructor(private el: ElementRef) {\n\t\t//\tconsole.debug('ScrollIntoDirective created.');\n\t}\n\n\t@Input()\n\tscrollInto: boolean = false;\n\n\tngAfterViewInit() {\n\t\tif (this.scrollInto) {\n\t\t\tthis.el.nativeElement.scrollIntoView();\n\t\t}\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n\tAutofocusDirective, CurrencyFormatterDirective, DataComponentDirective, ScrollIntoDirective\n} from './index';\n\n\n\n/**\n * Contain components. Other feature/lazy modules that need to access custom html element of components like my-datetimepicker still need to import this module explicitly.\n *\n */\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t],\n\n\tdeclarations: [\n\t\tAutofocusDirective,\n\t\tCurrencyFormatterDirective,\n\t\tScrollIntoDirective,\n\t\tDataComponentDirective,\n\t],\n\n\n\texports: [\n\t\tAutofocusDirective,\n\t\tCurrencyFormatterDirective,\n\t\tScrollIntoDirective,\n\t\tDataComponentDirective,\n\t]\n})\nexport class NmceDirectivesModule { }\n","/*\n * Public API Surface of nmce-directives\n */\n\nexport * from './_directives/index';\nexport * from './_directives/directives.module';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;;AAIG;MAIU,kBAAkB,CAAA;AAKV,IAAA,EAAA,CAAA;IAJZ,OAAO,GAAG,KAAK,CAAC;IAChB,OAAO,GAAG,KAAK,CAAC;IAChB,WAAW,GAAG,KAAK,CAAC;IACpB,WAAW,GAAG,KAAK,CAAC;AAC5B,IAAA,WAAA,CAAoB,EAAc,EAAA;QAAd,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;;KAEjC;IAED,eAAe,GAAA;AACd,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,SAAS,EAAE,CAAC;KACjB;I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,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,iBAd/B,kBAAkB;YAClB,0BAA0B;YAC1B,mBAAmB;AACnB,YAAA,sBAAsB,aARtB,YAAY;AACZ,YAAA,WAAW,aAYX,kBAAkB;YAClB,0BAA0B;YAC1B,mBAAmB;YACnB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAGX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAnB/B,YAAY;YACZ,WAAW,CAAA,EAAA,CAAA,CAAA;;2FAkBA,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBArBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,WAAW;AACX,qBAAA;AAED,oBAAA,YAAY,EAAE;wBACb,kBAAkB;wBAClB,0BAA0B;wBAC1B,mBAAmB;wBACnB,sBAAsB;AACtB,qBAAA;AAGD,oBAAA,OAAO,EAAE;wBACR,kBAAkB;wBAClB,0BAA0B;wBAC1B,mBAAmB;wBACnB,sBAAsB;AACtB,qBAAA;AACD,iBAAA,CAAA;;;ACjCD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"nmce-directives.mjs","sources":["../../../projects/nmce-directives/src/_directives/autofocus.ts","../../../projects/nmce-directives/src/_directives/dataComponent.directive.ts","../../../projects/nmce-directives/src/_directives/scrollInto.directive.ts","../../../projects/nmce-directives/src/_directives/directives.module.ts","../../../projects/nmce-directives/src/nmce-directives.ts"],"sourcesContent":["import { AfterViewInit, Directive, DoCheck, 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 mateiral dialog.\r\n */\r\n@Directive({\r\n selector: '[autofocus]',\r\n standalone: false\r\n})\r\nexport class AutofocusDirective implements AfterViewInit, DoCheck {\r\n\tprivate toFocus = false;\r\n\tprivate focused = false;\r\n\tprivate initialized = false;\r\n\tprivate everFocused = false;\r\n\tconstructor(private el: ElementRef) {\r\n\t\t//console.debug('autofocusDirective created.');\r\n\t}\r\n\r\n\tngAfterViewInit() {\r\n\t\tthis.initialized = true;\r\n\t\tthis.ngDoCheck();\r\n\t}\r\n\r\n\tngDoCheck() {\r\n\t\tif (!this.initialized) { return; }\r\n\t\tif (this.toFocus && !this.everFocused && !this.focused) {\r\n\t\t\tthis.el.nativeElement.focus();\r\n\t\t\tthis.focused = true;\r\n\t\t\tthis.everFocused = true;\r\n\t\t\tconsole.debug('focused now.');\r\n\t\t}\r\n\t}\r\n\r\n\t@Input() \r\n\tget autofocus(){\r\n\t\treturn this.focused;\r\n\t}\r\n\tset autofocus(condition: boolean) {\r\n\t\tthis.toFocus = condition !== false;\r\n\t}\r\n}\r\n","import { Directive, ViewContainerRef } from '@angular/core';\r\n\r\n@Directive({\n selector: '[dataComponentHost]',\n standalone: false\n})\r\nexport class DataComponentDirective {\r\n\tconstructor(public viewContainerRef: ViewContainerRef) { }\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({\n selector: '[scrollInto]',\n standalone: false\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 { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport {\r\n\tAutofocusDirective, DataComponentDirective, ScrollIntoDirective\r\n} from './index';\r\n\r\n\r\n\r\n/**\r\n * Contain components. Other feature/lazy modules that need to access custom html element of components like my-datetimepicker still need to import this module explicitly.\r\n *\r\n */\r\n@NgModule({\r\n\timports: [\r\n\t\tCommonModule,\r\n\t\tFormsModule,\r\n\t],\r\n\r\n\tdeclarations: [\r\n\t\tAutofocusDirective,\r\n\t\tScrollIntoDirective,\r\n\t\tDataComponentDirective,\r\n\t],\r\n\r\n\r\n\texports: [\r\n\t\tAutofocusDirective,\r\n\t\tScrollIntoDirective,\r\n\t\tDataComponentDirective,\r\n\t]\r\n})\r\nexport class NmceDirectivesModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAEA;;;;AAIG;MAKU,kBAAkB,CAAA;AAKV,IAAA,EAAA;IAJZ,OAAO,GAAG,KAAK;IACf,OAAO,GAAG,KAAK;IACf,WAAW,GAAG,KAAK;IACnB,WAAW,GAAG,KAAK;AAC3B,IAAA,WAAA,CAAoB,EAAc,EAAA;QAAd,IAAE,CAAA,EAAA,GAAF,EAAE;;;IAItB,eAAe,GAAA;AACd,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI;QACvB,IAAI,CAAC,SAAS,EAAE;;IAGjB,SAAS,GAAA;AACR,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YAAE;;AACzB,QAAA,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;AACvD,YAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;AAC7B,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,YAAA,IAAI,CAAC,WAAW,GA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AAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAjB/B,YAAY;YACZ,WAAW,CAAA,EAAA,CAAA;;2FAgBA,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAnBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,WAAW;AACX,qBAAA;AAED,oBAAA,YAAY,EAAE;wBACb,kBAAkB;wBAClB,mBAAmB;wBACnB,sBAAsB;AACtB,qBAAA;AAGD,oBAAA,OAAO,EAAE;wBACR,kBAAkB;wBAClB,mBAAmB;wBACnB,sBAAsB;AACtB;AACD,iBAAA;;;AC/BD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "nmce-directives",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "author": {
5
5
  "name": "Z"
6
6
  },
7
7
  "description": "Common simple Angular directives used in business applications.",
8
8
  "license": "MIT",
9
9
  "repository": {
10
- "url": "https://github.com/zijianhuang/nmce"
10
+ "url": "git+https://github.com/zijianhuang/nmce.git"
11
11
  },
12
12
  "module": "fesm2022/nmce-directives.mjs",
13
13
  "typings": "index.d.ts",
@@ -17,8 +17,6 @@
17
17
  },
18
18
  ".": {
19
19
  "types": "./index.d.ts",
20
- "esm2022": "./esm2022/nmce-directives.mjs",
21
- "esm": "./esm2022/nmce-directives.mjs",
22
20
  "default": "./fesm2022/nmce-directives.mjs"
23
21
  }
24
22
  },
@@ -1,16 +0,0 @@
1
- import { ElementRef, OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Decorate HTML input for inputing and displaying currency. The input type must not be number and should be text only.
5
- * If the input type is number, the built-in validator will be fighting against this directive.
6
- */
7
- export declare class CurrencyFormatterDirective implements OnInit {
8
- private elementRef;
9
- private el;
10
- constructor(elementRef: ElementRef);
11
- ngOnInit(): void;
12
- onFocus(value: string): void;
13
- onBlur(value: string): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyFormatterDirective, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<CurrencyFormatterDirective, "[currencyFormatter]", never, {}, {}, never, never, false, never>;
16
- }
@@ -1,47 +0,0 @@
1
- import { Directive, Input } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Use as a parametered input parameter in html element.
5
- * When used inside a material dialog, this directive may be at odd against the autofocus config parameter of MatDialogConfig,
6
- * if the autofocus config is not false. Generally speaking, no need to use this directive in a component presented in a mateiral dialog.
7
- */
8
- export class AutofocusDirective {
9
- el;
10
- toFocus = false;
11
- focused = false;
12
- initialised = false;
13
- everFocused = false;
14
- constructor(el) {
15
- this.el = el;
16
- //console.debug('autofocusDirective created.');
17
- }
18
- ngAfterViewInit() {
19
- this.initialised = true;
20
- this.ngDoCheck();
21
- }
22
- ngDoCheck() {
23
- if (!this.initialised) {
24
- return;
25
- }
26
- if (this.toFocus && !this.everFocused && !this.focused) {
27
- this.el.nativeElement.focus();
28
- this.focused = true;
29
- this.everFocused = true;
30
- console.debug('focused now.');
31
- }
32
- }
33
- set autofocus(condition) {
34
- this.toFocus = condition !== false;
35
- }
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: AutofocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
37
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: AutofocusDirective, selector: "[autofocus]", inputs: { autofocus: "autofocus" }, ngImport: i0 });
38
- }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: AutofocusDirective, decorators: [{
40
- type: Directive,
41
- args: [{
42
- selector: '[autofocus]'
43
- }]
44
- }], ctorParameters: () => [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c } from 'nmce-func';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Decorate HTML input for inputing and displaying currency. The input type must not be number and should be text only.
6
- * If the input type is number, the built-in validator will be fighting against this directive.
7
- */
8
- export class CurrencyFormatterDirective {
9
- elementRef;
10
- el;
11
- constructor(elementRef) {
12
- this.elementRef = elementRef;
13
- this.el = this.elementRef.nativeElement;
14
- }
15
- ngOnInit() {
16
- this.el.value = CurrencyFunc.transformCurrency(this.el.value);
17
- }
18
- onFocus(value) {
19
- this.el.value = CurrencyFunc.parseCurrency(value); // opossite of transform
20
- }
21
- onBlur(value) {
22
- this.el.value = CurrencyFunc.transformCurrency(value);
23
- }
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CurrencyFormatterDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
25
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: CurrencyFormatterDirective, selector: "[currencyFormatter]", host: { listeners: { "focus": "onFocus($event.target.value)", "blur": "onBlur($event.target.value)" } }, ngImport: i0 });
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CurrencyFormatterDirective, decorators: [{
28
- type: Directive,
29
- args: [{ selector: '[currencyFormatter]' }]
30
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onFocus: [{
31
- type: HostListener,
32
- args: ['focus', ['$event.target.value']]
33
- }], onBlur: [{
34
- type: HostListener,
35
- args: ['blur', ['$event.target.value']]
36
- }] } });
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3lGb3JtYXR0ZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbm1jZS1kaXJlY3RpdmVzL3NyYy9fZGlyZWN0a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7XG5cdH1cblxuXHRuZ09uSW5pdCgpIHtcblx0XHR0aGlzLmVsLnZhbHVlID0gQ3VycmVuY3lGdW5jLnRyYW5zZm9ybUN1cnJlbmN5KHRoaXMuZWwudmFsdWUpO1xuXHR9XG5cblx0QEhvc3RMaXN0ZW5lcignZm9jdXMnLCBbJyRldmVudC50YXJnZXQudmFsdWUnXSlcblx0b25Gb2N1cyh2YWx1ZTogc3RyaW5nKSB7XG5cdFx0dGhpcy5lbC52YWx1ZSA9IEN1cnJlbmN5RnVuYy5wYXJzZUN1cnJlbmN5KHZhbHVlKTsgLy8gb3Bvc3NpdGUgb2YgdHJhbnNmb3JtXG5cdH1cblxuXHRASG9zdExpc3RlbmVyKCdibHVyJywgWyckZXZlbnQudGFyZ2V0LnZhbHVlJ10pXG5cdG9uQmx1cih2YWx1ZTogc3RyaW5nKSB7XG5cdFx0dGhpcy5lbC52YWx1ZSA9IEN1cnJlbmN5RnVuYy50cmFuc2Zvcm1DdXJyZW5jeSh2YWx1ZSk7XG5cdH1cblxufVxuXG4iXX0=
@@ -1,17 +0,0 @@
1
- import { Directive } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class DataComponentDirective {
4
- viewContainerRef;
5
- constructor(viewContainerRef) {
6
- this.viewContainerRef = viewContainerRef;
7
- }
8
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: DataComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
9
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: DataComponentDirective, selector: "[dataComponentHost]", ngImport: i0 });
10
- }
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: DataComponentDirective, decorators: [{
12
- type: Directive,
13
- args: [{
14
- selector: '[dataComponentHost]',
15
- }]
16
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }] });
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YUNvbXBvbmVudC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9ubWNlLWRpcmVjdGl2ZXMvc3JjL19kaXJlY3RpdmVzL2RhdGFDb21wb25lbnQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQW9CLE1BQU0sZUFBZSxDQUFDOztBQUs1RCxNQUFNLE9BQU8sc0JBQXNCO0lBQ2Y7SUFBbkIsWUFBbUIsZ0JBQWtDO1FBQWxDLHFCQUFnQixHQUFoQixnQkFBZ0IsQ0FBa0I7SUFBSSxDQUFDO3VHQUQ5QyxzQkFBc0I7MkZBQXRCLHNCQUFzQjs7MkZBQXRCLHNCQUFzQjtrQkFIbEMsU0FBUzttQkFBQztvQkFDVixRQUFRLEVBQUUscUJBQXFCO2lCQUMvQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpcmVjdGl2ZSwgVmlld0NvbnRhaW5lclJlZiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ARGlyZWN0aXZlKHtcblx0c2VsZWN0b3I6ICdbZGF0YUNvbXBvbmVudEhvc3RdJyxcbn0pXG5leHBvcnQgY2xhc3MgRGF0YUNvbXBvbmVudERpcmVjdGl2ZSB7XG5cdGNvbnN0cnVjdG9yKHB1YmxpYyB2aWV3Q29udGFpbmVyUmVmOiBWaWV3Q29udGFpbmVyUmVmKSB7IH1cbn1cbiJdfQ==
@@ -1,44 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { FormsModule } from '@angular/forms';
4
- import { AutofocusDirective, CurrencyFormatterDirective, DataComponentDirective, ScrollIntoDirective } from './index';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Contain components. Other feature/lazy modules that need to access custom html element of components like my-datetimepicker still need to import this module explicitly.
8
- *
9
- */
10
- export class NmceDirectivesModule {
11
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, declarations: [AutofocusDirective,
13
- CurrencyFormatterDirective,
14
- ScrollIntoDirective,
15
- DataComponentDirective], imports: [CommonModule,
16
- FormsModule], exports: [AutofocusDirective,
17
- CurrencyFormatterDirective,
18
- ScrollIntoDirective,
19
- DataComponentDirective] });
20
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, imports: [CommonModule,
21
- FormsModule] });
22
- }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: NmceDirectivesModule, decorators: [{
24
- type: NgModule,
25
- args: [{
26
- imports: [
27
- CommonModule,
28
- FormsModule,
29
- ],
30
- declarations: [
31
- AutofocusDirective,
32
- CurrencyFormatterDirective,
33
- ScrollIntoDirective,
34
- DataComponentDirective,
35
- ],
36
- exports: [
37
- AutofocusDirective,
38
- CurrencyFormatterDirective,
39
- ScrollIntoDirective,
40
- DataComponentDirective,
41
- ]
42
- }]
43
- }] });
44
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aXZlcy5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9ubWNlLWRpcmVjdGl2ZXMvc3JjL19kaXJlY3RpdmVzL2RpcmVjdGl2ZXMubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQU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tc01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2Zvcm1zJztcbmltcG9ydCB7XG5cdEF1dG9mb2N1c0RpcmVjdGl2ZSwgQ3VycmVuY3lGb3JtYXR0ZXJEaXJlY3RpdmUsIERhdGFDb21wb25lbnREaXJlY3RpdmUsIFNjcm9sbEludG9EaXJlY3RpdmVcbn0gZnJvbSAnLi9pbmRleCc7XG5cblxuXG4vKipcbiAqIENvbnRhaW4gY29tcG9uZW50cy4gT3RoZXIgZmVhdHVyZS9sYXp5IG1vZHVsZXMgdGhhdCBuZWVkIHRvIGFjY2VzcyBjdXN0b20gaHRtbCBlbGVtZW50IG9mIGNvbXBvbmVudHMgbGlrZSBteS1kYXRldGltZXBpY2tlciBzdGlsbCBuZWVkIHRvIGltcG9ydCB0aGlzIG1vZHVsZSBleHBsaWNpdGx5LlxuICpcbiAqL1xuQE5nTW9kdWxlKHtcblx0aW1wb3J0czogW1xuXHRcdENvbW1vbk1vZHVsZSxcblx0XHRGb3Jtc01vZHVsZSxcblx0XSxcblxuXHRkZWNsYXJhdGlvbnM6IFtcblx0XHRBdXRvZm9jdXNEaXJlY3RpdmUsXG5cdFx0Q3VycmVuY3lGb3JtYXR0ZXJEaXJlY3RpdmUsXG5cdFx0U2Nyb2xsSW50b0RpcmVjdGl2ZSxcblx0XHREYXRhQ29tcG9uZW50RGlyZWN0aXZlLFxuXHRdLFxuXG5cblx0ZXhwb3J0czogW1xuXHRcdEF1dG9mb2N1c0RpcmVjdGl2ZSxcblx0XHRDdXJyZW5jeUZvcm1hdHRlckRpcmVjdGl2ZSxcblx0XHRTY3JvbGxJbnRvRGlyZWN0aXZlLFxuXHRcdERhdGFDb21wb25lbnREaXJlY3RpdmUsXG5cdF1cbn0pXG5leHBvcnQgY2xhc3MgTm1jZURpcmVjdGl2ZXNNb2R1bGUgeyB9XG4iXX0=
@@ -1,5 +0,0 @@
1
- export * from './autofocus';
2
- export * from './currencyFormatter.directive';
3
- export * from './dataComponent.directive';
4
- export * from './scrollInto.directive';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9ubWNlLWRpcmVjdGl2ZXMvc3JjL19kaXJlY3RpdmVzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLHdCQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9hdXRvZm9jdXMnO1xuZXhwb3J0ICogZnJvbSAnLi9jdXJyZW5jeUZvcm1hdHRlci5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9kYXRhQ29tcG9uZW50LmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3Njcm9sbEludG8uZGlyZWN0aXZlJztcbiJdfQ==
@@ -1,29 +0,0 @@
1
- import { Directive, Input } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Scroll to element attached. And the element may be an Angular Material component too.
5
- */
6
- export class ScrollIntoDirective {
7
- el;
8
- constructor(el) {
9
- this.el = el;
10
- // console.debug('ScrollIntoDirective created.');
11
- }
12
- scrollInto = false;
13
- ngAfterViewInit() {
14
- if (this.scrollInto) {
15
- this.el.nativeElement.scrollIntoView();
16
- }
17
- }
18
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ScrollIntoDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
19
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: ScrollIntoDirective, selector: "[scrollInto]", inputs: { scrollInto: "scrollInto" }, ngImport: i0 });
20
- }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ScrollIntoDirective, decorators: [{
22
- type: Directive,
23
- args: [{
24
- selector: '[scrollInto]'
25
- }]
26
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { scrollInto: [{
27
- type: Input
28
- }] } });
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsSW50by5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9ubWNlLWRpcmVjdGl2ZXMvc3JjL19kaXJlY3RpdmVzL3Njcm9sbEludG8uZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBaUIsU0FBUyxFQUFjLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFFNUU7O0dBRUc7QUFJSCxNQUFNLE9BQU8sbUJBQW1CO0lBQ1g7SUFBcEIsWUFBb0IsRUFBYztRQUFkLE9BQUUsR0FBRixFQUFFLENBQVk7UUFDakMsaURBQWlEO0lBQ2xELENBQUM7SUFHRCxVQUFVLEdBQVksS0FBSyxDQUFDO0lBRTVCLGVBQWU7UUFDZCxJQUFJLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztZQUNyQixJQUFJLENBQUMsRUFBRSxDQUFDLGFBQWEsQ0FBQyxjQUFjLEVBQUUsQ0FBQztRQUN4QyxDQUFDO0lBQ0YsQ0FBQzt1R0FaVyxtQkFBbUI7MkZBQW5CLG1CQUFtQjs7MkZBQW5CLG1CQUFtQjtrQkFIL0IsU0FBUzttQkFBQztvQkFDVixRQUFRLEVBQUUsY0FBYztpQkFDeEI7K0VBT0EsVUFBVTtzQkFEVCxLQUFLIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQWZ0ZXJWaWV3SW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dXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -1,6 +0,0 @@
1
- /*
2
- * Public API Surface of nmce-directives
3
- */
4
- export * from './_directives/index';
5
- export * from './_directives/directives.module';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25tY2UtZGlyZWN0aXZlcy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxpQ0FBaUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbm1jZS1kaXJlY3RpdmVzXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9fZGlyZWN0aXZlcy9pbmRleCc7XG5leHBvcnQgKiBmcm9tICcuL19kaXJlY3RpdmVzL2RpcmVjdGl2ZXMubW9kdWxlJztcblxuIl19