@tsingroc/tsingroc-components 5.0.1 → 5.1.0
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/components/BarLineChart/BarLineChart.module.css +10 -0
- package/dist/components/BarLineChart/index.d.ts +66 -0
- package/dist/components/BarLineChart/index.js +590 -0
- package/dist/components/BaseBarChart/BaseBarChart.module.css +12 -0
- package/dist/components/BaseBarChart/index.d.ts +33 -0
- package/dist/components/BaseBarChart/index.js +121 -0
- package/dist/components/DataCellNumber/DataCellNumber.module.css +20 -0
- package/dist/components/DataCellNumber/index.d.ts +14 -0
- package/dist/components/DataCellNumber/index.js +142 -0
- package/dist/components/FlexColLayout/index.d.ts +6 -0
- package/dist/components/FlexColLayout/index.js +40 -0
- package/dist/components/FlexRowLayout/index.d.ts +5 -0
- package/dist/components/FlexRowLayout/index.js +45 -0
- package/dist/components/HighlightSyncedECharts/index.d.ts +47 -0
- package/dist/components/HighlightSyncedECharts/index.js +260 -0
- package/dist/components/HighlightSyncedTable/index.d.ts +8 -0
- package/dist/components/HighlightSyncedTable/index.js +183 -0
- package/dist/components/LoadingSection/index.d.ts +41 -0
- package/dist/components/LoadingSection/index.js +183 -0
- package/dist/components/LoadingSkeleton/index.d.ts +42 -0
- package/dist/components/LoadingSkeleton/index.js +634 -0
- package/dist/components/ScrollableTable/ScrollableTable.module.css +21 -0
- package/dist/components/ScrollableTable/index.d.ts +13 -0
- package/dist/components/ScrollableTable/index.js +29 -0
- package/dist/components/TsingrocTable/TsingrocTable.module.css +32 -0
- package/dist/components/TsingrocTable/index.d.ts +12 -0
- package/dist/components/TsingrocTable/index.js +23 -0
- package/dist/components/TsingrocTheme/index.js +3 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/pages/DayAheadReviewPage/components/PricePlot/index.d.ts +7 -0
- package/dist/pages/DayAheadReviewPage/components/PricePlot/index.js +136 -0
- package/dist/pages/DayAheadReviewPage/components/ProfitBarChart/ProfitBarChart.module.css +13 -0
- package/dist/pages/DayAheadReviewPage/components/ProfitBarChart/index.d.ts +17 -0
- package/dist/pages/DayAheadReviewPage/components/ProfitBarChart/index.js +278 -0
- package/dist/pages/DayAheadReviewPage/components/RevenueCard/RevenueCard.module.css +40 -0
- package/dist/pages/DayAheadReviewPage/components/RevenueCard/index.d.ts +9 -0
- package/dist/pages/DayAheadReviewPage/components/RevenueCard/index.js +195 -0
- package/dist/pages/DayAheadReviewPage/components/RevenueSummaryCard/RevenueSummaryCard.module.css +38 -0
- package/dist/pages/DayAheadReviewPage/components/RevenueSummaryCard/index.d.ts +10 -0
- package/dist/pages/DayAheadReviewPage/components/RevenueSummaryCard/index.js +117 -0
- package/dist/pages/DayAheadReviewPage/components/ReviewLineChart/ReviewLineChart.module.css +11 -0
- package/dist/pages/DayAheadReviewPage/components/ReviewLineChart/index.d.ts +53 -0
- package/dist/pages/DayAheadReviewPage/components/ReviewLineChart/index.js +398 -0
- package/dist/pages/DayAheadReviewPage/components/ReviewSummaryTable/ReviewSummaryTable.module.css +33 -0
- package/dist/pages/DayAheadReviewPage/components/ReviewSummaryTable/index.d.ts +17 -0
- package/dist/pages/DayAheadReviewPage/components/ReviewSummaryTable/index.js +187 -0
- package/dist/pages/DayAheadReviewPage/components/StrategyPlot/index.d.ts +10 -0
- package/dist/pages/DayAheadReviewPage/components/StrategyPlot/index.js +223 -0
- package/dist/pages/DayAheadReviewPage/components/SummaryTable/index.d.ts +7 -0
- package/dist/pages/DayAheadReviewPage/components/SummaryTable/index.js +39 -0
- package/dist/pages/DayAheadReviewPage/components/SummaryTable/useTableColumns.d.ts +10 -0
- package/dist/pages/DayAheadReviewPage/components/SummaryTable/useTableColumns.js +307 -0
- package/dist/pages/DayAheadReviewPage/hook/useDayAheadReviewDate.d.ts +137 -0
- package/dist/pages/DayAheadReviewPage/hook/useDayAheadReviewDate.js +252 -0
- package/dist/pages/DayAheadReviewPage/index.d.ts +149 -0
- package/dist/pages/DayAheadReviewPage/index.js +259 -0
- package/dist/pages/DayAheadReviewPage/layout/LeftChartContainer.d.ts +12 -0
- package/dist/pages/DayAheadReviewPage/layout/LeftChartContainer.js +236 -0
- package/dist/pages/DayAheadReviewPage/layout/ReviewPageLayout.d.ts +4 -0
- package/dist/pages/DayAheadReviewPage/layout/ReviewPageLayout.js +32 -0
- package/dist/pages/DayAheadReviewPage/layout/RightSummaryContainer.d.ts +14 -0
- package/dist/pages/DayAheadReviewPage/layout/RightSummaryContainer.js +199 -0
- package/dist/pages/DayAheadReviewPage/layout/TopDayReviewHeader.d.ts +9 -0
- package/dist/pages/DayAheadReviewPage/layout/TopDayReviewHeader.js +115 -0
- package/dist/pages/DayAheadReviewPage/types/dayahead.d.ts +172 -0
- package/dist/pages/DayAheadReviewPage/types/dayahead.js +1 -0
- package/dist/utils/accessibility.d.ts +114 -0
- package/dist/utils/accessibility.js +214 -0
- package/dist/utils/constants.d.ts +18 -0
- package/dist/utils/constants.js +34 -0
- package/dist/utils/export.d.ts +10 -0
- package/dist/utils/export.js +72 -0
- package/dist/utils/formatters.d.ts +46 -0
- package/dist/utils/formatters.js +84 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/presenters.d.ts +24 -0
- package/dist/utils/presenters.js +48 -0
- package/dist/utils/ui.d.ts +116 -0
- package/dist/utils/ui.js +171 -0
- package/package.json +32 -31
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { App, Col, Row } from "antd";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { HighlightProvider } from "#src";
|
|
5
|
+
import { extractProfitData, hasManualData } from "#src/utils/presenters";
|
|
6
|
+
import { useDayAheadReviewDate } from "./hook/useDayAheadReviewDate";
|
|
7
|
+
import LeftChartContainer from "./layout/LeftChartContainer";
|
|
8
|
+
import ReviewPageLayout from "./layout/ReviewPageLayout";
|
|
9
|
+
import RightSummaryContainer from "./layout/RightSummaryContainer";
|
|
10
|
+
import TopHeader from "./layout/TopDayReviewHeader";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
export { useDayAheadReviewDate };
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 复盘页面所需的所有数据,包含三部分:
|
|
16
|
+
*
|
|
17
|
+
* - `power`: 策略对比图(电量)
|
|
18
|
+
* - `price`: 价格走势图(价格)
|
|
19
|
+
* - `table`: 明细表格 + 收益图表(组合数据)
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const data: DayAheadReviewPageData = {
|
|
24
|
+
* power: [{ time: "2024-01-01T00:00", forecastVolume: 120.5, ... }],
|
|
25
|
+
* price: [{ time: "2024-01-01T00:00", dayAheadPrice: 350.5, ... }],
|
|
26
|
+
* table: [{ time: "2024-01-01T00:00", forecastVolume: 120.5, dayAheadPrice: 350.5, ... }],
|
|
27
|
+
* };
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* DayAheadReviewPage 组件的属性。
|
|
33
|
+
*
|
|
34
|
+
* ## 必需属性
|
|
35
|
+
*
|
|
36
|
+
* 组件需要日期管理属性和数据。使用提供的 `useDayAheadReviewDate` 钩子可以简化日期处理。
|
|
37
|
+
*
|
|
38
|
+
* ## 可选属性
|
|
39
|
+
*
|
|
40
|
+
* - `loading`: 获取数据时显示骨架屏加载器
|
|
41
|
+
* - `error`: 显示错误消息提示
|
|
42
|
+
* - `onExport`: 导出按钮的自定义导出处理函数
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* function ReviewPage() {
|
|
47
|
+
* const { date, setDate, tradingDay, disabledDate } = useDayAheadReviewDate({
|
|
48
|
+
* projectId: "power-market",
|
|
49
|
+
* serviceStartDay: "2024-01-01",
|
|
50
|
+
* });
|
|
51
|
+
*
|
|
52
|
+
* const { data, loading } = useQuery({
|
|
53
|
+
* queryKey: ["review", tradingDay],
|
|
54
|
+
* queryFn: () => fetchReviewData(tradingDay),
|
|
55
|
+
* });
|
|
56
|
+
*
|
|
57
|
+
* return (
|
|
58
|
+
* <div style={{ height: "100vh", display: "flex", flexDirection: "column" }}>
|
|
59
|
+
* <DayAheadReviewPage
|
|
60
|
+
* date={date}
|
|
61
|
+
* setDate={setDate}
|
|
62
|
+
* disabledDate={disabledDate}
|
|
63
|
+
* data={data ?? { power: [], price: [], table: [] }}
|
|
64
|
+
* loading={loading}
|
|
65
|
+
* onExport={(data, date) => exportToCSV(data, `review-${date}.csv`)}
|
|
66
|
+
* />
|
|
67
|
+
* </div>
|
|
68
|
+
* );
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 日前复盘页面组件。
|
|
75
|
+
*
|
|
76
|
+
* 提供了一个全面的仪表板,用于分析电力市场日前交易表现。
|
|
77
|
+
* 以响应式布局展示策略对比、收益分布、价格趋势和详细的间隔数据。
|
|
78
|
+
*
|
|
79
|
+
* ## 功能特性
|
|
80
|
+
*
|
|
81
|
+
* - **策略对比图表** — 对比 Agent 与人工申报/中标电量
|
|
82
|
+
* - **价格走势图表** — 可视化日前价格与实时价格
|
|
83
|
+
* - **收益分布图表** — 分析收益细分及基准对比
|
|
84
|
+
* - **明细表格** — 查看间隔级别数据并支持导出
|
|
85
|
+
* - **跨图表高亮** — 所有可视化之间的同步悬停状态
|
|
86
|
+
*/
|
|
87
|
+
export default function DayAheadReviewPage(t0) {
|
|
88
|
+
const $ = _c(34);
|
|
89
|
+
const {
|
|
90
|
+
date,
|
|
91
|
+
setDate,
|
|
92
|
+
disabledDate,
|
|
93
|
+
data,
|
|
94
|
+
loading: t1,
|
|
95
|
+
error,
|
|
96
|
+
onExport
|
|
97
|
+
} = t0;
|
|
98
|
+
const loading = t1 === undefined ? false : t1;
|
|
99
|
+
const app = App.useApp();
|
|
100
|
+
const [filterValue, setFilterValue] = useState("all");
|
|
101
|
+
if (error) {
|
|
102
|
+
const raw = error.message ?? String(error);
|
|
103
|
+
app.message.info(raw);
|
|
104
|
+
}
|
|
105
|
+
let t2;
|
|
106
|
+
if ($[0] !== data.table) {
|
|
107
|
+
t2 = hasManualData(data.table);
|
|
108
|
+
$[0] = data.table;
|
|
109
|
+
$[1] = t2;
|
|
110
|
+
} else {
|
|
111
|
+
t2 = $[1];
|
|
112
|
+
}
|
|
113
|
+
const hasManualDataFlag = t2;
|
|
114
|
+
let t3;
|
|
115
|
+
if ($[2] !== data.table) {
|
|
116
|
+
t3 = extractProfitData(data.table);
|
|
117
|
+
$[2] = data.table;
|
|
118
|
+
$[3] = t3;
|
|
119
|
+
} else {
|
|
120
|
+
t3 = $[3];
|
|
121
|
+
}
|
|
122
|
+
const {
|
|
123
|
+
agentProfit,
|
|
124
|
+
manualProfit
|
|
125
|
+
} = t3;
|
|
126
|
+
let t4;
|
|
127
|
+
if ($[4] !== date || $[5] !== disabledDate || $[6] !== setDate) {
|
|
128
|
+
t4 = /*#__PURE__*/_jsx(TopHeader, {
|
|
129
|
+
date: date,
|
|
130
|
+
setDate: setDate,
|
|
131
|
+
disabledDate: disabledDate
|
|
132
|
+
});
|
|
133
|
+
$[4] = date;
|
|
134
|
+
$[5] = disabledDate;
|
|
135
|
+
$[6] = setDate;
|
|
136
|
+
$[7] = t4;
|
|
137
|
+
} else {
|
|
138
|
+
t4 = $[7];
|
|
139
|
+
}
|
|
140
|
+
let t5;
|
|
141
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
142
|
+
t5 = {
|
|
143
|
+
minHeight: 0,
|
|
144
|
+
flex: 1,
|
|
145
|
+
height: "100%"
|
|
146
|
+
};
|
|
147
|
+
$[8] = t5;
|
|
148
|
+
} else {
|
|
149
|
+
t5 = $[8];
|
|
150
|
+
}
|
|
151
|
+
let t6;
|
|
152
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
153
|
+
t6 = {
|
|
154
|
+
display: "flex",
|
|
155
|
+
flexDirection: "column",
|
|
156
|
+
minHeight: 0,
|
|
157
|
+
height: "100%",
|
|
158
|
+
gap: 16
|
|
159
|
+
};
|
|
160
|
+
$[9] = t6;
|
|
161
|
+
} else {
|
|
162
|
+
t6 = $[9];
|
|
163
|
+
}
|
|
164
|
+
let t7;
|
|
165
|
+
if ($[10] !== agentProfit || $[11] !== data.power || $[12] !== data.price || $[13] !== filterValue || $[14] !== hasManualDataFlag || $[15] !== loading || $[16] !== manualProfit) {
|
|
166
|
+
t7 = /*#__PURE__*/_jsx(Col, {
|
|
167
|
+
span: 12,
|
|
168
|
+
style: t6,
|
|
169
|
+
children: /*#__PURE__*/_jsx(LeftChartContainer, {
|
|
170
|
+
powerData: data.power,
|
|
171
|
+
priceData: data.price,
|
|
172
|
+
profitAgentData: agentProfit,
|
|
173
|
+
profitManualData: manualProfit,
|
|
174
|
+
hasManualData: hasManualDataFlag,
|
|
175
|
+
filterValue: filterValue,
|
|
176
|
+
onFilterChange: setFilterValue,
|
|
177
|
+
loading: loading
|
|
178
|
+
})
|
|
179
|
+
});
|
|
180
|
+
$[10] = agentProfit;
|
|
181
|
+
$[11] = data.power;
|
|
182
|
+
$[12] = data.price;
|
|
183
|
+
$[13] = filterValue;
|
|
184
|
+
$[14] = hasManualDataFlag;
|
|
185
|
+
$[15] = loading;
|
|
186
|
+
$[16] = manualProfit;
|
|
187
|
+
$[17] = t7;
|
|
188
|
+
} else {
|
|
189
|
+
t7 = $[17];
|
|
190
|
+
}
|
|
191
|
+
let t8;
|
|
192
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
193
|
+
t8 = {
|
|
194
|
+
display: "flex",
|
|
195
|
+
flexDirection: "column",
|
|
196
|
+
height: "100%",
|
|
197
|
+
minHeight: 0,
|
|
198
|
+
gap: 16
|
|
199
|
+
};
|
|
200
|
+
$[18] = t8;
|
|
201
|
+
} else {
|
|
202
|
+
t8 = $[18];
|
|
203
|
+
}
|
|
204
|
+
let t9;
|
|
205
|
+
if ($[19] !== agentProfit || $[20] !== data.table || $[21] !== date || $[22] !== filterValue || $[23] !== hasManualDataFlag || $[24] !== loading || $[25] !== manualProfit || $[26] !== onExport) {
|
|
206
|
+
t9 = /*#__PURE__*/_jsx(Col, {
|
|
207
|
+
span: 12,
|
|
208
|
+
style: t8,
|
|
209
|
+
children: /*#__PURE__*/_jsx(RightSummaryContainer, {
|
|
210
|
+
data: data.table,
|
|
211
|
+
date: date,
|
|
212
|
+
hasManualData: hasManualDataFlag,
|
|
213
|
+
filterValue: filterValue,
|
|
214
|
+
loading: loading,
|
|
215
|
+
profitAgentData: agentProfit,
|
|
216
|
+
profitManualData: manualProfit,
|
|
217
|
+
onExport: onExport
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
$[19] = agentProfit;
|
|
221
|
+
$[20] = data.table;
|
|
222
|
+
$[21] = date;
|
|
223
|
+
$[22] = filterValue;
|
|
224
|
+
$[23] = hasManualDataFlag;
|
|
225
|
+
$[24] = loading;
|
|
226
|
+
$[25] = manualProfit;
|
|
227
|
+
$[26] = onExport;
|
|
228
|
+
$[27] = t9;
|
|
229
|
+
} else {
|
|
230
|
+
t9 = $[27];
|
|
231
|
+
}
|
|
232
|
+
let t10;
|
|
233
|
+
if ($[28] !== t7 || $[29] !== t9) {
|
|
234
|
+
t10 = /*#__PURE__*/_jsx(HighlightProvider, {
|
|
235
|
+
children: /*#__PURE__*/_jsxs(Row, {
|
|
236
|
+
gutter: 16,
|
|
237
|
+
style: t5,
|
|
238
|
+
children: [t7, t9]
|
|
239
|
+
})
|
|
240
|
+
});
|
|
241
|
+
$[28] = t7;
|
|
242
|
+
$[29] = t9;
|
|
243
|
+
$[30] = t10;
|
|
244
|
+
} else {
|
|
245
|
+
t10 = $[30];
|
|
246
|
+
}
|
|
247
|
+
let t11;
|
|
248
|
+
if ($[31] !== t10 || $[32] !== t4) {
|
|
249
|
+
t11 = /*#__PURE__*/_jsxs(ReviewPageLayout, {
|
|
250
|
+
children: [t4, t10]
|
|
251
|
+
});
|
|
252
|
+
$[31] = t10;
|
|
253
|
+
$[32] = t4;
|
|
254
|
+
$[33] = t11;
|
|
255
|
+
} else {
|
|
256
|
+
t11 = $[33];
|
|
257
|
+
}
|
|
258
|
+
return t11;
|
|
259
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FilterOption, PricePlotValue, ProfitPlotValue, StrategyPlotValue } from "../types/dayahead";
|
|
2
|
+
declare const LeftChartContainer: ({ powerData, priceData, profitAgentData, profitManualData, hasManualData, filterValue, onFilterChange, loading, }: {
|
|
3
|
+
powerData: StrategyPlotValue[];
|
|
4
|
+
priceData: PricePlotValue[];
|
|
5
|
+
profitAgentData: ProfitPlotValue[];
|
|
6
|
+
profitManualData: ProfitPlotValue[];
|
|
7
|
+
hasManualData: boolean;
|
|
8
|
+
filterValue: FilterOption;
|
|
9
|
+
onFilterChange: (value: FilterOption) => void;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default LeftChartContainer;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Card, Flex, Radio } from "antd";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import FlexRowLayout from "#src/components/FlexRowLayout";
|
|
5
|
+
import { LoadingSection } from "#src/components/LoadingSection";
|
|
6
|
+
import PricePlot from "../components/PricePlot";
|
|
7
|
+
import ProfitBarChart from "../components/ProfitBarChart";
|
|
8
|
+
import StrategyPlot from "../components/StrategyPlot";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
+
const options = [{
|
|
11
|
+
label: "全部",
|
|
12
|
+
value: "all"
|
|
13
|
+
}, {
|
|
14
|
+
label: "智能体",
|
|
15
|
+
value: "agent"
|
|
16
|
+
}, {
|
|
17
|
+
label: "人工",
|
|
18
|
+
value: "manual"
|
|
19
|
+
}];
|
|
20
|
+
const Header = /*#__PURE__*/memo(function Header(t0) {
|
|
21
|
+
const $ = _c(7);
|
|
22
|
+
const {
|
|
23
|
+
filterValue,
|
|
24
|
+
onFilterChange
|
|
25
|
+
} = t0;
|
|
26
|
+
let t1;
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29
|
+
t1 = /*#__PURE__*/_jsx("div", {
|
|
30
|
+
style: {
|
|
31
|
+
flex: 1,
|
|
32
|
+
minHeight: 0,
|
|
33
|
+
fontSize: "1.25rem",
|
|
34
|
+
fontWeight: 500
|
|
35
|
+
},
|
|
36
|
+
children: "\u6570\u636E\u56FE\u8868"
|
|
37
|
+
});
|
|
38
|
+
t2 = {
|
|
39
|
+
flexBasis: "50%"
|
|
40
|
+
};
|
|
41
|
+
$[0] = t1;
|
|
42
|
+
$[1] = t2;
|
|
43
|
+
} else {
|
|
44
|
+
t1 = $[0];
|
|
45
|
+
t2 = $[1];
|
|
46
|
+
}
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[2] !== onFilterChange) {
|
|
49
|
+
t3 = e => onFilterChange(e.target.value);
|
|
50
|
+
$[2] = onFilterChange;
|
|
51
|
+
$[3] = t3;
|
|
52
|
+
} else {
|
|
53
|
+
t3 = $[3];
|
|
54
|
+
}
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[4] !== filterValue || $[5] !== t3) {
|
|
57
|
+
t4 = /*#__PURE__*/_jsxs(FlexRowLayout, {
|
|
58
|
+
children: [t1, /*#__PURE__*/_jsx("div", {
|
|
59
|
+
style: t2,
|
|
60
|
+
children: /*#__PURE__*/_jsx(Flex, {
|
|
61
|
+
vertical: true,
|
|
62
|
+
gap: "middle",
|
|
63
|
+
children: /*#__PURE__*/_jsx(Radio.Group, {
|
|
64
|
+
block: true,
|
|
65
|
+
options: options,
|
|
66
|
+
value: filterValue,
|
|
67
|
+
onChange: t3,
|
|
68
|
+
optionType: "button"
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
$[4] = filterValue;
|
|
74
|
+
$[5] = t3;
|
|
75
|
+
$[6] = t4;
|
|
76
|
+
} else {
|
|
77
|
+
t4 = $[6];
|
|
78
|
+
}
|
|
79
|
+
return t4;
|
|
80
|
+
});
|
|
81
|
+
const LeftChartContainer = t0 => {
|
|
82
|
+
const $ = _c(18);
|
|
83
|
+
const {
|
|
84
|
+
powerData,
|
|
85
|
+
priceData,
|
|
86
|
+
profitAgentData,
|
|
87
|
+
profitManualData,
|
|
88
|
+
hasManualData,
|
|
89
|
+
filterValue,
|
|
90
|
+
onFilterChange,
|
|
91
|
+
loading: t1
|
|
92
|
+
} = t0;
|
|
93
|
+
const loading = t1 === undefined ? false : t1;
|
|
94
|
+
let t2;
|
|
95
|
+
let t3;
|
|
96
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
97
|
+
t2 = {
|
|
98
|
+
flex: 1,
|
|
99
|
+
minHeight: 0,
|
|
100
|
+
display: "flex",
|
|
101
|
+
flexDirection: "column",
|
|
102
|
+
gap: 16,
|
|
103
|
+
border: 0
|
|
104
|
+
};
|
|
105
|
+
t3 = {
|
|
106
|
+
body: {
|
|
107
|
+
padding: 16,
|
|
108
|
+
display: "flex",
|
|
109
|
+
flexDirection: "column",
|
|
110
|
+
gap: 16,
|
|
111
|
+
flex: 1,
|
|
112
|
+
minHeight: 0
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
$[0] = t2;
|
|
116
|
+
$[1] = t3;
|
|
117
|
+
} else {
|
|
118
|
+
t2 = $[0];
|
|
119
|
+
t3 = $[1];
|
|
120
|
+
}
|
|
121
|
+
let t4;
|
|
122
|
+
if ($[2] !== filterValue || $[3] !== hasManualData || $[4] !== loading || $[5] !== onFilterChange) {
|
|
123
|
+
t4 = hasManualData && !loading && /*#__PURE__*/_jsx("div", {
|
|
124
|
+
style: {
|
|
125
|
+
flexGrow: 0,
|
|
126
|
+
minHeight: 0,
|
|
127
|
+
flexBasis: "3%"
|
|
128
|
+
},
|
|
129
|
+
children: /*#__PURE__*/_jsx(Header, {
|
|
130
|
+
filterValue: filterValue,
|
|
131
|
+
onFilterChange: onFilterChange
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
$[2] = filterValue;
|
|
135
|
+
$[3] = hasManualData;
|
|
136
|
+
$[4] = loading;
|
|
137
|
+
$[5] = onFilterChange;
|
|
138
|
+
$[6] = t4;
|
|
139
|
+
} else {
|
|
140
|
+
t4 = $[6];
|
|
141
|
+
}
|
|
142
|
+
let t5;
|
|
143
|
+
if ($[7] !== filterValue || $[8] !== hasManualData || $[9] !== loading || $[10] !== powerData || $[11] !== priceData || $[12] !== profitAgentData || $[13] !== profitManualData) {
|
|
144
|
+
t5 = loading ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
145
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
146
|
+
style: {
|
|
147
|
+
flex: 1,
|
|
148
|
+
minHeight: 0
|
|
149
|
+
},
|
|
150
|
+
children: /*#__PURE__*/_jsx(LoadingSection, {
|
|
151
|
+
type: "chart",
|
|
152
|
+
height: "100%"
|
|
153
|
+
})
|
|
154
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
155
|
+
style: {
|
|
156
|
+
flex: 1,
|
|
157
|
+
minHeight: 0
|
|
158
|
+
},
|
|
159
|
+
children: /*#__PURE__*/_jsx(LoadingSection, {
|
|
160
|
+
type: "chart",
|
|
161
|
+
height: "100%"
|
|
162
|
+
})
|
|
163
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
164
|
+
style: {
|
|
165
|
+
flex: 1,
|
|
166
|
+
minHeight: 0
|
|
167
|
+
},
|
|
168
|
+
children: /*#__PURE__*/_jsx(LoadingSection, {
|
|
169
|
+
type: "chart",
|
|
170
|
+
height: "100%"
|
|
171
|
+
})
|
|
172
|
+
})]
|
|
173
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
174
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
175
|
+
style: {
|
|
176
|
+
flex: 1,
|
|
177
|
+
minHeight: 0
|
|
178
|
+
},
|
|
179
|
+
children: /*#__PURE__*/_jsx(ProfitBarChart, {
|
|
180
|
+
agent_data: profitAgentData,
|
|
181
|
+
manual_data: profitManualData,
|
|
182
|
+
hasManualData: hasManualData,
|
|
183
|
+
filterValue: filterValue,
|
|
184
|
+
useUtc: false,
|
|
185
|
+
gridOption: {
|
|
186
|
+
left: 10,
|
|
187
|
+
top: 25
|
|
188
|
+
}
|
|
189
|
+
}, `profit-${filterValue}`)
|
|
190
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
191
|
+
style: {
|
|
192
|
+
flex: 1,
|
|
193
|
+
minHeight: 0
|
|
194
|
+
},
|
|
195
|
+
children: /*#__PURE__*/_jsx(StrategyPlot, {
|
|
196
|
+
data: powerData,
|
|
197
|
+
hasManualData: hasManualData,
|
|
198
|
+
filterValue: filterValue
|
|
199
|
+
}, `strategy-${filterValue}`)
|
|
200
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
201
|
+
style: {
|
|
202
|
+
flex: 1,
|
|
203
|
+
minHeight: 0
|
|
204
|
+
},
|
|
205
|
+
children: /*#__PURE__*/_jsx(PricePlot, {
|
|
206
|
+
data: priceData
|
|
207
|
+
})
|
|
208
|
+
})]
|
|
209
|
+
});
|
|
210
|
+
$[7] = filterValue;
|
|
211
|
+
$[8] = hasManualData;
|
|
212
|
+
$[9] = loading;
|
|
213
|
+
$[10] = powerData;
|
|
214
|
+
$[11] = priceData;
|
|
215
|
+
$[12] = profitAgentData;
|
|
216
|
+
$[13] = profitManualData;
|
|
217
|
+
$[14] = t5;
|
|
218
|
+
} else {
|
|
219
|
+
t5 = $[14];
|
|
220
|
+
}
|
|
221
|
+
let t6;
|
|
222
|
+
if ($[15] !== t4 || $[16] !== t5) {
|
|
223
|
+
t6 = /*#__PURE__*/_jsxs(Card, {
|
|
224
|
+
style: t2,
|
|
225
|
+
styles: t3,
|
|
226
|
+
children: [t4, t5]
|
|
227
|
+
});
|
|
228
|
+
$[15] = t4;
|
|
229
|
+
$[16] = t5;
|
|
230
|
+
$[17] = t6;
|
|
231
|
+
} else {
|
|
232
|
+
t6 = $[17];
|
|
233
|
+
}
|
|
234
|
+
return t6;
|
|
235
|
+
};
|
|
236
|
+
export default LeftChartContainer;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Layout } from "antd";
|
|
3
|
+
import FlexColLayout from "#src/components/FlexColLayout";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const ReviewPageLayout = t0 => {
|
|
6
|
+
const $ = _c(3);
|
|
7
|
+
const {
|
|
8
|
+
children
|
|
9
|
+
} = t0;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12
|
+
t1 = {};
|
|
13
|
+
$[0] = t1;
|
|
14
|
+
} else {
|
|
15
|
+
t1 = $[0];
|
|
16
|
+
}
|
|
17
|
+
let t2;
|
|
18
|
+
if ($[1] !== children) {
|
|
19
|
+
t2 = /*#__PURE__*/_jsx(Layout.Content, {
|
|
20
|
+
style: t1,
|
|
21
|
+
children: /*#__PURE__*/_jsx(FlexColLayout, {
|
|
22
|
+
children: children
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
$[1] = children;
|
|
26
|
+
$[2] = t2;
|
|
27
|
+
} else {
|
|
28
|
+
t2 = $[2];
|
|
29
|
+
}
|
|
30
|
+
return t2;
|
|
31
|
+
};
|
|
32
|
+
export default ReviewPageLayout;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Dayjs } from "dayjs";
|
|
2
|
+
import type { ExtendedReviewValue, FilterOption, ProfitPlotValue } from "../types/dayahead";
|
|
3
|
+
interface RightSummaryContainerProps {
|
|
4
|
+
data: ExtendedReviewValue[];
|
|
5
|
+
date: Dayjs;
|
|
6
|
+
hasManualData: boolean;
|
|
7
|
+
filterValue: FilterOption;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
profitAgentData?: ProfitPlotValue[];
|
|
10
|
+
profitManualData?: ProfitPlotValue[];
|
|
11
|
+
onExport?: (data: ExtendedReviewValue[], date: string, filename: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const RightSummaryContainer: ({ data, date, hasManualData, filterValue, loading, profitAgentData, profitManualData, onExport, }: RightSummaryContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default RightSummaryContainer;
|