fan-standard-comp 3.1.9 → 3.2.0
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/Readme.md +35 -0
- package/dist/fan-standard-comp.umd.js +15 -10
- package/es/ButtonGroup/ButtonList.js +0 -3
- package/es/ButtonGroup/ButtonMenu.js +0 -3
- package/es/ButtonGroup/PopConfirmTitle.js +5 -15
- package/es/ButtonGroup/index.d.ts +2 -0
- package/es/ButtonGroup/index.js +223 -193
- package/es/ButtonGroup/style/index.less +1 -1
- package/es/DragContent/DragBar.js +2 -6
- package/es/DragContent/index.js +44 -75
- package/es/FormComp/ChunkUploader/api.js +6 -10
- package/es/FormComp/ChunkUploader/index.js +105 -171
- package/es/FormComp/ChunkUploader/lib.js +4 -17
- package/es/FormComp/ChunkUploader/upload-queue.class.js +10 -45
- package/es/FormComp/ChunkUploader/worker.js +0 -3
- package/es/FormComp/EditButton/index.js +24 -49
- package/es/FormComp/FieldComponent/ReUpload.js +18 -38
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +37 -75
- package/es/FormComp/FieldComponent/TitleNode.js +1 -3
- package/es/FormComp/FieldComponent/index.js +38 -74
- package/es/FormComp/FieldComponent/setReadonlyValues.js +34 -63
- package/es/FormComp/FieldComponent/style/index.less +6 -0
- package/es/FormComp/RenderItemGroup/index.js +46 -74
- package/es/FormComp/Uploader/index.js +36 -77
- package/es/FormComp/Uploader/util.js +0 -6
- package/es/FormComp/VarTemplate/index.js +58 -96
- package/es/NavLeafScroll/index.js +172 -154
- package/es/NavLeafScroll/style/index.less +33 -1
- package/es/RefactorTree/index.js +36 -53
- package/es/RefactorTree/indexTreeNode.js +35 -68
- package/es/RefactorTree/util.js +9 -43
- package/es/SpecIcon/fonts/iconfont.js +7 -12
- package/es/SpecIcon/index.js +16 -25
- package/es/SplitterLayout/Pane.js +2 -5
- package/es/SplitterLayout/index.js +20 -70
- package/es/StandardContent/SplitterLayout/Pane.js +6 -10
- package/es/StandardContent/SplitterLayout/index.js +12 -63
- package/es/StandardContent/SubfieldContent.js +12 -14
- package/es/StandardContent/WrapperContent.js +8 -10
- package/es/StandardDragModal/ChangeStandardModal.d.ts +44 -0
- package/es/StandardDragModal/ChangeStandardModal.js +493 -0
- package/es/StandardDragModal/DraggableModal.d.ts +7 -0
- package/es/StandardDragModal/DraggableModal.js +31 -0
- package/es/StandardDragModal/DraggableModalContext.d.ts +9 -0
- package/es/StandardDragModal/DraggableModalContext.js +5 -0
- package/es/StandardDragModal/DraggableModalInner.d.ts +16 -0
- package/es/StandardDragModal/DraggableModalInner.js +114 -0
- package/es/StandardDragModal/DraggableModalProvider.d.ts +4 -0
- package/es/StandardDragModal/DraggableModalProvider.js +40 -0
- package/es/StandardDragModal/Modal.d.ts +11 -0
- package/es/StandardDragModal/Modal.js +24 -0
- package/es/StandardDragModal/ResizeHandle.d.ts +2 -0
- package/es/StandardDragModal/ResizeHandle.js +8 -0
- package/es/StandardDragModal/clamp.d.ts +1 -0
- package/es/StandardDragModal/clamp.js +3 -0
- package/es/StandardDragModal/draggableModalReducer.d.ts +66 -0
- package/es/StandardDragModal/draggableModalReducer.js +157 -0
- package/es/StandardDragModal/getWindowSize.d.ts +4 -0
- package/es/StandardDragModal/getWindowSize.js +6 -0
- package/es/StandardDragModal/index.d.ts +3 -11
- package/es/StandardDragModal/index.js +3 -30
- package/es/StandardDragModal/index.less +65 -0
- package/es/StandardDragModal/useDrag.d.ts +5 -0
- package/es/StandardDragModal/useDrag.js +66 -0
- package/es/StandardDragModal/usePrevious.d.ts +1 -0
- package/es/StandardDragModal/usePrevious.js +8 -0
- package/es/StandardDragModal/useResize.d.ts +7 -0
- package/es/StandardDragModal/useResize.js +74 -0
- package/es/StandardFilter/index.d.ts +1 -0
- package/es/StandardFilter/index.js +32 -70
- package/es/StandardForm/ActionList.js +5 -7
- package/es/StandardForm/StepForm.js +50 -71
- package/es/StandardForm/TabForm.js +58 -70
- package/es/StandardForm/index.js +37 -56
- package/es/StandardModal/UpdateFormRef.js +1 -4
- package/es/StandardModal/index.d.ts +0 -1
- package/es/StandardModal/index.js +115 -159
- package/es/StandardPanel/index.js +19 -35
- package/es/StandardTable/index.js +20 -30
- package/es/components/IconNode/index.js +0 -4
- package/es/index.d.ts +1 -0
- package/es/index.js +15 -14
- package/es/utils/ValueFormat.js +0 -9
- package/es/utils/dictSelectUtil.js +153 -0
- package/es/utils/filterPermission.js +16 -34
- package/es/utils/getParentNodes.js +24 -47
- package/es/utils/index.js +2 -1
- package/lib/ButtonGroup/ButtonList.js +1 -13
- package/lib/ButtonGroup/ButtonMenu.js +1 -8
- package/lib/ButtonGroup/PopConfirmTitle.js +3 -16
- package/lib/ButtonGroup/index.d.ts +2 -0
- package/lib/ButtonGroup/index.js +226 -216
- package/lib/ButtonGroup/style/index.less +1 -1
- package/lib/DragContent/DragBar.js +2 -10
- package/lib/DragContent/index.js +47 -85
- package/lib/FormComp/ChunkUploader/api.js +6 -15
- package/lib/FormComp/ChunkUploader/index.js +107 -185
- package/lib/FormComp/ChunkUploader/lib.js +8 -27
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +10 -46
- package/lib/FormComp/ChunkUploader/worker.js +1 -5
- package/lib/FormComp/EditButton/index.js +26 -60
- package/lib/FormComp/FieldComponent/ReUpload.js +21 -50
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +39 -90
- package/lib/FormComp/FieldComponent/TitleNode.js +1 -5
- package/lib/FormComp/FieldComponent/index.js +38 -110
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +37 -79
- package/lib/FormComp/FieldComponent/style/index.less +6 -0
- package/lib/FormComp/RenderItemGroup/index.js +46 -87
- package/lib/FormComp/Uploader/index.js +38 -95
- package/lib/FormComp/Uploader/util.js +1 -9
- package/lib/FormComp/VarTemplate/index.js +62 -106
- package/lib/FormComp/index.js +0 -2
- package/lib/NavLeafScroll/index.js +174 -165
- package/lib/NavLeafScroll/style/index.less +33 -1
- package/lib/RefactorTree/index.js +36 -67
- package/lib/RefactorTree/indexTreeNode.js +37 -83
- package/lib/RefactorTree/util.js +11 -45
- package/lib/SpecIcon/fonts/iconfont.js +7 -12
- package/lib/SpecIcon/index.js +16 -30
- package/lib/SplitterLayout/Pane.js +0 -7
- package/lib/SplitterLayout/index.js +18 -72
- package/lib/StandardContent/SplitterLayout/Pane.js +6 -14
- package/lib/StandardContent/SplitterLayout/index.js +12 -68
- package/lib/StandardContent/SubfieldContent.js +12 -21
- package/lib/StandardContent/WrapperContent.js +8 -16
- package/lib/StandardDragModal/ChangeStandardModal.d.ts +44 -0
- package/lib/StandardDragModal/ChangeStandardModal.js +502 -0
- package/lib/StandardDragModal/DraggableModal.d.ts +7 -0
- package/lib/StandardDragModal/DraggableModal.js +40 -0
- package/lib/StandardDragModal/DraggableModalContext.d.ts +9 -0
- package/lib/StandardDragModal/DraggableModalContext.js +15 -0
- package/lib/StandardDragModal/DraggableModalInner.d.ts +16 -0
- package/lib/StandardDragModal/DraggableModalInner.js +124 -0
- package/lib/StandardDragModal/DraggableModalProvider.d.ts +4 -0
- package/lib/StandardDragModal/DraggableModalProvider.js +48 -0
- package/lib/StandardDragModal/Modal.d.ts +11 -0
- package/lib/StandardDragModal/Modal.js +32 -0
- package/lib/StandardDragModal/ResizeHandle.d.ts +2 -0
- package/lib/StandardDragModal/ResizeHandle.js +18 -0
- package/lib/StandardDragModal/clamp.d.ts +1 -0
- package/lib/StandardDragModal/clamp.js +10 -0
- package/lib/StandardDragModal/draggableModalReducer.d.ts +66 -0
- package/lib/StandardDragModal/draggableModalReducer.js +167 -0
- package/lib/StandardDragModal/getWindowSize.d.ts +4 -0
- package/lib/StandardDragModal/getWindowSize.js +13 -0
- package/lib/StandardDragModal/index.d.ts +3 -11
- package/lib/StandardDragModal/index.js +33 -38
- package/lib/StandardDragModal/index.less +65 -0
- package/lib/StandardDragModal/useDrag.d.ts +5 -0
- package/lib/StandardDragModal/useDrag.js +73 -0
- package/lib/StandardDragModal/usePrevious.d.ts +1 -0
- package/lib/StandardDragModal/usePrevious.js +15 -0
- package/lib/StandardDragModal/useResize.d.ts +7 -0
- package/lib/StandardDragModal/useResize.js +81 -0
- package/lib/StandardFilter/index.d.ts +1 -0
- package/lib/StandardFilter/index.js +30 -78
- package/lib/StandardForm/ActionList.js +5 -12
- package/lib/StandardForm/StepForm.js +52 -90
- package/lib/StandardForm/TabForm.js +61 -88
- package/lib/StandardForm/index.js +40 -75
- package/lib/StandardModal/UpdateFormRef.js +4 -12
- package/lib/StandardModal/index.d.ts +0 -1
- package/lib/StandardModal/index.js +117 -184
- package/lib/StandardPanel/index.js +22 -48
- package/lib/StandardTable/index.js +20 -39
- package/lib/components/IconNode/index.js +0 -7
- package/lib/components/index.js +0 -2
- package/lib/data/index.js +4 -7
- package/lib/index.d.ts +1 -0
- package/lib/index.js +50 -68
- package/lib/utils/ValueFormat.js +0 -10
- package/lib/utils/dictSelectUtil.js +161 -0
- package/lib/utils/filterPermission.js +15 -39
- package/lib/utils/getParentNodes.js +25 -52
- package/lib/utils/index.js +24 -9
- package/package.json +6 -5
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
2
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
-
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
13
9
|
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); }; }
|
|
14
|
-
|
|
15
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
16
|
-
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
17
11
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import React from 'react'; // import PropTypes from 'prop-types';
|
|
24
|
-
|
|
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; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import React from 'react';
|
|
15
|
+
// import PropTypes from 'prop-types';
|
|
25
16
|
import Pane from './Pane';
|
|
26
17
|
import './index.less';
|
|
27
|
-
|
|
28
18
|
function clearSelection() {
|
|
29
19
|
if (document.body.createTextRange) {
|
|
30
20
|
// https://github.com/zesik/react-splitter-layout/issues/16
|
|
@@ -42,19 +32,13 @@ function clearSelection() {
|
|
|
42
32
|
document.selection.empty();
|
|
43
33
|
}
|
|
44
34
|
}
|
|
45
|
-
|
|
46
35
|
var DEFAULT_SPLITTER_SIZE = 4;
|
|
47
|
-
|
|
48
36
|
var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
49
37
|
_inherits(SplitterLayout, _React$Component);
|
|
50
|
-
|
|
51
38
|
var _super = _createSuper(SplitterLayout);
|
|
52
|
-
|
|
53
39
|
function SplitterLayout(props) {
|
|
54
40
|
var _this;
|
|
55
|
-
|
|
56
41
|
_classCallCheck(this, SplitterLayout);
|
|
57
|
-
|
|
58
42
|
_this = _super.call(this, props);
|
|
59
43
|
_this.handleResize = _this.handleResize.bind(_assertThisInitialized(_this));
|
|
60
44
|
_this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
|
|
@@ -67,7 +51,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
67
51
|
};
|
|
68
52
|
return _this;
|
|
69
53
|
}
|
|
70
|
-
|
|
71
54
|
_createClass(SplitterLayout, [{
|
|
72
55
|
key: "componentDidMount",
|
|
73
56
|
value: function componentDidMount() {
|
|
@@ -77,7 +60,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
77
60
|
document.addEventListener('touchend', this.handleMouseUp);
|
|
78
61
|
document.addEventListener('touchmove', this.handleTouchMove);
|
|
79
62
|
var secondaryPaneSize, primaryPaneSize;
|
|
80
|
-
|
|
81
63
|
if (typeof this.props.secondaryInitialSize !== 'undefined') {
|
|
82
64
|
//设置其余部分大小
|
|
83
65
|
secondaryPaneSize = this.props.secondaryInitialSize;
|
|
@@ -86,10 +68,8 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
86
68
|
//设置主要部分大小
|
|
87
69
|
primaryPaneSize = this.props.primaryInitialSize;
|
|
88
70
|
}
|
|
89
|
-
|
|
90
71
|
var containerRect = this.container.getBoundingClientRect();
|
|
91
72
|
var splitterRect;
|
|
92
|
-
|
|
93
73
|
if (this.splitter) {
|
|
94
74
|
splitterRect = this.splitter.getBoundingClientRect();
|
|
95
75
|
} else {
|
|
@@ -99,9 +79,7 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
99
79
|
height: DEFAULT_SPLITTER_SIZE
|
|
100
80
|
};
|
|
101
81
|
}
|
|
102
|
-
|
|
103
82
|
var totalSize, splitterSize;
|
|
104
|
-
|
|
105
83
|
if (this.props.vertical) {
|
|
106
84
|
//垂直排列
|
|
107
85
|
totalSize = containerRect.height;
|
|
@@ -109,16 +87,14 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
109
87
|
} else {
|
|
110
88
|
totalSize = containerRect.width;
|
|
111
89
|
splitterSize = splitterRect.width;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
90
|
+
}
|
|
91
|
+
//计算目标对象位置
|
|
115
92
|
var primarySize = this.props.primaryIndex === 1 ? totalSize - splitterSize - primaryPaneSize : primaryPaneSize || (totalSize - splitterSize) / 2;
|
|
116
93
|
secondaryPaneSize = this.getSecondaryPaneSize(containerRect, splitterRect, {
|
|
117
94
|
left: containerRect.left + primarySize,
|
|
118
95
|
top: containerRect.top + primarySize
|
|
119
96
|
}, false);
|
|
120
97
|
}
|
|
121
|
-
|
|
122
98
|
this.setState({
|
|
123
99
|
secondaryPaneSize: secondaryPaneSize
|
|
124
100
|
});
|
|
@@ -129,7 +105,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
129
105
|
if (prevState.secondaryPaneSize !== this.state.secondaryPaneSize && this.props.onSecondaryPaneSizeChange) {
|
|
130
106
|
this.props.onSecondaryPaneSizeChange(this.state.secondaryPaneSize);
|
|
131
107
|
}
|
|
132
|
-
|
|
133
108
|
if (prevState.resizing !== this.state.resizing) {
|
|
134
109
|
if (this.state.resizing) {
|
|
135
110
|
if (this.props.onDragStart) {
|
|
@@ -149,27 +124,21 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
149
124
|
document.removeEventListener('touchend', this.handleMouseUp);
|
|
150
125
|
document.removeEventListener('touchmove', this.handleTouchMove);
|
|
151
126
|
} //获取第二块内容宽度or高度
|
|
152
|
-
|
|
153
127
|
}, {
|
|
154
128
|
key: "getSecondaryPaneSize",
|
|
155
129
|
value: function getSecondaryPaneSize(containerRect, splitterRect, clientPosition, offsetMouse) {
|
|
156
130
|
var totalSize;
|
|
157
131
|
var splitterSize;
|
|
158
132
|
var offset;
|
|
159
|
-
|
|
160
133
|
if (this.props.vertical) {
|
|
161
134
|
//垂直排列
|
|
162
135
|
totalSize = containerRect.height; //总高度
|
|
163
|
-
|
|
164
136
|
splitterSize = splitterRect.height; //划分条高度
|
|
165
|
-
|
|
166
137
|
offset = clientPosition.top - containerRect.top; //移动位置减去原始位置
|
|
167
138
|
} else {
|
|
168
139
|
//默认水平排列
|
|
169
140
|
totalSize = containerRect.width; //总宽度
|
|
170
|
-
|
|
171
141
|
splitterSize = splitterRect.width; //划分条宽度
|
|
172
|
-
|
|
173
142
|
offset = clientPosition.left - containerRect.left; //移动位置减去原始位置
|
|
174
143
|
}
|
|
175
144
|
|
|
@@ -177,25 +146,20 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
177
146
|
//移动
|
|
178
147
|
offset -= splitterSize / 2;
|
|
179
148
|
}
|
|
180
|
-
|
|
181
149
|
if (offset < 0) {
|
|
182
150
|
offset = 0;
|
|
183
151
|
} else if (offset > totalSize - splitterSize) {
|
|
184
152
|
//移动超过容器大小
|
|
185
153
|
offset = totalSize - splitterSize;
|
|
186
154
|
}
|
|
187
|
-
|
|
188
155
|
var secondaryPaneSize;
|
|
189
|
-
|
|
190
156
|
if (this.props.primaryIndex === 1) {
|
|
191
157
|
//目标对象是1
|
|
192
158
|
secondaryPaneSize = offset;
|
|
193
159
|
} else {
|
|
194
160
|
secondaryPaneSize = totalSize - splitterSize - offset;
|
|
195
161
|
}
|
|
196
|
-
|
|
197
162
|
var primaryPaneSize = totalSize - splitterSize - secondaryPaneSize;
|
|
198
|
-
|
|
199
163
|
if (this.props.percentage) {
|
|
200
164
|
//百分比
|
|
201
165
|
secondaryPaneSize = secondaryPaneSize * 100 / totalSize;
|
|
@@ -203,13 +167,11 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
203
167
|
splitterSize = splitterSize * 100 / totalSize;
|
|
204
168
|
totalSize = 100;
|
|
205
169
|
}
|
|
206
|
-
|
|
207
170
|
if (primaryPaneSize < this.props.primaryMinSize) {
|
|
208
171
|
secondaryPaneSize = Math.max(secondaryPaneSize - (this.props.primaryMinSize - primaryPaneSize), 0);
|
|
209
172
|
} else if (secondaryPaneSize < this.props.secondaryMinSize) {
|
|
210
173
|
secondaryPaneSize = Math.min(totalSize - splitterSize - this.props.primaryMinSize, this.props.secondaryMinSize);
|
|
211
174
|
}
|
|
212
|
-
|
|
213
175
|
return secondaryPaneSize;
|
|
214
176
|
}
|
|
215
177
|
}, {
|
|
@@ -269,40 +231,32 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
269
231
|
key: "render",
|
|
270
232
|
value: function render() {
|
|
271
233
|
var _this2 = this;
|
|
272
|
-
|
|
273
234
|
var _this$props = this.props,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
235
|
+
customClassName = _this$props.customClassName,
|
|
236
|
+
vertical = _this$props.vertical,
|
|
237
|
+
_this$props$partClass = _this$props.partClassNames,
|
|
238
|
+
partClassNames = _this$props$partClass === void 0 ? [] : _this$props$partClass,
|
|
239
|
+
_this$props$partStyle = _this$props.partStyles,
|
|
240
|
+
partStyles = _this$props$partStyle === void 0 ? [] : _this$props$partStyle;
|
|
280
241
|
var containerClasses = "splitter-layout ".concat(customClassName || '').concat(vertical ? ' splitter-layout-vertical' : '');
|
|
281
|
-
|
|
282
242
|
if (this.state.resizing) {
|
|
283
243
|
containerClasses += ' layout-changing';
|
|
284
244
|
}
|
|
285
|
-
|
|
286
245
|
var children = React.Children.toArray(this.props.children).slice(0, 2);
|
|
287
|
-
|
|
288
246
|
if (children.length === 0) {
|
|
289
247
|
children.push( /*#__PURE__*/React.createElement("div", null));
|
|
290
248
|
}
|
|
291
|
-
|
|
292
249
|
var wrappedChildren = [];
|
|
293
250
|
var primaryIndex = this.props.primaryIndex !== 0 && this.props.primaryIndex !== 1 ? 0 : this.props.primaryIndex;
|
|
294
|
-
|
|
295
251
|
for (var i = 0; i < children.length; ++i) {
|
|
296
252
|
var primary = true;
|
|
297
253
|
var size = null;
|
|
298
254
|
var classname = partClassNames === null || partClassNames === void 0 ? void 0 : partClassNames[i];
|
|
299
255
|
var styleObj = partStyles === null || partStyles === void 0 ? void 0 : partStyles[i];
|
|
300
|
-
|
|
301
256
|
if (children.length > 1 && i !== primaryIndex) {
|
|
302
257
|
primary = false;
|
|
303
258
|
size = this.state.secondaryPaneSize;
|
|
304
259
|
}
|
|
305
|
-
|
|
306
260
|
wrappedChildren.push( /*#__PURE__*/React.createElement(Pane, {
|
|
307
261
|
vertical: vertical,
|
|
308
262
|
percentage: this.props.percentage,
|
|
@@ -312,7 +266,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
312
266
|
paneStyle: styleObj
|
|
313
267
|
}, children[i]));
|
|
314
268
|
}
|
|
315
|
-
|
|
316
269
|
return /*#__PURE__*/React.createElement("div", {
|
|
317
270
|
className: containerClasses,
|
|
318
271
|
style: this.props.containerStyle,
|
|
@@ -331,7 +284,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
331
284
|
}), wrappedChildren.length > 1 && wrappedChildren[1]);
|
|
332
285
|
}
|
|
333
286
|
}]);
|
|
334
|
-
|
|
335
287
|
return SplitterLayout;
|
|
336
288
|
}(React.Component); //
|
|
337
289
|
// SplitterLayout.propTypes = {
|
|
@@ -370,6 +322,4 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
370
322
|
// onSecondaryPaneSizeChange: null,
|
|
371
323
|
// children: []
|
|
372
324
|
// };
|
|
373
|
-
|
|
374
|
-
|
|
375
325
|
export default SplitterLayout;
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import './index.less';
|
|
10
|
-
|
|
11
10
|
function Pane(props) {
|
|
12
11
|
var size = props.size || 0;
|
|
13
12
|
var unit = props.percentage ? '%' : 'px';
|
|
14
13
|
var classes = "".concat(props.paneClassName, " layout-pane ");
|
|
15
14
|
var style = {};
|
|
16
|
-
|
|
17
15
|
if (!props.primary) {
|
|
18
16
|
if (props.vertical) {
|
|
19
17
|
style.height = "".concat(size).concat(unit);
|
|
@@ -23,13 +21,11 @@ function Pane(props) {
|
|
|
23
21
|
} else {
|
|
24
22
|
classes += ' layout-pane-primary';
|
|
25
23
|
}
|
|
26
|
-
|
|
27
24
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
25
|
className: classes,
|
|
29
26
|
style: _objectSpread(_objectSpread({}, props.paneStyle), style)
|
|
30
27
|
}, props.children);
|
|
31
28
|
}
|
|
32
|
-
|
|
33
29
|
Pane.propTypes = {
|
|
34
30
|
paneClassName: PropTypes.string,
|
|
35
31
|
paneStyle: PropTypes.object,
|
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
2
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
-
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
13
9
|
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); }; }
|
|
14
|
-
|
|
15
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
16
|
-
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
17
11
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
-
|
|
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; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
14
|
import React from 'react';
|
|
24
15
|
import PropTypes from 'prop-types';
|
|
25
16
|
import Pane from './Pane';
|
|
26
17
|
import './index.less';
|
|
27
|
-
|
|
28
18
|
function clearSelection() {
|
|
29
19
|
if (document.body.createTextRange) {
|
|
30
20
|
// https://github.com/zesik/react-splitter-layout/issues/16
|
|
@@ -42,19 +32,13 @@ function clearSelection() {
|
|
|
42
32
|
document.selection.empty();
|
|
43
33
|
}
|
|
44
34
|
}
|
|
45
|
-
|
|
46
35
|
var DEFAULT_SPLITTER_SIZE = 4;
|
|
47
|
-
|
|
48
36
|
var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
49
37
|
_inherits(SplitterLayout, _React$Component);
|
|
50
|
-
|
|
51
38
|
var _super = _createSuper(SplitterLayout);
|
|
52
|
-
|
|
53
39
|
function SplitterLayout(props) {
|
|
54
40
|
var _this;
|
|
55
|
-
|
|
56
41
|
_classCallCheck(this, SplitterLayout);
|
|
57
|
-
|
|
58
42
|
_this = _super.call(this, props);
|
|
59
43
|
_this.handleResize = _this.handleResize.bind(_assertThisInitialized(_this));
|
|
60
44
|
_this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
|
|
@@ -67,7 +51,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
67
51
|
};
|
|
68
52
|
return _this;
|
|
69
53
|
}
|
|
70
|
-
|
|
71
54
|
_createClass(SplitterLayout, [{
|
|
72
55
|
key: "componentDidMount",
|
|
73
56
|
value: function componentDidMount() {
|
|
@@ -77,7 +60,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
77
60
|
document.addEventListener('touchend', this.handleMouseUp);
|
|
78
61
|
document.addEventListener('touchmove', this.handleTouchMove);
|
|
79
62
|
var secondaryPaneSize, primaryPaneSize;
|
|
80
|
-
|
|
81
63
|
if (typeof this.props.secondaryInitialSize !== 'undefined') {
|
|
82
64
|
//设置其余部分大小
|
|
83
65
|
secondaryPaneSize = this.props.secondaryInitialSize;
|
|
@@ -86,10 +68,8 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
86
68
|
//设置主要部分大小
|
|
87
69
|
primaryPaneSize = this.props.primaryInitialSize;
|
|
88
70
|
}
|
|
89
|
-
|
|
90
71
|
var containerRect = this.container.getBoundingClientRect();
|
|
91
72
|
var splitterRect;
|
|
92
|
-
|
|
93
73
|
if (this.splitter) {
|
|
94
74
|
splitterRect = this.splitter.getBoundingClientRect();
|
|
95
75
|
} else {
|
|
@@ -99,9 +79,7 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
99
79
|
height: DEFAULT_SPLITTER_SIZE
|
|
100
80
|
};
|
|
101
81
|
}
|
|
102
|
-
|
|
103
82
|
var totalSize, splitterSize;
|
|
104
|
-
|
|
105
83
|
if (this.props.vertical) {
|
|
106
84
|
//垂直排列
|
|
107
85
|
totalSize = containerRect.height;
|
|
@@ -109,16 +87,14 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
109
87
|
} else {
|
|
110
88
|
totalSize = containerRect.width;
|
|
111
89
|
splitterSize = splitterRect.width;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
90
|
+
}
|
|
91
|
+
//计算目标对象位置
|
|
115
92
|
var primarySize = this.props.primaryIndex === 1 ? totalSize - splitterSize - primaryPaneSize : primaryPaneSize || (totalSize - splitterSize) / 2;
|
|
116
93
|
secondaryPaneSize = this.getSecondaryPaneSize(containerRect, splitterRect, {
|
|
117
94
|
left: containerRect.left + primarySize,
|
|
118
95
|
top: containerRect.top + primarySize
|
|
119
96
|
}, false);
|
|
120
97
|
}
|
|
121
|
-
|
|
122
98
|
this.setState({
|
|
123
99
|
secondaryPaneSize: secondaryPaneSize
|
|
124
100
|
});
|
|
@@ -129,7 +105,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
129
105
|
if (prevState.secondaryPaneSize !== this.state.secondaryPaneSize && this.props.onSecondaryPaneSizeChange) {
|
|
130
106
|
this.props.onSecondaryPaneSizeChange(this.state.secondaryPaneSize);
|
|
131
107
|
}
|
|
132
|
-
|
|
133
108
|
if (prevState.resizing !== this.state.resizing) {
|
|
134
109
|
if (this.state.resizing) {
|
|
135
110
|
if (this.props.onDragStart) {
|
|
@@ -149,27 +124,21 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
149
124
|
document.removeEventListener('touchend', this.handleMouseUp);
|
|
150
125
|
document.removeEventListener('touchmove', this.handleTouchMove);
|
|
151
126
|
} //获取第二块内容宽度or高度
|
|
152
|
-
|
|
153
127
|
}, {
|
|
154
128
|
key: "getSecondaryPaneSize",
|
|
155
129
|
value: function getSecondaryPaneSize(containerRect, splitterRect, clientPosition, offsetMouse) {
|
|
156
130
|
var totalSize;
|
|
157
131
|
var splitterSize;
|
|
158
132
|
var offset;
|
|
159
|
-
|
|
160
133
|
if (this.props.vertical) {
|
|
161
134
|
//垂直排列
|
|
162
135
|
totalSize = containerRect.height; //总高度
|
|
163
|
-
|
|
164
136
|
splitterSize = splitterRect.height; //划分条高度
|
|
165
|
-
|
|
166
137
|
offset = clientPosition.top - containerRect.top; //移动位置减去原始位置
|
|
167
138
|
} else {
|
|
168
139
|
//默认水平排列
|
|
169
140
|
totalSize = containerRect.width; //总宽度
|
|
170
|
-
|
|
171
141
|
splitterSize = splitterRect.width; //划分条宽度
|
|
172
|
-
|
|
173
142
|
offset = clientPosition.left - containerRect.left; //移动位置减去原始位置
|
|
174
143
|
}
|
|
175
144
|
|
|
@@ -177,25 +146,20 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
177
146
|
//移动
|
|
178
147
|
offset -= splitterSize / 2;
|
|
179
148
|
}
|
|
180
|
-
|
|
181
149
|
if (offset < 0) {
|
|
182
150
|
offset = 0;
|
|
183
151
|
} else if (offset > totalSize - splitterSize) {
|
|
184
152
|
//移动超过容器大小
|
|
185
153
|
offset = totalSize - splitterSize;
|
|
186
154
|
}
|
|
187
|
-
|
|
188
155
|
var secondaryPaneSize;
|
|
189
|
-
|
|
190
156
|
if (this.props.primaryIndex === 1) {
|
|
191
157
|
//目标对象是1
|
|
192
158
|
secondaryPaneSize = offset;
|
|
193
159
|
} else {
|
|
194
160
|
secondaryPaneSize = totalSize - splitterSize - offset;
|
|
195
161
|
}
|
|
196
|
-
|
|
197
162
|
var primaryPaneSize = totalSize - splitterSize - secondaryPaneSize;
|
|
198
|
-
|
|
199
163
|
if (this.props.percentage) {
|
|
200
164
|
//百分比
|
|
201
165
|
secondaryPaneSize = secondaryPaneSize * 100 / totalSize;
|
|
@@ -203,13 +167,11 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
203
167
|
splitterSize = splitterSize * 100 / totalSize;
|
|
204
168
|
totalSize = 100;
|
|
205
169
|
}
|
|
206
|
-
|
|
207
170
|
if (primaryPaneSize < this.props.primaryMinSize) {
|
|
208
171
|
secondaryPaneSize = Math.max(secondaryPaneSize - (this.props.primaryMinSize - primaryPaneSize), 0);
|
|
209
172
|
} else if (secondaryPaneSize < this.props.secondaryMinSize) {
|
|
210
173
|
secondaryPaneSize = Math.min(totalSize - splitterSize - this.props.primaryMinSize, this.props.secondaryMinSize);
|
|
211
174
|
}
|
|
212
|
-
|
|
213
175
|
return secondaryPaneSize;
|
|
214
176
|
}
|
|
215
177
|
}, {
|
|
@@ -269,41 +231,31 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
269
231
|
key: "render",
|
|
270
232
|
value: function render() {
|
|
271
233
|
var _this2 = this;
|
|
272
|
-
|
|
273
234
|
var containerClasses = 'splitter-layout';
|
|
274
|
-
|
|
275
235
|
if (this.props.customClassName) {
|
|
276
236
|
containerClasses += " ".concat(this.props.customClassName);
|
|
277
237
|
}
|
|
278
|
-
|
|
279
238
|
if (this.props.vertical) {
|
|
280
239
|
containerClasses += ' splitter-layout-vertical';
|
|
281
240
|
}
|
|
282
|
-
|
|
283
241
|
if (this.state.resizing) {
|
|
284
242
|
containerClasses += ' layout-changing';
|
|
285
243
|
}
|
|
286
|
-
|
|
287
244
|
var children = React.Children.toArray(this.props.children).slice(0, 2);
|
|
288
|
-
|
|
289
245
|
if (children.length === 0) {
|
|
290
246
|
children.push( /*#__PURE__*/React.createElement("div", null));
|
|
291
247
|
}
|
|
292
|
-
|
|
293
248
|
var wrappedChildren = [];
|
|
294
249
|
var primaryIndex = this.props.primaryIndex !== 0 && this.props.primaryIndex !== 1 ? 0 : this.props.primaryIndex;
|
|
295
|
-
|
|
296
250
|
for (var i = 0; i < children.length; ++i) {
|
|
297
251
|
var primary = true;
|
|
298
252
|
var size = null;
|
|
299
253
|
var classname = this.props.partClassNames[i];
|
|
300
254
|
var styleObj = this.props.partStyles[i];
|
|
301
|
-
|
|
302
255
|
if (children.length > 1 && i !== primaryIndex) {
|
|
303
256
|
primary = false;
|
|
304
257
|
size = this.state.secondaryPaneSize;
|
|
305
258
|
}
|
|
306
|
-
|
|
307
259
|
wrappedChildren.push( /*#__PURE__*/React.createElement(Pane, {
|
|
308
260
|
vertical: this.props.vertical,
|
|
309
261
|
percentage: this.props.percentage,
|
|
@@ -313,7 +265,6 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
313
265
|
paneStyle: styleObj
|
|
314
266
|
}, children[i]));
|
|
315
267
|
}
|
|
316
|
-
|
|
317
268
|
return /*#__PURE__*/React.createElement("div", {
|
|
318
269
|
className: containerClasses,
|
|
319
270
|
style: this.props.containerStyle,
|
|
@@ -332,10 +283,8 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
332
283
|
}), wrappedChildren.length > 1 && wrappedChildren[1]);
|
|
333
284
|
}
|
|
334
285
|
}]);
|
|
335
|
-
|
|
336
286
|
return SplitterLayout;
|
|
337
287
|
}(React.Component);
|
|
338
|
-
|
|
339
288
|
SplitterLayout.propTypes = {
|
|
340
289
|
containerStyle: PropTypes.object,
|
|
341
290
|
customClassName: PropTypes.string,
|
|
@@ -4,21 +4,20 @@ import React from 'react';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import DragContent from '../DragContent';
|
|
6
6
|
import './style/index.less';
|
|
7
|
-
|
|
8
7
|
var SubfieldContent = function SubfieldContent(props) {
|
|
9
8
|
var _props$leftSiderWidth = props.leftSiderWidth,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
leftSiderWidth = _props$leftSiderWidth === void 0 ? 180 : _props$leftSiderWidth,
|
|
10
|
+
leftSiderNode = props.leftSiderNode,
|
|
11
|
+
children = props.children,
|
|
12
|
+
className = props.className,
|
|
13
|
+
style = props.style,
|
|
14
|
+
leftSiderClassName = props.leftSiderClassName,
|
|
15
|
+
_props$loading = props.loading,
|
|
16
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
17
|
+
loadingTip = props.loadingTip,
|
|
18
|
+
leftSiderDragDirection = props.leftSiderDragDirection,
|
|
19
|
+
leftSiderMoveMaxWidth = props.leftSiderMoveMaxWidth,
|
|
20
|
+
leftSiderMoveMaxHeight = props.leftSiderMoveMaxHeight;
|
|
22
21
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
22
|
className: classNames('spec-grid-content', loading ? 'spec-grid-content-loading' : '', className),
|
|
24
23
|
style: style
|
|
@@ -37,5 +36,4 @@ var SubfieldContent = function SubfieldContent(props) {
|
|
|
37
36
|
className: 'spec-grid-right'
|
|
38
37
|
}, children));
|
|
39
38
|
};
|
|
40
|
-
|
|
41
39
|
export default SubfieldContent;
|
|
@@ -3,17 +3,16 @@ import _Spin from "antd/es/spin";
|
|
|
3
3
|
import './style/index.less';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
|
|
7
6
|
var WrapperContent = function WrapperContent(props) {
|
|
8
7
|
var children = props.children,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
light = props.light,
|
|
9
|
+
className = props.className,
|
|
10
|
+
style = props.style,
|
|
11
|
+
_props$noMargin = props.noMargin,
|
|
12
|
+
noMargin = _props$noMargin === void 0 ? false : _props$noMargin,
|
|
13
|
+
_props$loading = props.loading,
|
|
14
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
15
|
+
loadingTip = props.loadingTip;
|
|
17
16
|
var defaultClassName = 'spec-wrapper-content';
|
|
18
17
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
18
|
className: classNames(defaultClassName, className, loading ? 'spec-wrapper-content-loading' : '', noMargin ? 'has-margin' : ''),
|
|
@@ -25,5 +24,4 @@ var WrapperContent = function WrapperContent(props) {
|
|
|
25
24
|
className: "light-block"
|
|
26
25
|
}, " ", children) : children);
|
|
27
26
|
};
|
|
28
|
-
|
|
29
27
|
export default WrapperContent;
|