import { ScopedSlots } from "../../ux"; import { MultilingualContext } from "../../ux/MultilingualContext"; import { PropertyConfiguration } from "./PropertyConfiguration"; import { PropertyDefinition, PropertyDisplaySettingsType, PropertyEditorSettingsType, PropertySetupSettingsType, PropertyValueType } from "./PropertyDefinition"; /** * Interface for webcomponent rendering a property value belonging to a property definition * */ export interface IPropertyDisplayRenderer> { valueBind: PropertyValueType; displaySettings: PropertyDisplaySettingsType; setupSettings?: PropertySetupSettingsType; renderTextOnly?: boolean; persistentLabels?: boolean; scopedSlots?: ScopedSlots; } export interface IPropertyRendererScopedSlots { empty?: JSX.Element; } export interface IPropertyEditorRenderer> { valueBind: PropertyValueType; editorSettings: PropertyEditorSettingsType; displaySettings: PropertyDisplaySettingsType; setupSettings?: PropertySetupSettingsType; onValueBindChanged(newValue: PropertyValueType): void; disabled?: boolean; propertyStyles?: PropertyStyles; } export interface IPropertyConfigurationRenderer> { valueBind: PropertyConfiguration; /** * Call each time the configuration is considered valid, i.e. the values of the configuration is good * Also called when no longer valid, but with value null * @param newValue null for invalid config state, value matching a complete configuration */ onConfigurationValid(validConfig?: PropertyConfiguration): void; showLockConfiguration?: boolean; renderEditSettings?: boolean; defaultConfiguration?: PropertyConfiguration; multilingualContext?: MultilingualContext; } export interface PropertyStyles { outlined: boolean; rounded: boolean; filled: boolean; }