@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,7 +1,8 @@
1
1
  import Swal from 'sweetalert2';
2
- import { Injectable, NgModule, Component, Input } from '@angular/core';
2
+ import { v4 } from 'uuid';
3
+ import { Injectable, ɵɵdefineInjectable, Injector, NgModule, Optional, SkipSelf, Component, Input } from '@angular/core';
3
4
  import { ActivatedRoute, Router } from '@angular/router';
4
- import { HttpClient, HttpClientModule, HttpClientXsrfModule, HttpClientJsonpModule } from '@angular/common/http';
5
+ import { HttpClient } from '@angular/common/http';
5
6
  import { map } from 'rxjs/operators';
6
7
  import { CommonModule } from '@angular/common';
7
8
  import { BehaviorSubject } from 'rxjs';
@@ -10,8 +11,12 @@ import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
10
11
 
11
12
  /*
12
13
  <file>
14
+ Project:
15
+ @osovitny/anatoly
16
+
13
17
  Authors:
14
18
  Vadim Osovitny
19
+ Anatoly Osovitny
15
20
 
16
21
  Created:
17
22
  4 Mar 2020
@@ -150,11 +155,15 @@ class Alerts {
150
155
 
151
156
  /*
152
157
  <file>
158
+ Project:
159
+ @osovitny/anatoly
160
+
153
161
  Authors:
154
162
  Vadim Osovitny
163
+ Anatoly Osovitny
155
164
 
156
165
  Created:
157
- 4 Mar 2020
166
+ 26 Jun 2020
158
167
 
159
168
  Version:
160
169
  1.0
@@ -163,22 +172,104 @@ class Alerts {
163
172
  </file>
164
173
  */
