diff --git a/.env b/.env
index 2731127..b5ec710 100644
--- a/.env
+++ b/.env
@@ -1 +1,6 @@
-VITE_GOOGLE_CLIENT_ID=https://272098283932-bft2gvlgjn8edopg0lnqjq1i9ekdmipt.apps.googleusercontent.com/
\ No newline at end of file
+VITE_GOOGLE_CLIENT_ID=https://272098283932-bft2gvlgjn8edopg0lnqjq1i9ekdmipt.apps.googleusercontent.com/
+VITE_DEFUALT_AUTH_RETURN_URL=/setting/profile
+VITE_API_URL=https://accounts.business-harmony.com/api/
+VITE_IDENTITY_URL=https://accounts.business-harmony.com/connect/token
+VITE_IDENTITY_CLIENT_ID=harmony_identity
+VITE_IDENTITY_SCOPE=openid profile offline_access harmony_identity
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 5f3efba..895fb99 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -83,9 +83,9 @@
}
},
"node_modules/@babel/compat-data": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz",
- "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==",
+ "version": "7.27.7",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.7.tgz",
+ "integrity": "sha512-xgu/ySj2mTiUFmdE9yCMfBxLp4DHd5DwmbbD05YAuICfodYT3VvRxbrh81LGQ/8UpSdtMdfKMn3KouYDX59DGQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -123,23 +123,6 @@
"url": "https://opencollective.com/babel"
}
},
- "node_modules/@babel/core/node_modules/convert-source-map": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
- "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@babel/core/node_modules/semver": {
- "version": "6.3.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
- "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
"node_modules/@babel/generator": {
"version": "7.28.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz",
@@ -173,25 +156,6 @@
"node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
- "version": "6.3.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
- "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/@babel/helper-globals": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
- "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
"node_modules/@babel/helper-module-imports": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz",
@@ -269,7 +233,7 @@
"license": "MIT",
"dependencies": {
"@babel/template": "^7.27.2",
- "@babel/types": "^7.28.2"
+ "@babel/types": "^7.27.6"
},
"engines": {
"node": ">=6.9.0"
@@ -363,10 +327,19 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@babel/traverse/node_modules/globals": {
+ "version": "11.12.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/@babel/types": {
- "version": "7.28.2",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz",
- "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==",
+ "version": "7.27.7",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.7.tgz",
+ "integrity": "sha512-8OLQgDScAOHXnAz2cV+RfzzNMipuLVBz2biuAJFMV9bfkNf393je3VM8CLkjQodW5+iWsSJdSgSWT6rsZoXHPw==",
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.27.1",
@@ -418,6 +391,12 @@
"stylis": "4.2.0"
}
},
+ "node_modules/@emotion/babel-plugin/node_modules/convert-source-map": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
+ "license": "MIT"
+ },
"node_modules/@emotion/babel-plugin/node_modules/stylis": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",
@@ -1018,6 +997,19 @@
"eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
}
},
+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
"node_modules/@eslint-community/regexpp": {
"version": "4.12.1",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz",
@@ -1043,34 +1035,10 @@
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
- "node_modules/@eslint/config-array/node_modules/brace-expansion": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
- "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/@eslint/config-array/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
"node_modules/@eslint/config-helpers": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz",
- "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==",
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz",
+ "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -1078,9 +1046,9 @@
}
},
"node_modules/@eslint/core": {
- "version": "0.15.2",
- "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz",
- "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==",
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz",
+ "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -1114,34 +1082,6 @@
"url": "https://opencollective.com/eslint"
}
},
- "node_modules/@eslint/eslintrc/node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
- "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
"node_modules/@eslint/eslintrc/node_modules/globals": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
@@ -1155,40 +1095,10 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@eslint/eslintrc/node_modules/ignore": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
- "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@eslint/eslintrc/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
"node_modules/@eslint/js": {
- "version": "9.33.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.33.0.tgz",
- "integrity": "sha512-5K1/mKhWaMfreBGJTwval43JJmkip0RmM+3+IuqupeSKNC/Th2Kc7ucaq5ovTSra/OOKB9c58CGSz3QMVbWt0A==",
+ "version": "9.30.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.0.tgz",
+ "integrity": "sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1209,19 +1119,32 @@
}
},
"node_modules/@eslint/plugin-kit": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz",
- "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.3.tgz",
+ "integrity": "sha512-1+WqvgNMhmlAambTvT3KPtCl/Ibr68VldY2XY40SL1CE0ZXiakFR/cbTspaF5HsnpDMvcYYoJHfl4980NBjGag==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@eslint/core": "^0.15.2",
+ "@eslint/core": "^0.15.1",
"levn": "^0.4.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
+ "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": {
+ "version": "0.15.1",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz",
+ "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/json-schema": "^7.0.15"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
"node_modules/@fast-csv/format": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz",
@@ -1374,9 +1297,9 @@
}
},
"node_modules/@mui/core-downloads-tracker": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-7.3.1.tgz",
- "integrity": "sha512-+mIK1Z0BhOaQ0vCgOkT1mSrIpEHLo338h4/duuL4TBLXPvUMit732mnwJY3W40Avy30HdeSfwUAAGRkKmwRaEQ==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-7.2.0.tgz",
+ "integrity": "sha512-d49s7kEgI5iX40xb2YPazANvo7Bx0BLg/MNRwv+7BVpZUzXj1DaVCKlQTDex3gy/0jsCb4w7AY2uH4t4AJvSog==",
"license": "MIT",
"funding": {
"type": "opencollective",
@@ -1384,22 +1307,22 @@
}
},
"node_modules/@mui/material": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@mui/material/-/material-7.3.1.tgz",
- "integrity": "sha512-Xf6Shbo03YmcBedZMwSpEFOwpYDtU7tC+rhAHTrA9FHk0FpsDqiQ9jUa1j/9s3HLs7KWb5mDcGnlwdh9Q9KAag==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@mui/material/-/material-7.2.0.tgz",
+ "integrity": "sha512-NTuyFNen5Z2QY+I242MDZzXnFIVIR6ERxo7vntFi9K1wCgSwvIl0HcAO2OOydKqqKApE6omRiYhpny1ZhGuH7Q==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.28.2",
- "@mui/core-downloads-tracker": "^7.3.1",
- "@mui/system": "^7.3.1",
- "@mui/types": "^7.4.5",
- "@mui/utils": "^7.3.1",
+ "@babel/runtime": "^7.27.6",
+ "@mui/core-downloads-tracker": "^7.2.0",
+ "@mui/system": "^7.2.0",
+ "@mui/types": "^7.4.4",
+ "@mui/utils": "^7.2.0",
"@popperjs/core": "^2.11.8",
"@types/react-transition-group": "^4.4.12",
"clsx": "^2.1.1",
"csstype": "^3.1.3",
"prop-types": "^15.8.1",
- "react-is": "^19.1.1",
+ "react-is": "^19.1.0",
"react-transition-group": "^4.4.5"
},
"engines": {
@@ -1412,7 +1335,7 @@
"peerDependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
- "@mui/material-pigment-css": "^7.3.1",
+ "@mui/material-pigment-css": "^7.2.0",
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -1433,13 +1356,13 @@
}
},
"node_modules/@mui/private-theming": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-7.3.1.tgz",
- "integrity": "sha512-WU3YLkKXii/x8ZEKnrLKsPwplCVE11yZxUvlaaZSIzCcI3x2OdFC8eMlNy74hVeUsYQvzzX1Es/k4ARPlFvpPQ==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-7.2.0.tgz",
+ "integrity": "sha512-y6N1Yt3T5RMxVFnCh6+zeSWBuQdNDm5/UlM0EAYZzZR/1u+XKJWYQmbpx4e+F+1EpkYi3Nk8KhPiQDi83M3zIw==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.28.2",
- "@mui/utils": "^7.3.1",
+ "@babel/runtime": "^7.27.6",
+ "@mui/utils": "^7.2.0",
"prop-types": "^15.8.1"
},
"engines": {
@@ -1460,12 +1383,12 @@
}
},
"node_modules/@mui/styled-engine": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-7.3.1.tgz",
- "integrity": "sha512-Nqo6OHjvJpXJ1+9TekTE//+8RybgPQUKwns2Lh0sq+8rJOUSUKS3KALv4InSOdHhIM9Mdi8/L7LTF1/Ky6D6TQ==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-7.2.0.tgz",
+ "integrity": "sha512-yq08xynbrNYcB1nBcW9Fn8/h/iniM3ewRguGJXPIAbHvxEF7Pz95kbEEOAAhwzxMX4okhzvHmk0DFuC5ayvgIQ==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.28.2",
+ "@babel/runtime": "^7.27.6",
"@emotion/cache": "^11.14.0",
"@emotion/serialize": "^1.3.3",
"@emotion/sheet": "^1.4.0",
@@ -1494,12 +1417,12 @@
}
},
"node_modules/@mui/stylis-plugin-rtl": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@mui/stylis-plugin-rtl/-/stylis-plugin-rtl-7.3.1.tgz",
- "integrity": "sha512-CN3d+TOMhDGSTe5YTrHSkuSfaj2DO1Jo4C1gqBDWARuI1iZMer6HXWHP86m17OdIIUSjHb0Mma9OZncb86gMwQ==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@mui/stylis-plugin-rtl/-/stylis-plugin-rtl-7.2.0.tgz",
+ "integrity": "sha512-x+9UMuAuB82dbzxxFeCoZEZaLzdBVOSlkSEhFu8iJgsEmwJXJ9l09NsiONw8sJlp7J5etpGEiafDz0XSM/C/Fw==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.28.2",
+ "@babel/runtime": "^7.27.6",
"cssjanus": "^2.3.0"
},
"engines": {
@@ -1514,16 +1437,16 @@
}
},
"node_modules/@mui/system": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@mui/system/-/system-7.3.1.tgz",
- "integrity": "sha512-mIidecvcNVpNJMdPDmCeoSL5zshKBbYPcphjuh6ZMjhybhqhZ4mX6k9zmIWh6XOXcqRQMg5KrcjnO0QstrNj3w==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@mui/system/-/system-7.2.0.tgz",
+ "integrity": "sha512-PG7cm/WluU6RAs+gNND2R9vDwNh+ERWxPkqTaiXQJGIFAyJ+VxhyKfzpdZNk0z0XdmBxxi9KhFOpgxjehf/O0A==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.28.2",
- "@mui/private-theming": "^7.3.1",
- "@mui/styled-engine": "^7.3.1",
- "@mui/types": "^7.4.5",
- "@mui/utils": "^7.3.1",
+ "@babel/runtime": "^7.27.6",
+ "@mui/private-theming": "^7.2.0",
+ "@mui/styled-engine": "^7.2.0",
+ "@mui/types": "^7.4.4",
+ "@mui/utils": "^7.2.0",
"clsx": "^2.1.1",
"csstype": "^3.1.3",
"prop-types": "^15.8.1"
@@ -1554,12 +1477,12 @@
}
},
"node_modules/@mui/types": {
- "version": "7.4.5",
- "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.4.5.tgz",
- "integrity": "sha512-ZPwlAOE3e8C0piCKbaabwrqZbW4QvWz0uapVPWya7fYj6PeDkl5sSJmomT7wjOcZGPB48G/a6Ubidqreptxz4g==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.4.4.tgz",
+ "integrity": "sha512-p63yhbX52MO/ajXC7hDHJA5yjzJekvWD3q4YDLl1rSg+OXLczMYPvTuSuviPRCgRX8+E42RXz1D/dz9SxPSlWg==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.28.2"
+ "@babel/runtime": "^7.27.6"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -1571,17 +1494,17 @@
}
},
"node_modules/@mui/utils": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.3.1.tgz",
- "integrity": "sha512-/31y4wZqVWa0jzMnzo6JPjxwP6xXy4P3+iLbosFg/mJQowL1KIou0LC+lquWW60FKVbKz5ZUWBg2H3jausa0pw==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.2.0.tgz",
+ "integrity": "sha512-O0i1GQL6MDzhKdy9iAu5Yr0Sz1wZjROH1o3aoztuivdCXqEeQYnEjTDiRLGuFxI9zrUbTHBwobMyQH5sNtyacw==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.28.2",
- "@mui/types": "^7.4.5",
+ "@babel/runtime": "^7.27.6",
+ "@mui/types": "^7.4.4",
"@types/prop-types": "^15.7.15",
"clsx": "^2.1.1",
"prop-types": "^15.8.1",
- "react-is": "^19.1.1"
+ "react-is": "^19.1.0"
},
"engines": {
"node": ">=14.0.0"
@@ -1895,9 +1818,9 @@
}
},
"node_modules/@pkgr/core": {
- "version": "0.2.9",
- "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz",
- "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==",
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.7.tgz",
+ "integrity": "sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1933,44 +1856,16 @@
}
},
"node_modules/@rolldown/pluginutils": {
- "version": "1.0.0-beta.27",
- "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
- "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==",
+ "version": "1.0.0-beta.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.19.tgz",
+ "integrity": "sha512-3FL3mnMbPu0muGOCaKAhhFEYmqv9eTfPSJRJmANrCwtgK8VuxpsZDGK+m0LYAGoyO8+0j5uRe4PeyPDK1yA/hA==",
"dev": true,
"license": "MIT"
},
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz",
- "integrity": "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.2.tgz",
- "integrity": "sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.2.tgz",
- "integrity": "sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ==",
+ "version": "4.44.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.1.tgz",
+ "integrity": "sha512-fM/xPesi7g2M7chk37LOnmnSTHLG/v2ggWqKj3CCA1rMA4mm5KVBT1fNoswbo1JhPuNNZrVwpTvlCVggv8A2zg==",
"cpu": [
"arm64"
],
@@ -1981,244 +1876,6 @@
"darwin"
]
},
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.2.tgz",
- "integrity": "sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.2.tgz",
- "integrity": "sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.2.tgz",
- "integrity": "sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.2.tgz",
- "integrity": "sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.2.tgz",
- "integrity": "sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.2.tgz",
- "integrity": "sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.2.tgz",
- "integrity": "sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.2.tgz",
- "integrity": "sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-ppc64-gnu": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.2.tgz",
- "integrity": "sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.2.tgz",
- "integrity": "sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.2.tgz",
- "integrity": "sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.2.tgz",
- "integrity": "sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.2.tgz",
- "integrity": "sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.2.tgz",
- "integrity": "sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.2.tgz",
- "integrity": "sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.2.tgz",
- "integrity": "sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.2.tgz",
- "integrity": "sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
"node_modules/@types/babel__core": {
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
@@ -2255,13 +1912,13 @@
}
},
"node_modules/@types/babel__traverse": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",
- "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz",
+ "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.28.2"
+ "@babel/types": "^7.20.7"
}
},
"node_modules/@types/estree": {
@@ -2291,7 +1948,7 @@
"dev": true,
"license": "MIT",
"dependencies": {
- "undici-types": "~7.10.0"
+ "undici-types": "~7.8.0"
}
},
"node_modules/@types/parse-json": {
@@ -2316,9 +1973,9 @@
}
},
"node_modules/@types/react-dom": {
- "version": "19.1.7",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.7.tgz",
- "integrity": "sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw==",
+ "version": "19.1.6",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.6.tgz",
+ "integrity": "sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -2368,7 +2025,17 @@
"peerDependencies": {
"@typescript-eslint/parser": "^8.39.1",
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
+ "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
}
},
"node_modules/@typescript-eslint/parser": {
@@ -2393,7 +2060,7 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/@typescript-eslint/project-service": {
@@ -2415,7 +2082,7 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/@typescript-eslint/scope-manager": {
@@ -2450,7 +2117,7 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/@typescript-eslint/type-utils": {
@@ -2475,7 +2142,7 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/@typescript-eslint/types": {
@@ -2518,7 +2185,46 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
+ "version": "7.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
}
},
"node_modules/@typescript-eslint/utils": {
@@ -2542,7 +2248,7 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/@typescript-eslint/visitor-keys": {
@@ -2563,30 +2269,17 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
- "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
"node_modules/@vitejs/plugin-react": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",
- "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==",
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.6.0.tgz",
+ "integrity": "sha512-5Kgff+m8e2PB+9j51eGHEpn5kUzRKH2Ry0qGoe8ItJg7pqnkPrYPkDQZGgGmTa0EGarHrkjLvOdU3b1fzI8otQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/core": "^7.28.0",
+ "@babel/core": "^7.27.4",
"@babel/plugin-transform-react-jsx-self": "^7.27.1",
"@babel/plugin-transform-react-jsx-source": "^7.27.1",
- "@rolldown/pluginutils": "1.0.0-beta.27",
+ "@rolldown/pluginutils": "1.0.0-beta.19",
"@types/babel__core": "^7.20.5",
"react-refresh": "^0.17.0"
},
@@ -2594,7 +2287,7 @@
"node": "^14.18.0 || >=16.0.0"
},
"peerDependencies": {
- "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0"
}
},
"node_modules/acorn": {
@@ -2621,15 +2314,16 @@
}
},
"node_modules/ajv": {
- "version": "8.17.1",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
- "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
"license": "MIT",
"dependencies": {
- "fast-deep-equal": "^3.1.3",
- "fast-uri": "^3.0.1",
- "json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2"
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
},
"funding": {
"type": "github",
@@ -2653,6 +2347,30 @@
}
}
},
+ "node_modules/ajv-formats/node_modules/ajv": {
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
+ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-formats/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
@@ -2757,6 +2475,12 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "license": "MIT"
+ },
"node_modules/atomically": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/atomically/-/atomically-2.0.3.tgz",
@@ -2858,12 +2582,13 @@
"license": "MIT"
},
"node_modules/brace-expansion": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"license": "MIT",
"dependencies": {
- "balanced-match": "^1.0.0"
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
}
},
"node_modules/braces": {
@@ -2880,9 +2605,9 @@
}
},
"node_modules/browserslist": {
- "version": "4.25.2",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz",
- "integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==",
+ "version": "4.25.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz",
+ "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==",
"dev": true,
"funding": [
{
@@ -2900,8 +2625,8 @@
],
"license": "MIT",
"dependencies": {
- "caniuse-lite": "^1.0.30001733",
- "electron-to-chromium": "^1.5.199",
+ "caniuse-lite": "^1.0.30001726",
+ "electron-to-chromium": "^1.5.173",
"node-releases": "^2.0.19",
"update-browserslist-db": "^1.1.3"
},
@@ -3133,10 +2858,48 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/conf/node_modules/ajv": {
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
+ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/conf/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/conf/node_modules/semver": {
+ "version": "7.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
+ "license": "ISC",
+ "peer": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/convert-source-map": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
- "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "dev": true,
"license": "MIT"
},
"node_modules/cookie": {
@@ -3538,20 +3301,20 @@
}
},
"node_modules/eslint": {
- "version": "9.33.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.33.0.tgz",
- "integrity": "sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA==",
+ "version": "9.30.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.30.0.tgz",
+ "integrity": "sha512-iN/SiPxmQu6EVkf+m1qpBxzUhE12YqFLOSySuOyVLJLEF9nzTf+h/1AJYc1JWzCnktggeNrjvQGLngDzXirU6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.21.0",
- "@eslint/config-helpers": "^0.3.1",
- "@eslint/core": "^0.15.2",
+ "@eslint/config-helpers": "^0.3.0",
+ "@eslint/core": "^0.14.0",
"@eslint/eslintrc": "^3.3.1",
- "@eslint/js": "9.33.0",
- "@eslint/plugin-kit": "^0.3.5",
+ "@eslint/js": "9.30.0",
+ "@eslint/plugin-kit": "^0.3.1",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
"@humanwhocodes/retry": "^0.4.2",
@@ -3599,9 +3362,9 @@
}
},
"node_modules/eslint-config-prettier": {
- "version": "10.1.8",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz",
- "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
+ "version": "10.1.5",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz",
+ "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==",
"dev": true,
"license": "MIT",
"bin": {
@@ -3615,9 +3378,9 @@
}
},
"node_modules/eslint-plugin-prettier": {
- "version": "5.5.4",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz",
- "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==",
+ "version": "5.5.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.1.tgz",
+ "integrity": "sha512-dobTkHT6XaEVOo8IO90Q4DOSxnm3Y151QxPJlM/vKC0bVy+d6cVWQZLlFiuZPP0wS6vZwSKeJgKkcS+KfMBlRw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3686,47 +3449,6 @@
}
},
"node_modules/eslint-visitor-keys": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
- "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint/node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/eslint/node_modules/brace-expansion": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
- "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/eslint/node_modules/eslint-visitor-keys": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
@@ -3739,36 +3461,6 @@
"url": "https://opencollective.com/eslint"
}
},
- "node_modules/eslint/node_modules/ignore": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
- "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/eslint/node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/eslint/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
"node_modules/espree": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
@@ -3787,19 +3479,6 @@
"url": "https://opencollective.com/eslint"
}
},
- "node_modules/espree/node_modules/eslint-visitor-keys": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
- "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
"node_modules/esquery": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
@@ -4224,9 +3903,9 @@
}
},
"node_modules/globals": {
- "version": "16.3.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz",
- "integrity": "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==",
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz",
+ "integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4416,9 +4095,9 @@
"license": "BSD-3-Clause"
},
"node_modules/ignore": {
- "version": "7.0.5",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
- "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4958,19 +4637,15 @@
}
},
"node_modules/minimatch": {
- "version": "9.0.5",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
- "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
- "dev": true,
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"license": "ISC",
"dependencies": {
- "brace-expansion": "^2.0.1"
+ "brace-expansion": "^1.1.7"
},
"engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
+ "node": "*"
}
},
"node_modules/minimist": {
@@ -5364,9 +5039,9 @@
"license": "MIT"
},
"node_modules/react": {
- "version": "19.1.1",
- "resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz",
- "integrity": "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==",
+ "version": "19.1.0",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
+ "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -5385,21 +5060,21 @@
}
},
"node_modules/react-dom": {
- "version": "19.1.1",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz",
- "integrity": "sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==",
+ "version": "19.1.0",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
+ "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
"license": "MIT",
"dependencies": {
"scheduler": "^0.26.0"
},
"peerDependencies": {
- "react": "^19.1.1"
+ "react": "^19.1.0"
}
},
"node_modules/react-i18next": {
- "version": "15.6.1",
- "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.6.1.tgz",
- "integrity": "sha512-uGrzSsOUUe2sDBG/+FJq2J1MM+Y4368/QW8OLEKSFvnDflHBbZhSd1u3UkW0Z06rMhZmnB/AQrhCpYfE5/5XNg==",
+ "version": "15.6.0",
+ "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.6.0.tgz",
+ "integrity": "sha512-W135dB0rDfiFmbMipC17nOhGdttO5mzH8BivY+2ybsQBbXvxWIwl3cmeH3T9d+YPBSJu/ouyJKFJTtkK7rJofw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.27.6",
@@ -5423,9 +5098,9 @@
}
},
"node_modules/react-is": {
- "version": "19.1.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.1.1.tgz",
- "integrity": "sha512-tr41fA15Vn8p4X9ntI+yCyeGSf1TlYaY5vlTZfQmeLBrFo3psOPX6HhTDnFNL9uj3EhP0KAQ80cugCl4b4BERA==",
+ "version": "19.1.0",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.1.0.tgz",
+ "integrity": "sha512-Oe56aUPnkHyyDxxkvqtd7KkdQP5uIUfHxd5XTb3wE9d/kRnZLmKbDB0GWk919tdQ+mxxPtG6EAs6RMT6i1qtHg==",
"license": "MIT"
},
"node_modules/react-refresh": {
@@ -5515,6 +5190,16 @@
"minimatch": "^5.1.0"
}
},
+ "node_modules/readdir-glob/node_modules/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
"node_modules/readdir-glob/node_modules/minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
@@ -5596,9 +5281,9 @@
}
},
"node_modules/rollup": {
- "version": "4.46.2",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.2.tgz",
- "integrity": "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==",
+ "version": "4.44.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.1.tgz",
+ "integrity": "sha512-x8H8aPvD+xbl0Do8oez5f5o8eMS3trfCghc4HhLAnCkj7Vl0d1JWGs0UF/D886zLW2rOj2QymV/JcSSsw+XDNg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -5612,26 +5297,26 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.46.2",
- "@rollup/rollup-android-arm64": "4.46.2",
- "@rollup/rollup-darwin-arm64": "4.46.2",
- "@rollup/rollup-darwin-x64": "4.46.2",
- "@rollup/rollup-freebsd-arm64": "4.46.2",
- "@rollup/rollup-freebsd-x64": "4.46.2",
- "@rollup/rollup-linux-arm-gnueabihf": "4.46.2",
- "@rollup/rollup-linux-arm-musleabihf": "4.46.2",
- "@rollup/rollup-linux-arm64-gnu": "4.46.2",
- "@rollup/rollup-linux-arm64-musl": "4.46.2",
- "@rollup/rollup-linux-loongarch64-gnu": "4.46.2",
- "@rollup/rollup-linux-ppc64-gnu": "4.46.2",
- "@rollup/rollup-linux-riscv64-gnu": "4.46.2",
- "@rollup/rollup-linux-riscv64-musl": "4.46.2",
- "@rollup/rollup-linux-s390x-gnu": "4.46.2",
- "@rollup/rollup-linux-x64-gnu": "4.46.2",
- "@rollup/rollup-linux-x64-musl": "4.46.2",
- "@rollup/rollup-win32-arm64-msvc": "4.46.2",
- "@rollup/rollup-win32-ia32-msvc": "4.46.2",
- "@rollup/rollup-win32-x64-msvc": "4.46.2",
+ "@rollup/rollup-android-arm-eabi": "4.44.1",
+ "@rollup/rollup-android-arm64": "4.44.1",
+ "@rollup/rollup-darwin-arm64": "4.44.1",
+ "@rollup/rollup-darwin-x64": "4.44.1",
+ "@rollup/rollup-freebsd-arm64": "4.44.1",
+ "@rollup/rollup-freebsd-x64": "4.44.1",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.44.1",
+ "@rollup/rollup-linux-arm-musleabihf": "4.44.1",
+ "@rollup/rollup-linux-arm64-gnu": "4.44.1",
+ "@rollup/rollup-linux-arm64-musl": "4.44.1",
+ "@rollup/rollup-linux-loongarch64-gnu": "4.44.1",
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.44.1",
+ "@rollup/rollup-linux-riscv64-gnu": "4.44.1",
+ "@rollup/rollup-linux-riscv64-musl": "4.44.1",
+ "@rollup/rollup-linux-s390x-gnu": "4.44.1",
+ "@rollup/rollup-linux-x64-gnu": "4.44.1",
+ "@rollup/rollup-linux-x64-musl": "4.44.1",
+ "@rollup/rollup-win32-arm64-msvc": "4.44.1",
+ "@rollup/rollup-win32-ia32-msvc": "4.44.1",
+ "@rollup/rollup-win32-x64-msvc": "4.44.1",
"fsevents": "~2.3.2"
}
},
@@ -5698,15 +5383,13 @@
"license": "MIT"
},
"node_modules/semver": {
- "version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
}
},
"node_modules/set-cookie-parser": {
@@ -5834,13 +5517,13 @@
}
},
"node_modules/synckit": {
- "version": "0.11.11",
- "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz",
- "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==",
+ "version": "0.11.8",
+ "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.8.tgz",
+ "integrity": "sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@pkgr/core": "^0.2.9"
+ "@pkgr/core": "^0.2.4"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
@@ -5901,9 +5584,9 @@
}
},
"node_modules/tinyglobby/node_modules/picomatch": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6029,13 +5712,13 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <6.0.0"
+ "typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/undici-types": {
- "version": "7.10.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
- "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
+ "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
"dev": true,
"license": "MIT"
},
@@ -6161,9 +5844,9 @@
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.4.6",
- "picomatch": "^4.0.3",
+ "picomatch": "^4.0.2",
"postcss": "^8.5.6",
- "rollup": "^4.43.0",
+ "rollup": "^4.40.0",
"tinyglobby": "^0.2.14"
},
"bin": {
@@ -6246,9 +5929,9 @@
}
},
"node_modules/vite/node_modules/picomatch": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6335,9 +6018,9 @@
"license": "ISC"
},
"node_modules/yaml": {
- "version": "2.8.1",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
- "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz",
+ "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==",
"dev": true,
"license": "ISC",
"optional": true,
diff --git a/public/locales/en/authentication.json b/public/locales/en/authentication.json
index 6633ea7..9faa2fc 100644
--- a/public/locales/en/authentication.json
+++ b/public/locales/en/authentication.json
@@ -7,7 +7,8 @@
"loginWithGoogle": "Login with google",
"emailIsInvalid": "Email is invalid",
"phoneNumberIsInvalid": "Phone number is invalid",
- "thisFieldIsRequired": "This field is requried"
+ "thisFieldIsRequired": "This field is requried",
+ "googleAuthenticationFailed": "Login with google failed"
},
"verify": {
"verify": "Verify",
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index 72b36d8..5196be8 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -246,5 +246,9 @@
"yemen": "Yemen",
"zambia": "Zambia",
"zimbabwe": "Zimbabwe"
+ },
+ "messages": {
+ "noResualtFound": "No result found.",
+ "serverError": "Internal server error"
}
}
diff --git a/public/locales/fa/authentication.json b/public/locales/fa/authentication.json
index bfb8610..f688171 100644
--- a/public/locales/fa/authentication.json
+++ b/public/locales/fa/authentication.json
@@ -7,7 +7,8 @@
"loginWithGoogle": "ورود با گوگل",
"emailIsInvalid": "ایمیل وارد شده نامعتبر میباشد",
"phoneNumberIsInvalid": "شماره وارد شده نامعتبر میباشد",
- "thisFieldIsRequired": "این فیلد الزامی است"
+ "thisFieldIsRequired": "این فیلد الزامی است",
+ "googleAuthenticationFailed": "ورود با گوگل با خطا مواجه شد"
},
"verify": {
"verify": "اعتبارسنجی",
diff --git a/public/locales/fa/common.json b/public/locales/fa/common.json
index 60424fb..878b22d 100644
--- a/public/locales/fa/common.json
+++ b/public/locales/fa/common.json
@@ -185,7 +185,8 @@
"zimbabwe": "زیمبابوه"
},
"messages": {
- "noResualtFound": "نتیجه ای یافت نشد."
+ "noResualtFound": "نتیجه ای یافت نشد.",
+ "serverError": "خطای سمت سرور"
},
"side": {
"account": "حساب کاربری",
diff --git a/src/components/ProtectedRoute.tsx b/src/components/ProtectedRoute.tsx
new file mode 100644
index 0000000..d2014c9
--- /dev/null
+++ b/src/components/ProtectedRoute.tsx
@@ -0,0 +1,13 @@
+import { getAccessToken } from '@/lib/apiClient';
+import { type PropsWithChildren } from 'react';
+import { Navigate } from 'react-router-dom';
+
+export const ProtectedRoute = ({ children }: PropsWithChildren) => {
+ if (!getAccessToken()) {
+ // If no token, redirect to login page
+ return ;
+ }
+
+ // If token exists, render the children components
+ return children;
+};
diff --git a/src/features/authorization/api/authorizationAPI.ts b/src/features/authorization/api/authorizationAPI.ts
index 51b1dfe..2e62c71 100644
--- a/src/features/authorization/api/authorizationAPI.ts
+++ b/src/features/authorization/api/authorizationAPI.ts
@@ -1,7 +1,5 @@
import type { ApiResponse } from '@/types/apiResponse';
-import type { FetchPromise } from '@/types/fetchPromise';
import type {
- CompleteUserInformationRequest,
ConfirmEmailOtpRequest,
ConfirmForgetPassCodeRequest,
ConfirmOtpResponse,
@@ -19,86 +17,66 @@ import type {
SendForgetPassCodeRequest,
SendSmsOtpRequest,
} from '../types/userTypes';
-
-const API_URL = 'https://accounts.business-harmony.com/api';
-
-export const fetchRequest = (
- url: string,
- body: Object | null,
-): FetchPromise => {
- return fetch(`${API_URL}/${url}`, {
- body: JSON.stringify(body),
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- });
-};
+import apiClient from '@/lib/apiClient';
// GetUserStatusByPhoneNumberOrEmail
export const getUserStatusByPhoneNumberOrEmail = async (
body: GetUserStatusByPhoneNumberOrEmailRequest,
) => {
- return fetchRequest(
+ return apiClient.post(
'User/GetUserStatusByPhoneNumberOrEmail',
body,
);
};
export const loginOrSignUpWithOtp = async (body: LoginRequest) => {
- return fetchRequest('User/LoginOrSignUpWithOtp', body);
+ return apiClient.post('User/LoginOrSignUpWithOtp', body);
};
export const loginWithPassword = async (body: PasswordLoginRequest) => {
- return fetchRequest('User/LoginWithPassword', body);
+ return apiClient.post('User/LoginWithPassword', body);
};
export const sendSmsOtp = async (body: SendSmsOtpRequest) => {
- return fetchRequest('User/SendSmsOtp', body);
+ return apiClient.post('User/SendSmsOtp', body);
};
export const sendEmailOtp = async (body: SendEmailOtpRequest) => {
- return fetchRequest('User/SendEmailOtp', body);
+ return apiClient.post('User/SendEmailOtp', body);
};
export const confirmSmsOtp = async (body: ConfirmSmsOtpRequest) => {
- return fetchRequest('User/ConfirmSmsOtp', body);
+ return apiClient.post('User/ConfirmSmsOtp', body);
};
export const confirmEmailOtp = async (body: ConfirmEmailOtpRequest) => {
- return fetchRequest('User/ConfirmEmailOtp', body);
+ return apiClient.post('User/ConfirmEmailOtp', body);
};
export const resetPassword = async (body: ResetPasswordRequest) => {
- return fetchRequest('User/ResetPassword', body);
+ return apiClient.post('User/ResetPassword', body);
};
export const sendForgetPassCode = async (body: SendForgetPassCodeRequest) => {
- return fetchRequest('User/SendForgetPassCode', body);
+ return apiClient.post('User/SendForgetPassCode', body);
};
export const confirmForgetPassCode = async (
body: ConfirmForgetPassCodeRequest,
) => {
- return fetchRequest('User/ConfirmForgetPassCode', body);
+ return apiClient.post('User/ConfirmForgetPassCode', body);
};
export const loginOrSignUpWithGoogle = async (
body: LoginOrSignUpWithGoogleRequest,
) => {
- return fetchRequest(
+ return apiClient.post(
'User/LoginOrSignUpWithGoogle',
body,
);
};
-export const completeUserInformation = async (
- body: CompleteUserInformationRequest,
-) => {
- return fetchRequest('User/CompleteUserInformation', body);
-};
-
export const logOut = async () => {
- return fetchRequest('User/LogOut', {});
+ return apiClient.post('User/LogOut', {});
};
diff --git a/src/features/authorization/components/AuthenticationSteps/AuthenticationSteps.tsx b/src/features/authorization/components/AuthenticationSteps/AuthenticationSteps.tsx
index e02bd3a..e0ff695 100644
--- a/src/features/authorization/components/AuthenticationSteps/AuthenticationSteps.tsx
+++ b/src/features/authorization/components/AuthenticationSteps/AuthenticationSteps.tsx
@@ -12,10 +12,10 @@ import { useNavigate, useSearchParams } from 'react-router-dom';
export const AuthenticationSteps = (): JSX.Element => {
const navigate = useNavigate();
- const DEFAULT_RETURN_URL = '/profile';
const [searchParams] = useSearchParams();
- const authReturnUrl: string =
- searchParams.get('returnUrl') ?? DEFAULT_RETURN_URL;
+ const authReturnUrl: string | null = searchParams.get('returnUrl');
+ const authReturnUrlOrDefault: string =
+ authReturnUrl ?? import.meta.env.VITE_DEFUALT_AUTH_RETURN_URL;
const [authMode, setAuthMode] = useState('register');
const [authType, setAuthType] = useState('phone');
const [currentStep, setCurrentStep] = useState('emailOrPhone');
@@ -66,8 +66,8 @@ export const AuthenticationSteps = (): JSX.Element => {
};
const redirectToReturnUrl = () => {
- if (authReturnUrl === DEFAULT_RETURN_URL) {
- navigate(DEFAULT_RETURN_URL);
+ if (!authReturnUrl) {
+ navigate(import.meta.env.VITE_DEFUALT_AUTH_RETURN_URL);
} else {
location.href = authReturnUrl;
}
@@ -77,7 +77,7 @@ export const AuthenticationSteps = (): JSX.Element => {
<>
{currentStep === 'emailOrPhone' && (
{
{currentStep === 'verify' && (
setCurrentStep('emailOrPhone')}
@@ -104,7 +104,7 @@ export const AuthenticationSteps = (): JSX.Element => {
{currentStep === 'enterPassword' && (
(null);
const [touched, setTouched] = useState(false);
const inputError: boolean = touched && !!error;
- const [sendOtpLoading, setSendOtpLoading] = useState(false);
+ const { loading: sendSmsLoading, execute: sendSmsCall } = useApi(sendSmsOtp);
const isPhoneValid = (code: string, phone: string) => {
const phoneNumber = parsePhoneNumberFromString(code + phone);
@@ -61,12 +62,8 @@ export const CompleteSignUp = ({
if (!value || !isPhoneValid(countryCode, value)) {
inputRef.current?.focus();
} else {
- setSendOtpLoading(true);
-
- await sendSmsOtp({ phoneNumber: countryCode + value });
+ await sendSmsCall({ phoneNumber: countryCode + value });
onCompleteSignUp(countryCode, value);
-
- setSendOtpLoading(false);
}
};
@@ -110,7 +107,7 @@ export const CompleteSignUp = ({
sx={{ my: 4 }}
/>
-
-
+
{t('verify.confirmAndLogin')}
diff --git a/src/features/authorization/components/AuthenticationSteps/GoogleAuthentication.tsx b/src/features/authorization/components/AuthenticationSteps/GoogleAuthentication.tsx
index 9a74826..906c39b 100644
--- a/src/features/authorization/components/AuthenticationSteps/GoogleAuthentication.tsx
+++ b/src/features/authorization/components/AuthenticationSteps/GoogleAuthentication.tsx
@@ -1,10 +1,12 @@
import { Button } from '@mui/material';
-import { useEffect, useRef, useState } from 'react';
+import { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import type { GoogleCodeClientResponse } from '../../types/userTypes';
import { loginOrSignUpWithGoogle } from '../../api/authorizationAPI';
import type { GUID } from '@/types/commonTypes';
import { Google } from 'iconsax-react';
+import { Icon, useToast } from '@rkheftan/harmony-ui';
+import { useApi } from '@/hooks/useApi';
export interface GoogleAuthenticationProps {
disabled: boolean;
@@ -18,9 +20,12 @@ export const GoogleAuthentication = ({
onGoogleAuthenticated,
}: GoogleAuthenticationProps) => {
const { t } = useTranslation('authentication');
- const [loginWithGoogleLoading, setLoginWithGoogleLoading] =
- useState(false);
-
+ const {
+ data: loginWithGoogleResult,
+ loading: loginWithGoogleLoading,
+ execute: loginWithGoogleCall,
+ } = useApi(loginOrSignUpWithGoogle);
+ const toast = useToast();
const clientRef = useRef(null);
useEffect(() => {
@@ -37,21 +42,21 @@ export const GoogleAuthentication = ({
ux_mode: 'popup',
response_type: 'id_token',
callback: async (resp: GoogleCodeClientResponse) => {
- setLoginWithGoogleLoading(true);
-
- const result = await loginOrSignUpWithGoogle({
+ await loginWithGoogleCall({
idToken: resp.id_token,
returnUrl: authReturnUrl,
});
- const jsonRes = await result.json();
- if (jsonRes.success) {
- onGoogleAuthenticated(jsonRes.userId);
+ if (!loginWithGoogleResult) return;
+
+ if (loginWithGoogleResult.success) {
+ onGoogleAuthenticated(loginWithGoogleResult.userId);
} else {
- // Todo: Add useToast to handle error
+ toast({
+ message: t('loginForm.googleAuthenticationFailed'),
+ severity: 'error',
+ });
}
-
- setLoginWithGoogleLoading(false);
},
});
};
@@ -73,7 +78,7 @@ export const GoogleAuthentication = ({
disabled={disabled}
loading={loginWithGoogleLoading}
variant="outlined"
- startIcon={}
+ startIcon={}
>
{t('loginForm.loginWithGoogle')}
diff --git a/src/features/authorization/components/AuthenticationSteps/LoginRegiserForm.tsx b/src/features/authorization/components/AuthenticationSteps/LoginRegiserForm.tsx
index 0b7e1aa..524649a 100644
--- a/src/features/authorization/components/AuthenticationSteps/LoginRegiserForm.tsx
+++ b/src/features/authorization/components/AuthenticationSteps/LoginRegiserForm.tsx
@@ -8,10 +8,11 @@ import { AuthenticationCard } from '../AuthenticationCard';
import { CountryCodeSelector } from '../CountryCodeSelector';
import type { UserStatus } from '../../types/userTypes';
import { getUserStatusByPhoneNumberOrEmail } from '../../api/authorizationAPI';
-import { Toast } from '@/components/Toast';
import type { CountryCode, GUID } from '@/types/commonTypes';
import { GoogleAuthentication } from './GoogleAuthentication';
import { isPhoneNumber } from '@/utils/regexes/isValidPhoneNumber';
+import { useToast } from '@rkheftan/harmony-ui';
+import { useApi } from '@/hooks/useApi';
export interface LoginRegisterFormProps {
loginRegisterValue: string;
@@ -36,14 +37,18 @@ export function LoginRegisterForm({
authReturnUrl,
onGoogleAuthenticated,
}: LoginRegisterFormProps) {
- const [checkStatusLoading, setCheckStatusLoading] = useState(false);
const { t } = useTranslation('authentication');
const textFieldRef = useRef(null);
const inputRef = useRef(null);
const [error, setError] = useState();
const [touched, setTouched] = useState(false);
- const [errorMessage, setErrorMessage] = useState();
const inputError: boolean = touched && !!error;
+ const toast = useToast();
+ const {
+ data: userStatus,
+ loading: userStatusLoading,
+ execute: execUserStatus,
+ } = useApi(getUserStatusByPhoneNumberOrEmail);
const handleInputChange = (event: React.ChangeEvent) => {
const newValue = event.target.value;
@@ -88,20 +93,21 @@ export function LoginRegisterForm({
const handleSubmit = async () => {
if (validateInput(loginRegisterValue, authType, false)) {
- setCheckStatusLoading(true);
- const result = await getUserStatusByPhoneNumberOrEmail({
+ await execUserStatus({
phoneNumber:
authType === 'phone' ? countryCode + loginRegisterValue : undefined,
email: authType === 'email' ? loginRegisterValue : undefined,
});
- const jsonResult = await result.json();
- if (jsonResult.success) {
- onLoginRegisterSubmit(loginRegisterValue, jsonResult.userStatus);
- } else {
- setErrorMessage(jsonResult.message);
+ if (!userStatus) {
+ return;
+ }
+
+ if (userStatus.success) {
+ onLoginRegisterSubmit(loginRegisterValue, userStatus.userStatus);
+ } else {
+ toast({ message: userStatus.message, severity: 'error' });
}
- setCheckStatusLoading(false);
} else {
inputRef.current?.focus();
validateInput(loginRegisterValue, authType);
@@ -112,14 +118,6 @@ export function LoginRegisterForm({
return (
- setErrorMessage(undefined)}
- open={!!errorMessage}
- >
- {errorMessage}
-
-
{t('loginForm.title')}
@@ -155,14 +153,14 @@ export function LoginRegisterForm({
/>
-
+
{t('loginForm.submitButton')}
diff --git a/src/features/authorization/components/AuthenticationSteps/OtpVerifyForm.tsx b/src/features/authorization/components/AuthenticationSteps/OtpVerifyForm.tsx
index 25c0c26..53a207b 100644
--- a/src/features/authorization/components/AuthenticationSteps/OtpVerifyForm.tsx
+++ b/src/features/authorization/components/AuthenticationSteps/OtpVerifyForm.tsx
@@ -4,7 +4,6 @@ import { Edit2 } from 'iconsax-react';
import DigitInput from '@/components/components/DigitsInput';
import type { AuthMode, AuthType } from '../../types/authTypes';
import { useEffect, useState } from 'react';
-import { Toast } from '@/components/Toast';
import { AuthenticationCard } from '../AuthenticationCard';
import type { LoginRequest } from '../../types/userTypes';
import {
@@ -13,6 +12,8 @@ import {
sendSmsOtp,
} from '../../api/authorizationAPI';
import type { CountryCode, GUID } from '@/types/commonTypes';
+import { Icon, useToast } from '@rkheftan/harmony-ui';
+import { useApi } from '@/hooks/useApi';
interface OtpVerifyFormProps {
value: string;
@@ -37,15 +38,20 @@ export function OtpVerifyForm({
}: OtpVerifyFormProps) {
const [otpCode, setOtpCode] = useState('');
const [otpDigitInvalid, setOtpDigitInvalid] = useState(false);
- const [verifyStatus, setVerifyStatus] = useState<'success' | 'failed'>();
- const [errorMessage, setErrorMessage] = useState();
- const [verifyStatusLoading, setVerifyStatusLoading] =
- useState(false);
- const [verifyAlertOpen, setVerifyAlertOpen] = useState(false);
+ const [isStatusSuccess, setIsStatusSuccess] = useState();
const { t } = useTranslation('authentication');
const [resendTimer, setResendTimer] = useState(120);
const [canResend, setCanResend] = useState(false);
- const [resendLoading, setResendLoading] = useState(false);
+ const toast = useToast();
+ const { loading: smsResendLoading, execute: smsResendCall } =
+ useApi(sendSmsOtp);
+ const { loading: emailResendLoading, execute: emailResendCall } =
+ useApi(sendEmailOtp);
+ const {
+ data: loginSignUpResult,
+ loading: loginSignUpLoading,
+ execute: loginSignUpCall,
+ } = useApi(loginOrSignUpWithOtp);
useEffect(() => {
let interval: NodeJS.Timeout;
@@ -61,17 +67,14 @@ export function OtpVerifyForm({
}, [resendTimer]);
const handleResendOTPCode = async () => {
- setResendLoading(true);
-
if (authType === 'phone') {
- await sendSmsOtp({ phoneNumber: countryCode + value });
+ await smsResendCall({ phoneNumber: countryCode + value });
} else {
- await sendEmailOtp({ email: value });
+ await emailResendCall({ email: value });
}
setResendTimer(120);
setCanResend(false);
- setResendLoading(false);
};
const formatTime = (seconds: number) => {
@@ -90,7 +93,6 @@ export function OtpVerifyForm({
const handleLoginOrSignUp = async () => {
setOtpDigitInvalid(false);
- setVerifyStatusLoading(true);
const loginRequest: LoginRequest = {
otpCode: otpCode,
@@ -98,27 +100,39 @@ export function OtpVerifyForm({
email: authType === 'email' ? value : undefined,
returnUrl: authReturnUrl,
};
- const result = await loginOrSignUpWithOtp(loginRequest);
- const jsonRes = await result.json();
+ await loginSignUpCall(loginRequest);
- if (jsonRes.success) {
- setVerifyStatus('success');
-
- if (jsonRes.registeredWithOutPhoneNumber) {
- onVerifyPhoneNumber(jsonRes.userId);
- } else {
- onOTPVerified(jsonRes.userId);
- }
- } else {
- setVerifyStatus('failed');
- setErrorMessage(jsonRes.message);
+ if (!loginSignUpResult) {
+ return;
}
- setVerifyAlertOpen(true);
- setVerifyStatusLoading(false);
+ if (loginSignUpResult && loginSignUpResult.success) {
+ setIsStatusSuccess(true);
+
+ if (loginSignUpResult.registeredWithOutPhoneNumber) {
+ onVerifyPhoneNumber(loginSignUpResult.userId);
+ } else {
+ onOTPVerified(loginSignUpResult.userId);
+ }
+
+ toast({
+ message:
+ authMode === 'login'
+ ? t('verify.youHaveSuccessfullyLoggedIn')
+ : t('verify.youHaveSuccessfullySignedIn'),
+ severity: 'success',
+ });
+ } else {
+ setIsStatusSuccess(false);
+
+ toast({
+ message: loginSignUpResult.message,
+ severity: 'error',
+ });
+ }
};
- const otpMessage = (): string => {
+ const otpMessageFn = (): string => {
if (authType === 'phone' && authMode === 'login') {
return t(
'verify.a4DigitVerificationCodeHasBeenSentToYourBobileNumberPleaseEnterIt',
@@ -140,26 +154,11 @@ export function OtpVerifyForm({
return '';
};
- const toastMessage =
- verifyStatus === 'failed'
- ? (errorMessage ?? t('verify.theVerificationCodeIsIncorrect'))
- : verifyStatus === 'success' && authMode === 'register'
- ? t('verify.youHaveSuccessfullySignedIn')
- : verifyStatus === 'success' && authMode === 'login'
- ? t('verify.youHaveSuccessfullyLoggedIn')
- : '';
+ const otpMessage = otpMessageFn();
return (
- setVerifyAlertOpen(false)}
- color={verifyStatus === 'failed' ? 'error' : 'success'}
- >
- {toastMessage}
-
-
}
+ endIcon={}
onClick={onEditValue}
>
{authType === 'phone' ? countryCode + value : value}
@@ -184,16 +183,16 @@ export function OtpVerifyForm({
- {otpMessage()}
+ {otpMessage}
setOtpCode(value)}
/>
-
+
{authMode === 'register'
? t('verify.confirmAndContinue')
: t('verify.confirmAndLogin')}
@@ -212,7 +211,7 @@ export function OtpVerifyForm({
diff --git a/src/features/authorization/components/AuthenticationSteps/VerifyPhoneNumber.tsx b/src/features/authorization/components/AuthenticationSteps/VerifyPhoneNumber.tsx
index ad937d4..5db38ac 100644
--- a/src/features/authorization/components/AuthenticationSteps/VerifyPhoneNumber.tsx
+++ b/src/features/authorization/components/AuthenticationSteps/VerifyPhoneNumber.tsx
@@ -3,11 +3,12 @@ import { Box, Button, Stack, Typography } from '@mui/material';
import { Edit2 } from 'iconsax-react';
import DigitInput from '@/components/components/DigitsInput';
import { useEffect, useState } from 'react';
-import { Toast } from '@/components/Toast';
import { AuthenticationCard } from '../AuthenticationCard';
import type { ConfirmSmsOtpRequest } from '../../types/userTypes';
import { confirmSmsOtp, sendSmsOtp } from '../../api/authorizationAPI';
import type { CountryCode } from '@/types/commonTypes';
+import { Icon, useToast } from '@rkheftan/harmony-ui';
+import { useApi } from '@/hooks/useApi';
interface VerifyPhoneNumberProps {
value: string;
@@ -24,15 +25,18 @@ export function VerifyPhoneNumber({
}: VerifyPhoneNumberProps) {
const [otpCode, setOtpCode] = useState('');
const [otpDigitInvalid, setOtpDigitInvalid] = useState(false);
- const [verifyStatus, setVerifyStatus] = useState<'success' | 'failed'>();
- const [errorMessage, setErrorMessage] = useState();
- const [verifyStatusLoading, setVerifyStatusLoading] =
- useState(false);
- const [verifyAlertOpen, setVerifyAlertOpen] = useState(false);
+ const [isStatusSuccess, setIsStatusSuccess] = useState();
const { t } = useTranslation('authentication');
const [resendTimer, setResendTimer] = useState(120);
const [canResend, setCanResend] = useState(false);
- const [resendLoading, setResendLoading] = useState(false);
+ const toast = useToast();
+ const { loading: smsResendLoading, execute: smsResendCall } =
+ useApi(sendSmsOtp);
+ const {
+ data: confirmSmsOtpResult,
+ loading: confirmSmsOtpLoading,
+ execute: confirmSmsOtpCall,
+ } = useApi(confirmSmsOtp);
useEffect(() => {
let interval: NodeJS.Timeout;
@@ -48,13 +52,10 @@ export function VerifyPhoneNumber({
}, [resendTimer]);
const handleResendOTPCode = async () => {
- setResendLoading(true);
-
- await sendSmsOtp({ phoneNumber: countryCode + value });
+ await smsResendCall({ phoneNumber: countryCode + value });
setResendTimer(120);
setCanResend(false);
- setResendLoading(false);
};
const formatTime = (seconds: number) => {
@@ -68,47 +69,37 @@ export function VerifyPhoneNumber({
setOtpDigitInvalid(true);
} else {
setOtpDigitInvalid(false);
- setVerifyStatusLoading(true);
const confirmSmsOtpRequest: ConfirmSmsOtpRequest = {
otpCode: otpCode,
phoneNumber: countryCode + value,
};
- const result = await confirmSmsOtp(confirmSmsOtpRequest);
- const jsonRes = await result.json();
+ await confirmSmsOtpCall(confirmSmsOtpRequest);
- if (jsonRes.success) {
- setVerifyStatus('success');
+ if (!confirmSmsOtpResult) return;
+
+ if (confirmSmsOtpResult.success) {
+ setIsStatusSuccess(true);
+ toast({
+ message: t('verify.youHaveSuccessfullyLoggedIn'),
+ severity: 'success',
+ });
onPhoneNumberVerified();
} else {
- setVerifyStatus('failed');
- setErrorMessage(jsonRes.message);
+ setIsStatusSuccess(false);
+ toast({
+ message:
+ confirmSmsOtpResult.message ??
+ t('verify.theVerificationCodeIsIncorrect'),
+ severity: 'error',
+ });
}
-
- setVerifyAlertOpen(true);
- setVerifyStatusLoading(false);
- }
- };
-
- const verifyAlertMessage = (): string => {
- if (verifyStatus === 'failed') {
- return errorMessage ?? t('verify.theVerificationCodeIsIncorrect');
- } else {
- return t('verify.youHaveSuccessfullyLoggedIn');
}
};
return (
- setVerifyAlertOpen(false)}
- color={verifyStatus === 'failed' ? 'error' : 'success'}
- >
- {verifyAlertMessage()}
-
-
}
+ endIcon={}
onClick={onEditValue}
>
{countryCode + value}
@@ -139,12 +130,12 @@ export function VerifyPhoneNumber({
setOtpCode(value)}
/>
-
+
{t('verify.confirmAndLogin')}
@@ -161,7 +152,7 @@ export function VerifyPhoneNumber({
diff --git a/src/features/authorization/components/CountryCodeSelector.tsx b/src/features/authorization/components/CountryCodeSelector.tsx
index a93168b..7fcd19b 100644
--- a/src/features/authorization/components/CountryCodeSelector.tsx
+++ b/src/features/authorization/components/CountryCodeSelector.tsx
@@ -15,6 +15,7 @@ import ReactCountryFlag from 'react-country-flag';
import { useTranslation } from 'react-i18next';
import { countries, type Country } from '../../../countries';
import type { CountryCode } from '@/types/commonTypes';
+import { Icon } from '@rkheftan/harmony-ui';
interface CountryCodeSelectorProps {
show: boolean;
value: CountryCode;
@@ -114,7 +115,7 @@ export function CountryCodeSelector({
}}
>
{/* This inner Box prevents the content from being squeezed during the transition */}
-
+
void;
@@ -48,15 +50,12 @@ export const ChangePassword = ({
useState(false);
const inputRef = useRef(null);
const confirmInputRef = useRef(null);
- const [changePasswordLoading, setChangePasswordLoading] =
- useState(false);
- const [changePasswordStatus, setChangePasswordStatus] = useState<
- 'success' | 'failed'
- >();
- const [changePassAlertOpen, setChangePassAlertOpen] =
- useState(false);
- const [changePassFailedMessage, setChangePassFailedMessage] =
- useState('');
+ const toast = useToast();
+ const {
+ data: resetPasswordData,
+ loading: resetPasswordLoading,
+ execute: resetPasswordCall,
+ } = useApi(resetPassword);
const passwordValidationRules = [
{ title: t('forgetPassword.includingANumber'), validator: containsNumber },
@@ -84,8 +83,6 @@ export const ChangePassword = ({
setConfirmInputTouched(true);
confirmInputRef.current?.focus();
} else {
- setChangePasswordLoading(true);
-
const apiRequest: ResetPasswordRequest = {
email: infoType === 'email' ? forgettedPasswordInfo : undefined,
phoneNumber:
@@ -96,19 +93,22 @@ export const ChangePassword = ({
confirmNewPassword: confirmPassValue,
};
- const result = await resetPassword(apiRequest);
- const jsonRes = await result.json();
+ await resetPasswordCall(apiRequest);
- if (jsonRes.success) {
- setChangePasswordStatus('success');
+ if (!resetPasswordData) return;
+
+ if (resetPasswordData.success) {
onPasswordChanged();
+ toast({
+ message: t('forgetPassword.passwordChangedSuccessfully'),
+ severity: 'success',
+ });
} else {
- setChangePasswordStatus('failed');
- setChangePassFailedMessage(jsonRes.message);
+ toast({
+ message: resetPasswordData.message,
+ severity: 'error',
+ });
}
- setChangePassAlertOpen(true);
-
- setChangePasswordLoading(false);
}
};
@@ -123,16 +123,6 @@ export const ChangePassword = ({
return (
- setChangePassAlertOpen(false)}
- color={changePasswordStatus === 'failed' ? 'error' : 'success'}
- >
- {changePasswordStatus === 'failed'
- ? changePassFailedMessage
- : t('forgetPassword.passwordChangedSuccessfully')}
-
-
}
+ endIcon={}
onClick={onEditInfo}
>
{forgettedPasswordInfo}
@@ -177,14 +167,22 @@ export const ChangePassword = ({
startAdornment: confirmPassValue &&
isValidPassword(passValue) &&
passValue === confirmPassValue && (
-
+
),
endAdornment: passValue ? (
setShowPassword(!showPassword)}
>
- {showPassword ? : }
+ {showPassword ? (
+
+ ) : (
+
+ )}
) : (
''
@@ -198,12 +196,11 @@ export const ChangePassword = ({
{passwordValidationRules.map((rule) => (
-
@@ -227,14 +224,22 @@ export const ChangePassword = ({
startAdornment: confirmPassValue &&
isValidPassword(passValue) &&
passValue === confirmPassValue && (
-
+
),
endAdornment: confirmPassValue ? (
setShowConfirmPassword(!showConfirmPassword)}
>
- {showConfirmPassword ? : }
+ {showConfirmPassword ? (
+
+ ) : (
+
+ )}
) : (
''
@@ -245,7 +250,7 @@ export const ChangePassword = ({
/>
-
+
{t('forgetPassword.confirm')}
diff --git a/src/features/authorization/components/ForgetPassword/ForgetPasswordContainer.tsx b/src/features/authorization/components/ForgetPassword/ForgetPasswordContainer.tsx
index 137b413..f605884 100644
--- a/src/features/authorization/components/ForgetPassword/ForgetPasswordContainer.tsx
+++ b/src/features/authorization/components/ForgetPassword/ForgetPasswordContainer.tsx
@@ -4,8 +4,10 @@ import { ForgettedPasswordInfo } from './ForgettedPasswordInfo';
import { ForgetPasswordOtp } from './ForgetPasswordOtp';
import { ChangePassword } from './ChangePassword';
import type { CountryCode } from '@/types/commonTypes';
+import { useNavigate } from 'react-router-dom';
export const ForgetPasswordContainer = () => {
+ const navigate = useNavigate();
const [forgetPassCurrentStep, setForgetPassCurrentStep] = useState<
'enterInfo' | 'verifyOtp' | 'setPassword'
>('enterInfo');
@@ -27,7 +29,7 @@ export const ForgetPasswordContainer = () => {
};
const handlePasswordChanged = () => {
- console.log('changingPasswordTo');
+ navigate('/login');
};
return (
diff --git a/src/features/authorization/components/ForgetPassword/ForgetPasswordOtp.tsx b/src/features/authorization/components/ForgetPassword/ForgetPasswordOtp.tsx
index 021aa81..a1fd5f3 100644
--- a/src/features/authorization/components/ForgetPassword/ForgetPasswordOtp.tsx
+++ b/src/features/authorization/components/ForgetPassword/ForgetPasswordOtp.tsx
@@ -6,9 +6,17 @@ import type { AuthType } from '../../types/authTypes';
import { useEffect, useState } from 'react';
import { Toast } from '@/components/Toast';
import { AuthenticationCard } from '../AuthenticationCard';
-import type { ConfirmForgetPassCodeRequest } from '../../types/userTypes';
+import type {
+ ConfirmForgetPassCodeRequest,
+ SendForgetPassCodeRequest,
+} from '../../types/userTypes';
import type { CountryCode } from '@/types/commonTypes';
-import { confirmForgetPassCode } from '../../api/authorizationAPI';
+import {
+ confirmForgetPassCode,
+ sendForgetPassCode,
+} from '../../api/authorizationAPI';
+import { Icon, useToast } from '@rkheftan/harmony-ui';
+import { useApi } from '@/hooks/useApi';
interface ForgetPasswordOtpProps {
forgettedPasswordInfo: string;
@@ -27,14 +35,21 @@ export function ForgetPasswordOtp({
}: ForgetPasswordOtpProps) {
const [otpCode, setOtpCode] = useState('');
const [otpDigitInvalid, setOtpDigitInvalid] = useState(false);
- const [verifyStatus, setVerifyStatus] = useState<'failed' | 'success'>();
- const [verifyStatusLoading, setVerifyStatusLoading] =
- useState(false);
- const [verifyAlertMessage, setVerifyAlertMessage] = useState();
+ const [isStatusSuccess, setIsStatusSuccess] = useState();
const { t } = useTranslation('authentication');
const [resendTimer, setResendTimer] = useState(120);
const [canResend, setCanResend] = useState(false);
- const [resendLoading, setResendLoading] = useState(false);
+ const toast = useToast();
+ const {
+ data: sendForgetPassCodeData,
+ loading: sendForgetPassCodeLoading,
+ execute: sendForgetPassCodeCall,
+ } = useApi(sendForgetPassCode);
+ const {
+ data: confirmForgetPassCodeData,
+ loading: confirmForgetPassCodeLoading,
+ execute: confirmForgetPassCodeCall,
+ } = useApi(confirmForgetPassCode);
useEffect(() => {
let interval: NodeJS.Timeout;
@@ -49,18 +64,16 @@ export function ForgetPasswordOtp({
return () => clearInterval(interval);
}, [resendTimer]);
- const handleResendOTPCode = () => {
- setResendLoading(true);
+ const handleResendOTPCode = async () => {
+ const sendCodeRequest: SendForgetPassCodeRequest = {
+ email: infoType === 'email' ? forgettedPasswordInfo : undefined,
+ phoneNumber:
+ infoType === 'phone' ? countryCode + forgettedPasswordInfo : undefined,
+ };
+ await sendForgetPassCodeCall(sendCodeRequest);
- // TODO: Call API here instead of settimeout
-
- setTimeout(() => {
- console.log('resended');
-
- setResendTimer(120);
- setCanResend(false);
- setResendLoading(false);
- }, 1000);
+ setResendTimer(120);
+ setCanResend(false);
};
const formatTime = (seconds: number) => {
@@ -74,7 +87,6 @@ export function ForgetPasswordOtp({
setOtpDigitInvalid(true);
} else {
setOtpDigitInvalid(false);
- setVerifyStatusLoading(true);
// Change setTimeout to api call
const apiRequest: ConfirmForgetPassCodeRequest = {
@@ -86,32 +98,26 @@ export function ForgetPasswordOtp({
code: otpCode,
};
- const result = await confirmForgetPassCode(apiRequest);
- const jsonRes = await result.json();
+ confirmForgetPassCodeCall(apiRequest);
- if (jsonRes.success) {
- setVerifyStatus('success');
+ if (!confirmForgetPassCodeData) return;
+
+ if (confirmForgetPassCodeData.success) {
+ setIsStatusSuccess(true);
onOTPVerified(otpCode);
} else {
- setVerifyStatus('failed');
- setVerifyAlertMessage(jsonRes.message);
+ setIsStatusSuccess(false);
+ toast({
+ message: confirmForgetPassCodeData.message,
+ severity: 'error',
+ });
}
-
- setVerifyStatusLoading(false);
}
};
return (
- setVerifyAlertMessage(undefined)}
- color={'error'}
- >
- {verifyAlertMessage}
-
-
}
+ endIcon={}
onClick={onEditInfo}
>
{infoType === 'phone'
@@ -150,12 +156,15 @@ export function ForgetPasswordOtp({
setOtpCode(value)}
/>
-
+
{t('forgetPassword.confirm')}
@@ -172,7 +181,7 @@ export function ForgetPasswordOtp({
diff --git a/src/features/authorization/components/ForgetPassword/ForgettedPasswordInfo.tsx b/src/features/authorization/components/ForgetPassword/ForgettedPasswordInfo.tsx
index 6d2cf54..997a8aa 100644
--- a/src/features/authorization/components/ForgetPassword/ForgettedPasswordInfo.tsx
+++ b/src/features/authorization/components/ForgetPassword/ForgettedPasswordInfo.tsx
@@ -11,6 +11,8 @@ import { sendForgetPassCode } from '../../api/authorizationAPI';
import type { SendForgetPassCodeRequest } from '../../types/userTypes';
import { Toast } from '@/components/Toast';
import { isPhoneNumber } from '@/utils/regexes/isValidPhoneNumber';
+import { useToast } from '@rkheftan/harmony-ui';
+import { useApi } from '@/hooks/useApi';
export interface ForgettedPasswordInfoProps {
forgettedPasswordInfo: string;
@@ -36,9 +38,13 @@ export function ForgettedPasswordInfo({
const inputRef = useRef(null);
const [error, setError] = useState();
const [touched, setTouched] = useState(false);
- const [errorMessage, setErrorMessage] = useState();
- const [sendCodeLoading, setSendCodeLoading] = useState(false);
const inputError: boolean = touched && !!error;
+ const toast = useToast();
+ const {
+ data: sendForgetPassCodeData,
+ loading: sendForgetPassCodeLoading,
+ execute: sendForgetPassCodeCall,
+ } = useApi(sendForgetPassCode);
const handleInputChange = (event: React.ChangeEvent) => {
const newValue = event.target.value;
@@ -79,8 +85,6 @@ export function ForgettedPasswordInfo({
const handleSubmit = async () => {
if (validateInput(forgettedPasswordInfo, infoType, false)) {
- setSendCodeLoading(true);
-
const sendCodeRequest: SendForgetPassCodeRequest = {
email: infoType === 'email' ? forgettedPasswordInfo : undefined,
phoneNumber:
@@ -88,14 +92,17 @@ export function ForgettedPasswordInfo({
? countryCode + forgettedPasswordInfo
: undefined,
};
- const result = await sendForgetPassCode(sendCodeRequest);
- const jsonRes = await result.json();
+ sendForgetPassCodeCall(sendCodeRequest);
- if (!jsonRes.success) {
- setErrorMessage(jsonRes.message);
+ if (!sendForgetPassCodeData) return;
+
+ if (!sendForgetPassCodeData.success) {
+ toast({
+ message: sendForgetPassCodeData.message,
+ severity: 'error',
+ });
}
- setSendCodeLoading(false);
onVerifyOtp(forgettedPasswordInfo);
} else {
inputRef.current?.focus();
@@ -108,14 +115,6 @@ export function ForgettedPasswordInfo({
return (
- setErrorMessage(undefined)}
- open={!!errorMessage}
- >
- {errorMessage}
-
-
{t('forgetPassword.forgetPassword')}
@@ -155,7 +154,7 @@ export function ForgettedPasswordInfo({
/>
-
+
{t('forgetPassword.confirm')}
diff --git a/src/features/authorization/index.ts b/src/features/authorization/index.ts
index e69de29..e16de18 100644
--- a/src/features/authorization/index.ts
+++ b/src/features/authorization/index.ts
@@ -0,0 +1,2 @@
+export * from './routes/AuthenticationPage';
+export * from './routes/ForgetPasswordPage';
diff --git a/src/features/authorization/types/userTypes.ts b/src/features/authorization/types/userTypes.ts
index 99eb998..b7e4ea6 100644
--- a/src/features/authorization/types/userTypes.ts
+++ b/src/features/authorization/types/userTypes.ts
@@ -115,24 +115,3 @@ export interface LoginOrSignUpWithGoogleResponse extends ApiResponse {
completedUserInformation: boolean;
returnUrl: string;
}
-
-// CompleteUserInformation
-
-export interface CompleteUserInformationRequest {
- firstName?: string;
- lastName?: string;
- gender?: Gender;
- nationalCode?: string;
- savePassword?: boolean;
- password?: string;
- saveEmail?: boolean;
- email?: string;
- birthDate?: string;
- countryCode?: string;
- userId?: GUID;
-}
-
-export enum Gender {
- Male = 1,
- Female = 2,
-}
diff --git a/src/hooks/useApi.ts b/src/hooks/useApi.ts
index f8e47b0..ff98bd0 100644
--- a/src/hooks/useApi.ts
+++ b/src/hooks/useApi.ts
@@ -1,4 +1,10 @@
+// FIXME: all the responses should extend this interface
+// import type { ApiResponse } from '@/types/apiResponse';
+import { useToast } from '@rkheftan/harmony-ui';
+import type { AxiosError } from 'axios';
import { useState, useEffect, useCallback } from 'react';
+import { useTranslation } from 'react-i18next';
+import { useNavigate } from 'react-router-dom';
// Define options for the hook
interface UseApiOptions {
// If true, the API call will be executed immediately on mount
@@ -9,9 +15,13 @@ export function useApi(
apiFunction: (...args: P) => Promise<{ data: T }>,
options: UseApiOptions = {},
) {
+ const toast = useToast();
+ const navigate = useNavigate();
+ const { t } = useTranslation();
const [data, setData] = useState(null);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(null);
+
const execute = useCallback(
async (...args: P) => {
setLoading(true);
@@ -21,15 +31,28 @@ export function useApi(
const response = await apiFunction(...args);
setData(response.data);
- } catch (err) {
- // TODO: can handle some common errors here, 400 and 500 errors
+ } catch (err: unknown) {
+ const axisoError: AxiosError = err as AxiosError;
+
+ if (axisoError.response?.status === 401) {
+ navigate('/login');
+ }
+
+ if (axisoError.response?.status === 500) {
+ toast({
+ message: t('messages.serverError'),
+ severity: 'error',
+ });
+ }
+
setError(err);
} finally {
setLoading(false);
}
},
- [apiFunction],
- );
+ [apiFunction, navigate, t, toast],
+ )
+
// If the 'immediate' option is true, execute the function on mount
useEffect(() => {
diff --git a/src/lib/apiClient.ts b/src/lib/apiClient.ts
index 557ffe5..d433f73 100644
--- a/src/lib/apiClient.ts
+++ b/src/lib/apiClient.ts
@@ -1,11 +1,12 @@
import axios from 'axios';
// Function to get the token from local storage or state management
-const getToken = () => localStorage.getItem('authToken');
+export const ACCESS_TOKEN_KEY: 'access_token' = 'access_token' as const;
+export const getAccessToken = () => sessionStorage.getItem(ACCESS_TOKEN_KEY);
const apiClient = axios.create({
// Define the base URL for all API requests
- baseURL: 'https://accounts.business-harmony.com/api/',
+ baseURL: import.meta.env.VITE_API_URL,
// Set a timeout for requests (e.g., 10 seconds)
timeout: 10000,
@@ -21,7 +22,7 @@ const apiClient = axios.create({
// This runs BEFORE each request is sent
apiClient.interceptors.request.use(
(config) => {
- const token = getToken();
+ const token = getAccessToken();
if (token) {
// Add the authorization token to the headers
config.headers.Authorization = `Bearer ${token}`;
diff --git a/src/lib/identityClient.ts b/src/lib/identityClient.ts
new file mode 100644
index 0000000..4282594
--- /dev/null
+++ b/src/lib/identityClient.ts
@@ -0,0 +1,14 @@
+import axios from 'axios';
+
+const identityClient = axios.create({
+ // Define the base URL for all API requests
+ baseURL: import.meta.env.VITE_IDENTITY_URL,
+
+ // Set a timeout for requests (e.g., 10 seconds)
+ timeout: 10000,
+
+ // Set default headers
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ },
+});
diff --git a/src/routes/config.tsx b/src/routes/config.tsx
index 61f2f8d..5340c92 100644
--- a/src/routes/config.tsx
+++ b/src/routes/config.tsx
@@ -1,4 +1,8 @@
import { Layout } from '@/components/Layout/Layout';
+import {
+ AuthenticationPage,
+ ForgetPasswordPage,
+} from '@/features/authorization';
import {
Calendar,
Devices,
@@ -18,6 +22,7 @@ import { Navigate } from 'react-router-dom';
export interface RouteConfig {
path: string;
element?: ReactNode;
+ authorize?: boolean;
navConfig?: {
title: string; // Translation key
icon?: Icon;
@@ -27,6 +32,20 @@ export interface RouteConfig {
// can lazy load component if needed (ex. lazy(() => import('@/features/home/routes/HomePage'));)
export const appRoutes: RouteConfig[] = [
+ {
+ path: '/',
+ element: ,
+ },
+ {
+ path: '/login',
+ element: ,
+ authorize: l,
+ },
+ {
+ path: '/forget-password',
+ element: ,
+ authorize: false,
+ },
{
path: '/',
element: ,
diff --git a/src/routes/index.tsx b/src/routes/index.tsx
index 541a2fb..53b7482 100644
--- a/src/routes/index.tsx
+++ b/src/routes/index.tsx
@@ -1,6 +1,7 @@
import { Suspense, type ReactNode } from 'react';
import { createBrowserRouter, type RouteObject } from 'react-router-dom';
import { appRoutes, type RouteConfig } from './config';
+import { ProtectedRoute } from '@/components/ProtectedRoute';
/**
* A recursive function to map our custom route config to the format
@@ -18,10 +19,9 @@ function mapRoutes(routes: RouteConfig[]): RouteObject[] {
// element = {element};
// }
- // Conditionally wrap the element in the authentication guard
- // if (route.authRequired) {
- // element = {element};
- // }
+ if (route.authorize) {
+ element = {element};
+ }
return {
path: route.path,
diff --git a/src/theme/colors.ts b/src/theme/colors.ts
index 4c68db7..fdaec5c 100644
--- a/src/theme/colors.ts
+++ b/src/theme/colors.ts
@@ -4,7 +4,7 @@ import type { Palette } from './color.type';
export const PALETTE: Palette = {
primary: {
light: {
- main: blue[400],
+ main: blue.A400,
dark: blue[700],
light: blue[100],
contrastText: '#FFFFFF',
diff --git a/src/types/fetchPromise.ts b/src/types/fetchPromise.ts
deleted file mode 100644
index 84483d5..0000000
--- a/src/types/fetchPromise.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export type FetchPromise = Promise>;
-
-export interface FetchResponse extends Response {
- json(): Promise;
-}