/** * A property which is part of a property set and defines what values a value in a value set can take. * @public * @see PropertySet * @see ValueSet */ export declare class Property { /** * The name of this property. Used to distinguish this property from others. Must be unique. */ name: string; /** * The label of this property. Used when displaying this property to the user. */ label?: string; /** * The type of this property, which indicates the possible values that this property can have. */ type: Type; /** * The default value of this property. * @default undefined */ defaultValue?: unknown; /** * Whether this property should always appear in the property editor component. * @default true * @see PropertyEditorComponent */ basic?: boolean; /** * Whether the value of this property can be edited. * @default true */ editable?: boolean; /** * Which attribute of the parent component the value of this property is linked to. By default, it is not linked to any. * @default undefined */ rootAttribute?: string[] | string; /** * The list of possible values if the value of the property is chosen from a set of possible values. * Should be set if the type of this property is `'option'` or 'option-list'. Otherwise, it should not be set. * @default undefined */ options?: Option[]; /** * The list of properties that are part of this property if this property is composed of other properties. * Should be set if the type of this property is `'object'`. Otherwise, it should not be set. * @default undefined */ properties?: Property[]; constructor(name: string, label: string | undefined, type: Type, defaultValue: unknown, basic: boolean | undefined, editable: boolean | undefined, rootAttribute?: string[] | string); } /** * Each of the possible values that a property of type option can have. * @see Property * @see Type.Option */ export interface Option { key: T; label: string; } /** * The type that a property can have. * @public * @see Property */ export declare enum Type { /** * A type whose value must be a boolean. */ Boolean = "boolean", /** * A type whose value must be a string representing a valid HTML color code. */ Color = "color", /** * A type whose value must be a date. */ Date = "date", /** * A type whose value must be a date with a time. */ Datetime = "datetime", /** * A type whose value must be a number. */ Number = "number", /** * A type whose value must be an object. */ Object = "object", /** * A type whose value must be one of a set of options. */ Option = "option", /** * A type whose value must be a list of values picked from a set of options. * @see Type.Option */ OptionList = "option-list", /** * A type whose value must be a list of values picked from a set of options without repeated values. * @see Type.Option */ OptionSet = "option-set", /** * A type whose value must be a string without newline characters. */ Text = "text", /** * A type whose value must be a string with newline characters. */ TextArea = "text-area", /** * A type whose value must be a list of strings. */ TextList = "text-list", /** * A type whose value must be a list of strings without repeated values. */ TextSet = "text-set", /** * A type whose value must be a map with string keys and values. */ TextMap = "text-map", /** * A type whose value must be a time of day. */ Time = "time", /** * A type whose value must be a valid URL. */ Url = "url" } /** * A set of properties based on which a set of values of those properties can be created. * @public * @see Property * @see ValueSet */ export declare class PropertySet { propertyMap: { [key: string]: Property; }; propertyList: Property[]; constructor(properties?: Property[]); getProperty(key: string): Property; hasProperty(key: string): boolean; hasProperties(): boolean; }