@zgfe/business-lib 1.2.54-plat.0 → 1.2.54

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.
@@ -27,7 +27,7 @@ import _ from 'lodash';
27
27
  import WholeChart from './components/wholeChart';
28
28
  export var classPrefix = 'biz-addtopanel';
29
29
  var BizAddToPanel = function BizAddToPanel(props) {
30
- var _props$params2, _props$defaultValue2, _props$defaultValue3;
30
+ var _props$params2, _props$params3, _props$params4;
31
31
  var refForm = useRef();
32
32
  var _useState = useState(false),
33
33
  _useState2 = _slicedToArray(_useState, 2),
@@ -175,8 +175,8 @@ var BizAddToPanel = function BizAddToPanel(props) {
175
175
  setLoading(false);
176
176
  });
177
177
  }
178
- var showBox = function showBox(type, module) {
179
- if (module && ['duration_avg', 'active', 'add', 'duration'].includes(module)) {
178
+ var showBox = function showBox(type, overall) {
179
+ if (overall) {
180
180
  var _props$styleOptions, _props$styleOptions$f, _props$params;
181
181
  var options = (_props$styleOptions = props.styleOptions) === null || _props$styleOptions === void 0 ? void 0 : (_props$styleOptions$f = _props$styleOptions.find(function (item) {
182
182
  return RegExp(item.value, 'g').test(type);
@@ -248,8 +248,8 @@ var BizAddToPanel = function BizAddToPanel(props) {
248
248
  onFinish: onSubmit,
249
249
  initialValues: Object.assign(((_props$params2 = props.params) === null || _props$params2 === void 0 ? void 0 : _props$params2.overall) ? {
250
250
  showList: 'dynamic',
251
- chartType: ((_props$defaultValue2 = props.defaultValue) === null || _props$defaultValue2 === void 0 ? void 0 : _props$defaultValue2.chartType.indexOf('number')) != -1 ? 'number' : (_props$defaultValue3 = props.defaultValue) === null || _props$defaultValue3 === void 0 ? void 0 : _props$defaultValue3.chartType
252
- } : {}, props.defaultValue),
251
+ chartType: ((_props$params3 = props.params) === null || _props$params3 === void 0 ? void 0 : _props$params3.chartType.indexOf('number')) != -1 ? 'number' : (_props$params4 = props.params) === null || _props$params4 === void 0 ? void 0 : _props$params4.chartType
252
+ } : {}, (props === null || props === void 0 ? void 0 : props.defaultValue) || {}),
253
253
  requiredMark: false
254
254
  }, /*#__PURE__*/React.createElement(Form.Item, {
255
255
  label: "\u770B\u677F",
@@ -317,10 +317,10 @@ var BizAddToPanel = function BizAddToPanel(props) {
317
317
  noStyle: true,
318
318
  shouldUpdate: true
319
319
  }, function (_ref) {
320
- var _props$params3;
320
+ var _props$params5;
321
321
  var getFieldValue = _ref.getFieldValue;
322
322
  var type = getFieldValue('chartType');
323
- return showBox(type, (_props$params3 = props.params) === null || _props$params3 === void 0 ? void 0 : _props$params3.module);
323
+ return showBox(type, (_props$params5 = props.params) === null || _props$params5 === void 0 ? void 0 : _props$params5.overall);
324
324
  })));
325
325
  };
326
326
  BizAddToPanel.defaultProps = {
@@ -36,8 +36,7 @@ var CascaderOverlay = function CascaderOverlay(props) {
36
36
  labelFields = props.labelFields,
37
37
  keyFields = props.keyFields,
38
38
  valueFields = props.valueFields,
39
- childFields = props.childFields,
40
- isOpenLayer = props.isOpenLayer;
39
+ childFields = props.childFields;
41
40
  var timer = useRef(null);
42
41
  var _useState = useState(''),
43
42
  _useState2 = _slicedToArray(_useState, 2),
@@ -163,8 +162,7 @@ var CascaderOverlay = function CascaderOverlay(props) {
163
162
  labelGroup: currentSelect,
164
163
  pageNo: pageNo,
165
164
  pageSize: 20,
166
- labelName: highlightText,
167
- isOpenLayer: isOpenLayer || true
165
+ labelName: highlightText
168
166
  }
169
167
  }).then(function (res) {
170
168
  if ((res === null || res === void 0 ? void 0 : res.data) && res.data.results) {
@@ -174,11 +172,6 @@ var CascaderOverlay = function CascaderOverlay(props) {
174
172
  if (item.labelGroup === currentSelect) {
175
173
  item.children = pageNo === 1 ? _toConsumableArray(result) : item.children.concat(result);
176
174
  }
177
- if (!isOpenLayer) {
178
- item.children.forEach(function (element) {
179
- element.layers = [];
180
- });
181
- }
182
175
  return _objectSpread({}, item);
183
176
  });
184
177
  });
@@ -216,7 +209,7 @@ var CascaderOverlay = function CascaderOverlay(props) {
216
209
  }
217
210
  function onClickTag(data) {
218
211
  setCurrentTag(data);
219
- if ((data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.firstAndLastUpdate || (data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.fundingSource || (data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.eventPreference || (data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.sqlCreateTable || !isOpenLayer) {
212
+ if ((data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.firstAndLastUpdate || (data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.fundingSource || (data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.eventPreference || (data === null || data === void 0 ? void 0 : data.labelCreateType) === LabelCreateType.sqlCreateTable) {
220
213
  var newValue = [{
221
214
  id: groupMap[currentSelect].id,
222
215
  labelGroup: currentSelect
@@ -237,11 +230,7 @@ var CascaderOverlay = function CascaderOverlay(props) {
237
230
  });
238
231
  if (_index === -1) {
239
232
  if (currentValue.length >= 20) return;
240
- if (isOpenLayer) {
241
- props.onChange([].concat(_toConsumableArray(currentValue), [newValue]));
242
- } else {
243
- props.onChange([newValue]);
244
- }
233
+ props.onChange([].concat(_toConsumableArray(currentValue), [newValue]));
245
234
  } else {
246
235
  currentValue.splice(_index, 1);
247
236
  props.onChange(_toConsumableArray(currentValue));
@@ -280,7 +269,7 @@ var CascaderOverlay = function CascaderOverlay(props) {
280
269
  getTagsByGroup(Math.floor(groupMap[currentSelect].children.length / 20) + 1);
281
270
  },
282
271
  onClick: onClickTag
283
- }) : /*#__PURE__*/React.createElement("span", null, "\u6682\u65E0\u6570\u636E")), isOpenLayer && currentTag && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.firstAndLastUpdate && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.fundingSource && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.eventPreference && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.sqlCreateTable && /*#__PURE__*/React.createElement("div", {
272
+ }) : /*#__PURE__*/React.createElement("span", null, "\u6682\u65E0\u6570\u636E")), currentTag && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.firstAndLastUpdate && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.fundingSource && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.eventPreference && (currentTag === null || currentTag === void 0 ? void 0 : currentTag.labelCreateType) !== LabelCreateType.sqlCreateTable && /*#__PURE__*/React.createElement("div", {
284
273
  className: "".concat(classPrefix, "-overlay-selections")
285
274
  }, /*#__PURE__*/React.createElement(MultipleCheckPanel, {
286
275
  valueField: valueFields[2],
@@ -310,7 +299,6 @@ CascaderOverlay.defaultProps = {
310
299
  childFields: ['children', 'layers'],
311
300
  keyFields: ['labelGroup', 'id', 'layerLabelId'],
312
301
  labelFields: ['labelGroup', 'labelName', 'layerLabelName'],
313
- valueFields: ['labelGroup', 'id', 'layerLabelId'],
314
- isOpenLayer: true
302
+ valueFields: ['labelGroup', 'id', 'layerLabelId']
315
303
  };
316
304
  export default CascaderOverlay;
@@ -26,8 +26,7 @@ var UserTagsSelect = function UserTagsSelect(props) {
26
26
  labelFields = props.labelFields,
27
27
  childFields = props.childFields,
28
28
  keyFields = props.keyFields,
29
- valueFields = props.valueFields,
30
- isOpenLayer = props.isOpenLayer;
29
+ valueFields = props.valueFields;
31
30
  var _useState = useState([]),
32
31
  _useState2 = _slicedToArray(_useState, 2),
33
32
  currentValue = _useState2[0],
@@ -43,7 +42,7 @@ var UserTagsSelect = function UserTagsSelect(props) {
43
42
  var pre_text = pre[labelFields[labelFields.length - 2]];
44
43
  var last_text = last[labelFields[labelFields.length - 1]];
45
44
  var res = _objectSpread(_objectSpread({}, last), {}, {
46
- handleText: (pre === null || pre === void 0 ? void 0 : pre.labelCreateType) === 3 || (pre === null || pre === void 0 ? void 0 : pre.labelCreateType) === 6 || (pre === null || pre === void 0 ? void 0 : pre.labelCreateType) === LabelCreateType.sqlCreateTable || !isOpenLayer ? pre_text : "".concat(pre_text, "\uFF1A").concat(last_text)
45
+ handleText: (pre === null || pre === void 0 ? void 0 : pre.labelCreateType) === 3 || (pre === null || pre === void 0 ? void 0 : pre.labelCreateType) === 6 || (pre === null || pre === void 0 ? void 0 : pre.labelCreateType) === LabelCreateType.sqlCreateTable ? pre_text : "".concat(pre_text, "\uFF1A").concat(last_text)
47
46
  });
48
47
  return res;
49
48
  });
@@ -76,7 +75,6 @@ var UserTagsSelect = function UserTagsSelect(props) {
76
75
  keyFields: keyFields,
77
76
  labelFields: labelFields,
78
77
  data: data,
79
- isOpenLayer: isOpenLayer,
80
78
  onChange: onChange
81
79
  });
82
80
  }
@@ -107,7 +105,6 @@ var UserTagsSelect = function UserTagsSelect(props) {
107
105
  }))));
108
106
  };
109
107
  UserTagsSelect.defaultProps = {
110
- destroyPopupOnHide: false,
111
- isOpenLayer: true
108
+ destroyPopupOnHide: false
112
109
  };
113
110
  export default UserTagsSelect;
@@ -30,7 +30,6 @@ export declare namespace UserTagsSelectorTypes {
30
30
  defaultCurrent?: string[];
31
31
  onChange: Function;
32
32
  destroyPopupOnHide?: boolean;
33
- isOpenLayer?: boolean;
34
33
  }
35
34
  interface CascaderOverlayProps {
36
35
  className?: string;
@@ -41,7 +40,6 @@ export declare namespace UserTagsSelectorTypes {
41
40
  valueFields?: string[];
42
41
  currentValue: Value;
43
42
  onChange: (val: Value) => void;
44
- isOpenLayer?: boolean;
45
43
  }
46
44
  interface Groups {
47
45
  data: any[];
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
1
  {
2
- "name": "@zgfe/business-lib",
3
- "version": "1.2.54-plat.0",
4
- "module": "es/index.js",
5
- "typings": "es/index.d.ts",
6
- "files": [
7
- "es",
8
- "config.js"
2
+ "name": "@zgfe/business-lib",
3
+ "version": "1.2.54",
4
+ "module": "es/index.js",
5
+ "typings": "es/index.d.ts",
6
+ "files": [
7
+ "es",
8
+ "config.js"
9
+ ],
10
+ "scripts": {
11
+ "build": "father-build",
12
+ "deploy": "npm run docs:build && npm run docs:deploy",
13
+ "docs:build": "dumi build",
14
+ "docs:deploy": "gh-pages -d docs-dist",
15
+ "prepublishOnly": "npm run build",
16
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
17
+ "pub": "lerna publish",
18
+ "start": "dumi dev",
19
+ "test": "umi-test",
20
+ "test:coverage": "umi-test --coverage"
21
+ },
22
+ "lint-staged": {
23
+ "*.{js,jsx,less,md,json}": [
24
+ "prettier --write"
9
25
  ],
10
- "scripts": {
11
- "start": "dumi dev",
12
- "docs:build": "dumi build",
13
- "docs:deploy": "gh-pages -d docs-dist",
14
- "build": "father-build",
15
- "deploy": "npm run docs:build && npm run docs:deploy",
16
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
17
- "test": "umi-test",
18
- "test:coverage": "umi-test --coverage",
19
- "prepublishOnly": "npm run build",
20
- "pub": "lerna publish"
21
- },
22
- "lint-staged": {
23
- "*.{js,jsx,less,md,json}": [
24
- "prettier --write"
25
- ],
26
- "*.ts?(x)": [
27
- "prettier --parser=typescript --write"
28
- ]
29
- },
30
- "dependencies": {
31
- "@types/qs": "^6.9.7",
32
- "axios": "^0.26.1",
33
- "babel-plugin-import": "^1.13.3",
34
- "echarts": "^5.3.2",
35
- "echarts-for-react": "^3.0.2",
36
- "lerna": "^4.0.0",
37
- "rc-virtual-list": "^3.4.8",
38
- "react-infinite-scroll-component": "^6.1.0",
39
- "umi-request": "^1.4.0"
40
- },
41
- "devDependencies": {
42
- "@testing-library/jest-dom": "^5.15.1",
43
- "@testing-library/react": "^12.1.2",
44
- "@types/jest": "^27.0.3",
45
- "@types/lodash": "^4.14.182",
46
- "@umijs/fabric": "^2.8.1",
47
- "@umijs/test": "^3.0.5",
48
- "antd": "4.24.16",
49
- "dumi": "^1.1.0",
50
- "father-build": "^1.17.2",
51
- "gh-pages": "^3.0.0",
52
- "lint-staged": "^10.0.7",
53
- "lodash": "^4.17.21",
54
- "prettier": "^2.2.1",
55
- "react": "^16.12.0 || ^17.0.0",
56
- "yorkie": "^2.0.0"
57
- },
58
- "gitHead": "61f2895d3451a2a2d81b55dffcdb66629d55c482",
59
- "gitHooks": {
60
- "pre-commit": "lint-staged"
61
- }
26
+ "*.ts?(x)": [
27
+ "prettier --parser=typescript --write"
28
+ ]
29
+ },
30
+ "dependencies": {
31
+ "@types/qs": "^6.9.7",
32
+ "axios": "^0.26.1",
33
+ "babel-plugin-import": "^1.13.3",
34
+ "echarts": "^5.3.2",
35
+ "echarts-for-react": "^3.0.2",
36
+ "lerna": "^4.0.0",
37
+ "rc-virtual-list": "^3.4.8",
38
+ "react-infinite-scroll-component": "^6.1.0",
39
+ "umi-request": "^1.4.0"
40
+ },
41
+ "devDependencies": {
42
+ "@testing-library/jest-dom": "^5.15.1",
43
+ "@testing-library/react": "^12.1.2",
44
+ "@types/jest": "^27.0.3",
45
+ "@types/lodash": "^4.14.182",
46
+ "@umijs/fabric": "^2.8.1",
47
+ "@umijs/test": "^3.0.5",
48
+ "antd": "4.24.16",
49
+ "dumi": "^1.1.0",
50
+ "father-build": "^1.17.2",
51
+ "gh-pages": "^3.0.0",
52
+ "lint-staged": "^10.0.7",
53
+ "lodash": "^4.17.21",
54
+ "prettier": "^2.2.1",
55
+ "react": "^16.12.0 || ^17.0.0",
56
+ "yorkie": "^2.0.0"
57
+ },
58
+ "gitHead": "6e72de47ad2eda5460c6e83d3c5eb66f28870500",
59
+ "gitHooks": {
60
+ "pre-commit": "lint-staged"
61
+ }
62
62
  }