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