UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

87 lines (86 loc) 3.27 kB
import { EventEmitter, VNode } from "../../stencil-public-runtime"; import { InteractiveComponent } from "../../utils/interactive"; import { LabelableComponent } from "../../utils/label"; import { LoadableComponent } from "../../utils/loadable"; import { LocalizedComponent } from "../../utils/locale"; import { T9nComponent } from "../../utils/t9n"; import { Scale } from "../interfaces"; import { InlineEditableMessages } from "./assets/inline-editable/t9n"; /** * @slot - A slot for adding a `calcite-input`. */ export declare class InlineEditable implements InteractiveComponent, LabelableComponent, LoadableComponent, LocalizedComponent, T9nComponent { el: HTMLCalciteInlineEditableElement; /** * When `true`, interaction is prevented and the component is displayed with lower opacity. */ disabled: boolean; disabledWatcher(disabled: boolean): void; /** * When `true`, inline editing is enabled on the component. */ editingEnabled: boolean; editingEnabledWatcher(newValue: boolean, oldValue: boolean): void; /** When `true`, a busy indicator is displayed. */ loading: boolean; /** When `true` and `editingEnabled` is `true`, displays save and cancel controls on the component. */ controls: boolean; /** Specifies the size of the component. Defaults to the scale of the wrapped `calcite-input` or the scale of the closest wrapping component with a set scale. */ scale: Scale; /** Specifies a callback to be executed prior to disabling editing via the controls. When provided, the component's loading state will be handled automatically. */ afterConfirm: () => Promise<void>; /** * Made into a prop for testing purposes only * * @internal */ messages: InlineEditableMessages; /** * Use this property to override individual strings used by the component. */ messageOverrides: Partial<InlineEditableMessages>; onMessagesChange(): void; connectedCallback(): void; componentWillLoad(): Promise<void>; componentDidLoad(): void; disconnectedCallback(): void; componentDidRender(): void; render(): VNode; /** * Emits when the component's "cancel editing" button is pressed. */ calciteInlineEditableEditCancel: EventEmitter<void>; /** * Emits when the component's "confirm edits" button is pressed. */ calciteInlineEditableEditConfirm: EventEmitter<void>; /** * @internal */ calciteInternalInlineEditableEnableEditingChange: EventEmitter<void>; blurHandler(): void; private inputElement; private valuePriorToEditing; private shouldEmitCancel; private enableEditingButton; private cancelEditingButton; private confirmEditingButton; labelEl: HTMLCalciteLabelElement; mutationObserver: import("../../utils/observers").ExtendedMutationObserver; defaultMessages: InlineEditableMessages; effectiveLocale: string; effectiveLocaleChange(): void; /** Sets focus on the component. */ setFocus(): Promise<void>; mutationObserverCallback(): void; onLabelClick(): void; updateSlottedInput(): void; private get shouldShowControls(); private enableEditing; private disableEditing; private cancelEditing; private escapeKeyHandler; private cancelEditingHandler; private enableEditingHandler; private confirmChangesHandler; }