mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-19 22:19:36 +02:00
refactor: remove validation schema
This commit is contained in:
41
.idea/workspace.xml
generated
41
.idea/workspace.xml
generated
@@ -4,10 +4,25 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="feat: rotate ui">
|
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="feat: shuffle ui">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/components/options/ToolOptions.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/options/ToolOptions.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/image/png/change-colors-in-png/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/image/png/change-colors-in-png/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/image/png/convert-jgp-to-png/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/image/png/convert-jgp-to-png/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/image/png/create-transparent/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/image/png/create-transparent/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/list/find-most-popular/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/find-most-popular/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/list/find-unique/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/find-unique/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/list/group/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/group/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/list/reverse/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/reverse/index.tsx" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/pages/list/rotate/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/rotate/index.tsx" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/pages/list/rotate/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/rotate/index.tsx" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/pages/list/shuffle/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/shuffle/index.tsx" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/pages/list/shuffle/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/shuffle/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/list/sort/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/sort/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/number/generate/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/number/generate/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/number/sum/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/number/sum/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/string/join/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/string/join/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/string/split/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/string/split/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/string/to-morse/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/string/to-morse/index.tsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/pages/video/gif/change-speed/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/video/gif/change-speed/index.tsx" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -245,15 +260,7 @@
|
|||||||
<workItem from="1720661825389" duration="4305000" />
|
<workItem from="1720661825389" duration="4305000" />
|
||||||
<workItem from="1720729165596" duration="3258000" />
|
<workItem from="1720729165596" duration="3258000" />
|
||||||
<workItem from="1720911748039" duration="331000" />
|
<workItem from="1720911748039" duration="331000" />
|
||||||
<workItem from="1720912096050" duration="1586000" />
|
<workItem from="1720912096050" duration="2231000" />
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00049" summary="feat: change color in png finished">
|
|
||||||
<option name="closed" value="true" />
|
|
||||||
<created>1719275214988</created>
|
|
||||||
<option name="number" value="00049" />
|
|
||||||
<option name="presentableId" value="LOCAL-00049" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1719275214988</updated>
|
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00050" summary="feat: string to morse">
|
<task id="LOCAL-00050" summary="feat: string to morse">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
@@ -639,7 +646,15 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1720913013183</updated>
|
<updated>1720913013183</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="98" />
|
<task id="LOCAL-00098" summary="feat: shuffle ui">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1720913810733</created>
|
||||||
|
<option name="number" value="00098" />
|
||||||
|
<option name="presentableId" value="LOCAL-00098" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1720913810733</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="99" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
@@ -683,7 +698,6 @@
|
|||||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||||
<option name="CHECK_NEW_TODO" value="false" />
|
<option name="CHECK_NEW_TODO" value="false" />
|
||||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||||
<MESSAGE value="chore: shuffle tools search" />
|
|
||||||
<MESSAGE value="refactor: toolOptions" />
|
<MESSAGE value="refactor: toolOptions" />
|
||||||
<MESSAGE value="feat: playwright" />
|
<MESSAGE value="feat: playwright" />
|
||||||
<MESSAGE value="refactor: optimize imports" />
|
<MESSAGE value="refactor: optimize imports" />
|
||||||
@@ -708,7 +722,8 @@
|
|||||||
<MESSAGE value="feat: self host" />
|
<MESSAGE value="feat: self host" />
|
||||||
<MESSAGE value="chore: format number" />
|
<MESSAGE value="chore: format number" />
|
||||||
<MESSAGE value="feat: rotate ui" />
|
<MESSAGE value="feat: rotate ui" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="feat: rotate ui" />
|
<MESSAGE value="feat: shuffle ui" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="feat: shuffle ui" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XSLT-Support.FileAssociations.UIState">
|
<component name="XSLT-Support.FileAssociations.UIState">
|
||||||
<expand />
|
<expand />
|
||||||
|
@@ -5,6 +5,7 @@ import React, { ReactNode, RefObject, useContext, useEffect } from 'react';
|
|||||||
import { Formik, FormikProps, FormikValues, useFormikContext } from 'formik';
|
import { Formik, FormikProps, FormikValues, useFormikContext } from 'formik';
|
||||||
import ToolOptionGroups, { ToolOptionGroup } from './ToolOptionGroups';
|
import ToolOptionGroups, { ToolOptionGroup } from './ToolOptionGroups';
|
||||||
import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
|
import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
|
||||||
|
import * as Yup from 'yup';
|
||||||
|
|
||||||
type UpdateField<T> = <Y extends keyof T>(field: Y, value: T[Y]) => void;
|
type UpdateField<T> = <Y extends keyof T>(field: Y, value: T[Y]) => void;
|
||||||
|
|
||||||
@@ -78,7 +79,7 @@ export default function ToolOptions<T extends FormikValues>({
|
|||||||
}: {
|
}: {
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
initialValues: T;
|
initialValues: T;
|
||||||
validationSchema: any | (() => any);
|
validationSchema?: any | (() => any);
|
||||||
compute: (optionsValues: T, input: any) => void;
|
compute: (optionsValues: T, input: any) => void;
|
||||||
input?: any;
|
input?: any;
|
||||||
getGroups: (
|
getGroups: (
|
||||||
|
@@ -134,7 +134,6 @@ export default function ChangeColorsInPng() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -148,7 +148,6 @@ export default function ConvertJgpToPng() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -121,7 +121,6 @@ export default function ChangeColorsInPng() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -69,9 +69,6 @@ export default function FindMostPopular() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -165,7 +162,6 @@ export default function FindMostPopular() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -63,9 +63,6 @@ export default function FindUnique() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -156,7 +153,6 @@ export default function FindUnique() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -73,9 +73,6 @@ export default function FindUnique() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -181,7 +178,6 @@ export default function FindUnique() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -41,9 +41,6 @@ export default function Reverse() {
|
|||||||
reverseList(splitOperatorType, splitSeparator, joinSeparator, input)
|
reverseList(splitOperatorType, splitSeparator, joinSeparator, input)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -103,7 +100,6 @@ export default function Reverse() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -71,9 +71,6 @@ export default function Rotate() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -151,7 +148,6 @@ export default function Rotate() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -51,9 +51,6 @@ export default function Shuffle() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -118,7 +115,6 @@ export default function Shuffle() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -64,9 +64,6 @@ export default function SplitText() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -163,7 +160,6 @@ export default function SplitText() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -16,10 +16,6 @@ const initialValues = {
|
|||||||
export default function SplitText() {
|
export default function SplitText() {
|
||||||
const [result, setResult] = useState<string>('');
|
const [result, setResult] = useState<string>('');
|
||||||
|
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<ToolInputAndResult
|
<ToolInputAndResult
|
||||||
@@ -78,7 +74,6 @@ export default function SplitText() {
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -42,10 +42,6 @@ export default function SplitText() {
|
|||||||
const [input, setInput] = useState<string>('');
|
const [input, setInput] = useState<string>('');
|
||||||
const [result, setResult] = useState<string>('');
|
const [result, setResult] = useState<string>('');
|
||||||
|
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<ToolInputAndResult
|
<ToolInputAndResult
|
||||||
@@ -112,7 +108,6 @@ export default function SplitText() {
|
|||||||
}}
|
}}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -171,7 +171,6 @@ export default function JoinText() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
<ToolInfo
|
<ToolInfo
|
||||||
title="What Is a Text Joiner?"
|
title="What Is a Text Joiner?"
|
||||||
|
@@ -104,9 +104,6 @@ export default function SplitText() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -146,7 +143,6 @@ export default function SplitText() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -21,9 +21,6 @@ export default function ToMorse() {
|
|||||||
const { dotSymbol, dashSymbol } = optionsValues;
|
const { dotSymbol, dashSymbol } = optionsValues;
|
||||||
setResult(compute(input, dotSymbol, dashSymbol));
|
setResult(compute(input, dotSymbol, dashSymbol));
|
||||||
};
|
};
|
||||||
const validationSchema = Yup.object({
|
|
||||||
// splitSeparator: Yup.string().required('The separator is required')
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -61,7 +58,6 @@ export default function ToMorse() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@@ -142,7 +142,6 @@ export default function ChangeSpeed() {
|
|||||||
]}
|
]}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
input={input}
|
input={input}
|
||||||
validationSchema={validationSchema}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user