@churchillliving/se-ui-toolkit 6.53.108 → 6.53.110
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/churchillliving-se-ui-toolkit.umd.js +21 -16
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/form/form.component.js +3 -3
- package/esm2015/lib/components/base/grid/grid.component.js +3 -3
- package/esm2015/lib/services/alert.service.js +13 -13
- package/fesm2015/churchillliving-se-ui-toolkit.js +16 -16
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/services/alert.service.d.ts +5 -5
- package/package.json +1 -1
|
@@ -513,28 +513,33 @@
|
|
|
513
513
|
this.dialogService = dialogService;
|
|
514
514
|
this.confirmationService = confirmationService;
|
|
515
515
|
}
|
|
516
|
-
AlertService.prototype.success = function (message) {
|
|
517
|
-
|
|
516
|
+
AlertService.prototype.success = function (message, time) {
|
|
517
|
+
if (time === void 0) { time = 5000; }
|
|
518
|
+
this.toastr.success(message, "", { closeButton: true, timeOut: time });
|
|
518
519
|
};
|
|
519
|
-
AlertService.prototype.info = function (message) {
|
|
520
|
-
|
|
520
|
+
AlertService.prototype.info = function (message, time) {
|
|
521
|
+
if (time === void 0) { time = 5000; }
|
|
522
|
+
this.toastr.info(message, "", { closeButton: true, timeOut: time });
|
|
521
523
|
};
|
|
522
|
-
AlertService.prototype.warning = function (message) {
|
|
523
|
-
|
|
524
|
+
AlertService.prototype.warning = function (message, time) {
|
|
525
|
+
if (time === void 0) { time = 5000; }
|
|
526
|
+
this.toastr.warning(message, "", { closeButton: true, timeOut: time });
|
|
524
527
|
};
|
|
525
|
-
AlertService.prototype.error = function (error, message) {
|
|
526
|
-
|
|
528
|
+
AlertService.prototype.error = function (error, time, message) {
|
|
529
|
+
if (time === void 0) { time = 5000; }
|
|
530
|
+
this.toastr.error(error, message, { closeButton: true, timeOut: time });
|
|
527
531
|
};
|
|
528
|
-
AlertService.prototype.apiError = function (error) {
|
|
532
|
+
AlertService.prototype.apiError = function (error, time) {
|
|
533
|
+
if (time === void 0) { time = 5000; }
|
|
529
534
|
if (typeof error === 'string' || typeof error.error === 'string') {
|
|
530
|
-
typeof error.error === 'string' ? this.error(error.error) : this.error(error);
|
|
535
|
+
typeof error.error === 'string' ? this.error(error.error, time) : this.error(error, time);
|
|
531
536
|
}
|
|
532
537
|
else if (error && error.error && error.error.errorDetails) {
|
|
533
538
|
var _a = __read(error.error.errorDetails, 1), responseError = _a[0];
|
|
534
|
-
this.error(responseError.errorMessage);
|
|
539
|
+
this.error(responseError.errorMessage, time);
|
|
535
540
|
}
|
|
536
541
|
else if (error && error.headers && error.status !== 401) {
|
|
537
|
-
this.error('something went wrong during api request');
|
|
542
|
+
this.error('something went wrong during api request', time);
|
|
538
543
|
}
|
|
539
544
|
};
|
|
540
545
|
AlertService.prototype.confirm = function (_a) {
|
|
@@ -4617,10 +4622,10 @@
|
|
|
4617
4622
|
});
|
|
4618
4623
|
var isRequired = columns.some(function (column) { return column.errorMessage && !row[column.field]; });
|
|
4619
4624
|
if (isRequired) {
|
|
4620
|
-
this.alertService.error(errorMessageDetails_1, 'REQUIRED FIELD');
|
|
4625
|
+
this.alertService.error(errorMessageDetails_1, 5000, 'REQUIRED FIELD');
|
|
4621
4626
|
}
|
|
4622
4627
|
else {
|
|
4623
|
-
this.alertService.error(errorMessageDetails_1, 'INVALID FIELD');
|
|
4628
|
+
this.alertService.error(errorMessageDetails_1, 5000, 'INVALID FIELD');
|
|
4624
4629
|
}
|
|
4625
4630
|
return false;
|
|
4626
4631
|
}
|
|
@@ -6537,10 +6542,10 @@
|
|
|
6537
6542
|
});
|
|
6538
6543
|
var field = formSection.fields.some(function (field) { return field.requiredField && field.errorMessage && !field.value; });
|
|
6539
6544
|
if (validity && field) {
|
|
6540
|
-
_this.alertService.error(errorMessageDetails, 'REQUIRED FIELD');
|
|
6545
|
+
_this.alertService.error(errorMessageDetails, 5000, 'REQUIRED FIELD');
|
|
6541
6546
|
}
|
|
6542
6547
|
else {
|
|
6543
|
-
_this.alertService.error(errorMessageDetails, 'INVALID FIELD');
|
|
6548
|
+
_this.alertService.error(errorMessageDetails, 5000, 'INVALID FIELD');
|
|
6544
6549
|
}
|
|
6545
6550
|
validity = false;
|
|
6546
6551
|
}
|