@zgfe/business-lib 1.0.7 → 1.0.8

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.
@@ -19,7 +19,7 @@ import { Button } from 'antd';
19
19
  var conditions = [{
20
20
  propCategory: 'userProp',
21
21
  type: 2,
22
- operation: 'gt',
22
+ operator: 'gt',
23
23
  values: ['25200', '1'],
24
24
  attrName: 'duration',
25
25
  category: 'fixed',
@@ -27,7 +27,7 @@ var conditions = [{
27
27
  }, {
28
28
  propCategory: 'eventProp',
29
29
  type: 1,
30
- operation: 'equal',
30
+ operator: 'equal',
31
31
  values: ['Safari', 'Apple WebKit'],
32
32
  attrId: 30183426
33
33
  }];
@@ -25,7 +25,7 @@ export default (function () {
25
25
  condition: {
26
26
  propCategory: 'userProp',
27
27
  type: 2,
28
- operation: 'lt',
28
+ operator: 'lt',
29
29
  values: ['25200', '1'],
30
30
  subtype: 2,
31
31
  attrName: 'duration',
@@ -35,7 +35,7 @@ var BizConditionItem = function BizConditionItem(props) {
35
35
  attr = _useState2[0],
36
36
  setAttr = _useState2[1];
37
37
 
38
- var _useState3 = useState(((_props$defaultValue = props.defaultValue) === null || _props$defaultValue === void 0 ? void 0 : _props$defaultValue.operation) || ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.operation)),
38
+ var _useState3 = useState(((_props$defaultValue = props.defaultValue) === null || _props$defaultValue === void 0 ? void 0 : _props$defaultValue.operator) || ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.operator)),
39
39
  _useState4 = _slicedToArray(_useState3, 2),
40
40
  operate = _useState4[0],
41
41
  setOperate = _useState4[1];
@@ -94,7 +94,7 @@ var BizConditionItem = function BizConditionItem(props) {
94
94
  var responseData = {
95
95
  propCategory: attr.propCategory,
96
96
  type: attr.type,
97
- operation: operate,
97
+ operator: operate,
98
98
  values: values || []
99
99
  };
100
100
 
@@ -15,7 +15,7 @@ export declare namespace AttrConditionTypes {
15
15
  type?: PropType;
16
16
  propCategory?: 'userProp' | 'eventProp' | 'envProp';
17
17
  category?: 'fixed' | 'custom';
18
- operation?: string;
18
+ operator?: string;
19
19
  values?: string[];
20
20
  }
21
21
  interface GroupValue {
@@ -35,6 +35,7 @@ var BizTab = function BizTab(props) {
35
35
  }, /*#__PURE__*/React.createElement(Space, null, (_data$children = data.children) === null || _data$children === void 0 ? void 0 : _data$children.map(function (item) {
36
36
  return /*#__PURE__*/React.createElement(Radio, {
37
37
  key: item.value,
38
+ disabled: item.disabled,
38
39
  value: item.value,
39
40
  onClick: function onClick() {
40
41
  return onChange(data, item);
@@ -14,11 +14,17 @@ export declare const chartTypes: ({
14
14
  label: string;
15
15
  value: string;
16
16
  icon: string;
17
- children: {
17
+ children: ({
18
18
  label: string;
19
19
  value: string;
20
20
  icon: string;
21
- }[];
21
+ disabled?: undefined;
22
+ } | {
23
+ label: string;
24
+ value: string;
25
+ icon: string;
26
+ disabled: boolean;
27
+ })[];
22
28
  disabled?: undefined;
23
29
  })[];
24
30
  declare const _default: () => JSX.Element;
@@ -53,7 +53,8 @@ export var chartTypes = [{
53
53
  }, {
54
54
  label: '汇总图',
55
55
  value: 'bar',
56
- icon: 'huizongtu'
56
+ icon: 'huizongtu',
57
+ disabled: true
57
58
  }]
58
59
  }, {
59
60
  label: '分数',
@@ -26,7 +26,7 @@ var defaultValue = {
26
26
  conditions: [{
27
27
  propCategory: 'eventProp',
28
28
  type: 1,
29
- operation: 'equal',
29
+ operator: 'equal',
30
30
  values: ['Safari'],
31
31
  attrId: 30183430
32
32
  }]
@@ -89,7 +89,7 @@ var PropCondition = function PropCondition(props) {
89
89
  attrId = data.attrId,
90
90
  category = data.category,
91
91
  type = data.type,
92
- operation = data.operation,
92
+ operator = data.operator,
93
93
  values = data.values;
94
94
 
95
95
  var newAttrs = _toConsumableArray(attrs);
@@ -98,7 +98,7 @@ var PropCondition = function PropCondition(props) {
98
98
  attrName: attrName,
99
99
  attrId: attrId,
100
100
  category: category,
101
- operator: transformNumberOperate(operation),
101
+ operator: transformNumberOperate(operator),
102
102
  params: values,
103
103
  attrType: numAttrTypeMap[type]
104
104
  };
@@ -148,7 +148,7 @@ var PropCondition = function PropCondition(props) {
148
148
  props.defaultValue = {
149
149
  attrName: attrName,
150
150
  category: category || 'custom',
151
- operation: operator,
151
+ operator: operator,
152
152
  values: params || [],
153
153
  propCategory: getPropCategory(attrName),
154
154
  type: attrNumTypeMap[attrType]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -58,5 +58,5 @@
58
58
  "prettier": "^2.2.1",
59
59
  "yorkie": "^2.0.0"
60
60
  },
61
- "gitHead": "8cc6c3399b1ac402aaefc6df41f329afd93e0370"
61
+ "gitHead": "6964ab872826830d166d54905639a53303c2f04e"
62
62
  }