@zgfe/modules-interval 1.0.3-alpha.2 → 1.0.3-alpha.3
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/dist/esm/components/searchPanel/index.js +2 -2
- package/dist/esm/components/table/index.js +2 -2
- package/dist/esm/components/topBar/index.js +2 -2
- package/dist/esm/modules/content/index.js +2 -2
- package/dist/esm/modules/content/types.d.ts +2 -2
- package/dist/esm/modules/home/index.js +2 -2
- package/dist/esm/modules/home/types.d.ts +2 -2
- package/dist/esm/types.d.ts +15 -15
- package/dist/esm/types.js +1 -1
- package/package.json +2 -2
|
@@ -13,12 +13,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import { BizDatePicker, BizSelect } from '@zgfe/business-lib';
|
|
14
14
|
import React, { useContext, useEffect, useState } from 'react';
|
|
15
15
|
import { chartTypeOptions, getInitDate } from "../../constants";
|
|
16
|
-
import {
|
|
16
|
+
import { IntervalContext } from "../../types";
|
|
17
17
|
import "./styles/index.less";
|
|
18
18
|
import { extractNames } from "../../utils/formData";
|
|
19
19
|
var classPrefix = 'search-panel-interval';
|
|
20
20
|
var SearchPanel = function SearchPanel(props) {
|
|
21
|
-
var _useContext = useContext(
|
|
21
|
+
var _useContext = useContext(IntervalContext),
|
|
22
22
|
includeToday = _useContext.includeToday;
|
|
23
23
|
// 当前时间段
|
|
24
24
|
var _useState = useState(props.time || getInitDate(includeToday)),
|
|
@@ -17,7 +17,7 @@ import { message } from 'antd';
|
|
|
17
17
|
import { formTableData, getColumns } from "../../utils/formData";
|
|
18
18
|
import "./styles/index.less";
|
|
19
19
|
import { searchDataParams } from "../../modules/content/utils";
|
|
20
|
-
import {
|
|
20
|
+
import { IntervalContext } from "../../types";
|
|
21
21
|
var classPrefix = 'mi-interval-table';
|
|
22
22
|
var EventTable = function EventTable(props) {
|
|
23
23
|
var _dataSource$appData2;
|
|
@@ -35,7 +35,7 @@ var EventTable = function EventTable(props) {
|
|
|
35
35
|
eventGroupList = _useContext$eventGrou === void 0 ? [] : _useContext$eventGrou,
|
|
36
36
|
eventEnvList = _useContext.eventEnvList,
|
|
37
37
|
userPropList = _useContext.userPropList;
|
|
38
|
-
var _useContext2 = useContext(
|
|
38
|
+
var _useContext2 = useContext(IntervalContext),
|
|
39
39
|
panelName = _useContext2.panelName,
|
|
40
40
|
onUserDrill = _useContext2.onUserDrill;
|
|
41
41
|
|
|
@@ -14,12 +14,12 @@ import { Button } from 'antd';
|
|
|
14
14
|
import React, { useContext, useEffect, useState } from 'react';
|
|
15
15
|
import { BizAddToPanel, BizAddToScene, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
16
16
|
import "./styles/index.less";
|
|
17
|
-
import {
|
|
17
|
+
import { IntervalContext } from "../../types";
|
|
18
18
|
import { chartTypes, platformOption } from "../../constants/fields";
|
|
19
19
|
import { appVersionType } from '@zgfe/business-lib/es/context';
|
|
20
20
|
var classPrefix = 'modules-interval-topbar';
|
|
21
21
|
var TopBar = function TopBar(props) {
|
|
22
|
-
var _useContext = useContext(
|
|
22
|
+
var _useContext = useContext(IntervalContext),
|
|
23
23
|
panelId = _useContext.panelId,
|
|
24
24
|
afterEditTarget = _useContext.afterEditTarget,
|
|
25
25
|
enableAddScene = _useContext.enableAddScene;
|
|
@@ -14,7 +14,7 @@ import { ajax, BizGlobalDataContext, BizLayout, BizTargetFromPanelContext } from
|
|
|
14
14
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
15
15
|
import Request from 'umi-request';
|
|
16
16
|
import TopBar from "../../components/topBar";
|
|
17
|
-
import {
|
|
17
|
+
import { IntervalContext } from "../../types";
|
|
18
18
|
import "./styles/index.less";
|
|
19
19
|
import { Apis } from "../../constants";
|
|
20
20
|
import { judgeIsCity, judgeIsArea, getValue, searchDataParams } from "./utils";
|
|
@@ -64,7 +64,7 @@ var EventContent = function EventContent(props) {
|
|
|
64
64
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
65
65
|
eventId = _useState16[0],
|
|
66
66
|
setEventId = _useState16[1];
|
|
67
|
-
var _useContext2 = useContext(
|
|
67
|
+
var _useContext2 = useContext(IntervalContext),
|
|
68
68
|
searchData = _useContext2.searchData,
|
|
69
69
|
setSearchData = _useContext2.setSearchData,
|
|
70
70
|
eventGroupList = _useContext2.eventGroupList,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchValue
|
|
1
|
+
import { SearchValue } from '../../types';
|
|
2
2
|
import { IntervalProps } from '../home/types';
|
|
3
3
|
export declare namespace EventContentProps {
|
|
4
4
|
interface Props {
|
|
@@ -19,7 +19,7 @@ export declare namespace EventContentProps {
|
|
|
19
19
|
* 是否查询中
|
|
20
20
|
*/
|
|
21
21
|
onSearching?: (flag: boolean) => void;
|
|
22
|
-
onUserDrill:
|
|
22
|
+
onUserDrill: IntervalProps.Props['onUserDrill'];
|
|
23
23
|
onJumpWarning: IntervalProps.Props['onJumpWarning'];
|
|
24
24
|
/**
|
|
25
25
|
* 查询条件回调
|
|
@@ -14,7 +14,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
14
14
|
import { Spin } from 'antd';
|
|
15
15
|
import { BizGlobalDataContext, BizTargetFromPanel } from '@zgfe/business-lib';
|
|
16
16
|
import "./styles/index.less";
|
|
17
|
-
import {
|
|
17
|
+
import { IntervalContext } from "../../types";
|
|
18
18
|
import { getInitDate } from "../../constants/initData";
|
|
19
19
|
import EventContent from "../content";
|
|
20
20
|
import { chartTypes } from "../../constants";
|
|
@@ -112,7 +112,7 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
112
112
|
children: ""
|
|
113
113
|
}), !panelId && /*#__PURE__*/React.createElement("div", {
|
|
114
114
|
className: "".concat(classPrefix, "-header-title")
|
|
115
|
-
}, "\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(
|
|
115
|
+
}, "\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(IntervalContext.Provider, {
|
|
116
116
|
value: {
|
|
117
117
|
panelId: panelId,
|
|
118
118
|
elementId: elementId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SearchValue,
|
|
2
|
+
import { SearchValue, IntervalDrillParams } from '../../types';
|
|
3
3
|
export declare namespace IntervalProps {
|
|
4
4
|
interface Props {
|
|
5
5
|
/**
|
|
@@ -23,7 +23,7 @@ export declare namespace IntervalProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* 用户钻取
|
|
25
25
|
*/
|
|
26
|
-
onUserDrill: (data:
|
|
26
|
+
onUserDrill: (data: IntervalDrillParams) => void;
|
|
27
27
|
onJumpWarning: (data: Record<string, any>, searchData: SearchValue) => void;
|
|
28
28
|
}
|
|
29
29
|
interface Value {
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -131,20 +131,6 @@ export interface SearchValue {
|
|
|
131
131
|
unit: string;
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
export interface UserDrillParamsProp {
|
|
135
|
-
/**
|
|
136
|
-
* @description 用户数量
|
|
137
|
-
*/
|
|
138
|
-
count: number;
|
|
139
|
-
/**
|
|
140
|
-
* @description 查询接口
|
|
141
|
-
*/
|
|
142
|
-
url: string;
|
|
143
|
-
/**
|
|
144
|
-
* @description 查询对象
|
|
145
|
-
*/
|
|
146
|
-
params?: Record<string, any>;
|
|
147
|
-
}
|
|
148
134
|
export type EventChartTypes = 'line' | 'bar' | 'pie' | 'map' | 'boxplot';
|
|
149
135
|
/**
|
|
150
136
|
* 图表选择类型
|
|
@@ -187,4 +173,18 @@ export interface TableChildrenProps {
|
|
|
187
173
|
name: string;
|
|
188
174
|
values: number[];
|
|
189
175
|
}
|
|
190
|
-
export declare const
|
|
176
|
+
export declare const IntervalContext: import("react").Context<any>;
|
|
177
|
+
export interface IntervalDrillParams {
|
|
178
|
+
/**
|
|
179
|
+
* @description 用户数量
|
|
180
|
+
*/
|
|
181
|
+
count: number;
|
|
182
|
+
/**
|
|
183
|
+
* @description 查询接口
|
|
184
|
+
*/
|
|
185
|
+
url: string;
|
|
186
|
+
/**
|
|
187
|
+
* @description 查询对象
|
|
188
|
+
*/
|
|
189
|
+
params?: Record<string, any>;
|
|
190
|
+
}
|
package/dist/esm/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-interval",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"umi-request": "^1.4.0",
|
|
63
63
|
"yorkie": "^2.0.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "ff72ad7d6d914c1f5d4e1659b0efaed33059dd3a"
|
|
66
66
|
}
|