cloud-b2b 1.1.61 → 1.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Area/Area.js +8 -11
- package/es/CodeInput/CodeInput.js +16 -19
- package/es/Enhance/Dialogs.js +11 -14
- package/es/Enhance/Loading.js +15 -18
- package/es/Header/Header.js +17 -20
- package/es/Header/Vertical.js +11 -14
- package/es/ImageView/ImageView.js +10 -13
- package/es/InpurCascader/InputCascader.js +11 -14
- package/es/InputEditor/InputEditor.js +16 -18
- package/es/InputSearch/InputSearch.js +19 -22
- package/es/InputSelect/InputSelect.js +14 -17
- package/es/InputTreeSelect/InputTreeSelect.js +10 -13
- package/es/InputWriting/InputWriting.js +12 -15
- package/es/Layout/Layout.js +14 -17
- package/es/Link/Link.js +7 -10
- package/es/NumberInput/NumberInput.js +13 -16
- package/es/Search/Search.js +52 -55
- package/es/Search2/Search.js +85 -88
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +11 -14
- package/es/Sidebar2/Sidebar.js +13 -16
- package/es/SuperForm/SuperForm.js +74 -79
- package/es/SuperForm2/SuperForm.js +95 -100
- package/es/SuperPagination/SuperPagination.js +8 -11
- package/es/SuperTab/SuperTab.js +12 -15
- package/es/SuperTab2/SuperTab2.js +13 -16
- package/es/SuperTable/DragSortRow.js +12 -15
- package/es/SuperTable/FilterDropDown.js +11 -14
- package/es/SuperTable/SuperTable.js +68 -71
- package/es/SuperTable2/SuperTable2.js +90 -88
- package/es/SuperTable2/SuperTableCell.js +27 -30
- package/es/SuperTable3/FilterDropDown.js +11 -14
- package/es/SuperTable3/SuperTable.js +58 -61
- package/es/SuperToolbar/SuperToolbar.js +11 -14
- package/es/SuperUpload/SuperUpload.js +107 -91
- package/es/Viewer/ImageViews.js +16 -19
- package/es/Viewer/Viewer.js +11 -14
- package/es/helper.js +18 -17
- package/lib/Area/Area.js +8 -11
- package/lib/CodeInput/CodeInput.js +16 -19
- package/lib/Enhance/Dialogs.js +11 -14
- package/lib/Enhance/Loading.js +15 -18
- package/lib/Header/Header.js +17 -20
- package/lib/Header/Vertical.js +11 -14
- package/lib/ImageView/ImageView.js +10 -13
- package/lib/InpurCascader/InputCascader.js +11 -14
- package/lib/InputEditor/InputEditor.js +16 -18
- package/lib/InputSearch/InputSearch.js +19 -22
- package/lib/InputSelect/InputSelect.js +14 -17
- package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
- package/lib/InputWriting/InputWriting.js +12 -15
- package/lib/Layout/Layout.js +14 -17
- package/lib/LayoutLink/LayoutLink.js +1 -2
- package/lib/Link/Link.js +7 -10
- package/lib/NumberInput/NumberInput.js +13 -16
- package/lib/Search/Search.js +53 -57
- package/lib/Search2/Search.js +86 -90
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +11 -14
- package/lib/Sidebar2/Sidebar.js +13 -16
- package/lib/SuperForm/SuperForm.js +75 -81
- package/lib/SuperForm2/SuperForm.js +96 -102
- package/lib/SuperPagination/SuperPagination.js +8 -11
- package/lib/SuperTab/SuperTab.js +12 -15
- package/lib/SuperTab2/SuperTab2.js +13 -16
- package/lib/SuperTable/DragSortRow.js +12 -15
- package/lib/SuperTable/FilterDropDown.js +11 -14
- package/lib/SuperTable/SuperTable.js +68 -71
- package/lib/SuperTable2/SuperTable2.js +91 -90
- package/lib/SuperTable2/SuperTableCell.js +27 -30
- package/lib/SuperTable3/FilterDropDown.js +11 -14
- package/lib/SuperTable3/SuperTable.js +58 -61
- package/lib/SuperToolbar/SuperToolbar.js +11 -14
- package/lib/SuperUpload/SuperUpload.js +96 -81
- package/lib/Viewer/ImageViews.js +16 -19
- package/lib/Viewer/Viewer.js +11 -14
- package/lib/helper.js +18 -17
- package/package.json +1 -1
|
@@ -9,15 +9,14 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
|
9
9
|
import _Cascader from "antd/es/cascader";
|
|
10
10
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
11
11
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
12
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
13
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
14
12
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
15
13
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
14
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
16
15
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
17
16
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
-
function
|
|
20
|
-
function _isNativeReflectConstruct() {
|
|
18
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
20
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
22
21
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
23
22
|
import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
|
|
@@ -45,21 +44,19 @@ var PROPS = {
|
|
|
45
44
|
};
|
|
46
45
|
var PROPS_KEYS = _Object$keys(PROPS);
|
|
47
46
|
var InputCascader = /*#__PURE__*/function (_React$Component) {
|
|
48
|
-
_inherits(InputCascader, _React$Component);
|
|
49
|
-
var _super = _createSuper(InputCascader);
|
|
50
47
|
function InputCascader(_props) {
|
|
51
48
|
var _this;
|
|
52
49
|
_classCallCheck(this, InputCascader);
|
|
53
|
-
_this =
|
|
54
|
-
_defineProperty(
|
|
50
|
+
_this = _callSuper(this, InputCascader, [_props]);
|
|
51
|
+
_defineProperty(_this, "onChange", function (value) {
|
|
55
52
|
var onChange = _this.props.onChange;
|
|
56
53
|
onChange && onChange(value);
|
|
57
54
|
});
|
|
58
|
-
_defineProperty(
|
|
55
|
+
_defineProperty(_this, "loadData", function (selectedOptions) {
|
|
59
56
|
var onSearch = _this.props.onSearch;
|
|
60
57
|
onSearch && onSearch(selectedOptions[0]);
|
|
61
58
|
});
|
|
62
|
-
_defineProperty(
|
|
59
|
+
_defineProperty(_this, "getOptions", function (options) {
|
|
63
60
|
return _mapInstanceProperty(options).call(options, function (option) {
|
|
64
61
|
var obj = _objectSpread(_objectSpread({}, option), {}, {
|
|
65
62
|
label: option.title
|
|
@@ -70,13 +67,13 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
|
|
|
70
67
|
return obj;
|
|
71
68
|
});
|
|
72
69
|
});
|
|
73
|
-
_defineProperty(
|
|
70
|
+
_defineProperty(_this, "showSearch", function (inputValue, path) {
|
|
74
71
|
return _someInstanceProperty(path).call(path, function (option) {
|
|
75
72
|
var _context;
|
|
76
73
|
return _indexOfInstanceProperty(_context = option.label.toLowerCase()).call(_context, inputValue.toLowerCase()) > -1;
|
|
77
74
|
});
|
|
78
75
|
});
|
|
79
|
-
_defineProperty(
|
|
76
|
+
_defineProperty(_this, "getProps", function () {
|
|
80
77
|
var _this$props = _this.props,
|
|
81
78
|
_this$props$options = _this$props.options,
|
|
82
79
|
options = _this$props$options === void 0 ? [] : _this$props$options,
|
|
@@ -105,13 +102,13 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
|
|
|
105
102
|
});
|
|
106
103
|
return _this;
|
|
107
104
|
}
|
|
108
|
-
|
|
105
|
+
_inherits(InputCascader, _React$Component);
|
|
106
|
+
return _createClass(InputCascader, [{
|
|
109
107
|
key: "render",
|
|
110
108
|
value: function render() {
|
|
111
109
|
return /*#__PURE__*/React.createElement(_Cascader, this.getProps());
|
|
112
110
|
}
|
|
113
111
|
}]);
|
|
114
|
-
return InputCascader;
|
|
115
112
|
}(React.Component);
|
|
116
113
|
_defineProperty(InputCascader, "propTypes", PROPS);
|
|
117
114
|
export default InputCascader;
|
|
@@ -2,13 +2,13 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
3
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
6
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
7
6
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
9
9
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
10
|
-
function
|
|
11
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import variables from '../variables';
|
|
14
14
|
import helper from "../helper";
|
|
@@ -47,13 +47,12 @@ var defaultMenus = ['head',
|
|
|
47
47
|
'video' // 插入视频
|
|
48
48
|
];
|
|
49
49
|
var InputEditor = /*#__PURE__*/function (_React$Component) {
|
|
50
|
-
_inherits(InputEditor, _React$Component);
|
|
51
|
-
var _super = _createSuper(InputEditor);
|
|
52
50
|
function InputEditor() {
|
|
53
51
|
_classCallCheck(this, InputEditor);
|
|
54
|
-
return
|
|
52
|
+
return _callSuper(this, InputEditor, arguments);
|
|
55
53
|
}
|
|
56
|
-
|
|
54
|
+
_inherits(InputEditor, _React$Component);
|
|
55
|
+
return _createClass(InputEditor, [{
|
|
57
56
|
key: "componentDidMount",
|
|
58
57
|
value: function componentDidMount() {
|
|
59
58
|
var _this$props = this.props,
|
|
@@ -91,38 +90,38 @@ var InputEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
91
90
|
// 自定义视频插入回调
|
|
92
91
|
this[inputKey].config.uploadVideoHooks = {
|
|
93
92
|
customInsert: function () {
|
|
94
|
-
var _customInsert = _asyncToGenerator(
|
|
93
|
+
var _customInsert = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(insertVideo, results) {
|
|
95
94
|
var _context, _context2, URL_DOWNLOAD, _yield$helper$fetchJs, returnCode, result, returnMsg, currentOrigin, videoUrl;
|
|
96
|
-
return _regeneratorRuntime.wrap(function
|
|
95
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
97
96
|
while (1) switch (_context3.prev = _context3.next) {
|
|
98
97
|
case 0:
|
|
99
98
|
console.log(results);
|
|
100
99
|
if (!(results.returnCode === 0 && results.result)) {
|
|
101
|
-
_context3.next =
|
|
100
|
+
_context3.next = 3;
|
|
102
101
|
break;
|
|
103
102
|
}
|
|
104
103
|
URL_DOWNLOAD = '/api/standard/download'; // 点击下载
|
|
105
|
-
_context3.next =
|
|
104
|
+
_context3.next = 1;
|
|
106
105
|
return helper.fetchJson(_concatInstanceProperty(_context = "".concat(URL_DOWNLOAD, "/")).call(_context, results.result));
|
|
107
|
-
case
|
|
106
|
+
case 1:
|
|
108
107
|
_yield$helper$fetchJs = _context3.sent;
|
|
109
108
|
returnCode = _yield$helper$fetchJs.returnCode;
|
|
110
109
|
result = _yield$helper$fetchJs.result;
|
|
111
110
|
returnMsg = _yield$helper$fetchJs.returnMsg;
|
|
112
111
|
if (!(returnCode !== 0)) {
|
|
113
|
-
_context3.next =
|
|
112
|
+
_context3.next = 2;
|
|
114
113
|
break;
|
|
115
114
|
}
|
|
116
115
|
return _context3.abrupt("return", helper.showError(returnMsg));
|
|
117
|
-
case
|
|
116
|
+
case 2:
|
|
118
117
|
currentOrigin = window.location.origin; // 获取当前页面的协议+域名+端口
|
|
119
118
|
videoUrl = _concatInstanceProperty(_context2 = "".concat(currentOrigin, "/api/proxy/base-server-service/file/url/documents/open/")).call(_context2, results.result);
|
|
120
119
|
insertVideo(videoUrl);
|
|
121
|
-
_context3.next =
|
|
120
|
+
_context3.next = 4;
|
|
122
121
|
break;
|
|
123
|
-
case
|
|
122
|
+
case 3:
|
|
124
123
|
alert('视频上传失败: ' + (results.message || '未知错误'));
|
|
125
|
-
case
|
|
124
|
+
case 4:
|
|
126
125
|
case "end":
|
|
127
126
|
return _context3.stop();
|
|
128
127
|
}
|
|
@@ -168,6 +167,5 @@ var InputEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
168
167
|
}));
|
|
169
168
|
}
|
|
170
169
|
}]);
|
|
171
|
-
return InputEditor;
|
|
172
170
|
}(React.Component);
|
|
173
171
|
export default InputEditor;
|
|
@@ -3,15 +3,14 @@ import _Input from "antd/es/input";
|
|
|
3
3
|
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
4
4
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
6
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
7
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
8
6
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
9
7
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
8
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
10
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
11
10
|
import _Icon from "antd/es/icon";
|
|
12
11
|
import _AutoComplete from "antd/es/auto-complete";
|
|
13
|
-
function
|
|
14
|
-
function _isNativeReflectConstruct() {
|
|
12
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
14
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
16
15
|
import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
|
|
17
16
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
@@ -67,13 +66,11 @@ var PROPS = {
|
|
|
67
66
|
};
|
|
68
67
|
var PROPS_KEYS = _Object$keys(PROPS);
|
|
69
68
|
var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
70
|
-
_inherits(InputSearch, _React$Component);
|
|
71
|
-
var _super = _createSuper(InputSearch);
|
|
72
69
|
function InputSearch(_props) {
|
|
73
70
|
var _this;
|
|
74
71
|
_classCallCheck(this, InputSearch);
|
|
75
|
-
_this =
|
|
76
|
-
_defineProperty(
|
|
72
|
+
_this = _callSuper(this, InputSearch, [_props]);
|
|
73
|
+
_defineProperty(_this, "onSearch", function (value) {
|
|
77
74
|
_this.setState({
|
|
78
75
|
value: value
|
|
79
76
|
});
|
|
@@ -82,7 +79,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
82
79
|
noSearchWhenTypo = _this$props.noSearchWhenTypo;
|
|
83
80
|
!noSearchWhenTypo && onSearch && onSearch(value);
|
|
84
81
|
});
|
|
85
|
-
_defineProperty(
|
|
82
|
+
_defineProperty(_this, "onBlur", function () {
|
|
86
83
|
var _this$props2 = _this.props,
|
|
87
84
|
_this$props2$autoAdd = _this$props2.autoAdd,
|
|
88
85
|
autoAdd = _this$props2$autoAdd === void 0 ? false : _this$props2$autoAdd,
|
|
@@ -118,7 +115,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
118
115
|
onBlur && onBlur(_this.props.value);
|
|
119
116
|
}
|
|
120
117
|
});
|
|
121
|
-
_defineProperty(
|
|
118
|
+
_defineProperty(_this, "onSelect", function (value) {
|
|
122
119
|
var _this$props3 = _this.props,
|
|
123
120
|
onChange = _this$props3.onChange,
|
|
124
121
|
_this$props3$options = _this$props3.options,
|
|
@@ -133,7 +130,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
133
130
|
onChange && onChange(options[index]);
|
|
134
131
|
}
|
|
135
132
|
});
|
|
136
|
-
_defineProperty(
|
|
133
|
+
_defineProperty(_this, "onClick", function (e) {
|
|
137
134
|
var _this$props4 = _this.props,
|
|
138
135
|
_this$props4$options = _this$props4.options,
|
|
139
136
|
options = _this$props4$options === void 0 ? [] : _this$props4$options,
|
|
@@ -144,19 +141,19 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
144
141
|
onSearch(e.target.value);
|
|
145
142
|
}
|
|
146
143
|
});
|
|
147
|
-
_defineProperty(
|
|
144
|
+
_defineProperty(_this, "makeValueValid", function (value) {
|
|
148
145
|
var _context;
|
|
149
146
|
return _includesInstanceProperty(_context = [NaN, undefined, null]).call(_context, value) ? '' : value;
|
|
150
147
|
});
|
|
151
|
-
_defineProperty(
|
|
148
|
+
_defineProperty(_this, "getValue", function () {
|
|
152
149
|
var value = _this.state.value;
|
|
153
150
|
return String(_this.makeValueValid(_typeof(value) === 'object' ? value.value : value));
|
|
154
151
|
});
|
|
155
|
-
_defineProperty(
|
|
152
|
+
_defineProperty(_this, "isMatch", function (inputValue, option) {
|
|
156
153
|
var _context2;
|
|
157
154
|
return option.props.children && _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
|
|
158
155
|
});
|
|
159
|
-
_defineProperty(
|
|
156
|
+
_defineProperty(_this, "isMatchRemark", function (inputValue, option) {
|
|
160
157
|
var _option$props = option.props,
|
|
161
158
|
_option$props$text = _option$props.text,
|
|
162
159
|
text = _option$props$text === void 0 ? '' : _option$props$text,
|
|
@@ -164,12 +161,12 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
164
161
|
remark = _option$props$remark === void 0 ? '' : _option$props$remark;
|
|
165
162
|
return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
|
|
166
163
|
});
|
|
167
|
-
_defineProperty(
|
|
164
|
+
_defineProperty(_this, "isValidValue", function (value) {
|
|
168
165
|
var _context3;
|
|
169
166
|
// value必须为对象,且有属性value的值不等''或undefined
|
|
170
167
|
return value && !_includesInstanceProperty(_context3 = ['', undefined]).call(_context3, value.value);
|
|
171
168
|
});
|
|
172
|
-
_defineProperty(
|
|
169
|
+
_defineProperty(_this, "getOptions", function () {
|
|
173
170
|
var value = _this.state.value;
|
|
174
171
|
var options = _this.props.options;
|
|
175
172
|
if (options && options.length) {
|
|
@@ -186,7 +183,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
186
183
|
return [];
|
|
187
184
|
}
|
|
188
185
|
});
|
|
189
|
-
_defineProperty(
|
|
186
|
+
_defineProperty(_this, "getDataSource", function () {
|
|
190
187
|
var _context4;
|
|
191
188
|
return _mapInstanceProperty(_context4 = _this.getOptions()).call(_context4, function (option) {
|
|
192
189
|
return {
|
|
@@ -195,7 +192,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
195
192
|
};
|
|
196
193
|
});
|
|
197
194
|
});
|
|
198
|
-
_defineProperty(
|
|
195
|
+
_defineProperty(_this, "getDataSourceRemark", function () {
|
|
199
196
|
var _context5;
|
|
200
197
|
return _mapInstanceProperty(_context5 = _this.getOptions()).call(_context5, function (option, index) {
|
|
201
198
|
return /*#__PURE__*/React.createElement(SelectOption, {
|
|
@@ -210,7 +207,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
210
207
|
}, option.description || ''));
|
|
211
208
|
});
|
|
212
209
|
});
|
|
213
|
-
_defineProperty(
|
|
210
|
+
_defineProperty(_this, "getProps", function () {
|
|
214
211
|
var _this$props5 = _this.props,
|
|
215
212
|
inputRef = _this$props5.inputRef,
|
|
216
213
|
_this$props5$filter = _filterInstanceProperty(_this$props5),
|
|
@@ -241,7 +238,8 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
241
238
|
};
|
|
242
239
|
return _this;
|
|
243
240
|
}
|
|
244
|
-
|
|
241
|
+
_inherits(InputSearch, _React$Component);
|
|
242
|
+
return _createClass(InputSearch, [{
|
|
245
243
|
key: "componentWillReceiveProps",
|
|
246
244
|
value: function componentWillReceiveProps(props) {
|
|
247
245
|
if (props.value !== this.props.value) {
|
|
@@ -260,7 +258,6 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
260
258
|
})));
|
|
261
259
|
}
|
|
262
260
|
}]);
|
|
263
|
-
return InputSearch;
|
|
264
261
|
}(React.Component);
|
|
265
262
|
_defineProperty(InputSearch, "propTypes", PROPS);
|
|
266
263
|
export default InputSearch;
|
|
@@ -9,10 +9,9 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
|
9
9
|
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
10
10
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
11
11
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
12
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
13
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
14
12
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
15
13
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
14
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
16
15
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
17
16
|
import _Select from "antd/es/select";
|
|
18
17
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -24,8 +23,8 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
|
24
23
|
import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
|
|
25
24
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
26
25
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
27
|
-
function
|
|
28
|
-
function _isNativeReflectConstruct() {
|
|
26
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
27
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
28
|
import React from 'react';
|
|
30
29
|
var SelectOption = _Select.Option;
|
|
31
30
|
var OPTION_STYLE = {
|
|
@@ -36,8 +35,6 @@ var OPTION_STYLE = {
|
|
|
36
35
|
whiteSpace: 'pre-wrap'
|
|
37
36
|
};
|
|
38
37
|
var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(InputSelect, _React$Component);
|
|
40
|
-
var _super = _createSuper(InputSelect);
|
|
41
38
|
function InputSelect() {
|
|
42
39
|
var _context;
|
|
43
40
|
var _this;
|
|
@@ -45,8 +42,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
45
42
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46
43
|
args[_key] = arguments[_key];
|
|
47
44
|
}
|
|
48
|
-
_this =
|
|
49
|
-
_defineProperty(
|
|
45
|
+
_this = _callSuper(this, InputSelect, _concatInstanceProperty(_context = []).call(_context, args));
|
|
46
|
+
_defineProperty(_this, "onClick", function (e) {
|
|
50
47
|
var _this$props = _this.props,
|
|
51
48
|
_this$props$options = _this$props.options,
|
|
52
49
|
options = _this$props$options === void 0 ? [] : _this$props$options,
|
|
@@ -60,21 +57,21 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
60
57
|
onSearch(e.target.value);
|
|
61
58
|
}
|
|
62
59
|
});
|
|
63
|
-
_defineProperty(
|
|
60
|
+
_defineProperty(_this, "onSearch", function (value) {
|
|
64
61
|
var onSearch = _this.props.onSearch;
|
|
65
62
|
onSearch && onSearch(value);
|
|
66
63
|
});
|
|
67
|
-
_defineProperty(
|
|
64
|
+
_defineProperty(_this, "isMatch", function (inputValue, option) {
|
|
68
65
|
var _context2;
|
|
69
66
|
return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
|
|
70
67
|
});
|
|
71
|
-
_defineProperty(
|
|
68
|
+
_defineProperty(_this, "isMatchRemark", function (inputValue, option) {
|
|
72
69
|
var _option$props = option.props,
|
|
73
70
|
text = _option$props.text,
|
|
74
71
|
remark = _option$props.remark;
|
|
75
72
|
return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
|
|
76
73
|
});
|
|
77
|
-
_defineProperty(
|
|
74
|
+
_defineProperty(_this, "toRemarkOption", function (option, index) {
|
|
78
75
|
return /*#__PURE__*/React.createElement(SelectOption, {
|
|
79
76
|
key: index,
|
|
80
77
|
value: String(option.value),
|
|
@@ -85,14 +82,14 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
85
82
|
style: OPTION_STYLE
|
|
86
83
|
}, option.remark || ''));
|
|
87
84
|
});
|
|
88
|
-
_defineProperty(
|
|
85
|
+
_defineProperty(_this, "toOption", function (option, index) {
|
|
89
86
|
return /*#__PURE__*/React.createElement(SelectOption, {
|
|
90
87
|
key: index,
|
|
91
88
|
value: String(option.value),
|
|
92
89
|
disabled: option.disabled || false
|
|
93
90
|
}, option.title);
|
|
94
91
|
});
|
|
95
|
-
_defineProperty(
|
|
92
|
+
_defineProperty(_this, "onChange", function (options, keyValue) {
|
|
96
93
|
var onChange = _this.props.onChange;
|
|
97
94
|
var objValue = keyValue.length > 0 ? _mapInstanceProperty(keyValue).call(keyValue, function (item) {
|
|
98
95
|
return _objectSpread(_objectSpread({}, _filterInstanceProperty(options).call(options, function (o) {
|
|
@@ -104,7 +101,7 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
104
101
|
}) : [];
|
|
105
102
|
onChange && onChange(objValue);
|
|
106
103
|
});
|
|
107
|
-
_defineProperty(
|
|
104
|
+
_defineProperty(_this, "getValue", function () {
|
|
108
105
|
var value = _this.props.value;
|
|
109
106
|
if (_typeof(value) === 'object' && _Array$isArray(value)) {
|
|
110
107
|
return _mapInstanceProperty(value).call(value, function (item) {
|
|
@@ -119,7 +116,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
119
116
|
});
|
|
120
117
|
return _this;
|
|
121
118
|
}
|
|
122
|
-
|
|
119
|
+
_inherits(InputSelect, _React$Component);
|
|
120
|
+
return _createClass(InputSelect, [{
|
|
123
121
|
key: "render",
|
|
124
122
|
value: function render() {
|
|
125
123
|
var _context3, _context4;
|
|
@@ -155,6 +153,5 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
155
153
|
}, /*#__PURE__*/React.createElement(_Select, props, this.props.remark ? _mapInstanceProperty(allOptions).call(allOptions, this.toRemarkOption) : _mapInstanceProperty(allOptions).call(allOptions, this.toOption)));
|
|
156
154
|
}
|
|
157
155
|
}]);
|
|
158
|
-
return InputSelect;
|
|
159
156
|
}(React.Component);
|
|
160
157
|
export default InputSelect;
|
|
@@ -9,15 +9,14 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
|
9
9
|
import _TreeSelect from "antd/es/tree-select";
|
|
10
10
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
11
11
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
12
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
13
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
14
12
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
15
13
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
14
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
16
15
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
17
16
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
-
function
|
|
20
|
-
function _isNativeReflectConstruct() {
|
|
18
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
20
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
22
21
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
23
22
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
@@ -48,21 +47,19 @@ var PROPS = {
|
|
|
48
47
|
};
|
|
49
48
|
var PROPS_KEYS = _Object$keys(PROPS);
|
|
50
49
|
var InputTreeSelect = /*#__PURE__*/function (_React$Component) {
|
|
51
|
-
_inherits(InputTreeSelect, _React$Component);
|
|
52
|
-
var _super = _createSuper(InputTreeSelect);
|
|
53
50
|
function InputTreeSelect(_props) {
|
|
54
51
|
var _this;
|
|
55
52
|
_classCallCheck(this, InputTreeSelect);
|
|
56
|
-
_this =
|
|
57
|
-
_defineProperty(
|
|
53
|
+
_this = _callSuper(this, InputTreeSelect, [_props]);
|
|
54
|
+
_defineProperty(_this, "onChange", function (value) {
|
|
58
55
|
var onChange = _this.props.onChange;
|
|
59
56
|
onChange && onChange(value);
|
|
60
57
|
});
|
|
61
|
-
_defineProperty(
|
|
58
|
+
_defineProperty(_this, "loadData", function (selectedOptions) {
|
|
62
59
|
var onSearch = _this.props.onSearch;
|
|
63
60
|
onSearch && onSearch(selectedOptions[0]);
|
|
64
61
|
});
|
|
65
|
-
_defineProperty(
|
|
62
|
+
_defineProperty(_this, "getOptions", function (options) {
|
|
66
63
|
return _mapInstanceProperty(options).call(options, function (option) {
|
|
67
64
|
var obj = _objectSpread(_objectSpread({}, option), {}, {
|
|
68
65
|
label: option.title
|
|
@@ -73,7 +70,7 @@ var InputTreeSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
73
70
|
return obj;
|
|
74
71
|
});
|
|
75
72
|
});
|
|
76
|
-
_defineProperty(
|
|
73
|
+
_defineProperty(_this, "getProps", function () {
|
|
77
74
|
var _this$props = _this.props,
|
|
78
75
|
_this$props$options = _this$props.options,
|
|
79
76
|
options = _this$props$options === void 0 ? [] : _this$props$options,
|
|
@@ -109,13 +106,13 @@ var InputTreeSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
109
106
|
});
|
|
110
107
|
return _this;
|
|
111
108
|
}
|
|
112
|
-
|
|
109
|
+
_inherits(InputTreeSelect, _React$Component);
|
|
110
|
+
return _createClass(InputTreeSelect, [{
|
|
113
111
|
key: "render",
|
|
114
112
|
value: function render() {
|
|
115
113
|
return /*#__PURE__*/React.createElement(_TreeSelect, this.getProps());
|
|
116
114
|
}
|
|
117
115
|
}]);
|
|
118
|
-
return InputTreeSelect;
|
|
119
116
|
}(React.Component);
|
|
120
117
|
_defineProperty(InputTreeSelect, "propTypes", PROPS);
|
|
121
118
|
export default InputTreeSelect;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
2
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
9
8
|
import _Select from "antd/es/select";
|
|
10
9
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
10
|
import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
|
|
12
|
-
function
|
|
13
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
13
|
import React from 'react';
|
|
15
14
|
var Option = _Select.Option;
|
|
16
15
|
var InputWriting = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(InputWriting, _React$Component);
|
|
18
|
-
var _super = _createSuper(InputWriting);
|
|
19
16
|
function InputWriting() {
|
|
20
17
|
var _context;
|
|
21
18
|
var _this;
|
|
@@ -23,13 +20,13 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
|
|
|
23
20
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
21
|
args[_key] = arguments[_key];
|
|
25
22
|
}
|
|
26
|
-
_this =
|
|
27
|
-
_defineProperty(
|
|
23
|
+
_this = _callSuper(this, InputWriting, _concatInstanceProperty(_context = []).call(_context, args));
|
|
24
|
+
_defineProperty(_this, "state", {
|
|
28
25
|
options: [],
|
|
29
26
|
value: [],
|
|
30
27
|
fetching: false
|
|
31
28
|
});
|
|
32
|
-
_defineProperty(
|
|
29
|
+
_defineProperty(_this, "onClick", function (e) {
|
|
33
30
|
var _this$props = _this.props,
|
|
34
31
|
_this$props$options = _this$props.options,
|
|
35
32
|
options = _this$props$options === void 0 ? [] : _this$props$options,
|
|
@@ -39,21 +36,21 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
|
|
|
39
36
|
onSearch(e.target.value);
|
|
40
37
|
}
|
|
41
38
|
});
|
|
42
|
-
_defineProperty(
|
|
39
|
+
_defineProperty(_this, "onSearch", function (value) {
|
|
43
40
|
var onSearch = _this.props.onSearch;
|
|
44
41
|
onSearch && onSearch(value);
|
|
45
42
|
});
|
|
46
|
-
_defineProperty(
|
|
43
|
+
_defineProperty(_this, "isMatch", function (inputValue, option) {
|
|
47
44
|
var _context2;
|
|
48
45
|
return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
|
|
49
46
|
});
|
|
50
|
-
_defineProperty(
|
|
47
|
+
_defineProperty(_this, "toOption", function (option, index) {
|
|
51
48
|
return /*#__PURE__*/React.createElement(SelectOption, {
|
|
52
49
|
key: index,
|
|
53
50
|
value: String(option.value)
|
|
54
51
|
}, option.title);
|
|
55
52
|
});
|
|
56
|
-
_defineProperty(
|
|
53
|
+
_defineProperty(_this, "onChange", function (keyValue) {
|
|
57
54
|
var _this$props2 = _this.props,
|
|
58
55
|
onChange = _this$props2.onChange,
|
|
59
56
|
value = _this$props2.value;
|
|
@@ -61,7 +58,8 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
|
|
|
61
58
|
});
|
|
62
59
|
return _this;
|
|
63
60
|
}
|
|
64
|
-
|
|
61
|
+
_inherits(InputWriting, _React$Component);
|
|
62
|
+
return _createClass(InputWriting, [{
|
|
65
63
|
key: "render",
|
|
66
64
|
value: function render() {
|
|
67
65
|
var value = this.props.value;
|
|
@@ -80,6 +78,5 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
|
|
|
80
78
|
}, /*#__PURE__*/React.createElement(_Select, props));
|
|
81
79
|
}
|
|
82
80
|
}]);
|
|
83
|
-
return InputWriting;
|
|
84
81
|
}(React.Component);
|
|
85
82
|
export default InputWriting;
|