UNPKG

@itwin/appui-abstract

Version:
130 lines 5.56 kB
/** @packageDocumentation * @module Properties */ import { BasePropertyEditorParams, PropertyEditorParams, RangeEditorParams } from "./EditorParams"; /** * Information about an enumeration choice * @public */ export interface EnumerationChoice { label: string; value: string | number; } /** * Information about a set of enumeration choices * @public */ export interface EnumerationChoicesInfo { choices: Promise<EnumerationChoice[]> | EnumerationChoice[]; isStrict?: boolean; maxDisplayedRows?: number; } /** * Property renderer identification and customization attributes * @public */ export interface PropertyRendererInfo { name: string; } /** * Information about a Property Editor * @public */ export interface PropertyEditorInfo { /** Editor name used in addition to the typename to find the registered property editor */ name?: string; /** Editor params provided to the property editor */ params?: PropertyEditorParams[]; } /** * Information about a Property Converter * @public */ export interface PropertyConverterInfo { /** Converter name used in addition to the typename to find the registered property converter */ name?: string; /** map of options for type converter */ options?: { [key: string]: any; }; } /** * [[PropertyDescription]] contains metadata about a Property * @public */ export interface PropertyDescription { /** Name of the property description */ name: string; /** Display label for the property description */ displayLabel: string; /** Type name used to determine applicable Type Converter and Property Editor */ typename: string; /** Additional information for enumerations */ enum?: EnumerationChoicesInfo; /** Information for property renderer customization */ renderer?: PropertyRendererInfo; /** Information for a property editor */ editor?: PropertyEditorInfo; /** Information for a property converter */ converter?: PropertyConverterInfo; /** Quantity type key used to look up formatting and parsing specs. This is typically either the name of a quantity type used by a tool * or the full name of a KOQ (schema:koq). * @alpha * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `kindOfQuantityName` instead. */ quantityType?: string; /** [[KindOfQuantity]] full name used to look up [[FormatProps]] * @beta */ kindOfQuantityName?: string; /** Get the custom DataController by this name and register it with the property editor */ dataController?: string; /** Should property label for composite (struct & array) properties be rendered. */ hideCompositePropertyLabel?: boolean; } /** Helper class that builds property descriptions for specific PropertyEditors and processes descriptions. * @public */ export declare class PropertyDescriptionHelper { /** Builds a number description with a "weight-picker" editor name * @public */ static buildWeightPickerDescription(name: string, label: string, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds an editor that uses [NumberInput]($core-react) control * @public */ static buildNumberEditorDescription(name: string, label: string, overrideParams?: RangeEditorParams, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds a string description * @public */ static buildTextEditorDescription(name: string, label: string, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds an enum description * @public */ static buildEnumPicklistEditorDescription(name: string, label: string, choices: Promise<EnumerationChoice[]> | EnumerationChoice[], additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds a number description for a tool settings or dialog property that will display a "color-picker" control. * @public */ static buildColorPickerDescription(name: string, label: string, colorValues: number[], numColumns: number, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds a boolean description for a tool settings or dialog property that will display a "toggle" control. * @public */ static buildToggleDescription(name: string, label: string, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds a boolean description for a tool settings or dialog property that will display a "image-check-box" control. * @public */ static buildImageCheckBoxDescription(name: string, label: string, imageOff: string, imageOn: string, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds a boolean description for a tool settings or dialog property that will display a checkbox control. * @public */ static buildCheckboxDescription(name: string, label: string, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Builds a property description for a tool settings or dialog `lock` property. This will create a checkbox control with no label. * @public */ static buildLockPropertyDescription(name: string, additionalParams?: BasePropertyEditorParams[]): PropertyDescription; /** Bumps an enum property description value * @public */ static bumpEnumProperty(description: PropertyDescription, value: string | number): Promise<string | number>; } //# sourceMappingURL=Description.d.ts.map