ps-toolkit-ui 1.14.78 → 1.14.80

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.
@@ -1811,7 +1811,7 @@
1811
1811
  }
1812
1812
  this.getClient(table.url, table.method, table.searchData(), function (res) {
1813
1813
  if (res.status === exports.ResultStatusEnum.Success) {
1814
- if (table.verticalOption !== null) {
1814
+ if (table.vertical) {
1815
1815
  var c_1 = {};
1816
1816
  table.cols.forEach(function (x) { return c_1[x.name] = x.name; });
1817
1817
  c_1.ColType = 'Column';
@@ -3080,16 +3080,15 @@
3080
3080
  };
3081
3081
  TablePaginationComponent.prototype.ngOnInit = function () {
3082
3082
  var _this = this;
3083
- var _a, _b;
3084
3083
  this.perPageSelect = new InputClass(this.table.environment, this.table.l, 'PerPage', '', exports.InputType.Select, 'h-25 p-0 w-80-p f-l');
3085
- this.perPageSelect.value = this.perPageSelect.search = this.table.verticalOption != null ?
3086
- ((_b = (_a = this.table.verticalOption.Responsive.find(function (x) { return x.Size < window.innerWidth; })) === null || _a === void 0 ? void 0 : _a.PerPage) !== null && _b !== void 0 ? _b : 1).toString() : this.table.perPage.toString();
3084
+ this.perPageSelect.value = this.table.perPage.toString();
3087
3085
  this.perPageSelect.options = [
3088
3086
  new OptionClass('5', '5'),
3089
3087
  new OptionClass('10', '10'),
3090
3088
  new OptionClass('50', '50'),
3091
3089
  new OptionClass('100', '100'),
3092
3090
  ];
3091
+ this.perPageSelect.value = this.perPageSelect.search = this.table.perPage.toString();
3093
3092
  this.perPageSelect.displayLabel = false;
3094
3093
  this.perPageSelect.onChange = function (v) {
3095
3094
  _this.table.page = 1;
@@ -3102,7 +3101,7 @@
3102
3101
  TablePaginationComponent.decorators = [
3103
3102
  { type: core.Component, args: [{
3104
3103
  selector: 'lib-table-pagination',
3105
- template: "<div class=\"pagination\">\r\n <div class=\"items\">\r\n <span *ngFor=\"let btn of getButtons()\">\r\n <lib-form-button *ngIf=\"btn.type === type.Button\" [inp]=\"btn\"></lib-form-button>\r\n <div class=\"dots\" *ngIf=\"btn.type === type.Icon\"><div class=\"w-100\"><i class=\"fas fa-ellipsis-h icon\"></i></div></div>\r\n </span>\r\n </div>\r\n <lib-form-select *ngIf=\"table.verticalOption == null\" [inp]=\"perPageSelect\"></lib-form-select>\r\n</div>\r\n",
3104
+ template: "<div class=\"pagination\">\r\n <div class=\"items\">\r\n <span *ngFor=\"let btn of getButtons()\">\r\n <lib-form-button *ngIf=\"btn.type === type.Button\" [inp]=\"btn\"></lib-form-button>\r\n <div class=\"dots\" *ngIf=\"btn.type === type.Icon\"><div class=\"w-100\"><i class=\"fas fa-ellipsis-h icon\"></i></div></div>\r\n </span>\r\n </div>\r\n <lib-form-select *ngIf=\"!table.vertical\" [inp]=\"perPageSelect\"></lib-form-select>\r\n</div>\r\n",
3106
3105
  styles: [".pagination{float:right;margin-top:10px;text-align:center;width:100%}.pagination .items{display:inline-block;position:relative}::ng-deep .table-con .pagination .form-input-con.button{display:inline-block;float:unset;margin:0 2px;min-width:25px;padding:0 5px;vertical-align:middle;width:unset}::ng-deep .table-con .pagination .items .dots{display:inline-block;float:right;height:25px;line-height:25px;margin:0 5px;min-width:25px;vertical-align:middle}::ng-deep .table-con .pagination .form-input-con.select{display:inline-block;float:left;margin:0 5px;min-width:25px;padding:0 5px;width:unset}@media (max-width:399.98px){.pagination .items{margin-bottom:10px}::ng-deep .table-con .pagination .form-input-con.button.extra,::ng-deep .table-con .pagination .form-input-con.button.first,::ng-deep .table-con .pagination .form-input-con.button.last{display:none}::ng-deep .table-con .pagination .form-input-con.button{margin:0 3px;padding:0 3px}::ng-deep .table-con .pagination .items .dots{display:none}::ng-deep .table-con .pagination .form-input-con.select{margin-left:25%!important;width:50%!important}}@media (min-width:400px) and (max-width:499.98px){::ng-deep .table-con .pagination .form-input-con.button.extra,::ng-deep .table-con .pagination .form-input-con.button.first,::ng-deep .table-con .pagination .form-input-con.button.last{display:none}::ng-deep .table-con .pagination .form-input-con.button{margin:0 3px;padding:0 3px}::ng-deep .table-con .pagination .items .dots{display:none}::ng-deep .table-con .pagination .form-input-con.select{margin-left:25%!important;width:50%!important}}@media (min-width:500px) and (max-width:599.98px){::ng-deep .table-con .pagination .form-input-con.button.extra{display:none}::ng-deep .table-con .pagination .form-input-con.button{margin:0 3px;padding:0 3px}::ng-deep .table-con .pagination .items .dots{font-size:10px;margin:0}}@media (min-width:600px) and (max-width:699.98px){::ng-deep .table-con .pagination .form-input-con.button{margin:0 3px;padding:0 3px}::ng-deep .table-con .pagination .items .dots{font-size:10px;margin:0}}@media (min-width:700px) and (max-width:799.98px){::ng-deep .table-con .pagination .form-input-con.button{margin:0 3px;padding:0 3px}::ng-deep .table-con .pagination .items .dots{font-size:10px;margin:0}}@media (min-width:800px) and (max-width:899.98px){::ng-deep .table-con .pagination .form-input-con.button{margin:0 3px;padding:0 3px}::ng-deep .table-con .pagination .items .dots{font-size:10px;margin:0}}@media (min-width:900px) and (max-width:999.98px){::ng-deep .table-con .pagination .form-input-con.button{margin:0 3px;padding:0 3px}::ng-deep .table-con .pagination .items .dots{font-size:10px;margin:0}}"]
3107
3106
  },] }
3108
3107
  ];
@@ -3857,8 +3856,8 @@
3857
3856
  TableComponent.decorators = [
3858
3857
  { type: core.Component, args: [{
3859
3858
  selector: 'lib-table',
3860
- template: "<div [id]=\"table.id + 'Table'\" [style]=\"table.style\" #tableDiv [className]=\"(table.class ? table.class : '') + (table.sortable ? 'sortable' : '') + (table.hasChildren ? ' has-children' : '') + (table.verticalOption != null ? ' vertical' : '') + ' table-con w-100'\">\r\n <div *ngIf=\"table.displayLabel\" class=\"title\">\r\n <div class=\"f-r\">{{this.table.title ? this.table.title : table.l('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 <span *ngIf=\"isSelected()\">\r\n <lib-form-icon *ngFor=\"let btn of table.extraButtons\" [inp]=\"btn\"></lib-form-icon>\r\n </span>\r\n <span *ngIf=\"!isSelected()\">\r\n <lib-form-icon [inp]=\"reload\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"maximum\"></lib-form-icon>\r\n </span>\r\n </div>\r\n <div *ngIf=\"table.buttons.length > 0\" class=\"buttons\">\r\n <span *ngFor=\"let btn of table.buttons\">\r\n <lib-form-button [inp]=\"btn\" *ngIf=\"btn.type == type.Button\"></lib-form-button>\r\n <lib-form-label [inp]=\"btn\" *ngIf=\"btn.type == type.Label\"></lib-form-label>\r\n </span>\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() ? 'fa-solid fa-square-check c-green' : isSelected() ? 'fa-solid fa-square-minus c-green' : 'fa-regular 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\" [innerHTML]=\"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.type != colType.Month && col.enum == null\" [inp]=\"col.search\"></lib-form-textbox>\r\n <lib-form-date *ngIf=\"(col.type == colType.Date || col.type == colType.DateTime || col.type == colType.Month) && 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'} : {minHeight: '120px'}\">\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",
3861
- styles: [".table-con{background-color:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-table);float:right;padding:20px;position:relative}.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>.title .extra-buttons{min-width:80px}.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 .handle-con .handle i{cursor:pointer;font-size:18px}.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 .table .header .row .cell .select-row{cursor:pointer;font-size:18px;height:30px;line-height:30px}::ng-deep .table-con:not(.sortable):not(.vertical) .table lib-table-row:last-of-type>.row-con>.row:after{background-image:unset}::ng-deep .table-con.vertical .table lib-table-row>.row-con>.row:after{background-image:linear-gradient(180deg,rgba(0,0,0,.05),rgba(50,50,50,.15),rgba(0,0,0,.05));height:100%;width:1px}.table-con.vertical .table .header{display:none}::ng-deep .table-con .table lib-table-row{display:contents}.table-con.vertical .table .body{display:flex}::ng-deep .table-con.vertical .table lib-table-row:first-of-type>.row-con{background-color:var(--base-white);border-radius:var(--border-radius-base);max-width:150px;width:auto}"]
3859
+ template: "<div [id]=\"table.id + 'Table'\" [style]=\"table.style\" #tableDiv [className]=\"(table.class ? table.class : '') + (table.sortable ? 'sortable' : '') + (table.hasChildren ? ' has-children' : '') + (table.vertical ? ' vertical' : '') + ' table-con w-100'\">\r\n <div *ngIf=\"table.displayLabel\" class=\"title\">\r\n <div class=\"f-r\">{{this.table.title ? this.table.title : table.l('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 <span *ngIf=\"isSelected()\">\r\n <lib-form-icon *ngFor=\"let btn of table.extraButtons\" [inp]=\"btn\"></lib-form-icon>\r\n </span>\r\n <span *ngIf=\"!isSelected()\">\r\n <lib-form-icon [inp]=\"reload\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"maximum\"></lib-form-icon>\r\n </span>\r\n </div>\r\n <div *ngIf=\"table.buttons.length > 0\" class=\"buttons\">\r\n <span *ngFor=\"let btn of table.buttons\">\r\n <lib-form-button [inp]=\"btn\" *ngIf=\"btn.type == type.Button\"></lib-form-button>\r\n <lib-form-label [inp]=\"btn\" *ngIf=\"btn.type == type.Label\"></lib-form-label>\r\n </span>\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() ? 'fa-solid fa-square-check c-green' : isSelected() ? 'fa-solid fa-square-minus c-green' : 'fa-regular 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\" [innerHTML]=\"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.type != colType.Month && col.enum == null\" [inp]=\"col.search\"></lib-form-textbox>\r\n <lib-form-date *ngIf=\"(col.type == colType.Date || col.type == colType.DateTime || col.type == colType.Month) && 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'} : {minHeight: '120px'}\">\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",
3860
+ styles: [".table-con{background-color:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-table);float:right;padding:20px;position:relative}.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>.title .extra-buttons{min-width:80px}.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 .handle-con .handle i{cursor:pointer;font-size:18px}.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 .table .header .row .cell .select-row{cursor:pointer;font-size:18px;height:30px;line-height:30px}::ng-deep .table-con:not(.sortable):not(.vertical) .table lib-table-row:last-of-type>.row-con>.row:after{background-image:unset}::ng-deep .table-con.vertical .table lib-table-row>.row-con>.row:after{background-image:linear-gradient(180deg,rgba(0,0,0,.05),rgba(50,50,50,.15),rgba(0,0,0,.05));height:100%;width:1px}.table-con.vertical .table .header{display:none}::ng-deep .table-con .table lib-table-row{display:contents}.table-con.vertical .table .body{display:flex}::ng-deep .table-con.vertical .table lib-table-row:first-of-type>.row-con{background-color:var(--base-white);border-radius:var(--border-radius-base);max-width:200px;width:auto}"]
3862
3861
  },] }
3863
3862
  ];
3864
3863
  TableComponent.ctorParameters = function () { return [
@@ -8826,7 +8825,7 @@
8826
8825
  this.optionType = exports.TableOptionType.Hidden;
8827
8826
  this.loading = true;
8828
8827
  this.hasChildren = false;
8829
- this.verticalOption = null;
8828
+ this.vertical = false;
8830
8829
  this.childrenAutoLoad = false;
8831
8830
  this.withSelect = false;
8832
8831
  this.showExtraButtons = true;