@osovitny/anatoly 2.0.8 → 2.0.10

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 (66) hide show
  1. package/bundles/osovitny-anatoly.umd.js +549 -144
  2. package/bundles/osovitny-anatoly.umd.js.map +1 -1
  3. package/bundles/osovitny-anatoly.umd.min.js +2 -2
  4. package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
  5. package/esm2015/lib/core/alerts.js +5 -1
  6. package/esm2015/lib/core/core.module.js +21 -5
  7. package/esm2015/lib/core/guards/once-import.guard.js +24 -0
  8. package/esm2015/lib/core/guid.js +25 -0
  9. package/esm2015/lib/core/index.js +23 -1
  10. package/esm2015/lib/core/logging/globalErrorHandler.js +42 -0
  11. package/esm2015/lib/core/logging/logging.service.js +38 -0
  12. package/esm2015/lib/core/services/appcontext.service.js +5 -1
  13. package/esm2015/lib/core/services/base-go.service.js +5 -1
  14. package/esm2015/lib/core/subs.js +34 -0
  15. package/esm2015/lib/core/utils.js +29 -5
  16. package/esm2015/lib/data/base/base-api.service.js +22 -16
  17. package/esm2015/lib/data/base/grid/base-grid-edit.service.js +15 -13
  18. package/esm2015/lib/data/base/grid/base-grid-read.service.js +16 -9
  19. package/esm2015/lib/data/data.module.js +11 -18
  20. package/esm2015/lib/data/index.js +24 -6
  21. package/esm2015/lib/data/services/billing-api.service.js +32 -17
  22. package/esm2015/lib/ui/components/base-edit.component.js +11 -7
  23. package/esm2015/lib/ui/components/base.component.js +12 -8
  24. package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +12 -9
  25. package/esm2015/lib/ui/components/billing/subscribe-plan-button.component.js +10 -6
  26. package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +11 -7
  27. package/esm2015/lib/ui/components/content-header/content-header.component.js +8 -4
  28. package/esm2015/lib/ui/components/copy-2-clipboard/copy-2-clipboard.component.js +45 -0
  29. package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +13 -8
  30. package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +9 -6
  31. package/esm2015/lib/ui/components/html-editor/html-editor.component.js +10 -7
  32. package/esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js +75 -18
  33. package/esm2015/lib/ui/components/identity/signin-button.component.js +8 -4
  34. package/esm2015/lib/ui/components/identity/signout-button.component.js +8 -4
  35. package/esm2015/lib/ui/components/identity/signup-button.component.js +6 -2
  36. package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +5 -1
  37. package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +5 -1
  38. package/esm2015/lib/ui/components/validation/validation-summary.component.js +5 -1
  39. package/esm2015/lib/ui/index.js +20 -1
  40. package/esm2015/lib/ui/ui.module.js +12 -4
  41. package/fesm2015/osovitny-anatoly.js +555 -115
  42. package/fesm2015/osovitny-anatoly.js.map +1 -1
  43. package/lib/core/core.module.d.ts +4 -0
  44. package/lib/core/guards/once-import.guard.d.ts +1 -0
  45. package/lib/core/guid.d.ts +3 -0
  46. package/lib/core/index.d.ts +4 -0
  47. package/lib/core/logging/globalErrorHandler.d.ts +6 -0
  48. package/lib/core/logging/logging.service.d.ts +5 -0
  49. package/lib/core/subs.d.ts +8 -0
  50. package/lib/core/utils.d.ts +4 -2
  51. package/lib/data/base/base-api.service.d.ts +2 -2
  52. package/lib/data/base/grid/base-grid-edit.service.d.ts +3 -3
  53. package/lib/data/base/grid/base-grid-read.service.d.ts +2 -2
  54. package/lib/data/index.d.ts +5 -5
  55. package/lib/data/services/billing-api.service.d.ts +2 -2
  56. package/lib/ui/components/base-edit.component.d.ts +2 -2
  57. package/lib/ui/components/billing/buyaccess-button.component.d.ts +3 -3
  58. package/lib/ui/components/billing/subscribe-plan-button.component.d.ts +2 -2
  59. package/lib/ui/components/billing/upgrade-plan-button.component.d.ts +1 -1
  60. package/lib/ui/components/content-header/content-header.component.d.ts +1 -1
  61. package/lib/ui/components/copy-2-clipboard/copy-2-clipboard.component.d.ts +5 -0
  62. package/lib/ui/components/html-editor/base-html-editor.component.d.ts +2 -2
  63. package/lib/ui/components/html-editor/forms-html-editor.component.d.ts +1 -1
  64. package/lib/ui/components/html-editor/html-editor.component.d.ts +1 -1
  65. package/lib/ui/ui.module.d.ts +1 -1
  66. package/package.json +1 -1
