@shopgate/pwa-common
Version:
Common library for the Shopgate Connect PWA.
40 lines (37 loc) • 926 B
JavaScript
/**
* The portals collection.
*/
let PortalCollection = /*#__PURE__*/function () {
function PortalCollection() {}
var _proto = PortalCollection.prototype;
/**
* Returns the portal definitions.
* @return {Object}
*/
_proto.getPortals = function getPortals() {
return this.portals;
}
/**
* Registers the portal definitions.
* @param {Object} [portals={}] The portals to register.
*/;
_proto.registerPortals = function registerPortals(portals = {}) {
this.portals = portals;
}
/**
* Registers the portal config.
* @param {Object} [config={}] The portals config.
*/;
_proto.registerConfig = function registerConfig(config = {}) {
this.config = config;
}
/**
* Returns the portal config.
* @return {Object}
*/;
_proto.getConfig = function getConfig() {
return this.config;
};
return PortalCollection;
}();
export default new PortalCollection();