survey-core
Version:
A framework-independent core of the SurveyJS Form Library that works with rendering packages. Use it to integrate dynamic, interactive JSON-based forms and surveys into your app, collect user responses, and send them to your own database.
83 lines (82 loc) • 3.29 kB
TypeScript
import { Base } from "../base";
import { IAction, Action, BaseAction } from "./action";
import { ILocalizableOwner, LocalizableString } from ".././localizablestring";
export type ActionBarCssClasses = {
[index: string]: string;
};
export declare let defaultActionBarCss: ActionBarCssClasses;
export type ContainerUpdateOptions = {
needUpdateActions?: boolean;
needUpdateIsEmpty?: boolean;
};
export declare class ActionContainer<T extends BaseAction = Action> extends Base implements ILocalizableOwner {
private static ContainerID;
protected id: number;
getMarkdownHtml(text: string, name: string, item?: any): string;
getRenderer(name: string): string;
getRendererContext(locStr: LocalizableString): any;
getProcessedText(text: string): string;
getLocale(): string;
visibleActions: Array<T>;
actions: Array<T>;
private cssClassesValue;
protected getRenderedActions(): Array<T>;
containerCss: string;
sizeMode: "default" | "small";
locOwner: ILocalizableOwner;
isEmpty: boolean;
locStrsChanged(): void;
flushUpdates(): void;
protected raiseUpdate(options?: {
needUpdateActions?: boolean;
needUpdateIsEmpty?: boolean;
}): void;
protected mergeUpdateOptions(nextOptions: ContainerUpdateOptions, prevOptions: ContainerUpdateOptions): ContainerUpdateOptions;
private raiseUpdateCallback;
protected update(options?: ContainerUpdateOptions): void;
protected updateVisibleActions(): void;
private updateIsEmpty;
protected getIsEmpty(): boolean;
getVisibleActions(): T[];
protected onSet(): void;
protected onPush(action: T): void;
protected onRemove(action: T): void;
protected onActionPropertyChanged(action: T, options: {
name: string;
newValue: any;
oldValue: any;
}): void;
protected onActionPropertyChangedCallback: any;
protected patchAction(action: T): void;
protected unPatchAction(action: T): void;
private setActionCssClasses;
get hasActions(): boolean;
get hasVisibleActions(): boolean;
get renderedActions(): Array<T>;
getRootStyle(): any;
getRootCss(): string;
protected getDefaultCssClasses(): any;
protected getAllActions(): T[];
setCssClasses(val: ActionBarCssClasses, mergeWithDefault?: boolean): void;
set cssClasses(val: ActionBarCssClasses);
get cssClasses(): ActionBarCssClasses;
private createAction;
createActionCallback: ((item: IAction) => Action) | null;
protected createActionCore(owner: Base, item: IAction): Action;
addAction(val: IAction, sortByVisibleIndex?: boolean): T;
removeActionById(id: string): boolean;
setItems(items: Array<IAction>, sortByVisibleIndex?: boolean): void;
private sortItems;
private hasSetVisibleIndex;
private compareByVisibleIndex;
private isActionVisible;
subItemsShowDelay: number;
subItemsHideDelay: number;
protected popupAfterShowCallback(itemValue: T): void;
mouseOverHandler(itemValue: T): void;
initResponsivityManager(container: HTMLDivElement, delayedUpdateFunction?: (callback: () => void) => void): void;
resetResponsivityManager(): void;
getActionById(id: string): T;
private getActionIndexById;
dispose(): void;
}