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