cloud-b2b 1.1.27 → 1.1.28
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 +16 -45
- package/es/Card/Card.js +3 -4
- package/es/CodeInput/CodeInput.js +30 -59
- package/es/Control/Control.js +47 -94
- package/es/Control/event.js +0 -14
- package/es/Enhance/Dialogs.js +0 -15
- package/es/Enhance/Loading.js +16 -36
- package/es/Enhance/index.js +0 -2
- package/es/Header/Header.js +3 -35
- package/es/Header/Vertical.js +1 -24
- package/es/ImageView/ImageView.js +5 -22
- package/es/Indent/Indent.js +3 -7
- package/es/InpurCascader/InputCascader.js +10 -36
- package/es/InputEditor/InputEditor.js +55 -55
- package/es/InputSearch/InputSearch.js +26 -71
- package/es/InputSelect/InputSelect.js +17 -48
- package/es/InputWriting/InputWriting.js +6 -28
- package/es/Layout/Layout.js +28 -59
- package/es/LayoutLink/LayoutLink.js +11 -20
- package/es/Link/Link.js +4 -27
- package/es/Loading/Loading.js +1 -3
- package/es/Loading2/Loading2.js +0 -2
- package/es/ModalWithDrag/ModalWithDrag.js +3 -8
- package/es/ModalWithDrag/drag.js +12 -29
- package/es/NumberInput/NumberInput.js +24 -63
- package/es/Search/Search.js +53 -149
- package/es/Sidebar/Sidebar.js +13 -34
- package/es/Sidebar2/Sidebar.js +3 -30
- package/es/SuperForm/SuperForm.js +27 -150
- package/es/SuperForm2/SuperForm.js +31 -165
- package/es/SuperIcon/SuperIcon.js +3 -6
- package/es/SuperPagination/SuperPagination.js +15 -32
- package/es/SuperTab/SuperTab.js +4 -27
- package/es/SuperTab2/SuperTab2.js +11 -33
- package/es/SuperTable/DragSortRow.js +6 -34
- package/es/SuperTable/FilterDropDown.js +10 -34
- package/es/SuperTable/SuperTable.js +91 -216
- package/es/SuperTable/fixed.js +1 -9
- package/es/SuperTable2/SuperTable2.js +95 -206
- package/es/SuperTable2/SuperTableCell.js +16 -55
- package/es/SuperTable3/FilterDropDown.js +10 -34
- package/es/SuperTable3/SuperTable.js +57 -175
- package/es/SuperTable3/fixed.js +1 -9
- package/es/SuperToolbar/SuperToolbar.js +21 -49
- package/es/SuperUpload/SuperUpload.js +73 -110
- package/es/Title/Title.js +12 -15
- package/es/Viewer/ImageViews.js +7 -60
- package/es/Viewer/Viewer.js +7 -34
- package/es/WingBlank/WingBlank.js +2 -6
- package/es/helper.js +7 -27
- package/es/history.js +3 -2
- package/lib/Area/Area.js +16 -64
- package/lib/Card/Card.js +3 -13
- package/lib/CodeInput/CodeInput.js +30 -77
- package/lib/Control/Control.js +47 -135
- package/lib/Control/event.js +0 -16
- package/lib/Enhance/Dialogs.js +0 -26
- package/lib/Enhance/Loading.js +16 -52
- package/lib/Enhance/index.js +0 -9
- package/lib/Header/Header.js +3 -48
- package/lib/Header/Vertical.js +1 -36
- package/lib/ImageView/ImageView.js +5 -30
- package/lib/Indent/Indent.js +3 -13
- package/lib/InpurCascader/InputCascader.js +11 -50
- package/lib/InputEditor/InputEditor.js +55 -64
- package/lib/InputSearch/InputSearch.js +26 -78
- package/lib/InputSelect/InputSelect.js +17 -62
- package/lib/InputWriting/InputWriting.js +6 -35
- package/lib/Layout/Layout.js +28 -76
- package/lib/LayoutLink/LayoutLink.js +11 -38
- package/lib/Link/Link.js +4 -40
- package/lib/Loading/Loading.js +1 -9
- package/lib/Loading2/Loading2.js +0 -8
- package/lib/ModalWithDrag/ModalWithDrag.js +3 -18
- package/lib/ModalWithDrag/drag.js +12 -34
- package/lib/NumberInput/NumberInput.js +24 -76
- package/lib/Search/Search.js +53 -157
- package/lib/Sidebar/Sidebar.js +13 -46
- package/lib/Sidebar2/Sidebar.js +3 -42
- package/lib/SuperForm/SuperForm.js +27 -149
- package/lib/SuperForm2/SuperForm.js +31 -160
- package/lib/SuperIcon/SuperIcon.js +3 -14
- package/lib/SuperPagination/SuperPagination.js +15 -42
- package/lib/SuperTab/SuperTab.js +4 -34
- package/lib/SuperTab2/SuperTab2.js +11 -48
- package/lib/SuperTable/DragSortRow.js +6 -42
- package/lib/SuperTable/FilterDropDown.js +10 -42
- package/lib/SuperTable/SuperTable.js +90 -210
- package/lib/SuperTable/fixed.js +1 -13
- package/lib/SuperTable2/SuperTable2.js +95 -222
- package/lib/SuperTable2/SuperTableCell.js +13 -62
- package/lib/SuperTable3/FilterDropDown.js +10 -42
- package/lib/SuperTable3/SuperTable.js +56 -169
- package/lib/SuperTable3/fixed.js +1 -13
- package/lib/SuperToolbar/SuperToolbar.js +20 -64
- package/lib/SuperUpload/SuperUpload.js +73 -140
- package/lib/Title/Title.js +12 -24
- package/lib/Viewer/ImageViews.js +7 -63
- package/lib/Viewer/Viewer.js +7 -43
- package/lib/WingBlank/WingBlank.js +2 -14
- package/lib/helper.js +6 -44
- package/lib/history.js +0 -5
- package/lib/index.js +0 -76
- package/lib/variables.js +0 -4
- package/package.json +1 -1
package/es/Header/Header.js
CHANGED
|
@@ -17,15 +17,10 @@ import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleC
|
|
|
17
17
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
18
18
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
19
19
|
import _Menu from "antd/es/menu";
|
|
20
|
-
|
|
21
20
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
-
|
|
23
21
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
|
-
|
|
25
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26
|
-
|
|
27
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
28
|
-
|
|
29
24
|
import React from 'react';
|
|
30
25
|
import Link from '../Link';
|
|
31
26
|
import SuperIcon from '../SuperIcon';
|
|
@@ -33,32 +28,23 @@ import helper from '../helper';
|
|
|
33
28
|
import Vertical from './Vertical';
|
|
34
29
|
import variables from '../variables';
|
|
35
30
|
var MenuItem = _Menu.Item;
|
|
36
|
-
|
|
37
31
|
var Header = /*#__PURE__*/function (_React$Component) {
|
|
38
32
|
_inherits(Header, _React$Component);
|
|
39
|
-
|
|
40
33
|
var _super = _createSuper(Header);
|
|
41
|
-
|
|
42
34
|
function Header(_props) {
|
|
43
35
|
var _this;
|
|
44
|
-
|
|
45
36
|
_classCallCheck(this, Header);
|
|
46
|
-
|
|
47
37
|
_this = _super.call(this, _props);
|
|
48
|
-
|
|
49
38
|
_defineProperty(_assertThisInitialized(_this), "toLogo", function () {
|
|
50
39
|
var img = _this.props.logoImg || '/logo.png';
|
|
51
|
-
|
|
52
40
|
var props = _this.getLinkProps('home', _this.state['main'] || _this.props.homeUrl || '/', {
|
|
53
41
|
role: 'logo'
|
|
54
42
|
});
|
|
55
|
-
|
|
56
43
|
return /*#__PURE__*/React.createElement(Link, props, /*#__PURE__*/React.createElement("img", {
|
|
57
44
|
src: img,
|
|
58
45
|
alt: "logo"
|
|
59
46
|
}));
|
|
60
47
|
});
|
|
61
|
-
|
|
62
48
|
_defineProperty(_assertThisInitialized(_this), "toIcon", function (type) {
|
|
63
49
|
var style = {
|
|
64
50
|
fontSize: 18,
|
|
@@ -69,7 +55,6 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
69
55
|
style: style
|
|
70
56
|
});
|
|
71
57
|
});
|
|
72
|
-
|
|
73
58
|
_defineProperty(_assertThisInitialized(_this), "getLinkProps", function (key, url) {
|
|
74
59
|
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
75
60
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -78,23 +63,18 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
78
63
|
'data-active': _this.props.selectKey === key ? 'true' : null
|
|
79
64
|
});
|
|
80
65
|
});
|
|
81
|
-
|
|
82
66
|
_defineProperty(_assertThisInitialized(_this), "toSetting", function (settingUrl) {
|
|
83
67
|
if (settingUrl) {
|
|
84
68
|
var props = _this.getLinkProps('setting', _this.state['setting'] || settingUrl);
|
|
85
|
-
|
|
86
69
|
return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('pld-setting'));
|
|
87
70
|
} else {
|
|
88
71
|
return null;
|
|
89
72
|
}
|
|
90
73
|
});
|
|
91
|
-
|
|
92
74
|
_defineProperty(_assertThisInitialized(_this), "toMessage", function (messageUrl) {
|
|
93
75
|
var count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
94
|
-
|
|
95
76
|
if (messageUrl) {
|
|
96
77
|
var props = _this.getLinkProps('message', _this.state['message'] || messageUrl);
|
|
97
|
-
|
|
98
78
|
var msgProps = {
|
|
99
79
|
overflowCount: 99,
|
|
100
80
|
title: "\u60A8\u6709".concat(count, "\u6761\u672A\u8BFB\u6D88\u606F"),
|
|
@@ -107,13 +87,11 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
107
87
|
return null;
|
|
108
88
|
}
|
|
109
89
|
});
|
|
110
|
-
|
|
111
90
|
_defineProperty(_assertThisInitialized(_this), "onMenuItemClick", function (_ref) {
|
|
112
91
|
var key = _ref.key;
|
|
113
92
|
var onMenuClick = _this.props.onMenuClick;
|
|
114
93
|
onMenuClick && onMenuClick(key);
|
|
115
94
|
});
|
|
116
|
-
|
|
117
95
|
_defineProperty(_assertThisInitialized(_this), "menu", function (hasImport) {
|
|
118
96
|
return /*#__PURE__*/React.createElement(_Menu, {
|
|
119
97
|
className: variables('Header').menu,
|
|
@@ -126,7 +104,6 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
126
104
|
key: "modify"
|
|
127
105
|
}, "\u4FEE\u6539\u5BC6\u7801"));
|
|
128
106
|
});
|
|
129
|
-
|
|
130
107
|
_defineProperty(_assertThisInitialized(_this), "avatar", function (hasImport) {
|
|
131
108
|
return /*#__PURE__*/React.createElement(_Dropdown, {
|
|
132
109
|
placement: "bottomRight",
|
|
@@ -138,14 +115,12 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
138
115
|
}
|
|
139
116
|
}, _this.toIcon(_this.props.userIcon)));
|
|
140
117
|
});
|
|
141
|
-
|
|
142
118
|
_defineProperty(_assertThisInitialized(_this), "toPerson", function () {
|
|
143
119
|
var hasImport = _this.props.hasImport || true;
|
|
144
120
|
return /*#__PURE__*/React.createElement("div", {
|
|
145
121
|
role: "person"
|
|
146
122
|
}, /*#__PURE__*/React.createElement("div", null), _this.avatar(hasImport), /*#__PURE__*/React.createElement("span", null, _this.props.userName));
|
|
147
123
|
});
|
|
148
|
-
|
|
149
124
|
_defineProperty(_assertThisInitialized(_this), "toLogout", function () {
|
|
150
125
|
var props = {
|
|
151
126
|
to: _this.props.loginUrl,
|
|
@@ -154,22 +129,18 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
154
129
|
};
|
|
155
130
|
return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('logout'), /*#__PURE__*/React.createElement("span", null, "\u9000\u51FA"));
|
|
156
131
|
});
|
|
157
|
-
|
|
158
132
|
_defineProperty(_assertThisInitialized(_this), "toTail", function () {
|
|
159
133
|
var _this$props = _this.props,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
134
|
+
settingUrl = _this$props.settingUrl,
|
|
135
|
+
messageUrl = _this$props.messageUrl,
|
|
136
|
+
messageCount = _this$props.messageCount;
|
|
163
137
|
return /*#__PURE__*/React.createElement("span", null, _this.toSetting(settingUrl), _this.toMessage(messageUrl, messageCount), _this.toPerson(), _this.toLogout());
|
|
164
138
|
});
|
|
165
|
-
|
|
166
139
|
if (_props.selectUrl) {
|
|
167
140
|
_this.state = _defineProperty({}, _props.selectKey, _props.selectUrl);
|
|
168
141
|
}
|
|
169
|
-
|
|
170
142
|
return _this;
|
|
171
143
|
}
|
|
172
|
-
|
|
173
144
|
_createClass(Header, [{
|
|
174
145
|
key: "componentWillReceiveProps",
|
|
175
146
|
value: function componentWillReceiveProps(props) {
|
|
@@ -185,10 +156,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
185
156
|
}, this.toLogo(), this.toTail());
|
|
186
157
|
}
|
|
187
158
|
}]);
|
|
188
|
-
|
|
189
159
|
return Header;
|
|
190
160
|
}(React.Component);
|
|
191
|
-
|
|
192
161
|
_defineProperty(Header, "Vertical", Vertical);
|
|
193
|
-
|
|
194
162
|
export default Header;
|
package/es/Header/Vertical.js
CHANGED
|
@@ -10,11 +10,8 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
|
10
10
|
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
|
11
11
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
12
12
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
13
|
-
|
|
14
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
15
|
-
|
|
16
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
17
|
-
|
|
18
15
|
import React from 'react';
|
|
19
16
|
import PropTypes from 'prop-types';
|
|
20
17
|
import Link from '../Link';
|
|
@@ -26,48 +23,36 @@ var ITEM_TYPE = {
|
|
|
26
23
|
title: PropTypes.string.isRequired,
|
|
27
24
|
icon: PropTypes.string.isRequired
|
|
28
25
|
};
|
|
26
|
+
|
|
29
27
|
/**
|
|
30
28
|
* selectKey: 选中的key
|
|
31
29
|
* url:url优先级高于item中的href
|
|
32
30
|
*/
|
|
33
|
-
|
|
34
31
|
var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
35
32
|
_inherits(Vertical, _React$Component);
|
|
36
|
-
|
|
37
33
|
var _super = _createSuper(Vertical);
|
|
38
|
-
|
|
39
34
|
function Vertical() {
|
|
40
35
|
var _context;
|
|
41
|
-
|
|
42
36
|
var _this;
|
|
43
|
-
|
|
44
37
|
_classCallCheck(this, Vertical);
|
|
45
|
-
|
|
46
38
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
47
39
|
args[_key] = arguments[_key];
|
|
48
40
|
}
|
|
49
|
-
|
|
50
41
|
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
51
|
-
|
|
52
42
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
53
43
|
id: ''
|
|
54
44
|
});
|
|
55
|
-
|
|
56
45
|
_defineProperty(_assertThisInitialized(_this), "isSelect", function (item) {
|
|
57
46
|
return item.key === _this.props.selectKey;
|
|
58
47
|
});
|
|
59
|
-
|
|
60
48
|
_defineProperty(_assertThisInitialized(_this), "getUrl", function (item) {
|
|
61
49
|
return _this.props.url[item.key] || item.href;
|
|
62
50
|
});
|
|
63
|
-
|
|
64
51
|
_defineProperty(_assertThisInitialized(_this), "onClick", function (selectKey) {
|
|
65
52
|
_this.props.onSelectKey && _this.props.onSelectKey(selectKey);
|
|
66
|
-
|
|
67
53
|
if (_this.state.id) {
|
|
68
54
|
clearTimeout(_this.state.id);
|
|
69
55
|
}
|
|
70
|
-
|
|
71
56
|
_this.setState({
|
|
72
57
|
id: _setTimeout(function () {
|
|
73
58
|
_this.setState({
|
|
@@ -76,11 +61,9 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
76
61
|
}, 500)
|
|
77
62
|
});
|
|
78
63
|
});
|
|
79
|
-
|
|
80
64
|
_defineProperty(_assertThisInitialized(_this), "toItem", function (item) {
|
|
81
65
|
if (!item.jumpOut) {
|
|
82
66
|
var _context2;
|
|
83
|
-
|
|
84
67
|
return /*#__PURE__*/React.createElement(Link, {
|
|
85
68
|
key: item.key,
|
|
86
69
|
to: _this.getUrl(item),
|
|
@@ -100,30 +83,24 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
100
83
|
})), /*#__PURE__*/React.createElement("span", null, item.title));
|
|
101
84
|
}
|
|
102
85
|
});
|
|
103
|
-
|
|
104
86
|
return _this;
|
|
105
87
|
}
|
|
106
|
-
|
|
107
88
|
_createClass(Vertical, [{
|
|
108
89
|
key: "render",
|
|
109
90
|
value: function render() {
|
|
110
91
|
var _context3;
|
|
111
|
-
|
|
112
92
|
return /*#__PURE__*/React.createElement("header", {
|
|
113
93
|
className: variables('Vertical'),
|
|
114
94
|
"data-click": !!this.state.id
|
|
115
95
|
}, _mapInstanceProperty(_context3 = this.props.items).call(_context3, this.toItem));
|
|
116
96
|
}
|
|
117
97
|
}]);
|
|
118
|
-
|
|
119
98
|
return Vertical;
|
|
120
99
|
}(React.Component);
|
|
121
|
-
|
|
122
100
|
_defineProperty(Vertical, "propTypes", {
|
|
123
101
|
selectKey: PropTypes.string,
|
|
124
102
|
url: PropTypes.object,
|
|
125
103
|
items: PropTypes.arrayOf(PropTypes.shape(ITEM_TYPE)),
|
|
126
104
|
onSelectKey: PropTypes.func
|
|
127
105
|
});
|
|
128
|
-
|
|
129
106
|
export default Vertical;
|
|
@@ -8,38 +8,28 @@ import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleC
|
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
10
10
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
11
|
-
|
|
12
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
|
|
14
12
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
|
-
|
|
16
13
|
import React from 'react';
|
|
17
14
|
import { ModalWithDrag, Title } from '../index';
|
|
18
15
|
import variables from '../variables';
|
|
19
|
-
|
|
20
16
|
var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
21
17
|
_inherits(ImageView, _React$Component);
|
|
22
|
-
|
|
23
18
|
var _super = _createSuper(ImageView);
|
|
24
|
-
|
|
25
19
|
function ImageView(_props) {
|
|
26
20
|
var _this;
|
|
27
|
-
|
|
28
21
|
_classCallCheck(this, ImageView);
|
|
29
|
-
|
|
30
22
|
_this = _super.call(this, _props);
|
|
31
|
-
|
|
32
23
|
_defineProperty(_assertThisInitialized(_this), "ClosePreview", function () {
|
|
33
24
|
_this.setState({
|
|
34
25
|
previewVisible: false
|
|
35
26
|
});
|
|
36
27
|
});
|
|
37
|
-
|
|
38
28
|
_defineProperty(_assertThisInitialized(_this), "showBigImg", function () {
|
|
39
29
|
var imgList = _this.props.imgList;
|
|
40
30
|
var _this$state = _this.state,
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
previewVisible = _this$state.previewVisible,
|
|
32
|
+
index = _this$state.index;
|
|
43
33
|
var props = {
|
|
44
34
|
width: 900,
|
|
45
35
|
title: imgList[index].fileName,
|
|
@@ -56,7 +46,6 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
56
46
|
src: imgList[index].fileUrl
|
|
57
47
|
}));
|
|
58
48
|
});
|
|
59
|
-
|
|
60
49
|
_defineProperty(_assertThisInitialized(_this), "toSeeImg", function (e) {
|
|
61
50
|
if (_this.props.toSeeImg) {
|
|
62
51
|
_this.props.toSeeImg(e);
|
|
@@ -64,30 +53,26 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
64
53
|
_this.myClick(e.index);
|
|
65
54
|
}
|
|
66
55
|
});
|
|
67
|
-
|
|
68
56
|
_defineProperty(_assertThisInitialized(_this), "myClick", function (index) {
|
|
69
57
|
_this.setState({
|
|
70
58
|
previewVisible: true,
|
|
71
59
|
index: index
|
|
72
60
|
});
|
|
73
61
|
});
|
|
74
|
-
|
|
75
62
|
_this.state = {
|
|
76
63
|
previewVisible: false,
|
|
77
64
|
index: 0
|
|
78
65
|
};
|
|
79
66
|
return _this;
|
|
80
67
|
}
|
|
81
|
-
|
|
82
68
|
_createClass(ImageView, [{
|
|
83
69
|
key: "render",
|
|
84
70
|
value: function render() {
|
|
85
71
|
var _this2 = this;
|
|
86
|
-
|
|
87
72
|
var _this$props = this.props,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
73
|
+
imgList = _this$props.imgList,
|
|
74
|
+
title = _this$props.title,
|
|
75
|
+
toSeeImg = _this$props.toSeeImg;
|
|
91
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
92
77
|
className: variables('ImageView')
|
|
93
78
|
}, title ? /*#__PURE__*/React.createElement(Title, {
|
|
@@ -110,8 +95,6 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
110
95
|
}), toSeeImg ? null : this.showBigImg());
|
|
111
96
|
}
|
|
112
97
|
}]);
|
|
113
|
-
|
|
114
98
|
return ImageView;
|
|
115
99
|
}(React.Component);
|
|
116
|
-
|
|
117
100
|
export default ImageView;
|
package/es/Indent/Indent.js
CHANGED
|
@@ -3,21 +3,17 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWitho
|
|
|
3
3
|
var _excluded = ["children", "style"];
|
|
4
4
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
|
|
7
6
|
function Indent(_ref) {
|
|
8
7
|
var children = _ref.children,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
_ref$style = _ref.style,
|
|
9
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
10
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
11
|
_Object$assign(style, {
|
|
14
12
|
paddingLeft: 8,
|
|
15
13
|
paddingRight: 8
|
|
16
14
|
});
|
|
17
|
-
|
|
18
15
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
16
|
style: style
|
|
20
17
|
}, props), children);
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
export default Indent;
|
|
@@ -14,15 +14,10 @@ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
|
14
14
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
15
15
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
16
16
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
17
|
-
|
|
18
17
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
|
|
22
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
23
|
-
|
|
24
20
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
|
-
|
|
26
21
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
27
22
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
28
23
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
@@ -36,8 +31,8 @@ var optionsType = {
|
|
|
36
31
|
children: PropTypes.array,
|
|
37
32
|
title: PropTypes.string,
|
|
38
33
|
isLeaf: PropTypes.bool //false 就会触发 loadData 方法,从而在loadData方法中请求下一级数据,
|
|
39
|
-
|
|
40
34
|
};
|
|
35
|
+
|
|
41
36
|
var PROPS = {
|
|
42
37
|
options: PropTypes.arrayOf(PropTypes.shape(optionsType)).isRequired,
|
|
43
38
|
value: PropTypes.array.isRequired,
|
|
@@ -47,57 +42,43 @@ var PROPS = {
|
|
|
47
42
|
//动态加载 ps:loadData 与 showSearch 无法一起使用
|
|
48
43
|
showSearch: PropTypes.func
|
|
49
44
|
};
|
|
50
|
-
|
|
51
45
|
var PROPS_KEYS = _Object$keys(PROPS);
|
|
52
|
-
|
|
53
46
|
var InputCascader = /*#__PURE__*/function (_React$Component) {
|
|
54
47
|
_inherits(InputCascader, _React$Component);
|
|
55
|
-
|
|
56
48
|
var _super = _createSuper(InputCascader);
|
|
57
|
-
|
|
58
49
|
function InputCascader(_props) {
|
|
59
50
|
var _this;
|
|
60
|
-
|
|
61
51
|
_classCallCheck(this, InputCascader);
|
|
62
|
-
|
|
63
52
|
_this = _super.call(this, _props);
|
|
64
|
-
|
|
65
53
|
_defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
|
|
66
54
|
var onChange = _this.props.onChange;
|
|
67
55
|
onChange && onChange(value);
|
|
68
56
|
});
|
|
69
|
-
|
|
70
57
|
_defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
|
|
71
58
|
var onSearch = _this.props.onSearch;
|
|
72
59
|
onSearch && onSearch(selectedOptions[0]);
|
|
73
60
|
});
|
|
74
|
-
|
|
75
61
|
_defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
|
|
76
62
|
return _mapInstanceProperty(options).call(options, function (option) {
|
|
77
63
|
var obj = _objectSpread(_objectSpread({}, option), {}, {
|
|
78
64
|
label: option.title
|
|
79
65
|
});
|
|
80
|
-
|
|
81
66
|
if (option.children && option.children.length > 0) {
|
|
82
67
|
obj.children = _this.getOptions(option.children);
|
|
83
68
|
}
|
|
84
|
-
|
|
85
69
|
return obj;
|
|
86
70
|
});
|
|
87
71
|
});
|
|
88
|
-
|
|
89
72
|
_defineProperty(_assertThisInitialized(_this), "showSearch", function (inputValue, path) {});
|
|
90
|
-
|
|
91
73
|
_defineProperty(_assertThisInitialized(_this), "getProps", function () {
|
|
92
74
|
var _this$props = _this.props,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
75
|
+
_this$props$options = _this$props.options,
|
|
76
|
+
options = _this$props$options === void 0 ? [] : _this$props$options,
|
|
77
|
+
placeholder = _this$props.placeholder,
|
|
78
|
+
size = _this$props.size,
|
|
79
|
+
value = _this$props.value,
|
|
80
|
+
loadData = _this$props.loadData,
|
|
81
|
+
showSearch = _this$props.showSearch;
|
|
101
82
|
var props = _Object$assign(getObjectExclude({}, PROPS_KEYS), {
|
|
102
83
|
onChange: _this.onChange,
|
|
103
84
|
value: value,
|
|
@@ -105,31 +86,24 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
|
|
|
105
86
|
changeOnSelect: true,
|
|
106
87
|
placeholder: placeholder,
|
|
107
88
|
size: size
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
|
|
89
|
+
});
|
|
90
|
+
//动态加载 ps:loadData 与 showSearch 无法一起使用
|
|
111
91
|
if (loadData) {
|
|
112
92
|
props.loadData = _this.loadData;
|
|
113
93
|
} else if (showSearch) {
|
|
114
94
|
props.showSearch = _this.showSearch;
|
|
115
95
|
}
|
|
116
|
-
|
|
117
96
|
return props;
|
|
118
97
|
});
|
|
119
|
-
|
|
120
98
|
return _this;
|
|
121
99
|
}
|
|
122
|
-
|
|
123
100
|
_createClass(InputCascader, [{
|
|
124
101
|
key: "render",
|
|
125
102
|
value: function render() {
|
|
126
103
|
return /*#__PURE__*/React.createElement(_Cascader, this.getProps());
|
|
127
104
|
}
|
|
128
105
|
}]);
|
|
129
|
-
|
|
130
106
|
return InputCascader;
|
|
131
107
|
}(React.Component);
|
|
132
|
-
|
|
133
108
|
_defineProperty(InputCascader, "propTypes", PROPS);
|
|
134
|
-
|
|
135
109
|
export default InputCascader;
|
|
@@ -4,80 +4,82 @@ import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
|
4
4
|
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
7
|
-
|
|
8
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
|
|
10
8
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
-
|
|
12
9
|
import React from 'react';
|
|
13
10
|
import variables from '../variables';
|
|
14
|
-
var defaultMenus = ['head',
|
|
15
|
-
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
'
|
|
21
|
-
|
|
22
|
-
'
|
|
23
|
-
|
|
24
|
-
'
|
|
25
|
-
|
|
26
|
-
'
|
|
27
|
-
|
|
28
|
-
'
|
|
11
|
+
var defaultMenus = ['head',
|
|
12
|
+
// 标题
|
|
13
|
+
'bold',
|
|
14
|
+
// 粗体
|
|
15
|
+
'fontSize',
|
|
16
|
+
// 字号
|
|
17
|
+
'fontName',
|
|
18
|
+
// 字体
|
|
19
|
+
'italic',
|
|
20
|
+
// 斜体
|
|
21
|
+
'underline',
|
|
22
|
+
// 下划线
|
|
23
|
+
'strikeThrough',
|
|
24
|
+
// 删除线
|
|
25
|
+
'foreColor',
|
|
26
|
+
// 文字颜色
|
|
27
|
+
'backColor',
|
|
28
|
+
// 背景颜色
|
|
29
|
+
'link',
|
|
30
|
+
// 插入链接
|
|
31
|
+
'list',
|
|
32
|
+
// 列表
|
|
33
|
+
'justify',
|
|
34
|
+
// 对齐方式
|
|
35
|
+
'quote',
|
|
36
|
+
// 引用
|
|
37
|
+
'image',
|
|
38
|
+
// 插入图片
|
|
39
|
+
'table',
|
|
40
|
+
// 表格
|
|
29
41
|
'code' // 插入代码
|
|
30
42
|
];
|
|
31
|
-
|
|
32
43
|
var InputEditor = /*#__PURE__*/function (_React$Component) {
|
|
33
44
|
_inherits(InputEditor, _React$Component);
|
|
34
|
-
|
|
35
45
|
var _super = _createSuper(InputEditor);
|
|
36
|
-
|
|
37
46
|
function InputEditor() {
|
|
38
47
|
_classCallCheck(this, InputEditor);
|
|
39
|
-
|
|
40
48
|
return _super.apply(this, arguments);
|
|
41
49
|
}
|
|
42
|
-
|
|
43
50
|
_createClass(InputEditor, [{
|
|
44
51
|
key: "componentDidMount",
|
|
45
52
|
value: function componentDidMount() {
|
|
46
53
|
var _this$props = this.props,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
inputKey = _this$props.inputKey,
|
|
55
|
+
menus = _this$props.menus,
|
|
56
|
+
color = _this$props.color,
|
|
57
|
+
_this$props$showLinkI = _this$props.showLinkImg,
|
|
58
|
+
showLinkImg = _this$props$showLinkI === void 0 ? true : _this$props$showLinkI,
|
|
59
|
+
_this$props$uploadImg = _this$props.uploadImgShowBase64,
|
|
60
|
+
uploadImgShowBase64 = _this$props$uploadImg === void 0 ? true : _this$props$uploadImg,
|
|
61
|
+
onChange = _this$props.onChange,
|
|
62
|
+
value = _this$props.value,
|
|
63
|
+
readonly = _this$props.readonly;
|
|
58
64
|
if (!readonly) {
|
|
59
65
|
var elem = this.refs[inputKey];
|
|
60
|
-
this[inputKey] = new E(elem);
|
|
61
|
-
|
|
62
|
-
menus && (this[inputKey].customConfig.menus = menus);
|
|
63
|
-
|
|
64
|
-
color && (this[inputKey].customConfig.menus = color);
|
|
65
|
-
|
|
66
|
+
this[inputKey] = new E(elem);
|
|
67
|
+
//配置菜单
|
|
68
|
+
menus && (this[inputKey].customConfig.menus = menus);
|
|
69
|
+
//配置颜色
|
|
70
|
+
color && (this[inputKey].customConfig.menus = color);
|
|
71
|
+
//配置菜单
|
|
66
72
|
this[inputKey].customConfig.menus = defaultMenus;
|
|
67
|
-
|
|
68
73
|
if (menus) {
|
|
69
74
|
this[inputKey].customConfig.menus = menus;
|
|
70
75
|
}
|
|
71
|
-
|
|
72
76
|
this[inputKey].customConfig.uploadImgShowBase64 = uploadImgShowBase64; //是否可以上传图片
|
|
73
|
-
|
|
74
77
|
this[inputKey].customConfig.showLinkImg = showLinkImg; //隐藏网络图片
|
|
75
78
|
|
|
76
79
|
this[inputKey].customConfig.onchange = function (html) {
|
|
77
80
|
onChange && onChange(html);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
};
|
|
82
|
+
//配置编辑区域的 z-index
|
|
81
83
|
this[inputKey].customConfig.zIndex = 0;
|
|
82
84
|
this[inputKey].create();
|
|
83
85
|
this[inputKey].txt.html(value);
|
|
@@ -87,19 +89,19 @@ var InputEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
87
89
|
key: "componentDidUpdate",
|
|
88
90
|
value: function componentDidUpdate() {
|
|
89
91
|
var _this$props2 = this.props,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
inputKey = _this$props2.inputKey,
|
|
93
|
+
_this$props2$value = _this$props2.value,
|
|
94
|
+
value = _this$props2$value === void 0 ? '' : _this$props2$value,
|
|
95
|
+
readonly = _this$props2.readonly;
|
|
94
96
|
!readonly && !value && this[inputKey].txt.html(value); //支持清空操作
|
|
95
97
|
}
|
|
96
98
|
}, {
|
|
97
99
|
key: "render",
|
|
98
100
|
value: function render() {
|
|
99
101
|
var _this$props3 = this.props,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
inputKey = _this$props3.inputKey,
|
|
103
|
+
readonly = _this$props3.readonly,
|
|
104
|
+
value = _this$props3.value;
|
|
103
105
|
return /*#__PURE__*/React.createElement("div", {
|
|
104
106
|
className: variables('InputEditor')
|
|
105
107
|
}, readonly ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -111,8 +113,6 @@ var InputEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
111
113
|
}));
|
|
112
114
|
}
|
|
113
115
|
}]);
|
|
114
|
-
|
|
115
116
|
return InputEditor;
|
|
116
117
|
}(React.Component);
|
|
117
|
-
|
|
118
118
|
export default InputEditor;
|