import { Settings } from "../util/Entity"; import { Container, IContainerSettings, IContainerPrivate, IContainerEvents } from "./Container"; import { ListData } from "../util/Data"; import type * as $ease from "../util/Ease"; import type { Bullet } from "./Bullet"; /** * One item of a [[Component]]'s data, holding its values and settings. */ export declare class DataItem

extends Settings { _settings: P; /** * The [[Component]] the data item belongs to. */ component: Component; /** * The object in the source data this data item was made from. */ dataContext: unknown; /** * Bullets shown for this data item. */ bullets: Array | undefined; /** * Start of the base interval each date field's value falls in, by field. * Set by a [[DateAxis]]. */ open: { [index: string]: any; } | undefined; /** * End of the base interval each date field's value falls in, by field. * Set by a [[DateAxis]]. */ close: { [index: string]: any; } | undefined; constructor(component: Component, dataContext: unknown, settings: P); /** * @ignore */ markDirty(): void; _startAnimation(): void; protected _animationTime(): number | null; protected _dispose(): void; /** * Shows the data item. * * @param duration Animation duration in milliseconds */ show(duration?: number): void; /** * Hides the data item. * * @param duration Animation duration in milliseconds */ hide(duration?: number): void; /** * Returns `true` if the data item is hidden. */ isHidden(): boolean; } export interface IComponentDataItem { visible?: boolean; } export interface IComponentSettings extends IContainerSettings { /** * Duration in milliseconds of the animation from old values to new ones, * e.g. when data changes. * * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Animating_data_values} for more info * @default 0 */ interpolationDuration?: number; /** * Easing function of the animation from old values to new ones. * * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info */ interpolationEasing?: $ease.Easing; } export interface IComponentPrivate extends IContainerPrivate { } export interface IComponentEvents extends IContainerEvents { /** * The component's data changed and was processed. */ datavalidated: {}; /** * Values of the component's data items changed. */ valueschanged: {}; } /** * Base class for elements that use data. */ export declare abstract class Component extends Container { static className: string; static classNames: Array; _settings: IComponentSettings; _privateSettings: IComponentPrivate; _dataItemSettings: IComponentDataItem; _events: IComponentEvents; protected _data: ListData; protected _dataItems: Array>; _mainDataItems: DataItem[]; protected valueFields: Array; protected fields: Array; protected _valueFields: Array; protected _valueFieldsF: { [index: string]: { fieldKey: string; workingKey: string; }; }; protected _fields: Array; protected _fieldsF: { [index: string]: string; }; _valuesDirty: boolean; protected _dataChanged: boolean; protected _dataGrouped: boolean; /** * Becomes `true` after the component's first update. */ inited: boolean; /** * The component's data: a list of data objects, each made into a data * item. * * @see {@link https://www.amcharts.com/docs/v5/concepts/data/} for more info */ set data(data: ListData); /** * @return Data */ get data(): ListData; protected _dispose(): void; protected _onDataClear(): void; protected _afterNew(): void; protected _postUpdateData(): void; /** * Updates the data in place, keeping the existing data items: each object's * values go into the data item at the same index. Extra objects are added * as new data items, and data items beyond the new data are removed. * * @param data New data */ updateData(data: Array): void; protected _updateFields(): void; /** * The component's data items. * * @return Data items */ get dataItems(): Array>; protected processDataItem(_dataItem: DataItem): void; _makeDataItem(data: unknown): this["_dataItemSettings"]; /** * Creates and processes a data item, without adding it to `dataItems`. * * @param data Data item settings * @param dataContext Object to use as the data item's `dataContext` * @return New data item */ makeDataItem(data: this["_dataItemSettings"], dataContext?: any): DataItem; /** * Creates a data item straight from settings, not from data, and adds it * to the component's data items. * * @param data Data item settings * @param dataContext Object to use as the data item's `dataContext` * @return New data item */ pushDataItem(data: this["_dataItemSettings"], dataContext?: any): DataItem; /** * @ignore */ disposeDataItem(_dataItem: DataItem): void; /** * Shows a data item. * * @param dataItem Data item * @param _duration Animation duration in milliseconds * @return Promise */ showDataItem(dataItem: DataItem, _duration?: number): Promise; /** * Hides a data item. * * @param dataItem Data item * @param _duration Animation duration in milliseconds * @return Promise */ hideDataItem(dataItem: DataItem, _duration?: number): Promise; _clearDirty(): void; protected _afterDataChange(): void; _afterChanged(): void; /** * Makes the component redraw from its data on the next frame. * * @since 5.0.21 */ markDirtyValues(_dataItem?: DataItem): void; _markDirtyGroup(): void; /** * @ignore */ markDirtySize(): void; /** * Returns the data item whose `id` matches, if any. * * @param id ID * @return Data item */ getDataItemById(id: string): DataItem | undefined; } //# sourceMappingURL=Component.d.ts.map