@zgfe/business-lib 1.1.67-beta.4 → 1.1.67-beta.5

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.
@@ -534,7 +534,8 @@
534
534
  }
535
535
 
536
536
  //dropdown
537
- .ant-dropdown {
537
+ .ant-dropdown,
538
+ .ant-dropdown-menu-submenu-popup {
538
539
  z-index: 6666 !important;
539
540
  }
540
541
  //message
@@ -28,7 +28,8 @@ var BizEventSelector = function BizEventSelector(props) {
28
28
  visible = _useState4[0],
29
29
  setVisible = _useState4[1];
30
30
  var _useContext = useContext(BizGlobalDataContext),
31
- eventGroupList = _useContext.eventGroupList;
31
+ _useContext$eventGrou = _useContext.eventGroupList,
32
+ eventGroupList = _useContext$eventGrou === void 0 ? [] : _useContext$eventGrou;
32
33
  var selectId = (Math.random() + 10).toString();
33
34
  useEffect(function () {
34
35
  if (!props.defaultValue) return;
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  import _ from 'lodash';
8
- import { normalOptions } from '../../../targetConditionGroup/data/operates';
8
+ import { attrOptions, normalOptions } from '../../../targetConditionGroup/data/operates';
9
9
  import { util } from '../../../utils';
10
10
  import { formulaDimensions, formulaList } from './data';
11
11
  export var newItem = {
@@ -168,7 +168,7 @@ export var validator = function validator(type, condition) {
168
168
  };
169
169
  export var getDimension = function getDimension(data, eId, eventGroupList) {
170
170
  var name = '';
171
- normalOptions.forEach(function (item) {
171
+ normalOptions.concat(attrOptions).forEach(function (item) {
172
172
  if (item.value === data.analysisIndex) {
173
173
  name = item.label;
174
174
  }
@@ -178,8 +178,8 @@ export var getDimension = function getDimension(data, eId, eventGroupList) {
178
178
  group.eventList.forEach(function (event) {
179
179
  if (event.id === eId) {
180
180
  event.attrList.forEach(function (attr) {
181
- if (String(attr.id) === data.analysisAttr) {
182
- name += attr.alias || attr.label;
181
+ if (attr.label === data.analysisAttr) {
182
+ name = attr.label + name;
183
183
  }
184
184
  });
185
185
  return;
@@ -106,7 +106,7 @@ var BizFormulaTarget = function BizFormulaTarget(props) {
106
106
  var onCancel = function onCancel(e) {
107
107
  e.stopPropagation();
108
108
  if (!props.value || !props.value.customCondition || !props.value.customCondition.length) {
109
- if (!props.enableDelete) return;
109
+ if (!props.enableDelete && !contentChange) return;
110
110
  props.onDelete && props.onDelete();
111
111
  } else {
112
112
  setCondition(props.value || defaultValue);
@@ -127,6 +127,12 @@ var BizFormulaTarget = function BizFormulaTarget(props) {
127
127
  var onClose = function onClose() {
128
128
  setOpen(false);
129
129
  };
130
+ var handleOpenChange = function handleOpenChange(newOpen) {
131
+ if (!newOpen) {
132
+ setOpen(newOpen);
133
+ return;
134
+ }
135
+ };
130
136
  return /*#__PURE__*/React.createElement("div", {
131
137
  className: classPrefix
132
138
  }, /*#__PURE__*/React.createElement("div", {
@@ -159,8 +165,11 @@ var BizFormulaTarget = function BizFormulaTarget(props) {
159
165
  }), contentChange ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popconfirm, {
160
166
  title: errorMsg,
161
167
  open: open,
168
+ okText: "\u786E\u5B9A",
169
+ cancelText: "\u53D6\u6D88",
162
170
  onCancel: onClose,
163
- onConfirm: onClose
171
+ onConfirm: onClose,
172
+ onOpenChange: handleOpenChange
164
173
  }, /*#__PURE__*/React.createElement("div", {
165
174
  className: "primary",
166
175
  onClick: onSave
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.67-beta.4",
3
+ "version": "1.1.67-beta.5",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.12.0 || ^17.0.0",
61
61
  "yorkie": "^2.0.0"
62
62
  },
63
- "gitHead": "69f43c91e600c8c965e1f83da23b9e3d96e4b490"
63
+ "gitHead": "0018cf63a30f25d3dfdfebff55931beeb23d77ef"
64
64
  }