"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];

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

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));

var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));

var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));

var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));

var _tslib = require("tslib");

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

var _mobxReact = require("mobx-react");

var _icon = _interopRequireDefault(require("../../../lib/icon"));

var _warning = _interopRequireDefault(require("../../../lib/_util/warning"));

var _mobx = require("mobx");

var _isNumber = _interopRequireDefault(require("lodash/isNumber"));

var _isNil = _interopRequireDefault(require("lodash/isNil"));

var _noop = _interopRequireDefault(require("lodash/noop"));

var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject"));

var _moment = require("moment");

var _defaultTo = _interopRequireDefault(require("lodash/defaultTo"));

var _row = _interopRequireDefault(require("../../../lib/row"));

var _classnames = _interopRequireDefault(require("classnames"));

var _ObjectChainValue = _interopRequireDefault(require("../_util/ObjectChainValue"));

var _DataSetComponent2 = _interopRequireDefault(require("../data-set/DataSetComponent"));

var _ScreeningOption = _interopRequireDefault(require("./ScreeningOption"));

var _normalizeOptions = _interopRequireDefault(require("../option/normalizeOptions"));

var _autobind = _interopRequireDefault(require("../_util/autobind"));

var _isEmpty = _interopRequireDefault(require("../_util/isEmpty"));

var _utils = require("../field/utils");

var _enum = require("../data-set/enum");

var _formatter = require("../formatter");

var _isSame = _interopRequireDefault(require("../_util/isSame"));

var _isSameLike = _interopRequireDefault(require("../_util/isSameLike"));

var _Button = _interopRequireDefault(require("../button/Button"));

var _localeContext = require("../locale-context");

var disabledField = '__disabled';

var expandedButton = function expandedButton(iconExpanded) {
  if (iconExpanded === true) {
    return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", null, "".concat((0, _localeContext.$l)('Screening', 'pack_up'))), /*#__PURE__*/_react["default"].createElement(_icon["default"], {
      type: "expand_less"
    }));
  }

  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", null, "".concat((0, _localeContext.$l)('Screening', 'more'))), /*#__PURE__*/_react["default"].createElement(_icon["default"], {
    type: "expand_more"
  }));
};

function getItemKey(record, text, value) {
  return "item-".concat(value || record.id, "-").concat(( /*#__PURE__*/(0, _react.isValidElement)(text) ? text.key : text) || record.id);
}

function getSimpleValue(value, valueField) {
  if ((0, _isPlainObject["default"])(value)) {
    return _ObjectChainValue["default"].get(value, valueField);
  }

  return value;
}

