@openui5/types 1.126.0 → 1.127.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.0
1
+ // For Library Version: 1.127.0
2
2
 
3
3
  declare module "sap/ui/unified/library" {
4
4
  /**
@@ -283,6 +283,15 @@ declare module "sap/ui/unified/library" {
283
283
  */
284
284
  Expanded = "Expanded",
285
285
  }
286
+ /**
287
+ * Interface for controls which are suitable to add as items of sap.m.Menu.
288
+ *
289
+ * @since 1.127.0
290
+ */
291
+ export interface IMenuItem {
292
+ __implements__sap_ui_unified_IMenuItem: boolean;
293
+ }
294
+
286
295
  /**
287
296
  * Marker interface for controls that process instances of `window.Blob`, such as `window.File`. The implementation
288
297
  * of this Interface should implement the following Interface methods:
@@ -17840,7 +17849,7 @@ declare module "sap/ui/unified/Menu" {
17840
17849
 
17841
17850
  import { IContextMenu, ID, Dock, Collision } from "sap/ui/core/library";
17842
17851
 
17843
- import MenuItemBase from "sap/ui/unified/MenuItemBase";
17852
+ import { IMenuItem } from "sap/ui/unified/library";
17844
17853
 
17845
17854
  import ElementMetadata from "sap/ui/core/ElementMetadata";
17846
17855
 
@@ -17851,6 +17860,8 @@ declare module "sap/ui/unified/Menu" {
17851
17860
  AggregationBindingInfo,
17852
17861
  } from "sap/ui/base/ManagedObject";
17853
17862
 
17863
+ import MenuItemBase from "sap/ui/unified/MenuItemBase";
17864
+
17854
17865
  import Event from "sap/ui/base/Event";
17855
17866
 
17856
17867
  /**
@@ -17947,7 +17958,7 @@ declare module "sap/ui/unified/Menu" {
17947
17958
  /**
17948
17959
  * The item to add; if empty, nothing is inserted
17949
17960
  */
17950
- oItem: MenuItemBase
17961
+ oItem: IMenuItem
17951
17962
  ): this;
17952
17963
  /**
17953
17964
  * Attaches event handler `fnFunction` to the {@link #event:itemSelect itemSelect} event of this `sap.ui.unified.Menu`.
@@ -18075,7 +18086,7 @@ declare module "sap/ui/unified/Menu" {
18075
18086
  *
18076
18087
  * The available actions to be displayed as items of the menu.
18077
18088
  */
18078
- getItems(): MenuItemBase[];
18089
+ getItems(): IMenuItem[];
18079
18090
  /**
18080
18091
  * Gets current value of property {@link #getMaxVisibleItems maxVisibleItems}.
18081
18092
  *
@@ -18108,8 +18119,18 @@ declare module "sap/ui/unified/Menu" {
18108
18119
  */
18109
18120
  getPageSize(): int;
18110
18121
  /**
18111
- * Checks for the provided `sap.ui.unified.MenuItemBase` in the aggregation {@link #getItems items}. and
18112
- * returns its index if found or -1 otherwise.
18122
+ * Returns all items that have `selected` properties set to `true`. **Note:** Only items with `selected`
18123
+ * property set that are members of `MenuItemGroup` with `ItemSelectionMode` property set to {@link sap.ui.core.ItemSelectionMode.SingleSelect }
18124
+ * or {@link sap.ui.unified.ItemSelectionMode.MultiSelect}> are taken into account.
18125
+ *
18126
+ * @since 1.127.0
18127
+ *
18128
+ * @returns Array of all selected items
18129
+ */
18130
+ getSelectedItems(): any[];
18131
+ /**
18132
+ * Checks for the provided `sap.ui.unified.IMenuItem` in the aggregation {@link #getItems items}. and returns
18133
+ * its index if found or -1 otherwise.
18113
18134
  *
18114
18135
  *
18115
18136
  * @returns The index of the provided control in the aggregation if found, or -1 otherwise
@@ -18118,7 +18139,7 @@ declare module "sap/ui/unified/Menu" {
18118
18139
  /**
18119
18140
  * The item whose index is looked for
18120
18141
  */
18121
- oItem: MenuItemBase
18142
+ oItem: IMenuItem
18122
18143
  ): int;
