evui 3.4.207 → 3.4.208
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 +18 -33
- package/dist/404.html +44 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.js +22645 -0
- package/dist/index.umd.cjs +28 -0
- package/dist/style.css +1 -0
- package/package.json +46 -43
- package/dist/evui.common.js +0 -63681
- package/dist/evui.common.js.map +0 -1
- package/dist/evui.umd.js +0 -63691
- package/dist/evui.umd.js.map +0 -1
- package/dist/evui.umd.min.js +0 -2
- package/dist/evui.umd.min.js.map +0 -1
- package/dist/img/EVUI.b82ee81a.svg +0 -293
- package/src/assets/logo.png +0 -0
- package/src/common/emitter.js +0 -20
- package/src/common/utils.bignumber.js +0 -67
- package/src/common/utils.debounce.js +0 -223
- package/src/common/utils.js +0 -151
- package/src/common/utils.table.js +0 -78
- package/src/common/utils.throttle.js +0 -83
- package/src/common/utils.tree.js +0 -18
- package/src/components/button/Button.vue +0 -195
- package/src/components/button/index.js +0 -7
- package/src/components/buttonGroup/ButtonGroup.vue +0 -11
- package/src/components/buttonGroup/index.js +0 -7
- package/src/components/calendar/Calendar.vue +0 -725
- package/src/components/calendar/index.js +0 -7
- package/src/components/calendar/uses.js +0 -1410
- package/src/components/chart/Chart.vue +0 -363
- package/src/components/chart/ChartToolbar.vue +0 -52
- package/src/components/chart/chart.core.js +0 -1170
- package/src/components/chart/chartZoom.core.js +0 -540
- package/src/components/chart/element/element.bar.js +0 -672
- package/src/components/chart/element/element.bar.time.js +0 -166
- package/src/components/chart/element/element.heatmap.js +0 -743
- package/src/components/chart/element/element.line.js +0 -611
- package/src/components/chart/element/element.pie.js +0 -197
- package/src/components/chart/element/element.scatter.js +0 -320
- package/src/components/chart/element/element.tip.js +0 -717
- package/src/components/chart/helpers/helpers.canvas.js +0 -265
- package/src/components/chart/helpers/helpers.constant.js +0 -235
- package/src/components/chart/helpers/helpers.util.js +0 -400
- package/src/components/chart/index.js +0 -9
- package/src/components/chart/model/index.js +0 -50
- package/src/components/chart/model/model.series.js +0 -125
- package/src/components/chart/model/model.store.js +0 -1427
- package/src/components/chart/plugins/plugins.interaction.js +0 -1659
- package/src/components/chart/plugins/plugins.legend.gradient.js +0 -606
- package/src/components/chart/plugins/plugins.legend.js +0 -1543
- package/src/components/chart/plugins/plugins.pie.js +0 -254
- package/src/components/chart/plugins/plugins.scrollbar.js +0 -732
- package/src/components/chart/plugins/plugins.title.js +0 -61
- package/src/components/chart/plugins/plugins.tooltip.js +0 -1041
- package/src/components/chart/scale/scale.js +0 -951
- package/src/components/chart/scale/scale.linear.js +0 -268
- package/src/components/chart/scale/scale.logarithmic.js +0 -135
- package/src/components/chart/scale/scale.step.js +0 -430
- package/src/components/chart/scale/scale.time.category.js +0 -338
- package/src/components/chart/scale/scale.time.js +0 -49
- package/src/components/chart/style/chart.scss +0 -405
- package/src/components/chart/uses.js +0 -721
- package/src/components/chartBrush/ChartBrush.vue +0 -323
- package/src/components/chartBrush/chartBrush.core.js +0 -691
- package/src/components/chartBrush/index.js +0 -9
- package/src/components/chartBrush/uses.js +0 -23
- package/src/components/chartGroup/ChartGroup.vue +0 -144
- package/src/components/chartGroup/index.js +0 -9
- package/src/components/chartGroup/style/chartGroup.scss +0 -5
- package/src/components/chartGroup/uses.js +0 -53
- package/src/components/checkbox/Checkbox.vue +0 -229
- package/src/components/checkbox/index.js +0 -7
- package/src/components/checkboxGroup/CheckboxGroup.vue +0 -44
- package/src/components/checkboxGroup/index.js +0 -7
- package/src/components/contextMenu/ContextMenu.vue +0 -95
- package/src/components/contextMenu/MenuList.vue +0 -182
- package/src/components/contextMenu/index.js +0 -7
- package/src/components/contextMenu/uses.js +0 -223
- package/src/components/datePicker/DatePicker.vue +0 -504
- package/src/components/datePicker/index.js +0 -7
- package/src/components/datePicker/uses.js +0 -460
- package/src/components/grid/Grid.vue +0 -1535
- package/src/components/grid/GridColumnSetting.vue +0 -358
- package/src/components/grid/GridFilterSetting.vue +0 -323
- package/src/components/grid/GridPagination.vue +0 -75
- package/src/components/grid/GridSummary.vue +0 -314
- package/src/components/grid/GridToolbar.vue +0 -35
- package/src/components/grid/icon/icon-option-button.vue +0 -17
- package/src/components/grid/icon/icon-sort-button.vue +0 -67
- package/src/components/grid/index.js +0 -11
- package/src/components/grid/style/grid.scss +0 -417
- package/src/components/grid/uses.js +0 -1629
- package/src/components/icon/Icon.vue +0 -53
- package/src/components/icon/index.js +0 -8
- package/src/components/inputNumber/InputNumber.vue +0 -212
- package/src/components/inputNumber/index.js +0 -7
- package/src/components/inputNumber/uses.js +0 -217
- package/src/components/loading/Loading.vue +0 -125
- package/src/components/loading/index.js +0 -7
- package/src/components/menu/Menu.vue +0 -79
- package/src/components/menu/MenuItem.vue +0 -201
- package/src/components/menu/index.js +0 -7
- package/src/components/message/Message.vue +0 -229
- package/src/components/message/index.js +0 -34
- package/src/components/messageBox/MessageBox.vue +0 -358
- package/src/components/messageBox/index.js +0 -22
- package/src/components/notification/Notification.vue +0 -316
- package/src/components/notification/index.js +0 -49
- package/src/components/pagination/Pagination.vue +0 -317
- package/src/components/pagination/index.js +0 -7
- package/src/components/pagination/pageButton.vue +0 -31
- package/src/components/progress/Progress.vue +0 -139
- package/src/components/progress/index.js +0 -7
- package/src/components/radio/Radio.vue +0 -159
- package/src/components/radio/index.js +0 -7
- package/src/components/radioGroup/RadioGroup.vue +0 -41
- package/src/components/radioGroup/index.js +0 -7
- package/src/components/scheduler/Scheduler.vue +0 -149
- package/src/components/scheduler/index.js +0 -7
- package/src/components/scheduler/uses.js +0 -183
- package/src/components/select/Select.vue +0 -556
- package/src/components/select/index.js +0 -7
- package/src/components/select/uses.js +0 -379
- package/src/components/slider/Slider.vue +0 -505
- package/src/components/slider/index.js +0 -7
- package/src/components/slider/uses.js +0 -391
- package/src/components/tabPanel/TabPanel.vue +0 -74
- package/src/components/tabPanel/index.js +0 -7
- package/src/components/tabs/Tabs.vue +0 -517
- package/src/components/tabs/index.js +0 -7
- package/src/components/textField/TextField.vue +0 -399
- package/src/components/textField/index.js +0 -7
- package/src/components/timePicker/TimePicker.vue +0 -364
- package/src/components/timePicker/index.js +0 -7
- package/src/components/toggle/Toggle.vue +0 -115
- package/src/components/toggle/index.js +0 -7
- package/src/components/tree/Tree.vue +0 -338
- package/src/components/tree/TreeNode.vue +0 -293
- package/src/components/tree/index.js +0 -7
- package/src/components/treeGrid/TreeGrid.vue +0 -1074
- package/src/components/treeGrid/TreeGridNode.vue +0 -349
- package/src/components/treeGrid/TreeGridToolbar.vue +0 -35
- package/src/components/treeGrid/icon/icon-tree.png +0 -0
- package/src/components/treeGrid/index.js +0 -9
- package/src/components/treeGrid/style/treeGrid.scss +0 -277
- package/src/components/treeGrid/uses.js +0 -1178
- package/src/components/window/Window.vue +0 -329
- package/src/components/window/index.js +0 -7
- package/src/components/window/uses.js +0 -908
- package/src/directives/clickoutside.js +0 -90
- package/src/main.js +0 -120
- package/src/style/components/input.scss +0 -108
- package/src/style/functions.scss +0 -3
- package/src/style/index.scss +0 -6
- package/src/style/lib/fonts/EVUI.eot +0 -0
- package/src/style/lib/fonts/EVUI.svg +0 -293
- package/src/style/lib/fonts/EVUI.ttf +0 -0
- package/src/style/lib/fonts/EVUI.woff +0 -0
- package/src/style/lib/icon.css +0 -888
- package/src/style/mixins.scss +0 -94
- package/src/style/themes.scss +0 -69
- package/src/style/variables.scss +0 -22
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="evChartBrushOptions.show"
|
|
4
|
-
ref="evChartBrushRef"
|
|
5
|
-
v-resize="onResize"
|
|
6
|
-
:style="evChartBrushStyle"
|
|
7
|
-
class="ev-chart-brush"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import {
|
|
13
|
-
inject,
|
|
14
|
-
watch,
|
|
15
|
-
ref,
|
|
16
|
-
computed,
|
|
17
|
-
onMounted,
|
|
18
|
-
onBeforeUnmount,
|
|
19
|
-
onDeactivated,
|
|
20
|
-
onActivated,
|
|
21
|
-
onUpdated,
|
|
22
|
-
} from 'vue';
|
|
23
|
-
import { cloneDeep, debounce, isEqual } from 'lodash-es';
|
|
24
|
-
import EvChart from '../chart/chart.core';
|
|
25
|
-
import { useModel, useWrapper } from '../chart/uses';
|
|
26
|
-
import EvChartBrush from './chartBrush.core';
|
|
27
|
-
import { useBrushModel } from './uses';
|
|
28
|
-
|
|
29
|
-
export default {
|
|
30
|
-
name: 'EvChartBrush',
|
|
31
|
-
props: {
|
|
32
|
-
options: {
|
|
33
|
-
type: Object,
|
|
34
|
-
default: () => ({}),
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
setup(props) {
|
|
38
|
-
let evChart = null;
|
|
39
|
-
let evChartBrush = null;
|
|
40
|
-
|
|
41
|
-
const isMounted = ref(false);
|
|
42
|
-
const injectEvChartClone = inject('evChartClone', { data: [] });
|
|
43
|
-
const injectEvChartInfo = inject('evChartInfo', { props: { options: [] } });
|
|
44
|
-
const injectBrushIdx = inject('brushIdx', {
|
|
45
|
-
start: 0,
|
|
46
|
-
end: -1,
|
|
47
|
-
isUseButton: false,
|
|
48
|
-
isUseScroll: false,
|
|
49
|
-
});
|
|
50
|
-
const injectBrushSeries = inject('brushSeries', { list: [], chartIdx: null });
|
|
51
|
-
|
|
52
|
-
const {
|
|
53
|
-
getNormalizedBrushOptions,
|
|
54
|
-
} = useBrushModel();
|
|
55
|
-
|
|
56
|
-
const evChartBrushOptions = computed(() => getNormalizedBrushOptions(props.options));
|
|
57
|
-
|
|
58
|
-
const {
|
|
59
|
-
eventListeners,
|
|
60
|
-
selectItemInfo,
|
|
61
|
-
selectLabelInfo,
|
|
62
|
-
selectSeriesInfo,
|
|
63
|
-
getNormalizedData,
|
|
64
|
-
getNormalizedOptions,
|
|
65
|
-
} = useModel();
|
|
66
|
-
|
|
67
|
-
const evChartData = computed(() => getNormalizedData(
|
|
68
|
-
(injectEvChartClone.data ?? [])[evChartBrushOptions.value.chartIdx]),
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
const evChartOption = computed(() => {
|
|
72
|
-
const chartOption = injectEvChartInfo.props.options[evChartBrushOptions.value.chartIdx];
|
|
73
|
-
|
|
74
|
-
const option = {
|
|
75
|
-
...chartOption,
|
|
76
|
-
brush: {
|
|
77
|
-
use: true,
|
|
78
|
-
...evChartBrushOptions.value,
|
|
79
|
-
},
|
|
80
|
-
height: evChartBrushOptions.value.height,
|
|
81
|
-
zoom: {
|
|
82
|
-
use: false,
|
|
83
|
-
},
|
|
84
|
-
dragSelection: {
|
|
85
|
-
use: false,
|
|
86
|
-
},
|
|
87
|
-
title: {
|
|
88
|
-
show: false,
|
|
89
|
-
},
|
|
90
|
-
tooltip: {
|
|
91
|
-
use: false,
|
|
92
|
-
},
|
|
93
|
-
legend: {
|
|
94
|
-
show: false,
|
|
95
|
-
},
|
|
96
|
-
selectLabel: {
|
|
97
|
-
use: false,
|
|
98
|
-
},
|
|
99
|
-
selectSeries: {
|
|
100
|
-
use: false,
|
|
101
|
-
},
|
|
102
|
-
axesX: [{
|
|
103
|
-
...chartOption?.axesX?.[0],
|
|
104
|
-
title: {
|
|
105
|
-
use: false,
|
|
106
|
-
},
|
|
107
|
-
}],
|
|
108
|
-
axesY: [{
|
|
109
|
-
...chartOption?.axesY?.[0],
|
|
110
|
-
title: {
|
|
111
|
-
use: false,
|
|
112
|
-
},
|
|
113
|
-
}],
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
return getNormalizedOptions(option);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
const {
|
|
120
|
-
wrapper: evChartBrushRef,
|
|
121
|
-
wrapperStyle: evChartBrushStyle,
|
|
122
|
-
} = useWrapper(
|
|
123
|
-
evChartOption.value,
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
watch(() => injectBrushSeries.list, () => {
|
|
127
|
-
if (
|
|
128
|
-
evChartBrushRef.value
|
|
129
|
-
&& injectBrushSeries.chartIdx === evChartBrushOptions.value.chartIdx
|
|
130
|
-
) {
|
|
131
|
-
evChart.seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
132
|
-
|
|
133
|
-
evChart.update({
|
|
134
|
-
updateSeries: false,
|
|
135
|
-
updateSelTip: { update: false, keepDomain: false },
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
watch(evChartOption, (newOpt, prevOpt) => {
|
|
141
|
-
if (newOpt.brush.chartIdx <= injectEvChartClone.data?.length - 1) {
|
|
142
|
-
if (evChartBrush && !isEqual(prevOpt.brush, newOpt.brush)) {
|
|
143
|
-
evChartBrush.removeBrushWrapper();
|
|
144
|
-
} else if (evChart && !isEqual(newOpt, prevOpt)) {
|
|
145
|
-
evChart.options = cloneDeep(newOpt);
|
|
146
|
-
|
|
147
|
-
evChart.update({
|
|
148
|
-
updateSeries: false,
|
|
149
|
-
updateSelTip: { update: false, keepDomain: false },
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
} else {
|
|
153
|
-
evChart.data = cloneDeep(evChartData.value);
|
|
154
|
-
|
|
155
|
-
evChart.update({
|
|
156
|
-
updateSeries: true,
|
|
157
|
-
updateSelTip: { update: false, keepDomain: false },
|
|
158
|
-
updateData: false,
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
evChartBrush.removeBrushCanvas();
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
watch(() => injectEvChartClone.data, (newData) => {
|
|
166
|
-
if (evChart) {
|
|
167
|
-
const data = newData[evChartBrushOptions.value.chartIdx];
|
|
168
|
-
|
|
169
|
-
if (data) {
|
|
170
|
-
const isUpdateSeries = !isEqual(data.series, evChart.data.series);
|
|
171
|
-
|
|
172
|
-
const seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
173
|
-
|
|
174
|
-
if (typeof seriesList === 'object' && Object.keys(seriesList).length) {
|
|
175
|
-
Object.keys(data.series).forEach((series) => {
|
|
176
|
-
if (!('show' in data.series[series])) {
|
|
177
|
-
data.series[series].show = seriesList[series]?.show ?? true;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
evChart.data = cloneDeep(data);
|
|
183
|
-
|
|
184
|
-
evChart.update({
|
|
185
|
-
updateSeries: isUpdateSeries,
|
|
186
|
-
updateSelTip: { update: false, keepDomain: false },
|
|
187
|
-
updateData: false,
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
const createChart = () => {
|
|
194
|
-
let selected;
|
|
195
|
-
if (evChartOption.value.selectLabel.use) {
|
|
196
|
-
selected = selectLabelInfo;
|
|
197
|
-
} else if (evChartOption.value.selectSeries.use) {
|
|
198
|
-
selected = selectSeriesInfo;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
evChart = new EvChart(
|
|
202
|
-
evChartBrushRef.value,
|
|
203
|
-
evChartData.value,
|
|
204
|
-
evChartOption.value,
|
|
205
|
-
eventListeners,
|
|
206
|
-
selectItemInfo,
|
|
207
|
-
selected,
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
const createChartBrush = () => {
|
|
212
|
-
evChartBrush = new EvChartBrush(
|
|
213
|
-
evChart,
|
|
214
|
-
evChartData,
|
|
215
|
-
evChartBrushOptions,
|
|
216
|
-
injectBrushIdx,
|
|
217
|
-
evChartBrushRef,
|
|
218
|
-
);
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
const drawChart = () => {
|
|
222
|
-
if (evChart) {
|
|
223
|
-
evChart.init();
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
const drawChartBrush = (isResize) => {
|
|
228
|
-
if (evChartBrush) {
|
|
229
|
-
evChartBrush.init(isResize);
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
watch(() => [injectBrushIdx.start, injectBrushIdx.end], () => {
|
|
234
|
-
if (
|
|
235
|
-
evChartBrushRef.value
|
|
236
|
-
&& evChartBrushOptions.value.chartIdx <= injectEvChartClone.data?.length - 1
|
|
237
|
-
) {
|
|
238
|
-
drawChartBrush();
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
onMounted(async () => {
|
|
243
|
-
if (evChartBrushOptions.value.show) {
|
|
244
|
-
await createChart();
|
|
245
|
-
await drawChart();
|
|
246
|
-
createChartBrush();
|
|
247
|
-
drawChartBrush();
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
isMounted.value = true;
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
onUpdated(async () => {
|
|
254
|
-
if (evChartBrushOptions.value.show) {
|
|
255
|
-
if (evChartBrushOptions.value.chartIdx <= injectEvChartClone.data?.length - 1) {
|
|
256
|
-
const seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
257
|
-
|
|
258
|
-
if (typeof seriesList === 'object' && Object.keys(seriesList).length) {
|
|
259
|
-
Object.keys(evChartData.value.series).forEach((series) => {
|
|
260
|
-
if (!('show' in evChartData.value.series[series])) {
|
|
261
|
-
evChartData.value.series[series].show = seriesList[series]?.show ?? true;
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
await createChart();
|
|
267
|
-
await drawChart();
|
|
268
|
-
createChartBrush();
|
|
269
|
-
drawChartBrush();
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
onBeforeUnmount(() => {
|
|
275
|
-
if (evChart && 'destroy' in evChart) {
|
|
276
|
-
evChart.destroy();
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
if (evChartBrush) {
|
|
280
|
-
evChartBrush.destroy();
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
isMounted.value = false;
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
onDeactivated(() => {
|
|
287
|
-
if (evChart && 'hideTooltip' in evChart) {
|
|
288
|
-
evChart.hideTooltip();
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* @param {boolean} isResizeDone resizing complete status
|
|
294
|
-
*
|
|
295
|
-
* @returns {undefined}
|
|
296
|
-
*/
|
|
297
|
-
const onResize = debounce(() => {
|
|
298
|
-
if (evChart && 'resize' in evChart) {
|
|
299
|
-
const resize = new Promise(resolve => evChart.resize(resolve));
|
|
300
|
-
|
|
301
|
-
resize.then((isResizeDone) => {
|
|
302
|
-
if (isResizeDone) {
|
|
303
|
-
drawChartBrush(isResizeDone);
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
}, 0);
|
|
308
|
-
|
|
309
|
-
onActivated(() => {
|
|
310
|
-
if (isMounted.value) {
|
|
311
|
-
onResize();
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
return {
|
|
316
|
-
evChartBrushOptions,
|
|
317
|
-
evChartBrushRef,
|
|
318
|
-
evChartBrushStyle,
|
|
319
|
-
onResize,
|
|
320
|
-
};
|
|
321
|
-
},
|
|
322
|
-
};
|
|
323
|
-
</script>
|