fix: build error for checking packages

This commit is contained in:
Sajad Mirjalili
2025-08-15 22:54:38 +03:30
parent 7bc3bae045
commit 7f09cee021
6 changed files with 111 additions and 758 deletions

808
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,11 +16,9 @@
"@emotion/styled": "^11.14.1",
"@mui/material": "^7.3.1",
"@mui/stylis-plugin-rtl": "^7.2.0",
"@mui/x-data-grid": "^8.10.0",
"@mui/x-virtualizer": "^0.1.1",
"@rkheftan/harmony-ui": "^0.1.6",
"@mui/x-date-pickers": "^8.9.0",
"@mui/x-date-pickers-pro": "^8.9.0",
"@mui/x-data-grid-premium": "^8.10.0",
"@mui/x-date-pickers": "^8.10.0",
"@rkheftan/harmony-ui": "^0.1.8",
"axios": "^1.11.0",
"date-fns": "^4.1.0",
"date-fns-jalali": "^4.0.0-0",

View File

@@ -1,20 +1,17 @@
import { useState, useEffect, useCallback } from 'react';
import { type ApiResponse } from '@/types/apiResponse';
// Define options for the hook
interface UseApiOptions {
// If true, the API call will be executed immediately on mount
immediate?: boolean;
}
export function useApi<T extends ApiResponse, P extends any[]>(
export function useApi<T, P extends any[]>(
apiFunction: (...args: P) => Promise<{ data: T }>,
options: UseApiOptions = {},
) {
const [data, setData] = useState<T | null>(null);
const [loading, setLoading] = useState(false);
const [error, setError] = useState<unknown>(null);
const execute = useCallback(
async (...args: P) => {
setLoading(true);

View File

@@ -13,18 +13,6 @@ export const CustomThemeProvider: React.FC<{ children: React.ReactNode }> = ({
const direction = i18n.dir(i18n.language);
return createTheme({
components: {
MuiSelect: {
styleOverrides: {
root: {
textAlign: 'left',
},
select: {
textAlign: 'left',
},
},
},
},
direction: direction,
colorSchemes: {
light: {
@@ -37,28 +25,32 @@ export const CustomThemeProvider: React.FC<{ children: React.ReactNode }> = ({
cssVariables: {
colorSchemeSelector: 'class',
},
spacing: 8,
typography: typography,
components: {
MuiButton: {
defaultProps: {
size: 'large',
fullWidth: true,
variant: 'contained',
sx: {
textTransform: 'none',
},
},
},
MuiTextField: {
defaultProps: {
variant: 'outlined',
fullWidth: true,
},
},
MuiButton: {
defaultProps: {
size: 'large',
fullWidth: true,
variant: 'contained',
},
},
},
spacing: 8,
typography: typography,
components: {
MuiButton: {
defaultProps: {
sx: {
textTransform: 'none',
MuiSelect: {
styleOverrides: {
root: {
textAlign: 'left',
},
select: {
textAlign: 'left',
},
},
},

View File

@@ -3,7 +3,6 @@ export function regex(password: string) {
const hasMinLength = password.length >= 8;
const hasUpperAndLower = /[A-Z]/.test(password) && /[a-z]/.test(password);
const hasSpecialChar = /[!@#$%^&*]/.test(password);
return {
hasNumber,

View File

@@ -6,6 +6,7 @@
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"jsx": "react-jsx",
"module": "ESNext",
"skipLibCheck": true,
/* Bundler & Module Resolution */
"moduleResolution": "bundler",