cloud-b2b 1.1.46 → 1.1.50
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 +45 -16
- package/es/Card/Card.js +4 -3
- package/es/CodeInput/CodeInput.js +59 -30
- package/es/Control/Control.js +117 -58
- package/es/Control/event.js +14 -0
- package/es/Enhance/Dialogs.js +21 -6
- package/es/Enhance/Loading.js +46 -26
- package/es/Enhance/index.js +2 -0
- package/es/Header/Header.js +35 -3
- package/es/Header/Vertical.js +24 -1
- package/es/ImageView/ImageView.js +22 -5
- package/es/Indent/Indent.js +7 -3
- package/es/InpurCascader/InputCascader.js +36 -10
- package/es/InputEditor/InputEditor.js +52 -53
- package/es/InputSearch/InputSearch.js +71 -26
- package/es/InputSelect/InputSelect.js +48 -17
- package/es/InputTreeSelect/InputTreeSelect.js +147 -0
- package/es/InputTreeSelect/package.json +6 -0
- package/es/InputWriting/InputWriting.js +28 -6
- package/es/Layout/Layout.js +59 -28
- package/es/LayoutLink/LayoutLink.js +20 -11
- package/es/Link/Link.js +27 -4
- package/es/Loading/Loading.js +3 -1
- package/es/Loading2/Loading2.js +2 -0
- package/es/ModalWithDrag/ModalWithDrag.js +8 -3
- package/es/ModalWithDrag/drag.js +29 -12
- package/es/NumberInput/NumberInput.js +64 -24
- package/es/Search/Search.js +164 -54
- package/es/Sidebar/Sidebar.js +34 -13
- package/es/Sidebar2/Sidebar.js +30 -3
- package/es/SuperForm/SuperForm.js +164 -27
- package/es/SuperForm2/SuperForm.js +182 -31
- package/es/SuperIcon/SuperIcon.js +6 -3
- package/es/SuperPagination/SuperPagination.js +32 -15
- package/es/SuperTab/SuperTab.js +27 -4
- package/es/SuperTab2/SuperTab2.js +33 -11
- package/es/SuperTable/DragSortRow.js +34 -6
- package/es/SuperTable/FilterDropDown.js +34 -10
- package/es/SuperTable/SuperTable.js +216 -84
- package/es/SuperTable/fixed.js +9 -1
- package/es/SuperTable2/SuperTable2.js +226 -101
- package/es/SuperTable2/SuperTableCell.js +60 -16
- package/es/SuperTable3/FilterDropDown.js +34 -10
- package/es/SuperTable3/SuperTable.js +175 -50
- package/es/SuperTable3/fixed.js +9 -1
- package/es/SuperToolbar/SuperToolbar.js +49 -21
- package/es/SuperUpload/SuperUpload.js +233 -156
- package/es/Title/Title.js +15 -12
- package/es/Viewer/ImageViews.js +60 -7
- package/es/Viewer/Viewer.js +32 -5
- package/es/WingBlank/WingBlank.js +6 -2
- package/es/helper.js +29 -7
- package/es/history.js +2 -3
- package/lib/Area/Area.js +64 -16
- package/lib/Card/Card.js +13 -3
- package/lib/CodeInput/CodeInput.js +77 -30
- package/lib/Control/Control.js +160 -58
- package/lib/Control/event.js +16 -0
- package/lib/Enhance/Dialogs.js +32 -6
- package/lib/Enhance/Loading.js +62 -26
- package/lib/Enhance/index.js +9 -0
- package/lib/Header/Header.js +48 -3
- package/lib/Header/Vertical.js +36 -1
- package/lib/ImageView/ImageView.js +30 -5
- package/lib/Indent/Indent.js +13 -3
- package/lib/InpurCascader/InputCascader.js +50 -11
- package/lib/InputEditor/InputEditor.js +61 -53
- package/lib/InputSearch/InputSearch.js +78 -26
- package/lib/InputSelect/InputSelect.js +62 -17
- package/lib/InputTreeSelect/InputTreeSelect.js +169 -0
- package/lib/InputTreeSelect/package.json +6 -0
- package/lib/InputWriting/InputWriting.js +35 -6
- package/lib/Layout/Layout.js +76 -28
- package/lib/LayoutLink/LayoutLink.js +38 -11
- package/lib/Link/Link.js +40 -4
- package/lib/Loading/Loading.js +9 -1
- package/lib/Loading2/Loading2.js +8 -0
- package/lib/ModalWithDrag/ModalWithDrag.js +18 -3
- package/lib/ModalWithDrag/drag.js +34 -12
- package/lib/NumberInput/NumberInput.js +77 -24
- package/lib/Search/Search.js +171 -54
- package/lib/Sidebar/Sidebar.js +46 -13
- package/lib/Sidebar2/Sidebar.js +42 -3
- package/lib/SuperForm/SuperForm.js +162 -27
- package/lib/SuperForm2/SuperForm.js +175 -31
- package/lib/SuperIcon/SuperIcon.js +14 -3
- package/lib/SuperPagination/SuperPagination.js +42 -15
- package/lib/SuperTab/SuperTab.js +34 -4
- package/lib/SuperTab2/SuperTab2.js +48 -11
- package/lib/SuperTable/DragSortRow.js +42 -6
- package/lib/SuperTable/FilterDropDown.js +42 -10
- package/lib/SuperTable/SuperTable.js +211 -83
- package/lib/SuperTable/fixed.js +13 -1
- package/lib/SuperTable2/SuperTable2.js +240 -101
- package/lib/SuperTable2/SuperTableCell.js +67 -13
- package/lib/SuperTable3/FilterDropDown.js +42 -10
- package/lib/SuperTable3/SuperTable.js +170 -49
- package/lib/SuperTable3/fixed.js +13 -1
- package/lib/SuperToolbar/SuperToolbar.js +64 -20
- package/lib/SuperUpload/SuperUpload.js +267 -156
- package/lib/Title/Title.js +24 -12
- package/lib/Viewer/ImageViews.js +63 -7
- package/lib/Viewer/Viewer.js +41 -5
- package/lib/WingBlank/WingBlank.js +14 -2
- package/lib/helper.js +47 -6
- package/lib/history.js +5 -0
- package/lib/index.js +76 -0
- package/lib/variables.js +4 -0
- package/package.json +2 -2
package/es/Enhance/Loading.js
CHANGED
|
@@ -14,52 +14,63 @@ 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
|
+
|
|
17
18
|
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
|
+
|
|
18
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
|
|
19
22
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
23
|
+
|
|
20
24
|
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); }; }
|
|
25
|
+
|
|
21
26
|
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; } }
|
|
27
|
+
|
|
22
28
|
import React from 'react';
|
|
23
29
|
import PropTypes from 'prop-types';
|
|
24
30
|
import Loading from '../Loading';
|
|
25
|
-
var STATUS = ['loadingWithInit',
|
|
26
|
-
//
|
|
27
|
-
'
|
|
28
|
-
//
|
|
29
|
-
'retry',
|
|
30
|
-
// 显示重试画面
|
|
31
|
-
'retryForHome',
|
|
32
|
-
// 显示重试画面(触发onInit时,home参数为true)
|
|
31
|
+
var STATUS = ['loadingWithInit', // 显示加载画面,并自动触发onInit事件,默认值
|
|
32
|
+
'loading', // 显示加载画面
|
|
33
|
+
'retry', // 显示重试画面
|
|
34
|
+
'retryForHome', // 显示重试画面(触发onInit时,home参数为true)
|
|
33
35
|
'page' // 显示正常的页面(表明页面状态已经初始化好)
|
|
34
36
|
];
|
|
35
|
-
|
|
36
37
|
/**
|
|
37
38
|
* status: [可选], 当前状态。默认为loadingWithInit
|
|
38
39
|
* home: [可选],为true表明接受首页触发的事件。默认为false
|
|
39
40
|
* onInit: [可选],原型为func(home),home为true表明初始化是来源首页
|
|
40
41
|
* onRefreshForHome:[可选],检测到来至首页时会触发该事件,原型为func()
|
|
41
42
|
*/
|
|
43
|
+
|
|
42
44
|
var Enhance = function Enhance(Component) {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
var _Class;
|
|
46
|
+
|
|
47
|
+
return _Class = /*#__PURE__*/function (_React$Component) {
|
|
48
|
+
_inherits(_Class, _React$Component);
|
|
49
|
+
|
|
50
|
+
var _super = _createSuper(_Class);
|
|
51
|
+
|
|
52
|
+
function _Class() {
|
|
48
53
|
var _context;
|
|
54
|
+
|
|
49
55
|
var _this;
|
|
50
|
-
|
|
56
|
+
|
|
57
|
+
_classCallCheck(this, _Class);
|
|
58
|
+
|
|
51
59
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52
60
|
args[_key] = arguments[_key];
|
|
53
61
|
}
|
|
62
|
+
|
|
54
63
|
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
64
|
+
|
|
55
65
|
_defineProperty(_assertThisInitialized(_this), "triggerEvent", function () {
|
|
56
66
|
if (!global.isServer) {
|
|
57
67
|
var _this$props = _this.props,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
_this$props$status = _this$props.status,
|
|
69
|
+
status = _this$props$status === void 0 ? 'loadingWithInit' : _this$props$status,
|
|
70
|
+
home = _this$props.home,
|
|
71
|
+
onInit = _this$props.onInit,
|
|
72
|
+
onRefreshForHome = _this$props.onRefreshForHome;
|
|
73
|
+
|
|
63
74
|
if (!home) {
|
|
64
75
|
if (status === 'loadingWithInit') {
|
|
65
76
|
onInit && onInit(false);
|
|
@@ -67,6 +78,7 @@ var Enhance = function Enhance(Component) {
|
|
|
67
78
|
} else {
|
|
68
79
|
var __home = global['__home'];
|
|
69
80
|
global['__home'] && (global['__home'] = false);
|
|
81
|
+
|
|
70
82
|
if (status === 'loadingWithInit') {
|
|
71
83
|
onInit && onInit(__home);
|
|
72
84
|
} else if (__home) {
|
|
@@ -79,23 +91,28 @@ var Enhance = function Enhance(Component) {
|
|
|
79
91
|
}
|
|
80
92
|
}
|
|
81
93
|
});
|
|
94
|
+
|
|
82
95
|
_defineProperty(_assertThisInitialized(_this), "onRetry", function () {
|
|
83
96
|
var _this$props2 = _this.props,
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
status = _this$props2.status,
|
|
98
|
+
onInit = _this$props2.onInit;
|
|
86
99
|
onInit && onInit(status === 'retryForHome');
|
|
87
100
|
});
|
|
101
|
+
|
|
88
102
|
_defineProperty(_assertThisInitialized(_this), "getPageProps", function () {
|
|
89
103
|
var props = _objectSpread({}, _this.props);
|
|
104
|
+
|
|
90
105
|
delete props.status;
|
|
91
106
|
delete props.home;
|
|
92
107
|
delete props.onInit;
|
|
93
108
|
delete props.onRefreshForHome;
|
|
94
109
|
return props;
|
|
95
110
|
});
|
|
111
|
+
|
|
96
112
|
return _this;
|
|
97
113
|
}
|
|
98
|
-
|
|
114
|
+
|
|
115
|
+
_createClass(_Class, [{
|
|
99
116
|
key: "componentDidMount",
|
|
100
117
|
value: function componentDidMount() {
|
|
101
118
|
this.triggerEvent();
|
|
@@ -109,6 +126,7 @@ var Enhance = function Enhance(Component) {
|
|
|
109
126
|
key: "render",
|
|
110
127
|
value: function render() {
|
|
111
128
|
var status = this.props.status;
|
|
129
|
+
|
|
112
130
|
if (status !== 'page') {
|
|
113
131
|
var retry = status === 'retry' || status === 'retryForHome';
|
|
114
132
|
return /*#__PURE__*/React.createElement(Loading, {
|
|
@@ -120,12 +138,14 @@ var Enhance = function Enhance(Component) {
|
|
|
120
138
|
}
|
|
121
139
|
}
|
|
122
140
|
}]);
|
|
123
|
-
|
|
124
|
-
|
|
141
|
+
|
|
142
|
+
return _Class;
|
|
143
|
+
}(React.Component), _defineProperty(_Class, "propTypes", {
|
|
125
144
|
status: PropTypes.oneOf(STATUS),
|
|
126
145
|
home: PropTypes.bool,
|
|
127
146
|
onInit: PropTypes.func,
|
|
128
147
|
onRefreshForHome: PropTypes.func
|
|
129
|
-
}),
|
|
148
|
+
}), _Class;
|
|
130
149
|
};
|
|
150
|
+
|
|
131
151
|
export default Enhance;
|
package/es/Enhance/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import EnhanceLoading from './Loading';
|
|
2
2
|
import EnhanceDialogs from './Dialogs';
|
|
3
|
+
|
|
3
4
|
var EnhanceEditDialog = function EnhanceEditDialog(Container, EditDialog) {
|
|
4
5
|
return EnhanceDialogs(Container, ['edit'], [EditDialog]);
|
|
5
6
|
};
|
|
7
|
+
|
|
6
8
|
export { EnhanceLoading, EnhanceDialogs, EnhanceEditDialog };
|
package/es/Header/Header.js
CHANGED
|
@@ -17,10 +17,15 @@ 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
|
+
|
|
20
21
|
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
|
+
|
|
21
23
|
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
|
+
|
|
22
25
|
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
|
+
|
|
23
27
|
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
|
+
|
|
24
29
|
import React from 'react';
|
|
25
30
|
import Link from '../Link';
|
|
26
31
|
import SuperIcon from '../SuperIcon';
|
|
@@ -28,23 +33,32 @@ import helper from '../helper';
|
|
|
28
33
|
import Vertical from './Vertical';
|
|
29
34
|
import variables from '../variables';
|
|
30
35
|
var MenuItem = _Menu.Item;
|
|
36
|
+
|
|
31
37
|
var Header = /*#__PURE__*/function (_React$Component) {
|
|
32
38
|
_inherits(Header, _React$Component);
|
|
39
|
+
|
|
33
40
|
var _super = _createSuper(Header);
|
|
41
|
+
|
|
34
42
|
function Header(_props) {
|
|
35
43
|
var _this;
|
|
44
|
+
|
|
36
45
|
_classCallCheck(this, Header);
|
|
46
|
+
|
|
37
47
|
_this = _super.call(this, _props);
|
|
48
|
+
|
|
38
49
|
_defineProperty(_assertThisInitialized(_this), "toLogo", function () {
|
|
39
50
|
var img = _this.props.logoImg || '/logo.png';
|
|
51
|
+
|
|
40
52
|
var props = _this.getLinkProps('home', _this.state['main'] || _this.props.homeUrl || '/', {
|
|
41
53
|
role: 'logo'
|
|
42
54
|
});
|
|
55
|
+
|
|
43
56
|
return /*#__PURE__*/React.createElement(Link, props, /*#__PURE__*/React.createElement("img", {
|
|
44
57
|
src: img,
|
|
45
58
|
alt: "logo"
|
|
46
59
|
}));
|
|
47
60
|
});
|
|
61
|
+
|
|
48
62
|
_defineProperty(_assertThisInitialized(_this), "toIcon", function (type) {
|
|
49
63
|
var style = {
|
|
50
64
|
fontSize: 18,
|
|
@@ -55,6 +69,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
55
69
|
style: style
|
|
56
70
|
});
|
|
57
71
|
});
|
|
72
|
+
|
|
58
73
|
_defineProperty(_assertThisInitialized(_this), "getLinkProps", function (key, url) {
|
|
59
74
|
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
60
75
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -63,18 +78,23 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
63
78
|
'data-active': _this.props.selectKey === key ? 'true' : null
|
|
64
79
|
});
|
|
65
80
|
});
|
|
81
|
+
|
|
66
82
|
_defineProperty(_assertThisInitialized(_this), "toSetting", function (settingUrl) {
|
|
67
83
|
if (settingUrl) {
|
|
68
84
|
var props = _this.getLinkProps('setting', _this.state['setting'] || settingUrl);
|
|
85
|
+
|
|
69
86
|
return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('pld-setting'));
|
|
70
87
|
} else {
|
|
71
88
|
return null;
|
|
72
89
|
}
|
|
73
90
|
});
|
|
91
|
+
|
|
74
92
|
_defineProperty(_assertThisInitialized(_this), "toMessage", function (messageUrl) {
|
|
75
93
|
var count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
94
|
+
|
|
76
95
|
if (messageUrl) {
|
|
77
96
|
var props = _this.getLinkProps('message', _this.state['message'] || messageUrl);
|
|
97
|
+
|
|
78
98
|
var msgProps = {
|
|
79
99
|
overflowCount: 99,
|
|
80
100
|
title: "\u60A8\u6709".concat(count, "\u6761\u672A\u8BFB\u6D88\u606F"),
|
|
@@ -87,11 +107,13 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
87
107
|
return null;
|
|
88
108
|
}
|
|
89
109
|
});
|
|
110
|
+
|
|
90
111
|
_defineProperty(_assertThisInitialized(_this), "onMenuItemClick", function (_ref) {
|
|
91
112
|
var key = _ref.key;
|
|
92
113
|
var onMenuClick = _this.props.onMenuClick;
|
|
93
114
|
onMenuClick && onMenuClick(key);
|
|
94
115
|
});
|
|
116
|
+
|
|
95
117
|
_defineProperty(_assertThisInitialized(_this), "menu", function (hasImport) {
|
|
96
118
|
return /*#__PURE__*/React.createElement(_Menu, {
|
|
97
119
|
className: variables('Header').menu,
|
|
@@ -104,6 +126,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
104
126
|
key: "modify"
|
|
105
127
|
}, "\u4FEE\u6539\u5BC6\u7801"));
|
|
106
128
|
});
|
|
129
|
+
|
|
107
130
|
_defineProperty(_assertThisInitialized(_this), "avatar", function (hasImport) {
|
|
108
131
|
return /*#__PURE__*/React.createElement(_Dropdown, {
|
|
109
132
|
placement: "bottomRight",
|
|
@@ -115,12 +138,14 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
115
138
|
}
|
|
116
139
|
}, _this.toIcon(_this.props.userIcon)));
|
|
117
140
|
});
|
|
141
|
+
|
|
118
142
|
_defineProperty(_assertThisInitialized(_this), "toPerson", function () {
|
|
119
143
|
var hasImport = _this.props.hasImport || true;
|
|
120
144
|
return /*#__PURE__*/React.createElement("div", {
|
|
121
145
|
role: "person"
|
|
122
146
|
}, /*#__PURE__*/React.createElement("div", null), _this.avatar(hasImport), /*#__PURE__*/React.createElement("span", null, _this.props.userName));
|
|
123
147
|
});
|
|
148
|
+
|
|
124
149
|
_defineProperty(_assertThisInitialized(_this), "toLogout", function () {
|
|
125
150
|
var props = {
|
|
126
151
|
to: _this.props.loginUrl,
|
|
@@ -129,18 +154,22 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
129
154
|
};
|
|
130
155
|
return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('logout'), /*#__PURE__*/React.createElement("span", null, "\u9000\u51FA"));
|
|
131
156
|
});
|
|
157
|
+
|
|
132
158
|
_defineProperty(_assertThisInitialized(_this), "toTail", function () {
|
|
133
159
|
var _this$props = _this.props,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
160
|
+
settingUrl = _this$props.settingUrl,
|
|
161
|
+
messageUrl = _this$props.messageUrl,
|
|
162
|
+
messageCount = _this$props.messageCount;
|
|
137
163
|
return /*#__PURE__*/React.createElement("span", null, _this.toSetting(settingUrl), _this.toMessage(messageUrl, messageCount), _this.toPerson(), _this.toLogout());
|
|
138
164
|
});
|
|
165
|
+
|
|
139
166
|
if (_props.selectUrl) {
|
|
140
167
|
_this.state = _defineProperty({}, _props.selectKey, _props.selectUrl);
|
|
141
168
|
}
|
|
169
|
+
|
|
142
170
|
return _this;
|
|
143
171
|
}
|
|
172
|
+
|
|
144
173
|
_createClass(Header, [{
|
|
145
174
|
key: "componentWillReceiveProps",
|
|
146
175
|
value: function componentWillReceiveProps(props) {
|
|
@@ -156,7 +185,10 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
156
185
|
}, this.toLogo(), this.toTail());
|
|
157
186
|
}
|
|
158
187
|
}]);
|
|
188
|
+
|
|
159
189
|
return Header;
|
|
160
190
|
}(React.Component);
|
|
191
|
+
|
|
161
192
|
_defineProperty(Header, "Vertical", Vertical);
|
|
193
|
+
|
|
162
194
|
export default Header;
|
package/es/Header/Vertical.js
CHANGED
|
@@ -10,8 +10,11 @@ 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
|
+
|
|
13
14
|
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
|
+
|
|
14
16
|
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
|
+
|
|
15
18
|
import React from 'react';
|
|
16
19
|
import PropTypes from 'prop-types';
|
|
17
20
|
import Link from '../Link';
|
|
@@ -23,36 +26,48 @@ var ITEM_TYPE = {
|
|
|
23
26
|
title: PropTypes.string.isRequired,
|
|
24
27
|
icon: PropTypes.string.isRequired
|
|
25
28
|
};
|
|
26
|
-
|
|
27
29
|
/**
|
|
28
30
|
* selectKey: 选中的key
|
|
29
31
|
* url:url优先级高于item中的href
|
|
30
32
|
*/
|
|
33
|
+
|
|
31
34
|
var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
32
35
|
_inherits(Vertical, _React$Component);
|
|
36
|
+
|
|
33
37
|
var _super = _createSuper(Vertical);
|
|
38
|
+
|
|
34
39
|
function Vertical() {
|
|
35
40
|
var _context;
|
|
41
|
+
|
|
36
42
|
var _this;
|
|
43
|
+
|
|
37
44
|
_classCallCheck(this, Vertical);
|
|
45
|
+
|
|
38
46
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
47
|
args[_key] = arguments[_key];
|
|
40
48
|
}
|
|
49
|
+
|
|
41
50
|
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
51
|
+
|
|
42
52
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
43
53
|
id: ''
|
|
44
54
|
});
|
|
55
|
+
|
|
45
56
|
_defineProperty(_assertThisInitialized(_this), "isSelect", function (item) {
|
|
46
57
|
return item.key === _this.props.selectKey;
|
|
47
58
|
});
|
|
59
|
+
|
|
48
60
|
_defineProperty(_assertThisInitialized(_this), "getUrl", function (item) {
|
|
49
61
|
return _this.props.url[item.key] || item.href;
|
|
50
62
|
});
|
|
63
|
+
|
|
51
64
|
_defineProperty(_assertThisInitialized(_this), "onClick", function (selectKey) {
|
|
52
65
|
_this.props.onSelectKey && _this.props.onSelectKey(selectKey);
|
|
66
|
+
|
|
53
67
|
if (_this.state.id) {
|
|
54
68
|
clearTimeout(_this.state.id);
|
|
55
69
|
}
|
|
70
|
+
|
|
56
71
|
_this.setState({
|
|
57
72
|
id: _setTimeout(function () {
|
|
58
73
|
_this.setState({
|
|
@@ -61,9 +76,11 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
61
76
|
}, 500)
|
|
62
77
|
});
|
|
63
78
|
});
|
|
79
|
+
|
|
64
80
|
_defineProperty(_assertThisInitialized(_this), "toItem", function (item) {
|
|
65
81
|
if (!item.jumpOut) {
|
|
66
82
|
var _context2;
|
|
83
|
+
|
|
67
84
|
return /*#__PURE__*/React.createElement(Link, {
|
|
68
85
|
key: item.key,
|
|
69
86
|
to: _this.getUrl(item),
|
|
@@ -83,24 +100,30 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
83
100
|
})), /*#__PURE__*/React.createElement("span", null, item.title));
|
|
84
101
|
}
|
|
85
102
|
});
|
|
103
|
+
|
|
86
104
|
return _this;
|
|
87
105
|
}
|
|
106
|
+
|
|
88
107
|
_createClass(Vertical, [{
|
|
89
108
|
key: "render",
|
|
90
109
|
value: function render() {
|
|
91
110
|
var _context3;
|
|
111
|
+
|
|
92
112
|
return /*#__PURE__*/React.createElement("header", {
|
|
93
113
|
className: variables('Vertical'),
|
|
94
114
|
"data-click": !!this.state.id
|
|
95
115
|
}, _mapInstanceProperty(_context3 = this.props.items).call(_context3, this.toItem));
|
|
96
116
|
}
|
|
97
117
|
}]);
|
|
118
|
+
|
|
98
119
|
return Vertical;
|
|
99
120
|
}(React.Component);
|
|
121
|
+
|
|
100
122
|
_defineProperty(Vertical, "propTypes", {
|
|
101
123
|
selectKey: PropTypes.string,
|
|
102
124
|
url: PropTypes.object,
|
|
103
125
|
items: PropTypes.arrayOf(PropTypes.shape(ITEM_TYPE)),
|
|
104
126
|
onSelectKey: PropTypes.func
|
|
105
127
|
});
|
|
128
|
+
|
|
106
129
|
export default Vertical;
|
|
@@ -8,28 +8,38 @@ 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
|
+
|
|
11
12
|
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
|
+
|
|
12
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; } }
|
|
15
|
+
|
|
13
16
|
import React from 'react';
|
|
14
17
|
import { ModalWithDrag, Title } from '../index';
|
|
15
18
|
import variables from '../variables';
|
|
19
|
+
|
|
16
20
|
var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
17
21
|
_inherits(ImageView, _React$Component);
|
|
22
|
+
|
|
18
23
|
var _super = _createSuper(ImageView);
|
|
24
|
+
|
|
19
25
|
function ImageView(_props) {
|
|
20
26
|
var _this;
|
|
27
|
+
|
|
21
28
|
_classCallCheck(this, ImageView);
|
|
29
|
+
|
|
22
30
|
_this = _super.call(this, _props);
|
|
31
|
+
|
|
23
32
|
_defineProperty(_assertThisInitialized(_this), "ClosePreview", function () {
|
|
24
33
|
_this.setState({
|
|
25
34
|
previewVisible: false
|
|
26
35
|
});
|
|
27
36
|
});
|
|
37
|
+
|
|
28
38
|
_defineProperty(_assertThisInitialized(_this), "showBigImg", function () {
|
|
29
39
|
var imgList = _this.props.imgList;
|
|
30
40
|
var _this$state = _this.state,
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
previewVisible = _this$state.previewVisible,
|
|
42
|
+
index = _this$state.index;
|
|
33
43
|
var props = {
|
|
34
44
|
width: 900,
|
|
35
45
|
title: imgList[index].fileName,
|
|
@@ -46,6 +56,7 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
46
56
|
src: imgList[index].fileUrl
|
|
47
57
|
}));
|
|
48
58
|
});
|
|
59
|
+
|
|
49
60
|
_defineProperty(_assertThisInitialized(_this), "toSeeImg", function (e) {
|
|
50
61
|
if (_this.props.toSeeImg) {
|
|
51
62
|
_this.props.toSeeImg(e);
|
|
@@ -53,26 +64,30 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
53
64
|
_this.myClick(e.index);
|
|
54
65
|
}
|
|
55
66
|
});
|
|
67
|
+
|
|
56
68
|
_defineProperty(_assertThisInitialized(_this), "myClick", function (index) {
|
|
57
69
|
_this.setState({
|
|
58
70
|
previewVisible: true,
|
|
59
71
|
index: index
|
|
60
72
|
});
|
|
61
73
|
});
|
|
74
|
+
|
|
62
75
|
_this.state = {
|
|
63
76
|
previewVisible: false,
|
|
64
77
|
index: 0
|
|
65
78
|
};
|
|
66
79
|
return _this;
|
|
67
80
|
}
|
|
81
|
+
|
|
68
82
|
_createClass(ImageView, [{
|
|
69
83
|
key: "render",
|
|
70
84
|
value: function render() {
|
|
71
85
|
var _this2 = this;
|
|
86
|
+
|
|
72
87
|
var _this$props = this.props,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
imgList = _this$props.imgList,
|
|
89
|
+
title = _this$props.title,
|
|
90
|
+
toSeeImg = _this$props.toSeeImg;
|
|
76
91
|
return /*#__PURE__*/React.createElement("div", {
|
|
77
92
|
className: variables('ImageView')
|
|
78
93
|
}, title ? /*#__PURE__*/React.createElement(Title, {
|
|
@@ -95,6 +110,8 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
95
110
|
}), toSeeImg ? null : this.showBigImg());
|
|
96
111
|
}
|
|
97
112
|
}]);
|
|
113
|
+
|
|
98
114
|
return ImageView;
|
|
99
115
|
}(React.Component);
|
|
116
|
+
|
|
100
117
|
export default ImageView;
|
package/es/Indent/Indent.js
CHANGED
|
@@ -3,17 +3,21 @@ 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
|
+
|
|
6
7
|
function Indent(_ref) {
|
|
7
8
|
var children = _ref.children,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
_ref$style = _ref.style,
|
|
10
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
|
|
11
13
|
_Object$assign(style, {
|
|
12
14
|
paddingLeft: 8,
|
|
13
15
|
paddingRight: 8
|
|
14
16
|
});
|
|
17
|
+
|
|
15
18
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
16
19
|
style: style
|
|
17
20
|
}, props), children);
|
|
18
21
|
}
|
|
22
|
+
|
|
19
23
|
export default Indent;
|
|
@@ -14,10 +14,15 @@ 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
|
+
|
|
17
18
|
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
|
+
|
|
18
20
|
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
|
+
|
|
19
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); }; }
|
|
23
|
+
|
|
20
24
|
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
|
+
|
|
21
26
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
22
27
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
23
28
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
@@ -31,8 +36,8 @@ var optionsType = {
|
|
|
31
36
|
children: PropTypes.array,
|
|
32
37
|
title: PropTypes.string,
|
|
33
38
|
isLeaf: PropTypes.bool //false 就会触发 loadData 方法,从而在loadData方法中请求下一级数据,
|
|
34
|
-
};
|
|
35
39
|
|
|
40
|
+
};
|
|
36
41
|
var PROPS = {
|
|
37
42
|
options: PropTypes.arrayOf(PropTypes.shape(optionsType)).isRequired,
|
|
38
43
|
value: PropTypes.array.isRequired,
|
|
@@ -42,43 +47,57 @@ var PROPS = {
|
|
|
42
47
|
//动态加载 ps:loadData 与 showSearch 无法一起使用
|
|
43
48
|
showSearch: PropTypes.func
|
|
44
49
|
};
|
|
50
|
+
|
|
45
51
|
var PROPS_KEYS = _Object$keys(PROPS);
|
|
52
|
+
|
|
46
53
|
var InputCascader = /*#__PURE__*/function (_React$Component) {
|
|
47
54
|
_inherits(InputCascader, _React$Component);
|
|
55
|
+
|
|
48
56
|
var _super = _createSuper(InputCascader);
|
|
57
|
+
|
|
49
58
|
function InputCascader(_props) {
|
|
50
59
|
var _this;
|
|
60
|
+
|
|
51
61
|
_classCallCheck(this, InputCascader);
|
|
62
|
+
|
|
52
63
|
_this = _super.call(this, _props);
|
|
64
|
+
|
|
53
65
|
_defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
|
|
54
66
|
var onChange = _this.props.onChange;
|
|
55
67
|
onChange && onChange(value);
|
|
56
68
|
});
|
|
69
|
+
|
|
57
70
|
_defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
|
|
58
71
|
var onSearch = _this.props.onSearch;
|
|
59
72
|
onSearch && onSearch(selectedOptions[0]);
|
|
60
73
|
});
|
|
74
|
+
|
|
61
75
|
_defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
|
|
62
76
|
return _mapInstanceProperty(options).call(options, function (option) {
|
|
63
77
|
var obj = _objectSpread(_objectSpread({}, option), {}, {
|
|
64
78
|
label: option.title
|
|
65
79
|
});
|
|
80
|
+
|
|
66
81
|
if (option.children && option.children.length > 0) {
|
|
67
82
|
obj.children = _this.getOptions(option.children);
|
|
68
83
|
}
|
|
84
|
+
|
|
69
85
|
return obj;
|
|
70
86
|
});
|
|
71
87
|
});
|
|
88
|
+
|
|
72
89
|
_defineProperty(_assertThisInitialized(_this), "showSearch", function (inputValue, path) {});
|
|
90
|
+
|
|
73
91
|
_defineProperty(_assertThisInitialized(_this), "getProps", function () {
|
|
74
92
|
var _this$props = _this.props,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
93
|
+
_this$props$options = _this$props.options,
|
|
94
|
+
options = _this$props$options === void 0 ? [] : _this$props$options,
|
|
95
|
+
placeholder = _this$props.placeholder,
|
|
96
|
+
size = _this$props.size,
|
|
97
|
+
value = _this$props.value,
|
|
98
|
+
loadData = _this$props.loadData,
|
|
99
|
+
showSearch = _this$props.showSearch;
|
|
100
|
+
|
|
82
101
|
var props = _Object$assign(getObjectExclude({}, PROPS_KEYS), {
|
|
83
102
|
onChange: _this.onChange,
|
|
84
103
|
value: value,
|
|
@@ -86,24 +105,31 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
|
|
|
86
105
|
changeOnSelect: true,
|
|
87
106
|
placeholder: placeholder,
|
|
88
107
|
size: size
|
|
89
|
-
});
|
|
90
|
-
|
|
108
|
+
}); //动态加载 ps:loadData 与 showSearch 无法一起使用
|
|
109
|
+
|
|
110
|
+
|
|
91
111
|
if (loadData) {
|
|
92
112
|
props.loadData = _this.loadData;
|
|
93
113
|
} else if (showSearch) {
|
|
94
114
|
props.showSearch = _this.showSearch;
|
|
95
115
|
}
|
|
116
|
+
|
|
96
117
|
return props;
|
|
97
118
|
});
|
|
119
|
+
|
|
98
120
|
return _this;
|
|
99
121
|
}
|
|
122
|
+
|
|
100
123
|
_createClass(InputCascader, [{
|
|
101
124
|
key: "render",
|
|
102
125
|
value: function render() {
|
|
103
126
|
return /*#__PURE__*/React.createElement(_Cascader, this.getProps());
|
|
104
127
|
}
|
|
105
128
|
}]);
|
|
129
|
+
|
|
106
130
|
return InputCascader;
|
|
107
131
|
}(React.Component);
|
|
132
|
+
|
|
108
133
|
_defineProperty(InputCascader, "propTypes", PROPS);
|
|
134
|
+
|
|
109
135
|
export default InputCascader;
|