@osovitny/anatoly 1.2.5 → 1.2.7
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 +136 -139
- package/bundles/osovitny-anatoly.umd.js.map +1 -1
- package/bundles/osovitny-anatoly.umd.min.js +2 -2
- package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
- package/esm2015/lib/billing/components/buyaccess/buyaccess-button.component.js +2 -2
- package/esm2015/lib/billing/components/subscriptions/upgrade-plan-button.component.js +2 -2
- package/esm2015/lib/core/alerts.js +3 -3
- package/esm2015/lib/core/components/html-editor/base-html-editor.component.js +3 -1
- package/esm2015/lib/core/components/html-editor/html-editor.defaultoptions.js +1 -7
- package/esm2015/lib/core/index.js +3 -1
- package/esm5/lib/billing/components/buyaccess/buyaccess-button.component.js +2 -2
- package/esm5/lib/billing/components/subscriptions/upgrade-plan-button.component.js +2 -2
- package/esm5/lib/core/alerts.js +3 -3
- package/esm5/lib/core/components/html-editor/base-html-editor.component.js +3 -1
- package/esm5/lib/core/components/html-editor/html-editor.defaultoptions.js +1 -7
- package/esm5/lib/core/index.js +3 -1
- package/fesm2015/osovitny-anatoly.js +126 -131
- package/fesm2015/osovitny-anatoly.js.map +1 -1
- package/fesm5/osovitny-anatoly.js +132 -137
- package/fesm5/osovitny-anatoly.js.map +1 -1
- package/lib/core/alerts.d.ts +2 -2
- package/lib/core/index.d.ts +2 -0
- package/osovitny-anatoly.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', '
|
|
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.
|
|
5
|
-
}(this, (function (exports, core, router, http, operators,
|
|
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
6
|
|
|
7
7
|
Swal = Swal && Swal.hasOwnProperty('default') ? Swal['default'] : Swal;
|
|
8
8
|
|
|
@@ -203,6 +203,132 @@
|
|
|
203
203
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
/*
|
|
207
|
+
<file>
|
|
208
|
+
Authors:
|
|
209
|
+
Vadim Osovitny
|
|
210
|
+
|
|
211
|
+
Created:
|
|
212
|
+
4 Mar 2020
|
|
213
|
+
|
|
214
|
+
Version:
|
|
215
|
+
1.0
|
|
216
|
+
|
|
217
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
218
|
+
</file>
|
|
219
|
+
*/
|
|
220
|
+
var Alerts = /** @class */ (function () {
|
|
221
|
+
function Alerts() {
|
|
222
|
+
}
|
|
223
|
+
Alerts.Info = function (text) {
|
|
224
|
+
Swal.fire({
|
|
225
|
+
title: "Info!",
|
|
226
|
+
text: text,
|
|
227
|
+
icon: "info",
|
|
228
|
+
confirmButtonText: "OK"
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
Alerts.Warning = function (text) {
|
|
232
|
+
Swal.fire({
|
|
233
|
+
title: "warning!",
|
|
234
|
+
text: text,
|
|
235
|
+
icon: "warning",
|
|
236
|
+
confirmButtonText: "OK"
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
Alerts.Error = function (text) {
|
|
240
|
+
Swal.fire({
|
|
241
|
+
title: "error!",
|
|
242
|
+
text: text,
|
|
243
|
+
icon: "error",
|
|
244
|
+
confirmButtonText: "OK"
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
Alerts.NotImplemented = function () {
|
|
248
|
+
this.Warning("Not Implemented Yet");
|
|
249
|
+
};
|
|
250
|
+
;
|
|
251
|
+
Alerts.ErrorOccurred = function () {
|
|
252
|
+
this.Error("Sorry, an unexpected error occurred");
|
|
253
|
+
};
|
|
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
|
+
});
|
|
279
|
+
};
|
|
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
|
+
});
|
|
295
|
+
};
|
|
296
|
+
;
|
|
297
|
+
Alerts.Cancel = function (text) {
|
|
298
|
+
Swal.fire('Cancelled', text, 'error');
|
|
299
|
+
};
|
|
300
|
+
;
|
|
301
|
+
return Alerts;
|
|
302
|
+
}());
|
|
303
|
+
|
|
304
|
+
/*
|
|
305
|
+
<file>
|
|
306
|
+
Authors:
|
|
307
|
+
Vadim Osovitny
|
|
308
|
+
|
|
309
|
+
Created:
|
|
310
|
+
4 Mar 2020
|
|
311
|
+
|
|
312
|
+
Version:
|
|
313
|
+
1.0
|
|
314
|
+
|
|
315
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
316
|
+
</file>
|
|
317
|
+
*/
|
|
318
|
+
var Utils = /** @class */ (function () {
|
|
319
|
+
function Utils() {
|
|
320
|
+
}
|
|
321
|
+
Utils.GetValueByNameInQS = function (name) {
|
|
322
|
+
return Utils.GetValueByName(location.search, name);
|
|
323
|
+
};
|
|
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, " "));
|
|
328
|
+
};
|
|
329
|
+
return Utils;
|
|
330
|
+
}());
|
|
331
|
+
|
|
206
332
|
/*
|
|
207
333
|
<file>
|
|
208
334
|
Authors:
|
|
@@ -394,132 +520,6 @@
|
|
|
394
520
|
return AppContextService;
|
|
395
521
|
}(BaseApiService));
|
|
396
522
|
|
|
397
|
-
/*
|
|
398
|
-
<file>
|
|
399
|
-
Authors:
|
|
400
|
-
Vadim Osovitny
|
|
401
|
-
|
|
402
|
-
Created:
|
|
403
|
-
4 Mar 2020
|
|
404
|
-
|
|
405
|
-
Version:
|
|
406
|
-
1.0
|
|
407
|
-
|
|
408
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
409
|
-
</file>
|
|
410
|
-
*/
|
|
411
|
-
var Alerts = /** @class */ (function () {
|
|
412
|
-
function Alerts() {
|
|
413
|
-
}
|
|
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
|
|
456
|
-
})
|
|
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;
|
|
493
|
-
}());
|
|
494
|
-
|
|
495
|
-
/*
|
|
496
|
-
<file>
|
|
497
|
-
Authors:
|
|
498
|
-
Vadim Osovitny
|
|
499
|
-
|
|
500
|
-
Created:
|
|
501
|
-
4 Mar 2020
|
|
502
|
-
|
|
503
|
-
Version:
|
|
504
|
-
1.0
|
|
505
|
-
|
|
506
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
507
|
-
</file>
|
|
508
|
-
*/
|
|
509
|
-
var Utils = /** @class */ (function () {
|
|
510
|
-
function Utils() {
|
|
511
|
-
}
|
|
512
|
-
Utils.GetValueByNameInQS = function (name) {
|
|
513
|
-
return Utils.GetValueByName(location.search, name);
|
|
514
|
-
};
|
|
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, " "));
|
|
519
|
-
};
|
|
520
|
-
return Utils;
|
|
521
|
-
}());
|
|
522
|
-
|
|
523
523
|
/*
|
|
524
524
|
<file>
|
|
525
525
|
Authors:
|
|
@@ -788,8 +788,6 @@
|
|
|
788
788
|
return ItemValidationSummaryComponent;
|
|
789
789
|
}(ValidationSummaryComponent));
|
|
790
790
|
|
|
791
|
-
var ɵ0 = function (images) {
|
|
792
|
-
};
|
|
793
791
|
var DefaultEditorOptions = {
|
|
794
792
|
placeholderText: 'Edit Your Content Here',
|
|
795
793
|
charCounterCount: true,
|
|
@@ -820,9 +818,6 @@
|
|
|
820
818
|
imageUploadURL: '/api/HtmlEditor/UploadImage',
|
|
821
819
|
imageAllowedTypes: ['jpeg', 'jpg', 'png'],
|
|
822
820
|
imageUploadParams: { uploadType: '', uploadParentId: '' },
|
|
823
|
-
events: {
|
|
824
|
-
'image.beforeUpload': ɵ0
|
|
825
|
-
}
|
|
826
821
|
};
|
|
827
822
|
|
|
828
823
|
/*
|
|
@@ -861,9 +856,11 @@
|
|
|
861
856
|
if (key) {
|
|
862
857
|
newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
|
|
863
858
|
}
|
|
859
|
+
/*
|
|
864
860
|
if (newOptions.events && newOptions.events.initialized) {
|
|
865
861
|
newOptions.events.initialized.overridden = false;
|
|
866
862
|
}
|
|
863
|
+
*/
|
|
867
864
|
this.options = newOptions;
|
|
868
865
|
};
|
|
869
866
|
BaseHtmlEditorComponent.prototype.doAfterEditorInitialized = function (action) {
|
|
@@ -1049,8 +1046,6 @@
|
|
|
1049
1046
|
return AnatolyCoreModule;
|
|
1050
1047
|
}());
|
|
1051
1048
|
|
|
1052
|
-
// Services
|
|
1053
|
-
|
|
1054
1049
|
/*
|
|
1055
1050
|
<file>
|
|
1056
1051
|
Authors:
|
|
@@ -1143,7 +1138,7 @@
|
|
|
1143
1138
|
var that = this;
|
|
1144
1139
|
Alerts.AreYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
|
|
1145
1140
|
that.api.buyAccess(that.plan, function () {
|
|
1146
|
-
Alerts.
|
|
1141
|
+
Alerts.Success('Access Granted', null, function () {
|
|
1147
1142
|
window.location.reload();
|
|
1148
1143
|
});
|
|
1149
1144
|
});
|
|
@@ -1250,7 +1245,7 @@
|
|
|
1250
1245
|
var that = this;
|
|
1251
1246
|
Alerts.AreYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', function () {
|
|
1252
1247
|
that.api.requestNewSubscription(that.requestedplan, function () {
|
|
1253
|
-
Alerts.
|
|
1248
|
+
Alerts.Success('Your request for changing plan has been sent.', null, function () {
|
|
1254
1249
|
window.location.reload();
|
|
1255
1250
|
});
|
|
1256
1251
|
});
|
|
@@ -1587,6 +1582,7 @@
|
|
|
1587
1582
|
return AnatolyDataModule;
|
|
1588
1583
|
}());
|
|
1589
1584
|
|
|
1585
|
+
exports.Alerts = Alerts;
|
|
1590
1586
|
exports.AnatolyBillingModule = AnatolyBillingModule;
|
|
1591
1587
|
exports.AnatolyCoreModule = AnatolyCoreModule;
|
|
1592
1588
|
exports.AnatolyDataModule = AnatolyDataModule;
|
|
@@ -1610,6 +1606,7 @@
|
|
|
1610
1606
|
exports.SignUpButtonComponent = SignUpButtonComponent;
|
|
1611
1607
|
exports.SubscribePlanButtonComponent = SubscribePlanButtonComponent;
|
|
1612
1608
|
exports.UpgradePlanButtonComponent = UpgradePlanButtonComponent;
|
|
1609
|
+
exports.Utils = Utils;
|
|
1613
1610
|
exports.ValidationSummaryComponent = ValidationSummaryComponent;
|
|
1614
1611
|
|
|
1615
1612
|
Object.defineProperty(exports, '__esModule', { value: true });
|