"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 _search = require("../actions/search");
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 _ContentViewer = _interopRequireDefault(require("../components/record/ContentViewer"));
var dataTypes = _interopRequireWildcard(require("../constants/dataTypes"));
var searchOperators = _interopRequireWildcard(require("../constants/searchOperators"));
var _configHelpers = require("./configHelpers");
var _recordDataHelpers = require("./recordDataHelpers");
var _validationHelpers = require("./validationHelpers");
var formatHelpers = _interopRequireWildcard(require("./formatHelpers"));
var inputComponents = _interopRequireWildcard(require("./configContextInputs"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _default = () => ({
  dataTypes,
  formatHelpers,
  inputComponents,
  searchOperators,
  actions: {
    findFirst: _search.findFirst
  },
  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: {},
      authItem: {},
      core: {
        advancedSearch: []
      },
      dimension: {},
      structuredDate: {},
      associatedAuthority: {}
    }
  },
  lib: {
    lodash: _lodash.default,
    FormattedMessage: _reactIntl.FormattedMessage,
    Immutable: _immutable.default,
    React: _react.default,
    Component: _react.Component,
    PropTypes: _propTypes.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
  },
  validationHelpers: {
    validateNotInUse: _validationHelpers.validateNotInUse
  }
});
exports.default = _default;