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