import { ComponentViewerInterface, ComponentViewerError, FeatureStatus, AlertService, MutatorClientInterface, PreferenceServiceInterface, ComponentViewerItem, ItemManagerInterface, SyncServiceInterface } from '@standardnotes/services'; import { FeaturesService } from '..'; import { ActionObserver, ComponentEventObserver, ComponentMessage, DecryptedItemInterface, ItemContent, Environment, Platform, UIFeature } from '@standardnotes/models'; import { ComponentViewerRequiresComponentManagerProperties } from './ComponentViewerRequiresComponentManagerFunctions'; import { IframeComponentFeatureDescription, NativeFeatureIdentifier } from '@standardnotes/features'; import { LoggerInterface } from '@standardnotes/utils'; import { Uuid } from '@standardnotes/domain-core'; export declare class ComponentViewer implements ComponentViewerInterface { private componentOrFeature; private services; private options; private config; private streamItems?; private streamContextItemOriginalMessage?; private streamItemsOriginalMessage?; private removeItemObserver; identifier: string; private actionObservers; private removeFeaturesObserver; private eventObservers; private dealloced; private window?; private readonly; lockReadonly: boolean; sessionKey?: string; constructor(componentOrFeature: UIFeature, services: { items: ItemManagerInterface; mutator: MutatorClientInterface; sync: SyncServiceInterface; alerts: AlertService; preferences: PreferenceServiceInterface; features: FeaturesService; logger: LoggerInterface; }, options: { item: ComponentViewerItem; url: string; actionObserver?: ActionObserver; }, config: { environment: Environment; platform: Platform; componentManagerFunctions: ComponentViewerRequiresComponentManagerProperties; }); getComponentOrFeatureItem(): UIFeature; get url(): string; get isDesktop(): boolean; get isMobile(): boolean; destroy(): void; private deinit; addEventObserver(observer: ComponentEventObserver): () => void; private notifyEventObservers; addActionObserver(observer: ActionObserver): () => void; setReadonly(readonly: boolean): void; get componentUniqueIdentifier(): NativeFeatureIdentifier | Uuid; getFeatureStatus(): FeatureStatus; private getContextItem; private isOfflineRestricted; private hasUrlError; shouldRender(): boolean; getError(): ComponentViewerError | undefined; private updateOurComponentRefFromChangedItems; private handleChangesInItems; private sendManyItemsThroughBridge; private sendContextItemThroughBridge; private sendItemsInReply; private jsonForItem; private getClientData; contentForItem(item: DecryptedItemInterface): ItemContent | undefined; private replyToMessage; /** * @param essential If the message is non-essential, no alert will be shown * if we can no longer find the window. */ private sendMessage; private responseItemsByRemovingPrivateProperties; /** Called by client when the iframe is ready */ setWindow(window: Window): void; postActiveThemes(): void; handleMessage(message: ComponentMessage): void; private handleStreamItemsMessage; private handleStreamContextItemMessage; /** * Save items is capable of saving existing items, and also creating new ones * if they don't exist. */ private handleSaveItemsMessage; private handleCreateItemsMessage; private handleDeleteItemsMessage; private handleSetComponentPreferencesMessage; private handleSetSizeEvent; private getIframe; }