<commit_before>import { button } from '@cycle/dom';
import { Observable } from 'rx';
import R from 'ramda';

import { parseActions } from './actions';
import { parseToGraph } from './graph';

import { today, tomorrow, filterBetweenDates } from '../../utils/date';

function TrelloCFD(
  {
    DOM,
    actions$,
    lists$,
    displayedLists$,
    dates$,
    props$,
    previewTomorrow$,
  }
) {
  const currentDate$ = previewTomorrow$.map(R.cond([
    [R.equals(true), R.always(tomorrow)],
    [R.equals(false), R.always(today)],
  ]));

  const clicks$ = DOM
    .select('.button')
    .events('click')
    .startWith(false);

  const vtree$ = props$.map((props) => button(
    { className: R.join(' ', R.concat(['button'], props.classNames)) },
    props.label)
  );

  const parsedActions$ = Observable.combineLatest(
    dates$,
    lists$,
    actions$,
    currentDate$,
    ({ startDate, endDate }, lists, actions, currentDate) => R.compose(
      filterBetweenDates(startDate, endDate),
      parseActions(currentDate, lists)
    )(actions)
  );

  return {
    DOM: vtree$,
    Trello: clicks$,
    Graph: Observable.combineLatest(
      displayedLists$,
      parsedActions$,
      parseToGraph
    ),
  };
}

export default TrelloCFD;<commit_msg>Display endDate value in CFD<commit_after>import { button } from '@cycle/dom';
import { Observable } from 'rx';
import R from 'ramda';

import { parseActions } from './actions';
import { parseToGraph } from './graph';

import { today, tomorrow, filterBetweenDates, nextDay } from '../../utils/date';

function TrelloCFD(
  {
    DOM,
    actions$,
    lists$,
    displayedLists$,
    dates$,
    props$,
    previewTomorrow$,
  }
) {
  const currentDate$ = previewTomorrow$.map(R.cond([
    [R.equals(true), R.always(tomorrow)],
    [R.equals(false), R.always(today)],
  ]));

  const clicks$ = DOM
    .select('.button')
    .events('click')
    .startWith(false);

  const vtree$ = props$.map((props) => button(
    { className: R.join(' ', R.concat(['button'], props.classNames)) },
    props.label)
  );

  const parsedActions$ = Observable.combineLatest(
    dates$,
    lists$,
    actions$,
    currentDate$,
    ({ startDate, endDate }, lists, actions, currentDate) => R.compose(
      filterBetweenDates(startDate, nextDay(endDate)),
      parseActions(currentDate, lists)
    )(actions)
  );

  return {
    DOM: vtree$,
    Trello: clicks$,
    Graph: Observable.combineLatest(
      displayedLists$,
      parsedActions$,
      parseToGraph
    ),
  };
}

export default TrelloCFD;
{'fraction_non_alphanumeric': 0.15929549902152643, 'fraction_numerical': 0.0, 'mean_word_length': 3.1493506493506493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4316140', 'n_tokens_mistral': 841, 'n_tokens_neox': 813, 'n_words': 180}