@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
|
@@ -32,7 +32,7 @@ var Alerts = /** @class */ (function () {
|
|
|
32
32
|
}
|
|
33
33
|
Alerts.Info = function (text) {
|
|
34
34
|
Swal.fire({
|
|
35
|
-
title: "
|
|
35
|
+
title: "Information",
|
|
36
36
|
text: text,
|
|
37
37
|
icon: "info",
|
|
38
38
|
confirmButtonText: "OK"
|
|
@@ -40,7 +40,7 @@ var Alerts = /** @class */ (function () {
|
|
|
40
40
|
};
|
|
41
41
|
Alerts.Warning = function (text) {
|
|
42
42
|
Swal.fire({
|
|
43
|
-
title: "
|
|
43
|
+
title: "Warning",
|
|
44
44
|
text: text,
|
|
45
45
|
icon: "warning",
|
|
46
46
|
confirmButtonText: "OK"
|
|
@@ -48,7 +48,7 @@ var Alerts = /** @class */ (function () {
|
|
|
48
48
|
};
|
|
49
49
|
Alerts.Error = function (text) {
|
|
50
50
|
Swal.fire({
|
|
51
|
-
title: "
|
|
51
|
+
title: "Error",
|
|
52
52
|
text: text,
|
|
53
53
|
icon: "error",
|
|
54
54
|
confirmButtonText: "OK"
|
|
@@ -90,7 +90,10 @@ var Alerts = /** @class */ (function () {
|
|
|
90
90
|
;
|
|
91
91
|
Alerts.Success = function (text, title, successAction) {
|
|
92
92
|
if (typeof title == "undefined" || title == null)
|
|
93
|
-
title = "Success
|
|
93
|
+
title = "Success";
|
|
94
|
+
if (!text) {
|
|
95
|
+
text = "Operation was successful";
|
|
96
|
+
}
|
|
94
97
|
Swal.fire({
|
|
95
98
|
title: title,
|
|
96
99
|
text: text,
|
|
@@ -103,11 +106,53 @@ var Alerts = /** @class */ (function () {
|
|
|
103
106
|
}
|
|
104
107
|
});
|
|
105
108
|
};
|
|
106
|
-
;
|
|
107
109
|
Alerts.Cancel = function (text) {
|
|
108
|
-
|
|
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) {
|
|
121
|
+
if (!text) {
|
|
122
|
+
text = "Operation has been cancled";
|
|
123
|
+
}
|
|
124
|
+
var toast = Swal.mixin({
|
|
125
|
+
toast: true,
|
|
126
|
+
position: 'top-end',
|
|
127
|
+
showConfirmButton: false,
|
|
128
|
+
timer: 3000,
|
|
129
|
+
timerProgressBar: true
|
|
130
|
+
});
|
|
131
|
+
toast.fire({
|
|
132
|
+
title: 'Cancelled',
|
|
133
|
+
text: text,
|
|
134
|
+
icon: "info"
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
Alerts.NotificationSuccess = function (text, title) {
|
|
138
|
+
if (typeof title == "undefined" || title == null)
|
|
139
|
+
title = "Success";
|
|
140
|
+
if (!text) {
|
|
141
|
+
text = "Operation was successful";
|
|
142
|
+
}
|
|
143
|
+
var toast = Swal.mixin({
|
|
144
|
+
toast: true,
|
|
145
|
+
position: 'top-end',
|
|
146
|
+
showConfirmButton: false,
|
|
147
|
+
timer: 3000,
|
|
148
|
+
timerProgressBar: true
|
|
149
|
+
});
|
|
150
|
+
toast.fire({
|
|
151
|
+
title: title,
|
|
152
|
+
text: text,
|
|
153
|
+
icon: "success",
|
|
154
|
+
});
|
|
109
155
|
};
|
|
110
|
-
;
|
|
111
156
|
return Alerts;
|
|
112
157
|
}());
|
|
113
158
|
|
|
@@ -172,30 +217,6 @@ var BaseGoService = /** @class */ (function () {
|
|
|
172
217
|
return BaseGoService;
|
|
173
218
|
}());
|
|
174
219
|
|
|
175
|
-
/*
|
|
176
|
-
<file>
|
|
177
|
-
Authors:
|
|
178
|
-
Vadim Osovitny
|
|
179
|
-
|
|
180
|
-
Created:
|
|
181
|
-
4 Mar 2020
|
|
182
|
-
|
|
183
|
-
Version:
|
|
184
|
-
1.0
|
|
185
|
-
|
|
186
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
187
|
-
</file>
|
|
188
|
-
*/
|
|
189
|
-
var Consts = /** @class */ (function () {
|
|
190
|
-
function Consts() {
|
|
191
|
-
}
|
|
192
|
-
Consts.JsonUrl = "/dist/jsons/";
|
|
193
|
-
Consts.JsonVersion = "v=1.0.0";
|
|
194
|
-
Consts.AppUrl = "/";
|
|
195
|
-
Consts.ApiUrl = "/api/";
|
|
196
|
-
return Consts;
|
|
197
|
-
}());
|
|
198
|
-
|
|
199
220
|
/*
|
|
200
221
|
<file>
|
|
201
222
|
Authors:
|
|
@@ -213,46 +234,48 @@ var Consts = /** @class */ (function () {
|
|
|
213
234
|
var BaseApiService = /** @class */ (function () {
|
|
214
235
|
function BaseApiService(http) {
|
|
215
236
|
this.http = http;
|
|
216
|
-
this.baseUrl = Consts.ApiUrl;
|
|
217
237
|
}
|
|
218
238
|
BaseApiService.prototype.serializeParams = function (data) {
|
|
219
239
|
return data ? ('?' + $.param(data)) : '';
|
|
220
240
|
};
|
|
221
|
-
//
|
|
241
|
+
//api
|
|
222
242
|
BaseApiService.prototype.get = function (action, data) {
|
|
223
|
-
var url = this.baseUrl +
|
|
243
|
+
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
224
244
|
return this.http.get(url).pipe(map(function (res) { return res; }));
|
|
225
245
|
};
|
|
226
246
|
BaseApiService.prototype.post = function (action, data) {
|
|
227
|
-
var url = this.baseUrl +
|
|
228
|
-
return this.http.post(url, data
|
|
247
|
+
var url = this.baseUrl + "/" + action;
|
|
248
|
+
return this.http.post(url, data).pipe(map(function (res) { return res; }));
|
|
229
249
|
};
|
|
230
250
|
BaseApiService.prototype.postQS = function (action, data) {
|
|
231
|
-
var url = this.baseUrl +
|
|
232
|
-
return this.http.post(url, null
|
|
251
|
+
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
252
|
+
return this.http.post(url, null).pipe(map(function (res) { return res; }));
|
|
253
|
+
};
|
|
254
|
+
BaseApiService.prototype.delete = function (action, data) {
|
|
255
|
+
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
256
|
+
return this.http.delete(url).pipe(map(function (res) { return res; }));
|
|
233
257
|
};
|
|
234
258
|
//gets
|
|
259
|
+
BaseApiService.prototype.getById = function (id) {
|
|
260
|
+
return this.get('getById', { id: id });
|
|
261
|
+
};
|
|
235
262
|
BaseApiService.prototype.getAll = function (data) {
|
|
236
263
|
return this.get('getall', data).pipe(map(function (res) { return res; }));
|
|
237
264
|
};
|
|
238
|
-
BaseApiService.prototype.getJsonFile = function (fileName, jsonVersion) {
|
|
265
|
+
BaseApiService.prototype.getJsonFile = function (fileName, jsonUrl, jsonVersion) {
|
|
266
|
+
if (!jsonUrl) {
|
|
267
|
+
jsonUrl = "/dist/jsons";
|
|
268
|
+
}
|
|
239
269
|
if (!jsonVersion) {
|
|
240
270
|
jsonVersion = "1.0";
|
|
241
271
|
}
|
|
242
|
-
var url =
|
|
272
|
+
var url = jsonUrl + "/" + fileName + '?' + jsonVersion;
|
|
243
273
|
return this.http.get(url).pipe(map(function (res) { return res; }));
|
|
244
274
|
};
|
|
245
275
|
BaseApiService.prototype.getNewGuid = function () {
|
|
246
|
-
var url = this.baseUrl +
|
|
276
|
+
var url = this.baseUrl + "/getNewGuid";
|
|
247
277
|
return this.http.get(url, { responseType: 'text' });
|
|
248
278
|
};
|
|
249
|
-
//CRUD function
|
|
250
|
-
BaseApiService.prototype.getById = function (id) {
|
|
251
|
-
return this.get('getById', { id: id });
|
|
252
|
-
};
|
|
253
|
-
BaseApiService.prototype.remove = function (id) {
|
|
254
|
-
return this.postQS('remove', { id: id });
|
|
255
|
-
};
|
|
256
279
|
BaseApiService.ctorParameters = function () { return [
|
|
257
280
|
{ type: HttpClient }
|
|
258
281
|
]; };
|
|
@@ -284,7 +307,7 @@ var AppContextService = /** @class */ (function (_super) {
|
|
|
284
307
|
_this.current = null;
|
|
285
308
|
_this.successes = [];
|
|
286
309
|
_this.subscription = null;
|
|
287
|
-
_this.baseUrl =
|
|
310
|
+
_this.baseUrl = '/api/appcontext/';
|
|
288
311
|
return _this;
|
|
289
312
|
}
|
|
290
313
|
AppContextService.prototype.getCurrent = function (success) {
|
|
@@ -585,14 +608,14 @@ var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
|
585
608
|
}
|
|
586
609
|
__decorate([
|
|
587
610
|
Input()
|
|
588
|
-
], ItemValidationSummaryComponent.prototype, "
|
|
611
|
+
], ItemValidationSummaryComponent.prototype, "controlName", void 0);
|
|
589
612
|
__decorate([
|
|
590
613
|
Input()
|
|
591
|
-
], ItemValidationSummaryComponent.prototype, "
|
|
614
|
+
], ItemValidationSummaryComponent.prototype, "controlTitle", void 0);
|
|
592
615
|
ItemValidationSummaryComponent = __decorate([
|
|
593
616
|
Component({
|
|
594
617
|
selector: 'anatoly-item-validation-summary',
|
|
595
|
-
template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(
|
|
618
|
+
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"
|
|
596
619
|
})
|
|
597
620
|
], ItemValidationSummaryComponent);
|
|
598
621
|
return ItemValidationSummaryComponent;
|
|
@@ -817,7 +840,7 @@ var FormsHtmlEditorComponent = /** @class */ (function (_super) {
|
|
|
817
840
|
FormsHtmlEditorComponent = __decorate([
|
|
818
841
|
Component({
|
|
819
842
|
selector: 'anatoly-forms-html-editor',
|
|
820
|
-
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
|
|
843
|
+
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"
|
|
821
844
|
})
|
|
822
845
|
], FormsHtmlEditorComponent);
|
|
823
846
|
return FormsHtmlEditorComponent;
|
|
@@ -900,39 +923,39 @@ var AnatolyCoreModule = /** @class */ (function () {
|
|
|
900
923
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
901
924
|
</file>
|
|
902
925
|
*/
|
|
903
|
-
var
|
|
904
|
-
__extends(
|
|
905
|
-
function
|
|
926
|
+
var BillingApiService = /** @class */ (function (_super) {
|
|
927
|
+
__extends(BillingApiService, _super);
|
|
928
|
+
function BillingApiService(http) {
|
|
906
929
|
var _this = _super.call(this, http) || this;
|
|
907
930
|
_this.http = http;
|
|
908
931
|
_this.baseUrl += 'billing/';
|
|
909
932
|
return _this;
|
|
910
933
|
}
|
|
911
|
-
|
|
934
|
+
BillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
|
|
912
935
|
this.postQS('requestNewSubscription', { requestedPlan: requestedPlan })
|
|
913
936
|
.subscribe(function (data) { }, function (e) { if (error)
|
|
914
937
|
error(); }, function () { if (success)
|
|
915
938
|
success(); });
|
|
916
939
|
};
|
|
917
|
-
|
|
940
|
+
BillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
|
|
918
941
|
this.postQS('cancelRequestedSubscription', null)
|
|
919
942
|
.subscribe(function (data) { }, function (e) { if (error)
|
|
920
943
|
error(); }, function () { if (success)
|
|
921
944
|
success(); });
|
|
922
945
|
};
|
|
923
|
-
|
|
946
|
+
BillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
|
|
924
947
|
this.postQS('buyAccess', { requestedPlan: requestedPlan })
|
|
925
948
|
.subscribe(function (data) { }, function (e) { if (error)
|
|
926
949
|
error(); }, function () { if (success)
|
|
927
950
|
success(); });
|
|
928
951
|
};
|
|
929
|
-
|
|
952
|
+
BillingApiService.ctorParameters = function () { return [
|
|
930
953
|
{ type: HttpClient }
|
|
931
954
|
]; };
|
|
932
|
-
|
|
955
|
+
BillingApiService = __decorate([
|
|
933
956
|
Injectable()
|
|
934
|
-
],
|
|
935
|
-
return
|
|
957
|
+
], BillingApiService);
|
|
958
|
+
return BillingApiService;
|
|
936
959
|
}(BaseApiService));
|
|
937
960
|
|
|
938
961
|
/*
|
|
@@ -986,7 +1009,7 @@ var BuyAccessButtonComponent = /** @class */ (function () {
|
|
|
986
1009
|
};
|
|
987
1010
|
BuyAccessButtonComponent.ctorParameters = function () { return [
|
|
988
1011
|
{ type: AppContextService },
|
|
989
|
-
{ type:
|
|
1012
|
+
{ type: BillingApiService }
|
|
990
1013
|
]; };
|
|
991
1014
|
__decorate([
|
|
992
1015
|
Input()
|
|
@@ -1092,7 +1115,7 @@ var UpgradePlanButtonComponent = /** @class */ (function () {
|
|
|
1092
1115
|
});
|
|
1093
1116
|
};
|
|
1094
1117
|
UpgradePlanButtonComponent.ctorParameters = function () { return [
|
|
1095
|
-
{ type:
|
|
1118
|
+
{ type: BillingApiService }
|
|
1096
1119
|
]; };
|
|
1097
1120
|
__decorate([
|
|
1098
1121
|
Input()
|
|
@@ -1278,7 +1301,7 @@ var AnatolyBillingModule = /** @class */ (function () {
|
|
|
1278
1301
|
BuyAccessButtonComponent
|
|
1279
1302
|
],
|
|
1280
1303
|
providers: [
|
|
1281
|
-
|
|
1304
|
+
BillingApiService
|
|
1282
1305
|
]
|
|
1283
1306
|
})
|
|
1284
1307
|
], AnatolyBillingModule);
|
|
@@ -1301,19 +1324,69 @@ var AnatolyBillingModule = /** @class */ (function () {
|
|
|
1301
1324
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1302
1325
|
</file>
|
|
1303
1326
|
*/
|
|
1304
|
-
var
|
|
1305
|
-
__extends(
|
|
1306
|
-
function
|
|
1327
|
+
var BaseGridReadService = /** @class */ (function (_super) {
|
|
1328
|
+
__extends(BaseGridReadService, _super);
|
|
1329
|
+
function BaseGridReadService(http) {
|
|
1307
1330
|
var _this = _super.call(this, []) || this;
|
|
1308
1331
|
_this.http = http;
|
|
1309
1332
|
_this.data = [];
|
|
1310
|
-
_this.baseUrl = Consts.ApiUrl;
|
|
1311
|
-
_this.baseReadUrl = _this.baseUrl + "getAll";
|
|
1312
1333
|
return _this;
|
|
1313
1334
|
}
|
|
1314
|
-
|
|
1335
|
+
BaseGridReadService.prototype.serializeParams = function (data) {
|
|
1315
1336
|
return data ? ('?' + $.param(data)) : '';
|
|
1316
1337
|
};
|
|
1338
|
+
BaseGridReadService.prototype.read = function (params, success, error) {
|
|
1339
|
+
var _this = this;
|
|
1340
|
+
if (this.data.length) {
|
|
1341
|
+
return _super.prototype.next.call(this, this.data);
|
|
1342
|
+
}
|
|
1343
|
+
var url = this.baseReadUrl;
|
|
1344
|
+
if (typeof params === 'undefined') {
|
|
1345
|
+
params = this.savedReadParams;
|
|
1346
|
+
}
|
|
1347
|
+
if (params) {
|
|
1348
|
+
url = this.baseReadUrl + ("" + this.serializeParams(params));
|
|
1349
|
+
this.savedReadParams = params;
|
|
1350
|
+
}
|
|
1351
|
+
this.http.get(url).pipe(map(function (res) { return res; })).subscribe(function (data) {
|
|
1352
|
+
_super.prototype.next.call(_this, data);
|
|
1353
|
+
if (success)
|
|
1354
|
+
success();
|
|
1355
|
+
}, function (e) {
|
|
1356
|
+
if (error)
|
|
1357
|
+
error(e);
|
|
1358
|
+
});
|
|
1359
|
+
};
|
|
1360
|
+
BaseGridReadService.ctorParameters = function () { return [
|
|
1361
|
+
{ type: HttpClient }
|
|
1362
|
+
]; };
|
|
1363
|
+
BaseGridReadService = __decorate([
|
|
1364
|
+
Injectable()
|
|
1365
|
+
], BaseGridReadService);
|
|
1366
|
+
return BaseGridReadService;
|
|
1367
|
+
}(BehaviorSubject));
|
|
1368
|
+
|
|
1369
|
+
/*
|
|
1370
|
+
<file>
|
|
1371
|
+
Authors:
|
|
1372
|
+
Vadim Osovitny
|
|
1373
|
+
|
|
1374
|
+
Created:
|
|
1375
|
+
29 Apr 2018
|
|
1376
|
+
|
|
1377
|
+
Version:
|
|
1378
|
+
1.0
|
|
1379
|
+
|
|
1380
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1381
|
+
</file>
|
|
1382
|
+
*/
|
|
1383
|
+
var BaseGridEditService = /** @class */ (function (_super) {
|
|
1384
|
+
__extends(BaseGridEditService, _super);
|
|
1385
|
+
function BaseGridEditService(http) {
|
|
1386
|
+
var _this = _super.call(this, http) || this;
|
|
1387
|
+
_this.http = http;
|
|
1388
|
+
return _this;
|
|
1389
|
+
}
|
|
1317
1390
|
BaseGridEditService.prototype.reset = function () {
|
|
1318
1391
|
this.data = [];
|
|
1319
1392
|
};
|
|
@@ -1327,25 +1400,6 @@ var BaseGridEditService = /** @class */ (function (_super) {
|
|
|
1327
1400
|
Object.assign(originalDataItem, dataItem);
|
|
1328
1401
|
_super.prototype.next.call(this, this.data);
|
|
1329
1402
|
};
|
|
1330
|
-
BaseGridEditService.prototype.read = function (params) {
|
|
1331
|
-
var _this = this;
|
|
1332
|
-
if (this.data.length) {
|
|
1333
|
-
return _super.prototype.next.call(this, this.data);
|
|
1334
|
-
}
|
|
1335
|
-
var url = this.baseReadUrl;
|
|
1336
|
-
if (typeof params === 'undefined') {
|
|
1337
|
-
params = this.savedReadParams;
|
|
1338
|
-
}
|
|
1339
|
-
if (typeof params !== 'undefined') {
|
|
1340
|
-
url = this.baseReadUrl + ("" + this.serializeParams(params));
|
|
1341
|
-
this.savedReadParams = params;
|
|
1342
|
-
}
|
|
1343
|
-
// this.http.get(url)
|
|
1344
|
-
// .map(res => <any[]>res)
|
|
1345
|
-
// .do(data => { this.data = data; }).subscribe(data => { super.next(data); });
|
|
1346
|
-
//}
|
|
1347
|
-
this.http.get(url).pipe(map(function (res) { return res; })).subscribe(function (data) { _super.prototype.next.call(_this, data); });
|
|
1348
|
-
};
|
|
1349
1403
|
BaseGridEditService.prototype.save = function (data, isNew, sucess) {
|
|
1350
1404
|
var _this = this;
|
|
1351
1405
|
var action = isNew ? 'add' : 'update';
|
|
@@ -1382,7 +1436,7 @@ var BaseGridEditService = /** @class */ (function (_super) {
|
|
|
1382
1436
|
Injectable()
|
|
1383
1437
|
], BaseGridEditService);
|
|
1384
1438
|
return BaseGridEditService;
|
|
1385
|
-
}(
|
|
1439
|
+
}(BaseGridReadService));
|
|
1386
1440
|
|
|
1387
1441
|
/*
|
|
1388
1442
|
<file>
|
|
@@ -1422,11 +1476,11 @@ var AnatolyDataModule = /** @class */ (function () {
|
|
|
1422
1476
|
return AnatolyDataModule;
|
|
1423
1477
|
}());
|
|
1424
1478
|
|
|
1425
|
-
//
|
|
1479
|
+
// Services
|
|
1426
1480
|
|
|
1427
1481
|
/**
|
|
1428
1482
|
* Generated bundle index. Do not edit.
|
|
1429
1483
|
*/
|
|
1430
1484
|
|
|
1431
|
-
export { Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyIdentityModule, AppContextService, BaseApiService,
|
|
1485
|
+
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 };
|
|
1432
1486
|
//# sourceMappingURL=osovitny-anatoly.js.map
|