ps-toolkit-ui 1.22.2 → 1.22.7

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.
@@ -3242,6 +3242,40 @@ class TableClass {
3242
3242
  span.innerHTML = s;
3243
3243
  return span.textContent || span.innerText;
3244
3244
  }
3245
+ exportTable(type, btn) {
3246
+ const getWidthValue = (str) => {
3247
+ const matches = [...str.matchAll(/w-(\d+)(?:-(\d+))?/g)];
3248
+ if (!matches.length) {
3249
+ return null;
3250
+ }
3251
+ const max = matches.reduce((best, m) => {
3252
+ const first = +m[1];
3253
+ const second = +m[2] || null;
3254
+ if (!best || first > best.first) {
3255
+ return { first, second };
3256
+ }
3257
+ return best;
3258
+ }, null);
3259
+ const s = (max.second || max.first);
3260
+ return s == null ? 100 : s;
3261
+ };
3262
+ const url = this.url;
3263
+ const data = this.searchData();
3264
+ data.Page = 1;
3265
+ data.PerPage = -1;
3266
+ data.ReportType = type;
3267
+ data.Cols = this.cols.map(x => {
3268
+ return {
3269
+ Name: x.name,
3270
+ TrnName: this.l(x.name),
3271
+ Width: getWidthValue(x.class),
3272
+ Type: x.type,
3273
+ };
3274
+ });
3275
+ new RequestClass(this.environment, this.l).send(url, Method.Post, data, btn, (result) => {
3276
+ window.open(this.environment.url + '/report/{}/{}'.replace('{}', type).replace('{}', result), '_blank');
3277
+ }, () => { });
3278
+ }
3245
3279
  }
