@stonecrop/atable 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/atable.d.ts +16 -7
- package/dist/atable.js +860 -841
- package/dist/atable.js.map +1 -1
- package/dist/src/stores/table.d.ts +13 -6
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/src/stores/table.js +0 -1
- package/dist/src/types/index.d.ts +3 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/ACell.vue +50 -6
- package/src/stores/table.ts +5 -2
- package/src/types/index.ts +3 -1
package/dist/atable.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ref as E, computed as
|
|
2
|
-
import { defaultKeypressHandlers as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { vResizeObserver as
|
|
7
|
-
import './assets/index.css';const
|
|
8
|
-
const
|
|
9
|
-
return Array.from(
|
|
10
|
-
},
|
|
1
|
+
import { ref as E, computed as D, defineComponent as ve, useTemplateRef as le, onMounted as Ne, openBlock as f, createElementBlock as w, unref as Z, normalizeClass as Q, normalizeStyle as re, createBlock as te, resolveDynamicComponent as we, normalizeProps as Xe, mergeProps as pe, toDisplayString as de, nextTick as Qe, useCssVars as at, onUnmounted as st, createElementVNode as T, withModifiers as xe, createCommentVNode as G, withDirectives as oe, Fragment as ie, renderList as ue, vShow as Le, renderSlot as se, reactive as it, vModelText as Ce, vModelCheckbox as rt, vModelSelect as ct, createTextVNode as dt, useModel as Ge, inject as ut, watch as We, createVNode as je, withCtx as Ue, mergeModels as Ye } from "vue";
|
|
2
|
+
import { defaultKeypressHandlers as Ee, useKeyboardNav as Ke } from "@stonecrop/utilities";
|
|
3
|
+
import { componentCategory as Ae, isBadgeDescriptor as qe, hasBadgeOptions as Je } from "@stonecrop/schema";
|
|
4
|
+
import { useDebounceFn as vt, useElementBounding as me, useDraggable as Ve, useResizeObserver as ft, onClickOutside as ht, useMutationObserver as gt } from "@vueuse/core";
|
|
5
|
+
import { defineStore as mt } from "pinia";
|
|
6
|
+
import { vResizeObserver as wt, vOnClickOutside as xt } from "@vueuse/components";
|
|
7
|
+
import './assets/index.css';const bt = (e) => {
|
|
8
|
+
const p = new DOMParser().parseFromString(e, "text/html");
|
|
9
|
+
return Array.from(p.body.childNodes).some((i) => i.nodeType === 1);
|
|
10
|
+
}, yt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), _e = (e) => {
|
|
11
11
|
if (e == null) return "";
|
|
12
12
|
if (typeof e == "object") {
|
|
13
|
-
const
|
|
14
|
-
return i ? `${
|
|
13
|
+
const p = e.qty ?? "", i = e.uom ?? "";
|
|
14
|
+
return i ? `${p} ${i}`.trim() : String(p);
|
|
15
15
|
}
|
|
16
16
|
return String(e);
|
|
17
|
-
},
|
|
17
|
+
}, et = (e) => {
|
|
18
18
|
if (e == null) return "";
|
|
19
19
|
if (typeof e == "object") {
|
|
20
|
-
const
|
|
21
|
-
return i ? `${
|
|
20
|
+
const p = e.amount ?? "", i = e.currency?.displayText ?? e.currency?.id ?? "";
|
|
21
|
+
return i ? `${p} ${i}`.trim() : String(p);
|
|
22
22
|
}
|
|
23
23
|
return String(e);
|
|
24
24
|
};
|
|
25
|
-
function
|
|
25
|
+
function Oe(e) {
|
|
26
26
|
if (e !== null && typeof e == "object") {
|
|
27
27
|
if ("qty" in e) return Number(e.qty);
|
|
28
28
|
if ("baseAmount" in e && e.baseAmount != null)
|
|
@@ -31,78 +31,78 @@ function Ee(e) {
|
|
|
31
31
|
}
|
|
32
32
|
return Number(e);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const i =
|
|
34
|
+
function tt(e, p) {
|
|
35
|
+
const i = p[e];
|
|
36
36
|
if (i.isRoot || i.parent === null || i.parent === void 0)
|
|
37
37
|
return !0;
|
|
38
38
|
const u = i.parent;
|
|
39
|
-
return u < 0 || u >=
|
|
39
|
+
return u < 0 || u >= p.length ? !1 : (p[u].childrenOpen || !1) && tt(u, p);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const u = i.filterType || "text",
|
|
43
|
-
if (!
|
|
41
|
+
function Ct(e, p, i) {
|
|
42
|
+
const u = i.filterType || "text", k = p.value;
|
|
43
|
+
if (!k && u !== "dateRange" && u !== "checkbox") return !0;
|
|
44
44
|
switch (u) {
|
|
45
45
|
case "text":
|
|
46
|
-
return (typeof e == "object" && e !== null ? Object.values(e).join(" ") : String(e || "")).toLowerCase().includes(String(
|
|
46
|
+
return (typeof e == "object" && e !== null ? Object.values(e).join(" ") : String(e || "")).toLowerCase().includes(String(k).toLowerCase());
|
|
47
47
|
case "number": {
|
|
48
|
-
const
|
|
49
|
-
return !isNaN(
|
|
48
|
+
const a = Oe(e), l = Number(k);
|
|
49
|
+
return !isNaN(a) && !isNaN(l) && a === l;
|
|
50
50
|
}
|
|
51
51
|
case "select":
|
|
52
|
-
return e ===
|
|
52
|
+
return e === k;
|
|
53
53
|
case "checkbox":
|
|
54
|
-
return
|
|
54
|
+
return k === !0 ? !!e : !0;
|
|
55
55
|
case "date": {
|
|
56
|
-
let
|
|
56
|
+
let a;
|
|
57
57
|
if (typeof e == "number") {
|
|
58
58
|
const c = new Date(e), v = (/* @__PURE__ */ new Date()).getFullYear();
|
|
59
|
-
|
|
59
|
+
a = new Date(v, c.getMonth(), c.getDate());
|
|
60
60
|
} else
|
|
61
|
-
|
|
62
|
-
const l = new Date(String(
|
|
63
|
-
return
|
|
61
|
+
a = new Date(String(e));
|
|
62
|
+
const l = new Date(String(k));
|
|
63
|
+
return a.toDateString() === l.toDateString();
|
|
64
64
|
}
|
|
65
65
|
case "dateRange": {
|
|
66
|
-
const
|
|
67
|
-
if (!
|
|
66
|
+
const a = p.startValue, l = p.endValue;
|
|
67
|
+
if (!a && !l) return !0;
|
|
68
68
|
let c;
|
|
69
69
|
if (typeof e == "number") {
|
|
70
70
|
const v = new Date(e), n = (/* @__PURE__ */ new Date()).getFullYear();
|
|
71
71
|
c = new Date(n, v.getMonth(), v.getDate());
|
|
72
72
|
} else
|
|
73
73
|
c = new Date(String(e));
|
|
74
|
-
return !(
|
|
74
|
+
return !(a && c < new Date(String(a)) || l && c > new Date(String(l)));
|
|
75
75
|
}
|
|
76
76
|
default:
|
|
77
77
|
return !0;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return
|
|
80
|
+
function pt(e, p) {
|
|
81
|
+
return p && e === 0 && p > 0 ? `${p}ch` : "inherit";
|
|
82
82
|
}
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
return
|
|
86
|
-
const
|
|
83
|
+
const kt = (e) => {
|
|
84
|
+
const p = e.id || yt(), i = e.linkResolver ?? null;
|
|
85
|
+
return mt(`table-${p}`, () => {
|
|
86
|
+
const k = () => {
|
|
87
87
|
const t = [Object.assign({}, { rowModified: !1 })], o = /* @__PURE__ */ new Set();
|
|
88
|
-
for (let
|
|
89
|
-
const
|
|
90
|
-
|
|
88
|
+
for (let S = 0; S < l.value.length; S++) {
|
|
89
|
+
const M = l.value[S];
|
|
90
|
+
M.parent !== null && M.parent !== void 0 && o.add(M.parent);
|
|
91
91
|
}
|
|
92
|
-
const r = (
|
|
93
|
-
for (let
|
|
94
|
-
if (l.value[
|
|
92
|
+
const r = (S) => l.value[S]?.gantt !== void 0, I = (S) => {
|
|
93
|
+
for (let M = 0; M < l.value.length; M++)
|
|
94
|
+
if (l.value[M].parent === S && (r(M) || I(M)))
|
|
95
95
|
return !0;
|
|
96
96
|
return !1;
|
|
97
|
-
}, P = (
|
|
98
|
-
const
|
|
97
|
+
}, P = (S) => {
|
|
98
|
+
const M = c.value, N = M.view === "tree" || M.view === "tree-gantt" ? M.defaultTreeExpansion : void 0;
|
|
99
99
|
if (!N) return !0;
|
|
100
100
|
switch (N) {
|
|
101
101
|
case "root":
|
|
102
102
|
return !1;
|
|
103
103
|
// Only root nodes are visible, all children start collapsed
|
|
104
104
|
case "branch":
|
|
105
|
-
return S
|
|
105
|
+
return I(S);
|
|
106
106
|
case "leaf":
|
|
107
107
|
return !0;
|
|
108
108
|
// All nodes should be expanded
|
|
@@ -110,87 +110,87 @@ const yt = (e) => {
|
|
|
110
110
|
return !0;
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
for (let
|
|
114
|
-
const
|
|
115
|
-
t[
|
|
116
|
-
childrenOpen: P(
|
|
113
|
+
for (let S = 0; S < l.value.length; S++) {
|
|
114
|
+
const M = l.value[S], N = M.parent === null || M.parent === void 0, _ = o.has(S);
|
|
115
|
+
t[S] = {
|
|
116
|
+
childrenOpen: P(S),
|
|
117
117
|
expanded: !1,
|
|
118
|
-
indent:
|
|
119
|
-
isParent:
|
|
118
|
+
indent: M.indent || 0,
|
|
119
|
+
isParent: _,
|
|
120
120
|
isRoot: N,
|
|
121
121
|
rowModified: !1,
|
|
122
122
|
open: N,
|
|
123
123
|
// This will be recalculated later for non-root nodes
|
|
124
|
-
parent:
|
|
124
|
+
parent: M.parent
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
return t;
|
|
128
|
-
},
|
|
128
|
+
}, a = E(e.columns), l = E(e.rows), c = E(e.config || {}), v = E({}), n = E({}), C = D(() => {
|
|
129
129
|
const t = {};
|
|
130
|
-
for (const [o, r] of
|
|
131
|
-
for (const [
|
|
132
|
-
t[`${o}:${
|
|
130
|
+
for (const [o, r] of a.value.entries())
|
|
131
|
+
for (const [I, P] of l.value.entries())
|
|
132
|
+
t[`${o}:${I}`] = P[r.name];
|
|
133
133
|
return t;
|
|
134
|
-
}), d =
|
|
134
|
+
}), d = D({
|
|
135
135
|
get: () => {
|
|
136
|
-
const t =
|
|
136
|
+
const t = k();
|
|
137
137
|
for (let o = 0; o < t.length; o++)
|
|
138
138
|
v.value[o] && (t[o].rowModified = v.value[o]), n.value[o] && (n.value[o].childrenOpen !== void 0 && (t[o].childrenOpen = n.value[o].childrenOpen), n.value[o].expanded !== void 0 && (t[o].expanded = n.value[o].expanded));
|
|
139
|
-
if (
|
|
139
|
+
if (m.value)
|
|
140
140
|
for (let o = 0; o < t.length; o++)
|
|
141
|
-
t[o].isRoot || (t[o].open =
|
|
141
|
+
t[o].isRoot || (t[o].open = tt(o, t));
|
|
142
142
|
return t;
|
|
143
143
|
},
|
|
144
144
|
set: (t) => {
|
|
145
145
|
JSON.stringify(t) !== JSON.stringify(d.value) && (d.value = t);
|
|
146
146
|
}
|
|
147
|
-
}),
|
|
147
|
+
}), g = E(e.modal || { visible: !1 }), W = E({}), j = E([]), b = E([]), R = E([]), s = E({
|
|
148
148
|
column: null,
|
|
149
149
|
direction: null
|
|
150
|
-
}),
|
|
150
|
+
}), h = E({}), x = D(() => a.value.some((t) => t.pinned)), y = D(() => c.value.view === "gantt" || c.value.view === "tree-gantt"), m = D(() => c.value.view === "tree" || c.value.view === "tree-gantt"), B = D(() => {
|
|
151
151
|
const t = c.value;
|
|
152
152
|
return t.view === "gantt" || t.view === "tree-gantt" ? t.dependencyGraph !== !1 : !0;
|
|
153
|
-
}),
|
|
153
|
+
}), L = D(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), z = D(
|
|
154
154
|
() => c.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(c.value.view) : !1
|
|
155
|
-
),
|
|
155
|
+
), ce = D(() => {
|
|
156
156
|
let t = l.value.map((o, r) => ({
|
|
157
157
|
...o,
|
|
158
158
|
originalIndex: r
|
|
159
159
|
}));
|
|
160
|
-
if (Object.entries(
|
|
161
|
-
const
|
|
162
|
-
!P || !(r.value || r.startValue || r.endValue || P.filterType === "checkbox" && r.value !== void 0) || (t = t.filter((
|
|
163
|
-
const N =
|
|
164
|
-
return
|
|
160
|
+
if (Object.entries(h.value).forEach(([o, r]) => {
|
|
161
|
+
const I = parseInt(o), P = a.value[I];
|
|
162
|
+
!P || !(r.value || r.startValue || r.endValue || P.filterType === "checkbox" && r.value !== void 0) || (t = t.filter((M) => {
|
|
163
|
+
const N = M[P.name];
|
|
164
|
+
return Ct(N, r, P);
|
|
165
165
|
}));
|
|
166
|
-
}),
|
|
167
|
-
const o =
|
|
168
|
-
t.sort((
|
|
169
|
-
let
|
|
170
|
-
|
|
171
|
-
const N =
|
|
172
|
-
if (!isNaN(N) && !isNaN(
|
|
173
|
-
return r === "asc" ? N -
|
|
166
|
+
}), s.value.column !== null && s.value.direction) {
|
|
167
|
+
const o = a.value[s.value.column], r = s.value.direction;
|
|
168
|
+
t.sort((I, P) => {
|
|
169
|
+
let S = I[o.name], M = P[o.name];
|
|
170
|
+
S == null && (S = ""), M == null && (M = "");
|
|
171
|
+
const N = Oe(S), _ = Oe(M);
|
|
172
|
+
if (!isNaN(N) && !isNaN(_) && S !== "" && M !== "")
|
|
173
|
+
return r === "asc" ? N - _ : _ - N;
|
|
174
174
|
{
|
|
175
|
-
const Pe = String(
|
|
175
|
+
const Pe = String(S).toLowerCase(), ze = String(M).toLowerCase();
|
|
176
176
|
return r === "asc" ? Pe.localeCompare(ze) : ze.localeCompare(Pe);
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
return t;
|
|
181
|
-
}),
|
|
182
|
-
const
|
|
183
|
-
C.value[
|
|
181
|
+
}), ye = (t, o) => C.value[`${t}:${o}`], Y = (t, o, r) => {
|
|
182
|
+
const I = `${t}:${o}`, P = a.value[t];
|
|
183
|
+
C.value[I] !== r && (v.value[o] = !0), C.value[I] = r, l.value[o] = {
|
|
184
184
|
...l.value[o],
|
|
185
185
|
[P.name]: r
|
|
186
186
|
};
|
|
187
|
-
},
|
|
187
|
+
}, fe = (t) => {
|
|
188
188
|
l.value = t;
|
|
189
|
-
},
|
|
190
|
-
const
|
|
191
|
-
C.value[
|
|
192
|
-
},
|
|
193
|
-
const o =
|
|
189
|
+
}, A = (t, o, r) => {
|
|
190
|
+
const I = `${t}:${o}`;
|
|
191
|
+
C.value[I] !== r && (v.value[o] = !0, W.value[I] = r);
|
|
192
|
+
}, V = (t) => {
|
|
193
|
+
const o = a.value.indexOf(t) === a.value.length - 1, r = c.value.fullWidth ? t.resizable && !o : t.resizable;
|
|
194
194
|
return {
|
|
195
195
|
width: t.width || "40ch",
|
|
196
196
|
textAlign: t.align || "center",
|
|
@@ -200,23 +200,23 @@ const yt = (e) => {
|
|
|
200
200
|
whiteSpace: "nowrap"
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
|
-
},
|
|
204
|
-
if (t < 0 || t >=
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
...
|
|
208
|
-
width: `${
|
|
203
|
+
}, O = (t, o) => {
|
|
204
|
+
if (t < 0 || t >= a.value.length) return;
|
|
205
|
+
const I = Math.max(o, 40);
|
|
206
|
+
a.value[t] = {
|
|
207
|
+
...a.value[t],
|
|
208
|
+
width: `${I}px`
|
|
209
209
|
};
|
|
210
|
-
},
|
|
210
|
+
}, ne = (t) => {
|
|
211
211
|
const o = l.value[t];
|
|
212
212
|
return y.value && o.gantt !== void 0;
|
|
213
|
-
},
|
|
214
|
-
if (
|
|
215
|
-
const o = n.value[t] || {},
|
|
213
|
+
}, q = (t) => !m.value || d.value[t].isRoot || d.value[t].open, ae = (t) => !m.value && c.value.view !== "list-expansion" ? "" : m.value && (d.value[t].isRoot || d.value[t].isParent) ? d.value[t].childrenOpen ? "▼" : "►" : c.value.view === "list-expansion" ? d.value[t].expanded ? "▼" : "►" : "", he = (t) => {
|
|
214
|
+
if (m.value) {
|
|
215
|
+
const o = n.value[t] || {}, I = !(o.childrenOpen ?? d.value[t].childrenOpen);
|
|
216
216
|
n.value[t] = {
|
|
217
217
|
...o,
|
|
218
|
-
childrenOpen:
|
|
219
|
-
},
|
|
218
|
+
childrenOpen: I
|
|
219
|
+
}, I || ge(t);
|
|
220
220
|
} else if (c.value.view === "list-expansion") {
|
|
221
221
|
const o = n.value[t] || {}, r = o.expanded ?? d.value[t].expanded;
|
|
222
222
|
n.value[t] = {
|
|
@@ -224,51 +224,51 @@ const yt = (e) => {
|
|
|
224
224
|
expanded: !r
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
},
|
|
227
|
+
}, ge = (t) => {
|
|
228
228
|
for (let o = 0; o < l.value.length; o++)
|
|
229
229
|
if (d.value[o].parent === t) {
|
|
230
230
|
const r = n.value[o] || {};
|
|
231
231
|
n.value[o] = {
|
|
232
232
|
...r,
|
|
233
233
|
childrenOpen: !1
|
|
234
|
-
},
|
|
234
|
+
}, ge(o);
|
|
235
235
|
}
|
|
236
|
-
},
|
|
237
|
-
const r =
|
|
238
|
-
return
|
|
239
|
-
},
|
|
240
|
-
const
|
|
241
|
-
if (!
|
|
242
|
-
const
|
|
243
|
-
return
|
|
236
|
+
}, Be = (t, o) => {
|
|
237
|
+
const r = ye(t, o);
|
|
238
|
+
return ke(t, o, r);
|
|
239
|
+
}, ke = (t, o, r) => {
|
|
240
|
+
const I = a.value[t], P = l.value[o], S = I.format;
|
|
241
|
+
if (!S) {
|
|
242
|
+
const M = Ae(I.component);
|
|
243
|
+
return M === "boolean" ? r ? "✓" : "✗" : M === "date" ? r != null ? new Date(String(r)).toLocaleDateString() : r : M === "datetime" ? r != null ? new Date(String(r)).toLocaleString() : r : M === "quantity" ? _e(r) : M === "currency" ? et(r) : r;
|
|
244
244
|
}
|
|
245
|
-
return typeof
|
|
245
|
+
return typeof S == "function" ? S(r, { table: C.value, row: P, column: I }) : typeof S == "string" ? Function(`"use strict";return (${S})`)()(r, { table: C.value, row: P, column: I }) : r;
|
|
246
246
|
}, He = (t) => {
|
|
247
|
-
t.target instanceof Node &&
|
|
248
|
-
},
|
|
247
|
+
t.target instanceof Node && g.value.parent?.contains(t.target) || g.value.visible && (g.value.visible = !1);
|
|
248
|
+
}, Ze = (t) => {
|
|
249
249
|
const o = l.value[t.rowIndex]?.gantt;
|
|
250
250
|
o && (t.type === "resize" ? t.edge === "start" ? (o.startIndex = t.newStart, o.endIndex = t.end, o.colspan = o.endIndex - o.startIndex) : t.edge === "end" && (o.startIndex = t.start, o.endIndex = t.newEnd, o.colspan = o.endIndex - o.startIndex) : t.type === "bar" && (o.startIndex = t.newStart, o.endIndex = t.newEnd, o.colspan = o.endIndex - o.startIndex));
|
|
251
|
-
},
|
|
252
|
-
const o =
|
|
253
|
-
o >= 0 ?
|
|
254
|
-
},
|
|
255
|
-
const o =
|
|
256
|
-
o >= 0 &&
|
|
257
|
-
},
|
|
251
|
+
}, Me = (t) => {
|
|
252
|
+
const o = j.value.findIndex((r) => r.id === t.id);
|
|
253
|
+
o >= 0 ? j.value[o] = t : j.value.push(t);
|
|
254
|
+
}, Re = (t) => {
|
|
255
|
+
const o = j.value.findIndex((r) => r.id === t);
|
|
256
|
+
o >= 0 && j.value.splice(o, 1);
|
|
257
|
+
}, $e = (t) => {
|
|
258
258
|
const o = b.value.findIndex((r) => r.id === t.id);
|
|
259
259
|
o >= 0 ? b.value[o] = t : b.value.push(t);
|
|
260
|
-
},
|
|
260
|
+
}, Ie = (t) => {
|
|
261
261
|
const o = b.value.findIndex((r) => r.id === t);
|
|
262
262
|
o >= 0 && b.value.splice(o, 1);
|
|
263
|
-
},
|
|
264
|
-
const
|
|
265
|
-
if (!
|
|
263
|
+
}, $ = (t, o, r) => {
|
|
264
|
+
const I = b.value.find((M) => M.id === t), P = b.value.find((M) => M.id === o);
|
|
265
|
+
if (!I || !P)
|
|
266
266
|
return console.warn("Cannot create connection: handle not found"), null;
|
|
267
|
-
const
|
|
267
|
+
const S = {
|
|
268
268
|
id: `connection-${t}-${o}`,
|
|
269
269
|
from: {
|
|
270
|
-
barId:
|
|
271
|
-
side:
|
|
270
|
+
barId: I.barId,
|
|
271
|
+
side: I.side
|
|
272
272
|
},
|
|
273
273
|
to: {
|
|
274
274
|
barId: P.barId,
|
|
@@ -277,128 +277,128 @@ const yt = (e) => {
|
|
|
277
277
|
style: r?.style,
|
|
278
278
|
label: r?.label
|
|
279
279
|
};
|
|
280
|
-
return
|
|
280
|
+
return R.value.push(S), S;
|
|
281
281
|
}, H = (t) => {
|
|
282
|
-
const o =
|
|
283
|
-
return o >= 0 ? (
|
|
284
|
-
},
|
|
285
|
-
if (
|
|
282
|
+
const o = R.value.findIndex((r) => r.id === t);
|
|
283
|
+
return o >= 0 ? (R.value.splice(o, 1), !0) : !1;
|
|
284
|
+
}, X = (t) => R.value.filter((o) => o.from.barId === t || o.to.barId === t), F = (t) => b.value.filter((o) => o.barId === t), U = (t) => {
|
|
285
|
+
if (a.value[t].sortable === !1) return;
|
|
286
286
|
let r;
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
!o.value && !o.startValue && !o.endValue ? delete
|
|
290
|
-
},
|
|
291
|
-
delete
|
|
292
|
-
},
|
|
287
|
+
s.value.column === t && s.value.direction === "asc" ? r = "desc" : r = "asc", s.value.column = t, s.value.direction = r;
|
|
288
|
+
}, J = (t, o) => {
|
|
289
|
+
!o.value && !o.startValue && !o.endValue ? delete h.value[t] : h.value[t] = o;
|
|
290
|
+
}, ee = (t) => {
|
|
291
|
+
delete h.value[t];
|
|
292
|
+
}, K = (t, o = "end") => {
|
|
293
293
|
const r = {};
|
|
294
|
-
for (const P of
|
|
294
|
+
for (const P of a.value)
|
|
295
295
|
r[P.name] = "";
|
|
296
296
|
t && Object.assign(r, t);
|
|
297
|
-
let
|
|
298
|
-
return o === "start" ? (
|
|
297
|
+
let I;
|
|
298
|
+
return o === "start" ? (I = 0, l.value.unshift(r)) : o === "end" ? (I = l.value.length, l.value.push(r)) : (I = Math.max(0, Math.min(o, l.value.length)), l.value.splice(I, 0, r)), I;
|
|
299
299
|
};
|
|
300
300
|
return {
|
|
301
301
|
// state
|
|
302
|
-
columns:
|
|
302
|
+
columns: a,
|
|
303
303
|
config: c,
|
|
304
304
|
connectionHandles: b,
|
|
305
|
-
connectionPaths:
|
|
305
|
+
connectionPaths: R,
|
|
306
306
|
display: d,
|
|
307
|
-
filterState:
|
|
308
|
-
ganttBars:
|
|
309
|
-
modal:
|
|
307
|
+
filterState: h,
|
|
308
|
+
ganttBars: j,
|
|
309
|
+
modal: g,
|
|
310
310
|
rows: l,
|
|
311
|
-
sortState:
|
|
311
|
+
sortState: s,
|
|
312
312
|
table: C,
|
|
313
|
-
updates:
|
|
313
|
+
updates: W,
|
|
314
314
|
// getters
|
|
315
|
-
filteredRows:
|
|
315
|
+
filteredRows: ce,
|
|
316
316
|
hasPinnedColumns: x,
|
|
317
317
|
isGanttView: y,
|
|
318
|
-
isTreeView:
|
|
319
|
-
isDependencyGraphEnabled:
|
|
320
|
-
numberedRowWidth:
|
|
321
|
-
zeroColumn:
|
|
318
|
+
isTreeView: m,
|
|
319
|
+
isDependencyGraphEnabled: B,
|
|
320
|
+
numberedRowWidth: L,
|
|
321
|
+
zeroColumn: z,
|
|
322
322
|
// resolver
|
|
323
323
|
linkResolver: i,
|
|
324
324
|
// actions
|
|
325
|
-
addRow:
|
|
326
|
-
clearFilter:
|
|
325
|
+
addRow: K,
|
|
326
|
+
clearFilter: ee,
|
|
327
327
|
closeModal: He,
|
|
328
|
-
createConnection:
|
|
328
|
+
createConnection: $,
|
|
329
329
|
deleteConnection: H,
|
|
330
330
|
deleteRow: (t) => {
|
|
331
331
|
if (t < 0 || t >= l.value.length)
|
|
332
332
|
return null;
|
|
333
333
|
const [o] = l.value.splice(t, 1);
|
|
334
334
|
delete v.value[t], delete n.value[t];
|
|
335
|
-
const r = {},
|
|
336
|
-
for (const [P,
|
|
337
|
-
const
|
|
338
|
-
|
|
335
|
+
const r = {}, I = {};
|
|
336
|
+
for (const [P, S] of Object.entries(v.value)) {
|
|
337
|
+
const M = parseInt(P);
|
|
338
|
+
M > t ? r[M - 1] = S : r[M] = S;
|
|
339
339
|
}
|
|
340
|
-
for (const [P,
|
|
341
|
-
const
|
|
342
|
-
|
|
340
|
+
for (const [P, S] of Object.entries(n.value)) {
|
|
341
|
+
const M = parseInt(P);
|
|
342
|
+
M > t ? I[M - 1] = S : I[M] = S;
|
|
343
343
|
}
|
|
344
|
-
return v.value = r, n.value =
|
|
344
|
+
return v.value = r, n.value = I, o;
|
|
345
345
|
},
|
|
346
346
|
duplicateRow: (t) => {
|
|
347
347
|
if (t < 0 || t >= l.value.length)
|
|
348
348
|
return -1;
|
|
349
|
-
const o = l.value[t], r = JSON.parse(JSON.stringify(o)),
|
|
350
|
-
return l.value.splice(
|
|
349
|
+
const o = l.value[t], r = JSON.parse(JSON.stringify(o)), I = t + 1;
|
|
350
|
+
return l.value.splice(I, 0, r), I;
|
|
351
351
|
},
|
|
352
|
-
getCellData:
|
|
353
|
-
getCellDisplayValue:
|
|
354
|
-
getConnectionsForBar:
|
|
355
|
-
getFormattedValue:
|
|
352
|
+
getCellData: ye,
|
|
353
|
+
getCellDisplayValue: Be,
|
|
354
|
+
getConnectionsForBar: X,
|
|
355
|
+
getFormattedValue: ke,
|
|
356
356
|
getHandlesForBar: F,
|
|
357
|
-
getHeaderCellStyle:
|
|
358
|
-
getRowExpandSymbol:
|
|
357
|
+
getHeaderCellStyle: V,
|
|
358
|
+
getRowExpandSymbol: ae,
|
|
359
359
|
insertRowAbove: (t, o) => {
|
|
360
360
|
const r = Math.max(0, t);
|
|
361
|
-
return
|
|
361
|
+
return K(o, r);
|
|
362
362
|
},
|
|
363
363
|
insertRowBelow: (t, o) => {
|
|
364
364
|
const r = Math.min(t + 1, l.value.length);
|
|
365
|
-
return
|
|
365
|
+
return K(o, r);
|
|
366
366
|
},
|
|
367
|
-
isRowGantt:
|
|
368
|
-
isRowVisible:
|
|
367
|
+
isRowGantt: ne,
|
|
368
|
+
isRowVisible: q,
|
|
369
369
|
moveRow: (t, o) => {
|
|
370
370
|
if (t < 0 || t >= l.value.length || o < 0 || o >= l.value.length || t === o)
|
|
371
371
|
return !1;
|
|
372
372
|
const [r] = l.value.splice(t, 1);
|
|
373
373
|
l.value.splice(o, 0, r);
|
|
374
|
-
const
|
|
375
|
-
for (const [
|
|
376
|
-
const N = parseInt(
|
|
377
|
-
let
|
|
378
|
-
N === t ?
|
|
374
|
+
const I = {}, P = {};
|
|
375
|
+
for (const [S, M] of Object.entries(v.value)) {
|
|
376
|
+
const N = parseInt(S);
|
|
377
|
+
let _ = N;
|
|
378
|
+
N === t ? _ = o : t < o ? N > t && N <= o && (_ = N - 1) : N >= o && N < t && (_ = N + 1), I[_] = M;
|
|
379
379
|
}
|
|
380
|
-
for (const [
|
|
381
|
-
const N = parseInt(
|
|
382
|
-
let
|
|
383
|
-
N === t ?
|
|
380
|
+
for (const [S, M] of Object.entries(n.value)) {
|
|
381
|
+
const N = parseInt(S);
|
|
382
|
+
let _ = N;
|
|
383
|
+
N === t ? _ = o : t < o ? N > t && N <= o && (_ = N - 1) : N >= o && N < t && (_ = N + 1), P[_] = M;
|
|
384
384
|
}
|
|
385
|
-
return v.value =
|
|
385
|
+
return v.value = I, n.value = P, !0;
|
|
386
386
|
},
|
|
387
|
-
registerConnectionHandle:
|
|
388
|
-
registerGanttBar:
|
|
389
|
-
resizeColumn:
|
|
390
|
-
setCellData:
|
|
391
|
-
setCellText:
|
|
392
|
-
setFilter:
|
|
393
|
-
sortByColumn:
|
|
394
|
-
toggleRowExpand:
|
|
395
|
-
unregisterConnectionHandle:
|
|
396
|
-
unregisterGanttBar:
|
|
397
|
-
updateGanttBar:
|
|
398
|
-
updateRows:
|
|
387
|
+
registerConnectionHandle: $e,
|
|
388
|
+
registerGanttBar: Me,
|
|
389
|
+
resizeColumn: O,
|
|
390
|
+
setCellData: Y,
|
|
391
|
+
setCellText: A,
|
|
392
|
+
setFilter: J,
|
|
393
|
+
sortByColumn: U,
|
|
394
|
+
toggleRowExpand: he,
|
|
395
|
+
unregisterConnectionHandle: Ie,
|
|
396
|
+
unregisterGanttBar: Re,
|
|
397
|
+
updateGanttBar: Ze,
|
|
398
|
+
updateRows: fe
|
|
399
399
|
};
|
|
400
400
|
})();
|
|
401
|
-
},
|
|
401
|
+
}, Mt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Rt = ["innerHTML"], $t = { key: 4 }, It = /* @__PURE__ */ ve({
|
|
402
402
|
__name: "ACell",
|
|
403
403
|
props: {
|
|
404
404
|
colIndex: {},
|
|
@@ -409,139 +409,158 @@ const yt = (e) => {
|
|
|
409
409
|
pinned: { type: Boolean, default: !1 },
|
|
410
410
|
debounce: { default: 300 }
|
|
411
411
|
},
|
|
412
|
-
setup(e, { expose:
|
|
413
|
-
const i =
|
|
412
|
+
setup(e, { expose: p }) {
|
|
413
|
+
const i = le("cell"), u = e.store.getCellData(e.colIndex, e.rowIndex), k = E(""), a = E(!1), l = e.store.columns[e.colIndex], c = e.store.rows[e.rowIndex], v = l.align || "center", n = l.width || "40ch", C = D(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), d = E(null);
|
|
414
414
|
Ne(() => {
|
|
415
415
|
if (!l.linkDoctype) return;
|
|
416
|
-
const
|
|
417
|
-
if (
|
|
418
|
-
const
|
|
419
|
-
(typeof
|
|
416
|
+
const A = e.store.getCellData(e.colIndex, e.rowIndex);
|
|
417
|
+
if (A != null && typeof A == "object") {
|
|
418
|
+
const O = A, ne = O.displayText ?? O.id;
|
|
419
|
+
(typeof ne == "string" || typeof ne == "number") && (d.value = String(ne));
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
|
-
const
|
|
423
|
-
!
|
|
422
|
+
const V = e.store.linkResolver;
|
|
423
|
+
!V || typeof A != "string" || A === "" || V(l.linkDoctype, A).then((O) => (O != null && (d.value = O), O));
|
|
424
424
|
});
|
|
425
|
-
const
|
|
425
|
+
const g = D(() => d.value ?? C.value), W = D(() => {
|
|
426
|
+
if (l.cellComponent) return;
|
|
427
|
+
const A = g.value;
|
|
428
|
+
return qe(A) ? A : void 0;
|
|
429
|
+
}), j = D(() => {
|
|
430
|
+
if (!(l.cellComponent || W.value) && Je(l.options))
|
|
431
|
+
return {
|
|
432
|
+
value: e.store.getCellData(e.colIndex, e.rowIndex),
|
|
433
|
+
options: l.options,
|
|
434
|
+
presentation: "cell-fill"
|
|
435
|
+
};
|
|
436
|
+
}), b = D(
|
|
437
|
+
() => !!l.cellComponent || W.value !== void 0 || Je(l.options)
|
|
438
|
+
), R = D(() => l.edit && !b.value), s = D(() => {
|
|
439
|
+
const A = { ...l.cellComponentProps };
|
|
440
|
+
return l.cellComponent !== "ABadge" ? { ...A, value: g.value } : qe(g.value) ? { presentation: "cell-fill", ...A, ...g.value } : {
|
|
441
|
+
presentation: "cell-fill",
|
|
442
|
+
options: l.options,
|
|
443
|
+
...A,
|
|
444
|
+
value: e.store.getCellData(e.colIndex, e.rowIndex)
|
|
445
|
+
};
|
|
446
|
+
}), h = D(() => typeof g.value == "string" ? bt(g.value) : !1), x = D(() => ({
|
|
426
447
|
textAlign: v,
|
|
427
448
|
width: n,
|
|
428
|
-
fontWeight:
|
|
429
|
-
paddingLeft:
|
|
430
|
-
})),
|
|
449
|
+
fontWeight: a.value ? "bold" : "inherit",
|
|
450
|
+
paddingLeft: pt(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
451
|
+
})), y = D(() => ({
|
|
431
452
|
"sticky-column": e.pinned,
|
|
432
|
-
"cell-modified":
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
453
|
+
"cell-modified": a.value,
|
|
454
|
+
"atable-cell--badge-fill": b.value
|
|
455
|
+
})), m = () => {
|
|
456
|
+
L(), B();
|
|
457
|
+
}, B = () => {
|
|
458
|
+
const { left: A, bottom: V, width: O, height: ne } = me(i);
|
|
459
|
+
l.mask, l.modalComponent && e.store.$patch((q) => {
|
|
460
|
+
q.modal.visible = !0, q.modal.colIndex = e.colIndex, q.modal.rowIndex = e.rowIndex, q.modal.left = A.value, q.modal.bottom = V.value, q.modal.width = O.value, q.modal.height = ne.value, q.modal.cell = i.value, typeof l.modalComponent == "function" ? q.modal.component = l.modalComponent({ table: e.store.table, row: c, column: l }) : q.modal.component = l.modalComponent, q.modal.componentProps = l.modalComponentExtraProps;
|
|
439
461
|
});
|
|
440
462
|
};
|
|
441
463
|
if (e.addNavigation) {
|
|
442
|
-
let
|
|
443
|
-
...
|
|
444
|
-
"keydown.f2":
|
|
445
|
-
"keydown.alt.up":
|
|
446
|
-
"keydown.alt.down":
|
|
447
|
-
"keydown.alt.left":
|
|
448
|
-
"keydown.alt.right":
|
|
464
|
+
let A = {
|
|
465
|
+
...Ee,
|
|
466
|
+
"keydown.f2": B,
|
|
467
|
+
"keydown.alt.up": B,
|
|
468
|
+
"keydown.alt.down": B,
|
|
469
|
+
"keydown.alt.left": B,
|
|
470
|
+
"keydown.alt.right": B
|
|
449
471
|
};
|
|
450
|
-
typeof e.addNavigation == "object" && (
|
|
451
|
-
...
|
|
472
|
+
typeof e.addNavigation == "object" && (A = {
|
|
473
|
+
...A,
|
|
452
474
|
...e.addNavigation
|
|
453
|
-
}),
|
|
475
|
+
}), Ke([
|
|
454
476
|
{
|
|
455
477
|
selectors: i,
|
|
456
|
-
handlers:
|
|
478
|
+
handlers: A
|
|
457
479
|
}
|
|
458
480
|
]);
|
|
459
481
|
}
|
|
460
|
-
const
|
|
482
|
+
const L = () => {
|
|
461
483
|
if (i.value && l.edit) {
|
|
462
|
-
const
|
|
463
|
-
if (
|
|
484
|
+
const A = window.getSelection();
|
|
485
|
+
if (A)
|
|
464
486
|
try {
|
|
465
|
-
const
|
|
466
|
-
|
|
487
|
+
const V = document.createRange();
|
|
488
|
+
V.selectNodeContents && (V.selectNodeContents(i.value), A.removeAllRanges(), A.addRange(V));
|
|
467
489
|
} catch {
|
|
468
490
|
}
|
|
469
491
|
}
|
|
470
|
-
},
|
|
471
|
-
i.value && (
|
|
472
|
-
},
|
|
492
|
+
}, z = () => {
|
|
493
|
+
i.value && (k.value = i.value.textContent, L());
|
|
494
|
+
}, ce = () => {
|
|
473
495
|
try {
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
const
|
|
477
|
-
if (
|
|
478
|
-
return
|
|
496
|
+
const A = window.getSelection();
|
|
497
|
+
if (A && A.rangeCount > 0 && i.value) {
|
|
498
|
+
const V = A.getRangeAt(0), O = V.cloneRange();
|
|
499
|
+
if (O.selectNodeContents && O.setEnd)
|
|
500
|
+
return O.selectNodeContents(i.value), O.setEnd(V.endContainer, V.endOffset), O.toString().length;
|
|
479
501
|
}
|
|
480
502
|
} catch {
|
|
481
503
|
}
|
|
482
504
|
return 0;
|
|
483
|
-
},
|
|
505
|
+
}, ye = (A) => {
|
|
484
506
|
if (i.value)
|
|
485
507
|
try {
|
|
486
|
-
const
|
|
487
|
-
if (!
|
|
488
|
-
let
|
|
489
|
-
const
|
|
490
|
-
if (!
|
|
491
|
-
let
|
|
492
|
-
for (;
|
|
493
|
-
const
|
|
494
|
-
if (
|
|
495
|
-
|
|
508
|
+
const V = window.getSelection();
|
|
509
|
+
if (!V) return;
|
|
510
|
+
let O = 0;
|
|
511
|
+
const ne = document.createTreeWalker ? document.createTreeWalker(i.value, NodeFilter.SHOW_TEXT, null) : null;
|
|
512
|
+
if (!ne) return;
|
|
513
|
+
let q, ae = null;
|
|
514
|
+
for (; q = ne.nextNode(); ) {
|
|
515
|
+
const he = q, ge = O + he.textContent.length;
|
|
516
|
+
if (A <= ge && (ae = document.createRange(), ae.setStart && ae.setEnd)) {
|
|
517
|
+
ae.setStart(he, A - O), ae.setEnd(he, A - O);
|
|
496
518
|
break;
|
|
497
519
|
}
|
|
498
|
-
|
|
520
|
+
O = ge;
|
|
499
521
|
}
|
|
500
|
-
|
|
522
|
+
ae && V.removeAllRanges && V.addRange && (V.removeAllRanges(), V.addRange(ae));
|
|
501
523
|
} catch {
|
|
502
524
|
}
|
|
503
|
-
},
|
|
525
|
+
}, Y = (A) => {
|
|
504
526
|
if (!l.edit) return;
|
|
505
|
-
const
|
|
506
|
-
if (
|
|
527
|
+
const V = A.target;
|
|
528
|
+
if (V.textContent === k.value)
|
|
507
529
|
return;
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
return
|
|
512
|
-
currentData:
|
|
513
|
-
}), (
|
|
530
|
+
const O = ce();
|
|
531
|
+
k.value = V.textContent, l.format ? (a.value = V.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, u), e.store.setCellText(e.colIndex, e.rowIndex, V.textContent)) : (a.value = V.textContent !== u, e.store.setCellData(e.colIndex, e.rowIndex, V.textContent)), Qe().then(() => ye(O));
|
|
532
|
+
}, fe = vt(Y, e.debounce);
|
|
533
|
+
return p({
|
|
534
|
+
currentData: k
|
|
535
|
+
}), (A, V) => (f(), w("td", {
|
|
514
536
|
ref: "cell",
|
|
515
537
|
"data-colindex": e.colIndex,
|
|
516
538
|
"data-rowindex": e.rowIndex,
|
|
517
|
-
"data-editable":
|
|
518
|
-
contenteditable:
|
|
539
|
+
"data-editable": Z(l).edit,
|
|
540
|
+
contenteditable: R.value,
|
|
519
541
|
tabindex: e.tabIndex,
|
|
520
542
|
spellcheck: !1,
|
|
521
|
-
style:
|
|
522
|
-
class:
|
|
523
|
-
onFocus:
|
|
524
|
-
onPaste:
|
|
525
|
-
onInput:
|
|
526
|
-
(...
|
|
527
|
-
onClick:
|
|
543
|
+
style: re(x.value),
|
|
544
|
+
class: Q(["atable-cell", y.value]),
|
|
545
|
+
onFocus: z,
|
|
546
|
+
onPaste: Y,
|
|
547
|
+
onInput: V[0] || (V[0] = //@ts-ignore
|
|
548
|
+
(...O) => Z(fe) && Z(fe)(...O)),
|
|
549
|
+
onClick: m
|
|
528
550
|
}, [
|
|
529
|
-
|
|
530
|
-
key:
|
|
531
|
-
|
|
532
|
-
},
|
|
533
|
-
|
|
534
|
-
innerHTML: m.value
|
|
535
|
-
}, null, 8, pt)) : (h(), w("span", kt, ie(m.value), 1))
|
|
536
|
-
], 46, Ct));
|
|
551
|
+
Z(l).cellComponent ? (f(), te(we(Z(l).cellComponent), Xe(pe({ key: 0 }, s.value)), null, 16)) : W.value ? (f(), te(we("ABadge"), pe({ key: 1 }, W.value, { presentation: "cell-fill" }), null, 16)) : j.value ? (f(), te(we("ABadge"), Xe(pe({ key: 2 }, j.value)), null, 16)) : h.value ? (f(), w("span", {
|
|
552
|
+
key: 3,
|
|
553
|
+
innerHTML: g.value
|
|
554
|
+
}, null, 8, Rt)) : (f(), w("span", $t, de(g.value), 1))
|
|
555
|
+
], 46, Mt));
|
|
537
556
|
}
|
|
538
|
-
}),
|
|
557
|
+
}), St = ["colspan"], Dt = {
|
|
539
558
|
ref: "container",
|
|
540
559
|
class: "gantt-container"
|
|
541
|
-
},
|
|
560
|
+
}, At = ["data-rowindex", "data-colindex"], Bt = {
|
|
542
561
|
key: 2,
|
|
543
562
|
class: "gantt-label"
|
|
544
|
-
},
|
|
563
|
+
}, Ht = ["x1", "y1", "x2", "y2"], Zt = /* @__PURE__ */ ve({
|
|
545
564
|
__name: "AGanttCell",
|
|
546
565
|
props: {
|
|
547
566
|
store: {},
|
|
@@ -555,19 +574,19 @@ const yt = (e) => {
|
|
|
555
574
|
color: { default: "#cccccc" }
|
|
556
575
|
},
|
|
557
576
|
emits: ["connection:create"],
|
|
558
|
-
setup(e, { expose:
|
|
559
|
-
|
|
560
|
-
v564d6da1:
|
|
561
|
-
v4f540c19:
|
|
577
|
+
setup(e, { expose: p, emit: i }) {
|
|
578
|
+
at(($) => ({
|
|
579
|
+
v564d6da1: k.value,
|
|
580
|
+
v4f540c19: $.colspan
|
|
562
581
|
}));
|
|
563
|
-
const u = i,
|
|
564
|
-
const
|
|
582
|
+
const u = i, k = E(e.color.length >= 6 ? e.color : "#cccccc"), a = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, l = le("container"), c = le("bar"), v = le("leftResizeHandle"), n = le("rightResizeHandle"), C = le("leftConnectionHandle"), d = le("rightConnectionHandle"), { width: g } = me(l), { left: W, right: j } = me(c), b = E(e.start), R = E(e.end || b.value + e.colspan), s = E(!1), h = E(!1), x = E(!1), y = E(!1), m = E(!1), B = E({ startX: 0, startY: 0, endX: 0, endY: 0 }), L = D(() => V.value || fe.value || A.value), z = D(() => e.colspan > 0 ? g.value / e.colspan : 0), ce = D(() => {
|
|
583
|
+
const $ = b.value / e.colspan * 100, H = R.value / e.colspan * 100;
|
|
565
584
|
return {
|
|
566
|
-
left: `${
|
|
567
|
-
width: `${H -
|
|
568
|
-
backgroundColor:
|
|
585
|
+
left: `${$}%`,
|
|
586
|
+
width: `${H - $}%`,
|
|
587
|
+
backgroundColor: k.value
|
|
569
588
|
};
|
|
570
|
-
}),
|
|
589
|
+
}), ye = D(() => ({
|
|
571
590
|
position: "fixed",
|
|
572
591
|
top: 0,
|
|
573
592
|
left: 0,
|
|
@@ -575,254 +594,254 @@ const yt = (e) => {
|
|
|
575
594
|
height: "100vh",
|
|
576
595
|
pointerEvents: "none",
|
|
577
596
|
zIndex: 1e3
|
|
578
|
-
})),
|
|
597
|
+
})), Y = E({ startX: 0, startPos: 0 }), { isDragging: fe } = Ve(v, {
|
|
579
598
|
axis: "x",
|
|
580
|
-
onStart: () =>
|
|
581
|
-
onMove: ({ x:
|
|
582
|
-
onEnd: ({ x:
|
|
583
|
-
}), { isDragging:
|
|
599
|
+
onStart: () => O(W.value, b.value),
|
|
600
|
+
onMove: ({ x: $ }) => ne($),
|
|
601
|
+
onEnd: ({ x: $ }) => q($)
|
|
602
|
+
}), { isDragging: A } = Ve(n, {
|
|
584
603
|
axis: "x",
|
|
585
|
-
onStart: () =>
|
|
586
|
-
onMove: ({ x:
|
|
587
|
-
onEnd: ({ x:
|
|
588
|
-
}), { isDragging:
|
|
604
|
+
onStart: () => O(j.value, R.value),
|
|
605
|
+
onMove: ({ x: $ }) => ae($),
|
|
606
|
+
onEnd: ({ x: $ }) => he($)
|
|
607
|
+
}), { isDragging: V } = Ve(c, {
|
|
589
608
|
exact: !0,
|
|
590
609
|
axis: "x",
|
|
591
|
-
onStart: () =>
|
|
592
|
-
onMove: ({ x:
|
|
593
|
-
onEnd: ({ x:
|
|
610
|
+
onStart: () => O(W.value, b.value),
|
|
611
|
+
onMove: ({ x: $ }) => ge($),
|
|
612
|
+
onEnd: ({ x: $ }) => Be($)
|
|
594
613
|
});
|
|
595
614
|
Ne(() => {
|
|
596
|
-
|
|
597
|
-
}),
|
|
615
|
+
ke();
|
|
616
|
+
}), st(() => {
|
|
598
617
|
He();
|
|
599
618
|
});
|
|
600
|
-
function
|
|
601
|
-
c.value && (c.value.style.transition = "none"),
|
|
619
|
+
function O($, H) {
|
|
620
|
+
c.value && (c.value.style.transition = "none"), Y.value = { startX: $, startPos: H };
|
|
602
621
|
}
|
|
603
|
-
function $
|
|
604
|
-
if (!
|
|
605
|
-
const
|
|
606
|
-
c.value.style.left = `${F / e.colspan * 100}%`, c.value.style.width = `${(
|
|
622
|
+
function ne($) {
|
|
623
|
+
if (!fe.value || !c.value) return;
|
|
624
|
+
const X = ($ - Y.value.startX) / z.value, F = Math.max(0, Math.min(R.value - 1, Y.value.startPos + X));
|
|
625
|
+
c.value.style.left = `${F / e.colspan * 100}%`, c.value.style.width = `${(R.value - F) / e.colspan * 100}%`;
|
|
607
626
|
}
|
|
608
|
-
function
|
|
627
|
+
function q($) {
|
|
609
628
|
if (!c.value) return;
|
|
610
|
-
const H =
|
|
611
|
-
b.value =
|
|
629
|
+
const H = $ - Y.value.startX, X = Math.round(H / z.value), F = b.value, U = Math.max(0, Math.min(R.value - 1, Y.value.startPos + X));
|
|
630
|
+
b.value = U, e.store.updateGanttBar({
|
|
612
631
|
rowIndex: e.rowIndex,
|
|
613
632
|
colIndex: e.colIndex,
|
|
614
633
|
type: "resize",
|
|
615
634
|
edge: "start",
|
|
616
635
|
oldStart: F,
|
|
617
|
-
newStart:
|
|
618
|
-
end:
|
|
619
|
-
delta:
|
|
620
|
-
oldColspan:
|
|
621
|
-
newColspan:
|
|
636
|
+
newStart: U,
|
|
637
|
+
end: R.value,
|
|
638
|
+
delta: X,
|
|
639
|
+
oldColspan: R.value - F,
|
|
640
|
+
newColspan: R.value - U
|
|
622
641
|
});
|
|
623
642
|
}
|
|
624
|
-
function
|
|
625
|
-
if (!
|
|
626
|
-
const
|
|
643
|
+
function ae($) {
|
|
644
|
+
if (!A.value || !c.value) return;
|
|
645
|
+
const X = ($ - Y.value.startX) / z.value, F = Math.max(b.value + 1, Math.min(e.columnsCount, Y.value.startPos + X));
|
|
627
646
|
c.value.style.width = `${(F - b.value) / e.colspan * 100}%`;
|
|
628
647
|
}
|
|
629
|
-
function
|
|
648
|
+
function he($) {
|
|
630
649
|
if (!c.value) return;
|
|
631
|
-
const H =
|
|
632
|
-
|
|
650
|
+
const H = $ - Y.value.startX, X = Math.round(H / z.value), F = R.value, U = Math.max(b.value + 1, Math.min(e.columnsCount, Y.value.startPos + X));
|
|
651
|
+
R.value = U, e.store.updateGanttBar({
|
|
633
652
|
rowIndex: e.rowIndex,
|
|
634
653
|
colIndex: e.colIndex,
|
|
635
654
|
type: "resize",
|
|
636
655
|
edge: "end",
|
|
637
656
|
oldEnd: F,
|
|
638
|
-
newEnd:
|
|
657
|
+
newEnd: U,
|
|
639
658
|
start: b.value,
|
|
640
|
-
delta:
|
|
659
|
+
delta: X,
|
|
641
660
|
oldColspan: F - b.value,
|
|
642
|
-
newColspan:
|
|
661
|
+
newColspan: U - b.value
|
|
643
662
|
});
|
|
644
663
|
}
|
|
645
|
-
function
|
|
646
|
-
if (!
|
|
647
|
-
const
|
|
648
|
-
c.value.style.left = `${
|
|
664
|
+
function ge($) {
|
|
665
|
+
if (!V.value || !c.value) return;
|
|
666
|
+
const X = ($ - Y.value.startX) / z.value, F = R.value - b.value, U = Math.max(0, Math.min(Y.value.startPos + X, e.columnsCount - F));
|
|
667
|
+
c.value.style.left = `${U / e.colspan * 100}%`;
|
|
649
668
|
}
|
|
650
|
-
function
|
|
669
|
+
function Be($) {
|
|
651
670
|
if (!c.value) return;
|
|
652
|
-
const H =
|
|
653
|
-
let
|
|
654
|
-
|
|
671
|
+
const H = $ - Y.value.startX, X = Math.round(H / z.value), F = R.value - b.value, U = b.value, J = R.value;
|
|
672
|
+
let ee = Y.value.startPos + X, K = ee + F;
|
|
673
|
+
ee < 0 ? (ee = 0, K = F) : K > e.columnsCount && (K = e.columnsCount, ee = K - F), b.value = ee, R.value = K, e.store.updateGanttBar({
|
|
655
674
|
rowIndex: e.rowIndex,
|
|
656
675
|
colIndex: e.colIndex,
|
|
657
676
|
type: "bar",
|
|
658
|
-
oldStart:
|
|
659
|
-
oldEnd:
|
|
660
|
-
newStart:
|
|
661
|
-
newEnd:
|
|
662
|
-
delta:
|
|
663
|
-
colspan:
|
|
677
|
+
oldStart: U,
|
|
678
|
+
oldEnd: J,
|
|
679
|
+
newStart: ee,
|
|
680
|
+
newEnd: K,
|
|
681
|
+
delta: X,
|
|
682
|
+
colspan: K - ee
|
|
664
683
|
});
|
|
665
684
|
}
|
|
666
|
-
function
|
|
667
|
-
const { x:
|
|
685
|
+
function ke() {
|
|
686
|
+
const { x: $, y: H } = me(c), { x: X, y: F } = me(C), { x: U, y: J } = me(d);
|
|
668
687
|
e.store.registerGanttBar({
|
|
669
|
-
id:
|
|
688
|
+
id: a,
|
|
670
689
|
rowIndex: e.rowIndex,
|
|
671
690
|
colIndex: e.colIndex,
|
|
672
691
|
startIndex: b,
|
|
673
|
-
endIndex:
|
|
674
|
-
color:
|
|
692
|
+
endIndex: R,
|
|
693
|
+
color: k,
|
|
675
694
|
label: e.label,
|
|
676
|
-
position: { x:
|
|
695
|
+
position: { x: $, y: H }
|
|
677
696
|
}), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
|
|
678
|
-
id: `${
|
|
697
|
+
id: `${a}-connection-left`,
|
|
679
698
|
rowIndex: e.rowIndex,
|
|
680
699
|
colIndex: e.colIndex,
|
|
681
700
|
side: "left",
|
|
682
|
-
position: { x:
|
|
683
|
-
visible:
|
|
684
|
-
barId:
|
|
701
|
+
position: { x: X, y: F },
|
|
702
|
+
visible: s,
|
|
703
|
+
barId: a
|
|
685
704
|
}), e.store.registerConnectionHandle({
|
|
686
|
-
id: `${
|
|
705
|
+
id: `${a}-connection-right`,
|
|
687
706
|
rowIndex: e.rowIndex,
|
|
688
707
|
colIndex: e.colIndex,
|
|
689
708
|
side: "right",
|
|
690
|
-
position: { x:
|
|
691
|
-
visible:
|
|
692
|
-
barId:
|
|
709
|
+
position: { x: U, y: J },
|
|
710
|
+
visible: h,
|
|
711
|
+
barId: a
|
|
693
712
|
}));
|
|
694
713
|
}
|
|
695
714
|
function He() {
|
|
696
|
-
e.store.unregisterGanttBar(
|
|
715
|
+
e.store.unregisterGanttBar(a), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${a}-connection-left`), e.store.unregisterConnectionHandle(`${a}-connection-right`));
|
|
697
716
|
}
|
|
698
|
-
function
|
|
699
|
-
e.store.isDependencyGraphEnabled && (
|
|
717
|
+
function Ze() {
|
|
718
|
+
e.store.isDependencyGraphEnabled && (s.value = !0, h.value = !0);
|
|
700
719
|
}
|
|
701
|
-
function
|
|
702
|
-
!x.value && !y.value && (
|
|
720
|
+
function Me() {
|
|
721
|
+
!x.value && !y.value && (s.value = !1, h.value = !1);
|
|
703
722
|
}
|
|
704
|
-
function
|
|
705
|
-
H.preventDefault(), H.stopPropagation(),
|
|
706
|
-
const
|
|
707
|
-
if (
|
|
708
|
-
const
|
|
709
|
-
|
|
723
|
+
function Re($, H) {
|
|
724
|
+
H.preventDefault(), H.stopPropagation(), m.value = !0, $ === "left" ? x.value = !0 : y.value = !0;
|
|
725
|
+
const X = $ === "left" ? C.value : d.value;
|
|
726
|
+
if (X) {
|
|
727
|
+
const J = X.getBoundingClientRect(), ee = J.left + J.width / 2, K = J.top + J.height / 2;
|
|
728
|
+
B.value = { startX: ee, startY: K, endX: ee, endY: K };
|
|
710
729
|
}
|
|
711
|
-
const F = (
|
|
712
|
-
|
|
713
|
-
},
|
|
714
|
-
|
|
730
|
+
const F = (J) => {
|
|
731
|
+
B.value.endX = J.clientX, B.value.endY = J.clientY;
|
|
732
|
+
}, U = (J) => {
|
|
733
|
+
$e(J, $), Ie(F, U);
|
|
715
734
|
};
|
|
716
|
-
document.addEventListener("mousemove", F), document.addEventListener("mouseup",
|
|
735
|
+
document.addEventListener("mousemove", F), document.addEventListener("mouseup", U);
|
|
717
736
|
}
|
|
718
|
-
function
|
|
719
|
-
const F = document.elementFromPoint(
|
|
737
|
+
function $e($, H) {
|
|
738
|
+
const F = document.elementFromPoint($.clientX, $.clientY)?.closest(".connection-handle");
|
|
720
739
|
if (F && F !== (H === "left" ? C.value : d.value)) {
|
|
721
|
-
const
|
|
722
|
-
if (
|
|
723
|
-
const
|
|
724
|
-
`${
|
|
725
|
-
`${Fe}-connection-${
|
|
740
|
+
const U = F.closest(".gantt-bar");
|
|
741
|
+
if (U) {
|
|
742
|
+
const J = parseInt(U.getAttribute("data-rowindex") || "0"), ee = parseInt(U.getAttribute("data-colindex") || "0"), K = F.classList.contains("left-connection-handle") ? "left" : "right", Fe = `gantt-bar-row-${J}-col-${ee}`, Te = e.store.createConnection(
|
|
743
|
+
`${a}-connection-${H}`,
|
|
744
|
+
`${Fe}-connection-${K}`
|
|
726
745
|
);
|
|
727
|
-
|
|
746
|
+
Te && u("connection:create", Te);
|
|
728
747
|
}
|
|
729
748
|
}
|
|
730
749
|
}
|
|
731
|
-
function
|
|
732
|
-
|
|
750
|
+
function Ie($, H) {
|
|
751
|
+
m.value = !1, x.value = !1, y.value = !1, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", H), c.value?.matches(":hover") || Me();
|
|
733
752
|
}
|
|
734
|
-
return
|
|
735
|
-
barStyle:
|
|
736
|
-
cleanupConnectionDrag:
|
|
737
|
-
currentEnd:
|
|
738
|
-
handleConnectionDrop:
|
|
753
|
+
return p({
|
|
754
|
+
barStyle: ce,
|
|
755
|
+
cleanupConnectionDrag: Ie,
|
|
756
|
+
currentEnd: R,
|
|
757
|
+
handleConnectionDrop: $e,
|
|
739
758
|
isLeftConnectionDragging: x,
|
|
740
|
-
isLeftConnectionVisible:
|
|
759
|
+
isLeftConnectionVisible: s,
|
|
741
760
|
isRightConnectionDragging: y,
|
|
742
|
-
isRightConnectionVisible:
|
|
743
|
-
showDragPreview:
|
|
744
|
-
}), (
|
|
761
|
+
isRightConnectionVisible: h,
|
|
762
|
+
showDragPreview: m
|
|
763
|
+
}), ($, H) => (f(), w("td", {
|
|
745
764
|
class: "aganttcell",
|
|
746
765
|
colspan: e.colspan
|
|
747
766
|
}, [
|
|
748
|
-
|
|
749
|
-
|
|
767
|
+
T("div", Dt, [
|
|
768
|
+
T("div", {
|
|
750
769
|
ref: "bar",
|
|
751
770
|
"data-rowindex": e.rowIndex,
|
|
752
771
|
"data-colindex": e.colIndex,
|
|
753
|
-
class:
|
|
754
|
-
style:
|
|
755
|
-
onMouseenter:
|
|
756
|
-
onMouseleave:
|
|
772
|
+
class: Q(["gantt-bar", { "is-dragging": L.value }]),
|
|
773
|
+
style: re(ce.value),
|
|
774
|
+
onMouseenter: Ze,
|
|
775
|
+
onMouseleave: Me
|
|
757
776
|
}, [
|
|
758
|
-
e.store.isDependencyGraphEnabled ? (
|
|
777
|
+
e.store.isDependencyGraphEnabled ? (f(), w("div", {
|
|
759
778
|
key: 0,
|
|
760
779
|
ref: "leftConnectionHandle",
|
|
761
|
-
class:
|
|
762
|
-
onMousedown: H[0] || (H[0] =
|
|
780
|
+
class: Q(["connection-handle left-connection-handle", { visible: s.value, "is-dragging": x.value }]),
|
|
781
|
+
onMousedown: H[0] || (H[0] = xe((X) => Re("left", X), ["stop"]))
|
|
763
782
|
}, [...H[2] || (H[2] = [
|
|
764
|
-
|
|
783
|
+
T("div", { class: "connection-dot" }, null, -1)
|
|
765
784
|
])], 34)) : G("", !0),
|
|
766
|
-
e.store.isDependencyGraphEnabled ? (
|
|
785
|
+
e.store.isDependencyGraphEnabled ? (f(), w("div", {
|
|
767
786
|
key: 1,
|
|
768
787
|
ref: "rightConnectionHandle",
|
|
769
|
-
class:
|
|
770
|
-
onMousedown: H[1] || (H[1] =
|
|
788
|
+
class: Q(["connection-handle right-connection-handle", { visible: h.value, "is-dragging": y.value }]),
|
|
789
|
+
onMousedown: H[1] || (H[1] = xe((X) => Re("right", X), ["stop"]))
|
|
771
790
|
}, [...H[3] || (H[3] = [
|
|
772
|
-
|
|
791
|
+
T("div", { class: "connection-dot" }, null, -1)
|
|
773
792
|
])], 34)) : G("", !0),
|
|
774
|
-
|
|
793
|
+
T("div", {
|
|
775
794
|
ref: "leftResizeHandle",
|
|
776
|
-
class:
|
|
795
|
+
class: Q(["resize-handle left-resize-handle", { "is-dragging": Z(fe) }])
|
|
777
796
|
}, [...H[4] || (H[4] = [
|
|
778
|
-
|
|
779
|
-
|
|
797
|
+
T("div", { class: "handle-grip" }, null, -1),
|
|
798
|
+
T("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
780
799
|
])], 2),
|
|
781
|
-
e.label ? (
|
|
782
|
-
|
|
800
|
+
e.label ? (f(), w("label", Bt, de(e.label), 1)) : G("", !0),
|
|
801
|
+
T("div", {
|
|
783
802
|
ref: "rightResizeHandle",
|
|
784
|
-
class:
|
|
803
|
+
class: Q(["resize-handle right-resize-handle", { "is-dragging": Z(A) }])
|
|
785
804
|
}, [...H[5] || (H[5] = [
|
|
786
|
-
|
|
787
|
-
|
|
805
|
+
T("div", { class: "handle-grip" }, null, -1),
|
|
806
|
+
T("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
788
807
|
])], 2)
|
|
789
|
-
], 46,
|
|
808
|
+
], 46, At)
|
|
790
809
|
], 512),
|
|
791
|
-
e.store.isDependencyGraphEnabled &&
|
|
810
|
+
e.store.isDependencyGraphEnabled && m.value ? (f(), w("svg", {
|
|
792
811
|
key: 0,
|
|
793
|
-
style:
|
|
812
|
+
style: re(ye.value)
|
|
794
813
|
}, [
|
|
795
|
-
|
|
796
|
-
x1:
|
|
797
|
-
y1:
|
|
798
|
-
x2:
|
|
799
|
-
y2:
|
|
814
|
+
T("line", {
|
|
815
|
+
x1: B.value.startX,
|
|
816
|
+
y1: B.value.startY,
|
|
817
|
+
x2: B.value.endX,
|
|
818
|
+
y2: B.value.endY,
|
|
800
819
|
stroke: "#2196f3",
|
|
801
820
|
"stroke-width": "2",
|
|
802
821
|
"stroke-dasharray": "5,5"
|
|
803
|
-
}, null, 8,
|
|
822
|
+
}, null, 8, Ht)
|
|
804
823
|
], 4)) : G("", !0)
|
|
805
|
-
], 8,
|
|
824
|
+
], 8, St));
|
|
806
825
|
}
|
|
807
|
-
}),
|
|
826
|
+
}), be = (e, p) => {
|
|
808
827
|
const i = e.__vccOpts || e;
|
|
809
|
-
for (const [u,
|
|
810
|
-
i[u] =
|
|
828
|
+
for (const [u, k] of p)
|
|
829
|
+
i[u] = k;
|
|
811
830
|
return i;
|
|
812
|
-
},
|
|
831
|
+
}, Tt = /* @__PURE__ */ be(Zt, [["__scopeId", "data-v-032ef6d9"]]), Vt = `<?xml version="1.0" encoding="UTF-8"?>
|
|
813
832
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
814
833
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
815
834
|
<polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
|
|
816
835
|
</svg>
|
|
817
|
-
`,
|
|
836
|
+
`, Et = `<?xml version="1.0" encoding="UTF-8"?>
|
|
818
837
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
819
838
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
820
839
|
<polygon points="46.84 19.99 44.01 17.16 32 29.17 19.99 17.16 17.16 19.99 29.17 32 17.16 44.01 19.99 46.84 32 34.83 44.01 46.84 46.84 44.01 34.83 32 46.84 19.99" style="fill: #000; stroke-width: 0px;"/>
|
|
821
|
-
</svg>`,
|
|
840
|
+
</svg>`, Ot = `<?xml version="1.0" encoding="UTF-8"?>
|
|
822
841
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.67">
|
|
823
842
|
<path d="M68.67,16.67h-14.67V2c0-1.1-.9-2-2-2H2C.9,0,0,.9,0,2v50c0,1.1.9,2,2,2h14.67v14.67c0,1.1.9,2,2,2h50c1.1,0,2-.9,2-2V18.67c0-1.1-.9-2-2-2ZM4,4h46v46H4V4ZM66.67,66.67H20.67v-12.67h31.33c1.1,0,2-.9,2-2v-31.33h12.67v46Z" style="fill: #000; stroke-width: 0px;"/>
|
|
824
843
|
<polygon points="41 25 29 25 29 13 25 13 25 25 13 25 13 29 25 29 25 41 29 41 29 29 41 29 41 25" style="fill: #000; stroke-width: 0px;"/>
|
|
825
|
-
</svg>`,
|
|
844
|
+
</svg>`, Nt = `<?xml version="1.0" encoding="UTF-8"?>
|
|
826
845
|
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
|
|
827
846
|
<path d="M68.6,45.8v13.7H2v-13.7h66.6M70.6,43.8H0v17.7h70.6v-17.7h0Z"/>
|
|
828
847
|
<path d="M68.6,24.2v13.7H2v-13.7h66.6M70.6,22.2H0v17.7h70.6v-17.7h0Z"/>
|
|
@@ -836,7 +855,7 @@ const yt = (e) => {
|
|
|
836
855
|
<polygon points="70.6 18.7 68.1 18.7 68.1 16.7 68.6 16.7 68.6 16.2 70.6 16.2 70.6 18.7"/>
|
|
837
856
|
<path d="M70.6,13.4h-2v-2.7h2v2.7ZM70.6,8h-2v-2.7h2v2.7Z"/>
|
|
838
857
|
</g>
|
|
839
|
-
</svg>`,
|
|
858
|
+
</svg>`, Lt = `<?xml version="1.0" encoding="UTF-8"?>
|
|
840
859
|
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
|
|
841
860
|
<g>
|
|
842
861
|
<polygon points="70.6 45.3 68.6 45.3 68.6 44.8 68.1 44.8 68.1 42.8 70.6 42.8 70.6 45.3"/>
|
|
@@ -850,31 +869,31 @@ const yt = (e) => {
|
|
|
850
869
|
</g>
|
|
851
870
|
<path d="M68.6,23.7v13.7H2v-13.7h66.6M70.6,21.7H0v17.7h70.6v-17.7h0Z"/>
|
|
852
871
|
<path d="M68.6,2v13.7H2V2h66.6M70.6,0H0v17.7h70.6V0h0Z"/>
|
|
853
|
-
</svg>`,
|
|
872
|
+
</svg>`, Ft = `<?xml version="1.0" encoding="UTF-8"?>
|
|
854
873
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
|
|
855
874
|
<path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
|
|
856
|
-
</svg>`,
|
|
875
|
+
</svg>`, Pt = `<?xml version="1.0" encoding="UTF-8"?>
|
|
857
876
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
858
877
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
859
878
|
<polygon points="18,20 18,44 46,32" style="fill: #000; stroke-width: 0px;"/>
|
|
860
879
|
</svg>
|
|
861
|
-
`,
|
|
862
|
-
add:
|
|
863
|
-
delete:
|
|
864
|
-
duplicate:
|
|
865
|
-
insertAbove:
|
|
866
|
-
insertBelow:
|
|
867
|
-
move:
|
|
868
|
-
moveUp:
|
|
869
|
-
moveDown:
|
|
870
|
-
open:
|
|
871
|
-
},
|
|
880
|
+
`, zt = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 13V3.5M4.5 7 8 3.5 11.5 7" stroke-linecap="round" stroke-linejoin="round"/></svg>', Xt = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 3v9.5M4.5 9 8 12.5 11.5 9" stroke-linecap="round" stroke-linejoin="round"/></svg>', Gt = {
|
|
881
|
+
add: Vt,
|
|
882
|
+
delete: Et,
|
|
883
|
+
duplicate: Ot,
|
|
884
|
+
insertAbove: Nt,
|
|
885
|
+
insertBelow: Lt,
|
|
886
|
+
move: Ft,
|
|
887
|
+
moveUp: zt,
|
|
888
|
+
moveDown: Xt,
|
|
889
|
+
open: Pt
|
|
890
|
+
}, Wt = {
|
|
872
891
|
key: 0,
|
|
873
892
|
class: "row-actions-dropdown"
|
|
874
|
-
},
|
|
893
|
+
}, jt = ["aria-expanded"], Ut = ["disabled", "onClick"], Yt = ["innerHTML"], qt = { class: "action-label" }, Jt = {
|
|
875
894
|
key: 1,
|
|
876
895
|
class: "row-actions-icons"
|
|
877
|
-
},
|
|
896
|
+
}, Qt = ["title", "aria-label", "disabled", "onClick"], Kt = ["innerHTML"], De = /* @__PURE__ */ ve({
|
|
878
897
|
__name: "ARowActions",
|
|
879
898
|
props: {
|
|
880
899
|
rowIndex: {},
|
|
@@ -883,8 +902,8 @@ const yt = (e) => {
|
|
|
883
902
|
position: {}
|
|
884
903
|
},
|
|
885
904
|
emits: ["action"],
|
|
886
|
-
setup(e, { emit:
|
|
887
|
-
const i = e, u =
|
|
905
|
+
setup(e, { emit: p }) {
|
|
906
|
+
const i = e, u = p, k = le("actionsCell"), a = le("toggleButton"), l = E(0), c = E(!1), v = E(!1), n = E({ top: 0, left: 0 }), C = {
|
|
888
907
|
add: "Add Record",
|
|
889
908
|
delete: "Delete Record",
|
|
890
909
|
duplicate: "Duplicate Record",
|
|
@@ -894,8 +913,8 @@ const yt = (e) => {
|
|
|
894
913
|
moveUp: "Move Up",
|
|
895
914
|
moveDown: "Move Down",
|
|
896
915
|
open: "Open Record"
|
|
897
|
-
}, d =
|
|
898
|
-
const
|
|
916
|
+
}, d = D(() => {
|
|
917
|
+
const s = [], h = i.config.actions || {}, x = [
|
|
899
918
|
"open",
|
|
900
919
|
"moveUp",
|
|
901
920
|
"moveDown",
|
|
@@ -907,17 +926,17 @@ const yt = (e) => {
|
|
|
907
926
|
"move"
|
|
908
927
|
];
|
|
909
928
|
for (const y of x) {
|
|
910
|
-
const
|
|
911
|
-
if (
|
|
912
|
-
let
|
|
913
|
-
typeof
|
|
929
|
+
const m = h[y];
|
|
930
|
+
if (m === !1 || m === void 0) continue;
|
|
931
|
+
let B = !0, L = C[y], z = Gt[y], ce = !1;
|
|
932
|
+
typeof m == "object" && (B = m.enabled !== !1, L = m.label || L, z = m.icon || z, m.disabled && (ce = m.disabled(i.rowIndex, i.store))), B && s.push({ type: y, label: L, icon: z, disabled: ce });
|
|
914
933
|
}
|
|
915
|
-
return
|
|
916
|
-
}),
|
|
934
|
+
return s;
|
|
935
|
+
}), g = D(() => {
|
|
917
936
|
if (i.config.forceDropdown) return !0;
|
|
918
|
-
const
|
|
919
|
-
return
|
|
920
|
-
}),
|
|
937
|
+
const s = i.config.dropdownThreshold ?? 150;
|
|
938
|
+
return s === 0 ? !1 : l.value > 0 && l.value < s;
|
|
939
|
+
}), W = D(() => c.value ? v.value ? {
|
|
921
940
|
position: "fixed",
|
|
922
941
|
bottom: `${window.innerHeight - n.value.top}px`,
|
|
923
942
|
left: `${n.value.left}px`,
|
|
@@ -927,86 +946,86 @@ const yt = (e) => {
|
|
|
927
946
|
top: `${n.value.top}px`,
|
|
928
947
|
left: `${n.value.left}px`
|
|
929
948
|
} : {});
|
|
930
|
-
|
|
931
|
-
const
|
|
932
|
-
|
|
949
|
+
ft(k, (s) => {
|
|
950
|
+
const h = s[0];
|
|
951
|
+
h && (l.value = h.contentRect.width);
|
|
933
952
|
});
|
|
934
|
-
const
|
|
953
|
+
const j = () => {
|
|
935
954
|
c.value || b(), c.value = !c.value;
|
|
936
955
|
}, b = () => {
|
|
937
|
-
if (!
|
|
938
|
-
const
|
|
939
|
-
v.value =
|
|
940
|
-
let
|
|
941
|
-
|
|
942
|
-
top: v.value ?
|
|
943
|
-
left:
|
|
956
|
+
if (!a.value) return;
|
|
957
|
+
const s = a.value.getBoundingClientRect(), h = window.innerHeight, x = window.innerWidth, y = d.value.length * 40 + 16, m = 160, B = h - s.bottom, L = s.top;
|
|
958
|
+
v.value = B < y && L > y;
|
|
959
|
+
let z = s.left;
|
|
960
|
+
z + m > x && (z = Math.max(0, s.right - m)), n.value = {
|
|
961
|
+
top: v.value ? s.top : s.bottom,
|
|
962
|
+
left: z
|
|
944
963
|
};
|
|
945
964
|
};
|
|
946
|
-
|
|
965
|
+
ht(k, () => {
|
|
947
966
|
c.value = !1;
|
|
948
967
|
});
|
|
949
|
-
const
|
|
968
|
+
const R = (s, h) => {
|
|
950
969
|
c.value = !1;
|
|
951
|
-
const x = i.config.actions?.[
|
|
952
|
-
typeof x == "object" && x.handler && x.handler(i.rowIndex, i.store) === !1 || u("action",
|
|
970
|
+
const x = i.config.actions?.[s];
|
|
971
|
+
typeof x == "object" && x.handler && x.handler(i.rowIndex, i.store) === !1 || u("action", s, i.rowIndex, h);
|
|
953
972
|
};
|
|
954
|
-
return (
|
|
973
|
+
return (s, h) => (f(), w("td", {
|
|
955
974
|
ref: "actionsCell",
|
|
956
|
-
class:
|
|
975
|
+
class: Q(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": c.value }])
|
|
957
976
|
}, [
|
|
958
|
-
|
|
959
|
-
|
|
977
|
+
g.value ? (f(), w("div", Wt, [
|
|
978
|
+
T("button", {
|
|
960
979
|
ref: "toggleButton",
|
|
961
980
|
type: "button",
|
|
962
981
|
class: "row-actions-toggle",
|
|
963
982
|
"aria-expanded": c.value,
|
|
964
983
|
"aria-haspopup": "true",
|
|
965
|
-
onClick:
|
|
966
|
-
}, [...
|
|
967
|
-
|
|
968
|
-
])], 8,
|
|
969
|
-
|
|
970
|
-
class:
|
|
971
|
-
style:
|
|
984
|
+
onClick: xe(j, ["stop"])
|
|
985
|
+
}, [...h[0] || (h[0] = [
|
|
986
|
+
T("span", { class: "dropdown-icon" }, "⋮", -1)
|
|
987
|
+
])], 8, jt),
|
|
988
|
+
oe(T("div", {
|
|
989
|
+
class: Q(["row-actions-menu", { "menu-flipped": v.value }]),
|
|
990
|
+
style: re(W.value),
|
|
972
991
|
role: "menu"
|
|
973
992
|
}, [
|
|
974
|
-
(
|
|
993
|
+
(f(!0), w(ie, null, ue(d.value, (x) => (f(), w("button", {
|
|
975
994
|
key: x.type,
|
|
976
995
|
type: "button",
|
|
977
996
|
class: "row-action-menu-item",
|
|
978
997
|
role: "menuitem",
|
|
979
998
|
disabled: x.disabled,
|
|
980
|
-
onClick:
|
|
999
|
+
onClick: xe((y) => R(x.type, y), ["stop"])
|
|
981
1000
|
}, [
|
|
982
|
-
|
|
1001
|
+
T("span", {
|
|
983
1002
|
class: "action-icon",
|
|
984
1003
|
innerHTML: x.icon
|
|
985
|
-
}, null, 8,
|
|
986
|
-
|
|
987
|
-
], 8,
|
|
1004
|
+
}, null, 8, Yt),
|
|
1005
|
+
T("span", qt, de(x.label), 1)
|
|
1006
|
+
], 8, Ut))), 128))
|
|
988
1007
|
], 6), [
|
|
989
1008
|
[Le, c.value]
|
|
990
1009
|
])
|
|
991
|
-
])) : (
|
|
992
|
-
(
|
|
1010
|
+
])) : (f(), w("div", Jt, [
|
|
1011
|
+
(f(!0), w(ie, null, ue(d.value, (x) => (f(), w("button", {
|
|
993
1012
|
key: x.type,
|
|
994
1013
|
type: "button",
|
|
995
1014
|
class: "row-action-btn",
|
|
996
1015
|
title: x.label,
|
|
997
1016
|
"aria-label": x.label,
|
|
998
1017
|
disabled: x.disabled,
|
|
999
|
-
onClick:
|
|
1018
|
+
onClick: xe((y) => R(x.type, y), ["stop"])
|
|
1000
1019
|
}, [
|
|
1001
|
-
|
|
1020
|
+
T("span", {
|
|
1002
1021
|
class: "action-icon",
|
|
1003
1022
|
innerHTML: x.icon
|
|
1004
|
-
}, null, 8,
|
|
1005
|
-
], 8,
|
|
1023
|
+
}, null, 8, Kt)
|
|
1024
|
+
], 8, Qt))), 128))
|
|
1006
1025
|
]))
|
|
1007
1026
|
], 2));
|
|
1008
1027
|
}
|
|
1009
|
-
}),
|
|
1028
|
+
}), _t = ["tabindex"], en = ["tabindex"], tn = ["colspan"], nn = /* @__PURE__ */ ve({
|
|
1010
1029
|
__name: "ARow",
|
|
1011
1030
|
props: {
|
|
1012
1031
|
rowIndex: {},
|
|
@@ -1015,99 +1034,99 @@ const yt = (e) => {
|
|
|
1015
1034
|
addNavigation: { type: [Boolean, Object], default: !1 }
|
|
1016
1035
|
},
|
|
1017
1036
|
emits: ["row:action", "row:click"],
|
|
1018
|
-
setup(e, { emit:
|
|
1019
|
-
const i =
|
|
1020
|
-
const b = e.store.config.view === "uncounted" ? 0 : 1,
|
|
1021
|
-
return e.store.columns.length + b +
|
|
1022
|
-
}),
|
|
1023
|
-
i("row:action", b,
|
|
1024
|
-
},
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
},
|
|
1028
|
-
if (e.addNavigation ||
|
|
1037
|
+
setup(e, { emit: p }) {
|
|
1038
|
+
const i = p, u = le("rowEl"), k = D(() => e.store.isRowVisible(e.rowIndex)), a = D(() => e.store.getRowExpandSymbol(e.rowIndex)), l = D(() => e.store.config.clickable ?? !1), c = D(() => e.store.config.rowActions || { enabled: !1 }), v = D(() => c.value.enabled), n = D(() => c.value.position || "before-index"), C = D(() => e.store.config.view === "list-expansion" && !!e.store.display[e.rowIndex]?.expanded), d = D(() => {
|
|
1039
|
+
const b = e.store.config.view === "uncounted" ? 0 : 1, R = v.value ? 1 : 0;
|
|
1040
|
+
return e.store.columns.length + b + R;
|
|
1041
|
+
}), g = (b, R, s) => {
|
|
1042
|
+
i("row:action", b, R, s);
|
|
1043
|
+
}, W = (b) => {
|
|
1044
|
+
const R = b.target;
|
|
1045
|
+
R.closest(".atable-row-actions") || R.closest(".tree-index") || R.closest(".expansion-index") || i("row:click", e.rowIndex, b);
|
|
1046
|
+
}, j = e.store.config.view === "list-expansion";
|
|
1047
|
+
if (e.addNavigation || j) {
|
|
1029
1048
|
let b = {};
|
|
1030
|
-
e.addNavigation === !0 ? b = { ...
|
|
1031
|
-
|
|
1032
|
-
}),
|
|
1049
|
+
e.addNavigation === !0 ? b = { ...Ee } : typeof e.addNavigation == "object" && (b = { ...Ee, ...e.addNavigation }), j && !b["keydown.control.g"] && (b["keydown.control.g"] = (R) => {
|
|
1050
|
+
R.stopPropagation(), R.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
1051
|
+
}), Ke([
|
|
1033
1052
|
{
|
|
1034
1053
|
selectors: u,
|
|
1035
1054
|
handlers: b
|
|
1036
1055
|
}
|
|
1037
1056
|
]);
|
|
1038
1057
|
}
|
|
1039
|
-
return (b,
|
|
1040
|
-
|
|
1058
|
+
return (b, R) => (f(), w(ie, null, [
|
|
1059
|
+
oe(T("tr", pe(b.$attrs, {
|
|
1041
1060
|
ref: "rowEl",
|
|
1042
1061
|
tabindex: e.tabIndex,
|
|
1043
1062
|
class: ["atable-row", { "atable-row-clickable": l.value }],
|
|
1044
|
-
onClick:
|
|
1063
|
+
onClick: W
|
|
1045
1064
|
}), [
|
|
1046
|
-
v.value && n.value === "before-index" ? (
|
|
1065
|
+
v.value && n.value === "before-index" ? (f(), te(De, {
|
|
1047
1066
|
key: 0,
|
|
1048
1067
|
"row-index": e.rowIndex,
|
|
1049
1068
|
store: e.store,
|
|
1050
1069
|
config: c.value,
|
|
1051
1070
|
position: n.value,
|
|
1052
|
-
onAction:
|
|
1071
|
+
onAction: g
|
|
1053
1072
|
}, null, 8, ["row-index", "store", "config", "position"])) : G("", !0),
|
|
1054
|
-
e.store.config.view !== "uncounted" ?
|
|
1055
|
-
e.store.config.view === "list" ? (
|
|
1073
|
+
e.store.config.view !== "uncounted" ? se(b.$slots, "index", {}, () => [
|
|
1074
|
+
e.store.config.view === "list" ? (f(), w("td", {
|
|
1056
1075
|
key: 0,
|
|
1057
1076
|
tabIndex: -1,
|
|
1058
|
-
class:
|
|
1059
|
-
},
|
|
1077
|
+
class: Q(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1078
|
+
}, de(e.rowIndex + 1), 3)) : e.store.isTreeView ? (f(), w("td", {
|
|
1060
1079
|
key: 1,
|
|
1061
1080
|
tabIndex: -1,
|
|
1062
|
-
class:
|
|
1063
|
-
onClick:
|
|
1064
|
-
},
|
|
1081
|
+
class: Q(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1082
|
+
onClick: R[0] || (R[0] = (s) => e.store.toggleRowExpand(e.rowIndex))
|
|
1083
|
+
}, de(a.value), 3)) : e.store.config.view === "list-expansion" ? (f(), w("td", {
|
|
1065
1084
|
key: 2,
|
|
1066
1085
|
tabIndex: -1,
|
|
1067
|
-
class:
|
|
1068
|
-
onClick:
|
|
1069
|
-
},
|
|
1086
|
+
class: Q(["expansion-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1087
|
+
onClick: R[1] || (R[1] = (s) => e.store.toggleRowExpand(e.rowIndex))
|
|
1088
|
+
}, de(a.value), 3)) : G("", !0)
|
|
1070
1089
|
], !0, 1) : G("", !0),
|
|
1071
|
-
v.value && n.value === "after-index" ? (
|
|
1090
|
+
v.value && n.value === "after-index" ? (f(), te(De, {
|
|
1072
1091
|
key: 2,
|
|
1073
1092
|
"row-index": e.rowIndex,
|
|
1074
1093
|
store: e.store,
|
|
1075
1094
|
config: c.value,
|
|
1076
1095
|
position: n.value,
|
|
1077
|
-
onAction:
|
|
1096
|
+
onAction: g
|
|
1078
1097
|
}, null, 8, ["row-index", "store", "config", "position"])) : G("", !0),
|
|
1079
|
-
|
|
1080
|
-
v.value && n.value === "end" ? (
|
|
1098
|
+
se(b.$slots, "default", {}, void 0, !0),
|
|
1099
|
+
v.value && n.value === "end" ? (f(), te(De, {
|
|
1081
1100
|
key: 3,
|
|
1082
1101
|
"row-index": e.rowIndex,
|
|
1083
1102
|
store: e.store,
|
|
1084
1103
|
config: c.value,
|
|
1085
1104
|
position: n.value,
|
|
1086
|
-
onAction:
|
|
1105
|
+
onAction: g
|
|
1087
1106
|
}, null, 8, ["row-index", "store", "config", "position"])) : G("", !0)
|
|
1088
|
-
], 16,
|
|
1089
|
-
[Le,
|
|
1107
|
+
], 16, _t), [
|
|
1108
|
+
[Le, k.value]
|
|
1090
1109
|
]),
|
|
1091
|
-
C.value ? (
|
|
1110
|
+
C.value ? (f(), w("tr", {
|
|
1092
1111
|
key: 0,
|
|
1093
1112
|
tabindex: e.tabIndex,
|
|
1094
1113
|
class: "atable-expanded-row"
|
|
1095
1114
|
}, [
|
|
1096
|
-
|
|
1115
|
+
T("td", {
|
|
1097
1116
|
tabIndex: -1,
|
|
1098
1117
|
colspan: d.value,
|
|
1099
1118
|
class: "atable-expanded-content"
|
|
1100
1119
|
}, [
|
|
1101
|
-
|
|
1120
|
+
se(b.$slots, "content", {
|
|
1102
1121
|
row: e.store.rows[e.rowIndex],
|
|
1103
1122
|
rowIndex: e.rowIndex,
|
|
1104
1123
|
store: e.store
|
|
1105
1124
|
}, void 0, !0)
|
|
1106
|
-
], 8,
|
|
1107
|
-
], 8,
|
|
1125
|
+
], 8, tn)
|
|
1126
|
+
], 8, en)) : G("", !0)
|
|
1108
1127
|
], 64));
|
|
1109
1128
|
}
|
|
1110
|
-
}),
|
|
1129
|
+
}), nt = /* @__PURE__ */ be(nn, [["__scopeId", "data-v-4dd47763"]]), on = { class: "gantt-connection-overlay" }, ln = {
|
|
1111
1130
|
class: "connection-svg",
|
|
1112
1131
|
style: {
|
|
1113
1132
|
position: "absolute",
|
|
@@ -1118,39 +1137,39 @@ const yt = (e) => {
|
|
|
1118
1137
|
pointerEvents: "none",
|
|
1119
1138
|
zIndex: 1
|
|
1120
1139
|
}
|
|
1121
|
-
},
|
|
1140
|
+
}, an = ["d", "stroke-width", "onDblclick"], sn = ["id", "d", "stroke", "stroke-width", "onDblclick"], rn = 0.25, Se = 16, cn = /* @__PURE__ */ ve({
|
|
1122
1141
|
__name: "AGanttConnection",
|
|
1123
1142
|
props: {
|
|
1124
1143
|
store: {}
|
|
1125
1144
|
},
|
|
1126
1145
|
emits: ["connection:delete"],
|
|
1127
|
-
setup(e, { emit:
|
|
1128
|
-
const i =
|
|
1146
|
+
setup(e, { emit: p }) {
|
|
1147
|
+
const i = p, u = D(() => e.store.connectionPaths.filter((l) => {
|
|
1129
1148
|
const c = e.store.ganttBars.find((n) => n.id === l.from.barId), v = e.store.ganttBars.find((n) => n.id === l.to.barId);
|
|
1130
1149
|
return c && v;
|
|
1131
|
-
})),
|
|
1150
|
+
})), k = (l) => {
|
|
1132
1151
|
const c = e.store.connectionHandles.find(
|
|
1133
|
-
(
|
|
1152
|
+
(L) => L.barId === l.from.barId && L.side === l.from.side
|
|
1134
1153
|
), v = e.store.connectionHandles.find(
|
|
1135
|
-
(
|
|
1154
|
+
(L) => L.barId === l.to.barId && L.side === l.to.side
|
|
1136
1155
|
);
|
|
1137
1156
|
if (!c || !v) return "";
|
|
1138
|
-
const n = c.position.x +
|
|
1139
|
-
return `M ${n} ${C} Q ${b} ${C}, ${
|
|
1140
|
-
},
|
|
1157
|
+
const n = c.position.x + Se / 2, C = c.position.y + Se / 2, d = v.position.x + Se / 2, g = v.position.y + Se / 2, W = Math.abs(d - n), j = Math.max(W * rn, 50), b = n + (l.from.side === "left" ? -j : j), R = d + (l.to.side === "left" ? -j : j), s = { x: 0.5 * n + 0.5 * b, y: 0.5 * C + 0.5 * C }, h = { x: 0.5 * b + 0.5 * R, y: 0.5 * C + 0.5 * g }, x = { x: 0.5 * R + 0.5 * d, y: 0.5 * g + 0.5 * g }, y = { x: 0.5 * s.x + 0.5 * h.x, y: 0.5 * s.y + 0.5 * h.y }, m = { x: 0.5 * h.x + 0.5 * x.x, y: 0.5 * h.y + 0.5 * x.y }, B = { x: 0.5 * y.x + 0.5 * m.x, y: 0.5 * y.y + 0.5 * m.y };
|
|
1158
|
+
return `M ${n} ${C} Q ${b} ${C}, ${B.x} ${B.y} Q ${R} ${g}, ${d} ${g}`;
|
|
1159
|
+
}, a = (l) => {
|
|
1141
1160
|
e.store.deleteConnection(l.id) && i("connection:delete", l);
|
|
1142
1161
|
};
|
|
1143
|
-
return (l, c) => (
|
|
1144
|
-
(
|
|
1145
|
-
c[0] || (c[0] =
|
|
1146
|
-
|
|
1162
|
+
return (l, c) => (f(), w("div", on, [
|
|
1163
|
+
(f(), w("svg", ln, [
|
|
1164
|
+
c[0] || (c[0] = T("defs", null, [
|
|
1165
|
+
T("path", {
|
|
1147
1166
|
id: "arrowhead",
|
|
1148
1167
|
d: "M 0 -7 L 20 0 L 0 7Z",
|
|
1149
1168
|
stroke: "black",
|
|
1150
1169
|
"stroke-width": "1",
|
|
1151
1170
|
fill: "currentColor"
|
|
1152
1171
|
}),
|
|
1153
|
-
|
|
1172
|
+
T("marker", {
|
|
1154
1173
|
id: "arrowhead-marker",
|
|
1155
1174
|
markerWidth: "10",
|
|
1156
1175
|
markerHeight: "7",
|
|
@@ -1159,42 +1178,42 @@ const yt = (e) => {
|
|
|
1159
1178
|
orient: "auto",
|
|
1160
1179
|
markerUnits: "strokeWidth"
|
|
1161
1180
|
}, [
|
|
1162
|
-
|
|
1181
|
+
T("polygon", {
|
|
1163
1182
|
points: "0 0, 10 3.5, 0 7",
|
|
1164
1183
|
fill: "currentColor"
|
|
1165
1184
|
})
|
|
1166
1185
|
])
|
|
1167
1186
|
], -1)),
|
|
1168
|
-
(
|
|
1187
|
+
(f(!0), w(ie, null, ue(u.value, (v) => (f(), w("path", {
|
|
1169
1188
|
key: `${v.id}-hitbox`,
|
|
1170
|
-
d:
|
|
1189
|
+
d: k(v),
|
|
1171
1190
|
stroke: "transparent",
|
|
1172
1191
|
"stroke-width": (v.style?.width || 2) + 10,
|
|
1173
1192
|
fill: "none",
|
|
1174
1193
|
class: "connection-hitbox",
|
|
1175
|
-
onDblclick: (n) =>
|
|
1176
|
-
}, null, 40,
|
|
1177
|
-
(
|
|
1194
|
+
onDblclick: (n) => a(v)
|
|
1195
|
+
}, null, 40, an))), 128)),
|
|
1196
|
+
(f(!0), w(ie, null, ue(u.value, (v) => (f(), w("path", {
|
|
1178
1197
|
id: v.id,
|
|
1179
1198
|
key: v.id,
|
|
1180
|
-
d:
|
|
1199
|
+
d: k(v),
|
|
1181
1200
|
stroke: v.style?.color || "#666",
|
|
1182
1201
|
"stroke-width": v.style?.width || 2,
|
|
1183
1202
|
fill: "none",
|
|
1184
1203
|
"marker-mid": "url(#arrowhead-marker)",
|
|
1185
1204
|
class: "connection-path animated-path",
|
|
1186
|
-
onDblclick: (n) =>
|
|
1187
|
-
}, null, 40,
|
|
1205
|
+
onDblclick: (n) => a(v)
|
|
1206
|
+
}, null, 40, sn))), 128))
|
|
1188
1207
|
]))
|
|
1189
1208
|
]));
|
|
1190
1209
|
}
|
|
1191
|
-
}),
|
|
1210
|
+
}), dn = /* @__PURE__ */ be(cn, [["__scopeId", "data-v-d5929c98"]]), un = { class: "column-filter" }, vn = {
|
|
1192
1211
|
key: 2,
|
|
1193
1212
|
class: "checkbox-filter"
|
|
1194
|
-
},
|
|
1213
|
+
}, fn = ["value"], hn = {
|
|
1195
1214
|
key: 5,
|
|
1196
1215
|
class: "date-range-filter"
|
|
1197
|
-
},
|
|
1216
|
+
}, gn = /* @__PURE__ */ ve({
|
|
1198
1217
|
__name: "ATableColumnFilter",
|
|
1199
1218
|
props: {
|
|
1200
1219
|
column: {},
|
|
@@ -1202,7 +1221,7 @@ const yt = (e) => {
|
|
|
1202
1221
|
store: {}
|
|
1203
1222
|
},
|
|
1204
1223
|
setup(e) {
|
|
1205
|
-
const
|
|
1224
|
+
const p = {
|
|
1206
1225
|
text: "text",
|
|
1207
1226
|
number: "number",
|
|
1208
1227
|
boolean: "checkbox",
|
|
@@ -1214,25 +1233,25 @@ const yt = (e) => {
|
|
|
1214
1233
|
attach: "text",
|
|
1215
1234
|
quantity: "number",
|
|
1216
1235
|
currency: "number"
|
|
1217
|
-
}, i = E(""), u =
|
|
1236
|
+
}, i = E(""), u = it({
|
|
1218
1237
|
startValue: "",
|
|
1219
1238
|
endValue: ""
|
|
1220
|
-
}),
|
|
1239
|
+
}), k = D(() => {
|
|
1221
1240
|
if (e.column.filterType) return e.column.filterType;
|
|
1222
|
-
const C =
|
|
1223
|
-
return C ?
|
|
1224
|
-
}),
|
|
1241
|
+
const C = Ae(e.column.component);
|
|
1242
|
+
return C ? p[C] : "text";
|
|
1243
|
+
}), a = (C) => {
|
|
1225
1244
|
if (C.filterOptions) return C.filterOptions;
|
|
1226
1245
|
const d = /* @__PURE__ */ new Set();
|
|
1227
|
-
return e.store.rows.forEach((
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
}), Array.from(d).map((
|
|
1231
|
-
value:
|
|
1232
|
-
label: String(
|
|
1246
|
+
return e.store.rows.forEach((g) => {
|
|
1247
|
+
const W = g[C.name];
|
|
1248
|
+
W != null && W !== "" && d.add(W);
|
|
1249
|
+
}), Array.from(d).map((g) => ({
|
|
1250
|
+
value: g,
|
|
1251
|
+
label: String(g)
|
|
1233
1252
|
}));
|
|
1234
|
-
}, l =
|
|
1235
|
-
!C &&
|
|
1253
|
+
}, l = D(() => !!(i.value || u.startValue || u.endValue)), c = (C) => {
|
|
1254
|
+
!C && k.value !== "checkbox" ? (e.store.clearFilter(e.colIndex), i.value = "") : (i.value = C, e.store.setFilter(e.colIndex, { value: C }));
|
|
1236
1255
|
}, v = (C, d) => {
|
|
1237
1256
|
C === "start" ? u.startValue = d : u.endValue = d, !u.startValue && !u.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
|
|
1238
1257
|
value: null,
|
|
@@ -1242,81 +1261,81 @@ const yt = (e) => {
|
|
|
1242
1261
|
}, n = () => {
|
|
1243
1262
|
i.value = "", u.startValue = "", u.endValue = "", e.store.clearFilter(e.colIndex);
|
|
1244
1263
|
};
|
|
1245
|
-
return (C, d) => (
|
|
1246
|
-
|
|
1264
|
+
return (C, d) => (f(), w("div", un, [
|
|
1265
|
+
k.value === "text" ? oe((f(), w("input", {
|
|
1247
1266
|
key: 0,
|
|
1248
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1267
|
+
"onUpdate:modelValue": d[0] || (d[0] = (g) => i.value = g),
|
|
1249
1268
|
type: "text",
|
|
1250
1269
|
class: "filter-input",
|
|
1251
|
-
onInput: d[1] || (d[1] = (
|
|
1270
|
+
onInput: d[1] || (d[1] = (g) => c(i.value))
|
|
1252
1271
|
}, null, 544)), [
|
|
1253
|
-
[
|
|
1254
|
-
]) :
|
|
1272
|
+
[Ce, i.value]
|
|
1273
|
+
]) : k.value === "number" ? oe((f(), w("input", {
|
|
1255
1274
|
key: 1,
|
|
1256
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
1275
|
+
"onUpdate:modelValue": d[2] || (d[2] = (g) => i.value = g),
|
|
1257
1276
|
type: "number",
|
|
1258
1277
|
class: "filter-input",
|
|
1259
|
-
onInput: d[3] || (d[3] = (
|
|
1278
|
+
onInput: d[3] || (d[3] = (g) => c(i.value))
|
|
1260
1279
|
}, null, 544)), [
|
|
1261
|
-
[
|
|
1262
|
-
]) :
|
|
1263
|
-
|
|
1264
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
1280
|
+
[Ce, i.value]
|
|
1281
|
+
]) : k.value === "checkbox" ? (f(), w("label", vn, [
|
|
1282
|
+
oe(T("input", {
|
|
1283
|
+
"onUpdate:modelValue": d[4] || (d[4] = (g) => i.value = g),
|
|
1265
1284
|
type: "checkbox",
|
|
1266
1285
|
class: "filter-checkbox",
|
|
1267
|
-
onChange: d[5] || (d[5] = (
|
|
1286
|
+
onChange: d[5] || (d[5] = (g) => c(i.value))
|
|
1268
1287
|
}, null, 544), [
|
|
1269
|
-
[
|
|
1288
|
+
[rt, i.value]
|
|
1270
1289
|
]),
|
|
1271
|
-
|
|
1272
|
-
])) :
|
|
1290
|
+
T("span", null, de(e.column.label), 1)
|
|
1291
|
+
])) : k.value === "select" ? oe((f(), w("select", {
|
|
1273
1292
|
key: 3,
|
|
1274
|
-
"onUpdate:modelValue": d[6] || (d[6] = (
|
|
1293
|
+
"onUpdate:modelValue": d[6] || (d[6] = (g) => i.value = g),
|
|
1275
1294
|
class: "filter-select",
|
|
1276
|
-
onChange: d[7] || (d[7] = (
|
|
1295
|
+
onChange: d[7] || (d[7] = (g) => c(i.value))
|
|
1277
1296
|
}, [
|
|
1278
|
-
d[15] || (d[15] =
|
|
1279
|
-
(
|
|
1280
|
-
key:
|
|
1281
|
-
value:
|
|
1282
|
-
},
|
|
1297
|
+
d[15] || (d[15] = T("option", { value: "" }, "All", -1)),
|
|
1298
|
+
(f(!0), w(ie, null, ue(a(e.column), (g) => (f(), w("option", {
|
|
1299
|
+
key: g.value || g,
|
|
1300
|
+
value: g.value || g
|
|
1301
|
+
}, de(g.label || g), 9, fn))), 128))
|
|
1283
1302
|
], 544)), [
|
|
1284
|
-
[
|
|
1285
|
-
]) :
|
|
1303
|
+
[ct, i.value]
|
|
1304
|
+
]) : k.value === "date" ? oe((f(), w("input", {
|
|
1286
1305
|
key: 4,
|
|
1287
|
-
"onUpdate:modelValue": d[8] || (d[8] = (
|
|
1306
|
+
"onUpdate:modelValue": d[8] || (d[8] = (g) => i.value = g),
|
|
1288
1307
|
type: "date",
|
|
1289
1308
|
class: "filter-input",
|
|
1290
|
-
onChange: d[9] || (d[9] = (
|
|
1309
|
+
onChange: d[9] || (d[9] = (g) => c(i.value))
|
|
1291
1310
|
}, null, 544)), [
|
|
1292
|
-
[
|
|
1293
|
-
]) :
|
|
1294
|
-
|
|
1295
|
-
"onUpdate:modelValue": d[10] || (d[10] = (
|
|
1311
|
+
[Ce, i.value]
|
|
1312
|
+
]) : k.value === "dateRange" ? (f(), w("div", hn, [
|
|
1313
|
+
oe(T("input", {
|
|
1314
|
+
"onUpdate:modelValue": d[10] || (d[10] = (g) => u.startValue = g),
|
|
1296
1315
|
type: "date",
|
|
1297
1316
|
class: "filter-input",
|
|
1298
|
-
onChange: d[11] || (d[11] = (
|
|
1317
|
+
onChange: d[11] || (d[11] = (g) => v("start", u.startValue))
|
|
1299
1318
|
}, null, 544), [
|
|
1300
|
-
[
|
|
1319
|
+
[Ce, u.startValue]
|
|
1301
1320
|
]),
|
|
1302
|
-
d[16] || (d[16] =
|
|
1303
|
-
|
|
1304
|
-
"onUpdate:modelValue": d[12] || (d[12] = (
|
|
1321
|
+
d[16] || (d[16] = T("span", { class: "date-separator" }, "-", -1)),
|
|
1322
|
+
oe(T("input", {
|
|
1323
|
+
"onUpdate:modelValue": d[12] || (d[12] = (g) => u.endValue = g),
|
|
1305
1324
|
type: "date",
|
|
1306
1325
|
class: "filter-input",
|
|
1307
|
-
onChange: d[13] || (d[13] = (
|
|
1326
|
+
onChange: d[13] || (d[13] = (g) => v("end", u.endValue))
|
|
1308
1327
|
}, null, 544), [
|
|
1309
|
-
[
|
|
1328
|
+
[Ce, u.endValue]
|
|
1310
1329
|
])
|
|
1311
|
-
])) :
|
|
1330
|
+
])) : k.value === "component" && e.column.filterComponent ? (f(), te(we(e.column.filterComponent), {
|
|
1312
1331
|
key: 6,
|
|
1313
1332
|
value: i.value,
|
|
1314
1333
|
column: e.column,
|
|
1315
1334
|
"col-index": e.colIndex,
|
|
1316
1335
|
store: e.store,
|
|
1317
|
-
"onUpdate:value": d[14] || (d[14] = (
|
|
1336
|
+
"onUpdate:value": d[14] || (d[14] = (g) => c(g))
|
|
1318
1337
|
}, null, 40, ["value", "column", "col-index", "store"])) : G("", !0),
|
|
1319
|
-
l.value ? (
|
|
1338
|
+
l.value ? (f(), w("button", {
|
|
1320
1339
|
key: 7,
|
|
1321
1340
|
class: "clear-btn",
|
|
1322
1341
|
title: "Clear",
|
|
@@ -1324,113 +1343,113 @@ const yt = (e) => {
|
|
|
1324
1343
|
}, "×")) : G("", !0)
|
|
1325
1344
|
]));
|
|
1326
1345
|
}
|
|
1327
|
-
}),
|
|
1346
|
+
}), mn = /* @__PURE__ */ be(gn, [["__scopeId", "data-v-a0263c77"]]), wn = { key: 0 }, xn = {
|
|
1328
1347
|
class: "atable-header-row",
|
|
1329
1348
|
tabindex: "-1"
|
|
1330
|
-
},
|
|
1349
|
+
}, bn = {
|
|
1331
1350
|
key: 2,
|
|
1332
1351
|
class: "row-actions-header"
|
|
1333
|
-
},
|
|
1352
|
+
}, yn = ["data-colindex", "onClick"], Cn = {
|
|
1334
1353
|
key: 3,
|
|
1335
1354
|
class: "row-actions-header"
|
|
1336
|
-
},
|
|
1355
|
+
}, pn = {
|
|
1337
1356
|
key: 0,
|
|
1338
1357
|
class: "atable-filters-row"
|
|
1339
|
-
},
|
|
1358
|
+
}, kn = {
|
|
1340
1359
|
key: 2,
|
|
1341
1360
|
class: "row-actions-header"
|
|
1342
|
-
},
|
|
1361
|
+
}, Mn = {
|
|
1343
1362
|
key: 3,
|
|
1344
1363
|
class: "row-actions-header"
|
|
1345
|
-
},
|
|
1364
|
+
}, ot = /* @__PURE__ */ ve({
|
|
1346
1365
|
__name: "ATableHeader",
|
|
1347
1366
|
props: {
|
|
1348
1367
|
columns: {},
|
|
1349
1368
|
store: {}
|
|
1350
1369
|
},
|
|
1351
1370
|
setup(e) {
|
|
1352
|
-
const
|
|
1371
|
+
const p = D(() => e.columns.filter((l) => l.filterable)), i = D(() => e.store.config.rowActions?.enabled ?? !1), u = D(() => e.store.config.rowActions?.position ?? "before-index"), k = (l) => e.store.sortByColumn(l), a = (l) => {
|
|
1353
1372
|
for (const c of l) {
|
|
1354
1373
|
if (c.borderBoxSize.length === 0) continue;
|
|
1355
1374
|
const n = c.borderBoxSize[0].inlineSize, C = Number(c.target.dataset.colindex), d = e.store.columns[C]?.width;
|
|
1356
1375
|
typeof d == "number" && d !== n && e.store.resizeColumn(C, n);
|
|
1357
1376
|
}
|
|
1358
1377
|
};
|
|
1359
|
-
return (l, c) => e.columns.length ? (
|
|
1360
|
-
|
|
1361
|
-
i.value && u.value === "before-index" ? (
|
|
1378
|
+
return (l, c) => e.columns.length ? (f(), w("thead", wn, [
|
|
1379
|
+
T("tr", xn, [
|
|
1380
|
+
i.value && u.value === "before-index" ? (f(), w("th", {
|
|
1362
1381
|
key: 0,
|
|
1363
|
-
class:
|
|
1382
|
+
class: Q(["row-actions-header", { "sticky-column": u.value === "before-index" }])
|
|
1364
1383
|
}, null, 2)) : G("", !0),
|
|
1365
|
-
e.store.zeroColumn ? (
|
|
1384
|
+
e.store.zeroColumn ? (f(), w("th", {
|
|
1366
1385
|
key: 1,
|
|
1367
1386
|
id: "header-index",
|
|
1368
|
-
class:
|
|
1387
|
+
class: Q([[
|
|
1369
1388
|
e.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1370
1389
|
e.store.isTreeView ? "tree-index" : "",
|
|
1371
1390
|
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1372
1391
|
], "list-index"])
|
|
1373
1392
|
}, null, 2)) : G("", !0),
|
|
1374
|
-
i.value && u.value === "after-index" ? (
|
|
1375
|
-
(
|
|
1393
|
+
i.value && u.value === "after-index" ? (f(), w("th", bn)) : G("", !0),
|
|
1394
|
+
(f(!0), w(ie, null, ue(e.columns, (v, n) => oe((f(), w("th", {
|
|
1376
1395
|
key: v.name,
|
|
1377
1396
|
"data-colindex": n,
|
|
1378
1397
|
tabindex: "-1",
|
|
1379
|
-
style:
|
|
1380
|
-
class:
|
|
1381
|
-
onClick: (C) => v.sortable !== !1 ?
|
|
1398
|
+
style: re(e.store.getHeaderCellStyle(v)),
|
|
1399
|
+
class: Q(`${v.pinned ? "sticky-column" : ""} ${v.sortable === !1 ? "" : "cursor-pointer"}`),
|
|
1400
|
+
onClick: (C) => v.sortable !== !1 ? k(n) : void 0
|
|
1382
1401
|
}, [
|
|
1383
|
-
|
|
1384
|
-
|
|
1402
|
+
se(l.$slots, "default", {}, () => [
|
|
1403
|
+
dt(de(v.label || String.fromCharCode(n + 97).toUpperCase()), 1)
|
|
1385
1404
|
])
|
|
1386
|
-
], 14,
|
|
1387
|
-
[
|
|
1405
|
+
], 14, yn)), [
|
|
1406
|
+
[Z(wt), a]
|
|
1388
1407
|
])), 128)),
|
|
1389
|
-
i.value && u.value === "end" ? (
|
|
1408
|
+
i.value && u.value === "end" ? (f(), w("th", Cn)) : G("", !0)
|
|
1390
1409
|
]),
|
|
1391
|
-
|
|
1392
|
-
i.value && u.value === "before-index" ? (
|
|
1410
|
+
p.value.length > 0 ? (f(), w("tr", pn, [
|
|
1411
|
+
i.value && u.value === "before-index" ? (f(), w("th", {
|
|
1393
1412
|
key: 0,
|
|
1394
|
-
class:
|
|
1413
|
+
class: Q(["row-actions-header", { "sticky-column": u.value === "before-index" }])
|
|
1395
1414
|
}, null, 2)) : G("", !0),
|
|
1396
|
-
e.store.zeroColumn ? (
|
|
1415
|
+
e.store.zeroColumn ? (f(), w("th", {
|
|
1397
1416
|
key: 1,
|
|
1398
|
-
class:
|
|
1417
|
+
class: Q([[
|
|
1399
1418
|
e.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1400
1419
|
e.store.isTreeView ? "tree-index" : "",
|
|
1401
1420
|
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1402
1421
|
], "list-index"])
|
|
1403
1422
|
}, null, 2)) : G("", !0),
|
|
1404
|
-
i.value && u.value === "after-index" ? (
|
|
1405
|
-
(
|
|
1423
|
+
i.value && u.value === "after-index" ? (f(), w("th", kn)) : G("", !0),
|
|
1424
|
+
(f(!0), w(ie, null, ue(e.columns, (v, n) => (f(), w("th", {
|
|
1406
1425
|
key: `filter-${v.name}`,
|
|
1407
|
-
class:
|
|
1408
|
-
style:
|
|
1426
|
+
class: Q(`${v.pinned ? "sticky-column" : ""}`),
|
|
1427
|
+
style: re(e.store.getHeaderCellStyle(v))
|
|
1409
1428
|
}, [
|
|
1410
|
-
v.filterable ? (
|
|
1429
|
+
v.filterable ? (f(), te(mn, {
|
|
1411
1430
|
key: 0,
|
|
1412
1431
|
column: v,
|
|
1413
1432
|
"col-index": n,
|
|
1414
1433
|
store: e.store
|
|
1415
1434
|
}, null, 8, ["column", "col-index", "store"])) : G("", !0)
|
|
1416
1435
|
], 6))), 128)),
|
|
1417
|
-
i.value && u.value === "end" ? (
|
|
1436
|
+
i.value && u.value === "end" ? (f(), w("th", Mn)) : G("", !0)
|
|
1418
1437
|
])) : G("", !0)
|
|
1419
1438
|
])) : G("", !0);
|
|
1420
1439
|
}
|
|
1421
|
-
}),
|
|
1440
|
+
}), lt = /* @__PURE__ */ ve({
|
|
1422
1441
|
__name: "ATableModal",
|
|
1423
1442
|
props: {
|
|
1424
1443
|
store: {}
|
|
1425
1444
|
},
|
|
1426
1445
|
setup(e) {
|
|
1427
|
-
const
|
|
1446
|
+
const p = le("amodal"), { width: i, height: u } = me(p), k = D(() => {
|
|
1428
1447
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return {};
|
|
1429
|
-
const
|
|
1430
|
-
if (!
|
|
1431
|
-
const l =
|
|
1448
|
+
const a = e.store.modal.cell?.closest("table");
|
|
1449
|
+
if (!a) return {};
|
|
1450
|
+
const l = a.offsetHeight || 0, c = a.offsetWidth || 0;
|
|
1432
1451
|
let v = e.store.modal.cell?.offsetTop || 0;
|
|
1433
|
-
const n =
|
|
1452
|
+
const n = a.querySelector("thead")?.offsetHeight || 0;
|
|
1434
1453
|
v += n, v = v + u.value < l ? v : v - (u.value + e.store.modal.height);
|
|
1435
1454
|
let C = e.store.modal.cell?.offsetLeft || 0;
|
|
1436
1455
|
return C = C + i.value <= c ? C : C - (i.value - e.store.modal.width), {
|
|
@@ -1438,39 +1457,39 @@ const yt = (e) => {
|
|
|
1438
1457
|
top: `${v}px`
|
|
1439
1458
|
};
|
|
1440
1459
|
});
|
|
1441
|
-
return (
|
|
1460
|
+
return (a, l) => (f(), w("div", {
|
|
1442
1461
|
ref: "amodal",
|
|
1443
1462
|
class: "amodal",
|
|
1444
1463
|
tabindex: "-1",
|
|
1445
|
-
style:
|
|
1446
|
-
onClick: l[0] || (l[0] =
|
|
1464
|
+
style: re(k.value),
|
|
1465
|
+
onClick: l[0] || (l[0] = xe(() => {
|
|
1447
1466
|
}, ["stop"])),
|
|
1448
|
-
onInput: l[1] || (l[1] =
|
|
1467
|
+
onInput: l[1] || (l[1] = xe(() => {
|
|
1449
1468
|
}, ["stop"]))
|
|
1450
1469
|
}, [
|
|
1451
|
-
|
|
1470
|
+
se(a.$slots, "default")
|
|
1452
1471
|
], 36));
|
|
1453
1472
|
}
|
|
1454
1473
|
});
|
|
1455
|
-
function
|
|
1456
|
-
return e.filter((
|
|
1457
|
-
const
|
|
1458
|
-
return u.doctype && !u.cellComponent && (
|
|
1459
|
-
if (
|
|
1460
|
-
if (typeof
|
|
1461
|
-
const l =
|
|
1474
|
+
function Rn(e) {
|
|
1475
|
+
return e.filter((p) => !p.hidden && p.component).map(({ fieldname: p, hidden: i, ...u }) => {
|
|
1476
|
+
const k = Object.assign({ name: p }, u);
|
|
1477
|
+
return u.doctype && !u.cellComponent && (k.linkDoctype = u.doctype, u.format || (k.format = (a) => {
|
|
1478
|
+
if (a == null) return "";
|
|
1479
|
+
if (typeof a == "object") {
|
|
1480
|
+
const l = a.displayText ?? a.id ?? "";
|
|
1462
1481
|
return typeof l == "string" || typeof l == "number" ? String(l) : "";
|
|
1463
1482
|
}
|
|
1464
|
-
return String(
|
|
1465
|
-
})),
|
|
1483
|
+
return String(a);
|
|
1484
|
+
})), Ae(u.component) === "quantity" && !u.format && (k.format = _e), Ae(u.component) === "currency" && !u.format && (k.format = et), k;
|
|
1466
1485
|
});
|
|
1467
1486
|
}
|
|
1468
|
-
const
|
|
1487
|
+
const $n = {
|
|
1469
1488
|
class: "atable-container",
|
|
1470
1489
|
style: { position: "relative" }
|
|
1471
|
-
},
|
|
1490
|
+
}, In = /* @__PURE__ */ ve({
|
|
1472
1491
|
__name: "ATable",
|
|
1473
|
-
props: /* @__PURE__ */
|
|
1492
|
+
props: /* @__PURE__ */ Ye({
|
|
1474
1493
|
id: { default: "" },
|
|
1475
1494
|
config: { default: () => new Object() },
|
|
1476
1495
|
schema: { default: () => [] },
|
|
@@ -1481,139 +1500,139 @@ const kn = {
|
|
|
1481
1500
|
columns: {},
|
|
1482
1501
|
columnsModifiers: {}
|
|
1483
1502
|
}),
|
|
1484
|
-
emits: /* @__PURE__ */
|
|
1485
|
-
setup(e, { expose:
|
|
1486
|
-
const u =
|
|
1503
|
+
emits: /* @__PURE__ */ Ye(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:click", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move", "row:open"], ["update:rows", "update:columns"]),
|
|
1504
|
+
setup(e, { expose: p, emit: i }) {
|
|
1505
|
+
const u = Ge(e, "rows"), k = Ge(e, "columns"), a = i, l = le("table"), c = k.value?.length ? k.value : Rn(e.schema ?? []), v = ut("aformLinkResolver", null), n = kt({
|
|
1487
1506
|
columns: c,
|
|
1488
1507
|
rows: u.value,
|
|
1489
1508
|
id: e.id,
|
|
1490
1509
|
config: e.config,
|
|
1491
1510
|
linkResolver: e.linkResolver ?? v
|
|
1492
1511
|
});
|
|
1493
|
-
n.$onAction(({ name:
|
|
1494
|
-
if (
|
|
1495
|
-
const [
|
|
1512
|
+
n.$onAction(({ name: s, store: h, args: x, after: y }) => {
|
|
1513
|
+
if (s === "setCellData" || s === "setCellText") {
|
|
1514
|
+
const [m, B, L] = x, z = h.getCellData(m, B);
|
|
1496
1515
|
y(() => {
|
|
1497
|
-
u.value = [...n.rows],
|
|
1516
|
+
u.value = [...n.rows], a("cellUpdate", { colIndex: m, rowIndex: B, newValue: L, oldValue: z });
|
|
1498
1517
|
});
|
|
1499
|
-
} else if (
|
|
1500
|
-
const [
|
|
1501
|
-
let
|
|
1502
|
-
|
|
1503
|
-
|
|
1518
|
+
} else if (s === "updateGanttBar") {
|
|
1519
|
+
const [m] = x;
|
|
1520
|
+
let B = !1;
|
|
1521
|
+
m.type === "resize" ? B = m.oldColspan !== m.newColspan : m.type === "bar" && (B = m.oldStart !== m.newStart || m.oldEnd !== m.newEnd), B && y(() => {
|
|
1522
|
+
a("gantt:drag", m);
|
|
1504
1523
|
});
|
|
1505
|
-
} else
|
|
1506
|
-
|
|
1524
|
+
} else s === "resizeColumn" && y(() => {
|
|
1525
|
+
k.value = [...n.columns], a("columns:update", [...n.columns]);
|
|
1507
1526
|
});
|
|
1508
|
-
}),
|
|
1527
|
+
}), We(
|
|
1509
1528
|
() => u.value,
|
|
1510
|
-
(
|
|
1511
|
-
JSON.stringify(
|
|
1529
|
+
(s) => {
|
|
1530
|
+
JSON.stringify(s) !== JSON.stringify(n.rows) && (n.rows = [...s]);
|
|
1512
1531
|
},
|
|
1513
1532
|
{ deep: !0 }
|
|
1514
|
-
),
|
|
1515
|
-
|
|
1516
|
-
(
|
|
1517
|
-
|
|
1533
|
+
), We(
|
|
1534
|
+
k,
|
|
1535
|
+
(s) => {
|
|
1536
|
+
s && JSON.stringify(s) !== JSON.stringify(n.columns) && (n.columns = [...s], a("columns:update", [...s]));
|
|
1518
1537
|
},
|
|
1519
1538
|
{ deep: !0 }
|
|
1520
1539
|
), Ne(() => {
|
|
1521
|
-
|
|
1540
|
+
k.value?.some((s) => s.pinned) && (d(), n.isTreeView && gt(l, d, { childList: !0, subtree: !0 }));
|
|
1522
1541
|
});
|
|
1523
|
-
const C =
|
|
1524
|
-
const
|
|
1525
|
-
for (const [
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1542
|
+
const C = D(() => n.columns.filter((s) => s.pinned).length), d = () => {
|
|
1543
|
+
const s = l.value, h = s?.rows[0], x = s?.rows[1], y = h ? Array.from(h.cells) : [];
|
|
1544
|
+
for (const [m, B] of y.entries()) {
|
|
1545
|
+
const L = x?.cells[m];
|
|
1546
|
+
L && (B.style.width = `${L.offsetWidth}px`);
|
|
1528
1547
|
}
|
|
1529
|
-
for (const
|
|
1530
|
-
let
|
|
1531
|
-
const
|
|
1532
|
-
for (const
|
|
1533
|
-
(
|
|
1534
|
-
|
|
1548
|
+
for (const m of s?.rows || []) {
|
|
1549
|
+
let B = 0;
|
|
1550
|
+
const L = [];
|
|
1551
|
+
for (const z of m.cells)
|
|
1552
|
+
(z.classList.contains("sticky-column") || z.classList.contains("sticky-index")) && (z.style.left = `${B}px`, B += z.offsetWidth, L.push(z));
|
|
1553
|
+
L.length > 0 && L[L.length - 1].classList.add("sticky-column-edge");
|
|
1535
1554
|
}
|
|
1536
1555
|
};
|
|
1537
|
-
window.addEventListener("keydown", (
|
|
1538
|
-
if (
|
|
1556
|
+
window.addEventListener("keydown", (s) => {
|
|
1557
|
+
if (s.key === "Escape" && n.modal.visible) {
|
|
1539
1558
|
n.modal.visible = !1;
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1559
|
+
const h = n.modal.parent;
|
|
1560
|
+
h && Qe().then(() => h.focus());
|
|
1542
1561
|
}
|
|
1543
1562
|
});
|
|
1544
|
-
const
|
|
1545
|
-
if (!
|
|
1563
|
+
const g = (s) => {
|
|
1564
|
+
if (!s.gantt || C.value === 0)
|
|
1546
1565
|
return n.columns;
|
|
1547
|
-
const
|
|
1566
|
+
const h = [];
|
|
1548
1567
|
for (let x = 0; x < C.value; x++) {
|
|
1549
1568
|
const y = { ...n.columns[x] };
|
|
1550
|
-
y.originalIndex = x,
|
|
1569
|
+
y.originalIndex = x, h.push(y);
|
|
1551
1570
|
}
|
|
1552
|
-
return
|
|
1571
|
+
return h.push({
|
|
1553
1572
|
...n.columns[C.value],
|
|
1554
1573
|
isGantt: !0,
|
|
1555
|
-
colspan:
|
|
1574
|
+
colspan: s.gantt?.colspan || n.columns.length - C.value,
|
|
1556
1575
|
originalIndex: C.value,
|
|
1557
1576
|
width: "auto"
|
|
1558
1577
|
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
1559
|
-
}),
|
|
1560
|
-
},
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1563
|
-
|
|
1564
|
-
}, b = (
|
|
1565
|
-
const x = n.rows[
|
|
1566
|
-
|
|
1567
|
-
},
|
|
1568
|
-
switch (
|
|
1578
|
+
}), h;
|
|
1579
|
+
}, W = (s) => {
|
|
1580
|
+
a("connection:event", { type: "create", connection: s });
|
|
1581
|
+
}, j = (s) => {
|
|
1582
|
+
a("connection:event", { type: "delete", connection: s });
|
|
1583
|
+
}, b = (s, h) => {
|
|
1584
|
+
const x = n.rows[s];
|
|
1585
|
+
a("row:click", { row: x, rowIndex: s, event: h });
|
|
1586
|
+
}, R = (s, h, x) => {
|
|
1587
|
+
switch (s) {
|
|
1569
1588
|
case "add": {
|
|
1570
|
-
const y = n.addRow({},
|
|
1571
|
-
u.value = [...n.rows],
|
|
1589
|
+
const y = n.addRow({}, h + 1), m = n.rows[y];
|
|
1590
|
+
u.value = [...n.rows], a("row:add", { rowIndex: y, row: m });
|
|
1572
1591
|
break;
|
|
1573
1592
|
}
|
|
1574
1593
|
case "delete": {
|
|
1575
|
-
const y = n.deleteRow(
|
|
1576
|
-
y && (u.value = [...n.rows],
|
|
1594
|
+
const y = n.deleteRow(h);
|
|
1595
|
+
y && (u.value = [...n.rows], a("row:delete", { rowIndex: h, row: y }));
|
|
1577
1596
|
break;
|
|
1578
1597
|
}
|
|
1579
1598
|
case "duplicate": {
|
|
1580
|
-
const y = n.duplicateRow(
|
|
1599
|
+
const y = n.duplicateRow(h);
|
|
1581
1600
|
if (y >= 0) {
|
|
1582
|
-
const
|
|
1583
|
-
u.value = [...n.rows],
|
|
1601
|
+
const m = n.rows[y];
|
|
1602
|
+
u.value = [...n.rows], a("row:duplicate", { sourceIndex: h, newIndex: y, row: m });
|
|
1584
1603
|
}
|
|
1585
1604
|
break;
|
|
1586
1605
|
}
|
|
1587
1606
|
case "insertAbove": {
|
|
1588
|
-
const y = n.insertRowAbove(
|
|
1589
|
-
u.value = [...n.rows],
|
|
1607
|
+
const y = n.insertRowAbove(h), m = n.rows[y];
|
|
1608
|
+
u.value = [...n.rows], a("row:insert-above", { targetIndex: h, newIndex: y, row: m });
|
|
1590
1609
|
break;
|
|
1591
1610
|
}
|
|
1592
1611
|
case "insertBelow": {
|
|
1593
|
-
const y = n.insertRowBelow(
|
|
1594
|
-
u.value = [...n.rows],
|
|
1612
|
+
const y = n.insertRowBelow(h), m = n.rows[y];
|
|
1613
|
+
u.value = [...n.rows], a("row:insert-below", { targetIndex: h, newIndex: y, row: m });
|
|
1595
1614
|
break;
|
|
1596
1615
|
}
|
|
1597
1616
|
case "move": {
|
|
1598
|
-
|
|
1617
|
+
a("row:move", { fromIndex: h, toIndex: -1 });
|
|
1599
1618
|
break;
|
|
1600
1619
|
}
|
|
1601
1620
|
case "moveUp": {
|
|
1602
|
-
|
|
1621
|
+
h > 0 && n.moveRow(h, h - 1) && (u.value = [...n.rows], a("row:move", { fromIndex: h, toIndex: h - 1 }));
|
|
1603
1622
|
break;
|
|
1604
1623
|
}
|
|
1605
1624
|
case "moveDown": {
|
|
1606
|
-
|
|
1625
|
+
h < n.rows.length - 1 && n.moveRow(h, h + 1) && (u.value = [...n.rows], a("row:move", { fromIndex: h, toIndex: h + 1 }));
|
|
1607
1626
|
break;
|
|
1608
1627
|
}
|
|
1609
1628
|
case "open": {
|
|
1610
|
-
const y = n.rows[
|
|
1611
|
-
|
|
1629
|
+
const y = n.rows[h];
|
|
1630
|
+
a("row:open", { row: y, rowIndex: h, event: x });
|
|
1612
1631
|
break;
|
|
1613
1632
|
}
|
|
1614
1633
|
}
|
|
1615
1634
|
};
|
|
1616
|
-
return
|
|
1635
|
+
return p({
|
|
1617
1636
|
store: n,
|
|
1618
1637
|
createConnection: n.createConnection,
|
|
1619
1638
|
deleteConnection: n.deleteConnection,
|
|
@@ -1626,60 +1645,60 @@ const kn = {
|
|
|
1626
1645
|
insertRowAbove: n.insertRowAbove,
|
|
1627
1646
|
insertRowBelow: n.insertRowBelow,
|
|
1628
1647
|
moveRow: n.moveRow
|
|
1629
|
-
}), (
|
|
1630
|
-
|
|
1648
|
+
}), (s, h) => (f(), w("div", $n, [
|
|
1649
|
+
oe((f(), w("table", {
|
|
1631
1650
|
ref: "table",
|
|
1632
1651
|
class: "atable",
|
|
1633
|
-
style:
|
|
1634
|
-
width:
|
|
1652
|
+
style: re({
|
|
1653
|
+
width: Z(n).config.fullWidth ? "100%" : "auto"
|
|
1635
1654
|
})
|
|
1636
1655
|
}, [
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
columns:
|
|
1640
|
-
store:
|
|
1656
|
+
se(s.$slots, "header", { data: Z(n) }, () => [
|
|
1657
|
+
je(ot, {
|
|
1658
|
+
columns: Z(n).columns,
|
|
1659
|
+
store: Z(n)
|
|
1641
1660
|
}, null, 8, ["columns", "store"])
|
|
1642
1661
|
], !0),
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
(
|
|
1662
|
+
T("tbody", null, [
|
|
1663
|
+
se(s.$slots, "body", { data: Z(n) }, () => [
|
|
1664
|
+
(f(!0), w(ie, null, ue(Z(n).filteredRows, (x, y) => (f(), te(nt, {
|
|
1646
1665
|
key: `${x.originalIndex}-${y}`,
|
|
1647
1666
|
row: x,
|
|
1648
1667
|
"row-index": x.originalIndex,
|
|
1649
|
-
store:
|
|
1650
|
-
"onRow:action":
|
|
1668
|
+
store: Z(n),
|
|
1669
|
+
"onRow:action": R,
|
|
1651
1670
|
"onRow:click": b
|
|
1652
1671
|
}, {
|
|
1653
|
-
default:
|
|
1654
|
-
(
|
|
1655
|
-
key:
|
|
1672
|
+
default: Ue(() => [
|
|
1673
|
+
(f(!0), w(ie, null, ue(g(x), (m, B) => (f(), w(ie, {
|
|
1674
|
+
key: m.name
|
|
1656
1675
|
}, [
|
|
1657
|
-
|
|
1676
|
+
m.isGantt ? (f(), te(we(m.ganttComponent || "AGanttCell"), {
|
|
1658
1677
|
key: 0,
|
|
1659
|
-
store:
|
|
1660
|
-
"columns-count":
|
|
1678
|
+
store: Z(n),
|
|
1679
|
+
"columns-count": Z(n).columns.length - C.value,
|
|
1661
1680
|
color: x.gantt?.color,
|
|
1662
1681
|
start: x.gantt?.startIndex,
|
|
1663
1682
|
end: x.gantt?.endIndex,
|
|
1664
|
-
colspan:
|
|
1665
|
-
pinned:
|
|
1683
|
+
colspan: m.colspan,
|
|
1684
|
+
pinned: m.pinned,
|
|
1666
1685
|
"row-index": x.originalIndex,
|
|
1667
|
-
"col-index":
|
|
1668
|
-
style:
|
|
1669
|
-
textAlign:
|
|
1670
|
-
minWidth:
|
|
1671
|
-
width:
|
|
1686
|
+
"col-index": m.originalIndex ?? B,
|
|
1687
|
+
style: re({
|
|
1688
|
+
textAlign: m?.align || "center",
|
|
1689
|
+
minWidth: m?.width || "40ch",
|
|
1690
|
+
width: Z(n).config.fullWidth ? "auto" : null
|
|
1672
1691
|
}),
|
|
1673
|
-
"onConnection:create":
|
|
1674
|
-
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (
|
|
1692
|
+
"onConnection:create": W
|
|
1693
|
+
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (f(), te(we(m.cellComponent || "ACell"), {
|
|
1675
1694
|
key: 1,
|
|
1676
|
-
store:
|
|
1677
|
-
pinned:
|
|
1695
|
+
store: Z(n),
|
|
1696
|
+
pinned: m.pinned,
|
|
1678
1697
|
"row-index": x.originalIndex,
|
|
1679
|
-
"col-index":
|
|
1680
|
-
style:
|
|
1681
|
-
textAlign:
|
|
1682
|
-
width:
|
|
1698
|
+
"col-index": B,
|
|
1699
|
+
style: re({
|
|
1700
|
+
textAlign: m?.align || "center",
|
|
1701
|
+
width: Z(n).config.fullWidth ? "auto" : null
|
|
1683
1702
|
}),
|
|
1684
1703
|
spellcheck: "false"
|
|
1685
1704
|
}, null, 8, ["store", "pinned", "row-index", "col-index", "style"]))
|
|
@@ -1689,74 +1708,74 @@ const kn = {
|
|
|
1689
1708
|
}, 1032, ["row", "row-index", "store"]))), 128))
|
|
1690
1709
|
], !0)
|
|
1691
1710
|
]),
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
default:
|
|
1696
|
-
(
|
|
1697
|
-
key: `${
|
|
1698
|
-
"col-index":
|
|
1699
|
-
"row-index":
|
|
1700
|
-
store:
|
|
1701
|
-
},
|
|
1711
|
+
se(s.$slots, "footer", { data: Z(n) }, void 0, !0),
|
|
1712
|
+
se(s.$slots, "modal", { data: Z(n) }, () => [
|
|
1713
|
+
oe(je(lt, { store: Z(n) }, {
|
|
1714
|
+
default: Ue(() => [
|
|
1715
|
+
(f(), te(we(Z(n).modal.component), pe({
|
|
1716
|
+
key: `${Z(n).modal.rowIndex}:${Z(n).modal.colIndex}`,
|
|
1717
|
+
"col-index": Z(n).modal.colIndex,
|
|
1718
|
+
"row-index": Z(n).modal.rowIndex,
|
|
1719
|
+
store: Z(n)
|
|
1720
|
+
}, Z(n).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
|
|
1702
1721
|
]),
|
|
1703
1722
|
_: 1
|
|
1704
1723
|
}, 8, ["store"]), [
|
|
1705
|
-
[Le,
|
|
1724
|
+
[Le, Z(n).modal.visible]
|
|
1706
1725
|
])
|
|
1707
1726
|
], !0)
|
|
1708
1727
|
], 4)), [
|
|
1709
|
-
[
|
|
1728
|
+
[Z(xt), Z(n).closeModal]
|
|
1710
1729
|
]),
|
|
1711
|
-
|
|
1730
|
+
Z(n).isGanttView && Z(n).isDependencyGraphEnabled ? (f(), te(dn, {
|
|
1712
1731
|
key: 0,
|
|
1713
|
-
store:
|
|
1714
|
-
"onConnection:delete":
|
|
1732
|
+
store: Z(n),
|
|
1733
|
+
"onConnection:delete": j
|
|
1715
1734
|
}, null, 8, ["store"])) : G("", !0)
|
|
1716
1735
|
]));
|
|
1717
1736
|
}
|
|
1718
|
-
}),
|
|
1719
|
-
function
|
|
1720
|
-
return
|
|
1721
|
-
|
|
1722
|
-
|
|
1737
|
+
}), Sn = /* @__PURE__ */ be(In, [["__scopeId", "data-v-4bfbbeab"]]), Dn = {}, An = { class: "aloading" }, Bn = { class: "aloading-header" };
|
|
1738
|
+
function Hn(e, p) {
|
|
1739
|
+
return f(), w("div", An, [
|
|
1740
|
+
T("h2", Bn, [
|
|
1741
|
+
se(e.$slots, "default", {}, void 0, !0)
|
|
1723
1742
|
]),
|
|
1724
|
-
|
|
1743
|
+
p[0] || (p[0] = T("div", { class: "aloading-bar" }, null, -1))
|
|
1725
1744
|
]);
|
|
1726
1745
|
}
|
|
1727
|
-
const
|
|
1728
|
-
function
|
|
1729
|
-
return
|
|
1730
|
-
|
|
1731
|
-
|
|
1746
|
+
const Zn = /* @__PURE__ */ be(Dn, [["render", Hn], ["__scopeId", "data-v-a930a25b"]]), Tn = {}, Vn = { class: "aloading" }, En = { class: "aloading-header" };
|
|
1747
|
+
function On(e, p) {
|
|
1748
|
+
return f(), w("div", Vn, [
|
|
1749
|
+
T("h2", En, [
|
|
1750
|
+
se(e.$slots, "default", {}, void 0, !0)
|
|
1732
1751
|
]),
|
|
1733
|
-
|
|
1752
|
+
p[0] || (p[0] = T("div", { class: "aloading-bar" }, null, -1))
|
|
1734
1753
|
]);
|
|
1735
1754
|
}
|
|
1736
|
-
const
|
|
1737
|
-
function
|
|
1738
|
-
e.component("ACell",
|
|
1755
|
+
const Nn = /* @__PURE__ */ be(Tn, [["render", On], ["__scopeId", "data-v-e1165876"]]);
|
|
1756
|
+
function qn(e) {
|
|
1757
|
+
e.component("ACell", It), e.component("AGanttCell", Tt), e.component("ARow", nt), e.component("ARowActions", De), e.component("ATable", Sn), e.component("ATableHeader", ot), e.component("ATableLoading", Zn), e.component("ATableLoadingBar", Nn), e.component("ATableModal", lt);
|
|
1739
1758
|
}
|
|
1740
1759
|
export {
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1760
|
+
It as ACell,
|
|
1761
|
+
Tt as AGanttCell,
|
|
1762
|
+
nt as ARow,
|
|
1763
|
+
De as ARowActions,
|
|
1764
|
+
Sn as ATable,
|
|
1765
|
+
ot as ATableHeader,
|
|
1766
|
+
Zn as ATableLoading,
|
|
1767
|
+
Nn as ATableLoadingBar,
|
|
1768
|
+
lt as ATableModal,
|
|
1769
|
+
Vt as AddIcon,
|
|
1770
|
+
Et as DeleteIcon,
|
|
1771
|
+
Ot as DuplicateIcon,
|
|
1772
|
+
Nt as InsertAboveIcon,
|
|
1773
|
+
Lt as InsertBelowIcon,
|
|
1774
|
+
Ft as MoveIcon,
|
|
1775
|
+
Pt as OpenIcon,
|
|
1776
|
+
Gt as actionIcons,
|
|
1777
|
+
kt as createTableStore,
|
|
1778
|
+
qn as install,
|
|
1779
|
+
Rn as schemaToColumns
|
|
1761
1780
|
};
|
|
1762
1781
|
//# sourceMappingURL=atable.js.map
|