build(deps): update package-lock.json, package.json and yarn.lock

master
mahdi 3 years ago
parent 443fb50be5
commit 8c523b1d3c
  1. 89
      package-lock.json
  2. 2
      package.json
  3. 71
      src/components/FormInput/Input.js
  4. 22
      src/components/FormInput/fixNumbers.js
  5. 16163
      yarn.lock

89
package-lock.json generated

@ -15,6 +15,7 @@
"@fortawesome/react-fontawesome": "^0.1.16",
"@heroicons/react": "^1.0.5",
"@mui/material": "^5.5.2",
"@react-leaflet/core": "^2.0.0",
"@reduxjs/toolkit": "^1.7.1",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
@ -29,12 +30,14 @@
"react-apexcharts": "^1.3.9",
"react-beautiful-dnd": "^13.1.0",
"react-dom": "17",
"react-hook-form": "^7.30.0",
"react-icons": "^4.3.1",
"react-indiana-drag-scroll": "^2.1.0",
"react-input-range": "^1.3.0",
"react-leaflet": "^3.2.5",
"react-leaflet-draw": "^0.19.8",
"react-multi-date-picker": "^3.3.0",
"react-qr-code": "^2.0.7",
"react-redux": "^7.2.6",
"react-scripts": "5.0.0",
"react-table": "^7.7.0",
@ -3342,6 +3345,16 @@
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@react-leaflet/core": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.0.0.tgz",
"integrity": "sha512-SQQ5DCQIaLzvslN6wCXs5OWqtlvk1Ubv2n5d7zTM8SDl9hM5Rr2wVy7/nOCIY958D75/ovhq6ZoSvT7GLCX6sg==",
"peerDependencies": {
"leaflet": "^1.8.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
}
},
"node_modules/@reduxjs/toolkit": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.7.1.tgz",
@ -11646,9 +11659,9 @@
}
},
"node_modules/leaflet": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.7.1.tgz",
"integrity": "sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw=="
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.8.0.tgz",
"integrity": "sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA=="
},
"node_modules/leaflet-draw": {
"version": "1.0.4",
@ -14005,6 +14018,11 @@
"teleport": ">=0.2.0"
}
},
"node_modules/qr.js": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/qr.js/-/qr.js-0.0.0.tgz",
"integrity": "sha1-ys6GOG9ZoNuAUPqQ2baw6IoeNk8="
},
"node_modules/qs": {
"version": "6.9.6",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
@ -14332,6 +14350,21 @@
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz",
"integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA=="
},
"node_modules/react-hook-form": {
"version": "7.30.0",
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.30.0.tgz",
"integrity": "sha512-DzjiM6o2vtDGNMB9I4yCqW8J21P314SboNG1O0obROkbg7KVS0I7bMtwSdKyapnCPjHgnxc3L7E5PEdISeEUcQ==",
"engines": {
"node": ">=12.22.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/react-hook-form"
},
"peerDependencies": {
"react": "^16.8.0 || ^17 || ^18"
}
},
"node_modules/react-icons": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.3.1.tgz",
@ -14438,6 +14471,24 @@
"react-dom": ">=16.8.0"
}
},
"node_modules/react-qr-code": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/react-qr-code/-/react-qr-code-2.0.7.tgz",
"integrity": "sha512-NpknL80p7dWbLdHfBSIxQIqLCu3+kBlyzYD692rO0UnVwfCSziIxc1xn/p3JhPEv1RV1lRD8j0w+hR3L7tawTQ==",
"dependencies": {
"prop-types": "^15.7.2",
"qr.js": "0.0.0"
},
"peerDependencies": {
"react": "^16.x || ^17.x || ^18.x",
"react-native-svg": "*"
},
"peerDependenciesMeta": {
"react-native-svg": {
"optional": true
}
}
},
"node_modules/react-redux": {
"version": "7.2.6",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.6.tgz",
@ -19954,6 +20005,12 @@
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.4.tgz",
"integrity": "sha512-q/ytXxO5NKvyT37pmisQAItCFqA7FD/vNb8dgaJy3/630Fsc+Mz9/9f2SziBoIZ30TJooXyTwZmhi1zjXmObYg=="
},
"@react-leaflet/core": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.0.0.tgz",
"integrity": "sha512-SQQ5DCQIaLzvslN6wCXs5OWqtlvk1Ubv2n5d7zTM8SDl9hM5Rr2wVy7/nOCIY958D75/ovhq6ZoSvT7GLCX6sg==",
"requires": {}
},
"@reduxjs/toolkit": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.7.1.tgz",
@ -26097,9 +26154,9 @@
}
},
"leaflet": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.7.1.tgz",
"integrity": "sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw=="
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.8.0.tgz",
"integrity": "sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA=="
},
"leaflet-draw": {
"version": "1.0.4",
@ -27658,6 +27715,11 @@
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
},
"qr.js": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/qr.js/-/qr.js-0.0.0.tgz",
"integrity": "sha1-ys6GOG9ZoNuAUPqQ2baw6IoeNk8="
},
"qs": {
"version": "6.9.6",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
@ -27894,6 +27956,12 @@
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz",
"integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA=="
},
"react-hook-form": {
"version": "7.30.0",
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.30.0.tgz",
"integrity": "sha512-DzjiM6o2vtDGNMB9I4yCqW8J21P314SboNG1O0obROkbg7KVS0I7bMtwSdKyapnCPjHgnxc3L7E5PEdISeEUcQ==",
"requires": {}
},
"react-icons": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.3.1.tgz",
@ -27970,6 +28038,15 @@
"react-element-popper": "^2.1.6"
}
},
"react-qr-code": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/react-qr-code/-/react-qr-code-2.0.7.tgz",
"integrity": "sha512-NpknL80p7dWbLdHfBSIxQIqLCu3+kBlyzYD692rO0UnVwfCSziIxc1xn/p3JhPEv1RV1lRD8j0w+hR3L7tawTQ==",
"requires": {
"prop-types": "^15.7.2",
"qr.js": "0.0.0"
}
},
"react-redux": {
"version": "7.2.6",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.6.tgz",

@ -10,6 +10,7 @@
"@fortawesome/react-fontawesome": "^0.1.16",
"@heroicons/react": "^1.0.5",
"@mui/material": "^5.5.2",
"@react-leaflet/core": "^2.0.0",
"@reduxjs/toolkit": "^1.7.1",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
@ -24,6 +25,7 @@
"react-apexcharts": "^1.3.9",
"react-beautiful-dnd": "^13.1.0",
"react-dom": "17",
"react-hook-form": "^7.30.0",
"react-icons": "^4.3.1",
"react-indiana-drag-scroll": "^2.1.0",
"react-input-range": "^1.3.0",

@ -0,0 +1,71 @@
import React from "react";
import { useState } from "react";
import fixNumbers from "./fixNumbers";
const Inputs = ({
defaultValue,
set,
label,
className,
type,
maxLength,
max,
min,
register,
}) => {
const [value, setValue] = useState(defaultValue);
return (
<div
className={
"h-full rounded border border-color7 mx-1 relative flex items-center flex-row-reverse bg-color2_5" +
className +
(value ? " border-blue-500 bg-white border rounded" : " bg-transparent")
}
>
<div
className={
" text-sm absolute transition-all duration-300 pointer-events-none px-3 PY-2 text-left transform translate-x-[-10px] " +
(value
? `text-blue-500 bg-white top-[-10px]`
: "text-color19 top-[20px]")
}
>
{label}
</div>
{type !== "textarea" ? (
<input
{...register}
maxLength={maxLength}
value={value}
type={"text"}
className={"rtl w-full h-full px-4 outline-0 "}
onChange={(e) => setValue(e.target.value)}
inputMode={type === "number" ? "numeric" : ""}
onInput={(e) => {
let value = e.target.value;
if (type === "number")
value = fixNumbers(value).replace(/[^\d.-]/g, "");
if (maxLength && value.length > maxLength)
value = value.slice(0, maxLength);
if (!isNaN(max) && +e.target.value > max) value = max;
if (!isNaN(min) && +e.target.value < min) value = min;
e.target.value = value;
}}
/>
) : (
<textarea
{...register}
className={"rtl w-full h-full p-4 outline-0 resize-none"}
onChange={(e) => setValue(e.target.value)}
>
{value}
</textarea>
)}
</div>
);
};
export default Inputs;

@ -0,0 +1,22 @@
const persianNumbers = [
/۰/g,
/۱/g,
/۲/g,
/۳/g,
/۴/g,
/۵/g,
/۶/g,
/۷/g,
/۸/g,
/۹/g,
],
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
fixNumbers = function (str) {
if (typeof str === "string") {
for (var i = 0; i < 10; i++) {
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
}
}
return str;
};
export default fixNumbers;

16163
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save