"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 Business Analytics (C) Copyright IBM Corp. 2018, 2020 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /** @typedef {Object} SlotDefinition * @property {String} dataset * @property {Boolean} group * @property {Boolean} hidden * @property {String} id * @property {Boolean} optional * @property {Boolean} repeats * @property {String} sort * @property {Number} sortOrder * @property {Boolean} sortable * @property {Boolean} stackItems * @property {String} type */ /** @typedef {Object} Dataset * @property {String} id * @property {String} caption * @property {Boolean} optional * @property {Boolean} suppressMissing * @property {Boolean} needsSorted * @property {Boolean} requiresValues */ /** @typedef {Object} PreferredSize * @property {Number} height * @property {Number} width */ /** @typedef {Object} ThemeMappingEntry * @property {String} id * @property {Array} mapping */ /** @typedef {Object} ThumbnailConfig * @property {String[]} unsupportedBrowsers */ /** * Property Prefixes Object is dependent on the visualization but it contains visualization slots/definition with their * mapped values * * @typedef {Object} propertyPrefixes * @property {String} [categories] * @property {String} [color] * @property {String} [column] * @property {String|Array} [dataPoint] * @property {String} [legend] * @property {String} [row] * @property {String} [values] * @property {String} [x] * @property {String} [y] * @property {String} [grid_cols] * @property {String} [size] * @property {String} [width] * @property {String} [series] */ /** * @class VisDefinitionAPI * * @classdesc * * The visualization definition describes what the definitions supports and how it behaves. * Each visualization has its definition where it defines the slots, properties, and other behavior. * * @property {String} caption * @property {String} control * @property {Number} dataRowLimit * @property {Number} dataRowLimitIE * @property {SlotDefinition[]} dataSlots * @property {Dataset[]} datasets * @property {String} icon * @property {String} id * @property {Boolean} isRecommendable * @property {String} label * @property {String} placeholderIcon * @property {PreferredSize} preferredSize * @property {Property[]} properties * @property {Object} propertyPrefixes * @property {String} renderer * @property {String} scope * @property {Object} specification * @property {Boolean} supportsAdvancedProperties * @property {ThemeMappingEntry[]} themeMapping * @property {ThumbnailConfig} thumbnailConfig * @property {String[]} usages * @property {Object} groupedProperty * * */ define([], function () { var VisDefinitionAPI = function () { function VisDefinitionAPI() { _classCallCheck(this, VisDefinitionAPI); } /** * Return the visualization type * @function VisDefinitionAPI#getType * @returns {String} type */ VisDefinitionAPI.prototype.getType = function getType() {}; /** * Return the bundle ID * @function VisDefinitionAPI#getBundleId * @returns {String} bundleId */ VisDefinitionAPI.prototype.getId = function getId() {}; /** * Return the list of datasets * @function VisDefinitionAPI#getDatasetList * @returns {Dataset[]} array of datasets */ VisDefinitionAPI.prototype.getDatasetList = function getDatasetList() {}; /** * Return the label of visualization * @function VisDefinitionAPI#getLabel * @returns {String} label */ VisDefinitionAPI.prototype.getLabel = function getLabel() {}; /** * Returns an array of property used to render visualization property in UI * @function VisDefinitionAPI#getPreferredSize * @returns {PropertyLayoutSpec[]} properties */ //getProperties() {} /** * Returns the preferred size of the visualization * * @returns {PreferredSize} PreferredSize */ VisDefinitionAPI.prototype.getPreferredSize = function getPreferredSize() {}; /** * Return the slot definition API * @param {String} slotId * @function VisDefinitionAPI#getSlot * @return {SlotDefinitionAPI} slot definition APIs */ VisDefinitionAPI.prototype.getSlot = function getSlot() {}; /** * Return the list slot definition APIs * @function VisDefinitionAPI#getSlotList * @return {SlotDefinitionAPI[]} array of slot definition APIs */ VisDefinitionAPI.prototype.getSlotList = function getSlotList() {}; /** * Return the icon of the visualization * @function VisDefinitionAPI#getIcon * @return {String} icon */ VisDefinitionAPI.prototype.getIcon = function getIcon() {}; /** * Return the uri of the icon of the visualization which is coming outside of the scope of dashboard * @function VisDefinitionAPI#getIconUri * @return {String} iconUri */ VisDefinitionAPI.prototype.getIconUri = function getIconUri() {}; /** * Returns the URI of the icon placeholder of the visualization * @function VisDefinitionAPI#getPlaceholderIconUri * @return {String} getPlaceholderIconUri */ VisDefinitionAPI.prototype.getPlaceholderIconUri = function getPlaceholderIconUri() {}; /** * @function VisDefinitionAPI#getMultiEdgeSort * @description Returns multiEdgeSort in visualization spec * @return {String} multiEdgeSort in visualization spec */ VisDefinitionAPI.prototype.getMultiEdgeSort = function getMultiEdgeSort() {}; /** * @function VisDefinitionAPI#getDefaultDatasetId * @description Return defaultDatasetId from the visualization spec. This allows a default dataset from a multi-dataset widget to be set for the visualization data pane. * @return {String} defaultDatasetId. Returns undefined for any empty/unset value. */ VisDefinitionAPI.prototype.getDefaultDatasetId = function getDefaultDatasetId() {}; /** * @function VisDefinitionAPI#refresh * @description Refresh the current visualization definition * @return {Promise} resolved when the definition has been refreshed */ VisDefinitionAPI.prototype.refresh = function refresh() {}; /** * @function VisDefinitionAPI#getState * @description Get the state of the vis definition. * @returns {VisDefinitionStateAPI} The vis definition state api {@link VisDefinitionStateAPI} */ VisDefinitionAPI.prototype.getState = function getState() {}; /** * @function VisDefinitionAPI#getProperty * @description Get a property value from the definition * @param {String} id * @returns {Object} Property value */ VisDefinitionAPI.prototype.getProperty = function getProperty() {}; return VisDefinitionAPI; }(); return VisDefinitionAPI; }); //# sourceMappingURL=VisDefinitionAPI.js.map