turbogui-angular 19.0.1 → 19.1.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/fesm2022/turbogui-angular.mjs +49 -4
- package/fesm2022/turbogui-angular.mjs.map +1 -1
- package/main/model/modules/turbogui-angular.module.d.ts +6 -5
- package/main/model/modules/turbogui-angular.module.d.ts.map +1 -1
- package/main/view/directives/ElementClickOutsideDirective.d.ts +20 -0
- package/main/view/directives/ElementClickOutsideDirective.d.ts.map +1 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/public_api.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Output, Directive,
|
|
2
|
+
import { EventEmitter, HostListener, Output, Directive, NgModule, inject, Injectable, Component, Inject, HostBinding, Input } from '@angular/core';
|
|
3
3
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
4
4
|
import { ArrayUtils, NumericUtils, HTTPManager, StringUtils, HTTPManagerGetRequest, HTTPManagerPostRequest, BrowserManager, ConversionUtils } from 'turbocommons-ts';
|
|
5
5
|
import * as i1 from '@angular/material/dialog';
|
|
@@ -24,6 +24,47 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
24
24
|
import * as i5 from '@angular/forms';
|
|
25
25
|
import { FormsModule, Validators } from '@angular/forms';
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
29
|
+
*
|
|
30
|
+
* Website : -> http://www.turbogui.org
|
|
31
|
+
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
|
|
32
|
+
* License Url : -> http://www.apache.org/licenses/LICENSE-2.0
|
|
33
|
+
* CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
|
|
34
|
+
*/
|
|
35
|
+
/** This directive is used to trigger an event when the user clicks outside of an element */
|
|
36
|
+
/**
|
|
37
|
+
* This directive is used to execute an action when the user clicks outside of an element.
|
|
38
|
+
* If we set the elementClickOutside tag to the html element and set the onClickOutside event to a function: <element elementClickOutside (onClickOutside)="onClickedOutside()" ...,
|
|
39
|
+
* this function will be executed when the user clicks outside of the element.
|
|
40
|
+
*/
|
|
41
|
+
class ElementClickOutsideDirective {
|
|
42
|
+
constructor(elementRef) {
|
|
43
|
+
this.elementRef = elementRef;
|
|
44
|
+
this.onClickOutside = new EventEmitter();
|
|
45
|
+
}
|
|
46
|
+
onClick(targetElement) {
|
|
47
|
+
const clickedInside = this.elementRef.nativeElement.contains(targetElement);
|
|
48
|
+
if (!clickedInside) {
|
|
49
|
+
this.onClickOutside.emit();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ElementClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
53
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: ElementClickOutsideDirective, isStandalone: false, selector: "[elementClickOutside]", outputs: { onClickOutside: "onClickOutside" }, host: { listeners: { "document:click": "onClick($event.target)" } }, ngImport: i0 }); }
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ElementClickOutsideDirective, decorators: [{
|
|
56
|
+
type: Directive,
|
|
57
|
+
args: [{
|
|
58
|
+
selector: '[elementClickOutside]',
|
|
59
|
+
standalone: false
|
|
60
|
+
}]
|
|
61
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onClickOutside: [{
|
|
62
|
+
type: Output
|
|
63
|
+
}], onClick: [{
|
|
64
|
+
type: HostListener,
|
|
65
|
+
args: ['document:click', ['$event.target']]
|
|
66
|
+
}] } });
|
|
67
|
+
|
|
27
68
|
/**
|
|
28
69
|
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
29
70
|
*
|
|
@@ -195,10 +236,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
195
236
|
*/
|
|
196
237
|
class TurboGuiAngularModule {
|
|
197
238
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TurboGuiAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
198
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: TurboGuiAngularModule, declarations: [
|
|
239
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: TurboGuiAngularModule, declarations: [ElementClickOutsideDirective,
|
|
240
|
+
ElementCreatedDirective,
|
|
199
241
|
ElementDestroyedDirective,
|
|
200
242
|
AutoFocusOnDisplayDirective,
|
|
201
|
-
AutoSelectTextOnFocusDirective], exports: [
|
|
243
|
+
AutoSelectTextOnFocusDirective], exports: [ElementClickOutsideDirective,
|
|
244
|
+
ElementCreatedDirective,
|
|
202
245
|
ElementDestroyedDirective,
|
|
203
246
|
AutoFocusOnDisplayDirective,
|
|
204
247
|
AutoSelectTextOnFocusDirective] }); }
|
|
@@ -209,6 +252,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
209
252
|
args: [{
|
|
210
253
|
imports: [],
|
|
211
254
|
declarations: [
|
|
255
|
+
ElementClickOutsideDirective,
|
|
212
256
|
ElementCreatedDirective,
|
|
213
257
|
ElementDestroyedDirective,
|
|
214
258
|
AutoFocusOnDisplayDirective,
|
|
@@ -216,6 +260,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
216
260
|
],
|
|
217
261
|
providers: [],
|
|
218
262
|
exports: [
|
|
263
|
+
ElementClickOutsideDirective,
|
|
219
264
|
ElementCreatedDirective,
|
|
220
265
|
ElementDestroyedDirective,
|
|
221
266
|
AutoFocusOnDisplayDirective,
|
|
@@ -2940,5 +2985,5 @@ class ValidatorsPlus extends Validators {
|
|
|
2940
2985
|
* Generated bundle index. Do not edit.
|
|
2941
2986
|
*/
|
|
2942
2987
|
|
|
2943
|
-
export { AutoFocusOnDisplayDirective, AutoSelectTextOnFocusDirective, BrowserService, BusyStateBaseComponent, ButtonContainerComponent, ButtonImageComponent, DelayedMethodCallManager, DialogBaseComponent, DialogDateSelectionComponent, DialogErrorComponent, DialogMultipleOptionComponent, DialogService, DialogSingleInputComponent, DialogSingleOptionComponent, DialogSingleSelectionListComponent, DialogTwoOptionComponent, ElementCreatedDirective, ElementDestroyedDirective, FadeAnimationClass, GUINotification, GlobalErrorService, HTTPService, HTTPServiceGetRequest, HTTPServicePostRequest, LocalesBaseService, NotificationService, RouterBaseService, SingletoneStrictClass, TurboApiCallerService, TurboGuiAngularModule, ValidatorsPlus, View, ViewService };
|
|
2988
|
+
export { AutoFocusOnDisplayDirective, AutoSelectTextOnFocusDirective, BrowserService, BusyStateBaseComponent, ButtonContainerComponent, ButtonImageComponent, DelayedMethodCallManager, DialogBaseComponent, DialogDateSelectionComponent, DialogErrorComponent, DialogMultipleOptionComponent, DialogService, DialogSingleInputComponent, DialogSingleOptionComponent, DialogSingleSelectionListComponent, DialogTwoOptionComponent, ElementClickOutsideDirective, ElementCreatedDirective, ElementDestroyedDirective, FadeAnimationClass, GUINotification, GlobalErrorService, HTTPService, HTTPServiceGetRequest, HTTPServicePostRequest, LocalesBaseService, NotificationService, RouterBaseService, SingletoneStrictClass, TurboApiCallerService, TurboGuiAngularModule, ValidatorsPlus, View, ViewService };
|
|
2944
2989
|
//# sourceMappingURL=turbogui-angular.mjs.map
|