ps-toolkit-ui 1.8.17 → 1.8.20
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 +13 -2
- 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 +10 -1
- package/esm2015/lib/classes/string.class.js +2 -1
- package/esm2015/lib/components/form/index/form.component.js +2 -2
- package/esm2015/lib/components/table/table.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +13 -2
- 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 +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -306,6 +306,7 @@
|
|
|
306
306
|
FormBaseErrorExpired: 'لطفا مجددا وارد شوید',
|
|
307
307
|
FormBaseErrorNotRegistered: 'خطا در تایید کد نرم افزار',
|
|
308
308
|
FormBaseErrorExpiredRegistered: 'کد نرم افزار منقضی شده است',
|
|
309
|
+
FormBaseErrorInvalidIp: 'آیپی شما نامعتبر است',
|
|
309
310
|
ErrorUpload: 'خطا در بارگذاری فایل',
|
|
310
311
|
FormBaseErrorInvalidParam: 'خطا در اطلاعات ارسال شده',
|
|
311
312
|
FormBaseErrorTimeOut: 'درخواست شما بیش از حد معمول زمان برده است. لطفا مجددا تلاش کنید',
|
|
@@ -846,6 +847,7 @@
|
|
|
846
847
|
ResultStatusEnum[ResultStatusEnum["NotAccess"] = 3] = "NotAccess";
|
|
847
848
|
ResultStatusEnum[ResultStatusEnum["NotRegistered"] = 4] = "NotRegistered";
|
|
848
849
|
ResultStatusEnum[ResultStatusEnum["ExpiredRegistered"] = 5] = "ExpiredRegistered";
|
|
850
|
+
ResultStatusEnum[ResultStatusEnum["InvalidIp"] = 6] = "InvalidIp";
|
|
849
851
|
})(exports.ResultStatusEnum || (exports.ResultStatusEnum = {}));
|
|
850
852
|
(function (PermissionTypeEnum) {
|
|
851
853
|
PermissionTypeEnum[PermissionTypeEnum["Form"] = -1] = "Form";
|
|
@@ -1344,6 +1346,9 @@
|
|
|
1344
1346
|
else if (res.status === exports.ResultStatusEnum.ExpiredRegistered) {
|
|
1345
1347
|
m = form.l('FormBaseErrorExpiredRegistered');
|
|
1346
1348
|
}
|
|
1349
|
+
else if (res.status === exports.ResultStatusEnum.InvalidIp) {
|
|
1350
|
+
m = form.l('FormBaseErrorInvalidIp');
|
|
1351
|
+
}
|
|
1347
1352
|
else if (res.status === exports.ResultStatusEnum.Unauthorized) {
|
|
1348
1353
|
m = form.l('FormBaseErrorExpired');
|
|
1349
1354
|
}
|
|
@@ -1455,6 +1460,9 @@
|
|
|
1455
1460
|
else if (res.status === exports.ResultStatusEnum.ExpiredRegistered) {
|
|
1456
1461
|
m = 'FormBaseErrorExpiredRegistered';
|
|
1457
1462
|
}
|
|
1463
|
+
else if (res.status === exports.ResultStatusEnum.InvalidIp) {
|
|
1464
|
+
m = 'FormBaseErrorInvalidIp';
|
|
1465
|
+
}
|
|
1458
1466
|
else if (res.status === exports.ResultStatusEnum.Unauthorized) {
|
|
1459
1467
|
m = 'FormBaseErrorExpired';
|
|
1460
1468
|
}
|
|
@@ -1525,6 +1533,9 @@
|
|
|
1525
1533
|
else if (res.status === exports.ResultStatusEnum.ExpiredRegistered) {
|
|
1526
1534
|
m = 'FormBaseErrorExpiredRegistered';
|
|
1527
1535
|
}
|
|
1536
|
+
else if (res.status === exports.ResultStatusEnum.InvalidIp) {
|
|
1537
|
+
m = 'FormBaseErrorInvalidIp';
|
|
1538
|
+
}
|
|
1528
1539
|
else if (res.status === exports.ResultStatusEnum.Unauthorized) {
|
|
1529
1540
|
m = 'FormBaseErrorExpired';
|
|
1530
1541
|
}
|
|
@@ -3347,7 +3358,7 @@
|
|
|
3347
3358
|
TableComponent.decorators = [
|
|
3348
3359
|
{ type: core.Component, args: [{
|
|
3349
3360
|
selector: 'lib-table',
|
|
3350
|
-
template: "<div [id]=\"table.id + 'Table'\" [style]=\"table.style\" #tableDiv [className]=\"(table.class ? table.class : '') + (table.sortable ? 'sortable' : '') + (table.hasChildren ? ' has-children' : '') + ' table-con'\">\r\n <div *ngIf=\"table.displayLabel\" class=\"title\">\r\n <div class=\"f-r\">{{this.table.title ? this.table.title : 'List'}}</div>\r\n <span class=\"description\" *ngIf=\"this.table.description != null\" [innerHTML]=\"'( ' + this.table.description + ' )'\"></span>\r\n <div class=\"extra-buttons\" *ngIf=\"table.showExtraButtons\">\r\n <lib-form-icon *ngFor=\"let btn of table.extraButtons\" [inp]=\"btn\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"reload\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"maximum\"></lib-form-icon>\r\n </div>\r\n <div *ngIf=\"table.buttons.length > 0\" class=\"buttons\">\r\n <lib-form-button [inp]=\"btn\" *ngFor=\"let btn of table.buttons\"></lib-form-button>\r\n </div>\r\n </div>\r\n <div class=\"search-form\" *ngIf=\"table.searchForm\">\r\n <lib-form [form]=\"table.searchForm\"></lib-form>\r\n </div>\r\n <lib-form *ngIf=\"table.form && table.form.onTop\" [form]=\"table.form\"></lib-form>\r\n <div class=\"table\">\r\n <div class=\"header\">\r\n <div [className]=\"(table.hasChildren ? 'with-handle-children ' : '') + (table.sortable ? 'with-handle-sortable ' : '') + (table.withSelect ? 'with-handle-select ' : '') + 'row'\">\r\n <div class=\"handle-con\">\r\n <div class=\"handle handle-sortable\" *ngIf=\"table.sortable\"></div>\r\n <div class=\"handle handle-select\" *ngIf=\"table.hasChildren\"></div>\r\n <div class=\"handle handle-children\" *ngIf=\"table.withSelect\">\r\n <i (click)=\"selectAll()\" [className]=\"(allSelected() ? 'fas fa-check-square green' : isSelected() ? 'fas fa-minus-square green' : 'far fa-square') + ' select-row'\" *ngIf=\"table.rows.length > 0\"></i>\r\n </div>\r\n </div>\r\n <div (click)=\"!table.sortable && col.sort && changeSort($event, col.name)\" [className]=\"(!table.sortable && col.sort ? 'sort ' : '') + col.class + ' ' + col.name + '-cell cell w-100'\" *ngFor=\"let col of table.cols\">\r\n <div class=\"header-title\" *ngIf=\"col.search == null || table.sortable\">{{ table.l(col.name) }}</div>\r\n <div class=\"header-search\" *ngIf=\"!table.sortable && col.search != null\">\r\n <lib-form-textbox *ngIf=\"col.type != colType.Date && col.type != colType.DateTime && col.enum == null\" [inp]=\"col.search\"></lib-form-textbox>\r\n <lib-form-date *ngIf=\"(col.type == colType.Date || col.type == colType.DateTime) && col.enum == null\" [inp]=\"col.search\"></lib-form-date>\r\n <lib-form-select *ngIf=\"col.enum != null\" [inp]=\"col.search\"></lib-form-select>\r\n </div>\r\n <i *ngIf=\"!table.sortable && col.sort\" [className]=\"'sort-icon fas' + (table.sort === col.name ? (table.sortType === 'ASC' ? ' fa-sort-up' : ' fa-sort-down') : ' fa-sort')\"></i>\r\n </div>\r\n <div class=\"cell options\" *ngIf=\"table.optionType == tableOptionType.Show\">{{table.l('Options')}}</div>\r\n </div>\r\n </div>\r\n <div class=\"body\" #rows [style]=\"table.perPage > 0 ? {minHeight: table.height * table.perPage + 'px'} : table.loading || !table.permission || table.rows.length == 0 ? {minHeight: '100px'} : {}\">\r\n <lib-table-
|
|
3361
|
+
template: "<div [id]=\"table.id + 'Table'\" [style]=\"table.style\" #tableDiv [className]=\"(table.class ? table.class : '') + (table.sortable ? 'sortable' : '') + (table.hasChildren ? ' has-children' : '') + ' table-con'\">\r\n <div *ngIf=\"table.displayLabel\" class=\"title\">\r\n <div class=\"f-r\">{{this.table.title ? this.table.title : 'List'}}</div>\r\n <span class=\"description\" *ngIf=\"this.table.description != null\" [innerHTML]=\"'( ' + this.table.description + ' )'\"></span>\r\n <div class=\"extra-buttons\" *ngIf=\"table.showExtraButtons\">\r\n <lib-form-icon *ngFor=\"let btn of table.extraButtons\" [inp]=\"btn\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"reload\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"maximum\"></lib-form-icon>\r\n </div>\r\n <div *ngIf=\"table.buttons.length > 0\" class=\"buttons\">\r\n <lib-form-button [inp]=\"btn\" *ngFor=\"let btn of table.buttons\"></lib-form-button>\r\n </div>\r\n </div>\r\n <div class=\"search-form\" *ngIf=\"table.searchForm\">\r\n <lib-form [form]=\"table.searchForm\"></lib-form>\r\n </div>\r\n <lib-form *ngIf=\"table.form && table.form.onTop\" [form]=\"table.form\"></lib-form>\r\n <div class=\"table\">\r\n <div class=\"header\">\r\n <div [className]=\"(table.hasChildren ? 'with-handle-children ' : '') + (table.sortable ? 'with-handle-sortable ' : '') + (table.withSelect ? 'with-handle-select ' : '') + 'row'\">\r\n <div class=\"handle-con\">\r\n <div class=\"handle handle-sortable\" *ngIf=\"table.sortable\"></div>\r\n <div class=\"handle handle-select\" *ngIf=\"table.hasChildren\"></div>\r\n <div class=\"handle handle-children\" *ngIf=\"table.withSelect\">\r\n <i (click)=\"selectAll()\" [className]=\"(allSelected() ? 'fas fa-check-square green' : isSelected() ? 'fas fa-minus-square green' : 'far fa-square') + ' select-row'\" *ngIf=\"table.rows.length > 0\"></i>\r\n </div>\r\n </div>\r\n <div (click)=\"!table.sortable && col.sort && changeSort($event, col.name)\" [className]=\"(!table.sortable && col.sort ? 'sort ' : '') + col.class + ' ' + col.name + '-cell cell w-100'\" *ngFor=\"let col of table.cols\">\r\n <div class=\"header-title\" *ngIf=\"col.search == null || table.sortable\">{{ table.l(col.name) }}</div>\r\n <div class=\"header-search\" *ngIf=\"!table.sortable && col.search != null\">\r\n <lib-form-textbox *ngIf=\"col.type != colType.Date && col.type != colType.DateTime && col.enum == null\" [inp]=\"col.search\"></lib-form-textbox>\r\n <lib-form-date *ngIf=\"(col.type == colType.Date || col.type == colType.DateTime) && col.enum == null\" [inp]=\"col.search\"></lib-form-date>\r\n <lib-form-select *ngIf=\"col.enum != null\" [inp]=\"col.search\"></lib-form-select>\r\n </div>\r\n <i *ngIf=\"!table.sortable && col.sort\" [className]=\"'sort-icon fas' + (table.sort === col.name ? (table.sortType === 'ASC' ? ' fa-sort-up' : ' fa-sort-down') : ' fa-sort')\"></i>\r\n </div>\r\n <div class=\"cell options\" *ngIf=\"table.optionType == tableOptionType.Show\">{{table.l('Options')}}</div>\r\n </div>\r\n </div>\r\n <div class=\"body\" #rows [style]=\"table.perPage > 0 ? {minHeight: table.height * table.perPage + 'px'} : table.loading || !table.permission || table.rows.length == 0 ? {minHeight: '100px'} : {}\">\r\n <lib-table-row (confirmShow)=\"onConfirmShow($event)\" [level]=\"1\" (changeRows)=\"onChangeRows($event)\" [id]=\"row.id ? row.id : ''\" [table]=\"table\" [row]=\"row\" *ngFor=\"let row of getRows()\"></lib-table-row>\r\n <lib-table-loading [table]=\"table\"></lib-table-loading>\r\n </div>\r\n </div>\r\n <lib-table-pagination [table]=\"table\" *ngIf=\"table.perPage > 0\"></lib-table-pagination>\r\n <lib-modal *ngIf=\"table.modal != null\" [modal]=\"table.modal\"></lib-modal>\r\n <lib-modal [modal]=\"opt\" *ngFor=\"let opt of getModals()\"></lib-modal>\r\n <lib-confirm #confirm [tableId]=\"table.name\"></lib-confirm>\r\n</div>\r\n",
|
|
3351
3362
|
styles: [".table-con{background-color:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-table);float:right;padding:20px;position:relative;width:100%}.table-con.maximum{border-radius:0;height:100%;overflow-y:auto;position:fixed;right:0;top:0;width:100%;z-index:102}.table-con>.title{float:right;font-size:16px;font-weight:700;line-height:40px;margin-bottom:10px;position:relative;text-align:right;width:100%}.table-con>.title .description{font-size:13px;font-weight:200;margin-right:10px}.table-con>.title .buttons,.table-con>.title .extra-buttons{float:left;margin-top:5px;position:relative;z-index:1}.table-con>.search-form{border-radius:var(--border-radius-base);float:right;margin-bottom:10px;width:100%}.table-con .table,.table-con .table .header{float:right;width:100%}.table-con .table .header .row{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;align-items:center;background-color:var(--base-white);border-radius:var(--border-radius-base);display:flex;flex-wrap:wrap;float:right;justify-content:right;position:relative;width:100%}.table-con .table .header .row.with-handle-children,.table-con .table .header .row.with-handle-select,.table-con .table .header .row.with-handle-sortable{padding-right:30px}.table-con .table .header .row.with-handle-children.with-handle-select,.table-con .table .header .row.with-handle-sortable.with-handle-children,.table-con .table .header .row.with-handle-sortable.with-handle-select{padding-right:60px}.table-con .table .header .row.with-handle-sortable.with-handle-children.with-handle-select{padding-right:90px}.table-con .table .header .row .cell{align-items:center;color:var(--black-light);display:flex;float:right;font-size:12px;font-weight:200;font-weight:400;height:45px;justify-content:center;position:relative}.table-con .table .header .row .cell.options{margin-left:auto;margin-right:auto}.table-con .table .header .row .handle-con{height:100%;position:absolute;right:0;top:0}.table-con .table .header .row .handle-con .handle{align-items:center;display:flex;float:right;height:100%;justify-content:center;width:30px}.table-con .table .header .row .cell.sort{cursor:pointer}.table-con .table .header .row .cell .header-title{float:right;padding:0 15px;text-align:center;width:calc(100% - 20px)}.table-con .table .header .row .cell .header-search{float:right;width:calc(100% - 20px)}.table-con .table .header .row .cell .sort-icon{float:right;font-size:13px;height:20px;left:5px;line-height:20px;opacity:.6;top:calc(50% - 10px);width:20px}.table-con .table .body{float:right;position:relative;width:100%}::ng-deep .table-con:not(.sortable) .table lib-table-row:last-of-type>.row-con>.row:after{background-image:unset}::ng-deep .table-con .table .header .row .cell .select-row{cursor:pointer;font-size:18px;height:30px;line-height:30px}"]
|
|
3352
3363
|
},] }
|
|
3353
3364
|
];
|
|
@@ -4313,7 +4324,7 @@
|
|
|
4313
4324
|
});
|
|
4314
4325
|
FormComponent.prototype.ngOnInit = function () {
|
|
4315
4326
|
if (this.form.onTop) {
|
|
4316
|
-
this.form.inputs.forEach(function (x) { return 'h-30 ' + x.class; });
|
|
4327
|
+
this.form.inputs.forEach(function (x) { return x.class = 'h-30 ' + x.class; });
|
|
4317
4328
|
}
|
|
4318
4329
|
};
|
|
4319
4330
|
FormComponent.prototype.changeIndex = function (index, action) {
|