'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: BI Cloud (C) Copyright IBM Corp. 2014, 2019 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define([], function () { var MediaBase = function () { function MediaBase(url, type) { _classCallCheck(this, MediaBase); this.url = url; this.type = type; } /** * Abstract: needs to be implemented by concrete subclass * @return an object with 'width' and 'height' members */ MediaBase.prototype.getDimensions = function getDimensions() { return null; }; /** * Abstract: needs to be implemented by concrete subclass * @param an object of parameters * @return the markup representing this media */ MediaBase.prototype.getMarkup = function getMarkup() { return ''; }; /** * A callback for when markup is loaded into the DOM. * @param The root element into which the markup was placed */ MediaBase.prototype.markupLoaded = function markupLoaded($el, mode) { if (mode === 'authoring') { this.showAuthoringMode(); } else { this.showConsumeMode(); } }; /** * Invoke to render the media in authoring mode */ MediaBase.prototype.showAuthoringMode = function showAuthoringMode() {}; /** * Invoke to render the media in consume mode */ MediaBase.prototype.showConsumeMode = function showConsumeMode() {}; return MediaBase; }(); return MediaBase; }); //# sourceMappingURL=MediaBase.js.map