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
@@ -1,15 +1,15 @@
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 { HTTPManagerGetRequest } from 'turbocommons-ts';
10
- /**
11
- * Class that defines a GET http request, to be used by HttpService
12
- */
13
- export declare class HTTPServiceGetRequest extends HTTPManagerGetRequest {
14
- }
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 { HTTPManagerGetRequest } from 'turbocommons-ts';
10
+ /**
11
+ * Class that defines a GET http request, to be used by HttpService
12
+ */
13
+ export declare class HTTPServiceGetRequest extends HTTPManagerGetRequest {
14
+ }
15
15
  //# sourceMappingURL=HTTPServiceGetRequest.d.ts.map
@@ -1,15 +1,15 @@
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 { HTTPManagerPostRequest } from 'turbocommons-ts';
10
- /**
11
- * Class that defines a POST http request, to be used by HttpService
12
- */
13
- export declare class HTTPServicePostRequest extends HTTPManagerPostRequest {
14
- }
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 { HTTPManagerPostRequest } from 'turbocommons-ts';
10
+ /**
11
+ * Class that defines a POST http request, to be used by HttpService
12
+ */
13
+ export declare class HTTPServicePostRequest extends HTTPManagerPostRequest {
14
+ }
15
15
  //# sourceMappingURL=HTTPServicePostRequest.d.ts.map
@@ -1,10 +1,10 @@
1
- import { LocalizationManager } from 'turbocommons-ts';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Manages application text translations and languages
5
- */
6
- export declare class LocalizationService extends LocalizationManager {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationService, never>;
8
- static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
9
- }
1
+ import { LocalizationManager } from 'turbocommons-ts';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Manages application text translations and languages
5
+ */
6
+ export declare class LocalizationService extends LocalizationManager {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
9
+ }
10
10
  //# sourceMappingURL=localization.service.d.ts.map
@@ -1,37 +1,37 @@
1
- import { Subscription } from 'rxjs';
2
- import { GUINotification } from '../model/classes/GUINotification';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * This is the main application event bus.
6
- * All global events that happen on the application are broadcasted by this service, and
7
- * can be listened by any application element who previously subscribed
8
- */
9
- export declare class NotificationService {
10
- /**
11
- * The Observable instance that handles subscriptions and notifications
12
- */
13
- private readonly _notifications;
14
- /**
15
- * used by other services or components to subscribe to all notifications that are generated by this service
16
- *
17
- * @param notificationHandler A method that will be used to receive each notification as a GUINotification instance
18
- *
19
- * @returns The new subscription object. Make sure to unsubscribe when not required anymore
20
- */
21
- subscribe(notificationHandler: (notification: GUINotification) => any): Subscription;
22
- /**
23
- * Launch a notification to anyone who may be listening
24
- *
25
- * @param notification A notification instance to launch
26
- */
27
- send(notification: GUINotification): void;
28
- /**
29
- * End a previously initiated subscription
30
- *
31
- * @param subscription A previously created subscription instance from which we want to unsubscribe
32
- */
33
- unsubscribe(subscription: Subscription): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
35
- static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
36
- }
1
+ import { Subscription } from 'rxjs';
2
+ import { GUINotification } from '../model/classes/GUINotification';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * This is the main application event bus.
6
+ * All global events that happen on the application are broadcasted by this service, and
7
+ * can be listened by any application element who previously subscribed
8
+ */
9
+ export declare class NotificationService {
10
+ /**
11
+ * The Observable instance that handles subscriptions and notifications
12
+ */
13
+ private readonly _notifications;
14
+ /**
15
+ * used by other services or components to subscribe to all notifications that are generated by this service
16
+ *
17
+ * @param notificationHandler A method that will be used to receive each notification as a GUINotification instance
18
+ *
19
+ * @returns The new subscription object. Make sure to unsubscribe when not required anymore
20
+ */
21
+ subscribe(notificationHandler: (notification: GUINotification) => any): Subscription;
22
+ /**
23
+ * Launch a notification to anyone who may be listening
24
+ *
25
+ * @param notification A notification instance to launch
26
+ */
27
+ send(notification: GUINotification): void;
28
+ /**
29
+ * End a previously initiated subscription
30
+ *
31
+ * @param subscription A previously created subscription instance from which we want to unsubscribe
32
+ */
33
+ unsubscribe(subscription: Subscription): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
36
+ }
37
37
  //# sourceMappingURL=notification.service.d.ts.map