var Screening = /*#__PURE__*/function (_DataSetComponent) {
  (0, _inherits2["default"])(Screening, _DataSetComponent);

  var _super = (0, _createSuper2["default"])(Screening);

  function Screening(props, context) {
    var _this;

    (0, _classCallCheck2["default"])(this, Screening);
    _this = _super.call(this, props, context);
    _this.emptyValue = null;
    _this.text = null;

    _this.handleExpanedClick = function () {
      _this.iconExpanded = !_this.iconExpanded;
    };
    /**
     * 提交值，触发dataSet修改和提交方法。
     */


    _this.handleConfirm = function () {
      var onConfirm = _this.props.onConfirm;

      var _assertThisInitialize = (0, _assertThisInitialized2["default"])(_this),
          value = _assertThisInitialize.value,
          dataSet = _assertThisInitialize.dataSet,
          name = _assertThisInitialize.name,
          dataIndex = _assertThisInitialize.observableProps.dataIndex;

      if (value && name && dataSet) {
        (_this.record || dataSet.create({}, dataIndex)).set(name, value);

        if (onConfirm) {
          onConfirm({
            value: _this.value,
            fieldName: _this.name
          });
        }
      }
    };

    _this.handleSelect = function (info) {
      var record = info.value;

      _this.choose(record);
    };

    _this.handleDeselect = function (info) {
      var record = info.value;

      _this.unChoose(record);
    };

    _this.handleClick = function (_info) {// noop
    };

    _this.getScreeningOption = function () {
      var _this$props = _this.props,
          colProps = _this$props.colProps,
          optionRenderer = _this$props.optionRenderer;

      var _assertThisInitialize2 = (0, _assertThisInitialized2["default"])(_this),
          options = _assertThisInitialize2.options,
          textField = _assertThisInitialize2.textField,
          valueField = _assertThisInitialize2.valueField,
          multiple = _assertThisInitialize2.multiple;

      if (!options) {
        return null;
      }

      var data = options.data;

      if (!(0, _isEmpty["default"])(data)) {
        return data.map(function (record) {
          var value = record.get(valueField);
          var text = record.get(textField);
          var key = getItemKey(record, text, value);
          var isSelected = false;

          var valueRecord = _this.processRecordToObject(record);

          var selectedValue = (0, _mobx.toJS)(_this.value);

          if (multiple) {
            if (selectedValue && selectedValue.length > 0) {
              isSelected = selectedValue.some(function (itemValue) {
                return (0, _isSame["default"])(itemValue, valueRecord);
              });
            }
          } else if ((0, _isSame["default"])(valueRecord, selectedValue)) {
            isSelected = true;
          }

          var textNode = /*#__PURE__*/_react["default"].createElement("span", {
            className: "".concat(_this.prefixCls, "-option-text")
          }, text);

          var screeningOptionProps = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, colProps), {}, {
            onSelect: _this.handleSelect,
            onDeselect: _this.handleDeselect,
            onClick: _this.handleClick,
            value: record,
            optionkey: key,
            multiple: multiple,
            isSelected: isSelected,
            prefixCls: _this.prefixCls,
            children: textNode
          });

          if (optionRenderer) {
            screeningOptionProps.optionRender = optionRenderer({
              record: record,
              text: text,
              value: value
            });
          }

          return /*#__PURE__*/_react["default"].createElement(_ScreeningOption["default"], (0, _extends2["default"])({
            key: key
          }, screeningOptionProps));
        });
      }

      return null;
    };

    _this.handleMultiple = function () {
      _this.screeningMultiple = !_this.screeningMultiple;
    };

    _this.handleClear = function () {
      _this.setValue(_this.emptyValue);

      _this.value = _this.emptyValue;
      _this.text = _this.emptyValue;
    };

    _this.handleCancel = function () {
      _this.handleClear();

      _this.handleMultiple();
    };

    (0, _mobx.runInAction)(function () {
      _this.iconExpanded = false;
      _this.screeningMultiple = false;

      if (_this.name && _this.dataSet && _this.record) {
        var value = _this.record.get(_this.name);

        if (!(0, _isNil["default"])(value)) {
          _this.value = value;
        }
      }
    });
    return _this;
  }

  (0, _createClass2["default"])(Screening, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      (0, _get2["default"])((0, _getPrototypeOf2["default"])(Screening.prototype), "componentDidMount", this).call(this);
      var onRef = this.props.onRef;

      if (onRef) {
        onRef(this);
      }
    }
    /**
     * return the record: dataIndex record, current, undefined
     */

  }, {
    key: "record",
    get: function get() {
      var _this$observableProps = this.observableProps,
          record = _this$observableProps.record,
          dataSet = _this$observableProps.dataSet,
          dataIndex = _this$observableProps.dataIndex;

      if (record) {
        return record;
      }

      if (dataSet) {
        if ((0, _isNumber["default"])(dataIndex)) {
          return dataSet.get(dataIndex);
        }

        return dataSet.current;
      }

      return undefined;
    }
  }, {
    key: "value",
    get: function get() {
      return this.observableProps.value;
    },
    set: function set(value) {
      var _this2 = this;

      (0, _mobx.runInAction)(function () {
        _this2.observableProps.value = value;
      });
    } // @computed

  }, {
    key: "editable",
    get: function get() {
      return !this.disabled && !this.isReadOnly();
    }
    /**
     * 判断是否展示更多按钮
     */

  }, {
    key: "needExpandButton",
    get: function get() {
      var colProps = this.props.colProps;

      if (colProps) {
        var span = colProps.span;

        if ((0, _isNumber["default"])(span) && span >= 1) {
          var colNumber = 24 / span;

          if (this.options && this.options.length < colNumber) {
            return false;
          }
        }
      }

      return true;
    }
  }, {
    key: "name",
    get: function get() {
      return this.observableProps.name;
    }
  }, {
    key: "primitive",
    get: function get() {
      var type = this.getProp('type');
      return this.observableProps.primitiveValue !== false && type !== _enum.FieldType.object;
    }
    /**
     * get field message: recordField,dsField,undefined
     */

  }, {
    key: "field",
    get: function get() {
      var dataSet = this.dataSet,
          name = this.name,
          observableProps = this.observableProps;
      var displayName = this.constructor.displayName;

      if (displayName !== 'Output' && !name) {
        (0, _warning["default"])(!observableProps.dataSet, "".concat(displayName, " with binding DataSet need property name."));
        (0, _warning["default"])(!observableProps.record, "".concat(displayName, " with binding Record need property name."));
      }

      if (name && dataSet) {
        return dataSet.getField(name);
      }

      return undefined;
    }
  }, {
    key: "getProp",
    value: function getProp(propName) {
      var field = this.field;
      return (0, _defaultTo["default"])(field && field.get(propName, this.record), this.props[propName]);
    }
  }, {
    key: "handleChange",
    value: function handleChange(e) {
      e.preventDefault();
      e.stopPropagation();
    }
  }, {
    key: "options",
    get: function get() {
      var field = this.field,
          record = this.record,
          textField = this.textField,
          valueField = this.valueField,
          multiple = this.multiple,
          _this$observableProps2 = this.observableProps,
          children = _this$observableProps2.children,
          options = _this$observableProps2.options;
      return options || field && field.getOptions(record) || (0, _normalizeOptions["default"])({
        textField: textField,
        valueField: valueField,
        disabledField: disabledField,
        multiple: multiple,
        children: children,
        getConfig: this.getContextConfig
      });
    }
  }, {
    key: "multiple",
    get: function get() {
      return (0, _mobx.toJS)(this.screeningMultiple) || !!this.getProp('multiple');
    }
  }, {
    key: "textField",
    get: function get() {
      return this.getProp('textField') || 'meaning';
    }
  }, {
    key: "valueField",
    get: function get() {
      return this.getProp('valueField') || 'value';
    }
  }, {
    key: "getFieldType",
    value: function getFieldType() {
      var field = this.field;
      return field && field.get('type', this.record) || _enum.FieldType.string;
    }
  }, {
    key: "getDateFormat",
    value: function getDateFormat() {
      return (0, _utils.getDateFormatByField)(this.field, this.getFieldType(), this.record);
    }
  }, {
    key: "choose",
    value: function choose(record) {
      if (record) {
        this.handleOptionSelect(record);
      }
    }
  }, {
    key: "unChoose",
    value: function unChoose(record) {
      if (record) {
        this.handleOptionUnSelect(record);
      }
    }
  }, {
    key: "handleOptionSelect",
    value: function handleOptionSelect(record) {
      this.prepareSetValue(this.processRecordToObject(record));
    }
  }, {
    key: "handleOptionUnSelect",
    value: function handleOptionUnSelect(record) {
      var valueField = this.valueField;
      var newValue = record.get(valueField);
      this.removeValue(newValue, -1);
    }
  }, {
    key: "getDataSetValue",
    value: function getDataSetValue() {
      var record = this.record,
          name = this.name;

      if (record) {
        return record.get(name);
      }
    }
  }, {
    key: "getValue",
    value: function getValue() {
      var name = this.name,
          multiple = this.multiple;

      if (multiple) {
        return this.value;
      }

      if (this.dataSet && name) {
        return this.getDataSetValue();
      }

      return this.value;
    }
  }, {
    key: "getValues",
    value: function getValues() {
      return (0, _utils.toMultipleValue)(this.getValue(), false);
    }
  }, {
    key: "getOldValue",
    value: function getOldValue() {
      return this.getValue();
    }
  }, {
    key: "addValue",
    value: function addValue() {
      for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
        values[_key] = arguments[_key];
      }

      if (this.multiple) {
        var oldValues = this.getValues();

        if (values.length) {
          this.setValue([].concat((0, _toConsumableArray2["default"])(oldValues), values));
        } else if (!oldValues.length) {
          this.setValue(this.emptyValue);
        }
      } else {
        this.setValue(values.pop());
      }
    }
  }, {
    key: "getValueKey",
    value: function getValueKey(v) {
      if ((0, _mobx.isArrayLike)(v)) {
        return v.join(',');
      }

      return v;
    }
  }, {
    key: "removeValues",
    value: function removeValues(values) {
      var _this3 = this;

      var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      var repeat;
      this.setValue(values.reduce(function (oldValues, value) {
        repeat = 0;
        return oldValues.filter(function (v) {
          if (_this3.getValueKey(v) === _this3.getValueKey(value)) {
            if (index === -1 || repeat === index) {
              _this3.afterRemoveValue(value, repeat++);

              return false;
            }

            repeat++;
          }

          return true;
        });
      }, this.getValues()));
    }
  }, {
    key: "afterRemoveValue",
    value: function afterRemoveValue(_value, _repeat) {// noop
    }
  }, {
    key: "removeValue",
    value: function removeValue(value) {
      var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      this.removeValues([value], index);
    }
  }, {
    key: "isReadOnly",
    value: function isReadOnly() {
      return this.getProp('readOnly') || !this.props.onChange;
    }
  }, {
    key: "setValue",
    value: function setValue(value) {
      var _this4 = this;

      var onConfirm = this.props.onConfirm;

      if (!this.isReadOnly()) {
        if (this.multiple ? (0, _mobx.isArrayLike)(value) && !value.length : (0, _isNil["default"])(value) || value === '') {
          value = this.emptyValue;
        }

        var name = this.name,
            dataSet = this.dataSet,
            dataIndex = this.observableProps.dataIndex;
        var _this$props$onChange = this.props.onChange,
            onChange = _this$props$onChange === void 0 ? _noop["default"] : _this$props$onChange;
        var formNode = this.context.formNode;
        var old = this.getOldValue();

        if (dataSet && name && !this.multiple) {
          (this.record || dataSet.create({}, dataIndex)).set(name, value);
        } else {
          value = (0, _formatter.formatString)(value, {});
        } // 转成实际的数据再进行判断


        if (!(0, _isSame["default"])((0, _mobx.toJS)(old), (0, _mobx.toJS)(value))) {
          onChange(value, (0, _mobx.toJS)(old), formNode);

          if (this.multiple && value) {
            this.text = value.map(function (item) {
              return _this4.processValue(item);
            });
          } else if (value) {
            this.text = this.processValue(value);

            if (onConfirm) {
              onConfirm({
                value: value,
                fieldName: this.name
              });
            }
          }
        }

        this.value = value;
      }
    }
  }, {
    key: "prepareSetValue",
    value: function prepareSetValue() {
      for (var _len2 = arguments.length, value = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        value[_key2] = arguments[_key2];
      }

      var values = value.filter(function (item) {
        return !(0, _isEmpty["default"])(item);
      });
      this.addValue.apply(this, (0, _toConsumableArray2["default"])(values));
    }
  }, {
    key: "findByValue",
    value: function findByValue(value) {
      var valueField = this.valueField;

      var autoType = this.getProp('type') === _enum.FieldType.auto;

      value = getSimpleValue(value, valueField);
      return this.options.find(function (record) {
        return autoType ? (0, _isSameLike["default"])(record.get(valueField), value) : (0, _isSame["default"])(record.get(valueField), value);
      });
    }
  }, {
    key: "processObjectValue",
    value: function processObjectValue(value, textField) {
      if (!(0, _isNil["default"])(value)) {
        if ((0, _isPlainObject["default"])(value)) {
          return _ObjectChainValue["default"].get(value, textField);
        }

        var found = this.findByValue(value);

        if (found) {
          return found.get(textField);
        }
      }
    }
  }, {
    key: "processValueNormal",
    value: function processValueNormal(value) {
      if (!(0, _isNil["default"])(value)) {
        if ((0, _moment.isMoment)(value)) {
          return value.format(this.getDateFormat());
        }

        return value.toString();
      }

      return '';
    }
  }, {
    key: "processLookupValue",
    value: function processLookupValue(value) {
      var field = this.field,
          textField = this.textField,
          primitive = this.primitive,
          record = this.record;

      if (primitive && field && field.getLookup(record)) {
        return this.processValueNormal(field.getText(value, undefined, record));
      }

      return this.processValueNormal(this.processObjectValue(value, textField));
    }
  }, {
    key: "processValue",
    value: function processValue(value) {
      var text = this.processLookupValue(value);

      if ((0, _isEmpty["default"])(text)) {
        if ((0, _isPlainObject["default"])(value)) {
          return _ObjectChainValue["default"].get(value, this.valueField) || '';
        }

        return this.processValueNormal(value);
      }

      return text;
    }
  }, {
    key: "processRecordToObject",
    value: function processRecordToObject(record) {
      var primitive = this.primitive,
          valueField = this.valueField;
      return primitive ? record.get(valueField) : record.toData();
    }
  }, {
    key: "getTextNode",
    value: function getTextNode() {
      var text = this.isFocused && this.editable ? this.processValue(this.getValue()) : this.processRenderer(this.getValue());
      return text;
    }
  }, {
    key: "getText",
    value: function getText(value) {
      return this.processValue(value);
    }
  }, {
    key: "processText",
    value: function processText(value) {
      return value;
    }
  }, {
    key: "processRenderer",
    value: function processRenderer(value) {
      var record = this.record,
          dataSet = this.dataSet,
          _this$props2 = this.props,
          renderer = _this$props2.renderer,
          onConfirm = _this$props2.onConfirm;
      var text = this.processText(this.getText(value));
      return renderer ? renderer({
        options: this.options,
        name: this.name,
        dataSet: dataSet,
        onConfirm: onConfirm,
        record: record
      }) : text;
    }
  }, {
    key: "getObservableProps",
    value: function getObservableProps(props, context) {
      return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(Screening.prototype), "getObservableProps", this).call(this, props, context)), {}, {
        name: props.name,
        record: 'record' in props ? props.record : context.record,
        dataSet: 'dataSet' in props ? props.dataSet : context.dataSet,
        dataIndex: (0, _defaultTo["default"])(props.dataIndex, context.dataIndex),
        value: this.observableProps || 'value' in props ? props.value : props.defaultValue,
        primitiveValue: props.primitiveValue
      });
    }
  }, {
    key: "getOmitPropsKeys",
    value: function getOmitPropsKeys() {
      return (0, _get2["default"])((0, _getPrototypeOf2["default"])(Screening.prototype), "getOmitPropsKeys", this).call(this).concat(['record', 'defaultValue', 'dataIndex', 'onEnterDown', 'onClear', 'readOnly', 'renderer', 'pristine', 'primitiveValue', 'trim', 'onRef', 'onConfirm', 'colProps']);
    }
  }, {
    key: "getOtherProps",
    value: function getOtherProps() {
      var otherProps = (0, _get2["default"])((0, _getPrototypeOf2["default"])(Screening.prototype), "getOtherProps", this).call(this);
      otherProps.onChange = this.disabled ? _noop["default"] : this.handleChange;
      return otherProps;
    }
  }, {
    key: "getLabel",
    value: function getLabel() {
      return this.getProp('label');
    }
  }, {
    key: "render",
    value: function render() {
      var _classNames;

      var iconExpanded = this.iconExpanded,
          prefixCls = this.prefixCls,
          multiple = this.multiple;
      var _this$props3 = this.props,
          renderer = _this$props3.renderer,
          onConfirm = _this$props3.onConfirm;
      var label = this.getLabel();

      var multipleButton = /*#__PURE__*/_react["default"].createElement("div", {
        className: "".concat(prefixCls, "-multiple"),
        onClick: this.handleMultiple
      }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
        type: "add"
      }), /*#__PURE__*/_react["default"].createElement("span", null, "".concat((0, _localeContext.$l)('Screening', 'multi_select'))));

      var expandButtonContainer = this.needExpandButton && /*#__PURE__*/_react["default"].createElement("div", {
        className: "".concat(prefixCls, "-expanded"),
        onClick: this.handleExpanedClick
      }, expandedButton(iconExpanded));

      var labelNode = /*#__PURE__*/_react["default"].createElement("span", {
        className: "".concat(prefixCls, "-label")
      }, "".concat(label, ":"));

      var allClassName = (0, _classnames["default"])((_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-multiple"), multiple), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-more"), iconExpanded), _classNames), this.getMergedClassNames());
      return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, this.getMergedProps(), {
        className: allClassName
      }), renderer ? renderer({
        options: this.options,
        name: this.name,
        dataSet: this.dataSet,
        onConfirm: onConfirm,
        record: this.record
      }) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
        className: "".concat(prefixCls, "-title")
      }, labelNode), /*#__PURE__*/_react["default"].createElement("div", {
        className: "".concat(prefixCls, "-content")
      }, /*#__PURE__*/_react["default"].createElement("div", {
        className: "".concat(prefixCls, "-scroll")
      }, /*#__PURE__*/_react["default"].createElement(_row["default"], null, this.getScreeningOption()))), !this.multiple && /*#__PURE__*/_react["default"].createElement("div", {
        className: "".concat(prefixCls, "-operation")
      }, expandButtonContainer, multipleButton), this.multiple && /*#__PURE__*/_react["default"].createElement("div", {
        className: "".concat(prefixCls, "-footer")
      }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
        onClick: this.handleConfirm
      }, "".concat((0, _localeContext.$l)('Screening', 'confirm'))), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
        onClick: this.handleCancel
      }, "".concat((0, _localeContext.$l)('Screening', 'cancel'))))));
    }
  }]);
  return Screening;
}(_DataSetComponent2["default"]);

