@zgfe/business-lib 1.2.66-hxd.2 → 1.2.70-hxd.10

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 (70) hide show
  1. package/README.md +1 -1
  2. package/es/assets/iconfont/demo_index.html +348 -3
  3. package/es/assets/iconfont/iconfont.css +63 -3
  4. package/es/assets/iconfont/iconfont.js +8 -8
  5. package/es/assets/iconfont/iconfont.json +105 -0
  6. package/es/assets/iconfont/iconfont.ttf +0 -0
  7. package/es/assets/iconfont/iconfont.woff +0 -0
  8. package/es/assets/iconfont/iconfont.woff2 +0 -0
  9. package/es/assets/styles/resetAntd.less +20 -7
  10. package/es/attrCondition/useAttrCondition.js +4 -1
  11. package/es/attrConditions/components/operateList.js +4 -4
  12. package/es/attrConditions/components/valuesList.js +1 -1
  13. package/es/attrConditions/types.d.ts +1 -0
  14. package/es/attributeSelector/index.js +3 -1
  15. package/es/attributeSelector/listPanel.js +3 -3
  16. package/es/attributeSelector/types.d.ts +2 -0
  17. package/es/attributeSelector/util.js +4 -0
  18. package/es/chart/demo/data/data7.d.ts +54 -0
  19. package/es/chart/demo/data/data7.js +1527 -0
  20. package/es/chart/demo/stack.d.ts +3 -0
  21. package/es/chart/demo/stack.js +31 -0
  22. package/es/chart/index.js +16 -6
  23. package/es/chart/types.d.ts +4 -1
  24. package/es/chart/util/chartOptionConfig.d.ts +4 -3
  25. package/es/chart/util/chartOptionConfig.js +84 -4
  26. package/es/chart/util/formatData.d.ts +1 -0
  27. package/es/chart/util/formatData.js +13 -0
  28. package/es/cycleTime/index.js +1 -1
  29. package/es/datePicker/index.js +6 -6
  30. package/es/datePickerV2/index.js +6 -3
  31. package/es/datePickerV2/popoverContent.d.ts +1 -0
  32. package/es/datePickerV2/popoverContent.js +3 -1
  33. package/es/datePickerV2/shortcut.d.ts +2 -0
  34. package/es/datePickerV2/shortcut.js +4 -3
  35. package/es/datePickerV2/types.d.ts +2 -0
  36. package/es/datePickerV2/utils.d.ts +1 -1
  37. package/es/datePickerV2/utils.js +5 -5
  38. package/es/dnd/demo/styles/index.less +34 -34
  39. package/es/eventSelector/listPanel.js +1 -1
  40. package/es/hooks/useBizStore.js +5 -2
  41. package/es/index.d.ts +4 -1
  42. package/es/index.js +4 -1
  43. package/es/layout/optionTitle/components/btnMenu/index.less +18 -18
  44. package/es/layout/optionTitle/components/title/index.less +43 -43
  45. package/es/layout/optionTitle/styles/index.less +30 -30
  46. package/es/layout/optionTitle/styles/layout.less +90 -90
  47. package/es/layout/optionTitle/styles/search.less +27 -27
  48. package/es/productCondition/conditions/order/runPeriodCondition.js +1 -1
  49. package/es/productCondition/conditions/periodCondition.js +1 -1
  50. package/es/productCondition/conditions/runTimesCondition.js +1 -1
  51. package/es/select/index.js +9 -1
  52. package/es/select/types.d.ts +3 -2
  53. package/es/subjectWrapper/demo/index.d.ts +3 -0
  54. package/es/subjectWrapper/demo/index.js +28 -0
  55. package/es/subjectWrapper/index.d.ts +5 -0
  56. package/es/subjectWrapper/index.js +98 -0
  57. package/es/subjectWrapper/index.less +12 -0
  58. package/es/subjectWrapper/types.d.ts +14 -0
  59. package/es/subjectWrapper/types.js +4 -0
  60. package/es/userCondition/conditions/cdpCshCondition.js +0 -1
  61. package/es/userCondition/conditions/order/runPeriodCondition.js +1 -1
  62. package/es/userCondition/conditions/periodCondition.js +1 -1
  63. package/es/userCondition/conditions/runTimesCondition.js +1 -1
  64. package/es/userGroup/index.js +2 -2
  65. package/es/userGroupHeader/demo/index.js +1 -1
  66. package/es/utils/ajax.js +15 -2
  67. package/es/utils/type.d.ts +1 -0
  68. package/es/utils/util.d.ts +3 -0
  69. package/es/utils/util.js +10 -0
  70. package/package.json +62 -62
