@nokecy/qc-ui 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +5 -5
- package/dist/cjs/ag-grid-plus/ag-grid-theme-builder.css +350 -350
- package/dist/cjs/ag-grid-plus/index.less +6 -6
- package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -48
- package/dist/cjs/ag-grid-plus/toolBar/index.js +4 -4
- package/dist/cjs/ag-grid-plus/utils.js +1 -1
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -49
- package/dist/cjs/dashboard/dashboard/index.less +173 -173
- package/dist/cjs/dashboard/dashboard/utils.js +4 -4
- package/dist/cjs/dashboard/utils.js +8 -8
- package/dist/cjs/dashboard/widget/index.less +7 -7
- package/dist/cjs/dashboard/widget/selector/index.less +172 -172
- package/dist/cjs/dialogSelect/index.js +5 -25
- package/dist/cjs/draggableModal/index.d.ts +10 -0
- package/dist/cjs/draggableModal/index.js +113 -0
- package/dist/cjs/draggableModal/style.less +16 -0
- package/dist/cjs/formDesigner/arrayTable/styles.less +2 -2
- package/dist/cjs/formDesigner/index.less +2 -2
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/toolBar/index.less +25 -25
- package/dist/esm/ag-grid-plus/_utils/boolSelect.js +20 -31
- package/dist/esm/ag-grid-plus/ag-grid-theme-builder.css +350 -350
- package/dist/esm/ag-grid-plus/index.less +6 -6
- package/dist/esm/ag-grid-plus/queryForm/index.less +48 -48
- package/dist/esm/ag-grid-plus/setting/index.js +119 -136
- package/dist/esm/ag-grid-plus/toolBar/index.js +4 -4
- package/dist/esm/ag-grid-plus/utils.js +1 -1
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -49
- package/dist/esm/dashboard/dashboard/index.less +173 -173
- package/dist/esm/dashboard/dashboard/utils.js +4 -4
- package/dist/esm/dashboard/utils.js +8 -8
- package/dist/esm/dashboard/widget/index.less +7 -7
- package/dist/esm/dashboard/widget/selector/index.less +172 -172
- package/dist/esm/dialogSelect/index.js +5 -24
- package/dist/esm/draggableModal/index.d.ts +10 -0
- package/dist/esm/draggableModal/index.js +104 -0
- package/dist/esm/draggableModal/style.less +16 -0
- package/dist/esm/formDesigner/arrayTable/styles.less +2 -2
- package/dist/esm/formDesigner/index.less +2 -2
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/esm/toolBar/index.less +25 -25
- package/dist/umd/qc-ui.min.css +1 -1
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +65 -64
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.grid-spin {
|
|
2
|
-
height: 100%;
|
|
3
|
-
|
|
4
|
-
.ant-spin-container {
|
|
5
|
-
height: 100%;
|
|
6
|
-
}
|
|
1
|
+
.grid-spin {
|
|
2
|
+
height: 100%;
|
|
3
|
+
|
|
4
|
+
.ant-spin-container {
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
7
|
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
@pro-table-search-prefix-cls: ~'ag-grid-table-search';
|
|
3
|
-
|
|
4
|
-
@pro-table-form-prefix-cls: ~'ag-grid-table-form';
|
|
5
|
-
|
|
6
|
-
.@{pro-table-search-prefix-cls} {
|
|
7
|
-
margin-bottom: 8px;
|
|
8
|
-
padding: 8px;
|
|
9
|
-
// padding-bottom: 0;
|
|
10
|
-
background-color: #fff;
|
|
11
|
-
|
|
12
|
-
&.@{pro-table-form-prefix-cls} {
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0 16px;
|
|
15
|
-
overflow: unset;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&-light {
|
|
19
|
-
margin-bottom: 0;
|
|
20
|
-
padding: 16px 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&-form-option {
|
|
24
|
-
.ant-form-item {
|
|
25
|
-
margin: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.ant-form-item-label {
|
|
29
|
-
opacity: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.ant-form-item-control-input {
|
|
33
|
-
justify-content: flex-start;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@media (max-width: 575px) {
|
|
39
|
-
.@{pro-table-search-prefix-cls} {
|
|
40
|
-
height: auto !important;
|
|
41
|
-
padding-bottom: 24px;
|
|
42
|
-
|
|
43
|
-
.ant-form-item-label {
|
|
44
|
-
min-width: 80px;
|
|
45
|
-
text-align: left;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
|
|
2
|
+
@pro-table-search-prefix-cls: ~'ag-grid-table-search';
|
|
3
|
+
|
|
4
|
+
@pro-table-form-prefix-cls: ~'ag-grid-table-form';
|
|
5
|
+
|
|
6
|
+
.@{pro-table-search-prefix-cls} {
|
|
7
|
+
margin-bottom: 8px;
|
|
8
|
+
padding: 8px;
|
|
9
|
+
// padding-bottom: 0;
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
|
|
12
|
+
&.@{pro-table-form-prefix-cls} {
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0 16px;
|
|
15
|
+
overflow: unset;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-light {
|
|
19
|
+
margin-bottom: 0;
|
|
20
|
+
padding: 16px 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-form-option {
|
|
24
|
+
.ant-form-item {
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-form-item-label {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ant-form-item-control-input {
|
|
33
|
+
justify-content: flex-start;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (max-width: 575px) {
|
|
39
|
+
.@{pro-table-search-prefix-cls} {
|
|
40
|
+
height: auto !important;
|
|
41
|
+
padding-bottom: 24px;
|
|
42
|
+
|
|
43
|
+
.ant-form-item-label {
|
|
44
|
+
min-width: 80px;
|
|
45
|
+
text-align: left;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -13,8 +13,6 @@ import { createSchemaField } from '@formily/react';
|
|
|
13
13
|
import { onFormInit } from '@formily/core';
|
|
14
14
|
import React, { useMemo } from "react";
|
|
15
15
|
import { SettingOutlined } from '@ant-design/icons';
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
16
|
var Setting = function Setting(props) {
|
|
19
17
|
var gridKey = props.gridKey,
|
|
20
18
|
gridApi = props.gridApi,
|
|
@@ -59,140 +57,125 @@ var Setting = function Setting(props) {
|
|
|
59
57
|
if (!gridKey) {
|
|
60
58
|
return null;
|
|
61
59
|
}
|
|
62
|
-
return /*#__PURE__*/
|
|
63
|
-
id: portalId
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
})
|
|
172
|
-
})]
|
|
173
|
-
})
|
|
174
|
-
})
|
|
175
|
-
})
|
|
176
|
-
})
|
|
177
|
-
});
|
|
60
|
+
return /*#__PURE__*/React.createElement(FormDialog.Portal, {
|
|
61
|
+
id: portalId
|
|
62
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
style: {
|
|
64
|
+
margin: "0 4px",
|
|
65
|
+
color: "#000",
|
|
66
|
+
fontSize: 16,
|
|
67
|
+
cursor: "pointer"
|
|
68
|
+
},
|
|
69
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
70
|
+
var formDialog;
|
|
71
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
72
|
+
while (1) switch (_context.prev = _context.next) {
|
|
73
|
+
case 0:
|
|
74
|
+
formDialog = FormDialog({
|
|
75
|
+
title: "个性化设置",
|
|
76
|
+
width: 960
|
|
77
|
+
}, portalId, function () {
|
|
78
|
+
return /*#__PURE__*/React.createElement(FormLayout, null, /*#__PURE__*/React.createElement(SchemaField, null, /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
79
|
+
"x-component": "FormGrid",
|
|
80
|
+
"x-component-props": {
|
|
81
|
+
maxColumns: [1, 3],
|
|
82
|
+
strictAutoFit: true
|
|
83
|
+
}
|
|
84
|
+
}, /*#__PURE__*/React.createElement(SchemaField.Array, {
|
|
85
|
+
name: "items",
|
|
86
|
+
title: "",
|
|
87
|
+
"x-component": "ArrayTable",
|
|
88
|
+
"x-validator": [{
|
|
89
|
+
message: ""
|
|
90
|
+
}],
|
|
91
|
+
"x-decorator": "FormItem",
|
|
92
|
+
"x-decorator-props": {
|
|
93
|
+
gridSpan: 3
|
|
94
|
+
}
|
|
95
|
+
}, /*#__PURE__*/React.createElement(SchemaField.Object, null, /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
96
|
+
"x-component": "ArrayTable.Column",
|
|
97
|
+
"x-component-props": {
|
|
98
|
+
width: 100,
|
|
99
|
+
title: "列名"
|
|
100
|
+
}
|
|
101
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
102
|
+
name: "headerName",
|
|
103
|
+
"x-decorator": "FormItem",
|
|
104
|
+
"x-component": "Input",
|
|
105
|
+
"x-read-pretty": true
|
|
106
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
107
|
+
"x-component": "ArrayTable.Column",
|
|
108
|
+
"x-component-props": {
|
|
109
|
+
width: 100,
|
|
110
|
+
title: "宽度"
|
|
111
|
+
}
|
|
112
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
113
|
+
name: "width",
|
|
114
|
+
"x-decorator": "FormItem",
|
|
115
|
+
"x-component": "NumberPicker"
|
|
116
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
117
|
+
"x-component": "ArrayTable.Column",
|
|
118
|
+
"x-component-props": {
|
|
119
|
+
width: 100,
|
|
120
|
+
title: "占满"
|
|
121
|
+
}
|
|
122
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
123
|
+
name: "flex",
|
|
124
|
+
"x-decorator": "FormItem",
|
|
125
|
+
"x-component": "Select",
|
|
126
|
+
enum: [{
|
|
127
|
+
value: 1,
|
|
128
|
+
label: "占满"
|
|
129
|
+
}, {
|
|
130
|
+
value: 0,
|
|
131
|
+
label: "不占满"
|
|
132
|
+
}]
|
|
133
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
134
|
+
"x-component": "ArrayTable.Column",
|
|
135
|
+
"x-component-props": {
|
|
136
|
+
width: 100,
|
|
137
|
+
title: '固定位置'
|
|
138
|
+
}
|
|
139
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
140
|
+
name: "pinned",
|
|
141
|
+
"x-decorator": "FormItem",
|
|
142
|
+
"x-component": "Select",
|
|
143
|
+
enum: [{
|
|
144
|
+
value: "left",
|
|
145
|
+
label: "左固定"
|
|
146
|
+
}, {
|
|
147
|
+
value: "right",
|
|
148
|
+
label: "右固定"
|
|
149
|
+
}, {
|
|
150
|
+
value: undefined,
|
|
151
|
+
label: "不固定"
|
|
152
|
+
}]
|
|
153
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
154
|
+
"x-component": "ArrayTable.Column",
|
|
155
|
+
"x-component-props": {
|
|
156
|
+
title: '隐藏'
|
|
157
|
+
}
|
|
158
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
159
|
+
name: "hide",
|
|
160
|
+
"x-decorator": "FormItem",
|
|
161
|
+
"x-component": "Switch"
|
|
162
|
+
})))))));
|
|
163
|
+
});
|
|
164
|
+
formDialog.forConfirm(function (payload, next) {
|
|
165
|
+
var values = payload.values;
|
|
166
|
+
var falg = gridApi.applyColumnState({
|
|
167
|
+
state: values.items,
|
|
168
|
+
applyOrder: true
|
|
178
169
|
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
case "end":
|
|
190
|
-
return _context.stop();
|
|
191
|
-
}
|
|
192
|
-
}, _callee);
|
|
193
|
-
})),
|
|
194
|
-
children: /*#__PURE__*/_jsx(SettingOutlined, {})
|
|
195
|
-
})
|
|
196
|
-
});
|
|
170
|
+
onSaveColumnState && onSaveColumnState(values.items);
|
|
171
|
+
next(payload);
|
|
172
|
+
}).open(formProps);
|
|
173
|
+
case 2:
|
|
174
|
+
case "end":
|
|
175
|
+
return _context.stop();
|
|
176
|
+
}
|
|
177
|
+
}, _callee);
|
|
178
|
+
}))
|
|
179
|
+
}, /*#__PURE__*/React.createElement(SettingOutlined, null)));
|
|
197
180
|
};
|
|
198
181
|
export default Setting;
|
|
@@ -10,10 +10,10 @@ import { ConfigProvider, Tooltip } from 'antd';
|
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import React, { useContext, useMemo } from 'react';
|
|
12
12
|
import { useStyle } from "./style";
|
|
13
|
-
/**
|
|
14
|
-
* 获取配置区域 DOM Item
|
|
15
|
-
*
|
|
16
|
-
* @param setting 配置项
|
|
13
|
+
/**
|
|
14
|
+
* 获取配置区域 DOM Item
|
|
15
|
+
*
|
|
16
|
+
* @param setting 配置项
|
|
17
17
|
*/
|
|
18
18
|
function getSettingItem(setting) {
|
|
19
19
|
if ( /*#__PURE__*/React.isValidElement(setting)) {
|
|
@@ -17,7 +17,7 @@ var esc = function esc(v) {
|
|
|
17
17
|
};
|
|
18
18
|
var getFilter = function getFilter(objectKey, value) {
|
|
19
19
|
if (typeof value === 'string') {
|
|
20
|
-
return value && value != "" ? "".concat(objectKey, "
|
|
20
|
+
return value && value != "" ? "".concat(objectKey, " =* ").concat(esc(value)) : "";
|
|
21
21
|
}
|
|
22
22
|
if (typeof value === 'number') {
|
|
23
23
|
return "".concat(objectKey, " = ").concat(value);
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
.react-dashboard-toolbar {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
// width: 100%;
|
|
6
|
-
padding: 0 10px;
|
|
7
|
-
padding-bottom: 10px;
|
|
8
|
-
// background: var(--component-background);
|
|
9
|
-
|
|
10
|
-
&:after {
|
|
11
|
-
display: block;
|
|
12
|
-
clear: both;
|
|
13
|
-
content: '';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&-left {
|
|
17
|
-
float: left;
|
|
18
|
-
|
|
19
|
-
button {
|
|
20
|
-
margin-right: 10px;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&-right {
|
|
25
|
-
float: right;
|
|
26
|
-
|
|
27
|
-
button {
|
|
28
|
-
margin-left: 10px;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&-space {
|
|
33
|
-
flex: auto;
|
|
34
|
-
height: 1px;
|
|
35
|
-
margin: 0 !important;
|
|
36
|
-
padding: 0 !important;
|
|
37
|
-
border: 0 !important;
|
|
38
|
-
-webkit-box-flex: 1;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&-fixed {
|
|
42
|
-
position: fixed;
|
|
43
|
-
right: 0;
|
|
44
|
-
bottom: 0;
|
|
45
|
-
z-index: 9;
|
|
46
|
-
border-top: 1px solid rgba(128, 128, 128, 0.1);
|
|
47
|
-
box-shadow: 0 -1px 2px rgba(128, 128, 128, 0.03);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
.react-dashboard-toolbar {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
// width: 100%;
|
|
6
|
+
padding: 0 10px;
|
|
7
|
+
padding-bottom: 10px;
|
|
8
|
+
// background: var(--component-background);
|
|
9
|
+
|
|
10
|
+
&:after {
|
|
11
|
+
display: block;
|
|
12
|
+
clear: both;
|
|
13
|
+
content: '';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-left {
|
|
17
|
+
float: left;
|
|
18
|
+
|
|
19
|
+
button {
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-right {
|
|
25
|
+
float: right;
|
|
26
|
+
|
|
27
|
+
button {
|
|
28
|
+
margin-left: 10px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-space {
|
|
33
|
+
flex: auto;
|
|
34
|
+
height: 1px;
|
|
35
|
+
margin: 0 !important;
|
|
36
|
+
padding: 0 !important;
|
|
37
|
+
border: 0 !important;
|
|
38
|
+
-webkit-box-flex: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-fixed {
|
|
42
|
+
position: fixed;
|
|
43
|
+
right: 0;
|
|
44
|
+
bottom: 0;
|
|
45
|
+
z-index: 9;
|
|
46
|
+
border-top: 1px solid rgba(128, 128, 128, 0.1);
|
|
47
|
+
box-shadow: 0 -1px 2px rgba(128, 128, 128, 0.03);
|
|
48
|
+
}
|
|
49
|
+
}
|