evui 3.5.0 → 3.5.2
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/index.js +23148 -0
- package/dist/index.umd.cjs +28 -0
- package/package.json +5 -11
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/common/utils.bignumber.js +0 -23
- package/dist/common/utils.debounce.js +0 -66
- package/dist/common/utils.js +0 -64
- package/dist/common/utils.throttle.js +0 -15
- package/dist/components/button/Button.vue.js +0 -65
- package/dist/components/button/index.js +0 -7
- package/dist/components/buttonGroup/ButtonGroup.vue.js +0 -14
- package/dist/components/buttonGroup/index.js +0 -7
- package/dist/components/calendar/Calendar.vue.js +0 -299
- package/dist/components/calendar/index.js +0 -7
- package/dist/components/calendar/uses.js +0 -579
- package/dist/components/chart/Chart.vue.js +0 -261
- package/dist/components/chart/ChartToolbar.vue.js +0 -32
- package/dist/components/chart/chart.core.js +0 -738
- package/dist/components/chart/chartZoom.core.js +0 -221
- package/dist/components/chart/element/element.bar.js +0 -358
- package/dist/components/chart/element/element.bar.time.js +0 -55
- package/dist/components/chart/element/element.heatmap.js +0 -403
- package/dist/components/chart/element/element.line.js +0 -292
- package/dist/components/chart/element/element.pie.js +0 -73
- package/dist/components/chart/element/element.scatter.js +0 -209
- package/dist/components/chart/element/element.tip.js +0 -312
- package/dist/components/chart/helpers/helpers.canvas.js +0 -141
- package/dist/components/chart/helpers/helpers.constant.js +0 -253
- package/dist/components/chart/helpers/helpers.util.js +0 -265
- package/dist/components/chart/index.js +0 -7
- package/dist/components/chart/model/index.js +0 -6
- package/dist/components/chart/model/model.series.js +0 -82
- package/dist/components/chart/model/model.store.js +0 -650
- package/dist/components/chart/plugins/plugins.interaction.js +0 -823
- package/dist/components/chart/plugins/plugins.legend.gradient.js +0 -281
- package/dist/components/chart/plugins/plugins.legend.js +0 -665
- package/dist/components/chart/plugins/plugins.pie.js +0 -86
- package/dist/components/chart/plugins/plugins.scrollbar.js +0 -345
- package/dist/components/chart/plugins/plugins.title.js +0 -43
- package/dist/components/chart/plugins/plugins.tooltip.js +0 -508
- package/dist/components/chart/scale/scale.js +0 -492
- package/dist/components/chart/scale/scale.linear.js +0 -248
- package/dist/components/chart/scale/scale.logarithmic.js +0 -82
- package/dist/components/chart/scale/scale.step.js +0 -227
- package/dist/components/chart/scale/scale.time.category.js +0 -148
- package/dist/components/chart/scale/scale.time.js +0 -95
- package/dist/components/chart/uses.js +0 -479
- package/dist/components/chartBrush/ChartBrush.vue.js +0 -198
- package/dist/components/chartBrush/chartBrush.core.js +0 -265
- package/dist/components/chartBrush/index.js +0 -7
- package/dist/components/chartBrush/uses.js +0 -18
- package/dist/components/chartGroup/ChartGroup.vue.js +0 -128
- package/dist/components/chartGroup/index.js +0 -7
- package/dist/components/chartGroup/uses.js +0 -47
- package/dist/components/checkbox/Checkbox.vue.js +0 -99
- package/dist/components/checkbox/index.js +0 -7
- package/dist/components/checkboxGroup/CheckboxGroup.vue.js +0 -40
- package/dist/components/checkboxGroup/index.js +0 -7
- package/dist/components/contextMenu/ContextMenu.vue.js +0 -70
- package/dist/components/contextMenu/MenuList.vue.js +0 -105
- package/dist/components/contextMenu/index.js +0 -7
- package/dist/components/contextMenu/uses.js +0 -79
- package/dist/components/datePicker/DatePicker.vue.js +0 -310
- package/dist/components/datePicker/index.js +0 -7
- package/dist/components/datePicker/uses.js +0 -190
- package/dist/components/grid/Grid.vue.js +0 -1261
- package/dist/components/grid/GridColumnSetting.vue.js +0 -212
- package/dist/components/grid/GridFilterSetting.vue.js +0 -222
- package/dist/components/grid/GridPagination.vue.js +0 -69
- package/dist/components/grid/GridSummary.vue.js +0 -186
- package/dist/components/grid/GridToolbar.vue.js +0 -15
- package/dist/components/grid/icon/icon-option-button.vue.js +0 -39
- package/dist/components/grid/icon/icon-sort-button.vue.js +0 -56
- package/dist/components/grid/index.js +0 -7
- package/dist/components/grid/uses.js +0 -697
- package/dist/components/icon/Icon.vue.js +0 -50
- package/dist/components/icon/index.js +0 -8
- package/dist/components/inputNumber/InputNumber.vue.js +0 -112
- package/dist/components/inputNumber/index.js +0 -7
- package/dist/components/inputNumber/uses.js +0 -76
- package/dist/components/loading/Loading.vue.js +0 -78
- package/dist/components/loading/index.js +0 -7
- package/dist/components/menu/Menu.vue.js +0 -66
- package/dist/components/menu/MenuItem.vue.js +0 -125
- package/dist/components/menu/index.js +0 -7
- package/dist/components/message/Message.vue.js +0 -122
- package/dist/components/message/index.js +0 -16
- package/dist/components/messageBox/MessageBox.vue.js +0 -216
- package/dist/components/messageBox/index.js +0 -13
- package/dist/components/notification/Notification.vue.js +0 -140
- package/dist/components/notification/index.js +0 -23
- package/dist/components/pagination/Pagination.vue.js +0 -215
- package/dist/components/pagination/index.js +0 -7
- package/dist/components/pagination/pageButton.vue.js +0 -35
- package/dist/components/progress/Progress.vue.js +0 -88
- package/dist/components/progress/index.js +0 -7
- package/dist/components/radio/Radio.vue.js +0 -75
- package/dist/components/radio/index.js +0 -7
- package/dist/components/radioGroup/RadioGroup.vue.js +0 -37
- package/dist/components/radioGroup/index.js +0 -7
- package/dist/components/scheduler/Scheduler.vue.js +0 -128
- package/dist/components/scheduler/index.js +0 -7
- package/dist/components/scheduler/uses.js +0 -73
- package/dist/components/select/Select.vue.js +0 -381
- package/dist/components/select/index.js +0 -7
- package/dist/components/select/uses.js +0 -147
- package/dist/components/slider/Slider.vue.js +0 -243
- package/dist/components/slider/index.js +0 -7
- package/dist/components/slider/uses.js +0 -188
- package/dist/components/tabPanel/TabPanel.vue.js +0 -39
- package/dist/components/tabPanel/index.js +0 -7
- package/dist/components/tabs/Tabs.vue.js +0 -220
- package/dist/components/tabs/index.js +0 -7
- package/dist/components/textField/TextField.vue.js +0 -209
- package/dist/components/textField/index.js +0 -7
- package/dist/components/timePicker/TimePicker.vue.js +0 -227
- package/dist/components/timePicker/index.js +0 -7
- package/dist/components/toggle/Toggle.vue.js +0 -66
- package/dist/components/toggle/index.js +0 -7
- package/dist/components/tree/Tree.vue.js +0 -220
- package/dist/components/tree/TreeNode.vue.js +0 -146
- package/dist/components/tree/index.js +0 -7
- package/dist/components/treeGrid/TreeGrid.vue.js +0 -898
- package/dist/components/treeGrid/TreeGridNode.vue.js +0 -274
- package/dist/components/treeGrid/TreeGridToolbar.vue.js +0 -15
- package/dist/components/treeGrid/index.js +0 -7
- package/dist/components/treeGrid/uses.js +0 -497
- package/dist/components/window/Window.vue.js +0 -211
- package/dist/components/window/index.js +0 -7
- package/dist/components/window/uses.js +0 -345
- package/dist/directives/clickoutside.js +0 -47
- package/dist/main.js +0 -142
- package/dist/package.json.js +0 -4
- package/dist/resolver.js +0 -17
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import L from "dayjs";
|
|
2
|
-
import { TIME_INTERVALS as I } from "../helpers/helpers.constant.js";
|
|
3
|
-
import it from "./scale.js";
|
|
4
|
-
import M from "../helpers/helpers.util.js";
|
|
5
|
-
class rt extends it {
|
|
6
|
-
constructor(i, e, o, c, h) {
|
|
7
|
-
super(i, e, o), this.labels = c, this.options = h;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Transforming label by designated format
|
|
11
|
-
* @param {number} value label value
|
|
12
|
-
* @param {object} data data for formatting
|
|
13
|
-
*
|
|
14
|
-
* @returns {string} formatted label
|
|
15
|
-
*/
|
|
16
|
-
getLabelFormat(i, e = {}) {
|
|
17
|
-
if (this.formatter) {
|
|
18
|
-
const o = this.formatter(i, e);
|
|
19
|
-
if (typeof o == "string")
|
|
20
|
-
return o;
|
|
21
|
-
}
|
|
22
|
-
return L(i).format(this.timeFormat);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Calculate interval
|
|
26
|
-
* @param {object} range range information
|
|
27
|
-
*
|
|
28
|
-
* @returns {number} interval
|
|
29
|
-
*/
|
|
30
|
-
getInterval(i) {
|
|
31
|
-
const e = i.maxValue, o = i.minValue, c = i.maxSteps;
|
|
32
|
-
if (this.interval) {
|
|
33
|
-
if (typeof this.interval == "string")
|
|
34
|
-
return I[this.interval].size;
|
|
35
|
-
if (typeof this.interval == "object")
|
|
36
|
-
return this.interval.time * I[this.interval.unit].size;
|
|
37
|
-
if (typeof this.interval == "number")
|
|
38
|
-
return this.interval;
|
|
39
|
-
}
|
|
40
|
-
return Math.ceil((e - o) / c);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* With range information, calculate how many labels in axis
|
|
44
|
-
* @param {object} range min/max information
|
|
45
|
-
*
|
|
46
|
-
* @returns {object} steps, interval, min/max graph value
|
|
47
|
-
*/
|
|
48
|
-
calculateSteps(i) {
|
|
49
|
-
const { maxValue: e, minValue: o, maxSteps: c } = i, h = this.getInterval(i);
|
|
50
|
-
let t = h, m = o, l;
|
|
51
|
-
for (; m < e; )
|
|
52
|
-
m += t;
|
|
53
|
-
const d = m > e ? e : m, u = o, f = d - u;
|
|
54
|
-
l = Math.round(f / t) + 1;
|
|
55
|
-
const C = l;
|
|
56
|
-
for (e === 1 && (t = 0.2, l = 5); l > c; )
|
|
57
|
-
t *= 2, l = Math.round(f / t), t = Math.ceil(f / l);
|
|
58
|
-
return d - u > l * t && (t = Math.ceil((d - u) / l)), {
|
|
59
|
-
steps: l,
|
|
60
|
-
oriSteps: C,
|
|
61
|
-
interval: t,
|
|
62
|
-
rawInterval: h,
|
|
63
|
-
graphMin: u,
|
|
64
|
-
graphMax: d
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Draw axis
|
|
69
|
-
* @param {object} chartRect min/max information
|
|
70
|
-
* @param {object} labelOffset label offset information
|
|
71
|
-
* @param {object} stepInfo label steps information
|
|
72
|
-
*
|
|
73
|
-
* @returns {undefined}
|
|
74
|
-
*/
|
|
75
|
-
draw(i, e, o, c, h) {
|
|
76
|
-
var O, B, E, j, R, _, N, H, K, U, X, q, D, J, Q, Y;
|
|
77
|
-
const t = this.ctx, m = this.labels, l = {
|
|
78
|
-
x1: i.x1 + e.left,
|
|
79
|
-
x2: i.x2 - e.right,
|
|
80
|
-
y1: i.y1 + e.top,
|
|
81
|
-
y2: i.y2 - e.bottom
|
|
82
|
-
}, d = o.steps, u = o.graphMin, f = o.graphMax, C = o.rawInterval, a = o.oriSteps;
|
|
83
|
-
let g = l[this.units.rectStart];
|
|
84
|
-
const G = l[this.units.rectEnd], s = l[this.units.rectOffset(this.position)], F = l[this.units.rectOffsetCounter(this.position)], z = 5;
|
|
85
|
-
this.drawAxisTitle(i, e), t.font = M.getLabelStyle(this.labelStyle), this.type === "x" ? (t.textAlign = "center", t.textBaseline = this.position === "top" ? "bottom" : "top") : (t.textAlign = this.position === "left" ? "right" : "left", t.textBaseline = "middle"), t.fillStyle = this.labelStyle.color, t.lineWidth = this.axisLineWidth;
|
|
86
|
-
const T = M.aliasPixel(t.lineWidth);
|
|
87
|
-
if (t.beginPath(), t.strokeStyle = this.axisLineColor, this.type === "x" ? (t.moveTo(g, s + T), t.lineTo(G, s + T)) : (t.moveTo(s + T, g), t.lineTo(s + T, G)), t.stroke(), t.closePath(), d === 0 || u === null)
|
|
88
|
-
return;
|
|
89
|
-
const V = this.labelStyle.alignToGridLine, A = (G - g) / (a || 1);
|
|
90
|
-
this.categoryMode && !V && (g += Math.ceil(A / 2) - 2);
|
|
91
|
-
const S = [];
|
|
92
|
-
let x = null, n = null;
|
|
93
|
-
t.beginPath(), t.strokeStyle = this.gridLineColor;
|
|
94
|
-
let b, y, r, k = d <= 2 ? a : Math.round(a / d);
|
|
95
|
-
const v = g > Math.ceil(l[this.units.rectStart]);
|
|
96
|
-
this.type === "x" && v && k === a && (k = 1);
|
|
97
|
-
const tt = k === a ? a : a - 1;
|
|
98
|
-
for (r = 0; r <= tt; r += k) {
|
|
99
|
-
S[r] = L(u).valueOf() + r * C, x = Math.round(g + A * r), n = x + T;
|
|
100
|
-
let P;
|
|
101
|
-
for (let p = 0; p < S.length; p++)
|
|
102
|
-
S[p] !== void 0 && p !== r && (P = S[p]);
|
|
103
|
-
b = this.getLabelFormat(Math.min(f, S[r]), { prev: P });
|
|
104
|
-
const w = ((B = (O = this.options) == null ? void 0 : O.selectLabel) == null ? void 0 : B.use) && ((j = (E = this.options) == null ? void 0 : E.selectLabel) == null ? void 0 : j.useLabelOpacity) && this.options.horizontal === (this.type === "y") && ((R = h == null ? void 0 : h.dataIndex) == null ? void 0 : R.length) && !(h != null && h.label.map(
|
|
105
|
-
(p) => this.getLabelFormat(Math.min(f, p), {
|
|
106
|
-
prev: P
|
|
107
|
-
})
|
|
108
|
-
).includes(b)), W = this.labelStyle.color;
|
|
109
|
-
let Z = 1;
|
|
110
|
-
if (M.getColorStringType(W) === "RGBA" && (Z = M.getOpacity(W)), t.fillStyle = M.colorStringToRgba(
|
|
111
|
-
W,
|
|
112
|
-
w ? (_ = this.options) == null ? void 0 : _.unSelectedOpacity : Z
|
|
113
|
-
), this.type === "x") {
|
|
114
|
-
if (y = this.position === "top" ? s - 10 : s + 10, t.fillText(this.checkFixWidth(b), x, y), !w && ((H = (N = this.options) == null ? void 0 : N.selectItem) != null && H.showLabelTip) && (c != null && c.label) && !((K = this.options) != null && K.horizontal)) {
|
|
115
|
-
const p = this.getLabelFormat(
|
|
116
|
-
Math.min(f, c.label + 0 * C)
|
|
117
|
-
);
|
|
118
|
-
if (p === b) {
|
|
119
|
-
const $ = Math.round(t.measureText((U = this.labelStyle) == null ? void 0 : U.fontSize).width);
|
|
120
|
-
M.showLabelTip({
|
|
121
|
-
ctx: this.ctx,
|
|
122
|
-
width: Math.round(t.measureText(p).width) + 10,
|
|
123
|
-
height: $,
|
|
124
|
-
x,
|
|
125
|
-
y: y + ($ - 2),
|
|
126
|
-
borderRadius: 2,
|
|
127
|
-
arrowSize: 3,
|
|
128
|
-
text: b,
|
|
129
|
-
backgroundColor: (D = (q = (X = this.options) == null ? void 0 : X.selectItem) == null ? void 0 : q.labelTipStyle) == null ? void 0 : D.backgroundColor,
|
|
130
|
-
textColor: (Y = (Q = (J = this.options) == null ? void 0 : J.selectItem) == null ? void 0 : Q.labelTipStyle) == null ? void 0 : Y.textColor
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
this.showAxisTick && (t.beginPath(), t.strokeStyle = this.axisLineColor, t.moveTo(n, s), t.lineTo(n, s + z), t.stroke(), t.closePath()), r < a && this.showGrid && (v || !v && r !== 0) && (t.beginPath(), t.strokeStyle = this.gridLineColor, t.moveTo(n, s), t.lineTo(n, F), t.stroke(), t.closePath());
|
|
135
|
-
} else
|
|
136
|
-
y = this.position === "left" ? s - 10 : s + 10, t.fillText(this.checkFixWidth(b), y, x), this.showAxisTick && (t.beginPath(), t.strokeStyle = this.axisLineColor, t.moveTo(s + (this.axisLineWidth ?? 1), n), t.lineTo(s - z, n), t.stroke(), t.closePath()), r < a && this.showGrid && (v || !v && r !== 0) && (t.beginPath(), t.strokeStyle = this.gridLineColor, t.moveTo(s, n), t.lineTo(F, n), t.stroke(), t.closePath());
|
|
137
|
-
t.stroke();
|
|
138
|
-
}
|
|
139
|
-
if (this.categoryMode && V && r * k === a) {
|
|
140
|
-
const P = L(m[1]).diff(L(m[0])), w = this.getLabelFormat(L(S[a - 1] + P));
|
|
141
|
-
x = Math.round(g + A * a), n = x + T, this.type === "x" ? (t.fillText(this.checkFixWidth(w), x, y), this.showGrid && (t.moveTo(n, s), t.lineTo(n, F))) : (t.fillText(this.checkFixWidth(w), y, x), this.showGrid && (t.moveTo(s, n), t.lineTo(F, n))), t.stroke();
|
|
142
|
-
}
|
|
143
|
-
t.closePath();
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
export {
|
|
147
|
-
rt as default
|
|
148
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import d from "dayjs";
|
|
2
|
-
import { TIME_INTERVALS as v } from "../helpers/helpers.constant.js";
|
|
3
|
-
import x from "./scale.js";
|
|
4
|
-
class j extends x {
|
|
5
|
-
/**
|
|
6
|
-
* Transforming label by designated format
|
|
7
|
-
* @param {number} value label value
|
|
8
|
-
* @param {object} data data for formatting
|
|
9
|
-
*
|
|
10
|
-
* @returns {string} formatted label
|
|
11
|
-
*/
|
|
12
|
-
getLabelFormat(t, l = {}) {
|
|
13
|
-
if (this.formatter) {
|
|
14
|
-
const r = this.formatter(t, l);
|
|
15
|
-
if (typeof r == "string")
|
|
16
|
-
return r;
|
|
17
|
-
}
|
|
18
|
-
return d(t).format(this.timeFormat);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Calculate interval
|
|
22
|
-
* @param {object} range range information
|
|
23
|
-
*
|
|
24
|
-
* @returns {number} interval
|
|
25
|
-
*/
|
|
26
|
-
getInterval(t) {
|
|
27
|
-
const l = t.maxValue, r = t.minValue, p = t.maxSteps;
|
|
28
|
-
if (this.interval) {
|
|
29
|
-
if (typeof this.interval == "string")
|
|
30
|
-
return v[this.interval].size;
|
|
31
|
-
if (typeof this.interval == "object")
|
|
32
|
-
return this.interval.time * v[this.interval.unit].size;
|
|
33
|
-
if (typeof this.interval == "number")
|
|
34
|
-
return this.interval;
|
|
35
|
-
}
|
|
36
|
-
return Math.ceil((l - r) / p);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* With range information, calculate how many labels in axis
|
|
40
|
-
* time axis는 interval 없이 range만 사용하는 것을 지원하지 않음
|
|
41
|
-
* @param {object} range min/max information
|
|
42
|
-
*
|
|
43
|
-
* @returns {object} steps, interval, min/max graph value
|
|
44
|
-
*/
|
|
45
|
-
calculateSteps(t) {
|
|
46
|
-
const { maxValue: l, minValue: r } = t, p = Math.max(1, t.maxSteps ?? 1), g = Array.isArray(this.range) && this.range.length === 2, c = typeof this.interval == "number" || typeof this.interval == "object" && this.interval !== null ? this.getInterval(t) : null, u = c != null && c > 0 && Number.isFinite(c), M = 1e-10, n = +r;
|
|
47
|
-
let i = +l;
|
|
48
|
-
if (g && u) {
|
|
49
|
-
const e = c, s = (i - n) / e;
|
|
50
|
-
if (Math.abs(s - Math.round(s)) < M && this.fixedSteps)
|
|
51
|
-
return {
|
|
52
|
-
steps: Math.round(s),
|
|
53
|
-
interval: e,
|
|
54
|
-
graphMin: n,
|
|
55
|
-
graphMax: i
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
if (u) {
|
|
59
|
-
const e = i - n;
|
|
60
|
-
let h = c, s = Math.ceil(e / h);
|
|
61
|
-
for (; s > p; )
|
|
62
|
-
h *= 2, s = Math.ceil(e / h);
|
|
63
|
-
return i = n + h * s, {
|
|
64
|
-
steps: s,
|
|
65
|
-
interval: h,
|
|
66
|
-
graphMin: n,
|
|
67
|
-
graphMax: i
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
let a = this.getInterval(t), f = r;
|
|
71
|
-
for (; f < l; )
|
|
72
|
-
f += a;
|
|
73
|
-
i = f;
|
|
74
|
-
const m = i - n;
|
|
75
|
-
let o = Math.round(m / a);
|
|
76
|
-
for (; o > p; ) {
|
|
77
|
-
a *= 2, o = Math.round(m / a);
|
|
78
|
-
const e = m / o;
|
|
79
|
-
a = this.decimalPoint ? e : Math.ceil(e);
|
|
80
|
-
}
|
|
81
|
-
if (m > o * a) {
|
|
82
|
-
const e = m / o;
|
|
83
|
-
a = this.decimalPoint ? e : Math.ceil(e);
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
steps: o,
|
|
87
|
-
interval: a,
|
|
88
|
-
graphMin: n,
|
|
89
|
-
graphMax: i
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
j as default
|
|
95
|
-
};
|