@@ -1,58 +1,58 @@
1
- import { HTTPService } from '../controller/http.service';
2
- import { LocalizationService } from '../controller/localization.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Manages the users model and commands
6
- */
7
- export declare class UserService {
8
- httpService: HTTPService;
9
- ls: LocalizationService;
10
- /**
11
- * Path to the web service that performs the user login
12
- */
13
- loginWebService: string;
14
- /**
15
- * The username that is currently defined and will be used by the login methods
16
- */
17
- userName: string;
18
- /**
19
- * The password for the user that is currently defined and will be used by the login methods
20
- */
21
- password: string;
22
- /**
23
- * Check public getter for docs
24
- */
25
- private _isLogged;
26
- /**
27
- * @see token() getter for more info
28
- */
29
- private _token;
30
- constructor(httpService: HTTPService, ls: LocalizationService);
31
- /**
32
- * Tells if the services contains a non empty username and password specified
33
- */
34
- get isUserAndPswDefined(): boolean;
35
- /**
36
- * Tells if exists a user that is currently logged or not
37
- */
38
- get isLogged(): boolean;
39
- /**
40
- * Gives the value for the currently active user authentication token or an empty string if no user logged
41
- */
42
- get token(): string;
43
- /**
44
- * Perform a user login against the configured login webservice
45
- *
46
- * @param loginOkCallback Method to be executed once the login finishes chorrectly. An object with all the service response data will be passed to this method
47
- * @param loginFailCallback Method to be executed once the login finishes incorrectly.
48
- */
49
- login(loginOkCallback?: null | ((response: any) => void), loginFailCallback?: null | (() => void)): void;
50
- /**
51
- * Perform the logout for the currently logged user
52
- */
53
- logout(logoutOkCallback?: null | (() => void)): void;
54
- private _clearUserAndToken;
55
- static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
56
- static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
57
- }
1
+ import { HTTPService } from '../controller/http.service';
2
+ import { LocalizationService } from '../controller/localization.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Manages the users model and commands
6
+ */
7
+ export declare class UserService {
8
+ httpService: HTTPService;
9
+ ls: LocalizationService;
10
+ /**
11
+ * Path to the web service that performs the user login
12
+ */
13
+ loginWebService: string;
14
+ /**
15
+ * The username that is currently defined and will be used by the login methods
16
+ */
17
+ userName: string;
18
+ /**
19
+ * The password for the user that is currently defined and will be used by the login methods
20
+ */
21
+ password: string;
22
+ /**
23
+ * Check public getter for docs
24
+ */
25
+ private _isLogged;
26
+ /**
27
+ * @see token() getter for more info
28
+ */
29
+ private _token;
30
+ constructor(httpService: HTTPService, ls: LocalizationService);
31
+ /**
32
+ * Tells if the services contains a non empty username and password specified
33
+ */
34
+ get isUserAndPswDefined(): boolean;
35
+ /**
36
+ * Tells if exists a user that is currently logged or not
37
+ */
38
+ get isLogged(): boolean;
39
+ /**
40
+ * Gives the value for the currently active user authentication token or an empty string if no user logged
41
+ */
42
+ get token(): string;
43
+ /**
44
+ * Perform a user login against the configured login webservice
45
+ *
46
+ * @param loginOkCallback Method to be executed once the login finishes chorrectly. An object with all the service response data will be passed to this method
47
+ * @param loginFailCallback Method to be executed once the login finishes incorrectly.
48
+ */
49
+ login(loginOkCallback?: null | ((response: any) => void), loginFailCallback?: null | (() => void)): void;
50
+ /**
51
+ * Perform the logout for the currently logged user
52
+ */
53
+ logout(logoutOkCallback?: null | (() => void)): void;
54
+ private _clearUserAndToken;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
56
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
57
+ }
58
58
  //# sourceMappingURL=user.service.d.ts.map
