123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Collaboration
- * (C) Copyright IBM Corp. 2018, 2019
- *
- * US Government Users Restricted Rights - Use, duplication or disclosure
- * restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define([], function () {
- 'use strict';
- /**
- * This class provides a means to declare a share and embed controller.
- * It plays the role of an interface, consumer can implement it.
- * e.g.
- * @example
- * {
- * "id": "com.ibm.bi.dashboard.shareAndEmbed",
- * "collectionItems": [{
- * "containerId": "com.ibm.bi.glass.common.sharedResources",
- * "id": "dashboard",
- * "label": "Share & Embed",
- * "types": ["exploration"],
- * "perspectives": ["dashboard"],
- * "actionController": "dashboard/glass/controllers/ShareActionHandler"
- * }]
- * }
- * @public
- * @interface ShareInterface
- */
- var ShareInterface = function ShareInterface() {
- /**
- * Called when the custom button/menu item is Clicked/Tapped
- *
- * @memberof ShareInterface
- * @public
- * @param {Object} context
- * @returns {Object} urlMap object containing an object like:
- * @example
- * {
- * "perspective": "dashboard",
- * "objRef": "i047E166063164D5DA85C8872A4574513",
- * "action":"view",
- * "mode":"dashboard"
- * }
- */
- this.execute = function (context) {
- void context;
- };
- /**
- * Called to decide if the Sharing entry should be shown or not.
- *
- * @memberof ShareInterface
- * @public
- * @param {Object} context
- * @returns {Boolean} true/false
- */
- this.isVisible = function (context) {
- void context;
- };
- /**
- * Returns an array of DOM elements to be capture for a screenshot.
- *
- * @memberof ShareInterface
- * @public
- * @param {object} context
- * @return {Promise} An array of objects like: <code>[{"el":domNode,"label":"text"}]</code>
- */
- this.getShareableItems = function (context) {
- void context;
- };
- /**
- * Returns information about the current asset.
- *
- * @memberof ShareInterface
- * @public
- * @param {object} context
- * @return {Promise} An object like: <code>[{"type":"dashboard","title":"Dashboard Name","subTitle":"Dashboard Tab 1","owner":"Sam Carter","saved":true}]</code>
- */
- this.getShareableInfo = function (context) {
- void context;
- };
- /**
- * Tells the controller that the Share panel is about to be shown.
- *
- * @memberof ShareInterface
- * @public
- * @param {object} options
- * @param {object} options.glassContext
- * @param {object} options.slideout
- * @return {Promise}
- */
- this.enterShareState = function (options) {
- void options;
- };
- /**
- * Tells the controller that the Share panel is about to be closed.
- *
- * @memberof ShareInterface
- * @public
- * @param {object} options
- * @param {object} options.glassContext
- * @param {object} options.slideout
- * @return {Promise}
- */
- this.leaveShareState = function (options) {
- void options;
- };
- /**
- * Asks the controller if it supports exporting to PDF. If this method
- * is not implemented, the default response will be `false`.
- *
- * @memberof ShareInterface
- * @public
- * @param {object} options
- * @param {object} options.glassContext
- * @return {Boolean}
- */
- this.canExportToPDF = function (options) {
- void options;
- };
- /**
- * Tells the controller to generate a PDF file. This will only be called
- * if the canExportToPDF function returns true.
- *
- * @memberof ShareInterface
- * @public
- * @param {object} options
- * @param {object} options.glassContext
- * @param {object} pageSize an object representing the size of the page
- * @param {object} printFilters print filters
- * @return {Promise}
- */
- this.exportToPDF = function (options, pageSize, printFilters) {
- void (options, pageSize, printFilters);
- };
- /**
- * Asks the action controller for its instrumentation data. The `action` will
- * be set as `shared` by collaboration when invoking the instrumentation's
- * track() method.
- *
- * @memberof ShareInterface
- * @public
- * @param {object} options
- * @param {object} options.glassContext
- * @return {object} instrumentation object data
- * @example
- * {
- * "objectId": "some_id",
- * "objectType": "type",
- * "details": {
- * ...
- * }
- * }
- */
- this.getInstrumentation = function (options) {
- void options;
- };
- };
- return ShareInterface;
- });
- ;
- var _temp = function () {
- if (typeof __REACT_HOT_LOADER__ === 'undefined') {
- return;
- }
- }();
- ;
|