@osovitny/anatoly 1.2.4 → 1.2.5

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 (122) hide show
  1. package/bundles/osovitny-anatoly.umd.js +911 -769
  2. package/bundles/osovitny-anatoly.umd.js.map +1 -1
  3. package/bundles/osovitny-anatoly.umd.min.js +3 -2
  4. package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
  5. package/esm2015/lib/billing/billing.module.js +3 -3
  6. package/esm2015/lib/billing/components/buyaccess/buyaccess-button.component.js +7 -6
  7. package/esm2015/lib/billing/components/subscriptions/subscribe-plan-button.component.js +2 -2
  8. package/esm2015/lib/billing/components/subscriptions/upgrade-plan-button.component.js +8 -7
  9. package/esm2015/lib/billing/index.js +1 -3
  10. package/esm2015/lib/core/alerts.js +96 -0
  11. package/esm2015/lib/core/components/base-edit.component.js +67 -0
  12. package/esm2015/lib/core/components/base.component.js +39 -0
  13. package/esm2015/lib/core/components/content-header/content-header.component.js +35 -0
  14. package/esm2015/lib/core/components/html-editor/base-html-editor.component.js +86 -0
  15. package/esm2015/lib/{ui → core}/components/html-editor/forms-html-editor.component.js +2 -2
  16. package/esm2015/lib/core/components/html-editor/html-editor.component.js +49 -0
  17. package/esm2015/lib/core/components/html-editor/html-editor.defaultoptions.js +38 -0
  18. package/esm2015/lib/core/components/validation/form-validation-summary.component.js +39 -0
  19. package/esm2015/lib/core/components/validation/item-validation-summary.component.js +37 -0
  20. package/esm2015/lib/core/components/validation/validation-summary.component.js +60 -0
  21. package/esm2015/lib/core/core.module.js +42 -6
  22. package/esm2015/lib/core/index.js +12 -5
  23. package/esm2015/lib/core/services/appcontext.service.js +6 -6
  24. package/esm2015/lib/core/services/base-go.service.js +2 -2
  25. package/esm2015/lib/core/utils.js +25 -0
  26. package/esm2015/lib/data/consts.js +21 -0
  27. package/esm2015/lib/data/data.module.js +41 -0
  28. package/esm2015/lib/data/index.js +9 -0
  29. package/esm2015/lib/data/services/base-api.service.js +71 -0
  30. package/esm2015/lib/data/services/base-billing-api.service.js +52 -0
  31. package/esm2015/lib/data/services/base-gridedit.service.js +98 -0
  32. package/esm2015/public-api.js +2 -2
  33. package/esm5/lib/billing/billing.module.js +3 -3
  34. package/esm5/lib/billing/components/buyaccess/buyaccess-button.component.js +6 -5
  35. package/esm5/lib/billing/components/subscriptions/subscribe-plan-button.component.js +2 -2
  36. package/esm5/lib/billing/components/subscriptions/upgrade-plan-button.component.js +6 -5
  37. package/esm5/lib/billing/index.js +1 -3
  38. package/esm5/lib/core/alerts.js +100 -0
  39. package/esm5/lib/core/components/base-edit.component.js +71 -0
  40. package/esm5/lib/core/components/base.component.js +41 -0
  41. package/esm5/lib/core/components/content-header/content-header.component.js +38 -0
  42. package/esm5/lib/core/components/html-editor/base-html-editor.component.js +90 -0
  43. package/esm5/lib/{ui → core}/components/html-editor/forms-html-editor.component.js +2 -2
  44. package/esm5/lib/core/components/html-editor/html-editor.component.js +51 -0
  45. package/esm5/lib/core/components/html-editor/html-editor.defaultoptions.js +38 -0
  46. package/esm5/lib/core/components/validation/form-validation-summary.component.js +42 -0
  47. package/esm5/lib/core/components/validation/item-validation-summary.component.js +39 -0
  48. package/esm5/lib/core/components/validation/validation-summary.component.js +65 -0
  49. package/esm5/lib/core/core.module.js +42 -6
  50. package/esm5/lib/core/index.js +12 -5
  51. package/esm5/lib/core/services/appcontext.service.js +6 -6
  52. package/esm5/lib/core/services/base-go.service.js +2 -2
  53. package/esm5/lib/core/utils.js +29 -0
  54. package/esm5/lib/data/consts.js +25 -0
  55. package/esm5/lib/data/data.module.js +44 -0
  56. package/esm5/lib/data/index.js +9 -0
  57. package/esm5/lib/{core → data}/services/base-api.service.js +5 -5
  58. package/esm5/lib/data/services/base-billing-api.service.js +55 -0
  59. package/esm5/lib/data/services/base-gridedit.service.js +104 -0
  60. package/esm5/public-api.js +2 -2
  61. package/fesm2015/osovitny-anatoly.js +848 -717
  62. package/fesm2015/osovitny-anatoly.js.map +1 -1
  63. package/fesm5/osovitny-anatoly.js +910 -770
  64. package/fesm5/osovitny-anatoly.js.map +1 -1
  65. package/lib/billing/components/buyaccess/buyaccess-button.component.d.ts +1 -1
  66. package/lib/billing/components/subscriptions/upgrade-plan-button.component.d.ts +1 -1
  67. package/lib/billing/index.d.ts +0 -1
  68. package/lib/core/alerts.d.ts +10 -0
  69. package/lib/{ui → core}/components/base-edit.component.d.ts +1 -1
  70. package/lib/{ui → core}/components/base.component.d.ts +1 -1
  71. package/lib/core/index.d.ts +8 -2
  72. package/lib/core/services/appcontext.service.d.ts +1 -2
  73. package/lib/core/utils.d.ts +4 -0
  74. package/lib/data/consts.d.ts +6 -0
  75. package/lib/data/data.module.d.ts +2 -0
  76. package/lib/data/index.d.ts +5 -0
  77. package/lib/{core → data}/services/base-api.service.d.ts +0 -1
  78. package/lib/{billing → data}/services/base-billing-api.service.d.ts +1 -1
  79. package/lib/{core → data}/services/base-gridedit.service.d.ts +0 -1
  80. package/osovitny-anatoly.metadata.json +1 -1
  81. package/package.json +1 -1
  82. package/public-api.d.ts +1 -1
  83. package/esm2015/lib/billing/services/base-billing-api.service.js +0 -53
  84. package/esm2015/lib/core/consts.js +0 -11
  85. package/esm2015/lib/core/services/base-api.service.js +0 -71
  86. package/esm2015/lib/core/services/base-gridedit.service.js +0 -98
  87. package/esm2015/lib/ui/components/base-edit.component.js +0 -66
  88. package/esm2015/lib/ui/components/base.component.js +0 -37
  89. package/esm2015/lib/ui/components/content-header/content-header.component.js +0 -35
  90. package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +0 -86
  91. package/esm2015/lib/ui/components/html-editor/html-editor.component.js +0 -49
  92. package/esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js +0 -38
  93. package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +0 -39
  94. package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +0 -37
  95. package/esm2015/lib/ui/components/validation/validation-summary.component.js +0 -60
  96. package/esm2015/lib/ui/index.js +0 -13
  97. package/esm2015/lib/ui/ui.module.js +0 -77
  98. package/esm5/lib/billing/services/base-billing-api.service.js +0 -56
  99. package/esm5/lib/core/consts.js +0 -11
  100. package/esm5/lib/core/services/base-gridedit.service.js +0 -104
  101. package/esm5/lib/ui/components/base-edit.component.js +0 -70
  102. package/esm5/lib/ui/components/base.component.js +0 -39
  103. package/esm5/lib/ui/components/content-header/content-header.component.js +0 -38
  104. package/esm5/lib/ui/components/html-editor/base-html-editor.component.js +0 -90
  105. package/esm5/lib/ui/components/html-editor/html-editor.component.js +0 -51
  106. package/esm5/lib/ui/components/html-editor/html-editor.defaultoptions.js +0 -38
  107. package/esm5/lib/ui/components/validation/form-validation-summary.component.js +0 -42
  108. package/esm5/lib/ui/components/validation/item-validation-summary.component.js +0 -39
  109. package/esm5/lib/ui/components/validation/validation-summary.component.js +0 -65
  110. package/esm5/lib/ui/index.js +0 -13
  111. package/esm5/lib/ui/ui.module.js +0 -80
  112. package/lib/core/consts.d.ts +0 -5
  113. package/lib/ui/index.d.ts +0 -9
  114. package/lib/ui/ui.module.d.ts +0 -2
  115. /package/lib/{ui → core}/components/content-header/content-header.component.d.ts +0 -0
  116. /package/lib/{ui → core}/components/html-editor/base-html-editor.component.d.ts +0 -0
  117. /package/lib/{ui → core}/components/html-editor/forms-html-editor.component.d.ts +0 -0
  118. /package/lib/{ui → core}/components/html-editor/html-editor.component.d.ts +0 -0
  119. /package/lib/{ui → core}/components/html-editor/html-editor.defaultoptions.d.ts +0 -0
  120. /package/lib/{ui → core}/components/validation/form-validation-summary.component.d.ts +0 -0
  121. /package/lib/{ui → core}/components/validation/item-validation-summary.component.d.ts +0 -0
  122. /package/lib/{ui → core}/components/validation/validation-summary.component.d.ts +0 -0
