@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.
- package/README.md +1 -1
- package/es/assets/iconfont/demo_index.html +348 -3
- package/es/assets/iconfont/iconfont.css +63 -3
- package/es/assets/iconfont/iconfont.js +8 -8
- package/es/assets/iconfont/iconfont.json +105 -0
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/assets/styles/resetAntd.less +20 -7
- package/es/attrCondition/useAttrCondition.js +4 -1
- package/es/attrConditions/components/operateList.js +4 -4
- package/es/attrConditions/components/valuesList.js +1 -1
- package/es/attrConditions/types.d.ts +1 -0
- package/es/attributeSelector/index.js +3 -1
- package/es/attributeSelector/listPanel.js +3 -3
- package/es/attributeSelector/types.d.ts +2 -0
- package/es/attributeSelector/util.js +4 -0
- package/es/chart/demo/data/data7.d.ts +54 -0
- package/es/chart/demo/data/data7.js +1527 -0
- package/es/chart/demo/stack.d.ts +3 -0
- package/es/chart/demo/stack.js +31 -0
- package/es/chart/index.js +16 -6
- package/es/chart/types.d.ts +4 -1
- package/es/chart/util/chartOptionConfig.d.ts +4 -3
- package/es/chart/util/chartOptionConfig.js +84 -4
- package/es/chart/util/formatData.d.ts +1 -0
- package/es/chart/util/formatData.js +13 -0
- package/es/cycleTime/index.js +1 -1
- package/es/datePicker/index.js +6 -6
- package/es/datePickerV2/index.js +6 -3
- package/es/datePickerV2/popoverContent.d.ts +1 -0
- package/es/datePickerV2/popoverContent.js +3 -1
- package/es/datePickerV2/shortcut.d.ts +2 -0
- package/es/datePickerV2/shortcut.js +4 -3
- package/es/datePickerV2/types.d.ts +2 -0
- package/es/datePickerV2/utils.d.ts +1 -1
- package/es/datePickerV2/utils.js +5 -5
- package/es/dnd/demo/styles/index.less +34 -34
- package/es/eventSelector/listPanel.js +1 -1
- package/es/hooks/useBizStore.js +5 -2
- package/es/index.d.ts +4 -1
- package/es/index.js +4 -1
- package/es/layout/optionTitle/components/btnMenu/index.less +18 -18
- package/es/layout/optionTitle/components/title/index.less +43 -43
- package/es/layout/optionTitle/styles/index.less +30 -30
- package/es/layout/optionTitle/styles/layout.less +90 -90
- package/es/layout/optionTitle/styles/search.less +27 -27
- package/es/productCondition/conditions/order/runPeriodCondition.js +1 -1
- package/es/productCondition/conditions/periodCondition.js +1 -1
- package/es/productCondition/conditions/runTimesCondition.js +1 -1
- package/es/select/index.js +9 -1
- package/es/select/types.d.ts +3 -2
- package/es/subjectWrapper/demo/index.d.ts +3 -0
- package/es/subjectWrapper/demo/index.js +28 -0
- package/es/subjectWrapper/index.d.ts +5 -0
- package/es/subjectWrapper/index.js +98 -0
- package/es/subjectWrapper/index.less +12 -0
- package/es/subjectWrapper/types.d.ts +14 -0
- package/es/subjectWrapper/types.js +4 -0
- package/es/userCondition/conditions/cdpCshCondition.js +0 -1
- package/es/userCondition/conditions/order/runPeriodCondition.js +1 -1
- package/es/userCondition/conditions/periodCondition.js +1 -1
- package/es/userCondition/conditions/runTimesCondition.js +1 -1
- package/es/userGroup/index.js +2 -2
- package/es/userGroupHeader/demo/index.js +1 -1
- package/es/utils/ajax.js +15 -2
- package/es/utils/type.d.ts +1 -0
- package/es/utils/util.d.ts +3 -0
- package/es/utils/util.js +10 -0
- 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;
|
|
@@ -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) {
|
package/es/userGroup/index.js
CHANGED
|
@@ -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: [
|
|
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;
|
package/es/utils/type.d.ts
CHANGED
package/es/utils/util.d.ts
CHANGED
|
@@ -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.
|
|
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
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
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": "
|
|
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
|
+
}
|