ngx-utils-lite 0.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/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # NgxUtilsLite
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+
9
+ ```bash
10
+ ng generate component component-name
11
+ ```
12
+
13
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
+
15
+ ```bash
16
+ ng generate --help
17
+ ```
18
+
19
+ ## Building
20
+
21
+ To build the library, run:
22
+
23
+ ```bash
24
+ ng build ngx-utils-lite
25
+ ```
26
+
27
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
+
29
+ ### Publishing the Library
30
+
31
+ Once the project is built, you can publish your library by following these steps:
32
+
33
+ 1. Navigate to the `dist` directory:
34
+ ```bash
35
+ cd dist/ngx-utils-lite
36
+ ```
37
+
38
+ 2. Run the `npm publish` command to publish your library to the npm registry:
39
+ ```bash
40
+ npm publish
41
+ ```
42
+
43
+ ## Running unit tests
44
+
45
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
+
47
+ ```bash
48
+ ng test
49
+ ```
50
+
51
+ ## Running end-to-end tests
52
+
53
+ For end-to-end (e2e) testing, run:
54
+
55
+ ```bash
56
+ ng e2e
57
+ ```
58
+
59
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
60
+
61
+ ## Additional Resources
62
+
63
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -0,0 +1,143 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Input, Directive, EventEmitter, HostListener, Output, HostBinding, NgModule } from '@angular/core';
3
+
4
+ class AutoFocusDirective {
5
+ el;
6
+ ngxAutoFocus = true;
7
+ delay = 0;
8
+ constructor(el) {
9
+ this.el = el;
10
+ }
11
+ ngOnInit() { if (this.ngxAutoFocus)
12
+ setTimeout(() => this.el.nativeElement.focus(), this.delay); }
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
14
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: AutoFocusDirective, isStandalone: true, selector: "[ngxAutoFocus]", inputs: { ngxAutoFocus: "ngxAutoFocus", delay: "delay" }, ngImport: i0 });
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AutoFocusDirective, decorators: [{
17
+ type: Directive,
18
+ args: [{ selector: '[ngxAutoFocus]' }]
19
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ngxAutoFocus: [{
20
+ type: Input
21
+ }], delay: [{
22
+ type: Input
23
+ }] } });
24
+
25
+ class ClickOutsideDirective {
26
+ elementRef;
27
+ ngxClickOutside = new EventEmitter();
28
+ exclude = [];
29
+ constructor(elementRef) {
30
+ this.elementRef = elementRef;
31
+ }
32
+ onDocumentClick(event) {
33
+ const target = event.target;
34
+ const clickedInside = this.elementRef.nativeElement.contains(target);
35
+ const clickedExcluded = this.exclude?.some(el => el.contains(target));
36
+ if (!clickedInside && !clickedExcluded)
37
+ this.ngxClickOutside.emit(event);
38
+ }
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
40
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: ClickOutsideDirective, isStandalone: true, selector: "[ngxClickOutside]", inputs: { exclude: "exclude" }, outputs: { ngxClickOutside: "ngxClickOutside" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0 });
41
+ }
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClickOutsideDirective, decorators: [{
43
+ type: Directive,
44
+ args: [{ selector: '[ngxClickOutside]' }]
45
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ngxClickOutside: [{
46
+ type: Output
47
+ }], exclude: [{
48
+ type: Input
49
+ }], onDocumentClick: [{
50
+ type: HostListener,
51
+ args: ['document:click', ['$event']]
52
+ }] } });
53
+
54
+ class CopyToClipboardDirective {
55
+ ngxCopy = '';
56
+ copyText() { if (!this.ngxCopy)
57
+ return; navigator.clipboard.writeText(this.ngxCopy); }
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CopyToClipboardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
59
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: CopyToClipboardDirective, isStandalone: true, selector: "[ngxCopy]", inputs: { ngxCopy: "ngxCopy" }, host: { listeners: { "click": "copyText()" } }, ngImport: i0 });
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CopyToClipboardDirective, decorators: [{
62
+ type: Directive,
63
+ args: [{ selector: '[ngxCopy]' }]
64
+ }], propDecorators: { ngxCopy: [{
65
+ type: Input
66
+ }], copyText: [{
67
+ type: HostListener,
68
+ args: ['click']
69
+ }] } });
70
+
71
+ class EnterSubmitDirective {
72
+ ngxEnterSubmit = new EventEmitter();
73
+ onEnter(event) { event.preventDefault(); this.ngxEnterSubmit.emit(); }
74
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EnterSubmitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
75
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: EnterSubmitDirective, isStandalone: true, selector: "[ngxEnterSubmit]", outputs: { ngxEnterSubmit: "ngxEnterSubmit" }, host: { listeners: { "keydown.enter": "onEnter($event)" } }, ngImport: i0 });
76
+ }
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EnterSubmitDirective, decorators: [{
78
+ type: Directive,
79
+ args: [{ selector: '[ngxEnterSubmit]' }]
80
+ }], propDecorators: { ngxEnterSubmit: [{
81
+ type: Output
82
+ }], onEnter: [{
83
+ type: HostListener,
84
+ args: ['keydown.enter', ['$event']]
85
+ }] } });
86
+
87
+ class LoadingButtonDirective {
88
+ set ngxLoading(promise) { if (!promise)
89
+ return; this.isLoading = true; promise.finally(() => this.isLoading = false); }
90
+ get isDisabled() { return this.isLoading; }
91
+ isLoading = false;
92
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LoadingButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
93
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: LoadingButtonDirective, isStandalone: true, selector: "[ngxLoading]", inputs: { ngxLoading: "ngxLoading" }, host: { properties: { "disabled": "this.isDisabled" } }, ngImport: i0 });
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LoadingButtonDirective, decorators: [{
96
+ type: Directive,
97
+ args: [{ selector: '[ngxLoading]' }]
98
+ }], propDecorators: { ngxLoading: [{
99
+ type: Input
100
+ }], isDisabled: [{
101
+ type: HostBinding,
102
+ args: ['disabled']
103
+ }] } });
104
+
105
+ class NgxUtilsLiteModule {
106
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NgxUtilsLiteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
107
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: NgxUtilsLiteModule, imports: [AutoFocusDirective,
108
+ ClickOutsideDirective,
109
+ CopyToClipboardDirective,
110
+ EnterSubmitDirective,
111
+ LoadingButtonDirective], exports: [AutoFocusDirective,
112
+ ClickOutsideDirective,
113
+ CopyToClipboardDirective,
114
+ EnterSubmitDirective,
115
+ LoadingButtonDirective] });
116
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NgxUtilsLiteModule });
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NgxUtilsLiteModule, decorators: [{
119
+ type: NgModule,
120
+ args: [{
121
+ imports: [
122
+ AutoFocusDirective,
123
+ ClickOutsideDirective,
124
+ CopyToClipboardDirective,
125
+ EnterSubmitDirective,
126
+ LoadingButtonDirective
127
+ ],
128
+ exports: [
129
+ AutoFocusDirective,
130
+ ClickOutsideDirective,
131
+ CopyToClipboardDirective,
132
+ EnterSubmitDirective,
133
+ LoadingButtonDirective
134
+ ]
135
+ }]
136
+ }] });
137
+
138
+ /**
139
+ * Generated bundle index. Do not edit.
140
+ */
141
+
142
+ export { AutoFocusDirective, ClickOutsideDirective, CopyToClipboardDirective, EnterSubmitDirective, LoadingButtonDirective, NgxUtilsLiteModule };
143
+ //# sourceMappingURL=ngx-utils-lite.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-utils-lite.mjs","sources":["../../../projects/ngx-utils-lite/src/lib/auto-focus.directive.ts","../../../projects/ngx-utils-lite/src/lib/click-outside.directive.ts","../../../projects/ngx-utils-lite/src/lib/copy-to-clipboard.directive.ts","../../../projects/ngx-utils-lite/src/lib/enter-submit.directive.ts","../../../projects/ngx-utils-lite/src/lib/loading-button.directive.ts","../../../projects/ngx-utils-lite/src/lib/ngx-utils-lite.module.ts","../../../projects/ngx-utils-lite/src/ngx-utils-lite.ts"],"sourcesContent":["import { Directive, ElementRef, Input, OnInit } from '@angular/core';\n@Directive({ selector: '[ngxAutoFocus]' })\nexport class AutoFocusDirective implements OnInit {\n @Input() ngxAutoFocus = true;\n @Input() delay = 0;\n constructor(private el: ElementRef) {}\n ngOnInit() { if (this.ngxAutoFocus) setTimeout(() => this.el.nativeElement.focus(), this.delay); }\n}","import { Directive, ElementRef, EventEmitter, Output, HostListener, Input } from '@angular/core';\n@Directive({ selector: '[ngxClickOutside]' })\nexport class ClickOutsideDirective {\n @Output() ngxClickOutside = new EventEmitter<Event>();\n @Input() exclude: HTMLElement[] = [];\n constructor(private elementRef: ElementRef) {}\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: Event) {\n const target = event.target as HTMLElement;\n const clickedInside = this.elementRef.nativeElement.contains(target);\n const clickedExcluded = this.exclude?.some(el => el.contains(target));\n if (!clickedInside && !clickedExcluded) this.ngxClickOutside.emit(event);\n }\n}","import { Directive, Input, HostListener } from '@angular/core';\n@Directive({ selector: '[ngxCopy]' })\nexport class CopyToClipboardDirective {\n @Input() ngxCopy = '';\n @HostListener('click') copyText() { if (!this.ngxCopy) return; navigator.clipboard.writeText(this.ngxCopy); }\n}","import { Directive, HostListener, Output, EventEmitter } from '@angular/core';\n@Directive({ selector: '[ngxEnterSubmit]' })\nexport class EnterSubmitDirective {\n @Output() ngxEnterSubmit = new EventEmitter<void>();\n @HostListener('keydown.enter', ['$event']) onEnter(event: KeyboardEvent) { event.preventDefault(); this.ngxEnterSubmit.emit(); }\n}","import { Directive, Input, HostBinding } from '@angular/core';\n@Directive({ selector: '[ngxLoading]' })\nexport class LoadingButtonDirective {\n @Input() set ngxLoading(promise: Promise<any>) { if (!promise) return; this.isLoading = true; promise.finally(() => this.isLoading = false); }\n @HostBinding('disabled') get isDisabled() { return this.isLoading; }\n isLoading = false;\n}","import { NgModule } from '@angular/core';\nimport { AutoFocusDirective } from './auto-focus.directive';\nimport { ClickOutsideDirective } from './click-outside.directive';\nimport { CopyToClipboardDirective } from './copy-to-clipboard.directive';\nimport { EnterSubmitDirective } from './enter-submit.directive';\nimport { LoadingButtonDirective } from './loading-button.directive';\n\n@NgModule({\n imports: [\n AutoFocusDirective,\n ClickOutsideDirective,\n CopyToClipboardDirective,\n EnterSubmitDirective,\n LoadingButtonDirective\n ],\n exports: [\n AutoFocusDirective,\n ClickOutsideDirective,\n CopyToClipboardDirective,\n EnterSubmitDirective,\n LoadingButtonDirective\n ]\n})\nexport class NgxUtilsLiteModule {}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAEa,kBAAkB,CAAA;AAGT,IAAA,EAAA;IAFX,YAAY,GAAG,IAAI;IACnB,KAAK,GAAG,CAAC;AAClB,IAAA,WAAA,CAAoB,EAAc,EAAA;QAAd,IAAA,CAAA,EAAE,GAAF,EAAE;IAAe;AACrC,IAAA,QAAQ,GAAA,EAAK,IAAI,IAAI,CAAC,YAAY;AAAE,QAAA,UAAU,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;wGAJtF,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,gBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;mBAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE;+EAE9B,YAAY,EAAA,CAAA;sBAApB;gBACQ,KAAK,EAAA,CAAA;sBAAb;;;MCFU,qBAAqB,CAA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A,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAd3B,kBAAkB;YAClB,qBAAqB;YACrB,wBAAwB;YACxB,oBAAoB;AACpB,YAAA,sBAAsB,aAGtB,kBAAkB;YAClB,qBAAqB;YACrB,wBAAwB;YACxB,oBAAoB;YACpB,sBAAsB,CAAA,EAAA,CAAA;yGAGb,kBAAkB,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAhB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,qBAAqB;wBACrB,wBAAwB;wBACxB,oBAAoB;wBACpB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,qBAAqB;wBACrB,wBAAwB;wBACxB,oBAAoB;wBACpB;AACD;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="ngx-utils-lite" />
5
+ export * from './public-api';
@@ -0,0 +1,11 @@
1
+ import { ElementRef, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AutoFocusDirective implements OnInit {
4
+ private el;
5
+ ngxAutoFocus: boolean;
6
+ delay: number;
7
+ constructor(el: ElementRef);
8
+ ngOnInit(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutoFocusDirective, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AutoFocusDirective, "[ngxAutoFocus]", never, { "ngxAutoFocus": { "alias": "ngxAutoFocus"; "required": false; }; "delay": { "alias": "delay"; "required": false; }; }, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ClickOutsideDirective {
4
+ private elementRef;
5
+ ngxClickOutside: EventEmitter<Event>;
6
+ exclude: HTMLElement[];
7
+ constructor(elementRef: ElementRef);
8
+ onDocumentClick(event: Event): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClickOutsideDirective, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[ngxClickOutside]", never, { "exclude": { "alias": "exclude"; "required": false; }; }, { "ngxClickOutside": "ngxClickOutside"; }, never, never, true, never>;
11
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CopyToClipboardDirective {
3
+ ngxCopy: string;
4
+ copyText(): void;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CopyToClipboardDirective, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CopyToClipboardDirective, "[ngxCopy]", never, { "ngxCopy": { "alias": "ngxCopy"; "required": false; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EnterSubmitDirective {
4
+ ngxEnterSubmit: EventEmitter<void>;
5
+ onEnter(event: KeyboardEvent): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnterSubmitDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EnterSubmitDirective, "[ngxEnterSubmit]", never, {}, { "ngxEnterSubmit": "ngxEnterSubmit"; }, never, never, true, never>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LoadingButtonDirective {
3
+ set ngxLoading(promise: Promise<any>);
4
+ get isDisabled(): boolean;
5
+ isLoading: boolean;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingButtonDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LoadingButtonDirective, "[ngxLoading]", never, { "ngxLoading": { "alias": "ngxLoading"; "required": false; }; }, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./auto-focus.directive";
3
+ import * as i2 from "./click-outside.directive";
4
+ import * as i3 from "./copy-to-clipboard.directive";
5
+ import * as i4 from "./enter-submit.directive";
6
+ import * as i5 from "./loading-button.directive";
7
+ export declare class NgxUtilsLiteModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxUtilsLiteModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxUtilsLiteModule, never, [typeof i1.AutoFocusDirective, typeof i2.ClickOutsideDirective, typeof i3.CopyToClipboardDirective, typeof i4.EnterSubmitDirective, typeof i5.LoadingButtonDirective], [typeof i1.AutoFocusDirective, typeof i2.ClickOutsideDirective, typeof i3.CopyToClipboardDirective, typeof i4.EnterSubmitDirective, typeof i5.LoadingButtonDirective]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxUtilsLiteModule>;
11
+ }
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "ngx-utils-lite",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^19.2.0",
6
+ "@angular/core": "^19.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/ngx-utils-lite.mjs",
13
+ "typings": "index.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "default": "./fesm2022/ngx-utils-lite.mjs"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,6 @@
1
+ export * from './lib/auto-focus.directive';
2
+ export * from './lib/click-outside.directive';
3
+ export * from './lib//copy-to-clipboard.directive';
4
+ export * from './lib/enter-submit.directive';
5
+ export * from './lib/loading-button.directive';
6
+ export * from './lib/ngx-utils-lite.module';