@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,9 +1,9 @@
|
|
|
1
|
+
import Swal from 'sweetalert2';
|
|
1
2
|
import { __decorate, __extends } from 'tslib';
|
|
2
3
|
import { Injectable, Input, Component, NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
3
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
5
|
import { HttpClient, HttpClientModule, HttpClientXsrfModule, HttpClientJsonpModule } from '@angular/common/http';
|
|
5
6
|
import { map } from 'rxjs/operators';
|
|
6
|
-
import Swal from 'sweetalert2';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
9
9
|
import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
|
|
@@ -13,6 +13,132 @@ import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
|
13
13
|
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
14
14
|
import { BehaviorSubject } from 'rxjs';
|
|
15
15
|
|
|
16
|
+
/*
|
|
17
|
+
<file>
|
|
18
|
+
Authors:
|
|
19
|
+
Vadim Osovitny
|
|
20
|
+
|
|
21
|
+
Created:
|
|
22
|
+
4 Mar 2020
|
|
23
|
+
|
|
24
|
+
Version:
|
|
25
|
+
1.0
|
|
26
|
+
|
|
27
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
28
|
+
</file>
|
|
29
|
+
*/
|
|
30
|
+
var Alerts = /** @class */ (function () {
|
|
31
|
+
function Alerts() {
|
|
32
|
+
}
|
|
33
|
+
Alerts.Info = function (text) {
|
|
34
|
+
Swal.fire({
|
|
35
|
+
title: "Info!",
|
|
36
|
+
text: text,
|
|
37
|
+
icon: "info",
|
|
38
|
+
confirmButtonText: "OK"
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
Alerts.Warning = function (text) {
|
|
42
|
+
Swal.fire({
|
|
43
|
+
title: "warning!",
|
|
44
|
+
text: text,
|
|
45
|
+
icon: "warning",
|
|
46
|
+
confirmButtonText: "OK"
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
Alerts.Error = function (text) {
|
|
50
|
+
Swal.fire({
|
|
51
|
+
title: "error!",
|
|
52
|
+
text: text,
|
|
53
|
+
icon: "error",
|
|
54
|
+
confirmButtonText: "OK"
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
Alerts.NotImplemented = function () {
|
|
58
|
+
this.Warning("Not Implemented Yet");
|
|
59
|
+
};
|
|
60
|
+
;
|
|
61
|
+
Alerts.ErrorOccurred = function () {
|
|
62
|
+
this.Error("Sorry, an unexpected error occurred");
|
|
63
|
+
};
|
|
64
|
+
;
|
|
65
|
+
Alerts.AreYouSure = function (text, title, confirmButtonText, cancelButtonText, successAction, cancelAction) {
|
|
66
|
+
if (typeof title == "undefined" || title == null)
|
|
67
|
+
title = "Are you sure?";
|
|
68
|
+
Swal.fire({
|
|
69
|
+
title: title,
|
|
70
|
+
text: text,
|
|
71
|
+
icon: 'warning',
|
|
72
|
+
confirmButtonText: confirmButtonText,
|
|
73
|
+
cancelButtonText: cancelButtonText,
|
|
74
|
+
showCancelButton: true
|
|
75
|
+
})
|
|
76
|
+
.then(function (result) {
|
|
77
|
+
if (result.value) {
|
|
78
|
+
if (successAction) {
|
|
79
|
+
successAction();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// result.dismiss can be 'cancel', 'overlay', 'close', and 'timer'
|
|
83
|
+
else if (result.dismiss == Swal.DismissReason.cancel || result.dismiss == Swal.DismissReason.close) {
|
|
84
|
+
if (cancelAction) {
|
|
85
|
+
cancelAction();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
;
|
|
91
|
+
Alerts.Success = function (text, title, successAction) {
|
|
92
|
+
if (typeof title == "undefined" || title == null)
|
|
93
|
+
title = "Success!";
|
|
94
|
+
Swal.fire({
|
|
95
|
+
title: title,
|
|
96
|
+
text: text,
|
|
97
|
+
icon: "success",
|
|
98
|
+
confirmButtonText: "OK"
|
|
99
|
+
})
|
|
100
|
+
.then(function () {
|
|
101
|
+
if (successAction) {
|
|
102
|
+
successAction();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
;
|
|
107
|
+
Alerts.Cancel = function (text) {
|
|
108
|
+
Swal.fire('Cancelled', text, 'error');
|
|
109
|
+
};
|
|
110
|
+
;
|
|
111
|
+
return Alerts;
|
|
112
|
+
}());
|
|
113
|
+
|
|
114
|
+
/*
|
|
115
|
+
<file>
|
|
116
|
+
Authors:
|
|
117
|
+
Vadim Osovitny
|
|
118
|
+
|
|
119
|
+
Created:
|
|
120
|
+
4 Mar 2020
|
|
121
|
+
|
|
122
|
+
Version:
|
|
123
|
+
1.0
|
|
124
|
+
|
|
125
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
126
|
+
</file>
|
|
127
|
+
*/
|
|
128
|
+
var Utils = /** @class */ (function () {
|
|
129
|
+
function Utils() {
|
|
130
|
+
}
|
|
131
|
+
Utils.GetValueByNameInQS = function (name) {
|
|
132
|
+
return Utils.GetValueByName(location.search, name);
|
|
133
|
+
};
|
|
134
|
+
Utils.GetValueByName = function (url, name) {
|
|
135
|
+
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
136
|
+
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
|
|
137
|
+
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
138
|
+
};
|
|
139
|
+
return Utils;
|
|
140
|
+
}());
|
|
141
|
+
|
|
16
142
|
/*
|
|
17
143
|
<file>
|
|
18
144
|
Authors:
|
|
@@ -204,132 +330,6 @@ var AppContextService = /** @class */ (function (_super) {
|
|
|
204
330
|
return AppContextService;
|
|
205
331
|
}(BaseApiService));
|
|
206
332
|
|
|
207
|
-
/*
|
|
208
|
-
<file>
|
|
209
|
-
Authors:
|
|
210
|
-
Vadim Osovitny
|
|
211
|
-
|
|
212
|
-
Created:
|
|
213
|
-
4 Mar 2020
|
|
214
|
-
|
|
215
|
-
Version:
|
|
216
|
-
1.0
|
|
217
|
-
|
|
218
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
219
|
-
</file>
|
|
220
|
-
*/
|
|
221
|
-
var Alerts = /** @class */ (function () {
|
|
222
|
-
function Alerts() {
|
|
223
|
-
}
|
|
224
|
-
Alerts.Info = function (text) {
|
|
225
|
-
Swal.fire({
|
|
226
|
-
title: "Info!",
|
|
227
|
-
text: text,
|
|
228
|
-
icon: "info",
|
|
229
|
-
confirmButtonText: "OK"
|
|
230
|
-
});
|
|
231
|
-
};
|
|
232
|
-
Alerts.Warning = function (text) {
|
|
233
|
-
Swal.fire({
|
|
234
|
-
title: "warning!",
|
|
235
|
-
text: text,
|
|
236
|
-
icon: "warning",
|
|
237
|
-
confirmButtonText: "OK"
|
|
238
|
-
});
|
|
239
|
-
};
|
|
240
|
-
Alerts.Error = function (text) {
|
|
241
|
-
Swal.fire({
|
|
242
|
-
title: "error!",
|
|
243
|
-
text: text,
|
|
244
|
-
icon: "error",
|
|
245
|
-
confirmButtonText: "OK"
|
|
246
|
-
});
|
|
247
|
-
};
|
|
248
|
-
Alerts.NotImplemented = function () {
|
|
249
|
-
this.Warning("Not Implemented Yet");
|
|
250
|
-
};
|
|
251
|
-
;
|
|
252
|
-
Alerts.ErrorOccurred = function () {
|
|
253
|
-
this.Error("Sorry, an unexpected error occurred");
|
|
254
|
-
};
|
|
255
|
-
;
|
|
256
|
-
Alerts.AreYouSure = function (text, title, confirmButtonText, cancelButtonText, successAction, cancelAction) {
|
|
257
|
-
if (typeof title == "undefined" || title == null)
|
|
258
|
-
title = "Are you sure?";
|
|
259
|
-
Swal.fire({
|
|
260
|
-
title: title,
|
|
261
|
-
text: text,
|
|
262
|
-
icon: 'warning',
|
|
263
|
-
confirmButtonText: confirmButtonText,
|
|
264
|
-
cancelButtonText: cancelButtonText,
|
|
265
|
-
showCancelButton: true
|
|
266
|
-
})
|
|
267
|
-
.then(function (result) {
|
|
268
|
-
if (result.value) {
|
|
269
|
-
if (successAction) {
|
|
270
|
-
successAction();
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
// result.dismiss can be 'cancel', 'overlay', 'close', and 'timer'
|
|
274
|
-
else if (result.dismiss == Swal.DismissReason.cancel || result.dismiss == Swal.DismissReason.close) {
|
|
275
|
-
if (cancelAction) {
|
|
276
|
-
cancelAction();
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
;
|
|
282
|
-
Alerts.AlertSuccess = function (text, title, successAction) {
|
|
283
|
-
if (typeof title == "undefined" || title == null)
|
|
284
|
-
title = "Success!";
|
|
285
|
-
Swal.fire({
|
|
286
|
-
title: title,
|
|
287
|
-
text: text,
|
|
288
|
-
icon: "success",
|
|
289
|
-
confirmButtonText: "OK"
|
|
290
|
-
})
|
|
291
|
-
.then(function () {
|
|
292
|
-
if (successAction) {
|
|
293
|
-
successAction();
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
};
|
|
297
|
-
;
|
|
298
|
-
Alerts.AlertCancel = function (text) {
|
|
299
|
-
Swal.fire('Cancelled', text, 'error');
|
|
300
|
-
};
|
|
301
|
-
;
|
|
302
|
-
return Alerts;
|
|
303
|
-
}());
|
|
304
|
-
|
|
305
|
-
/*
|
|
306
|
-
<file>
|
|
307
|
-
Authors:
|
|
308
|
-
Vadim Osovitny
|
|
309
|
-
|
|
310
|
-
Created:
|
|
311
|
-
4 Mar 2020
|
|
312
|
-
|
|
313
|
-
Version:
|
|
314
|
-
1.0
|
|
315
|
-
|
|
316
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
317
|
-
</file>
|
|
318
|
-
*/
|
|
319
|
-
var Utils = /** @class */ (function () {
|
|
320
|
-
function Utils() {
|
|
321
|
-
}
|
|
322
|
-
Utils.GetValueByNameInQS = function (name) {
|
|
323
|
-
return Utils.GetValueByName(location.search, name);
|
|
324
|
-
};
|
|
325
|
-
Utils.GetValueByName = function (url, name) {
|
|
326
|
-
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
327
|
-
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
|
|
328
|
-
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
329
|
-
};
|
|
330
|
-
return Utils;
|
|
331
|
-
}());
|
|
332
|
-
|
|
333
333
|
/*
|
|
334
334
|
<file>
|
|
335
335
|
Authors:
|
|
@@ -598,8 +598,6 @@ var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
|
598
598
|
return ItemValidationSummaryComponent;
|
|
599
599
|
}(ValidationSummaryComponent));
|
|
600
600
|
|
|
601
|
-
var ɵ0 = function (images) {
|
|
602
|
-
};
|
|
603
601
|
var DefaultEditorOptions = {
|
|
604
602
|
placeholderText: 'Edit Your Content Here',
|
|
605
603
|
charCounterCount: true,
|
|
@@ -630,9 +628,6 @@ var DefaultEditorOptions = {
|
|
|
630
628
|
imageUploadURL: '/api/HtmlEditor/UploadImage',
|
|
631
629
|
imageAllowedTypes: ['jpeg', 'jpg', 'png'],
|
|
632
630
|
imageUploadParams: { uploadType: '', uploadParentId: '' },
|
|
633
|
-
events: {
|
|
634
|
-
'image.beforeUpload': ɵ0
|
|
635
|
-
}
|
|
636
631
|
};
|
|
637
632
|
|
|
638
633
|
/*
|
|
@@ -671,9 +666,11 @@ var BaseHtmlEditorComponent = /** @class */ (function (_super) {
|
|
|
671
666
|
if (key) {
|
|
672
667
|
newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
|
|
673
668
|
}
|
|
669
|
+
/*
|
|
674
670
|
if (newOptions.events && newOptions.events.initialized) {
|
|
675
671
|
newOptions.events.initialized.overridden = false;
|
|
676
672
|
}
|
|
673
|
+
*/
|
|
677
674
|
this.options = newOptions;
|
|
678
675
|
};
|
|
679
676
|
BaseHtmlEditorComponent.prototype.doAfterEditorInitialized = function (action) {
|
|
@@ -859,8 +856,6 @@ var AnatolyCoreModule = /** @class */ (function () {
|
|
|
859
856
|
return AnatolyCoreModule;
|
|
860
857
|
}());
|
|
861
858
|
|
|
862
|
-
// Services
|
|
863
|
-
|
|
864
859
|
/*
|
|
865
860
|
<file>
|
|
866
861
|
Authors:
|
|
@@ -953,7 +948,7 @@ var BuyAccessButtonComponent = /** @class */ (function () {
|
|
|
953
948
|
var that = this;
|
|
954
949
|
Alerts.AreYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
|
|
955
950
|
that.api.buyAccess(that.plan, function () {
|
|
956
|
-
Alerts.
|
|
951
|
+
Alerts.Success('Access Granted', null, function () {
|
|
957
952
|
window.location.reload();
|
|
958
953
|
});
|
|
959
954
|
});
|
|
@@ -1060,7 +1055,7 @@ var UpgradePlanButtonComponent = /** @class */ (function () {
|
|
|
1060
1055
|
var that = this;
|
|
1061
1056
|
Alerts.AreYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', function () {
|
|
1062
1057
|
that.api.requestNewSubscription(that.requestedplan, function () {
|
|
1063
|
-
Alerts.
|
|
1058
|
+
Alerts.Success('Your request for changing plan has been sent.', null, function () {
|
|
1064
1059
|
window.location.reload();
|
|
1065
1060
|
});
|
|
1066
1061
|
});
|
|
@@ -1403,5 +1398,5 @@ var AnatolyDataModule = /** @class */ (function () {
|
|
|
1403
1398
|
* Generated bundle index. Do not edit.
|
|
1404
1399
|
*/
|
|
1405
1400
|
|
|
1406
|
-
export { AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyIdentityModule, AppContextService, BaseApiService, BaseBillingApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, BuyAccessButtonComponent, Consts, ContentHeaderComponent, FormValidationSummaryComponent, FormsHtmlEditorComponent, HtmlEditorComponent, ItemValidationSummaryComponent, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, SubscribePlanButtonComponent, UpgradePlanButtonComponent, ValidationSummaryComponent };
|
|
1401
|
+
export { Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyIdentityModule, AppContextService, BaseApiService, BaseBillingApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, BuyAccessButtonComponent, Consts, ContentHeaderComponent, FormValidationSummaryComponent, FormsHtmlEditorComponent, HtmlEditorComponent, ItemValidationSummaryComponent, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, SubscribePlanButtonComponent, UpgradePlanButtonComponent, Utils, ValidationSummaryComponent };
|
|
1407
1402
|
//# sourceMappingURL=osovitny-anatoly.js.map
|