18123
18144
  /**
18124
18145
  * Inserts a item into the aggregation {@link #getItems items}.
@@ -18130,7 +18151,7 @@ declare module "sap/ui/unified/Menu" {
18130
18151
  /**
18131
18152
  * The item to insert; if empty, nothing is inserted
18132
18153
  */
18133
- oItem: MenuItemBase,
18154
+ oItem: IMenuItem,
18134
18155
  /**
18135
18156
  * The `0`-based index the item should be inserted at; for a negative value of `iIndex`, the item is inserted
18136
18157
  * at position 0; for a value greater than the current size of the aggregation, the item is inserted at
@@ -18215,7 +18236,7 @@ declare module "sap/ui/unified/Menu" {
18215
18236
  *
18216
18237
  * @returns An array of the removed elements (might be empty)
18217
18238
  */
18218
- removeAllItems(): MenuItemBase[];
18239
+ removeAllItems(): IMenuItem[];
18219
18240
  /**
18220
18241
  * Removes an ariaLabelledBy from the association named {@link #getAriaLabelledBy ariaLabelledBy}.
18221
18242
  *
@@ -18239,8 +18260,8 @@ declare module "sap/ui/unified/Menu" {
18239
18260
  /**
18240
18261
  * The item to remove or its index or id
18241
18262
  */
18242
- vItem: int | string | MenuItemBase
18243
- ): MenuItemBase | null;
18263
+ vItem: int | string | IMenuItem
18264
+ ): IMenuItem | null;
18244
18265
  /**
18245
18266
  * Sets a new value for property {@link #getAriaDescription ariaDescription}.
18246
18267
  *
@@ -18363,11 +18384,7 @@ declare module "sap/ui/unified/Menu" {
18363
18384
  /**
18364
18385
  * The available actions to be displayed as items of the menu.
18365
18386
  */
18366
- items?:
18367
- | MenuItemBase[]
18368
- | MenuItemBase
18369
- | AggregationBindingInfo
18370
- | `{${string}}`;
18387
+ items?: IMenuItem[] | IMenuItem | AggregationBindingInfo | `{${string}}`;
18371
18388
 
18372
18389
  /**
18373
18390
  * Reference to accessible labels (ids of existing DOM elements or controls) for assistive technologies
@@ -18410,6 +18427,8 @@ declare module "sap/ui/unified/MenuItem" {
18410
18427
  $MenuItemBaseSettings,
18411
18428
  } from "sap/ui/unified/MenuItemBase";
18412
18429
 
18430
+ import { IMenuItem } from "sap/ui/unified/library";
18431
+
18413
18432
  import { ID, URI } from "sap/ui/core/library";
18414
18433
 
18415
18434
  import Control from "sap/ui/core/Control";
@@ -18424,7 +18443,8 @@ declare module "sap/ui/unified/MenuItem" {
18424
18443
  *
18425
18444
  * @since 1.21.0
18426
18445
  */
