ps-toolkit-ui 1.6.67 → 1.6.70

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.
@@ -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";
@@ -1283,41 +1285,50 @@ class FormClass {
1283
1285
  if (d == null) {
1284
1286
  d = {};
1285
1287
  }
1286
- this.inputs.forEach(inp => {
1287
- const vl = inp.data();
1288
- if (vl !== null) {
1289
- if (d[inp.name] === undefined) {
1290
- set(d, inp.name, vl);
1291
- }
1292
- else {
1293
- if (d[inp.name] instanceof Array) {
1294
- d[inp.name].push(vl);
1295
- }
1296
- else {
1297
- d[inp.name] = [d[inp.name], vl];
1298
- }
1299
- }
1300
- }
1301
- });
1302
1288
  }
1303
1289
  else {
1304
1290
  if (d == null) {
1305
1291
  d = new FormData();
1306
1292
  }
1307
- this.inputs.forEach(inp => {
1308
- const vl = inp.data();
1309
- if (vl !== null) {
1310
- if (vl instanceof Array) {
1311
- for (const v of vl) {
1312
- d.append(inp.name, v);
1313
- }
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);
1314
1312
  }
1315
1313
  else {
1316
- d.append(inp.name, vl);
1314
+ d[n] = [d[n], vl];
1317
1315
  }
1318
1316
  }
1319
- });
1320
- }
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
+ });
1321
1332
  return d;
1322
1333
  }
