<commit_before>import {AdminActions} from '../actions/AdminActions';
import {AutoBindingStore} from './AutoBindingStore';
import alt from '../alt';
import request from 'superagent';

class _AdminStore extends AutoBindingStore {
  constructor() {
    super(AdminActions);

    // initialize state here
    this.applicationState = {
      sort: 'DATE_SUBMITTED',
      sortDirection: 'DESCENDING',
      query: '',
      filters: {
        date: {
          start: undefined,
          end: undefined
        },
        type: {
          annual: true,
          project: true
        },
        disposition: undefined,
        status: {
          inProgress: true,
          awaitingReview: true,
          revisionNecessary: true
        },
        submittedBy: undefined,
        reporterName: undefined
      },
      showFiltersOnMobile: false,
      showingApproval: false,
      showingRejection: false,
      showingQuestionnaireComments: false,
      showingEntitiesComments: false,
      showingProjectComments: false,
      selectedDisclosure: undefined
    };

    this.disclosureSummaries = [];

    this.refreshDisclosures();
  }

  refreshDisclosures() {
    request.get('/api/research/coi/disclosure-summaries')
           .query({sortColumn: this.applicationState.sort})
           .query({sortDirection: this.applicationState.sortDirection})
           .query({query: this.applicationState.query})
           .end((err, summaries) => {
             if (!err) {
               this.disclosureSummaries = summaries.body;
               this.emitChange();<commit_msg>Calling function for defaults<commit_after>import {AdminActions} from '../actions/AdminActions';
import {AutoBindingStore} from './AutoBindingStore';
import alt from '../alt';
import request from 'superagent';

class _AdminStore extends AutoBindingStore {
  constructor() {
    super(AdminActions);

    // initialize state here
    this.applicationState = {
      sort: 'DATE_SUBMITTED',
      sortDirection: 'DESCENDING',
      query: '',
      filters: {
        date: {
          start: undefined,
          end: undefined
        },
        disposition: undefined,
        submittedBy: undefined,
        reporterName: undefined
      },
      showFiltersOnMobile: false,
      showingApproval: false,
      showingRejection: false,
      showingQuestionnaireComments: false,
      showingEntitiesComments: false,
      showingProjectComments: false,
      selectedDisclosure: undefined
    };

    this.clearTypeFilter();
    this.clearStatusFilter();

    this.disclosureSummaries = [];

    this.refreshDisclosures();
  }

  refreshDisclosures() {
    request.get('/api/research/coi/disclosure-summaries')
           .query({sortColumn: this.applicationState.sort})
           .query({sortDirection: this.applicationState.sortDirection})
           .query({query: this.applicationState.query})
           .end((err, summaries) => {
             if (!err) {
               this.disclosureSummaries = summaries.body;
               this.emitChange();
{'fraction_non_alphanumeric': 0.10675453047775947, 'fraction_numerical': 0.0, 'mean_word_length': 2.4460839954597047, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1539427', 'n_tokens_mistral': 803, 'n_tokens_neox': 803, 'n_words': 164}