@osovitny/anatoly 2.0.10 → 2.0.12
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 +249 -253
- 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/consts/index.js +20 -0
- package/esm2015/lib/core/consts/settings.js +21 -0
- package/esm2015/lib/core/go/base-go.service.js +38 -0
- package/esm2015/lib/core/index.js +7 -5
- package/esm2015/lib/core/services/appcontext.service.js +4 -3
- package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +3 -2
- package/esm2015/lib/ui/index.js +3 -4
- package/esm2015/lib/ui/ui.module.js +3 -6
- package/fesm2015/osovitny-anatoly.js +252 -255
- package/fesm2015/osovitny-anatoly.js.map +1 -1
- package/lib/core/consts/index.d.ts +1 -0
- package/lib/core/consts/settings.d.ts +2 -0
- package/lib/core/index.d.ts +2 -1
- package/lib/ui/index.d.ts +1 -1
- package/package.json +1 -1
- package/esm2015/lib/core/services/base-go.service.js +0 -38
- package/esm2015/lib/ui/components/copy-2-clipboard/copy-2-clipboard.component.js +0 -45
- package/lib/ui/components/copy-2-clipboard/copy-2-clipboard.component.d.ts +0 -5
- /package/lib/core/{services → go}/base-go.service.d.ts +0 -0
|
@@ -277,6 +277,30 @@
|
|
|
277
277
|
return Guid;
|
|
278
278
|
}());
|
|
279
279
|
|
|
280
|
+
/*
|
|
281
|
+
<file>
|
|
282
|
+
Project:
|
|
283
|
+
@osovitny/anatoly
|
|
284
|
+
|
|
285
|
+
Authors:
|
|
286
|
+
Vadim Osovitny
|
|
287
|
+
Anatoly Osovitny
|
|
288
|
+
|
|
289
|
+
Created:
|
|
290
|
+
26 Jun 2020
|
|
291
|
+
|
|
292
|
+
Version:
|
|
293
|
+
1.0
|
|
294
|
+
|
|
295
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
296
|
+
</file>
|
|
297
|
+
*/
|
|
298
|
+
function throwIfAlreadyLoaded(parentModule, moduleName) {
|
|
299
|
+
if (parentModule) {
|
|
300
|
+
throw new Error(moduleName + " has already been loaded. Import " + moduleName + " modules in the AppModule only.");
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
280
304
|
/*
|
|
281
305
|
<file>
|
|
282
306
|
Project:
|
|
@@ -615,6 +639,46 @@
|
|
|
615
639
|
return value;
|
|
616
640
|
}
|
|
617
641
|
|
|
642
|
+
/*
|
|
643
|
+
<file>
|
|
644
|
+
Project:
|
|
645
|
+
@osovitny/anatoly
|
|
646
|
+
|
|
647
|
+
Authors:
|
|
648
|
+
Vadim Osovitny
|
|
649
|
+
Anatoly Osovitny
|
|
650
|
+
|
|
651
|
+
Created:
|
|
652
|
+
26 Jun 2020
|
|
653
|
+
|
|
654
|
+
Version:
|
|
655
|
+
1.0
|
|
656
|
+
|
|
657
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
658
|
+
</file>
|
|
659
|
+
*/
|
|
660
|
+
var ContextInitState = JSON.parse((document.getElementById("contextInitState")).getAttribute("data-contextinitstate"));
|
|
661
|
+
var AppCoreSettings = JSON.parse((document.getElementById("appCoreSettings")).getAttribute("data-appcoresettings"));
|
|
662
|
+
|
|
663
|
+
/*
|
|
664
|
+
<file>
|
|
665
|
+
Project:
|
|
666
|
+
@osovitny/anatoly
|
|
667
|
+
|
|
668
|
+
Authors:
|
|
669
|
+
Vadim Osovitny
|
|
670
|
+
Anatoly Osovitny
|
|
671
|
+
|
|
672
|
+
Created:
|
|
673
|
+
26 Jun 2020
|
|
674
|
+
|
|
675
|
+
Version:
|
|
676
|
+
1.0
|
|
677
|
+
|
|
678
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
679
|
+
</file>
|
|
680
|
+
*/
|
|
681
|
+
|
|
618
682
|
/*
|
|
619
683
|
<file>
|
|
620
684
|
Project:
|
|
@@ -742,10 +806,10 @@
|
|
|
742
806
|
this.current = null;
|
|
743
807
|
};
|
|
744
808
|
AppContextService.prototype.isUserSignedIn = function () {
|
|
745
|
-
return
|
|
809
|
+
return ContextInitState.isUserSignedIn;
|
|
746
810
|
};
|
|
747
811
|
AppContextService.prototype.isUserAdmin = function () {
|
|
748
|
-
return
|
|
812
|
+
return ContextInitState.isUserAdmin;
|
|
749
813
|
};
|
|
750
814
|
return AppContextService;
|
|
751
815
|
}(BaseApiService));
|
|
@@ -830,30 +894,6 @@
|
|
|
830
894
|
{ type: i0.Injector }
|
|
831
895
|
]; };
|
|
832
896
|
|
|
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
897
|
var providers = [
|
|
858
898
|
LoggingService,
|
|
859
899
|
AppContextService,
|
|
@@ -882,7 +922,7 @@
|
|
|
882
922
|
<file>
|
|
883
923
|
Project:
|
|
884
924
|
@osovitny/anatoly
|
|
885
|
-
|
|
925
|
+
./go/base-go.service
|
|
886
926
|
Authors:
|
|
887
927
|
Vadim Osovitny
|
|
888
928
|
Anatoly Osovitny
|
|
@@ -1095,6 +1135,76 @@
|
|
|
1095
1135
|
</file>
|
|
1096
1136
|
*/
|
|
1097
1137
|
|
|
1138
|
+
/*
|
|
1139
|
+
<file>
|
|
1140
|
+
Project:
|
|
1141
|
+
@osovitny/anatoly
|
|
1142
|
+
|
|
1143
|
+
Authors:
|
|
1144
|
+
Vadim Osovitny
|
|
1145
|
+
Anatoly Osovitny
|
|
1146
|
+
|
|
1147
|
+
Created:
|
|
1148
|
+
14 Aug 2018
|
|
1149
|
+
|
|
1150
|
+
Version:
|
|
1151
|
+
1.0
|
|
1152
|
+
|
|
1153
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1154
|
+
</file>
|
|
1155
|
+
*/
|
|
1156
|
+
var BuyAccessButtonComponent = /** @class */ (function () {
|
|
1157
|
+
function BuyAccessButtonComponent(appcontext, api) {
|
|
1158
|
+
this.appcontext = appcontext;
|
|
1159
|
+
this.api = api;
|
|
1160
|
+
this.contextUpdated = false;
|
|
1161
|
+
this.isUserSignedIn = false;
|
|
1162
|
+
this.currentPlan = 0;
|
|
1163
|
+
this.currentPlanTitle = "";
|
|
1164
|
+
}
|
|
1165
|
+
BuyAccessButtonComponent.prototype.ngOnInit = function () {
|
|
1166
|
+
var _this = this;
|
|
1167
|
+
if (!this.appcontext.isUserSignedIn()) {
|
|
1168
|
+
this.contextUpdated = true;
|
|
1169
|
+
return;
|
|
1170
|
+
}
|
|
1171
|
+
this.appcontext.getCurrent(function (current) {
|
|
1172
|
+
_this.isUserSignedIn = current.isUserSignedIn;
|
|
1173
|
+
if (_this.isUserSignedIn) {
|
|
1174
|
+
_this.currentPlan = current.account.billingPlan;
|
|
1175
|
+
_this.currentPlanTitle = current.account.billingPlanAsString;
|
|
1176
|
+
}
|
|
1177
|
+
_this.contextUpdated = true;
|
|
1178
|
+
});
|
|
1179
|
+
};
|
|
1180
|
+
BuyAccessButtonComponent.prototype.onBuyPlan = function () {
|
|
1181
|
+
var text = "Requested plan: " + this.plantitle + " ";
|
|
1182
|
+
var that = this;
|
|
1183
|
+
Alerts.AreYouSure(text, "Buying access", "Confirm change", "Cancel", function () {
|
|
1184
|
+
that.api.buyAccess(that.plan, function () {
|
|
1185
|
+
Alerts.Success("Access Granted", null, function () {
|
|
1186
|
+
window.location.reload();
|
|
1187
|
+
});
|
|
1188
|
+
});
|
|
1189
|
+
});
|
|
1190
|
+
};
|
|
1191
|
+
return BuyAccessButtonComponent;
|
|
1192
|
+
}());
|
|
1193
|
+
BuyAccessButtonComponent.decorators = [
|
|
1194
|
+
{ type: i0.Component, args: [{
|
|
1195
|
+
selector: "anatoly-buyaccess-button",
|
|
1196
|
+
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"
|
|
1197
|
+
},] }
|
|
1198
|
+
];
|
|
1199
|
+
BuyAccessButtonComponent.ctorParameters = function () { return [
|
|
1200
|
+
{ type: AppContextService },
|
|
1201
|
+
{ type: BillingApiService }
|
|
1202
|
+
]; };
|
|
1203
|
+
BuyAccessButtonComponent.propDecorators = {
|
|
1204
|
+
plan: [{ type: i0.Input }],
|
|
1205
|
+
plantitle: [{ type: i0.Input }]
|
|
1206
|
+
};
|
|
1207
|
+
|
|
1098
1208
|
/*
|
|
1099
1209
|
<file>
|
|
1100
1210
|
Project:
|
|
@@ -1217,7 +1327,7 @@
|
|
|
1217
1327
|
Anatoly Osovitny
|
|
1218
1328
|
|
|
1219
1329
|
Created:
|
|
1220
|
-
|
|
1330
|
+
4 Jul 2018
|
|
1221
1331
|
|
|
1222
1332
|
Version:
|
|
1223
1333
|
1.0
|
|
@@ -1225,56 +1335,20 @@
|
|
|
1225
1335
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1226
1336
|
</file>
|
|
1227
1337
|
*/
|
|
1228
|
-
var
|
|
1229
|
-
function
|
|
1230
|
-
this.appcontext = appcontext;
|
|
1231
|
-
this.api = api;
|
|
1232
|
-
this.contextUpdated = false;
|
|
1233
|
-
this.isUserSignedIn = false;
|
|
1234
|
-
this.currentPlan = 0;
|
|
1235
|
-
this.currentPlanTitle = "";
|
|
1338
|
+
var SignInButtonComponent = /** @class */ (function () {
|
|
1339
|
+
function SignInButtonComponent() {
|
|
1236
1340
|
}
|
|
1237
|
-
|
|
1238
|
-
var _this = this;
|
|
1239
|
-
if (!this.appcontext.isUserSignedIn()) {
|
|
1240
|
-
this.contextUpdated = true;
|
|
1241
|
-
return;
|
|
1242
|
-
}
|
|
1243
|
-
this.appcontext.getCurrent(function (current) {
|
|
1244
|
-
_this.isUserSignedIn = current.isUserSignedIn;
|
|
1245
|
-
if (_this.isUserSignedIn) {
|
|
1246
|
-
_this.currentPlan = current.account.billingPlan;
|
|
1247
|
-
_this.currentPlanTitle = current.account.billingPlanAsString;
|
|
1248
|
-
}
|
|
1249
|
-
_this.contextUpdated = true;
|
|
1250
|
-
});
|
|
1251
|
-
};
|
|
1252
|
-
BuyAccessButtonComponent.prototype.onBuyPlan = function () {
|
|
1253
|
-
var text = "Requested plan: " + this.plantitle + " ";
|
|
1254
|
-
var that = this;
|
|
1255
|
-
Alerts.AreYouSure(text, "Buying access", "Confirm change", "Cancel", function () {
|
|
1256
|
-
that.api.buyAccess(that.plan, function () {
|
|
1257
|
-
Alerts.Success("Access Granted", null, function () {
|
|
1258
|
-
window.location.reload();
|
|
1259
|
-
});
|
|
1260
|
-
});
|
|
1261
|
-
});
|
|
1262
|
-
};
|
|
1263
|
-
return BuyAccessButtonComponent;
|
|
1341
|
+
return SignInButtonComponent;
|
|
1264
1342
|
}());
|
|
1265
|
-
|
|
1343
|
+
SignInButtonComponent.decorators = [
|
|
1266
1344
|
{ type: i0.Component, args: [{
|
|
1267
|
-
selector: "anatoly-
|
|
1268
|
-
template: "<
|
|
1345
|
+
selector: "anatoly-signin-button",
|
|
1346
|
+
template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
|
|
1269
1347
|
},] }
|
|
1270
1348
|
];
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
{ type:
|
|
1274
|
-
]; };
|
|
1275
|
-
BuyAccessButtonComponent.propDecorators = {
|
|
1276
|
-
plan: [{ type: i0.Input }],
|
|
1277
|
-
plantitle: [{ type: i0.Input }]
|
|
1349
|
+
SignInButtonComponent.ctorParameters = function () { return []; };
|
|
1350
|
+
SignInButtonComponent.propDecorators = {
|
|
1351
|
+
classbtn: [{ type: i0.Input }]
|
|
1278
1352
|
};
|
|
1279
1353
|
|
|
1280
1354
|
/*
|
|
@@ -1295,19 +1369,19 @@
|
|
|
1295
1369
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1296
1370
|
</file>
|
|
1297
1371
|
*/
|
|
1298
|
-
var
|
|
1299
|
-
function
|
|
1372
|
+
var SignOutButtonComponent = /** @class */ (function () {
|
|
1373
|
+
function SignOutButtonComponent() {
|
|
1300
1374
|
}
|
|
1301
|
-
return
|
|
1375
|
+
return SignOutButtonComponent;
|
|
1302
1376
|
}());
|
|
1303
|
-
|
|
1377
|
+
SignOutButtonComponent.decorators = [
|
|
1304
1378
|
{ type: i0.Component, args: [{
|
|
1305
|
-
selector: "anatoly-
|
|
1306
|
-
template: "<a href=\"identity/
|
|
1379
|
+
selector: "anatoly-signout-button",
|
|
1380
|
+
template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
|
|
1307
1381
|
},] }
|
|
1308
1382
|
];
|
|
1309
|
-
|
|
1310
|
-
|
|
1383
|
+
SignOutButtonComponent.ctorParameters = function () { return []; };
|
|
1384
|
+
SignOutButtonComponent.propDecorators = {
|
|
1311
1385
|
classbtn: [{ type: i0.Input }]
|
|
1312
1386
|
};
|
|
1313
1387
|
|
|
@@ -1354,7 +1428,7 @@
|
|
|
1354
1428
|
Anatoly Osovitny
|
|
1355
1429
|
|
|
1356
1430
|
Created:
|
|
1357
|
-
|
|
1431
|
+
23 Apr 2018
|
|
1358
1432
|
|
|
1359
1433
|
Version:
|
|
1360
1434
|
1.0
|
|
@@ -1362,20 +1436,24 @@
|
|
|
1362
1436
|
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1363
1437
|
</file>
|
|
1364
1438
|
*/
|
|
1365
|
-
var
|
|
1366
|
-
function
|
|
1439
|
+
var ContentHeaderComponent = /** @class */ (function () {
|
|
1440
|
+
function ContentHeaderComponent() {
|
|
1367
1441
|
}
|
|
1368
|
-
|
|
1442
|
+
ContentHeaderComponent.prototype.ngOnInit = function () {
|
|
1443
|
+
if (this.title == null) {
|
|
1444
|
+
this.title = "";
|
|
1445
|
+
}
|
|
1446
|
+
};
|
|
1447
|
+
return ContentHeaderComponent;
|
|
1369
1448
|
}());
|
|
1370
|
-
|
|
1449
|
+
ContentHeaderComponent.decorators = [
|
|
1371
1450
|
{ type: i0.Component, args: [{
|
|
1372
|
-
selector: "anatoly-
|
|
1373
|
-
template: "<
|
|
1451
|
+
selector: "anatoly-content-header",
|
|
1452
|
+
template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
|
|
1374
1453
|
},] }
|
|
1375
1454
|
];
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
classbtn: [{ type: i0.Input }]
|
|
1455
|
+
ContentHeaderComponent.propDecorators = {
|
|
1456
|
+
title: [{ type: i0.Input }]
|
|
1379
1457
|
};
|
|
1380
1458
|
|
|
1381
1459
|
/*
|
|
@@ -1468,96 +1546,6 @@
|
|
|
1468
1546
|
formSubmitted: [{ type: i0.Input }]
|
|
1469
1547
|
};
|
|
1470
1548
|
|
|
1471
|
-
var ValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1472
|
-
__extends(ValidationSummaryComponent, _super);
|
|
1473
|
-
function ValidationSummaryComponent() {
|
|
1474
|
-
return _super.call(this) || this;
|
|
1475
|
-
}
|
|
1476
|
-
ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
|
|
1477
|
-
var _this = this;
|
|
1478
|
-
var messages = [];
|
|
1479
|
-
Object.keys(this.formGroup.controls).forEach(function (k) {
|
|
1480
|
-
var control = _this.formGroup.controls[k];
|
|
1481
|
-
if (control.controls != null) {
|
|
1482
|
-
Object.keys(control.controls).forEach(function (k) {
|
|
1483
|
-
var child = control.controls[k];
|
|
1484
|
-
_this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
|
|
1485
|
-
});
|
|
1486
|
-
}
|
|
1487
|
-
else {
|
|
1488
|
-
_this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
|
|
1489
|
-
}
|
|
1490
|
-
});
|
|
1491
|
-
return messages;
|
|
1492
|
-
};
|
|
1493
|
-
ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
|
|
1494
|
-
var thing = state.path || thingName;
|
|
1495
|
-
var messages = [];
|
|
1496
|
-
if (state.errors) {
|
|
1497
|
-
for (var errorName in state.errors) {
|
|
1498
|
-
if (state.errors.hasOwnProperty(errorName)) {
|
|
1499
|
-
switch (errorName) {
|
|
1500
|
-
case "required":
|
|
1501
|
-
messages.push(thing + " is required");
|
|
1502
|
-
break;
|
|
1503
|
-
case "minlength":
|
|
1504
|
-
messages.push(thing + " must be at least " + state.errors["minlength"].requiredLength + " characters");
|
|
1505
|
-
break;
|
|
1506
|
-
case "pattern":
|
|
1507
|
-
messages.push(thing + " contains illegal characters");
|
|
1508
|
-
break;
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
return messages;
|
|
1514
|
-
};
|
|
1515
|
-
return ValidationSummaryComponent;
|
|
1516
|
-
}(BaseEditComponent));
|
|
1517
|
-
|
|
1518
|
-
var FormValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1519
|
-
__extends(FormValidationSummaryComponent, _super);
|
|
1520
|
-
function FormValidationSummaryComponent() {
|
|
1521
|
-
var _this = _super.call(this) || this;
|
|
1522
|
-
_this.isVisible = false;
|
|
1523
|
-
return _this;
|
|
1524
|
-
}
|
|
1525
|
-
FormValidationSummaryComponent.prototype.getErrors = function () {
|
|
1526
|
-
var messages = this.getFormValidationMessages();
|
|
1527
|
-
return messages;
|
|
1528
|
-
};
|
|
1529
|
-
return FormValidationSummaryComponent;
|
|
1530
|
-
}(ValidationSummaryComponent));
|
|
1531
|
-
FormValidationSummaryComponent.decorators = [
|
|
1532
|
-
{ type: i0.Component, args: [{
|
|
1533
|
-
selector: "anatoly-form-validation-summary",
|
|
1534
|
-
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"
|
|
1535
|
-
},] }
|
|
1536
|
-
];
|
|
1537
|
-
FormValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1538
|
-
FormValidationSummaryComponent.propDecorators = {
|
|
1539
|
-
isVisible: [{ type: i0.Input }]
|
|
1540
|
-
};
|
|
1541
|
-
|
|
1542
|
-
var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1543
|
-
__extends(ItemValidationSummaryComponent, _super);
|
|
1544
|
-
function ItemValidationSummaryComponent() {
|
|
1545
|
-
return _super.call(this) || this;
|
|
1546
|
-
}
|
|
1547
|
-
return ItemValidationSummaryComponent;
|
|
1548
|
-
}(ValidationSummaryComponent));
|
|
1549
|
-
ItemValidationSummaryComponent.decorators = [
|
|
1550
|
-
{ type: i0.Component, args: [{
|
|
1551
|
-
selector: "anatoly-item-validation-summary",
|
|
1552
|
-
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"
|
|
1553
|
-
},] }
|
|
1554
|
-
];
|
|
1555
|
-
ItemValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1556
|
-
ItemValidationSummaryComponent.propDecorators = {
|
|
1557
|
-
controlName: [{ type: i0.Input }],
|
|
1558
|
-
controlTitle: [{ type: i0.Input }]
|
|
1559
|
-
};
|
|
1560
|
-
|
|
1561
1549
|
/*
|
|
1562
1550
|
<file>
|
|
1563
1551
|
Project:
|
|
@@ -1664,7 +1652,7 @@
|
|
|
1664
1652
|
opt = JSON.parse(this.editorOptions);
|
|
1665
1653
|
}
|
|
1666
1654
|
var newOptions = $.extend({}, DefaultEditorOptions, opt);
|
|
1667
|
-
var key =
|
|
1655
|
+
var key = AppCoreSettings.froalaEditorKey;
|
|
1668
1656
|
if (key) {
|
|
1669
1657
|
newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
|
|
1670
1658
|
}
|
|
@@ -1784,85 +1772,94 @@
|
|
|
1784
1772
|
editorFormKey: [{ type: i0.Input }]
|
|
1785
1773
|
};
|
|
1786
1774
|
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
Authors:
|
|
1793
|
-
Vadim Osovitny
|
|
1794
|
-
Anatoly Osovitny
|
|
1795
|
-
|
|
1796
|
-
Created:
|
|
1797
|
-
23 Apr 2018
|
|
1798
|
-
|
|
1799
|
-
Version:
|
|
1800
|
-
1.0
|
|
1801
|
-
|
|
1802
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1803
|
-
</file>
|
|
1804
|
-
*/
|
|
1805
|
-
var ContentHeaderComponent = /** @class */ (function () {
|
|
1806
|
-
function ContentHeaderComponent() {
|
|
1775
|
+
var ValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1776
|
+
__extends(ValidationSummaryComponent, _super);
|
|
1777
|
+
function ValidationSummaryComponent() {
|
|
1778
|
+
return _super.call(this) || this;
|
|
1807
1779
|
}
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1780
|
+
ValidationSummaryComponent.prototype.getFormValidationMessages = function () {
|
|
1781
|
+
var _this = this;
|
|
1782
|
+
var messages = [];
|
|
1783
|
+
Object.keys(this.formGroup.controls).forEach(function (k) {
|
|
1784
|
+
var control = _this.formGroup.controls[k];
|
|
1785
|
+
if (control.controls != null) {
|
|
1786
|
+
Object.keys(control.controls).forEach(function (k) {
|
|
1787
|
+
var child = control.controls[k];
|
|
1788
|
+
_this.getValidationMessages(child, k).forEach(function (m) { return messages.push(m); });
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
else {
|
|
1792
|
+
_this.getValidationMessages(control, k).forEach(function (m) { return messages.push(m); });
|
|
1793
|
+
}
|
|
1794
|
+
});
|
|
1795
|
+
return messages;
|
|
1796
|
+
};
|
|
1797
|
+
ValidationSummaryComponent.prototype.getValidationMessages = function (state, thingName) {
|
|
1798
|
+
var thing = state.path || thingName;
|
|
1799
|
+
var messages = [];
|
|
1800
|
+
if (state.errors) {
|
|
1801
|
+
for (var errorName in state.errors) {
|
|
1802
|
+
if (state.errors.hasOwnProperty(errorName)) {
|
|
1803
|
+
switch (errorName) {
|
|
1804
|
+
case "required":
|
|
1805
|
+
messages.push(thing + " is required");
|
|
1806
|
+
break;
|
|
1807
|
+
case "minlength":
|
|
1808
|
+
messages.push(thing + " must be at least " + state.errors["minlength"].requiredLength + " characters");
|
|
1809
|
+
break;
|
|
1810
|
+
case "pattern":
|
|
1811
|
+
messages.push(thing + " contains illegal characters");
|
|
1812
|
+
break;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1811
1816
|
}
|
|
1817
|
+
return messages;
|
|
1812
1818
|
};
|
|
1813
|
-
return
|
|
1814
|
-
}());
|
|
1815
|
-
|
|
1819
|
+
return ValidationSummaryComponent;
|
|
1820
|
+
}(BaseEditComponent));
|
|
1821
|
+
|
|
1822
|
+
var FormValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1823
|
+
__extends(FormValidationSummaryComponent, _super);
|
|
1824
|
+
function FormValidationSummaryComponent() {
|
|
1825
|
+
var _this = _super.call(this) || this;
|
|
1826
|
+
_this.isVisible = false;
|
|
1827
|
+
return _this;
|
|
1828
|
+
}
|
|
1829
|
+
FormValidationSummaryComponent.prototype.getErrors = function () {
|
|
1830
|
+
var messages = this.getFormValidationMessages();
|
|
1831
|
+
return messages;
|
|
1832
|
+
};
|
|
1833
|
+
return FormValidationSummaryComponent;
|
|
1834
|
+
}(ValidationSummaryComponent));
|
|
1835
|
+
FormValidationSummaryComponent.decorators = [
|
|
1816
1836
|
{ type: i0.Component, args: [{
|
|
1817
|
-
selector: "anatoly-
|
|
1818
|
-
template: "<
|
|
1837
|
+
selector: "anatoly-form-validation-summary",
|
|
1838
|
+
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"
|
|
1819
1839
|
},] }
|
|
1820
1840
|
];
|
|
1821
|
-
|
|
1822
|
-
|
|
1841
|
+
FormValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1842
|
+
FormValidationSummaryComponent.propDecorators = {
|
|
1843
|
+
isVisible: [{ type: i0.Input }]
|
|
1823
1844
|
};
|
|
1824
1845
|
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
Authors:
|
|
1831
|
-
Vadim Osovitny
|
|
1832
|
-
Anatoly Osovitny
|
|
1833
|
-
|
|
1834
|
-
Created:
|
|
1835
|
-
26 Jun 2020
|
|
1836
|
-
|
|
1837
|
-
Version:
|
|
1838
|
-
1.0
|
|
1839
|
-
|
|
1840
|
-
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1841
|
-
</file>
|
|
1842
|
-
*/
|
|
1843
|
-
var Copy2ClipboardComponent = /** @class */ (function () {
|
|
1844
|
-
function Copy2ClipboardComponent() {
|
|
1845
|
-
this.tooltip = "Copy to clipboard";
|
|
1846
|
-
this.text = "";
|
|
1846
|
+
var ItemValidationSummaryComponent = /** @class */ (function (_super) {
|
|
1847
|
+
__extends(ItemValidationSummaryComponent, _super);
|
|
1848
|
+
function ItemValidationSummaryComponent() {
|
|
1849
|
+
return _super.call(this) || this;
|
|
1847
1850
|
}
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
setTimeout(function () {
|
|
1852
|
-
_this.tooltip = "Copy to clipboard";
|
|
1853
|
-
}, 1000);
|
|
1854
|
-
Utils.copyToClipBoard(event, this.text);
|
|
1855
|
-
};
|
|
1856
|
-
return Copy2ClipboardComponent;
|
|
1857
|
-
}());
|
|
1858
|
-
Copy2ClipboardComponent.decorators = [
|
|
1851
|
+
return ItemValidationSummaryComponent;
|
|
1852
|
+
}(ValidationSummaryComponent));
|
|
1853
|
+
ItemValidationSummaryComponent.decorators = [
|
|
1859
1854
|
{ type: i0.Component, args: [{
|
|
1860
|
-
selector: "anatoly-
|
|
1861
|
-
template: "<
|
|
1855
|
+
selector: "anatoly-item-validation-summary",
|
|
1856
|
+
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"
|
|
1862
1857
|
},] }
|
|
1863
1858
|
];
|
|
1864
|
-
|
|
1865
|
-
|
|
1859
|
+
ItemValidationSummaryComponent.ctorParameters = function () { return []; };
|
|
1860
|
+
ItemValidationSummaryComponent.propDecorators = {
|
|
1861
|
+
controlName: [{ type: i0.Input }],
|
|
1862
|
+
controlTitle: [{ type: i0.Input }]
|
|
1866
1863
|
};
|
|
1867
1864
|
|
|
1868
1865
|
/*
|
|
@@ -1910,8 +1907,7 @@
|
|
|
1910
1907
|
ItemValidationSummaryComponent,
|
|
1911
1908
|
HtmlEditorComponent,
|
|
1912
1909
|
FormsHtmlEditorComponent,
|
|
1913
|
-
ContentHeaderComponent
|
|
1914
|
-
Copy2ClipboardComponent,
|
|
1910
|
+
ContentHeaderComponent
|
|
1915
1911
|
],
|
|
1916
1912
|
exports: [
|
|
1917
1913
|
SubscribePlanButtonComponent,
|
|
@@ -1924,8 +1920,7 @@
|
|
|
1924
1920
|
ItemValidationSummaryComponent,
|
|
1925
1921
|
HtmlEditorComponent,
|
|
1926
1922
|
FormsHtmlEditorComponent,
|
|
1927
|
-
ContentHeaderComponent
|
|
1928
|
-
Copy2ClipboardComponent,
|
|
1923
|
+
ContentHeaderComponent
|
|
1929
1924
|
],
|
|
1930
1925
|
},] }
|
|
1931
1926
|
];
|
|
@@ -1986,6 +1981,7 @@
|
|
|
1986
1981
|
exports.UpgradePlanButtonComponent = UpgradePlanButtonComponent;
|
|
1987
1982
|
exports.Utils = Utils;
|
|
1988
1983
|
exports.ValidationSummaryComponent = ValidationSummaryComponent;
|
|
1984
|
+
exports.throwIfAlreadyLoaded = throwIfAlreadyLoaded;
|
|
1989
1985
|
|
|
1990
1986
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1991
1987
|
|