@osovitny/anatoly 2.1.13 → 2.14.1

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 (164) hide show
  1. package/assets/styles/alerts.less +182 -0
  2. package/assets/styles/spinner.less +64 -0
  3. package/assets/styles/toastr.less +192 -0
  4. package/esm2020/lib/core/convert.mjs +62 -0
  5. package/esm2020/lib/core/core.module.mjs +72 -0
  6. package/esm2020/lib/core/go/base-go.service.mjs +41 -0
  7. package/esm2020/lib/core/guid.mjs +22 -0
  8. package/esm2020/lib/core/interceptors/httpInterceptor.mjs +108 -0
  9. package/esm2020/lib/core/localization/localization.module.mjs +47 -0
  10. package/esm2020/lib/core/localization/localization.service.mjs +185 -0
  11. package/esm2020/lib/core/localization/localizationSettings.module.mjs +88 -0
  12. package/esm2020/lib/core/localization/localize.pipe.mjs +78 -0
  13. package/esm2020/lib/core/logging/globalErrorHandler.mjs +44 -0
  14. package/esm2020/lib/core/logging/logging.service.mjs +39 -0
  15. package/esm2020/lib/core/notifications/services/notification-service.mjs +228 -0
  16. package/esm2020/lib/core/services/appcontext.service.mjs +118 -0
  17. package/esm2020/lib/core/services/dm.service.mjs +72 -0
  18. package/esm2020/lib/core/services/google-analytics.service.mjs +54 -0
  19. package/{esm2015/lib/core/services/idle.service.js → esm2020/lib/core/services/idle.service.mjs} +9 -7
  20. package/{esm2015/lib/core/services/loading.service.js → esm2020/lib/core/services/loading.service.mjs} +9 -8
  21. package/esm2020/lib/core/services/web-storage.service.mjs +69 -0
  22. package/esm2020/lib/core/subs.mjs +31 -0
  23. package/esm2020/lib/core/utils.mjs +82 -0
  24. package/esm2020/lib/data/base/base-api.service.mjs +89 -0
  25. package/esm2020/lib/data/base/grid/base-grid-edit.service.mjs +77 -0
  26. package/esm2020/lib/data/base/grid/base-grid-read.service.mjs +62 -0
  27. package/esm2020/lib/data/data.module.mjs +51 -0
  28. package/esm2020/lib/data/services/billing-api.service.mjs +65 -0
  29. package/esm2020/lib/data/services/notifications/notifications-api-service.mjs +43 -0
  30. package/esm2020/lib/ui/components/base-edit.component.mjs +143 -0
  31. package/esm2020/lib/ui/components/base.component.mjs +47 -0
  32. package/esm2020/lib/ui/components/base.dialog.mjs +49 -0
  33. package/esm2020/lib/ui/components/billing/buyaccess-button.component.mjs +69 -0
  34. package/esm2020/lib/ui/components/billing/subscribe-plan-button.component.mjs +63 -0
  35. package/esm2020/lib/ui/components/billing/upgrade-plan-button.component.mjs +53 -0
  36. package/esm2020/lib/ui/components/content-header/content-header.component.mjs +37 -0
  37. package/esm2020/lib/ui/components/html-editor/base-html-editor.component.mjs +111 -0
  38. package/esm2020/lib/ui/components/html-editor/forms-html-editor.component.mjs +48 -0
  39. package/esm2020/lib/ui/components/html-editor/html-editor.component.mjs +52 -0
  40. package/esm2020/lib/ui/components/identity/signin-button.component.mjs +32 -0
  41. package/esm2020/lib/ui/components/identity/signout-button.component.mjs +32 -0
  42. package/esm2020/lib/ui/components/identity/signup-button.component.mjs +31 -0
  43. package/esm2020/lib/ui/components/loading/loading.component.mjs +48 -0
  44. package/esm2020/lib/ui/components/spinner/spinner.component.mjs +74 -0
  45. package/esm2020/lib/ui/directives/native-element.directive.mjs +41 -0
  46. package/esm2020/lib/ui/pipes/filesize.pipe.mjs +45 -0
  47. package/esm2020/lib/ui/pipes/replace-text.pipe.mjs +40 -0
  48. package/esm2020/lib/ui/pipes/safeHtml.pipe.mjs +37 -0
  49. package/esm2020/lib/ui/ui.module.mjs +155 -0
  50. package/esm2020/lib/ui/validation/form-validation-summary.component.mjs +66 -0
  51. package/esm2020/lib/ui/validation/item-validation-summary.component.mjs +39 -0
  52. package/esm2020/lib/ui/validation/validation-summary.component.mjs +128 -0
  53. package/fesm2015/{osovitny-anatoly.js → osovitny-anatoly.mjs} +823 -765
  54. package/fesm2015/osovitny-anatoly.mjs.map +1 -0
  55. package/fesm2020/osovitny-anatoly.mjs +3496 -0
  56. package/fesm2020/osovitny-anatoly.mjs.map +1 -0
  57. package/{osovitny-anatoly.d.ts → index.d.ts} +1 -0
  58. package/lib/core/core.module.d.ts +5 -0
  59. package/lib/core/go/base-go.service.d.ts +3 -0
  60. package/lib/core/interceptors/httpInterceptor.d.ts +3 -0
  61. package/lib/core/localization/localization.module.d.ts +6 -0
  62. package/lib/core/localization/localization.service.d.ts +3 -0
  63. package/lib/core/localization/localizationSettings.module.d.ts +5 -0
  64. package/lib/core/localization/localize.pipe.d.ts +3 -0
  65. package/lib/core/logging/globalErrorHandler.d.ts +3 -0
  66. package/lib/core/logging/logging.service.d.ts +3 -0
  67. package/lib/core/notifications/services/notification-service.d.ts +3 -0
  68. package/lib/core/services/appcontext.service.d.ts +5 -2
  69. package/lib/core/services/dm.service.d.ts +3 -0
  70. package/lib/core/services/google-analytics.service.d.ts +3 -0
  71. package/lib/core/services/idle.service.d.ts +3 -0
  72. package/lib/core/services/loading.service.d.ts +3 -0
  73. package/lib/core/services/web-storage.service.d.ts +5 -0
  74. package/lib/data/base/base-api.service.d.ts +3 -0
  75. package/lib/data/base/grid/base-grid-edit.service.d.ts +3 -0
  76. package/lib/data/base/grid/base-grid-read.service.d.ts +3 -0
  77. package/lib/data/data.module.d.ts +5 -0
  78. package/lib/data/services/billing-api.service.d.ts +3 -0
  79. package/lib/data/services/notifications/notifications-api-service.d.ts +3 -0
  80. package/lib/ui/components/base-edit.component.d.ts +5 -2
  81. package/lib/ui/components/base.component.d.ts +3 -0
  82. package/lib/ui/components/base.dialog.d.ts +3 -0
  83. package/lib/ui/components/billing/buyaccess-button.component.d.ts +3 -0
  84. package/lib/ui/components/billing/subscribe-plan-button.component.d.ts +3 -0
  85. package/lib/ui/components/billing/upgrade-plan-button.component.d.ts +3 -0
  86. package/lib/ui/components/content-header/content-header.component.d.ts +3 -0
  87. package/lib/ui/components/html-editor/base-html-editor.component.d.ts +3 -0
  88. package/lib/ui/components/html-editor/forms-html-editor.component.d.ts +3 -0
  89. package/lib/ui/components/html-editor/html-editor.component.d.ts +3 -0
  90. package/lib/ui/components/identity/signin-button.component.d.ts +3 -0
  91. package/lib/ui/components/identity/signout-button.component.d.ts +3 -0
  92. package/lib/ui/components/identity/signup-button.component.d.ts +3 -0
  93. package/lib/ui/components/loading/loading.component.d.ts +3 -0
  94. package/lib/ui/components/spinner/spinner.component.d.ts +3 -0
  95. package/lib/ui/directives/native-element.directive.d.ts +3 -0
  96. package/lib/ui/pipes/filesize.pipe.d.ts +3 -0
  97. package/lib/ui/pipes/replace-text.pipe.d.ts +3 -0
  98. package/lib/ui/pipes/safeHtml.pipe.d.ts +3 -0
  99. package/lib/ui/ui.module.d.ts +24 -0
  100. package/lib/ui/validation/form-validation-summary.component.d.ts +3 -0
  101. package/lib/ui/validation/item-validation-summary.component.d.ts +3 -0
  102. package/lib/ui/validation/validation-summary.component.d.ts +3 -0
  103. package/package.json +23 -11
  104. package/bundles/osovitny-anatoly.umd.js +0 -3696
  105. package/bundles/osovitny-anatoly.umd.js.map +0 -1
  106. package/esm2015/lib/core/convert.js +0 -65
  107. package/esm2015/lib/core/core.module.js +0 -43
  108. package/esm2015/lib/core/go/base-go.service.js +0 -42
  109. package/esm2015/lib/core/guid.js +0 -25
  110. package/esm2015/lib/core/interceptors/httpInterceptor.js +0 -109
  111. package/esm2015/lib/core/localization/localization.module.js +0 -41
  112. package/esm2015/lib/core/localization/localization.service.js +0 -187
  113. package/esm2015/lib/core/localization/localizationSettings.module.js +0 -78
  114. package/esm2015/lib/core/localization/localize.pipe.js +0 -78
  115. package/esm2015/lib/core/logging/globalErrorHandler.js +0 -44
  116. package/esm2015/lib/core/logging/logging.service.js +0 -38
  117. package/esm2015/lib/core/notifications/services/notification-service.js +0 -230
  118. package/esm2015/lib/core/services/appcontext.service.js +0 -118
  119. package/esm2015/lib/core/services/dm.service.js +0 -74
  120. package/esm2015/lib/core/services/google-analytics.service.js +0 -53
  121. package/esm2015/lib/core/services/web-storage.service.js +0 -66
  122. package/esm2015/lib/core/subs.js +0 -34
  123. package/esm2015/lib/core/utils.js +0 -84
  124. package/esm2015/lib/data/base/base-api.service.js +0 -89
  125. package/esm2015/lib/data/base/grid/base-grid-edit.service.js +0 -77
  126. package/esm2015/lib/data/base/grid/base-grid-read.service.js +0 -62
  127. package/esm2015/lib/data/data.module.js +0 -43
  128. package/esm2015/lib/data/services/billing-api.service.js +0 -65
  129. package/esm2015/lib/data/services/notifications/notifications-api-service.js +0 -45
  130. package/esm2015/lib/ui/components/base-edit.component.js +0 -142
  131. package/esm2015/lib/ui/components/base.component.js +0 -43
  132. package/esm2015/lib/ui/components/base.dialog.js +0 -47
  133. package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +0 -71
  134. package/esm2015/lib/ui/components/billing/subscribe-plan-button.component.js +0 -63
  135. package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +0 -54
  136. package/esm2015/lib/ui/components/content-header/content-header.component.js +0 -37
  137. package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +0 -108
  138. package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +0 -44
  139. package/esm2015/lib/ui/components/html-editor/html-editor.component.js +0 -51
  140. package/esm2015/lib/ui/components/identity/signin-button.component.js +0 -33
  141. package/esm2015/lib/ui/components/identity/signout-button.component.js +0 -33
  142. package/esm2015/lib/ui/components/identity/signup-button.component.js +0 -31
  143. package/esm2015/lib/ui/components/loading/loading.component.js +0 -49
  144. package/esm2015/lib/ui/components/spinner/spinner.component.js +0 -73
  145. package/esm2015/lib/ui/directives/native-element.directive.js +0 -41
  146. package/esm2015/lib/ui/pipes/filesize.pipe.js +0 -41
  147. package/esm2015/lib/ui/pipes/replace-text.pipe.js +0 -36
  148. package/esm2015/lib/ui/pipes/safeHtml.pipe.js +0 -36
  149. package/esm2015/lib/ui/ui.module.js +0 -105
  150. package/esm2015/lib/ui/validation/form-validation-summary.component.js +0 -64
  151. package/esm2015/lib/ui/validation/item-validation-summary.component.js +0 -38
  152. package/esm2015/lib/ui/validation/validation-summary.component.js +0 -126
  153. package/fesm2015/osovitny-anatoly.js.map +0 -1
  154. package/osovitny-anatoly.metadata.json +0 -1
  155. /package/{esm2015/lib/core/consts/settings.js → esm2020/lib/core/consts/settings.mjs} +0 -0
  156. /package/{esm2015/lib/core/consts/urls.js → esm2020/lib/core/consts/urls.mjs} +0 -0
  157. /package/{esm2015/lib/core/guards/once-import.guard.js → esm2020/lib/core/guards/once-import.guard.mjs} +0 -0
  158. /package/{esm2015/lib/core/localization/utils.js → esm2020/lib/core/localization/utils.mjs} +0 -0
  159. /package/{esm2015/lib/core/notifications/alerts.js → esm2020/lib/core/notifications/alerts.mjs} +0 -0
  160. /package/{esm2015/lib/core/notifications/interfaces/notification.js → esm2020/lib/core/notifications/interfaces/notification.mjs} +0 -0
  161. /package/{esm2015/lib/data/consts.js → esm2020/lib/data/consts.mjs} +0 -0
  162. /package/{esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js → esm2020/lib/ui/components/html-editor/html-editor.defaultoptions.mjs} +0 -0
  163. /package/{esm2015/osovitny-anatoly.js → esm2020/osovitny-anatoly.mjs} +0 -0
  164. /package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
