diff --git a/.gitignore b/.gitignore
index 162be48..e4b8e25 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,3 +40,4 @@ yarn-error.log*
/playwright-report
dist.zip
+.aider*
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f9a3ff9..903f932 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,15 @@
-
+
+
-
+
+
+
+
+
+
@@ -23,7 +29,7 @@
@@ -68,6 +74,13 @@
"number": 33
},
"lastSeen": 1741282429036
+ },
+ {
+ "id": {
+ "id": "PR_kwDOMJIfts5zyFTs",
+ "number": 15
+ },
+ "lastSeen": 1741535540953
}
]
}
@@ -77,6 +90,9 @@
"accountId": "45f8cd51-000f-4ba4-a4c6-c4d96ac9b1e5"
}
}
+
+
+
{
"isMigrated": true
}
@@ -119,7 +135,7 @@
"git-widget-placeholder": "main",
"ignore.virus.scanning.warn.message": "true",
"kotlin-language-version-configured": "true",
- "last_opened_file_path": "C:/Users/Ibrahima/IdeaProjects/omni-tools/.husky",
+ "last_opened_file_path": "C:/Users/Ibrahima/IdeaProjects/omni-tools/src/pages/tools/list/duplicate/index.tsx",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
@@ -137,7 +153,7 @@
"project.structure.last.edited": "Problems",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.2",
- "settings.editor.selected.configurable": "settings.typescriptcompiler",
+ "settings.editor.selected.configurable": "refactai_advanced_settings",
"ts.external.directory.path": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib",
"vue.rearranger.settings.migration": "true"
}
@@ -323,14 +339,8 @@
-
-
-
- 1740321912140
-
-
-
- 1740321912140
+
+
@@ -716,7 +726,15 @@
1741492943849
-
+
+
+ 1741535390090
+
+
+
+ 1741535390090
+
+
@@ -763,7 +781,6 @@
-
@@ -788,7 +805,8 @@
-
+
+
diff --git a/src/pages/tools/list/duplicate/index.tsx b/src/pages/tools/list/duplicate/index.tsx
index c74f354..4427588 100644
--- a/src/pages/tools/list/duplicate/index.tsx
+++ b/src/pages/tools/list/duplicate/index.tsx
@@ -8,12 +8,5 @@ const validationSchema = Yup.object({
// splitSeparator: Yup.string().required('The separator is required')
});
export default function Duplicate() {
- return (
- {}}
- resultComponent={Lorem ipsum}
- />
- );
+ return Lorem ipsum;
}
diff --git a/src/pages/tools/list/find-unique/index.tsx b/src/pages/tools/list/find-unique/index.tsx
index d18259d..b5ef4b9 100644
--- a/src/pages/tools/list/find-unique/index.tsx
+++ b/src/pages/tools/list/find-unique/index.tsx
@@ -2,9 +2,8 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '@components/input/ToolTextInput';
import ToolTextResult from '@components/result/ToolTextResult';
-import ToolOptions from '@components/options/ToolOptions';
+import ToolContent from '@components/ToolContent';
import { findUniqueCompute, SplitOperatorType } from './service';
-import ToolInputAndResult from '@components/ToolInputAndResult';
import SimpleRadio from '@components/options/SimpleRadio';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
@@ -64,95 +63,89 @@ export default function FindUnique() {
};
return (
-
-
+
+ }
+ resultComponent={}
+ getGroups={({ values, updateField }) => [
+ {
+ title: 'Input List Delimiter',
+ component: (
+
+ {splitOperators.map(({ title, description, type }) => (
+ updateField('splitOperatorType', type)}
+ title={title}
+ description={description}
+ checked={values.splitOperatorType === type}
+ />
+ ))}
+ updateField('splitSeparator', val)}
+ />
+
+ )
+ },
+ {
+ title: 'Output List Delimiter',
+ component: (
+
+ updateField('joinSeparator', value)}
+ />
+ updateField('trimItems', value)}
+ />
+ updateField('deleteEmptyItems', value)}
+ />
+
+ )
+ },
+ {
+ title: 'Unique Item Options',
+ component: (
+
+ updateField('absolutelyUnique', value)}
+ />
+ updateField('caseSensitive', value)}
+ />
+
+ )
}
- result={}
- />
- [
- {
- title: 'Input List Delimiter',
- component: (
-
- {splitOperators.map(({ title, description, type }) => (
- updateField('splitOperatorType', type)}
- title={title}
- description={description}
- checked={values.splitOperatorType === type}
- />
- ))}
- updateField('splitSeparator', val)}
- />
-
- )
- },
- {
- title: 'Output List Delimiter',
- component: (
-
- updateField('joinSeparator', value)}
- />
- updateField('trimItems', value)}
- />
- updateField('deleteEmptyItems', value)}
- />
-
- )
- },
- {
- title: 'Unique Item Options',
- component: (
-
- updateField('absolutelyUnique', value)}
- />
- updateField('caseSensitive', value)}
- />
-
- )
- }
- ]}
- initialValues={initialValues}
- input={input}
- />
-
+ ]}
+ />
);
}
diff --git a/src/pages/tools/list/index.ts b/src/pages/tools/list/index.ts
index 638811a..0ea2f7c 100644
--- a/src/pages/tools/list/index.ts
+++ b/src/pages/tools/list/index.ts
@@ -11,15 +11,15 @@ import { tool as listShuffle } from './shuffle/meta';
import { tool as listSort } from './sort/meta';
export const listTools = [
- listSort, // TODO: Check if uses ToolContent - Needs update to use ToolContent - Implemented ToolContent
+ listSort,
// listUnwrap,
- listReverse, // TODO: Check if uses ToolContent - Needs update to use ToolContent
- listFindUnique, // TODO: Check if uses ToolContent - Needs update to use ToolContent
- listFindMostPopular, // TODO: Check if uses ToolContent - Needs update to use ToolContent
- listGroup, // TODO: Check if uses ToolContent - Needs update to use ToolContent
+ listReverse,
+ listFindUnique,
+ listFindMostPopular,
+ listGroup,
// listWrap,
- listRotate, // TODO: Check if uses ToolContent - Needs update to use ToolContent
- listShuffle // TODO: Check if uses ToolContent - Needs update to use ToolContent
+ listRotate,
+ listShuffle
// listTruncate,
// listDuplicate
];
diff --git a/src/pages/tools/list/shuffle/index.tsx b/src/pages/tools/list/shuffle/index.tsx
index 9c07d22..47f0d7e 100644
--- a/src/pages/tools/list/shuffle/index.tsx
+++ b/src/pages/tools/list/shuffle/index.tsx
@@ -2,12 +2,11 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '@components/input/ToolTextInput';
import ToolTextResult from '@components/result/ToolTextResult';
-import ToolOptions from '@components/options/ToolOptions';
+import ToolContent from '@components/ToolContent';
import { shuffleList, SplitOperatorType } from './service';
-import ToolInputAndResult from '@components/ToolInputAndResult';
import SimpleRadio from '@components/options/SimpleRadio';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
-import { isNumber } from '../../../../utils/string';
+import { isNumber } from '@utils/string';
const initialValues = {
splitOperatorType: 'symbol' as SplitOperatorType,
@@ -51,69 +50,65 @@ export default function Shuffle() {
};
return (
-
-
+
+ }
+ resultComponent={
+
+ }
+ getGroups={({ values, updateField }) => [
+ {
+ title: 'Input list separator',
+ component: (
+
+ {splitOperators.map(({ title, description, type }) => (
+ updateField('splitOperatorType', type)}
+ title={title}
+ description={description}
+ checked={values.splitOperatorType === type}
+ />
+ ))}
+ updateField('splitSeparator', val)}
+ />
+
+ )
+ },
+ {
+ title: 'Shuffled List Length',
+ component: (
+
+ updateField('length', val)}
+ />
+
+ )
+ },
+ {
+ title: 'Shuffled List Separator',
+ component: (
+
+ updateField('joinSeparator', value)}
+ description={'Use this separator in the randomized list.'}
+ />
+
+ )
}
- result={}
- />
- [
- {
- title: 'Input list separator',
- component: (
-
- {splitOperators.map(({ title, description, type }) => (
- updateField('splitOperatorType', type)}
- title={title}
- description={description}
- checked={values.splitOperatorType === type}
- />
- ))}
- updateField('splitSeparator', val)}
- />
-
- )
- },
- {
- title: 'Shuffled List Length',
- component: (
-
- updateField('length', val)}
- />
-
- )
- },
- {
- title: 'Shuffled List Separator',
- component: (
-
- updateField('joinSeparator', value)}
- description={'Use this separator in the randomized list.'}
- />
-
- )
- }
- ]}
- initialValues={initialValues}
- input={input}
- />
-
+ ]}
+ />
);
}
diff --git a/src/pages/tools/string/join/index.tsx b/src/pages/tools/string/join/index.tsx
index 472f562..eb0105a 100644
--- a/src/pages/tools/string/join/index.tsx
+++ b/src/pages/tools/string/join/index.tsx
@@ -1,20 +1,13 @@
-import { Box } from '@mui/material';
-import React, { useRef, useState } from 'react';
+import React, { useState } from 'react';
import * as Yup from 'yup';
import ToolTextInput from '@components/input/ToolTextInput';
import ToolTextResult from '@components/result/ToolTextResult';
-import ToolOptions, { GetGroupsType } from '@components/options/ToolOptions';
+import ToolContent from '@components/ToolContent';
+import { GetGroupsType } from '@components/options/ToolOptions';
import { mergeText } from './service';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
-import ToolInputAndResult from '@components/ToolInputAndResult';
-
-import ToolInfo from '@components/ToolInfo';
-import Separator from '@components/Separator';
-import ToolExamples, {
- CardExampleType
-} from '@components/examples/ToolExamples';
-import { FormikProps } from 'formik';
+import { CardExampleType } from '@components/examples/ToolExamples';
import { ToolComponentProps } from '@tools/defineTool';
const initialValues = {
@@ -116,7 +109,6 @@ s
export default function JoinText({ title }: ToolComponentProps) {
const [input, setInput] = useState('');
const [result, setResult] = useState('');
- const formRef = useRef>(null);
const compute = (optionsValues: InitialValuesType, input: any) => {
const { joinCharacter, deleteBlank, deleteTrailing } = optionsValues;
setResult(mergeText(input, deleteBlank, deleteTrailing, joinCharacter));
@@ -151,36 +143,27 @@ export default function JoinText({ title }: ToolComponentProps) {
}
];
return (
-
-
- }
- result={}
- />
-
-
-
-
-
+
+ }
+ resultComponent={}
+ getGroups={getGroups}
+ toolInfo={{
+ title: 'What Is a Text Joiner?',
+ description:
+ 'With this tool you can join parts of the text together. It takes a list of text values, separated by newlines, and merges them together. You can set the character that will be placed between the parts of the combined text. Also, you can ignore all empty lines and remove spaces and tabs at the end of all lines. Textabulous!'
+ }}
+ exampleCards={exampleCards}
+ />
);
}
diff --git a/src/pages/tools/string/to-morse/index.tsx b/src/pages/tools/string/to-morse/index.tsx
index 3225da9..aae17f1 100644
--- a/src/pages/tools/string/to-morse/index.tsx
+++ b/src/pages/tools/string/to-morse/index.tsx
@@ -1,11 +1,9 @@
-import { Box } from '@mui/material';
+import ToolContent from '@components/ToolContent';
import React, { useState } from 'react';
import ToolTextInput from '@components/input/ToolTextInput';
import ToolTextResult from '@components/result/ToolTextResult';
-import ToolOptions from '@components/options/ToolOptions';
import { compute } from './service';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
-import ToolInputAndResult from '@components/ToolInputAndResult';
const initialValues = {
dotSymbol: '.',
@@ -22,42 +20,40 @@ export default function ToMorse() {
};
return (
-
- }
- result={}
- />
- [
- {
- title: 'Short Signal',
- component: (
- updateField('dotSymbol', val)}
- />
- )
- },
- {
- title: 'Long Signal',
- component: (
- updateField('dashSymbol', val)}
- />
- )
- }
- ]}
- initialValues={initialValues}
- input={input}
- />
-
+ }
+ resultComponent={}
+ getGroups={({ values, updateField }) => [
+ {
+ title: 'Short Signal',
+ component: (
+ updateField('dotSymbol', val)}
+ />
+ )
+ },
+ {
+ title: 'Long Signal',
+ component: (
+ updateField('dashSymbol', val)}
+ />
+ )
+ }
+ ]}
+ />
);
}