turbogui-angular 7.0.0 → 9.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 (151) hide show
  1. package/esm2020/main/controller/browser.service.mjs +48 -0
  2. package/esm2020/main/controller/dialog.service.mjs +324 -0
  3. package/esm2020/main/controller/globalerror.service.mjs +68 -0
  4. package/esm2020/main/controller/http.service.mjs +70 -0
  5. package/esm2020/main/controller/localization.service.mjs +22 -0
  6. package/esm2020/main/controller/notification.service.mjs +56 -0
  7. package/esm2020/main/controller/user.service.mjs +124 -0
  8. package/esm2020/main/controller/views.service.mjs +113 -0
  9. package/esm2020/main/model/modules/turbogui-angular.module.mjs +140 -0
  10. package/esm2020/main/view/animations/fade.animation.mjs +35 -0
  11. package/esm2020/main/view/components/busy-state-base/busy-state-base.component.mjs +38 -0
  12. package/esm2020/main/view/components/button-base/button-base.component.mjs +180 -0
  13. package/esm2020/main/view/components/button-container/button-container.component.mjs +34 -0
  14. package/esm2020/main/view/components/button-image/button-image.component.mjs +47 -0
  15. package/esm2020/main/view/components/dialog-error/dialog-error.component.mjs +41 -0
  16. package/esm2020/main/view/components/dialog-multiple-option/dialog-multiple-option.component.mjs +38 -0
  17. package/esm2020/main/view/components/dialog-single-option/dialog-single-option.component.mjs +41 -0
  18. package/esm2020/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.mjs +112 -0
  19. package/esm2020/main/view/components/dialog-two-option/dialog-two-option.component.mjs +42 -0
  20. package/{esm2015/main/view/components/views-container/views-container.component.js → esm2020/main/view/components/views-container/views-container.component.mjs} +15 -13
  21. package/esm2020/main/view/directives/AutoFocusOnDisplayDirective.mjs +39 -0
  22. package/esm2020/main/view/directives/AutoSelectTextOnFocusDirective.mjs +39 -0
  23. package/esm2020/main/view/directives/ElementCreatedDirective.mjs +42 -0
  24. package/esm2020/main/view/directives/ElementDestroyedDirective.mjs +42 -0
  25. package/{esm2015/public_api.js → esm2020/public_api.mjs} +1 -1
  26. package/esm2020/turbogui-angular.mjs +5 -0
  27. package/fesm2015/turbogui-angular.mjs +1951 -0
  28. package/fesm2015/turbogui-angular.mjs.map +1 -0
  29. package/{fesm2015/turbogui-angular.js → fesm2020/turbogui-angular.mjs} +366 -298
  30. package/fesm2020/turbogui-angular.mjs.map +1 -0
  31. package/index.d.ts +6 -0
  32. package/main/controller/browser.service.d.ts +3 -8
  33. package/main/controller/browser.service.d.ts.map +1 -1
  34. package/main/controller/dialog.service.d.ts +3 -8
  35. package/main/controller/dialog.service.d.ts.map +1 -1
  36. package/main/controller/globalerror.service.d.ts +3 -0
  37. package/main/controller/globalerror.service.d.ts.map +1 -1
  38. package/main/controller/http.service.d.ts +3 -8
  39. package/main/controller/http.service.d.ts.map +1 -1
  40. package/main/controller/localization.service.d.ts +3 -8
  41. package/main/controller/localization.service.d.ts.map +1 -1
  42. package/main/controller/notification.service.d.ts +3 -8
  43. package/main/controller/notification.service.d.ts.map +1 -1
  44. package/main/controller/user.service.d.ts +3 -8
  45. package/main/controller/user.service.d.ts.map +1 -1
  46. package/main/controller/views.service.d.ts +3 -0
  47. package/main/controller/views.service.d.ts.map +1 -1
  48. package/main/model/modules/turbogui-angular.module.d.ts +23 -8
  49. package/main/model/modules/turbogui-angular.module.d.ts.map +1 -1
  50. package/main/view/animations/fade.animation.d.ts +3 -8
  51. package/main/view/animations/fade.animation.d.ts.map +1 -1
  52. package/main/view/components/busy-state-base/busy-state-base.component.d.ts +3 -8
  53. package/main/view/components/busy-state-base/busy-state-base.component.d.ts.map +1 -1
  54. package/main/view/components/button-base/button-base.component.d.ts +3 -0
  55. package/main/view/components/button-base/button-base.component.d.ts.map +1 -1
  56. package/main/view/components/button-container/button-container.component.d.ts +3 -8
  57. package/main/view/components/button-container/button-container.component.d.ts.map +1 -1
  58. package/main/view/components/button-image/button-image.component.d.ts +3 -0
  59. package/main/view/components/button-image/button-image.component.d.ts.map +1 -1
  60. package/main/view/components/dialog-error/dialog-error.component.d.ts +3 -8
  61. package/main/view/components/dialog-error/dialog-error.component.d.ts.map +1 -1
  62. package/main/view/components/dialog-multiple-option/dialog-multiple-option.component.d.ts +3 -8
  63. package/main/view/components/dialog-multiple-option/dialog-multiple-option.component.d.ts.map +1 -1
  64. package/main/view/components/dialog-single-option/dialog-single-option.component.d.ts +3 -8
  65. package/main/view/components/dialog-single-option/dialog-single-option.component.d.ts.map +1 -1
  66. package/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.d.ts +3 -8
  67. package/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.d.ts.map +1 -1
  68. package/main/view/components/dialog-two-option/dialog-two-option.component.d.ts +3 -8
  69. package/main/view/components/dialog-two-option/dialog-two-option.component.d.ts.map +1 -1
  70. package/main/view/components/views-container/views-container.component.d.ts +3 -0
  71. package/main/view/components/views-container/views-container.component.d.ts.map +1 -1
  72. package/main/view/directives/AutoFocusOnDisplayDirective.d.ts +3 -0
  73. package/main/view/directives/AutoFocusOnDisplayDirective.d.ts.map +1 -1
  74. package/main/view/directives/AutoSelectTextOnFocusDirective.d.ts +3 -0
  75. package/main/view/directives/AutoSelectTextOnFocusDirective.d.ts.map +1 -1
  76. package/main/view/directives/ElementCreatedDirective.d.ts +3 -0
  77. package/main/view/directives/ElementCreatedDirective.d.ts.map +1 -1
  78. package/main/view/directives/ElementDestroyedDirective.d.ts +3 -0
  79. package/main/view/directives/ElementDestroyedDirective.d.ts.map +1 -1
  80. package/package.json +25 -13
  81. package/turbogui-angular.d.ts.map +1 -1
  82. package/bundles/turbogui-angular.umd.js +0 -2431
  83. package/bundles/turbogui-angular.umd.js.map +0 -1
  84. package/esm2015/main/controller/browser.service.js +0 -48
  85. package/esm2015/main/controller/dialog.service.js +0 -329
  86. package/esm2015/main/controller/globalerror.service.js +0 -65
  87. package/esm2015/main/controller/http.service.js +0 -70
  88. package/esm2015/main/controller/localization.service.js +0 -19
  89. package/esm2015/main/controller/notification.service.js +0 -53
  90. package/esm2015/main/controller/user.service.js +0 -125
  91. package/esm2015/main/controller/views.service.js +0 -113
  92. package/esm2015/main/model/modules/turbogui-angular.module.js +0 -93
  93. package/esm2015/main/view/animations/fade.animation.js +0 -32
  94. package/esm2015/main/view/components/busy-state-base/busy-state-base.component.js +0 -39
  95. package/esm2015/main/view/components/button-base/button-base.component.js +0 -149
  96. package/esm2015/main/view/components/button-container/button-container.component.js +0 -35
  97. package/esm2015/main/view/components/button-image/button-image.component.js +0 -46
  98. package/esm2015/main/view/components/dialog-error/dialog-error.component.js +0 -39
  99. package/esm2015/main/view/components/dialog-multiple-option/dialog-multiple-option.component.js +0 -36
  100. package/esm2015/main/view/components/dialog-single-option/dialog-single-option.component.js +0 -39
  101. package/esm2015/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.js +0 -108
  102. package/esm2015/main/view/components/dialog-two-option/dialog-two-option.component.js +0 -40
  103. package/esm2015/main/view/directives/AutoFocusOnDisplayDirective.js +0 -40
  104. package/esm2015/main/view/directives/AutoSelectTextOnFocusDirective.js +0 -39
  105. package/esm2015/main/view/directives/ElementCreatedDirective.js +0 -38
  106. package/esm2015/main/view/directives/ElementDestroyedDirective.js +0 -38
  107. package/esm2015/turbogui-angular.js +0 -7
  108. package/fesm2015/turbogui-angular.js.map +0 -1
  109. package/main/controller/browser.service.ngfactory.d.ts.map +0 -1
  110. package/main/controller/dialog.service.ngfactory.d.ts.map +0 -1
  111. package/main/controller/globalerror.service.ngfactory.d.ts.map +0 -1
  112. package/main/controller/http.service.ngfactory.d.ts.map +0 -1
  113. package/main/controller/localization.service.ngfactory.d.ts.map +0 -1
  114. package/main/controller/notification.service.ngfactory.d.ts.map +0 -1
  115. package/main/controller/user.service.ngfactory.d.ts.map +0 -1
  116. package/main/controller/views.service.ngfactory.d.ts.map +0 -1
  117. package/main/model/modules/turbogui-angular.module.ngfactory.d.ts.map +0 -1
  118. package/main/view/animations/fade.animation.ngfactory.d.ts.map +0 -1
  119. package/main/view/components/busy-state-base/busy-state-base.component.ngfactory.d.ts.map +0 -1
  120. package/main/view/components/busy-state-base/busy-state-base.component.scss.shim.ngstyle.d.ts.map +0 -1
  121. package/main/view/components/button-container/button-container.component.ngfactory.d.ts.map +0 -1
  122. package/main/view/components/button-container/button-container.component.scss.shim.ngstyle.d.ts.map +0 -1
  123. package/main/view/components/button-image/button-image.component.ngfactory.d.ts.map +0 -1
  124. package/main/view/components/button-image/button-image.component.scss.shim.ngstyle.d.ts.map +0 -1
  125. package/main/view/components/dialog-error/dialog-error.component.ngfactory.d.ts.map +0 -1
  126. package/main/view/components/dialog-error/dialog-error.component.scss.shim.ngstyle.d.ts.map +0 -1
  127. package/main/view/components/dialog-multiple-option/dialog-multiple-option.component.ngfactory.d.ts.map +0 -1
  128. package/main/view/components/dialog-multiple-option/dialog-multiple-option.component.scss.shim.ngstyle.d.ts.map +0 -1
  129. package/main/view/components/dialog-single-option/dialog-single-option.component.ngfactory.d.ts.map +0 -1
  130. package/main/view/components/dialog-single-option/dialog-single-option.component.scss.shim.ngstyle.d.ts.map +0 -1
  131. package/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.ngfactory.d.ts.map +0 -1
  132. package/main/view/components/dialog-single-selection-list/dialog-single-selection-list.component.scss.shim.ngstyle.d.ts.map +0 -1
  133. package/main/view/components/dialog-two-option/dialog-two-option.component.ngfactory.d.ts.map +0 -1
  134. package/main/view/components/dialog-two-option/dialog-two-option.component.scss.shim.ngstyle.d.ts.map +0 -1
  135. package/main/view/components/views-container/views-container.component.ngfactory.d.ts.map +0 -1
  136. package/main/view/components/views-container/views-container.component.scss.shim.ngstyle.d.ts.map +0 -1
  137. package/main/view/directives/AutoFocusOnDisplayDirective.ngfactory.d.ts.map +0 -1
  138. package/main/view/directives/AutoSelectTextOnFocusDirective.ngfactory.d.ts.map +0 -1
  139. package/main/view/directives/ElementCreatedDirective.ngfactory.d.ts.map +0 -1
  140. package/main/view/directives/ElementDestroyedDirective.ngfactory.d.ts.map +0 -1
  141. package/turbogui-angular.d.ts +0 -7
  142. package/turbogui-angular.metadata.json +0 -1
  143. /package/{esm2015/main/controller/httpservice/HTTPServiceGetRequest.js → esm2020/main/controller/httpservice/HTTPServiceGetRequest.mjs} +0 -0
  144. /package/{esm2015/main/controller/httpservice/HTTPServicePostRequest.js → esm2020/main/controller/httpservice/HTTPServicePostRequest.mjs} +0 -0
  145. /package/{esm2015/main/managers/DelayedMethodCallManager.js → esm2020/main/managers/DelayedMethodCallManager.mjs} +0 -0
  146. /package/{esm2015/main/model/classes/GUINotification.js → esm2020/main/model/classes/GUINotification.mjs} +0 -0
  147. /package/{esm2015/main/model/classes/View.js → esm2020/main/model/classes/View.mjs} +0 -0
  148. /package/{esm2015/main/model/classes/ViewModel.js → esm2020/main/model/classes/ViewModel.mjs} +0 -0
  149. /package/{esm2015/main/model/classes/ViewService.js → esm2020/main/model/classes/ViewService.mjs} +0 -0
  150. /package/{esm2015/main/view/components/dialog-base/dialog-base.component.js → esm2020/main/view/components/dialog-base/dialog-base.component.mjs} +0 -0
  151. /package/{esm2015/main/view/components/dialog-options-base/dialog-options-base.component.js → esm2020/main/view/components/dialog-options-base/dialog-options-base.component.mjs} +0 -0
