ps-toolkit-ui 1.12.87 → 1.12.89
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 +77 -50
- 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 +46 -45
- package/esm2015/lib/classes/form.class.js +4 -4
- package/esm2015/lib/classes/helper.class.js +22 -1
- package/esm2015/lib/components/form/date/form.date.component.js +2 -2
- package/esm2015/lib/components/form/index/form.component.js +2 -2
- package/esm2015/lib/components/form/select/form.select.component.js +3 -2
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +5 -1
- package/fesm2015/ps-toolkit-ui.js +77 -50
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +45 -44
- package/lib/classes/helper.class.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -756,50 +756,51 @@
|
|
|
756
756
|
InputType[InputType["Phone"] = 3] = "Phone";
|
|
757
757
|
InputType[InputType["Email"] = 4] = "Email";
|
|
758
758
|
InputType[InputType["NationalCode"] = 5] = "NationalCode";
|
|
759
|
-
InputType[InputType["
|
|
760
|
-
InputType[InputType["
|
|
761
|
-
InputType[InputType["
|
|
762
|
-
InputType[InputType["
|
|
763
|
-
InputType[InputType["
|
|
764
|
-
InputType[InputType["
|
|
765
|
-
InputType[InputType["
|
|
766
|
-
InputType[InputType["
|
|
767
|
-
InputType[InputType["
|
|
768
|
-
InputType[InputType["
|
|
769
|
-
InputType[InputType["
|
|
770
|
-
InputType[InputType["
|
|
771
|
-
InputType[InputType["
|
|
772
|
-
InputType[InputType["
|
|
773
|
-
InputType[InputType["
|
|
774
|
-
InputType[InputType["
|
|
775
|
-
InputType[InputType["
|
|
776
|
-
InputType[InputType["
|
|
777
|
-
InputType[InputType["
|
|
778
|
-
InputType[InputType["
|
|
779
|
-
InputType[InputType["
|
|
780
|
-
InputType[InputType["
|
|
781
|
-
InputType[InputType["
|
|
782
|
-
InputType[InputType["
|
|
783
|
-
InputType[InputType["
|
|
784
|
-
InputType[InputType["
|
|
785
|
-
InputType[InputType["
|
|
786
|
-
InputType[InputType["
|
|
787
|
-
InputType[InputType["
|
|
788
|
-
InputType[InputType["
|
|
789
|
-
InputType[InputType["
|
|
790
|
-
InputType[InputType["
|
|
791
|
-
InputType[InputType["
|
|
792
|
-
InputType[InputType["
|
|
793
|
-
InputType[InputType["
|
|
794
|
-
InputType[InputType["
|
|
795
|
-
InputType[InputType["
|
|
796
|
-
InputType[InputType["
|
|
797
|
-
InputType[InputType["
|
|
798
|
-
InputType[InputType["
|
|
799
|
-
InputType[InputType["
|
|
800
|
-
InputType[InputType["
|
|
801
|
-
InputType[InputType["
|
|
802
|
-
InputType[InputType["
|
|
759
|
+
InputType[InputType["NationalNum"] = 6] = "NationalNum";
|
|
760
|
+
InputType[InputType["PostalCode"] = 7] = "PostalCode";
|
|
761
|
+
InputType[InputType["Sheba"] = 8] = "Sheba";
|
|
762
|
+
InputType[InputType["Number"] = 9] = "Number";
|
|
763
|
+
InputType[InputType["Select"] = 10] = "Select";
|
|
764
|
+
InputType[InputType["SelectSearch"] = 11] = "SelectSearch";
|
|
765
|
+
InputType[InputType["SelectAutoComplete"] = 12] = "SelectAutoComplete";
|
|
766
|
+
InputType[InputType["Date"] = 13] = "Date";
|
|
767
|
+
InputType[InputType["Month"] = 14] = "Month";
|
|
768
|
+
InputType[InputType["Time"] = 15] = "Time";
|
|
769
|
+
InputType[InputType["DateTime"] = 16] = "DateTime";
|
|
770
|
+
InputType[InputType["Check"] = 17] = "Check";
|
|
771
|
+
InputType[InputType["TextArea"] = 18] = "TextArea";
|
|
772
|
+
InputType[InputType["Label"] = 19] = "Label";
|
|
773
|
+
InputType[InputType["Button"] = 20] = "Button";
|
|
774
|
+
InputType[InputType["Submit"] = 21] = "Submit";
|
|
775
|
+
InputType[InputType["Icon"] = 22] = "Icon";
|
|
776
|
+
InputType[InputType["File"] = 23] = "File";
|
|
777
|
+
InputType[InputType["Url"] = 24] = "Url";
|
|
778
|
+
InputType[InputType["Price"] = 25] = "Price";
|
|
779
|
+
InputType[InputType["Radio"] = 26] = "Radio";
|
|
780
|
+
InputType[InputType["Tree"] = 27] = "Tree";
|
|
781
|
+
InputType[InputType["TreeRadio"] = 28] = "TreeRadio";
|
|
782
|
+
InputType[InputType["Plaque"] = 29] = "Plaque";
|
|
783
|
+
InputType[InputType["PlaqueM"] = 30] = "PlaqueM";
|
|
784
|
+
InputType[InputType["PlaqueF"] = 31] = "PlaqueF";
|
|
785
|
+
InputType[InputType["PlaqueG"] = 32] = "PlaqueG";
|
|
786
|
+
InputType[InputType["SelectAutoCompletePlaque"] = 33] = "SelectAutoCompletePlaque";
|
|
787
|
+
InputType[InputType["SelectAutoCompletePlaqueM"] = 34] = "SelectAutoCompletePlaqueM";
|
|
788
|
+
InputType[InputType["SelectAutoCompletePlaqueF"] = 35] = "SelectAutoCompletePlaqueF";
|
|
789
|
+
InputType[InputType["SelectAutoCompletePlaqueG"] = 36] = "SelectAutoCompletePlaqueG";
|
|
790
|
+
InputType[InputType["BankCard"] = 37] = "BankCard";
|
|
791
|
+
InputType[InputType["Constant"] = 38] = "Constant";
|
|
792
|
+
InputType[InputType["Hidden"] = 39] = "Hidden";
|
|
793
|
+
InputType[InputType["Table"] = 40] = "Table";
|
|
794
|
+
InputType[InputType["Tag"] = 41] = "Tag";
|
|
795
|
+
InputType[InputType["VehicleSearch"] = 42] = "VehicleSearch";
|
|
796
|
+
InputType[InputType["Vehicle"] = 43] = "Vehicle";
|
|
797
|
+
InputType[InputType["Finger"] = 44] = "Finger";
|
|
798
|
+
InputType[InputType["Color"] = 45] = "Color";
|
|
799
|
+
InputType[InputType["Star"] = 46] = "Star";
|
|
800
|
+
InputType[InputType["Toggle"] = 47] = "Toggle";
|
|
801
|
+
InputType[InputType["BillNumber"] = 48] = "BillNumber";
|
|
802
|
+
InputType[InputType["Ckeditor"] = 49] = "Ckeditor";
|
|
803
|
+
InputType[InputType["Uploader"] = 50] = "Uploader";
|
|
803
804
|
})(exports.InputType || (exports.InputType = {}));
|
|
804
805
|
(function (OperationEnum) {
|
|
805
806
|
OperationEnum[OperationEnum["All"] = -1] = "All";
|
|
@@ -999,6 +1000,27 @@
|
|
|
999
1000
|
sum %= 11;
|
|
1000
1001
|
return (sum < 2 && check === sum) || (sum >= 2 && check + sum === 11);
|
|
1001
1002
|
};
|
|
1003
|
+
HelperClass.nationalNumValid = function (code) {
|
|
1004
|
+
var l = code.length;
|
|
1005
|
+
if (l < 11 || parseInt(code, 10) === 0) {
|
|
1006
|
+
return false;
|
|
1007
|
+
}
|
|
1008
|
+
if (parseInt(code.substr(3, 6), 10) === 0) {
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
var c = parseInt(code.substr(10, 1), 10);
|
|
1012
|
+
var d = parseInt(code.substr(9, 1), 10) + 2;
|
|
1013
|
+
var z = [29, 27, 23, 19, 17];
|
|
1014
|
+
var s = 0;
|
|
1015
|
+
for (var i = 0; i < 10; i++) {
|
|
1016
|
+
s += (d + parseInt(code.substr(i, 1), 10)) * z[i % 5];
|
|
1017
|
+
}
|
|
1018
|
+
s = s % 11;
|
|
1019
|
+
if (s === 10) {
|
|
1020
|
+
s = 0;
|
|
1021
|
+
}
|
|
1022
|
+
return c === s;
|
|
1023
|
+
};
|
|
1002
1024
|
HelperClass.plaqueValid = function (p, t) {
|
|
1003
1025
|
if (t === exports.InputType.Plaque && !RegExp(/^[0-9]{2}_[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]_[0-9]{3}_[0-9]{2}$/).test(p)) {
|
|
1004
1026
|
return false;
|
|
@@ -2037,17 +2059,17 @@
|
|
|
2037
2059
|
this.placeholder = name;
|
|
2038
2060
|
this.icon = icon;
|
|
2039
2061
|
this.class = cls + ([exports.InputType.Mobile, exports.InputType.Phone, exports.InputType.Password, exports.InputType.Email, exports.InputType.Number, exports.InputType.Price,
|
|
2040
|
-
exports.InputType.NationalCode, exports.InputType.Sheba, exports.InputType.PostalCode, exports.InputType.Date, exports.InputType.Time, exports.InputType.BillNumber].includes(type) ? ' ltr' : '');
|
|
2062
|
+
exports.InputType.NationalCode, exports.InputType.NationalNum, exports.InputType.Sheba, exports.InputType.PostalCode, exports.InputType.Date, exports.InputType.Time, exports.InputType.BillNumber].includes(type) ? ' ltr' : '');
|
|
2041
2063
|
this.type = type;
|
|
2042
2064
|
this.value = value;
|
|
2043
2065
|
this.default = value == null ? null : (typeof value === 'number' || typeof value === 'string' ? _.cloneDeep(value) : HelperClass.clone(value));
|
|
2044
2066
|
this.baseRequired = required;
|
|
2045
2067
|
this.required = required;
|
|
2046
2068
|
this.inEditRequired = required;
|
|
2047
|
-
this.minLength = type === exports.InputType.Mobile || type === exports.InputType.Phone ? 11 :
|
|
2069
|
+
this.minLength = type === exports.InputType.Mobile || type === exports.InputType.Phone || type === exports.InputType.NationalNum ? 11 :
|
|
2048
2070
|
type === exports.InputType.NationalCode || type === exports.InputType.PostalCode ? 10 :
|
|
2049
2071
|
type === exports.InputType.Sheba ? 24 : minLength;
|
|
2050
|
-
this.maxLength = type === exports.InputType.Mobile || type === exports.InputType.Phone ? 11 :
|
|
2072
|
+
this.maxLength = type === exports.InputType.Mobile || type === exports.InputType.Phone || type === exports.InputType.NationalNum ? 11 :
|
|
2051
2073
|
type === exports.InputType.NationalCode || type === exports.InputType.PostalCode ? 10 :
|
|
2052
2074
|
type === exports.InputType.Sheba ? 24 : maxLength;
|
|
2053
2075
|
}
|
|
@@ -4054,7 +4076,7 @@
|
|
|
4054
4076
|
this.active = moment__namespace(v, 'YYYY/MM/DD').locale('fa');
|
|
4055
4077
|
}
|
|
4056
4078
|
else if (typeof v === 'string') {
|
|
4057
|
-
var d = parseInt(v.substring(6, v.length - 2), 10);
|
|
4079
|
+
var d = parseInt(v.substring(6, v.length - 2), 10) + (1 * 3600000);
|
|
4058
4080
|
this.active = moment__namespace(d).locale('fa');
|
|
4059
4081
|
}
|
|
4060
4082
|
else if (typeof v === 'number') {
|
|
@@ -4607,7 +4629,7 @@
|
|
|
4607
4629
|
FormComponent.decorators = [
|
|
4608
4630
|
{ type: core.Component, args: [{
|
|
4609
4631
|
selector: 'lib-form',
|
|
4610
|
-
template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form w-100 m-0' + (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 (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-select>\r\n <lib-form-date (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Date || inp.type == type.Month)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-date>\r\n <lib-form-time (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-time>\r\n <lib-form-datetime (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-datetime>\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-toggle (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Toggle\" [inp]=\"inp\"></lib-form-toggle>\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-ckeditor (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Ckeditor\" [inp]=\"inp\"></lib-form-ckeditor>\r\n <lib-form-uploader (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Uploader\" [inp]=\"inp\"></lib-form-uploader>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n </span>\r\n </div>\r\n</form>\r\n",
|
|
4632
|
+
template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form w-100 m-0' + (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.NationalNum || 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 (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-select>\r\n <lib-form-date (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Date || inp.type == type.Month)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-date>\r\n <lib-form-time (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-time>\r\n <lib-form-datetime (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-datetime>\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-toggle (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Toggle\" [inp]=\"inp\"></lib-form-toggle>\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-ckeditor (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Ckeditor\" [inp]=\"inp\"></lib-form-ckeditor>\r\n <lib-form-uploader (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Uploader\" [inp]=\"inp\"></lib-form-uploader>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n </span>\r\n </div>\r\n</form>\r\n",
|
|
4611
4633
|
styles: [".form{border-radius:var(--border-radius-base);padding:20px;position:relative}.form>.title{font-size:16px;font-weight:700;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-size:12px;font-weight:200;height:30px}.form .loading{background-color:#fff;border-radius:var(--border-radius-base);height:100%;right:0;top:0;z-index:104}.form .loading,.form .loading .text{position:absolute;text-align:center;width:100%}.form .loading .text{font-weight:700;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}"]
|
|
4612
4634
|
},] }
|
|
4613
4635
|
];
|
|
@@ -5548,7 +5570,8 @@
|
|
|
5548
5570
|
_this.inp.error = exports.InputError.Required;
|
|
5549
5571
|
return false;
|
|
5550
5572
|
}
|
|
5551
|
-
if (_this.inp.addNew && _this.inp.value == null && _this.inp.search != null && !_this.inp.search
|
|
5573
|
+
if (_this.inp.addNew && _this.inp.value == null && _this.inp.search != null && !(HelperClass.nationalCodeValid(_this.inp.search) || HelperClass.nationalNumValid(_this.inp.search)) &&
|
|
5574
|
+
/^\d+$/.test(_this.inp.search.replace(/-/g, '').replace(/\./g, ''))) {
|
|
5552
5575
|
_this.inp.error = exports.InputError.Invalid;
|
|
5553
5576
|
return false;
|
|
5554
5577
|
}
|
|
@@ -6236,6 +6259,10 @@
|
|
|
6236
6259
|
_this.inp.error = exports.InputError.Invalid;
|
|
6237
6260
|
return false;
|
|
6238
6261
|
}
|
|
6262
|
+
if (_this.inp.type === exports.InputType.NationalNum && !HelperClass.nationalNumValid(_this.inp.value)) {
|
|
6263
|
+
_this.inp.error = exports.InputError.Invalid;
|
|
6264
|
+
return false;
|
|
6265
|
+
}
|
|
6239
6266
|
if (_this.inp.type === exports.InputType.Sheba && !HelperClass.shebaValid(_this.inp.value)) {
|
|
6240
6267
|
_this.inp.error = exports.InputError.Invalid;
|
|
6241
6268
|
return false;
|