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