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", "@emotion/styled": "^11.14.1",
"@mui/material": "^7.3.1", "@mui/material": "^7.3.1",
"@mui/stylis-plugin-rtl": "^7.2.0", "@mui/stylis-plugin-rtl": "^7.2.0",
"@mui/x-data-grid": "^8.10.0", "@mui/x-data-grid-premium": "^8.10.0",
"@mui/x-virtualizer": "^0.1.1", "@mui/x-date-pickers": "^8.10.0",
"@rkheftan/harmony-ui": "^0.1.6", "@rkheftan/harmony-ui": "^0.1.8",
"@mui/x-date-pickers": "^8.9.0",
"@mui/x-date-pickers-pro": "^8.9.0",
"axios": "^1.11.0", "axios": "^1.11.0",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"date-fns-jalali": "^4.0.0-0", "date-fns-jalali": "^4.0.0-0",

View File

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

View File

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

View File

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

View File

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