fan-standard-comp 3.1.10 → 3.2.1

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