diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 68904c0..a9be707 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,13 +4,12 @@
-
+
-
-
-
-
-
+
+
+
+
@@ -27,7 +26,7 @@
@@ -46,94 +45,101 @@
"state": "OPEN"
}
}
- {
- "prStates": [
+
+}]]>
{
"selectedUrlAndAccountId": {
"url": "https://github.com/iib0011/omni-tools.git",
@@ -162,56 +168,56 @@
- {
- "keyToString": {
- "ASKED_ADD_EXTERNAL_FILES": "true",
- "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "Docker.Dockerfile build.executor": "Run",
- "Docker.Dockerfile.executor": "Run",
- "Playwright.Create transparent PNG.should make png color transparent.executor": "Run",
- "Playwright.JoinText Component.executor": "Run",
- "Playwright.JoinText Component.should merge text pieces with specified join character.executor": "Run",
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.git.unshallow": "true",
- "Vitest.compute function (1).executor": "Run",
- "Vitest.compute function.executor": "Run",
- "Vitest.mergeText.executor": "Run",
- "Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor": "Run",
- "Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor": "Run",
- "Vitest.parsePageRanges.executor": "Run",
- "Vitest.removeDuplicateLines function.executor": "Run",
- "Vitest.removeDuplicateLines function.newlines option.executor": "Run",
- "Vitest.removeDuplicateLines function.newlines option.should filter newlines when newlines is set to filter.executor": "Run",
- "Vitest.replaceText function (regexp mode).should return the original text when passed an invalid regexp.executor": "Run",
- "Vitest.replaceText function.executor": "Run",
- "Vitest.timeBetweenDates.executor": "Run",
- "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/src",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "npm.build.executor": "Run",
- "npm.dev.executor": "Run",
- "npm.lint.executor": "Run",
- "npm.prebuild.executor": "Run",
- "npm.script:create:tool.executor": "Run",
- "npm.test.executor": "Run",
- "npm.test:e2e.executor": "Run",
- "npm.test:e2e:run.executor": "Run",
- "prettierjs.PrettierConfiguration.Package": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\prettier",
- "project.structure.last.edited": "Problems",
- "project.structure.proportion": "0.0",
- "project.structure.side.proportion": "0.2",
- "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"
+
+}]]>
@@ -857,8 +866,6 @@
-
-
@@ -882,7 +889,9 @@
-
+
+
+
diff --git a/src/components/input/ToolMultiplePdfInput.tsx b/src/components/input/ToolMultiplePdfInput.tsx
index f7d551a..2afa2ff 100644
--- a/src/components/input/ToolMultiplePdfInput.tsx
+++ b/src/components/input/ToolMultiplePdfInput.tsx
@@ -14,6 +14,7 @@ interface MultiPdfInputComponentProps {
value: MultiPdfInput[];
onChange: (file: MultiPdfInput[]) => void;
}
+
export interface MultiPdfInput {
file: File;
order: number;
@@ -43,20 +44,6 @@ export default function ToolMultiFileInput({
fileInputRef.current?.click();
};
- const handleCopy = () => {
- if (isArray(value)) {
- const blob = new Blob([value[0].file], { type: value[0].file.type });
- const clipboardItem = new ClipboardItem({ [value[0].file.type]: blob });
-
- navigator.clipboard
- .write([clipboardItem])
- .then(() => showSnackBar('File copied', 'success'))
- .catch((err) => {
- showSnackBar('Failed to copy: ' + err, 'error');
- });
- }
- };
-
function handleClear() {
onChange([]);
}
@@ -175,11 +162,7 @@ export default function ToolMultiFileInput({
-
+
);
diff --git a/src/pages/tools/pdf/index.ts b/src/pages/tools/pdf/index.ts
index 6e02856..0e2627b 100644
--- a/src/pages/tools/pdf/index.ts
+++ b/src/pages/tools/pdf/index.ts
@@ -2,15 +2,13 @@ import { tool as pdfRotatePdf } from './rotate-pdf/meta';
import { meta as splitPdfMeta } from './split-pdf/meta';
import { meta as mergePdf } from './merge-pdf/meta';
import { DefinedTool } from '@tools/defineTool';
-
-export const pdfTools: DefinedTool[] = [splitPdfMeta, pdfRotatePdf, mergePdf];
import { tool as compressPdfTool } from './compress-pdf/meta';
import { tool as protectPdfTool } from './protect-pdf/meta';
-import { DefinedTool } from '@tools/defineTool';
export const pdfTools: DefinedTool[] = [
splitPdfMeta,
pdfRotatePdf,
compressPdfTool,
- protectPdfTool
+ protectPdfTool,
+ mergePdf
];
diff --git a/src/pages/tools/pdf/merge-pdf/index.tsx b/src/pages/tools/pdf/merge-pdf/index.tsx
index 5601dad..789da77 100644
--- a/src/pages/tools/pdf/merge-pdf/index.tsx
+++ b/src/pages/tools/pdf/merge-pdf/index.tsx
@@ -7,7 +7,7 @@ import ToolMultiPdfInput, {
MultiPdfInput
} from '@components/input/ToolMultiplePdfInput';
-export default function SplitPdf({ title }: ToolComponentProps) {
+export default function MergePdf({ title }: ToolComponentProps) {
const [input, setInput] = useState([]);
const [result, setResult] = useState(null);
const [isProcessing, setIsProcessing] = useState(false);
@@ -35,19 +35,18 @@ export default function SplitPdf({ title }: ToolComponentProps) {
setInput={setInput}
initialValues={input.map((i) => i.file)}
compute={compute}
- // exampleCards={exampleCards}
inputComponent={
{
- setInput(v);
+ onChange={(pdfInputs) => {
+ setInput(pdfInputs);
}}
accept={['application/pdf']}
title={'Input PDF'}
type="pdf"
/>
}
- getGroups={({ values, updateField }) => []}
+ getGroups={null}
resultComponent={