@zgfe/business-lib 1.0.9 → 1.0.12
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/es/addToPanel/components/addPanel.d.ts +7 -0
- package/es/addToPanel/components/addPanel.js +101 -0
- package/es/addToPanel/components/radioGroup.d.ts +7 -0
- package/es/addToPanel/components/radioGroup.js +29 -0
- package/es/addToPanel/components/styleList.d.ts +5 -0
- package/es/{dialog/components/tab.js → addToPanel/components/styleList.js} +12 -7
- package/es/{dialog/demo/index2.d.ts → addToPanel/demo/edit.d.ts} +0 -0
- package/es/{dialog/components/list.js → addToPanel/demo/edit.js} +64 -44
- package/es/{dialog/demo/index3.d.ts → addToPanel/demo/index.d.ts} +0 -0
- package/es/addToPanel/demo/index.js +78 -0
- package/es/addToPanel/index.d.ts +6 -0
- package/es/addToPanel/index.js +268 -0
- package/es/addToPanel/styles/addPanel.less +25 -0
- package/es/addToPanel/styles/index.less +6 -0
- package/es/{dialog/components/styles/tab.less → addToPanel/styles/style.less} +7 -2
- package/es/addToPanel/types.d.ts +57 -0
- package/es/addToPanel/types.js +1 -0
- package/es/addToScene/addGroup.d.ts +11 -0
- package/es/addToScene/addGroup.js +34 -0
- package/es/addToScene/demo/index.d.ts +2 -0
- package/es/addToScene/demo/index.js +34 -0
- package/es/addToScene/index.d.ts +6 -0
- package/es/addToScene/index.js +195 -0
- package/es/addToScene/styles/index.less +23 -0
- package/es/addToScene/types.d.ts +29 -0
- package/es/addToScene/types.js +1 -0
- package/es/analysisLayout/demo/index.d.ts +1 -0
- package/es/analysisLayout/demo/index.js +1 -0
- package/es/analysisLayout/index.js +1 -1
- package/es/analysisLayout/index.less +3 -2
- package/es/assets/iconfont/demo_index.html +49 -3
- package/es/assets/iconfont/iconfont.css +11 -3
- package/es/assets/iconfont/iconfont.js +1 -1
- package/es/assets/iconfont/iconfont.json +14 -0
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/assets/styles/chunks.less +17 -1
- package/es/assets/styles/resetAntd.less +61 -20
- package/es/assets/styles/variable.less +8 -1
- package/es/assets/theme.d.ts +3 -0
- package/es/assets/theme.js +4 -1
- package/es/attrConditions/components/stringList.js +4 -3
- package/es/attributeSelector/styles/index.less +2 -0
- package/es/config.d.ts +15 -0
- package/es/config.js +8 -0
- package/es/constants/apis.d.ts +9 -0
- package/es/constants/apis.js +9 -0
- package/es/datePicker/styles/index.less +4 -0
- package/es/dialog/demo/index.d.ts +0 -29
- package/es/dialog/demo/index.js +6 -130
- package/es/dialog/index.d.ts +1 -2
- package/es/dialog/index.js +15 -183
- package/es/dialog/types.d.ts +2 -74
- package/es/eventSelector/listPanel.js +8 -0
- package/es/eventSelector/styles/index.less +11 -5
- package/es/index.d.ts +4 -1
- package/es/index.js +4 -1
- package/es/select/index.js +1 -0
- package/es/select/overlay.js +3 -1
- package/es/select/styles/handle.less +2 -0
- package/es/select/styles/index.less +0 -3
- package/es/select/types.d.ts +1 -0
- package/es/targetSelector/styles/index.less +3 -1
- package/es/utils/ajax.d.ts +33 -7
- package/es/utils/ajax.js +212 -111
- package/package.json +4 -3
- package/es/dialog/components/itemNode.d.ts +0 -10
- package/es/dialog/components/itemNode.js +0 -109
- package/es/dialog/components/list.d.ts +0 -5
- package/es/dialog/components/selectToInput.d.ts +0 -6
- package/es/dialog/components/selectToInput.js +0 -175
- package/es/dialog/components/styles/handle.less +0 -39
- package/es/dialog/components/styles/list.less +0 -60
- package/es/dialog/components/tab.d.ts +0 -5
- package/es/dialog/data/data.d.ts +0 -20
- package/es/dialog/data/data.js +0 -73
- package/es/dialog/demo/index2.js +0 -109
- package/es/dialog/demo/index3.js +0 -61
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '../../assets/styles/inner.less';
|
|
2
|
+
|
|
2
3
|
.biz-date-picker {
|
|
3
4
|
display: flex;
|
|
4
5
|
|
|
@@ -10,15 +11,18 @@
|
|
|
10
11
|
display: flex;
|
|
11
12
|
margin: 0 16px;
|
|
12
13
|
}
|
|
14
|
+
|
|
13
15
|
.biz-select-handle {
|
|
14
16
|
padding: 0;
|
|
15
17
|
}
|
|
18
|
+
|
|
16
19
|
&-item {
|
|
17
20
|
display: flex;
|
|
18
21
|
align-items: center;
|
|
19
22
|
justify-content: center;
|
|
20
23
|
width: 58px;
|
|
21
24
|
height: @height-base;
|
|
25
|
+
color: @text-color-secondary;
|
|
22
26
|
border: 1px solid @border-color-base;
|
|
23
27
|
cursor: pointer;
|
|
24
28
|
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
export declare const chartTypes: ({
|
|
2
|
-
label: string;
|
|
3
|
-
value: string;
|
|
4
|
-
icon: string;
|
|
5
|
-
disabled?: undefined;
|
|
6
|
-
children?: undefined;
|
|
7
|
-
} | {
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
icon: string;
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
children?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
label: string;
|
|
15
|
-
value: string;
|
|
16
|
-
icon: string;
|
|
17
|
-
children: ({
|
|
18
|
-
label: string;
|
|
19
|
-
value: string;
|
|
20
|
-
icon: string;
|
|
21
|
-
disabled?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
label: string;
|
|
24
|
-
value: string;
|
|
25
|
-
icon: string;
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
})[];
|
|
28
|
-
disabled?: undefined;
|
|
29
|
-
})[];
|
|
30
1
|
declare const _default: () => JSX.Element;
|
|
31
2
|
export default _default;
|
package/es/dialog/demo/index.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
-
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
|
|
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; }
|
|
6
|
-
|
|
7
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
2
|
|
|
9
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -19,143 +13,25 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
13
|
import React, { useState } from 'react';
|
|
20
14
|
import { BizDialog } from '@zgfe/business-lib';
|
|
21
15
|
import { Button } from 'antd';
|
|
22
|
-
var options = [{
|
|
23
|
-
id: 11,
|
|
24
|
-
name: '分类一'
|
|
25
|
-
}, {
|
|
26
|
-
id: 22,
|
|
27
|
-
name: '分类二'
|
|
28
|
-
}, {
|
|
29
|
-
id: 33,
|
|
30
|
-
name: '分分类三一'
|
|
31
|
-
}];
|
|
32
|
-
export var chartTypes = [{
|
|
33
|
-
label: '趋势图',
|
|
34
|
-
value: 'line',
|
|
35
|
-
icon: 'qushitu1'
|
|
36
|
-
}, {
|
|
37
|
-
label: '汇总图',
|
|
38
|
-
value: 'bar',
|
|
39
|
-
icon: 'huizongtu'
|
|
40
|
-
}, {
|
|
41
|
-
label: '地图',
|
|
42
|
-
value: 'map',
|
|
43
|
-
icon: 'ditu',
|
|
44
|
-
disabled: true
|
|
45
|
-
}, {
|
|
46
|
-
label: '表格',
|
|
47
|
-
value: 'table',
|
|
48
|
-
icon: 'biaoge',
|
|
49
|
-
children: [{
|
|
50
|
-
label: '趋势图',
|
|
51
|
-
value: 'line',
|
|
52
|
-
icon: 'qushitu1'
|
|
53
|
-
}, {
|
|
54
|
-
label: '汇总图',
|
|
55
|
-
value: 'bar',
|
|
56
|
-
icon: 'huizongtu',
|
|
57
|
-
disabled: true
|
|
58
|
-
}]
|
|
59
|
-
}, {
|
|
60
|
-
label: '分数',
|
|
61
|
-
value: 'fraction',
|
|
62
|
-
icon: 'fenshu'
|
|
63
|
-
}];
|
|
64
|
-
var fields = [{
|
|
65
|
-
label: '分类',
|
|
66
|
-
name: 'class',
|
|
67
|
-
extendName: 'range',
|
|
68
|
-
type: 'selectToInput',
|
|
69
|
-
options: options,
|
|
70
|
-
children: ['range'],
|
|
71
|
-
fieldNames: {
|
|
72
|
-
label: 'name',
|
|
73
|
-
value: 'id'
|
|
74
|
-
},
|
|
75
|
-
rules: [{
|
|
76
|
-
required: true,
|
|
77
|
-
message: '请选择分类'
|
|
78
|
-
}],
|
|
79
|
-
onChange: function onChange(val) {
|
|
80
|
-
console.log('value>>>', val);
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
label: '名称',
|
|
84
|
-
name: 'name',
|
|
85
|
-
type: 'input',
|
|
86
|
-
rules: [{
|
|
87
|
-
required: true,
|
|
88
|
-
message: '请输入名称'
|
|
89
|
-
}]
|
|
90
|
-
}, {
|
|
91
|
-
label: '图表',
|
|
92
|
-
name: 'chart',
|
|
93
|
-
type: 'tab',
|
|
94
|
-
options: chartTypes,
|
|
95
|
-
rules: [{
|
|
96
|
-
required: true,
|
|
97
|
-
message: '请选择图表'
|
|
98
|
-
}]
|
|
99
|
-
}, {
|
|
100
|
-
label: '显示',
|
|
101
|
-
name: 'show',
|
|
102
|
-
type: 'radio',
|
|
103
|
-
direction: 'vertical',
|
|
104
|
-
dependenceFields: {
|
|
105
|
-
chart: 'line'
|
|
106
|
-
},
|
|
107
|
-
options: [{
|
|
108
|
-
label: '动态显示数据最多的10个分组',
|
|
109
|
-
value: 'dynamic'
|
|
110
|
-
}, {
|
|
111
|
-
label: '固定显示当前选择的分组',
|
|
112
|
-
value: 'fix'
|
|
113
|
-
}],
|
|
114
|
-
rules: [{
|
|
115
|
-
required: true,
|
|
116
|
-
message: '请选择'
|
|
117
|
-
}]
|
|
118
|
-
}];
|
|
119
|
-
var formData = {
|
|
120
|
-
class: {
|
|
121
|
-
id: 11,
|
|
122
|
-
name: '分类一'
|
|
123
|
-
},
|
|
124
|
-
range: 'public',
|
|
125
|
-
show: 'dynamic',
|
|
126
|
-
chart: 'line'
|
|
127
|
-
};
|
|
128
16
|
export default (function () {
|
|
129
17
|
var _useState = useState(false),
|
|
130
18
|
_useState2 = _slicedToArray(_useState, 2),
|
|
131
19
|
visible = _useState2[0],
|
|
132
20
|
setVisible = _useState2[1];
|
|
133
21
|
|
|
134
|
-
var _useState3 = useState(),
|
|
135
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
136
|
-
dialogData = _useState4[0],
|
|
137
|
-
setDialogData = _useState4[1];
|
|
138
|
-
|
|
139
|
-
var handleSubmit = function handleSubmit(data) {
|
|
140
|
-
setDialogData(function () {
|
|
141
|
-
return _objectSpread({}, data);
|
|
142
|
-
});
|
|
143
|
-
setVisible(false);
|
|
144
|
-
};
|
|
145
|
-
|
|
146
22
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
147
23
|
type: "primary",
|
|
148
24
|
onClick: function onClick() {
|
|
149
25
|
setVisible(true);
|
|
150
26
|
}
|
|
151
|
-
}, "\
|
|
152
|
-
title: "\
|
|
27
|
+
}, "\u6253\u5F00\u5F39\u7A97"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(BizDialog, {
|
|
28
|
+
title: "\u6807\u9898",
|
|
153
29
|
visible: visible,
|
|
154
|
-
onOk:
|
|
155
|
-
|
|
156
|
-
|
|
30
|
+
onOk: function onOk() {
|
|
31
|
+
setVisible(false);
|
|
32
|
+
},
|
|
157
33
|
onCancel: function onCancel() {
|
|
158
34
|
setVisible(false);
|
|
159
35
|
}
|
|
160
|
-
}));
|
|
36
|
+
}, "fdfdfdsa"));
|
|
161
37
|
});
|
package/es/dialog/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FormItemProps, ModalProps } from 'antd';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { DialogTypes } from './types';
|
|
4
3
|
import './styles/index.less';
|
|
5
4
|
export declare const classPrefix = "biz-dialog";
|
|
6
|
-
declare const BizDialog: React.FC<
|
|
5
|
+
declare const BizDialog: React.FC<DialogTypes.Props>;
|
|
7
6
|
export default BizDialog;
|
package/es/dialog/index.js
CHANGED
|
@@ -1,207 +1,39 @@
|
|
|
1
|
-
var _excluded = ["width", "initialValues", "fields", "visible", "showMark", "layout"];
|
|
2
|
-
|
|
3
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
|
-
|
|
5
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
2
|
|
|
7
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
4
|
|
|
9
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; }
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
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."); }
|
|
14
|
-
|
|
15
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16
|
-
|
|
17
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
18
|
-
|
|
19
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
-
|
|
21
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
|
-
|
|
23
|
-
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); }
|
|
24
|
-
|
|
25
|
-
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; }
|
|
26
|
-
|
|
27
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
28
|
-
|
|
29
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
|
-
|
|
31
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
32
|
-
|
|
33
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
34
|
-
|
|
35
|
-
import { Form, Modal } from 'antd';
|
|
36
|
-
import React, { useEffect, useState } from 'react';
|
|
7
|
+
import { Modal } from 'antd';
|
|
8
|
+
import React from 'react';
|
|
37
9
|
import './styles/index.less';
|
|
38
|
-
import ItemNode from './components/itemNode';
|
|
39
10
|
export var classPrefix = 'biz-dialog';
|
|
40
11
|
|
|
41
12
|
var BizDialog = function BizDialog(props) {
|
|
42
|
-
|
|
43
|
-
initialValues = props.initialValues,
|
|
44
|
-
fields = props.fields,
|
|
45
|
-
visible = props.visible,
|
|
46
|
-
showMark = props.showMark,
|
|
47
|
-
layout = props.layout,
|
|
48
|
-
res = _objectWithoutProperties(props, _excluded);
|
|
49
|
-
|
|
50
|
-
var _Form$useForm = Form.useForm(),
|
|
51
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
52
|
-
form = _Form$useForm2[0];
|
|
53
|
-
|
|
54
|
-
var _useState = useState(fields),
|
|
55
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
-
formFields = _useState2[0],
|
|
57
|
-
setFormFields = _useState2[1];
|
|
58
|
-
|
|
59
|
-
useEffect(function () {
|
|
60
|
-
if (visible) {
|
|
61
|
-
form.resetFields();
|
|
62
|
-
}
|
|
63
|
-
}, [visible]);
|
|
64
|
-
useEffect(function () {
|
|
65
|
-
setFormFields(function () {
|
|
66
|
-
return _toConsumableArray(fields);
|
|
67
|
-
});
|
|
68
|
-
}, [fields]);
|
|
69
|
-
|
|
70
|
-
var onOk = function onOk() {
|
|
71
|
-
form.validateFields().then(function (values) {
|
|
72
|
-
props.onOk && props.onOk(values);
|
|
73
|
-
}).catch(function (info) {
|
|
74
|
-
console.log('Validate Failed:', info);
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
var onCancel = function onCancel() {
|
|
79
|
-
if (props.onCancel) props.onCancel();
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
return /*#__PURE__*/React.createElement(Modal, _objectSpread(_objectSpread({
|
|
83
|
-
width: width,
|
|
84
|
-
centered: true,
|
|
85
|
-
visible: visible,
|
|
13
|
+
return /*#__PURE__*/React.createElement(Modal, _objectSpread({
|
|
86
14
|
maskStyle: {
|
|
87
15
|
background: '#021429',
|
|
88
16
|
opacity: 0.8
|
|
89
17
|
},
|
|
90
18
|
bodyStyle: {
|
|
91
19
|
borderRadius: '10px'
|
|
92
|
-
},
|
|
93
|
-
cancelText: "\u53D6\u6D88",
|
|
94
|
-
okText: "\u786E\u5B9A",
|
|
95
|
-
closable: false
|
|
96
|
-
}, res), {}, {
|
|
97
|
-
onCancel: onCancel,
|
|
98
|
-
onOk: onOk
|
|
99
|
-
}), /*#__PURE__*/React.createElement(Form, {
|
|
100
|
-
className: classPrefix,
|
|
101
|
-
form: form,
|
|
102
|
-
requiredMark: showMark,
|
|
103
|
-
initialValues: initialValues,
|
|
104
|
-
layout: layout
|
|
105
|
-
}, formFields === null || formFields === void 0 ? void 0 : formFields.map(function (item) {
|
|
106
|
-
if (item.dependenceFields && Object.keys(item.dependenceFields).length > 0) {
|
|
107
|
-
var keys = Object.keys(item.dependenceFields);
|
|
108
|
-
var dependenceFields = item.dependenceFields;
|
|
109
|
-
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
110
|
-
key: item.name,
|
|
111
|
-
noStyle: true,
|
|
112
|
-
shouldUpdate: function shouldUpdate(prevValues, curValues) {
|
|
113
|
-
var flag = false;
|
|
114
|
-
|
|
115
|
-
var _iterator = _createForOfIteratorHelper(keys),
|
|
116
|
-
_step;
|
|
117
|
-
|
|
118
|
-
try {
|
|
119
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
120
|
-
var key = _step.value;
|
|
121
|
-
|
|
122
|
-
if (item.dependencekeys && item.dependencekeys[key]) {
|
|
123
|
-
var dKey = item.dependencekeys[key];
|
|
124
|
-
|
|
125
|
-
if (prevValues[key][dKey] !== curValues[key][dKey]) {
|
|
126
|
-
flag = true;
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
if (prevValues[key] !== curValues[key]) {
|
|
131
|
-
flag = true;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
} catch (err) {
|
|
137
|
-
_iterator.e(err);
|
|
138
|
-
} finally {
|
|
139
|
-
_iterator.f();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return flag;
|
|
143
|
-
}
|
|
144
|
-
}, function (_ref) {
|
|
145
|
-
var getFieldValue = _ref.getFieldValue;
|
|
146
|
-
var flag = true;
|
|
147
|
-
|
|
148
|
-
var _iterator2 = _createForOfIteratorHelper(keys),
|
|
149
|
-
_step2;
|
|
150
|
-
|
|
151
|
-
try {
|
|
152
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
153
|
-
var key = _step2.value;
|
|
154
|
-
|
|
155
|
-
if (getFieldValue(key) !== dependenceFields[key]) {
|
|
156
|
-
flag = false;
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
} catch (err) {
|
|
161
|
-
_iterator2.e(err);
|
|
162
|
-
} finally {
|
|
163
|
-
_iterator2.f();
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return flag ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
167
|
-
label: item.label,
|
|
168
|
-
name: item.name,
|
|
169
|
-
hidden: item.hidden,
|
|
170
|
-
rules: item.rules,
|
|
171
|
-
help: item.help,
|
|
172
|
-
wrapperCol: {
|
|
173
|
-
offset: !item.label && layout === 'horizontal' ? 2 : 0
|
|
174
|
-
},
|
|
175
|
-
shouldUpdate: true
|
|
176
|
-
}, /*#__PURE__*/React.createElement(ItemNode, {
|
|
177
|
-
field: item,
|
|
178
|
-
fieldNames: item.fieldNames
|
|
179
|
-
})) : null;
|
|
180
|
-
});
|
|
181
|
-
} else {
|
|
182
|
-
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
183
|
-
key: item.name,
|
|
184
|
-
label: item.label,
|
|
185
|
-
name: item.name,
|
|
186
|
-
hidden: item.hidden,
|
|
187
|
-
rules: item.rules,
|
|
188
|
-
help: item.help,
|
|
189
|
-
wrapperCol: {
|
|
190
|
-
offset: !item.label && layout === 'horizontal' ? 2 : 0
|
|
191
|
-
},
|
|
192
|
-
shouldUpdate: true
|
|
193
|
-
}, /*#__PURE__*/React.createElement(ItemNode, {
|
|
194
|
-
field: item,
|
|
195
|
-
fieldNames: item.fieldNames
|
|
196
|
-
}));
|
|
197
20
|
}
|
|
198
|
-
}))
|
|
21
|
+
}, props), props.children);
|
|
199
22
|
};
|
|
200
23
|
|
|
201
24
|
BizDialog.defaultProps = {
|
|
202
25
|
width: 520,
|
|
203
26
|
visible: false,
|
|
204
|
-
|
|
205
|
-
|
|
27
|
+
cancelText: '取消',
|
|
28
|
+
okText: '确定',
|
|
29
|
+
closable: false,
|
|
30
|
+
centered: true,
|
|
31
|
+
okButtonProps: {
|
|
32
|
+
size: 'large'
|
|
33
|
+
},
|
|
34
|
+
cancelButtonProps: {
|
|
35
|
+
size: 'large',
|
|
36
|
+
type: 'text'
|
|
37
|
+
}
|
|
206
38
|
};
|
|
207
39
|
export default BizDialog;
|
package/es/dialog/types.d.ts
CHANGED
|
@@ -1,77 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { BizSelectTypes } from '../select/types';
|
|
4
|
-
export declare namespace TabTypes {
|
|
5
|
-
interface Props {
|
|
6
|
-
value?: string;
|
|
7
|
-
options: Array<TabItem>;
|
|
8
|
-
onChange?: (value: string) => void;
|
|
9
|
-
}
|
|
10
|
-
interface TabItemChild {
|
|
11
|
-
label: string;
|
|
12
|
-
value: string;
|
|
13
|
-
icon: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface TabItem extends TabItemChild {
|
|
17
|
-
children?: Array<TabItemChild>;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export interface SelectInputProps {
|
|
21
|
-
name?: string;
|
|
22
|
-
extendName?: string;
|
|
23
|
-
value?: string;
|
|
24
|
-
onChange?: (value?: BizSelectTypes.Option | undefined) => void;
|
|
25
|
-
}
|
|
26
|
-
export interface ItemProps {
|
|
27
|
-
id: string | number;
|
|
28
|
-
title?: string;
|
|
29
|
-
content?: string;
|
|
30
|
-
icon?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ListProps {
|
|
33
|
-
value?: string | number;
|
|
34
|
-
options?: Array<ItemProps>;
|
|
35
|
-
onChange?: (value: string | number) => void;
|
|
36
|
-
}
|
|
1
|
+
import { ModalProps } from 'antd';
|
|
37
2
|
export declare namespace DialogTypes {
|
|
38
|
-
|
|
39
|
-
label: string;
|
|
40
|
-
value: string;
|
|
41
|
-
}
|
|
42
|
-
interface Option {
|
|
43
|
-
[otherProp: string]: any;
|
|
44
|
-
}
|
|
45
|
-
export interface FieldProps {
|
|
46
|
-
label?: string;
|
|
47
|
-
type?: string;
|
|
48
|
-
value?: string | number;
|
|
49
|
-
dependenceFields?: {
|
|
50
|
-
[pro: string]: string;
|
|
51
|
-
};
|
|
52
|
-
dependencekeys?: {
|
|
53
|
-
[pro: string]: string;
|
|
54
|
-
};
|
|
55
|
-
placeholder?: string;
|
|
56
|
-
direction?: 'horizontal' | 'vertical';
|
|
57
|
-
options?: Option[];
|
|
58
|
-
extendName?: string;
|
|
59
|
-
fieldNames?: FieldOption;
|
|
60
|
-
children?: Array<string>;
|
|
61
|
-
multiple?: boolean;
|
|
62
|
-
selectType?: 'group' | 'normal';
|
|
63
|
-
enableSearch?: boolean;
|
|
64
|
-
overlayWidth?: number;
|
|
65
|
-
extra?: (option: Option) => ReactNode;
|
|
66
|
-
onChange?: (value?: any) => void;
|
|
67
|
-
}
|
|
68
|
-
export interface Props {
|
|
69
|
-
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
70
|
-
fields: Array<FieldProps & FormItemProps>;
|
|
71
|
-
initialValues?: object;
|
|
72
|
-
showMark?: boolean;
|
|
73
|
-
onOk?: (data: object) => void;
|
|
74
|
-
onCancel?: () => void;
|
|
3
|
+
interface Props extends ModalProps {
|
|
75
4
|
}
|
|
76
|
-
export {};
|
|
77
5
|
}
|
|
@@ -134,6 +134,14 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
134
134
|
setCurrentGroup(currentValue === null || currentValue === void 0 ? void 0 : currentValue.group);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
if (!groupList || !groupList.length || !groupList[0].eventList || !groupList[0].eventList.length) {
|
|
138
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: "".concat(classPrefix, "-nodata-panel")
|
|
140
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "".concat(classPrefix, "-nodata")
|
|
142
|
+
}, "\u6682\u65E0\u6570\u636E"));
|
|
143
|
+
}
|
|
144
|
+
|
|
137
145
|
return /*#__PURE__*/React.createElement("div", {
|
|
138
146
|
className: "".concat(classPrefix, "-list-panel")
|
|
139
147
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
flex-direction: row;
|
|
11
11
|
width: 477px;
|
|
12
12
|
max-height: 400px;
|
|
13
|
+
padding: 0;
|
|
13
14
|
.__select-panel();
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
&-left {
|
|
17
18
|
flex: none;
|
|
18
19
|
width: 192px;
|
|
19
|
-
padding:
|
|
20
|
+
padding: @padding-xs;
|
|
20
21
|
overflow-y: auto;
|
|
21
22
|
border-right: 1px solid @border-color-base;
|
|
22
23
|
}
|
|
@@ -25,21 +26,26 @@
|
|
|
25
26
|
display: flex;
|
|
26
27
|
flex: 1;
|
|
27
28
|
flex-direction: column;
|
|
28
|
-
padding:
|
|
29
|
+
padding: @padding-xs;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
&-search {
|
|
32
33
|
flex: none;
|
|
33
34
|
margin-bottom: @margin-sm;
|
|
34
|
-
&.ant-input-affix-wrapper {
|
|
35
|
-
border-radius: @border-radius-normal;
|
|
36
|
-
}
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
&-list {
|
|
40
38
|
flex: 1;
|
|
41
39
|
overflow-y: auto;
|
|
42
40
|
}
|
|
41
|
+
&-nodata-panel {
|
|
42
|
+
width: 284px;
|
|
43
|
+
.__select-panel();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-nodata {
|
|
47
|
+
.__select-nodata();
|
|
48
|
+
}
|
|
43
49
|
|
|
44
50
|
&-option {
|
|
45
51
|
.__select-option();
|
package/es/index.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ import convertAttributeData from './attributeSelector/util';
|
|
|
19
19
|
import BizGlobalDataContext from './context';
|
|
20
20
|
import BizUserCondition from './userCondition';
|
|
21
21
|
import BizSearchInput from './searchInput';
|
|
22
|
-
|
|
22
|
+
import BizAddToScene from './addToScene';
|
|
23
|
+
import BizAddToPanel from './addToPanel';
|
|
24
|
+
import setGlobalConfig from './config';
|
|
25
|
+
export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, ajax, util, theme, convertAttributeData, setGlobalConfig, };
|
|
23
26
|
export type { UserGroupTypes } from './userGroup/types';
|
|
24
27
|
export type { BizSelectTypes } from './select/types';
|
|
25
28
|
export type { AttributeSelect } from './attributeSelector/types';
|
package/es/index.js
CHANGED
|
@@ -18,4 +18,7 @@ import convertAttributeData from './attributeSelector/util';
|
|
|
18
18
|
import BizGlobalDataContext from './context';
|
|
19
19
|
import BizUserCondition from './userCondition';
|
|
20
20
|
import BizSearchInput from './searchInput';
|
|
21
|
-
|
|
21
|
+
import BizAddToScene from './addToScene';
|
|
22
|
+
import BizAddToPanel from './addToPanel';
|
|
23
|
+
import setGlobalConfig from './config';
|
|
24
|
+
export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, ajax, util, theme, convertAttributeData, setGlobalConfig };
|
package/es/select/index.js
CHANGED
package/es/select/overlay.js
CHANGED
|
@@ -164,7 +164,9 @@ var SelectOverlay = function SelectOverlay(props) {
|
|
|
164
164
|
if (showList && showList.length) {
|
|
165
165
|
return showList;
|
|
166
166
|
} else {
|
|
167
|
-
return /*#__PURE__*/React.createElement("span",
|
|
167
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
168
|
+
className: "".concat(classPrefix, "-nodata")
|
|
169
|
+
}, "\u6682\u65E0\u6570\u636E");
|
|
168
170
|
}
|
|
169
171
|
}
|
|
170
172
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
&.lg {
|
|
24
24
|
height: @height-lg;
|
|
25
|
+
font-size: @font-size-lg;
|
|
25
26
|
line-height: @height-lg;
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
top: 50%;
|
|
83
84
|
right: 8px;
|
|
84
85
|
flex: none;
|
|
86
|
+
color: @text-color-secondary;
|
|
85
87
|
font-size: @font-size-lg;
|
|
86
88
|
transform: translateY(-50%);
|
|
87
89
|
}
|