build/rnpm.js
function makeMenuRegistry() {
    var menus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Map();

    /**
     * Subscribes menu instance.
     */
    function subscribe(instance) {
      var name = instance.getName();

      if (menus.get(name)) {
        console.warn("incorrect usage of popup menu - menu with name ".concat(name, " already exists"));
      }

      menus.set(name, {
        name: name,
        instance: instance
      });
    }
    /**
     * Unsubscribes menu instance.
     */


    function unsubscribe(instance) {
      menus.delete(instance.getName());
    }
    /**
     * Updates layout infomration.
     */


    function updateLayoutInfo(name) {
      var layouts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

      if (!menus.has(name)) {
        return;
      }

      var menu = Object.assign({}, menus.get(name));

      if (layouts.hasOwnProperty('triggerLayout')) {
        menu.triggerLayout = layouts.triggerLayout;
      }

      if (layouts.hasOwnProperty('optionsLayout')) {
        menu.optionsLayout = layouts.optionsLayout;
      }

      menus.set(name, menu);
    }

    function setOptionsCustomStyles(name, optionsCustomStyles) {
      if (!menus.has(name)) {
        return;
      }

      var menu = _objectSpread({}, menus.get(name), {
        optionsCustomStyles: optionsCustomStyles
      });

      menus.set(name, menu);
    }
    /**
     * Get `menu data` by name.
     */


    function getMenu(name) {
      return menus.get(name);
    }
    /**
     * Returns all subscribed menus as array of `menu data`
     */


    function getAll() {
      return iterator2array(menus.values());
    }

    return {
      subscribe: subscribe,
      unsubscribe: unsubscribe,
      updateLayoutInfo: updateLayoutInfo,
      getMenu: getMenu,
      getAll: getAll,
      setOptionsCustomStyles: setOptionsCustomStyles
    };
  }
function makeMenuRegistry() {
    var menus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Map();

    /**
     * Subscribes menu instance.
     */
    function subscribe(instance) {
      var name = instance.getName();

      if (menus.get(name)) {
        console.warn("incorrect usage of popup menu - menu with name ".concat(name, " already exists"));
      }

      menus.set(name, {
        name: name,
        instance: instance
      });
    }
    /**
     * Unsubscribes menu instance.
     */


    function unsubscribe(instance) {
      menus.delete(instance.getName());
    }
    /**
     * Updates layout infomration.
     */


    function updateLayoutInfo(name) {
      var layouts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

      if (!menus.has(name)) {
        return;
      }

      var menu = Object.assign({}, menus.get(name));

      if (layouts.hasOwnProperty('triggerLayout')) {
        menu.triggerLayout = layouts.triggerLayout;
      }

      if (layouts.hasOwnProperty('optionsLayout')) {
        menu.optionsLayout = layouts.optionsLayout;
      }

      menus.set(name, menu);
    }

    function setOptionsCustomStyles(name, optionsCustomStyles) {
      if (!menus.has(name)) {
        return;
      }

      var menu = _objectSpread({}, menus.get(name), {
        optionsCustomStyles: optionsCustomStyles
      });

      menus.set(name, menu);
    }
    /**
     * Get `menu data` by name.
     */


    function getMenu(name) {
      return menus.get(name);
    }
    /**
     * Returns all subscribed menus as array of `menu data`
     */


    function getAll() {
      return iterator2array(menus.values());
    }

    return {
      subscribe: subscribe,
      unsubscribe: unsubscribe,
      updateLayoutInfo: updateLayoutInfo,
      getMenu: getMenu,
      getAll: getAll,
      setOptionsCustomStyles: setOptionsCustomStyles
    };
  }
function makeMenuRegistry ( ) { var menus = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : new Map ( ) ; /**
     * Subscribes menu instance.
     */ function subscribe ( instance ) { var name = instance . getName ( ) ; if ( menus . get ( name ) ) { console . warn ( "incorrect usage of popup menu - menu with name " . concat ( name , " already exists" ) ) ; } menus . set ( name , { name : name , instance : instance } ) ; } /**
     * Unsubscribes menu instance.
     */ function unsubscribe ( instance ) { menus . delete ( instance . getName ( ) ) ; } /**
     * Updates layout infomration.
     */ function updateLayoutInfo ( name ) { var layouts = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ; if ( ! menus . has ( name ) ) { return ; } var menu = Object . assign ( { } , menus . get ( name ) ) ; if ( layouts . hasOwnProperty ( 'triggerLayout' ) ) { menu . triggerLayout = layouts . triggerLayout ; } if ( layouts . hasOwnProperty ( 'optionsLayout' ) ) { menu . optionsLayout = layouts . optionsLayout ; } menus . set ( name , menu ) ; } function setOptionsCustomStyles ( name , optionsCustomStyles ) { if ( ! menus . has ( name ) ) { return ; } var menu = _objectSpread ( { } , menus . get ( name ) , { optionsCustomStyles : optionsCustomStyles } ) ; menus . set ( name , menu ) ; } /**
     * Get `menu data` by name.
     */ function getMenu ( name ) { return menus . get ( name ) ; } /**
     * Returns all subscribed menus as array of `menu data`
     */ function getAll ( ) { return iterator2array ( menus . values ( ) ) ; } return { subscribe : subscribe , unsubscribe : unsubscribe , updateLayoutInfo : updateLayoutInfo , getMenu : getMenu , getAll : getAll , setOptionsCustomStyles : setOptionsCustomStyles } ; }
Registry to subscribe, unsubscribe and update data of menus.

menu data: {
instance: react instance
triggerLayout: Object - layout of menu trigger if known
optionsLayout: Object - layout of menu options if known
optionsCustomStyles: Object - custom styles of options
}
Registry to subscribe unsubscribe and update data of menus .