<commit_before>import React from "react";

import CSSModules from 'react-css-modules';
import styles from "../../../scss/_code-box.scss";

import _ from "lodash";

class SASSView extends React.Component {
  constructor(){
    super();
  }
  render() {
    const{dispatch, sassView, pixelCount, columnCount, rowCount, xPos, yPos, rectColor} = this.props;
    if(sassView){
      let colorStore   = _.uniq(rectColor);
      let colorVar     = [];
      let xVar         = [];
      let yVar         = [];
      let boxShadowVar = [];
      let xPosSorted   = _.sortBy(xPos);
      let yPosSorted   = _.sortBy(yPos);
      // let xPosSorted   = _.sort(xPos);

      colorStore.map(function(value,idx){
        colorVar.push(
          `$color-${idx}: ${value}; `
        )
      });
      //x value array
      for(let x = 0; x < columnCount; x++){
          xVar.push(
            `X${x}: $num*${x}; `
          )
      }
      //y value array
      for(let y = 0; y < rowCount; y++){
        yVar.push(
          `O${y}: $num*${y}; `
        )
      }
      //
      xPos.map(function(value, idx){
        boxShadowVar.push(
          `$X${xPosSorted[idx] / pixelCount} $Y${yPosSorted[idx] / pixelCount} ${rectColor[idx]}, `
        )
      });


      return(
        <div><commit_msg>Sass code box is now officially complete.<commit_after>import React from "react";

import CSSModules from 'react-css-modules';
import styles from "../../../scss/_code-box.scss";

import _ from "lodash";

class SASSView extends React.Component {
  constructor(){
    super();
  }
  render() {
    const{dispatch, sassView, pixelCount, columnCount, rowCount, xPos, yPos, rectColor} = this.props;
    if(sassView){
      let colorStore     = _.uniq(rectColor);
      let xPosSorted     = _.sortBy(xPos);
      let yPosSorted     = _.sortBy(yPos);
      let sassColorStore = []
      let colorVar       = [];
      let xVar           = [];
      let yVar           = [];
      let boxShadowVar   = [];
      let varRectColor   = [];

      colorStore.map(function(value,idx){
        colorVar.push(
          `$color-${idx}: ${value}; `
        )
      });
      rectColor.map(function(value,idx){
         sassColorStore.push(
           `$color-${colorStore.indexOf(value)}`
         )
      });
      //x value array
      for(let x = 0; x < columnCount; x++){
          xVar.push(
            `X${x}: $num*${x}; `
          )
      }
      //y value array
      for(let y = 0; y < rowCount; y++){
        yVar.push(
          `O${y}: $num*${y}; `
        )
      }
      xPos.map(function(value, idx){
        boxShadowVar.push(
          `$X${xPosSorted[idx] / pixelCount} $Y${yPosSorted[idx] / pixelCount} ${sassColorStore[idx]}, `
        )
      });


      return(
        <div>
{'fraction_non_alphanumeric': 0.16004335260115607, 'fraction_numerical': 0.001445086705202312, 'mean_word_length': 1.84, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '1068466', 'n_tokens_mistral': 922, 'n_tokens_neox': 913, 'n_words': 189}