ngx-utils-lite 0.0.2 → 0.0.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.
|
@@ -15,7 +15,7 @@ class AutoFocusDirective {
|
|
|
15
15
|
}
|
|
16
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
17
17
|
type: Directive,
|
|
18
|
-
args: [{ selector: '[ngxAutoFocus]' }]
|
|
18
|
+
args: [{ selector: '[ngxAutoFocus]', standalone: true }]
|
|
19
19
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ngxAutoFocus: [{
|
|
20
20
|
type: Input
|
|
21
21
|
}], delay: [{
|
|
@@ -60,7 +60,7 @@ class CopyToClipboardDirective {
|
|
|
60
60
|
}
|
|
61
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CopyToClipboardDirective, decorators: [{
|
|
62
62
|
type: Directive,
|
|
63
|
-
args: [{ selector: '[ngxCopy]' }]
|
|
63
|
+
args: [{ selector: '[ngxCopy]', standalone: true }]
|
|
64
64
|
}], propDecorators: { ngxCopy: [{
|
|
65
65
|
type: Input
|
|
66
66
|
}], copyText: [{
|
|
@@ -76,7 +76,7 @@ class EnterSubmitDirective {
|
|
|
76
76
|
}
|
|
77
77
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EnterSubmitDirective, decorators: [{
|
|
78
78
|
type: Directive,
|
|
79
|
-
args: [{ selector: '[ngxEnterSubmit]' }]
|
|
79
|
+
args: [{ selector: '[ngxEnterSubmit]', standalone: true }]
|
|
80
80
|
}], propDecorators: { ngxEnterSubmit: [{
|
|
81
81
|
type: Output
|
|
82
82
|
}], onEnter: [{
|
|
@@ -94,7 +94,7 @@ class LoadingButtonDirective {
|
|
|
94
94
|
}
|
|
95
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LoadingButtonDirective, decorators: [{
|
|
96
96
|
type: Directive,
|
|
97
|
-
args: [{ selector: '[ngxLoading]' }]
|
|
97
|
+
args: [{ selector: '[ngxLoading]', standalone: true }]
|
|
98
98
|
}], propDecorators: { ngxLoading: [{
|
|
99
99
|
type: Input
|
|
100
100
|
}], isDisabled: [{
|
|
@@ -1 +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/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}","/**\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;
|
|
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/ngx-utils-lite.ts"],"sourcesContent":["import { Directive, ElementRef, Input, OnInit } from '@angular/core';\n@Directive({ selector: '[ngxAutoFocus]', standalone: true })\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]', standalone: true })\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]', standalone: true })\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]', standalone: true })\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}","/**\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;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE;+EAEhD,YAAY,EAAA,CAAA;sBAApB;gBACQ,KAAK,EAAA,CAAA;sBAAb;;;MCFU,qBAAqB,CAAA;AAGZ,IAAA,UAAA;AAFV,IAAA,eAAe,G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|
|
1
1
|
export * from './lib/auto-focus.directive';
|
|
2
2
|
export * from './lib/click-outside.directive';
|
|
3
|
-
export * from './lib
|
|
3
|
+
export * from './lib/copy-to-clipboard.directive';
|
|
4
4
|
export * from './lib/enter-submit.directive';
|
|
5
5
|
export * from './lib/loading-button.directive';
|