@zgfe/business-lib 1.1.66 → 1.1.67-beta.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.
Files changed (87) hide show
  1. package/es/assets/iconfont/demo_index.html +118 -3
  2. package/es/assets/iconfont/iconfont.css +23 -3
  3. package/es/assets/iconfont/iconfont.js +1 -1
  4. package/es/assets/iconfont/iconfont.json +35 -0
  5. package/es/assets/iconfont/iconfont.ttf +0 -0
  6. package/es/assets/iconfont/iconfont.woff +0 -0
  7. package/es/assets/iconfont/iconfont.woff2 +0 -0
  8. package/es/assets/styles/chunks.less +18 -0
  9. package/es/assets/styles/variable.less +1 -0
  10. package/es/attrCondition/group.d.ts +2 -2
  11. package/es/attrCondition/group.js +10 -6
  12. package/es/attrCondition/index.js +43 -7
  13. package/es/attrCondition/styles/index.less +23 -7
  14. package/es/attrCondition/useAttrCondition.d.ts +3 -1
  15. package/es/attrCondition/useAttrCondition.js +2 -1
  16. package/es/attrCondition/useConditionGroup.js +14 -3
  17. package/es/attrConditions/components/stringList.d.ts +1 -0
  18. package/es/attrConditions/components/stringList.js +1 -0
  19. package/es/attrConditions/components/valuesList.d.ts +1 -0
  20. package/es/attrConditions/components/valuesList.js +6 -1
  21. package/es/attrConditions/index.js +4 -2
  22. package/es/attrConditions/types.d.ts +1 -0
  23. package/es/attributeSelector/demo/disable.js +6 -1
  24. package/es/attributeSelector/index.js +8 -13
  25. package/es/attributeSelector/styles/index.less +8 -19
  26. package/es/attributeSelector/types.d.ts +2 -1
  27. package/es/context/index.d.ts +4 -0
  28. package/es/context/index.js +2 -1
  29. package/es/eventSelector/index.js +0 -1
  30. package/es/eventSelector/listPanel.d.ts +10 -0
  31. package/es/eventSelector/listPanel.js +9 -9
  32. package/es/eventSelector/option.js +5 -2
  33. package/es/formulaTarget/components/formula/data.d.ts +16 -0
  34. package/es/formulaTarget/components/formula/data.js +40 -0
  35. package/es/formulaTarget/components/formula/demo.d.ts +2 -0
  36. package/es/formulaTarget/components/formula/demo.js +76 -0
  37. package/es/formulaTarget/components/formula/index.d.ts +6 -0
  38. package/es/formulaTarget/components/formula/index.js +132 -0
  39. package/es/formulaTarget/components/formula/index.less +68 -0
  40. package/es/formulaTarget/components/formula/types.d.ts +24 -0
  41. package/es/formulaTarget/components/formula/types.js +1 -0
  42. package/es/formulaTarget/components/formula/util.d.ts +28 -0
  43. package/es/formulaTarget/components/formula/util.js +245 -0
  44. package/es/formulaTarget/components/formulaItem/data.d.ts +2 -0
  45. package/es/formulaTarget/components/formulaItem/data.js +4 -0
  46. package/es/formulaTarget/components/formulaItem/index.d.ts +4 -0
  47. package/es/formulaTarget/components/formulaItem/index.js +190 -0
  48. package/es/formulaTarget/components/formulaItem/types.d.ts +10 -0
  49. package/es/formulaTarget/components/formulaItem/types.js +1 -0
  50. package/es/formulaTarget/components/panel/data.d.ts +8 -0
  51. package/es/formulaTarget/components/panel/data.js +32 -0
  52. package/es/formulaTarget/components/panel/demo.d.ts +2 -0
  53. package/es/formulaTarget/components/panel/demo.js +59 -0
  54. package/es/formulaTarget/components/panel/index.d.ts +6 -0
  55. package/es/formulaTarget/components/panel/index.js +162 -0
  56. package/es/formulaTarget/components/panel/index.less +131 -0
  57. package/es/formulaTarget/components/panel/item.d.ts +5 -0
  58. package/es/formulaTarget/components/panel/item.js +76 -0
  59. package/es/formulaTarget/components/panel/types.d.ts +13 -0
  60. package/es/formulaTarget/components/panel/types.js +1 -0
  61. package/es/formulaTarget/components/symbol/index.d.ts +7 -0
  62. package/es/formulaTarget/components/symbol/index.js +48 -0
  63. package/es/formulaTarget/components/symbol/index.less +48 -0
  64. package/es/formulaTarget/demo/group.d.ts +2 -0
  65. package/es/formulaTarget/demo/group.js +92 -0
  66. package/es/formulaTarget/demo/index.d.ts +2 -0
  67. package/es/formulaTarget/demo/index.js +21 -0
  68. package/es/formulaTarget/index.d.ts +5 -0
  69. package/es/formulaTarget/index.js +196 -0
  70. package/es/formulaTarget/styles/index.less +66 -0
  71. package/es/formulaTarget/types.d.ts +17 -0
  72. package/es/formulaTarget/types.js +1 -0
  73. package/es/index.d.ts +2 -1
  74. package/es/index.js +2 -1
  75. package/es/select/handle.js +9 -2
  76. package/es/select/styles/handle.less +1 -0
  77. package/es/select/types.d.ts +1 -0
  78. package/es/targetConditionGroup/components/targetDimension.js +0 -2
  79. package/es/targetConditionGroup/demo/index.js +1 -0
  80. package/es/targetConditionGroup/index.js +15 -7
  81. package/es/targetConditionGroup/styles/index.less +31 -6
  82. package/es/targetSelector/index.js +11 -69
  83. package/es/targetSelector/optionIcon.js +3 -0
  84. package/es/targetSelector/styles/index.less +27 -13
  85. package/es/userGroup/index.js +5 -9
  86. package/es/userGroup/styles/index.less +9 -10
  87. package/package.json +2 -2
