@zgfe/business-lib 1.2.70-hxd.20 → 1.2.70-hxd.21
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/es/demoWrapper/content.js +3 -9
- package/es/hooks/useBizStore.js +3 -9
- package/package.json +62 -62
|
@@ -16,6 +16,7 @@ import convertAttributeData from '../attributeSelector/util';
|
|
|
16
16
|
import BizGlobalDataContext from '../context';
|
|
17
17
|
import request from '../utils/ajax';
|
|
18
18
|
import useBizStore from '../hooks/useBizStore';
|
|
19
|
+
import { eventApi } from '../utils';
|
|
19
20
|
var catchPool = {};
|
|
20
21
|
function ajax(url, options) {
|
|
21
22
|
return new Promise(function (resolve, reject) {
|
|
@@ -198,15 +199,8 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
198
199
|
}
|
|
199
200
|
function loadEvents() {
|
|
200
201
|
setLoadEvent(true);
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
data: {
|
|
204
|
-
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id,
|
|
205
|
-
platform: 0,
|
|
206
|
-
isAll: true
|
|
207
|
-
}
|
|
208
|
-
}).then(function (res) {
|
|
209
|
-
setEventGroups(res.data);
|
|
202
|
+
eventApi.fetchAllEvents(currentApp === null || currentApp === void 0 ? void 0 : currentApp.id, 0, false).then(function (eventGroups) {
|
|
203
|
+
setEventGroups(Array.isArray(eventGroups) ? eventGroups : []);
|
|
210
204
|
setLoadEvent(false);
|
|
211
205
|
});
|
|
212
206
|
}
|
package/es/hooks/useBizStore.js
CHANGED
|
@@ -14,6 +14,7 @@ import { useEffect, useState, useCallback } from 'react';
|
|
|
14
14
|
import { ajax } from '../utils';
|
|
15
15
|
import Apis from '../constants/apis';
|
|
16
16
|
import convertAttributeData from '../attributeSelector/util';
|
|
17
|
+
import { eventApi } from '../utils';
|
|
17
18
|
function useBizStore(_ref) {
|
|
18
19
|
var currentApp = _ref.currentApp;
|
|
19
20
|
var _useState = useState([]),
|
|
@@ -101,15 +102,8 @@ function useBizStore(_ref) {
|
|
|
101
102
|
}, [currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId]);
|
|
102
103
|
var loadEvents = useCallback(function () {
|
|
103
104
|
setLoadEvent(true);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
data: {
|
|
107
|
-
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
108
|
-
platform: 0,
|
|
109
|
-
isAll: true
|
|
110
|
-
}
|
|
111
|
-
}).then(function (res) {
|
|
112
|
-
setEventGroups(res.data);
|
|
105
|
+
eventApi.fetchAllEvents(currentApp === null || currentApp === void 0 ? void 0 : currentApp.id, 0, false).then(function (eventGroups) {
|
|
106
|
+
setEventGroups(Array.isArray(eventGroups) ? eventGroups : []);
|
|
113
107
|
setLoadEvent(false);
|
|
114
108
|
});
|
|
115
109
|
}, [currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId]);
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.70-hxd.
|
|
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": "
|
|
59
|
-
"gitHooks": {
|
|
60
|
-
"pre-commit": "lint-staged"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@zgfe/business-lib",
|
|
3
|
+
"version": "1.2.70-hxd.21",
|
|
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": "27c06fba82f7d420519902bf028ed1770c21f617",
|
|
59
|
+
"gitHooks": {
|
|
60
|
+
"pre-commit": "lint-staged"
|
|
61
|
+
}
|
|
62
|
+
}
|