fan-standard-comp 3.1.0 → 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 +87 -131
- package/es/FormComp/FieldComponent/setReadonlyValues.js +34 -61
- package/es/FormComp/RenderItemGroup/index.js +34 -56
- 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 +17 -44
- 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.d.ts +0 -1
- package/es/index.js +24 -238
- 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 +47 -47
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +23 -23
- package/lib/FormComp/RenderItemGroup/index.js +20 -21
- 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 -19
- 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.d.ts +0 -1
- package/lib/index.js +23 -32
- 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
|
@@ -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;
|
|
@@ -1,33 +1,9 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
require("antd/es/button/style");
|
|
11
|
-
|
|
12
|
-
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
13
|
-
|
|
14
|
-
require("antd/es/form/style");
|
|
15
|
-
|
|
16
|
-
var _form = _interopRequireDefault(require("antd/es/form"));
|
|
17
|
-
|
|
18
|
-
var _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
|
-
var _FieldComponent = _interopRequireDefault(require("../FormComp/FieldComponent"));
|
|
21
|
-
|
|
22
|
-
var _ValueFormat = _interopRequireDefault(require("../utils/ValueFormat.js"));
|
|
23
|
-
|
|
24
|
-
var _index = _interopRequireDefault(require("../ButtonGroup/index"));
|
|
25
|
-
|
|
26
|
-
var _index2 = require("../data/index");
|
|
27
|
-
|
|
28
|
-
require("./style/index.less");
|
|
29
|
-
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
3
|
+
import "antd/es/button/style";
|
|
4
|
+
import _Button from "antd/es/button";
|
|
5
|
+
import "antd/es/form/style";
|
|
6
|
+
import _Form from "antd/es/form";
|
|
31
7
|
|
|
32
8
|
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; }
|
|
33
9
|
|
|
@@ -59,11 +35,17 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
|
59
35
|
|
|
60
36
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
61
37
|
|
|
62
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
38
|
+
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; } }
|
|
63
39
|
|
|
64
40
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
65
41
|
|
|
66
|
-
|
|
42
|
+
import React from 'react';
|
|
43
|
+
import FieldComponent from '../FormComp/FieldComponent';
|
|
44
|
+
import UtilValueFormat from '../utils/ValueFormat.js';
|
|
45
|
+
import ButtonGroup from '../ButtonGroup/index';
|
|
46
|
+
import { general } from '../data/index';
|
|
47
|
+
import './style/index.less';
|
|
48
|
+
var FormItem = _Form.Item;
|
|
67
49
|
|
|
68
50
|
var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
69
51
|
_inherits(StandardFilter, _React$Component);
|
|
@@ -76,7 +58,7 @@ var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
|
76
58
|
_classCallCheck(this, StandardFilter);
|
|
77
59
|
|
|
78
60
|
_this = _super.call(this, props);
|
|
79
|
-
_this.filterFormRef = /*#__PURE__*/
|
|
61
|
+
_this.filterFormRef = /*#__PURE__*/React.createRef(); // 更新表单控件值,用于外部获取当前表单实例(force是否强制清空表单)
|
|
80
62
|
|
|
81
63
|
_this.updateFormFields = function (newVal, force) {
|
|
82
64
|
var getFormFields = _this.props.getFormFields;
|
|
@@ -104,7 +86,7 @@ var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
|
104
86
|
// delete values.false // TODO 自定义结构会莫名的出来一个false字段
|
|
105
87
|
// }
|
|
106
88
|
|
|
107
|
-
var resultValues = (
|
|
89
|
+
var resultValues = UtilValueFormat(values, formItemGroup);
|
|
108
90
|
|
|
109
91
|
if (onFilterSearch) {
|
|
110
92
|
onFilterSearch(Object.assign({}, resultValues));
|
|
@@ -147,16 +129,16 @@ var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
|
147
129
|
var reFormItemGroup = _this.state.reFormItemGroup;
|
|
148
130
|
|
|
149
131
|
if (Array.isArray(reFormItemGroup)) {
|
|
150
|
-
return /*#__PURE__*/
|
|
132
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, reFormItemGroup.map(function (item, index) {
|
|
151
133
|
var componentStyle = item.componentStyle,
|
|
152
134
|
isHide = item.isHide;
|
|
153
135
|
if (_this.itemIsHide(isHide)) return null;
|
|
154
|
-
return /*#__PURE__*/
|
|
136
|
+
return /*#__PURE__*/React.createElement(FormItem, Object.assign({
|
|
155
137
|
key: item.filedName,
|
|
156
138
|
label: item.label,
|
|
157
139
|
name: item.type !== 'custom' && item.filedName,
|
|
158
140
|
rules: item.rules || (item.fieldOptions ? item.fieldOptions.rules : [])
|
|
159
|
-
}, item.protoFormItem), item.type === 'custom' && item.customRender ? item.customRender(_this.filterFormRef, Object.assign({}, item)) : /*#__PURE__*/
|
|
141
|
+
}, item.protoFormItem), item.type === 'custom' && item.customRender ? item.customRender(_this.filterFormRef, Object.assign({}, item)) : /*#__PURE__*/React.createElement(FieldComponent, Object.assign({}, item, {
|
|
160
142
|
onChange: function onChange(val) {
|
|
161
143
|
var updateValue = val;
|
|
162
144
|
|
|
@@ -177,7 +159,7 @@ var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
|
177
159
|
if (item.onChange) item.onChange.apply(item, [val, _this.filterFormRef].concat(otherParams));
|
|
178
160
|
},
|
|
179
161
|
style: Object.assign({
|
|
180
|
-
width: item.type === 'checkbox' || item.type === 'radio' ? 'auto' :
|
|
162
|
+
width: item.type === 'checkbox' || item.type === 'radio' ? 'auto' : general.formItemStyle.xsm.width
|
|
181
163
|
}, componentStyle)
|
|
182
164
|
})));
|
|
183
165
|
}));
|
|
@@ -223,30 +205,30 @@ var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
|
223
205
|
confirmText = _this$props2.confirmText,
|
|
224
206
|
cancelText = _this$props2.cancelText; // const { recombinationGroup } = this.state;
|
|
225
207
|
|
|
226
|
-
return /*#__PURE__*/
|
|
208
|
+
return /*#__PURE__*/React.createElement(_Form, {
|
|
227
209
|
name: "standard-filter-form",
|
|
228
210
|
ref: this.filterFormRef,
|
|
229
211
|
layout: "inline",
|
|
230
212
|
onFinish: this.handleSearch,
|
|
231
213
|
className: className,
|
|
232
214
|
style: style
|
|
233
|
-
}, /*#__PURE__*/
|
|
215
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
234
216
|
className: "filter-grid"
|
|
235
|
-
}, /*#__PURE__*/
|
|
217
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
236
218
|
className: "filter-form"
|
|
237
|
-
}, this.state.reFormItemGroup ? /*#__PURE__*/
|
|
219
|
+
}, this.state.reFormItemGroup ? /*#__PURE__*/React.createElement(React.Fragment, null, this.renderFormItemGroup(), /*#__PURE__*/React.createElement(FormItem, null, /*#__PURE__*/React.createElement(_Button, {
|
|
238
220
|
type: "primary",
|
|
239
221
|
htmlType: "submit"
|
|
240
|
-
}, " ", confirmText || '查询'), onFilterReset && /*#__PURE__*/
|
|
222
|
+
}, " ", confirmText || '查询'), onFilterReset && /*#__PURE__*/React.createElement(_Button, {
|
|
241
223
|
type: "primary",
|
|
242
224
|
style: {
|
|
243
225
|
marginLeft: 8
|
|
244
226
|
},
|
|
245
227
|
onClick: this.handleReset,
|
|
246
228
|
ghost: true
|
|
247
|
-
}, cancelText || '重置'))) : null), buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/
|
|
229
|
+
}, cancelText || '重置'))) : null), buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
248
230
|
className: "filter-btns"
|
|
249
|
-
}, /*#__PURE__*/
|
|
231
|
+
}, /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
250
232
|
options: buttonGroup,
|
|
251
233
|
min: min,
|
|
252
234
|
codes: codes,
|
|
@@ -266,7 +248,6 @@ var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
|
266
248
|
}]);
|
|
267
249
|
|
|
268
250
|
return StandardFilter;
|
|
269
|
-
}(
|
|
251
|
+
}(React.Component);
|
|
270
252
|
|
|
271
|
-
|
|
272
|
-
exports["default"] = _default;
|
|
253
|
+
export default StandardFilter;
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
require("antd/es/button/style");
|
|
9
|
-
|
|
10
|
-
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _IconNode = _interopRequireDefault(require("../components/IconNode"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
1
|
+
import "antd/es/button/style";
|
|
2
|
+
import _Button from "antd/es/button";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import IconNode from "../components/IconNode";
|
|
17
5
|
|
|
18
6
|
var ActionList = function ActionList(props) {
|
|
19
7
|
var list = props.list,
|
|
@@ -22,16 +10,16 @@ var ActionList = function ActionList(props) {
|
|
|
22
10
|
align = _props$align === void 0 ? 'default' : _props$align,
|
|
23
11
|
other = props.other,
|
|
24
12
|
onStep = props.onStep;
|
|
25
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
14
|
className: "standardForm-actions",
|
|
27
15
|
style: {
|
|
28
16
|
textAlign: !align || align === 'default' ? 'inherit' : align
|
|
29
17
|
}
|
|
30
18
|
}, list.map(function (item, index) {
|
|
31
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/React.createElement(_Button, {
|
|
32
20
|
key: index,
|
|
33
21
|
type: item.type ? item.type : 'primary',
|
|
34
|
-
icon: /*#__PURE__*/
|
|
22
|
+
icon: /*#__PURE__*/React.createElement(IconNode, {
|
|
35
23
|
icon: item.icon
|
|
36
24
|
}),
|
|
37
25
|
ghost: item.ghost,
|
|
@@ -53,5 +41,4 @@ var ActionList = function ActionList(props) {
|
|
|
53
41
|
}));
|
|
54
42
|
};
|
|
55
43
|
|
|
56
|
-
|
|
57
|
-
exports["default"] = _default;
|
|
44
|
+
export default ActionList;
|