@zgfe/business-lib 1.0.21 → 1.0.22-bugfix.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/es/addToPanel/components/addPanel.js +2 -2
- package/es/assets/styles/chunks.less +0 -2
- package/es/attrConditions/components/operateList.js +1 -0
- package/es/attrConditions/components/valuesList.js +3 -0
- package/es/attributeSelector/demo/disable.d.ts +3 -0
- package/es/attributeSelector/demo/disable.js +64 -0
- package/es/attributeSelector/demo/index.js +0 -10
- package/es/attributeSelector/index.js +2 -0
- package/es/attributeSelector/types.d.ts +2 -0
- package/es/attributeSelector/util.js +2 -2
- package/es/datePicker/index.js +3 -0
- package/es/dnd/demo/index.d.ts +2 -0
- package/es/dnd/demo/index.js +4 -0
- package/es/dnd/index.d.ts +3 -0
- package/es/dnd/index.js +7 -0
- package/es/dnd/types.d.ts +8 -0
- package/es/dnd/types.js +1 -0
- package/es/eventSelector/index.js +3 -1
- package/es/eventSelector/styles/index.less +1 -1
- package/es/eventSelector/types.d.ts +2 -0
- package/es/select/index.js +1 -1
- package/es/userCondition/conditions/periodCondition.js +3 -2
- package/es/userCondition/conditions/runTimesCondition.js +2 -1
- package/es/userCondition/conditions/styles/eventCondition.less +1 -1
- package/es/userCondition/conditions/styles/propCondition.less +2 -2
- package/es/userCondition/styles/index.less +0 -7
- package/package.json +2 -2
|
@@ -120,6 +120,7 @@ var ValuesList = function ValuesList(props) {
|
|
|
120
120
|
disable: true,
|
|
121
121
|
className: "".concat(classPrefix, "-multi-select"),
|
|
122
122
|
theme: theme,
|
|
123
|
+
size: "middle",
|
|
123
124
|
options: []
|
|
124
125
|
});
|
|
125
126
|
}
|
|
@@ -139,6 +140,7 @@ var ValuesList = function ValuesList(props) {
|
|
|
139
140
|
},
|
|
140
141
|
keyField: "value",
|
|
141
142
|
labelField: "label",
|
|
143
|
+
size: "middle",
|
|
142
144
|
theme: props.theme,
|
|
143
145
|
className: "".concat(classPrefix, "-input-select"),
|
|
144
146
|
onChange: onChangeUnit,
|
|
@@ -151,6 +153,7 @@ var ValuesList = function ValuesList(props) {
|
|
|
151
153
|
value: current && current.length ? current[0] : '',
|
|
152
154
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
153
155
|
type: "number",
|
|
156
|
+
size: "middle",
|
|
154
157
|
onChange: onChangeNumber,
|
|
155
158
|
suffix: attr.propCategory === 'userProp' && attr.subtype === 1 ? '%' : null
|
|
156
159
|
}), attr.propCategory === 'userProp' && attr.subtype === 2 && numberAfter);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
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."); }
|
|
4
|
+
|
|
5
|
+
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); }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
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; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { BizAttributeSelector, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
15
|
+
import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
|
|
16
|
+
import eventData from '../../mock/event';
|
|
17
|
+
import envData from '../../mock/env';
|
|
18
|
+
import userData from '../../mock/user';
|
|
19
|
+
import convertAttributeData from '../util';
|
|
20
|
+
export default (function () {
|
|
21
|
+
var _useState = useState({
|
|
22
|
+
id: 30183426,
|
|
23
|
+
propCategory: 'eventProp'
|
|
24
|
+
}),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
attribute = _useState2[0],
|
|
27
|
+
setAttribute = _useState2[1];
|
|
28
|
+
|
|
29
|
+
var store = convertAttributeData({
|
|
30
|
+
eventList: eventData,
|
|
31
|
+
userPropList: userData,
|
|
32
|
+
envPropList: envData
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
function onChange(val) {
|
|
36
|
+
setAttribute(val);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u9009\u62E9\u7684\u5C5E\u6027\u662F\uFF1A", JSON.stringify(attribute)), /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
|
|
40
|
+
value: {
|
|
41
|
+
eventGroupList: store.eventGroupList,
|
|
42
|
+
userPropList: store.userPropList,
|
|
43
|
+
eventEnvList: store.envPropList
|
|
44
|
+
}
|
|
45
|
+
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
46
|
+
enableEventProp: true,
|
|
47
|
+
enableUserProp: true,
|
|
48
|
+
eventIdList: [24143016],
|
|
49
|
+
value: attribute,
|
|
50
|
+
onChange: onChange,
|
|
51
|
+
enableDelete: true,
|
|
52
|
+
disableItemList: [{
|
|
53
|
+
propCategory: 'eventProp',
|
|
54
|
+
id: 30183426
|
|
55
|
+
}, {
|
|
56
|
+
name: 'is_anonymous',
|
|
57
|
+
propCategory: 'userProp'
|
|
58
|
+
}, {
|
|
59
|
+
name: 'browser_version',
|
|
60
|
+
propCategory: 'envProp'
|
|
61
|
+
}],
|
|
62
|
+
enableEnvProp: true
|
|
63
|
+
})));
|
|
64
|
+
});
|
|
@@ -49,16 +49,6 @@ export default (function () {
|
|
|
49
49
|
value: attribute,
|
|
50
50
|
onChange: onChange,
|
|
51
51
|
enableDelete: true,
|
|
52
|
-
disableItemList: [{
|
|
53
|
-
propCategory: 'eventProp',
|
|
54
|
-
id: 30183426
|
|
55
|
-
}, {
|
|
56
|
-
name: 'is_anonymous',
|
|
57
|
-
propCategory: 'userProp'
|
|
58
|
-
}, {
|
|
59
|
-
name: 'browser_version',
|
|
60
|
-
propCategory: 'envProp'
|
|
61
|
-
}],
|
|
62
52
|
enableEnvProp: true
|
|
63
53
|
})));
|
|
64
54
|
});
|
|
@@ -131,6 +131,7 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
131
131
|
ref: boxRef,
|
|
132
132
|
theme: theme,
|
|
133
133
|
border: false,
|
|
134
|
+
size: props.size,
|
|
134
135
|
label: currentAttr === null || currentAttr === void 0 ? void 0 : currentAttr.label,
|
|
135
136
|
placeholder: placeholder
|
|
136
137
|
}))), enableDelete && /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -148,6 +149,7 @@ BizAttributeSelector.defaultProps = {
|
|
|
148
149
|
enableDelete: false,
|
|
149
150
|
placeholder: '请选择',
|
|
150
151
|
theme: 'secondary',
|
|
152
|
+
size: 'middle',
|
|
151
153
|
propSymbol: '*',
|
|
152
154
|
optionsHeaderTip: '带*的属性每日凌晨更新',
|
|
153
155
|
destroyPopupOnHide: false
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
export declare enum PropType {
|
|
3
4
|
STRING = 1,
|
|
@@ -79,6 +80,7 @@ export declare namespace AttributeSelect {
|
|
|
79
80
|
onDelete?: (value?: Value) => void;
|
|
80
81
|
theme?: string;
|
|
81
82
|
destroyPopupOnHide?: boolean;
|
|
83
|
+
size?: SizeType;
|
|
82
84
|
}
|
|
83
85
|
interface Option {
|
|
84
86
|
groupName: string;
|
|
@@ -47,7 +47,7 @@ export default function convertAttributeData(store) {
|
|
|
47
47
|
id: prop.id || 0,
|
|
48
48
|
alias: prop.alias_name,
|
|
49
49
|
category: prop.category,
|
|
50
|
-
key: "envProp-".concat(prop.dimension_sub
|
|
50
|
+
key: "envProp-".concat(prop.dimension_sub),
|
|
51
51
|
label: prop.text,
|
|
52
52
|
name: prop.name,
|
|
53
53
|
propCategory: 'envProp',
|
|
@@ -61,7 +61,7 @@ export default function convertAttributeData(store) {
|
|
|
61
61
|
id: prop.id || 0,
|
|
62
62
|
alias: prop.alias_name,
|
|
63
63
|
category: prop.category,
|
|
64
|
-
key: "userProp-".concat(prop.dimension_sub
|
|
64
|
+
key: "userProp-".concat(prop.dimension_sub),
|
|
65
65
|
label: prop.text || prop.name,
|
|
66
66
|
name: prop.name,
|
|
67
67
|
propCategory: 'userProp',
|
package/es/datePicker/index.js
CHANGED
package/es/dnd/index.js
ADDED
package/es/dnd/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -151,7 +151,8 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
151
151
|
theme: theme,
|
|
152
152
|
border: false,
|
|
153
153
|
label: getLabel(),
|
|
154
|
-
placeholder: placeholder
|
|
154
|
+
placeholder: placeholder,
|
|
155
|
+
size: props.size
|
|
155
156
|
}))));
|
|
156
157
|
};
|
|
157
158
|
|
|
@@ -161,6 +162,7 @@ BizEventSelector.defaultProps = {
|
|
|
161
162
|
popupContainer: true,
|
|
162
163
|
border: true,
|
|
163
164
|
theme: 'secondary',
|
|
165
|
+
size: 'middle',
|
|
164
166
|
destroyPopupOnHide: false
|
|
165
167
|
};
|
|
166
168
|
export default BizEventSelector;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
1
2
|
import { AnalysisEvent, EventGroup } from '../attributeSelector/types';
|
|
2
3
|
export declare namespace EventSelectTypes {
|
|
3
4
|
interface Value {
|
|
@@ -25,6 +26,7 @@ export declare namespace EventSelectTypes {
|
|
|
25
26
|
onVisibleChange?: (visible: boolean) => void;
|
|
26
27
|
border?: boolean;
|
|
27
28
|
theme?: string;
|
|
29
|
+
size?: SizeType;
|
|
28
30
|
destroyPopupOnHide?: boolean;
|
|
29
31
|
onChange?: (val: Value) => void;
|
|
30
32
|
}
|
package/es/select/index.js
CHANGED
|
@@ -182,7 +182,7 @@ var BizSelect = function BizSelect(props) {
|
|
|
182
182
|
disable: props.disable,
|
|
183
183
|
multiple: props.multiple,
|
|
184
184
|
theme: props.theme,
|
|
185
|
-
size: props.size,
|
|
185
|
+
size: props.size || 'middle',
|
|
186
186
|
border: props.border,
|
|
187
187
|
onDelete: onDelete,
|
|
188
188
|
onSearch: function onSearch(v) {
|
|
@@ -107,7 +107,7 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
107
107
|
|
|
108
108
|
if (operator === 'relative' || operator === 'join_time') {
|
|
109
109
|
return /*#__PURE__*/React.createElement(Input, {
|
|
110
|
-
size: "
|
|
110
|
+
size: "middle",
|
|
111
111
|
value: values[0],
|
|
112
112
|
onChange: onDateChange,
|
|
113
113
|
style: {
|
|
@@ -118,7 +118,7 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
118
118
|
|
|
119
119
|
if (operator === 'absolute') {
|
|
120
120
|
return /*#__PURE__*/React.createElement(RangePicker, {
|
|
121
|
-
size: "
|
|
121
|
+
size: "middle",
|
|
122
122
|
defaultValue: [moment(values[0]), moment(values[1])],
|
|
123
123
|
onChange: onDateChange,
|
|
124
124
|
allowClear: false
|
|
@@ -142,6 +142,7 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
142
142
|
options: options,
|
|
143
143
|
labelField: "text",
|
|
144
144
|
keyField: "value",
|
|
145
|
+
size: "middle",
|
|
145
146
|
value: {
|
|
146
147
|
value: runPeriod.operator,
|
|
147
148
|
text: operatorMap[runPeriod.operator]
|
|
@@ -59,11 +59,12 @@ var RunTimesCondition = function RunTimesCondition(props) {
|
|
|
59
59
|
value: runTimes.operator,
|
|
60
60
|
text: runTimes.operator === 'not equal' ? '≠' : runTimes.operator
|
|
61
61
|
},
|
|
62
|
+
size: "middle",
|
|
62
63
|
onChange: onOperatorChange
|
|
63
64
|
})), /*#__PURE__*/React.createElement("div", {
|
|
64
65
|
className: "".concat(classPrefix, "-runtimes-condition-value")
|
|
65
66
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
66
|
-
size: "
|
|
67
|
+
size: "middle",
|
|
67
68
|
value: runTimes.values[0],
|
|
68
69
|
onChange: onValueChange
|
|
69
70
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -22,12 +22,5 @@
|
|
|
22
22
|
.biz-user-condition-and-conditions-empty {
|
|
23
23
|
margin-bottom: 0;
|
|
24
24
|
}
|
|
25
|
-
.biz-select-handle-input-multiple {
|
|
26
|
-
min-height: 40px;
|
|
27
|
-
padding: calc(@margin-xs - 2px) @margin-xs calc(@margin-xs - 2px) @margin-sm;
|
|
28
|
-
.biz-select-handle-holder {
|
|
29
|
-
line-height: 28px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
25
|
}
|
|
33
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22-bugfix.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react": "^16.12.0 || ^17.0.0",
|
|
59
59
|
"yorkie": "^2.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "f3ea834dcbec8fbd66d0a595a0af520dad61d225"
|
|
62
62
|
}
|