165
174
  class Utils {
166
- static GetValueByNameInQS(name) {
167
- return Utils.GetValueByName(location.search, name);
175
+ static getValueByNameInQS(name) {
176
+ return Utils.getValueByName(location.search, name);
168
177
  }
169
- static GetValueByName(url, name) {
178
+ static getValueByName(url, name) {
170
179
  name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
171
180
  var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
172
181
  return results === null
173
182
  ? ""
174
183
  : decodeURIComponent(results[1].replace(/\+/g, " "));
175
184
  }
185
+ static copyToClipBoard(event, val) {
186
+ event.preventDefault();
187
+ let selBox = document.createElement("textarea");
188
+ selBox.style.position = "fixed";
189
+ selBox.style.left = "0";
190
+ selBox.style.top = "0";
191
+ selBox.style.opacity = "0";
192
+ selBox.value = val;
193
+ document.body.appendChild(selBox);
194
+ selBox.focus();
195
+ selBox.select();
196
+ document.execCommand("copy");
197
+ document.body.removeChild(selBox);
198
+ }
199
+ static downloadFile(name, url) {
200
+ var link = document.createElement("a");
201
+ link.download = name;
202
+ link.href = url;
203
+ link.click();
204
+ }
176
205
  }
177
206
 
178
207
  /*
179
208
  <file>
209
+ Project:
210
+ @osovitny/anatoly
211
+
180
212
  Authors:
181
213
  Vadim Osovitny
214
+ Anatoly Osovitny
215
+
216
+ Created:
217
+ 26 Jun 2020
218
+
219
+ Version:
220
+ 1.0
221
+
222
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
223
+ </file>
224
+ */
225
+ class Subs {
226
+ constructor() {
227
+ this.subs = [];
228
+ }
229
+ add(...subscriptions) {
230
+ this.subs = this.subs.concat(subscriptions);
231
+ }
232
+ set sink(subscription) {
233
+ this.subs.push(subscription);
234
+ }
235
+ unsubscribe() {
236
+ this.subs.forEach((sub) => sub && sub.unsubscribe());
237
+ this.subs = [];
238
+ }
239
+ }
240
+
241
+ /*
242
+ <file>
243
+ Project:
244
+ @osovitny/anatoly
245
+
246
+ Authors:
247
+ Vadim Osovitny
248
+ Anatoly Osovitny
249
+
250
+ Created:
251
+ 26 Jun 2020
252
+
253
+ Version:
254
+ 1.0
255
+
256
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
257
+ </file>
258
+ */
259
+ class Guid {
260
+ static newGuid() {
261
+ return v4();
262
+ }
263
+ }
264
+
265
+ /*
266
+ <file>
267
+ Project:
268
+ @osovitny/anatoly
269
+
270
+ Authors:
271
+ Vadim Osovitny
272
+ Anatoly Osovitny
182
273
 
183
274
  Created:
184
275
  17 Jun 2018
@@ -209,11 +300,15 @@ BaseGoService.ctorParameters = () => [
209
300
 
210
301
  /*
211
302
  <file>
303
+ Project:
304
+ @osovitny/anatoly
305
+
212
306
  Authors:
213
307
  Vadim Osovitny
308
+ Anatoly Osovitny
214
309
 
215
310
  Created:
216
- 13 Nov 2017
311
+ 13 Nov 2017
217
312
 
218
313
  Version:
219
314
  1.0
@@ -227,43 +322,45 @@ class BaseApiService {
227
322
  this.baseUrl = "";
228
323
  }
229
324
  serializeParams(data) {
230
- return data ? ('?' + $.param(data)) : '';
325
+ return data ? "?" + $.param(data) : "";
231
326
  }
232
327
  //api
233
328
  get(action, data, responseType) {
234
329
  if (!responseType) {
235
- responseType = 'json';
330
+ responseType = "json";
236
331
  }
237
332
  var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
238
- return this.http.get(url, { responseType: responseType }).pipe(map(res => res));
333
+ return this.http
334
+ .get(url, { responseType: responseType })
335
+ .pipe(map((res) => res));
239
336
  }
240
337
  post(action, data, responseType) {
241
338
  if (!responseType) {
242
- responseType = 'text';
339
+ responseType = "text";
243
340
  }
244
341
  var url = `${this.baseUrl}/${action}`;
245
342
  return this.http.post(url, data, { responseType: responseType });
246
343
  }
247
344
  postQS(action, data, responseType) {
248
345
  if (!responseType) {
249
- responseType = 'text';
346
+ responseType = "text";
250
347
  }
251
348
  var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
252
349
  return this.http.post(url, null, { responseType: responseType });
253
350
  }
254
351
  delete(action, data, responseType) {
255
352
  if (!responseType) {
256
- responseType = 'text';
353
+ responseType = "text";
257
354
  }
258
355
  var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
259
356
  return this.http.delete(url, { responseType: responseType });
260
357
  }
261
358
  //gets
262
359
  getById(id) {
263
- return this.get('getById', { id: id });
360
+ return this.get("getById", { id: id });
264
361
  }
265
362
  getAll(data) {
266
- return this.get('getall', data).pipe(map(res => res));
363
+ return this.get("getall", data).pipe(map((res) => res));
267
364
  }
268
365
  getJsonFile(fileName, jsonUrl, jsonVersion) {
269
366
  if (!jsonUrl) {
@@ -272,12 +369,12 @@ class BaseApiService {
272
369
  if (!jsonVersion) {
273
370
  jsonVersion = "1.0";
274
371
  }
275
- var url = jsonUrl + "/" + fileName + '?' + jsonVersion;
276
- return this.http.get(url).pipe(map(res => res));
372
+ var url = jsonUrl + "/" + fileName + "?" + jsonVersion;
373
+ return this.http.get(url).pipe(map((res) => res));
277
374
  }
278
375
  getNewGuid() {
279
376
  var url = `${this.baseUrl}/getNewGuid`;
280
- return this.http.get(url, { responseType: 'text' });
377
+ return this.http.get(url, { responseType: "text" });
281
378
  }
282
379
  }
283
380
  BaseApiService.decorators = [
@@ -289,8 +386,12 @@ BaseApiService.ctorParameters = () => [
289
386
 
290
387
  /*
291
388
  <file>
389
+ Project:
390
+ @osovitny/anatoly
391
+
292
392
  Authors:
293
393
  Vadim Osovitny
394
+ Anatoly Osovitny
294
395
 
295
396
  Created:
296
397
  13 Nov 2017
@@ -351,20 +452,151 @@ AppContextService.ctorParameters = () => [
351
452
  { type: HttpClient }
352
453
  ];
353
454
 
455
+ /*
456
+ <file>
457
+ Project:
458
+ @osovitny/anatoly
459
+
460
+ Authors:
461
+ Vadim Osovitny
462
+ Anatoly Osovitny
463
+
464
+ Created:
465
+ 26 Jun 2020
466
+
467
+ Version:
468
+ 1.0
469
+
470
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
471
+ </file>
472
+ */
473
+ class LoggingService {
474
+ constructor() { }
475
+ logError(error) {
476
+ console.error(error);
477
+ }
478
+ logInformation(info) {
479
+ console.info(info);
480
+ }
481
+ }
482
+ LoggingService.ɵprov = ɵɵdefineInjectable({ factory: function LoggingService_Factory() { return new LoggingService(); }, token: LoggingService, providedIn: "root" });
483
+ LoggingService.decorators = [
484
+ { type: Injectable, args: [{
485
+ providedIn: "root",
486
+ },] }
487
+ ];
488
+ LoggingService.ctorParameters = () => [];
489
+
490
+ /*
491
+ <file>
492
+ Project:
493
+ @osovitny/anatoly
494
+
495
+ Authors:
496
+ Vadim Osovitny
497
+ Anatoly Osovitny
498
+
499
+ Created:
500
+ 26 Jun 2020
501
+
502
+ Version:
503
+ 1.0
504
+
505
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
506
+ </file>
507
+ */
508
+ class GlobalErrorHandler {
509
+ constructor(injector) {
510
+ this.injector = injector;
511
+ }
512
+ handleError(error) {
513
+ const loggingService = this.injector.get(LoggingService);
514
+ loggingService.logError(error);
515
+ // IMPORTANT: Rethrow the error otherwise it gets swallowed
516
+ throw error;
517
+ }
518
+ }
519
+ GlobalErrorHandler.decorators = [
520
+ { type: Injectable }
521
+ ];
522
+ GlobalErrorHandler.ctorParameters = () => [
523
+ { type: Injector }
524
+ ];
525
+
526
+ /*
527
+ <file>
528
+ Project:
529
+ @osovitny/anatoly
530
+
531
+ Authors:
532
+ Vadim Osovitny
533
+ Anatoly Osovitny
534
+
535
+ Created:
536
+ 26 Jun 2020
537
+
538
+ Version:
539
+ 1.0
540
+
541
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
542
+ </file>
543
+ */
544
+ function throwIfAlreadyLoaded(parentModule, moduleName) {
545
+ if (parentModule) {
546
+ throw new Error(`${moduleName} has already been loaded. Import ${moduleName} modules in the AppModule only.`);
547
+ }
548
+ }
549
+
550
+ const providers = [
551
+ LoggingService,
552
+ AppContextService,
553
+ ];
554
+ let InjectorInstance;
354
555
  class AnatolyCoreModule {
556
+ constructor(injector, parentModule) {
557
+ this.injector = injector;
558
+ throwIfAlreadyLoaded(parentModule, "AnatolyCoreModule");
559
+ InjectorInstance = this.injector;
560
+ }
355
561
  }
356
562
  AnatolyCoreModule.decorators = [
357
563
  { type: NgModule, args: [{
358
- declarations: [],
359
564
  imports: [CommonModule],
360
- providers: [AppContextService],
565
+ providers: [...providers],
361
566
  },] }
567
+ ];
568
+ AnatolyCoreModule.ctorParameters = () => [
569
+ { type: Injector },
570
+ { type: AnatolyCoreModule, decorators: [{ type: Optional }, { type: SkipSelf }] }
362
571
  ];
363
572
 
364
573
  /*
365
574
  <file>
575
+ Project:
576
+ @osovitny/anatoly
577
+
578
+ Authors:
579
+ Vadim Osovitny
580
+ Anatoly Osovitny
581
+
582
+ Created:
583
+ 26 Jun 2020
584
+
585
+ Version:
586
+ 1.0
587
+
588
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
589
+ </file>
590
+ */
591
+
592
+ /*
593
+ <file>
594
+ Project:
595
+ @osovitny/anatoly
596
+
366
597
  Authors:
367
598
  Vadim Osovitny
599
+ Anatoly Osovitny
368
600
 
369
601
  Created:
370
602
  29 Apr 2018
@@ -383,25 +615,28 @@ class BaseGridReadService extends BehaviorSubject {
383
615
  this.data = [];
384
616
  }
385
617
  serializeParams(data) {
386
- return data ? ('?' + $.param(data)) : '';
618
+ return data ? "?" + $.param(data) : "";
387
619
  }
388
620
  read(params, success, error) {
389
621
  if (this.data.length) {
390
622
  return super.next(this.data);
391
623
  }
392
624
  var url = this.baseReadUrl;
393
- if (typeof params === 'undefined') {
625
+ if (typeof params === "undefined") {
394
626
  params = this.savedReadParams;
395
627
  }
396
628
  if (params) {
397
629
  url = this.baseReadUrl + `${this.serializeParams(params)}`;
398
630
  this.savedReadParams = params;
399
631
  }
400
- this.http.get(url).pipe(map(res => res)).subscribe(data => {
632
+ this.http
633
+ .get(url)
634
+ .pipe(map((res) => res))
635
+ .subscribe((data) => {
401
636
  super.next(data);
402
637
  if (success)
403
638
  success();
404
- }, e => {
639
+ }, (e) => {
405
640
  if (error)
406
641
  error(e);
407
642
  });
@@ -416,8 +651,12 @@ BaseGridReadService.ctorParameters = () => [
416
651
 
417
652
  /*
418
653
  <file>
654
+ Project:
655
+ @osovitny/anatoly
656
+
419
657
  Authors:
420
658
  Vadim Osovitny
659
+ Anatoly Osovitny
421
660
 
422
661
  Created:
423
662
  29 Apr 2018
@@ -442,16 +681,15 @@ class BaseGridEditService extends BaseGridReadService {
442
681
  return;
443
682
  }
444
683
  //find orignal data item
445
- const originalDataItem = this.data.find(item => item.Id === dataItem.Id);
684
+ const originalDataItem = this.data.find((item) => item.Id === dataItem.Id);
446
685
  //revert changes
447
686
  Object.assign(originalDataItem, dataItem);
448
687
  super.next(this.data);
449
688
  }
450
689
  save(data, isNew, sucess) {
451
- const action = isNew ? 'add' : 'update';
690
+ const action = isNew ? "add" : "update";
452
691
  this.reset();
453
- this.post(action, data).subscribe(() => {
454
- }, () => {
692
+ this.post(action, data).subscribe(() => { }, () => {
455
693
  this.read();
456
694
  }, () => {
457
695
  this.read();
@@ -461,8 +699,7 @@ class BaseGridEditService extends BaseGridReadService {
461
699
  }
462
700
  remove(data, sucess) {
463
701
  this.reset();
464
- this.post('remove', data).subscribe(() => {
465
- }, () => {
702
+ this.post("remove", data).subscribe(() => { }, () => {
466
703
  this.read();
467
704
  }, () => {
468
705
  this.read();
@@ -472,7 +709,7 @@ class BaseGridEditService extends BaseGridReadService {
472
709
  }
473
710
  post(action, data) {
474
711
  var url = this.baseUrl + `${action}${this.serializeParams(data)}`;
475
- return this.http.post(url, data).pipe(map(res => res));
712
+ return this.http.post(url, data).pipe(map((res) => res));
476
713
  }
477
714
  }
478
715
  BaseGridEditService.decorators = [
@@ -484,8 +721,12 @@ BaseGridEditService.ctorParameters = () => [
484
721
 
485
722
  /*
486
723
  <file>
724
+ Project:
725
+ @osovitny/anatoly
726
+
487
727
  Authors:
488
728
  Vadim Osovitny
729
+ Anatoly Osovitny
489
730
 
490
731
  Created:
491
732
  12 Nov 2017
@@ -500,25 +741,36 @@ class BillingApiService extends BaseApiService {
500
741
  constructor(http) {
501
742
  super(http);
502
743
  this.http = http;
503
- this.baseUrl += 'billing/';
744
+ this.baseUrl += "billing/";
504
745
  }
505
746
  requestNewSubscription(requestedPlan, success, error) {
506
- this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
507
- .subscribe(data => { }, e => { if (error)
508
- error(); }, () => { if (success)
509
- success(); });
747
+ this.postQS("requestNewSubscription", {
748
+ requestedPlan: requestedPlan,
749
+ }).subscribe((data) => { }, (e) => {
750
+ if (error)
751
+ error();
752
+ }, () => {
753
+ if (success)
754
+ success();
755
+ });
510
756
  }
511
757
  cancelRequestedSubscription(success, error) {
512
- this.postQS('cancelRequestedSubscription', null)
513
- .subscribe(data => { }, e => { if (error)
514
- error(); }, () => { if (success)
515
- success(); });
758
+ this.postQS("cancelRequestedSubscription", null).subscribe((data) => { }, (e) => {
759
+ if (error)
760
+ error();
761
+ }, () => {
762
+ if (success)
763
+ success();
764
+ });
516
765
  }
517
766
  buyAccess(requestedPlan, success, error) {
518
- this.postQS('buyAccess', { requestedPlan: requestedPlan })
519
- .subscribe(data => { }, e => { if (error)
520
- error(); }, () => { if (success)
521
- success(); });
767
+ this.postQS("buyAccess", { requestedPlan: requestedPlan }).subscribe((data) => { }, (e) => {
768
+ if (error)
769
+ error();
770
+ }, () => {
771
+ if (success)
772
+ success();
773
+ });
522
774
  }
523
775
  }
524
776
  BillingApiService.decorators = [
@@ -530,8 +782,12 @@ BillingApiService.ctorParameters = () => [
530
782
 
531
783
  /*
532
784
  <file>
785
+ Project:
786
+ @osovitny/anatoly
787
+
533
788
  Authors:
534
789
  Vadim Osovitny
790
+ Anatoly Osovitny
535
791
 
536
792
  Created:
537
793
  4 Mar 2020
@@ -546,29 +802,38 @@ class AnatolyDataModule {
546
802
  }
547
803
  AnatolyDataModule.decorators = [
548
804
  { type: NgModule, args: [{
549
- imports: [
550
- CommonModule,
551
- HttpClientModule,
552
- HttpClientXsrfModule,
553
- HttpClientJsonpModule
554
- ],
555
- exports: [
556
- CommonModule,
557
- HttpClientModule,
558
- HttpClientXsrfModule,
559
- HttpClientJsonpModule
560
- ],
561
- declarations: [],
562
- providers: []
805
+ imports: [CommonModule],
806
+ providers: [BillingApiService],
563
807
  },] }
564
808
  ];
565
809
 
566
- // Services
810
+ /*
811
+ <file>
812
+ Project:
813
+ @osovitny/anatoly
814
+
815
+ Authors:
816
+ Vadim Osovitny
817
+ Anatoly Osovitny
818
+
819
+ Created:
820
+ 4 Mar 2020
821
+
822
+ Version:
823
+ 1.0
824
+
825
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
826
+ </file>
827
+ */
567
828
 
568
829
  /*
569
830
  <file>
831
+ Project:
832
+ @osovitny/anatoly
833
+
570
834
  Authors:
571
835
  Vadim Osovitny
836
+ Anatoly Osovitny
572
837
 
573
838
  Created:
574
839
  1 Jun 2018
@@ -585,9 +850,9 @@ class SubscribePlanButtonComponent {
585
850
  this.contextUpdated = false;
586
851
  this.isUserSignedIn = false;
587
852
  this.currentPlan = 0;
588
- this.currentPlanTitle = '';
853
+ this.currentPlanTitle = "";
589
854
  this.requestedPlan = 0;
590
- this.requestedPlanTitle = '';
855
+ this.requestedPlanTitle = "";
591
856
  }
592
857
  ngOnInit() {
593
858
  if (!this.appcontext.isUserSignedIn()) {
@@ -608,7 +873,7 @@ class SubscribePlanButtonComponent {
608
873
  }
609
874
  SubscribePlanButtonComponent.decorators = [
610
875
  { type: Component, args: [{
611
- selector: 'anatoly-subscribe-plan-button',
876
+ selector: "anatoly-subscribe-plan-button",
612
877
  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"
613
878
  },] }
614
879
  ];
@@ -622,8 +887,12 @@ SubscribePlanButtonComponent.propDecorators = {
622
887
 
623
888
  /*
624
889
  <file>
890
+ Project:
891
+ @osovitny/anatoly
892
+
625
893
  Authors:
626
894
  Vadim Osovitny
895
+ Anatoly Osovitny
627
896
 
628
897
  Created:
629
898
  12 Nov 2017
@@ -642,9 +911,9 @@ class UpgradePlanButtonComponent {
642
911
  onUpgradePlan() {
643
912
  const text = `Current plan: ${this.currentplantitle} New plan: ${this.requestedplantitle}`;
644
913
  const that = this;
645
- Alerts.AreYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', () => {
914
+ Alerts.AreYouSure(text, "Change billing plan", "Confirm change", "Cancel", () => {
646
915
  that.api.requestNewSubscription(that.requestedplan, () => {
647
- Alerts.Success('Your request for changing plan has been sent.', null, () => {
916
+ Alerts.Success("Your request for changing plan has been sent.", null, () => {
648
917
  window.location.reload();
649
918
  });
650
919
  });
@@ -653,7 +922,7 @@ class UpgradePlanButtonComponent {
653
922
  }
654
923
  UpgradePlanButtonComponent.decorators = [
655
924
  { type: Component, args: [{
656
- selector: 'anatoly-upgrade-plan-button',
925
+ selector: "anatoly-upgrade-plan-button",
657
926
  template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
658
927
  },] }
659
928
  ];
@@ -668,6 +937,9 @@ UpgradePlanButtonComponent.propDecorators = {
668
937
 
669
938
  /*
670
939
  <file>
940
+ Project:
941
+ @osovitny/anatoly
942
+
671
943
  Authors:
672
944
  Vadim Osovitny
673
945
  Anatoly Osovitny
@@ -688,7 +960,7 @@ class BuyAccessButtonComponent {
688
960
  this.contextUpdated = false;
689
961
  this.isUserSignedIn = false;
690
962
  this.currentPlan = 0;
691
- this.currentPlanTitle = '';
963
+ this.currentPlanTitle = "";
692
964
  }
693
965
  ngOnInit() {
694
966
  if (!this.appcontext.isUserSignedIn()) {
@@ -707,9 +979,9 @@ class BuyAccessButtonComponent {
707
979
  onBuyPlan() {
708
980
  const text = `Requested plan: ${this.plantitle} `;
709
981
  const that = this;
710
- Alerts.AreYouSure(text, 'Buying access', 'Confirm change', 'Cancel', () => {
982
+ Alerts.AreYouSure(text, "Buying access", "Confirm change", "Cancel", () => {
711
983
  that.api.buyAccess(that.plan, () => {
712
- Alerts.Success('Access Granted', null, () => {
984
+ Alerts.Success("Access Granted", null, () => {
713
985
  window.location.reload();
714
986
  });
715
987
  });
@@ -718,7 +990,7 @@ class BuyAccessButtonComponent {
718
990
  }
719
991
  BuyAccessButtonComponent.decorators = [
720
992
  { type: Component, args: [{
721
- selector: 'anatoly-buyaccess-button',
993
+ selector: "anatoly-buyaccess-button",
722
994
  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"
723
995
  },] }
724
996
  ];
@@ -733,8 +1005,12 @@ BuyAccessButtonComponent.propDecorators = {
733
1005
 
734
1006
  /*
735
1007
  <file>
1008
+ Project:
1009
+ @osovitny/anatoly
1010
+
736
1011
  Authors:
737
1012
  Vadim Osovitny
1013
+ Anatoly Osovitny
738
1014
 
739
1015
  Created:
740
1016
  4 Jul 2018
@@ -742,7 +1018,7 @@ BuyAccessButtonComponent.propDecorators = {
742
1018
  Version:
743
1019
  1.0
744
1020
 
745
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
1021
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
746
1022
  </file>
747
1023
  */
748
1024
  class SignInButtonComponent {
@@ -750,7 +1026,7 @@ class SignInButtonComponent {
750
1026
  }
751
1027
  SignInButtonComponent.decorators = [
752
1028
  { type: Component, args: [{
753
- selector: 'anatoly-signin-button',
1029
+ selector: "anatoly-signin-button",
754
1030
  template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
755
1031
  },] }
756
1032
  ];
@@ -761,8 +1037,12 @@ SignInButtonComponent.propDecorators = {
761
1037
 
762
1038
  /*
763
1039
  <file>
1040
+ Project:
1041
+ @osovitny/anatoly
1042
+
764
1043
  Authors:
765
1044
  Vadim Osovitny
1045
+ Anatoly Osovitny
766
1046
 
767
1047
  Created:
768
1048
  4 Jul 2018
@@ -770,7 +1050,7 @@ SignInButtonComponent.propDecorators = {
770
1050
  Version:
771
1051
  1.0
772
1052
 
773
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
1053
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
774
1054
  </file>
775
1055
  */
776
1056
  class SignUpButtonComponent {
@@ -787,8 +1067,12 @@ SignUpButtonComponent.propDecorators = {
787
1067
 
788
1068
  /*
789
1069
  <file>
1070
+ Project:
1071
+ @osovitny/anatoly
1072
+
790
1073
  Authors:
791
1074
  Vadim Osovitny
1075
+ Anatoly Osovitny
792
1076
 
793
1077
  Created:
794
1078
  4 Jul 2018
@@ -796,7 +1080,7 @@ SignUpButtonComponent.propDecorators = {
796
1080
  Version:
797
1081
  1.0
798
1082
 
799
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
1083
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
800
1084
  </file>
801
1085
  */
802
1086
  class SignOutButtonComponent {
@@ -804,7 +1088,7 @@ class SignOutButtonComponent {
804
1088
  }
805
1089
  SignOutButtonComponent.decorators = [
806
1090
  { type: Component, args: [{
807
- selector: 'anatoly-signout-button',
1091
+ selector: "anatoly-signout-button",
808
1092
  template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
809
1093
  },] }
810
1094
  ];
@@ -815,8 +1099,12 @@ SignOutButtonComponent.propDecorators = {
815
1099
 
816
1100
  /*
817
1101
  <file>
1102
+ Project:
1103
+ @osovitny/anatoly
1104
+
818
1105
  Authors:
819
1106
  Vadim Osovitny
1107
+ Anatoly Osovitny
820
1108
 
821
1109
  Created:
822
1110
  28 Aug 2018
@@ -829,17 +1117,17 @@ SignOutButtonComponent.propDecorators = {
829
1117
  */
830
1118
  class BaseComponent {
831
1119
  getQSId() {
832
- const id = Utils.GetValueByNameInQS('id');
833
- if (typeof id === 'undefined' || id === '')
1120
+ let id = Utils.getValueByNameInQS("id");
1121
+ if (typeof id === "undefined" || id === "")
834
1122
  return null;
835
1123
  return id;
836
1124
  }
837
1125
  showLoading() {
838
- const panelLoading = $('#pnlLoading');
1126
+ let panelLoading = $("#pnlLoading");
839
1127
  panelLoading.show();
840
1128
  }
841
1129
  hideLoading() {
842
- const panelLoading = $('#pnlLoading');
1130
+ let panelLoading = $("#pnlLoading");
843
1131
  panelLoading.hide();
844
1132
  }
845
1133
  handleError(e) {
@@ -850,8 +1138,12 @@ class BaseComponent {
850
1138
 
851
1139
  /*
852
1140
  <file>
1141
+ Project:
1142
+ @osovitny/anatoly
1143
+
853
1144
  Authors:
854
1145
  Vadim Osovitny
1146
+ Anatoly Osovitny
855
1147
 
856
1148
  Created:
857
1149
  20 Nov 2017
@@ -868,8 +1160,8 @@ class BaseEditComponent extends BaseComponent {
868
1160
  this.formSubmitted = false;
869
1161
  }
870
1162
  isActionAdding() {
871
- const id = Utils.GetValueByNameInQS('id');
872
- if (typeof id === 'undefined' || id === '')
1163
+ let id = Utils.getValueByNameInQS("id");
1164
+ if (typeof id === "undefined" || id === "")
873
1165
  return true;
874
1166
  return false;
875
1167
  }
@@ -877,7 +1169,7 @@ class BaseEditComponent extends BaseComponent {
877
1169
  return this.getQSId();
878
1170
  }
879
1171
  isItemInvalid(name) {
880
- if (typeof name === 'undefined' || name === '') {
1172
+ if (typeof name === "undefined" || name === "") {
881
1173
  return false;
882
1174
  }
883
1175
  if (!this.formGroup) {
@@ -909,8 +1201,12 @@ BaseEditComponent.propDecorators = {
909
1201
 
910
1202
  /*
911
1203
  <file>
1204
+ Project:
1205
+ @osovitny/anatoly
1206
+
912
1207
  Authors:
913
1208
  Vadim Osovitny
1209
+ Anatoly Osovitny
914
1210
 
915
1211
  Created:
916
1212
  8 Dec 2017
@@ -967,8 +1263,12 @@ class ValidationSummaryComponent extends BaseEditComponent {
967
1263
 
968
1264
  /*
969
1265
  <file>
1266
+ Project:
1267
+ @osovitny/anatoly
1268
+
970
1269
  Authors:
971
1270
  Vadim Osovitny
1271
+ Anatoly Osovitny
972
1272
 
973
1273
  Created:
974
1274
  7 Dec 2017
@@ -1002,8 +1302,12 @@ FormValidationSummaryComponent.propDecorators = {
1002
1302
 
1003
1303
  /*
1004
1304
  <file>
1305
+ Project:
1306
+ @osovitny/anatoly
1307
+
1005
1308
  Authors:
1006
1309
  Vadim Osovitny
1310
+ Anatoly Osovitny
1007
1311
 
1008
1312
  Created:
1009
1313
  6 Dec 2017
@@ -1031,43 +1335,103 @@ ItemValidationSummaryComponent.propDecorators = {
1031
1335
  controlTitle: [{ type: Input }]
1032
1336
  };
1033
1337
 
1338
+ /*
1339
+ <file>
1340
+ Project:
1341
+ @osovitny/anatoly
1342
+
1343
+ Authors:
1344
+ Vadim Osovitny
1345
+ Anatoly Osovitny
1346
+
1347
+ Created:
1348
+ 12 Dec 2017
1349
+
1350
+ Version:
1351
+ 1.0
1352
+
1353
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1354
+ </file>
1355
+ */
1034
1356
  const DefaultEditorOptions = {
1035
- placeholderText: 'Edit Your Content Here',
1357
+ placeholderText: "Edit Your Content Here",
1036
1358
  charCounterCount: true,
1037
1359
  heightMin: 100,
1038
1360
  toolbarInline: false,
1039
1361
  toolbarButtons: {
1040
- 'moreText': {
1041
- 'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript',
1042
- 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle']
1362
+ moreText: {
1363
+ buttons: [
1364
+ "bold",
1365
+ "italic",
1366
+ "underline",
1367
+ "strikeThrough",
1368
+ "subscript",
1369
+ "superscript",
1370
+ "fontFamily",
1371
+ "fontSize",
1372
+ "textColor",
1373
+ "backgroundColor",
1374
+ "inlineClass",
1375
+ "inlineStyle",
1376
+ ],
1043
1377
  },
1044
- 'moreParagraph': {
1045
- 'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify',
1046
- 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
1378
+ moreParagraph: {
1379
+ buttons: [
1380
+ "alignLeft",
1381
+ "alignCenter",
1382
+ "formatOLSimple",
1383
+ "alignRight",
1384
+ "alignJustify",
1385
+ "formatOL",
1386
+ "formatUL",
1387
+ "paragraphFormat",
1388
+ "paragraphStyle",
1389
+ "lineHeight",
1390
+ "outdent",
1391
+ "indent",
1392
+ "quote",
1393
+ ],
1047
1394
  },
1048
- 'moreRich': {
1049
- 'buttons': ['insertLink', 'insertImage', 'insertTable', 'emoticons', 'fontAwesome',
1050
- 'specialCharacters', 'embedly']
1395
+ moreRich: {
1396
+ buttons: [
1397
+ "insertLink",
1398
+ "insertImage",
1399
+ "insertTable",
1400
+ "emoticons",
1401
+ "fontAwesome",
1402
+ "specialCharacters",
1403
+ "embedly",
1404
+ ],
1405
+ },
1406
+ moreMisc: {
1407
+ buttons: [
1408
+ "selectAll",
1409
+ "clearFormatting",
1410
+ "html",
1411
+ "undo",
1412
+ "redo",
1413
+ "fullscreen",
1414
+ ],
1415
+ align: "right",
1051
1416
  },
1052
- 'moreMisc': {
1053
- 'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
1054
- 'align': 'right',
1055
- }
1056
1417
  },
1057
1418
  /*
1058
1419
  Upload:
1059
1420
  https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
1060
1421
  */
1061
- imageUploadURL: '/api/HtmlEditor/UploadImage',
1062
- imageAllowedTypes: ['jpeg', 'jpg', 'png'],
1063
- imageUploadParams: { uploadType: '', uploadParentId: '' }
1422
+ imageUploadURL: "/api/HtmlEditor/UploadImage",
1423
+ imageAllowedTypes: ["jpeg", "jpg", "png"],
1424
+ imageUploadParams: { uploadType: "", uploadParentId: "" },
1064
1425
  };
1065
1426
 
1066
1427
  /*
1067
1428
  <file>
1429
+ Project:
1430
+ @osovitny/anatoly
1431
+
1068
1432
  Authors:
1069
- Anatoly Osovitny
1070
1433
  Vadim Osovitny
1434
+ Anatoly Osovitny
1071
1435
 
1072
1436
  Created:
1073
1437
  12 Dec 2017
@@ -1084,7 +1448,7 @@ class BaseHtmlEditorComponent extends BaseEditComponent {
1084
1448
  this.froalaEditorInitialized = false;
1085
1449
  this.afterInitializedActions = [];
1086
1450
  //Inputs
1087
- this.editorLabelText = 'Html';
1451
+ this.editorLabelText = "Html";
1088
1452
  this.editorOptions = {};
1089
1453
  }
1090
1454
  ngOnInit() {
@@ -1128,7 +1492,9 @@ class BaseHtmlEditorComponent extends BaseEditComponent {
1128
1492
  doAfterInitialized(action) {
1129
1493
  let that = this;
1130
1494
  if (!this.froalaEditorInitialized) {
1131
- this.afterInitializedActions.push(() => { action(that); });
1495
+ this.afterInitializedActions.push(() => {
1496
+ action(that);
1497
+ });
1132
1498
  }
1133
1499
  else {
1134
1500
  action(that);
@@ -1141,7 +1507,7 @@ class BaseHtmlEditorComponent extends BaseEditComponent {
1141
1507
  setUploadParams(uploadType, uploadParentId) {
1142
1508
  this.doAfterInitialized(function (that) {
1143
1509
  var editor = that.getEditor();
1144
- if (typeof (editor) == "undefined" || editor == null) {
1510
+ if (typeof editor == "undefined" || editor == null) {
1145
1511
  return;
1146
1512
  }
1147
1513
  editor.opts.imageUploadParams.uploadType = uploadType;
@@ -1156,9 +1522,12 @@ BaseHtmlEditorComponent.propDecorators = {
1156
1522
 
1157
1523
  /*
1158
1524
  <file>
1525
+ Project:
1526
+ @osovitny/anatoly
1527
+
1159
1528
  Authors:
1160
- Anatoly Osovitny
1161
1529
  Vadim Osovitny
1530
+ Anatoly Osovitny
1162
1531
 
1163
1532
  Created:
1164
1533
  12 Dec 2017
@@ -1176,7 +1545,7 @@ class HtmlEditorComponent extends BaseHtmlEditorComponent {
1176
1545
  setHtml(content) {
1177
1546
  this.doAfterInitialized(function (that) {
1178
1547
  var editor = that.getEditor();
1179
- if (typeof (editor) == "undefined" || editor == null) {
1548
+ if (typeof editor == "undefined" || editor == null) {
1180
1549
  return;
1181
1550
  }
1182
1551
  editor.html.set(content);
@@ -1184,7 +1553,7 @@ class HtmlEditorComponent extends BaseHtmlEditorComponent {
1184
1553
  }
1185
1554
  getHtml() {
1186
1555
  var editor = this.getEditor();
1187
- if (typeof (editor) == "undefined" || editor == null) {
1556
+ if (typeof editor == "undefined" || editor == null) {
1188
1557
  return;
1189
1558
  }
1190
1559
  return editor.html.get(false);
@@ -1192,7 +1561,7 @@ class HtmlEditorComponent extends BaseHtmlEditorComponent {
1192
1561
  }
1193
1562
  HtmlEditorComponent.decorators = [
1194
1563
  { type: Component, args: [{
1195
- selector: 'anatoly-html-editor',
1564
+ selector: "anatoly-html-editor",
1196
1565
  template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>"
1197
1566
  },] }
1198
1567
  ];
@@ -1200,9 +1569,12 @@ HtmlEditorComponent.ctorParameters = () => [];
1200
1569
 
1201
1570
  /*
1202
1571
  <file>
1572
+ Project:
1573
+ @osovitny/anatoly
1574
+
1203
1575
  Authors:
1204
- Anatoly Osovitny
1205
1576
  Vadim Osovitny
1577
+ Anatoly Osovitny
1206
1578
 
1207
1579
  Created:
1208
1580
  12 Dec 2017
@@ -1216,7 +1588,7 @@ HtmlEditorComponent.ctorParameters = () => [];
1216
1588
  class FormsHtmlEditorComponent extends BaseHtmlEditorComponent {
1217
1589
  constructor() {
1218
1590
  super();
1219
- this.editorFormKey = 'html';
1591
+ this.editorFormKey = "html";
1220
1592
  }
1221
1593
  setFormValueAfterInitialized(name, value) {
1222
1594
  this.doAfterInitialized(function (that) {
@@ -1226,7 +1598,7 @@ class FormsHtmlEditorComponent extends BaseHtmlEditorComponent {
1226
1598
  }
1227
1599
  FormsHtmlEditorComponent.decorators = [
1228
1600
  { type: Component, args: [{
1229
- selector: 'anatoly-forms-html-editor',
1601
+ selector: "anatoly-forms-html-editor",
1230
1602
  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"
1231
1603
  },] }
1232
1604
  ];
@@ -1237,7 +1609,11 @@ FormsHtmlEditorComponent.propDecorators = {
1237
1609
 
1238
1610
  /*
1239
1611
  <file>
1612
+ Project:
1613
+ @osovitny/anatoly
1614
+
1240
1615
  Authors:
1616
+ Vadim Osovitny
1241
1617
  Anatoly Osovitny
1242
1618
 
1243
1619
  Created:
@@ -1252,13 +1628,13 @@ FormsHtmlEditorComponent.propDecorators = {
1252
1628
  class ContentHeaderComponent {
1253
1629
  ngOnInit() {
1254
1630
  if (this.title == null) {
1255
- this.title = '';
1631
+ this.title = "";
1256
1632
  }
1257
1633
  }
1258
1634
  }
1259
1635
  ContentHeaderComponent.decorators = [
1260
1636
  { type: Component, args: [{
1261
- selector: 'anatoly-content-header',
1637
+ selector: "anatoly-content-header",
1262
1638
  template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
1263
1639
  },] }
1264
1640
  ];
@@ -1268,11 +1644,56 @@ ContentHeaderComponent.propDecorators = {
1268
1644
 
1269
1645
  /*
1270
1646
  <file>
1647
+ Project:
1648
+ @osovitny/anatoly
1649
+
1650
+ Authors:
1651
+ Vadim Osovitny
1652
+ Anatoly Osovitny
1653
+
1654
+ Created:
1655
+ 26 Jun 2020
1656
+
1657
+ Version:
1658
+ 1.0
1659
+
1660
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1661
+ </file>
1662
+ */
1663
+ class Copy2ClipboardComponent {
1664
+ constructor() {
1665
+ this.tooltip = "Copy to clipboard";
1666
+ this.text = "";
1667
+ }
1668
+ onCopy2Clipboard(event) {
1669
+ this.tooltip = "Copied";
1670
+ setTimeout(() => {
1671
+ this.tooltip = "Copy to clipboard";
1672
+ }, 1000);
1673
+ Utils.copyToClipBoard(event, this.text);
1674
+ }
1675
+ }
1676
+ Copy2ClipboardComponent.decorators = [
1677
+ { type: Component, args: [{
1678
+ selector: "anatoly-copy-2-clipboard",
1679
+ 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"
1680
+ },] }
1681
+ ];
1682
+ Copy2ClipboardComponent.propDecorators = {
1683
+ text: [{ type: Input }]
1684
+ };
1685
+
1686
+ /*
1687
+ <file>
1688
+ Project:
1689
+ @osovitny/anatoly
1690
+
1271
1691
  Authors:
1272
1692
  Vadim Osovitny
1693
+ Anatoly Osovitny
1273
1694
 
1274
1695
  Created:
1275
- 10 Nov 2017
1696
+ 26 Jun 2020
1276
1697
 
1277
1698
  Version:
1278
1699
  1.0
@@ -1305,6 +1726,7 @@ AnatolyUIModule.decorators = [
1305
1726
  HtmlEditorComponent,
1306
1727
  FormsHtmlEditorComponent,
1307
1728
  ContentHeaderComponent,
1729
+ Copy2ClipboardComponent,
1308
1730
  ],
1309
1731
  exports: [
1310
1732
  SubscribePlanButtonComponent,
@@ -1318,11 +1740,29 @@ AnatolyUIModule.decorators = [
1318
1740
  HtmlEditorComponent,
1319
1741
  FormsHtmlEditorComponent,
1320
1742
  ContentHeaderComponent,
1321
- ]
1743
+ Copy2ClipboardComponent,
1744
+ ],
1322
1745
  },] }
1323
1746
  ];
1324
1747
 
1325
- // Module
1748
+ /*
1749
+ <file>
1750
+ Project:
1751
+ @osovitny/anatoly
1752
+
1753
+ Authors:
1754
+ Vadim Osovitny
1755
+ Anatoly Osovitny
1756
+
1757
+ Created:
1758
+ 26 Jun 2020
1759
+
1760
+ Version:
1761
+ 1.0
1762
+
1763
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1764
+ </file>
1765
+ */
1326
1766
 
1327
1767
  /*
1328
1768
  * Public API Surface of anatoly
@@ -1332,5 +1772,5 @@ AnatolyUIModule.decorators = [
1332
1772
  * Generated bundle index. Do not edit.
1333
1773
  */
1334
1774
 
1335
- export { Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyUIModule, AppContextService, BaseApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BillingApiService, BuyAccessButtonComponent, ContentHeaderComponent, FormValidationSummaryComponent, FormsHtmlEditorComponent, HtmlEditorComponent, ItemValidationSummaryComponent, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, SubscribePlanButtonComponent, UpgradePlanButtonComponent, Utils, ValidationSummaryComponent };
1775
+ export { Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyUIModule, AppContextService, BaseApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BillingApiService, BuyAccessButtonComponent, ContentHeaderComponent, FormValidationSummaryComponent, FormsHtmlEditorComponent, GlobalErrorHandler, Guid, HtmlEditorComponent, ItemValidationSummaryComponent, LoggingService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, Subs, SubscribePlanButtonComponent, UpgradePlanButtonComponent, Utils, ValidationSummaryComponent };
1336
1776
  //# sourceMappingURL=osovitny-anatoly.js.map