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