function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React, { forwardRef } from 'react';
import DataSourceProvider from "../provider/dataSource/DataSourceProvider";
import Form from "../../form";
import BaseForm from "./BaseForm";
import "./index.less";

/**
 * @title: 数据源表单组件
 * @description: 基于数据源动态生成表单，支持编辑、查看、禁用三种模式
 */
var DataSourceForm = /*#__PURE__*/forwardRef(function (props, ref) {
  var dataSource = props.dataSource,
    currentValue = props.currentValue,
    __designMode = props.__designMode,
    extraParams = props.extraParams;
  return /*#__PURE__*/React.createElement(DataSourceProvider, {
    dataSource: dataSource,
    currentValue: currentValue,
    __designMode: __designMode,
    extraParams: extraParams
  }, /*#__PURE__*/React.createElement(BaseForm, _extends({}, props, {
    ref: ref
  })));
});
DataSourceForm.List = Form.List;
export default DataSourceForm;