3246
3280
  class TableCollClass {
3247
3281
  constructor(name, cls = '', type = TableCollType.Text, withSearch = true, sort = true) {
@@ -3281,6 +3315,8 @@ class TableRowComponent {
3281
3315
  if (this.table.subTable != null) {
3282
3316
  this.subTable = new TableClass(this.table.environment, this.table.l, null, this.table.subTable.name, this.table.subTable.class, this.table.subTable.perPage, this.table.subTable.height);
3283
3317
  this.subTable.getRowClass = this.table.subTable.getRowClass;
3318
+ this.subTable.onLoad = this.table.subTable.onLoad;
3319
+ this.subTable.optionsActions = this.table.subTable.optionsActions;
3284
3320
  this.subTable.displayLabel = this.table.subTable.displayLabel;
3285
3321
  this.subTable.optionType = this.table.subTable.optionType;
3286
3322
  this.subTable.cols = this.table.subTable.cols;
@@ -3788,16 +3824,16 @@ class TableComponent {
3788
3824
  $(this.exportDropDown.nativeElement).slideToggle();
3789
3825
  };
3790
3826
  this.pdf.onClick = () => {
3791
- this.exportTable(TableExportType.Pdf, this.pdf);
3827
+ this.table.exportTable(TableExportType.Pdf, this.pdf);
3792
3828
  };
3793
3829
  this.excel.onClick = () => {
3794
- this.exportTable(TableExportType.Excel, this.excel);
3830
+ this.table.exportTable(TableExportType.Excel, this.excel);
3795
3831
  };
3796
3832
  this.excelUi.onClick = () => {
3797
3833
  this.table.excel();
3798
3834
  };
3799
3835
  this.print.onClick = () => {
3800
- this.exportTable(TableExportType.Print, this.print);
3836
+ this.table.exportTable(TableExportType.Print, this.print);
3801
3837
  };
3802
3838
  this.maximum.onClick = () => {
3803
3839
  $(this.tableDiv.nativeElement).toggleClass('maximum');
@@ -3811,40 +3847,6 @@ class TableComponent {
3811
3847
  this.confirm.show(l, url, data, accept);
3812
3848
  };
3813
3849
  }
3814
- exportTable(type, btn) {
3815
- const getWidthValue = (str) => {
3816
- const matches = [...str.matchAll(/w-(\d+)(?:-(\d+))?/g)];
3817
- if (!matches.length) {
3818
- return null;
3819
- }
3820
- const max = matches.reduce((best, m) => {
3821
- const first = +m[1];
3822
- const second = +m[2] || null;
3823
- if (!best || first > best.first) {
3824
- return { first, second };
3825
- }
3826
- return best;
3827
- }, null);
3828
- const s = (max.second || max.first);
3829
- return s == null ? 100 : s;
3830
- };
3831
- const url = this.table.url;
3832
- const data = this.table.searchData();
3833
- data.Page = 1;
3834
- data.PerPage = -1;
3835
- data.ReportType = type;
3836
- data.Cols = this.table.cols.map(x => {
3837
- return {
3838
- Name: x.name,
3839
- TrnName: this.table.l(x.name),
3840
- Width: getWidthValue(x.class),
3841
- Type: x.type,
3842
- };
3843
- });
3844
- new RequestClass(this.table.environment, this.table.l).send(url, Method.Post, data, btn, (result) => {
3845
- window.open(this.table.environment.url + '/report/{}/{}'.replace('{}', type).replace('{}', result), '_blank');
3846
- }, () => { });
3847
- }
3848
3850
  allChecked() {
3849
3851
  return this.table.rows.filter(x => !x.checked).length === 0;
3850
3852
  }
@@ -3930,7 +3932,7 @@ TableComponent.decorators = [
3930
3932
  { type: Component, args: [{
3931
3933
  selector: 'lib-table',
3932
3934
  template: "<div [id]=\"table.id + 'Table'\" [style]=\"table.style\" #tableDiv [className]=\"(table.class ? table.class : '') + (table.sortable ? 'sortable' : '') + (table.hasChildren || table.subTable != null ? ' has-children' : '') + (table.vertical ? ' vertical' : '') + (table.expertSearch ? ' expert-search' : '') + ' table-con w-100'\">\r\n <div *ngIf=\"table.displayLabel\" class=\"title\">\r\n <div class=\"f-r\" [innerHTML]=\"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 <lib-form-icon *ngFor=\"let btn of table.extraButtons\" [inp]=\"btn\"></lib-form-icon>\r\n <span *ngIf=\"isChecked()\">\r\n <lib-form-icon *ngFor=\"let btn of table.optionButtons\" [inp]=\"btn\"></lib-form-icon>\r\n </span>\r\n <span *ngIf=\"!isChecked()\">\r\n <lib-form-icon *ngIf=\"table.expertSearch\" [inp]=\"expertSearch\"></lib-form-icon>\r\n<!-- <lib-form-icon [inp]=\"excelUi\"></lib-form-icon>-->\r\n <lib-form-icon [inp]=\"export\"></lib-form-icon>\r\n <div #exportDropDown class=\"export-dropdown-con\">\r\n <lib-form-button [inp]=\"print\"></lib-form-button>\r\n <lib-form-button [inp]=\"excel\"></lib-form-button>\r\n <lib-form-button [inp]=\"pdf\"></lib-form-button>\r\n </div>\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-icon [inp]=\"btn\" *ngIf=\"btn.type == type.Icon\"></lib-form-icon>\r\n <lib-form-label [inp]=\"btn\" *ngIf=\"btn.type == type.Label\"></lib-form-label>\r\n <lib-form-select [inp]=\"btn\" *ngIf=\"btn.type == type.Select\"></lib-form-select>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"search-form\" *ngIf=\"table.searchForm\" (click)=\"hideExpertSearch($event)\">\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 || table.subTable != null ? 'with-handle-children ' : '') + (table.sortable ? 'with-handle-sortable ' : '') + (table.withCheck ? 'with-handle-check ' : '') + 'row'\">\r\n <div class=\"handle-con\">\r\n <div class=\"handle handle-sortable\" *ngIf=\"table.sortable\"></div>\r\n <div class=\"handle handle-check\" *ngIf=\"table.hasChildren || table.subTable != null\"></div>\r\n <div class=\"handle handle-children\" *ngIf=\"table.withCheck\">\r\n <i (click)=\"checkAll()\" [className]=\"(allChecked() ? 'fa-solid fa-square-check c-green' : isChecked() ? 'fa-solid fa-square-minus c-green' : 'fa-regular fa-square') + ' check-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.DateDif && col.type != colType.DateRemain && col.type != colType.Month && col.type != colType.Year && 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.DateDif || col.type === colType.DateRemain || col.type == colType.Month || col.type == colType.Year) && 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: '250px'}\">\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",
3933
- 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:var(--font-bold);line-height:40px;margin-bottom:10px;position:relative;text-align:right;width:100%;z-index:3}.table-con>.title .description{font-size:13px;font-weight:var(--font-light);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>.title .extra-buttons .export-dropdown-con{background-color:var(--white);border-radius:var(--border-radius-base);display:none;left:20px;position:absolute;top:30px;width:150px;z-index:1}::ng-deep .table-con>.title .extra-buttons .export-dropdown-con lib-form-button .form-input-con.button .form-input .control{border-radius:0}::ng-deep .table-con>.title .extra-buttons .export-dropdown-con lib-form-button:first-of-type .form-input-con.button .form-input .control{border-radius:var(--border-radius-base) var(--border-radius-base) 0 0}::ng-deep .table-con>.title .extra-buttons .export-dropdown-con lib-form-button:last-of-type .form-input-con.button .form-input .control{border-radius:0 0 var(--border-radius-base) var(--border-radius-base)}.table-con>.search-form{border-radius:var(--border-radius-base);float:right;margin-bottom:10px;width:100%}.table-con.expert-search>.search-form{background-color:rgba(51,51,51,.4);height:100%;left:0;margin-bottom:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:all .35s ease-in-out;visibility:hidden;width:100%;z-index:4}.table-con.expert-search.show-expert-search>.search-form{opacity:1;visibility:visible}::ng-deep .table-con.expert-search>.search-form .form{background-color:var(--white);box-shadow:var(--box-shadow-right);height:100%;left:calc(-20% - 20px);padding:20px;position:absolute;top:0;transition:all .35s ease-in-out;width:20%;z-index:4}::ng-deep .table-con.expert-search>.search-form .form .inputs{float:right;height:calc(100% - 50px);margin:0;overflow-y:auto;width:100%}::ng-deep .table-con.expert-search.show-expert-search>.search-form .form{left:0}.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-check,.table-con .table .header .row.with-handle-children,.table-con .table .header .row.with-handle-sortable{padding-right:30px}.table-con .table .header .row.with-handle-children.with-handle-check,.table-con .table .header .row.with-handle-sortable.with-handle-check,.table-con .table .header .row.with-handle-sortable.with-handle-children{padding-right:60px}.table-con .table .header .row.with-handle-sortable.with-handle-children.with-handle-check{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:var(--font-normal);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 .check-row{cursor:pointer;font-size:18px;height:30px;line-height:30px}::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%;left:0;right:unset;width:1px}::ng-deep .table-con.vertical:not(.sortable) .table lib-table-row:first-of-type>.row-con>.row:after,::ng-deep .table-con:not(.sortable) .table lib-table-row:last-of-type>.row-con>.row:after{background-image:unset}.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}@media (max-width:499.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-100% - 20px);width:100%}}@media (min-width:500px) and (max-width:699.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-50% - 20px);width:50%}}@media (min-width:700px) and (max-width:999.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-40% - 20px);width:40%}}@media (min-width:1000px) and (max-width:1599.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-30% - 20px);width:30%}}"]
3935
+ 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:112}.table-con>.title{float:right;font-size:16px;font-weight:var(--font-bold);line-height:40px;margin-bottom:10px;position:relative;text-align:right;width:100%;z-index:3}.table-con>.title .description{font-size:13px;font-weight:var(--font-light);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>.title .extra-buttons .export-dropdown-con{background-color:var(--white);border-radius:var(--border-radius-base);display:none;left:20px;position:absolute;top:30px;width:150px;z-index:1}::ng-deep .table-con>.title .extra-buttons .export-dropdown-con lib-form-button .form-input-con.button .form-input .control{border-radius:0}::ng-deep .table-con>.title .extra-buttons .export-dropdown-con lib-form-button:first-of-type .form-input-con.button .form-input .control{border-radius:var(--border-radius-base) var(--border-radius-base) 0 0}::ng-deep .table-con>.title .extra-buttons .export-dropdown-con lib-form-button:last-of-type .form-input-con.button .form-input .control{border-radius:0 0 var(--border-radius-base) var(--border-radius-base)}.table-con>.search-form{border-radius:var(--border-radius-base);float:right;margin-bottom:10px;width:100%}.table-con.expert-search>.search-form{background-color:rgba(51,51,51,.4);height:100%;left:0;margin-bottom:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:all .35s ease-in-out;visibility:hidden;width:100%;z-index:4}.table-con.expert-search.show-expert-search>.search-form{opacity:1;visibility:visible}::ng-deep .table-con.expert-search>.search-form .form{background-color:var(--white);box-shadow:var(--box-shadow-right);height:100%;left:calc(-20% - 20px);padding:20px;position:absolute;top:0;transition:all .35s ease-in-out;width:20%;z-index:4}::ng-deep .table-con.expert-search>.search-form .form .inputs{float:right;height:calc(100% - 50px);margin:0;overflow-y:auto;width:100%}::ng-deep .table-con.expert-search.show-expert-search>.search-form .form{left:0}.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-check,.table-con .table .header .row.with-handle-children,.table-con .table .header .row.with-handle-sortable{padding-right:30px}.table-con .table .header .row.with-handle-children.with-handle-check,.table-con .table .header .row.with-handle-sortable.with-handle-check,.table-con .table .header .row.with-handle-sortable.with-handle-children{padding-right:60px}.table-con .table .header .row.with-handle-sortable.with-handle-children.with-handle-check{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:var(--font-normal);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 .check-row{cursor:pointer;font-size:18px;height:30px;line-height:30px}::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%;left:0;right:unset;width:1px}::ng-deep .table-con.vertical:not(.sortable) .table lib-table-row:first-of-type>.row-con>.row:after,::ng-deep .table-con:not(.sortable) .table lib-table-row:last-of-type>.row-con>.row:after{background-image:unset}.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}@media (max-width:499.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-100% - 20px);width:100%}}@media (min-width:500px) and (max-width:699.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-50% - 20px);width:50%}}@media (min-width:700px) and (max-width:999.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-40% - 20px);width:40%}}@media (min-width:1000px) and (max-width:1599.99px){::ng-deep .table-con.expert-search>.search-form .form{left:calc(-30% - 20px);width:30%}}"]
3934
3936
  },] }