18427
- export default class MenuItem extends MenuItemBase {
18446
+ export default class MenuItem extends MenuItemBase implements IMenuItem {
18447
+ __implements__sap_ui_unified_IMenuItem: boolean;
18428
18448
  /**
18429
18449
  * Constructor for a new MenuItem element.
18430
18450
  *
@@ -18515,6 +18535,13 @@ declare module "sap/ui/unified/MenuItem" {
18515
18535
  * @returns Value of property `icon`
18516
18536
  */
18517
18537
  getIcon(): URI;
18538
+ /**
18539
+ * @since 1.127.0
18540
+ *
18541
+ * @returns Returns `true` if the `MenuItem` is selected and is part of group with single or multi selection
18542
+ * mode, `false` otherwise.
18543
+ */
18544
+ getSelected(): boolean;
18518
18545
  /**
18519
18546
  * Gets current value of property {@link #getShortcutText shortcutText}.
18520
18547
  *
@@ -18578,6 +18605,20 @@ declare module "sap/ui/unified/MenuItem" {
18578
18605
  */
18579
18606
  sIcon?: URI
18580
18607
  ): this;
18608
+ /**
18609
+ * Sets the `selected` state of the `MenuItem` and deselect other selected `MenuItem` controls if selection
18610
+ * mode is `SingleSelect`.
18611
+ *
18612
+ * @since 1.127.0
18613
+ *
18614
+ * @returns Returns `this` to allow method chaining
18615
+ */
18616
+ setSelected(
18617
+ /**
18618
+ * Whether the state is selected or not
18619
+ */
18620
+ bState: boolean
18621
+ ): this;
18581
18622
  /**
18582
18623
  * Sets a new value for property {@link #getShortcutText shortcutText}.
18583
18624
  *
@@ -18633,6 +18674,16 @@ declare module "sap/ui/unified/MenuItem" {
18633
18674
  */
18634
18675
  icon?: URI | PropertyBindingInfo | `{${string}}`;
18635
18676
 
18677
+ /**
18678
+ * Determines whether the `MenuItem` is selected (default is set to `false`). A selected `MenuItem` has
18679
+ * a check mark rendered at its end. **Note: ** selection functionality works only if the menu item is a
18680
+ * member of `MenuItemGroup` with `itemSelectionMode` set to {@link sap.ui.core.ItemSelectionMode.SingleSelect }
18681
+ * or {@link sap.ui.unified.ItemSelectionMode.MultiSelect}.
18682
+ *
18683
+ * @since 1.127.0
18684
+ */
18685
+ selected?: boolean | PropertyBindingInfo | `{${string}}`;
18686
+
18636
18687
  /**
18637
18688
  * Defines the shortcut text that should be displayed on the menu item on non-mobile devices. **Note:**
18638
18689
  * The text is only displayed and set as а value of the `aria-keyshortcuts` attribute. There is no built-in
@@ -19041,12 +19092,240 @@ declare module "sap/ui/unified/MenuItemBase" {
19041
19092
  >;
19042
19093
  }
19043
19094
 
19095
+ declare module "sap/ui/unified/MenuItemGroup" {
19096
+ import { default as UI5Element, $ElementSettings } from "sap/ui/core/Element";
19097
+
19098
+ import { IMenuItem } from "sap/ui/unified/library";
19099
+
19100
+ import { ItemSelectionMode } from "sap/ui/core/library";
19101
+
19102
+ import ElementMetadata from "sap/ui/core/ElementMetadata";
19103
+
19104
+ import {
19105
+ PropertyBindingInfo,
19106
+ AggregationBindingInfo,
19107
+ } from "sap/ui/base/ManagedObject";
19108
+
19109
+ /**
19110
+ * Group item to be used inside a menu. A menu items group represents a collection of menu items that can
19111
+ * have the same selection mode (e.g. {@link sap.ui.core.ItemSelectionMode.None}, {@link sap.ui.core.ItemSelectionMode.SingleSelect},
19112
+ * or {@link sap.ui.unified.ItemSelectionMode.MultiSelect}).
19113
+ *
19114
+ * @since 1.127.0
19115
+ */
19116
+ export default class MenuItemGroup extends UI5Element implements IMenuItem {
19117
+ __implements__sap_ui_unified_IMenuItem: boolean;
19118
+ /**
19119
+ * Constructor for a new MenuItemGroup element.
19120
+ *
19121
+ * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated
19122
+ * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description
19123
+ * of the syntax of the settings object.
19124
+ */
19125
+ constructor(
19126
+ /**
19127
+ * Initial settings for the new control
19128
+ */
19129
+ mSettings?: $MenuItemGroupSettings
19130
+ );
19131
+ /**
19132
+ * Constructor for a new MenuItemGroup element.
19133
+ *
19134
+ * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated
19135
+ * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description
19136
+ * of the syntax of the settings object.
19137
+ */
19138
+ constructor(
19139
+ /**
19140
+ * ID for the new control, generated automatically if no ID is given
19141
+ */
19142
+ sId?: string,
19143
+ /**
19144
+ * Initial settings for the new control
19145
+ */
19146
+ mSettings?: $MenuItemGroupSettings
19147
+ );
19148
+
19149
+ /**
19150
+ * Creates a new subclass of class sap.ui.unified.MenuItemGroup with name `sClassName` and enriches it with
19151
+ * the information contained in `oClassInfo`.
19152
+ *
19153
+ * `oClassInfo` might contain the same kind of information as described in {@link sap.ui.core.Element.extend}.
19154
+ *
19155
+ *
19156
+ * @returns Created class / constructor function
19157
+ */
19158
+ static extend<T extends Record<string, unknown>>(
19159
+ /**
19160
+ * Name of the class being created
19161
+ */
19162
+ sClassName: string,
19163
+ /**
19164
+ * Object literal with information about the class
19165
+ */
19166
+ oClassInfo?: sap.ClassInfo<T, MenuItemGroup>,
19167
+ /**
19168
+ * Constructor function for the metadata object; if not given, it defaults to the metadata implementation
19169
+ * used by this class
19170
+ */
19171
+ FNMetaImpl?: Function
19172
+ ): Function;
19173
+ /**
19174
+ * Returns a metadata object for class sap.ui.unified.MenuItemGroup.
19175
+ *
19176
+ *
19177
+ * @returns Metadata object describing this class
19178
+ */
19179
+ static getMetadata(): ElementMetadata;
19180
+ /**
19181
+ * Override of the default setter that adds a group reference to the item's `group` association.
19182
+ *
19183
+ *
19184
+ * @returns `this` to allow method chaining
19185
+ */
19186
+ addItem(
19187
+ /**
19188
+ * Menu item to be added
19189
+ */
19190
+ oItem: IMenuItem,
19191
+ /**
19192
+ * Whether to suppress the invalidation of the control
19193
+ */
19194
+ bSuppressInvalidate: boolean
19195
+ ): this;
19196
+ /**
19197
+ * Destroys all items from `items` aggregation.
19198
+ *
19199
+ *
19200
+ * @returns `this` to allow method chaining
19201
+ */
19202
+ destroyItems(
19203
+ /**
19204
+ * Whether to suppress the invalidation of the control
19205
+ */
19206
+ bSuppressInvalidate: boolean
19207
+ ): this;
19208
+ /**
19209
+ * Gets content of aggregation {@link #getItems items}.
19210
+ *
19211
+ * The available items of the menu. **Note:** Adding MenuItemGroup as an item to the MenuItemGroup is not
19212
+ * supported.
19213
+ */
19214
+ getItems(): IMenuItem[];
19215
+ /**
19216
+ * Gets current value of property {@link #getItemSelectionMode itemSelectionMode}.
19217
+ *
19218
+ * Defines the selection mode of the child items (e.g. `None`, `SingleSelect`, `MultiSelect`)
19219
+ *
19220
+ * Default value is `None`.
19221
+ *
19222
+ *
19223
+ * @returns Value of property `itemSelectionMode`
19224
+ */
19225
+ getItemSelectionMode(): ItemSelectionMode;
19226
+ /**
19227
+ * Checks for the provided `sap.ui.unified.IMenuItem` in the aggregation {@link #getItems items}. and returns
19228
+ * its index if found or -1 otherwise.
19229
+ *
19230
+ *
19231
+ * @returns The index of the provided control in the aggregation if found, or -1 otherwise
19232
+ */
19233
+ indexOfItem(
19234
+ /**
19235
+ * The item whose index is looked for
19236
+ */
19237
+ oItem: IMenuItem
19238
+ ): int;
19239
+ /**
19240
+ * Override of the default setter that adds a group reference to the item's `group` association.
19241
+ *
19242
+ *
19243
+ * @returns `this` to allow method chaining
19244
+ */
19245
+ insertItem(
19246
+ /**
19247
+ * Menu item to be added
19248
+ */
19249
+ oItem: IMenuItem,
19250
+ /**
19251
+ * Index at which the item should be inserted
19252
+ */
19253
+ iIndex: int,
19254
+ /**
19255
+ * Whether to suppress the invalidation of the control
19256
+ */
19257
+ bSuppressInvalidate: boolean
19258
+ ): this;
19259
+ /**
19260
+ * Removes all items from `items` aggregation.
19261
+ *
19262
+ *
19263
+ * @returns array containing the removed items, or null if there are no items to remove
19264
+ */
19265
+ removeAllItems(
19266
+ /**
19267
+ * Whether to suppress the invalidation of the control
19268
+ */
19269
+ bSuppressInvalidate: boolean
19270
+ ): any[] | null;
19271
+ /**
19272
+ * Removes an item from `items` aggregation.
19273
+ *
19274
+ *
19275
+ * @returns the removed object, or `null` if there are no items to remove
19276
+ */
19277
+ removeItem(
19278
+ /**
19279
+ * Menu item to be removed (as index, ID or object)
19280
+ */
19281
+ vItem: int | string | IMenuItem,
19282
+ /**
19283
+ * Whether to suppress the invalidation of the control
19284
+ */
19285
+ bSuppressInvalidate: boolean
19286
+ ): IMenuItem | null;
19287
+ /**
19288
+ * Override of the default setter that also ensures single selection if necessary.
19289
+ *
19290
+ *
19291
+ * @returns `this` to allow method chaining
19292
+ */
19293
+ setItemSelectionMode(
19294
+ /**
19295
+ * item selection mode to be set
19296
+ */
19297
+ sSelectionMode: string,
19298
+ /**
19299
+ * Whether to suppress the invalidation of the control
19300
+ */
19301
+ bSuppressInvalidate: boolean
19302
+ ): this;
19303
+ }
19304
+ /**
19305
+ * Describes the settings that can be provided to the MenuItemGroup constructor.
19306
+ */
19307
+ export interface $MenuItemGroupSettings extends $ElementSettings {
19308
+ /**
19309
+ * Defines the selection mode of the child items (e.g. `None`, `SingleSelect`, `MultiSelect`)
19310
+ */
19311
+ itemSelectionMode?: ItemSelectionMode | PropertyBindingInfo | `{${string}}`;
19312
+
19313
+ /**
19314
+ * The available items of the menu. **Note:** Adding MenuItemGroup as an item to the MenuItemGroup is not
19315
+ * supported.
19316
+ */
19317
+ items?: IMenuItem[] | IMenuItem | AggregationBindingInfo | `{${string}}`;
19318
+ }
19319
+ }
19320
+
19044
19321
  declare module "sap/ui/unified/MenuTextFieldItem" {
19045
19322
  import {
19046
19323
  default as MenuItemBase,
19047
19324
  $MenuItemBaseSettings,
19048
19325
  } from "sap/ui/unified/MenuItemBase";
19049
19326
 
19327
+ import { IMenuItem } from "sap/ui/unified/library";
19328
+
19050
19329
  import { URI, ValueState } from "sap/ui/core/library";
19051
19330
 
19052
19331
  import ElementMetadata from "sap/ui/core/ElementMetadata";
@@ -19062,7 +19341,11 @@ declare module "sap/ui/unified/MenuTextFieldItem" {
19062
19341
  *
19063
19342
  * @since 1.21.0
19064
19343
  */
19065
- export default class MenuTextFieldItem extends MenuItemBase {
19344
+ export default class MenuTextFieldItem
19345
+ extends MenuItemBase
19346
+ implements IMenuItem
19347
+ {
19348
+ __implements__sap_ui_unified_IMenuItem: boolean;
19066
19349
  /**
19067
19350
  * Constructor for a new MenuTextFieldItem element.
19068
19351
  *
@@ -22022,6 +22305,8 @@ declare namespace sap {
22022
22305
 
22023
22306
  "sap/ui/unified/MenuItemBase": undefined;
22024
22307
 
22308
+ "sap/ui/unified/MenuItemGroup": undefined;
22309
+
22025
22310
  "sap/ui/unified/MenuTextFieldItem": undefined;
22026
22311
 
22027
22312
  "sap/ui/unified/Shell": undefined;
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.0
1
+ // For Library Version: 1.127.0
2
2
 
3
3
  declare module "sap/ui/ux3/library" {
4
4
  /**
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.0
1
+ // For Library Version: 1.127.0
2
2
 
3
3
  declare module "sap/ui/webc/common/library" {}
4
4
 
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.0
1
+ // For Library Version: 1.127.0
2
2
 
3
3
  declare module "sap/ui/webc/fiori/library" {
4
4
  /**
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.0
1
+ // For Library Version: 1.127.0
2
2
 
3
3
  declare module "sap/ui/webc/main/library" {
4
4
  /**
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.0
1
+ // For Library Version: 1.127.0
2
2
 
3
3
  declare module "sap/uxap/library" {
4
4
  /**