@@ -1,72 +1,72 @@
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 { Type, ViewContainerRef, ComponentFactoryResolver } from '@angular/core';
10
- import { View } from '../model/classes/View';
11
- import { ViewModel } from '../model/classes/ViewModel';
12
- import * as i0 from "@angular/core";
13
- /**
14
- * Manages adding, removing and manipulating the application views
15
- */
16
- export declare class ViewsService {
17
- private readonly componentFactoryResolver;
18
- /**
19
- * See getter method for docs
20
- */
21
- private _loadedViewClass;
22
- /**
23
- * An instance of the model that is assigned to the currently loaded view
24
- */
25
- private _loadedViewModel;
26
- /**
27
- * See setter method for docs
28
- */
29
- private _viewContainerRef;
30
- constructor(componentFactoryResolver: ComponentFactoryResolver);
31
- /**
32
- * Tells if there's any view currently loaded on the application views container
33
- */
34
- get isViewLoaded(): boolean;
35
- /**
36
- * Stores a reference to the visual element that will be used as the container for all the views.
37
- * This is automatically assigned by the tg-views-container component once it is created.
38
- *
39
- * @see ViewsContainerComponent for more information
40
- */
41
- set viewContainerRef(ref: ViewContainerRef | null);
42
- /**
43
- * Create a new view instance with the specified type and add it to the current application views container. Any currently loaded
44
- * view will be removed
45
- *
46
- * Make sure this method is called when all the visual components of the application have been created (ngAfterViewInit)
47
- *
48
- * @param view The classname for the view that we want to create and add to the views container (must extend View base class).
49
- *
50
- * @return The instance of the newly added and created view.
51
- */
52
- pushView(view: Type<View>): import("@angular/core").ComponentRef<View> | undefined;
53
- /**
54
- * Get the model that is instantiated for the currently active view. (A view model only lives while its view is active)
55
- * If no view model is assigned to the current view or no view is loaded, an exception will be thrown.
56
- *
57
- * @return The current view model instance, which must be casted to the appropiate ViewModel extended class
58
- */
59
- get model(): ViewModel;
60
- /**
61
- * Delete the currently loaded view from the views container, and leave it empty.
62
- * If no view is currently loaded, this method will do nothing
63
- */
64
- popView(): void;
65
- /**
66
- * Auxiliary method to test if the views container instance is available on the application
67
- */
68
- private verifyViewsContainerExist;
69
- static ɵfac: i0.ɵɵFactoryDeclaration<ViewsService, never>;
70
- static ɵprov: i0.ɵɵInjectableDeclaration<ViewsService>;
71
- }
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 { Type, ViewContainerRef, ComponentFactoryResolver } from '@angular/core';
10
+ import { View } from '../model/classes/View';
11
+ import { ViewModel } from '../model/classes/ViewModel';
12
+ import * as i0 from "@angular/core";
13
+ /**
14
+ * Manages adding, removing and manipulating the application views
15
+ */
16
+ export declare class ViewsService {
17
+ private readonly componentFactoryResolver;
18
+ /**
19
+ * See getter method for docs
20
+ */
21
+ private _loadedViewClass;
22
+ /**
23
+ * An instance of the model that is assigned to the currently loaded view
24
+ */
25
+ private _loadedViewModel;
26
+ /**
27
+ * See setter method for docs
28
+ */
29
+ private _viewContainerRef;
30
+ constructor(componentFactoryResolver: ComponentFactoryResolver);
31
+ /**
32
+ * Tells if there's any view currently loaded on the application views container
33
+ */
34
+ get isViewLoaded(): boolean;
35
+ /**
36
+ * Stores a reference to the visual element that will be used as the container for all the views.
37
+ * This is automatically assigned by the tg-views-container component once it is created.
38
+ *
39
+ * @see ViewsContainerComponent for more information
40
+ */
41
+ set viewContainerRef(ref: ViewContainerRef | null);
42
+ /**
43
+ * Create a new view instance with the specified type and add it to the current application views container. Any currently loaded
44
+ * view will be removed
45
+ *
46
+ * Make sure this method is called when all the visual components of the application have been created (ngAfterViewInit)
47
+ *
48
+ * @param view The classname for the view that we want to create and add to the views container (must extend View base class).
49
+ *
50
+ * @return The instance of the newly added and created view.
51
+ */
52
+ pushView(view: Type<View>): import("@angular/core").ComponentRef<View> | undefined;
53
+ /**
54
+ * Get the model that is instantiated for the currently active view. (A view model only lives while its view is active)
55
+ * If no view model is assigned to the current view or no view is loaded, an exception will be thrown.
56
+ *
57
+ * @return The current view model instance, which must be casted to the appropiate ViewModel extended class
58
+ */
59
+ get model(): ViewModel;
60
+ /**
61
+ * Delete the currently loaded view from the views container, and leave it empty.
62
+ * If no view is currently loaded, this method will do nothing
63
+ */
64
+ popView(): void;
65
+ /**
66
+ * Auxiliary method to test if the views container instance is available on the application
67
+ */
68
+ private verifyViewsContainerExist;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewsService, never>;
70
+ static ɵprov: i0.ɵɵInjectableDeclaration<ViewsService>;
71
+ }
72
72
  //# sourceMappingURL=views.service.d.ts.map
