UNPKG

@limetech/lime-elements

Version:
69 lines 2.23 kB
import { EventEmitter } from '../../stencil-public-runtime'; import { Languages } from '../date-picker/date.types'; import { Email } from './email-viewer.types'; /** * This is a private component, used to render `.eml` files inside * `limel-file-viewer`. * * :::note * If `bodyHtml` is provided, it will be rendered using `innerHTML`. * Consumers should pre-sanitize `bodyHtml` before passing it to the component. * ::: * * @exampleComponent limel-example-email-viewer-plain-text * @exampleComponent limel-example-email-viewer-inline-image * @exampleComponent limel-example-email-viewer-remote-image-policy * * @private */ export declare class EmailViewer { /** * The email message to display. * * If `email.bodyHtml` is set directly, consumers must provide sanitized * HTML. */ email?: Email; /** * Optional URL to render as a final fallback using an `<object type="text/plain">`. */ fallbackUrl?: string; /** * Defines the localization for translations. */ language: Languages; /** * Controls whether remote images (http/https) are loaded. * * If omitted, the component treats this as a per-email setting. * Consumers that want to remember the choice (per session/global) can * provide this prop and listen for `allowRemoteImagesChange`. */ allowRemoteImages?: boolean; private allowRemoteImagesState; /** * Emitted when the user requests remote images to be loaded. * * @internal */ allowRemoteImagesChange: EventEmitter<boolean>; protected resetAllowRemoteImages(newEmail?: Email, oldEmail?: Email): void; render(): any; private renderHeaders; private renderBody; private renderBodyHtml; private renderBodyText; private renderFallbackUrl; private renderEmailHeader; private getHeaderValues; private renderAttachments; private renderAttachment; private renderSizeBadge; private getTranslation; private shouldShowRemoteImagesBanner; private renderRemoteImageBanner; private onEnableRemoteImagesClick; private enableRemoteImages; private getAllowRemoteImages; } //# sourceMappingURL=email-viewer.d.ts.map