@openui5/types 1.130.0 → 1.131.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/types",
3
- "version": "1.130.0",
3
+ "version": "1.131.0",
4
4
  "description": "OpenUI5 TypeScript Definitions",
5
5
  "homepage": "https://sap.github.io/ui5-typescript",
6
6
  "author": "SAP SE (https://www.sap.com)",
package/types/sap.f.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // For Library Version: 1.130.0
1
+ // For Library Version: 1.131.0
2
2
 
3
3
  declare module "sap/tnt/library" {
4
4
  export interface IToolHeader {
@@ -43,7 +43,6 @@ declare module "sap/f/library" {
43
43
  * This enum is part of the 'sap/f/library' module export and must be accessed by the property 'AvatarGroupType'.
44
44
  *
45
45
  * @since 1.73
46
- * @experimental (since 1.73)
47
46
  */
48
47
  export enum AvatarGroupType {
49
48
  /**
@@ -192,8 +191,6 @@ declare module "sap/f/library" {
192
191
  * Interface for controls suitable for the `additionalContent` aggregation of `{@link sap.f.ShellBar}`.
193
192
  *
194
193
  * @since 1.63
195
- * @experimental (since 1.63) - that provides only limited functionality. Also, it can be removed in future
196
- * versions.
197
194
  */
198
195
  export interface IShellBar {
199
196
  __implements__sap_f_IShellBar: boolean;
@@ -412,6 +409,24 @@ declare module "sap/f/library" {
412
409
  */
413
410
  End = "End",
414
411
  }
412
+ /**
413
+ * Different options for the semantic role in controls that implement the {@link sap.f.ICard} interface.
414
+ *
415
+ * This enum is part of the 'sap/f/library' module export and must be accessed by the property 'cards.SemanticRole'.
416
+ *
417
+ * @since 1.131
418
+ * @experimental
419
+ */
420
+ enum SemanticRole {
421
+ /**
422
+ * The card has interactive elements.
423
+ */
424
+ ListItem = "ListItem",
425
+ /**
426
+ * The card has no interactive elements.
427
+ */
428
+ Region = "Region",
429
+ }
415
430
  }
416
431
 
417
432
  export namespace dnd {
@@ -1446,10 +1461,12 @@ declare module "sap/f/Card" {
1446
1461
  declare module "sap/f/CardBase" {
1447
1462
  import { default as Control, $ControlSettings } from "sap/ui/core/Control";
1448
1463
 
1449
- import { ICard } from "sap/f/library";
1464
+ import { ICard, cards } from "sap/f/library";
1450
1465
 
1451
1466
  import { IBadge } from "sap/m/library";
1452
1467
 
1468
+ import Event from "sap/ui/base/Event";
1469
+
1453
1470
  import { CSSSize } from "sap/ui/core/library";
1454
1471
 
1455
1472
  import ElementMetadata from "sap/ui/core/ElementMetadata";
@@ -1524,6 +1541,88 @@ declare module "sap/f/CardBase" {
1524
1541
  * @returns Metadata object describing this class
1525
1542
  */
1526
1543
  static getMetadata(): ElementMetadata;
1544
+ /**
1545
+ * Attaches event handler `fnFunction` to the {@link #event:press press} event of this `sap.f.CardBase`.
1546
+ *
1547
+ * When called, the context of the event handler (its `this`) will be bound to `oListener` if specified,
1548
+ * otherwise it will be bound to this `sap.f.CardBase` itself.
1549
+ *
1550
+ * Fired when action is added on card level. Note: Can be used only if `semanticRole` is `sap.f.cards.SemanticRole.ListItem`.
1551
+ *
1552
+ * @experimental (since 1.131)
1553
+ *
1554
+ * @returns Reference to `this` in order to allow method chaining
1555
+ */
1556
+ attachPress(
1557
+ /**
1558
+ * An application-specific payload object that will be passed to the event handler along with the event
1559
+ * object when firing the event
1560
+ */
1561
+ oData: object,
1562
+ /**
1563
+ * The function to be called when the event occurs
1564
+ */
1565
+ fnFunction: (p1: Event) => void,
1566
+ /**
1567
+ * Context object to call the event handler with. Defaults to this `sap.f.CardBase` itself
1568
+ */
1569
+ oListener?: object
1570
+ ): this;
1571
+ /**
1572
+ * Attaches event handler `fnFunction` to the {@link #event:press press} event of this `sap.f.CardBase`.
1573
+ *
1574
+ * When called, the context of the event handler (its `this`) will be bound to `oListener` if specified,
1575
+ * otherwise it will be bound to this `sap.f.CardBase` itself.
1576
+ *
1577
+ * Fired when action is added on card level. Note: Can be used only if `semanticRole` is `sap.f.cards.SemanticRole.ListItem`.
1578
+ *
1579
+ * @experimental (since 1.131)
1580
+ *
1581
+ * @returns Reference to `this` in order to allow method chaining
1582
+ */
1583
+ attachPress(
1584
+ /**
1585
+ * The function to be called when the event occurs
1586
+ */
1587
+ fnFunction: (p1: Event) => void,
1588
+ /**
1589
+ * Context object to call the event handler with. Defaults to this `sap.f.CardBase` itself
1590
+ */
1591
+ oListener?: object
1592
+ ): this;
1593
+ /**
1594
+ * Detaches event handler `fnFunction` from the {@link #event:press press} event of this `sap.f.CardBase`.
1595
+ *
1596
+ * The passed function and listener object must match the ones used for event registration.
1597
+ *
1598
+ * @experimental (since 1.131)
1599
+ *
1600
+ * @returns Reference to `this` in order to allow method chaining
1601
+ */
1602
+ detachPress(
1603
+ /**
1604
+ * The function to be called, when the event occurs
1605
+ */
1606
+ fnFunction: (p1: Event) => void,
1607
+ /**
1608
+ * Context object on which the given function had to be called
1609
+ */
1610
+ oListener?: object
1611
+ ): this;
1612
+ /**
1613
+ * Fires event {@link #event:press press} to attached listeners.
1614
+ *
1615
+ * @experimental (since 1.131)
1616
+ * @ui5-protected Do not call from applications (only from related classes in the framework)
1617
+ *
1618
+ * @returns Reference to `this` in order to allow method chaining
1619
+ */
1620
+ firePress(
1621
+ /**
1622
+ * Parameters to pass along with the event
1623
+ */
1624
+ mParameters?: object
1625
+ ): this;
1527
1626
  /**
1528
1627
  * Returns the DOM Element that should get the focus.
1529
1628
  *
@@ -1543,6 +1642,18 @@ declare module "sap/f/CardBase" {
1543
1642
  * @returns Value of property `height`
1544
1643
  */
1545
1644
  getHeight(): CSSSize;
1645
+ /**
1646
+ * Gets current value of property {@link #getSemanticRole semanticRole}.
1647
+ *
1648
+ * Defines the role of the Card Header.
1649
+ *
1650
+ * Default value is `Region`.
1651
+ *
1652
+ * @experimental (since 1.131)
1653
+ *
1654
+ * @returns Value of property `semanticRole`
1655
+ */
1656
+ getSemanticRole(): cards.SemanticRole | keyof typeof cards.SemanticRole;
1546
1657
  /**
1547
1658
  * Gets current value of property {@link #getWidth width}.
1548
1659
  *
@@ -1572,6 +1683,25 @@ declare module "sap/f/CardBase" {
1572
1683
  */
1573
1684
  sHeight?: CSSSize
1574
1685
  ): this;
1686
+ /**
1687
+ * Sets a new value for property {@link #getSemanticRole semanticRole}.
1688
+ *
1689
+ * Defines the role of the Card Header.
1690
+ *
1691
+ * When called with a value of `null` or `undefined`, the default value of the property will be restored.
1692
+ *
1693
+ * Default value is `Region`.
1694
+ *
1695
+ * @experimental (since 1.131)
1696
+ *
1697
+ * @returns Reference to `this` in order to allow method chaining
1698
+ */
1699
+ setSemanticRole(
1700
+ /**
1701
+ * New value for property `semanticRole`
1702
+ */
1703
+ sSemanticRole?: cards.SemanticRole | keyof typeof cards.SemanticRole
1704
+ ): this;
1575
1705
  /**
1576
1706
  * Sets a new value for property {@link #getWidth width}.
1577
1707
  *
@@ -1604,7 +1734,41 @@ declare module "sap/f/CardBase" {
1604
1734
  * Defines the height of the card.
1605
1735
  */
1606
1736
  height?: CSSSize | PropertyBindingInfo | `{${string}}`;
1737
+
1738
+ /**
1739
+ * Defines the role of the Card Header.
1740
+ *
1741
+ * @experimental (since 1.131)
1742
+ */
1743
+ semanticRole?:
1744
+ | (cards.SemanticRole | keyof typeof cards.SemanticRole)
1745
+ | PropertyBindingInfo
1746
+ | `{${string}}`;
1747
+
1748
+ /**
1749
+ * Fired when action is added on card level. Note: Can be used only if `semanticRole` is `sap.f.cards.SemanticRole.ListItem`.
1750
+ *
1751
+ * @experimental (since 1.131)
1752
+ */
1753
+ press?: (oEvent: Event) => void;
1607
1754
  }
1755
+
1756
+ /**
1757
+ * Parameters of the CardBase#press event.
1758
+ *
1759
+ * @experimental (since 1.131)
1760
+ */
1761
+ export interface CardBase$PressEventParameters {}
1762
+
1763
+ /**
1764
+ * Event object of the CardBase#press event.
1765
+ *
1766
+ * @experimental (since 1.131)
1767
+ */
1768
+ export type CardBase$PressEvent = Event<
1769
+ CardBase$PressEventParameters,
1770
+ CardBase
1771
+ >;
1608
1772
  }
1609
1773
 
1610
1774
  declare module "sap/f/cards/BaseHeader" {
@@ -2038,12 +2202,19 @@ declare module "sap/f/cards/BaseHeader" {
2038
2202
  }
2039
2203
 
2040
2204
  declare module "sap/f/cards/CardBadgeCustomData" {
2205
+ import {
2206
+ default as CustomData,
2207
+ $CustomDataSettings,
2208
+ } from "sap/ui/core/CustomData";
2209
+
2041
2210
  import { URI } from "sap/ui/core/library";
2042
2211
 
2043
- import Metadata from "sap/ui/base/Metadata";
2212
+ import ElementMetadata from "sap/ui/core/ElementMetadata";
2044
2213
 
2045
2214
  import { CardBadgeVisibilityMode } from "sap/f/library";
2046
2215
 
2216
+ import { PropertyBindingInfo } from "sap/ui/base/ManagedObject";
2217
+
2047
2218
  /**
2048
2219
  * Contains a single key/value pair of custom data attached to an `Element`.
2049
2220
  *
@@ -2051,9 +2222,20 @@ declare module "sap/f/cards/CardBadgeCustomData" {
2051
2222
  *
2052
2223
  * @since 1.128
2053
2224
  */
2054
- export default class CardBadgeCustomData
2055
- extends /* was: sap..ui.core.CustomData */ Object
2056
- {
2225
+ export default class CardBadgeCustomData extends CustomData {
2226
+ /**
2227
+ * Constructor for a new `CardBadgeCustomData` element.
2228
+ *
2229
+ * Accepts an object literal `mSettings` that defines initial property values, aggregated and associated
2230
+ * objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description
2231
+ * of the syntax of the settings object.
2232
+ */
2233
+ constructor(
2234
+ /**
2235
+ * Initial settings for the new element
2236
+ */
2237
+ mSettings?: $CardBadgeCustomDataSettings
2238
+ );
2057
2239
  /**
2058
2240
  * Constructor for a new `CardBadgeCustomData` element.
2059
2241
  *
@@ -2069,14 +2251,14 @@ declare module "sap/f/cards/CardBadgeCustomData" {
2069
2251
  /**
2070
2252
  * Initial settings for the new element
2071
2253
  */
2072
- mSettings?: object
2254
+ mSettings?: $CardBadgeCustomDataSettings
2073
2255
  );
2074
2256
 
2075
2257
  /**
2076
2258
  * Creates a new subclass of class sap.f.cards.CardBadgeCustomData with name `sClassName` and enriches it
2077
2259
  * with the information contained in `oClassInfo`.
2078
2260
  *
2079
- * `oClassInfo` might contain the same kind of information as described in {@link sap..ui.core.CustomData.extend}.
2261
+ * `oClassInfo` might contain the same kind of information as described in {@link sap.ui.core.CustomData.extend}.
2080
2262
  *
2081
2263
  *
2082
2264
  * @returns Created class / constructor function
@@ -2102,7 +2284,7 @@ declare module "sap/f/cards/CardBadgeCustomData" {
2102
2284
  *
2103
2285
  * @returns Metadata object describing this class
2104
2286
  */
2105
- static getMetadata(): Metadata;
2287
+ static getMetadata(): ElementMetadata;
2106
2288
  /**
2107
2289
  * Gets current value of property {@link #getAnnouncementText announcementText}.
2108
2290
  *
@@ -2263,6 +2445,50 @@ declare module "sap/f/cards/CardBadgeCustomData" {
2263
2445
  bVisible?: boolean
2264
2446
  ): this;
2265
2447
  }
2448
+ /**
2449
+ * Describes the settings that can be provided to the CardBadgeCustomData constructor.
2450
+ */
2451
+ export interface $CardBadgeCustomDataSettings extends $CustomDataSettings {
2452
+ /**
2453
+ * Icon URI. This may be either an icon font or image path.
2454
+ *
2455
+ * @since 1.128
2456
+ */
2457
+ icon?: URI | PropertyBindingInfo | `{${string}}`;
2458
+
2459
+ /**
2460
+ * Describes the corresponding visibility mode, see also {@link sap.f.CardBadgeVisibilityMode}.
2461
+ *
2462
+ * @since 1.128
2463
+ */
2464
+ visibilityMode?:
2465
+ | (CardBadgeVisibilityMode | keyof typeof CardBadgeVisibilityMode)
2466
+ | PropertyBindingInfo
2467
+ | `{${string}}`;
2468
+
2469
+ /**
2470
+ * Defines the color of the badge. The allowed values are from the enum type `sap.ui.core.IndicationColor`.
2471
+ * Additionally values from `sap.ui.core.ValueState` can be used, but this is not recommended by design
2472
+ * guidelines.
2473
+ *
2474
+ * @since 1.128
2475
+ */
2476
+ state?: string | PropertyBindingInfo;
2477
+
2478
+ /**
2479
+ * Defines the cards badge visibility.
2480
+ *
2481
+ * @since 1.128
2482
+ */
2483
+ visible?: boolean | PropertyBindingInfo | `{${string}}`;
2484
+
2485
+ /**
2486
+ * Defines text which will is overriding default announcement.
2487
+ *
2488
+ * @since 1.128
2489
+ */
2490
+ announcementText?: string | PropertyBindingInfo;
2491
+ }
2266
2492
  }
2267
2493
 
2268
2494
  declare module "sap/f/cards/Header" {