UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

158 lines (131 loc) 3.61 kB
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import { __decorate } from "tslib"; import { computed, observable, runInAction } from 'mobx'; var Transport = /*#__PURE__*/ function () { function Transport() { var _this = this; var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var dataSet = arguments.length > 1 ? arguments[1] : undefined; _classCallCheck(this, Transport); runInAction(function () { _this.props = props; _this.dataSet = dataSet; }); } _createClass(Transport, [{ key: "create", set: function set(create) { var _this2 = this; runInAction(function () { _this2.props.create = create; }); }, get: function get() { return this.props.create; } }, { key: "read", set: function set(read) { var _this3 = this; runInAction(function () { _this3.props.read = read; }); }, get: function get() { return this.props.read || this.dataSet.queryUrl; } }, { key: "update", set: function set(update) { var _this4 = this; runInAction(function () { _this4.props.update = update; }); }, get: function get() { return this.props.update; } }, { key: "destroy", set: function set(destroy) { var _this5 = this; runInAction(function () { _this5.props.destroy = destroy; }); }, get: function get() { return this.props.destroy; } }, { key: "validate", set: function set(validate) { var _this6 = this; runInAction(function () { _this6.props.validate = validate; }); }, get: function get() { return this.props.validate || this.dataSet.validateUrl; } }, { key: "submit", set: function set(submit) { var _this7 = this; runInAction(function () { _this7.props.submit = submit; }); }, get: function get() { return this.props.submit || this.dataSet.submitUrl; } }, { key: "exports", set: function set(exports) { var _this8 = this; runInAction(function () { _this8.props.exports = exports; }); }, get: function get() { return this.props.exports || this.dataSet.exportUrl; } }, { key: "tls", set: function set(tls) { var _this9 = this; runInAction(function () { _this9.props.tls = tls; }); }, get: function get() { return this.props.tls || this.dataSet.tlsUrl; } }, { key: "adapter", set: function set(adapter) { var _this10 = this; runInAction(function () { _this10.props.adapter = adapter; }); }, get: function get() { return this.props.adapter; } }]); return Transport; }(); export { Transport as default }; __decorate([observable], Transport.prototype, "props", void 0); __decorate([computed], Transport.prototype, "create", null); __decorate([computed], Transport.prototype, "read", null); __decorate([computed], Transport.prototype, "update", null); __decorate([computed], Transport.prototype, "destroy", null); __decorate([computed], Transport.prototype, "validate", null); __decorate([computed], Transport.prototype, "submit", null); __decorate([computed], Transport.prototype, "exports", null); __decorate([computed], Transport.prototype, "tls", null); __decorate([computed], Transport.prototype, "adapter", null); //# sourceMappingURL=Transport.js.map