import { CreatorPresetBase, ICreatorPreset } from "./presets-base"; import { ICreatorPresetToolboxItem } from "./presets-toolbox"; import { ICreatorPresetTab } from "./presets-tabs"; import { IToolboxCategoryDefinition } from "../toolbox"; import { ISurveyPropertyGridDefinition } from "../question-editor/definition"; import { SurveyCreatorModel } from "../creator-base"; import { ConfigsHash } from "../utils/configs"; export interface ICreatorPresetData { languages?: { creator?: string; surveyLocales?: Array; useEnglishNames?: boolean; }; propertyGrid?: { definition?: ISurveyPropertyGridDefinition; }; tabs?: { items?: Array; activeTab?: string; }; toolbox?: { definition?: Array; categories?: Array; showCategoryTitles?: boolean; }; options?: any; localization?: any; } /** * A base interface for the [`IPresetListItem`](/survey-creator/documentation/api-reference/IPresetListItem) and [`IPreset`](/survey-creator/documentation/api-reference/IPreset) interfaces. * @since 3.0.0 */ export interface IPresetBase { /** * The preset's unique name. * @since 3.0.0 */ name: string; /** * Specifies whether the preset is visible in the preset list. * @since 3.0.0 */ visible?: boolean; } /** * Describes a UI preset configuration. * * A preset configuration specifies whether a preset is visible in the preset list and contains a JSON object that defines how the preset customizes the Survey Creator UI. * @since 3.0.0 */ export interface IPreset extends IPresetBase { /** * Survey Creator UI configuration associated with the preset. * @since 3.0.0 */ json?: ICreatorPresetData | any; } export declare const PredefinedCreatorPresets: string[]; export declare const defaultCreatorPresetsOrder: string[]; /** * Registers UI presets to make them available for customization in the UI Preset Editor. * * [How to Register Predefined Presets](https://surveyjs.io/survey-creator/documentation/ui-preset-editor#register-predefined-presets (linkStyle)) * @param presets One or more UI preset configuations separated by commas, or an object containing multiple configurations. * @since 3.0.0 */ export declare function registerUIPreset(...presets: Array | IPreset>): void; /** * A class that instantiates a UI preset using an [`IPreset`](https://surveyjs.io/survey-creator/documentation/api-reference/uipreset) JSON configuration and provides an API to apply it. * * [How to Apply a UI Preset](https://surveyjs.io/survey-creator/documentation/ui-preset-editor#apply-a-ui-preset (linkStyle)) * @since 3.0.0 */ export declare class UIPreset extends CreatorPresetBase { constructor(data: ICreatorPresetData | IPreset); name: string; getPath(): string; getJson(): ICreatorPresetData; /** * Applies the preset to a Survey Creator instance. * * [How to Apply a UI Preset](https://surveyjs.io/survey-creator/documentation/ui-preset-editor#apply-a-ui-preset (linkStyle)) * @param creator A [`SurveyCreatorModel`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator) instance to which the preset is applied. * @since 3.0.0 */ applyTo(creator: SurveyCreatorModel): void; apply(creator: SurveyCreatorModel, internal?: boolean): void; protected applyLocalization(): void; protected createPresets(): Array; } export declare const CreatorPresets: { [index: string]: IPreset; };