@@ -1,2431 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/input'), require('@angular/material/snack-bar'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/platform-browser/animations'), require('@angular/animations'), require('turbocommons-ts'), require('@angular/cdk/portal'), require('rxjs'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('turbogui-angular', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/input', '@angular/material/snack-bar', '@angular/material/button', '@angular/material/form-field', '@angular/platform-browser/animations', '@angular/animations', 'turbocommons-ts', '@angular/cdk/portal', 'rxjs', '@angular/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["turbogui-angular"] = {}, global.ng.core, global.ng.material.dialog, global.ng.material.input, global.ng.material.snackBar, global.ng.material.button, global.ng.material.formField, global.ng.platformBrowser.animations, global.ng.animations, global.turbocommonsTs, global.ng.cdk.portal, global.rxjs, global.ng.common));
5
- })(this, (function (exports, core, dialog, input, snackBar, button, formField, animations$1, animations, turbocommonsTs, portal, rxjs, common) { 'use strict';
6
-
7
- /**
8
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
9
- *
10
- * Website : -> http://www.turbogui.org
11
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
12
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
13
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
14
- */
15
- /**
16
- * Fade animations
17
- */
18
- var FadeAnimationClass = /** @class */ (function () {
19
- function FadeAnimationClass() {
20
- }
21
- /**
22
- * Get a custom trigger to create fade animations when components are added or removed from the application
23
- *
24
- * @param triggerName The name for the trigger we want to create
25
- * @param enter The time and easing that we want to use for the enter state
26
- * @param leave The time and easing that we want to use for the leave state
27
- */
28
- FadeAnimationClass.getTrigger = function (triggerName, enter, leave) {
29
- if (enter === void 0) { enter = '1s ease'; }
30
- if (leave === void 0) { leave = '0s ease'; }
31
- return animations.trigger(triggerName, [
32
- animations.transition(':enter', [animations.style({ opacity: 0 }), animations.animate(enter)]),
33
- animations.transition(':leave', [animations.style({ opacity: 1 }), animations.animate(leave, animations.style({ opacity: 0 }))])
34
- ]);
35
- };
36
- return FadeAnimationClass;
37
- }());
38
- FadeAnimationClass.decorators = [
39
- { type: core.Injectable }
40
- ];
41
-
42
- /**
43
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
44
- *
45
- * Website : -> http://www.turbogui.org
46
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
47
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
48
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
49
- */
50
- /**
51
- * This component is used by turboGUI angular library to show the busy state to the user.
52
- * It is used to block all the user input and progressively shows a busy cursor to notify that the application
53
- * is waiting for something.
54
- *
55
- * We can (should) override this component with our own one to adapt its visual appearance to our application.
56
- * We can then set dialogService.busyStateComponentClass to our component class at the application start to to
57
- * override the default one.
58
- */
59
- var BusyStateBaseComponent = /** @class */ (function () {
60
- function BusyStateBaseComponent() {
61
- /**
62
- * This is used to attach the fade animation directly to this component so it fades in and out when created and removed from the app
63
- */
64
- this.busyStateBaseFade = true;
65
- }
66
- return BusyStateBaseComponent;
67
- }());
68
- BusyStateBaseComponent.decorators = [
69
- { type: core.Component, args: [{
70
- selector: 'tg-busy-state-base',
71
- template: "<div class=\"darkBg\">\r\n\r\n</div>\r\n\r\n<svg width=\"38\" height=\"38\" viewBox=\"0 0 38 38\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"#fff\">\r\n <g fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(1 1)\" stroke-width=\"1\">\r\n <circle stroke-opacity=\".2\" cx=\"18\" cy=\"18\" r=\"18\"/>\r\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 18 18\"\r\n to=\"360 18 18\"\r\n dur=\"1s\"\r\n repeatCount=\"indefinite\"/>\r\n </path>\r\n </g>\r\n </g>\r\n</svg>\r\n",
72
- animations: [FadeAnimationClass.getTrigger('busyStateBaseFade', '1s ease', '400ms ease')],
73
- styles: [":host{position:fixed;top:0px;left:0px;right:0px;bottom:0px;display:flex;justify-content:center;align-items:center;z-index:999999999}.darkBg{position:absolute;cursor:progress;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:#00000096;animation-name:bgfadein;animation-duration:30s;animation-timing-function:ease}svg{z-index:5000;width:40%;height:40%;max-width:130px;max-height:130px;animation-name:loadingfadein;animation-duration:3s;animation-timing-function:ease-in}@keyframes loadingfadein{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes bgfadein{0%{opacity:0}4%{opacity:0}14%{opacity:.2}35%{opacity:.5}to{opacity:1}}\n"]
74
- },] }
75
- ];
76
- BusyStateBaseComponent.propDecorators = {
77
- busyStateBaseFade: [{ type: core.HostBinding, args: ['@busyStateBaseFade',] }]
78
- };
79
-
80
- /******************************************************************************
81
- Copyright (c) Microsoft Corporation.
82
-
83
- Permission to use, copy, modify, and/or distribute this software for any
84
- purpose with or without fee is hereby granted.
85
-
86
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
87
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
88
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
89
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
90
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
91
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
92
- PERFORMANCE OF THIS SOFTWARE.
93
- ***************************************************************************** */
94
- /* global Reflect, Promise, SuppressedError, Symbol */
95
- var extendStatics = function (d, b) {
96
- extendStatics = Object.setPrototypeOf ||
97
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
98
- function (d, b) { for (var p in b)
99
- if (Object.prototype.hasOwnProperty.call(b, p))
100
- d[p] = b[p]; };
101
- return extendStatics(d, b);
102
- };
103
- function __extends(d, b) {
104
- if (typeof b !== "function" && b !== null)
105
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
106
- extendStatics(d, b);
107
- function __() { this.constructor = d; }
108
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
109
- }
110
- var __assign = function () {
111
- __assign = Object.assign || function __assign(t) {
112
- for (var s, i = 1, n = arguments.length; i < n; i++) {
113
- s = arguments[i];
114
- for (var p in s)
115
- if (Object.prototype.hasOwnProperty.call(s, p))
116
- t[p] = s[p];
117
- }
118
- return t;
119
- };
120
- return __assign.apply(this, arguments);
121
- };
122
- function __rest(s, e) {
123
- var t = {};
124
- for (var p in s)
125
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
126
- t[p] = s[p];
127
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
128
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
129
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
130
- t[p[i]] = s[p[i]];
131
- }
132
- return t;
133
- }
134
- function __decorate(decorators, target, key, desc) {
135
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
136
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
137
- r = Reflect.decorate(decorators, target, key, desc);
138
- else
139
- for (var i = decorators.length - 1; i >= 0; i--)
140
- if (d = decorators[i])
141
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
142
- return c > 3 && r && Object.defineProperty(target, key, r), r;
143
- }
144
- function __param(paramIndex, decorator) {
145
- return function (target, key) { decorator(target, key, paramIndex); };
146
- }
147
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
148
- function accept(f) { if (f !== void 0 && typeof f !== "function")
149
- throw new TypeError("Function expected"); return f; }
150
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
151
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
152
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
153
- var _, done = false;
154
- for (var i = decorators.length - 1; i >= 0; i--) {
155
- var context = {};
156
- for (var p in contextIn)
157
- context[p] = p === "access" ? {} : contextIn[p];
158
- for (var p in contextIn.access)
159
- context.access[p] = contextIn.access[p];
160
- context.addInitializer = function (f) { if (done)
161
- throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
162
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
163
- if (kind === "accessor") {
164
- if (result === void 0)
165
- continue;
166
- if (result === null || typeof result !== "object")
167
- throw new TypeError("Object expected");
168
- if (_ = accept(result.get))
169
- descriptor.get = _;
170
- if (_ = accept(result.set))
171
- descriptor.set = _;
172
- if (_ = accept(result.init))
173
- initializers.unshift(_);
174
- }
175
- else if (_ = accept(result)) {
176
- if (kind === "field")
177
- initializers.unshift(_);
178
- else
179
- descriptor[key] = _;
180
- }
181
- }
182
- if (target)
183
- Object.defineProperty(target, contextIn.name, descriptor);
184
- done = true;
185
- }
186
- ;
187
- function __runInitializers(thisArg, initializers, value) {
188
- var useValue = arguments.length > 2;
189
- for (var i = 0; i < initializers.length; i++) {
190
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
191
- }
192
- return useValue ? value : void 0;
193
- }
194
- ;
195
- function __propKey(x) {
196
- return typeof x === "symbol" ? x : "".concat(x);
197
- }
198
- ;
199
- function __setFunctionName(f, name, prefix) {
200
- if (typeof name === "symbol")
201
- name = name.description ? "[".concat(name.description, "]") : "";
202
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
203
- }
204
- ;
205
- function __metadata(metadataKey, metadataValue) {
206
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
207
- return Reflect.metadata(metadataKey, metadataValue);
208
- }
209
- function __awaiter(thisArg, _arguments, P, generator) {
210
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
211
- return new (P || (P = Promise))(function (resolve, reject) {
212
- function fulfilled(value) { try {
213
- step(generator.next(value));
214
- }
215
- catch (e) {
216
- reject(e);
217
- } }
218
- function rejected(value) { try {
219
- step(generator["throw"](value));
220
- }
221
- catch (e) {
222
- reject(e);
223
- } }
224
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
225
- step((generator = generator.apply(thisArg, _arguments || [])).next());
226
- });
227
- }
228
- function __generator(thisArg, body) {
229
- var _ = { label: 0, sent: function () { if (t[0] & 1)
230
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
231
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
232
- function verb(n) { return function (v) { return step([n, v]); }; }
233
- function step(op) {
234
- if (f)
235
- throw new TypeError("Generator is already executing.");
236
- while (g && (g = 0, op[0] && (_ = 0)), _)
237
- try {
238
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
239
- return t;
240
- if (y = 0, t)
241
- op = [op[0] & 2, t.value];
242
- switch (op[0]) {
243
- case 0:
244
- case 1:
245
- t = op;
246
- break;
247
- case 4:
248
- _.label++;
249
- return { value: op[1], done: false };
250
- case 5:
251
- _.label++;
252
- y = op[1];
253
- op = [0];
254
- continue;
255
- case 7:
256
- op = _.ops.pop();
257
- _.trys.pop();
258
- continue;
259
- default:
260
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
261
- _ = 0;
262
- continue;
263
- }
264
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
265
- _.label = op[1];
266
- break;
267
- }
268
- if (op[0] === 6 && _.label < t[1]) {
269
- _.label = t[1];
270
- t = op;
271
- break;
272
- }
273
- if (t && _.label < t[2]) {
274
- _.label = t[2];
275
- _.ops.push(op);
276
- break;
277
- }
278
- if (t[2])
279
- _.ops.pop();
280
- _.trys.pop();
281
- continue;
282
- }
283
- op = body.call(thisArg, _);
284
- }
285
- catch (e) {
286
- op = [6, e];
287
- y = 0;
288
- }
289
- finally {
290
- f = t = 0;
291
- }
292
- if (op[0] & 5)
293
- throw op[1];
294
- return { value: op[0] ? op[1] : void 0, done: true };
295
- }
296
- }
297
- var __createBinding = Object.create ? (function (o, m, k, k2) {
298
- if (k2 === undefined)
299
- k2 = k;
300
- var desc = Object.getOwnPropertyDescriptor(m, k);
301
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
302
- desc = { enumerable: true, get: function () { return m[k]; } };
303
- }
304
- Object.defineProperty(o, k2, desc);
305
- }) : (function (o, m, k, k2) {
306
- if (k2 === undefined)
307
- k2 = k;
308
- o[k2] = m[k];
309
- });
310
- function __exportStar(m, o) {
311
- for (var p in m)
312
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
313
- __createBinding(o, m, p);
314
- }
315
- function __values(o) {
316
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
317
- if (m)
318
- return m.call(o);
319
- if (o && typeof o.length === "number")
320
- return {
321
- next: function () {
322
- if (o && i >= o.length)
323
- o = void 0;
324
- return { value: o && o[i++], done: !o };
325
- }
326
- };
327
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
328
- }
329
- function __read(o, n) {
330
- var m = typeof Symbol === "function" && o[Symbol.iterator];
331
- if (!m)
332
- return o;
333
- var i = m.call(o), r, ar = [], e;
334
- try {
335
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
336
- ar.push(r.value);
337
- }
338
- catch (error) {
339
- e = { error: error };
340
- }
341
- finally {
342
- try {
343
- if (r && !r.done && (m = i["return"]))
344
- m.call(i);
345
- }
346
- finally {
347
- if (e)
348
- throw e.error;
349
- }
350
- }
351
- return ar;
352
- }
353
- /** @deprecated */
354
- function __spread() {
355
- for (var ar = [], i = 0; i < arguments.length; i++)
356
- ar = ar.concat(__read(arguments[i]));
357
- return ar;
358
- }
359
- /** @deprecated */
360
- function __spreadArrays() {
361
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
362
- s += arguments[i].length;
363
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
364
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
365
- r[k] = a[j];
366
- return r;
367
- }
368
- function __spreadArray(to, from, pack) {
369
- if (pack || arguments.length === 2)
370
- for (var i = 0, l = from.length, ar; i < l; i++) {
371
- if (ar || !(i in from)) {
372
- if (!ar)
373
- ar = Array.prototype.slice.call(from, 0, i);
374
- ar[i] = from[i];
375
- }
376
- }
377
- return to.concat(ar || Array.prototype.slice.call(from));
378
- }
379
- function __await(v) {
380
- return this instanceof __await ? (this.v = v, this) : new __await(v);
381
- }
382
- function __asyncGenerator(thisArg, _arguments, generator) {
383
- if (!Symbol.asyncIterator)
384
- throw new TypeError("Symbol.asyncIterator is not defined.");
385
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
386
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
387
- function verb(n) { if (g[n])
388
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
389
- function resume(n, v) { try {
390
- step(g[n](v));
391
- }
392
- catch (e) {
393
- settle(q[0][3], e);
394
- } }
395
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
396
- function fulfill(value) { resume("next", value); }
397
- function reject(value) { resume("throw", value); }
398
- function settle(f, v) { if (f(v), q.shift(), q.length)
399
- resume(q[0][0], q[0][1]); }
400
- }
401
- function __asyncDelegator(o) {
402
- var i, p;
403
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
404
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
405
- }
406
- function __asyncValues(o) {
407
- if (!Symbol.asyncIterator)
408
- throw new TypeError("Symbol.asyncIterator is not defined.");
409
- var m = o[Symbol.asyncIterator], i;
410
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
411
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
412
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
413
- }
414
- function __makeTemplateObject(cooked, raw) {
415
- if (Object.defineProperty) {
416
- Object.defineProperty(cooked, "raw", { value: raw });
417
- }
418
- else {
419
- cooked.raw = raw;
420
- }
421
- return cooked;
422
- }
423
- ;
424
- var __setModuleDefault = Object.create ? (function (o, v) {
425
- Object.defineProperty(o, "default", { enumerable: true, value: v });
426
- }) : function (o, v) {
427
- o["default"] = v;
428
- };
429
- function __importStar(mod) {
430
- if (mod && mod.__esModule)
431
- return mod;
432
- var result = {};
433
- if (mod != null)
434
- for (var k in mod)
435
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
436
- __createBinding(result, mod, k);
437
- __setModuleDefault(result, mod);
438
- return result;
439
- }
440
- function __importDefault(mod) {
441
- return (mod && mod.__esModule) ? mod : { default: mod };
442
- }
443
- function __classPrivateFieldGet(receiver, state, kind, f) {
444
- if (kind === "a" && !f)
445
- throw new TypeError("Private accessor was defined without a getter");
446
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
447
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
448
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
449
- }
450
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
451
- if (kind === "m")
452
- throw new TypeError("Private method is not writable");
453
- if (kind === "a" && !f)
454
- throw new TypeError("Private accessor was defined without a setter");
455
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
456
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
457
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
458
- }
459
- function __classPrivateFieldIn(state, receiver) {
460
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
461
- throw new TypeError("Cannot use 'in' operator on non-object");
462
- return typeof state === "function" ? receiver === state : state.has(receiver);
463
- }
464
- function __addDisposableResource(env, value, async) {
465
- if (value !== null && value !== void 0) {
466
- if (typeof value !== "object" && typeof value !== "function")
467
- throw new TypeError("Object expected.");
468
- var dispose;
469
- if (async) {
470
- if (!Symbol.asyncDispose)
471
- throw new TypeError("Symbol.asyncDispose is not defined.");
472
- dispose = value[Symbol.asyncDispose];
473
- }
474
- if (dispose === void 0) {
475
- if (!Symbol.dispose)
476
- throw new TypeError("Symbol.dispose is not defined.");
477
- dispose = value[Symbol.dispose];
478
- }
479
- if (typeof dispose !== "function")
480
- throw new TypeError("Object not disposable.");
481
- env.stack.push({ value: value, dispose: dispose, async: async });
482
- }
483
- else if (async) {
484
- env.stack.push({ async: true });
485
- }
486
- return value;
487
- }
488
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
489
- var e = new Error(message);
490
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
491
- };
492
- function __disposeResources(env) {
493
- function fail(e) {
494
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
495
- env.hasError = true;
496
- }
497
- function next() {
498
- while (env.stack.length) {
499
- var rec = env.stack.pop();
500
- try {
501
- var result = rec.dispose && rec.dispose.call(rec.value);
502
- if (rec.async)
503
- return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
504
- }
505
- catch (e) {
506
- fail(e);
507
- }
508
- }
509
- if (env.hasError)
510
- throw env.error;
511
- }
512
- return next();
513
- }
514
- var tslib_es6 = {
515
- __extends: __extends,
516
- __assign: __assign,
517
- __rest: __rest,
518
- __decorate: __decorate,
519
- __param: __param,
520
- __metadata: __metadata,
521
- __awaiter: __awaiter,
522
- __generator: __generator,
523
- __createBinding: __createBinding,
524
- __exportStar: __exportStar,
525
- __values: __values,
526
- __read: __read,
527
- __spread: __spread,
528
- __spreadArrays: __spreadArrays,
529
- __spreadArray: __spreadArray,
530
- __await: __await,
531
- __asyncGenerator: __asyncGenerator,
532
- __asyncDelegator: __asyncDelegator,
533
- __asyncValues: __asyncValues,
534
- __makeTemplateObject: __makeTemplateObject,
535
- __importStar: __importStar,
536
- __importDefault: __importDefault,
537
- __classPrivateFieldGet: __classPrivateFieldGet,
538
- __classPrivateFieldSet: __classPrivateFieldSet,
539
- __classPrivateFieldIn: __classPrivateFieldIn,
540
- __addDisposableResource: __addDisposableResource,
541
- __disposeResources: __disposeResources,
542
- };
543
-
544
- /**
545
- * Manages the application modal and non modal floating elements
546
- */
547
- var DialogService = /** @class */ (function () {
548
- function DialogService(rendererFactory, matSnackBar, matDialog, injector, applicationRef, componentFactoryResolver) {
549
- this.matSnackBar = matSnackBar;
550
- this.matDialog = matDialog;
551
- this.injector = injector;
552
- this.applicationRef = applicationRef;
553
- this.componentFactoryResolver = componentFactoryResolver;
554
- /**
555
- * Used to modify the busy state component that is shown by default by the addModalBusyState() method.
556
- *
557
- * @see this.addModalBusyState()
558
- */
559
- this.customBusyStateComponentClass = BusyStateBaseComponent;
560
- /**
561
- * Check public getter for docs
562
- */
563
- this._isEnabled = true;
564
- /**
565
- * Tells if the main application is currently showing a busy state that blocks all user interaction
566
- */
567
- this._isShowingBusyState = false;
568
- /**
569
- * A reference to the modal busy state component that is initialized only the first time it is called.
570
- *
571
- * (To append the busy state dynamically, we use the Portal concept from the angular material library)
572
- */
573
- this._componentPortal = null;
574
- /**
575
- * A reference to the modal busy state container where the component will be added
576
- */
577
- this._modalBusyStateHost = null;
578
- /**
579
- * Tells if the manager is currently showing a snackbar element or not
580
- */
581
- this._isShowingSnackBar = false;
582
- /**
583
- * Contains a list of the dialogs that are currently visible to the user.
584
- * Each item in this list is a hash that is computed when dialog is created to uniquely identify it.
585
- *
586
- * Empty list means no dialogs are currently visible
587
- */
588
- this._activeDialogs = [];
589
- /**
590
- * Contains a list with all the MatDialog instances that are currently visible to the user.
591
- * The list uses the same order as the list of _activeDialogs hash values
592
- */
593
- this._activeDialogInstances = [];
594
- /**
595
- * Method that is used to delete the window beforeunload event listener once not used anymore
596
- */
597
- this._windowBeforeUnloadUnListen = null;
598
- /**
599
- * Method that is used to delete the document keydown event listener once not used anymore
600
- */
601
- this._documentKeydownUnlisten = null;
602
- /**
603
- * Method that is used to delete the document mousedown event listener once not used anymore
604
- */
605
- this._documentMousedownUnlisten = null;
606
- /**
607
- * Method that is used to delete the document pointerdown event listener once not used anymore
608
- */
609
- this._documentPointerdownUnlisten = null;
610
- this._renderer = rendererFactory.createRenderer(null, null);
611
- }
612
- Object.defineProperty(DialogService.prototype, "isEnabled", {
613
- /**
614
- * Tells if this dialog service is enabled or not. If dialog service is disabled, none of it's features will work
615
- * This is used to block all dialog features normally when shutting down the application
616
- *
617
- * Use with caution. When this is set to false, dialog service stops working.
618
- */
619
- set: function (v) {
620
- if (v === this._isEnabled) {
621
- return;
622
- }
623
- this._isEnabled = v;
624
- },
625
- enumerable: false,
626
- configurable: true
627
- });
628
- /**
629
- * Enables a warning that will be shown to the user when he/she tries to close the application.
630
- * This warning will prompt the user to continue with the exit process or cancel it.
631
- * The specific texts of this message are a generic ones and cannot be changed.
632
- *
633
- * IMPORTANT: This method must be called after the main application has been initialized in order to work,
634
- * otherwise it will do nothing.
635
- */
636
- DialogService.prototype.addCloseApplicationWarning = function () {
637
- if (this._windowBeforeUnloadUnListen === null) {
638
- this._windowBeforeUnloadUnListen = this._renderer.listen('window', 'beforeunload', function (event) { return event.returnValue = true; });
639
- }
640
- };
641
- /**
642
- * Remove the close application warning message if previously assigned
643
- */
644
- DialogService.prototype.removeCloseApplicationWarning = function () {
645
- if (this._windowBeforeUnloadUnListen !== null) {
646
- this._windowBeforeUnloadUnListen();
647
- this._windowBeforeUnloadUnListen = null;
648
- }
649
- };
650
- /**
651
- * Change the application visual appearance so the user perceives that the application is
652
- * currently busy. While modal busy state is enabled, no user input is possible neither via
653
- * keyboard, mouse or touch. Use this state when performing server requests or operations that
654
- * must block the user interaction with the application.
655
- *
656
- * Note: We can modify the busy state component that is shown by this method. To do it, we must
657
- * set this.customBusyStateComponentClass property with our own custom busy state component class. (We can do it at
658
- * our main application component constructor for example). Our custom component must extend the
659
- * BusyStateBaseComponent one to add its own visual appearance.
660
- *
661
- * @see this.customBusyStateComponentClass
662
- */
663
- DialogService.prototype.addModalBusyState = function () {
664
- if (!this._isEnabled || this._isShowingBusyState) {
665
- return;
666
- }
667
- this._disableUserInteraction();
668
- // Dynamically create the busy state component reference if this is the first time
669
- if (this._componentPortal === null) {
670
- this._componentPortal = new portal.ComponentPortal(this.customBusyStateComponentClass);
671
- // Create a PortalHost with document.body as its anchor element
672
- this._modalBusyStateHost = new portal.DomPortalOutlet(document.body, this.componentFactoryResolver, this.applicationRef, this.injector);
673
- }
674
- this._modalBusyStateHost.attach(this._componentPortal);
675
- this._isShowingBusyState = true;
676
- };
677
- Object.defineProperty(DialogService.prototype, "isShowingBusyState", {
678
- /**
679
- * Tells if the application is currently locked in a modal busy state (caused by an addModalBusyState() call)
680
- */
681
- get: function () {
682
- return this._isShowingBusyState;
683
- },
684
- enumerable: false,
685
- configurable: true
686
- });
687
- /**
688
- * Remove the application busy state and restore it back to normal user interaction
689
- */
690
- DialogService.prototype.removeModalBusyState = function () {
691
- if (!this._isEnabled || !this._isShowingBusyState) {
692
- return;
693
- }
694
- if (this._componentPortal !== null) {
695
- this._modalBusyStateHost.detach();
696
- }
697
- this._enableUserInteraction();
698
- this._isShowingBusyState = false;
699
- };
700
- /**
701
- * TODO - adapt from TS version
702
- */
703
- DialogService.prototype.addToolTip = function () {
704
- // TODO - adapt from TS version
705
- };
706
- /**
707
- * Show a non modal snackbar notification to the user (Only one snack-bar can ever be opened at the same time).
708
- *
709
- * 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.
710
- * They shouldn’t interrupt the user experience, and they don’t require user input to disappear.
711
- *
712
- * @param config A MatSnackBarConfig instance with the customizations we want for this snackbar
713
- * @param message The message to show on the snackbar
714
- * @param action If not empty, the text to place on the snackbar confirmation button
715
- * @param actionCallback A method to execute once the user clicks into the action button.
716
- *
717
- * @return void
718
- */
719
- DialogService.prototype.addSnackBar = function (config, message, action, actionCallback) {
720
- if (action === void 0) { action = ''; }
721
- if (actionCallback === void 0) { actionCallback = null; }
722
- if (!this._isEnabled) {
723
- return;
724
- }
725
- if (this._isShowingSnackBar) {
726
- throw new Error('Trying to show a snackbar while another one is still visible');
727
- }
728
- this._isShowingSnackBar = true;
729
- var snackBarRef = this.matSnackBar.open(message, action === '' ? undefined : action, config);
730
- if (actionCallback !== null) {
731
- snackBarRef.onAction().subscribe(function () {
732
- actionCallback();
733
- });
734
- }
735
- };
736
- Object.defineProperty(DialogService.prototype, "isShowingSnackBar", {
737
- /**
738
- * Tells if the application is currently showing a snackbar or not
739
- */
740
- get: function () {
741
- return this._isShowingSnackBar;
742
- },
743
- enumerable: false,
744
- configurable: true
745
- });
746
- /**
747
- * Force the removal of the snack bar dialog if it exists.
748
- *
749
- * If no snackbar is currently visible, this method will do nothing
750
- */
751
- DialogService.prototype.removeSnackBar = function () {
752
- if (!this._isEnabled || !this._isShowingSnackBar) {
753
- return;
754
- }
755
- this.matSnackBar.dismiss();
756
- this._isShowingSnackBar = false;
757
- };
758
- /**
759
- * 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
760
- * this library or extend DialogOptionsBaseComponent to create our own custom ones.
761
- *
762
- * @param width Specify the css value for the maximum width the dialog will have. As the dialog is responsive, the value will be automatically
763
- reduced if the available screen is not enough, and will reach the desired value otherwise. Note that height will be adapted to the contents
764
- of the dialog and cannot be specified here. We can set a pixels, % or any other css accepted value. For example: '400px', '50%', etc.
765
- * @param texts A list with strings containing the dialog texts, sorted by importance. When dialog has a title, this should
766
- * be placed first, subtitle second and so (Each dialog may accept different kind of texts).
767
- * @param options A list of strings that will be used as button captions for each one of the accepted dialog options
768
- * @param dialogComponentClass A class for a component that extends DialogOptionsBaseComponent, which will be the
769
- * dialog visual element that is shown to the user.
770
- * @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
771
- * the option that's been selected by the user.
772
- * @param modal True (default) if selecting an option is mandatory to close the dialog, false if the dialog can be closed
773
- * by the user by clicking outside it
774
- */
775
- DialogService.prototype.addDialog = function (width, texts, options, dialogComponentClass, callback, modal) {
776
- var _this = this;
777
- if (callback === void 0) { callback = null; }
778
- if (modal === void 0) { modal = true; }
779
- if (!this._isEnabled) {
780
- return;
781
- }
782
- // Generate a string to uniquely identify this dialog on the list of active dialogs
783
- var dialogHash = texts.join('') + options.join('') + dialogComponentClass.name;
784
- // identical dialogs won't be allowed at the same time
785
- if (this._activeDialogs.includes(dialogHash)) {
786
- return;
787
- }
788
- var dialogRef = this.matDialog.open(dialogComponentClass, {
789
- width: width,
790
- disableClose: modal,
791
- autoFocus: false,
792
- closeOnNavigation: !modal,
793
- data: { texts: texts, options: options }
794
- });
795
- this._activeDialogs.push(dialogHash);
796
- this._activeDialogInstances.push(dialogRef);
797
- dialogRef.beforeClosed().subscribe(function (selectedOptionIndex) {
798
- _this._activeDialogs = turbocommonsTs.ArrayUtils.removeElement(_this._activeDialogs, dialogHash);
799
- _this._activeDialogInstances = turbocommonsTs.ArrayUtils.removeElement(_this._activeDialogInstances, dialogRef);
800
- if (!turbocommonsTs.NumericUtils.isInteger(selectedOptionIndex)) {
801
- if (modal) {
802
- throw new Error("dialogRef.close() expects int value");
803
- }
804
- else {
805
- selectedOptionIndex = -1;
806
- }
807
- }
808
- if (callback !== null) {
809
- var selectedOption = { index: selectedOptionIndex, value: '' };
810
- if (selectedOptionIndex >= 0) {
811
- selectedOption.value = options[selectedOptionIndex];
812
- }
813
- callback(selectedOption);
814
- }
815
- });
816
- };
817
- /**
818
- * Force the removal of all the dialogs that are currently visible.
819
- *
820
- * If no dialogs are currently visible, this method will do nothing
821
- */
822
- DialogService.prototype.removeAllDialogs = function () {
823
- var e_1, _a;
824
- if (!this._isEnabled) {
825
- return;
826
- }
827
- try {
828
- for (var _b = __values(this._activeDialogInstances), _c = _b.next(); !_c.done; _c = _b.next()) {
829
- var dialogRef = _c.value;
830
- dialogRef.close(-1);
831
- }
832
- }
833
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
834
- finally {
835
- try {
836
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
837
- }
838
- finally { if (e_1) throw e_1.error; }
839
- }
840
- this._activeDialogs = [];
841
- this._activeDialogInstances = [];
842
- };
843
- /**
844
- * Block all the user interactions with the application (keyboard, touch, mouse, ...)
845
- */
846
- DialogService.prototype._disableUserInteraction = function () {
847
- if (this._documentKeydownUnlisten === null) {
848
- this._documentKeydownUnlisten = this._renderer.listen('document', 'keydown', function (event) { return event.preventDefault(); });
849
- }
850
- if (this._documentMousedownUnlisten === null) {
851
- this._documentMousedownUnlisten = this._renderer.listen('document', 'mousedown', function (event) { return event.preventDefault(); });
852
- }
853
- if (this._documentPointerdownUnlisten === null) {
854
- this._documentPointerdownUnlisten = this._renderer.listen('document', 'pointerdown', function (event) { return event.preventDefault(); });
855
- }
856
- };
857
- /**
858
- * Restore the user interactions that were previously disabled with _disableUserInteraction method
859
- */
860
- DialogService.prototype._enableUserInteraction = function () {
861
- if (this._documentKeydownUnlisten !== null) {
862
- this._documentKeydownUnlisten();
863
- this._documentKeydownUnlisten = null;
864
- }
865
- if (this._documentMousedownUnlisten !== null) {
866
- this._documentMousedownUnlisten();
867
- this._documentMousedownUnlisten = null;
868
- }
869
- if (this._documentPointerdownUnlisten !== null) {
870
- this._documentPointerdownUnlisten();
871
- this._documentMousedownUnlisten = null;
872
- }
873
- };
874
- return DialogService;
875
- }());
876
- DialogService.decorators = [
877
- { type: core.Injectable }
878
- ];
879
- DialogService.ctorParameters = function () { return [
880
- { type: core.RendererFactory2 },
881
- { type: snackBar.MatSnackBar },
882
- { type: dialog.MatDialog },
883
- { type: core.Injector },
884
- { type: core.ApplicationRef },
885
- { type: core.ComponentFactoryResolver }
886
- ]; };
887
-
888
- /**
889
- * Manages application text translations and languages
890
- */
891
- var LocalizationService = /** @class */ (function (_super) {
892
- __extends(LocalizationService, _super);
893
- function LocalizationService() {
894
- return _super !== null && _super.apply(this, arguments) || this;
895
- }
896
- return LocalizationService;
897
- }(turbocommonsTs.LocalizationManager));
898
- LocalizationService.decorators = [
899
- { type: core.Injectable }
900
- ];
901
-
902
- /**
903
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
904
- *
905
- * Website : -> http://www.turbogui.org
906
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
907
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
908
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
909
- */
910
- /**
911
- * This is the base class for all the dialog components that can be loaded by the dialog service class
912
- */
913
- var DialogBaseComponent = /** @class */ (function () {
914
- function DialogBaseComponent() {
915
- }
916
- return DialogBaseComponent;
917
- }());
918
-
919
- /**
920
- * This is the base class for all the dialog components that show one or more options for the user to select
921
- */
922
- var DialogOptionsBaseComponent = /** @class */ (function (_super) {
923
- __extends(DialogOptionsBaseComponent, _super);
924
- function DialogOptionsBaseComponent() {
925
- return _super !== null && _super.apply(this, arguments) || this;
926
- }
927
- return DialogOptionsBaseComponent;
928
- }(DialogBaseComponent));
929
-
930
- /**
931
- * A dialog component with a single option button, to be used for error notifications
932
- */
933
- var DialogErrorComponent = /** @class */ (function (_super) {
934
- __extends(DialogErrorComponent, _super);
935
- function DialogErrorComponent(dialogRef, data) {
936
- var _this = _super.call(this) || this;
937
- _this.dialogRef = dialogRef;
938
- _this.data = data;
939
- if (data.texts.length < 1) {
940
- throw new Error('DialogErrorComponent expects 2 texts: The title and optionally a description');
941
- }
942
- if (data.options.length !== 1) {
943
- throw new Error('DialogErrorComponent expects only one option');
944
- }
945
- return _this;
946
- }
947
- return DialogErrorComponent;
948
- }(DialogOptionsBaseComponent));
949
- DialogErrorComponent.decorators = [
950
- { type: core.Component, args: [{
951
- selector: 'tg-dialog-error',
952
- template: "<div class=\"titleAndIconContainer\">\r\n <h3>\r\n {{data.texts[0]}}\r\n </h3>\r\n \r\n <!-- error icon -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\r\n <path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\" fill=\"#ff0000\" />\r\n </svg>\r\n \r\n</div>\r\n\r\n<p *ngIf=\"data.texts.length > 1\">\r\n {{data.texts[1]}}\r\n</p>\r\n\r\n<button mat-raised-button color=\"warn\"\r\n (click)=\"dialogRef.close(0)\">\r\n \r\n {{data.options[0]}}\r\n \r\n</button>",
953
- styles: [":host{position:relative;min-height:300px}.titleAndIconContainer{display:flex;flex-direction:row;align-items:center}h3{margin-top:0;margin-bottom:25px;width:82%}svg{width:18%;height:auto}p{margin-bottom:52px}button{float:right;width:50%;min-width:50px}\n"]
954
- },] }
955
- ];
956
- DialogErrorComponent.ctorParameters = function () { return [
957
- { type: dialog.MatDialogRef },
958
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
959
- ]; };
960
-
961
- /**
962
- * Manages application http communications
963
- */
964
- var HTTPService = /** @class */ (function (_super) {
965
- __extends(HTTPService, _super);
966
- function HTTPService(dialogService) {
967
- var _this = _super.call(this, true) || this;
968
- _this.dialogService = dialogService;
969
- return _this;
970
- }
971
- /**
972
- * The same method as HTTPManager.execute but with the ability to enable several options which are specific to this service:
973
- *
974
- * - HTTPService.NO_MODAL_BUSY_STATE To prevent the default behaviour of locking the UI while the request is running
975
- * - HTTPService.DISABLE_ERROR_HANDLING To prevent the default behaviour of showing a detailed error dialog when a request fails
976
- *
977
- * @see HTTPManager.execute()
978
- */
979
- HTTPService.prototype.execute = function (requests, finishedCallback, progressCallback, options) {
980
- var _this = this;
981
- if (finishedCallback === void 0) { finishedCallback = null; }
982
- if (progressCallback === void 0) { progressCallback = null; }
983
- if (options === void 0) { options = []; }
984
- if (options.indexOf(HTTPService.NO_MODAL_BUSY_STATE) < 0) {
985
- this.dialogService.addModalBusyState();
986
- }
987
- _super.prototype.execute.call(this, requests, function (results, anyError) {
988
- var e_1, _a;
989
- if (options.indexOf(HTTPService.NO_MODAL_BUSY_STATE) < 0) {
990
- _this.dialogService.removeModalBusyState();
991
- }
992
- if ((options.indexOf(HTTPService.DISABLE_ERROR_HANDLING) < 0) && anyError) {
993
- try {
994
- for (var results_1 = __values(results), results_1_1 = results_1.next(); !results_1_1.done; results_1_1 = results_1.next()) {
995
- var result = results_1_1.value;
996
- if (result.isError) {
997
- var errorMsg = result.errorMsg + '\n\n' + result.response;
998
- if (turbocommonsTs.StringUtils.isEmpty(errorMsg)) {
999
- errorMsg = 'Unknown error. Make sure Internet connection is available';
1000
- }
1001
- _this.dialogService.addDialog('600px', ['Error: ' + result.code, errorMsg], ['Ok'], DialogErrorComponent);
1002
- }
1003
- }
1004
- }
1005
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1006
- finally {
1007
- try {
1008
- if (results_1_1 && !results_1_1.done && (_a = results_1.return)) _a.call(results_1);
1009
- }
1010
- finally { if (e_1) throw e_1.error; }
1011
- }
1012
- }
1013
- if (finishedCallback !== null) {
1014
- finishedCallback(results, anyError);
1015
- }
1016
- }, progressCallback);
1017
- };
1018
- return HTTPService;
1019
- }(turbocommonsTs.HTTPManager));
1020
- /**
1021
- * execute() method option that tells the service to avoid blocking the user interface with a modal busy state while the requests that are
1022
- * launched by the execute method are running.
1023
- */
1024
- HTTPService.NO_MODAL_BUSY_STATE = 'NO_MODAL_BUSY_STATE';
1025
- /**
1026
- * execute() method option that tells the service to skip showing an error dialog when a request fails. We normally use this to handle the
1027
- * errors by ourselves or if we want to hide the error dialog for a specific request.
1028
- */
1029
- HTTPService.DISABLE_ERROR_HANDLING = 'DISABLE_ERROR_HANDLING';
1030
- HTTPService.decorators = [
1031
- { type: core.Injectable }
1032
- ];
1033
- HTTPService.ctorParameters = function () { return [
1034
- { type: DialogService }
1035
- ]; };
1036
-
1037
- /**
1038
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1039
- *
1040
- * Website : -> http://www.turbogui.org
1041
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1042
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1043
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1044
- */
1045
- /**
1046
- * This is the main application event bus.
1047
- * All global events that happen on the application are broadcasted by this service, and
1048
- * can be listened by any application element who previously subscribed
1049
- */
1050
- var NotificationService = /** @class */ (function () {
1051
- function NotificationService() {
1052
- /**
1053
- * The Observable instance that handles subscriptions and notifications
1054
- */
1055
- this._notifications = new rxjs.Subject();
1056
- }
1057
- /**
1058
- * used by other services or components to subscribe to all notifications that are generated by this service
1059
- *
1060
- * @param notificationHandler A method that will be used to receive each notification as a GUINotification instance
1061
- *
1062
- * @returns The new subscription object. Make sure to unsubscribe when not required anymore
1063
- */
1064
- NotificationService.prototype.subscribe = function (notificationHandler) {
1065
- return this._notifications.subscribe(notificationHandler);
1066
- };
1067
- /**
1068
- * Launch a notification to anyone who may be listening
1069
- *
1070
- * @param notification A notification instance to launch
1071
- */
1072
- NotificationService.prototype.send = function (notification) {
1073
- this._notifications.next(notification);
1074
- };
1075
- /**
1076
- * End a previously initiated subscription
1077
- *
1078
- * @param subscription A previously created subscription instance from which we want to unsubscribe
1079
- */
1080
- NotificationService.prototype.unsubscribe = function (subscription) {
1081
- return subscription.unsubscribe();
1082
- };
1083
- return NotificationService;
1084
- }());
1085
- NotificationService.decorators = [
1086
- { type: core.Injectable }
1087
- ];
1088
-
1089
- /**
1090
- * Class that defines a POST http request, to be used by HttpService
1091
- */
1092
- var HTTPServicePostRequest = /** @class */ (function (_super) {
1093
- __extends(HTTPServicePostRequest, _super);
1094
- function HTTPServicePostRequest() {
1095
- return _super !== null && _super.apply(this, arguments) || this;
1096
- }
1097
- return HTTPServicePostRequest;
1098
- }(turbocommonsTs.HTTPManagerPostRequest));
1099
-
1100
- /**
1101
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1102
- *
1103
- * Website : -> http://www.turbogui.org
1104
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1105
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1106
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1107
- */
1108
- /**
1109
- * Manages the users model and commands
1110
- */
1111
- var UserService = /** @class */ (function () {
1112
- function UserService(httpService, ls) {
1113
- this.httpService = httpService;
1114
- this.ls = ls;
1115
- /**
1116
- * Path to the web service that performs the user login
1117
- */
1118
- this.loginWebService = 'users/login';
1119
- /**
1120
- * The username that is currently defined and will be used by the login methods
1121
- */
1122
- this.userName = '';
1123
- /**
1124
- * The password for the user that is currently defined and will be used by the login methods
1125
- */
1126
- this.password = '';
1127
- /**
1128
- * Check public getter for docs
1129
- */
1130
- this._isLogged = false;
1131
- /**
1132
- * @see token() getter for more info
1133
- */
1134
- this._token = '';
1135
- }
1136
- Object.defineProperty(UserService.prototype, "isUserAndPswDefined", {
1137
- /**
1138
- * Tells if the services contains a non empty username and password specified
1139
- */
1140
- get: function () {
1141
- return !turbocommonsTs.StringUtils.isEmpty(this.userName) && !turbocommonsTs.StringUtils.isEmpty(this.password);
1142
- },
1143
- enumerable: false,
1144
- configurable: true
1145
- });
1146
- Object.defineProperty(UserService.prototype, "isLogged", {
1147
- /**
1148
- * Tells if exists a user that is currently logged or not
1149
- */
1150
- get: function () {
1151
- return this._isLogged;
1152
- },
1153
- enumerable: false,
1154
- configurable: true
1155
- });
1156
- Object.defineProperty(UserService.prototype, "token", {
1157
- /**
1158
- * Gives the value for the currently active user authentication token or an empty string if no user logged
1159
- */
1160
- get: function () {
1161
- return this._token;
1162
- },
1163
- enumerable: false,
1164
- configurable: true
1165
- });
1166
- /**
1167
- * Perform a user login against the configured login webservice
1168
- *
1169
- * @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
1170
- * @param loginFailCallback Method to be executed once the login finishes incorrectly.
1171
- */
1172
- UserService.prototype.login = function (loginOkCallback, loginFailCallback) {
1173
- var _this = this;
1174
- if (loginOkCallback === void 0) { loginOkCallback = null; }
1175
- if (loginFailCallback === void 0) { loginFailCallback = null; }
1176
- var request = new HTTPServicePostRequest(this.loginWebService);
1177
- request.ignoreGlobalPostParams = true;
1178
- var encodedCredentials = turbocommonsTs.ConversionUtils.stringToBase64(turbocommonsTs.ConversionUtils.stringToBase64(this.userName) + ',' + turbocommonsTs.ConversionUtils.stringToBase64(this.password));
1179
- request.parameters = {
1180
- data: encodedCredentials
1181
- };
1182
- request.successCallback = function (response) {
1183
- if (response !== '') {
1184
- response = JSON.parse(response);
1185
- _this._isLogged = true;
1186
- _this._token = response.token;
1187
- _this.httpService.setGlobalPostParam('token', response.token);
1188
- if (loginOkCallback !== null) {
1189
- loginOkCallback(response);
1190
- }
1191
- }
1192
- else {
1193
- _this._clearUserAndToken();
1194
- if (loginFailCallback !== null) {
1195
- loginFailCallback();
1196
- }
1197
- }
1198
- };
1199
- this.httpService.execute(request);
1200
- };
1201
- /**
1202
- * Perform the logout for the currently logged user
1203
- */
1204
- UserService.prototype.logout = function (logoutOkCallback) {
1205
- var _this = this;
1206
- if (logoutOkCallback === void 0) { logoutOkCallback = null; }
1207
- var request = new HTTPServicePostRequest('users/logout');
1208
- request.parameters = {
1209
- token: this._token
1210
- };
1211
- request.successCallback = function () {
1212
- _this._clearUserAndToken();
1213
- if (logoutOkCallback !== null) {
1214
- logoutOkCallback();
1215
- }
1216
- };
1217
- this.httpService.execute(request);
1218
- };
1219
- UserService.prototype._clearUserAndToken = function () {
1220
- this.userName = '';
1221
- this.password = '';
1222
- this._isLogged = false;
1223
- this._token = '';
1224
- if (this.httpService.isGlobalPostParam('token')) {
1225
- this.httpService.deleteGlobalPostParam('token');
1226
- }
1227
- };
1228
- return UserService;
1229
- }());
1230
- UserService.decorators = [
1231
- { type: core.Injectable }
1232
- ];
1233
- UserService.ctorParameters = function () { return [
1234
- { type: HTTPService },
1235
- { type: LocalizationService }
1236
- ]; };
1237
-
1238
- /**
1239
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1240
- *
1241
- * Website : -> http://www.turbogui.org
1242
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1243
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1244
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1245
- */
1246
- /**
1247
- * Manages adding, removing and manipulating the application views
1248
- */
1249
- var ViewsService = /** @class */ (function () {
1250
- function ViewsService(componentFactoryResolver) {
1251
- this.componentFactoryResolver = componentFactoryResolver;
1252
- /**
1253
- * See getter method for docs
1254
- */
1255
- this._loadedViewClass = null;
1256
- /**
1257
- * An instance of the model that is assigned to the currently loaded view
1258
- */
1259
- this._loadedViewModel = null;
1260
- /**
1261
- * See setter method for docs
1262
- */
1263
- this._viewContainerRef = null;
1264
- }
1265
- Object.defineProperty(ViewsService.prototype, "isViewLoaded", {
1266
- /**
1267
- * Tells if there's any view currently loaded on the application views container
1268
- */
1269
- get: function () {
1270
- return this._loadedViewClass !== null;
1271
- },
1272
- enumerable: false,
1273
- configurable: true
1274
- });
1275
- Object.defineProperty(ViewsService.prototype, "viewContainerRef", {
1276
- /**
1277
- * Stores a reference to the visual element that will be used as the container for all the views.
1278
- * This is automatically assigned by the tg-views-container component once it is created.
1279
- *
1280
- * @see ViewsContainerComponent for more information
1281
- */
1282
- set: function (ref) {
1283
- if (ref !== null && this._viewContainerRef !== null) {
1284
- throw new Error('Views container already defined. Only one views container element can exist on an application');
1285
- }
1286
- this._viewContainerRef = ref;
1287
- },
1288
- enumerable: false,
1289
- configurable: true
1290
- });
1291
- /**
1292
- * Create a new view instance with the specified type and add it to the current application views container. Any currently loaded
1293
- * view will be removed
1294
- *
1295
- * Make sure this method is called when all the visual components of the application have been created (ngAfterViewInit)
1296
- *
1297
- * @param view The classname for the view that we want to create and add to the views container (must extend View base class).
1298
- *
1299
- * @return The instance of the newly added and created view.
1300
- */
1301
- ViewsService.prototype.pushView = function (view) {
1302
- // If a view is already loaded, we will unload it first
1303
- if (this._loadedViewClass !== null) {
1304
- // If the loaded view is the same as the specified one, we will do nothing
1305
- if (this._loadedViewClass === view) {
1306
- return;
1307
- }
1308
- this.popView();
1309
- }
1310
- this.verifyViewsContainerExist();
1311
- var factory = this.componentFactoryResolver.resolveComponentFactory(view);
1312
- var componentRef = this._viewContainerRef.createComponent(factory);
1313
- this._loadedViewModel = componentRef.instance.modelClass !== null ? new componentRef.instance.modelClass() : null;
1314
- componentRef.changeDetectorRef.detectChanges();
1315
- this._loadedViewClass = view;
1316
- return componentRef;
1317
- };
1318
- Object.defineProperty(ViewsService.prototype, "model", {
1319
- /**
1320
- * Get the model that is instantiated for the currently active view. (A view model only lives while its view is active)
1321
- * If no view model is assigned to the current view or no view is loaded, an exception will be thrown.
1322
- *
1323
- * @return The current view model instance, which must be casted to the appropiate ViewModel extended class
1324
- */
1325
- get: function () {
1326
- if (this._loadedViewModel === null) {
1327
- throw new Error('No active model. Make sure a view is loaded with an assigned model. Do not access the model until view is initialized (for example on ngAfterViewInit)');
1328
- }
1329
- return this._loadedViewModel;
1330
- },
1331
- enumerable: false,
1332
- configurable: true
1333
- });
1334
- /**
1335
- * Delete the currently loaded view from the views container, and leave it empty.
1336
- * If no view is currently loaded, this method will do nothing
1337
- */
1338
- ViewsService.prototype.popView = function () {
1339
- this.verifyViewsContainerExist();
1340
- if (this._loadedViewClass !== null) {
1341
- this._viewContainerRef.clear();
1342
- }
1343
- this._loadedViewClass = null;
1344
- this._loadedViewModel = null;
1345
- };
1346
- /**
1347
- * Auxiliary method to test if the views container instance is available on the application
1348
- */
1349
- ViewsService.prototype.verifyViewsContainerExist = function () {
1350
- if (this._viewContainerRef === null) {
1351
- throw new Error('Views container not defined. Please declare a <views-container> element in your application');
1352
- }
1353
- };
1354
- return ViewsService;
1355
- }());
1356
- ViewsService.decorators = [
1357
- { type: core.Injectable }
1358
- ];
1359
- ViewsService.ctorParameters = function () { return [
1360
- { type: core.ComponentFactoryResolver }
1361
- ]; };
1362
-
1363
- /**
1364
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1365
- *
1366
- * Website : -> http://www.turbogui.org
1367
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1368
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1369
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1370
- */
1371
- /**
1372
- * Component that is used as a container for application views.
1373
- * We must create only one views container in our application and pass to it a reference to our main
1374
- * viewsService instance. For example:
1375
- *
1376
- * <tg-views-container [viewsService]="viewsService" [initialView]="HomeViewComponent"></tg-views-container>
1377
- */
1378
- var ViewsContainerComponent = /** @class */ (function () {
1379
- function ViewsContainerComponent() {
1380
- /**
1381
- * If we want to load a view by default when this component is loaded for the first time, we can
1382
- * set here the respective class view and it will be automatically added.
1383
- */
1384
- this.initialView = null;
1385
- /**
1386
- * A reference to the views service that is used to operate with this views container.
1387
- * This must be specified when this component is added to the application
1388
- */
1389
- this.viewsService = null;
1390
- }
1391
- /**
1392
- * Check that the service reference has been correctly passed
1393
- */
1394
- ViewsContainerComponent.prototype.ngOnInit = function () {
1395
- if (!(this.viewsService instanceof ViewsService)) {
1396
- throw new Error('ViewService instance must be referenced on a views container');
1397
- }
1398
- else {
1399
- this.viewsService.viewContainerRef = this.viewContainerRef;
1400
- }
1401
- // Set the initial view if defined
1402
- if (this.initialView !== null) {
1403
- this.viewsService.pushView(this.initialView);
1404
- }
1405
- };
1406
- /**
1407
- * Clear the current view from the service when this component is deleted
1408
- */
1409
- ViewsContainerComponent.prototype.ngOnDestroy = function () {
1410
- if (this.viewsService instanceof ViewsService) {
1411
- this.viewsService.popView();
1412
- this.viewsService.viewContainerRef = null;
1413
- }
1414
- };
1415
- return ViewsContainerComponent;
1416
- }());
1417
- ViewsContainerComponent.decorators = [
1418
- { type: core.Component, args: [{
1419
- selector: 'tg-views-container',
1420
- template: "<!--\r\n This is a dummy template component that will be used as the anchor point where the views will be loaded\r\n-->\r\n<ng-template #viewContainerRef></ng-template>",
1421
- styles: [""]
1422
- },] }
1423
- ];
1424
- ViewsContainerComponent.propDecorators = {
1425
- initialView: [{ type: core.Input }],
1426
- viewsService: [{ type: core.Input }],
1427
- viewContainerRef: [{ type: core.ViewChild, args: ['viewContainerRef', { read: core.ViewContainerRef, static: true },] }]
1428
- };
1429
-
1430
- /**
1431
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1432
- *
1433
- * Website : -> http://www.turbogui.org
1434
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1435
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1436
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1437
- */
1438
- /**
1439
- * This is the base class for all button components
1440
- */
1441
- var ButtonBaseComponent = /** @class */ (function () {
1442
- function ButtonBaseComponent() {
1443
- /**
1444
- * Defines the actual opacity that is binded on the html part
1445
- */
1446
- this.currentOpacity = .7;
1447
- /**
1448
- * Defines the actual scale that is binded on the html part
1449
- */
1450
- this.currentScale = 'scale(1)';
1451
- /**
1452
- * Defines if the button can be clicked or not
1453
- */
1454
- this.pointerEvents = 'initial';
1455
- /**
1456
- * Specifies if the button animations must rollback when the user releases the mouse or pointer after pressing it
1457
- */
1458
- this.releaseOnMouseUp = true;
1459
- /**
1460
- * Specifies the amount of milliseconds that the button will vibrate when it gets clicked (only on compatible devices and browsers)
1461
- * Set it to 0 to disable click vibration
1462
- */
1463
- this.vibrateOnClick = 25;
1464
- /**
1465
- * Defines the button opacity when it is not clicked
1466
- */
1467
- this.defaultOpacity = .7;
1468
- /**
1469
- * Defines the image scale when it is not clicked
1470
- */
1471
- this.defaultScale = 1;
1472
- /**
1473
- * Defines the button opacity when it is hovered
1474
- */
1475
- this.hoverOpacity = .8;
1476
- /**
1477
- * Defines the image scale when it is hovered
1478
- */
1479
- this.hoverScale = 1;
1480
- /**
1481
- * Defines the button opacity when it is clicked
1482
- */
1483
- this.clickOpacity = 1;
1484
- /**
1485
- * Defines the image scale when it is clicked
1486
- */
1487
- this.clickScale = 1;
1488
- /**
1489
- * Defines the button opacity when it is disabled
1490
- */
1491
- this.disabledOpacity = .2;
1492
- /**
1493
- * Stores the value that tells if the button is enabled or disabled
1494
- */
1495
- this._enabled = true;
1496
- }
1497
- Object.defineProperty(ButtonBaseComponent.prototype, "enabled", {
1498
- /**
1499
- * Specifies if the button is enabled or disabled
1500
- */
1501
- set: function (v) {
1502
- this._enabled = v;
1503
- this.currentOpacity = v ? this.defaultOpacity : this.disabledOpacity;
1504
- this.pointerEvents = v ? 'initial' : 'none';
1505
- },
1506
- enumerable: false,
1507
- configurable: true
1508
- });
1509
- ;
1510
- /**
1511
- * Set button default values
1512
- */
1513
- ButtonBaseComponent.prototype.ngOnInit = function () {
1514
- this.currentOpacity = this._enabled ? this.defaultOpacity : this.disabledOpacity;
1515
- this.currentScale = 'scale(1)';
1516
- };
1517
- /**
1518
- * Listens for the mouse over the button component
1519
- */
1520
- ButtonBaseComponent.prototype.onMouseOver = function () {
1521
- if (this._enabled) {
1522
- this.currentOpacity = this.hoverOpacity;
1523
- this.currentScale = 'scale(' + this.hoverScale + ')';
1524
- }
1525
- };
1526
- /**
1527
- * Listens for the mouse out of the button component
1528
- */
1529
- ButtonBaseComponent.prototype.onMouseOut = function () {
1530
- if (this._enabled) {
1531
- this.currentOpacity = this.defaultOpacity;
1532
- this.currentScale = 'scale(' + this.defaultScale + ')';
1533
- }
1534
- };
1535
- /**
1536
- * Listens for the mouse down on the button component
1537
- */
1538
- ButtonBaseComponent.prototype.onMouseDown = function () {
1539
- if (this._enabled) {
1540
- this.currentOpacity = this.clickOpacity;
1541
- this.currentScale = 'scale(' + this.clickScale + ')';
1542
- }
1543
- };
1544
- /**
1545
- * Listens for the mouse up of the button component
1546
- */
1547
- ButtonBaseComponent.prototype.onMouseUp = function () {
1548
- if (this._enabled) {
1549
- if (this.vibrateOnClick > 0 && window.navigator && window.navigator.vibrate) {
1550
- window.navigator.vibrate(this.vibrateOnClick);
1551
- }
1552
- if (this.releaseOnMouseUp) {
1553
- this.currentOpacity = this.defaultOpacity;
1554
- this.currentScale = 'scale(' + this.defaultScale + ')';
1555
- }
1556
- }
1557
- };
1558
- return ButtonBaseComponent;
1559
- }());
1560
- ButtonBaseComponent.decorators = [
1561
- { type: core.Directive }
1562
- ];
1563
- ButtonBaseComponent.propDecorators = {
1564
- currentOpacity: [{ type: core.HostBinding, args: ['style.opacity',] }],
1565
- currentScale: [{ type: core.HostBinding, args: ['style.transform',] }],
1566
- pointerEvents: [{ type: core.HostBinding, args: ['style.pointer-events',] }],
1567
- releaseOnMouseUp: [{ type: core.Input }],
1568
- vibrateOnClick: [{ type: core.Input }],
1569
- defaultOpacity: [{ type: core.Input }],
1570
- defaultScale: [{ type: core.Input }],
1571
- hoverOpacity: [{ type: core.Input }],
1572
- hoverScale: [{ type: core.Input }],
1573
- clickOpacity: [{ type: core.Input }],
1574
- clickScale: [{ type: core.Input }],
1575
- disabledOpacity: [{ type: core.Input }],
1576
- enabled: [{ type: core.Input }],
1577
- onMouseOver: [{ type: core.HostListener, args: ['mouseover',] }],
1578
- onMouseOut: [{ type: core.HostListener, args: ['mouseout',] }, { type: core.HostListener, args: ['pointerout',] }, { type: core.HostListener, args: ['pointerleave',] }],
1579
- onMouseDown: [{ type: core.HostListener, args: ['pointerdown',] }],
1580
- onMouseUp: [{ type: core.HostListener, args: ['pointerup',] }]
1581
- };
1582
-
1583
- /**
1584
- * This component is a basic button that uses an image as its visual appearance
1585
- */
1586
- var ButtonImageComponent = /** @class */ (function (_super) {
1587
- __extends(ButtonImageComponent, _super);
1588
- function ButtonImageComponent() {
1589
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1590
- /**
1591
- * This is used to attach the fade animation directly to this component so it fades in and out when created and removed from the app
1592
- */
1593
- _this.buttonFade = true;
1594
- /**
1595
- * Defines the path to the image that is shown by this button
1596
- */
1597
- _this.src = '';
1598
- /**
1599
- * Defines the percentual size of the image based on the button size. 100 means the image will fill the whole button,
1600
- * 50 only half, etc..
1601
- */
1602
- _this.percentSize = 100;
1603
- return _this;
1604
- }
1605
- return ButtonImageComponent;
1606
- }(ButtonBaseComponent));
1607
- ButtonImageComponent.decorators = [
1608
- { type: core.Component, args: [{
1609
- selector: 'tg-button-image',
1610
- template: "<img src=\"{{src}}\"\r\n [style.width]=\"percentSize + '%'\"\r\n [style.height]=\"percentSize + '%'\" />",
1611
- animations: [FadeAnimationClass.getTrigger('buttonFade', '300ms ease', '300ms ease')],
1612
- styles: [":host{-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:opacity .3s ease,transform .2s cubic-bezier(.04,.62,.58,1);display:flex;justify-content:center;align-items:center}img{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}\n"]
1613
- },] }
1614
- ];
1615
- ButtonImageComponent.propDecorators = {
1616
- buttonFade: [{ type: core.HostBinding, args: ['@buttonFade',] }],
1617
- src: [{ type: core.Input }],
1618
- percentSize: [{ type: core.Input }]
1619
- };
1620
-
1621
- /**
1622
- * This component is a basic button without visual appearance, that is used as a container to load any content.
1623
- */
1624
- var ButtonContainerComponent = /** @class */ (function (_super) {
1625
- __extends(ButtonContainerComponent, _super);
1626
- function ButtonContainerComponent() {
1627
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1628
- /**
1629
- * This is used to attach the fade animation directly to this component so it fades in and out when created and removed from the app
1630
- */
1631
- _this.buttonFade = true;
1632
- return _this;
1633
- }
1634
- return ButtonContainerComponent;
1635
- }(ButtonBaseComponent));
1636
- ButtonContainerComponent.decorators = [
1637
- { type: core.Component, args: [{
1638
- selector: 'tg-button-container',
1639
- template: "<ng-content></ng-content>",
1640
- animations: [FadeAnimationClass.getTrigger('buttonFade', '300ms ease', '300ms ease')],
1641
- styles: [":host{-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:opacity .3s ease,transform .2s cubic-bezier(.04,.62,.58,1);display:flex;justify-content:center;align-items:center}\n"]
1642
- },] }
1643
- ];
1644
- ButtonContainerComponent.propDecorators = {
1645
- buttonFade: [{ type: core.HostBinding, args: ['@buttonFade',] }]
1646
- };
1647
-
1648
- /**
1649
- * A dialog component with a single option button, to be used with dialog service
1650
- */
1651
- var DialogSingleOptionComponent = /** @class */ (function (_super) {
1652
- __extends(DialogSingleOptionComponent, _super);
1653
- function DialogSingleOptionComponent(dialogRef, data) {
1654
- var _this = _super.call(this) || this;
1655
- _this.dialogRef = dialogRef;
1656
- _this.data = data;
1657
- if (data.texts.length < 1) {
1658
- throw new Error('DialogSingleOptionComponent expects 2 texts: The title and optionally a description');
1659
- }
1660
- if (data.options.length !== 1) {
1661
- throw new Error('DialogSingleOptionComponent expects only one option');
1662
- }
1663
- return _this;
1664
- }
1665
- return DialogSingleOptionComponent;
1666
- }(DialogOptionsBaseComponent));
1667
- DialogSingleOptionComponent.decorators = [
1668
- { type: core.Component, args: [{
1669
- selector: 'tg-dialog-single-option',
1670
- template: "<h3>\r\n {{data.texts[0]}}\r\n</h3>\r\n\r\n<p *ngIf=\"data.texts.length > 1\">\r\n {{data.texts[1]}}\r\n</p>\r\n\r\n<button mat-raised-button color=\"primary\"\r\n (click)=\"dialogRef.close(0)\">\r\n \r\n {{data.options[0]}}\r\n \r\n</button>",
1671
- styles: [":host{min-height:300px}h3{margin-bottom:25px}p{margin-bottom:52px}button{float:right}\n"]
1672
- },] }
1673
- ];
1674
- DialogSingleOptionComponent.ctorParameters = function () { return [
1675
- { type: dialog.MatDialogRef },
1676
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
1677
- ]; };
1678
-
1679
- /**
1680
- * A dialog component with two option buttons, to be used with dialog service.
1681
- * The first of the options is considered to be the primary one and will therefore have more visual accent
1682
- */
1683
- var DialogTwoOptionComponent = /** @class */ (function (_super) {
1684
- __extends(DialogTwoOptionComponent, _super);
1685
- function DialogTwoOptionComponent(dialogRef, data) {
1686
- var _this = _super.call(this) || this;
1687
- _this.dialogRef = dialogRef;
1688
- _this.data = data;
1689
- if (data.texts.length < 1) {
1690
- throw new Error('DialogTwoOptionComponent expects 2 texts: The title and optionally a description');
1691
- }
1692
- if (data.options.length !== 2) {
1693
- throw new Error('DialogTwoOptionComponent expects only two options');
1694
- }
1695
- return _this;
1696
- }
1697
- return DialogTwoOptionComponent;
1698
- }(DialogOptionsBaseComponent));
1699
- DialogTwoOptionComponent.decorators = [
1700
- { type: core.Component, args: [{
1701
- selector: 'tg-dialog-two-option',
1702
- template: "<h3>\r\n {{data.texts[0]}}\r\n</h3>\r\n\r\n<p *ngIf=\"data.texts.length > 1\">\r\n {{data.texts[1]}}\r\n</p>\r\n\r\n<div class=\"buttonsContainer\">\r\n\r\n <button mat-raised-button color=\"primary\" class=\"primaryButton\"\r\n (click)=\"dialogRef.close(0)\">\r\n \r\n {{data.options[0]}}\r\n \r\n </button>\r\n \r\n <button mat-button\r\n (click)=\"dialogRef.close(1)\">\r\n \r\n {{data.options[1]}}\r\n \r\n </button>\r\n \r\n</div>\r\n",
1703
- styles: [":host{min-height:300px}h3{margin-bottom:25px}p{margin-bottom:52px}.buttonsContainer{width:100%;max-width:530px;display:flex;flex-direction:row-reverse;float:right}button{width:50%;padding:0}.primaryButton{margin-left:2%}\n"]
1704
- },] }
1705
- ];
1706
- DialogTwoOptionComponent.ctorParameters = function () { return [
1707
- { type: dialog.MatDialogRef },
1708
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
1709
- ]; };
1710
-
1711
- /**
1712
- * An abstraction of the browser entity an all its related operations and properties
1713
- */
1714
- var BrowserService = /** @class */ (function (_super) {
1715
- __extends(BrowserService, _super);
1716
- function BrowserService(location) {
1717
- var _this = _super.call(this) || this;
1718
- _this.location = location;
1719
- return _this;
1720
- }
1721
- /**
1722
- * Modify the current browser URI without reloading the current page document
1723
- *
1724
- * @param path The uri value we want to set
1725
- * @param query The query url parameters part we want to specify if any
1726
- *
1727
- * @returns void
1728
- */
1729
- BrowserService.prototype.setURI = function (path, query) {
1730
- this.location.go(path, query);
1731
- };
1732
- /**
1733
- * Obtain a subscription to get notified on any changes at the browser url
1734
- *
1735
- * @param onNext A method to be executed every time the url changes on the browser. The url will be available inside the value parameter
1736
- *
1737
- * @returns Subscribed events. Make sure to unsubscribe when not needed
1738
- */
1739
- BrowserService.prototype.subscribeToUrlChange = function (onNext) {
1740
- return this.location.subscribe(onNext);
1741
- };
1742
- return BrowserService;
1743
- }(turbocommonsTs.BrowserManager));
1744
- BrowserService.decorators = [
1745
- { type: core.Injectable }
1746
- ];
1747
- BrowserService.ctorParameters = function () { return [
1748
- { type: common.Location }
1749
- ]; };
1750
-
1751
- /**
1752
- * A dialog component which allows us to select one single item from a list. The elements on that list are displayed on a table
1753
- * which may show a scroll if necessary when there are many elements on the list.
1754
- *
1755
- * It also allows us to filter inside the list with a custom text that we can type into a search input, which is optional.
1756
- *
1757
- * texts parameter must contain the title, the description (optional), the filter input title (optional), and the submit button caption.
1758
- * If that caption is not provided, the selection will be automatically performed once user clicks on an element on the list. Otherwise,
1759
- * the element will be selected on the list and the selection will be performed once the user clicks on the submit button.
1760
- *
1761
- * options parameter must contain the list of elements that will be displayed to the user
1762
- */
1763
- var DialogSingleSelectionListComponent = /** @class */ (function (_super) {
1764
- __extends(DialogSingleSelectionListComponent, _super);
1765
- function DialogSingleSelectionListComponent(dialogRef, browserService, data) {
1766
- var e_1, _a;
1767
- var _this = _super.call(this) || this;
1768
- _this.dialogRef = dialogRef;
1769
- _this.browserService = browserService;
1770
- _this.data = data;
1771
- /**
1772
- * Declare a reference to the string utils class so it can be used on the html part
1773
- */
1774
- _this.stringUtils = turbocommonsTs.StringUtils;
1775
- /**
1776
- * Contains the list of elements that will be directly shown to the user at the component list.
1777
- * It may be filtered or not depending on this component setup and the user input
1778
- */
1779
- _this.filteredOptions = [];
1780
- /**
1781
- * Contains the original list of elements that are provided to be listed on this component before
1782
- * being possibly filtered. It is only used as a backup, not shown to the user
1783
- */
1784
- _this.originalOptions = [];
1785
- /**
1786
- * The same list as the originally provided but processed for a better text search.
1787
- * It will be used to perform the search, but not shown to the user.
1788
- */
1789
- _this.originalOptionsFullTextSearch = [];
1790
- /**
1791
- * Stores the index for the element that's been selected by the user
1792
- */
1793
- _this.selectedItemIndex = -1;
1794
- /**
1795
- * This method is used to greatly improve ngFor performance with arrays of primitive values. It tells the refresh
1796
- * function to work by index instead of by value. The change in performance when refreshing the list is massive.
1797
- */
1798
- _this.trackByFn = function (index, _value) { return index; };
1799
- if (data.texts.length < 1) {
1800
- throw new Error('DialogSingleSelectionListComponent expects 4 texts: The title, the description (optional), the filter input title (optional), and the submit button caption');
1801
- }
1802
- if (data.options.length < 1) {
1803
- throw new Error('DialogSingleSelectionListComponent expects one or more options');
1804
- }
1805
- _this.originalOptions = data.options;
1806
- try {
1807
- for (var _b = __values(_this.originalOptions), _c = _b.next(); !_c.done; _c = _b.next()) {
1808
- var option = _c.value;
1809
- _this.filteredOptions.push(option);
1810
- _this.originalOptionsFullTextSearch.push(turbocommonsTs.StringUtils.formatForFullTextSearch(option));
1811
- }
1812
- }
1813
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1814
- finally {
1815
- try {
1816
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1817
- }
1818
- finally { if (e_1) throw e_1.error; }
1819
- }
1820
- return _this;
1821
- }
1822
- /**
1823
- * Method to calculate the max possible height that the list items container is allowed to have
1824
- */
1825
- DialogSingleSelectionListComponent.prototype.getListItemsContainerMaxheight = function () {
1826
- return (this.browserService.getWindowHeight() * 0.6) + 'px';
1827
- };
1828
- /**
1829
- * When the user types a value on the input element to filter the list, this method will perform
1830
- * that filtering and refresh the list
1831
- */
1832
- DialogSingleSelectionListComponent.prototype.onSearchChange = function (input) {
1833
- this.selectedItemIndex = -1;
1834
- var inputValue = turbocommonsTs.StringUtils.formatForFullTextSearch(input.value);
1835
- for (var i = 0; i < this.originalOptionsFullTextSearch.length; i++) {
1836
- if (inputValue === '' ||
1837
- this.originalOptionsFullTextSearch[i].indexOf(inputValue) >= 0) {
1838
- this.filteredOptions[i] = this.originalOptions[i];
1839
- }
1840
- else {
1841
- this.filteredOptions[i] = '';
1842
- }
1843
- }
1844
- };
1845
- return DialogSingleSelectionListComponent;
1846
- }(DialogOptionsBaseComponent));
1847
- DialogSingleSelectionListComponent.decorators = [
1848
- { type: core.Component, args: [{
1849
- selector: 'tg-dialog-single-selection-list',
1850
- template: "<h3>\r\n {{data.texts[0]}}\r\n</h3>\r\n\r\n<p *ngIf=\"data.texts.length > 1 &amp;&amp; !stringUtils.isEmpty(data.texts[1])\">\r\n {{data.texts[1]}}\r\n</p>\r\n\r\n<mat-form-field *ngIf=\"data.texts.length > 2 &amp;&amp; !stringUtils.isEmpty(data.texts[2])\"\r\n class=\"searchItemInputContainer\">\r\n \r\n <input matInput autoFocusOnDisplay\r\n placeholder=\"{{data.texts[2]}}\"\r\n (input)=\"onSearchChange($event.target)\">\r\n \r\n</mat-form-field>\r\n\r\n<div class=\"listItemsContainer\"\r\n [style.max-height]=\"getListItemsContainerMaxheight()\">\r\n\r\n <div class=\"listItemContainer\"\r\n [style.background-color]=\"selectedItemIndex === i ? '#90d1ffad' : (i % 2 === 0 ? 'initial' : '#00000009')\"\r\n *ngFor=\"let item of filteredOptions; let i = index; trackBy: trackByFn\"\r\n (click)=\"data.texts.length < 4 ? dialogRef.close(i) : selectedItemIndex = i\">\r\n \r\n <p *ngIf=\"item !== ''\">\r\n {{item}}\r\n </p>\r\n \r\n </div>\r\n\r\n</div>\r\n\r\n<button mat-raised-button color=\"primary\"\r\n [disabled]=\"selectedItemIndex < 0\"\r\n (click)=\"dialogRef.close(selectedItemIndex)\"\r\n *ngIf=\"data.texts.length > 3\">\r\n\r\n {{data.texts[3]}}\r\n \r\n</button>",
1851
- styles: [":host{min-height:300px}h3{margin-top:0;margin-bottom:10px}p{margin-top:0;margin-bottom:5px}.searchItemInputContainer{width:100%;margin-top:0;margin-bottom:0}.listItemsContainer{overflow-y:auto;border:1px solid #00000033;border-radius:4px;margin-bottom:5px}.listItemContainer p{line-height:36px;width:calc(100% - 12px);margin:0 0 0 6px}button{float:right}\n"]
1852
- },] }
1853
- ];
1854
- DialogSingleSelectionListComponent.ctorParameters = function () { return [
1855
- { type: dialog.MatDialogRef },
1856
- { type: BrowserService },
1857
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
1858
- ]; };
1859
-
1860
- /**
1861
- * A dialog component that is designed to show more than one option buttons (usually more than two), to be used with dialog service
1862
- */
1863
- var DialogMultipleOptionComponent = /** @class */ (function (_super) {
1864
- __extends(DialogMultipleOptionComponent, _super);
1865
- function DialogMultipleOptionComponent(dialogRef, data) {
1866
- var _this = _super.call(this) || this;
1867
- _this.dialogRef = dialogRef;
1868
- _this.data = data;
1869
- if (data.texts.length < 1) {
1870
- throw new Error('DialogMultipleOptionComponent expects 2 texts: The title and optionally a description');
1871
- }
1872
- return _this;
1873
- }
1874
- return DialogMultipleOptionComponent;
1875
- }(DialogOptionsBaseComponent));
1876
- DialogMultipleOptionComponent.decorators = [
1877
- { type: core.Component, args: [{
1878
- selector: 'tg-dialog-multiple-option',
1879
- template: "<h3>\r\n {{data.texts[0]}}\r\n</h3>\r\n\r\n<p *ngIf=\"data.texts.length > 1\">\r\n {{data.texts[1]}}\r\n</p>\r\n\r\n<button mat-raised-button color=\"primary\"\r\n *ngFor=\"let option of data.options; let i = index\"\r\n (click)=\"dialogRef.close(i)\">\r\n \r\n {{option}}\r\n \r\n</button>",
1880
- styles: [":host{display:flex;flex-direction:column;min-height:193px}h3{margin-bottom:45px}button{margin-bottom:25px}\n"]
1881
- },] }
1882
- ];
1883
- DialogMultipleOptionComponent.ctorParameters = function () { return [
1884
- { type: dialog.MatDialogRef },
1885
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
1886
- ]; };
1887
-
1888
- /**
1889
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1890
- *
1891
- * Website : -> http://www.turbogui.org
1892
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1893
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1894
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1895
- */
1896
- /** This directive is used to listen for onInit events on raw html elements */
1897
- /**
1898
- * This directive is used to listen for onInit events on raw html elements
1899
- * If we place (elementCreated)="someMethod()" on the element at the html template part, when the element
1900
- * that uses this directive is visually created, someMethod() will be called.
1901
- */
1902
- var ElementCreatedDirective = /** @class */ (function () {
1903
- function ElementCreatedDirective() {
1904
- /**
1905
- * Event that will be dispatched once element is created
1906
- */
1907
- this.elementCreated = new core.EventEmitter();
1908
- }
1909
- /**
1910
- * Listen for the on init event
1911
- */
1912
- ElementCreatedDirective.prototype.ngOnInit = function () {
1913
- this.elementCreated.next(this);
1914
- };
1915
- return ElementCreatedDirective;
1916
- }());
1917
- ElementCreatedDirective.decorators = [
1918
- { type: core.Directive, args: [{
1919
- selector: '[elementCreated]'
1920
- },] }
1921
- ];
1922
- ElementCreatedDirective.propDecorators = {
1923
- elementCreated: [{ type: core.Output, args: ['elementCreated',] }]
1924
- };
1925
-
1926
- /**
1927
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1928
- *
1929
- * Website : -> http://www.turbogui.org
1930
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1931
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1932
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1933
- */
1934
- /** This directive is used to listen for onDestroy events on raw html elements */
1935
- /**
1936
- * This directive is used to listen for onDestroy events on raw html elements
1937
- * If we place (elementDestroyed)="someMethod()" on the element at the html template part, when the element
1938
- * that uses this directive is visually destroyed from the screen, someMethod() will be called.
1939
- */
1940
- var ElementDestroyedDirective = /** @class */ (function () {
1941
- function ElementDestroyedDirective() {
1942
- /**
1943
- * Event that will be dispatched once element is destroyed
1944
- */
1945
- this.elementDestroyed = new core.EventEmitter();
1946
- }
1947
- /**
1948
- * Listen for the on destroy event
1949
- */
1950
- ElementDestroyedDirective.prototype.ngOnDestroy = function () {
1951
- this.elementDestroyed.next(this);
1952
- };
1953
- return ElementDestroyedDirective;
1954
- }());
1955
- ElementDestroyedDirective.decorators = [
1956
- { type: core.Directive, args: [{
1957
- selector: '[elementDestroyed]'
1958
- },] }
1959
- ];
1960
- ElementDestroyedDirective.propDecorators = {
1961
- elementDestroyed: [{ type: core.Output, args: ['elementDestroyed',] }]
1962
- };
1963
-
1964
- /**
1965
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
1966
- *
1967
- * Website : -> http://www.turbogui.org
1968
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
1969
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
1970
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
1971
- */
1972
- /** This directive is used to perform an autofocus on an element every time it is displayed */
1973
- /**
1974
- * This directive is used to perform an autofocus on an element every time it is displayed
1975
- * If we set the autoFocusOnDisplay tag to the html element, it will be automatically focused after it is shown.
1976
- */
1977
- var AutoFocusOnDisplayDirective = /** @class */ (function () {
1978
- function AutoFocusOnDisplayDirective(el, zone, renderer) {
1979
- this.el = el;
1980
- this.zone = zone;
1981
- this.renderer = renderer;
1982
- if (!el.nativeElement['focus']) {
1983
- throw new Error('Element does not accept focus');
1984
- }
1985
- }
1986
- AutoFocusOnDisplayDirective.prototype.ngAfterContentInit = function () {
1987
- var _this = this;
1988
- this.zone.runOutsideAngular(function () { return setTimeout(function () {
1989
- _this.renderer.selectRootElement(_this.el.nativeElement).focus();
1990
- }, 0); });
1991
- };
1992
- return AutoFocusOnDisplayDirective;
1993
- }());
1994
- AutoFocusOnDisplayDirective.decorators = [
1995
- { type: core.Directive, args: [{
1996
- selector: '[autoFocusOnDisplay]'
1997
- },] }
1998
- ];
1999
- AutoFocusOnDisplayDirective.ctorParameters = function () { return [
2000
- { type: core.ElementRef },
2001
- { type: core.NgZone },
2002
- { type: core.Renderer2 }
2003
- ]; };
2004
-
2005
- /**
2006
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2007
- *
2008
- * Website : -> http://www.turbogui.org
2009
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2010
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2011
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2012
- */
2013
- /** This directive is used to perform an automatic select all text on an element every time it is focused */
2014
- /**
2015
- * This directive is used to perform an an automatic select all text on an element every time it is focused.
2016
- * If we set the autoSelectTextOnFocus tag to the html element, its text will be automatically selected after it gets the focus.
2017
- */
2018
- var AutoSelectTextOnFocusDirective = /** @class */ (function () {
2019
- function AutoSelectTextOnFocusDirective(el, renderer) {
2020
- this.el = el;
2021
- this.renderer = renderer;
2022
- if (!el.nativeElement['select']) {
2023
- throw new Error('Element does not accept select');
2024
- }
2025
- }
2026
- AutoSelectTextOnFocusDirective.prototype.onFocus = function () {
2027
- this.renderer.selectRootElement(this.el.nativeElement).select();
2028
- };
2029
- return AutoSelectTextOnFocusDirective;
2030
- }());
2031
- AutoSelectTextOnFocusDirective.decorators = [
2032
- { type: core.Directive, args: [{
2033
- selector: '[autoSelectTextOnFocus]'
2034
- },] }
2035
- ];
2036
- AutoSelectTextOnFocusDirective.ctorParameters = function () { return [
2037
- { type: core.ElementRef },
2038
- { type: core.Renderer2 }
2039
- ]; };
2040
- AutoSelectTextOnFocusDirective.propDecorators = {
2041
- onFocus: [{ type: core.HostListener, args: ['focus', ['$event'],] }]
2042
- };
2043
-
2044
- /**
2045
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2046
- *
2047
- * Website : -> http://www.turbogui.org
2048
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2049
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2050
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2051
- */
2052
- /**
2053
- * This file contains the root module that contains all the library declarations and exports.
2054
- */
2055
- var TurboGuiAngularModule = /** @class */ (function () {
2056
- function TurboGuiAngularModule() {
2057
- }
2058
- return TurboGuiAngularModule;
2059
- }());
2060
- TurboGuiAngularModule.decorators = [
2061
- { type: core.NgModule, args: [{
2062
- imports: [
2063
- dialog.MatDialogModule,
2064
- snackBar.MatSnackBarModule,
2065
- input.MatInputModule,
2066
- button.MatButtonModule,
2067
- formField.MatFormFieldModule,
2068
- animations$1.BrowserAnimationsModule
2069
- ],
2070
- declarations: [
2071
- BusyStateBaseComponent,
2072
- DialogErrorComponent,
2073
- DialogSingleOptionComponent,
2074
- DialogTwoOptionComponent,
2075
- DialogMultipleOptionComponent,
2076
- DialogSingleSelectionListComponent,
2077
- ViewsContainerComponent,
2078
- ButtonImageComponent,
2079
- ButtonContainerComponent,
2080
- ElementCreatedDirective,
2081
- ElementDestroyedDirective,
2082
- AutoFocusOnDisplayDirective,
2083
- AutoSelectTextOnFocusDirective
2084
- ],
2085
- // Globally available singleton services are added here
2086
- providers: [
2087
- DialogService,
2088
- LocalizationService,
2089
- HTTPService,
2090
- NotificationService,
2091
- UserService,
2092
- ViewsService,
2093
- BrowserService
2094
- ],
2095
- exports: [
2096
- BusyStateBaseComponent,
2097
- ViewsContainerComponent,
2098
- ButtonImageComponent,
2099
- ButtonContainerComponent,
2100
- DialogErrorComponent,
2101
- DialogSingleOptionComponent,
2102
- DialogTwoOptionComponent,
2103
- DialogMultipleOptionComponent,
2104
- DialogSingleSelectionListComponent,
2105
- ElementCreatedDirective,
2106
- ElementDestroyedDirective,
2107
- AutoFocusOnDisplayDirective,
2108
- AutoSelectTextOnFocusDirective
2109
- ]
2110
- },] }
2111
- ];
2112
-
2113
- /**
2114
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2115
- *
2116
- * Website : -> http://www.turbogui.org
2117
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2118
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2119
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2120
- */
2121
- /**
2122
- * Captures all the application exceptions and performs any required action.
2123
- * It also contains multiple general error management features.
2124
- *
2125
- * To define this class as your application error handler, you must add the following to your
2126
- * main app module providers:
2127
- * {
2128
- * provide: ErrorHandler,
2129
- * useClass: GlobalErrorService
2130
- * },
2131
- * GlobalErrorService
2132
- *
2133
- * You cannot access the error handler at runtime. If you need to modify any of the behaviours
2134
- * or implement your custom ones, you must extend this class and set your new one as the error
2135
- * handler provider.
2136
- */
2137
- var GlobalErrorService = /** @class */ (function () {
2138
- function GlobalErrorService() {
2139
- /**
2140
- * Enables or disables the error notification to user via an alert box
2141
- * Extend this class and override this value on your custom error handle to change it
2142
- */
2143
- this.showExceptionsToUser = true;
2144
- /**
2145
- * Enables or disables the error notification to user via an alert box
2146
- * Extend this class and override this value on your custom error handle to change it
2147
- */
2148
- this.showExceptionsOnConsole = true;
2149
- /**
2150
- * Defines the text that will be used for the alert that is shown to the user when an exception happens
2151
- * and showExceptionsToUser is true
2152
- * Extend this class and override this value on your custom error handle to change it
2153
- */
2154
- this.errorAlertMessage = 'Application exception:\n\n';
2155
- }
2156
- /**
2157
- * Show an alert with the received error detail and also log it to the js console.
2158
- *
2159
- * Angular expects at least this method to be implemented on any class that is used as a global exception handler.
2160
- *
2161
- * @param error An error instance
2162
- */
2163
- GlobalErrorService.prototype.handleError = function (error) {
2164
- if (this.showExceptionsToUser) {
2165
- alert(this.errorAlertMessage + error);
2166
- }
2167
- if (this.showExceptionsOnConsole) {
2168
- console.log(error);
2169
- }
2170
- throw error;
2171
- };
2172
- return GlobalErrorService;
2173
- }());
2174
- GlobalErrorService.decorators = [
2175
- { type: core.Injectable }
2176
- ];
2177
-
2178
- /**
2179
- * Class that defines a GET http request, to be used by HttpService
2180
- */
2181
- var HTTPServiceGetRequest = /** @class */ (function (_super) {
2182
- __extends(HTTPServiceGetRequest, _super);
2183
- function HTTPServiceGetRequest() {
2184
- return _super !== null && _super.apply(this, arguments) || this;
2185
- }
2186
- return HTTPServiceGetRequest;
2187
- }(turbocommonsTs.HTTPManagerGetRequest));
2188
-
2189
- /**
2190
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2191
- *
2192
- * Website : -> http://www.turbogui.org
2193
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2194
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2195
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2196
- */
2197
- /**
2198
- * Defines the data that is contained inside a GUI notification
2199
- */
2200
- var GUINotification = /** @class */ (function () {
2201
- function GUINotification(name, type, data) {
2202
- if (type === void 0) { type = ''; }
2203
- if (data === void 0) { data = null; }
2204
- /**
2205
- * The name for this notification
2206
- */
2207
- this.name = '';
2208
- /**
2209
- * An optional type to categorize this notification in case the name is not enough
2210
- * to uniquely identify it
2211
- */
2212
- this.type = '';
2213
- /**
2214
- * Additional data to send with the notification
2215
- */
2216
- this.data = null;
2217
- this.name = name;
2218
- this.type = type;
2219
- this.data = data;
2220
- }
2221
- return GUINotification;
2222
- }());
2223
-
2224
- /**
2225
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2226
- *
2227
- * Website : -> http://www.turbogui.org
2228
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2229
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2230
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2231
- */
2232
- /**
2233
- * Defines an application view.
2234
- * Our View components must extend this class so they can be manipulated via ViewsService
2235
- */
2236
- var View = /** @class */ (function () {
2237
- /**
2238
- * In order for the views service to know which model class must be created when setting a new active view,
2239
- * each view must specify the class for the view model at the overriden constructor super() call.
2240
- * All view models must also extend ViewModel. If we do not plan to attach a model to a view, we can pass a null value to
2241
- * the constructor super() call.
2242
- *
2243
- * A new model instance will be automatically created each time the view is added to the views container, and
2244
- * destroyed when the view is removed. So the view model will only live while the view is active on the views service.
2245
- */
2246
- function View(modelClass) {
2247
- this._modelClass = null;
2248
- this._modelClass = modelClass;
2249
- }
2250
- Object.defineProperty(View.prototype, "modelClass", {
2251
- /**
2252
- * Obtain the class type for the model that is linked to this view, or null if the view model is not yet instantiated.
2253
- */
2254
- get: function () {
2255
- return this._modelClass;
2256
- },
2257
- enumerable: false,
2258
- configurable: true
2259
- });
2260
- return View;
2261
- }());
2262
-
2263
- /**
2264
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2265
- *
2266
- * Website : -> http://www.turbogui.org
2267
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2268
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2269
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2270
- */
2271
- /**
2272
- * Defines the model base class for an application view
2273
- */
2274
- var ViewModel = /** @class */ (function () {
2275
- function ViewModel() {
2276
- }
2277
- return ViewModel;
2278
- }());
2279
-
2280
- /**
2281
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2282
- *
2283
- * Website : -> http://www.turbogui.org
2284
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2285
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2286
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2287
- */
2288
- /**
2289
- * Defines the service base class for a view service class. All services that are used by views must extend this.
2290
- * We must create the view services as an @Injectable() angular class which will be globally available at any time, but we must take
2291
- * into consideration that the view model will only be instantiated when the view is active.
2292
- */
2293
- var ViewService = /** @class */ (function () {
2294
- /**
2295
- * Class requires a views service instance
2296
- */
2297
- function ViewService(viewsService) {
2298
- this.viewsService = viewsService;
2299
- }
2300
- Object.defineProperty(ViewService.prototype, "model", {
2301
- /**
2302
- * A reference to the currently active view model
2303
- */
2304
- get: function () {
2305
- return this.viewsService.model;
2306
- },
2307
- enumerable: false,
2308
- configurable: true
2309
- });
2310
- return ViewService;
2311
- }());
2312
-
2313
- /**
2314
- * TurboGUI is A library that helps with the most common and generic UI elements and functionalities
2315
- *
2316
- * Website : -> http://www.turbogui.org
2317
- * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
2318
- * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
2319
- * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
2320
- */
2321
- /**
2322
- * Sometimes it is necessary to apply some kind of buffer to the user input for certain operations that may be executed
2323
- * several times but we need to capture only the latest of them into a certain period of time. This class does exactly this:
2324
- * 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.
2325
- * 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.
2326
- * Lots of other UI interaction usages may be interesting with this class.
2327
- */
2328
- var DelayedMethodCallManager = /** @class */ (function () {
2329
- /**
2330
- * Sometimes it is necessary to apply some kind of buffer to the user input for certain operations that may be executed
2331
- * several times but we need to capture only the latest of them into a certain period of time. This class does exactly this:
2332
- * 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.
2333
- * 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.
2334
- * Lots of other UI interaction usages may be interesting with this class.
2335
- *
2336
- * @param delay Amount of time to wait before executing the operations . Defaults to 1000 miliseconds.
2337
- */
2338
- function DelayedMethodCallManager(delay) {
2339
- if (delay === void 0) { delay = 1000; }
2340
- this.delay = delay;
2341
- this._functionsToExecute = [];
2342
- this._timerIsRunning = false;
2343
- this._setTimeoutHandler = null;
2344
- }
2345
- /**
2346
- * Add a method to be called once the delay time is finished.
2347
- * Every time a new call to queue is performed, the delay timer is restarted. When the delay time finishes, only the
2348
- * last of the methods that have been pushed by call() will be executed.
2349
- *
2350
- * Use it to queue several user input operations that should be called only once in a period of time, while waiting
2351
- * for the user to finish his input.
2352
- *
2353
- * @param method The function that will be queued for execution after the delay time has passed
2354
- */
2355
- DelayedMethodCallManager.prototype.queue = function (method) {
2356
- var _this = this;
2357
- this._functionsToExecute.push(method);
2358
- if (this._timerIsRunning) {
2359
- clearTimeout(this._setTimeoutHandler);
2360
- }
2361
- this._timerIsRunning = true;
2362
- this._setTimeoutHandler = setTimeout(function () { _this.run(); }, this.delay);
2363
- };
2364
- /**
2365
- * Abort all methods that may have been pushed to this class and are waiting to be executed, so none of them
2366
- * is executed when the delay time finishes. Basically everything is cleared and stoped when this method is called.
2367
- */
2368
- DelayedMethodCallManager.prototype.cancel = function () {
2369
- if (this._setTimeoutHandler !== null) {
2370
- clearTimeout(this._setTimeoutHandler);
2371
- }
2372
- this._functionsToExecute = [];
2373
- this._timerIsRunning = false;
2374
- };
2375
- /**
2376
- * Auxiliary function that performs the call to the latest queued method
2377
- */
2378
- DelayedMethodCallManager.prototype.run = function () {
2379
- this._functionsToExecute.pop()();
2380
- this._functionsToExecute = [];
2381
- this._timerIsRunning = false;
2382
- };
2383
- return DelayedMethodCallManager;
2384
- }());
2385
-
2386
- /*
2387
- * Public API Surface of turbogui-angular
2388
- */
2389
-
2390
- /**
2391
- * Generated bundle index. Do not edit.
2392
- */
2393
-
2394
- exports.AutoFocusOnDisplayDirective = AutoFocusOnDisplayDirective;
2395
- exports.AutoSelectTextOnFocusDirective = AutoSelectTextOnFocusDirective;
2396
- exports.BrowserService = BrowserService;
2397
- exports.BusyStateBaseComponent = BusyStateBaseComponent;
2398
- exports.ButtonContainerComponent = ButtonContainerComponent;
2399
- exports.ButtonImageComponent = ButtonImageComponent;
2400
- exports.DelayedMethodCallManager = DelayedMethodCallManager;
2401
- exports.DialogErrorComponent = DialogErrorComponent;
2402
- exports.DialogMultipleOptionComponent = DialogMultipleOptionComponent;
2403
- exports.DialogOptionsBaseComponent = DialogOptionsBaseComponent;
2404
- exports.DialogService = DialogService;
2405
- exports.DialogSingleOptionComponent = DialogSingleOptionComponent;
2406
- exports.DialogSingleSelectionListComponent = DialogSingleSelectionListComponent;
2407
- exports.DialogTwoOptionComponent = DialogTwoOptionComponent;
2408
- exports.ElementCreatedDirective = ElementCreatedDirective;
2409
- exports.ElementDestroyedDirective = ElementDestroyedDirective;
2410
- exports.FadeAnimationClass = FadeAnimationClass;
2411
- exports.GUINotification = GUINotification;
2412
- exports.GlobalErrorService = GlobalErrorService;
2413
- exports.HTTPService = HTTPService;
2414
- exports.HTTPServiceGetRequest = HTTPServiceGetRequest;
2415
- exports.HTTPServicePostRequest = HTTPServicePostRequest;
2416
- exports.LocalizationService = LocalizationService;
2417
- exports.NotificationService = NotificationService;
2418
- exports.TurboGuiAngularModule = TurboGuiAngularModule;
2419
- exports.UserService = UserService;
2420
- exports.View = View;
2421
- exports.ViewModel = ViewModel;
2422
- exports.ViewService = ViewService;
2423
- exports.ViewsContainerComponent = ViewsContainerComponent;
2424
- exports.ViewsService = ViewsService;
2425
- exports["ɵa"] = DialogBaseComponent;
2426
- exports["ɵb"] = ButtonBaseComponent;
2427
-
2428
- Object.defineProperty(exports, '__esModule', { value: true });
2429
-
2430
- }));
2431
- //# sourceMappingURL=turbogui-angular.umd.js.map