// This is autogenerated, do not edit declare module "sap/fe/base/library" { // Public Exports /** * Library providing the base functionality of the runtime for SAP Fiori elements for OData V4. * @namespace * @public */ export const feBaseNamespace = "sap.fe.base"; } declare module "sap/fe/base/ClassSupport" { import type { $ControlSettings } from "sap/ui/core/Control"; import type ControllerExtension from "sap/ui/core/mvc/ControllerExtension"; import type OverrideExecution from "sap/ui/core/mvc/OverrideExecution"; type OverrideDefinition = Record; type UI5ControllerMethodDefinition = { overrideExecution?: OverrideExecution; public?: boolean; final?: boolean; }; export type UI5ControlMetadataDefinition = { defaultAggregation?: string; controllerExtensions: Record; properties: Record; aggregations: Record; references: Record; associations: Record; methods: Record; events: Record; interfaces: string[]; library?: string; designtime?: string; config?: { fullWidth?: boolean; }; stateProperty?: string; statePropertyDefaultValue?: unknown; manifest?: string | unknown; returnTypes?: string[]; buildingBlockMetadata?: unknown; }; type ExtendWithObject = T extends object ? K & { [TKey in keyof T]?: BindingInfoHolder } : K; export type BindingInfoHolder = T & { __bindingInfo: { path: string; model: string; type: T; }; }; export type ControlPropertyNames = { // needed because of the TS compiler // eslint-disable-next-line @typescript-eslint/no-explicit-any [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]; // Public Type Definitions /** * Definition of a UI5 property metadata. * @public * @ui5-experimental-since 1.145.0 */ export type UI5PropertyMetadata = { type: string; bindable?: boolean; required?: boolean; group?: string; defaultValue?: unknown; byValue?: boolean; isBindingInfo?: boolean; bindToState?: boolean; expectedAnnotations?: string[]; expectedTypes?: string[]; allowedValues?: string[]; visibility?: string; }; /** * Definition of a UI5 aggregation metadata. * @public * @ui5-experimental-since 1.145.0 */ export type UI5AggregationMetadata = { type: string; altTypes?: string[]; multiple?: boolean; isDefault?: boolean; defaultValue?: unknown; defaultClass?: unknown; singularName?: string; visibility?: string; forwarding?: object; }; /** * Definition of a UI5 association metadata. * @public * @ui5-experimental-since 1.145.0 */ export type UI5AssociationMetadata = { type: string; multiple?: boolean; singularName?: string; }; /** * Returns the properties of a control. * @public * @ui5-experimental-since 1.145.0 */ export type PropertiesOf = Partial>> & (K extends keyof T ? Partial> : {}) & $ControlSettings; /** * Represents the state object of a building block. * @public * @ui5-experimental-since 1.145.0 */ export type StateOf = { [K in keyof T]: T[K] extends Array | ReadonlyArray ? ExtendWithObject> : T[K]; }; // Public Exports /** * Collection of decorators to support the creation of UI5 classes. * @namespace * @public */ export const classSupportNamespace = "sap.fe.base.ClassSupport"; /** * Allows to define a property that will hold the control state. * * Properties defined with this decorator will be automatically bound to the control state when used in JSX. * Arrays need to be bound using the `bindState` function. * @public * @ui5-experimental-since 1.145.0 * @returns A property decorator */ export function defineState(): PropertyDecorator; /* #endregion */ /* #region CONTROL */ /** * Indicates that the property shall be declared as an event on the control metadata. * @returns The decorated property * @public * @ui5-experimental-since 1.145.0 */ export function event(): PropertyDecorator; /** * Defines the following property as a managed object in the control metadata. * @param attributeDefinition The property definition * @returns The decorated property. * @public * @ui5-experimental-since 1.145.0 */ export function property(attributeDefinition: UI5PropertyMetadata): PropertyDecorator; /** * Defines and configures the following aggregation in the control metadata. * @param aggregationDefinition The aggregation definition * @returns The decorated property. * @public * @ui5-experimental-since 1.145.0 */ export function aggregation(aggregationDefinition: UI5AggregationMetadata): PropertyDecorator; /** * Defines and configures the following association in the control metadata. * @param ui5AssociationMetadata The definition of the association. * @returns The decorated property * @public * @ui5-experimental-since 1.145.0 */ export function association(ui5AssociationMetadata: UI5AssociationMetadata): PropertyDecorator; /** * Defines in the metadata that this control implements a specific interface. * @param interfaceName The name of the implemented interface * @returns The decorated method * @public * @ui5-experimental-since 1.144.0 */ export function implementInterface(interfaceName: string): PropertyDecorator; /** * Indicates that the following class should define a UI5 control of the specified name. * @param target The fully qualified name of the UI5 class * @param metadataDefinition Additional inline metadata definition * @returns A class decorator that will create a ui5 class out of the TS class * @public * @ui5-experimental-since 1.145.0 */ export function defineUI5Class(target: string, metadataDefinition?: Partial): ClassDecorator; } declare module "sap/fe/base/BuildingBlockBase" { import type { BindingToolkitExpression, PrimitiveType } from "sap/fe/base/BindingToolkit"; import type { StateOf } from "sap/fe/base/ClassSupport"; import type { PropertyBindingInfo } from "sap/ui/base/ManagedObject"; import type Control from "sap/ui/core/Control"; import { $ControlSettings } from "sap/ui/core/Control"; import type UI5Element from "sap/ui/core/Element"; import type { AccessibilityInfo } from "sap/ui/core/library"; import type RenderManager from "sap/ui/core/RenderManager"; import type Context from "sap/ui/model/Context"; /** * Describes the settings that can be provided to the BuildingBlockBase constructor. */ export interface $BuildingBlockBaseSettings extends $ControlSettings { /** * The current state value of the component. * This property holds the state data managed by the component, with the type * determined by the generic parameter K. */ state?: StateOf | PropertyBindingInfo | `{${string}}`; /** * Optional content of generic type T. * This property holds the main data or payload for the containing object. * When undefined, it indicates that no content has been set or is available. * The specific type and structure of the content depends on the generic type parameter T. */ content?: UI5Element; /** * Association to controls / IDs that label this control (see WAI-ARIA attribute aria-labelledby). */ ariaLabelledBy?: Control | string; } // Public Classes /** * Base class for building blocks. * This contains the low-level functionality of having a content aggregation and handling the rendering of the content without an actual DOM element.
* The building block also defines a state object that can be used to store the state of the building block.
* Accessibility and classes information are forwarded to the content control.
* This class is not meant to be used directly, it's there for internal use only (and documentation) * @public */ class BuildingBlockBase extends Control { /** * Optional content of generic type T. * * This property holds the main data or payload for the containing object. * When undefined, it indicates that no content has been set or is available. * The specific type and structure of the content depends on the generic type parameter T. * @public */ content?: T; getContent(): T; setContent(content: T): this; destroyContent(): this; /** * Association to controls / IDs that label this control (see WAI-ARIA attribute aria-labelledby). * @public */ ariaLabelledBy: string[]; getAriaLabelledBy(): string[]; setAriaLabelledBy(ariaLabelledBy: string[]): this; /** * The current state value of the component. * * This property holds the state data managed by the component, with the type * determined by the generic parameter K. * @public */ state: StateOf; /** * Shorthand for the BindingToolkit.bindState function with the current state object. * @param path A property in the state object * @returns The binding toolkit expression for the state * @public * @ui5-experimental-since 1.145.0 */ public bindState(path: keyof K): BindingToolkitExpression; /** * Synchronizes a state property with another building block's state property. * @param propName Name of the property in the current state object * @param source The source building block * @param property The property in the source building block's state object */ public syncStateProperty(propName: string, source: BuildingBlockBase, property: string): void; onStateChange(_changedProps: string[]): void; } export default BuildingBlockBase; } declare module "sap/fe/base/BindingToolkit" { // Public Exports /** * Collection of functions to support the manipulation of ui5 bindings * @public * @namespace * @ui5-experimental-since 1.145.0 */ export const bindingToolkitNamespace = "sap.fe.base.BindingToolkit"; } declare namespace JSX { export type CommandProperties = `cmd:${string}|${string}`; export type Ref = { current?: T; setCurrent(oControlInstance: T): void; }; interface IntrinsicElements { div: { id?: string; class?: string; ref?: Ref; tabindex?: number; role?: string }; span: { id?: string; class?: string; ref?: Ref; role?: string }; slot: { name: string }; } interface IntrinsicClassAttributes { id?: string; class?: string; binding?: string | Record; ["xmlns:fl"]?: string; ["core:require"]?: string; ["log:sourcePath"]?: string; ["customData:entityType"]?: string; ["fl:delegate"]?: string | { name: string; delegateType: string }; ["dt:designtime"]?: string | { name: string; delegateType: string }; ["fl:flexibility"]?: string; ref?: Ref; ["jsx:command"]?: CommandProperties; } } declare module "sap/fe/base/BindingToolkit" { export type PathInModelExpression = never; export type ConstantExpression = never; export type BindingToolkitExpression = never; export type PrimitiveType = string | number | bigint | boolean | object | null | undefined; }