@@ -163,3 +163,21 @@
163
163
  .__default-hover();
164
164
  }
165
165
  }
166
+
167
+ // 默认按钮
168
+ .__icon {
169
+ color: #9aa1a9;
170
+ cursor: pointer;
171
+ &:hover:not(.disabled) {
172
+ color: @primary-color;
173
+ }
174
+ &.disabled {
175
+ cursor: not-allowed;
176
+ }
177
+
178
+ &.delete {
179
+ &:hover:not(.disabled) {
180
+ color: @error-color;
181
+ }
182
+ }
183
+ }
@@ -12,6 +12,7 @@
12
12
  @box-shadow-small: 0px 1px 2px @shadow-color-light;
13
13
  @primary-color-hover: color(~`colorPalette('@{primary-color}', 0.1) `);
14
14
  @box-shadow-form: 0 0 0 4px @primary-color-hover;
15
+ @text-color-middle: #9aa1a9;
15
16
  @custom-background: #fafafb;
16
17
  @custom-focus: #f0f7ff;
17
18
  @primary-color: '#165dff';
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { AttrConditionTypes } from '../attrConditions/types';
3
- declare const _default: React.ForwardRefExoticComponent<AttrConditionTypes.GroupProp & React.RefAttributes<any>>;
4
- export default _default;
3
+ declare const BizAttrConditionGroup: React.ForwardRefExoticComponent<AttrConditionTypes.GroupProp & React.RefAttributes<any>>;
4
+ export default BizAttrConditionGroup;
@@ -2,8 +2,9 @@ import React from 'react';
2
2
  import useConditionGroup from './useConditionGroup';
3
3
  import { Skeleton, Space } from 'antd';
4
4
  import BizAttrCondition from '.';
5
- var BizAttrConditionGroup = function BizAttrConditionGroup(props, ref) {
6
- var eventIdList = props.eventIdList,
5
+ var BizAttrConditionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
6
+ var showHandle = props.showHandle,
7
+ eventIdList = props.eventIdList,
7
8
  enableDelete = props.enableDelete,
8
9
  enableEventProp = props.enableEventProp,
9
10
  enableUserProp = props.enableUserProp,
@@ -25,16 +26,16 @@ var BizAttrConditionGroup = function BizAttrConditionGroup(props, ref) {
25
26
  paragraph: {
26
27
  rows: 2
27
28
  }
28
- }, /*#__PURE__*/React.createElement("div", {
29
+ }, showHandle ? /*#__PURE__*/React.createElement("div", {
29
30
  className: "".concat(classPrefix, "-handle")
30
31
  }, conditions.length > 1 && /*#__PURE__*/React.createElement("div", {
31
32
  className: "".concat(classPrefix, "-operate"),
32
33
  onClick: onClickRelation
33
34
  }, /*#__PURE__*/React.createElement("div", {
34
35
  className: "".concat(classPrefix, "-operate-text ").concat(relation === 'and' || props.onlyAnd ? 'active' : '', " ").concat(props.onlyAnd ? 'only-and' : '')
35
- }, "\u4E14"), !props.onlyAnd && /*#__PURE__*/React.createElement("div", {
36
+ }, /*#__PURE__*/React.createElement("span", null, "\u4E14")), !props.onlyAnd && /*#__PURE__*/React.createElement("div", {
36
37
  className: "".concat(classPrefix, "-operate-text ").concat(relation === 'or' ? 'active' : '')
37
- }, "\u6216"))), /*#__PURE__*/React.createElement(Space, {
38
+ }, /*#__PURE__*/React.createElement("span", null, "\u6216")))) : null, /*#__PURE__*/React.createElement(Space, {
38
39
  className: "".concat(classPrefix, "-container"),
39
40
  direction: "vertical"
40
41
  }, conditions.map(function (item, index) {
@@ -55,5 +56,8 @@ var BizAttrConditionGroup = function BizAttrConditionGroup(props, ref) {
55
56
  }
56
57
  });
57
58
  }))));
