ps-toolkit-ui 1.6.89 → 1.6.92
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/ps-toolkit-ui.umd.js +45 -7
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/enum.class.js +2 -1
- package/esm2015/lib/classes/request.class.js +14 -5
- package/esm2015/lib/classes/string.class.js +4 -2
- package/esm2015/lib/components/error/error.component.js +27 -0
- package/esm2015/lib/ps-toolkit-ui.module.js +4 -3
- package/esm2015/ps-toolkit-ui.js +2 -1
- package/fesm2015/ps-toolkit-ui.js +44 -9
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +2 -1
- package/lib/classes/string.class.d.ts +3 -1
- package/lib/components/error/error.component.d.ts +9 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.d.ts +1 -0
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
},
|
|
116
116
|
App: {
|
|
117
117
|
Notfound: 'صفحه مورد نظر یافت نشد',
|
|
118
|
+
Error: 'خطا در سیستم',
|
|
118
119
|
},
|
|
119
120
|
Notfound: {
|
|
120
121
|
Text: 'متاسفانه صفحه مورد نظر شما یافت نشد',
|
|
@@ -302,7 +303,8 @@
|
|
|
302
303
|
FormErrorUpload: 'خطا در بارگذاری {}',
|
|
303
304
|
FormError: 'خطا در {}',
|
|
304
305
|
FormBaseErrorExpired: 'لطفا مجددا وارد شوید',
|
|
305
|
-
|
|
306
|
+
FormBaseErrorNotRegistered: 'خطا در تایید کد نرم افزار',
|
|
307
|
+
FormBaseErrorExpiredRegistered: 'کد نرم افزار منقضی شده است',
|
|
306
308
|
ErrorUpload: 'خطا در بارگذاری فایل',
|
|
307
309
|
FormBaseErrorInvalidParam: 'خطا در اطلاعات ارسال شده',
|
|
308
310
|
FormBaseErrorTimeOut: 'درخواست شما بیش از حد معمول زمان برده است. لطفا مجددا تلاش کنید',
|
|
@@ -840,6 +842,7 @@
|
|
|
840
842
|
ResultStatusEnum[ResultStatusEnum["Success"] = 1] = "Success";
|
|
841
843
|
ResultStatusEnum[ResultStatusEnum["Unauthorized"] = 2] = "Unauthorized";
|
|
842
844
|
ResultStatusEnum[ResultStatusEnum["NotAccess"] = 3] = "NotAccess";
|
|
845
|
+
ResultStatusEnum[ResultStatusEnum["NotRegistered"] = 4] = "NotRegistered";
|
|
843
846
|
})(exports.ResultStatusEnum || (exports.ResultStatusEnum = {}));
|
|
844
847
|
(function (PermissionTypeEnum) {
|
|
845
848
|
PermissionTypeEnum[PermissionTypeEnum["Form"] = -1] = "Form";
|
|
@@ -1329,7 +1332,10 @@
|
|
|
1329
1332
|
}
|
|
1330
1333
|
else {
|
|
1331
1334
|
var m = '';
|
|
1332
|
-
if (res.status === exports.ResultStatusEnum.
|
|
1335
|
+
if (res.status === exports.ResultStatusEnum.NotRegistered) {
|
|
1336
|
+
m = form.l('FormBaseErrorNotRegistered');
|
|
1337
|
+
}
|
|
1338
|
+
else if (res.status === exports.ResultStatusEnum.Unauthorized) {
|
|
1333
1339
|
m = form.l('FormBaseErrorExpired');
|
|
1334
1340
|
}
|
|
1335
1341
|
else if (res.status === exports.ResultStatusEnum.NotAccess) {
|
|
@@ -1434,7 +1440,10 @@
|
|
|
1434
1440
|
}
|
|
1435
1441
|
else {
|
|
1436
1442
|
var m = '';
|
|
1437
|
-
if (res.status === exports.ResultStatusEnum.
|
|
1443
|
+
if (res.status === exports.ResultStatusEnum.NotRegistered) {
|
|
1444
|
+
m = 'FormBaseErrorNotRegistered';
|
|
1445
|
+
}
|
|
1446
|
+
else if (res.status === exports.ResultStatusEnum.Unauthorized) {
|
|
1438
1447
|
m = 'FormBaseErrorExpired';
|
|
1439
1448
|
}
|
|
1440
1449
|
else if (res.status === exports.ResultStatusEnum.NotAccess) {
|
|
@@ -1498,7 +1507,10 @@
|
|
|
1498
1507
|
}
|
|
1499
1508
|
else {
|
|
1500
1509
|
var m = '';
|
|
1501
|
-
if (res.status === exports.ResultStatusEnum.
|
|
1510
|
+
if (res.status === exports.ResultStatusEnum.NotRegistered) {
|
|
1511
|
+
m = 'FormBaseErrorNotRegistered';
|
|
1512
|
+
}
|
|
1513
|
+
else if (res.status === exports.ResultStatusEnum.Unauthorized) {
|
|
1502
1514
|
m = 'FormBaseErrorExpired';
|
|
1503
1515
|
}
|
|
1504
1516
|
else if (res.status === exports.ResultStatusEnum.NotAccess) {
|
|
@@ -1520,7 +1532,7 @@
|
|
|
1520
1532
|
HelperClass.addNotification(_this.l(m));
|
|
1521
1533
|
}
|
|
1522
1534
|
if (failure) {
|
|
1523
|
-
failure(
|
|
1535
|
+
failure(m);
|
|
1524
1536
|
}
|
|
1525
1537
|
if (btn) {
|
|
1526
1538
|
btn.loading = false;
|
|
@@ -6583,6 +6595,31 @@
|
|
|
6583
6595
|
{ type: PsToolkitUiConfigService }
|
|
6584
6596
|
]; };
|
|
6585
6597
|
|
|
6598
|
+
var ErrorComponent = /** @class */ (function () {
|
|
6599
|
+
function ErrorComponent(config, route) {
|
|
6600
|
+
this.config = config;
|
|
6601
|
+
this.route = route;
|
|
6602
|
+
this.message = this.route.snapshot.paramMap.get('message');
|
|
6603
|
+
var lang = new LangClass(config.currentLang, config.strings);
|
|
6604
|
+
this.l = function (key, v) {
|
|
6605
|
+
if (v === void 0) { v = null; }
|
|
6606
|
+
return lang.get('Public', 'Error', key, v);
|
|
6607
|
+
};
|
|
6608
|
+
}
|
|
6609
|
+
return ErrorComponent;
|
|
6610
|
+
}());
|
|
6611
|
+
ErrorComponent.decorators = [
|
|
6612
|
+
{ type: core.Component, args: [{
|
|
6613
|
+
selector: 'lib-error',
|
|
6614
|
+
template: "<div id=\"Error\">\r\n <div class=\"error-con\" *ngIf=\"message === 'not-registered'\">\r\n <i class=\"fa-duotone fa-registered error-icon\"></i>\r\n <div class=\"error-text\">{{l(\"FormBaseErrorNotRegistered\")}}</div>\r\n </div>\r\n <div class=\"error-con\" *ngIf=\"message === 'expired-registered'\">\r\n <i class=\"fa-duotone fa-hourglass-end error-icon\"></i>\r\n <div class=\"error-text\">{{l(\"FormBaseErrorExpiredRegistered\")}}</div>\r\n </div>\r\n</div>\r\n",
|
|
6615
|
+
styles: ["#Error{align-items:center;background-color:#fff;display:flex;float:right;justify-content:center;min-height:calc(100vh - 125px);position:relative;width:100%}#Error .error-con{border-radius:var(--border-radius-base);float:right;height:100%;width:100%}#Error .error-con .error-text{float:right;font-family:VazirBold;font-size:60px;height:100px;line-height:120px;position:relative;text-align:center;width:100%;z-index:2}#Error .error-con .error-icon{color:var(--base-white);float:right;font-size:150px;text-align:center;width:100%}@media (max-width:399.99px){#Error .error-con{right:5%;width:90%}#Error .error-con .error-text{font-size:90px}#Error .error-con .error-icon{font-size:300px;left:-90px}}@media (min-width:400px) and (max-width:499.99px){#Error .error-con{right:5%;width:90%}#Error .error-con .error-text{font-size:110px}#Error .error-con .error-icon{font-size:380px}}@media (min-width:500px) and (max-width:599.99px){#Error .error-con{right:5%;width:90%}#Error .error-con .error-text{font-size:110px}#Error .error-con .error-icon{font-size:380px}}@media (min-width:600px) and (max-width:699.99px){#Error .error-con{right:10%;width:80%}#Error .error-con .error-text{font-size:120px}}"]
|
|
6616
|
+
},] }
|
|
6617
|
+
];
|
|
6618
|
+
ErrorComponent.ctorParameters = function () { return [
|
|
6619
|
+
{ type: PsToolkitUiConfigService },
|
|
6620
|
+
{ type: router.ActivatedRoute }
|
|
6621
|
+
]; };
|
|
6622
|
+
|
|
6586
6623
|
var FormFingerComponent = /** @class */ (function () {
|
|
6587
6624
|
function FormFingerComponent() {
|
|
6588
6625
|
this.changeIndex = new core.EventEmitter();
|
|
@@ -7679,7 +7716,7 @@
|
|
|
7679
7716
|
TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
|
|
7680
7717
|
FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
|
|
7681
7718
|
SafeStylePipe, LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
|
|
7682
|
-
ClockComponent, ChartComponent, SafeHtmlPipe, FormTagComponent
|
|
7719
|
+
ClockComponent, ChartComponent, SafeHtmlPipe, FormTagComponent, ErrorComponent
|
|
7683
7720
|
],
|
|
7684
7721
|
imports: [
|
|
7685
7722
|
common.CommonModule,
|
|
@@ -7695,7 +7732,7 @@
|
|
|
7695
7732
|
TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
|
|
7696
7733
|
FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
|
|
7697
7734
|
LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
|
|
7698
|
-
ClockComponent, ChartComponent, FormTagComponent
|
|
7735
|
+
ClockComponent, ChartComponent, FormTagComponent, ErrorComponent
|
|
7699
7736
|
]
|
|
7700
7737
|
},] }
|
|
7701
7738
|
];
|
|
@@ -8300,6 +8337,7 @@
|
|
|
8300
8337
|
exports.ɵn = ChartComponent;
|
|
8301
8338
|
exports.ɵo = SafeHtmlPipe;
|
|
8302
8339
|
exports.ɵp = FormTagComponent;
|
|
8340
|
+
exports.ɵq = ErrorComponent;
|
|
8303
8341
|
|
|
8304
8342
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8305
8343
|
|