123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- "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. 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define([], function () {
- /**
- * @interface PaletteAPI
- * @classdesc API class that defines PaletteService interface
- */
- var PaletteAPI = function () {
- function PaletteAPI() {
- _classCallCheck(this, PaletteAPI);
- }
- /**
- * Gets a palette with the given id from content service
- * @param {string} id - the ID of the palette to retrieve
- * @return {Promise} Resolved with the palette or Rejected if the palette wasn't found example below
- * Resolved value eg:
- * {
- * "defaultName": "demoName",
- * "content": {
- * "label": "demoName",
- * "fillType": "simple",
- * "fills": ["#FFD191"]
- * },
- * "id": "4e40ce98c8a548409880bc459d88ca62",
- * "my": true
- * }
- */
- PaletteAPI.prototype.getPalette = function getPalette() {};
- /**
- * Returns all the palettes found in the content store
- * @param {String} [fillType] - Specify either 'simple' or 'continuous' palettes to filter the list of palette being returned. Default will return all the palettes
- * @return {Promise} Resolved with the all the palettes found example below
- * Resolved value eg:
- * {
- * my: [{
- * "defaultName": "demoName",
- * "content": {
- * "label": "demoName",
- * "fillType": "simple",
- * "fills": ["#FFD191"]
- * },
- * "id": "demoId",
- * "my": true
- * }]
- * public: [{
- * "defaultName": "demoName2",
- * "content": {
- * "label": "demoName2",
- * "fillType": "simple2",
- * "fills": ["#FFD192"]
- * },
- * "id": "demoId2",
- * "public": true,
- * }]
- */
- PaletteAPI.prototype.getPalettes = function getPalettes() {};
- /**
- * Register an event to the palette feature
- * @param {string} eventName - supported events: 'palette:deleted' & 'palette:updated'
- * @param {*} callbackFunction - takes an object containing paletteId as param
- * eg: callbackFunction( { paletteId } )
- */
- PaletteAPI.prototype.on = function on() {};
- /**
- * Deregister an event from the palette feature
- * @param {string} eventName - supported events: 'palette:deleted' & 'palette:updated'
- * @param {*} callbackFunction - takes an object containing paletteId as param
- * eg: callbackFunction( { paletteId } )
- */
- PaletteAPI.prototype.off = function off() {};
- return PaletteAPI;
- }();
- return PaletteAPI;
- });
- //# sourceMappingURL=PaletteAPI.js.map
|