import { AttributePicker, AttributePickerPickedEvent } from "./attribute-picker"; import { type PropertyValues } from "lit"; import { type AssetDescriptor, type AttributeDescriptor } from "@openremote/model"; import type { ListItem } from "@openremote/or-vaadin-components/or-vaadin-list-box"; /** * Custom Event that is dispatched upon closing the dialog. * Contains a map that is keyed by {@link AssetDescriptor.name}, with an array of {@link AttributeDescriptor}s of the selected attributes. */ export declare class OrAssetTypeAttributePickerPickedEvent extends AttributePickerPickedEvent { static readonly NAME = "or-asset-type-attribute-picker-picked"; constructor(attrDescriptors: Map); } declare global { export interface HTMLElementEventMap { [OrAssetTypeAttributePickerPickedEvent.NAME]: OrAssetTypeAttributePickerPickedEvent; } } /** * The "Attribute Picker" component using the {@link OrAssetTree} component for selecting assets and its attributes. * * @attribute {object} assetTypeFilter -Callback method for consumers to filter the asset type list shown. Returning true will make the asset type visible, returning false hides it. * @attribute {object} attributeFilter - Callback method for consumers to filter the attribute list shown. Returning true will make the attribute visible, returning false hides it. */ export declare class OrAssetTypeAttributePicker extends AttributePicker { assetTypeFilter?: (descriptor: AssetDescriptor) => boolean; attributeFilter?: (descriptor: AttributeDescriptor) => boolean; selectedAttributes: Map; protected _selectedAssetType?: string; protected _loadedAttributeTypes?: AttributeDescriptor[]; protected _loadedAssetTypes?: AssetDescriptor[]; setSelectedAttributes(selectedAttributes: Map): this; protected willUpdate(changedProps: PropertyValues): void; /** * Function that will load and update the available asset types up for selection. * Also applies the filtering such as {@link assetTypeFilter} if set. */ protected _loadAssetTypes(): AssetDescriptor[]; /** * Function that will load and update the available attributes up for selection. * The {@link descriptor} parameter is usually the selected asset type. * Also applies the filtering such as {@link showOnlyDatapointAttrs}, {@link showOnlyRuleStateAttrs} and {@link attributeFilter} if set. */ protected _loadAttributeTypes(descriptor: AssetDescriptor): AttributeDescriptor[]; protected _setDialogContent(): void; protected _setDialogActions(): void; /** * HTML Callback function when the selected asset type has been updated. */ protected _onAssetTypeItemClick(listItem: ListItem): void; /** * HTML callback function when the selected attributes have been updated. */ protected _onAttributesSelect(attrNames: string[]): void; /** * Function that maps the {@link AssetDescriptor}s to the formatted {@link ListItem}s. * Uses helpers like {@link Util.getAssetTypeLabel} and sorts by {@link descriptorType} so that agents show up first. */ protected _getAssetTypeDescriptors(descriptors: AssetDescriptor[], selected?: AssetDescriptor[], withNoneValue?: ListItem): ListItem[]; /** * Utility method to get the cached {@link AssetDescriptor} by its name */ protected _getAssetDescriptorByName(name?: string): AssetDescriptor | undefined; } //# sourceMappingURL=assettype-attribute-picker.d.ts.map