1323
1334
  json(d = null) {
@@ -1342,9 +1353,14 @@ class FormClass {
1342
1353
  setData(d) {
1343
1354
  this.inputs.forEach(inp => {
1344
1355
  const iv = get(d, inp.name);
1345
- 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) {
1346
1361
  const ivs = get(d, inp.name.replace('Id', ''));
1347
- 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);
1348
1364
  }
1349
1365
  else if (inp.type !== InputType.Label || iv != null) {
1350
1366
  inp.setValue(iv, true);
@@ -1494,7 +1510,8 @@ class InputClass {
1494
1510
  return r.filter(x => (p == null && !x.ParentId) || x.ParentId === p || !tree)
1495
1511
  .map((x) => {
1496
1512
  const o = new OptionClass(x.Name, x.Id.toString());
1497
- 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') {
1498
1515
  const tn = o.name.split('_');
1499
1516
  if (tn.length === 4) {
1500
1517
  tn[1] += '‎';
@@ -3585,7 +3602,7 @@ class FormComponent {
3585
3602
  FormComponent.decorators = [
3586
3603
  { type: Component, args: [{
3587
3604
  selector: 'lib-form',
3588
- 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",
3589
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}"]
3590
3607
  },] }
3591
3608
  ];
@@ -5784,12 +5801,13 @@ FormFingerComponent.propDecorators = {
5784
5801
  inputLabel: [{ type: ViewChild, args: ['inputLabel',] }]
5785
5802
  };
5786
5803
 
5787
- class FormCarSearchComponent {
5804
+ class FormVehicleSearchComponent {
5788
5805
  constructor() {
5789
5806
  this.changeIndex = new EventEmitter();
5790
- this.type = 'Car';
5807
+ this.type = VehicleType.Car;
5791
5808
  this.wsAuth = null;
5792
5809
  }
5810
+ get vehicleType() { return VehicleType; }
5793
5811
  ngOnInit() {
5794
5812
  this.car = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-user', InputType.SelectAutoCompletePlaque, 'plaque-inp');
5795
5813
  this.motor = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-motorcycle', InputType.SelectAutoCompletePlaqueM, 'plaque-inp');
@@ -5841,35 +5859,26 @@ class FormCarSearchComponent {
5841
5859
  this.fingerprint.disabled = true;
5842
5860
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
5843
5861
  this.inp.setValue = (v) => {
5844
- if (v != null) {
5845
- if (v.Search && v.Search.split('_').length === 2 && v.Search.split('_').every(x => /^[0-9]+$/.test(x))) {
5846
- this.type = 'Motor';
5847
- setTimeout(() => {
5862
+ if (v != null && v.Search) {
5863
+ this.changeType(v.Type);
5864
+ setTimeout(() => {
5865
+ if (v.Type === VehicleType.Motorcycle) {
5848
5866
  this.motor.setValue(v.Value, false);
5849
5867
  this.motor.setSearch(v.Search);
5850
- });
5851
- }
5852
- else if (v.Search && v.Search.split('_').length === 2) {
5853
- this.type = 'CarF';
5854
- setTimeout(() => {
5868
+ }
5869
+ else if (v.Type === VehicleType.CarF) {
5855
5870
  this.carF.setValue(v.Value, false);
5856
5871
  this.carF.setSearch(v.Search);
5857
- });
5858
- }
5859
- else if (v.Search && v.Search.split('_').length === 4) {
5860
- this.type = 'Car';
5861
- setTimeout(() => {
5872
+ }
5873
+ else if (v.Type === VehicleType.Car) {
5862
5874
  this.car.setValue(v.Value, false);
5863
5875
  this.car.setSearch(v.Search);
5864
- });
5865
- }
5866
- else if (v.Search && v.Search.split('_').length === 1) {
5867
- this.type = 'CarG';
5868
- setTimeout(() => {
5876
+ }
5877
+ else if (v.Type === VehicleType.CarG) {
5869
5878
  this.carG.setValue(v.Value, false);
5870
5879
  this.carG.setSearch(v.Search);
5871
- });
5872
- }
5880
+ }
5881
+ });
5873
5882
  }
5874
5883
  };
5875
5884
  this.inp.focus = () => {
@@ -5877,27 +5886,27 @@ class FormCarSearchComponent {
5877
5886
  };
5878
5887
  this.inp.isValid = () => {
5879
5888
  this.inp.error = null;
5880
- if (this.inp.required && this.type === 'Car' && !this.car.isValid()) {
5889
+ if (this.inp.required && this.type === VehicleType.Car && !this.car.isValid()) {
5881
5890
  this.inp.error = InputError.Required;
5882
5891
  return false;
5883
5892
  }
5884
- if (this.inp.required && this.type === 'Motor' && !this.motor.isValid()) {
5893
+ if (this.inp.required && this.type === VehicleType.Motorcycle && !this.motor.isValid()) {
5885
5894
  this.inp.error = InputError.Required;
5886
5895
  return false;
5887
5896
  }
5888
- if (this.inp.required && this.type === 'CarF' && !this.carF.isValid()) {
5897
+ if (this.inp.required && this.type === VehicleType.CarF && !this.carF.isValid()) {
5889
5898
  this.inp.error = InputError.Required;
5890
5899
  return false;
5891
5900
  }
5892
- if (this.inp.required && this.type === 'CarG' && !this.carG.isValid()) {
5901
+ if (this.inp.required && this.type === VehicleType.CarG && !this.carG.isValid()) {
5893
5902
  this.inp.error = InputError.Required;
5894
5903
  return false;
5895
5904
  }
5896
- if (this.inp.required && this.type === 'Driver' && !this.driver.isValid()) {
5905
+ if (this.inp.required && this.type === VehicleType.Driver && !this.driver.isValid()) {
5897
5906
  this.inp.error = InputError.Required;
5898
5907
  return false;
5899
5908
  }
5900
- if (this.inp.required && this.type === 'Fingerprint' && !this.fingerprint.isValid()) {
5909
+ if (this.inp.required && this.type === VehicleType.Fingerprint && !this.fingerprint.isValid()) {
5901
5910
  this.inp.error = InputError.Required;
5902
5911
  return false;
5903
5912
  }
@@ -5906,7 +5915,7 @@ class FormCarSearchComponent {
5906
5915
  this.inp.clear = () => {
5907
5916
  this.inp.error = null;
5908
5917
  this.inp.setValue(null, false);
5909
- this.type = 'Car';
5918
+ this.changeType(VehicleType.Car);
5910
5919
  this.car.clear();
5911
5920
  this.motor.clear();
5912
5921
  this.carF.clear();
@@ -5915,17 +5924,20 @@ class FormCarSearchComponent {
5915
5924
  this.fingerprint.clear();
5916
5925
  };
5917
5926
  this.inp.data = () => {
5918
- return this.type === 'Car' ? this.car.data() :
5919
- this.type === 'Motor' ? this.motor.data() :
5920
- this.type === 'CarF' ? this.carF.data() :
5921
- this.type === 'carG' ? this.carG.data() :
5922
- this.type === 'Driver' ? this.driver.data() :
5923
- this.type === 'Fingerprint' ? this.fingerprint.data() : null;
5927
+ const d = {};
5928
+ d[this.inp.name] = this.type === VehicleType.Car ? this.car.data() :
5929
+ this.type === VehicleType.Motorcycle ? this.motor.data() :
5930
+ this.type === VehicleType.CarF ? this.carF.data() :
5931
+ this.type === VehicleType.CarG ? this.carG.data() :
5932
+ this.type === VehicleType.Driver ? this.driver.data() :
5933
+ this.type === VehicleType.Fingerprint ? this.fingerprint.data() : null;
5934
+ d[this.inp.name + 'Type'] = this.type;
5935
+ return d;
5924
5936
  };
5925
5937
  }
5926
5938
  changeType(t) {
5927
5939
  this.type = t;
5928
- if (t === 'Fingerprint') {
5940
+ if (t === VehicleType.Fingerprint) {
5929
5941
  this.fingerprint.loading = true;
5930
5942
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
5931
5943
  this.fingerprint.value = null;
@@ -5967,35 +5979,35 @@ class FormCarSearchComponent {
5967
5979
  this.onFocusIn();
5968
5980
  }
5969
5981
  onFocusIn() {
5970
- if (this.type === 'Car' || this.type === 'Motor' || this.type === 'CarF' || this.type === 'CarG') {
5982
+ if (this.type === VehicleType.Car || this.type === VehicleType.Motorcycle || this.type === VehicleType.CarF || this.type === VehicleType.CarG) {
5971
5983
  setTimeout(() => {
5972
- $('#' + this.inp.id + 'CarSearchInput' + ' .plaque-inp').click();
5973
- $('#' + this.inp.id + 'CarSearchInput' + ' #Part1Input .control').focus();
5984
+ $('#' + this.inp.id + 'VehicleSearchInput' + ' .plaque-inp').click();
5985
+ $('#' + this.inp.id + 'VehicleSearchInput' + ' #Part1Input .control').focus();
5974
5986
  }, 100);
5975
5987
  }
5976
- else if (this.type === 'Driver') {
5988
+ else if (this.type === VehicleType.Driver) {
5977
5989
  this.driver.focus();
5978
5990
  }
5979
- else if (this.type === 'Fingerprint') {
5991
+ else if (this.type === VehicleType.Fingerprint) {
5980
5992
  this.fingerprint.focus();
5981
5993
  }
5982
5994
  }
5983
5995
  }
5984
- FormCarSearchComponent.decorators = [
5996
+ FormVehicleSearchComponent.decorators = [
5985
5997
  { type: Component, args: [{
5986
- selector: 'lib-form-car-search',
5987
- 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",
5988
- 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}"]
5998
+ selector: 'lib-form-vehicle-search',
5999
+ template: "<div #inputDiv [id]=\"inp.id + 'VehicleSearchInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.icon != null ? '' : ' without-icon') + ' form-input vehicle-search'\">\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(vehicleType.Car)\" [className]=\"(type == vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-car'\" (click)=\"changeType(vehicleType.Car)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Motorcycle)\" [className]=\"(type == vehicleType.Motorcycle ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType(vehicleType.Motorcycle)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Driver)\" [className]=\"(type == vehicleType.Driver ? 'active ' : '') + 'change-type-btn fas fa-user'\" (click)=\"changeType(vehicleType.Driver)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Fingerprint)\" [className]=\"(type == vehicleType.Fingerprint ? 'active ' : '') + 'change-type-btn fas fa-fingerprint'\" (click)=\"changeType(vehicleType.Fingerprint)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.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(vehicleType.CarG)\" [className]=\"(type == vehicleType.CarG ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType(vehicleType.CarG)\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque-select [inp]=\"car\" *ngIf=\"type === vehicleType.Car\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"motor\" *ngIf=\"type === vehicleType.Motorcycle\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carF\" *ngIf=\"type === vehicleType.CarF\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carG\" *ngIf=\"type === vehicleType.CarG\"></lib-form-plaque-select>\r\n <lib-form-select [inp]=\"driver\" *ngIf=\"type === vehicleType.Driver\"></lib-form-select>\r\n <lib-form-select [inp]=\"fingerprint\" *ngIf=\"type === vehicleType.Fingerprint\"></lib-form-select>\r\n </div>\r\n</div>\r\n",
6000
+ styles: [".form-input.vehicle-search{border-radius:var(--border-radius-base);float:right;font-size:15px;position:relative;width:185px}.form-input.vehicle-search .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.vehicle-search.error .label{color:var(--red);font-size:10px}.form-input.vehicle-search .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input.vehicle-search .label .change-type-btn{cursor:pointer;float:right;font-size:16px;height:20px;line-height:20px;text-align:center;width:30px}.form-input.vehicle-search .label .change-type-btn.fa-user{font-size:14px;line-height:18px}.form-input.vehicle-search .label .change-type-btn.active,.form-input.vehicle-search .label .change-type-btn:hover{color:var(--primary)}.form-input.vehicle-search .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.vehicle-search .control:focus,.form-input.vehicle-search:hover .control{box-shadow:0 1px 5px 0 rgba(0,0,0,.7)}.form-input.vehicle-search 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.vehicle-search 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.vehicle-search span.icon.button:hover{background-color:var(--base-dark)}.form-input.vehicle-search span.icon.button.blue{background-color:var(--blue)}.form-input.vehicle-search span.icon.button.blue:hover{background-color:var(--blue-dark)}.form-input.vehicle-search span.icon.button.green{background-color:var(--green)}.form-input.vehicle-search span.icon.button.green:hover{background-color:var(--green-dark)}.form-input.vehicle-search span.icon.button.red{background-color:var(--red)}.form-input.vehicle-search span.icon.button.red:hover{background-color:var(--red-dark)}.form-input.vehicle-search span.icon.button.yellow{background-color:var(--yellow)}.form-input.vehicle-search span.icon.button.yellow:hover{background-color:var(--yellow-dark)}.form-input.vehicle-search.disabled .control,.form-input.vehicle-search.disabled .label,.form-input.vehicle-search.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.vehicle-search.error .control{box-shadow:0 1px 3px 0 var(--red)}.form-input.vehicle-search.error .control,.form-input.vehicle-search.error span.icon{color:var(--red-light)}.form-input.vehicle-search .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.vehicle-search.without-icon .control{padding:5px 10px}.form-input.vehicle-search.h-50 .control{height:50px}.form-input.vehicle-search.h-50 span.icon{height:50px;line-height:50px}.form-input.vehicle-search.h-45 .control{height:45px}.form-input.vehicle-search.h-45 span.icon{height:45px;line-height:45px}.form-input.vehicle-search.h-30 .control{font-size:10px;height:30px;padding:0}.form-input.vehicle-search.h-30 span.icon{height:30px;line-height:30px}.form-input.vehicle-search.h-35{height:35px}.form-input.vehicle-search.h-35 .control{height:35px;padding:0 35px}.form-input.vehicle-search.h-35 span.icon{height:35px;line-height:35px}.form-input.vehicle-search.h-25 .control{height:25px;padding:0}.form-input.vehicle-search.h-25 span.icon{height:25px;line-height:25px}.form-input.vehicle-search.table-search{float:right;margin-right:10%;margin-top:4px;width:80%}.form-input.vehicle-search.h-22 .control{height:22px;padding:0}.form-input.vehicle-search.h-22 span.icon{height:22px;line-height:22px}.form-input.vehicle-search.plaque-part-1{float:left;padding:0!important;width:35px!important}.form-input.vehicle-search.plaque-part-1.plaque-part-m{width:49px!important}.form-input.vehicle-search.plaque-part-3{float:left;padding:0!important;width:49px!important}.form-input.vehicle-search.plaque-part-3.plaque-part-m{width:69px!important}.form-input.vehicle-search.plaque-part-4{float:left;margin-top:10px;padding:0!important;width:34px!important}.form-input.vehicle-search.plaque-part-4 .control{height:25px!important}.form-input.vehicle-search.plaque-part-4.plaque-part-m{display:none!important}.form-input.vehicle-search.bank-card-part-item{float:left;padding:0!important;width:25%}.form-input.vehicle-search.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.vehicle-search.bank-card-part-item .control{background-color:initial!important;box-shadow:unset!important;font-size:13px!important;padding:0!important}"]
5989
6001
  },] }
5990
6002
  ];
5991
- FormCarSearchComponent.ctorParameters = () => [];
5992
- FormCarSearchComponent.propDecorators = {
6003
+ FormVehicleSearchComponent.ctorParameters = () => [];
6004
+ FormVehicleSearchComponent.propDecorators = {
5993
6005
  inp: [{ type: Input }],
5994
6006
  changeIndex: [{ type: Output }],
5995
6007
  inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
5996
6008
  };
5997
6009
 
5998
- class FormCarComponent {
6010
+ class FormVehicleComponent {
5999
6011
  constructor() {
6000
6012
  this.changeIndex = new EventEmitter();
6001
6013
  this.type = VehicleType.Car;
@@ -6009,31 +6021,22 @@ class FormCarComponent {
6009
6021
  this.car.displayLabel = this.carF.displayLabel = this.carG.displayLabel = this.motor.displayLabel = false;
6010
6022
  this.car.disabled = this.carF.disabled = this.carG.disabled = this.motor.disabled = this.inp.disabled;
6011
6023
  this.inp.setValue = (v) => {
6012
- if (v != null) {
6013
- if (v.split('_').length === 2 && v.split('_').every(x => /^[0-9]+$/.test(x))) {
6014
- this.changeType(VehicleType.Motorcycle);
6015
- setTimeout(() => {
6024
+ if (v != null && v.Value !== null) {
6025
+ this.changeType(v.Type);
6026
+ setTimeout(() => {
6027
+ if (v.Type === VehicleType.Motorcycle) {
6016
6028
  this.motor.setValue(v, false);
6017
- });
6018
- }
6019
- else if (v.split('_').length === 2) {
6020
- this.changeType(VehicleType.CarF);
6021
- setTimeout(() => {
6029
+ }
6030
+ else if (v.Type === VehicleType.CarF) {
6022
6031
  this.carF.setValue(v, false);
6023
- });
6024
- }
6025
- else if (v.split('_').length === 4) {
6026
- this.changeType(VehicleType.Car);
6027
- setTimeout(() => {
6032
+ }
6033
+ else if (v.Type === VehicleType.Car) {
6028
6034
  this.car.setValue(v, false);
6029
- });
6030
- }
6031
- else if (v.split('_').length === 1) {
6032
- this.changeType(VehicleType.CarG);
6033
- setTimeout(() => {
6035
+ }
6036
+ else if (v.Type === VehicleType.CarG) {
6034
6037
  this.carG.setValue(v, false);
6035
- });
6036
- }
6038
+ }
6039
+ });
6037
6040
  }
6038
6041
  };
6039
6042
  this.inp.focus = () => {
@@ -6069,8 +6072,13 @@ class FormCarComponent {
6069
6072
  this.carG.clear();
6070
6073
  };
6071
6074
  this.inp.data = () => {
6072
- return this.type === VehicleType.Car ? this.car.data() : this.type === VehicleType.Motorcycle ? this.motor.data() : this.type === VehicleType.CarF ? this.carF.data() :
6073
- this.type === VehicleType.CarG ? this.carG.data() : null;
6075
+ const d = {};
6076
+ d[this.inp.name] = this.type === VehicleType.Car ? this.car.data() :
6077
+ this.type === VehicleType.Motorcycle ? this.motor.data() :
6078
+ this.type === VehicleType.CarF ? this.carF.data() :
6079
+ this.type === VehicleType.CarG ? this.carG.data() : null;
6080
+ d[this.inp.name + 'Type'] = this.type;
6081
+ return d;
6074
6082
  };
6075
6083
  }
6076
6084
  changeType(t) {
@@ -6086,15 +6094,15 @@ class FormCarComponent {
6086
6094
  }, 100);
6087
6095
  }
6088
6096
  }
6089
- FormCarComponent.decorators = [
6097
+ FormVehicleComponent.decorators = [
6090
6098
  { type: Component, args: [{
6091
- selector: 'lib-form-car',
6092
- 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",
6093
- 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}"]
6099
+ selector: 'lib-form-vehicle',
6100
+ template: "<div #inputDiv [id]=\"inp.id + 'VehicleInput'\" [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(vehicleType.Car)\" [className]=\"(type === vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-car'\" (click)=\"changeType(vehicleType.Car)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.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(vehicleType.CarG)\" [className]=\"(type === vehicleType.CarG ? 'active ' : '') + 'change-type-btn fas fa-globe'\" (click)=\"changeType(vehicleType.CarG)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Motorcycle)\" [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",
6101
+ styles: [".form-input.vehicle{border-radius:var(--border-radius-base);float:right;font-size:15px;position:relative;width:185px}.form-input.vehicle .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.vehicle.error .label{color:var(--red);font-size:10px}.form-input.vehicle .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input.vehicle .label .change-type-btn{cursor:pointer;float:right;font-size:16px;height:20px;line-height:20px;text-align:center;width:30px}.form-input.vehicle .label .change-type-btn.fa-user{font-size:14px;line-height:18px}.form-input.vehicle .label .change-type-btn.active,.form-input.vehicle .label .change-type-btn:hover{color:var(--primary)}.form-input.vehicle .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.vehicle .control:focus,.form-input.vehicle:hover .control{box-shadow:0 1px 5px 0 rgba(0,0,0,.7)}.form-input.vehicle 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.vehicle 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.vehicle span.icon.button:hover{background-color:var(--base-dark)}.form-input.vehicle span.icon.button.blue{background-color:var(--blue)}.form-input.vehicle span.icon.button.blue:hover{background-color:var(--blue-dark)}.form-input.vehicle span.icon.button.green{background-color:var(--green)}.form-input.vehicle span.icon.button.green:hover{background-color:var(--green-dark)}.form-input.vehicle span.icon.button.red{background-color:var(--red)}.form-input.vehicle span.icon.button.red:hover{background-color:var(--red-dark)}.form-input.vehicle span.icon.button.yellow{background-color:var(--yellow)}.form-input.vehicle span.icon.button.yellow:hover{background-color:var(--yellow-dark)}.form-input.vehicle .disable-con{display:none}.form-input.vehicle.disabled{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-shadow:unset;cursor:default}.form-input.vehicle.disabled .disable-con{display:block;height:100%;position:absolute;right:0;top:0;width:100%;z-index:5}.form-input.vehicle.display .label{display:none}.form-input.vehicle.display .disable-con{display:block;height:100%;position:absolute;right:0;top:0;width:100%;z-index:5}.form-input.vehicle.error .control{box-shadow:0 1px 3px 0 var(--red)}.form-input.vehicle.error .control,.form-input.vehicle.error span.icon{color:var(--red-light)}.form-input.vehicle .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.vehicle.without-icon .control{padding:5px 10px}.form-input.vehicle.h-50 .control{height:50px}.form-input.vehicle.h-50 span.icon{height:50px;line-height:50px}.form-input.vehicle.h-45 .control{height:45px}.form-input.vehicle.h-45 span.icon{height:45px;line-height:45px}.form-input.vehicle.h-30 .control{font-size:10px;height:30px;padding:0}.form-input.vehicle.h-30 span.icon{height:30px;line-height:30px}.form-input.vehicle.h-35{height:35px}.form-input.vehicle.h-35 .control{height:35px;padding:0 35px}.form-input.vehicle.h-35 span.icon{height:35px;line-height:35px}.form-input.vehicle.h-25 .control{height:25px;padding:0}.form-input.vehicle.h-25 span.icon{height:25px;line-height:25px}.form-input.vehicle.table-search{float:right;margin-right:10%;margin-top:4px;width:80%}.form-input.vehicle.h-22 .control{height:22px;padding:0}.form-input.vehicle.h-22 span.icon{height:22px;line-height:22px}.form-input.vehicle.plaque-part-1{float:left;padding:0!important;width:35px!important}.form-input.vehicle.plaque-part-1.plaque-part-m{width:49px!important}.form-input.vehicle.plaque-part-3{float:left;padding:0!important;width:49px!important}.form-input.vehicle.plaque-part-3.plaque-part-m{width:69px!important}.form-input.vehicle.plaque-part-4{float:left;margin-top:10px;padding:0!important;width:34px!important}.form-input.vehicle.plaque-part-4 .control{height:25px!important}.form-input.vehicle.plaque-part-4.plaque-part-m{display:none!important}.form-input.vehicle.bank-card-part-item{float:left;padding:0!important;width:25%}.form-input.vehicle.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.vehicle.bank-card-part-item .control{background-color:initial!important;box-shadow:unset!important;font-size:13px!important;padding:0!important}"]
6094
6102
  },] }
6095
6103
  ];
6096
- FormCarComponent.ctorParameters = () => [];
6097
- FormCarComponent.propDecorators = {
6104
+ FormVehicleComponent.ctorParameters = () => [];
6105
+ FormVehicleComponent.propDecorators = {
6098
6106
  inp: [{ type: Input }],
6099
6107
  changeIndex: [{ type: Output }],
6100
6108
  inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
@@ -6694,7 +6702,7 @@ PsToolkitUiModule.decorators = [
6694
6702
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
6695
6703
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
6696
6704
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
6697
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
6705
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
6698
6706
  SafeStylePipe, LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
6699
6707
  ClockComponent, ChartComponent, SafeHtmlPipe, FormTagComponent
6700
6708
  ],
@@ -6710,7 +6718,7 @@ PsToolkitUiModule.decorators = [
6710
6718
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
6711
6719
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
6712
6720
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
6713
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
6721
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
6714
6722
  LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
6715
6723
  ClockComponent, ChartComponent, FormTagComponent
6716
6724
  ]
@@ -7159,5 +7167,5 @@ class CurrentDataClass {
7159
7167
  * Generated bundle index. Do not edit.
7160
7168
  */
7161
7169
 
7162
- 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 };
7170
+ 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 };
7163
7171
  //# sourceMappingURL=ps-toolkit-ui.js.map