3935
3937
  ];
3936
3938
  TableComponent.ctorParameters = () => [
@@ -6345,6 +6347,9 @@ class FormTableComponent {
6345
6347
  };
6346
6348
  this.inp.clear = () => {
6347
6349
  this.inp.error = null;
6350
+ if (this.inp.table.form !== null) {
6351
+ this.inp.table.form.clear();
6352
+ }
6348
6353
  this.inp.setValue(this.inp.default === null ? [] : this.inp.default, false);
6349
6354
  };
6350
6355
  this.inp.data = () => {
@@ -6666,7 +6671,7 @@ class FormTextboxComponent {
6666
6671
  FormTextboxComponent.decorators = [
6667
6672
  { type: Component, args: [{
6668
6673
  selector: 'lib-form-textbox',
6669
- template: "<div #inputDiv [id]=\"inp.id + 'TextInput'\" [style]=\"inp.style\" [className]=\"'form-input-con text w-100' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '') + (!inp.displayLabel ? ' without-label' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onFocusIn()\">\r\n <div class=\"label\"><i *ngIf=\"inp.required\" class=\"fas fa-star-of-life required-icon\"></i>{{inp.getLabel()}}</div>\r\n <input (keydown)=\"onKeyDown($event)\" (change)=\"onChange($event)\" (keyup)=\"onKeyUp($event)\" (focusout)=\"onFocusOut($event)\" [disabled]=\"inp.disabled || inp.loading\" [value]=\"getValue()\" [placeholder]=\"inp.placeholder ? inp.l(inp.placeholder) : ''\" #inputBase [type]=\"inp.type == type.Password ? 'password': inp.type == type.Mobile ? 'tel': 'text'\" [name]=\"inp.name\" class=\"control\" autocomplete=\"off\" [maxLength]=\"inp.maxLength > 0 ? inp.type == type.Number || inp.type == type.Price ? inp.maxLength.toString().length : inp.maxLength : 524288\">\r\n <span *ngIf=\"inp.icon != null || inp.loading\" (click)=\"inp.button && onClickButton()\" #inputIcon [className]=\"(inp.button ? inp.button + ' button ' : '') + 'icon'\">\r\n <i [className]=\"(inp.loading ? 'fad fa-spin fa-spinner ' : inp.icon + ' ')\">{{inp.type === type.Sheba ? 'IR' : ''}}</i>\r\n </span>\r\n <i *ngIf=\"inp.withClear && inp.value\" (click)=\"inp.clear()\" class=\"fad fa-times clear-icon\"></i>\r\n <div *ngIf=\"inp.progress != null && inp.progress.remainSecs > 0\" [ngStyle]=\"{width: inp.progress.percent + '%'}\" class=\"progress\"></div>\r\n </div>\r\n</div>\r\n",
6674
+ template: "<div #inputDiv [id]=\"inp.id + 'TextInput'\" [style]=\"inp.style\" [className]=\"'form-input-con text w-100' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '') + (!inp.displayLabel ? ' without-label' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onFocusIn()\">\r\n <div class=\"label\"><i *ngIf=\"inp.required\" class=\"fas fa-star-of-life required-icon\"></i>{{inp.getLabel()}}</div>\r\n <input (keydown)=\"onKeyDown($event)\" (change)=\"onChange($event)\" (keyup)=\"onKeyUp($event)\" (focusout)=\"onFocusOut($event)\" [disabled]=\"inp.disabled || inp.loading\" [value]=\"getValue()\" [placeholder]=\"inp.placeholder ? inp.l(inp.placeholder) : ''\" #inputBase [type]=\"inp.type == type.Password ? 'password' : inp.type == type.Mobile ? 'tel': inp.type == type.Number ? 'number': 'text'\" [name]=\"inp.name\" class=\"control\" autocomplete=\"off\" [maxLength]=\"inp.maxLength > 0 ? inp.type == type.Number || inp.type == type.Price ? inp.maxLength.toString().length : inp.maxLength : 524288\">\r\n <span *ngIf=\"inp.icon != null || inp.loading\" (click)=\"inp.button && onClickButton()\" #inputIcon [className]=\"(inp.button ? inp.button + ' button ' : '') + 'icon'\">\r\n <i [className]=\"(inp.loading ? 'fad fa-spin fa-spinner ' : inp.icon + ' ')\">{{inp.type === type.Sheba ? 'IR' : ''}}</i>\r\n </span>\r\n <i *ngIf=\"inp.withClear && inp.value\" (click)=\"inp.clear()\" class=\"fad fa-times clear-icon\"></i>\r\n <div *ngIf=\"inp.progress != null && inp.progress.remainSecs > 0\" [ngStyle]=\"{width: inp.progress.percent + '%'}\" class=\"progress\"></div>\r\n </div>\r\n</div>\r\n",
6670
6675
  styles: [".form-input-con.text{padding:0 15px;position:relative}.form-input-con.text .form-input{float:right;position:relative;width:100%}.form-input-con.text .form-input .label{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;direction:rtl;float:right;font-size:12px;height:20px;line-height:20px;margin-bottom:3px;padding:0 10px;text-align:right;width:100%}.form-input-con.text.error .form-input .label{color:var(--red);font-size:10px}.form-input-con.text.without-label .form-input .label{display:none}.form-input-con.text .form-input .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input-con.text .form-input .control{background-color:#fff;background-image:none;border:var(--border-input);border-radius:var(--border-radius-base);color:var(--black);display:block;font-size:11px;height:35px;padding:5px 35px;position:relative;text-align:center;width:100%;z-index:2}.form-input-con.text.ltr .form-input .control{direction:ltr}.form-input-con.text .form-input .control:focus,.form-input-con.text .form-input:hover .control{border:var(--border-input-dark);outline:none}.form-input-con.text.error .form-input .control{border:var(--border-input-red)}.form-input-con.text.error .form-input .control,.form-input-con.text.error .form-input span.icon{color:var(--red)}.form-input-con.text.error .form-input .control:focus,.form-input-con.text.error .form-input:hover .control{border:var(--border-input-red-dark)}.form-input-con.text .form-input span.icon{bottom:0;color:var(--primary);cursor:text;font-size:14px;height:35px;left:0;line-height:38px;position:absolute;text-align:center;transition:all .35s ease-in-out;width:35px;z-index:2}.form-input-con.text .form-input i.clear-icon{bottom:0;color:var(--red);cursor:pointer;font-size:15px;height:35px;line-height:35px;position:absolute;right:0;text-align:center;width:35px;z-index:4}.form-input-con.text .form-input span.icon.button{background-color:var(--base);border-radius:var(--border-radius-base) 0 0 var(--border-radius-base);color:#fff;cursor:pointer}.form-input-con.text .form-input span.icon.button:hover{background-color:var(--base-dark)}.form-input-con.text .form-input span.icon.button.blue{background-color:var(--blue)}.form-input-con.text .form-input span.icon.button.blue:hover{background-color:var(--blue-dark)}.form-input-con.text .form-input span.icon.button.green{background-color:var(--green)}.form-input-con.text .form-input span.icon.button.green:hover{background-color:var(--green-dark)}.form-input-con.text .form-input span.icon.button.red{background-color:var(--red)}.form-input-con.text .form-input span.icon.button.red:hover{background-color:var(--red-dark)}.form-input-con.text .form-input span.icon.button.primary{background-color:var(--primary)}.form-input-con.text .form-input span.icon.button.primary:hover{background-color:var(--primary-dark)}.form-input-con.text.disabled{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-shadow:unset;cursor:default;filter:blur(.5px);opacity:.7;pointer-events:none}.form-input-con.text .form-input .progress{background-color:var(--primary);border-radius:var(--border-radius-base);bottom:-3px;height:10px;line-height:10px;margin-right:0;position:absolute;right:0;transition:width .5s ease-in-out;width:100%}.form-input-con.text.without-icon .form-input .control{padding:5px 10px}.form-input-con.text.h-50 .form-input .control{font-size:14px;height:50px;padding:5px 50px}.form-input-con.text.h-50 .form-input span.icon{height:50px;line-height:50px;width:50px}.form-input-con.text.h-45 .form-input .control{font-size:17px;height:45px}.form-input-con.text.h-45 .form-input .control::-moz-placeholder,.form-input-con.text.h-45 .form-input .control::-webkit-input-placeholder{font-size:12px}.form-input-con.text.h-45 .form-input span.icon{font-size:15px;height:45px;line-height:50px}.form-input-con.text.h-40 .form-input .control{font-size:17px;height:40px}.form-input-con.text.h-40 .form-input .control::-moz-placeholder,.form-input-con.text.h-40 .form-input .control::-webkit-input-placeholder{font-size:12px}.form-input-con.text.h-40 .form-input span.icon{font-size:15px;height:40px;line-height:45px}.form-input-con.text.h-30 .form-input .control{font-size:10px;height:30px;padding:0}.form-input-con.text.h-30 .form-input span.icon{font-size:11px;height:30px;line-height:33px;width:30px}.form-input-con.text.h-35{height:35px}.form-input-con.text.h-35 .form-input .control{height:35px;padding:0 35px}.form-input-con.text.h-35 .form-input span.icon{height:35px;line-height:35px}.form-input-con.text.h-25 .form-input .control{height:25px;padding:0}.form-input-con.text.h-25 .form-input span.icon{font-size:11px;height:25px;line-height:27px;width:25px}.form-input-con.text.h-25 .form-input .control::-moz-placeholder,.form-input-con.text.h-25 .form-input .control::-webkit-input-placeholder{font-size:10px;font-weight:var(--font-light)}.form-input-con.text.h-20 .form-input .control{height:20px;padding:0}.form-input-con.text.h-20 .form-input span.icon{font-size:10px;height:20px;line-height:22px;width:20px}.form-input-con.text.h-20 .form-input .control::-moz-placeholder,.form-input-con.text.h-20 .form-input .control::-webkit-input-placeholder{font-size:9px;font-weight:var(--font-light)}.form-input-con.text.plaque-part-item .form-input .control{border:none!important}.form-input-con.text.plaque-part-item.disabled .form-input .control{filter:blur(0);opacity:1}.form-input-con.text.plaque-part-1{float:left!important;padding:0!important;width:35px!important}.form-input-con.text.plaque-part-1.plaque-part-m{float:left!important;padding:0!important;width:49px!important}.form-input-con.text.plaque-part-1.plaque-part-f{float:right!important;margin-right:35px!important;width:68px!important}.form-input-con.text.plaque-part-1.plaque-part-g{float:right!important;margin-right:35px!important;width:132px!important}.form-input-con.text.plaque-part-2{float:left!important;padding:0!important;width:35px!important}.form-input-con.text.plaque-part-2.plaque-part-f,.form-input-con.text.plaque-part-2.plaque-part-g,.form-input-con.text.plaque-part-2.plaque-part-m{display:none!important}.form-input-con.text.plaque-part-3{float:left!important;padding:0!important;width:49px!important}.form-input-con.text.plaque-part-3.plaque-part-m{width:69px!important}.form-input-con.text.plaque-part-3.plaque-part-f{float:right!important;width:65px!important}.form-input-con.text.plaque-part-3.plaque-part-g{display:none!important}.form-input-con.text.plaque-part-4{float:left!important;margin-top:10px;padding:0!important;width:31px!important}.form-input-con.text.plaque-part-4 .form-input .control{height:25px!important}.form-input-con.text.plaque-part-4.plaque-part-f,.form-input-con.text.plaque-part-4.plaque-part-g,.form-input-con.text.plaque-part-4.plaque-part-m{display:none!important}.form-input-con.text.bank-card-part-item{float:left!important;padding:0!important;width:25%}.form-input-con.text.bank-card-part-item:not(.bank-card-part-4):after{content:\"\\f068\";font-family:Font Awesome\\ 5 Pro;font-size:6px;font-weight:900;height:20px;line-height:20px;position:absolute;right:-10px;text-align:center;top:calc(50% - 10px);width:20px}.form-input-con.text.bank-card-part-item .form-input .control{background-color:initial!important;border:unset!important;box-shadow:unset!important;font-size:13px!important;padding:0!important}"]
6671
6676
  },] }
6672
6677
  ];