@openui5/ts-types 1.126.1 → 1.127.1

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.1
1
+ // For Library Version: 1.127.1
2
2
 
3
3
  declare namespace sap {
4
4
  namespace ui {
@@ -5737,6 +5737,15 @@ declare namespace sap {
5737
5737
  YearPicker
5738
5738
  >;
5739
5739
  }
5740
+ /**
5741
+ * Interface for controls which are suitable to add as items of sap.m.Menu.
5742
+ *
5743
+ * @since 1.127.0
5744
+ */
5745
+ interface IMenuItem {
5746
+ __implements__sap_ui_unified_IMenuItem: boolean;
5747
+ }
5748
+
5740
5749
  /**
5741
5750
  * Marker interface for controls that process instances of `window.Blob`, such as `window.File`. The implementation
5742
5751
  * of this Interface should implement the following Interface methods:
@@ -7605,8 +7614,8 @@ declare namespace sap {
7605
7614
  * The available actions to be displayed as items of the menu.
7606
7615
  */
7607
7616
  items?:
7608
- | sap.ui.unified.MenuItemBase[]
7609
- | sap.ui.unified.MenuItemBase
7617
+ | sap.ui.unified.IMenuItem[]
7618
+ | sap.ui.unified.IMenuItem
7610
7619
  | sap.ui.base.ManagedObject.AggregationBindingInfo
7611
7620
  | `{${string}}`;
7612
7621
 
@@ -7644,6 +7653,19 @@ declare namespace sap {
7644
7653
  | sap.ui.base.ManagedObject.PropertyBindingInfo
7645
7654
  | `{${string}}`;
7646
7655
 
7656
+ /**
7657
+ * Determines whether the `MenuItem` is selected (default is set to `false`). A selected `MenuItem` has
7658
+ * a check mark rendered at its end. **Note: ** selection functionality works only if the menu item is a
7659
+ * member of `MenuItemGroup` with `itemSelectionMode` set to {@link sap.ui.core.ItemSelectionMode.SingleSelect }
7660
+ * or {@link sap.ui.unified.ItemSelectionMode.MultiSelect}.
7661
+ *
7662
+ * @since 1.127.0
7663
+ */
7664
+ selected?:
7665
+ | boolean
7666
+ | sap.ui.base.ManagedObject.PropertyBindingInfo
7667
+ | `{${string}}`;
7668
+
7647
7669
  /**
7648
7670
  * Defines the shortcut text that should be displayed on the menu item on non-mobile devices. **Note:**
7649
7671
  * The text is only displayed and set as а value of the `aria-keyshortcuts` attribute. There is no built-in
@@ -7701,6 +7723,29 @@ declare namespace sap {
7701
7723
  select?: (oEvent: MenuItemBase$SelectEvent) => void;
7702
7724
  }
7703
7725
 
7726
+ /**
7727
+ * Describes the settings that can be provided to the MenuItemGroup constructor.
7728
+ */
7729
+ interface $MenuItemGroupSettings extends sap.ui.core.$ElementSettings {
7730
+ /**
7731
+ * Defines the selection mode of the child items (e.g. `None`, `SingleSelect`, `MultiSelect`)
7732
+ */
7733
+ itemSelectionMode?:
7734
+ | sap.ui.core.ItemSelectionMode
7735
+ | sap.ui.base.ManagedObject.PropertyBindingInfo
7736
+ | `{${string}}`;
7737
+
7738
+ /**
7739
+ * The available items of the menu. **Note:** Adding MenuItemGroup as an item to the MenuItemGroup is not
7740
+ * supported.
7741
+ */
7742
+ items?:
7743
+ | sap.ui.unified.IMenuItem[]
7744
+ | sap.ui.unified.IMenuItem
7745
+ | sap.ui.base.ManagedObject.AggregationBindingInfo
7746
+ | `{${string}}`;
7747
+ }
7748
+
7704
7749
  /**
7705
7750
  * Describes the settings that can be provided to the MenuTextFieldItem constructor.
7706
7751
  */
@@ -17922,7 +17967,7 @@ declare namespace sap {
17922
17967
  /**
17923
17968
  * The item to add; if empty, nothing is inserted
17924
17969
  */
17925
- oItem: sap.ui.unified.MenuItemBase
17970
+ oItem: sap.ui.unified.IMenuItem
17926
17971
  ): this;
17927
17972
  /**
17928
17973
  * Attaches event handler `fnFunction` to the {@link #event:itemSelect itemSelect} event of this `sap.ui.unified.Menu`.
@@ -18050,7 +18095,7 @@ declare namespace sap {
18050
18095
  *
18051
18096
  * The available actions to be displayed as items of the menu.
18052
18097
  */
18053
- getItems(): sap.ui.unified.MenuItemBase[];
18098
+ getItems(): sap.ui.unified.IMenuItem[];
18054
18099
  /**
18055
18100
  * Gets current value of property {@link #getMaxVisibleItems maxVisibleItems}.
18056
18101
  *
@@ -18083,8 +18128,18 @@ declare namespace sap {
18083
18128
  */
18084
18129
  getPageSize(): int;
18085
18130
  /**
18086
- * Checks for the provided `sap.ui.unified.MenuItemBase` in the aggregation {@link #getItems items}. and
18087
- * returns its index if found or -1 otherwise.
18131
+ * Returns all items that have `selected` properties set to `true`. **Note:** Only items with `selected`
18132
+ * property set that are members of `MenuItemGroup` with `ItemSelectionMode` property set to {@link sap.ui.core.ItemSelectionMode.SingleSelect }
18133
+ * or {@link sap.ui.unified.ItemSelectionMode.MultiSelect}> are taken into account.
18134
+ *
18135
+ * @since 1.127.0
18136
+ *
18137
+ * @returns Array of all selected items
18138
+ */
18139
+ getSelectedItems(): any[];
18140
+ /**
18141
+ * Checks for the provided `sap.ui.unified.IMenuItem` in the aggregation {@link #getItems items}. and returns
18142
+ * its index if found or -1 otherwise.
18088
18143
  *
18089
18144
  *
18090
18145
  * @returns The index of the provided control in the aggregation if found, or -1 otherwise
@@ -18093,7 +18148,7 @@ declare namespace sap {
18093
18148
  /**
18094
18149
  * The item whose index is looked for
18095
18150
  */
18096
- oItem: sap.ui.unified.MenuItemBase
18151
+ oItem: sap.ui.unified.IMenuItem
18097
18152
  ): int;
18098
18153
  /**
18099
18154
  * Inserts a item into the aggregation {@link #getItems items}.
@@ -18105,7 +18160,7 @@ declare namespace sap {
18105
18160
  /**
18106
18161
  * The item to insert; if empty, nothing is inserted
18107
18162
  */
18108
- oItem: sap.ui.unified.MenuItemBase,
18163
+ oItem: sap.ui.unified.IMenuItem,
18109
18164
  /**
18110
18165
  * The `0`-based index the item should be inserted at; for a negative value of `iIndex`, the item is inserted
18111
18166
  * at position 0; for a value greater than the current size of the aggregation, the item is inserted at
@@ -18190,7 +18245,7 @@ declare namespace sap {
18190
18245
  *
18191
18246
  * @returns An array of the removed elements (might be empty)
18192
18247
  */
18193
- removeAllItems(): sap.ui.unified.MenuItemBase[];
18248
+ removeAllItems(): sap.ui.unified.IMenuItem[];
18194
18249
  /**
18195
18250
  * Removes an ariaLabelledBy from the association named {@link #getAriaLabelledBy ariaLabelledBy}.
18196
18251
  *
@@ -18214,8 +18269,8 @@ declare namespace sap {
18214
18269
  /**
18215
18270
  * The item to remove or its index or id
18216
18271
  */
18217
- vItem: int | string | sap.ui.unified.MenuItemBase
18218
- ): sap.ui.unified.MenuItemBase | null;
18272
+ vItem: int | string | sap.ui.unified.IMenuItem
18273
+ ): sap.ui.unified.IMenuItem | null;
18219
18274
  /**
18220
18275
  * Sets a new value for property {@link #getAriaDescription ariaDescription}.
18221
18276
  *
@@ -18304,7 +18359,11 @@ declare namespace sap {
18304
18359
  *
18305
18360
  * @since 1.21.0
18306
18361
  */
