How to use the babel/constants/componentNames/ComponentNames.SELECTED_SHARES 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 / layouts / stacked / StackedController.babel.js View on Github external
checkOverlayComponentVisibility() {
    const featuresInExtent = lang.getObject('appState.app.map.featuresInExtent',false,this);
    const selectedFeatureId = lang.getObject('appState.app.map.selectedFeatureId',false,this);
    const contributing = lang.getObject('appState.app.contributing.active',false,this);

    if (!contributing && selectedFeatureId && featuresInExtent.length > 0 && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) < 0) {
      AppActions.changeComponentsVisibility({show: componentNames.SELECTED_SHARES, hide: componentNames.INTRO});
    } else if (!selectedFeatureId && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) >= 0) {
      AppActions.hideComponent(componentNames.SELECTED_SHARES);
    }

    if (contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) < 0) {
      AppActions.changeComponentsVisibility({show: [componentNames.CONTRIBUTE,componentNames.MAP], hide: [componentNames.INTRO, componentNames.SELECTED_SHARES]});
    } else if (!contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) >= 0) {
      AppActions.hideComponent(componentNames.CONTRIBUTE);
    }
  }
github Esri / storymap-crowdsource / src / app / controllers / layouts / sidePanel / SidePanelController.babel.js View on Github external
checkOverlayComponentVisibility() {
    const featuresInExtent = lang.getObject('appState.app.map.featuresInExtent',false,this);
    const selectedFeatureId = lang.getObject('appState.app.map.selectedFeatureId',false,this);
    const contributing = lang.getObject('appState.app.contributing.active',false,this);

    if (!contributing && selectedFeatureId && featuresInExtent.length > 0 && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) < 0) {
      AppActions.changeComponentsVisibility({show: componentNames.SELECTED_SHARES, hide: componentNames.INTRO});
    } else if (!selectedFeatureId && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) >= 0) {
      AppActions.hideComponent(componentNames.SELECTED_SHARES);
    }

    if (contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) < 0) {
      AppActions.changeComponentsVisibility({show: [componentNames.CONTRIBUTE,componentNames.MAP], hide: [componentNames.INTRO, componentNames.SELECTED_SHARES]});
    } else if (!contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) >= 0) {
      AppActions.hideComponent(componentNames.CONTRIBUTE);
    }
  }
github Esri / storymap-crowdsource / src / app / controllers / layouts / sidePanel / SidePanelController.babel.js View on Github external
checkOverlayComponentVisibility() {
    const featuresInExtent = lang.getObject('appState.app.map.featuresInExtent',false,this);
    const selectedFeatureId = lang.getObject('appState.app.map.selectedFeatureId',false,this);
    const contributing = lang.getObject('appState.app.contributing.active',false,this);

    if (!contributing && selectedFeatureId && featuresInExtent.length > 0 && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) < 0) {
      AppActions.changeComponentsVisibility({show: componentNames.SELECTED_SHARES, hide: componentNames.INTRO});
    } else if (!selectedFeatureId && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) >= 0) {
      AppActions.hideComponent(componentNames.SELECTED_SHARES);
    }

    if (contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) < 0) {
      AppActions.changeComponentsVisibility({show: [componentNames.CONTRIBUTE,componentNames.MAP], hide: [componentNames.INTRO, componentNames.SELECTED_SHARES]});
    } else if (!contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) >= 0) {
      AppActions.hideComponent(componentNames.CONTRIBUTE);
    }
  }
github Esri / storymap-crowdsource / src / app / controllers / layouts / stacked / StackedController.babel.js View on Github external
checkOverlayComponentVisibility() {
    const featuresInExtent = lang.getObject('appState.app.map.featuresInExtent',false,this);
    const selectedFeatureId = lang.getObject('appState.app.map.selectedFeatureId',false,this);
    const contributing = lang.getObject('appState.app.contributing.active',false,this);

    if (!contributing && selectedFeatureId && featuresInExtent.length > 0 && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) < 0) {
      AppActions.changeComponentsVisibility({show: componentNames.SELECTED_SHARES, hide: componentNames.INTRO});
    } else if (!selectedFeatureId && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) >= 0) {
      AppActions.hideComponent(componentNames.SELECTED_SHARES);
    }

    if (contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) < 0) {
      AppActions.changeComponentsVisibility({show: [componentNames.CONTRIBUTE,componentNames.MAP], hide: [componentNames.INTRO, componentNames.SELECTED_SHARES]});
    } else if (!contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) >= 0) {
      AppActions.hideComponent(componentNames.CONTRIBUTE);
    }
  }
github Esri / storymap-crowdsource / src / app / controllers / layouts / stacked / StackedController.babel.js View on Github external
checkOverlayComponentVisibility() {
    const featuresInExtent = lang.getObject('appState.app.map.featuresInExtent',false,this);
    const selectedFeatureId = lang.getObject('appState.app.map.selectedFeatureId',false,this);
    const contributing = lang.getObject('appState.app.contributing.active',false,this);

    if (!contributing && selectedFeatureId && featuresInExtent.length > 0 && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) < 0) {
      AppActions.changeComponentsVisibility({show: componentNames.SELECTED_SHARES, hide: componentNames.INTRO});
    } else if (!selectedFeatureId && this.visibleComponents.indexOf(componentNames.SELECTED_SHARES) >= 0) {
      AppActions.hideComponent(componentNames.SELECTED_SHARES);
    }

    if (contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) < 0) {
      AppActions.changeComponentsVisibility({show: [componentNames.CONTRIBUTE,componentNames.MAP], hide: [componentNames.INTRO, componentNames.SELECTED_SHARES]});
    } else if (!contributing && this.visibleComponents.indexOf(componentNames.CONTRIBUTE) >= 0) {
      AppActions.hideComponent(componentNames.CONTRIBUTE);
    }
  }