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