/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var pluginRegistry_1 = require("../pluginApi/pluginRegistry");
var widgetPluginFactory_1 = require("./widgetPluginFactory");
/**
* Describes how we expect the plugin module to be
*/
var WidgetPluginRegistry = (function (_super) {
__extends(WidgetPluginRegistry, _super);
function WidgetPluginRegistry(store) {
_super.call(this, store);
}
WidgetPluginRegistry.prototype.createPluginFromModule = function (module) {
console.assert(_.isObject(module.TYPE_INFO), "Missing TYPE_INFO on datasource module. Every module must export TYPE_INFO");
return new widgetPluginFactory_1.default(module.TYPE_INFO.type, this.store);
};
return WidgetPluginRegistry;
}(pluginRegistry_1.default));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = WidgetPluginRegistry;
|