How to use the babel/actions/AppActions.showComponent function in babel

To help you get started, we’ve selected a few babel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / storymap-crowdsource / src / app / controllers / builder / components / Components.babel.js View on Github external
adds.forEach((component) => {

        switch (component) {
          case componentNames.SIDE_PANEL_SETTINGS:
            AppActions.hideComponent([componentNames.SIDE_PANEL_HELP]);
            break;
          case componentNames.SIDE_PANEL_HELP:
            AppActions.hideComponent([componentNames.SIDE_PANEL_SETTINGS]);
            break;
          case componentNames.SIDE_PANEL_SETTINGS_STRING_MATCH + componentNames.SPS_INTRO_SPLASH:
            if (this.visibleComponents.indexOf(componentNames.INTRO) < 0) {
              AppActions.showComponent([componentNames.INTRO]);
            }
            break;
        }

      });
github Esri / storymap-crowdsource / src / app / controllers / layouts / Layout.babel.js View on Github external
updateAppState() {
    this.appState = AppStore.getState();

    const currentLayout = lang.getObject('appState.items.app.data.values.settings.layout.id',false,this);

    if (!this.checkedAdminPanel && !lang.getObject('appState.mode.isMobile',false,this) && !lang.getObject('appState.mode.isBuilder',false,this) && lang.getObject('appState.user.editor',false,this)) {
      this.checkedAdminPanel = true;
      AppActions.showComponent(componentNames.ADMIN_BANNER);
    }
    if (lang.getObject('appState.mode.isMobile',false,this) && lang.getObject('appState.app.layout.visibleComponents',false,this).indexOf(componentNames.ADMIN_BANNER) >= 0) {
      this.checkedAdminPanel = false;
      AppActions.hideComponent(componentNames.ADMIN_BANNER);
    }

    if (!this.resizedViewer && lang.getObject('appState.app.loading.data',false,this)) {
      this.resizeViewer();
    }

    if (this.resizeViewer) {
      this.resizeViewer();
    }

    if (!this.resizedViewer && lang.getObject('appState.app.loading.map',false,this)) {
      this.resizedViewer = true;
github Esri / storymap-crowdsource / src / app / controllers / layouts / sidePanel / SidePanelController.babel.js View on Github external
}
            }
            break;
        }

      });
    } else if (isMobile && visibleComponents.indexOf(componentNames.MAP) >= 0 && visibleComponents.indexOf(componentNames.GALLERY) >= 0) {
      this.prevVisibleComponents = [].concat(this.visibleComponents);
      this.visibleComponents = [].concat(visibleComponents);

      this.showMap(options);
      AppActions.hideComponent(componentNames.GALLERY);
    } else if (!isMobile &&
      ((visibleComponents.indexOf(componentNames.MAP) >= 0 && visibleComponents.indexOf(componentNames.GALLERY) < 0) ||
      (visibleComponents.indexOf(componentNames.MAP) < 0 && visibleComponents.indexOf(componentNames.GALLERY) >= 0))) {
      AppActions.showComponent([componentNames.MAP,componentNames.GALLERY]);
    }

  }
github Esri / storymap-crowdsource / src / app / controllers / layouts / sidePanel / SidePanelController.babel.js View on Github external
MapActions.selectFeature(false);
            AppActions.hideComponent([componentNames.MAP,componentNames.GALLERY,componentNames.SELECTED_SHARES]);
            break;
          case componentNames.MAP:
            this.showMap(options);
            const hideComponents = [componentNames.INTRO];
            const showComponents = [];

            if (isMobile) {
              hideComponents.push(componentNames.GALLERY);
            } else {
              showComponents.push(componentNames.GALLERY);
            }
            AppActions.hideComponent(hideComponents);
            if (showComponents.length > 0) {
              AppActions.showComponent(showComponents);
            }
            break;
          case componentNames.GALLERY:
            if (this.visibleComponents.indexOf(componentNames.CONTRIBUTE) < 0) {
              this.showGallery(options);
              const hideComponents = [componentNames.INTRO];
              const showComponents = [];

              if (isMobile) {
                hideComponents.push(componentNames.MAP);
              } else {
                showComponents.push(componentNames.MAP);
              }
              AppActions.hideComponent(hideComponents);
              if (showComponents.length > 0) {
                AppActions.showComponent(showComponents);
github Esri / storymap-crowdsource / src / app / controllers / fromScratch / StoryCreator.babel.js View on Github external
setTimeout(() => {
        AppActions.showComponent([componentNames.SIDE_PANEL_SETTINGS,componentNames.SIDE_PANEL_SETTINGS_STRING_MATCH + componentNames.SPS_INTRO_SPLASH]);
      },1000);
    }