@osovitny/anatoly 1.2.8 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/osovitny-anatoly.umd.js +148 -94
- package/bundles/osovitny-anatoly.umd.js.map +1 -1
- package/bundles/osovitny-anatoly.umd.min.js +1 -1
- package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
- package/esm2015/lib/billing/billing.module.js +3 -3
- package/esm2015/lib/billing/components/buyaccess/buyaccess-button.component.js +3 -3
- package/esm2015/lib/billing/components/subscriptions/upgrade-plan-button.component.js +3 -3
- package/esm2015/lib/core/alerts.js +53 -8
- package/esm2015/lib/core/components/html-editor/base-html-editor.component.js +2 -2
- package/esm2015/lib/core/components/html-editor/forms-html-editor.component.js +2 -2
- package/esm2015/lib/core/components/validation/item-validation-summary.component.js +4 -4
- package/esm2015/lib/core/services/appcontext.service.js +3 -4
- package/esm2015/lib/data/base/base-api.service.js +73 -0
- package/esm2015/lib/data/base/grid/base-grid-edit.service.js +75 -0
- package/esm2015/lib/data/base/grid/base-grid-read.service.js +60 -0
- package/esm2015/lib/data/index.js +5 -6
- package/esm2015/lib/data/services/{base-billing-api.service.js → billing-api.service.js} +8 -7
- package/esm5/lib/billing/billing.module.js +3 -3
- package/esm5/lib/billing/components/buyaccess/buyaccess-button.component.js +3 -3
- package/esm5/lib/billing/components/subscriptions/upgrade-plan-button.component.js +3 -3
- package/esm5/lib/core/alerts.js +53 -8
- package/esm5/lib/core/components/html-editor/base-html-editor.component.js +1 -1
- package/esm5/lib/core/components/html-editor/forms-html-editor.component.js +2 -2
- package/esm5/lib/core/components/validation/item-validation-summary.component.js +4 -4
- package/esm5/lib/core/services/appcontext.service.js +3 -4
- package/esm5/lib/data/base/base-api.service.js +74 -0
- package/esm5/lib/data/base/grid/base-grid-edit.service.js +80 -0
- package/esm5/lib/data/base/grid/base-grid-read.service.js +64 -0
- package/esm5/lib/data/index.js +5 -6
- package/esm5/lib/data/services/billing-api.service.js +56 -0
- package/fesm2015/osovitny-anatoly.js +135 -81
- package/fesm2015/osovitny-anatoly.js.map +1 -1
- package/fesm5/osovitny-anatoly.js +148 -94
- package/fesm5/osovitny-anatoly.js.map +1 -1
- package/lib/billing/components/buyaccess/buyaccess-button.component.d.ts +2 -2
- package/lib/billing/components/subscriptions/upgrade-plan-button.component.d.ts +2 -2
- package/lib/core/alerts.d.ts +3 -1
- package/lib/core/components/validation/item-validation-summary.component.d.ts +2 -2
- package/lib/core/services/appcontext.service.d.ts +1 -1
- package/lib/data/{services → base}/base-api.service.d.ts +6 -6
- package/lib/data/{services/base-gridedit.service.d.ts → base/grid/base-grid-edit.service.d.ts} +2 -7
- package/lib/data/base/grid/base-grid-read.service.d.ts +11 -0
- package/lib/data/index.d.ts +4 -4
- package/lib/data/services/{base-billing-api.service.d.ts → billing-api.service.d.ts} +2 -2
- package/osovitny-anatoly.metadata.json +1 -1
- package/package.json +1 -1
- package/esm2015/lib/data/consts.js +0 -21
- package/esm2015/lib/data/services/base-api.service.js +0 -71
- package/esm2015/lib/data/services/base-gridedit.service.js +0 -98
- package/esm5/lib/data/consts.js +0 -25
- package/esm5/lib/data/services/base-api.service.js +0 -72
- package/esm5/lib/data/services/base-billing-api.service.js +0 -55
- package/esm5/lib/data/services/base-gridedit.service.js +0 -104
- package/lib/data/consts.d.ts +0 -6
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<file>
|
|
3
|
+
Authors:
|
|
4
|
+
Vadim Osovitny
|
|
5
|
+
|
|
6
|
+
Created:
|
|
7
|
+
12 Nov 2017
|
|
8
|
+
|
|
9
|
+
Version:
|
|
10
|
+
1.0
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
13
|
+
</file>
|
|
14
|
+
*/
|
|
15
|
+
import { __decorate, __extends } from "tslib";
|
|
16
|
+
//Node
|
|
17
|
+
import { Injectable } from '@angular/core';
|
|
18
|
+
import { HttpClient } from '@angular/common/http';
|
|
19
|
+
//App
|
|
20
|
+
import { BaseApiService } from '../base/base-api.service';
|
|
21
|
+
var BillingApiService = /** @class */ (function (_super) {
|
|
22
|
+
__extends(BillingApiService, _super);
|
|
23
|
+
function BillingApiService(http) {
|
|
24
|
+
var _this = _super.call(this, http) || this;
|
|
25
|
+
_this.http = http;
|
|
26
|
+
_this.baseUrl += 'billing/';
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
BillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
|
|
30
|
+
this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
|
|
31
|
+
.subscribe(function (data) { }, function (e) { if (error)
|
|
32
|
+
error(); }, function () { if (success)
|
|
33
|
+
success(); });
|
|
34
|
+
};
|
|
35
|
+
BillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
|
|
36
|
+
this.postQS('cancelRequestedSubscription', null)
|
|
37
|
+
.subscribe(function (data) { }, function (e) { if (error)
|
|
38
|
+
error(); }, function () { if (success)
|
|
39
|
+
success(); });
|
|
40
|
+
};
|
|
41
|
+
BillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
|
|
42
|
+
this.postQS('buyAccess', { requestedPlan: requestedPlan })
|
|
43
|
+
.subscribe(function (data) { }, function (e) { if (error)
|
|
44
|
+
error(); }, function () { if (success)
|
|
45
|
+
success(); });
|
|
46
|
+
};
|
|
47
|
+
BillingApiService.ctorParameters = function () { return [
|
|
48
|
+
{ type: HttpClient }
|
|
49
|
+
]; };
|
|
50
|
+
BillingApiService = __decorate([
|
|
51
|
+
Injectable()
|
|
52
|
+
], BillingApiService);
|
|
53
|
+
return BillingApiService;
|
|
54
|
+
}(BaseApiService));
|
|
55
|
+
export { BillingApiService };
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmlsbGluZy1hcGkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bvc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VzdGVkU3Vic2NyaXB0aW9uJywgbnVsbClcclxuICAgICAgLnN1YnNjcmliZShcclxuICAgICAgICBkYXRhID0+IHsgfSxcclxuICAgICAgICBlID0+IHsgaWYgKGVycm9yKSBlcnJvcigpIH0sXHJcbiAgICAgICAgKCkgPT4geyBpZiAoc3VjY2Vzcykgc3VjY2VzcygpIH1cclxuICAgICAgKTtcclxuICB9XHJcblxyXG4gIHB1YmxpYyBidXlBY2Nlc3MocmVxdWVzdGVkUGxhbjogTnVtYmVyLCBzdWNjZXNzPzogRnVuY3Rpb24sIGVycm9yPzogRnVuY3Rpb24pIHtcclxuICAgIHRoaXMucG9zdFFTKCdidXlBY2Nlc3MnLCB7IHJlcXVlc3RlZFBsYW46IHJlcXVlc3RlZFBsYW4gfSlcclxuICAgICAgLnN1YnNjcmliZShcclxuICAgICAgICBkYXRhID0+IHsgfSxcclxuICAgICAgICBlID0+IHsgaWYgKGVycm9yKSBlcnJvcigpIH0sXHJcbiAgICAgICAgKCkgPT4geyBpZiAoc3VjY2Vzcykgc3VjY2VzcygpIH1cclxuICAgICAgKTtcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -30,7 +30,7 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
30
30
|
class Alerts {
|
|
31
31
|
static Info(text) {
|
|
32
32
|
Swal.fire({
|
|
33
|
-
title: "
|
|
33
|
+
title: "Information",
|
|
34
34
|
text: text,
|
|
35
35
|
icon: "info",
|
|
36
36
|
confirmButtonText: "OK"
|
|
@@ -38,7 +38,7 @@ class Alerts {
|
|
|
38
38
|
}
|
|
39
39
|
static Warning(text) {
|
|
40
40
|
Swal.fire({
|
|
41
|
-
title: "
|
|
41
|
+
title: "Warning",
|
|
42
42
|
text: text,
|
|
43
43
|
icon: "warning",
|
|
44
44
|
confirmButtonText: "OK"
|
|
@@ -46,7 +46,7 @@ class Alerts {
|
|
|
46
46
|
}
|
|
47
47
|
static Error(text) {
|
|
48
48
|
Swal.fire({
|
|
49
|
-
title: "
|
|
49
|
+
title: "Error",
|
|
50
50
|
text: text,
|
|
51
51
|
icon: "error",
|
|
52
52
|
confirmButtonText: "OK"
|
|
@@ -88,7 +88,10 @@ class Alerts {
|
|
|
88
88
|
;
|
|
89
89
|
static Success(text, title, successAction) {
|
|
90
90
|
if (typeof title == "undefined" || title == null)
|
|
91
|
-
title = "Success
|
|
91
|
+
title = "Success";
|
|
92
|
+
if (!text) {
|
|
93
|
+
text = "Operation was successful";
|
|
94
|
+
}
|
|
92
95
|
Swal.fire({
|
|
93
96
|
title: title,
|
|
94
97
|
text: text,
|
|
@@ -101,11 +104,53 @@ class Alerts {
|
|
|
101
104
|
}
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
|
-
;
|
|
105
107
|
static Cancel(text) {
|
|
106
|
-
|
|
108
|
+
if (!text) {
|
|
109
|
+
text = "Operation has been cancled";
|
|
110
|
+
}
|
|
111
|
+
Swal.fire({
|
|
112
|
+
title: 'Cancelled',
|
|
113
|
+
text: text,
|
|
114
|
+
icon: "info"
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
//Notifications
|
|
118
|
+
static NotificationCancel(text) {
|
|
119
|
+
if (!text) {
|
|
120
|
+
text = "Operation has been cancled";
|
|
121
|
+
}
|
|
122
|
+
const toast = Swal.mixin({
|
|
123
|
+
toast: true,
|
|
124
|
+
position: 'top-end',
|
|
125
|
+
showConfirmButton: false,
|
|
126
|
+
timer: 3000,
|
|
127
|
+
timerProgressBar: true
|
|
128
|
+
});
|
|
129
|
+
toast.fire({
|
|
130
|
+
title: 'Cancelled',
|
|
131
|
+
text: text,
|
|
132
|
+
icon: "info"
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
static NotificationSuccess(text, title) {
|
|
136
|
+
if (typeof title == "undefined" || title == null)
|
|
137
|
+
title = "Success";
|
|
138
|
+
if (!text) {
|
|
139
|
+
text = "Operation was successful";
|
|
140
|
+
}
|
|
141
|
+
const toast = Swal.mixin({
|
|
142
|
+
toast: true,
|
|
143
|
+
position: 'top-end',
|
|
144
|
+
showConfirmButton: false,
|
|
145
|
+
timer: 3000,
|
|
146
|
+
timerProgressBar: true
|
|
147
|
+
});
|
|
148
|
+
toast.fire({
|
|
149
|
+
title: title,
|
|
150
|
+
text: text,
|
|
151
|
+
icon: "success",
|
|
152
|
+
});
|
|
107
153
|
}
|
|
108
|
-
;
|
|
109
154
|
}
|
|
110
155
|
|
|
111
156
|
/*
|
|
@@ -165,27 +210,6 @@ BaseGoService = __decorate([
|
|
|
165
210
|
Injectable()
|
|
166
211
|
], BaseGoService);
|
|
167
212
|
|
|
168
|
-
/*
|
|
169
|
-
<file>
|
|
170
|
-
Authors:
|
|
171
|
-
Vadim Osovitny
|
|
172
|
-
|
|
173
|
-
Created:
|
|
174
|
-
4 Mar 2020
|
|
175
|
-
|
|
176
|
-
Version:
|
|
177
|
-
1.0
|
|
178
|
-
|
|
179
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
180
|
-
</file>
|
|
181
|
-
*/
|
|
182
|
-
class Consts {
|
|
183
|
-
}
|
|
184
|
-
Consts.JsonUrl = "/dist/jsons/";
|
|
185
|
-
Consts.JsonVersion = "v=1.0.0";
|
|
186
|
-
Consts.AppUrl = "/";
|
|
187
|
-
Consts.ApiUrl = "/api/";
|
|
188
|
-
|
|
189
213
|
/*
|
|
190
214
|
<file>
|
|
191
215
|
Authors:
|
|
@@ -203,46 +227,48 @@ Consts.ApiUrl = "/api/";
|
|
|
203
227
|
let BaseApiService = class BaseApiService {
|
|
204
228
|
constructor(http) {
|
|
205
229
|
this.http = http;
|
|
206
|
-
this.baseUrl = Consts.ApiUrl;
|
|
207
230
|
}
|
|
208
231
|
serializeParams(data) {
|
|
209
232
|
return data ? ('?' + $.param(data)) : '';
|
|
210
233
|
}
|
|
211
|
-
//
|
|
234
|
+
//api
|
|
212
235
|
get(action, data) {
|
|
213
|
-
var url = this.baseUrl
|
|
236
|
+
var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
|
|
214
237
|
return this.http.get(url).pipe(map(res => res));
|
|
215
238
|
}
|
|
216
239
|
post(action, data) {
|
|
217
|
-
var url = this.baseUrl
|
|
218
|
-
return this.http.post(url, data
|
|
240
|
+
var url = `${this.baseUrl}/${action}`;
|
|
241
|
+
return this.http.post(url, data).pipe(map(res => res));
|
|
219
242
|
}
|
|
220
243
|
postQS(action, data) {
|
|
221
|
-
var url = this.baseUrl
|
|
222
|
-
return this.http.post(url, null
|
|
244
|
+
var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
|
|
245
|
+
return this.http.post(url, null).pipe(map(res => res));
|
|
246
|
+
}
|
|
247
|
+
delete(action, data) {
|
|
248
|
+
var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
|
|
249
|
+
return this.http.delete(url).pipe(map(res => res));
|
|
223
250
|
}
|
|
224
251
|
//gets
|
|
252
|
+
getById(id) {
|
|
253
|
+
return this.get('getById', { id: id });
|
|
254
|
+
}
|
|
225
255
|
getAll(data) {
|
|
226
256
|
return this.get('getall', data).pipe(map(res => res));
|
|
227
257
|
}
|
|
228
|
-
getJsonFile(fileName, jsonVersion) {
|
|
258
|
+
getJsonFile(fileName, jsonUrl, jsonVersion) {
|
|
259
|
+
if (!jsonUrl) {
|
|
260
|
+
jsonUrl = "/dist/jsons";
|
|
261
|
+
}
|
|
229
262
|
if (!jsonVersion) {
|
|
230
263
|
jsonVersion = "1.0";
|
|
231
264
|
}
|
|
232
|
-
var url =
|
|
265
|
+
var url = jsonUrl + "/" + fileName + '?' + jsonVersion;
|
|
233
266
|
return this.http.get(url).pipe(map(res => res));
|
|
234
267
|
}
|
|
235
268
|
getNewGuid() {
|
|
236
|
-
var url = this.baseUrl
|
|
269
|
+
var url = `${this.baseUrl}/getNewGuid`;
|
|
237
270
|
return this.http.get(url, { responseType: 'text' });
|
|
238
271
|
}
|
|
239
|
-
//CRUD function
|
|
240
|
-
getById(id) {
|
|
241
|
-
return this.get('getById', { id: id });
|
|
242
|
-
}
|
|
243
|
-
remove(id) {
|
|
244
|
-
return this.postQS('remove', { id: id });
|
|
245
|
-
}
|
|
246
272
|
};
|
|
247
273
|
BaseApiService.ctorParameters = () => [
|
|
248
274
|
{ type: HttpClient }
|
|
@@ -272,7 +298,7 @@ let AppContextService = class AppContextService extends BaseApiService {
|
|
|
272
298
|
this.current = null;
|
|
273
299
|
this.successes = [];
|
|
274
300
|
this.subscription = null;
|
|
275
|
-
this.baseUrl =
|
|
301
|
+
this.baseUrl = '/api/appcontext/';
|
|
276
302
|
}
|
|
277
303
|
getCurrent(success) {
|
|
278
304
|
if (typeof success == "undefined") {
|
|
@@ -557,14 +583,14 @@ let ItemValidationSummaryComponent = class ItemValidationSummaryComponent extend
|
|
|
557
583
|
};
|
|
558
584
|
__decorate([
|
|
559
585
|
Input()
|
|
560
|
-
], ItemValidationSummaryComponent.prototype, "
|
|
586
|
+
], ItemValidationSummaryComponent.prototype, "controlName", void 0);
|
|
561
587
|
__decorate([
|
|
562
588
|
Input()
|
|
563
|
-
], ItemValidationSummaryComponent.prototype, "
|
|
589
|
+
], ItemValidationSummaryComponent.prototype, "controlTitle", void 0);
|
|
564
590
|
ItemValidationSummaryComponent = __decorate([
|
|
565
591
|
Component({
|
|
566
592
|
selector: 'anatoly-item-validation-summary',
|
|
567
|
-
template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(
|
|
593
|
+
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"
|
|
568
594
|
})
|
|
569
595
|
], ItemValidationSummaryComponent);
|
|
570
596
|
|
|
@@ -680,7 +706,7 @@ class BaseHtmlEditorComponent extends BaseEditComponent {
|
|
|
680
706
|
doAfterInitialized(action) {
|
|
681
707
|
let that = this;
|
|
682
708
|
if (!this.froalaEditorInitialized) {
|
|
683
|
-
this.afterInitializedActions.push(
|
|
709
|
+
this.afterInitializedActions.push(() => { action(that); });
|
|
684
710
|
}
|
|
685
711
|
else {
|
|
686
712
|
action(that);
|
|
@@ -781,7 +807,7 @@ __decorate([
|
|
|
781
807
|
FormsHtmlEditorComponent = __decorate([
|
|
782
808
|
Component({
|
|
783
809
|
selector: 'anatoly-forms-html-editor',
|
|
784
|
-
template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\"\r\n [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n
|
|
810
|
+
template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea id=\"htmleditor-{{editorId}}\" class=\"htmleditor-{{editorId}}\"\r\n [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n [formSubmitted]=\"formSubmitted\"\r\n [controlName]=\"editorFormKey\"\r\n [controlTitle]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n"
|
|
785
811
|
})
|
|
786
812
|
], FormsHtmlEditorComponent);
|
|
787
813
|
|
|
@@ -859,7 +885,7 @@ AnatolyCoreModule = __decorate([
|
|
|
859
885
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
860
886
|
</file>
|
|
861
887
|
*/
|
|
862
|
-
let
|
|
888
|
+
let BillingApiService = class BillingApiService extends BaseApiService {
|
|
863
889
|
constructor(http) {
|
|
864
890
|
super(http);
|
|
865
891
|
this.http = http;
|
|
@@ -884,12 +910,12 @@ let BaseBillingApiService = class BaseBillingApiService extends BaseApiService {
|
|
|
884
910
|
success(); });
|
|
885
911
|
}
|
|
886
912
|
};
|
|
887
|
-
|
|
913
|
+
BillingApiService.ctorParameters = () => [
|
|
888
914
|
{ type: HttpClient }
|
|
889
915
|
];
|
|
890
|
-
|
|
916
|
+
BillingApiService = __decorate([
|
|
891
917
|
Injectable()
|
|
892
|
-
],
|
|
918
|
+
], BillingApiService);
|
|
893
919
|
|
|
894
920
|
/*
|
|
895
921
|
<file>
|
|
@@ -942,7 +968,7 @@ let BuyAccessButtonComponent = class BuyAccessButtonComponent {
|
|
|
942
968
|
};
|
|
943
969
|
BuyAccessButtonComponent.ctorParameters = () => [
|
|
944
970
|
{ type: AppContextService },
|
|
945
|
-
{ type:
|
|
971
|
+
{ type: BillingApiService }
|
|
946
972
|
];
|
|
947
973
|
__decorate([
|
|
948
974
|
Input()
|
|
@@ -1045,7 +1071,7 @@ let UpgradePlanButtonComponent = class UpgradePlanButtonComponent {
|
|
|
1045
1071
|
}
|
|
1046
1072
|
};
|
|
1047
1073
|
UpgradePlanButtonComponent.ctorParameters = () => [
|
|
1048
|
-
{ type:
|
|
1074
|
+
{ type: BillingApiService }
|
|
1049
1075
|
];
|
|
1050
1076
|
__decorate([
|
|
1051
1077
|
Input()
|
|
@@ -1220,7 +1246,7 @@ AnatolyBillingModule = __decorate([
|
|
|
1220
1246
|
BuyAccessButtonComponent
|
|
1221
1247
|
],
|
|
1222
1248
|
providers: [
|
|
1223
|
-
|
|
1249
|
+
BillingApiService
|
|
1224
1250
|
]
|
|
1225
1251
|
})
|
|
1226
1252
|
], AnatolyBillingModule);
|
|
@@ -1241,17 +1267,63 @@ AnatolyBillingModule = __decorate([
|
|
|
1241
1267
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1242
1268
|
</file>
|
|
1243
1269
|
*/
|
|
1244
|
-
let
|
|
1270
|
+
let BaseGridReadService = class BaseGridReadService extends BehaviorSubject {
|
|
1245
1271
|
constructor(http) {
|
|
1246
1272
|
super([]);
|
|
1247
1273
|
this.http = http;
|
|
1248
1274
|
this.data = [];
|
|
1249
|
-
this.baseUrl = Consts.ApiUrl;
|
|
1250
|
-
this.baseReadUrl = this.baseUrl + "getAll";
|
|
1251
1275
|
}
|
|
1252
1276
|
serializeParams(data) {
|
|
1253
1277
|
return data ? ('?' + $.param(data)) : '';
|
|
1254
1278
|
}
|
|
1279
|
+
read(params, success, error) {
|
|
1280
|
+
if (this.data.length) {
|
|
1281
|
+
return super.next(this.data);
|
|
1282
|
+
}
|
|
1283
|
+
var url = this.baseReadUrl;
|
|
1284
|
+
if (typeof params === 'undefined') {
|
|
1285
|
+
params = this.savedReadParams;
|
|
1286
|
+
}
|
|
1287
|
+
if (params) {
|
|
1288
|
+
url = this.baseReadUrl + `${this.serializeParams(params)}`;
|
|
1289
|
+
this.savedReadParams = params;
|
|
1290
|
+
}
|
|
1291
|
+
this.http.get(url).pipe(map(res => res)).subscribe(data => {
|
|
1292
|
+
super.next(data);
|
|
1293
|
+
if (success)
|
|
1294
|
+
success();
|
|
1295
|
+
}, e => {
|
|
1296
|
+
if (error)
|
|
1297
|
+
error(e);
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
BaseGridReadService.ctorParameters = () => [
|
|
1302
|
+
{ type: HttpClient }
|
|
1303
|
+
];
|
|
1304
|
+
BaseGridReadService = __decorate([
|
|
1305
|
+
Injectable()
|
|
1306
|
+
], BaseGridReadService);
|
|
1307
|
+
|
|
1308
|
+
/*
|
|
1309
|
+
<file>
|
|
1310
|
+
Authors:
|
|
1311
|
+
Vadim Osovitny
|
|
1312
|
+
|
|
1313
|
+
Created:
|
|
1314
|
+
29 Apr 2018
|
|
1315
|
+
|
|
1316
|
+
Version:
|
|
1317
|
+
1.0
|
|
1318
|
+
|
|
1319
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1320
|
+
</file>
|
|
1321
|
+
*/
|
|
1322
|
+
let BaseGridEditService = class BaseGridEditService extends BaseGridReadService {
|
|
1323
|
+
constructor(http) {
|
|
1324
|
+
super(http);
|
|
1325
|
+
this.http = http;
|
|
1326
|
+
}
|
|
1255
1327
|
reset() {
|
|
1256
1328
|
this.data = [];
|
|
1257
1329
|
}
|
|
@@ -1265,24 +1337,6 @@ let BaseGridEditService = class BaseGridEditService extends BehaviorSubject {
|
|
|
1265
1337
|
Object.assign(originalDataItem, dataItem);
|
|
1266
1338
|
super.next(this.data);
|
|
1267
1339
|
}
|
|
1268
|
-
read(params) {
|
|
1269
|
-
if (this.data.length) {
|
|
1270
|
-
return super.next(this.data);
|
|
1271
|
-
}
|
|
1272
|
-
var url = this.baseReadUrl;
|
|
1273
|
-
if (typeof params === 'undefined') {
|
|
1274
|
-
params = this.savedReadParams;
|
|
1275
|
-
}
|
|
1276
|
-
if (typeof params !== 'undefined') {
|
|
1277
|
-
url = this.baseReadUrl + `${this.serializeParams(params)}`;
|
|
1278
|
-
this.savedReadParams = params;
|
|
1279
|
-
}
|
|
1280
|
-
// this.http.get(url)
|
|
1281
|
-
// .map(res => <any[]>res)
|
|
1282
|
-
// .do(data => { this.data = data; }).subscribe(data => { super.next(data); });
|
|
1283
|
-
//}
|
|
1284
|
-
this.http.get(url).pipe(map(res => res)).subscribe(data => { super.next(data); });
|
|
1285
|
-
}
|
|
1286
1340
|
save(data, isNew, sucess) {
|
|
1287
1341
|
const action = isNew ? 'add' : 'update';
|
|
1288
1342
|
this.reset();
|
|
@@ -1353,11 +1407,11 @@ AnatolyDataModule = __decorate([
|
|
|
1353
1407
|
})
|
|
1354
1408
|
], AnatolyDataModule);
|
|
1355
1409
|
|
|
1356
|
-
//
|
|
1410
|
+
// Services
|
|
1357
1411
|
|
|
1358
1412
|
/**
|
|
1359
1413
|
* Generated bundle index. Do not edit.
|
|
1360
1414
|
*/
|
|
1361
1415
|
|
|
1362
|
-
export { Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyIdentityModule, AppContextService, BaseApiService,
|
|
1416
|
+
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 };
|
|
1363
1417
|
//# sourceMappingURL=osovitny-anatoly.js.map
|