@@ -1,8 +1,10 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@angular/router'), require('@angular/common'), require('@angular/forms'), require('angular-froala-wysiwyg'), require('@progress/kendo-angular-grid'), require('@progress/kendo-angular-popup'), require('@progress/kendo-angular-buttons'), require('@progress/kendo-angular-dropdowns')) :
3
- typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', '@angular/router', '@angular/common', '@angular/forms', 'angular-froala-wysiwyg', '@progress/kendo-angular-grid', '@progress/kendo-angular-popup', '@progress/kendo-angular-buttons', '@progress/kendo-angular-dropdowns'], factory) :
4
- (global = global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.ng.router, global.ng.common, global.ng.forms, global.angularFroalaWysiwyg, global.kendoAngularGrid, global.kendoAngularPopup, global.kendoAngularButtons, global.kendoAngularDropdowns));
5
- }(this, (function (exports, core, http, operators, rxjs, router, common, forms, angularFroalaWysiwyg, kendoAngularGrid, kendoAngularPopup, kendoAngularButtons, kendoAngularDropdowns) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('sweetalert2'), require('@angular/common'), require('@angular/forms'), require('angular-froala-wysiwyg'), require('@progress/kendo-angular-grid'), require('@progress/kendo-angular-popup'), require('@progress/kendo-angular-buttons'), require('@progress/kendo-angular-dropdowns'), require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', 'sweetalert2', '@angular/common', '@angular/forms', 'angular-froala-wysiwyg', '@progress/kendo-angular-grid', '@progress/kendo-angular-popup', '@progress/kendo-angular-buttons', '@progress/kendo-angular-dropdowns', 'rxjs'], factory) :
4
+ (global = global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.ng.core, global.ng.router, global.ng.common.http, global.rxjs.operators, global.Swal, global.ng.common, global.ng.forms, global.angularFroalaWysiwyg, global.kendoAngularGrid, global.kendoAngularPopup, global.kendoAngularButtons, global.kendoAngularDropdowns, global.rxjs));
5
+ }(this, (function (exports, core, router, http, operators, Swal, common, forms, angularFroalaWysiwyg, kendoAngularGrid, kendoAngularPopup, kendoAngularButtons, kendoAngularDropdowns, rxjs) { 'use strict';
6
+
7
+ Swal = Swal && Swal.hasOwnProperty('default') ? Swal['default'] : Swal;
6
8
 
7
9
  /*! *****************************************************************************
8
10
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -201,16 +203,62 @@
201
203
  return (mod && mod.__esModule) ? mod : { default: mod };
202
204
  }
203
205
 
204
- var anatoly$1;
205
- (function (anatoly) {
206
- var consts;
207
- (function (consts) {
208
- consts.jsonUrl = "/dist/json/";
209
- consts.appUrl = "/";
210
- consts.apiUrl = "/api/";
211
- })(consts = anatoly.consts || (anatoly.consts = {}));
212
- })(anatoly$1 || (anatoly$1 = {}));
213
- window.anatoly = anatoly$1;
206
+ /*
207
+ <file>
208
+ Authors:
209
+ Vadim Osovitny
210
+
211
+ Created:
212
+ 17 Jun 2018
213
+
214
+ Version:
215
+ 1.0
216
+
217
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
218
+ </file>
219
+ */
220
+ var BaseGoService = /** @class */ (function () {
221
+ function BaseGoService(route, router) {
222
+ this.route = route;
223
+ this.router = router;
224
+ }
225
+ BaseGoService.prototype.locationReload = function () {
226
+ //this.router.navigate([this.route.url]);
227
+ window.location.reload();
228
+ };
229
+ BaseGoService.ctorParameters = function () { return [
230
+ { type: router.ActivatedRoute },
231
+ { type: router.Router }
232
+ ]; };
233
+ BaseGoService = __decorate([
234
+ core.Injectable()
235
+ ], BaseGoService);
236
+ return BaseGoService;
237
+ }());
238
+
239
+ /*
240
+ <file>
241
+ Authors:
242
+ Vadim Osovitny
243
+
244
+ Created:
245
+ 4 Mar 2020
246
+
247
+ Version:
248
+ 1.0
249
+
250
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
251
+ </file>
252
+ */
253
+ var Consts = /** @class */ (function () {
254
+ function Consts() {
255
+ }
256
+ Consts.JsonUrl = "/dist/jsons/";
257
+ Consts.JsonVersion = "v=1.0.0";
258
+ Consts.AppUrl = "/";
259
+ Consts.ApiUrl = "/api/";
260
+ return Consts;
261
+ }());
214
262
 
215
263
  /*
216
264
  <file>
@@ -223,13 +271,13 @@
223
271
  Version:
224
272
  1.0
225
273
 
226
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
274
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
227
275
  </file>
228
276
  */
229
277
  var BaseApiService = /** @class */ (function () {
230
278
  function BaseApiService(http) {
231
279
  this.http = http;
232
- this.baseUrl = anatoly.consts.apiUrl;
280
+ this.baseUrl = Consts.ApiUrl;
233
281
  }
234
282
  BaseApiService.prototype.serializeParams = function (data) {
235
283
  return data ? ('?' + $.param(data)) : '';
@@ -255,7 +303,7 @@
255
303
  if (!jsonVersion) {
256
304
  jsonVersion = "1.0";
257
305
  }
258
- var url = anatoly.consts.jsonUrl + fileName + '?' + jsonVersion;
306
+ var url = Consts.JsonUrl + fileName + '?' + jsonVersion;
259
307
  return this.http.get(url).pipe(operators.map(function (res) { return res; }));
260
308
  };
261
309
  BaseApiService.prototype.getNewGuid = function () {
@@ -278,136 +326,6 @@
278
326
  return BaseApiService;
279
327
  }());
280
328
 
281
- /*
282
- <file>
283
- Authors:
284
- Vadim Osovitny
285
-
286
- Created:
287
- 29 Apr 2018
288
-
289
- Version:
290
- 1.0
291
-
292
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
293
- </file>
294
- */
295
- var BaseGridEditService = /** @class */ (function (_super) {
296
- __extends(BaseGridEditService, _super);
297
- function BaseGridEditService(http) {
298
- var _this = _super.call(this, []) || this;
299
- _this.http = http;
300
- _this.data = [];
301
- _this.baseUrl = anatoly.consts.apiUrl;
302
- _this.baseReadUrl = _this.baseUrl + "getAll";
303
- return _this;
304
- }
305
- BaseGridEditService.prototype.serializeParams = function (data) {
306
- return data ? ('?' + $.param(data)) : '';
307
- };
308
- BaseGridEditService.prototype.reset = function () {
309
- this.data = [];
310
- };
311
- BaseGridEditService.prototype.resetItem = function (dataItem) {
312
- if (!dataItem) {
313
- return;
314
- }
315
- //find orignal data item
316
- var originalDataItem = this.data.find(function (item) { return item.Id === dataItem.Id; });
317
- //revert changes
318
- Object.assign(originalDataItem, dataItem);
319
- _super.prototype.next.call(this, this.data);
320
- };
321
- BaseGridEditService.prototype.read = function (params) {
322
- var _this = this;
323
- if (this.data.length) {
324
- return _super.prototype.next.call(this, this.data);
325
- }
326
- var url = this.baseReadUrl;
327
- if (typeof params === 'undefined') {
328
- params = this.savedReadParams;
329
- }
330
- if (typeof params !== 'undefined') {
331
- url = this.baseReadUrl + ("" + this.serializeParams(params));
332
- this.savedReadParams = params;
333
- }
334
- // this.http.get(url)
335
- // .map(res => <any[]>res)
336
- // .do(data => { this.data = data; }).subscribe(data => { super.next(data); });
337
- //}
338
- this.http.get(url).pipe(operators.map(function (res) { return res; })).subscribe(function (data) { _super.prototype.next.call(_this, data); });
339
- };
340
- BaseGridEditService.prototype.save = function (data, isNew, sucess) {
341
- var _this = this;
342
- var action = isNew ? 'add' : 'update';
343
- this.reset();
344
- this.post(action, data).subscribe(function () {
345
- }, function () {
346
- _this.read();
347
- }, function () {
348
- _this.read();
349
- if (sucess)
350
- sucess();
351
- });
352
- };
353
- BaseGridEditService.prototype.remove = function (data, sucess) {
354
- var _this = this;
355
- this.reset();
356
- this.post('remove', data).subscribe(function () {
357
- }, function () {
358
- _this.read();
359
- }, function () {
360
- _this.read();
361
- if (sucess)
362
- sucess();
363
- });
364
- };
365
- BaseGridEditService.prototype.post = function (action, data) {
366
- var url = this.baseUrl + ("" + action + this.serializeParams(data));
367
- return this.http.post(url, data).pipe(operators.map(function (res) { return res; }));
368
- };
369
- BaseGridEditService.ctorParameters = function () { return [
370
- { type: http.HttpClient }
371
- ]; };
372
- BaseGridEditService = __decorate([
373
- core.Injectable()
374
- ], BaseGridEditService);
375
- return BaseGridEditService;
376
- }(rxjs.BehaviorSubject));
377
-
378
- /*
379
- <file>
380
- Authors:
381
- Vadim Osovitny
382
-
383
- Created:
384
- 17 Jun 2018
385
-
386
- Version:
387
- 1.0
388
-
389
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
390
- </file>
391
- */
392
- var BaseGoService = /** @class */ (function () {
393
- function BaseGoService(route, router) {
394
- this.route = route;
395
- this.router = router;
396
- }
397
- BaseGoService.prototype.locationReload = function () {
398
- //this.router.navigate([this.route.url]);
399
- window.location.reload();
400
- };
401
- BaseGoService.ctorParameters = function () { return [
402
- { type: router.ActivatedRoute },
403
- { type: router.Router }
404
- ]; };
405
- BaseGoService = __decorate([
406
- core.Injectable()
407
- ], BaseGoService);
408
- return BaseGoService;
409
- }());
410
-
411
329
  /*
412
330
  <file>
413
331
  Authors:
@@ -419,7 +337,7 @@
419
337
  Version:
420
338
  1.0
421
339
 
422
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
340
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
423
341
  </file>
424
342
  */
425
343
  var AppContextService = /** @class */ (function (_super) {
@@ -430,7 +348,7 @@
430
348
  _this.current = null;
431
349
  _this.successes = [];
432
350
  _this.subscription = null;
433
- _this.baseUrl = anatoly.consts.apiUrl + 'appcontext/';
351
+ _this.baseUrl = Consts.ApiUrl + 'appcontext/';
434
352
  return _this;
435
353
  }
436
354
  AppContextService.prototype.getCurrent = function (success) {
@@ -482,90 +400,125 @@
482
400
  Vadim Osovitny
483
401
 
484
402
  Created:
485
- 10 Nov 2017
403
+ 4 Mar 2020
486
404
 
487
405
  Version:
488
406
  1.0
489
407
 
490
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
408
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
491
409
  </file>
492
410
  */
493
- var AnatolyCoreModule = /** @class */ (function () {
494
- function AnatolyCoreModule() {
411
+ var Alerts = /** @class */ (function () {
412
+ function Alerts() {
495
413
  }
496
- AnatolyCoreModule = __decorate([
497
- core.NgModule({
498
- imports: [
499
- common.CommonModule,
500
- http.HttpClientModule,
501
- http.HttpClientXsrfModule,
502
- http.HttpClientJsonpModule
503
- ],
504
- exports: [
505
- common.CommonModule,
506
- http.HttpClientModule,
507
- http.HttpClientXsrfModule,
508
- http.HttpClientJsonpModule
509
- ],
510
- declarations: [],
511
- providers: [
512
- AppContextService
513
- ]
414
+ Alerts.Info = function (text) {
415
+ Swal.fire({
416
+ title: "Info!",
417
+ text: text,
418
+ icon: "info",
419
+ confirmButtonText: "OK"
420
+ });
421
+ };
422
+ Alerts.Warning = function (text) {
423
+ Swal.fire({
424
+ title: "warning!",
425
+ text: text,
426
+ icon: "warning",
427
+ confirmButtonText: "OK"
428
+ });
429
+ };
430
+ Alerts.Error = function (text) {
431
+ Swal.fire({
432
+ title: "error!",
433
+ text: text,
434
+ icon: "error",
435
+ confirmButtonText: "OK"
436
+ });
437
+ };
438
+ Alerts.NotImplemented = function () {
439
+ this.Warning("Not Implemented Yet");
440
+ };
441
+ ;
442
+ Alerts.ErrorOccurred = function () {
443
+ this.Error("Sorry, an unexpected error occurred");
444
+ };
445
+ ;
446
+ Alerts.AreYouSure = function (text, title, confirmButtonText, cancelButtonText, successAction, cancelAction) {
447
+ if (typeof title == "undefined" || title == null)
448
+ title = "Are you sure?";
449
+ Swal.fire({
450
+ title: title,
451
+ text: text,
452
+ icon: 'warning',
453
+ confirmButtonText: confirmButtonText,
454
+ cancelButtonText: cancelButtonText,
455
+ showCancelButton: true
514
456
  })
515
- ], AnatolyCoreModule);
516
- return AnatolyCoreModule;
457
+ .then(function (result) {
458
+ if (result.value) {
459
+ if (successAction) {
460
+ successAction();
461
+ }
462
+ }
463
+ // result.dismiss can be 'cancel', 'overlay', 'close', and 'timer'
464
+ else if (result.dismiss == Swal.DismissReason.cancel || result.dismiss == Swal.DismissReason.close) {
465
+ if (cancelAction) {
466
+ cancelAction();
467
+ }
468
+ }
469
+ });
470
+ };
471
+ ;
472
+ Alerts.AlertSuccess = function (text, title, successAction) {
473
+ if (typeof title == "undefined" || title == null)
474
+ title = "Success!";
475
+ Swal.fire({
476
+ title: title,
477
+ text: text,
478
+ icon: "success",
479
+ confirmButtonText: "OK"
480
+ })
481
+ .then(function () {
482
+ if (successAction) {
483
+ successAction();
484
+ }
485
+ });
486
+ };
487
+ ;
488
+ Alerts.AlertCancel = function (text) {
489
+ Swal.fire('Cancelled', text, 'error');
490
+ };
491
+ ;
492
+ return Alerts;
517
493
  }());
518
494
 
519
- // Base
520
-
521
495
  /*
522
496
  <file>
523
497
  Authors:
524
498
  Vadim Osovitny
525
499
 
526
500
  Created:
527
- 12 Nov 2017
501
+ 4 Mar 2020
528
502
 
529
503
  Version:
530
504
  1.0
531
505
 
532
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
506
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
533
507
  </file>
534
508
  */
535
- var BaseBillingApiService = /** @class */ (function (_super) {
536
- __extends(BaseBillingApiService, _super);
537
- function BaseBillingApiService(http) {
538
- var _this = _super.call(this, http) || this;
539
- _this.http = http;
540
- _this.baseUrl += 'billing/';
541
- return _this;
509
+ var Utils = /** @class */ (function () {
510
+ function Utils() {
542
511
  }
543
- BaseBillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
544
- this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
545
- .subscribe(function (data) { }, function (e) { if (error)
546
- error(); }, function () { if (success)
547
- success(); });
548
- };
549
- BaseBillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
550
- this.postQS('cancelRequestedSubscription', null)
551
- .subscribe(function (data) { }, function (e) { if (error)
552
- error(); }, function () { if (success)
553
- success(); });
512
+ Utils.GetValueByNameInQS = function (name) {
513
+ return Utils.GetValueByName(location.search, name);
554
514
  };
555
- BaseBillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
556
- this.postQS('buyAccess', { requestedPlan: requestedPlan })
557
- .subscribe(function (data) { }, function (e) { if (error)
558
- error(); }, function () { if (success)
559
- success(); });
515
+ Utils.GetValueByName = function (url, name) {
516
+ name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
517
+ var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
518
+ return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
560
519
  };
561
- BaseBillingApiService.ctorParameters = function () { return [
562
- { type: http.HttpClient }
563
- ]; };
564
- BaseBillingApiService = __decorate([
565
- core.Injectable()
566
- ], BaseBillingApiService);
567
- return BaseBillingApiService;
568
- }(BaseApiService));
520
+ return Utils;
521
+ }());
569
522
 
570
523
  /*
571
524
  <file>
@@ -573,66 +526,36 @@
573
526
  Vadim Osovitny
574
527
 
575
528
  Created:
576
- 14 Aug 2018
529
+ 28 Aug 2018
577
530
 
578
531
  Version:
579
532
  1.0
580
533
 
581
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
534
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
582
535
  </file>
583
536
  */
584
- var BuyAccessButtonComponent = /** @class */ (function () {
585
- function BuyAccessButtonComponent(appcontext, api) {
586
- this.appcontext = appcontext;
587
- this.api = api;
588
- this.contextUpdated = false;
589
- this.isUserSignedIn = false;
590
- this.currentPlan = 0;
591
- this.currentPlanTitle = "";
537
+ var BaseComponent = /** @class */ (function () {
538
+ function BaseComponent() {
592
539
  }
593
- BuyAccessButtonComponent.prototype.ngOnInit = function () {
594
- var _this = this;
595
- if (!this.appcontext.isUserSignedIn()) {
596
- this.contextUpdated = true;
597
- return;
598
- }
599
- this.appcontext.getCurrent(function (current) {
600
- _this.isUserSignedIn = current.isUserSignedIn;
601
- if (_this.isUserSignedIn) {
602
- _this.currentPlan = current.account.billingPlan;
603
- _this.currentPlanTitle = current.account.billingPlanAsString;
604
- }
605
- _this.contextUpdated = true;
606
- });
540
+ BaseComponent.prototype.getQSId = function () {
541
+ var id = Utils.GetValueByNameInQS("id");
542
+ if (typeof id === 'undefined' || id == '')
543
+ return null;
544
+ return id;
607
545
  };
608
- BuyAccessButtonComponent.prototype.onBuyPlan = function () {
609
- var text = "Requested plan: " + this.plantitle + " ";
610
- var that = this;
611
- osovitny.ui.areYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
612
- that.api.buyAccess(that.plan, function () {
613
- osovitny.ui.alertSuccess('Access Granted', null, function () {
614
- window.location.reload();
615
- });
616
- });
617
- });
546
+ BaseComponent.prototype.showLoading = function () {
547
+ var panelLoading = $('#pnlLoading');
548
+ panelLoading.show();
618
549
  };
619
- BuyAccessButtonComponent.ctorParameters = function () { return [
620
- { type: AppContextService },
621
- { type: BaseBillingApiService }
622
- ]; };
623
- __decorate([
624
- core.Input()
625
- ], BuyAccessButtonComponent.prototype, "plan", void 0);
626
- __decorate([
627
- core.Input()
628
- ], BuyAccessButtonComponent.prototype, "plantitle", void 0);
629
- BuyAccessButtonComponent = __decorate([
630
- core.Component({
631
- selector: 'anatoly-buyaccess-button',
632
- 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"
633
- })
634
- ], BuyAccessButtonComponent);
635
- return BuyAccessButtonComponent;
550
+ BaseComponent.prototype.hideLoading = function () {
551
+ var panelLoading = $('#pnlLoading');
552
+ panelLoading.hide();
553
+ };
554
+ BaseComponent.prototype.handleError = function (e) {
555
+ this.hideLoading();
556
+ Alerts.ErrorOccurred();
557
+ };
558
+ return BaseComponent;
636
559
  }());
637
560
 
638
561
  /*
@@ -641,107 +564,96 @@
641
564
  Vadim Osovitny
642
565
 
643
566
  Created:
644
- 1 Jun 2018
567
+ 20 Nov 2017
645
568
 
646
569
  Version:
647
570
  1.0
648
571
 
649
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
572
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
650
573
  </file>
651
574
  */
652
- var SubscribePlanButtonComponent = /** @class */ (function () {
653
- function SubscribePlanButtonComponent(appcontext) {
654
- this.appcontext = appcontext;
655
- this.contextUpdated = false;
656
- this.isUserSignedIn = false;
657
- this.currentPlan = 0;
658
- this.currentPlanTitle = "";
659
- this.requestedPlan = 0;
660
- this.requestedPlanTitle = "";
575
+ var BaseEditComponent = /** @class */ (function (_super) {
576
+ __extends(BaseEditComponent, _super);
577
+ function BaseEditComponent() {
578
+ var _this = _super.call(this) || this;
579
+ _this.formSubmitted = false;
580
+ return _this;
661
581
  }
662
- SubscribePlanButtonComponent.prototype.ngOnInit = function () {
663
- var _this = this;
664
- if (!this.appcontext.isUserSignedIn()) {
665
- this.contextUpdated = true;
666
- return;
582
+ BaseEditComponent.prototype.isActionAdding = function () {
583
+ var id = Utils.GetValueByNameInQS("id");
584
+ if (typeof id === 'undefined' || id == '')
585
+ return true;
586
+ return false;
587
+ };
588
+ BaseEditComponent.prototype.getEntityId = function () {
589
+ return this.getQSId();
590
+ };
591
+ BaseEditComponent.prototype.isItemInvalid = function (name) {
592
+ if (typeof name === 'undefined' || name == '') {
593
+ return false;
667
594
  }
668
- this.appcontext.getCurrent(function (current) {
669
- _this.isUserSignedIn = current.isUserSignedIn;
670
- if (_this.isUserSignedIn) {
671
- _this.currentPlan = current.account.billingPlan;
672
- _this.currentPlanTitle = current.account.billingPlanAsString;
673
- _this.requestedPlan = current.account.requestedBillingPlan;
674
- _this.requestedPlanTitle = current.account.requestedBillingPlanAsString;
675
- }
676
- _this.contextUpdated = true;
677
- });
595
+ if (!this.formGroup) {
596
+ return false;
597
+ }
598
+ if (this.formGroup.get(name)) {
599
+ return (this.formSubmitted && this.formGroup.get(name).invalid) ||
600
+ (this.formGroup.get(name).touched && this.formGroup.get(name).invalid);
601
+ }
602
+ return false;
603
+ };
604
+ BaseEditComponent.prototype.getFormValue = function (name) {
605
+ return this.formGroup.controls[name].value;
606
+ };
607
+ BaseEditComponent.prototype.setFormValue = function (name, value) {
608
+ this.formGroup.controls[name].setValue(value);
609
+ };
610
+ BaseEditComponent.prototype.getFormGroupValue = function (groupName, name) {
611
+ return this.formGroup.controls[groupName].get(name).value;
612
+ };
613
+ BaseEditComponent.prototype.setFormGroupValue = function (groupName, name, value) {
614
+ this.formGroup.controls[groupName].get(name).setValue(value);
678
615
  };
679
- SubscribePlanButtonComponent.ctorParameters = function () { return [
680
- { type: AppContextService }
681
- ]; };
682
616
  __decorate([
683
617
  core.Input()
684
- ], SubscribePlanButtonComponent.prototype, "plan", void 0);
618
+ ], BaseEditComponent.prototype, "formGroup", void 0);
685
619
  __decorate([
686
620
  core.Input()
687
- ], SubscribePlanButtonComponent.prototype, "plantitle", void 0);
688
- SubscribePlanButtonComponent = __decorate([
689
- core.Component({
690
- selector: 'anatoly-subscribe-plan-button',
691
- 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"
692
- })
693
- ], SubscribePlanButtonComponent);
694
- return SubscribePlanButtonComponent;
695
- }());
621
+ ], BaseEditComponent.prototype, "formSubmitted", void 0);
622
+ return BaseEditComponent;
623
+ }(BaseComponent));
696
624
 
697
625
  /*
698
626
  <file>
699
627
  Authors:
700
- Vadim Osovitny
628
+ Anatoly Osovitny
701
629
 
702
630
  Created:
703
- 12 Nov 2017
631
+ 23 Apr 2018
704
632
 
705
633
  Version:
706
634
  1.0
707
635
 
708
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
636
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
709
637
  </file>
710
638
  */
711
- var UpgradePlanButtonComponent = /** @class */ (function () {
712
- function UpgradePlanButtonComponent(api) {
713
- this.api = api;
639
+ var ContentHeaderComponent = /** @class */ (function () {
640
+ function ContentHeaderComponent() {
714
641
  }
715
- UpgradePlanButtonComponent.prototype.onUpgradePlan = function () {
716
- var text = "Current plan: " + this.currentplantitle + " New plan: " + this.requestedplantitle;
717
- var that = this;
718
- osovitny.ui.areYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', function () {
719
- that.api.requestNewSubscription(that.requestedplan, function () {
720
- osovitny.ui.alertSuccess('Your request for changing plan has been sent.', null, function () {
721
- window.location.reload();
722
- });
723
- });
724
- });
642
+ ContentHeaderComponent.prototype.ngOnInit = function () {
643
+ if (this.title == null) {
644
+ this.title = '';
645
+ }
725
646
  };
726
- UpgradePlanButtonComponent.ctorParameters = function () { return [
727
- { type: BaseBillingApiService }
728
- ]; };
729
- __decorate([
730
- core.Input()
731
- ], UpgradePlanButtonComponent.prototype, "currentplantitle", void 0);
732
- __decorate([
733
- core.Input()
734
- ], UpgradePlanButtonComponent.prototype, "requestedplan", void 0);
735
647
  __decorate([
736
648
  core.Input()
737
- ], UpgradePlanButtonComponent.prototype, "requestedplantitle", void 0);
738
- UpgradePlanButtonComponent = __decorate([
649
+ ], ContentHeaderComponent.prototype, "title", void 0);
650
+ ContentHeaderComponent = __decorate([
739
651
  core.Component({
740
- selector: 'anatoly-upgrade-plan-button',
741
- template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
652
+ selector: 'anatoly-content-header',
653
+ template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
742
654
  })
743
- ], UpgradePlanButtonComponent);
744
- return UpgradePlanButtonComponent;
655
+ ], ContentHeaderComponent);
656
+ return ContentHeaderComponent;
745
657
  }());
746
658
 
747
659
  /*
@@ -750,28 +662,60 @@
750
662
  Vadim Osovitny
751
663
 
752
664
  Created:
753
- 4 Jul 2018
665
+ 8 Dec 2017
754
666
 
755
667
  Version:
756
668
  1.0
757
669
 
758
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
670
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
759
671
  </file>
760
672
  */
761
- var SignInButtonComponent = /** @class */ (function () {
762
- function SignInButtonComponent() {
673
+ var ValidationSummaryComponent = /** @class */ (function (_super) {
674
+ __extends(ValidationSummaryComponent, _super);
675
+ function ValidationSummaryComponent() {
676
+ return _super.call(this) || this;
763
677
  }
764
- __decorate([
765
- core.Input()
766
- ], SignInButtonComponent.prototype, "classbtn", void 0);
767
- SignInButtonComponent = __decorate([
768
- core.Component({
769
- selector: 'anatoly-signin-button',
770
- template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
771
- })
772
- ], SignInButtonComponent);
773
- return SignInButtonComponent;
774
- }());
678
+ ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
679
+ var _this = this;
680
+ var messages = [];
681
+ Object.keys(this.formGroup.controls).forEach(function (k) {
682
+ var control = _this.formGroup.controls[k];
683
+ if (control.controls != null) {
684
+ Object.keys(control.controls).forEach(function (k) {
685
+ var child = control.controls[k];
686
+ _this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
687
+ });
688
+ }
689
+ else {
690
+ _this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
691
+ }
692
+ });
693
+ return messages;
694
+ };
695
+ ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
696
+ var thing = state.path || thingName;
697
+ var messages = [];
698
+ if (state.errors) {
699
+ for (var errorName in state.errors) {
700
+ if (state.errors.hasOwnProperty(errorName)) {
701
+ switch (errorName) {
702
+ case 'required':
703
+ messages.push(thing + " is required");
704
+ break;
705
+ case 'minlength':
706
+ messages.push(thing + " must be at least " + state.errors['minlength'].requiredLength + " characters");
707
+ break;
708
+ case 'pattern':
709
+ messages.push(thing + " contains illegal characters");
710
+ break;
711
+ }
712
+ }
713
+ }
714
+ }
715
+ return messages;
716
+ };
717
+ return ValidationSummaryComponent;
718
+ }(BaseEditComponent));
775
719
 
776
720
  /*
777
721
  <file>
@@ -779,28 +723,36 @@
779
723
  Vadim Osovitny
780
724
 
781
725
  Created:
782
- 4 Jul 2018
726
+ 7 Dec 2017
783
727
 
784
728
  Version:
785
729
  1.0
786
730
 
787
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
731
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
788
732
  </file>
789
733
  */
790
- var SignOutButtonComponent = /** @class */ (function () {
791
- function SignOutButtonComponent() {
734
+ var FormValidationSummaryComponent = /** @class */ (function (_super) {
735
+ __extends(FormValidationSummaryComponent, _super);
736
+ function FormValidationSummaryComponent() {
737
+ var _this = _super.call(this) || this;
738
+ _this.visible = false;
739
+ return _this;
792
740
  }
793
- __decorate([
794
- core.Input()
795
- ], SignOutButtonComponent.prototype, "classbtn", void 0);
796
- SignOutButtonComponent = __decorate([
741
+ FormValidationSummaryComponent.prototype.getErrors = function () {
742
+ var messages = this.getFormValidationMessages();
743
+ return messages;
744
+ };
745
+ __decorate([
746
+ core.Input()
747
+ ], FormValidationSummaryComponent.prototype, "visible", void 0);
748
+ FormValidationSummaryComponent = __decorate([
797
749
  core.Component({
798
- selector: 'anatoly-signout-button',
799
- template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
750
+ selector: 'anatoly-form-validation-summary',
751
+ template: "<div class=\"callout callout-danger\" *ngIf=\"visible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\"><span class=\"help-block \" style=\"color:white\">{{error}}</span></p>\r\n</div>\r\n"
800
752
  })
801
- ], SignOutButtonComponent);
802
- return SignOutButtonComponent;
803
- }());
753
+ ], FormValidationSummaryComponent);
754
+ return FormValidationSummaryComponent;
755
+ }(ValidationSummaryComponent));
804
756
 
805
757
  /*
806
758
  <file>
@@ -808,251 +760,412 @@
808
760
  Vadim Osovitny
809
761
 
810
762
  Created:
811
- 4 Jul 2018
763
+ 6 Dec 2017
812
764
 
813
765
  Version:
814
766
  1.0
815
767
 
816
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
768
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
817
769
  </file>
818
770
  */
819
- var SignUpButtonComponent = /** @class */ (function () {
820
- function SignUpButtonComponent() {
771
+ var ItemValidationSummaryComponent = /** @class */ (function (_super) {
772
+ __extends(ItemValidationSummaryComponent, _super);
773
+ function ItemValidationSummaryComponent() {
774
+ return _super.call(this) || this;
821
775
  }
822
776
  __decorate([
823
777
  core.Input()
824
- ], SignUpButtonComponent.prototype, "classbtn", void 0);
825
- SignUpButtonComponent = __decorate([
778
+ ], ItemValidationSummaryComponent.prototype, "key", void 0);
779
+ __decorate([
780
+ core.Input()
781
+ ], ItemValidationSummaryComponent.prototype, "title", void 0);
782
+ ItemValidationSummaryComponent = __decorate([
826
783
  core.Component({
827
- selector: 'anatoly-signup-button',
828
- template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n"
784
+ selector: 'anatoly-item-validation-summary',
785
+ template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(key)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(key), title)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>"
829
786
  })
830
- ], SignUpButtonComponent);
831
- return SignUpButtonComponent;
832
- }());
787
+ ], ItemValidationSummaryComponent);
788
+ return ItemValidationSummaryComponent;
789
+ }(ValidationSummaryComponent));
790
+
791
+ var ɵ0 = function (images) {
792
+ };
793
+ var DefaultEditorOptions = {
794
+ placeholderText: 'Edit Your Content Here',
795
+ charCounterCount: true,
796
+ heightMin: 100,
797
+ toolbarInline: false,
798
+ toolbarButtons: {
799
+ 'moreText': {
800
+ 'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript',
801
+ 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle']
802
+ },
803
+ 'moreParagraph': {
804
+ 'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify',
805
+ 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
806
+ },
807
+ 'moreRich': {
808
+ 'buttons': ['insertLink', 'insertImage', 'insertTable', 'emoticons', 'fontAwesome',
809
+ 'specialCharacters', 'embedly']
810
+ },
811
+ 'moreMisc': {
812
+ 'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
813
+ 'align': 'right',
814
+ }
815
+ },
816
+ /*
817
+ Upload:
818
+ https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
819
+ */
820
+ imageUploadURL: '/api/HtmlEditor/UploadImage',
821
+ imageAllowedTypes: ['jpeg', 'jpg', 'png'],
822
+ imageUploadParams: { uploadType: '', uploadParentId: '' },
823
+ events: {
824
+ 'image.beforeUpload': ɵ0
825
+ }
826
+ };
833
827
 
834
828
  /*
835
829
  <file>
836
830
  Authors:
831
+ Anatoly Osovitny
837
832
  Vadim Osovitny
838
833
 
839
834
  Created:
840
- 4 Jul 2018
835
+ 12 Dec 2017
841
836
 
842
837
  Version:
843
838
  1.0
844
839
 
845
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
840
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
846
841
  </file>
847
842
  */
848
- var AnatolyIdentityModule = /** @class */ (function () {
849
- function AnatolyIdentityModule() {
843
+ var BaseHtmlEditorComponent = /** @class */ (function (_super) {
844
+ __extends(BaseHtmlEditorComponent, _super);
845
+ function BaseHtmlEditorComponent() {
846
+ var _this = _super.call(this) || this;
847
+ _this.editorInitialized = false;
848
+ //General params
849
+ _this.editorId = '';
850
+ _this.editorLabelText = 'Html';
851
+ _this.editorOptions = {};
852
+ return _this;
850
853
  }
851
- AnatolyIdentityModule = __decorate([
852
- core.NgModule({
853
- imports: [],
854
- exports: [
855
- SignInButtonComponent,
856
- SignUpButtonComponent,
857
- SignOutButtonComponent
858
- ],
859
- declarations: [
860
- SignInButtonComponent,
861
- SignUpButtonComponent,
862
- SignOutButtonComponent
863
- ],
864
- providers: []
865
- })
866
- ], AnatolyIdentityModule);
867
- return AnatolyIdentityModule;
868
- }());
869
-
870
- // Components
854
+ BaseHtmlEditorComponent.prototype.ngOnInit = function () {
855
+ var opt = this.editorOptions;
856
+ if (typeof this.editorOptions == "string") {
857
+ opt = JSON.parse(this.editorOptions);
858
+ }
859
+ var newOptions = $.extend({}, DefaultEditorOptions, opt);
860
+ var key = window.__froalaEditor_Key;
861
+ if (key) {
862
+ newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
863
+ }
864
+ if (newOptions.events && newOptions.events.initialized) {
865
+ newOptions.events.initialized.overridden = false;
866
+ }
867
+ this.options = newOptions;
868
+ };
869
+ BaseHtmlEditorComponent.prototype.doAfterEditorInitialized = function (action) {
870
+ var that = this;
871
+ var timeOut = 500;
872
+ if (this.editorInitialized) {
873
+ timeOut = 100;
874
+ }
875
+ setTimeout(function () { action(that); }, timeOut);
876
+ };
877
+ BaseHtmlEditorComponent.prototype.getEditor = function () {
878
+ if (this._control)
879
+ return this._control.getEditor();
880
+ return null;
881
+ };
882
+ //Public Funcs
883
+ BaseHtmlEditorComponent.prototype.initializeControl = function (control) {
884
+ this._control = control;
885
+ this._control.initialize();
886
+ this.editorInitialized = true;
887
+ };
888
+ BaseHtmlEditorComponent.prototype.setUploadParams = function (uploadType, uploadParentId) {
889
+ this.doAfterEditorInitialized(function (that) {
890
+ var editor = that.getEditor();
891
+ if (typeof (editor) == "undefined" || editor == null) {
892
+ return;
893
+ }
894
+ editor.opts.imageUploadParams.uploadType = uploadType;
895
+ editor.opts.imageUploadParams.uploadParentId = uploadParentId;
896
+ });
897
+ };
898
+ __decorate([
899
+ core.Input()
900
+ ], BaseHtmlEditorComponent.prototype, "editorId", void 0);
901
+ __decorate([
902
+ core.Input()
903
+ ], BaseHtmlEditorComponent.prototype, "editorLabelText", void 0);
904
+ __decorate([
905
+ core.Input()
906
+ ], BaseHtmlEditorComponent.prototype, "editorOptions", void 0);
907
+ return BaseHtmlEditorComponent;
908
+ }(BaseEditComponent));
871
909
 
872
910
  /*
873
911
  <file>
874
912
  Authors:
913
+ Anatoly Osovitny
875
914
  Vadim Osovitny
876
915
 
877
916
  Created:
878
- 10 Nov 2017
917
+ 12 Dec 2017
879
918
 
880
919
  Version:
881
920
  1.0
882
921
 
883
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
922
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
884
923
  </file>
885
924
  */
886
- var AnatolyBillingModule = /** @class */ (function () {
887
- function AnatolyBillingModule() {
925
+ var HtmlEditorComponent = /** @class */ (function (_super) {
926
+ __extends(HtmlEditorComponent, _super);
927
+ function HtmlEditorComponent() {
928
+ return _super.call(this) || this;
888
929
  }
889
- AnatolyBillingModule = __decorate([
890
- core.NgModule({
891
- imports: [
892
- common.CommonModule,
893
- http.HttpClientModule,
894
- http.HttpClientXsrfModule,
895
- http.HttpClientJsonpModule,
896
- AnatolyIdentityModule
897
- ],
898
- exports: [
899
- common.CommonModule,
900
- http.HttpClientModule,
901
- http.HttpClientXsrfModule,
902
- http.HttpClientJsonpModule,
903
- SubscribePlanButtonComponent,
904
- UpgradePlanButtonComponent,
905
- BuyAccessButtonComponent
906
- ],
907
- declarations: [
908
- SubscribePlanButtonComponent,
909
- UpgradePlanButtonComponent,
910
- BuyAccessButtonComponent
911
- ],
912
- providers: [
913
- BaseBillingApiService
914
- ]
930
+ HtmlEditorComponent.prototype.setHtml = function (content) {
931
+ this.doAfterEditorInitialized(function (that) {
932
+ var editor = that.getEditor();
933
+ if (typeof (editor) == "undefined" || editor == null) {
934
+ return;
935
+ }
936
+ editor.html.set(content);
937
+ });
938
+ };
939
+ HtmlEditorComponent.prototype.getHtml = function () {
940
+ var editor = this.getEditor();
941
+ if (typeof (editor) == "undefined" || editor == null) {
942
+ return;
943
+ }
944
+ return editor.html.get(false);
945
+ };
946
+ HtmlEditorComponent = __decorate([
947
+ core.Component({
948
+ selector: 'anatoly-html-editor',
949
+ template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\" \r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>"
915
950
  })
916
- ], AnatolyBillingModule);
917
- return AnatolyBillingModule;
918
- }());
919
-
920
- // Components
951
+ ], HtmlEditorComponent);
952
+ return HtmlEditorComponent;
953
+ }(BaseHtmlEditorComponent));
921
954
 
922
955
  /*
923
956
  <file>
924
957
  Authors:
958
+ Anatoly Osovitny
925
959
  Vadim Osovitny
926
960
 
927
961
  Created:
928
- 28 Aug 2018
962
+ 12 Dec 2017
929
963
 
930
964
  Version:
931
965
  1.0
932
966
 
933
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
967
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
934
968
  </file>
935
969
  */
936
- var BaseComponent = /** @class */ (function () {
937
- function BaseComponent() {
970
+ var FormsHtmlEditorComponent = /** @class */ (function (_super) {
971
+ __extends(FormsHtmlEditorComponent, _super);
972
+ function FormsHtmlEditorComponent() {
973
+ var _this = _super.call(this) || this;
974
+ _this.editorFormKey = 'html';
975
+ return _this;
938
976
  }
939
- BaseComponent.prototype.getQSId = function () {
940
- var id = osovitny.utils.getValueByNameInQS("id");
941
- if (typeof id === 'undefined' || id == '')
942
- return null;
943
- return id;
944
- };
945
- BaseComponent.prototype.showLoading = function () {
946
- var panelLoading = $('#pnlLoading');
947
- panelLoading.show();
948
- };
949
- BaseComponent.prototype.hideLoading = function () {
950
- var panelLoading = $('#pnlLoading');
951
- panelLoading.hide();
952
- };
953
- BaseComponent.prototype.handleError = function (e) {
954
- this.hideLoading();
955
- osovitny.ui.errorOccurred();
956
- };
957
- return BaseComponent;
977
+ __decorate([
978
+ core.Input()
979
+ ], FormsHtmlEditorComponent.prototype, "editorFormKey", void 0);
980
+ FormsHtmlEditorComponent = __decorate([
981
+ core.Component({
982
+ selector: 'anatoly-forms-html-editor',
983
+ template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\"\r\n [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 [key]=\"editorFormKey\"\r\n [title]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n"
984
+ })
985
+ ], FormsHtmlEditorComponent);
986
+ return FormsHtmlEditorComponent;
987
+ }(BaseHtmlEditorComponent));
988
+
989
+ /*
990
+ <file>
991
+ Authors:
992
+ Vadim Osovitny
993
+
994
+ Created:
995
+ 10 Nov 2017
996
+
997
+ Version:
998
+ 1.0
999
+
1000
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1001
+ </file>
1002
+ */
1003
+ var AnatolyCoreModule = /** @class */ (function () {
1004
+ function AnatolyCoreModule() {
1005
+ }
1006
+ AnatolyCoreModule = __decorate([
1007
+ core.NgModule({
1008
+ imports: [
1009
+ common.CommonModule,
1010
+ forms.ReactiveFormsModule,
1011
+ forms.FormsModule,
1012
+ http.HttpClientModule,
1013
+ http.HttpClientXsrfModule,
1014
+ http.HttpClientJsonpModule,
1015
+ angularFroalaWysiwyg.FroalaEditorModule.forRoot(),
1016
+ angularFroalaWysiwyg.FroalaViewModule.forRoot(),
1017
+ kendoAngularGrid.GridModule,
1018
+ kendoAngularPopup.PopupModule,
1019
+ kendoAngularButtons.ButtonsModule,
1020
+ kendoAngularDropdowns.DropDownsModule
1021
+ ],
1022
+ exports: [
1023
+ common.CommonModule,
1024
+ http.HttpClientModule,
1025
+ http.HttpClientXsrfModule,
1026
+ http.HttpClientJsonpModule,
1027
+ ItemValidationSummaryComponent,
1028
+ FormValidationSummaryComponent,
1029
+ ContentHeaderComponent,
1030
+ HtmlEditorComponent,
1031
+ FormsHtmlEditorComponent
1032
+ ],
1033
+ declarations: [
1034
+ ItemValidationSummaryComponent,
1035
+ FormValidationSummaryComponent,
1036
+ ContentHeaderComponent,
1037
+ HtmlEditorComponent,
1038
+ FormsHtmlEditorComponent
1039
+ ],
1040
+ providers: [
1041
+ AppContextService
1042
+ ],
1043
+ schemas: [
1044
+ core.CUSTOM_ELEMENTS_SCHEMA,
1045
+ core.NO_ERRORS_SCHEMA
1046
+ ]
1047
+ })
1048
+ ], AnatolyCoreModule);
1049
+ return AnatolyCoreModule;
958
1050
  }());
959
1051
 
1052
+ // Services
1053
+
960
1054
  /*
961
1055
  <file>
962
1056
  Authors:
963
1057
  Vadim Osovitny
964
1058
 
965
1059
  Created:
966
- 20 Nov 2017
1060
+ 12 Nov 2017
967
1061
 
968
1062
  Version:
969
1063
  1.0
970
1064
 
971
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1065
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
972
1066
  </file>
973
1067
  */
974
- var BaseEditComponent = /** @class */ (function (_super) {
975
- __extends(BaseEditComponent, _super);
976
- function BaseEditComponent() {
977
- var _this = _super.call(this) || this;
978
- _this.formSubmitted = false;
1068
+ var BaseBillingApiService = /** @class */ (function (_super) {
1069
+ __extends(BaseBillingApiService, _super);
1070
+ function BaseBillingApiService(http) {
1071
+ var _this = _super.call(this, http) || this;
1072
+ _this.http = http;
1073
+ _this.baseUrl += 'billing/';
979
1074
  return _this;
980
1075
  }
981
- BaseEditComponent.prototype.isActionAdding = function () {
982
- var id = osovitny.utils.getValueByNameInQS("id");
983
- if (typeof id === 'undefined' || id == '')
984
- return true;
985
- return false;
986
- };
987
- BaseEditComponent.prototype.getEntityId = function () {
988
- return this.getQSId();
989
- };
990
- BaseEditComponent.prototype.isItemInvalid = function (name) {
991
- if (typeof name === 'undefined' || name == '') {
992
- return false;
993
- }
994
- if (!this.formGroup) {
995
- return false;
996
- }
997
- if (this.formGroup.get(name)) {
998
- return (this.formSubmitted && this.formGroup.get(name).invalid) ||
999
- (this.formGroup.get(name).touched && this.formGroup.get(name).invalid);
1000
- }
1001
- return false;
1002
- };
1003
- BaseEditComponent.prototype.getFormValue = function (name) {
1004
- return this.formGroup.controls[name].value;
1005
- };
1006
- BaseEditComponent.prototype.setFormValue = function (name, value) {
1007
- this.formGroup.controls[name].setValue(value);
1076
+ BaseBillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
1077
+ this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
1078
+ .subscribe(function (data) { }, function (e) { if (error)
1079
+ error(); }, function () { if (success)
1080
+ success(); });
1008
1081
  };
1009
- BaseEditComponent.prototype.getFormGroupValue = function (groupName, name) {
1010
- return this.formGroup.controls[groupName].get(name).value;
1082
+ BaseBillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
1083
+ this.postQS('cancelRequestedSubscription', null)
1084
+ .subscribe(function (data) { }, function (e) { if (error)
1085
+ error(); }, function () { if (success)
1086
+ success(); });
1011
1087
  };
1012
- BaseEditComponent.prototype.setFormGroupValue = function (groupName, name, value) {
1013
- this.formGroup.controls[groupName].get(name).setValue(value);
1088
+ BaseBillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
1089
+ this.postQS('buyAccess', { requestedPlan: requestedPlan })
1090
+ .subscribe(function (data) { }, function (e) { if (error)
1091
+ error(); }, function () { if (success)
1092
+ success(); });
1014
1093
  };
1015
- __decorate([
1016
- core.Input()
1017
- ], BaseEditComponent.prototype, "formGroup", void 0);
1018
- __decorate([
1019
- core.Input()
1020
- ], BaseEditComponent.prototype, "formSubmitted", void 0);
1021
- return BaseEditComponent;
1022
- }(BaseComponent));
1094
+ BaseBillingApiService.ctorParameters = function () { return [
1095
+ { type: http.HttpClient }
1096
+ ]; };
1097
+ BaseBillingApiService = __decorate([
1098
+ core.Injectable()
1099
+ ], BaseBillingApiService);
1100
+ return BaseBillingApiService;
1101
+ }(BaseApiService));
1023
1102
 
1024
1103
  /*
1025
1104
  <file>
1026
1105
  Authors:
1027
- Anatoly Osovitny
1106
+ Vadim Osovitny
1028
1107
 
1029
1108
  Created:
1030
- 23 Apr 2018
1109
+ 14 Aug 2018
1031
1110
 
1032
1111
  Version:
1033
1112
  1.0
1034
1113
 
1035
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1114
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1036
1115
  </file>
1037
1116
  */
1038
- var ContentHeaderComponent = /** @class */ (function () {
1039
- function ContentHeaderComponent() {
1117
+ var BuyAccessButtonComponent = /** @class */ (function () {
1118
+ function BuyAccessButtonComponent(appcontext, api) {
1119
+ this.appcontext = appcontext;
1120
+ this.api = api;
1121
+ this.contextUpdated = false;
1122
+ this.isUserSignedIn = false;
1123
+ this.currentPlan = 0;
1124
+ this.currentPlanTitle = "";
1040
1125
  }
1041
- ContentHeaderComponent.prototype.ngOnInit = function () {
1042
- if (this.title == null) {
1043
- this.title = '';
1126
+ BuyAccessButtonComponent.prototype.ngOnInit = function () {
1127
+ var _this = this;
1128
+ if (!this.appcontext.isUserSignedIn()) {
1129
+ this.contextUpdated = true;
1130
+ return;
1044
1131
  }
1132
+ this.appcontext.getCurrent(function (current) {
1133
+ _this.isUserSignedIn = current.isUserSignedIn;
1134
+ if (_this.isUserSignedIn) {
1135
+ _this.currentPlan = current.account.billingPlan;
1136
+ _this.currentPlanTitle = current.account.billingPlanAsString;
1137
+ }
1138
+ _this.contextUpdated = true;
1139
+ });
1140
+ };
1141
+ BuyAccessButtonComponent.prototype.onBuyPlan = function () {
1142
+ var text = "Requested plan: " + this.plantitle + " ";
1143
+ var that = this;
1144
+ Alerts.AreYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
1145
+ that.api.buyAccess(that.plan, function () {
1146
+ Alerts.AlertSuccess('Access Granted', null, function () {
1147
+ window.location.reload();
1148
+ });
1149
+ });
1150
+ });
1045
1151
  };
1152
+ BuyAccessButtonComponent.ctorParameters = function () { return [
1153
+ { type: AppContextService },
1154
+ { type: BaseBillingApiService }
1155
+ ]; };
1046
1156
  __decorate([
1047
1157
  core.Input()
1048
- ], ContentHeaderComponent.prototype, "title", void 0);
1049
- ContentHeaderComponent = __decorate([
1158
+ ], BuyAccessButtonComponent.prototype, "plan", void 0);
1159
+ __decorate([
1160
+ core.Input()
1161
+ ], BuyAccessButtonComponent.prototype, "plantitle", void 0);
1162
+ BuyAccessButtonComponent = __decorate([
1050
1163
  core.Component({
1051
- selector: 'anatoly-content-header',
1052
- template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
1164
+ selector: 'anatoly-buyaccess-button',
1165
+ 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"
1053
1166
  })
1054
- ], ContentHeaderComponent);
1055
- return ContentHeaderComponent;
1167
+ ], BuyAccessButtonComponent);
1168
+ return BuyAccessButtonComponent;
1056
1169
  }());
1057
1170
 
1058
1171
  /*
@@ -1061,60 +1174,58 @@
1061
1174
  Vadim Osovitny
1062
1175
 
1063
1176
  Created:
1064
- 8 Dec 2017
1177
+ 1 Jun 2018
1065
1178
 
1066
1179
  Version:
1067
1180
  1.0
1068
1181
 
1069
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1182
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1070
1183
  </file>
1071
1184
  */
1072
- var ValidationSummaryComponent = /** @class */ (function (_super) {
1073
- __extends(ValidationSummaryComponent, _super);
1074
- function ValidationSummaryComponent() {
1075
- return _super.call(this) || this;
1185
+ var SubscribePlanButtonComponent = /** @class */ (function () {
1186
+ function SubscribePlanButtonComponent(appcontext) {
1187
+ this.appcontext = appcontext;
1188
+ this.contextUpdated = false;
1189
+ this.isUserSignedIn = false;
1190
+ this.currentPlan = 0;
1191
+ this.currentPlanTitle = "";
1192
+ this.requestedPlan = 0;
1193
+ this.requestedPlanTitle = "";
1076
1194
  }
1077
- ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
1195
+ SubscribePlanButtonComponent.prototype.ngOnInit = function () {
1078
1196
  var _this = this;
1079
- var messages = [];
1080
- Object.keys(this.formGroup.controls).forEach(function (k) {
1081
- var control = _this.formGroup.controls[k];
1082
- if (control.controls != null) {
1083
- Object.keys(control.controls).forEach(function (k) {
1084
- var child = control.controls[k];
1085
- _this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
1086
- });
1087
- }
1088
- else {
1089
- _this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
1197
+ if (!this.appcontext.isUserSignedIn()) {
1198
+ this.contextUpdated = true;
1199
+ return;
1200
+ }
1201
+ this.appcontext.getCurrent(function (current) {
1202
+ _this.isUserSignedIn = current.isUserSignedIn;
1203
+ if (_this.isUserSignedIn) {
1204
+ _this.currentPlan = current.account.billingPlan;
1205
+ _this.currentPlanTitle = current.account.billingPlanAsString;
1206
+ _this.requestedPlan = current.account.requestedBillingPlan;
1207
+ _this.requestedPlanTitle = current.account.requestedBillingPlanAsString;
1090
1208
  }
1209
+ _this.contextUpdated = true;
1091
1210
  });
1092
- return messages;
1093
- };
1094
- ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
1095
- var thing = state.path || thingName;
1096
- var messages = [];
1097
- if (state.errors) {
1098
- for (var errorName in state.errors) {
1099
- if (state.errors.hasOwnProperty(errorName)) {
1100
- switch (errorName) {
1101
- case 'required':
1102
- messages.push(thing + " is required");
1103
- break;
1104
- case 'minlength':
1105
- messages.push(thing + " must be at least " + state.errors['minlength'].requiredLength + " characters");
1106
- break;
1107
- case 'pattern':
1108
- messages.push(thing + " contains illegal characters");
1109
- break;
1110
- }
1111
- }
1112
- }
1113
- }
1114
- return messages;
1115
1211
  };
1116
- return ValidationSummaryComponent;
1117
- }(BaseEditComponent));
1212
+ SubscribePlanButtonComponent.ctorParameters = function () { return [
1213
+ { type: AppContextService }
1214
+ ]; };
1215
+ __decorate([
1216
+ core.Input()
1217
+ ], SubscribePlanButtonComponent.prototype, "plan", void 0);
1218
+ __decorate([
1219
+ core.Input()
1220
+ ], SubscribePlanButtonComponent.prototype, "plantitle", void 0);
1221
+ SubscribePlanButtonComponent = __decorate([
1222
+ core.Component({
1223
+ selector: 'anatoly-subscribe-plan-button',
1224
+ 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"
1225
+ })
1226
+ ], SubscribePlanButtonComponent);
1227
+ return SubscribePlanButtonComponent;
1228
+ }());
1118
1229
 
1119
1230
  /*
1120
1231
  <file>
@@ -1122,36 +1233,49 @@
1122
1233
  Vadim Osovitny
1123
1234
 
1124
1235
  Created:
1125
- 7 Dec 2017
1236
+ 12 Nov 2017
1126
1237
 
1127
1238
  Version:
1128
1239
  1.0
1129
1240
 
1130
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1241
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1131
1242
  </file>
1132
1243
  */
1133
- var FormValidationSummaryComponent = /** @class */ (function (_super) {
1134
- __extends(FormValidationSummaryComponent, _super);
1135
- function FormValidationSummaryComponent() {
1136
- var _this = _super.call(this) || this;
1137
- _this.visible = false;
1138
- return _this;
1244
+ var UpgradePlanButtonComponent = /** @class */ (function () {
1245
+ function UpgradePlanButtonComponent(api) {
1246
+ this.api = api;
1139
1247
  }
1140
- FormValidationSummaryComponent.prototype.getErrors = function () {
1141
- var messages = this.getFormValidationMessages();
1142
- return messages;
1248
+ UpgradePlanButtonComponent.prototype.onUpgradePlan = function () {
1249
+ var text = "Current plan: " + this.currentplantitle + " New plan: " + this.requestedplantitle;
1250
+ var that = this;
1251
+ Alerts.AreYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', function () {
1252
+ that.api.requestNewSubscription(that.requestedplan, function () {
1253
+ Alerts.AlertSuccess('Your request for changing plan has been sent.', null, function () {
1254
+ window.location.reload();
1255
+ });
1256
+ });
1257
+ });
1143
1258
  };
1259
+ UpgradePlanButtonComponent.ctorParameters = function () { return [
1260
+ { type: BaseBillingApiService }
1261
+ ]; };
1144
1262
  __decorate([
1145
1263
  core.Input()
1146
- ], FormValidationSummaryComponent.prototype, "visible", void 0);
1147
- FormValidationSummaryComponent = __decorate([
1264
+ ], UpgradePlanButtonComponent.prototype, "currentplantitle", void 0);
1265
+ __decorate([
1266
+ core.Input()
1267
+ ], UpgradePlanButtonComponent.prototype, "requestedplan", void 0);
1268
+ __decorate([
1269
+ core.Input()
1270
+ ], UpgradePlanButtonComponent.prototype, "requestedplantitle", void 0);
1271
+ UpgradePlanButtonComponent = __decorate([
1148
1272
  core.Component({
1149
- selector: 'anatoly-form-validation-summary',
1150
- template: "<div class=\"callout callout-danger\" *ngIf=\"visible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\"><span class=\"help-block \" style=\"color:white\">{{error}}</span></p>\r\n</div>\r\n"
1273
+ selector: 'anatoly-upgrade-plan-button',
1274
+ template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
1151
1275
  })
1152
- ], FormValidationSummaryComponent);
1153
- return FormValidationSummaryComponent;
1154
- }(ValidationSummaryComponent));
1276
+ ], UpgradePlanButtonComponent);
1277
+ return UpgradePlanButtonComponent;
1278
+ }());
1155
1279
 
1156
1280
  /*
1157
1281
  <file>
@@ -1159,231 +1283,124 @@
1159
1283
  Vadim Osovitny
1160
1284
 
1161
1285
  Created:
1162
- 6 Dec 2017
1286
+ 4 Jul 2018
1163
1287
 
1164
1288
  Version:
1165
1289
  1.0
1166
1290
 
1167
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1291
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
1168
1292
  </file>
1169
1293
  */
1170
- var ItemValidationSummaryComponent = /** @class */ (function (_super) {
1171
- __extends(ItemValidationSummaryComponent, _super);
1172
- function ItemValidationSummaryComponent() {
1173
- return _super.call(this) || this;
1294
+ var SignInButtonComponent = /** @class */ (function () {
1295
+ function SignInButtonComponent() {
1174
1296
  }
1175
1297
  __decorate([
1176
1298
  core.Input()
1177
- ], ItemValidationSummaryComponent.prototype, "key", void 0);
1178
- __decorate([
1179
- core.Input()
1180
- ], ItemValidationSummaryComponent.prototype, "title", void 0);
1181
- ItemValidationSummaryComponent = __decorate([
1299
+ ], SignInButtonComponent.prototype, "classbtn", void 0);
1300
+ SignInButtonComponent = __decorate([
1182
1301
  core.Component({
1183
- selector: 'anatoly-item-validation-summary',
1184
- template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(key)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(key), title)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>"
1302
+ selector: 'anatoly-signin-button',
1303
+ template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
1185
1304
  })
1186
- ], ItemValidationSummaryComponent);
1187
- return ItemValidationSummaryComponent;
1188
- }(ValidationSummaryComponent));
1189
-
1190
- var ɵ0 = function (images) {
1191
- };
1192
- var DefaultEditorOptions = {
1193
- placeholderText: 'Edit Your Content Here',
1194
- charCounterCount: true,
1195
- heightMin: 100,
1196
- toolbarInline: false,
1197
- toolbarButtons: {
1198
- 'moreText': {
1199
- 'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript',
1200
- 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle']
1201
- },
1202
- 'moreParagraph': {
1203
- 'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify',
1204
- 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
1205
- },
1206
- 'moreRich': {
1207
- 'buttons': ['insertLink', 'insertImage', 'insertTable', 'emoticons', 'fontAwesome',
1208
- 'specialCharacters', 'embedly']
1209
- },
1210
- 'moreMisc': {
1211
- 'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
1212
- 'align': 'right',
1213
- }
1214
- },
1215
- /*
1216
- Upload:
1217
- https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
1218
- */
1219
- imageUploadURL: '/api/HtmlEditor/UploadImage',
1220
- imageAllowedTypes: ['jpeg', 'jpg', 'png'],
1221
- imageUploadParams: { uploadType: '', uploadParentId: '' },
1222
- events: {
1223
- 'image.beforeUpload': ɵ0
1224
- }
1225
- };
1305
+ ], SignInButtonComponent);
1306
+ return SignInButtonComponent;
1307
+ }());
1226
1308
 
1227
1309
  /*
1228
1310
  <file>
1229
1311
  Authors:
1230
- Anatoly Osovitny
1231
1312
  Vadim Osovitny
1232
1313
 
1233
1314
  Created:
1234
- 12 Dec 2017
1315
+ 4 Jul 2018
1235
1316
 
1236
1317
  Version:
1237
1318
  1.0
1238
1319
 
1239
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1320
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
1240
1321
  </file>
1241
1322
  */
1242
- var BaseHtmlEditorComponent = /** @class */ (function (_super) {
1243
- __extends(BaseHtmlEditorComponent, _super);
1244
- function BaseHtmlEditorComponent() {
1245
- var _this = _super.call(this) || this;
1246
- _this.editorInitialized = false;
1247
- //General params
1248
- _this.editorId = '';
1249
- _this.editorLabelText = 'Html';
1250
- _this.editorOptions = {};
1251
- return _this;
1323
+ var SignOutButtonComponent = /** @class */ (function () {
1324
+ function SignOutButtonComponent() {
1252
1325
  }
1253
- BaseHtmlEditorComponent.prototype.ngOnInit = function () {
1254
- var opt = this.editorOptions;
1255
- if (typeof this.editorOptions == "string") {
1256
- opt = JSON.parse(this.editorOptions);
1257
- }
1258
- var newOptions = $.extend({}, DefaultEditorOptions, opt);
1259
- var key = window.__froalaEditor_Key;
1260
- if (key) {
1261
- newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
1262
- }
1263
- if (newOptions.events && newOptions.events.initialized) {
1264
- newOptions.events.initialized.overridden = false;
1265
- }
1266
- this.options = newOptions;
1267
- };
1268
- BaseHtmlEditorComponent.prototype.doAfterEditorInitialized = function (action) {
1269
- var that = this;
1270
- var timeOut = 500;
1271
- if (this.editorInitialized) {
1272
- timeOut = 100;
1273
- }
1274
- setTimeout(function () { action(that); }, timeOut);
1275
- };
1276
- BaseHtmlEditorComponent.prototype.getEditor = function () {
1277
- if (this._control)
1278
- return this._control.getEditor();
1279
- return null;
1280
- };
1281
- //Public Funcs
1282
- BaseHtmlEditorComponent.prototype.initializeControl = function (control) {
1283
- this._control = control;
1284
- this._control.initialize();
1285
- this.editorInitialized = true;
1286
- };
1287
- BaseHtmlEditorComponent.prototype.setUploadParams = function (uploadType, uploadParentId) {
1288
- this.doAfterEditorInitialized(function (that) {
1289
- var editor = that.getEditor();
1290
- if (typeof (editor) == "undefined" || editor == null) {
1291
- return;
1292
- }
1293
- editor.opts.imageUploadParams.uploadType = uploadType;
1294
- editor.opts.imageUploadParams.uploadParentId = uploadParentId;
1295
- });
1296
- };
1297
- __decorate([
1298
- core.Input()
1299
- ], BaseHtmlEditorComponent.prototype, "editorId", void 0);
1300
1326
  __decorate([
1301
- core.Input()
1302
- ], BaseHtmlEditorComponent.prototype, "editorLabelText", void 0);
1303
- __decorate([
1304
- core.Input()
1305
- ], BaseHtmlEditorComponent.prototype, "editorOptions", void 0);
1306
- return BaseHtmlEditorComponent;
1307
- }(BaseEditComponent));
1327
+ core.Input()
1328
+ ], SignOutButtonComponent.prototype, "classbtn", void 0);
1329
+ SignOutButtonComponent = __decorate([
1330
+ core.Component({
1331
+ selector: 'anatoly-signout-button',
1332
+ template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
1333
+ })
1334
+ ], SignOutButtonComponent);
1335
+ return SignOutButtonComponent;
1336
+ }());
1308
1337
 
1309
1338
  /*
1310
1339
  <file>
1311
1340
  Authors:
1312
- Anatoly Osovitny
1313
1341
  Vadim Osovitny
1314
1342
 
1315
1343
  Created:
1316
- 12 Dec 2017
1344
+ 4 Jul 2018
1317
1345
 
1318
1346
  Version:
1319
1347
  1.0
1320
1348
 
1321
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1349
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
1322
1350
  </file>
1323
1351
  */
1324
- var HtmlEditorComponent = /** @class */ (function (_super) {
1325
- __extends(HtmlEditorComponent, _super);
1326
- function HtmlEditorComponent() {
1327
- return _super.call(this) || this;
1352
+ var SignUpButtonComponent = /** @class */ (function () {
1353
+ function SignUpButtonComponent() {
1328
1354
  }
1329
- HtmlEditorComponent.prototype.setHtml = function (content) {
1330
- this.doAfterEditorInitialized(function (that) {
1331
- var editor = that.getEditor();
1332
- if (typeof (editor) == "undefined" || editor == null) {
1333
- return;
1334
- }
1335
- editor.html.set(content);
1336
- });
1337
- };
1338
- HtmlEditorComponent.prototype.getHtml = function () {
1339
- var editor = this.getEditor();
1340
- if (typeof (editor) == "undefined" || editor == null) {
1341
- return;
1342
- }
1343
- return editor.html.get(false);
1344
- };
1345
- HtmlEditorComponent = __decorate([
1355
+ __decorate([
1356
+ core.Input()
1357
+ ], SignUpButtonComponent.prototype, "classbtn", void 0);
1358
+ SignUpButtonComponent = __decorate([
1346
1359
  core.Component({
1347
- selector: 'anatoly-html-editor',
1348
- template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\" \r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>"
1360
+ selector: 'anatoly-signup-button',
1361
+ template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n"
1349
1362
  })
1350
- ], HtmlEditorComponent);
1351
- return HtmlEditorComponent;
1352
- }(BaseHtmlEditorComponent));
1363
+ ], SignUpButtonComponent);
1364
+ return SignUpButtonComponent;
1365
+ }());
1353
1366
 
1354
1367
  /*
1355
1368
  <file>
1356
1369
  Authors:
1357
- Anatoly Osovitny
1358
1370
  Vadim Osovitny
1359
1371
 
1360
1372
  Created:
1361
- 12 Dec 2017
1373
+ 4 Jul 2018
1362
1374
 
1363
1375
  Version:
1364
1376
  1.0
1365
1377
 
1366
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1378
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
1367
1379
  </file>
1368
1380
  */
1369
- var FormsHtmlEditorComponent = /** @class */ (function (_super) {
1370
- __extends(FormsHtmlEditorComponent, _super);
1371
- function FormsHtmlEditorComponent() {
1372
- var _this = _super.call(this) || this;
1373
- _this.editorFormKey = 'html';
1374
- return _this;
1381
+ var AnatolyIdentityModule = /** @class */ (function () {
1382
+ function AnatolyIdentityModule() {
1375
1383
  }
1376
- __decorate([
1377
- core.Input()
1378
- ], FormsHtmlEditorComponent.prototype, "editorFormKey", void 0);
1379
- FormsHtmlEditorComponent = __decorate([
1380
- core.Component({
1381
- selector: 'anatoly-forms-html-editor',
1382
- template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\"\r\n [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 [key]=\"editorFormKey\"\r\n [title]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n"
1384
+ AnatolyIdentityModule = __decorate([
1385
+ core.NgModule({
1386
+ imports: [],
1387
+ exports: [
1388
+ SignInButtonComponent,
1389
+ SignUpButtonComponent,
1390
+ SignOutButtonComponent
1391
+ ],
1392
+ declarations: [
1393
+ SignInButtonComponent,
1394
+ SignUpButtonComponent,
1395
+ SignOutButtonComponent
1396
+ ],
1397
+ providers: []
1383
1398
  })
1384
- ], FormsHtmlEditorComponent);
1385
- return FormsHtmlEditorComponent;
1386
- }(BaseHtmlEditorComponent));
1399
+ ], AnatolyIdentityModule);
1400
+ return AnatolyIdentityModule;
1401
+ }());
1402
+
1403
+ // Components
1387
1404
 
1388
1405
  /*
1389
1406
  <file>
@@ -1391,65 +1408,189 @@
1391
1408
  Vadim Osovitny
1392
1409
 
1393
1410
  Created:
1394
- 3 Jun 2018
1411
+ 10 Nov 2017
1395
1412
 
1396
1413
  Version:
1397
1414
  1.0
1398
1415
 
1399
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1416
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1400
1417
  </file>
1401
1418
  */
1402
- var AnatolyUIModule = /** @class */ (function () {
1403
- function AnatolyUIModule() {
1419
+ var AnatolyBillingModule = /** @class */ (function () {
1420
+ function AnatolyBillingModule() {
1404
1421
  }
1405
- AnatolyUIModule = __decorate([
1422
+ AnatolyBillingModule = __decorate([
1406
1423
  core.NgModule({
1407
1424
  imports: [
1408
1425
  common.CommonModule,
1409
- forms.ReactiveFormsModule,
1410
- forms.FormsModule,
1411
1426
  http.HttpClientModule,
1412
1427
  http.HttpClientXsrfModule,
1413
1428
  http.HttpClientJsonpModule,
1414
- angularFroalaWysiwyg.FroalaEditorModule.forRoot(),
1415
- angularFroalaWysiwyg.FroalaViewModule.forRoot(),
1416
- kendoAngularGrid.GridModule,
1417
- kendoAngularPopup.PopupModule,
1418
- kendoAngularButtons.ButtonsModule,
1419
- kendoAngularDropdowns.DropDownsModule
1429
+ AnatolyIdentityModule
1420
1430
  ],
1421
1431
  exports: [
1422
1432
  common.CommonModule,
1423
1433
  http.HttpClientModule,
1424
1434
  http.HttpClientXsrfModule,
1425
1435
  http.HttpClientJsonpModule,
1426
- ItemValidationSummaryComponent,
1427
- FormValidationSummaryComponent,
1428
- ContentHeaderComponent,
1429
- HtmlEditorComponent,
1430
- FormsHtmlEditorComponent
1436
+ SubscribePlanButtonComponent,
1437
+ UpgradePlanButtonComponent,
1438
+ BuyAccessButtonComponent
1431
1439
  ],
1432
1440
  declarations: [
1433
- ItemValidationSummaryComponent,
1434
- FormValidationSummaryComponent,
1435
- ContentHeaderComponent,
1436
- HtmlEditorComponent,
1437
- FormsHtmlEditorComponent
1441
+ SubscribePlanButtonComponent,
1442
+ UpgradePlanButtonComponent,
1443
+ BuyAccessButtonComponent
1438
1444
  ],
1439
- providers: [],
1440
- schemas: [
1441
- core.CUSTOM_ELEMENTS_SCHEMA,
1442
- core.NO_ERRORS_SCHEMA
1445
+ providers: [
1446
+ BaseBillingApiService
1443
1447
  ]
1444
1448
  })
1445
- ], AnatolyUIModule);
1446
- return AnatolyUIModule;
1449
+ ], AnatolyBillingModule);
1450
+ return AnatolyBillingModule;
1451
+ }());
1452
+
1453
+ // Components
1454
+
1455
+ /*
1456
+ <file>
1457
+ Authors:
1458
+ Vadim Osovitny
1459
+
1460
+ Created:
1461
+ 29 Apr 2018
1462
+
1463
+ Version:
1464
+ 1.0
1465
+
1466
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1467
+ </file>
1468
+ */
1469
+ var BaseGridEditService = /** @class */ (function (_super) {
1470
+ __extends(BaseGridEditService, _super);
1471
+ function BaseGridEditService(http) {
1472
+ var _this = _super.call(this, []) || this;
1473
+ _this.http = http;
1474
+ _this.data = [];
1475
+ _this.baseUrl = Consts.ApiUrl;
1476
+ _this.baseReadUrl = _this.baseUrl + "getAll";
1477
+ return _this;
1478
+ }
1479
+ BaseGridEditService.prototype.serializeParams = function (data) {
1480
+ return data ? ('?' + $.param(data)) : '';
1481
+ };
1482
+ BaseGridEditService.prototype.reset = function () {
1483
+ this.data = [];
1484
+ };
1485
+ BaseGridEditService.prototype.resetItem = function (dataItem) {
1486
+ if (!dataItem) {
1487
+ return;
1488
+ }
1489
+ //find orignal data item
1490
+ var originalDataItem = this.data.find(function (item) { return item.Id === dataItem.Id; });
1491
+ //revert changes
1492
+ Object.assign(originalDataItem, dataItem);
1493
+ _super.prototype.next.call(this, this.data);
1494
+ };
1495
+ BaseGridEditService.prototype.read = function (params) {
1496
+ var _this = this;
1497
+ if (this.data.length) {
1498
+ return _super.prototype.next.call(this, this.data);
1499
+ }
1500
+ var url = this.baseReadUrl;
1501
+ if (typeof params === 'undefined') {
1502
+ params = this.savedReadParams;
1503
+ }
1504
+ if (typeof params !== 'undefined') {
1505
+ url = this.baseReadUrl + ("" + this.serializeParams(params));
1506
+ this.savedReadParams = params;
1507
+ }
1508
+ // this.http.get(url)
1509
+ // .map(res => <any[]>res)
1510
+ // .do(data => { this.data = data; }).subscribe(data => { super.next(data); });
1511
+ //}
1512
+ this.http.get(url).pipe(operators.map(function (res) { return res; })).subscribe(function (data) { _super.prototype.next.call(_this, data); });
1513
+ };
1514
+ BaseGridEditService.prototype.save = function (data, isNew, sucess) {
1515
+ var _this = this;
1516
+ var action = isNew ? 'add' : 'update';
1517
+ this.reset();
1518
+ this.post(action, data).subscribe(function () {
1519
+ }, function () {
1520
+ _this.read();
1521
+ }, function () {
1522
+ _this.read();
1523
+ if (sucess)
1524
+ sucess();
1525
+ });
1526
+ };
1527
+ BaseGridEditService.prototype.remove = function (data, sucess) {
1528
+ var _this = this;
1529
+ this.reset();
1530
+ this.post('remove', data).subscribe(function () {
1531
+ }, function () {
1532
+ _this.read();
1533
+ }, function () {
1534
+ _this.read();
1535
+ if (sucess)
1536
+ sucess();
1537
+ });
1538
+ };
1539
+ BaseGridEditService.prototype.post = function (action, data) {
1540
+ var url = this.baseUrl + ("" + action + this.serializeParams(data));
1541
+ return this.http.post(url, data).pipe(operators.map(function (res) { return res; }));
1542
+ };
1543
+ BaseGridEditService.ctorParameters = function () { return [
1544
+ { type: http.HttpClient }
1545
+ ]; };
1546
+ BaseGridEditService = __decorate([
1547
+ core.Injectable()
1548
+ ], BaseGridEditService);
1549
+ return BaseGridEditService;
1550
+ }(rxjs.BehaviorSubject));
1551
+
1552
+ /*
1553
+ <file>
1554
+ Authors:
1555
+ Vadim Osovitny
1556
+
1557
+ Created:
1558
+ 4 Mar 2020
1559
+
1560
+ Version:
1561
+ 1.0
1562
+
1563
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1564
+ </file>
1565
+ */
1566
+ var AnatolyDataModule = /** @class */ (function () {
1567
+ function AnatolyDataModule() {
1568
+ }
1569
+ AnatolyDataModule = __decorate([
1570
+ core.NgModule({
1571
+ imports: [
1572
+ common.CommonModule,
1573
+ http.HttpClientModule,
1574
+ http.HttpClientXsrfModule,
1575
+ http.HttpClientJsonpModule
1576
+ ],
1577
+ exports: [
1578
+ common.CommonModule,
1579
+ http.HttpClientModule,
1580
+ http.HttpClientXsrfModule,
1581
+ http.HttpClientJsonpModule
1582
+ ],
1583
+ declarations: [],
1584
+ providers: []
1585
+ })
1586
+ ], AnatolyDataModule);
1587
+ return AnatolyDataModule;
1447
1588
  }());
1448
1589
 
1449
1590
  exports.AnatolyBillingModule = AnatolyBillingModule;
1450
1591
  exports.AnatolyCoreModule = AnatolyCoreModule;
1592
+ exports.AnatolyDataModule = AnatolyDataModule;
1451
1593
  exports.AnatolyIdentityModule = AnatolyIdentityModule;
1452
- exports.AnatolyUIModule = AnatolyUIModule;
1453
1594
  exports.AppContextService = AppContextService;
1454
1595
  exports.BaseApiService = BaseApiService;
1455
1596
  exports.BaseBillingApiService = BaseBillingApiService;
@@ -1458,6 +1599,7 @@
1458
1599
  exports.BaseGoService = BaseGoService;
1459
1600
  exports.BaseGridEditService = BaseGridEditService;
1460
1601
  exports.BuyAccessButtonComponent = BuyAccessButtonComponent;
1602
+ exports.Consts = Consts;
1461
1603
  exports.ContentHeaderComponent = ContentHeaderComponent;
1462
1604
  exports.FormValidationSummaryComponent = FormValidationSummaryComponent;
1463
1605
  exports.FormsHtmlEditorComponent = FormsHtmlEditorComponent;