@osovitny/anatoly 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +5 -0
  2. package/bundles/osovitny-anatoly.umd.js +860 -1491
  3. package/bundles/osovitny-anatoly.umd.js.map +1 -1
  4. package/bundles/osovitny-anatoly.umd.min.js +2 -2
  5. package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
  6. package/esm2015/lib/billing/billing.module.js +33 -35
  7. package/esm2015/lib/billing/components/buyaccess/buyaccess-button.component.js +26 -76
  8. package/esm2015/lib/billing/components/subscriptions/subscribe-plan-button.component.js +19 -53
  9. package/esm2015/lib/billing/components/subscriptions/upgrade-plan-button.component.js +27 -56
  10. package/esm2015/lib/billing/index.js +8 -5
  11. package/esm2015/lib/billing/services/base-billing-api.service.js +17 -80
  12. package/esm2015/lib/core/consts.js +2 -6
  13. package/esm2015/lib/core/core.module.js +25 -27
  14. package/esm2015/lib/core/index.js +8 -11
  15. package/esm2015/lib/core/services/appcontext.service.js +12 -63
  16. package/esm2015/lib/core/services/base-api.service.js +11 -94
  17. package/esm2015/lib/core/services/base-go.service.js +9 -31
  18. package/esm2015/lib/core/services/base-gridedit.service.js +19 -123
  19. package/esm2015/lib/identity/components/signin-button.component.js +13 -21
  20. package/esm2015/lib/identity/components/signout-button.component.js +13 -21
  21. package/esm2015/lib/identity/components/signup-button.component.js +13 -21
  22. package/esm2015/lib/identity/identity.module.js +21 -23
  23. package/esm2015/lib/identity/index.js +6 -5
  24. package/esm2015/lib/ui/components/base-edit.component.js +8 -47
  25. package/esm2015/lib/ui/components/base.component.js +1 -21
  26. package/esm2015/lib/ui/components/content-header/content-header.component.js +13 -22
  27. package/esm2015/lib/ui/components/html-editor/html-editor.component.js +56 -202
  28. package/esm2015/lib/ui/components/html-editor/html-editor.consts.js +47 -0
  29. package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +13 -25
  30. package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +16 -24
  31. package/esm2015/lib/ui/components/validation/validation-summary.component.js +9 -42
  32. package/esm2015/lib/ui/index.js +11 -10
  33. package/esm2015/lib/ui/ui.module.js +45 -43
  34. package/esm2015/osovitny-anatoly.js +2 -6
  35. package/esm2015/public-api.js +5 -9
  36. package/esm5/lib/billing/billing.module.js +30 -33
  37. package/esm5/lib/billing/components/buyaccess/buyaccess-button.component.js +25 -78
  38. package/esm5/lib/billing/components/subscriptions/subscribe-plan-button.component.js +17 -52
  39. package/esm5/lib/billing/components/subscriptions/upgrade-plan-button.component.js +25 -55
  40. package/esm5/lib/billing/index.js +8 -5
  41. package/esm5/lib/billing/services/base-billing-api.service.js +18 -97
  42. package/esm5/lib/core/consts.js +2 -6
  43. package/esm5/lib/core/core.module.js +22 -25
  44. package/esm5/lib/core/index.js +8 -11
  45. package/esm5/lib/core/services/appcontext.service.js +14 -78
  46. package/esm5/lib/core/services/base-api.service.js +17 -150
  47. package/esm5/lib/core/services/base-go.service.js +7 -29
  48. package/esm5/lib/core/services/base-gridedit.service.js +24 -160
  49. package/esm5/lib/identity/components/signin-button.component.js +11 -20
  50. package/esm5/lib/identity/components/signout-button.component.js +11 -20
  51. package/esm5/lib/identity/components/signup-button.component.js +11 -20
  52. package/esm5/lib/identity/identity.module.js +18 -21
  53. package/esm5/lib/identity/index.js +6 -5
  54. package/esm5/lib/ui/components/base-edit.component.js +16 -86
  55. package/esm5/lib/ui/components/base.component.js +5 -38
  56. package/esm5/lib/ui/components/content-header/content-header.component.js +12 -25
  57. package/esm5/lib/ui/components/html-editor/html-editor.component.js +60 -245
  58. package/esm5/lib/ui/components/html-editor/html-editor.consts.js +47 -0
  59. package/esm5/lib/ui/components/validation/form-validation-summary.component.js +13 -30
  60. package/esm5/lib/ui/components/validation/item-validation-summary.component.js +15 -25
  61. package/esm5/lib/ui/components/validation/validation-summary.component.js +13 -54
  62. package/esm5/lib/ui/index.js +11 -10
  63. package/esm5/lib/ui/ui.module.js +42 -41
  64. package/esm5/osovitny-anatoly.js +2 -6
  65. package/esm5/public-api.js +5 -9
  66. package/fesm2015/osovitny-anatoly.js +802 -1253
  67. package/fesm2015/osovitny-anatoly.js.map +1 -1
  68. package/fesm5/osovitny-anatoly.js +863 -1514
  69. package/fesm5/osovitny-anatoly.js.map +1 -1
  70. package/lib/billing/index.d.ts +4 -0
  71. package/lib/core/index.d.ts +4 -4
  72. package/lib/identity/index.d.ts +3 -0
  73. package/lib/ui/components/html-editor/html-editor.component.d.ts +4 -7
  74. package/lib/ui/components/html-editor/html-editor.consts.d.ts +1 -0
  75. package/lib/ui/index.d.ts +7 -3
  76. package/osovitny-anatoly.metadata.json +1 -1
  77. package/package.json +3 -7
@@ -1,10 +1,10 @@
1
- import { Injectable, NgModule, Component, Input } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
1
+ import { __decorate, __extends } from 'tslib';
2
+ import { Injectable, NgModule, Input, Component, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
3
3
  import { HttpClient, HttpClientModule, HttpClientXsrfModule, HttpClientJsonpModule } from '@angular/common/http';
4
- import { __extends } from 'tslib';
5
4
  import { map } from 'rxjs/operators';
6
5
  import { BehaviorSubject } from 'rxjs';
7
6
  import { ActivatedRoute, Router } from '@angular/router';
7
+ import { CommonModule } from '@angular/common';
8
8
  import { ReactiveFormsModule, FormsModule } from '@angular/forms';
9
9
  import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
10
10
  import { GridModule } from '@progress/kendo-angular-grid';
@@ -12,10 +12,6 @@ import { PopupModule } from '@progress/kendo-angular-popup';
12
12
  import { ButtonsModule } from '@progress/kendo-angular-buttons';
13
13
  import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
14
14
 
15
- /**
16
- * @fileoverview added by tsickle
17
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
18
- */
19
15
  var anatoly$1;
20
16
  (function (anatoly) {
21
17
  var consts;
@@ -25,346 +21,88 @@ var anatoly$1;
25
21
  consts.apiUrl = "/api/";
26
22
  })(consts = anatoly.consts || (anatoly.consts = {}));
27
23
  })(anatoly$1 || (anatoly$1 = {}));
28
- ((/** @type {?} */ (window))).anatoly = anatoly$1;
24
+ window.anatoly = anatoly$1;
29
25
 
