UNPKG

@shopgate/pwa-common

Version:

Common library for the Shopgate Connect PWA.

15 lines 1.63 kB
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}/** * The portals collection. */var PortalCollection=/*#__PURE__*/function(){function PortalCollection(){_classCallCheck(this,PortalCollection);}return _createClass(PortalCollection,[{key:"getPortals",value:/** * Returns the portal definitions. * @return {Object} */function getPortals(){return this.portals;}/** * Registers the portal definitions. * @param {Object} [portals={}] The portals to register. */},{key:"registerPortals",value:function registerPortals(){var portals=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.portals=portals;}/** * Registers the portal config. * @param {Object} [config={}] The portals config. */},{key:"registerConfig",value:function registerConfig(){var config=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.config=config;}/** * Returns the portal config. * @return {Object} */},{key:"getConfig",value:function getConfig(){return this.config;}}]);}();export default new PortalCollection();