@blinkk/editor
Version:
Structured content editor with live previews.
40 lines (39 loc) • 1.51 kB
TypeScript
import { DeepObject, Field, FieldComponent, FieldConfig, SelectiveEditor, TemplateResult, Types } from '@blinkk/selective-edit';
import { DeepClean } from '../../utility/deepClean';
import { LiveEditorGlobalConfig } from '../../editor/editor';
export interface ExampleFieldUrl {
label: string;
url: string;
}
export interface ExampleFieldConfig extends FieldConfig {
cleanerKeys?: Array<string>;
docUrls?: Array<ExampleFieldUrl>;
field: FieldConfig;
}
export declare class ExampleFieldField extends Field {
cleaner: DeepClean;
config: ExampleFieldConfig;
originalFieldConfig: FieldConfig;
field?: FieldComponent | null;
isExpanded?: boolean;
constructor(types: Types, config: ExampleFieldConfig, globalConfig: LiveEditorGlobalConfig, fieldType?: string);
handleExpandClick(evt: Event): void;
get isClean(): boolean;
get isValid(): boolean;
/**
* No original value update for the example.
*
* @param editor Selective editor used to render the template.
* @param data Data provided to render the template.
*/
template(editor: SelectiveEditor, data: DeepObject): TemplateResult;
/**
* Show the field, but also show the config that is used to
* generate the field.
*
* @param editor Selective editor used to render the template.
* @param data Data provided to render the template.
*/
templateStructure(editor: SelectiveEditor, data: DeepObject): TemplateResult;
get value(): any;
}