diff --git a/types/openui5/openui5-tests.ts b/types/openui5/openui5-tests.ts index dea5e8d1b64897..bdda3a77eee3b2 100644 --- a/types/openui5/openui5-tests.ts +++ b/types/openui5/openui5-tests.ts @@ -298,3 +298,5 @@ const p13nEngine = new Engine(); // sap.ui.webc.* libraries removed - tests are not required as the type definitions are generated and the generator is sufficiently tested // version 1.148.0 added - tests are not required as the type definitions are generated and the generator is sufficiently tested + +// version 1.149.0 added - tests are not required as the type definitions are generated and the generator is sufficiently tested diff --git a/types/openui5/package.json b/types/openui5/package.json index a628a71c5cf028..7ec8195b6e8a78 100644 --- a/types/openui5/package.json +++ b/types/openui5/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/openui5", - "version": "1.148.9999", + "version": "1.149.9999", "nonNpm": true, "nonNpmDescription": "openui5", "projects": [ diff --git a/types/openui5/sap.f.d.ts b/types/openui5/sap.f.d.ts index 6dff2c7f274b23..57f8c852b6484a 100644 --- a/types/openui5/sap.f.d.ts +++ b/types/openui5/sap.f.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/tnt/library" { export interface IToolHeader { diff --git a/types/openui5/sap.m.d.ts b/types/openui5/sap.m.d.ts index e644d958f58987..c2c393b3439ee5 100644 --- a/types/openui5/sap.m.d.ts +++ b/types/openui5/sap.m.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/f/library" { export interface IShellBar { @@ -5160,7 +5160,11 @@ declare module "sap/m/ActionSheet" { * * When an action is triggered, the action sheet closes and you can display a confirmation as a {@link sap.m.MessageToast message toast}. * + * **Note**: As of version 1.149, the control is deprecated. Use {@link sap.m.Menu} / {@link sap.m.MenuItem } + * instead. + * * @since 1.9.1 + * @deprecated As of version 1.149. use sap.m.Menu / sap.m.MenuItem instead. */ export default class ActionSheet extends Control { /** @@ -5957,6 +5961,8 @@ declare module "sap/m/ActionSheet" { } /** * Describes the settings that can be provided to the ActionSheet constructor. + * + * @deprecated As of version 1.149. use sap.m.Menu / sap.m.MenuItem instead. */ export interface $ActionSheetSettings extends $ControlSettings { /** @@ -57524,6 +57530,8 @@ declare module "sap/m/MenuItem" { import { IMenuItem, IMenuItemBehavior } from "sap/m/library"; + import { ID, TextDirection } from "sap/ui/core/library"; + import Event from "sap/ui/base/Event"; import { @@ -57533,8 +57541,6 @@ declare module "sap/m/MenuItem" { import ElementMetadata from "sap/ui/core/ElementMetadata"; - import { TextDirection } from "sap/ui/core/library"; - /** * The `MenuItem` control is used for creating items for the `sap.m.Menu`. It is derived from a core `sap.ui.core.Control`. * @@ -57608,6 +57614,19 @@ declare module "sap/m/MenuItem" { * @returns Metadata object describing this class */ static getMetadata(): ElementMetadata; + /** + * Adds some ariaDescribedBy into the association {@link #getAriaDescribedBy ariaDescribedBy}. + * + * @since 1.149 + * + * @returns Reference to `this` in order to allow method chaining + */ + addAriaDescribedBy( + /** + * The ariaDescribedBy to add; if empty, nothing is inserted + */ + vAriaDescribedBy: ID | Control + ): this; /** * Adds some endContent to the aggregation {@link #getEndContent endContent}. * @@ -57741,6 +57760,12 @@ declare module "sap/m/MenuItem" { */ mParameters?: object ): this; + /** + * Returns array of IDs of the elements which are the current targets of the association {@link #getAriaDescribedBy ariaDescribedBy}. + * + * @since 1.149 + */ + getAriaDescribedBy(): ID[]; /** * Gets current value of property {@link #getEnabled enabled}. * @@ -57949,6 +57974,14 @@ declare module "sap/m/MenuItem" { * @returns Whether the item is enabled for click/press */ isInteractive(): boolean; + /** + * Removes all the controls in the association named {@link #getAriaDescribedBy ariaDescribedBy}. + * + * @since 1.149 + * + * @returns An array of the removed elements (might be empty) + */ + removeAllAriaDescribedBy(): ID[]; /** * Removes all the controls from the aggregation {@link #getEndContent endContent}. * @@ -57968,6 +58001,19 @@ declare module "sap/m/MenuItem" { * @returns An array of the removed elements (might be empty) */ removeAllItems(): IMenuItem[]; + /** + * Removes an ariaDescribedBy from the association named {@link #getAriaDescribedBy ariaDescribedBy}. + * + * @since 1.149 + * + * @returns The removed ariaDescribedBy or `null` + */ + removeAriaDescribedBy( + /** + * The ariaDescribedBy to be removed or its index or ID + */ + vAriaDescribedBy: int | ID | Control + ): ID | null; /** * Removes a endContent from the aggregation {@link #getEndContent endContent}. * @@ -58220,6 +58266,13 @@ declare module "sap/m/MenuItem" { */ endContent?: Control[] | Control | AggregationBindingInfo | `{${string}}`; + /** + * Association to controls / IDs which describe this control (see WAI-ARIA attribute aria-describedby). + * + * @since 1.149 + */ + ariaDescribedBy?: Array; + /** * Fired after the item has been pressed. */ @@ -65398,7 +65451,8 @@ declare module "sap/m/MultiInput" { oEvent: jQuery.Event ): void; /** - * When press ESC, deselect all tokens and all texts + * When press ESC, deselect all texts and close the tokens popup if open. Token deselection is handled by + * the Tokenizer itself. */ onsapescape( /** diff --git a/types/openui5/sap.tnt.d.ts b/types/openui5/sap.tnt.d.ts index f11aaf75dbd242..6452856fba7b75 100644 --- a/types/openui5/sap.tnt.d.ts +++ b/types/openui5/sap.tnt.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/tnt/library" { /** @@ -1466,6 +1466,8 @@ declare module "sap/tnt/NavigationListItem" { import ElementMetadata from "sap/ui/core/ElementMetadata"; + import ObjectStatus from "sap/m/ObjectStatus"; + import { PropertyBindingInfo, AggregationBindingInfo, @@ -1610,6 +1612,14 @@ declare module "sap/tnt/NavigationListItem" { * @returns Reference to `this` in order to allow method chaining */ destroyItems(): this; + /** + * Destroys the tag in the aggregation {@link #getTag tag}. + * + * @since 1.149 + * + * @returns Reference to `this` in order to allow method chaining + */ + destroyTag(): this; /** * Detaches event handler `fnFunction` from the {@link #event:select select} event of this `sap.tnt.NavigationListItem`. * @@ -1717,6 +1727,37 @@ declare module "sap/tnt/NavigationListItem" { * @returns Value of property `selectable` */ getSelectable(): boolean; + /** + * Gets content of aggregation {@link #getTag tag}. + * + * A tag that uses Indication states to visually mark a navigation item. + * + * Use tags to display status information, counters, or metadata that helps users quickly identify the state + * or importance of a navigation item. + * + * Tags can be added to: + * - Single-click items without children + * - Two-click items with children and expander arrow + * - Child items nested under a parent item + * + * **Note:** Tags are visible when the `NavigationList` is in expanded mode, and hidden when collapsed, + * but they are visible in the overflow of the collapsed mode. + * + * Usage: Common use cases include: + * - Status indicators: "Beta", "New", "Deprecated" + * - Counters: "5 Pending", "12 Items" + * - Versions: "v2.0" + * - Alerts: "Low Stock", "Critical" + * + * **Important:** Always set the `inverted` property to `true` for consistent styling. Use Indication states + * (`Indication15` – `Indication20`) for consistent theming. + * + * **Important:** The `ObjectStatus` must never be interactive (i.e., `active` must not be set to `true`), + * as this would lead to nesting of interactive elements, which is not allowed. + * + * @since 1.149 + */ + getTag(): ObjectStatus; /** * Gets current value of property {@link #getTarget target}. * @@ -1903,6 +1944,19 @@ declare module "sap/tnt/NavigationListItem" { */ bSelectable?: boolean ): this; + /** + * Sets the aggregated {@link #getTag tag}. + * + * @since 1.149 + * + * @returns Reference to `this` in order to allow method chaining + */ + setTag( + /** + * The tag to set + */ + oTag: ObjectStatus + ): this; /** * Sets a new value for property {@link #getTarget target}. * @@ -2032,6 +2086,36 @@ declare module "sap/tnt/NavigationListItem" { | AggregationBindingInfo | `{${string}}`; + /** + * A tag that uses Indication states to visually mark a navigation item. + * + * Use tags to display status information, counters, or metadata that helps users quickly identify the state + * or importance of a navigation item. + * + * Tags can be added to: + * - Single-click items without children + * - Two-click items with children and expander arrow + * - Child items nested under a parent item + * + * **Note:** Tags are visible when the `NavigationList` is in expanded mode, and hidden when collapsed, + * but they are visible in the overflow of the collapsed mode. + * + * Usage: Common use cases include: + * - Status indicators: "Beta", "New", "Deprecated" + * - Counters: "5 Pending", "12 Items" + * - Versions: "v2.0" + * - Alerts: "Low Stock", "Critical" + * + * **Important:** Always set the `inverted` property to `true` for consistent styling. Use Indication states + * (`Indication15` – `Indication20`) for consistent theming. + * + * **Important:** The `ObjectStatus` must never be interactive (i.e., `active` must not be set to `true`), + * as this would lead to nesting of interactive elements, which is not allowed. + * + * @since 1.149 + */ + tag?: ObjectStatus; + /** * Fired when this item is selected. */ diff --git a/types/openui5/sap.ui.codeeditor.d.ts b/types/openui5/sap.ui.codeeditor.d.ts index ad66404db0ecc8..381fb9da6c5a3d 100644 --- a/types/openui5/sap.ui.codeeditor.d.ts +++ b/types/openui5/sap.ui.codeeditor.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/codeeditor/library" {} diff --git a/types/openui5/sap.ui.commons.d.ts b/types/openui5/sap.ui.commons.d.ts index c4fde23bd95c32..680360e6153764 100644 --- a/types/openui5/sap.ui.commons.d.ts +++ b/types/openui5/sap.ui.commons.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/commons/library" { import { ColorPickerMode as ColorPickerMode1 } from "sap/ui/unified/library"; diff --git a/types/openui5/sap.ui.core.d.ts b/types/openui5/sap.ui.core.d.ts index 6a98c1a7039ea9..b21f34c5df3041 100644 --- a/types/openui5/sap.ui.core.d.ts +++ b/types/openui5/sap.ui.core.d.ts @@ -279,7 +279,7 @@ declare namespace sap { "sap/ui/thirdparty/qunit-2": undefined; } } -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/base/assert" { /** @@ -8148,6 +8148,11 @@ declare module "sap/ui/model/odata/v2/ODataModel" { * Optional parameter map containing any of the following properties: */ mParameters?: { + /** + * Whether to calculate a canonical URL to request the data. See {@link sap.ui.model.odata.v2.ODataModel#constructor mParameters.canonicalRequests } + * for details. + */ + canonicalRequest?: boolean; /** * If specified, `sPath` has to be relative to the path given with the context. */ @@ -8156,6 +8161,10 @@ declare module "sap/ui/model/odata/v2/ODataModel" { * A map containing the parameters that will be passed as query strings */ urlParameters?: Record; + /** + * A map of headers for this request + */ + headers?: Record; /** * An array of filters to be included in the request URL */ @@ -30720,143 +30729,7 @@ declare module "sap/ui/core/format/NumberFormat" { * The option object, which supports the following parameters. If no options are given, default values according * to the type and locale settings are used. */ - oFormatOptions?: { - /** - * The target length of places after the decimal separator; if the number has fewer decimal places than - * given in this option, it is padded with whitespaces at the end up to the target length. An additional - * whitespace character for the decimal separator is added for a number without any decimals. **Note:** - * This format option is only allowed if the following conditions apply: - * - It has a value greater than 0. - * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. - */ - decimalPadding?: int; - /** - * defines the number of decimal digits - */ - decimals?: int; - /** - * defines the character used as decimal separator. Note: `decimalSeparator` must always be different from - * `groupingSeparator`. - */ - decimalSeparator?: string; - /** - * since 1.30.0 defines what an empty string is parsed as, and what is formatted as an empty string. The - * allowed values are "" (empty string), NaN, `null`, or 0. The 'format' and 'parse' functions are done - * in a symmetric way. For example, when this parameter is set to NaN, an empty string is parsed as NaN, - * and NaN is formatted as an empty string. - */ - emptyString?: null | number | string; - /** - * defines the grouping base size in digits if it is different from the grouping size (e.g. Indian grouping) - */ - groupingBaseSize?: int; - /** - * defines whether grouping is enabled (grouping separators are shown). **Note:** Grouping is disabled if - * the `groupingSize` format option is set to a non-positive value. - */ - groupingEnabled?: boolean; - /** - * defines the character used as grouping separator. Note: `groupingSeparator` must always be different - * from `decimalSeparator`. - */ - groupingSeparator?: string; - /** - * defines the grouping size in digits; the default is `3`. **Note:** If this format option is set to a - * non-positive value, grouping will be disabled entirely. - */ - groupingSize?: int; - /** - * defines the maximum number of decimal digits - */ - maxFractionDigits?: int; - /** - * defines the maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" - * characters are shown instead of digits. - */ - maxIntegerDigits?: int; - /** - * defines the minimal number of decimal digits - */ - minFractionDigits?: int; - /** - * defines the minimal number of non-decimal digits - */ - minIntegerDigits?: int; - /** - * defines the used minus symbol - */ - minusSign?: string; - /** - * since 1.28.2 defines whether to output the string from the parse function in order to keep the precision - * for big numbers. Numbers in scientific notation are parsed back to standard notation. For example, "5e-3" - * is parsed to "0.005". - */ - parseAsString?: boolean; - /** - * CLDR number pattern which is used to format the number - */ - pattern?: string; - /** - * defines the used plus symbol - */ - plusSign?: string; - /** - * The maximum number of digits in the formatted representation of a number; if the `precision` is less - * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` - * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. - * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output - * may differ depending on locale. - */ - precision?: int; - /** - * Whether {@link #format} preserves decimal digits except trailing zeros in case there are more decimals - * than the `maxFractionDigits` format option allows. If decimals are not preserved, the formatted number - * is rounded to `maxFractionDigits`. - */ - preserveDecimals?: boolean; - /** - * Specifies the rounding behavior for discarding the digits after the maximum fraction digits defined by - * `maxFractionDigits`. This can be assigned - * - by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}, - * - via a function that is used for rounding the number and takes two parameters: the number itself, - * and the number of decimal digits that should be reserved. **Using a function is deprecated since 1.121.0**; - * string based numbers are not rounded via this custom function. - */ - roundingMode?: RoundingMode | keyof typeof RoundingMode; - /** - * defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' - * options is used - */ - shortDecimals?: int; - /** - * only use short number formatting for values above this limit - */ - shortLimit?: int; - /** - * since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. - * The generated scale factor is used for all numbers which are formatted with this format instance. This - * option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default - * set with `undefined` which means the scale factor is selected automatically for each number being formatted. - */ - shortRefNumber?: int; - /** - * since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect - * only when the 'style' options is set to either 'short' or 'long'. - */ - showScale?: boolean; - /** - * whether the positions of grouping separators are validated. Space characters used as grouping separators - * are not validated. - */ - strictGroupingValidation?: boolean; - /** - * defines the style of format. Valid values are 'short, 'long' or 'standard' (based on the CLDR decimalFormat). - * When set to 'short' or 'long', numbers are formatted into compact forms. When this option is set, the - * default value of the 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits, - * decimals, shortDecimals, or the 'precision' option itself. - */ - style?: string; - }, + oFormatOptions?: FloatFormatOptions, /** * The locale to get the formatter for; if no locale is given, a locale for the currently configured language * is used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag} @@ -30890,139 +30763,7 @@ declare module "sap/ui/core/format/NumberFormat" { * The option object, which supports the following parameters. If no options are given, default values according * to the type and locale settings are used. */ - oFormatOptions?: { - /** - * Not supported. - */ - decimalPadding?: int; - /** - * defines the number of decimal digits - */ - decimals?: int; - /** - * defines the character used as decimal separator. Note: `decimalSeparator` must always be different from - * `groupingSeparator`. - */ - decimalSeparator?: string; - /** - * since 1.30.0 defines what an empty string is parsed as, and what is formatted as an empty string. The - * allowed values are "" (empty string) NaN, `null`, or 0. The 'format' and 'parse' functions are done in - * a symmetric way. For example, when this parameter is set to NaN, an empty string is parsed as NaN, and - * NaN is formatted as an empty string. - */ - emptyString?: null | number | string; - /** - * defines the grouping base size in digits if it is different from the grouping size (e.g. Indian grouping) - */ - groupingBaseSize?: int; - /** - * defines whether grouping is enabled (grouping separators are shown). **Note:** Grouping is disabled if - * the `groupingSize` format option is set to a non-positive value. - */ - groupingEnabled?: boolean; - /** - * defines the character used as grouping separator. Note: `groupingSeparator` must always be different - * from `decimalSeparator`. - */ - groupingSeparator?: string; - /** - * defines the grouping size in digits; the default is `3`. **Note:** If this format option is set to a - * non-positive value, grouping will be disabled entirely. - */ - groupingSize?: int; - /** - * defines the maximum number of decimal digits - */ - maxFractionDigits?: int; - /** - * defines the maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" - * characters are shown instead of digits. - */ - maxIntegerDigits?: int; - /** - * defines the minimal number of decimal digits - */ - minFractionDigits?: int; - /** - * defines the minimal number of non-decimal digits - */ - minIntegerDigits?: int; - /** - * defines the used minus symbol - */ - minusSign?: string; - /** - * since 1.28.2 defines whether to output the string from the parse function in order to keep the precision - * for big numbers. Numbers in scientific notation are parsed back to standard notation. For example, "5e+3" - * is parsed to "5000". - */ - parseAsString?: boolean; - /** - * CLDR number pattern which is used to format the number - */ - pattern?: string; - /** - * defines the used plus symbol - */ - plusSign?: string; - /** - * **Note:** Only considered if the number format leads to a representation with decimal places, e.g. if - * the option `style: "short"` is set. The maximum number of digits in the formatted representation of a - * number; if the `precision` is less than the overall length of the number, its fractional part is truncated - * through rounding. As the `precision` only affects the rounding of a number, its integer part can retain - * more digits than defined by this parameter. **Example:** With a `precision` of 2 and `style: "short"`, - * `234567` is formatted to `"235K"`. **Note:** The formatted output may differ depending on locale. - */ - precision?: int; - /** - * Whether {@link #format} preserves decimal digits except trailing zeros in case there are more decimals - * than the `maxFractionDigits` format option allows. If decimals are not preserved, the formatted number - * is rounded to `maxFractionDigits`. - */ - preserveDecimals?: boolean; - /** - * Specifies the rounding behavior for discarding the digits after the maximum fraction digits defined by - * `maxFractionDigits`. This can be assigned - * - by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}, - * - via a function that is used for rounding the number and takes two parameters: the number itself, - * and the number of decimal digits that should be reserved. **Using a function is deprecated since 1.121.0**; - * string based numbers are not rounded via this custom function. - */ - roundingMode?: RoundingMode | keyof typeof RoundingMode; - /** - * defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' - * options is used - */ - shortDecimals?: int; - /** - * only use short number formatting for values above this limit - */ - shortLimit?: int; - /** - * since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. - * The generated scale factor is used for all numbers which are formatted with this format instance. This - * option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default - * set with `undefined` which means the scale factor is selected automatically for each number being formatted. - */ - shortRefNumber?: int; - /** - * since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect - * only when the 'style' options is set to either 'short' or 'long'. - */ - showScale?: boolean; - /** - * whether the positions of grouping separators are validated. Space characters used as grouping separators - * are not validated. - */ - strictGroupingValidation?: boolean; - /** - * defines the style of format. Valid values are 'short, 'long' or 'standard' (based on the CLDR decimalFormat). - * When set to 'short' or 'long', numbers are formatted into compact forms. When this option is set, the - * default value of the 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits, - * decimals, shortDecimals, or the 'precision' option itself. - */ - style?: string; - }, + oFormatOptions?: IntegerFormatOptions, /** * The locale to get the formatter for; if no locale is given, a locale for the currently configured language * is used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag} @@ -31425,6 +31166,181 @@ declare module "sap/ui/core/format/NumberFormat" { sValue: string ): number | any[] | string | null; } + /** + * The format options for floating-point numbers. + */ + export type FloatFormatOptions = FormatOptions & { + /** + * The target length of places after the decimal separator; if the number has fewer decimal places than + * given in this option, it is padded with whitespaces at the end up to the target length. An additional + * whitespace character for the decimal separator is added for a number without any decimals. **Note:** + * This format option is only allowed if the following conditions apply: + * - It has a value greater than 0. + * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. + */ + decimalPadding?: int; + /** + * The minimal number of decimal digits. + */ + minFractionDigits?: int; + /** + * The maximum number of digits in the formatted representation of a number; if the `precision` is less + * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` + * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. + * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output + * may differ depending on locale. + */ + precision?: int; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + }; + + /** + * The base type for the numeric format options. + */ + export type FormatOptions = { + /** + * The number of decimal digits. + */ + decimals?: int; + /** + * The character used as decimal separator. If none is given, the locale-specific decimal separator is used. + * **Note:** `decimalSeparator` must always be different from `groupingSeparator`. + */ + decimalSeparator?: string; + /** + * Since 1.130.0. Defines what value an empty string is parsed into and what value is formatted as an empty + * string. The {@link #format} and {@link #parse} functions are done in a symmetric way. For example, when + * this parameter is set to `NaN`, an empty string is parsed as `NaN`, and `NaN` is formatted as an empty + * string. + */ + emptyString?: null | number | string; + /** + * The grouping base size in digits if it is different from the grouping size (e.g. Indian grouping). + */ + groupingBaseSize?: int; + /** + * Whether grouping is enabled (grouping separators are shown). **Note:** Grouping is disabled if the `groupingSize` + * format option is set to a non-positive value. + */ + groupingEnabled?: boolean; + /** + * The character used as grouping separator. If none is given, the locale-specific grouping separator is + * used. **Note:** `groupingSeparator` must always be different from `decimalSeparator`. + */ + groupingSeparator?: string; + /** + * The grouping size in digits. **Note:** Grouping is disabled if this format option is set to a non-positive + * value. + */ + groupingSize?: int; + /** + * The maximum number of decimal digits. + */ + maxFractionDigits?: int; + /** + * The maximum number of non-decimal digits. + */ + maxIntegerDigits?: int; + /** + * The minimal number of non-decimal digits. + */ + minIntegerDigits?: int; + /** + * The symbol for the minus sign. If none is given, the locale-specific minus sign is used. + */ + minusSign?: string; + /** + * Since 1.28.2, whether to parse the number as a string in order to keep the precision for big numbers. + * Numbers in scientific notation are parsed back to standard notation. For example, `5e-3` is parsed to + * `0.005`. + */ + parseAsString?: boolean; + /** + * The CLDR number pattern which is used to format a number. If none is given, the default pattern for the + * locale and type is used. + */ + pattern?: string; + /** + * The symbol for the plus sign. If none is given, the locale-specific plus sign is used. + */ + plusSign?: string; + /** + * Whether {@link #format} preserves decimal digits except trailing zeros if there are more decimals than + * the `maxFractionDigits` format option allows. If decimals are not preserved, the formatted number is + * rounded to `maxFractionDigits`. + */ + preserveDecimals?: boolean; + /** + * Defines how numbers are rounded when the number of fraction digits exceeds the value of `maxFractionDigits`. + * The rounding behavior of the formatter can be defined in the following ways: + * - Setting this format option to a value from the {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode } + * enum + * - Setting this format option to a function used for rounding the number. The function must take two + * parameters: the number itself, and the number of decimal digits that should be preserved. String-based + * numbers are not rounded by this custom function. **Deprecated as of version 1.121.0; apply rounding by + * specifying a rounding mode instead.** + */ + roundingMode?: (RoundingMode | keyof typeof RoundingMode) | Function; + /** + * The number of decimals in the shortened format string. If this option isn't specified, the `decimals` + * option is used instead. + */ + shortDecimals?: int; + /** + * A limit above which only short number formatting is used. + */ + shortLimit?: int; + /** + * Since 1.40, specifies a number from which the scale factor for the `short` or `long` style format is + * generated. The generated scale factor is used for all numbers which are formatted with this format instance. + * This option only takes effect when the `style` option is set to `short` or `long`. It is set to `undefined` + * by default, which means that the scale factor is selected automatically for each number being formatted. + */ + shortRefNumber?: int; + /** + * Since 1.40, specifies whether the scale factor is shown in the formatted number. This option takes effect + * only when the `style` option is set to either `short` or `long`. + */ + showScale?: boolean; + /** + * Whether the positions of grouping separators are validated. Space characters used as grouping separators + * are not validated. + */ + strictGroupingValidation?: boolean; + }; + + /** + * The format options for integer numbers. + */ + export type IntegerFormatOptions = FormatOptions & { + /** + * The minimal number of decimal digits. + */ + minFractionDigits?: int; + /** + * **Note:** Only considered if the number format leads to a representation with decimal places, e.g. if + * the option `style: "short"` is set. The maximum number of digits in the formatted representation of a + * number; if the `precision` is less than the overall length of the number, its fractional part is truncated + * through rounding. As the `precision` only affects the rounding of a number, its integer part can retain + * more digits than defined by this parameter. **Example:** With a `precision` of 2 and `style: "short"`, + * `234567` is formatted to `"235K"`. + */ + precision?: int; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + }; + /** * Specifies a rounding behavior for numerical operations capable of discarding precision. Each rounding * mode in this object indicates how the least significant returned digits of rounded result are to be calculated. @@ -37750,12 +37666,12 @@ declare module "sap/ui/core/message/MessageProcessor" { /** * Messages already existing before the `messageChange` event was fired. */ - oldMessages?: Message; + oldMessages?: Message[]; /** * New messages added by the trigger of the `messageChange` event. */ - newMessages?: Message; + newMessages?: Message[]; } /** @@ -67972,7 +67888,10 @@ declare module "sap/ui/model/odata/type/Boolean" { } declare module "sap/ui/model/odata/type/Byte" { - import Int from "sap/ui/model/odata/type/Int"; + import { + default as Int, + IntTypeFormatOptions, + } from "sap/ui/model/odata/type/Int"; import Metadata from "sap/ui/base/Metadata"; @@ -67994,13 +67913,7 @@ declare module "sap/ui/model/odata/type/Byte" { /** * Format options as defined in {@link sap.ui.core.format.NumberFormat.getIntegerInstance} */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; - * see {@link sap.ui.model.odata.type.Int#parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - }, + oFormatOptions?: IntTypeFormatOptions, /** * constraints; {@link sap.ui.model.odata.type.Int#validateValue validateValue} throws an error if any constraint * is violated @@ -68946,7 +68859,16 @@ declare module "sap/ui/model/odata/type/DateTimeWithTimezone" { * * @returns The language-dependent placeholder text or `undefined` if the type does not offer a placeholder */ - getPlaceholderText(): string | undefined; + getPlaceholderText( + /** + * The minimum date + */ + oMinimum?: /* was: sap.ui.core.date.UI5Date */ any, + /** + * The maximum date + */ + oMaximum?: /* was: sap.ui.core.date.UI5Date */ any + ): string | undefined; /** * Parses the given value. * @@ -68999,6 +68921,8 @@ declare module "sap/ui/model/odata/type/Decimal" { import ValidateException from "sap/ui/model/ValidateException"; + import { FloatFormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents the OData primitive type `Edm.Decimal`, see * type definition for OData V4.01 or @@ -69015,23 +68939,11 @@ declare module "sap/ui/model/odata/type/Decimal" { */ constructor( /** - * Format options as defined in {@link sap.ui.core.format.NumberFormat.getFloatInstance}. In contrast to - * NumberFormat `groupingEnabled` defaults to `true`. Note that `maxFractionDigits` and `minFractionDigits` - * are set to the value of the constraint `scale` unless it is "variable" or "floating". They can however - * be overwritten. + * Format options as defined in {@link sap.ui.core.format.NumberFormat.getFloatInstance}. Note that `maxFractionDigits` + * and `minFractionDigits` are set to the value of the constraint `scale` unless it is `"variable"` or `"floating"`. + * They can however be overwritten. */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `"0"` if the `nullable` constraint is set to `false`; - * see {@link #parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - /** - * by default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - }, + oFormatOptions?: DecimalTypeFormatOptions, /** * constraints; {@link #validateValue validateValue} throws an error if any constraint is violated */ @@ -69173,6 +69085,19 @@ declare module "sap/ui/model/odata/type/Decimal" { sValue: string ): void; } + /** + * The format options of the OData floating point number type {@link sap.ui.model.odata.type.Decimal}. It + * differs to the other two OData floating point number types {@link sap.ui.model.odata.type.Double} and + * {@link sap.ui.model.odata.type.Single} by parsing the empty string and `null` to string `"0"` if the + * `nullable` constraint is set to `false`. + */ + export type DecimalTypeFormatOptions = FloatFormatOptions & { + /** + * Whether the empty string and `null` are parsed to `"0"` if the `nullable` constraint is set to `false`; + * see {@link #parseValue parseValue}; since 1.115.0 + */ + parseEmptyValueToZero?: boolean; + }; } declare module "sap/ui/model/odata/type/Double" { @@ -69186,6 +69111,8 @@ declare module "sap/ui/model/odata/type/Double" { import ValidateException from "sap/ui/model/ValidateException"; + import { FloatFormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents the OData primitive type `Edm.Double`, see * type definition for OData V4.01 or @@ -69202,21 +69129,9 @@ declare module "sap/ui/model/odata/type/Double" { */ constructor( /** - * Format options as defined in {@link sap.ui.core.format.NumberFormat.getFloatInstance}. In contrast to - * NumberFormat `groupingEnabled` defaults to `true`. + * Format options as defined in {@link sap.ui.core.format.NumberFormat.getFloatInstance}. */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; - * see {@link #parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - /** - * by default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - }, + oFormatOptions?: FloatTypeFormatOptions, /** * constraints; {@link #validateValue validateValue} throws an error if any constraint is violated */ @@ -69318,6 +69233,17 @@ declare module "sap/ui/model/odata/type/Double" { fValue: number ): void; } + /** + * The format options of the OData floating point number types, {@link sap.ui.model.odata.type.Double} and + * {@link sap.ui.model.odata.type.Single}. + */ + export type FloatTypeFormatOptions = FloatFormatOptions & { + /** + * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; + * see {@link #parseValue parseValue}; since 1.115.0 + */ + parseEmptyValueToZero?: boolean; + }; } declare module "sap/ui/model/odata/type/Guid" { @@ -69457,6 +69383,8 @@ declare module "sap/ui/model/odata/type/Int" { import ValidateException from "sap/ui/model/ValidateException"; + import { IntegerFormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This is an abstract base class for integer-based OData primitive types like `Edm.Int16` or `Edm.Int32`, * see @@ -69473,13 +69401,7 @@ declare module "sap/ui/model/odata/type/Int" { /** * type-specific format options; see subtypes */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; - * see {@link #parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - }, + oFormatOptions?: IntTypeFormatOptions, /** * constraints; {@link #validateValue validateValue} throws an error if any constraint is violated */ @@ -69571,10 +69493,23 @@ declare module "sap/ui/model/odata/type/Int" { iValue: number ): void; } + /** + * The format options of the {@link sap.ui.model.odata.type.Int Int} based OData types. + */ + export type IntTypeFormatOptions = IntegerFormatOptions & { + /** + * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; + * see {@link #parseValue parseValue}; since 1.115.0 + */ + parseEmptyValueToZero?: boolean; + }; } declare module "sap/ui/model/odata/type/Int16" { - import Int from "sap/ui/model/odata/type/Int"; + import { + default as Int, + IntTypeFormatOptions, + } from "sap/ui/model/odata/type/Int"; import Metadata from "sap/ui/base/Metadata"; @@ -69597,13 +69532,7 @@ declare module "sap/ui/model/odata/type/Int16" { * Format options as defined in {@link sap.ui.core.format.NumberFormat.getIntegerInstance}. In contrast * to NumberFormat `groupingEnabled` defaults to `true`. */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; - * see {@link sap.ui.model.odata.type.Int#parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - }, + oFormatOptions?: IntTypeFormatOptions, /** * constraints; {@link sap.ui.model.odata.type.Int#validateValue validateValue} throws an error if any constraint * is violated @@ -69670,7 +69599,10 @@ declare module "sap/ui/model/odata/type/Int16" { } declare module "sap/ui/model/odata/type/Int32" { - import Int from "sap/ui/model/odata/type/Int"; + import { + default as Int, + IntTypeFormatOptions, + } from "sap/ui/model/odata/type/Int"; import Metadata from "sap/ui/base/Metadata"; @@ -69693,13 +69625,7 @@ declare module "sap/ui/model/odata/type/Int32" { * Format options as defined in {@link sap.ui.core.format.NumberFormat.getIntegerInstance}. In contrast * to NumberFormat `groupingEnabled` defaults to `true`. */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; - * see {@link sap.ui.model.odata.type.Int#parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - }, + oFormatOptions?: IntTypeFormatOptions, /** * constraints; {@link sap.ui.model.odata.type.Int#validateValue validateValue} throws an error if any constraint * is violated @@ -69768,6 +69694,8 @@ declare module "sap/ui/model/odata/type/Int32" { declare module "sap/ui/model/odata/type/Int64" { import ODataType from "sap/ui/model/odata/type/ODataType"; + import { IntTypeFormatOptions } from "sap/ui/model/odata/type/Int"; + import FormatException from "sap/ui/model/FormatException"; import Metadata from "sap/ui/base/Metadata"; @@ -69795,13 +69723,7 @@ declare module "sap/ui/model/odata/type/Int64" { * Format options as defined in {@link sap.ui.core.format.NumberFormat.getIntegerInstance}. In contrast * to NumberFormat `groupingEnabled` defaults to `true`. */ - oFormatOptions: { - /** - * Whether the empty string and `null` are parsed to `"0"` if the `nullable` constraint is set to `false`; - * see {@link #parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - }, + oFormatOptions: IntTypeFormatOptions, /** * constraints; {@link #validateValue validateValue} throws an error if any constraint is violated */ @@ -69920,6 +69842,8 @@ declare module "sap/ui/model/odata/type/ODataType" { import Metadata from "sap/ui/base/Metadata"; + import UI5Date from "sap/ui/core/date/UI5Date"; + /** * This class is an abstract base class for all OData primitive types (see {@link https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html#_Toc38530338 OData V4.01 Edm Types } * and {@link https://www.odata.org/documentation/odata-version-2-0/overview#AbstractTypeSystem OData V2 Edm Types}). @@ -69988,12 +69912,26 @@ declare module "sap/ui/model/odata/type/ODataType" { static getMetadata(): Metadata; /** * Returns a language-dependent placeholder text such as "e.g. " where is formatted - * using this type. + * using this type. The `oMinimum` and `oMaximum` parameters are supported since 1.149.0 and only by types + * that use {@link sap.ui.core.format.DateFormat} for formatting ({@link sap.ui.model.odata.type.Date}, + * {@link sap.ui.model.odata.type.DateTime}, {@link sap.ui.model.odata.type.DateTimeOffset}, {@link sap.ui.model.odata.type.DateTimeWithTimezone}, + * {@link sap.ui.model.odata.type.Time}, and {@link sap.ui.model.odata.type.TimeOfDay}). The default sample + * date is used if it is valid. Otherwise, the closest valid year end, highest valid month end, or highest + * valid date is used. * * * @returns The language-dependent placeholder text or `undefined` if the type does not offer a placeholder */ - getPlaceholderText(): string | undefined; + getPlaceholderText( + /** + * The minimum date + */ + oMinimum?: UI5Date, + /** + * The maximum date + */ + oMaximum?: UI5Date + ): string | undefined; } } @@ -70110,7 +70048,10 @@ declare module "sap/ui/model/odata/type/Raw" { } declare module "sap/ui/model/odata/type/SByte" { - import Int from "sap/ui/model/odata/type/Int"; + import { + default as Int, + IntTypeFormatOptions, + } from "sap/ui/model/odata/type/Int"; import Metadata from "sap/ui/base/Metadata"; @@ -70132,13 +70073,7 @@ declare module "sap/ui/model/odata/type/SByte" { /** * Format options as defined in {@link sap.ui.core.format.NumberFormat.getIntegerInstance} */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; - * see {@link sap.ui.model.odata.type.Int#parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - }, + oFormatOptions?: IntTypeFormatOptions, /** * constraints; {@link sap.ui.model.odata.type.Int#validateValue validateValue} throws an error if any constraint * is violated @@ -70207,6 +70142,8 @@ declare module "sap/ui/model/odata/type/SByte" { declare module "sap/ui/model/odata/type/Single" { import ODataType from "sap/ui/model/odata/type/ODataType"; + import { FloatTypeFormatOptions } from "sap/ui/model/odata/type/Double"; + import FormatException from "sap/ui/model/FormatException"; import Metadata from "sap/ui/base/Metadata"; @@ -70231,21 +70168,9 @@ declare module "sap/ui/model/odata/type/Single" { */ constructor( /** - * Format options as defined in {@link sap.ui.core.format.NumberFormat.getFloatInstance}. In contrast to - * NumberFormat `groupingEnabled` defaults to `true`. + * Format options as defined in {@link sap.ui.core.format.NumberFormat.getFloatInstance}. */ - oFormatOptions?: { - /** - * Whether the empty string and `null` are parsed to `0` if the `nullable` constraint is set to `false`; - * see {@link #parseValue parseValue}; since 1.115.0 - */ - parseEmptyValueToZero?: boolean; - /** - * by default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - }, + oFormatOptions?: FloatTypeFormatOptions, /** * constraints; {@link #validateValue validateValue} throws an error if any constraint is violated */ @@ -74183,7 +74108,8 @@ declare module "sap/ui/model/odata/v4/Context" { * or creates this method first waits for them to be processed. * * The 'dataRequested' and 'dataReceived' events are not fired unless a binding is refreshed completely. - * Whatever should happen in the event handler attached to... + * In that case, they are fired only at the binding itself, not at the model! Whatever should happen in + * the event handler attached to... * 'dataRequested', can instead be done before calling {@link #requestSideEffects}. 'dataReceived', * can instead be done once the `oPromise` returned by {@link #requestSideEffects} fulfills or rejects (using * `oPromise.then(function () {...}, function () {...})`). @@ -76186,6 +76112,9 @@ declare module "sap/ui/model/odata/v4/ODataListBinding" { * The dynamic sorters to be used; they replace the dynamic sorters given in {@link sap.ui.model.odata.v4.ODataModel#bindList}. * A nullish or missing value is treated as an empty array and thus removes all dynamic sorters. Static * sorters, as defined in the '$orderby' binding parameter, are always applied after the dynamic sorters. + * Since 1.149.0, if any sorter has {@link sap.ui.model.Sorter#getGroupPaths group paths} and the {@link sap.ui.model.odata.v4.ODataModel model}'s + * `autoExpandSelect` parameter is set, those paths contribute to `$select` and `$expand`; not supported + * for {@link #setAggregation data aggregation}. */ vSorters?: Sorter | Sorter[] ): this; @@ -77668,8 +77597,7 @@ declare module "sap/ui/model/odata/v4/ODataModel" { oContext?: Context1, /** * The dynamic sorters to be used initially. Call {@link sap.ui.model.odata.v4.ODataListBinding#sort} to - * replace them. Static sorters, as defined in the '$orderby' binding parameter, are always applied after - * the dynamic sorters. Supported since 1.39.0. + * replace them, see there for more details. Supported since 1.39.0. */ vSorters?: Sorter | Sorter[], /** @@ -81499,6 +81427,8 @@ declare module "sap/ui/model/type/Float" { import Metadata from "sap/ui/base/Metadata"; + import { FloatFormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents float simple types. */ @@ -81510,19 +81440,7 @@ declare module "sap/ui/model/type/Float" { /** * Format options as defined in {@link sap.ui.core.format.NumberFormat.getFloatInstance} */ - oFormatOptions?: { - /** - * By default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - /** - * Additional set of format options to be used if the property in the model is not of type string and needs - * formatting as well. If an empty object is given, the grouping is disabled and a dot is used as decimal - * separator. - */ - source?: object; - }, + oFormatOptions?: FloatTypeFormatOptions, /** * Value constraints */ @@ -81570,6 +81488,17 @@ declare module "sap/ui/model/type/Float" { */ static getMetadata(): Metadata; } + /** + * The format options of the {@link sap.ui.model.type.Float} type. + */ + export type FloatTypeFormatOptions = FloatFormatOptions & { + /** + * Additional set of format options to be used if the property in the model is not of type string and needs + * formatting as well. If an empty object is given, the grouping is disabled and a dot is used as decimal + * separator. + */ + source?: Record; + }; } declare module "sap/ui/model/type/Integer" { @@ -81577,6 +81506,8 @@ declare module "sap/ui/model/type/Integer" { import Metadata from "sap/ui/base/Metadata"; + import { IntegerFormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents integer simple types. */ @@ -81586,16 +81517,10 @@ declare module "sap/ui/model/type/Integer" { */ constructor( /** - * Format options as defined in {@link sap.ui.core.format.NumberFormat.getIntegerInstance} + * The option object, which supports the following parameters. If no options are given, default values according + * to the type and locale settings are used. */ - oFormatOptions?: { - /** - * Additional set of format options to be used if the property in the model is not of type string and needs - * formatting as well. If an empty object is given, the grouping is disabled and a dot is used as decimal - * separator. - */ - source?: object; - }, + oFormatOptions?: IntegerTypeFormatOptions, /** * Value constraints */ @@ -81643,6 +81568,17 @@ declare module "sap/ui/model/type/Integer" { */ static getMetadata(): Metadata; } + /** + * The format options of the {@link sap.ui.model.type.Integer} type. + */ + export type IntegerTypeFormatOptions = IntegerFormatOptions & { + /** + * Additional set of format options to be used if the property in the model is not of type `string` and + * needs formatting as well. If an empty object is given, the grouping is disabled and a dot is used as + * decimal separator. + */ + source?: Record; + }; } declare module "sap/ui/model/type/String" { diff --git a/types/openui5/sap.ui.dt.d.ts b/types/openui5/sap.ui.dt.d.ts index 99841c16b5c297..54c206e21282d9 100644 --- a/types/openui5/sap.ui.dt.d.ts +++ b/types/openui5/sap.ui.dt.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/dt/library" { export namespace designtime { diff --git a/types/openui5/sap.ui.fl.d.ts b/types/openui5/sap.ui.fl.d.ts index d377182c329a2f..408f3712485b26 100644 --- a/types/openui5/sap.ui.fl.d.ts +++ b/types/openui5/sap.ui.fl.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/fl/library" {} diff --git a/types/openui5/sap.ui.integration.d.ts b/types/openui5/sap.ui.integration.d.ts index b6d6baad8971c9..9c6270f91eb825 100644 --- a/types/openui5/sap.ui.integration.d.ts +++ b/types/openui5/sap.ui.integration.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/integration/library" { import { URI } from "sap/ui/core/library"; diff --git a/types/openui5/sap.ui.layout.d.ts b/types/openui5/sap.ui.layout.d.ts index 49ff03d41e17b7..7ce77a218ae88e 100644 --- a/types/openui5/sap.ui.layout.d.ts +++ b/types/openui5/sap.ui.layout.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/layout/library" { import Control from "sap/ui/core/Control"; diff --git a/types/openui5/sap.ui.mdc.d.ts b/types/openui5/sap.ui.mdc.d.ts index 0695f2214df7bc..c089bcac368960 100644 --- a/types/openui5/sap.ui.mdc.d.ts +++ b/types/openui5/sap.ui.mdc.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/mdc/AggregationBaseDelegate" { import BaseDelegate from "sap/ui/mdc/BaseDelegate"; @@ -1505,6 +1505,10 @@ declare module "sap/ui/mdc/FilterBarDelegate" { import FilterBarValidationStatus from "sap/ui/mdc/enums/FilterBarValidationStatus"; + import FilterBarBase from "sap/ui/mdc/filterbar/FilterBarBase"; + + import { ConditionObject } from "sap/ui/mdc/condition/Condition"; + /** * Base Delegate for {@link sap.ui.mdc.FilterBar FilterBar}. Extend this object in your project to use all * functionalities of the {@link sap.ui.mdc.FilterBar FilterBar}. This class provides method calls, which @@ -1615,6 +1619,29 @@ declare module "sap/ui/mdc/FilterBarDelegate" { */ oFilterBar: FilterBar ): Promise; + /** + * Returns default values for a property. + * + * This function is called when a user adds a condition representing default values or a variant using such + * a condition is applied. + * + * As this function might be called multiple times, the default values should be cached and not be determined + * again for each call. + * + * @since 1.149 + * + * @returns Array of default value conditions in external format + */ + getDefaultValues( + /** + * Instance of the {@link sap.ui.mdc.filterbar.FilterBarBase FilterBar} control + */ + oFilterBar: FilterBarBase, + /** + * Property key of the filter field + */ + sPropertyKey: string + ): ConditionObject[]; /** * propertyInfo This method is called during the appliance of the remove condition change. The intention * is to update the {@link sap.ui.mdc.FilterBarBase#setPropertyInfo propertyInfo} property. @@ -3346,7 +3373,7 @@ declare module "sap/ui/mdc/ValueHelpDelegate" { ): Promise | util.FilterConditionMap; /** * Returns filters that are used when updating the binding of the `ValueHelp`. - * By default, this method returns a set of {@link sap.ui.model.Filter Filters} originating from an available + * By default, this method returns a set of {@link sap.ui.model.Filter Filters} originating from an available * {@link sap.ui.mdc.FilterBar FilterBar} or the delegate's own {@link module:sap/ui/mdc/ValueHelpDelegate.getFilterConditions getFilterConditions } * implementation. * @@ -7442,6 +7469,11 @@ declare module "sap/ui/mdc/condition/Operator" { * Function to determine the text copied into clipboard */ getTextForCopy?: Function; + /** + * If set, the operator handles default values. The values are used for display and to create filters, but + * cannot be set manually. + */ + useDefaultValues?: boolean; } ); @@ -8490,6 +8522,15 @@ declare module "sap/ui/mdc/enums/OperatorName" { * @since 1.99.0 */ DATETOYEAR = "DATETOYEAR", + /** + * "Default values" operator is using user-specific default values. The values themselves are not stored + * in variants. + * + * The operator is available for all types. + * + * @since 1.149.0 + */ + DefaultValues = "DefaultValues", /** * "empty" operator * diff --git a/types/openui5/sap.ui.rta.d.ts b/types/openui5/sap.ui.rta.d.ts index 20a7545c3b12fc..3531d415618db6 100644 --- a/types/openui5/sap.ui.rta.d.ts +++ b/types/openui5/sap.ui.rta.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/rta/api/startAdaptation" { import Control from "sap/ui/core/Control"; diff --git a/types/openui5/sap.ui.suite.d.ts b/types/openui5/sap.ui.suite.d.ts index a2e5cca5ac1b94..122d63669c22de 100644 --- a/types/openui5/sap.ui.suite.d.ts +++ b/types/openui5/sap.ui.suite.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/suite/library" { /** diff --git a/types/openui5/sap.ui.support.d.ts b/types/openui5/sap.ui.support.d.ts index 4f5e7916bed6aa..5036e3f37eb4ae 100644 --- a/types/openui5/sap.ui.support.d.ts +++ b/types/openui5/sap.ui.support.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/support/library" { /** diff --git a/types/openui5/sap.ui.table.d.ts b/types/openui5/sap.ui.table.d.ts index 5629f40e66bd8d..4901a204bab1ae 100644 --- a/types/openui5/sap.ui.table.d.ts +++ b/types/openui5/sap.ui.table.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/table/library" { import TreeAutoExpandMode1 from "sap/ui/model/TreeAutoExpandMode"; @@ -3674,6 +3674,9 @@ declare module "sap/ui/table/plugins/ODataV4Aggregation" { * row and the group level property path according to `groupLevels` in {@link sap.ui.model.odata.v4.ODataListBinding#setAggregation}). * The function must return a string that is used as the title of the group header row. * + * **Note:** Setting a new formatter does not immediately update the group header titles. The titles are + * updated at the next binding update. + * * Function signature: `groupHeaderFormatter(oContext: sap.ui.model.odata.v4.Context, sPropertyPath: string): * string` * @@ -3708,6 +3711,9 @@ declare module "sap/ui/table/plugins/ODataV4Aggregation" { * row and the group level property path according to `groupLevels` in {@link sap.ui.model.odata.v4.ODataListBinding#setAggregation}). * The function must return a string that is used as the title of the group header row. * + * **Note:** Setting a new formatter does not immediately update the group header titles. The titles are + * updated at the next binding update. + * * Function signature: `groupHeaderFormatter(oContext: sap.ui.model.odata.v4.Context, sPropertyPath: string): * string` * @@ -3739,6 +3745,9 @@ declare module "sap/ui/table/plugins/ODataV4Aggregation" { * row and the group level property path according to `groupLevels` in {@link sap.ui.model.odata.v4.ODataListBinding#setAggregation}). * The function must return a string that is used as the title of the group header row. * + * **Note:** Setting a new formatter does not immediately update the group header titles. The titles are + * updated at the next binding update. + * * Function signature: `groupHeaderFormatter(oContext: sap.ui.model.odata.v4.Context, sPropertyPath: string): * string` */ diff --git a/types/openui5/sap.ui.testrecorder.d.ts b/types/openui5/sap.ui.testrecorder.d.ts index a04d209b108080..99014b786c51a1 100644 --- a/types/openui5/sap.ui.testrecorder.d.ts +++ b/types/openui5/sap.ui.testrecorder.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/testrecorder/library" {} diff --git a/types/openui5/sap.ui.unified.d.ts b/types/openui5/sap.ui.unified.d.ts index 279344b7ccaa41..98dbfa70a72d53 100644 --- a/types/openui5/sap.ui.unified.d.ts +++ b/types/openui5/sap.ui.unified.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/unified/library" { /** @@ -318,6 +318,15 @@ declare module "sap/ui/unified/library" { ): Promise; } + /** + * Types of recurrence rule pattern. + * + * This enum is part of the 'sap/ui/unified/library' module export and must be accessed by the property + * 'RecurrenceRuleType'. + * + * @since 1.149.0 + */ + export enum RecurrenceRuleType {} /** * Interval types in a `RecurrenceType`. * @@ -354,6 +363,15 @@ declare module "sap/ui/unified/library" { */ WorkingDay = "WorkingDay", } + /** + * Week order within a month for recurrence rules. + * + * This enum is part of the 'sap/ui/unified/library' module export and must be accessed by the property + * 'WeekOfMonth'. + * + * @since 1.149.0 + */ + export enum WeekOfMonth {} } declare module "sap/ui/unified/Calendar" { @@ -20386,14 +20404,615 @@ declare module "sap/ui/unified/NonWorkingPeriod" { } } +declare module "sap/ui/unified/RecurrenceRule" { + import { default as UI5Element, $ElementSettings } from "sap/ui/core/Element"; + + import ElementMetadata from "sap/ui/core/ElementMetadata"; + + import { + RecurrenceType, + RecurrenceRuleType, + WeekOfMonth, + } from "sap/ui/unified/library"; + + import { PropertyBindingInfo } from "sap/ui/base/ManagedObject"; + + /** + * Binding DTO for recurrence rule configuration. Carries all possible recurrence properties along with + * the `recurrenceType` that determines which properties are relevant. + * + * When set on a parent aggregation, the parent internally creates the correct concrete subclass ({@link sap.ui.unified.WeeklyRecurrenceRule}, + * {@link sap.ui.unified.MonthlyRecurrenceRule}, or {@link sap.ui.unified.YearlyRecurrenceRule}) via {@link sap.ui.unified.RecurrenceRule._factory}. + * + * Usage in XML binding: + * ```javascript + * + * + * + * + * ``` + * + * + * @experimental As of version 1.149. + */ + export default class RecurrenceRule extends UI5Element { + /** + * Constructor for a new `RecurrenceRule`. + * + * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated + * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description + * of the syntax of the settings object. + */ + constructor( + /** + * Initial settings for the new element + */ + mSettings?: $RecurrenceRuleSettings + ); + /** + * Constructor for a new `RecurrenceRule`. + * + * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated + * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description + * of the syntax of the settings object. + */ + constructor( + /** + * ID for the new element, generated automatically if no ID is given + */ + sId?: string, + /** + * Initial settings for the new element + */ + mSettings?: $RecurrenceRuleSettings + ); + + /** + * Creates a new subclass of class sap.ui.unified.RecurrenceRule with name `sClassName` and enriches it + * with the information contained in `oClassInfo`. + * + * `oClassInfo` might contain the same kind of information as described in {@link sap.ui.core.Element.extend}. + * + * + * @returns Created class / constructor function + */ + static extend>( + /** + * Name of the class being created + */ + sClassName: string, + /** + * Object literal with information about the class + */ + oClassInfo?: sap.ClassInfo, + /** + * Constructor function for the metadata object; if not given, it defaults to the metadata implementation + * used by this class + */ + FNMetaImpl?: Function + ): Function; + /** + * Returns a metadata object for class sap.ui.unified.RecurrenceRule. + * + * + * @returns Metadata object describing this class + */ + static getMetadata(): ElementMetadata; + /** + * Gets current value of property {@link #getDayOfMonth dayOfMonth}. + * + * Day of month (1–31). A value of `0` means "inherit from parent start date". Relevant when `type` is `DayOfMonth`. + * + * Default value is `0`. + * + * + * @returns Value of property `dayOfMonth` + */ + getDayOfMonth(): int; + /** + * Gets current value of property {@link #getDayOfWeek dayOfWeek}. + * + * Day of week (0–6, 0 = Sunday). Relevant when `type` is `DayOfWeek`. + * + * Default value is `0`. + * + * + * @returns Value of property `dayOfWeek` + */ + getDayOfWeek(): int; + /** + * Gets current value of property {@link #getDays days}. + * + * Days of week for weekly recurrence (0–6, 0 = Sunday). Relevant when `recurrenceType` is `Weekly`. + * + * Default value is `[]`. + * + * + * @returns Value of property `days` + */ + getDays(): int[]; + /** + * Gets current value of property {@link #getMonth month}. + * + * Month of year (0–11, 0 = January). Relevant when `recurrenceType` is `Yearly`. + * + * Default value is `-1`. + * + * + * @returns Value of property `month` + */ + getMonth(): int; + /** + * Gets current value of property {@link #getRecurrenceType recurrenceType}. + * + * The recurrence type. Determines which properties are relevant and which concrete subclass is created + * internally by the parent. + * + * + * @returns Value of property `recurrenceType` + */ + getRecurrenceType(): RecurrenceType; + /** + * Gets current value of property {@link #getType type}. + * + * Type of the advanced recurrence pattern. Relevant when `recurrenceType` is `Monthly` or `Yearly`. + * + * Default value is `DayOfMonth`. + * + * + * @returns Value of property `type` + */ + getType(): RecurrenceRuleType; + /** + * Gets current value of property {@link #getWeekOfMonth weekOfMonth}. + * + * Week of month (First, Second, Third, Fourth, Last). Relevant when `type` is `DayOfWeek`. + * + * Default value is `First`. + * + * + * @returns Value of property `weekOfMonth` + */ + getWeekOfMonth(): WeekOfMonth; + /** + * Sets a new value for property {@link #getDayOfMonth dayOfMonth}. + * + * Day of month (1–31). A value of `0` means "inherit from parent start date". Relevant when `type` is `DayOfMonth`. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `0`. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setDayOfMonth( + /** + * New value for property `dayOfMonth` + */ + iDayOfMonth?: int + ): this; + /** + * Sets a new value for property {@link #getDayOfWeek dayOfWeek}. + * + * Day of week (0–6, 0 = Sunday). Relevant when `type` is `DayOfWeek`. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `0`. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setDayOfWeek( + /** + * New value for property `dayOfWeek` + */ + iDayOfWeek?: int + ): this; + /** + * Sets the days of week (0–6, 0 = Sunday). + */ + setDays(vDays: number | number[]): this; + /** + * Sets a new value for property {@link #getMonth month}. + * + * Month of year (0–11, 0 = January). Relevant when `recurrenceType` is `Yearly`. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `-1`. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setMonth( + /** + * New value for property `month` + */ + iMonth?: int + ): this; + /** + * Sets a new value for property {@link #getRecurrenceType recurrenceType}. + * + * The recurrence type. Determines which properties are relevant and which concrete subclass is created + * internally by the parent. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setRecurrenceType( + /** + * New value for property `recurrenceType` + */ + sRecurrenceType: RecurrenceType | keyof typeof RecurrenceType + ): this; + /** + * Sets a new value for property {@link #getType type}. + * + * Type of the advanced recurrence pattern. Relevant when `recurrenceType` is `Monthly` or `Yearly`. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `DayOfMonth`. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setType( + /** + * New value for property `type` + */ + sType?: RecurrenceRuleType | keyof typeof RecurrenceRuleType + ): this; + /** + * Sets a new value for property {@link #getWeekOfMonth weekOfMonth}. + * + * Week of month (First, Second, Third, Fourth, Last). Relevant when `type` is `DayOfWeek`. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `First`. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setWeekOfMonth( + /** + * New value for property `weekOfMonth` + */ + sWeekOfMonth?: WeekOfMonth | keyof typeof WeekOfMonth + ): this; + } + /** + * Describes the settings that can be provided to the RecurrenceRule constructor. + * + * @experimental As of version 1.149. + */ + export interface $RecurrenceRuleSettings extends $ElementSettings { + /** + * The recurrence type. Determines which properties are relevant and which concrete subclass is created + * internally by the parent. + */ + recurrenceType?: + | (RecurrenceType | keyof typeof RecurrenceType) + | PropertyBindingInfo + | `{${string}}`; + + /** + * Days of week for weekly recurrence (0–6, 0 = Sunday). Relevant when `recurrenceType` is `Weekly`. + */ + days?: int[] | PropertyBindingInfo | `{${string}}`; + + /** + * Type of the advanced recurrence pattern. Relevant when `recurrenceType` is `Monthly` or `Yearly`. + */ + type?: + | (RecurrenceRuleType | keyof typeof RecurrenceRuleType) + | PropertyBindingInfo + | `{${string}}`; + + /** + * Day of month (1–31). A value of `0` means "inherit from parent start date". Relevant when `type` is `DayOfMonth`. + */ + dayOfMonth?: int | PropertyBindingInfo | `{${string}}`; + + /** + * Week of month (First, Second, Third, Fourth, Last). Relevant when `type` is `DayOfWeek`. + */ + weekOfMonth?: + | (WeekOfMonth | keyof typeof WeekOfMonth) + | PropertyBindingInfo + | `{${string}}`; + + /** + * Day of week (0–6, 0 = Sunday). Relevant when `type` is `DayOfWeek`. + */ + dayOfWeek?: int | PropertyBindingInfo | `{${string}}`; + + /** + * Month of year (0–11, 0 = January). Relevant when `recurrenceType` is `Yearly`. + */ + month?: int | PropertyBindingInfo | `{${string}}`; + } +} + +declare module "sap/ui/unified/RecurringCalendarAppointment" { + import { + default as CalendarAppointment, + $CalendarAppointmentSettings, + } from "sap/ui/unified/CalendarAppointment"; + + import UI5Date from "sap/ui/core/date/UI5Date"; + + import ElementMetadata from "sap/ui/core/ElementMetadata"; + + import RecurrenceRule from "sap/ui/unified/RecurrenceRule"; + + import { RecurrenceType } from "sap/ui/unified/library"; + + import { PropertyBindingInfo } from "sap/ui/base/ManagedObject"; + + /** + * An appointment for use in a `PlanningCalendar` or similar. The rendering must be done in the Row collecting + * the appointments. (Because there are different visualizations possible.) + * + * Applications could inherit from this element to add own fields. + * + * @experimental As of version 1.149. + */ + export default class RecurringCalendarAppointment extends CalendarAppointment { + /** + * Constructor for a new `RecurringCalendarAppointment`. + * + * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated + * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description + * of the syntax of the settings object. + */ + constructor( + /** + * Initial settings for the new control + */ + mSettings?: $RecurringCalendarAppointmentSettings + ); + /** + * Constructor for a new `RecurringCalendarAppointment`. + * + * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated + * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description + * of the syntax of the settings object. + */ + constructor( + /** + * ID for the new control, generated automatically if no ID is given + */ + sId?: string, + /** + * Initial settings for the new control + */ + mSettings?: $RecurringCalendarAppointmentSettings + ); + + /** + * Creates a new subclass of class sap.ui.unified.RecurringCalendarAppointment with name `sClassName` and + * enriches it with the information contained in `oClassInfo`. + * + * `oClassInfo` might contain the same kind of information as described in {@link sap.ui.unified.CalendarAppointment.extend}. + * + * + * @returns Created class / constructor function + */ + static extend>( + /** + * Name of the class being created + */ + sClassName: string, + /** + * Object literal with information about the class + */ + oClassInfo?: sap.ClassInfo, + /** + * Constructor function for the metadata object; if not given, it defaults to the metadata implementation + * used by this class + */ + FNMetaImpl?: Function + ): Function; + /** + * Returns a metadata object for class sap.ui.unified.RecurringCalendarAppointment. + * + * + * @returns Metadata object describing this class + */ + static getMetadata(): ElementMetadata; + /** + * Creates `CalendarAppointment` clones for each occurrence of this recurring appointment within the given + * date range. + * + * + * @returns Array of cloned appointments, one per occurrence + */ + createOccurrenceClones( + /** + * Start of the visible range (inclusive) + */ + oRangeStart: Date | UI5Date, + /** + * End of the visible range (inclusive) + */ + oRangeEnd: Date | UI5Date + ): CalendarAppointment[]; + /** + * Destroys the recurrenceRule in the aggregation {@link #getRecurrenceRule recurrenceRule}. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + destroyRecurrenceRule(): this; + /** + * Returns all occurrence dates within the given date range. + * + * + * @returns Array of occurrence dates (UI5Date instances) + */ + getOccurrencesInRange( + /** + * Start date of range (inclusive) + */ + oStartDate: Date | UI5Date, + /** + * End date of range (inclusive) + */ + oEndDate: Date | UI5Date + ): Date[]; + /** + * Gets current value of property {@link #getRecurrenceEndDate recurrenceEndDate}. + * + * End date of the recurrence. Must be a UI5Date or JavaScript Date object. + * + * + * @returns Value of property `recurrenceEndDate` + */ + getRecurrenceEndDate(): object; + /** + * Gets current value of property {@link #getRecurrencePattern recurrencePattern}. + * + * Recurrence interval. E.g. 1 = every day/week/month/year, 2 = every second, etc. + * + * Default value is `1`. + * + * + * @returns Value of property `recurrencePattern` + */ + getRecurrencePattern(): int; + /** + * Gets content of aggregation {@link #getRecurrenceRule recurrenceRule}. + * + * Advanced recurrence rule configuration. + */ + getRecurrenceRule(): RecurrenceRule; + /** + * Gets current value of property {@link #getRecurrenceType recurrenceType}. + * + * The recurrence type (Daily, Weekly, Monthly, Yearly). + * + * + * @returns Value of property `recurrenceType` + */ + getRecurrenceType(): RecurrenceType; + /** + * Sets a new value for property {@link #getRecurrenceEndDate recurrenceEndDate}. + * + * End date of the recurrence. Must be a UI5Date or JavaScript Date object. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setRecurrenceEndDate( + /** + * New value for property `recurrenceEndDate` + */ + oRecurrenceEndDate: object + ): this; + /** + * Sets a new value for property {@link #getRecurrencePattern recurrencePattern}. + * + * Recurrence interval. E.g. 1 = every day/week/month/year, 2 = every second, etc. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `1`. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setRecurrencePattern( + /** + * New value for property `recurrencePattern` + */ + iRecurrencePattern?: int + ): this; + /** + * Sets the aggregated {@link #getRecurrenceRule recurrenceRule}. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setRecurrenceRule( + /** + * The recurrenceRule to set + */ + oRecurrenceRule: RecurrenceRule + ): this; + /** + * Sets a new value for property {@link #getRecurrenceType recurrenceType}. + * + * The recurrence type (Daily, Weekly, Monthly, Yearly). + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setRecurrenceType( + /** + * New value for property `recurrenceType` + */ + sRecurrenceType: RecurrenceType | keyof typeof RecurrenceType + ): this; + } + /** + * Describes the settings that can be provided to the RecurringCalendarAppointment constructor. + * + * @experimental As of version 1.149. + */ + export interface $RecurringCalendarAppointmentSettings + extends $CalendarAppointmentSettings { + /** + * The recurrence type (Daily, Weekly, Monthly, Yearly). + */ + recurrenceType?: + | (RecurrenceType | keyof typeof RecurrenceType) + | PropertyBindingInfo + | `{${string}}`; + + /** + * End date of the recurrence. Must be a UI5Date or JavaScript Date object. + */ + recurrenceEndDate?: object | PropertyBindingInfo | `{${string}}`; + + /** + * Recurrence interval. E.g. 1 = every day/week/month/year, 2 = every second, etc. + */ + recurrencePattern?: int | PropertyBindingInfo | `{${string}}`; + + /** + * Advanced recurrence rule configuration. + */ + recurrenceRule?: RecurrenceRule; + } +} + declare module "sap/ui/unified/RecurringNonWorkingPeriod" { import { default as NonWorkingPeriod, $NonWorkingPeriodSettings, } from "sap/ui/unified/NonWorkingPeriod"; + import UI5Date from "sap/ui/core/date/UI5Date"; + import ElementMetadata from "sap/ui/core/ElementMetadata"; + import RecurrenceRule from "sap/ui/unified/RecurrenceRule"; + import { RecurrenceType } from "sap/ui/unified/library"; import { PropertyBindingInfo } from "sap/ui/base/ManagedObject"; @@ -20468,6 +21087,30 @@ declare module "sap/ui/unified/RecurringNonWorkingPeriod" { * @returns Metadata object describing this class */ static getMetadata(): ElementMetadata; + /** + * Destroys the recurrenceRule in the aggregation {@link #getRecurrenceRule recurrenceRule}. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + destroyRecurrenceRule(): this; + /** + * Gets cached non-working periods for a date range. Returns cached result if available, or null if not + * cached. + * + * + * @returns Cached non-working periods or null + */ + getCachedOccurrences( + /** + * Start date of range + */ + oStartDate: Date | UI5Date, + /** + * End date of range + */ + oEndDate: Date | UI5Date + ): NonWorkingPeriod[] | null; /** * Gets current value of property {@link #getRecurrenceEndDate recurrenceEndDate}. * @@ -20492,6 +21135,12 @@ declare module "sap/ui/unified/RecurringNonWorkingPeriod" { * @returns Value of property `recurrencePattern` */ getRecurrencePattern(): int; + /** + * Gets content of aggregation {@link #getRecurrenceRule recurrenceRule}. + * + * Advanced recurrence rule configuration. + */ + getRecurrenceRule(): RecurrenceRule; /** * Gets current value of property {@link #getRecurrenceType recurrenceType}. * @@ -20501,6 +21150,35 @@ declare module "sap/ui/unified/RecurringNonWorkingPeriod" { * @returns Value of property `recurrenceType` */ getRecurrenceType(): RecurrenceType; + /** + * Checks if a given date (without time) is a non-working day. + * + * + * @returns True if the date is non-working + */ + hasNonWorkingAtDate( + /** + * Date to check + */ + oDate: Date | UI5Date + ): boolean; + /** + * Sets cached non-working periods for a date range. + */ + setCachedOccurrences( + /** + * Start date of range + */ + oStartDate: Date | UI5Date, + /** + * End date of range + */ + oEndDate: Date | UI5Date, + /** + * Array of non-working periods to cache + */ + aPeriods: NonWorkingPeriod[] + ): void; /** * Sets a new value for property {@link #getRecurrenceEndDate recurrenceEndDate}. * @@ -20539,6 +21217,18 @@ declare module "sap/ui/unified/RecurringNonWorkingPeriod" { */ iRecurrencePattern?: int ): this; + /** + * Sets the aggregated {@link #getRecurrenceRule recurrenceRule}. + * + * + * @returns Reference to `this` in order to allow method chaining + */ + setRecurrenceRule( + /** + * The recurrenceRule to set + */ + oRecurrenceRule: RecurrenceRule + ): this; /** * Sets a new value for property {@link #getRecurrenceType recurrenceType}. * @@ -20584,6 +21274,11 @@ declare module "sap/ui/unified/RecurringNonWorkingPeriod" { * this would imply the calendar item is recurring once for every three days. */ recurrencePattern?: int | PropertyBindingInfo | `{${string}}`; + + /** + * Advanced recurrence rule configuration. + */ + recurrenceRule?: RecurrenceRule; } } @@ -23522,6 +24217,10 @@ declare namespace sap { "sap/ui/unified/NonWorkingPeriod": undefined; + "sap/ui/unified/RecurrenceRule": undefined; + + "sap/ui/unified/RecurringCalendarAppointment": undefined; + "sap/ui/unified/RecurringNonWorkingPeriod": undefined; "sap/ui/unified/Shell": undefined; diff --git a/types/openui5/sap.ui.ux3.d.ts b/types/openui5/sap.ui.ux3.d.ts index 633a0e0d8393be..c72b14ee2f6c66 100644 --- a/types/openui5/sap.ui.ux3.d.ts +++ b/types/openui5/sap.ui.ux3.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/ui/ux3/library" { /** diff --git a/types/openui5/sap.uxap.d.ts b/types/openui5/sap.uxap.d.ts index 75fa25a9ba64c6..a067a3a6f17c9b 100644 --- a/types/openui5/sap.uxap.d.ts +++ b/types/openui5/sap.uxap.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.148.0 +// For Library Version: 1.149.0 declare module "sap/uxap/library" { /**