ps-toolkit-ui 1.6.64 → 1.6.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/bundles/ps-toolkit-ui.umd.js +158 -143
  2. package/bundles/ps-toolkit-ui.umd.js.map +1 -1
  3. package/bundles/ps-toolkit-ui.umd.min.js +1 -1
  4. package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
  5. package/esm2015/lib/classes/enum.class.js +5 -3
  6. package/esm2015/lib/classes/form.class.js +45 -30
  7. package/esm2015/lib/classes/helper.class.js +1 -2
  8. package/esm2015/lib/components/form/index/form.component.js +2 -2
  9. package/esm2015/lib/components/form/plaque/form.plaque.component.js +3 -3
  10. package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +2 -2
  11. package/esm2015/lib/components/form/vehicle/form.vehicle.component.js +104 -0
  12. package/esm2015/lib/components/form/vehicle/search/form.vehicle.search.component.js +209 -0
  13. package/esm2015/lib/components/table/row/table.row.component.js +1 -4
  14. package/esm2015/lib/ps-toolkit-ui.module.js +5 -5
  15. package/esm2015/public-api.js +3 -3
  16. package/fesm2015/ps-toolkit-ui.js +120 -116
  17. package/fesm2015/ps-toolkit-ui.js.map +1 -1
  18. package/lib/classes/enum.class.d.ts +4 -2
  19. package/lib/components/form/{car/form.car.component.d.ts → vehicle/form.vehicle.component.d.ts} +1 -1
  20. package/lib/components/form/{car/search/form.car.search.component.d.ts → vehicle/search/form.vehicle.search.component.d.ts} +4 -3
  21. package/package.json +1 -1
  22. package/ps-toolkit-ui.metadata.json +1 -1
  23. package/public-api.d.ts +2 -2
  24. package/esm2015/lib/components/form/car/form.car.component.js +0 -107
  25. package/esm2015/lib/components/form/car/search/form.car.search.component.js +0 -215
@@ -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
  };
@@ -2935,9 +2962,6 @@
2935
2962
  }
2936
2963
  else if (col.type === exports.TableCollType.Plaque) {
2937
2964
  var parts = cv.split('_');
2938
- console.log(cv);
2939
- console.log(parts.length);
2940
- console.log(parts);
2941
2965
  if (parts.length === 4) {
2942
2966
  return '<div data-copy="' + parts.join(' ') + '" class="plaque' + (parts[1] === 'ع' ? ' p' : '') + (parts[1] === 'ا' ? ' g' : '') + '">' +
2943
2967
  '<div class="part1">' + parts[0] + '</div>' +
@@ -4276,7 +4300,7 @@
4276
4300
  FormComponent.decorators = [
4277
4301
  { type: core.Component, args: [{
4278
4302
  selector: 'lib-form',
4279
- 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",
4280
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}"]
4281
4305
  },] }
4282
4306
  ];
@@ -4412,7 +4436,7 @@
4412
4436
  }
4413
4437
  else if (this.inp.type === exports.InputType.SelectAutoCompletePlaqueG) {
4414
4438
  this.part1.minLength = 3;
4415
- this.part1.maxLength = 10;
4439
+ this.part1.maxLength = 15;
4416
4440
  this.part1.type = exports.InputType.Text;
4417
4441
  this.part1.class += ' plaque-part-g';
4418
4442
  this.part2.class += ' plaque-part-g';
@@ -4871,7 +4895,7 @@
4871
4895
  }
4872
4896
  else if (this.inp.type === exports.InputType.PlaqueG) {
4873
4897
  this.part1.minLength = 3;
4874
- this.part1.maxLength = 10;
4898
+ this.part1.maxLength = 15;
4875
4899
  this.part1.type = exports.InputType.Text;
4876
4900
  this.part1.class += ' plaque-part-g';
4877
4901
  this.part2.class += ' plaque-part-g';
@@ -5077,7 +5101,7 @@
5077
5101
  FormPlaqueComponent.prototype.getValue = function () {
5078
5102
  return this.isValid() ? (this.inp.type === exports.InputType.Plaque ?
5079
5103
  (this.part1.value ? this.part1.value : '') + "_" + (this.part2.value ? this.part2.value : '') + "_" + (this.part3.value ? this.part3.value : '') + "_" + (this.part4.value ? this.part4.value : '') :
5080
- (this.inp.type === exports.InputType.PlaqueM || this.inp.type === exports.InputType.PlaqueF ? (this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : '') : "" + (this.part1.value ? this.part1.value : ''))) : null;
5104
+ (this.inp.type === exports.InputType.PlaqueM || this.inp.type === exports.InputType.PlaqueF ? (this.part1.value ? this.part1.value : '') + "_" + (this.part3.value ? this.part3.value : '') : "" + (this.part1.value ? this.part1.value : ''))).toUpperCase() : null;
5081
5105
  };
