turbogui-angular 11.0.2 → 12.0.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.
Files changed (73) hide show
  1. package/esm2022/main/controller/browser.service.mjs +48 -48
  2. package/esm2022/main/controller/dialog.service.mjs +324 -324
  3. package/esm2022/main/controller/globalerror.service.mjs +68 -68
  4. package/esm2022/main/controller/http.service.mjs +70 -70
  5. package/esm2022/main/controller/httpservice/HTTPServiceGetRequest.mjs +14 -14
  6. package/esm2022/main/controller/httpservice/HTTPServicePostRequest.mjs +14 -14
  7. package/esm2022/main/controller/localization.service.mjs +22 -22
  8. package/esm2022/main/controller/notification.service.mjs +56 -56
  9. package/esm2022/main/controller/user.service.mjs +124 -124
  10. package/esm2022/main/controller/views.service.mjs +113 -113
  11. package/esm2022/main/managers/DelayedMethodCallManager.mjs +69 -69
  12. package/esm2022/main/model/classes/GUINotification.mjs +31 -31
  13. package/esm2022/main/model/classes/View.mjs +33 -33
  14. package/esm2022/main/model/classes/ViewModel.mjs +13 -13
  15. package/esm2022/main/model/classes/ViewService.mjs +27 -27
  16. package/esm2022/main/model/modules/turbogui-angular.module.mjs +140 -140
  17. package/esm2022/main/view/animations/fade.animation.mjs +35 -35
  18. package/esm2022/main/view/components/busy-state-base/busy-state-base.component.mjs +38 -38
  19. package/esm2022/main/view/components/button-base/button-base.component.mjs +180 -180
  20. package/esm2022/main/view/components/button-container/button-container.component.mjs +34 -34
  21. package/esm2022/main/view/components/button-image/button-image.component.mjs +47 -47
  22. package/esm2022/main/view/components/dialog-base/dialog-base.component.mjs +13 -13
  23. package/esm2022/main/view/components/dialog-error/dialog-error.component.mjs +41 -41
  24. package/esm2022/main/view/components/dialog-multiple-option/dialog-multiple-option.component.mjs +38 -38
  25. package/esm2022/main/view/components/dialog-options-base/dialog-options-base.component.mjs +14 -14
  26. package/esm2022/main/view/components/dialog-single-option/dialog-single-option.component.mjs +41 -41
  27. package/esm2022/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.mjs +112 -112
  28. package/esm2022/main/view/components/dialog-two-option/dialog-two-option.component.mjs +42 -42
  29. package/esm2022/main/view/components/views-container/views-container.component.mjs +70 -70
  30. package/esm2022/main/view/directives/AutoFocusOnDisplayDirective.mjs +39 -39
  31. package/esm2022/main/view/directives/AutoSelectTextOnFocusDirective.mjs +39 -39
  32. package/esm2022/main/view/directives/ElementCreatedDirective.mjs +42 -42
  33. package/esm2022/main/view/directives/ElementDestroyedDirective.mjs +42 -42
  34. package/esm2022/public_api.mjs +43 -43
  35. package/esm2022/turbogui-angular.mjs +4 -4
  36. package/fesm2022/turbogui-angular.mjs +1862 -1862
  37. package/fesm2022/turbogui-angular.mjs.map +1 -1
  38. package/index.d.ts +5 -5
  39. package/main/controller/browser.service.d.ts +29 -29
  40. package/main/controller/dialog.service.d.ts +184 -184
  41. package/main/controller/globalerror.service.d.ts +54 -54
  42. package/main/controller/http.service.d.ts +37 -37
  43. package/main/controller/httpservice/HTTPServiceGetRequest.d.ts +14 -14
  44. package/main/controller/httpservice/HTTPServicePostRequest.d.ts +14 -14
  45. package/main/controller/localization.service.d.ts +9 -9
  46. package/main/controller/notification.service.d.ts +36 -36
  47. package/main/controller/user.service.d.ts +57 -57
  48. package/main/controller/views.service.d.ts +71 -71
  49. package/main/managers/DelayedMethodCallManager.d.ts +51 -51
  50. package/main/model/classes/GUINotification.d.ts +27 -27
  51. package/main/model/classes/View.d.ts +39 -39
  52. package/main/model/classes/ViewModel.d.ts +13 -13
  53. package/main/model/classes/ViewService.d.ts +26 -26
  54. package/main/model/modules/turbogui-angular.module.d.ts +28 -28
  55. package/main/view/animations/fade.animation.d.ts +16 -16
  56. package/main/view/components/busy-state-base/busy-state-base.component.d.ts +18 -18
  57. package/main/view/components/button-base/button-base.component.d.ts +94 -94
  58. package/main/view/components/button-container/button-container.component.d.ts +13 -13
  59. package/main/view/components/button-image/button-image.component.d.ts +31 -31
  60. package/main/view/components/dialog-base/dialog-base.component.d.ts +13 -13
  61. package/main/view/components/dialog-error/dialog-error.component.d.ts +13 -13
  62. package/main/view/components/dialog-multiple-option/dialog-multiple-option.component.d.ts +13 -13
  63. package/main/view/components/dialog-options-base/dialog-options-base.component.d.ts +14 -14
  64. package/main/view/components/dialog-single-option/dialog-single-option.component.d.ts +13 -13
  65. package/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.d.ts +62 -62
  66. package/main/view/components/dialog-two-option/dialog-two-option.component.d.ts +14 -14
  67. package/main/view/components/views-container/views-container.component.d.ts +45 -45
  68. package/main/view/directives/AutoFocusOnDisplayDirective.d.ts +20 -20
  69. package/main/view/directives/AutoSelectTextOnFocusDirective.d.ts +19 -19
  70. package/main/view/directives/ElementCreatedDirective.d.ts +23 -23
  71. package/main/view/directives/ElementDestroyedDirective.d.ts +23 -23
  72. package/package.json +6 -6
  73. 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,185 @@
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
- addDialog(width: string, texts: string[], options: string[], dialogComponentClass: Type<DialogOptionsBaseComponent>, callback?: null | ((selectedOption: {
165
- index: number;
166
- value: string;
167
- }) => void), modal?: boolean): void;
168
- /**
169
- * Force the removal of all the dialogs that are currently visible.
170
- *
171
- * If no dialogs are currently visible, this method will do nothing
172
- */
173
- removeAllDialogs(): void;
174
- /**
175
- * Block all the user interactions with the application (keyboard, touch, mouse, ...)
176
- */
177
- private _disableUserInteraction;
178
- /**
179
- * Restore the user interactions that were previously disabled with _disableUserInteraction method
180
- */
181
- private _enableUserInteraction;
182
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
183
- static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
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
+ */
164
+ addDialog(width: string, texts: string[], options: string[], dialogComponentClass: Type<DialogOptionsBaseComponent>, callback?: null | ((selectedOption: {
165
+ index: number;
166
+ value: string;
167
+ }) => void), modal?: boolean): void;
168
+ /**
169
+ * Force the removal of all the dialogs that are currently visible.
170
+ *
171
+ * If no dialogs are currently visible, this method will do nothing
172
+ */
173
+ removeAllDialogs(): void;
174
+ /**
175
+ * Block all the user interactions with the application (keyboard, touch, mouse, ...)
176
+ */
177
+ private _disableUserInteraction;
178
+ /**
179
+ * Restore the user interactions that were previously disabled with _disableUserInteraction method
180
+ */
181
+ private _enableUserInteraction;
182
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
183
+ static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
184
+ }
185
185
  //# sourceMappingURL=dialog.service.d.ts.map
