ps-toolkit-ui 1.6.66 → 1.6.69

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.
@@ -771,8 +771,8 @@
771
771
  InputType[InputType["Hidden"] = 37] = "Hidden";
772
772
  InputType[InputType["Table"] = 38] = "Table";
773
773
  InputType[InputType["Tag"] = 39] = "Tag";
774
- InputType[InputType["CarSearch"] = 40] = "CarSearch";
775
- InputType[InputType["Car"] = 41] = "Car";
774
+ InputType[InputType["VehicleSearch"] = 40] = "VehicleSearch";
775
+ InputType[InputType["Vehicle"] = 41] = "Vehicle";
776
776
  InputType[InputType["Finger"] = 42] = "Finger";
777
777
  InputType[InputType["Color"] = 43] = "Color";
778
778
  InputType[InputType["Star"] = 44] = "Star";
@@ -866,6 +866,8 @@
866
866
  PermissionInputTypeEnum[PermissionInputTypeEnum["Button"] = 1] = "Button";
867
867
  })(exports.PermissionInputTypeEnum || (exports.PermissionInputTypeEnum = {}));
868
868
  (function (VehicleType) {
869
+ VehicleType[VehicleType["Driver"] = -2] = "Driver";
870
+ VehicleType[VehicleType["Fingerprint"] = -1] = "Fingerprint";
869
871
  VehicleType[VehicleType["Car"] = 1] = "Car";
870
872
  VehicleType[VehicleType["Motorcycle"] = 2] = "Motorcycle";
871
873
  VehicleType[VehicleType["Airplane"] = 3] = "Airplane";
@@ -1240,7 +1242,6 @@
1240
1242
  inp.setValue(s, false);
1241
1243
  setTimeout(function () {
1242
1244
  $__namespace('#' + inp.id + 'TextInput .control').click();
1243
- inp.focus();
1244
1245
  }, 100);
1245
1246
  }
1246
1247
  if (inp.onBarcodeReaderChange !== null) {
@@ -1710,52 +1711,72 @@
1710
1711
  if (d == null) {
1711
1712
  d = {};
1712
1713
  }
1713
- this.inputs.forEach(function (inp) {
1714
- var vl = inp.data();
1715
- if (vl !== null) {
1716
- if (d[inp.name] === undefined) {
1717
- _.set(d, inp.name, vl);
1718
- }
1719
- else {
1720
- if (d[inp.name] instanceof Array) {
1721
- d[inp.name].push(vl);
1722
- }
1723
- else {
1724
- d[inp.name] = [d[inp.name], vl];
1725
- }
1726
- }
1727
- }
1728
- });
1729
1714
  }
1730
1715
  else {
1731
1716
  if (d == null) {
1732
1717
  d = new FormData();
1733
1718
  }
1734
- this.inputs.forEach(function (inp) {
1735
- var e_1, _a;
1736
- var vl = inp.data();
1737
- if (vl !== null) {
1738
- if (vl instanceof Array) {
1739
- try {
1740
- for (var vl_1 = __values(vl), vl_1_1 = vl_1.next(); !vl_1_1.done; vl_1_1 = vl_1.next()) {
1741
- var v = vl_1_1.value;
1742
- d.append(inp.name, v);
1743
- }
1719
+ }
1720
+ var setD = function (n, vl) {
1721
+ var e_1, _a;
1722
+ if (d instanceof FormData) {
1723
+ if (vl instanceof Array) {
1724
+ try {
1725
+ for (var vl_1 = __values(vl), vl_1_1 = vl_1.next(); !vl_1_1.done; vl_1_1 = vl_1.next()) {
1726
+ var v = vl_1_1.value;
1727
+ d.append(n, v);
1744
1728
  }
1745
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1746
- finally {
1747
- try {
1748
- if (vl_1_1 && !vl_1_1.done && (_a = vl_1.return)) _a.call(vl_1);
1749
- }
1750
- finally { if (e_1) throw e_1.error; }
1729
+ }
1730
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1731
+ finally {
1732
+ try {
1733
+ if (vl_1_1 && !vl_1_1.done && (_a = vl_1.return)) _a.call(vl_1);
1751
1734
  }
1735
+ finally { if (e_1) throw e_1.error; }
1736
+ }
1737
+ }
1738
+ else {
1739
+ d.append(n, vl);
1740
+ }
1741
+ }
1742
+ else {
1743
+ if (d[n] === undefined) {
1744
+ _.set(d, n, vl);
1745
+ }
1746
+ else {
1747
+ if (d[n] instanceof Array) {
1748
+ d[n].push(vl);
1752
1749
  }
1753
1750
  else {
1754
- d.append(inp.name, vl);
1751
+ d[n] = [d[n], vl];
1755
1752
  }
1756
1753
  }
1757
- });
1758
- }
1754
+ }
1755
+ };
1756
+ this.inputs.forEach(function (inp) {
1757
+ var e_2, _a;
1758
+ var vl = inp.data();
1759
+ if (vl !== null) {
1760
+ if (typeof vl === 'object' && !(vl instanceof Array)) {
1761
+ try {
1762
+ for (var _b = __values(Object.entries(vl)), _c = _b.next(); !_c.done; _c = _b.next()) {
1763
+ var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
1764
+ setD(key, value);
1765
+ }
1766
+ }
1767
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1768
+ finally {
1769
+ try {
1770
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1771
+ }
1772
+ finally { if (e_2) throw e_2.error; }
1773
+ }
1774
+ }
1775
+ else {
1776
+ setD(inp.name, vl);
1777
+ }
1778
+ }
1779
+ });
1759
1780
  return d;
1760
1781
  };
1761
1782
  FormClass.prototype.json = function (d) {
@@ -1764,7 +1785,7 @@
1764
1785
  d = {};
1765
1786
  }
1766
1787
  this.inputs.forEach(function (inp) {
1767
- var e_2, _a;
1788
+ var e_3, _a;
1768
1789
  var vl = inp.data();
1769
1790
  if (vl !== null && vl !== '') {
1770
1791
  if (vl instanceof Array) {
@@ -1774,12 +1795,12 @@
1774
1795
  d[inp.name] = v;
1775
1796
  }
1776
1797
  }
1777
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1798
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
1778
1799
  finally {
1779
1800
  try {
1780
1801
  if (vl_2_1 && !vl_2_1.done && (_a = vl_2.return)) _a.call(vl_2);
1781
1802
  }
1782
- finally { if (e_2) throw e_2.error; }
1803
+ finally { if (e_3) throw e_3.error; }
1783
1804
  }
1784
1805
  }
1785
1806
  else {
@@ -1792,9 +1813,14 @@
1792
1813
  FormClass.prototype.setData = function (d) {
1793
1814
  this.inputs.forEach(function (inp) {
1794
1815
  var iv = _.get(d, inp.name);
1795
- if (inp.type === exports.InputType.CarSearch) {
1816
+ if (inp.type === exports.InputType.Vehicle) {
1817
+ var ivt = _.get(d, inp.name + 'Type');
1818
+ inp.setValue({ Value: iv, Type: ivt }, true);
1819
+ }
1820
+ else if (inp.type === exports.InputType.VehicleSearch) {
1796
1821
  var ivs = _.get(d, inp.name.replace('Id', ''));
1797
- inp.setValue({ Search: ivs, Value: iv }, true);
1822
+ var ivt = _.get(d, inp.name + 'Type');
1823
+ inp.setValue({ Search: ivs, Value: iv, Type: ivt }, true);
1798
1824
  }
1799
1825
  else if (inp.type !== exports.InputType.Label || iv != null) {
1800
1826
  inp.setValue(iv, true);
@@ -1961,7 +1987,8 @@
1961
1987
  return r.filter(function (x) { return (p == null && !x.ParentId) || x.ParentId === p || !tree; })
1962
1988
  .map(function (x) {
1963
1989
  var o = new OptionClass(x.Name, x.Id.toString());
1964
- if (_this.type === exports.InputType.SelectAutoCompletePlaque || _this.type === exports.InputType.SelectAutoCompletePlaqueM || _this.type === exports.InputType.SelectAutoCompletePlaqueF || _this.type === exports.InputType.SelectAutoCompletePlaqueG || _this.name === 'CarId') {
1990
+ if (_this.type === exports.InputType.SelectAutoCompletePlaque || _this.type === exports.InputType.SelectAutoCompletePlaqueM ||
1991
+ _this.type === exports.InputType.SelectAutoCompletePlaqueF || _this.type === exports.InputType.SelectAutoCompletePlaqueG || _this.name === 'CarId') {
1965
1992
  var tn = o.name.split('_');
1966
1993
  if (tn.length === 4) {
1967
1994
  tn[1] += '‎';
@@ -2047,7 +2074,7 @@
2047
2074
  this.rows = rows;
2048
2075
  }
2049
2076
  AccordionClass.prototype.check = function () {
2050
- var e_3, _a;
2077
+ var e_4, _a;
2051
2078
  try {
2052
2079
  for (var _b = __values(this.rows), _c = _b.next(); !_c.done; _c = _b.next()) {
2053
2080
  var row = _c.value;
@@ -2057,12 +2084,12 @@
2057
2084
  }
2058
2085
  }
2059
2086
  }
2060
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
2087
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
2061
2088
  finally {
2062
2089
  try {
2063
2090
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2064
2091
  }
2065
- finally { if (e_3) throw e_3.error; }
2092
+ finally { if (e_4) throw e_4.error; }
2066
2093
  }
2067
2094
  return true;
2068
2095
  };
@@ -4273,7 +4300,7 @@
4273
4300
  FormComponent.decorators = [
4274
4301
  { type: core.Component, args: [{
4275
4302
  selector: 'lib-form',
4276
- 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",
4303
+ 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",
4277
4304
  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}"]
4278
4305
  },] }
4279
4306
  ];
@@ -6693,13 +6720,18 @@
6693
6720
  inputLabel: [{ type: core.ViewChild, args: ['inputLabel',] }]
6694
6721
  };
6695
6722
 
6696
- var FormCarSearchComponent = /** @class */ (function () {
6697
- function FormCarSearchComponent() {
6723
+ var FormVehicleSearchComponent = /** @class */ (function () {
6724
+ function FormVehicleSearchComponent() {
6698
6725
  this.changeIndex = new core.EventEmitter();
6699
- this.type = 'Car';
6726
+ this.type = exports.VehicleType.Car;
6700
6727
  this.wsAuth = null;
6701
6728
  }
6702
- FormCarSearchComponent.prototype.ngOnInit = function () {
6729
+ Object.defineProperty(FormVehicleSearchComponent.prototype, "vehicleType", {
6730
+ get: function () { return exports.VehicleType; },
6731
+ enumerable: false,
6732
+ configurable: true
6733
+ });
6734
+ FormVehicleSearchComponent.prototype.ngOnInit = function () {
6703
6735
  var _this = this;
6704
6736
  this.car = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-user', exports.InputType.SelectAutoCompletePlaque, 'plaque-inp');
6705
6737
  this.motor = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-motorcycle', exports.InputType.SelectAutoCompletePlaqueM, 'plaque-inp');
@@ -6751,35 +6783,26 @@
6751
6783
  this.fingerprint.disabled = true;
6752
6784
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
6753
6785
  this.inp.setValue = function (v) {
6754
- if (v != null) {
6755
- if (v.Search && v.Search.split('_').length === 2 && v.Search.split('_').every(function (x) { return /^[0-9]+$/.test(x); })) {
6756
- _this.type = 'Motor';
6757
- setTimeout(function () {
6786
+ if (v != null && v.Search) {
6787
+ _this.changeType(v.Type);
6788
+ setTimeout(function () {
6789
+ if (v.Type === exports.VehicleType.Motorcycle) {
6758
6790
  _this.motor.setValue(v.Value, false);
6759
6791
  _this.motor.setSearch(v.Search);
6760
- });
6761
- }
6762
- else if (v.Search && v.Search.split('_').length === 2) {
6763
- _this.type = 'CarF';
6764
- setTimeout(function () {
6792
+ }
6793
+ else if (v.Type === exports.VehicleType.CarF) {
6765
6794
  _this.carF.setValue(v.Value, false);
6766
6795
  _this.carF.setSearch(v.Search);
6767
- });
6768
- }
6769
- else if (v.Search && v.Search.split('_').length === 4) {
6770
- _this.type = 'Car';
6771
- setTimeout(function () {
6796
+ }
6797
+ else if (v.Type === exports.VehicleType.Car) {
6772
6798
  _this.car.setValue(v.Value, false);
6773
6799
  _this.car.setSearch(v.Search);
6774
- });
6775
- }
6776
- else if (v.Search && v.Search.split('_').length === 1) {
6777
- _this.type = 'CarG';
6778
- setTimeout(function () {
6800
+ }
6801
+ else if (v.Type === exports.VehicleType.CarG) {
6779
6802
  _this.carG.setValue(v.Value, false);
6780
6803
  _this.carG.setSearch(v.Search);
6781
- });
6782
- }
6804
+ }
6805
+ });
6783
6806
  }
6784
6807
  };
6785
6808
  this.inp.focus = function () {
@@ -6787,27 +6810,27 @@
6787
6810
  };
6788
6811
  this.inp.isValid = function () {
6789
6812
  _this.inp.error = null;
6790
- if (_this.inp.required && _this.type === 'Car' && !_this.car.isValid()) {
6813
+ if (_this.inp.required && _this.type === exports.VehicleType.Car && !_this.car.isValid()) {
6791
6814
  _this.inp.error = exports.InputError.Required;
6792
6815
  return false;
6793
6816
  }
6794
- if (_this.inp.required && _this.type === 'Motor' && !_this.motor.isValid()) {
6817
+ if (_this.inp.required && _this.type === exports.VehicleType.Motorcycle && !_this.motor.isValid()) {
6795
6818
  _this.inp.error = exports.InputError.Required;
6796
6819
  return false;
6797
6820
  }
6798
- if (_this.inp.required && _this.type === 'CarF' && !_this.carF.isValid()) {
6821
+ if (_this.inp.required && _this.type === exports.VehicleType.CarF && !_this.carF.isValid()) {
6799
6822
  _this.inp.error = exports.InputError.Required;
6800
6823
  return false;
6801
6824
  }
6802
- if (_this.inp.required && _this.type === 'CarG' && !_this.carG.isValid()) {
6825
+ if (_this.inp.required && _this.type === exports.VehicleType.CarG && !_this.carG.isValid()) {
6803
6826
  _this.inp.error = exports.InputError.Required;
6804
6827
  return false;
6805
6828
  }
6806
- if (_this.inp.required && _this.type === 'Driver' && !_this.driver.isValid()) {
6829
+ if (_this.inp.required && _this.type === exports.VehicleType.Driver && !_this.driver.isValid()) {
6807
6830
  _this.inp.error = exports.InputError.Required;
6808
6831
  return false;
6809
6832
  }
6810
- if (_this.inp.required && _this.type === 'Fingerprint' && !_this.fingerprint.isValid()) {
6833
+ if (_this.inp.required && _this.type === exports.VehicleType.Fingerprint && !_this.fingerprint.isValid()) {
6811
6834
  _this.inp.error = exports.InputError.Required;
6812
6835
  return false;
6813
6836
  }
@@ -6816,7 +6839,7 @@
6816
6839
  this.inp.clear = function () {
6817
6840
  _this.inp.error = null;
6818
6841
  _this.inp.setValue(null, false);
6819
- _this.type = 'Car';
6842
+ _this.changeType(exports.VehicleType.Car);
6820
6843
  _this.car.clear();
6821
6844
  _this.motor.clear();
6822
6845
  _this.carF.clear();
@@ -6825,18 +6848,21 @@
6825
6848
  _this.fingerprint.clear();
6826
6849
  };
6827
6850
  this.inp.data = function () {
6828
- return _this.type === 'Car' ? _this.car.data() :
6829
- _this.type === 'Motor' ? _this.motor.data() :
6830
- _this.type === 'CarF' ? _this.carF.data() :
6831
- _this.type === 'carG' ? _this.carG.data() :
6832
- _this.type === 'Driver' ? _this.driver.data() :
6833
- _this.type === 'Fingerprint' ? _this.fingerprint.data() : null;
6851
+ var d = {};
6852
+ d[_this.inp.name] = _this.type === exports.VehicleType.Car ? _this.car.data() :
6853
+ _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() :
6854
+ _this.type === exports.VehicleType.CarF ? _this.carF.data() :
6855
+ _this.type === exports.VehicleType.CarG ? _this.carG.data() :
6856
+ _this.type === exports.VehicleType.Driver ? _this.driver.data() :
6857
+ _this.type === exports.VehicleType.Fingerprint ? _this.fingerprint.data() : null;
6858
+ d[_this.inp.name + 'Type'] = _this.type;
6859
+ return d;
6834
6860
  };
6835
6861
  };
6836
- FormCarSearchComponent.prototype.changeType = function (t) {
6862
+ FormVehicleSearchComponent.prototype.changeType = function (t) {
6837
6863
  var _this = this;
6838
6864
  this.type = t;
6839
- if (t === 'Fingerprint') {
6865
+ if (t === exports.VehicleType.Fingerprint) {
6840
6866
  this.fingerprint.loading = true;
6841
6867
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
6842
6868
  this.fingerprint.value = null;
@@ -6877,48 +6903,48 @@
6877
6903
  this.car.url = this.motor.url = this.carF.url = this.carG.url = this.driver.url = this.inp.url.replace('_{}', '_' + this.type);
6878
6904
  this.onFocusIn();
6879
6905
  };
6880
- FormCarSearchComponent.prototype.onFocusIn = function () {
6906
+ FormVehicleSearchComponent.prototype.onFocusIn = function () {
6881
6907
  var _this = this;
6882
- if (this.type === 'Car' || this.type === 'Motor' || this.type === 'CarF' || this.type === 'CarG') {
6908
+ if (this.type === exports.VehicleType.Car || this.type === exports.VehicleType.Motorcycle || this.type === exports.VehicleType.CarF || this.type === exports.VehicleType.CarG) {
6883
6909
  setTimeout(function () {
6884
6910
  $('#' + _this.inp.id + 'CarSearchInput' + ' .plaque-inp').click();
6885
6911
  $('#' + _this.inp.id + 'CarSearchInput' + ' #Part1Input .control').focus();
6886
6912
  }, 100);
6887
6913
  }
6888
- else if (this.type === 'Driver') {
6914
+ else if (this.type === exports.VehicleType.Driver) {
6889
6915
  this.driver.focus();
6890
6916
  }
6891
- else if (this.type === 'Fingerprint') {
6917
+ else if (this.type === exports.VehicleType.Fingerprint) {
6892
6918
  this.fingerprint.focus();
6893
6919
  }
6894
6920
  };
6895
- return FormCarSearchComponent;
6921
+ return FormVehicleSearchComponent;
6896
6922
  }());
6897
- FormCarSearchComponent.decorators = [
6923
+ FormVehicleSearchComponent.decorators = [
6898
6924
  { type: core.Component, args: [{
6899
- selector: 'lib-form-car-search',
6900
- 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",
6925
+ selector: 'lib-form-vehicle-search',
6926
+ 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(vehicleType.Car)\" [className]=\"(type == vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-vehicle'\" (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",
6901
6927
  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}"]
6902
6928
  },] }
6903
6929
  ];
6904
- FormCarSearchComponent.ctorParameters = function () { return []; };
6905
- FormCarSearchComponent.propDecorators = {
6930
+ FormVehicleSearchComponent.ctorParameters = function () { return []; };
6931
+ FormVehicleSearchComponent.propDecorators = {
6906
6932
  inp: [{ type: core.Input }],
6907
6933
  changeIndex: [{ type: core.Output }],
6908
6934
  inputDiv: [{ type: core.ViewChild, args: ['inputDiv',] }]
6909
6935
  };
6910
6936
 
6911
- var FormCarComponent = /** @class */ (function () {
6912
- function FormCarComponent() {
6937
+ var FormVehicleComponent = /** @class */ (function () {
6938
+ function FormVehicleComponent() {
6913
6939
  this.changeIndex = new core.EventEmitter();
6914
6940
  this.type = exports.VehicleType.Car;
6915
6941
  }
6916
- Object.defineProperty(FormCarComponent.prototype, "vehicleType", {
6942
+ Object.defineProperty(FormVehicleComponent.prototype, "vehicleType", {
6917
6943
  get: function () { return exports.VehicleType; },
6918
6944
  enumerable: false,
6919
6945
  configurable: true
6920
6946
  });
6921
- FormCarComponent.prototype.ngOnInit = function () {
6947
+ FormVehicleComponent.prototype.ngOnInit = function () {
6922
6948
  var _this = this;
6923
6949
  this.car = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-user', exports.InputType.Plaque, 'plaque-inp', null, this.inp.required);
6924
6950
  this.carF = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-earth-asia', exports.InputType.PlaqueF, 'plaque-inp', null, this.inp.required);
@@ -6927,31 +6953,22 @@
6927
6953
  this.car.displayLabel = this.carF.displayLabel = this.carG.displayLabel = this.motor.displayLabel = false;
6928
6954
  this.car.disabled = this.carF.disabled = this.carG.disabled = this.motor.disabled = this.inp.disabled;
6929
6955
  this.inp.setValue = function (v) {
6930
- if (v != null) {
6931
- if (v.split('_').length === 2 && v.split('_').every(function (x) { return /^[0-9]+$/.test(x); })) {
6932
- _this.type = exports.VehicleType.Motorcycle;
6933
- setTimeout(function () {
6956
+ if (v != null && v.Value !== null) {
6957
+ _this.changeType(v.Type);
6958
+ setTimeout(function () {
6959
+ if (v.Type === exports.VehicleType.Motorcycle) {
6934
6960
  _this.motor.setValue(v, false);
6935
- });
6936
- }
6937
- else if (v.split('_').length === 2) {
6938
- _this.type = exports.VehicleType.CarF;
6939
- setTimeout(function () {
6961
+ }
6962
+ else if (v.Type === exports.VehicleType.CarF) {
6940
6963
  _this.carF.setValue(v, false);
6941
- });
6942
- }
6943
- else if (v.split('_').length === 4) {
6944
- _this.type = exports.VehicleType.Car;
6945
- setTimeout(function () {
6964
+ }
6965
+ else if (v.Type === exports.VehicleType.Car) {
6946
6966
  _this.car.setValue(v, false);
6947
- });
6948
- }
6949
- else if (v.split('_').length === 1) {
6950
- _this.type = exports.VehicleType.CarG;
6951
- setTimeout(function () {
6967
+ }
6968
+ else if (v.Type === exports.VehicleType.CarG) {
6952
6969
  _this.carG.setValue(v, false);
6953
- });
6954
- }
6970
+ }
6971
+ });
6955
6972
  }
6956
6973
  };
6957
6974
  this.inp.focus = function () {
@@ -6980,39 +6997,45 @@
6980
6997
  this.inp.clear = function () {
6981
6998
  _this.inp.error = null;
6982
6999
  _this.inp.setValue(null, false);
6983
- _this.type = exports.VehicleType.Car;
7000
+ _this.changeType(exports.VehicleType.Car);
6984
7001
  _this.car.clear();
6985
7002
  _this.motor.clear();
6986
7003
  _this.carF.clear();
6987
7004
  _this.carG.clear();
6988
7005
  };
6989
7006
  this.inp.data = function () {
6990
- return _this.type === exports.VehicleType.Car ? _this.car.data() : _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() : _this.type === exports.VehicleType.CarF ? _this.carF.data() : _this.type === exports.VehicleType.CarG ? _this.carG.data() : null;
7007
+ var d = {};
7008
+ d[_this.inp.name] = _this.type === exports.VehicleType.Car ? _this.car.data() :
7009
+ _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() :
7010
+ _this.type === exports.VehicleType.CarF ? _this.carF.data() :
7011
+ _this.type === exports.VehicleType.CarG ? _this.carG.data() : null;
7012
+ d[_this.inp.name + 'Type'] = _this.type;
7013
+ return d;
6991
7014
  };
6992
7015
  };
6993
- FormCarComponent.prototype.changeType = function (t) {
7016
+ FormVehicleComponent.prototype.changeType = function (t) {
6994
7017
  this.type = t;
6995
7018
  if (this.inp.onChange) {
6996
7019
  this.inp.onChange(t);
6997
7020
  }
6998
7021
  this.onFocusIn();
6999
7022
  };
7000
- FormCarComponent.prototype.onFocusIn = function () {
7023
+ FormVehicleComponent.prototype.onFocusIn = function () {
7001
7024
  setTimeout(function () {
7002
7025
  $('#Part1TextInput .control').focus();
7003
7026
  }, 100);
7004
7027
  };
7005
- return FormCarComponent;
7028
+ return FormVehicleComponent;
7006
7029
  }());
7007
- FormCarComponent.decorators = [
7030
+ FormVehicleComponent.decorators = [
7008
7031
  { type: core.Component, args: [{
7009
- selector: 'lib-form-car',
7010
- 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",
7032
+ selector: 'lib-form-vehicle',
7033
+ 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(vehicleType.Car)\" [className]=\"(type === vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-vehicle'\" (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",
7011
7034
  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}"]
7012
7035
  },] }
7013
7036
  ];
7014
- FormCarComponent.ctorParameters = function () { return []; };
7015
- FormCarComponent.propDecorators = {
7037
+ FormVehicleComponent.ctorParameters = function () { return []; };
7038
+ FormVehicleComponent.propDecorators = {
7016
7039
  inp: [{ type: core.Input }],
7017
7040
  changeIndex: [{ type: core.Output }],
7018
7041
  inputDiv: [{ type: core.ViewChild, args: ['inputDiv',] }]
@@ -7642,7 +7665,7 @@
7642
7665
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
7643
7666
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
7644
7667
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
7645
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
7668
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
7646
7669
  SafeStylePipe, LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
7647
7670
  ClockComponent, ChartComponent, SafeHtmlPipe, FormTagComponent
7648
7671
  ],
@@ -7658,7 +7681,7 @@
7658
7681
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
7659
7682
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
7660
7683
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
7661
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
7684
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
7662
7685
  LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
7663
7686
  ClockComponent, ChartComponent, FormTagComponent
7664
7687
  ]
@@ -8200,8 +8223,6 @@
8200
8223
  exports.FooterComponent = FooterComponent;
8201
8224
  exports.FormBankCardComponent = FormBankCardComponent;
8202
8225
  exports.FormButtonComponent = FormButtonComponent;
8203
- exports.FormCarComponent = FormCarComponent;
8204
- exports.FormCarSearchComponent = FormCarSearchComponent;
8205
8226
  exports.FormCheckboxComponent = FormCheckboxComponent;
8206
8227
  exports.FormClass = FormClass;
8207
8228
  exports.FormComponent = FormComponent;
@@ -8221,6 +8242,8 @@
8221
8242
  exports.FormTextboxComponent = FormTextboxComponent;
8222
8243
  exports.FormTimeComponent = FormTimeComponent;
8223
8244
  exports.FormTreeComponent = FormTreeComponent;
8245
+ exports.FormVehicleComponent = FormVehicleComponent;
8246
+ exports.FormVehicleSearchComponent = FormVehicleSearchComponent;
8224
8247
  exports.HeaderComponent = HeaderComponent;
8225
8248
  exports.HelperClass = HelperClass;
8226
8249
  exports.InputClass = InputClass;