ps-toolkit-ui 1.6.67 → 1.6.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ps-toolkit-ui.umd.js +163 -140
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/enum.class.js +5 -3
- package/esm2015/lib/classes/form.class.js +45 -30
- package/esm2015/lib/components/form/index/form.component.js +2 -2
- package/esm2015/lib/components/form/vehicle/form.vehicle.component.js +104 -0
- package/esm2015/lib/components/form/vehicle/search/form.vehicle.search.component.js +210 -0
- package/esm2015/lib/ps-toolkit-ui.module.js +5 -5
- package/esm2015/public-api.js +3 -3
- package/fesm2015/ps-toolkit-ui.js +121 -113
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +4 -2
- package/lib/components/form/{car/form.car.component.d.ts → vehicle/form.vehicle.component.d.ts} +1 -1
- package/lib/components/form/{car/search/form.car.search.component.d.ts → vehicle/search/form.vehicle.search.component.d.ts} +5 -3
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
- package/public-api.d.ts +2 -2
- package/esm2015/lib/components/form/car/form.car.component.js +0 -108
- 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["
|
|
775
|
-
InputType[InputType["
|
|
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";
|
|
@@ -1709,52 +1711,72 @@
|
|
|
1709
1711
|
if (d == null) {
|
|
1710
1712
|
d = {};
|
|
1711
1713
|
}
|
|
1712
|
-
this.inputs.forEach(function (inp) {
|
|
1713
|
-
var vl = inp.data();
|
|
1714
|
-
if (vl !== null) {
|
|
1715
|
-
if (d[inp.name] === undefined) {
|
|
1716
|
-
_.set(d, inp.name, vl);
|
|
1717
|
-
}
|
|
1718
|
-
else {
|
|
1719
|
-
if (d[inp.name] instanceof Array) {
|
|
1720
|
-
d[inp.name].push(vl);
|
|
1721
|
-
}
|
|
1722
|
-
else {
|
|
1723
|
-
d[inp.name] = [d[inp.name], vl];
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
});
|
|
1728
1714
|
}
|
|
1729
1715
|
else {
|
|
1730
1716
|
if (d == null) {
|
|
1731
1717
|
d = new FormData();
|
|
1732
1718
|
}
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
}
|
|
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);
|
|
1743
1728
|
}
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
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);
|
|
1750
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);
|
|
1751
1749
|
}
|
|
1752
1750
|
else {
|
|
1753
|
-
d
|
|
1751
|
+
d[n] = [d[n], vl];
|
|
1754
1752
|
}
|
|
1755
1753
|
}
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
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
|
+
});
|
|
1758
1780
|
return d;
|
|
1759
1781
|
};
|
|
1760
1782
|
FormClass.prototype.json = function (d) {
|
|
@@ -1763,7 +1785,7 @@
|
|
|
1763
1785
|
d = {};
|
|
1764
1786
|
}
|
|
1765
1787
|
this.inputs.forEach(function (inp) {
|
|
1766
|
-
var
|
|
1788
|
+
var e_3, _a;
|
|
1767
1789
|
var vl = inp.data();
|
|
1768
1790
|
if (vl !== null && vl !== '') {
|
|
1769
1791
|
if (vl instanceof Array) {
|
|
@@ -1773,12 +1795,12 @@
|
|
|
1773
1795
|
d[inp.name] = v;
|
|
1774
1796
|
}
|
|
1775
1797
|
}
|
|
1776
|
-
catch (
|
|
1798
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1777
1799
|
finally {
|
|
1778
1800
|
try {
|
|
1779
1801
|
if (vl_2_1 && !vl_2_1.done && (_a = vl_2.return)) _a.call(vl_2);
|
|
1780
1802
|
}
|
|
1781
|
-
finally { if (
|
|
1803
|
+
finally { if (e_3) throw e_3.error; }
|
|
1782
1804
|
}
|
|
1783
1805
|
}
|
|
1784
1806
|
else {
|
|
@@ -1791,9 +1813,14 @@
|
|
|
1791
1813
|
FormClass.prototype.setData = function (d) {
|
|
1792
1814
|
this.inputs.forEach(function (inp) {
|
|
1793
1815
|
var iv = _.get(d, inp.name);
|
|
1794
|
-
if (inp.type === exports.InputType.
|
|
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) {
|
|
1795
1821
|
var ivs = _.get(d, inp.name.replace('Id', ''));
|
|
1796
|
-
|
|
1822
|
+
var ivt = _.get(d, inp.name + 'Type');
|
|
1823
|
+
inp.setValue({ Search: ivs, Value: iv, Type: ivt }, true);
|
|
1797
1824
|
}
|
|
1798
1825
|
else if (inp.type !== exports.InputType.Label || iv != null) {
|
|
1799
1826
|
inp.setValue(iv, true);
|
|
@@ -1960,7 +1987,8 @@
|
|
|
1960
1987
|
return r.filter(function (x) { return (p == null && !x.ParentId) || x.ParentId === p || !tree; })
|
|
1961
1988
|
.map(function (x) {
|
|
1962
1989
|
var o = new OptionClass(x.Name, x.Id.toString());
|
|
1963
|
-
if (_this.type === exports.InputType.SelectAutoCompletePlaque || _this.type === exports.InputType.SelectAutoCompletePlaqueM ||
|
|
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') {
|
|
1964
1992
|
var tn = o.name.split('_');
|
|
1965
1993
|
if (tn.length === 4) {
|
|
1966
1994
|
tn[1] += '‎';
|
|
@@ -2046,7 +2074,7 @@
|
|
|
2046
2074
|
this.rows = rows;
|
|
2047
2075
|
}
|
|
2048
2076
|
AccordionClass.prototype.check = function () {
|
|
2049
|
-
var
|
|
2077
|
+
var e_4, _a;
|
|
2050
2078
|
try {
|
|
2051
2079
|
for (var _b = __values(this.rows), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2052
2080
|
var row = _c.value;
|
|
@@ -2056,12 +2084,12 @@
|
|
|
2056
2084
|
}
|
|
2057
2085
|
}
|
|
2058
2086
|
}
|
|
2059
|
-
catch (
|
|
2087
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
2060
2088
|
finally {
|
|
2061
2089
|
try {
|
|
2062
2090
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2063
2091
|
}
|
|
2064
|
-
finally { if (
|
|
2092
|
+
finally { if (e_4) throw e_4.error; }
|
|
2065
2093
|
}
|
|
2066
2094
|
return true;
|
|
2067
2095
|
};
|
|
@@ -4272,7 +4300,7 @@
|
|
|
4272
4300
|
FormComponent.decorators = [
|
|
4273
4301
|
{ type: core.Component, args: [{
|
|
4274
4302
|
selector: 'lib-form',
|
|
4275
|
-
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-
|
|
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",
|
|
4276
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}"]
|
|
4277
4305
|
},] }
|
|
4278
4306
|
];
|
|
@@ -6692,13 +6720,18 @@
|
|
|
6692
6720
|
inputLabel: [{ type: core.ViewChild, args: ['inputLabel',] }]
|
|
6693
6721
|
};
|
|
6694
6722
|
|
|
6695
|
-
var
|
|
6696
|
-
function
|
|
6723
|
+
var FormVehicleSearchComponent = /** @class */ (function () {
|
|
6724
|
+
function FormVehicleSearchComponent() {
|
|
6697
6725
|
this.changeIndex = new core.EventEmitter();
|
|
6698
|
-
this.type =
|
|
6726
|
+
this.type = exports.VehicleType.Car;
|
|
6699
6727
|
this.wsAuth = null;
|
|
6700
6728
|
}
|
|
6701
|
-
|
|
6729
|
+
Object.defineProperty(FormVehicleSearchComponent.prototype, "vehicleType", {
|
|
6730
|
+
get: function () { return exports.VehicleType; },
|
|
6731
|
+
enumerable: false,
|
|
6732
|
+
configurable: true
|
|
6733
|
+
});
|
|
6734
|
+
FormVehicleSearchComponent.prototype.ngOnInit = function () {
|
|
6702
6735
|
var _this = this;
|
|
6703
6736
|
this.car = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-user', exports.InputType.SelectAutoCompletePlaque, 'plaque-inp');
|
|
6704
6737
|
this.motor = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', 'fa-motorcycle', exports.InputType.SelectAutoCompletePlaqueM, 'plaque-inp');
|
|
@@ -6750,35 +6783,26 @@
|
|
|
6750
6783
|
this.fingerprint.disabled = true;
|
|
6751
6784
|
this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
|
|
6752
6785
|
this.inp.setValue = function (v) {
|
|
6753
|
-
if (v != null) {
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6786
|
+
if (v != null && v.Search) {
|
|
6787
|
+
_this.changeType(v.Type);
|
|
6788
|
+
setTimeout(function () {
|
|
6789
|
+
if (v.Type === exports.VehicleType.Motorcycle) {
|
|
6757
6790
|
_this.motor.setValue(v.Value, false);
|
|
6758
6791
|
_this.motor.setSearch(v.Search);
|
|
6759
|
-
}
|
|
6760
|
-
|
|
6761
|
-
else if (v.Search && v.Search.split('_').length === 2) {
|
|
6762
|
-
_this.type = 'CarF';
|
|
6763
|
-
setTimeout(function () {
|
|
6792
|
+
}
|
|
6793
|
+
else if (v.Type === exports.VehicleType.CarF) {
|
|
6764
6794
|
_this.carF.setValue(v.Value, false);
|
|
6765
6795
|
_this.carF.setSearch(v.Search);
|
|
6766
|
-
}
|
|
6767
|
-
|
|
6768
|
-
else if (v.Search && v.Search.split('_').length === 4) {
|
|
6769
|
-
_this.type = 'Car';
|
|
6770
|
-
setTimeout(function () {
|
|
6796
|
+
}
|
|
6797
|
+
else if (v.Type === exports.VehicleType.Car) {
|
|
6771
6798
|
_this.car.setValue(v.Value, false);
|
|
6772
6799
|
_this.car.setSearch(v.Search);
|
|
6773
|
-
}
|
|
6774
|
-
|
|
6775
|
-
else if (v.Search && v.Search.split('_').length === 1) {
|
|
6776
|
-
_this.type = 'CarG';
|
|
6777
|
-
setTimeout(function () {
|
|
6800
|
+
}
|
|
6801
|
+
else if (v.Type === exports.VehicleType.CarG) {
|
|
6778
6802
|
_this.carG.setValue(v.Value, false);
|
|
6779
6803
|
_this.carG.setSearch(v.Search);
|
|
6780
|
-
}
|
|
6781
|
-
}
|
|
6804
|
+
}
|
|
6805
|
+
});
|
|
6782
6806
|
}
|
|
6783
6807
|
};
|
|
6784
6808
|
this.inp.focus = function () {
|
|
@@ -6786,27 +6810,27 @@
|
|
|
6786
6810
|
};
|
|
6787
6811
|
this.inp.isValid = function () {
|
|
6788
6812
|
_this.inp.error = null;
|
|
6789
|
-
if (_this.inp.required && _this.type ===
|
|
6813
|
+
if (_this.inp.required && _this.type === exports.VehicleType.Car && !_this.car.isValid()) {
|
|
6790
6814
|
_this.inp.error = exports.InputError.Required;
|
|
6791
6815
|
return false;
|
|
6792
6816
|
}
|
|
6793
|
-
if (_this.inp.required && _this.type ===
|
|
6817
|
+
if (_this.inp.required && _this.type === exports.VehicleType.Motorcycle && !_this.motor.isValid()) {
|
|
6794
6818
|
_this.inp.error = exports.InputError.Required;
|
|
6795
6819
|
return false;
|
|
6796
6820
|
}
|
|
6797
|
-
if (_this.inp.required && _this.type ===
|
|
6821
|
+
if (_this.inp.required && _this.type === exports.VehicleType.CarF && !_this.carF.isValid()) {
|
|
6798
6822
|
_this.inp.error = exports.InputError.Required;
|
|
6799
6823
|
return false;
|
|
6800
6824
|
}
|
|
6801
|
-
if (_this.inp.required && _this.type ===
|
|
6825
|
+
if (_this.inp.required && _this.type === exports.VehicleType.CarG && !_this.carG.isValid()) {
|
|
6802
6826
|
_this.inp.error = exports.InputError.Required;
|
|
6803
6827
|
return false;
|
|
6804
6828
|
}
|
|
6805
|
-
if (_this.inp.required && _this.type ===
|
|
6829
|
+
if (_this.inp.required && _this.type === exports.VehicleType.Driver && !_this.driver.isValid()) {
|
|
6806
6830
|
_this.inp.error = exports.InputError.Required;
|
|
6807
6831
|
return false;
|
|
6808
6832
|
}
|
|
6809
|
-
if (_this.inp.required && _this.type ===
|
|
6833
|
+
if (_this.inp.required && _this.type === exports.VehicleType.Fingerprint && !_this.fingerprint.isValid()) {
|
|
6810
6834
|
_this.inp.error = exports.InputError.Required;
|
|
6811
6835
|
return false;
|
|
6812
6836
|
}
|
|
@@ -6815,7 +6839,7 @@
|
|
|
6815
6839
|
this.inp.clear = function () {
|
|
6816
6840
|
_this.inp.error = null;
|
|
6817
6841
|
_this.inp.setValue(null, false);
|
|
6818
|
-
_this.
|
|
6842
|
+
_this.changeType(exports.VehicleType.Car);
|
|
6819
6843
|
_this.car.clear();
|
|
6820
6844
|
_this.motor.clear();
|
|
6821
6845
|
_this.carF.clear();
|
|
@@ -6824,18 +6848,21 @@
|
|
|
6824
6848
|
_this.fingerprint.clear();
|
|
6825
6849
|
};
|
|
6826
6850
|
this.inp.data = function () {
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
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;
|
|
6833
6860
|
};
|
|
6834
6861
|
};
|
|
6835
|
-
|
|
6862
|
+
FormVehicleSearchComponent.prototype.changeType = function (t) {
|
|
6836
6863
|
var _this = this;
|
|
6837
6864
|
this.type = t;
|
|
6838
|
-
if (t ===
|
|
6865
|
+
if (t === exports.VehicleType.Fingerprint) {
|
|
6839
6866
|
this.fingerprint.loading = true;
|
|
6840
6867
|
this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
|
|
6841
6868
|
this.fingerprint.value = null;
|
|
@@ -6876,48 +6903,48 @@
|
|
|
6876
6903
|
this.car.url = this.motor.url = this.carF.url = this.carG.url = this.driver.url = this.inp.url.replace('_{}', '_' + this.type);
|
|
6877
6904
|
this.onFocusIn();
|
|
6878
6905
|
};
|
|
6879
|
-
|
|
6906
|
+
FormVehicleSearchComponent.prototype.onFocusIn = function () {
|
|
6880
6907
|
var _this = this;
|
|
6881
|
-
if (this.type ===
|
|
6908
|
+
if (this.type === exports.VehicleType.Car || this.type === exports.VehicleType.Motorcycle || this.type === exports.VehicleType.CarF || this.type === exports.VehicleType.CarG) {
|
|
6882
6909
|
setTimeout(function () {
|
|
6883
|
-
$('#' + _this.inp.id + '
|
|
6884
|
-
$('#' + _this.inp.id + '
|
|
6910
|
+
$('#' + _this.inp.id + 'VehicleSearchInput' + ' .plaque-inp').click();
|
|
6911
|
+
$('#' + _this.inp.id + 'VehicleSearchInput' + ' #Part1Input .control').focus();
|
|
6885
6912
|
}, 100);
|
|
6886
6913
|
}
|
|
6887
|
-
else if (this.type ===
|
|
6914
|
+
else if (this.type === exports.VehicleType.Driver) {
|
|
6888
6915
|
this.driver.focus();
|
|
6889
6916
|
}
|
|
6890
|
-
else if (this.type ===
|
|
6917
|
+
else if (this.type === exports.VehicleType.Fingerprint) {
|
|
6891
6918
|
this.fingerprint.focus();
|
|
6892
6919
|
}
|
|
6893
6920
|
};
|
|
6894
|
-
return
|
|
6921
|
+
return FormVehicleSearchComponent;
|
|
6895
6922
|
}());
|
|
6896
|
-
|
|
6923
|
+
FormVehicleSearchComponent.decorators = [
|
|
6897
6924
|
{ type: core.Component, args: [{
|
|
6898
|
-
selector: 'lib-form-
|
|
6899
|
-
template: "<div #inputDiv [id]=\"inp.id + '
|
|
6900
|
-
styles: [".form-input.
|
|
6925
|
+
selector: 'lib-form-vehicle-search',
|
|
6926
|
+
template: "<div #inputDiv [id]=\"inp.id + 'VehicleSearchInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.icon != null ? '' : ' without-icon') + ' form-input vehicle-search'\">\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Car)\" [className]=\"(type == vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-car'\" (click)=\"changeType(vehicleType.Car)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Motorcycle)\" [className]=\"(type == vehicleType.Motorcycle ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType(vehicleType.Motorcycle)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Driver)\" [className]=\"(type == vehicleType.Driver ? 'active ' : '') + 'change-type-btn fas fa-user'\" (click)=\"changeType(vehicleType.Driver)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Fingerprint)\" [className]=\"(type == vehicleType.Fingerprint ? 'active ' : '') + 'change-type-btn fas fa-fingerprint'\" (click)=\"changeType(vehicleType.Fingerprint)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.CarF)\" [className]=\"(type == vehicleType.CarF ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType(vehicleType.CarF)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.CarG)\" [className]=\"(type == vehicleType.CarG ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType(vehicleType.CarG)\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque-select [inp]=\"car\" *ngIf=\"type === vehicleType.Car\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"motor\" *ngIf=\"type === vehicleType.Motorcycle\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carF\" *ngIf=\"type === vehicleType.CarF\"></lib-form-plaque-select>\r\n <lib-form-plaque-select [inp]=\"carG\" *ngIf=\"type === vehicleType.CarG\"></lib-form-plaque-select>\r\n <lib-form-select [inp]=\"driver\" *ngIf=\"type === vehicleType.Driver\"></lib-form-select>\r\n <lib-form-select [inp]=\"fingerprint\" *ngIf=\"type === vehicleType.Fingerprint\"></lib-form-select>\r\n </div>\r\n</div>\r\n",
|
|
6927
|
+
styles: [".form-input.vehicle-search{border-radius:var(--border-radius-base);float:right;font-size:15px;position:relative;width:185px}.form-input.vehicle-search .label{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;direction:rtl;float:right;font-size:12px;height:20px;line-height:20px;margin-bottom:3px;padding:0 10px;text-align:right;width:100%}.form-input.vehicle-search.error .label{color:var(--red);font-size:10px}.form-input.vehicle-search .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input.vehicle-search .label .change-type-btn{cursor:pointer;float:right;font-size:16px;height:20px;line-height:20px;text-align:center;width:30px}.form-input.vehicle-search .label .change-type-btn.fa-user{font-size:14px;line-height:18px}.form-input.vehicle-search .label .change-type-btn.active,.form-input.vehicle-search .label .change-type-btn:hover{color:var(--primary)}.form-input.vehicle-search .control{background-color:#fff;background-image:none;border:none;border-radius:var(--border-radius-base);box-shadow:0 1px 3px 0 rgba(0,0,0,.4);color:var(--black);display:block;font-family:Vazir;font-size:11px;height:35px;padding:5px 35px;position:relative;text-align:center;width:100%;z-index:2}.form-input.vehicle-search .control:focus,.form-input.vehicle-search:hover .control{box-shadow:0 1px 5px 0 rgba(0,0,0,.7)}.form-input.vehicle-search span.icon{bottom:0;color:var(--primary);cursor:text;font-size:14px;height:35px;left:0;line-height:38px;position:absolute;text-align:center;transition:all .35s ease-in-out;width:35px;z-index:2}.form-input.vehicle-search span.icon.button{background-color:var(--base);border-radius:var(--border-radius-base) 0 0 var(--border-radius-base);color:#fff;cursor:pointer}.form-input.vehicle-search span.icon.button:hover{background-color:var(--base-dark)}.form-input.vehicle-search span.icon.button.blue{background-color:var(--blue)}.form-input.vehicle-search span.icon.button.blue:hover{background-color:var(--blue-dark)}.form-input.vehicle-search span.icon.button.green{background-color:var(--green)}.form-input.vehicle-search span.icon.button.green:hover{background-color:var(--green-dark)}.form-input.vehicle-search span.icon.button.red{background-color:var(--red)}.form-input.vehicle-search span.icon.button.red:hover{background-color:var(--red-dark)}.form-input.vehicle-search span.icon.button.yellow{background-color:var(--yellow)}.form-input.vehicle-search span.icon.button.yellow:hover{background-color:var(--yellow-dark)}.form-input.vehicle-search.disabled .control,.form-input.vehicle-search.disabled .label,.form-input.vehicle-search.disabled span.icon{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-shadow:unset;cursor:default;filter:blur(.5px);opacity:.7}.form-input.vehicle-search.error .control{box-shadow:0 1px 3px 0 var(--red)}.form-input.vehicle-search.error .control,.form-input.vehicle-search.error span.icon{color:var(--red-light)}.form-input.vehicle-search .progress{background-color:var(--primary);border-radius:var(--border-radius-base);bottom:0;height:3px;line-height:3px;position:absolute;right:0;transition:width .5s ease-in-out;width:100%;z-index:2}.form-input.vehicle-search.without-icon .control{padding:5px 10px}.form-input.vehicle-search.h-50 .control{height:50px}.form-input.vehicle-search.h-50 span.icon{height:50px;line-height:50px}.form-input.vehicle-search.h-45 .control{height:45px}.form-input.vehicle-search.h-45 span.icon{height:45px;line-height:45px}.form-input.vehicle-search.h-30 .control{font-size:10px;height:30px;padding:0}.form-input.vehicle-search.h-30 span.icon{height:30px;line-height:30px}.form-input.vehicle-search.h-35{height:35px}.form-input.vehicle-search.h-35 .control{height:35px;padding:0 35px}.form-input.vehicle-search.h-35 span.icon{height:35px;line-height:35px}.form-input.vehicle-search.h-25 .control{height:25px;padding:0}.form-input.vehicle-search.h-25 span.icon{height:25px;line-height:25px}.form-input.vehicle-search.table-search{float:right;margin-right:10%;margin-top:4px;width:80%}.form-input.vehicle-search.h-22 .control{height:22px;padding:0}.form-input.vehicle-search.h-22 span.icon{height:22px;line-height:22px}.form-input.vehicle-search.plaque-part-1{float:left;padding:0!important;width:35px!important}.form-input.vehicle-search.plaque-part-1.plaque-part-m{width:49px!important}.form-input.vehicle-search.plaque-part-3{float:left;padding:0!important;width:49px!important}.form-input.vehicle-search.plaque-part-3.plaque-part-m{width:69px!important}.form-input.vehicle-search.plaque-part-4{float:left;margin-top:10px;padding:0!important;width:34px!important}.form-input.vehicle-search.plaque-part-4 .control{height:25px!important}.form-input.vehicle-search.plaque-part-4.plaque-part-m{display:none!important}.form-input.vehicle-search.bank-card-part-item{float:left;padding:0!important;width:25%}.form-input.vehicle-search.bank-card-part-item:not(.bank-card-part-4):after{content:\"\\f068\";font-family:Font Awesome\\ 5 Free;font-size:6px;font-weight:900;height:20px;line-height:20px;position:absolute;right:-10px;text-align:center;top:calc(50% - 10px);width:20px}.form-input.vehicle-search.bank-card-part-item .control{background-color:initial!important;box-shadow:unset!important;font-size:13px!important;padding:0!important}"]
|
|
6901
6928
|
},] }
|
|
6902
6929
|
];
|
|
6903
|
-
|
|
6904
|
-
|
|
6930
|
+
FormVehicleSearchComponent.ctorParameters = function () { return []; };
|
|
6931
|
+
FormVehicleSearchComponent.propDecorators = {
|
|
6905
6932
|
inp: [{ type: core.Input }],
|
|
6906
6933
|
changeIndex: [{ type: core.Output }],
|
|
6907
6934
|
inputDiv: [{ type: core.ViewChild, args: ['inputDiv',] }]
|
|
6908
6935
|
};
|
|
6909
6936
|
|
|
6910
|
-
var
|
|
6911
|
-
function
|
|
6937
|
+
var FormVehicleComponent = /** @class */ (function () {
|
|
6938
|
+
function FormVehicleComponent() {
|
|
6912
6939
|
this.changeIndex = new core.EventEmitter();
|
|
6913
6940
|
this.type = exports.VehicleType.Car;
|
|
6914
6941
|
}
|
|
6915
|
-
Object.defineProperty(
|
|
6942
|
+
Object.defineProperty(FormVehicleComponent.prototype, "vehicleType", {
|
|
6916
6943
|
get: function () { return exports.VehicleType; },
|
|
6917
6944
|
enumerable: false,
|
|
6918
6945
|
configurable: true
|
|
6919
6946
|
});
|
|
6920
|
-
|
|
6947
|
+
FormVehicleComponent.prototype.ngOnInit = function () {
|
|
6921
6948
|
var _this = this;
|
|
6922
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);
|
|
6923
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);
|
|
@@ -6926,31 +6953,22 @@
|
|
|
6926
6953
|
this.car.displayLabel = this.carF.displayLabel = this.carG.displayLabel = this.motor.displayLabel = false;
|
|
6927
6954
|
this.car.disabled = this.carF.disabled = this.carG.disabled = this.motor.disabled = this.inp.disabled;
|
|
6928
6955
|
this.inp.setValue = function (v) {
|
|
6929
|
-
if (v != null) {
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6956
|
+
if (v != null && v.Value !== null) {
|
|
6957
|
+
_this.changeType(v.Type);
|
|
6958
|
+
setTimeout(function () {
|
|
6959
|
+
if (v.Type === exports.VehicleType.Motorcycle) {
|
|
6933
6960
|
_this.motor.setValue(v, false);
|
|
6934
|
-
}
|
|
6935
|
-
|
|
6936
|
-
else if (v.split('_').length === 2) {
|
|
6937
|
-
_this.changeType(exports.VehicleType.CarF);
|
|
6938
|
-
setTimeout(function () {
|
|
6961
|
+
}
|
|
6962
|
+
else if (v.Type === exports.VehicleType.CarF) {
|
|
6939
6963
|
_this.carF.setValue(v, false);
|
|
6940
|
-
}
|
|
6941
|
-
|
|
6942
|
-
else if (v.split('_').length === 4) {
|
|
6943
|
-
_this.changeType(exports.VehicleType.Car);
|
|
6944
|
-
setTimeout(function () {
|
|
6964
|
+
}
|
|
6965
|
+
else if (v.Type === exports.VehicleType.Car) {
|
|
6945
6966
|
_this.car.setValue(v, false);
|
|
6946
|
-
}
|
|
6947
|
-
|
|
6948
|
-
else if (v.split('_').length === 1) {
|
|
6949
|
-
_this.changeType(exports.VehicleType.CarG);
|
|
6950
|
-
setTimeout(function () {
|
|
6967
|
+
}
|
|
6968
|
+
else if (v.Type === exports.VehicleType.CarG) {
|
|
6951
6969
|
_this.carG.setValue(v, false);
|
|
6952
|
-
}
|
|
6953
|
-
}
|
|
6970
|
+
}
|
|
6971
|
+
});
|
|
6954
6972
|
}
|
|
6955
6973
|
};
|
|
6956
6974
|
this.inp.focus = function () {
|
|
@@ -6986,33 +7004,38 @@
|
|
|
6986
7004
|
_this.carG.clear();
|
|
6987
7005
|
};
|
|
6988
7006
|
this.inp.data = function () {
|
|
6989
|
-
|
|
6990
|
-
|
|
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
|
-
|
|
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
|
-
|
|
7023
|
+
FormVehicleComponent.prototype.onFocusIn = function () {
|
|
7001
7024
|
setTimeout(function () {
|
|
7002
7025
|
$('#Part1TextInput .control').focus();
|
|
7003
7026
|
}, 100);
|
|
7004
7027
|
};
|
|
7005
|
-
return
|
|
7028
|
+
return FormVehicleComponent;
|
|
7006
7029
|
}());
|
|
7007
|
-
|
|
7030
|
+
FormVehicleComponent.decorators = [
|
|
7008
7031
|
{ type: core.Component, args: [{
|
|
7009
|
-
selector: 'lib-form-
|
|
7010
|
-
template: "<div #inputDiv [id]=\"inp.id + '
|
|
7011
|
-
styles: [".form-input.
|
|
7032
|
+
selector: 'lib-form-vehicle',
|
|
7033
|
+
template: "<div #inputDiv [id]=\"inp.id + 'VehicleInput'\" [style]=\"inp.style\" [className]=\"inp.class + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon != null ? '' : ' without-icon') + ' form-input vehicle'\">\r\n <div class=\"disable-con\"></div>\r\n <div class=\"label\">\r\n <i *ngIf=\"inp.required\" class=\"f-r fas fa-star-of-life required-icon\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Car)\" [className]=\"(type === vehicleType.Car ? 'active ' : '') + 'change-type-btn fas fa-car'\" (click)=\"changeType(vehicleType.Car)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.CarF)\" [className]=\"(type === vehicleType.CarF ? 'active ' : '') + 'change-type-btn fas fa-earth-asia'\" (click)=\"changeType(vehicleType.CarF)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.CarG)\" [className]=\"(type === vehicleType.CarG ? 'active ' : '') + 'change-type-btn fas fa-globe'\" (click)=\"changeType(vehicleType.CarG)\"></i>\r\n <i *ngIf=\"inp.rows.includes(vehicleType.Motorcycle)\" [className]=\"(type === vehicleType.Motorcycle ? 'active ' : '') + 'change-type-btn fas fa-motorcycle'\" (click)=\"changeType(vehicleType.Motorcycle)\"></i>\r\n </div>\r\n <div class=\"w-100 p-r\">\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"car\" *ngIf=\"type === vehicleType.Car\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carF\" *ngIf=\"type === vehicleType.CarF\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"carG\" *ngIf=\"type === vehicleType.CarG\"></lib-form-plaque>\r\n <lib-form-plaque (changeIndex)=\"changeIndex.emit($event)\" [inp]=\"motor\" *ngIf=\"type === vehicleType.Motorcycle\"></lib-form-plaque>\r\n </div>\r\n</div>\r\n",
|
|
7034
|
+
styles: [".form-input.vehicle{border-radius:var(--border-radius-base);float:right;font-size:15px;position:relative;width:185px}.form-input.vehicle .label{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;direction:rtl;float:right;font-size:12px;height:20px;line-height:20px;margin-bottom:3px;padding:0 10px;text-align:right;width:100%}.form-input.vehicle.error .label{color:var(--red);font-size:10px}.form-input.vehicle .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input.vehicle .label .change-type-btn{cursor:pointer;float:right;font-size:16px;height:20px;line-height:20px;text-align:center;width:30px}.form-input.vehicle .label .change-type-btn.fa-user{font-size:14px;line-height:18px}.form-input.vehicle .label .change-type-btn.active,.form-input.vehicle .label .change-type-btn:hover{color:var(--primary)}.form-input.vehicle .control{background-color:#fff;background-image:none;border:none;border-radius:var(--border-radius-base);box-shadow:0 1px 3px 0 rgba(0,0,0,.4);color:var(--black);display:block;font-family:Vazir;font-size:11px;height:35px;padding:5px 35px;position:relative;text-align:center;width:100%;z-index:2}.form-input.vehicle .control:focus,.form-input.vehicle:hover .control{box-shadow:0 1px 5px 0 rgba(0,0,0,.7)}.form-input.vehicle span.icon{bottom:0;color:var(--primary);cursor:text;font-size:14px;height:35px;left:0;line-height:38px;position:absolute;text-align:center;transition:all .35s ease-in-out;width:35px;z-index:2}.form-input.vehicle span.icon.button{background-color:var(--base);border-radius:var(--border-radius-base) 0 0 var(--border-radius-base);color:#fff;cursor:pointer}.form-input.vehicle span.icon.button:hover{background-color:var(--base-dark)}.form-input.vehicle span.icon.button.blue{background-color:var(--blue)}.form-input.vehicle span.icon.button.blue:hover{background-color:var(--blue-dark)}.form-input.vehicle span.icon.button.green{background-color:var(--green)}.form-input.vehicle span.icon.button.green:hover{background-color:var(--green-dark)}.form-input.vehicle span.icon.button.red{background-color:var(--red)}.form-input.vehicle span.icon.button.red:hover{background-color:var(--red-dark)}.form-input.vehicle span.icon.button.yellow{background-color:var(--yellow)}.form-input.vehicle span.icon.button.yellow:hover{background-color:var(--yellow-dark)}.form-input.vehicle .disable-con{display:none}.form-input.vehicle.disabled{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-shadow:unset;cursor:default}.form-input.vehicle.disabled .disable-con{display:block;height:100%;position:absolute;right:0;top:0;width:100%;z-index:5}.form-input.vehicle.display .label{display:none}.form-input.vehicle.display .disable-con{display:block;height:100%;position:absolute;right:0;top:0;width:100%;z-index:5}.form-input.vehicle.error .control{box-shadow:0 1px 3px 0 var(--red)}.form-input.vehicle.error .control,.form-input.vehicle.error span.icon{color:var(--red-light)}.form-input.vehicle .progress{background-color:var(--primary);border-radius:var(--border-radius-base);bottom:0;height:3px;line-height:3px;position:absolute;right:0;transition:width .5s ease-in-out;width:100%;z-index:2}.form-input.vehicle.without-icon .control{padding:5px 10px}.form-input.vehicle.h-50 .control{height:50px}.form-input.vehicle.h-50 span.icon{height:50px;line-height:50px}.form-input.vehicle.h-45 .control{height:45px}.form-input.vehicle.h-45 span.icon{height:45px;line-height:45px}.form-input.vehicle.h-30 .control{font-size:10px;height:30px;padding:0}.form-input.vehicle.h-30 span.icon{height:30px;line-height:30px}.form-input.vehicle.h-35{height:35px}.form-input.vehicle.h-35 .control{height:35px;padding:0 35px}.form-input.vehicle.h-35 span.icon{height:35px;line-height:35px}.form-input.vehicle.h-25 .control{height:25px;padding:0}.form-input.vehicle.h-25 span.icon{height:25px;line-height:25px}.form-input.vehicle.table-search{float:right;margin-right:10%;margin-top:4px;width:80%}.form-input.vehicle.h-22 .control{height:22px;padding:0}.form-input.vehicle.h-22 span.icon{height:22px;line-height:22px}.form-input.vehicle.plaque-part-1{float:left;padding:0!important;width:35px!important}.form-input.vehicle.plaque-part-1.plaque-part-m{width:49px!important}.form-input.vehicle.plaque-part-3{float:left;padding:0!important;width:49px!important}.form-input.vehicle.plaque-part-3.plaque-part-m{width:69px!important}.form-input.vehicle.plaque-part-4{float:left;margin-top:10px;padding:0!important;width:34px!important}.form-input.vehicle.plaque-part-4 .control{height:25px!important}.form-input.vehicle.plaque-part-4.plaque-part-m{display:none!important}.form-input.vehicle.bank-card-part-item{float:left;padding:0!important;width:25%}.form-input.vehicle.bank-card-part-item:not(.bank-card-part-4):after{content:\"\\f068\";font-family:Font Awesome\\ 5 Free;font-size:6px;font-weight:900;height:20px;line-height:20px;position:absolute;right:-10px;text-align:center;top:calc(50% - 10px);width:20px}.form-input.vehicle.bank-card-part-item .control{background-color:initial!important;box-shadow:unset!important;font-size:13px!important;padding:0!important}"]
|
|
7012
7035
|
},] }
|
|
7013
7036
|
];
|
|
7014
|
-
|
|
7015
|
-
|
|
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,
|
|
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,
|
|
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;
|