@@ -0,0 +1,3496 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Pipe, APP_INITIALIZER, Injector, NgModule, Inject, Optional, SkipSelf, Component, Input, Directive, ViewEncapsulation } from '@angular/core';
3
+ import * as i1 from '@angular/router';
4
+ import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError } from '@angular/router';
5
+ import * as i1$3 from '@angular/common/http';
6
+ import { HttpResponse, HttpClient } from '@angular/common/http';
7
+ import { tap, map } from 'rxjs/operators';
8
+ import { BehaviorSubject, Subject, timer, merge, fromEvent } from 'rxjs';
9
+ import { isValid, format, formatDistance, formatDistanceToNow } from 'date-fns';
10
+ import { utcToZonedTime } from 'date-fns-tz';
11
+ import enUS from 'date-fns/locale/en-US';
12
+ import * as i1$1 from '@ngx-translate/core';
13
+ import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';
14
+ import * as i1$5 from '@angular/common';
15
+ import { LOCATION_INITIALIZED, DOCUMENT, CommonModule } from '@angular/common';
16
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
17
+ import Swal from 'sweetalert2';
18
+ import { v4 } from 'uuid';
19
+ import * as i1$2 from 'ngx-toastr';
20
+ import * as i1$4 from '@angular/platform-browser';
21
+ import * as i2 from '@angular/forms';
22
+ import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
23
+ import * as i1$6 from 'angular-froala-wysiwyg';
24
+ import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
25
+
26
+ /*
27
+ <file>
28
+ Project:
29
+ @osovitny/anatoly
30
+
31
+ Authors:
32
+ Vadim Osovitny
33
+ Anatoly Osovitny
34
+
35
+ Created:
36
+ 26 Jun 2020
37
+
38
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
39
+ </file>
40
+ */
41
+ const ContextInitState = JSON.parse((document.getElementById('contextInitState')).getAttribute('data-contextinitstate'));
42
+ const AppCoreSettings = JSON.parse((document.getElementById('appCoreSettings')).getAttribute('data-appcoresettings'));
43
+
44
+ /*
45
+ <file>
46
+ Project:
47
+ MICE
48
+
49
+ Authors:
50
+ Vadim Osovitny vaosovitny@deloitte.com
51
+
52
+ Created:
53
+ 5 May 2020
54
+
55
+ Copyright (c) 2020 Deloitte Tax. All rights reserved.
56
+ </file>
57
+ */
58
+ const Urls = {
59
+ // SignalR Notifications
60
+ notificationsSocketUrl: '/hubs/notifications'
61
+ };
62
+
63
+ /*
64
+ <file>
65
+ Project:
66
+ @osovitny/anatoly
67
+
68
+ Authors:
69
+ Vadim Osovitny
70
+ Anatoly Osovitny
71
+
72
+ Created:
73
+ 17 Jun 2018
74
+
75
+ Version:
76
+ 1.0
77
+
78
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
79
+ </file>
80
+ */
81
+ class BaseGoService {
82
+ constructor(route, router) {
83
+ this.route = route;
84
+ this.router = router;
85
+ this.route = route;
86
+ this.router = router;
87
+ }
88
+ locationReload() {
89
+ window.location.reload();
90
+ }
91
+ homeReload() {
92
+ window.location.href = "/";
93
+ }
94
+ }
95
+ BaseGoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGoService, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
96
+ BaseGoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGoService });
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGoService, decorators: [{
98
+ type: Injectable
99
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }]; } });
100
+
101
+ /*
102
+ <file>
103
+ Project:
104
+ @osovitny/anatoly
105
+
106
+ Authors:
107
+ Vadim Osovitny
108
+ Anatoly Osovitny
109
+
110
+ Created:
111
+ 26 Jun 2020
112
+
113
+ Version:
114
+ 1.0
115
+
116
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
117
+ </file>
118
+ */
119
+ function throwIfAlreadyLoaded(parentModule, moduleName) {
120
+ if (parentModule) {
121
+ throw new Error(`${moduleName} has already been loaded. Import ${moduleName} modules in the AppModule only.`);
122
+ }
123
+ }
124
+
125
+ /*
126
+ <file>
127
+ Project:
128
+ @osovitny/anatoly
129
+
130
+ Authors:
131
+ Vadim Osovitny
132
+ Anatoly Osovitny
133
+
134
+ Created:
135
+ 26 Jun 2020
136
+
137
+ Version:
138
+ 1.0
139
+
140
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
141
+ </file>
142
+ */
143
+ class LoadingService extends BehaviorSubject {
144
+ constructor() {
145
+ super(false);
146
+ this.counter = 0;
147
+ //Public
148
+ this.isFreezed = false;
149
+ }
150
+ show() {
151
+ this.counter++;
152
+ let that = this;
153
+ setTimeout(() => {
154
+ if (that.counter > 0) {
155
+ that.next(true);
156
+ }
157
+ }, 500);
158
+ }
159
+ hide() {
160
+ if (this.counter <= 0) {
161
+ return;
162
+ }
163
+ this.counter--;
164
+ if (this.counter == 0) {
165
+ this.next(false);
166
+ }
167
+ }
168
+ freeze(timeout = 1000) {
169
+ this.isFreezed = true;
170
+ let that = this;
171
+ setTimeout(() => {
172
+ this.isFreezed = false;
173
+ }, timeout);
174
+ }
175
+ reset() {
176
+ if (this.counter > 0) {
177
+ this.next(false);
178
+ }
179
+ this.counter = 0;
180
+ }
181
+ }
182
+ LoadingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
183
+ LoadingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoadingService, providedIn: "root" });
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoadingService, decorators: [{
185
+ type: Injectable,
186
+ args: [{
187
+ providedIn: "root",
188
+ }]
189
+ }], ctorParameters: function () { return []; } });
190
+
191
+ /*
192
+ <file>
193
+ Project:
194
+ @osovitny/anatoly
195
+
196
+ Authors:
197
+ Vadim Osovitny
198
+ Anatoly Osovitny
199
+
200
+ Created:
201
+ 26 Jun 2020
202
+
203
+ Version:
204
+ 1.0
205
+
206
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
207
+ </file>
208
+ */
209
+ class LoggingService {
210
+ constructor() { }
211
+ logError(error) {
212
+ console.error(error);
213
+ }
214
+ logInformation(info) {
215
+ console.info(info);
216
+ }
217
+ }
218
+ LoggingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
219
+ LoggingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoggingService, providedIn: "root" });
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoggingService, decorators: [{
221
+ type: Injectable,
222
+ args: [{
223
+ providedIn: "root",
224
+ }]
225
+ }], ctorParameters: function () { return []; } });
226
+
227
+ /*
228
+ <file>
229
+ Project:
230
+ @osovitny/anatoly
231
+
232
+ Authors:
233
+ Vadim Osovitny
234
+ Anatoly Osovitny
235
+
236
+ Created:
237
+ 25 March 2020
238
+
239
+ Version:
240
+ 1.0
241
+
242
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
243
+ </file>
244
+ */
245
+ class AnatolyHttpInterceptor {
246
+ constructor(loadingService, loggingService) {
247
+ this.loadingService = loadingService;
248
+ this.loggingService = loggingService;
249
+ this.longRunningExceptionsList = [];
250
+ this.autoCDNSASTokenUrls = ['chunks', 'resources'];
251
+ this.externalSiteUrls = ['azurewebsites.net'];
252
+ }
253
+ intercept(req, next) {
254
+ const isCDNEnabled = AppCoreSettings.IsCDNEnabled;
255
+ const cdnSasToken = AppCoreSettings.CDNSASToken;
256
+ const isLoadingFreezed = this.loadingService.isFreezed;
257
+ const authorizationTokenRequired = true;
258
+ const url = req.url.toLowerCase();
259
+ const originalUrl = req.url;
260
+ let isExternalSite = false;
261
+ let loadingRequired = !isLoadingFreezed;
262
+ if (!isLoadingFreezed) {
263
+ for (const i of this.longRunningExceptionsList) {
264
+ if (url.indexOf(this.longRunningExceptionsList[i]) >= 0) {
265
+ loadingRequired = false;
266
+ break;
267
+ }
268
+ }
269
+ }
270
+ if (isCDNEnabled) {
271
+ for (const i of this.autoCDNSASTokenUrls) {
272
+ if (url.indexOf(this.autoCDNSASTokenUrls[i]) >= 0) {
273
+ req = req.clone({ url: originalUrl + cdnSasToken });
274
+ break;
275
+ }
276
+ }
277
+ }
278
+ for (const i of this.externalSiteUrls) {
279
+ if (url.indexOf(this.externalSiteUrls[i]) >= 0) {
280
+ isExternalSite = true;
281
+ break;
282
+ }
283
+ }
284
+ // VadimOS: IE11-fix
285
+ if (url.indexOf('/api/') > -1) {
286
+ let newUrl = '';
287
+ const t = new Date().getTime().toString();
288
+ if (url.indexOf('?') > -1) {
289
+ newUrl = originalUrl + '&t=' + t;
290
+ }
291
+ else {
292
+ newUrl = originalUrl + '?t=' + t;
293
+ }
294
+ req = req.clone({ url: newUrl });
295
+ }
296
+ req = req.clone({ headers: req.headers.set('Accept', 'application/json') });
297
+ req = req.clone({ headers: req.headers.set('Accept', 'application/text') });
298
+ this.onRequestStart(loadingRequired);
299
+ return next.handle(req).pipe(tap((event) => {
300
+ if (event instanceof HttpResponse) {
301
+ this.onRequestEnd(loadingRequired);
302
+ }
303
+ }, (err) => {
304
+ this.onRequestEnd(loadingRequired);
305
+ this.loggingService.logError(err);
306
+ }));
307
+ }
308
+ onRequestStart(loadingRequired) {
309
+ if (loadingRequired) {
310
+ this.loadingService.show();
311
+ }
312
+ }
313
+ onRequestEnd(loadingRequired) {
314
+ if (loadingRequired) {
315
+ this.loadingService.hide();
316
+ }
317
+ }
318
+ }
319
+ AnatolyHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyHttpInterceptor, deps: [{ token: LoadingService }, { token: LoggingService }], target: i0.ɵɵFactoryTarget.Injectable });
320
+ AnatolyHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyHttpInterceptor });
321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyHttpInterceptor, decorators: [{
322
+ type: Injectable
323
+ }], ctorParameters: function () { return [{ type: LoadingService }, { type: LoggingService }]; } });
324
+
325
+ /*
326
+ <file>
327
+ Project:
328
+ @osovitny/anatoly
329
+
330
+ Authors:
331
+ Vadim Osovitny
332
+ Anatoly Osovitny
333
+
334
+ Created:
335
+ 29 June 2020
336
+
337
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
338
+ </file>
339
+ */
340
+ class Convert {
341
+ static toLocalizedDateTime(value) {
342
+ if (value) {
343
+ return new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate(), value.getHours(), value.getMinutes(), value.getSeconds(), value.getMilliseconds()));
344
+ }
345
+ return null;
346
+ }
347
+ static enumToString(enumeration, value) {
348
+ for (var k in enumeration)
349
+ if (enumeration[k] == value)
350
+ return k;
351
+ return null;
352
+ }
353
+ static enumToArray(enumeration, notIncludes) {
354
+ const notIncludeFiler = (value) => {
355
+ if (isNaN(Number(value))) {
356
+ return false;
357
+ }
358
+ if (notIncludes) {
359
+ for (var i in notIncludes) {
360
+ if (notIncludes[i] == value)
361
+ return false;
362
+ }
363
+ }
364
+ return true;
365
+ };
366
+ return Object.keys(enumeration)
367
+ .filter(notIncludeFiler)
368
+ .map(key => ({
369
+ value: key,
370
+ text: enumeration[key]
371
+ }));
372
+ }
373
+ static stringToArray(str, separator = ',') {
374
+ if (str) {
375
+ return str.split(separator).filter(element => element);
376
+ }
377
+ return [];
378
+ }
379
+ static stringToIntArray(str, separator = ',') {
380
+ if (str) {
381
+ return str.split(separator).filter(element => element).map(value => parseInt(value));
382
+ }
383
+ return [];
384
+ }
385
+ }
386
+
387
+ /*
388
+ <file>
389
+ Project:
390
+ @osovitny/anatoly
391
+
392
+ Authors:
393
+ Vadim Osovitny
394
+ Anatoly Osovitny
395
+
396
+ Created:
397
+ 05 May 2020
398
+
399
+ Version:
400
+ 1.0
401
+
402
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
403
+ </file>
404
+ */
405
+ class LocalizationService {
406
+ constructor(translate) {
407
+ this.translate = translate;
408
+ this.setSupportedLanguages(['en']);
409
+ }
410
+ format(str, args) {
411
+ return str.replace(/{(\d+)}/g, function (match, number) {
412
+ return typeof args[number] != 'undefined'
413
+ ? args[number]
414
+ : match;
415
+ });
416
+ }
417
+ ;
418
+ configureTranslationSettings(translate) {
419
+ const languageToSet = 'en';
420
+ this.dateFnsLocale = { locale: enUS };
421
+ translate.setDefaultLang(languageToSet);
422
+ return languageToSet;
423
+ }
424
+ getBrowserLanguage() {
425
+ return this.translate.getBrowserLang();
426
+ }
427
+ getDatefnsLocale() {
428
+ let dfnLocale;
429
+ switch (this.getBrowserLanguage()) {
430
+ case 'en':
431
+ dfnLocale = { locale: enUS };
432
+ break;
433
+ default:
434
+ dfnLocale = { locale: enUS };
435
+ }
436
+ return dfnLocale;
437
+ }
438
+ setDefaultLanguage(lang) {
439
+ this.translate.setDefaultLang(lang);
440
+ }
441
+ setSupportedLanguages(languages) {
442
+ this.translate.addLangs(languages);
443
+ }
444
+ updateLanguage(language) {
445
+ this.translate.use(language);
446
+ }
447
+ getLocalizedValue(key, params) {
448
+ const value = this.translate.instant(key);
449
+ if (!params || params.length === 0) {
450
+ return value;
451
+ }
452
+ return this.format(value, params);
453
+ }
454
+ getLocalizedDate(key) {
455
+ if (isValid(new Date(key))) {
456
+ return format(new Date(key), 'dd.MM.yyyy', this.dateFnsLocale);
457
+ }
458
+ return "Invalid Date";
459
+ }
460
+ getLocalizedDateTime(key) {
461
+ let dateValue = new Date(key);
462
+ if (isValid(dateValue)) {
463
+ let localDate = Convert.toLocalizedDateTime(dateValue);
464
+ return format(localDate, 'dd.MM.yyyy HH:mm', this.dateFnsLocale);
465
+ }
466
+ return "Invalid Date";
467
+ }
468
+ getLocalizedDistanceInWords(endedDate, startedDate) {
469
+ if (isValid(new Date(endedDate)) && isValid(new Date(startedDate))) {
470
+ return formatDistance(new Date(endedDate), new Date(startedDate), this.dateFnsLocale);
471
+ }
472
+ return "Invalid Date";
473
+ }
474
+ getLocalizedDistanceToNowInWords(date) {
475
+ if (isValid(new Date(date))) {
476
+ return formatDistanceToNow(new Date(date), this.dateFnsLocale);
477
+ }
478
+ return "Invalid Date";
479
+ }
480
+ //UTC Operations --------------------------------------------------------------
481
+ getUTCToLocalizedDate(key) {
482
+ let browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
483
+ if (key) {
484
+ if (key.indexOf("T") == -1) {
485
+ key = key.replace(" ", "T");
486
+ }
487
+ if (key.indexOf("Z") == -1) {
488
+ key = key + "Z";
489
+ }
490
+ }
491
+ if (browserTimeZone) {
492
+ let localDateTime = utcToZonedTime(key, browserTimeZone);
493
+ return format(localDateTime, 'dd.MM.yyyy', this.dateFnsLocale);
494
+ }
495
+ else {
496
+ return format(new Date(key), 'dd.MM.yyyy', this.dateFnsLocale);
497
+ }
498
+ }
499
+ getUTCToLocalizedDateTime(key) {
500
+ let browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
501
+ if (key) {
502
+ if (key.indexOf("T") == -1) {
503
+ key = key.replace(" ", "T");
504
+ }
505
+ if (key.indexOf("Z") == -1) {
506
+ key = key + "Z";
507
+ }
508
+ }
509
+ if (browserTimeZone) {
510
+ let localDateTime = utcToZonedTime(key, browserTimeZone);
511
+ return format(localDateTime, 'dd.MM.yyyy HH:mm', this.dateFnsLocale);
512
+ }
513
+ else {
514
+ return format(new Date(key), 'dd.MM.yyyy HH:mm', this.dateFnsLocale);
515
+ }
516
+ }
517
+ //https://date-fns.org/v1.30.1/docs/distanceInWords
518
+ getUTCToLocalizedDistanceToNowInWords(date) {
519
+ date = this.safeUtcToZonedTime(date);
520
+ if (isValid(new Date(date))) {
521
+ return formatDistanceToNow(new Date(date), this.dateFnsLocale);
522
+ }
523
+ return "Invalid Date";
524
+ }
525
+ safeUtcToZonedTime(date) {
526
+ let result = date;
527
+ try {
528
+ if (date) {
529
+ if (date.indexOf("T") == -1) {
530
+ date = date.replace(" ", "T");
531
+ }
532
+ if (date.indexOf("Z") == -1) {
533
+ date = date + "Z";
534
+ }
535
+ }
536
+ let browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
537
+ if (browserTimeZone) {
538
+ result = utcToZonedTime(date, browserTimeZone).toString();
539
+ }
540
+ else {
541
+ result = new Date(date).toString();
542
+ }
543
+ }
544
+ catch {
545
+ if (date) {
546
+ console.log("UTC to Local conversion failed for :" + date.toString());
547
+ }
548
+ }
549
+ return result;
550
+ }
551
+ }
552
+ LocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationService, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
553
+ LocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationService, providedIn: 'root' });
554
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationService, decorators: [{
555
+ type: Injectable,
556
+ args: [{
557
+ providedIn: 'root'
558
+ }]
559
+ }], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; } });
560
+
561
+ /*
562
+ <file>
563
+ Project:
564
+ @osovitny/anatoly
565
+
566
+ Authors:
567
+ Vadim Osovitny
568
+ Anatoly Osovitny
569
+
570
+ Created:
571
+ 10 May 2020
572
+
573
+ Version:
574
+ 1.0
575
+
576
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
577
+ </file>
578
+ */
579
+ class LocalizePipe {
580
+ constructor(localizeService) {
581
+ this.localizeService = localizeService;
582
+ }
583
+ transform(inputData, type, param2) {
584
+ if (!inputData) {
585
+ return;
586
+ }
587
+ if (!type) {
588
+ type = 'tr';
589
+ }
590
+ //Translate
591
+ if (type === 'tr') {
592
+ return this.localizeService.getLocalizedValue(inputData);
593
+ }
594
+ //Date
595
+ if (type === 'd') {
596
+ return this.localizeService.getLocalizedDate(inputData);
597
+ }
598
+ //DateTime
599
+ if (type === 'dt') {
600
+ return this.localizeService.getLocalizedDateTime(inputData);
601
+ }
602
+ //DistanceInWords
603
+ if (type === 'dis') {
604
+ return this.localizeService.getLocalizedDistanceInWords(inputData, param2);
605
+ }
606
+ //DistanceToNowInWords
607
+ if (type === 'dis2now') {
608
+ return this.localizeService.getLocalizedDistanceToNowInWords(inputData);
609
+ }
610
+ //UTC Operations --------------------------------------------------------------
611
+ //UTC Date
612
+ if (type === 'u2d') {
613
+ return this.localizeService.getUTCToLocalizedDate(inputData);
614
+ }
615
+ //UTC DateTime
616
+ if (type === 'u2dt') {
617
+ return this.localizeService.getUTCToLocalizedDateTime(inputData);
618
+ }
619
+ //UTC DistanceToNowInWords
620
+ if (type === 'u2dis2now') {
621
+ return this.localizeService.getUTCToLocalizedDistanceToNowInWords(inputData);
622
+ }
623
+ return inputData;
624
+ }
625
+ }
626
+ LocalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizePipe, deps: [{ token: LocalizationService }], target: i0.ɵɵFactoryTarget.Pipe });
627
+ LocalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: LocalizePipe, name: "localize" });
628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizePipe, decorators: [{
629
+ type: Pipe,
630
+ args: [{
631
+ name: 'localize'
632
+ }]
633
+ }], ctorParameters: function () { return [{ type: LocalizationService }]; } });
634
+
635
+ /*
636
+ <file>
637
+ Project:
638
+ @osovitny/anatoly
639
+
640
+ Authors:
641
+ Vadim Osovitny
642
+ Anatoly Osovitny
643
+
644
+ Created:
645
+ 05 May 2020
646
+
647
+ Version:
648
+ 1.0
649
+
650
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
651
+ </file>
652
+ */
653
+ function customTranslateLoaderFactory(http) {
654
+ return new TranslateHttpLoader(http, AppCoreSettings.resourcesUrl + "/", '.json');
655
+ }
656
+ function localizationInitializerFactory(translate, localizationService, injector) {
657
+ return () => new Promise((resolve) => {
658
+ let locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
659
+ locationInitialized.then(() => {
660
+ let languageToSet = localizationService.configureTranslationSettings(translate);
661
+ translate.use(languageToSet).subscribe(() => {
662
+ }, () => {
663
+ resolve(null);
664
+ }, () => {
665
+ resolve(null);
666
+ });
667
+ });
668
+ });
669
+ }
670
+ const TranslateModuleAtRoot = TranslateModule.forRoot({
671
+ loader: {
672
+ provide: TranslateLoader,
673
+ useFactory: customTranslateLoaderFactory,
674
+ deps: [HttpClient]
675
+ }
676
+ });
677
+ let LocalizationInjectorInstance;
678
+ class LocalizationSettingsModule {
679
+ constructor(injector) {
680
+ this.injector = injector;
681
+ LocalizationInjectorInstance = this.injector;
682
+ }
683
+ }
684
+ LocalizationSettingsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationSettingsModule, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule });
685
+ LocalizationSettingsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: LocalizationSettingsModule, imports: [i1$1.TranslateModule] });
686
+ LocalizationSettingsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationSettingsModule, providers: [
687
+ {
688
+ provide: APP_INITIALIZER,
689
+ useFactory: localizationInitializerFactory,
690
+ deps: [TranslateService, LocalizationService, Injector],
691
+ multi: true
692
+ }
693
+ ], imports: [TranslateModuleAtRoot] });
694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationSettingsModule, decorators: [{
695
+ type: NgModule,
696
+ args: [{
697
+ imports: [
698
+ TranslateModuleAtRoot
699
+ ],
700
+ providers: [
701
+ {
702
+ provide: APP_INITIALIZER,
703
+ useFactory: localizationInitializerFactory,
704
+ deps: [TranslateService, LocalizationService, Injector],
705
+ multi: true
706
+ }
707
+ ],
708
+ exports: []
709
+ }]
710
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
711
+
712
+ /*
713
+ <file>
714
+ Project:
715
+ @osovitny/anatoly
716
+
717
+ Authors:
718
+ Vadim Osovitny
719
+ Anatoly Osovitny
720
+
721
+ Created:
722
+ 12 May 2020
723
+
724
+ Version:
725
+ 1.0
726
+
727
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
728
+ </file>
729
+ */
730
+ class LocalizationModule {
731
+ }
732
+ LocalizationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
733
+ LocalizationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: LocalizationModule, declarations: [LocalizePipe], imports: [TranslateModule], exports: [TranslateModule,
734
+ LocalizePipe] });
735
+ LocalizationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationModule, imports: [TranslateModule, TranslateModule] });
736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalizationModule, decorators: [{
737
+ type: NgModule,
738
+ args: [{
739
+ imports: [
740
+ TranslateModule
741
+ ],
742
+ exports: [
743
+ TranslateModule,
744
+ LocalizePipe
745
+ ],
746
+ declarations: [
747
+ LocalizePipe
748
+ ],
749
+ providers: []
750
+ }]
751
+ }] });
752
+
753
+ /*
754
+ <file>
755
+ Project:
756
+ @osovitny/anatoly
757
+
758
+ Authors:
759
+ Vadim Osovitny
760
+ Anatoly Osovitny
761
+
762
+ Created:
763
+ 26 Jun 2020
764
+
765
+ Version:
766
+ 1.0
767
+
768
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
769
+ </file>
770
+ */
771
+ class GlobalErrorHandler {
772
+ constructor(injector) {
773
+ this.injector = injector;
774
+ }
775
+ handleError(error) {
776
+ const loggingService = this.injector.get(LoggingService);
777
+ loggingService.logError(error);
778
+ // IMPORTANT: Rethrow the error otherwise it gets swallowed
779
+ throw error;
780
+ }
781
+ }
782
+ GlobalErrorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: GlobalErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
783
+ GlobalErrorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: GlobalErrorHandler });
784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: GlobalErrorHandler, decorators: [{
785
+ type: Injectable
786
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
787
+
788
+ /*
789
+ <file>
790
+ Project:
791
+ @osovitny/anatoly
792
+
793
+ Authors:
794
+ Vadim Osovitny
795
+ Anatoly Osovitny
796
+
797
+ Created:
798
+ 2 July 2020
799
+
800
+ Version:
801
+ 1.0
802
+
803
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
804
+ </file>
805
+ */
806
+ class L10nUtils {
807
+ // @dynamic
808
+ static get localizationService() {
809
+ const ns = LocalizationInjectorInstance.get(LocalizationService);
810
+ return ns;
811
+ }
812
+ static getLocalizedValue(key, params, defaultKey) {
813
+ // VadimOS: DON'T CHANGE THIS CODE. NEED TO BE REVIEWED AND APPROVED BY VADIMOS
814
+ // defaultKey definition:
815
+ // if key is empty and defaultKey is defined => get localization for defaultKey
816
+ // Example: cancel()
817
+ if (!key && defaultKey) {
818
+ return this.localizationService.getLocalizedValue(defaultKey);
819
+ }
820
+ // VadimOS:
821
+ // if key is not empty value MUST be in localization table, othewise we will return key
822
+ if (key) {
823
+ const value = this.localizationService.getLocalizedValue(key, params);
824
+ return value;
825
+ }
826
+ return key;
827
+ }
828
+ }
829
+
830
+ /*
831
+ <file>
832
+ Project:
833
+ @osovitny/anatoly
834
+
835
+ Authors:
836
+ Vadim Osovitny
837
+ Anatoly Osovitny
838
+
839
+ Created:
840
+ 3 March 2020
841
+
842
+ Version:
843
+ 1.0
844
+
845
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
846
+ </file>
847
+ */
848
+ class Alerts {
849
+ static success(text, params, title, successAction) {
850
+ text = L10nUtils.getLocalizedValue(text, params, 'OperationSuccessFull');
851
+ title = L10nUtils.getLocalizedValue(title, null, 'Success');
852
+ Swal.fire({
853
+ text,
854
+ title,
855
+ icon: 'success',
856
+ confirmButtonText: L10nUtils.getLocalizedValue('Ok')
857
+ })
858
+ .then(() => {
859
+ if (successAction) {
860
+ successAction();
861
+ }
862
+ });
863
+ }
864
+ static info(text, params, title) {
865
+ text = L10nUtils.getLocalizedValue(text, params);
866
+ title = L10nUtils.getLocalizedValue(title, null, 'Info');
867
+ Swal.fire({
868
+ text,
869
+ title,
870
+ icon: 'info',
871
+ confirmButtonText: L10nUtils.getLocalizedValue('Ok')
872
+ });
873
+ }
874
+ static warning(text, params, title) {
875
+ text = L10nUtils.getLocalizedValue(text, params);
876
+ title = L10nUtils.getLocalizedValue(title, null, 'Warning');
877
+ Swal.fire({
878
+ text,
879
+ title,
880
+ icon: 'warning',
881
+ confirmButtonText: L10nUtils.getLocalizedValue('Ok')
882
+ });
883
+ }
884
+ static error(text, params, title) {
885
+ text = L10nUtils.getLocalizedValue(text, params, 'ErrorOccured');
886
+ title = L10nUtils.getLocalizedValue(title, null, 'Error');
887
+ Swal.fire({
888
+ text,
889
+ title,
890
+ icon: 'error',
891
+ confirmButtonText: L10nUtils.getLocalizedValue('Ok')
892
+ });
893
+ }
894
+ static cancel(text, params, title) {
895
+ text = L10nUtils.getLocalizedValue(text, params, 'OperationCancelled');
896
+ title = L10nUtils.getLocalizedValue(title, null, 'Cancelled');
897
+ Swal.fire({
898
+ text,
899
+ title,
900
+ icon: 'info'
901
+ });
902
+ }
903
+ static notImplemented() {
904
+ this.warning('Not Implemented Yet');
905
+ }
906
+ ;
907
+ static areYouSure(text, title, confirmButtonText, cancelButtonText, successAction, cancelAction) {
908
+ text = L10nUtils.getLocalizedValue(text);
909
+ title = L10nUtils.getLocalizedValue(title, null, 'AreYouSure');
910
+ confirmButtonText = L10nUtils.getLocalizedValue(confirmButtonText, null, 'AreYouSure-ConfirmButtonText');
911
+ cancelButtonText = L10nUtils.getLocalizedValue(cancelButtonText, null, 'AreYouSure-CancelButtonText');
912
+ Swal.fire({
913
+ text,
914
+ title,
915
+ icon: 'warning',
916
+ confirmButtonText,
917
+ cancelButtonText,
918
+ showCancelButton: true
919
+ })
920
+ .then((result) => {
921
+ if (result.value) {
922
+ if (successAction) {
923
+ successAction();
924
+ }
925
+ }
926
+ // result.dismiss can be 'cancel', 'overlay', 'close', and 'timer'
927
+ else if (result.dismiss == Swal.DismissReason.cancel || result.dismiss == Swal.DismissReason.close) {
928
+ if (cancelAction) {
929
+ cancelAction();
930
+ }
931
+ }
932
+ });
933
+ }
934
+ ;
935
+ }
936
+
937
+ /*
938
+ <file>
939
+ Project:
940
+ @osovitny/anatoly
941
+
942
+ Authors:
943
+ Vadim Osovitny
944
+ Anatoly Osovitny
945
+
946
+ Created:
947
+ 2 Jun 2020
948
+
949
+ Version:
950
+ 1.0
951
+
952
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
953
+ </file>
954
+ */
955
+
956
+ /*
957
+ <file>
958
+ Project:
959
+ @osovitny/anatoly
960
+
961
+ Authors:
962
+ Vadim Osovitny
963
+ Anatoly Osovitny
964
+
965
+ Created:
966
+ 26 Jun 2020
967
+
968
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
969
+ </file>
970
+ */
971
+ class Guid {
972
+ static newGuid() {
973
+ return v4();
974
+ }
975
+ }
976
+
977
+ /*
978
+ <file>
979
+ Project:
980
+ @osovitny/anatoly
981
+
982
+ Authors:
983
+ Vadim Osovitny
984
+ Anatoly Osovitny
985
+
986
+ Created:
987
+ 2 Jun 2020
988
+
989
+ Version:
990
+ 1.0
991
+
992
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
993
+ </file>
994
+ */
995
+ // SignalR
996
+ // import * as signalR from '@microsoft/signalr';
997
+ // import { NotificationsApiService } from '../../../data/services/notifications/notifications-api-service';
998
+ class NotificationService {
999
+ constructor(toastrService) {
1000
+ this.toastrService = toastrService;
1001
+ // SignalR
1002
+ // private hubConnection: signalR.HubConnection;
1003
+ // private socketUrl: string;
1004
+ // Notifications
1005
+ this._sessionNotifications = new BehaviorSubject([]);
1006
+ this._serverNotifications = new BehaviorSubject([]);
1007
+ // Public
1008
+ this.sessionNotifications$ = this._sessionNotifications.asObservable();
1009
+ this.serverNotifications$ = this._serverNotifications.asObservable();
1010
+ // this.onInit();
1011
+ }
1012
+ /*
1013
+ onInit() {
1014
+ if (AppCoreSettings.AzureAD) {
1015
+ this.authService.getAuthToken().subscribe((token: string) => {
1016
+ this.startSignalRConnection(token);
1017
+ });
1018
+
1019
+ return;
1020
+ }
1021
+
1022
+ this.startSignalRConnection();
1023
+ }
1024
+
1025
+ ngOnDestroy() {
1026
+ this.stopSignalRConnection();
1027
+ }
1028
+
1029
+ // SignalR
1030
+ private startSignalRConnection(accessToken?) {
1031
+ const cskii = AppCoreSettings.selectedClientID;
1032
+ // tslint:disable-next-line:variable-name
1033
+ const cskii_upn = AppCoreSettings.CSKII_UPN;
1034
+ // tslint:disable-next-line:variable-name
1035
+ const cli_sessionguid = AppCoreSettings.CLI_SessionGUID;
1036
+
1037
+ const url = this.socketUrl + '?cskii=' + cskii + '&cskii_upn=' + cskii_upn + '&cli_sessionguid=' + cli_sessionguid;
1038
+
1039
+ if (accessToken) {
1040
+ this.hubConnection = new signalR.HubConnectionBuilder()
1041
+ .withUrl(url, {
1042
+ skipNegotiation: false,
1043
+ transport: signalR.HttpTransportType.WebSockets,
1044
+ accessTokenFactory: () => accessToken
1045
+ })
1046
+ .withAutomaticReconnect()
1047
+ .configureLogging(signalR.LogLevel.Debug)
1048
+ .build();
1049
+ }
1050
+ else {
1051
+ this.hubConnection = new signalR.HubConnectionBuilder()
1052
+ .withUrl(this.socketUrl, {
1053
+ skipNegotiation: true,
1054
+ transport: signalR.HttpTransportType.WebSockets
1055
+ })
1056
+ .withAutomaticReconnect()
1057
+ .configureLogging(signalR.LogLevel.Debug)
1058
+ .build();
1059
+ }
1060
+
1061
+ this.hubConnection
1062
+ .start()
1063
+ .then(() => this.signalRConnection_onSuccess())
1064
+ .catch(err => {
1065
+ console.error('Connection failed to SignalR Notification Hub')
1066
+ })
1067
+ }
1068
+
1069
+ private signalRConnection_onSuccess() {
1070
+ this.addReceiveMessageDataListener();
1071
+
1072
+ this.notificationsApiService.retrieveNotifications().subscribe(data => {
1073
+ this.serverNotifications = data;
1074
+ });
1075
+ }
1076
+
1077
+ stopSignalRConnection() {
1078
+ if (this.hubConnection) {
1079
+ this.hubConnection.stop();
1080
+ this.hubConnection = null;
1081
+ }
1082
+ }
1083
+
1084
+ private addReceiveMessageDataListener = () => {
1085
+ this.hubConnection.on('ReceiveMessage', (message) => {
1086
+ if (message) {
1087
+ if (message.type === 'error') {
1088
+ this.error(message.text, null, null, false);
1089
+ }
1090
+ else {
1091
+ this.success(message.text, null, null, false);
1092
+ }
1093
+
1094
+ const notification = {
1095
+ id: message.id,
1096
+ isNew: message.isNew,
1097
+ isSession: true,
1098
+ text: message.text,
1099
+ type: message.type,
1100
+ createdDate: message.createdDate
1101
+ };
1102
+
1103
+ this.addSessionNotificationToList(notification);
1104
+ }
1105
+ });
1106
+ }
1107
+ */
1108
+ addSessionNotification(text, type) {
1109
+ const id = Guid.newGuid();
1110
+ const notification = { id, isNew: true, isSession: true, text, type, createdDate: new Date(Date.now()).toISOString() };
1111
+ this.addSessionNotificationToList(notification);
1112
+ }
1113
+ addSessionNotificationToList(notification) {
1114
+ this.sessionNotifications = [
1115
+ notification,
1116
+ ...this.sessionNotifications,
1117
+ ];
1118
+ }
1119
+ // Public API
1120
+ removeNotification(id, isSession) {
1121
+ if (isSession) {
1122
+ this.sessionNotifications = this.sessionNotifications.filter(notifications => notifications.id !== id);
1123
+ }
1124
+ else {
1125
+ this.serverNotifications = this.serverNotifications.filter(notifications => notifications.id !== id);
1126
+ }
1127
+ }
1128
+ success(text, params, title, createSessionNotification = true) {
1129
+ text = L10nUtils.getLocalizedValue(text, params, 'OperationSuccessFull');
1130
+ title = L10nUtils.getLocalizedValue(title);
1131
+ this.toastrService.success(text, title, {
1132
+ timeOut: 3000,
1133
+ progressBar: true
1134
+ });
1135
+ if (createSessionNotification) {
1136
+ this.addSessionNotification(text, 'success');
1137
+ }
1138
+ }
1139
+ info(text, params, title) {
1140
+ text = L10nUtils.getLocalizedValue(text, params);
1141
+ title = L10nUtils.getLocalizedValue(title);
1142
+ this.toastrService.info(text, title, {
1143
+ timeOut: 3000,
1144
+ progressBar: true
1145
+ });
1146
+ }
1147
+ warning(text, params, title) {
1148
+ text = L10nUtils.getLocalizedValue(text, params);
1149
+ title = L10nUtils.getLocalizedValue(title);
1150
+ this.toastrService.warning(text, title, {
1151
+ timeOut: 3000,
1152
+ progressBar: true
1153
+ });
1154
+ }
1155
+ error(text, params, title, createSessionNotification = true) {
1156
+ text = L10nUtils.getLocalizedValue(text, params, 'ErrorOccured');
1157
+ title = L10nUtils.getLocalizedValue(title);
1158
+ this.toastrService.error(text, title, {
1159
+ timeOut: 3000,
1160
+ progressBar: true
1161
+ });
1162
+ if (createSessionNotification) {
1163
+ this.addSessionNotification(text, 'error');
1164
+ }
1165
+ }
1166
+ cancel(text, params, title) {
1167
+ text = L10nUtils.getLocalizedValue(text, params, 'OperationCancelled');
1168
+ title = L10nUtils.getLocalizedValue(title);
1169
+ this.toastrService.info(text, title, {
1170
+ timeOut: 3000,
1171
+ progressBar: true
1172
+ });
1173
+ }
1174
+ // SessionNotifications
1175
+ get sessionNotifications() {
1176
+ return this._sessionNotifications.getValue();
1177
+ }
1178
+ set sessionNotifications(val) {
1179
+ this._sessionNotifications.next(val);
1180
+ }
1181
+ // ServerNotifications
1182
+ get serverNotifications() {
1183
+ return this._serverNotifications.getValue();
1184
+ }
1185
+ set serverNotifications(val) {
1186
+ this._serverNotifications.next(val);
1187
+ }
1188
+ }
1189
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationService, deps: [{ token: i1$2.ToastrService }], target: i0.ɵɵFactoryTarget.Injectable });
1190
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationService, providedIn: 'root' });
1191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationService, decorators: [{
1192
+ type: Injectable,
1193
+ args: [{ providedIn: 'root' }]
1194
+ }], ctorParameters: function () { return [{ type: i1$2.ToastrService }]; } });
1195
+
1196
+ /*
1197
+ <file>
1198
+ Project:
1199
+ @osovitny/anatoly
1200
+
1201
+ Authors:
1202
+ Vadim Osovitny
1203
+ Anatoly Osovitny
1204
+
1205
+ Created:
1206
+ 13 Nov 2017
1207
+
1208
+ Version:
1209
+ 1.0
1210
+
1211
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1212
+ </file>
1213
+ */
1214
+ class BaseApiService {
1215
+ constructor(http) {
1216
+ this.http = http;
1217
+ }
1218
+ serializeParams(data) {
1219
+ return data ? ('?' + $.param(data)) : '';
1220
+ }
1221
+ //api
1222
+ get(action, data, responseType) {
1223
+ if (!responseType) {
1224
+ responseType = 'json';
1225
+ }
1226
+ var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
1227
+ return this.http.get(url, { responseType: responseType }).pipe(map(res => res));
1228
+ }
1229
+ post(action, data, responseType) {
1230
+ if (!responseType) {
1231
+ responseType = 'text';
1232
+ }
1233
+ var url = `${this.baseUrl}/${action}`;
1234
+ return this.http.post(url, data, { responseType: responseType });
1235
+ }
1236
+ postQS(action, data, responseType) {
1237
+ if (!responseType) {
1238
+ responseType = 'text';
1239
+ }
1240
+ var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
1241
+ return this.http.post(url, null, { responseType: responseType });
1242
+ }
1243
+ delete(action, data, responseType) {
1244
+ if (!responseType) {
1245
+ responseType = 'text';
1246
+ }
1247
+ var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
1248
+ return this.http.delete(url, { responseType: responseType });
1249
+ }
1250
+ //gets
1251
+ getExternalTextFile(url) {
1252
+ return this.http.get(url);
1253
+ }
1254
+ getExternalJsonFile(url) {
1255
+ return this.http.get(url);
1256
+ }
1257
+ getJsonFile(fileName) {
1258
+ const jsonsUrl = AppCoreSettings.jsonsUrl;
1259
+ const jsonVersion = AppCoreSettings.jsonVersion;
1260
+ const isCDNEnabled = AppCoreSettings.isCDNEnabled;
1261
+ const cdnSasToken = AppCoreSettings.cdnSasToken;
1262
+ let url = "";
1263
+ if (isCDNEnabled) {
1264
+ url = jsonsUrl + "/" + fileName + cdnSasToken;
1265
+ }
1266
+ else {
1267
+ url = jsonsUrl + "/" + fileName + '?' + jsonVersion;
1268
+ }
1269
+ return this.http.get(url).pipe(map(res => res));
1270
+ }
1271
+ }
1272
+ BaseApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseApiService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1273
+ BaseApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseApiService });
1274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseApiService, decorators: [{
1275
+ type: Injectable
1276
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }]; } });
1277
+
1278
+ /*
1279
+ <file>
1280
+ Project:
1281
+ @osovitny/anatoly
1282
+
1283
+ Authors:
1284
+ Vadim Osovitny
1285
+ Anatoly Osovitny
1286
+
1287
+ Created:
1288
+ 26 Jun 2020
1289
+
1290
+ Version:
1291
+ 1.0
1292
+
1293
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1294
+ </file>
1295
+ */
1296
+ class WebStorageService {
1297
+ constructor(storage) {
1298
+ this.storage =
1299
+ storage === 'local' || storage === 'localStorage'
1300
+ ? localStorage
1301
+ : sessionStorage;
1302
+ }
1303
+ setItem(key, value) {
1304
+ this.storage.setItem(key, value);
1305
+ }
1306
+ setObject(key, value) {
1307
+ this.storage.setItem(key, JSON.stringify(value));
1308
+ }
1309
+ getItem(key) {
1310
+ return this.storage.getItem(key);
1311
+ }
1312
+ getObject(key) {
1313
+ let value = this.storage.getItem(key);
1314
+ if (!value) {
1315
+ return null;
1316
+ }
1317
+ return JSON.parse(value);
1318
+ }
1319
+ remove(key) {
1320
+ this.storage.removeItem(key);
1321
+ }
1322
+ }
1323
+ class LocalStorageService extends WebStorageService {
1324
+ constructor() {
1325
+ super('localStorage');
1326
+ }
1327
+ }
1328
+ LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1329
+ LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalStorageService });
1330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LocalStorageService, decorators: [{
1331
+ type: Injectable
1332
+ }], ctorParameters: function () { return []; } });
1333
+ class SessionStorageService extends WebStorageService {
1334
+ constructor() {
1335
+ super('sessionStorage');
1336
+ }
1337
+ }
1338
+ SessionStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SessionStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1339
+ SessionStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SessionStorageService });
1340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SessionStorageService, decorators: [{
1341
+ type: Injectable
1342
+ }], ctorParameters: function () { return []; } });
1343
+
1344
+ /*
1345
+ <file>
1346
+ Project:
1347
+ @osovitny/anatoly
1348
+
1349
+ Authors:
1350
+ Vadim Osovitny
1351
+ Anatoly Osovitny
1352
+
1353
+ Created:
1354
+ 13 Nov 2017
1355
+
1356
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1357
+ </file>
1358
+ */
1359
+ class AppContextService extends BaseApiService {
1360
+ constructor(http, sessionStorage) {
1361
+ super(http);
1362
+ this.http = http;
1363
+ this.sessionStorage = sessionStorage;
1364
+ //Consts
1365
+ this.storageKeyName = 'appContext';
1366
+ this.subscription = null;
1367
+ this.successes = [];
1368
+ this.baseUrl = '/api/appContext';
1369
+ }
1370
+ //Session
1371
+ getCurrentFromSession() {
1372
+ return this.sessionStorage.getObject(this.storageKeyName);
1373
+ }
1374
+ setCurrentFromSession(value) {
1375
+ this.sessionStorage.setObject(this.storageKeyName, value);
1376
+ }
1377
+ updateCurrentIfExpired() {
1378
+ let context = this.getCurrentFromSession();
1379
+ if (!context) {
1380
+ return;
1381
+ }
1382
+ let lu = context.lastRequested;
1383
+ if (lu) {
1384
+ let now = new Date();
1385
+ let lastRequested = new Date(context.lastRequested);
1386
+ let in2Mins = new Date(lastRequested.getFullYear(), lastRequested.getMonth(), lastRequested.getDate(), lastRequested.getHours(), lastRequested.getMinutes() + 2, 0, 0);
1387
+ if (in2Mins.getTime() < now.getTime()) {
1388
+ this.updateCurrent();
1389
+ }
1390
+ }
1391
+ }
1392
+ dataReceived(data) {
1393
+ this.current = data;
1394
+ for (let i = 0; i < this.successes.length; i++) {
1395
+ let success = this.successes[i];
1396
+ if (success) {
1397
+ success(data);
1398
+ }
1399
+ }
1400
+ this.successes = [];
1401
+ this.subscription.unsubscribe();
1402
+ this.subscription = null;
1403
+ }
1404
+ //Public
1405
+ getCurrent(success = null, getCachedIfExist = true) {
1406
+ let context = this.getCurrentFromSession();
1407
+ if (getCachedIfExist && context != null) {
1408
+ if (success) {
1409
+ success(context);
1410
+ }
1411
+ return;
1412
+ }
1413
+ if (success) {
1414
+ this.successes.push(success);
1415
+ }
1416
+ if (this.subscription != null) {
1417
+ return;
1418
+ }
1419
+ let now = new Date();
1420
+ console.log('Requesting a new AppContext at ' + now);
1421
+ this.subscription = this.get('getCurrentContext', null).subscribe((data) => {
1422
+ this.dataReceived(data);
1423
+ }, (e) => {
1424
+ });
1425
+ }
1426
+ updateCurrent(success = null) {
1427
+ this.getCurrent(success, false);
1428
+ }
1429
+ clearCurrent() {
1430
+ this.sessionStorage.remove(this.storageKeyName);
1431
+ }
1432
+ isUserSignedIn() {
1433
+ return ContextInitState.isUserSignedIn;
1434
+ }
1435
+ isUserAdmin() {
1436
+ return ContextInitState.isUserAdmin;
1437
+ }
1438
+ //Properties
1439
+ //current
1440
+ get current() {
1441
+ this.updateCurrentIfExpired();
1442
+ return this.getCurrentFromSession();
1443
+ }
1444
+ set current(value) {
1445
+ this.setCurrentFromSession(value);
1446
+ }
1447
+ }
1448
+ AppContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AppContextService, deps: [{ token: i1$3.HttpClient }, { token: SessionStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
1449
+ AppContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AppContextService });
1450
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AppContextService, decorators: [{
1451
+ type: Injectable
1452
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: SessionStorageService }]; } });
1453
+
1454
+ /*
1455
+ <file>
1456
+ Project:
1457
+ @osovitny/anatoly
1458
+
1459
+ Authors:
1460
+ Vadim Osovitny
1461
+ Anatoly Osovitny
1462
+
1463
+ Created:
1464
+ 26 Jun 2020
1465
+
1466
+ Version:
1467
+ 1.0
1468
+
1469
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1470
+ </file>
1471
+ */
1472
+ class IdleService {
1473
+ constructor() {
1474
+ this.expired$ = new Subject();
1475
+ }
1476
+ //Private
1477
+ resetTimeCounters(timeOutSeconds) {
1478
+ this.timeOutSeconds = timeOutSeconds;
1479
+ this.timeOutMilliSeconds = timeOutSeconds * 1000;
1480
+ this.startDate = new Date();
1481
+ }
1482
+ startTimer() {
1483
+ this.timer$ = timer(this.timeOutMilliSeconds, 1 * 1000).subscribe((res) => {
1484
+ let nowDate = new Date();
1485
+ let exiredDate = new Date(this.startDate.getTime() + this.timeOutMilliSeconds);
1486
+ if (nowDate.getTime() >= exiredDate.getTime()) {
1487
+ //console.log("nowDate: " + nowDate);
1488
+ //console.log("exiredDate: " + exiredDate);
1489
+ this.expired$.next(true);
1490
+ }
1491
+ });
1492
+ }
1493
+ resetTimer() {
1494
+ this.startDate = new Date();
1495
+ }
1496
+ //Public
1497
+ startWatching(timeOutSeconds) {
1498
+ this.idle$ = merge(fromEvent(document, 'mousemove'), fromEvent(document, 'click'), fromEvent(document, 'mousedown'), fromEvent(document, 'keypress'), fromEvent(document, 'DOMMouseScroll'), fromEvent(document, 'mousewheel'), fromEvent(document, 'touchmove'), fromEvent(document, 'MSPointerMove'), fromEvent(window, 'mousemove'), fromEvent(window, 'resize'));
1499
+ this.resetTimeCounters(timeOutSeconds);
1500
+ this.idleSubscription = this.idle$.subscribe((res) => {
1501
+ this.resetTimer();
1502
+ });
1503
+ this.startTimer();
1504
+ return this.expired$;
1505
+ }
1506
+ stopWatching() {
1507
+ this.timer$.unsubscribe();
1508
+ this.idleSubscription.unsubscribe();
1509
+ }
1510
+ restartIdleTimer(timeOutSeconds) {
1511
+ this.timer$.unsubscribe();
1512
+ this.resetTimeCounters(timeOutSeconds);
1513
+ this.startTimer();
1514
+ }
1515
+ }
1516
+ IdleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: IdleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1517
+ IdleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: IdleService, providedIn: 'root' });
1518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: IdleService, decorators: [{
1519
+ type: Injectable,
1520
+ args: [{
1521
+ providedIn: 'root'
1522
+ }]
1523
+ }] });
1524
+
1525
+ /*
1526
+ <file>
1527
+ Project:
1528
+ @osovitny/anatoly
1529
+
1530
+ Authors:
1531
+ Vadim Osovitny
1532
+ Anatoly Osovitny
1533
+
1534
+ Created:
1535
+ 29 Щсе 2020
1536
+
1537
+ Version:
1538
+ 1.0
1539
+
1540
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1541
+ </file>
1542
+ */
1543
+ class DigitalMarketingService {
1544
+ constructor(title, meta, dom) {
1545
+ this.title = title;
1546
+ this.meta = meta;
1547
+ this.dom = dom;
1548
+ }
1549
+ updateTitle(title) {
1550
+ this.title.setTitle(title);
1551
+ }
1552
+ updateDescription(desc) {
1553
+ this.meta.updateTag({ name: 'description', content: desc });
1554
+ }
1555
+ updateKeywords(keywords) {
1556
+ this.meta.updateTag({ name: 'keywords', content: keywords });
1557
+ }
1558
+ updateMetaTags(meta) {
1559
+ meta.forEach(m => this.meta.updateTag(m));
1560
+ }
1561
+ setCanonicalUrl(url) {
1562
+ const canUrl = url === undefined ? this.dom.URL : url;
1563
+ const link = this.dom.createElement('link');
1564
+ link.setAttribute('rel', 'canonical');
1565
+ this.dom.head.appendChild(link);
1566
+ link.setAttribute('href', canUrl);
1567
+ }
1568
+ updateCanonicalUrl(url) {
1569
+ const canUrl = url === undefined ? this.dom.URL : url;
1570
+ const head = this.dom.getElementsByTagName('head')[0];
1571
+ let link = this.dom.querySelector(`link[rel='canonical']`) || null;
1572
+ if (link == null) {
1573
+ link = this.dom.createElement('link');
1574
+ head.appendChild(link);
1575
+ }
1576
+ link.setAttribute('rel', 'canonical');
1577
+ link.setAttribute('href', canUrl);
1578
+ }
1579
+ }
1580
+ DigitalMarketingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: DigitalMarketingService, deps: [{ token: i1$4.Title }, { token: i1$4.Meta }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
1581
+ DigitalMarketingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: DigitalMarketingService, providedIn: 'root' });
1582
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: DigitalMarketingService, decorators: [{
1583
+ type: Injectable,
1584
+ args: [{
1585
+ providedIn: 'root'
1586
+ }]
1587
+ }], ctorParameters: function () { return [{ type: i1$4.Title }, { type: i1$4.Meta }, { type: undefined, decorators: [{
1588
+ type: Inject,
1589
+ args: [DOCUMENT]
1590
+ }] }]; } });
1591
+
1592
+ /*
1593
+ <file>
1594
+ Project:
1595
+ @osovitny/anatoly
1596
+
1597
+ Authors:
1598
+ Vadim Osovitny
1599
+ Anatoly Osovitny
1600
+
1601
+ Created:
1602
+ 29 Nov 2020
1603
+
1604
+ Version:
1605
+ 1.0
1606
+
1607
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1608
+ </file>
1609
+ */
1610
+ class GoogleAnalyticsService {
1611
+ constructor(router) {
1612
+ this.router = router;
1613
+ /*
1614
+ https://yashints.dev/blog/2019/02/12/angular-ga-tagmanager
1615
+ https://developers.google.com/analytics/devguides/collection/gtagjs/pages
1616
+ https://developers.google.com/analytics/devguides/collection/upgrade/analyticsjs
1617
+ */
1618
+ }
1619
+ subscribe() {
1620
+ this.subscription = this.router.events.subscribe(event => {
1621
+ if (event instanceof NavigationEnd) {
1622
+ if (window.ga) {
1623
+ window.ga('set', 'page', event.urlAfterRedirects);
1624
+ window.ga('send', 'pageview');
1625
+ }
1626
+ }
1627
+ });
1628
+ }
1629
+ unsubscribe() {
1630
+ if (this.subscription) {
1631
+ this.subscription.unsubscribe();
1632
+ }
1633
+ }
1634
+ }
1635
+ GoogleAnalyticsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: GoogleAnalyticsService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1636
+ GoogleAnalyticsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: GoogleAnalyticsService });
1637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: GoogleAnalyticsService, decorators: [{
1638
+ type: Injectable
1639
+ }], ctorParameters: function () { return [{ type: i1.Router }]; } });
1640
+
1641
+ /*
1642
+ <file>
1643
+ Project:
1644
+ @osovitny/anatoly
1645
+
1646
+ Authors:
1647
+ Vadim Osovitny
1648
+ Anatoly Osovitny
1649
+
1650
+ Created:
1651
+ 29 June 2020
1652
+
1653
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1654
+ </file>
1655
+ */
1656
+ let InjectorInstance;
1657
+ class AnatolyCoreModule {
1658
+ constructor(injector, parentModule) {
1659
+ this.injector = injector;
1660
+ throwIfAlreadyLoaded(parentModule, 'AnatolyCoreModule');
1661
+ InjectorInstance = this.injector;
1662
+ }
1663
+ }
1664
+ AnatolyCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyCoreModule, deps: [{ token: i0.Injector }, { token: AnatolyCoreModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
1665
+ AnatolyCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: AnatolyCoreModule, imports: [CommonModule] });
1666
+ AnatolyCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyCoreModule, providers: [
1667
+ LoggingService,
1668
+ NotificationService,
1669
+ AppContextService,
1670
+ LoadingService,
1671
+ DigitalMarketingService,
1672
+ GoogleAnalyticsService,
1673
+ LocalStorageService,
1674
+ SessionStorageService
1675
+ ], imports: [CommonModule] });
1676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyCoreModule, decorators: [{
1677
+ type: NgModule,
1678
+ args: [{
1679
+ imports: [CommonModule],
1680
+ exports: [],
1681
+ providers: [
1682
+ LoggingService,
1683
+ NotificationService,
1684
+ AppContextService,
1685
+ LoadingService,
1686
+ DigitalMarketingService,
1687
+ GoogleAnalyticsService,
1688
+ LocalStorageService,
1689
+ SessionStorageService
1690
+ ],
1691
+ }]
1692
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: AnatolyCoreModule, decorators: [{
1693
+ type: Optional
1694
+ }, {
1695
+ type: SkipSelf
1696
+ }] }]; } });
1697
+
1698
+ /*
1699
+ <file>
1700
+ Project:
1701
+ @osovitny/anatoly
1702
+
1703
+ Authors:
1704
+ Vadim Osovitny
1705
+ Anatoly Osovitny
1706
+
1707
+ Created:
1708
+ 26 Jun 2020
1709
+
1710
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1711
+ </file>
1712
+ */
1713
+ class Subs {
1714
+ constructor() {
1715
+ this.subs = [];
1716
+ }
1717
+ add(...subscriptions) {
1718
+ this.subs = this.subs.concat(subscriptions);
1719
+ }
1720
+ set sink(subscription) {
1721
+ this.subs.push(subscription);
1722
+ }
1723
+ unsubscribe() {
1724
+ this.subs.forEach((sub) => sub && sub.unsubscribe());
1725
+ this.subs = [];
1726
+ }
1727
+ }
1728
+
1729
+ /*
1730
+ <file>
1731
+ Project:
1732
+ @osovitny/anatoly
1733
+
1734
+ Authors:
1735
+ Vadim Osovitny
1736
+ Anatoly Osovitny
1737
+
1738
+ Created:
1739
+ 19 March 2020
1740
+
1741
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1742
+ </file>
1743
+ */
1744
+ class Utils {
1745
+ static getValueByNameInQS(name) {
1746
+ return Utils.getValueByName(location.search, name);
1747
+ }
1748
+ static getValueByName(url, name) {
1749
+ name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
1750
+ // tslint:disable-next-line:one-variable-per-declaration
1751
+ const regex = new RegExp('[\\?&]' + name + '=([^&#]*)'), results = regex.exec(url);
1752
+ return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
1753
+ }
1754
+ static copyToClipBoard(event, val) {
1755
+ event.preventDefault();
1756
+ const selBox = document.createElement('textarea');
1757
+ selBox.style.position = 'fixed';
1758
+ selBox.style.left = '0';
1759
+ selBox.style.top = '0';
1760
+ selBox.style.opacity = '0';
1761
+ selBox.value = val;
1762
+ document.body.appendChild(selBox);
1763
+ selBox.focus();
1764
+ selBox.select();
1765
+ document.execCommand('copy');
1766
+ document.body.removeChild(selBox);
1767
+ }
1768
+ static downloadFile(name, url) {
1769
+ const link = document.createElement('a');
1770
+ link.download = name;
1771
+ link.href = url;
1772
+ link.click();
1773
+ }
1774
+ static downloadBlobFile(value, fileName) {
1775
+ const nav = window.navigator;
1776
+ if (nav.msSaveOrOpenBlob) {
1777
+ nav.msSaveOrOpenBlob(value, fileName);
1778
+ }
1779
+ else {
1780
+ const downloadURL = window.URL.createObjectURL(value);
1781
+ Utils.downloadFile(fileName, downloadURL);
1782
+ }
1783
+ }
1784
+ /*
1785
+ Author:
1786
+ https://medium.com/@mhagemann/the-ultimate-way-to-slugify-a-url-string-in-javascript-b8e4a0d849e1
1787
+ */
1788
+ static slugify(text, prefix = '', postfix = '') {
1789
+ const a = 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;';
1790
+ const b = 'aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------';
1791
+ const p = new RegExp(a.split('').join('|'), 'g');
1792
+ /*
1793
+ https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
1794
+ https://stackoverflow.com/questions/822452/strip-html-from-text-javascript
1795
+ */
1796
+ text = text.replace(/(<([^>]+)>)/gi, '');
1797
+ let result = text
1798
+ .toString()
1799
+ .toLowerCase()
1800
+ .replace(/\s+/g, '-') // Replace spaces with -
1801
+ .replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
1802
+ .replace(/&/g, '-and-') // Replace & with 'and'
1803
+ .replace(/[^\w\-]+/g, '') // Remove all non-word characters
1804
+ .replace(/\-\-+/g, '-') // Replace multiple - with single -
1805
+ .replace(/^-+/, '') // Trim - from start of text
1806
+ .replace(/-+$/, ''); // Trim - from end of text
1807
+ return prefix + result + postfix;
1808
+ }
1809
+ }
1810
+
1811
+ /*
1812
+ <file>
1813
+ Project:
1814
+ @osovitny/anatoly
1815
+
1816
+ Authors:
1817
+ Vadim Osovitny
1818
+ Anatoly Osovitny
1819
+
1820
+ Created:
1821
+ 29 Apr 2018
1822
+
1823
+ Version:
1824
+ 1.0
1825
+
1826
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1827
+ </file>
1828
+ */
1829
+ class BaseGridReadService extends BehaviorSubject {
1830
+ constructor(http) {
1831
+ super([]);
1832
+ this.http = http;
1833
+ this.data = [];
1834
+ }
1835
+ serializeParams(data) {
1836
+ return data ? ('?' + $.param(data)) : '';
1837
+ }
1838
+ read(params, success, error) {
1839
+ if (this.data.length) {
1840
+ return super.next(this.data);
1841
+ }
1842
+ var url = this.baseReadUrl;
1843
+ if (typeof params === 'undefined') {
1844
+ params = this.savedReadParams;
1845
+ }
1846
+ if (params) {
1847
+ url = this.baseReadUrl + `${this.serializeParams(params)}`;
1848
+ this.savedReadParams = params;
1849
+ }
1850
+ this.http.get(url).pipe(map(res => res)).subscribe(data => {
1851
+ super.next(data);
1852
+ if (success)
1853
+ success();
1854
+ }, e => {
1855
+ if (error)
1856
+ error(e);
1857
+ });
1858
+ }
1859
+ }
1860
+ BaseGridReadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGridReadService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1861
+ BaseGridReadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGridReadService });
1862
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGridReadService, decorators: [{
1863
+ type: Injectable
1864
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }]; } });
1865
+
1866
+ /*
1867
+ <file>
1868
+ Project:
1869
+ @osovitny/anatoly
1870
+
1871
+ Authors:
1872
+ Vadim Osovitny
1873
+ Anatoly Osovitny
1874
+
1875
+ Created:
1876
+ 29 Apr 2018
1877
+
1878
+ Version:
1879
+ 1.0
1880
+
1881
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1882
+ </file>
1883
+ */
1884
+ class BaseGridEditService extends BaseGridReadService {
1885
+ constructor(http) {
1886
+ super(http);
1887
+ this.http = http;
1888
+ }
1889
+ reset() {
1890
+ this.data = [];
1891
+ }
1892
+ resetItem(dataItem) {
1893
+ if (!dataItem) {
1894
+ return;
1895
+ }
1896
+ //find orignal data item
1897
+ const originalDataItem = this.data.find(item => item.Id === dataItem.Id);
1898
+ //revert changes
1899
+ Object.assign(originalDataItem, dataItem);
1900
+ super.next(this.data);
1901
+ }
1902
+ save(data, isNew, sucess) {
1903
+ const action = isNew ? 'add' : 'update';
1904
+ this.reset();
1905
+ this.post(action, data).subscribe(() => {
1906
+ }, () => {
1907
+ this.read();
1908
+ }, () => {
1909
+ this.read();
1910
+ if (sucess)
1911
+ sucess();
1912
+ });
1913
+ }
1914
+ delete(data, sucess) {
1915
+ this.reset();
1916
+ const url = `${this.baseUrl}/delete${this.serializeParams(data)}`;
1917
+ return this.http.delete(url).subscribe(() => {
1918
+ this.read();
1919
+ if (sucess)
1920
+ sucess();
1921
+ }, () => {
1922
+ this.read();
1923
+ });
1924
+ }
1925
+ post(action, data) {
1926
+ const url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
1927
+ return this.http.post(url, data).pipe(map(res => res));
1928
+ }
1929
+ }
1930
+ BaseGridEditService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGridEditService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1931
+ BaseGridEditService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGridEditService });
1932
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseGridEditService, decorators: [{
1933
+ type: Injectable
1934
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }]; } });
1935
+
1936
+ /*
1937
+ <file>
1938
+ Project:
1939
+ @osovitny/anatoly
1940
+
1941
+ Authors:
1942
+ Vadim Osovitny
1943
+ Anatoly Osovitny
1944
+
1945
+ Created:
1946
+ 30 April 2020
1947
+
1948
+ Version:
1949
+ 1.0
1950
+
1951
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1952
+ </file>
1953
+ */
1954
+ const consts = {
1955
+ billingApiPath: 'api/billing',
1956
+ // Notifications API
1957
+ notificationsApiPath: 'api/notifications',
1958
+ };
1959
+
1960
+ /*
1961
+ <file>
1962
+ Project:
1963
+ @osovitny/anatoly
1964
+
1965
+ Authors:
1966
+ Vadim Osovitny
1967
+ Anatoly Osovitny
1968
+
1969
+ Created:
1970
+ 30 April 2020
1971
+
1972
+ Version:
1973
+ 1.0
1974
+
1975
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
1976
+ </file>
1977
+ */
1978
+ class NotificationsApiService extends BaseApiService {
1979
+ constructor(http) {
1980
+ super(http);
1981
+ this.http = http;
1982
+ this.baseUrl = consts.notificationsApiPath;
1983
+ }
1984
+ retrieveNotifications() {
1985
+ return this.get('retrieveNotifications');
1986
+ }
1987
+ }
1988
+ NotificationsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationsApiService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1989
+ NotificationsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationsApiService, providedIn: 'root' });
1990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NotificationsApiService, decorators: [{
1991
+ type: Injectable,
1992
+ args: [{
1993
+ providedIn: 'root'
1994
+ }]
1995
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }]; } });
1996
+
1997
+ /*
1998
+ <file>
1999
+ Project:
2000
+ @osovitny/anatoly
2001
+
2002
+ Authors:
2003
+ Vadim Osovitny
2004
+ Anatoly Osovitny
2005
+
2006
+ Created:
2007
+ 12 Nov 2017
2008
+
2009
+ Version:
2010
+ 1.0
2011
+
2012
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2013
+ </file>
2014
+ */
2015
+ class BillingApiService extends BaseApiService {
2016
+ constructor(http) {
2017
+ super(http);
2018
+ this.http = http;
2019
+ this.baseUrl = consts.billingApiPath;
2020
+ }
2021
+ requestNewSubscription(requestedPlan, success, error) {
2022
+ this.postQS("requestNewSubscription", { requestedPlan: requestedPlan }).subscribe((data) => {
2023
+ if (success)
2024
+ success();
2025
+ }, (e) => {
2026
+ if (error)
2027
+ error();
2028
+ });
2029
+ }
2030
+ cancelRequestedSubscription(success, error) {
2031
+ this.postQS("cancelRequestedSubscription", null).subscribe((data) => {
2032
+ if (success)
2033
+ success();
2034
+ }, (e) => {
2035
+ if (error)
2036
+ error();
2037
+ });
2038
+ }
2039
+ buyAccess(requestedPlan, success, error) {
2040
+ this.postQS("buyAccess", { requestedPlan: requestedPlan }).subscribe((data) => {
2041
+ if (success)
2042
+ success();
2043
+ }, (e) => {
2044
+ if (error)
2045
+ error();
2046
+ });
2047
+ }
2048
+ }
2049
+ BillingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BillingApiService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2050
+ BillingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BillingApiService });
2051
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BillingApiService, decorators: [{
2052
+ type: Injectable
2053
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }]; } });
2054
+
2055
+ /*
2056
+ <file>
2057
+ Project:
2058
+ @osovitny/anatoly
2059
+
2060
+ Authors:
2061
+ Vadim Osovitny
2062
+ Anatoly Osovitny
2063
+
2064
+ Created:
2065
+ 4 Mar 2020
2066
+
2067
+ Version:
2068
+ 1.0
2069
+
2070
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2071
+ </file>
2072
+ */
2073
+ class AnatolyDataModule {
2074
+ constructor(parentModule) {
2075
+ throwIfAlreadyLoaded(parentModule, 'AnatolyDataModule');
2076
+ }
2077
+ }
2078
+ AnatolyDataModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyDataModule, deps: [{ token: AnatolyDataModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
2079
+ AnatolyDataModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: AnatolyDataModule, imports: [CommonModule] });
2080
+ AnatolyDataModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyDataModule, providers: [
2081
+ BillingApiService
2082
+ ], imports: [CommonModule] });
2083
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyDataModule, decorators: [{
2084
+ type: NgModule,
2085
+ args: [{
2086
+ imports: [
2087
+ CommonModule
2088
+ ],
2089
+ providers: [
2090
+ BillingApiService
2091
+ ],
2092
+ }]
2093
+ }], ctorParameters: function () { return [{ type: AnatolyDataModule, decorators: [{
2094
+ type: Optional
2095
+ }, {
2096
+ type: SkipSelf
2097
+ }] }]; } });
2098
+
2099
+ /*
2100
+ <file>
2101
+ Project:
2102
+ @osovitny/anatoly
2103
+
2104
+ Authors:
2105
+ Vadim Osovitny
2106
+ Anatoly Osovitny
2107
+
2108
+ Created:
2109
+ 28 Aug 2018
2110
+
2111
+ Version:
2112
+ 1.0
2113
+
2114
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2115
+ </file>
2116
+ */
2117
+ class BaseComponent {
2118
+ constructor() {
2119
+ this.subs = new Subs();
2120
+ }
2121
+ getQSId() {
2122
+ var id = Utils.getValueByNameInQS("id");
2123
+ if (typeof id === "undefined" || id == "")
2124
+ return null;
2125
+ return id;
2126
+ }
2127
+ ngOnDestroy() {
2128
+ this.subs.unsubscribe();
2129
+ }
2130
+ }
2131
+ BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2132
+ BaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BaseComponent, selector: "ng-component", ngImport: i0, template: '', isInline: true });
2133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseComponent, decorators: [{
2134
+ type: Component,
2135
+ args: [{
2136
+ template: ''
2137
+ }]
2138
+ }] });
2139
+
2140
+ /*
2141
+ <file>
2142
+ Project:
2143
+ @osovitny/anatoly
2144
+
2145
+ Authors:
2146
+ Vadim Osovitny
2147
+ Anatoly Osovitny
2148
+
2149
+ Created:
2150
+ 20 Nov 2017
2151
+
2152
+ Version:
2153
+ 1.0
2154
+
2155
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2156
+ </file>
2157
+ */
2158
+ class BaseEditComponent extends BaseComponent {
2159
+ constructor() {
2160
+ super();
2161
+ this.formSubmitted = false;
2162
+ }
2163
+ isActionAdding() {
2164
+ var id = Utils.getValueByNameInQS("id");
2165
+ if (typeof id === "undefined" || id == "")
2166
+ return true;
2167
+ return false;
2168
+ }
2169
+ getEntityId() {
2170
+ return this.getQSId();
2171
+ }
2172
+ isControlValid(name, frmGroup = null) {
2173
+ return !this.isControlInvalid(name, frmGroup);
2174
+ }
2175
+ isControlInvalid(name, frmGroup = null) {
2176
+ if (typeof name === "undefined" || name == "") {
2177
+ return false;
2178
+ }
2179
+ let fg = frmGroup ? frmGroup : this.formGroup;
2180
+ if (!fg) {
2181
+ return false;
2182
+ }
2183
+ if (fg.get(name)) {
2184
+ return ((this.formSubmitted && fg.get(name).invalid) ||
2185
+ (fg.get(name).touched && fg.get(name).invalid));
2186
+ }
2187
+ return false;
2188
+ }
2189
+ //FormGroup functions
2190
+ getFormValue(name, frmGroup = null) {
2191
+ let fg = frmGroup ? frmGroup : this.formGroup;
2192
+ return fg.controls[name].value;
2193
+ }
2194
+ setFormValue(name, value, frmGroup = null) {
2195
+ let fg = frmGroup ? frmGroup : this.formGroup;
2196
+ fg.controls[name].setValue(value);
2197
+ }
2198
+ getFormGroupValue(groupName, name, frmGroup = null) {
2199
+ let fg = frmGroup ? frmGroup : this.formGroup;
2200
+ return fg.controls[groupName].get(name).value;
2201
+ }
2202
+ setFormGroupValue(groupName, name, value, frmGroup = null) {
2203
+ let fg = frmGroup ? frmGroup : this.formGroup;
2204
+ fg.controls[groupName].get(name).setValue(value);
2205
+ }
2206
+ /**
2207
+ * Add control to form group
2208
+ * @param name
2209
+ * @param formControl
2210
+ * @param formGroup
2211
+ */
2212
+ addControl(name, formControl, frmGroup = null) {
2213
+ let fg = frmGroup ? frmGroup : this.formGroup;
2214
+ fg.addControl(name, formControl);
2215
+ }
2216
+ /**
2217
+ * Removes control from form group
2218
+ * @param name
2219
+ * @param formGroup
2220
+ */
2221
+ removeControl(name, frmGroup = null) {
2222
+ let fg = frmGroup ? frmGroup : this.formGroup;
2223
+ if (fg.get(name)) {
2224
+ fg.removeControl(name);
2225
+ }
2226
+ }
2227
+ /**
2228
+ * return new form control
2229
+ * @param formState
2230
+ * @param validatorOrOpts
2231
+ * @param asyncValidator
2232
+ */
2233
+ createFormControl(formState, validatorOrOpts, asyncValidator) {
2234
+ return new FormControl(formState, validatorOrOpts, asyncValidator);
2235
+ }
2236
+ /**
2237
+ * Set error to control
2238
+ * @param controlName formControl name
2239
+ * @param err error expect {erroname: boolean} format
2240
+ * @param formGroup Specific form group. default it will apply on this.formGroup property
2241
+ */
2242
+ setControlError(controlName, err, frmGroup = null) {
2243
+ let fg = frmGroup ? frmGroup : this.formGroup;
2244
+ fg.get(controlName)?.setErrors(err);
2245
+ }
2246
+ /**
2247
+ * Set {invalid: true} for the specified form
2248
+ * @param controlName form control name
2249
+ * @param formGroup
2250
+ */
2251
+ setInValidError(controlName, frmGroup = null) {
2252
+ let fg = frmGroup ? frmGroup : this.formGroup;
2253
+ fg.get(controlName)?.setErrors({ invalid: true });
2254
+ }
2255
+ /**
2256
+ * returns formgroup controls.
2257
+ * main use case is used in html pages
2258
+ */
2259
+ get fc() {
2260
+ return this.formGroup.controls;
2261
+ }
2262
+ }
2263
+ BaseEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2264
+ BaseEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BaseEditComponent, selector: "ng-component", inputs: { formGroup: "formGroup", formSubmitted: "formSubmitted" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
2265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseEditComponent, decorators: [{
2266
+ type: Component,
2267
+ args: [{
2268
+ template: ''
2269
+ }]
2270
+ }], ctorParameters: function () { return []; }, propDecorators: { formGroup: [{
2271
+ type: Input
2272
+ }], formSubmitted: [{
2273
+ type: Input
2274
+ }] } });
2275
+
2276
+ /*
2277
+ <file>
2278
+ Project:
2279
+ @osovitny/anatoly
2280
+
2281
+ Authors:
2282
+ Vadim Osovitny
2283
+ Anatoly Osovitny
2284
+
2285
+ Created:
2286
+ 24 Jan 2022
2287
+
2288
+ Version:
2289
+ 1.0
2290
+
2291
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2292
+ </file>
2293
+ */
2294
+ class BaseDialog extends BaseEditComponent {
2295
+ constructor() {
2296
+ super();
2297
+ this._opened = false;
2298
+ }
2299
+ get opened() {
2300
+ return this._opened;
2301
+ }
2302
+ open() {
2303
+ this._opened = true;
2304
+ }
2305
+ close() {
2306
+ this._opened = false;
2307
+ }
2308
+ }
2309
+ BaseDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
2310
+ BaseDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BaseDialog, selector: "ng-component", inputs: { opened: "opened" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
2311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseDialog, decorators: [{
2312
+ type: Component,
2313
+ args: [{
2314
+ template: ''
2315
+ }]
2316
+ }], ctorParameters: function () { return []; }, propDecorators: { opened: [{
2317
+ type: Input
2318
+ }] } });
2319
+
2320
+ /*
2321
+ <file>
2322
+ Project:
2323
+ @osovitny/anatoly
2324
+
2325
+ Authors:
2326
+ Vadim Osovitny
2327
+ Anatoly Osovitny
2328
+
2329
+ Created:
2330
+ 4 Jul 2018
2331
+
2332
+ Version:
2333
+ 1.0
2334
+
2335
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2336
+ </file>
2337
+ */
2338
+ class SignUpButtonComponent {
2339
+ }
2340
+ SignUpButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SignUpButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2341
+ SignUpButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: SignUpButtonComponent, selector: "anatoly-signup-button", inputs: { classbtn: "classbtn" }, ngImport: i0, template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n" });
2342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SignUpButtonComponent, decorators: [{
2343
+ type: Component,
2344
+ args: [{ selector: "anatoly-signup-button", template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n" }]
2345
+ }], propDecorators: { classbtn: [{
2346
+ type: Input
2347
+ }] } });
2348
+
2349
+ /*
2350
+ <file>
2351
+ Project:
2352
+ @osovitny/anatoly
2353
+
2354
+ Authors:
2355
+ Vadim Osovitny
2356
+ Anatoly Osovitny
2357
+
2358
+ Created:
2359
+ 14 Aug 2018
2360
+
2361
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2362
+ </file>
2363
+ */
2364
+ class BuyAccessButtonComponent {
2365
+ constructor(appContext, api) {
2366
+ this.appContext = appContext;
2367
+ this.api = api;
2368
+ this.contextUpdated = false;
2369
+ this.isUserSignedIn = false;
2370
+ this.currentPlan = 0;
2371
+ this.currentPlanTitle = '';
2372
+ }
2373
+ ngOnInit() {
2374
+ if (!this.appContext.isUserSignedIn()) {
2375
+ this.contextUpdated = true;
2376
+ return;
2377
+ }
2378
+ this.appContext.getCurrent((current) => {
2379
+ this.isUserSignedIn = current.isUserSignedIn;
2380
+ if (this.isUserSignedIn) {
2381
+ this.currentPlan = current.account.billingPlan;
2382
+ this.currentPlanTitle = current.account.billingPlanAsString;
2383
+ }
2384
+ this.contextUpdated = true;
2385
+ });
2386
+ }
2387
+ onBuyPlan() {
2388
+ const text = `Requested plan: ${this.plantitle} `;
2389
+ const that = this;
2390
+ Alerts.areYouSure(text, 'Buying access', 'Confirm change', 'Cancel', () => {
2391
+ that.api.buyAccess(that.plan, () => {
2392
+ Alerts.success('Access Granted', null, null, () => {
2393
+ window.location.reload();
2394
+ });
2395
+ });
2396
+ });
2397
+ }
2398
+ }
2399
+ BuyAccessButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BuyAccessButtonComponent, deps: [{ token: AppContextService }, { token: BillingApiService }], target: i0.ɵɵFactoryTarget.Component });
2400
+ BuyAccessButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BuyAccessButtonComponent, selector: "anatoly-buyaccess-button", inputs: { plan: "plan", plantitle: "plantitle" }, ngImport: i0, template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classbtn=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"plan != currentPlan && currentPlan == 1\" (click)=\"onBuyPlan()\">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SignUpButtonComponent, selector: "anatoly-signup-button", inputs: ["classbtn"] }] });
2401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BuyAccessButtonComponent, decorators: [{
2402
+ type: Component,
2403
+ args: [{ selector: 'anatoly-buyaccess-button', template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classbtn=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"plan != currentPlan && currentPlan == 1\" (click)=\"onBuyPlan()\">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n" }]
2404
+ }], ctorParameters: function () { return [{ type: AppContextService }, { type: BillingApiService }]; }, propDecorators: { plan: [{
2405
+ type: Input
2406
+ }], plantitle: [{
2407
+ type: Input
2408
+ }] } });
2409
+
2410
+ /*
2411
+ <file>
2412
+ Project:
2413
+ @osovitny/anatoly
2414
+
2415
+ Authors:
2416
+ Vadim Osovitny
2417
+ Anatoly Osovitny
2418
+
2419
+ Created:
2420
+ 12 Nov 2017
2421
+
2422
+ Version:
2423
+ 1.0
2424
+
2425
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2426
+ </file>
2427
+ */
2428
+ // Services
2429
+ class UpgradePlanButtonComponent {
2430
+ constructor(api) {
2431
+ this.api = api;
2432
+ }
2433
+ onUpgradePlan() {
2434
+ const text = `Current plan: ${this.currentplantitle} New plan: ${this.requestedplantitle}`;
2435
+ const that = this;
2436
+ Alerts.areYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', () => {
2437
+ that.api.requestNewSubscription(that.requestedplan, () => {
2438
+ Alerts.success('Your request for changing plan has been sent.', null, null, () => {
2439
+ window.location.reload();
2440
+ });
2441
+ });
2442
+ });
2443
+ }
2444
+ }
2445
+ UpgradePlanButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: UpgradePlanButtonComponent, deps: [{ token: BillingApiService }], target: i0.ɵɵFactoryTarget.Component });
2446
+ UpgradePlanButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: UpgradePlanButtonComponent, selector: "anatoly-upgrade-plan-button", inputs: { currentplantitle: "currentplantitle", requestedplan: "requestedplan", requestedplantitle: "requestedplantitle" }, ngImport: i0, template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n" });
2447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: UpgradePlanButtonComponent, decorators: [{
2448
+ type: Component,
2449
+ args: [{ selector: 'anatoly-upgrade-plan-button', template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n" }]
2450
+ }], ctorParameters: function () { return [{ type: BillingApiService }]; }, propDecorators: { currentplantitle: [{
2451
+ type: Input
2452
+ }], requestedplan: [{
2453
+ type: Input
2454
+ }], requestedplantitle: [{
2455
+ type: Input
2456
+ }] } });
2457
+
2458
+ /*
2459
+ <file>
2460
+ Project:
2461
+ @osovitny/anatoly
2462
+
2463
+ Authors:
2464
+ Vadim Osovitny
2465
+ Anatoly Osovitny
2466
+
2467
+ Created:
2468
+ 1 Jun 2018
2469
+
2470
+ Version:
2471
+ 1.0
2472
+
2473
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2474
+ </file>
2475
+ */
2476
+ class SubscribePlanButtonComponent {
2477
+ constructor(appcontext) {
2478
+ this.appcontext = appcontext;
2479
+ this.contextUpdated = false;
2480
+ this.isUserSignedIn = false;
2481
+ this.currentPlan = 0;
2482
+ this.currentPlanTitle = "";
2483
+ this.requestedPlan = 0;
2484
+ this.requestedPlanTitle = "";
2485
+ }
2486
+ ngOnInit() {
2487
+ if (!this.appcontext.isUserSignedIn()) {
2488
+ this.contextUpdated = true;
2489
+ return;
2490
+ }
2491
+ this.appcontext.getCurrent((current) => {
2492
+ this.isUserSignedIn = current.isUserSignedIn;
2493
+ if (this.isUserSignedIn) {
2494
+ this.currentPlan = current.account.billingPlan;
2495
+ this.currentPlanTitle = current.account.billingPlanAsString;
2496
+ this.requestedPlan = current.account.requestedBillingPlan;
2497
+ this.requestedPlanTitle = current.account.requestedBillingPlanAsString;
2498
+ }
2499
+ this.contextUpdated = true;
2500
+ });
2501
+ }
2502
+ }
2503
+ SubscribePlanButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SubscribePlanButtonComponent, deps: [{ token: AppContextService }], target: i0.ɵɵFactoryTarget.Component });
2504
+ SubscribePlanButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: SubscribePlanButtonComponent, selector: "anatoly-subscribe-plan-button", inputs: { plan: "plan", plantitle: "plantitle" }, ngImport: i0, template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classbtn=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"requestedPlan != null && requestedPlan != 0 && plan == requestedPlan\">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf=\"plan != currentPlan && plan != requestedPlan\"\r\n [currentplantitle]=\"currentPlanTitle\"\r\n [requestedplan]=plan\r\n [requestedplantitle]=\"plantitle\">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UpgradePlanButtonComponent, selector: "anatoly-upgrade-plan-button", inputs: ["currentplantitle", "requestedplan", "requestedplantitle"] }, { kind: "component", type: SignUpButtonComponent, selector: "anatoly-signup-button", inputs: ["classbtn"] }] });
2505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SubscribePlanButtonComponent, decorators: [{
2506
+ type: Component,
2507
+ args: [{ selector: "anatoly-subscribe-plan-button", template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classbtn=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"requestedPlan != null && requestedPlan != 0 && plan == requestedPlan\">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf=\"plan != currentPlan && plan != requestedPlan\"\r\n [currentplantitle]=\"currentPlanTitle\"\r\n [requestedplan]=plan\r\n [requestedplantitle]=\"plantitle\">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n" }]
2508
+ }], ctorParameters: function () { return [{ type: AppContextService }]; }, propDecorators: { plan: [{
2509
+ type: Input
2510
+ }], plantitle: [{
2511
+ type: Input
2512
+ }] } });
2513
+
2514
+ /*
2515
+ <file>
2516
+ Project:
2517
+ @osovitny/anatoly
2518
+
2519
+ Authors:
2520
+ Vadim Osovitny
2521
+ Anatoly Osovitny
2522
+
2523
+ Created:
2524
+ 23 Apr 2018
2525
+
2526
+ Version:
2527
+ 1.0
2528
+
2529
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2530
+ </file>
2531
+ */
2532
+ class ContentHeaderComponent {
2533
+ ngOnInit() {
2534
+ if (this.title == null) {
2535
+ this.title = "";
2536
+ }
2537
+ }
2538
+ }
2539
+ ContentHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ContentHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2540
+ ContentHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ContentHeaderComponent, selector: "anatoly-content-header", inputs: { title: "title" }, ngImport: i0, template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n" });
2541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ContentHeaderComponent, decorators: [{
2542
+ type: Component,
2543
+ args: [{ selector: "anatoly-content-header", template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n" }]
2544
+ }], propDecorators: { title: [{
2545
+ type: Input
2546
+ }] } });
2547
+
2548
+ /*
2549
+ <file>
2550
+ Project:
2551
+ @osovitny/anatoly
2552
+
2553
+ Authors:
2554
+ Vadim Osovitny
2555
+ Anatoly Osovitny
2556
+
2557
+ Created:
2558
+ 12 Dec 2017
2559
+
2560
+ Version:
2561
+ 1.0
2562
+
2563
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2564
+ </file>
2565
+ */
2566
+ const DefaultEditorOptions = {
2567
+ placeholderText: "Edit Your Content Here",
2568
+ charCounterCount: true,
2569
+ heightMin: 100,
2570
+ toolbarInline: false,
2571
+ toolbarButtons: {
2572
+ moreText: {
2573
+ buttons: [
2574
+ "bold",
2575
+ "italic",
2576
+ "underline",
2577
+ "strikeThrough",
2578
+ "subscript",
2579
+ "superscript",
2580
+ "fontFamily",
2581
+ "fontSize",
2582
+ "textColor",
2583
+ "backgroundColor",
2584
+ "inlineClass",
2585
+ "inlineStyle",
2586
+ ],
2587
+ },
2588
+ moreParagraph: {
2589
+ buttons: [
2590
+ "alignLeft",
2591
+ "alignCenter",
2592
+ "formatOLSimple",
2593
+ "alignRight",
2594
+ "alignJustify",
2595
+ "formatOL",
2596
+ "formatUL",
2597
+ "paragraphFormat",
2598
+ "paragraphStyle",
2599
+ "lineHeight",
2600
+ "outdent",
2601
+ "indent",
2602
+ "quote",
2603
+ ],
2604
+ },
2605
+ moreRich: {
2606
+ buttons: [
2607
+ "insertLink",
2608
+ "insertImage",
2609
+ "insertTable",
2610
+ "emoticons",
2611
+ "fontAwesome",
2612
+ "specialCharacters",
2613
+ "embedly",
2614
+ ],
2615
+ },
2616
+ moreMisc: {
2617
+ buttons: [
2618
+ "selectAll",
2619
+ "clearFormatting",
2620
+ "html",
2621
+ "undo",
2622
+ "redo",
2623
+ "fullscreen",
2624
+ ],
2625
+ align: "right",
2626
+ },
2627
+ },
2628
+ /*
2629
+ Upload:
2630
+ https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
2631
+ */
2632
+ imageUploadURL: "/api/htmlEditor/uploadImage",
2633
+ imageAllowedTypes: ["jpeg", "jpg", "png"],
2634
+ imageUploadParams: { uploadType: "", uploadParentId: "" },
2635
+ };
2636
+
2637
+ /*
2638
+ <file>
2639
+ Project:
2640
+ @osovitny/anatoly
2641
+
2642
+ Authors:
2643
+ Vadim Osovitny
2644
+ Anatoly Osovitny
2645
+
2646
+ Created:
2647
+ 12 Dec 2017
2648
+
2649
+ Version:
2650
+ 1.0
2651
+
2652
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2653
+ </file>
2654
+ */
2655
+ class BaseHtmlEditorComponent extends BaseEditComponent {
2656
+ constructor() {
2657
+ super();
2658
+ this.froalaEditorInitialized = false;
2659
+ this.afterInitializedActions = [];
2660
+ // Inputs
2661
+ this.editorLabelText = "Html";
2662
+ this.editorOptions = {};
2663
+ }
2664
+ ngOnInit() {
2665
+ let opt = this.editorOptions;
2666
+ if (typeof this.editorOptions == "string") {
2667
+ opt = JSON.parse(this.editorOptions);
2668
+ }
2669
+ let newOptions = $.extend({}, DefaultEditorOptions, opt);
2670
+ const key = AppCoreSettings.froalaEditorKey;
2671
+ if (key) {
2672
+ newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
2673
+ }
2674
+ if (newOptions.events && newOptions.events.initialized) {
2675
+ newOptions.events.initialized.overridden = false;
2676
+ }
2677
+ this.options = newOptions;
2678
+ }
2679
+ ngAfterViewInit() {
2680
+ const that = this;
2681
+ setTimeout(function () {
2682
+ that.froalaEditorInitialized = true;
2683
+ that.onInitialized();
2684
+ }, 300);
2685
+ }
2686
+ onInitialized() {
2687
+ let actions = this.afterInitializedActions;
2688
+ // Clear actions
2689
+ this.afterInitializedActions = [];
2690
+ if (actions) {
2691
+ for (let i = 0; i < actions.length; i++) {
2692
+ actions[i]();
2693
+ }
2694
+ }
2695
+ }
2696
+ getEditor() {
2697
+ if (this.froalaEditor)
2698
+ return this.froalaEditor.getEditor();
2699
+ return null;
2700
+ }
2701
+ // Public Funcs
2702
+ doAfterInitialized(action) {
2703
+ const that = this;
2704
+ if (!this.froalaEditorInitialized) {
2705
+ this.afterInitializedActions.push(() => {
2706
+ action(that);
2707
+ });
2708
+ }
2709
+ else {
2710
+ action(that);
2711
+ }
2712
+ }
2713
+ initializeControl(control) {
2714
+ this.froalaEditor = control;
2715
+ this.froalaEditor.initialize();
2716
+ }
2717
+ setUploadParams(uploadType, uploadParentId) {
2718
+ this.doAfterInitialized(function (that) {
2719
+ const editor = that.getEditor();
2720
+ if (typeof editor == "undefined" || editor == null) {
2721
+ return;
2722
+ }
2723
+ editor.opts.imageUploadParams.uploadType = uploadType;
2724
+ editor.opts.imageUploadParams.uploadParentId = uploadParentId;
2725
+ });
2726
+ }
2727
+ }
2728
+ BaseHtmlEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseHtmlEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2729
+ BaseHtmlEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BaseHtmlEditorComponent, selector: "ng-component", inputs: { editorLabelText: "editorLabelText", editorOptions: "editorOptions" }, usesInheritance: true, ngImport: i0, template: "", isInline: true });
2730
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BaseHtmlEditorComponent, decorators: [{
2731
+ type: Component,
2732
+ args: [{
2733
+ template: "",
2734
+ }]
2735
+ }], ctorParameters: function () { return []; }, propDecorators: { editorLabelText: [{
2736
+ type: Input
2737
+ }], editorOptions: [{
2738
+ type: Input
2739
+ }] } });
2740
+
2741
+ /*
2742
+ <file>
2743
+ Project:
2744
+ @osovitny/anatoly
2745
+
2746
+ Authors:
2747
+ Vadim Osovitny
2748
+ Anatoly Osovitny
2749
+
2750
+ Created:
2751
+ 28 Jun 2020
2752
+
2753
+ Version:
2754
+ 1.0
2755
+
2756
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2757
+ </file>
2758
+ */
2759
+ class NativeElementDirective {
2760
+ constructor(el, control) {
2761
+ this.el = el;
2762
+ this.control = control;
2763
+ }
2764
+ ngOnInit() {
2765
+ // sets the localization key to the control
2766
+ this.control.control.nativeElement = this.el.nativeElement;
2767
+ }
2768
+ }
2769
+ NativeElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NativeElementDirective, deps: [{ token: i0.ElementRef }, { token: i2.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
2770
+ NativeElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.5", type: NativeElementDirective, selector: "[formControl], [formControlName]", ngImport: i0 });
2771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NativeElementDirective, decorators: [{
2772
+ type: Directive,
2773
+ args: [{
2774
+ selector: '[formControl], [formControlName]'
2775
+ }]
2776
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.NgControl }]; } });
2777
+
2778
+ /*
2779
+ <file>
2780
+ Project:
2781
+ @osovitny/anatoly
2782
+
2783
+ Authors:
2784
+ Vadim Osovitny
2785
+ Anatoly Osovitny
2786
+
2787
+ Created:
2788
+ 8 Dec 2017
2789
+
2790
+ Version:
2791
+ 1.0
2792
+
2793
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2794
+ </file>
2795
+ */
2796
+ class ValidationSummaryComponent extends BaseEditComponent {
2797
+ constructor() {
2798
+ super();
2799
+ }
2800
+ getFormValidationMessages() {
2801
+ let messages = [];
2802
+ Object.keys(this.formGroup.controls).forEach((k) => {
2803
+ var control = this.formGroup.controls[k];
2804
+ if (control.controls != null) {
2805
+ Object.keys(control.controls).forEach((k) => {
2806
+ var child = control.controls[k];
2807
+ this.getValidationMessages(child, this.getControlName(child, k)).forEach((m) => messages.push(m));
2808
+ });
2809
+ }
2810
+ else {
2811
+ this.getValidationMessages(control, this.getControlName(control, k)).forEach((m) => messages.push(m));
2812
+ }
2813
+ });
2814
+ return messages;
2815
+ }
2816
+ getValidationMessages(state, thingName) {
2817
+ let thing = state.path || thingName;
2818
+ let messages = [];
2819
+ if (state.errors) {
2820
+ for (let errorName in state.errors) {
2821
+ if (state.errors.hasOwnProperty(errorName)) {
2822
+ switch (errorName) {
2823
+ case "required":
2824
+ messages.push(`${thing} is required`);
2825
+ break;
2826
+ case "minlength":
2827
+ messages.push(`${thing} must be at least ${state.errors["minlength"].requiredLength} characters`);
2828
+ break;
2829
+ case "pattern":
2830
+ messages.push(`${thing} contains illegal characters`);
2831
+ break;
2832
+ case "format":
2833
+ messages.push(`${thing} format mismatch`);
2834
+ break;
2835
+ case "maxlength":
2836
+ messages.push(`${thing} must have maximum ${state.errors["maxlength"].requiredLength} characters`);
2837
+ break;
2838
+ case "specialcharacters":
2839
+ messages.push(`${thing} contains special characters`);
2840
+ break;
2841
+ }
2842
+ }
2843
+ }
2844
+ }
2845
+ return messages;
2846
+ }
2847
+ /**
2848
+ * Get Control Name
2849
+ * @param control
2850
+ * @param thingName
2851
+ */
2852
+ getControlName(control, thingName) {
2853
+ let value = this.getControlTitle(control);
2854
+ return value ? value : thingName;
2855
+ }
2856
+ /**
2857
+ * Retrieve tilte of control
2858
+ * @param control
2859
+ */
2860
+ getControlTitle(control) {
2861
+ if (control?.nativeElement) {
2862
+ let controlTitle = this.getTitleAttribute(control.nativeElement);
2863
+ if (controlTitle) {
2864
+ return controlTitle;
2865
+ }
2866
+ }
2867
+ return undefined;
2868
+ }
2869
+ /**
2870
+ * Return title attribute of form control
2871
+ */
2872
+ getTitleAttribute(nativeElement) {
2873
+ let title;
2874
+ switch (nativeElement.tagName) {
2875
+ // For Kendo time and date picker element title is assigned to the 4th child control.
2876
+ case "KENDO-TIMEPICKER":
2877
+ case "KENDO-DATEPICKER":
2878
+ title =
2879
+ nativeElement.children[0]?.children[0]?.children[0]?.children[0]?.getAttribute("title");
2880
+ break;
2881
+ // For Kendo numaric element title is assigned to the 2nd child control.
2882
+ case "KENDO-NUMERICTEXTBOX":
2883
+ title = nativeElement.children[0]?.children[0]?.getAttribute("title");
2884
+ break;
2885
+ default:
2886
+ title = nativeElement.getAttribute("title");
2887
+ break;
2888
+ }
2889
+ return title;
2890
+ }
2891
+ }
2892
+ ValidationSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ValidationSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2893
+ ValidationSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ValidationSummaryComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "", isInline: true });
2894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ValidationSummaryComponent, decorators: [{
2895
+ type: Component,
2896
+ args: [{
2897
+ template: "",
2898
+ }]
2899
+ }], ctorParameters: function () { return []; } });
2900
+
2901
+ /*
2902
+ <file>
2903
+ Project:
2904
+ @osovitny/anatoly
2905
+
2906
+ Authors:
2907
+ Vadim Osovitny
2908
+ Anatoly Osovitny
2909
+
2910
+ Created:
2911
+ 6 Dec 2017
2912
+
2913
+ Version:
2914
+ 1.0
2915
+
2916
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2917
+ </file>
2918
+ */
2919
+ class ItemValidationSummaryComponent extends ValidationSummaryComponent {
2920
+ constructor() {
2921
+ super();
2922
+ }
2923
+ }
2924
+ ItemValidationSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemValidationSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2925
+ ItemValidationSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ItemValidationSummaryComponent, selector: "anatoly-item-validation-summary", inputs: { controlName: "controlName", controlTitle: "controlTitle" }, usesInheritance: true, ngImport: i0, template: "<ul class=\"list-unstyled\" *ngIf=\"isControlInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(controlName), controlTitle)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n", dependencies: [{ kind: "directive", type: i1$5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ItemValidationSummaryComponent, decorators: [{
2927
+ type: Component,
2928
+ args: [{ selector: "anatoly-item-validation-summary", template: "<ul class=\"list-unstyled\" *ngIf=\"isControlInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(controlName), controlTitle)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n" }]
2929
+ }], ctorParameters: function () { return []; }, propDecorators: { controlName: [{
2930
+ type: Input
2931
+ }], controlTitle: [{
2932
+ type: Input
2933
+ }] } });
2934
+
2935
+ /*
2936
+ <file>
2937
+ Project:
2938
+ @osovitny/anatoly
2939
+
2940
+ Authors:
2941
+ Vadim Osovitny
2942
+ Anatoly Osovitny
2943
+
2944
+ Created:
2945
+ 12 Dec 2017
2946
+
2947
+ Version:
2948
+ 1.0
2949
+
2950
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2951
+ </file>
2952
+ */
2953
+ class FormsHtmlEditorComponent extends BaseHtmlEditorComponent {
2954
+ constructor() {
2955
+ super();
2956
+ this.editorFormKey = "html";
2957
+ }
2958
+ setFormValueAfterInitialized(name, value) {
2959
+ this.doAfterInitialized(function (that) {
2960
+ that.setFormValue(name, value);
2961
+ });
2962
+ }
2963
+ }
2964
+ FormsHtmlEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FormsHtmlEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2965
+ FormsHtmlEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FormsHtmlEditorComponent, selector: "anatoly-forms-html-editor", inputs: { editorFormKey: "editorFormKey" }, usesInheritance: true, ngImport: i0, template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isControlInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n [formSubmitted]=\"formSubmitted\"\r\n [controlName]=\"editorFormKey\"\r\n [controlTitle]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$6.FroalaEditorDirective, selector: "[froalaEditor]", inputs: ["froalaEditor", "froalaModel"], outputs: ["froalaModelChange", "froalaInit"], exportAs: ["froalaEditor"] }, { kind: "directive", type: NativeElementDirective, selector: "[formControl], [formControlName]" }, { kind: "component", type: ItemValidationSummaryComponent, selector: "anatoly-item-validation-summary", inputs: ["controlName", "controlTitle"] }] });
2966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FormsHtmlEditorComponent, decorators: [{
2967
+ type: Component,
2968
+ args: [{ selector: "anatoly-forms-html-editor", template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isControlInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n [formSubmitted]=\"formSubmitted\"\r\n [controlName]=\"editorFormKey\"\r\n [controlTitle]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n" }]
2969
+ }], ctorParameters: function () { return []; }, propDecorators: { editorFormKey: [{
2970
+ type: Input
2971
+ }] } });
2972
+
2973
+ /*
2974
+ <file>
2975
+ Project:
2976
+ @osovitny/anatoly
2977
+
2978
+ Authors:
2979
+ Vadim Osovitny
2980
+ Anatoly Osovitny
2981
+
2982
+ Created:
2983
+ 12 Dec 2017
2984
+
2985
+ Version:
2986
+ 1.0
2987
+
2988
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
2989
+ </file>
2990
+ */
2991
+ class HtmlEditorComponent extends BaseHtmlEditorComponent {
2992
+ constructor() {
2993
+ super();
2994
+ }
2995
+ setHtml(content) {
2996
+ this.doAfterInitialized(function (that) {
2997
+ var editor = that.getEditor();
2998
+ if (typeof editor == "undefined" || editor == null) {
2999
+ return;
3000
+ }
3001
+ editor.html.set(content);
3002
+ });
3003
+ }
3004
+ getHtml() {
3005
+ var editor = this.getEditor();
3006
+ if (typeof editor == "undefined" || editor == null) {
3007
+ return;
3008
+ }
3009
+ return editor.html.get(false);
3010
+ }
3011
+ }
3012
+ HtmlEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: HtmlEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3013
+ HtmlEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: HtmlEditorComponent, selector: "anatoly-html-editor", usesInheritance: true, ngImport: i0, template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>", dependencies: [{ kind: "directive", type: i1$6.FroalaEditorDirective, selector: "[froalaEditor]", inputs: ["froalaEditor", "froalaModel"], outputs: ["froalaModelChange", "froalaInit"], exportAs: ["froalaEditor"] }] });
3014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: HtmlEditorComponent, decorators: [{
3015
+ type: Component,
3016
+ args: [{ selector: "anatoly-html-editor", template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>" }]
3017
+ }], ctorParameters: function () { return []; } });
3018
+
3019
+ /*
3020
+ <file>
3021
+ Project:
3022
+ @osovitny/anatoly
3023
+
3024
+ Authors:
3025
+ Vadim Osovitny
3026
+ Anatoly Osovitny
3027
+
3028
+ Created:
3029
+ 4 Jul 2018
3030
+
3031
+ Version:
3032
+ 1.0
3033
+
3034
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3035
+ </file>
3036
+ */
3037
+ class SignInButtonComponent {
3038
+ constructor() { }
3039
+ }
3040
+ SignInButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SignInButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3041
+ SignInButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: SignInButtonComponent, selector: "anatoly-signin-button", inputs: { classbtn: "classbtn" }, ngImport: i0, template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n" });
3042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SignInButtonComponent, decorators: [{
3043
+ type: Component,
3044
+ args: [{ selector: "anatoly-signin-button", template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n" }]
3045
+ }], ctorParameters: function () { return []; }, propDecorators: { classbtn: [{
3046
+ type: Input
3047
+ }] } });
3048
+
3049
+ /*
3050
+ <file>
3051
+ Project:
3052
+ @osovitny/anatoly
3053
+
3054
+ Authors:
3055
+ Vadim Osovitny
3056
+ Anatoly Osovitny
3057
+
3058
+ Created:
3059
+ 4 Jul 2018
3060
+
3061
+ Version:
3062
+ 1.0
3063
+
3064
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3065
+ </file>
3066
+ */
3067
+ class SignOutButtonComponent {
3068
+ constructor() { }
3069
+ }
3070
+ SignOutButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SignOutButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3071
+ SignOutButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: SignOutButtonComponent, selector: "anatoly-signout-button", inputs: { classbtn: "classbtn" }, ngImport: i0, template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n" });
3072
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SignOutButtonComponent, decorators: [{
3073
+ type: Component,
3074
+ args: [{ selector: "anatoly-signout-button", template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n" }]
3075
+ }], ctorParameters: function () { return []; }, propDecorators: { classbtn: [{
3076
+ type: Input
3077
+ }] } });
3078
+
3079
+ /*
3080
+ <file>
3081
+ Project:
3082
+ @osovitny/anatoly
3083
+
3084
+ Authors:
3085
+ Vadim Osovitny
3086
+ Anatoly Osovitny
3087
+
3088
+ Created:
3089
+ 9 May 2020
3090
+
3091
+ Version:
3092
+ 1.0
3093
+
3094
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3095
+ </file>
3096
+ */
3097
+ class LoadingComponent {
3098
+ constructor(loadingService) {
3099
+ this.loadingService = loadingService;
3100
+ // Private
3101
+ this.subs = new Subs();
3102
+ // Public
3103
+ this.show = false;
3104
+ }
3105
+ ngOnInit() {
3106
+ this.subs.sink = this.loadingService.subscribe((state) => {
3107
+ this.show = state;
3108
+ });
3109
+ }
3110
+ ngOnDestroy() {
3111
+ this.subs.unsubscribe();
3112
+ }
3113
+ }
3114
+ LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoadingComponent, deps: [{ token: LoadingService }], target: i0.ɵɵFactoryTarget.Component });
3115
+ LoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: LoadingComponent, selector: "anatoly-loading", ngImport: i0, template: "<div *ngIf=\"show\">\r\n <span id=\"pnlLoading\" class=\"k-icon k-i-loading\"></span>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: LoadingComponent, decorators: [{
3117
+ type: Component,
3118
+ args: [{ selector: 'anatoly-loading', template: "<div *ngIf=\"show\">\r\n <span id=\"pnlLoading\" class=\"k-icon k-i-loading\"></span>\r\n</div>\r\n" }]
3119
+ }], ctorParameters: function () { return [{ type: LoadingService }]; } });
3120
+
3121
+ /*
3122
+ <file>
3123
+ Project:
3124
+ @osovitny/anatoly
3125
+
3126
+ Authors:
3127
+ Vadim Osovitny
3128
+ Anatoly Osovitny
3129
+
3130
+ Created:
3131
+ 16 May 2020
3132
+
3133
+ Version:
3134
+ 1.0
3135
+
3136
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3137
+ </file>
3138
+ */
3139
+ const SpinnerSpinKit = {
3140
+ spinnerLine: 'spinner-line-material',
3141
+ // ToDo
3142
+ ChasingDots: 'spinner-chasing-dots',
3143
+ CubeGrid: 'spinner-cube-grid',
3144
+ DoubleBounce: 'spinner-double-bounce',
3145
+ RotatingPlane: 'spinner-rotationg-plane',
3146
+ SpinnerPulse: 'spinner-spinner-pulse',
3147
+ ThreeBounce: 'spinner-three-bounce',
3148
+ WanderingCubes: 'spinner-wandering-cubes',
3149
+ Wave: 'spinner-wave'
3150
+ };
3151
+ class SpinnerComponent {
3152
+ constructor(router, document) {
3153
+ this.router = router;
3154
+ this.document = document;
3155
+ this.isSpinnerVisible = true;
3156
+ this.spinnerSpinKit = SpinnerSpinKit;
3157
+ this.backgroundColor = '#007CB0';
3158
+ this.spinner = SpinnerSpinKit.spinnerLine;
3159
+ this.router.events.subscribe(event => {
3160
+ if (event instanceof NavigationStart) {
3161
+ this.isSpinnerVisible = true;
3162
+ }
3163
+ else if (event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError) {
3164
+ this.isSpinnerVisible = false;
3165
+ }
3166
+ }, () => {
3167
+ this.isSpinnerVisible = false;
3168
+ });
3169
+ }
3170
+ ngOnDestroy() {
3171
+ this.isSpinnerVisible = false;
3172
+ }
3173
+ }
3174
+ SpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SpinnerComponent, deps: [{ token: i1.Router }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
3175
+ SpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: SpinnerComponent, selector: "spinner", inputs: { backgroundColor: "backgroundColor", spinner: "spinner" }, ngImport: i0, template: "<div id=\"spinner-loader\" *ngIf=\"isSpinnerVisible\">\r\n <div class=\"loader-bg\">\r\n <div class=\"spinner-line-material\" [class.colored]=\"!backgroundColor\" *ngIf=\"spinner === spinnerSpinKit.spinnerLine\">\r\n <div class=\"spinner-child spinner-bounce1\" [style.background-color]='backgroundColor'></div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
3176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SpinnerComponent, decorators: [{
3177
+ type: Component,
3178
+ args: [{ selector: 'spinner', encapsulation: ViewEncapsulation.None, template: "<div id=\"spinner-loader\" *ngIf=\"isSpinnerVisible\">\r\n <div class=\"loader-bg\">\r\n <div class=\"spinner-line-material\" [class.colored]=\"!backgroundColor\" *ngIf=\"spinner === spinnerSpinKit.spinnerLine\">\r\n <div class=\"spinner-child spinner-bounce1\" [style.background-color]='backgroundColor'></div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
3179
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: Document, decorators: [{
3180
+ type: Inject,
3181
+ args: [DOCUMENT]
3182
+ }] }]; }, propDecorators: { backgroundColor: [{
3183
+ type: Input
3184
+ }], spinner: [{
3185
+ type: Input
3186
+ }] } });
3187
+
3188
+ /*
3189
+ <file>
3190
+ Project:
3191
+ @osovitny/anatoly
3192
+
3193
+ Authors:
3194
+ Vadim Osovitny
3195
+ Anatoly Osovitny
3196
+
3197
+ Created:
3198
+ 26 Jun 2020
3199
+
3200
+ Version:
3201
+ 1.0
3202
+
3203
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3204
+ </file>
3205
+ */
3206
+ class ReplaceTextPipe {
3207
+ transform(inputData, search, replacement) {
3208
+ if (inputData) {
3209
+ return inputData.replace(new RegExp(search, "g"), replacement);
3210
+ }
3211
+ else {
3212
+ return inputData;
3213
+ }
3214
+ }
3215
+ }
3216
+ ReplaceTextPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ReplaceTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
3217
+ ReplaceTextPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: ReplaceTextPipe, name: "replaceText" });
3218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ReplaceTextPipe, decorators: [{
3219
+ type: Pipe,
3220
+ args: [{
3221
+ name: "replaceText",
3222
+ }]
3223
+ }] });
3224
+
3225
+ /*
3226
+ <file>
3227
+ Project:
3228
+ @osovitny/anatoly
3229
+
3230
+ Authors:
3231
+ Vadim Osovitny
3232
+ Anatoly Osovitny
3233
+
3234
+ Created:
3235
+ 26 Jun 2020
3236
+
3237
+ Version:
3238
+ 1.0
3239
+
3240
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3241
+ </file>
3242
+ */
3243
+ class FileSizePipe {
3244
+ constructor() {
3245
+ this.units = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];
3246
+ }
3247
+ transform(bytes = 0, precision = 0) {
3248
+ if (isNaN(parseFloat(String(bytes))) || !isFinite(bytes))
3249
+ return '';
3250
+ let unit = 0;
3251
+ while (bytes >= 1024) {
3252
+ bytes /= 1024;
3253
+ unit++;
3254
+ }
3255
+ return bytes.toFixed(+precision) + ' ' + this.units[unit];
3256
+ }
3257
+ }
3258
+ FileSizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
3259
+ FileSizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: FileSizePipe, name: "filesize" });
3260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FileSizePipe, decorators: [{
3261
+ type: Pipe,
3262
+ args: [{
3263
+ name: 'filesize',
3264
+ }]
3265
+ }] });
3266
+
3267
+ /*
3268
+ <file>
3269
+ Project:
3270
+ @osovitny/anatoly
3271
+
3272
+ Authors:
3273
+ Vadim Osovitny
3274
+ Anatoly Osovitny
3275
+
3276
+ Created:
3277
+ 27 Oct 2019
3278
+
3279
+ Version:
3280
+ 1.0
3281
+
3282
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3283
+ </file>
3284
+ */
3285
+ class SafeHtmlPipe {
3286
+ constructor(sanitized) {
3287
+ this.sanitized = sanitized;
3288
+ }
3289
+ transform(value) {
3290
+ return this.sanitized.bypassSecurityTrustHtml(value);
3291
+ }
3292
+ }
3293
+ SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
3294
+ SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
3295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, decorators: [{
3296
+ type: Pipe,
3297
+ args: [{ name: 'safeHtml' }]
3298
+ }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
3299
+
3300
+ /*
3301
+ <file>
3302
+ Project:
3303
+ @osovitny/anatoly
3304
+
3305
+ Authors:
3306
+ Vadim Osovitny
3307
+ Anatoly Osovitny
3308
+
3309
+ Created:
3310
+ 7 Dec 2017
3311
+
3312
+ Version:
3313
+ 1.0
3314
+
3315
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3316
+ </file>
3317
+ */
3318
+ class FormValidationSummaryComponent extends ValidationSummaryComponent {
3319
+ constructor() {
3320
+ super();
3321
+ this.visible = false;
3322
+ this.customerrors = [];
3323
+ /*
3324
+ 0 - only FormValidation messages
3325
+ 1 - only Custom messages
3326
+ 2 - all
3327
+ */
3328
+ this.viewtype = 0;
3329
+ }
3330
+ getErrors() {
3331
+ if (this.viewtype == 1) {
3332
+ return this.customerrors;
3333
+ }
3334
+ let formValidationMessages = this.getFormValidationMessages();
3335
+ if (this.viewtype == 0) {
3336
+ return formValidationMessages;
3337
+ }
3338
+ var messages = [];
3339
+ if (formValidationMessages.length > 0) {
3340
+ messages.push(...formValidationMessages);
3341
+ }
3342
+ if (this.customerrors.length > 0) {
3343
+ messages.push(...this.customerrors);
3344
+ }
3345
+ return messages;
3346
+ }
3347
+ }
3348
+ FormValidationSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FormValidationSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3349
+ FormValidationSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: FormValidationSummaryComponent, selector: "anatoly-form-validation-summary", inputs: { visible: "visible", customerrors: "customerrors", viewtype: "viewtype" }, usesInheritance: true, ngImport: i0, template: "<div class=\"callout callout-danger\" *ngIf=\"visible\">\r\n <h6 class=\"box-title\">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor=\"let error of getErrors()\"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n", dependencies: [{ kind: "directive", type: i1$5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: FormValidationSummaryComponent, decorators: [{
3351
+ type: Component,
3352
+ args: [{ selector: "anatoly-form-validation-summary", template: "<div class=\"callout callout-danger\" *ngIf=\"visible\">\r\n <h6 class=\"box-title\">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor=\"let error of getErrors()\"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n" }]
3353
+ }], ctorParameters: function () { return []; }, propDecorators: { visible: [{
3354
+ type: Input
3355
+ }], customerrors: [{
3356
+ type: Input
3357
+ }], viewtype: [{
3358
+ type: Input
3359
+ }] } });
3360
+
3361
+ /*
3362
+ <file>
3363
+ Project:
3364
+ @osovitny/anatoly
3365
+
3366
+ Authors:
3367
+ Vadim Osovitny
3368
+ Anatoly Osovitny
3369
+
3370
+ Created:
3371
+ 26 Jun 2020
3372
+
3373
+ Version:
3374
+ 1.0
3375
+
3376
+ Copyright (c) 2016-2021 Osovitny Inc. All rights reserved.
3377
+ </file>
3378
+ */
3379
+ const FroalaEditorModuleWithProviders = FroalaEditorModule.forRoot();
3380
+ const FroalaViewModuleWithProviders = FroalaViewModule.forRoot();
3381
+ class AnatolyUIModule {
3382
+ }
3383
+ AnatolyUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3384
+ AnatolyUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: AnatolyUIModule, declarations: [SubscribePlanButtonComponent,
3385
+ UpgradePlanButtonComponent,
3386
+ BuyAccessButtonComponent,
3387
+ SignInButtonComponent,
3388
+ SignUpButtonComponent,
3389
+ SignOutButtonComponent,
3390
+ ContentHeaderComponent,
3391
+ SpinnerComponent,
3392
+ LoadingComponent,
3393
+ NativeElementDirective,
3394
+ //Editor
3395
+ HtmlEditorComponent,
3396
+ FormsHtmlEditorComponent,
3397
+ //Validation
3398
+ FormValidationSummaryComponent,
3399
+ ItemValidationSummaryComponent,
3400
+ //Pipe
3401
+ SafeHtmlPipe,
3402
+ ReplaceTextPipe,
3403
+ FileSizePipe], imports: [CommonModule,
3404
+ ReactiveFormsModule,
3405
+ FormsModule, i1$6.FroalaEditorModule, i1$6.FroalaViewModule], exports: [SubscribePlanButtonComponent,
3406
+ UpgradePlanButtonComponent,
3407
+ BuyAccessButtonComponent,
3408
+ SignInButtonComponent,
3409
+ SignUpButtonComponent,
3410
+ SignOutButtonComponent,
3411
+ ContentHeaderComponent,
3412
+ SpinnerComponent,
3413
+ LoadingComponent,
3414
+ NativeElementDirective,
3415
+ //Editor
3416
+ HtmlEditorComponent,
3417
+ FormsHtmlEditorComponent,
3418
+ //Validation
3419
+ FormValidationSummaryComponent,
3420
+ ItemValidationSummaryComponent,
3421
+ //Pipe
3422
+ SafeHtmlPipe,
3423
+ ReplaceTextPipe,
3424
+ FileSizePipe] });
3425
+ AnatolyUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyUIModule, imports: [CommonModule,
3426
+ ReactiveFormsModule,
3427
+ FormsModule,
3428
+ FroalaEditorModuleWithProviders,
3429
+ FroalaViewModuleWithProviders] });
3430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: AnatolyUIModule, decorators: [{
3431
+ type: NgModule,
3432
+ args: [{
3433
+ imports: [
3434
+ CommonModule,
3435
+ ReactiveFormsModule,
3436
+ FormsModule,
3437
+ FroalaEditorModuleWithProviders,
3438
+ FroalaViewModuleWithProviders,
3439
+ ],
3440
+ exports: [
3441
+ SubscribePlanButtonComponent,
3442
+ UpgradePlanButtonComponent,
3443
+ BuyAccessButtonComponent,
3444
+ SignInButtonComponent,
3445
+ SignUpButtonComponent,
3446
+ SignOutButtonComponent,
3447
+ ContentHeaderComponent,
3448
+ SpinnerComponent,
3449
+ LoadingComponent,
3450
+ NativeElementDirective,
3451
+ //Editor
3452
+ HtmlEditorComponent,
3453
+ FormsHtmlEditorComponent,
3454
+ //Validation
3455
+ FormValidationSummaryComponent,
3456
+ ItemValidationSummaryComponent,
3457
+ //Pipe
3458
+ SafeHtmlPipe,
3459
+ ReplaceTextPipe,
3460
+ FileSizePipe,
3461
+ ],
3462
+ declarations: [
3463
+ SubscribePlanButtonComponent,
3464
+ UpgradePlanButtonComponent,
3465
+ BuyAccessButtonComponent,
3466
+ SignInButtonComponent,
3467
+ SignUpButtonComponent,
3468
+ SignOutButtonComponent,
3469
+ ContentHeaderComponent,
3470
+ SpinnerComponent,
3471
+ LoadingComponent,
3472
+ NativeElementDirective,
3473
+ //Editor
3474
+ HtmlEditorComponent,
3475
+ FormsHtmlEditorComponent,
3476
+ //Validation
3477
+ FormValidationSummaryComponent,
3478
+ ItemValidationSummaryComponent,
3479
+ //Pipe
3480
+ SafeHtmlPipe,
3481
+ ReplaceTextPipe,
3482
+ FileSizePipe,
3483
+ ]
3484
+ }]
3485
+ }] });
3486
+
3487
+ /*
3488
+ * Public API Surface of anatoly-lib
3489
+ */
3490
+
3491
+ /**
3492
+ * Generated bundle index. Do not edit.
3493
+ */
3494
+
3495
+ export { Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyUIModule, AppContextService, AppCoreSettings, BaseApiService, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BaseHtmlEditorComponent, BillingApiService, BuyAccessButtonComponent, ContentHeaderComponent, ContextInitState, Convert, DefaultEditorOptions, DigitalMarketingService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, FroalaEditorModuleWithProviders, FroalaViewModuleWithProviders, GlobalErrorHandler, GoogleAnalyticsService, Guid, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NotificationService, NotificationsApiService, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, SpinnerComponent, Subs, SubscribePlanButtonComponent, TranslateModuleAtRoot, UpgradePlanButtonComponent, Urls, Utils, ValidationSummaryComponent, customTranslateLoaderFactory, localizationInitializerFactory, throwIfAlreadyLoaded };
3496
+ //# sourceMappingURL=osovitny-anatoly.mjs.map