@agrotools1/at-components 1.0.5 → 1.0.7
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/Accordion/Accordion.vue.js +25 -24
- package/dist/Accordion/Accordion.vue3.js +2 -2
- package/dist/Button/Button.vue.js +1 -1
- package/dist/Button/Button.vue3.js +2 -2
- package/dist/DataTable/Column/Column.vue.js +28 -28
- package/dist/DataTable/DataTable.vue.js +34 -31
- package/dist/DataTable/DataTable.vue2.js +93 -78
- package/dist/Filter/Filter.vue.js +15 -14
- package/dist/Filter/Filter.vue2.js +60 -46
- package/dist/Input/Input.core.d.ts +12 -1
- package/dist/Input/Input.core.vue.js +42 -42
- package/dist/Input/Input.core.vue2.js +24 -19
- package/dist/Input/Text-area.d.ts +2 -0
- package/dist/Input/Text-area.vue.js +16 -0
- package/dist/Input/Text-area.vue2.js +14 -0
- package/dist/Input/Text-area.vue3.js +4 -0
- package/dist/Input/index.d.ts +15 -2
- package/dist/Input/index.js +3 -1
- package/dist/Modal/Modal.vue2.js +4 -2
- package/dist/Select/index.d.ts +2 -1
- package/dist/Upload/MultipleUpload/MultipleUpload.vue.js +5 -5
- package/dist/Upload/MultipleUpload/MultipleUpload.vue2.js +1 -1
- package/dist/Upload/SingleUpload/SingleUpload.vue.js +4 -4
- package/dist/Upload/SingleUpload/SingleUpload.vue2.js +1 -1
- package/dist/Upload/Upload.vue.js +1 -1
- package/dist/Upload/Upload.vue2.js +1 -1
- package/dist/Upload/Upload.vue3.js +2 -2
- package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue.js +10 -10
- package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue2.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import v from "./Accordion.vue2.js";
|
|
2
|
-
import { resolveComponent as t, openBlock as o, createElementBlock as c, normalizeClass as
|
|
2
|
+
import { resolveComponent as t, openBlock as o, createElementBlock as c, normalizeClass as a, createBlock as i, createCommentVNode as n, createVNode as C, withCtx as _, createTextVNode as S, toDisplayString as I, createElementVNode as r, normalizeStyle as g, withModifiers as h, renderSlot as l } from "vue";
|
|
3
3
|
import "./Accordion.vue3.js";
|
|
4
4
|
import $ from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const T = { class: "d-block w-100 at-accordion" },
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const T = { class: "d-block w-100 at-accordion" }, b = ["aria-expanded"], z = { class: "flex-grow-1" }, w = {
|
|
6
|
+
ref: "buttonRef",
|
|
7
|
+
as: "button",
|
|
8
|
+
class: "ms-2 at-accordion-button"
|
|
9
|
+
}, M = ["data-state"];
|
|
10
|
+
function N(e, s, O, V, B, D) {
|
|
11
|
+
const d = t("AtCircleMinusSolidIcon"), p = t("AtCheckCircleSolidIcon"), m = t("AtWarningSolidIcon"), u = t("AtCircleXMarkSolidIcon"), f = t("AtTitle"), k = t("AtAngleUpSolidIcon"), y = t("AtAngleDownSolidIcon");
|
|
8
12
|
return o(), c("div", T, [
|
|
9
13
|
e.isInformative ? (o(), c("div", {
|
|
10
14
|
key: 0,
|
|
11
|
-
class:
|
|
15
|
+
class: a(["d-flex align-items-center justify-content-center at-accordion-header", [`at-accordion-header-${e.$props.informativeType}`]])
|
|
12
16
|
}, [
|
|
13
17
|
e.informativeType === "default" ? (o(), i(d, {
|
|
14
18
|
key: 0,
|
|
@@ -25,35 +29,32 @@ function b(e, s, w, M, N, V) {
|
|
|
25
29
|
size: "20",
|
|
26
30
|
class: "me-2"
|
|
27
31
|
})) : n("", !0),
|
|
28
|
-
e.informativeType === "error" ? (o(), i(
|
|
32
|
+
e.informativeType === "error" ? (o(), i(u, {
|
|
29
33
|
key: 3,
|
|
30
34
|
size: "20",
|
|
31
35
|
class: "me-2"
|
|
32
36
|
})) : n("", !0),
|
|
33
|
-
C(
|
|
37
|
+
C(f, {
|
|
34
38
|
as: "h6",
|
|
35
39
|
bold: !0,
|
|
36
40
|
class: "m-0"
|
|
37
41
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
I(
|
|
42
|
+
default: _(() => [
|
|
43
|
+
S(I(e.informativeTitle), 1)
|
|
40
44
|
]),
|
|
41
45
|
_: 1
|
|
42
46
|
})
|
|
43
47
|
], 2)) : n("", !0),
|
|
44
48
|
r("div", {
|
|
45
|
-
class:
|
|
46
|
-
style: g({ backgroundColor: e.$props.titleColor ?? "" })
|
|
49
|
+
class: a(["d-flex align-items-center px-3 py-2 at-accordion-title", [`at-accordion-title-${e.$props.titleType}`]]),
|
|
50
|
+
style: g({ backgroundColor: e.$props.titleColor ?? "", cursor: "pointer" }),
|
|
51
|
+
"aria-expanded": e.isOpen,
|
|
52
|
+
onClick: s[0] || (s[0] = h((...A) => e.onClick && e.onClick(...A), ["stop", "prevent"]))
|
|
47
53
|
}, [
|
|
48
|
-
r("div",
|
|
49
|
-
|
|
54
|
+
r("div", z, [
|
|
55
|
+
l(e.$slots, "title", {}, void 0, !0)
|
|
50
56
|
]),
|
|
51
|
-
r("div",
|
|
52
|
-
ref: "buttonRef",
|
|
53
|
-
as: "button",
|
|
54
|
-
class: "ms-2 at-accordion-button",
|
|
55
|
-
onClick: s[0] || (s[0] = (...A) => e.onClick && e.onClick(...A))
|
|
56
|
-
}, [
|
|
57
|
+
r("div", w, [
|
|
57
58
|
e.isOpen ? (o(), i(k, {
|
|
58
59
|
key: 0,
|
|
59
60
|
size: "24",
|
|
@@ -65,16 +66,16 @@ function b(e, s, w, M, N, V) {
|
|
|
65
66
|
color: "#161617"
|
|
66
67
|
}))
|
|
67
68
|
], 512)
|
|
68
|
-
],
|
|
69
|
+
], 14, b),
|
|
69
70
|
r("div", {
|
|
70
71
|
"data-state": e.isOpen ? "open" : "close",
|
|
71
72
|
class: "at-accordion-body"
|
|
72
73
|
}, [
|
|
73
|
-
|
|
74
|
-
], 8,
|
|
74
|
+
l(e.$slots, "content", {}, void 0, !0)
|
|
75
|
+
], 8, M)
|
|
75
76
|
]);
|
|
76
77
|
}
|
|
77
|
-
const
|
|
78
|
+
const j = /* @__PURE__ */ $(v, [["render", N], ["__scopeId", "data-v-5bae2ccd"]]);
|
|
78
79
|
export {
|
|
79
|
-
|
|
80
|
+
j as default
|
|
80
81
|
};
|
|
@@ -30,7 +30,7 @@ function u(e, f, b, h, y, g) {
|
|
|
30
30
|
_: 3
|
|
31
31
|
}, 8, ["href", "target", "style", "class", "disabled", "aria-disabled"]);
|
|
32
32
|
}
|
|
33
|
-
const $ = /* @__PURE__ */ p(a, [["render", u], ["__scopeId", "data-v-
|
|
33
|
+
const $ = /* @__PURE__ */ p(a, [["render", u], ["__scopeId", "data-v-e6d82d7e"]]);
|
|
34
34
|
export {
|
|
35
35
|
$ as default
|
|
36
36
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as a, createElementBlock as i,
|
|
1
|
+
import r from "./Column.vue2.js";
|
|
2
|
+
import { openBlock as a, createElementBlock as i, mergeProps as n, createElementVNode as e, renderSlot as s, toDisplayString as d, createCommentVNode as m } from "vue";
|
|
3
3
|
import "./Column.vue3.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return a(), i("th", {
|
|
4
|
+
import f from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const p = ["data-align-columns", "data-filterable"], u = { class: "slot" }, c = { class: "filters" }, g = ["data-orientation", "data-filterable"], h = ["src"];
|
|
6
|
+
function b(t, o, _, v, M, $) {
|
|
7
|
+
return a(), i("th", n({
|
|
8
8
|
role: "columnheader",
|
|
9
9
|
class: "column",
|
|
10
10
|
"data-align-columns": t.alignColumns,
|
|
11
11
|
"data-filterable": t.withMaxMinFilter
|
|
12
|
-
}, [
|
|
13
|
-
e("div",
|
|
14
|
-
e("
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
])
|
|
12
|
+
}, t.$attrs), [
|
|
13
|
+
e("div", u, [
|
|
14
|
+
e("div", c, [
|
|
15
|
+
s(t.$slots, "default", {}, void 0, !0),
|
|
16
|
+
e("span", null, d(t.label), 1)
|
|
17
|
+
]),
|
|
18
|
+
t.withMaxMinFilter ? (a(), i("button", {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "filter-icon",
|
|
21
|
+
type: "button",
|
|
22
|
+
"data-orientation": t.orientation,
|
|
23
|
+
"data-filterable": t.withMaxMinFilter,
|
|
24
|
+
onClick: o[0] || (o[0] = (...l) => t.toggleOrientation && t.toggleOrientation(...l))
|
|
25
|
+
}, [
|
|
26
|
+
e("img", {
|
|
27
|
+
src: t.filterSvg,
|
|
28
|
+
alt: "Botão para filtrar valor"
|
|
29
|
+
}, null, 8, h)
|
|
30
|
+
], 8, g)) : m("", !0)
|
|
31
31
|
])
|
|
32
|
-
],
|
|
32
|
+
], 16, p);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const B = /* @__PURE__ */ f(r, [["render", b], ["__scopeId", "data-v-4be23688"]]);
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
B as default
|
|
37
37
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import A from "./DataTable.vue2.js";
|
|
2
|
-
import { resolveComponent as c, openBlock as t, createElementBlock as o, Fragment as
|
|
2
|
+
import { resolveComponent as c, openBlock as t, createElementBlock as o, Fragment as r, createElementVNode as i, mergeProps as P, createBlock as u, withCtx as $, createVNode as g, createCommentVNode as p, renderSlot as D, withDirectives as I, renderList as d, normalizeClass as f, withKeys as T, toDisplayString as w, resolveDynamicComponent as k, vShow as z, pushScopeId as E, popScopeId as K } from "vue";
|
|
3
3
|
import "./DataTable.vue3.js";
|
|
4
|
-
import
|
|
5
|
-
const b = (e) => (E("data-v-
|
|
4
|
+
import V from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const b = (e) => (E("data-v-1c0fda53"), e = e(), K(), e), L = ["data-align-columns"], U = ["data-isStick"], B = {
|
|
6
6
|
role: "row",
|
|
7
7
|
class: "thead-row"
|
|
8
8
|
}, F = {
|
|
9
9
|
key: 1,
|
|
10
10
|
role: "rowgroup"
|
|
11
|
-
}, N = /* @__PURE__ */ b(() => /* @__PURE__ */
|
|
11
|
+
}, N = /* @__PURE__ */ b(() => /* @__PURE__ */ i("tr", { class: "empty-space" }, null, -1)), H = ["onmouseenter"], R = ["data-key", "onClick"], W = { class: "td-container" }, j = ["id", "value", "onKeydown"], M = { key: 1 }, O = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "item-as-array"
|
|
14
|
-
}, q = { key: 0 }, G = /* @__PURE__ */ b(() => /* @__PURE__ */
|
|
14
|
+
}, q = { key: 0 }, G = /* @__PURE__ */ b(() => /* @__PURE__ */ i("tr", { class: "empty-space" }, null, -1)), J = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "d-flex flex-column gap-2 w-100"
|
|
17
17
|
}, Q = { class: "table-skeleton" }, X = {
|
|
18
18
|
key: 1,
|
|
19
19
|
style: { display: "flex", "justify-content": "flex-end", "margin-top": "16px" }
|
|
20
20
|
};
|
|
21
|
-
function Y(e, Z, x, ee, te
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
l("table", P(e.$attrs, {
|
|
21
|
+
function Y(e, h, Z, x, ee, te) {
|
|
22
|
+
const v = c("AtCheckbox"), C = c("AtColumn"), S = c("AtText"), _ = c("AtPaginator");
|
|
23
|
+
return t(), o(r, null, [
|
|
24
|
+
i("table", P(e.$attrs, {
|
|
26
25
|
role: "table",
|
|
27
26
|
class: "table-content",
|
|
28
27
|
"data-align-columns": e.alignColumns
|
|
29
28
|
}), [
|
|
30
|
-
|
|
29
|
+
i("thead", {
|
|
31
30
|
role: "rowgroup",
|
|
32
31
|
"data-isStick": e.stickHeader
|
|
33
32
|
}, [
|
|
34
|
-
|
|
33
|
+
i("tr", B, [
|
|
35
34
|
e.withSelection ? (t(), u(C, {
|
|
36
35
|
key: 0,
|
|
37
|
-
field: "selection"
|
|
36
|
+
field: "selection",
|
|
37
|
+
"data-align-columns": "left"
|
|
38
38
|
}, {
|
|
39
39
|
default: $(() => [
|
|
40
40
|
g(v, {
|
|
@@ -47,25 +47,25 @@ function Y(e, Z, x, ee, te, oe) {
|
|
|
47
47
|
})) : p("", !0),
|
|
48
48
|
D(e.$slots, "default", {}, void 0, !0)
|
|
49
49
|
])
|
|
50
|
-
], 8,
|
|
51
|
-
!e.value || !e.value.length ? (t(), u(
|
|
50
|
+
], 8, U),
|
|
51
|
+
!e.value || !e.value.length ? (t(), u(S, {
|
|
52
52
|
key: 0,
|
|
53
53
|
as: "h6"
|
|
54
54
|
})) : I((t(), o("tbody", F, [
|
|
55
55
|
N,
|
|
56
|
-
(t(!0), o(
|
|
57
|
-
key: e.extractKey(
|
|
56
|
+
(t(!0), o(r, null, d(e.activeTableData, (l) => (t(), o("tr", {
|
|
57
|
+
key: e.extractKey(l),
|
|
58
58
|
class: f([...e.columnsClasses, "tbody-tr"]),
|
|
59
59
|
role: "row",
|
|
60
60
|
tabindex: "-1",
|
|
61
61
|
onmouseenter: (n) => {
|
|
62
62
|
e.lastHoveredTr = {
|
|
63
63
|
element: n.target,
|
|
64
|
-
item:
|
|
64
|
+
item: l
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
}, [
|
|
68
|
-
(t(!0), o(
|
|
68
|
+
(t(!0), o(r, null, d(e.getEntries(l), ([n, a]) => {
|
|
69
69
|
var m, y;
|
|
70
70
|
return t(), o("td", {
|
|
71
71
|
key: n,
|
|
@@ -75,7 +75,7 @@ function Y(e, Z, x, ee, te, oe) {
|
|
|
75
75
|
"aria-selected": "false",
|
|
76
76
|
onClick: (s) => e.handleTrClick(s, n)
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
i("div", W, [
|
|
79
79
|
(y = e.withEditableFields) != null && y.includes(n) ? (t(), o("input", {
|
|
80
80
|
key: 0,
|
|
81
81
|
id: n,
|
|
@@ -83,7 +83,7 @@ function Y(e, Z, x, ee, te, oe) {
|
|
|
83
83
|
value: a,
|
|
84
84
|
onKeydown: T((s) => e.updateOnKeyDown(s, n), ["enter"])
|
|
85
85
|
}, null, 40, j)) : typeof a == "number" || typeof a == "string" ? (t(), o("span", M, w(a), 1)) : Array.isArray(a) ? (t(), o("div", O, [
|
|
86
|
-
(t(!0), o(
|
|
86
|
+
(t(!0), o(r, null, d(a, (s) => (t(), o("div", { key: s }, [
|
|
87
87
|
typeof s == "number" || typeof s == "string" ? (t(), o("span", q, w(s), 1)) : (t(), u(k(typeof s == "function" ? s() : s), { key: 1 }))
|
|
88
88
|
]))), 128))
|
|
89
89
|
])) : (t(), u(k(typeof a == "function" ? a() : a), { key: 3 }))
|
|
@@ -95,14 +95,14 @@ function Y(e, Z, x, ee, te, oe) {
|
|
|
95
95
|
], 512)), [
|
|
96
96
|
[z, !e.reactiveIsLoading]
|
|
97
97
|
])
|
|
98
|
-
], 16,
|
|
98
|
+
], 16, L),
|
|
99
99
|
e.reactiveIsLoading ? (t(), o("div", J, [
|
|
100
|
-
|
|
101
|
-
(t(!0), o(
|
|
102
|
-
key:
|
|
100
|
+
i("div", Q, [
|
|
101
|
+
(t(!0), o(r, null, d(e.loadingRowsLength, (l) => (t(), o("div", {
|
|
102
|
+
key: l,
|
|
103
103
|
class: "skeleton-row"
|
|
104
104
|
}, [
|
|
105
|
-
(t(!0), o(
|
|
105
|
+
(t(!0), o(r, null, d(e.columns, (n) => (t(), o("div", {
|
|
106
106
|
key: n,
|
|
107
107
|
class: "skeleton-cell"
|
|
108
108
|
}))), 128))
|
|
@@ -110,18 +110,21 @@ function Y(e, Z, x, ee, te, oe) {
|
|
|
110
110
|
])
|
|
111
111
|
])) : p("", !0),
|
|
112
112
|
e.withPaginator ? (t(), o("div", X, [
|
|
113
|
-
g(
|
|
113
|
+
g(_, {
|
|
114
114
|
ref: "paginatorRef",
|
|
115
115
|
"page-size": e.withPaginator.pageSize,
|
|
116
116
|
total: e.withPaginator.total,
|
|
117
117
|
disable: e.disable,
|
|
118
118
|
"disable-without-c-s-s": e.disableWithoutCSS,
|
|
119
|
-
"onUpdate:activePage": (h =
|
|
120
|
-
|
|
119
|
+
"onUpdate:activePage": h[0] || (h[0] = (l) => {
|
|
120
|
+
var n;
|
|
121
|
+
(n = e.withPaginator) == null || n.onUpdatePage(l);
|
|
122
|
+
})
|
|
123
|
+
}, null, 8, ["page-size", "total", "disable", "disable-without-c-s-s"])
|
|
121
124
|
])) : p("", !0)
|
|
122
125
|
], 64);
|
|
123
126
|
}
|
|
124
|
-
const
|
|
127
|
+
const le = /* @__PURE__ */ V(A, [["render", Y], ["__scopeId", "data-v-1c0fda53"]]);
|
|
125
128
|
export {
|
|
126
|
-
|
|
129
|
+
le as default
|
|
127
130
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { AtTipograph as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as L, ref as f, reactive as O, provide as b, readonly as x, inject as B, watch as p, onMounted as P, watchEffect as C, h as R, computed as q } from "vue";
|
|
2
|
+
import D from "../Checkbox/Checkbox.vue.js";
|
|
3
|
+
import N from "../Paginator/Paginator.vue.js";
|
|
4
|
+
import { AtTipograph as V } from "../Tipograph/index.js";
|
|
5
|
+
import F from "./Column/Column.vue.js";
|
|
6
|
+
const W = L({
|
|
7
7
|
name: "AtDataTable",
|
|
8
8
|
components: {
|
|
9
|
-
AtText:
|
|
10
|
-
AtColumn:
|
|
11
|
-
AtPaginator:
|
|
12
|
-
AtCheckbox:
|
|
9
|
+
AtText: V.Title,
|
|
10
|
+
AtColumn: F,
|
|
11
|
+
AtPaginator: N,
|
|
12
|
+
AtCheckbox: D
|
|
13
13
|
},
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
props: {
|
|
@@ -73,110 +73,125 @@ const z = E({
|
|
|
73
73
|
"update:table-data": (e) => Array.isArray(e),
|
|
74
74
|
"update:table-cell": (e) => typeof e == "object"
|
|
75
75
|
},
|
|
76
|
-
setup(e,
|
|
77
|
-
const i =
|
|
76
|
+
setup(e, r) {
|
|
77
|
+
const i = f(e.value), A = f([...i.value]), m = f(!1), u = f([]), I = f(), v = f(
|
|
78
78
|
null
|
|
79
|
-
), d =
|
|
79
|
+
), d = O([]), g = (t) => {
|
|
80
80
|
d.includes(t) || d.push(t);
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
columns:
|
|
84
|
-
updateColumn:
|
|
85
|
-
}),
|
|
86
|
-
const w =
|
|
82
|
+
b("columns", {
|
|
83
|
+
columns: x(d),
|
|
84
|
+
updateColumn: g
|
|
85
|
+
}), b("alignColumns", e.alignColumns), b("tableData", i);
|
|
86
|
+
const w = B("columns", {
|
|
87
87
|
columns: d,
|
|
88
|
-
updateColumn:
|
|
89
|
-
}),
|
|
88
|
+
updateColumn: g
|
|
89
|
+
}), k = (t) => Object.entries(t), s = (t) => {
|
|
90
90
|
try {
|
|
91
91
|
return e.keyExtractor(t);
|
|
92
|
-
} catch (
|
|
93
|
-
console.warn("AtDataTable: Não foi possível extrair a key: ",
|
|
92
|
+
} catch (n) {
|
|
93
|
+
console.warn("AtDataTable: Não foi possível extrair a key: ", n);
|
|
94
94
|
}
|
|
95
|
-
},
|
|
96
|
-
var
|
|
95
|
+
}, T = (t, n) => {
|
|
96
|
+
var a;
|
|
97
97
|
const o = t.target;
|
|
98
|
-
if ((
|
|
99
|
-
const
|
|
100
|
-
|
|
98
|
+
if ((a = e.withEditableFields) != null && a.includes(n)) {
|
|
99
|
+
const l = o.querySelector("input");
|
|
100
|
+
l == null || l.focus();
|
|
101
101
|
}
|
|
102
|
-
},
|
|
102
|
+
}, y = (t) => {
|
|
103
103
|
u.value = t;
|
|
104
|
-
const
|
|
105
|
-
const l =
|
|
104
|
+
const n = i.value.length, o = [...e.value].filter((a) => {
|
|
105
|
+
const l = s(a);
|
|
106
106
|
return [...u.value].includes(l);
|
|
107
107
|
});
|
|
108
|
-
if (
|
|
109
|
-
const { element:
|
|
110
|
-
(
|
|
108
|
+
if (v.value) {
|
|
109
|
+
const { element: a, item: l } = v.value, c = o.find(
|
|
110
|
+
(h) => s(h) === s(l)
|
|
111
111
|
);
|
|
112
|
-
|
|
112
|
+
a.setAttribute("aria-selected", JSON.stringify(!!c));
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
var
|
|
117
|
-
const o = t.target, { value:
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
return
|
|
121
|
-
}),
|
|
122
|
-
field:
|
|
123
|
-
value:
|
|
114
|
+
n === u.value.length ? m.value = !0 : m.value = !1, r.emit("update:selected-items", Array.from(o));
|
|
115
|
+
}, K = (t, n) => {
|
|
116
|
+
var c;
|
|
117
|
+
const o = t.target, { value: a } = o, l = (c = v.value) == null ? void 0 : c.item;
|
|
118
|
+
l && (l[n] = a, i.value = i.value.map((h) => {
|
|
119
|
+
const j = s(h), E = s(l);
|
|
120
|
+
return j === E ? l : h;
|
|
121
|
+
}), r.emit("update:table-data", i.value), r.emit("update:table-cell", {
|
|
122
|
+
field: n,
|
|
123
|
+
value: a
|
|
124
124
|
}));
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
}, S = (t) => {
|
|
126
|
+
m.value = t;
|
|
127
|
+
const n = Array.from(
|
|
128
|
+
document.querySelectorAll(".table-content tbody tr")
|
|
129
|
+
), o = (a) => {
|
|
130
|
+
for (const l of n)
|
|
131
|
+
l.setAttribute("aria-selected", JSON.stringify(a));
|
|
132
|
+
};
|
|
133
|
+
t ? (u.value = [...e.value].map(
|
|
134
|
+
(a) => s(a)
|
|
135
|
+
), y(u.value), o(!0)) : (u.value = [], y(u.value), o(!1));
|
|
129
136
|
};
|
|
130
|
-
return
|
|
137
|
+
return p(
|
|
131
138
|
() => e.withDefaultSelectedItems,
|
|
132
139
|
(t) => {
|
|
133
|
-
t &&
|
|
140
|
+
t && y(e.withDefaultSelectedItems ?? []);
|
|
134
141
|
}
|
|
135
|
-
),
|
|
136
|
-
e.withDefaultSelectedItems &&
|
|
137
|
-
}),
|
|
142
|
+
), P(() => {
|
|
143
|
+
e.withDefaultSelectedItems && y([...e.withDefaultSelectedItems]);
|
|
144
|
+
}), C(() => {
|
|
138
145
|
e.withSelection ? i.value = [...e.value].map((t) => ({
|
|
139
|
-
selection: () =>
|
|
146
|
+
selection: () => R(D, {
|
|
140
147
|
modelValue: u.value,
|
|
141
|
-
"onUpdate:modelValue": (
|
|
142
|
-
val:
|
|
148
|
+
"onUpdate:modelValue": (n) => y(n),
|
|
149
|
+
val: s(t),
|
|
143
150
|
size: "20"
|
|
144
151
|
}),
|
|
145
152
|
...t
|
|
146
153
|
})) : i.value = [...e.value];
|
|
147
|
-
}),
|
|
148
|
-
const t = [...d],
|
|
149
|
-
const
|
|
150
|
-
for (const
|
|
151
|
-
|
|
152
|
-
return
|
|
154
|
+
}), C(() => {
|
|
155
|
+
const t = [...d], n = [...i.value].map((o) => {
|
|
156
|
+
const a = {}, l = Object.keys({ ...o });
|
|
157
|
+
for (const c of t)
|
|
158
|
+
l.includes(c) && (a[c] = o[c]);
|
|
159
|
+
return a;
|
|
153
160
|
});
|
|
154
|
-
|
|
155
|
-
}),
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
A.value = n;
|
|
162
|
+
}), p(
|
|
163
|
+
() => [e.isLoading, e.value],
|
|
164
|
+
() => {
|
|
165
|
+
!e.isLoading && e.value.length > 0 && S(m.value);
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
flush: "post"
|
|
169
|
+
}
|
|
170
|
+
), {
|
|
171
|
+
reactiveIsLoading: q(() => e.isLoading),
|
|
172
|
+
withSelectionModel: m,
|
|
173
|
+
handleWithSelectionChanges: S,
|
|
159
174
|
tableData: i,
|
|
160
|
-
activeTableData:
|
|
175
|
+
activeTableData: A,
|
|
161
176
|
columns: w.columns,
|
|
162
177
|
updateColumn: w.updateColumn,
|
|
163
|
-
internalUpdateColumn:
|
|
178
|
+
internalUpdateColumn: g,
|
|
164
179
|
internalColumns: d,
|
|
165
|
-
lastHoveredTr:
|
|
166
|
-
getEntries:
|
|
167
|
-
extractKey:
|
|
168
|
-
updateOnKeyDown:
|
|
169
|
-
handleTrClick:
|
|
170
|
-
paginatorRef:
|
|
180
|
+
lastHoveredTr: v,
|
|
181
|
+
getEntries: k,
|
|
182
|
+
extractKey: s,
|
|
183
|
+
updateOnKeyDown: K,
|
|
184
|
+
handleTrClick: T,
|
|
185
|
+
paginatorRef: I
|
|
171
186
|
};
|
|
172
187
|
},
|
|
173
188
|
methods: {
|
|
174
189
|
setPage(e) {
|
|
175
|
-
var
|
|
176
|
-
(
|
|
190
|
+
var r;
|
|
191
|
+
(r = this.paginatorRef) == null || r.setPage(e);
|
|
177
192
|
}
|
|
178
193
|
}
|
|
179
194
|
});
|
|
180
195
|
export {
|
|
181
|
-
|
|
196
|
+
W as default
|
|
182
197
|
};
|