Screening.displayName = 'ScreeningItem';
Screening.defaultProps = {
  suffixCls: 'screening-item',
  multiple: false,
  colProps: {
    span: 4
  }
};
(0, _tslib.__decorate)([_mobx.observable], Screening.prototype, "iconExpanded", void 0);
(0, _tslib.__decorate)([_mobx.observable], Screening.prototype, "screeningMultiple", void 0);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "record", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "value", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "needExpandButton", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "name", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "primitive", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "field", null);
(0, _tslib.__decorate)([_autobind["default"]], Screening.prototype, "handleChange", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "options", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "multiple", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "textField", null);
(0, _tslib.__decorate)([_mobx.computed], Screening.prototype, "valueField", null);
(0, _tslib.__decorate)([_mobx.action], Screening.prototype, "handleExpanedClick", void 0);
(0, _tslib.__decorate)([_mobx.action], Screening.prototype, "setValue", null);
(0, _tslib.__decorate)([_mobx.action], Screening.prototype, "prepareSetValue", null);
(0, _tslib.__decorate)([_mobx.action], Screening.prototype, "handleMultiple", void 0);
(0, _tslib.__decorate)([_mobx.action], Screening.prototype, "handleClear", void 0);
Screening = (0, _tslib.__decorate)([_mobxReact.observer], Screening);
var _default = Screening;
exports["default"] = _default;
//# sourceMappingURL=ScreeningItem.js.map
