fix: build error for checking packages
This commit is contained in:
808
package-lock.json
generated
808
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user