@@ -1,15 +1,19 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sweetalert2'), require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('@angular/common'), require('rxjs'), require('@angular/forms'), require('angular-froala-wysiwyg')) :
3
- typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', 'sweetalert2', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', '@angular/common', 'rxjs', '@angular/forms', 'angular-froala-wysiwyg'], factory) :
4
- (global = global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.Swal, global.ng.core, global.ng.router, global.ng.common.http, global.rxjs.operators, global.ng.common, global.rxjs, global.ng.forms, global.angularFroalaWysiwyg));
5
- }(this, (function (exports, Swal, core, router, http, operators, common, rxjs, forms, angularFroalaWysiwyg) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sweetalert2'), require('uuid'), require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('@angular/common'), require('rxjs'), require('@angular/forms'), require('angular-froala-wysiwyg')) :
3
+ typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', 'sweetalert2', 'uuid', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', '@angular/common', 'rxjs', '@angular/forms', 'angular-froala-wysiwyg'], factory) :
4
+ (global = global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.Swal, global.uuid, global.ng.core, global.ng.router, global.ng.common.http, global.rxjs.operators, global.ng.common, global.rxjs, global.ng.forms, global.angularFroalaWysiwyg));
5
+ }(this, (function (exports, Swal, uuid, i0, router, http, operators, common, rxjs, forms, angularFroalaWysiwyg) { 'use strict';
6
6
 
7
7
  Swal = Swal && Object.prototype.hasOwnProperty.call(Swal, 'default') ? Swal['default'] : Swal;
8
8
 
9
9
  /*
10
10
  <file>
11
+ Project:
12
+ @osovitny/anatoly
13
+
11
14
  Authors:
12
15
  Vadim Osovitny
16
+ Anatoly Osovitny
13
17
 
14
18
  Created:
15
19
  4 Mar 2020
@@ -151,11 +155,15 @@
151
155
 
152
156
  /*
153
157
  <file>
158
+ Project:
159
+ @osovitny/anatoly
160
+
154
161
  Authors:
155
162
  Vadim Osovitny
163
+ Anatoly Osovitny
156
164
 
157
165
  Created:
158
- 4 Mar 2020
166
+ 26 Jun 2020
159
167
 
160
168
  Version:
161
169
  1.0
@@ -166,23 +174,117 @@
166
174
  var Utils = /** @class */ (function () {
167
175
  function Utils() {
168
176
  }
169
- Utils.GetValueByNameInQS = function (name) {
170
- return Utils.GetValueByName(location.search, name);
177
+ Utils.getValueByNameInQS = function (name) {
178
+ return Utils.getValueByName(location.search, name);
171
179
  };
172
- Utils.GetValueByName = function (url, name) {
180
+ Utils.getValueByName = function (url, name) {
173
181
  name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
174
182
  var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
175
183
  return results === null
176
184
  ? ""
177
185
  : decodeURIComponent(results[1].replace(/\+/g, " "));
178
186
  };
187
+ Utils.copyToClipBoard = function (event, val) {
188
+ event.preventDefault();
189
+ var selBox = document.createElement("textarea");
190
+ selBox.style.position = "fixed";
191
+ selBox.style.left = "0";
192
+ selBox.style.top = "0";
193
+ selBox.style.opacity = "0";
194
+ selBox.value = val;
195
+ document.body.appendChild(selBox);
196
+ selBox.focus();
197
+ selBox.select();
198
+ document.execCommand("copy");
199
+ document.body.removeChild(selBox);
200
+ };
201
+ Utils.downloadFile = function (name, url) {
202
+ var link = document.createElement("a");
203
+ link.download = name;
204
+ link.href = url;
205
+ link.click();
206
+ };
179
207
  return Utils;
180
208
  }());
181
209
 
182
210
  /*
183
211
  <file>
212
+ Project:
213
+ @osovitny/anatoly
214
+
184
215
  Authors:
185
216
  Vadim Osovitny
217
+ Anatoly Osovitny
218
+
219
+ Created:
220
+ 26 Jun 2020
221
+
222
+ Version:
223
+ 1.0
224
+
225
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
226
+ </file>
227
+ */
228
+ var Subs = /** @class */ (function () {
229
+ function Subs() {
230
+ this.subs = [];
231
+ }
232
+ Subs.prototype.add = function () {
233
+ var subscriptions = [];
234
+ for (var _i = 0; _i < arguments.length; _i++) {
235
+ subscriptions[_i] = arguments[_i];
236
+ }
237
+ this.subs = this.subs.concat(subscriptions);
238
+ };
239
+ Object.defineProperty(Subs.prototype, "sink", {
240
+ set: function (subscription) {
241
+ this.subs.push(subscription);
242
+ },
243
+ enumerable: false,
244
+ configurable: true
245
+ });
246
+ Subs.prototype.unsubscribe = function () {
247
+ this.subs.forEach(function (sub) { return sub && sub.unsubscribe(); });
248
+ this.subs = [];
249
+ };
250
+ return Subs;
251
+ }());
252
+
253
+ /*
254
+ <file>
255
+ Project:
256
+ @osovitny/anatoly
257
+
258
+ Authors:
259
+ Vadim Osovitny
260
+ Anatoly Osovitny
261
+
262
+ Created:
263
+ 26 Jun 2020
264
+
265
+ Version:
266
+ 1.0
267
+
268
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
269
+ </file>
270
+ */
271
+ var Guid = /** @class */ (function () {
272
+ function Guid() {
273
+ }
274
+ Guid.newGuid = function () {
275
+ return uuid.v4();
276
+ };
277
+ return Guid;
278
+ }());
279
+
280
+ /*
281
+ <file>
282
+ Project:
283
+ @osovitny/anatoly
284
+
285
+ Authors:
286
+ Vadim Osovitny
287
+ Anatoly Osovitny
186
288
 
187
289
  Created:
188
290
  17 Jun 2018
@@ -205,7 +307,7 @@
205
307
  return BaseGoService;
206
308
  }());
207
309
  BaseGoService.decorators = [
208
- { type: core.Injectable }
310
+ { type: i0.Injectable }
209
311
  ];
210
312
  BaseGoService.ctorParameters = function () { return [
211
313
  { type: router.ActivatedRoute },
@@ -515,11 +617,15 @@
515
617
 
516
618
  /*
517
619
  <file>
620
+ Project:
621
+ @osovitny/anatoly
622
+
518
623
  Authors:
519
624
  Vadim Osovitny
625
+ Anatoly Osovitny
520
626
 
521
627
  Created:
522
- 13 Nov 2017
628
+ 13 Nov 2017
523
629
 
524
630
  Version:
525
631
  1.0
@@ -533,43 +639,45 @@
533
639
  this.baseUrl = "";
534
640
  }
535
641
  BaseApiService.prototype.serializeParams = function (data) {
536
- return data ? ('?' + $.param(data)) : '';
642
+ return data ? "?" + $.param(data) : "";
537
643
  };
538
644
  //api
539
645
  BaseApiService.prototype.get = function (action, data, responseType) {
540
646
  if (!responseType) {
541
- responseType = 'json';
647
+ responseType = "json";
542
648
  }
543
649
  var url = this.baseUrl + "/" + action + this.serializeParams(data);
544
- return this.http.get(url, { responseType: responseType }).pipe(operators.map(function (res) { return res; }));
650
+ return this.http
651
+ .get(url, { responseType: responseType })
652
+ .pipe(operators.map(function (res) { return res; }));
545
653
  };
546
654
  BaseApiService.prototype.post = function (action, data, responseType) {
547
655
  if (!responseType) {
548
- responseType = 'text';
656
+ responseType = "text";
549
657
  }
550
658
  var url = this.baseUrl + "/" + action;
551
659
  return this.http.post(url, data, { responseType: responseType });
552
660
  };
553
661
  BaseApiService.prototype.postQS = function (action, data, responseType) {
554
662
  if (!responseType) {
555
- responseType = 'text';
663
+ responseType = "text";
556
664
  }
557
665
  var url = this.baseUrl + "/" + action + this.serializeParams(data);
558
666
  return this.http.post(url, null, { responseType: responseType });
559
667
  };
560
668
  BaseApiService.prototype.delete = function (action, data, responseType) {
561
669
  if (!responseType) {
562
- responseType = 'text';
670
+ responseType = "text";
563
671
  }
564
672
  var url = this.baseUrl + "/" + action + this.serializeParams(data);
565
673
  return this.http.delete(url, { responseType: responseType });
566
674
  };
567
675
  //gets
568
676
  BaseApiService.prototype.getById = function (id) {
569
- return this.get('getById', { id: id });
677
+ return this.get("getById", { id: id });
570
678
  };
571
679
  BaseApiService.prototype.getAll = function (data) {
572
- return this.get('getall', data).pipe(operators.map(function (res) { return res; }));
680
+ return this.get("getall", data).pipe(operators.map(function (res) { return res; }));
573
681
  };
574
682
  BaseApiService.prototype.getJsonFile = function (fileName, jsonUrl, jsonVersion) {
575
683
  if (!jsonUrl) {
@@ -578,17 +686,17 @@
578
686
  if (!jsonVersion) {
579
687
  jsonVersion = "1.0";
580
688
  }
581
- var url = jsonUrl + "/" + fileName + '?' + jsonVersion;
689
+ var url = jsonUrl + "/" + fileName + "?" + jsonVersion;
582
690
  return this.http.get(url).pipe(operators.map(function (res) { return res; }));
583
691
  };
584
692
  BaseApiService.prototype.getNewGuid = function () {
585
693
  var url = this.baseUrl + "/getNewGuid";
586
- return this.http.get(url, { responseType: 'text' });
694
+ return this.http.get(url, { responseType: "text" });
587
695
  };
588
696
  return BaseApiService;
589
697
  }());
590
698
  BaseApiService.decorators = [
591
- { type: core.Injectable }
699
+ { type: i0.Injectable }
592
700
  ];
593
701
  BaseApiService.ctorParameters = function () { return [
594
702
  { type: http.HttpClient }
@@ -642,24 +750,152 @@
642
750
  return AppContextService;
643
751
  }(BaseApiService));
644
752
  AppContextService.decorators = [
645
- { type: core.Injectable }
753
+ { type: i0.Injectable }
646
754
  ];
647
755
  AppContextService.ctorParameters = function () { return [
648
756
  { type: http.HttpClient }
649
757
  ]; };
650
758
 
759
+ /*
760
+ <file>
761
+ Project:
762
+ @osovitny/anatoly
763
+
764
+ Authors:
765
+ Vadim Osovitny
766
+ Anatoly Osovitny
767
+
768
+ Created:
769
+ 26 Jun 2020
770
+
771
+ Version:
772
+ 1.0
773
+
774
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
775
+ </file>
776
+ */
777
+ var LoggingService = /** @class */ (function () {
778
+ function LoggingService() {
779
+ }
780
+ LoggingService.prototype.logError = function (error) {
781
+ console.error(error);
782
+ };
783
+ LoggingService.prototype.logInformation = function (info) {
784
+ console.info(info);
785
+ };
786
+ return LoggingService;
787
+ }());
788
+ LoggingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LoggingService_Factory() { return new LoggingService(); }, token: LoggingService, providedIn: "root" });
789
+ LoggingService.decorators = [
790
+ { type: i0.Injectable, args: [{
791
+ providedIn: "root",
792
+ },] }
793
+ ];
794
+ LoggingService.ctorParameters = function () { return []; };
795
+
796
+ /*
797
+ <file>
798
+ Project:
799
+ @osovitny/anatoly
800
+
801
+ Authors:
802
+ Vadim Osovitny
803
+ Anatoly Osovitny
804
+
805
+ Created:
806
+ 26 Jun 2020
807
+
808
+ Version:
809
+ 1.0
810
+
811
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
812
+ </file>
813
+ */
814
+ var GlobalErrorHandler = /** @class */ (function () {
815
+ function GlobalErrorHandler(injector) {
816
+ this.injector = injector;
817
+ }
818
+ GlobalErrorHandler.prototype.handleError = function (error) {
819
+ var loggingService = this.injector.get(LoggingService);
820
+ loggingService.logError(error);
821
+ // IMPORTANT: Rethrow the error otherwise it gets swallowed
822
+ throw error;
823
+ };
824
+ return GlobalErrorHandler;
825
+ }());
826
+ GlobalErrorHandler.decorators = [
827
+ { type: i0.Injectable }
828
+ ];
829
+ GlobalErrorHandler.ctorParameters = function () { return [
830
+ { type: i0.Injector }
831
+ ]; };
832
+
833
+ /*
834
+ <file>
835
+ Project:
836
+ @osovitny/anatoly
837
+
838
+ Authors:
839
+ Vadim Osovitny
840
+ Anatoly Osovitny
841
+
842
+ Created:
843
+ 26 Jun 2020
844
+
845
+ Version:
846
+ 1.0
847
+
848
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
849
+ </file>
850
+ */
851
+ function throwIfAlreadyLoaded(parentModule, moduleName) {
852
+ if (parentModule) {
853
+ throw new Error(moduleName + " has already been loaded. Import " + moduleName + " modules in the AppModule only.");
854
+ }
855
+ }
856
+
857
+ var providers = [
858
+ LoggingService,
859
+ AppContextService,
860
+ ];
861
+ var InjectorInstance;
651
862
  var AnatolyCoreModule = /** @class */ (function () {
652
- function AnatolyCoreModule() {
863
+ function AnatolyCoreModule(injector, parentModule) {
864
+ this.injector = injector;
865
+ throwIfAlreadyLoaded(parentModule, "AnatolyCoreModule");
866
+ InjectorInstance = this.injector;
653
867
  }
654
868
  return AnatolyCoreModule;
655
869
  }());
656
870
  AnatolyCoreModule.decorators = [
657
- { type: core.NgModule, args: [{
658
- declarations: [],
871
+ { type: i0.NgModule, args: [{
659
872
  imports: [common.CommonModule],
660
- providers: [AppContextService],
873
+ providers: __spread(providers),
661
874
  },] }
662
- ];
875
+ ];
876
+ AnatolyCoreModule.ctorParameters = function () { return [
877
+ { type: i0.Injector },
878
+ { type: AnatolyCoreModule, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
879
+ ]; };
880
+
881
+ /*
882
+ <file>
883
+ Project:
884
+ @osovitny/anatoly
885
+
886
+ Authors:
887
+ Vadim Osovitny
888
+ Anatoly Osovitny
889
+
890
+ Created:
891
+ 26 Jun 2020
892
+
893
+ Version:
894
+ 1.0
895
+
896
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
897
+ </file>
898
+ */
663
899
 
664
900
  var BaseGridReadService = /** @class */ (function (_super) {
665
901
  __extends(BaseGridReadService, _super);
@@ -671,7 +907,7 @@
671
907
  return _this;
672
908
  }
673
909
  BaseGridReadService.prototype.serializeParams = function (data) {
674
- return data ? ('?' + $.param(data)) : '';
910
+ return data ? "?" + $.param(data) : "";
675
911
  };
676
912
  BaseGridReadService.prototype.read = function (params, success, error) {
677
913
  var _this = this;
@@ -679,14 +915,17 @@
679
915
  return _super.prototype.next.call(this, this.data);
680
916
  }
681
917
  var url = this.baseReadUrl;
682
- if (typeof params === 'undefined') {
918
+ if (typeof params === "undefined") {
683
919
  params = this.savedReadParams;
684
920
  }
685
921
  if (params) {
686
922
  url = this.baseReadUrl + ("" + this.serializeParams(params));
687
923
  this.savedReadParams = params;
688
924
  }
689
- this.http.get(url).pipe(operators.map(function (res) { return res; })).subscribe(function (data) {
925
+ this.http
926
+ .get(url)
927
+ .pipe(operators.map(function (res) { return res; }))
928
+ .subscribe(function (data) {
690
929
  _super.prototype.next.call(_this, data);
691
930
  if (success)
692
931
  success();
@@ -698,7 +937,7 @@
698
937
  return BaseGridReadService;
699
938
  }(rxjs.BehaviorSubject));
700
939
  BaseGridReadService.decorators = [
701
- { type: core.Injectable }
940
+ { type: i0.Injectable }
702
941
  ];
703
942
  BaseGridReadService.ctorParameters = function () { return [
704
943
  { type: http.HttpClient }
@@ -727,10 +966,9 @@
727
966
  };
728
967
  BaseGridEditService.prototype.save = function (data, isNew, sucess) {
729
968
  var _this = this;
730
- var action = isNew ? 'add' : 'update';
969
+ var action = isNew ? "add" : "update";
731
970
  this.reset();
732
- this.post(action, data).subscribe(function () {
733
- }, function () {
971
+ this.post(action, data).subscribe(function () { }, function () {
734
972
  _this.read();
735
973
  }, function () {
736
974
  _this.read();
@@ -741,8 +979,7 @@
741
979
  BaseGridEditService.prototype.remove = function (data, sucess) {
742
980
  var _this = this;
743
981
  this.reset();
744
- this.post('remove', data).subscribe(function () {
745
- }, function () {
982
+ this.post("remove", data).subscribe(function () { }, function () {
746
983
  _this.read();
747
984
  }, function () {
748
985
  _this.read();
@@ -757,7 +994,7 @@
757
994
  return BaseGridEditService;
758
995
  }(BaseGridReadService));
759
996
  BaseGridEditService.decorators = [
760
- { type: core.Injectable }
997
+ { type: i0.Injectable }
761
998
  ];
762
999
  BaseGridEditService.ctorParameters = function () { return [
763
1000
  { type: http.HttpClient }
@@ -768,12 +1005,13 @@
768
1005
  function BillingApiService(http) {
769
1006
  var _this = _super.call(this, http) || this;
770
1007
  _this.http = http;
771
- _this.baseUrl += 'billing/';
1008
+ _this.baseUrl += "billing/";
772
1009
  return _this;
773
1010
  }
774
1011
  BillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
775
- this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
776
- .subscribe(function (data) { }, function (e) {
1012
+ this.postQS("requestNewSubscription", {
1013
+ requestedPlan: requestedPlan,
1014
+ }).subscribe(function (data) { }, function (e) {
777
1015
  if (error)
778
1016
  error();
779
1017
  }, function () {
@@ -782,8 +1020,7 @@
782
1020
  });
783
1021
  };
784
1022
  BillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
785
- this.postQS('cancelRequestedSubscription', null)
786
- .subscribe(function (data) { }, function (e) {
1023
+ this.postQS("cancelRequestedSubscription", null).subscribe(function (data) { }, function (e) {
787
1024
  if (error)
788
1025
  error();
789
1026
  }, function () {
@@ -792,8 +1029,7 @@
792
1029
  });
793
1030
  };
794
1031
  BillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
795
- this.postQS('buyAccess', { requestedPlan: requestedPlan })
796
- .subscribe(function (data) { }, function (e) {
1032
+ this.postQS("buyAccess", { requestedPlan: requestedPlan }).subscribe(function (data) { }, function (e) {
797
1033
  if (error)
798
1034
  error();
799
1035
  }, function () {
@@ -804,7 +1040,7 @@
804
1040
  return BillingApiService;
805
1041
  }(BaseApiService));
806
1042
  BillingApiService.decorators = [
807
- { type: core.Injectable }
1043
+ { type: i0.Injectable }
808
1044
  ];
809
1045
  BillingApiService.ctorParameters = function () { return [
810
1046
  { type: http.HttpClient }
@@ -812,8 +1048,12 @@
812
1048
 
813
1049
  /*
814
1050
  <file>
1051
+ Project:
1052
+ @osovitny/anatoly
1053
+
815
1054
  Authors:
816
1055
  Vadim Osovitny
1056
+ Anatoly Osovitny
817
1057
 
818
1058
  Created:
819
1059
  4 Mar 2020
@@ -830,30 +1070,39 @@
830
1070
  return AnatolyDataModule;
831
1071
  }());
832
1072
  AnatolyDataModule.decorators = [
833
- { type: core.NgModule, args: [{
834
- imports: [
835
- common.CommonModule,
836
- http.HttpClientModule,
837
- http.HttpClientXsrfModule,
838
- http.HttpClientJsonpModule
839
- ],
840
- exports: [
841
- common.CommonModule,
842
- http.HttpClientModule,
843
- http.HttpClientXsrfModule,
844
- http.HttpClientJsonpModule
845
- ],
846
- declarations: [],
847
- providers: []
1073
+ { type: i0.NgModule, args: [{
1074
+ imports: [common.CommonModule],
1075
+ providers: [BillingApiService],
848
1076
  },] }
849
1077
  ];
850
1078
 
851
- // Services
1079
+ /*
1080
+ <file>
1081
+ Project:
1082
+ @osovitny/anatoly
1083
+
1084
+ Authors:
1085
+ Vadim Osovitny
1086
+ Anatoly Osovitny
1087
+
1088
+ Created:
1089
+ 4 Mar 2020
1090
+
1091
+ Version:
1092
+ 1.0
1093
+
1094
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1095
+ </file>
1096
+ */
852
1097
 
853
1098
  /*
854
1099
  <file>
1100
+ Project:
1101
+ @osovitny/anatoly
1102
+
855
1103
  Authors:
856
1104
  Vadim Osovitny
1105
+ Anatoly Osovitny
857
1106
 
858
1107
  Created:
859
1108
  1 Jun 2018
@@ -870,9 +1119,9 @@
870
1119
  this.contextUpdated = false;
871
1120
  this.isUserSignedIn = false;
872
1121
  this.currentPlan = 0;
873
- this.currentPlanTitle = '';
1122
+ this.currentPlanTitle = "";
874
1123
  this.requestedPlan = 0;
875
- this.requestedPlanTitle = '';
1124
+ this.requestedPlanTitle = "";
876
1125
  }
877
1126
  SubscribePlanButtonComponent.prototype.ngOnInit = function () {
878
1127
  var _this = this;
@@ -894,8 +1143,8 @@
894
1143
  return SubscribePlanButtonComponent;
895
1144
  }());
896
1145
  SubscribePlanButtonComponent.decorators = [
897
- { type: core.Component, args: [{
898
- selector: 'anatoly-subscribe-plan-button',
1146
+ { type: i0.Component, args: [{
1147
+ selector: "anatoly-subscribe-plan-button",
899
1148
  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"
900
1149
  },] }
901
1150
  ];
@@ -903,14 +1152,18 @@
903
1152
  { type: AppContextService }
904
1153
  ]; };
905
1154
  SubscribePlanButtonComponent.propDecorators = {
906
- plan: [{ type: core.Input }],
907
- plantitle: [{ type: core.Input }]
1155
+ plan: [{ type: i0.Input }],
1156
+ plantitle: [{ type: i0.Input }]
908
1157
  };
909
1158
 
910
1159
  /*
911
1160
  <file>
1161
+ Project:
1162
+ @osovitny/anatoly
1163
+
912
1164
  Authors:
913
1165
  Vadim Osovitny
1166
+ Anatoly Osovitny
914
1167
 
915
1168
  Created:
916
1169
  12 Nov 2017
@@ -929,9 +1182,9 @@
929
1182
  UpgradePlanButtonComponent.prototype.onUpgradePlan = function () {
930
1183
  var text = "Current plan: " + this.currentplantitle + " New plan: " + this.requestedplantitle;
931
1184
  var that = this;
932
- Alerts.AreYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', function () {
1185
+ Alerts.AreYouSure(text, "Change billing plan", "Confirm change", "Cancel", function () {
933
1186
  that.api.requestNewSubscription(that.requestedplan, function () {
934
- Alerts.Success('Your request for changing plan has been sent.', null, function () {
1187
+ Alerts.Success("Your request for changing plan has been sent.", null, function () {
935
1188
  window.location.reload();
936
1189
  });
937
1190
  });
@@ -940,8 +1193,8 @@
940
1193
  return UpgradePlanButtonComponent;
941
1194
  }());
942
1195
  UpgradePlanButtonComponent.decorators = [
943
- { type: core.Component, args: [{
944
- selector: 'anatoly-upgrade-plan-button',
1196
+ { type: i0.Component, args: [{
1197
+ selector: "anatoly-upgrade-plan-button",
945
1198
  template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
946
1199
  },] }
947
1200
  ];
@@ -949,13 +1202,16 @@
949
1202
  { type: BillingApiService }
950
1203
  ]; };
951
1204
  UpgradePlanButtonComponent.propDecorators = {
952
- currentplantitle: [{ type: core.Input }],
953
- requestedplan: [{ type: core.Input }],
954
- requestedplantitle: [{ type: core.Input }]
1205
+ currentplantitle: [{ type: i0.Input }],
1206
+ requestedplan: [{ type: i0.Input }],
1207
+ requestedplantitle: [{ type: i0.Input }]
955
1208
  };
956
1209
 
957
1210
  /*
958
1211
  <file>
1212
+ Project:
1213
+ @osovitny/anatoly
1214
+
959
1215
  Authors:
960
1216
  Vadim Osovitny
961
1217
  Anatoly Osovitny
@@ -976,7 +1232,7 @@
976
1232
  this.contextUpdated = false;
977
1233
  this.isUserSignedIn = false;
978
1234
  this.currentPlan = 0;
979
- this.currentPlanTitle = '';
1235
+ this.currentPlanTitle = "";
980
1236
  }
981
1237
  BuyAccessButtonComponent.prototype.ngOnInit = function () {
982
1238
  var _this = this;
@@ -996,9 +1252,9 @@
996
1252
  BuyAccessButtonComponent.prototype.onBuyPlan = function () {
997
1253
  var text = "Requested plan: " + this.plantitle + " ";
998
1254
  var that = this;
999
- Alerts.AreYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
1255
+ Alerts.AreYouSure(text, "Buying access", "Confirm change", "Cancel", function () {
1000
1256
  that.api.buyAccess(that.plan, function () {
1001
- Alerts.Success('Access Granted', null, function () {
1257
+ Alerts.Success("Access Granted", null, function () {
1002
1258
  window.location.reload();
1003
1259
  });
1004
1260
  });
@@ -1007,8 +1263,8 @@
1007
1263
  return BuyAccessButtonComponent;
1008
1264
  }());
1009
1265
  BuyAccessButtonComponent.decorators = [
1010
- { type: core.Component, args: [{
1011
- selector: 'anatoly-buyaccess-button',
1266
+ { type: i0.Component, args: [{
1267
+ selector: "anatoly-buyaccess-button",
1012
1268
  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"
1013
1269
  },] }
1014
1270
  ];
@@ -1017,14 +1273,18 @@
1017
1273
  { type: BillingApiService }
1018
1274
  ]; };
1019
1275
  BuyAccessButtonComponent.propDecorators = {
1020
- plan: [{ type: core.Input }],
1021
- plantitle: [{ type: core.Input }]
1276
+ plan: [{ type: i0.Input }],
1277
+ plantitle: [{ type: i0.Input }]
1022
1278
  };
1023
1279
 
1024
1280
  /*
1025
1281
  <file>
1282
+ Project:
1283
+ @osovitny/anatoly
1284
+
1026
1285
  Authors:
1027
1286
  Vadim Osovitny
1287
+ Anatoly Osovitny
1028
1288
 
1029
1289
  Created:
1030
1290
  4 Jul 2018
@@ -1032,7 +1292,7 @@
1032
1292
  Version:
1033
1293
  1.0
1034
1294
 
1035
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
1295
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1036
1296
  </file>
1037
1297
  */
1038
1298
  var SignInButtonComponent = /** @class */ (function () {
@@ -1041,20 +1301,24 @@
1041
1301
  return SignInButtonComponent;
1042
1302
  }());
1043
1303
  SignInButtonComponent.decorators = [
1044
- { type: core.Component, args: [{
1045
- selector: 'anatoly-signin-button',
1304
+ { type: i0.Component, args: [{
1305
+ selector: "anatoly-signin-button",
1046
1306
  template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
1047
1307
  },] }
1048
1308
  ];
1049
1309
  SignInButtonComponent.ctorParameters = function () { return []; };
1050
1310
  SignInButtonComponent.propDecorators = {
1051
- classbtn: [{ type: core.Input }]
1311
+ classbtn: [{ type: i0.Input }]
1052
1312
  };
1053
1313
 
1054
1314
  /*
1055
1315
  <file>
1316
+ Project:
1317
+ @osovitny/anatoly
1318
+
1056
1319
  Authors:
1057
1320
  Vadim Osovitny
1321
+ Anatoly Osovitny
1058
1322
 
1059
1323
  Created:
1060
1324
  4 Jul 2018
@@ -1062,7 +1326,7 @@
1062
1326
  Version:
1063
1327
  1.0
1064
1328
 
1065
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
1329
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1066
1330
  </file>
1067
1331
  */
1068
1332
  var SignUpButtonComponent = /** @class */ (function () {
@@ -1071,19 +1335,23 @@
1071
1335
  return SignUpButtonComponent;
1072
1336
  }());
1073
1337
  SignUpButtonComponent.decorators = [
1074
- { type: core.Component, args: [{
1338
+ { type: i0.Component, args: [{
1075
1339
  selector: "anatoly-signup-button",
1076
1340
  template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n"
1077
1341
  },] }
1078
1342
  ];
1079
1343
  SignUpButtonComponent.propDecorators = {
1080
- classbtn: [{ type: core.Input }]
1344
+ classbtn: [{ type: i0.Input }]
1081
1345
  };
1082
1346
 
1083
1347
  /*
1084
1348
  <file>
1349
+ Project:
1350
+ @osovitny/anatoly
1351
+
1085
1352
  Authors:
1086
1353
  Vadim Osovitny
1354
+ Anatoly Osovitny
1087
1355
 
1088
1356
  Created:
1089
1357
  4 Jul 2018
@@ -1091,7 +1359,7 @@
1091
1359
  Version:
1092
1360
  1.0
1093
1361
 
1094
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
1362
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1095
1363
  </file>
1096
1364
  */
1097
1365
  var SignOutButtonComponent = /** @class */ (function () {
@@ -1100,20 +1368,24 @@
1100
1368
  return SignOutButtonComponent;
1101
1369
  }());
1102
1370
  SignOutButtonComponent.decorators = [
1103
- { type: core.Component, args: [{
1104
- selector: 'anatoly-signout-button',
1371
+ { type: i0.Component, args: [{
1372
+ selector: "anatoly-signout-button",
1105
1373
  template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
1106
1374
  },] }
1107
1375
  ];
1108
1376
  SignOutButtonComponent.ctorParameters = function () { return []; };
1109
1377
  SignOutButtonComponent.propDecorators = {
1110
- classbtn: [{ type: core.Input }]
1378
+ classbtn: [{ type: i0.Input }]
1111
1379
  };
1112
1380
 
1113
1381
  /*
1114
1382
  <file>
1383
+ Project:
1384
+ @osovitny/anatoly
1385
+
1115
1386
  Authors:
1116
1387
  Vadim Osovitny
1388
+ Anatoly Osovitny
1117
1389
 
1118
1390
  Created:
1119
1391
  28 Aug 2018
@@ -1128,17 +1400,17 @@
1128
1400
  function BaseComponent() {
1129
1401
  }
1130
1402
  BaseComponent.prototype.getQSId = function () {
1131
- var id = Utils.GetValueByNameInQS('id');
1132
- if (typeof id === 'undefined' || id === '')
1403
+ var id = Utils.getValueByNameInQS("id");
1404
+ if (typeof id === "undefined" || id === "")
1133
1405
  return null;
1134
1406
  return id;
1135
1407
  };
1136
1408
  BaseComponent.prototype.showLoading = function () {
1137
- var panelLoading = $('#pnlLoading');
1409
+ var panelLoading = $("#pnlLoading");
1138
1410
  panelLoading.show();
1139
1411
  };
1140
1412
  BaseComponent.prototype.hideLoading = function () {
1141
- var panelLoading = $('#pnlLoading');
1413
+ var panelLoading = $("#pnlLoading");
1142
1414
  panelLoading.hide();
1143
1415
  };
1144
1416
  BaseComponent.prototype.handleError = function (e) {
@@ -1156,8 +1428,8 @@
1156
1428
  return _this;
1157
1429
  }
1158
1430
  BaseEditComponent.prototype.isActionAdding = function () {
1159
- var id = Utils.GetValueByNameInQS('id');
1160
- if (typeof id === 'undefined' || id === '')
1431
+ var id = Utils.getValueByNameInQS("id");
1432
+ if (typeof id === "undefined" || id === "")
1161
1433
  return true;
1162
1434
  return false;
1163
1435
  };
@@ -1165,7 +1437,7 @@
1165
1437
  return this.getQSId();
1166
1438
  };
1167
1439
  BaseEditComponent.prototype.isItemInvalid = function (name) {
1168
- if (typeof name === 'undefined' || name === '') {
1440
+ if (typeof name === "undefined" || name === "") {
1169
1441
  return false;
1170
1442
  }
1171
1443
  if (!this.formGroup) {
@@ -1192,8 +1464,8 @@
1192
1464
  return BaseEditComponent;
1193
1465
  }(BaseComponent));
1194
1466
  BaseEditComponent.propDecorators = {
1195
- formGroup: [{ type: core.Input }],
1196
- formSubmitted: [{ type: core.Input }]
1467
+ formGroup: [{ type: i0.Input }],
1468
+ formSubmitted: [{ type: i0.Input }]
1197
1469
  };
1198
1470
 
1199
1471
  var ValidationSummaryComponent = /** @class */ (function (_super) {
@@ -1257,14 +1529,14 @@
1257
1529
  return FormValidationSummaryComponent;
1258
1530
  }(ValidationSummaryComponent));
1259
1531
  FormValidationSummaryComponent.decorators = [
1260
- { type: core.Component, args: [{
1532
+ { type: i0.Component, args: [{
1261
1533
  selector: "anatoly-form-validation-summary",
1262
1534
  template: "<div class=\"callout callout-danger\" *ngIf=\"isVisible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\">\r\n <span class=\"help-block\" style=\"color: white;\">{{ error }}</span>\r\n </p>\r\n</div>\r\n"
1263
1535
  },] }
1264
1536
  ];
1265
1537
  FormValidationSummaryComponent.ctorParameters = function () { return []; };
1266
1538
  FormValidationSummaryComponent.propDecorators = {
1267
- isVisible: [{ type: core.Input }]
1539
+ isVisible: [{ type: i0.Input }]
1268
1540
  };
1269
1541
 
1270
1542
  var ItemValidationSummaryComponent = /** @class */ (function (_super) {
@@ -1275,47 +1547,104 @@
1275
1547
  return ItemValidationSummaryComponent;
1276
1548
  }(ValidationSummaryComponent));
1277
1549
  ItemValidationSummaryComponent.decorators = [
1278
- { type: core.Component, args: [{
1550
+ { type: i0.Component, args: [{
1279
1551
  selector: "anatoly-item-validation-summary",
1280
1552
  template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(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"
1281
1553
  },] }
1282
1554
  ];
1283
1555
  ItemValidationSummaryComponent.ctorParameters = function () { return []; };
1284
1556
  ItemValidationSummaryComponent.propDecorators = {
1285
- controlName: [{ type: core.Input }],
1286
- controlTitle: [{ type: core.Input }]
1557
+ controlName: [{ type: i0.Input }],
1558
+ controlTitle: [{ type: i0.Input }]
1287
1559
  };
1288
1560
 
1561
+ /*
1562
+ <file>
1563
+ Project:
1564
+ @osovitny/anatoly
1565
+
1566
+ Authors:
1567
+ Vadim Osovitny
1568
+ Anatoly Osovitny
1569
+
1570
+ Created:
1571
+ 12 Dec 2017
1572
+
1573
+ Version:
1574
+ 1.0
1575
+
1576
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1577
+ </file>
1578
+ */
1289
1579
  var DefaultEditorOptions = {
1290
- placeholderText: 'Edit Your Content Here',
1580
+ placeholderText: "Edit Your Content Here",
1291
1581
  charCounterCount: true,
1292
1582
  heightMin: 100,
1293
1583
  toolbarInline: false,
1294
1584
  toolbarButtons: {
1295
- 'moreText': {
1296
- 'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript',
1297
- 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle']
1585
+ moreText: {
1586
+ buttons: [
1587
+ "bold",
1588
+ "italic",
1589
+ "underline",
1590
+ "strikeThrough",
1591
+ "subscript",
1592
+ "superscript",
1593
+ "fontFamily",
1594
+ "fontSize",
1595
+ "textColor",
1596
+ "backgroundColor",
1597
+ "inlineClass",
1598
+ "inlineStyle",
1599
+ ],
1298
1600
  },
1299
- 'moreParagraph': {
1300
- 'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify',
1301
- 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
1601
+ moreParagraph: {
1602
+ buttons: [
1603
+ "alignLeft",
1604
+ "alignCenter",
1605
+ "formatOLSimple",
1606
+ "alignRight",
1607
+ "alignJustify",
1608
+ "formatOL",
1609
+ "formatUL",
1610
+ "paragraphFormat",
1611
+ "paragraphStyle",
1612
+ "lineHeight",
1613
+ "outdent",
1614
+ "indent",
1615
+ "quote",
1616
+ ],
1302
1617
  },
1303
- 'moreRich': {
1304
- 'buttons': ['insertLink', 'insertImage', 'insertTable', 'emoticons', 'fontAwesome',
1305
- 'specialCharacters', 'embedly']
1618
+ moreRich: {
1619
+ buttons: [
1620
+ "insertLink",
1621
+ "insertImage",
1622
+ "insertTable",
1623
+ "emoticons",
1624
+ "fontAwesome",
1625
+ "specialCharacters",
1626
+ "embedly",
1627
+ ],
1628
+ },
1629
+ moreMisc: {
1630
+ buttons: [
1631
+ "selectAll",
1632
+ "clearFormatting",
1633
+ "html",
1634
+ "undo",
1635
+ "redo",
1636
+ "fullscreen",
1637
+ ],
1638
+ align: "right",
1306
1639
  },
1307
- 'moreMisc': {
1308
- 'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
1309
- 'align': 'right',
1310
- }
1311
1640
  },
1312
1641
  /*
1313
1642
  Upload:
1314
1643
  https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
1315
1644
  */
1316
- imageUploadURL: '/api/HtmlEditor/UploadImage',
1317
- imageAllowedTypes: ['jpeg', 'jpg', 'png'],
1318
- imageUploadParams: { uploadType: '', uploadParentId: '' }
1645
+ imageUploadURL: "/api/HtmlEditor/UploadImage",
1646
+ imageAllowedTypes: ["jpeg", "jpg", "png"],
1647
+ imageUploadParams: { uploadType: "", uploadParentId: "" },
1319
1648
  };
1320
1649
 
1321
1650
  var BaseHtmlEditorComponent = /** @class */ (function (_super) {
@@ -1325,7 +1654,7 @@
1325
1654
  _this.froalaEditorInitialized = false;
1326
1655
  _this.afterInitializedActions = [];
1327
1656
  //Inputs
1328
- _this.editorLabelText = 'Html';
1657
+ _this.editorLabelText = "Html";
1329
1658
  _this.editorOptions = {};
1330
1659
  return _this;
1331
1660
  }
@@ -1370,7 +1699,9 @@
1370
1699
  BaseHtmlEditorComponent.prototype.doAfterInitialized = function (action) {
1371
1700
  var that = this;
1372
1701
  if (!this.froalaEditorInitialized) {
1373
- this.afterInitializedActions.push(function () { action(that); });
1702
+ this.afterInitializedActions.push(function () {
1703
+ action(that);
1704
+ });
1374
1705
  }
1375
1706
  else {
1376
1707
  action(that);
@@ -1383,7 +1714,7 @@
1383
1714
  BaseHtmlEditorComponent.prototype.setUploadParams = function (uploadType, uploadParentId) {
1384
1715
  this.doAfterInitialized(function (that) {
1385
1716
  var editor = that.getEditor();
1386
- if (typeof (editor) == "undefined" || editor == null) {
1717
+ if (typeof editor == "undefined" || editor == null) {
1387
1718
  return;
1388
1719
  }
1389
1720
  editor.opts.imageUploadParams.uploadType = uploadType;
@@ -1393,8 +1724,8 @@
1393
1724
  return BaseHtmlEditorComponent;
1394
1725
  }(BaseEditComponent));
1395
1726
  BaseHtmlEditorComponent.propDecorators = {
1396
- editorLabelText: [{ type: core.Input }],
1397
- editorOptions: [{ type: core.Input }]
1727
+ editorLabelText: [{ type: i0.Input }],
1728
+ editorOptions: [{ type: i0.Input }]
1398
1729
  };
1399
1730
 
1400
1731
  var HtmlEditorComponent = /** @class */ (function (_super) {
@@ -1405,7 +1736,7 @@
1405
1736
  HtmlEditorComponent.prototype.setHtml = function (content) {
1406
1737
  this.doAfterInitialized(function (that) {
1407
1738
  var editor = that.getEditor();
1408
- if (typeof (editor) == "undefined" || editor == null) {
1739
+ if (typeof editor == "undefined" || editor == null) {
1409
1740
  return;
1410
1741
  }
1411
1742
  editor.html.set(content);
@@ -1413,7 +1744,7 @@
1413
1744
  };
1414
1745
  HtmlEditorComponent.prototype.getHtml = function () {
1415
1746
  var editor = this.getEditor();
1416
- if (typeof (editor) == "undefined" || editor == null) {
1747
+ if (typeof editor == "undefined" || editor == null) {
1417
1748
  return;
1418
1749
  }
1419
1750
  return editor.html.get(false);
@@ -1421,8 +1752,8 @@
1421
1752
  return HtmlEditorComponent;
1422
1753
  }(BaseHtmlEditorComponent));
1423
1754
  HtmlEditorComponent.decorators = [
1424
- { type: core.Component, args: [{
1425
- selector: 'anatoly-html-editor',
1755
+ { type: i0.Component, args: [{
1756
+ selector: "anatoly-html-editor",
1426
1757
  template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>"
1427
1758
  },] }
1428
1759
  ];
@@ -1432,7 +1763,7 @@
1432
1763
  __extends(FormsHtmlEditorComponent, _super);
1433
1764
  function FormsHtmlEditorComponent() {
1434
1765
  var _this = _super.call(this) || this;
1435
- _this.editorFormKey = 'html';
1766
+ _this.editorFormKey = "html";
1436
1767
  return _this;
1437
1768
  }
1438
1769
  FormsHtmlEditorComponent.prototype.setFormValueAfterInitialized = function (name, value) {
@@ -1443,19 +1774,23 @@
1443
1774
  return FormsHtmlEditorComponent;
1444
1775
  }(BaseHtmlEditorComponent));
1445
1776
  FormsHtmlEditorComponent.decorators = [
1446
- { type: core.Component, args: [{
1447
- selector: 'anatoly-forms-html-editor',
1777
+ { type: i0.Component, args: [{
1778
+ selector: "anatoly-forms-html-editor",
1448
1779
  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 [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"
1449
1780
  },] }
1450
1781
  ];
1451
1782
  FormsHtmlEditorComponent.ctorParameters = function () { return []; };
1452
1783
  FormsHtmlEditorComponent.propDecorators = {
1453
- editorFormKey: [{ type: core.Input }]
1784
+ editorFormKey: [{ type: i0.Input }]
1454
1785
  };
1455
1786
 
1456
1787
  /*
1457
1788
  <file>
1789
+ Project:
1790
+ @osovitny/anatoly
1791
+
1458
1792
  Authors:
1793
+ Vadim Osovitny
1459
1794
  Anatoly Osovitny
1460
1795
 
1461
1796
  Created:
@@ -1472,28 +1807,75 @@
1472
1807
  }
1473
1808
  ContentHeaderComponent.prototype.ngOnInit = function () {
1474
1809
  if (this.title == null) {
1475
- this.title = '';
1810
+ this.title = "";
1476
1811
  }
1477
1812
  };
1478
1813
  return ContentHeaderComponent;
1479
1814
  }());
1480
1815
  ContentHeaderComponent.decorators = [
1481
- { type: core.Component, args: [{
1482
- selector: 'anatoly-content-header',
1816
+ { type: i0.Component, args: [{
1817
+ selector: "anatoly-content-header",
1483
1818
  template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
1484
1819
  },] }
1485
1820
  ];
1486
1821
  ContentHeaderComponent.propDecorators = {
1487
- title: [{ type: core.Input }]
1822
+ title: [{ type: i0.Input }]
1823
+ };
1824
+
1825
+ /*
1826
+ <file>
1827
+ Project:
1828
+ @osovitny/anatoly
1829
+
1830
+ Authors:
1831
+ Vadim Osovitny
1832
+ Anatoly Osovitny
1833
+
1834
+ Created:
1835
+ 26 Jun 2020
1836
+
1837
+ Version:
1838
+ 1.0
1839
+
1840
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1841
+ </file>
1842
+ */
1843
+ var Copy2ClipboardComponent = /** @class */ (function () {
1844
+ function Copy2ClipboardComponent() {
1845
+ this.tooltip = "Copy to clipboard";
1846
+ this.text = "";
1847
+ }
1848
+ Copy2ClipboardComponent.prototype.onCopy2Clipboard = function (event) {
1849
+ var _this = this;
1850
+ this.tooltip = "Copied";
1851
+ setTimeout(function () {
1852
+ _this.tooltip = "Copy to clipboard";
1853
+ }, 1000);
1854
+ Utils.copyToClipBoard(event, this.text);
1855
+ };
1856
+ return Copy2ClipboardComponent;
1857
+ }());
1858
+ Copy2ClipboardComponent.decorators = [
1859
+ { type: i0.Component, args: [{
1860
+ selector: "anatoly-copy-2-clipboard",
1861
+ template: "<span kendoTooltip filter=\".helptooltip\" tooltipClass=\"help-tooltip\" [tooltipTemplate]=\"template\">\r\n <ng-template #template let-anchor>\r\n <span [innerHTML]='tooltip'></span>\r\n </ng-template> \r\n \r\n <span class=\"helptooltip\">\r\n <a class=\"btn btn-primary btn-sm active\" (click)=\"onCopy2Clipboard($event)\"><i class=\"fa fa-copy\"></i></a>\r\n </span>\r\n</span>\r\n\r\n"
1862
+ },] }
1863
+ ];
1864
+ Copy2ClipboardComponent.propDecorators = {
1865
+ text: [{ type: i0.Input }]
1488
1866
  };
1489
1867
 
1490
1868
  /*
1491
1869
  <file>
1870
+ Project:
1871
+ @osovitny/anatoly
1872
+
1492
1873
  Authors:
1493
1874
  Vadim Osovitny
1875
+ Anatoly Osovitny
1494
1876
 
1495
1877
  Created:
1496
- 10 Nov 2017
1878
+ 26 Jun 2020
1497
1879
 
1498
1880
  Version:
1499
1881
  1.0
@@ -1509,7 +1891,7 @@
1509
1891
  return AnatolyUIModule;
1510
1892
  }());
1511
1893
  AnatolyUIModule.decorators = [
1512
- { type: core.NgModule, args: [{
1894
+ { type: i0.NgModule, args: [{
1513
1895
  imports: [
1514
1896
  common.CommonModule,
1515
1897
  forms.ReactiveFormsModule,
@@ -1529,6 +1911,7 @@
1529
1911
  HtmlEditorComponent,
1530
1912
  FormsHtmlEditorComponent,
1531
1913
  ContentHeaderComponent,
1914
+ Copy2ClipboardComponent,
1532
1915
  ],
1533
1916
  exports: [
1534
1917
  SubscribePlanButtonComponent,
@@ -1542,11 +1925,29 @@
1542
1925
  HtmlEditorComponent,
1543
1926
  FormsHtmlEditorComponent,
1544
1927
  ContentHeaderComponent,
1545
- ]
1928
+ Copy2ClipboardComponent,
1929
+ ],
1546
1930
  },] }
1547
1931
  ];
1548
1932
 
1549
- // Module
1933
+ /*
1934
+ <file>
1935
+ Project:
1936
+ @osovitny/anatoly
1937
+
1938
+ Authors:
1939
+ Vadim Osovitny
1940
+ Anatoly Osovitny
1941
+
1942
+ Created:
1943
+ 26 Jun 2020
1944
+
1945
+ Version:
1946
+ 1.0
1947
+
1948
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1949
+ </file>
1950
+ */
1550
1951
 
1551
1952
  /*
1552
1953
  * Public API Surface of anatoly
@@ -1572,11 +1973,15 @@
1572
1973
  exports.ContentHeaderComponent = ContentHeaderComponent;
1573
1974
  exports.FormValidationSummaryComponent = FormValidationSummaryComponent;
1574
1975
  exports.FormsHtmlEditorComponent = FormsHtmlEditorComponent;
1976
+ exports.GlobalErrorHandler = GlobalErrorHandler;
1977
+ exports.Guid = Guid;
1575
1978
  exports.HtmlEditorComponent = HtmlEditorComponent;
1576
1979
  exports.ItemValidationSummaryComponent = ItemValidationSummaryComponent;
1980
+ exports.LoggingService = LoggingService;
1577
1981
  exports.SignInButtonComponent = SignInButtonComponent;
1578
1982
  exports.SignOutButtonComponent = SignOutButtonComponent;
1579
1983
  exports.SignUpButtonComponent = SignUpButtonComponent;
1984
+ exports.Subs = Subs;
1580
1985
  exports.SubscribePlanButtonComponent = SubscribePlanButtonComponent;
1581
1986
  exports.UpgradePlanButtonComponent = UpgradePlanButtonComponent;
1582
1987
  exports.Utils = Utils;