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
|
@@ -1,68 +1,68 @@
|
|
|
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 { Injectable } 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 class GlobalErrorService {
|
|
28
|
-
constructor() {
|
|
29
|
-
/**
|
|
30
|
-
* Enables or disables the error notification to user via an alert box
|
|
31
|
-
* Extend this class and override this value on your custom error handle to change it
|
|
32
|
-
*/
|
|
33
|
-
this.showExceptionsToUser = true;
|
|
34
|
-
/**
|
|
35
|
-
* Enables or disables the error notification to user via an alert box
|
|
36
|
-
* Extend this class and override this value on your custom error handle to change it
|
|
37
|
-
*/
|
|
38
|
-
this.showExceptionsOnConsole = true;
|
|
39
|
-
/**
|
|
40
|
-
* Defines the text that will be used for the alert that is shown to the user when an exception happens
|
|
41
|
-
* and showExceptionsToUser is true
|
|
42
|
-
* Extend this class and override this value on your custom error handle to change it
|
|
43
|
-
*/
|
|
44
|
-
this.errorAlertMessage = 'Application exception:\n\n';
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Show an alert with the received error detail and also log it to the js console.
|
|
48
|
-
*
|
|
49
|
-
* Angular expects at least this method to be implemented on any class that is used as a global exception handler.
|
|
50
|
-
*
|
|
51
|
-
* @param error An error instance
|
|
52
|
-
*/
|
|
53
|
-
handleError(error) {
|
|
54
|
-
if (this.showExceptionsToUser) {
|
|
55
|
-
alert(this.errorAlertMessage + error);
|
|
56
|
-
}
|
|
57
|
-
if (this.showExceptionsOnConsole) {
|
|
58
|
-
console.log(error);
|
|
59
|
-
}
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
63
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
64
|
-
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
66
|
-
type: Injectable
|
|
67
|
-
}] });
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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 { Injectable } 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 class GlobalErrorService {
|
|
28
|
+
constructor() {
|
|
29
|
+
/**
|
|
30
|
+
* Enables or disables the error notification to user via an alert box
|
|
31
|
+
* Extend this class and override this value on your custom error handle to change it
|
|
32
|
+
*/
|
|
33
|
+
this.showExceptionsToUser = true;
|
|
34
|
+
/**
|
|
35
|
+
* Enables or disables the error notification to user via an alert box
|
|
36
|
+
* Extend this class and override this value on your custom error handle to change it
|
|
37
|
+
*/
|
|
38
|
+
this.showExceptionsOnConsole = true;
|
|
39
|
+
/**
|
|
40
|
+
* Defines the text that will be used for the alert that is shown to the user when an exception happens
|
|
41
|
+
* and showExceptionsToUser is true
|
|
42
|
+
* Extend this class and override this value on your custom error handle to change it
|
|
43
|
+
*/
|
|
44
|
+
this.errorAlertMessage = 'Application exception:\n\n';
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Show an alert with the received error detail and also log it to the js console.
|
|
48
|
+
*
|
|
49
|
+
* Angular expects at least this method to be implemented on any class that is used as a global exception handler.
|
|
50
|
+
*
|
|
51
|
+
* @param error An error instance
|
|
52
|
+
*/
|
|
53
|
+
handleError(error) {
|
|
54
|
+
if (this.showExceptionsToUser) {
|
|
55
|
+
alert(this.errorAlertMessage + error);
|
|
56
|
+
}
|
|
57
|
+
if (this.showExceptionsOnConsole) {
|
|
58
|
+
console.log(error);
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: GlobalErrorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
63
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: GlobalErrorService }); }
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: GlobalErrorService, decorators: [{
|
|
66
|
+
type: Injectable
|
|
67
|
+
}] });
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsZXJyb3Iuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R1cmJvZ3VpLWFuZ3VsYXIvc3JjL21haW4vY29udHJvbGxlci9nbG9iYWxlcnJvci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7O0dBT0c7QUFFSCxPQUFPLEVBQUUsVUFBVSxFQUFnQixNQUFNLGVBQWUsQ0FBQzs7QUFHekQ7Ozs7Ozs7Ozs7Ozs7OztHQWVHO0FBRUgsTUFBTSxPQUFPLGtCQUFrQjtJQUQvQjtRQUlJOzs7V0FHRztRQUNjLHlCQUFvQixHQUFHLElBQUksQ0FBQztRQUc3Qzs7O1d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G9tIGVycm9yIGhhbmRsZSB0byBjaGFuZ2UgaXRcclxuICAgICAqL1xyXG4gICAgcHJpdmF0ZSByZWFkb25seSBlcnJvckFsZXJ0TWVzc2FnZSA9ICdBcHBsaWNhdGlvbiBleGNlcHRpb246XFxuXFxuJztcclxuXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBTaG93IGFuIGFsZXJ0IHdpdGggdGhlIHJlY2VpdmVkIGVycm9yIGRldGFpbCBhbmQgYWxzbyBsb2cgaXQgdG8gdGhlIGpzIGNvbnNvbGUuXHJcbiAgICAgKlxyXG4gICAgICogQW5ndWxhciBleHBlY3RzIGF0IGxlYXN0IHRoaXMgbWV0aG9kIHRvIGJlIGltcGxlbWVudGVkIG9uIGFueSBjbGFzcyB0aGF0IGlzIHVzZWQgYXMgYSBnbG9iYWwgZXhjZXB0aW9uIGhhbmRsZXIuXHJcbiAgICAgKlxyXG4gICAgICogQHBhcmFtIGVycm9yIEFuIGVycm9yIGluc3RhbmNlXHJcbiAgICAgKi9cclxuICAgIGhhbmRsZUVycm9yKGVycm9yOiBhbnkpIHtcclxuXHJcbiAgICAgICAgaWYgKHRoaXMuc2hvd0V4Y2VwdGlvbnNUb1VzZXIpIHtcclxuXHJcbiAgICAgICAgICAgIGFsZXJ0KHRoaXMuZXJyb3JBbGVydE1lc3NhZ2UgKyAoZXJyb3IgYXMgc3RyaW5nKSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAodGhpcy5zaG93RXhjZXB0aW9uc09uQ29uc29sZSkge1xyXG5cclxuICAgICAgICAgICAgY29uc29sZS5sb2coZXJyb3IpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgdGhyb3cgZXJyb3I7XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -1,70 +1,70 @@
|
|
|
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 { Injectable } from '@angular/core';
|
|
10
|
-
import { HTTPManager, StringUtils } from 'turbocommons-ts';
|
|
11
|
-
import { DialogErrorComponent } from '../view/components/dialog-error/dialog-error.component';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "./dialog.service";
|
|
14
|
-
/**
|
|
15
|
-
* Manages application http communications
|
|
16
|
-
*/
|
|
17
|
-
export class HTTPService extends HTTPManager {
|
|
18
|
-
/**
|
|
19
|
-
* execute() method option that tells the service to avoid blocking the user interface with a modal busy state while the requests that are
|
|
20
|
-
* launched by the execute method are running.
|
|
21
|
-
*/
|
|
22
|
-
static { this.NO_MODAL_BUSY_STATE = 'NO_MODAL_BUSY_STATE'; }
|
|
23
|
-
/**
|
|
24
|
-
* execute() method option that tells the service to skip showing an error dialog when a request fails. We normally use this to handle the
|
|
25
|
-
* errors by ourselves or if we want to hide the error dialog for a specific request.
|
|
26
|
-
*/
|
|
27
|
-
static { this.DISABLE_ERROR_HANDLING = 'DISABLE_ERROR_HANDLING'; }
|
|
28
|
-
constructor(dialogService) {
|
|
29
|
-
super(true);
|
|
30
|
-
this.dialogService = dialogService;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* The same method as HTTPManager.execute but with the ability to enable several options which are specific to this service:
|
|
34
|
-
*
|
|
35
|
-
* - HTTPService.NO_MODAL_BUSY_STATE To prevent the default behaviour of locking the UI while the request is running
|
|
36
|
-
* - HTTPService.DISABLE_ERROR_HANDLING To prevent the default behaviour of showing a detailed error dialog when a request fails
|
|
37
|
-
*
|
|
38
|
-
* @see HTTPManager.execute()
|
|
39
|
-
*/
|
|
40
|
-
execute(requests, finishedCallback = null, progressCallback = null, options = []) {
|
|
41
|
-
if (options.indexOf(HTTPService.NO_MODAL_BUSY_STATE) < 0) {
|
|
42
|
-
this.dialogService.addModalBusyState();
|
|
43
|
-
}
|
|
44
|
-
super.execute(requests, (results, anyError) => {
|
|
45
|
-
if (options.indexOf(HTTPService.NO_MODAL_BUSY_STATE) < 0) {
|
|
46
|
-
this.dialogService.removeModalBusyState();
|
|
47
|
-
}
|
|
48
|
-
if ((options.indexOf(HTTPService.DISABLE_ERROR_HANDLING) < 0) && anyError) {
|
|
49
|
-
for (let result of results) {
|
|
50
|
-
if (result.isError) {
|
|
51
|
-
let errorMsg = result.errorMsg + '\n\n' + result.response;
|
|
52
|
-
if (StringUtils.isEmpty(errorMsg)) {
|
|
53
|
-
errorMsg = 'Unknown error. Make sure Internet connection is available';
|
|
54
|
-
}
|
|
55
|
-
this.dialogService.addDialog('600px', ['Error: ' + result.code, errorMsg], ['Ok'], DialogErrorComponent);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (finishedCallback !== null) {
|
|
60
|
-
finishedCallback(results, anyError);
|
|
61
|
-
}
|
|
62
|
-
}, progressCallback);
|
|
63
|
-
}
|
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
65
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
66
|
-
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
68
|
-
type: Injectable
|
|
69
|
-
}], ctorParameters:
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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 { Injectable } from '@angular/core';
|
|
10
|
+
import { HTTPManager, StringUtils } from 'turbocommons-ts';
|
|
11
|
+
import { DialogErrorComponent } from '../view/components/dialog-error/dialog-error.component';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "./dialog.service";
|
|
14
|
+
/**
|
|
15
|
+
* Manages application http communications
|
|
16
|
+
*/
|
|
17
|
+
export class HTTPService extends HTTPManager {
|
|
18
|
+
/**
|
|
19
|
+
* execute() method option that tells the service to avoid blocking the user interface with a modal busy state while the requests that are
|
|
20
|
+
* launched by the execute method are running.
|
|
21
|
+
*/
|
|
22
|
+
static { this.NO_MODAL_BUSY_STATE = 'NO_MODAL_BUSY_STATE'; }
|
|
23
|
+
/**
|
|
24
|
+
* execute() method option that tells the service to skip showing an error dialog when a request fails. We normally use this to handle the
|
|
25
|
+
* errors by ourselves or if we want to hide the error dialog for a specific request.
|
|
26
|
+
*/
|
|
27
|
+
static { this.DISABLE_ERROR_HANDLING = 'DISABLE_ERROR_HANDLING'; }
|
|
28
|
+
constructor(dialogService) {
|
|
29
|
+
super(true);
|
|
30
|
+
this.dialogService = dialogService;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The same method as HTTPManager.execute but with the ability to enable several options which are specific to this service:
|
|
34
|
+
*
|
|
35
|
+
* - HTTPService.NO_MODAL_BUSY_STATE To prevent the default behaviour of locking the UI while the request is running
|
|
36
|
+
* - HTTPService.DISABLE_ERROR_HANDLING To prevent the default behaviour of showing a detailed error dialog when a request fails
|
|
37
|
+
*
|
|
38
|
+
* @see HTTPManager.execute()
|
|
39
|
+
*/
|
|
40
|
+
execute(requests, finishedCallback = null, progressCallback = null, options = []) {
|
|
41
|
+
if (options.indexOf(HTTPService.NO_MODAL_BUSY_STATE) < 0) {
|
|
42
|
+
this.dialogService.addModalBusyState();
|
|
43
|
+
}
|
|
44
|
+
super.execute(requests, (results, anyError) => {
|
|
45
|
+
if (options.indexOf(HTTPService.NO_MODAL_BUSY_STATE) < 0) {
|
|
46
|
+
this.dialogService.removeModalBusyState();
|
|
47
|
+
}
|
|
48
|
+
if ((options.indexOf(HTTPService.DISABLE_ERROR_HANDLING) < 0) && anyError) {
|
|
49
|
+
for (let result of results) {
|
|
50
|
+
if (result.isError) {
|
|
51
|
+
let errorMsg = result.errorMsg + '\n\n' + result.response;
|
|
52
|
+
if (StringUtils.isEmpty(errorMsg)) {
|
|
53
|
+
errorMsg = 'Unknown error. Make sure Internet connection is available';
|
|
54
|
+
}
|
|
55
|
+
this.dialogService.addDialog('600px', ['Error: ' + result.code, errorMsg], ['Ok'], DialogErrorComponent);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (finishedCallback !== null) {
|
|
60
|
+
finishedCallback(results, anyError);
|
|
61
|
+
}
|
|
62
|
+
}, progressCallback);
|
|
63
|
+
}
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: HTTPService, deps: [{ token: i1.DialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
65
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: HTTPService }); }
|
|
66
|
+
}
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: HTTPService, decorators: [{
|
|
68
|
+
type: Injectable
|
|
69
|
+
}], ctorParameters: () => [{ type: i1.DialogService }] });
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHVyYm9ndW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lcnZpY2UuTk9fTU9EQUxfQlVTWV9TVEFURXx0eXBlb2YgSFRUUFNlcnZpY2UuRElTQUJMRV9FUlJPUl9IQU5ETElORylbXSA9IFtdKXtcclxuICAgIFxyXG4gICAgICAgIGlmKG9wdGlvbnMuaW5kZXhPZihIVFRQU2VydmljZS5OT19NT0RBTF9CVVNZX1NUQVRFKSA8IDApe1xyXG4gICAgICAgICAgIFxyXG4gICAgICAgICAgIHRoaXMuZGlhbG9nU2VydmljZS5hZGRNb2RhbEJ1c3lTdGF0ZSgpOyBcclxuICAgICAgICB9XHJcbiAgICBcclxuICAgICAgICBzdXBlci5leGVjdXRlKHJlcXVlc3RzLCAocmVzdWx0cywgYW55RXJyb3IpID0+IHsgXHJcbiAgICAgICAgICAgIFxyXG4gICAgICAgICAgICBpZihvcHRpb25zLmluZGV4T2YoSFRUUFNlcnZpY2UuTk9fTU9EQUxfQlVTWV9TVEFURSkgPCAwKXtcclxuICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgdGhpcy5kaWFsb2dTZXJ2aWNlLnJlbW92ZU1vZGFsQnVzeVN0YXRlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgXHJcbiAgICAgICAgICAgIGlmKChvcHRpb25zLmluZGV4T2YoSFRUUFNlcnZpY2UuRElTQUJMRV9FUlJPUl9IQU5ETElORykgPCAwKSAmJiBhbnlFcnJvcil7XHJcbiAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgIGZvcihsZXQgcmVzdWx0IG9mIHJlc3VsdHMpe1xyXG4gICAgICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgICAgIGlmKHJlc3VsdC5pc0Vycm9yKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlcnJvck1zZyA9IHJlc3VsdC5lcnJvck1zZyArICdcXG5cXG4nICsgcmVzdWx0LnJlc3BvbnNlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoU3RyaW5nVXRpbHMuaXNFbXB0eShlcnJvck1zZykpe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTXNnID0gJ1Vua25vd24gZXJyb3IuIE1ha2Ugc3VyZSBJbnRlcm5ldCBjb25uZWN0aW9uIGlzIGF2YWlsYWJsZSc7ICAgIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kaWFsb2dTZXJ2aWNlLmFkZERpYWxvZygnNjAwcHgnLCBbJ0Vycm9yOiAnICsgcmVzdWx0LmNvZGUsIGVycm9yTXNnXSwgWydPayddLCBEaWFsb2dFcnJvckNvbXBvbmVudCk7ICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgXHJcbiAgICAgICAgICAgIGlmKGZpbmlzaGVkQ2FsbGJhY2sgIT09IG51bGwpe1xyXG4gICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICBmaW5pc2hlZENhbGxiYWNrKHJlc3VsdHMsIGFueUVycm9yKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBcclxuICAgICAgICAgfSwgcHJvZ3Jlc3NDYWxsYmFjayk7XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -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 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 class HTTPServiceGetRequest extends HTTPManagerGetRequest {
|
|
14
|
+
}
|
|
15
15
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSFRUUFNlcnZpY2VHZXRSZXF1ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHVyYm9ndWktYW5ndWxhci9zcmMvbWFpbi9jb250cm9sbGVyL2h0dHBzZXJ2aWNlL0hUVFBTZXJ2aWNlR2V0UmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7OztHQU9HO0FBR0gsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFHeEQ7O0dBRUc7QUFDSCxNQUFNLE9BQU8scUJBQXNCLFNBQVEscUJBQXFCO0NBQy9EIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXHJcbiAqIFR1cmJvR1VJIGlzIEEgbGlicmFyeSB0aGF0IGhlbHBzIHdpdGggdGhlIG1vc3QgY29tbW9uIGFuZCBnZW5lcmljIFVJIGVsZW1lbnRzIGFuZCBmdW5jdGlvbmFsaXRpZXNcclxuICpcclxuICogV2Vic2l0ZSA6IC0+IGh0dHA6Ly93d3cudHVyYm9ndWkub3JnXHJcbiAqIExpY2Vuc2UgOiAtPiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wLiBZb3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuXHJcbiAqIExpY2Vuc2UgVXJsIDogLT4gaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wXHJcbiAqIENvcHlSaWdodCA6IC0+IENvcHlyaWdodCAyMDE4IEVkZXJ0b25lIEFkdmFuZGVkIFNvbHV0aW9ucy4gaHR0cHM6Ly93d3cuZWRlcnRvbmUuY29tXHJcbiAqL1xyXG5cclxuXHJcbmltcG9ydCB7IEhUVFBNYW5hZ2VyR2V0UmVxdWVzdCB9IGZyb20gJ3R1cmJvY29tbW9ucy10cyc7XHJcblxyXG5cclxuLyoqXHJcbiAqIENsYXNzIHRoYXQgZGVmaW5lcyBhIEdFVCBodHRwIHJlcXVlc3QsIHRvIGJlIHVzZWQgYnkgSHR0cFNlcnZpY2VcclxuICovXHJcbmV4cG9ydCBjbGFzcyBIVFRQU2VydmljZUdldFJlcXVlc3QgZXh0ZW5kcyBIVFRQTWFuYWdlckdldFJlcXVlc3Qge1xyXG59XHJcbiJdfQ==
|
|
@@ -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 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 class HTTPServicePostRequest extends HTTPManagerPostRequest {
|
|
14
|
+
}
|
|
15
15
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSFRUUFNlcnZpY2VQb3N0UmVxdWVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R1cmJvZ3VpLWFuZ3VsYXIvc3JjL21haW4vY29udHJvbGxlci9odHRwc2VydmljZS9IVFRQU2VydmljZVBvc3RSZXF1ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7O0dBT0c7QUFHSCxPQUFPLEVBQ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
|
@@ -1,22 +1,22 @@
|
|
|
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 { Injectable } from '@angular/core';
|
|
10
|
-
import { LocalizationManager } from 'turbocommons-ts';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
/**
|
|
13
|
-
* Manages application text translations and languages
|
|
14
|
-
*/
|
|
15
|
-
export class LocalizationService extends LocalizationManager {
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
18
|
-
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
-
type: Injectable
|
|
21
|
-
}] });
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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 { Injectable } from '@angular/core';
|
|
10
|
+
import { LocalizationManager } from 'turbocommons-ts';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
/**
|
|
13
|
+
* Manages application text translations and languages
|
|
14
|
+
*/
|
|
15
|
+
export class LocalizationService extends LocalizationManager {
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: LocalizationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
17
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: LocalizationService }); }
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: LocalizationService, decorators: [{
|
|
20
|
+
type: Injectable
|
|
21
|
+
}] });
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxpemF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dXJib2d1aS1hbmd1bGFyL3NyYy9tYWluL2NvbnRyb2xsZXIvbG9jYWxpemF0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7R0FPRztBQUVILE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0saUJBQWlCLENBQUM7O0FBR3REOztHQUVHO0FBRUgsTUFBTSxPQUFPLG1CQUFvQixTQUFRLG1CQUFtQjs4R0FBL0MsbUJBQW1CO2tIQUFuQixtQkFBbUI7OzJGQUFuQixtQkFBbUI7a0JBRC9CLFVBQVUiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcclxuICogVHVyYm9HVUkgaXMgQSBsaWJyYXJ5IHRoYXQgaGVscHMgd2l0aCB0aGUgbW9zdCBjb21tb24gYW5kIGdlbmVyaWMgVUkgZWxlbWVudHMgYW5kIGZ1bmN0aW9uYWxpdGllc1xyXG4gKlxyXG4gKiBXZWJzaXRlIDogLT4gaHR0cDovL3d3dy50dXJib2d1aS5vcmdcclxuICogTGljZW5zZSA6IC0+IExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAuIFlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS5cclxuICogTGljZW5zZSBVcmwgOiAtPiBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjBcclxuICogQ29weVJpZ2h0IDogLT4gQ29weXJpZ2h0IDIwMTggRWRlcnRvbmUgQWR2YW5kZWQgU29sdXRpb25zLiBodHRwczovL3d3dy5lZGVydG9uZS5jb21cclxuICovXHJcblxyXG5pbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7IExvY2FsaXphdGlvbk1hbmFnZXIgfSBmcm9tICd0dXJib2NvbW1vbnMtdHMnO1xyXG5cclxuXHJcbi8qKlxyXG4gKiBNYW5hZ2VzIGFwcGxpY2F0aW9uIHRleHQgdHJhbnNsYXRpb25zIGFuZCBsYW5ndWFnZXNcclxuICovXHJcbkBJbmplY3RhYmxlKClcclxuZXhwb3J0IGNsYXNzIExvY2FsaXphdGlvblNlcnZpY2UgZXh0ZW5kcyBMb2NhbGl6YXRpb25NYW5hZ2VyIHtcclxuXHJcbn1cclxuIl19
|
|
@@ -1,56 +1,56 @@
|
|
|
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 { Injectable } from '@angular/core';
|
|
10
|
-
import { Subject } from 'rxjs';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
/**
|
|
13
|
-
* This is the main application event bus.
|
|
14
|
-
* All global events that happen on the application are broadcasted by this service, and
|
|
15
|
-
* can be listened by any application element who previously subscribed
|
|
16
|
-
*/
|
|
17
|
-
export class NotificationService {
|
|
18
|
-
constructor() {
|
|
19
|
-
/**
|
|
20
|
-
* The Observable instance that handles subscriptions and notifications
|
|
21
|
-
*/
|
|
22
|
-
this._notifications = new Subject();
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* used by other services or components to subscribe to all notifications that are generated by this service
|
|
26
|
-
*
|
|
27
|
-
* @param notificationHandler A method that will be used to receive each notification as a GUINotification instance
|
|
28
|
-
*
|
|
29
|
-
* @returns The new subscription object. Make sure to unsubscribe when not required anymore
|
|
30
|
-
*/
|
|
31
|
-
subscribe(notificationHandler) {
|
|
32
|
-
return this._notifications.subscribe(notificationHandler);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Launch a notification to anyone who may be listening
|
|
36
|
-
*
|
|
37
|
-
* @param notification A notification instance to launch
|
|
38
|
-
*/
|
|
39
|
-
send(notification) {
|
|
40
|
-
this._notifications.next(notification);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* End a previously initiated subscription
|
|
44
|
-
*
|
|
45
|
-
* @param subscription A previously created subscription instance from which we want to unsubscribe
|
|
46
|
-
*/
|
|
47
|
-
unsubscribe(subscription) {
|
|
48
|
-
return subscription.unsubscribe();
|
|
49
|
-
}
|
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
52
|
-
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
-
type: Injectable
|
|
55
|
-
}] });
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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 { Injectable } from '@angular/core';
|
|
10
|
+
import { Subject } from 'rxjs';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
/**
|
|
13
|
+
* This is the main application event bus.
|
|
14
|
+
* All global events that happen on the application are broadcasted by this service, and
|
|
15
|
+
* can be listened by any application element who previously subscribed
|
|
16
|
+
*/
|
|
17
|
+
export class NotificationService {
|
|
18
|
+
constructor() {
|
|
19
|
+
/**
|
|
20
|
+
* The Observable instance that handles subscriptions and notifications
|
|
21
|
+
*/
|
|
22
|
+
this._notifications = new Subject();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* used by other services or components to subscribe to all notifications that are generated by this service
|
|
26
|
+
*
|
|
27
|
+
* @param notificationHandler A method that will be used to receive each notification as a GUINotification instance
|
|
28
|
+
*
|
|
29
|
+
* @returns The new subscription object. Make sure to unsubscribe when not required anymore
|
|
30
|
+
*/
|
|
31
|
+
subscribe(notificationHandler) {
|
|
32
|
+
return this._notifications.subscribe(notificationHandler);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Launch a notification to anyone who may be listening
|
|
36
|
+
*
|
|
37
|
+
* @param notification A notification instance to launch
|
|
38
|
+
*/
|
|
39
|
+
send(notification) {
|
|
40
|
+
this._notifications.next(notification);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* End a previously initiated subscription
|
|
44
|
+
*
|
|
45
|
+
* @param subscription A previously created subscription instance from which we want to unsubscribe
|
|
46
|
+
*/
|
|
47
|
+
unsubscribe(subscription) {
|
|
48
|
+
return subscription.unsubscribe();
|
|
49
|
+
}
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
51
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NotificationService }); }
|
|
52
|
+
}
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NotificationService, decorators: [{
|
|
54
|
+
type: Injectable
|
|
55
|
+
}] });
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dXJib2d1aS1hbmd1bGFyL3NyYy9tYWluL2NvbnRyb2xsZXIvbm90aWZpY2F0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7R0FPRztBQUVILE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLE9BQU8sRUFBZ0IsTUFBTSxNQUFNLENBQUM7O0FBSTdDOzs7O0dBSUc7QUFFSCxNQUFNLE9BQU8sbUJBQW1CO0lBRGhDO1FBSUk7O1dBRUc7UUFDYyxtQkFBYyxHQUFHLElBQUksT0FBTyxFQUFtQixDQUFDO0tBb0NwRTtJQWpDRzs7Ozs7O09BTUc7SUFDSCxTQUFTLENBQUMsbUJBQTJEO1FBRWpFLE9BQU8sSUFBSSxDQUF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