fan-standard-comp 3.0.13 → 3.0.16
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 +0 -2
- package/dist/{f26952c118ab6cdcd23dc0028ee98c11.svg → e8686421bcdc3738ee1c41da9fa770d7.svg} +0 -0
- package/dist/fan-standard-comp.umd.js +16 -16
- package/es/ButtonGroup/ButtonList.js +36 -18
- package/es/ButtonGroup/ButtonMenu.js +27 -14
- package/es/ButtonGroup/PopConfirmTitle.js +16 -5
- package/es/ButtonGroup/index.js +131 -82
- package/es/DragContent/DragBar.js +18 -6
- package/es/DragContent/index.js +30 -12
- package/es/FormComp/ChunkUploader/api.js +21 -8
- package/es/FormComp/ChunkUploader/index.js +46 -27
- package/es/FormComp/ChunkUploader/lib.js +26 -9
- package/es/FormComp/ChunkUploader/upload-queue.class.js +12 -5
- package/es/FormComp/ChunkUploader/worker.js +7 -2
- package/es/FormComp/EditButton/index.js +35 -16
- package/es/FormComp/FieldComponent/ReUpload.js +38 -18
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +49 -26
- package/es/FormComp/FieldComponent/TitleNode.js +13 -3
- package/es/FormComp/FieldComponent/index.js +112 -72
- package/es/FormComp/FieldComponent/setReadonlyValues.js +55 -28
- package/es/FormComp/RenderItemGroup/index.d.ts +9 -1
- package/es/FormComp/RenderItemGroup/index.js +63 -36
- package/es/FormComp/Uploader/index.js +64 -38
- package/es/FormComp/Uploader/util.js +11 -2
- package/es/FormComp/VarTemplate/index.js +44 -31
- package/es/FormComp/index.js +15 -1
- package/es/NavLeafScroll/index.js +53 -35
- package/es/RefactorTree/index.js +52 -29
- package/es/RefactorTree/indexTreeNode.js +54 -31
- package/es/RefactorTree/style/index.js +3 -1
- package/es/RefactorTree/util.js +18 -10
- package/es/SpecIcon/fonts/iconfont.js +2 -0
- package/es/SpecIcon/index.js +30 -17
- package/es/SplitterLayout/Pane.js +17 -5
- package/es/SplitterLayout/index.js +24 -13
- package/es/StandardContent/SplitterLayout/Pane.js +25 -13
- package/es/StandardContent/SplitterLayout/index.js +43 -30
- package/es/StandardContent/SubfieldContent.js +28 -13
- package/es/StandardContent/WrapperContent.js +24 -10
- package/es/StandardFilter/index.js +46 -27
- package/es/StandardForm/ActionList.js +21 -8
- package/es/StandardForm/StepForm.d.ts +1 -1
- package/es/StandardForm/StepForm.js +72 -41
- package/es/StandardForm/TabForm.d.ts +1 -1
- package/es/StandardForm/TabForm.js +56 -27
- package/es/StandardForm/index.d.ts +3 -1
- package/es/StandardForm/index.js +57 -28
- package/es/StandardModal/UpdateFormRef.js +18 -4
- package/es/StandardModal/index.d.ts +1 -1
- package/es/StandardModal/index.js +106 -62
- package/es/StandardPanel/index.js +53 -32
- package/es/StandardTable/index.js +34 -17
- package/es/StandardTable/style/index.js +3 -1
- package/es/components/IconNode/index.js +17 -6
- package/es/components/index.js +15 -2
- package/es/data/func.code.js +9 -2
- package/es/data/general.config.js +9 -2
- package/es/data/index.js +23 -3
- package/es/index.js +229 -24
- package/es/utils/ValueFormat.js +9 -1
- package/es/utils/filterPermission.js +20 -4
- package/es/utils/getParentNodes.js +12 -1
- package/es/utils/index.js +35 -3
- package/lib/ButtonGroup/ButtonList.js +9 -9
- package/lib/ButtonGroup/ButtonMenu.js +11 -11
- package/lib/ButtonGroup/PopConfirmTitle.js +5 -5
- package/lib/ButtonGroup/index.js +75 -56
- package/lib/DragContent/DragBar.js +5 -5
- package/lib/DragContent/index.js +7 -7
- package/lib/FormComp/ChunkUploader/api.js +4 -4
- package/lib/FormComp/ChunkUploader/index.js +10 -10
- package/lib/FormComp/ChunkUploader/lib.js +2 -2
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +2 -2
- package/lib/FormComp/ChunkUploader/worker.js +2 -2
- package/lib/FormComp/EditButton/index.js +10 -10
- package/lib/FormComp/FieldComponent/ReUpload.js +9 -9
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +16 -16
- package/lib/FormComp/FieldComponent/TitleNode.js +4 -4
- package/lib/FormComp/FieldComponent/index.js +36 -36
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +17 -17
- package/lib/FormComp/RenderItemGroup/index.d.ts +9 -1
- package/lib/FormComp/RenderItemGroup/index.js +30 -24
- package/lib/FormComp/Uploader/index.js +16 -16
- package/lib/FormComp/VarTemplate/index.js +23 -25
- package/lib/FormComp/index.js +2 -2
- package/lib/NavLeafScroll/index.js +28 -28
- package/lib/RefactorTree/index.js +14 -14
- package/lib/RefactorTree/indexTreeNode.js +19 -19
- package/lib/SpecIcon/index.js +13 -13
- package/lib/SplitterLayout/Pane.js +4 -4
- package/lib/SplitterLayout/index.js +10 -10
- package/lib/StandardContent/SplitterLayout/Pane.js +11 -11
- package/lib/StandardContent/SplitterLayout/index.js +27 -27
- package/lib/StandardContent/SubfieldContent.js +9 -9
- package/lib/StandardContent/WrapperContent.js +7 -7
- package/lib/StandardFilter/index.js +18 -18
- package/lib/StandardForm/ActionList.js +6 -6
- package/lib/StandardForm/StepForm.d.ts +1 -1
- package/lib/StandardForm/StepForm.js +30 -27
- package/lib/StandardForm/TabForm.d.ts +1 -1
- package/lib/StandardForm/TabForm.js +17 -14
- package/lib/StandardForm/index.d.ts +3 -1
- package/lib/StandardForm/index.js +17 -15
- package/lib/StandardModal/UpdateFormRef.js +4 -4
- package/lib/StandardModal/index.d.ts +1 -1
- package/lib/StandardModal/index.js +53 -39
- package/lib/StandardPanel/index.js +23 -23
- package/lib/StandardTable/index.js +8 -8
- package/lib/components/IconNode/index.js +6 -6
- package/lib/components/index.js +2 -2
- package/lib/data/func.code.js +2 -2
- package/lib/data/general.config.js +2 -2
- package/lib/data/index.js +3 -3
- package/lib/index.js +22 -22
- package/lib/utils/ValueFormat.js +2 -2
- package/lib/utils/filterPermission.js +2 -2
- package/lib/utils/index.js +2 -2
- package/package.json +1 -1
package/es/SpecIcon/index.js
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _tslib = require("tslib");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
require("./style/index.less");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
5
17
|
|
|
6
18
|
require('./fonts/iconfont.js'); // import './fonts/iconfont.js';
|
|
7
19
|
|
|
8
20
|
|
|
9
|
-
var SpecIcon = /*#__PURE__*/
|
|
21
|
+
var SpecIcon = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
10
22
|
var _props$type = props.type,
|
|
11
23
|
type = _props$type === void 0 ? "colour" : _props$type,
|
|
12
24
|
name = props.name,
|
|
@@ -21,8 +33,7 @@ var SpecIcon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
21
33
|
_props$noPrefix = props.noPrefix,
|
|
22
34
|
noPrefix = _props$noPrefix === void 0 ? false : _props$noPrefix,
|
|
23
35
|
className = props.className,
|
|
24
|
-
otherProps = __rest(props, ["type", "name", "size", "status", "round", "title", "onClick", "style", "prefix", "noPrefix", "className"]);
|
|
25
|
-
|
|
36
|
+
otherProps = (0, _tslib.__rest)(props, ["type", "name", "size", "status", "round", "title", "onClick", "style", "prefix", "noPrefix", "className"]);
|
|
26
37
|
var extraClassName = '';
|
|
27
38
|
if (status) extraClassName += " is-".concat(status);
|
|
28
39
|
var fontStyle = {};
|
|
@@ -35,8 +46,8 @@ var SpecIcon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
35
46
|
|
|
36
47
|
var renderIconFont = function renderIconFont() {
|
|
37
48
|
if (round) extraClassName += " is-round";
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
-
className:
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement("i", Object.assign({
|
|
50
|
+
className: (0, _classnames["default"])("specicon", "specicon-font", noPrefix ? '' : "".concat(prefix, "font"), noPrefix ? "".concat(name) : "".concat(prefix ? prefix + '-' : '').concat(name), extraClassName, name === 'loading' ? 'anticon-spin' : '', className),
|
|
40
51
|
title: title,
|
|
41
52
|
onClick: onClick,
|
|
42
53
|
style: Object.assign(Object.assign({}, fontStyle), style),
|
|
@@ -46,32 +57,34 @@ var SpecIcon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
46
57
|
|
|
47
58
|
var renderIconSvg = function renderIconSvg() {
|
|
48
59
|
var baseElement = function baseElement() {
|
|
49
|
-
return /*#__PURE__*/
|
|
50
|
-
className:
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement("i", Object.assign({
|
|
61
|
+
className: (0, _classnames["default"])("specicon", 'anticon', noPrefix ? "".concat(name, "-svg") : "".concat(prefix ? prefix + '-' : '').concat(name, "-svg"), !round && extraClassName, className),
|
|
51
62
|
style: Object.assign(Object.assign({}, fontStyle), style),
|
|
52
63
|
title: title,
|
|
53
64
|
onClick: onClick,
|
|
54
65
|
ref: ref
|
|
55
|
-
}, otherProps), /*#__PURE__*/
|
|
66
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement("svg", {
|
|
56
67
|
width: "1em",
|
|
57
68
|
height: "1em",
|
|
58
69
|
fill: "currentColor",
|
|
59
70
|
"aria-hidden": "true",
|
|
60
71
|
focusable: "false",
|
|
61
72
|
className: name === 'loading' ? 'anticon-spin' : ''
|
|
62
|
-
}, noPrefix ? /*#__PURE__*/
|
|
73
|
+
}, noPrefix ? /*#__PURE__*/_react["default"].createElement("use", {
|
|
63
74
|
xlinkHref: "#".concat(name)
|
|
64
|
-
}) : /*#__PURE__*/
|
|
75
|
+
}) : /*#__PURE__*/_react["default"].createElement("use", {
|
|
65
76
|
xlinkHref: "#".concat(prefix ? prefix + '-' : '').concat(name)
|
|
66
77
|
})));
|
|
67
78
|
};
|
|
68
79
|
|
|
69
|
-
return round ? /*#__PURE__*/
|
|
70
|
-
className:
|
|
80
|
+
return round ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
+
className: (0, _classnames["default"])('specicon-round', status && "is-".concat(status))
|
|
71
82
|
}, baseElement()) : baseElement();
|
|
72
83
|
}; // 去除引入 font图标
|
|
73
84
|
|
|
74
85
|
|
|
75
86
|
return type === 'colour' ? renderIconSvg() : renderIconFont();
|
|
76
87
|
});
|
|
77
|
-
|
|
88
|
+
|
|
89
|
+
var _default = SpecIcon;
|
|
90
|
+
exports["default"] = _default;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
require("./index.less");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
//
|
|
3
15
|
// Pane.defaultProps = {
|
|
4
16
|
// paneClassName:'',
|
|
5
17
|
// vertical: false,
|
|
@@ -8,7 +20,6 @@ import './index.less'; //
|
|
|
8
20
|
// percentage: false,
|
|
9
21
|
// children: []
|
|
10
22
|
// };
|
|
11
|
-
|
|
12
23
|
function Pane(props) {
|
|
13
24
|
var size = props.size || 0;
|
|
14
25
|
var unit = props.percentage ? '%' : 'px';
|
|
@@ -27,10 +38,11 @@ function Pane(props) {
|
|
|
27
38
|
classes += ' layout-pane-primary';
|
|
28
39
|
}
|
|
29
40
|
|
|
30
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
42
|
className: classes,
|
|
32
43
|
style: Object.assign(Object.assign({}, props.paneStyle), style)
|
|
33
44
|
}, props.children);
|
|
34
45
|
}
|
|
35
46
|
|
|
36
|
-
|
|
47
|
+
var _default = Pane;
|
|
48
|
+
exports["default"] = _default;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
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); }
|
|
2
4
|
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Pane = _interopRequireDefault(require("./Pane"));
|
|
13
|
+
|
|
14
|
+
require("./index.less");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
3
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
19
|
|
|
5
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); } }
|
|
@@ -16,15 +31,10 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
|
16
31
|
|
|
17
32
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
33
|
|
|
19
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
34
|
+
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; } }
|
|
20
35
|
|
|
21
36
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
37
|
|
|
23
|
-
import React from 'react'; // import PropTypes from 'prop-types';
|
|
24
|
-
|
|
25
|
-
import Pane from './Pane';
|
|
26
|
-
import './index.less';
|
|
27
|
-
|
|
28
38
|
function clearSelection() {
|
|
29
39
|
if (document.body.createTextRange) {
|
|
30
40
|
// https://github.com/zesik/react-splitter-layout/issues/16
|
|
@@ -283,10 +293,10 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
283
293
|
containerClasses += ' layout-changing';
|
|
284
294
|
}
|
|
285
295
|
|
|
286
|
-
var children =
|
|
296
|
+
var children = _react["default"].Children.toArray(this.props.children).slice(0, 2);
|
|
287
297
|
|
|
288
298
|
if (children.length === 0) {
|
|
289
|
-
children.push( /*#__PURE__*/
|
|
299
|
+
children.push( /*#__PURE__*/_react["default"].createElement("div", null));
|
|
290
300
|
}
|
|
291
301
|
|
|
292
302
|
var wrappedChildren = [];
|
|
@@ -303,7 +313,7 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
303
313
|
size = this.state.secondaryPaneSize;
|
|
304
314
|
}
|
|
305
315
|
|
|
306
|
-
wrappedChildren.push( /*#__PURE__*/
|
|
316
|
+
wrappedChildren.push( /*#__PURE__*/_react["default"].createElement(_Pane["default"], {
|
|
307
317
|
vertical: vertical,
|
|
308
318
|
percentage: this.props.percentage,
|
|
309
319
|
primary: primary,
|
|
@@ -313,13 +323,13 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
313
323
|
}, children[i]));
|
|
314
324
|
}
|
|
315
325
|
|
|
316
|
-
return /*#__PURE__*/
|
|
326
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
317
327
|
className: containerClasses,
|
|
318
328
|
style: this.props.containerStyle,
|
|
319
329
|
ref: function ref(c) {
|
|
320
330
|
_this2.container = c;
|
|
321
331
|
}
|
|
322
|
-
}, wrappedChildren[0], wrappedChildren.length > 1 && /*#__PURE__*/
|
|
332
|
+
}, wrappedChildren[0], wrappedChildren.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
323
333
|
role: "separator",
|
|
324
334
|
className: "layout-splitter ".concat(!this.props.vertical && 'layout-splitter-horizontal', " ").concat(this.props.splitterClassName),
|
|
325
335
|
style: this.props.splitterStyle,
|
|
@@ -333,7 +343,7 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
333
343
|
}]);
|
|
334
344
|
|
|
335
345
|
return SplitterLayout;
|
|
336
|
-
}(
|
|
346
|
+
}(_react["default"].Component); //
|
|
337
347
|
// SplitterLayout.propTypes = {
|
|
338
348
|
// containerStyle: PropTypes.object,
|
|
339
349
|
// customClassName: PropTypes.string,
|
|
@@ -372,4 +382,5 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
372
382
|
// };
|
|
373
383
|
|
|
374
384
|
|
|
375
|
-
|
|
385
|
+
var _default = SplitterLayout;
|
|
386
|
+
exports["default"] = _default;
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
require("./index.less");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
1
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; }
|
|
2
17
|
|
|
3
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; }
|
|
4
19
|
|
|
5
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; }
|
|
6
21
|
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
9
|
-
import './index.less';
|
|
10
|
-
|
|
11
22
|
function Pane(props) {
|
|
12
23
|
var size = props.size || 0;
|
|
13
24
|
var unit = props.percentage ? '%' : 'px';
|
|
@@ -24,20 +35,20 @@ function Pane(props) {
|
|
|
24
35
|
classes += ' layout-pane-primary';
|
|
25
36
|
}
|
|
26
37
|
|
|
27
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
39
|
className: classes,
|
|
29
40
|
style: _objectSpread(_objectSpread({}, props.paneStyle), style)
|
|
30
41
|
}, props.children);
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
Pane.propTypes = {
|
|
34
|
-
paneClassName:
|
|
35
|
-
paneStyle:
|
|
36
|
-
vertical:
|
|
37
|
-
primary:
|
|
38
|
-
size:
|
|
39
|
-
percentage:
|
|
40
|
-
children:
|
|
45
|
+
paneClassName: _propTypes["default"].string,
|
|
46
|
+
paneStyle: _propTypes["default"].object,
|
|
47
|
+
vertical: _propTypes["default"].bool,
|
|
48
|
+
primary: _propTypes["default"].bool,
|
|
49
|
+
size: _propTypes["default"].number,
|
|
50
|
+
percentage: _propTypes["default"].bool,
|
|
51
|
+
children: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node])
|
|
41
52
|
};
|
|
42
53
|
Pane.defaultProps = {
|
|
43
54
|
paneClassName: '',
|
|
@@ -47,4 +58,5 @@ Pane.defaultProps = {
|
|
|
47
58
|
percentage: false,
|
|
48
59
|
children: []
|
|
49
60
|
};
|
|
50
|
-
|
|
61
|
+
var _default = Pane;
|
|
62
|
+
exports["default"] = _default;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
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); }
|
|
2
4
|
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _Pane = _interopRequireDefault(require("./Pane"));
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
3
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
21
|
|
|
5
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); } }
|
|
@@ -16,15 +33,10 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
|
16
33
|
|
|
17
34
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
35
|
|
|
19
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
36
|
+
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; } }
|
|
20
37
|
|
|
21
38
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
39
|
|
|
23
|
-
import React from 'react';
|
|
24
|
-
import PropTypes from 'prop-types';
|
|
25
|
-
import Pane from './Pane';
|
|
26
|
-
import './index.less';
|
|
27
|
-
|
|
28
40
|
function clearSelection() {
|
|
29
41
|
if (document.body.createTextRange) {
|
|
30
42
|
// https://github.com/zesik/react-splitter-layout/issues/16
|
|
@@ -284,10 +296,10 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
284
296
|
containerClasses += ' layout-changing';
|
|
285
297
|
}
|
|
286
298
|
|
|
287
|
-
var children =
|
|
299
|
+
var children = _react["default"].Children.toArray(this.props.children).slice(0, 2);
|
|
288
300
|
|
|
289
301
|
if (children.length === 0) {
|
|
290
|
-
children.push( /*#__PURE__*/
|
|
302
|
+
children.push( /*#__PURE__*/_react["default"].createElement("div", null));
|
|
291
303
|
}
|
|
292
304
|
|
|
293
305
|
var wrappedChildren = [];
|
|
@@ -304,7 +316,7 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
304
316
|
size = this.state.secondaryPaneSize;
|
|
305
317
|
}
|
|
306
318
|
|
|
307
|
-
wrappedChildren.push( /*#__PURE__*/
|
|
319
|
+
wrappedChildren.push( /*#__PURE__*/_react["default"].createElement(_Pane["default"], {
|
|
308
320
|
vertical: this.props.vertical,
|
|
309
321
|
percentage: this.props.percentage,
|
|
310
322
|
primary: primary,
|
|
@@ -314,13 +326,13 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
314
326
|
}, children[i]));
|
|
315
327
|
}
|
|
316
328
|
|
|
317
|
-
return /*#__PURE__*/
|
|
329
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
318
330
|
className: containerClasses,
|
|
319
331
|
style: this.props.containerStyle,
|
|
320
332
|
ref: function ref(c) {
|
|
321
333
|
_this2.container = c;
|
|
322
334
|
}
|
|
323
|
-
}, wrappedChildren[0], wrappedChildren.length > 1 && /*#__PURE__*/
|
|
335
|
+
}, wrappedChildren[0], wrappedChildren.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
324
336
|
role: "separator",
|
|
325
337
|
className: "layout-splitter ".concat(!this.props.vertical && 'layout-splitter-horizontal', " ").concat(this.props.splitterClassName),
|
|
326
338
|
style: this.props.splitterStyle,
|
|
@@ -334,26 +346,26 @@ var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
334
346
|
}]);
|
|
335
347
|
|
|
336
348
|
return SplitterLayout;
|
|
337
|
-
}(
|
|
349
|
+
}(_react["default"].Component);
|
|
338
350
|
|
|
339
351
|
SplitterLayout.propTypes = {
|
|
340
|
-
containerStyle:
|
|
341
|
-
customClassName:
|
|
342
|
-
splitterClassName:
|
|
343
|
-
splitterStyle:
|
|
344
|
-
partClassNames:
|
|
345
|
-
partStyles:
|
|
346
|
-
vertical:
|
|
347
|
-
percentage:
|
|
348
|
-
primaryIndex:
|
|
349
|
-
primaryMinSize:
|
|
350
|
-
primaryInitialSize:
|
|
351
|
-
secondaryInitialSize:
|
|
352
|
-
secondaryMinSize:
|
|
353
|
-
onDragStart:
|
|
354
|
-
onDragEnd:
|
|
355
|
-
onSecondaryPaneSizeChange:
|
|
356
|
-
children:
|
|
352
|
+
containerStyle: _propTypes["default"].object,
|
|
353
|
+
customClassName: _propTypes["default"].string,
|
|
354
|
+
splitterClassName: _propTypes["default"].string,
|
|
355
|
+
splitterStyle: _propTypes["default"].object,
|
|
356
|
+
partClassNames: _propTypes["default"].arrayOf(_propTypes["default"].string),
|
|
357
|
+
partStyles: _propTypes["default"].arrayOf(_propTypes["default"].object),
|
|
358
|
+
vertical: _propTypes["default"].bool,
|
|
359
|
+
percentage: _propTypes["default"].bool,
|
|
360
|
+
primaryIndex: _propTypes["default"].number,
|
|
361
|
+
primaryMinSize: _propTypes["default"].number,
|
|
362
|
+
primaryInitialSize: _propTypes["default"].number,
|
|
363
|
+
secondaryInitialSize: _propTypes["default"].number,
|
|
364
|
+
secondaryMinSize: _propTypes["default"].number,
|
|
365
|
+
onDragStart: _propTypes["default"].func,
|
|
366
|
+
onDragEnd: _propTypes["default"].func,
|
|
367
|
+
onSecondaryPaneSizeChange: _propTypes["default"].func,
|
|
368
|
+
children: _propTypes["default"].arrayOf(_propTypes["default"].node)
|
|
357
369
|
};
|
|
358
370
|
SplitterLayout.defaultProps = {
|
|
359
371
|
customClassName: '',
|
|
@@ -371,4 +383,5 @@ SplitterLayout.defaultProps = {
|
|
|
371
383
|
onSecondaryPaneSizeChange: null,
|
|
372
384
|
children: []
|
|
373
385
|
};
|
|
374
|
-
|
|
386
|
+
var _default = SplitterLayout;
|
|
387
|
+
exports["default"] = _default;
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
require("antd/es/spin/style");
|
|
9
|
+
|
|
10
|
+
var _spin = _interopRequireDefault(require("antd/es/spin"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _DragContent = _interopRequireDefault(require("../DragContent"));
|
|
17
|
+
|
|
18
|
+
require("./style/index.less");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
7
21
|
|
|
8
22
|
var SubfieldContent = function SubfieldContent(props) {
|
|
9
23
|
var _props$leftSiderWidth = props.leftSiderWidth,
|
|
@@ -19,23 +33,24 @@ var SubfieldContent = function SubfieldContent(props) {
|
|
|
19
33
|
leftSiderDragDirection = props.leftSiderDragDirection,
|
|
20
34
|
leftSiderMoveMaxWidth = props.leftSiderMoveMaxWidth,
|
|
21
35
|
leftSiderMoveMaxHeight = props.leftSiderMoveMaxHeight;
|
|
22
|
-
return /*#__PURE__*/
|
|
23
|
-
className:
|
|
36
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
|
+
className: (0, _classnames["default"])('spec-grid-content', loading ? 'spec-grid-content-loading' : '', className),
|
|
24
38
|
style: style
|
|
25
|
-
}, loading && /*#__PURE__*/
|
|
39
|
+
}, loading && /*#__PURE__*/_react["default"].createElement(_spin["default"], {
|
|
26
40
|
spinning: loading,
|
|
27
41
|
tip: loadingTip
|
|
28
|
-
}), /*#__PURE__*/
|
|
42
|
+
}), /*#__PURE__*/_react["default"].createElement(_DragContent["default"], {
|
|
29
43
|
direction: leftSiderDragDirection,
|
|
30
|
-
className:
|
|
44
|
+
className: (0, _classnames["default"])('spec-grid-left', leftSiderClassName),
|
|
31
45
|
style: {
|
|
32
46
|
width: "".concat(leftSiderWidth || 180, "px")
|
|
33
47
|
},
|
|
34
48
|
moveMaxWidth: leftSiderMoveMaxWidth,
|
|
35
49
|
moveMaxHeight: leftSiderMoveMaxHeight
|
|
36
|
-
}, leftSiderNode), /*#__PURE__*/
|
|
50
|
+
}, leftSiderNode), /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
51
|
className: 'spec-grid-right'
|
|
38
52
|
}, children));
|
|
39
53
|
};
|
|
40
54
|
|
|
41
|
-
|
|
55
|
+
var _default = SubfieldContent;
|
|
56
|
+
exports["default"] = _default;
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
require("antd/es/spin/style");
|
|
9
|
+
|
|
10
|
+
var _spin = _interopRequireDefault(require("antd/es/spin"));
|
|
11
|
+
|
|
12
|
+
require("./style/index.less");
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
6
19
|
|
|
7
20
|
var WrapperContent = function WrapperContent(props) {
|
|
8
21
|
var children = props.children,
|
|
@@ -15,15 +28,16 @@ var WrapperContent = function WrapperContent(props) {
|
|
|
15
28
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
16
29
|
loadingTip = props.loadingTip;
|
|
17
30
|
var defaultClassName = 'spec-wrapper-content';
|
|
18
|
-
return /*#__PURE__*/
|
|
19
|
-
className:
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
+
className: (0, _classnames["default"])(defaultClassName, className, loading ? 'spec-wrapper-content-loading' : '', noMargin ? 'has-margin' : ''),
|
|
20
33
|
style: style
|
|
21
|
-
}, loading && /*#__PURE__*/
|
|
34
|
+
}, loading && /*#__PURE__*/_react["default"].createElement(_spin["default"], {
|
|
22
35
|
spinning: loading,
|
|
23
36
|
tip: loadingTip
|
|
24
|
-
}), light ? /*#__PURE__*/
|
|
37
|
+
}), light ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
38
|
className: "light-block"
|
|
26
39
|
}, " ", children) : children);
|
|
27
40
|
};
|
|
28
41
|
|
|
29
|
-
|
|
42
|
+
var _default = WrapperContent;
|
|
43
|
+
exports["default"] = _default;
|