evui 3.5.0 → 3.5.1
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,211 +0,0 @@
|
|
|
1
|
-
import { useModel as g, useMouseEvent as S, useEscCloseAndFocusable as B } from "./uses.js";
|
|
2
|
-
import { openBlock as s, createBlock as C, Teleport as h, createVNode as M, Transition as E, withCtx as z, createElementBlock as i, normalizeClass as r, withModifiers as W, createCommentVNode as a, createElementVNode as d, normalizeStyle as p, renderSlot as c, Fragment as x, toDisplayString as N } from "vue";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import F from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const D = {
|
|
6
|
-
name: "EvWindow",
|
|
7
|
-
props: {
|
|
8
|
-
style: {
|
|
9
|
-
type: Object,
|
|
10
|
-
default() {
|
|
11
|
-
return {};
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
visible: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: !1
|
|
17
|
-
},
|
|
18
|
-
title: {
|
|
19
|
-
type: [String, Number],
|
|
20
|
-
default: null
|
|
21
|
-
},
|
|
22
|
-
windowClass: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
iconClass: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
},
|
|
30
|
-
width: {
|
|
31
|
-
type: [String, Number],
|
|
32
|
-
default: "50vw"
|
|
33
|
-
},
|
|
34
|
-
height: {
|
|
35
|
-
type: [String, Number],
|
|
36
|
-
default: "50vh"
|
|
37
|
-
},
|
|
38
|
-
minWidth: {
|
|
39
|
-
type: [String, Number],
|
|
40
|
-
default: 150
|
|
41
|
-
},
|
|
42
|
-
minHeight: {
|
|
43
|
-
type: [String, Number],
|
|
44
|
-
default: 150
|
|
45
|
-
},
|
|
46
|
-
fullscreen: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: !1
|
|
49
|
-
},
|
|
50
|
-
isModal: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: !0
|
|
53
|
-
},
|
|
54
|
-
closeOnClickModal: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: !1
|
|
57
|
-
},
|
|
58
|
-
hideScroll: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: !0
|
|
61
|
-
},
|
|
62
|
-
draggable: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: !1
|
|
65
|
-
},
|
|
66
|
-
resizable: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: !1
|
|
69
|
-
},
|
|
70
|
-
maximizable: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: !1
|
|
73
|
-
},
|
|
74
|
-
escClose: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: !1
|
|
77
|
-
},
|
|
78
|
-
focusable: {
|
|
79
|
-
type: Boolean,
|
|
80
|
-
default: !1
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
emits: [
|
|
84
|
-
"update:visible",
|
|
85
|
-
"mousedown",
|
|
86
|
-
"mousedown-mouseup",
|
|
87
|
-
"mousedown-mousemove",
|
|
88
|
-
"resize",
|
|
89
|
-
"expand"
|
|
90
|
-
],
|
|
91
|
-
setup() {
|
|
92
|
-
const {
|
|
93
|
-
windowRef: n,
|
|
94
|
-
headerRef: e,
|
|
95
|
-
isFullExpandWindow: l,
|
|
96
|
-
maximizableIcon: o,
|
|
97
|
-
baseStyle: f,
|
|
98
|
-
closeWin: u,
|
|
99
|
-
numberToUnit: t,
|
|
100
|
-
removeUnit: m
|
|
101
|
-
} = g(), { dragStyle: w, startDrag: v, moveMouse: y, clickExpandBtn: b } = S({
|
|
102
|
-
windowRef: n,
|
|
103
|
-
headerRef: e,
|
|
104
|
-
isFullExpandWindow: l,
|
|
105
|
-
numberToUnit: t,
|
|
106
|
-
removeUnit: m
|
|
107
|
-
}), { setFocus: k } = B({ closeWin: u, windowRef: n });
|
|
108
|
-
return {
|
|
109
|
-
windowRef: n,
|
|
110
|
-
headerRef: e,
|
|
111
|
-
baseStyle: f,
|
|
112
|
-
dragStyle: w,
|
|
113
|
-
maximizableIcon: o,
|
|
114
|
-
closeWin: u,
|
|
115
|
-
startDrag: v,
|
|
116
|
-
moveMouse: y,
|
|
117
|
-
clickExpandBtn: b,
|
|
118
|
-
setFocus: k
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
}, R = {
|
|
122
|
-
key: 0,
|
|
123
|
-
ref: "headerRef",
|
|
124
|
-
class: "ev-window-header"
|
|
125
|
-
}, T = {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: "ev-window-icon"
|
|
128
|
-
}, V = {
|
|
129
|
-
key: 1,
|
|
130
|
-
class: "ev-window-title"
|
|
131
|
-
}, I = { class: "ev-window-content" }, O = {
|
|
132
|
-
key: 1,
|
|
133
|
-
class: "ev-window-footer"
|
|
134
|
-
}, U = { class: "ev-window-top-right-icon" };
|
|
135
|
-
function j(n, e, l, o, f, u) {
|
|
136
|
-
return s(), C(h, { to: "#ev-window-modal" }, [
|
|
137
|
-
M(E, {
|
|
138
|
-
name: "ev-window-fade",
|
|
139
|
-
appear: ""
|
|
140
|
-
}, {
|
|
141
|
-
default: z(() => [
|
|
142
|
-
l.visible ? (s(), i("div", {
|
|
143
|
-
key: 0,
|
|
144
|
-
class: r([
|
|
145
|
-
"ev-window-wrapper",
|
|
146
|
-
{ "scroll-lock": l.hideScroll },
|
|
147
|
-
{ "scroll-allow": !l.hideScroll && !l.isModal }
|
|
148
|
-
])
|
|
149
|
-
}, [
|
|
150
|
-
l.isModal ? (s(), i("div", {
|
|
151
|
-
key: 0,
|
|
152
|
-
class: "ev-window-dim-layer",
|
|
153
|
-
onClick: e[0] || (e[0] = (t) => o.closeWin("layer")),
|
|
154
|
-
onWheel: W(() => {
|
|
155
|
-
}, ["stop", "prevent"])
|
|
156
|
-
}, null, 32)) : a("", !0),
|
|
157
|
-
d("div", {
|
|
158
|
-
ref: "windowRef",
|
|
159
|
-
class: r(["ev-window", l.windowClass, { fullscreen: !!l.fullscreen }]),
|
|
160
|
-
style: p({
|
|
161
|
-
...o.baseStyle,
|
|
162
|
-
...o.dragStyle
|
|
163
|
-
}),
|
|
164
|
-
onMousedown: e[3] || (e[3] = (...t) => o.startDrag && o.startDrag(...t)),
|
|
165
|
-
onMousemove: e[4] || (e[4] = (...t) => o.moveMouse && o.moveMouse(...t)),
|
|
166
|
-
onClick: e[5] || (e[5] = (...t) => o.setFocus && o.setFocus(...t))
|
|
167
|
-
}, [
|
|
168
|
-
n.$slots.header || l.iconClass || l.title ? (s(), i("div", R, [
|
|
169
|
-
n.$slots.header ? c(n.$slots, "header", { key: 0 }) : (s(), i(x, { key: 1 }, [
|
|
170
|
-
l.iconClass ? (s(), i("span", T, [
|
|
171
|
-
d("i", {
|
|
172
|
-
class: r(l.iconClass)
|
|
173
|
-
}, null, 2)
|
|
174
|
-
])) : a("", !0),
|
|
175
|
-
l.title ? (s(), i("p", V, N(l.title), 1)) : a("", !0)
|
|
176
|
-
], 64))
|
|
177
|
-
], 512)) : a("", !0),
|
|
178
|
-
d("div", I, [
|
|
179
|
-
c(n.$slots, "default")
|
|
180
|
-
]),
|
|
181
|
-
n.$slots.footer ? (s(), i("div", O, [
|
|
182
|
-
c(n.$slots, "footer")
|
|
183
|
-
])) : a("", !0),
|
|
184
|
-
d("div", U, [
|
|
185
|
-
l.maximizable && !l.fullscreen ? (s(), i("span", {
|
|
186
|
-
key: 0,
|
|
187
|
-
class: "ev-window-maximizable",
|
|
188
|
-
onClick: e[1] || (e[1] = (...t) => o.clickExpandBtn && o.clickExpandBtn(...t))
|
|
189
|
-
}, [
|
|
190
|
-
d("i", {
|
|
191
|
-
class: r(o.maximizableIcon)
|
|
192
|
-
}, null, 2)
|
|
193
|
-
])) : a("", !0),
|
|
194
|
-
d("span", {
|
|
195
|
-
class: "ev-window-close",
|
|
196
|
-
onClick: e[2] || (e[2] = (...t) => o.closeWin && o.closeWin(...t))
|
|
197
|
-
}, [...e[6] || (e[6] = [
|
|
198
|
-
d("i", { class: "ev-icon-close" }, null, -1)
|
|
199
|
-
])])
|
|
200
|
-
])
|
|
201
|
-
], 38)
|
|
202
|
-
], 2)) : a("", !0)
|
|
203
|
-
]),
|
|
204
|
-
_: 3
|
|
205
|
-
})
|
|
206
|
-
]);
|
|
207
|
-
}
|
|
208
|
-
const G = /* @__PURE__ */ F(D, [["render", j]]);
|
|
209
|
-
export {
|
|
210
|
-
G as default
|
|
211
|
-
};
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as G, ref as $, computed as K, reactive as C, watch as Z, nextTick as _, onMounted as ne, onBeforeUnmount as ie } from "vue";
|
|
2
|
-
const oe = () => window.innerWidth - document.documentElement.clientWidth, re = () => {
|
|
3
|
-
const { props: c, emit: o } = G(), s = $(), n = $(), T = $(!1), y = K(
|
|
4
|
-
() => T.value ? "ev-icon-compress" : "ev-icon-expand"
|
|
5
|
-
);
|
|
6
|
-
let I = document.getElementById("ev-window-modal");
|
|
7
|
-
(() => {
|
|
8
|
-
if (!I) {
|
|
9
|
-
const u = document.createElement("div");
|
|
10
|
-
u.id = "ev-window-modal", document.body.appendChild(u), I = document.getElementById("ev-window-modal");
|
|
11
|
-
}
|
|
12
|
-
})();
|
|
13
|
-
const W = (u) => {
|
|
14
|
-
let i, h;
|
|
15
|
-
if (typeof u == "string" || typeof u == "number") {
|
|
16
|
-
const f = /^(normal|(-*\d+(?:\.\d+)?)(px|%|vw|vh)?)$/.exec(u);
|
|
17
|
-
i = f ? { value: +f[2], unit: f[3] || void 0 } : void 0;
|
|
18
|
-
} else
|
|
19
|
-
i = void 0;
|
|
20
|
-
return i == null ? h = void 0 : i.unit ? h = `${i.value}${i.unit}` : h = `${i.value}px`, h;
|
|
21
|
-
}, v = (u, i = "horizontal") => {
|
|
22
|
-
if (typeof u == "number")
|
|
23
|
-
return u;
|
|
24
|
-
if (!u)
|
|
25
|
-
return 0;
|
|
26
|
-
let h = 0;
|
|
27
|
-
const f = /^(normal|(\d+(?:\.\d+)?)(px|%|vw|vh)?)$/.exec(u);
|
|
28
|
-
if (i && ["%", "vw", "vh"].includes(f[3]) && f[2]) {
|
|
29
|
-
const z = i === "horizontal" ? window.innerWidth : window.innerHeight;
|
|
30
|
-
h = Math.floor(z * +f[2] / 100);
|
|
31
|
-
} else f[2] && (h = +f[2]);
|
|
32
|
-
return h;
|
|
33
|
-
}, l = C({}), t = K(() => ({
|
|
34
|
-
...c.style,
|
|
35
|
-
...l
|
|
36
|
-
})), S = () => {
|
|
37
|
-
if (l.position = "fixed", c.fullscreen) {
|
|
38
|
-
l.width = "100%", l.height = "100%", l.top = 0, l.left = 0;
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const u = v(c.width, "horizontal"), i = v(c.minWidth, "horizontal");
|
|
42
|
-
u < i ? (console.warn(
|
|
43
|
-
"[EVUI][Window] Since width is less than min-width, it is replaced by min-width."
|
|
44
|
-
), l.width = W(c.minWidth)) : l.width = W(c.width);
|
|
45
|
-
const h = v(c.height, "vertical"), f = v(c.minHeight, "vertical");
|
|
46
|
-
h < f ? (console.warn(
|
|
47
|
-
"[EVUI][Window] Since height is less than min-height, it is replaced by min-height."
|
|
48
|
-
), l.height = W(c.minHeight)) : l.height = W(c.height), l.top = `calc((100% - ${l.height}) / 2)`, l.left = `calc((100% - ${l.width}) / 2)`, v(c.width, "horizontal") > window.innerWidth && (l.left = 0), v(c.height, "vertical") > window.innerHeight && (l.top = 0);
|
|
49
|
-
}, x = (u) => {
|
|
50
|
-
u === "layer" && !c.closeOnClickModal || o("update:visible", !1);
|
|
51
|
-
}, a = (u) => {
|
|
52
|
-
var f;
|
|
53
|
-
const i = (f = I == null ? void 0 : I.getElementsByClassName("scroll-lock")) == null ? void 0 : f.length, h = document.body;
|
|
54
|
-
if (u) {
|
|
55
|
-
if (c.hideScroll) {
|
|
56
|
-
if (!i) {
|
|
57
|
-
const z = oe();
|
|
58
|
-
h.style.paddingRight = `${z}px`;
|
|
59
|
-
}
|
|
60
|
-
h.classList.add("ev-window-scroll-lock");
|
|
61
|
-
}
|
|
62
|
-
} else c.hideScroll && i === 1 && (h.style.removeProperty("padding-right"), h.classList.remove("ev-window-scroll-lock"));
|
|
63
|
-
};
|
|
64
|
-
return S(), Z(
|
|
65
|
-
() => c.visible,
|
|
66
|
-
async (u) => {
|
|
67
|
-
a(u), u && await _(() => {
|
|
68
|
-
S();
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
), {
|
|
72
|
-
windowRef: s,
|
|
73
|
-
headerRef: n,
|
|
74
|
-
isFullExpandWindow: T,
|
|
75
|
-
maximizableIcon: y,
|
|
76
|
-
baseStyle: t,
|
|
77
|
-
closeWin: x,
|
|
78
|
-
numberToUnit: W,
|
|
79
|
-
removeUnit: v
|
|
80
|
-
};
|
|
81
|
-
}, ce = (c) => {
|
|
82
|
-
const { props: o, emit: s } = G(), { windowRef: n, headerRef: T, isFullExpandWindow: y, numberToUnit: I, removeUnit: E } = c, W = 50, v = 5, l = C({}), t = C({
|
|
83
|
-
state: "",
|
|
84
|
-
pressedSpot: "",
|
|
85
|
-
top: 0,
|
|
86
|
-
left: 0,
|
|
87
|
-
width: 0,
|
|
88
|
-
height: 0,
|
|
89
|
-
clientX: 0,
|
|
90
|
-
clientY: 0
|
|
91
|
-
}), S = C({
|
|
92
|
-
top: 0,
|
|
93
|
-
left: 0
|
|
94
|
-
}), x = C({
|
|
95
|
-
top: !1,
|
|
96
|
-
right: !1,
|
|
97
|
-
left: !1,
|
|
98
|
-
bottom: !1
|
|
99
|
-
}), a = C({
|
|
100
|
-
width: null,
|
|
101
|
-
height: null,
|
|
102
|
-
top: null,
|
|
103
|
-
left: null
|
|
104
|
-
}), u = (e, d) => {
|
|
105
|
-
if (e == null || d == null)
|
|
106
|
-
return !1;
|
|
107
|
-
const r = n.value.getBoundingClientRect(), w = +e - r.left, p = +d - r.top, g = T.value.style, m = {
|
|
108
|
-
top: E(g.paddingTop, "vertical"),
|
|
109
|
-
left: E(g.paddingLeft, "horizontal"),
|
|
110
|
-
right: E(g.paddingRight, "horizontal")
|
|
111
|
-
}, b = m.left, L = r.width - m.right, U = m.top, H = U + T.value.offsetHeight;
|
|
112
|
-
return w > b && w < L && p > U && p < H;
|
|
113
|
-
}, i = (e) => {
|
|
114
|
-
if (e === null || typeof e != "object")
|
|
115
|
-
return;
|
|
116
|
-
let d, r, w, p, g, m;
|
|
117
|
-
const b = n.value, L = Object.prototype.hasOwnProperty;
|
|
118
|
-
L.call(e, "top") ? d = e.top : d = t.top, L.call(e, "left") ? r = e.left : r = t.left, L.call(e, "width") ? w = e.width : w = b.offsetWidth, L.call(e, "height") ? p = e.height : p = b.offsetHeight, L.call(e, "minWidth") ? g = e.minWidth : g = o.minWidth, L.call(e, "minHeight") ? m = e.minHeight : m = o.minHeight, w = E(w, "horizontal") > E(g, "horizontal") ? w : g, p = E(p, "vertical") > E(m, "vertical") ? p : m, l.top = I(d), l.left = I(r), l.width = I(w), l.height = I(p), l.minWidth = I(g), l.minHeight = I(m);
|
|
119
|
-
}, h = (e) => {
|
|
120
|
-
if (!(!n.value || t.pressedSpot))
|
|
121
|
-
if (o.resizable) {
|
|
122
|
-
const d = n.value.getBoundingClientRect(), r = e.clientX - d.left, w = e.clientY - d.top, p = w < v, g = r < v, m = r >= d.width - v, b = w >= d.height - v;
|
|
123
|
-
p && g || b && m ? n.value.style.cursor = "nwse-resize" : p && m || b && g ? n.value.style.cursor = "nesw-resize" : m || g ? n.value.style.cursor = "ew-resize" : b || p ? n.value.style.cursor = "ns-resize" : o.draggable && u(e.clientX, e.clientY) ? n.value.style.cursor = "move" : n.value.style.cursor = "default";
|
|
124
|
-
} else o.draggable && u(e.clientX, e.clientY) ? n.value.style.cursor = "move" : n.value.style.cursor = "default";
|
|
125
|
-
}, f = (e) => {
|
|
126
|
-
const d = window.innerWidth, r = window.innerHeight, w = x.top, p = x.left, g = x.right, m = x.bottom, b = E(o.minWidth, "horizontal"), L = E(o.minHeight, "vertical"), U = e.clientX >= d ? d : e.clientX;
|
|
127
|
-
let H = e.clientY >= r ? r : e.clientY;
|
|
128
|
-
H = e.clientY > 0 ? H : 0;
|
|
129
|
-
const D = U - t.clientX, k = H - t.clientY;
|
|
130
|
-
let Y = t.top, X = t.left, B = t.width, A = t.height;
|
|
131
|
-
const V = Y + t.height - L, O = X + t.width - b;
|
|
132
|
-
w && (Y = t.top + k, A = t.height - k, Y > V && (Y = V)), p && (X = t.left + D, B = t.width - D, X > O && (X = O)), g && (B = t.width + D), m && (A = t.height + k), B = Math.min(Math.max(B, b), d), A = Math.min(Math.max(A, L), r);
|
|
133
|
-
const J = { top: Y, left: X, width: B, height: A };
|
|
134
|
-
i(J), s("resize", e, { ...J });
|
|
135
|
-
}, z = (e, d) => {
|
|
136
|
-
let r = d;
|
|
137
|
-
return r < 0 ? r = 0 : r > e - W && (r = Math.floor(e - W)), r;
|
|
138
|
-
}, R = (e, d) => {
|
|
139
|
-
let r = d;
|
|
140
|
-
return r < -(t.width - W) ? r = -Math.floor(t.width - W) : r > e - W && (r = Math.floor(e - W)), r;
|
|
141
|
-
}, N = (e) => {
|
|
142
|
-
if (e.preventDefault(), t.state = "mousedown-mousemove", o.draggable && t.pressedSpot === "header") {
|
|
143
|
-
const d = document.documentElement.clientWidth, r = document.documentElement.clientHeight, w = e.clientY - t.clientY, p = e.clientX - t.clientX;
|
|
144
|
-
let g = t.top + w, m = t.left + p;
|
|
145
|
-
g = z(r, g), m = R(d, m), i({
|
|
146
|
-
top: `${g}px`,
|
|
147
|
-
left: `${m}px`,
|
|
148
|
-
width: l.width ?? o.width,
|
|
149
|
-
height: l.height ?? o.height
|
|
150
|
-
});
|
|
151
|
-
} else o.resizable && t.pressedSpot === "border" && f(e);
|
|
152
|
-
s("mousedown-mousemove", e);
|
|
153
|
-
}, q = (e) => {
|
|
154
|
-
t.state = "", t.pressedSpot = "", s("mousedown-mouseup", e), window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", q);
|
|
155
|
-
}, Q = (e) => {
|
|
156
|
-
if (!n.value || !o.resizable && !o.draggable)
|
|
157
|
-
return;
|
|
158
|
-
let d = "";
|
|
159
|
-
if (o.resizable) {
|
|
160
|
-
const r = n.value.getBoundingClientRect(), w = e.clientX - r.left, p = e.clientY - r.top, g = p < v, m = w < v, b = w >= r.width - v, L = p >= r.height - v;
|
|
161
|
-
x.top = g, x.left = m, x.right = b, x.bottom = L, (g || m || b || L) && (d = "border");
|
|
162
|
-
}
|
|
163
|
-
if (d !== "border" && u(e.clientX, e.clientY) && (d = "header"), !d || !o.draggable && d === "header" || !o.resizable && d === "border") {
|
|
164
|
-
t.state = "mousedown", t.pressedSpot = "", t.top = n.value.offsetTop, t.left = n.value.offsetLeft, t.width = n.value.offsetWidth, t.height = n.value.offsetHeight, t.clientX = e.clientX, t.clientY = e.clientY, s("mousedown", { ...t, ref: n.value });
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
t.state = "mousedown", t.pressedSpot = d, t.top = n.value.offsetTop, t.left = n.value.offsetLeft, t.width = n.value.offsetWidth, t.height = n.value.offsetHeight, t.clientX = e.clientX, t.clientY = e.clientY, s("mousedown", { ...t, ref: n.value }), window.addEventListener("mousemove", N), window.addEventListener("mouseup", q);
|
|
168
|
-
}, j = (e) => {
|
|
169
|
-
!o.draggable && !o.resizable || h(e);
|
|
170
|
-
}, ee = () => {
|
|
171
|
-
y.value = !y.value, _(() => {
|
|
172
|
-
y.value ? (a.top = n.value.offsetTop, a.left = n.value.offsetLeft, a.width = n.value.offsetWidth, a.height = n.value.offsetHeight, i({
|
|
173
|
-
top: 0,
|
|
174
|
-
left: 0,
|
|
175
|
-
width: document.body.clientWidth,
|
|
176
|
-
height: document.body.clientHeight
|
|
177
|
-
})) : i({
|
|
178
|
-
top: a.top,
|
|
179
|
-
left: a.left,
|
|
180
|
-
width: a.width,
|
|
181
|
-
height: a.height
|
|
182
|
-
}), s("expand", {
|
|
183
|
-
top: a.top,
|
|
184
|
-
left: a.left,
|
|
185
|
-
width: a.width,
|
|
186
|
-
height: a.height
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
}, te = () => {
|
|
190
|
-
y.value = !1, t.state = "", t.pressedSpot = "", t.top = 0, t.left = 0, t.width = 0, t.height = 0, t.clientX = 0, t.clientY = 0, S.top = 0, S.left = 0, x.top = !1, x.left = !1, x.right = !1, x.bottom = !1, a.top = null, a.left = null, a.width = null, a.height = null, Object.keys(l).forEach((e) => {
|
|
191
|
-
delete l[e];
|
|
192
|
-
});
|
|
193
|
-
};
|
|
194
|
-
return Z(
|
|
195
|
-
() => o.visible,
|
|
196
|
-
(e) => {
|
|
197
|
-
e || te();
|
|
198
|
-
}
|
|
199
|
-
), {
|
|
200
|
-
dragStyle: l,
|
|
201
|
-
startDrag: Q,
|
|
202
|
-
moveMouse: j,
|
|
203
|
-
clickExpandBtn: ee
|
|
204
|
-
};
|
|
205
|
-
}, P = /* @__PURE__ */ (() => {
|
|
206
|
-
let c = [], o = 0;
|
|
207
|
-
return {
|
|
208
|
-
add(s) {
|
|
209
|
-
if (s != null)
|
|
210
|
-
return s.sequence = o++, c.push(s), s.sequence;
|
|
211
|
-
},
|
|
212
|
-
remove(s) {
|
|
213
|
-
s != null && (c = c.filter((n) => n.sequence !== s.sequence));
|
|
214
|
-
},
|
|
215
|
-
get windows() {
|
|
216
|
-
return c.slice();
|
|
217
|
-
},
|
|
218
|
-
getWindowBySequence(s) {
|
|
219
|
-
return c.find((n) => n.sequence === s);
|
|
220
|
-
},
|
|
221
|
-
isEmpty() {
|
|
222
|
-
return c.length <= 0;
|
|
223
|
-
},
|
|
224
|
-
isFirstWindowOpen() {
|
|
225
|
-
return o === 1;
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
})(), M = /* @__PURE__ */ (() => {
|
|
229
|
-
let y = 700;
|
|
230
|
-
return {
|
|
231
|
-
getNext() {
|
|
232
|
-
return y >= 748 ? 748 : (y += 1, y);
|
|
233
|
-
},
|
|
234
|
-
getNextOverLimit() {
|
|
235
|
-
return 749;
|
|
236
|
-
},
|
|
237
|
-
getPrevFrom(I) {
|
|
238
|
-
const E = y - I * 1;
|
|
239
|
-
return E <= 700 ? 700 : E;
|
|
240
|
-
},
|
|
241
|
-
isUpperLimitClose() {
|
|
242
|
-
return y >= 748;
|
|
243
|
-
},
|
|
244
|
-
resetToLower() {
|
|
245
|
-
y = 700;
|
|
246
|
-
},
|
|
247
|
-
getAllocableCount() {
|
|
248
|
-
return Math.floor(48 / 1);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
})(), se = (c) => {
|
|
252
|
-
const o = window.getComputedStyle(c).getPropertyValue("z-index").trim();
|
|
253
|
-
return !o || isNaN(o) ? 700 : parseInt(o);
|
|
254
|
-
}, F = () => {
|
|
255
|
-
const c = (s, n) => s.zIndex > n.zIndex ? 1 : s.zIndex < n.zIndex ? -1 : s.sequence > n.sequence ? 1 : -1;
|
|
256
|
-
return Array.prototype.map.call(P.windows, (s) => ({
|
|
257
|
-
...s,
|
|
258
|
-
zIndex: se(s.elem)
|
|
259
|
-
})).sort(c);
|
|
260
|
-
}, de = ({ closeWin: c, windowRef: o }) => {
|
|
261
|
-
const { props: s } = G();
|
|
262
|
-
let n = null, T = null;
|
|
263
|
-
const y = () => P.add({
|
|
264
|
-
sequence: n,
|
|
265
|
-
closeWin: c,
|
|
266
|
-
elem: o.value,
|
|
267
|
-
escClose: s.escClose
|
|
268
|
-
}), I = (i) => {
|
|
269
|
-
P.remove(i);
|
|
270
|
-
}, E = (i) => {
|
|
271
|
-
if (P.isEmpty()) return;
|
|
272
|
-
const { code: h } = i;
|
|
273
|
-
if (h !== "Escape") return;
|
|
274
|
-
const f = F(), z = f[f.length - 1];
|
|
275
|
-
z.escClose && z.closeWin();
|
|
276
|
-
}, W = () => {
|
|
277
|
-
n = y(), o.value.dataset.sequence = n, P.isFirstWindowOpen() && document.addEventListener("keydown", E);
|
|
278
|
-
}, v = () => {
|
|
279
|
-
const i = P.getWindowBySequence(n);
|
|
280
|
-
I(i);
|
|
281
|
-
}, l = ({ elem: i, zIndex: h }) => {
|
|
282
|
-
if (s.isModal) {
|
|
283
|
-
const f = i.parentElement.getElementsByClassName("ev-window-dim-layer")[0];
|
|
284
|
-
f.style.zIndex = h;
|
|
285
|
-
}
|
|
286
|
-
i.style.zIndex = h;
|
|
287
|
-
}, t = () => {
|
|
288
|
-
P.windows.length === 1 && M.resetToLower();
|
|
289
|
-
const i = M.getNext();
|
|
290
|
-
l({ elem: o.value, zIndex: i });
|
|
291
|
-
}, S = (i) => String(i.sequence) === o.value.dataset.sequence, x = () => {
|
|
292
|
-
const i = F();
|
|
293
|
-
if (P.windows.length > M.getAllocableCount()) {
|
|
294
|
-
const f = i.reverse();
|
|
295
|
-
let z = 0;
|
|
296
|
-
f.forEach((N) => {
|
|
297
|
-
if (S(N)) return;
|
|
298
|
-
const q = M.getPrevFrom(z++);
|
|
299
|
-
l({ elem: N.elem, zIndex: q });
|
|
300
|
-
});
|
|
301
|
-
const R = M.getNextOverLimit();
|
|
302
|
-
l({ elem: o.value, zIndex: R });
|
|
303
|
-
} else {
|
|
304
|
-
M.resetToLower(), i.forEach((z) => {
|
|
305
|
-
if (S(z)) return;
|
|
306
|
-
const R = M.getNext();
|
|
307
|
-
l({ elem: z.elem, zIndex: R });
|
|
308
|
-
});
|
|
309
|
-
const f = M.getNext();
|
|
310
|
-
l({ elem: o.value, zIndex: f });
|
|
311
|
-
}
|
|
312
|
-
}, a = () => {
|
|
313
|
-
M.isUpperLimitClose() ? x() : t();
|
|
314
|
-
}, u = () => {
|
|
315
|
-
if (!o.value || !s.focusable) return;
|
|
316
|
-
const i = F(), h = i[i.length - 1];
|
|
317
|
-
S(h) || a();
|
|
318
|
-
};
|
|
319
|
-
return ne(() => {
|
|
320
|
-
s.visible && (W(), T = setTimeout(a, 0));
|
|
321
|
-
}), ie(() => {
|
|
322
|
-
s.visible && (v(), clearTimeout(T));
|
|
323
|
-
}), Z(
|
|
324
|
-
() => s.visible,
|
|
325
|
-
(i) => {
|
|
326
|
-
_(() => {
|
|
327
|
-
i ? (W(), T = setTimeout(a, 0)) : (v(), clearTimeout(T));
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
), Z(
|
|
331
|
-
() => s.escClose,
|
|
332
|
-
(i) => {
|
|
333
|
-
if (!s.visible) return;
|
|
334
|
-
const h = P.getWindowBySequence(n);
|
|
335
|
-
h && (h.escClose = i);
|
|
336
|
-
}
|
|
337
|
-
), {
|
|
338
|
-
setFocus: u
|
|
339
|
-
};
|
|
340
|
-
};
|
|
341
|
-
export {
|
|
342
|
-
de as useEscCloseAndFocusable,
|
|
343
|
-
re as useModel,
|
|
344
|
-
ce as useMouseEvent
|
|
345
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const r = {
|
|
2
|
-
mounted(n, e) {
|
|
3
|
-
const t = n, u = e.modifiers.bubbles, s = (o) => {
|
|
4
|
-
(u || t !== o.target && !t.contains(o.target)) && e.value(o);
|
|
5
|
-
};
|
|
6
|
-
t.vueClickOutside = s, document.addEventListener("mousedown", s);
|
|
7
|
-
},
|
|
8
|
-
unmounted(n) {
|
|
9
|
-
const e = n;
|
|
10
|
-
document.removeEventListener("mousedown", e.vueClickOutside), e.vueClickOutside = null;
|
|
11
|
-
}
|
|
12
|
-
}, m = {
|
|
13
|
-
mounted(n, e) {
|
|
14
|
-
const t = n;
|
|
15
|
-
let u = null;
|
|
16
|
-
const s = e.modifiers.bubble, o = document.body.getElementsByClassName("ev-select-dropbox"), c = "ev-tag-name", a = "ev-tag-suffix-close", d = (l) => {
|
|
17
|
-
if (!(l.target.classList.contains(c) || l.target.classList.contains(a)) && o && o.length && (s || t !== l.target && !t.contains(l.target))) {
|
|
18
|
-
for (let i = 0; i < o.length; i++)
|
|
19
|
-
if (u = o[i], u !== l.target && !u.contains(l.target)) {
|
|
20
|
-
e.value(l);
|
|
21
|
-
break;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
t.vueClickOutside = d, document.addEventListener("mousedown", d);
|
|
26
|
-
},
|
|
27
|
-
unmounted(n) {
|
|
28
|
-
const e = n;
|
|
29
|
-
document.removeEventListener("mousedown", e.vueClickOutside), e.vueClickOutside = null;
|
|
30
|
-
}
|
|
31
|
-
}, v = {
|
|
32
|
-
mounted(n, e) {
|
|
33
|
-
const t = n, u = e.modifiers.bubbles, s = document.body.getElementsByClassName("ev-date-picker-dropdown"), o = (c) => {
|
|
34
|
-
(!s && (u || t !== c.target && !t.contains(c.target)) || s && s[0] && s[0] !== c.target && !s[0].contains(c.target) && t !== c.target && !t.contains(c.target)) && e.value(c);
|
|
35
|
-
};
|
|
36
|
-
t.vueClickOutside = o, document.addEventListener("mousedown", o);
|
|
37
|
-
},
|
|
38
|
-
unmounted(n) {
|
|
39
|
-
const e = n;
|
|
40
|
-
document.removeEventListener("mousedown", e.vueClickOutside), e.vueClickOutside = null;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
export {
|
|
44
|
-
r as clickoutside,
|
|
45
|
-
v as datePickerClickoutside,
|
|
46
|
-
m as selectClickoutside
|
|
47
|
-
};
|