@stonecrop/atable 0.2.58 → 0.2.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/atable.js +45 -45
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/src/types/index.d.ts +8 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/ARow.vue +2 -2
- package/src/components/ATable.vue +2 -2
- package/src/types/index.ts +8 -1
package/dist/assets/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";.atable-cell{border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--sc-cell-text-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);border-spacing:0px;border-collapse:collapse;overflow:hidden;text-overflow:ellipsis;order:1;white-space:nowrap;max-width:40ch}.atable-cell a{color:var(--sc-cell-text-color);text-decoration:none}.atable-cell:focus,.atable-cell:focus-within{background-color:var(--sc-focus-cell-background);outline-width:var(--sc-atable-cell-border-width);outline-style:solid;outline-offset:calc(var(--sc-atable-cell-border-width) * -1);outline-color:var(--sc-focus-cell-outline);box-shadow:none;overflow:hidden;text-wrap:nowrap;box-sizing:border-box}.row-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;display:flex;align-items:center;justify-content:center}.expandable-row{border-top:1px solid var(--sc-row-border-color);height:var(--sc-atable-row-height);border-left:4px solid var(--sc-row-border-color);display:flex}.expanded-row{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color)}.expanded-row-content{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color);padding:1.5rem}.table-row{border-top:1px solid var(--sc-row-border-color);display:flex;background-color:#fff}.list-index{color:var(--sc-header-text-color);font-weight:700;padding-left:var(--sc-atable-row-padding);padding-right:.5em;text-align:left;-webkit-user-select:none;user-select:none;width:7ch;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.tree-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.atable-header-row{display:flex}.atable-header-row th{padding-left:.5ch!important;font-weight:700;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);box-sizing:border-box;color:var(--sc-header-text-color)}#header-index{padding-left:var(--sc-atable-row-padding);box-sizing:border-box}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-modified: #ffffb1;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: 5px;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.amodal{position:fixed;background-color:var(--sc-row-color-zebra-dark);z-index:100}.sticky-index{position:sticky;left:0;z-index:1;order:0}.sticky-column,th.sticky-column,td.sticky-column,th.sticky-index,td.sticky-index{position:sticky;z-index:1;order:0;background:#fff}.sticky-column-edge,.atable th.sticky-column-edge{border-right:1px solid var(--sc-row-border-color);border-right-width:1px}[data-v-
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";.atable-cell{border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--sc-cell-text-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);border-spacing:0px;border-collapse:collapse;overflow:hidden;text-overflow:ellipsis;order:1;white-space:nowrap;max-width:40ch}.atable-cell a{color:var(--sc-cell-text-color);text-decoration:none}.atable-cell:focus,.atable-cell:focus-within{background-color:var(--sc-focus-cell-background);outline-width:var(--sc-atable-cell-border-width);outline-style:solid;outline-offset:calc(var(--sc-atable-cell-border-width) * -1);outline-color:var(--sc-focus-cell-outline);box-shadow:none;overflow:hidden;text-wrap:nowrap;box-sizing:border-box}.row-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;display:flex;align-items:center;justify-content:center}.expandable-row{border-top:1px solid var(--sc-row-border-color);height:var(--sc-atable-row-height);border-left:4px solid var(--sc-row-border-color);display:flex}.expanded-row{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color)}.expanded-row-content{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color);padding:1.5rem}.table-row{border-top:1px solid var(--sc-row-border-color);display:flex;background-color:#fff}.list-index{color:var(--sc-header-text-color);font-weight:700;padding-left:var(--sc-atable-row-padding);padding-right:.5em;text-align:left;-webkit-user-select:none;user-select:none;width:7ch;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.tree-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.atable-header-row{display:flex}.atable-header-row th{padding-left:.5ch!important;font-weight:700;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);box-sizing:border-box;color:var(--sc-header-text-color)}#header-index{padding-left:var(--sc-atable-row-padding);box-sizing:border-box}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-modified: #ffffb1;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: 5px;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.amodal{position:fixed;background-color:var(--sc-row-color-zebra-dark);z-index:100}.sticky-index{position:sticky;left:0;z-index:1;order:0}.sticky-column,th.sticky-column,td.sticky-column,th.sticky-index,td.sticky-index{position:sticky;z-index:1;order:0;background:#fff}.sticky-column-edge,.atable th.sticky-column-edge{border-right:1px solid var(--sc-row-border-color);border-right-width:1px}[data-v-5fc77917]:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-modified: #ffffb1;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: 5px;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.atable[data-v-5fc77917]{font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);border-collapse:collapse;box-sizing:border-box;table-layout:auto;width:auto}.atable th[data-v-5fc77917]{border-width:0px;border-style:solid;border-radius:0;padding-left:.5ch;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);color:var(--sc-gray-60);height:var(--sc-atable-row-height);font-weight:300;letter-spacing:.05rem;order:1;box-sizing:border-box}.atable th[data-v-5fc77917]:focus{outline:none}
|
package/dist/atable.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './assets/index.css';var Ue = Object.defineProperty;
|
|
2
2
|
var qe = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var T = (e, t, n) => qe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { onMounted as
|
|
4
|
+
import { onMounted as G, ref as b, watch as C, onBeforeUnmount as Ye, computed as x, unref as m, getCurrentScope as ie, onScopeDispose as se, getCurrentInstance as re, nextTick as Te, defineComponent as M, inject as Q, useTemplateRef as Z, openBlock as h, createElementBlock as k, normalizeStyle as P, normalizeClass as N, createBlock as Y, resolveDynamicComponent as De, mergeProps as ae, toDisplayString as B, Fragment as J, createElementVNode as W, renderSlot as S, createCommentVNode as V, withDirectives as ne, vShow as Me, toRef as Xe, readonly as Je, customRef as Qe, reactive as R, renderList as oe, createTextVNode as Ze, provide as Ke, createVNode as ye, withCtx as be } from "vue";
|
|
5
5
|
function Re(e) {
|
|
6
6
|
return ie() ? (se(e), !0) : !1;
|
|
7
7
|
}
|
|
@@ -11,21 +11,21 @@ function ce(e) {
|
|
|
11
11
|
const _e = typeof window < "u" && typeof document < "u";
|
|
12
12
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
13
13
|
const et = (e) => e != null, tt = Object.prototype.toString, nt = (e) => tt.call(e) === "[object Object]", ot = () => {
|
|
14
|
-
},
|
|
15
|
-
function
|
|
14
|
+
}, U = _e ? window : void 0;
|
|
15
|
+
function z(e) {
|
|
16
16
|
var t;
|
|
17
17
|
const n = ce(e);
|
|
18
18
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function F(...e) {
|
|
21
21
|
let t, n, l, i;
|
|
22
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, i] = e, t =
|
|
22
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, i] = e, t = U) : [t, n, l, i] = e, !t)
|
|
23
23
|
return ot;
|
|
24
24
|
Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
|
|
25
25
|
const o = [], a = () => {
|
|
26
26
|
o.forEach((u) => u()), o.length = 0;
|
|
27
27
|
}, s = (u, p, c, f) => (u.addEventListener(p, c, f), () => u.removeEventListener(p, c, f)), d = C(
|
|
28
|
-
() => [
|
|
28
|
+
() => [z(t), ce(i)],
|
|
29
29
|
([u, p]) => {
|
|
30
30
|
if (a(), !u)
|
|
31
31
|
return;
|
|
@@ -42,7 +42,7 @@ function z(...e) {
|
|
|
42
42
|
}
|
|
43
43
|
function lt() {
|
|
44
44
|
const e = b(!1), t = re();
|
|
45
|
-
return t &&
|
|
45
|
+
return t && G(() => {
|
|
46
46
|
e.value = !0;
|
|
47
47
|
}, t), e;
|
|
48
48
|
}
|
|
@@ -51,12 +51,12 @@ function it(e) {
|
|
|
51
51
|
return x(() => (t.value, !!e()));
|
|
52
52
|
}
|
|
53
53
|
function st(e, t, n = {}) {
|
|
54
|
-
const { window: l =
|
|
54
|
+
const { window: l = U, ...i } = n;
|
|
55
55
|
let o;
|
|
56
56
|
const a = it(() => l && "MutationObserver" in l), s = () => {
|
|
57
57
|
o && (o.disconnect(), o = void 0);
|
|
58
58
|
}, d = x(() => {
|
|
59
|
-
const c = ce(e), f = (Array.isArray(c) ? c : [c]).map(
|
|
59
|
+
const c = ce(e), f = (Array.isArray(c) ? c : [c]).map(z).filter(et);
|
|
60
60
|
return new Set(f);
|
|
61
61
|
}), r = C(
|
|
62
62
|
() => d.value,
|
|
@@ -76,7 +76,7 @@ function st(e, t, n = {}) {
|
|
|
76
76
|
function rt(e = {}) {
|
|
77
77
|
var t;
|
|
78
78
|
const {
|
|
79
|
-
window: n =
|
|
79
|
+
window: n = U,
|
|
80
80
|
deep: l = !0,
|
|
81
81
|
triggerOnRemoval: i = !1
|
|
82
82
|
} = e, o = (t = e.document) != null ? t : n == null ? void 0 : n.document, a = () => {
|
|
@@ -89,9 +89,9 @@ function rt(e = {}) {
|
|
|
89
89
|
}, s = b(), d = () => {
|
|
90
90
|
s.value = a();
|
|
91
91
|
};
|
|
92
|
-
return n && (
|
|
92
|
+
return n && (F(n, "blur", (r) => {
|
|
93
93
|
r.relatedTarget === null && d();
|
|
94
|
-
}, !0),
|
|
94
|
+
}, !0), F(n, "focus", d, !0)), i && st(o, (r) => {
|
|
95
95
|
r.filter((u) => u.removedNodes.length).map((u) => Array.from(u.removedNodes)).flat().forEach((u) => {
|
|
96
96
|
u === s.value && d();
|
|
97
97
|
});
|
|
@@ -102,13 +102,13 @@ function rt(e = {}) {
|
|
|
102
102
|
}
|
|
103
103
|
const at = "focusin", ct = "focusout";
|
|
104
104
|
function dt(e, t = {}) {
|
|
105
|
-
const { window: n =
|
|
106
|
-
return !n || !a.value ? { focused: o } : (
|
|
105
|
+
const { window: n = U } = t, l = x(() => z(e)), i = b(!1), o = x(() => i.value), a = rt(t);
|
|
106
|
+
return !n || !a.value ? { focused: o } : (F(l, at, () => i.value = !0), F(l, ct, () => i.value = !1), { focused: o });
|
|
107
107
|
}
|
|
108
|
-
function ut(e, { window: t =
|
|
108
|
+
function ut(e, { window: t = U, scrollTarget: n } = {}) {
|
|
109
109
|
const l = b(!1), i = () => {
|
|
110
110
|
if (!t) return;
|
|
111
|
-
const o = t.document, a =
|
|
111
|
+
const o = t.document, a = z(e);
|
|
112
112
|
if (!a)
|
|
113
113
|
l.value = !1;
|
|
114
114
|
else {
|
|
@@ -117,10 +117,10 @@ function ut(e, { window: t = G, scrollTarget: n } = {}) {
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
return C(
|
|
120
|
-
() =>
|
|
120
|
+
() => z(e),
|
|
121
121
|
() => i(),
|
|
122
122
|
{ immediate: !0, flush: "post" }
|
|
123
|
-
), t &&
|
|
123
|
+
), t && F(n || t, "scroll", i, {
|
|
124
124
|
capture: !1,
|
|
125
125
|
passive: !0
|
|
126
126
|
}), l;
|
|
@@ -230,7 +230,7 @@ const O = (e) => {
|
|
|
230
230
|
}, Ie = (e) => {
|
|
231
231
|
const t = e.target.parentElement.lastElementChild;
|
|
232
232
|
return t && (!$(t) || !O(t)) ? fe(t) : t;
|
|
233
|
-
},
|
|
233
|
+
}, q = ["alt", "control", "shift", "meta"], mt = {
|
|
234
234
|
ArrowUp: "up",
|
|
235
235
|
ArrowDown: "down",
|
|
236
236
|
ArrowLeft: "left",
|
|
@@ -325,18 +325,18 @@ function ve(e) {
|
|
|
325
325
|
return a.selectors ? d = n(a) : s && (d = Array.from(s.children).filter((r) => $(r) && O(r))), d;
|
|
326
326
|
}, i = (a) => (s) => {
|
|
327
327
|
const d = mt[s.key] || s.key.toLowerCase();
|
|
328
|
-
if (
|
|
328
|
+
if (q.includes(d)) return;
|
|
329
329
|
const r = a.handlers || me;
|
|
330
330
|
for (const u of Object.keys(r)) {
|
|
331
331
|
const [p, ...c] = u.split(".");
|
|
332
332
|
if (p === "keydown" && c.includes(d)) {
|
|
333
|
-
const f = r[u], v = c.filter((y) =>
|
|
333
|
+
const f = r[u], v = c.filter((y) => q.includes(y)), g = q.some((y) => {
|
|
334
334
|
const E = y.charAt(0).toUpperCase() + y.slice(1);
|
|
335
335
|
return s.getModifierState(E);
|
|
336
336
|
});
|
|
337
337
|
if (v.length > 0) {
|
|
338
338
|
if (g) {
|
|
339
|
-
for (const y of
|
|
339
|
+
for (const y of q)
|
|
340
340
|
if (c.includes(y)) {
|
|
341
341
|
const E = y.charAt(0).toUpperCase() + y.slice(1);
|
|
342
342
|
s.getModifierState(E) && f(s);
|
|
@@ -347,7 +347,7 @@ function ve(e) {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}, o = [];
|
|
350
|
-
|
|
350
|
+
G(() => {
|
|
351
351
|
for (const a of e) {
|
|
352
352
|
const s = t(a), d = l(a), r = i(a), u = s ? [s] : d;
|
|
353
353
|
for (const p of u) {
|
|
@@ -376,7 +376,7 @@ function gt(e) {
|
|
|
376
376
|
return re();
|
|
377
377
|
}
|
|
378
378
|
function xt(e, t = !0, n) {
|
|
379
|
-
gt() ?
|
|
379
|
+
gt() ? G(e, n) : t ? e() : Te(e);
|
|
380
380
|
}
|
|
381
381
|
const he = vt ? window : void 0;
|
|
382
382
|
function D(e) {
|
|
@@ -409,7 +409,7 @@ function Ae(...e) {
|
|
|
409
409
|
}
|
|
410
410
|
function Et() {
|
|
411
411
|
const e = b(!1), t = re();
|
|
412
|
-
return t &&
|
|
412
|
+
return t && G(() => {
|
|
413
413
|
e.value = !0;
|
|
414
414
|
}, t), e;
|
|
415
415
|
}
|
|
@@ -575,7 +575,7 @@ const It = (e) => {
|
|
|
575
575
|
onMousedown: E,
|
|
576
576
|
class: N(["atable-cell", w.pinned ? "sticky-column" : ""])
|
|
577
577
|
}, [
|
|
578
|
-
m(r).cellComponent ? (h(),
|
|
578
|
+
m(r).cellComponent ? (h(), Y(De(m(r).cellComponent), ae({
|
|
579
579
|
key: 0,
|
|
580
580
|
value: g.value
|
|
581
581
|
}, m(r).cellComponentProps), null, 16, ["value"])) : f.value ? (h(), k("span", {
|
|
@@ -607,7 +607,7 @@ const It = (e) => {
|
|
|
607
607
|
}
|
|
608
608
|
]);
|
|
609
609
|
}
|
|
610
|
-
return (i, o) => (h(), k(
|
|
610
|
+
return (i, o) => (h(), k(J, null, [
|
|
611
611
|
W("tr", ae(i.$attrs, {
|
|
612
612
|
ref: "rowEl",
|
|
613
613
|
tabindex: i.tabIndex,
|
|
@@ -633,7 +633,7 @@ const It = (e) => {
|
|
|
633
633
|
}, [
|
|
634
634
|
S(i.$slots, "content")
|
|
635
635
|
], 8, Dt)
|
|
636
|
-
], 8, Tt)) :
|
|
636
|
+
], 8, Tt)) : V("", !0)
|
|
637
637
|
], 64));
|
|
638
638
|
}
|
|
639
639
|
}), Rt = ["tabindex"], He = /* @__PURE__ */ M({
|
|
@@ -665,7 +665,7 @@ const It = (e) => {
|
|
|
665
665
|
tabindex: s.tabIndex,
|
|
666
666
|
class: "table-row"
|
|
667
667
|
}, [
|
|
668
|
-
S(s.$slots, "index", {}, () => [
|
|
668
|
+
m(t).config.view !== "uncounted" ? S(s.$slots, "index", { key: 0 }, () => [
|
|
669
669
|
m(t).config.view === "list" ? (h(), k("td", {
|
|
670
670
|
key: 0,
|
|
671
671
|
tabIndex: -1,
|
|
@@ -675,8 +675,8 @@ const It = (e) => {
|
|
|
675
675
|
tabIndex: -1,
|
|
676
676
|
class: N(["tree-index", l.value ? "sticky-index" : ""]),
|
|
677
677
|
onClick: d[0] || (d[0] = (r) => a(s.rowIndex))
|
|
678
|
-
}, B(o.value), 3)) :
|
|
679
|
-
]),
|
|
678
|
+
}, B(o.value), 3)) : V("", !0)
|
|
679
|
+
]) : V("", !0),
|
|
680
680
|
S(s.$slots, "default")
|
|
681
681
|
], 8, Rt)), [
|
|
682
682
|
[Me, i.value]
|
|
@@ -714,7 +714,7 @@ function L(e) {
|
|
|
714
714
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
715
715
|
}
|
|
716
716
|
const Be = Ne ? window : void 0;
|
|
717
|
-
function
|
|
717
|
+
function X(...e) {
|
|
718
718
|
let t, n, l, i;
|
|
719
719
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, i] = e, t = Be) : [t, n, l, i] = e, !t)
|
|
720
720
|
return j;
|
|
@@ -752,7 +752,7 @@ function $e(e, t, n = {}) {
|
|
|
752
752
|
return v && (c.target === v || c.composedPath().includes(v));
|
|
753
753
|
}
|
|
754
754
|
}), u = [
|
|
755
|
-
|
|
755
|
+
X(l, "click", (c) => {
|
|
756
756
|
const f = L(e);
|
|
757
757
|
if (!(!f || f === c.target || c.composedPath().includes(f))) {
|
|
758
758
|
if (c.detail === 0 && (s = !d(c)), !s) {
|
|
@@ -762,11 +762,11 @@ function $e(e, t, n = {}) {
|
|
|
762
762
|
t(c);
|
|
763
763
|
}
|
|
764
764
|
}, { passive: !0, capture: o }),
|
|
765
|
-
|
|
765
|
+
X(l, "pointerdown", (c) => {
|
|
766
766
|
const f = L(e);
|
|
767
767
|
s = !d(c) && !!(f && !c.composedPath().includes(f));
|
|
768
768
|
}, { passive: !0 }),
|
|
769
|
-
a &&
|
|
769
|
+
a && X(l, "blur", (c) => {
|
|
770
770
|
setTimeout(() => {
|
|
771
771
|
var f;
|
|
772
772
|
const v = L(e);
|
|
@@ -824,7 +824,7 @@ function Bt(e, t = !1) {
|
|
|
824
824
|
});
|
|
825
825
|
const o = () => {
|
|
826
826
|
const s = ee(H(e));
|
|
827
|
-
!s || n.value || (le && (l =
|
|
827
|
+
!s || n.value || (le && (l = X(
|
|
828
828
|
s,
|
|
829
829
|
"touchmove",
|
|
830
830
|
(d) => {
|
|
@@ -944,8 +944,8 @@ const Ft = {
|
|
|
944
944
|
m(t).config.view === "tree" ? "tree-index" : "",
|
|
945
945
|
m(t).config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
946
946
|
], "list-index"])
|
|
947
|
-
}, null, 2)) :
|
|
948
|
-
(h(!0), k(
|
|
947
|
+
}, null, 2)) : V("", !0),
|
|
948
|
+
(h(!0), k(J, null, oe(i.columns, (a, s) => (h(), k("th", {
|
|
949
949
|
key: a.name,
|
|
950
950
|
tabindex: "-1",
|
|
951
951
|
style: P(l(a)),
|
|
@@ -956,7 +956,7 @@ const Ft = {
|
|
|
956
956
|
])
|
|
957
957
|
], 6))), 128))
|
|
958
958
|
])
|
|
959
|
-
])) :
|
|
959
|
+
])) : V("", !0);
|
|
960
960
|
}
|
|
961
961
|
}), Fe = /* @__PURE__ */ M({
|
|
962
962
|
__name: "ATableModal",
|
|
@@ -996,7 +996,7 @@ const Ft = {
|
|
|
996
996
|
n("update:modelValue", d);
|
|
997
997
|
},
|
|
998
998
|
{ deep: !0 }
|
|
999
|
-
),
|
|
999
|
+
), G(() => {
|
|
1000
1000
|
e.columns.some((d) => d.pinned) && (a(), o.config.view === "tree" && Pe(l, a, { childList: !0, subtree: !0 }));
|
|
1001
1001
|
});
|
|
1002
1002
|
const a = () => {
|
|
@@ -1037,21 +1037,21 @@ const Ft = {
|
|
|
1037
1037
|
], !0),
|
|
1038
1038
|
W("tbody", null, [
|
|
1039
1039
|
S(d.$slots, "body", { data: m(o) }, () => [
|
|
1040
|
-
(h(!0), k(
|
|
1040
|
+
(h(!0), k(J, null, oe(m(o).rows, (u, p) => (h(), Y(He, {
|
|
1041
1041
|
key: u.id,
|
|
1042
1042
|
row: u,
|
|
1043
1043
|
rowIndex: p,
|
|
1044
1044
|
tableid: m(o).id
|
|
1045
1045
|
}, {
|
|
1046
1046
|
default: be(() => [
|
|
1047
|
-
(h(!0), k(
|
|
1047
|
+
(h(!0), k(J, null, oe(m(o).columns, (c, f) => (h(), Y(We, {
|
|
1048
1048
|
key: c.name,
|
|
1049
1049
|
tableid: m(o).id,
|
|
1050
1050
|
col: c,
|
|
1051
1051
|
spellcheck: "false",
|
|
1052
1052
|
pinned: c.pinned,
|
|
1053
1053
|
rowIndex: p,
|
|
1054
|
-
colIndex: f
|
|
1054
|
+
colIndex: f,
|
|
1055
1055
|
component: c.cellComponent,
|
|
1056
1056
|
style: P({
|
|
1057
1057
|
textAlign: (c == null ? void 0 : c.align) || "center",
|
|
@@ -1077,7 +1077,7 @@ const Ft = {
|
|
|
1077
1077
|
})
|
|
1078
1078
|
}, {
|
|
1079
1079
|
default: be(() => [
|
|
1080
|
-
(h(),
|
|
1080
|
+
(h(), Y(De(m(o).modal.component), ae({
|
|
1081
1081
|
key: `${m(o).modal.rowIndex}:${m(o).modal.colIndex}`,
|
|
1082
1082
|
colIndex: m(o).modal.colIndex,
|
|
1083
1083
|
rowIndex: m(o).modal.rowIndex,
|
|
@@ -1098,7 +1098,7 @@ const Ft = {
|
|
|
1098
1098
|
for (const [l, i] of t)
|
|
1099
1099
|
n[l] = i;
|
|
1100
1100
|
return n;
|
|
1101
|
-
}, Yt = /* @__PURE__ */ qt(Ut, [["__scopeId", "data-v-
|
|
1101
|
+
}, Yt = /* @__PURE__ */ qt(Ut, [["__scopeId", "data-v-5fc77917"]]);
|
|
1102
1102
|
function Zt(e) {
|
|
1103
1103
|
e.component("ACell", We), e.component("AExpansionRow", Mt), e.component("ARow", He), e.component("ATable", Yt), e.component("ATableHeader", ze), e.component("ATableModal", Fe);
|
|
1104
1104
|
}
|