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