turbogui-angular 11.0.2 → 12.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/esm2022/main/controller/browser.service.mjs +48 -48
- package/esm2022/main/controller/dialog.service.mjs +327 -324
- package/esm2022/main/controller/globalerror.service.mjs +68 -68
- package/esm2022/main/controller/http.service.mjs +70 -70
- package/esm2022/main/controller/httpservice/HTTPServiceGetRequest.mjs +14 -14
- package/esm2022/main/controller/httpservice/HTTPServicePostRequest.mjs +14 -14
- package/esm2022/main/controller/localization.service.mjs +22 -22
- package/esm2022/main/controller/notification.service.mjs +56 -56
- package/esm2022/main/controller/user.service.mjs +124 -124
- package/esm2022/main/controller/views.service.mjs +113 -113
- package/esm2022/main/managers/DelayedMethodCallManager.mjs +69 -69
- package/esm2022/main/model/classes/GUINotification.mjs +31 -31
- package/esm2022/main/model/classes/View.mjs +33 -33
- package/esm2022/main/model/classes/ViewModel.mjs +13 -13
- package/esm2022/main/model/classes/ViewService.mjs +27 -27
- package/esm2022/main/model/modules/turbogui-angular.module.mjs +140 -140
- package/esm2022/main/view/animations/fade.animation.mjs +35 -35
- package/esm2022/main/view/components/busy-state-base/busy-state-base.component.mjs +38 -38
- package/esm2022/main/view/components/button-base/button-base.component.mjs +180 -180
- package/esm2022/main/view/components/button-container/button-container.component.mjs +34 -34
- package/esm2022/main/view/components/button-image/button-image.component.mjs +47 -47
- package/esm2022/main/view/components/dialog-base/dialog-base.component.mjs +13 -13
- package/esm2022/main/view/components/dialog-error/dialog-error.component.mjs +41 -41
- package/esm2022/main/view/components/dialog-multiple-option/dialog-multiple-option.component.mjs +38 -38
- package/esm2022/main/view/components/dialog-options-base/dialog-options-base.component.mjs +14 -14
- package/esm2022/main/view/components/dialog-single-option/dialog-single-option.component.mjs +41 -41
- package/esm2022/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.mjs +112 -112
- package/esm2022/main/view/components/dialog-two-option/dialog-two-option.component.mjs +42 -42
- package/esm2022/main/view/components/views-container/views-container.component.mjs +70 -70
- package/esm2022/main/view/directives/AutoFocusOnDisplayDirective.mjs +39 -39
- package/esm2022/main/view/directives/AutoSelectTextOnFocusDirective.mjs +39 -39
- package/esm2022/main/view/directives/ElementCreatedDirective.mjs +42 -42
- package/esm2022/main/view/directives/ElementDestroyedDirective.mjs +42 -42
- package/esm2022/public_api.mjs +43 -43
- package/esm2022/turbogui-angular.mjs +4 -4
- package/fesm2022/turbogui-angular.mjs +1865 -1862
- package/fesm2022/turbogui-angular.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/main/controller/browser.service.d.ts +29 -29
- package/main/controller/dialog.service.d.ts +186 -184
- package/main/controller/dialog.service.d.ts.map +1 -1
- package/main/controller/globalerror.service.d.ts +54 -54
- package/main/controller/http.service.d.ts +37 -37
- package/main/controller/httpservice/HTTPServiceGetRequest.d.ts +14 -14
- package/main/controller/httpservice/HTTPServicePostRequest.d.ts +14 -14
- package/main/controller/localization.service.d.ts +9 -9
- package/main/controller/notification.service.d.ts +36 -36
- package/main/controller/user.service.d.ts +57 -57
- package/main/controller/views.service.d.ts +71 -71
- package/main/managers/DelayedMethodCallManager.d.ts +51 -51
- package/main/model/classes/GUINotification.d.ts +27 -27
- package/main/model/classes/View.d.ts +39 -39
- package/main/model/classes/ViewModel.d.ts +13 -13
- package/main/model/classes/ViewService.d.ts +26 -26
- package/main/model/modules/turbogui-angular.module.d.ts +28 -28
- package/main/view/animations/fade.animation.d.ts +16 -16
- package/main/view/components/busy-state-base/busy-state-base.component.d.ts +18 -18
- package/main/view/components/button-base/button-base.component.d.ts +94 -94
- package/main/view/components/button-container/button-container.component.d.ts +13 -13
- package/main/view/components/button-image/button-image.component.d.ts +31 -31
- package/main/view/components/dialog-base/dialog-base.component.d.ts +13 -13
- package/main/view/components/dialog-error/dialog-error.component.d.ts +13 -13
- package/main/view/components/dialog-multiple-option/dialog-multiple-option.component.d.ts +13 -13
- package/main/view/components/dialog-options-base/dialog-options-base.component.d.ts +14 -14
- package/main/view/components/dialog-single-option/dialog-single-option.component.d.ts +13 -13
- package/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.d.ts +62 -62
- package/main/view/components/dialog-two-option/dialog-two-option.component.d.ts +14 -14
- package/main/view/components/views-container/views-container.component.d.ts +45 -45
- package/main/view/directives/AutoFocusOnDisplayDirective.d.ts +20 -20
- package/main/view/directives/AutoSelectTextOnFocusDirective.d.ts +19 -19
- package/main/view/directives/ElementCreatedDirective.d.ts +23 -23
- package/main/view/directives/ElementDestroyedDirective.d.ts +23 -23
- package/package.json +6 -6
- package/public_api.d.ts +40 -40
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="turbogui-angular" />
|
|
5
|
-
export * from './public_api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="turbogui-angular" />
|
|
5
|
+
export * from './public_api';
|
|
6
6
|
//# sourceMappingURL=turbogui-angular.d.ts.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { BrowserManager } from 'turbocommons-ts';
|
|
2
|
-
import { Location, PopStateEvent } from '@angular/common';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* An abstraction of the browser entity an all its related operations and properties
|
|
6
|
-
*/
|
|
7
|
-
export declare class BrowserService extends BrowserManager {
|
|
8
|
-
private readonly location;
|
|
9
|
-
constructor(location: Location);
|
|
10
|
-
/**
|
|
11
|
-
* Modify the current browser URI without reloading the current page document
|
|
12
|
-
*
|
|
13
|
-
* @param path The uri value we want to set
|
|
14
|
-
* @param query The query url parameters part we want to specify if any
|
|
15
|
-
*
|
|
16
|
-
* @returns void
|
|
17
|
-
*/
|
|
18
|
-
setURI(path: string, query?: string | undefined): void;
|
|
19
|
-
/**
|
|
20
|
-
* Obtain a subscription to get notified on any changes at the browser url
|
|
21
|
-
*
|
|
22
|
-
* @param onNext A method to be executed every time the url changes on the browser. The url will be available inside the value parameter
|
|
23
|
-
*
|
|
24
|
-
* @returns Subscribed events. Make sure to unsubscribe when not needed
|
|
25
|
-
*/
|
|
26
|
-
subscribeToUrlChange(onNext: (value: PopStateEvent) => void): import("rxjs").SubscriptionLike;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserService, never>;
|
|
28
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BrowserService>;
|
|
29
|
-
}
|
|
1
|
+
import { BrowserManager } from 'turbocommons-ts';
|
|
2
|
+
import { Location, PopStateEvent } from '@angular/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* An abstraction of the browser entity an all its related operations and properties
|
|
6
|
+
*/
|
|
7
|
+
export declare class BrowserService extends BrowserManager {
|
|
8
|
+
private readonly location;
|
|
9
|
+
constructor(location: Location);
|
|
10
|
+
/**
|
|
11
|
+
* Modify the current browser URI without reloading the current page document
|
|
12
|
+
*
|
|
13
|
+
* @param path The uri value we want to set
|
|
14
|
+
* @param query The query url parameters part we want to specify if any
|
|
15
|
+
*
|
|
16
|
+
* @returns void
|
|
17
|
+
*/
|
|
18
|
+
setURI(path: string, query?: string | undefined): void;
|
|
19
|
+
/**
|
|
20
|
+
* Obtain a subscription to get notified on any changes at the browser url
|
|
21
|
+
*
|
|
22
|
+
* @param onNext A method to be executed every time the url changes on the browser. The url will be available inside the value parameter
|
|
23
|
+
*
|
|
24
|
+
* @returns Subscribed events. Make sure to unsubscribe when not needed
|
|
25
|
+
*/
|
|
26
|
+
subscribeToUrlChange(onNext: (value: PopStateEvent) => void): import("rxjs").SubscriptionLike;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserService, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BrowserService>;
|
|
29
|
+
}
|
|
30
30
|
//# sourceMappingURL=browser.service.d.ts.map
|
|
@@ -1,185 +1,187 @@
|
|
|
1
|
-
import { Type, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2 } from '@angular/core';
|
|
2
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
|
|
4
|
-
import { BusyStateBaseComponent } from '../view/components/busy-state-base/busy-state-base.component';
|
|
5
|
-
import { DialogOptionsBaseComponent } from '../view/components/dialog-options-base/dialog-options-base.component';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Manages the application modal and non modal floating elements
|
|
9
|
-
*/
|
|
10
|
-
export declare class DialogService {
|
|
11
|
-
private readonly matSnackBar;
|
|
12
|
-
private readonly matDialog;
|
|
13
|
-
private readonly injector;
|
|
14
|
-
private readonly applicationRef;
|
|
15
|
-
private readonly componentFactoryResolver;
|
|
16
|
-
/**
|
|
17
|
-
* Used to modify the busy state component that is shown by default by the addModalBusyState() method.
|
|
18
|
-
*
|
|
19
|
-
* @see this.addModalBusyState()
|
|
20
|
-
*/
|
|
21
|
-
customBusyStateComponentClass: Type<BusyStateBaseComponent>;
|
|
22
|
-
/**
|
|
23
|
-
* Check public getter for docs
|
|
24
|
-
*/
|
|
25
|
-
private _isEnabled;
|
|
26
|
-
/**
|
|
27
|
-
* Tells if the main application is currently showing a busy state that blocks all user interaction
|
|
28
|
-
*/
|
|
29
|
-
private _isShowingBusyState;
|
|
30
|
-
/**
|
|
31
|
-
* A reference to the modal busy state component that is initialized only the first time it is called.
|
|
32
|
-
*
|
|
33
|
-
* (To append the busy state dynamically, we use the Portal concept from the angular material library)
|
|
34
|
-
*/
|
|
35
|
-
private _componentPortal;
|
|
36
|
-
/**
|
|
37
|
-
* A reference to the modal busy state container where the component will be added
|
|
38
|
-
*/
|
|
39
|
-
private _modalBusyStateHost;
|
|
40
|
-
/**
|
|
41
|
-
* Tells if the manager is currently showing a snackbar element or not
|
|
42
|
-
*/
|
|
43
|
-
private _isShowingSnackBar;
|
|
44
|
-
/**
|
|
45
|
-
* Contains a list of the dialogs that are currently visible to the user.
|
|
46
|
-
* Each item in this list is a hash that is computed when dialog is created to uniquely identify it.
|
|
47
|
-
*
|
|
48
|
-
* Empty list means no dialogs are currently visible
|
|
49
|
-
*/
|
|
50
|
-
private _activeDialogs;
|
|
51
|
-
/**
|
|
52
|
-
* Contains a list with all the MatDialog instances that are currently visible to the user.
|
|
53
|
-
* The list uses the same order as the list of _activeDialogs hash values
|
|
54
|
-
*/
|
|
55
|
-
private _activeDialogInstances;
|
|
56
|
-
/**
|
|
57
|
-
* Used to store the initialized Renderer 2 instance that is used by this class
|
|
58
|
-
*/
|
|
59
|
-
private readonly _renderer;
|
|
60
|
-
/**
|
|
61
|
-
* Method that is used to delete the window beforeunload event listener once not used anymore
|
|
62
|
-
*/
|
|
63
|
-
private _windowBeforeUnloadUnListen;
|
|
64
|
-
/**
|
|
65
|
-
* Method that is used to delete the document keydown event listener once not used anymore
|
|
66
|
-
*/
|
|
67
|
-
private _documentKeydownUnlisten;
|
|
68
|
-
/**
|
|
69
|
-
* Method that is used to delete the document mousedown event listener once not used anymore
|
|
70
|
-
*/
|
|
71
|
-
private _documentMousedownUnlisten;
|
|
72
|
-
/**
|
|
73
|
-
* Method that is used to delete the document pointerdown event listener once not used anymore
|
|
74
|
-
*/
|
|
75
|
-
private _documentPointerdownUnlisten;
|
|
76
|
-
constructor(rendererFactory: RendererFactory2, matSnackBar: MatSnackBar, matDialog: MatDialog, injector: Injector, applicationRef: ApplicationRef, componentFactoryResolver: ComponentFactoryResolver);
|
|
77
|
-
/**
|
|
78
|
-
* Tells if this dialog service is enabled or not. If dialog service is disabled, none of it's features will work
|
|
79
|
-
* This is used to block all dialog features normally when shutting down the application
|
|
80
|
-
*
|
|
81
|
-
* Use with caution. When this is set to false, dialog service stops working.
|
|
82
|
-
*/
|
|
83
|
-
set isEnabled(v: boolean);
|
|
84
|
-
/**
|
|
85
|
-
* Enables a warning that will be shown to the user when he/she tries to close the application.
|
|
86
|
-
* This warning will prompt the user to continue with the exit process or cancel it.
|
|
87
|
-
* The specific texts of this message are a generic ones and cannot be changed.
|
|
88
|
-
*
|
|
89
|
-
* IMPORTANT: This method must be called after the main application has been initialized in order to work,
|
|
90
|
-
* otherwise it will do nothing.
|
|
91
|
-
*/
|
|
92
|
-
addCloseApplicationWarning(): void;
|
|
93
|
-
/**
|
|
94
|
-
* Remove the close application warning message if previously assigned
|
|
95
|
-
*/
|
|
96
|
-
removeCloseApplicationWarning(): void;
|
|
97
|
-
/**
|
|
98
|
-
* Change the application visual appearance so the user perceives that the application is
|
|
99
|
-
* currently busy. While modal busy state is enabled, no user input is possible neither via
|
|
100
|
-
* keyboard, mouse or touch. Use this state when performing server requests or operations that
|
|
101
|
-
* must block the user interaction with the application.
|
|
102
|
-
*
|
|
103
|
-
* Note: We can modify the busy state component that is shown by this method. To do it, we must
|
|
104
|
-
* set this.customBusyStateComponentClass property with our own custom busy state component class. (We can do it at
|
|
105
|
-
* our main application component constructor for example). Our custom component must extend the
|
|
106
|
-
* BusyStateBaseComponent one to add its own visual appearance.
|
|
107
|
-
*
|
|
108
|
-
* @see this.customBusyStateComponentClass
|
|
109
|
-
*/
|
|
110
|
-
addModalBusyState(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Tells if the application is currently locked in a modal busy state (caused by an addModalBusyState() call)
|
|
113
|
-
*/
|
|
114
|
-
get isShowingBusyState(): boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Remove the application busy state and restore it back to normal user interaction
|
|
117
|
-
*/
|
|
118
|
-
removeModalBusyState(): void;
|
|
119
|
-
/**
|
|
120
|
-
* TODO - adapt from TS version
|
|
121
|
-
*/
|
|
122
|
-
addToolTip(): void;
|
|
123
|
-
/**
|
|
124
|
-
* Show a non modal snackbar notification to the user (Only one snack-bar can ever be opened at the same time).
|
|
125
|
-
*
|
|
126
|
-
* Snackbars inform users of a process that an app has performed or will perform. They appear temporarily, towards the bottom or top of the screen.
|
|
127
|
-
* They shouldn’t interrupt the user experience, and they don’t require user input to disappear.
|
|
128
|
-
*
|
|
129
|
-
* @param config A MatSnackBarConfig instance with the customizations we want for this snackbar
|
|
130
|
-
* @param message The message to show on the snackbar
|
|
131
|
-
* @param action If not empty, the text to place on the snackbar confirmation button
|
|
132
|
-
* @param actionCallback A method to execute once the user clicks into the action button.
|
|
133
|
-
*
|
|
134
|
-
* @return void
|
|
135
|
-
*/
|
|
136
|
-
addSnackBar(config: MatSnackBarConfig, message: string, action?: string, actionCallback?: (() => void) | null): void;
|
|
137
|
-
/**
|
|
138
|
-
* Tells if the application is currently showing a snackbar or not
|
|
139
|
-
*/
|
|
140
|
-
get isShowingSnackBar(): boolean;
|
|
141
|
-
/**
|
|
142
|
-
* Force the removal of the snack bar dialog if it exists.
|
|
143
|
-
*
|
|
144
|
-
* If no snackbar is currently visible, this method will do nothing
|
|
145
|
-
*/
|
|
146
|
-
removeSnackBar(): void;
|
|
147
|
-
/**
|
|
148
|
-
* Show a dialog with one or more options that can be used to close it. We can use any of the predefined dialog types that are bundled with
|
|
149
|
-
* this library or extend DialogOptionsBaseComponent to create our own custom ones.
|
|
150
|
-
*
|
|
151
|
-
* @param width Specify the css value for the maximum width the dialog will have. As the dialog is responsive, the value will be automatically
|
|
152
|
-
reduced if the available screen is not enough, and will reach the desired value otherwise. Note that height will be adapted to the contents
|
|
153
|
-
of the dialog and cannot be specified here. We can set a pixels, % or any other css accepted value. For example: '400px', '50%', etc.
|
|
154
|
-
* @param texts A list with strings containing the dialog texts, sorted by importance. When dialog has a title, this should
|
|
155
|
-
* be placed first, subtitle second and so (Each dialog may accept different kind of texts).
|
|
156
|
-
* @param options A list of strings that will be used as button captions for each one of the accepted dialog options
|
|
157
|
-
* @param dialogComponentClass A class for a component that extends DialogOptionsBaseComponent, which will be the
|
|
158
|
-
* dialog visual element that is shown to the user.
|
|
159
|
-
* @param callback A function that will be called after the dialog is closed and will receive an object with the numeric index and value for
|
|
160
|
-
* the option that's been selected by the user.
|
|
161
|
-
* @param modal True (default) if selecting an option is mandatory to close the dialog, false if the dialog can be closed
|
|
162
|
-
* by the user by clicking outside it
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
*
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
1
|
+
import { Type, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2 } from '@angular/core';
|
|
2
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
|
|
4
|
+
import { BusyStateBaseComponent } from '../view/components/busy-state-base/busy-state-base.component';
|
|
5
|
+
import { DialogOptionsBaseComponent } from '../view/components/dialog-options-base/dialog-options-base.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Manages the application modal and non modal floating elements
|
|
9
|
+
*/
|
|
10
|
+
export declare class DialogService {
|
|
11
|
+
private readonly matSnackBar;
|
|
12
|
+
private readonly matDialog;
|
|
13
|
+
private readonly injector;
|
|
14
|
+
private readonly applicationRef;
|
|
15
|
+
private readonly componentFactoryResolver;
|
|
16
|
+
/**
|
|
17
|
+
* Used to modify the busy state component that is shown by default by the addModalBusyState() method.
|
|
18
|
+
*
|
|
19
|
+
* @see this.addModalBusyState()
|
|
20
|
+
*/
|
|
21
|
+
customBusyStateComponentClass: Type<BusyStateBaseComponent>;
|
|
22
|
+
/**
|
|
23
|
+
* Check public getter for docs
|
|
24
|
+
*/
|
|
25
|
+
private _isEnabled;
|
|
26
|
+
/**
|
|
27
|
+
* Tells if the main application is currently showing a busy state that blocks all user interaction
|
|
28
|
+
*/
|
|
29
|
+
private _isShowingBusyState;
|
|
30
|
+
/**
|
|
31
|
+
* A reference to the modal busy state component that is initialized only the first time it is called.
|
|
32
|
+
*
|
|
33
|
+
* (To append the busy state dynamically, we use the Portal concept from the angular material library)
|
|
34
|
+
*/
|
|
35
|
+
private _componentPortal;
|
|
36
|
+
/**
|
|
37
|
+
* A reference to the modal busy state container where the component will be added
|
|
38
|
+
*/
|
|
39
|
+
private _modalBusyStateHost;
|
|
40
|
+
/**
|
|
41
|
+
* Tells if the manager is currently showing a snackbar element or not
|
|
42
|
+
*/
|
|
43
|
+
private _isShowingSnackBar;
|
|
44
|
+
/**
|
|
45
|
+
* Contains a list of the dialogs that are currently visible to the user.
|
|
46
|
+
* Each item in this list is a hash that is computed when dialog is created to uniquely identify it.
|
|
47
|
+
*
|
|
48
|
+
* Empty list means no dialogs are currently visible
|
|
49
|
+
*/
|
|
50
|
+
private _activeDialogs;
|
|
51
|
+
/**
|
|
52
|
+
* Contains a list with all the MatDialog instances that are currently visible to the user.
|
|
53
|
+
* The list uses the same order as the list of _activeDialogs hash values
|
|
54
|
+
*/
|
|
55
|
+
private _activeDialogInstances;
|
|
56
|
+
/**
|
|
57
|
+
* Used to store the initialized Renderer 2 instance that is used by this class
|
|
58
|
+
*/
|
|
59
|
+
private readonly _renderer;
|
|
60
|
+
/**
|
|
61
|
+
* Method that is used to delete the window beforeunload event listener once not used anymore
|
|
62
|
+
*/
|
|
63
|
+
private _windowBeforeUnloadUnListen;
|
|
64
|
+
/**
|
|
65
|
+
* Method that is used to delete the document keydown event listener once not used anymore
|
|
66
|
+
*/
|
|
67
|
+
private _documentKeydownUnlisten;
|
|
68
|
+
/**
|
|
69
|
+
* Method that is used to delete the document mousedown event listener once not used anymore
|
|
70
|
+
*/
|
|
71
|
+
private _documentMousedownUnlisten;
|
|
72
|
+
/**
|
|
73
|
+
* Method that is used to delete the document pointerdown event listener once not used anymore
|
|
74
|
+
*/
|
|
75
|
+
private _documentPointerdownUnlisten;
|
|
76
|
+
constructor(rendererFactory: RendererFactory2, matSnackBar: MatSnackBar, matDialog: MatDialog, injector: Injector, applicationRef: ApplicationRef, componentFactoryResolver: ComponentFactoryResolver);
|
|
77
|
+
/**
|
|
78
|
+
* Tells if this dialog service is enabled or not. If dialog service is disabled, none of it's features will work
|
|
79
|
+
* This is used to block all dialog features normally when shutting down the application
|
|
80
|
+
*
|
|
81
|
+
* Use with caution. When this is set to false, dialog service stops working.
|
|
82
|
+
*/
|
|
83
|
+
set isEnabled(v: boolean);
|
|
84
|
+
/**
|
|
85
|
+
* Enables a warning that will be shown to the user when he/she tries to close the application.
|
|
86
|
+
* This warning will prompt the user to continue with the exit process or cancel it.
|
|
87
|
+
* The specific texts of this message are a generic ones and cannot be changed.
|
|
88
|
+
*
|
|
89
|
+
* IMPORTANT: This method must be called after the main application has been initialized in order to work,
|
|
90
|
+
* otherwise it will do nothing.
|
|
91
|
+
*/
|
|
92
|
+
addCloseApplicationWarning(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Remove the close application warning message if previously assigned
|
|
95
|
+
*/
|
|
96
|
+
removeCloseApplicationWarning(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Change the application visual appearance so the user perceives that the application is
|
|
99
|
+
* currently busy. While modal busy state is enabled, no user input is possible neither via
|
|
100
|
+
* keyboard, mouse or touch. Use this state when performing server requests or operations that
|
|
101
|
+
* must block the user interaction with the application.
|
|
102
|
+
*
|
|
103
|
+
* Note: We can modify the busy state component that is shown by this method. To do it, we must
|
|
104
|
+
* set this.customBusyStateComponentClass property with our own custom busy state component class. (We can do it at
|
|
105
|
+
* our main application component constructor for example). Our custom component must extend the
|
|
106
|
+
* BusyStateBaseComponent one to add its own visual appearance.
|
|
107
|
+
*
|
|
108
|
+
* @see this.customBusyStateComponentClass
|
|
109
|
+
*/
|
|
110
|
+
addModalBusyState(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Tells if the application is currently locked in a modal busy state (caused by an addModalBusyState() call)
|
|
113
|
+
*/
|
|
114
|
+
get isShowingBusyState(): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Remove the application busy state and restore it back to normal user interaction
|
|
117
|
+
*/
|
|
118
|
+
removeModalBusyState(): void;
|
|
119
|
+
/**
|
|
120
|
+
* TODO - adapt from TS version
|
|
121
|
+
*/
|
|
122
|
+
addToolTip(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Show a non modal snackbar notification to the user (Only one snack-bar can ever be opened at the same time).
|
|
125
|
+
*
|
|
126
|
+
* Snackbars inform users of a process that an app has performed or will perform. They appear temporarily, towards the bottom or top of the screen.
|
|
127
|
+
* They shouldn’t interrupt the user experience, and they don’t require user input to disappear.
|
|
128
|
+
*
|
|
129
|
+
* @param config A MatSnackBarConfig instance with the customizations we want for this snackbar
|
|
130
|
+
* @param message The message to show on the snackbar
|
|
131
|
+
* @param action If not empty, the text to place on the snackbar confirmation button
|
|
132
|
+
* @param actionCallback A method to execute once the user clicks into the action button.
|
|
133
|
+
*
|
|
134
|
+
* @return void
|
|
135
|
+
*/
|
|
136
|
+
addSnackBar(config: MatSnackBarConfig, message: string, action?: string, actionCallback?: (() => void) | null): void;
|
|
137
|
+
/**
|
|
138
|
+
* Tells if the application is currently showing a snackbar or not
|
|
139
|
+
*/
|
|
140
|
+
get isShowingSnackBar(): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Force the removal of the snack bar dialog if it exists.
|
|
143
|
+
*
|
|
144
|
+
* If no snackbar is currently visible, this method will do nothing
|
|
145
|
+
*/
|
|
146
|
+
removeSnackBar(): void;
|
|
147
|
+
/**
|
|
148
|
+
* Show a dialog with one or more options that can be used to close it. We can use any of the predefined dialog types that are bundled with
|
|
149
|
+
* this library or extend DialogOptionsBaseComponent to create our own custom ones.
|
|
150
|
+
*
|
|
151
|
+
* @param width Specify the css value for the maximum width the dialog will have. As the dialog is responsive, the value will be automatically
|
|
152
|
+
reduced if the available screen is not enough, and will reach the desired value otherwise. Note that height will be adapted to the contents
|
|
153
|
+
of the dialog and cannot be specified here. We can set a pixels, % or any other css accepted value. For example: '400px', '50%', etc.
|
|
154
|
+
* @param texts A list with strings containing the dialog texts, sorted by importance. When dialog has a title, this should
|
|
155
|
+
* be placed first, subtitle second and so (Each dialog may accept different kind of texts).
|
|
156
|
+
* @param options A list of strings that will be used as button captions for each one of the accepted dialog options
|
|
157
|
+
* @param dialogComponentClass A class for a component that extends DialogOptionsBaseComponent, which will be the
|
|
158
|
+
* dialog visual element that is shown to the user.
|
|
159
|
+
* @param callback A function that will be called after the dialog is closed and will receive an object with the numeric index and value for
|
|
160
|
+
* the option that's been selected by the user.
|
|
161
|
+
* @param modal True (default) if selecting an option is mandatory to close the dialog, false if the dialog can be closed
|
|
162
|
+
* by the user by clicking outside it
|
|
163
|
+
* @param maxWidth Defines the maximum width that the dialog will have regarding the viewport. We can specify it in % or vw, just like is done in
|
|
164
|
+
* css. By default it is defined as 96vw, which will fit 96% of the viewport on small devices
|
|
165
|
+
*/
|
|
166
|
+
addDialog(width: string, texts: string[], options: string[], dialogComponentClass: Type<DialogOptionsBaseComponent>, callback?: null | ((selectedOption: {
|
|
167
|
+
index: number;
|
|
168
|
+
value: string;
|
|
169
|
+
}) => void), modal?: boolean, maxWidth?: string): void;
|
|
170
|
+
/**
|
|
171
|
+
* Force the removal of all the dialogs that are currently visible.
|
|
172
|
+
*
|
|
173
|
+
* If no dialogs are currently visible, this method will do nothing
|
|
174
|
+
*/
|
|
175
|
+
removeAllDialogs(): void;
|
|
176
|
+
/**
|
|
177
|
+
* Block all the user interactions with the application (keyboard, touch, mouse, ...)
|
|
178
|
+
*/
|
|
179
|
+
private _disableUserInteraction;
|
|
180
|
+
/**
|
|
181
|
+
* Restore the user interactions that were previously disabled with _disableUserInteraction method
|
|
182
|
+
*/
|
|
183
|
+
private _enableUserInteraction;
|
|
184
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
|
|
185
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
|
|
186
|
+
}
|
|
185
187
|
//# sourceMappingURL=dialog.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/dialog.service.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAc,wBAAwB,EAAE,QAAQ,EAAE,cAAc,EAAa,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAClI,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AAEtG,OAAO,EAAE,0BAA0B,EAAE,MAAM,sEAAsE,CAAC;;AAIlH;;GAEG;AACH,qBACa,aAAa;IA0FV,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IA3FrD;;;;OAIG;IACH,6BAA6B,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAA0B;IAGrF;;OAEG;IACH,OAAO,CAAC,UAAU,CAAQ;IAG1B;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAS;IAGpC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAAwD;IAGhF;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAgC;IAG3D;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAAS;IAGnC;;;;;OAKG;IACH,OAAO,CAAC,cAAc,CAAgB;IAGtC;;;OAGG;IACH,OAAO,CAAC,sBAAsB,CAA2C;IAGzE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IAGtC;;OAEG;IACH,OAAO,CAAC,2BAA2B,CAA6B;IAGhE;;OAEG;IACH,OAAO,CAAC,wBAAwB,CAA6B;IAG7D;;OAEG;IACH,OAAO,CAAC,0BAA0B,CAA6B;IAG/D;;OAEG;IACH,OAAO,CAAC,4BAA4B,CAA6B;gBAGrD,eAAe,EAAE,gBAAgB,EAChB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,wBAAwB,EAAE,wBAAwB;IAM/E;;;;;OAKG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAQvB;IAGD;;;;;;;OAOG;IACH,0BAA0B;IAU1B;;OAEG;IACH,6BAA6B;IAU7B;;;;;;;;;;;;OAYG;IACH,iBAAiB;IA4BjB;;OAEG;IACH,IAAI,kBAAkB,YAGrB;IAGD;;OAEG;IACH,oBAAoB;IAkBpB;;OAEG;IACH,UAAU;IAMV;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK,EAAE,cAAc,GAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAW;IA0B/G;;OAEG;IACH,IAAI,iBAAiB,YAGpB;IAGD;;;;OAIG;IACH,cAAc;IAad
|
|
1
|
+
{"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/dialog.service.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAc,wBAAwB,EAAE,QAAQ,EAAE,cAAc,EAAa,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAClI,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AAEtG,OAAO,EAAE,0BAA0B,EAAE,MAAM,sEAAsE,CAAC;;AAIlH;;GAEG;AACH,qBACa,aAAa;IA0FV,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IA3FrD;;;;OAIG;IACH,6BAA6B,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAA0B;IAGrF;;OAEG;IACH,OAAO,CAAC,UAAU,CAAQ;IAG1B;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAS;IAGpC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAAwD;IAGhF;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAgC;IAG3D;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAAS;IAGnC;;;;;OAKG;IACH,OAAO,CAAC,cAAc,CAAgB;IAGtC;;;OAGG;IACH,OAAO,CAAC,sBAAsB,CAA2C;IAGzE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IAGtC;;OAEG;IACH,OAAO,CAAC,2BAA2B,CAA6B;IAGhE;;OAEG;IACH,OAAO,CAAC,wBAAwB,CAA6B;IAG7D;;OAEG;IACH,OAAO,CAAC,0BAA0B,CAA6B;IAG/D;;OAEG;IACH,OAAO,CAAC,4BAA4B,CAA6B;gBAGrD,eAAe,EAAE,gBAAgB,EAChB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,wBAAwB,EAAE,wBAAwB;IAM/E;;;;;OAKG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAQvB;IAGD;;;;;;;OAOG;IACH,0BAA0B;IAU1B;;OAEG;IACH,6BAA6B;IAU7B;;;;;;;;;;;;OAYG;IACH,iBAAiB;IA4BjB;;OAEG;IACH,IAAI,kBAAkB,YAGrB;IAGD;;OAEG;IACH,oBAAoB;IAkBpB;;OAEG;IACH,UAAU;IAMV;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK,EAAE,cAAc,GAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAW;IA0B/G;;OAEG;IACH,IAAI,iBAAiB,YAGpB;IAGD;;;;OAIG;IACH,cAAc;IAad;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,MAAM,EAAE,EACjB,oBAAoB,EAAE,IAAI,CAAC,0BAA0B,CAAC,EACtD,QAAQ,GAAE,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAQ,EACjF,KAAK,UAAO,EACZ,QAAQ,SAAS;IA4D3B;;;;OAIG;IACH,gBAAgB;IAiBhB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAmB/B;;OAEG;IACH,OAAO,CAAC,sBAAsB;yCA1arB,aAAa;6CAAb,aAAa;CA8bzB"}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
3
|
-
*
|
|
4
|
-
* Website : -> http://www.turbogui.org
|
|
5
|
-
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
|
|
6
|
-
* License Url : -> http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
* CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
|
|
8
|
-
*/
|
|
9
|
-
import { ErrorHandler } from '@angular/core';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
/**
|
|
12
|
-
* Captures all the application exceptions and performs any required action.
|
|
13
|
-
* It also contains multiple general error management features.
|
|
14
|
-
*
|
|
15
|
-
* To define this class as your application error handler, you must add the following to your
|
|
16
|
-
* main app module providers:
|
|
17
|
-
* {
|
|
18
|
-
* provide: ErrorHandler,
|
|
19
|
-
* useClass: GlobalErrorService
|
|
20
|
-
* },
|
|
21
|
-
* GlobalErrorService
|
|
22
|
-
*
|
|
23
|
-
* You cannot access the error handler at runtime. If you need to modify any of the behaviours
|
|
24
|
-
* or implement your custom ones, you must extend this class and set your new one as the error
|
|
25
|
-
* handler provider.
|
|
26
|
-
*/
|
|
27
|
-
export declare class GlobalErrorService implements ErrorHandler {
|
|
28
|
-
/**
|
|
29
|
-
* Enables or disables the error notification to user via an alert box
|
|
30
|
-
* Extend this class and override this value on your custom error handle to change it
|
|
31
|
-
*/
|
|
32
|
-
private readonly showExceptionsToUser;
|
|
33
|
-
/**
|
|
34
|
-
* Enables or disables the error notification to user via an alert box
|
|
35
|
-
* Extend this class and override this value on your custom error handle to change it
|
|
36
|
-
*/
|
|
37
|
-
private readonly showExceptionsOnConsole;
|
|
38
|
-
/**
|
|
39
|
-
* Defines the text that will be used for the alert that is shown to the user when an exception happens
|
|
40
|
-
* and showExceptionsToUser is true
|
|
41
|
-
* Extend this class and override this value on your custom error handle to change it
|
|
42
|
-
*/
|
|
43
|
-
private readonly errorAlertMessage;
|
|
44
|
-
/**
|
|
45
|
-
* Show an alert with the received error detail and also log it to the js console.
|
|
46
|
-
*
|
|
47
|
-
* Angular expects at least this method to be implemented on any class that is used as a global exception handler.
|
|
48
|
-
*
|
|
49
|
-
* @param error An error instance
|
|
50
|
-
*/
|
|
51
|
-
handleError(error: any): void;
|
|
52
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalErrorService, never>;
|
|
53
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalErrorService>;
|
|
54
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
3
|
+
*
|
|
4
|
+
* Website : -> http://www.turbogui.org
|
|
5
|
+
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
|
|
6
|
+
* License Url : -> http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
* CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
|
|
8
|
+
*/
|
|
9
|
+
import { ErrorHandler } from '@angular/core';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* Captures all the application exceptions and performs any required action.
|
|
13
|
+
* It also contains multiple general error management features.
|
|
14
|
+
*
|
|
15
|
+
* To define this class as your application error handler, you must add the following to your
|
|
16
|
+
* main app module providers:
|
|
17
|
+
* {
|
|
18
|
+
* provide: ErrorHandler,
|
|
19
|
+
* useClass: GlobalErrorService
|
|
20
|
+
* },
|
|
21
|
+
* GlobalErrorService
|
|
22
|
+
*
|
|
23
|
+
* You cannot access the error handler at runtime. If you need to modify any of the behaviours
|
|
24
|
+
* or implement your custom ones, you must extend this class and set your new one as the error
|
|
25
|
+
* handler provider.
|
|
26
|
+
*/
|
|
27
|
+
export declare class GlobalErrorService implements ErrorHandler {
|
|
28
|
+
/**
|
|
29
|
+
* Enables or disables the error notification to user via an alert box
|
|
30
|
+
* Extend this class and override this value on your custom error handle to change it
|
|
31
|
+
*/
|
|
32
|
+
private readonly showExceptionsToUser;
|
|
33
|
+
/**
|
|
34
|
+
* Enables or disables the error notification to user via an alert box
|
|
35
|
+
* Extend this class and override this value on your custom error handle to change it
|
|
36
|
+
*/
|
|
37
|
+
private readonly showExceptionsOnConsole;
|
|
38
|
+
/**
|
|
39
|
+
* Defines the text that will be used for the alert that is shown to the user when an exception happens
|
|
40
|
+
* and showExceptionsToUser is true
|
|
41
|
+
* Extend this class and override this value on your custom error handle to change it
|
|
42
|
+
*/
|
|
43
|
+
private readonly errorAlertMessage;
|
|
44
|
+
/**
|
|
45
|
+
* Show an alert with the received error detail and also log it to the js console.
|
|
46
|
+
*
|
|
47
|
+
* Angular expects at least this method to be implemented on any class that is used as a global exception handler.
|
|
48
|
+
*
|
|
49
|
+
* @param error An error instance
|
|
50
|
+
*/
|
|
51
|
+
handleError(error: any): void;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalErrorService, never>;
|
|
53
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalErrorService>;
|
|
54
|
+
}
|
|
55
55
|
//# sourceMappingURL=globalerror.service.d.ts.map
|