// For Library Version: 1.149.0 declare namespace sap { /** * SAP UI library: sap.insights */ namespace insights { namespace CardsChannel { /** * The card object */ type Card = { /** * Unique identifier for the card. */ id: string; /** * manifest of the card. */ descriptorContent: Object; }; /** * The cardInfo object */ type CardInfo = { /** * Unique identifier for the card. */ id: string; /** * Title of the card. */ title: string; /** * Id of the parent app. */ parentAppId: string; /** * Subtitle of the card */ description: string; }; } namespace channels { /** * Interface required for classes that would like to provide cards using the `sap.insights.CardsChannel`. */ interface IContextProvider { __implements__sap_insights_channels_IContextProvider: boolean; /** * Getter of the current context as promise. * * * @returns returns a promise of the context */ getContext(): Promise; /** * Get the unique identifier of the context provider (e.g. app id) * * * @returns unique id of the context provider */ getId(): string; } class ContextChannel extends sap.ui.base.Object { /** * Provides a communication between card providers and consumers in FLP and included iframes. */ constructor(); /** * Creates a new subclass of class sap.insights.channels.ContextChannel 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.base.Object.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.insights.channels.ContextChannel. * * * @returns Metadata object describing this class */ static getMetadata(): sap.ui.base.Metadata; /** * Get the context from the active provider. * * * @returns . */ getContext(): Promise; /** * Initialize the ContextChannel either with the FLP message broker or an internal implementation for iframes. * * * @returns . */ init(): Promise; /** * Register a card provider with a unique id. The provider will be notified if new consumers get registered. * * * @returns . */ registerProvider( /** * Object implementing the TBD interface */ provider: sap.insights.channels.IContextProvider ): Promise; /** * Unregister a previously registered consumer or provider. * * * @returns . */ unregisterProvider( /** * Object implementing the TBD interface */ provider: sap.insights.channels.IContextProvider ): Promise; } } /** * Public (experimental) interface of the sap.insights.CardHelperService */ interface CardHelperService { __implements__sap_insights_CardHelperService: boolean; /** * Show preview for Add Card With Search Dialog */ showAddCardWithSearchDialog: undefined; /** * Updates Cards Ranking in case of Drag & Drop of Cards * * * @returns Returns an array of updated object */ handleDndCardsRanking( /** * card drag index */ iDragItemIndex: number, /** * card drop index */ iDropItemIndex: number, /** * array of all cards */ aCards: any[] ): any[]; /** * Show preview for a given card * * * @returns Returns promise, which generates preview for the passed card manifest */ showCardPreview( /** * card manifest for which preview will be generated */ oCard: object, /** * boolean to determine whether card can be transfrormed */ bTransform: boolean, /** * object which includes type and message text related to Message */ oCardMessageInfo: object, /** * text for confirm button on the dialog */ sConfirmButtonText: string, /** * callback event to be called when confirm button is pressed */ onConfirm: Function, /** * callback event to be called when close button is pressed */ onClose: Function ): Promise; } /** * Interface required for classes that would like to consume cards using the `sap.insights.CardsChannel`. */ interface ICardConsumer { __implements__sap_insights_ICardConsumer: boolean; /** * Callback when a card is created for this consumer. */ onCardProvided( /** * Unique id of the ICardsProvider that offers cards */ providerId: string, card: object ): void; /** * Callback when cards are available. */ onCardsAvailable( /** * Unique id of the ICardsProvider that offers cards */ providerId: string, /** * Array of simple objects with card information */ cardInfos: object[] ): void; } /** * Interface required for classes that would like to provide cards using the `sap.insights.CardsChannel`. */ interface ICardProvider { __implements__sap_insights_ICardProvider: boolean; /** * Callback when a consumer requests a specific card. */ onCardRequested( /** * Unique id of the ICardsConsumer that offers cards */ consumerId: string, /** * Unique id of a card */ cardId: string ): void; /** * Callback when a consumer is connected. */ onConsumerConnected( /** * Unique id of the ICardsConsumer that offers cards */ consumerId: string ): void; /** * Callback when a consumer is disconnected. */ onConsumerDisconnected( /** * Unique id of the ICardsConsumer that offers cards */ consumerId: string ): void; } /** * Describes the settings that can be provided to the ManageCards constructor. */ interface $ManageCardsSettings extends sap.ui.core.$ControlSettings { /** * Sets enableResetAllCards property */ enableResetAllCards?: | boolean | sap.ui.base.ManagedObject.PropertyBindingInfo | `{${string}}`; /** * Sets the cardId property which decides whether to render the details page or cardlist page, if cardId * is provided , cardDetails page is rendered */ cardId?: string | sap.ui.base.ManagedObject.PropertyBindingInfo; } /** * Provides functionality for Insight cards CRUD operations. */ interface CardHelper {} /** * This class is used to provide cards to consumers like SAP Collaboration Manager. It registers itself * with the cards channel and shares available cards with interested consumers. It also handles requests * for specific cards from consumers. It can be used to share cards with other applications or components * that are interested in them * * @since 1.140 */ class CardProvider extends sap.ui.base.Object { /** * Constructor for the card provider. */ constructor( /** * unique ID to be used for registering the provider */ sId: string, /** * An array containing available cards */ aCards: sap.insights.CardsChannel.Card[] ); /** * Creates a new subclass of class sap.insights.CardProvider 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.base.Object.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.insights.CardProvider. * * * @returns Metadata object describing this class */ static getMetadata(): sap.ui.base.Metadata; /** * This method is called when a consumer requests a specific card. It checks if the consumer is registered * and if the card exists in the shared cards. If both conditions are met it publishes the card to the consumer. * If the consumer is not registered, it does nothing. * * @since 1.140 */ onCardRequested( /** * id of the requesting consumer */ sConsumerId: string, /** * unique ID of available card */ sCardId: string ): void; /** * This method is called when a consumer connects to the cards channel. It checks if the card detail control * is loaded, and if not, it loads it. Then it shares the available cards with the consumer and navigates * to the card list page. If the card detail control is already loaded, it simply shares the available cards. * * @since 1.140 */ onConsumerConnected( /** * id of the requesting consumer */ sConsumerId: string ): void; /** * This method is called when a consumer disconnects from the cards channel. It removes the consumer from * the list of consumers and stops sharing cards with it. If the consumer is not registered, it does nothing. * * @since 1.140 */ onConsumerDisconnected( /** * id of the requesting consumer */ sConsumerId: string ): void; /** * This method is called when the view is updated. It checks if the home page is currently being rendered * and registers or unregisters the card provider accordingly. * * @since 1.140 */ onViewUpdate( /** * true if the home page is currently being rendered. */ bActive: boolean, /** * An array containing available cards */ aCards: sap.insights.CardsChannel.Card[] ): void; } class CardsChannel extends sap.ui.base.Object { /** * Provides a communication between card providers and consumers in FLP and included iframes. */ constructor(); /** * Creates a new subclass of class sap.insights.CardsChannel 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.base.Object.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.insights.CardsChannel. * * * @returns Metadata object describing this class */ static getMetadata(): sap.ui.base.Metadata; /** * Initialize the CardsChannel either with the FLP message broker or an internal implementation for iframes. * * * @returns . */ init(): Promise; /** * Check if a specific client is connected. * * @since 1.147 * * @returns true if clientId is connected */ isClientConnected( /** * The clientId ID to check */ clientId: string ): boolean; /** * Checks if the broker is enabled. * * * @returns true if the broker is enabled */ isEnabled(): boolean; /** * Send a list of all available cards to a given consumer or broadcast it to all consumers. * * * @returns . */ publishAvailableCards( /** * . */ providerId: string, /** * . */ cardInfos: sap.insights.CardsChannel.CardInfo[], /** * . */ consumerId: string ): Promise; /** * Send a card to a given consumer or broadcast it to all consumers. * * * @returns . */ publishCard( /** * . */ providerId: string, /** * . */ card: sap.insights.CardsChannel.Card, /** * . */ consumerId?: string ): Promise; /** * Register a card consumer with a unique id. The consumer will be notified through its callback when corresponding * messages are received. * * * @returns . */ registerConsumer( /** * Unique id of the consumer */ id: string, /** * Implementation of the consumer */ consumer: sap.insights.ICardConsumer ): Promise; /** * Register a card provider with a unique id. The provider will be notified if new consumers get registered. * * * @returns . */ registerProvider( /** * Unique id of the provider */ id: string, /** * Object implementing the ICardProvider interface */ provider: sap.insights.ICardProvider ): Promise; /** * Request a card from a given provider. * * * @returns . */ requestCard( /** * . */ consumerId: string, /** * . */ cardId: string, /** * . */ providerId: string ): Promise; /** * Request card creation to a given provider. * * * @returns . */ requestCardCreation( /** * . */ consumerId: string, /** * . */ card: sap.insights.CardsChannel.Card, /** * . */ providerId: string ): Promise; /** * Unregister a previously registered consumer or provider. * * * @returns . */ unregister( /** * . */ id: string ): Promise; } /** * This control shows list of all user cards and allows perform actions like change visibility, change order. * It also allows user to get preview of particular card, delete or copy. * * @since 1.119 */ class ManageCards extends sap.ui.core.Control { /** * Constructor for ManageCards. * * 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(); /** * Creates a new subclass of class sap.insights.ManageCards 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.Control.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.insights.ManageCards. * * * @returns Metadata object describing this class */ static getMetadata(): sap.ui.core.ElementMetadata; /** * Function to Clear Activities like navigation, filters */ clearPage(): void; /** * Gets current value of property {@link #getCardId cardId}. * * Sets the cardId property which decides whether to render the details page or cardlist page, if cardId * is provided , cardDetails page is rendered * * * @returns Value of property `cardId` */ getCardId(): string; /** * Gets current value of property {@link #getEnableResetAllCards enableResetAllCards}. * * Sets enableResetAllCards property * * Default value is `false`. * * * @returns Value of property `enableResetAllCards` */ getEnableResetAllCards(): boolean; /** * Function to navigate to the specified page, if no sPageId provided navigate to CardList by default */ navigateTo( /** * oEvent object */ oEvent: Object, /** * page id to which to navigate to */ sPageId: String ): void; /** * Sets a new value for property {@link #getCardId cardId}. * * Sets the cardId property which decides whether to render the details page or cardlist page, if cardId * is provided , cardDetails page is rendered * * 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 */ setCardId( /** * New value for property `cardId` */ sCardId?: string ): this; /** * Sets a new value for property {@link #getEnableResetAllCards enableResetAllCards}. * * Sets enableResetAllCards property * * When called with a value of `null` or `undefined`, the default value of the property will be restored. * * Default value is `false`. * * * @returns Reference to `this` in order to allow method chaining */ setEnableResetAllCards( /** * New value for property `enableResetAllCards` */ bEnableResetAllCards?: boolean ): this; } } interface IUI5DefineDependencyNames { "sap/insights/CardHelper": undefined; "sap/insights/CardProvider": undefined; "sap/insights/CardsChannel": undefined; "sap/insights/channels/ContextChannel": undefined; "sap/insights/library": undefined; "sap/insights/ManageCards": undefined; } }