59
+ });
60
+ BizAttrConditionGroup.defaultProps = {
61
+ showHandle: true
58
62
  };
59
- export default /*#__PURE__*/React.forwardRef(BizAttrConditionGroup);
63
+ export default BizAttrConditionGroup;
@@ -1,11 +1,19 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1
7
  import { Skeleton, Space } from 'antd';
2
- import React from 'react';
8
+ import React, { useContext, useEffect, useState } from 'react';
3
9
  import BizAttributeSelector from '../attributeSelector';
4
10
  import BizOperateList from '../attrConditions/components/operateList';
5
11
  import ValuesList from '../attrConditions/components/valuesList';
12
+ import { OperateTypes } from '../attrConditions/types';
6
13
  import useAttrCondition from './useAttrCondition';
7
14
  import './styles/index.less';
8
15
  import IconFont from '../icon/iconFont';
16
+ import { BizValidatorContext } from '../context';
9
17
  var classPrefix = 'biz-attr-condition';
10
18
  var BizAttrCondition = function BizAttrCondition(props) {
11
19
  var eventIdList = props.eventIdList,
@@ -24,9 +32,29 @@ var BizAttrCondition = function BizAttrCondition(props) {
24
32
  onChangeOperate = _useAttrCondition.onChangeOperate,
25
33
  onChangeValues = _useAttrCondition.onChangeValues,
26
34
  onDelete = _useAttrCondition.onDelete;
35
+ var _useContext = useContext(BizValidatorContext),
36
+ isValidate = _useContext.isValidate;
37
+ var _useState = useState(false),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ isAttrError = _useState2[0],
40
+ setIsAttrError = _useState2[1];
41
+ var _useState3 = useState(false),
42
+ _useState4 = _slicedToArray(_useState3, 2),
43
+ isValueError = _useState4[0],
44
+ setValueError = _useState4[1];
45
+ useEffect(function () {
46
+ setIsAttrError(function (error) {
47
+ return !!((isValidate || error) && !attr);
48
+ });
49
+ setValueError(function (error) {
50
+ return !!((isValidate || error) && attr && operate !== OperateTypes.IsNotNull && operate !== OperateTypes.IsNull && (!values || !values.length));
51
+ });
52
+ }, [isValidate, attr, operate, values]);
27
53
  return /*#__PURE__*/React.createElement(Space, {
28
54
  className: classPrefix
29
- }, !loading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BizAttributeSelector, {
55
+ }, !loading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
56
+ className: "".concat(classPrefix, "-column")
57
+ }, /*#__PURE__*/React.createElement(BizAttributeSelector, {
30
58
  value: attr,
31
59
  eventIdList: eventIdList,
32
60
  enableEventProp: enableEventProp,
@@ -36,19 +64,27 @@ var BizAttrCondition = function BizAttrCondition(props) {
36
64
  onChange: onChangeAttr,
37
65
  theme: theme,
38
66
  destroyPopupOnHide: props.destroyPopupOnHide,
39
- placeholder: "\u8BF7\u9009\u62E9\u5C5E\u6027"
40
- }), /*#__PURE__*/React.createElement(BizOperateList, {
67
+ placeholder: "\u8BF7\u9009\u62E9\u5C5E\u6027",
68
+ status: isAttrError ? 'error' : ''
69
+ }), isAttrError ? /*#__PURE__*/React.createElement("div", {
70
+ className: "".concat(classPrefix, "-error")
71
+ }, "\u5C5E\u6027\u4E0D\u53EF\u4E3A\u7A7A") : null), /*#__PURE__*/React.createElement(BizOperateList, {
41
72
  theme: theme,
42
73
  attr: attr,
43
74
  defaultValue: operate,
44
75
  onChange: onChangeOperate
45
- }), /*#__PURE__*/React.createElement(ValuesList, {
76
+ }), /*#__PURE__*/React.createElement("div", {
77
+ className: "".concat(classPrefix, "-column")
78
+ }, /*#__PURE__*/React.createElement(ValuesList, {
46
79
  attr: attr,
47
80
  operate: operate,
48
81
  defaultValue: values,
49
82
  onChange: onChangeValues,
50
- theme: theme
51
- }), enableDelete && /*#__PURE__*/React.createElement(IconFont, {
83
+ theme: theme,
84
+ status: isValueError ? 'error' : ''
85
+ }), isValueError ? /*#__PURE__*/React.createElement("div", {
86
+ className: "".concat(classPrefix, "-error")
87
+ }, "\u5C5E\u6027\u503C\u4E0D\u53EF\u4E3A\u7A7A") : null), enableDelete && /*#__PURE__*/React.createElement(IconFont, {
52
88
  type: "qingchu",
53
89
  className: "".concat(classPrefix, "-btn-del"),
54
90
  onClick: onDelete
@@ -1,10 +1,12 @@
1
1
  @import '../../assets/styles/inner.less';
2
2
  .biz-attr-condition {
3
3
  gap: 16px !important;
4
+ align-items: flex-start;
4
5
  width: 100%;
5
6
  &-btn-del {
6
7
  color: #9aa1a9;
7
8
  font-size: 16px !important;
9
+ line-height: 32px;
8
10
  &:hover {
9
11
  color: @error-color;
10
12
  cursor: pointer;
@@ -33,7 +35,7 @@
33
35
  &-handle {
34
36
  position: relative;
35
37
  width: 1px;
36
- margin-right: 16px;
38
+ margin-right: 20px;
37
39
  margin-left: 8px;
38
40
  background: @border-color-base;
39
41
  }
@@ -47,18 +49,25 @@
47
49
  &-operate-text {
48
50
  width: 16px;
49
51
  height: 16px;
50
- font-size: 12px;
51
52
  line-height: 16px;
52
53
  text-align: center;
54
+ span {
55
+ display: inline-block;
56
+ font-size: 12px;
57
+ *font-size: 10px;
58
+ transform: scale(0.83, 0.83);
59
+ }
53
60
 
54
61
  .__default-hover();
55
62
 
56
63
  &:first-child {
57
- border-radius: @border-radius-sx @border-radius-sx 0px 0px;
64
+ border-top-left-radius: 3px;
65
+ border-top-right-radius: 3px;
58
66
  }
59
67
 
60
68
  &:last-child {
61
- border-radius: 0px 0px @border-radius-sx @border-radius-sx;
69
+ border-bottom-right-radius: 3px;
70
+ border-bottom-left-radius: 3px;
62
71
  }
63
72
 
64
73
  &.active {
@@ -66,8 +75,15 @@
66
75
  background: @primary-color;
67
76
  }
68
77
  }
69
- &-operate-text.only-and {
70
- border-radius: 2px;
71
- }
78
+ }
79
+
80
+ &-column {
81
+ position: relative;
82
+ display: flex;
83
+ flex-direction: column;
84
+ }
85
+ &-error {
86
+ padding-left: 4px;
87
+ color: @error-color;
72
88
  }
73
89
  }
@@ -5,7 +5,9 @@ declare const useAttrCondition: (props: AttrConditionTypes.ItemProp) => {
5
5
  operate: import("../attrConditions/types").OperateTypes | undefined;
6
6
  values: string[] | undefined;
7
7
  loading: boolean;
8
- onDelete: () => void;
8
+ onDelete: (e: {
9
+ stopPropagation: () => void;
10
+ }) => void;
9
11
  onChangeAttr: (attrData: AttributeSelect.Value) => void;
10
12
  onChangeOperate: (data: any) => void;
11
13
  onChangeValues: (data: any) => void;
@@ -59,7 +59,8 @@ var useAttrCondition = function useAttrCondition(props) {
59
59
  }
60
60
  setLoading(false);
61
61
  }, []);
62
- var onDelete = function onDelete() {
62
+ var onDelete = function onDelete(e) {
63
+ e.stopPropagation();
63
64
  if (props.onDelete) props.onDelete();
64
65
  };
65
66
  useEffect(function () {
@@ -38,7 +38,7 @@ var useConditionGroup = function useConditionGroup(props, ref) {
38
38
  }, []);
39
39
  useImperativeHandle(ref, function () {
40
40
  return {
41
- add: function add() {
41
+ add: function add(changeCallBack) {
42
42
  onConditionsCount && onConditionsCount(conditions.length + 1);
43
43
  setConditions(function (conditions) {
44
44
  conditions.push({
@@ -46,6 +46,13 @@ var useConditionGroup = function useConditionGroup(props, ref) {
46
46
  });
47
47
  return _toConsumableArray(conditions);
48
48
  });
49
+ if (props.onChange && changeCallBack) {
50
+ var group = removeKeyToGroup(conditions, true);
51
+ props.onChange({
52
+ relation: relation,
53
+ conditions: group
54
+ });
55
+ }
49
56
  },
50
57
  setValue: function setValue(data) {
51
58
  if (data) {
@@ -70,10 +77,14 @@ var useConditionGroup = function useConditionGroup(props, ref) {
70
77
  };
71
78
  });
72
79
  };
73
- var removeKeyToGroup = function removeKeyToGroup(data) {
80
+ var removeKeyToGroup = function removeKeyToGroup(data, addEmpty) {
74
81
  var group = [];
75
82
  data.forEach(function (item) {
76
- if (item.data) group.push(item.data);
83
+ if (item.data) {
84
+ group.push(item.data);
85
+ } else if (addEmpty) {
86
+ group.push({});
87
+ }
77
88
  });
78
89
  return group;
79
90
  };
@@ -6,5 +6,6 @@ declare const StringList: React.FC<{
6
6
  value?: string[];
7
7
  onChange?: (value: string[]) => void;
8
8
  theme: string;
9
+ status?: string;
9
10
  }>;
10
11
  export default StringList;
@@ -157,6 +157,7 @@ var StringList = function StringList(props) {
157
157
  disable: props.operate === OperateTypes.IsNull || props.operate === OperateTypes.IsNotNull,
158
158
  labelField: "name",
159
159
  keyField: "value",
160
+ status: props.status,
160
161
  options: options,
161
162
  onChange: onChange,
162
163
  onSearch: setSearchValue,
@@ -6,5 +6,6 @@ declare const ValuesList: React.FC<{
6
6
  defaultValue?: string[];
7
7
  onChange?: (value: string[]) => void;
8
8
  theme: string;
9
+ status?: string;
9
10
  }>;
10
11
  export default ValuesList;
@@ -20,7 +20,8 @@ var ValuesList = function ValuesList(props) {
20
20
  var attr = props.attr,
21
21
  defaultValue = props.defaultValue,
22
22
  operate = props.operate,
23
- theme = props.theme;
23
+ theme = props.theme,
24
+ status = props.status;
24
25
  var initValue = [moment().subtract(1, 'weeks').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')];
25
26
  var _useState = useState(),
26
27
  _useState2 = _slicedToArray(_useState, 2),
@@ -113,6 +114,7 @@ var ValuesList = function ValuesList(props) {
113
114
  attr: attr,
114
115
  operate: operate,
115
116
  value: current,
117
+ status: status,
116
118
  onChange: onChange
117
119
  });
118
120
  } else if (attr.type === PropType.NUMBER) {
@@ -138,6 +140,7 @@ var ValuesList = function ValuesList(props) {
138
140
  placeholder: "\u8BF7\u8F93\u5165\u5C5E\u6027\u503C",
139
141
  type: "number",
140
142
  size: "middle",
143
+ status: status,
141
144
  onChange: onChangeNumber,
142
145
  suffix: attr.propCategory === 'userProp' && attr.subtype === 1 ? '%' : null
143
146
  }), attr.propCategory === 'userProp' && attr.subtype === 2 && numberAfter);
@@ -148,6 +151,7 @@ var ValuesList = function ValuesList(props) {
148
151
  allowClear: false,
149
152
  className: "".concat(classPrefix, "-date"),
150
153
  inputReadOnly: true,
154
+ status: status,
151
155
  locale: locale,
152
156
  disabledDate: disabledDate,
153
157
  placement: 'bottomRight',
@@ -165,6 +169,7 @@ var ValuesList = function ValuesList(props) {
165
169
  placeholder: "\u8BF7\u8F93\u5165\u5C5E\u6027\u503C",
166
170
  type: "number",
167
171
  suffix: "\u5929",
172
+ status: status,
168
173
  onChange: onChangeDate
169
174
  });
170
175
  }
@@ -46,7 +46,7 @@ var BizConditionItem = function BizConditionItem(props) {
46
46
  onChangeAttr = _useAttrCondition.onChangeAttr,
47
47
  onChangeOperate = _useAttrCondition.onChangeOperate,
48
48
  onChangeValues = _useAttrCondition.onChangeValues,
49
- onDelete = _useAttrCondition.onDelete;
49
+ _onDelete = _useAttrCondition.onDelete;
50
50
  return /*#__PURE__*/React.createElement("div", {
51
51
  className: [classPrefix, border ? 'border' : ''].join(' ')
52
52
  }, /*#__PURE__*/React.createElement(Skeleton, {
@@ -64,7 +64,9 @@ var BizConditionItem = function BizConditionItem(props) {
64
64
  enableEnvProp: enableEnvProp,
65
65
  disableItemList: disableItemList,
66
66
  onChange: onChangeAttr,
67
- onDelete: onDelete,
67
+ onDelete: function onDelete(_data, e) {
68
+ return _onDelete(e);
69
+ },
68
70
  theme: theme,
69
71
  destroyPopupOnHide: props.destroyPopupOnHide
70
72
  }), /*#__PURE__*/React.createElement("div", {
@@ -37,6 +37,7 @@ export declare namespace AttrConditionTypes {
37
37
  defaultValue?: GroupValue;
38
38
  value?: GroupValue;
39
39
  onlyAnd?: boolean;
40
+ showHandle?: boolean;
40
41
  onChange?: (value: GroupValue) => void;
41
42
  onConditionsCount?: (value: number) => void;
42
43
  }
@@ -20,6 +20,11 @@ export default (function () {
20
20
  }
21
21
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u9009\u62E9\u7684\u5C5E\u6027\u662F\uFF1A", JSON.stringify(attribute)), /*#__PURE__*/React.createElement(DemoWrapper, {
22
22
  needMeta: true
23
+ }, /*#__PURE__*/React.createElement("div", {
24
+ style: {
25
+ background: '#fff',
26
+ padding: 20
27
+ }
23
28
  }, /*#__PURE__*/React.createElement(BizAttributeSelector, {
24
29
  enableEventProp: true,
25
30
  enableUserProp: true,
@@ -38,5 +43,5 @@ export default (function () {
38
43
  propCategory: 'envProp'
39
44
  }],
40
45
  enableEnvProp: true
41
- })));
46
+ }))));
42
47
  });
@@ -71,8 +71,8 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
71
71
  }
72
72
  return res;
73
73
  }
74
- function onDelete() {
75
- if (props.onDelete) props.onDelete(currentAttr);
74
+ function onDelete(e) {
75
+ if (props.onDelete) props.onDelete(currentAttr, e);
76
76
  }
77
77
  function onChange(val) {
78
78
  setVisible(false);
@@ -83,9 +83,7 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
83
83
  setVisible(flag);
84
84
  };
85
85
  return /*#__PURE__*/React.createElement("div", {
86
- className: "".concat(classPrefix)
87
- }, /*#__PURE__*/React.createElement("div", {
88
- className: "".concat(classPrefix, "-handle ").concat(visible ? 'focus' : '')
86
+ className: classPrefix
89
87
  }, /*#__PURE__*/React.createElement(Dropdown, {
90
88
  dropdownRender: function dropdownRender() {
91
89
  return /*#__PURE__*/React.createElement(AttrListPanel, _objectSpread(_objectSpread({
@@ -104,30 +102,27 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
104
102
  onOpenChange: onVisibleChange,
105
103
  destroyPopupOnHide: props.destroyPopupOnHide
106
104
  }, /*#__PURE__*/React.createElement("div", {
107
- style: {
108
- width: '100%'
109
- }
105
+ className: "".concat(classPrefix, "-handle")
110
106
  }, /*#__PURE__*/React.createElement(SelectHandle, {
111
107
  ref: boxRef,
112
108
  theme: theme,
113
- border: false,
114
109
  size: props.size,
115
110
  label: (currentAttr === null || currentAttr === void 0 ? void 0 : currentAttr.alias) || (currentAttr === null || currentAttr === void 0 ? void 0 : currentAttr.label),
116
- placeholder: placeholder
111
+ placeholder: placeholder,
112
+ status: props.status
117
113
  }))), enableDelete && /*#__PURE__*/React.createElement(Tooltip, {
118
114
  title: function title() {
119
115
  return '删除';
120
116
  }
121
117
  }, /*#__PURE__*/React.createElement(IconFont, {
122
- className: "".concat(classPrefix, "-del-icon"),
118
+ className: "".concat(classPrefix, "-del-icon delete"),
123
119
  type: 'qingchu',
124
120
  onClick: onDelete
125
- }))));
121
+ })));
126
122
  };
127
123
  BizAttributeSelector.defaultProps = {
128
124
  enableDelete: false,
129
125
  placeholder: '请选择',
130
- theme: 'secondary',
131
126
  size: 'middle',
132
127
  propSymbol: '*',
133
128
  optionsHeaderTip: '带*的属性每日凌晨更新',
@@ -1,29 +1,18 @@
1
1
  @import '../../assets/styles/inner.less';
2
2
 
3
3
  .biz-attr-select {
4
- border-radius: 4px;
5
- &-handle {
6
- display: flex;
7
- flex-direction: row;
8
- .__select-handle();
4
+ display: flex;
5
+ align-items: center;
9
6
 
10
- &:hover .biz-attr-select-del-icon {
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- }
7
+ &-handle {
8
+ min-width: 208px;
9
+ max-width: calc(100% - 56px);
15
10
  }
16
11
 
17
12
  &-del-icon {
18
- display: none;
19
- flex: none;
20
- width: @icon-width;
21
- color: @text-color-secondary;
22
- border-radius: @border-radius-small;
23
-
24
- &:hover {
25
- .__error-hover();
26
- }
13
+ .__icon();
14
+ margin-left: 16px;
15
+ font-size: 16px !important;
27
16
  }
28
17
 
29
18
  &-drowdown {
@@ -82,10 +82,11 @@ export declare namespace AttributeSelect {
82
82
  propSymbol?: ReactNode;
83
83
  optionsHeaderTip?: string;
84
84
  onChange?: (value: Value) => void;
85
- onDelete?: (value?: Value) => void;
85
+ onDelete?: (value?: Value, e?: any) => void;
86
86
  theme?: string;
87
87
  destroyPopupOnHide?: boolean;
88
88
  size?: SizeType;
89
+ status?: string;
89
90
  }
90
91
  interface Option {
91
92
  groupName: string;
@@ -48,3 +48,7 @@ export interface GlobalContextProps {
48
48
  }
49
49
  declare const BizGlobalDataContext: import("react").Context<GlobalContextProps>;
50
50
  export default BizGlobalDataContext;
51
+ export declare const BizValidatorContext: import("react").Context<{
52
+ isValidate?: boolean | undefined;
53
+ setValidate?: ((isValidate?: boolean) => void) | undefined;
54
+ }>;
@@ -1,3 +1,4 @@
1
1
  import { createContext } from 'react';
2
2
  var BizGlobalDataContext = /*#__PURE__*/createContext({});
3
- export default BizGlobalDataContext;
3
+ export default BizGlobalDataContext;
4
+ export var BizValidatorContext = /*#__PURE__*/createContext({});
@@ -140,7 +140,6 @@ BizEventSelector.defaultProps = {
140
140
  defaultSelectAble: true,
141
141
  popupContainer: true,
142
142
  border: true,
143
- theme: 'secondary',
144
143
  size: 'middle',
145
144
  destroyPopupOnHide: false
146
145
  };
@@ -1,4 +1,14 @@
1
1
  import React from 'react';
2
+ import { AnalysisEvent } from '../attributeSelector/types';
2
3
  import { EventSelectTypes } from './types';
3
4
  declare const EventListPanel: React.FC<EventSelectTypes.DropdownProps>;
5
+ export declare const InfiniteScrollList: React.FC<{
6
+ scrollableTarget: string;
7
+ searchEventList: AnalysisEvent[];
8
+ searchValue: string;
9
+ groupId?: string | number;
10
+ currentId?: string | number;
11
+ selectList?: number[];
12
+ onClick: (data: AnalysisEvent) => void;
13
+ }>;
4
14
  export default EventListPanel;
@@ -19,6 +19,7 @@ import { BuiltinIndicators } from '../constants/common';
19
19
  import BizSearchInput from '../searchInput';
20
20
  import EventListOption from './option';
21
21
  var EventListPanel = function EventListPanel(props) {
22
+ var _currentValue$event2;
22
23
  var showOverview = props.showOverview,
23
24
  defaultSelectAble = props.defaultSelectAble;
24
25
  var _useState = useState(''),
@@ -169,18 +170,18 @@ var EventListPanel = function EventListPanel(props) {
169
170
  scrollableTarget: scrollableId,
170
171
  searchEventList: searchEventList,
171
172
  searchValue: searchValue,
172
- currentGroup: currentGroup,
173
- currentValue: currentValue,
173
+ groupId: currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id,
174
+ currentId: currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$event2 = currentValue.event) === null || _currentValue$event2 === void 0 ? void 0 : _currentValue$event2.id,
174
175
  selectList: props.selectList,
175
176
  onClick: onClickEvent
176
177
  }))));
177
178
  };
178
- var InfiniteScrollList = function InfiniteScrollList(_ref) {
179
+ export var InfiniteScrollList = function InfiniteScrollList(_ref) {
179
180
  var scrollableTarget = _ref.scrollableTarget,
180
181
  searchEventList = _ref.searchEventList,
181
182
  searchValue = _ref.searchValue,
182
- currentGroup = _ref.currentGroup,
183
- currentValue = _ref.currentValue,
183
+ groupId = _ref.groupId,
184
+ currentId = _ref.currentId,
184
185
  onClick = _ref.onClick,
185
186
  selectList = _ref.selectList;
186
187
  var _useState11 = useState([]),
@@ -225,15 +226,14 @@ var InfiniteScrollList = function InfiniteScrollList(_ref) {
225
226
  className: "".concat(classPrefix, "-event-item-wrap"),
226
227
  key: Math.random()
227
228
  }, showList.map(function (e) {
228
- var _currentValue$event2, _currentValue$event3;
229
229
  var _disable = false;
230
- if (selectList && (selectList === null || selectList === void 0 ? void 0 : selectList.indexOf(e.id)) !== -1 && (currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$event2 = currentValue.event) === null || _currentValue$event2 === void 0 ? void 0 : _currentValue$event2.id) !== e.id) {
230
+ if (selectList && (selectList === null || selectList === void 0 ? void 0 : selectList.indexOf(e.id)) !== -1 && currentId !== e.id) {
231
231
  _disable = true;
232
232
  }
233
233
  return /*#__PURE__*/React.createElement(EventListOption, {
234
234
  label: e.alias || e.name,
235
- key: "".concat(currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id, "-").concat(e.id),
236
- checked: (currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$event3 = currentValue.event) === null || _currentValue$event3 === void 0 ? void 0 : _currentValue$event3.id) === e.id,
235
+ key: "".concat(groupId, "-").concat(e.id),
236
+ checked: currentId === e.id,
237
237
  disable: _disable,
238
238
  highlight: {
239
239
  enable: true,
@@ -12,8 +12,9 @@ var EventListOption = function EventListOption(props) {
12
12
  onClick = props.onClick,
13
13
  data = props.data,
14
14
  disable = props.disable;
15
- var _onClick = function _onClick() {
15
+ var _onClick = function _onClick(e) {
16
16
  if (disable) return;
17
+ e.stopPropagation();
17
18
  if (onClick) onClick(data);
18
19
  };
19
20
  function getLabel(label) {
@@ -31,7 +32,9 @@ var EventListOption = function EventListOption(props) {
31
32
  }
32
33
  return /*#__PURE__*/React.createElement("div", {
33
34
  className: "".concat(classPrefix, "-option ").concat(checked ? 'active' : '', " ").concat(disable ? 'disable' : ''),
34
- onClick: _onClick
35
+ onClick: function onClick(e) {
36
+ return _onClick(e);
37
+ }
35
38
  }, /*#__PURE__*/React.createElement("div", {
36
39
  className: "".concat(classPrefix, "-option-label"),
37
40
  title: label
@@ -0,0 +1,16 @@
1
+ export declare const formulaList: string[];
2
+ export declare const formulaList2: {
3
+ name: string;
4
+ value: string;
5
+ }[];
6
+ export declare const formulaObj: {
7
+ [key: string]: string;
8
+ };
9
+ export declare const formulaDimensions: {
10
+ type: string;
11
+ label: string;
12
+ }[];
13
+ export declare const resultFormatList: {
14
+ label: string;
15
+ value: string;
16
+ }[];