"use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * Licensed Materials - Property of IBM * IBM Cognos Products: Dashboard * (C) Copyright IBM Corp. 2018, 2020 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /** * @interface SlotAPI * @classdesc API class that is used to control a slot. * @example slots.getSlot() * @example slots.getSlotList()[] * @example slots.getMappingInfoList()[].slot */ define([], function () { var SlotAPI = function () { function SlotAPI() { _classCallCheck(this, SlotAPI); } /** * @function SlotAPI#getId * @description Returns the slot ID. * @public * * @returns {String} Slot ID * */ SlotAPI.prototype.getId = function getId() {}; /** * @function SlotAPI#getDataViewId * @description Returns the data view ID that this slot is associated with. * @private * * @returns {String} View ID * */ // getDataViewId() {} /** * @function SlotAPI#addDataItemsMapping * @description Adds new metadata columns to the slot. * @public * * @param {String[]} dataItemIds Ordered array of dataItem IDs to add to the slot * @param {Number} position Position to place the new metadata columns. By default (position = -1); metadata columns are appended at the end. * @param {Object} [transactionToken] * */ SlotAPI.prototype.addDataItemsMapping = function addDataItemsMapping() {}; /** * @function SlotAPI#removeDataItemsMapping * @description Removes the existing data items. * @public * * @param {String[]} dataItemIds Ordered array of dataItem IDs to remove from the slot * @param {Object} [transactionToken] * */ SlotAPI.prototype.removeDataItemsMapping = function removeDataItemsMapping() {}; /** * @function SlotAPI#addDataItems * @description Adds new metadata columns to the slot. This creates the dataItem and maps it to the slot. * @public * * @param {String[]} dataItemIds Ordered array of dataItem IDs to add to the slot * @param {Number} position Position to place the new metadata columns. By default (position = -1); metadata columns are appended at the end. * @param {Object} [transactionToken] * */ SlotAPI.prototype.addDataItems = function addDataItems() {}; /** * @function SlotAPI#removeDataItems * @description Removes the existing data items. This deletes the dataItem and removes the mapping. * @public * * @param {String[]} dataItemIds Ordered array of dataItem IDs to remove from the slot. * @param {Object} [transactionToken] * */ SlotAPI.prototype.removeDataItems = function removeDataItems() {}; /** * @function SlotAPI#getDataItemList * @description Returns a list of data items that are assigned to the slot. * @public * @param {boolean} ignoreDefaultDataItemMapping Defaults to false to ignore default mappings of the visualization. * @returns {DataItemAPI[]} Array of data items */ SlotAPI.prototype.getDataItemList = function getDataItemList() {}; /** * @function SlotAPI#getDataItem * @description Returns the dataItem with the given ID. * @public * * @param {String} dataItemId Unique dataItem ID * * @returns {dataItemAPI} Associated data item (or null) */ SlotAPI.prototype.getDataItem = function getDataItem() /* dataItemId */{}; /** * @function SlotAPI#supportsColumns * @description This method will check to make sure that the columns being dropped into the slots have the correct taxonomy class and family as per these rules: * 1) If the slot has no taxonomy defined, then it accepts all data columns * 2) If the slot is a lot/long, then it can accept columns that are also lat/long or if they do not have a taxonomy defined, then the slot will also accept numbers * 3) If the slot has a taxonomy defined which is not lat/long then it accepts everything except for lat/long columns * @private * @param {MetadataColumnAPI[]} metadataColumns Array of metadata columns * * @returns {Boolean} Returns true if the items are supported; otherwise false. */ SlotAPI.prototype.supportsColumns = function supportsColumns() /* metadataColumns */{}; /** * @function SlotAPI#getDefinition * @description Returns the slot definition. * @public * * @returns {SlotDefinitionAPI} */ SlotAPI.prototype.getDefinition = function getDefinition() {}; /** * @function SlotAPI#isStacked * @description Returns true if the slot is mapped to more than one item and the items are stacked. * @private * * @returns {Boolean} isStacked */ SlotAPI.prototype.isStacked = function isStacked() {}; /** * @function SlotAPI#hasUnavailableMetadataColumns * @description Returns true if the slot is mapped to at least one unavailable column. * @public * * @returns {Boolean} hasUnavailableMetadataColumns */ SlotAPI.prototype.hasUnavailableMetadataColumns = function hasUnavailableMetadataColumns() {}; return SlotAPI; }(); return SlotAPI; }); //# sourceMappingURL=SlotAPI.js.map