@@ -1,52 +1,52 @@
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
- /**
10
- * Sometimes it is necessary to apply some kind of buffer to the user input for certain operations that may be executed
11
- * several times but we need to capture only the latest of them into a certain period of time. This class does exactly this:
12
- * we can queue as many times as we want a specific method call and only the last one will be executed under a defined window of time.
13
- * So for example if a user types keys on an input, we can buffer it for x seconds and perform a request only with the last of its changes.
14
- * Lots of other UI interaction usages may be interesting with this class.
15
- */
16
- export declare class DelayedMethodCallManager {
17
- private delay;
18
- private _functionsToExecute;
19
- private _timerIsRunning;
20
- private _setTimeoutHandler;
21
- /**
22
- * Sometimes it is necessary to apply some kind of buffer to the user input for certain operations that may be executed
23
- * several times but we need to capture only the latest of them into a certain period of time. This class does exactly this:
24
- * we can queue as many times as we want a specific method call and only the last one will be executed under a defined window of time.
25
- * So for example if a user types keys on an input, we can buffer it for x seconds and perform a request only with the last of its changes.
26
- * Lots of other UI interaction usages may be interesting with this class.
27
- *
28
- * @param delay Amount of time to wait before executing the operations . Defaults to 1000 miliseconds.
29
- */
30
- constructor(delay?: number);
31
- /**
32
- * Add a method to be called once the delay time is finished.
33
- * Every time a new call to queue is performed, the delay timer is restarted. When the delay time finishes, only the
34
- * last of the methods that have been pushed by call() will be executed.
35
- *
36
- * Use it to queue several user input operations that should be called only once in a period of time, while waiting
37
- * for the user to finish his input.
38
- *
39
- * @param method The function that will be queued for execution after the delay time has passed
40
- */
41
- queue(method: () => void): void;
42
- /**
43
- * Abort all methods that may have been pushed to this class and are waiting to be executed, so none of them
44
- * is executed when the delay time finishes. Basically everything is cleared and stoped when this method is called.
45
- */
46
- cancel(): void;
47
- /**
48
- * Auxiliary function that performs the call to the latest queued method
49
- */
50
- private run;
51
- }
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
+ /**
10
+ * Sometimes it is necessary to apply some kind of buffer to the user input for certain operations that may be executed
11
+ * several times but we need to capture only the latest of them into a certain period of time. This class does exactly this:
12
+ * we can queue as many times as we want a specific method call and only the last one will be executed under a defined window of time.
13
+ * So for example if a user types keys on an input, we can buffer it for x seconds and perform a request only with the last of its changes.
14
+ * Lots of other UI interaction usages may be interesting with this class.
15
+ */
16
+ export declare class DelayedMethodCallManager {
17
+ private delay;
18
+ private _functionsToExecute;
19
+ private _timerIsRunning;
20
+ private _setTimeoutHandler;
21
+ /**
22
+ * Sometimes it is necessary to apply some kind of buffer to the user input for certain operations that may be executed
23
+ * several times but we need to capture only the latest of them into a certain period of time. This class does exactly this:
24
+ * we can queue as many times as we want a specific method call and only the last one will be executed under a defined window of time.
25
+ * So for example if a user types keys on an input, we can buffer it for x seconds and perform a request only with the last of its changes.
26
+ * Lots of other UI interaction usages may be interesting with this class.
27
+ *
28
+ * @param delay Amount of time to wait before executing the operations . Defaults to 1000 miliseconds.
29
+ */
30
+ constructor(delay?: number);
31
+ /**
32
+ * Add a method to be called once the delay time is finished.
33
+ * Every time a new call to queue is performed, the delay timer is restarted. When the delay time finishes, only the
34
+ * last of the methods that have been pushed by call() will be executed.
35
+ *
36
+ * Use it to queue several user input operations that should be called only once in a period of time, while waiting
37
+ * for the user to finish his input.
38
+ *
39
+ * @param method The function that will be queued for execution after the delay time has passed
40
+ */
41
+ queue(method: () => void): void;
42
+ /**
43
+ * Abort all methods that may have been pushed to this class and are waiting to be executed, so none of them
44
+ * is executed when the delay time finishes. Basically everything is cleared and stoped when this method is called.
45
+ */
46
+ cancel(): void;
47
+ /**
48
+ * Auxiliary function that performs the call to the latest queued method
49
+ */
50
+ private run;
51
+ }
52
52
  //# sourceMappingURL=DelayedMethodCallManager.d.ts.map
@@ -1,28 +1,28 @@
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
- /**
10
- * Defines the data that is contained inside a GUI notification
11
- */
12
- export declare class GUINotification {
13
- constructor(name: string, type?: string, data?: any);
14
- /**
15
- * The name for this notification
16
- */
17
- name: string;
18
- /**
19
- * An optional type to categorize this notification in case the name is not enough
20
- * to uniquely identify it
21
- */
22
- type: string;
23
- /**
24
- * Additional data to send with the notification
25
- */
26
- data: any;
27
- }
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
+ /**
10
+ * Defines the data that is contained inside a GUI notification
11
+ */
12
+ export declare class GUINotification {
13
+ constructor(name: string, type?: string, data?: any);
14
+ /**
15
+ * The name for this notification
16
+ */
17
+ name: string;
18
+ /**
19
+ * An optional type to categorize this notification in case the name is not enough
20
+ * to uniquely identify it
21
+ */
22
+ type: string;
23
+ /**
24
+ * Additional data to send with the notification
25
+ */
26
+ data: any;
27
+ }
28
28
  //# sourceMappingURL=GUINotification.d.ts.map