import type { UmbPropertyEditorConfig } from '../index.js'; import type { UmbPropertyEditorUiElement } from './property-editor-ui-element.interface.js'; import type { ManifestElement, ManifestBase } from '../../../../libs/extension-api/index.js'; export interface ManifestPropertyEditorUi extends ManifestElement { type: 'propertyEditorUi'; meta: MetaPropertyEditorUi; } export interface MetaPropertyEditorUi { label: string; icon: string; /** * The group that this property editor UI belongs to, which will be used to group * the property editor UIs in the property editor picker. * If not specified, the property editor UI will be grouped under "Common". * * Core property editors use localization keys prefixed with `#` (e.g. `"#propertyEditorUIGroups_common"`). * External packages can use either display-ready names (e.g. `"My Group"`) or camelCase names * (e.g. `"myGroup"`) which will be automatically converted to title case. * @default "Common" * @example ["#propertyEditorUIGroups_common", "#propertyEditorUIGroups_richContent", "My Custom Group"] */ group: string; /** * The alias of the property editor schema that this property editor UI is for. * If not specified, the property editor UI can only be used to configure other property editors. * @example ["Umbraco.TextBox", "Umbraco.TextArea", "Umbraco.Label"] */ propertyEditorSchemaAlias?: string; settings?: PropertyEditorSettings; supportsReadOnly?: boolean; supportsDataSource?: { /** * Whether the property editor UI is enabled for use with data sources. * @type {boolean} */ enabled: boolean; /** * A list of allowed property editor data source kinds that can be used with this property editor UI. * If not specified, any data sources can be used. * @example ["pickerCollection", "pickerTree"] */ forDataSourceTypes: string[]; }; /** * A list of keywords that can be used to search for this property editor UI in the property editor picker. * If not specified, the property editor UI will not have any keywords. * @example ["text", "input", "string"] */ keywords?: string[]; } export interface ManifestPropertyEditorSchema extends ManifestBase { type: 'propertyEditorSchema'; meta: MetaPropertyEditorSchema; } export interface MetaPropertyEditorSchema { defaultPropertyEditorUiAlias: string; settings?: PropertyEditorSettings; } export interface PropertyEditorSettings { properties: PropertyEditorSettingsProperty[]; defaultData?: PropertyEditorSettingsDefaultData[]; } export interface PropertyEditorSettingsProperty { label: string; description?: string; alias: string; propertyEditorUiAlias: string; propertyEditorDataSourceAlias?: string; config?: UmbPropertyEditorConfig; weight?: number; validation?: { mandatory: boolean; mandatoryMessage?: string | null; }; } export interface PropertyEditorSettingsDefaultData { alias: string; value: unknown; }