import { AnyDoEntity, Event, EventHandler, EventListener, EventMapOf, Form, HybridActionContextElements, HybridManagerEventMap, InitModelOf, ObjectOrChildModel, Session, Widget } from '../../index'; /** * A utility to invoke remote Java actions to simplify the interaction of Scout JS and Scout Classic code * to facilitate the creation of hybrid applications. */ export declare class HybridManager extends Widget { eventMap: HybridManagerEventMap; self: HybridManager; widgets: Record; constructor(); static get(session?: Session, wait?: false): HybridManager; static get(session?: Session, wait?: true): JQuery.Promise; protected _init(model: InitModelOf): void; protected _setWidgets(widgets: Record>): void; protected _ensureWidgets(modelsOrWidgets: Record>): Record; protected _triggerWidgetAdd(id: string, widget: Widget): void; protected _triggerWidgetRemove(id: string, widget: Widget): void; /** @internal */ onHybridEvent(id: string, eventType: string, data: AnyDoEntity, contextElements: HybridActionContextElements): void; /** @internal */ onHybridWidgetEvent(id: string, eventType: string, data: AnyDoEntity): void; protected _onHybridWidgetEvent(widget: Widget, eventType: string, data: AnyDoEntity): void; protected _onHybridFormEvent(form: HybridManagerForm, eventType: string, data: AnyDoEntity): void; protected _createEventId(): string; /** * Calls the hybrid action that matches the given action type. * * @returns the id of the triggered hybrid action * @see IHybridAction.java */ callAction(actionType: string, data?: AnyDoEntity, contextElements?: HybridActionContextElements): string; /** * Calls the hybrid action that matches the given action type and returns a promise that will be resolved once the corresponding hybridActionEnd event arrives. * The resolved value consist of the `data` value sent back from the server. To access the `contextElements`, use {@link callActionAndWaitWithContext} instead. * * @returns a promise that will be resolved with the result `data` once the corresponding hybridActionEnd event arrives. * @see IHybridAction * @see AbstractHybridAction.fireHybridActionEndEvent */ callActionAndWait(actionType: string, data?: AnyDoEntity, contextElements?: HybridActionContextElements): JQuery.Promise; /** * Calls the hybrid action that matches the given action type and returns a promise that will be resolved once the corresponding hybridActionEnd event arrives. * The resolved value is an object with the `data` and `contextElements` values sent back from the user. {@link callActionAndWait} can be used instead if only * the content of the `data` attribute is relevant. * * @returns a promise that will be resolved with the entire result object once the corresponding hybridActionEnd event arrives. * @see IHybridAction * @see AbstractHybridAction.fireHybridActionEndEvent */ callActionAndWaitWithContext(actionType: string, data?: AnyDoEntity, contextElements?: HybridActionContextElements): JQuery.Promise; /** * Calls the form hybrid action with the action type `openForm:${modelVariant}` to create, start and show the requested form. * * @param modelVariant the suffix for the actionType so the correct hybrid action can be resolved * @param data a data object that will be passed to the hybrid action * @returns a promise that will be resolved once the form has been created */ openForm(modelVariant: string, data?: AnyDoEntity): JQuery.Promise
; /** * Calls the form hybrid action with the action type `createForm:${modelVariant}` to create and start the requested form without showing it. * * @param modelVariant the suffix for the actionType so the correct hybrid action can be resolved * @param data a data object that will be passed to the hybrid action * @returns a promise that will be resolved once the form has been created */ createForm(modelVariant: string, data?: AnyDoEntity): JQuery.Promise; protected _onFormAdd(form: HybridManagerForm): HybridManagerForm; one>(type: K | `${K}:${string}`, handler: EventHandler[K] & Event>): void; on>(type: K | `${K}:${string}`, handler: EventHandler[K] & Event>): EventListener; off>(type: K | `${K}:${string}`, handler?: EventHandler[K] & Event>): void; when>(type: K | `${K}:${string}`): JQuery.Promise[K] & Event>; } export interface HybridManagerActionEndEventResult { data: AnyDoEntity; contextElements?: HybridActionContextElements; } interface HybridManagerForm extends Form { /** * @returns true if {@link FormEventMap.close} event was triggered at least once for this form. */ __closeTriggered?: boolean; } export {}; //# sourceMappingURL=HybridManager.d.ts.map