"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireWildcard(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _immutable = _interopRequireDefault(require("immutable"));

var _lodash = _interopRequireDefault(require("lodash"));

var _reactIntl = require("react-intl");

var _cspaceInput = require("cspace-input");

var _cspaceLayout = require("cspace-layout");

var _cspaceRefname = require("cspace-refname");

var _DateInputContainer = _interopRequireDefault(require("../containers/input/DateInputContainer"));

var _DateTimeInputContainer = _interopRequireDefault(require("../containers/input/DateTimeInputContainer"));

var _HierarchyInputContainer = _interopRequireDefault(require("../containers/record/HierarchyInputContainer"));

var _IDGeneratorInputContainer = _interopRequireDefault(require("../containers/input/IDGeneratorInputContainer"));

var _OptionPickerInputContainer = _interopRequireDefault(require("../containers/record/OptionPickerInputContainer"));

var _UploadInputContainer = _interopRequireDefault(require("../containers/input/UploadInputContainer"));

var _PermissionsInputContainer = _interopRequireDefault(require("../containers/admin/PermissionsInputContainer"));

var _MiniViewPopupAutocompleteInputContainer = _interopRequireDefault(require("../containers/record/MiniViewPopupAutocompleteInputContainer"));

var _RolesInputContainer = _interopRequireDefault(require("../containers/admin/RolesInputContainer"));

var _StructuredDateInputContainer = _interopRequireDefault(require("../containers/record/StructuredDateInputContainer"));

var _TermPickerInputContainer = _interopRequireDefault(require("../containers/record/TermPickerInputContainer"));

var _WorkflowStateInput = _interopRequireDefault(require("../components/record/WorkflowStateInput"));

var _PanelContainer = _interopRequireDefault(require("../containers/layout/PanelContainer"));

var _Field = _interopRequireDefault(require("../components/record/Field"));

var _InputTable = _interopRequireDefault(require("../components/record/InputTable"));

var _Subrecord = _interopRequireDefault(require("../components/record/Subrecord"));

var _CheckboxInput = _interopRequireDefault(require("../components/record/CheckboxInput"));

var _ObjectNameInput = _interopRequireDefault(require("../components/record/ObjectNameInput"));

var _URLInput = _interopRequireDefault(require("../components/record/URLInput"));

var _ContentViewer = _interopRequireDefault(require("../components/record/ContentViewer"));

var dataTypes = _interopRequireWildcard(require("../constants/dataTypes"));

var searchOperators = _interopRequireWildcard(require("../constants/searchOperators"));

var _withBooleanValue = _interopRequireDefault(require("../enhancers/withBooleanValue"));

var _withCsid = _interopRequireDefault(require("../enhancers/withCsid"));

var _configHelpers = require("../helpers/configHelpers");

var _recordDataHelpers = require("../helpers/recordDataHelpers");

var formatHelpers = _interopRequireWildcard(require("../helpers/formatHelpers"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

const {
  Button,
  CompoundInput,
  PasswordInput,
  ReadOnlyInput,
  RichTextInput,
  TextInput
} = _cspaceInput.components;
const {
  labelable,
  repeatable
} = _cspaceInput.enhancers;
const AutocompleteInput = repeatable(labelable(_MiniViewPopupAutocompleteInputContainer.default));
const CheckboxInput = (0, _withBooleanValue.default)(_CheckboxInput.default);
const DateInput = _DateInputContainer.default;
const DateTimeInput = _DateTimeInputContainer.default;
const HierarchyInput = (0, _withCsid.default)(_HierarchyInputContainer.default);
const IDGeneratorInput = _IDGeneratorInputContainer.default;
const ObjectNameInput = repeatable(labelable(_ObjectNameInput.default));
const OptionPickerInput = _OptionPickerInputContainer.default;
const PermissionsInput = labelable(_PermissionsInputContainer.default);
const RolesInput = labelable(_RolesInputContainer.default);
const StructuredDateInput = _StructuredDateInputContainer.default;
const TermPickerInput = _TermPickerInputContainer.default;
const UploadInput = _UploadInputContainer.default;

var _default = () => ({
  dataTypes,
  formatHelpers,
  searchOperators,
  config: {
    extensions: {
      // Initialize the default extensions. This makes testing easier, since the plugins that
      // implement these extensions won't necessarily be loaded for tests.
      address: {},
      core: {
        advancedSearch: []
      },
      dimension: {},
      structuredDate: {}
    }
  },
  lib: {
    lodash: _lodash.default,
    FormattedMessage: _reactIntl.FormattedMessage,
    Immutable: _immutable.default,
    React: _react.default,
    Component: _react.Component,
    PropTypes: _propTypes.default
  },
  inputComponents: {
    AutocompleteInput,
    Button,
    CheckboxInput,
    CompoundInput,
    DateInput,
    DateTimeInput,
    HierarchyInput,
    IDGeneratorInput,
    ObjectNameInput,
    OptionPickerInput,
    PasswordInput,
    PermissionsInput,
    RolesInput,
    StructuredDateInput,
    ReadOnlyInput,
    RichTextInput,
    TextInput,
    TermPickerInput,
    UploadInput,
    URLInput: _URLInput.default,
    WorkflowStateInput: _WorkflowStateInput.default
  },
  layoutComponents: {
    Col: _cspaceLayout.Col,
    Cols: _cspaceLayout.Cols,
    Panel: _PanelContainer.default,
    Row: _cspaceLayout.Row
  },
  recordComponents: {
    ContentViewer: _ContentViewer.default,
    Field: _Field.default,
    InputTable: _InputTable.default,
    Subrecord: _Subrecord.default
  },
  configHelpers: {
    configKey: _configHelpers.configKey,
    mergeKey: _configHelpers.mergeKey,
    mergeStrategy: _configHelpers.mergeStrategy
  },
  pathHelpers: _cspaceInput.helpers.pathHelpers,
  recordDataHelpers: {
    deepGet: _recordDataHelpers.deepGet,
    getPart: _recordDataHelpers.getPart,
    getPartPropertyName: _recordDataHelpers.getPartPropertyName,
    isNewRecord: _recordDataHelpers.isNewRecord
  },
  refNameHelpers: {
    getDisplayName: _cspaceRefname.getDisplayName
  }
});

exports.default = _default;