@kelvininc/ui-components
Version:
Kelvin UI Components
61 lines (60 loc) • 1.76 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
export declare class KvInlineEditableField {
el: HTMLKvInlineEditableFieldElement;
private slotEl;
/**
* The value of the field.
*/
value: string;
/**
* Indicates whether the editable field is disabled.
*/
disabled: boolean;
/**
* The maximum length of the editable field.
*/
maxLength: number;
/**
* Text displayed when the field has no value. Visible only when the slot is empty
* and the field is not in edit mode. Empty saves are not allowed: clearing all
* content and confirming reverts to the previous value.
*/
placeholder?: string;
/**
* Emitted when the content is edited.
*/
contentEdited: EventEmitter<string>;
/**
* Emitted when the content is focused.
*/
contentFocused: EventEmitter<void>;
/**
* Emitted when the content is blurred.
*/
contentBlured: EventEmitter<void>;
/**
* Resets the content of the editable field.
*/
resetContent(): Promise<void>;
isHovering: boolean;
isEditing: boolean;
isSaving: boolean;
isSaveDisabled: boolean;
timeoutID: number;
handleMouseHover(): void;
handleMouseLeave(): void;
handleKeyDown(event: KeyboardEvent): void;
handleDisableChange(state: any): void;
handlePlaceholderChange(placeholder: string | undefined): void;
private discardContent;
private saveChanges;
private handleBlur;
handleFocus: () => void;
private handleMaxLength;
private checkSaveBtnDisabled;
private initializeEditableContent;
private destroyEditableContent;
componentDidLoad(): void;
disconnectedCallback(): void;
render(): any;
}