tycho-components 0.16.4 → 0.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -68,7 +68,7 @@ function AppDropzoneBodyInner({ folder, onSuccess, onError, accept, messages, on
|
|
|
68
68
|
const customMessage = messages?.[key]?.trim();
|
|
69
69
|
return customMessage || t(key);
|
|
70
70
|
};
|
|
71
|
-
return (_jsxs("div", { className: "dropzone-container", children: [!file && (_jsx(Dropzone, { onDrop: (acceptedFiles) => handleDrop(acceptedFiles), accept: accept, maxFiles: 1, children: ({ getRootProps, getInputProps }) => (_jsxs("div", { ...getRootProps(), className: "dropzone", children: [_jsx("input", { ...getInputProps() }), _jsx("span", { children: resolveMessage('label.dropzone') })] })) })), file && (_jsxs("div", { className: "uploaded-file", children: [preview && _jsx("img", { className: "preview", src: preview, alt: "" }), !preview && (_jsxs(_Fragment, { children: [_jsx("b", { children: resolveMessage('label.uploaded.file') }), _jsx("span", { children: file.name })] })), showConfirmButton && (_jsxs("div", { className: "buttons", children: [_jsx(Button, { onClick: handleCancel, text: t('common:button.cancel'), size: "small", mode: "outlined", color: "danger" }), _jsx(Button, { onClick: upload, text: t('
|
|
71
|
+
return (_jsxs("div", { className: "dropzone-container", children: [!file && (_jsx(Dropzone, { onDrop: (acceptedFiles) => handleDrop(acceptedFiles), accept: accept, maxFiles: 1, children: ({ getRootProps, getInputProps }) => (_jsxs("div", { ...getRootProps(), className: "dropzone", children: [_jsx("input", { ...getInputProps() }), _jsx("span", { children: resolveMessage('label.dropzone') })] })) })), file && (_jsxs("div", { className: "uploaded-file", children: [preview && _jsx("img", { className: "preview", src: preview, alt: "" }), !preview && (_jsxs(_Fragment, { children: [_jsx("b", { children: resolveMessage('label.uploaded.file') }), _jsx("span", { children: file.name })] })), showConfirmButton && (_jsxs("div", { className: "buttons", children: [_jsx(Button, { onClick: handleCancel, text: t('common:button.cancel'), size: "small", mode: "outlined", color: "danger" }), _jsx(Button, { onClick: upload, text: t('common:button.confirm'), size: "small", mode: "outlined", disabled: disableConfirm })] }))] }))] }));
|
|
72
72
|
}
|
|
73
73
|
const AppDropzoneBody = forwardRef(AppDropzoneBodyInner);
|
|
74
74
|
export default AppDropzoneBody;
|
|
@@ -226,7 +226,6 @@ export declare const commonResources: {
|
|
|
226
226
|
upload: {
|
|
227
227
|
'label.dropzone': string;
|
|
228
228
|
'label.uploaded.file': string;
|
|
229
|
-
'label.confirm': string;
|
|
230
229
|
'modal.title': string;
|
|
231
230
|
'error.uploading.image': string;
|
|
232
231
|
};
|
|
@@ -543,7 +542,6 @@ export declare const commonResources: {
|
|
|
543
542
|
upload: {
|
|
544
543
|
'label.dropzone': string;
|
|
545
544
|
'label.uploaded.file': string;
|
|
546
|
-
'label.confirm': string;
|
|
547
545
|
'modal.title': string;
|
|
548
546
|
'error.uploading.image': string;
|
|
549
547
|
};
|
|
@@ -862,7 +860,6 @@ export declare const commonResources: {
|
|
|
862
860
|
upload: {
|
|
863
861
|
'label.dropzone': string;
|
|
864
862
|
'label.uploaded.file': string;
|
|
865
|
-
'label.confirm': string;
|
|
866
863
|
'modal.title': string;
|
|
867
864
|
'error.uploading.image': string;
|
|
868
865
|
};
|
|
@@ -2,21 +2,18 @@ export declare const UploadTexts: {
|
|
|
2
2
|
en: {
|
|
3
3
|
'label.dropzone': string;
|
|
4
4
|
'label.uploaded.file': string;
|
|
5
|
-
'label.confirm': string;
|
|
6
5
|
'modal.title': string;
|
|
7
6
|
'error.uploading.image': string;
|
|
8
7
|
};
|
|
9
8
|
'pt-BR': {
|
|
10
9
|
'label.dropzone': string;
|
|
11
10
|
'label.uploaded.file': string;
|
|
12
|
-
'label.confirm': string;
|
|
13
11
|
'modal.title': string;
|
|
14
12
|
'error.uploading.image': string;
|
|
15
13
|
};
|
|
16
14
|
it: {
|
|
17
15
|
'label.dropzone': string;
|
|
18
16
|
'label.uploaded.file': string;
|
|
19
|
-
'label.confirm': string;
|
|
20
17
|
'modal.title': string;
|
|
21
18
|
'error.uploading.image': string;
|
|
22
19
|
};
|
|
@@ -2,21 +2,18 @@ export const UploadTexts = {
|
|
|
2
2
|
en: {
|
|
3
3
|
'label.dropzone': 'Drag and drop or click to upload a file',
|
|
4
4
|
'label.uploaded.file': 'You are uploading the following file:',
|
|
5
|
-
'label.confirm': 'Confirm',
|
|
6
5
|
'modal.title': 'Upload a file',
|
|
7
6
|
'error.uploading.image': 'An error occurred while uploading a file. Contact the administrator.',
|
|
8
7
|
},
|
|
9
8
|
'pt-BR': {
|
|
10
9
|
'label.dropzone': 'Arraste e solte ou clique para enviar um arquivo.',
|
|
11
10
|
'label.uploaded.file': 'Você está enviando o seguinte arquivo:',
|
|
12
|
-
'label.confirm': 'Confirme',
|
|
13
11
|
'modal.title': 'Upload de arquivo',
|
|
14
12
|
'error.uploading.image': 'Ocorreu um erro ao enviar o arquivo. Entre em contato com o administrador.',
|
|
15
13
|
},
|
|
16
14
|
it: {
|
|
17
15
|
'label.dropzone': 'Trascina e rilascia o clicca per caricare un file',
|
|
18
16
|
'label.uploaded.file': 'Stai caricando il seguente file:',
|
|
19
|
-
'label.confirm': 'Conferma',
|
|
20
17
|
'modal.title': 'Carica un file',
|
|
21
18
|
'error.uploading.image': "Si è verificato un errore durante il caricamento del file. Contatta l'amministratore.",
|
|
22
19
|
},
|