@stonecrop/atable 0.4.22 → 0.4.23
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/assets/index.css +1 -1
- package/dist/atable.js +899 -894
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/stores/table.js +5 -1
- package/package.json +3 -3
- package/src/components/ATable.vue +13 -8
- package/src/stores/table.ts +5 -1
package/dist/atable.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { onMounted as Z, ref as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { onMounted as Z, ref as P, watch as N, onBeforeUnmount as it, computed as k, shallowRef as H, toValue as E, watchEffect as ut, getCurrentScope as Je, onScopeDispose as Qe, unref as x, getCurrentInstance as ge, nextTick as Ze, isRef as ct, toRefs as dt, customRef as Ke, toRef as ft, readonly as vt, defineComponent as K, useTemplateRef as G, createElementBlock as A, openBlock as S, normalizeClass as q, normalizeStyle as J, createBlock as re, resolveDynamicComponent as fe, mergeProps as Se, toDisplayString as _, Fragment as ie, createElementVNode as D, createCommentVNode as ee, renderSlot as B, useCssVars as mt, withDirectives as he, vShow as _e, renderList as ke, createTextVNode as ht, withModifiers as We, mergeModels as He, useModel as pt, createVNode as ze, withCtx as Be } from "vue";
|
|
2
|
+
import { defineStore as gt } from "pinia";
|
|
3
3
|
import './assets/index.css';function $e(e) {
|
|
4
|
-
return
|
|
4
|
+
return Je() ? (Qe(e), !0) : !1;
|
|
5
5
|
}
|
|
6
|
-
const
|
|
6
|
+
const wt = typeof window < "u" && typeof document < "u";
|
|
7
7
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
8
|
-
const
|
|
8
|
+
const yt = (e) => e != null, bt = Object.prototype.toString, xt = (e) => bt.call(e) === "[object Object]", Ct = () => {
|
|
9
9
|
};
|
|
10
10
|
function ve(e) {
|
|
11
11
|
return Array.isArray(e) ? e : [e];
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function Et(e, t, n) {
|
|
14
|
+
return N(
|
|
15
15
|
e,
|
|
16
16
|
t,
|
|
17
17
|
{
|
|
@@ -20,218 +20,218 @@ function xt(e, t, n) {
|
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
const oe =
|
|
23
|
+
const oe = wt ? window : void 0;
|
|
24
24
|
function te(e) {
|
|
25
25
|
var t;
|
|
26
|
-
const n =
|
|
26
|
+
const n = E(e);
|
|
27
27
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
28
28
|
}
|
|
29
29
|
function ce(...e) {
|
|
30
30
|
const t = [], n = () => {
|
|
31
|
-
t.forEach((
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
}),
|
|
31
|
+
t.forEach((o) => o()), t.length = 0;
|
|
32
|
+
}, l = (o, s, a, c) => (o.addEventListener(s, a, c), () => o.removeEventListener(s, a, c)), r = k(() => {
|
|
33
|
+
const o = ve(E(e[0])).filter((s) => s != null);
|
|
34
|
+
return o.every((s) => typeof s != "string") ? o : void 0;
|
|
35
|
+
}), u = Et(
|
|
36
36
|
() => {
|
|
37
|
-
var
|
|
37
|
+
var o, s;
|
|
38
38
|
return [
|
|
39
|
-
(
|
|
40
|
-
ve(
|
|
41
|
-
ve(
|
|
39
|
+
(s = (o = r.value) == null ? void 0 : o.map((a) => te(a))) != null ? s : [oe].filter((a) => a != null),
|
|
40
|
+
ve(E(r.value ? e[1] : e[0])),
|
|
41
|
+
ve(x(r.value ? e[2] : e[1])),
|
|
42
42
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
43
|
-
|
|
43
|
+
E(r.value ? e[3] : e[2])
|
|
44
44
|
];
|
|
45
45
|
},
|
|
46
|
-
([
|
|
47
|
-
if (n(), !(
|
|
46
|
+
([o, s, a, c]) => {
|
|
47
|
+
if (n(), !(o != null && o.length) || !(s != null && s.length) || !(a != null && a.length))
|
|
48
48
|
return;
|
|
49
|
-
const d =
|
|
49
|
+
const d = xt(c) ? { ...c } : c;
|
|
50
50
|
t.push(
|
|
51
|
-
...
|
|
52
|
-
(
|
|
53
|
-
(
|
|
51
|
+
...o.flatMap(
|
|
52
|
+
(m) => s.flatMap(
|
|
53
|
+
(g) => a.map((b) => l(m, g, b, d))
|
|
54
54
|
)
|
|
55
55
|
)
|
|
56
56
|
);
|
|
57
57
|
},
|
|
58
58
|
{ flush: "post" }
|
|
59
|
-
),
|
|
60
|
-
|
|
59
|
+
), i = () => {
|
|
60
|
+
u(), n();
|
|
61
61
|
};
|
|
62
|
-
return $e(n),
|
|
62
|
+
return $e(n), i;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function It() {
|
|
65
65
|
const e = H(!1), t = ge();
|
|
66
66
|
return t && Z(() => {
|
|
67
67
|
e.value = !0;
|
|
68
68
|
}, t), e;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
const t =
|
|
70
|
+
function kt(e) {
|
|
71
|
+
const t = It();
|
|
72
72
|
return k(() => (t.value, !!e()));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
const { window:
|
|
76
|
-
let
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
const
|
|
81
|
-
return new Set(
|
|
82
|
-
}),
|
|
83
|
-
() =>
|
|
84
|
-
(
|
|
85
|
-
|
|
74
|
+
function Mt(e, t, n = {}) {
|
|
75
|
+
const { window: l = oe, ...r } = n;
|
|
76
|
+
let u;
|
|
77
|
+
const i = kt(() => l && "MutationObserver" in l), o = () => {
|
|
78
|
+
u && (u.disconnect(), u = void 0);
|
|
79
|
+
}, s = k(() => {
|
|
80
|
+
const m = E(e), g = ve(m).map(te).filter(yt);
|
|
81
|
+
return new Set(g);
|
|
82
|
+
}), a = N(
|
|
83
|
+
() => s.value,
|
|
84
|
+
(m) => {
|
|
85
|
+
o(), i.value && m.size && (u = new MutationObserver(t), m.forEach((g) => u.observe(g, r)));
|
|
86
86
|
},
|
|
87
87
|
{ immediate: !0, flush: "post" }
|
|
88
|
-
),
|
|
89
|
-
|
|
88
|
+
), c = () => u == null ? void 0 : u.takeRecords(), d = () => {
|
|
89
|
+
a(), o();
|
|
90
90
|
};
|
|
91
91
|
return $e(d), {
|
|
92
|
-
isSupported:
|
|
92
|
+
isSupported: i,
|
|
93
93
|
stop: d,
|
|
94
|
-
takeRecords:
|
|
94
|
+
takeRecords: c
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function St(e, t, n = {}) {
|
|
98
98
|
const {
|
|
99
|
-
window:
|
|
100
|
-
document:
|
|
101
|
-
flush:
|
|
99
|
+
window: l = oe,
|
|
100
|
+
document: r = l == null ? void 0 : l.document,
|
|
101
|
+
flush: u = "sync"
|
|
102
102
|
} = n;
|
|
103
|
-
if (!
|
|
104
|
-
return
|
|
105
|
-
let
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
const { stop: d } =
|
|
112
|
-
|
|
113
|
-
(
|
|
114
|
-
|
|
103
|
+
if (!l || !r)
|
|
104
|
+
return Ct;
|
|
105
|
+
let i;
|
|
106
|
+
const o = (c) => {
|
|
107
|
+
i == null || i(), i = c;
|
|
108
|
+
}, s = ut(() => {
|
|
109
|
+
const c = te(e);
|
|
110
|
+
if (c) {
|
|
111
|
+
const { stop: d } = Mt(
|
|
112
|
+
r,
|
|
113
|
+
(m) => {
|
|
114
|
+
m.map((g) => [...g.removedNodes]).flat().some((g) => g === c || g.contains(c)) && t(m);
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
window:
|
|
117
|
+
window: l,
|
|
118
118
|
childList: !0,
|
|
119
119
|
subtree: !0
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
|
-
|
|
122
|
+
o(d);
|
|
123
123
|
}
|
|
124
|
-
}, { flush:
|
|
125
|
-
|
|
124
|
+
}, { flush: u }), a = () => {
|
|
125
|
+
s(), o();
|
|
126
126
|
};
|
|
127
|
-
return $e(
|
|
127
|
+
return $e(a), a;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function $t(e = {}) {
|
|
130
130
|
var t;
|
|
131
131
|
const {
|
|
132
132
|
window: n = oe,
|
|
133
|
-
deep:
|
|
134
|
-
triggerOnRemoval:
|
|
135
|
-
} = e,
|
|
136
|
-
var
|
|
137
|
-
let
|
|
138
|
-
if (
|
|
139
|
-
for (;
|
|
140
|
-
|
|
141
|
-
return
|
|
142
|
-
},
|
|
143
|
-
|
|
133
|
+
deep: l = !0,
|
|
134
|
+
triggerOnRemoval: r = !1
|
|
135
|
+
} = e, u = (t = e.document) != null ? t : n == null ? void 0 : n.document, i = () => {
|
|
136
|
+
var a;
|
|
137
|
+
let c = u == null ? void 0 : u.activeElement;
|
|
138
|
+
if (l)
|
|
139
|
+
for (; c != null && c.shadowRoot; )
|
|
140
|
+
c = (a = c == null ? void 0 : c.shadowRoot) == null ? void 0 : a.activeElement;
|
|
141
|
+
return c;
|
|
142
|
+
}, o = H(), s = () => {
|
|
143
|
+
o.value = i();
|
|
144
144
|
};
|
|
145
145
|
if (n) {
|
|
146
|
-
const
|
|
146
|
+
const a = {
|
|
147
147
|
capture: !0,
|
|
148
148
|
passive: !0
|
|
149
149
|
};
|
|
150
150
|
ce(
|
|
151
151
|
n,
|
|
152
152
|
"blur",
|
|
153
|
-
(
|
|
154
|
-
|
|
153
|
+
(c) => {
|
|
154
|
+
c.relatedTarget === null && s();
|
|
155
155
|
},
|
|
156
|
-
|
|
156
|
+
a
|
|
157
157
|
), ce(
|
|
158
158
|
n,
|
|
159
159
|
"focus",
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
s,
|
|
161
|
+
a
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
|
-
return
|
|
164
|
+
return r && St(o, s, { document: u }), s(), o;
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
function
|
|
168
|
-
const { window: n = oe } = t,
|
|
169
|
-
if (!n || !
|
|
170
|
-
return { focused:
|
|
171
|
-
const
|
|
172
|
-
return ce(
|
|
173
|
-
var
|
|
174
|
-
return
|
|
175
|
-
},
|
|
166
|
+
const At = "focusin", Tt = "focusout", Rt = ":focus-within";
|
|
167
|
+
function Ot(e, t = {}) {
|
|
168
|
+
const { window: n = oe } = t, l = k(() => te(e)), r = H(!1), u = k(() => r.value), i = $t(t);
|
|
169
|
+
if (!n || !i.value)
|
|
170
|
+
return { focused: u };
|
|
171
|
+
const o = { passive: !0 };
|
|
172
|
+
return ce(l, At, () => r.value = !0, o), ce(l, Tt, () => {
|
|
173
|
+
var s, a, c;
|
|
174
|
+
return r.value = (c = (a = (s = l.value) == null ? void 0 : s.matches) == null ? void 0 : a.call(s, Rt)) != null ? c : !1;
|
|
175
|
+
}, o), { focused: u };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
const
|
|
177
|
+
function Pt(e, { window: t = oe, scrollTarget: n } = {}) {
|
|
178
|
+
const l = P(!1), r = () => {
|
|
179
179
|
if (!t) return;
|
|
180
|
-
const
|
|
181
|
-
if (!
|
|
182
|
-
|
|
180
|
+
const u = t.document, i = te(e);
|
|
181
|
+
if (!i)
|
|
182
|
+
l.value = !1;
|
|
183
183
|
else {
|
|
184
|
-
const
|
|
185
|
-
|
|
184
|
+
const o = i.getBoundingClientRect();
|
|
185
|
+
l.value = o.top <= (t.innerHeight || u.documentElement.clientHeight) && o.left <= (t.innerWidth || u.documentElement.clientWidth) && o.bottom >= 0 && o.right >= 0;
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
return
|
|
188
|
+
return N(
|
|
189
189
|
() => te(e),
|
|
190
|
-
() =>
|
|
190
|
+
() => r(),
|
|
191
191
|
{ immediate: !0, flush: "post" }
|
|
192
|
-
), t && ce(n || t, "scroll",
|
|
192
|
+
), t && ce(n || t, "scroll", r, {
|
|
193
193
|
capture: !1,
|
|
194
194
|
passive: !0
|
|
195
|
-
}),
|
|
195
|
+
}), l;
|
|
196
196
|
}
|
|
197
197
|
const F = (e) => {
|
|
198
|
-
let t =
|
|
198
|
+
let t = Pt(e).value;
|
|
199
199
|
return t = t && e.offsetHeight > 0, t;
|
|
200
|
-
}, j = (e) => e.tabIndex >= 0,
|
|
200
|
+
}, j = (e) => e.tabIndex >= 0, Ne = (e) => {
|
|
201
201
|
const t = e.target;
|
|
202
202
|
return Ae(t);
|
|
203
203
|
}, Ae = (e) => {
|
|
204
204
|
var t;
|
|
205
205
|
let n;
|
|
206
206
|
if (e instanceof HTMLTableCellElement) {
|
|
207
|
-
const
|
|
208
|
-
if (
|
|
209
|
-
const
|
|
210
|
-
|
|
207
|
+
const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
208
|
+
if (l) {
|
|
209
|
+
const r = Array.from(l.children)[e.cellIndex];
|
|
210
|
+
r && (n = r);
|
|
211
211
|
}
|
|
212
212
|
} else if (e instanceof HTMLTableRowElement) {
|
|
213
|
-
const
|
|
214
|
-
|
|
213
|
+
const l = e.previousElementSibling;
|
|
214
|
+
l && (n = l);
|
|
215
215
|
}
|
|
216
216
|
return n && (!j(n) || !F(n)) ? Ae(n) : n;
|
|
217
|
-
},
|
|
217
|
+
}, Lt = (e) => {
|
|
218
218
|
var t;
|
|
219
219
|
const n = e.target;
|
|
220
|
-
let
|
|
220
|
+
let l;
|
|
221
221
|
if (n instanceof HTMLTableCellElement) {
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
const
|
|
225
|
-
|
|
222
|
+
const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
223
|
+
if (r) {
|
|
224
|
+
const u = r.firstElementChild, i = u == null ? void 0 : u.children[n.cellIndex];
|
|
225
|
+
i && (l = i);
|
|
226
226
|
}
|
|
227
227
|
} else if (n instanceof HTMLTableRowElement) {
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
const
|
|
231
|
-
|
|
228
|
+
const r = n.parentElement;
|
|
229
|
+
if (r) {
|
|
230
|
+
const u = r.firstElementChild;
|
|
231
|
+
u && (l = u);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
return
|
|
234
|
+
return l && (!j(l) || !F(l)) ? Te(l) : l;
|
|
235
235
|
}, Xe = (e) => {
|
|
236
236
|
const t = e.target;
|
|
237
237
|
return Te(t);
|
|
@@ -239,35 +239,35 @@ const F = (e) => {
|
|
|
239
239
|
var t;
|
|
240
240
|
let n;
|
|
241
241
|
if (e instanceof HTMLTableCellElement) {
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
const
|
|
245
|
-
|
|
242
|
+
const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
243
|
+
if (l) {
|
|
244
|
+
const r = Array.from(l.children)[e.cellIndex];
|
|
245
|
+
r && (n = r);
|
|
246
246
|
}
|
|
247
247
|
} else if (e instanceof HTMLTableRowElement) {
|
|
248
|
-
const
|
|
249
|
-
|
|
248
|
+
const l = e.nextElementSibling;
|
|
249
|
+
l && (n = l);
|
|
250
250
|
}
|
|
251
251
|
return n && (!j(n) || !F(n)) ? Te(n) : n;
|
|
252
|
-
},
|
|
252
|
+
}, Dt = (e) => {
|
|
253
253
|
var t;
|
|
254
254
|
const n = e.target;
|
|
255
|
-
let
|
|
255
|
+
let l;
|
|
256
256
|
if (n instanceof HTMLTableCellElement) {
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
259
|
-
const
|
|
260
|
-
|
|
257
|
+
const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
258
|
+
if (r) {
|
|
259
|
+
const u = r.lastElementChild, i = u == null ? void 0 : u.children[n.cellIndex];
|
|
260
|
+
i && (l = i);
|
|
261
261
|
}
|
|
262
262
|
} else if (n instanceof HTMLTableRowElement) {
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
const
|
|
266
|
-
|
|
263
|
+
const r = n.parentElement;
|
|
264
|
+
if (r) {
|
|
265
|
+
const u = r.lastElementChild;
|
|
266
|
+
u && (l = u);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
return
|
|
270
|
-
},
|
|
269
|
+
return l && (!j(l) || !F(l)) ? Ae(l) : l;
|
|
270
|
+
}, Ve = (e) => {
|
|
271
271
|
const t = e.target;
|
|
272
272
|
return Re(t);
|
|
273
273
|
}, Re = (e) => {
|
|
@@ -276,37 +276,37 @@ const F = (e) => {
|
|
|
276
276
|
if (e.previousElementSibling)
|
|
277
277
|
n = e.previousElementSibling;
|
|
278
278
|
else {
|
|
279
|
-
const
|
|
280
|
-
n =
|
|
279
|
+
const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
280
|
+
n = l == null ? void 0 : l.lastElementChild;
|
|
281
281
|
}
|
|
282
282
|
return n && (!j(n) || !F(n)) ? Re(n) : n;
|
|
283
|
-
},
|
|
283
|
+
}, Ge = (e) => {
|
|
284
284
|
const t = e.target;
|
|
285
|
-
return
|
|
286
|
-
},
|
|
285
|
+
return Oe(t);
|
|
286
|
+
}, Oe = (e) => {
|
|
287
287
|
var t;
|
|
288
288
|
let n;
|
|
289
289
|
if (e.nextElementSibling)
|
|
290
290
|
n = e.nextElementSibling;
|
|
291
291
|
else {
|
|
292
|
-
const
|
|
293
|
-
n =
|
|
292
|
+
const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
293
|
+
n = l == null ? void 0 : l.firstElementChild;
|
|
294
294
|
}
|
|
295
|
-
return n && (!j(n) || !F(n)) ?
|
|
296
|
-
}, Ge = (e) => {
|
|
297
|
-
const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
|
|
298
|
-
return n && (!j(n) || !F(n)) ? Pe(n) : n;
|
|
295
|
+
return n && (!j(n) || !F(n)) ? Oe(n) : n;
|
|
299
296
|
}, Fe = (e) => {
|
|
297
|
+
const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
|
|
298
|
+
return n && (!j(n) || !F(n)) ? Oe(n) : n;
|
|
299
|
+
}, je = (e) => {
|
|
300
300
|
const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
|
|
301
301
|
return n && (!j(n) || !F(n)) ? Re(n) : n;
|
|
302
|
-
}, de = ["alt", "control", "shift", "meta"],
|
|
302
|
+
}, de = ["alt", "control", "shift", "meta"], Wt = {
|
|
303
303
|
ArrowUp: "up",
|
|
304
304
|
ArrowDown: "down",
|
|
305
305
|
ArrowLeft: "left",
|
|
306
306
|
ArrowRight: "right"
|
|
307
|
-
},
|
|
307
|
+
}, Pe = {
|
|
308
308
|
"keydown.up": (e) => {
|
|
309
|
-
const t =
|
|
309
|
+
const t = Ne(e);
|
|
310
310
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
311
311
|
},
|
|
312
312
|
"keydown.down": (e) => {
|
|
@@ -314,31 +314,31 @@ const F = (e) => {
|
|
|
314
314
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
315
315
|
},
|
|
316
316
|
"keydown.left": (e) => {
|
|
317
|
-
const t =
|
|
317
|
+
const t = Ve(e);
|
|
318
318
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
319
319
|
},
|
|
320
320
|
"keydown.right": (e) => {
|
|
321
|
-
const t =
|
|
321
|
+
const t = Ge(e);
|
|
322
322
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
323
323
|
},
|
|
324
324
|
"keydown.control.up": (e) => {
|
|
325
|
-
const t =
|
|
325
|
+
const t = Lt(e);
|
|
326
326
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
327
327
|
},
|
|
328
328
|
"keydown.control.down": (e) => {
|
|
329
|
-
const t =
|
|
329
|
+
const t = Dt(e);
|
|
330
330
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
331
331
|
},
|
|
332
332
|
"keydown.control.left": (e) => {
|
|
333
|
-
const t =
|
|
333
|
+
const t = Fe(e);
|
|
334
334
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
335
335
|
},
|
|
336
336
|
"keydown.control.right": (e) => {
|
|
337
|
-
const t =
|
|
337
|
+
const t = je(e);
|
|
338
338
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
339
339
|
},
|
|
340
340
|
"keydown.end": (e) => {
|
|
341
|
-
const t =
|
|
341
|
+
const t = je(e);
|
|
342
342
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
343
343
|
},
|
|
344
344
|
"keydown.enter": (e) => {
|
|
@@ -351,172 +351,172 @@ const F = (e) => {
|
|
|
351
351
|
"keydown.shift.enter": (e) => {
|
|
352
352
|
if (e.target instanceof HTMLTableCellElement) {
|
|
353
353
|
e.preventDefault(), e.stopPropagation();
|
|
354
|
-
const t =
|
|
354
|
+
const t = Ne(e);
|
|
355
355
|
t && t.focus();
|
|
356
356
|
}
|
|
357
357
|
},
|
|
358
358
|
"keydown.home": (e) => {
|
|
359
|
-
const t =
|
|
359
|
+
const t = Fe(e);
|
|
360
360
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
361
361
|
},
|
|
362
362
|
"keydown.tab": (e) => {
|
|
363
|
-
const t =
|
|
363
|
+
const t = Ge(e);
|
|
364
364
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
365
365
|
},
|
|
366
366
|
"keydown.shift.tab": (e) => {
|
|
367
|
-
const t =
|
|
367
|
+
const t = Ve(e);
|
|
368
368
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
369
369
|
}
|
|
370
370
|
};
|
|
371
371
|
function Le(e) {
|
|
372
|
-
const t = (
|
|
373
|
-
let
|
|
374
|
-
return
|
|
375
|
-
}, n = (
|
|
376
|
-
var
|
|
377
|
-
const
|
|
378
|
-
let
|
|
379
|
-
if (typeof
|
|
380
|
-
|
|
381
|
-
else if (Array.isArray(
|
|
382
|
-
for (const
|
|
383
|
-
|
|
384
|
-
else if (
|
|
385
|
-
|
|
386
|
-
else if ((
|
|
387
|
-
if (Array.isArray(
|
|
388
|
-
for (const
|
|
389
|
-
|
|
372
|
+
const t = (i) => {
|
|
373
|
+
let o = null;
|
|
374
|
+
return i.parent && (typeof i.parent == "string" ? o = document.querySelector(i.parent) : i.parent instanceof HTMLElement ? o = i.parent : o = i.parent.value), o;
|
|
375
|
+
}, n = (i) => {
|
|
376
|
+
var o;
|
|
377
|
+
const s = t(i);
|
|
378
|
+
let a = [];
|
|
379
|
+
if (typeof i.selectors == "string")
|
|
380
|
+
a = s ? Array.from(s.querySelectorAll(i.selectors)) : Array.from(document.querySelectorAll(i.selectors));
|
|
381
|
+
else if (Array.isArray(i.selectors))
|
|
382
|
+
for (const c of i.selectors)
|
|
383
|
+
c instanceof HTMLElement ? a.push(c) : a.push(c.$el);
|
|
384
|
+
else if (i.selectors instanceof HTMLElement)
|
|
385
|
+
a.push(i.selectors);
|
|
386
|
+
else if ((o = i.selectors) != null && o.value)
|
|
387
|
+
if (Array.isArray(i.selectors.value))
|
|
388
|
+
for (const c of i.selectors.value)
|
|
389
|
+
c instanceof HTMLElement ? a.push(c) : a.push(c.$el);
|
|
390
390
|
else
|
|
391
|
-
|
|
392
|
-
return
|
|
393
|
-
},
|
|
394
|
-
const
|
|
395
|
-
let
|
|
396
|
-
return
|
|
397
|
-
},
|
|
398
|
-
const
|
|
399
|
-
if (de.includes(
|
|
400
|
-
const
|
|
401
|
-
for (const
|
|
402
|
-
const [d, ...
|
|
403
|
-
if (d === "keydown" &&
|
|
404
|
-
const
|
|
405
|
-
const
|
|
406
|
-
return
|
|
391
|
+
a.push(i.selectors.value);
|
|
392
|
+
return a;
|
|
393
|
+
}, l = (i) => {
|
|
394
|
+
const o = t(i);
|
|
395
|
+
let s = [];
|
|
396
|
+
return i.selectors ? s = n(i) : o && (s = Array.from(o.children).filter((a) => j(a) && F(a))), s;
|
|
397
|
+
}, r = (i) => (o) => {
|
|
398
|
+
const s = Wt[o.key] || o.key.toLowerCase();
|
|
399
|
+
if (de.includes(s)) return;
|
|
400
|
+
const a = i.handlers || Pe;
|
|
401
|
+
for (const c of Object.keys(a)) {
|
|
402
|
+
const [d, ...m] = c.split(".");
|
|
403
|
+
if (d === "keydown" && m.includes(s)) {
|
|
404
|
+
const g = a[c], b = m.filter((f) => de.includes(f)), w = de.some((f) => {
|
|
405
|
+
const v = f.charAt(0).toUpperCase() + f.slice(1);
|
|
406
|
+
return o.getModifierState(v);
|
|
407
407
|
});
|
|
408
|
-
if (
|
|
409
|
-
if (
|
|
410
|
-
for (const
|
|
411
|
-
if (
|
|
412
|
-
const
|
|
413
|
-
|
|
408
|
+
if (b.length > 0) {
|
|
409
|
+
if (w) {
|
|
410
|
+
for (const f of de)
|
|
411
|
+
if (m.includes(f)) {
|
|
412
|
+
const v = f.charAt(0).toUpperCase() + f.slice(1);
|
|
413
|
+
o.getModifierState(v) && g(o);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
} else
|
|
417
|
-
|
|
417
|
+
w || g(o);
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
},
|
|
420
|
+
}, u = [];
|
|
421
421
|
Z(() => {
|
|
422
|
-
for (const
|
|
423
|
-
const
|
|
424
|
-
for (const d of
|
|
425
|
-
const { focused:
|
|
426
|
-
|
|
422
|
+
for (const i of e) {
|
|
423
|
+
const o = t(i), s = l(i), a = r(i), c = o ? [o] : s;
|
|
424
|
+
for (const d of c) {
|
|
425
|
+
const { focused: m } = Ot(P(d)), g = N(m, (b) => {
|
|
426
|
+
b ? d.addEventListener("keydown", a) : d.removeEventListener("keydown", a);
|
|
427
427
|
});
|
|
428
|
-
|
|
428
|
+
u.push(g);
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}),
|
|
432
|
-
for (const
|
|
433
|
-
|
|
431
|
+
}), it(() => {
|
|
432
|
+
for (const i of u)
|
|
433
|
+
i();
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
436
|
function le(e) {
|
|
437
|
-
return
|
|
437
|
+
return Je() ? (Qe(e), !0) : !1;
|
|
438
438
|
}
|
|
439
439
|
const we = typeof window < "u" && typeof document < "u";
|
|
440
440
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
441
|
-
const
|
|
442
|
-
}, Me = /* @__PURE__ */
|
|
443
|
-
function
|
|
441
|
+
const Ht = (e) => e != null, zt = Object.prototype.toString, et = (e) => zt.call(e) === "[object Object]", V = () => {
|
|
442
|
+
}, Me = /* @__PURE__ */ Bt();
|
|
443
|
+
function Bt() {
|
|
444
444
|
var e, t;
|
|
445
445
|
return we && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function Nt(...e) {
|
|
448
448
|
if (e.length !== 1)
|
|
449
|
-
return
|
|
449
|
+
return ft(...e);
|
|
450
450
|
const t = e[0];
|
|
451
|
-
return typeof t == "function" ?
|
|
451
|
+
return typeof t == "function" ? vt(Ke(() => ({ get: t, set: V }))) : P(t);
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
function n(...
|
|
455
|
-
return new Promise((
|
|
456
|
-
Promise.resolve(e(() => t.apply(this,
|
|
453
|
+
function Xt(e, t) {
|
|
454
|
+
function n(...l) {
|
|
455
|
+
return new Promise((r, u) => {
|
|
456
|
+
Promise.resolve(e(() => t.apply(this, l), { fn: t, thisArg: this, args: l })).then(r).catch(u);
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
459
|
return n;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
462
|
-
let n,
|
|
463
|
-
const
|
|
464
|
-
clearTimeout(
|
|
461
|
+
function Vt(e, t = {}) {
|
|
462
|
+
let n, l, r = V;
|
|
463
|
+
const u = (s) => {
|
|
464
|
+
clearTimeout(s), r(), r = V;
|
|
465
465
|
};
|
|
466
|
-
let
|
|
467
|
-
return (
|
|
468
|
-
const
|
|
469
|
-
return n &&
|
|
470
|
-
|
|
471
|
-
n &&
|
|
472
|
-
},
|
|
473
|
-
|
|
474
|
-
},
|
|
466
|
+
let i;
|
|
467
|
+
return (s) => {
|
|
468
|
+
const a = E(e), c = E(t.maxWait);
|
|
469
|
+
return n && u(n), a <= 0 || c !== void 0 && c <= 0 ? (l && (u(l), l = void 0), Promise.resolve(s())) : new Promise((d, m) => {
|
|
470
|
+
r = t.rejectOnCancel ? m : d, i = s, c && !l && (l = setTimeout(() => {
|
|
471
|
+
n && u(n), l = void 0, d(i());
|
|
472
|
+
}, c)), n = setTimeout(() => {
|
|
473
|
+
l && u(l), l = void 0, d(s());
|
|
474
|
+
}, a);
|
|
475
475
|
});
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
478
|
function Q(e) {
|
|
479
479
|
return Array.isArray(e) ? e : [e];
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Gt(e) {
|
|
482
482
|
return ge();
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
return
|
|
486
|
-
|
|
484
|
+
function Ft(e, t = 200, n = {}) {
|
|
485
|
+
return Xt(
|
|
486
|
+
Vt(t, n),
|
|
487
487
|
e
|
|
488
488
|
);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
if (!
|
|
492
|
-
return
|
|
490
|
+
function jt(e, t = {}) {
|
|
491
|
+
if (!ct(e))
|
|
492
|
+
return dt(e);
|
|
493
493
|
const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
494
|
-
for (const
|
|
495
|
-
n[
|
|
494
|
+
for (const l in e.value)
|
|
495
|
+
n[l] = Ke(() => ({
|
|
496
496
|
get() {
|
|
497
|
-
return e.value[
|
|
497
|
+
return e.value[l];
|
|
498
498
|
},
|
|
499
|
-
set(
|
|
500
|
-
var
|
|
501
|
-
if ((
|
|
499
|
+
set(r) {
|
|
500
|
+
var u;
|
|
501
|
+
if ((u = E(t.replaceRef)) != null ? u : !0)
|
|
502
502
|
if (Array.isArray(e.value)) {
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const o = [...e.value];
|
|
504
|
+
o[l] = r, e.value = o;
|
|
505
505
|
} else {
|
|
506
|
-
const
|
|
507
|
-
Object.setPrototypeOf(
|
|
506
|
+
const o = { ...e.value, [l]: r };
|
|
507
|
+
Object.setPrototypeOf(o, Object.getPrototypeOf(e.value)), e.value = o;
|
|
508
508
|
}
|
|
509
509
|
else
|
|
510
|
-
e.value[
|
|
510
|
+
e.value[l] = r;
|
|
511
511
|
}
|
|
512
512
|
}));
|
|
513
513
|
return n;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
|
|
515
|
+
function Ut(e, t = !0, n) {
|
|
516
|
+
Gt() ? Z(e, n) : t ? e() : Ze(e);
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
return
|
|
518
|
+
function tt(e, t, n) {
|
|
519
|
+
return N(
|
|
520
520
|
e,
|
|
521
521
|
t,
|
|
522
522
|
{
|
|
@@ -528,203 +528,203 @@ function et(e, t, n) {
|
|
|
528
528
|
const ye = we ? window : void 0;
|
|
529
529
|
function ne(e) {
|
|
530
530
|
var t;
|
|
531
|
-
const n =
|
|
531
|
+
const n = E(e);
|
|
532
532
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
533
533
|
}
|
|
534
534
|
function ue(...e) {
|
|
535
535
|
const t = [], n = () => {
|
|
536
|
-
t.forEach((
|
|
537
|
-
},
|
|
538
|
-
const
|
|
539
|
-
return
|
|
540
|
-
}),
|
|
536
|
+
t.forEach((o) => o()), t.length = 0;
|
|
537
|
+
}, l = (o, s, a, c) => (o.addEventListener(s, a, c), () => o.removeEventListener(s, a, c)), r = k(() => {
|
|
538
|
+
const o = Q(E(e[0])).filter((s) => s != null);
|
|
539
|
+
return o.every((s) => typeof s != "string") ? o : void 0;
|
|
540
|
+
}), u = tt(
|
|
541
541
|
() => {
|
|
542
|
-
var
|
|
542
|
+
var o, s;
|
|
543
543
|
return [
|
|
544
|
-
(
|
|
545
|
-
Q(
|
|
546
|
-
Q(
|
|
544
|
+
(s = (o = r.value) == null ? void 0 : o.map((a) => ne(a))) != null ? s : [ye].filter((a) => a != null),
|
|
545
|
+
Q(E(r.value ? e[1] : e[0])),
|
|
546
|
+
Q(x(r.value ? e[2] : e[1])),
|
|
547
547
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
548
|
-
|
|
548
|
+
E(r.value ? e[3] : e[2])
|
|
549
549
|
];
|
|
550
550
|
},
|
|
551
|
-
([
|
|
552
|
-
if (n(), !(
|
|
551
|
+
([o, s, a, c]) => {
|
|
552
|
+
if (n(), !(o != null && o.length) || !(s != null && s.length) || !(a != null && a.length))
|
|
553
553
|
return;
|
|
554
|
-
const d =
|
|
554
|
+
const d = et(c) ? { ...c } : c;
|
|
555
555
|
t.push(
|
|
556
|
-
...
|
|
557
|
-
(
|
|
558
|
-
(
|
|
556
|
+
...o.flatMap(
|
|
557
|
+
(m) => s.flatMap(
|
|
558
|
+
(g) => a.map((b) => l(m, g, b, d))
|
|
559
559
|
)
|
|
560
560
|
)
|
|
561
561
|
);
|
|
562
562
|
},
|
|
563
563
|
{ flush: "post" }
|
|
564
|
-
),
|
|
565
|
-
|
|
564
|
+
), i = () => {
|
|
565
|
+
u(), n();
|
|
566
566
|
};
|
|
567
|
-
return le(n),
|
|
567
|
+
return le(n), i;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function qt() {
|
|
570
570
|
const e = H(!1), t = ge();
|
|
571
571
|
return t && Z(() => {
|
|
572
572
|
e.value = !0;
|
|
573
573
|
}, t), e;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
const t =
|
|
575
|
+
function nt(e) {
|
|
576
|
+
const t = qt();
|
|
577
577
|
return k(() => (t.value, !!e()));
|
|
578
578
|
}
|
|
579
|
-
function
|
|
580
|
-
const { window:
|
|
581
|
-
let
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
const
|
|
586
|
-
return new Set(
|
|
587
|
-
}),
|
|
588
|
-
() =>
|
|
589
|
-
(
|
|
590
|
-
|
|
579
|
+
function ot(e, t, n = {}) {
|
|
580
|
+
const { window: l = ye, ...r } = n;
|
|
581
|
+
let u;
|
|
582
|
+
const i = nt(() => l && "MutationObserver" in l), o = () => {
|
|
583
|
+
u && (u.disconnect(), u = void 0);
|
|
584
|
+
}, s = k(() => {
|
|
585
|
+
const m = E(e), g = Q(m).map(ne).filter(Ht);
|
|
586
|
+
return new Set(g);
|
|
587
|
+
}), a = N(
|
|
588
|
+
() => s.value,
|
|
589
|
+
(m) => {
|
|
590
|
+
o(), i.value && m.size && (u = new MutationObserver(t), m.forEach((g) => u.observe(g, r)));
|
|
591
591
|
},
|
|
592
592
|
{ immediate: !0, flush: "post" }
|
|
593
|
-
),
|
|
594
|
-
|
|
593
|
+
), c = () => u == null ? void 0 : u.takeRecords(), d = () => {
|
|
594
|
+
a(), o();
|
|
595
595
|
};
|
|
596
596
|
return le(d), {
|
|
597
|
-
isSupported:
|
|
597
|
+
isSupported: i,
|
|
598
598
|
stop: d,
|
|
599
|
-
takeRecords:
|
|
599
|
+
takeRecords: c
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
602
|
function xe(e, t = {}) {
|
|
603
603
|
var n;
|
|
604
604
|
const {
|
|
605
|
-
pointerTypes:
|
|
606
|
-
preventDefault:
|
|
607
|
-
stopPropagation:
|
|
608
|
-
exact:
|
|
609
|
-
onMove:
|
|
610
|
-
onEnd:
|
|
611
|
-
onStart:
|
|
612
|
-
initialValue:
|
|
605
|
+
pointerTypes: l,
|
|
606
|
+
preventDefault: r,
|
|
607
|
+
stopPropagation: u,
|
|
608
|
+
exact: i,
|
|
609
|
+
onMove: o,
|
|
610
|
+
onEnd: s,
|
|
611
|
+
onStart: a,
|
|
612
|
+
initialValue: c,
|
|
613
613
|
axis: d = "both",
|
|
614
|
-
draggingElement:
|
|
615
|
-
containerElement:
|
|
616
|
-
handle:
|
|
617
|
-
buttons:
|
|
618
|
-
} = t,
|
|
619
|
-
(n =
|
|
620
|
-
),
|
|
621
|
-
|
|
622
|
-
}, M = (
|
|
614
|
+
draggingElement: m = ye,
|
|
615
|
+
containerElement: g,
|
|
616
|
+
handle: b = e,
|
|
617
|
+
buttons: w = [0]
|
|
618
|
+
} = t, f = P(
|
|
619
|
+
(n = E(c)) != null ? n : { x: 0, y: 0 }
|
|
620
|
+
), v = P(), h = (I) => l ? l.includes(I.pointerType) : !0, C = (I) => {
|
|
621
|
+
E(r) && I.preventDefault(), E(u) && I.stopPropagation();
|
|
622
|
+
}, M = (I) => {
|
|
623
623
|
var T;
|
|
624
|
-
if (!
|
|
624
|
+
if (!E(w).includes(I.button) || E(t.disabled) || !h(I) || E(i) && I.target !== E(e))
|
|
625
625
|
return;
|
|
626
|
-
const z =
|
|
627
|
-
x:
|
|
628
|
-
y:
|
|
626
|
+
const z = E(g), U = (T = z == null ? void 0 : z.getBoundingClientRect) == null ? void 0 : T.call(z), X = E(e).getBoundingClientRect(), be = {
|
|
627
|
+
x: I.clientX - (z ? X.left - U.left + z.scrollLeft : X.left),
|
|
628
|
+
y: I.clientY - (z ? X.top - U.top + z.scrollTop : X.top)
|
|
629
629
|
};
|
|
630
|
-
(
|
|
631
|
-
}, L = (
|
|
632
|
-
if (
|
|
630
|
+
(a == null ? void 0 : a(be, I)) !== !1 && (v.value = be, C(I));
|
|
631
|
+
}, L = (I) => {
|
|
632
|
+
if (E(t.disabled) || !h(I) || !v.value)
|
|
633
633
|
return;
|
|
634
|
-
const T =
|
|
635
|
-
let { x: U, y:
|
|
636
|
-
(d === "x" || d === "both") && (U =
|
|
634
|
+
const T = E(g), z = E(e).getBoundingClientRect();
|
|
635
|
+
let { x: U, y: X } = f.value;
|
|
636
|
+
(d === "x" || d === "both") && (U = I.clientX - v.value.x, T && (U = Math.min(Math.max(0, U), T.scrollWidth - z.width))), (d === "y" || d === "both") && (X = I.clientY - v.value.y, T && (X = Math.min(Math.max(0, X), T.scrollHeight - z.height))), f.value = {
|
|
637
637
|
x: U,
|
|
638
|
-
y:
|
|
639
|
-
},
|
|
640
|
-
},
|
|
641
|
-
|
|
638
|
+
y: X
|
|
639
|
+
}, o == null || o(f.value, I), C(I);
|
|
640
|
+
}, O = (I) => {
|
|
641
|
+
E(t.disabled) || !h(I) || v.value && (v.value = void 0, s == null || s(f.value, I), C(I));
|
|
642
642
|
};
|
|
643
643
|
if (we) {
|
|
644
|
-
const
|
|
644
|
+
const I = () => {
|
|
645
645
|
var T;
|
|
646
646
|
return {
|
|
647
647
|
capture: (T = t.capture) != null ? T : !0,
|
|
648
|
-
passive: !
|
|
648
|
+
passive: !E(r)
|
|
649
649
|
};
|
|
650
650
|
};
|
|
651
|
-
ue(
|
|
651
|
+
ue(b, "pointerdown", M, I), ue(m, "pointermove", L, I), ue(m, "pointerup", O, I);
|
|
652
652
|
}
|
|
653
653
|
return {
|
|
654
|
-
...
|
|
655
|
-
position:
|
|
656
|
-
isDragging: k(() => !!
|
|
654
|
+
...jt(f),
|
|
655
|
+
position: f,
|
|
656
|
+
isDragging: k(() => !!v.value),
|
|
657
657
|
style: k(
|
|
658
|
-
() => `left:${
|
|
658
|
+
() => `left:${f.value.x}px;top:${f.value.y}px;`
|
|
659
659
|
)
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
const { window:
|
|
664
|
-
let
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
},
|
|
668
|
-
const d =
|
|
669
|
-
return Array.isArray(d) ? d.map((
|
|
670
|
-
}),
|
|
671
|
-
|
|
662
|
+
function Yt(e, t, n = {}) {
|
|
663
|
+
const { window: l = ye, ...r } = n;
|
|
664
|
+
let u;
|
|
665
|
+
const i = nt(() => l && "ResizeObserver" in l), o = () => {
|
|
666
|
+
u && (u.disconnect(), u = void 0);
|
|
667
|
+
}, s = k(() => {
|
|
668
|
+
const d = E(e);
|
|
669
|
+
return Array.isArray(d) ? d.map((m) => ne(m)) : [ne(d)];
|
|
670
|
+
}), a = N(
|
|
671
|
+
s,
|
|
672
672
|
(d) => {
|
|
673
|
-
if (
|
|
674
|
-
|
|
675
|
-
for (const
|
|
676
|
-
|
|
673
|
+
if (o(), i.value && l) {
|
|
674
|
+
u = new ResizeObserver(t);
|
|
675
|
+
for (const m of d)
|
|
676
|
+
m && u.observe(m, r);
|
|
677
677
|
}
|
|
678
678
|
},
|
|
679
679
|
{ immediate: !0, flush: "post" }
|
|
680
|
-
),
|
|
681
|
-
|
|
680
|
+
), c = () => {
|
|
681
|
+
o(), a();
|
|
682
682
|
};
|
|
683
|
-
return le(
|
|
684
|
-
isSupported:
|
|
685
|
-
stop:
|
|
683
|
+
return le(c), {
|
|
684
|
+
isSupported: i,
|
|
685
|
+
stop: c
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
688
|
function pe(e, t = {}) {
|
|
689
689
|
const {
|
|
690
690
|
reset: n = !0,
|
|
691
|
-
windowResize:
|
|
692
|
-
windowScroll:
|
|
693
|
-
immediate:
|
|
694
|
-
updateTiming:
|
|
695
|
-
} = t,
|
|
696
|
-
function
|
|
697
|
-
const
|
|
698
|
-
if (!
|
|
699
|
-
n && (
|
|
691
|
+
windowResize: l = !0,
|
|
692
|
+
windowScroll: r = !0,
|
|
693
|
+
immediate: u = !0,
|
|
694
|
+
updateTiming: i = "sync"
|
|
695
|
+
} = t, o = H(0), s = H(0), a = H(0), c = H(0), d = H(0), m = H(0), g = H(0), b = H(0);
|
|
696
|
+
function w() {
|
|
697
|
+
const v = ne(e);
|
|
698
|
+
if (!v) {
|
|
699
|
+
n && (o.value = 0, s.value = 0, a.value = 0, c.value = 0, d.value = 0, m.value = 0, g.value = 0, b.value = 0);
|
|
700
700
|
return;
|
|
701
701
|
}
|
|
702
|
-
const
|
|
703
|
-
|
|
702
|
+
const h = v.getBoundingClientRect();
|
|
703
|
+
o.value = h.height, s.value = h.bottom, a.value = h.left, c.value = h.right, d.value = h.top, m.value = h.width, g.value = h.x, b.value = h.y;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
|
|
705
|
+
function f() {
|
|
706
|
+
i === "sync" ? w() : i === "next-frame" && requestAnimationFrame(() => w());
|
|
707
707
|
}
|
|
708
|
-
return
|
|
708
|
+
return Yt(e, f), N(() => ne(e), (v) => !v && f()), ot(e, f, {
|
|
709
709
|
attributeFilter: ["style", "class"]
|
|
710
|
-
}),
|
|
711
|
-
|
|
710
|
+
}), r && ue("scroll", f, { capture: !0, passive: !0 }), l && ue("resize", f, { passive: !0 }), Ut(() => {
|
|
711
|
+
u && f();
|
|
712
712
|
}), {
|
|
713
|
-
height:
|
|
714
|
-
bottom:
|
|
715
|
-
left:
|
|
716
|
-
right:
|
|
713
|
+
height: o,
|
|
714
|
+
bottom: s,
|
|
715
|
+
left: a,
|
|
716
|
+
right: c,
|
|
717
717
|
top: d,
|
|
718
|
-
width:
|
|
719
|
-
x:
|
|
720
|
-
y:
|
|
721
|
-
update:
|
|
718
|
+
width: m,
|
|
719
|
+
x: g,
|
|
720
|
+
y: b,
|
|
721
|
+
update: f
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
const
|
|
724
|
+
const Jt = (e) => {
|
|
725
725
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
726
726
|
return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
|
|
727
|
-
},
|
|
727
|
+
}, Qt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), Zt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Kt = ["innerHTML"], _t = { key: 2 }, en = /* @__PURE__ */ K({
|
|
728
728
|
__name: "ACell",
|
|
729
729
|
props: {
|
|
730
730
|
colIndex: {},
|
|
@@ -736,76 +736,76 @@ const Yt = (e) => {
|
|
|
736
736
|
debounce: { default: 300 }
|
|
737
737
|
},
|
|
738
738
|
setup(e, { expose: t }) {
|
|
739
|
-
const n = G("cell"),
|
|
740
|
-
var
|
|
739
|
+
const n = G("cell"), l = e.store.getCellData(e.colIndex, e.rowIndex), r = P(""), u = P(!1), i = e.store.columns[e.colIndex], o = e.store.rows[e.rowIndex], s = i.align || "center", a = i.width || "40ch", c = k(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), d = k(() => typeof c.value == "string" ? Jt(c.value) : !1), m = k(() => {
|
|
740
|
+
var h;
|
|
741
741
|
return {
|
|
742
|
-
textAlign:
|
|
743
|
-
width:
|
|
744
|
-
fontWeight:
|
|
745
|
-
paddingLeft: e.store.getIndent(e.colIndex, (
|
|
742
|
+
textAlign: s,
|
|
743
|
+
width: a,
|
|
744
|
+
fontWeight: u.value ? "bold" : "inherit",
|
|
745
|
+
paddingLeft: e.store.getIndent(e.colIndex, (h = e.store.display[e.rowIndex]) == null ? void 0 : h.indent)
|
|
746
746
|
};
|
|
747
|
-
}),
|
|
747
|
+
}), g = k(() => ({
|
|
748
748
|
"sticky-column": e.pinned,
|
|
749
|
-
"cell-modified":
|
|
750
|
-
})),
|
|
751
|
-
const { left:
|
|
752
|
-
|
|
753
|
-
|
|
749
|
+
"cell-modified": u.value
|
|
750
|
+
})), b = () => {
|
|
751
|
+
const { left: h, bottom: C, width: M, height: L } = pe(n);
|
|
752
|
+
i.mask, i.modalComponent && e.store.$patch((O) => {
|
|
753
|
+
O.modal.visible = !0, O.modal.colIndex = e.colIndex, O.modal.rowIndex = e.rowIndex, O.modal.left = h, O.modal.bottom = C, O.modal.width = M, O.modal.height = L, O.modal.cell = n.value, typeof i.modalComponent == "function" ? O.modal.component = i.modalComponent({ table: O.table, row: o, column: i }) : O.modal.component = i.modalComponent, O.modal.componentProps = i.modalComponentExtraProps;
|
|
754
754
|
});
|
|
755
755
|
};
|
|
756
756
|
if (e.addNavigation) {
|
|
757
|
-
let
|
|
758
|
-
...
|
|
759
|
-
"keydown.f2":
|
|
760
|
-
"keydown.alt.up":
|
|
761
|
-
"keydown.alt.down":
|
|
762
|
-
"keydown.alt.left":
|
|
763
|
-
"keydown.alt.right":
|
|
757
|
+
let h = {
|
|
758
|
+
...Pe,
|
|
759
|
+
"keydown.f2": b,
|
|
760
|
+
"keydown.alt.up": b,
|
|
761
|
+
"keydown.alt.down": b,
|
|
762
|
+
"keydown.alt.left": b,
|
|
763
|
+
"keydown.alt.right": b
|
|
764
764
|
};
|
|
765
|
-
typeof e.addNavigation == "object" && (
|
|
766
|
-
...
|
|
765
|
+
typeof e.addNavigation == "object" && (h = {
|
|
766
|
+
...h,
|
|
767
767
|
...e.addNavigation
|
|
768
768
|
}), Le([
|
|
769
769
|
{
|
|
770
770
|
selectors: n,
|
|
771
|
-
handlers:
|
|
771
|
+
handlers: h
|
|
772
772
|
}
|
|
773
773
|
]);
|
|
774
774
|
}
|
|
775
|
-
const
|
|
776
|
-
n.value && (
|
|
777
|
-
},
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
},
|
|
775
|
+
const w = () => {
|
|
776
|
+
n.value && (r.value = n.value.textContent);
|
|
777
|
+
}, f = (h) => {
|
|
778
|
+
const C = h.target;
|
|
779
|
+
C.textContent !== r.value && (r.value = C.textContent, i.format ? (u.value = C.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, l), e.store.setCellText(e.colIndex, e.rowIndex, C.textContent)) : (u.value = C.textContent !== l, e.store.setCellData(e.colIndex, e.rowIndex, C.textContent)));
|
|
780
|
+
}, v = Ft(f, e.debounce);
|
|
781
781
|
return t({
|
|
782
|
-
currentData:
|
|
783
|
-
}), (
|
|
782
|
+
currentData: r
|
|
783
|
+
}), (h, C) => (S(), A("td", {
|
|
784
784
|
ref: "cell",
|
|
785
|
-
"data-colindex":
|
|
786
|
-
"data-rowindex":
|
|
787
|
-
"data-editable":
|
|
788
|
-
contenteditable:
|
|
789
|
-
tabindex:
|
|
785
|
+
"data-colindex": h.colIndex,
|
|
786
|
+
"data-rowindex": h.rowIndex,
|
|
787
|
+
"data-editable": x(i).edit,
|
|
788
|
+
contenteditable: x(i).edit,
|
|
789
|
+
tabindex: h.tabIndex,
|
|
790
790
|
spellcheck: !1,
|
|
791
|
-
style: J(
|
|
792
|
-
onFocus:
|
|
793
|
-
onPaste:
|
|
794
|
-
onInput:
|
|
795
|
-
(...M) =>
|
|
796
|
-
onClick:
|
|
797
|
-
class:
|
|
791
|
+
style: J(m.value),
|
|
792
|
+
onFocus: w,
|
|
793
|
+
onPaste: f,
|
|
794
|
+
onInput: C[0] || (C[0] = //@ts-ignore
|
|
795
|
+
(...M) => x(v) && x(v)(...M)),
|
|
796
|
+
onClick: b,
|
|
797
|
+
class: q(["atable-cell", g.value])
|
|
798
798
|
}, [
|
|
799
|
-
|
|
799
|
+
x(i).cellComponent ? (S(), re(fe(x(i).cellComponent), Se({
|
|
800
800
|
key: 0,
|
|
801
|
-
value:
|
|
802
|
-
},
|
|
801
|
+
value: c.value
|
|
802
|
+
}, x(i).cellComponentProps), null, 16, ["value"])) : d.value ? (S(), A("span", {
|
|
803
803
|
key: 1,
|
|
804
|
-
innerHTML:
|
|
805
|
-
}, null, 8,
|
|
806
|
-
], 46,
|
|
804
|
+
innerHTML: c.value
|
|
805
|
+
}, null, 8, Kt)) : (S(), A("span", _t, _(c.value), 1))
|
|
806
|
+
], 46, Zt));
|
|
807
807
|
}
|
|
808
|
-
}),
|
|
808
|
+
}), tn = ["tabindex"], nn = ["tabindex"], on = ["colspan"], ln = /* @__PURE__ */ K({
|
|
809
809
|
__name: "AExpansionRow",
|
|
810
810
|
props: {
|
|
811
811
|
rowIndex: {},
|
|
@@ -816,59 +816,59 @@ const Yt = (e) => {
|
|
|
816
816
|
setup(e) {
|
|
817
817
|
const t = G("rowEl"), n = k(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
818
818
|
if (e.addNavigation) {
|
|
819
|
-
const
|
|
820
|
-
"keydown.control.g": (
|
|
821
|
-
|
|
819
|
+
const l = {
|
|
820
|
+
"keydown.control.g": (r) => {
|
|
821
|
+
r.stopPropagation(), r.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
|
-
typeof e.addNavigation == "object" && Object.assign(
|
|
824
|
+
typeof e.addNavigation == "object" && Object.assign(l, e.addNavigation), Le([
|
|
825
825
|
{
|
|
826
826
|
selectors: t,
|
|
827
|
-
handlers:
|
|
827
|
+
handlers: l
|
|
828
828
|
}
|
|
829
829
|
]);
|
|
830
830
|
}
|
|
831
|
-
return (
|
|
832
|
-
D("tr", Se(
|
|
831
|
+
return (l, r) => (S(), A(ie, null, [
|
|
832
|
+
D("tr", Se(l.$attrs, {
|
|
833
833
|
ref: "rowEl",
|
|
834
|
-
tabindex:
|
|
834
|
+
tabindex: l.tabIndex,
|
|
835
835
|
class: "expandable-row"
|
|
836
836
|
}), [
|
|
837
837
|
D("td", {
|
|
838
838
|
tabIndex: -1,
|
|
839
|
-
onClick:
|
|
839
|
+
onClick: r[0] || (r[0] = (u) => l.store.toggleRowExpand(l.rowIndex)),
|
|
840
840
|
class: "row-index"
|
|
841
841
|
}, _(n.value), 1),
|
|
842
|
-
B(
|
|
843
|
-
], 16,
|
|
844
|
-
|
|
842
|
+
B(l.$slots, "row", {}, void 0, !0)
|
|
843
|
+
], 16, tn),
|
|
844
|
+
l.store.display[l.rowIndex].expanded ? (S(), A("tr", {
|
|
845
845
|
key: 0,
|
|
846
846
|
ref: "rowExpanded",
|
|
847
|
-
tabindex:
|
|
847
|
+
tabindex: l.tabIndex,
|
|
848
848
|
class: "expanded-row"
|
|
849
849
|
}, [
|
|
850
850
|
D("td", {
|
|
851
851
|
tabIndex: -1,
|
|
852
|
-
colspan:
|
|
852
|
+
colspan: l.store.columns.length + 1,
|
|
853
853
|
class: "expanded-row-content"
|
|
854
854
|
}, [
|
|
855
|
-
B(
|
|
856
|
-
], 8,
|
|
857
|
-
], 8,
|
|
855
|
+
B(l.$slots, "content", {}, void 0, !0)
|
|
856
|
+
], 8, on)
|
|
857
|
+
], 8, nn)) : ee("", !0)
|
|
858
858
|
], 64));
|
|
859
859
|
}
|
|
860
860
|
}), ae = (e, t) => {
|
|
861
861
|
const n = e.__vccOpts || e;
|
|
862
|
-
for (const [
|
|
863
|
-
n[
|
|
862
|
+
for (const [l, r] of t)
|
|
863
|
+
n[l] = r;
|
|
864
864
|
return n;
|
|
865
|
-
},
|
|
865
|
+
}, an = /* @__PURE__ */ ae(ln, [["__scopeId", "data-v-5ad4bb41"]]), sn = ["colspan"], rn = {
|
|
866
866
|
ref: "container",
|
|
867
867
|
class: "gantt-handler"
|
|
868
|
-
},
|
|
868
|
+
}, un = {
|
|
869
869
|
key: 0,
|
|
870
870
|
class: "gantt-label"
|
|
871
|
-
},
|
|
871
|
+
}, cn = /* @__PURE__ */ K({
|
|
872
872
|
__name: "AGanttCell",
|
|
873
873
|
props: {
|
|
874
874
|
store: {},
|
|
@@ -882,153 +882,153 @@ const Yt = (e) => {
|
|
|
882
882
|
color: {}
|
|
883
883
|
},
|
|
884
884
|
setup(e) {
|
|
885
|
-
|
|
885
|
+
mt((v) => ({
|
|
886
886
|
"78862e08": t.value,
|
|
887
|
-
"18ad7d98":
|
|
887
|
+
"18ad7d98": v.colspan
|
|
888
888
|
}));
|
|
889
|
-
const t =
|
|
889
|
+
const t = P();
|
|
890
890
|
Z(() => {
|
|
891
891
|
!e.color || e.color == "" || e.color.length < 6 ? t.value = "#cccccc" : t.value = e.color;
|
|
892
892
|
});
|
|
893
|
-
const n = G("container"),
|
|
894
|
-
const
|
|
893
|
+
const n = G("container"), l = G("bar"), r = G("leftHandle"), u = G("rightHandle"), { width: i } = pe(n), { left: o, right: s } = pe(l), a = P(e.start || 0), c = P(e.end || a.value + e.colspan), d = P({ startX: 0, startPos: 0 }), m = k(() => e.colspan > 0 ? i.value / e.colspan : 0), g = k(() => {
|
|
894
|
+
const v = a.value / e.colspan * 100, h = c.value / e.colspan * 100;
|
|
895
895
|
return {
|
|
896
|
-
left: `${
|
|
897
|
-
width: `${
|
|
896
|
+
left: `${v}%`,
|
|
897
|
+
width: `${h - v}%`,
|
|
898
898
|
backgroundColor: t.value
|
|
899
899
|
};
|
|
900
|
-
}), { isDragging:
|
|
900
|
+
}), { isDragging: b } = xe(r, {
|
|
901
901
|
axis: "x",
|
|
902
902
|
onStart: () => {
|
|
903
|
-
|
|
904
|
-
startX:
|
|
905
|
-
startPos:
|
|
903
|
+
l.value && (l.value.style.transition = "none"), d.value = {
|
|
904
|
+
startX: o.value,
|
|
905
|
+
startPos: a.value
|
|
906
906
|
};
|
|
907
907
|
},
|
|
908
|
-
onMove: ({ x:
|
|
909
|
-
if (
|
|
910
|
-
const
|
|
911
|
-
|
|
908
|
+
onMove: ({ x: v }) => {
|
|
909
|
+
if (b.value && l.value) {
|
|
910
|
+
const C = (v - d.value.startX) / m.value, M = Math.max(0, Math.min(c.value - 1, d.value.startPos + C));
|
|
911
|
+
l.value.style.left = `${M / e.colspan * 100}%`, l.value.style.width = `${(c.value - M) / e.colspan * 100}%`;
|
|
912
912
|
}
|
|
913
913
|
},
|
|
914
|
-
onEnd: ({ x:
|
|
915
|
-
if (
|
|
916
|
-
const
|
|
917
|
-
|
|
914
|
+
onEnd: ({ x: v }) => {
|
|
915
|
+
if (l.value) {
|
|
916
|
+
const h = v - d.value.startX, C = Math.round(h / m.value), M = a.value, L = Math.max(0, Math.min(c.value - 1, d.value.startPos + C));
|
|
917
|
+
a.value = L, e.store.updateGanttBar({
|
|
918
918
|
rowIndex: e.rowIndex,
|
|
919
919
|
colIndex: e.colIndex,
|
|
920
920
|
type: "resize",
|
|
921
921
|
edge: "start",
|
|
922
922
|
oldStart: M,
|
|
923
923
|
newStart: L,
|
|
924
|
-
end:
|
|
925
|
-
delta:
|
|
926
|
-
oldColspan:
|
|
927
|
-
newColspan:
|
|
924
|
+
end: c.value,
|
|
925
|
+
delta: C,
|
|
926
|
+
oldColspan: c.value - M,
|
|
927
|
+
newColspan: c.value - L
|
|
928
928
|
});
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
|
-
}), { isDragging:
|
|
931
|
+
}), { isDragging: w } = xe(u, {
|
|
932
932
|
axis: "x",
|
|
933
933
|
onStart: () => {
|
|
934
|
-
|
|
935
|
-
startX:
|
|
936
|
-
startPos:
|
|
934
|
+
l.value && (l.value.style.transition = "none"), d.value = {
|
|
935
|
+
startX: s.value,
|
|
936
|
+
startPos: c.value
|
|
937
937
|
};
|
|
938
938
|
},
|
|
939
|
-
onMove: ({ x:
|
|
940
|
-
if (
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
Math.min(e.columnsCount, d.value.startPos +
|
|
939
|
+
onMove: ({ x: v }) => {
|
|
940
|
+
if (w.value && l.value) {
|
|
941
|
+
const C = (v - d.value.startX) / m.value, M = Math.max(
|
|
942
|
+
a.value + 1,
|
|
943
|
+
Math.min(e.columnsCount, d.value.startPos + C)
|
|
944
944
|
);
|
|
945
|
-
|
|
945
|
+
l.value.style.width = `${(M - a.value) / e.colspan * 100}%`;
|
|
946
946
|
}
|
|
947
947
|
},
|
|
948
|
-
onEnd: ({ x:
|
|
949
|
-
if (
|
|
950
|
-
const
|
|
951
|
-
|
|
952
|
-
Math.min(e.columnsCount, d.value.startPos +
|
|
948
|
+
onEnd: ({ x: v }) => {
|
|
949
|
+
if (l.value) {
|
|
950
|
+
const h = v - d.value.startX, C = Math.round(h / m.value), M = c.value, L = Math.max(
|
|
951
|
+
a.value + 1,
|
|
952
|
+
Math.min(e.columnsCount, d.value.startPos + C)
|
|
953
953
|
);
|
|
954
|
-
|
|
954
|
+
c.value = L, e.store.updateGanttBar({
|
|
955
955
|
rowIndex: e.rowIndex,
|
|
956
956
|
colIndex: e.colIndex,
|
|
957
957
|
type: "resize",
|
|
958
958
|
edge: "end",
|
|
959
959
|
oldEnd: M,
|
|
960
960
|
newEnd: L,
|
|
961
|
-
start:
|
|
962
|
-
delta:
|
|
963
|
-
oldColspan: M -
|
|
964
|
-
newColspan: L -
|
|
961
|
+
start: a.value,
|
|
962
|
+
delta: C,
|
|
963
|
+
oldColspan: M - a.value,
|
|
964
|
+
newColspan: L - a.value
|
|
965
965
|
});
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
}), { isDragging:
|
|
968
|
+
}), { isDragging: f } = xe(l, {
|
|
969
969
|
exact: !0,
|
|
970
970
|
// to avoid triggering when the left and right handles are being used
|
|
971
971
|
axis: "x",
|
|
972
972
|
onStart: () => {
|
|
973
|
-
|
|
974
|
-
startX:
|
|
975
|
-
startPos:
|
|
973
|
+
l.value && (l.value.style.transition = "none"), d.value = {
|
|
974
|
+
startX: o.value,
|
|
975
|
+
startPos: a.value
|
|
976
976
|
};
|
|
977
977
|
},
|
|
978
|
-
onMove: ({ x:
|
|
979
|
-
if (
|
|
980
|
-
const
|
|
981
|
-
|
|
978
|
+
onMove: ({ x: v }) => {
|
|
979
|
+
if (f.value && l.value) {
|
|
980
|
+
const C = (v - d.value.startX) / m.value, M = c.value - a.value, L = Math.max(0, Math.min(d.value.startPos + C, e.columnsCount - M));
|
|
981
|
+
l.value.style.left = `${L / e.colspan * 100}%`;
|
|
982
982
|
}
|
|
983
983
|
},
|
|
984
|
-
onEnd: ({ x:
|
|
985
|
-
if (
|
|
986
|
-
const
|
|
987
|
-
let
|
|
988
|
-
|
|
984
|
+
onEnd: ({ x: v }) => {
|
|
985
|
+
if (l.value) {
|
|
986
|
+
const h = v - d.value.startX, C = Math.round(h / m.value), M = c.value - a.value, L = a.value, O = c.value;
|
|
987
|
+
let I = d.value.startPos + C, T = I + M;
|
|
988
|
+
I < 0 ? (I = 0, T = M) : T > e.columnsCount && (T = e.columnsCount, I = T - M), a.value = I, c.value = T, e.store.updateGanttBar({
|
|
989
989
|
rowIndex: e.rowIndex,
|
|
990
990
|
colIndex: e.colIndex,
|
|
991
991
|
type: "bar",
|
|
992
992
|
oldStart: L,
|
|
993
|
-
oldEnd:
|
|
994
|
-
newStart:
|
|
993
|
+
oldEnd: O,
|
|
994
|
+
newStart: I,
|
|
995
995
|
newEnd: T,
|
|
996
|
-
delta:
|
|
997
|
-
colspan: T -
|
|
996
|
+
delta: C,
|
|
997
|
+
colspan: T - I
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
});
|
|
1002
|
-
return (
|
|
1002
|
+
return (v, h) => (S(), A("td", {
|
|
1003
1003
|
class: "aganttcell",
|
|
1004
|
-
colspan:
|
|
1004
|
+
colspan: v.colspan
|
|
1005
1005
|
}, [
|
|
1006
|
-
D("div",
|
|
1006
|
+
D("div", rn, [
|
|
1007
1007
|
D("div", {
|
|
1008
1008
|
ref: "bar",
|
|
1009
|
-
class:
|
|
1010
|
-
style: J(
|
|
1009
|
+
class: q(["gantt-bar", { "is-dragging": x(f) || x(b) || x(w) }]),
|
|
1010
|
+
style: J(g.value)
|
|
1011
1011
|
}, [
|
|
1012
1012
|
D("div", {
|
|
1013
1013
|
ref: "leftHandle",
|
|
1014
|
-
class:
|
|
1015
|
-
},
|
|
1014
|
+
class: q(["gantt-handle left-handle", { "is-dragging": x(b) }])
|
|
1015
|
+
}, h[0] || (h[0] = [
|
|
1016
1016
|
D("div", { class: "handle-grip" }, null, -1),
|
|
1017
1017
|
D("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
1018
1018
|
]), 2),
|
|
1019
|
-
|
|
1019
|
+
v.label ? (S(), A("label", un, _(v.label), 1)) : ee("", !0),
|
|
1020
1020
|
D("div", {
|
|
1021
1021
|
ref: "rightHandle",
|
|
1022
|
-
class:
|
|
1023
|
-
},
|
|
1022
|
+
class: q(["gantt-handle right-handle", { "is-dragging": x(w) }])
|
|
1023
|
+
}, h[1] || (h[1] = [
|
|
1024
1024
|
D("div", { class: "handle-grip" }, null, -1),
|
|
1025
1025
|
D("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
1026
1026
|
]), 2)
|
|
1027
1027
|
], 6)
|
|
1028
1028
|
], 512)
|
|
1029
|
-
], 8,
|
|
1029
|
+
], 8, sn));
|
|
1030
1030
|
}
|
|
1031
|
-
}),
|
|
1031
|
+
}), dn = /* @__PURE__ */ ae(cn, [["__scopeId", "data-v-a929e8e3"]]), fn = ["tabindex"], vn = /* @__PURE__ */ K({
|
|
1032
1032
|
__name: "ARow",
|
|
1033
1033
|
props: {
|
|
1034
1034
|
rowIndex: {},
|
|
@@ -1037,277 +1037,277 @@ const Yt = (e) => {
|
|
|
1037
1037
|
addNavigation: { type: [Boolean, Object], default: !1 }
|
|
1038
1038
|
},
|
|
1039
1039
|
setup(e) {
|
|
1040
|
-
const t = G("rowEl"), n = k(() => e.store.isRowVisible(e.rowIndex)),
|
|
1040
|
+
const t = G("rowEl"), n = k(() => e.store.isRowVisible(e.rowIndex)), l = k(() => e.store.getRowExpandSymbol(e.rowIndex));
|
|
1041
1041
|
if (e.addNavigation) {
|
|
1042
|
-
let
|
|
1043
|
-
typeof e.addNavigation == "object" && (
|
|
1044
|
-
...
|
|
1042
|
+
let r = Pe;
|
|
1043
|
+
typeof e.addNavigation == "object" && (r = {
|
|
1044
|
+
...r,
|
|
1045
1045
|
...e.addNavigation
|
|
1046
1046
|
}), Le([
|
|
1047
1047
|
{
|
|
1048
1048
|
selectors: t,
|
|
1049
|
-
handlers:
|
|
1049
|
+
handlers: r
|
|
1050
1050
|
}
|
|
1051
1051
|
]);
|
|
1052
1052
|
}
|
|
1053
|
-
return (
|
|
1053
|
+
return (r, u) => he((S(), A("tr", {
|
|
1054
1054
|
ref: "rowEl",
|
|
1055
|
-
tabindex:
|
|
1055
|
+
tabindex: r.tabIndex,
|
|
1056
1056
|
class: "atable-row"
|
|
1057
1057
|
}, [
|
|
1058
|
-
|
|
1059
|
-
|
|
1058
|
+
r.store.config.view !== "uncounted" ? B(r.$slots, "index", { key: 0 }, () => [
|
|
1059
|
+
r.store.config.view === "list" ? (S(), A("td", {
|
|
1060
1060
|
key: 0,
|
|
1061
1061
|
tabIndex: -1,
|
|
1062
|
-
class:
|
|
1063
|
-
}, _(
|
|
1062
|
+
class: q(["list-index", r.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1063
|
+
}, _(r.rowIndex + 1), 3)) : r.store.config.view === "tree" ? (S(), A("td", {
|
|
1064
1064
|
key: 1,
|
|
1065
1065
|
tabIndex: -1,
|
|
1066
|
-
class:
|
|
1067
|
-
onClick:
|
|
1068
|
-
}, _(
|
|
1066
|
+
class: q(["tree-index", r.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1067
|
+
onClick: u[0] || (u[0] = (i) => r.store.toggleRowExpand(r.rowIndex))
|
|
1068
|
+
}, _(l.value), 3)) : ee("", !0)
|
|
1069
1069
|
], !0) : ee("", !0),
|
|
1070
|
-
B(
|
|
1071
|
-
], 8,
|
|
1072
|
-
[
|
|
1070
|
+
B(r.$slots, "default", {}, void 0, !0)
|
|
1071
|
+
], 8, fn)), [
|
|
1072
|
+
[_e, n.value]
|
|
1073
1073
|
]);
|
|
1074
1074
|
}
|
|
1075
|
-
}),
|
|
1076
|
-
function
|
|
1075
|
+
}), lt = /* @__PURE__ */ ae(vn, [["__scopeId", "data-v-4cb4f254"]]), De = we ? window : void 0;
|
|
1076
|
+
function Y(e) {
|
|
1077
1077
|
var t;
|
|
1078
|
-
const n =
|
|
1078
|
+
const n = E(e);
|
|
1079
1079
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1080
1080
|
}
|
|
1081
1081
|
function me(...e) {
|
|
1082
1082
|
const t = [], n = () => {
|
|
1083
|
-
t.forEach((
|
|
1084
|
-
},
|
|
1085
|
-
const
|
|
1086
|
-
return
|
|
1087
|
-
}),
|
|
1083
|
+
t.forEach((o) => o()), t.length = 0;
|
|
1084
|
+
}, l = (o, s, a, c) => (o.addEventListener(s, a, c), () => o.removeEventListener(s, a, c)), r = k(() => {
|
|
1085
|
+
const o = Q(E(e[0])).filter((s) => s != null);
|
|
1086
|
+
return o.every((s) => typeof s != "string") ? o : void 0;
|
|
1087
|
+
}), u = tt(
|
|
1088
1088
|
() => {
|
|
1089
|
-
var
|
|
1089
|
+
var o, s;
|
|
1090
1090
|
return [
|
|
1091
|
-
(
|
|
1092
|
-
Q(
|
|
1093
|
-
Q(
|
|
1091
|
+
(s = (o = r.value) == null ? void 0 : o.map((a) => Y(a))) != null ? s : [De].filter((a) => a != null),
|
|
1092
|
+
Q(E(r.value ? e[1] : e[0])),
|
|
1093
|
+
Q(x(r.value ? e[2] : e[1])),
|
|
1094
1094
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1095
|
-
|
|
1095
|
+
E(r.value ? e[3] : e[2])
|
|
1096
1096
|
];
|
|
1097
1097
|
},
|
|
1098
|
-
([
|
|
1099
|
-
if (n(), !(
|
|
1098
|
+
([o, s, a, c]) => {
|
|
1099
|
+
if (n(), !(o != null && o.length) || !(s != null && s.length) || !(a != null && a.length))
|
|
1100
1100
|
return;
|
|
1101
|
-
const d =
|
|
1101
|
+
const d = et(c) ? { ...c } : c;
|
|
1102
1102
|
t.push(
|
|
1103
|
-
...
|
|
1104
|
-
(
|
|
1105
|
-
(
|
|
1103
|
+
...o.flatMap(
|
|
1104
|
+
(m) => s.flatMap(
|
|
1105
|
+
(g) => a.map((b) => l(m, g, b, d))
|
|
1106
1106
|
)
|
|
1107
1107
|
)
|
|
1108
1108
|
);
|
|
1109
1109
|
},
|
|
1110
1110
|
{ flush: "post" }
|
|
1111
|
-
),
|
|
1112
|
-
|
|
1111
|
+
), i = () => {
|
|
1112
|
+
u(), n();
|
|
1113
1113
|
};
|
|
1114
|
-
return le(n),
|
|
1114
|
+
return le(n), i;
|
|
1115
1115
|
}
|
|
1116
|
-
let
|
|
1117
|
-
function
|
|
1118
|
-
const { window:
|
|
1119
|
-
if (!
|
|
1120
|
-
return
|
|
1121
|
-
if (Me && !
|
|
1122
|
-
|
|
1123
|
-
const
|
|
1124
|
-
Array.from(
|
|
1116
|
+
let Ue = !1;
|
|
1117
|
+
function qe(e, t, n = {}) {
|
|
1118
|
+
const { window: l = De, ignore: r = [], capture: u = !0, detectIframe: i = !1, controls: o = !1 } = n;
|
|
1119
|
+
if (!l)
|
|
1120
|
+
return o ? { stop: V, cancel: V, trigger: V } : V;
|
|
1121
|
+
if (Me && !Ue) {
|
|
1122
|
+
Ue = !0;
|
|
1123
|
+
const f = { passive: !0 };
|
|
1124
|
+
Array.from(l.document.body.children).forEach((v) => v.addEventListener("click", V, f)), l.document.documentElement.addEventListener("click", V, f);
|
|
1125
1125
|
}
|
|
1126
|
-
let
|
|
1127
|
-
const
|
|
1128
|
-
if (typeof
|
|
1129
|
-
return Array.from(
|
|
1126
|
+
let s = !0;
|
|
1127
|
+
const a = (f) => E(r).some((v) => {
|
|
1128
|
+
if (typeof v == "string")
|
|
1129
|
+
return Array.from(l.document.querySelectorAll(v)).some((h) => h === f.target || f.composedPath().includes(h));
|
|
1130
1130
|
{
|
|
1131
|
-
const
|
|
1132
|
-
return
|
|
1131
|
+
const h = Y(v);
|
|
1132
|
+
return h && (f.target === h || f.composedPath().includes(h));
|
|
1133
1133
|
}
|
|
1134
1134
|
});
|
|
1135
|
-
function
|
|
1136
|
-
const
|
|
1137
|
-
return
|
|
1135
|
+
function c(f) {
|
|
1136
|
+
const v = E(f);
|
|
1137
|
+
return v && v.$.subTree.shapeFlag === 16;
|
|
1138
1138
|
}
|
|
1139
|
-
function d(
|
|
1140
|
-
const
|
|
1141
|
-
return
|
|
1139
|
+
function d(f, v) {
|
|
1140
|
+
const h = E(f), C = h.$.subTree && h.$.subTree.children;
|
|
1141
|
+
return C == null || !Array.isArray(C) ? !1 : C.some((M) => M.el === v.target || v.composedPath().includes(M.el));
|
|
1142
1142
|
}
|
|
1143
|
-
const
|
|
1144
|
-
const
|
|
1145
|
-
if (
|
|
1146
|
-
if ("detail" in
|
|
1147
|
-
|
|
1143
|
+
const m = (f) => {
|
|
1144
|
+
const v = Y(e);
|
|
1145
|
+
if (f.target != null && !(!(v instanceof Element) && c(e) && d(e, f)) && !(!v || v === f.target || f.composedPath().includes(v))) {
|
|
1146
|
+
if ("detail" in f && f.detail === 0 && (s = !a(f)), !s) {
|
|
1147
|
+
s = !0;
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
|
-
t(
|
|
1150
|
+
t(f);
|
|
1151
1151
|
}
|
|
1152
1152
|
};
|
|
1153
|
-
let
|
|
1154
|
-
const
|
|
1155
|
-
me(
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
}, 0), f
|
|
1159
|
-
}, { passive: !0, capture:
|
|
1160
|
-
me(
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1153
|
+
let g = !1;
|
|
1154
|
+
const b = [
|
|
1155
|
+
me(l, "click", (f) => {
|
|
1156
|
+
g || (g = !0, setTimeout(() => {
|
|
1157
|
+
g = !1;
|
|
1158
|
+
}, 0), m(f));
|
|
1159
|
+
}, { passive: !0, capture: u }),
|
|
1160
|
+
me(l, "pointerdown", (f) => {
|
|
1161
|
+
const v = Y(e);
|
|
1162
|
+
s = !a(f) && !!(v && !f.composedPath().includes(v));
|
|
1163
1163
|
}, { passive: !0 }),
|
|
1164
|
-
|
|
1164
|
+
i && me(l, "blur", (f) => {
|
|
1165
1165
|
setTimeout(() => {
|
|
1166
|
-
var
|
|
1167
|
-
const
|
|
1168
|
-
((
|
|
1166
|
+
var v;
|
|
1167
|
+
const h = Y(e);
|
|
1168
|
+
((v = l.document.activeElement) == null ? void 0 : v.tagName) === "IFRAME" && !(h != null && h.contains(l.document.activeElement)) && t(f);
|
|
1169
1169
|
}, 0);
|
|
1170
1170
|
}, { passive: !0 })
|
|
1171
|
-
].filter(Boolean),
|
|
1172
|
-
return
|
|
1173
|
-
stop:
|
|
1171
|
+
].filter(Boolean), w = () => b.forEach((f) => f());
|
|
1172
|
+
return o ? {
|
|
1173
|
+
stop: w,
|
|
1174
1174
|
cancel: () => {
|
|
1175
|
-
|
|
1175
|
+
s = !1;
|
|
1176
1176
|
},
|
|
1177
|
-
trigger: (
|
|
1178
|
-
|
|
1177
|
+
trigger: (f) => {
|
|
1178
|
+
s = !0, m(f), s = !1;
|
|
1179
1179
|
}
|
|
1180
|
-
} :
|
|
1180
|
+
} : w;
|
|
1181
1181
|
}
|
|
1182
|
-
const Ce = /* @__PURE__ */ new WeakMap(),
|
|
1182
|
+
const Ce = /* @__PURE__ */ new WeakMap(), mn = {
|
|
1183
1183
|
mounted(e, t) {
|
|
1184
1184
|
const n = !t.modifiers.bubble;
|
|
1185
|
-
let
|
|
1185
|
+
let l;
|
|
1186
1186
|
if (typeof t.value == "function")
|
|
1187
|
-
|
|
1187
|
+
l = qe(e, t.value, { capture: n });
|
|
1188
1188
|
else {
|
|
1189
|
-
const [
|
|
1190
|
-
|
|
1189
|
+
const [r, u] = t.value;
|
|
1190
|
+
l = qe(e, r, Object.assign({ capture: n }, u));
|
|
1191
1191
|
}
|
|
1192
|
-
Ce.set(e,
|
|
1192
|
+
Ce.set(e, l);
|
|
1193
1193
|
},
|
|
1194
1194
|
unmounted(e) {
|
|
1195
1195
|
const t = Ce.get(e);
|
|
1196
1196
|
t && typeof t == "function" ? t() : t == null || t.stop(), Ce.delete(e);
|
|
1197
1197
|
}
|
|
1198
1198
|
};
|
|
1199
|
-
function
|
|
1199
|
+
function hn() {
|
|
1200
1200
|
const e = H(!1), t = ge();
|
|
1201
1201
|
return t && Z(() => {
|
|
1202
1202
|
e.value = !0;
|
|
1203
1203
|
}, t), e;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
const t =
|
|
1205
|
+
function pn(e) {
|
|
1206
|
+
const t = hn();
|
|
1207
1207
|
return k(() => (t.value, !!e()));
|
|
1208
1208
|
}
|
|
1209
1209
|
function Ye(e, t, n = {}) {
|
|
1210
|
-
const { window:
|
|
1211
|
-
let
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
},
|
|
1215
|
-
const d =
|
|
1216
|
-
return Array.isArray(d) ? d.map((
|
|
1217
|
-
}),
|
|
1218
|
-
|
|
1210
|
+
const { window: l = De, ...r } = n;
|
|
1211
|
+
let u;
|
|
1212
|
+
const i = pn(() => l && "ResizeObserver" in l), o = () => {
|
|
1213
|
+
u && (u.disconnect(), u = void 0);
|
|
1214
|
+
}, s = k(() => {
|
|
1215
|
+
const d = E(e);
|
|
1216
|
+
return Array.isArray(d) ? d.map((m) => Y(m)) : [Y(d)];
|
|
1217
|
+
}), a = N(
|
|
1218
|
+
s,
|
|
1219
1219
|
(d) => {
|
|
1220
|
-
if (
|
|
1221
|
-
|
|
1222
|
-
for (const
|
|
1223
|
-
|
|
1220
|
+
if (o(), i.value && l) {
|
|
1221
|
+
u = new ResizeObserver(t);
|
|
1222
|
+
for (const m of d)
|
|
1223
|
+
m && u.observe(m, r);
|
|
1224
1224
|
}
|
|
1225
1225
|
},
|
|
1226
1226
|
{ immediate: !0, flush: "post" }
|
|
1227
|
-
),
|
|
1228
|
-
|
|
1227
|
+
), c = () => {
|
|
1228
|
+
o(), a();
|
|
1229
1229
|
};
|
|
1230
|
-
return le(
|
|
1231
|
-
isSupported:
|
|
1232
|
-
stop:
|
|
1230
|
+
return le(c), {
|
|
1231
|
+
isSupported: i,
|
|
1232
|
+
stop: c
|
|
1233
1233
|
};
|
|
1234
1234
|
}
|
|
1235
1235
|
function Ee(e) {
|
|
1236
1236
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
1237
1237
|
}
|
|
1238
|
-
const
|
|
1238
|
+
const gn = {
|
|
1239
1239
|
mounted(e, t) {
|
|
1240
1240
|
typeof t.value == "function" ? Ye(e, t.value) : Ye(e, ...t.value);
|
|
1241
1241
|
}
|
|
1242
1242
|
};
|
|
1243
|
-
function
|
|
1243
|
+
function at(e) {
|
|
1244
1244
|
const t = window.getComputedStyle(e);
|
|
1245
1245
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
1246
1246
|
return !0;
|
|
1247
1247
|
{
|
|
1248
1248
|
const n = e.parentNode;
|
|
1249
|
-
return !n || n.tagName === "BODY" ? !1 :
|
|
1249
|
+
return !n || n.tagName === "BODY" ? !1 : at(n);
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function wn(e) {
|
|
1253
1253
|
const t = e || window.event, n = t.target;
|
|
1254
|
-
return
|
|
1254
|
+
return at(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
1255
1255
|
}
|
|
1256
1256
|
const Ie = /* @__PURE__ */ new WeakMap();
|
|
1257
|
-
function
|
|
1257
|
+
function yn(e, t = !1) {
|
|
1258
1258
|
const n = H(t);
|
|
1259
|
-
let
|
|
1260
|
-
|
|
1261
|
-
const
|
|
1262
|
-
if (
|
|
1263
|
-
const
|
|
1264
|
-
if (Ie.get(
|
|
1259
|
+
let l = null, r = "";
|
|
1260
|
+
N(Nt(e), (o) => {
|
|
1261
|
+
const s = Ee(E(o));
|
|
1262
|
+
if (s) {
|
|
1263
|
+
const a = s;
|
|
1264
|
+
if (Ie.get(a) || Ie.set(a, a.style.overflow), a.style.overflow !== "hidden" && (r = a.style.overflow), a.style.overflow === "hidden")
|
|
1265
1265
|
return n.value = !0;
|
|
1266
1266
|
if (n.value)
|
|
1267
|
-
return
|
|
1267
|
+
return a.style.overflow = "hidden";
|
|
1268
1268
|
}
|
|
1269
1269
|
}, {
|
|
1270
1270
|
immediate: !0
|
|
1271
1271
|
});
|
|
1272
|
-
const
|
|
1273
|
-
const
|
|
1274
|
-
!
|
|
1275
|
-
|
|
1272
|
+
const u = () => {
|
|
1273
|
+
const o = Ee(E(e));
|
|
1274
|
+
!o || n.value || (Me && (l = me(
|
|
1275
|
+
o,
|
|
1276
1276
|
"touchmove",
|
|
1277
|
-
(
|
|
1278
|
-
|
|
1277
|
+
(s) => {
|
|
1278
|
+
wn(s);
|
|
1279
1279
|
},
|
|
1280
1280
|
{ passive: !1 }
|
|
1281
|
-
)),
|
|
1282
|
-
},
|
|
1283
|
-
const
|
|
1284
|
-
!
|
|
1281
|
+
)), o.style.overflow = "hidden", n.value = !0);
|
|
1282
|
+
}, i = () => {
|
|
1283
|
+
const o = Ee(E(e));
|
|
1284
|
+
!o || !n.value || (Me && (l == null || l()), o.style.overflow = r, Ie.delete(o), n.value = !1);
|
|
1285
1285
|
};
|
|
1286
|
-
return le(
|
|
1286
|
+
return le(i), k({
|
|
1287
1287
|
get() {
|
|
1288
1288
|
return n.value;
|
|
1289
1289
|
},
|
|
1290
|
-
set(
|
|
1291
|
-
|
|
1290
|
+
set(o) {
|
|
1291
|
+
o ? u() : i();
|
|
1292
1292
|
}
|
|
1293
1293
|
});
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function bn() {
|
|
1296
1296
|
let e = !1;
|
|
1297
1297
|
const t = H(!1);
|
|
1298
|
-
return (n,
|
|
1299
|
-
if (t.value =
|
|
1298
|
+
return (n, l) => {
|
|
1299
|
+
if (t.value = l.value, e)
|
|
1300
1300
|
return;
|
|
1301
1301
|
e = !0;
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1302
|
+
const r = yn(n, l.value);
|
|
1303
|
+
N(t, (u) => r.value = u);
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1307
|
-
const
|
|
1306
|
+
bn();
|
|
1307
|
+
const xn = { key: 0 }, Cn = {
|
|
1308
1308
|
class: "atable-header-row",
|
|
1309
1309
|
tabindex: "-1"
|
|
1310
|
-
},
|
|
1310
|
+
}, En = ["data-colindex"], st = /* @__PURE__ */ K({
|
|
1311
1311
|
__name: "ATableHeader",
|
|
1312
1312
|
props: {
|
|
1313
1313
|
columns: {},
|
|
@@ -1315,89 +1315,89 @@ const yn = { key: 0 }, bn = {
|
|
|
1315
1315
|
},
|
|
1316
1316
|
setup(e) {
|
|
1317
1317
|
const t = (n) => {
|
|
1318
|
-
var
|
|
1319
|
-
for (const
|
|
1320
|
-
if (
|
|
1321
|
-
const
|
|
1322
|
-
typeof
|
|
1318
|
+
var l;
|
|
1319
|
+
for (const r of n) {
|
|
1320
|
+
if (r.borderBoxSize.length === 0) continue;
|
|
1321
|
+
const i = r.borderBoxSize[0].inlineSize, o = Number(r.target.dataset.colindex), s = (l = e.store.columns[o]) == null ? void 0 : l.width;
|
|
1322
|
+
typeof s == "number" && s !== i && e.store.resizeColumn(o, i);
|
|
1323
1323
|
}
|
|
1324
1324
|
};
|
|
1325
|
-
return (n,
|
|
1326
|
-
D("tr",
|
|
1325
|
+
return (n, l) => n.columns.length ? (S(), A("thead", xn, [
|
|
1326
|
+
D("tr", Cn, [
|
|
1327
1327
|
n.store.zeroColumn ? (S(), A("th", {
|
|
1328
1328
|
key: 0,
|
|
1329
1329
|
id: "header-index",
|
|
1330
|
-
class:
|
|
1330
|
+
class: q([[
|
|
1331
1331
|
n.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1332
1332
|
n.store.config.view === "tree" ? "tree-index" : "",
|
|
1333
1333
|
n.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1334
1334
|
], "list-index"])
|
|
1335
1335
|
}, null, 2)) : ee("", !0),
|
|
1336
|
-
(S(!0), A(ie, null, ke(n.columns, (
|
|
1337
|
-
key:
|
|
1338
|
-
"data-colindex":
|
|
1336
|
+
(S(!0), A(ie, null, ke(n.columns, (r, u) => he((S(), A("th", {
|
|
1337
|
+
key: r.name,
|
|
1338
|
+
"data-colindex": u,
|
|
1339
1339
|
tabindex: "-1",
|
|
1340
|
-
style: J(n.store.getHeaderCellStyle(
|
|
1341
|
-
class:
|
|
1340
|
+
style: J(n.store.getHeaderCellStyle(r)),
|
|
1341
|
+
class: q(r.pinned ? "sticky-column" : "")
|
|
1342
1342
|
}, [
|
|
1343
1343
|
B(n.$slots, "default", {}, () => [
|
|
1344
|
-
|
|
1344
|
+
ht(_(r.label || String.fromCharCode(u + 97).toUpperCase()), 1)
|
|
1345
1345
|
])
|
|
1346
|
-
], 14,
|
|
1347
|
-
[
|
|
1346
|
+
], 14, En)), [
|
|
1347
|
+
[x(gn), t]
|
|
1348
1348
|
])), 128))
|
|
1349
1349
|
])
|
|
1350
1350
|
])) : ee("", !0);
|
|
1351
1351
|
}
|
|
1352
|
-
}),
|
|
1352
|
+
}), rt = /* @__PURE__ */ K({
|
|
1353
1353
|
__name: "ATableModal",
|
|
1354
1354
|
props: {
|
|
1355
1355
|
store: {}
|
|
1356
1356
|
},
|
|
1357
1357
|
setup(e) {
|
|
1358
|
-
const t = G("amodal"), { width: n, height:
|
|
1359
|
-
var d,
|
|
1358
|
+
const t = G("amodal"), { width: n, height: l } = pe(t), r = k(() => {
|
|
1359
|
+
var d, m, g, b;
|
|
1360
1360
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1361
|
-
const
|
|
1362
|
-
let
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1365
|
-
let
|
|
1366
|
-
return
|
|
1367
|
-
left: `${
|
|
1368
|
-
top: `${
|
|
1361
|
+
const u = (d = e.store.modal.cell) == null ? void 0 : d.closest("table"), i = u.offsetHeight || 0, o = u.offsetWidth || 0;
|
|
1362
|
+
let s = ((m = e.store.modal.cell) == null ? void 0 : m.offsetTop) || 0;
|
|
1363
|
+
const a = ((g = u.querySelector("thead")) == null ? void 0 : g.offsetHeight) || 0;
|
|
1364
|
+
s += a, s = s + l.value < i ? s : s - (l.value + e.store.modal.height);
|
|
1365
|
+
let c = ((b = e.store.modal.cell) == null ? void 0 : b.offsetLeft) || 0;
|
|
1366
|
+
return c = c + n.value <= o ? c : c - (n.value - e.store.modal.width), {
|
|
1367
|
+
left: `${c}px`,
|
|
1368
|
+
top: `${s}px`
|
|
1369
1369
|
};
|
|
1370
1370
|
});
|
|
1371
|
-
return (
|
|
1371
|
+
return (u, i) => (S(), A("div", {
|
|
1372
1372
|
class: "amodal",
|
|
1373
1373
|
ref: "amodal",
|
|
1374
1374
|
tabindex: "-1",
|
|
1375
|
-
onClick:
|
|
1375
|
+
onClick: i[0] || (i[0] = We(() => {
|
|
1376
1376
|
}, ["stop"])),
|
|
1377
|
-
onInput:
|
|
1377
|
+
onInput: i[1] || (i[1] = We(() => {
|
|
1378
1378
|
}, ["stop"])),
|
|
1379
|
-
style: J(
|
|
1379
|
+
style: J(r.value)
|
|
1380
1380
|
}, [
|
|
1381
|
-
B(
|
|
1381
|
+
B(u.$slots, "default")
|
|
1382
1382
|
], 36));
|
|
1383
1383
|
}
|
|
1384
|
-
}),
|
|
1385
|
-
const t = e.id ||
|
|
1386
|
-
return
|
|
1387
|
-
const
|
|
1384
|
+
}), In = (e) => {
|
|
1385
|
+
const t = e.id || Qt();
|
|
1386
|
+
return gt(`table-${t}`, () => {
|
|
1387
|
+
const l = () => {
|
|
1388
1388
|
const p = {};
|
|
1389
|
-
for (const [
|
|
1390
|
-
for (const [R, W] of
|
|
1391
|
-
p[`${
|
|
1389
|
+
for (const [y, $] of u.value.entries())
|
|
1390
|
+
for (const [R, W] of i.value.entries())
|
|
1391
|
+
p[`${y}:${R}`] = W[$.name];
|
|
1392
1392
|
return p;
|
|
1393
|
-
},
|
|
1394
|
-
const
|
|
1393
|
+
}, r = (p) => {
|
|
1394
|
+
const y = [Object.assign({}, { rowModified: !1 })];
|
|
1395
1395
|
if (p && "0:0" in p)
|
|
1396
1396
|
return p;
|
|
1397
1397
|
const $ = /* @__PURE__ */ new Set();
|
|
1398
|
-
for (let R =
|
|
1399
|
-
const W =
|
|
1400
|
-
W.parent && $.add(W.parent),
|
|
1398
|
+
for (let R = i.value.length - 1; R >= 0; R--) {
|
|
1399
|
+
const W = i.value[R];
|
|
1400
|
+
W.parent && $.add(W.parent), y[R] = {
|
|
1401
1401
|
childrenOpen: !1,
|
|
1402
1402
|
expanded: !1,
|
|
1403
1403
|
indent: W.indent || 0,
|
|
@@ -1408,17 +1408,20 @@ const yn = { key: 0 }, bn = {
|
|
|
1408
1408
|
parent: W.parent
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
1411
|
-
return
|
|
1412
|
-
},
|
|
1413
|
-
() =>
|
|
1414
|
-
),
|
|
1415
|
-
const R = `${p}:${
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
},
|
|
1421
|
-
const
|
|
1411
|
+
return y;
|
|
1412
|
+
}, u = P(e.columns), i = P(e.rows), o = P(e.config || {}), s = P(e.table || l()), a = P(r(e.display)), c = P(e.modal || { visible: !1 }), d = P({}), m = k(() => u.value.some((p) => p.pinned)), g = k(() => `${Math.ceil(i.value.length / 100 + 1)}ch`), b = k(
|
|
1413
|
+
() => o.value.view ? ["list", "tree", "list-expansion"].includes(o.value.view) : !1
|
|
1414
|
+
), w = (p, y) => s.value[`${p}:${y}`], f = (p, y, $) => {
|
|
1415
|
+
const R = `${p}:${y}`, W = u.value[p];
|
|
1416
|
+
s.value[R] !== $ && (a.value[y].rowModified = !0), s.value[R] = $, i.value[y] = {
|
|
1417
|
+
...i.value[y],
|
|
1418
|
+
[W.name]: $
|
|
1419
|
+
};
|
|
1420
|
+
}, v = (p, y, $) => {
|
|
1421
|
+
const R = `${p}:${y}`;
|
|
1422
|
+
s.value[R] !== $ && (a.value[y].rowModified = !0, d.value[R] = $);
|
|
1423
|
+
}, h = (p) => {
|
|
1424
|
+
const y = u.value.indexOf(p) === u.value.length - 1, $ = o.value.fullWidth ? p.resizable && !y : p.resizable;
|
|
1422
1425
|
return {
|
|
1423
1426
|
width: p.width || "40ch",
|
|
1424
1427
|
textAlign: p.align || "center",
|
|
@@ -1428,193 +1431,195 @@ const yn = { key: 0 }, bn = {
|
|
|
1428
1431
|
whiteSpace: "nowrap"
|
|
1429
1432
|
}
|
|
1430
1433
|
};
|
|
1431
|
-
},
|
|
1432
|
-
if (p < 0 || p >=
|
|
1433
|
-
const R = Math.max(
|
|
1434
|
-
|
|
1435
|
-
...
|
|
1434
|
+
}, C = (p, y) => {
|
|
1435
|
+
if (p < 0 || p >= u.value.length) return;
|
|
1436
|
+
const R = Math.max(y, 40);
|
|
1437
|
+
u.value[p] = {
|
|
1438
|
+
...u.value[p],
|
|
1436
1439
|
width: `${R}px`
|
|
1437
1440
|
};
|
|
1438
1441
|
}, M = (p) => {
|
|
1439
|
-
const
|
|
1440
|
-
return
|
|
1441
|
-
}, L = (p) =>
|
|
1442
|
-
if (
|
|
1443
|
-
|
|
1444
|
-
for (let
|
|
1445
|
-
|
|
1446
|
-
} else
|
|
1447
|
-
}, T = (p,
|
|
1448
|
-
const $ =
|
|
1449
|
-
return z(p,
|
|
1450
|
-
}, z = (p,
|
|
1451
|
-
const R =
|
|
1452
|
-
return se ? typeof se == "function" ? se($, { table:
|
|
1442
|
+
const y = i.value[p];
|
|
1443
|
+
return o.value.view === "gantt" && y.indent === 0;
|
|
1444
|
+
}, L = (p) => o.value.view !== "tree" || a.value[p].isRoot || a.value[p].open, O = (p) => o.value.view !== "tree" ? "" : a.value[p].isRoot || a.value[p].isParent ? a.value[p].childrenOpen ? "-" : "+" : "", I = (p) => {
|
|
1445
|
+
if (o.value.view === "tree") {
|
|
1446
|
+
a.value[p].childrenOpen = !a.value[p].childrenOpen;
|
|
1447
|
+
for (let y = i.value.length - 1; y >= 0; y--)
|
|
1448
|
+
a.value[y].parent === p && (a.value[y].open = !a.value[y].open, a.value[y].childrenOpen && I(y));
|
|
1449
|
+
} else o.value.view === "list-expansion" && (a.value[p].expanded = !a.value[p].expanded);
|
|
1450
|
+
}, T = (p, y) => {
|
|
1451
|
+
const $ = w(p, y);
|
|
1452
|
+
return z(p, y, $);
|
|
1453
|
+
}, z = (p, y, $) => {
|
|
1454
|
+
const R = u.value[p], W = i.value[y], se = R.format;
|
|
1455
|
+
return se ? typeof se == "function" ? se($, { table: s.value, row: W, column: R }) : typeof se == "string" ? Function(`"use strict";return (${se})`)()($, { table: s.value, row: W, column: R }) : $ : $;
|
|
1453
1456
|
};
|
|
1454
1457
|
return {
|
|
1455
1458
|
// state
|
|
1456
|
-
columns:
|
|
1457
|
-
config:
|
|
1458
|
-
display:
|
|
1459
|
-
modal:
|
|
1460
|
-
rows:
|
|
1461
|
-
table:
|
|
1459
|
+
columns: u,
|
|
1460
|
+
config: o,
|
|
1461
|
+
display: a,
|
|
1462
|
+
modal: c,
|
|
1463
|
+
rows: i,
|
|
1464
|
+
table: s,
|
|
1462
1465
|
updates: d,
|
|
1463
1466
|
// getters
|
|
1464
|
-
hasPinnedColumns:
|
|
1465
|
-
numberedRowWidth:
|
|
1466
|
-
zeroColumn:
|
|
1467
|
+
hasPinnedColumns: m,
|
|
1468
|
+
numberedRowWidth: g,
|
|
1469
|
+
zeroColumn: b,
|
|
1467
1470
|
// actions
|
|
1468
1471
|
closeModal: (p) => {
|
|
1469
|
-
var
|
|
1470
|
-
p.target instanceof Node && (
|
|
1472
|
+
var y;
|
|
1473
|
+
p.target instanceof Node && (y = c.value.parent) != null && y.contains(p.target) || c.value.visible && (c.value.visible = !1);
|
|
1471
1474
|
},
|
|
1472
|
-
getCellData:
|
|
1475
|
+
getCellData: w,
|
|
1473
1476
|
getCellDisplayValue: T,
|
|
1474
1477
|
getFormattedValue: z,
|
|
1475
|
-
getHeaderCellStyle:
|
|
1476
|
-
resizeColumn:
|
|
1477
|
-
getIndent: (p,
|
|
1478
|
-
getRowExpandSymbol:
|
|
1478
|
+
getHeaderCellStyle: h,
|
|
1479
|
+
resizeColumn: C,
|
|
1480
|
+
getIndent: (p, y) => y && p === 0 && y > 0 ? `${y}ch` : "inherit",
|
|
1481
|
+
getRowExpandSymbol: O,
|
|
1479
1482
|
isRowGantt: M,
|
|
1480
1483
|
isRowVisible: L,
|
|
1481
|
-
setCellData:
|
|
1482
|
-
setCellText:
|
|
1483
|
-
toggleRowExpand:
|
|
1484
|
+
setCellData: f,
|
|
1485
|
+
setCellText: v,
|
|
1486
|
+
toggleRowExpand: I,
|
|
1484
1487
|
updateGanttBar: (p) => {
|
|
1485
1488
|
var $;
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1489
|
+
const y = ($ = i.value[p.rowIndex]) == null ? void 0 : $.gantt;
|
|
1490
|
+
y && (p.type === "resize" ? p.edge === "start" ? (y.startIndex = p.newStart, y.endIndex = p.end, y.colspan = y.endIndex - y.startIndex) : p.edge === "end" && (y.startIndex = p.start, y.endIndex = p.newEnd, y.colspan = y.endIndex - y.startIndex) : p.type === "bar" && (y.startIndex = p.newStart, y.endIndex = p.newEnd, y.colspan = y.endIndex - y.startIndex));
|
|
1488
1491
|
}
|
|
1489
1492
|
};
|
|
1490
1493
|
})();
|
|
1491
|
-
},
|
|
1494
|
+
}, kn = /* @__PURE__ */ K({
|
|
1492
1495
|
__name: "ATable",
|
|
1493
|
-
props: {
|
|
1496
|
+
props: /* @__PURE__ */ He({
|
|
1494
1497
|
id: {},
|
|
1495
|
-
modelValue: {},
|
|
1496
1498
|
columns: {},
|
|
1497
1499
|
rows: { default: () => [] },
|
|
1498
1500
|
config: { default: () => new Object() }
|
|
1499
|
-
},
|
|
1500
|
-
|
|
1501
|
+
}, {
|
|
1502
|
+
modelValue: { required: !0 },
|
|
1503
|
+
modelModifiers: {}
|
|
1504
|
+
}),
|
|
1505
|
+
emits: /* @__PURE__ */ He(["cellUpdate", "gantt:drag"], ["update:modelValue"]),
|
|
1501
1506
|
setup(e, { expose: t, emit: n }) {
|
|
1502
|
-
const
|
|
1503
|
-
|
|
1504
|
-
if (
|
|
1505
|
-
const [
|
|
1506
|
-
|
|
1507
|
-
|
|
1507
|
+
const l = pt(e, "modelValue"), r = n, u = G("table"), i = l.value.length > 0 ? l.value : e.rows, o = In({ columns: e.columns, rows: i, id: e.id, config: e.config });
|
|
1508
|
+
o.$onAction(({ name: d, store: m, args: g, after: b }) => {
|
|
1509
|
+
if (d === "setCellData" || d === "setCellText") {
|
|
1510
|
+
const [w, f, v] = g, h = m.getCellData(w, f);
|
|
1511
|
+
b(() => {
|
|
1512
|
+
l.value = [...m.rows], r("cellUpdate", { colIndex: w, rowIndex: f, newValue: v, oldValue: h });
|
|
1508
1513
|
});
|
|
1509
|
-
} else if (
|
|
1510
|
-
const [
|
|
1511
|
-
let
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
+
} else if (d === "updateGanttBar") {
|
|
1515
|
+
const [w] = g;
|
|
1516
|
+
let f = !1;
|
|
1517
|
+
w.type === "resize" ? f = w.oldColspan !== w.newColspan : w.type === "bar" && (f = w.oldStart !== w.newStart || w.oldEnd !== w.newEnd), f && b(() => {
|
|
1518
|
+
r("gantt:drag", w);
|
|
1514
1519
|
});
|
|
1515
1520
|
}
|
|
1516
|
-
}),
|
|
1517
|
-
() => l.
|
|
1518
|
-
(
|
|
1519
|
-
o(
|
|
1521
|
+
}), N(
|
|
1522
|
+
() => l.value,
|
|
1523
|
+
(d) => {
|
|
1524
|
+
JSON.stringify(d) !== JSON.stringify(o.rows) && (o.rows = [...d]);
|
|
1520
1525
|
},
|
|
1521
1526
|
{ deep: !0 }
|
|
1522
1527
|
), Z(() => {
|
|
1523
|
-
e.columns.some((
|
|
1528
|
+
e.columns.some((d) => d.pinned) && (a(), o.config.view === "tree" && ot(u, a, { childList: !0, subtree: !0 }));
|
|
1524
1529
|
});
|
|
1525
|
-
const
|
|
1526
|
-
const
|
|
1527
|
-
for (const [
|
|
1528
|
-
const v =
|
|
1529
|
-
v && (
|
|
1530
|
+
const s = k(() => o.columns.filter((d) => d.pinned).length), a = () => {
|
|
1531
|
+
const d = u.value, m = d == null ? void 0 : d.rows[0], g = d == null ? void 0 : d.rows[1], b = m ? Array.from(m.cells) : [];
|
|
1532
|
+
for (const [w, f] of b.entries()) {
|
|
1533
|
+
const v = g == null ? void 0 : g.cells[w];
|
|
1534
|
+
v && (f.style.width = `${v.offsetWidth}px`);
|
|
1530
1535
|
}
|
|
1531
|
-
for (const
|
|
1532
|
-
let
|
|
1536
|
+
for (const w of (d == null ? void 0 : d.rows) || []) {
|
|
1537
|
+
let f = 0;
|
|
1533
1538
|
const v = [];
|
|
1534
|
-
for (const
|
|
1535
|
-
(
|
|
1539
|
+
for (const h of w.cells)
|
|
1540
|
+
(h.classList.contains("sticky-column") || h.classList.contains("sticky-index")) && (h.style.left = `${f}px`, f += h.offsetWidth, v.push(h));
|
|
1536
1541
|
v.length > 0 && v[v.length - 1].classList.add("sticky-column-edge");
|
|
1537
1542
|
}
|
|
1538
1543
|
};
|
|
1539
|
-
window.addEventListener("keydown", (
|
|
1540
|
-
if (
|
|
1541
|
-
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1544
|
-
|
|
1544
|
+
window.addEventListener("keydown", (d) => {
|
|
1545
|
+
if (d.key === "Escape" && o.modal.visible) {
|
|
1546
|
+
o.modal.visible = !1;
|
|
1547
|
+
const m = o.modal.parent;
|
|
1548
|
+
m && Ze().then(() => {
|
|
1549
|
+
m.focus();
|
|
1545
1550
|
});
|
|
1546
1551
|
}
|
|
1547
1552
|
});
|
|
1548
|
-
const
|
|
1549
|
-
var
|
|
1550
|
-
if (!(
|
|
1551
|
-
return
|
|
1552
|
-
const
|
|
1553
|
-
for (let
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1553
|
+
const c = (d) => {
|
|
1554
|
+
var b;
|
|
1555
|
+
if (!(d.indent === 0) || s.value === 0)
|
|
1556
|
+
return o.columns;
|
|
1557
|
+
const g = [];
|
|
1558
|
+
for (let w = 0; w < s.value; w++) {
|
|
1559
|
+
const f = { ...o.columns[w] };
|
|
1560
|
+
f.originalIndex = w, g.push(f);
|
|
1556
1561
|
}
|
|
1557
|
-
return
|
|
1558
|
-
...
|
|
1562
|
+
return g.push({
|
|
1563
|
+
...o.columns[s.value],
|
|
1559
1564
|
isGantt: !0,
|
|
1560
|
-
colspan: ((
|
|
1561
|
-
originalIndex:
|
|
1565
|
+
colspan: ((b = d.gantt) == null ? void 0 : b.colspan) || o.columns.length - s.value,
|
|
1566
|
+
originalIndex: s.value,
|
|
1562
1567
|
width: "auto"
|
|
1563
1568
|
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
1564
|
-
}),
|
|
1569
|
+
}), g;
|
|
1565
1570
|
};
|
|
1566
|
-
return t({ store:
|
|
1571
|
+
return t({ store: o }), (d, m) => he((S(), A("table", {
|
|
1567
1572
|
ref: "table",
|
|
1568
1573
|
class: "atable",
|
|
1569
1574
|
style: J({
|
|
1570
|
-
width:
|
|
1575
|
+
width: x(o).config.fullWidth ? "100%" : "auto"
|
|
1571
1576
|
})
|
|
1572
1577
|
}, [
|
|
1573
|
-
B(
|
|
1574
|
-
|
|
1575
|
-
columns:
|
|
1576
|
-
store:
|
|
1578
|
+
B(d.$slots, "header", { data: x(o) }, () => [
|
|
1579
|
+
ze(st, {
|
|
1580
|
+
columns: x(o).columns,
|
|
1581
|
+
store: x(o)
|
|
1577
1582
|
}, null, 8, ["columns", "store"])
|
|
1578
1583
|
], !0),
|
|
1579
1584
|
D("tbody", null, [
|
|
1580
|
-
B(
|
|
1581
|
-
(S(!0), A(ie, null, ke(
|
|
1582
|
-
key:
|
|
1583
|
-
row:
|
|
1584
|
-
rowIndex:
|
|
1585
|
-
store:
|
|
1585
|
+
B(d.$slots, "body", { data: x(o) }, () => [
|
|
1586
|
+
(S(!0), A(ie, null, ke(x(o).rows, (g, b) => (S(), re(lt, {
|
|
1587
|
+
key: g.id,
|
|
1588
|
+
row: g,
|
|
1589
|
+
rowIndex: b,
|
|
1590
|
+
store: x(o)
|
|
1586
1591
|
}, {
|
|
1587
|
-
default:
|
|
1588
|
-
(S(!0), A(ie, null, ke(
|
|
1589
|
-
var v,
|
|
1592
|
+
default: Be(() => [
|
|
1593
|
+
(S(!0), A(ie, null, ke(c(g), (w, f) => {
|
|
1594
|
+
var v, h, C;
|
|
1590
1595
|
return S(), A(ie, {
|
|
1591
|
-
key:
|
|
1596
|
+
key: w.name
|
|
1592
1597
|
}, [
|
|
1593
|
-
|
|
1598
|
+
w.isGantt ? (S(), re(fe(w.ganttComponent || "AGanttCell"), {
|
|
1594
1599
|
key: 0,
|
|
1595
|
-
store:
|
|
1596
|
-
columnsCount:
|
|
1597
|
-
color: (v =
|
|
1598
|
-
start: (
|
|
1599
|
-
end: (
|
|
1600
|
-
colspan:
|
|
1601
|
-
pinned:
|
|
1602
|
-
rowIndex:
|
|
1603
|
-
colIndex:
|
|
1600
|
+
store: x(o),
|
|
1601
|
+
columnsCount: x(o).columns.length - s.value,
|
|
1602
|
+
color: (v = g.gantt) == null ? void 0 : v.color,
|
|
1603
|
+
start: (h = g.gantt) == null ? void 0 : h.startIndex,
|
|
1604
|
+
end: (C = g.gantt) == null ? void 0 : C.endIndex,
|
|
1605
|
+
colspan: w.colspan,
|
|
1606
|
+
pinned: w.pinned,
|
|
1607
|
+
rowIndex: b,
|
|
1608
|
+
colIndex: w.originalIndex ?? f,
|
|
1604
1609
|
style: J({
|
|
1605
|
-
textAlign: (
|
|
1606
|
-
minWidth: (
|
|
1607
|
-
width:
|
|
1610
|
+
textAlign: (w == null ? void 0 : w.align) || "center",
|
|
1611
|
+
minWidth: (w == null ? void 0 : w.width) || "40ch",
|
|
1612
|
+
width: x(o).config.fullWidth ? "auto" : null
|
|
1608
1613
|
})
|
|
1609
|
-
}, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (S(), re(fe(
|
|
1614
|
+
}, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (S(), re(fe(w.cellComponent || "ACell"), {
|
|
1610
1615
|
key: 1,
|
|
1611
|
-
store:
|
|
1612
|
-
pinned:
|
|
1613
|
-
rowIndex:
|
|
1614
|
-
colIndex:
|
|
1616
|
+
store: x(o),
|
|
1617
|
+
pinned: w.pinned,
|
|
1618
|
+
rowIndex: b,
|
|
1619
|
+
colIndex: f,
|
|
1615
1620
|
style: J({
|
|
1616
|
-
textAlign: (
|
|
1617
|
-
width:
|
|
1621
|
+
textAlign: (w == null ? void 0 : w.align) || "center",
|
|
1622
|
+
width: x(o).config.fullWidth ? "auto" : null
|
|
1618
1623
|
}),
|
|
1619
1624
|
spellcheck: "false"
|
|
1620
1625
|
}, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
|
|
@@ -1625,59 +1630,59 @@ const yn = { key: 0 }, bn = {
|
|
|
1625
1630
|
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
1626
1631
|
], !0)
|
|
1627
1632
|
]),
|
|
1628
|
-
B(
|
|
1629
|
-
B(
|
|
1630
|
-
he(
|
|
1631
|
-
default:
|
|
1632
|
-
(S(), re(fe(
|
|
1633
|
-
key: `${
|
|
1634
|
-
colIndex:
|
|
1635
|
-
rowIndex:
|
|
1636
|
-
store:
|
|
1637
|
-
},
|
|
1633
|
+
B(d.$slots, "footer", { data: x(o) }, void 0, !0),
|
|
1634
|
+
B(d.$slots, "modal", { data: x(o) }, () => [
|
|
1635
|
+
he(ze(rt, { store: x(o) }, {
|
|
1636
|
+
default: Be(() => [
|
|
1637
|
+
(S(), re(fe(x(o).modal.component), Se({
|
|
1638
|
+
key: `${x(o).modal.rowIndex}:${x(o).modal.colIndex}`,
|
|
1639
|
+
colIndex: x(o).modal.colIndex,
|
|
1640
|
+
rowIndex: x(o).modal.rowIndex,
|
|
1641
|
+
store: x(o)
|
|
1642
|
+
}, x(o).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
|
|
1638
1643
|
]),
|
|
1639
1644
|
_: 1
|
|
1640
1645
|
}, 8, ["store"]), [
|
|
1641
|
-
[
|
|
1646
|
+
[_e, x(o).modal.visible]
|
|
1642
1647
|
])
|
|
1643
1648
|
], !0)
|
|
1644
1649
|
], 4)), [
|
|
1645
|
-
[
|
|
1650
|
+
[x(mn), x(o).closeModal]
|
|
1646
1651
|
]);
|
|
1647
1652
|
}
|
|
1648
|
-
}),
|
|
1649
|
-
function
|
|
1650
|
-
return S(), A("div",
|
|
1651
|
-
D("h2",
|
|
1653
|
+
}), Mn = /* @__PURE__ */ ae(kn, [["__scopeId", "data-v-85571dc2"]]), Sn = {}, $n = { class: "aloading" }, An = { class: "aloading-header" };
|
|
1654
|
+
function Tn(e, t) {
|
|
1655
|
+
return S(), A("div", $n, [
|
|
1656
|
+
D("h2", An, [
|
|
1652
1657
|
B(e.$slots, "default", {}, void 0, !0)
|
|
1653
1658
|
]),
|
|
1654
1659
|
t[0] || (t[0] = D("div", { class: "aloading-bar" }, null, -1))
|
|
1655
1660
|
]);
|
|
1656
1661
|
}
|
|
1657
|
-
const
|
|
1658
|
-
function
|
|
1659
|
-
return S(), A("div",
|
|
1660
|
-
D("h2",
|
|
1662
|
+
const Rn = /* @__PURE__ */ ae(Sn, [["render", Tn], ["__scopeId", "data-v-a930a25b"]]), On = {}, Pn = { class: "aloading" }, Ln = { class: "aloading-header" };
|
|
1663
|
+
function Dn(e, t) {
|
|
1664
|
+
return S(), A("div", Pn, [
|
|
1665
|
+
D("h2", Ln, [
|
|
1661
1666
|
B(e.$slots, "default", {}, void 0, !0)
|
|
1662
1667
|
]),
|
|
1663
1668
|
t[0] || (t[0] = D("div", { class: "aloading-bar" }, null, -1))
|
|
1664
1669
|
]);
|
|
1665
1670
|
}
|
|
1666
|
-
const
|
|
1667
|
-
function
|
|
1668
|
-
e.component("ACell",
|
|
1671
|
+
const Wn = /* @__PURE__ */ ae(On, [["render", Dn], ["__scopeId", "data-v-e1165876"]]);
|
|
1672
|
+
function Nn(e) {
|
|
1673
|
+
e.component("ACell", en), e.component("AExpansionRow", an), e.component("AGanttCell", dn), e.component("ARow", lt), e.component("ATable", Mn), e.component("ATableHeader", st), e.component("ATableLoading", Rn), e.component("ATableLoadingBar", Wn), e.component("ATableModal", rt);
|
|
1669
1674
|
}
|
|
1670
1675
|
export {
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1676
|
+
en as ACell,
|
|
1677
|
+
an as AExpansionRow,
|
|
1678
|
+
dn as AGanttCell,
|
|
1679
|
+
lt as ARow,
|
|
1680
|
+
Mn as ATable,
|
|
1681
|
+
st as ATableHeader,
|
|
1682
|
+
Rn as ATableLoading,
|
|
1683
|
+
Wn as ATableLoadingBar,
|
|
1684
|
+
rt as ATableModal,
|
|
1685
|
+
In as createTableStore,
|
|
1686
|
+
Nn as install
|
|
1682
1687
|
};
|
|
1683
1688
|
//# sourceMappingURL=atable.js.map
|