ps-toolkit-ui 1.6.64 → 1.6.68

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.
Files changed (25) hide show
  1. package/bundles/ps-toolkit-ui.umd.js +158 -143
  2. package/bundles/ps-toolkit-ui.umd.js.map +1 -1
  3. package/bundles/ps-toolkit-ui.umd.min.js +1 -1
  4. package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
  5. package/esm2015/lib/classes/enum.class.js +5 -3
  6. package/esm2015/lib/classes/form.class.js +45 -30
  7. package/esm2015/lib/classes/helper.class.js +1 -2
  8. package/esm2015/lib/components/form/index/form.component.js +2 -2
  9. package/esm2015/lib/components/form/plaque/form.plaque.component.js +3 -3
  10. package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +2 -2
  11. package/esm2015/lib/components/form/vehicle/form.vehicle.component.js +104 -0
  12. package/esm2015/lib/components/form/vehicle/search/form.vehicle.search.component.js +209 -0
  13. package/esm2015/lib/components/table/row/table.row.component.js +1 -4
  14. package/esm2015/lib/ps-toolkit-ui.module.js +5 -5
  15. package/esm2015/public-api.js +3 -3
  16. package/fesm2015/ps-toolkit-ui.js +120 -116
  17. package/fesm2015/ps-toolkit-ui.js.map +1 -1
  18. package/lib/classes/enum.class.d.ts +4 -2
  19. package/lib/components/form/{car/form.car.component.d.ts → vehicle/form.vehicle.component.d.ts} +1 -1
  20. package/lib/components/form/{car/search/form.car.search.component.d.ts → vehicle/search/form.vehicle.search.component.d.ts} +4 -3
  21. package/package.json +1 -1
  22. package/ps-toolkit-ui.metadata.json +1 -1
  23. package/public-api.d.ts +2 -2
  24. package/esm2015/lib/components/form/car/form.car.component.js +0 -107
  25. package/esm2015/lib/components/form/car/search/form.car.search.component.js +0 -215
@@ -427,8 +427,8 @@ var InputType;
427
427
  InputType[InputType["Hidden"] = 37] = "Hidden";
428
428
  InputType[InputType["Table"] = 38] = "Table";
429
429
  InputType[InputType["Tag"] = 39] = "Tag";
430
- InputType[InputType["CarSearch"] = 40] = "CarSearch";
431
- InputType[InputType["Car"] = 41] = "Car";
430
+ InputType[InputType["VehicleSearch"] = 40] = "VehicleSearch";
431
+ InputType[InputType["Vehicle"] = 41] = "Vehicle";
432
432
  InputType[InputType["Finger"] = 42] = "Finger";
433
433
  InputType[InputType["Color"] = 43] = "Color";
434
434
  InputType[InputType["Star"] = 44] = "Star";
@@ -534,6 +534,8 @@ var PermissionInputTypeEnum;
534
534
  })(PermissionInputTypeEnum || (PermissionInputTypeEnum = {}));
535
535
  var VehicleType;