@@ -0,0 +1,14 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { GlobalContextProps } from '../context';
3
+ declare namespace DemoWrapperTypes {
4
+ interface Props {
5
+ className?: string;
6
+ defaultApp?: number;
7
+ needMeta?: boolean;
8
+ children?: ReactNode;
9
+ contextProps?: GlobalContextProps;
10
+ projectList?: any;
11
+ }
12
+ }
13
+ export declare const Props: React.FC<DemoWrapperTypes.Props>;
14
+ export default DemoWrapperTypes;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export var Props = function Props() {
3
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
4
+ };
@@ -506,7 +506,6 @@ var CdpCondition = function CdpCondition(props) {
506
506
  }
507
507
  }, []);
508
508
  var onChangeCondition = function onChangeCondition(condition, index) {
509
- console.log('onChangeCondition', condition, index);
510
509
  var resData = _.cloneDeep(cdpConditions);
511
510
  resData[index] = _objectSpread({}, condition);
512
511
  onChange(dataId, resData);
@@ -38,7 +38,7 @@ var RunPeriodCondition = function RunPeriodCondition(props) {
38
38
  }
39
39
  function onOperatorChange(option) {
40
40
  var newData = {
41
- operator: option.value
41
+ operator: option === null || option === void 0 ? void 0 : option.value
42
42
  };
43
43
  if (newData.operator === 'absolute') {
44
44
  var endDate = moment().format('YYYY-MM-DD');
@@ -47,7 +47,7 @@ var PeriodCondition = function PeriodCondition(props) {
47
47
  }
48
48
  function onOperatorChange(option) {
49
49
  var newData = {
50
- operator: option.value
50
+ operator: option === null || option === void 0 ? void 0 : option.value
51
51
  };
52
52
  if (newData.operator === 'absolute') {
53
53
  var endDate = moment().format('YYYY-MM-DD');
@@ -34,7 +34,7 @@ var RunTimesCondition = function RunTimesCondition(props) {
34
34
  onChange = props.onChange;
35
35
  function onOperatorChange(data) {
36
36
  onChange(_objectSpread(_objectSpread({}, runTimes), {}, {
37
- operator: data.value
37
+ operator: data === null || data === void 0 ? void 0 : data.value
38
38
  }));
39
39
  }
40
40
  function onValueChange(e) {
@@ -93,7 +93,7 @@ var BizUserGroup = function BizUserGroup(_ref) {
93
93
  }
94
94
  }, [groupLoading, tagLoading]);
95
95
  useEffect(function () {
96
- if (!onChange || groupLoading || tagLoading) return;
96
+ if (!onChange || groupLoading || tagLoading || open) return;
97
97
  if (!enableTags) {
98
98
  onChange(chosen === null || chosen === void 0 ? void 0 : chosen.id);
99
99
  return;
@@ -104,7 +104,7 @@ var BizUserGroup = function BizUserGroup(_ref) {
104
104
  layer = _item[2];
105
105
  return layer ? "".concat(tag.id, ":").concat(layer === null || layer === void 0 ? void 0 : layer.layerLabelId) : String(tag.id);
106
106
  }) : chosen === null || chosen === void 0 ? void 0 : chosen.id);
107
- }, [chosen]);
107
+ }, [chosen, open]);
108
108
  var _onClose = function onClose(e, index) {
109
109
  e.stopPropagation();
110
110
  setChosen(function (data) {
@@ -11,7 +11,7 @@ export default (function () {
11
11
  }, /*#__PURE__*/React.createElement(BizUserGroupHeader, {
12
12
  max: 3,
13
13
  enableTags: true,
14
- value: [['4077:685001635528704'], 836, 837],
14
+ value: [0],
15
15
  onChange: function onChange(value) {
16
16
  console.log('>>>>>>>>回传值', value);
17
17
  }
package/es/utils/ajax.js CHANGED
@@ -63,6 +63,19 @@ var downloadFile = function downloadFile(resData, name) {
63
63
  a.click();
64
64
  return null;
65
65
  };
66
+ var downloadFile1 = function downloadFile1(resData, name) {
67
+ var blob = resData.data;
68
+ var fileName = resData.response.headers.get('Filename') || util.guid();
69
+ if (name) {
70
+ fileName = "".concat(name);
71
+ }
72
+ var href = URL.createObjectURL(blob);
73
+ var a = document.createElement('a');
74
+ a.href = href;
75
+ a.download = fileName;
76
+ a.click();
77
+ return null;
78
+ };
66
79
  export function responseErrorHandler(url, apiResult, errorTitle, notifyType, intercept) {
67
80
  if (/\.jsp/.test(url)) {
68
81
  return apiResult;
@@ -106,7 +119,7 @@ function request(_x, _x2) {
106
119
  }
107
120
  function _request() {
108
121
  _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url, options) {
109
- var _globalConfig$request, _globalConfig$request2, _params$options, _params$options2, err, option, list, optionsWrapper, responseWrapper, params, res, _params$options3;
122
+ var _globalConfig$request, _globalConfig$request2, _params$options, _params$options2, err, option, list, optionsWrapper, responseWrapper, params, res, _params$options3, _params$options4;
110
123
  return _regeneratorRuntime().wrap(function _callee$(_context) {
111
124
  while (1) switch (_context.prev = _context.next) {
112
125
  case 0:
@@ -163,7 +176,7 @@ function _request() {
163
176
  }
164
177
  return _context.abrupt("return", res.data);
165
178
  case 23:
166
- return _context.abrupt("return", downloadFile(res, params.options.fileName));
179
+ return _context.abrupt("return", ((_params$options4 = params.options) === null || _params$options4 === void 0 ? void 0 : _params$options4.isExcel) ? downloadFile1(res, params.options.fileName) : downloadFile(res, params.options.fileName));
167
180
  case 24:
168
181
  _context.next = 27;
169
182
  break;
@@ -54,6 +54,7 @@ export declare namespace OldSystem {
54
54
  name: string;
55
55
  text: string;
56
56
  type: PropType;
57
+ encryption_type?: number;
57
58
  subtype?: number;
58
59
  }
59
60
  interface EnvProp extends UserProp {
@@ -5,6 +5,8 @@ declare let util: {
5
5
  isArray(obj: any): boolean;
6
6
  isString(obj: any): boolean;
7
7
  isNumber(obj: any): boolean;
8
+ isFloatNumber(str: any): boolean;
9
+ formatNumberWithCommas(number: any): any;
8
10
  isDate(obj: any): boolean;
9
11
  isFunction(obj: any): boolean;
10
12
  isBlob(obj: any): boolean;
@@ -34,5 +36,6 @@ declare let util: {
34
36
  transformRequest(param: {
35
37
  [prop: string]: any;
36
38
  }): string;
39
+ isMobile(): boolean;
37
40
  };
38
41
  export default util;
package/es/utils/util.js CHANGED
@@ -16,6 +16,12 @@ var util = {
16
16
  isNumber: function isNumber(obj) {
17
17
  return this.type(obj) === '[object Number]';
18
18
  },
19
+ isFloatNumber: function isFloatNumber(str) {
20
+ return /^-?\d+(\.\d+)?$/.test(str);
21
+ },
22
+ formatNumberWithCommas: function formatNumberWithCommas(number) {
23
+ return number.toLocaleString();
24
+ },
19
25
  isDate: function isDate(obj) {
20
26
  return this.type(obj) === '[object Date]';
21
27
  },
@@ -173,6 +179,10 @@ var util = {
173
179
  arr.push("".concat(key, "=").concat(encodeURIComponent(param[key])));
174
180
  }
175
181
  return arr.join('&');
182
+ },
183
+ isMobile: function isMobile() {
184
+ var userAgent = navigator.userAgent || navigator.vendor;
185
+ return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
176
186
  }
177
187
  };
178
188
  export default util;
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
- {
2
- "name": "@zgfe/business-lib",
3
- "version": "1.2.66-hxd.2",
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"
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": "9608e92d175153d6375e3ae49f6649ff886175dc",
59
- "gitHooks": {
60
- "pre-commit": "lint-staged"
61
- }
62
- }
1
+ {
2
+ "name": "@zgfe/business-lib",
3
+ "version": "1.2.70-hxd.10",
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"
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
+ "lerna": "^4.0.0",
35
+ "rc-virtual-list": "^3.4.8",
36
+ "react-infinite-scroll-component": "^6.1.0",
37
+ "umi-request": "^1.4.0"
38
+ },
39
+ "devDependencies": {
40
+ "@testing-library/jest-dom": "^5.15.1",
41
+ "@testing-library/react": "^12.1.2",
42
+ "@types/jest": "^27.0.3",
43
+ "@types/lodash": "^4.14.182",
44
+ "@umijs/fabric": "^2.8.1",
45
+ "@umijs/test": "^3.0.5",
46
+ "antd": "4.24.16",
47
+ "dumi": "^1.1.0",
48
+ "echarts": "^5.3.2",
49
+ "echarts-for-react": "^3.0.2",
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": "77586fd2307fbfbe1bbad2ea27404309d4e2af6c",
59
+ "gitHooks": {
60
+ "pre-commit": "lint-staged"
61
+ }
62
+ }