'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. 2019 *| *| US Government Users Restricted Rights - Use, duplication or disclosure *| restricted by GSA ADP Schedule Contract with IBM Corp. *+------------------------------------------------------------------------+ */ define(['../../../lib/@waca/core-client/js/core-client/utils/ClassFactory'], function (ClassFactory) { var LegacyBoardModule = function () { function LegacyBoardModule(props) { _classCallCheck(this, LegacyBoardModule); props = props || {}; this._loader = props.loader || ClassFactory; this.logger = props.logger; } LegacyBoardModule.prototype.load = function load(module) { var _this = this; var path = module.path || module; return this._loader.loadModule(path).then(function (ModuleClass) { return { template: ModuleClass.getTemplate, module: ModuleClass }; }).catch(function (error) { _this.logger.warn('[LegacyBoardModule]: attempted to load module "' + path + ' and failed"', error); throw error; }); }; return LegacyBoardModule; }(); return LegacyBoardModule; }); //# sourceMappingURL=LegacyBoardModule.js.map