5082
5106
  return FormPlaqueComponent;
5083
5107
  }());
@@ -6696,13 +6720,13 @@
6696
6720
  inputLabel: [{ type: core.ViewChild, args: ['inputLabel',] }]
6697
6721
  };
6698
6722
 
6699
- var FormCarSearchComponent = /** @class */ (function () {
6700
- function FormCarSearchComponent() {
6723
+ var FormVehicleSearchComponent = /** @class */ (function () {
6724
+ function FormVehicleSearchComponent() {
6701
6725
  this.changeIndex = new core.EventEmitter();
6702
- this.type = 'Car';
6726
+ this.type = exports.VehicleType.Car;
6703
6727
  this.wsAuth = null;
6704
6728
  }
6705
- FormCarSearchComponent.prototype.ngOnInit = function () {
6729
+ FormVehicleSearchComponent.prototype.ngOnInit = function () {
6706
6730
  var _this = this;
6707
6731
  this.car = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-user', exports.InputType.SelectAutoCompletePlaque, 'plaque-inp');
6708
6732
  this.motor = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-motorcycle', exports.InputType.SelectAutoCompletePlaqueM, 'plaque-inp');
@@ -6754,35 +6778,26 @@
6754
6778
  this.fingerprint.disabled = true;
6755
6779
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
6756
6780
  this.inp.setValue = function (v) {
6757
- if (v != null) {
6758
- if (v.Search && v.Search.split('_').length === 2 && v.Search.split('_').every(function (x) { return /^[0-9]+$/.test(x); })) {
6759
- _this.type = 'Motor';
6760
- setTimeout(function () {
6781
+ if (v != null && v.Search) {
6782
+ _this.changeType(v.Type);
6783
+ setTimeout(function () {
6784
+ if (v.Type === exports.VehicleType.Motorcycle) {
6761
6785
  _this.motor.setValue(v.Value, false);
6762
6786
  _this.motor.setSearch(v.Search);
6763
- });
6764
- }
6765
- else if (v.Search && v.Search.split('_').length === 2) {
6766
- _this.type = 'CarF';
6767
- setTimeout(function () {
6787
+ }
6788
+ else if (v.Type === exports.VehicleType.CarF) {
6768
6789
  _this.carF.setValue(v.Value, false);
6769
6790
  _this.carF.setSearch(v.Search);
6770
- });
6771
- }
6772
- else if (v.Search && v.Search.split('_').length === 4) {
6773
- _this.type = 'Car';
6774
- setTimeout(function () {
6791
+ }
6792
+ else if (v.Type === exports.VehicleType.Car) {
6775
6793
  _this.car.setValue(v.Value, false);
6776
6794
  _this.car.setSearch(v.Search);
6777
- });
6778
- }
6779
- else if (v.Search && v.Search.split('_').length === 1) {
6780
- _this.type = 'CarG';
6781
- setTimeout(function () {
6795
+ }
6796
+ else if (v.Type === exports.VehicleType.CarG) {
6782
6797
  _this.carG.setValue(v.Value, false);
6783
6798
  _this.carG.setSearch(v.Search);
6784
- });
6785
- }
6799
+ }
6800
+ });
6786
6801
  }
6787
6802
  };
6788
6803
  this.inp.focus = function () {
@@ -6790,27 +6805,27 @@
6790
6805
  };
6791
6806
  this.inp.isValid = function () {
6792
6807
  _this.inp.error = null;
6793
- if (_this.inp.required && _this.type === 'Car' && !_this.car.isValid()) {
6808
+ if (_this.inp.required && _this.type === exports.VehicleType.Car && !_this.car.isValid()) {
6794
6809
  _this.inp.error = exports.InputError.Required;
6795
6810
  return false;
6796
6811
  }
6797
- if (_this.inp.required && _this.type === 'Motor' && !_this.motor.isValid()) {
6812
+ if (_this.inp.required && _this.type === exports.VehicleType.Motorcycle && !_this.motor.isValid()) {
6798
6813
  _this.inp.error = exports.InputError.Required;
6799
6814
  return false;
6800
6815
  }
6801
- if (_this.inp.required && _this.type === 'CarF' && !_this.carF.isValid()) {
6816
+ if (_this.inp.required && _this.type === exports.VehicleType.CarF && !_this.carF.isValid()) {
6802
6817
  _this.inp.error = exports.InputError.Required;
6803
6818
  return false;
6804
6819
  }
6805
- if (_this.inp.required && _this.type === 'CarG' && !_this.carG.isValid()) {
6820
+ if (_this.inp.required && _this.type === exports.VehicleType.CarG && !_this.carG.isValid()) {
6806
6821
  _this.inp.error = exports.InputError.Required;
6807
6822
  return false;
6808
6823
  }
6809
- if (_this.inp.required && _this.type === 'Driver' && !_this.driver.isValid()) {
6824
+ if (_this.inp.required && _this.type === exports.VehicleType.Driver && !_this.driver.isValid()) {
6810
6825
  _this.inp.error = exports.InputError.Required;
6811
6826
  return false;
6812
6827
  }
6813
- if (_this.inp.required && _this.type === 'Fingerprint' && !_this.fingerprint.isValid()) {
6828
+ if (_this.inp.required && _this.type === exports.VehicleType.Fingerprint && !_this.fingerprint.isValid()) {
6814
6829
  _this.inp.error = exports.InputError.Required;
6815
6830
  return false;
6816
6831
  }
@@ -6819,7 +6834,7 @@
6819
6834
  this.inp.clear = function () {
6820
6835
  _this.inp.error = null;
6821
6836
  _this.inp.setValue(null, false);
6822
- _this.type = 'Car';
6837
+ _this.changeType(exports.VehicleType.Car);
6823
6838
  _this.car.clear();
6824
6839
  _this.motor.clear();
6825
6840
  _this.carF.clear();
@@ -6828,18 +6843,21 @@
6828
6843
  _this.fingerprint.clear();
6829
6844
  };
6830
6845
  this.inp.data = function () {
6831
- return _this.type === 'Car' ? _this.car.data() :
6832
- _this.type === 'Motor' ? _this.motor.data() :
6833
- _this.type === 'CarF' ? _this.carF.data() :
6834
- _this.type === 'carG' ? _this.carG.data() :
6835
- _this.type === 'Driver' ? _this.driver.data() :
6836
- _this.type === 'Fingerprint' ? _this.fingerprint.data() : null;
6846
+ var d = {};
6847
+ d[_this.inp.name] = _this.type === exports.VehicleType.Car ? _this.car.data() :
6848
+ _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() :
6849
+ _this.type === exports.VehicleType.CarF ? _this.carF.data() :
6850
+ _this.type === exports.VehicleType.CarG ? _this.carG.data() :
6851
+ _this.type === exports.VehicleType.Driver ? _this.driver.data() :
6852
+ _this.type === exports.VehicleType.Fingerprint ? _this.fingerprint.data() : null;
6853
+ d[_this.inp.name + 'Type'] = _this.type;
6854
+ return d;
6837
6855
  };
6838
6856
  };
6839
- FormCarSearchComponent.prototype.changeType = function (t) {
6857
+ FormVehicleSearchComponent.prototype.changeType = function (t) {
6840
6858
  var _this = this;
6841
6859
  this.type = t;
6842
- if (t === 'Fingerprint') {
6860
+ if (t === exports.VehicleType.Fingerprint) {
6843
6861
  this.fingerprint.loading = true;
6844
6862
  this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
6845
6863
  this.fingerprint.value = null;
@@ -6880,48 +6898,48 @@
6880
6898
  this.car.url = this.motor.url = this.carF.url = this.carG.url = this.driver.url = this.inp.url.replace('_{}', '_' + this.type);
6881
6899
  this.onFocusIn();
6882
6900
  };
6883
- FormCarSearchComponent.prototype.onFocusIn = function () {
6901
+ FormVehicleSearchComponent.prototype.onFocusIn = function () {
6884
6902
  var _this = this;
6885
- if (this.type === 'Car' || this.type === 'Motor' || this.type === 'CarF' || this.type === 'CarG') {
6903
+ if (this.type === exports.VehicleType.Car || this.type === exports.VehicleType.Motorcycle || this.type === exports.VehicleType.CarF || this.type === exports.VehicleType.CarG) {
6886
6904
  setTimeout(function () {
6887
6905
  $('#' + _this.inp.id + 'CarSearchInput' + ' .plaque-inp').click();
6888
6906
  $('#' + _this.inp.id + 'CarSearchInput' + ' #Part1Input .control').focus();
6889
6907
  }, 100);
6890
6908
  }
6891
- else if (this.type === 'Driver') {
6909
+ else if (this.type === exports.VehicleType.Driver) {
6892
6910
  this.driver.focus();
6893
6911
  }
6894
- else if (this.type === 'Fingerprint') {
6912
+ else if (this.type === exports.VehicleType.Fingerprint) {
6895
6913
  this.fingerprint.focus();
6896
6914
  }
6897
6915
  };
6898
- return FormCarSearchComponent;
6916
+ return FormVehicleSearchComponent;
6899
6917
  }());
6900
- FormCarSearchComponent.decorators = [
6918
+ FormVehicleSearchComponent.decorators = [
6901
6919
  { type: core.Component, args: [{
6902
- selector: 'lib-form-car-search',
6903
- 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",
6920
+ selector: 'lib-form-vehicle-search',
6921
+ template: "<div #inputDiv [id]=\"inp.id + 'CarSearchInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.icon != null ? '' : ' without-icon') + ' form-input vehicle'\">\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes('Car')\" [className]=\"(type == 'Car' ? 'active ' : '') + 'change-type-btn fas fa-vehicle'\" (click)=\"changeType('Car')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Motor')\" [className]=\"(type == 'Motor' ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType('Motor')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Driver')\" [className]=\"(type == 'Driver' ? 'active ' : '') + 'change-type-btn fas fa-user'\" (click)=\"changeType('Driver')\"></i>\r\n <i *ngIf=\"inp.rows.includes('Fingerprint')\" [className]=\"(type == 'Fingerprint' ? 'active ' : '') + 'change-type-btn fas fa-fingerprint'\" (click)=\"changeType('Fingerprint')\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarF')\" [className]=\"(type == 'CarF' ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType('CarF')\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarG')\" [className]=\"(type == 'CarG' ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType('CarG')\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque-select [inp]=\"car\" *ngIf=\"type === 'Car'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"motor\" *ngIf=\"type === 'Motor'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carF\" *ngIf=\"type === 'CarF'\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carG\" *ngIf=\"type === 'CarG'\"></lib-form-plaque-select>\r\n <lib-form-select [inp]=\"driver\" *ngIf=\"type === 'Driver'\"></lib-form-select>\r\n <lib-form-select [inp]=\"fingerprint\" *ngIf=\"type === 'Fingerprint'\"></lib-form-select>\r\n </div>\r\n</div>\r\n",
6904
6922
  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}"]
6905
6923
  },] }
6906
6924
  ];
6907
- FormCarSearchComponent.ctorParameters = function () { return []; };
6908
- FormCarSearchComponent.propDecorators = {
6925
+ FormVehicleSearchComponent.ctorParameters = function () { return []; };
6926
+ FormVehicleSearchComponent.propDecorators = {
6909
6927
  inp: [{ type: core.Input }],
6910
6928
  changeIndex: [{ type: core.Output }],
6911
6929
  inputDiv: [{ type: core.ViewChild, args: ['inputDiv',] }]
6912
6930
  };
6913
6931
 
6914
- var FormCarComponent = /** @class */ (function () {
6915
- function FormCarComponent() {
6932
+ var FormVehicleComponent = /** @class */ (function () {
6933
+ function FormVehicleComponent() {
6916
6934
  this.changeIndex = new core.EventEmitter();
6917
6935
  this.type = exports.VehicleType.Car;
6918
6936
  }
6919
- Object.defineProperty(FormCarComponent.prototype, "vehicleType", {
6937
+ Object.defineProperty(FormVehicleComponent.prototype, "vehicleType", {
6920
6938
  get: function () { return exports.VehicleType; },
6921
6939
  enumerable: false,
6922
6940
  configurable: true
6923
6941
  });
6924
- FormCarComponent.prototype.ngOnInit = function () {
6942
+ FormVehicleComponent.prototype.ngOnInit = function () {
6925
6943
  var _this = this;
6926
6944
  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);
6927
6945
  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);
@@ -6930,31 +6948,22 @@
6930
6948
  this.car.displayLabel = this.carF.displayLabel = this.carG.displayLabel = this.motor.displayLabel = false;
6931
6949
  this.car.disabled = this.carF.disabled = this.carG.disabled = this.motor.disabled = this.inp.disabled;
6932
6950
  this.inp.setValue = function (v) {
6933
- if (v != null) {
6934
- if (v.split('_').length === 2 && v.split('_').every(function (x) { return /^[0-9]+$/.test(x); })) {
6935
- _this.type = exports.VehicleType.Motorcycle;
6936
- setTimeout(function () {
6951
+ if (v != null && v.Value !== null) {
6952
+ _this.changeType(v.Type);
6953
+ setTimeout(function () {
6954
+ if (v.Type === exports.VehicleType.Motorcycle) {
6937
6955
  _this.motor.setValue(v, false);
6938
- });
6939
- }
6940
- else if (v.split('_').length === 2) {
6941
- _this.type = exports.VehicleType.CarF;
6942
- setTimeout(function () {
6956
+ }
6957
+ else if (v.Type === exports.VehicleType.CarF) {
6943
6958
  _this.carF.setValue(v, false);
6944
- });
6945
- }
6946
- else if (v.split('_').length === 4) {
6947
- _this.type = exports.VehicleType.Car;
6948
- setTimeout(function () {
6959
+ }
6960
+ else if (v.Type === exports.VehicleType.Car) {
6949
6961
  _this.car.setValue(v, false);
6950
- });
6951
- }
6952
- else if (v.split('_').length === 1) {
6953
- _this.type = exports.VehicleType.CarG;
6954
- setTimeout(function () {
6962
+ }
6963
+ else if (v.Type === exports.VehicleType.CarG) {
6955
6964
  _this.carG.setValue(v, false);
6956
- });
6957
- }
6965
+ }
6966
+ });
6958
6967
  }
6959
6968
  };
6960
6969
  this.inp.focus = function () {
@@ -6983,39 +6992,45 @@
6983
6992
  this.inp.clear = function () {
6984
6993
  _this.inp.error = null;
6985
6994
  _this.inp.setValue(null, false);
6986
- _this.type = exports.VehicleType.Car;
6995
+ _this.changeType(exports.VehicleType.Car);
6987
6996
  _this.car.clear();
6988
6997
  _this.motor.clear();
6989
6998
  _this.carF.clear();
6990
6999
  _this.carG.clear();
6991
7000
  };
6992
7001
  this.inp.data = function () {
6993
- 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;
7002
+ var d = {};
7003
+ d[_this.inp.name] = _this.type === exports.VehicleType.Car ? _this.car.data() :
7004
+ _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() :
7005
+ _this.type === exports.VehicleType.CarF ? _this.carF.data() :
7006
+ _this.type === exports.VehicleType.CarG ? _this.carG.data() : null;
7007
+ d[_this.inp.name + 'Type'] = _this.type;
7008
+ return d;
6994
7009
  };
6995
7010
  };
6996
- FormCarComponent.prototype.changeType = function (t) {
7011
+ FormVehicleComponent.prototype.changeType = function (t) {
6997
7012
  this.type = t;
6998
7013
  if (this.inp.onChange) {
6999
7014
  this.inp.onChange(t);
7000
7015
  }
7001
7016
  this.onFocusIn();
7002
7017
  };
7003
- FormCarComponent.prototype.onFocusIn = function () {
7018
+ FormVehicleComponent.prototype.onFocusIn = function () {
7004
7019
  setTimeout(function () {
7005
7020
  $('#Part1TextInput .control').focus();
7006
7021
  }, 100);
7007
7022
  };
7008
- return FormCarComponent;
7023
+ return FormVehicleComponent;
7009
7024
  }());
7010
- FormCarComponent.decorators = [
7025
+ FormVehicleComponent.decorators = [
7011
7026
  { type: core.Component, args: [{
7012
- selector: 'lib-form-car',
7013
- 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",
7027
+ selector: 'lib-form-vehicle',
7028
+ template: "<div #inputDiv [id]=\"inp.id + 'CarInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon != null ? '' : ' without-icon') + ' form-input vehicle'\">\r\n <div class=\"disable-con\"></div>\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes('Car')\" [className]=\"(type === vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-vehicle'\" (click)=\"changeType(vehicleType.Car)\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarF')\" [className]=\"(type === vehicleType.CarF ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType(vehicleType.CarF)\"></i>\r\n <i *ngIf=\"inp.rows.includes('CarG')\" [className]=\"(type === vehicleType.CarG ? 'active ' : '') + 'change-type-btn fas fa-globe'\" (click)=\"changeType(vehicleType.CarG)\"></i>\r\n <i *ngIf=\"inp.rows.includes('Motor')\" [className]=\"(type === vehicleType.Motorcycle ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType(vehicleType.Motorcycle)\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"car\" *ngIf=\"type === vehicleType.Car\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carF\" *ngIf=\"type === vehicleType.CarF\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carG\" *ngIf=\"type === vehicleType.CarG\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"motor\" *ngIf=\"type === vehicleType.Motorcycle\"></lib-form-plaque>\r\n </div>\r\n</div>\r\n",
7014
7029
  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}"]
7015
7030
  },] }
7016
7031
  ];
7017
- FormCarComponent.ctorParameters = function () { return []; };
7018
- FormCarComponent.propDecorators = {
7032
+ FormVehicleComponent.ctorParameters = function () { return []; };
7033
+ FormVehicleComponent.propDecorators = {
7019
7034
  inp: [{ type: core.Input }],
7020
7035
  changeIndex: [{ type: core.Output }],
7021
7036
  inputDiv: [{ type: core.ViewChild, args: ['inputDiv',] }]
@@ -7645,7 +7660,7 @@
7645
7660
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
7646
7661
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
7647
7662
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
7648
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
7663
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
7649
7664
  SafeStylePipe, LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
7650
7665
  ClockComponent, ChartComponent, SafeHtmlPipe, FormTagComponent
7651
7666
  ],
@@ -7661,7 +7676,7 @@
7661
7676
  FormIconComponent, FormButtonComponent, FormDatetimeComponent, FormPlaqueComponent, SubHeaderComponent, FooterComponent, StepsComponent,
7662
7677
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
7663
7678
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
7664
- FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, FormStarComponent,
7679
+ FormTimeComponent, NotfoundComponent, FormFingerComponent, FormVehicleSearchComponent, FormVehicleComponent, FormStarComponent,
7665
7680
  LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
7666
7681
  ClockComponent, ChartComponent, FormTagComponent
7667
7682
  ]
@@ -8203,8 +8218,6 @@
8203
8218
  exports.FooterComponent = FooterComponent;
8204
8219
  exports.FormBankCardComponent = FormBankCardComponent;
8205
8220
  exports.FormButtonComponent = FormButtonComponent;
8206
- exports.FormCarComponent = FormCarComponent;
8207
- exports.FormCarSearchComponent = FormCarSearchComponent;
8208
8221
  exports.FormCheckboxComponent = FormCheckboxComponent;
8209
8222
  exports.FormClass = FormClass;
8210
8223
  exports.FormComponent = FormComponent;
@@ -8224,6 +8237,8 @@
8224
8237
  exports.FormTextboxComponent = FormTextboxComponent;
8225
8238
  exports.FormTimeComponent = FormTimeComponent;
8226
8239
  exports.FormTreeComponent = FormTreeComponent;
8240
+ exports.FormVehicleComponent = FormVehicleComponent;
8241
+ exports.FormVehicleSearchComponent = FormVehicleSearchComponent;
8227
8242
  exports.HeaderComponent = HeaderComponent;
8228
8243
  exports.HelperClass = HelperClass;
8229
8244
  exports.InputClass = InputClass;