@mamrp/components 1.0.23 → 1.0.24
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/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2003,6 +2003,12 @@ function SearchLicensePlate({
|
|
|
2003
2003
|
}
|
|
2004
2004
|
}, [data]);
|
|
2005
2005
|
const handleInputChange = (enteredInput, inputName, maxlength, minLength) => {
|
|
2006
|
+
if (inputName !== "input2") {
|
|
2007
|
+
const englishInput = (0, import_utils2.convertToEnglishDigits)(enteredInput);
|
|
2008
|
+
if (!/^\d*$/.test(englishInput)) {
|
|
2009
|
+
return;
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2006
2012
|
const newInputValues = {
|
|
2007
2013
|
...inputValues,
|
|
2008
2014
|
[inputName]: enteredInput
|
|
@@ -2113,7 +2119,13 @@ function SearchLicensePlate({
|
|
|
2113
2119
|
cursor: readOnly || !!data && readOnly ? "" : "text"
|
|
2114
2120
|
},
|
|
2115
2121
|
value: (0, import_utils2.convertToPersianDigits)(inputValues.input1),
|
|
2116
|
-
onChange: (e) =>
|
|
2122
|
+
onChange: (e) => {
|
|
2123
|
+
const value = e.target.value;
|
|
2124
|
+
const englishValue = (0, import_utils2.convertToEnglishDigits)(value);
|
|
2125
|
+
if (/^\d*$/.test(englishValue)) {
|
|
2126
|
+
handleInputChange(value, "input1", 2);
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2117
2129
|
}
|
|
2118
2130
|
),
|
|
2119
2131
|
/* @__PURE__ */ import_react14.default.createElement(
|
|
@@ -2258,7 +2270,13 @@ function SearchLicensePlate({
|
|
|
2258
2270
|
cursor: readOnly || !!data && readOnly ? "" : "text"
|
|
2259
2271
|
},
|
|
2260
2272
|
value: (0, import_utils2.convertToPersianDigits)(inputValues.input3),
|
|
2261
|
-
onChange: (e) =>
|
|
2273
|
+
onChange: (e) => {
|
|
2274
|
+
const value = e.target.value;
|
|
2275
|
+
const englishValue = (0, import_utils2.convertToEnglishDigits)(value);
|
|
2276
|
+
if (/^\d*$/.test(englishValue)) {
|
|
2277
|
+
handleInputChange(value, "input3", 3);
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2262
2280
|
}
|
|
2263
2281
|
),
|
|
2264
2282
|
/* @__PURE__ */ import_react14.default.createElement(
|
|
@@ -2297,7 +2315,13 @@ function SearchLicensePlate({
|
|
|
2297
2315
|
cursor: readOnly || !!data && readOnly ? "" : "text"
|
|
2298
2316
|
},
|
|
2299
2317
|
value: (0, import_utils2.convertToPersianDigits)(inputValues.input4),
|
|
2300
|
-
onChange: (e) =>
|
|
2318
|
+
onChange: (e) => {
|
|
2319
|
+
const value = e.target.value;
|
|
2320
|
+
const englishValue = (0, import_utils2.convertToEnglishDigits)(value);
|
|
2321
|
+
if (/^\d*$/.test(englishValue)) {
|
|
2322
|
+
handleInputChange(value, "input4", 2);
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2301
2325
|
}
|
|
2302
2326
|
),
|
|
2303
2327
|
/* @__PURE__ */ import_react14.default.createElement(
|