123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- "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.
- */
- /**
- * @class VisDnDUtilsAPI
- * @hideconstructor
- *
- * @classdesc Utility API for drag and drop of metadata onto a visualization content
- */
- define([], function () {
- var VisDnDUtilsAPI = function () {
- function VisDnDUtilsAPI() {
- _classCallCheck(this, VisDnDUtilsAPI);
- }
- /**
- * @public
- * @function VisDnDUtilsAPI#mapColumns
- * @description Map the given metadata drag and drop payload to a specific slot
- * @param {String} slotId Identifier of the slot to map to
- * @param {Object} payload the metadata drag and drop payload
- * @param {Object} options the options to process the accept
- * @param {TransactionToken} transactionToken the transaction token
- * @returns {Boolean}
- */
- VisDnDUtilsAPI.prototype.mapColumns = function mapColumns() {};
- /**
- * @public
- * @function VisDnDUtilsAPI#acceptsOlapV2
- * @description process the on drop action of drag and drop by applying special rules for OLAP (eg: can't drop levels of a hierarchy in the wrong order)
- * @param {Array} targetMetadataColumns - metadata columns in target slot
- * @param {Array} sourceMetadataColumns - metadata columns to be added into target slot
- * @param {Number} indexInTargetSlot - index in target slot to add
- * @param {Number} indexInSourceSlot - slot item index in source slot, it is undefined if dnd from metadata tree
- * @param {Boolean} isReplace - if it is to replace the column in the position
- * @param {Boolean} IsSameSlot - if it is drag and drop in the same slot
- * @return {Boolean} return True if the two lists of columns can be in the same slot
- */
- VisDnDUtilsAPI.prototype.acceptsOlapV2 = function acceptsOlapV2() {};
- /**
- * @public
- * @function VisDnDUtilsAPI#addMembersAsLocalFilters
- * @description Add members as local filters to visualization or Slot
- * @param {object} [options]
- * @param {object[]} [options.columns] - metadata columns may be added into target slot or visualization as local filters
- * @param {object} [options.slotAPI] - target slot if members to be added into target slot as local filter
- * @param {Boolean} [options.doUpdateFilters] - if true, local filter get updated.
- * @param {Boolean} [options.bReplace] - if true, replace the slot local filters by local filter created based on members.
- * @param {TransactionToken} transactionToken the transaction token
- */
- VisDnDUtilsAPI.prototype.addMembersAsLocalFilters = function addMembersAsLocalFilters() {};
- /**
- * @public
- * @function VisDnDUtilsAPI#accepts
- * @param {Object} payload the drag and drop payload
- * @param {Object} options the options to process the accept
- * @description called by the DnD manager to check whether to accept the dragged object or not
- * @returns {Boolean}
- */
- VisDnDUtilsAPI.prototype.accepts = function accepts() {};
- /**
- * @public
- * @function VisDnDUtilsAPI#onDrop
- * @param {Object} payload the drag and drop payload
- * @description process the on drop action of drag and drop
- */
- VisDnDUtilsAPI.prototype.onDrop = function onDrop() {};
- return VisDnDUtilsAPI;
- }();
- return VisDnDUtilsAPI;
- });
- //# sourceMappingURL=VisDnDUtilsAPI.js.map
|