@osovitny/anatoly 2.0.9 → 2.0.11
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 +669 -301
- package/bundles/osovitny-anatoly.umd.js.map +1 -1
- package/bundles/osovitny-anatoly.umd.min.js +2 -2
- package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
- package/esm2015/lib/core/alerts.js +5 -1
- package/esm2015/lib/core/core.module.js +21 -5
- package/esm2015/lib/core/go/base-go.service.js +38 -0
- package/esm2015/lib/core/guards/once-import.guard.js +24 -0
- package/esm2015/lib/core/guid.js +25 -0
- package/esm2015/lib/core/index.js +27 -4
- package/esm2015/lib/core/logging/globalErrorHandler.js +42 -0
- package/esm2015/lib/core/logging/logging.service.js +38 -0
- package/esm2015/lib/core/services/appcontext.service.js +5 -1
- package/esm2015/lib/core/subs.js +34 -0
- package/esm2015/lib/core/utils.js +29 -5
- package/esm2015/lib/data/base/base-api.service.js +22 -16
- package/esm2015/lib/data/base/grid/base-grid-edit.service.js +15 -13
- package/esm2015/lib/data/base/grid/base-grid-read.service.js +16 -9
- package/esm2015/lib/data/data.module.js +10 -10
- package/esm2015/lib/data/index.js +24 -6
- package/esm2015/lib/data/services/billing-api.service.js +32 -17
- package/esm2015/lib/ui/components/base-edit.component.js +11 -7
- package/esm2015/lib/ui/components/base.component.js +12 -8
- package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +12 -9
- package/esm2015/lib/ui/components/billing/subscribe-plan-button.component.js +10 -6
- package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +11 -7
- package/esm2015/lib/ui/components/content-header/content-header.component.js +8 -4
- package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +13 -8
- package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +9 -6
- package/esm2015/lib/ui/components/html-editor/html-editor.component.js +10 -7
- package/esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js +75 -18
- package/esm2015/lib/ui/components/identity/signin-button.component.js +8 -4
- package/esm2015/lib/ui/components/identity/signout-button.component.js +8 -4
- package/esm2015/lib/ui/components/identity/signup-button.component.js +6 -2
- package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +5 -1
- package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +5 -1
- package/esm2015/lib/ui/components/validation/validation-summary.component.js +5 -1
- package/esm2015/lib/ui/index.js +21 -3
- package/esm2015/lib/ui/ui.module.js +11 -6
- package/fesm2015/osovitny-anatoly.js +685 -280
- package/fesm2015/osovitny-anatoly.js.map +1 -1
- package/lib/core/core.module.d.ts +4 -0
- package/lib/core/guards/once-import.guard.d.ts +1 -0
- package/lib/core/guid.d.ts +3 -0
- package/lib/core/index.d.ts +5 -1
- package/lib/core/logging/globalErrorHandler.d.ts +6 -0
- package/lib/core/logging/logging.service.d.ts +5 -0
- package/lib/core/subs.d.ts +8 -0
- package/lib/core/utils.d.ts +4 -2
- package/lib/data/base/base-api.service.d.ts +2 -2
- package/lib/data/base/grid/base-grid-edit.service.d.ts +3 -3
- package/lib/data/base/grid/base-grid-read.service.d.ts +2 -2
- package/lib/data/index.d.ts +5 -5
- package/lib/data/services/billing-api.service.d.ts +2 -2
- package/lib/ui/components/base-edit.component.d.ts +2 -2
- package/lib/ui/components/billing/buyaccess-button.component.d.ts +3 -3
- package/lib/ui/components/billing/subscribe-plan-button.component.d.ts +2 -2
- package/lib/ui/components/billing/upgrade-plan-button.component.d.ts +1 -1
- package/lib/ui/components/content-header/content-header.component.d.ts +1 -1
- package/lib/ui/components/html-editor/base-html-editor.component.d.ts +2 -2
- package/lib/ui/components/html-editor/forms-html-editor.component.d.ts +1 -1
- package/lib/ui/components/html-editor/html-editor.component.d.ts +1 -1
- package/lib/ui/index.d.ts +1 -1
- package/lib/ui/ui.module.d.ts +1 -1
- package/package.json +1 -1
- package/esm2015/lib/core/services/base-go.service.js +0 -34
- /package/lib/core/{services → go}/base-go.service.d.ts +0 -0
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sweetalert2'), require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('@angular/common'), require('rxjs'), require('@angular/forms'), require('angular-froala-wysiwyg')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', 'sweetalert2', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', '@angular/common', 'rxjs', '@angular/forms', 'angular-froala-wysiwyg'], factory) :
|
|
4
|
-
(global = global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.Swal, global.ng.core, global.ng.router, global.ng.common.http, global.rxjs.operators, global.ng.common, global.rxjs, global.ng.forms, global.angularFroalaWysiwyg));
|
|
5
|
-
}(this, (function (exports, Swal,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sweetalert2'), require('uuid'), require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('@angular/common'), require('rxjs'), require('@angular/forms'), require('angular-froala-wysiwyg')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', 'sweetalert2', 'uuid', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', '@angular/common', 'rxjs', '@angular/forms', 'angular-froala-wysiwyg'], factory) :
|
|
4
|
+
(global = global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.Swal, global.uuid, global.ng.core, global.ng.router, global.ng.common.http, global.rxjs.operators, global.ng.common, global.rxjs, global.ng.forms, global.angularFroalaWysiwyg));
|
|
5
|
+
}(this, (function (exports, Swal, uuid, i0, router, http, operators, common, rxjs, forms, angularFroalaWysiwyg) { 'use strict';
|
|
6
6
|
|
|
7
7
|
Swal = Swal && Object.prototype.hasOwnProperty.call(Swal, 'default') ? Swal['default'] : Swal;
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
<file>
|
|
11
|
+
Project:
|
|
12
|
+
@osovitny/anatoly
|
|
13
|
+
|
|
11
14
|
Authors:
|
|
12
15
|
Vadim Osovitny
|
|
16
|
+
Anatoly Osovitny
|
|
13
17
|
|
|
14
18
|
Created:
|
|
15
19
|
4 Mar 2020
|
|
@@ -151,11 +155,15 @@
|
|
|
151
155
|
|
|
152
156
|
/*
|
|
153
157
|
<file>
|
|
158
|
+
Project:
|
|
159
|
+
@osovitny/anatoly
|
|
160
|
+
|
|
154
161
|
Authors:
|
|
155
162
|
Vadim Osovitny
|
|
163
|
+
Anatoly Osovitny
|
|
156
164
|
|
|
157
165
|
Created:
|
|
158
|
-
|
|
166
|
+
26 Jun 2020
|
|
159
167
|
|
|
160
168
|
Version:
|
|
161
169
|
1.0
|
|
@@ -166,23 +174,117 @@
|
|
|
166
174
|
var Utils = /** @class */ (function () {
|
|
167
175
|
function Utils() {
|
|
168
176
|
}
|
|
169
|
-
Utils.
|
|
170
|
-
return Utils.
|
|
177
|
+
Utils.getValueByNameInQS = function (name) {
|
|
178
|
+
return Utils.getValueByName(location.search, name);
|
|
171
179
|
};
|
|
172
|
-
Utils.
|
|
180
|
+
Utils.getValueByName = function (url, name) {
|
|
173
181
|
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
174
182
|
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
|
|
175
183
|
return results === null
|
|
176
184
|
? ""
|
|
177
185
|
: decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
178
186
|
};
|
|
187
|
+
Utils.copyToClipBoard = function (event, val) {
|
|
188
|
+
event.preventDefault();
|
|
189
|
+
var selBox = document.createElement("textarea");
|
|
190
|
+
selBox.style.position = "fixed";
|
|
191
|
+
selBox.style.left = "0";
|
|
192
|
+
selBox.style.top = "0";
|
|
193
|
+
selBox.style.opacity = "0";
|
|
194
|
+
selBox.value = val;
|
|
195
|
+
document.body.appendChild(selBox);
|
|
196
|
+
selBox.focus();
|
|
197
|
+
selBox.select();
|
|
198
|
+
document.execCommand("copy");
|
|
199
|
+
document.body.removeChild(selBox);
|
|
200
|
+
};
|
|
201
|
+
Utils.downloadFile = function (name, url) {
|
|
202
|
+
var link = document.createElement("a");
|
|
203
|
+
link.download = name;
|
|
204
|
+
link.href = url;
|
|
205
|
+
link.click();
|
|
206
|
+
};
|
|
179
207
|
return Utils;
|
|
180
208
|
}());
|
|
181
209
|
|
|
182
210
|
/*
|
|
183
211
|
<file>
|
|
212
|
+
Project:
|
|
213
|
+
@osovitny/anatoly
|
|
214
|
+
|
|
215
|
+
Authors:
|
|
216
|
+
Vadim Osovitny
|
|
217
|
+
Anatoly Osovitny
|
|
218
|
+
|
|
219
|
+
Created:
|
|
220
|
+
26 Jun 2020
|
|
221
|
+
|
|
222
|
+
Version:
|
|
223
|
+
1.0
|
|
224
|
+
|
|
225
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
226
|
+
</file>
|
|
227
|
+
*/
|
|
228
|
+
var Subs = /** @class */ (function () {
|
|
229
|
+
function Subs() {
|
|
230
|
+
this.subs = [];
|
|
231
|
+
}
|
|
232
|
+
Subs.prototype.add = function () {
|
|
233
|
+
var subscriptions = [];
|
|
234
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
235
|
+
subscriptions[_i] = arguments[_i];
|
|
236
|
+
}
|
|
237
|
+
this.subs = this.subs.concat(subscriptions);
|
|
238
|
+
};
|
|
239
|
+
Object.defineProperty(Subs.prototype, "sink", {
|
|
240
|
+
set: function (subscription) {
|
|
241
|
+
this.subs.push(subscription);
|
|
242
|
+
},
|
|
243
|
+
enumerable: false,
|
|
244
|
+
configurable: true
|
|
245
|
+
});
|
|
246
|
+
Subs.prototype.unsubscribe = function () {
|
|
247
|
+
this.subs.forEach(function (sub) { return sub && sub.unsubscribe(); });
|
|
248
|
+
this.subs = [];
|
|
249
|
+
};
|
|
250
|
+
return Subs;
|
|
251
|
+
}());
|
|
252
|
+
|
|
253
|
+
/*
|
|
254
|
+
<file>
|
|
255
|
+
Project:
|
|
256
|
+
@osovitny/anatoly
|
|
257
|
+
|
|
258
|
+
Authors:
|
|
259
|
+
Vadim Osovitny
|
|
260
|
+
Anatoly Osovitny
|
|
261
|
+
|
|
262
|
+
Created:
|
|
263
|
+
26 Jun 2020
|
|
264
|
+
|
|
265
|
+
Version:
|
|
266
|
+
1.0
|
|
267
|
+
|
|
268
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
269
|
+
</file>
|
|
270
|
+
*/
|
|
271
|
+
var Guid = /** @class */ (function () {
|
|
272
|
+
function Guid() {
|
|
273
|
+
}
|
|
274
|
+
Guid.newGuid = function () {
|
|
275
|
+
return uuid.v4();
|
|
276
|
+
};
|
|
277
|
+
return Guid;
|
|
278
|
+
}());
|
|
279
|
+
|
|
280
|
+
/*
|
|
281
|
+
<file>
|
|
282
|
+
Project:
|
|
283
|
+
@osovitny/anatoly
|
|
284
|
+
|
|
184
285
|
Authors:
|
|
185
286
|
Vadim Osovitny
|
|
287
|
+
Anatoly Osovitny
|
|
186
288
|
|
|
187
289
|
Created:
|
|
188
290
|
17 Jun 2018
|
|
@@ -205,7 +307,7 @@
|
|
|
205
307
|
return BaseGoService;
|
|
206
308
|
}());
|
|
207
309
|
BaseGoService.decorators = [
|
|
208
|
-
{ type:
|
|
310
|
+
{ type: i0.Injectable }
|
|
209
311
|
];
|
|
210
312
|
BaseGoService.ctorParameters = function () { return [
|
|
211
313
|
{ type: router.ActivatedRoute },
|
|
@@ -515,11 +617,15 @@
|
|
|
515
617
|
|
|
516
618
|
/*
|
|
517
619
|
<file>
|
|
620
|
+
Project:
|
|
621
|
+
@osovitny/anatoly
|
|
622
|
+
|
|
518
623
|
Authors:
|
|
519
624
|
Vadim Osovitny
|
|
625
|
+
Anatoly Osovitny
|
|
520
626
|
|
|
521
627
|
Created:
|
|
522
|
-
|
|
628
|
+
13 Nov 2017
|
|
523
629
|
|
|
524
630
|
Version:
|
|
525
631
|
1.0
|
|
@@ -533,43 +639,45 @@
|
|
|
533
639
|
this.baseUrl = "";
|
|
534
640
|
}
|
|
535
641
|
BaseApiService.prototype.serializeParams = function (data) {
|
|
536
|
-
return data ?
|
|
642
|
+
return data ? "?" + $.param(data) : "";
|
|
537
643
|
};
|
|
538
644
|
//api
|
|
539
645
|
BaseApiService.prototype.get = function (action, data, responseType) {
|
|
540
646
|
if (!responseType) {
|
|
541
|
-
responseType =
|
|
647
|
+
responseType = "json";
|
|
542
648
|
}
|
|
543
649
|
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
544
|
-
return this.http
|
|
650
|
+
return this.http
|
|
651
|
+
.get(url, { responseType: responseType })
|
|
652
|
+
.pipe(operators.map(function (res) { return res; }));
|
|
545
653
|
};
|
|
546
654
|
BaseApiService.prototype.post = function (action, data, responseType) {
|
|
547
655
|
if (!responseType) {
|
|
548
|
-
responseType =
|
|
656
|
+
responseType = "text";
|
|
549
657
|
}
|
|
550
658
|
var url = this.baseUrl + "/" + action;
|
|
551
659
|
return this.http.post(url, data, { responseType: responseType });
|
|
552
660
|
};
|
|
553
661
|
BaseApiService.prototype.postQS = function (action, data, responseType) {
|
|
554
662
|
if (!responseType) {
|
|
555
|
-
responseType =
|
|
663
|
+
responseType = "text";
|
|
556
664
|
}
|
|
557
665
|
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
558
666
|
return this.http.post(url, null, { responseType: responseType });
|
|
559
667
|
};
|
|
560
668
|
BaseApiService.prototype.delete = function (action, data, responseType) {
|
|
561
669
|
if (!responseType) {
|
|
562
|
-
responseType =
|
|
670
|
+
responseType = "text";
|
|
563
671
|
}
|
|
564
672
|
var url = this.baseUrl + "/" + action + this.serializeParams(data);
|
|
565
673
|
return this.http.delete(url, { responseType: responseType });
|
|
566
674
|
};
|
|
567
675
|
//gets
|
|
568
676
|
BaseApiService.prototype.getById = function (id) {
|
|
569
|
-
return this.get(
|
|
677
|
+
return this.get("getById", { id: id });
|
|
570
678
|
};
|
|
571
679
|
BaseApiService.prototype.getAll = function (data) {
|
|
572
|
-
return this.get(
|
|
680
|
+
return this.get("getall", data).pipe(operators.map(function (res) { return res; }));
|
|
573
681
|
};
|
|
574
682
|
BaseApiService.prototype.getJsonFile = function (fileName, jsonUrl, jsonVersion) {
|
|
575
683
|
if (!jsonUrl) {
|
|
@@ -578,17 +686,17 @@
|
|
|
578
686
|
if (!jsonVersion) {
|
|
579
687
|
jsonVersion = "1.0";
|
|
580
688
|
}
|
|
581
|
-
var url = jsonUrl + "/" + fileName +
|
|
689
|
+
var url = jsonUrl + "/" + fileName + "?" + jsonVersion;
|
|
582
690
|
return this.http.get(url).pipe(operators.map(function (res) { return res; }));
|
|
583
691
|
};
|
|
584
692
|
BaseApiService.prototype.getNewGuid = function () {
|
|
585
693
|
var url = this.baseUrl + "/getNewGuid";
|
|
586
|
-
return this.http.get(url, { responseType:
|
|
694
|
+
return this.http.get(url, { responseType: "text" });
|
|
587
695
|
};
|
|
588
696
|
return BaseApiService;
|
|
589
697
|
}());
|
|
590
698
|
BaseApiService.decorators = [
|
|
591
|
-
{ type:
|
|
699
|
+
{ type: i0.Injectable }
|
|
592
700
|
];
|
|
593
701
|
BaseApiService.ctorParameters = function () { return [
|
|
594
702
|
{ type: http.HttpClient }
|
|
@@ -642,24 +750,152 @@
|
|
|
642
750
|
return AppContextService;
|
|
643
751
|
}(BaseApiService));
|
|
644
752
|
AppContextService.decorators = [
|
|
645
|
-
{ type:
|
|
753
|
+
{ type: i0.Injectable }
|
|
646
754
|
];
|
|
647
755
|
AppContextService.ctorParameters = function () { return [
|
|
648
756
|
{ type: http.HttpClient }
|
|
649
757
|
]; };
|
|
650
758
|
|
|
759
|
+
/*
|
|
760
|
+
<file>
|
|
761
|
+
Project:
|
|
762
|
+
@osovitny/anatoly
|
|
763
|
+
|
|
764
|
+
Authors:
|
|
765
|
+
Vadim Osovitny
|
|
766
|
+
Anatoly Osovitny
|
|
767
|
+
|
|
768
|
+
Created:
|
|
769
|
+
26 Jun 2020
|
|
770
|
+
|
|
771
|
+
Version:
|
|
772
|
+
1.0
|
|
773
|
+
|
|
774
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
775
|
+
</file>
|
|
776
|
+
*/
|
|
777
|
+
var LoggingService = /** @class */ (function () {
|
|
778
|
+
function LoggingService() {
|
|
779
|
+
}
|
|
780
|
+
LoggingService.prototype.logError = function (error) {
|
|
781
|
+
console.error(error);
|
|
782
|
+
};
|
|
783
|
+
LoggingService.prototype.logInformation = function (info) {
|
|
784
|
+
console.info(info);
|
|
785
|
+
};
|
|
786
|
+
return LoggingService;
|
|
787
|
+
}());
|
|
788
|
+
LoggingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LoggingService_Factory() { return new LoggingService(); }, token: LoggingService, providedIn: "root" });
|
|
789
|
+
LoggingService.decorators = [
|
|
790
|
+
{ type: i0.Injectable, args: [{
|
|
791
|
+
providedIn: "root",
|
|
792
|
+
},] }
|
|
793
|
+
];
|
|
794
|
+
LoggingService.ctorParameters = function () { return []; };
|
|
795
|
+
|
|
796
|
+
/*
|
|
797
|
+
<file>
|
|
798
|
+
Project:
|
|
799
|
+
@osovitny/anatoly
|
|
800
|
+
|
|
801
|
+
Authors:
|
|
802
|
+
Vadim Osovitny
|
|
803
|
+
Anatoly Osovitny
|
|
804
|
+
|
|
805
|
+
Created:
|
|
806
|
+
26 Jun 2020
|
|
807
|
+
|
|
808
|
+
Version:
|
|
809
|
+
1.0
|
|
810
|
+
|
|
811
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
812
|
+
</file>
|
|
813
|
+
*/
|
|
814
|
+
var GlobalErrorHandler = /** @class */ (function () {
|
|
815
|
+
function GlobalErrorHandler(injector) {
|
|
816
|
+
this.injector = injector;
|
|
817
|
+
}
|
|
818
|
+
GlobalErrorHandler.prototype.handleError = function (error) {
|
|
819
|
+
var loggingService = this.injector.get(LoggingService);
|
|
820
|
+
loggingService.logError(error);
|
|
821
|
+
// IMPORTANT: Rethrow the error otherwise it gets swallowed
|
|
822
|
+
throw error;
|
|
823
|
+
};
|
|
824
|
+
return GlobalErrorHandler;
|
|
825
|
+
}());
|
|
826
|
+
GlobalErrorHandler.decorators = [
|
|
827
|
+
{ type: i0.Injectable }
|
|
828
|
+
];
|
|
829
|
+
GlobalErrorHandler.ctorParameters = function () { return [
|
|
830
|
+
{ type: i0.Injector }
|
|
831
|
+
]; };
|
|
832
|
+
|
|
833
|
+
/*
|
|
834
|
+
<file>
|
|
835
|
+
Project:
|
|
836
|
+
@osovitny/anatoly
|
|
837
|
+
|
|
838
|
+
Authors:
|
|
839
|
+
Vadim Osovitny
|
|
840
|
+
Anatoly Osovitny
|
|
841
|
+
|
|
842
|
+
Created:
|
|
843
|
+
26 Jun 2020
|
|
844
|
+
|
|
845
|
+
Version:
|
|
846
|
+
1.0
|
|
847
|
+
|
|
848
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
849
|
+
</file>
|
|
850
|
+
*/
|
|
851
|
+
function throwIfAlreadyLoaded(parentModule, moduleName) {
|
|
852
|
+
if (parentModule) {
|
|
853
|
+
throw new Error(moduleName + " has already been loaded. Import " + moduleName + " modules in the AppModule only.");
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
var providers = [
|
|
858
|
+
LoggingService,
|
|
859
|
+
AppContextService,
|
|
860
|
+
];
|
|
861
|
+
var InjectorInstance;
|
|
651
862
|
var AnatolyCoreModule = /** @class */ (function () {
|
|
652
|
-
function AnatolyCoreModule() {
|
|
863
|
+
function AnatolyCoreModule(injector, parentModule) {
|
|
864
|
+
this.injector = injector;
|
|
865
|
+
throwIfAlreadyLoaded(parentModule, "AnatolyCoreModule");
|
|
866
|
+
InjectorInstance = this.injector;
|
|
653
867
|
}
|
|
654
868
|
return AnatolyCoreModule;
|
|
655
869
|
}());
|
|
656
870
|
AnatolyCoreModule.decorators = [
|
|
657
|
-
{ type:
|
|
658
|
-
declarations: [],
|
|
871
|
+
{ type: i0.NgModule, args: [{
|
|
659
872
|
imports: [common.CommonModule],
|
|
660
|
-
providers:
|
|
873
|
+
providers: __spread(providers),
|
|
661
874
|
},] }
|
|
662
|
-
];
|
|
875
|
+
];
|
|
876
|
+
AnatolyCoreModule.ctorParameters = function () { return [
|
|
877
|
+
{ type: i0.Injector },
|
|
878
|
+
{ type: AnatolyCoreModule, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
|
|
879
|
+
]; };
|
|
880
|
+
|
|
881
|
+
/*
|
|
882
|
+
<file>
|
|
883
|
+
Project:
|
|
884
|
+
@osovitny/anatoly
|
|
885
|
+
./go/base-go.service
|
|
886
|
+
Authors:
|
|
887
|
+
Vadim Osovitny
|
|
888
|
+
Anatoly Osovitny
|
|
889
|
+
|
|
890
|
+
Created:
|
|
891
|
+
26 Jun 2020
|
|
892
|
+
|
|
893
|
+
Version:
|
|
894
|
+
1.0
|
|
895
|
+
|
|
896
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
897
|
+
</file>
|
|
898
|
+
*/
|
|
663
899
|
|
|
664
900
|
var BaseGridReadService = /** @class */ (function (_super) {
|
|
665
901
|
__extends(BaseGridReadService, _super);
|
|
@@ -671,7 +907,7 @@
|
|
|
671
907
|
return _this;
|
|
672
908
|
}
|
|
673
909
|
BaseGridReadService.prototype.serializeParams = function (data) {
|
|
674
|
-
return data ?
|
|
910
|
+
return data ? "?" + $.param(data) : "";
|
|
675
911
|
};
|
|
676
912
|
BaseGridReadService.prototype.read = function (params, success, error) {
|
|
677
913
|
var _this = this;
|
|
@@ -679,14 +915,17 @@
|
|
|
679
915
|
return _super.prototype.next.call(this, this.data);
|
|
680
916
|
}
|
|
681
917
|
var url = this.baseReadUrl;
|
|
682
|
-
if (typeof params ===
|
|
918
|
+
if (typeof params === "undefined") {
|
|
683
919
|
params = this.savedReadParams;
|
|
684
920
|
}
|
|
685
921
|
if (params) {
|
|
686
922
|
url = this.baseReadUrl + ("" + this.serializeParams(params));
|
|
687
923
|
this.savedReadParams = params;
|
|
688
924
|
}
|
|
689
|
-
this.http
|
|
925
|
+
this.http
|
|
926
|
+
.get(url)
|
|
927
|
+
.pipe(operators.map(function (res) { return res; }))
|
|
928
|
+
.subscribe(function (data) {
|
|
690
929
|
_super.prototype.next.call(_this, data);
|
|
691
930
|
if (success)
|
|
692
931
|
success();
|
|
@@ -698,7 +937,7 @@
|
|
|
698
937
|
return BaseGridReadService;
|
|
699
938
|
}(rxjs.BehaviorSubject));
|
|
700
939
|
BaseGridReadService.decorators = [
|
|
701
|
-
{ type:
|
|
940
|
+
{ type: i0.Injectable }
|
|
702
941
|
];
|
|
703
942
|
BaseGridReadService.ctorParameters = function () { return [
|
|
704
943
|
{ type: http.HttpClient }
|
|
@@ -727,10 +966,9 @@
|
|
|
727
966
|
};
|
|
728
967
|
BaseGridEditService.prototype.save = function (data, isNew, sucess) {
|
|
729
968
|
var _this = this;
|
|
730
|
-
var action = isNew ?
|
|
969
|
+
var action = isNew ? "add" : "update";
|
|
731
970
|
this.reset();
|
|
732
|
-
this.post(action, data).subscribe(function () {
|
|
733
|
-
}, function () {
|
|
971
|
+
this.post(action, data).subscribe(function () { }, function () {
|
|
734
972
|
_this.read();
|
|
735
973
|
}, function () {
|
|
736
974
|
_this.read();
|
|
@@ -741,8 +979,7 @@
|
|
|
741
979
|
BaseGridEditService.prototype.remove = function (data, sucess) {
|
|
742
980
|
var _this = this;
|
|
743
981
|
this.reset();
|
|
744
|
-
this.post(
|
|
745
|
-
}, function () {
|
|
982
|
+
this.post("remove", data).subscribe(function () { }, function () {
|
|
746
983
|
_this.read();
|
|
747
984
|
}, function () {
|
|
748
985
|
_this.read();
|
|
@@ -757,7 +994,7 @@
|
|
|
757
994
|
return BaseGridEditService;
|
|
758
995
|
}(BaseGridReadService));
|
|
759
996
|
BaseGridEditService.decorators = [
|
|
760
|
-
{ type:
|
|
997
|
+
{ type: i0.Injectable }
|
|
761
998
|
];
|
|
762
999
|
BaseGridEditService.ctorParameters = function () { return [
|
|
763
1000
|
{ type: http.HttpClient }
|
|
@@ -768,12 +1005,13 @@
|
|
|
768
1005
|
function BillingApiService(http) {
|
|
769
1006
|
var _this = _super.call(this, http) || this;
|
|
770
1007
|
_this.http = http;
|
|
771
|
-
_this.baseUrl +=
|
|
1008
|
+
_this.baseUrl += "billing/";
|
|
772
1009
|
return _this;
|
|
773
1010
|
}
|
|
774
1011
|
BillingApiService.prototype.requestNewSubscription = function (requestedPlan, success, error) {
|
|
775
|
-
this.postQS(
|
|
776
|
-
|
|
1012
|
+
this.postQS("requestNewSubscription", {
|
|
1013
|
+
requestedPlan: requestedPlan,
|
|
1014
|
+
}).subscribe(function (data) { }, function (e) {
|
|
777
1015
|
if (error)
|
|
778
1016
|
error();
|
|
779
1017
|
}, function () {
|
|
@@ -782,8 +1020,7 @@
|
|
|
782
1020
|
});
|
|
783
1021
|
};
|
|
784
1022
|
BillingApiService.prototype.cancelRequestedSubscription = function (success, error) {
|
|
785
|
-
this.postQS(
|
|
786
|
-
.subscribe(function (data) { }, function (e) {
|
|
1023
|
+
this.postQS("cancelRequestedSubscription", null).subscribe(function (data) { }, function (e) {
|
|
787
1024
|
if (error)
|
|
788
1025
|
error();
|
|
789
1026
|
}, function () {
|
|
@@ -792,8 +1029,7 @@
|
|
|
792
1029
|
});
|
|
793
1030
|
};
|
|
794
1031
|
BillingApiService.prototype.buyAccess = function (requestedPlan, success, error) {
|
|
795
|
-
this.postQS(
|
|
796
|
-
.subscribe(function (data) { }, function (e) {
|
|
1032
|
+
this.postQS("buyAccess", { requestedPlan: requestedPlan }).subscribe(function (data) { }, function (e) {
|
|
797
1033
|
if (error)
|
|
798
1034
|
error();
|
|
799
1035
|
}, function () {
|
|
@@ -804,7 +1040,7 @@
|
|
|
804
1040
|
return BillingApiService;
|
|
805
1041
|
}(BaseApiService));
|
|
806
1042
|
BillingApiService.decorators = [
|
|
807
|
-
{ type:
|
|
1043
|
+
{ type: i0.Injectable }
|
|
808
1044
|
];
|
|
809
1045
|
BillingApiService.ctorParameters = function () { return [
|
|
810
1046
|
{ type: http.HttpClient }
|
|
@@ -812,8 +1048,12 @@
|
|
|
812
1048
|
|
|
813
1049
|
/*
|
|
814
1050
|
<file>
|
|
1051
|
+
Project:
|
|
1052
|
+
@osovitny/anatoly
|
|
1053
|
+
|
|
815
1054
|
Authors:
|
|
816
1055
|
Vadim Osovitny
|
|
1056
|
+
Anatoly Osovitny
|
|
817
1057
|
|
|
818
1058
|
Created:
|
|
819
1059
|
4 Mar 2020
|
|
@@ -830,22 +1070,109 @@
|
|
|
830
1070
|
return AnatolyDataModule;
|
|
831
1071
|
}());
|
|
832
1072
|
AnatolyDataModule.decorators = [
|
|
833
|
-
{ type:
|
|
834
|
-
imports: [
|
|
835
|
-
|
|
836
|
-
],
|
|
837
|
-
providers: [
|
|
838
|
-
BillingApiService
|
|
839
|
-
]
|
|
1073
|
+
{ type: i0.NgModule, args: [{
|
|
1074
|
+
imports: [common.CommonModule],
|
|
1075
|
+
providers: [BillingApiService],
|
|
840
1076
|
},] }
|
|
841
1077
|
];
|
|
842
1078
|
|
|
843
|
-
|
|
1079
|
+
/*
|
|
1080
|
+
<file>
|
|
1081
|
+
Project:
|
|
1082
|
+
@osovitny/anatoly
|
|
1083
|
+
|
|
1084
|
+
Authors:
|
|
1085
|
+
Vadim Osovitny
|
|
1086
|
+
Anatoly Osovitny
|
|
1087
|
+
|
|
1088
|
+
Created:
|
|
1089
|
+
4 Mar 2020
|
|
1090
|
+
|
|
1091
|
+
Version:
|
|
1092
|
+
1.0
|
|
1093
|
+
|
|
1094
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1095
|
+
</file>
|
|
1096
|
+
*/
|
|
1097
|
+
|
|
1098
|
+
/*
|
|
1099
|
+
<file>
|
|
1100
|
+
Project:
|
|
1101
|
+
@osovitny/anatoly
|
|
1102
|
+
|
|
1103
|
+
Authors:
|
|
1104
|
+
Vadim Osovitny
|
|
1105
|
+
Anatoly Osovitny
|
|
1106
|
+
|
|
1107
|
+
Created:
|
|
1108
|
+
14 Aug 2018
|
|
1109
|
+
|
|
1110
|
+
Version:
|
|
1111
|
+
1.0
|
|
1112
|
+
|
|
1113
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1114
|
+
</file>
|
|
1115
|
+
*/
|
|
1116
|
+
var BuyAccessButtonComponent = /** @class */ (function () {
|
|
1117
|
+
function BuyAccessButtonComponent(appcontext, api) {
|
|
1118
|
+
this.appcontext = appcontext;
|
|
1119
|
+
this.api = api;
|
|
1120
|
+
this.contextUpdated = false;
|
|
1121
|
+
this.isUserSignedIn = false;
|
|
1122
|
+
this.currentPlan = 0;
|
|
1123
|
+
this.currentPlanTitle = "";
|
|
1124
|
+
}
|
|
1125
|
+
BuyAccessButtonComponent.prototype.ngOnInit = function () {
|
|
1126
|
+
var _this = this;
|
|
1127
|
+
if (!this.appcontext.isUserSignedIn()) {
|
|
1128
|
+
this.contextUpdated = true;
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
this.appcontext.getCurrent(function (current) {
|
|
1132
|
+
_this.isUserSignedIn = current.isUserSignedIn;
|
|
1133
|
+
if (_this.isUserSignedIn) {
|
|
1134
|
+
_this.currentPlan = current.account.billingPlan;
|
|
1135
|
+
_this.currentPlanTitle = current.account.billingPlanAsString;
|
|
1136
|
+
}
|
|
1137
|
+
_this.contextUpdated = true;
|
|
1138
|
+
});
|
|
1139
|
+
};
|
|
1140
|
+
BuyAccessButtonComponent.prototype.onBuyPlan = function () {
|
|
1141
|
+
var text = "Requested plan: " + this.plantitle + " ";
|
|
1142
|
+
var that = this;
|
|
1143
|
+
Alerts.AreYouSure(text, "Buying access", "Confirm change", "Cancel", function () {
|
|
1144
|
+
that.api.buyAccess(that.plan, function () {
|
|
1145
|
+
Alerts.Success("Access Granted", null, function () {
|
|
1146
|
+
window.location.reload();
|
|
1147
|
+
});
|
|
1148
|
+
});
|
|
1149
|
+
});
|
|
1150
|
+
};
|
|
1151
|
+
return BuyAccessButtonComponent;
|
|
1152
|
+
}());
|
|
1153
|
+
BuyAccessButtonComponent.decorators = [
|
|
1154
|
+
{ type: i0.Component, args: [{
|
|
1155
|
+
selector: "anatoly-buyaccess-button",
|
|
1156
|
+
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"
|
|
1157
|
+
},] }
|
|
1158
|
+
];
|
|
1159
|
+
BuyAccessButtonComponent.ctorParameters = function () { return [
|
|
1160
|
+
{ type: AppContextService },
|
|
1161
|
+
{ type: BillingApiService }
|
|
1162
|
+
]; };
|
|
1163
|
+
BuyAccessButtonComponent.propDecorators = {
|
|
1164
|
+
plan: [{ type: i0.Input }],
|
|
1165
|
+
plantitle: [{ type: i0.Input }]
|
|
1166
|
+
};
|
|
844
1167
|
|
|
845
1168
|
/*
|
|
846
1169
|
<file>
|
|
1170
|
+
Project:
|
|
1171
|
+
@osovitny/anatoly
|
|
1172
|
+
|
|
847
1173
|
Authors:
|
|
848
1174
|
Vadim Osovitny
|
|
1175
|
+
Anatoly Osovitny
|
|
849
1176
|
|
|
850
1177
|
Created:
|
|
851
1178
|
1 Jun 2018
|
|
@@ -862,9 +1189,9 @@
|
|
|
862
1189
|
this.contextUpdated = false;
|
|
863
1190
|
this.isUserSignedIn = false;
|
|
864
1191
|
this.currentPlan = 0;
|
|
865
|
-
this.currentPlanTitle =
|
|
1192
|
+
this.currentPlanTitle = "";
|
|
866
1193
|
this.requestedPlan = 0;
|
|
867
|
-
this.requestedPlanTitle =
|
|
1194
|
+
this.requestedPlanTitle = "";
|
|
868
1195
|
}
|
|
869
1196
|
SubscribePlanButtonComponent.prototype.ngOnInit = function () {
|
|
870
1197
|
var _this = this;
|
|
@@ -886,8 +1213,8 @@
|
|
|
886
1213
|
return SubscribePlanButtonComponent;
|
|
887
1214
|
}());
|
|
888
1215
|
SubscribePlanButtonComponent.decorators = [
|
|
889
|
-
{ type:
|
|
890
|
-
selector:
|
|
1216
|
+
{ type: i0.Component, args: [{
|
|
1217
|
+
selector: "anatoly-subscribe-plan-button",
|
|
891
1218
|
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"
|
|
892
1219
|
},] }
|
|
893
1220
|
];
|
|
@@ -895,14 +1222,18 @@
|
|
|
895
1222
|
{ type: AppContextService }
|
|
896
1223
|
]; };
|
|
897
1224
|
SubscribePlanButtonComponent.propDecorators = {
|
|
898
|
-
plan: [{ type:
|
|
899
|
-
plantitle: [{ type:
|
|
1225
|
+
plan: [{ type: i0.Input }],
|
|
1226
|
+
plantitle: [{ type: i0.Input }]
|
|
900
1227
|
};
|
|
901
1228
|
|
|
902
1229
|
/*
|
|
903
1230
|
<file>
|
|
1231
|
+
Project:
|
|
1232
|
+
@osovitny/anatoly
|
|
1233
|
+
|
|
904
1234
|
Authors:
|
|
905
1235
|
Vadim Osovitny
|
|
1236
|
+
Anatoly Osovitny
|
|
906
1237
|
|
|
907
1238
|
Created:
|
|
908
1239
|
12 Nov 2017
|
|
@@ -921,9 +1252,9 @@
|
|
|
921
1252
|
UpgradePlanButtonComponent.prototype.onUpgradePlan = function () {
|
|
922
1253
|
var text = "Current plan: " + this.currentplantitle + " New plan: " + this.requestedplantitle;
|
|
923
1254
|
var that = this;
|
|
924
|
-
Alerts.AreYouSure(text,
|
|
1255
|
+
Alerts.AreYouSure(text, "Change billing plan", "Confirm change", "Cancel", function () {
|
|
925
1256
|
that.api.requestNewSubscription(that.requestedplan, function () {
|
|
926
|
-
Alerts.Success(
|
|
1257
|
+
Alerts.Success("Your request for changing plan has been sent.", null, function () {
|
|
927
1258
|
window.location.reload();
|
|
928
1259
|
});
|
|
929
1260
|
});
|
|
@@ -932,8 +1263,8 @@
|
|
|
932
1263
|
return UpgradePlanButtonComponent;
|
|
933
1264
|
}());
|
|
934
1265
|
UpgradePlanButtonComponent.decorators = [
|
|
935
|
-
{ type:
|
|
936
|
-
selector:
|
|
1266
|
+
{ type: i0.Component, args: [{
|
|
1267
|
+
selector: "anatoly-upgrade-plan-button",
|
|
937
1268
|
template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
|
|
938
1269
|
},] }
|
|
939
1270
|
];
|
|
@@ -941,19 +1272,22 @@
|
|
|
941
1272
|
{ type: BillingApiService }
|
|
942
1273
|
]; };
|
|
943
1274
|
UpgradePlanButtonComponent.propDecorators = {
|
|
944
|
-
currentplantitle: [{ type:
|
|
945
|
-
requestedplan: [{ type:
|
|
946
|
-
requestedplantitle: [{ type:
|
|
1275
|
+
currentplantitle: [{ type: i0.Input }],
|
|
1276
|
+
requestedplan: [{ type: i0.Input }],
|
|
1277
|
+
requestedplantitle: [{ type: i0.Input }]
|
|
947
1278
|
};
|
|
948
1279
|
|
|
949
1280
|
/*
|
|
950
1281
|
<file>
|
|
1282
|
+
Project:
|
|
1283
|
+
@osovitny/anatoly
|
|
1284
|
+
|
|
951
1285
|
Authors:
|
|
952
1286
|
Vadim Osovitny
|
|
953
1287
|
Anatoly Osovitny
|
|
954
1288
|
|
|
955
1289
|
Created:
|
|
956
|
-
|
|
1290
|
+
4 Jul 2018
|
|
957
1291
|
|
|
958
1292
|
Version:
|
|
959
1293
|
1.0
|
|
@@ -961,62 +1295,30 @@
|
|
|
961
1295
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
962
1296
|
</file>
|
|
963
1297
|
*/
|
|
964
|
-
var
|
|
965
|
-
function
|
|
966
|
-
this.appcontext = appcontext;
|
|
967
|
-
this.api = api;
|
|
968
|
-
this.contextUpdated = false;
|
|
969
|
-
this.isUserSignedIn = false;
|
|
970
|
-
this.currentPlan = 0;
|
|
971
|
-
this.currentPlanTitle = '';
|
|
1298
|
+
var SignInButtonComponent = /** @class */ (function () {
|
|
1299
|
+
function SignInButtonComponent() {
|
|
972
1300
|
}
|
|
973
|
-
|
|
974
|
-
var _this = this;
|
|
975
|
-
if (!this.appcontext.isUserSignedIn()) {
|
|
976
|
-
this.contextUpdated = true;
|
|
977
|
-
return;
|
|
978
|
-
}
|
|
979
|
-
this.appcontext.getCurrent(function (current) {
|
|
980
|
-
_this.isUserSignedIn = current.isUserSignedIn;
|
|
981
|
-
if (_this.isUserSignedIn) {
|
|
982
|
-
_this.currentPlan = current.account.billingPlan;
|
|
983
|
-
_this.currentPlanTitle = current.account.billingPlanAsString;
|
|
984
|
-
}
|
|
985
|
-
_this.contextUpdated = true;
|
|
986
|
-
});
|
|
987
|
-
};
|
|
988
|
-
BuyAccessButtonComponent.prototype.onBuyPlan = function () {
|
|
989
|
-
var text = "Requested plan: " + this.plantitle + " ";
|
|
990
|
-
var that = this;
|
|
991
|
-
Alerts.AreYouSure(text, 'Buying access', 'Confirm change', 'Cancel', function () {
|
|
992
|
-
that.api.buyAccess(that.plan, function () {
|
|
993
|
-
Alerts.Success('Access Granted', null, function () {
|
|
994
|
-
window.location.reload();
|
|
995
|
-
});
|
|
996
|
-
});
|
|
997
|
-
});
|
|
998
|
-
};
|
|
999
|
-
return BuyAccessButtonComponent;
|
|
1301
|
+
return SignInButtonComponent;
|
|
1000
1302
|
}());
|
|
1001
|
-
|
|
1002
|
-
{ type:
|
|
1003
|
-
selector:
|
|
1004
|
-
template: "<
|
|
1303
|
+
SignInButtonComponent.decorators = [
|
|
1304
|
+
{ type: i0.Component, args: [{
|
|
1305
|
+
selector: "anatoly-signin-button",
|
|
1306
|
+
template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
|
|
1005
1307
|
},] }
|
|
1006
1308
|
];
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
{ type:
|
|
1010
|
-
]; };
|
|
1011
|
-
BuyAccessButtonComponent.propDecorators = {
|
|
1012
|
-
plan: [{ type: core.Input }],
|
|
1013
|
-
plantitle: [{ type: core.Input }]
|
|
1309
|
+
SignInButtonComponent.ctorParameters = function () { return []; };
|
|
1310
|
+
SignInButtonComponent.propDecorators = {
|
|
1311
|
+
classbtn: [{ type: i0.Input }]
|
|
1014
1312
|
};
|
|
1015
1313
|
|
|
1016
1314
|
/*
|
|
1017
1315
|
<file>
|
|
1316
|
+
Project:
|
|
1317
|
+
@osovitny/anatoly
|
|
1318
|
+
|
|
1018
1319
|
Authors:
|
|
1019
1320
|
Vadim Osovitny
|
|
1321
|
+
Anatoly Osovitny
|
|
1020
1322
|
|
|
1021
1323
|
Created:
|
|
1022
1324
|
4 Jul 2018
|
|
@@ -1024,29 +1326,33 @@
|
|
|
1024
1326
|
Version:
|
|
1025
1327
|
1.0
|
|
1026
1328
|
|
|
1027
|
-
Copyright (c)
|
|
1329
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1028
1330
|
</file>
|
|
1029
1331
|
*/
|
|
1030
|
-
var
|
|
1031
|
-
function
|
|
1332
|
+
var SignOutButtonComponent = /** @class */ (function () {
|
|
1333
|
+
function SignOutButtonComponent() {
|
|
1032
1334
|
}
|
|
1033
|
-
return
|
|
1335
|
+
return SignOutButtonComponent;
|
|
1034
1336
|
}());
|
|
1035
|
-
|
|
1036
|
-
{ type:
|
|
1037
|
-
selector:
|
|
1038
|
-
template: "<a href=\"identity/
|
|
1337
|
+
SignOutButtonComponent.decorators = [
|
|
1338
|
+
{ type: i0.Component, args: [{
|
|
1339
|
+
selector: "anatoly-signout-button",
|
|
1340
|
+
template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
|
|
1039
1341
|
},] }
|
|
1040
1342
|
];
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
classbtn: [{ type:
|
|
1343
|
+
SignOutButtonComponent.ctorParameters = function () { return []; };
|
|
1344
|
+
SignOutButtonComponent.propDecorators = {
|
|
1345
|
+
classbtn: [{ type: i0.Input }]
|
|
1044
1346
|
};
|
|
1045
1347
|
|
|
1046
1348
|
/*
|
|
1047
1349
|
<file>
|
|
1350
|
+
Project:
|
|
1351
|
+
@osovitny/anatoly
|
|
1352
|
+
|
|
1048
1353
|
Authors:
|
|
1049
1354
|
Vadim Osovitny
|
|
1355
|
+
Anatoly Osovitny
|
|
1050
1356
|
|
|
1051
1357
|
Created:
|
|
1052
1358
|
4 Jul 2018
|
|
@@ -1054,7 +1360,7 @@
|
|
|
1054
1360
|
Version:
|
|
1055
1361
|
1.0
|
|
1056
1362
|
|
|
1057
|
-
Copyright (c)
|
|
1363
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1058
1364
|
</file>
|
|
1059
1365
|
*/
|
|
1060
1366
|
var SignUpButtonComponent = /** @class */ (function () {
|
|
@@ -1063,49 +1369,61 @@
|
|
|
1063
1369
|
return SignUpButtonComponent;
|
|
1064
1370
|
}());
|
|
1065
1371
|
SignUpButtonComponent.decorators = [
|
|
1066
|
-
{ type:
|
|
1372
|
+
{ type: i0.Component, args: [{
|
|
1067
1373
|
selector: "anatoly-signup-button",
|
|
1068
1374
|
template: "<a href=\"identity/signup\" class=\"{{classbtn}}\">Sign Up</a>\r\n"
|
|
1069
1375
|
},] }
|
|
1070
1376
|
];
|
|
1071
1377
|
SignUpButtonComponent.propDecorators = {
|
|
1072
|
-
classbtn: [{ type:
|
|
1378
|
+
classbtn: [{ type: i0.Input }]
|
|
1073
1379
|
};
|
|
1074
1380
|
|
|
1075
1381
|
/*
|
|
1076
1382
|
<file>
|
|
1383
|
+
Project:
|
|
1384
|
+
@osovitny/anatoly
|
|
1385
|
+
|
|
1077
1386
|
Authors:
|
|
1078
1387
|
Vadim Osovitny
|
|
1388
|
+
Anatoly Osovitny
|
|
1079
1389
|
|
|
1080
1390
|
Created:
|
|
1081
|
-
|
|
1391
|
+
23 Apr 2018
|
|
1082
1392
|
|
|
1083
1393
|
Version:
|
|
1084
1394
|
1.0
|
|
1085
1395
|
|
|
1086
|
-
Copyright (c)
|
|
1396
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1087
1397
|
</file>
|
|
1088
1398
|
*/
|
|
1089
|
-
var
|
|
1090
|
-
function
|
|
1399
|
+
var ContentHeaderComponent = /** @class */ (function () {
|
|
1400
|
+
function ContentHeaderComponent() {
|
|
1091
1401
|
}
|
|
1092
|
-
|
|
1402
|
+
ContentHeaderComponent.prototype.ngOnInit = function () {
|
|
1403
|
+
if (this.title == null) {
|
|
1404
|
+
this.title = "";
|
|
1405
|
+
}
|
|
1406
|
+
};
|
|
1407
|
+
return ContentHeaderComponent;
|
|
1093
1408
|
}());
|
|
1094
|
-
|
|
1095
|
-
{ type:
|
|
1096
|
-
selector:
|
|
1097
|
-
template: "<
|
|
1409
|
+
ContentHeaderComponent.decorators = [
|
|
1410
|
+
{ type: i0.Component, args: [{
|
|
1411
|
+
selector: "anatoly-content-header",
|
|
1412
|
+
template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
|
|
1098
1413
|
},] }
|
|
1099
1414
|
];
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
classbtn: [{ type: core.Input }]
|
|
1415
|
+
ContentHeaderComponent.propDecorators = {
|
|
1416
|
+
title: [{ type: i0.Input }]
|
|
1103
1417
|
};
|
|
1104
1418
|
|
|
1105
1419
|
/*
|
|
1106
1420
|
<file>
|
|
1421
|
+
Project:
|
|
1422
|
+
@osovitny/anatoly
|
|
1423
|
+
|
|
1107
1424
|
Authors:
|
|
1108
1425
|
Vadim Osovitny
|
|
1426
|
+
Anatoly Osovitny
|
|
1109
1427
|
|
|
1110
1428
|
Created:
|
|
1111
1429
|
28 Aug 2018
|
|
@@ -1120,17 +1438,17 @@
|
|
|
1120
1438
|
function BaseComponent() {
|
|
1121
1439
|
}
|
|
1122
1440
|
BaseComponent.prototype.getQSId = function () {
|
|
1123
|
-
var id = Utils.
|
|
1124
|
-
if (typeof id ===
|
|
1441
|
+
var id = Utils.getValueByNameInQS("id");
|
|
1442
|
+
if (typeof id === "undefined" || id === "")
|
|
1125
1443
|
return null;
|
|
1126
1444
|
return id;
|
|
1127
1445
|
};
|
|
1128
1446
|
BaseComponent.prototype.showLoading = function () {
|
|
1129
|
-
var panelLoading = $(
|
|
1447
|
+
var panelLoading = $("#pnlLoading");
|
|
1130
1448
|
panelLoading.show();
|
|
1131
1449
|
};
|
|
1132
1450
|
BaseComponent.prototype.hideLoading = function () {
|
|
1133
|
-
var panelLoading = $(
|
|
1451
|
+
var panelLoading = $("#pnlLoading");
|
|
1134
1452
|
panelLoading.hide();
|
|
1135
1453
|
};
|
|
1136
1454
|
BaseComponent.prototype.handleError = function (e) {
|
|
@@ -1148,8 +1466,8 @@
|
|
|
1148
1466
|
return _this;
|
|
1149
1467
|
}
|
|
1150
1468
|
BaseEditComponent.prototype.isActionAdding = function () {
|
|
1151
|
-
var id = Utils.
|
|
1152
|
-
if (typeof id ===
|
|
1469
|
+
var id = Utils.getValueByNameInQS("id");
|
|
1470
|
+
if (typeof id === "undefined" || id === "")
|
|
1153
1471
|
return true;
|
|
1154
1472
|
return false;
|
|
1155
1473
|
};
|
|
@@ -1157,7 +1475,7 @@
|
|
|
1157
1475
|
return this.getQSId();
|
|
1158
1476
|
};
|
|
1159
1477
|
BaseEditComponent.prototype.isItemInvalid = function (name) {
|
|
1160
|
-
if (typeof name ===
|
|
1478
|
+
if (typeof name === "undefined" || name === "") {
|
|
1161
1479
|
return false;
|
|
1162
1480
|
}
|
|
1163
1481
|
if (!this.formGroup) {
|
|
@@ -1184,130 +1502,97 @@
|
|
|
1184
1502
|
return BaseEditComponent;
|
|
1185
1503
|
}(BaseComponent));
|
|
1186
1504
|
BaseEditComponent.propDecorators = {
|
|
1187
|
-
formGroup: [{ type:
|
|
1188
|
-
formSubmitted: [{ type:
|
|
1189
|
-
};
|
|
1190
|
-
|
|
1191
|
-
var ValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1192
|
-
__extends(ValidationSummaryComponent, _super);
|
|
1193
|
-
function ValidationSummaryComponent() {
|
|
1194
|
-
return _super.call(this) || this;
|
|
1195
|
-
}
|
|
1196
|
-
ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
|
|
1197
|
-
var _this = this;
|
|
1198
|
-
var messages = [];
|
|
1199
|
-
Object.keys(this.formGroup.controls).forEach(function (k) {
|
|
1200
|
-
var control = _this.formGroup.controls[k];
|
|
1201
|
-
if (control.controls != null) {
|
|
1202
|
-
Object.keys(control.controls).forEach(function (k) {
|
|
1203
|
-
var child = control.controls[k];
|
|
1204
|
-
_this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
|
|
1205
|
-
});
|
|
1206
|
-
}
|
|
1207
|
-
else {
|
|
1208
|
-
_this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
1211
|
-
return messages;
|
|
1212
|
-
};
|
|
1213
|
-
ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
|
|
1214
|
-
var thing = state.path || thingName;
|
|
1215
|
-
var messages = [];
|
|
1216
|
-
if (state.errors) {
|
|
1217
|
-
for (var errorName in state.errors) {
|
|
1218
|
-
if (state.errors.hasOwnProperty(errorName)) {
|
|
1219
|
-
switch (errorName) {
|
|
1220
|
-
case "required":
|
|
1221
|
-
messages.push(thing + " is required");
|
|
1222
|
-
break;
|
|
1223
|
-
case "minlength":
|
|
1224
|
-
messages.push(thing + " must be at least " + state.errors["minlength"].requiredLength + " characters");
|
|
1225
|
-
break;
|
|
1226
|
-
case "pattern":
|
|
1227
|
-
messages.push(thing + " contains illegal characters");
|
|
1228
|
-
break;
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
return messages;
|
|
1234
|
-
};
|
|
1235
|
-
return ValidationSummaryComponent;
|
|
1236
|
-
}(BaseEditComponent));
|
|
1237
|
-
|
|
1238
|
-
var FormValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1239
|
-
__extends(FormValidationSummaryComponent, _super);
|
|
1240
|
-
function FormValidationSummaryComponent() {
|
|
1241
|
-
var _this = _super.call(this) || this;
|
|
1242
|
-
_this.isVisible = false;
|
|
1243
|
-
return _this;
|
|
1244
|
-
}
|
|
1245
|
-
FormValidationSummaryComponent.prototype.getErrors = function () {
|
|
1246
|
-
var messages = this.getFormValidationMessages();
|
|
1247
|
-
return messages;
|
|
1248
|
-
};
|
|
1249
|
-
return FormValidationSummaryComponent;
|
|
1250
|
-
}(ValidationSummaryComponent));
|
|
1251
|
-
FormValidationSummaryComponent.decorators = [
|
|
1252
|
-
{ type: core.Component, args: [{
|
|
1253
|
-
selector: "anatoly-form-validation-summary",
|
|
1254
|
-
template: "<div class=\"callout callout-danger\" *ngIf=\"isVisible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\">\r\n <span class=\"help-block\" style=\"color: white;\">{{ error }}</span>\r\n </p>\r\n</div>\r\n"
|
|
1255
|
-
},] }
|
|
1256
|
-
];
|
|
1257
|
-
FormValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1258
|
-
FormValidationSummaryComponent.propDecorators = {
|
|
1259
|
-
isVisible: [{ type: core.Input }]
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1263
|
-
__extends(ItemValidationSummaryComponent, _super);
|
|
1264
|
-
function ItemValidationSummaryComponent() {
|
|
1265
|
-
return _super.call(this) || this;
|
|
1266
|
-
}
|
|
1267
|
-
return ItemValidationSummaryComponent;
|
|
1268
|
-
}(ValidationSummaryComponent));
|
|
1269
|
-
ItemValidationSummaryComponent.decorators = [
|
|
1270
|
-
{ type: core.Component, args: [{
|
|
1271
|
-
selector: "anatoly-item-validation-summary",
|
|
1272
|
-
template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(controlName), controlTitle)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n"
|
|
1273
|
-
},] }
|
|
1274
|
-
];
|
|
1275
|
-
ItemValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1276
|
-
ItemValidationSummaryComponent.propDecorators = {
|
|
1277
|
-
controlName: [{ type: core.Input }],
|
|
1278
|
-
controlTitle: [{ type: core.Input }]
|
|
1505
|
+
formGroup: [{ type: i0.Input }],
|
|
1506
|
+
formSubmitted: [{ type: i0.Input }]
|
|
1279
1507
|
};
|
|
1280
1508
|
|
|
1509
|
+
/*
|
|
1510
|
+
<file>
|
|
1511
|
+
Project:
|
|
1512
|
+
@osovitny/anatoly
|
|
1513
|
+
|
|
1514
|
+
Authors:
|
|
1515
|
+
Vadim Osovitny
|
|
1516
|
+
Anatoly Osovitny
|
|
1517
|
+
|
|
1518
|
+
Created:
|
|
1519
|
+
12 Dec 2017
|
|
1520
|
+
|
|
1521
|
+
Version:
|
|
1522
|
+
1.0
|
|
1523
|
+
|
|
1524
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1525
|
+
</file>
|
|
1526
|
+
*/
|
|
1281
1527
|
var DefaultEditorOptions = {
|
|
1282
|
-
placeholderText:
|
|
1528
|
+
placeholderText: "Edit Your Content Here",
|
|
1283
1529
|
charCounterCount: true,
|
|
1284
1530
|
heightMin: 100,
|
|
1285
1531
|
toolbarInline: false,
|
|
1286
1532
|
toolbarButtons: {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1533
|
+
moreText: {
|
|
1534
|
+
buttons: [
|
|
1535
|
+
"bold",
|
|
1536
|
+
"italic",
|
|
1537
|
+
"underline",
|
|
1538
|
+
"strikeThrough",
|
|
1539
|
+
"subscript",
|
|
1540
|
+
"superscript",
|
|
1541
|
+
"fontFamily",
|
|
1542
|
+
"fontSize",
|
|
1543
|
+
"textColor",
|
|
1544
|
+
"backgroundColor",
|
|
1545
|
+
"inlineClass",
|
|
1546
|
+
"inlineStyle",
|
|
1547
|
+
],
|
|
1290
1548
|
},
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1549
|
+
moreParagraph: {
|
|
1550
|
+
buttons: [
|
|
1551
|
+
"alignLeft",
|
|
1552
|
+
"alignCenter",
|
|
1553
|
+
"formatOLSimple",
|
|
1554
|
+
"alignRight",
|
|
1555
|
+
"alignJustify",
|
|
1556
|
+
"formatOL",
|
|
1557
|
+
"formatUL",
|
|
1558
|
+
"paragraphFormat",
|
|
1559
|
+
"paragraphStyle",
|
|
1560
|
+
"lineHeight",
|
|
1561
|
+
"outdent",
|
|
1562
|
+
"indent",
|
|
1563
|
+
"quote",
|
|
1564
|
+
],
|
|
1294
1565
|
},
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1566
|
+
moreRich: {
|
|
1567
|
+
buttons: [
|
|
1568
|
+
"insertLink",
|
|
1569
|
+
"insertImage",
|
|
1570
|
+
"insertTable",
|
|
1571
|
+
"emoticons",
|
|
1572
|
+
"fontAwesome",
|
|
1573
|
+
"specialCharacters",
|
|
1574
|
+
"embedly",
|
|
1575
|
+
],
|
|
1576
|
+
},
|
|
1577
|
+
moreMisc: {
|
|
1578
|
+
buttons: [
|
|
1579
|
+
"selectAll",
|
|
1580
|
+
"clearFormatting",
|
|
1581
|
+
"html",
|
|
1582
|
+
"undo",
|
|
1583
|
+
"redo",
|
|
1584
|
+
"fullscreen",
|
|
1585
|
+
],
|
|
1586
|
+
align: "right",
|
|
1298
1587
|
},
|
|
1299
|
-
'moreMisc': {
|
|
1300
|
-
'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
|
|
1301
|
-
'align': 'right',
|
|
1302
|
-
}
|
|
1303
1588
|
},
|
|
1304
1589
|
/*
|
|
1305
1590
|
Upload:
|
|
1306
1591
|
https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
|
|
1307
1592
|
*/
|
|
1308
|
-
imageUploadURL:
|
|
1309
|
-
imageAllowedTypes: [
|
|
1310
|
-
imageUploadParams: { uploadType:
|
|
1593
|
+
imageUploadURL: "/api/HtmlEditor/UploadImage",
|
|
1594
|
+
imageAllowedTypes: ["jpeg", "jpg", "png"],
|
|
1595
|
+
imageUploadParams: { uploadType: "", uploadParentId: "" },
|
|
1311
1596
|
};
|
|
1312
1597
|
|
|
1313
1598
|
var BaseHtmlEditorComponent = /** @class */ (function (_super) {
|
|
@@ -1317,7 +1602,7 @@
|
|
|
1317
1602
|
_this.froalaEditorInitialized = false;
|
|
1318
1603
|
_this.afterInitializedActions = [];
|
|
1319
1604
|
//Inputs
|
|
1320
|
-
_this.editorLabelText =
|
|
1605
|
+
_this.editorLabelText = "Html";
|
|
1321
1606
|
_this.editorOptions = {};
|
|
1322
1607
|
return _this;
|
|
1323
1608
|
}
|
|
@@ -1362,7 +1647,9 @@
|
|
|
1362
1647
|
BaseHtmlEditorComponent.prototype.doAfterInitialized = function (action) {
|
|
1363
1648
|
var that = this;
|
|
1364
1649
|
if (!this.froalaEditorInitialized) {
|
|
1365
|
-
this.afterInitializedActions.push(function () {
|
|
1650
|
+
this.afterInitializedActions.push(function () {
|
|
1651
|
+
action(that);
|
|
1652
|
+
});
|
|
1366
1653
|
}
|
|
1367
1654
|
else {
|
|
1368
1655
|
action(that);
|
|
@@ -1375,7 +1662,7 @@
|
|
|
1375
1662
|
BaseHtmlEditorComponent.prototype.setUploadParams = function (uploadType, uploadParentId) {
|
|
1376
1663
|
this.doAfterInitialized(function (that) {
|
|
1377
1664
|
var editor = that.getEditor();
|
|
1378
|
-
if (typeof
|
|
1665
|
+
if (typeof editor == "undefined" || editor == null) {
|
|
1379
1666
|
return;
|
|
1380
1667
|
}
|
|
1381
1668
|
editor.opts.imageUploadParams.uploadType = uploadType;
|
|
@@ -1385,8 +1672,8 @@
|
|
|
1385
1672
|
return BaseHtmlEditorComponent;
|
|
1386
1673
|
}(BaseEditComponent));
|
|
1387
1674
|
BaseHtmlEditorComponent.propDecorators = {
|
|
1388
|
-
editorLabelText: [{ type:
|
|
1389
|
-
editorOptions: [{ type:
|
|
1675
|
+
editorLabelText: [{ type: i0.Input }],
|
|
1676
|
+
editorOptions: [{ type: i0.Input }]
|
|
1390
1677
|
};
|
|
1391
1678
|
|
|
1392
1679
|
var HtmlEditorComponent = /** @class */ (function (_super) {
|
|
@@ -1397,7 +1684,7 @@
|
|
|
1397
1684
|
HtmlEditorComponent.prototype.setHtml = function (content) {
|
|
1398
1685
|
this.doAfterInitialized(function (that) {
|
|
1399
1686
|
var editor = that.getEditor();
|
|
1400
|
-
if (typeof
|
|
1687
|
+
if (typeof editor == "undefined" || editor == null) {
|
|
1401
1688
|
return;
|
|
1402
1689
|
}
|
|
1403
1690
|
editor.html.set(content);
|
|
@@ -1405,7 +1692,7 @@
|
|
|
1405
1692
|
};
|
|
1406
1693
|
HtmlEditorComponent.prototype.getHtml = function () {
|
|
1407
1694
|
var editor = this.getEditor();
|
|
1408
|
-
if (typeof
|
|
1695
|
+
if (typeof editor == "undefined" || editor == null) {
|
|
1409
1696
|
return;
|
|
1410
1697
|
}
|
|
1411
1698
|
return editor.html.get(false);
|
|
@@ -1413,8 +1700,8 @@
|
|
|
1413
1700
|
return HtmlEditorComponent;
|
|
1414
1701
|
}(BaseHtmlEditorComponent));
|
|
1415
1702
|
HtmlEditorComponent.decorators = [
|
|
1416
|
-
{ type:
|
|
1417
|
-
selector:
|
|
1703
|
+
{ type: i0.Component, args: [{
|
|
1704
|
+
selector: "anatoly-html-editor",
|
|
1418
1705
|
template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>"
|
|
1419
1706
|
},] }
|
|
1420
1707
|
];
|
|
@@ -1424,7 +1711,7 @@
|
|
|
1424
1711
|
__extends(FormsHtmlEditorComponent, _super);
|
|
1425
1712
|
function FormsHtmlEditorComponent() {
|
|
1426
1713
|
var _this = _super.call(this) || this;
|
|
1427
|
-
_this.editorFormKey =
|
|
1714
|
+
_this.editorFormKey = "html";
|
|
1428
1715
|
return _this;
|
|
1429
1716
|
}
|
|
1430
1717
|
FormsHtmlEditorComponent.prototype.setFormValueAfterInitialized = function (name, value) {
|
|
@@ -1435,57 +1722,117 @@
|
|
|
1435
1722
|
return FormsHtmlEditorComponent;
|
|
1436
1723
|
}(BaseHtmlEditorComponent));
|
|
1437
1724
|
FormsHtmlEditorComponent.decorators = [
|
|
1438
|
-
{ type:
|
|
1439
|
-
selector:
|
|
1725
|
+
{ type: i0.Component, args: [{
|
|
1726
|
+
selector: "anatoly-forms-html-editor",
|
|
1440
1727
|
template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n [formSubmitted]=\"formSubmitted\"\r\n [controlName]=\"editorFormKey\"\r\n [controlTitle]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n"
|
|
1441
1728
|
},] }
|
|
1442
1729
|
];
|
|
1443
1730
|
FormsHtmlEditorComponent.ctorParameters = function () { return []; };
|
|
1444
1731
|
FormsHtmlEditorComponent.propDecorators = {
|
|
1445
|
-
editorFormKey: [{ type:
|
|
1732
|
+
editorFormKey: [{ type: i0.Input }]
|
|
1446
1733
|
};
|
|
1447
1734
|
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
Created:
|
|
1454
|
-
23 Apr 2018
|
|
1455
|
-
|
|
1456
|
-
Version:
|
|
1457
|
-
1.0
|
|
1458
|
-
|
|
1459
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1460
|
-
</file>
|
|
1461
|
-
*/
|
|
1462
|
-
var ContentHeaderComponent = /** @class */ (function () {
|
|
1463
|
-
function ContentHeaderComponent() {
|
|
1735
|
+
var ValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1736
|
+
__extends(ValidationSummaryComponent, _super);
|
|
1737
|
+
function ValidationSummaryComponent() {
|
|
1738
|
+
return _super.call(this) || this;
|
|
1464
1739
|
}
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1740
|
+
ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
|
|
1741
|
+
var _this = this;
|
|
1742
|
+
var messages = [];
|
|
1743
|
+
Object.keys(this.formGroup.controls).forEach(function (k) {
|
|
1744
|
+
var control = _this.formGroup.controls[k];
|
|
1745
|
+
if (control.controls != null) {
|
|
1746
|
+
Object.keys(control.controls).forEach(function (k) {
|
|
1747
|
+
var child = control.controls[k];
|
|
1748
|
+
_this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
else {
|
|
1752
|
+
_this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
|
|
1753
|
+
}
|
|
1754
|
+
});
|
|
1755
|
+
return messages;
|
|
1756
|
+
};
|
|
1757
|
+
ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
|
|
1758
|
+
var thing = state.path || thingName;
|
|
1759
|
+
var messages = [];
|
|
1760
|
+
if (state.errors) {
|
|
1761
|
+
for (var errorName in state.errors) {
|
|
1762
|
+
if (state.errors.hasOwnProperty(errorName)) {
|
|
1763
|
+
switch (errorName) {
|
|
1764
|
+
case "required":
|
|
1765
|
+
messages.push(thing + " is required");
|
|
1766
|
+
break;
|
|
1767
|
+
case "minlength":
|
|
1768
|
+
messages.push(thing + " must be at least " + state.errors["minlength"].requiredLength + " characters");
|
|
1769
|
+
break;
|
|
1770
|
+
case "pattern":
|
|
1771
|
+
messages.push(thing + " contains illegal characters");
|
|
1772
|
+
break;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1468
1776
|
}
|
|
1777
|
+
return messages;
|
|
1469
1778
|
};
|
|
1470
|
-
return
|
|
1471
|
-
}());
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1779
|
+
return ValidationSummaryComponent;
|
|
1780
|
+
}(BaseEditComponent));
|
|
1781
|
+
|
|
1782
|
+
var FormValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1783
|
+
__extends(FormValidationSummaryComponent, _super);
|
|
1784
|
+
function FormValidationSummaryComponent() {
|
|
1785
|
+
var _this = _super.call(this) || this;
|
|
1786
|
+
_this.isVisible = false;
|
|
1787
|
+
return _this;
|
|
1788
|
+
}
|
|
1789
|
+
FormValidationSummaryComponent.prototype.getErrors = function () {
|
|
1790
|
+
var messages = this.getFormValidationMessages();
|
|
1791
|
+
return messages;
|
|
1792
|
+
};
|
|
1793
|
+
return FormValidationSummaryComponent;
|
|
1794
|
+
}(ValidationSummaryComponent));
|
|
1795
|
+
FormValidationSummaryComponent.decorators = [
|
|
1796
|
+
{ type: i0.Component, args: [{
|
|
1797
|
+
selector: "anatoly-form-validation-summary",
|
|
1798
|
+
template: "<div class=\"callout callout-danger\" *ngIf=\"isVisible\">\r\n <h4 class=\"box-title\">There are problems with the form</h4>\r\n <p *ngFor=\"let error of getErrors()\">\r\n <span class=\"help-block\" style=\"color: white;\">{{ error }}</span>\r\n </p>\r\n</div>\r\n"
|
|
1476
1799
|
},] }
|
|
1477
1800
|
];
|
|
1478
|
-
|
|
1479
|
-
|
|
1801
|
+
FormValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1802
|
+
FormValidationSummaryComponent.propDecorators = {
|
|
1803
|
+
isVisible: [{ type: i0.Input }]
|
|
1804
|
+
};
|
|
1805
|
+
|
|
1806
|
+
var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1807
|
+
__extends(ItemValidationSummaryComponent, _super);
|
|
1808
|
+
function ItemValidationSummaryComponent() {
|
|
1809
|
+
return _super.call(this) || this;
|
|
1810
|
+
}
|
|
1811
|
+
return ItemValidationSummaryComponent;
|
|
1812
|
+
}(ValidationSummaryComponent));
|
|
1813
|
+
ItemValidationSummaryComponent.decorators = [
|
|
1814
|
+
{ type: i0.Component, args: [{
|
|
1815
|
+
selector: "anatoly-item-validation-summary",
|
|
1816
|
+
template: "<ul class=\"list-unstyled\" *ngIf=\"isItemInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.get(controlName), controlTitle)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n"
|
|
1817
|
+
},] }
|
|
1818
|
+
];
|
|
1819
|
+
ItemValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1820
|
+
ItemValidationSummaryComponent.propDecorators = {
|
|
1821
|
+
controlName: [{ type: i0.Input }],
|
|
1822
|
+
controlTitle: [{ type: i0.Input }]
|
|
1480
1823
|
};
|
|
1481
1824
|
|
|
1482
1825
|
/*
|
|
1483
1826
|
<file>
|
|
1827
|
+
Project:
|
|
1828
|
+
@osovitny/anatoly
|
|
1829
|
+
|
|
1484
1830
|
Authors:
|
|
1485
1831
|
Vadim Osovitny
|
|
1832
|
+
Anatoly Osovitny
|
|
1486
1833
|
|
|
1487
1834
|
Created:
|
|
1488
|
-
|
|
1835
|
+
26 Jun 2020
|
|
1489
1836
|
|
|
1490
1837
|
Version:
|
|
1491
1838
|
1.0
|
|
@@ -1501,7 +1848,7 @@
|
|
|
1501
1848
|
return AnatolyUIModule;
|
|
1502
1849
|
}());
|
|
1503
1850
|
AnatolyUIModule.decorators = [
|
|
1504
|
-
{ type:
|
|
1851
|
+
{ type: i0.NgModule, args: [{
|
|
1505
1852
|
imports: [
|
|
1506
1853
|
common.CommonModule,
|
|
1507
1854
|
forms.ReactiveFormsModule,
|
|
@@ -1520,7 +1867,7 @@
|
|
|
1520
1867
|
ItemValidationSummaryComponent,
|
|
1521
1868
|
HtmlEditorComponent,
|
|
1522
1869
|
FormsHtmlEditorComponent,
|
|
1523
|
-
ContentHeaderComponent
|
|
1870
|
+
ContentHeaderComponent
|
|
1524
1871
|
],
|
|
1525
1872
|
exports: [
|
|
1526
1873
|
SubscribePlanButtonComponent,
|
|
@@ -1533,12 +1880,29 @@
|
|
|
1533
1880
|
ItemValidationSummaryComponent,
|
|
1534
1881
|
HtmlEditorComponent,
|
|
1535
1882
|
FormsHtmlEditorComponent,
|
|
1536
|
-
ContentHeaderComponent
|
|
1537
|
-
]
|
|
1883
|
+
ContentHeaderComponent
|
|
1884
|
+
],
|
|
1538
1885
|
},] }
|
|
1539
1886
|
];
|
|
1540
1887
|
|
|
1541
|
-
|
|
1888
|
+
/*
|
|
1889
|
+
<file>
|
|
1890
|
+
Project:
|
|
1891
|
+
@osovitny/anatoly
|
|
1892
|
+
|
|
1893
|
+
Authors:
|
|
1894
|
+
Vadim Osovitny
|
|
1895
|
+
Anatoly Osovitny
|
|
1896
|
+
|
|
1897
|
+
Created:
|
|
1898
|
+
26 Jun 2020
|
|
1899
|
+
|
|
1900
|
+
Version:
|
|
1901
|
+
1.0
|
|
1902
|
+
|
|
1903
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1904
|
+
</file>
|
|
1905
|
+
*/
|
|
1542
1906
|
|
|
1543
1907
|
/*
|
|
1544
1908
|
* Public API Surface of anatoly
|
|
@@ -1564,11 +1928,15 @@
|
|
|
1564
1928
|
exports.ContentHeaderComponent = ContentHeaderComponent;
|
|
1565
1929
|
exports.FormValidationSummaryComponent = FormValidationSummaryComponent;
|
|
1566
1930
|
exports.FormsHtmlEditorComponent = FormsHtmlEditorComponent;
|
|
1931
|
+
exports.GlobalErrorHandler = GlobalErrorHandler;
|
|
1932
|
+
exports.Guid = Guid;
|
|
1567
1933
|
exports.HtmlEditorComponent = HtmlEditorComponent;
|
|
1568
1934
|
exports.ItemValidationSummaryComponent = ItemValidationSummaryComponent;
|
|
1935
|
+
exports.LoggingService = LoggingService;
|
|
1569
1936
|
exports.SignInButtonComponent = SignInButtonComponent;
|
|
1570
1937
|
exports.SignOutButtonComponent = SignOutButtonComponent;
|
|
1571
1938
|
exports.SignUpButtonComponent = SignUpButtonComponent;
|
|
1939
|
+
exports.Subs = Subs;
|
|
1572
1940
|
exports.SubscribePlanButtonComponent = SubscribePlanButtonComponent;
|
|
1573
1941
|
exports.UpgradePlanButtonComponent = UpgradePlanButtonComponent;
|
|
1574
1942
|
exports.Utils = Utils;
|