30
- /**
31
- * @fileoverview added by tsickle
32
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
33
- */
26
+ /*
27
+ <file>
28
+ Authors:
29
+ Vadim Osovitny
30
+
31
+ Created:
32
+ 13 Nov 2017
33
+
34
+ Version:
35
+ 1.0
36
+
37
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
38
+ </file>
39
+ */
34
40
  var BaseApiService = /** @class */ (function () {
35
41
  function BaseApiService(http) {
36
42
  this.http = http;
37
43
  this.baseUrl = anatoly.consts.apiUrl;
38
44
  }
39
- /**
40
- * @private
41
- * @param {?=} data
42
- * @return {?}
43
- */
44
- BaseApiService.prototype.serializeParams = /**
45
- * @private
46
- * @param {?=} data
47
- * @return {?}
48
- */
49
- function (data) {
45
+ BaseApiService.prototype.serializeParams = function (data) {
50
46
  return data ? ('?' + $.param(data)) : '';
51
47
  };
52
48
  //webApi
53
- //webApi
54
- /**
55
- * @template T
56
- * @param {?} action
57
- * @param {?=} data
58
- * @return {?}
59
- */
60
- BaseApiService.prototype.get =
61
- //webApi
62
- /**
63
- * @template T
64
- * @param {?} action
65
- * @param {?=} data
66
- * @return {?}
67
- */
68
- function (action, data) {
69
- /** @type {?} */
49
+ BaseApiService.prototype.get = function (action, data) {
70
50
  var url = this.baseUrl + ("" + action + this.serializeParams(data));
71
- return this.http.get(url).pipe(map((/**
72
- * @param {?} res
73
- * @return {?}
74
- */
75
- function (res) { return (/** @type {?} */ (res)); })));
51
+ return this.http.get(url).pipe(map(function (res) { return res; }));
76
52
  };
77
- /**
78
- * @param {?} action
79
- * @param {?=} data
80
- * @return {?}
81
- */
82
- BaseApiService.prototype.post = /**
83
- * @param {?} action
84
- * @param {?=} data
85
- * @return {?}
86
- */
87
- function (action, data) {
88
- /** @type {?} */
53
+ BaseApiService.prototype.post = function (action, data) {
89
54
  var url = this.baseUrl + ("" + action);
90
55
  return this.http.post(url, data, { responseType: 'text' });
91
56
  };
92
- /**
93
- * @param {?} action
94
- * @param {?=} data
95
- * @return {?}
96
- */
97
- BaseApiService.prototype.postQS = /**
98
- * @param {?} action
99
- * @param {?=} data
100
- * @return {?}
101
- */
102
- function (action, data) {
103
- /** @type {?} */
57
+ BaseApiService.prototype.postQS = function (action, data) {
104
58
  var url = this.baseUrl + ("" + action + this.serializeParams(data));
105
59
  return this.http.post(url, null, { responseType: 'text' });
106
60
  };
107
61
  //gets
108
- //gets
109
- /**
110
- * @template T
111
- * @param {?=} data
112
- * @return {?}
113
- */
114
- BaseApiService.prototype.getAll =
115
- //gets
116
- /**
117
- * @template T
118
- * @param {?=} data
119
- * @return {?}
120
- */
121
- function (data) {
122
- return this.get('getall', data).pipe(map((/**
123
- * @param {?} res
124
- * @return {?}
125
- */
126
- function (res) { return (/** @type {?} */ (res)); })));
62
+ BaseApiService.prototype.getAll = function (data) {
63
+ return this.get('getall', data).pipe(map(function (res) { return res; }));
127
64
  };
128
- /**
129
- * @param {?} fileName
130
- * @param {?} jsonVersion
131
- * @return {?}
132
- */
133
- BaseApiService.prototype.getJsonFile = /**
134
- * @param {?} fileName
135
- * @param {?} jsonVersion
136
- * @return {?}
137
- */
138
- function (fileName, jsonVersion) {
65
+ BaseApiService.prototype.getJsonFile = function (fileName, jsonVersion) {
139
66
  if (!jsonVersion) {
140
67
  jsonVersion = "1.0";
141
68
  }
142
- /** @type {?} */
143
69
  var url = anatoly.consts.jsonUrl + fileName + '?' + jsonVersion;
144
- return this.http.get(url).pipe(map((/**
145
- * @param {?} res
146
- * @return {?}
147
- */
148
- function (res) { return (/** @type {?} */ (res)); })));
70
+ return this.http.get(url).pipe(map(function (res) { return res; }));
149
71
  };
150
- /**
151
- * @return {?}
152
- */
153
- BaseApiService.prototype.getNewGuid = /**
154
- * @return {?}
155
- */
156
- function () {
157
- /** @type {?} */
72
+ BaseApiService.prototype.getNewGuid = function () {
158
73
  var url = this.baseUrl + 'getNewGuid';
159
74
  return this.http.get(url, { responseType: 'text' });
160
75
  };
161
76
  //CRUD function
162
- //CRUD function
163
- /**
164
- * @template T
165
- * @param {?} id
166
- * @return {?}
167
- */
168
- BaseApiService.prototype.getById =
169
- //CRUD function
170
- /**
171
- * @template T
172
- * @param {?} id
173
- * @return {?}
174
- */
175
- function (id) {
77
+ BaseApiService.prototype.getById = function (id) {
176
78
  return this.get('getById', { id: id });
177
79
  };
178
- /**
179
- * @param {?} id
180
- * @return {?}
181
- */
182
- BaseApiService.prototype.remove = /**
183
- * @param {?} id
184
- * @return {?}
185
- */
186
- function (id) {
80
+ BaseApiService.prototype.remove = function (id) {
187
81
  return this.postQS('remove', { id: id });
188
82
  };
189
- BaseApiService.decorators = [
190
- { type: Injectable }
191
- ];
192
- /** @nocollapse */
193
83
  BaseApiService.ctorParameters = function () { return [
194
84
  { type: HttpClient }
195
85
  ]; };
86
+ BaseApiService = __decorate([
87
+ Injectable()
88
+ ], BaseApiService);
196
89
  return BaseApiService;
197
- }());
198
- if (false) {
199
- /**
200
- * @type {?}
201
- * @protected
202
- */
203
- BaseApiService.prototype.baseUrl;
204
- /**
205
- * @type {?}
206
- * @protected
207
- */
208
- BaseApiService.prototype.jsonUrl;
209
- /**
210
- * @type {?}
211
- * @protected
212
- */
213
- BaseApiService.prototype.http;
214
- }
215
-
216
- /**
217
- * @fileoverview added by tsickle
218
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
219
- */
220
- var AppContextService = /** @class */ (function (_super) {
221
- __extends(AppContextService, _super);
222
- function AppContextService(http) {
223
- var _this = _super.call(this, http) || this;
224
- _this.http = http;
225
- _this.current = null;
226
- _this.successes = [];
227
- _this.subscription = null;
228
- _this.baseUrl = anatoly.consts.apiUrl + 'appcontext/';
229
- return _this;
230
- }
231
- /**
232
- * @param {?} success
233
- * @return {?}
234
- */
235
- AppContextService.prototype.getCurrent = /**
236
- * @param {?} success
237
- * @return {?}
238
- */
239
- function (success) {
240
- var _this = this;
241
- if (typeof success == "undefined") {
242
- return;
243
- }
244
- if (this.current != null) {
245
- success(this.current);
246
- return;
247
- }
248
- this.successes.push(success);
249
- if (this.subscription != null) {
250
- return;
251
- }
252
- this.subscription = this.get('GetCurrentContext', null).subscribe((/**
253
- * @param {?} data
254
- * @return {?}
255
- */
256
- function (data) {
257
- _this.dataReceived(data);
258
- }), (/**
259
- * @param {?} e
260
- * @return {?}
261
- */
262
- function (e) { }));
263
- };
264
- /**
265
- * @param {?} data
266
- * @return {?}
267
- */
268
- AppContextService.prototype.dataReceived = /**
269
- * @param {?} data
270
- * @return {?}
271
- */
272
- function (data) {
273
- this.current = data;
274
- for (var i = 0; i < this.successes.length; i++) {
275
- /** @type {?} */
276
- var success = this.successes[i];
277
- success(data);
278
- }
279
- this.successes = [];
280
- this.subscription.unsubscribe();
281
- this.subscription = null;
282
- this.current = null;
283
- };
284
- /**
285
- * @return {?}
286
- */
287
- AppContextService.prototype.isUserSignedIn = /**
288
- * @return {?}
289
- */
290
- function () {
291
- return ((/** @type {?} */ (window))).__context_isUserSignedIn;
292
- };
293
- /**
294
- * @return {?}
295
- */
296
- AppContextService.prototype.isUserAdmin = /**
297
- * @return {?}
298
- */
299
- function () {
300
- return ((/** @type {?} */ (window))).__context_isUserAdmin;
301
- };
302
- AppContextService.decorators = [
303
- { type: Injectable }
304
- ];
305
- /** @nocollapse */
306
- AppContextService.ctorParameters = function () { return [
307
- { type: HttpClient }
308
- ]; };
309
- return AppContextService;
310
- }(BaseApiService));
311
- if (false) {
312
- /**
313
- * @type {?}
314
- * @private
315
- */
316
- AppContextService.prototype.current;
317
- /**
318
- * @type {?}
319
- * @private
320
- */
321
- AppContextService.prototype.successes;
322
- /**
323
- * @type {?}
324
- * @private
325
- */
326
- AppContextService.prototype.subscription;
327
- /**
328
- * @type {?}
329
- * @protected
330
- */
331
- AppContextService.prototype.http;
332
- }
333
-
334
- /**
335
- * @fileoverview added by tsickle
336
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
337
- */
338
- var AnatolyCoreModule = /** @class */ (function () {
339
- function AnatolyCoreModule() {
340
- }
341
- AnatolyCoreModule.decorators = [
342
- { type: NgModule, args: [{
343
- imports: [
344
- CommonModule,
345
- HttpClientModule,
346
- HttpClientXsrfModule,
347
- HttpClientJsonpModule
348
- ],
349
- exports: [
350
- CommonModule,
351
- HttpClientModule,
352
- HttpClientXsrfModule,
353
- HttpClientJsonpModule
354
- ],
355
- declarations: [],
356
- providers: [
357
- AppContextService
358
- ]
359
- },] }
360
- ];
361
- return AnatolyCoreModule;
362
90
  }());
363
91
 
364
- /**
365
- * @fileoverview added by tsickle
366
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
367
- */
92
+ /*
93
+ <file>
94
+ Authors:
95
+ Vadim Osovitny
96
+
97
+ Created:
98
+ 29 Apr 2018
99
+
100
+ Version:
101
+ 1.0
102
+
103
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
104
+ </file>
105
+ */
368
106
  var BaseGridEditService = /** @class */ (function (_super) {
369
107
  __extends(BaseGridEditService, _super);
370
108
  function BaseGridEditService(http) {
@@ -375,67 +113,27 @@ var BaseGridEditService = /** @class */ (function (_super) {
375
113
  _this.baseReadUrl = _this.baseUrl + "getAll";
376
114
  return _this;
377
115
  }
378
- /**
379
- * @private
380
- * @param {?=} data
381
- * @return {?}
382
- */
383
- BaseGridEditService.prototype.serializeParams = /**
384
- * @private
385
- * @param {?=} data
386
- * @return {?}
387
- */
388
- function (data) {
116
+ BaseGridEditService.prototype.serializeParams = function (data) {
389
117
  return data ? ('?' + $.param(data)) : '';
390
118
  };
391
- /**
392
- * @private
393
- * @return {?}
394
- */
395
- BaseGridEditService.prototype.reset = /**
396
- * @private
397
- * @return {?}
398
- */
399
- function () {
119
+ BaseGridEditService.prototype.reset = function () {
400
120
  this.data = [];
401
121
  };
402
- /**
403
- * @param {?} dataItem
404
- * @return {?}
405
- */
406
- BaseGridEditService.prototype.resetItem = /**
407
- * @param {?} dataItem
408
- * @return {?}
409
- */
410
- function (dataItem) {
122
+ BaseGridEditService.prototype.resetItem = function (dataItem) {
411
123
  if (!dataItem) {
412
124
  return;
413
125
  }
414
126
  //find orignal data item
415
- /** @type {?} */
416
- var originalDataItem = this.data.find((/**
417
- * @param {?} item
418
- * @return {?}
419
- */
420
- function (item) { return item.Id === dataItem.Id; }));
127
+ var originalDataItem = this.data.find(function (item) { return item.Id === dataItem.Id; });
421
128
  //revert changes
422
129
  Object.assign(originalDataItem, dataItem);
423
130
  _super.prototype.next.call(this, this.data);
424
131
  };
425
- /**
426
- * @param {?=} params
427
- * @return {?}
428
- */
429
- BaseGridEditService.prototype.read = /**
430
- * @param {?=} params
431
- * @return {?}
432
- */
433
- function (params) {
132
+ BaseGridEditService.prototype.read = function (params) {
434
133
  var _this = this;
435
134
  if (this.data.length) {
436
135
  return _super.prototype.next.call(this, this.data);
437
136
  }
438
- /** @type {?} */
439
137
  var url = this.baseReadUrl;
440
138
  if (typeof params === 'undefined') {
441
139
  params = this.savedReadParams;
@@ -448,295 +146,320 @@ var BaseGridEditService = /** @class */ (function (_super) {
448
146
  // .map(res => <any[]>res)
449
147
  // .do(data => { this.data = data; }).subscribe(data => { super.next(data); });
450
148
  //}
451
- this.http.get(url).pipe(map((/**
452
- * @param {?} res
453
- * @return {?}
454
- */
455
- function (res) { return (/** @type {?} */ (res)); }))).subscribe((/**
456
- * @param {?} data
457
- * @return {?}
458
- */
459
- function (data) { _super.prototype.next.call(_this, data); }));
149
+ this.http.get(url).pipe(map(function (res) { return res; })).subscribe(function (data) { _super.prototype.next.call(_this, data); });
460
150
  };
461
- /**
462
- * @param {?} data
463
- * @param {?} isNew
464
- * @param {?=} sucess
465
- * @return {?}
466
- */
467
- BaseGridEditService.prototype.save = /**
468
- * @param {?} data
469
- * @param {?} isNew
470
- * @param {?=} sucess
471
- * @return {?}
472
- */
473
- function (data, isNew, sucess) {
151
+ BaseGridEditService.prototype.save = function (data, isNew, sucess) {
474
152
  var _this = this;
475
- /** @type {?} */
476
153
  var action = isNew ? 'add' : 'update';
477
154
  this.reset();
478
- this.post(action, data).subscribe((/**
479
- * @return {?}
480
- */
481
- function () {
482
- }), (/**
483
- * @return {?}
484
- */
485
- function () {
155
+ this.post(action, data).subscribe(function () {
156
+ }, function () {
486
157
  _this.read();
487
- }), (/**
488
- * @return {?}
489
- */
490
- function () {
158
+ }, function () {
491
159
  _this.read();
492
160
  if (sucess)
493
161
  sucess();
494
- }));
162
+ });
495
163
  };
496
- /**
497
- * @param {?} data
498
- * @param {?=} sucess
499
- * @return {?}
500
- */
501
- BaseGridEditService.prototype.remove = /**
502
- * @param {?} data
503
- * @param {?=} sucess
504
- * @return {?}
505
- */
506
- function (data, sucess) {
164
+ BaseGridEditService.prototype.remove = function (data, sucess) {
507
165
  var _this = this;
508
166
  this.reset();
509
- this.post('remove', data).subscribe((/**
510
- * @return {?}
511
- */
512
- function () {
513
- }), (/**
514
- * @return {?}
515
- */
516
- function () {
167
+ this.post('remove', data).subscribe(function () {
168
+ }, function () {
517
169
  _this.read();
518
- }), (/**
519
- * @return {?}
520
- */
521
- function () {
170
+ }, function () {
522
171
  _this.read();
523
172
  if (sucess)
524
173
  sucess();
525
- }));
174
+ });
526
175
  };
527
- /**
528
- * @param {?} action
529
- * @param {?=} data
530
- * @return {?}
531
- */
532
- BaseGridEditService.prototype.post = /**
533
- * @param {?} action
534
- * @param {?=} data
535
- * @return {?}
536
- */
537
- function (action, data) {
538
- /** @type {?} */
176
+ BaseGridEditService.prototype.post = function (action, data) {
539
177
  var url = this.baseUrl + ("" + action + this.serializeParams(data));
540
- return this.http.post(url, data).pipe(map((/**
541
- * @param {?} res
542
- * @return {?}
543
- */
544
- function (res) { return (/** @type {?} */ (res)); })));
178
+ return this.http.post(url, data).pipe(map(function (res) { return res; }));
545
179
  };
546
- BaseGridEditService.decorators = [
547
- { type: Injectable }
548
- ];
549
- /** @nocollapse */
550
180
  BaseGridEditService.ctorParameters = function () { return [
551
181
  { type: HttpClient }
552
182
  ]; };
183
+ BaseGridEditService = __decorate([
184
+ Injectable()
185
+ ], BaseGridEditService);
553
186
  return BaseGridEditService;
554
- }(BehaviorSubject));
555
- if (false) {
556
- /**
557
- * @type {?}
558
- * @protected
559
- */
560
- BaseGridEditService.prototype.baseUrl;
561
- /**
562
- * @type {?}
563
- * @protected
564
- */
565
- BaseGridEditService.prototype.baseReadUrl;
566
- /**
567
- * @type {?}
568
- * @protected
569
- */
570
- BaseGridEditService.prototype.savedReadParams;
571
- /**
572
- * @type {?}
573
- * @private
574
- */
575
- BaseGridEditService.prototype.data;
576
- /**
577
- * @type {?}
578
- * @protected
579
- */
580
- BaseGridEditService.prototype.http;
581
- }
187
+ }(BehaviorSubject));
582
188
 
583
- /**
584
- * @fileoverview added by tsickle
585
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
586
- */
189
+ /*
190
+ <file>
191
+ Authors:
192
+ Vadim Osovitny
193
+
194
+ Created:
195
+ 17 Jun 2018
196
+
197
+ Version:
198
+ 1.0
199
+
200
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
201
+ </file>
202
+ */
587
203
  var BaseGoService = /** @class */ (function () {
588
204
  function BaseGoService(route, router) {
589
205
  this.route = route;
590
206
  this.router = router;
591
207
  }
592
- /**
593
- * @return {?}
594
- */
595
- BaseGoService.prototype.locationReload = /**
596
- * @return {?}
597
- */
598
- function () {
208
+ BaseGoService.prototype.locationReload = function () {
599
209
  //this.router.navigate([this.route.url]);
600
- ((/** @type {?} */ (window))).location.reload();
210
+ window.location.reload();
601
211
  };
602
- BaseGoService.decorators = [
603
- { type: Injectable }
604
- ];
605
- /** @nocollapse */
606
212
  BaseGoService.ctorParameters = function () { return [
607
213
  { type: ActivatedRoute },
608
214
  { type: Router }
609
215
  ]; };
216
+ BaseGoService = __decorate([
217
+ Injectable()
218
+ ], BaseGoService);
610
219
  return BaseGoService;
611
- }());
612
- if (false) {
613
- /**
614
- * @type {?}
615
- * @protected
616
- */
617
- BaseGoService.prototype.route;
618
- /**
619
- * @type {?}
620
- * @protected
621
- */
622
- BaseGoService.prototype.router;
623
- }
624
-
625
- /**
626
- * @fileoverview added by tsickle
627
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
628
- */
220
+ }());
629
221
 
630
- /**
631
- * @fileoverview added by tsickle
632
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
633
- */
634
- var SignInButtonComponent = /** @class */ (function () {
635
- function SignInButtonComponent() {
222
+ /*
223
+ <file>
224
+ Authors:
225
+ Vadim Osovitny
226
+
227
+ Created:
228
+ 13 Nov 2017
229
+
230
+ Version:
231
+ 1.0
232
+
233
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
234
+ </file>
235
+ */
236
+ var AppContextService = /** @class */ (function (_super) {
237
+ __extends(AppContextService, _super);
238
+ function AppContextService(http) {
239
+ var _this = _super.call(this, http) || this;
240
+ _this.http = http;
241
+ _this.current = null;
242
+ _this.successes = [];
243
+ _this.subscription = null;
244
+ _this.baseUrl = anatoly.consts.apiUrl + 'appcontext/';
245
+ return _this;
636
246
  }
637
- SignInButtonComponent.decorators = [
638
- { type: Component, args: [{
639
- selector: 'anatoly-signin-button',
640
- template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
641
- }] }
642
- ];
643
- /** @nocollapse */
644
- SignInButtonComponent.ctorParameters = function () { return []; };
645
- SignInButtonComponent.propDecorators = {
646
- classbtn: [{ type: Input }]
247
+ AppContextService.prototype.getCurrent = function (success) {
248
+ var _this = this;
249
+ if (typeof success == "undefined") {
250
+ return;
251
+ }
252
+ if (this.current != null) {
253
+ success(this.current);
254
+ return;
255
+ }
256
+ this.successes.push(success);
257
+ if (this.subscription != null) {
258
+ return;
259
+ }
260
+ this.subscription = this.get('GetCurrentContext', null).subscribe(function (data) {
261
+ _this.dataReceived(data);
262
+ }, function (e) { });
647
263
  };
648
- return SignInButtonComponent;
649
- }());
650
- if (false) {
651
- /** @type {?} */
652
- SignInButtonComponent.prototype.classbtn;
653
- }
264
+ AppContextService.prototype.dataReceived = function (data) {
265
+ this.current = data;
266
+ for (var i = 0; i < this.successes.length; i++) {
267
+ var success = this.successes[i];
268
+ success(data);
269
+ }
270
+ this.successes = [];
271
+ this.subscription.unsubscribe();
272
+ this.subscription = null;
273
+ this.current = null;
274
+ };
275
+ AppContextService.prototype.isUserSignedIn = function () {
276
+ return window.__context_isUserSignedIn;
277
+ };
278
+ AppContextService.prototype.isUserAdmin = function () {
279
+ return window.__context_isUserAdmin;
280
+ };
281
+ AppContextService.ctorParameters = function () { return [
282
+ { type: HttpClient }
283
+ ]; };
284
+ AppContextService = __decorate([
285
+ Injectable()
286
+ ], AppContextService);
287
+ return AppContextService;
288
+ }(BaseApiService));
654
289
 
655
- /**
656
- * @fileoverview added by tsickle
657
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
658
- */
659
- var SignUpButtonComponent = /** @class */ (function () {
660
- function SignUpButtonComponent() {
290
+ /*
291
+ <file>
292
+ Authors:
293
+ Vadim Osovitny
294
+
295
+ Created:
296
+ 10 Nov 2017
297
+
298
+ Version:
299
+ 1.0
300
+
301
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
302
+ </file>
303
+ */
304
+ var AnatolyCoreModule = /** @class */ (function () {
305
+ function AnatolyCoreModule() {
661
306
  }
662
- SignUpButtonComponent.decorators = [
663
- { type: Component, args: [{
664
- selector: 'anatoly-signup-button',
665
- template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n"
666
- }] }
667
- ];
668
- /** @nocollapse */
669
- SignUpButtonComponent.ctorParameters = function () { return []; };
670
- SignUpButtonComponent.propDecorators = {
671
- classbtn: [{ type: Input }]
672
- };
673
- return SignUpButtonComponent;
674
- }());
675
- if (false) {
676
- /** @type {?} */
677
- SignUpButtonComponent.prototype.classbtn;
678
- }
307
+ AnatolyCoreModule = __decorate([
308
+ NgModule({
309
+ imports: [
310
+ CommonModule,
311
+ HttpClientModule,
312
+ HttpClientXsrfModule,
313
+ HttpClientJsonpModule
314
+ ],
315
+ exports: [
316
+ CommonModule,
317
+ HttpClientModule,
318
+ HttpClientXsrfModule,
319
+ HttpClientJsonpModule
320
+ ],
321
+ declarations: [],
322
+ providers: [
323
+ AppContextService
324
+ ]
325
+ })
326
+ ], AnatolyCoreModule);
327
+ return AnatolyCoreModule;
328
+ }());
679
329
 
680
- /**
681
- * @fileoverview added by tsickle
682
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
683
- */
684
- var SignOutButtonComponent = /** @class */ (function () {
685
- function SignOutButtonComponent() {
330
+ // Base
331
+
332
+ /*
333
+ <file>
334
+ Authors:
335
+ Vadim Osovitny
336
+
337
+ Created:
338
+ 12 Nov 2017
339
+
340
+ Version:
341
+ 1.0
342
+
343
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
344
+ </file>
345
+ */
346
+ var BaseBillingApiService = /** @class */ (function (_super) {
347
+ __extends(BaseBillingApiService, _super);
348
+ function BaseBillingApiService(http) {
349
+ var _this = _super.call(this, http) || this;
350
+ _this.http = http;
351
+ _this.baseUrl += 'billing/';
352
+ return _this;
686
353
  }
687
- SignOutButtonComponent.decorators = [
688
- { type: Component, args: [{
689
- selector: 'anatoly-signout-button',
690
- template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
691
- }] }
692
- ];
693
- /** @nocollapse */
694
- SignOutButtonComponent.ctorParameters = function () { return []; };
695
- SignOutButtonComponent.propDecorators = {
696
- classbtn: [{ type: Input }]
354
+ BaseBillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
355
+ this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
356
+ .subscribe(function (data) { }, function (e) { if (error)
357
+ error(); }, function () { if (success)
358
+ success(); });
697
359
  };
698
- return SignOutButtonComponent;
699
- }());
700
- if (false) {
701
- /** @type {?} */
702
- SignOutButtonComponent.prototype.classbtn;
703
- }
360
+ BaseBillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
361
+ this.postQS('cancelRequestedSubscription', null)
362
+ .subscribe(function (data) { }, function (e) { if (error)
363
+ error(); }, function () { if (success)
364
+ success(); });
365
+ };
366
+ BaseBillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
367
+ this.postQS('buyAccess', { requestedPlan: requestedPlan })
368
+ .subscribe(function (data) { }, function (e) { if (error)
369
+ error(); }, function () { if (success)
370
+ success(); });
371
+ };
372
+ BaseBillingApiService.ctorParameters = function () { return [
373
+ { type: HttpClient }
374
+ ]; };
375
+ BaseBillingApiService = __decorate([
376
+ Injectable()
377
+ ], BaseBillingApiService);
378
+ return BaseBillingApiService;
379
+ }(BaseApiService));
704
380
 
705
- /**
706
- * @fileoverview added by tsickle
707
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
708
- */
709
- var AnatolyIdentityModule = /** @class */ (function () {
710
- function AnatolyIdentityModule() {
381
+ /*
382
+ <file>
383
+ Authors:
384
+ Vadim Osovitny
385
+
386
+ Created:
387
+ 14 Aug 2018
388
+
389
+ Version:
390
+ 1.0
391
+
392
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
393
+ </file>
394
+ */
395
+ var BuyAccessButtonComponent = /** @class */ (function () {
396
+ function BuyAccessButtonComponent(appcontext, api) {
397
+ this.appcontext = appcontext;
398
+ this.api = api;
399
+ this.contextUpdated = false;
400
+ this.isUserSignedIn = false;
401
+ this.currentPlan = 0;
402
+ this.currentPlanTitle = "";
711
403
  }
712
- AnatolyIdentityModule.decorators = [
713
- { type: NgModule, args: [{
714
- imports: [],
715
- exports: [
716
- SignInButtonComponent,
717
- SignUpButtonComponent,
718
- SignOutButtonComponent
719
- ],
720
- declarations: [
721
- SignInButtonComponent,
722
- SignUpButtonComponent,
723
- SignOutButtonComponent
724
- ],
725
- providers: []
726
- },] }
727
- ];
728
- return AnatolyIdentityModule;
404
+ BuyAccessButtonComponent.prototype.ngOnInit = function () {
405
+ var _this = this;
406
+ if (!this.appcontext.isUserSignedIn()) {
407
+ this.contextUpdated = true;
408
+ return;
409
+ }
410
+ this.appcontext.getCurrent(function (current) {
411
+ _this.isUserSignedIn = current.isUserSignedIn;
412
+ if (_this.isUserSignedIn) {
413
+ _this.currentPlan = current.account.billingPlan;
414
+ _this.currentPlanTitle = current.account.billingPlanAsString;
415
+ }
416
+ _this.contextUpdated = true;
417
+ });
418
+ };
419
+ BuyAccessButtonComponent.prototype.onBuyPlan = function () {
420
+ var text = "Requested plan: " + this.plantitle + " ";
421
+ var that = this;
422
+ osovitny.ui.areYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
423
+ that.api.buyAccess(that.plan, function () {
424
+ osovitny.ui.alertSuccess('Access Granted', null, function () {
425
+ window.location.reload();
426
+ });
427
+ });
428
+ });
429
+ };
430
+ BuyAccessButtonComponent.ctorParameters = function () { return [
431
+ { type: AppContextService },
432
+ { type: BaseBillingApiService }
433
+ ]; };
434
+ __decorate([
435
+ Input()
436
+ ], BuyAccessButtonComponent.prototype, "plan", void 0);
437
+ __decorate([
438
+ Input()
439
+ ], BuyAccessButtonComponent.prototype, "plantitle", void 0);
440
+ BuyAccessButtonComponent = __decorate([
441
+ Component({
442
+ selector: 'anatoly-buyaccess-button',
443
+ 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"
444
+ })
445
+ ], BuyAccessButtonComponent);
446
+ return BuyAccessButtonComponent;
729
447
  }());
730
448
 
731
- /**
732
- * @fileoverview added by tsickle
733
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
734
- */
735
-
736
- /**
737
- * @fileoverview added by tsickle
738
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
739
- */
449
+ /*
450
+ <file>
451
+ Authors:
452
+ Vadim Osovitny
453
+
454
+ Created:
455
+ 1 Jun 2018
456
+
457
+ Version:
458
+ 1.0
459
+
460
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
461
+ </file>
462
+ */
740
463
  var SubscribePlanButtonComponent = /** @class */ (function () {
741
464
  function SubscribePlanButtonComponent(appcontext) {
742
465
  this.appcontext = appcontext;
@@ -747,23 +470,13 @@ var SubscribePlanButtonComponent = /** @class */ (function () {
747
470
  this.requestedPlan = 0;
748
471
  this.requestedPlanTitle = "";
749
472
  }
750
- /**
751
- * @return {?}
752
- */
753
- SubscribePlanButtonComponent.prototype.ngOnInit = /**
754
- * @return {?}
755
- */
756
- function () {
473
+ SubscribePlanButtonComponent.prototype.ngOnInit = function () {
757
474
  var _this = this;
758
475
  if (!this.appcontext.isUserSignedIn()) {
759
476
  this.contextUpdated = true;
760
477
  return;
761
478
  }
762
- this.appcontext.getCurrent((/**
763
- * @param {?} current
764
- * @return {?}
765
- */
766
- function (current) {
479
+ this.appcontext.getCurrent(function (current) {
767
480
  _this.isUserSignedIn = current.isUserSignedIn;
768
481
  if (_this.isUserSignedIn) {
769
482
  _this.currentPlan = current.account.billingPlan;
@@ -772,384 +485,251 @@ var SubscribePlanButtonComponent = /** @class */ (function () {
772
485
  _this.requestedPlanTitle = current.account.requestedBillingPlanAsString;
773
486
  }
774
487
  _this.contextUpdated = true;
775
- }));
488
+ });
776
489
  };
777
- SubscribePlanButtonComponent.decorators = [
778
- { type: Component, args: [{
779
- selector: 'anatoly-subscribe-plan-button',
780
- 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"
781
- }] }
782
- ];
783
- /** @nocollapse */
784
490
  SubscribePlanButtonComponent.ctorParameters = function () { return [
785
491
  { type: AppContextService }
786
492
  ]; };
787
- SubscribePlanButtonComponent.propDecorators = {
788
- plan: [{ type: Input }],
789
- plantitle: [{ type: Input }]
790
- };
493
+ __decorate([
494
+ Input()
495
+ ], SubscribePlanButtonComponent.prototype, "plan", void 0);
496
+ __decorate([
497
+ Input()
498
+ ], SubscribePlanButtonComponent.prototype, "plantitle", void 0);
499
+ SubscribePlanButtonComponent = __decorate([
500
+ Component({
501
+ selector: 'anatoly-subscribe-plan-button',
502
+ 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"
503
+ })
504
+ ], SubscribePlanButtonComponent);
791
505
  return SubscribePlanButtonComponent;
792
- }());
793
- if (false) {
794
- /** @type {?} */
795
- SubscribePlanButtonComponent.prototype.contextUpdated;
796
- /** @type {?} */
797
- SubscribePlanButtonComponent.prototype.isUserSignedIn;
798
- /** @type {?} */
799
- SubscribePlanButtonComponent.prototype.currentPlan;
800
- /** @type {?} */
801
- SubscribePlanButtonComponent.prototype.currentPlanTitle;
802
- /** @type {?} */
803
- SubscribePlanButtonComponent.prototype.requestedPlan;
804
- /** @type {?} */
805
- SubscribePlanButtonComponent.prototype.requestedPlanTitle;
806
- /** @type {?} */
807
- SubscribePlanButtonComponent.prototype.plan;
808
- /** @type {?} */
809
- SubscribePlanButtonComponent.prototype.plantitle;
810
- /**
811
- * @type {?}
812
- * @private
813
- */
814
- SubscribePlanButtonComponent.prototype.appcontext;
815
- }
506
+ }());
816
507
 
817
- /**
818
- * @fileoverview added by tsickle
819
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
820
- */
821
- var BaseBillingApiService = /** @class */ (function (_super) {
822
- __extends(BaseBillingApiService, _super);
823
- function BaseBillingApiService(http) {
824
- var _this = _super.call(this, http) || this;
825
- _this.http = http;
826
- _this.baseUrl += 'billing/';
827
- return _this;
508
+ /*
509
+ <file>
510
+ Authors:
511
+ Vadim Osovitny
512
+
513
+ Created:
514
+ 12 Nov 2017
515
+
516
+ Version:
517
+ 1.0
518
+
519
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
520
+ </file>
521
+ */
522
+ var UpgradePlanButtonComponent = /** @class */ (function () {
523
+ function UpgradePlanButtonComponent(api) {
524
+ this.api = api;
525
+ }
526
+ UpgradePlanButtonComponent.prototype.onUpgradePlan = function () {
527
+ var text = "Current plan: " + this.currentplantitle + " New plan: " + this.requestedplantitle;
528
+ var that = this;
529
+ osovitny.ui.areYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', function () {
530
+ that.api.requestNewSubscription(that.requestedplan, function () {
531
+ osovitny.ui.alertSuccess('Your request for changing plan has been sent.', null, function () {
532
+ window.location.reload();
533
+ });
534
+ });
535
+ });
536
+ };
537
+ UpgradePlanButtonComponent.ctorParameters = function () { return [
538
+ { type: BaseBillingApiService }
539
+ ]; };
540
+ __decorate([
541
+ Input()
542
+ ], UpgradePlanButtonComponent.prototype, "currentplantitle", void 0);
543
+ __decorate([
544
+ Input()
545
+ ], UpgradePlanButtonComponent.prototype, "requestedplan", void 0);
546
+ __decorate([
547
+ Input()
548
+ ], UpgradePlanButtonComponent.prototype, "requestedplantitle", void 0);
549
+ UpgradePlanButtonComponent = __decorate([
550
+ Component({
551
+ selector: 'anatoly-upgrade-plan-button',
552
+ template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
553
+ })
554
+ ], UpgradePlanButtonComponent);
555
+ return UpgradePlanButtonComponent;
556
+ }());
557
+
558
+ /*
559
+ <file>
560
+ Authors:
561
+ Vadim Osovitny
562
+
563
+ Created:
564
+ 4 Jul 2018
565
+
566
+ Version:
567
+ 1.0
568
+
569
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
570
+ </file>
571
+ */
572
+ var SignInButtonComponent = /** @class */ (function () {
573
+ function SignInButtonComponent() {
574
+ }
575
+ __decorate([
576
+ Input()
577
+ ], SignInButtonComponent.prototype, "classbtn", void 0);
578
+ SignInButtonComponent = __decorate([
579
+ Component({
580
+ selector: 'anatoly-signin-button',
581
+ template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
582
+ })
583
+ ], SignInButtonComponent);
584
+ return SignInButtonComponent;
585
+ }());
586
+
587
+ /*
588
+ <file>
589
+ Authors:
590
+ Vadim Osovitny
591
+
592
+ Created:
593
+ 4 Jul 2018
594
+
595
+ Version:
596
+ 1.0
597
+
598
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
599
+ </file>
600
+ */
601
+ var SignOutButtonComponent = /** @class */ (function () {
602
+ function SignOutButtonComponent() {
603
+ }
604
+ __decorate([
605
+ Input()
606
+ ], SignOutButtonComponent.prototype, "classbtn", void 0);
607
+ SignOutButtonComponent = __decorate([
608
+ Component({
609
+ selector: 'anatoly-signout-button',
610
+ template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
611
+ })
612
+ ], SignOutButtonComponent);
613
+ return SignOutButtonComponent;
614
+ }());
615
+
616
+ /*
617
+ <file>
618
+ Authors:
619
+ Vadim Osovitny
620
+
621
+ Created:
622
+ 4 Jul 2018
623
+
624
+ Version:
625
+ 1.0
626
+
627
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
628
+ </file>
629
+ */
630
+ var SignUpButtonComponent = /** @class */ (function () {
631
+ function SignUpButtonComponent() {
828
632
  }
829
- /**
830
- * @param {?} requestedPlan
831
- * @param {?=} success
832
- * @param {?=} error
833
- * @return {?}
834
- */
835
- BaseBillingApiService.prototype.requestNewSubscription = /**
836
- * @param {?} requestedPlan
837
- * @param {?=} success
838
- * @param {?=} error
839
- * @return {?}
840
- */
841
- function (requestedPlan, success, error) {
842
- this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
843
- .subscribe((/**
844
- * @param {?} data
845
- * @return {?}
846
- */
847
- function (data) { }), (/**
848
- * @param {?} e
849
- * @return {?}
850
- */
851
- function (e) { if (error)
852
- error(); }), (/**
853
- * @return {?}
854
- */
855
- function () { if (success)
856
- success(); }));
857
- };
858
- /**
859
- * @param {?=} success
860
- * @param {?=} error
861
- * @return {?}
862
- */
863
- BaseBillingApiService.prototype.cancelRequestedSubscription = /**
864
- * @param {?=} success
865
- * @param {?=} error
866
- * @return {?}
867
- */
868
- function (success, error) {
869
- this.postQS('cancelRequestedSubscription', null)
870
- .subscribe((/**
871
- * @param {?} data
872
- * @return {?}
873
- */
874
- function (data) { }), (/**
875
- * @param {?} e
876
- * @return {?}
877
- */
878
- function (e) { if (error)
879
- error(); }), (/**
880
- * @return {?}
881
- */
882
- function () { if (success)
883
- success(); }));
884
- };
885
- /**
886
- * @param {?} requestedPlan
887
- * @param {?=} success
888
- * @param {?=} error
889
- * @return {?}
890
- */
891
- BaseBillingApiService.prototype.buyAccess = /**
892
- * @param {?} requestedPlan
893
- * @param {?=} success
894
- * @param {?=} error
895
- * @return {?}
896
- */
897
- function (requestedPlan, success, error) {
898
- this.postQS('buyAccess', { requestedPlan: requestedPlan })
899
- .subscribe((/**
900
- * @param {?} data
901
- * @return {?}
902
- */
903
- function (data) { }), (/**
904
- * @param {?} e
905
- * @return {?}
906
- */
907
- function (e) { if (error)
908
- error(); }), (/**
909
- * @return {?}
910
- */
911
- function () { if (success)
912
- success(); }));
913
- };
914
- BaseBillingApiService.decorators = [
915
- { type: Injectable }
916
- ];
917
- /** @nocollapse */
918
- BaseBillingApiService.ctorParameters = function () { return [
919
- { type: HttpClient }
920
- ]; };
921
- return BaseBillingApiService;
922
- }(BaseApiService));
923
- if (false) {
924
- /**
925
- * @type {?}
926
- * @protected
927
- */
928
- BaseBillingApiService.prototype.http;
929
- }
633
+ __decorate([
634
+ Input()
635
+ ], SignUpButtonComponent.prototype, "classbtn", void 0);
636
+ SignUpButtonComponent = __decorate([
637
+ Component({
638
+ selector: 'anatoly-signup-button',
639
+ template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n"
640
+ })
641
+ ], SignUpButtonComponent);
642
+ return SignUpButtonComponent;
643
+ }());
930
644
 
931
- /**
932
- * @fileoverview added by tsickle
933
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
934
- */
935
- var UpgradePlanButtonComponent = /** @class */ (function () {
936
- function UpgradePlanButtonComponent(api) {
937
- this.api = api;
645
+ /*
646
+ <file>
647
+ Authors:
648
+ Vadim Osovitny
649
+
650
+ Created:
651
+ 4 Jul 2018
652
+
653
+ Version:
654
+ 1.0
655
+
656
+ Copyright (c) 2018 Osovitny Inc. All rights reserved.
657
+ </file>
658
+ */
659
+ var AnatolyIdentityModule = /** @class */ (function () {
660
+ function AnatolyIdentityModule() {
938
661
  }
939
- /**
940
- * @return {?}
941
- */
942
- UpgradePlanButtonComponent.prototype.onUpgradePlan = /**
943
- * @return {?}
944
- */
945
- function () {
946
- /** @type {?} */
947
- var text = "Current plan: " + this.currentplantitle + " New plan: " + this.requestedplantitle;
948
- /** @type {?} */
949
- var that = this;
950
- osovitny.ui.areYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', (/**
951
- * @return {?}
952
- */
953
- function () {
954
- that.api.requestNewSubscription(that.requestedplan, (/**
955
- * @return {?}
956
- */
957
- function () {
958
- osovitny.ui.alertSuccess('Your request for changing plan has been sent.', null, (/**
959
- * @return {?}
960
- */
961
- function () {
962
- ((/** @type {?} */ (window))).location.reload();
963
- }));
964
- }));
965
- }));
966
- };
967
- UpgradePlanButtonComponent.decorators = [
968
- { type: Component, args: [{
969
- selector: 'anatoly-upgrade-plan-button',
970
- template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
971
- }] }
972
- ];
973
- /** @nocollapse */
974
- UpgradePlanButtonComponent.ctorParameters = function () { return [
975
- { type: BaseBillingApiService }
976
- ]; };
977
- UpgradePlanButtonComponent.propDecorators = {
978
- currentplantitle: [{ type: Input }],
979
- requestedplan: [{ type: Input }],
980
- requestedplantitle: [{ type: Input }]
981
- };
982
- return UpgradePlanButtonComponent;
983
- }());
984
- if (false) {
985
- /** @type {?} */
986
- UpgradePlanButtonComponent.prototype.currentplantitle;
987
- /** @type {?} */
988
- UpgradePlanButtonComponent.prototype.requestedplan;
989
- /** @type {?} */
990
- UpgradePlanButtonComponent.prototype.requestedplantitle;
991
- /**
992
- * @type {?}
993
- * @private
994
- */
995
- UpgradePlanButtonComponent.prototype.api;
996
- }
662
+ AnatolyIdentityModule = __decorate([
663
+ NgModule({
664
+ imports: [],
665
+ exports: [
666
+ SignInButtonComponent,
667
+ SignUpButtonComponent,
668
+ SignOutButtonComponent
669
+ ],
670
+ declarations: [
671
+ SignInButtonComponent,
672
+ SignUpButtonComponent,
673
+ SignOutButtonComponent
674
+ ],
675
+ providers: []
676
+ })
677
+ ], AnatolyIdentityModule);
678
+ return AnatolyIdentityModule;
679
+ }());
997
680
 
998
- /**
999
- * @fileoverview added by tsickle
1000
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1001
- */
1002
- var BuyAccessButtonComponent = /** @class */ (function () {
1003
- function BuyAccessButtonComponent(appcontext, api) {
1004
- this.appcontext = appcontext;
1005
- this.api = api;
1006
- this.contextUpdated = false;
1007
- this.isUserSignedIn = false;
1008
- this.currentPlan = 0;
1009
- this.currentPlanTitle = "";
1010
- }
1011
- /**
1012
- * @return {?}
1013
- */
1014
- BuyAccessButtonComponent.prototype.ngOnInit = /**
1015
- * @return {?}
1016
- */
1017
- function () {
1018
- var _this = this;
1019
- if (!this.appcontext.isUserSignedIn()) {
1020
- this.contextUpdated = true;
1021
- return;
1022
- }
1023
- this.appcontext.getCurrent((/**
1024
- * @param {?} current
1025
- * @return {?}
1026
- */
1027
- function (current) {
1028
- _this.isUserSignedIn = current.isUserSignedIn;
1029
- if (_this.isUserSignedIn) {
1030
- _this.currentPlan = current.account.billingPlan;
1031
- _this.currentPlanTitle = current.account.billingPlanAsString;
1032
- }
1033
- _this.contextUpdated = true;
1034
- }));
1035
- };
1036
- /**
1037
- * @return {?}
1038
- */
1039
- BuyAccessButtonComponent.prototype.onBuyPlan = /**
1040
- * @return {?}
1041
- */
1042
- function () {
1043
- /** @type {?} */
1044
- var text = "Requested plan: " + this.plantitle + " ";
1045
- /** @type {?} */
1046
- var that = this;
1047
- osovitny.ui.areYouSure(text, 'Buying access', 'Confirm change', 'Cancel', (/**
1048
- * @return {?}
1049
- */
1050
- function () {
1051
- that.api.buyAccess(that.plan, (/**
1052
- * @return {?}
1053
- */
1054
- function () {
1055
- osovitny.ui.alertSuccess('Access Granted', null, (/**
1056
- * @return {?}
1057
- */
1058
- function () {
1059
- ((/** @type {?} */ (window))).location.reload();
1060
- }));
1061
- }));
1062
- }));
1063
- };
1064
- BuyAccessButtonComponent.decorators = [
1065
- { type: Component, args: [{
1066
- selector: 'anatoly-buyaccess-button',
1067
- 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"
1068
- }] }
1069
- ];
1070
- /** @nocollapse */
1071
- BuyAccessButtonComponent.ctorParameters = function () { return [
1072
- { type: AppContextService },
1073
- { type: BaseBillingApiService }
1074
- ]; };
1075
- BuyAccessButtonComponent.propDecorators = {
1076
- plan: [{ type: Input }],
1077
- plantitle: [{ type: Input }]
1078
- };
1079
- return BuyAccessButtonComponent;
1080
- }());
1081
- if (false) {
1082
- /** @type {?} */
1083
- BuyAccessButtonComponent.prototype.contextUpdated;
1084
- /** @type {?} */
1085
- BuyAccessButtonComponent.prototype.isUserSignedIn;
1086
- /** @type {?} */
1087
- BuyAccessButtonComponent.prototype.currentPlan;
1088
- /** @type {?} */
1089
- BuyAccessButtonComponent.prototype.currentPlanTitle;
1090
- /** @type {?} */
1091
- BuyAccessButtonComponent.prototype.plan;
1092
- /** @type {?} */
1093
- BuyAccessButtonComponent.prototype.plantitle;
1094
- /**
1095
- * @type {?}
1096
- * @private
1097
- */
1098
- BuyAccessButtonComponent.prototype.appcontext;
1099
- /**
1100
- * @type {?}
1101
- * @private
1102
- */
1103
- BuyAccessButtonComponent.prototype.api;
1104
- }
681
+ // Components
1105
682
 
1106
- /**
1107
- * @fileoverview added by tsickle
1108
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1109
- */
683
+ /*
684
+ <file>
685
+ Authors:
686
+ Vadim Osovitny
687
+
688
+ Created:
689
+ 10 Nov 2017
690
+
691
+ Version:
692
+ 1.0
693
+
694
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
695
+ </file>
696
+ */
1110
697
  var AnatolyBillingModule = /** @class */ (function () {
1111
698
  function AnatolyBillingModule() {
1112
699
  }
1113
- AnatolyBillingModule.decorators = [
1114
- { type: NgModule, args: [{
1115
- imports: [
1116
- CommonModule,
1117
- HttpClientModule,
1118
- HttpClientXsrfModule,
1119
- HttpClientJsonpModule,
1120
- AnatolyIdentityModule
1121
- ],
1122
- exports: [
1123
- CommonModule,
1124
- HttpClientModule,
1125
- HttpClientXsrfModule,
1126
- HttpClientJsonpModule,
1127
- SubscribePlanButtonComponent,
1128
- UpgradePlanButtonComponent,
1129
- BuyAccessButtonComponent
1130
- ],
1131
- declarations: [
1132
- SubscribePlanButtonComponent,
1133
- UpgradePlanButtonComponent,
1134
- BuyAccessButtonComponent
1135
- ],
1136
- providers: [
1137
- BaseBillingApiService
1138
- ]
1139
- },] }
1140
- ];
700
+ AnatolyBillingModule = __decorate([
701
+ NgModule({
702
+ imports: [
703
+ CommonModule,
704
+ HttpClientModule,
705
+ HttpClientXsrfModule,
706
+ HttpClientJsonpModule,
707
+ AnatolyIdentityModule
708
+ ],
709
+ exports: [
710
+ CommonModule,
711
+ HttpClientModule,
712
+ HttpClientXsrfModule,
713
+ HttpClientJsonpModule,
714
+ SubscribePlanButtonComponent,
715
+ UpgradePlanButtonComponent,
716
+ BuyAccessButtonComponent
717
+ ],
718
+ declarations: [
719
+ SubscribePlanButtonComponent,
720
+ UpgradePlanButtonComponent,
721
+ BuyAccessButtonComponent
722
+ ],
723
+ providers: [
724
+ BaseBillingApiService
725
+ ]
726
+ })
727
+ ], AnatolyBillingModule);
1141
728
  return AnatolyBillingModule;
1142
729
  }());
1143
730
 
1144
- /**
1145
- * @fileoverview added by tsickle
1146
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1147
- */
731
+ // Components
1148
732
 
1149
- /**
1150
- * @fileoverview added by tsickle
1151
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1152
- */
1153
733
  /*
1154
734
  <file>
1155
735
  Authors:
@@ -1167,60 +747,41 @@ var AnatolyBillingModule = /** @class */ (function () {
1167
747
  var BaseComponent = /** @class */ (function () {
1168
748
  function BaseComponent() {
1169
749
  }
1170
- /**
1171
- * @return {?}
1172
- */
1173
- BaseComponent.prototype.getQSId = /**
1174
- * @return {?}
1175
- */
1176
- function () {
1177
- /** @type {?} */
750
+ BaseComponent.prototype.getQSId = function () {
1178
751
  var id = osovitny.utils.getValueByNameInQS("id");
1179
752
  if (typeof id === 'undefined' || id == '')
1180
753
  return null;
1181
754
  return id;
1182
755
  };
1183
- /**
1184
- * @return {?}
1185
- */
1186
- BaseComponent.prototype.showLoading = /**
1187
- * @return {?}
1188
- */
1189
- function () {
1190
- /** @type {?} */
756
+ BaseComponent.prototype.showLoading = function () {
1191
757
  var panelLoading = $('#pnlLoading');
1192
758
  panelLoading.show();
1193
759
  };
1194
- /**
1195
- * @return {?}
1196
- */
1197
- BaseComponent.prototype.hideLoading = /**
1198
- * @return {?}
1199
- */
1200
- function () {
1201
- /** @type {?} */
760
+ BaseComponent.prototype.hideLoading = function () {
1202
761
  var panelLoading = $('#pnlLoading');
1203
762
  panelLoading.hide();
1204
763
  };
1205
- /**
1206
- * @param {?} e
1207
- * @return {?}
1208
- */
1209
- BaseComponent.prototype.handleError = /**
1210
- * @param {?} e
1211
- * @return {?}
1212
- */
1213
- function (e) {
764
+ BaseComponent.prototype.handleError = function (e) {
1214
765
  this.hideLoading();
1215
766
  osovitny.ui.errorOccurred();
1216
767
  };
1217
768
  return BaseComponent;
1218
769
  }());
1219
770
 
1220
- /**
1221
- * @fileoverview added by tsickle
1222
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1223
- */
771
+ /*
772
+ <file>
773
+ Authors:
774
+ Vadim Osovitny
775
+
776
+ Created:
777
+ 20 Nov 2017
778
+
779
+ Version:
780
+ 1.0
781
+
782
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
783
+ </file>
784
+ */
1224
785
  var BaseEditComponent = /** @class */ (function (_super) {
1225
786
  __extends(BaseEditComponent, _super);
1226
787
  function BaseEditComponent() {
@@ -1228,37 +789,16 @@ var BaseEditComponent = /** @class */ (function (_super) {
1228
789
  _this.formSubmitted = false;
1229
790
  return _this;
1230
791
  }
1231
- /**
1232
- * @return {?}
1233
- */
1234
- BaseEditComponent.prototype.isActionAdding = /**
1235
- * @return {?}
1236
- */
1237
- function () {
1238
- /** @type {?} */
792
+ BaseEditComponent.prototype.isActionAdding = function () {
1239
793
  var id = osovitny.utils.getValueByNameInQS("id");
1240
794
  if (typeof id === 'undefined' || id == '')
1241
795
  return true;
1242
796
  return false;
1243
797
  };
1244
- /**
1245
- * @return {?}
1246
- */
1247
- BaseEditComponent.prototype.getEntityId = /**
1248
- * @return {?}
1249
- */
1250
- function () {
798
+ BaseEditComponent.prototype.getEntityId = function () {
1251
799
  return this.getQSId();
1252
800
  };
1253
- /**
1254
- * @param {?} name
1255
- * @return {?}
1256
- */
1257
- BaseEditComponent.prototype.isItemInvalid = /**
1258
- * @param {?} name
1259
- * @return {?}
1260
- */
1261
- function (name) {
801
+ BaseEditComponent.prototype.isItemInvalid = function (name) {
1262
802
  if (typeof name === 'undefined' || name == '') {
1263
803
  return false;
1264
804
  }
@@ -1268,136 +808,99 @@ var BaseEditComponent = /** @class */ (function (_super) {
1268
808
  }
1269
809
  return false;
1270
810
  };
1271
- /**
1272
- * @param {?} name
1273
- * @return {?}
1274
- */
1275
- BaseEditComponent.prototype.getFormValue = /**
1276
- * @param {?} name
1277
- * @return {?}
1278
- */
1279
- function (name) {
811
+ BaseEditComponent.prototype.getFormValue = function (name) {
1280
812
  return this.formGroup.controls[name].value;
1281
813
  };
1282
- /**
1283
- * @param {?} name
1284
- * @param {?} value
1285
- * @return {?}
1286
- */
1287
- BaseEditComponent.prototype.setFormValue = /**
1288
- * @param {?} name
1289
- * @param {?} value
1290
- * @return {?}
1291
- */
1292
- function (name, value) {
814
+ BaseEditComponent.prototype.setFormValue = function (name, value) {
1293
815
  this.formGroup.controls[name].setValue(value);
1294
816
  };
1295
- /**
1296
- * @param {?} groupName
1297
- * @param {?} name
1298
- * @return {?}
1299
- */
1300
- BaseEditComponent.prototype.getFormGroupValue = /**
1301
- * @param {?} groupName
1302
- * @param {?} name
1303
- * @return {?}
1304
- */
1305
- function (groupName, name) {
817
+ BaseEditComponent.prototype.getFormGroupValue = function (groupName, name) {
1306
818
  return this.formGroup.controls[groupName].get(name).value;
1307
819
  };
1308
- /**
1309
- * @param {?} groupName
1310
- * @param {?} name
1311
- * @param {?} value
1312
- * @return {?}
1313
- */
1314
- BaseEditComponent.prototype.setFormGroupValue = /**
1315
- * @param {?} groupName
1316
- * @param {?} name
1317
- * @param {?} value
1318
- * @return {?}
1319
- */
1320
- function (groupName, name, value) {
820
+ BaseEditComponent.prototype.setFormGroupValue = function (groupName, name, value) {
1321
821
  this.formGroup.controls[groupName].get(name).setValue(value);
1322
822
  };
1323
- BaseEditComponent.propDecorators = {
1324
- formGroup: [{ type: Input }],
1325
- formSubmitted: [{ type: Input }]
1326
- };
823
+ __decorate([
824
+ Input()
825
+ ], BaseEditComponent.prototype, "formGroup", void 0);
826
+ __decorate([
827
+ Input()
828
+ ], BaseEditComponent.prototype, "formSubmitted", void 0);
1327
829
  return BaseEditComponent;
1328
- }(BaseComponent));
1329
- if (false) {
1330
- /** @type {?} */
1331
- BaseEditComponent.prototype.formGroup;
1332
- /** @type {?} */
1333
- BaseEditComponent.prototype.formSubmitted;
1334
- }
830
+ }(BaseComponent));
1335
831
 
1336
- /**
1337
- * @fileoverview added by tsickle
1338
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1339
- */
832
+ /*
833
+ <file>
834
+ Authors:
835
+ Anatoly Osovitny
836
+
837
+ Created:
838
+ 23 Apr 2018
839
+
840
+ Version:
841
+ 1.0
842
+
843
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
844
+ </file>
845
+ */
846
+ var ContentHeaderComponent = /** @class */ (function () {
847
+ function ContentHeaderComponent() {
848
+ }
849
+ ContentHeaderComponent.prototype.ngOnInit = function () {
850
+ if (this.title == null) {
851
+ this.title = '';
852
+ }
853
+ };
854
+ __decorate([
855
+ Input()
856
+ ], ContentHeaderComponent.prototype, "title", void 0);
857
+ ContentHeaderComponent = __decorate([
858
+ Component({
859
+ selector: 'anatoly-content-header',
860
+ template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
861
+ })
862
+ ], ContentHeaderComponent);
863
+ return ContentHeaderComponent;
864
+ }());
865
+
866
+ /*
867
+ <file>
868
+ Authors:
869
+ Vadim Osovitny
870
+
871
+ Created:
872
+ 8 Dec 2017
873
+
874
+ Version:
875
+ 1.0
876
+
877
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
878
+ </file>
879
+ */
1340
880
  var ValidationSummaryComponent = /** @class */ (function (_super) {
1341
881
  __extends(ValidationSummaryComponent, _super);
1342
882
  function ValidationSummaryComponent() {
1343
883
  return _super.call(this) || this;
1344
884
  }
1345
- /**
1346
- * @return {?}
1347
- */
1348
- ValidationSummaryComponent.prototype.getFormValidationMessages = /**
1349
- * @return {?}
1350
- */
1351
- function () {
885
+ ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
1352
886
  var _this = this;
1353
- /** @type {?} */
1354
887
  var messages = [];
1355
- Object.keys(this.formGroup.controls).forEach((/**
1356
- * @param {?} k
1357
- * @return {?}
1358
- */
1359
- function (k) {
1360
- /** @type {?} */
888
+ Object.keys(this.formGroup.controls).forEach(function (k) {
1361
889
  var control = _this.formGroup.controls[k];
1362
- if (((/** @type {?} */ (control))).controls != null) {
1363
- Object.keys(((/** @type {?} */ (control))).controls).forEach((/**
1364
- * @param {?} k
1365
- * @return {?}
1366
- */
1367
- function (k) {
1368
- /** @type {?} */
1369
- var child = ((/** @type {?} */ (control))).controls[k];
1370
- _this.getValidationMessages(child, k).forEach((/**
1371
- * @param {?} m
1372
- * @return {?}
1373
- */
1374
- function (m) { return messages.push(m); }));
1375
- }));
890
+ if (control.controls != null) {
891
+ Object.keys(control.controls).forEach(function (k) {
892
+ var child = control.controls[k];
893
+ _this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
894
+ });
1376
895
  }
1377
896
  else {
1378
- _this.getValidationMessages(control, k).forEach((/**
1379
- * @param {?} m
1380
- * @return {?}
1381
- */
1382
- function (m) { return messages.push(m); }));
897
+ _this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
1383
898
  }
1384
- }));
899
+ });
1385
900
  return messages;
1386
901
  };
1387
- /**
1388
- * @param {?} state
1389
- * @param {?=} thingName
1390
- * @return {?}
1391
- */
1392
- ValidationSummaryComponent.prototype.getValidationMessages = /**
1393
- * @param {?} state
1394
- * @param {?=} thingName
1395
- * @return {?}
1396
- */
1397
- function (state, thingName) {
1398
- /** @type {?} */
902
+ ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
1399
903
  var thing = state.path || thingName;
1400
- /** @type {?} */
1401
904
  var messages = [];
1402
905
  if (state.errors) {
1403
906
  for (var errorName in state.errors) {
@@ -1421,10 +924,20 @@ var ValidationSummaryComponent = /** @class */ (function (_super) {
1421
924
  return ValidationSummaryComponent;
1422
925
  }(BaseEditComponent));
1423
926
 
1424
- /**
1425
- * @fileoverview added by tsickle
1426
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1427
- */
927
+ /*
928
+ <file>
929
+ Authors:
930
+ Vadim Osovitny
931
+
932
+ Created:
933
+ 7 Dec 2017
934
+
935
+ Version:
936
+ 1.0
937
+
938
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
939
+ </file>
940
+ */
1428
941
  var FormValidationSummaryComponent = /** @class */ (function (_super) {
1429
942
  __extends(FormValidationSummaryComponent, _super);
1430
943
  function FormValidationSummaryComponent() {
@@ -1432,106 +945,121 @@ var FormValidationSummaryComponent = /** @class */ (function (_super) {
1432
945
  _this.visible = false;
1433
946
  return _this;
1434
947
  }
1435
- /**
1436
- * @return {?}
1437
- */
1438
- FormValidationSummaryComponent.prototype.getErrors = /**
1439
- * @return {?}
1440
- */
1441
- function () {
1442
- /** @type {?} */
948
+ FormValidationSummaryComponent.prototype.getErrors = function () {
1443
949
  var messages = this.getFormValidationMessages();
1444
950
  return messages;
1445
951
  };
1446
- FormValidationSummaryComponent.decorators = [
1447
- { type: Component, args: [{
1448
- selector: 'anatoly-form-validation-summary',
1449
- template: "<div class=\"callout callout-danger\" *ngIf=\"visible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\"><span class=\"help-block \" style=\"color:white\">{{error}}</span></p>\r\n</div>\r\n"
1450
- }] }
1451
- ];
1452
- /** @nocollapse */
1453
- FormValidationSummaryComponent.ctorParameters = function () { return []; };
1454
- FormValidationSummaryComponent.propDecorators = {
1455
- visible: [{ type: Input }]
1456
- };
952
+ __decorate([
953
+ Input()
954
+ ], FormValidationSummaryComponent.prototype, "visible", void 0);
955
+ FormValidationSummaryComponent = __decorate([
956
+ Component({
957
+ selector: 'anatoly-form-validation-summary',
958
+ template: "<div class=\"callout callout-danger\" *ngIf=\"visible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\"><span class=\"help-block \" style=\"color:white\">{{error}}</span></p>\r\n</div>\r\n"
959
+ })
960
+ ], FormValidationSummaryComponent);
1457
961
  return FormValidationSummaryComponent;
1458
- }(ValidationSummaryComponent));
1459
- if (false) {
1460
- /** @type {?} */
1461
- FormValidationSummaryComponent.prototype.visible;
1462
- }
962
+ }(ValidationSummaryComponent));
1463
963
 
1464
- /**
1465
- * @fileoverview added by tsickle
1466
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1467
- */
964
+ /*
965
+ <file>
966
+ Authors:
967
+ Vadim Osovitny
968
+
969
+ Created:
970
+ 6 Dec 2017
971
+
972
+ Version:
973
+ 1.0
974
+
975
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
976
+ </file>
977
+ */
1468
978
  var ItemValidationSummaryComponent = /** @class */ (function (_super) {
1469
979
  __extends(ItemValidationSummaryComponent, _super);
1470
980
  function ItemValidationSummaryComponent() {
1471
981
  return _super.call(this) || this;
1472
982
  }
1473
- ItemValidationSummaryComponent.decorators = [
1474
- { type: Component, args: [{
1475
- selector: 'anatoly-item-validation-summary',
1476
- template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(key)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(key), title)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>"
1477
- }] }
1478
- ];
1479
- /** @nocollapse */
1480
- ItemValidationSummaryComponent.ctorParameters = function () { return []; };
1481
- ItemValidationSummaryComponent.propDecorators = {
1482
- key: [{ type: Input }],
1483
- title: [{ type: Input }]
1484
- };
983
+ __decorate([
984
+ Input()
985
+ ], ItemValidationSummaryComponent.prototype, "key", void 0);
986
+ __decorate([
987
+ Input()
988
+ ], ItemValidationSummaryComponent.prototype, "title", void 0);
989
+ ItemValidationSummaryComponent = __decorate([
990
+ Component({
991
+ selector: 'anatoly-item-validation-summary',
992
+ template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(key)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(key), title)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>"
993
+ })
994
+ ], ItemValidationSummaryComponent);
1485
995
  return ItemValidationSummaryComponent;
1486
- }(ValidationSummaryComponent));
1487
- if (false) {
1488
- /** @type {?} */
1489
- ItemValidationSummaryComponent.prototype.key;
1490
- /** @type {?} */
1491
- ItemValidationSummaryComponent.prototype.title;
1492
- }
996
+ }(ValidationSummaryComponent));
1493
997
 
1494
- /**
1495
- * @fileoverview added by tsickle
1496
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1497
- */
998
+ var ɵ0 = function (images) {
999
+ //let editor = this;
1000
+ //alert("image.beforeUpload uploadType: " + editor.opts.imageUploadParams.uploadType + "_" + editor.opts.imageUploadParams.uploadParentId)
1001
+ }, ɵ1 = function () {
1002
+ }, ɵ2 = function () {
1003
+ var editor = this;
1004
+ //alert('contentChanged');
1005
+ };
1006
+ var DefaultEditorOptions = {
1007
+ placeholderText: 'Edit Your Content Here',
1008
+ charCounterCount: true,
1009
+ heightMin: 100,
1010
+ toolbarInline: false,
1011
+ toolbarButtons: {
1012
+ 'moreText': {
1013
+ 'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript',
1014
+ 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle']
1015
+ },
1016
+ 'moreParagraph': {
1017
+ 'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify',
1018
+ 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
1019
+ },
1020
+ 'moreRich': {
1021
+ 'buttons': ['insertLink', 'insertImage', 'insertTable', 'emoticons', 'fontAwesome',
1022
+ 'specialCharacters', 'embedly']
1023
+ },
1024
+ 'moreMisc': {
1025
+ 'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
1026
+ 'align': 'right',
1027
+ }
1028
+ },
1029
+ /*
1030
+ Upload:
1031
+ https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
1032
+ */
1033
+ imageUploadURL: '/api/HtmlEditor/UploadImage',
1034
+ imageAllowedTypes: ['jpeg', 'jpg', 'png'],
1035
+ imageUploadParams: { uploadType: '', uploadParentId: '' },
1036
+ //Events
1037
+ events: {
1038
+ 'image.beforeUpload': ɵ0,
1039
+ 'initialized': ɵ1,
1040
+ 'contentChanged': ɵ2
1041
+ }
1042
+ };
1043
+
1044
+ /*
1045
+ <file>
1046
+ Authors:
1047
+ Anatoly Osovitny
1048
+ Vadim Osovitny
1049
+
1050
+ Created:
1051
+ 12 Dec 2017
1052
+
1053
+ Version:
1054
+ 1.0
1055
+
1056
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1057
+ </file>
1058
+ */
1498
1059
  var HtmlEditorComponent = /** @class */ (function (_super) {
1499
1060
  __extends(HtmlEditorComponent, _super);
1500
1061
  function HtmlEditorComponent() {
1501
1062
  var _this = _super !== null && _super.apply(this, arguments) || this;
1502
- _this._defaultEditorOptions = {
1503
- placeholderText: 'Edit Your Content Here',
1504
- charCounterCount: true,
1505
- heightMin: 100,
1506
- toolbarInline: false,
1507
- toolbarButtons: [
1508
- 'fullscreen', 'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', '|',
1509
- 'fontFamily', 'fontSize', 'color', 'inlineStyle', 'paragraphStyle', '|',
1510
- 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', '-',
1511
- 'insertLink', 'insertImage', 'insertTable', '|',
1512
- 'emoticons', 'specialCharacters', 'insertHR', 'selectAll', 'clearFormatting', '|',
1513
- 'print', 'help', 'html', '|', 'undo', 'redo'
1514
- ],
1515
- /*
1516
- Upload:
1517
- https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
1518
- */
1519
- imageUploadURL: '/api/HtmlEditor/UploadImage',
1520
- imageAllowedTypes: ['jpeg', 'jpg', 'png'],
1521
- imageUploadParams: { uploadType: '', uploadParentId: '' },
1522
- //Events
1523
- events: {
1524
- 'image.beforeUpload': (/**
1525
- * @param {?} images
1526
- * @return {?}
1527
- */
1528
- function (images) {
1529
- /** @type {?} */
1530
- var editor = this;
1531
- alert("v3 image.beforeUpload editor.opts.imageUploadParams.uploadType" + editor.opts.imageUploadParams.uploadType);
1532
- })
1533
- }
1534
- };
1535
1063
  _this._editorInitialized = false;
1536
1064
  //General params
1537
1065
  _this.editorId = '';
@@ -1542,336 +1070,157 @@ var HtmlEditorComponent = /** @class */ (function (_super) {
1542
1070
  _this.editorFormKey = 'html';
1543
1071
  return _this;
1544
1072
  }
1545
- /**
1546
- * @return {?}
1547
- */
1548
- HtmlEditorComponent.prototype.ngOnInit = /**
1549
- * @return {?}
1550
- */
1551
- function () {
1552
- /** @type {?} */
1073
+ HtmlEditorComponent.prototype.ngOnInit = function () {
1553
1074
  var opt = this.editorOptions;
1554
1075
  if (typeof this.editorOptions == "string") {
1555
1076
  opt = JSON.parse(this.editorOptions);
1556
1077
  }
1557
- /** @type {?} */
1558
- var newOptions = $.extend({}, this._defaultEditorOptions, opt);
1559
- /** @type {?} */
1560
- var key = ((/** @type {?} */ (window))).__froalaEditor_Key;
1078
+ var newOptions = $.extend({}, DefaultEditorOptions, opt);
1079
+ var key = window.__froalaEditor_Key;
1561
1080
  if (key) {
1562
1081
  newOptions = $.extend({}, JSON.parse('{ "key": "' + key + '" }'), newOptions);
1563
1082
  }
1564
1083
  this.options = newOptions;
1565
1084
  };
1566
- /**
1567
- * @return {?}
1568
- */
1569
- HtmlEditorComponent.prototype.ngAfterViewInit = /**
1570
- * @return {?}
1571
- */
1572
- function () {
1573
- this.initializeEditor();
1574
- };
1575
- /**
1576
- * @param {?} control
1577
- * @return {?}
1578
- */
1579
- HtmlEditorComponent.prototype.initializeControl = /**
1580
- * @param {?} control
1581
- * @return {?}
1582
- */
1583
- function (control) {
1584
- this._control = control;
1585
- };
1586
- /**
1587
- * @private
1588
- * @return {?}
1589
- */
1590
- HtmlEditorComponent.prototype.initializeEditor = /**
1591
- * @private
1592
- * @return {?}
1593
- */
1594
- function () {
1085
+ HtmlEditorComponent.prototype.doAfterEditorInitialized = function (action) {
1086
+ var that = this;
1087
+ var timeOut = 500;
1595
1088
  if (this._editorInitialized) {
1596
- return;
1597
- }
1598
- if (this._control) {
1599
- this._control.initialize();
1600
- //v2 BEGIN
1601
- /** @type {?} */
1602
- var jQueryEditor = this.getJQueryEditor();
1603
- /** @type {?} */
1604
- var that = this;
1605
- jQueryEditor.on('froalaEditor.image.beforeUpload', (/**
1606
- * @param {?} e
1607
- * @param {?} editor
1608
- * @param {?} images
1609
- * @return {?}
1610
- */
1611
- function (e, editor, images) {
1612
- /** @type {?} */
1613
- var options = that.options;
1614
- editor.opts.imageUploadParams.uploadType = options.imageUploadParams.uploadType;
1615
- editor.opts.imageUploadParams.uploadParentId = options.imageUploadParams.uploadParentId;
1616
- }));
1617
- //v2 END
1618
- this._editorInitialized = true;
1089
+ timeOut = 100;
1619
1090
  }
1091
+ setTimeout(function () { action(that); }, timeOut);
1620
1092
  };
1621
- /**
1622
- * @private
1623
- * @return {?}
1624
- */
1625
- HtmlEditorComponent.prototype.getJQueryEditor = /**
1626
- * @private
1627
- * @return {?}
1628
- */
1629
- function () {
1630
- /** @type {?} */
1631
- var jQueryEditor = $('.htmleditor-' + this.editorId);
1632
- return jQueryEditor;
1633
- };
1634
- /**
1635
- * @private
1636
- * @return {?}
1637
- */
1638
- HtmlEditorComponent.prototype.getEditor = /**
1639
- * @private
1640
- * @return {?}
1641
- */
1642
- function () {
1093
+ HtmlEditorComponent.prototype.getEditor = function () {
1643
1094
  if (this._control)
1644
1095
  return this._control.getEditor();
1645
1096
  return null;
1646
1097
  };
1647
1098
  //Public Funcs
1648
- //Public Funcs
1649
- /**
1650
- * @param {?} uploadType
1651
- * @param {?} uploadParentId
1652
- * @return {?}
1653
- */
1654
- HtmlEditorComponent.prototype.setUploadParams =
1655
- //Public Funcs
1656
- /**
1657
- * @param {?} uploadType
1658
- * @param {?} uploadParentId
1659
- * @return {?}
1660
- */
1661
- function (uploadType, uploadParentId) {
1662
- /** @type {?} */
1663
- var that = this;
1664
- /** @type {?} */
1665
- var timeOut = 1000;
1666
- if (this._editorInitialized) {
1667
- timeOut = 0;
1668
- }
1669
- setTimeout((/**
1670
- * @return {?}
1671
- */
1672
- function () {
1673
- /** @type {?} */
1674
- var newOptions = { imageUploadParams: { uploadType: '', uploadParentId: '' } };
1675
- newOptions.imageUploadParams.uploadType = uploadType;
1676
- newOptions.imageUploadParams.uploadParentId = uploadParentId;
1677
- that.options = $.extend({}, that.options, newOptions);
1678
- }), timeOut);
1099
+ HtmlEditorComponent.prototype.initializeControl = function (control) {
1100
+ this._control = control;
1101
+ this._control.initialize();
1102
+ this._editorInitialized = true;
1103
+ };
1104
+ HtmlEditorComponent.prototype.setUploadParams = function (uploadType, uploadParentId) {
1105
+ this.doAfterEditorInitialized(function (that) {
1106
+ var editor = that.getEditor();
1107
+ if (typeof (editor) == "undefined" || editor == null) {
1108
+ return;
1109
+ }
1110
+ editor.opts.imageUploadParams.uploadType = uploadType;
1111
+ editor.opts.imageUploadParams.uploadParentId = uploadParentId;
1112
+ });
1679
1113
  };
1680
- /**
1681
- * @param {?} content
1682
- * @return {?}
1683
- */
1684
- HtmlEditorComponent.prototype.setHtml = /**
1685
- * @param {?} content
1686
- * @return {?}
1687
- */
1688
- function (content) {
1114
+ HtmlEditorComponent.prototype.setHtml = function (content) {
1689
1115
  if (this.isFormBased == "1") {
1690
1116
  return;
1691
1117
  }
1692
- this.initializeEditor();
1693
- //v2
1694
- /** @type {?} */
1695
- var editor = this.getJQueryEditor();
1696
- if (typeof (editor) == "undefined" || editor == null) {
1697
- return;
1698
- }
1699
- editor.froalaEditor('html.set', content);
1700
- /*
1701
- //v3
1702
- var editor = this.getEditor();
1703
- if (typeof (editor) == "undefined" || editor == null) {
1704
- return;
1705
- }
1706
-
1707
- editor.html.set(content);
1708
- */
1118
+ this.doAfterEditorInitialized(function (that) {
1119
+ var editor = that.getEditor();
1120
+ if (typeof (editor) == "undefined" || editor == null) {
1121
+ return;
1122
+ }
1123
+ editor.html.set(content);
1124
+ });
1709
1125
  };
1710
- /**
1711
- * @return {?}
1712
- */
1713
- HtmlEditorComponent.prototype.getHtml = /**
1714
- * @return {?}
1715
- */
1716
- function () {
1126
+ HtmlEditorComponent.prototype.getHtml = function () {
1717
1127
  if (this.isFormBased == "1") {
1718
- return;
1719
- }
1720
- //v2
1721
- /** @type {?} */
1722
- var editor = this.getJQueryEditor();
1723
- if (typeof (editor) == "undefined" || editor == null) {
1724
- return "";
1128
+ return null;
1725
1129
  }
1726
- return editor.froalaEditor('html.get');
1727
- /*
1728
- //v3
1729
1130
  var editor = this.getEditor();
1730
1131
  if (typeof (editor) == "undefined" || editor == null) {
1731
- return "";
1132
+ return;
1732
1133
  }
1733
-
1734
1134
  return editor.html.get(false);
1735
- */
1736
- };
1737
- HtmlEditorComponent.decorators = [
1738
- { type: Component, args: [{
1739
- selector: 'anatoly-html-editor',
1740
- template: "<div [ngSwitch]=\"isFormBased\">\r\n <ng-template ngSwitchCase=\"0\">\r\n <label>{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\" \r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"1\">\r\n <div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\"\r\n [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n [formSubmitted]=\"formSubmitted\"\r\n [key]=\"editorFormKey\"\r\n [title]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n"
1741
- }] }
1742
- ];
1743
- HtmlEditorComponent.propDecorators = {
1744
- editorId: [{ type: Input }],
1745
- editorLabelText: [{ type: Input }],
1746
- editorOptions: [{ type: Input }],
1747
- isFormBased: [{ type: Input }],
1748
- editorFormKey: [{ type: Input }]
1749
1135
  };
1136
+ __decorate([
1137
+ Input()
1138
+ ], HtmlEditorComponent.prototype, "editorId", void 0);
1139
+ __decorate([
1140
+ Input()
1141
+ ], HtmlEditorComponent.prototype, "editorLabelText", void 0);
1142
+ __decorate([
1143
+ Input()
1144
+ ], HtmlEditorComponent.prototype, "editorOptions", void 0);
1145
+ __decorate([
1146
+ Input()
1147
+ ], HtmlEditorComponent.prototype, "isFormBased", void 0);
1148
+ __decorate([
1149
+ Input()
1150
+ ], HtmlEditorComponent.prototype, "editorFormKey", void 0);
1151
+ HtmlEditorComponent = __decorate([
1152
+ Component({
1153
+ selector: 'anatoly-html-editor',
1154
+ template: "<div [ngSwitch]=\"isFormBased\">\r\n <ng-template ngSwitchCase=\"0\">\r\n <label>{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\" \r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"1\">\r\n <div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\"\r\n [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n [formSubmitted]=\"formSubmitted\"\r\n [key]=\"editorFormKey\"\r\n [title]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n"
1155
+ })
1156
+ ], HtmlEditorComponent);
1750
1157
  return HtmlEditorComponent;
1751
- }(BaseEditComponent));
1752
- if (false) {
1753
- /**
1754
- * @type {?}
1755
- * @private
1756
- */
1757
- HtmlEditorComponent.prototype._defaultEditorOptions;
1758
- /**
1759
- * @type {?}
1760
- * @private
1761
- */
1762
- HtmlEditorComponent.prototype._control;
1763
- /**
1764
- * @type {?}
1765
- * @private
1766
- */
1767
- HtmlEditorComponent.prototype._editorInitialized;
1768
- /** @type {?} */
1769
- HtmlEditorComponent.prototype.options;
1770
- /** @type {?} */
1771
- HtmlEditorComponent.prototype.editorId;
1772
- /** @type {?} */
1773
- HtmlEditorComponent.prototype.editorLabelText;
1774
- /** @type {?} */
1775
- HtmlEditorComponent.prototype.editorOptions;
1776
- /** @type {?} */
1777
- HtmlEditorComponent.prototype.isFormBased;
1778
- /** @type {?} */
1779
- HtmlEditorComponent.prototype.editorFormKey;
1780
- }
1781
-
1782
- /**
1783
- * @fileoverview added by tsickle
1784
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1785
- */
1786
- var ContentHeaderComponent = /** @class */ (function () {
1787
- function ContentHeaderComponent() {
1788
- }
1789
- /**
1790
- * @return {?}
1791
- */
1792
- ContentHeaderComponent.prototype.ngOnInit = /**
1793
- * @return {?}
1794
- */
1795
- function () {
1796
- if (this.title == null) {
1797
- this.title = '';
1798
- }
1799
- };
1800
- ContentHeaderComponent.decorators = [
1801
- { type: Component, args: [{
1802
- selector: 'anatoly-content-header',
1803
- template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
1804
- }] }
1805
- ];
1806
- ContentHeaderComponent.propDecorators = {
1807
- title: [{ type: Input }]
1808
- };
1809
- return ContentHeaderComponent;
1810
- }());
1811
- if (false) {
1812
- /** @type {?} */
1813
- ContentHeaderComponent.prototype.title;
1814
- }
1158
+ }(BaseEditComponent));
1815
1159
 
1816
- /**
1817
- * @fileoverview added by tsickle
1818
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1819
- */
1160
+ /*
1161
+ <file>
1162
+ Authors:
1163
+ Vadim Osovitny
1164
+
1165
+ Created:
1166
+ 3 Jun 2018
1167
+
1168
+ Version:
1169
+ 1.0
1170
+
1171
+ Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
1172
+ </file>
1173
+ */
1820
1174
  var AnatolyUIModule = /** @class */ (function () {
1821
1175
  function AnatolyUIModule() {
1822
1176
  }
1823
- AnatolyUIModule.decorators = [
1824
- { type: NgModule, args: [{
1825
- imports: [
1826
- CommonModule,
1827
- ReactiveFormsModule,
1828
- FormsModule,
1829
- HttpClientModule,
1830
- HttpClientXsrfModule,
1831
- HttpClientJsonpModule,
1832
- FroalaEditorModule.forRoot(),
1833
- FroalaViewModule.forRoot(),
1834
- GridModule,
1835
- PopupModule,
1836
- ButtonsModule,
1837
- DropDownsModule
1838
- ],
1839
- exports: [
1840
- CommonModule,
1841
- HttpClientModule,
1842
- HttpClientXsrfModule,
1843
- HttpClientJsonpModule,
1844
- ItemValidationSummaryComponent,
1845
- FormValidationSummaryComponent,
1846
- HtmlEditorComponent,
1847
- ContentHeaderComponent
1848
- ],
1849
- declarations: [
1850
- ItemValidationSummaryComponent,
1851
- FormValidationSummaryComponent,
1852
- HtmlEditorComponent,
1853
- ContentHeaderComponent
1854
- ],
1855
- providers: []
1856
- },] }
1857
- ];
1177
+ AnatolyUIModule = __decorate([
1178
+ NgModule({
1179
+ imports: [
1180
+ CommonModule,
1181
+ ReactiveFormsModule,
1182
+ FormsModule,
1183
+ HttpClientModule,
1184
+ HttpClientXsrfModule,
1185
+ HttpClientJsonpModule,
1186
+ FroalaEditorModule.forRoot(),
1187
+ FroalaViewModule.forRoot(),
1188
+ GridModule,
1189
+ PopupModule,
1190
+ ButtonsModule,
1191
+ DropDownsModule
1192
+ ],
1193
+ exports: [
1194
+ CommonModule,
1195
+ HttpClientModule,
1196
+ HttpClientXsrfModule,
1197
+ HttpClientJsonpModule,
1198
+ ItemValidationSummaryComponent,
1199
+ FormValidationSummaryComponent,
1200
+ HtmlEditorComponent,
1201
+ ContentHeaderComponent
1202
+ ],
1203
+ declarations: [
1204
+ ItemValidationSummaryComponent,
1205
+ FormValidationSummaryComponent,
1206
+ HtmlEditorComponent,
1207
+ ContentHeaderComponent
1208
+ ],
1209
+ providers: [],
1210
+ schemas: [
1211
+ CUSTOM_ELEMENTS_SCHEMA,
1212
+ NO_ERRORS_SCHEMA
1213
+ ]
1214
+ })
1215
+ ], AnatolyUIModule);
1858
1216
  return AnatolyUIModule;
1859
1217
  }());
1860
1218
 
1861
- /**
1862
- * @fileoverview added by tsickle
1863
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1864
- */
1865
-
1866
- /**
1867
- * @fileoverview added by tsickle
1868
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1869
- */
1219
+ // Base Components
1870
1220
 
1871
1221
  /**
1872
- * @fileoverview added by tsickle
1873
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1222
+ * Generated bundle index. Do not edit.
1874
1223
  */
1875
1224
 
1876
- export { AnatolyBillingModule, AnatolyCoreModule, AnatolyIdentityModule, AnatolyUIModule, AppContextService, BaseApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, HtmlEditorComponent };
1225
+ export { AnatolyBillingModule, AnatolyCoreModule, AnatolyIdentityModule, AnatolyUIModule, AppContextService, BaseApiService, BaseBillingApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, BuyAccessButtonComponent, ContentHeaderComponent, FormValidationSummaryComponent, HtmlEditorComponent, ItemValidationSummaryComponent, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, SubscribePlanButtonComponent, UpgradePlanButtonComponent, ValidationSummaryComponent };
1877
1226
  //# sourceMappingURL=osovitny-anatoly.js.map