<commit_before>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
  FormattedMessage,
  injectIntl,
} from 'react-intl';
import {
  isEmpty,
  capitalize,
} from 'lodash';

import {
  stripesConnect,
  withStripes,
} from '@folio/stripes/core';
import { Settings } from '@folio/stripes/smart-components';

import Limits from './patronBlocks/Limits/Limits';

// retrieve up to MAX_RECORDS items from lookup tables
// this is the same value set by stripes-smart-components
// probably it should be a constant exported by stripes-connect instead.
const MAX_RECORDS = '2000';

class LimitsSettings extends Component {
  static manifest = Object.freeze({
    query: {},
    groups: {
      type: 'okapi',
      records: 'usergroups',
      path: 'groups',
      params: {
        query: 'cql.allRecords=1 sortby group',
        limit: MAX_RECORDS,
      },
    },
    patronBlockCondition: {
      type: 'okapi',
      records: 'patronBlockConditions',
      GET: {
        path: 'patron-block-conditions',
      },
      params: {
        query: 'cql.allRecords=1 sortby name',
        limit: MAX_RECORDS,
      },
    },
    patronBlockLimits: {
      type: 'okapi',
      records: 'patronBlockLimits',
      GET: {
        path: 'patron-block-limits',
      },
      params: {
        query: 'cql.allRecords=1',
        limit: MAX_RECORDS,
      },
    },
  });

  static propTypes = {<commit_msg>UIU-1715: Change limits<commit_after>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
  FormattedMessage,
  injectIntl,
} from 'react-intl';
import {
  isEmpty,
  capitalize,
} from 'lodash';

import {
  stripesConnect,
  withStripes,
} from '@folio/stripes/core';
import { Settings } from '@folio/stripes/smart-components';

import Limits from './patronBlocks/Limits/Limits';

// Only 6 patron block conditions exist. If patron groups or 
// patron block conditions limit change, then LIMITS_RECORDS must be changed as well.
// For now we have: 6 * 200 = 1200.
const LIMITS_RECORDS = '1200';

class LimitsSettings extends Component {
  static manifest = Object.freeze({
    query: {},
    groups: {
      type: 'okapi',
      records: 'usergroups',
      path: 'groups',
      params: {
        query: 'cql.allRecords=1 sortby group',
        limit: '200',
      },
    },
    patronBlockCondition: {
      type: 'okapi',
      records: 'patronBlockConditions',
      GET: {
        path: 'patron-block-conditions',
      },
      params: {
        query: 'cql.allRecords=1 sortby name',
      },
    },
    patronBlockLimits: {
      type: 'okapi',
      records: 'patronBlockLimits',
      GET: {
        path: 'patron-block-limits',
      },
      params: {
        query: 'cql.allRecords=1',
        limit: LIMITS_RECORDS,
      },
    },
  });

  static propTypes = {
{'fraction_non_alphanumeric': 0.12702322308233638, 'fraction_numerical': 0.01055594651653765, 'mean_word_length': 2.6124523506988564, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6790952', 'n_tokens_mistral': 928, 'n_tokens_neox': 905, 'n_words': 229}