@agrotools1/at-components 0.5.0-5 → 0.5.0-6
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/Checkbox/Checkbox.vue.js +1 -1
- package/dist/Dropdown/Dropdown.core.d.ts +24 -0
- package/dist/Dropdown/Dropdown.core.vue.js +22 -19
- package/dist/Dropdown/Dropdown.core.vue2.js +48 -23
- package/dist/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/Filter/components/Filter.types.d.ts +1 -0
- package/dist/Filter/components/Filter.vue.js +64 -62
- package/dist/Filter/components/Filter.vue2.js +57 -52
- package/dist/Input/Input.core.d.ts +9 -0
- package/dist/Input/Input.core.vue.js +25 -19
- package/dist/Input/Input.core.vue2.js +9 -5
- package/dist/Input/index.d.ts +9 -0
- package/dist/List/components/List.d.ts +18 -0
- package/dist/List/components/List.types.d.ts +2 -0
- package/dist/List/components/List.vue.js +33 -30
- package/dist/List/components/List.vue2.js +20 -12
- package/dist/Search/Search.d.ts +15 -7
- package/dist/Search/Search.vue.js +36 -25
- package/dist/Search/Search.vue2.js +17 -13
- package/dist/Select/Multiple/Select.multiple.d.ts +11 -0
- package/dist/Select/Multiple/Select.multiple.vue.js +10 -9
- package/dist/Select/Multiple/Select.multiple.vue2.js +7 -2
- package/dist/Select/Select.core.d.ts +11 -0
- package/dist/Select/Select.core.vue.js +8 -7
- package/dist/Select/Select.core.vue2.js +8 -3
- package/dist/Select/Single/Select.single.d.ts +11 -0
- package/dist/Select/Single/Select.single.vue.js +13 -12
- package/dist/Select/Single/Select.single.vue2.js +14 -9
- package/dist/Select/index.d.ts +22 -0
- package/dist/Stepper/Stepper.vue.js +10 -10
- package/dist/TableConfig/TableConfig.d.ts +9 -0
- package/dist/TableConfig/TableConfig.vue.js +7 -6
- package/dist/TableConfig/TableConfig.vue2.js +10 -6
- package/dist/Tabs/Tabs.d.ts +11 -0
- package/dist/Tabs/Tabs.vue.js +22 -18
- package/dist/Tabs/Tabs.vue2.js +23 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ function m(e, p, b, k, f, y) {
|
|
|
32
32
|
}, null, 12, u)
|
|
33
33
|
], 64);
|
|
34
34
|
}
|
|
35
|
-
const $ = /* @__PURE__ */ n(r, [["render", m], ["__scopeId", "data-v-
|
|
35
|
+
const $ = /* @__PURE__ */ n(r, [["render", m], ["__scopeId", "data-v-939d784f"]]);
|
|
36
36
|
export {
|
|
37
37
|
$ as default
|
|
38
38
|
};
|
|
@@ -8,11 +8,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
type: PropType<"left" | "right">;
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
|
+
fullSize: {
|
|
12
|
+
type: PropType<boolean | undefined>;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
id: {
|
|
16
|
+
type: PropType<string | undefined>;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
11
19
|
}, {
|
|
12
20
|
dialogIsOpen: import("vue").Ref<boolean>;
|
|
13
21
|
getDialogClass: import("vue").ComputedRef<string[]>;
|
|
14
22
|
dialogElem: import("vue").Ref<HTMLDivElement | null>;
|
|
15
23
|
triggerElem: import("vue").Ref<HTMLDivElement | null>;
|
|
24
|
+
getStyle: import("vue").ComputedRef<{
|
|
25
|
+
top: string;
|
|
26
|
+
left?: string | undefined;
|
|
27
|
+
right?: string | undefined;
|
|
28
|
+
width?: string | undefined;
|
|
29
|
+
}>;
|
|
16
30
|
toggleDialog: () => void;
|
|
17
31
|
openDialog: () => Promise<void>;
|
|
18
32
|
closeDialog: () => Promise<void>;
|
|
@@ -25,10 +39,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
39
|
type: PropType<"left" | "right">;
|
|
26
40
|
default: string;
|
|
27
41
|
};
|
|
42
|
+
fullSize: {
|
|
43
|
+
type: PropType<boolean | undefined>;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
id: {
|
|
47
|
+
type: PropType<string | undefined>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
28
50
|
}>> & {
|
|
29
51
|
"onUpdate:isOpen"?: ((...args: any[]) => any) | undefined;
|
|
30
52
|
}, {
|
|
31
53
|
isOpen: boolean;
|
|
54
|
+
id: string | undefined;
|
|
32
55
|
position: "left" | "right";
|
|
56
|
+
fullSize: boolean | undefined;
|
|
33
57
|
}, {}>;
|
|
34
58
|
export default _default;
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as
|
|
1
|
+
import a from "./Dropdown.core.vue2.js";
|
|
2
|
+
import { openBlock as o, createElementBlock as r, createElementVNode as i, normalizeClass as l, renderSlot as s, createCommentVNode as d, createBlock as g, Teleport as m, normalizeStyle as p } from "vue";
|
|
3
3
|
import "./Dropdown.core.vue3.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return
|
|
4
|
+
import c from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const f = { class: "container-dialog" }, u = ["id"];
|
|
6
|
+
function $(e, t, k, v, y, C) {
|
|
7
|
+
return o(), r("section", f, [
|
|
8
8
|
i("div", {
|
|
9
|
-
class:
|
|
9
|
+
class: l(e.getDialogClass)
|
|
10
10
|
}, [
|
|
11
|
-
e.$slots.trigger ? (
|
|
11
|
+
e.$slots.trigger ? (o(), r("section", {
|
|
12
12
|
key: 0,
|
|
13
13
|
id: "trigger",
|
|
14
14
|
ref: "triggerElem",
|
|
15
|
-
onClick:
|
|
15
|
+
onClick: t[0] || (t[0] = (...n) => e.toggleDialog && e.toggleDialog(...n))
|
|
16
16
|
}, [
|
|
17
|
-
|
|
17
|
+
s(e.$slots, "trigger", {}, void 0, !0)
|
|
18
18
|
], 512)) : d("", !0),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
(o(), g(m, { to: "body" }, [
|
|
20
|
+
i("div", {
|
|
21
|
+
id: e.id,
|
|
22
|
+
ref: "dialogElem",
|
|
23
|
+
class: l([{ isOpen: e.dialogIsOpen }, "dialog-content"]),
|
|
24
|
+
style: p(e.getStyle)
|
|
25
|
+
}, [
|
|
26
|
+
s(e.$slots, "default", {}, void 0, !0)
|
|
27
|
+
], 14, u)
|
|
28
|
+
]))
|
|
26
29
|
], 2)
|
|
27
30
|
]);
|
|
28
31
|
}
|
|
29
|
-
const
|
|
32
|
+
const _ = /* @__PURE__ */ c(a, [["render", $], ["__scopeId", "data-v-7c481c95"]]);
|
|
30
33
|
export {
|
|
31
|
-
|
|
34
|
+
_ as default
|
|
32
35
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as D, ref as s, watch as O, computed as h, onMounted as x } from "vue";
|
|
2
|
+
const W = D({
|
|
3
3
|
name: "AtDropdown",
|
|
4
4
|
props: {
|
|
5
5
|
isOpen: {
|
|
@@ -9,37 +9,62 @@ const D = v({
|
|
|
9
9
|
position: {
|
|
10
10
|
type: String,
|
|
11
11
|
default: "left"
|
|
12
|
+
},
|
|
13
|
+
fullSize: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
id: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
12
20
|
}
|
|
13
21
|
},
|
|
14
22
|
emits: ["update:isOpen"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
setup(n, { emit: u }) {
|
|
24
|
+
const o = s(!1);
|
|
25
|
+
o.value = n.isOpen;
|
|
26
|
+
const a = s(null), l = s(null);
|
|
27
|
+
O(
|
|
28
|
+
() => n.isOpen,
|
|
29
|
+
(t) => o.value = t
|
|
30
|
+
);
|
|
31
|
+
const w = async () => u("update:isOpen", !0), d = async () => {
|
|
32
|
+
u("update:isOpen", !1);
|
|
33
|
+
}, m = (t) => {
|
|
34
|
+
var e, c;
|
|
35
|
+
o.value && !((e = a == null ? void 0 : a.value) != null && e.contains(t.target)) && !((c = l.value) != null && c.contains(t.target)) && d();
|
|
36
|
+
}, i = s();
|
|
37
|
+
O(
|
|
38
|
+
() => n.isOpen,
|
|
39
|
+
(t) => {
|
|
40
|
+
var e;
|
|
41
|
+
t && (i.value = (e = l.value) == null ? void 0 : e.getBoundingClientRect());
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
const y = () => u("update:isOpen", !o.value), S = h(() => {
|
|
45
|
+
var g, r, p, f, v;
|
|
46
|
+
const t = ((g = l.value) == null ? void 0 : g.clientWidth) ?? 0, e = {
|
|
47
|
+
top: `${window.scrollY + (((r = i.value) == null ? void 0 : r.bottom) ?? 0) + 5}px`
|
|
48
|
+
}, C = (window.innerWidth - (((p = i.value) == null ? void 0 : p.right) ?? 0) <= t ? "right" : n.position) === "left" || n.fullSize ? (f = i.value) == null ? void 0 : f.left : window.innerWidth - (((v = i.value) == null ? void 0 : v.right) ?? 0);
|
|
49
|
+
return e[n.position] = `${C}px`, n.fullSize && (e.width = `${t}px`), e;
|
|
50
|
+
});
|
|
51
|
+
x(() => {
|
|
23
52
|
var t;
|
|
24
|
-
document.addEventListener("click",
|
|
53
|
+
document.addEventListener("click", m), i.value = (t = l.value) == null ? void 0 : t.getBoundingClientRect();
|
|
25
54
|
});
|
|
26
|
-
const
|
|
55
|
+
const B = h(() => ["dialog"]);
|
|
27
56
|
return {
|
|
28
|
-
dialogIsOpen:
|
|
29
|
-
getDialogClass:
|
|
57
|
+
dialogIsOpen: o,
|
|
58
|
+
getDialogClass: B,
|
|
30
59
|
dialogElem: a,
|
|
31
60
|
triggerElem: l,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
61
|
+
getStyle: S,
|
|
62
|
+
toggleDialog: y,
|
|
63
|
+
openDialog: w,
|
|
64
|
+
closeDialog: d
|
|
35
65
|
};
|
|
36
|
-
},
|
|
37
|
-
watch: {
|
|
38
|
-
isOpen(e) {
|
|
39
|
-
this.dialogIsOpen = e;
|
|
40
|
-
}
|
|
41
66
|
}
|
|
42
67
|
});
|
|
43
68
|
export {
|
|
44
|
-
|
|
69
|
+
W as default
|
|
45
70
|
};
|
|
@@ -1,74 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as m, openBlock as n, createElementBlock as a, createVNode as l, withCtx as s, createElementVNode as t, createTextVNode as
|
|
1
|
+
import w from "./Filter.vue2.js";
|
|
2
|
+
import { resolveComponent as m, openBlock as n, createElementBlock as a, createVNode as l, withCtx as s, createElementVNode as t, createTextVNode as d, toDisplayString as i, createCommentVNode as b, Fragment as f, renderList as g, pushScopeId as S, popScopeId as D } from "vue";
|
|
3
3
|
import "./Filter.vue3.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import T from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const y = (e) => (S("data-v-a64d3c70"), e = e(), D(), e), B = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "badge"
|
|
8
|
-
},
|
|
9
|
-
for: "checkAll",
|
|
10
|
-
class: "checkall-label"
|
|
11
|
-
}, E = /* @__PURE__ */ C(() => /* @__PURE__ */ t("span", { class: "separator" }, null, -1)), L = /* @__PURE__ */ C(() => /* @__PURE__ */ t("span", { class: "separator" }, null, -1)), M = ["for"], P = ["for"], j = { class: "at-dropdown-footer" };
|
|
8
|
+
}, $ = { class: "filter" }, F = { class: "at-dropdown-header" }, U = { class: "at-dropdown-content" }, N = { class: "item" }, O = ["for"], E = /* @__PURE__ */ y(() => /* @__PURE__ */ t("span", { class: "separator" }, null, -1)), L = /* @__PURE__ */ y(() => /* @__PURE__ */ t("span", { class: "separator" }, null, -1)), M = ["for"], P = ["for"], j = { class: "at-dropdown-footer" };
|
|
12
9
|
function q(e, r, G, H, J, K) {
|
|
13
|
-
var
|
|
14
|
-
const
|
|
10
|
+
var A;
|
|
11
|
+
const C = m("AtFilterSolidIcon"), h = m("AtCloseSolidIcon"), c = m("AtParagraph"), k = m("AtButton"), I = m("AtCheckbox"), V = m("AtDropDown");
|
|
15
12
|
return n(), a("div", { key: e.keyValue }, [
|
|
16
|
-
l(
|
|
13
|
+
l(V, {
|
|
14
|
+
id: e.id,
|
|
17
15
|
"is-open": e.isOpen,
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
position: (A = e.options) == null ? void 0 : A.position,
|
|
17
|
+
"onUpdate:isOpen": r[3] || (r[3] = (u) => e.isOpen = u)
|
|
20
18
|
}, {
|
|
21
19
|
trigger: s(() => [
|
|
22
|
-
l(
|
|
20
|
+
l(k, {
|
|
23
21
|
id: "dropdown-button",
|
|
24
22
|
variant: e.getButtonColor
|
|
25
23
|
}, {
|
|
26
24
|
default: s(() => {
|
|
27
|
-
var
|
|
25
|
+
var u;
|
|
28
26
|
return [
|
|
29
27
|
t("section", null, [
|
|
30
|
-
l(
|
|
28
|
+
l(C, {
|
|
31
29
|
size: "16",
|
|
32
30
|
class: "me-1"
|
|
33
31
|
}),
|
|
34
|
-
|
|
32
|
+
d(" " + i(((u = e.options) == null ? void 0 : u.buttonText) ?? "Filtros"), 1)
|
|
35
33
|
]),
|
|
36
34
|
e.count > 0 ? (n(), a("span", {
|
|
37
35
|
key: 0,
|
|
38
36
|
class: "clear-icon",
|
|
39
37
|
onClick: r[0] || (r[0] = () => e.clear())
|
|
40
38
|
}, [
|
|
41
|
-
l(
|
|
39
|
+
l(h, {
|
|
42
40
|
size: "20",
|
|
43
41
|
onClick: e.closeDialog
|
|
44
42
|
}, null, 8, ["onClick"])
|
|
45
|
-
])) :
|
|
46
|
-
e.count > 0 ? (n(), a("span",
|
|
47
|
-
l(
|
|
43
|
+
])) : b("", !0),
|
|
44
|
+
e.count > 0 ? (n(), a("span", B, [
|
|
45
|
+
l(c, { size: "p3" }, {
|
|
48
46
|
default: s(() => [
|
|
49
|
-
i(
|
|
47
|
+
d(i(e.count), 1)
|
|
50
48
|
]),
|
|
51
49
|
_: 1
|
|
52
50
|
})
|
|
53
|
-
])) :
|
|
51
|
+
])) : b("", !0)
|
|
54
52
|
];
|
|
55
53
|
}),
|
|
56
54
|
_: 1
|
|
57
55
|
}, 8, ["variant"])
|
|
58
56
|
]),
|
|
59
57
|
default: s(() => {
|
|
60
|
-
var
|
|
58
|
+
var u;
|
|
61
59
|
return [
|
|
62
|
-
t("div",
|
|
60
|
+
t("div", $, [
|
|
63
61
|
t("div", F, [
|
|
64
|
-
l(
|
|
62
|
+
l(c, {
|
|
65
63
|
size: "p1",
|
|
66
64
|
weight: "bold"
|
|
67
65
|
}, {
|
|
68
66
|
default: s(() => {
|
|
69
67
|
var o;
|
|
70
68
|
return [
|
|
71
|
-
i(
|
|
69
|
+
d(i((o = e.options) == null ? void 0 : o.title), 1)
|
|
72
70
|
];
|
|
73
71
|
}),
|
|
74
72
|
_: 1
|
|
@@ -78,89 +76,93 @@ function q(e, r, G, H, J, K) {
|
|
|
78
76
|
class: "closeIcon",
|
|
79
77
|
onClick: r[1] || (r[1] = (...o) => e.closeDialog && e.closeDialog(...o))
|
|
80
78
|
}, [
|
|
81
|
-
l(
|
|
79
|
+
l(h, { size: "20" })
|
|
82
80
|
])
|
|
83
81
|
]),
|
|
84
82
|
t("div", U, [
|
|
85
|
-
(
|
|
83
|
+
(u = e.options) != null && u.checkAllText ? (n(), a(f, { key: 0 }, [
|
|
86
84
|
t("div", N, [
|
|
87
|
-
l(
|
|
88
|
-
id: "checkAll",
|
|
85
|
+
l(I, {
|
|
86
|
+
id: e.getItemId({ text: "checkAll", value: !1 }),
|
|
89
87
|
modelValue: e.checkAllModel,
|
|
90
88
|
"onUpdate:modelValue": r[2] || (r[2] = (o) => e.checkAllModel = o),
|
|
89
|
+
"prevent-default": !0,
|
|
91
90
|
size: "12",
|
|
92
91
|
labelledby: "checkAll"
|
|
93
|
-
}, null, 8, ["modelValue"]),
|
|
94
|
-
t("label",
|
|
95
|
-
|
|
92
|
+
}, null, 8, ["id", "modelValue"]),
|
|
93
|
+
t("label", {
|
|
94
|
+
for: e.getItemId({ text: "checkAll", value: !1 }),
|
|
95
|
+
class: "checkall-label"
|
|
96
|
+
}, [
|
|
97
|
+
l(c, { size: "p2" }, {
|
|
96
98
|
default: s(() => {
|
|
97
99
|
var o;
|
|
98
100
|
return [
|
|
99
|
-
i(
|
|
101
|
+
d(i((o = e.options) == null ? void 0 : o.checkAllText), 1)
|
|
100
102
|
];
|
|
101
103
|
}),
|
|
102
104
|
_: 1
|
|
103
105
|
})
|
|
104
|
-
])
|
|
106
|
+
], 8, O)
|
|
105
107
|
]),
|
|
106
108
|
E
|
|
107
|
-
], 64)) :
|
|
108
|
-
(n(!0), a(
|
|
109
|
+
], 64)) : b("", !0),
|
|
110
|
+
(n(!0), a(f, null, g(e.listSeparator, (o, v) => (n(), a("div", {
|
|
109
111
|
key: `${v}`,
|
|
110
112
|
class: "item-separator"
|
|
111
113
|
}, [
|
|
112
|
-
l(
|
|
114
|
+
l(c, {
|
|
113
115
|
size: "p2",
|
|
114
116
|
weight: "bold"
|
|
115
117
|
}, {
|
|
116
118
|
default: s(() => [
|
|
117
|
-
i(
|
|
119
|
+
d(i(o.key), 1)
|
|
118
120
|
]),
|
|
119
121
|
_: 2
|
|
120
122
|
}, 1024),
|
|
121
123
|
L,
|
|
122
|
-
(n(!0), a(
|
|
124
|
+
(n(!0), a(f, null, g(o.value, (p, z) => (n(), a("div", {
|
|
123
125
|
key: `${z}`,
|
|
124
126
|
class: "item"
|
|
125
127
|
}, [
|
|
126
|
-
l(
|
|
127
|
-
id: p
|
|
128
|
+
l(I, {
|
|
129
|
+
id: e.getItemId(p),
|
|
128
130
|
modelValue: p.value,
|
|
129
|
-
"onUpdate:modelValue": (
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
"onUpdate:modelValue": (_) => p.value = _,
|
|
132
|
+
labelledby: e.getItemId(p),
|
|
133
|
+
size: "12"
|
|
132
134
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "labelledby"]),
|
|
133
135
|
t("label", {
|
|
134
|
-
for:
|
|
136
|
+
for: e.getItemId(p),
|
|
135
137
|
class: "item-label"
|
|
136
138
|
}, [
|
|
137
|
-
l(
|
|
139
|
+
l(c, { size: "p2" }, {
|
|
138
140
|
default: s(() => [
|
|
139
|
-
i(
|
|
141
|
+
d(i(e.getItemText(p)), 1)
|
|
140
142
|
]),
|
|
141
143
|
_: 2
|
|
142
144
|
}, 1024)
|
|
143
145
|
], 8, M)
|
|
144
146
|
]))), 128))
|
|
145
147
|
]))), 128)),
|
|
146
|
-
(n(!0), a(
|
|
148
|
+
(n(!0), a(f, null, g(e.listArray, (o, v) => (n(), a("div", {
|
|
147
149
|
key: `${v}`,
|
|
148
150
|
class: "item"
|
|
149
151
|
}, [
|
|
150
|
-
l(
|
|
151
|
-
id: o
|
|
152
|
+
l(I, {
|
|
153
|
+
id: e.getItemId(o),
|
|
152
154
|
modelValue: o.value,
|
|
153
155
|
"onUpdate:modelValue": (p) => o.value = p,
|
|
154
156
|
size: "12",
|
|
155
|
-
labelledby:
|
|
157
|
+
labelledby: e.getItemId(o)
|
|
156
158
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "labelledby"]),
|
|
157
159
|
t("label", {
|
|
158
|
-
for:
|
|
160
|
+
for: e.getItemId(o),
|
|
159
161
|
class: "item-label"
|
|
160
162
|
}, [
|
|
161
|
-
l(
|
|
163
|
+
l(c, { size: "p2" }, {
|
|
162
164
|
default: s(() => [
|
|
163
|
-
i(
|
|
165
|
+
d(i(e.getItemText(o)), 1)
|
|
164
166
|
]),
|
|
165
167
|
_: 2
|
|
166
168
|
}, 1024)
|
|
@@ -168,7 +170,7 @@ function q(e, r, G, H, J, K) {
|
|
|
168
170
|
]))), 128))
|
|
169
171
|
]),
|
|
170
172
|
t("div", j, [
|
|
171
|
-
l(
|
|
173
|
+
l(k, {
|
|
172
174
|
variant: "secondary",
|
|
173
175
|
class: "clear-button",
|
|
174
176
|
onClick: e.clear
|
|
@@ -176,19 +178,19 @@ function q(e, r, G, H, J, K) {
|
|
|
176
178
|
default: s(() => {
|
|
177
179
|
var o;
|
|
178
180
|
return [
|
|
179
|
-
i(
|
|
181
|
+
d(i(((o = e.options) == null ? void 0 : o.cancelBtnText) ?? "Limpar"), 1)
|
|
180
182
|
];
|
|
181
183
|
}),
|
|
182
184
|
_: 1
|
|
183
185
|
}, 8, ["onClick"]),
|
|
184
|
-
l(
|
|
186
|
+
l(k, {
|
|
185
187
|
class: "save-button",
|
|
186
188
|
onClick: e.save
|
|
187
189
|
}, {
|
|
188
190
|
default: s(() => {
|
|
189
191
|
var o;
|
|
190
192
|
return [
|
|
191
|
-
i(
|
|
193
|
+
d(i(((o = e.options) == null ? void 0 : o.saveBtnText) ?? "Filtrar"), 1)
|
|
192
194
|
];
|
|
193
195
|
}),
|
|
194
196
|
_: 1
|
|
@@ -198,10 +200,10 @@ function q(e, r, G, H, J, K) {
|
|
|
198
200
|
];
|
|
199
201
|
}),
|
|
200
202
|
_: 1
|
|
201
|
-
}, 8, ["is-open", "position"])
|
|
203
|
+
}, 8, ["id", "is-open", "position"])
|
|
202
204
|
]);
|
|
203
205
|
}
|
|
204
|
-
const Y = /* @__PURE__ */
|
|
206
|
+
const Y = /* @__PURE__ */ T(w, [["render", q], ["__scopeId", "data-v-a64d3c70"]]);
|
|
205
207
|
export {
|
|
206
208
|
Y as default
|
|
207
209
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, ref as n, computed as V, toRaw as q } from "vue";
|
|
2
2
|
import { AtCloseSolidIcon as T } from "../../node_modules/.pnpm/agrotools-icons@0.2.6/node_modules/agrotools-icons/dist/AtCloseSolidIcon/index.js";
|
|
3
|
-
import { AtFilterSolidIcon as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { AtTipograph as
|
|
8
|
-
const
|
|
3
|
+
import { AtFilterSolidIcon as B } from "../../node_modules/.pnpm/agrotools-icons@0.2.6/node_modules/agrotools-icons/dist/AtFilterSolidIcon/index.js";
|
|
4
|
+
import E from "../../Button/Button.vue.js";
|
|
5
|
+
import M from "../../Checkbox/Checkbox.vue.js";
|
|
6
|
+
import R from "../../Dropdown/Dropdown.core.vue.js";
|
|
7
|
+
import { AtTipograph as _ } from "../../Tipograph/index.js";
|
|
8
|
+
const $ = {
|
|
9
9
|
AtCloseSolidIcon: T,
|
|
10
|
-
AtFilterSolidIcon:
|
|
11
|
-
},
|
|
10
|
+
AtFilterSolidIcon: B
|
|
11
|
+
}, U = P({
|
|
12
12
|
name: "AtFilter",
|
|
13
13
|
components: {
|
|
14
|
-
AtDropDown:
|
|
15
|
-
AtParagraph:
|
|
16
|
-
AtButton:
|
|
17
|
-
AtCheckbox:
|
|
18
|
-
|
|
14
|
+
AtDropDown: R,
|
|
15
|
+
AtParagraph: _.Paragraph,
|
|
16
|
+
AtButton: E,
|
|
17
|
+
AtCheckbox: M,
|
|
18
|
+
...$
|
|
19
19
|
},
|
|
20
20
|
props: {
|
|
21
21
|
dropDownList: {
|
|
@@ -25,74 +25,79 @@ const _ = {
|
|
|
25
25
|
options: {
|
|
26
26
|
type: Object,
|
|
27
27
|
required: !1
|
|
28
|
+
},
|
|
29
|
+
id: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: !1
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
emits: ["update:isOpen", "onSave"],
|
|
31
|
-
setup(
|
|
35
|
+
setup(i, { emit: k, attrs: d }) {
|
|
32
36
|
const C = (e) => {
|
|
33
37
|
if (typeof e.text == "string")
|
|
34
38
|
return e.text;
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
}, D =
|
|
38
|
-
p.value =
|
|
39
|
-
(e) => structuredClone(
|
|
39
|
+
}, c = n(!1), w = () => {
|
|
40
|
+
c.value = !c.value;
|
|
41
|
+
}, D = V(() => c.value || u.value > 0 ? "primary" : "secondary"), h = n(!1), p = n([]), g = () => {
|
|
42
|
+
p.value = i.dropDownList.map(
|
|
43
|
+
(e) => structuredClone(q(e))
|
|
40
44
|
);
|
|
41
45
|
};
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
46
|
+
g();
|
|
47
|
+
const a = n(), l = n(), A = () => {
|
|
48
|
+
a.value = [], l.value = [], p.value.some((e) => "key" in e) ? a.value = p.value : l.value = p.value;
|
|
45
49
|
};
|
|
46
50
|
A();
|
|
47
|
-
const
|
|
51
|
+
const x = (e) => {
|
|
48
52
|
var t, o;
|
|
49
|
-
(t =
|
|
50
|
-
(
|
|
51
|
-
), (o = l.value) == null || o.map((
|
|
52
|
-
}, v = () =>
|
|
53
|
-
|
|
53
|
+
(t = a.value) == null || t.map(
|
|
54
|
+
(r) => r.value.map((s) => s.value = e)
|
|
55
|
+
), (o = l.value) == null || o.map((r) => r.value = e);
|
|
56
|
+
}, v = () => c.value = !1, L = (e = !0) => {
|
|
57
|
+
h.value = !1, x(!1), I(), y(), e && setTimeout(v, 1);
|
|
54
58
|
}, S = () => {
|
|
55
|
-
var o,
|
|
56
|
-
const e = (o =
|
|
57
|
-
(
|
|
58
|
-
const
|
|
59
|
-
return
|
|
59
|
+
var o, r;
|
|
60
|
+
const e = (o = a.value) == null ? void 0 : o.reduce(
|
|
61
|
+
(s, { key: F, value: f }) => {
|
|
62
|
+
const O = f == null ? void 0 : f.filter((m) => m.value).map((m) => m.text);
|
|
63
|
+
return s[F] = O, s;
|
|
60
64
|
},
|
|
61
65
|
{}
|
|
62
|
-
), t = (
|
|
66
|
+
), t = (r = l.value) == null ? void 0 : r.filter((s) => s.value).map((s) => s.text);
|
|
63
67
|
return t != null && t.length ? t : e;
|
|
64
68
|
}, y = () => {
|
|
65
69
|
var t, o;
|
|
66
70
|
const e = (t = l.value) != null && t.length ? l.value : (
|
|
67
71
|
// .filter((item) => item.value)
|
|
68
|
-
|
|
72
|
+
a.value
|
|
69
73
|
);
|
|
70
|
-
|
|
74
|
+
I(), v(), k(
|
|
71
75
|
"onSave",
|
|
72
|
-
(o =
|
|
76
|
+
(o = i.options) != null && o.returnOnlyChecked && (e != null && e.length) ? S() : e
|
|
73
77
|
);
|
|
74
|
-
}, u = n(0),
|
|
78
|
+
}, u = n(0), I = () => {
|
|
75
79
|
var e, t;
|
|
76
|
-
u.value = 0, u.value += ((e = l.value) == null ? void 0 : e.filter((o) => o.value).length) ?? 0, (t =
|
|
80
|
+
u.value = 0, u.value += ((e = l.value) == null ? void 0 : e.filter((o) => o.value).length) ?? 0, (t = a.value) == null || t.forEach(
|
|
77
81
|
(o) => o.value.forEach(
|
|
78
|
-
(
|
|
82
|
+
(r) => r.value ? u.value++ : u
|
|
79
83
|
)
|
|
80
84
|
);
|
|
81
|
-
},
|
|
85
|
+
}, b = n(0);
|
|
82
86
|
return {
|
|
83
|
-
props:
|
|
87
|
+
props: i,
|
|
84
88
|
list: p,
|
|
85
|
-
listSeparator:
|
|
89
|
+
listSeparator: a,
|
|
86
90
|
listArray: l,
|
|
87
|
-
checkAllModel:
|
|
88
|
-
isOpen:
|
|
91
|
+
checkAllModel: h,
|
|
92
|
+
isOpen: c,
|
|
89
93
|
getButtonColor: D,
|
|
90
94
|
count: u,
|
|
91
|
-
keyValue:
|
|
92
|
-
|
|
95
|
+
keyValue: b,
|
|
96
|
+
getItemId: (e) => d.id ? `${d.id}-${e.text}` : e.text,
|
|
97
|
+
resetList: g,
|
|
93
98
|
setListProps: A,
|
|
94
99
|
toggleDropdown: w,
|
|
95
|
-
setAllCheckboxValues:
|
|
100
|
+
setAllCheckboxValues: x,
|
|
96
101
|
clear: L,
|
|
97
102
|
getItemText: C,
|
|
98
103
|
closeDialog: v,
|
|
@@ -100,8 +105,8 @@ const _ = {
|
|
|
100
105
|
};
|
|
101
106
|
},
|
|
102
107
|
watch: {
|
|
103
|
-
checkAllModel(
|
|
104
|
-
this.setAllCheckboxValues(
|
|
108
|
+
checkAllModel(i) {
|
|
109
|
+
this.setAllCheckboxValues(i);
|
|
105
110
|
},
|
|
106
111
|
dropDownList() {
|
|
107
112
|
this.resetList(), this.clear(!1), this.setListProps(), this.keyValue++;
|
|
@@ -109,5 +114,5 @@ const _ = {
|
|
|
109
114
|
}
|
|
110
115
|
});
|
|
111
116
|
export {
|
|
112
|
-
|
|
117
|
+
U as default
|
|
113
118
|
};
|