mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-12-29 16:16:02 +00:00
fix: misc
This commit is contained in:
@@ -11,8 +11,8 @@ export const tool = defineTool('csv', {
|
||||
keywords: ['csv', 'separator', 'delimiter', 'change'],
|
||||
component: lazy(() => import('./index')),
|
||||
i18n: {
|
||||
name: 'csv.changeCsvSeparator.name',
|
||||
description: 'csv.changeCsvSeparator.description',
|
||||
shortDescription: 'csv.changeCsvSeparator.shortDescription'
|
||||
name: 'csv:changeCsvSeparator.title',
|
||||
description: 'csv:changeCsvSeparator.description',
|
||||
shortDescription: 'csv:changeCsvSeparator.shortDescription'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -149,35 +149,35 @@ export default function CsvToJson({ title }: ToolComponentProps) {
|
||||
exampleCards={exampleCards}
|
||||
inputComponent={
|
||||
<ToolTextInput
|
||||
title={t('csv.csvToJson.inputTitle')}
|
||||
title={t('csv:csvToJson.inputTitle')}
|
||||
value={input}
|
||||
onChange={setInput}
|
||||
/>
|
||||
}
|
||||
resultComponent={
|
||||
<ToolTextResult
|
||||
title={t('csv.csvToJson.resultTitle')}
|
||||
title={t('csv:csvToJson.resultTitle')}
|
||||
value={result}
|
||||
extension={'json'}
|
||||
/>
|
||||
}
|
||||
getGroups={({ values, updateField }) => [
|
||||
{
|
||||
title: t('csv.csvToJson.inputCsvFormat'),
|
||||
title: t('csv:csvToJson.inputCsvFormat'),
|
||||
component: (
|
||||
<Box>
|
||||
<TextFieldWithDesc
|
||||
description={t('csv.csvToJson.columnSeparator')}
|
||||
description={t('csv:csvToJson.columnSeparator')}
|
||||
value={values.delimiter}
|
||||
onOwnChange={(val) => updateField('delimiter', val)}
|
||||
/>
|
||||
<TextFieldWithDesc
|
||||
description={t('csv.csvToJson.fieldQuote')}
|
||||
description={t('csv:csvToJson.fieldQuote')}
|
||||
onOwnChange={(val) => updateField('quote', val)}
|
||||
value={values.quote}
|
||||
/>
|
||||
<TextFieldWithDesc
|
||||
description={t('csv.csvToJson.commentSymbol')}
|
||||
description={t('csv:csvToJson.commentSymbol')}
|
||||
value={values.comment}
|
||||
onOwnChange={(val) => updateField('comment', val)}
|
||||
/>
|
||||
@@ -185,26 +185,26 @@ export default function CsvToJson({ title }: ToolComponentProps) {
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t('csv.csvToJson.conversionOptions'),
|
||||
title: t('csv:csvToJson.conversionOptions'),
|
||||
component: (
|
||||
<Box>
|
||||
<CheckboxWithDesc
|
||||
checked={values.useHeaders}
|
||||
onChange={(value) => updateField('useHeaders', value)}
|
||||
title={t('csv.csvToJson.useHeaders')}
|
||||
description={t('csv.csvToJson.useHeadersDescription')}
|
||||
title={t('csv:csvToJson.useHeaders')}
|
||||
description={t('csv:csvToJson.useHeadersDescription')}
|
||||
/>
|
||||
<CheckboxWithDesc
|
||||
checked={values.skipEmptyLines}
|
||||
onChange={(value) => updateField('skipEmptyLines', value)}
|
||||
title={t('csv.csvToJson.skipEmptyLines')}
|
||||
description={t('csv.csvToJson.skipEmptyLinesDescription')}
|
||||
title={t('csv:csvToJson.skipEmptyLines')}
|
||||
description={t('csv:csvToJson.skipEmptyLinesDescription')}
|
||||
/>
|
||||
<CheckboxWithDesc
|
||||
checked={values.dynamicTypes}
|
||||
onChange={(value) => updateField('dynamicTypes', value)}
|
||||
title={t('csv.csvToJson.dynamicTypes')}
|
||||
description={t('csv.csvToJson.dynamicTypesDescription')}
|
||||
title={t('csv:csvToJson.dynamicTypes')}
|
||||
description={t('csv:csvToJson.dynamicTypesDescription')}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
|
||||
@@ -117,59 +117,59 @@ export default function FindIncompleteCsvRecords({
|
||||
updateField
|
||||
}) => [
|
||||
{
|
||||
title: t('csv.findIncompleteCsvRecords.csvInputOptions'),
|
||||
title: t('csv:findIncompleteCsvRecords.csvInputOptions'),
|
||||
component: (
|
||||
<Box>
|
||||
<TextFieldWithDesc
|
||||
value={values.csvSeparator}
|
||||
onOwnChange={(val) => updateField('csvSeparator', val)}
|
||||
description={t(
|
||||
'csv.findIncompleteCsvRecords.csvSeparatorDescription'
|
||||
'csv:findIncompleteCsvRecords.csvSeparatorDescription'
|
||||
)}
|
||||
/>
|
||||
<TextFieldWithDesc
|
||||
value={values.quoteCharacter}
|
||||
onOwnChange={(val) => updateField('quoteCharacter', val)}
|
||||
description={t(
|
||||
'csv.findIncompleteCsvRecords.quoteCharacterDescription'
|
||||
'csv:findIncompleteCsvRecords.quoteCharacterDescription'
|
||||
)}
|
||||
/>
|
||||
<TextFieldWithDesc
|
||||
value={values.commentCharacter}
|
||||
onOwnChange={(val) => updateField('commentCharacter', val)}
|
||||
description={t(
|
||||
'csv.findIncompleteCsvRecords.commentCharacterDescription'
|
||||
'csv:findIncompleteCsvRecords.commentCharacterDescription'
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t('csv.findIncompleteCsvRecords.checkingOptions'),
|
||||
title: t('csv:findIncompleteCsvRecords.checkingOptions'),
|
||||
component: (
|
||||
<Box>
|
||||
<CheckboxWithDesc
|
||||
checked={values.emptyLines}
|
||||
onChange={(value) => updateField('emptyLines', value)}
|
||||
title={t('csv.findIncompleteCsvRecords.deleteLinesWithNoData')}
|
||||
title={t('csv:findIncompleteCsvRecords.deleteLinesWithNoData')}
|
||||
description={t(
|
||||
'csv.findIncompleteCsvRecords.deleteLinesWithNoDataDescription'
|
||||
'csv:findIncompleteCsvRecords.deleteLinesWithNoDataDescription'
|
||||
)}
|
||||
/>
|
||||
|
||||
<CheckboxWithDesc
|
||||
checked={values.emptyValues}
|
||||
onChange={(value) => updateField('emptyValues', value)}
|
||||
title={t('csv.findIncompleteCsvRecords.findEmptyValues')}
|
||||
title={t('csv:findIncompleteCsvRecords.findEmptyValues')}
|
||||
description={t(
|
||||
'csv.findIncompleteCsvRecords.findEmptyValuesDescription'
|
||||
'csv:findIncompleteCsvRecords.findEmptyValuesDescription'
|
||||
)}
|
||||
/>
|
||||
|
||||
<CheckboxWithDesc
|
||||
checked={values.messageLimit}
|
||||
onChange={(value) => updateField('messageLimit', value)}
|
||||
title={t('csv.findIncompleteCsvRecords.limitNumberOfMessages')}
|
||||
title={t('csv:findIncompleteCsvRecords.limitNumberOfMessages')}
|
||||
/>
|
||||
|
||||
{values.messageLimit && (
|
||||
@@ -179,7 +179,7 @@ export default function FindIncompleteCsvRecords({
|
||||
type="number"
|
||||
inputProps={{ min: 1 }}
|
||||
description={t(
|
||||
'csv.findIncompleteCsvRecords.messageLimitDescription'
|
||||
'csv:findIncompleteCsvRecords.messageLimitDescription'
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
@@ -193,14 +193,14 @@ export default function FindIncompleteCsvRecords({
|
||||
input={input}
|
||||
inputComponent={
|
||||
<ToolTextInput
|
||||
title={t('csv.findIncompleteCsvRecords.inputTitle')}
|
||||
title={t('csv:findIncompleteCsvRecords.inputTitle')}
|
||||
value={input}
|
||||
onChange={setInput}
|
||||
/>
|
||||
}
|
||||
resultComponent={
|
||||
<ToolTextResult
|
||||
title={t('csv.findIncompleteCsvRecords.resultTitle')}
|
||||
title={t('csv:findIncompleteCsvRecords.resultTitle')}
|
||||
value={result}
|
||||
/>
|
||||
}
|
||||
@@ -210,7 +210,7 @@ export default function FindIncompleteCsvRecords({
|
||||
setInput={setInput}
|
||||
compute={compute}
|
||||
toolInfo={{
|
||||
title: t('csv.findIncompleteCsvRecords.toolInfo.title', { title }),
|
||||
title: t('csv:findIncompleteCsvRecords.toolInfo.title', { title }),
|
||||
description: longDescription
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -14,8 +14,8 @@ export const tool = defineTool('csv', {
|
||||
'This tool allows you to find incomplete or missing records in CSV data. It can detect missing columns, empty values, and other data quality issues in your CSV files. You can customize the CSV parsing options and set limits on error reporting.',
|
||||
component: lazy(() => import('./index')),
|
||||
i18n: {
|
||||
name: 'csv.findIncompleteCsvRecords.name',
|
||||
description: 'csv.findIncompleteCsvRecords.description',
|
||||
shortDescription: 'csv.findIncompleteCsvRecords.shortDescription'
|
||||
name: 'csv:findIncompleteCsvRecords.title',
|
||||
description: 'csv:findIncompleteCsvRecords.description',
|
||||
shortDescription: 'csv:findIncompleteCsvRecords.shortDescription'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -145,7 +145,7 @@ export default function InsertCsvColumns({
|
||||
updateField
|
||||
}) => [
|
||||
{
|
||||
title: t('csv.insertCsvColumns.csvToInsert'),
|
||||
title: t('csv:insertCsvColumns.csvToInsert'),
|
||||
component: (
|
||||
<Box>
|
||||
<TextFieldWithDesc
|
||||
@@ -153,40 +153,40 @@ export default function InsertCsvColumns({
|
||||
rows={3}
|
||||
value={values.csvToInsert}
|
||||
onOwnChange={(val) => updateField('csvToInsert', val)}
|
||||
title={t('csv.insertCsvColumns.csvSeparator')}
|
||||
description={t('csv.insertCsvColumns.csvToInsertDescription')}
|
||||
title={t('csv:insertCsvColumns.csvSeparator')}
|
||||
description={t('csv:insertCsvColumns.csvToInsertDescription')}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t('csv.insertCsvColumns.csvOptions'),
|
||||
title: t('csv:insertCsvColumns.csvOptions'),
|
||||
component: (
|
||||
<Box>
|
||||
<TextFieldWithDesc
|
||||
value={values.separator}
|
||||
onOwnChange={(val) => updateField('separator', val)}
|
||||
description={t('csv.insertCsvColumns.separatorDescription')}
|
||||
description={t('csv:insertCsvColumns.separatorDescription')}
|
||||
/>
|
||||
<TextFieldWithDesc
|
||||
value={values.quoteChar}
|
||||
onOwnChange={(val) => updateField('quoteChar', val)}
|
||||
description={t('csv.insertCsvColumns.quoteCharDescription')}
|
||||
description={t('csv:insertCsvColumns.quoteCharDescription')}
|
||||
/>
|
||||
<TextFieldWithDesc
|
||||
value={values.commentCharacter}
|
||||
onOwnChange={(val) => updateField('commentCharacter', val)}
|
||||
description={t('csv.insertCsvColumns.commentCharacterDescription')}
|
||||
description={t('csv:insertCsvColumns.commentCharacterDescription')}
|
||||
/>
|
||||
<SelectWithDesc
|
||||
selected={values.customFill}
|
||||
options={[
|
||||
{
|
||||
label: t('csv.insertCsvColumns.fillWithEmptyValues'),
|
||||
label: t('csv:insertCsvColumns.fillWithEmptyValues'),
|
||||
value: false
|
||||
},
|
||||
{
|
||||
label: t('csv.insertCsvColumns.fillWithCustomValues'),
|
||||
label: t('csv:insertCsvColumns.fillWithCustomValues'),
|
||||
value: true
|
||||
}
|
||||
]}
|
||||
@@ -196,40 +196,40 @@ export default function InsertCsvColumns({
|
||||
updateField('customFillValue', ''); // Reset custom fill value
|
||||
}
|
||||
}}
|
||||
description={t('csv.insertCsvColumns.customFillDescription')}
|
||||
description={t('csv:insertCsvColumns.customFillDescription')}
|
||||
/>
|
||||
{values.customFill && (
|
||||
<TextFieldWithDesc
|
||||
value={values.customFillValue}
|
||||
onOwnChange={(val) => updateField('customFillValue', val)}
|
||||
description={t('csv.insertCsvColumns.customFillValueDescription')}
|
||||
description={t('csv:insertCsvColumns.customFillValueDescription')}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t('csv.insertCsvColumns.positionOptions'),
|
||||
title: t('csv:insertCsvColumns.positionOptions'),
|
||||
component: (
|
||||
<Box>
|
||||
<SelectWithDesc
|
||||
selected={values.insertingPosition}
|
||||
options={[
|
||||
{
|
||||
label: t('csv.insertCsvColumns.prependColumns'),
|
||||
label: t('csv:insertCsvColumns.prependColumns'),
|
||||
value: 'prepend'
|
||||
},
|
||||
{
|
||||
label: t('csv.insertCsvColumns.appendColumns'),
|
||||
label: t('csv:insertCsvColumns.appendColumns'),
|
||||
value: 'append'
|
||||
},
|
||||
{
|
||||
label: t('csv.insertCsvColumns.customPosition'),
|
||||
label: t('csv:insertCsvColumns.customPosition'),
|
||||
value: 'custom'
|
||||
}
|
||||
]}
|
||||
onChange={(value) => updateField('insertingPosition', value)}
|
||||
description={t('csv.insertCsvColumns.insertingPositionDescription')}
|
||||
description={t('csv:insertCsvColumns.insertingPositionDescription')}
|
||||
/>
|
||||
|
||||
{values.insertingPosition === 'custom' && (
|
||||
@@ -237,17 +237,17 @@ export default function InsertCsvColumns({
|
||||
selected={values.customPostionOptions}
|
||||
options={[
|
||||
{
|
||||
label: t('csv.insertCsvColumns.headerName'),
|
||||
label: t('csv:insertCsvColumns.headerName'),
|
||||
value: 'headerName'
|
||||
},
|
||||
{
|
||||
label: t('csv.insertCsvColumns.position'),
|
||||
label: t('csv:insertCsvColumns.position'),
|
||||
value: 'rowNumber'
|
||||
}
|
||||
]}
|
||||
onChange={(value) => updateField('customPostionOptions', value)}
|
||||
description={t(
|
||||
'csv.insertCsvColumns.customPositionOptionsDescription'
|
||||
'csv:insertCsvColumns.customPositionOptionsDescription'
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
@@ -258,7 +258,7 @@ export default function InsertCsvColumns({
|
||||
selected={values.headerName}
|
||||
options={headerOptions}
|
||||
onChange={(value) => updateField('headerName', value)}
|
||||
description={t('csv.insertCsvColumns.headerNameDescription')}
|
||||
description={t('csv:insertCsvColumns.headerNameDescription')}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -269,7 +269,7 @@ export default function InsertCsvColumns({
|
||||
onOwnChange={(val) =>
|
||||
updateField('rowNumber', parseInt(val) || 0)
|
||||
}
|
||||
description={t('csv.insertCsvColumns.rowNumberDescription')}
|
||||
description={t('csv:insertCsvColumns.rowNumberDescription')}
|
||||
type="number"
|
||||
/>
|
||||
)}
|
||||
@@ -283,14 +283,14 @@ export default function InsertCsvColumns({
|
||||
title={title}
|
||||
inputComponent={
|
||||
<ToolTextInput
|
||||
title={t('csv.insertCsvColumns.inputTitle')}
|
||||
title={t('csv:insertCsvColumns.inputTitle')}
|
||||
value={input}
|
||||
onChange={setInput}
|
||||
/>
|
||||
}
|
||||
resultComponent={
|
||||
<ToolTextResult
|
||||
title={t('csv.insertCsvColumns.resultTitle')}
|
||||
title={t('csv:insertCsvColumns.resultTitle')}
|
||||
value={result}
|
||||
extension={'csv'}
|
||||
/>
|
||||
@@ -301,8 +301,8 @@ export default function InsertCsvColumns({
|
||||
input={input}
|
||||
setInput={setInput}
|
||||
toolInfo={{
|
||||
title: t('csv.insertCsvColumns.toolInfo.title'),
|
||||
description: t('csv.insertCsvColumns.toolInfo.description')
|
||||
title: t('csv:insertCsvColumns.toolInfo.title'),
|
||||
description: t('csv:insertCsvColumns.toolInfo.description')
|
||||
}}
|
||||
exampleCards={exampleCards}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user