536
536
  (function (VehicleType) {
537
+ VehicleType[VehicleType["Driver"] = -2] = "Driver";
538
+ VehicleType[VehicleType["Fingerprint"] = -1] = "Fingerprint";
537
539
  VehicleType[VehicleType["Car"] = 1] = "Car";
538
540
  VehicleType[VehicleType["Motorcycle"] = 2] = "Motorcycle";
539
541
  VehicleType[VehicleType["Airplane"] = 3] = "Airplane";
@@ -886,7 +888,6 @@ class HelperClass {
886
888
  inp.setValue(s, false);
887
889
  setTimeout(() => {
888
890
  $$1('#' + inp.id + 'TextInput .control').click();
889
- inp.focus();
890
891
  }, 100);
891
892
  }
892
893
  if (inp.onBarcodeReaderChange !== null) {
@@ -1284,41 +1285,50 @@ class FormClass {
1284
1285
  if (d == null) {
1285
1286
  d = {};
1286
1287
  }
1287
- this.inputs.forEach(inp => {
1288
- const vl = inp.data();
1289
- if (vl !== null) {
1290
- if (d[inp.name] === undefined) {
1291
- set(d, inp.name, vl);
1292
- }
1293
- else {
1294
- if (d[inp.name] instanceof Array) {
1295
- d[inp.name].push(vl);
1296
- }
1297
- else {
1298
- d[inp.name] = [d[inp.name], vl];
1299
- }
1300
- }
1301
- }
1302
- });
1303
1288
  }
1304
1289
  else {
1305
1290
  if (d == null) {
1306
1291
  d = new FormData();
1307
1292
  }
1308
- this.inputs.forEach(inp => {
1309
- const vl = inp.data();
1310
- if (vl !== null) {
1311
- if (vl instanceof Array) {
1312
- for (const v of vl) {
1313
- d.append(inp.name, v);
1314
- }
1293
+ }
1294
+ const setD = (n, vl) => {
1295
+ if (d instanceof FormData) {
1296
+ if (vl instanceof Array) {
1297
+ for (const v of vl) {
1298
+ d.append(n, v);
1299
+ }
1300
+ }
1301
+ else {
1302
+ d.append(n, vl);
1303
+ }
1304
+ }
1305
+ else {
1306
+ if (d[n] === undefined) {
1307
+ set(d, n, vl);
1308
+ }
1309
+ else {
1310
+ if (d[n] instanceof Array) {
1311
+ d[n].push(vl);
1315
1312
  }
1316
1313
  else {
1317
- d.append(inp.name, vl);
1314
+ d[n] = [d[n], vl];
1318
1315
  }
1319
1316
  }
1320
- });
1321
- }
1317
+ }
1318
+ };
1319
+ this.inputs.forEach(inp => {
1320
+ const vl = inp.data();
1321
+ if (vl !== null) {
1322
+ if (typeof vl === 'object' && !(vl instanceof Array)) {
1323
+ for (const [key, value] of Object.entries(vl)) {
1324
+ setD(key, value);
1325
+ }
1326
+ }
1327
+ else {
1328
+ setD(inp.name, vl);
1329
+ }
1330
+ }
1331
+ });
1322
1332
  return d;
1323
1333
  }
1324
1334
  json(d = null) {
@@ -1343,9 +1353,14 @@ class FormClass {
1343
1353
  setData(d) {
1344
1354
  this.inputs.forEach(inp => {
1345
1355
  const iv = get(d, inp.name);
1346
- if (inp.type === InputType.CarSearch) {
1356
+ if (inp.type === InputType.Vehicle) {
1357
+ const ivt = get(d, inp.name + 'Type');
1358
+ inp.setValue({ Value: iv, Type: ivt }, true);
1359
+ }
1360
+ else if (inp.type === InputType.VehicleSearch) {
1347
1361
  const ivs = get(d, inp.name.replace('Id', ''));
1348
- inp.setValue({ Search: ivs, Value: iv }, true);
1362
+ const ivt = get(d, inp.name + 'Type');
1363
+ inp.setValue({ Search: ivs, Value: iv, Type: ivt }, true);
1349
1364
  }
1350
1365
  else if (inp.type !== InputType.Label || iv != null) {
1351
1366
  inp.setValue(iv, true);
@@ -1495,7 +1510,8 @@ class InputClass {
1495
1510
  return r.filter(x => (p == null && !x.ParentId) || x.ParentId === p || !tree)
1496
1511
  .map((x) => {
1497
1512
  const o = new OptionClass(x.Name, x.Id.toString());
1498
- if (this.type === InputType.SelectAutoCompletePlaque || this.type === InputType.SelectAutoCompletePlaqueM || this.type === InputType.SelectAutoCompletePlaqueF || this.type === InputType.SelectAutoCompletePlaqueG || this.name === 'CarId') {
1513
+ if (this.type === InputType.SelectAutoCompletePlaque || this.type === InputType.SelectAutoCompletePlaqueM ||
1514
+ this.type === InputType.SelectAutoCompletePlaqueF || this.type === InputType.SelectAutoCompletePlaqueG || this.name === 'CarId') {
1499
1515
  const tn = o.name.split('_');
1500
1516
  if (tn.length === 4) {
1501
1517
  tn[1] += '‎';
@@ -2324,9 +2340,6 @@ class TableRowComponent {
2324
2340
  }
2325
2341
  else if (col.type === TableCollType.Plaque) {
2326
2342
  const parts = cv.split('_');
2327
- console.log(cv);
2328
- console.log(parts.length);
2329
- console.log(parts);
2330
2343
  if (parts.length === 4) {
2331
2344
  return '<div data-copy="' + parts.join(' ') + '" class="plaque' + (parts[1] === 'ع' ? ' p' : '') + (parts[1] === 'ا' ? ' g' : '') + '">' +
2332
2345
  '<div class="part1">' + parts[0] + '</div>' +
@@ -3589,7 +3602,7 @@ class FormComponent {
3589
3602
  FormComponent.decorators = [
3590
3603
  { type: Component, args: [{
3591
3604
  selector: 'lib-form',
3592
- template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form' + (form.class ? ' ' + form.class : '')\">\r\n <div *ngIf=\"form.displayLabel\" [className]=\"(form.subName ? '' : 'underline ') + 'title'\">{{this.form.l(this.form.name)}}</div>\r\n <div *ngIf=\"form.displayLabel && form.subName\" class=\"sub-title underline\">{{this.form.l(this.form.subName)}}</div>\r\n <div *ngIf=\"form.loading\" class=\"loading\">\r\n <div class=\"text\" [innerHTML]=\"form.l('LoadingTable', 'Processing')\"></div>\r\n </div>\r\n <div *ngIf=\"!form.permission\" class=\"loading\">\r\n <div class=\"text\"><i class=\"fas fa-shield-alt icon\"></i>{{ form.l(\"PermissionDenied\") }}</div>\r\n </div>\r\n <div class=\"inputs\">\r\n <span *ngFor=\"let inp of form.inputs; let i = index\">\r\n <lib-form-textbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Text || inp.type == type.Password || inp.type == type.Mobile || inp.type == type.Phone || inp.type == type.Email || inp.type == type.NationalCode || inp.type == type.Number || inp.type == type.Url || inp.type == type.PostalCode || inp.type == type.Price || inp.type == type.Sheba || inp.type == type.Color || inp.type == type.BillNumber)\" [inp]=\"inp\"></lib-form-textbox>\r\n <lib-form-textarea (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.TextArea\" [inp]=\"inp\"></lib-form-textarea>\r\n <lib-form-checkbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Check\" [inp]=\"inp\"></lib-form-checkbox>\r\n <lib-form-select [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\"></lib-form-select>\r\n <lib-form-date [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Date\" [inp]=\"inp\"></lib-form-date>\r\n <lib-form-time [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\"></lib-form-time>\r\n <lib-form-datetime [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\"></lib-form-datetime>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n <lib-form-file (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.File\" [inp]=\"inp\"></lib-form-file>\r\n <lib-form-button (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Button || inp.type == type.Submit)\" [inp]=\"inp\"></lib-form-button>\r\n <lib-form-icon (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Icon\" [inp]=\"inp\"></lib-form-icon>\r\n <lib-form-radio (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Radio\" [inp]=\"inp\"></lib-form-radio>\r\n <lib-form-tree (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Tree || inp.type == type.TreeRadio)\" [inp]=\"inp\"></lib-form-tree>\r\n <lib-form-plaque (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Plaque || inp.type == type.PlaqueM || inp.type == type.PlaqueF || inp.type == type.PlaqueG)\" [inp]=\"inp\"></lib-form-plaque>\r\n <lib-form-plaque-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.SelectAutoCompletePlaque || inp.type == type.SelectAutoCompletePlaqueM || inp.type == type.SelectAutoCompletePlaqueF || inp.type == type.SelectAutoCompletePlaqueG)\" [inp]=\"inp\"></lib-form-plaque-select>\r\n <lib-form-bank-card (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.BankCard\" [inp]=\"inp\"></lib-form-bank-card>\r\n <lib-form-car-search (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.CarSearch\" [inp]=\"inp\"></lib-form-car-search>\r\n <lib-form-car (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Car\" [inp]=\"inp\"></lib-form-car>\r\n <lib-form-finger (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Finger\" [inp]=\"inp\"></lib-form-finger>\r\n <lib-form-star (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Star\" [inp]=\"inp\"></lib-form-star>\r\n <lib-form-table *ngIf=\"inp.visible && inp.type == type.Table\" [inp]=\"inp\"></lib-form-table>\r\n <lib-form-tag (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Tag\" [inp]=\"inp\"></lib-form-tag>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n </span>\r\n </div>\r\n</form>\r\n",
3605
+ template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form' + (form.class ? ' ' + form.class : '')\">\r\n <div *ngIf=\"form.displayLabel\" [className]=\"(form.subName ? '' : 'underline ') + 'title'\">{{this.form.l(this.form.name)}}</div>\r\n <div *ngIf=\"form.displayLabel && form.subName\" class=\"sub-title underline\">{{this.form.l(this.form.subName)}}</div>\r\n <div *ngIf=\"form.loading\" class=\"loading\">\r\n <div class=\"text\" [innerHTML]=\"form.l('LoadingTable', 'Processing')\"></div>\r\n </div>\r\n <div *ngIf=\"!form.permission\" class=\"loading\">\r\n <div class=\"text\"><i class=\"fas fa-shield-alt icon\"></i>{{ form.l(\"PermissionDenied\") }}</div>\r\n </div>\r\n <div class=\"inputs\">\r\n <span *ngFor=\"let inp of form.inputs; let i = index\">\r\n <lib-form-textbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Text || inp.type == type.Password || inp.type == type.Mobile || inp.type == type.Phone || inp.type == type.Email || inp.type == type.NationalCode || inp.type == type.Number || inp.type == type.Url || inp.type == type.PostalCode || inp.type == type.Price || inp.type == type.Sheba || inp.type == type.Color || inp.type == type.BillNumber)\" [inp]=\"inp\"></lib-form-textbox>\r\n <lib-form-textarea (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.TextArea\" [inp]=\"inp\"></lib-form-textarea>\r\n <lib-form-checkbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Check\" [inp]=\"inp\"></lib-form-checkbox>\r\n <lib-form-select [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\"></lib-form-select>\r\n <lib-form-date [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Date\" [inp]=\"inp\"></lib-form-date>\r\n <lib-form-time [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\"></lib-form-time>\r\n <lib-form-datetime [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\"></lib-form-datetime>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n <lib-form-file (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.File\" [inp]=\"inp\"></lib-form-file>\r\n <lib-form-button (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Button || inp.type == type.Submit)\" [inp]=\"inp\"></lib-form-button>\r\n <lib-form-icon (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Icon\" [inp]=\"inp\"></lib-form-icon>\r\n <lib-form-radio (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Radio\" [inp]=\"inp\"></lib-form-radio>\r\n <lib-form-tree (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Tree || inp.type == type.TreeRadio)\" [inp]=\"inp\"></lib-form-tree>\r\n <lib-form-plaque (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Plaque || inp.type == type.PlaqueM || inp.type == type.PlaqueF || inp.type == type.PlaqueG)\" [inp]=\"inp\"></lib-form-plaque>\r\n <lib-form-plaque-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.SelectAutoCompletePlaque || inp.type == type.SelectAutoCompletePlaqueM || inp.type == type.SelectAutoCompletePlaqueF || inp.type == type.SelectAutoCompletePlaqueG)\" [inp]=\"inp\"></lib-form-plaque-select>\r\n <lib-form-bank-card (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.BankCard\" [inp]=\"inp\"></lib-form-bank-card>\r\n <lib-form-vehicle-search (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.VehicleSearch\" [inp]=\"inp\"></lib-form-vehicle-search>\r\n <lib-form-vehicle (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Vehicle\" [inp]=\"inp\"></lib-form-vehicle>\r\n <lib-form-finger (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Finger\" [inp]=\"inp\"></lib-form-finger>\r\n <lib-form-star (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Star\" [inp]=\"inp\"></lib-form-star>\r\n <lib-form-table *ngIf=\"inp.visible && inp.type == type.Table\" [inp]=\"inp\"></lib-form-table>\r\n <lib-form-tag (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Tag\" [inp]=\"inp\"></lib-form-tag>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n </span>\r\n </div>\r\n</form>\r\n",
3593
3606
  styles: [".form{border-radius:var(--border-radius-base);float:right;padding:20px;position:relative;width:100%}.form>.title{font-family:VazirBold;font-size:16px;height:40px}.form>.sub-title,.form>.title{float:right;line-height:30px;margin-bottom:10px;position:relative;text-align:right;width:100%}.form>.sub-title{color:var(--black-light);font-family:VazirLight;font-size:12px;height:30px}.form .loading{background-color:#fff;border-radius:var(--border-radius-base);height:100%;right:0;top:0;z-index:4}.form .loading,.form .loading .text{position:absolute;text-align:center;width:100%}.form .loading .text{font-family:VazirBold;height:35px;line-height:35px;top:calc(50% - 20px)}::ng-deep .form .loading .icon{font-size:20px!important;line-height:30px;margin-left:5px;position:relative;top:5px}.form-buttons,.form-error{float:right;width:100%}.form-error{color:var(--red-light);font-size:11px;height:15px;line-height:8px;margin-top:10px;padding:0 10px;position:relative;text-align:center}.form-error .message{float:left;width:calc(100% - 40px)}.form-error .icon{float:right;height:20px;line-height:6px;right:0;top:0;width:40px}.form .inputs{margin:0 -15px}"]
3594
3607
  },] }
3595
3608
  ];
@@ -3718,7 +3731,7 @@ class FormPlaqueSelectComponent {
3718
3731
  }
3719
3732
  else if (this.inp.type === InputType.SelectAutoCompletePlaqueG) {
3720
3733
  this.part1.minLength = 3;
3721
- this.part1.maxLength = 10;
3734
+ this.part1.maxLength = 15;
3722
3735
  this.part1.type = InputType.Text;
3723
3736
  this.part1.class += ' plaque-part-g';
3724
3737
  this.part2.class += ' plaque-part-g';
@@ -4126,7 +4139,7 @@ class FormPlaqueComponent {
4126
4139
  }
4127
4140
  else if (this.inp.type === InputType.PlaqueG) {
4128
4141
  this.part1.minLength = 3;
4129
- this.part1.maxLength = 10;
4142
+ this.part1.maxLength = 15;
4130
4143
  this.part1.type = InputType.Text;
4131
4144
  this.part1.class += ' plaque-part-g';
4132
4145
  this.part2.class += ' plaque-part-g';
@@ -4331,7 +4344,7 @@ class FormPlaqueComponent {
4331
4344
  getValue() {
4332
4345
  return this.isValid() ? (this.inp.type === InputType.Plaque ?
4333
4346
  `${this.part1.value ? this.part1.value : ''}_${this.part2.value ? this.part2.value : ''}_${this.part3.value ? this.part3.value : ''}_${this.part4.value ? this.part4.value : ''}` :
4334
- (this.inp.type === InputType.PlaqueM || this.inp.type === InputType.PlaqueF ? `${this.part1.value ? this.part1.value : ''}_${this.part3.value ? this.part3.value : ''}` : `${this.part1.value ? this.part1.value : ''}`)) : null;
4347
+ (this.inp.type === InputType.PlaqueM || this.inp.type === InputType.PlaqueF ? `${this.part1.value ? this.part1.value : ''}_${this.part3.value ? this.part3.value : ''}` : `${this.part1.value ? this.part1.value : ''}`)).toUpperCase() : null;
4335
4348
  }
4336
4349
  }
4337
4350
  FormPlaqueComponent.decorators = [
@@ -5788,10 +5801,10 @@ FormFingerComponent.propDecorators = {
5788
5801
  inputLabel: [{ type: ViewChild, args: ['inputLabel',] }]
5789
5802
  };
5790
5803
 
5791
- class FormCarSearchComponent {
5804
+ class FormVehicleSearchComponent {
5792
5805
  constructor() {
5793
5806
  this.changeIndex = new EventEmitter();
5794
- this.type = 'Car';
5807
+ this.type = VehicleType.Car;
5795
5808
  this.wsAuth = null;
5796
5809
  }
5797
5810
  ngOnInit() {
@@ -5845,35 +5858,26 @@ class FormCarSearchComponent {
5845
5858
  this.fingerprint.disabled = true;
5846
5859
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
5847
5860
  this.inp.setValue = (v) => {
5848
- if (v != null) {
5849
- if (v.Search && v.Search.split('_').length === 2 && v.Search.split('_').every(x => /^[0-9]+$/.test(x))) {
5850
- this.type = 'Motor';
5851
- setTimeout(() => {
5861
+ if (v != null && v.Search) {
5862
+ this.changeType(v.Type);
5863
+ setTimeout(() => {
5864
+ if (v.Type === VehicleType.Motorcycle) {
5852
5865
  this.motor.setValue(v.Value, false);
5853
5866
  this.motor.setSearch(v.Search);
5854
- });
5855
- }
5856
- else if (v.Search && v.Search.split('_').length === 2) {
5857
- this.type = 'CarF';
5858
- setTimeout(() => {
5867
+ }
5868
+ else if (v.Type === VehicleType.CarF) {
5859
5869
  this.carF.setValue(v.Value, false);
5860
5870
  this.carF.setSearch(v.Search);
5861
- });
5862
- }
5863
- else if (v.Search && v.Search.split('_').length === 4) {
5864
- this.type = 'Car';
5865
- setTimeout(() => {
5871
+ }
5872
+ else if (v.Type === VehicleType.Car) {
5866
5873
  this.car.setValue(v.Value, false);
5867
5874
  this.car.setSearch(v.Search);
5868
- });
5869
- }
5870
- else if (v.Search && v.Search.split('_').length === 1) {
5871
- this.type = 'CarG';
5872
- setTimeout(() => {
5875
+ }
5876
+ else if (v.Type === VehicleType.CarG) {
5873
5877
  this.carG.setValue(v.Value, false);
5874
5878
  this.carG.setSearch(v.Search);
5875
- });
5876
- }
5879
+ }
5880
+ });
5877
5881
  }
5878
5882
  };
5879
5883
  this.inp.focus = () => {
@@ -5881,27 +5885,27 @@ class FormCarSearchComponent {
5881
5885
  };
5882
5886
  this.inp.isValid = () => {
5883
5887
  this.inp.error = null;
5884
- if (this.inp.required && this.type === 'Car' && !this.car.isValid()) {
5888
+ if (this.inp.required && this.type === VehicleType.Car && !this.car.isValid()) {
5885
5889
  this.inp.error = InputError.Required;
5886
5890
  return false;
5887
5891
  }
5888
- if (this.inp.required && this.type === 'Motor' && !this.motor.isValid()) {
5892
+ if (this.inp.required && this.type === VehicleType.Motorcycle && !this.motor.isValid()) {
5889
5893
  this.inp.error = InputError.Required;
5890
5894
  return false;
5891
5895
  }
5892
- if (this.inp.required && this.type === 'CarF' && !this.carF.isValid()) {
5896
+ if (this.inp.required && this.type === VehicleType.CarF && !this.carF.isValid()) {
5893
5897
  this.inp.error = InputError.Required;
5894
5898
  return false;
5895
5899
  }
5896
- if (this.inp.required && this.type === 'CarG' && !this.carG.isValid()) {
5900
+ if (this.inp.required && this.type === VehicleType.CarG && !this.carG.isValid()) {
5897
5901
  this.inp.error = InputError.Required;
5898
5902
  return false;
5899
5903
  }
5900
- if (this.inp.required && this.type === 'Driver' && !this.driver.isValid()) {
5904
+ if (this.inp.required && this.type === VehicleType.Driver && !this.driver.isValid()) {
5901
5905
  this.inp.error = InputError.Required;
5902
5906
  return false;
5903
5907
  }
5904
- if (this.inp.required && this.type === 'Fingerprint' && !this.fingerprint.isValid()) {
5908
+ if (this.inp.required && this.type === VehicleType.Fingerprint && !this.fingerprint.isValid()) {
5905
5909
  this.inp.error = InputError.Required;
5906
5910
  return false;
5907
5911
  }
@@ -5910,7 +5914,7 @@ class FormCarSearchComponent {
5910
5914
  this.inp.clear = () => {
5911
5915
  this.inp.error = null;
5912
5916
  this.inp.setValue(null, false);
5913
- this.type = 'Car';
5917
+ this.changeType(VehicleType.Car);
5914
5918
  this.car.clear();
5915
5919
  this.motor.clear();
5916
5920
  this.carF.clear();
@@ -5919,17 +5923,20 @@ class FormCarSearchComponent {
5919
5923
  this.fingerprint.clear();
5920
5924
  };
5921
5925
  this.inp.data = () => {
5922
- return this.type === 'Car' ? this.car.data() :
5923
- this.type === 'Motor' ? this.motor.data() :
5924
- this.type === 'CarF' ? this.carF.data() :
5925
- this.type === 'carG' ? this.carG.data() :
5926
- this.type === 'Driver' ? this.driver.data() :
5927
- this.type === 'Fingerprint' ? this.fingerprint.data() : null;
5926
+ const d = {};
5927
+ d[this.inp.name] = this.type === VehicleType.Car ? this.car.data() :
5928
+ this.type === VehicleType.Motorcycle ? this.motor.data() :
5929
+ this.type === VehicleType.CarF ? this.carF.data() :
5930
+ this.type === VehicleType.CarG ? this.carG.data() :
5931
+ this.type === VehicleType.Driver ? this.driver.data() :
5932
+ this.type === VehicleType.Fingerprint ? this.fingerprint.data() : null;
5933
+ d[this.inp.name + 'Type'] = this.type;
5934
+ return d;
5928
5935
  };
5929
5936
  }
5930
5937
  changeType(t) {
5931
5938
  this.type = t;
5932
- if (t === 'Fingerprint') {
5939
+ if (t === VehicleType.Fingerprint) {
5933
5940
  this.fingerprint.loading = true;
5934
5941
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
5935
5942
  this.fingerprint.value = null;
@@ -5971,35 +5978,35 @@ class FormCarSearchComponent {
5971
5978
  this.onFocusIn();
5972
5979
  }
5973
5980
  onFocusIn() {
5974
- if (this.type === 'Car' || this.type === 'Motor' || this.type === 'CarF' || this.type === 'CarG') {
5981
+ if (this.type === VehicleType.Car || this.type === VehicleType.Motorcycle || this.type === VehicleType.CarF || this.type === VehicleType.CarG) {
5975
5982
  setTimeout(() => {
5976
5983
  $('#' + this.inp.id + 'CarSearchInput' + ' .plaque-inp').click();
5977
5984
  $('#' + this.inp.id + 'CarSearchInput' + ' #Part1Input .control').focus();
5978
5985
  }, 100);
5979
5986
  }
5980
- else if (this.type === 'Driver') {
5987
+ else if (this.type === VehicleType.Driver) {
5981
5988
  this.driver.focus();
5982
5989
  }
5983
- else if (this.type === 'Fingerprint') {
5990
+ else if (this.type === VehicleType.Fingerprint) {
5984
5991
  this.fingerprint.focus();
5985
5992
  }
5986
5993
  }
5987
5994
  }
5988
- FormCarSearchComponent.decorators = [
5995
+ FormVehicleSearchComponent.decorators = [
5989
5996
  { type: Component, args: [{
5990
- selector: 'lib-form-car-search',
5991
- template: "<div #inputDiv [id]=\"inp.id + 'CarSearchInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.icon != null ? '' : ' without-icon') + ' form-input car'\">\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes('Car')\" [className]=\"(type == 'Car' ? 'active ' : '') + 'change-type-btn fas fa-car'\" (click)=\"changeType('Car')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Motor')\" [className]=\"(type == 'Motor' ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType('Motor')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Driver')\" [className]=\"(type == 'Driver' ? 'active ' : '') + 'change-type-btn fas fa-user'\" (click)=\"changeType('Driver')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Fingerprint')\" [className]=\"(type == 'Fingerprint' ? 'active ' : '') + 'change-type-btn fas fa-fingerprint'\" (click)=\"changeType('Fingerprint')\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarF')\" [className]=\"(type == 'CarF' ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType('CarF')\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarG')\" [className]=\"(type == 'CarG' ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType('CarG')\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque-select [inp]=\"car\" *ngIf=\"type === 'Car'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"motor\" *ngIf=\"type === 'Motor'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carF\" *ngIf=\"type === 'CarF'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carG\" *ngIf=\"type === 'CarG'\"></lib-form-plaque-select>\r\n <lib-form-select [inp]=\"driver\" *ngIf=\"type === 'Driver'\"></lib-form-select>\r\n <lib-form-select [inp]=\"fingerprint\" *ngIf=\"type === 'Fingerprint'\"></lib-form-select>\r\n </div>\r\n</div>\r\n",
5997
+ selector: 'lib-form-vehicle-search',
5998
+ template: "<div #inputDiv [id]=\"inp.id + 'CarSearchInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.icon != null ? '' : ' without-icon') + ' form-input vehicle'\">\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes('Car')\" [className]=\"(type == 'Car' ? 'active ' : '') + 'change-type-btn fas fa-vehicle'\" (click)=\"changeType('Car')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Motor')\" [className]=\"(type == 'Motor' ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType('Motor')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Driver')\" [className]=\"(type == 'Driver' ? 'active ' : '') + 'change-type-btn fas fa-user'\" (click)=\"changeType('Driver')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Fingerprint')\" [className]=\"(type == 'Fingerprint' ? 'active ' : '') + 'change-type-btn fas fa-fingerprint'\" (click)=\"changeType('Fingerprint')\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarF')\" [className]=\"(type == 'CarF' ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType('CarF')\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarG')\" [className]=\"(type == 'CarG' ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType('CarG')\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque-select [inp]=\"car\" *ngIf=\"type === 'Car'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"motor\" *ngIf=\"type === 'Motor'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carF\" *ngIf=\"type === 'CarF'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carG\" *ngIf=\"type === 'CarG'\"></lib-form-plaque-select>\r\n <lib-form-select [inp]=\"driver\" *ngIf=\"type === 'Driver'\"></lib-form-select>\r\n <lib-form-select [inp]=\"fingerprint\" *ngIf=\"type === 'Fingerprint'\"></lib-form-select>\r\n </div>\r\n</div>\r\n",
5992
5999
  styles: [".form-input.car{border-radius:var(--border-radius-base);float:right;font-size:15px;position:relative;width:185px}.form-input.car .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.car.error .label{color:var(--red);font-size:10px}.form-input.car .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input.car .label .change-type-btn{cursor:pointer;float:right;font-size:16px;height:20px;line-height:20px;text-align:center;width:30px}.form-input.car .label .change-type-btn.fa-user{font-size:14px;line-height:18px}.form-input.car .label .change-type-btn.active,.form-input.car .label .change-type-btn:hover{color:var(--primary)}.form-input.car .control{background-color:#fff;background-image:none;border:none;border-radius:var(--border-radius-base);box-shadow:0 1px 3px 0 rgba(0,0,0,.4);color:var(--black);display:block;font-family:Vazir;font-size:11px;height:35px;padding:5px 35px;position:relative;text-align:center;width:100%;z-index:2}.form-input.car .control:focus,.form-input.car:hover .control{box-shadow:0 1px 5px 0 rgba(0,0,0,.7)}.form-input.car 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.car 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.car span.icon.button:hover{background-color:var(--base-dark)}.form-input.car span.icon.button.blue{background-color:var(--blue)}.form-input.car span.icon.button.blue:hover{background-color:var(--blue-dark)}.form-input.car span.icon.button.green{background-color:var(--green)}.form-input.car span.icon.button.green:hover{background-color:var(--green-dark)}.form-input.car span.icon.button.red{background-color:var(--red)}.form-input.car span.icon.button.red:hover{background-color:var(--red-dark)}.form-input.car span.icon.button.yellow{background-color:var(--yellow)}.form-input.car span.icon.button.yellow:hover{background-color:var(--yellow-dark)}.form-input.car.disabled .control,.form-input.car.disabled .label,.form-input.car.disabled span.icon{-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}.form-input.car.error .control{box-shadow:0 1px 3px 0 var(--red)}.form-input.car.error .control,.form-input.car.error span.icon{color:var(--red-light)}.form-input.car .progress{background-color:var(--primary);border-radius:var(--border-radius-base);bottom:0;height:3px;line-height:3px;position:absolute;right:0;transition:width .5s ease-in-out;width:100%;z-index:2}.form-input.car.without-icon .control{padding:5px 10px}.form-input.car.h-50 .control{height:50px}.form-input.car.h-50 span.icon{height:50px;line-height:50px}.form-input.car.h-45 .control{height:45px}.form-input.car.h-45 span.icon{height:45px;line-height:45px}.form-input.car.h-30 .control{font-size:10px;height:30px;padding:0}.form-input.car.h-30 span.icon{height:30px;line-height:30px}.form-input.car.h-35{height:35px}.form-input.car.h-35 .control{height:35px;padding:0 35px}.form-input.car.h-35 span.icon{height:35px;line-height:35px}.form-input.car.h-25 .control{height:25px;padding:0}.form-input.car.h-25 span.icon{height:25px;line-height:25px}.form-input.car.table-search{float:right;margin-right:10%;margin-top:4px;width:80%}.form-input.car.h-22 .control{height:22px;padding:0}.form-input.car.h-22 span.icon{height:22px;line-height:22px}.form-input.car.plaque-part-1{float:left;padding:0!important;width:35px!important}.form-input.car.plaque-part-1.plaque-part-m{width:49px!important}.form-input.car.plaque-part-3{float:left;padding:0!important;width:49px!important}.form-input.car.plaque-part-3.plaque-part-m{width:69px!important}.form-input.car.plaque-part-4{float:left;margin-top:10px;padding:0!important;width:34px!important}.form-input.car.plaque-part-4 .control{height:25px!important}.form-input.car.plaque-part-4.plaque-part-m{display:none!important}.form-input.car.bank-card-part-item{float:left;padding:0!important;width:25%}.form-input.car.bank-card-part-item:not(.bank-card-part-4):after{content:\"\\f068\";font-family:Font Awesome\\ 5 Free;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.car.bank-card-part-item .control{background-color:initial!important;box-shadow:unset!important;font-size:13px!important;padding:0!important}"]
5993
6000
  },] }
5994
6001
  ];
5995
- FormCarSearchComponent.ctorParameters = () => [];
5996
- FormCarSearchComponent.propDecorators = {
6002
+ FormVehicleSearchComponent.ctorParameters = () => [];
6003
+ FormVehicleSearchComponent.propDecorators = {
5997
6004
  inp: [{ type: Input }],
5998
6005
  changeIndex: [{ type: Output }],
5999
6006
  inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
6000
6007
  };
6001
6008
 
6002
- class FormCarComponent {
6009
+ class FormVehicleComponent {
6003
6010
  constructor() {
6004
6011
  this.changeIndex = new EventEmitter();
6005
6012
  this.type = VehicleType.Car;
@@ -6013,31 +6020,22 @@ class FormCarComponent {
6013
6020
  this.car.displayLabel = this.carF.displayLabel = this.carG.displayLabel = this.motor.displayLabel = false;
6014
6021
  this.car.disabled = this.carF.disabled = this.carG.disabled = this.motor.disabled = this.inp.disabled;
6015
6022
  this.inp.setValue = (v) => {
6016
- if (v != null) {
6017
- if (v.split('_').length === 2 && v.split('_').every(x => /^[0-9]+$/.test(x))) {
6018
- this.type = VehicleType.Motorcycle;
6019
- setTimeout(() => {
6023
+ if (v != null && v.Value !== null) {
6024
+ this.changeType(v.Type);
6025
+ setTimeout(() => {
6026
+ if (v.Type === VehicleType.Motorcycle) {
6020
6027
  this.motor.setValue(v, false);
6021
- });
6022
- }
6023
- else if (v.split('_').length === 2) {
6024
- this.type = VehicleType.CarF;
6025
- setTimeout(() => {
6028
+ }
6029
+ else if (v.Type === VehicleType.CarF) {
6026
6030
  this.carF.setValue(v, false);
6027
- });
6028
- }
6029
- else if (v.split('_').length === 4) {
6030
- this.type = VehicleType.Car;
6031
- setTimeout(() => {
6031
+ }
6032
+ else if (v.Type === VehicleType.Car) {
6032
6033
  this.car.setValue(v, false);
6033
- });
6034
- }
6035
- else if (v.split('_').length === 1) {
6036
- this.type = VehicleType.CarG;
6037
- setTimeout(() => {
6034
+ }
6035
+ else if (v.Type === VehicleType.CarG) {
6038
6036
  this.carG.setValue(v, false);
6039
- });
6040
- }
6037
+ }
6038
+ });
6041
6039
  }
6042
6040
  };
6043
6041
  this.inp.focus = () => {
@@ -6066,14 +6064,20 @@ class FormCarComponent {
6066
6064
  this.inp.clear = () => {
6067
6065
  this.inp.error = null;
6068
6066
  this.inp.setValue(null, false);
6069
- this.type = VehicleType.Car;
6067
+ this.changeType(VehicleType.Car);
6070
6068
  this.car.clear();
6071
6069
  this.motor.clear();
6072
6070
  this.carF.clear();
6073
6071
  this.carG.clear();
6074
6072
  };
6075
6073
  this.inp.data = () => {
6076
- return this.type === VehicleType.Car ? this.car.data() : this.type === VehicleType.Motorcycle ? this.motor.data() : this.type === VehicleType.CarF ? this.carF.data() : this.type === VehicleType.CarG ? this.carG.data() : null;
6074
+ const d = {};
6075
+ d[this.inp.name] = this.type === VehicleType.Car ? this.car.data() :
6076
+ this.type === VehicleType.Motorcycle ? this.motor.data() :
6077
+ this.type === VehicleType.CarF ? this.carF.data() :
6078
+ this.type === VehicleType.CarG ? this.carG.data() : null;
6079
+ d[this.inp.name + 'Type'] = this.type;
6080
+ return d;
6077
6081
  };
6078
6082
  }
6079
6083
  changeType(t) {
@@ -6089,15 +6093,15 @@ class FormCarComponent {
6089
6093
  }, 100);
6090
6094
  }
6091
6095
  }
6092
- FormCarComponent.decorators = [
6096
+ FormVehicleComponent.decorators = [
6093
6097
  { type: Component, args: [{
6094
- selector: 'lib-form-car',
6095
- template: "<div #inputDiv [id]=\"inp.id + 'CarInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon != null ? '' : ' without-icon') + ' form-input car'\">\r\n <div class=\"disable-con\"></div>\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes('Car')\" [className]=\"(type === vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-car'\" (click)=\"changeType(vehicleType.Car)\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarF')\" [className]=\"(type === vehicleType.CarF ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType(vehicleType.CarF)\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarG')\" [className]=\"(type === vehicleType.CarG ? 'active ' : '') + 'change-type-btn fas fa-globe'\" (click)=\"changeType(vehicleType.CarG)\"></i>\r\n <i *ngIf=\"inp.rows.includes('Motor')\" [className]=\"(type === vehicleType.Motorcycle ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType(vehicleType.Motorcycle)\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"car\" *ngIf=\"type === vehicleType.Car\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carF\" *ngIf=\"type === vehicleType.CarF\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carG\" *ngIf=\"type === vehicleType.CarG\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"motor\" *ngIf=\"type === vehicleType.Motorcycle\"></lib-form-plaque>\r\n </div>\r\n</div>\r\n",
6098
+ selector: 'lib-form-vehicle',
6099
+ template: "<div #inputDiv [id]=\"inp.id + 'CarInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon != null ? '' : ' without-icon') + ' form-input vehicle'\">\r\n <div class=\"disable-con\"></div>\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes('Car')\" [className]=\"(type === vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-vehicle'\" (click)=\"changeType(vehicleType.Car)\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarF')\" [className]=\"(type === vehicleType.CarF ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType(vehicleType.CarF)\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarG')\" [className]=\"(type === vehicleType.CarG ? 'active ' : '') + 'change-type-btn fas fa-globe'\" (click)=\"changeType(vehicleType.CarG)\"></i>\r\n <i *ngIf=\"inp.rows.includes('Motor')\" [className]=\"(type === vehicleType.Motorcycle ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType(vehicleType.Motorcycle)\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"car\" *ngIf=\"type === vehicleType.Car\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carF\" *ngIf=\"type === vehicleType.CarF\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carG\" *ngIf=\"type === vehicleType.CarG\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"motor\" *ngIf=\"type === vehicleType.Motorcycle\"></lib-form-plaque>\r\n </div>\r\n</div>\r\n",
6096
6100
  styles: [".form-input.car{border-radius:var(--border-radius-base);float:right;font-size:15px;position:relative;width:185px}.form-input.car .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.car.error .label{color:var(--red);font-size:10px}.form-input.car .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input.car .label .change-type-btn{cursor:pointer;float:right;font-size:16px;height:20px;line-height:20px;text-align:center;width:30px}.form-input.car .label .change-type-btn.fa-user{font-size:14px;line-height:18px}.form-input.car .label .change-type-btn.active,.form-input.car .label .change-type-btn:hover{color:var(--primary)}.form-input.car .control{background-color:#fff;background-image:none;border:none;border-radius:var(--border-radius-base);box-shadow:0 1px 3px 0 rgba(0,0,0,.4);color:var(--black);display:block;font-family:Vazir;font-size:11px;height:35px;padding:5px 35px;position:relative;text-align:center;width:100%;z-index:2}.form-input.car .control:focus,.form-input.car:hover .control{box-shadow:0 1px 5px 0 rgba(0,0,0,.7)}.form-input.car 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.car 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.car span.icon.button:hover{background-color:var(--base-dark)}.form-input.car span.icon.button.blue{background-color:var(--blue)}.form-input.car span.icon.button.blue:hover{background-color:var(--blue-dark)}.form-input.car span.icon.button.green{background-color:var(--green)}.form-input.car span.icon.button.green:hover{background-color:var(--green-dark)}.form-input.car span.icon.button.red{background-color:var(--red)}.form-input.car span.icon.button.red:hover{background-color:var(--red-dark)}.form-input.car span.icon.button.yellow{background-color:var(--yellow)}.form-input.car span.icon.button.yellow:hover{background-color:var(--yellow-dark)}.form-input.car .disable-con{display:none}.form-input.car.disabled{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-shadow:unset;cursor:default}.form-input.car.disabled .disable-con{display:block;height:100%;position:absolute;right:0;top:0;width:100%;z-index:5}.form-input.car.display .label{display:none}.form-input.car.display .disable-con{display:block;height:100%;position:absolute;right:0;top:0;width:100%;z-index:5}.form-input.car.error .control{box-shadow:0 1px 3px 0 var(--red)}.form-input.car.error .control,.form-input.car.error span.icon{color:var(--red-light)}.form-input.car .progress{background-color:var(--primary);border-radius:var(--border-radius-base);bottom:0;height:3px;line-height:3px;position:absolute;right:0;transition:width .5s ease-in-out;width:100%;z-index:2}.form-input.car.without-icon .control{padding:5px 10px}.form-input.car.h-50 .control{height:50px}.form-input.car.h-50 span.icon{height:50px;line-height:50px}.form-input.car.h-45 .control{height:45px}.form-input.car.h-45 span.icon{height:45px;line-height:45px}.form-input.car.h-30 .control{font-size:10px;height:30px;padding:0}.form-input.car.h-30 span.icon{height:30px;line-height:30px}.form-input.car.h-35{height:35px}.form-input.car.h-35 .control{height:35px;padding:0 35px}.form-input.car.h-35 span.icon{height:35px;line-height:35px}.form-input.car.h-25 .control{height:25px;padding:0}.form-input.car.h-25 span.icon{height:25px;line-height:25px}.form-input.car.table-search{float:right;margin-right:10%;margin-top:4px;width:80%}.form-input.car.h-22 .control{height:22px;padding:0}.form-input.car.h-22 span.icon{height:22px;line-height:22px}.form-input.car.plaque-part-1{float:left;padding:0!important;width:35px!important}.form-input.car.plaque-part-1.plaque-part-m{width:49px!important}.form-input.car.plaque-part-3{float:left;padding:0!important;width:49px!important}.form-input.car.plaque-part-3.plaque-part-m{width:69px!important}.form-input.car.plaque-part-4{float:left;margin-top:10px;padding:0!important;width:34px!important}.form-input.car.plaque-part-4 .control{height:25px!important}.form-input.car.plaque-part-4.plaque-part-m{display:none!important}.form-input.car.bank-card-part-item{float:left;padding:0!important;width:25%}.form-input.car.bank-card-part-item:not(.bank-card-part-4):after{content:\"\\f068\";font-family:Font Awesome\\ 5 Free;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.car.bank-card-part-item .control{background-color:initial!important;box-shadow:unset!important;font-size:13px!important;padding:0!important}"]
6097
6101
  },] }
6098
6102
  ];
6099
- FormCarComponent.ctorParameters = () => [];
6100
- FormCarComponent.propDecorators = {
6103
+ FormVehicleComponent.ctorParameters = () => [];
6104
+ FormVehicleComponent.propDecorators = {
6101
6105
  inp: [{ type: Input }],
6102
6106
  changeIndex: [{ type: Output }],
6103
6107
  inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
@@ -6697,7 +6701,7 @@ PsToolkitUiModule.decorators = [
6697
6701
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
6698
6702
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
6699
6703
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
6700
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
6704
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
6701
6705
  SafeStylePipe, LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
6702
6706
  ClockComponent, ChartComponent, SafeHtmlPipe, FormTagComponent
6703
6707
  ],
@@ -6713,7 +6717,7 @@ PsToolkitUiModule.decorators = [
6713
6717
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
6714
6718
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
6715
6719
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
6716
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
6720
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
6717
6721
  LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
6718
6722
  ClockComponent, ChartComponent, FormTagComponent
6719
6723
  ]
@@ -7162,5 +7166,5 @@ class CurrentDataClass {
7162
7166
  * Generated bundle index. Do not edit.
7163
7167
  */
7164
7168
 
7165
- export { AccordionClass, AccordionComponent, AccordionRowClass, AlertComponent, BaseComponent, ChartClass, ConfirmComponent, CurrentDataClass, DayClass, EnumUtils, FooterComponent, FormBankCardComponent, FormButtonComponent, FormCarComponent, FormCarSearchComponent, FormCheckboxComponent, FormClass, FormComponent, FormDateComponent, FormDatetimeComponent, FormFileComponent, FormFingerComponent, FormIconComponent, FormLabelComponent, FormPlaqueComponent, FormPlaqueSelectComponent, FormRadioComponent, FormSelectComponent, FormStarComponent, FormTableComponent, FormTextareaComponent, FormTextboxComponent, FormTimeComponent, FormTreeComponent, HeaderComponent, HelperClass, InputClass, InputError, InputType, LangClass, LayoutComponent, LoadingComponent, LoginClass, LoginStepClass, Method, ModalClass, ModalComponent, NotfoundComponent, OperationEnum, OptionClass, PaymentStatusEnum, PermissionAccessTypeEnum, PermissionClass, PermissionInputActionEnum, PermissionInputTypeEnum, PermissionTypeEnum, Progress, PsToolkitUiModule, RequestClass, ResultStatusEnum, SidebarClass, SidebarComponent, StatusEnum, StepsClass, StepsComponent, StepsItemClass, SubHeaderComponent, TableClass, TableCollClass, TableCollType, TableComponent, TableOptionType, TableRowClass, TooltipComponent, TreeRowClass, UserType, VehicleType, FormSelectItemComponent as ɵa, TablePaginationComponent as ɵb, SidebarItemComponent as ɵc, PsToolkitUiConfigService as ɵd, TableLoadingComponent as ɵe, FormTreeItemComponent as ɵf, TableRowComponent as ɵg, SafeStylePipe as ɵh, LoginComponent as ɵi, NotificationComponent as ɵj, FormHiddenComponent as ɵk, CalendarComponent as ɵl, ClockComponent as ɵm, ChartComponent as ɵn, SafeHtmlPipe as ɵo, FormTagComponent as ɵp };
7169
+ export { AccordionClass, AccordionComponent, AccordionRowClass, AlertComponent, BaseComponent, ChartClass, ConfirmComponent, CurrentDataClass, DayClass, EnumUtils, FooterComponent, FormBankCardComponent, FormButtonComponent, FormCheckboxComponent, FormClass, FormComponent, FormDateComponent, FormDatetimeComponent, FormFileComponent, FormFingerComponent, FormIconComponent, FormLabelComponent, FormPlaqueComponent, FormPlaqueSelectComponent, FormRadioComponent, FormSelectComponent, FormStarComponent, FormTableComponent, FormTextareaComponent, FormTextboxComponent, FormTimeComponent, FormTreeComponent, FormVehicleComponent, FormVehicleSearchComponent, HeaderComponent, HelperClass, InputClass, InputError, InputType, LangClass, LayoutComponent, LoadingComponent, LoginClass, LoginStepClass, Method, ModalClass, ModalComponent, NotfoundComponent, OperationEnum, OptionClass, PaymentStatusEnum, PermissionAccessTypeEnum, PermissionClass, PermissionInputActionEnum, PermissionInputTypeEnum, PermissionTypeEnum, Progress, PsToolkitUiModule, RequestClass, ResultStatusEnum, SidebarClass, SidebarComponent, StatusEnum, StepsClass, StepsComponent, StepsItemClass, SubHeaderComponent, TableClass, TableCollClass, TableCollType, TableComponent, TableOptionType, TableRowClass, TooltipComponent, TreeRowClass, UserType, VehicleType, FormSelectItemComponent as ɵa, TablePaginationComponent as ɵb, SidebarItemComponent as ɵc, PsToolkitUiConfigService as ɵd, TableLoadingComponent as ɵe, FormTreeItemComponent as ɵf, TableRowComponent as ɵg, SafeStylePipe as ɵh, LoginComponent as ɵi, NotificationComponent as ɵj, FormHiddenComponent as ɵk, CalendarComponent as ɵl, ClockComponent as ɵm, ChartComponent as ɵn, SafeHtmlPipe as ɵo, FormTagComponent as ɵp };
7166
7170
  //# sourceMappingURL=ps-toolkit-ui.js.map