@osovitny/anatoly 2.0.5 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/bundles/osovitny-anatoly.umd.js +1550 -1683
- package/bundles/osovitny-anatoly.umd.js.map +1 -1
- package/bundles/osovitny-anatoly.umd.min.js +13 -13
- package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
- package/esm2015/lib/core/alerts.js +19 -23
- package/esm2015/lib/core/core.module.js +14 -79
- package/esm2015/lib/core/index.js +7 -17
- package/esm2015/lib/core/services/appcontext.service.js +12 -14
- package/esm2015/lib/core/services/base-go.service.js +8 -10
- package/esm2015/lib/core/utils.js +4 -2
- package/esm2015/lib/data/base/base-api.service.js +6 -8
- package/esm2015/lib/data/base/grid/base-grid-edit.service.js +6 -8
- package/esm2015/lib/data/base/grid/base-grid-read.service.js +6 -8
- package/esm2015/lib/data/data.module.js +21 -23
- package/esm2015/lib/data/index.js +1 -1
- package/esm2015/lib/data/services/billing-api.service.js +6 -8
- package/esm2015/lib/ui/components/base-edit.component.js +64 -0
- package/esm2015/lib/ui/components/base.component.js +38 -0
- package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +71 -0
- package/esm2015/lib/ui/components/billing/subscribe-plan-button.component.js +59 -0
- package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +50 -0
- package/esm2015/lib/ui/components/content-header/content-header.component.js +33 -0
- package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +96 -0
- package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +41 -0
- package/esm2015/lib/ui/components/html-editor/html-editor.component.js +48 -0
- package/esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js +32 -0
- package/esm2015/lib/ui/components/identity/signin-button.component.js +29 -0
- package/esm2015/lib/ui/components/identity/signout-button.component.js +29 -0
- package/esm2015/lib/ui/components/identity/signup-button.component.js +27 -0
- package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +38 -0
- package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +34 -0
- package/esm2015/lib/ui/components/validation/validation-summary.component.js +60 -0
- package/esm2015/lib/ui/index.js +22 -0
- package/esm2015/lib/ui/ui.module.js +78 -0
- package/esm2015/osovitny-anatoly.js +1 -1
- package/esm2015/public-api.js +7 -5
- package/fesm2015/osovitny-anatoly.js +699 -785
- package/fesm2015/osovitny-anatoly.js.map +1 -1
- package/lib/core/core.module.d.ts +0 -3
- package/lib/core/index.d.ts +5 -13
- package/lib/core/services/appcontext.service.d.ts +2 -2
- package/lib/core/services/base-go.service.d.ts +1 -1
- package/lib/{core → ui}/components/base.component.d.ts +0 -1
- package/lib/{billing/components/buyaccess → ui/components/billing}/buyaccess-button.component.d.ts +3 -3
- package/lib/{billing/components/subscriptions → ui/components/billing}/upgrade-plan-button.component.d.ts +1 -1
- package/lib/{identity/components → ui/components/identity}/signup-button.component.d.ts +0 -1
- package/lib/{core → ui}/components/validation/form-validation-summary.component.d.ts +1 -1
- package/lib/{core → ui}/components/validation/validation-summary.component.d.ts +1 -1
- package/lib/ui/index.d.ts +15 -0
- package/lib/ui/ui.module.d.ts +6 -0
- package/osovitny-anatoly.metadata.json +1 -1
- package/package.json +8 -7
- package/public-api.d.ts +3 -4
- package/esm2015/lib/billing/billing.module.js +0 -60
- package/esm2015/lib/billing/components/buyaccess/buyaccess-button.component.js +0 -75
- package/esm2015/lib/billing/components/subscriptions/subscribe-plan-button.component.js +0 -63
- package/esm2015/lib/billing/components/subscriptions/upgrade-plan-button.component.js +0 -56
- package/esm2015/lib/billing/index.js +0 -7
- package/esm2015/lib/core/components/base-edit.component.js +0 -67
- package/esm2015/lib/core/components/base.component.js +0 -39
- package/esm2015/lib/core/components/content-header/content-header.component.js +0 -35
- package/esm2015/lib/core/components/html-editor/base-html-editor.component.js +0 -99
- package/esm2015/lib/core/components/html-editor/forms-html-editor.component.js +0 -42
- package/esm2015/lib/core/components/html-editor/html-editor.component.js +0 -49
- package/esm2015/lib/core/components/html-editor/html-editor.defaultoptions.js +0 -32
- package/esm2015/lib/core/components/validation/form-validation-summary.component.js +0 -39
- package/esm2015/lib/core/components/validation/item-validation-summary.component.js +0 -37
- package/esm2015/lib/core/components/validation/validation-summary.component.js +0 -60
- package/esm2015/lib/identity/components/signin-button.component.js +0 -30
- package/esm2015/lib/identity/components/signout-button.component.js +0 -30
- package/esm2015/lib/identity/components/signup-button.component.js +0 -31
- package/esm2015/lib/identity/identity.module.js +0 -41
- package/esm2015/lib/identity/index.js +0 -7
- package/esm5/lib/billing/billing.module.js +0 -63
- package/esm5/lib/billing/components/buyaccess/buyaccess-button.component.js +0 -77
- package/esm5/lib/billing/components/subscriptions/subscribe-plan-button.component.js +0 -65
- package/esm5/lib/billing/components/subscriptions/upgrade-plan-button.component.js +0 -57
- package/esm5/lib/billing/index.js +0 -7
- package/esm5/lib/core/alerts.js +0 -149
- package/esm5/lib/core/components/base-edit.component.js +0 -71
- package/esm5/lib/core/components/base.component.js +0 -41
- package/esm5/lib/core/components/content-header/content-header.component.js +0 -38
- package/esm5/lib/core/components/html-editor/base-html-editor.component.js +0 -103
- package/esm5/lib/core/components/html-editor/forms-html-editor.component.js +0 -45
- package/esm5/lib/core/components/html-editor/html-editor.component.js +0 -51
- package/esm5/lib/core/components/html-editor/html-editor.defaultoptions.js +0 -32
- package/esm5/lib/core/components/validation/form-validation-summary.component.js +0 -42
- package/esm5/lib/core/components/validation/item-validation-summary.component.js +0 -39
- package/esm5/lib/core/components/validation/validation-summary.component.js +0 -65
- package/esm5/lib/core/core.module.js +0 -82
- package/esm5/lib/core/index.js +0 -18
- package/esm5/lib/core/services/appcontext.service.js +0 -75
- package/esm5/lib/core/services/base-go.service.js +0 -37
- package/esm5/lib/core/utils.js +0 -29
- package/esm5/lib/data/base/base-api.service.js +0 -87
- package/esm5/lib/data/base/grid/base-grid-edit.service.js +0 -81
- package/esm5/lib/data/base/grid/base-grid-read.service.js +0 -65
- package/esm5/lib/data/data.module.js +0 -44
- package/esm5/lib/data/index.js +0 -8
- package/esm5/lib/data/services/billing-api.service.js +0 -56
- package/esm5/lib/identity/components/signin-button.component.js +0 -32
- package/esm5/lib/identity/components/signout-button.component.js +0 -32
- package/esm5/lib/identity/components/signup-button.component.js +0 -32
- package/esm5/lib/identity/identity.module.js +0 -44
- package/esm5/lib/identity/index.js +0 -7
- package/esm5/osovitny-anatoly.js +0 -5
- package/esm5/public-api.js +0 -5
- package/fesm5/osovitny-anatoly.js +0 -1491
- package/fesm5/osovitny-anatoly.js.map +0 -1
- package/lib/billing/billing.module.d.ts +0 -2
- package/lib/billing/index.d.ts +0 -4
- package/lib/identity/identity.module.d.ts +0 -2
- package/lib/identity/index.d.ts +0 -4
- /package/lib/{core → ui}/components/base-edit.component.d.ts +0 -0
- /package/lib/{billing/components/subscriptions → ui/components/billing}/subscribe-plan-button.component.d.ts +0 -0
- /package/lib/{core → ui}/components/content-header/content-header.component.d.ts +0 -0
- /package/lib/{core → ui}/components/html-editor/base-html-editor.component.d.ts +0 -0
- /package/lib/{core → ui}/components/html-editor/forms-html-editor.component.d.ts +0 -0
- /package/lib/{core → ui}/components/html-editor/html-editor.component.d.ts +0 -0
- /package/lib/{core → ui}/components/html-editor/html-editor.defaultoptions.d.ts +0 -0
- /package/lib/{identity/components → ui/components/identity}/signin-button.component.d.ts +0 -0
- /package/lib/{identity/components → ui/components/identity}/signout-button.component.d.ts +0 -0
- /package/lib/{core → ui}/components/validation/item-validation-summary.component.d.ts +0 -0
|
@@ -1,1721 +1,1588 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}(this, (function (exports, Swal, core, router, http, operators, common, forms, angularFroalaWysiwyg
|
|
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('rxjs'), require('@angular/forms'), require('angular-froala-wysiwyg')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', 'sweetalert2', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', '@angular/common', 'rxjs', '@angular/forms', 'angular-froala-wysiwyg'], 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.rxjs, global.ng.forms, global.angularFroalaWysiwyg));
|
|
5
|
+
}(this, (function (exports, Swal, core, router, http, operators, common, rxjs, forms, angularFroalaWysiwyg) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Swal = Swal && Object.prototype.hasOwnProperty.call(Swal, 'default') ? Swal['default'] : Swal;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function __spreadArrays() {
|
|
154
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
155
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
156
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
157
|
-
r[k] = a[j];
|
|
158
|
-
return r;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
function __await(v) {
|
|
162
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
166
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
167
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
168
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
169
|
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
170
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
171
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
172
|
-
function fulfill(value) { resume("next", value); }
|
|
173
|
-
function reject(value) { resume("throw", value); }
|
|
174
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function __asyncDelegator(o) {
|
|
178
|
-
var i, p;
|
|
179
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
180
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function __asyncValues(o) {
|
|
184
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
185
|
-
var m = o[Symbol.asyncIterator], i;
|
|
186
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
187
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
188
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function __makeTemplateObject(cooked, raw) {
|
|
192
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
193
|
-
return cooked;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
function __importStar(mod) {
|
|
197
|
-
if (mod && mod.__esModule) return mod;
|
|
198
|
-
var result = {};
|
|
199
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
200
|
-
result.default = mod;
|
|
201
|
-
return result;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function __importDefault(mod) {
|
|
205
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
209
|
-
if (!privateMap.has(receiver)) {
|
|
210
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
211
|
-
}
|
|
212
|
-
return privateMap.get(receiver);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
216
|
-
if (!privateMap.has(receiver)) {
|
|
217
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
218
|
-
}
|
|
219
|
-
privateMap.set(receiver, value);
|
|
220
|
-
return value;
|
|
221
|
-
}
|
|
9
|
+
/*
|
|
10
|
+
<file>
|
|
11
|
+
Authors:
|
|
12
|
+
Vadim Osovitny
|
|
13
|
+
|
|
14
|
+
Created:
|
|
15
|
+
4 Mar 2020
|
|
16
|
+
|
|
17
|
+
Version:
|
|
18
|
+
1.0
|
|
19
|
+
|
|
20
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
21
|
+
</file>
|
|
22
|
+
*/
|
|
23
|
+
var Alerts = /** @class */ (function () {
|
|
24
|
+
function Alerts() {
|
|
25
|
+
}
|
|
26
|
+
Alerts.Info = function (text) {
|
|
27
|
+
Swal.fire({
|
|
28
|
+
title: "Information",
|
|
29
|
+
text: text,
|
|
30
|
+
icon: "info",
|
|
31
|
+
confirmButtonText: "OK",
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Alerts.Warning = function (text) {
|
|
35
|
+
Swal.fire({
|
|
36
|
+
title: "Warning",
|
|
37
|
+
text: text,
|
|
38
|
+
icon: "warning",
|
|
39
|
+
confirmButtonText: "OK",
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
Alerts.Error = function (text) {
|
|
43
|
+
Swal.fire({
|
|
44
|
+
title: "Error",
|
|
45
|
+
text: text,
|
|
46
|
+
icon: "error",
|
|
47
|
+
confirmButtonText: "OK",
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
Alerts.NotImplemented = function () {
|
|
51
|
+
this.Warning("Not Implemented Yet");
|
|
52
|
+
};
|
|
53
|
+
Alerts.ErrorOccurred = function () {
|
|
54
|
+
this.Error("Sorry, an unexpected error occurred");
|
|
55
|
+
};
|
|
56
|
+
Alerts.AreYouSure = function (text, title, confirmButtonText, cancelButtonText, successAction, cancelAction) {
|
|
57
|
+
if (typeof title == "undefined" || title == null)
|
|
58
|
+
title = "Are you sure?";
|
|
59
|
+
Swal.fire({
|
|
60
|
+
title: title,
|
|
61
|
+
text: text,
|
|
62
|
+
icon: "warning",
|
|
63
|
+
confirmButtonText: confirmButtonText,
|
|
64
|
+
cancelButtonText: cancelButtonText,
|
|
65
|
+
showCancelButton: true,
|
|
66
|
+
}).then(function (result) {
|
|
67
|
+
if (result.value) {
|
|
68
|
+
if (successAction) {
|
|
69
|
+
successAction();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// result.dismiss can be 'cancel', 'overlay', 'close', and 'timer'
|
|
73
|
+
else if (result.dismiss == Swal.DismissReason.cancel ||
|
|
74
|
+
result.dismiss == Swal.DismissReason.close) {
|
|
75
|
+
if (cancelAction) {
|
|
76
|
+
cancelAction();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
Alerts.Success = function (text, title, successAction) {
|
|
82
|
+
if (typeof title == "undefined" || title == null)
|
|
83
|
+
title = "Success";
|
|
84
|
+
if (!text) {
|
|
85
|
+
text = "Operation was successful";
|
|
86
|
+
}
|
|
87
|
+
Swal.fire({
|
|
88
|
+
title: title,
|
|
89
|
+
text: text,
|
|
90
|
+
icon: "success",
|
|
91
|
+
confirmButtonText: "OK",
|
|
92
|
+
}).then(function () {
|
|
93
|
+
if (successAction) {
|
|
94
|
+
successAction();
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
Alerts.Cancel = function (text) {
|
|
99
|
+
if (!text) {
|
|
100
|
+
text = "Operation has been cancled";
|
|
101
|
+
}
|
|
102
|
+
Swal.fire({
|
|
103
|
+
title: "Cancelled",
|
|
104
|
+
text: text,
|
|
105
|
+
icon: "info",
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
//Notifications
|
|
109
|
+
Alerts.NotificationCancel = function (text, title) {
|
|
110
|
+
if (typeof title == "undefined" || title == null) {
|
|
111
|
+
title = "Canceled";
|
|
112
|
+
}
|
|
113
|
+
if (!text) {
|
|
114
|
+
text = "Operation has been canceled";
|
|
115
|
+
}
|
|
116
|
+
var toast = Swal.mixin({
|
|
117
|
+
toast: true,
|
|
118
|
+
position: "top-end",
|
|
119
|
+
showConfirmButton: false,
|
|
120
|
+
timer: 3000,
|
|
121
|
+
timerProgressBar: true,
|
|
122
|
+
});
|
|
123
|
+
toast.fire({
|
|
124
|
+
title: title,
|
|
125
|
+
text: text,
|
|
126
|
+
icon: "info",
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
Alerts.NotificationSuccess = function (text, title) {
|
|
130
|
+
if (typeof title == "undefined" || title == null) {
|
|
131
|
+
title = "Success";
|
|
132
|
+
}
|
|
133
|
+
if (!text) {
|
|
134
|
+
text = "Operation was successful";
|
|
135
|
+
}
|
|
136
|
+
var toast = Swal.mixin({
|
|
137
|
+
toast: true,
|
|
138
|
+
position: "top-end",
|
|
139
|
+
showConfirmButton: false,
|
|
140
|
+
timer: 3000,
|
|
141
|
+
timerProgressBar: true,
|
|
142
|
+
});
|
|
143
|
+
toast.fire({
|
|
144
|
+
title: title,
|
|
145
|
+
text: text,
|
|
146
|
+
icon: "success",
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
return Alerts;
|
|
150
|
+
}());
|
|
222
151
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
icon: "warning",
|
|
253
|
-
confirmButtonText: "OK"
|
|
254
|
-
});
|
|
255
|
-
};
|
|
256
|
-
Alerts.Error = function (text) {
|
|
257
|
-
Swal.fire({
|
|
258
|
-
title: "Error",
|
|
259
|
-
text: text,
|
|
260
|
-
icon: "error",
|
|
261
|
-
confirmButtonText: "OK"
|
|
262
|
-
});
|
|
263
|
-
};
|
|
264
|
-
Alerts.NotImplemented = function () {
|
|
265
|
-
this.Warning("Not Implemented Yet");
|
|
266
|
-
};
|
|
267
|
-
;
|
|
268
|
-
Alerts.ErrorOccurred = function () {
|
|
269
|
-
this.Error("Sorry, an unexpected error occurred");
|
|
270
|
-
};
|
|
271
|
-
;
|
|
272
|
-
Alerts.AreYouSure = function (text, title, confirmButtonText, cancelButtonText, successAction, cancelAction) {
|
|
273
|
-
if (typeof title == "undefined" || title == null)
|
|
274
|
-
title = "Are you sure?";
|
|
275
|
-
Swal.fire({
|
|
276
|
-
title: title,
|
|
277
|
-
text: text,
|
|
278
|
-
icon: 'warning',
|
|
279
|
-
confirmButtonText: confirmButtonText,
|
|
280
|
-
cancelButtonText: cancelButtonText,
|
|
281
|
-
showCancelButton: true
|
|
282
|
-
})
|
|
283
|
-
.then(function (result) {
|
|
284
|
-
if (result.value) {
|
|
285
|
-
if (successAction) {
|
|
286
|
-
successAction();
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
// result.dismiss can be 'cancel', 'overlay', 'close', and 'timer'
|
|
290
|
-
else if (result.dismiss == Swal.DismissReason.cancel || result.dismiss == Swal.DismissReason.close) {
|
|
291
|
-
if (cancelAction) {
|
|
292
|
-
cancelAction();
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
};
|
|
297
|
-
;
|
|
298
|
-
Alerts.Success = function (text, title, successAction) {
|
|
299
|
-
if (typeof title == "undefined" || title == null)
|
|
300
|
-
title = "Success";
|
|
301
|
-
if (!text) {
|
|
302
|
-
text = "Operation was successful";
|
|
303
|
-
}
|
|
304
|
-
Swal.fire({
|
|
305
|
-
title: title,
|
|
306
|
-
text: text,
|
|
307
|
-
icon: "success",
|
|
308
|
-
confirmButtonText: "OK"
|
|
309
|
-
})
|
|
310
|
-
.then(function () {
|
|
311
|
-
if (successAction) {
|
|
312
|
-
successAction();
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
};
|
|
316
|
-
Alerts.Cancel = function (text) {
|
|
317
|
-
if (!text) {
|
|
318
|
-
text = "Operation has been cancled";
|
|
319
|
-
}
|
|
320
|
-
Swal.fire({
|
|
321
|
-
title: 'Cancelled',
|
|
322
|
-
text: text,
|
|
323
|
-
icon: "info"
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
//Notifications
|
|
327
|
-
Alerts.NotificationCancel = function (text, title) {
|
|
328
|
-
if (typeof title == "undefined" || title == null) {
|
|
329
|
-
title = "Canceled";
|
|
330
|
-
}
|
|
331
|
-
if (!text) {
|
|
332
|
-
text = "Operation has been canceled";
|
|
333
|
-
}
|
|
334
|
-
var toast = Swal.mixin({
|
|
335
|
-
toast: true,
|
|
336
|
-
position: 'top-end',
|
|
337
|
-
showConfirmButton: false,
|
|
338
|
-
timer: 3000,
|
|
339
|
-
timerProgressBar: true
|
|
340
|
-
});
|
|
341
|
-
toast.fire({
|
|
342
|
-
title: title,
|
|
343
|
-
text: text,
|
|
344
|
-
icon: "info"
|
|
345
|
-
});
|
|
346
|
-
};
|
|
347
|
-
Alerts.NotificationSuccess = function (text, title) {
|
|
348
|
-
if (typeof title == "undefined" || title == null) {
|
|
349
|
-
title = "Success";
|
|
350
|
-
}
|
|
351
|
-
if (!text) {
|
|
352
|
-
text = "Operation was successful";
|
|
353
|
-
}
|
|
354
|
-
var toast = Swal.mixin({
|
|
355
|
-
toast: true,
|
|
356
|
-
position: 'top-end',
|
|
357
|
-
showConfirmButton: false,
|
|
358
|
-
timer: 3000,
|
|
359
|
-
timerProgressBar: true
|
|
360
|
-
});
|
|
361
|
-
toast.fire({
|
|
362
|
-
title: title,
|
|
363
|
-
text: text,
|
|
364
|
-
icon: "success",
|
|
365
|
-
});
|
|
366
|
-
};
|
|
367
|
-
return Alerts;
|
|
368
|
-
}());
|
|
152
|
+
/*
|
|
153
|
+
<file>
|
|
154
|
+
Authors:
|
|
155
|
+
Vadim Osovitny
|
|
156
|
+
|
|
157
|
+
Created:
|
|
158
|
+
4 Mar 2020
|
|
159
|
+
|
|
160
|
+
Version:
|
|
161
|
+
1.0
|
|
162
|
+
|
|
163
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
164
|
+
</file>
|
|
165
|
+
*/
|
|
166
|
+
var Utils = /** @class */ (function () {
|
|
167
|
+
function Utils() {
|
|
168
|
+
}
|
|
169
|
+
Utils.GetValueByNameInQS = function (name) {
|
|
170
|
+
return Utils.GetValueByName(location.search, name);
|
|
171
|
+
};
|
|
172
|
+
Utils.GetValueByName = function (url, name) {
|
|
173
|
+
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
174
|
+
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
|
|
175
|
+
return results === null
|
|
176
|
+
? ""
|
|
177
|
+
: decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
178
|
+
};
|
|
179
|
+
return Utils;
|
|
180
|
+
}());
|
|
369
181
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
182
|
+
/*
|
|
183
|
+
<file>
|
|
184
|
+
Authors:
|
|
185
|
+
Vadim Osovitny
|
|
186
|
+
|
|
187
|
+
Created:
|
|
188
|
+
17 Jun 2018
|
|
189
|
+
|
|
190
|
+
Version:
|
|
191
|
+
1.0
|
|
192
|
+
|
|
193
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
194
|
+
</file>
|
|
195
|
+
*/
|
|
196
|
+
var BaseGoService = /** @class */ (function () {
|
|
197
|
+
function BaseGoService(route, router) {
|
|
198
|
+
this.route = route;
|
|
199
|
+
this.router = router;
|
|
200
|
+
}
|
|
201
|
+
BaseGoService.prototype.locationReload = function () {
|
|
202
|
+
//this.router.navigate([this.route.url]);
|
|
203
|
+
window.location.reload();
|
|
204
|
+
};
|
|
205
|
+
return BaseGoService;
|
|
206
|
+
}());
|
|
207
|
+
BaseGoService.decorators = [
|
|
208
|
+
{ type: core.Injectable }
|
|
209
|
+
];
|
|
210
|
+
BaseGoService.ctorParameters = function () { return [
|
|
211
|
+
{ type: router.ActivatedRoute },
|
|
212
|
+
{ type: router.Router }
|
|
213
|
+
]; };
|
|
397
214
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
215
|
+
/*! *****************************************************************************
|
|
216
|
+
Copyright (c) Microsoft Corporation.
|
|
217
|
+
|
|
218
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
219
|
+
purpose with or without fee is hereby granted.
|
|
220
|
+
|
|
221
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
222
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
223
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
224
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
225
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
226
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
227
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
228
|
+
***************************************************************************** */
|
|
229
|
+
/* global Reflect, Promise */
|
|
230
|
+
var extendStatics = function (d, b) {
|
|
231
|
+
extendStatics = Object.setPrototypeOf ||
|
|
232
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
233
|
+
function (d, b) { for (var p in b)
|
|
234
|
+
if (b.hasOwnProperty(p))
|
|
235
|
+
d[p] = b[p]; };
|
|
236
|
+
return extendStatics(d, b);
|
|
237
|
+
};
|
|
238
|
+
function __extends(d, b) {
|
|
239
|
+
extendStatics(d, b);
|
|
240
|
+
function __() { this.constructor = d; }
|
|
241
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
242
|
+
}
|
|
243
|
+
var __assign = function () {
|
|
244
|
+
__assign = Object.assign || function __assign(t) {
|
|
245
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
246
|
+
s = arguments[i];
|
|
247
|
+
for (var p in s)
|
|
248
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
249
|
+
t[p] = s[p];
|
|
250
|
+
}
|
|
251
|
+
return t;
|
|
252
|
+
};
|
|
253
|
+
return __assign.apply(this, arguments);
|
|
254
|
+
};
|
|
255
|
+
function __rest(s, e) {
|
|
256
|
+
var t = {};
|
|
257
|
+
for (var p in s)
|
|
258
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
259
|
+
t[p] = s[p];
|
|
260
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
261
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
262
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
263
|
+
t[p[i]] = s[p[i]];
|
|
264
|
+
}
|
|
265
|
+
return t;
|
|
266
|
+
}
|
|
267
|
+
function __decorate(decorators, target, key, desc) {
|
|
268
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
269
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
270
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
271
|
+
else
|
|
272
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
273
|
+
if (d = decorators[i])
|
|
274
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
275
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
276
|
+
}
|
|
277
|
+
function __param(paramIndex, decorator) {
|
|
278
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
279
|
+
}
|
|
280
|
+
function __metadata(metadataKey, metadataValue) {
|
|
281
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
282
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
283
|
+
}
|
|
284
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
285
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
286
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
287
|
+
function fulfilled(value) { try {
|
|
288
|
+
step(generator.next(value));
|
|
289
|
+
}
|
|
290
|
+
catch (e) {
|
|
291
|
+
reject(e);
|
|
292
|
+
} }
|
|
293
|
+
function rejected(value) { try {
|
|
294
|
+
step(generator["throw"](value));
|
|
295
|
+
}
|
|
296
|
+
catch (e) {
|
|
297
|
+
reject(e);
|
|
298
|
+
} }
|
|
299
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
300
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
function __generator(thisArg, body) {
|
|
304
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
305
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
306
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
307
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
308
|
+
function step(op) {
|
|
309
|
+
if (f)
|
|
310
|
+
throw new TypeError("Generator is already executing.");
|
|
311
|
+
while (_)
|
|
312
|
+
try {
|
|
313
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
314
|
+
return t;
|
|
315
|
+
if (y = 0, t)
|
|
316
|
+
op = [op[0] & 2, t.value];
|
|
317
|
+
switch (op[0]) {
|
|
318
|
+
case 0:
|
|
319
|
+
case 1:
|
|
320
|
+
t = op;
|
|
321
|
+
break;
|
|
322
|
+
case 4:
|
|
323
|
+
_.label++;
|
|
324
|
+
return { value: op[1], done: false };
|
|
325
|
+
case 5:
|
|
326
|
+
_.label++;
|
|
327
|
+
y = op[1];
|
|
328
|
+
op = [0];
|
|
329
|
+
continue;
|
|
330
|
+
case 7:
|
|
331
|
+
op = _.ops.pop();
|
|
332
|
+
_.trys.pop();
|
|
333
|
+
continue;
|
|
334
|
+
default:
|
|
335
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
336
|
+
_ = 0;
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
340
|
+
_.label = op[1];
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
344
|
+
_.label = t[1];
|
|
345
|
+
t = op;
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
if (t && _.label < t[2]) {
|
|
349
|
+
_.label = t[2];
|
|
350
|
+
_.ops.push(op);
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
if (t[2])
|
|
354
|
+
_.ops.pop();
|
|
355
|
+
_.trys.pop();
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
op = body.call(thisArg, _);
|
|
359
|
+
}
|
|
360
|
+
catch (e) {
|
|
361
|
+
op = [6, e];
|
|
362
|
+
y = 0;
|
|
363
|
+
}
|
|
364
|
+
finally {
|
|
365
|
+
f = t = 0;
|
|
366
|
+
}
|
|
367
|
+
if (op[0] & 5)
|
|
368
|
+
throw op[1];
|
|
369
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
373
|
+
if (k2 === undefined)
|
|
374
|
+
k2 = k;
|
|
375
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
376
|
+
}) : (function (o, m, k, k2) {
|
|
377
|
+
if (k2 === undefined)
|
|
378
|
+
k2 = k;
|
|
379
|
+
o[k2] = m[k];
|
|
380
|
+
});
|
|
381
|
+
function __exportStar(m, exports) {
|
|
382
|
+
for (var p in m)
|
|
383
|
+
if (p !== "default" && !exports.hasOwnProperty(p))
|
|
384
|
+
__createBinding(exports, m, p);
|
|
385
|
+
}
|
|
386
|
+
function __values(o) {
|
|
387
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
388
|
+
if (m)
|
|
389
|
+
return m.call(o);
|
|
390
|
+
if (o && typeof o.length === "number")
|
|
391
|
+
return {
|
|
392
|
+
next: function () {
|
|
393
|
+
if (o && i >= o.length)
|
|
394
|
+
o = void 0;
|
|
395
|
+
return { value: o && o[i++], done: !o };
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
399
|
+
}
|
|
400
|
+
function __read(o, n) {
|
|
401
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
402
|
+
if (!m)
|
|
403
|
+
return o;
|
|
404
|
+
var i = m.call(o), r, ar = [], e;
|
|
405
|
+
try {
|
|
406
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
407
|
+
ar.push(r.value);
|
|
408
|
+
}
|
|
409
|
+
catch (error) {
|
|
410
|
+
e = { error: error };
|
|
411
|
+
}
|
|
412
|
+
finally {
|
|
413
|
+
try {
|
|
414
|
+
if (r && !r.done && (m = i["return"]))
|
|
415
|
+
m.call(i);
|
|
416
|
+
}
|
|
417
|
+
finally {
|
|
418
|
+
if (e)
|
|
419
|
+
throw e.error;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return ar;
|
|
423
|
+
}
|
|
424
|
+
function __spread() {
|
|
425
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
426
|
+
ar = ar.concat(__read(arguments[i]));
|
|
427
|
+
return ar;
|
|
428
|
+
}
|
|
429
|
+
function __spreadArrays() {
|
|
430
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
431
|
+
s += arguments[i].length;
|
|
432
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
433
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
434
|
+
r[k] = a[j];
|
|
435
|
+
return r;
|
|
436
|
+
}
|
|
437
|
+
;
|
|
438
|
+
function __await(v) {
|
|
439
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
440
|
+
}
|
|
441
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
442
|
+
if (!Symbol.asyncIterator)
|
|
443
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
444
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
445
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
446
|
+
function verb(n) { if (g[n])
|
|
447
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
448
|
+
function resume(n, v) { try {
|
|
449
|
+
step(g[n](v));
|
|
450
|
+
}
|
|
451
|
+
catch (e) {
|
|
452
|
+
settle(q[0][3], e);
|
|
453
|
+
} }
|
|
454
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
455
|
+
function fulfill(value) { resume("next", value); }
|
|
456
|
+
function reject(value) { resume("throw", value); }
|
|
457
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
458
|
+
resume(q[0][0], q[0][1]); }
|
|
459
|
+
}
|
|
460
|
+
function __asyncDelegator(o) {
|
|
461
|
+
var i, p;
|
|
462
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
463
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
464
|
+
}
|
|
465
|
+
function __asyncValues(o) {
|
|
466
|
+
if (!Symbol.asyncIterator)
|
|
467
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
468
|
+
var m = o[Symbol.asyncIterator], i;
|
|
469
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
470
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
471
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
472
|
+
}
|
|
473
|
+
function __makeTemplateObject(cooked, raw) {
|
|
474
|
+
if (Object.defineProperty) {
|
|
475
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
cooked.raw = raw;
|
|
479
|
+
}
|
|
480
|
+
return cooked;
|
|
481
|
+
}
|
|
482
|
+
;
|
|
483
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
484
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
485
|
+
}) : function (o, v) {
|
|
486
|
+
o["default"] = v;
|
|
487
|
+
};
|
|
488
|
+
function __importStar(mod) {
|
|
489
|
+
if (mod && mod.__esModule)
|
|
490
|
+
return mod;
|
|
491
|
+
var result = {};
|
|
492
|
+
if (mod != null)
|
|
493
|
+
for (var k in mod)
|
|
494
|
+
if (Object.hasOwnProperty.call(mod, k))
|
|
495
|
+
__createBinding(result, mod, k);
|
|
496
|
+
__setModuleDefault(result, mod);
|
|
497
|
+
return result;
|
|
498
|
+
}
|
|
499
|
+
function __importDefault(mod) {
|
|
500
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
501
|
+
}
|
|
502
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
503
|
+
if (!privateMap.has(receiver)) {
|
|
504
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
505
|
+
}
|
|
506
|
+
return privateMap.get(receiver);
|
|
507
|
+
}
|
|
508
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
509
|
+
if (!privateMap.has(receiver)) {
|
|
510
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
511
|
+
}
|
|
512
|
+
privateMap.set(receiver, value);
|
|
513
|
+
return value;
|
|
514
|
+
}
|
|
430
515
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
516
|
+
/*
|
|
517
|
+
<file>
|
|
518
|
+
Authors:
|
|
519
|
+
Vadim Osovitny
|
|
520
|
+
|
|
521
|
+
Created:
|
|
522
|
+
13 Nov 2017
|
|
523
|
+
|
|
524
|
+
Version:
|
|
525
|
+
1.0
|
|
526
|
+
|
|
527
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
528
|
+
</file>
|
|
529
|
+
*/
|
|
530
|
+
var BaseApiService = /** @class */ (function () {
|
|
531
|
+
function BaseApiService(http) {
|
|
532
|
+
this.http = http;
|
|
533
|
+
this.baseUrl = "";
|
|
534
|
+
}
|
|
535
|
+
BaseApiService.prototype.serializeParams = function (data) {
|
|
536
|
+
return data ? ('?' + $.param(data)) : '';
|
|
537
|
+
};
|
|
538
|
+
//api
|
|
539
|
+
BaseApiService.prototype.get = function (action, data, responseType) {
|
|
540
|
+
if (!responseType) {
|
|
541
|
+
responseType = 'json';
|
|
542
|
+
}
|
|
543
|
+
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
544
|
+
return this.http.get(url, { responseType: responseType }).pipe(operators.map(function (res) { return res; }));
|
|
545
|
+
};
|
|
546
|
+
BaseApiService.prototype.post = function (action, data, responseType) {
|
|
547
|
+
if (!responseType) {
|
|
548
|
+
responseType = 'text';
|
|
549
|
+
}
|
|
550
|
+
var url = this.baseUrl + "/" + action;
|
|
551
|
+
return this.http.post(url, data, { responseType: responseType });
|
|
552
|
+
};
|
|
553
|
+
BaseApiService.prototype.postQS = function (action, data, responseType) {
|
|
554
|
+
if (!responseType) {
|
|
555
|
+
responseType = 'text';
|
|
556
|
+
}
|
|
557
|
+
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
558
|
+
return this.http.post(url, null, { responseType: responseType });
|
|
559
|
+
};
|
|
560
|
+
BaseApiService.prototype.delete = function (action, data, responseType) {
|
|
561
|
+
if (!responseType) {
|
|
562
|
+
responseType = 'text';
|
|
563
|
+
}
|
|
564
|
+
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
565
|
+
return this.http.delete(url, { responseType: responseType });
|
|
566
|
+
};
|
|
567
|
+
//gets
|
|
568
|
+
BaseApiService.prototype.getById = function (id) {
|
|
569
|
+
return this.get('getById', { id: id });
|
|
570
|
+
};
|
|
571
|
+
BaseApiService.prototype.getAll = function (data) {
|
|
572
|
+
return this.get('getall', data).pipe(operators.map(function (res) { return res; }));
|
|
573
|
+
};
|
|
574
|
+
BaseApiService.prototype.getJsonFile = function (fileName, jsonUrl, jsonVersion) {
|
|
575
|
+
if (!jsonUrl) {
|
|
576
|
+
jsonUrl = "/dist/jsons";
|
|
577
|
+
}
|
|
578
|
+
if (!jsonVersion) {
|
|
579
|
+
jsonVersion = "1.0";
|
|
580
|
+
}
|
|
581
|
+
var url = jsonUrl + "/" + fileName + '?' + jsonVersion;
|
|
582
|
+
return this.http.get(url).pipe(operators.map(function (res) { return res; }));
|
|
583
|
+
};
|
|
584
|
+
BaseApiService.prototype.getNewGuid = function () {
|
|
585
|
+
var url = this.baseUrl + "/getNewGuid";
|
|
586
|
+
return this.http.get(url, { responseType: 'text' });
|
|
587
|
+
};
|
|
588
|
+
return BaseApiService;
|
|
589
|
+
}());
|
|
590
|
+
BaseApiService.decorators = [
|
|
591
|
+
{ type: core.Injectable }
|
|
592
|
+
];
|
|
593
|
+
BaseApiService.ctorParameters = function () { return [
|
|
594
|
+
{ type: http.HttpClient }
|
|
595
|
+
]; };
|
|
511
596
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
AppContextService.prototype.isUserSignedIn = function () {
|
|
566
|
-
return window.__context_isUserSignedIn;
|
|
567
|
-
};
|
|
568
|
-
AppContextService.prototype.isUserAdmin = function () {
|
|
569
|
-
return window.__context_isUserAdmin;
|
|
570
|
-
};
|
|
571
|
-
AppContextService.ctorParameters = function () { return [
|
|
572
|
-
{ type: http.HttpClient }
|
|
573
|
-
]; };
|
|
574
|
-
AppContextService = __decorate([
|
|
575
|
-
core.Injectable()
|
|
576
|
-
], AppContextService);
|
|
577
|
-
return AppContextService;
|
|
578
|
-
}(BaseApiService));
|
|
597
|
+
var AppContextService = /** @class */ (function (_super) {
|
|
598
|
+
__extends(AppContextService, _super);
|
|
599
|
+
function AppContextService(http) {
|
|
600
|
+
var _this = _super.call(this, http) || this;
|
|
601
|
+
_this.http = http;
|
|
602
|
+
_this.current = null;
|
|
603
|
+
_this.successes = [];
|
|
604
|
+
_this.subscription = null;
|
|
605
|
+
_this.baseUrl = "/api/appContext";
|
|
606
|
+
return _this;
|
|
607
|
+
}
|
|
608
|
+
AppContextService.prototype.getCurrent = function (success) {
|
|
609
|
+
var _this = this;
|
|
610
|
+
if (typeof success == "undefined") {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (this.current != null) {
|
|
614
|
+
success(this.current);
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
this.successes.push(success);
|
|
618
|
+
if (this.subscription != null) {
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
this.subscription = this.get("GetCurrentContext", null).subscribe(function (data) {
|
|
622
|
+
_this.dataReceived(data);
|
|
623
|
+
}, function (e) { });
|
|
624
|
+
};
|
|
625
|
+
AppContextService.prototype.dataReceived = function (data) {
|
|
626
|
+
this.current = data;
|
|
627
|
+
for (var i = 0; i < this.successes.length; i++) {
|
|
628
|
+
var success = this.successes[i];
|
|
629
|
+
success(data);
|
|
630
|
+
}
|
|
631
|
+
this.successes = [];
|
|
632
|
+
this.subscription.unsubscribe();
|
|
633
|
+
this.subscription = null;
|
|
634
|
+
this.current = null;
|
|
635
|
+
};
|
|
636
|
+
AppContextService.prototype.isUserSignedIn = function () {
|
|
637
|
+
return window.__context_isUserSignedIn;
|
|
638
|
+
};
|
|
639
|
+
AppContextService.prototype.isUserAdmin = function () {
|
|
640
|
+
return window.__context_isUserAdmin;
|
|
641
|
+
};
|
|
642
|
+
return AppContextService;
|
|
643
|
+
}(BaseApiService));
|
|
644
|
+
AppContextService.decorators = [
|
|
645
|
+
{ type: core.Injectable }
|
|
646
|
+
];
|
|
647
|
+
AppContextService.ctorParameters = function () { return [
|
|
648
|
+
{ type: http.HttpClient }
|
|
649
|
+
]; };
|
|
579
650
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
</file>
|
|
593
|
-
*/
|
|
594
|
-
var BaseComponent = /** @class */ (function () {
|
|
595
|
-
function BaseComponent() {
|
|
596
|
-
}
|
|
597
|
-
BaseComponent.prototype.getQSId = function () {
|
|
598
|
-
var id = Utils.GetValueByNameInQS("id");
|
|
599
|
-
if (typeof id === 'undefined' || id == '')
|
|
600
|
-
return null;
|
|
601
|
-
return id;
|
|
602
|
-
};
|
|
603
|
-
BaseComponent.prototype.showLoading = function () {
|
|
604
|
-
var panelLoading = $('#pnlLoading');
|
|
605
|
-
panelLoading.show();
|
|
606
|
-
};
|
|
607
|
-
BaseComponent.prototype.hideLoading = function () {
|
|
608
|
-
var panelLoading = $('#pnlLoading');
|
|
609
|
-
panelLoading.hide();
|
|
610
|
-
};
|
|
611
|
-
BaseComponent.prototype.handleError = function (e) {
|
|
612
|
-
this.hideLoading();
|
|
613
|
-
Alerts.ErrorOccurred();
|
|
614
|
-
};
|
|
615
|
-
return BaseComponent;
|
|
616
|
-
}());
|
|
651
|
+
var AnatolyCoreModule = /** @class */ (function () {
|
|
652
|
+
function AnatolyCoreModule() {
|
|
653
|
+
}
|
|
654
|
+
return AnatolyCoreModule;
|
|
655
|
+
}());
|
|
656
|
+
AnatolyCoreModule.decorators = [
|
|
657
|
+
{ type: core.NgModule, args: [{
|
|
658
|
+
declarations: [],
|
|
659
|
+
imports: [common.CommonModule],
|
|
660
|
+
providers: [AppContextService],
|
|
661
|
+
},] }
|
|
662
|
+
];
|
|
617
663
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
};
|
|
661
|
-
BaseEditComponent.prototype.getFormValue = function (name) {
|
|
662
|
-
return this.formGroup.controls[name].value;
|
|
663
|
-
};
|
|
664
|
-
BaseEditComponent.prototype.setFormValue = function (name, value) {
|
|
665
|
-
this.formGroup.controls[name].setValue(value);
|
|
666
|
-
};
|
|
667
|
-
BaseEditComponent.prototype.getFormGroupValue = function (groupName, name) {
|
|
668
|
-
return this.formGroup.controls[groupName].get(name).value;
|
|
669
|
-
};
|
|
670
|
-
BaseEditComponent.prototype.setFormGroupValue = function (groupName, name, value) {
|
|
671
|
-
this.formGroup.controls[groupName].get(name).setValue(value);
|
|
672
|
-
};
|
|
673
|
-
__decorate([
|
|
674
|
-
core.Input()
|
|
675
|
-
], BaseEditComponent.prototype, "formGroup", void 0);
|
|
676
|
-
__decorate([
|
|
677
|
-
core.Input()
|
|
678
|
-
], BaseEditComponent.prototype, "formSubmitted", void 0);
|
|
679
|
-
return BaseEditComponent;
|
|
680
|
-
}(BaseComponent));
|
|
664
|
+
var BaseGridReadService = /** @class */ (function (_super) {
|
|
665
|
+
__extends(BaseGridReadService, _super);
|
|
666
|
+
function BaseGridReadService(http) {
|
|
667
|
+
var _this = _super.call(this, []) || this;
|
|
668
|
+
_this.http = http;
|
|
669
|
+
_this.baseReadUrl = "";
|
|
670
|
+
_this.data = [];
|
|
671
|
+
return _this;
|
|
672
|
+
}
|
|
673
|
+
BaseGridReadService.prototype.serializeParams = function (data) {
|
|
674
|
+
return data ? ('?' + $.param(data)) : '';
|
|
675
|
+
};
|
|
676
|
+
BaseGridReadService.prototype.read = function (params, success, error) {
|
|
677
|
+
var _this = this;
|
|
678
|
+
if (this.data.length) {
|
|
679
|
+
return _super.prototype.next.call(this, this.data);
|
|
680
|
+
}
|
|
681
|
+
var url = this.baseReadUrl;
|
|
682
|
+
if (typeof params === 'undefined') {
|
|
683
|
+
params = this.savedReadParams;
|
|
684
|
+
}
|
|
685
|
+
if (params) {
|
|
686
|
+
url = this.baseReadUrl + ("" + this.serializeParams(params));
|
|
687
|
+
this.savedReadParams = params;
|
|
688
|
+
}
|
|
689
|
+
this.http.get(url).pipe(operators.map(function (res) { return res; })).subscribe(function (data) {
|
|
690
|
+
_super.prototype.next.call(_this, data);
|
|
691
|
+
if (success)
|
|
692
|
+
success();
|
|
693
|
+
}, function (e) {
|
|
694
|
+
if (error)
|
|
695
|
+
error(e);
|
|
696
|
+
});
|
|
697
|
+
};
|
|
698
|
+
return BaseGridReadService;
|
|
699
|
+
}(rxjs.BehaviorSubject));
|
|
700
|
+
BaseGridReadService.decorators = [
|
|
701
|
+
{ type: core.Injectable }
|
|
702
|
+
];
|
|
703
|
+
BaseGridReadService.ctorParameters = function () { return [
|
|
704
|
+
{ type: http.HttpClient }
|
|
705
|
+
]; };
|
|
681
706
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
707
|
+
var BaseGridEditService = /** @class */ (function (_super) {
|
|
708
|
+
__extends(BaseGridEditService, _super);
|
|
709
|
+
function BaseGridEditService(http) {
|
|
710
|
+
var _this = _super.call(this, http) || this;
|
|
711
|
+
_this.http = http;
|
|
712
|
+
_this.baseUrl = "";
|
|
713
|
+
return _this;
|
|
714
|
+
}
|
|
715
|
+
BaseGridEditService.prototype.reset = function () {
|
|
716
|
+
this.data = [];
|
|
717
|
+
};
|
|
718
|
+
BaseGridEditService.prototype.resetItem = function (dataItem) {
|
|
719
|
+
if (!dataItem) {
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
//find orignal data item
|
|
723
|
+
var originalDataItem = this.data.find(function (item) { return item.Id === dataItem.Id; });
|
|
724
|
+
//revert changes
|
|
725
|
+
Object.assign(originalDataItem, dataItem);
|
|
726
|
+
_super.prototype.next.call(this, this.data);
|
|
727
|
+
};
|
|
728
|
+
BaseGridEditService.prototype.save = function (data, isNew, sucess) {
|
|
729
|
+
var _this = this;
|
|
730
|
+
var action = isNew ? 'add' : 'update';
|
|
731
|
+
this.reset();
|
|
732
|
+
this.post(action, data).subscribe(function () {
|
|
733
|
+
}, function () {
|
|
734
|
+
_this.read();
|
|
735
|
+
}, function () {
|
|
736
|
+
_this.read();
|
|
737
|
+
if (sucess)
|
|
738
|
+
sucess();
|
|
739
|
+
});
|
|
740
|
+
};
|
|
741
|
+
BaseGridEditService.prototype.remove = function (data, sucess) {
|
|
742
|
+
var _this = this;
|
|
743
|
+
this.reset();
|
|
744
|
+
this.post('remove', data).subscribe(function () {
|
|
745
|
+
}, function () {
|
|
746
|
+
_this.read();
|
|
747
|
+
}, function () {
|
|
748
|
+
_this.read();
|
|
749
|
+
if (sucess)
|
|
750
|
+
sucess();
|
|
751
|
+
});
|
|
752
|
+
};
|
|
753
|
+
BaseGridEditService.prototype.post = function (action, data) {
|
|
754
|
+
var url = this.baseUrl + ("" + action + this.serializeParams(data));
|
|
755
|
+
return this.http.post(url, data).pipe(operators.map(function (res) { return res; }));
|
|
756
|
+
};
|
|
757
|
+
return BaseGridEditService;
|
|
758
|
+
}(BaseGridReadService));
|
|
759
|
+
BaseGridEditService.decorators = [
|
|
760
|
+
{ type: core.Injectable }
|
|
761
|
+
];
|
|
762
|
+
BaseGridEditService.ctorParameters = function () { return [
|
|
763
|
+
{ type: http.HttpClient }
|
|
764
|
+
]; };
|
|
715
765
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
case 'minlength':
|
|
763
|
-
messages.push(thing + " must be at least " + state.errors['minlength'].requiredLength + " characters");
|
|
764
|
-
break;
|
|
765
|
-
case 'pattern':
|
|
766
|
-
messages.push(thing + " contains illegal characters");
|
|
767
|
-
break;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
return messages;
|
|
773
|
-
};
|
|
774
|
-
return ValidationSummaryComponent;
|
|
775
|
-
}(BaseEditComponent));
|
|
766
|
+
var BillingApiService = /** @class */ (function (_super) {
|
|
767
|
+
__extends(BillingApiService, _super);
|
|
768
|
+
function BillingApiService(http) {
|
|
769
|
+
var _this = _super.call(this, http) || this;
|
|
770
|
+
_this.http = http;
|
|
771
|
+
_this.baseUrl += 'billing/';
|
|
772
|
+
return _this;
|
|
773
|
+
}
|
|
774
|
+
BillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
|
|
775
|
+
this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
|
|
776
|
+
.subscribe(function (data) { }, function (e) {
|
|
777
|
+
if (error)
|
|
778
|
+
error();
|
|
779
|
+
}, function () {
|
|
780
|
+
if (success)
|
|
781
|
+
success();
|
|
782
|
+
});
|
|
783
|
+
};
|
|
784
|
+
BillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
|
|
785
|
+
this.postQS('cancelRequestedSubscription', null)
|
|
786
|
+
.subscribe(function (data) { }, function (e) {
|
|
787
|
+
if (error)
|
|
788
|
+
error();
|
|
789
|
+
}, function () {
|
|
790
|
+
if (success)
|
|
791
|
+
success();
|
|
792
|
+
});
|
|
793
|
+
};
|
|
794
|
+
BillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
|
|
795
|
+
this.postQS('buyAccess', { requestedPlan: requestedPlan })
|
|
796
|
+
.subscribe(function (data) { }, function (e) {
|
|
797
|
+
if (error)
|
|
798
|
+
error();
|
|
799
|
+
}, function () {
|
|
800
|
+
if (success)
|
|
801
|
+
success();
|
|
802
|
+
});
|
|
803
|
+
};
|
|
804
|
+
return BillingApiService;
|
|
805
|
+
}(BaseApiService));
|
|
806
|
+
BillingApiService.decorators = [
|
|
807
|
+
{ type: core.Injectable }
|
|
808
|
+
];
|
|
809
|
+
BillingApiService.ctorParameters = function () { return [
|
|
810
|
+
{ type: http.HttpClient }
|
|
811
|
+
]; };
|
|
776
812
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
+
/*
|
|
814
|
+
<file>
|
|
815
|
+
Authors:
|
|
816
|
+
Vadim Osovitny
|
|
817
|
+
|
|
818
|
+
Created:
|
|
819
|
+
4 Mar 2020
|
|
820
|
+
|
|
821
|
+
Version:
|
|
822
|
+
1.0
|
|
823
|
+
|
|
824
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
825
|
+
</file>
|
|
826
|
+
*/
|
|
827
|
+
var AnatolyDataModule = /** @class */ (function () {
|
|
828
|
+
function AnatolyDataModule() {
|
|
829
|
+
}
|
|
830
|
+
return AnatolyDataModule;
|
|
831
|
+
}());
|
|
832
|
+
AnatolyDataModule.decorators = [
|
|
833
|
+
{ type: core.NgModule, args: [{
|
|
834
|
+
imports: [
|
|
835
|
+
common.CommonModule,
|
|
836
|
+
http.HttpClientModule,
|
|
837
|
+
http.HttpClientXsrfModule,
|
|
838
|
+
http.HttpClientJsonpModule
|
|
839
|
+
],
|
|
840
|
+
exports: [
|
|
841
|
+
common.CommonModule,
|
|
842
|
+
http.HttpClientModule,
|
|
843
|
+
http.HttpClientXsrfModule,
|
|
844
|
+
http.HttpClientJsonpModule
|
|
845
|
+
],
|
|
846
|
+
declarations: [],
|
|
847
|
+
providers: []
|
|
848
|
+
},] }
|
|
849
|
+
];
|
|
813
850
|
|
|
814
|
-
|
|
815
|
-
<file>
|
|
816
|
-
Authors:
|
|
817
|
-
Vadim Osovitny
|
|
818
|
-
|
|
819
|
-
Created:
|
|
820
|
-
6 Dec 2017
|
|
821
|
-
|
|
822
|
-
Version:
|
|
823
|
-
1.0
|
|
824
|
-
|
|
825
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
826
|
-
</file>
|
|
827
|
-
*/
|
|
828
|
-
var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
829
|
-
__extends(ItemValidationSummaryComponent, _super);
|
|
830
|
-
function ItemValidationSummaryComponent() {
|
|
831
|
-
return _super.call(this) || this;
|
|
832
|
-
}
|
|
833
|
-
__decorate([
|
|
834
|
-
core.Input()
|
|
835
|
-
], ItemValidationSummaryComponent.prototype, "controlName", void 0);
|
|
836
|
-
__decorate([
|
|
837
|
-
core.Input()
|
|
838
|
-
], ItemValidationSummaryComponent.prototype, "controlTitle", void 0);
|
|
839
|
-
ItemValidationSummaryComponent = __decorate([
|
|
840
|
-
core.Component({
|
|
841
|
-
selector: 'anatoly-item-validation-summary',
|
|
842
|
-
template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(controlName), controlTitle)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n"
|
|
843
|
-
})
|
|
844
|
-
], ItemValidationSummaryComponent);
|
|
845
|
-
return ItemValidationSummaryComponent;
|
|
846
|
-
}(ValidationSummaryComponent));
|
|
851
|
+
// Services
|
|
847
852
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
853
|
+
/*
|
|
854
|
+
<file>
|
|
855
|
+
Authors:
|
|
856
|
+
Vadim Osovitny
|
|
857
|
+
|
|
858
|
+
Created:
|
|
859
|
+
1 Jun 2018
|
|
860
|
+
|
|
861
|
+
Version:
|
|
862
|
+
1.0
|
|
863
|
+
|
|
864
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
865
|
+
</file>
|
|
866
|
+
*/
|
|
867
|
+
var SubscribePlanButtonComponent = /** @class */ (function () {
|
|
868
|
+
function SubscribePlanButtonComponent(appcontext) {
|
|
869
|
+
this.appcontext = appcontext;
|
|
870
|
+
this.contextUpdated = false;
|
|
871
|
+
this.isUserSignedIn = false;
|
|
872
|
+
this.currentPlan = 0;
|
|
873
|
+
this.currentPlanTitle = '';
|
|
874
|
+
this.requestedPlan = 0;
|
|
875
|
+
this.requestedPlanTitle = '';
|
|
876
|
+
}
|
|
877
|
+
SubscribePlanButtonComponent.prototype.ngOnInit = function () {
|
|
878
|
+
var _this = this;
|
|
879
|
+
if (!this.appcontext.isUserSignedIn()) {
|
|
880
|
+
this.contextUpdated = true;
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
this.appcontext.getCurrent(function (current) {
|
|
884
|
+
_this.isUserSignedIn = current.isUserSignedIn;
|
|
885
|
+
if (_this.isUserSignedIn) {
|
|
886
|
+
_this.currentPlan = current.account.billingPlan;
|
|
887
|
+
_this.currentPlanTitle = current.account.billingPlanAsString;
|
|
888
|
+
_this.requestedPlan = current.account.requestedBillingPlan;
|
|
889
|
+
_this.requestedPlanTitle = current.account.requestedBillingPlanAsString;
|
|
890
|
+
}
|
|
891
|
+
_this.contextUpdated = true;
|
|
892
|
+
});
|
|
893
|
+
};
|
|
894
|
+
return SubscribePlanButtonComponent;
|
|
895
|
+
}());
|
|
896
|
+
SubscribePlanButtonComponent.decorators = [
|
|
897
|
+
{ type: core.Component, args: [{
|
|
898
|
+
selector: 'anatoly-subscribe-plan-button',
|
|
899
|
+
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"
|
|
900
|
+
},] }
|
|
901
|
+
];
|
|
902
|
+
SubscribePlanButtonComponent.ctorParameters = function () { return [
|
|
903
|
+
{ type: AppContextService }
|
|
904
|
+
]; };
|
|
905
|
+
SubscribePlanButtonComponent.propDecorators = {
|
|
906
|
+
plan: [{ type: core.Input }],
|
|
907
|
+
plantitle: [{ type: core.Input }]
|
|
908
|
+
};
|
|
879
909
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
}, 300);
|
|
927
|
-
};
|
|
928
|
-
BaseHtmlEditorComponent.prototype.onInitialized = function () {
|
|
929
|
-
var actions = this.afterInitializedActions;
|
|
930
|
-
//Clear actions
|
|
931
|
-
this.afterInitializedActions = [];
|
|
932
|
-
if (actions) {
|
|
933
|
-
for (var i = 0; i < actions.length; i++) {
|
|
934
|
-
actions[i]();
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
};
|
|
938
|
-
BaseHtmlEditorComponent.prototype.getEditor = function () {
|
|
939
|
-
if (this.froalaEditor)
|
|
940
|
-
return this.froalaEditor.getEditor();
|
|
941
|
-
return null;
|
|
942
|
-
};
|
|
943
|
-
//Public Funcs
|
|
944
|
-
BaseHtmlEditorComponent.prototype.doAfterInitialized = function (action) {
|
|
945
|
-
var that = this;
|
|
946
|
-
if (!this.froalaEditorInitialized) {
|
|
947
|
-
this.afterInitializedActions.push(function () { action(that); });
|
|
948
|
-
}
|
|
949
|
-
else {
|
|
950
|
-
action(that);
|
|
951
|
-
}
|
|
952
|
-
};
|
|
953
|
-
BaseHtmlEditorComponent.prototype.initializeControl = function (control) {
|
|
954
|
-
this.froalaEditor = control;
|
|
955
|
-
this.froalaEditor.initialize();
|
|
956
|
-
};
|
|
957
|
-
BaseHtmlEditorComponent.prototype.setUploadParams = function (uploadType, uploadParentId) {
|
|
958
|
-
this.doAfterInitialized(function (that) {
|
|
959
|
-
var editor = that.getEditor();
|
|
960
|
-
if (typeof (editor) == "undefined" || editor == null) {
|
|
961
|
-
return;
|
|
962
|
-
}
|
|
963
|
-
editor.opts.imageUploadParams.uploadType = uploadType;
|
|
964
|
-
editor.opts.imageUploadParams.uploadParentId = uploadParentId;
|
|
965
|
-
});
|
|
966
|
-
};
|
|
967
|
-
__decorate([
|
|
968
|
-
core.Input()
|
|
969
|
-
], BaseHtmlEditorComponent.prototype, "editorLabelText", void 0);
|
|
970
|
-
__decorate([
|
|
971
|
-
core.Input()
|
|
972
|
-
], BaseHtmlEditorComponent.prototype, "editorOptions", void 0);
|
|
973
|
-
return BaseHtmlEditorComponent;
|
|
974
|
-
}(BaseEditComponent));
|
|
910
|
+
/*
|
|
911
|
+
<file>
|
|
912
|
+
Authors:
|
|
913
|
+
Vadim Osovitny
|
|
914
|
+
|
|
915
|
+
Created:
|
|
916
|
+
12 Nov 2017
|
|
917
|
+
|
|
918
|
+
Version:
|
|
919
|
+
1.0
|
|
920
|
+
|
|
921
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
922
|
+
</file>
|
|
923
|
+
*/
|
|
924
|
+
// Services
|
|
925
|
+
var UpgradePlanButtonComponent = /** @class */ (function () {
|
|
926
|
+
function UpgradePlanButtonComponent(api) {
|
|
927
|
+
this.api = api;
|
|
928
|
+
}
|
|
929
|
+
UpgradePlanButtonComponent.prototype.onUpgradePlan = function () {
|
|
930
|
+
var text = "Current plan: " + this.currentplantitle + " New plan: " + this.requestedplantitle;
|
|
931
|
+
var that = this;
|
|
932
|
+
Alerts.AreYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', function () {
|
|
933
|
+
that.api.requestNewSubscription(that.requestedplan, function () {
|
|
934
|
+
Alerts.Success('Your request for changing plan has been sent.', null, function () {
|
|
935
|
+
window.location.reload();
|
|
936
|
+
});
|
|
937
|
+
});
|
|
938
|
+
});
|
|
939
|
+
};
|
|
940
|
+
return UpgradePlanButtonComponent;
|
|
941
|
+
}());
|
|
942
|
+
UpgradePlanButtonComponent.decorators = [
|
|
943
|
+
{ type: core.Component, args: [{
|
|
944
|
+
selector: 'anatoly-upgrade-plan-button',
|
|
945
|
+
template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
|
|
946
|
+
},] }
|
|
947
|
+
];
|
|
948
|
+
UpgradePlanButtonComponent.ctorParameters = function () { return [
|
|
949
|
+
{ type: BillingApiService }
|
|
950
|
+
]; };
|
|
951
|
+
UpgradePlanButtonComponent.propDecorators = {
|
|
952
|
+
currentplantitle: [{ type: core.Input }],
|
|
953
|
+
requestedplan: [{ type: core.Input }],
|
|
954
|
+
requestedplantitle: [{ type: core.Input }]
|
|
955
|
+
};
|
|
975
956
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
957
|
+
/*
|
|
958
|
+
<file>
|
|
959
|
+
Authors:
|
|
960
|
+
Vadim Osovitny
|
|
961
|
+
Anatoly Osovitny
|
|
962
|
+
|
|
963
|
+
Created:
|
|
964
|
+
14 Aug 2018
|
|
965
|
+
|
|
966
|
+
Version:
|
|
967
|
+
1.0
|
|
968
|
+
|
|
969
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
970
|
+
</file>
|
|
971
|
+
*/
|
|
972
|
+
var BuyAccessButtonComponent = /** @class */ (function () {
|
|
973
|
+
function BuyAccessButtonComponent(appcontext, api) {
|
|
974
|
+
this.appcontext = appcontext;
|
|
975
|
+
this.api = api;
|
|
976
|
+
this.contextUpdated = false;
|
|
977
|
+
this.isUserSignedIn = false;
|
|
978
|
+
this.currentPlan = 0;
|
|
979
|
+
this.currentPlanTitle = '';
|
|
980
|
+
}
|
|
981
|
+
BuyAccessButtonComponent.prototype.ngOnInit = function () {
|
|
982
|
+
var _this = this;
|
|
983
|
+
if (!this.appcontext.isUserSignedIn()) {
|
|
984
|
+
this.contextUpdated = true;
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
this.appcontext.getCurrent(function (current) {
|
|
988
|
+
_this.isUserSignedIn = current.isUserSignedIn;
|
|
989
|
+
if (_this.isUserSignedIn) {
|
|
990
|
+
_this.currentPlan = current.account.billingPlan;
|
|
991
|
+
_this.currentPlanTitle = current.account.billingPlanAsString;
|
|
992
|
+
}
|
|
993
|
+
_this.contextUpdated = true;
|
|
994
|
+
});
|
|
995
|
+
};
|
|
996
|
+
BuyAccessButtonComponent.prototype.onBuyPlan = function () {
|
|
997
|
+
var text = "Requested plan: " + this.plantitle + " ";
|
|
998
|
+
var that = this;
|
|
999
|
+
Alerts.AreYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
|
|
1000
|
+
that.api.buyAccess(that.plan, function () {
|
|
1001
|
+
Alerts.Success('Access Granted', null, function () {
|
|
1002
|
+
window.location.reload();
|
|
1003
|
+
});
|
|
1004
|
+
});
|
|
1005
|
+
});
|
|
1006
|
+
};
|
|
1007
|
+
return BuyAccessButtonComponent;
|
|
1008
|
+
}());
|
|
1009
|
+
BuyAccessButtonComponent.decorators = [
|
|
1010
|
+
{ type: core.Component, args: [{
|
|
1011
|
+
selector: 'anatoly-buyaccess-button',
|
|
1012
|
+
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"
|
|
1013
|
+
},] }
|
|
1014
|
+
];
|
|
1015
|
+
BuyAccessButtonComponent.ctorParameters = function () { return [
|
|
1016
|
+
{ type: AppContextService },
|
|
1017
|
+
{ type: BillingApiService }
|
|
1018
|
+
]; };
|
|
1019
|
+
BuyAccessButtonComponent.propDecorators = {
|
|
1020
|
+
plan: [{ type: core.Input }],
|
|
1021
|
+
plantitle: [{ type: core.Input }]
|
|
1022
|
+
};
|
|
1020
1023
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
], FormsHtmlEditorComponent.prototype, "editorFormKey", void 0);
|
|
1051
|
-
FormsHtmlEditorComponent = __decorate([
|
|
1052
|
-
core.Component({
|
|
1053
|
-
selector: 'anatoly-forms-html-editor',
|
|
1054
|
-
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 [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 [controlName]=\"editorFormKey\"\r\n [controlTitle]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n"
|
|
1055
|
-
})
|
|
1056
|
-
], FormsHtmlEditorComponent);
|
|
1057
|
-
return FormsHtmlEditorComponent;
|
|
1058
|
-
}(BaseHtmlEditorComponent));
|
|
1024
|
+
/*
|
|
1025
|
+
<file>
|
|
1026
|
+
Authors:
|
|
1027
|
+
Vadim Osovitny
|
|
1028
|
+
|
|
1029
|
+
Created:
|
|
1030
|
+
4 Jul 2018
|
|
1031
|
+
|
|
1032
|
+
Version:
|
|
1033
|
+
1.0
|
|
1034
|
+
|
|
1035
|
+
Copyright (c) 2018 Osovitny Inc. All rights reserved.
|
|
1036
|
+
</file>
|
|
1037
|
+
*/
|
|
1038
|
+
var SignInButtonComponent = /** @class */ (function () {
|
|
1039
|
+
function SignInButtonComponent() {
|
|
1040
|
+
}
|
|
1041
|
+
return SignInButtonComponent;
|
|
1042
|
+
}());
|
|
1043
|
+
SignInButtonComponent.decorators = [
|
|
1044
|
+
{ type: core.Component, args: [{
|
|
1045
|
+
selector: 'anatoly-signin-button',
|
|
1046
|
+
template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
|
|
1047
|
+
},] }
|
|
1048
|
+
];
|
|
1049
|
+
SignInButtonComponent.ctorParameters = function () { return []; };
|
|
1050
|
+
SignInButtonComponent.propDecorators = {
|
|
1051
|
+
classbtn: [{ type: core.Input }]
|
|
1052
|
+
};
|
|
1059
1053
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
http.HttpClientJsonpModule,
|
|
1089
|
-
//FroalaEditorModule.forRoot(),
|
|
1090
|
-
//FroalaViewModule.forRoot(),
|
|
1091
|
-
FroalaEditorModuleWithProviders,
|
|
1092
|
-
FroalaViewModuleWithProviders,
|
|
1093
|
-
kendoAngularGrid.GridModule,
|
|
1094
|
-
kendoAngularPopup.PopupModule,
|
|
1095
|
-
kendoAngularButtons.ButtonsModule,
|
|
1096
|
-
kendoAngularDropdowns.DropDownsModule
|
|
1097
|
-
],
|
|
1098
|
-
exports: [
|
|
1099
|
-
ItemValidationSummaryComponent,
|
|
1100
|
-
FormValidationSummaryComponent,
|
|
1101
|
-
ContentHeaderComponent,
|
|
1102
|
-
HtmlEditorComponent,
|
|
1103
|
-
FormsHtmlEditorComponent
|
|
1104
|
-
],
|
|
1105
|
-
declarations: [
|
|
1106
|
-
ItemValidationSummaryComponent,
|
|
1107
|
-
FormValidationSummaryComponent,
|
|
1108
|
-
ContentHeaderComponent,
|
|
1109
|
-
HtmlEditorComponent,
|
|
1110
|
-
FormsHtmlEditorComponent
|
|
1111
|
-
],
|
|
1112
|
-
providers: [
|
|
1113
|
-
AppContextService
|
|
1114
|
-
],
|
|
1115
|
-
schemas: []
|
|
1116
|
-
})
|
|
1117
|
-
], AnatolyCoreModule);
|
|
1118
|
-
return AnatolyCoreModule;
|
|
1119
|
-
}());
|
|
1054
|
+
/*
|
|
1055
|
+
<file>
|
|
1056
|
+
Authors:
|
|
1057
|
+
Vadim Osovitny
|
|
1058
|
+
|
|
1059
|
+
Created:
|
|
1060
|
+
4 Jul 2018
|
|
1061
|
+
|
|
1062
|
+
Version:
|
|
1063
|
+
1.0
|
|
1064
|
+
|
|
1065
|
+
Copyright (c) 2018 Osovitny Inc. All rights reserved.
|
|
1066
|
+
</file>
|
|
1067
|
+
*/
|
|
1068
|
+
var SignUpButtonComponent = /** @class */ (function () {
|
|
1069
|
+
function SignUpButtonComponent() {
|
|
1070
|
+
}
|
|
1071
|
+
return SignUpButtonComponent;
|
|
1072
|
+
}());
|
|
1073
|
+
SignUpButtonComponent.decorators = [
|
|
1074
|
+
{ type: core.Component, args: [{
|
|
1075
|
+
selector: "anatoly-signup-button",
|
|
1076
|
+
template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n"
|
|
1077
|
+
},] }
|
|
1078
|
+
];
|
|
1079
|
+
SignUpButtonComponent.propDecorators = {
|
|
1080
|
+
classbtn: [{ type: core.Input }]
|
|
1081
|
+
};
|
|
1120
1082
|
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
this.postQS('cancelRequestedSubscription', null)
|
|
1151
|
-
.subscribe(function (data) { }, function (e) { if (error)
|
|
1152
|
-
error(); }, function () { if (success)
|
|
1153
|
-
success(); });
|
|
1154
|
-
};
|
|
1155
|
-
BillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
|
|
1156
|
-
this.postQS('buyAccess', { requestedPlan: requestedPlan })
|
|
1157
|
-
.subscribe(function (data) { }, function (e) { if (error)
|
|
1158
|
-
error(); }, function () { if (success)
|
|
1159
|
-
success(); });
|
|
1160
|
-
};
|
|
1161
|
-
BillingApiService.ctorParameters = function () { return [
|
|
1162
|
-
{ type: http.HttpClient }
|
|
1163
|
-
]; };
|
|
1164
|
-
BillingApiService = __decorate([
|
|
1165
|
-
core.Injectable()
|
|
1166
|
-
], BillingApiService);
|
|
1167
|
-
return BillingApiService;
|
|
1168
|
-
}(BaseApiService));
|
|
1083
|
+
/*
|
|
1084
|
+
<file>
|
|
1085
|
+
Authors:
|
|
1086
|
+
Vadim Osovitny
|
|
1087
|
+
|
|
1088
|
+
Created:
|
|
1089
|
+
4 Jul 2018
|
|
1090
|
+
|
|
1091
|
+
Version:
|
|
1092
|
+
1.0
|
|
1093
|
+
|
|
1094
|
+
Copyright (c) 2018 Osovitny Inc. All rights reserved.
|
|
1095
|
+
</file>
|
|
1096
|
+
*/
|
|
1097
|
+
var SignOutButtonComponent = /** @class */ (function () {
|
|
1098
|
+
function SignOutButtonComponent() {
|
|
1099
|
+
}
|
|
1100
|
+
return SignOutButtonComponent;
|
|
1101
|
+
}());
|
|
1102
|
+
SignOutButtonComponent.decorators = [
|
|
1103
|
+
{ type: core.Component, args: [{
|
|
1104
|
+
selector: 'anatoly-signout-button',
|
|
1105
|
+
template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
|
|
1106
|
+
},] }
|
|
1107
|
+
];
|
|
1108
|
+
SignOutButtonComponent.ctorParameters = function () { return []; };
|
|
1109
|
+
SignOutButtonComponent.propDecorators = {
|
|
1110
|
+
classbtn: [{ type: core.Input }]
|
|
1111
|
+
};
|
|
1169
1112
|
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
});
|
|
1208
|
-
};
|
|
1209
|
-
BuyAccessButtonComponent.prototype.onBuyPlan = function () {
|
|
1210
|
-
var text = "Requested plan: " + this.plantitle + " ";
|
|
1211
|
-
var that = this;
|
|
1212
|
-
Alerts.AreYouSure(text, "Buying access", "Confirm change", "Cancel", function () {
|
|
1213
|
-
that.api.buyAccess(that.plan, function () {
|
|
1214
|
-
Alerts.Success("Access Granted", null, function () {
|
|
1215
|
-
window.location.reload();
|
|
1216
|
-
});
|
|
1217
|
-
});
|
|
1218
|
-
});
|
|
1219
|
-
};
|
|
1220
|
-
BuyAccessButtonComponent.ctorParameters = function () { return [
|
|
1221
|
-
{ type: AppContextService },
|
|
1222
|
-
{ type: BillingApiService }
|
|
1223
|
-
]; };
|
|
1224
|
-
__decorate([
|
|
1225
|
-
core.Input()
|
|
1226
|
-
], BuyAccessButtonComponent.prototype, "plan", void 0);
|
|
1227
|
-
__decorate([
|
|
1228
|
-
core.Input()
|
|
1229
|
-
], BuyAccessButtonComponent.prototype, "plantitle", void 0);
|
|
1230
|
-
BuyAccessButtonComponent = __decorate([
|
|
1231
|
-
core.Component({
|
|
1232
|
-
selector: "anatoly-buyaccess-button",
|
|
1233
|
-
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"
|
|
1234
|
-
})
|
|
1235
|
-
], BuyAccessButtonComponent);
|
|
1236
|
-
return BuyAccessButtonComponent;
|
|
1237
|
-
}());
|
|
1113
|
+
/*
|
|
1114
|
+
<file>
|
|
1115
|
+
Authors:
|
|
1116
|
+
Vadim Osovitny
|
|
1117
|
+
|
|
1118
|
+
Created:
|
|
1119
|
+
28 Aug 2018
|
|
1120
|
+
|
|
1121
|
+
Version:
|
|
1122
|
+
1.0
|
|
1123
|
+
|
|
1124
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1125
|
+
</file>
|
|
1126
|
+
*/
|
|
1127
|
+
var BaseComponent = /** @class */ (function () {
|
|
1128
|
+
function BaseComponent() {
|
|
1129
|
+
}
|
|
1130
|
+
BaseComponent.prototype.getQSId = function () {
|
|
1131
|
+
var id = Utils.GetValueByNameInQS('id');
|
|
1132
|
+
if (typeof id === 'undefined' || id === '')
|
|
1133
|
+
return null;
|
|
1134
|
+
return id;
|
|
1135
|
+
};
|
|
1136
|
+
BaseComponent.prototype.showLoading = function () {
|
|
1137
|
+
var panelLoading = $('#pnlLoading');
|
|
1138
|
+
panelLoading.show();
|
|
1139
|
+
};
|
|
1140
|
+
BaseComponent.prototype.hideLoading = function () {
|
|
1141
|
+
var panelLoading = $('#pnlLoading');
|
|
1142
|
+
panelLoading.hide();
|
|
1143
|
+
};
|
|
1144
|
+
BaseComponent.prototype.handleError = function (e) {
|
|
1145
|
+
this.hideLoading();
|
|
1146
|
+
Alerts.ErrorOccurred();
|
|
1147
|
+
};
|
|
1148
|
+
return BaseComponent;
|
|
1149
|
+
}());
|
|
1238
1150
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
__decorate([
|
|
1287
|
-
core.Input()
|
|
1288
|
-
], SubscribePlanButtonComponent.prototype, "plantitle", void 0);
|
|
1289
|
-
SubscribePlanButtonComponent = __decorate([
|
|
1290
|
-
core.Component({
|
|
1291
|
-
selector: 'anatoly-subscribe-plan-button',
|
|
1292
|
-
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"
|
|
1293
|
-
})
|
|
1294
|
-
], SubscribePlanButtonComponent);
|
|
1295
|
-
return SubscribePlanButtonComponent;
|
|
1296
|
-
}());
|
|
1151
|
+
var BaseEditComponent = /** @class */ (function (_super) {
|
|
1152
|
+
__extends(BaseEditComponent, _super);
|
|
1153
|
+
function BaseEditComponent() {
|
|
1154
|
+
var _this = _super.call(this) || this;
|
|
1155
|
+
_this.formSubmitted = false;
|
|
1156
|
+
return _this;
|
|
1157
|
+
}
|
|
1158
|
+
BaseEditComponent.prototype.isActionAdding = function () {
|
|
1159
|
+
var id = Utils.GetValueByNameInQS('id');
|
|
1160
|
+
if (typeof id === 'undefined' || id === '')
|
|
1161
|
+
return true;
|
|
1162
|
+
return false;
|
|
1163
|
+
};
|
|
1164
|
+
BaseEditComponent.prototype.getEntityId = function () {
|
|
1165
|
+
return this.getQSId();
|
|
1166
|
+
};
|
|
1167
|
+
BaseEditComponent.prototype.isItemInvalid = function (name) {
|
|
1168
|
+
if (typeof name === 'undefined' || name === '') {
|
|
1169
|
+
return false;
|
|
1170
|
+
}
|
|
1171
|
+
if (!this.formGroup) {
|
|
1172
|
+
return false;
|
|
1173
|
+
}
|
|
1174
|
+
if (this.formGroup.get(name)) {
|
|
1175
|
+
return ((this.formSubmitted && this.formGroup.get(name).invalid) ||
|
|
1176
|
+
(this.formGroup.get(name).touched && this.formGroup.get(name).invalid));
|
|
1177
|
+
}
|
|
1178
|
+
return false;
|
|
1179
|
+
};
|
|
1180
|
+
BaseEditComponent.prototype.getFormValue = function (name) {
|
|
1181
|
+
return this.formGroup.controls[name].value;
|
|
1182
|
+
};
|
|
1183
|
+
BaseEditComponent.prototype.setFormValue = function (name, value) {
|
|
1184
|
+
this.formGroup.controls[name].setValue(value);
|
|
1185
|
+
};
|
|
1186
|
+
BaseEditComponent.prototype.getFormGroupValue = function (groupName, name) {
|
|
1187
|
+
return this.formGroup.controls[groupName].get(name).value;
|
|
1188
|
+
};
|
|
1189
|
+
BaseEditComponent.prototype.setFormGroupValue = function (groupName, name, value) {
|
|
1190
|
+
this.formGroup.controls[groupName].get(name).setValue(value);
|
|
1191
|
+
};
|
|
1192
|
+
return BaseEditComponent;
|
|
1193
|
+
}(BaseComponent));
|
|
1194
|
+
BaseEditComponent.propDecorators = {
|
|
1195
|
+
formGroup: [{ type: core.Input }],
|
|
1196
|
+
formSubmitted: [{ type: core.Input }]
|
|
1197
|
+
};
|
|
1297
1198
|
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
], UpgradePlanButtonComponent);
|
|
1345
|
-
return UpgradePlanButtonComponent;
|
|
1346
|
-
}());
|
|
1199
|
+
var ValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1200
|
+
__extends(ValidationSummaryComponent, _super);
|
|
1201
|
+
function ValidationSummaryComponent() {
|
|
1202
|
+
return _super.call(this) || this;
|
|
1203
|
+
}
|
|
1204
|
+
ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
|
|
1205
|
+
var _this = this;
|
|
1206
|
+
var messages = [];
|
|
1207
|
+
Object.keys(this.formGroup.controls).forEach(function (k) {
|
|
1208
|
+
var control = _this.formGroup.controls[k];
|
|
1209
|
+
if (control.controls != null) {
|
|
1210
|
+
Object.keys(control.controls).forEach(function (k) {
|
|
1211
|
+
var child = control.controls[k];
|
|
1212
|
+
_this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
else {
|
|
1216
|
+
_this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
return messages;
|
|
1220
|
+
};
|
|
1221
|
+
ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
|
|
1222
|
+
var thing = state.path || thingName;
|
|
1223
|
+
var messages = [];
|
|
1224
|
+
if (state.errors) {
|
|
1225
|
+
for (var errorName in state.errors) {
|
|
1226
|
+
if (state.errors.hasOwnProperty(errorName)) {
|
|
1227
|
+
switch (errorName) {
|
|
1228
|
+
case "required":
|
|
1229
|
+
messages.push(thing + " is required");
|
|
1230
|
+
break;
|
|
1231
|
+
case "minlength":
|
|
1232
|
+
messages.push(thing + " must be at least " + state.errors["minlength"].requiredLength + " characters");
|
|
1233
|
+
break;
|
|
1234
|
+
case "pattern":
|
|
1235
|
+
messages.push(thing + " contains illegal characters");
|
|
1236
|
+
break;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
return messages;
|
|
1242
|
+
};
|
|
1243
|
+
return ValidationSummaryComponent;
|
|
1244
|
+
}(BaseEditComponent));
|
|
1347
1245
|
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
|
|
1372
|
-
})
|
|
1373
|
-
], SignInButtonComponent);
|
|
1374
|
-
return SignInButtonComponent;
|
|
1375
|
-
}());
|
|
1246
|
+
var FormValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1247
|
+
__extends(FormValidationSummaryComponent, _super);
|
|
1248
|
+
function FormValidationSummaryComponent() {
|
|
1249
|
+
var _this = _super.call(this) || this;
|
|
1250
|
+
_this.isVisible = false;
|
|
1251
|
+
return _this;
|
|
1252
|
+
}
|
|
1253
|
+
FormValidationSummaryComponent.prototype.getErrors = function () {
|
|
1254
|
+
var messages = this.getFormValidationMessages();
|
|
1255
|
+
return messages;
|
|
1256
|
+
};
|
|
1257
|
+
return FormValidationSummaryComponent;
|
|
1258
|
+
}(ValidationSummaryComponent));
|
|
1259
|
+
FormValidationSummaryComponent.decorators = [
|
|
1260
|
+
{ type: core.Component, args: [{
|
|
1261
|
+
selector: "anatoly-form-validation-summary",
|
|
1262
|
+
template: "<div class=\"callout callout-danger\" *ngIf=\"isVisible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\">\r\n <span class=\"help-block\" style=\"color: white;\">{{ error }}</span>\r\n </p>\r\n</div>\r\n"
|
|
1263
|
+
},] }
|
|
1264
|
+
];
|
|
1265
|
+
FormValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1266
|
+
FormValidationSummaryComponent.propDecorators = {
|
|
1267
|
+
isVisible: [{ type: core.Input }]
|
|
1268
|
+
};
|
|
1376
1269
|
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
core.Input()
|
|
1396
|
-
], SignOutButtonComponent.prototype, "classbtn", void 0);
|
|
1397
|
-
SignOutButtonComponent = __decorate([
|
|
1398
|
-
core.Component({
|
|
1399
|
-
selector: 'anatoly-signout-button',
|
|
1400
|
-
template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
|
|
1401
|
-
})
|
|
1402
|
-
], SignOutButtonComponent);
|
|
1403
|
-
return SignOutButtonComponent;
|
|
1404
|
-
}());
|
|
1270
|
+
var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1271
|
+
__extends(ItemValidationSummaryComponent, _super);
|
|
1272
|
+
function ItemValidationSummaryComponent() {
|
|
1273
|
+
return _super.call(this) || this;
|
|
1274
|
+
}
|
|
1275
|
+
return ItemValidationSummaryComponent;
|
|
1276
|
+
}(ValidationSummaryComponent));
|
|
1277
|
+
ItemValidationSummaryComponent.decorators = [
|
|
1278
|
+
{ type: core.Component, args: [{
|
|
1279
|
+
selector: "anatoly-item-validation-summary",
|
|
1280
|
+
template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(controlName), controlTitle)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n"
|
|
1281
|
+
},] }
|
|
1282
|
+
];
|
|
1283
|
+
ItemValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1284
|
+
ItemValidationSummaryComponent.propDecorators = {
|
|
1285
|
+
controlName: [{ type: core.Input }],
|
|
1286
|
+
controlTitle: [{ type: core.Input }]
|
|
1287
|
+
};
|
|
1405
1288
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1289
|
+
var DefaultEditorOptions = {
|
|
1290
|
+
placeholderText: 'Edit Your Content Here',
|
|
1291
|
+
charCounterCount: true,
|
|
1292
|
+
heightMin: 100,
|
|
1293
|
+
toolbarInline: false,
|
|
1294
|
+
toolbarButtons: {
|
|
1295
|
+
'moreText': {
|
|
1296
|
+
'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript',
|
|
1297
|
+
'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle']
|
|
1298
|
+
},
|
|
1299
|
+
'moreParagraph': {
|
|
1300
|
+
'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify',
|
|
1301
|
+
'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
|
|
1302
|
+
},
|
|
1303
|
+
'moreRich': {
|
|
1304
|
+
'buttons': ['insertLink', 'insertImage', 'insertTable', 'emoticons', 'fontAwesome',
|
|
1305
|
+
'specialCharacters', 'embedly']
|
|
1306
|
+
},
|
|
1307
|
+
'moreMisc': {
|
|
1308
|
+
'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
|
|
1309
|
+
'align': 'right',
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
/*
|
|
1313
|
+
Upload:
|
|
1314
|
+
https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
|
|
1315
|
+
*/
|
|
1316
|
+
imageUploadURL: '/api/HtmlEditor/UploadImage',
|
|
1317
|
+
imageAllowedTypes: ['jpeg', 'jpg', 'png'],
|
|
1318
|
+
imageUploadParams: { uploadType: '', uploadParentId: '' }
|
|
1319
|
+
};
|
|
1434
1320
|
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1321
|
+
var BaseHtmlEditorComponent = /** @class */ (function (_super) {
|
|
1322
|
+
__extends(BaseHtmlEditorComponent, _super);
|
|
1323
|
+
function BaseHtmlEditorComponent() {
|
|
1324
|
+
var _this = _super.call(this) || this;
|
|
1325
|
+
_this.froalaEditorInitialized = false;
|
|
1326
|
+
_this.afterInitializedActions = [];
|
|
1327
|
+
//Inputs
|
|
1328
|
+
_this.editorLabelText = 'Html';
|
|
1329
|
+
_this.editorOptions = {};
|
|
1330
|
+
return _this;
|
|
1331
|
+
}
|
|
1332
|
+
BaseHtmlEditorComponent.prototype.ngOnInit = function () {
|
|
1333
|
+
var opt = this.editorOptions;
|
|
1334
|
+
if (typeof this.editorOptions == "string") {
|
|
1335
|
+
opt = JSON.parse(this.editorOptions);
|
|
1336
|
+
}
|
|
1337
|
+
var newOptions = $.extend({}, DefaultEditorOptions, opt);
|
|
1338
|
+
var key = window.__froalaEditor_Key;
|
|
1339
|
+
if (key) {
|
|
1340
|
+
newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
|
|
1341
|
+
}
|
|
1342
|
+
if (newOptions.events && newOptions.events.initialized) {
|
|
1343
|
+
newOptions.events.initialized.overridden = false;
|
|
1344
|
+
}
|
|
1345
|
+
this.options = newOptions;
|
|
1346
|
+
};
|
|
1347
|
+
BaseHtmlEditorComponent.prototype.ngAfterViewInit = function () {
|
|
1348
|
+
var that = this;
|
|
1349
|
+
setTimeout(function () {
|
|
1350
|
+
that.froalaEditorInitialized = true;
|
|
1351
|
+
that.onInitialized();
|
|
1352
|
+
}, 300);
|
|
1353
|
+
};
|
|
1354
|
+
BaseHtmlEditorComponent.prototype.onInitialized = function () {
|
|
1355
|
+
var actions = this.afterInitializedActions;
|
|
1356
|
+
//Clear actions
|
|
1357
|
+
this.afterInitializedActions = [];
|
|
1358
|
+
if (actions) {
|
|
1359
|
+
for (var i = 0; i < actions.length; i++) {
|
|
1360
|
+
actions[i]();
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
};
|
|
1364
|
+
BaseHtmlEditorComponent.prototype.getEditor = function () {
|
|
1365
|
+
if (this.froalaEditor)
|
|
1366
|
+
return this.froalaEditor.getEditor();
|
|
1367
|
+
return null;
|
|
1368
|
+
};
|
|
1369
|
+
//Public Funcs
|
|
1370
|
+
BaseHtmlEditorComponent.prototype.doAfterInitialized = function (action) {
|
|
1371
|
+
var that = this;
|
|
1372
|
+
if (!this.froalaEditorInitialized) {
|
|
1373
|
+
this.afterInitializedActions.push(function () { action(that); });
|
|
1374
|
+
}
|
|
1375
|
+
else {
|
|
1376
|
+
action(that);
|
|
1377
|
+
}
|
|
1378
|
+
};
|
|
1379
|
+
BaseHtmlEditorComponent.prototype.initializeControl = function (control) {
|
|
1380
|
+
this.froalaEditor = control;
|
|
1381
|
+
this.froalaEditor.initialize();
|
|
1382
|
+
};
|
|
1383
|
+
BaseHtmlEditorComponent.prototype.setUploadParams = function (uploadType, uploadParentId) {
|
|
1384
|
+
this.doAfterInitialized(function (that) {
|
|
1385
|
+
var editor = that.getEditor();
|
|
1386
|
+
if (typeof (editor) == "undefined" || editor == null) {
|
|
1387
|
+
return;
|
|
1388
|
+
}
|
|
1389
|
+
editor.opts.imageUploadParams.uploadType = uploadType;
|
|
1390
|
+
editor.opts.imageUploadParams.uploadParentId = uploadParentId;
|
|
1391
|
+
});
|
|
1392
|
+
};
|
|
1393
|
+
return BaseHtmlEditorComponent;
|
|
1394
|
+
}(BaseEditComponent));
|
|
1395
|
+
BaseHtmlEditorComponent.propDecorators = {
|
|
1396
|
+
editorLabelText: [{ type: core.Input }],
|
|
1397
|
+
editorOptions: [{ type: core.Input }]
|
|
1398
|
+
};
|
|
1470
1399
|
|
|
1471
|
-
|
|
1400
|
+
var HtmlEditorComponent = /** @class */ (function (_super) {
|
|
1401
|
+
__extends(HtmlEditorComponent, _super);
|
|
1402
|
+
function HtmlEditorComponent() {
|
|
1403
|
+
return _super.call(this) || this;
|
|
1404
|
+
}
|
|
1405
|
+
HtmlEditorComponent.prototype.setHtml = function (content) {
|
|
1406
|
+
this.doAfterInitialized(function (that) {
|
|
1407
|
+
var editor = that.getEditor();
|
|
1408
|
+
if (typeof (editor) == "undefined" || editor == null) {
|
|
1409
|
+
return;
|
|
1410
|
+
}
|
|
1411
|
+
editor.html.set(content);
|
|
1412
|
+
});
|
|
1413
|
+
};
|
|
1414
|
+
HtmlEditorComponent.prototype.getHtml = function () {
|
|
1415
|
+
var editor = this.getEditor();
|
|
1416
|
+
if (typeof (editor) == "undefined" || editor == null) {
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
return editor.html.get(false);
|
|
1420
|
+
};
|
|
1421
|
+
return HtmlEditorComponent;
|
|
1422
|
+
}(BaseHtmlEditorComponent));
|
|
1423
|
+
HtmlEditorComponent.decorators = [
|
|
1424
|
+
{ type: core.Component, args: [{
|
|
1425
|
+
selector: 'anatoly-html-editor',
|
|
1426
|
+
template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>"
|
|
1427
|
+
},] }
|
|
1428
|
+
];
|
|
1429
|
+
HtmlEditorComponent.ctorParameters = function () { return []; };
|
|
1472
1430
|
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
AnatolyIdentityModule
|
|
1498
|
-
],
|
|
1499
|
-
exports: [
|
|
1500
|
-
common.CommonModule,
|
|
1501
|
-
http.HttpClientModule,
|
|
1502
|
-
http.HttpClientXsrfModule,
|
|
1503
|
-
http.HttpClientJsonpModule,
|
|
1504
|
-
SubscribePlanButtonComponent,
|
|
1505
|
-
UpgradePlanButtonComponent,
|
|
1506
|
-
BuyAccessButtonComponent
|
|
1507
|
-
],
|
|
1508
|
-
declarations: [
|
|
1509
|
-
SubscribePlanButtonComponent,
|
|
1510
|
-
UpgradePlanButtonComponent,
|
|
1511
|
-
BuyAccessButtonComponent
|
|
1512
|
-
],
|
|
1513
|
-
providers: [
|
|
1514
|
-
BillingApiService
|
|
1515
|
-
]
|
|
1516
|
-
})
|
|
1517
|
-
], AnatolyBillingModule);
|
|
1518
|
-
return AnatolyBillingModule;
|
|
1519
|
-
}());
|
|
1431
|
+
var FormsHtmlEditorComponent = /** @class */ (function (_super) {
|
|
1432
|
+
__extends(FormsHtmlEditorComponent, _super);
|
|
1433
|
+
function FormsHtmlEditorComponent() {
|
|
1434
|
+
var _this = _super.call(this) || this;
|
|
1435
|
+
_this.editorFormKey = 'html';
|
|
1436
|
+
return _this;
|
|
1437
|
+
}
|
|
1438
|
+
FormsHtmlEditorComponent.prototype.setFormValueAfterInitialized = function (name, value) {
|
|
1439
|
+
this.doAfterInitialized(function (that) {
|
|
1440
|
+
that.setFormValue(name, value);
|
|
1441
|
+
});
|
|
1442
|
+
};
|
|
1443
|
+
return FormsHtmlEditorComponent;
|
|
1444
|
+
}(BaseHtmlEditorComponent));
|
|
1445
|
+
FormsHtmlEditorComponent.decorators = [
|
|
1446
|
+
{ type: core.Component, args: [{
|
|
1447
|
+
selector: 'anatoly-forms-html-editor',
|
|
1448
|
+
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 [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 [controlName]=\"editorFormKey\"\r\n [controlTitle]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n"
|
|
1449
|
+
},] }
|
|
1450
|
+
];
|
|
1451
|
+
FormsHtmlEditorComponent.ctorParameters = function () { return []; };
|
|
1452
|
+
FormsHtmlEditorComponent.propDecorators = {
|
|
1453
|
+
editorFormKey: [{ type: core.Input }]
|
|
1454
|
+
};
|
|
1520
1455
|
|
|
1521
|
-
|
|
1456
|
+
/*
|
|
1457
|
+
<file>
|
|
1458
|
+
Authors:
|
|
1459
|
+
Anatoly Osovitny
|
|
1460
|
+
|
|
1461
|
+
Created:
|
|
1462
|
+
23 Apr 2018
|
|
1463
|
+
|
|
1464
|
+
Version:
|
|
1465
|
+
1.0
|
|
1466
|
+
|
|
1467
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1468
|
+
</file>
|
|
1469
|
+
*/
|
|
1470
|
+
var ContentHeaderComponent = /** @class */ (function () {
|
|
1471
|
+
function ContentHeaderComponent() {
|
|
1472
|
+
}
|
|
1473
|
+
ContentHeaderComponent.prototype.ngOnInit = function () {
|
|
1474
|
+
if (this.title == null) {
|
|
1475
|
+
this.title = '';
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
return ContentHeaderComponent;
|
|
1479
|
+
}());
|
|
1480
|
+
ContentHeaderComponent.decorators = [
|
|
1481
|
+
{ type: core.Component, args: [{
|
|
1482
|
+
selector: 'anatoly-content-header',
|
|
1483
|
+
template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
|
|
1484
|
+
},] }
|
|
1485
|
+
];
|
|
1486
|
+
ContentHeaderComponent.propDecorators = {
|
|
1487
|
+
title: [{ type: core.Input }]
|
|
1488
|
+
};
|
|
1522
1489
|
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1490
|
+
/*
|
|
1491
|
+
<file>
|
|
1492
|
+
Authors:
|
|
1493
|
+
Vadim Osovitny
|
|
1494
|
+
|
|
1495
|
+
Created:
|
|
1496
|
+
10 Nov 2017
|
|
1497
|
+
|
|
1498
|
+
Version:
|
|
1499
|
+
1.0
|
|
1500
|
+
|
|
1501
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1502
|
+
</file>
|
|
1503
|
+
*/
|
|
1504
|
+
var FroalaEditorModuleWithProviders = angularFroalaWysiwyg.FroalaEditorModule.forRoot();
|
|
1505
|
+
var FroalaViewModuleWithProviders = angularFroalaWysiwyg.FroalaViewModule.forRoot();
|
|
1506
|
+
var AnatolyUIModule = /** @class */ (function () {
|
|
1507
|
+
function AnatolyUIModule() {
|
|
1508
|
+
}
|
|
1509
|
+
return AnatolyUIModule;
|
|
1510
|
+
}());
|
|
1511
|
+
AnatolyUIModule.decorators = [
|
|
1512
|
+
{ type: core.NgModule, args: [{
|
|
1513
|
+
imports: [
|
|
1514
|
+
common.CommonModule,
|
|
1515
|
+
forms.ReactiveFormsModule,
|
|
1516
|
+
forms.FormsModule,
|
|
1517
|
+
FroalaEditorModuleWithProviders,
|
|
1518
|
+
FroalaViewModuleWithProviders,
|
|
1519
|
+
],
|
|
1520
|
+
declarations: [
|
|
1521
|
+
SubscribePlanButtonComponent,
|
|
1522
|
+
UpgradePlanButtonComponent,
|
|
1523
|
+
BuyAccessButtonComponent,
|
|
1524
|
+
SignInButtonComponent,
|
|
1525
|
+
SignUpButtonComponent,
|
|
1526
|
+
SignOutButtonComponent,
|
|
1527
|
+
FormValidationSummaryComponent,
|
|
1528
|
+
ItemValidationSummaryComponent,
|
|
1529
|
+
HtmlEditorComponent,
|
|
1530
|
+
FormsHtmlEditorComponent,
|
|
1531
|
+
ContentHeaderComponent,
|
|
1532
|
+
],
|
|
1533
|
+
exports: [
|
|
1534
|
+
SubscribePlanButtonComponent,
|
|
1535
|
+
UpgradePlanButtonComponent,
|
|
1536
|
+
BuyAccessButtonComponent,
|
|
1537
|
+
SignInButtonComponent,
|
|
1538
|
+
SignUpButtonComponent,
|
|
1539
|
+
SignOutButtonComponent,
|
|
1540
|
+
FormValidationSummaryComponent,
|
|
1541
|
+
ItemValidationSummaryComponent,
|
|
1542
|
+
HtmlEditorComponent,
|
|
1543
|
+
FormsHtmlEditorComponent,
|
|
1544
|
+
ContentHeaderComponent,
|
|
1545
|
+
]
|
|
1546
|
+
},] }
|
|
1547
|
+
];
|
|
1579
1548
|
|
|
1580
|
-
|
|
1581
|
-
<file>
|
|
1582
|
-
Authors:
|
|
1583
|
-
Vadim Osovitny
|
|
1584
|
-
|
|
1585
|
-
Created:
|
|
1586
|
-
29 Apr 2018
|
|
1587
|
-
|
|
1588
|
-
Version:
|
|
1589
|
-
1.0
|
|
1590
|
-
|
|
1591
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1592
|
-
</file>
|
|
1593
|
-
*/
|
|
1594
|
-
var BaseGridEditService = /** @class */ (function (_super) {
|
|
1595
|
-
__extends(BaseGridEditService, _super);
|
|
1596
|
-
function BaseGridEditService(http) {
|
|
1597
|
-
var _this = _super.call(this, http) || this;
|
|
1598
|
-
_this.http = http;
|
|
1599
|
-
_this.baseUrl = "";
|
|
1600
|
-
return _this;
|
|
1601
|
-
}
|
|
1602
|
-
BaseGridEditService.prototype.reset = function () {
|
|
1603
|
-
this.data = [];
|
|
1604
|
-
};
|
|
1605
|
-
BaseGridEditService.prototype.resetItem = function (dataItem) {
|
|
1606
|
-
if (!dataItem) {
|
|
1607
|
-
return;
|
|
1608
|
-
}
|
|
1609
|
-
//find orignal data item
|
|
1610
|
-
var originalDataItem = this.data.find(function (item) { return item.Id === dataItem.Id; });
|
|
1611
|
-
//revert changes
|
|
1612
|
-
Object.assign(originalDataItem, dataItem);
|
|
1613
|
-
_super.prototype.next.call(this, this.data);
|
|
1614
|
-
};
|
|
1615
|
-
BaseGridEditService.prototype.save = function (data, isNew, sucess) {
|
|
1616
|
-
var _this = this;
|
|
1617
|
-
var action = isNew ? 'add' : 'update';
|
|
1618
|
-
this.reset();
|
|
1619
|
-
this.post(action, data).subscribe(function () {
|
|
1620
|
-
}, function () {
|
|
1621
|
-
_this.read();
|
|
1622
|
-
}, function () {
|
|
1623
|
-
_this.read();
|
|
1624
|
-
if (sucess)
|
|
1625
|
-
sucess();
|
|
1626
|
-
});
|
|
1627
|
-
};
|
|
1628
|
-
BaseGridEditService.prototype.remove = function (data, sucess) {
|
|
1629
|
-
var _this = this;
|
|
1630
|
-
this.reset();
|
|
1631
|
-
this.post('remove', data).subscribe(function () {
|
|
1632
|
-
}, function () {
|
|
1633
|
-
_this.read();
|
|
1634
|
-
}, function () {
|
|
1635
|
-
_this.read();
|
|
1636
|
-
if (sucess)
|
|
1637
|
-
sucess();
|
|
1638
|
-
});
|
|
1639
|
-
};
|
|
1640
|
-
BaseGridEditService.prototype.post = function (action, data) {
|
|
1641
|
-
var url = this.baseUrl + ("" + action + this.serializeParams(data));
|
|
1642
|
-
return this.http.post(url, data).pipe(operators.map(function (res) { return res; }));
|
|
1643
|
-
};
|
|
1644
|
-
BaseGridEditService.ctorParameters = function () { return [
|
|
1645
|
-
{ type: http.HttpClient }
|
|
1646
|
-
]; };
|
|
1647
|
-
BaseGridEditService = __decorate([
|
|
1648
|
-
core.Injectable()
|
|
1649
|
-
], BaseGridEditService);
|
|
1650
|
-
return BaseGridEditService;
|
|
1651
|
-
}(BaseGridReadService));
|
|
1549
|
+
// Module
|
|
1652
1550
|
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
Version:
|
|
1662
|
-
1.0
|
|
1663
|
-
|
|
1664
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1665
|
-
</file>
|
|
1666
|
-
*/
|
|
1667
|
-
var AnatolyDataModule = /** @class */ (function () {
|
|
1668
|
-
function AnatolyDataModule() {
|
|
1669
|
-
}
|
|
1670
|
-
AnatolyDataModule = __decorate([
|
|
1671
|
-
core.NgModule({
|
|
1672
|
-
imports: [
|
|
1673
|
-
common.CommonModule,
|
|
1674
|
-
http.HttpClientModule,
|
|
1675
|
-
http.HttpClientXsrfModule,
|
|
1676
|
-
http.HttpClientJsonpModule
|
|
1677
|
-
],
|
|
1678
|
-
exports: [
|
|
1679
|
-
common.CommonModule,
|
|
1680
|
-
http.HttpClientModule,
|
|
1681
|
-
http.HttpClientXsrfModule,
|
|
1682
|
-
http.HttpClientJsonpModule
|
|
1683
|
-
],
|
|
1684
|
-
declarations: [],
|
|
1685
|
-
providers: []
|
|
1686
|
-
})
|
|
1687
|
-
], AnatolyDataModule);
|
|
1688
|
-
return AnatolyDataModule;
|
|
1689
|
-
}());
|
|
1551
|
+
/*
|
|
1552
|
+
* Public API Surface of anatoly
|
|
1553
|
+
*/
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* Generated bundle index. Do not edit.
|
|
1557
|
+
*/
|
|
1690
1558
|
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
exports.ValidationSummaryComponent = ValidationSummaryComponent;
|
|
1559
|
+
exports.Alerts = Alerts;
|
|
1560
|
+
exports.AnatolyCoreModule = AnatolyCoreModule;
|
|
1561
|
+
exports.AnatolyDataModule = AnatolyDataModule;
|
|
1562
|
+
exports.AnatolyUIModule = AnatolyUIModule;
|
|
1563
|
+
exports.AppContextService = AppContextService;
|
|
1564
|
+
exports.BaseApiService = BaseApiService;
|
|
1565
|
+
exports.BaseComponent = BaseComponent;
|
|
1566
|
+
exports.BaseEditComponent = BaseEditComponent;
|
|
1567
|
+
exports.BaseGoService = BaseGoService;
|
|
1568
|
+
exports.BaseGridEditService = BaseGridEditService;
|
|
1569
|
+
exports.BaseGridReadService = BaseGridReadService;
|
|
1570
|
+
exports.BillingApiService = BillingApiService;
|
|
1571
|
+
exports.BuyAccessButtonComponent = BuyAccessButtonComponent;
|
|
1572
|
+
exports.ContentHeaderComponent = ContentHeaderComponent;
|
|
1573
|
+
exports.FormValidationSummaryComponent = FormValidationSummaryComponent;
|
|
1574
|
+
exports.FormsHtmlEditorComponent = FormsHtmlEditorComponent;
|
|
1575
|
+
exports.HtmlEditorComponent = HtmlEditorComponent;
|
|
1576
|
+
exports.ItemValidationSummaryComponent = ItemValidationSummaryComponent;
|
|
1577
|
+
exports.SignInButtonComponent = SignInButtonComponent;
|
|
1578
|
+
exports.SignOutButtonComponent = SignOutButtonComponent;
|
|
1579
|
+
exports.SignUpButtonComponent = SignUpButtonComponent;
|
|
1580
|
+
exports.SubscribePlanButtonComponent = SubscribePlanButtonComponent;
|
|
1581
|
+
exports.UpgradePlanButtonComponent = UpgradePlanButtonComponent;
|
|
1582
|
+
exports.Utils = Utils;
|
|
1583
|
+
exports.ValidationSummaryComponent = ValidationSummaryComponent;
|
|
1717
1584
|
|
|
1718
|
-
|
|
1585
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1719
1586
|
|
|
1720
1587
|
})));
|
|
1721
1588
|
//# sourceMappingURL=osovitny-anatoly.umd.js.map
|