feat: refactor MailViewer and add utility functions for email handling and attachment processing

This commit is contained in:
Flavio Fois
2026-02-05 22:25:35 +01:00
parent c0c1fbb08f
commit aef5c317df
6 changed files with 647 additions and 247 deletions

View File

@@ -0,0 +1,37 @@
/**
* Mail utilities barrel export
*/
// Constants
export {
IFRAME_UTIL_HTML,
EMAIL_EXTENSIONS,
CONTENT_TYPES,
PEC_FILES,
} from './constants';
// Data utilities
export {
arrayBufferToBase64,
createDataUrl,
looksLikeBase64,
tryDecodeBase64,
} from './data-utils';
// Attachment handlers
export {
openPDFAttachment,
openImageAttachment,
openEMLAttachment,
type AttachmentHandlerResult,
} from './attachment-handlers';
// Email loader
export {
getEmailFileType,
isEmailFile,
loadEmailFromPath,
openAndLoadEmail,
processEmailBody,
type LoadEmailResult,
} from './email-loader';