18307
- class MenuItem extends sap.ui.unified.MenuItemBase {
18362
+ class MenuItem
18363
+ extends sap.ui.unified.MenuItemBase
18364
+ implements sap.ui.unified.IMenuItem
18365
+ {
18366
+ __implements__sap_ui_unified_IMenuItem: boolean;
18308
18367
  /**
18309
18368
  * Constructor for a new MenuItem element.
18310
18369
  *
@@ -18395,6 +18454,13 @@ declare namespace sap {
18395
18454
  * @returns Value of property `icon`
18396
18455
  */
18397
18456
  getIcon(): sap.ui.core.URI;
18457
+ /**
18458
+ * @since 1.127.0
18459
+ *
18460
+ * @returns Returns `true` if the `MenuItem` is selected and is part of group with single or multi selection
18461
+ * mode, `false` otherwise.
18462
+ */
18463
+ getSelected(): boolean;
18398
18464
  /**
18399
18465
  * Gets current value of property {@link #getShortcutText shortcutText}.
18400
18466
  *
@@ -18458,6 +18524,20 @@ declare namespace sap {
18458
18524
  */
18459
18525
  sIcon?: sap.ui.core.URI
18460
18526
  ): this;
18527
+ /**
18528
+ * Sets the `selected` state of the `MenuItem` and deselect other selected `MenuItem` controls if selection
18529
+ * mode is `SingleSelect`.
18530
+ *
18531
+ * @since 1.127.0
18532
+ *
18533
+ * @returns Returns `this` to allow method chaining
18534
+ */
18535
+ setSelected(
18536
+ /**
18537
+ * Whether the state is selected or not
18538
+ */
18539
+ bState: boolean
18540
+ ): this;
18461
18541
  /**
18462
18542
  * Sets a new value for property {@link #getShortcutText shortcutText}.
18463
18543
  *
@@ -18825,6 +18905,204 @@ declare namespace sap {
18825
18905
  bVisible?: boolean
18826
18906
  ): this;
18827
18907
  }
18908
+ /**
18909
+ * Group item to be used inside a menu. A menu items group represents a collection of menu items that can
18910
+ * have the same selection mode (e.g. {@link sap.ui.core.ItemSelectionMode.None}, {@link sap.ui.core.ItemSelectionMode.SingleSelect},
18911
+ * or {@link sap.ui.unified.ItemSelectionMode.MultiSelect}).
18912
+ *
18913
+ * @since 1.127.0
18914
+ */
18915
+ class MenuItemGroup
18916
+ extends sap.ui.core.Element
18917
+ implements sap.ui.unified.IMenuItem
18918
+ {
18919
+ __implements__sap_ui_unified_IMenuItem: boolean;
18920
+ /**
18921
+ * Constructor for a new MenuItemGroup element.
18922
+ *
18923
+ * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated
18924
+ * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description
18925
+ * of the syntax of the settings object.
18926
+ */
18927
+ constructor(
18928
+ /**
18929
+ * Initial settings for the new control
18930
+ */
18931
+ mSettings?: sap.ui.unified.$MenuItemGroupSettings
18932
+ );
18933
+ /**
18934
+ * Constructor for a new MenuItemGroup element.
18935
+ *
18936
+ * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated
18937
+ * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description
18938
+ * of the syntax of the settings object.
18939
+ */
18940
+ constructor(
18941
+ /**
18942
+ * ID for the new control, generated automatically if no ID is given
18943
+ */
18944
+ sId?: string,
18945
+ /**
18946
+ * Initial settings for the new control
18947
+ */
18948
+ mSettings?: sap.ui.unified.$MenuItemGroupSettings
18949
+ );
18950
+
18951
+ /**
18952
+ * Creates a new subclass of class sap.ui.unified.MenuItemGroup with name `sClassName` and enriches it with
18953
+ * the information contained in `oClassInfo`.
18954
+ *
18955
+ * `oClassInfo` might contain the same kind of information as described in {@link sap.ui.core.Element.extend}.
18956
+ *
18957
+ *
18958
+ * @returns Created class / constructor function
18959
+ */
18960
+ static extend<T extends Record<string, unknown>>(
18961
+ /**
18962
+ * Name of the class being created
18963
+ */
18964
+ sClassName: string,
18965
+ /**
18966
+ * Object literal with information about the class
18967
+ */
18968
+ oClassInfo?: sap.ClassInfo<T, sap.ui.unified.MenuItemGroup>,
18969
+ /**
18970
+ * Constructor function for the metadata object; if not given, it defaults to the metadata implementation
18971
+ * used by this class
18972
+ */
18973
+ FNMetaImpl?: Function
18974
+ ): Function;
18975
+ /**
18976
+ * Returns a metadata object for class sap.ui.unified.MenuItemGroup.
18977
+ *
18978
+ *
18979
+ * @returns Metadata object describing this class
18980
+ */
18981
+ static getMetadata(): sap.ui.core.ElementMetadata;
18982
+ /**
18983
+ * Override of the default setter that adds a group reference to the item's `group` association.
18984
+ *
18985
+ *
18986
+ * @returns `this` to allow method chaining
18987
+ */
18988
+ addItem(
18989
+ /**
18990
+ * Menu item to be added
18991
+ */
18992
+ oItem: sap.ui.unified.IMenuItem,
18993
+ /**
18994
+ * Whether to suppress the invalidation of the control
18995
+ */
18996
+ bSuppressInvalidate: boolean
18997
+ ): this;
18998
+ /**
18999
+ * Destroys all items from `items` aggregation.
19000
+ *
19001
+ *
19002
+ * @returns `this` to allow method chaining
19003
+ */
19004
+ destroyItems(
19005
+ /**
19006
+ * Whether to suppress the invalidation of the control
19007
+ */
19008
+ bSuppressInvalidate: boolean
19009
+ ): this;
19010
+ /**
19011
+ * Gets content of aggregation {@link #getItems items}.
19012
+ *
19013
+ * The available items of the menu. **Note:** Adding MenuItemGroup as an item to the MenuItemGroup is not
19014
+ * supported.
19015
+ */
19016
+ getItems(): sap.ui.unified.IMenuItem[];
19017
+ /**
19018
+ * Gets current value of property {@link #getItemSelectionMode itemSelectionMode}.
19019
+ *
19020
+ * Defines the selection mode of the child items (e.g. `None`, `SingleSelect`, `MultiSelect`)
19021
+ *
19022
+ * Default value is `None`.
19023
+ *
19024
+ *
19025
+ * @returns Value of property `itemSelectionMode`
19026
+ */
19027
+ getItemSelectionMode(): sap.ui.core.ItemSelectionMode;
19028
+ /**
19029
+ * Checks for the provided `sap.ui.unified.IMenuItem` in the aggregation {@link #getItems items}. and returns
19030
+ * its index if found or -1 otherwise.
19031
+ *
19032
+ *
19033
+ * @returns The index of the provided control in the aggregation if found, or -1 otherwise
19034
+ */
19035
+ indexOfItem(
19036
+ /**
19037
+ * The item whose index is looked for
19038
+ */
19039
+ oItem: sap.ui.unified.IMenuItem
19040
+ ): int;
19041
+ /**
19042
+ * Override of the default setter that adds a group reference to the item's `group` association.
19043
+ *
19044
+ *
19045
+ * @returns `this` to allow method chaining
19046
+ */
19047
+ insertItem(
19048
+ /**
19049
+ * Menu item to be added
19050
+ */
19051
+ oItem: sap.ui.unified.IMenuItem,
19052
+ /**
19053
+ * Index at which the item should be inserted
19054
+ */
19055
+ iIndex: int,
19056
+ /**
19057
+ * Whether to suppress the invalidation of the control
19058
+ */
19059
+ bSuppressInvalidate: boolean
19060
+ ): this;
19061
+ /**
19062
+ * Removes all items from `items` aggregation.
19063
+ *
19064
+ *
19065
+ * @returns array containing the removed items, or null if there are no items to remove
19066
+ */
19067
+ removeAllItems(
19068
+ /**
19069
+ * Whether to suppress the invalidation of the control
19070
+ */
19071
+ bSuppressInvalidate: boolean
19072
+ ): any[] | null;
19073
+ /**
19074
+ * Removes an item from `items` aggregation.
19075
+ *
19076
+ *
19077
+ * @returns the removed object, or `null` if there are no items to remove
19078
+ */
19079
+ removeItem(
19080
+ /**
19081
+ * Menu item to be removed (as index, ID or object)
19082
+ */
19083
+ vItem: int | string | sap.ui.unified.IMenuItem,
19084
+ /**
19085
+ * Whether to suppress the invalidation of the control
19086
+ */
19087
+ bSuppressInvalidate: boolean
19088
+ ): sap.ui.unified.IMenuItem | null;
19089
+ /**
19090
+ * Override of the default setter that also ensures single selection if necessary.
19091
+ *
19092
+ *
19093
+ * @returns `this` to allow method chaining
19094
+ */
19095
+ setItemSelectionMode(
19096
+ /**
19097
+ * item selection mode to be set
19098
+ */
19099
+ sSelectionMode: string,
19100
+ /**
19101
+ * Whether to suppress the invalidation of the control
19102
+ */
19103
+ bSuppressInvalidate: boolean
19104
+ ): this;
19105
+ }
18828
19106
  /**
18829
19107
  * Special menu item which contains a label and a text field. This menu item is e.g. helpful for filter
18830
19108
  * implementations. The aggregation `submenu` (inherited from parent class) is not supported for this type
@@ -18832,7 +19110,11 @@ declare namespace sap {
18832
19110
  *
18833
19111
  * @since 1.21.0
18834
19112
  */
18835
- class MenuTextFieldItem extends sap.ui.unified.MenuItemBase {
19113
+ class MenuTextFieldItem
19114
+ extends sap.ui.unified.MenuItemBase
19115
+ implements sap.ui.unified.IMenuItem
19116
+ {
19117
+ __implements__sap_ui_unified_IMenuItem: boolean;
18836
19118
  /**
18837
19119
  * Constructor for a new MenuTextFieldItem element.
18838
19120
  *
@@ -21952,6 +22234,8 @@ declare namespace sap {
21952
22234
 
21953
22235
  "sap/ui/unified/MenuItemBase": undefined;
21954
22236
 
22237
+ "sap/ui/unified/MenuItemGroup": undefined;
22238
+
21955
22239
  "sap/ui/unified/MenuTextFieldItem": undefined;
21956
22240
 
21957
22241
  "sap/ui/unified/Shell": undefined;
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.1
1
+ // For Library Version: 1.127.1
2
2
 
3
3
  declare namespace sap {
4
4
  namespace ui {
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.1
1
+ // For Library Version: 1.127.1
2
2
 
3
3
  declare namespace sap {
4
4
  namespace ui {
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.1
1
+ // For Library Version: 1.127.1
2
2
 
3
3
  declare namespace sap {
4
4
  namespace ui {
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.1
1
+ // For Library Version: 1.127.1
2
2
 
3
3
  declare namespace sap {
4
4
  namespace ui {
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.126.1
1
+ // For Library Version: 1.127.1
2
2
 
3
3
  declare namespace sap {
4
4
  /**