@@ -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
@@ -1,38 +1,38 @@
1
- import { HTTPManager, HTTPManagerBaseRequest } from 'turbocommons-ts';
2
- import { DialogService } from './dialog.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Manages application http communications
6
- */
7
- export declare class HTTPService extends HTTPManager {
8
- dialogService: DialogService;
9
- /**
10
- * execute() method option that tells the service to avoid blocking the user interface with a modal busy state while the requests that are
11
- * launched by the execute method are running.
12
- */
13
- static readonly NO_MODAL_BUSY_STATE = "NO_MODAL_BUSY_STATE";
14
- /**
15
- * execute() method option that tells the service to skip showing an error dialog when a request fails. We normally use this to handle the
16
- * errors by ourselves or if we want to hide the error dialog for a specific request.
17
- */
18
- static readonly DISABLE_ERROR_HANDLING = "DISABLE_ERROR_HANDLING";
19
- constructor(dialogService: DialogService);
20
- /**
21
- * The same method as HTTPManager.execute but with the ability to enable several options which are specific to this service:
22
- *
23
- * - HTTPService.NO_MODAL_BUSY_STATE To prevent the default behaviour of locking the UI while the request is running
24
- * - HTTPService.DISABLE_ERROR_HANDLING To prevent the default behaviour of showing a detailed error dialog when a request fails
25
- *
26
- * @see HTTPManager.execute()
27
- */
28
- execute(requests: string | string[] | HTTPManagerBaseRequest | HTTPManagerBaseRequest[], finishedCallback?: ((results: {
29
- url: string;
30
- response: any;
31
- isError: boolean;
32
- errorMsg: string;
33
- code: number;
34
- }[], anyError: boolean) => void) | null, progressCallback?: null | ((completedUrl: string, totalRequests: number) => void), options?: (typeof HTTPService.NO_MODAL_BUSY_STATE | typeof HTTPService.DISABLE_ERROR_HANDLING)[]): void;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<HTTPService, never>;
36
- static ɵprov: i0.ɵɵInjectableDeclaration<HTTPService>;
37
- }
1
+ import { HTTPManager, HTTPManagerBaseRequest } from 'turbocommons-ts';
2
+ import { DialogService } from './dialog.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Manages application http communications
6
+ */
7
+ export declare class HTTPService extends HTTPManager {
8
+ dialogService: DialogService;
9
+ /**
10
+ * execute() method option that tells the service to avoid blocking the user interface with a modal busy state while the requests that are
11
+ * launched by the execute method are running.
12
+ */
13
+ static readonly NO_MODAL_BUSY_STATE = "NO_MODAL_BUSY_STATE";
14
+ /**
15
+ * execute() method option that tells the service to skip showing an error dialog when a request fails. We normally use this to handle the
16
+ * errors by ourselves or if we want to hide the error dialog for a specific request.
17
+ */
18
+ static readonly DISABLE_ERROR_HANDLING = "DISABLE_ERROR_HANDLING";
19
+ constructor(dialogService: DialogService);
20
+ /**
21
+ * The same method as HTTPManager.execute but with the ability to enable several options which are specific to this service:
22
+ *
23
+ * - HTTPService.NO_MODAL_BUSY_STATE To prevent the default behaviour of locking the UI while the request is running
24
+ * - HTTPService.DISABLE_ERROR_HANDLING To prevent the default behaviour of showing a detailed error dialog when a request fails
25
+ *
26
+ * @see HTTPManager.execute()
27
+ */
28
+ execute(requests: string | string[] | HTTPManagerBaseRequest | HTTPManagerBaseRequest[], finishedCallback?: ((results: {
29
+ url: string;
30
+ response: any;
31
+ isError: boolean;
32
+ errorMsg: string;
33
+ code: number;
34
+ }[], anyError: boolean) => void) | null, progressCallback?: null | ((completedUrl: string, totalRequests: number) => void), options?: (typeof HTTPService.NO_MODAL_BUSY_STATE | typeof HTTPService.DISABLE_ERROR_HANDLING)[]): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<HTTPService, never>;
36
+ static ɵprov: i0.ɵɵInjectableDeclaration<HTTPService>;
37
+ }
38
38
  //# sourceMappingURL=http.service.d.ts.map