<commit_before>import React from "react";
import { connect } from "react-redux";
import { times } from "lodash";
import store from "./store";
import alignmentRunData from "./exampleData/alignmentRunData.json";
import { addAlignment, AlignmentView } from "../../src/";
import { selectionLayerUpdate } from "../../src/redux/selectionLayer";
import {
  getCombinedActions,
  fakeActionOverrides
} from "../../src/withEditorProps/index";
import { caretPositionUpdate } from "../../src/redux/caretPosition";

const basicActions = { selectionLayerUpdate, caretPositionUpdate };
export default connect(null, dispatch => {
  return {
    ...getCombinedActions(
      times(alignmentRunData.alignmentTracks.length, i => "alignmentView" + i),
      basicActions,
      fakeActionOverrides,
      dispatch
    )
  };
})(
  class StandaloneDemo extends React.Component {
    componentDidMount() {
      addAlignment(store, "MppViewer", alignmentRunData);
    }
    render() {
      const { selectionLayerUpdate, caretPositionUpdate } = this.props;
      return (
        <AlignmentView
          {...{
            editorName: "MppViewer",
            id: alignmentRunData.id,
            dimensions: {
              width: 1500
            },
            minimapLaneHeight: 10,
            minimapLaneSpacing: 2,
            // hideBottomBar: true,
            linearViewOptions: ({ index, alignmentVisibilityToolOptions }) => {
              const toReturn = {
                tickSpacing: 10,
                rightClickOverrides: {
                  // selectionLayerRightClicked: (items, opts, props) => {},
                  // partRightClicked: () => {}
                },
                selectionLayerUpdate,
                caretPositionUpdate
              };
              if (index === alignmentRunData.alignmentTracks.length - 1) {
                Object.assign(toReturn, {
                  linearViewAnnotationVisibilityOverrides: {
                    ...alignmentVisibilityToolOptions.alignmentAnnotationVisibility,
                    axis: true
                  }
                });
              }<commit_msg>A little more work<commit_after>import React from "react";
import { connect } from "react-redux";
import { times } from "lodash";
import store from "./store";
import alignmentRunData from "./exampleData/alignmentRunData.json";
import { addAlignment, AlignmentView } from "../../src/";
import { selectionLayerUpdate } from "../../src/redux/selectionLayer";
import {
  getCombinedActions,
  fakeActionOverrides
} from "../../src/withEditorProps/index";
import { caretPositionUpdate } from "../../src/redux/caretPosition";
import { MenuItem } from "@blueprintjs/core";

const basicActions = { selectionLayerUpdate, caretPositionUpdate };
export default connect(null, dispatch => {
  return {
    ...getCombinedActions(
      times(alignmentRunData.alignmentTracks.length, i => "alignmentView" + i),
      basicActions,
      fakeActionOverrides,
      dispatch
    )
  };
})(
  class StandaloneDemo extends React.Component {
    componentDidMount() {
      addAlignment(store, "MppViewer", alignmentRunData);
    }
    render() {
      const { selectionLayerUpdate, caretPositionUpdate } = this.props;
      return (
        <AlignmentView
          {...{
            editorName: "MppViewer",
            id: alignmentRunData.id,
            dimensions: {
              width: 1500
            },
            minimapLaneHeight: 10,
            minimapLaneSpacing: 2,
            // hideBottomBar: true,
            linearViewOptions: ({ index, alignmentVisibilityToolOptions }) => {
              const toReturn = {
                tickSpacing: 10,
                rightClickOverrides: {
                  selectionLayerRightClicked: (items, opts, props) => {
                    if(0) props(props^props)
                    return [{ text: "Create Diversity Region" }];
                  }
                  // partRightClicked: () => {}
                },
                selectionLayerUpdate,
                caretPositionUpdate
              };
              if (index === alignmentRunData.alignmentTracks.length - 1) {
                Object.assign(toReturn, {
                  linearViewAnnotationVisibilityOverrides: {
                    ...alignmentVisibilityToolOptions.alignmentAnnotationVisibility,
                    axis: true
                  }
                });
              }
{'fraction_non_alphanumeric': 0.10899614774529798, 'fraction_numerical': 0.004758667573079538, 'mean_word_length': 1.9544846050870148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2611338', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1084, 'n_words': 228}