fan-standard-comp 3.1.2 → 3.1.4
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/package.json +1 -1
- package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
- package/dist/fan-standard-comp.umd.js +0 -597
- package/dist/fonts/iconfont.eot +0 -0
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/es/ButtonGroup/ButtonList.d.ts +0 -2
- package/es/ButtonGroup/ButtonList.js +0 -37
- package/es/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/es/ButtonGroup/ButtonMenu.js +0 -38
- package/es/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/es/ButtonGroup/PopConfirmTitle.js +0 -37
- package/es/ButtonGroup/index.d.ts +0 -30
- package/es/ButtonGroup/index.js +0 -374
- package/es/ButtonGroup/style/index.less +0 -36
- package/es/DragContent/DragBar.js +0 -21
- package/es/DragContent/index.d.ts +0 -14
- package/es/DragContent/index.js +0 -173
- package/es/DragContent/index.less +0 -44
- package/es/FormComp/ChunkUploader/api.js +0 -76
- package/es/FormComp/ChunkUploader/index.js +0 -391
- package/es/FormComp/ChunkUploader/lib.js +0 -96
- package/es/FormComp/ChunkUploader/style/style.less +0 -3
- package/es/FormComp/ChunkUploader/upload-queue.class.js +0 -167
- package/es/FormComp/ChunkUploader/worker.js +0 -23
- package/es/FormComp/EditButton/index.d.ts +0 -26
- package/es/FormComp/EditButton/index.js +0 -140
- package/es/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/es/FormComp/FieldComponent/ReUpload.js +0 -131
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +0 -245
- package/es/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/es/FormComp/FieldComponent/TitleNode.js +0 -9
- package/es/FormComp/FieldComponent/index.d.ts +0 -38
- package/es/FormComp/FieldComponent/index.js +0 -413
- package/es/FormComp/FieldComponent/setReadonlyValues.js +0 -236
- package/es/FormComp/FieldComponent/style/index.less +0 -116
- package/es/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/es/FormComp/RenderItemGroup/index.js +0 -234
- package/es/FormComp/Uploader/index.d.ts +0 -19
- package/es/FormComp/Uploader/index.js +0 -275
- package/es/FormComp/Uploader/style/index.less +0 -14
- package/es/FormComp/Uploader/util.d.ts +0 -8
- package/es/FormComp/Uploader/util.js +0 -38
- package/es/FormComp/VarTemplate/index.js +0 -293
- package/es/FormComp/index.d.ts +0 -1
- package/es/FormComp/index.js +0 -1
- package/es/NavLeafScroll/index.js +0 -379
- package/es/NavLeafScroll/style/index.less +0 -119
- package/es/RefactorTree/data.d.ts +0 -7
- package/es/RefactorTree/index.d.ts +0 -40
- package/es/RefactorTree/index.js +0 -167
- package/es/RefactorTree/indexTreeNode.d.ts +0 -39
- package/es/RefactorTree/indexTreeNode.js +0 -237
- package/es/RefactorTree/style/index.d.ts +0 -1
- package/es/RefactorTree/style/index.js +0 -1
- package/es/RefactorTree/style/index.less +0 -22
- package/es/RefactorTree/util.d.ts +0 -42
- package/es/RefactorTree/util.js +0 -187
- package/es/SpecIcon/fonts/demo.css +0 -539
- package/es/SpecIcon/fonts/demo_index.html +0 -1315
- package/es/SpecIcon/fonts/iconfont.css +0 -211
- package/es/SpecIcon/fonts/iconfont.eot +0 -0
- package/es/SpecIcon/fonts/iconfont.js +0 -41
- package/es/SpecIcon/fonts/iconfont.json +0 -352
- package/es/SpecIcon/fonts/iconfont.svg +0 -173
- package/es/SpecIcon/fonts/iconfont.ttf +0 -0
- package/es/SpecIcon/fonts/iconfont.woff +0 -0
- package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/es/SpecIcon/index.d.ts +0 -17
- package/es/SpecIcon/index.js +0 -77
- package/es/SpecIcon/style/iconfont.less +0 -213
- package/es/SpecIcon/style/index.less +0 -98
- package/es/SplitterLayout/Pane.d.ts +0 -13
- package/es/SplitterLayout/Pane.js +0 -36
- package/es/SplitterLayout/index.js +0 -375
- package/es/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SplitterLayout/Pane.js +0 -50
- package/es/StandardContent/SplitterLayout/index.js +0 -374
- package/es/StandardContent/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SubfieldContent.d.ts +0 -17
- package/es/StandardContent/SubfieldContent.js +0 -41
- package/es/StandardContent/WrapperContent.d.ts +0 -13
- package/es/StandardContent/WrapperContent.js +0 -29
- package/es/StandardContent/data.d.ts +0 -101
- package/es/StandardContent/style/index.less +0 -80
- package/es/StandardDragModal/index.d.ts +0 -11
- package/es/StandardDragModal/index.js +0 -30
- package/es/StandardFilter/index.d.ts +0 -35
- package/es/StandardFilter/index.js +0 -253
- package/es/StandardFilter/style/index.less +0 -62
- package/es/StandardForm/ActionList.js +0 -44
- package/es/StandardForm/StepForm.d.ts +0 -19
- package/es/StandardForm/StepForm.js +0 -267
- package/es/StandardForm/TabForm.d.ts +0 -19
- package/es/StandardForm/TabForm.js +0 -122
- package/es/StandardForm/index.d.ts +0 -32
- package/es/StandardForm/index.js +0 -170
- package/es/StandardForm/style/index.less +0 -58
- package/es/StandardModal/UpdateFormRef.js +0 -18
- package/es/StandardModal/index.d.ts +0 -44
- package/es/StandardModal/index.js +0 -495
- package/es/StandardModal/style/index.less +0 -50
- package/es/StandardPanel/index.d.ts +0 -28
- package/es/StandardPanel/index.js +0 -134
- package/es/StandardPanel/style/index.less +0 -135
- package/es/StandardTable/index.d.ts +0 -22
- package/es/StandardTable/index.js +0 -126
- package/es/StandardTable/style/index.d.ts +0 -1
- package/es/StandardTable/style/index.js +0 -1
- package/es/StandardTable/style/index.less +0 -206
- package/es/components/IconNode/index.d.ts +0 -16
- package/es/components/IconNode/index.js +0 -28
- package/es/components/index.d.ts +0 -2
- package/es/components/index.js +0 -2
- package/es/data/func.code.js +0 -112
- package/es/data/general.config.js +0 -172
- package/es/data/index.js +0 -3
- package/es/index.d.ts +0 -24
- package/es/index.js +0 -31
- package/es/styles/index.less +0 -0
- package/es/theme/spec-variable.less +0 -48
- package/es/utils/ValueFormat.js +0 -50
- package/es/utils/filterPermission.js +0 -111
- package/es/utils/getParentNodes.js +0 -215
- package/es/utils/index.js +0 -3
- package/lib/ButtonGroup/ButtonList.d.ts +0 -2
- package/lib/ButtonGroup/ButtonList.js +0 -55
- package/lib/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/lib/ButtonGroup/ButtonMenu.js +0 -51
- package/lib/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/lib/ButtonGroup/PopConfirmTitle.js +0 -48
- package/lib/ButtonGroup/index.d.ts +0 -30
- package/lib/ButtonGroup/index.js +0 -405
- package/lib/ButtonGroup/style/index.less +0 -36
- package/lib/DragContent/DragBar.js +0 -33
- package/lib/DragContent/index.d.ts +0 -14
- package/lib/DragContent/index.js +0 -191
- package/lib/DragContent/index.less +0 -44
- package/lib/FormComp/ChunkUploader/api.js +0 -89
- package/lib/FormComp/ChunkUploader/index.js +0 -410
- package/lib/FormComp/ChunkUploader/lib.js +0 -113
- package/lib/FormComp/ChunkUploader/style/style.less +0 -3
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +0 -174
- package/lib/FormComp/ChunkUploader/worker.js +0 -28
- package/lib/FormComp/EditButton/index.d.ts +0 -26
- package/lib/FormComp/EditButton/index.js +0 -159
- package/lib/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/lib/FormComp/FieldComponent/ReUpload.js +0 -151
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +0 -268
- package/lib/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/lib/FormComp/FieldComponent/TitleNode.js +0 -19
- package/lib/FormComp/FieldComponent/index.d.ts +0 -38
- package/lib/FormComp/FieldComponent/index.js +0 -457
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +0 -263
- package/lib/FormComp/FieldComponent/style/index.less +0 -116
- package/lib/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/lib/FormComp/RenderItemGroup/index.js +0 -255
- package/lib/FormComp/Uploader/index.d.ts +0 -19
- package/lib/FormComp/Uploader/index.js +0 -301
- package/lib/FormComp/Uploader/style/index.less +0 -14
- package/lib/FormComp/Uploader/util.d.ts +0 -8
- package/lib/FormComp/Uploader/util.js +0 -47
- package/lib/FormComp/VarTemplate/index.js +0 -308
- package/lib/FormComp/index.d.ts +0 -1
- package/lib/FormComp/index.js +0 -15
- package/lib/NavLeafScroll/index.js +0 -397
- package/lib/NavLeafScroll/style/index.less +0 -119
- package/lib/RefactorTree/data.d.ts +0 -7
- package/lib/RefactorTree/index.d.ts +0 -40
- package/lib/RefactorTree/index.js +0 -190
- package/lib/RefactorTree/indexTreeNode.d.ts +0 -39
- package/lib/RefactorTree/indexTreeNode.js +0 -260
- package/lib/RefactorTree/style/index.d.ts +0 -1
- package/lib/RefactorTree/style/index.js +0 -3
- package/lib/RefactorTree/style/index.less +0 -22
- package/lib/RefactorTree/util.d.ts +0 -42
- package/lib/RefactorTree/util.js +0 -195
- package/lib/SpecIcon/fonts/demo.css +0 -539
- package/lib/SpecIcon/fonts/demo_index.html +0 -1315
- package/lib/SpecIcon/fonts/iconfont.css +0 -211
- package/lib/SpecIcon/fonts/iconfont.eot +0 -0
- package/lib/SpecIcon/fonts/iconfont.js +0 -43
- package/lib/SpecIcon/fonts/iconfont.json +0 -352
- package/lib/SpecIcon/fonts/iconfont.svg +0 -173
- package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/lib/SpecIcon/index.d.ts +0 -17
- package/lib/SpecIcon/index.js +0 -90
- package/lib/SpecIcon/style/iconfont.less +0 -213
- package/lib/SpecIcon/style/index.less +0 -98
- package/lib/SplitterLayout/Pane.d.ts +0 -13
- package/lib/SplitterLayout/Pane.js +0 -48
- package/lib/SplitterLayout/index.js +0 -386
- package/lib/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SplitterLayout/Pane.js +0 -62
- package/lib/StandardContent/SplitterLayout/index.js +0 -387
- package/lib/StandardContent/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SubfieldContent.d.ts +0 -17
- package/lib/StandardContent/SubfieldContent.js +0 -56
- package/lib/StandardContent/WrapperContent.d.ts +0 -13
- package/lib/StandardContent/WrapperContent.js +0 -43
- package/lib/StandardContent/data.d.ts +0 -101
- package/lib/StandardContent/style/index.less +0 -80
- package/lib/StandardDragModal/index.d.ts +0 -11
- package/lib/StandardDragModal/index.js +0 -43
- package/lib/StandardFilter/index.d.ts +0 -35
- package/lib/StandardFilter/index.js +0 -272
- package/lib/StandardFilter/style/index.less +0 -62
- package/lib/StandardForm/ActionList.js +0 -57
- package/lib/StandardForm/StepForm.d.ts +0 -19
- package/lib/StandardForm/StepForm.js +0 -295
- package/lib/StandardForm/TabForm.d.ts +0 -19
- package/lib/StandardForm/TabForm.js +0 -148
- package/lib/StandardForm/index.d.ts +0 -32
- package/lib/StandardForm/index.js +0 -197
- package/lib/StandardForm/style/index.less +0 -58
- package/lib/StandardModal/UpdateFormRef.js +0 -32
- package/lib/StandardModal/index.d.ts +0 -44
- package/lib/StandardModal/index.js +0 -525
- package/lib/StandardModal/style/index.less +0 -50
- package/lib/StandardPanel/index.d.ts +0 -28
- package/lib/StandardPanel/index.js +0 -155
- package/lib/StandardPanel/style/index.less +0 -135
- package/lib/StandardTable/index.d.ts +0 -22
- package/lib/StandardTable/index.js +0 -143
- package/lib/StandardTable/style/index.d.ts +0 -1
- package/lib/StandardTable/style/index.js +0 -3
- package/lib/StandardTable/style/index.less +0 -206
- package/lib/components/IconNode/index.d.ts +0 -16
- package/lib/components/IconNode/index.js +0 -39
- package/lib/components/index.d.ts +0 -2
- package/lib/components/index.js +0 -15
- package/lib/data/func.code.js +0 -119
- package/lib/data/general.config.js +0 -179
- package/lib/data/index.js +0 -23
- package/lib/index.d.ts +0 -24
- package/lib/index.js +0 -236
- package/lib/styles/index.less +0 -0
- package/lib/theme/spec-variable.less +0 -48
- package/lib/utils/ValueFormat.js +0 -58
- package/lib/utils/filterPermission.js +0 -127
- package/lib/utils/getParentNodes.js +0 -226
- package/lib/utils/index.js +0 -35
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
|
|
4
|
-
.scroll-bar(){
|
|
5
|
-
&::-webkit-scrollbar-track-piece {
|
|
6
|
-
background: fade(@primary-color, 10%);
|
|
7
|
-
}
|
|
8
|
-
&::-webkit-scrollbar {
|
|
9
|
-
width: 6px;
|
|
10
|
-
height: 6px;
|
|
11
|
-
}
|
|
12
|
-
&::-webkit-scrollbar-thumb {
|
|
13
|
-
background: fade(@primary-color, 50%);
|
|
14
|
-
border-radius: 20px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
.spec-wrapper-content {
|
|
18
|
-
position: relative;
|
|
19
|
-
padding: @padding-lg;
|
|
20
|
-
background: @background-color-base;
|
|
21
|
-
height: 100%;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
& .light-block {
|
|
24
|
-
padding: @padding-lg;
|
|
25
|
-
background: @layout-body-background;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
.spec-grid-content {
|
|
29
|
-
position: relative;
|
|
30
|
-
display: flex;
|
|
31
|
-
height: calc(100vh - @layout-header-height);
|
|
32
|
-
background:transparent; // @background-color-base;
|
|
33
|
-
.spec-grid-left {
|
|
34
|
-
height: calc(100vh - @layout-header-height);
|
|
35
|
-
padding: @padding-md @padding-sm;
|
|
36
|
-
background: @layout-body-background;
|
|
37
|
-
overflow-y: auto;
|
|
38
|
-
.scroll-bar();
|
|
39
|
-
.ant-tree-list,
|
|
40
|
-
.ant-tree {
|
|
41
|
-
max-height: 100%;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
.spec-grid-right {
|
|
45
|
-
flex: 1;
|
|
46
|
-
height: calc(100vh - @layout-header-height);
|
|
47
|
-
padding: @padding-lg;
|
|
48
|
-
overflow-y: auto;
|
|
49
|
-
//margin-left: 200px
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 加载loading中状态样式
|
|
54
|
-
.spec-wrapper-content-loading,
|
|
55
|
-
.spec-grid-content-loading{
|
|
56
|
-
& > *:not(.ant-spin) {
|
|
57
|
-
opacity: .6;
|
|
58
|
-
}
|
|
59
|
-
& > .ant-spin.ant-spin-spinning{
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 0;
|
|
62
|
-
left: 0;
|
|
63
|
-
z-index: 4;
|
|
64
|
-
width: 100%;
|
|
65
|
-
height: 100%;
|
|
66
|
-
.ant-spin-dot {
|
|
67
|
-
position: absolute;
|
|
68
|
-
top: 25%;
|
|
69
|
-
left: 50%;
|
|
70
|
-
margin: -10px;
|
|
71
|
-
}
|
|
72
|
-
.ant-spin-text {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 25%;
|
|
75
|
-
width: 100%;
|
|
76
|
-
padding-top: 5px;
|
|
77
|
-
margin-top: 10px;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,43 +0,0 @@
|
|
|
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 _antDesignDraggableModal = require("ant-design-draggable-modal");
|
|
13
|
-
|
|
14
|
-
require("ant-design-draggable-modal/dist/index.css");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
var StandardDragModal = function StandardDragModal(props) {
|
|
19
|
-
var visible = props.visible,
|
|
20
|
-
onCancel = props.onCancel,
|
|
21
|
-
onSubmit = props.onSubmit,
|
|
22
|
-
children = props.children,
|
|
23
|
-
others = (0, _tslib.__rest)(props, ["visible", "onCancel", "onSubmit", "children"]);
|
|
24
|
-
|
|
25
|
-
var handleOk = function handleOk() {
|
|
26
|
-
onSubmit && onSubmit();
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var handleCancel = function handleCancel() {
|
|
30
|
-
onCancel && onCancel();
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModalProvider, null, /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModal, Object.assign({
|
|
34
|
-
visible: visible,
|
|
35
|
-
onOk: handleOk,
|
|
36
|
-
onCancel: handleCancel
|
|
37
|
-
}, others, {
|
|
38
|
-
zIndex: 1001
|
|
39
|
-
}), children));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var _default = StandardDragModal;
|
|
43
|
-
exports.default = _default;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FieldComponentProps } from '../FormComp/FieldComponent';
|
|
3
|
-
import { ButtonGroupOptionsProps } from '../ButtonGroup/index';
|
|
4
|
-
import './style/index.less';
|
|
5
|
-
export interface StandardFilterProps {
|
|
6
|
-
buttonGroup?: ButtonGroupOptionsProps[];
|
|
7
|
-
formItemGroup?: FieldComponentProps[];
|
|
8
|
-
confirmText?: string;
|
|
9
|
-
onFilterSearch?: (value?: object) => void;
|
|
10
|
-
onFilterReset?: (value?: object) => void;
|
|
11
|
-
cancelText?: string;
|
|
12
|
-
initialValues?: any;
|
|
13
|
-
getFormFields?: (fields: any, form: any) => void;
|
|
14
|
-
className?: string;
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
min?: number;
|
|
17
|
-
codes?: any[];
|
|
18
|
-
permissionCodes?: string[];
|
|
19
|
-
}
|
|
20
|
-
declare class StandardFilter extends React.Component<StandardFilterProps, any> {
|
|
21
|
-
static getDerivedStateFromProps(nextProps: StandardFilterProps): {
|
|
22
|
-
reFormItemGroup: FieldComponentProps[];
|
|
23
|
-
};
|
|
24
|
-
private filterFormRef;
|
|
25
|
-
constructor(props: StandardFilterProps);
|
|
26
|
-
componentDidMount(): void;
|
|
27
|
-
componentDidUpdate(prevProps: StandardFilterProps): void;
|
|
28
|
-
updateFormFields: (newVal?: any, force?: boolean) => void;
|
|
29
|
-
handleSearch: (values: object) => void;
|
|
30
|
-
handleReset: () => void;
|
|
31
|
-
itemIsHide: (isHide: any) => any;
|
|
32
|
-
renderFormItemGroup: () => any;
|
|
33
|
-
render(): JSX.Element;
|
|
34
|
-
}
|
|
35
|
-
export default StandardFilter;
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
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 }; }
|
|
31
|
-
|
|
32
|
-
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
|
-
|
|
34
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
|
-
|
|
36
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
-
|
|
38
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
-
|
|
40
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
41
|
-
|
|
42
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
43
|
-
|
|
44
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
45
|
-
|
|
46
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
47
|
-
|
|
48
|
-
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); } }
|
|
49
|
-
|
|
50
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
51
|
-
|
|
52
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
53
|
-
|
|
54
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
55
|
-
|
|
56
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
57
|
-
|
|
58
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
59
|
-
|
|
60
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
61
|
-
|
|
62
|
-
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
|
-
|
|
64
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
65
|
-
|
|
66
|
-
var FormItem = _form.default.Item;
|
|
67
|
-
|
|
68
|
-
var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
69
|
-
_inherits(StandardFilter, _React$Component);
|
|
70
|
-
|
|
71
|
-
var _super = _createSuper(StandardFilter);
|
|
72
|
-
|
|
73
|
-
function StandardFilter(props) {
|
|
74
|
-
var _this;
|
|
75
|
-
|
|
76
|
-
_classCallCheck(this, StandardFilter);
|
|
77
|
-
|
|
78
|
-
_this = _super.call(this, props);
|
|
79
|
-
_this.filterFormRef = /*#__PURE__*/_react.default.createRef(); // 更新表单控件值,用于外部获取当前表单实例(force是否强制清空表单)
|
|
80
|
-
|
|
81
|
-
_this.updateFormFields = function (newVal, force) {
|
|
82
|
-
var getFormFields = _this.props.getFormFields;
|
|
83
|
-
var resetValues = {};
|
|
84
|
-
|
|
85
|
-
if (force) {
|
|
86
|
-
// this.filterFormRef.current.resetFields()
|
|
87
|
-
// 先清空 再赋值
|
|
88
|
-
resetValues = _this.filterFormRef.current.getFieldsValue();
|
|
89
|
-
Object.keys(resetValues).forEach(function (item) {
|
|
90
|
-
resetValues[item] = undefined;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
_this.filterFormRef.current.setFieldsValue(Object.assign(Object.assign({}, resetValues), newVal)); // 直接清空表单的赋值
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (getFormFields) getFormFields(_this.filterFormRef.current.getFieldsValue(), _this.filterFormRef);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
_this.handleSearch = function (values) {
|
|
101
|
-
var _this$props = _this.props,
|
|
102
|
-
formItemGroup = _this$props.formItemGroup,
|
|
103
|
-
onFilterSearch = _this$props.onFilterSearch; // if (Object.prototype.hasOwnProperty.call(values, false)) {
|
|
104
|
-
// delete values.false // TODO 自定义结构会莫名的出来一个false字段
|
|
105
|
-
// }
|
|
106
|
-
|
|
107
|
-
var resultValues = (0, _ValueFormat.default)(values, formItemGroup);
|
|
108
|
-
|
|
109
|
-
if (onFilterSearch) {
|
|
110
|
-
onFilterSearch(Object.assign({}, resultValues));
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
_this.handleReset = function () {
|
|
115
|
-
var onFilterReset = _this.props.onFilterReset; // 使用此方法,表单校验无法清空掉
|
|
116
|
-
// const resetValues = this.filterFormRef.current.getFieldsValue()
|
|
117
|
-
// Object.keys(resetValues).forEach((item) => {
|
|
118
|
-
// resetValues[item] = undefined
|
|
119
|
-
// })
|
|
120
|
-
// this.filterFormRef.current.setFieldsValue({ ...resetValues }) // 直接清空表单的赋值
|
|
121
|
-
|
|
122
|
-
_this.filterFormRef.current.resetFields();
|
|
123
|
-
|
|
124
|
-
_this.setState({
|
|
125
|
-
reFormItemGroup: _this.props.formItemGroup // 重新渲染列表
|
|
126
|
-
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
if (onFilterReset) {
|
|
130
|
-
onFilterReset(_this.filterFormRef.current.getFieldsValue());
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
_this.itemIsHide = function (isHide) {
|
|
135
|
-
var current = _this.filterFormRef.current;
|
|
136
|
-
if (!isHide) return false;
|
|
137
|
-
|
|
138
|
-
if (typeof isHide === 'function') {
|
|
139
|
-
return isHide(current ? current.getFieldsValue() : {}, current);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return isHide;
|
|
143
|
-
}; // 表单列表组 formItemGroup 类型为数组或者React.Node
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
_this.renderFormItemGroup = function () {
|
|
147
|
-
var reFormItemGroup = _this.state.reFormItemGroup;
|
|
148
|
-
|
|
149
|
-
if (Array.isArray(reFormItemGroup)) {
|
|
150
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, reFormItemGroup.map(function (item, index) {
|
|
151
|
-
var componentStyle = item.componentStyle,
|
|
152
|
-
isHide = item.isHide;
|
|
153
|
-
if (_this.itemIsHide(isHide)) return null;
|
|
154
|
-
return /*#__PURE__*/_react.default.createElement(FormItem, Object.assign({
|
|
155
|
-
key: item.filedName,
|
|
156
|
-
label: item.label,
|
|
157
|
-
name: item.type !== 'custom' && item.filedName,
|
|
158
|
-
rules: item.rules || (item.fieldOptions ? item.fieldOptions.rules : [])
|
|
159
|
-
}, item.protoFormItem), item.type === 'custom' && item.customRender ? item.customRender(_this.filterFormRef, Object.assign({}, item)) : /*#__PURE__*/_react.default.createElement(_FieldComponent.default, Object.assign({}, item, {
|
|
160
|
-
onChange: function onChange(val) {
|
|
161
|
-
var updateValue = val;
|
|
162
|
-
|
|
163
|
-
if (item.type === 'input' || item.type === 'textarea' || item.type === 'radio') {
|
|
164
|
-
updateValue = val.target.value;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (Array.isArray(val)) {
|
|
168
|
-
updateValue = _toConsumableArray(val);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
_this.updateFormFields(_defineProperty({}, item.filedName, updateValue));
|
|
172
|
-
|
|
173
|
-
for (var _len = arguments.length, otherParams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
174
|
-
otherParams[_key - 1] = arguments[_key];
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (item.onChange) item.onChange.apply(item, [val, _this.filterFormRef].concat(otherParams));
|
|
178
|
-
},
|
|
179
|
-
style: Object.assign({
|
|
180
|
-
width: item.type === 'checkbox' || item.type === 'radio' ? 'auto' : _index2.general.formItemStyle.xsm.width
|
|
181
|
-
}, componentStyle)
|
|
182
|
-
})));
|
|
183
|
-
}));
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return reFormItemGroup;
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
_this.state = {
|
|
190
|
-
// recombinationGroup: [],
|
|
191
|
-
reFormItemGroup: undefined
|
|
192
|
-
};
|
|
193
|
-
return _this;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
_createClass(StandardFilter, [{
|
|
197
|
-
key: "componentDidMount",
|
|
198
|
-
value: function componentDidMount() {
|
|
199
|
-
var initialValues = this.props.initialValues;
|
|
200
|
-
this.updateFormFields(initialValues, true);
|
|
201
|
-
}
|
|
202
|
-
}, {
|
|
203
|
-
key: "componentDidUpdate",
|
|
204
|
-
value: function componentDidUpdate(prevProps) {
|
|
205
|
-
var initialValues = this.props.initialValues;
|
|
206
|
-
|
|
207
|
-
if (prevProps.initialValues !== initialValues) {
|
|
208
|
-
this.updateFormFields(initialValues, true);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}, {
|
|
212
|
-
key: "render",
|
|
213
|
-
value: function render() {
|
|
214
|
-
var _this$props2 = this.props,
|
|
215
|
-
className = _this$props2.className,
|
|
216
|
-
style = _this$props2.style,
|
|
217
|
-
onFilterReset = _this$props2.onFilterReset,
|
|
218
|
-
_this$props2$buttonGr = _this$props2.buttonGroup,
|
|
219
|
-
buttonGroup = _this$props2$buttonGr === void 0 ? [] : _this$props2$buttonGr,
|
|
220
|
-
min = _this$props2.min,
|
|
221
|
-
codes = _this$props2.codes,
|
|
222
|
-
permissionCodes = _this$props2.permissionCodes,
|
|
223
|
-
confirmText = _this$props2.confirmText,
|
|
224
|
-
cancelText = _this$props2.cancelText; // const { recombinationGroup } = this.state;
|
|
225
|
-
|
|
226
|
-
return /*#__PURE__*/_react.default.createElement(_form.default, {
|
|
227
|
-
name: "standard-filter-form",
|
|
228
|
-
ref: this.filterFormRef,
|
|
229
|
-
layout: "inline",
|
|
230
|
-
onFinish: this.handleSearch,
|
|
231
|
-
className: className,
|
|
232
|
-
style: style
|
|
233
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
234
|
-
className: "filter-grid"
|
|
235
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
236
|
-
className: "filter-form"
|
|
237
|
-
}, this.state.reFormItemGroup ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderFormItemGroup(), /*#__PURE__*/_react.default.createElement(FormItem, null, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
238
|
-
type: "primary",
|
|
239
|
-
htmlType: "submit"
|
|
240
|
-
}, " ", confirmText || '查询'), onFilterReset && /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
241
|
-
type: "primary",
|
|
242
|
-
style: {
|
|
243
|
-
marginLeft: 8
|
|
244
|
-
},
|
|
245
|
-
onClick: this.handleReset,
|
|
246
|
-
ghost: true
|
|
247
|
-
}, cancelText || '重置'))) : null), buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
248
|
-
className: "filter-btns"
|
|
249
|
-
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
250
|
-
options: buttonGroup,
|
|
251
|
-
min: min,
|
|
252
|
-
codes: codes,
|
|
253
|
-
permissionCodes: permissionCodes
|
|
254
|
-
})) : null));
|
|
255
|
-
}
|
|
256
|
-
}], [{
|
|
257
|
-
key: "getDerivedStateFromProps",
|
|
258
|
-
value: function getDerivedStateFromProps(nextProps) {
|
|
259
|
-
var formItemGroup = nextProps.formItemGroup; // const restOptionList = removeNoPermission(buttonGroup, permissionCodes, codes) || []
|
|
260
|
-
|
|
261
|
-
return {
|
|
262
|
-
// recombinationGroup: restOptionList,
|
|
263
|
-
reFormItemGroup: formItemGroup
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
}]);
|
|
267
|
-
|
|
268
|
-
return StandardFilter;
|
|
269
|
-
}(_react.default.Component);
|
|
270
|
-
|
|
271
|
-
var _default = StandardFilter;
|
|
272
|
-
exports.default = _default;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
|
|
4
|
-
.filter-grid {
|
|
5
|
-
display: flex;
|
|
6
|
-
width: 100%;
|
|
7
|
-
.filter-form {
|
|
8
|
-
flex: 1;
|
|
9
|
-
font-size: 0;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-wrap: wrap;
|
|
12
|
-
.ant-form-item {
|
|
13
|
-
margin-right: @padding-md; // 16px
|
|
14
|
-
margin-bottom: @padding-md;
|
|
15
|
-
.ant-form-item{
|
|
16
|
-
margin-bottom: 0;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
.ant-form-item-control{
|
|
20
|
-
//width: 140px;
|
|
21
|
-
}
|
|
22
|
-
.ant-form-item-control,
|
|
23
|
-
.ant-form-item-label {
|
|
24
|
-
line-height: 32px;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
.filter-btns {
|
|
28
|
-
//max-width: 340px;
|
|
29
|
-
text-align: right;
|
|
30
|
-
.spec-button-group {
|
|
31
|
-
padding-left: 80px;
|
|
32
|
-
}
|
|
33
|
-
.ant-btn {
|
|
34
|
-
margin-bottom: @padding-md;
|
|
35
|
-
margin-left: @padding-sm;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{
|
|
39
|
-
line-height: @height-base - 2;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.toolbarBtn {
|
|
45
|
-
min-height: @btn-height-base;
|
|
46
|
-
margin-bottom: @padding-md;
|
|
47
|
-
.ant-btn {
|
|
48
|
-
margin-right: @padding-md;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.toolbar {
|
|
52
|
-
margin-bottom: @padding-md;
|
|
53
|
-
.toolbar-tForm {
|
|
54
|
-
//min-height: @btn-height-base;
|
|
55
|
-
//display: flex;
|
|
56
|
-
//justify-content: flex-end;
|
|
57
|
-
//align-items: center;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
.searchForm{
|
|
61
|
-
margin-bottom: @padding-md;
|
|
62
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
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 }; }
|
|
17
|
-
|
|
18
|
-
var ActionList = function ActionList(props) {
|
|
19
|
-
var list = props.list,
|
|
20
|
-
form = props.form,
|
|
21
|
-
_props$align = props.align,
|
|
22
|
-
align = _props$align === void 0 ? 'default' : _props$align,
|
|
23
|
-
other = props.other,
|
|
24
|
-
onStep = props.onStep;
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
-
className: "standardForm-actions",
|
|
27
|
-
style: {
|
|
28
|
-
textAlign: !align || align === 'default' ? 'inherit' : align
|
|
29
|
-
}
|
|
30
|
-
}, list.map(function (item, index) {
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
32
|
-
key: index,
|
|
33
|
-
type: item.type ? item.type : 'primary',
|
|
34
|
-
icon: /*#__PURE__*/_react.default.createElement(_IconNode.default, {
|
|
35
|
-
icon: item.icon
|
|
36
|
-
}),
|
|
37
|
-
ghost: item.ghost,
|
|
38
|
-
disabled: item.disabled,
|
|
39
|
-
loading: item.loading,
|
|
40
|
-
onClick: function onClick(e) {
|
|
41
|
-
if (item.action) {
|
|
42
|
-
// 如果有配置默认执行方法,则优先以组件内部的步骤事件做处理
|
|
43
|
-
onStep && onStep(item.action, function () {
|
|
44
|
-
item.fn && item.fn(item, form, other, e);
|
|
45
|
-
});
|
|
46
|
-
} else if (item.fn) {
|
|
47
|
-
item.fn(item, form, other, e);
|
|
48
|
-
} else if (item.onClick) {
|
|
49
|
-
item.onClick(item, form, other, e);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}, item.name);
|
|
53
|
-
}));
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
var _default = ActionList;
|
|
57
|
-
exports.default = _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StandardFormProps, ItemGroupProps } from './index';
|
|
3
|
-
import './style/index.less';
|
|
4
|
-
export interface StepItemGroupProps extends ItemGroupProps {
|
|
5
|
-
icon?: any;
|
|
6
|
-
hideStep?: boolean;
|
|
7
|
-
title?: any;
|
|
8
|
-
status?: any;
|
|
9
|
-
subTitle?: any;
|
|
10
|
-
disabled?: any;
|
|
11
|
-
}
|
|
12
|
-
export interface StepFormProp extends StandardFormProps {
|
|
13
|
-
stepsConfig?: any;
|
|
14
|
-
actionHide?: boolean;
|
|
15
|
-
stepClick?: (type?: string, formChild?: any, values?: any) => void;
|
|
16
|
-
formItemGroup?: StepItemGroupProps[];
|
|
17
|
-
}
|
|
18
|
-
declare const StepForm: React.ForwardRefExoticComponent<Pick<StepFormProp, string | number> & React.RefAttributes<unknown>>;
|
|
19
|
-
export default StepForm;
|