choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
146 lines (126 loc) • 3.44 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _tslib = require("tslib");
var _mobx = require("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;
(0, _classCallCheck2["default"])(this, Transport);
(0, _mobx.runInAction)(function () {
_this.props = props;
_this.dataSet = dataSet;
});
}
(0, _createClass2["default"])(Transport, [{
key: "create",
get: function get() {
return this.props.create;
},
set: function set(create) {
var _this2 = this;
(0, _mobx.runInAction)(function () {
_this2.props.create = create;
});
}
}, {
key: "read",
get: function get() {
return this.props.read || this.dataSet.queryUrl;
},
set: function set(read) {
var _this3 = this;
(0, _mobx.runInAction)(function () {
_this3.props.read = read;
});
}
}, {
key: "update",
get: function get() {
return this.props.update;
},
set: function set(update) {
var _this4 = this;
(0, _mobx.runInAction)(function () {
_this4.props.update = update;
});
}
}, {
key: "destroy",
get: function get() {
return this.props.destroy;
},
set: function set(destroy) {
var _this5 = this;
(0, _mobx.runInAction)(function () {
_this5.props.destroy = destroy;
});
}
}, {
key: "validate",
get: function get() {
return this.props.validate || this.dataSet.validateUrl;
},
set: function set(validate) {
var _this6 = this;
(0, _mobx.runInAction)(function () {
_this6.props.validate = validate;
});
}
}, {
key: "submit",
get: function get() {
return this.props.submit || this.dataSet.submitUrl;
},
set: function set(submit) {
var _this7 = this;
(0, _mobx.runInAction)(function () {
_this7.props.submit = submit;
});
}
}, {
key: "exports",
get: function get() {
return this.props.exports || this.dataSet.exportUrl;
},
set: function set(exports) {
var _this8 = this;
(0, _mobx.runInAction)(function () {
_this8.props.exports = exports;
});
}
}, {
key: "tls",
get: function get() {
return this.props.tls || this.dataSet.tlsUrl;
},
set: function set(tls) {
var _this9 = this;
(0, _mobx.runInAction)(function () {
_this9.props.tls = tls;
});
}
}, {
key: "adapter",
get: function get() {
return this.props.adapter;
},
set: function set(adapter) {
var _this10 = this;
(0, _mobx.runInAction)(function () {
_this10.props.adapter = adapter;
});
}
}]);
return Transport;
}();
exports["default"] = Transport;
(0, _tslib.__decorate)([_mobx.observable], Transport.prototype, "props", void 0);
//# sourceMappingURL=Transport.js.map
;